2663 lines
118 KiB
TypeScript
2663 lines
118 KiB
TypeScript
/* Metro module 1379; source: stores/ChannelStore.tsx; dependencies: [15, 17, 18, 57, 5, 6, 7, 1380, 1382, 1383, 1226, 1867, 1878, 661, 3, 1360, 1910, 1929, 1930, 694, 1931, 20, 21, 1932, 22, 566, 2] */
|
|
import Module00005 from '../by-id/module-00005.js'; /* Metro dependency 5 */
|
|
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 SnowflakeUtils from '../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */
|
|
import Module00022 from '../by-id/module-00022.js'; /* Metro dependency 22 */
|
|
import Module00057 from '../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import Flux from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
|
|
import AuthenticationStore from './AuthenticationStore.tsx'; /* Metro dependency 1226 */
|
|
import BasicChannelCacheStore from '../modules/app_database/stores/BasicChannelCacheStore.tsx'; /* Metro dependency 1380 */
|
|
import FavoriteStore from '../modules/favorites/FavoriteStore.tsx'; /* Metro dependency 1382 */
|
|
import GuildStore from './GuildStore.tsx'; /* Metro dependency 1867 */
|
|
import UserStore from './UserStore.tsx'; /* Metro dependency 1878 */
|
|
import ChannelReader from '../modules/app_database/modules/channels/ChannelReader.tsx'; /* Metro dependency 1930 */
|
|
import IsChangelogUser from '../modules/changelog/utils/isChangelogUser.tsx'; /* Metro dependency 1932 */
|
|
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as GlobalUtilsModule from '../utils/GlobalUtils.tsx'; /* Metro dependency 1360 */
|
|
import * as ChannelRecordModule from '../records/ChannelRecord.tsx'; /* Metro dependency 1383 */
|
|
|
|
function _fun15956(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#15956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:6, offset: 0x00e435e8, size: 1060 bytes, params: 8, frame: 27
|
|
const env0_0 = require;
|
|
const _arrayLikeToArray_15962 = 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 THREAD_CREATE2 = THREAD_CREATE;
|
|
const closure2 = function({threads}) {
|
|
threads.forEach(_fun15977);
|
|
};
|
|
const CHANNEL_DELETE_159792 = CHANNEL_DELETE_15979;
|
|
const LOAD_MESSAGES_AROUND_SUCCESS2 = LOAD_MESSAGES_AROUND_SUCCESS;
|
|
const closure5 = function({data}) {
|
|
data.forEach(_fun15982);
|
|
};
|
|
const handleFavoritesUpdate = function() {
|
|
var r4;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var value3;
|
|
for (propertyName in FavoriteStore.getFavoriteChannels()) {
|
|
value3 = FavoriteStore.getCategoryRecord(propertyName);
|
|
if (value3 == null) {
|
|
r4 = propertyName2;
|
|
continue;
|
|
}
|
|
({})[propertyName] = value3;
|
|
r4 = propertyName2;
|
|
}
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ChannelRecordModule;
|
|
const env0_12 = value.createChannelRecordFromServer;
|
|
const env0_13 = value.isPrivate;
|
|
const env0_14 = value.GUILD_CHANNEL_TYPES;
|
|
const env0_15 = value.THREAD_CHANNEL_TYPES;
|
|
const env0_16 = value.ALL_CHANNEL_TYPES;
|
|
const env0_17 = value.castChannelRecord;
|
|
value = importDefault(3) /* metro dependency 3: Logger */;
|
|
value = new value('ChannelStore');
|
|
const env0_23 = {};
|
|
const env0_24 = {};
|
|
const env0_25 = {};
|
|
const env0_26 = {};
|
|
const env0_28 = {};
|
|
const env0_29 = {};
|
|
const env0_30 = {};
|
|
const env0_32 = {};
|
|
const env0_33 = {};
|
|
const Set = global.Set;
|
|
let set = new Set();
|
|
const env0_35 = {};
|
|
const env0_37 = {};
|
|
set = _fun15989();
|
|
object = {Basic: 0};
|
|
object[0] = 'Basic';
|
|
object.Full = 1;
|
|
object[1] = 'Full';
|
|
const Store = (Flux).Store;
|
|
let value3 = _fun16004(Store);
|
|
value3.displayName = 'ChannelStore';
|
|
const value6 = new value3(importDefault(694) /* metro dependency 694: Dispatcher */,
|
|
{BACKGROUND_SYNC: BACKGROUND_SYNC, CACHE_LOADED_LAZY: CACHE_LOADED_LAZY, CACHE_LOADED: CACHE_LOADED_16038,
|
|
CHANNEL_CREATE: function(a0) {
|
|
setChannel(a0.channel);
|
|
}, CHANNEL_DELETE: CHANNEL_DELETE_159792, CHANNEL_RECIPIENT_ADD: CHANNEL_RECIPIENT_ADD,
|
|
CHANNEL_RECIPIENT_REMOVE: CHANNEL_RECIPIENT_REMOVE, CHANNEL_UPDATES: CHANNEL_UPDATES,
|
|
CONNECTION_OPEN_SUPPLEMENTAL: CONNECTION_OPEN_SUPPLEMENTAL_16045, CONNECTION_OPEN: CONNECTION_OPEN_16046,
|
|
CHANNEL_PERMISSIONS_PUT_OVERWRITE_SUCCESS: function({channelId, overwrite}) {
|
|
var value2 = _getChannel(channelId);
|
|
if (value2 == null) {
|
|
return false;
|
|
}
|
|
var setChannelBinding = setChannel;
|
|
var object = {};
|
|
copyDataProperties(object, value2.permissionOverwrites, overwrite);
|
|
object[overwrite.id] = overwrite;
|
|
setChannelBinding(value2.set('permissionOverwrites', object));
|
|
}, CHANNEL_PERMISSIONS_DELETE_OVERWRITE_SUCCESS: function({channelId, overwriteId}) {
|
|
var value2 = _getChannel(channelId);
|
|
if (value2 == null) {
|
|
return false;
|
|
}
|
|
var object = {};
|
|
copyDataProperties(object, value2.permissionOverwrites, value2);
|
|
delete object[overwriteId];
|
|
setChannel(value2.set('permissionOverwrites', object));
|
|
}, GUILD_CREATE: function(a0) {
|
|
handleOneGuildCreate(a0.guild);
|
|
}, GUILD_DELETE: GUILD_DELETE_16050, LOAD_ARCHIVED_THREADS_SUCCESS: closure2, LOAD_CHANNELS: LOAD_CHANNELS,
|
|
LOAD_MESSAGES_AROUND_SUCCESS: LOAD_MESSAGES_AROUND_SUCCESS2,
|
|
LOAD_MESSAGES_SUCCESS: LOAD_MESSAGES_AROUND_SUCCESS2, LOAD_THREADS_SUCCESS: closure2, LOGOUT: LOGOUT_16052,
|
|
OVERLAY_INITIALIZE: function(a0) {
|
|
var r2;
|
|
var value4;
|
|
var setChannelBinding;
|
|
var moduleValue;
|
|
var value5;
|
|
var value2 = _createForOfIteratorHelperLoose_15960(a0.channels);
|
|
var value3 = value2();
|
|
if (!value3.done) {
|
|
for (r2 = value3; true; r2 = value5) {
|
|
value4 = r2.value;
|
|
setChannelBinding = setChannel;
|
|
moduleValue = require(dependencyMap[20]);
|
|
setChannelBinding(moduleValue.deserializeChannel(castChannelRecord(value4)));
|
|
value5 = value2();
|
|
if (value5.done) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}, SEARCH_MESSAGES_SUCCESS: closure5, MOD_VIEW_SEARCH_MESSAGES_SUCCESS: closure5, THREAD_CREATE: THREAD_CREATE2,
|
|
THREAD_DELETE: CHANNEL_DELETE_159792, THREAD_LIST_SYNC: function({threads}) {
|
|
threads.forEach(_fun16055);
|
|
}, THREAD_UPDATE: THREAD_CREATE2});
|
|
(FileImportTrackerModule).fileFinishedImporting('stores/ChannelStore.tsx');
|
|
exports.default = value6;
|
|
exports.ChannelLoader = set;
|
|
function _isNativeReflectConstruct_15957() { // fn#15957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:400, offset: 0x00e43a0c, 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_15957_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _createForOfIteratorHelperLoose_15960(a0, a1) { // fn#15960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:593, offset: 0x00e43a6a, 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 _fun15961;
|
|
}
|
|
value = undefined;
|
|
if (a0) {
|
|
if (typeof a0 === 'string') {
|
|
value = _arrayLikeToArray_15962(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_15962(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
|
if (regexp.test(r9)) {
|
|
value = _arrayLikeToArray_15962(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
}
|
|
r5 = r6;
|
|
}
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
if (r5) {
|
|
if (r5) {
|
|
}
|
|
return _fun15961;
|
|
}
|
|
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 _fun15961() { // fn#15961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:1164, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
|
|
return env0_1 >= env0_0.length ? {done: true} : {done: false,
|
|
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
|
|
}
|
|
|
|
}
|
|
|
|
function ensureGuildLoaded(a0, a1, a2) { // fn#15963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:3134, offset: 0x00e43bdc, size: 676 bytes, params: 4, frame: 28
|
|
var environment;
|
|
var r4;
|
|
var value;
|
|
var binding;
|
|
var has;
|
|
var Basic;
|
|
var basicChannelCacheStoreBinding;
|
|
var hasGuild;
|
|
var defaultImport;
|
|
var database;
|
|
var value2;
|
|
var verbose;
|
|
var HermesInternal;
|
|
var concat;
|
|
var moduleValue;
|
|
var tryLoadOrResetCacheGateway;
|
|
var value3;
|
|
var value4;
|
|
var value5;
|
|
var property;
|
|
var property2;
|
|
var add;
|
|
var restored;
|
|
var defaultImport2;
|
|
var mark;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var done;
|
|
var value9;
|
|
var Object;
|
|
var hasOwn;
|
|
var id;
|
|
var value10;
|
|
var length;
|
|
var binding2;
|
|
var log;
|
|
const env0_0 = a0;
|
|
if (a0 != null) {
|
|
reducibleJoin15: while (true) {
|
|
if (a0 === 'null') {
|
|
break reducibleJoin15;
|
|
}
|
|
value = environment;
|
|
binding = env0_34;
|
|
has = binding.has;
|
|
if (Reflect.apply(has, binding, [a0])) {
|
|
break reducibleJoin15;
|
|
}
|
|
Basic = env0_40.Basic;
|
|
if (a1 === Basic) {
|
|
basicChannelCacheStoreBinding = BasicChannelCacheStore;
|
|
hasGuild = basicChannelCacheStoreBinding.hasGuild;
|
|
reducibleJoin5: while (true) {
|
|
if (Reflect.apply(hasGuild, basicChannelCacheStoreBinding, [a0])) {
|
|
break reducibleJoin15;
|
|
}
|
|
break reducibleJoin5;
|
|
}
|
|
}
|
|
defaultImport = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
|
|
database = defaultImport.database;
|
|
value2 = Reflect.apply(database, defaultImport, []);
|
|
var env0_1 = value2;
|
|
if (value2 == null) {
|
|
break reducibleJoin15;
|
|
}
|
|
binding = env0_22;
|
|
verbose = binding.verbose;
|
|
HermesInternal = global.HermesInternal;
|
|
concat = HermesInternal.concat;
|
|
Reflect.apply(verbose, binding, ['hydrating guild (guild: ' + a0 + ', trace: ' + a2 + ')']);
|
|
moduleValue = require(1929) /* metro dependency 1929: TryLoad */;
|
|
tryLoadOrResetCacheGateway = moduleValue.tryLoadOrResetCacheGateway;
|
|
HermesInternal = global.HermesInternal;
|
|
concat = HermesInternal.concat;
|
|
value3 = 'ensureGuildLoaded(' + a0 + ')';
|
|
value4 = Reflect.apply(tryLoadOrResetCacheGateway, moduleValue, [value3, _fun15964, 'ensureGuildLoaded']);
|
|
if (value4 == null) {
|
|
binding = env0_34;
|
|
binding.add(a0);
|
|
basicChannelCacheStoreBinding = BasicChannelCacheStore;
|
|
basicChannelCacheStoreBinding.restored(a0);
|
|
binding = env0_22;
|
|
log = binding.log;
|
|
concat = global.HermesInternal.concat;
|
|
Reflect.apply(log, binding,
|
|
['load returned null; early returning (guild: ' + a0 + ', database: ' + value2 + ')']);
|
|
return undefined;
|
|
}
|
|
value5 = Module00057(value4, 2);
|
|
property = value5[0];
|
|
property2 = value5[1];
|
|
(importDefault(1931) /* metro dependency 1931: deserializeChannels */)(property);
|
|
Basic = env0_40.Basic;
|
|
reducibleJoin9: while (true) {
|
|
if (a1 === Basic) {
|
|
break reducibleJoin9;
|
|
}
|
|
env0_39 += 1;
|
|
break reducibleJoin9;
|
|
}
|
|
binding = env0_34;
|
|
add = binding.add;
|
|
Reflect.apply(add, binding, [a0]);
|
|
basicChannelCacheStoreBinding = BasicChannelCacheStore;
|
|
restored = basicChannelCacheStoreBinding.restored;
|
|
Reflect.apply(restored, basicChannelCacheStoreBinding, [a0]);
|
|
defaultImport2 = importDefault(20) /* metro dependency 20: AppStartPerformance */;
|
|
mark = defaultImport2.mark;
|
|
HermesInternal = global.HermesInternal;
|
|
concat = HermesInternal.concat;
|
|
value6 = 'loaded guild channels (guild: ' + a0 + ')';
|
|
Reflect.apply(mark, defaultImport2, ['❗', value6, property2]);
|
|
value7 = _createForOfIteratorHelperLoose_15960(property);
|
|
value8 = value7();
|
|
done = value8.done;
|
|
if (!done) {
|
|
r4 = value8;
|
|
reducibleLoop10: while (true) {
|
|
value9 = r4.value;
|
|
Object = global.Object;
|
|
hasOwn = Object.hasOwn;
|
|
binding = env0_24;
|
|
id = value9.id;
|
|
reducibleJoin12: while (true) {
|
|
if (Reflect.apply(hasOwn, Object, [binding, id])) {
|
|
break reducibleJoin12;
|
|
}
|
|
setGuildChannel(castChannelRecord(value9));
|
|
break reducibleJoin12;
|
|
}
|
|
value10 = value7();
|
|
done = value10.done;
|
|
if (done) {
|
|
break reducibleLoop10;
|
|
}
|
|
r4 = value10;
|
|
continue reducibleLoop10;
|
|
}
|
|
}
|
|
binding = env0_22;
|
|
verbose = binding.verbose;
|
|
length = property.length;
|
|
binding2 = env0_39;
|
|
HermesInternal = global.HermesInternal;
|
|
concat = HermesInternal.concat;
|
|
Reflect.apply(verbose, binding,
|
|
['hydration complete (guild: ' + a0 + ', channels: ' + length + ', guilds_loaded: ' + binding2 + ')']);
|
|
break reducibleJoin15;
|
|
}
|
|
}
|
|
function _fun15964() { // fn#15964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:3397, offset: 0x00e43e80, size: 52 bytes, params: 1, frame: 13
|
|
const value = environment.__proto__;
|
|
return (ChannelReader).getSync(env0_1, env0_0);
|
|
}
|
|
|
|
}
|
|
|
|
function ensureChannelLoaded(a0, a1, a2) { // fn#15965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:3923, offset: 0x00e43eb4, size: 188 bytes, params: 4, frame: 17
|
|
var basicChannel;
|
|
let Object = global.Object;
|
|
if (!Object.hasOwn(env0_24, a0)) {
|
|
Object = global.Object;
|
|
if (!Object.hasOwn(env0_26, a0)) {
|
|
Object = global.Object;
|
|
if (!Object.hasOwn(env0_28, a0)) {
|
|
Object = global.Object;
|
|
if (!Object.hasOwn(env0_33, a0)) {
|
|
if (a1 === env0_40.Full) {
|
|
basicChannel = BasicChannelCacheStore.getBasicChannel(a0);
|
|
if (basicChannel?.guild_id != null) {
|
|
ensureGuildLoaded(basicChannel.guild_id, a1, a2);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function deleteGuildChannels(a0) { // fn#15966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:4154, offset: 0x00e43f70, size: 180 bytes, params: 2, frame: 16
|
|
var r4;
|
|
var _createForOfIteratorHelperLoose_15960Binding;
|
|
var defaultImport;
|
|
var keys;
|
|
var value2;
|
|
var value3;
|
|
var done;
|
|
var value4;
|
|
var value5;
|
|
env0_22.fileOnly('Deleting guild channels for ' + a0);
|
|
reducibleJoin4: while (true) {
|
|
if (env0_25[a0] == null) {
|
|
break reducibleJoin4;
|
|
}
|
|
_createForOfIteratorHelperLoose_15960Binding = _createForOfIteratorHelperLoose_15960;
|
|
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
keys = defaultImport.keys;
|
|
value2 = _createForOfIteratorHelperLoose_15960Binding(Reflect.apply(keys, defaultImport, [env0_25[a0]]));
|
|
value3 = value2();
|
|
done = value3.done;
|
|
if (!done) {
|
|
r4 = value3;
|
|
reducibleLoop2: while (true) {
|
|
value4 = r4.value;
|
|
delete env0_24[value4];
|
|
value5 = value2();
|
|
done = value5.done;
|
|
if (done) {
|
|
break reducibleLoop2;
|
|
}
|
|
r4 = value5;
|
|
continue reducibleLoop2;
|
|
}
|
|
}
|
|
delete env0_25[a0];
|
|
break reducibleJoin4;
|
|
}
|
|
reducibleJoin6: while (true) {
|
|
if (env0_29[a0] == null) {
|
|
break reducibleJoin6;
|
|
}
|
|
delete env0_29[a0];
|
|
break reducibleJoin6;
|
|
}
|
|
}
|
|
|
|
function _getBasicChannel2(a0) { // fn#15967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:4391, offset: 0x00e44024, size: 100 bytes, params: 2, frame: 16
|
|
const ensureChannelLoadedBinding = ensureChannelLoaded;
|
|
const Basic = env0_40.Basic;
|
|
ensureChannelLoadedBinding(a0, Basic, 'getBasicChannel');
|
|
let r0 = env0_24[a0] ?? env0_26[a0];
|
|
r0 = r0 ?? env0_28[a0];
|
|
r0 = r0 ?? env0_33[a0];
|
|
r0 = r0 ?? BasicChannelCacheStore.getBasicChannel(a0);
|
|
return r0;
|
|
}
|
|
|
|
function _getChannel(a0) { // fn#15968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:4578, offset: 0x00e44088, size: 93 bytes, params: 2, frame: 16
|
|
const ensureChannelLoadedBinding = ensureChannelLoaded;
|
|
const Full = env0_40.Full;
|
|
ensureChannelLoadedBinding(a0, Full, 'getChannel');
|
|
let r0 = env0_24[a0] ?? env0_26[a0];
|
|
r0 = r0 ?? env0_28[a0];
|
|
r0 = r0 ?? env0_33[a0];
|
|
r0 = r0 ?? env0_37[a0];
|
|
return r0;
|
|
}
|
|
|
|
function setChannel(a0) { // fn#15969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:4737, offset: 0x00e440e5, size: 108 bytes, params: 2, frame: 13
|
|
if (a0.isPrivate()) {
|
|
delete env0_37[a0.id];
|
|
setPrivateChannel(a0);
|
|
} else if (a0.isThread()) {
|
|
setThread(a0);
|
|
} else if (GUILD_CHANNEL_TYPES.has(a0.type)) {
|
|
setGuildChannel(a0);
|
|
}
|
|
}
|
|
|
|
function setPrivateChannel(a0) { // fn#15970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:4872, offset: 0x00e44151, size: 114 bytes, params: 2, frame: 12
|
|
if (a0.recipients.find(_fun15971) != null) {
|
|
return false;
|
|
}
|
|
env0_26[a0.id] = a0;
|
|
const type = a0.type;
|
|
const DM = ChannelTypes.DM;
|
|
if (type === DM) {
|
|
env0_30[a0.getRecipientId()] = a0.id;
|
|
}
|
|
env0_31 += 1;
|
|
function _fun15971(a0) { // fn#15971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:4930, offset: 0x00e441c3, size: 35 bytes, params: 2, frame: 11
|
|
const value = environment.__proto__;
|
|
return (IsChangelogUser)(a0);
|
|
}
|
|
|
|
}
|
|
|
|
function setThread(a0) { // fn#15972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:5015, offset: 0x00e441e6, size: 154 bytes, params: 2, frame: 19
|
|
let binding = env0_24;
|
|
const property = binding[a0.parent_id];
|
|
binding = env0_28;
|
|
const id = a0.id;
|
|
const merge = a0.merge;
|
|
const value2 = undefined;
|
|
binding[id] = Reflect.apply(merge, a0, [{nsfw: (property == null ? value2 : property.nsfw) === true,
|
|
parentChannelThreadType: property == null ? value2 : property.type}]);
|
|
if (a0.isScheduledForDeletion()) {
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'THREAD_DELETE', channel: a0});
|
|
}
|
|
return value2;
|
|
}
|
|
|
|
function setGuildChannel(a0) { // fn#15973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:5237, offset: 0x00e44280, size: 149 bytes, params: 2, frame: 9
|
|
const id = a0.id;
|
|
const guild_id = a0.guild_id;
|
|
env0_24[id] = a0;
|
|
let binding = env0_25;
|
|
let property = binding[guild_id];
|
|
binding[guild_id] = property ?? ({});
|
|
env0_25[guild_id][id] = a0;
|
|
binding = env0_32;
|
|
binding[guild_id] = (binding[guild_id] ?? 0) + 1;
|
|
if (a0.linkedLobby != null) {
|
|
binding = env0_29;
|
|
binding[guild_id] = binding[guild_id] ?? ({});
|
|
env0_29[guild_id][id] = a0;
|
|
} else {
|
|
property = env0_29[guild_id];
|
|
if (property != null) {
|
|
delete property[id];
|
|
}
|
|
}
|
|
}
|
|
|
|
function handleOneGuildCreate({id, channels, threads}) { // fn#15974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:5454, offset: 0x00e44315, size: 460 bytes, params: 2, frame: 20
|
|
var r2;
|
|
var r3;
|
|
var r1;
|
|
var writes;
|
|
var length;
|
|
var value;
|
|
var deletes;
|
|
var basicChannelCacheStoreBinding;
|
|
var invalidate;
|
|
var _createForOfIteratorHelperLoose_15960Binding;
|
|
var value2;
|
|
var value3;
|
|
var done;
|
|
var value4;
|
|
var value5;
|
|
var value6;
|
|
var value7;
|
|
var setGuildChannelBinding;
|
|
var value8;
|
|
var value9;
|
|
var binding;
|
|
var fileOnly;
|
|
var items2;
|
|
var value10;
|
|
var value11;
|
|
var value12;
|
|
var value13;
|
|
var value14;
|
|
var value15;
|
|
var setThreadBinding;
|
|
var value16;
|
|
var value17;
|
|
const op = channels.op;
|
|
if (op === 'full_sync') {
|
|
binding = env0_22;
|
|
fileOnly = binding.fileOnly;
|
|
items2 = channels.items;
|
|
Reflect.apply(fileOnly, binding, ['ConnectionOpen contained full channels for ' + id + ' #:' + items2.length]);
|
|
deleteGuildChannels(id);
|
|
binding = env0_34;
|
|
binding.add(id);
|
|
BasicChannelCacheStore.restored(id);
|
|
_createForOfIteratorHelperLoose_15960Binding = _createForOfIteratorHelperLoose_15960;
|
|
items2 = channels.items;
|
|
value10 = _createForOfIteratorHelperLoose_15960Binding(items2);
|
|
value11 = value10();
|
|
done = value11.done;
|
|
if (!done) {
|
|
r2 = value11;
|
|
reducibleLoop11: while (true) {
|
|
setGuildChannelBinding = setGuildChannel;
|
|
value12 = r2.value;
|
|
setGuildChannelBinding(value12);
|
|
value13 = value10();
|
|
done = value13.done;
|
|
if (done) {
|
|
break reducibleLoop11;
|
|
}
|
|
r2 = value13;
|
|
continue reducibleLoop11;
|
|
}
|
|
}
|
|
} else {
|
|
reducibleJoin12: while (true) {
|
|
if (op !== 'update') {
|
|
break reducibleJoin12;
|
|
}
|
|
writes = channels.writes;
|
|
length = writes.length;
|
|
value = length > 0;
|
|
reducibleJoin4: while (true) {
|
|
if (value) {
|
|
r2 = value;
|
|
break reducibleJoin4;
|
|
}
|
|
deletes = channels.deletes;
|
|
length = deletes.length;
|
|
value = length > 0;
|
|
r2 = value;
|
|
break reducibleJoin4;
|
|
}
|
|
reducibleJoin6: while (true) {
|
|
if (r2) {
|
|
value = environment;
|
|
basicChannelCacheStoreBinding = BasicChannelCacheStore;
|
|
invalidate = basicChannelCacheStoreBinding.invalidate;
|
|
Reflect.apply(invalidate, basicChannelCacheStoreBinding, [id]);
|
|
break reducibleJoin6;
|
|
}
|
|
break reducibleJoin6;
|
|
}
|
|
value = environment;
|
|
_createForOfIteratorHelperLoose_15960Binding = _createForOfIteratorHelperLoose_15960;
|
|
deletes = channels.deletes;
|
|
value2 = _createForOfIteratorHelperLoose_15960Binding(deletes);
|
|
value3 = value2();
|
|
done = value3.done;
|
|
if (!done) {
|
|
r3 = value3;
|
|
reducibleLoop7: while (true) {
|
|
value4 = r3.value;
|
|
deleteChannel(env0_24[value4]);
|
|
value5 = value2();
|
|
done = value5.done;
|
|
if (done) {
|
|
break reducibleLoop7;
|
|
}
|
|
r3 = value5;
|
|
continue reducibleLoop7;
|
|
}
|
|
}
|
|
_createForOfIteratorHelperLoose_15960Binding = _createForOfIteratorHelperLoose_15960;
|
|
writes = channels.writes;
|
|
value6 = _createForOfIteratorHelperLoose_15960Binding(writes);
|
|
value7 = value6();
|
|
done = value7.done;
|
|
if (done) {
|
|
break reducibleJoin12;
|
|
}
|
|
r3 = value7;
|
|
reducibleLoop9: while (true) {
|
|
setGuildChannelBinding = setGuildChannel;
|
|
value8 = r3.value;
|
|
setGuildChannelBinding(value8);
|
|
value9 = value6();
|
|
done = value9.done;
|
|
if (done) {
|
|
break reducibleJoin12;
|
|
}
|
|
r3 = value9;
|
|
continue reducibleLoop9;
|
|
}
|
|
}
|
|
}
|
|
reducibleJoin15: while (true) {
|
|
if (threads == null) {
|
|
break reducibleJoin15;
|
|
}
|
|
value = environment;
|
|
value14 = _createForOfIteratorHelperLoose_15960(threads);
|
|
value15 = value14();
|
|
done = value15.done;
|
|
if (done) {
|
|
break reducibleJoin15;
|
|
}
|
|
r1 = value15;
|
|
reducibleLoop14: while (true) {
|
|
setThreadBinding = setThread;
|
|
value16 = r1.value;
|
|
setThreadBinding(value16);
|
|
value17 = value14();
|
|
done = value17.done;
|
|
if (done) {
|
|
break reducibleJoin15;
|
|
}
|
|
r1 = value17;
|
|
continue reducibleLoop14;
|
|
}
|
|
}
|
|
}
|
|
|
|
function THREAD_CREATE(a0) { // fn#15975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:6135, offset: 0x00e444e1, size: 147 bytes, params: 2, frame: 18
|
|
var bitrate;
|
|
var r2;
|
|
var _getChannelBinding;
|
|
var value2;
|
|
var merge;
|
|
var object;
|
|
const has = ALL_CHANNEL_TYPES.has;
|
|
let channel = a0.channel;
|
|
if (Reflect.apply(has, ALL_CHANNEL_TYPES, [channel.type])) {
|
|
_getChannelBinding = _getChannel;
|
|
channel = a0.channel;
|
|
value2 = _getChannelBinding(channel.id);
|
|
if (value2 == null) {
|
|
r2 = a0.channel;
|
|
} else {
|
|
merge = value2.merge;
|
|
object = {};
|
|
channel = a0.channel;
|
|
copyDataProperties(object, channel.toJS(), channel);
|
|
channel = a0.channel;
|
|
bitrate = channel.bitrate;
|
|
bitrate = bitrate ?? value2.bitrate;
|
|
object['bitrate'] = bitrate;
|
|
r2 = Reflect.apply(merge, value2, [object]);
|
|
}
|
|
setChannel(r2);
|
|
return undefined;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function LOAD_ARCHIVED_THREADS_SUCCESS({threads}) { // fn#15976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:6358, offset: 0x00e44574, size: 30 bytes, params: 2, frame: 11
|
|
threads.forEach(function(a0) {
|
|
if (ALL_CHANNEL_TYPES.has(a0.type)) {
|
|
setChannel(createChannelRecordFromServer(a0));
|
|
}
|
|
});
|
|
function _fun15977(a0) { // fn#15977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:6424, offset: 0x00e44592, size: 52 bytes, params: 2, frame: 13
|
|
if (ALL_CHANNEL_TYPES.has(a0.type)) {
|
|
setChannel(createChannelRecordFromServer(a0));
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function deleteChannel(a0) { // fn#15978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:6463, offset: 0x00e445c6, size: 331 bytes, params: 2, frame: 15
|
|
var r2;
|
|
var guild_id;
|
|
var id;
|
|
if (a0 != null) {
|
|
guild_id = a0.guild_id;
|
|
id = a0.id;
|
|
if (id in env0_26) {
|
|
delete env0_26[a0.id];
|
|
}
|
|
id = a0.id;
|
|
if (id in env0_24) {
|
|
delete env0_24[a0.id];
|
|
}
|
|
id = a0.id;
|
|
if (id in env0_28) {
|
|
delete env0_28[a0.id];
|
|
}
|
|
if (guild_id != null) {
|
|
r2 = env0_25[guild_id] != null && a0.id in env0_25[guild_id];
|
|
if (r2) {
|
|
delete env0_25[guild_id][a0.id];
|
|
}
|
|
r2 = env0_29[guild_id] != null && a0.id in env0_29[guild_id];
|
|
if (r2) {
|
|
delete env0_29[guild_id][a0.id];
|
|
}
|
|
}
|
|
guild_id = a0.guild_id;
|
|
if (guild_id == null) {
|
|
if (isPrivate(a0.type)) {
|
|
env0_31 += 1;
|
|
}
|
|
} else if (THREAD_CHANNEL_TYPES.has(a0.type)) {
|
|
if (isPrivate(a0.type)) {
|
|
env0_31 += 1;
|
|
}
|
|
} else {
|
|
env0_32[a0.guild_id] = (env0_32[a0.guild_id] ?? 0) + 1;
|
|
}
|
|
}
|
|
}
|
|
|
|
function CHANNEL_DELETE_15979({channel}) { // fn#15979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:6835, offset: 0x00e44711, size: 146 bytes, params: 2, frame: 14
|
|
var recipientId;
|
|
let r3 = env0_24[channel.id] ?? env0_26[channel.id];
|
|
r3 = r3 ?? env0_28[channel.id];
|
|
if (r3 == null) {
|
|
return false;
|
|
}
|
|
deleteChannel(r3);
|
|
if (!('basicPermissions' in r3)) {
|
|
if (r3.type === ChannelTypes.DM) {
|
|
recipientId = r3.getRecipientId();
|
|
if (env0_30[recipientId] === r3.id) {
|
|
delete env0_30[recipientId];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function LOAD_MESSAGES_AROUND_SUCCESS({messages}) { // fn#15980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:7101, offset: 0x00e447a3, size: 149 bytes, params: 2, frame: 18
|
|
var r2;
|
|
var r6;
|
|
var value4;
|
|
var thread;
|
|
var value5;
|
|
var id;
|
|
var value6;
|
|
var has;
|
|
var type;
|
|
var value7;
|
|
var setThreadBinding;
|
|
var createChannelRecordFromServerBinding;
|
|
var value8;
|
|
const value2 = _createForOfIteratorHelperLoose_15960(messages);
|
|
const value3 = value2();
|
|
let done = value3.done;
|
|
if (!done) {
|
|
r2 = value3;
|
|
while (true) {
|
|
value4 = r2.value;
|
|
thread = value4.thread;
|
|
value5 = thread != null;
|
|
if (value5) {
|
|
id = value4.thread.id;
|
|
value6 = !(id in env0_28);
|
|
r6 = value6;
|
|
} else {
|
|
r6 = value5;
|
|
}
|
|
if (!r6) {
|
|
continue;
|
|
}
|
|
has = ALL_CHANNEL_TYPES.has;
|
|
thread = value4.thread;
|
|
type = thread.type;
|
|
value7 = Reflect.apply(has, ALL_CHANNEL_TYPES, [type]);
|
|
r6 = value7;
|
|
if (!r6) {
|
|
continue;
|
|
}
|
|
setThreadBinding = setThread;
|
|
createChannelRecordFromServerBinding = createChannelRecordFromServer;
|
|
thread = value4.thread;
|
|
setThreadBinding(createChannelRecordFromServerBinding(thread));
|
|
value8 = value2();
|
|
done = value8.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
r2 = value8;
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
|
|
function MOD_VIEW_SEARCH_MESSAGES_SUCCESS({data}) { // fn#15981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:7303, offset: 0x00e44838, size: 29 bytes, params: 2, frame: 11
|
|
data.forEach(function({messages, threads, channels}) {
|
|
messages.forEach(_fun15983);
|
|
threads.forEach(addThreadIfMissing);
|
|
channels.forEach(_fun15985);
|
|
});
|
|
function _fun15982({messages, threads, channels}) { // fn#15982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:7361, offset: 0x00e44855, size: 74 bytes, params: 2, frame: 14
|
|
messages.forEach(function(a0) {
|
|
a0.forEach(_fun15984);
|
|
});
|
|
threads.forEach(addThreadIfMissing);
|
|
channels.forEach(_fun15985);
|
|
function _fun15983(a0) { // fn#15983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:7410, offset: 0x00e4489f, size: 24 bytes, params: 2, frame: 11
|
|
a0.forEach(function(a0) {
|
|
addThreadIfMissing(a0.thread);
|
|
});
|
|
function _fun15984({thread}) { // fn#15984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:7425, offset: 0x00e448b7, size: 25 bytes, params: 2, frame: 11
|
|
addThreadIfMissing(thread);
|
|
}
|
|
|
|
}
|
|
|
|
function _fun15985(a0) { // fn#15985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:7505, offset: 0x00e448d0, size: 102 bytes, params: 2, frame: 15
|
|
const channelRecordFromServer = createChannelRecordFromServer(a0);
|
|
const value3 = _getChannel(a0.id) != null;
|
|
if (channelRecordFromServer.isPrivate()) {
|
|
if (value3) {
|
|
if (env2_37[a0.id] != null) {
|
|
env2_37[channelRecordFromServer.id] = channelRecordFromServer;
|
|
} else if (!value3) {
|
|
setChannel(channelRecordFromServer);
|
|
}
|
|
} else {
|
|
env2_37[channelRecordFromServer.id] = channelRecordFromServer;
|
|
}
|
|
} else if (!value3) {
|
|
setChannel(channelRecordFromServer);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function addThreadIfMissing(a0) { // fn#15986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:7617, offset: 0x00e44936, size: 86 bytes, params: 2, frame: 13
|
|
if (a0 != null && !(a0.id in env0_28) && ALL_CHANNEL_TYPES.has(a0.type)) {
|
|
setThread(createChannelRecordFromServer(a0));
|
|
}
|
|
}
|
|
|
|
function guildChannelCount(a0) { // fn#15988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:10557, offset: 0x00e449da, size: 56 bytes, params: 2, frame: 13
|
|
const value2 = null;
|
|
return value2 == env0_25[a0] ? value2 : global.Object.keys(env0_25[a0]).length;
|
|
}
|
|
|
|
function _fun15989() { // fn#15989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:1629, offset: 0x00e44a12, size: 108 bytes, params: 1, frame: 16
|
|
return CreateClass(ChannelLoader, null, [{key: 'loadAllMissingChannels', value: value_15991},
|
|
{key: 'loadGuildFromChannelId', value: value_15993}, {key: 'loadGuildIds', value: value_15994}]);
|
|
function ChannelLoader() { // fn#15990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:1640, offset: 0x00dbc921, size: 27 bytes, params: 1, frame: 13
|
|
env1_8(this, ChannelLoader);
|
|
}
|
|
|
|
function value_15991() { // fn#15991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:1752, offset: 0x00e44a7e, size: 50 bytes, params: 1, frame: 12
|
|
var environment;
|
|
let value = environment.__proto__;
|
|
value = GuildStore.getGuildIds();
|
|
value = value.filter(_fun15992);
|
|
return this.loadGuildIds(value);
|
|
function _fun15992(a0) { // fn#15992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:1793, offset: 0x00e44ab0, size: 25 bytes, params: 2, frame: 11
|
|
const binding = env2_34;
|
|
return !binding.has(a0);
|
|
}
|
|
|
|
}
|
|
|
|
function value_15993(a0) { // fn#15993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:1874, offset: 0x00e44ac9, size: 68 bytes, params: 2, frame: 15
|
|
var r0;
|
|
var loadGuildIds;
|
|
var value3;
|
|
var _getBasicChannel2Binding;
|
|
var value4;
|
|
var value5;
|
|
let value = null;
|
|
if (value == a0) {
|
|
r0 = value;
|
|
} else {
|
|
loadGuildIds = ChannelLoader.loadGuildIds;
|
|
value3 = environment.__proto__;
|
|
_getBasicChannel2Binding = _getBasicChannel2;
|
|
value4 = undefined;
|
|
value5 = _getBasicChannel2Binding(a0);
|
|
value = Reflect.apply(loadGuildIds, ChannelLoader, [[value == value5 ? value4 : value5.guild_id]]);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_15994(a0) { // fn#15994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:2019, offset: 0x00e44b0d, size: 193 bytes, params: 2, frame: 16
|
|
var environment;
|
|
var moduleValue;
|
|
const filter = a0.filter;
|
|
const value = environment.__proto__;
|
|
const value2 = Reflect.apply(filter, a0, [(GlobalUtilsModule).isNotNullish]);
|
|
if (value2.length !== 0) {
|
|
if ((importDefault(1910) /* metro dependency 1910: DatabaseDaos */).database() == null) {
|
|
return null;
|
|
}
|
|
if (value2.some(_fun15995)) {
|
|
moduleValue = require(1929) /* metro dependency 1929: TryLoad */;
|
|
return moduleValue.tryLoadOrResetCacheGatewayAsync('loadChannels', env1_7(_fun15997));
|
|
}
|
|
}
|
|
return null;
|
|
function _fun15995(a0) { // fn#15995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:2159, offset: 0x00e44ab0, size: 25 bytes, params: 2, frame: 11
|
|
const binding = env2_34;
|
|
return !binding.has(a0);
|
|
}
|
|
|
|
function* _fun15997() { // fn#15997, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:2261, offset: 0x00e44bd7, size: 398 bytes, params: 1, frame: 25
|
|
var environment;
|
|
var r5;
|
|
var Promise;
|
|
var all;
|
|
var value7;
|
|
var value8;
|
|
var value9;
|
|
var binding2;
|
|
var closure;
|
|
var binding3;
|
|
var property;
|
|
var value10;
|
|
var dispatch;
|
|
var object;
|
|
var value11;
|
|
var fileOnly;
|
|
var error;
|
|
var error2;
|
|
var value12;
|
|
var done;
|
|
var value13;
|
|
var guildId;
|
|
var value14;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__;
|
|
const value3 = ChannelLoader.map(_fun15998);
|
|
let filter = value3.filter;
|
|
let binding = env3_0;
|
|
const value5 = Reflect.apply(filter, value3, [binding(env3_2[15]).isNotNullish]);
|
|
const value6 = value5.map(function(a0) {
|
|
return a0.promise;
|
|
});
|
|
try {
|
|
Promise = global.Promise;
|
|
} catch (error) {
|
|
binding = env3_22;
|
|
error2 = binding.error;
|
|
value = value5.map(function(a0) {
|
|
return a0.guildId;
|
|
});
|
|
Reflect.apply(error2, binding, ['Failed to load channels from disk for ' + value, error]);
|
|
value = env3_42(value5);
|
|
value12 = value();
|
|
done = value12.done;
|
|
if (!done) {
|
|
r5 = value12;
|
|
reducibleLoop45: while (true) {
|
|
value13 = r5.value;
|
|
binding = env3_35;
|
|
guildId = value13.guildId;
|
|
delete binding[guildId];
|
|
value14 = value();
|
|
done = value14.done;
|
|
if (done) {
|
|
break reducibleLoop45;
|
|
}
|
|
r5 = value14;
|
|
continue reducibleLoop45;
|
|
}
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
all = Promise.all;
|
|
} catch (error) {
|
|
binding = env3_22;
|
|
error2 = binding.error;
|
|
value = value5.map(function(a0) {
|
|
return a0.guildId;
|
|
});
|
|
Reflect.apply(error2, binding, ['Failed to load channels from disk for ' + value, error]);
|
|
value = env3_42(value5);
|
|
value12 = value();
|
|
done = value12.done;
|
|
if (!done) {
|
|
r5 = value12;
|
|
reducibleLoop45: while (true) {
|
|
value13 = r5.value;
|
|
binding = env3_35;
|
|
guildId = value13.guildId;
|
|
delete binding[guildId];
|
|
value14 = value();
|
|
done = value14.done;
|
|
if (done) {
|
|
break reducibleLoop45;
|
|
}
|
|
r5 = value14;
|
|
continue reducibleLoop45;
|
|
}
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
value7 = Reflect.apply(all, Promise, [value6]);
|
|
} catch (error) {
|
|
binding = env3_22;
|
|
error2 = binding.error;
|
|
value = value5.map(function(a0) {
|
|
return a0.guildId;
|
|
});
|
|
Reflect.apply(error2, binding, ['Failed to load channels from disk for ' + value, error]);
|
|
value = env3_42(value5);
|
|
value12 = value();
|
|
done = value12.done;
|
|
if (!done) {
|
|
r5 = value12;
|
|
reducibleLoop45: while (true) {
|
|
value13 = r5.value;
|
|
binding = env3_35;
|
|
guildId = value13.guildId;
|
|
delete binding[guildId];
|
|
value14 = value();
|
|
done = value14.done;
|
|
if (done) {
|
|
break reducibleLoop45;
|
|
}
|
|
r5 = value14;
|
|
continue reducibleLoop45;
|
|
}
|
|
}
|
|
throw error;
|
|
}
|
|
yield value7;
|
|
try {
|
|
value8 = undefined;
|
|
value9 = false;
|
|
} catch (error) {
|
|
binding = env3_22;
|
|
error2 = binding.error;
|
|
value = value5.map(function(a0) {
|
|
return a0.guildId;
|
|
});
|
|
Reflect.apply(error2, binding, ['Failed to load channels from disk for ' + value, error]);
|
|
value = env3_42(value5);
|
|
value12 = value();
|
|
done = value12.done;
|
|
if (!done) {
|
|
r5 = value12;
|
|
reducibleLoop45: while (true) {
|
|
value13 = r5.value;
|
|
binding = env3_35;
|
|
guildId = value13.guildId;
|
|
delete binding[guildId];
|
|
value14 = value();
|
|
done = value14.done;
|
|
if (done) {
|
|
break reducibleLoop45;
|
|
}
|
|
r5 = value14;
|
|
continue reducibleLoop45;
|
|
}
|
|
}
|
|
throw error;
|
|
}
|
|
if (value9) {
|
|
return value8;
|
|
}
|
|
try {
|
|
binding = env3_36;
|
|
} catch (error) {
|
|
binding = env3_22;
|
|
error2 = binding.error;
|
|
value = value5.map(function(a0) {
|
|
return a0.guildId;
|
|
});
|
|
Reflect.apply(error2, binding, ['Failed to load channels from disk for ' + value, error]);
|
|
value = env3_42(value5);
|
|
value12 = value();
|
|
done = value12.done;
|
|
if (!done) {
|
|
r5 = value12;
|
|
reducibleLoop45: while (true) {
|
|
value13 = r5.value;
|
|
binding = env3_35;
|
|
guildId = value13.guildId;
|
|
delete binding[guildId];
|
|
value14 = value();
|
|
done = value14.done;
|
|
if (done) {
|
|
break reducibleLoop45;
|
|
}
|
|
r5 = value14;
|
|
continue reducibleLoop45;
|
|
}
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
binding2 = env1_2;
|
|
} catch (error) {
|
|
binding = env3_22;
|
|
error2 = binding.error;
|
|
value = value5.map(function(a0) {
|
|
return a0.guildId;
|
|
});
|
|
Reflect.apply(error2, binding, ['Failed to load channels from disk for ' + value, error]);
|
|
value = env3_42(value5);
|
|
value12 = value();
|
|
done = value12.done;
|
|
if (!done) {
|
|
r5 = value12;
|
|
reducibleLoop45: while (true) {
|
|
value13 = r5.value;
|
|
binding = env3_35;
|
|
guildId = value13.guildId;
|
|
delete binding[guildId];
|
|
value14 = value();
|
|
done = value14.done;
|
|
if (done) {
|
|
break reducibleLoop45;
|
|
}
|
|
r5 = value14;
|
|
continue reducibleLoop45;
|
|
}
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
value = binding !== binding2;
|
|
} catch (error) {
|
|
binding = env3_22;
|
|
error2 = binding.error;
|
|
value = value5.map(function(a0) {
|
|
return a0.guildId;
|
|
});
|
|
Reflect.apply(error2, binding, ['Failed to load channels from disk for ' + value, error]);
|
|
value = env3_42(value5);
|
|
value12 = value();
|
|
done = value12.done;
|
|
if (!done) {
|
|
r5 = value12;
|
|
reducibleLoop45: while (true) {
|
|
value13 = r5.value;
|
|
binding = env3_35;
|
|
guildId = value13.guildId;
|
|
delete binding[guildId];
|
|
value14 = value();
|
|
done = value14.done;
|
|
if (done) {
|
|
break reducibleLoop45;
|
|
}
|
|
r5 = value14;
|
|
continue reducibleLoop45;
|
|
}
|
|
}
|
|
throw error;
|
|
}
|
|
if (value) {
|
|
try {
|
|
binding = env3_22;
|
|
} catch (error) {
|
|
binding = env3_22;
|
|
error2 = binding.error;
|
|
value = value5.map(function(a0) {
|
|
return a0.guildId;
|
|
});
|
|
Reflect.apply(error2, binding, ['Failed to load channels from disk for ' + value, error]);
|
|
value = env3_42(value5);
|
|
value12 = value();
|
|
done = value12.done;
|
|
if (!done) {
|
|
r5 = value12;
|
|
reducibleLoop45: while (true) {
|
|
value13 = r5.value;
|
|
binding = env3_35;
|
|
guildId = value13.guildId;
|
|
delete binding[guildId];
|
|
value14 = value();
|
|
done = value14.done;
|
|
if (done) {
|
|
break reducibleLoop45;
|
|
}
|
|
r5 = value14;
|
|
continue reducibleLoop45;
|
|
}
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
fileOnly = binding.fileOnly;
|
|
} catch (error) {
|
|
binding = env3_22;
|
|
error2 = binding.error;
|
|
value = value5.map(_fun16003);
|
|
Reflect.apply(error2, binding, ['Failed to load channels from disk for ' + value, error]);
|
|
value = env3_42(value5);
|
|
value12 = value();
|
|
done = value12.done;
|
|
if (!done) {
|
|
r5 = value12;
|
|
reducibleLoop45: while (true) {
|
|
value13 = r5.value;
|
|
binding = env3_35;
|
|
guildId = value13.guildId;
|
|
delete binding[guildId];
|
|
value14 = value();
|
|
done = value14.done;
|
|
if (done) {
|
|
break reducibleLoop45;
|
|
}
|
|
r5 = value14;
|
|
continue reducibleLoop45;
|
|
}
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
map = value5.map;
|
|
} catch (error) {
|
|
binding = env3_22;
|
|
error2 = binding.error;
|
|
value = value5.map(_fun16003);
|
|
Reflect.apply(error2, binding, ['Failed to load channels from disk for ' + value, error]);
|
|
value = env3_42(value5);
|
|
value12 = value();
|
|
done = value12.done;
|
|
if (!done) {
|
|
r5 = value12;
|
|
reducibleLoop45: while (true) {
|
|
value13 = r5.value;
|
|
binding = env3_35;
|
|
guildId = value13.guildId;
|
|
delete binding[guildId];
|
|
value14 = value();
|
|
done = value14.done;
|
|
if (done) {
|
|
break reducibleLoop45;
|
|
}
|
|
r5 = value14;
|
|
continue reducibleLoop45;
|
|
}
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
closure = _fun16001;
|
|
} catch (error) {
|
|
binding = env3_22;
|
|
error2 = binding.error;
|
|
value = value5.map(_fun16003);
|
|
Reflect.apply(error2, binding, ['Failed to load channels from disk for ' + value, error]);
|
|
value = env3_42(value5);
|
|
value12 = value();
|
|
done = value12.done;
|
|
if (!done) {
|
|
r5 = value12;
|
|
reducibleLoop45: while (true) {
|
|
value13 = r5.value;
|
|
binding = env3_35;
|
|
guildId = value13.guildId;
|
|
delete binding[guildId];
|
|
value14 = value();
|
|
done = value14.done;
|
|
if (done) {
|
|
break reducibleLoop45;
|
|
}
|
|
r5 = value14;
|
|
continue reducibleLoop45;
|
|
}
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
value = Reflect.apply(map, value5, [closure]);
|
|
} catch (error) {
|
|
binding = env3_22;
|
|
error2 = binding.error;
|
|
value = value5.map(_fun16003);
|
|
Reflect.apply(error2, binding, ['Failed to load channels from disk for ' + value, error]);
|
|
value = env3_42(value5);
|
|
value12 = value();
|
|
done = value12.done;
|
|
if (!done) {
|
|
r5 = value12;
|
|
reducibleLoop45: while (true) {
|
|
value13 = r5.value;
|
|
binding = env3_35;
|
|
guildId = value13.guildId;
|
|
delete binding[guildId];
|
|
value14 = value();
|
|
done = value14.done;
|
|
if (done) {
|
|
break reducibleLoop45;
|
|
}
|
|
r5 = value14;
|
|
continue reducibleLoop45;
|
|
}
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
value = 'lastResetTime has changed, skipping loads for ' + value;
|
|
} catch (error) {
|
|
binding = env3_22;
|
|
error2 = binding.error;
|
|
value = value5.map(_fun16003);
|
|
Reflect.apply(error2, binding, ['Failed to load channels from disk for ' + value, error]);
|
|
value = env3_42(value5);
|
|
value12 = value();
|
|
done = value12.done;
|
|
if (!done) {
|
|
r5 = value12;
|
|
reducibleLoop45: while (true) {
|
|
value13 = r5.value;
|
|
binding = env3_35;
|
|
guildId = value13.guildId;
|
|
delete binding[guildId];
|
|
value14 = value();
|
|
done = value14.done;
|
|
if (done) {
|
|
break reducibleLoop45;
|
|
}
|
|
r5 = value14;
|
|
continue reducibleLoop45;
|
|
}
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
Reflect.apply(fileOnly, binding, [value]);
|
|
} catch (error) {
|
|
binding = env3_22;
|
|
error2 = binding.error;
|
|
value = value5.map(_fun16003);
|
|
Reflect.apply(error2, binding, ['Failed to load channels from disk for ' + value, error]);
|
|
value = env3_42(value5);
|
|
value12 = value();
|
|
done = value12.done;
|
|
if (!done) {
|
|
r5 = value12;
|
|
reducibleLoop45: while (true) {
|
|
value13 = r5.value;
|
|
binding = env3_35;
|
|
guildId = value13.guildId;
|
|
delete binding[guildId];
|
|
value14 = value();
|
|
done = value14.done;
|
|
if (done) {
|
|
break reducibleLoop45;
|
|
}
|
|
r5 = value14;
|
|
continue reducibleLoop45;
|
|
}
|
|
}
|
|
throw error;
|
|
}
|
|
} else {
|
|
try {
|
|
filter = value8.filter;
|
|
} catch (error) {
|
|
binding = env3_22;
|
|
error2 = binding.error;
|
|
value = value5.map(function(a0) {
|
|
return a0.guildId;
|
|
});
|
|
Reflect.apply(error2, binding, ['Failed to load channels from disk for ' + value, error]);
|
|
value = env3_42(value5);
|
|
value12 = value();
|
|
done = value12.done;
|
|
if (!done) {
|
|
r5 = value12;
|
|
reducibleLoop45: while (true) {
|
|
value13 = r5.value;
|
|
binding = env3_35;
|
|
guildId = value13.guildId;
|
|
delete binding[guildId];
|
|
value14 = value();
|
|
done = value14.done;
|
|
if (done) {
|
|
break reducibleLoop45;
|
|
}
|
|
r5 = value14;
|
|
continue reducibleLoop45;
|
|
}
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
closure = _fun16002;
|
|
} catch (error) {
|
|
binding = env3_22;
|
|
error2 = binding.error;
|
|
value = value5.map(function(a0) {
|
|
return a0.guildId;
|
|
});
|
|
Reflect.apply(error2, binding, ['Failed to load channels from disk for ' + value, error]);
|
|
value = env3_42(value5);
|
|
value12 = value();
|
|
done = value12.done;
|
|
if (!done) {
|
|
r5 = value12;
|
|
reducibleLoop45: while (true) {
|
|
value13 = r5.value;
|
|
binding = env3_35;
|
|
guildId = value13.guildId;
|
|
delete binding[guildId];
|
|
value14 = value();
|
|
done = value14.done;
|
|
if (done) {
|
|
break reducibleLoop45;
|
|
}
|
|
r5 = value14;
|
|
continue reducibleLoop45;
|
|
}
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
value = Reflect.apply(filter, value8, [closure]);
|
|
} catch (error) {
|
|
binding = env3_22;
|
|
error2 = binding.error;
|
|
value = value5.map(function(a0) {
|
|
return a0.guildId;
|
|
});
|
|
Reflect.apply(error2, binding, ['Failed to load channels from disk for ' + value, error]);
|
|
value = env3_42(value5);
|
|
value12 = value();
|
|
done = value12.done;
|
|
if (!done) {
|
|
r5 = value12;
|
|
reducibleLoop45: while (true) {
|
|
value13 = r5.value;
|
|
binding = env3_35;
|
|
guildId = value13.guildId;
|
|
delete binding[guildId];
|
|
value14 = value();
|
|
done = value14.done;
|
|
if (done) {
|
|
break reducibleLoop45;
|
|
}
|
|
r5 = value14;
|
|
continue reducibleLoop45;
|
|
}
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
binding = env3_1;
|
|
} catch (error) {
|
|
binding = env3_22;
|
|
error2 = binding.error;
|
|
value = value5.map(function(a0) {
|
|
return a0.guildId;
|
|
});
|
|
Reflect.apply(error2, binding, ['Failed to load channels from disk for ' + value, error]);
|
|
value = env3_42(value5);
|
|
value12 = value();
|
|
done = value12.done;
|
|
if (!done) {
|
|
r5 = value12;
|
|
reducibleLoop45: while (true) {
|
|
value13 = r5.value;
|
|
binding = env3_35;
|
|
guildId = value13.guildId;
|
|
delete binding[guildId];
|
|
value14 = value();
|
|
done = value14.done;
|
|
if (done) {
|
|
break reducibleLoop45;
|
|
}
|
|
r5 = value14;
|
|
continue reducibleLoop45;
|
|
}
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
binding3 = env3_2;
|
|
} catch (error) {
|
|
binding = env3_22;
|
|
error2 = binding.error;
|
|
value = value5.map(function(a0) {
|
|
return a0.guildId;
|
|
});
|
|
Reflect.apply(error2, binding, ['Failed to load channels from disk for ' + value, error]);
|
|
value = env3_42(value5);
|
|
value12 = value();
|
|
done = value12.done;
|
|
if (!done) {
|
|
r5 = value12;
|
|
reducibleLoop45: while (true) {
|
|
value13 = r5.value;
|
|
binding = env3_35;
|
|
guildId = value13.guildId;
|
|
delete binding[guildId];
|
|
value14 = value();
|
|
done = value14.done;
|
|
if (done) {
|
|
break reducibleLoop45;
|
|
}
|
|
r5 = value14;
|
|
continue reducibleLoop45;
|
|
}
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
property = binding3[19];
|
|
} catch (error) {
|
|
binding = env3_22;
|
|
error2 = binding.error;
|
|
value = value5.map(function(a0) {
|
|
return a0.guildId;
|
|
});
|
|
Reflect.apply(error2, binding, ['Failed to load channels from disk for ' + value, error]);
|
|
value = env3_42(value5);
|
|
value12 = value();
|
|
done = value12.done;
|
|
if (!done) {
|
|
r5 = value12;
|
|
reducibleLoop45: while (true) {
|
|
value13 = r5.value;
|
|
binding = env3_35;
|
|
guildId = value13.guildId;
|
|
delete binding[guildId];
|
|
value14 = value();
|
|
done = value14.done;
|
|
if (done) {
|
|
break reducibleLoop45;
|
|
}
|
|
r5 = value14;
|
|
continue reducibleLoop45;
|
|
}
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
value10 = binding(property);
|
|
} catch (error) {
|
|
binding = env3_22;
|
|
error2 = binding.error;
|
|
value = value5.map(function(a0) {
|
|
return a0.guildId;
|
|
});
|
|
Reflect.apply(error2, binding, ['Failed to load channels from disk for ' + value, error]);
|
|
value = env3_42(value5);
|
|
value12 = value();
|
|
done = value12.done;
|
|
if (!done) {
|
|
r5 = value12;
|
|
reducibleLoop45: while (true) {
|
|
value13 = r5.value;
|
|
binding = env3_35;
|
|
guildId = value13.guildId;
|
|
delete binding[guildId];
|
|
value14 = value();
|
|
done = value14.done;
|
|
if (done) {
|
|
break reducibleLoop45;
|
|
}
|
|
r5 = value14;
|
|
continue reducibleLoop45;
|
|
}
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
dispatch = value10.dispatch;
|
|
} catch (error) {
|
|
binding = env3_22;
|
|
error2 = binding.error;
|
|
value = value5.map(function(a0) {
|
|
return a0.guildId;
|
|
});
|
|
Reflect.apply(error2, binding, ['Failed to load channels from disk for ' + value, error]);
|
|
value = env3_42(value5);
|
|
value12 = value();
|
|
done = value12.done;
|
|
if (!done) {
|
|
r5 = value12;
|
|
reducibleLoop45: while (true) {
|
|
value13 = r5.value;
|
|
binding = env3_35;
|
|
guildId = value13.guildId;
|
|
delete binding[guildId];
|
|
value14 = value();
|
|
done = value14.done;
|
|
if (done) {
|
|
break reducibleLoop45;
|
|
}
|
|
r5 = value14;
|
|
continue reducibleLoop45;
|
|
}
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
object = {};
|
|
} catch (error) {
|
|
binding = env3_22;
|
|
error2 = binding.error;
|
|
value = value5.map(function(a0) {
|
|
return a0.guildId;
|
|
});
|
|
Reflect.apply(error2, binding, ['Failed to load channels from disk for ' + value, error]);
|
|
value = env3_42(value5);
|
|
value12 = value();
|
|
done = value12.done;
|
|
if (!done) {
|
|
r5 = value12;
|
|
reducibleLoop45: while (true) {
|
|
value13 = r5.value;
|
|
binding = env3_35;
|
|
guildId = value13.guildId;
|
|
delete binding[guildId];
|
|
value14 = value();
|
|
done = value14.done;
|
|
if (done) {
|
|
break reducibleLoop45;
|
|
}
|
|
r5 = value14;
|
|
continue reducibleLoop45;
|
|
}
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
object.type = 'LOAD_CHANNELS';
|
|
} catch (error) {
|
|
binding = env3_22;
|
|
error2 = binding.error;
|
|
value = value5.map(function(a0) {
|
|
return a0.guildId;
|
|
});
|
|
Reflect.apply(error2, binding, ['Failed to load channels from disk for ' + value, error]);
|
|
value = env3_42(value5);
|
|
value12 = value();
|
|
done = value12.done;
|
|
if (!done) {
|
|
r5 = value12;
|
|
reducibleLoop45: while (true) {
|
|
value13 = r5.value;
|
|
binding = env3_35;
|
|
guildId = value13.guildId;
|
|
delete binding[guildId];
|
|
value14 = value();
|
|
done = value14.done;
|
|
if (done) {
|
|
break reducibleLoop45;
|
|
}
|
|
r5 = value14;
|
|
continue reducibleLoop45;
|
|
}
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
object.channels = value;
|
|
} catch (error) {
|
|
binding = env3_22;
|
|
error2 = binding.error;
|
|
value = value5.map(function(a0) {
|
|
return a0.guildId;
|
|
});
|
|
Reflect.apply(error2, binding, ['Failed to load channels from disk for ' + value, error]);
|
|
value = env3_42(value5);
|
|
value12 = value();
|
|
done = value12.done;
|
|
if (!done) {
|
|
r5 = value12;
|
|
reducibleLoop45: while (true) {
|
|
value13 = r5.value;
|
|
binding = env3_35;
|
|
guildId = value13.guildId;
|
|
delete binding[guildId];
|
|
value14 = value();
|
|
done = value14.done;
|
|
if (done) {
|
|
break reducibleLoop45;
|
|
}
|
|
r5 = value14;
|
|
continue reducibleLoop45;
|
|
}
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
value = Reflect.apply(dispatch, value10, [object]);
|
|
} catch (error) {
|
|
binding = env3_22;
|
|
error2 = binding.error;
|
|
value = value5.map(function(a0) {
|
|
return a0.guildId;
|
|
});
|
|
Reflect.apply(error2, binding, ['Failed to load channels from disk for ' + value, error]);
|
|
value = env3_42(value5);
|
|
value12 = value();
|
|
done = value12.done;
|
|
if (!done) {
|
|
r5 = value12;
|
|
reducibleLoop45: while (true) {
|
|
value13 = r5.value;
|
|
binding = env3_35;
|
|
guildId = value13.guildId;
|
|
delete binding[guildId];
|
|
value14 = value();
|
|
done = value14.done;
|
|
if (done) {
|
|
break reducibleLoop45;
|
|
}
|
|
r5 = value14;
|
|
continue reducibleLoop45;
|
|
}
|
|
}
|
|
throw error;
|
|
}
|
|
yield value;
|
|
try {
|
|
value = undefined;
|
|
value11 = false;
|
|
} catch (error) {
|
|
binding = env3_22;
|
|
error2 = binding.error;
|
|
value = value5.map(function(a0) {
|
|
return a0.guildId;
|
|
});
|
|
Reflect.apply(error2, binding, ['Failed to load channels from disk for ' + value, error]);
|
|
value = env3_42(value5);
|
|
value12 = value();
|
|
done = value12.done;
|
|
if (!done) {
|
|
r5 = value12;
|
|
reducibleLoop45: while (true) {
|
|
value13 = r5.value;
|
|
binding = env3_35;
|
|
guildId = value13.guildId;
|
|
delete binding[guildId];
|
|
value14 = value();
|
|
done = value14.done;
|
|
if (done) {
|
|
break reducibleLoop45;
|
|
}
|
|
r5 = value14;
|
|
continue reducibleLoop45;
|
|
}
|
|
}
|
|
throw error;
|
|
}
|
|
if (value11) {
|
|
return value;
|
|
}
|
|
}
|
|
return null;
|
|
function _fun15998(a0) { // fn#15998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:2286, offset: 0x00e44d65, size: 173 bytes, params: 2, frame: 16
|
|
const env0_0 = a0;
|
|
const binding = env4_34;
|
|
if (binding.has(a0)) {
|
|
return null;
|
|
}
|
|
if (env4_35[a0] != null) {
|
|
env4_22.fileOnly('Skipping loading ' + a0 + ' because a load is pending');
|
|
return null;
|
|
}
|
|
const value6 = env4_1(env4_2[18]).getAsync(env2_1, a0).then(_fun15999);
|
|
env4_35[a0] = value6;
|
|
return {guildId: a0, promise: value6};
|
|
function _fun15999(a0) { // fn#15999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:2437, offset: 0x00e44e12, size: 78 bytes, params: 2, frame: 18
|
|
const binding = env5_22;
|
|
const fileOnly = binding.fileOnly;
|
|
const binding2 = env0_0;
|
|
Reflect.apply(fileOnly, binding, ['Lazy loaded channels for ' + binding2 + ' #:' + a0.length]);
|
|
return {guildId: binding2, channels: a0};
|
|
}
|
|
|
|
}
|
|
|
|
function _fun16002({guildId}) { // fn#16002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:2770, offset: 0x00e44e75, size: 30 bytes, params: 2, frame: 11
|
|
const binding = env4_34;
|
|
return !binding.has(guildId);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function _fun16004(a0) { // fn#16004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:7832, offset: 0x00e44e93, size: 538 bytes, params: 2, frame: 16
|
|
const ChannelStore2 = ChannelStore;
|
|
Inherits(ChannelStore2, a0);
|
|
return CreateClass(ChannelStore2, [{key: 'initialize', value: function() {
|
|
this.waitFor(AuthenticationStore, BasicChannelCacheStore, FavoriteStore, GuildStore, UserStore);
|
|
this.syncWith([FavoriteStore], handleFavoritesUpdate);
|
|
}}, {key: 'hasChannel', value: value_16007}, {key: 'getBasicChannel', value: value_16008}, {key: 'getChannel',
|
|
value: value_16009}, {key: 'loadAllGuildAndPrivateChannelsFromDisk', value: value_16010}, {key: 'getChannelIds',
|
|
value: value_16011}, {key: 'getMutablePrivateChannels', value: value_16012},
|
|
{key: 'getMutableBasicGuildChannelsForGuild', value: value_16013}, {key: 'getMutableGuildChannelsForGuild',
|
|
value: value_16014}, {key: 'getSortedLinkedChannelsForGuild', value: value_16015},
|
|
{key: 'getSortedPrivateChannels', value: value_16017}, {key: 'getDMFromUserId', value: value_16019},
|
|
{key: 'getDMChannelFromUserId', value: value_16020}, {key: 'getMutableDMsByUserIds', value: value_16021},
|
|
{key: 'getDMUserIds', value: value_16022}, {key: 'getPrivateChannelsVersion', value: value_16023},
|
|
{key: 'getGuildChannelsVersion', value: value_16024}, {key: 'getAllThreadsForParent', value: value_16025},
|
|
{key: 'getAllThreadsForGuild', value: value_16027}, {key: 'getInitialOverlayState', value: value_16029},
|
|
{key: 'getDebugInfo', value: value_16030}]);
|
|
function ChannelStore() { // fn#16005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:7844, offset: 0x00e450ad, size: 113 bytes, params: 1, frame: 20
|
|
const value = environment.__proto__;
|
|
env1_8(this, ChannelStore);
|
|
const value3 = env1_4(ChannelStore);
|
|
return env1_3(this, _isNativeReflectConstruct_15957() ? global.Reflect.construct(value3, arguments,
|
|
env1_4(this).constructor) : value3.apply(this, arguments));
|
|
}
|
|
|
|
function value_16007(a0) { // fn#16007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:8224, offset: 0x00e45165, size: 25 bytes, params: 2, frame: 11
|
|
const value = environment.__proto__;
|
|
return _getBasicChannel2(a0) != null;
|
|
}
|
|
|
|
function value_16008(a0) { // fn#16008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:8301, offset: 0x00e4517e, size: 29 bytes, params: 2, frame: 11
|
|
var value;
|
|
if (a0 != null) {
|
|
value = environment.__proto__;
|
|
return _getBasicChannel2(a0);
|
|
}
|
|
}
|
|
|
|
function value_16009(a0) { // fn#16009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:8378, offset: 0x00e4519b, size: 29 bytes, params: 2, frame: 11
|
|
var value;
|
|
if (a0 != null) {
|
|
value = environment.__proto__;
|
|
return _getChannel(a0);
|
|
}
|
|
}
|
|
|
|
function value_16010() { // fn#16010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:8477, offset: 0x00e451b8, size: 111 bytes, params: 1, frame: 18
|
|
var r2;
|
|
var ensureGuildLoadedBinding;
|
|
var value5;
|
|
var Full;
|
|
var value6;
|
|
const value3 = _createForOfIteratorHelperLoose_15960(GuildStore.getGuildIds());
|
|
const value4 = value3();
|
|
let done = value4.done;
|
|
if (!done) {
|
|
for (r2 = value4; true; r2 = value6) {
|
|
ensureGuildLoadedBinding = ensureGuildLoaded;
|
|
value5 = r2.value;
|
|
Full = env1_40.Full;
|
|
ensureGuildLoadedBinding(value5, Full, 'loadAllGuildAndPrivateChannelsFromDisk');
|
|
value6 = value3();
|
|
done = value6.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
const object = {};
|
|
copyDataProperties(object, env1_24, undefined);
|
|
copyDataProperties(object, env1_26, undefined);
|
|
return object;
|
|
}
|
|
|
|
function value_16011(a0) { // fn#16011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:8687, offset: 0x00e45227, size: 142 bytes, params: 2, frame: 18
|
|
var r0;
|
|
var defaultImport;
|
|
var keys;
|
|
const value = environment.__proto__;
|
|
const ensureGuildLoadedBinding = ensureGuildLoaded;
|
|
const Basic = env1_40.Basic;
|
|
ensureGuildLoadedBinding(a0, Basic, 'getChannelIds');
|
|
if (a0 == null) {
|
|
r0 = (importDefault(21) /* metro dependency 21: SnowflakeUtils */).keys(env1_26);
|
|
} else {
|
|
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
keys = defaultImport.keys;
|
|
r0 = BasicChannelCacheStore.getGuildBasicChannels(a0) ?? env1_25[a0];
|
|
r0 = r0 ?? env1_23;
|
|
r0 = Reflect.apply(keys, defaultImport, [r0]);
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_16012() { // fn#16012, offset: 0x00df3adf, size: 9 bytes, params: 1, frame: 1
|
|
return env1_26;
|
|
}
|
|
|
|
function value_16013(a0) { // fn#16013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:8970, offset: 0x00e452b5, size: 72 bytes, params: 2, frame: 16
|
|
const ensureGuildLoadedBinding = ensureGuildLoaded;
|
|
const Basic = env1_40.Basic;
|
|
ensureGuildLoadedBinding(a0, Basic, 'getMutableBasicGuildChannelsForGuild');
|
|
let r0 = BasicChannelCacheStore.getGuildBasicChannels(a0) ?? env1_25[a0];
|
|
r0 = r0 ?? env1_23;
|
|
return r0;
|
|
}
|
|
|
|
function value_16014(a0) { // fn#16014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:9170, offset: 0x00e452fd, size: 53 bytes, params: 2, frame: 16
|
|
const ensureGuildLoadedBinding = ensureGuildLoaded;
|
|
const Full = env1_40.Full;
|
|
ensureGuildLoadedBinding(a0, Full, 'getMutableGuildChannelsForGuild');
|
|
return env1_25[a0] ?? env1_23;
|
|
}
|
|
|
|
function value_16015(a0) { // fn#16015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:9323, offset: 0x00e45332, size: 76 bytes, params: 2, frame: 13
|
|
var environment;
|
|
const value = environment.__proto__;
|
|
const defaultImport = Module00022;
|
|
return defaultImport.values(env1_29[a0] ?? env1_23).sort(_fun16016);
|
|
function _fun16016({id}, {id}) { // fn#16016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:9390, offset: 0x00e4537e, size: 55 bytes, params: 3, frame: 13
|
|
const value = environment.__proto__.__proto__;
|
|
return (SnowflakeUtils).compare(id, id);
|
|
}
|
|
|
|
}
|
|
|
|
function value_16017() { // fn#16017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:9467, offset: 0x00e453b5, size: 82 bytes, params: 1, frame: 12
|
|
var environment;
|
|
let value = environment.__proto__;
|
|
value = (importDefault(22) /* metro dependency 22 */)(env1_26);
|
|
value = value.values();
|
|
value = value.sort(_fun16018);
|
|
value = value.reverse();
|
|
return value.value();
|
|
function _fun16018({lastMessageId}, {lastMessageId}) { // fn#16018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:9512, offset: 0x00e45407, size: 57 bytes, params: 3, frame: 13
|
|
const value = environment.__proto__.__proto__;
|
|
return (SnowflakeUtils).compare(lastMessageId, lastMessageId);
|
|
}
|
|
|
|
}
|
|
|
|
function value_16019(a0) { // fn#16019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:9620, offset: 0x00e45440, size: 26 bytes, params: 2, frame: 2
|
|
var value;
|
|
if (a0 != null) {
|
|
value = environment.__proto__;
|
|
return env1_30[a0];
|
|
}
|
|
}
|
|
|
|
function value_16020(a0) { // fn#16020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:9693, offset: 0x00e4545a, size: 39 bytes, params: 2, frame: 12
|
|
var getChannel;
|
|
var value;
|
|
if (a0 != null) {
|
|
getChannel = this.getChannel;
|
|
value = environment.__proto__;
|
|
return Reflect.apply(getChannel, this, [env1_30[a0]]);
|
|
}
|
|
}
|
|
|
|
function value_16021() { // fn#16021, offset: 0x00e45481, size: 9 bytes, params: 1, frame: 1
|
|
return env1_30;
|
|
}
|
|
|
|
function value_16022() { // fn#16022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:9831, offset: 0x00e4548a, size: 41 bytes, params: 1, frame: 12
|
|
return (SnowflakeUtils).keys(env1_30);
|
|
}
|
|
|
|
function value_16023() { // fn#16023, offset: 0x00df3abb, size: 9 bytes, params: 1, frame: 1
|
|
return env1_31;
|
|
}
|
|
|
|
function value_16024(a0) { // fn#16024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:9966, offset: 0x00e454b3, size: 30 bytes, params: 2, frame: 3
|
|
const value = environment.__proto__;
|
|
return env1_32[a0] ?? 0;
|
|
}
|
|
|
|
function value_16025(a0) { // fn#16025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:10048, offset: 0x00e454d1, size: 65 bytes, params: 2, frame: 13
|
|
var environment;
|
|
const env0_0 = a0;
|
|
const value = environment.__proto__;
|
|
return (Module00022).values(env1_28).filter(_fun16026);
|
|
function _fun16026({parent_id}) { // fn#16026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:10094, offset: 0x00e45512, size: 22 bytes, params: 2, frame: 2
|
|
return parent_id === env0_0;
|
|
}
|
|
|
|
}
|
|
|
|
function value_16027(a0) { // fn#16027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:10152, offset: 0x00e45528, size: 65 bytes, params: 2, frame: 13
|
|
var environment;
|
|
const env0_0 = a0;
|
|
const value = environment.__proto__;
|
|
return (Module00022).values(env1_28).filter(_fun16028);
|
|
function _fun16028({guild_id}) { // fn#16028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:10198, offset: 0x00e45569, size: 21 bytes, params: 2, frame: 2
|
|
return guild_id === env0_0;
|
|
}
|
|
|
|
}
|
|
|
|
function value_16029() { // fn#16029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:10256, offset: 0x00e4557e, size: 40 bytes, params: 1, frame: 12
|
|
const object = {};
|
|
copyDataProperties(object, env1_28, copyDataProperties(object, env1_26, copyDataProperties(object, env1_24,
|
|
undefined)));
|
|
return object;
|
|
}
|
|
|
|
function value_16030() { // fn#16030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:10318, offset: 0x00e455a6, size: 198 bytes, params: 1, frame: 18
|
|
var environment;
|
|
const object = {};
|
|
const Array = global.Array;
|
|
const from = Array.from;
|
|
let value = environment.__proto__;
|
|
const value2 = Reflect.apply(from, Array, [env1_34]);
|
|
object.loadedGuildIds = value2.sort((importDefault(21) /* metro dependency 21: SnowflakeUtils */).compare);
|
|
let Object = global.Object;
|
|
const value3 = Object.keys(env1_35);
|
|
object.pendingGuildLoads = value3.sort((importDefault(21) /* metro dependency 21: SnowflakeUtils */).compare);
|
|
Object = global.Object;
|
|
value = Reflect.apply(Object.keys(env1_25).sort, value,
|
|
[(importDefault(21) /* metro dependency 21: SnowflakeUtils */).compare]);
|
|
object.guildSizes = value.map(_fun16031);
|
|
return object;
|
|
function _fun16031(a0) { // fn#16031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:10498, offset: 0x00e4566c, size: 49 bytes, params: 2, frame: 15
|
|
const value = environment.__proto__.__proto__;
|
|
return '' + a0 + ': ' + guildChannelCount(a0);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function BACKGROUND_SYNC({guilds}) { // fn#16032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:10702, offset: 0x00e4569d, size: 65 bytes, params: 2, frame: 12
|
|
env0_24 = {};
|
|
env0_25 = {};
|
|
env0_32 = {};
|
|
env0_29 = {};
|
|
guilds.forEach(_fun16033);
|
|
function _fun16033(a0) { // fn#16033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:10783, offset: 0x00e456de, size: 552 bytes, params: 2, frame: 21
|
|
var environment;
|
|
var r5;
|
|
var value;
|
|
var binding;
|
|
var fileOnly;
|
|
var id;
|
|
var channels;
|
|
var deleteGuildChannelsBinding;
|
|
var add;
|
|
var basicChannelCacheStoreBinding;
|
|
var restored;
|
|
var forEach;
|
|
var defaultImport;
|
|
var partial_updates;
|
|
var defaultImport2;
|
|
const env0_0 = a0;
|
|
if (a0.data_mode === 'unavailable') {
|
|
value = environment.__proto__;
|
|
binding = env1_22;
|
|
fileOnly = binding.fileOnly;
|
|
id = a0.id;
|
|
Reflect.apply(fileOnly, binding,
|
|
['Restoring guild channels b/c unavailable in bg sync, for ' + id + ' #:' + guildChannelCount(a0.id)]);
|
|
defaultImport2 = importDefault(22) /* metro dependency 22 */;
|
|
forEach = defaultImport2.forEach;
|
|
binding = env0_0;
|
|
id = a0.id;
|
|
Reflect.apply(forEach, defaultImport2, [binding[id], setGuildChannel]);
|
|
} else if (a0.data_mode === 'partial') {
|
|
value = environment.__proto__;
|
|
binding = env1_22;
|
|
fileOnly = binding.fileOnly;
|
|
id = a0.id;
|
|
Reflect.apply(fileOnly, binding,
|
|
['Restoring guild channels b/c partial in bg sync, for ' + id + ' #:' + guildChannelCount(a0.id)]);
|
|
defaultImport = importDefault(22) /* metro dependency 22 */;
|
|
forEach = defaultImport.forEach;
|
|
binding = env0_0;
|
|
id = a0.id;
|
|
Reflect.apply(forEach, defaultImport, [binding[id], setGuildChannel]);
|
|
partial_updates = a0.partial_updates;
|
|
r5 = partial_updates.deleted_channel_ids ?? [];
|
|
if (r5.length > 0) {
|
|
ensureGuildLoaded(a0.id, env1_40.Full, 'handleBackgroundSync');
|
|
r5.forEach(_fun16034);
|
|
}
|
|
partial_updates = a0.partial_updates;
|
|
channels = partial_updates.channels;
|
|
if (channels != null) {
|
|
channels.forEach(_fun16035);
|
|
}
|
|
} else {
|
|
value = environment.__proto__;
|
|
binding = env1_22;
|
|
fileOnly = binding.fileOnly;
|
|
id = a0.id;
|
|
channels = a0.channels;
|
|
Reflect.apply(fileOnly, binding, ['BG sync contained full channels for ' + id + ' #:' + channels.length]);
|
|
deleteGuildChannelsBinding = deleteGuildChannels;
|
|
id = a0.id;
|
|
deleteGuildChannelsBinding(id);
|
|
binding = env1_34;
|
|
add = binding.add;
|
|
id = a0.id;
|
|
Reflect.apply(add, binding, [id]);
|
|
basicChannelCacheStoreBinding = BasicChannelCacheStore;
|
|
restored = basicChannelCacheStoreBinding.restored;
|
|
id = a0.id;
|
|
Reflect.apply(restored, basicChannelCacheStoreBinding, [id]);
|
|
channels = a0.channels;
|
|
channels.forEach(_fun16036);
|
|
}
|
|
function _fun16034(a0) { // fn#16034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:11292, offset: 0x00e45906, size: 27 bytes, params: 2, frame: 11
|
|
deleteChannel(env2_24[a0]);
|
|
}
|
|
|
|
function _fun16035(a0) { // fn#16035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:11367, offset: 0x00e45921, size: 41 bytes, params: 2, frame: 14
|
|
setGuildChannel(createChannelRecordFromServer(a0, env0_0.id));
|
|
}
|
|
|
|
function _fun16036(a0) { // fn#16036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:11560, offset: 0x00e45921, size: 41 bytes, params: 2, frame: 14
|
|
setGuildChannel(createChannelRecordFromServer(a0, env0_0.id));
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function CACHE_LOADED_LAZY({guilds, guildChannels}) { // fn#16037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:11614, offset: 0x00e4594a, size: 250 bytes, params: 2, frame: 26
|
|
var r2;
|
|
var r11;
|
|
var value4;
|
|
var value5;
|
|
var property;
|
|
var property2;
|
|
var fileOnly;
|
|
var HermesInternal;
|
|
var concat;
|
|
var add;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var value9;
|
|
var value10;
|
|
const Math = global.Math;
|
|
const max = Math.max;
|
|
let binding = env0_38;
|
|
let length = guilds.length;
|
|
env0_38 = Reflect.apply(max, Math, [binding, length]);
|
|
const value2 = _createForOfIteratorHelperLoose_15960(guildChannels);
|
|
const value3 = value2();
|
|
let done = value3.done;
|
|
if (!done) {
|
|
r2 = value3;
|
|
reducibleLoop1: while (true) {
|
|
value4 = r2.value;
|
|
value5 = Module00057(value4, 2);
|
|
property = value5[0];
|
|
property2 = value5[1];
|
|
binding = env0_22;
|
|
fileOnly = binding.fileOnly;
|
|
length = property2.length;
|
|
HermesInternal = global.HermesInternal;
|
|
concat = HermesInternal.concat;
|
|
Reflect.apply(fileOnly, binding,
|
|
['Lazy cache contained full guild channels for ' + property + ' #:' + length]);
|
|
binding = env0_34;
|
|
add = binding.add;
|
|
Reflect.apply(add, binding, [property]);
|
|
value6 = _createForOfIteratorHelperLoose_15960(property2);
|
|
value7 = value6();
|
|
done = value7.done;
|
|
if (!done) {
|
|
r11 = value7;
|
|
reducibleLoop2: while (true) {
|
|
value8 = r11.value;
|
|
setChannel(castChannelRecord(value8));
|
|
value9 = value6();
|
|
done = value9.done;
|
|
if (done) {
|
|
break reducibleLoop2;
|
|
}
|
|
r11 = value9;
|
|
continue reducibleLoop2;
|
|
}
|
|
}
|
|
value10 = value2();
|
|
done = value10.done;
|
|
if (done) {
|
|
break reducibleLoop1;
|
|
}
|
|
r2 = value10;
|
|
continue reducibleLoop1;
|
|
}
|
|
}
|
|
}
|
|
|
|
function CACHE_LOADED_16038({guilds, privateChannels, initialGuildChannels}) { // fn#16038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:11989, offset: 0x00e45a44, size: 269 bytes, params: 2, frame: 24
|
|
var r6;
|
|
var r9;
|
|
var guild_id;
|
|
var value4;
|
|
var value5;
|
|
var done;
|
|
var value6;
|
|
var setChannelBinding;
|
|
var moduleValue;
|
|
var deserializeChannel;
|
|
var value7;
|
|
var value8;
|
|
var fileOnly;
|
|
var HermesInternal;
|
|
var concat;
|
|
var add;
|
|
const Math = global.Math;
|
|
const max = Math.max;
|
|
let binding = env0_38;
|
|
let length = guilds.length;
|
|
env0_38 = Reflect.apply(max, Math, [binding, length]);
|
|
const items2 = [privateChannels, initialGuildChannels];
|
|
length = items2.length;
|
|
if (0 < length) {
|
|
r6 = 0;
|
|
reducibleLoop1: while (true) {
|
|
value4 = _createForOfIteratorHelperLoose_15960(items2[r6]);
|
|
value5 = value4();
|
|
done = value5.done;
|
|
if (!done) {
|
|
r9 = value5;
|
|
reducibleLoop2: while (true) {
|
|
value6 = r9.value;
|
|
setChannelBinding = setChannel;
|
|
moduleValue = require(1931) /* metro dependency 1931: deserializeChannels */;
|
|
deserializeChannel = moduleValue.deserializeChannel;
|
|
setChannelBinding(Reflect.apply(deserializeChannel, moduleValue, [castChannelRecord(value6)]));
|
|
value7 = value4();
|
|
done = value7.done;
|
|
if (done) {
|
|
break reducibleLoop2;
|
|
}
|
|
r9 = value7;
|
|
continue reducibleLoop2;
|
|
}
|
|
}
|
|
value8 = typeof r6 === 'bigint' ? r6 + 1n : +r6 + 1;
|
|
length = items2.length;
|
|
if (value8 < length) {
|
|
r6 = value8;
|
|
continue reducibleLoop1;
|
|
}
|
|
break reducibleLoop1;
|
|
}
|
|
}
|
|
const property = initialGuildChannels[0];
|
|
reducibleJoin6: while (true) {
|
|
if (property == null) {
|
|
guild_id = undefined;
|
|
break reducibleJoin6;
|
|
}
|
|
guild_id = property.guild_id;
|
|
break reducibleJoin6;
|
|
}
|
|
reducibleJoin8: while (true) {
|
|
if (guild_id == null) {
|
|
break reducibleJoin8;
|
|
}
|
|
binding = env0_22;
|
|
fileOnly = binding.fileOnly;
|
|
HermesInternal = global.HermesInternal;
|
|
concat = HermesInternal.concat;
|
|
Reflect.apply(fileOnly, binding, ['Early cache contained full guild channels for ' + guild_id]);
|
|
binding = env0_34;
|
|
add = binding.add;
|
|
Reflect.apply(add, binding, [guild_id]);
|
|
break reducibleJoin8;
|
|
}
|
|
}
|
|
|
|
function CHANNEL_RECIPIENT_ADD(a0) { // fn#16040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:12514, offset: 0x00e45b69, size: 106 bytes, params: 2, frame: 18
|
|
var r0;
|
|
const value2 = _getChannel(a0.channelId);
|
|
const id = AuthenticationStore.getId();
|
|
const r4 = value2 == null || !value2.isPrivate();
|
|
if (r4) {
|
|
r0 = !r4;
|
|
} else {
|
|
setChannel(value2.addRecipient(a0.user.id, a0.nick, id));
|
|
r0 = true;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function CHANNEL_RECIPIENT_REMOVE(a0) { // fn#16041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:12700, offset: 0x00e45bd3, size: 84 bytes, params: 2, frame: 14
|
|
var r0;
|
|
const value2 = _getChannel(a0.channelId);
|
|
const r4 = value2 == null || !value2.isPrivate();
|
|
if (r4) {
|
|
r0 = !r4;
|
|
} else {
|
|
setChannel(value2.removeRecipient(a0.user.id));
|
|
r0 = true;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function CHANNEL_UPDATES(a0) { // fn#16042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:12862, offset: 0x00e45c27, size: 130 bytes, params: 2, frame: 16
|
|
var r5;
|
|
var setChannelBinding;
|
|
var value5;
|
|
var value6;
|
|
var Object;
|
|
var values;
|
|
var forEach;
|
|
let value = a0.channels.some(_fun16043);
|
|
const value3 = _createForOfIteratorHelperLoose_15960(a0.channels);
|
|
const value4 = value3();
|
|
let done = value4.done;
|
|
if (!done) {
|
|
r5 = value4;
|
|
reducibleLoop1: while (true) {
|
|
setChannelBinding = setChannel;
|
|
value5 = r5.value;
|
|
setChannelBinding(value5);
|
|
value6 = value3();
|
|
done = value6.done;
|
|
if (done) {
|
|
break reducibleLoop1;
|
|
}
|
|
r5 = value6;
|
|
continue reducibleLoop1;
|
|
}
|
|
}
|
|
reducibleJoin4: while (true) {
|
|
if (value) {
|
|
Object = global.Object;
|
|
values = Object.values;
|
|
value = Reflect.apply(values, Object, [env0_28]);
|
|
forEach = value.forEach;
|
|
Reflect.apply(forEach, value, [function(a0) {
|
|
setChannel(a0);
|
|
}]);
|
|
break reducibleJoin4;
|
|
}
|
|
break reducibleJoin4;
|
|
}
|
|
function _fun16043(a0) { // fn#16043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:12924, offset: 0x00e45ca9, size: 77 bytes, params: 2, frame: 15
|
|
let value = environment.__proto__;
|
|
const _getChannelBinding = _getChannel;
|
|
const id = a0.id;
|
|
value = undefined;
|
|
const value2 = _getChannelBinding(id);
|
|
return a0.nsfw !== (value2 == null ? value : value2.nsfw) || a0.type !== (value2 == null ? value : value2.type);
|
|
}
|
|
|
|
}
|
|
|
|
function CONNECTION_OPEN_SUPPLEMENTAL_16045({lazyPrivateChannels}) { // fn#16045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:13193, offset: 0x00e45d09, size: 64 bytes, params: 2, frame: 13
|
|
var binding;
|
|
if (env0_27 != null) {
|
|
env0_26 = {};
|
|
binding = env0_27;
|
|
binding.forEach(setPrivateChannel);
|
|
}
|
|
lazyPrivateChannels.forEach(setPrivateChannel);
|
|
}
|
|
|
|
function CONNECTION_OPEN_16046(a0) { // fn#16046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:13351, offset: 0x00e45d49, size: 305 bytes, params: 2, frame: 26
|
|
var object2;
|
|
var r3;
|
|
var value4;
|
|
var dataMode;
|
|
var defaultImport;
|
|
var id;
|
|
var property;
|
|
var binding2;
|
|
var fileOnly;
|
|
var guildChannelCountBinding;
|
|
var id2;
|
|
var value5;
|
|
var value6;
|
|
const binding = object2;
|
|
env0_30 = {};
|
|
env0_24 = {};
|
|
object2 = {};
|
|
env0_29 = {};
|
|
env0_28 = {};
|
|
env0_32 = {};
|
|
env0_37 = {};
|
|
env0_35 = {};
|
|
const Date = global.Date;
|
|
env0_36 = Date.now();
|
|
let initialPrivateChannels = a0.initialPrivateChannels;
|
|
initialPrivateChannels = a0.initialPrivateChannels;
|
|
let forEach = initialPrivateChannels.forEach;
|
|
Reflect.apply(forEach, initialPrivateChannels, [setPrivateChannel]);
|
|
const value2 = _createForOfIteratorHelperLoose_15960(a0.guilds);
|
|
const value3 = value2();
|
|
let done = value3.done;
|
|
if (!done) {
|
|
r3 = value3;
|
|
while (true) {
|
|
value4 = r3.value;
|
|
dataMode = value4.dataMode;
|
|
if (dataMode === 'partial') {
|
|
defaultImport = importDefault(22) /* metro dependency 22 */;
|
|
forEach = defaultImport.forEach;
|
|
id = value4.id;
|
|
property = binding[id];
|
|
Reflect.apply(forEach, defaultImport, [property, setGuildChannel]);
|
|
binding2 = env0_22;
|
|
fileOnly = binding2.fileOnly;
|
|
id = value4.id;
|
|
guildChannelCountBinding = guildChannelCount;
|
|
id2 = value4.id;
|
|
value5 = guildChannelCountBinding(id2);
|
|
Reflect.apply(fileOnly, binding2, ['Restoring guild channels for ' + id + ' #:' + value5]);
|
|
}
|
|
handleOneGuildCreate(value4);
|
|
value6 = value2();
|
|
done = value6.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
r3 = value6;
|
|
continue;
|
|
}
|
|
}
|
|
handleFavoritesUpdate();
|
|
}
|
|
|
|
function GUILD_DELETE_16050(a0) { // fn#16050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:14361, offset: 0x00e45f3e, size: 127 bytes, params: 2, frame: 15
|
|
const binding = env0_22;
|
|
binding.fileOnly('GuildDelete of ' + a0.guild.id);
|
|
deleteGuildChannels(a0.guild.id);
|
|
env0_34.delete(a0.guild.id);
|
|
const basicChannelCacheStoreBinding = BasicChannelCacheStore;
|
|
basicChannelCacheStoreBinding.invalidate(a0.guild.id);
|
|
}
|
|
|
|
function LOAD_CHANNELS({channels}) { // fn#16051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:14590, offset: 0x00e45fbd, size: 266 bytes, params: 2, frame: 24
|
|
var r2;
|
|
var r9;
|
|
var value4;
|
|
var guildId;
|
|
var binding;
|
|
var value5;
|
|
var value6;
|
|
var value7;
|
|
var Object;
|
|
var hasOwn;
|
|
var id;
|
|
var value8;
|
|
var value9;
|
|
const value2 = _createForOfIteratorHelperLoose_15960(channels);
|
|
const value3 = value2();
|
|
let done = value3.done;
|
|
if (!done) {
|
|
r2 = value3;
|
|
while (true) {
|
|
value4 = r2.value;
|
|
guildId = value4.guildId;
|
|
channels = value4.channels;
|
|
binding = env0_22;
|
|
binding.fileOnly('Lazy loaded guild channels for ' + guildId);
|
|
(importDefault(1931) /* metro dependency 1931: deserializeChannels */)(channels);
|
|
binding = env0_34;
|
|
binding.add(guildId);
|
|
BasicChannelCacheStore.restored(guildId);
|
|
value5 = _createForOfIteratorHelperLoose_15960(channels);
|
|
value6 = value5();
|
|
done = value6.done;
|
|
if (!done) {
|
|
r9 = value6;
|
|
while (true) {
|
|
value7 = r9.value;
|
|
Object = global.Object;
|
|
hasOwn = Object.hasOwn;
|
|
binding = env0_24;
|
|
id = value7.id;
|
|
if (!Reflect.apply(hasOwn, Object, [binding, id])) {
|
|
setGuildChannel(castChannelRecord(value7));
|
|
}
|
|
value8 = value5();
|
|
done = value8.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
r9 = value8;
|
|
continue;
|
|
}
|
|
}
|
|
value9 = value2();
|
|
done = value9.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
r2 = value9;
|
|
continue;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function LOGOUT_16052() { // fn#16052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:15100, offset: 0x00e460c7, size: 133 bytes, params: 1, frame: 12
|
|
env0_22.fileOnly('initializeClear()');
|
|
env0_30 = {};
|
|
env0_24 = {};
|
|
env0_25 = {};
|
|
env0_32 = {};
|
|
env0_29 = {};
|
|
env0_26 = {};
|
|
env0_37 = {};
|
|
env0_28 = {};
|
|
const Set = global.Set;
|
|
const set = new Set();
|
|
env0_35 = {};
|
|
const Date = global.Date;
|
|
env0_36 = Date.now();
|
|
}
|
|
|
|
function THREAD_LIST_SYNC({threads}) { // fn#16054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:15644, offset: 0x00e461b6, size: 30 bytes, params: 2, frame: 11
|
|
threads.forEach(function(a0) {
|
|
if (ALL_CHANNEL_TYPES.has(a0.type)) {
|
|
setChannel(a0);
|
|
}
|
|
});
|
|
function _fun16055(a0) { // fn#16055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:15698, offset: 0x00e461d4, size: 43 bytes, params: 2, frame: 13
|
|
if (ALL_CHANNEL_TYPES.has(a0.type)) {
|
|
setChannel(a0);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function _fun16001(a0) { // fn#16001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:2733, offset: 0x00e44e6b, size: 10 bytes, params: 2, frame: 1
|
|
return a0.guildId;
|
|
}
|
|
|
|
function _fun16003(a0) { // fn#16003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1506:2917, offset: 0x00e44e6b, size: 10 bytes, params: 2, frame: 1
|
|
return a0.guildId;
|
|
}
|
|
|
|
global.__d(_fun15956, 1379, [15, 17, 18, 57, 5, 6, 7, 1380, 1382, 1383, 1226, 1867, 1878, 661, 3, 1360, 1910, 1929,
|
|
1930, 694, 1931, 20, 21, 1932, 22, 566,
|
|
2]) /* metro module 1379, dependencies: [15, 17, 18, 57, 5, 6, 7, 1380, 1382, 1383, 1226, 1867, 1878, 661, 3, 1360, 1910, 1929, 1930, 694, 1931, 20, 21, 1932, 22, 566, 2] */;
|