1424 lines
63 KiB
TypeScript
1424 lines
63 KiB
TypeScript
/* Metro module 9676; source: modules/search/tokens/SearchTokens.tsx; dependencies: [57, 1379, 1935, 3793, 1934, 3996, 1878, 9677, 9678, 661, 3738, 22, 1244, 4805, 3995, 9675, 9679, 6590, 6526, 7234, 9680, 9681, 2] */
|
|
function _fun75908(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:6, offset: 0x01dbdb0a, size: 928 bytes, params: 8, frame: 24
|
|
const env0_0 = require;
|
|
const makeDateRange = function(a0, a1) {
|
|
var items = [a0];
|
|
items[1] = a0.clone().add(1, a1);
|
|
return items;
|
|
};
|
|
const buildKey = function(a0) {
|
|
return '' + a0 + ':';
|
|
};
|
|
const closure = isValidUserAutocomplete;
|
|
const closure2 = isValidChannelAutocomplete;
|
|
const isValidPinnedAutocomplete = function(a0) {
|
|
var r0;
|
|
var value = a0.getMatch(1);
|
|
if (value === 'true') {
|
|
value = true;
|
|
a0.setData('pinned', value);
|
|
r0 = value;
|
|
} else {
|
|
value = value === 'false';
|
|
if (value) {
|
|
a0.setData('pinned', false);
|
|
r0 = true;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
}
|
|
return r0;
|
|
};
|
|
const closure3 = getUserAutocompletions;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
|
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
|
let value = require(1935) /* metro dependency 1935: GuildChannelStore */;
|
|
const env0_5 = value.GUILD_SELECTABLE_CHANNELS_KEY;
|
|
const env0_6 = value.GUILD_VOCAL_CHANNELS_KEY;
|
|
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
|
|
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
|
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
|
const streamerModeStore = importDefault(3996) /* metro dependency 3996: StreamerModeStore */;
|
|
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
|
const searchAutocompleteStore = importDefault(9677) /* metro dependency 9677: SearchAutocompleteStore */;
|
|
const searchRecentMessageStore = importDefault(9678) /* metro dependency 9678: SearchRecentMessageStore */;
|
|
value = require(661) /* metro dependency 661: Constants */;
|
|
const env0_14 = value.ME;
|
|
const SearchTokenTypes = value.SearchTokenTypes;
|
|
const env0_16 = value.SEARCH_DATE_FORMAT;
|
|
const env0_17 = value.SearchTypes;
|
|
const env0_18 = value.IS_SEARCH_FILTER_TOKEN;
|
|
const env0_19 = value.ID_REGEX;
|
|
let RegExp = global.RegExp;
|
|
let regExp = new RegExp('(?:\\s*(([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})|([0-9]{4})-([0-9]{1,2})|\\d{4}|([^\\d\\s]+)))',
|
|
'i');
|
|
RegExp = global.RegExp;
|
|
regExp = new RegExp('\\s*(true|false)', 'i');
|
|
const env0_22 = RegExp('^(?:\\s*(\\d{17,20}|@me|([^@#:]+)#([0-9]{4})|([a-z0-9_.]{2,32})))', 'i');
|
|
const object = {};
|
|
const FILTER_HAS = SearchTokenTypes.FILTER_HAS;
|
|
const ANSWER_HAS = SearchTokenTypes.ANSWER_HAS;
|
|
object[FILTER_HAS] = ANSWER_HAS;
|
|
const FILTER_AUTHOR_TYPE = SearchTokenTypes.FILTER_AUTHOR_TYPE;
|
|
const ANSWER_AUTHOR_TYPE = SearchTokenTypes.ANSWER_AUTHOR_TYPE;
|
|
object[FILTER_AUTHOR_TYPE] = ANSWER_AUTHOR_TYPE;
|
|
const FILTER_PINNED = SearchTokenTypes.FILTER_PINNED;
|
|
const ANSWER_PINNED = SearchTokenTypes.ANSWER_PINNED;
|
|
object[FILTER_PINNED] = ANSWER_PINNED;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/tokens/SearchTokens.tsx');
|
|
exports.default = {};
|
|
exports.isValidUserAutocomplete = closure;
|
|
exports.isValidChannelAutocomplete = closure2;
|
|
exports.getLocalizedHasAnswer = getLocalizedHasAnswer;
|
|
exports.getLocalizedAuthorTypeAnswer = getLocalizedAuthorTypeAnswer;
|
|
exports.getRandomDateShortcut = function() {
|
|
return importDefault(dependencyMap[11]).sample(generateDateAutocompletions());
|
|
};
|
|
exports.getUserAutocompletions = closure3;
|
|
exports.ComponentTypes = {FILTER: 'FILTER', ANSWER: 'ANSWER'};
|
|
exports.buildCrossDMSearchTokensConfig = function() {
|
|
return makeSearchTokenConfigs({type: SearchTypes.DMS});
|
|
};
|
|
exports.rebuildSearchTokenConfigs = rebuildSearchTokenConfigs;
|
|
exports.isSearchFilterTokenType = function(a0) {
|
|
return IS_SEARCH_FILTER_TOKEN.test(a0);
|
|
};
|
|
exports.isMeAutcompleteAnswer = isMeAutcompleteAnswer;
|
|
exports.isValidFilterAnswerForSubmit = isValidFilterAnswerForSubmit;
|
|
}
|
|
|
|
function getMonths() { // fn#75909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:376, offset: 0x01dbdeaa, size: 84 bytes, params: 1, frame: 12
|
|
const Set = global.Set;
|
|
let value = importDefault(3738) /* metro dependency 3738 */;
|
|
value = value.months();
|
|
value = value.map(function(a0) {
|
|
return a0.toLowerCase();
|
|
});
|
|
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
const set = new Set();
|
|
return set instanceof Object ? set : value2;
|
|
}
|
|
|
|
function getWeekdays() { // fn#75911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:457, offset: 0x01dbdefe, size: 84 bytes, params: 1, frame: 12
|
|
const Set = global.Set;
|
|
let value = importDefault(3738) /* metro dependency 3738 */;
|
|
value = value.weekdays();
|
|
value = value.map(function(a0) {
|
|
return a0.toLowerCase();
|
|
});
|
|
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
const set = new Set();
|
|
return set instanceof Object ? set : value2;
|
|
}
|
|
|
|
function getYears() { // fn#75913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:542, offset: 0x01dbdf52, size: 135 bytes, params: 1, frame: 14
|
|
const Date = global.Date;
|
|
let date = new Date();
|
|
date = date.getFullYear();
|
|
const Set = global.Set;
|
|
date = (importDefault(22) /* metro dependency 22 */).range(2015, date + 1);
|
|
date = date.map(function(a0) {
|
|
return a0.toString();
|
|
});
|
|
const value3 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
const set = new Set(date);
|
|
return set instanceof Object ? set : value3;
|
|
}
|
|
|
|
function makeDate(a0) { // fn#75916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:714, offset: 0x01dbe005, size: 75 bytes, params: 2, frame: 16
|
|
let value = a1;
|
|
const r5 = value !== undefined ? value : 0;
|
|
const makeDateRangeBinding = makeDateRange;
|
|
value = (importDefault(3738) /* metro dependency 3738 */)();
|
|
value = value.startOf(a0);
|
|
return makeDateRangeBinding(value.add(r5, a0), a0);
|
|
}
|
|
|
|
function parseDate(a0, a1, a2) { // fn#75917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:794, offset: 0x01dbe050, size: 62 bytes, params: 4, frame: 14
|
|
const makeDateRangeBinding = makeDateRange;
|
|
let value = importDefault(3738) /* metro dependency 3738 */;
|
|
value = value(a0, a1);
|
|
value = value.local();
|
|
return makeDateRangeBinding(value, a2);
|
|
}
|
|
|
|
function getShortcuts() { // fn#75918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:866, offset: 0x01dbe08e, size: 312 bytes, params: 1, frame: 17
|
|
const object2 = {};
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const string = intl.string;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
const HYiVEQ = t.HYiVEQ;
|
|
object2[Reflect.apply(string, intl, [HYiVEQ])] = function() {
|
|
return makeDate('day');
|
|
};
|
|
object2[intl.string(t.cu86KC)] = function() {
|
|
return makeDate('day', -1);
|
|
};
|
|
object2[intl.string(t['FvBj/6'])] = function() {
|
|
return makeDate('week');
|
|
};
|
|
object2[intl.string(t['20uWCw'])] = function() {
|
|
return makeDate('month');
|
|
};
|
|
object2[intl.string(t['dXC/hn'])] = function() {
|
|
return makeDate('year');
|
|
};
|
|
return object2;
|
|
}
|
|
|
|
function buildFilterRegex(a0) { // fn#75925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:1411, offset: 0x01dbe251, size: 51 bytes, params: 2, frame: 13
|
|
const RegExp = global.RegExp;
|
|
const key = buildKey(a0);
|
|
const value2 = Object.create(RegExp.prototype, {constructor: {value: RegExp}});
|
|
const regExp = new RegExp(key, 'i');
|
|
return regExp instanceof Object ? regExp : value2;
|
|
}
|
|
|
|
function isValidUserAutocomplete(a0) { // fn#75926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:1475, offset: 0x01dbe284, size: 220 bytes, params: 2, frame: 19
|
|
var r0;
|
|
var r3;
|
|
var findByTag;
|
|
let value = a0.getMatch(1);
|
|
const closure = function(a0) {
|
|
var value = null;
|
|
return value != a0 ? a0 == undefined ? undefined : a0.id : value;
|
|
};
|
|
if (ID_REGEX.test(value)) {
|
|
r3 = value;
|
|
} else {
|
|
if (value === ME) {
|
|
value = UserStore.getCurrentUser();
|
|
value = closure(value);
|
|
r0 = value;
|
|
} else {
|
|
value = a0.getMatch(4);
|
|
if (value != null) {
|
|
value = UserStore.findByTag(a0.getMatch(4));
|
|
value = closure(value);
|
|
r0 = value;
|
|
} else {
|
|
findByTag = UserStore.findByTag;
|
|
value = a0.getMatch(2);
|
|
value = Reflect.apply(findByTag, UserStore, [value, a0.getMatch(3)]);
|
|
value = closure(value);
|
|
r0 = value;
|
|
}
|
|
}
|
|
r3 = r0;
|
|
}
|
|
value = r3 != null;
|
|
if (value) {
|
|
a0.setData('userId', r3);
|
|
r0 = true;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function dateValidator(a0, a1) { // fn#75928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:1782, offset: 0x01dbe381, size: 460 bytes, params: 3, frame: 22
|
|
var r0;
|
|
var r2;
|
|
var r5;
|
|
var months;
|
|
var weekdays;
|
|
var value7;
|
|
var parseDateBinding;
|
|
var property2;
|
|
var property3;
|
|
var property4;
|
|
var property5;
|
|
var property6;
|
|
let value = a0.getFullMatch();
|
|
value = value.trim();
|
|
value = value.toLowerCase();
|
|
let property = getShortcuts()[value];
|
|
const value3 = null;
|
|
if (value3 != property) {
|
|
value = property();
|
|
value = env0_3(value, 2);
|
|
property = value[0];
|
|
property6 = value[1];
|
|
r0 = property;
|
|
r2 = property6;
|
|
} else {
|
|
months = getMonths();
|
|
if (months.has(value)) {
|
|
value = parseDate(value, 'MMMM', 'month');
|
|
value = env0_3(value, 2);
|
|
property = value[0];
|
|
property5 = value[1];
|
|
r0 = property;
|
|
r2 = property5;
|
|
} else {
|
|
weekdays = getWeekdays();
|
|
if (weekdays.has(value)) {
|
|
value = parseDate(value, 'dddd', 'day');
|
|
value = env0_3(value, 2);
|
|
property = value[0];
|
|
property4 = value[1];
|
|
r0 = property;
|
|
r2 = property4;
|
|
} else {
|
|
value7 = getYears().has(value);
|
|
parseDateBinding = parseDate;
|
|
if (value7) {
|
|
value = parseDateBinding(value, 'YYYY', 'year');
|
|
value = env0_3(value, 2);
|
|
property = value[0];
|
|
property3 = value[1];
|
|
r0 = property;
|
|
r2 = property3;
|
|
} else {
|
|
value = parseDateBinding(value, SEARCH_DATE_FORMAT, 'day');
|
|
value = env0_3(value, 2);
|
|
property = value[0];
|
|
property2 = value[1];
|
|
r0 = property;
|
|
r2 = property2;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
value = r0.isValid();
|
|
let r3 = value ? !r2.isValid() : !value;
|
|
if (r3) {
|
|
r0 = !r3;
|
|
} else {
|
|
if (a1 === 'before') {
|
|
r3 = r0;
|
|
r5 = value3;
|
|
} else if (a1 !== 'after') {
|
|
r3 = r2;
|
|
r5 = r0;
|
|
} else {
|
|
r3 = value3;
|
|
r5 = r2;
|
|
}
|
|
a0.setData('start', r5);
|
|
a0.setData('end', r3);
|
|
r0 = true;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function isValidChannelAutocomplete(a0, a1) { // fn#75929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:2365, offset: 0x01dbe54d, size: 272 bytes, params: 3, frame: 20
|
|
var r0;
|
|
var r6;
|
|
let value = a0.getMatch(1);
|
|
if (ID_REGEX.test(value)) {
|
|
a0.setData('channelIds', [value]);
|
|
value = true;
|
|
r0 = value;
|
|
} else {
|
|
r0 = value.startsWith('"') && value.endsWith('"');
|
|
if (r0) {
|
|
value = value.substring(1, value.length - 1);
|
|
value = value.replaceAll(RegExp('\\\\(.)', 'g'), function(a0, a1) {
|
|
return a1;
|
|
});
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
value = require(9675) /* metro dependency 9675: SearchUtils */;
|
|
if (value.isGuildLikeSearchContext(a1)) {
|
|
r0 = isValidGuildChannelAutocomplete(a0, r6, a1.guildId);
|
|
} else {
|
|
r0 = a1.type === SearchTypes.DMS && !StreamerModeStore.hidePersonalInformation;
|
|
r0 = r0 && isValidPrivateChannelAutocomplete(a0, r6);
|
|
}
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function getHasMap() { // fn#75938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:3512, offset: 0x01dbe8f6, size: 497 bytes, params: 1, frame: 16
|
|
const object2 = {};
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
let string = intl.string;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
const ZNR2fi = t.ZNR2fi;
|
|
object2[Reflect.apply(string, intl, [ZNR2fi])] = 'link';
|
|
object2[intl.string(t['20uQR3'])] = 'embed';
|
|
string = intl.string;
|
|
const L4lxyE = t.L4lxyE;
|
|
object2[Reflect.apply(string, intl, [L4lxyE])] = 'poll';
|
|
object2[intl.string(t.nrpA5E)] = 'snapshot';
|
|
object2[intl.string(t['AV/v6i'])] = 'file';
|
|
string = intl.string;
|
|
const XM9XGP = t.XM9XGP;
|
|
object2[Reflect.apply(string, intl, [XM9XGP])] = 'video';
|
|
string = intl.string;
|
|
const TNLcpx = t.TNLcpx;
|
|
object2[Reflect.apply(string, intl, [TNLcpx])] = 'image';
|
|
string = intl.string;
|
|
const F8Wf0e = t.F8Wf0e;
|
|
object2[Reflect.apply(string, intl, [F8Wf0e])] = 'sound';
|
|
string = intl.string;
|
|
const PJgX2h = t.PJgX2h;
|
|
object2[Reflect.apply(string, intl, [PJgX2h])] = 'sticker';
|
|
return object2;
|
|
}
|
|
|
|
function getAuthorTypeMap() { // fn#75939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:3999, offset: 0x01dbeae7, size: 179 bytes, params: 1, frame: 16
|
|
const object2 = {};
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
let string = intl.string;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
object2[Reflect.apply(string, intl, [t.tPZo4p])] = 'user';
|
|
string = intl.string;
|
|
const JL7sRS = t.JL7sRS;
|
|
object2[Reflect.apply(string, intl, [JL7sRS])] = 'bot';
|
|
string = intl.string;
|
|
const WjkIKU = t.WjkIKU;
|
|
object2[Reflect.apply(string, intl, [WjkIKU])] = 'webhook';
|
|
return object2;
|
|
}
|
|
|
|
function getLocalizedAnswer(a0, a1) { // fn#75940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:4184, offset: 0x01dbeb9a, size: 131 bytes, params: 3, frame: 16
|
|
var r2;
|
|
let value = a0;
|
|
const value2 = value.startsWith('-');
|
|
if (value2) {
|
|
value = value.slice(1);
|
|
r2 = value;
|
|
} else {
|
|
r2 = value;
|
|
}
|
|
const Object = global.Object;
|
|
value = Object.entries(a1);
|
|
value = value.find(_fun75941);
|
|
r2 = value?.[0] ?? r2;
|
|
return value2 ? '-' + r2 : r2;
|
|
}
|
|
|
|
function isValidHasAutocomplete(a0) { // fn#75942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:4359, offset: 0x01dbec7f, size: 55 bytes, params: 2, frame: 15
|
|
const searchTokensUtilsModule = require(9679) /* metro dependency 9679: SearchTokensUtils */;
|
|
return searchTokensUtilsModule.validateForMapWithNegation('has', getHasMap(), a0);
|
|
}
|
|
|
|
function isValidAuthorTypeAutocomplete(a0) { // fn#75943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:4458, offset: 0x01dbecb6, size: 55 bytes, params: 2, frame: 15
|
|
const searchTokensUtilsModule = require(9679) /* metro dependency 9679: SearchTokensUtils */;
|
|
return searchTokensUtilsModule.validateForMapWithNegation('author_type', getAuthorTypeMap(), a0);
|
|
}
|
|
|
|
function generateDateAutocompletions() { // fn#75945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:4723, offset: 0x01dbed3d, size: 139 bytes, params: 1, frame: 18
|
|
let Array = global.Array;
|
|
const value2 = Array.from(getMonths());
|
|
const items2 = [];
|
|
const value3 = arraySpread(items2, value2, 0, undefined);
|
|
Array = global.Array;
|
|
const value4 = arraySpread(items2, Array.from(getWeekdays()), value3, Array);
|
|
Array = global.Array;
|
|
const value5 = arraySpread(items2, Array.from(getYears()), value4, Array);
|
|
const Object = global.Object;
|
|
arraySpread(items2, Object.keys(getShortcuts()), value5, Array);
|
|
return items2;
|
|
}
|
|
|
|
function getDateAutocompletions(a0, a1, a2) { // fn#75946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:4883, offset: 0x01dbedc8, size: 58 bytes, params: 4, frame: 16
|
|
const env0_0 = a2;
|
|
const genericSearchBinding = genericSearch;
|
|
let value = generateDateAutocompletions();
|
|
value = genericSearchBinding(a0, a1, value);
|
|
return value.map(_fun75947);
|
|
}
|
|
|
|
function genericSearch(a0, a1, a2) { // fn#75948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:5026, offset: 0x01dbee4d, size: 111 bytes, params: 4, frame: 12
|
|
const env0_0 = a0.toLocaleLowerCase();
|
|
let value = importDefault(22) /* metro dependency 22 */;
|
|
value = value(a2);
|
|
value = value.filter(_fun75949);
|
|
value = value.take(a1);
|
|
value = value.map(function(a0) {
|
|
return {text: a0};
|
|
});
|
|
return value.value();
|
|
}
|
|
|
|
function getUserAutocompletions({query, searchContext, maxResults, tokens}) { // fn#75951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:5187, offset: 0x01dbeefc, size: 957 bytes, params: 2, frame: 25
|
|
var r11;
|
|
var r6;
|
|
var value2;
|
|
var defaultImport;
|
|
var queryAllUsers;
|
|
var object6;
|
|
var currentUser;
|
|
var defaultImport2;
|
|
var queryUsers;
|
|
var object7;
|
|
var defaultImport3;
|
|
var queryChannelUsers;
|
|
var object8;
|
|
var defaultImport4;
|
|
var queryGuildUsers;
|
|
var object9;
|
|
var guildId;
|
|
var currentUser2;
|
|
var value10;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
var value18;
|
|
var set;
|
|
var getCurrentlySelectedChannelId;
|
|
var getRecentMessageAuthorIds;
|
|
maxResults = maxResults === undefined ? 10 : maxResults;
|
|
const object10 = {};
|
|
let value = query.trim();
|
|
value = value.split('#');
|
|
const property = value[0];
|
|
object10.query = property;
|
|
object10.limit = maxResults;
|
|
object10.request = false;
|
|
const autocompleteUtilsModule = require(6526) /* metro dependency 6526: AutocompleteUtils */;
|
|
const getBoosterMap = autocompleteUtilsModule.getBoosterMap;
|
|
const AutocompleterResultTypes = (require(7234) /* metro dependency 7234: autocompleter */).AutocompleterResultTypes;
|
|
const USER = AutocompleterResultTypes.USER;
|
|
object10.boosters = Reflect.apply(getBoosterMap, autocompleteUtilsModule, [USER]);
|
|
const type = searchContext.type;
|
|
const GUILD = SearchTypes.GUILD;
|
|
if (GUILD === type) {
|
|
if (property.length === 0) {
|
|
set = new global.Set();
|
|
getCurrentlySelectedChannelId = SelectedChannelStore.getCurrentlySelectedChannelId;
|
|
guildId = searchContext.guildId;
|
|
(importDefault(6526) /* metro dependency 6526: AutocompleteUtils */).getRecentlyTalked(Reflect.apply(getCurrentlySelectedChannelId,
|
|
|
|
|
|
SelectedChannelStore, [guildId]), maxResults).forEach(function({record}) {
|
|
return maybeAddUser(record);
|
|
});
|
|
getRecentMessageAuthorIds = SearchRecentMessageStore.getRecentMessageAuthorIds;
|
|
guildId = searchContext.guildId;
|
|
Reflect.apply(getRecentMessageAuthorIds, SearchRecentMessageStore, [guildId]).forEach(_fun75954);
|
|
return [].slice(0, maxResults);
|
|
}
|
|
defaultImport4 = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
|
|
queryGuildUsers = defaultImport4.queryGuildUsers;
|
|
object9 = {};
|
|
copyDataProperties(object9, object10, undefined);
|
|
guildId = searchContext.guildId;
|
|
object9['guildId'] = guildId;
|
|
r11 = Reflect.apply(queryGuildUsers, defaultImport4, [object9]);
|
|
currentUser2 = UserStore.getCurrentUser();
|
|
value10 = property.toLowerCase().replace(RegExp('^@', ''), '');
|
|
r6 = currentUser2 != null && property.length > 0;
|
|
r6 = r6 && (intl.string(t.Qf3ptv).startsWith(value10) || ME.substr(1).startsWith(value10));
|
|
value18 = r11.filter(_fun75961).map(_fun75962);
|
|
if (r6) {
|
|
value18.unshift({text: ME, user: currentUser2});
|
|
}
|
|
return value18;
|
|
}
|
|
const GUILD_CHANNEL = SearchTypes.GUILD_CHANNEL;
|
|
if (GUILD_CHANNEL === type) {
|
|
if (property.length === 0) {
|
|
set = new global.Set();
|
|
getCurrentlySelectedChannelId = SelectedChannelStore.getCurrentlySelectedChannelId;
|
|
guildId = searchContext.guildId;
|
|
(importDefault(6526) /* metro dependency 6526: AutocompleteUtils */).getRecentlyTalked(Reflect.apply(getCurrentlySelectedChannelId,
|
|
|
|
|
|
SelectedChannelStore, [guildId]), maxResults).forEach(function({record}) {
|
|
return maybeAddUser(record);
|
|
});
|
|
getRecentMessageAuthorIds = SearchRecentMessageStore.getRecentMessageAuthorIds;
|
|
guildId = searchContext.guildId;
|
|
Reflect.apply(getRecentMessageAuthorIds, SearchRecentMessageStore, [guildId]).forEach(_fun75954);
|
|
return [].slice(0, maxResults);
|
|
}
|
|
defaultImport4 = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
|
|
queryGuildUsers = defaultImport4.queryGuildUsers;
|
|
object9 = {};
|
|
copyDataProperties(object9, object10, undefined);
|
|
guildId = searchContext.guildId;
|
|
object9['guildId'] = guildId;
|
|
r11 = Reflect.apply(queryGuildUsers, defaultImport4, [object9]);
|
|
currentUser2 = UserStore.getCurrentUser();
|
|
value10 = property.toLowerCase().replace(RegExp('^@', ''), '');
|
|
r6 = currentUser2 != null && property.length > 0;
|
|
r6 = r6 && (intl.string(t.Qf3ptv).startsWith(value10) || ME.substr(1).startsWith(value10));
|
|
value18 = r11.filter(_fun75961).map(_fun75962);
|
|
if (r6) {
|
|
value18.unshift({text: ME, user: currentUser2});
|
|
}
|
|
return value18;
|
|
}
|
|
const THREAD = SearchTypes.THREAD;
|
|
if (THREAD === type) {
|
|
if (property.length === 0) {
|
|
set = new global.Set();
|
|
getCurrentlySelectedChannelId = SelectedChannelStore.getCurrentlySelectedChannelId;
|
|
guildId = searchContext.guildId;
|
|
(importDefault(6526) /* metro dependency 6526: AutocompleteUtils */).getRecentlyTalked(Reflect.apply(getCurrentlySelectedChannelId,
|
|
|
|
|
|
SelectedChannelStore, [guildId]), maxResults).forEach(function({record}) {
|
|
return maybeAddUser(record);
|
|
});
|
|
getRecentMessageAuthorIds = SearchRecentMessageStore.getRecentMessageAuthorIds;
|
|
guildId = searchContext.guildId;
|
|
Reflect.apply(getRecentMessageAuthorIds, SearchRecentMessageStore, [guildId]).forEach(_fun75954);
|
|
return [].slice(0, maxResults);
|
|
}
|
|
defaultImport4 = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
|
|
queryGuildUsers = defaultImport4.queryGuildUsers;
|
|
object9 = {};
|
|
copyDataProperties(object9, object10, undefined);
|
|
guildId = searchContext.guildId;
|
|
object9['guildId'] = guildId;
|
|
r11 = Reflect.apply(queryGuildUsers, defaultImport4, [object9]);
|
|
currentUser2 = UserStore.getCurrentUser();
|
|
value10 = property.toLowerCase().replace(RegExp('^@', ''), '');
|
|
r6 = currentUser2 != null && property.length > 0;
|
|
r6 = r6 && (intl.string(t.Qf3ptv).startsWith(value10) || ME.substr(1).startsWith(value10));
|
|
value18 = r11.filter(_fun75961).map(_fun75962);
|
|
if (r6) {
|
|
value18.unshift({text: ME, user: currentUser2});
|
|
}
|
|
return value18;
|
|
}
|
|
const CHANNEL = SearchTypes.CHANNEL;
|
|
if (CHANNEL === type) {
|
|
defaultImport3 = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
|
|
queryChannelUsers = defaultImport3.queryChannelUsers;
|
|
object8 = {};
|
|
copyDataProperties(object8, object10, undefined);
|
|
object8['channelId'] = searchContext.channelId;
|
|
r11 = Reflect.apply(queryChannelUsers, defaultImport3, [object8]);
|
|
currentUser2 = UserStore.getCurrentUser();
|
|
value10 = property.toLowerCase().replace(RegExp('^@', ''), '');
|
|
r6 = currentUser2 != null && property.length > 0;
|
|
r6 = r6 && (intl.string(t.Qf3ptv).startsWith(value10) || ME.substr(1).startsWith(value10));
|
|
value18 = r11.filter(_fun75961).map(_fun75962);
|
|
if (r6) {
|
|
value18.unshift({text: ME, user: currentUser2});
|
|
}
|
|
return value18;
|
|
}
|
|
const DMS = SearchTypes.DMS;
|
|
if (DMS === type) {
|
|
value2 = ((a0) => {
|
|
if (a0 != null) {
|
|
var Set = global.Set;
|
|
var env0_0 = new Set();
|
|
a0.forEach(_fun75956);
|
|
var env0_2 = _fun75958;
|
|
[].forEach(_fun75959);
|
|
}
|
|
return [];
|
|
})(tokens ?? []);
|
|
if (value2 == null) {
|
|
defaultImport = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
|
|
queryAllUsers = defaultImport.queryAllUsers;
|
|
object6 = {};
|
|
copyDataProperties(object6, object10, undefined);
|
|
r11 = Reflect.apply(queryAllUsers, defaultImport, [object6]);
|
|
} else if (value2.length > 0) {
|
|
currentUser = UserStore.getCurrentUser();
|
|
if (currentUser != null) {
|
|
value2.push(currentUser);
|
|
}
|
|
defaultImport2 = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
|
|
queryUsers = defaultImport2.queryUsers;
|
|
object7 = {};
|
|
copyDataProperties(object7, object10, undefined);
|
|
object7['users'] = value2;
|
|
r11 = Reflect.apply(queryUsers, defaultImport2, [object7]);
|
|
} else {
|
|
defaultImport = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
|
|
queryAllUsers = defaultImport.queryAllUsers;
|
|
object6 = {};
|
|
copyDataProperties(object6, object10, undefined);
|
|
r11 = Reflect.apply(queryAllUsers, defaultImport, [object6]);
|
|
}
|
|
currentUser2 = UserStore.getCurrentUser();
|
|
value10 = property.toLowerCase().replace(RegExp('^@', ''), '');
|
|
r6 = currentUser2 != null && property.length > 0;
|
|
r6 = r6 && (intl.string(t.Qf3ptv).startsWith(value10) || ME.substr(1).startsWith(value10));
|
|
value18 = r11.filter(_fun75961).map(_fun75962);
|
|
if (r6) {
|
|
value18.unshift({text: ME, user: currentUser2});
|
|
}
|
|
return value18;
|
|
}
|
|
return [];
|
|
}
|
|
|
|
function getChannelAutocompletions({query, searchContext, maxResults}) { // fn#75963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:6992, offset: 0x01dbf5a6, size: 335 bytes, params: 2, frame: 19
|
|
var r6;
|
|
let value = query.trim();
|
|
if (value.startsWith('"')) {
|
|
if (value.endsWith('"')) {
|
|
value = value.substring(1, value.length - 1);
|
|
value = value.replaceAll(RegExp('\\\\(.)', 'g'), function(a0, a1) {
|
|
return a1;
|
|
});
|
|
r6 = value;
|
|
} else if (value.startsWith('"')) {
|
|
value = value.substring(1);
|
|
value = value.replaceAll(RegExp('\\\\(.)', 'g'), _fun75965);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
} else if (value.startsWith('"')) {
|
|
value = value.substring(1);
|
|
value = value.replaceAll(RegExp('\\\\(.)', 'g'), _fun75965);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
const r4 = r6[0] !== '#' ? r6 : r6.substring(1);
|
|
const searchUtilsModule = require(9675) /* metro dependency 9675: SearchUtils */;
|
|
return searchUtilsModule.isGuildLikeSearchContext(searchContext) ? getGuildChannelAutocompletions(r4,
|
|
searchContext.guildId,
|
|
maxResults) : searchContext.type !== SearchTypes.DMS || StreamerModeStore.hidePersonalInformation ? [] : getPrivateChannelAutocompletions(r4,
|
|
maxResults, false);
|
|
}
|
|
|
|
function makeSearchTokenConfigs(a0) { // fn#75973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:9265, offset: 0x01dbfab7, size: 4166 bytes, params: 2, frame: 31
|
|
const env0_0 = a0;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
let string = intl.string;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
const items3 = [Reflect.apply(string, intl, [t.tPZo4p])];
|
|
string = intl.string;
|
|
const JL7sRS = t.JL7sRS;
|
|
items3[1] = Reflect.apply(string, intl, [JL7sRS]);
|
|
string = intl.string;
|
|
const WjkIKU = t.WjkIKU;
|
|
items3[2] = Reflect.apply(string, intl, [WjkIKU]);
|
|
string = intl.string;
|
|
const TNLcpx = t.TNLcpx;
|
|
const items2 = [Reflect.apply(string, intl, [TNLcpx])];
|
|
string = intl.string;
|
|
const XM9XGP = t.XM9XGP;
|
|
items2[1] = Reflect.apply(string, intl, [XM9XGP]);
|
|
string = intl.string;
|
|
const ZNR2fi = t.ZNR2fi;
|
|
items2[2] = Reflect.apply(string, intl, [ZNR2fi]);
|
|
items2[3] = intl.string(t['AV/v6i']);
|
|
items2[4] = intl.string(t['20uQR3']);
|
|
string = intl.string;
|
|
const F8Wf0e = t.F8Wf0e;
|
|
items2[5] = Reflect.apply(string, intl, [F8Wf0e]);
|
|
string = intl.string;
|
|
const L4lxyE = t.L4lxyE;
|
|
items2[6] = Reflect.apply(string, intl, [L4lxyE]);
|
|
string = intl.string;
|
|
const PJgX2h = t.PJgX2h;
|
|
items2[7] = Reflect.apply(string, intl, [PJgX2h]);
|
|
items2[8] = intl.string(t.nrpA5E);
|
|
const object3 = {};
|
|
let FILTER_FROM = SearchTokenTypes.FILTER_FROM;
|
|
const object5 = {};
|
|
const buildFilterRegexBinding = buildFilterRegex;
|
|
object5.regex = buildFilterRegexBinding(intl.string(t['1TUdFo']));
|
|
let FILTER = env0_23.FILTER;
|
|
object5.componentType = FILTER;
|
|
const buildKeyBinding = buildKey;
|
|
object5.key = buildKeyBinding(intl.string(t['1TUdFo']));
|
|
object5.plainText = intl.string(t['1TUdFo']);
|
|
object5.validator = validator;
|
|
const getUserAutocompletionsBinding = getUserAutocompletions;
|
|
object5.getAutocompletions = getUserAutocompletionsBinding;
|
|
object3[FILTER_FROM] = object5;
|
|
const ANSWER_USERNAME_FROM = SearchTokenTypes.ANSWER_USERNAME_FROM;
|
|
FILTER_FROM = SearchTokenTypes.FILTER_FROM;
|
|
const isValidUserAutocompleteBinding = isValidUserAutocomplete;
|
|
let ANSWER = env0_23.ANSWER;
|
|
object3[ANSWER_USERNAME_FROM] = {follows: [FILTER_FROM], regex: env0_22, validator: isValidUserAutocompleteBinding,
|
|
mutable: true, componentType: ANSWER, queryKey: 'author_id'};
|
|
let FILTER_MENTIONS = SearchTokenTypes.FILTER_MENTIONS;
|
|
const object9 = {};
|
|
object9.regex = buildFilterRegexBinding(intl.string(t['i96lO+']));
|
|
FILTER = env0_23.FILTER;
|
|
object9.componentType = FILTER;
|
|
object9.key = buildKeyBinding(intl.string(t['i96lO+']));
|
|
object9.plainText = intl.string(t['i96lO+']);
|
|
object9.validator = validator_75975;
|
|
object9.getAutocompletions = getUserAutocompletionsBinding;
|
|
object3[FILTER_MENTIONS] = object9;
|
|
const ANSWER_USERNAME_MENTIONS = SearchTokenTypes.ANSWER_USERNAME_MENTIONS;
|
|
FILTER_MENTIONS = SearchTokenTypes.FILTER_MENTIONS;
|
|
ANSWER = env0_23.ANSWER;
|
|
object3[ANSWER_USERNAME_MENTIONS] = {follows: [FILTER_MENTIONS], regex: env0_22,
|
|
validator: isValidUserAutocompleteBinding, mutable: true, componentType: ANSWER, queryKey: 'mentions'};
|
|
let FILTER_HAS = SearchTokenTypes.FILTER_HAS;
|
|
const object11 = {};
|
|
string = intl.string;
|
|
let CqCvir = t.CqCvir;
|
|
object11.regex = buildFilterRegexBinding(Reflect.apply(string, intl, [CqCvir]));
|
|
FILTER = env0_23.FILTER;
|
|
object11.componentType = FILTER;
|
|
string = intl.string;
|
|
CqCvir = t.CqCvir;
|
|
object11.key = buildKeyBinding(Reflect.apply(string, intl, [CqCvir]));
|
|
string = intl.string;
|
|
CqCvir = t.CqCvir;
|
|
object11.plainText = Reflect.apply(string, intl, [CqCvir]);
|
|
object11.getAutocompletions = getAutocompletions;
|
|
object3[FILTER_HAS] = object11;
|
|
const ANSWER_HAS = SearchTokenTypes.ANSWER_HAS;
|
|
const object13 = {};
|
|
object13.regex = (require(9679) /* metro dependency 9679: SearchTokensUtils */).makeRegexForOptionsWithNegation(items2);
|
|
FILTER_HAS = SearchTokenTypes.FILTER_HAS;
|
|
object13.follows = [FILTER_HAS];
|
|
object13.validator = isValidHasAutocomplete;
|
|
ANSWER = env0_23.ANSWER;
|
|
object13.componentType = ANSWER;
|
|
object13.queryKey = 'has';
|
|
object3[ANSWER_HAS] = object13;
|
|
let FILTER_LINK_FROM = SearchTokenTypes.FILTER_LINK_FROM;
|
|
const object17 = {};
|
|
string = intl.string;
|
|
let RpRAZD = t.RpRAZD;
|
|
object17.regex = buildFilterRegexBinding(Reflect.apply(string, intl, [RpRAZD]));
|
|
string = intl.string;
|
|
RpRAZD = t.RpRAZD;
|
|
object17.key = buildKeyBinding(Reflect.apply(string, intl, [RpRAZD]));
|
|
string = intl.string;
|
|
RpRAZD = t.RpRAZD;
|
|
object17.plainText = Reflect.apply(string, intl, [RpRAZD]);
|
|
FILTER = env0_23.FILTER;
|
|
object17.componentType = FILTER;
|
|
object3[FILTER_LINK_FROM] = object17;
|
|
const ANSWER_LINK_FROM = SearchTokenTypes.ANSWER_LINK_FROM;
|
|
const GENERIC_REGEX = (require(9679) /* metro dependency 9679: SearchTokensUtils */).GENERIC_REGEX;
|
|
FILTER_LINK_FROM = SearchTokenTypes.FILTER_LINK_FROM;
|
|
ANSWER = env0_23.ANSWER;
|
|
object3[ANSWER_LINK_FROM] = {regex: GENERIC_REGEX, follows: [FILTER_LINK_FROM], mutable: true,
|
|
componentType: ANSWER, queryKey: 'link_hostname'};
|
|
let FILTER_FILE_TYPE = SearchTokenTypes.FILTER_FILE_TYPE;
|
|
const object18 = {};
|
|
string = intl.string;
|
|
let TMNjFm = t.TMNjFm;
|
|
object18.regex = buildFilterRegexBinding(Reflect.apply(string, intl, [TMNjFm]));
|
|
string = intl.string;
|
|
TMNjFm = t.TMNjFm;
|
|
object18.key = buildKeyBinding(Reflect.apply(string, intl, [TMNjFm]));
|
|
string = intl.string;
|
|
TMNjFm = t.TMNjFm;
|
|
object18.plainText = Reflect.apply(string, intl, [TMNjFm]);
|
|
FILTER = env0_23.FILTER;
|
|
object18.componentType = FILTER;
|
|
object3[FILTER_FILE_TYPE] = object18;
|
|
const ANSWER_FILE_TYPE = SearchTokenTypes.ANSWER_FILE_TYPE;
|
|
FILTER_FILE_TYPE = SearchTokenTypes.FILTER_FILE_TYPE;
|
|
ANSWER = env0_23.ANSWER;
|
|
object3[ANSWER_FILE_TYPE] = {regex: GENERIC_REGEX, follows: [FILTER_FILE_TYPE], mutable: true,
|
|
componentType: ANSWER, queryKey: 'attachment_extension'};
|
|
let FILTER_FILE_NAME = SearchTokenTypes.FILTER_FILE_NAME;
|
|
const object19 = {};
|
|
object19.regex = buildFilterRegexBinding(intl.string(t['5xtLRC']));
|
|
object19.key = buildKeyBinding(intl.string(t['5xtLRC']));
|
|
object19.plainText = intl.string(t['5xtLRC']);
|
|
FILTER = env0_23.FILTER;
|
|
object19.componentType = FILTER;
|
|
object3[FILTER_FILE_NAME] = object19;
|
|
const ANSWER_FILE_NAME = SearchTokenTypes.ANSWER_FILE_NAME;
|
|
FILTER_FILE_NAME = SearchTokenTypes.FILTER_FILE_NAME;
|
|
ANSWER = env0_23.ANSWER;
|
|
object3[ANSWER_FILE_NAME] = {regex: GENERIC_REGEX, follows: [FILTER_FILE_NAME], mutable: true,
|
|
componentType: ANSWER, queryKey: 'attachment_filename'};
|
|
let FILTER_BEFORE = SearchTokenTypes.FILTER_BEFORE;
|
|
const object21 = {};
|
|
object21.regex = buildFilterRegexBinding(intl.string(t['qZ+7BA']));
|
|
FILTER = env0_23.FILTER;
|
|
object21.componentType = FILTER;
|
|
object21.key = buildKeyBinding(intl.string(t['qZ+7BA']));
|
|
object21.plainText = intl.string(t['qZ+7BA']);
|
|
object21.getAutocompletions = function({query, maxResults}) {
|
|
return getDateAutocompletions(query, maxResults, SearchTokenTypes.FILTER_BEFORE);
|
|
};
|
|
object3[FILTER_BEFORE] = object21;
|
|
let FILTER_ON = SearchTokenTypes.FILTER_ON;
|
|
const object23 = {};
|
|
object23.regex = buildFilterRegexBinding('(' + intl.string(t.tIxkOo) + '|' + intl.string(t.h2NzSd) + ')');
|
|
FILTER = env0_23.FILTER;
|
|
object23.componentType = FILTER;
|
|
object23.key = buildKeyBinding(intl.string(t.h2NzSd));
|
|
object23.plainText = intl.string(t.h2NzSd);
|
|
object23.getAutocompletions = function({query, maxResults}) {
|
|
return getDateAutocompletions(query, maxResults, SearchTokenTypes.FILTER_ON);
|
|
};
|
|
object3[FILTER_ON] = object23;
|
|
let FILTER_AFTER = SearchTokenTypes.FILTER_AFTER;
|
|
const object26 = {};
|
|
string = intl.string;
|
|
let KSDx7M = t.KSDx7M;
|
|
object26.regex = buildFilterRegexBinding(Reflect.apply(string, intl, [KSDx7M]));
|
|
FILTER = env0_23.FILTER;
|
|
object26.componentType = FILTER;
|
|
string = intl.string;
|
|
KSDx7M = t.KSDx7M;
|
|
object26.key = buildKeyBinding(Reflect.apply(string, intl, [KSDx7M]));
|
|
string = intl.string;
|
|
KSDx7M = t.KSDx7M;
|
|
object26.plainText = Reflect.apply(string, intl, [KSDx7M]);
|
|
object26.getAutocompletions = function({query, maxResults}) {
|
|
return getDateAutocompletions(query, maxResults, SearchTokenTypes.FILTER_AFTER);
|
|
};
|
|
object3[FILTER_AFTER] = object26;
|
|
const ANSWER_BEFORE = SearchTokenTypes.ANSWER_BEFORE;
|
|
FILTER_BEFORE = SearchTokenTypes.FILTER_BEFORE;
|
|
ANSWER = env0_23.ANSWER;
|
|
object3[ANSWER_BEFORE] = {regex: env0_20, follows: [FILTER_BEFORE], componentType: ANSWER, mutable: true,
|
|
validator: function(a0) {
|
|
return dateValidator(a0, 'before');
|
|
}};
|
|
const ANSWER_ON = SearchTokenTypes.ANSWER_ON;
|
|
FILTER_ON = SearchTokenTypes.FILTER_ON;
|
|
ANSWER = env0_23.ANSWER;
|
|
object3[ANSWER_ON] = {regex: env0_20, follows: [FILTER_ON], componentType: ANSWER, mutable: true,
|
|
validator: function(a0) {
|
|
return dateValidator(a0, 'on');
|
|
}};
|
|
const ANSWER_AFTER = SearchTokenTypes.ANSWER_AFTER;
|
|
FILTER_AFTER = SearchTokenTypes.FILTER_AFTER;
|
|
ANSWER = env0_23.ANSWER;
|
|
object3[ANSWER_AFTER] = {regex: env0_20, follows: [FILTER_AFTER], componentType: ANSWER, mutable: true,
|
|
validator: function(a0) {
|
|
return dateValidator(a0, 'after');
|
|
}};
|
|
let FILTER_IN = SearchTokenTypes.FILTER_IN;
|
|
const object27 = {};
|
|
string = intl.string;
|
|
let WNpFHa = t.WNpFHa;
|
|
object27.regex = buildFilterRegexBinding(Reflect.apply(string, intl, [WNpFHa]));
|
|
FILTER = env0_23.FILTER;
|
|
object27.componentType = FILTER;
|
|
string = intl.string;
|
|
WNpFHa = t.WNpFHa;
|
|
object27.key = buildKeyBinding(Reflect.apply(string, intl, [WNpFHa]));
|
|
string = intl.string;
|
|
WNpFHa = t.WNpFHa;
|
|
object27.plainText = Reflect.apply(string, intl, [WNpFHa]);
|
|
object27.validator = validator_75983;
|
|
object27.getAutocompletions = getChannelAutocompletions;
|
|
object3[FILTER_IN] = object27;
|
|
const ANSWER_IN = SearchTokenTypes.ANSWER_IN;
|
|
const ANSWER_IN_REGEX = (require(9679) /* metro dependency 9679: SearchTokensUtils */).ANSWER_IN_REGEX;
|
|
FILTER_IN = SearchTokenTypes.FILTER_IN;
|
|
ANSWER = env0_23.ANSWER;
|
|
object3[ANSWER_IN] = {regex: ANSWER_IN_REGEX, mutable: true, follows: [FILTER_IN], componentType: ANSWER,
|
|
validator: validator_75984, queryKey: 'channel_id'};
|
|
let FILTER_PINNED = SearchTokenTypes.FILTER_PINNED;
|
|
const object28 = {};
|
|
object28.regex = buildFilterRegexBinding(intl.string(t['0B74eY']));
|
|
FILTER = env0_23.FILTER;
|
|
object28.componentType = FILTER;
|
|
object28.key = buildKeyBinding(intl.string(t['0B74eY']));
|
|
object28.plainText = intl.string(t['0B74eY']);
|
|
object28.getAutocompletions = function() {
|
|
return [{text: 'true'}, {text: 'false'}];
|
|
};
|
|
object3[FILTER_PINNED] = object28;
|
|
const ANSWER_PINNED = SearchTokenTypes.ANSWER_PINNED;
|
|
ANSWER = env0_23.ANSWER;
|
|
FILTER_PINNED = SearchTokenTypes.FILTER_PINNED;
|
|
object3[ANSWER_PINNED] = {regex: env0_21, componentType: ANSWER, follows: [FILTER_PINNED], queryKey: 'pinned',
|
|
validator: isValidPinnedAutocomplete};
|
|
let FILTER_AUTHOR_TYPE = SearchTokenTypes.FILTER_AUTHOR_TYPE;
|
|
const object29 = {};
|
|
object29.regex = buildFilterRegexBinding(intl.string(t.us8IQi));
|
|
FILTER = env0_23.FILTER;
|
|
object29.componentType = FILTER;
|
|
object29.key = buildKeyBinding(intl.string(t.us8IQi));
|
|
object29.plainText = intl.string(t.us8IQi);
|
|
object29.getAutocompletions = getAutocompletions_75986;
|
|
object3[FILTER_AUTHOR_TYPE] = object29;
|
|
const ANSWER_AUTHOR_TYPE = SearchTokenTypes.ANSWER_AUTHOR_TYPE;
|
|
const object30 = {};
|
|
object30.regex = (require(9679) /* metro dependency 9679: SearchTokensUtils */).makeRegexForOptionsWithNegation(items3);
|
|
FILTER_AUTHOR_TYPE = SearchTokenTypes.FILTER_AUTHOR_TYPE;
|
|
object30.follows = [FILTER_AUTHOR_TYPE];
|
|
object30.validator = isValidAuthorTypeAutocomplete;
|
|
ANSWER = env0_23.ANSWER;
|
|
object30.componentType = ANSWER;
|
|
object30.queryKey = 'author_type';
|
|
object3[ANSWER_AUTHOR_TYPE] = object30;
|
|
return object3;
|
|
}
|
|
|
|
function getLocalizedHasAnswer(a0) { // fn#75987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:15399, offset: 0x01dc0d12, size: 28 bytes, params: 2, frame: 13
|
|
return getLocalizedAnswer(a0, getHasMap());
|
|
}
|
|
|
|
function getLocalizedAuthorTypeAnswer(a0) { // fn#75988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:15506, offset: 0x01dc0d2e, size: 28 bytes, params: 2, frame: 13
|
|
return getLocalizedAnswer(a0, getAuthorTypeMap());
|
|
}
|
|
|
|
function rebuildSearchTokenConfigs() { // fn#75991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:15923, offset: 0x01dc0d98, size: 38 bytes, params: 1, frame: 14
|
|
const Object = global.Object;
|
|
Object.assign(env0_24, makeSearchTokenConfigs());
|
|
}
|
|
|
|
function isMeAutcompleteAnswer(a0) { // fn#75993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:16107, offset: 0x01dc0dd4, size: 165 bytes, params: 2, frame: 17
|
|
var r0;
|
|
if (a0.length === 0) {
|
|
return false;
|
|
}
|
|
let value = a0.toLowerCase();
|
|
value = value.replace(RegExp('^@', ''), '');
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const string = intl.string;
|
|
const Qf3ptv = (require(1244) /* metro dependency 1244: indexNative */).t.Qf3ptv;
|
|
const value4 = Reflect.apply(string, intl, [Qf3ptv]).startsWith(value);
|
|
if (value4) {
|
|
r0 = value4;
|
|
} else {
|
|
value = ME.substring(1).startsWith(value);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function isValidFilterAnswerForSubmit(a0, a1) { // fn#75994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:16328, offset: 0x01dc0e79, size: 199 bytes, params: 3, frame: 16
|
|
const property = env0_25[a0];
|
|
if (property == null) {
|
|
return true;
|
|
}
|
|
const Token = (require(9681) /* metro dependency 9681: QueryTokenizer */).Token;
|
|
const token = new Token(['filter:' + a1, a1], property);
|
|
const ANSWER_HAS = SearchTokenTypes.ANSWER_HAS;
|
|
if (ANSWER_HAS === property) {
|
|
return isValidHasAutocomplete(token);
|
|
}
|
|
const ANSWER_AUTHOR_TYPE = SearchTokenTypes.ANSWER_AUTHOR_TYPE;
|
|
if (ANSWER_AUTHOR_TYPE === property) {
|
|
return isValidAuthorTypeAutocomplete(token);
|
|
}
|
|
const ANSWER_PINNED = SearchTokenTypes.ANSWER_PINNED;
|
|
if (ANSWER_PINNED === property) {
|
|
return isValidPinnedAutocomplete(token);
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function isValidGuildChannelAutocomplete(a0, a1, a2) { // fn#75931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:2612, owner: isValidChannelAutocomplete.isValidGuildChannelAutocomplete, offset: 0x01dbe65d, size: 266 bytes, params: 4, frame: 19
|
|
var environment;
|
|
var r0;
|
|
var setData;
|
|
const env0_0 = a1;
|
|
let value = environment.__proto__;
|
|
const property = GuildChannelStore.getChannels(a2)[GUILD_SELECTABLE_CHANNELS_KEY];
|
|
const value4 = property.concat(GuildChannelStore.getChannels(a2)[GUILD_VOCAL_CHANNELS_KEY]);
|
|
const env0_1 = GuildChannelStore.getTextChannelNameDisambiguations(a2);
|
|
const value5 = undefined;
|
|
const value7 = (importDefault(22) /* metro dependency 22 */).chain(value4).map(function(a0) {
|
|
return a0.channel;
|
|
});
|
|
value = value7.concat(a2 != null ? ChannelStore.getAllThreadsForGuild(a2) : []);
|
|
value = value.filter(_fun75933);
|
|
value = value.value();
|
|
const value9 = (value == null ? value5 : value.length) > 0;
|
|
if (value9) {
|
|
setData = a0.setData;
|
|
value = value.map(function(a0) {
|
|
return a0.id;
|
|
});
|
|
Reflect.apply(setData, a0, ['channelIds', value]);
|
|
value = true;
|
|
r0 = value;
|
|
} else {
|
|
r0 = value9;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function isValidPrivateChannelAutocomplete(a0, a1) { // fn#75935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:3109, owner: isValidChannelAutocomplete.isValidPrivateChannelAutocomplete, offset: 0x01dbe7c6, size: 126 bytes, params: 3, frame: 15
|
|
var environment;
|
|
var r0;
|
|
var setData;
|
|
const env0_0 = a1;
|
|
const Object = global.Object;
|
|
const values = Object.values;
|
|
let value = environment.__proto__;
|
|
const getMutablePrivateChannels = ChannelStore.getMutablePrivateChannels;
|
|
value = Reflect.apply(values, Object, [Reflect.apply(getMutablePrivateChannels, ChannelStore, [])]);
|
|
value = value.filter(_fun75936);
|
|
const value3 = value?.length > 0;
|
|
if (value3) {
|
|
setData = a0.setData;
|
|
value = value.map(function(a0) {
|
|
return a0.id;
|
|
});
|
|
Reflect.apply(setData, a0, ['channelIds', value]);
|
|
value = true;
|
|
r0 = value;
|
|
} else {
|
|
r0 = value3;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun75941(a0) { // fn#75941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:4306, offset: 0x01dbec1d, size: 98 bytes, params: 2, frame: 10
|
|
var r1;
|
|
var r2;
|
|
var r4;
|
|
var item3;
|
|
var value3;
|
|
const iterator = a0[Symbol.iterator]();
|
|
const iterator2 = iterator.next;
|
|
const value = undefined;
|
|
let item2 = Reflect.apply(iterator2, iterator, []);
|
|
let item = item2.value;
|
|
item2 = item2.done ? undefined : iterator;
|
|
const value2 = item2 === value;
|
|
if (value2) {
|
|
}
|
|
if (value2) {
|
|
r1 = item2;
|
|
r2 = value2;
|
|
r4 = value;
|
|
} else {
|
|
item3 = Reflect.apply(iterator2, item2, []);
|
|
item = item3.value;
|
|
item3 = item3.done ? undefined : item2;
|
|
value3 = item3 === value;
|
|
if (value3) {
|
|
r1 = item3;
|
|
r2 = value3;
|
|
r4 = value;
|
|
} else {
|
|
r1 = item3;
|
|
r2 = value3;
|
|
r4 = item;
|
|
}
|
|
}
|
|
if (!r2) {
|
|
r1.return();
|
|
}
|
|
return r4 === env0_0;
|
|
}
|
|
|
|
function _fun75947(a0) { // fn#75947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:4983, offset: 0x01dbee02, size: 75 bytes, params: 2, frame: 16
|
|
const object2 = {};
|
|
copyDataProperties(object2, a0, undefined);
|
|
object2['group'] = importDefault;
|
|
object2['key'] = '' + importDefault + '-' + a0.text;
|
|
return object2;
|
|
}
|
|
|
|
function _fun75949(a0) { // fn#75949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:5111, offset: 0x01dbeebc, size: 53 bytes, params: 2, frame: 14
|
|
const value = environment.__proto__;
|
|
return (importDefault(6590) /* metro dependency 6590 */)(env0_0, a0.toLocaleLowerCase());
|
|
}
|
|
|
|
function maybeAddUser(a0) { // fn#75952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:5518, owner: getUserAutocompletions.maybeAddUser, offset: 0x01dbf2b9, size: 149 bytes, params: 2, frame: 16
|
|
var r1;
|
|
var binding;
|
|
var push;
|
|
var object2;
|
|
var value2;
|
|
let value = a0 == null;
|
|
if (value) {
|
|
r1 = value;
|
|
} else {
|
|
binding = env0_1;
|
|
r1 = binding.has(a0.id);
|
|
}
|
|
if (!r1) {
|
|
value = environment.__proto__;
|
|
value = RelationshipStore.isBlockedOrIgnored(a0.id);
|
|
r1 = value;
|
|
}
|
|
if (!r1) {
|
|
binding = env0_0;
|
|
push = binding.push;
|
|
object2 = {user: a0};
|
|
value2 = environment.__proto__;
|
|
object2.text = (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(a0);
|
|
Reflect.apply(push, binding, [object2]);
|
|
binding = env0_1;
|
|
binding.add(a0.id);
|
|
}
|
|
}
|
|
|
|
function _fun75954(a0) { // fn#75954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:5805, offset: 0x01dbf367, size: 37 bytes, params: 2, frame: 12
|
|
const maybeAddUserBinding = maybeAddUser;
|
|
const value = environment.__proto__;
|
|
return maybeAddUserBinding(UserStore.getUser(a0));
|
|
}
|
|
|
|
function getPrivateChannelRecipients(a0) { // fn#75955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:6006, owner: getUserAutocompletions.getPrivateChannelRecipients, offset: 0x01dbf38c, size: 112 bytes, params: 2, frame: 13
|
|
if (a0 != null) {
|
|
var Set = global.Set;
|
|
var set = new Set();
|
|
a0.forEach(function(a0) {
|
|
var value = a0.getData('channelIds');
|
|
if (value != null) {
|
|
value.forEach(_fun75957);
|
|
}
|
|
});
|
|
[].forEach(_fun75959);
|
|
}
|
|
return [];
|
|
}
|
|
|
|
function _fun75961({record}) { // fn#75961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:6814, offset: 0x01dbf517, size: 86 bytes, params: 2, frame: 14
|
|
const value = environment.__proto__;
|
|
return !(RelationshipStore.isBlockedOrIgnored(record.id) || env0_4 && record.id === env0_3?.id);
|
|
}
|
|
|
|
function _fun75962({record}) { // fn#75962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:6898, offset: 0x01dbf56d, size: 57 bytes, params: 2, frame: 13
|
|
const object2 = {};
|
|
const value = environment.__proto__;
|
|
object2.text = (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(record);
|
|
object2.user = record;
|
|
return object2;
|
|
}
|
|
|
|
function getGuildChannelAutocompletions(a0, a1, a2) { // fn#75966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:7317, owner: getChannelAutocompletions.getGuildChannelAutocompletions, offset: 0x01dbf6f5, size: 439 bytes, params: 4, frame: 25
|
|
var environment;
|
|
var value5;
|
|
let value = environment.__proto__;
|
|
const defaultImport = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
|
|
let queryChannels = defaultImport.queryChannels;
|
|
let object2 = {'query': null, 'type': null, 'guildId': null, 'limit': Infinity, 'allowEmptyQueries': true,
|
|
'allowSnowflake': true, 'includeAllThreads': true};
|
|
object2.query = a0;
|
|
object2.type = GUILD_SELECTABLE_CHANNELS_KEY;
|
|
object2.guildId = a1;
|
|
const autocompleteUtilsModule = require(6526) /* metro dependency 6526: AutocompleteUtils */;
|
|
let getBoosterMap = autocompleteUtilsModule.getBoosterMap;
|
|
const AutocompleterResultTypes = (require(7234) /* metro dependency 7234: autocompleter */).AutocompleterResultTypes;
|
|
const TEXT_CHANNEL = AutocompleterResultTypes.TEXT_CHANNEL;
|
|
object2.boosters = Reflect.apply(getBoosterMap, autocompleteUtilsModule, [TEXT_CHANNEL]);
|
|
const value2 = Reflect.apply(queryChannels, defaultImport, [object2]);
|
|
const concat = value2.concat;
|
|
const defaultImport2 = defaultImport;
|
|
queryChannels = defaultImport2.queryChannels;
|
|
object2 = {'query': null, 'type': null, 'guildId': null, 'limit': Infinity, 'allowEmptyQueries': true,
|
|
'allowSnowflake': true};
|
|
object2.query = a0;
|
|
object2.type = GUILD_VOCAL_CHANNELS_KEY;
|
|
object2.guildId = a1;
|
|
const moduleValue2 = autocompleteUtilsModule;
|
|
getBoosterMap = moduleValue2.getBoosterMap;
|
|
const VOICE_CHANNEL = AutocompleterResultTypes.VOICE_CHANNEL;
|
|
object2.boosters = Reflect.apply(getBoosterMap, moduleValue2, [VOICE_CHANNEL]);
|
|
const value4 = Reflect.apply(concat, value2, [Reflect.apply(queryChannels, defaultImport2,
|
|
[object2])]).map(function(a0) {
|
|
return a0.record;
|
|
});
|
|
if (a0.length === 0) {
|
|
var env0_0 = SelectedChannelStore.getChannelId(a1);
|
|
value5 = value4.find(_fun75968);
|
|
if (value5 != null) {
|
|
value4.splice(value4.indexOf(value5), 1);
|
|
value4.unshift(value5);
|
|
}
|
|
}
|
|
const env0_1 = GuildChannelStore.getTextChannelNameDisambiguations(a1);
|
|
value = (importDefault(22) /* metro dependency 22 */)(value4);
|
|
value = value.take(a2);
|
|
value = value.map(_fun75969);
|
|
return value.value();
|
|
}
|
|
|
|
function getPrivateChannelAutocompletions(a0, a1, a2) { // fn#75970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:8174, owner: getChannelAutocompletions.getPrivateChannelAutocompletions, offset: 0x01dbf92c, size: 308 bytes, params: 4, frame: 24
|
|
var environment;
|
|
let value = environment.__proto__;
|
|
const defaultImport = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
|
|
const queryGroupDMs = defaultImport.queryGroupDMs;
|
|
let getBoosterMap = (require(6526) /* metro dependency 6526: AutocompleteUtils */).getBoosterMap;
|
|
const AutocompleterResultTypes = (require(7234) /* metro dependency 7234: autocompleter */).AutocompleterResultTypes;
|
|
const GROUP_DM = AutocompleterResultTypes.GROUP_DM;
|
|
value = Reflect.apply(queryGroupDMs, defaultImport, [{query: a0, limit: a1, fuzzy: true,
|
|
boosters: Reflect.apply(getBoosterMap, value, [GROUP_DM])}]);
|
|
const defaultImport2 = defaultImport;
|
|
const queryDMChannels = defaultImport2.queryDMChannels;
|
|
const autocompleteUtilsModule = require(6526) /* metro dependency 6526: AutocompleteUtils */;
|
|
getBoosterMap = autocompleteUtilsModule.getBoosterMap;
|
|
const USER = AutocompleterResultTypes.USER;
|
|
value = (importDefault(22) /* metro dependency 22 */)(value.concat(Reflect.apply(queryDMChannels, defaultImport2,
|
|
[{query: a0, limit: a1, boosters: Reflect.apply(getBoosterMap, autocompleteUtilsModule, [USER])}])));
|
|
value = value.sort((require(7234) /* metro dependency 7234: autocompleter */).sortByMatchScore);
|
|
value = value.map(function({record, comparator}) {
|
|
return {text: comparator, channel: record, key: record?.id};
|
|
});
|
|
value = value.filter(function(a0) {
|
|
return a0.text != null && a0.channel != null && a0.key != null;
|
|
});
|
|
value = value.value();
|
|
a0.length;
|
|
return value.slice(0, a1);
|
|
}
|
|
|
|
function makeSearchTokenConfigsValidator() { // fn#75974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:10032, owner: makeSearchTokenConfigs.validator, offset: 0x01dc0afd, size: 37 bytes, params: 1, frame: 11
|
|
const value = environment.__proto__;
|
|
return (require(9680) /* metro dependency 9680: SearchTokenStreamerModeUtils */).isFromUserFilterSupported();
|
|
}
|
|
|
|
function makeSearchTokenConfigsValidator_75975() { // fn#75975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:10495, owner: makeSearchTokenConfigs.validator, offset: 0x01dc0b22, size: 37 bytes, params: 1, frame: 11
|
|
const value = environment.__proto__;
|
|
return (require(9680) /* metro dependency 9680: SearchTokenStreamerModeUtils */).isMentionsUserFilterSupported();
|
|
}
|
|
|
|
function makeSearchTokenConfigsGetAutocompletions({query, maxResults}) { // fn#75976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:10964, owner: makeSearchTokenConfigs.getAutocompletions, offset: 0x01dc0b47, size: 40 bytes, params: 2, frame: 15
|
|
return genericSearch(query, maxResults, env0_2);
|
|
}
|
|
|
|
function makeSearchTokenConfigsValidator_75983() { // fn#75983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:13788, owner: makeSearchTokenConfigs.validator, offset: 0x01dc0c38, size: 81 bytes, params: 1, frame: 13
|
|
var r3;
|
|
var r0;
|
|
var value;
|
|
if (env0_0 != null) {
|
|
r3 = env0_0;
|
|
} else {
|
|
value = environment.__proto__;
|
|
value = SearchAutocompleteStore.getSelectedSearchContext();
|
|
r3 = value;
|
|
}
|
|
value = r3 != null;
|
|
if (value) {
|
|
value = environment.__proto__;
|
|
value = require(9680) /* metro dependency 9680: SearchTokenStreamerModeUtils */;
|
|
value = value.isInChannelFilterSupported(r3);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function makeSearchTokenConfigsValidator_75984(a0) { // fn#75984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:14052, owner: makeSearchTokenConfigs.validator, offset: 0x01dc0c89, size: 63 bytes, params: 2, frame: 14
|
|
var r4;
|
|
var r0;
|
|
var value;
|
|
if (env0_0 != null) {
|
|
r4 = env0_0;
|
|
} else {
|
|
value = environment.__proto__;
|
|
value = SearchAutocompleteStore.getSelectedSearchContext();
|
|
r4 = value;
|
|
}
|
|
value = r4 != null;
|
|
if (value) {
|
|
value = environment.__proto__;
|
|
value = isValidChannelAutocomplete(a0, r4);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function makeSearchTokenConfigsGetAutocompletions_75986({query, maxResults}) { // fn#75986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:14812, owner: makeSearchTokenConfigs.getAutocompletions, offset: 0x01dc0cea, size: 40 bytes, params: 2, frame: 15
|
|
return genericSearch(query, maxResults, env0_1);
|
|
}
|
|
|
|
function _fun75933(a0) { // fn#75933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:2853, offset: 0x01dbe767, size: 95 bytes, params: 2, frame: 18
|
|
var r0;
|
|
var value2;
|
|
var value;
|
|
const name = env0_1[a0.id]?.name;
|
|
if (name != null) {
|
|
r0 = name;
|
|
} else {
|
|
value2 = environment.__proto__.__proto__;
|
|
value = require(4805) /* metro dependency 4805: useChannelName */;
|
|
value = value.computeChannelName(a0, UserStore, RelationshipStore);
|
|
r0 = value;
|
|
}
|
|
return require === r0;
|
|
}
|
|
|
|
function _fun75936(a0) { // fn#75936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:3216, offset: 0x01dbe844, size: 178 bytes, params: 2, frame: 15
|
|
var value;
|
|
var value3;
|
|
if (a0.isGroupDM()) {
|
|
value = environment.__proto__.__proto__;
|
|
value = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(a0, UserStore,
|
|
RelationshipStore);
|
|
if (require === value) {
|
|
return true;
|
|
}
|
|
if (a0.isDM()) {
|
|
value = a0.getRecipientId();
|
|
value3 = environment.__proto__.__proto__;
|
|
value = UserStore.getUser(value);
|
|
if (value == null) {
|
|
return false;
|
|
}
|
|
value = (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(value);
|
|
return require === value;
|
|
}
|
|
} else if (a0.isDM()) {
|
|
value = a0.getRecipientId();
|
|
value3 = environment.__proto__.__proto__;
|
|
value = UserStore.getUser(value);
|
|
if (value == null) {
|
|
return false;
|
|
}
|
|
value = (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(value);
|
|
return require === value;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function _fun75956(a0) { // fn#75956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:6096, offset: 0x01dbf3fc, size: 47 bytes, params: 2, frame: 11
|
|
const data = a0.getData('channelIds');
|
|
if (data != null) {
|
|
data.forEach(_fun75957);
|
|
}
|
|
}
|
|
|
|
function getPrivateChannelRecipientsMaybeAddUser(a0) { // fn#75958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:6185, owner: getUserAutocompletions.getPrivateChannelRecipients.maybeAddUser, offset: 0x01dbf42b, size: 77 bytes, params: 2, frame: 13
|
|
var r1;
|
|
var binding;
|
|
const value = a0 == null;
|
|
if (value) {
|
|
r1 = value;
|
|
} else {
|
|
binding = env0_0;
|
|
r1 = binding.has(a0.id);
|
|
}
|
|
if (!r1) {
|
|
binding = env0_3;
|
|
binding.push(a0);
|
|
binding = env0_0;
|
|
binding.add(a0.id);
|
|
}
|
|
}
|
|
|
|
function _fun75959(a0) { // fn#75959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:6259, offset: 0x01dbf478, size: 122 bytes, params: 2, frame: 13
|
|
var environment;
|
|
const value = environment.__proto__.__proto__;
|
|
const channel = ChannelStore.getChannel(a0);
|
|
if (channel != null) {
|
|
if (channel.isDM()) {
|
|
getPrivateChannelRecipientsMaybeAddUser(UserStore.getUser(channel.getRecipientId()));
|
|
} else if (channel.isGroupDM()) {
|
|
channel.recipients.forEach(_fun75960);
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun75969(a0) { // fn#75969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:7974, offset: 0x01dbf8ac, size: 128 bytes, params: 2, frame: 18
|
|
var r4;
|
|
var value2;
|
|
var value;
|
|
const name = env0_1[a0.id]?.name;
|
|
if (name != null) {
|
|
r4 = name;
|
|
} else {
|
|
value2 = environment.__proto__.__proto__;
|
|
value = require(4805) /* metro dependency 4805: useChannelName */;
|
|
value = value.computeChannelName(a0, UserStore, RelationshipStore);
|
|
r4 = value;
|
|
}
|
|
return {text: '' + r4, channel: a0, key: a0.id};
|
|
}
|
|
|
|
function _fun75960(a0) { // fn#75960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9862:6407, offset: 0x01dbf4f2, size: 37 bytes, params: 2, frame: 11
|
|
const value = environment.__proto__.__proto__.__proto__;
|
|
getPrivateChannelRecipientsMaybeAddUser(UserStore.getUser(a0));
|
|
}
|
|
|