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

+17
View File
@@ -0,0 +1,17 @@
/* Metro module 7244; source: modules/share/ShareConstants.tsx; dependencies: [7234, 2] */
function _fun58233(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#58233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7422:6, offset: 0x016c2635, size: 218 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const {USER, TEXT_CHANNEL, VOICE_CHANNEL,
GROUP_DM} = (require(7234) /* metro dependency 7234: autocompleter */).AutocompleterResultTypes;
const Array = global.Array;
const value = Array.from([USER, TEXT_CHANNEL, VOICE_CHANNEL, GROUP_DM]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/ShareConstants.tsx');
exports.ALLOWED_TYPES = value;
exports.isAllowedType = isAllowedType;
}
function isAllowedType({type}) { // fn#58234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7422:389, offset: 0x016c270f, size: 27 bytes, params: 2, frame: 11
return env0_0.includes(type);
}
+485
View File
@@ -0,0 +1,485 @@
/* Metro module 7232; source: modules/share/formatResults.tsx; dependencies: [5, 7233, 1379, 3784, 1878, 7244, 661, 4603, 7234, 7242, 1244, 1360, 22, 2] */
function _fun57929(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7410:6, offset: 0x016ba109, size: 367 bytes, params: 8, frame: 20
let env0_0 = require;
const _arrayLikeToArray_57932 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const closure = getChannelIdFromDestinationId;
const filterResults = function(a0, a1) {
var value = a2;
var env0_0 = a1;
var env0_1 = value !== undefined ? value : canShareToChannel;
return a0.filter(_fun57942);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const quickSwitcherStore = importDefault(7233) /* metro dependency 7233: QuickSwitcherStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_8 = (require(7244) /* metro dependency 7244: ShareConstants */).isAllowedType;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_9 = constantsModule.Permissions;
const env0_10 = constantsModule.ChannelTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/formatResults.tsx');
exports.default = formatResults;
exports.getDestinationIdFromChannelId = function(a0) {
var value2 = ChannelStore.getChannel(a0);
return value2?.type === ChannelTypes.DM ? {type: 'user', id: value2.recipients[0]} : {type: 'channel', id: a0};
};
exports.destinationKey = function({type, id}) {
return '' + type + '-' + id;
};
exports.getChannelIdFromDestinationId = closure;
exports.getOrResolveChannelIdFromDestinationId = function() {
return _getOrResolveChannelIdFromDestinationId.apply(this, arguments);
};
exports.formatResultsWithHeaders = formatResultsWithHeaders;
}
function _createForOfIteratorHelperLoose_57930(a0, a1) { // fn#57930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7410:227, offset: 0x016ba278, 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 _fun57931;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_57932(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_57932(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_57932(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun57931;
}
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 getChannelIdFromDestinationId(a0) { // fn#57933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7410:1137, offset: 0x016ba3ea, size: 62 bytes, params: 2, frame: 12
if (a0.type === 'channel') {
return a0.id;
}
return ChannelStore.getDMFromUserId(a0.id) ?? undefined;
}
function _getOrResolveChannelIdFromDestinationId() { // fn#57934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7410:1267, offset: 0x016ba428, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun57936).apply(this, arguments);
}
function createAutocompleterResultForDestination(a0) { // fn#57937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7410:1560, offset: 0x016ba4d4, size: 142 bytes, params: 2, frame: 14
var r0;
var value2;
var value3;
var object2;
if (a0.type === 'user') {
value2 = UserStore.getUser(a0.id);
value3 = null;
if (value3 != value2) {
object2 = {};
object2.type = (require(7234) /* metro dependency 7234: autocompleter */).AutocompleterResultTypes.USER;
object2.record = value2;
object2.score = 0;
r0 = object2;
} else {
r0 = value3;
}
return r0;
}
return (importDefault(7242) /* metro dependency 7242: createAutocompleterResultForChannelId */)(a0.id);
}
function canShareToChannel(a0, a1) { // fn#57938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7410:1760, offset: 0x016ba562, size: 270 bytes, params: 3, frame: 19
var r4;
var r0;
var r1;
let value = a1;
const type = a0.type;
const AutocompleterResultTypes = (require(7234) /* metro dependency 7234: autocompleter */).AutocompleterResultTypes;
const USER = AutocompleterResultTypes.USER;
if (type === USER) {
if (value) {
r1 = value;
} else {
value = ChannelStore.getDMChannelFromUserId(a0.record.id);
value = value != null;
r1 = value;
}
r0 = r1;
} else {
value = a0.type === AutocompleterResultTypes.GROUP_DM;
if (value) {
r0 = value;
} else {
r4 = a0.record.type !== ChannelTypes.GUILD_FORUM && a0.record.type !== ChannelTypes.GUILD_MEDIA;
r4 = r4 && (PermissionStore.can(Permissions.VIEW_CHANNEL,
a0.record) && PermissionStore.can(Permissions.SEND_MESSAGES, a0.record));
r0 = r4;
}
}
return r0;
}
function mergeAndDedupeResultsWithHeaders(a0, a1) { // fn#57939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7410:2077, offset: 0x016ba670, size: 299 bytes, params: 3, frame: 24
var r1;
var r3;
var r4;
var r12;
var r13;
var value2;
var value3;
var value4;
var done;
var value5;
var add;
var value6;
var value11;
var type;
var AutocompleterResultTypes;
var HEADER;
var record;
var id;
var has;
var push;
var value12;
const Set = global.Set;
const set = new Set();
reducibleJoin3: while (true) {
if (a1 == null) {
break reducibleJoin3;
}
value2 = environment;
value3 = _createForOfIteratorHelperLoose_57930(a1);
value4 = value3();
done = value4.done;
if (done) {
break reducibleJoin3;
}
r1 = value4;
reducibleLoop2: while (true) {
value5 = r1.value;
add = set.add;
Reflect.apply(add, set, [value5]);
value6 = value3();
done = value6.done;
if (done) {
break reducibleJoin3;
}
r1 = value6;
continue reducibleLoop2;
}
}
const items2 = [];
const _createForOfIteratorHelperLoose_57930Binding = _createForOfIteratorHelperLoose_57930;
const value8 = undefined;
const value9 = _createForOfIteratorHelperLoose_57930Binding(a0);
const value10 = value9();
done = value10.done;
if (!done) {
r3 = value10;
r4 = value8;
reducibleLoop4: while (true) {
value11 = r3.value;
reducibleJoin10: while (true) {
if (value11 == null) {
r13 = r4;
break reducibleJoin10;
}
type = value11.type;
AutocompleterResultTypes = (require(7234) /* metro dependency 7234: autocompleter */).AutocompleterResultTypes;
HEADER = AutocompleterResultTypes.HEADER;
if (type === HEADER) {
r13 = value11;
break reducibleJoin10;
}
record = value11.record;
id = record.id;
has = set.has;
if (Reflect.apply(has, set, [id])) {
r13 = r4;
break reducibleJoin10;
}
add = set.add;
Reflect.apply(add, set, [id]);
reducibleJoin9: while (true) {
if (r4 == null) {
r12 = r4;
break reducibleJoin9;
}
push = items2.push;
Reflect.apply(push, items2, [r4]);
r12 = value8;
break reducibleJoin9;
}
push = items2.push;
Reflect.apply(push, items2, [value11]);
r13 = r12;
break reducibleJoin10;
}
value12 = value9();
done = value12.done;
if (done) {
break reducibleLoop4;
}
r3 = value12;
r4 = r13;
continue reducibleLoop4;
}
}
return items2;
}
function getLastChannelResult(a0) { // fn#57940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7410:2482, offset: 0x016ba79b, size: 156 bytes, params: 2, frame: 19
const value = null;
if (value == a0) {
return value;
}
const value3 = (importDefault(7242) /* metro dependency 7242: createAutocompleterResultForChannelId */)(a0);
return value == value3 ? value : isAllowedType(value3) && (value3.type === (require(7234) /* metro dependency 7234: autocompleter */).AutocompleterResultTypes.USER || PermissionStore.can(Permissions.VIEW_CHANNEL,
value3.record)) ? value3 : value;
}
function filterResults(a0, a1) { // fn#57941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7410:2720, offset: 0x016ba837, size: 49 bytes, params: 3, frame: 12
const value = a2;
const env0_0 = a1;
const env0_1 = value !== undefined ? value : canShareToChannel;
return a0.filter(_fun57942);
}
function formatResults({results, hasQuery, queryMode, frequentChannels, targetDestination, selectedDestinations, pinnedDestinations, originDestination, channelFilter, includeMissingDMs}) { // fn#57943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7410:2964, offset: 0x016ba8e3, size: 416 bytes, params: 2, frame: 29
var r0;
if (hasQuery) {
return mergeAndDedupeResultsWithHeaders(filterResults(results, includeMissingDMs, channelFilter));
}
let value = null;
const r7 = value == pinnedDestinations ? [] : pinnedDestinations.length > 0 ? pinnedDestinations.map(function(a0) {
return createAutocompleterResultForDestination(a0);
}) : [];
const channelHistory = QuickSwitcherStore.getChannelHistory();
const r13 = channelHistory.length > 0 ? channelHistory.map(_fun57945) : [];
const r12 = frequentChannels.length > 0 ? frequentChannels.map(_fun57946) : [];
const filterResultsBinding = filterResults;
const items2 = [];
const value7 = arraySpread(items2, r7, 0, targetDestination);
items2[value7] = value != targetDestination ? createAutocompleterResultForDestination(targetDestination) : value;
arraySpread(items2, r12, arraySpread(items2, r13, value7 + 1, targetDestination), targetDestination);
const value9 = filterResultsBinding(items2, includeMissingDMs, channelFilter);
const r6 = value == originDestination || value != (value == selectedDestinations ? undefined : selectedDestinations.find(_fun57947)) ? [] : [originDestination.id];
if (value != queryMode) {
r0 = mergeAndDedupeResultsWithHeaders(value9.filter(function({type}) {
return type === queryMode;
}), r6);
} else {
value = mergeAndDedupeResultsWithHeaders(value9, r6);
value = value.slice(0, 15);
r0 = value;
}
return r0;
}
function formatResultsWithHeaders({results, selectedResult, hasNonEmptyQuery, queryMode, selectedChannelId, frequentChannels}) { // fn#57952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7410:4242, offset: 0x016bab8b, size: 447 bytes, params: 2, frame: 28
var r0;
var items2;
var moduleValue2;
const r4 = selectedResult != null ? [selectedResult.record.id] : [];
const autocompleterModule = require(7234) /* metro dependency 7234: autocompleter */;
const createHeaderResult = autocompleterModule.createHeaderResult;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const headerResult = Reflect.apply(createHeaderResult, autocompleterModule, [Reflect.apply(string, intl,
[t.qm9dSj])]);
if (hasNonEmptyQuery) {
items2 = [headerResult];
arraySpread(items2, mergeAndDedupeResultsWithHeaders(results.filter(isAllowedType), r4), 1, require);
return items2;
}
const value2 = frequentChannels.map(_fun57953);
const value3 = value2.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
const value4 = value3.filter(isAllowedType);
const mergeAndDedupeResultsWithHeadersBinding = mergeAndDedupeResultsWithHeaders;
if (queryMode != null) {
items2 = [headerResult];
arraySpread(items2, value4.filter(function({type}) {
return type === queryMode;
}), 1, require);
r0 = items2;
} else {
moduleValue2 = autocompleterModule;
items2 = [moduleValue2.createHeaderResult(intl.string(t['80lOZ1']))];
items2[1] = getLastChannelResult(selectedChannelId);
items2[2] = headerResult;
arraySpread(items2, value4, 3, require);
r0 = items2;
}
return mergeAndDedupeResultsWithHeadersBinding(r0, r4);
}
function* _fun57936(a0) { // fn#57936, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7410:1368, offset: 0x016ba461, size: 115 bytes, params: 2, frame: 15
var binding;
var binding2;
var property;
var getOrEnsurePrivateChannel;
var id;
var value4;
var error;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const value3 = env2_13(a0);
if (value3 != null) {
return value3;
}
if (a0.type !== 'user') {
return undefined;
}
try {
binding = env2_1;
} catch (error) {
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
return undefined;
}
try {
property = binding2[7];
} catch (error) {
return undefined;
}
try {
value = binding(property);
} catch (error) {
return undefined;
}
try {
getOrEnsurePrivateChannel = value.getOrEnsurePrivateChannel;
} catch (error) {
return undefined;
}
try {
id = a0.id;
} catch (error) {
return undefined;
}
try {
value = Reflect.apply(getOrEnsurePrivateChannel, value, [id]);
} catch (error) {
return undefined;
}
yield value;
try {
value = undefined;
value4 = false;
} catch (error) {
return undefined;
}
return value4 ? value : value;
}
function _fun57942(a0) { // fn#57942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7410:2785, offset: 0x016ba868, size: 123 bytes, params: 2, frame: 17
const value = environment.__proto__;
return (require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish(a0) && (a0.type === (require(7234) /* metro dependency 7234: autocompleter */).AutocompleterResultTypes.HEADER || isAllowedType(a0) && env0_1(a0,
require));
}
function _fun57945(a0) { // fn#57945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7410:3357, offset: 0x016baa83, size: 35 bytes, params: 2, frame: 11
const value = environment.__proto__;
return (importDefault(7242) /* metro dependency 7242: createAutocompleterResultForChannelId */)(a0);
}
function _fun57946({id}) { // fn#57946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7410:3397, offset: 0x016baaa6, size: 40 bytes, params: 2, frame: 11
const value = environment.__proto__;
return (importDefault(7242) /* metro dependency 7242: createAutocompleterResultForChannelId */)(id);
}
function _fun57947(a0) { // fn#57947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7410:3546, offset: 0x016baace, size: 49 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = require(22) /* metro dependency 22 */;
return value.isEqual(a0, originDestination);
}
+140
View File
@@ -0,0 +1,140 @@
/* Metro module 16255; source: modules/share/native/AppShare.tsx; dependencies: [57, 31, 27, 4874, 12950, 1226, 661, 11877, 33, 566, 5076, 477, 12989, 11880, 4884, 683, 4594, 13096, 12674, 1581, 5460, 15261, 15307, 4500, 2] */
function _fun125622(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#125622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16463:6, offset: 0x025deaa8, size: 283 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_5 = value.BackHandler;
const env0_6 = value.NativeModules;
require(4874) /* metro dependency 4874: AnalyticsTrackingStore */;
require(12950) /* metro dependency 12950: ShareStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const env0_8 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_9 = (require(11877) /* metro dependency 11877: Constants */).MultiAccountSwitchLocation;
value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/native/AppShare.tsx');
exports.default = AppShare;
}
function AppShare(a0) { // fn#125623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16463:371, offset: 0x025debc3, size: 414 bytes, params: 2, frame: 22
var r6;
var moduleValue;
const env0_0 = a0;
let value = useInitialization(a0);
AppShareUseAuthenticated();
env0_4.useEffect(_fun125632, [a0.attachments.length, a0.text]);
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(_fun125633);
const AppContainer = importDefault(13096) /* metro dependency 13096: AppContainer */;
if (value) {
value = importDefault(12674) /* metro dependency 12674: ShareScreen */;
moduleValue = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */;
value = ((Component) => <Component appEntryKey="share" sharedContent={a0} onClose={moduleValue.isMetaQuest() ? NativeModules.ShareManager.close : BackHandler.exitApp} />)(value);
r6 = value;
} else {
const SceneLoadingIndicator = (require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator;
r6 = <SceneLoadingIndicator />;
}
const items2 = [r6];
const ActionSheetContainer = (require(15261) /* metro dependency 15261: MainShared */).ActionSheetContainer;
items2[1] = <ActionSheetContainer appEntryKey="share" />;
items2[2] = ((Component) => <Component />)(importDefault(15307) /* metro dependency 15307: ToastContainer */);
const AlertModalContainer = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertModalContainer;
items2[3] = <AlertModalContainer />;
return (
<AppContainer appEntryKey="share">
{items2}
</AppContainer>
);
}
function useInitialization({targetUserId}) { // fn#125624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16463:398, owner: AppShare.useInitialization, offset: 0x025ded61, size: 197 bytes, params: 2, frame: 22
let binding = env1_4;
let useState = binding.useState;
const value3 = env1_3(Reflect.apply(useState, binding, [false]), 2);
const property = value3[0];
const env0_2 = value3[1];
useState = binding.useState;
const value7 = env1_3(Reflect.apply(useState, binding,
[targetUserId == null || AuthenticationStore.getId() === targetUserId]), 2);
const property2 = value7[0];
const env0_3 = value7[1];
binding = env1_4;
binding.useEffect(_fun125625, [property]);
binding.useEffect(_fun125626, [targetUserId]);
return property && property2;
}
function AppShareUseAuthenticated() { // fn#125629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16463:761, owner: AppShare.useAuthenticated, offset: 0x025deefc, size: 93 bytes, params: 1, frame: 16
env1_4.useEffect(_fun125631,
[(require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore], function() {
return AuthenticationStore.isAuthenticated();
})]);
}
function _fun125632() { // fn#125632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16463:1018, offset: 0x025defdd, size: 126 bytes, params: 1, frame: 18
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const EXTERNAL_SHARE_OPENED = AnalyticEvents.EXTERNAL_SHARE_OPENED;
Reflect.apply(track, defaultImport, [EXTERNAL_SHARE_OPENED,
{has_content: env0_0.text != null && env0_0.text.length > 0, has_attachment: env0_0.attachments.length > 0}]);
}
function _fun125633() { // fn#125633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16463:1188, offset: 0x025df05b, size: 126 bytes, params: 1, frame: 15
var environment;
const object2 = {};
const binding = env0_0;
object2.numAttachments = binding.attachments.length;
object2.mimeTypes = binding.attachments.map(function({mimeType}) {
return mimeType ?? 'unknown';
});
const numAttachments = object2.numAttachments;
const mimeTypes = object2.mimeTypes;
let value = environment.__proto__;
value = require(4884) /* metro dependency 4884: TTIAnalyticsUtils */;
value.trackAppUIViewed('share', {share_num_attachments: numAttachments, share_attachment_mimetypes: mimeTypes});
}
function _fun125625() { // fn#125625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16463:567, offset: 0x025dee26, size: 60 bytes, params: 1, frame: 12
var value2;
if (!env0_1) {
value2 = environment.__proto__.__proto__;
(importDefault(12989) /* metro dependency 12989: AccessibilityManager */).init();
env0_2(true);
}
}
function _fun125626() { // fn#125626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16463:619, offset: 0x025dee62, size: 76 bytes, params: 1, frame: 13
if (targetUserId != null && AuthenticationStore.getId() !== targetUserId) {
global.setTimeout(_fun125627, 18);
}
}
function _fun125631() { // fn#125631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16463:866, offset: 0x025def6c, size: 113 bytes, params: 1, frame: 15
var defaultImport;
var moduleValue;
if (env0_0) {
value = environment.__proto__.__proto__;
defaultImport = importDefault(5076) /* metro dependency 5076: AuthenticationActionCreators */;
defaultImport.startSession(AuthenticationStore.getToken());
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue.isAndroid()) {
NativeModules.NativePermissionManager.requestNotificationAuthorization();
}
}
}
function _fun125627() { // fn#125627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16463:660, offset: 0x025deeae, size: 78 bytes, params: 1, frame: 16
var environment;
const value = environment.__proto__.__proto__.__proto__;
const multiAccountActionCreatorsModule = require(11880) /* metro dependency 11880: MultiAccountActionCreators */;
const switchAccount = multiAccountActionCreatorsModule.switchAccount;
const targetUserIdBinding = targetUserId;
const SHARE_EXTENSION = MultiAccountSwitchLocation.SHARE_EXTENSION;
Reflect.apply(switchAccount, multiAccountActionCreatorsModule, [targetUserIdBinding, false,
SHARE_EXTENSION]).then(_fun125628);
}
@@ -0,0 +1,178 @@
/* Metro module 9792; source: modules/share/native/DestinationFailedAlertModal.tsx; dependencies: [31, 27, 1379, 1867, 4396, 3793, 1878, 482, 33, 4501, 697, 4805, 9719, 1305, 4573, 566, 3995, 9793, 4500, 4500, 1244, 2] */
function _fun76742(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9978:6, offset: 0x01de3419, size: 519 bytes, params: 8, frame: 23
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_9 = (require(482) /* metro dependency 482: Constants */).StatusTypes;
let value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
const env0_12 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object5 = {borderWidth: 1};
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object5.borderColor = BORDER_STRONG;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object5.paddingVertical = PX_8;
object4.container = object5;
const object6 = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'gap': null, 'height': 40};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object6.gap = PX_12;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.marginHorizontal = PX_16;
object4.row = object6;
object4.label = {flexShrink: 1};
const env0_13 = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/native/DestinationFailedAlertModal.tsx');
exports.default = DestinationFailedAlertModal;
}
function FailedGroupDMRow({channel}) { // fn#76743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9978:563, offset: 0x01de3620, size: 202 bytes, params: 2, frame: 23
const styles = useStyles();
const value2 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
const GroupDMAvatar = importDefault(9719) /* metro dependency 9719: GroupDMAvatar */;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
const groupDMAvatar = <GroupDMAvatar size={REFRESH_MEDIUM_32} channel={channel} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.row}>
{groupDMAvatar}
<Text
style={styles.label}
variant="text-md/medium"
lineClamp={1}
ellipsizeMode="tail"
>
{value2}
</Text>
</View>
);
}
function FailedUserRow({user}) { // fn#76744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9978:837, offset: 0x01de36ea, size: 409 bytes, params: 2, frame: 28
var r9;
var r0;
var items2;
var Text;
var value;
const styles = useStyles();
const nickname = (require(566) /* metro dependency 566: flux */).useStateFromStores([RelationshipStore],
function() {
return RelationshipStore.getNickname(user.id);
});
const {isMobileOnline, isVROnline,
status} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PresenceStore], function() {
var object = {};
var userBinding = user;
object.isMobileOnline = PresenceStore.isMobileOnline(userBinding.id);
object.status = PresenceStore.getStatus(userBinding.id);
object.isVROnline = PresenceStore.isVROnline(userBinding.id);
return object;
});
if (user != null) {
var viewBindingProps = {style: styles.row};
items2 = [((Avatar) => <Avatar user={user} guildId={undefined} status={StatusTypes.OFFLINE === status ? null : status} isMobileOnline={isMobileOnline} isVROnline={isVROnline} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL} avatarDecoration={user.avatarDecoration} autoStatusCutout />)((require(1305) /* metro dependency 1305: native */).Avatar)];
Text = (require(4573) /* metro dependency 4573: Text */).Text;
var textProps = {'style': null, 'variant': 'text-md/medium', 'lineClamp': 1, 'ellipsizeMode': 'tail',
style: styles.label};
if (nickname != null) {
r9 = nickname;
} else {
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
value = value.getName(user);
r9 = value;
}
items2[1] = <Text {...textProps}>{r9}</Text>;
value = <View {...viewBindingProps}>{items2}</View>;
r0 = value;
} else {
r0 = null;
}
return r0;
}
function FailedChannelRow({channel}) { // fn#76747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9978:1506, offset: 0x01de38fb, size: 266 bytes, params: 2, frame: 25
const styles = useStyles();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(channel?.guild_id);
});
const value2 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
const GuildIconWithChannelType = (require(9793) /* metro dependency 9793: GuildIconWithChannelType */).GuildIconWithChannelType;
const object = {};
object['aria-label'] = '';
object.guild = guild;
object.channel = channel;
const GuildIconWithChannelTypeSizes = (require(9793) /* metro dependency 9793: GuildIconWithChannelType */).GuildIconWithChannelTypeSizes;
const SMALL_32 = GuildIconWithChannelTypeSizes.SMALL_32;
object.size = SMALL_32;
const guildIconWithChannelType = <GuildIconWithChannelType {...object} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.row}>
{guildIconWithChannelType}
<Text
style={styles.label}
variant="text-md/medium"
lineClamp={1}
ellipsizeMode="tail"
>
{value2}
</Text>
</View>
);
}
function FailedDestinationRow({destination}) { // fn#76749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9978:1918, offset: 0x01de3a34, size: 187 bytes, params: 2, frame: 18
const {channel, user} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelStore,
UserStore], _fun76750);
return channel == null ? user != null ? <FailedUserRow user={user} /> : channel != null ? <FailedChannelRow channel={channel} /> : null : channel.isGroupDM() ? <FailedGroupDMRow channel={channel} /> : user != null ? <FailedUserRow user={user} /> : channel != null ? <FailedChannelRow channel={channel} /> : null;
}
function DestinationFailedAlertModal({title, content, failedDestinations, onRetry}) { // fn#76751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9978:2376, offset: 0x01de3b59, size: 511 bytes, params: 2, frame: 32
var r7;
const AlertActionButton = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActionButton;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var jsxRuntimeEnv0_12Binding;
var object6;
var items2;
const styles = useStyles();
const AlertModal = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertModal;
const alertModalProps = {title: title, content: content,
extraContent: <View style={styles.container}>{failedDestinations.map(_fun76752)}</View>};
const AlertActions = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActions;
if (onRetry != null) {
jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
items2 = [<AlertActionButton variant="primary" onPress={onRetry} text={intl.string(t['5911Lb'])} key="confirm" />];
items2[1] = <AlertActionButton variant="secondary" text={intl.string(t.WAI6xu)} key="cancel" />;
r7 = <>{items2}</>;
} else {
r7 = <AlertActionButton variant="primary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.BddRzS)} key="confirm" />;
}
alertModalProps.actions = <AlertActions>{r7}</AlertActions>;
return <AlertModal {...alertModalProps} />;
}
function _fun76750() { // fn#76750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9978:2013, offset: 0x01de3aef, size: 106 bytes, params: 1, frame: 15
const type = destination.type;
const value2 = null;
return {channel: type !== 'channel' ? value2 : ChannelStore.getChannel(destination.id),
user: destination.type !== 'user' ? value2 : UserStore.getUser(destination.id)};
}
function _fun76752(a0, a1) { // fn#76752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9978:2576, offset: 0x01de3d58, size: 35 bytes, params: 3, frame: 15
return <FailedDestinationRow destination={a0} key={a1} />;
}
@@ -0,0 +1,333 @@
/* Metro module 9761; source: modules/share/native/SearchableDestinationList.tsx; dependencies: [57, 31, 27, 661, 7690, 33, 4501, 697, 9762, 5459, 7232, 7234, 5243, 1360, 7697, 9768, 1244, 7704, 6984, 2] */
function _fun76592(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:6, offset: 0x01ddc64b, size: 396 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_5 = value.View;
const env0_6 = value.Keyboard;
const env0_7 = (require(661) /* metro dependency 661: Constants */).NOOP;
const env0_8 = (require(7690) /* metro dependency 7690: UserRowConstants */).UserRowModes;
value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.Fragment;
const env0_11 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingHorizontal = PX_16;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.paddingBottom = PX_8;
let MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
object4.backgroundColor = MOBILE_ACTIONSHEET_BACKGROUND;
object3.searchBarContainer = object4;
MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
object3.noResults = {flex: 1, backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
const env0_12 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/native/SearchableDestinationList.tsx');
exports.default = SearchableDestinationList;
}
function SearchableDestinationList({initialSelectedDestinations, disabledDestinations, originDestination, getRowIsUnavailable, onSelectedDestinationChange, onSearchTextChange, rowMode = UserRowModes.NONE, insetStart = importDefault(dependencyMap[7]).space.PX_8, insetEnd = importDefault(dependencyMap[7]).space.PX_12, autoFocusSearch, hideSearchOnDefaultNoResults, defaultNoResultsFound, disableGradient, disableStickySections, disableSelection, disableLongPress}) { // fn#76593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:491, offset: 0x01ddc7d7, size: 1374 bytes, params: 2, frame: 40
var r0;
var r5;
var r6;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
const env0_3 = onSearchTextChange;
const env0_4 = rowMode;
autoFocusSearch = !(autoFocusSearch === undefined) && autoFocusSearch;
hideSearchOnDefaultNoResults = !(hideSearchOnDefaultNoResults === undefined) && hideSearchOnDefaultNoResults;
const styles = useStyles();
let binding = env0_4;
const value3 = binding.useRef(null);
let useState = binding.useState;
const value4 = Reflect.apply(useState, binding, [initialSelectedDestinations ?? []]);
binding = env0_3;
const value5 = binding(value4, 2);
const property = value5[0];
const env0_9 = value5[1];
const {results,
updateSearchText} = (require(9762) /* metro dependency 9762: useShareSearchResults */).useShareSearchResults({selectedDestinations: property,
originDestination: originDestination, includeMissingDMs: true});
const binding2 = env0_4;
const env0_12 = binding2.useRef('');
useState = binding2.useState;
const value7 = binding(Reflect.apply(useState, binding2, [false]), 2);
const property2 = value7[0];
const env0_13 = value7[1];
const env0_14 = binding2.useRef(null);
binding2.useEffect(function() {
return _fun76595;
}, []);
const value8 = binding2.useCallback(_fun76596, [onSearchTextChange, updateSearchText]);
binding2.useEffect(_fun76598, [property, onSelectedDestinationChange, value8]);
const value9 = binding2.useMemo(function() {
return [results.length];
}, [results.length]);
const value10 = binding2.useCallback(function() {
return {type: 'section', props: {hideTitle: true}};
}, []);
const value11 = binding2.useMemo(_fun76603, [disabledDestinations]);
const value12 = binding2.useMemo(_fun76604, [property]);
const value13 = binding2.useCallback(_fun76605, [disableSelection]);
const value16 = binding2.useCallback(_fun76610, [results, getRowIsUnavailable, value12, value11, disableSelection,
disableLongPress, rowMode, binding2.useCallback(_fun76608, [value13]), binding2.useCallback(_fun76609,
[value13])]);
const value17 = binding2.useRef(null);
const value18 = value9.some(function(a0) {
return a0 > 0;
});
if (value18) {
const UsersFastList = (require(7697) /* metro dependency 7697: UsersFastList */).UsersFastList;
r5 = <UsersFastList ref={value17} sections={value9} getItemProps={value16} getSectionProps={value10} insetStart={insetStart} insetEnd={insetEnd} disableStickySections={disableStickySections} />;
} else {
if (property2) {
object2 = {};
object2.style = styles.noResults;
object2.children = ((Component) => <Component title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.V6nAfF)} />)(importDefault(9768) /* metro dependency 9768: NoResults */);
r0 = object2;
} else if (defaultNoResultsFound == null) {
object2 = {};
object2.style = styles.noResults;
object2.children = ((Component) => <Component title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.V6nAfF)} />)(importDefault(9768) /* metro dependency 9768: NoResults */);
r0 = object2;
} else {
r0 = {style: [styles.noResults], children: defaultNoResultsFound};
}
r5 = <View {...r0} />;
}
const jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
const r9 = !disableGradient && ((Component) => <Component absolute />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */);
if (hideSearchOnDefaultNoResults) {
if (value18) {
r6 = <View style={styles.searchBarContainer}><SearchField ref={value3} size="md" onChange={value8} autoFocus={autoFocusSearch && value18} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.CaEER6)} /></View>;
} else if (property2) {
r6 = <View style={styles.searchBarContainer}><SearchField ref={value3} size="md" onChange={value8} autoFocus={autoFocusSearch && value18} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.CaEER6)} /></View>;
} else {
r6 = null;
}
} else {
r6 = <View style={styles.searchBarContainer}><SearchField ref={value3} size="md" onChange={value8} autoFocus={autoFocusSearch && value18} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.CaEER6)} /></View>;
}
return (
<>
{r9}
{r6}
{r5}
</>
);
}
function _fun76594() { // fn#76594, offset: 0x01ddcd35, size: 11 bytes, params: 1, frame: 1
return _fun76595;
}
function _fun76596(a0) { // fn#76596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:1282, offset: 0x01ddcd60, size: 185 bytes, params: 2, frame: 13
var environment;
var binding;
let value = a1;
const r2 = value !== undefined ? value : false;
let current = env0_12.current;
if (a0 !== current) {
env0_12.current = a0;
if (r2) {
current = env0_7.current;
if (current != null) {
current.setText(a0);
}
}
updateSearchText(a0);
if (onSearchTextChange != null) {
onSearchTextChange(a0);
}
binding = env0_13;
binding(a0.trim().length > 0);
binding = env0_14;
value = environment.__proto__;
value = require(5459) /* metro dependency 5459: RunAfterInteractionsUtils */;
binding.current = value.runAfterInteractions(_fun76597);
}
}
function _fun76598() { // fn#76598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:1525, offset: 0x01ddce3c, size: 67 bytes, params: 1, frame: 15
onSelectedDestinationChange(env0_8);
global.setTimeout(function() {
Keyboard.dismiss();
}, 0);
global.setTimeout(_fun76600, 50);
}
function _fun76603() { // fn#76603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:1738, offset: 0x01ddceda, size: 73 bytes, params: 1, frame: 16
var r0;
var map;
var value;
let disabledDestinationsBinding = disabledDestinations;
if (disabledDestinationsBinding == null) {
r0 = undefined;
} else {
disabledDestinationsBinding = disabledDestinations;
map = disabledDestinationsBinding.map;
value = environment.__proto__;
value = Reflect.apply(map, disabledDestinationsBinding,
[(require(7232) /* metro dependency 7232: formatResults */).destinationKey]);
r0 = value;
}
r0 = r0 ?? [];
return r0;
}
function _fun76604() { // fn#76604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:1837, offset: 0x01ddcf23, size: 73 bytes, params: 1, frame: 16
var r0;
var binding;
var map;
var value;
if (env0_8 == null) {
r0 = undefined;
} else {
binding = env0_8;
map = binding.map;
value = environment.__proto__;
value = Reflect.apply(map, binding,
[(require(7232) /* metro dependency 7232: formatResults */).destinationKey]);
r0 = value;
}
r0 = r0 ?? [];
return r0;
}
function _fun76605(a0) { // fn#76605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:1941, offset: 0x01ddcf6c, size: 32 bytes, params: 2, frame: 11
const env0_0 = a0;
env0_9(_fun76606);
}
function _fun76608({id}) { // fn#76608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:2096, offset: 0x01ddcffb, size: 38 bytes, params: 2, frame: 11
return env0_18({type: 'user', id: id});
}
function _fun76609({id}) { // fn#76609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:2150, offset: 0x01ddd021, size: 38 bytes, params: 2, frame: 11
return env0_18({type: 'channel', id: id});
}
function _fun76610(a0, a1) { // fn#76610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:2207, offset: 0x01ddd047, size: 825 bytes, params: 3, frame: 24
var r13;
var r10;
var r12;
var USER;
var object2;
var binding;
var value8;
var value9;
var object4;
var object6;
var object8;
var moduleValue3;
const {type, record} = results[a1];
const value2 = results.length - 1;
const value4 = undefined;
const AutocompleterResultTypes = (require(7234) /* metro dependency 7234: autocompleter */).AutocompleterResultTypes;
const HEADER = AutocompleterResultTypes.HEADER;
if (type !== HEADER) {
USER = AutocompleterResultTypes.USER;
r13 = type === USER ? (require(7232) /* metro dependency 7232: formatResults */).destinationKey({type: 'user',
id: record.id}) : (require(7232) /* metro dependency 7232: formatResults */).destinationKey({type: 'channel',
id: record.id});
r10 = getRowIsUnavailable == null ? value4 : getRowIsUnavailable(record);
binding = env0_17;
value8 = binding.includes(r13);
binding = env0_16;
value9 = binding.includes(r13);
object2 = {};
r12 = disableSelection && !value8;
r12 = !r12 ? value9 : r12;
r12 = !r12 ? r10 != null : r12;
object2.disabled = r12;
object2.selected = value8;
object2.mode = r10 != null ? UserRowModes.NONE : env0_4;
object2.subLabel = r10 != null ? r10.label : value4;
object2.start = a1 === 0;
object2.end = a1 === value2;
USER = AutocompleterResultTypes.USER;
if (USER === type) {
object8 = {};
copyDataProperties(object8, object2, undefined);
object8['user'] = record;
moduleValue3 = require(5243) /* metro dependency 5243: UserSearchUtils */;
object8['type'] = moduleValue3.getRelationshipType(record.id);
object8['onPress'] = env0_19;
copyDataProperties(object8, disableLongPress ? {onLongPress: NOOP} : value4, undefined);
return {type: 'user', props: object8};
}
if (AutocompleterResultTypes.GROUP_DM === type) {
object6 = {};
copyDataProperties(object6, object2, undefined);
object6['channel'] = record;
object6['onPress'] = env0_20;
copyDataProperties(object6, disableLongPress ? {onLongPress: NOOP} : value4, undefined);
return {type: 'gdm', props: object6};
}
if (AutocompleterResultTypes.TEXT_CHANNEL === type) {
object4 = {};
copyDataProperties(object4, object2, undefined);
object4['channel'] = record;
object4['onPress'] = env0_20;
copyDataProperties(object4, disableLongPress ? {onLongPress: NOOP} : value4, undefined);
return {type: 'channel', props: object4};
}
if (AutocompleterResultTypes.VOICE_CHANNEL === type) {
object4 = {};
copyDataProperties(object4, object2, undefined);
object4['channel'] = record;
object4['onPress'] = env0_20;
copyDataProperties(object4, disableLongPress ? {onLongPress: NOOP} : value4, undefined);
return {type: 'channel', props: object4};
}
return (require(1360) /* metro dependency 1360: GlobalUtils */).assertNever(type);
}
return value4;
}
function _fun76595() { // fn#76595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:1212, offset: 0x01ddcd40, size: 32 bytes, params: 1, frame: 9
const current = env1_14.current;
if (current != null) {
current.cancel();
}
}
function _fun76597() { // fn#76597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:1448, offset: 0x01ddce19, size: 35 bytes, params: 1, frame: 11
const current = env1_21.current;
if (current != null) {
current.scrollToTop(false);
}
}
function _fun76600() { // fn#76600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:1581, offset: 0x01ddce94, size: 23 bytes, params: 1, frame: 13
env1_15('', true);
}
function _fun76606(a0) { // fn#76606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:1948, offset: 0x01ddcf8c, size: 111 bytes, params: 2, frame: 15
var environment;
var items2;
var value;
const index = a0.findIndex(_fun76607);
if (index === -1) {
value = environment.__proto__;
if (disableSelection) {
return a0;
}
arraySpread([env0_0], a0, 1, index);
} else {
items2 = [];
arraySpread(items2, a0, 0, index);
items2.splice(index, 1);
}
return items2;
}
@@ -0,0 +1,176 @@
/* Metro module 12677; source: modules/share/native/ShareAttachments.tsx; dependencies: [31, 27, 33, 4017, 4589, 1305, 4501, 697, 4504, 4000, 1244, 11143, 4660, 2] */
function _fun97136(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12867:6, offset: 0x02173f68, size: 569 bytes, params: 8, frame: 22
var object2;
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;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).createAnimatedComponent(importDefault(4589) /* metro dependency 4589 */);
object2 = {duration: 300};
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
object2.easing = STANDARD_EASING;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.containerRevamp = {marginHorizontal: -PX_16};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.attachmentPreviewContentContainer = {flexDirection: 'row', gap: PX_8};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.attachmentPreviewContentContainerRevamp = {paddingHorizontal: PX_16};
const object3 = {'height': 60, 'backgroundColor': null, 'overflow': 'hidden'};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.backgroundColor = BACKGROUND_BASE_LOW;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.attachmentPreview = object3;
object2.leftGradient = {'width': 50, 'position': 'absolute', 'left': 0, 'top': 0, 'bottom': 0, 'zIndex': 100};
object2.rightGradient = {'width': 50, 'position': 'absolute', 'right': 0, 'top': 0, 'bottom': 0, 'zIndex': 100};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.gradient = {color: BACKGROUND_SURFACE_HIGH};
const env0_9 = Reflect.apply(createStyles, value, [object2]);
object2 = {code: 'function ShareAttachmentsTsx1(){const{withTiming,contentOffset,GRADIENT_EASING_CONFIG}=this.__closure;return{opacity:withTiming(contentOffset.get()<=0?0:1,GRADIENT_EASING_CONFIG)};}'};
object2 = {code: 'function ShareAttachmentsTsx2(){const{withTiming,contentOffset,layoutWidth,contentWidth,GRADIENT_EASING_CONFIG}=this.__closure;return{opacity:withTiming(contentOffset.get()+layoutWidth.get()>=contentWidth.get()?0:1,GRADIENT_EASING_CONFIG)};}'};
object2 = {code: 'function ShareAttachmentsTsx3(event){const{contentOffset,contentWidth,layoutWidth}=this.__closure;contentOffset.set(event.contentOffset.x);contentWidth.set(event.contentSize.width);layoutWidth.set(event.layoutMeasurement.width);}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/native/ShareAttachments.tsx');
exports.default = ShareAttachments;
}
function ShareAttachments({attachments, isRevamp}) { // fn#97137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12867:1597, offset: 0x021741a1, size: 956 bytes, params: 2, frame: 31
var r0;
var items3;
var ScrollView;
var object4;
var intl;
let value = undefined;
isRevamp = !(isRevamp === value) && isRevamp;
const styles = useStyles();
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const value6 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const env0_3 = value6;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = ShareAttachmentsY;
const object2 = {};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.contentOffset = value4;
let binding = env0_8;
object2.GRADIENT_EASING_CONFIG = binding;
closure.__closure = object2;
closure.__workletHash = 3302668154466;
closure.__initData = env0_10;
const value7 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue5 = reanimatedRexportModule;
useAnimatedStyle = moduleValue5.useAnimatedStyle;
closure = ShareAttachmentsS;
closure.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming,
contentOffset: value4, layoutWidth: value6, contentWidth: value5, GRADIENT_EASING_CONFIG: binding};
closure.__workletHash = 13996707009656;
closure.__initData = env0_11;
const value8 = Reflect.apply(useAnimatedStyle, moduleValue5, [closure]);
const moduleValue6 = reanimatedRexportModule;
const useAnimatedScrollHandler = moduleValue6.useAnimatedScrollHandler;
closure = ShareAttachmentsV;
closure.__closure = {contentOffset: value4, contentWidth: value5, layoutWidth: value6};
closure.__workletHash = 12660577105859;
closure.__initData = env0_12;
const value9 = Reflect.apply(useAnimatedScrollHandler, moduleValue6, [closure]);
binding = env0_3;
const value10 = binding.useCallback(_fun97141, [value6]);
const value11 = binding.useCallback(_fun97142, [value5]);
const useMemo = binding.useMemo;
let gradient = styles.gradient;
let color = gradient.color;
const value12 = Reflect.apply(useMemo, binding, [_fun97143, [color]]);
if (attachments.length === 0) {
r0 = null;
} else {
var viewBindingProps = {style: isRevamp ? styles.containerRevamp : value};
binding = env0_7;
gradient = styles.gradient;
color = gradient.color;
items3 = [((Component) => <Component start={{'x': 0, 'y': 0}} end={{'x': 1, 'y': 0}} colors={[color,
value12]} style={[styles.leftGradient, value7]} pointerEvents="box-none" />)(binding)];
gradient = styles.gradient;
color = gradient.color;
items3[1] = ((Component) => <Component start={{'x': 0, 'y': 0}} end={{'x': 1, 'y': 0}} colors={[value12,
color]} style={[styles.rightGradient, value8]} pointerEvents="box-none" />)(binding);
ScrollView = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).ScrollView;
var scrollViewProps = {contentContainerStyle: [styles.attachmentPreviewContentContainer,
isRevamp ? styles.attachmentPreviewContentContainerRevamp : value], horizontal: true, onScroll: value9,
onLayout: value10, onContentSizeChange: value11, scrollEventThrottle: 16,
showsHorizontalScrollIndicator: false,
accessibilityRole: 'list'};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
scrollViewProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.RhtzFe);
items3[2] = <ScrollView {...scrollViewProps}>{attachments.map(_fun97144)}</ScrollView>;
value = <View {...viewBindingProps}>{items3}</View>;
r0 = value;
}
return r0;
}
function ShareAttachmentsY() { // fn#97138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12867:1785, owner: ShareAttachments.y, offset: 0x0217455d, size: 78 bytes, params: 1, frame: 16
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
const value3 = env0_1.get();
const value4 = 0;
return {opacity: Reflect.apply(withTiming, timingModule, [value3 <= value4 ? value4 : 1, env1_8])};
}
function ShareAttachmentsS() { // fn#97139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12867:2002, owner: ShareAttachments.S, offset: 0x021745ab, size: 106 bytes, params: 1, frame: 17
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
let binding = env0_1;
let get = binding.get;
const value3 = Reflect.apply(get, binding, []);
binding = env0_3;
get = binding.get;
const value4 = value3 + Reflect.apply(get, binding, []);
binding = env0_2;
get = binding.get;
return {opacity: Reflect.apply(withTiming, timingModule, [value4 >= Reflect.apply(get, binding, []) ? 0 : 1,
env1_8])};
}
function ShareAttachmentsV({contentOffset, contentSize, layoutMeasurement}) { // fn#97140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12867:2270, owner: ShareAttachments.v, offset: 0x02174615, size: 85 bytes, params: 2, frame: 13
let binding = env0_1;
binding.set(contentOffset.x);
binding = env0_2;
binding.set(contentSize.width);
binding = env0_3;
binding.set(layoutMeasurement.width);
}
function _fun97141({nativeEvent}) { // fn#97141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12867:2492, offset: 0x0217466a, size: 41 bytes, params: 2, frame: 11
const binding = env0_3;
binding.set(nativeEvent.layout.width);
}
function _fun97143() { // fn#97143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12867:2587, offset: 0x02174693, size: 59 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(4000) /* metro dependency 4000: ColorUtils */;
return value.hexWithOpacity(styles.gradient.color, 0);
}
function _fun97144(a0, a1) { // fn#97144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12867:3307, offset: 0x021746ce, size: 200 bytes, params: 3, frame: 24
let value = environment.__proto__;
const AttachmentPreview = importDefault(11143) /* metro dependency 11143: AttachmentPreview */;
const defaultImportProps = {'uri': null, 'width': 60, 'height': 60, uri: a0.uri};
value = require(4660) /* metro dependency 4660: UploadUtils */;
defaultImportProps.isImage = value.isImage(a0.uri, a0.mimeType);
value = require(4660) /* metro dependency 4660: UploadUtils */;
defaultImportProps.isVideo = value.isVideo(a0.uri, a0.mimeType);
defaultImportProps.fileName = a0.name;
defaultImportProps.showPlayOnVideoPreview = true;
return (
<View style={styles.attachmentPreview} key={a1}>
<AttachmentPreview {...defaultImportProps} />
</View>
);
}
@@ -0,0 +1,97 @@
/* Metro module 9788; source: modules/share/native/ShareChatInput.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 477, 7875, 7980, 1244, 5278, 7950, 2] */
function _fun76730(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9974:6, offset: 0x01de27d9, size: 560 bytes, params: 8, frame: 26
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = 0;
importAll(dependencyMap[value]);
const env0_3 = (require(27) /* metro dependency 27 */).View;
const value2 = 2;
const Fonts = require(dependencyMap[value2]).Fonts;
const value3 = require(33) /* metro dependency 33 */;
const env0_4 = value3.jsx;
const env0_5 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object5 = {'flex': 1, 'flexDirection': 'row', 'backgroundColor': null, 'borderRadius': 20};
const REDESIGN_CHAT_INPUT_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_CHAT_INPUT_BACKGROUND;
object5.backgroundColor = REDESIGN_CHAT_INPUT_BACKGROUND;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.paddingHorizontal = PX_12;
object3.container = object5;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object3.chatInput = {'flex': 1, 'paddingVertical': 0, 'paddingHorizontal': null, 'maxHeight': 80,
paddingHorizontal: PX_4};
const object7 = {'fontSize': 16, 'lineHeight': 20};
const PRIMARY_NORMAL = Fonts.PRIMARY_NORMAL;
object7.fontFamily = PRIMARY_NORMAL;
const TEXT_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_STRONG;
object7.color = TEXT_STRONG;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
object7.paddingTop = PX_8 + (platformUtilsModule.isAndroid() ? value : value2);
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object7.paddingBottom = PX_8;
object3.chatText = object7;
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object3.inputPlaceholder = {color: TEXT_MUTED};
const object8 = {};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object8.paddingTop = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object8.paddingBottom = PX_8;
object8.alignSelf = 'flex-end';
object3.emojiButton = object8;
const env0_6 = Reflect.apply(createStyles, createStylesModule, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/native/ShareChatInput.tsx');
exports.default = ShareChatInput;
}
function ShareChatInput({text, inputRef, onChange, onSelectionChange, onFocus, onBlur, onPressEmoji, onSend, disabled}) { // fn#76731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9974:850, offset: 0x01de2a09, size: 522 bytes, params: 2, frame: 31
disabled = !(disabled === undefined) && disabled;
const styles = useStyles();
const value2 = (importDefault(7875) /* metro dependency 7875: useMessageMaxLength */)();
const FormInput = importDefault(7980) /* metro dependency 7980: FormInput */;
const object = {ref: inputRef, maxLength: value2};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const ZroO3G = (require(1244) /* metro dependency 1244: indexNative */).t.ZroO3G;
object.placeholder = Reflect.apply(string, intl, [ZroO3G]);
object.placeholderTextColor = styles.inputPlaceholder.color;
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/+MXmw']);
object.onSubmitEditing = onSend;
object.onSelectionChange = onSelectionChange;
object.style = styles.chatInput;
object.value = text;
object.onChange = onChange;
object.onFocus = onFocus;
object.onBlur = onBlur;
object.multiline = true;
object.showBorder = false;
object.showTopContainer = false;
object.textAlignVertical = 'center';
object.inputTextStyle = styles.chatText;
object.editable = !disabled;
const formInput = <FormInput {...object} />;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
string = intl.string;
const iZ7Mz9 = (require(1244) /* metro dependency 1244: indexNative */).t.iZ7Mz9;
const ReactionIcon = (require(7950) /* metro dependency 7950: ReactionIcon */).ReactionIcon;
return (
<View style={styles.container}>
{formInput}
<PressableOpacity
accessibilityLabel={Reflect.apply(string, intl, [iZ7Mz9])}
accessibilityRole="button"
onPress={onPressEmoji}
style={styles.emojiButton}
disabled={disabled}
>
<ReactionIcon size="md" />
</PressableOpacity>
</View>
);
}
+180
View File
@@ -0,0 +1,180 @@
/* Metro module 12678; source: modules/share/native/ShareEmbed.tsx; dependencies: [31, 27, 33, 4501, 697, 5461, 4573, 2] */
function _fun97145(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12868:6, offset: 0x02174796, size: 435 bytes, params: 8, frame: 25
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_3 = value.Image;
const env0_4 = value.View;
value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {'flexDirection': 'row', 'height': 80, 'backgroundColor': null, 'borderColor': null,
'borderWidth': 1, 'borderRadius': null, 'overflow': 'hidden'};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.backgroundColor = BACKGROUND_BASE_LOW;
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object4.borderColor = BORDER_STRONG;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.container = object4;
object3.containerRevamp = {borderWidth: 0};
object3.thumbnail = {width: 80};
object3.contentContainer = {'flex': 1, 'flexDirection': 'column', 'justifyContent': 'center', 'paddingLeft': 12,
'paddingRight': 24};
object3.authorView = {'flexDirection': 'row', 'alignItems': 'center', 'marginBottom': 3};
const object6 = {'height': 16, 'width': 16, 'borderRadius': null, 'marginRight': 4};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.authorThumbnail = object6;
object3.loadingSpinner = {flex: 1};
const env0_8 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/native/ShareEmbed.tsx');
exports.default = ShareEmbed;
}
function ShareEmbed({embed, isLoadingEmbed, isRevamp}) { // fn#97146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12868:806, offset: 0x02174949, size: 425 bytes, params: 2, frame: 30
var r5;
var r0;
var jsxRuntimeEnv0_7Binding;
var items2;
const styles = useStyles();
const binding = styles;
const useMemo = binding.useMemo;
const items = [embed];
const value3 = Reflect.apply(useMemo, binding, [function() {
var r1;
if (embed != null) {
var property = embed.thumbnail;
var value2 = undefined;
r1 = property == null ? value2 : property.url;
r1 = r1 ?? (embed.image == null ? value2 : embed.image.url);
if (r1 != null) {
return {uri: r1};
}
}
}, items]);
const value4 = binding.useMemo(_fun97148, [isLoadingEmbed, styles]);
const value5 = binding.useMemo(_fun97149, [embed, styles]);
const value6 = binding.useMemo(_fun97150, [embed]);
const value7 = binding.useMemo(_fun97151, [embed, value6]);
const value8 = binding.useMemo(_fun97152, [embed]);
if (embed != null) {
var viewProps = {style: [styles.container, isRevamp ? styles.containerRevamp : undefined]};
if (isLoadingEmbed) {
r5 = value4;
} else {
jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
items2 = [value3 != null && <Image style={styles.thumbnail} source={value3} resizeMode="cover" />];
items2[1] = <View style={styles.contentContainer}>{value5}{value6}{value7}{value8}</View>;
r5 = <>{items2}</>;
}
r0 = <View {...viewProps}>{r5}</View>;
} else if (isLoadingEmbed) {
var viewProps = {style: [styles.container, isRevamp ? styles.containerRevamp : undefined]};
if (isLoadingEmbed) {
r5 = value4;
} else {
jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
items2 = [value3 != null && <Image style={styles.thumbnail} source={value3} resizeMode="cover" />];
items2[1] = <View style={styles.contentContainer}>{value5}{value6}{value7}{value8}</View>;
r5 = <>{items2}</>;
}
r0 = <View {...viewProps}>{r5}</View>;
} else {
r0 = null;
}
return r0;
}
function _fun97148() { // fn#97148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12868:1045, offset: 0x02174b46, size: 71 bytes, params: 1, frame: 15
if (isLoadingEmbed) {
const ActivityIndicator = (require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator;
return <ActivityIndicator style={styles.loadingSpinner} />;
} else {
return null;
}
}
function _fun97149() { // fn#97149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12868:1131, offset: 0x02174b8d, size: 219 bytes, params: 1, frame: 22
const author = embed?.author;
if (author == null) {
return null;
}
const r12 = author.proxy_icon_url ?? author.icon_url;
const r7 = r12 != null && <Image style={styles.authorThumbnail} source={{uri: r12}} resizeMode="cover" />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.authorView}>
{r7}
<Text
variant="text-xs/semibold"
color="mobile-text-heading-primary"
ellipsizeMode="tail"
lineClamp={1}
>
{author.name}
</Text>
</View>
);
}
function _fun97150() { // fn#97150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12868:1507, offset: 0x02174c68, size: 112 bytes, params: 1, frame: 17
var r0;
var value;
const embedBinding = embed;
const value2 = null;
const title = value2 == embedBinding ? undefined : embed.title;
if (value2 != title) {
value = environment.__proto__;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
value = <Text style={{marginVertical: 1}} variant="text-xs/semibold" color="mobile-text-heading-primary" lineClamp={1} ellipsizeMode="tail">{title}</Text>;
r0 = value;
} else {
r0 = value2;
}
return r0;
}
function _fun97151() { // fn#97151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12868:1731, offset: 0x02174cd8, size: 125 bytes, params: 1, frame: 17
var r0;
var value;
const embedBinding = embed;
const value2 = null;
const description = value2 == embedBinding ? undefined : embed.description;
if (value2 == env0_3) {
if (value2 != description) {
value = environment.__proto__;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
value = <Text style={{marginVertical: 1}} variant="text-xs/medium" color="text-default" lineClamp={1} ellipsizeMode="tail">{description}</Text>;
r0 = value;
} else {
r0 = value2;
}
} else {
r0 = value2;
}
return r0;
}
function _fun97152() { // fn#97152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12868:1955, offset: 0x02174d55, size: 112 bytes, params: 1, frame: 17
var r0;
var value;
const embedBinding = embed;
const value2 = null;
const url = value2 == embedBinding ? undefined : embed.url;
if (value2 != url) {
value = environment.__proto__;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
value = <Text style={{marginVertical: 1}} variant="text-xs/medium" color="text-link" lineClamp={1} ellipsizeMode="tail">{url}</Text>;
r0 = value;
} else {
r0 = value2;
}
return r0;
}
@@ -0,0 +1,83 @@
/* Metro module 9771; source: modules/share/native/ShareFooterLayout.tsx; dependencies: [31, 27, 33, 4501, 697, 5463, 4017, 4577, 4581, 4573, 2] */
function _fun76683(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9957:6, offset: 0x01ddfd62, size: 498 bytes, params: 8, frame: 23
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.Fragment;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object5 = {'display': 'flex', 'flexDirection': 'column', 'flexShrink': 0};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingHorizontal = PX_16;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.paddingVertical = PX_12;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.gap = PX_12;
const BACKGROUND_SURFACE_HIGHEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGHEST;
object5.backgroundColor = BACKGROUND_SURFACE_HIGHEST;
object5.borderTopWidth = 1;
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object5.borderTopColor = BORDER_SUBTLE;
object4.footer = object5;
const object6 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.marginHorizontal = -PX_16;
object6.borderBottomWidth = 1;
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object6.borderBottomColor = BORDER_SUBTLE;
object4.footerSeparator = object6;
object4.warningWrapper = {'display': 'flex', 'flexDirection': 'column', 'gap': 8};
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.chatRow = {'display': 'flex', 'flexDirection': 'row', 'gap': null, 'alignItems': 'flex-end', gap: PX_12};
const env0_7 = Reflect.apply(createStyles, value, [object4]);
object4 = {code: "function ShareFooterLayoutTsx1(){const{withSpring,footerPaddingBottom,ON_PRESS_SPRING}=this.__closure;return{paddingBottom:withSpring(footerPaddingBottom,ON_PRESS_SPRING,'respect-motion-settings')};}"};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/native/ShareFooterLayout.tsx');
exports.default = ShareFooterLayout;
}
function ShareFooterLayout({preview, chatInput, sendButton, warningText, avoidKeyboard}) { // fn#76684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9957:1035, offset: 0x01ddff54, size: 508 bytes, params: 2, frame: 28
var object2;
const styles = useStyles();
const value2 = styles.footer.paddingVertical + (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: avoidKeyboard,
includeCustomKeyboardHeight: false}).insets.bottom;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = ShareFooterLayoutF;
object2 = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, footerPaddingBottom: value2};
const ON_PRESS_SPRING = (require(4581) /* metro dependency 4581: springPresets */).ON_PRESS_SPRING;
object2.ON_PRESS_SPRING = ON_PRESS_SPRING;
closure.__closure = object2;
closure.__workletHash = 2871405301293;
closure.__initData = env0_8;
const value3 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View2 style={[styles.footer, value3]}>
{preview != null ? <>{preview}<View style={styles.footerSeparator} /></> : null}
<View style={styles.warningWrapper}>
<View style={styles.chatRow}>
{chatInput}
{sendButton}
</View>
{warningText != null && ((Text) => <Text variant="text-sm/normal" color="text-feedback-warning">{warningText}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View>
</View2>
);
}
function ShareFooterLayoutF() { // fn#76685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9957:1284, owner: ShareFooterLayout.f, offset: 0x01de0150, size: 77 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(4577) /* metro dependency 4577: spring */;
const withSpring = value.withSpring;
const binding = env0_0;
const ON_PRESS_SPRING = (require(4581) /* metro dependency 4581: springPresets */).ON_PRESS_SPRING;
return {paddingBottom: Reflect.apply(withSpring, value, [binding, ON_PRESS_SPRING, 'respect-motion-settings'])};
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,8 @@
/* Metro module 12612; source: modules/share/native/ShareScreenConstants.tsx; dependencies: [2] */
function _fun96750(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12802:6, offset: 0x02165165, size: 84 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/native/ShareScreenConstants.tsx');
exports.SHARE_SCREEN_MODAL_KEY = 'share_screen_modal';
}
@@ -0,0 +1,25 @@
/* Metro module 12679; source: modules/share/native/ShareScreenFooter.tsx; dependencies: [31, 33, 9770, 9771, 4578, 9788, 2] */
function _fun97153(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12869:6, offset: 0x02174dc5, size: 138 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/native/ShareScreenFooter.tsx');
exports.default = ShareScreenFooter;
}
function ShareScreenFooter({text, setText, preview, sendLabel, canSend, isSending, onSend, appEntryKey, disabled}) { // fn#97154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12869:204, offset: 0x02174e4f, size: 331 bytes, params: 2, frame: 31
disabled = !(disabled === undefined) && disabled;
const {textInputRef, isInputFocused, handleSelectionChange, handleMessageFocus, handleMessageBlur,
handlePressEmoji} = (require(9770) /* metro dependency 9770: useShareChatInputActions */).useShareChatInputActions(setText,
undefined, appEntryKey);
const ShareFooterLayout = importDefault(9771) /* metro dependency 9771: ShareFooterLayout */;
const object2 = {preview: preview};
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
object2.sendButton = <Button variant="primary" size="md" text={sendLabel} disabled={canSend ? disabled : !canSend} onPress={isSending ? undefined : onSend} loading={isSending} />;
object2.chatInput = ((Component) => <Component inputRef={textInputRef} text={text} onChange={setText} onSelectionChange={handleSelectionChange} onFocus={handleMessageFocus} onBlur={handleMessageBlur} onPressEmoji={handlePressEmoji} onSend={onSend} disabled={disabled} />)(importDefault(9788) /* metro dependency 9788: ShareChatInput */);
object2.avoidKeyboard = isInputFocused;
return <ShareFooterLayout {...object2} />;
}
@@ -0,0 +1,302 @@
/* Metro module 12673; source: modules/share/native/ShareScreenModal.tsx; dependencies: [5, 57, 31, 27, 1379, 12612, 33, 3, 5080, 566, 4603, 677, 12674, 2] */
function _fun97084(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12863:6, offset: 0x021723cd, size: 287 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).NativeModules;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_8 = (require(12612) /* metro dependency 12612: ShareScreenConstants */).SHARE_SCREEN_MODAL_KEY;
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
let value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('ShareScreenModal');
const onClose_97085 = function() {
importDefault(dependencyMap[8]).popWithKey(SHARE_SCREEN_MODAL_KEY);
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/native/ShareScreenModal.tsx');
exports.default = ShareScreenModal;
}
function ShareScreenModal({text, channelId, shareId, attachmentManifest}) { // fn#97086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12863:364, offset: 0x02172516, size: 345 bytes, params: 2, frame: 25
const binding = env0_5;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [null]);
const binding2 = env0_4;
const value3 = binding2(value2, 2);
const property = value3[0];
var env0_5 = value3[1];
binding.useEffect(function() {
var env0_0 = _fun97088;
_fun97091();
}, [shareId, attachmentManifest]);
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
useState = binding.useState;
const value4 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property2 = value4[0];
const env0_7 = value4[1];
binding.useEffect(function() {
var env0_0 = _fun97094;
_fun97097();
}, [channelId, channel]);
return ((Component) => <Component sharedContent={env0_5.useMemo(_fun97098, [text, property, channelId,
channel ?? property2])} onClose={onClose_97085} />)(importDefault(12674) /* metro dependency 12674: ShareScreen */);
}
function _fun97087() { // fn#97087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12863:502, offset: 0x0217266f, size: 31 bytes, params: 1, frame: 9
(function() {
return _fetchAttachments.apply(this, arguments);
})();
}
function _fun97093() { // fn#97093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12863:941, offset: 0x02172745, size: 31 bytes, params: 1, frame: 9
(function() {
return _fetchChannel.apply(this, arguments);
})();
}
function _fun97098() { // fn#97098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12863:1257, offset: 0x02172822, size: 255 bytes, params: 1, frame: 15
var r3;
var binding;
var Array;
var recipient;
const object2 = {};
object2.text = text;
object2.attachments = env0_4 ?? [];
if (env0_8 != null) {
var type = env0_8.type;
var value3 = undefined;
var ChannelTypes = (require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes;
var DM = ChannelTypes.DM;
if (type !== DM) {
object2.targetChannelId = channelId;
return object2;
}
binding = env0_8;
if (binding) {
if ('recipients' in binding) {
Array = global.Array;
if (Array.isArray(binding.recipients)) {
object2.targetUserId = env0_8.recipients[0];
} else {
binding = env0_8;
r3 = binding && 'recipient' in binding;
r3 = r3 && 'id' in binding.recipient;
if (r3) {
recipient = env0_8.recipient;
object2.targetUserId = recipient == null ? value3 : recipient.id;
}
}
} else {
binding = env0_8;
r3 = binding && 'recipient' in binding;
r3 = r3 && 'id' in binding.recipient;
if (r3) {
recipient = env0_8.recipient;
object2.targetUserId = recipient == null ? value3 : recipient.id;
}
}
} else {
binding = env0_8;
r3 = binding && 'recipient' in binding;
r3 = r3 && 'id' in binding.recipient;
if (r3) {
recipient = env0_8.recipient;
object2.targetUserId = recipient == null ? value3 : recipient.id;
}
}
}
return object2;
}
function _fetchAttachments() { // fn#97088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12863:507, offset: 0x0217268e, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__;
return env2_3(_fun97090).apply(this, arguments);
}
function _fetchChannel() { // fn#97094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12863:946, offset: 0x02172764, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__;
return env2_3(_fun97096).apply(this, arguments);
}
function* _fun97090() { // fn#97090, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12863:564, offset: 0x021726ce, size: 119 bytes, params: 1, frame: 16
var binding;
var ShareManager;
var sharedAttachments;
var value4;
var value5;
var value6;
var error;
if (true) {
value = environment.__proto__.__proto__.__proto__;
if (dependencyMap !== undefined) {
if (env3_3 === undefined) {
return undefined;
}
try {
binding = env4_6;
} catch (error) {
binding = env4_10;
binding.error('Error fetching attachments:', error);
return undefined;
}
try {
ShareManager = binding.ShareManager;
} catch (error) {
binding = env4_10;
binding.error('Error fetching attachments:', error);
return undefined;
}
try {
sharedAttachments = ShareManager.sharedAttachments;
} catch (error) {
binding = env4_10;
binding.error('Error fetching attachments:', error);
return undefined;
}
try {
} catch (error) {
binding = env4_10;
binding.error('Error fetching attachments:', error);
return undefined;
}
try {
binding = env3_3;
} catch (error) {
binding = env4_10;
binding.error('Error fetching attachments:', error);
return undefined;
}
try {
value4 = Reflect.apply(sharedAttachments, ShareManager, [dependencyMap, binding]);
} catch (error) {
binding = env4_10;
binding.error('Error fetching attachments:', error);
return undefined;
}
yield value4;
try {
value5 = undefined;
value6 = false;
} catch (error) {
binding = env4_10;
binding.error('Error fetching attachments:', error);
return undefined;
}
if (value6) {
return value5;
}
try {
binding = env3_5;
} catch (error) {
binding = env4_10;
binding.error('Error fetching attachments:', error);
return undefined;
}
try {
binding(value5);
} catch (error) {
binding = env4_10;
binding.error('Error fetching attachments:', error);
}
}
}
}
function* _fun97096() { // fn#97096, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12863:995, offset: 0x021727a4, size: 126 bytes, params: 1, frame: 15
var binding;
var binding2;
var property;
var value4;
var fetchChannel;
var channel;
var value5;
var value6;
var error;
if (true) {
value = environment.__proto__.__proto__.__proto__;
if (importDefault != null) {
if (NativeModules != null) {
return undefined;
}
try {
binding = env4_1;
} catch (error) {
binding = env4_10;
binding.error('Error fetching channel:', error);
return undefined;
}
try {
binding2 = env4_2;
} catch (error) {
binding = env4_10;
binding.error('Error fetching channel:', error);
return undefined;
}
try {
property = binding2[10];
} catch (error) {
binding = env4_10;
binding.error('Error fetching channel:', error);
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
binding = env4_10;
binding.error('Error fetching channel:', error);
return undefined;
}
try {
fetchChannel = value4.fetchChannel;
} catch (error) {
binding = env4_10;
binding.error('Error fetching channel:', error);
return undefined;
}
try {
} catch (error) {
binding = env4_10;
binding.error('Error fetching channel:', error);
return undefined;
}
try {
channel = Reflect.apply(fetchChannel, value4, [importDefault]);
} catch (error) {
binding = env4_10;
binding.error('Error fetching channel:', error);
return undefined;
}
yield channel;
try {
value5 = undefined;
value6 = false;
} catch (error) {
binding = env4_10;
binding.error('Error fetching channel:', error);
return undefined;
}
if (value6) {
return value5;
}
try {
} catch (error) {
binding = env4_10;
binding.error('Error fetching channel:', error);
return undefined;
}
try {
ChannelStore(value5);
} catch (error) {
binding = env4_10;
binding.error('Error fetching channel:', error);
}
}
}
}
+107
View File
@@ -0,0 +1,107 @@
/* Metro module 12676; source: modules/share/native/ShareUtils.tsx; dependencies: [5, 4645, 4503, 3857, 9836, 7879, 7165, 4650, 4648, 7076, 7864, 7067, 2] */
function _fun97128(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12866:6, offset: 0x02173b51, size: 186 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
const env0_5 = (require(4503) /* metro dependency 4503: MessageConstants */).MessageSendLocation;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/native/ShareUtils.tsx');
exports.showInformationToast = showInformationToast;
exports.sendShareMessage = function() {
return _sendShareMessage.apply(this, arguments);
};
}
function _sendShareMessage() { // fn#97129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12866:156, offset: 0x02173c0b, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun97131).apply(this, arguments);
}
function showInformationToast(a0) { // fn#97134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12866:1110, offset: 0x02173f0d, size: 91 bytes, params: 2, frame: 17
const value = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
const open = value.open;
const object2 = {};
object2.key = 'INFORMATION_TOAST-' + a0;
object2.content = a0;
object2.icon = importDefault(9836) /* metro dependency 9836 */;
Reflect.apply(open, value, [object2]);
}
async function _fun97131({attachments, channel, comment}) { // fn#97131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12866:213, offset: 0x02173c51, size: 371 bytes, params: 2, frame: 24
var value8;
if (false) {
return undefined;
}
await undefined;
if (false) {
return undefined;
}
let id = channel.id;
value = attachments.map(_fun97132);
let binding = env2_1;
const value5 = binding(env2_2[9]);
const value7 = value5.parse(channel, comment ?? '');
if (value.length > 0) {
value8 = env2_1(env2_2[5]);
value8.clearAll(id, env2_4.ChannelMessage);
}
binding = env2_0;
const binding2 = env2_2;
const Future = binding(binding2[10]).Future;
const future = new Future();
const value11 = env2_1(binding2[11]);
const sendMessage = value11.sendMessage;
id = channel.id;
const SHARE_MODAL = env2_5.SHARE_MODAL;
await Reflect.apply(sendMessage, value11, [id, value7, false, {location: SHARE_MODAL, doNotNotifyOnError: true,
attachmentsToUpload: value, onAttachmentUploadError: onAttachmentUploadError_97133}]);
if (false) {
return undefined;
}
future.resolve(undefined);
return future.promise;
}
function _fun97132(a0) { // fn#97132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12866:280, offset: 0x02173dc4, size: 160 bytes, params: 2, frame: 15
const object2 = {};
object2.uri = a0.uri;
object2.originalUri = a0.uri;
object2.mimeType = a0.mimeType;
object2.filename = a0.name;
let value = environment.__proto__.__proto__.__proto__;
const binding = env3_0;
const binding2 = env3_2;
const UploadPlatform = binding(binding2[7]).UploadPlatform;
const REACT_NATIVE = UploadPlatform.REACT_NATIVE;
object2.platform = REACT_NATIVE;
object2.width = a0.width;
object2.height = a0.height;
const CloudUpload = binding(binding2[8]).CloudUpload;
const id = channel.id;
value = Object.create(CloudUpload.prototype, {constructor: {value: CloudUpload}});
const cloudUpload = new CloudUpload(object2, id);
return cloudUpload instanceof Object ? cloudUpload : value;
}
function onAttachmentUploadError_97133() { // fn#97133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12866:718, offset: 0x02173e64, size: 169 bytes, params: 1, frame: 21
let binding = env0_4;
binding.reject(undefined);
const object2 = {uploads: env0_3};
object2.channelId = id;
object2.comment = comment;
const uploads = object2.uploads;
const channelId = object2.channelId;
const comment2 = object2.comment;
binding = env3_1;
const binding2 = env3_2;
const value2 = binding(binding2[5]);
const setUploads = value2.setUploads;
let ChannelMessage = env3_4.ChannelMessage;
Reflect.apply(setUploads, value2, [{channelId: channelId, uploads: uploads, draftType: ChannelMessage,
resetState: true}]);
const value3 = binding(binding2[6]);
const saveDraft = value3.saveDraft;
ChannelMessage = env3_4.ChannelMessage;
Reflect.apply(saveDraft, value3, [channelId, comment2, ChannelMessage]);
}
@@ -0,0 +1,78 @@
/* Metro module 9770; source: modules/share/native/useShareChatInputActions.tsx; dependencies: [57, 31, 1881, 8529, 2] */
function _fun76674(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9956:6, offset: 0x01ddf99b, size: 155 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(1881) /* metro dependency 1881: EmojiConstants */).EmojiIntention;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/native/useShareChatInputActions.tsx');
exports.useShareChatInputActions = useShareChatInputActions;
}
function useShareChatInputActions(a0, a1, a2) { // fn#76675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9956:251, offset: 0x01ddfa36, size: 308 bytes, params: 4, frame: 22
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const binding = env0_3;
const value2 = binding.useRef(null);
const env0_4 = binding.useRef({'start': 0, 'end': 0});
let value = env0_2(binding.useState(false), 2);
const property = value[0];
const env0_5 = value[1];
let useCallback = binding.useCallback;
value = Reflect.apply(useCallback, binding, [_fun76676, []]);
const value4 = binding.useCallback(_fun76677, []);
const value5 = binding.useCallback(_fun76678, []);
const value6 = binding.useCallback(_fun76679, [a0]);
const value7 = binding.useCallback(_fun76681, []);
useCallback = binding.useCallback;
return {textInputRef: value2, isInputFocused: property, handleSelectionChange: value, handleMessageFocus: value4,
handleMessageBlur: value5, handlePressEmoji: Reflect.apply(useCallback, binding, [_fun76682, [value7, value6,
a1, a2]])};
}
function _fun76676({nativeEvent}) { // fn#76676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9956:398, offset: 0x01ddfb6a, size: 41 bytes, params: 2, frame: 12
const binding = env0_4;
const object2 = {};
copyDataProperties(object2, nativeEvent.selection, nativeEvent);
binding.current = object2;
}
function _fun76679(a0) { // fn#76679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9956:532, offset: 0x01ddfbb7, size: 156 bytes, params: 2, frame: 16
(a0.id != null ? ':' + (a0.uniqueName == null ? a0.name : a0.uniqueName !== '' ? a0.uniqueName : a0.name) + ': ' : a0.surrogates ?? ':' + (a0.uniqueName == null ? a0.name : a0.uniqueName !== '' ? a0.uniqueName : a0.name) + ': ')(_fun76680);
const current = env0_3.current;
if (current != null) {
current.focus();
}
}
function _fun76682() { // fn#76682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9956:857, offset: 0x01ddfcb9, size: 169 bytes, params: 1, frame: 16
const current = env0_3.current;
if (current != null) {
current.blur();
}
const value3 = undefined;
const openEmojiPickerActionSheetModule = require(8529) /* metro dependency 8529: openEmojiPickerActionSheet */;
const openEmojiPickerActionSheet = openEmojiPickerActionSheetModule.openEmojiPickerActionSheet;
const object2 = {onPressEmoji: env0_6, onClose: env0_7};
const CHAT = EmojiIntention.CHAT;
object2.pickerIntention = CHAT;
object2.autoFocus = false;
object2.startExpanded = false;
object2.channel = require;
object2.appEntryKey = importDefault;
object2.guildId = (require == null ? value3 : require.getGuildId()) ?? value3;
Reflect.apply(openEmojiPickerActionSheet, openEmojiPickerActionSheetModule, [object2]);
return value3;
}
function _fun76680(a0) { // fn#76680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9956:680, offset: 0x01ddfc53, size: 70 bytes, params: 2, frame: 14
const slice = a0.slice;
let value = environment.__proto__;
const binding = env1_4;
value = Reflect.apply(slice, a0, [0, binding.current.start]);
value += surrogates;
return value + a0.slice(binding.current.end);
}
@@ -0,0 +1,82 @@
/* Metro module 9766; source: modules/share/useAutocompleter.tsx; dependencies: [57, 31, 6518, 7234, 2] */
function _fun76652(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9952:6, offset: 0x01ddee2e, size: 133 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/useAutocompleter.tsx');
exports.default = useAutocompleter;
}
function useAutocompleter({searchOptions}) { // fn#76653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9952:194, offset: 0x01ddeeb3, size: 218 bytes, params: 2, frame: 18
var object2;
const binding = env0_3;
const value3 = env0_2(binding.useState({results: [], query: ''}), 2);
const property = value3[0];
const env0_1 = value3[1];
let value = importDefault(6518) /* metro dependency 6518: useInitialValue */;
value = value(_fun76654);
binding.useEffect(function() {
return _fun76657;
}, [value]);
binding.useEffect(_fun76658, [value, searchOptions]);
object2 = {};
object2.search = binding.useCallback(_fun76659, [value]);
copyDataProperties(object2, property, value3);
return object2;
}
function _fun76654() { // fn#76654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9952:313, offset: 0x01ddef8d, size: 85 bytes, params: 1, frame: 11
var environment;
let value = environment.__proto__;
value = importDefault(7234) /* metro dependency 7234: autocompleter */;
value = new value(_fun76655);
value.setLimit(20);
value.search('');
return value;
}
function _fun76656() { // fn#76656, offset: 0x01ddf004, size: 11 bytes, params: 1, frame: 1
return _fun76657;
}
function _fun76658() { // fn#76658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9952:471, offset: 0x01ddf022, size: 59 bytes, params: 1, frame: 12
var binding;
if (searchOptions != null && searchOptions !== env0_2.options) {
binding = env0_2;
binding.setOptions(searchOptions);
}
}
function _fun76659({query, resultTypes}) { // fn#76659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9952:548, offset: 0x01ddf05d, size: 151 bytes, params: 2, frame: 16
var binding;
if (!(env0_2.resultTypes != null && ((a0, a1) => {
var env0_0 = a1;
return a0.length === a1.size && a0.every(_fun76661);
})(resultTypes, env0_2.resultTypes))) {
binding = env0_2;
binding.setResultTypes(resultTypes);
binding.setLimit(resultTypes.length !== 1 ? 20 : 50);
}
binding = env0_2;
const search = binding.search;
const value = query.trim();
const value6 = '';
Reflect.apply(search, binding, [value6 === value ? value6 : query]);
}
function _fun76655(a0, a1) { // fn#76655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9952:338, offset: 0x01ddefe2, size: 34 bytes, params: 3, frame: 11
env1_1({results: a0, query: a1});
}
function _fun76657() { // fn#76657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9952:436, offset: 0x01ddf00f, size: 19 bytes, params: 1, frame: 9
return env1_2.destroy();
}
function isArrayEqualSet(a0, a1) { // fn#76660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9952:597, offset: 0x01ddf0f4, size: 49 bytes, params: 3, frame: 12
const env0_0 = a1;
return a0.length === a1.size && a0.every(function(a0) {
return require.has(a0);
});
}
@@ -0,0 +1,384 @@
/* Metro module 12675; source: modules/share/useFetchShareEmbed.tsx; dependencies: [5, 57, 31, 1471, 11467, 690, 2] */
function _fun97116(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12865:6, offset: 0x0217373b, size: 153 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/useFetchShareEmbed.tsx');
exports.default = useFetchShareEmbed;
}
function useFetchShareEmbed(a0) { // fn#97117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12865:206, offset: 0x021737d4, size: 193 bytes, params: 2, frame: 21
const env0_0 = a0;
const binding = env0_5;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [undefined]);
const binding2 = env0_4;
let value = binding2(value2, 2);
const property = value[0];
const env0_1 = value[1];
useState = binding.useState;
value = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value[0];
const env0_2 = value[1];
useState = binding.useState;
value = binding2(Reflect.apply(useState, binding, [false]), 2);
const property3 = value[0];
const env0_3 = value[1];
var env0_4 = binding.useRef(true);
var env0_5 = binding.useRef(undefined);
binding.useEffect(_fun97118, [a0]);
return {embed: property, isLoading: property2, hasTriedResolving: property3};
}
function _fun97118() { // fn#97118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12865:419, offset: 0x02173895, size: 256 bytes, params: 1, frame: 17
var value6;
if (env0_0 == null) {
env0_4.current = false;
env0_1(undefined);
return undefined;
}
if (env0_0 === '') {
env0_4.current = false;
env0_1(undefined);
return undefined;
}
const binding = env0_0;
const match = binding.match;
const value3 = undefined;
const URL_REGEX = (importDefault(1471) /* metro dependency 1471: URLUtils */).URL_REGEX;
const value4 = Reflect.apply(match, binding, [URL_REGEX]);
const r3 = value4 == null ? value3 : value4.at(0);
if (r3 !== env0_5.current) {
env0_5.current = r3;
if (r3 == null) {
env0_1(value3);
env0_4.current = false;
return value3;
}
value6 = _fun97119();
if (env0_4.current) {
env0_4.current = false;
value6();
}
var env0_1 = global.setTimeout(value6, 1000);
return _fun97127;
}
return value3;
}
function _fun97119() { // fn#97119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12865:625, offset: 0x02173995, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_3(_fun97121);
return _fun97126;
}
function _fun97127() { // fn#97127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12865:967, offset: 0x02173b39, size: 24 bytes, params: 1, frame: 11
global.clearTimeout(env0_1);
}
function* _fun97121() { // fn#97121, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12865:645, offset: 0x021739c4, size: 344 bytes, params: 1, frame: 19
var environment;
var value;
var value2;
var value3;
var binding;
var binding2;
var property;
var value4;
var unfurlEmbedUrl;
var value5;
var object;
var value6;
var value7;
var value8;
var embeds;
var length;
var value9;
var batchUpdates;
var error;
exceptionLanding44: while (true) {
value = undefined;
value2 = false;
if (value2) {
return value;
}
value = environment.__proto__.__proto__.__proto__;
reducibleJoin4: while (true) {
reduciblePort43: while (true) {
exceptionLanding39: while (true) {
try {
try {
} catch (error) {
break exceptionLanding39;
}
} catch (error) {
break exceptionLanding44;
}
break reducibleJoin4;
}
try {
} catch (error) {
break exceptionLanding44;
}
try {
importDefault(undefined);
} catch (error) {
break exceptionLanding44;
}
break reduciblePort43;
}
value = environment.__proto__.__proto__.__proto__.__proto__;
binding = env4_0;
value = binding(env4_2[5]);
batchUpdates = value.batchUpdates;
Reflect.apply(batchUpdates, value, [_fun97124]);
return undefined;
}
try {
try {
dependencyMap(true);
} catch (error) {
break exceptionLanding39;
}
} catch (error) {
break exceptionLanding44;
}
value3 = environment.__proto__.__proto__.__proto__.__proto__;
try {
try {
binding = env4_0;
} catch (error) {
break exceptionLanding39;
}
} catch (error) {
break exceptionLanding44;
}
try {
try {
binding2 = env4_2;
} catch (error) {
break exceptionLanding39;
}
} catch (error) {
break exceptionLanding44;
}
try {
try {
property = binding2[4];
} catch (error) {
break exceptionLanding39;
}
} catch (error) {
break exceptionLanding44;
}
try {
try {
value4 = binding(property);
} catch (error) {
break exceptionLanding39;
}
} catch (error) {
break exceptionLanding44;
}
try {
try {
unfurlEmbedUrl = value4.unfurlEmbedUrl;
} catch (error) {
break exceptionLanding39;
}
} catch (error) {
break exceptionLanding44;
}
value5 = environment.__proto__.__proto__;
try {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding39;
}
} catch (error) {
break exceptionLanding44;
}
try {
try {
object = [];
} catch (error) {
break exceptionLanding39;
}
} catch (error) {
break exceptionLanding44;
}
try {
try {
object[0] = binding;
} catch (error) {
break exceptionLanding39;
}
} catch (error) {
break exceptionLanding44;
}
try {
try {
value6 = Reflect.apply(unfurlEmbedUrl, value4, [object]);
} catch (error) {
break exceptionLanding39;
}
} catch (error) {
break exceptionLanding44;
}
yield value6;
try {
try {
value7 = undefined;
value8 = false;
} catch (error) {
break exceptionLanding39;
}
} catch (error) {
break exceptionLanding44;
}
if (value8) {
value = env4_0(env4_2[5]);
value.batchUpdates(_fun97122);
return value7;
}
try {
try {
embeds = value7.embeds;
} catch (error) {
break exceptionLanding39;
}
} catch (error) {
break exceptionLanding44;
}
try {
try {
length = embeds.length;
} catch (error) {
break exceptionLanding39;
}
} catch (error) {
break exceptionLanding44;
}
try {
try {
value9 = length === 0;
} catch (error) {
break exceptionLanding39;
}
} catch (error) {
break exceptionLanding44;
}
if (value9) {
try {
try {
} catch (error) {
break exceptionLanding39;
}
} catch (error) {
break exceptionLanding44;
}
try {
try {
importDefault(undefined);
} catch (error) {
break exceptionLanding39;
}
} catch (error) {
break exceptionLanding44;
}
binding = env4_0;
value = binding(env4_2[5]);
value.batchUpdates(_fun97123);
return undefined;
}
try {
try {
} catch (error) {
break exceptionLanding39;
}
} catch (error) {
break exceptionLanding44;
}
try {
try {
object = {};
} catch (error) {
break exceptionLanding39;
}
} catch (error) {
break exceptionLanding44;
}
try {
try {
embeds = value7.embeds;
} catch (error) {
break exceptionLanding39;
}
} catch (error) {
break exceptionLanding44;
}
try {
try {
property = embeds[0];
} catch (error) {
break exceptionLanding39;
}
} catch (error) {
break exceptionLanding44;
}
try {
try {
object.embed = property;
} catch (error) {
break exceptionLanding39;
}
} catch (error) {
break exceptionLanding44;
}
try {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding39;
}
} catch (error) {
break exceptionLanding44;
}
try {
try {
object.url = binding;
} catch (error) {
break exceptionLanding39;
}
} catch (error) {
break exceptionLanding44;
}
try {
try {
importDefault(object);
} catch (error) {
break exceptionLanding39;
}
} catch (error) {
break exceptionLanding44;
}
value = environment.__proto__.__proto__.__proto__.__proto__;
binding = env4_0;
value = binding(env4_2[5]);
batchUpdates = value.batchUpdates;
Reflect.apply(batchUpdates, value, [_fun97124]);
return undefined;
}
value = environment.__proto__.__proto__.__proto__.__proto__;
env4_0(env4_2[5]).batchUpdates(_fun97125);
throw error;
}
function _fun97122() { // fn#97122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12865:830, offset: 0x02173b1c, size: 29 bytes, params: 1, frame: 12
env4_3(true);
dependencyMap(false);
}
@@ -0,0 +1,99 @@
/* Metro module 9762; source: modules/share/useShareSearchResults.tsx; dependencies: [57, 31, 4257, 1226, 6586, 7244, 9763, 566, 9766, 9767, 7232, 2] */
function _fun76612(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9948:6, offset: 0x01ddd380, size: 226 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = makeAutocompleterSearchParams;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const frecencyStore = importDefault(6586) /* metro dependency 6586: FrecencyStore */;
const env0_8 = (require(7244) /* metro dependency 7244: ShareConstants */).ALLOWED_TYPES;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/useShareSearchResults.tsx');
exports.makeAutocompleterSearchParams = closure;
exports.useShareSearchResults = useShareSearchResults;
}
function makeAutocompleterSearchParams(a0) { // fn#76613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9948:170, offset: 0x01ddd462, size: 116 bytes, params: 2, frame: 15
var r1;
var r2;
const {query,
queryMode} = (require(9763) /* metro dependency 9763: QuickSwitcherActionCreators */).getQuickSwitcherOptions(a0);
const value3 = null;
if (value3 != queryMode && ALLOWED_TYPES.includes(queryMode)) {
r1 = [queryMode];
r2 = queryMode;
} else {
r1 = ALLOWED_TYPES;
r2 = value3;
}
return {query: query, queryMode: r2, resultTypes: r1};
}
function useShareSearchResults({targetDestination, selectedDestinations, originDestination, channelFilter, includeMissingDMs}) { // fn#76614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9948:527, offset: 0x01ddd4d6, size: 666 bytes, params: 2, frame: 31
const env0_3 = channelFilter;
includeMissingDMs = !(includeMissingDMs === undefined) && includeMissingDMs;
const env0_4 = includeMissingDMs;
const id = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore], function() {
return AuthenticationStore.getId();
});
let binding = env0_4;
let useMemo = binding.useMemo;
const {search, query,
results} = (importDefault(9766) /* metro dependency 9766: useAutocompleter */)(Reflect.apply(useMemo, binding,
[_fun76616, [id]]));
const useState = binding.useState;
const value5 = env0_3(Reflect.apply(useState, binding, [makeAutocompleterSearchParams('')]), 2);
const property = value5[0];
const value6 = binding.useCallback(_fun76617, [value5[1]]);
const queryMode = property.queryMode;
const r10 = query !== binding.useRef(null).current ? selectedDestinations : binding.useRef(selectedDestinations).current;
binding = env0_4;
binding.useEffect(_fun76618, [query, selectedDestinations]);
binding.useLayoutEffect(_fun76619, [search, property]);
(require(9767) /* metro dependency 9767: FrecencyUserSettingsHooks */).useFrecencySettings();
const frequentlyWithoutFetchingLatest = (require(566) /* metro dependency 566: flux */).useStateFromStores([FrecencyStore],
function() {
return FrecencyStore.getFrequentlyWithoutFetchingLatest();
});
const value = (require(566) /* metro dependency 566: flux */).useStateFromStores([GatewayConnectionStore],
function() {
return GatewayConnectionStore.isConnected();
});
const value9 = query !== '';
useMemo = binding.useMemo;
return {results: Reflect.apply(useMemo, binding, [_fun76622, [results, value9, queryMode, targetDestination,
frequentlyWithoutFetchingLatest, selectedDestinations, r10, originDestination, channelFilter, includeMissingDMs,
value]]), updateSearchText: value6};
}
function _fun76616() { // fn#76616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9948:730, offset: 0x01ddd770, size: 97 bytes, params: 1, frame: 14
const Set = global.Set;
return {searchOptions: {'blacklist': null, 'frecencyBoosters': true, 'userFilters': null,
blacklist: new Set(['user:' + id])}};
}
function _fun76617(a0) { // fn#76617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9948:964, offset: 0x01ddd7d1, size: 31 bytes, params: 2, frame: 12
return env0_10(makeAutocompleterSearchParams(a0));
}
function _fun76618() { // fn#76618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9948:1095, offset: 0x01ddd7f0, size: 52 bytes, params: 1, frame: 3
if (query !== env0_12.current) {
env0_13.current = selectedDestinations;
}
env0_12.current = query;
}
function _fun76619() { // fn#76619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9948:1169, offset: 0x01ddd824, size: 48 bytes, params: 1, frame: 12
search({query: env0_9.query, resultTypes: env0_9.resultTypes});
}
function _fun76622() { // fn#76622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9948:1444, offset: 0x01ddd87a, size: 136 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (importDefault(7232) /* metro dependency 7232: formatResults */)({results: results, hasQuery: env0_17,
queryMode: queryMode, targetDestination: targetDestination, frequentChannels: frequentlyWithoutFetchingLatest,
selectedDestinations: selectedDestinations, pinnedDestinations: env0_14, originDestination: originDestination,
channelFilter: channelFilter, includeMissingDMs: includeMissingDMs, isConnected: env0_16});
}