This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

+181 -160
View File
@@ -1,22 +1,28 @@
/* Metro module 10581; source: stores/views/ActivityLauncherStore.tsx; dependencies: [6, 7, 15, 17, 18, 6877, 6876, 661, 4041, 694, 566, 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 Dispatcher from '../../Dispatcher.tsx'; /* Metro dependency 694 */
import SelfPresenceStore from '../SelfPresenceStore.tsx'; /* Metro dependency 6876 */
import LocalActivityStore from '../LocalActivityStore.tsx'; /* Metro dependency 6877 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as TimersModule from '../../external/discord_common/js/packages/timers/Timers.tsx'; /* Metro dependency 4041 */
function _fun81641(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10767:6, offset: 0x01ed8782, size: 455 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = ACTIVITY_JOIN;
const ACTIVITY_JOIN2 = ACTIVITY_JOIN;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const localActivityStore = importDefault(6877) /* metro dependency 6877: LocalActivityStore */;
const selfPresenceStore = importDefault(6876) /* metro dependency 6876: SelfPresenceStore */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_10 = value.ActivityActionStates;
const env0_11 = value.ActivityActionTypes;
let env0_12 = {};
const env0_13 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun81653(Store).displayName = 'ActivityLauncherStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{OVERLAY_INITIALIZE: function({activityLauncherStates}) {
@@ -31,169 +37,184 @@ function _fun81641(global, require, importDefault, importAll, module, exports, d
var handleActivityStateChangedBinding = handleActivityStateChanged;
var FAILED = ActivityActionStates.FAILED;
return handleActivityStateChangedBinding(FAILED, ActivityActionTypes.JOIN, a0);
}, ACTIVITY_JOIN: closure, EMBEDDED_ACTIVITY_CLOSE: closure, ACTIVITY_LAUNCH_FAIL: ACTIVITY_LAUNCH_FAIL});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/views/ActivityLauncherStore.tsx');
}, ACTIVITY_JOIN: ACTIVITY_JOIN2, EMBEDDED_ACTIVITY_CLOSE: ACTIVITY_JOIN2,
ACTIVITY_LAUNCH_FAIL: ACTIVITY_LAUNCH_FAIL});
(FileImportTrackerModule).fileFinishedImporting('stores/views/ActivityLauncherStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_81642() { // fn#81642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10767:227, offset: 0x01ed8949, 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_81642_isNativeReflectConstruct = function() {
return !!result;
})();
}
function startActivityLaunchTimeout(a0, a1, a2) { // fn#81645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10767:441, offset: 0x01ed89ab, size: 130 bytes, params: 4, frame: 16
const env0_0 = a0;
const env0_1 = a1;
if (env0_13[a0] != null) {
env0_13[a0].stop();
}
const Timeout = (require(4041) /* metro dependency 4041: Timers */).Timeout;
const timeout = new Timeout();
timeout.start(a2, _fun81646);
env0_13[a0] = timeout;
}
function handleActivityStateChanged(a0, a1, {applicationId, remotePartyId}) { // fn#81647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10767:638, offset: 0x01ed8a72, size: 220 bytes, params: 4, frame: 19
var r7;
var property;
const COMPLETE = ActivityActionStates.COMPLETE;
if (a0 === COMPLETE) {
property = env0_12[applicationId];
if (property != null) {
delete property[a1];
}
if (env0_13[applicationId] != null) {
env0_13[applicationId].stop();
delete env0_13[applicationId];
}
} else {
r7 = env0_12[applicationId] ?? ({});
r7[a1] = {state: a0, remotePartyId: remotePartyId};
env0_12[applicationId] = r7;
var FAILED = ActivityActionStates.FAILED;
if (a0 === FAILED) {
startActivityLaunchTimeout(applicationId, a1, env0_14);
} else if (a0 === ActivityActionStates.LOADING) {
startActivityLaunchTimeout(applicationId, a1, remotePartyId != null ? 15000 : env0_14);
function _isNativeReflectConstruct_81642() { // fn#81642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10767:227, offset: 0x01ed8949, 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_81642_isNativeReflectConstruct = function() {
return !!result;
})();
}
}
function ACTIVITY_JOIN(a0) { // fn#81648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10767:991, offset: 0x01ed8b4e, size: 72 bytes, params: 2, frame: 16
return (a0.type !== 'ACTIVITY_JOIN' || a0.parentApplicationId == null) && handleActivityStateChanged(ActivityActionStates.COMPLETE,
ActivityActionTypes.JOIN, a0);
}
function startActivityLaunchTimeout(a0, a1, a2) { // fn#81645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10767:441, offset: 0x01ed89ab, size: 130 bytes, params: 4, frame: 16
const env0_0 = a0;
const env0_1 = a1;
if (env0_13[a0] != null) {
env0_13[a0].stop();
}
const Timeout = (TimersModule).Timeout;
const timeout = new Timeout();
timeout.start(a2, _fun81646);
env0_13[a0] = timeout;
function _fun81646() { // fn#81646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10767:546, offset: 0x01ed8a2d, size: 69 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (Dispatcher).dispatch({type: 'ACTIVITY_LAUNCH_FAIL',
applicationId: env0_0, activityType: require});
}
function handleActivityUpdate() { // fn#81649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10767:1137, offset: 0x01ed8b96, size: 91 bytes, params: 1, frame: 12
const Object = global.Object;
let value = Object.entries(env0_12);
value = value.map(function(a0) {
var r0;
var r3;
var r4;
var item3;
var value3;
var iterator = a0[Symbol.iterator]();
var iterator2 = iterator.next;
var item2 = Reflect.apply(iterator2, iterator, []);
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
var r2 = value2 ? value : item;
if (value2) {
r0 = item2;
r3 = value;
r4 = value2;
}
function handleActivityStateChanged(a0, a1, {applicationId, remotePartyId}) { // fn#81647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10767:638, offset: 0x01ed8a72, size: 220 bytes, params: 4, frame: 19
var r7;
var property;
const COMPLETE = ActivityActionStates.COMPLETE;
if (a0 === COMPLETE) {
property = env0_12[applicationId];
if (property != null) {
delete property[a1];
}
if (env0_13[applicationId] != null) {
env0_13[applicationId].stop();
delete env0_13[applicationId];
}
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r3 = value;
r4 = value3;
} else {
r0 = item3;
r3 = item;
r4 = value3;
r7 = env0_12[applicationId] ?? ({});
r7[a1] = {state: a0, remotePartyId: remotePartyId};
env0_12[applicationId] = r7;
var FAILED = ActivityActionStates.FAILED;
if (a0 === FAILED) {
startActivityLaunchTimeout(applicationId, a1, env0_14);
} else if (a0 === ActivityActionStates.LOADING) {
startActivityLaunchTimeout(applicationId, a1, remotePartyId != null ? 15000 : env0_14);
}
}
if (!r4) {
r0.return();
}
function ACTIVITY_JOIN(a0) { // fn#81648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10767:991, offset: 0x01ed8b4e, size: 72 bytes, params: 2, frame: 16
return (a0.type !== 'ACTIVITY_JOIN' || a0.parentApplicationId == null) && handleActivityStateChanged(ActivityActionStates.COMPLETE,
ActivityActionTypes.JOIN, a0);
}
function handleActivityUpdate() { // fn#81649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10767:1137, offset: 0x01ed8b96, size: 91 bytes, params: 1, frame: 12
const Object = global.Object;
let value = Object.entries(env0_12);
value = value.map(function(a0) {
var r0;
var r3;
var r4;
var item3;
var value3;
var iterator = a0[Symbol.iterator]();
var iterator2 = iterator.next;
var item2 = Reflect.apply(iterator2, iterator, []);
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
var r2 = value2 ? value : item;
if (value2) {
r0 = item2;
r3 = value;
r4 = value2;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r3 = value;
r4 = value3;
} else {
r0 = item3;
r3 = item;
r4 = value3;
}
}
if (!r4) {
r0.return();
}
var property = r3[ActivityActionTypes.JOIN];
return {applicationId: r2, remotePartyId: property == null ? value : property.remotePartyId};
});
value = value.filter(function(a0) {
return a0.remotePartyId != null;
});
const env0_0 = false;
value.forEach(_fun81652);
return env0_0;
function _fun81652({applicationId, remotePartyId}) { // fn#81652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10767:1360, offset: 0x01ed8c70, size: 176 bytes, params: 2, frame: 19
const applicationActivity = LocalActivityStore.getApplicationActivity(applicationId);
const applicationActivity2 = SelfPresenceStore.getApplicationActivity(applicationId);
if (!((applicationActivity == null || applicationActivity.party == null ? undefined : applicationActivity.party.id) !== remotePartyId && (applicationActivity2 == null || applicationActivity2.party == null ? undefined : applicationActivity2.party.id) !== remotePartyId)) {
handleActivityStateChanged(ActivityActionStates.COMPLETE, ActivityActionTypes.JOIN,
{applicationId: applicationId,
remotePartyId: remotePartyId});
}
}
var property = r3[ActivityActionTypes.JOIN];
return {applicationId: r2, remotePartyId: property == null ? value : property.remotePartyId};
});
value = value.filter(function(a0) {
return a0.remotePartyId != null;
});
const env0_0 = false;
value.forEach(_fun81652);
return env0_0;
}
function _fun81653(a0) { // fn#81653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10767:1656, offset: 0x01ed8d20, size: 124 bytes, params: 2, frame: 16
const closure = ActivityLauncherStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: function() {
this.syncWith([LocalActivityStore, SelfPresenceStore], handleActivityUpdate);
}}, {key: 'getState', value: value_81656}, {key: 'getStates', value: value_81657}]);
}
function ACTIVITY_LAUNCH_FAIL({applicationId, activityType}) { // fn#81661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10767:2603, offset: 0x01ed8e6b, size: 43 bytes, params: 2, frame: 3
const property = env0_12[applicationId];
if (property == null) {
return false;
}
delete property[activityType];
}
function _fun81646() { // fn#81646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10767:546, offset: 0x01ed8a2d, size: 69 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ACTIVITY_LAUNCH_FAIL',
applicationId: env0_0, activityType: require});
}
function _fun81653(a0) { // fn#81653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10767:1656, offset: 0x01ed8d20, size: 124 bytes, params: 2, frame: 16
const ActivityLauncherStore2 = ActivityLauncherStore;
Inherits(ActivityLauncherStore2, a0);
return CreateClass(ActivityLauncherStore2, [{key: 'initialize', value: function() {
this.syncWith([LocalActivityStore, SelfPresenceStore], handleActivityUpdate);
}}, {key: 'getState', value: value_81656}, {key: 'getStates', value: value_81657}]);
function ActivityLauncherStore() { // fn#81654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10767:1668, offset: 0x010e918b, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, ActivityLauncherStore);
const value3 = env1_6(ActivityLauncherStore);
return env1_5(this, _isNativeReflectConstruct_81642() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function value_81656(a0, a1) { // fn#81656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10767:2068, offset: 0x01ed8dca, size: 48 bytes, params: 3, frame: 5
const value = environment.__proto__;
const property = env1_12[a0];
return property == null || property[a1] == null ? undefined : property[a1].state;
}
function value_81657() { // fn#81657, offset: 0x00e2f9de, size: 9 bytes, params: 1, frame: 1
return env1_12;
}
function _fun81652({applicationId, remotePartyId}) { // fn#81652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10767:1360, offset: 0x01ed8c70, size: 176 bytes, params: 2, frame: 19
const applicationActivity = LocalActivityStore.getApplicationActivity(applicationId);
const applicationActivity2 = SelfPresenceStore.getApplicationActivity(applicationId);
if (!((applicationActivity == null || applicationActivity.party == null ? undefined : applicationActivity.party.id) !== remotePartyId && (applicationActivity2 == null || applicationActivity2.party == null ? undefined : applicationActivity2.party.id) !== remotePartyId)) {
handleActivityStateChanged(ActivityActionStates.COMPLETE, ActivityActionTypes.JOIN,
{applicationId: applicationId,
remotePartyId: remotePartyId});
}
function ACTIVITY_LAUNCH_FAIL({applicationId, activityType}) { // fn#81661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10767:2603, offset: 0x01ed8e6b, size: 43 bytes, params: 2, frame: 3
const property = env0_12[applicationId];
if (property == null) {
return false;
}
delete property[activityType];
}
}
function value_81656(a0, a1) { // fn#81656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10767:2068, offset: 0x01ed8dca, size: 48 bytes, params: 3, frame: 5
const value = environment.__proto__;
const property = env1_12[a0];
return property == null || property[a1] == null ? undefined : property[a1].state;
}
global.__d(_fun81641, 10581, [6, 7, 15, 17, 18, 6877, 6876, 661, 4041, 694, 566,
2]) /* metro module 10581, dependencies: [6, 7, 15, 17, 18, 6877, 6876, 661, 4041, 694, 566, 2] */;
+301 -259
View File
@@ -1,21 +1,25 @@
/* Metro module 9815; source: stores/views/GIFPickerViewStore.tsx; dependencies: [6, 7, 15, 17, 18, 661, 1349, 1244, 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 * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as Frecency_user_settingsModule from '../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/frecency_user_settings.tsx'; /* Metro dependency 1349 */
function _fun76879(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10001:6, offset: 0x01de899f, size: 470 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).GIFPickerResultTypes;
const GIFType = (require(1349) /* metro dependency 1349: frecency_user_settings */).GIFType;
const GIFType = (Frecency_user_settingsModule).GIFType;
const env0_8 = GIFType.IMAGE;
let env0_12 = [];
const env0_13 = [];
let env0_14 = [];
let env0_15 = [];
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun76884(Store);
value.displayName = 'GIFPickerViewStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {GIF_PICKER_INITIALIZE: function(a0) {
@@ -39,270 +43,308 @@ function _fun76879(global, require, importDefault, importAll, module, exports, d
}, GIF_PICKER_TRENDING_SEARCH_TERMS_SUCCESS: function(a0) {
env0_15 = a0.items;
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/views/GIFPickerViewStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/views/GIFPickerViewStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_76880() { // fn#76880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10001:179, offset: 0x01de8b75, 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_76880_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _isNativeReflectConstruct_76880() { // fn#76880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10001:179, offset: 0x01de8b75, 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) {
function getFormatFromUrl(a0) { // fn#76883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10001:825, offset: 0x01de8bd7, size: 178 bytes, params: 2, frame: 13
var URL;
var prototype;
var value;
var uRL;
var pathname;
var toLowerCase;
var endsWith;
var value2;
var property;
var GIFType;
var VIDEO;
var error;
try {
URL = global.URL;
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
try {
prototype = URL.prototype;
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
try {
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
try {
uRL = new URL(a0);
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
try {
value = uRL instanceof Object ? uRL : value;
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
try {
pathname = value.pathname;
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
try {
toLowerCase = pathname.toLowerCase;
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
try {
value = Reflect.apply(toLowerCase, pathname, []);
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
try {
endsWith = value.endsWith;
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
try {
value2 = Reflect.apply(endsWith, value, ['.mp4']);
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
if (value2) {
try {
value = environment;
property = dependencyMap[6];
value = require(property);
GIFType = value.GIFType;
VIDEO = GIFType.VIDEO;
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
return VIDEO;
}
try {
endsWith = value.endsWith;
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
try {
value = Reflect.apply(endsWith, value, ['.webm']);
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
if (value) {
try {
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
try {
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
try {
property = dependencyMap[6];
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
try {
value = require(property);
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
try {
GIFType = value.GIFType;
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
try {
VIDEO = GIFType.VIDEO;
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
return VIDEO;
}
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
return (_isNativeReflectConstruct_76880_isNativeReflectConstruct = function() {
return !!result;
})();
}
function getFormatFromUrl(a0) { // fn#76883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10001:825, offset: 0x01de8bd7, size: 178 bytes, params: 2, frame: 13
var URL;
var prototype;
var value;
var uRL;
var pathname;
var toLowerCase;
var endsWith;
var value2;
var property;
var GIFType;
var VIDEO;
var error;
try {
URL = global.URL;
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
try {
prototype = URL.prototype;
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
try {
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
try {
uRL = new URL(a0);
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
try {
value = uRL instanceof Object ? uRL : value;
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
try {
pathname = value.pathname;
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
try {
toLowerCase = pathname.toLowerCase;
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
try {
value = Reflect.apply(toLowerCase, pathname, []);
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
try {
endsWith = value.endsWith;
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
try {
value2 = Reflect.apply(endsWith, value, ['.mp4']);
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
if (value2) {
try {
value = environment;
property = dependencyMap[6];
value = require(property);
GIFType = value.GIFType;
VIDEO = GIFType.VIDEO;
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
function _fun76884(a0) { // fn#76884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10001:1015, offset: 0x01de8c89, size: 255 bytes, params: 2, frame: 16
const GIFPickerViewStore2 = GIFPickerViewStore;
Inherits(GIFPickerViewStore2, a0);
return CreateClass(GIFPickerViewStore2, [{key: 'getAnalyticsID', value: value_76886}, {key: 'getQuery',
value: value_76887}, {key: 'getResultQuery', value: value_76888}, {key: 'getResultItems', value: value_76889},
{key: 'getTrendingCategories', value: value_76890}, {key: 'getSelectedFormat', value: function() {
return 'tinywebp';
}}, {key: 'getSuggestions', value: value_76892}, {key: 'getTrendingSearchTerms', value: value_76893}]);
function GIFPickerViewStore() { // fn#76885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10001:1027, offset: 0x00fc4bce, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, GIFPickerViewStore);
const value3 = env1_5(GIFPickerViewStore);
return env1_4(this, _isNativeReflectConstruct_76880() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
return VIDEO;
}
try {
endsWith = value.endsWith;
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
try {
value = Reflect.apply(endsWith, value, ['.webm']);
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
if (value) {
try {
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
try {
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
try {
property = dependencyMap[6];
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
try {
value = require(property);
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
try {
GIFType = value.GIFType;
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
try {
VIDEO = GIFType.VIDEO;
} catch (error) {
value = environment;
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
return VIDEO;
}
GIFType = require(dependencyMap[6]).GIFType;
return GIFType.IMAGE;
}
function _fun76884(a0) { // fn#76884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10001:1015, offset: 0x01de8c89, size: 255 bytes, params: 2, frame: 16
const closure = GIFPickerViewStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'getAnalyticsID', value: value_76886}, {key: 'getQuery', value: value_76887},
{key: 'getResultQuery', value: value_76888}, {key: 'getResultItems', value: value_76889},
{key: 'getTrendingCategories', value: value_76890}, {key: 'getSelectedFormat', value: function() {
return 'tinywebp';
}}, {key: 'getSuggestions', value: value_76892}, {key: 'getTrendingSearchTerms', value: value_76893}]);
}
function value_76886() { // fn#76886, offset: 0x00e07a77, size: 9 bytes, params: 1, frame: 1
return env1_9;
}
function GIF_PICKER_QUERY_SUCCESS(a0) { // fn#76896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10001:1967, offset: 0x01de8dd4, size: 93 bytes, params: 2, frame: 12
var value;
let query = a0.query;
if (query == null) {
query = a0.query;
if (query != null) {
function value_76887() { // fn#76887, offset: 0x00fbd9ec, size: 9 bytes, params: 1, frame: 1
return env1_10;
}
function value_76888() { // fn#76888, offset: 0x00ef8482, size: 9 bytes, params: 1, frame: 1
return env1_11;
}
function value_76889() { // fn#76889, offset: 0x00e2f9de, size: 9 bytes, params: 1, frame: 1
return env1_12;
}
function value_76890() { // fn#76890, offset: 0x00e2f9d5, size: 9 bytes, params: 1, frame: 1
return env1_13;
}
function value_76892() { // fn#76892, offset: 0x00df0f5a, size: 9 bytes, params: 1, frame: 1
return env1_14;
}
function value_76893() { // fn#76893, offset: 0x00df0e8b, size: 9 bytes, params: 1, frame: 1
return env1_15;
}
}
function GIF_PICKER_QUERY_SUCCESS(a0) { // fn#76896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10001:1967, offset: 0x01de8dd4, size: 93 bytes, params: 2, frame: 12
var value;
let query = a0.query;
if (query == null) {
query = a0.query;
}
value = a0.items.map(function({width, height, src, gif_src, url, id}) {
return {width: width, height: height, src: src, gifSrc: gif_src, url: url, id: id, format: IMAGE};
});
} else {
if (env0_10 === env0_11) {
return false;
}
query = a0.query;
if (query != null) {
if (query != null) {
query = a0.query;
}
value = a0.items.map(function({width, height, src, gif_src, url, id}) {
return {width: width, height: height, src: src, gifSrc: gif_src, url: url, id: id, format: IMAGE};
});
} else {
if (env0_10 === env0_11) {
return false;
}
query = a0.query;
if (query != null) {
query = a0.query;
}
value = a0.items.map(function({width, height, src, gif_src, url, id}) {
return {width: width, height: height, src: src, gifSrc: gif_src, url: url, id: id, format: IMAGE};
});
}
value = a0.items.map(function({width, height, src, gif_src, url, id}) {
return {width: width, height: height, src: src, gifSrc: gif_src, url: url, id: id, format: IMAGE};
});
}
}
function GIF_PICKER_TRENDING_FETCH_SUCCESS(a0) { // fn#76899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10001:2309, offset: 0x01de8ea5, size: 218 bytes, params: 2, frame: 21
var r10;
var items;
var object;
var intl;
var src;
var getFormatFromUrlBinding;
const trendingCategories = a0.trendingCategories;
let trendingGIFPreview = a0.trendingGIFPreview;
if (trendingGIFPreview != null) {
object = {};
object.type = GIFPickerResultTypes.TRENDING_GIFS;
intl = require(dependencyMap[7]).intl;
object.name = intl.string(require(dependencyMap[7]).t.H6zNFz);
trendingGIFPreview = a0.trendingGIFPreview;
src = trendingGIFPreview.src;
object.src = src;
getFormatFromUrlBinding = getFormatFromUrl;
trendingGIFPreview = a0.trendingGIFPreview;
src = trendingGIFPreview.src;
object.format = getFormatFromUrlBinding(src);
items = [object];
r10 = dependencyMap;
} else {
items = [];
function GIF_PICKER_TRENDING_FETCH_SUCCESS(a0) { // fn#76899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10001:2309, offset: 0x01de8ea5, size: 218 bytes, params: 2, frame: 21
var r10;
var items2;
var object;
var intl;
var src;
var getFormatFromUrlBinding;
const trendingCategories = a0.trendingCategories;
let trendingGIFPreview = a0.trendingGIFPreview;
if (trendingGIFPreview != null) {
object = {};
object.type = GIFPickerResultTypes.TRENDING_GIFS;
intl = require(dependencyMap[7]).intl;
object.name = intl.string(require(dependencyMap[7]).t.H6zNFz);
trendingGIFPreview = a0.trendingGIFPreview;
src = trendingGIFPreview.src;
object.src = src;
getFormatFromUrlBinding = getFormatFromUrl;
trendingGIFPreview = a0.trendingGIFPreview;
src = trendingGIFPreview.src;
object.format = getFormatFromUrlBinding(src);
items2 = [object];
r10 = dependencyMap;
} else {
items2 = [];
}
object = [];
arraySpread(object, trendingCategories.map(_fun76900), arraySpread(object, items2, 0, r10), r10);
function _fun76900(a0) { // fn#76900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10001:2572, offset: 0x01de8f7f, size: 80 bytes, params: 2, frame: 14
const object = {};
copyDataProperties(object, a0, undefined);
object['src'] = a0.src;
const value = environment.__proto__;
const TRENDING_CATEGORY = GIFPickerResultTypes.TRENDING_CATEGORY;
object['type'] = TRENDING_CATEGORY;
object['format'] = getFormatFromUrl(a0.src);
return object;
}
}
object = [];
arraySpread(object, trendingCategories.map(_fun76900), arraySpread(object, items, 0, r10), r10);
}
function _fun76900(a0) { // fn#76900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10001:2572, offset: 0x01de8f7f, size: 80 bytes, params: 2, frame: 14
const object2 = {};
copyDataProperties(object2, a0, undefined);
object2['src'] = a0.src;
const value = environment.__proto__;
const TRENDING_CATEGORY = GIFPickerResultTypes.TRENDING_CATEGORY;
object2['type'] = TRENDING_CATEGORY;
object2['format'] = getFormatFromUrl(a0.src);
return object2;
}
global.__d(_fun76879, 9815, [6, 7, 15, 17, 18, 661, 1349, 1244, 566, 694,
2]) /* metro module 9815, dependencies: [6, 7, 15, 17, 18, 661, 1349, 1244, 566, 694, 2] */;
+258 -227
View File
@@ -1,265 +1,296 @@
/* Metro module 5219; source: stores/views/PrivateChannelSortStore.tsx; dependencies: [6, 7, 15, 17, 18, 4621, 4622, 5220, 1383, 1379, 1867, 4605, 4864, 1878, 21, 3780, 3738, 5225, 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 SnowflakeUtils from '../../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */
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 UserStore from '../UserStore.tsx'; /* Metro dependency 1878 */
import ReadStateStore from '../ReadStateStore.tsx'; /* Metro dependency 4605 */
import MessageRequestStore from '../../modules/message_request/MessageRequestStore.tsx'; /* Metro dependency 4621 */
import SpamMessageRequestStore from '../../modules/message_request/SpamMessageRequestStore.tsx'; /* Metro dependency 4622 */
import UserGuildSettingsStore from '../UserGuildSettingsStore.tsx'; /* Metro dependency 4864 */
import ReplyNudgeStore from '../../modules/reply_nudge/ReplyNudgeStore.tsx'; /* Metro dependency 5220 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ChannelRecordModule from '../../records/ChannelRecord.tsx'; /* Metro dependency 1383 */
import * as SecondaryIndexMapModule from '../../external/discord_common/js/packages/secondary-index-map/SecondaryIndexMap.tsx'; /* Metro dependency 3780 */
function _fun46149(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:6, offset: 0x011a1009, size: 640 bytes, params: 8, frame: 22
const env0_0 = require;
const closure = CONNECTION_OPEN_46154;
const closure2 = CACHE_LOADED_46156;
const CONNECTION_OPEN_461542 = CONNECTION_OPEN_46154;
const CACHE_LOADED_461562 = CACHE_LOADED_46156;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const messageRequestStore = importDefault(4621) /* metro dependency 4621: MessageRequestStore */;
const spamMessageRequestStore = importDefault(4622) /* metro dependency 4622: SpamMessageRequestStore */;
const replyNudgeStore = importDefault(5220) /* metro dependency 5220: ReplyNudgeStore */;
const env0_11 = (require(1383) /* metro dependency 1383: ChannelRecord */).isPrivate;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
object = {DEFAULT: 'DEFAULT', FAVORITE: 'FAVORITE'};
const SecondaryIndexMap = (require(3780) /* metro dependency 3780: SecondaryIndexMap */).SecondaryIndexMap;
const SecondaryIndexMap = (SecondaryIndexMapModule).SecondaryIndexMap;
let secondaryIndexMap = new SecondaryIndexMap(_fun46157, _fun46158);
const env0_19 = [];
const env0_20 = [];
const env0_21 = [];
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun46162(Store).displayName = 'PrivateChannelSortStore';
secondaryIndexMap = new secondaryIndexMap(importDefault(694) /* metro dependency 694: Dispatcher */,
{CONNECTION_OPEN: closure, CONNECTION_OPEN_SUPPLEMENTAL: closure, OVERLAY_INITIALIZE: closure,
CACHE_LOADED: closure2, CACHE_LOADED_LAZY: closure2, CHANNEL_UPDATES: function({channels}) {
{CONNECTION_OPEN: CONNECTION_OPEN_461542, CONNECTION_OPEN_SUPPLEMENTAL: CONNECTION_OPEN_461542,
OVERLAY_INITIALIZE: CONNECTION_OPEN_461542, CACHE_LOADED: CACHE_LOADED_461562,
CACHE_LOADED_LAZY: CACHE_LOADED_461562, CHANNEL_UPDATES: function({channels}) {
channels.forEach(_fun46170);
}, CHANNEL_CREATE: CHANNEL_CREATE_46171, CHANNEL_DELETE: CHANNEL_DELETE_46172, MESSAGE_CREATE: MESSAGE_CREATE_46173,
REPLY_NUDGE_SET: REPLY_NUDGE_SET, GUILD_CREATE: GUILD_CREATE_46175, LOGOUT: LOGOUT_46176});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/views/PrivateChannelSortStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/views/PrivateChannelSortStore.tsx');
exports.default = secondaryIndexMap;
}
function _isNativeReflectConstruct_46150() { // fn#46150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:252, offset: 0x011a1289, 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_46150_isNativeReflectConstruct = function() {
return !!result;
})();
}
function makeSortedChannel(a0) { // fn#46153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:727, offset: 0x011a12e7, size: 286 bytes, params: 2, frame: 20
var r4;
var r0;
var r2;
var isMessageRequestTimestamp;
let value = a1;
if (value !== undefined) {
r2 = value;
} else {
r4 = ReadStateStore.lastMessageId(a0.id) ?? a0.lastMessageId;
r4 = r4 ?? a0.id;
isMessageRequestTimestamp = a0.isMessageRequestTimestamp;
if (isMessageRequestTimestamp == null) {
r0 = r4;
} else {
value = (importDefault(3738) /* metro dependency 3738 */)(isMessageRequestTimestamp);
value = value.valueOf();
value = (importDefault(21) /* metro dependency 21: SnowflakeUtils */).fromTimestamp(value);
r0 = (importDefault(21) /* metro dependency 21: SnowflakeUtils */).compare(r4, value) > 0 ? r4 : value;
function _isNativeReflectConstruct_46150() { // fn#46150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:252, offset: 0x011a1289, 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) {
}
r2 = r0;
return (_isNativeReflectConstruct_46150_isNativeReflectConstruct = function() {
return !!result;
})();
}
const object2 = {};
object2.channelId = a0.id;
object2.lastMessageId = r2;
object2.isFavorite = UserGuildSettingsStore.isMessagesFavorite(a0.id);
object2.isRequest = MessageRequestStore.isMessageRequest(a0.id) || SpamMessageRequestStore.isSpam(a0.id);
object2.nudgeTimestamp = ReplyNudgeStore.getNudgeDMTimestamp(a0.id);
return object2;
}
function CONNECTION_OPEN_46154() { // fn#46154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:1188, offset: 0x011a1405, size: 70 bytes, params: 1, frame: 12
env0_18.clear();
const Object = global.Object;
const values = Object.values;
const getMutablePrivateChannels = ChannelStore.getMutablePrivateChannels;
Reflect.apply(values, Object, [Reflect.apply(getMutablePrivateChannels, ChannelStore, [])]).forEach(_fun46155);
}
function CACHE_LOADED_46156() { // fn#46156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:1324, offset: 0x011a1472, size: 74 bytes, params: 1, frame: 22
var propertyName;
var binding;
const mutablePrivateChannels = ChannelStore.getMutablePrivateChannels();
for (propertyName in mutablePrivateChannels) {
binding = env0_18;
binding.set(propertyName, makeSortedChannel(mutablePrivateChannels[propertyName]));
function makeSortedChannel(a0) { // fn#46153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:727, offset: 0x011a12e7, size: 286 bytes, params: 2, frame: 20
var r4;
var r0;
var r2;
var readStateStoreBinding;
var isMessageRequestTimestamp;
let value = a1;
if (value !== undefined) {
r2 = value;
} else {
readStateStoreBinding = ReadStateStore;
r4 = readStateStoreBinding.lastMessageId(a0.id) ?? a0.lastMessageId;
r4 = r4 ?? a0.id;
isMessageRequestTimestamp = a0.isMessageRequestTimestamp;
if (isMessageRequestTimestamp == null) {
r0 = r4;
} else {
value = (importDefault(3738) /* metro dependency 3738 */)(isMessageRequestTimestamp);
value = value.valueOf();
value = (importDefault(21) /* metro dependency 21: SnowflakeUtils */).fromTimestamp(value);
r0 = (importDefault(21) /* metro dependency 21: SnowflakeUtils */).compare(r4, value) > 0 ? r4 : value;
}
r2 = r0;
}
const object = {};
object.channelId = a0.id;
object.lastMessageId = r2;
const userGuildSettingsStoreBinding = UserGuildSettingsStore;
object.isFavorite = userGuildSettingsStoreBinding.isMessagesFavorite(a0.id);
const messageRequestStoreBinding = MessageRequestStore;
object.isRequest = messageRequestStoreBinding.isMessageRequest(a0.id) || SpamMessageRequestStore.isSpam(a0.id);
object.nudgeTimestamp = ReplyNudgeStore.getNudgeDMTimestamp(a0.id);
return object;
}
}
function _fun46157({isRequest, isFavorite}) { // fn#46157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:557, offset: 0x011a14bc, size: 58 bytes, params: 2, frame: 3
return isRequest ? [] : [isFavorite ? env0_17.FAVORITE : env0_17.DEFAULT];
}
function CONNECTION_OPEN_46154() { // fn#46154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:1188, offset: 0x011a1405, size: 70 bytes, params: 1, frame: 12
env0_18.clear();
const Object = global.Object;
const values = Object.values;
const channelStoreBinding = ChannelStore;
const getMutablePrivateChannels = channelStoreBinding.getMutablePrivateChannels;
Reflect.apply(values, Object, [Reflect.apply(getMutablePrivateChannels, channelStoreBinding,
[])]).forEach(_fun46155);
function _fun46155(a0) { // fn#46155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:1284, offset: 0x011a144b, size: 39 bytes, params: 2, frame: 15
const binding = env1_18;
binding.set(a0.id, makeSortedChannel(a0));
}
function _fun46158({lastMessageId, nudgeTimestamp}) { // fn#46158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:619, offset: 0x011a14f6, size: 89 bytes, params: 2, frame: 15
let value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.extractTimestamp(lastMessageId);
const Math = global.Math;
return -Math.max(value, nudgeTimestamp ?? 0);
}
function _fun46159() { // fn#46159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:1465, offset: 0x011a154f, size: 123 bytes, params: 1, frame: 14
let binding = env0_18;
let values = binding.values;
const binding2 = env0_17;
const FAVORITE = binding2.FAVORITE;
const value2 = Reflect.apply(values, binding, [FAVORITE]);
binding = env0_18;
values = binding.values;
const DEFAULT = binding2.DEFAULT;
const value3 = Reflect.apply(values, binding, [DEFAULT]);
if (!(env0_19 === value2 && env0_20 === value3)) {
env0_21 = [];
value2.forEach(_fun46160);
value3.forEach(_fun46161);
}
return env0_21;
}
function _fun46162(a0) { // fn#46162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:1641, offset: 0x011a15e5, size: 139 bytes, params: 2, frame: 16
const closure = PrivateChannelSortStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore, GuildStore, MessageRequestStore, ReadStateStore, SpamMessageRequestStore,
UserGuildSettingsStore, UserStore, ReplyNudgeStore);
this.syncWith([UserGuildSettingsStore, MessageRequestStore, ReplyNudgeStore], CONNECTION_OPEN_46154);
}}, {key: 'getPrivateChannelIds', value: value_46165}, {key: 'getSortedChannels', value: value_46166},
{key: 'serializeForOverlay', value: value_46167}]);
}
function CHANNEL_UPDATES_46169({channels}) { // fn#46169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:2643, offset: 0x011a1765, size: 30 bytes, params: 2, frame: 11
channels.forEach(_fun46170);
}
function CHANNEL_CREATE_46171({channel}) { // fn#46171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:2780, offset: 0x011a17d1, size: 110 bytes, params: 2, frame: 17
var r1;
var r0;
var value4;
var binding;
const isPrivate2 = isPrivate(channel.type);
if (isPrivate2) {
value4 = channel.id !== (require(5225) /* metro dependency 5225: FakePlaceholderPrivateChannel */).FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID;
if (value4) {
function CACHE_LOADED_46156() { // fn#46156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:1324, offset: 0x011a1472, size: 74 bytes, params: 1, frame: 22
var propertyName;
var binding;
const mutablePrivateChannels = ChannelStore.getMutablePrivateChannels();
for (propertyName in mutablePrivateChannels) {
binding = env0_18;
binding.set(channel.id, makeSortedChannel(channel));
r1 = undefined;
} else {
r1 = value4;
binding.set(propertyName, makeSortedChannel(mutablePrivateChannels[propertyName]));
}
r0 = r1;
} else {
r0 = !!isPrivate2;
}
return r0;
}
function CHANNEL_DELETE_46172({channel}) { // fn#46172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:2950, offset: 0x011a183f, size: 32 bytes, params: 2, frame: 11
return env0_18.delete(channel.id);
}
function MESSAGE_CREATE_46173({channelId, message}) { // fn#46173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:3030, offset: 0x011a185f, size: 94 bytes, params: 2, frame: 17
var channel;
const binding = env0_18;
if (binding.has(channelId)) {
channel = ChannelStore.getChannel(channelId);
return channel != null && env0_18.set(channelId, makeSortedChannel(channel, message.id));
function _fun46157({isRequest, isFavorite}) { // fn#46157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:557, offset: 0x011a14bc, size: 58 bytes, params: 2, frame: 3
return isRequest ? [] : [isFavorite ? env0_17.FAVORITE : env0_17.DEFAULT];
}
return false;
}
function REPLY_NUDGE_SET({channelId}) { // fn#46174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:3196, offset: 0x011a18bd, size: 83 bytes, params: 2, frame: 16
var channel;
const binding = env0_18;
if (binding.has(channelId)) {
channel = ChannelStore.getChannel(channelId);
return channel != null && env0_18.set(channelId, makeSortedChannel(channel));
function _fun46158({lastMessageId, nudgeTimestamp}) { // fn#46158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:619, offset: 0x011a14f6, size: 89 bytes, params: 2, frame: 15
let value = SnowflakeUtils;
value = value.extractTimestamp(lastMessageId);
const Math = global.Math;
return -Math.max(value, nudgeTimestamp ?? 0);
}
return false;
}
function GUILD_CREATE_46175({guild}) { // fn#46175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:3344, offset: 0x011a1910, size: 32 bytes, params: 2, frame: 11
return env0_18.delete(guild.id);
}
function _fun46159() { // fn#46159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:1465, offset: 0x011a154f, size: 123 bytes, params: 1, frame: 14
let binding = env0_18;
let values = binding.values;
const binding2 = env0_17;
const FAVORITE = binding2.FAVORITE;
const value2 = Reflect.apply(values, binding, [FAVORITE]);
binding = env0_18;
values = binding.values;
const DEFAULT = binding2.DEFAULT;
const value3 = Reflect.apply(values, binding, [DEFAULT]);
if (!(env0_19 === value2 && env0_20 === value3)) {
items2 = [];
value2.forEach(_fun46160);
value3.forEach(_fun46161);
}
return items2;
function _fun46160({channelId}) { // fn#46160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:1557, offset: 0x011a15ca, size: 27 bytes, params: 2, frame: 11
return env1_21.push(channelId);
}
function _fun46155(a0) { // fn#46155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:1284, offset: 0x011a144b, size: 39 bytes, params: 2, frame: 15
const binding = env1_18;
binding.set(a0.id, makeSortedChannel(a0));
}
function _fun46161({channelId}) { // fn#46161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:1601, offset: 0x011a15ca, size: 27 bytes, params: 2, frame: 11
return env1_21.push(channelId);
}
function _fun46160({channelId}) { // fn#46160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:1557, offset: 0x011a15ca, size: 27 bytes, params: 2, frame: 11
return env1_21.push(channelId);
}
function value_46165() { // fn#46165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:2107, offset: 0x011a16d3, size: 15 bytes, params: 1, frame: 9
return env1_22();
}
function value_46166() { // fn#46166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:2162, offset: 0x011a16e2, size: 61 bytes, params: 1, frame: 13
let binding = env1_18;
let values = binding.values;
const binding2 = env1_17;
const FAVORITE = binding2.FAVORITE;
const items2 = [Reflect.apply(values, binding, [FAVORITE])];
binding = env1_18;
values = binding.values;
const DEFAULT = binding2.DEFAULT;
items2[1] = Reflect.apply(values, binding, [DEFAULT]);
return items2;
}
function value_46167() { // fn#46167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:2257, offset: 0x011a171f, size: 41 bytes, params: 1, frame: 12
var environment;
const value = environment.__proto__;
env1_18.values().forEach(_fun46168);
return {};
}
function _fun46170(a0) { // fn#46170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:2698, offset: 0x011a1783, size: 78 bytes, params: 2, frame: 16
var r2;
var binding;
const isPrivate2 = isPrivate(a0.type);
if (isPrivate2) {
r2 = isPrivate2;
} else {
binding = env1_18;
r2 = binding.has(a0.id);
}
if (r2) {
binding = env1_18;
binding.set(a0.id, makeSortedChannel(a0));
function _fun46162(a0) { // fn#46162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:1641, offset: 0x011a15e5, size: 139 bytes, params: 2, frame: 16
const PrivateChannelSortStore2 = PrivateChannelSortStore;
Inherits(PrivateChannelSortStore2, a0);
return CreateClass(PrivateChannelSortStore2, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore, GuildStore, MessageRequestStore, ReadStateStore, SpamMessageRequestStore,
UserGuildSettingsStore, UserStore, ReplyNudgeStore);
this.syncWith([UserGuildSettingsStore, MessageRequestStore, ReplyNudgeStore], CONNECTION_OPEN_46154);
}}, {key: 'getPrivateChannelIds', value: value_46165}, {key: 'getSortedChannels', value: value_46166},
{key: 'serializeForOverlay', value: value_46167}]);
function PrivateChannelSortStore() { // fn#46163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:1653, offset: 0x011717ca, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, PrivateChannelSortStore);
const value3 = env1_6(PrivateChannelSortStore);
return env1_5(this, _isNativeReflectConstruct_46150() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function value_46165() { // fn#46165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:2107, offset: 0x011a16d3, size: 15 bytes, params: 1, frame: 9
return env1_22();
}
function value_46166() { // fn#46166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:2162, offset: 0x011a16e2, size: 61 bytes, params: 1, frame: 13
let binding = env1_18;
let values = binding.values;
const binding2 = env1_17;
const FAVORITE = binding2.FAVORITE;
const items2 = [Reflect.apply(values, binding, [FAVORITE])];
binding = env1_18;
values = binding.values;
const DEFAULT = binding2.DEFAULT;
items2[1] = Reflect.apply(values, binding, [DEFAULT]);
return items2;
}
function value_46167() { // fn#46167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:2257, offset: 0x011a171f, size: 41 bytes, params: 1, frame: 12
var environment;
const value = environment.__proto__;
env1_18.values().forEach(_fun46168);
return {};
function _fun46168({channelId, lastMessageId}) { // fn#46168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:2304, offset: 0x011a1748, size: 29 bytes, params: 2, frame: 3
env0_0[channelId] = lastMessageId;
}
}
}
function CHANNEL_UPDATES_46169({channels}) { // fn#46169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:2643, offset: 0x011a1765, size: 30 bytes, params: 2, frame: 11
channels.forEach(_fun46170);
function _fun46170(a0) { // fn#46170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:2698, offset: 0x011a1783, size: 78 bytes, params: 2, frame: 16
var r2;
var binding;
const isPrivate2 = isPrivate(a0.type);
if (isPrivate2) {
r2 = isPrivate2;
} else {
binding = env1_18;
r2 = binding.has(a0.id);
}
if (r2) {
binding = env1_18;
binding.set(a0.id, makeSortedChannel(a0));
}
}
}
function CHANNEL_CREATE_46171({channel}) { // fn#46171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:2780, offset: 0x011a17d1, size: 110 bytes, params: 2, frame: 17
var r1;
var r0;
var value4;
var binding;
const isPrivate2 = isPrivate(channel.type);
if (isPrivate2) {
value4 = channel.id !== (require(5225) /* metro dependency 5225: FakePlaceholderPrivateChannel */).FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID;
if (value4) {
binding = env0_18;
binding.set(channel.id, makeSortedChannel(channel));
r1 = undefined;
} else {
r1 = value4;
}
r0 = r1;
} else {
r0 = !!isPrivate2;
}
return r0;
}
function CHANNEL_DELETE_46172({channel}) { // fn#46172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:2950, offset: 0x011a183f, size: 32 bytes, params: 2, frame: 11
return env0_18.delete(channel.id);
}
function MESSAGE_CREATE_46173({channelId, message}) { // fn#46173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:3030, offset: 0x011a185f, size: 94 bytes, params: 2, frame: 17
var channel;
const binding = env0_18;
if (binding.has(channelId)) {
channel = ChannelStore.getChannel(channelId);
return channel != null && env0_18.set(channelId, makeSortedChannel(channel, message.id));
}
return false;
}
function REPLY_NUDGE_SET({channelId}) { // fn#46174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:3196, offset: 0x011a18bd, size: 83 bytes, params: 2, frame: 16
var channel;
const binding = env0_18;
if (binding.has(channelId)) {
channel = ChannelStore.getChannel(channelId);
return channel != null && env0_18.set(channelId, makeSortedChannel(channel));
}
return false;
}
function GUILD_CREATE_46175({guild}) { // fn#46175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:3344, offset: 0x011a1910, size: 32 bytes, params: 2, frame: 11
return env0_18.delete(guild.id);
}
function LOGOUT_46176() { // fn#46176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:3418, offset: 0x01121c4c, size: 21 bytes, params: 1, frame: 9
env0_18.clear();
}
}
function _fun46168({channelId, lastMessageId}) { // fn#46168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5397:2304, offset: 0x011a1748, size: 29 bytes, params: 2, frame: 3
env0_0[channelId] = lastMessageId;
}
global.__d(_fun46149, 5219, [6, 7, 15, 17, 18, 4621, 4622, 5220, 1383, 1379, 1867, 4605, 4864, 1878, 21, 3780, 3738,
5225, 566, 694,
2]) /* metro module 5219, dependencies: [6, 7, 15, 17, 18, 4621, 4622, 5220, 1383, 1379, 1867, 4605, 4864, 1878, 21, 3780, 3738, 5225, 566, 694, 2] */;
File diff suppressed because it is too large. Load diff