141 lines
7.4 KiB
TypeScript
141 lines
7.4 KiB
TypeScript
/* Metro module 12598; source: stores/PermissionSpeakStore.tsx; dependencies: [6, 7, 15, 17, 18, 1379, 1867, 587, 566, 694, 2] */
|
|
import ClassCallCheck from '../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
|
|
import CreateClass from '../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
|
|
import PossibleConstructorReturn from '../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
|
|
import Module00017 from '../by-id/module-00017.js'; /* Metro dependency 17 */
|
|
import Inherits from '../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
|
|
import Flux from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
|
|
import ChannelStore from './ChannelStore.tsx'; /* Metro dependency 1379 */
|
|
import GuildStore from './GuildStore.tsx'; /* Metro dependency 1867 */
|
|
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as StorageModule from '../external/discord_common/js/packages/storage/Storage.tsx'; /* Metro dependency 587 */
|
|
|
|
function _fun96573(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:6, offset: 0x02160d9a, size: 357 bytes, params: 8, frame: 20
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const Store = (Flux).Store;
|
|
let value = _fun96577(Store);
|
|
value.displayName = 'PermissionSpeakStore';
|
|
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function(a0) {
|
|
env0_9 = a0.sessionId;
|
|
env0_11 = false;
|
|
}, CONNECTION_CLOSED: function() {
|
|
env0_9 = null;
|
|
env0_10 = null;
|
|
env0_12 = true;
|
|
}, VOICE_STATE_UPDATES: function({voiceStates}) {
|
|
return voiceStates.reduce(_fun96585, false);
|
|
}, PERMISSION_CLEAR_SUPPRESS_WARNING: function({forever}) {
|
|
env0_12 = true;
|
|
if (forever) {
|
|
require(dependencyMap[7]).Storage.set('hideSuppressWarning', true);
|
|
}
|
|
}});
|
|
(FileImportTrackerModule).fileFinishedImporting('stores/PermissionSpeakStore.tsx');
|
|
exports.default = value;
|
|
function _isNativeReflectConstruct_96574() { // fn#96574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:168, offset: 0x02160eff, 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_96574_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun96577(a0) { // fn#96577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:414, offset: 0x02160f61, size: 124 bytes, params: 2, frame: 16
|
|
const PermissionSpeakStore2 = PermissionSpeakStore;
|
|
Inherits(PermissionSpeakStore2, a0);
|
|
return CreateClass(PermissionSpeakStore2, [{key: 'initialize', value: value_96579}, {key: 'isAFKChannel',
|
|
value: value_96580}, {key: 'shouldShowWarning', value: value_96581}]);
|
|
function PermissionSpeakStore() { // fn#96578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:426, offset: 0x0118e06f, size: 113 bytes, params: 1, frame: 20
|
|
const value = environment.__proto__;
|
|
env1_2(this, PermissionSpeakStore);
|
|
const value3 = env1_5(PermissionSpeakStore);
|
|
return env1_4(this, _isNativeReflectConstruct_96574() ? global.Reflect.construct(value3, arguments,
|
|
env1_5(this).constructor) : value3.apply(this, arguments));
|
|
}
|
|
|
|
function value_96579() { // fn#96579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:744, offset: 0x02160fdd, size: 83 bytes, params: 1, frame: 14
|
|
this.waitFor(ChannelStore, GuildStore);
|
|
const Storage = (StorageModule).Storage;
|
|
env1_13 = Storage.get('hideSuppressWarning') || env1_13;
|
|
}
|
|
|
|
function value_96580() { // fn#96580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:829, offset: 0x02161030, size: 80 bytes, params: 1, frame: 13
|
|
let value = environment.__proto__;
|
|
const channel = ChannelStore.getChannel(env1_10);
|
|
if (channel == null) {
|
|
return false;
|
|
}
|
|
const guildStoreBinding = GuildStore;
|
|
const getGuild = guildStoreBinding.getGuild;
|
|
const getGuildId = channel.getGuildId;
|
|
value = Reflect.apply(getGuild, guildStoreBinding, [Reflect.apply(getGuildId, channel, [])]);
|
|
return value != null && channel.id === value.afkChannelId;
|
|
}
|
|
|
|
function value_96581() { // fn#96581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:986, offset: 0x02161080, size: 52 bytes, params: 1, frame: 12
|
|
const channel = ChannelStore.getChannel(env1_10);
|
|
let r0 = channel != null && channel.isGuildStageVoice();
|
|
r0 = !r0 ? env1_12 : r0;
|
|
return !r0;
|
|
}
|
|
|
|
}
|
|
|
|
function VOICE_STATE_UPDATES_96584({voiceStates}) { // fn#96584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:1303, offset: 0x021610e5, size: 34 bytes, params: 2, frame: 13
|
|
return voiceStates.reduce(_fun96585, false);
|
|
function _fun96585(a0, a1) { // fn#96585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:1370, offset: 0x02161107, size: 120 bytes, params: 3, frame: 5
|
|
var r3;
|
|
var r0;
|
|
var channelId;
|
|
let value = a0;
|
|
let binding = env1_9;
|
|
if (binding !== a1.sessionId) {
|
|
r0 = value;
|
|
} else {
|
|
binding = env1_11;
|
|
env1_11 = binding !== a1.suppress ? a1.suppress : env1_11;
|
|
binding = env1_10;
|
|
channelId = a1.channelId;
|
|
if (binding !== channelId) {
|
|
channelId = a1.channelId;
|
|
env1_12 = !env1_11;
|
|
}
|
|
binding = env1_13;
|
|
r3 = binding || a1.channelId == null;
|
|
value = true;
|
|
r0 = r3 ? value : value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun96573, 12598, [6, 7, 15, 17, 18, 1379, 1867, 587, 566, 694,
|
|
2]) /* metro module 12598, dependencies: [6, 7, 15, 17, 18, 1379, 1867, 587, 566, 694, 2] */;
|