383 lines
15 KiB
TypeScript
383 lines
15 KiB
TypeScript
/* Metro module 7710; source: modules/voice_panel/VoicePanelStore.tsx; dependencies: [1379, 685, 7711, 690, 2] */
|
|
function _fun61612(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7888:6, offset: 0x01b4667d, size: 135 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
|
let value = require(685) /* metro dependency 685 */;
|
|
value = value.createWithEqualityFn(_fun61613);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/VoicePanelStore.tsx');
|
|
exports.default = value;
|
|
}
|
|
|
|
function _fun61613(a0, a1) { // fn#61613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7888:138, offset: 0x01b46704, size: 253 bytes, params: 3, frame: 12
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const object2 = {};
|
|
let Set = global.Set;
|
|
object2.channels = new Set();
|
|
object2.isActivityFocused = false;
|
|
object2.isVoicePanelFullscreen = function() {
|
|
return require().voicePanelsFullscreen.size > 0;
|
|
};
|
|
object2.isAnyVoicePanelOpen = function() {
|
|
return require().voicePanelsOpened.size > 0;
|
|
};
|
|
Set = global.Set;
|
|
object2.voicePanelsFullscreen = new Set();
|
|
Set = global.Set;
|
|
object2.voicePanelsOpened = new Set();
|
|
Set = global.Set;
|
|
object2.voicePanelsPIP = new Set();
|
|
object2.openChannel = openChannel_61616;
|
|
object2.closeChannel = closeChannel;
|
|
object2.isMounted = function(a0) {
|
|
return require().channels.has(a0);
|
|
};
|
|
object2.setIsActivityFocused = setIsActivityFocused;
|
|
object2.setChannelPanelFullscreen = setChannelPanelFullscreen;
|
|
object2.setChannelPanelOpen = setChannelPanelOpen;
|
|
object2.isChannelOpen = function(a0) {
|
|
return require().voicePanelsOpened.has(a0);
|
|
};
|
|
object2.setChannelPanelPIP = setChannelPanelPIP;
|
|
return object2;
|
|
}
|
|
|
|
function openChannel_61616(a0) { // fn#61616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7888:377, offset: 0x01b46841, size: 166 bytes, params: 2, frame: 16
|
|
var environment;
|
|
var r3;
|
|
var channel;
|
|
var channels;
|
|
const env0_0 = a0;
|
|
const value = environment.__proto__;
|
|
const value2 = undefined;
|
|
const isStageVoicePanelEnabled2 = (require(7711) /* metro dependency 7711: StageVoicePanelExperiment */).isStageVoicePanelEnabled('voice_panel_store');
|
|
if (isStageVoicePanelEnabled2) {
|
|
r3 = isStageVoicePanelEnabled2;
|
|
} else {
|
|
channel = ChannelStore.getChannel(a0);
|
|
r3 = (channel == null ? value2 : channel.isGuildStageVoice()) !== true;
|
|
}
|
|
if (r3) {
|
|
channels = require().channels;
|
|
if (!channels.has(a0)) {
|
|
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61617);
|
|
}
|
|
}
|
|
return value2;
|
|
}
|
|
|
|
function closeChannel(a0) { // fn#61619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7888:703, offset: 0x01b469b4, size: 52 bytes, params: 2, frame: 12
|
|
var environment;
|
|
const env0_0 = a0;
|
|
const value = environment.__proto__;
|
|
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61620);
|
|
}
|
|
|
|
function setIsActivityFocused(a0) { // fn#61623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7888:1065, offset: 0x01b46b6a, size: 52 bytes, params: 2, frame: 12
|
|
var environment;
|
|
const env0_0 = a0;
|
|
const value = environment.__proto__;
|
|
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61624);
|
|
}
|
|
|
|
function setChannelPanelFullscreen(a0, a1) { // fn#61626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7888:1181, offset: 0x01b46bea, size: 59 bytes, params: 3, frame: 12
|
|
var environment;
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const value = environment.__proto__;
|
|
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61627);
|
|
}
|
|
|
|
function setChannelPanelOpen(a0, a1) { // fn#61629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7888:1404, offset: 0x01b46cb8, size: 59 bytes, params: 3, frame: 12
|
|
var environment;
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const value = environment.__proto__;
|
|
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61630);
|
|
}
|
|
|
|
function setChannelPanelPIP(a0, a1) { // fn#61633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7888:1690, offset: 0x01b46dc1, size: 59 bytes, params: 3, frame: 12
|
|
var environment;
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const value = environment.__proto__;
|
|
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61634);
|
|
}
|
|
|
|
function _fun61617() { // fn#61617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7888:562, offset: 0x01b468e7, size: 23 bytes, params: 1, frame: 11
|
|
env1_0(_fun61618);
|
|
}
|
|
|
|
function _fun61620() { // fn#61620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7888:741, offset: 0x01b469e8, size: 23 bytes, params: 1, frame: 11
|
|
env1_0(_fun61621);
|
|
}
|
|
|
|
function _fun61624() { // fn#61624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7888:1111, offset: 0x01b46b9e, size: 23 bytes, params: 1, frame: 11
|
|
env1_0(_fun61625);
|
|
}
|
|
|
|
function _fun61627() { // fn#61627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7888:1234, offset: 0x01b46c25, size: 23 bytes, params: 1, frame: 11
|
|
env1_0(_fun61628);
|
|
}
|
|
|
|
function _fun61630() { // fn#61630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7888:1451, offset: 0x01b46cf3, size: 23 bytes, params: 1, frame: 11
|
|
env1_0(_fun61631);
|
|
}
|
|
|
|
function _fun61634() { // fn#61634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7888:1736, offset: 0x01b46dfc, size: 23 bytes, params: 1, frame: 11
|
|
env1_0(_fun61635);
|
|
}
|
|
|
|
function _fun61618(a0) { // fn#61618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7888:570, offset: 0x01b468fe, size: 182 bytes, params: 2, frame: 19
|
|
const object2 = {};
|
|
copyDataProperties(object2, a0, undefined);
|
|
let Set = global.Set;
|
|
const value = environment.__proto__;
|
|
const binding = env1_0;
|
|
const items3 = [binding];
|
|
const Array = global.Array;
|
|
arraySpread(items3, Array.from(a0.channels), 1, Array);
|
|
object2['channels'] = new Set(items3);
|
|
Set = global.Set;
|
|
const items2 = [binding];
|
|
const Array2 = global.Array;
|
|
arraySpread(items2, Array2.from(a0.voicePanelsOpened), 1, Array);
|
|
object2['voicePanelsOpened'] = new Set(items2);
|
|
return object2;
|
|
}
|
|
|
|
function _fun61621(a0) { // fn#61621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7888:749, offset: 0x01b469ff, size: 329 bytes, params: 2, frame: 18
|
|
var r5;
|
|
var r4;
|
|
var r3;
|
|
var r0;
|
|
var set;
|
|
var object2;
|
|
const value = a0;
|
|
const channels = value.channels;
|
|
const voicePanelsFullscreen = value.voicePanelsFullscreen;
|
|
const voicePanelsOpened = value.voicePanelsOpened;
|
|
let has = channels.has;
|
|
if (Reflect.apply(has, channels, [env1_0])) {
|
|
has = channels.has;
|
|
if (Reflect.apply(has, channels, [env1_0])) {
|
|
set = new global.Set(channels);
|
|
set.delete(env1_0);
|
|
r5 = set;
|
|
} else {
|
|
r5 = channels;
|
|
}
|
|
has = voicePanelsFullscreen.has;
|
|
if (Reflect.apply(has, voicePanelsFullscreen, [env1_0])) {
|
|
set = new global.Set(voicePanelsFullscreen);
|
|
set.delete(env1_0);
|
|
r4 = set;
|
|
} else {
|
|
r4 = voicePanelsFullscreen;
|
|
}
|
|
has = voicePanelsOpened.has;
|
|
if (Reflect.apply(has, voicePanelsOpened, [env1_0])) {
|
|
set = new global.Set(voicePanelsOpened);
|
|
set.delete(env1_0);
|
|
r3 = set;
|
|
} else {
|
|
r3 = voicePanelsOpened;
|
|
}
|
|
object2 = {};
|
|
copyDataProperties(object2, value, voicePanelsOpened);
|
|
object2['channels'] = r5;
|
|
object2['voicePanelsFullscreen'] = r4;
|
|
object2['voicePanelsOpened'] = r3;
|
|
r0 = object2;
|
|
} else {
|
|
has = voicePanelsFullscreen.has;
|
|
if (Reflect.apply(has, voicePanelsFullscreen, [env1_0])) {
|
|
has = channels.has;
|
|
if (Reflect.apply(has, channels, [env1_0])) {
|
|
set = new global.Set(channels);
|
|
set.delete(env1_0);
|
|
r5 = set;
|
|
} else {
|
|
r5 = channels;
|
|
}
|
|
has = voicePanelsFullscreen.has;
|
|
if (Reflect.apply(has, voicePanelsFullscreen, [env1_0])) {
|
|
set = new global.Set(voicePanelsFullscreen);
|
|
set.delete(env1_0);
|
|
r4 = set;
|
|
} else {
|
|
r4 = voicePanelsFullscreen;
|
|
}
|
|
has = voicePanelsOpened.has;
|
|
if (Reflect.apply(has, voicePanelsOpened, [env1_0])) {
|
|
set = new global.Set(voicePanelsOpened);
|
|
set.delete(env1_0);
|
|
r3 = set;
|
|
} else {
|
|
r3 = voicePanelsOpened;
|
|
}
|
|
object2 = {};
|
|
copyDataProperties(object2, value, voicePanelsOpened);
|
|
object2['channels'] = r5;
|
|
object2['voicePanelsFullscreen'] = r4;
|
|
object2['voicePanelsOpened'] = r3;
|
|
r0 = object2;
|
|
} else {
|
|
has = voicePanelsOpened.has;
|
|
if (Reflect.apply(has, voicePanelsOpened, [env1_0])) {
|
|
has = channels.has;
|
|
if (Reflect.apply(has, channels, [env1_0])) {
|
|
set = new global.Set(channels);
|
|
set.delete(env1_0);
|
|
r5 = set;
|
|
} else {
|
|
r5 = channels;
|
|
}
|
|
has = voicePanelsFullscreen.has;
|
|
if (Reflect.apply(has, voicePanelsFullscreen, [env1_0])) {
|
|
set = new global.Set(voicePanelsFullscreen);
|
|
set.delete(env1_0);
|
|
r4 = set;
|
|
} else {
|
|
r4 = voicePanelsFullscreen;
|
|
}
|
|
has = voicePanelsOpened.has;
|
|
if (Reflect.apply(has, voicePanelsOpened, [env1_0])) {
|
|
set = new global.Set(voicePanelsOpened);
|
|
set.delete(env1_0);
|
|
r3 = set;
|
|
} else {
|
|
r3 = voicePanelsOpened;
|
|
}
|
|
object2 = {};
|
|
copyDataProperties(object2, value, voicePanelsOpened);
|
|
object2['channels'] = r5;
|
|
object2['voicePanelsFullscreen'] = r4;
|
|
object2['voicePanelsOpened'] = r3;
|
|
r0 = object2;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
}
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun61625(a0) { // fn#61625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7888:1119, offset: 0x01b46bb5, size: 53 bytes, params: 2, frame: 14
|
|
var r0;
|
|
var object2;
|
|
const value = a0;
|
|
const isActivityFocused = value.isActivityFocused;
|
|
if (isActivityFocused === env1_0) {
|
|
r0 = value;
|
|
} else {
|
|
object2 = {};
|
|
copyDataProperties(object2, value, isActivityFocused);
|
|
object2['isActivityFocused'] = env1_0;
|
|
r0 = object2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun61628(a0) { // fn#61628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7888:1242, offset: 0x01b46c3c, size: 124 bytes, params: 2, frame: 15
|
|
var r5;
|
|
var property;
|
|
var object2;
|
|
const Set = global.Set;
|
|
const set = new Set(a0.voicePanelsFullscreen);
|
|
const value3 = set.has(env1_0);
|
|
if (require) {
|
|
if (value3) {
|
|
return a0;
|
|
}
|
|
set.add(env1_0);
|
|
r5 = has;
|
|
object2 = {};
|
|
copyDataProperties(object2, a0, r5);
|
|
object2['voicePanelsFullscreen'] = set;
|
|
return object2;
|
|
}
|
|
if (value3) {
|
|
property = set.delete;
|
|
Reflect.apply(property, set, [env1_0]);
|
|
r5 = property;
|
|
object2 = {};
|
|
copyDataProperties(object2, a0, r5);
|
|
object2['voicePanelsFullscreen'] = set;
|
|
return object2;
|
|
}
|
|
return a0;
|
|
}
|
|
|
|
function _fun61631(a0) { // fn#61631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7888:1459, offset: 0x01b46d0a, size: 149 bytes, params: 2, frame: 15
|
|
var r5;
|
|
var Set;
|
|
var voicePanelsOpened;
|
|
var set;
|
|
var value4;
|
|
var property;
|
|
var object2;
|
|
const channels = a0.channels;
|
|
const has = channels.has;
|
|
if (Reflect.apply(has, channels, [env1_0])) {
|
|
Set = global.Set;
|
|
voicePanelsOpened = a0.voicePanelsOpened;
|
|
set = new Set();
|
|
value4 = set.has(env1_0);
|
|
if (require) {
|
|
if (value4) {
|
|
return a0;
|
|
}
|
|
set.add(env1_0);
|
|
r5 = has;
|
|
object2 = {};
|
|
copyDataProperties(object2, a0, r5);
|
|
object2['voicePanelsOpened'] = set;
|
|
return object2;
|
|
}
|
|
if (value4) {
|
|
property = set.delete;
|
|
Reflect.apply(property, set, [env1_0]);
|
|
r5 = property;
|
|
object2 = {};
|
|
copyDataProperties(object2, a0, r5);
|
|
object2['voicePanelsOpened'] = set;
|
|
return object2;
|
|
}
|
|
}
|
|
return a0;
|
|
}
|
|
|
|
function _fun61635(a0) { // fn#61635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7888:1744, offset: 0x01b46e13, size: 124 bytes, params: 2, frame: 15
|
|
var r5;
|
|
var property;
|
|
var object2;
|
|
const Set = global.Set;
|
|
const set = new Set(a0.voicePanelsPIP);
|
|
const value3 = set.has(env1_0);
|
|
if (require) {
|
|
if (value3) {
|
|
return a0;
|
|
}
|
|
set.add(env1_0);
|
|
r5 = has;
|
|
object2 = {};
|
|
copyDataProperties(object2, a0, r5);
|
|
object2['voicePanelsPIP'] = set;
|
|
return object2;
|
|
}
|
|
if (value3) {
|
|
property = set.delete;
|
|
Reflect.apply(property, set, [env1_0]);
|
|
r5 = property;
|
|
object2 = {};
|
|
copyDataProperties(object2, a0, r5);
|
|
object2['voicePanelsPIP'] = set;
|
|
return object2;
|
|
}
|
|
return a0;
|
|
}
|
|
|