Initial commit

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

No files matched your search

@@ -0,0 +1,874 @@
/* Metro module 7235; source: modules/autocompleter/Autocompleter.tsx; dependencies: [6, 7, 7236, 7237, 1935, 3793, 1878, 6587, 6526, 22, 6591, 7238, 1362, 6592, 4096, 4101, 3855, 1471, 2] */
function _fun57999(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7413:6, offset: 0x016bc9c2, size: 294 bytes, params: 8, frame: 20
const env0_0 = require;
const _arrayLikeToArray_58002 = 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;
};
let 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 threadMemberListStore = importDefault(7236) /* metro dependency 7236: ThreadMemberListStore */;
const linkRecord = importDefault(7237) /* metro dependency 7237: LinkRecord */;
const env0_7 = (require(1935) /* metro dependency 1935: GuildChannelStore */).GUILD_VOCAL_CHANNELS_KEY;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_10 = (require(6587) /* metro dependency 6587: AutocompleterConstants */).AutocompleterResultTypes;
Object = global.Object;
const env0_11 = Object.freeze({});
let value = _fun58004();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/autocompleter/Autocompleter.tsx');
exports.default = value;
}
function _createForOfIteratorHelperLoose_58000(a0, a1) { // fn#58000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7413:232, offset: 0x016bcae8, 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 _fun58001;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_58002(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_58002(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_58002(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun58001;
}
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 getAutocompleterBoosterMap(a0, a1) { // fn#58003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7413:1166, offset: 0x016bcc5a, size: 57 bytes, params: 3, frame: 12
var r0;
var value;
if (a1.frecencyBoosters) {
value = require(6526) /* metro dependency 6526: AutocompleteUtils */;
value = value.getBoosterMap(a0);
r0 = value;
} else {
r0 = {};
}
return r0;
}
function _fun58004() { // fn#58004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7413:1268, offset: 0x016bcc93, size: 569 bytes, params: 1, frame: 15
return env0_4(Autocompleter, [{key: 'createSearchContext', value: value_58009}, {key: 'setLimit',
value: value_58010}, {key: 'setRefetchForSingleCategoryLimit', value: function(a0) {
this._refetchForSingleCategoryLimit = a0;
}}, {key: 'setResultTypes', value: value_58012}, {key: '_include', value: function(a0) {
return this.resultTypes == null || this.resultTypes.has(a0);
}}, {key: '_isAsyncSearch', value: value_58014}, {key: 'setOptions', value: value_58015},
{key: '_willRefetchIfSingleCategoryResults', value: value_58018}, {key: 'refetchIfSingleCategoryResults',
value: value_58020}, {key: 'search', value: value_58021}, {key: 'clear', value: function() {
var userSearchContext = this.userSearchContext;
if (userSearchContext != null) {
userSearchContext.clearQuery();
}
this.results = [];
this._userResults = [];
this._groupDMResults = [];
this._textChannelResults = [];
this._voiceChannelResults = [];
this._guildResults = [];
this._applicationResults = [];
this._linkResults = [];
this._inAppNavigations = [];
}}, {key: 'clean', value: function() {
this.clear();
this.destroy();
this.query = '';
this.updateAllResults();
}}, {key: 'pause', value: function() {
var userSearchContext = this.userSearchContext;
if (!(userSearchContext == null || userSearchContext.unsubscribe == null)) {
userSearchContext.unsubscribe();
}
}}, {key: 'resume', value: function() {
var userSearchContext = this.userSearchContext;
if (!(userSearchContext == null || userSearchContext.subscribe == null)) {
userSearchContext.subscribe();
}
}}, {key: 'destroy', value: function() {
var userSearchContext = this.userSearchContext;
if (userSearchContext != null) {
userSearchContext.destroy();
this.userSearchContext = null;
}
}}, {key: 'queryTextChannels', value: value_58028}, {key: 'queryVoiceChannels', value: value_58030},
{key: 'queryGuilds', value: value_58031}, {key: 'queryUsers', value: value_58033}, {key: 'queryGroupDMs',
value: value_58034}, {key: 'queryApplications', value: value_58036}, {key: 'queryLink', value: value_58037},
{key: 'queryInAppNavigations', value: value_58038}]);
}
function Autocompleter(a0, a1) { // fn#58005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7413:1289, offset: 0x016bcecc, size: 273 bytes, params: 3, frame: 18
var environment;
let value = a2;
const value2 = a3;
const value3 = a4;
const r2 = value !== undefined ? value : 100;
const r6 = value2 !== undefined ? value2 : env1_11;
const r1 = value3 !== undefined ? value3 : 0;
value = environment.__proto__;
env1_3(this, Autocompleter);
this.query = '';
this.options = env1_11;
this.results = [];
this._userResults = [];
this._groupDMResults = [];
this._textChannelResults = [];
this._voiceChannelResults = [];
this._guildResults = [];
this._applicationResults = [];
this._linkResults = [];
this._inAppNavigations = [];
this._userBlacklist = null;
this._refetched = false;
this.parseUserResults = parseUserResults_58006;
this.updateAllResults = updateAllResults;
this.onResultsChange = a0;
this.setOptions(r6, true);
this._limit = r2;
this._refetchForSingleCategoryLimit = r1;
this.createSearchContext();
this.setResultTypes(a1);
}
function value_58009() { // fn#58009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7413:2712, offset: 0x016bd255, size: 74 bytes, params: 1, frame: 14
var value;
const userSearchContext = this.userSearchContext;
if (userSearchContext == null) {
value = environment.__proto__;
value = importDefault(7238) /* metro dependency 7238: UserSearchManager */;
this.userSearchContext = value.getUserSearchContext(this.parseUserResults, this._limit);
}
}
function value_58010(a0) { // fn#58010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7413:2867, offset: 0x016bd29f, size: 351 bytes, params: 2, frame: 12
const userSearchContext = this.userSearchContext;
this._limit = a0;
if (userSearchContext != null) {
userSearchContext.setLimit(a0);
}
if (this._userResults.length > this._limit) {
this._userResults.length = this._limit;
}
if (this._groupDMResults.length > this._limit) {
this._groupDMResults.length = this._limit;
}
if (this._textChannelResults.length > this._limit) {
this._textChannelResults.length = this._limit;
}
if (this._voiceChannelResults.length > this._limit) {
this._voiceChannelResults.length = this._limit;
}
if (this._guildResults.length > this._limit) {
this._guildResults.length = this._limit;
}
if (this._applicationResults.length > this._limit) {
this._applicationResults.length = this._limit;
}
if (this._linkResults.length > this._limit) {
this._linkResults.length = this._limit;
}
if (this._inAppNavigations.length > this._limit) {
this._inAppNavigations.length = this._limit;
}
}
function value_58012(a0) { // fn#58012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7413:3751, offset: 0x016bd40e, size: 395 bytes, params: 2, frame: 13
let value = null;
this.resultTypes = value != a0 ? new global.Set(a0) : value;
let _include = this._include;
value = environment.__proto__;
const USER = AutocompleterResultTypes.USER;
this._userResults = Reflect.apply(_include, this, [USER]) ? this._userResults : [];
_include = this._include;
const GROUP_DM = AutocompleterResultTypes.GROUP_DM;
this._groupDMResults = Reflect.apply(_include, this, [GROUP_DM]) ? this._groupDMResults : [];
_include = this._include;
const TEXT_CHANNEL = AutocompleterResultTypes.TEXT_CHANNEL;
this._textChannelResults = Reflect.apply(_include, this, [TEXT_CHANNEL]) ? this._textChannelResults : [];
_include = this._include;
const VOICE_CHANNEL = AutocompleterResultTypes.VOICE_CHANNEL;
this._voiceChannelResults = Reflect.apply(_include, this, [VOICE_CHANNEL]) ? this._voiceChannelResults : [];
_include = this._include;
const GUILD = AutocompleterResultTypes.GUILD;
this._guildResults = Reflect.apply(_include, this, [GUILD]) ? this._guildResults : [];
_include = this._include;
const APPLICATION = AutocompleterResultTypes.APPLICATION;
this._applicationResults = Reflect.apply(_include, this, [APPLICATION]) ? this._applicationResults : [];
_include = this._include;
const LINK = AutocompleterResultTypes.LINK;
this._linkResults = Reflect.apply(_include, this, [LINK]) ? this._linkResults : [];
_include = this._include;
const IN_APP_NAVIGATION = AutocompleterResultTypes.IN_APP_NAVIGATION;
this._inAppNavigations = Reflect.apply(_include, this, [IN_APP_NAVIGATION]) ? this._inAppNavigations : [];
}
function value_58014() { // fn#58014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7413:4517, offset: 0x016bd5c0, size: 73 bytes, params: 1, frame: 14
var r0;
var options;
const _include = this._include;
let value = environment.__proto__;
const USER = AutocompleterResultTypes.USER;
value = Reflect.apply(_include, this, [USER]);
if (value) {
options = this.options;
value = undefined;
value = (options == null || options.userFilters == null ? value : options.userFilters.thread) != null;
r0 = value;
} else {
r0 = value;
}
return r0;
}
function value_58015(a0) { // fn#58015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7413:4662, offset: 0x016bd609, size: 150 bytes, params: 2, frame: 16
var r3;
var object2;
var Array;
let value = a0;
let value2 = a1;
if (value2 !== undefined ? value2 : false) {
object2 = {};
copyDataProperties(object2, value, copyDataProperties(object2, this.options, undefined));
r3 = object2;
} else {
r3 = value;
}
this.options = r3;
if (this.options.blacklist != null) {
Array = global.Array;
value = Array.from(this.options.blacklist);
value = value.map(function(a0) {
var value = a0.startsWith('user:');
var value2 = '';
return value ? a0.replace('user:', value2) : value2;
});
this._userBlacklist = value.filter(_fun58017);
} else {
this._userBlacklist = null;
}
}
function value_58018() { // fn#58018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7413:4956, offset: 0x016bd6ca, size: 190 bytes, params: 1, frame: 13
var r1;
var items2;
let r0 = this._refetched || this._refetchForSingleCategoryLimit <= 5;
if (r0) {
r0 = !r0;
} else {
r1 = this.options.voiceChannelGuildFilter == null && this.options.userFilters == null;
if (r1) {
items2 = [this._userResults];
items2[1] = this._groupDMResults;
items2[2] = this._textChannelResults;
items2[3] = this._voiceChannelResults;
items2[4] = this._guildResults;
items2[5] = this._applicationResults;
items2[6] = this._linkResults;
items2[7] = this._inAppNavigations;
r1 = items2.filter(function(a0) {
return a0.length > 0;
}).length === 1;
}
r0 = r1;
}
return r0;
}
function value_58020() { // fn#58020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7413:5369, offset: 0x016bd788, size: 391 bytes, params: 1, frame: 15
var query;
if (this._willRefetchIfSingleCategoryResults()) {
this._refetched = true;
query = this.query;
if (this._userResults.length > 0) {
this.queryUsers(query, null, this._refetchForSingleCategoryLimit);
} else if (this._groupDMResults.length > 0) {
this._groupDMResults = this.queryGroupDMs(query, this._refetchForSingleCategoryLimit);
} else if (this._textChannelResults.length > 0) {
this._textChannelResults = this.queryTextChannels(query, this._refetchForSingleCategoryLimit);
} else if (this._voiceChannelResults.length > 0) {
this._voiceChannelResults = this.queryVoiceChannels(query, this._refetchForSingleCategoryLimit);
} else if (this._guildResults.length > 0) {
this._guildResults = this.queryGuilds(query, this._refetchForSingleCategoryLimit);
} else if (this._applicationResults.length > 0) {
this._applicationResults = this.queryApplications(query, this._refetchForSingleCategoryLimit);
} else if (this._linkResults.length > 0) {
this._linkResults = this.queryLink(query, this._refetchForSingleCategoryLimit);
} else if (this._inAppNavigations.length > 0) {
this._inAppNavigations = this.queryInAppNavigations(query, this._refetchForSingleCategoryLimit);
}
}
}
function value_58021(a0, a1) { // fn#58021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7413:6374, offset: 0x016bd90f, size: 173 bytes, params: 3, frame: 14
var environment;
var r3;
const env0_1 = a0;
const env0_2 = a1;
this.query = a0;
this._refetched = false;
let value = a0.trim();
if (value === '') {
this.clear();
this.updateAllResults();
} else {
if (this.options.frecencyBoosters) {
value = environment.__proto__;
value = (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).FrecencyUserSettingsActionCreators.loadIfNecessary();
r3 = value;
} else {
r3 = global.Promise.resolve();
}
r3.finally(_fun58022);
}
}
function value_58028(a0, a1) { // fn#58028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7413:7932, offset: 0x016bdc0a, size: 177 bytes, params: 3, frame: 17
var environment;
var r4;
var getAutocompleterBoosterMapBinding;
var options;
var value2;
var autocompleterBoosterMapBinding;
var allowSnowflake;
const _include = this._include;
let value = environment.__proto__;
let TEXT_CHANNEL = AutocompleterResultTypes.TEXT_CHANNEL;
if (Reflect.apply(_include, this, [TEXT_CHANNEL])) {
getAutocompleterBoosterMapBinding = getAutocompleterBoosterMap;
TEXT_CHANNEL = AutocompleterResultTypes.TEXT_CHANNEL;
options = this.options;
value2 = undefined;
autocompleterBoosterMapBinding = getAutocompleterBoosterMapBinding(TEXT_CHANNEL, options);
options = this.options;
allowSnowflake = options.allowSnowflake;
r4 = options.blacklist != null ? function(a0) {
return !blacklist.has('channel:' + a0.id);
} : value2;
value = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
return value.queryChannels({query: a0, guildId: null, limit: a1, fuzzy: true, allowSnowflake: allowSnowflake,
filter: r4, boosters: autocompleterBoosterMapBinding});
}
return [];
}
function value_58030(a0, a1) { // fn#58030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7413:8286, offset: 0x016bdcf1, size: 159 bytes, params: 3, frame: 17
var options;
var allowSnowflake;
var voiceChannelGuildFilter;
var getAutocompleterBoosterMapBinding;
const _include = this._include;
let VOICE_CHANNEL = AutocompleterResultTypes.VOICE_CHANNEL;
if (Reflect.apply(_include, this, [VOICE_CHANNEL])) {
options = this.options;
allowSnowflake = options.allowSnowflake;
voiceChannelGuildFilter = options.voiceChannelGuildFilter;
getAutocompleterBoosterMapBinding = getAutocompleterBoosterMap;
VOICE_CHANNEL = AutocompleterResultTypes.VOICE_CHANNEL;
options = this.options;
return (importDefault(6526) /* metro dependency 6526: AutocompleteUtils */).queryChannels({query: a0,
guildId: voiceChannelGuildFilter, limit: a1, fuzzy: true, type: GUILD_VOCAL_CHANNELS_KEY,
allowSnowflake: allowSnowflake, boosters: getAutocompleterBoosterMapBinding(VOICE_CHANNEL, options)});
}
return [];
}
function value_58031(a0, a1) { // fn#58031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7413:8598, offset: 0x016bdd90, size: 173 bytes, params: 3, frame: 16
var environment;
var r5;
var getAutocompleterBoosterMapBinding;
var options;
var value2;
var autocompleterBoosterMapBinding;
var allowSnowflake;
const _include = this._include;
let value = environment.__proto__;
let GUILD = AutocompleterResultTypes.GUILD;
if (Reflect.apply(_include, this, [GUILD])) {
getAutocompleterBoosterMapBinding = getAutocompleterBoosterMap;
GUILD = AutocompleterResultTypes.GUILD;
options = this.options;
value2 = undefined;
autocompleterBoosterMapBinding = getAutocompleterBoosterMapBinding(GUILD, options);
options = this.options;
allowSnowflake = options.allowSnowflake;
r5 = options.blacklist != null ? function(a0) {
return !blacklist.has('guild:' + a0.id);
} : value2;
value = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
return value.queryGuilds({query: a0, limit: a1, fuzzy: true, filter: r5,
boosters: autocompleterBoosterMapBinding,
allowSnowflake: allowSnowflake});
}
return [];
}
function value_58033(a0, a1, a2) { // fn#58033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7413:8913, offset: 0x016bde73, size: 586 bytes, params: 4, frame: 47
var r24;
var r15;
var r7;
var r30;
var r32;
var displayName;
var _include;
var value;
var USER;
var options;
var allowSnowflake;
var userFilters;
var getAutocompleterBoosterMapBinding;
var value2;
var autocompleterBoosterMapBinding;
var value4;
var items;
var propertyName;
var propertyName2;
var property;
var _createForOfIteratorHelperLoose_58000Binding;
var userIds;
var value5;
var value6;
var done;
var value7;
var value8;
var friends;
var isFriend;
var value9;
var _userBlacklist;
var value10;
var value11;
var push;
var usersById;
var property2;
var value12;
const userSearchContext = this.userSearchContext;
if (userSearchContext != null) {
_include = this._include;
value = environment.__proto__;
USER = AutocompleterResultTypes.USER;
if (Reflect.apply(_include, this, [USER])) {
options = this.options;
allowSnowflake = options.allowSnowflake;
userFilters = options.userFilters;
getAutocompleterBoosterMapBinding = getAutocompleterBoosterMap;
USER = AutocompleterResultTypes.USER;
options = this.options;
value2 = undefined;
autocompleterBoosterMapBinding = getAutocompleterBoosterMapBinding(USER, options);
if ((userFilters == null ? value2 : userFilters.thread) == null) {
if (value2 !== a1) {
(importDefault(6592) /* metro dependency 6592: GuildUtils */).requestMembers(a1, a0, 100);
}
userSearchContext.setLimit(a2);
userSearchContext.setQuery({query: a0, filters: userFilters, blacklist: this._userBlacklist,
boosters: autocompleterBoosterMapBinding});
} else {
value4 = ThreadMemberListStore.getMemberListSections(userFilters.thread);
items = [];
for (propertyName in value4) {
property = value4[propertyName];
_createForOfIteratorHelperLoose_58000Binding = _createForOfIteratorHelperLoose_58000;
userIds = property.userIds;
value5 = _createForOfIteratorHelperLoose_58000Binding(userIds);
value6 = value5();
done = value6.done;
if (done) {
r24 = propertyName2;
continue;
}
r15 = value6;
while (true) {
value7 = r15.value;
value8 = userFilters != null;
if (value8) {
friends = userFilters.friends;
r7 = friends;
} else {
r7 = value8;
}
if (!r7) {
continue;
}
isFriend = RelationshipStore.isFriend;
value9 = !Reflect.apply(isFriend, RelationshipStore, [value7]);
r7 = value9;
if (r7) {
continue;
}
_userBlacklist = this._userBlacklist;
if (_userBlacklist == null) {
r30 = value2;
continue;
}
value10 = _userBlacklist.includes(value7);
r30 = value10;
value11 = r30 != null;
if (value11) {
r32 = r30;
continue;
}
r32 = value11;
continue;
if (r32) {
continue;
}
push = items.push;
usersById = property.usersById;
property2 = usersById[value7];
if (property2 == null) {
displayName = value2;
continue;
}
displayName = property2.displayName;
Reflect.apply(push, items, [{userId: value7, nick: displayName}]);
value12 = value5();
done = value12.done;
if (done) {
r24 = propertyName2;
break;
}
r15 = value12;
continue;
}
}
value = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
this._userResults = value.queryUsers({query: a0, users: items, limit: a2,
boosters: autocompleterBoosterMapBinding,
allowSnowflake: allowSnowflake});
}
}
}
}
function value_58034(a0, a1) { // fn#58034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7413:9723, offset: 0x016be0bd, size: 162 bytes, params: 3, frame: 16
var environment;
var r4;
var options;
var blacklist;
var getAutocompleterBoosterMapBinding;
var value2;
var autocompleterBoosterMapBinding;
const _include = this._include;
let value = environment.__proto__;
let GROUP_DM = AutocompleterResultTypes.GROUP_DM;
if (Reflect.apply(_include, this, [GROUP_DM])) {
options = this.options;
blacklist = options.blacklist;
getAutocompleterBoosterMapBinding = getAutocompleterBoosterMap;
GROUP_DM = AutocompleterResultTypes.GROUP_DM;
options = this.options;
value2 = undefined;
autocompleterBoosterMapBinding = getAutocompleterBoosterMapBinding(GROUP_DM, options);
r4 = blacklist != null ? function(a0) {
return !blacklist.has('channel:' + a0.id);
} : value2;
value = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
return value.queryGroupDMs({query: a0, limit: a1, fuzzy: true, filter: r4,
boosters: autocompleterBoosterMapBinding});
}
return [];
}
function value_58036(a0, a1) { // fn#58036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7413:10015, offset: 0x016be15f, size: 95 bytes, params: 3, frame: 13
var r0;
const _include = this._include;
let value = environment.__proto__;
const APPLICATION = AutocompleterResultTypes.APPLICATION;
if (Reflect.apply(_include, this, [APPLICATION])) {
value = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
value = value.queryApplications({query: a0, limit: a1, fuzzy: true});
r0 = value;
} else {
r0 = [];
}
return r0;
}
function value_58037(a0) { // fn#58037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7413:10147, offset: 0x016be1be, size: 480 bytes, params: 2, frame: 24
var items;
var codedLink;
var URL;
var prototype;
var value4;
var uRL;
var value5;
var pathname;
var hostname;
var object2;
var error;
let value = undefined;
const _include = this._include;
const LINK = AutocompleterResultTypes.LINK;
if (Reflect.apply(_include, this, [LINK])) {
codedLink = (require(4096) /* metro dependency 4096: findCodedLinks */).findCodedLink(a0);
if ((codedLink == null ? value : codedLink.type) === (require(4101) /* metro dependency 4101: CodedLink */).CodedLinkType.INVITE) {
return [{type: AutocompleterResultTypes.LINK, record: LinkRecord.fromInviteCode(codedLink.code), score: 1}];
}
try {
URL = global.URL;
prototype = URL.prototype;
value4 = Object.create(prototype, {constructor: {value: URL}});
uRL = new URL((importDefault(3855) /* metro dependency 3855 */).sanitizeUrl(a0));
value5 = uRL instanceof Object ? uRL : value4;
} catch (error) {
return [];
}
pathname = value5.pathname;
hostname = value5.hostname;
if (pathname === null) {
items = [];
} else if ((importDefault(1471) /* metro dependency 1471: URLUtils */).isDiscordHostname(value === hostname ? '' : hostname) || global.window.location.host === value5.host) {
value = importDefault(1471) /* metro dependency 1471: URLUtils */;
if (value.isAppRoute(pathname)) {
object2 = {};
object2.type = AutocompleterResultTypes.LINK;
object2.record = LinkRecord.fromPath(pathname);
object2.score = 1;
items = [object2];
} else {
items = [];
}
} else {
items = [];
}
return items;
}
return [];
}
function value_58038(a0, a1) { // fn#58038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7413:10663, offset: 0x016be39e, size: 95 bytes, params: 3, frame: 13
var r0;
const _include = this._include;
let value = environment.__proto__;
const IN_APP_NAVIGATION = AutocompleterResultTypes.IN_APP_NAVIGATION;
if (Reflect.apply(_include, this, [IN_APP_NAVIGATION])) {
value = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
value = value.queryInAppNavigations({query: a0, limit: a1, fuzzy: true});
r0 = value;
} else {
r0 = [];
}
return r0;
}
function AutocompleterParseUserResults({results}) { // fn#58006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7413:1663, owner: Autocompleter.parseUserResults, offset: 0x016bcfdd, size: 348 bytes, params: 2, frame: 22
var r2;
var r10;
var _createForOfIteratorHelperLoose_58000Binding;
var value3;
var value4;
var value5;
var done;
var value6;
var id;
var score;
var comparator;
var user;
var _userResults;
var push;
var object2;
var moduleValue;
var value8;
var value9;
let binding = env0_0;
const _include = binding._include;
let USER = AutocompleterResultTypes.USER;
if (Reflect.apply(_include, binding, [USER])) {
binding = env0_0;
binding._userResults = [];
_createForOfIteratorHelperLoose_58000Binding = _createForOfIteratorHelperLoose_58000;
value3 = undefined;
value4 = _createForOfIteratorHelperLoose_58000Binding(results);
value5 = value4();
done = value5.done;
if (!done) {
r2 = value5;
while (true) {
value6 = r2.value;
id = value6.id;
score = value6.score;
comparator = value6.comparator;
user = UserStore.getUser(id);
if (user != null) {
_userResults = env0_0._userResults;
push = _userResults.push;
object2 = {};
USER = AutocompleterResultTypes.USER;
object2.type = USER;
object2.record = user;
moduleValue = require(6526) /* metro dependency 6526: AutocompleteUtils */;
object2.score = moduleValue.calculateScore(score);
if (comparator != null) {
r10 = comparator;
continue;
}
r10 = value3;
continue;
object2.comparator = r10;
Reflect.apply(push, _userResults, [object2]);
}
value8 = value4();
done = value8.done;
if (done) {
break;
}
r2 = value8;
continue;
}
}
binding = env0_0;
value9 = binding._willRefetchIfSingleCategoryResults();
if (value9) {
r2 = !value9;
} else {
binding = env0_0;
r2 = binding._userResults.length > binding._limit;
}
if (r2) {
binding = env0_0;
binding._userResults.length = binding._limit;
}
if (value9) {
env0_0.refetchIfSingleCategoryResults();
}
binding = env0_0;
binding.updateAllResults();
}
}
function updateAllResults() { // fn#58007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7413:2186, owner: Autocompleter.updateAllResults, offset: 0x016bd139, size: 235 bytes, params: 1, frame: 18
var environment;
const clearTimeout = global.clearTimeout;
const binding = env0_0;
clearTimeout(binding._asyncTimeout);
let value = environment.__proto__.__proto__;
value = importDefault(22) /* metro dependency 22 */;
const _userResults = binding._userResults;
const items2 = [];
arraySpread(items2, binding._inAppNavigations, arraySpread(items2, binding._linkResults, arraySpread(items2,
binding._guildResults, arraySpread(items2, binding._voiceChannelResults, arraySpread(items2,
binding._textChannelResults, arraySpread(items2, binding._groupDMResults, arraySpread(items2, _userResults, 0,
undefined), undefined), undefined), undefined), undefined), undefined), undefined);
value = value(items2);
value = value.uniqBy(function(a0) {
return '' + a0.type + '-' + a0.record.id;
});
value = value.sort(importDefault(6591) /* metro dependency 6591: sortByMatchScore */);
binding.results = value.value();
binding.onResultsChange(binding.results, binding.query);
}
function _fun58022() { // fn#58022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7413:6608, offset: 0x016bd9bc, size: 299 bytes, params: 1, frame: 16
var _include;
var value2;
var clearTimeout;
let binding = env0_0;
const queryUsers = binding.queryUsers;
const binding2 = env0_1;
Reflect.apply(queryUsers, binding, [binding2, require, binding._limit]);
binding._groupDMResults = binding.queryGroupDMs(binding2, binding._limit);
binding._textChannelResults = binding.queryTextChannels(binding2, binding._limit);
binding._voiceChannelResults = binding.queryVoiceChannels(binding2, binding._limit);
binding._guildResults = binding.queryGuilds(binding2, binding._limit);
binding._applicationResults = binding.queryApplications(binding2, binding._limit);
binding._inAppNavigations = binding.queryInAppNavigations(binding2, binding._limit);
if (binding._isAsyncSearch()) {
clearTimeout = global.clearTimeout;
binding = env0_0;
clearTimeout(binding._asyncTimeout);
binding._asyncTimeout = global.setTimeout(binding.updateAllResults, 300);
} else {
binding = env0_0;
_include = binding._include;
value2 = environment.__proto__.__proto__;
if (!Reflect.apply(_include, binding, [AutocompleterResultTypes.USER])) {
env0_0.updateAllResults();
}
}
}
@@ -0,0 +1,22 @@
/* Metro module 6587; source: modules/autocompleter/AutocompleterConstants.tsx; dependencies: [7, 6, 2] */
function _fun51854(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#51854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6765:6, offset: 0x012e60a5, size: 331 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importDefault(7) /* metro dependency 7 */;
const env0_0 = importDefault(6) /* metro dependency 6 */;
value = value(HeaderRecord);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/autocompleter/AutocompleterConstants.tsx');
exports.HeaderRecord = value;
exports.FindResultDirections = {UP: 'UP', DOWN: 'DOWN'};
exports.AutocompleterResultTypes = {GUILD: 'GUILD', TEXT_CHANNEL: 'TEXT_CHANNEL', GROUP_DM: 'GROUP_DM',
VOICE_CHANNEL: 'VOICE_CHANNEL', USER: 'USER', HEADER: 'HEADER', APPLICATION: 'APPLICATION', SKU: 'SKU',
LINK: 'LINK', IN_APP_NAVIGATION: 'IN_APP_NAVIGATION', DM: 'DM'};
exports.AutocompleterQuerySymbols = {USER: '@', TEXT_CHANNEL: '#', VOICE_CHANNEL: '!', GUILD: '*', APPLICATION: '$'};
}
function HeaderRecord(a0) { // fn#51855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6765:121, offset: 0x012e61f0, size: 39 bytes, params: 2, frame: 14
env0_0(this, HeaderRecord);
this.id = a0;
this.text = a0;
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,20 @@
/* Metro module 7240; source: modules/autocompleter/createAutocompleterResult.tsx; dependencies: [6587, 2] */
function _fun58223(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#58223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7418:6, offset: 0x016c20e2, size: 117 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const autocompleterConstantsModule = require(6587) /* metro dependency 6587: AutocompleterConstants */;
const env0_0 = autocompleterConstantsModule.HeaderRecord;
const env0_1 = autocompleterConstantsModule.AutocompleterResultTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/autocompleter/createAutocompleterResult.tsx');
exports.createHeaderResult = createHeaderResult;
}
function createHeaderResult(a0) { // fn#58224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7418:258, offset: 0x016c2157, size: 60 bytes, params: 2, frame: 12
const object2 = {};
const HEADER = AutocompleterResultTypes.HEADER;
object2.type = HEADER;
object2.record = new HeaderRecord(a0);
object2.score = 0;
return object2;
}
@@ -0,0 +1,50 @@
/* Metro module 7242; source: modules/autocompleter/createAutocompleterResultForChannelId.tsx; dependencies: [1379, 3793, 1878, 6587, 661, 4805, 2] */
function _fun58227(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#58227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7420:6, offset: 0x016c22b9, size: 188 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_5 = (require(6587) /* metro dependency 6587: AutocompleterConstants */).AutocompleterResultTypes;
const env0_6 = (require(661) /* metro dependency 661: Constants */).ChannelTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/autocompleter/createAutocompleterResultForChannelId.tsx');
exports.default = createAutocompleterResultForChannelId;
}
function createAutocompleterResultForChannelId(a0) { // fn#58228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7420:291, offset: 0x016c2375, size: 341 bytes, params: 2, frame: 19
let value = a1;
const value2 = a2;
const value3 = a3;
const r2 = value !== undefined ? value : ChannelStore;
const r4 = value2 !== undefined ? value2 : UserStore;
const r3 = value3 !== undefined ? value3 : RelationshipStore;
value = r2.getChannel(a0);
const value4 = null;
if (value4 == value) {
return value4;
}
const channelName = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(value, r4, r3);
const type = value.type;
const DM = ChannelTypes.DM;
if (DM === type) {
value = r4.getUser(value.getRecipientId());
return value4 == value ? value4 : {type: AutocompleterResultTypes.USER, record: value, score: 0,
comparator: channelName};
}
const GROUP_DM = ChannelTypes.GROUP_DM;
if (GROUP_DM === type) {
return {type: AutocompleterResultTypes.GROUP_DM, record: value, score: 0, comparator: channelName};
}
const GUILD_VOICE = ChannelTypes.GUILD_VOICE;
if (GUILD_VOICE === type) {
return {type: AutocompleterResultTypes.VOICE_CHANNEL, record: value, score: 0, comparator: channelName};
}
const GUILD_STAGE_VOICE = ChannelTypes.GUILD_STAGE_VOICE;
if (GUILD_STAGE_VOICE === type) {
return {type: AutocompleterResultTypes.VOICE_CHANNEL, record: value, score: 0, comparator: channelName};
}
const TEXT_CHANNEL = AutocompleterResultTypes.TEXT_CHANNEL;
return {type: TEXT_CHANNEL, record: value, score: 0, comparator: channelName};
}
@@ -0,0 +1,71 @@
/* Metro module 7241; source: modules/autocompleter/findNextSelectedResult.tsx; dependencies: [6587, 2] */
function _fun58225(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#58225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7419:6, offset: 0x016c2193, size: 121 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const autocompleterConstantsModule = require(6587) /* metro dependency 6587: AutocompleterConstants */;
const env0_0 = autocompleterConstantsModule.FindResultDirections;
const env0_1 = autocompleterConstantsModule.AutocompleterResultTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/autocompleter/findNextSelectedResult.tsx');
exports.default = findNextSelectedResult;
}
function findNextSelectedResult(a0, a1, a2, a3) { // fn#58226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7419:252, offset: 0x016c220c, size: 173 bytes, params: 5, frame: 22
var r5;
var r1;
var value6;
var findNextSelectedResultBinding;
let value = a1;
const value2 = a3;
const length = a2.length;
if (length === 0) {
return 0;
}
if (value2 == null) {
r5 = value;
r1 = a0 !== FindResultDirections.UP ? 1 : -1;
value += r1;
value6 = value < 0;
if (value6) {
findNextSelectedResultBinding = findNextSelectedResult;
value = -1;
value = findNextSelectedResultBinding(a0, value6 ? length : value, a2, r5);
r1 = value;
} else if (value >= length) {
findNextSelectedResultBinding = findNextSelectedResult;
value = -1;
value = findNextSelectedResultBinding(a0, value6 ? length : value, a2, r5);
r1 = value;
} else if (a2[value].type !== AutocompleterResultTypes.HEADER) {
r1 = value;
} else {
value = findNextSelectedResult(a0, value, a2, r5);
r1 = value;
}
return r1;
}
if (value2 !== value) {
r5 = value2;
r1 = a0 !== FindResultDirections.UP ? 1 : -1;
value += r1;
value6 = value < 0;
if (value6) {
findNextSelectedResultBinding = findNextSelectedResult;
value = -1;
value = findNextSelectedResultBinding(a0, value6 ? length : value, a2, r5);
r1 = value;
} else if (value >= length) {
findNextSelectedResultBinding = findNextSelectedResult;
value = -1;
value = findNextSelectedResultBinding(a0, value6 ? length : value, a2, r5);
r1 = value;
} else if (a2[value].type !== AutocompleterResultTypes.HEADER) {
r1 = value;
} else {
value = findNextSelectedResult(a0, value, a2, r5);
r1 = value;
}
return r1;
}
return value;
}
+16
View File
@@ -0,0 +1,16 @@
/* Metro module 7234; source: modules/autocompleter/index.tsx; dependencies: [2, 7235, 6587, 7240, 7241, 6591] */
function _fun57998(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7412:6, offset: 0x016bc8fc, size: 198 bytes, params: 8, frame: 23
var propertyName;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/autocompleter/index.tsx');
exports.default = importDefault(7235) /* metro dependency 7235: Autocompleter */;
value = require(6587) /* metro dependency 6587: AutocompleterConstants */;
for (propertyName in value) {
exports[propertyName] = value[propertyName];
}
exports.createHeaderResult = (require(7240) /* metro dependency 7240: createAutocompleterResult */).createHeaderResult;
exports.findNextSelectedResult = importDefault(7241) /* metro dependency 7241: findNextSelectedResult */;
exports.sortByMatchScore = importDefault(6591) /* metro dependency 6591: sortByMatchScore */;
}
@@ -0,0 +1,225 @@
/* Metro module 11855; source: modules/autocompleter/native/Autocomplete.tsx; dependencies: [31, 27, 1867, 3793, 1878, 661, 11018, 33, 4501, 697, 7972, 566, 3995, 1305, 9210, 6238, 6246, 1244, 8366, 6647, 4805, 4573, 5475, 11856, 11049, 5278, 10970, 22, 2] */
function _fun90879(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12041:6, offset: 0x0204a4b2, size: 843 bytes, params: 8, frame: 25
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_8 = value.ChannelTypes;
const Fonts = value.Fonts;
const AUTOCOMPLETE_ROW_HEIGHT = (require(11018) /* metro dependency 11018: ApplicationCommandsConstants */).AUTOCOMPLETE_ROW_HEIGHT;
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {height: AUTOCOMPLETE_ROW_HEIGHT, paddingVertical: 0};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
object3.row = object4;
const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
object3.leading = {fontSize: 16, color: INTERACTIVE_TEXT_ACTIVE, fontFamily: PRIMARY_SEMIBOLD};
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object3.trailing = {fontSize: 14, color: TEXT_MUTED};
const PRIMARY_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_400;
object3.username = {color: PRIMARY_400};
object3.emoji = {'width': 32, 'height': 32};
object3.emojiImage = {resizeMode: 'contain'};
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object3.emojiText = {'lineHeight': 32, 'fontSize': 27, 'textAlign': 'center', color: TEXT_DEFAULT};
const object5 = {'width': 56, 'height': 56, 'marginHorizontal': 4, 'justifyContent': 'center',
'alignItems': 'center'};
const BACKGROUND_MOD_NORMAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_NORMAL;
object5.backgroundColor = BACKGROUND_MOD_NORMAL;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.stickerContainer = object5;
object3.commandChoiceLoadingContainer = {'flex': 1, 'justifyContent': 'center'};
const object6 = {};
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object6.backgroundColor = BACKGROUND_MOD_MUTED;
object6.height = 16;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object6.alignSelf = 'flex-start';
object3.commandChoiceLoadingItem = object6;
object3.autocompleteIcon = {opacity: 0.6};
const env0_10 = Reflect.apply(createStyles, value, [object3]);
object3 = {User: User_90881, Global: Global, Role: Role_90884, Channel: Channel_90885, Emoji: Emoji_90886,
EmojiPremiumUpsell: EmojiPremiumUpsell, Choice: Choice, ChoiceLoading: ChoiceLoading, Sticker: Sticker,
Label: Label_90892};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/autocompleter/native/Autocomplete.tsx');
exports.default = object3;
exports.AUTOCOMPLETE_STICKER_NODE_SIZE = 56;
exports.AUTOCOMPLETE_STICKER_NODE_MARGIN = 4;
}
function AutocompleteLabel(a0) { // fn#90880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12041:1127, offset: 0x0204a7fd, size: 81 bytes, params: 2, frame: 15
const styles = useStyles();
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
const Label = FormRow.Label;
return <Label style={styles.leading} text={a0.text} />;
}
function User_90881({user, nick, status, guildId, onPress}) { // fn#90881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12041:1242, offset: 0x0204a84e, size: 391 bytes, params: 2, frame: 25
var object2;
const styles = useStyles();
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RelationshipStore], _fun90882);
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
object2 = {DEPRECATED_style: styles.row, onPress: onPress, accessibilityRole: 'menuitem'};
let r10 = nick ?? value2;
r10 = r10 ?? (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(user);
object2.label = <AutocompleteLabel text={r10} />;
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const SMALL = AvatarSizes.SMALL;
object2.leading = <Avatar status={status} user={user} size={SMALL} guildId={guildId} autoStatusCutout />;
const discordTag = importDefault(9210) /* metro dependency 9210: DiscordTag */;
const username = styles.username;
object2.trailing = ((Component) => <Component user={user} usernameStyle={[styles.trailing,
username]} discriminatorStyle={styles.trailing} />)(discordTag);
return <FormRow {...object2} />;
}
function Global({text, description, onPress}) { // fn#90883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12041:1759, offset: 0x0204aa02, size: 140 bytes, params: 2, frame: 21
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const tableRowProps = {onPress: onPress, accessibilityRole: 'menuitem', label: <AutocompleteLabel text={text} />};
const TableRowTrailingText = (require(6246) /* metro dependency 6246: TableRowTrailingTextNative */).TableRowTrailingText;
tableRowProps.trailing = <TableRowTrailingText text={description} />;
return <TableRow {...tableRowProps} />;
}
function Role_90884({onPress, showDescription, name, colorString}) { // fn#90884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12041:1949, offset: 0x0204aa8e, size: 311 bytes, params: 2, frame: 23
var r7;
var intl;
const styles = useStyles();
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object2 = {onPress: onPress, accessibilityRole: 'menuitem'};
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
const Label = FormRow.Label;
object2.label = <Label style={[styles.leading,
colorString != null ? {color: colorString} : undefined]} text={'@' + name} />;
const TableRowTrailingText = (require(6246) /* metro dependency 6246: TableRowTrailingTextNative */).TableRowTrailingText;
if (showDescription) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r7 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.HrUmDH);
} else {
r7 = '';
}
object2.trailing = <TableRowTrailingText text={r7} />;
return <TableRow {...object2} />;
}
function Channel_90885({channel, category, onPress}) { // fn#90885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12041:2276, offset: 0x0204abc5, size: 364 bytes, params: 2, frame: 23
const styles = useStyles();
const getGuild = GuildStore.getGuild;
const getGuildId = channel.getGuildId;
const value2 = Reflect.apply(getGuild, GuildStore, [Reflect.apply(getGuildId, channel, [])]);
const type = channel.type;
const GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
const r6 = type === GUILD_CATEGORY ? importDefault(8366) /* metro dependency 8366 */ : (require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIconWithGuild(channel,
value2);
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const icon = <Icon source={r6} style={styles.autocompleteIcon} />;
const useChannelNameModule = require(4805) /* metro dependency 4805: useChannelName */;
const channelName = useChannelNameModule.computeChannelName(channel, UserStore, RelationshipStore);
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
const formRowProps = {onPress: onPress, accessibilityRole: 'menuitem', leading: icon,
label: <AutocompleteLabel text={channelName} />};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
formRowProps.trailing = <Text style={styles.trailing} variant="text-sm/medium" color="text-muted">{category != null && category.name}</Text>;
return <FormRow {...formRowProps} />;
}
function Emoji_90886({name, url, surrogates, onPress}) { // fn#90886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12041:2754, offset: 0x0204ad31, size: 299 bytes, params: 2, frame: 21
var r5;
const styles = useStyles();
if (url !== '') {
r5 = ((Component) => <Component style={[styles.emoji,
styles.emojiImage]} source={{uri: url}} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
} else {
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
r5 = <LegacyText style={[styles.emoji, styles.emojiText]} allowFontScaling={false}>{surrogates}</LegacyText>;
}
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
return (
<FormRow
onPress={onPress}
accessibilityRole="menuitem"
leading={r5}
label={<AutocompleteLabel text={':' + name + ':'} />}
/>
);
}
function EmojiPremiumUpsell({results, onPress}) { // fn#90887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12041:3100, offset: 0x0204ae5c, size: 110 bytes, params: 2, frame: 18
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
return (
<FormRow
onPress={onPress}
accessibilityRole="menuitem"
label={((Component) => <Component results={results} />)(importDefault(11856) /* metro dependency 11856: ChannelAutocompleteEmojiUpsell */)}
/>
);
}
function Choice({choice, onPress}) { // fn#90888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12041:3223, offset: 0x0204aeca, size: 102 bytes, params: 2, frame: 17
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
return (
<FormRow
onPress={onPress}
accessibilityRole="menuitem"
label={<AutocompleteLabel text={choice.displayName} />}
/>
);
}
function ChoiceLoading() { // fn#90889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12041:3370, offset: 0x0204af30, size: 167 bytes, params: 1, frame: 21
const styles = useStyles();
const value2 = env0_3.useMemo(_fun90890, []);
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
return (
<FormRow
DEPRECATED_style={styles.row}
leading={<View style={styles.commandChoiceLoadingContainer}><View style={[styles.commandChoiceLoadingItem,
{width: value2}]} /></View>}
/>
);
}
function Sticker({sticker, onPress, onLongPress, isInteracting}) { // fn#90891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12041:3627, offset: 0x0204b007, size: 191 bytes, params: 2, frame: 21
const styles = useStyles();
const value2 = (require(11049) /* metro dependency 11049: StickersHooks */).useShouldAnimateSticker(isInteracting);
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
return (
<PressableOpacity
accessibilityRole="menuitem"
style={styles.stickerContainer}
onPress={onPress}
onLongPress={onLongPress}
pointerEvents="box-only"
>
{((Component) => <Component sticker={sticker} size={40} animated={value2} />)(importDefault(10970) /* metro dependency 10970: Sticker */)}
</PressableOpacity>
);
}
function Label_90892({label}) { // fn#90892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12041:3931, offset: 0x0204b0c6, size: 77 bytes, params: 2, frame: 17
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
return <FormRow label={<AutocompleteLabel text={label} />} />;
}
function _fun90882() { // fn#90882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12041:1338, offset: 0x0204a9d5, size: 45 bytes, params: 1, frame: 12
const guildIdBinding = guildId;
const value2 = null;
return value2 == guildIdBinding ? RelationshipStore.getNickname(user.id) : value2;
}
function _fun90890() { // fn#90890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12041:3418, offset: 0x0204afd7, size: 48 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (importDefault(22) /* metro dependency 22 */).random(100, 300);
}
@@ -0,0 +1,349 @@
/* Metro module 11085; source: modules/autocompleter/native/AutocompleteOptions.tsx; dependencies: [7167, 7168, 6583, 1379, 1945, 1867, 661, 5066, 6625, 11086, 1881, 22, 8050, 6526, 11050, 6943, 1423, 1244, 2] */
function _fun84865(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11271:6, offset: 0x01f5a285, size: 425 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const applicationCommandAutocompleteStore = importDefault(7167) /* metro dependency 7167: ApplicationCommandAutocompleteStore */;
const applicationCommandStore = importDefault(7168) /* metro dependency 7168: ApplicationCommandStore */;
const stickersStore = importDefault(6583) /* metro dependency 6583: StickersStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_9 = value.AutoCompleteResultTypes;
const env0_10 = value.MAX_AUTOCOMPLETE_RESULTS;
const AUTOCOMPLETE_OPTION_DEBOUNCE_TIME = (require(5066) /* metro dependency 5066: ApplicationCommandConstants */).AUTOCOMPLETE_OPTION_DEBOUNCE_TIME;
value = require(6625) /* metro dependency 6625: ChannelAutocompleteConstants */;
const env0_11 = value.MENTION_SENTINEL;
const env0_12 = value.EMOJI_SENTINEL;
const env0_13 = value.CHANNEL_SENTINEL;
const env0_14 = value.COMMAND_SENTINEL;
const env0_15 = (require(11086) /* metro dependency 11086: ChannelAutocompleteConstants */).AutocompleteTypes;
value = require(1881) /* metro dependency 1881: EmojiConstants */;
const env0_16 = value.EmojiIntention;
const env0_17 = value.EMOJI_MAX_LENGTH;
const env0_18 = value.EMOJI_URL_BASE_SIZE;
value = importDefault(22) /* metro dependency 22 */;
const env0_20 = value.debounce(importDefault(8050) /* metro dependency 8050: executeCommand */,
AUTOCOMPLETE_OPTION_DEBOUNCE_TIME, {'leading': true, 'trailing': true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/autocompleter/native/AutocompleteOptions.tsx');
exports.getAutocompleteOptions = getAutocompleteOptions;
}
function getAutocompleteOptions(a0) { // fn#84866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11271:636, offset: 0x01f5a42e, size: 312 bytes, params: 2, frame: 8
const value = a1;
const value2 = a2;
const env0_0 = a0;
const env0_1 = value !== undefined ? value : false;
const env0_2 = !(value2 !== undefined) || value2;
const MENTIONS = AutocompleteTypes.MENTIONS;
const CHANNELS = AutocompleteTypes.CHANNELS;
const EMOJIS_AND_STICKERS = AutocompleteTypes.EMOJIS_AND_STICKERS;
const SLASHES = AutocompleteTypes.SLASHES;
const SLASHES_DISCOVERY = AutocompleteTypes.SLASHES_DISCOVERY;
const CHOICES = AutocompleteTypes.CHOICES;
return {[MENTIONS]: {stores: [GuildMemberStore], queryResults: queryResults, matches: function(a0, a1) {
return importDefault(dependencyMap[13]).matchSentinel(a0, a1, MENTION_SENTINEL);
}}, [CHANNELS]: {queryResults: queryResults_84872, matches: matches_84874},
[EMOJIS_AND_STICKERS]: {queryResults: queryResults_84875, matches: matches_84879},
[SLASHES]: {queryResults: function() {
return [];
}, matches: matches_84881}, [SLASHES_DISCOVERY]: {queryResults: function() {
return [];
}, matches: matches_84883}, [CHOICES]: {stores: [ApplicationCommandStore, ApplicationCommandAutocompleteStore],
queryResults: queryResults_84884, matches: function() {
return false;
}}};
}
function getAutocompleteOptionsQueryResults(a0, a1, a2) { // fn#84867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11271:678, owner: getAutocompleteOptions.queryResults, offset: 0x01f5a566, size: 324 bytes, params: 4, frame: 20
var environment;
let value = environment.__proto__;
const value2 = undefined;
const defaultImport = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
const value4 = a1 == null;
const {users, globals, roles} = defaultImport.queryMentionResults({query: a0, channel: env0_0,
canMentionEveryone: a1 == null ? value2 : a1.canMentionEveryone,
canMentionHere: a1 == null ? value2 : a1.canMentionHere,
canMentionUsers: a1 == null ? value2 : a1.canMentionUsers,
canMentionRoles: a1 == null ? value2 : a1.canMentionRoles,
includeAllGuildUsers: value4 ? value2 : a1.canMentionAnyGuildUser,
includeNonMentionableRoles: a1 == null ? value2 : a1.canMentionNonMentionableRoles, request: a2});
value = importDefault(22) /* metro dependency 22 */;
const value6 = users.map(function(a0) {
var object = {};
var USER = AutoCompleteResultTypes.USER;
object.type = USER;
copyDataProperties(object, a0, USER);
return object;
});
items = [];
arraySpread(items, roles.map(function(a0) {
var object = {};
var ROLE = AutoCompleteResultTypes.ROLE;
object.type = ROLE;
copyDataProperties(object, a0, ROLE);
return object;
}), arraySpread(items, globals.map(function(a0) {
var object = {};
var GLOBAL = AutoCompleteResultTypes.GLOBAL;
object.type = GLOBAL;
copyDataProperties(object, a0, GLOBAL);
return object;
}), arraySpread(items, value6, 0, value4), value4), value4);
value = value(items);
return value.value();
}
function getAutocompleteOptionsQueryResults_84872(a0, a1) { // fn#84872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11271:1329, owner: getAutocompleteOptions.queryResults, offset: 0x01f5a739, size: 176 bytes, params: 3, frame: 15
var environment;
var r0;
var value2;
var value4;
let value = undefined;
if (a1 == null) {
value2 = environment.__proto__;
value = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
value = value.queryChannelResults({query: a0, channel: env0_0});
r0 = value;
} else if (a1.isActiveApplicationCommand) {
value4 = environment.__proto__;
value = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
value = value.queryApplicationCommandChannelResults({query: a0, channel: env0_0,
channelTypes: a1 == null ? value : a1.channelTypes});
r0 = value;
} else {
value2 = environment.__proto__;
value = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
value = value.queryChannelResults({query: a0, channel: env0_0});
r0 = value;
}
return r0.channels.map(function(a0) {
var object = {};
object.type = AutoCompleteResultTypes.CHANNEL;
object.channel = a0;
object.category = ChannelStore.getChannel(a0.parent_id);
return object;
});
}
function getAutocompleteOptionsMatches_84874(a0, a1) { // fn#84874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11271:1654, owner: getAutocompleteOptions.matches, offset: 0x01f5a81d, size: 73 bytes, params: 3, frame: 16
var r0;
var value;
if (value) {
r0 = !env0_0.isPrivate();
} else {
value = environment.__proto__;
value = (importDefault(6526) /* metro dependency 6526: AutocompleteUtils */).matchSentinel(a0, a1,
CHANNEL_SENTINEL);
r0 = value;
}
return r0;
}
function getAutocompleteOptionsQueryResults_84875(a0, a1) { // fn#84875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11271:1733, owner: getAutocompleteOptions.queryResults, offset: 0x01f5a866, size: 422 bytes, params: 3, frame: 22
var r5;
var binding;
var defaultImport2;
var queryStickers;
let r11 = env0_2 ? 0 : 40;
const defaultImport = importDefault(dependencyMap[13]);
const queryEmojiResults = defaultImport.queryEmojiResults;
const CHAT = EmojiIntention.CHAT;
const value5 = Reflect.apply(queryEmojiResults, defaultImport, [{query: a0, channel: env0_0, intention: CHAT,
maxCount: MAX_AUTOCOMPLETE_RESULTS + r11}]);
const r2 = a1 == null ? [] : a1.includeEmojiPremiumUpsell && value5.emojis.locked.length > 0 && value5.emojis.unlocked.length < 4 ? [{type: AutoCompleteResultTypes.EMOJI_PREMIUM_UPSELL,
results: value5.emojis.locked}] : [];
if (env0_2) {
binding = env1_19;
if (!(binding || StickersStore.hasLoadedStickerPacks)) {
require(dependencyMap[14]).fetchStickerPacks();
r11 = dependencyMap;
}
defaultImport2 = importDefault(dependencyMap[13]);
queryStickers = defaultImport2.queryStickers;
binding = env0_0;
r5 = Reflect.apply(queryStickers, defaultImport2, [[a0], true, [binding, function(a0, a1) {
var SENDABLE = require(dependencyMap[15]).StickerSendability.SENDABLE;
return a1 === SENDABLE;
}]]);
} else {
r5 = [];
}
let value = r5.map(function({sticker}) {
return {type: AutoCompleteResultTypes.STICKER, name: sticker.name, sticker: sticker};
});
items = [];
value = arraySpread(items, value, 0, r11);
const unlocked = value5.emojis.unlocked;
arraySpread(items, r2, arraySpread(items, unlocked.map(_fun84878), value, r11), r11);
return items;
}
function getAutocompleteOptionsMatches_84879(a0, a1) { // fn#84879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11271:2428, owner: getAutocompleteOptions.matches, offset: 0x01f5aaf3, size: 76 bytes, params: 3, frame: 14
const value = environment.__proto__;
return a0 === EMOJI_SENTINEL && (!(a1.length < 2 || a1.length > EMOJI_MAX_LENGTH) && !a1.includes(EMOJI_SENTINEL));
}
function getAutocompleteOptionsMatches_84881(a0, a1, a2) { // fn#84881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11271:2528, owner: getAutocompleteOptions.matches, offset: 0x01f5ab3f, size: 56 bytes, params: 4, frame: 4
var r0;
let value = a2 === 0;
if (value) {
value = environment.__proto__;
value = a0 === COMMAND_SENTINEL;
r0 = value;
} else {
r0 = value;
}
r0 = r0 && !(env0_1 && a1.length === 0);
return r0;
}
function getAutocompleteOptionsMatches_84883(a0, a1, a2) { // fn#84883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11271:2622, owner: getAutocompleteOptions.matches, offset: 0x01f5ab77, size: 55 bytes, params: 4, frame: 3
var value;
let r0 = env0_1 && a2 === 0;
if (r0) {
value = environment.__proto__;
value = a0 === COMMAND_SENTINEL;
r0 = value;
}
r0 = r0 && a1.length === 0;
return r0;
}
function getAutocompleteOptionsQueryResults_84884(a0, a1) { // fn#84884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11271:2688, owner: getAutocompleteOptions.queryResults, offset: 0x01f5abae, size: 492 bytes, params: 3, frame: 22
var environment;
var choices;
var r3;
var r0;
var value;
var value2;
var object2;
var value3;
var getGuild;
var binding;
var value5;
var binding2;
var name;
var getAutocompleteChoices;
var id;
var value6;
var intl;
var array;
if (a1 == null) {
choices = a1?.choices;
} else {
var option = a1.option;
if (option == null) {
value = undefined;
choices = a1 == null ? value : a1.choices;
if (choices == null) {
r3 = [];
} else {
value2 = environment.__proto__;
value = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
choices = value.queryChoiceResults({query: a0, choices: choices}).choices;
value = choices.map(function(a0) {
return {type: AutoCompleteResultTypes.CHOICE, choice: a0};
});
r3 = value;
}
return r3;
}
if (option.autocomplete) {
value = undefined;
if ((a1 == null ? value : a1.activeCommand) == null) {
value = undefined;
choices = a1 == null ? value : a1.choices;
if (choices == null) {
r3 = [];
} else {
value2 = environment.__proto__;
value = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
choices = value.queryChoiceResults({query: a0, choices: choices}).choices;
value = choices.map(function(a0) {
return {type: AutoCompleteResultTypes.CHOICE, choice: a0};
});
r3 = value;
}
return r3;
}
if ((a1 == null ? value : a1.optionValues) != null) {
value3 = environment.__proto__;
getGuild = GuildStore.getGuild;
binding = env0_0;
value5 = Reflect.apply(getGuild, GuildStore, [binding.guild_id]);
binding2 = env1_20;
object2 = {};
object2.command = a1.activeCommand;
object2.optionValues = a1.optionValues;
option = a1.option;
name = option.name;
object2.context = {channel: binding, guild: value5, autocomplete: {name: name, query: a0}};
binding2(object2);
getAutocompleteChoices = ApplicationCommandAutocompleteStore.getAutocompleteChoices;
id = binding.id;
option = a1.option;
name = option.name;
value6 = Reflect.apply(getAutocompleteChoices, ApplicationCommandAutocompleteStore, [id, name, a0]);
if (value6 == null) {
array = new global.Array(4);
array = array.fill({type: AutoCompleteResultTypes.CHOICE_LOADING});
r0 = array;
} else if (value6.length === 0) {
object2 = {};
object2.type = AutoCompleteResultTypes.LABEL;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['41014u']);
r0 = [object2];
} else {
r0 = value6.map(_fun84885);
}
return r0;
}
value = undefined;
choices = a1 == null ? value : a1.choices;
if (choices == null) {
r3 = [];
} else {
value2 = environment.__proto__;
value = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
choices = value.queryChoiceResults({query: a0, choices: choices}).choices;
value = choices.map(_fun84886);
r3 = value;
}
return r3;
}
choices = a1?.choices;
}
if (choices == null) {
r3 = [];
} else {
value2 = environment.__proto__;
value = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
choices = value.queryChoiceResults({query: a0, choices: choices}).choices;
value = choices.map(function(a0) {
return {type: AutoCompleteResultTypes.CHOICE, choice: a0};
});
r3 = value;
}
return r3;
}
function _fun84878(a0) { // fn#84878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11271:2257, offset: 0x01f5aa66, size: 141 bytes, params: 2, frame: 17
const object2 = {};
const value = environment.__proto__.__proto__;
const EMOJI = AutoCompleteResultTypes.EMOJI;
object2.type = EMOJI;
object2.name = a0.name;
object2.url = a0.id != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getEmojiURL({id: a0.id,
animated: a0.animated, size: EMOJI_URL_BASE_SIZE}) : a0.url;
object2.surrogates = a0.id == null ? a0.surrogates : undefined;
return object2;
}
function _fun84885(a0) { // fn#84885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11271:3192, offset: 0x01f5ad9a, size: 29 bytes, params: 2, frame: 2
const CHOICE = AutoCompleteResultTypes.CHOICE;
return {type: CHOICE, choice: a0};
}
@@ -0,0 +1,228 @@
/* Metro module 11017; source: modules/autocompleter/native/AutocompleteUtils.tsx; dependencies: [31, 27, 1383, 1935, 3793, 1878, 661, 11018, 6625, 33, 4501, 697, 4805, 6526, 3995, 7331, 2] */
function _fun84394(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11203:6, offset: 0x01f482fc, size: 479 bytes, params: 8, frame: 23
const env0_0 = require;
const closure = getMentionTextWithUser;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const StyleSheet = (require(27) /* metro dependency 27 */).StyleSheet;
const env0_3 = (require(1383) /* metro dependency 1383: ChannelRecord */).isGuildSelectableChannelType;
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AutoCompleteResultTypes;
let value = require(11018) /* metro dependency 11018: ApplicationCommandsConstants */;
const env0_8 = value.AUTOCOMPLETE_EMOJI_ROW_HEIGHT;
const env0_9 = value.AUTOCOMPLETE_ROW_HEIGHT;
value = require(6625) /* metro dependency 6625: ChannelAutocompleteConstants */;
const env0_10 = value.CHANNEL_SENTINEL;
const env0_11 = value.EMOJI_SENTINEL;
const env0_12 = value.MENTION_SENTINEL;
const env0_13 = (require(33) /* metro dependency 33 */).jsx;
const env0_14 = StyleSheet.hairlineWidth;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
const env0_15 = Reflect.apply(createStyles, value, [{itemDivider: {marginLeft: 16,
backgroundColor: BORDER_SUBTLE}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/autocompleter/native/AutocompleteUtils.tsx');
exports.getItemLayout = getItemLayout;
exports.getAutocompleteResultText = getAutocompleteResultText;
exports.getMentionTextWithUser = closure;
exports.getItemSeparator = getItemSeparator;
exports.getPrefix = function(a0) {
return a0[0];
};
exports.getQuery = function(a0) {
return a0.slice(1).toLowerCase();
};
}
function getMentionTextWithUser(a0, a1) { // fn#84395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11203:504, offset: 0x01f484db, size: 136 bytes, params: 3, frame: 15
var r0;
var value;
if ((importDefault(6526) /* metro dependency 6526: AutocompleteUtils */).hasSameRoleAsUsername(a0, a1)) {
r0 = '' + MENTION_SENTINEL + a1.tag;
} else {
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
value = value.getUserTag(a1);
value = '' + MENTION_SENTINEL + value;
r0 = value;
}
return r0;
}
function AutocompleteFormDivider() { // fn#84396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11203:631, offset: 0x01f48563, size: 57 bytes, params: 1, frame: 15
const styles = useStyles();
return ((Component) => <Component style={styles.itemDivider} />)(importDefault(7331) /* metro dependency 7331: FormDivider */);
}
function getItemLayout(a0, a1) { // fn#84397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11203:818, offset: 0x01f4859c, size: 123 bytes, params: 3, frame: 16
const type = a0 == null || a0[a1] == null ? undefined : a0[a1].type;
const EMOJI = AutoCompleteResultTypes.EMOJI;
const r3 = type === EMOJI ? AUTOCOMPLETE_EMOJI_ROW_HEIGHT : AUTOCOMPLETE_ROW_HEIGHT;
const value2 = a1 * r3;
const Math = global.Math;
return {length: r3, offset: value2 + Math.max(0, (a1 - 1) * hairlineWidth), index: a1};
}
function getAutocompleteResultText(a0, a1, a2) { // fn#84398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11203:973, offset: 0x01f48617, size: 728 bytes, params: 4, frame: 21
var name;
var r5;
var type;
var channel;
var guildId;
var isGuildSelectableChannelTypeBinding;
var moduleValue;
var computeChannelName;
var moduleValue2;
var moduleValue3;
var escapeChannelName;
var moduleValue4;
if (a2 == null) {
type = a0.type;
if (AutoCompleteResultTypes.USER === type) {
return getMentionTextWithUser(a1, a0.user);
}
if (AutoCompleteResultTypes.GLOBAL === type) {
return a0.text;
}
if (AutoCompleteResultTypes.ROLE === type) {
return '' + MENTION_SENTINEL + a0.name;
}
if (AutoCompleteResultTypes.CHANNEL === type) {
channel = a0.channel;
if (channel.isThread()) {
moduleValue3 = require(4805) /* metro dependency 4805: useChannelName */;
escapeChannelName = moduleValue3.escapeChannelName;
moduleValue4 = require(4805) /* metro dependency 4805: useChannelName */;
return '#"' + Reflect.apply(escapeChannelName, moduleValue3,
[moduleValue4.computeChannelName(a0.channel,
UserStore,
RelationshipStore)]) + '"';
}
channel = a0.channel;
guildId = channel.getGuildId();
if (guildId == null) {
moduleValue = require(4805) /* metro dependency 4805: useChannelName */;
return '' + CHANNEL_SENTINEL + moduleValue.computeChannelName(a0.channel, UserStore, RelationshipStore);
}
isGuildSelectableChannelTypeBinding = isGuildSelectableChannelType;
channel = a0.channel;
if (isGuildSelectableChannelTypeBinding(channel.type)) {
name = GuildChannelStore.getTextChannelNameDisambiguations(guildId)[a0.channel.id]?.name;
if (name != null) {
r5 = name;
} else {
moduleValue2 = require(4805) /* metro dependency 4805: useChannelName */;
r5 = moduleValue2.computeChannelName(a0.channel, UserStore, RelationshipStore);
}
return '' + CHANNEL_SENTINEL + r5;
}
moduleValue = require(4805) /* metro dependency 4805: useChannelName */;
computeChannelName = moduleValue.computeChannelName;
channel = a0.channel;
return '' + CHANNEL_SENTINEL + Reflect.apply(computeChannelName, moduleValue, [channel, UserStore,
RelationshipStore]);
}
if (AutoCompleteResultTypes.EMOJI === type) {
return '' + EMOJI_SENTINEL + a0.name + ':';
}
if (AutoCompleteResultTypes.EMOJI_PREMIUM_UPSELL === type) {
return '';
}
if (AutoCompleteResultTypes.SLASH === type) {
return '';
}
if (AutoCompleteResultTypes.CHOICE === type) {
return '' + a0.choice.displayName;
}
if (AutoCompleteResultTypes.STICKER === type) {
return '';
}
if (AutoCompleteResultTypes.CHOICE_LOADING === type) {
return '';
}
if (AutoCompleteResultTypes.LABEL === type) {
return '';
}
return undefined;
}
const has = a2.has;
type = a0.type;
if (Reflect.apply(has, a2, [type])) {
type = a0.type;
if (AutoCompleteResultTypes.USER === type) {
return getMentionTextWithUser(a1, a0.user);
}
if (AutoCompleteResultTypes.GLOBAL === type) {
return a0.text;
}
if (AutoCompleteResultTypes.ROLE === type) {
return '' + MENTION_SENTINEL + a0.name;
}
if (AutoCompleteResultTypes.CHANNEL === type) {
channel = a0.channel;
if (channel.isThread()) {
moduleValue3 = require(4805) /* metro dependency 4805: useChannelName */;
escapeChannelName = moduleValue3.escapeChannelName;
moduleValue4 = require(4805) /* metro dependency 4805: useChannelName */;
return '#"' + Reflect.apply(escapeChannelName, moduleValue3,
[moduleValue4.computeChannelName(a0.channel,
UserStore,
RelationshipStore)]) + '"';
}
channel = a0.channel;
guildId = channel.getGuildId();
if (guildId == null) {
moduleValue = require(4805) /* metro dependency 4805: useChannelName */;
return '' + CHANNEL_SENTINEL + moduleValue.computeChannelName(a0.channel, UserStore, RelationshipStore);
}
isGuildSelectableChannelTypeBinding = isGuildSelectableChannelType;
channel = a0.channel;
if (isGuildSelectableChannelTypeBinding(channel.type)) {
name = GuildChannelStore.getTextChannelNameDisambiguations(guildId)[a0.channel.id]?.name;
if (name != null) {
r5 = name;
} else {
moduleValue2 = require(4805) /* metro dependency 4805: useChannelName */;
r5 = moduleValue2.computeChannelName(a0.channel, UserStore, RelationshipStore);
}
return '' + CHANNEL_SENTINEL + r5;
}
moduleValue = require(4805) /* metro dependency 4805: useChannelName */;
computeChannelName = moduleValue.computeChannelName;
channel = a0.channel;
return '' + CHANNEL_SENTINEL + Reflect.apply(computeChannelName, moduleValue, [channel, UserStore,
RelationshipStore]);
}
if (AutoCompleteResultTypes.EMOJI === type) {
return '' + EMOJI_SENTINEL + a0.name + ':';
}
if (AutoCompleteResultTypes.EMOJI_PREMIUM_UPSELL === type) {
return '';
}
if (AutoCompleteResultTypes.SLASH === type) {
return '';
}
if (AutoCompleteResultTypes.CHOICE === type) {
return '' + a0.choice.displayName;
}
if (AutoCompleteResultTypes.STICKER === type) {
return '';
}
if (AutoCompleteResultTypes.CHOICE_LOADING === type) {
return '';
}
if (AutoCompleteResultTypes.LABEL === type) {
return '';
}
return undefined;
}
return '';
}
function getItemSeparator() { // fn#84399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11203:1839, offset: 0x01f488ef, size: 23 bytes, params: 1, frame: 13
return <AutocompleteFormDivider />;
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,118 @@
/* Metro module 7239; source: modules/autocompleter/native/UserSearch.worker.tsx; dependencies: [6, 7, 15, 17, 18, 27, 2] */
function _fun58211(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#58211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7417:6, offset: 0x016c1d35, size: 206 bytes, params: 8, frame: 14
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
let value = require(27) /* metro dependency 27 */;
const NativeModules = value.NativeModules;
const NativeEventEmitter = value.NativeEventEmitter;
const env0_5 = NativeModules.UserSearchWorkerManager;
value = _fun58215(NativeEventEmitter);
value = new value();
module.exports = value;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/autocompleter/native/UserSearch.worker.tsx');
}
function _isNativeReflectConstruct_58212() { // fn#58212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7417:149, offset: 0x016c1e03, 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_58212_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun58215(a0) { // fn#58215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7417:376, offset: 0x016c1e61, size: 137 bytes, params: 2, frame: 16
const closure = UserSearchWorker;
env0_4(closure, a0);
return env0_1(closure, [{key: 'postMessage', value: value_58219}, {key: 'addEventListener', value: function(a0,
a1) {
if (a0 === 'message') {
if (this.subscription == null) {
this.subscription = this.addListener('ReturnResults', this.handleCallback);
}
this.handlers.add(a1);
}
}}, {key: 'removeEventListener', value: function(a0, a1) {
var property;
if (a0 === 'message') {
property = this.handlers;
property.delete(a1);
if (this.handlers.size === 0) {
property = this.subscription;
if (property != null) {
property.remove();
}
this.subscription = null;
}
}
}}, {key: 'terminate', value: function() {
UserSearchWorkerManager.terminate();
}}]);
}
function UserSearchWorker() { // fn#58216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7417:388, offset: 0x016c1eea, size: 175 bytes, params: 1, frame: 20
var environment;
let value = environment.__proto__;
env1_0(this, UserSearchWorker);
const items2 = [UserSearchWorkerManager];
const value3 = env1_3(UserSearchWorker);
value = env1_2(this, _isNativeReflectConstruct_58212() ? global.Reflect.construct(value3, items2,
env1_3(this).constructor) : value3.apply(this, items2));
const Set = global.Set;
const value4 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
value.handlers = set instanceof Object ? set : value4;
value.subscription = null;
value.handleCallback = function(a0) {
a0.handlers.forEach(_fun58218);
};
return value;
}
function value_58219(a0) { // fn#58219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7417:789, offset: 0x016c1fdb, size: 81 bytes, params: 2, frame: 13
var value;
var onmessage;
var JSON;
if (a0) {
value = environment.__proto__;
onmessage = UserSearchWorkerManager.onmessage;
JSON = global.JSON;
Reflect.apply(onmessage, UserSearchWorkerManager, [JSON.stringify(a0)]);
return undefined;
}
const Error = global.Error;
throw new Error('Invalid data');
}
function UserSearchWorkerHandleCallback(a0) { // fn#58217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7417:671, owner: UserSearchWorker.handleCallback, offset: 0x016c1f99, size: 41 bytes, params: 2, frame: 11
a0.handlers.forEach(_fun58218);
}
function _fun58218(a0) { // fn#58218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7417:695, offset: 0x016c1fc2, size: 25 bytes, params: 2, frame: 11
return a0({data: env0_0});
}
@@ -0,0 +1,36 @@
/* Metro module 11860; source: modules/autocompleter/native/useAutocompleteAnimatedHeightStyles.tsx; dependencies: [4016, 4017, 4504, 4507, 2] */
function _fun90932(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12046:6, offset: 0x0204cad6, size: 112 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object = {code: "function useAutocompleteAnimatedHeightStylesTsx1(){const{withTiming,height,timingStandard,isFrozenSharedValue}=this.__closure;return{height:withTiming(height,timingStandard),display:!isFrozenSharedValue.get()?'flex':'none'};}"};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/autocompleter/native/useAutocompleteAnimatedHeightStyles.tsx');
exports.default = useAutocompleteAnimatedHeightStyles;
}
function useAutocompleteAnimatedHeightStyles(a0, a1) { // fn#90933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12046:445, offset: 0x0204cb46, size: 172 bytes, params: 3, frame: 19
const env0_0 = a0;
const value2 = (require(4016) /* metro dependency 4016: ScreenIndexFrozen */).useIsScreenIndexFrozenSharedValue(a1);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = useAutocompleteAnimatedHeightStylesS;
const object2 = {};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.height = a0;
object2.timingStandard = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
object2.isFrozenSharedValue = value2;
closure.__closure = object2;
closure.__workletHash = 3862216441966;
closure.__initData = env0_2;
return Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
}
function useAutocompleteAnimatedHeightStylesS() { // fn#90934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12046:584, owner: useAutocompleteAnimatedHeightStyles.s, offset: 0x0204cbf2, size: 98 bytes, params: 1, frame: 18
const object2 = {};
let value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
object2.height = value.withTiming(env0_0, (require(4507) /* metro dependency 4507: timingPresets */).timingStandard);
object2.display = env0_1.get() ? 'none' : 'flex';
return object2;
}
@@ -0,0 +1,171 @@
/* Metro module 6527; source: modules/autocompleter/record/InAppNavigationRecord.tsx; dependencies: [6, 7, 15, 17, 18, 1886, 661, 6528, 670, 6537, 2] */
function _fun51392(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#51392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6705:6, offset: 0x01233a67, size: 366 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 */;
let value = importDefault(1886) /* metro dependency 1886: Record */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).Routes;
const env0_8 = (require(6528) /* metro dependency 6528: QuestConstants */).RewardFilterTypes;
const env0_9 = (require(670) /* metro dependency 670: UserSettingsConstants */).UserSettingsPath;
value = _fun51396(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/autocompleter/record/InAppNavigationRecord.tsx');
exports.default = value;
exports.InAppNavigationRecord = value;
exports.InAppNavigationType = {SHOP: 'SHOP', SHOP_ORBS_TAB: 'SHOP_ORBS_TAB', NITRO_HOME: 'NITRO_HOME',
QUEST_HOME: 'QUEST_HOME', QUEST_ORBS: 'QUEST_ORBS', APPS_HOME: 'APPS_HOME', SETTINGS: 'SETTINGS',
PLAYGROUND: 'PLAYGROUND'};
}
function _isNativeReflectConstruct_51393() { // fn#51393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6705:230, offset: 0x01233bd5, 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_51393_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun51396(a0) { // fn#51396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6705:656, offset: 0x01233c33, size: 73 bytes, params: 2, frame: 16
const closure = InAppNavigationRecord;
env0_6(closure, a0);
return env0_3(closure, null, [{key: 'fromType', value: value_51398}]);
}
function InAppNavigationRecord(a0) { // fn#51397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6705:668, offset: 0x01233c7c, size: 232 bytes, params: 2, frame: 20
let value = environment.__proto__;
env1_2(this, InAppNavigationRecord);
const value3 = env1_5(InAppNavigationRecord);
value = env1_4(this, _isNativeReflectConstruct_51393() ? global.Reflect.construct(value3, [],
env1_5(this).constructor) : value3.apply(this, undefined));
value.id = a0.collectionId != null ? '' + a0.type + '_' + a0.collectionId : a0.type;
value.path = a0.path;
value.type = a0.type;
value.label = a0.label;
value.collectionId = a0.collectionId;
const IconComponent = a0.IconComponent;
value.IconComponent = IconComponent;
return value;
}
function value_51398(a0, a1, a2, a3, a4) { // fn#51398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6705:1164, offset: 0x01233d64, size: 796 bytes, params: 6, frame: 20
var r4;
var object2;
var inAppNavigationRecord;
let value = a1;
const SHOP = env1_10.SHOP;
if (SHOP === a0) {
object2 = {};
object2.path = Routes.COLLECTIBLES_SHOP;
object2.type = env1_10.SHOP;
value = Object.create(InAppNavigationRecord.prototype, {constructor: {value: InAppNavigationRecord}});
inAppNavigationRecord = new InAppNavigationRecord();
return inAppNavigationRecord instanceof Object ? inAppNavigationRecord : value;
}
let NITRO_HOME = env1_10.NITRO_HOME;
if (NITRO_HOME === a0) {
object2 = {};
NITRO_HOME = Routes.NITRO_HOME;
object2.path = NITRO_HOME;
NITRO_HOME = env1_10.NITRO_HOME;
object2.type = NITRO_HOME;
value = Object.create(InAppNavigationRecord.prototype, {constructor: {value: InAppNavigationRecord}});
inAppNavigationRecord = new InAppNavigationRecord();
return inAppNavigationRecord instanceof Object ? inAppNavigationRecord : value;
}
let QUEST_HOME = env1_10.QUEST_HOME;
if (QUEST_HOME === a0) {
object2 = {};
QUEST_HOME = Routes.QUEST_HOME;
object2.path = QUEST_HOME;
QUEST_HOME = env1_10.QUEST_HOME;
object2.type = QUEST_HOME;
value = Object.create(InAppNavigationRecord.prototype, {constructor: {value: InAppNavigationRecord}});
inAppNavigationRecord = new InAppNavigationRecord();
return inAppNavigationRecord instanceof Object ? inAppNavigationRecord : value;
}
const APPS_HOME = env1_10.APPS_HOME;
if (APPS_HOME === a0) {
object2 = {};
object2.path = Routes.GLOBAL_DISCOVERY_APPS;
object2.type = env1_10.APPS_HOME;
value = Object.create(InAppNavigationRecord.prototype, {constructor: {value: InAppNavigationRecord}});
inAppNavigationRecord = new InAppNavigationRecord();
return inAppNavigationRecord instanceof Object ? inAppNavigationRecord : value;
}
const SETTINGS = env1_10.SETTINGS;
if (SETTINGS === a0) {
object2 = {};
if (value != null) {
r4 = value;
} else {
value = require(6537) /* metro dependency 6537: UserSettingsURLUtils */;
value = value.settingsPathToRoute(UserSettingsPath.ACCOUNT);
r4 = value;
}
object2.path = r4;
object2.label = a2;
object2.type = env1_10.SETTINGS;
value = Object.create(InAppNavigationRecord.prototype, {constructor: {value: InAppNavigationRecord}});
inAppNavigationRecord = new InAppNavigationRecord();
return inAppNavigationRecord instanceof Object ? inAppNavigationRecord : value;
}
const PLAYGROUND = env1_10.PLAYGROUND;
if (PLAYGROUND === a0) {
object2 = {};
object2.path = value ?? Routes.APP;
object2.type = env1_10.PLAYGROUND;
object2.label = a2;
object2.collectionId = a3;
object2.IconComponent = a4;
value = Object.create(InAppNavigationRecord.prototype, {constructor: {value: InAppNavigationRecord}});
inAppNavigationRecord = new InAppNavigationRecord();
return inAppNavigationRecord instanceof Object ? inAppNavigationRecord : value;
}
const SHOP_ORBS_TAB = env1_10.SHOP_ORBS_TAB;
if (SHOP_ORBS_TAB === a0) {
object2 = {};
object2.path = Routes.COLLECTIBLES_SHOP;
object2.type = env1_10.SHOP_ORBS_TAB;
value = Object.create(InAppNavigationRecord.prototype, {constructor: {value: InAppNavigationRecord}});
inAppNavigationRecord = new InAppNavigationRecord();
return inAppNavigationRecord instanceof Object ? inAppNavigationRecord : value;
}
const QUEST_ORBS = env1_10.QUEST_ORBS;
if (QUEST_ORBS === a0) {
object2 = {};
object2.path = '' + Routes.QUEST_HOME + '?filter=' + RewardFilterTypes.VIRTUAL_CURRENCY;
object2.type = env1_10.QUEST_ORBS;
value = Object.create(InAppNavigationRecord.prototype, {constructor: {value: InAppNavigationRecord}});
inAppNavigationRecord = new InAppNavigationRecord();
return inAppNavigationRecord instanceof Object ? inAppNavigationRecord : value;
}
const Error = global.Error;
throw new Error('Unhandled InAppNavigationType');
}
@@ -0,0 +1,30 @@
/* Metro module 6591; source: modules/autocompleter/sortByMatchScore.tsx; dependencies: [2] */
function _fun51864(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#51864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6769:6, offset: 0x012e660d, size: 85 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/autocompleter/sortByMatchScore.tsx');
exports.default = sortByMatchScore;
}
function sortByMatchScore(a0, a1) { // fn#51865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6769:179, offset: 0x012e6662, size: 166 bytes, params: 3, frame: 16
var r2;
var r4;
var value;
if (a0.score === a1.score) {
var sortable = a0.sortable;
r4 = sortable ?? a0.comparator?.toLocaleLowerCase();
value = '';
r2 = r4 ?? value;
sortable = a0.sortable;
r4 = sortable ?? a1.comparator?.toLocaleLowerCase();
var r3 = r4 ?? value;
if (r2 < r3) {
return -1;
}
if (r2 > r3) {
return 1;
}
}
return a1.score - a0.score;
}