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

No files matched your search

@@ -1,4 +1,9 @@
/* Metro module 10989; source: modules/markup/native/MarkupInlineChannelMentionRules.tsx; dependencies: [31, 33, 8778, 1305, 1360, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
function _fun84101(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11175:6, offset: 0x01f390c3, size: 154 bytes, params: 8, frame: 19
let env0_0 = require;
const closure = function() {
@@ -8,122 +13,127 @@ function _fun84101(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(33) /* metro dependency 33 */).jsxs;
ReactModule;
let value = closure();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/markup/native/MarkupInlineChannelMentionRules.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/markup/native/MarkupInlineChannelMentionRules.tsx');
exports.inlineChannelMentionReact = inlineChannelMentionReact;
exports.createInlineChannelReact = closure;
exports.inlineChannelReact = value;
}
function createInlineChannelReact() { // fn#84102, offset: 0x01f3915d, size: 30 bytes, params: 1, frame: 3
const value = a0;
const env0_0 = value !== undefined ? value : '💬';
return _fun84103;
}
function inlineChannelMentionReact(a0, a1, a2) { // fn#84104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11175:745, offset: 0x01f39305, size: 175 bytes, params: 4, frame: 21
var r0;
var value;
var LegacyText;
var items2;
if (a0.inContent == null) {
value = require(8778) /* metro dependency 8778: MarkupRulesUtils */;
value = value.smartOutput(a0, a1, a2);
r0 = value;
} else {
LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
value = a1(a0.inContent, a2);
items2 = [value, ' › '];
value = require(8778) /* metro dependency 8778: MarkupRulesUtils */;
items2[2] = value.smartOutput(a0, a1, a2);
value = <LegacyText key={a2.key}>{items2}</LegacyText>;
r0 = value;
}
return r0;
}
function _fun84103(a0, a1, a2) { // fn#84103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11175:170, offset: 0x01f3917b, size: 394 bytes, params: 4, frame: 21
var r6;
var r7;
var value;
var value2;
var binding;
const iconType = a0.iconType;
if (iconType === 'text') {
value = '#';
r6 = undefined;
r7 = value;
} else if (iconType === 'forum') {
value = '#';
r6 = undefined;
r7 = value;
} else if (iconType === 'media') {
value = '#';
r6 = undefined;
r7 = value;
} else if (iconType === 'thread') {
value = '"';
r6 = value;
r7 = value;
} else if (iconType === 'post') {
value = '"';
r6 = value;
r7 = value;
} else if (iconType === 'message') {
binding = env0_0;
r6 = undefined;
r7 = binding;
} else {
value = undefined;
if (iconType === 'voice') {
r6 = value;
r7 = value;
} else if (iconType === 'voice-locked') {
r6 = value;
r7 = value;
} else if (iconType === 'stage') {
r6 = value;
r7 = value;
} else if (iconType === 'stage-locked') {
r6 = value;
r7 = value;
} else if (iconType === 'locked') {
r6 = value;
r7 = value;
} else if (iconType === 'guide') {
r6 = value;
r7 = value;
} else if (iconType === 'home') {
r6 = value;
r7 = value;
} else if (iconType === 'browse') {
r6 = value;
r7 = value;
} else if (iconType === 'customize') {
r6 = value;
r7 = value;
} else if (iconType === 'linked-roles') {
r6 = value;
r7 = value;
} else {
value2 = environment.__proto__;
(require(1360) /* metro dependency 1360: GlobalUtils */).assertNever(iconType);
r6 = value;
r7 = value;
function createInlineChannelReact() { // fn#84102, offset: 0x01f3915d, size: 30 bytes, params: 1, frame: 3
const value = a0;
const env0_0 = value !== undefined ? value : '💬';
return _fun84103;
function _fun84103(a0, a1, a2) { // fn#84103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11175:170, offset: 0x01f3917b, size: 394 bytes, params: 4, frame: 21
var r6;
var r7;
var value;
var value2;
var binding;
const iconType = a0.iconType;
if (iconType === 'text') {
value = '#';
r6 = undefined;
r7 = value;
} else if (iconType === 'forum') {
value = '#';
r6 = undefined;
r7 = value;
} else if (iconType === 'media') {
value = '#';
r6 = undefined;
r7 = value;
} else if (iconType === 'thread') {
value = '"';
r6 = value;
r7 = value;
} else if (iconType === 'post') {
value = '"';
r6 = value;
r7 = value;
} else if (iconType === 'message') {
binding = env0_0;
r6 = undefined;
r7 = binding;
} else {
value = undefined;
if (iconType === 'voice') {
r6 = value;
r7 = value;
} else if (iconType === 'voice-locked') {
r6 = value;
r7 = value;
} else if (iconType === 'stage') {
r6 = value;
r7 = value;
} else if (iconType === 'stage-locked') {
r6 = value;
r7 = value;
} else if (iconType === 'locked') {
r6 = value;
r7 = value;
} else if (iconType === 'guide') {
r6 = value;
r7 = value;
} else if (iconType === 'home') {
r6 = value;
r7 = value;
} else if (iconType === 'browse') {
r6 = value;
r7 = value;
} else if (iconType === 'customize') {
r6 = value;
r7 = value;
} else if (iconType === 'linked-roles') {
r6 = value;
r7 = value;
} else {
value2 = environment.__proto__;
(require(1360) /* metro dependency 1360: GlobalUtils */).assertNever(iconType);
r6 = value;
r7 = value;
}
}
value = environment.__proto__;
const LegacyText = (NativeModule).LegacyText;
const items2 = [r7];
value = require(8778) /* metro dependency 8778: MarkupRulesUtils */;
items2[1] = value.smartOutput(a0, a1, a2);
items2[2] = r6;
return (
<LegacyText key={a2.key}>
{items2}
</LegacyText>
);
}
}
value = environment.__proto__;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const items2 = [r7];
value = require(8778) /* metro dependency 8778: MarkupRulesUtils */;
items2[1] = value.smartOutput(a0, a1, a2);
items2[2] = r6;
return (
<LegacyText key={a2.key}>
{items2}
</LegacyText>
);
function inlineChannelMentionReact(a0, a1, a2) { // fn#84104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11175:745, offset: 0x01f39305, size: 175 bytes, params: 4, frame: 21
var r0;
var value;
var LegacyText;
var items2;
if (a0.inContent == null) {
value = require(8778) /* metro dependency 8778: MarkupRulesUtils */;
value = value.smartOutput(a0, a1, a2);
r0 = value;
} else {
LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
value = a1(a0.inContent, a2);
items2 = [value, ' › '];
value = require(8778) /* metro dependency 8778: MarkupRulesUtils */;
items2[2] = value.smartOutput(a0, a1, a2);
value = (
<LegacyText key={a2.key}>
{items2}
</LegacyText>
);
r0 = value;
}
return r0;
}
}
global.__d(_fun84101, 10989, [31, 33, 8778, 1305, 1360,
2]) /* metro module 10989, dependencies: [31, 33, 8778, 1305, 1360, 2] */;
@@ -1,325 +1,349 @@
/* Metro module 10979; source: modules/markup/native/MarkupMessagePreviewReactRules.tsx; dependencies: [31, 10980, 33, 4600, 8778, 10981, 6817, 4598, 10986, 10987, 5475, 478, 10988, 10989, 1305, 4020, 9786, 6660, 10990, 2] */
import HighlightText from '../../search/native/components/HighlightText.tsx'; /* Metro dependency 10987 */
import Spoiler from './Spoiler.tsx'; /* Metro dependency 10988 */
import TimestampNative from '../Timestamp.native.tsx'; /* Metro dependency 10990 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as MarkupTypesModule from '../MarkupTypes.tsx'; /* Metro dependency 4598 */
import * as HighlightJsAnsiLanguageModule from '../../../utils/HighlightJsAnsiLanguage.tsx'; /* Metro dependency 4600 */
import * as IconSizeModule from '../../../design/components/Icon/IconSize.tsx'; /* Metro dependency 6817 */
import * as MarkupRulesUtilsModule from '../MarkupRulesUtils.tsx'; /* Metro dependency 8778 */
import * as RedesignChannelListConstantsModule from '../../channel_list_v2/native/RedesignChannelListConstants.tsx'; /* Metro dependency 10980 */
import * as ChannelListLayoutModule from '../../main_tabs_v2/native/shared_components/guild_channels/layouts/ChannelListLayout.tsx'; /* Metro dependency 10981 */
import * as MarkupTypesDefaultRulesModule from '../MarkupTypesDefaultRules.tsx'; /* Metro dependency 10986 */
function _fun84050(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11165:6, offset: 0x01f35f6b, size: 249 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = createMessagePreviewReactRules;
const createMessagePreviewReactRules2 = createMessagePreviewReactRules;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(10980) /* metro dependency 10980: RedesignChannelListConstants */).MUTED_OPACITY_CONTENT;
const value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
ReactModule;
const RegExp = global.RegExp;
const ANSI_CONTROL_SEQUENCE_RE = (require(4600) /* metro dependency 4600: HighlightJsAnsiLanguage */).ANSI_CONTROL_SEQUENCE_RE;
const ANSI_CONTROL_SEQUENCE_RE = (HighlightJsAnsiLanguageModule).ANSI_CONTROL_SEQUENCE_RE;
const regExp = new RegExp(ANSI_CONTROL_SEQUENCE_RE, 'g');
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/markup/native/MarkupMessagePreviewReactRules.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/markup/native/MarkupMessagePreviewReactRules.tsx');
exports.default = createChannelListMessagePreviewReactRules;
exports.createMessagePreviewReactRules = closure;
}
function defaultReactFn(a0, a1, a2) { // fn#84051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11165:214, offset: 0x01f36064, size: 72 bytes, params: 4, frame: 15
var r0;
var value;
if (typeof a0.content === 'string') {
r0 = a0.content;
} else {
value = require(8778) /* metro dependency 8778: MarkupRulesUtils */;
value = value.smartOutput(a0, a1, a2);
r0 = value;
exports.createMessagePreviewReactRules = createMessagePreviewReactRules2;
function defaultReactFn(a0, a1, a2) { // fn#84051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11165:214, offset: 0x01f36064, size: 72 bytes, params: 4, frame: 15
var r0;
var value;
if (typeof a0.content === 'string') {
r0 = a0.content;
} else {
value = require(8778) /* metro dependency 8778: MarkupRulesUtils */;
value = value.smartOutput(a0, a1, a2);
r0 = value;
}
return r0;
}
return r0;
}
function createMessagePreviewReactRules({iconColor, iconSize, channelIconSize, customEmojiSize}) { // fn#84052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11165:315, offset: 0x01f360ac, size: 2178 bytes, params: 2, frame: 29
var r19;
var r6;
if (customEmojiSize !== undefined) {
function createMessagePreviewReactRules({iconColor, iconSize, channelIconSize, customEmojiSize}) { // fn#84052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11165:315, offset: 0x01f360ac, size: 2178 bytes, params: 2, frame: 29
var r19;
var r6;
if (customEmojiSize !== undefined) {
}
const object = {};
const AST_KEY = require(dependencyMap[7]).AST_KEY;
const TEXT = AST_KEY.TEXT;
let defaultReactFnBinding = defaultReactFn;
object[TEXT] = {react: defaultReactFnBinding};
const STRIKETHROUGH = AST_KEY.STRIKETHROUGH;
const object3 = {};
const DEFAULT_RULES = require(dependencyMap[8]).DEFAULT_RULES;
const STRIKETHROUGH2 = AST_KEY.STRIKETHROUGH;
copyDataProperties(object3, DEFAULT_RULES[STRIKETHROUGH2], r19);
object3['react'] = defaultReactFnBinding;
object[STRIKETHROUGH] = object3;
const UNDERLINE = AST_KEY.UNDERLINE;
const object4 = {};
const UNDERLINE2 = AST_KEY.UNDERLINE;
copyDataProperties(object4, DEFAULT_RULES[UNDERLINE2], r19);
object4['react'] = defaultReactFnBinding;
object[UNDERLINE] = object4;
const ITALICS = AST_KEY.ITALICS;
const object5 = {};
const ITALICS2 = AST_KEY.ITALICS;
copyDataProperties(object5, DEFAULT_RULES[ITALICS2], r19);
object5['react'] = defaultReactFnBinding;
object[ITALICS] = object5;
const STRONG = AST_KEY.STRONG;
const object6 = {};
const STRONG2 = AST_KEY.STRONG;
copyDataProperties(object6, DEFAULT_RULES[STRONG2], r19);
object6['react'] = defaultReactFnBinding;
object[STRONG] = object6;
const LINK = AST_KEY.LINK;
const object7 = {};
const LINK2 = AST_KEY.LINK;
copyDataProperties(object7, DEFAULT_RULES[LINK2], r19);
object7['react'] = defaultReactFnBinding;
object[LINK] = object7;
const URL = AST_KEY.URL;
const object8 = {};
const URL2 = AST_KEY.URL;
copyDataProperties(object8, DEFAULT_RULES[URL2], r19);
object8['react'] = defaultReactFnBinding;
object[URL] = object8;
const AUTOLINK = AST_KEY.AUTOLINK;
const object9 = {};
const AUTOLINK2 = AST_KEY.AUTOLINK;
copyDataProperties(object9, DEFAULT_RULES[AUTOLINK2], r19);
object9['react'] = defaultReactFnBinding;
object[AUTOLINK] = object9;
const LINE_BREAK = AST_KEY.LINE_BREAK;
const object10 = {};
const LINE_BREAK2 = AST_KEY.LINE_BREAK;
copyDataProperties(object10, DEFAULT_RULES[LINE_BREAK2], r19);
object10['react'] = function() {
return '\n';
};
object[LINE_BREAK] = object10;
const HIGHLIGHT = AST_KEY.HIGHLIGHT;
object[HIGHLIGHT] = {react: react_84054};
const BLOCK_QUOTE = AST_KEY.BLOCK_QUOTE;
const object12 = {};
const BLOCK_QUOTE2 = AST_KEY.BLOCK_QUOTE;
copyDataProperties(object12, DEFAULT_RULES[BLOCK_QUOTE2], r19);
object12['react'] = defaultReactFnBinding;
object[BLOCK_QUOTE] = object12;
const PARAGRAPH = AST_KEY.PARAGRAPH;
const object13 = {};
const PARAGRAPH2 = AST_KEY.PARAGRAPH;
copyDataProperties(object13, DEFAULT_RULES[PARAGRAPH2], r19);
object13['order'] = 600;
object13['react'] = defaultReactFnBinding;
object[PARAGRAPH] = object13;
const EMOJI = AST_KEY.EMOJI;
object[EMOJI] = {react: function(a0) {
return a0.surrogate || a0.content;
}};
const CUSTOM_EMOJI = AST_KEY.CUSTOM_EMOJI;
object[CUSTOM_EMOJI] = {react: react_84056};
const SPOILER = AST_KEY.SPOILER;
object[SPOILER] = {react: react_84057};
const STATIC_ROUTE_LINK = AST_KEY.STATIC_ROUTE_LINK;
object[STATIC_ROUTE_LINK] = {react: react_84058};
const INLINE_CODE = AST_KEY.INLINE_CODE;
const object18 = {};
const INLINE_CODE2 = AST_KEY.INLINE_CODE;
copyDataProperties(object18, DEFAULT_RULES[INLINE_CODE2], r19);
object18['react'] = defaultReactFnBinding;
object[INLINE_CODE] = object18;
const CODE_BLOCK = AST_KEY.CODE_BLOCK;
const object19 = {};
const CODE_BLOCK2 = AST_KEY.CODE_BLOCK;
copyDataProperties(object19, DEFAULT_RULES[CODE_BLOCK2], r19);
object19['parse'] = createMessagePreviewReactRulesParse;
object19['react'] = defaultReactFnBinding;
object[CODE_BLOCK] = object19;
const MENTION = AST_KEY.MENTION;
const object20 = {};
const MENTION2 = AST_KEY.MENTION;
copyDataProperties(object20, DEFAULT_RULES[MENTION2], r19);
object20['react'] = defaultReactFnBinding;
object[MENTION] = object20;
const CHANNEL_MENTION = AST_KEY.CHANNEL_MENTION;
const object21 = {};
const CHANNEL_MENTION2 = AST_KEY.CHANNEL_MENTION;
copyDataProperties(object21, DEFAULT_RULES[CHANNEL_MENTION2], r19);
object21['react'] = require(dependencyMap[13]).inlineChannelMentionReact;
object[CHANNEL_MENTION] = object21;
const ATTACHMENT_LINK = AST_KEY.ATTACHMENT_LINK;
const object22 = {};
const ATTACHMENT_LINK2 = AST_KEY.ATTACHMENT_LINK;
copyDataProperties(object22, DEFAULT_RULES[ATTACHMENT_LINK2], r19);
object22['react'] = createMessagePreviewReactRulesReact_84060;
object[ATTACHMENT_LINK] = object22;
const SOUNDBOARD = AST_KEY.SOUNDBOARD;
const object23 = {};
const SOUNDBOARD2 = AST_KEY.SOUNDBOARD;
copyDataProperties(object23, DEFAULT_RULES[SOUNDBOARD2], r19);
object23['react'] = defaultReactFnBinding;
object[SOUNDBOARD] = object23;
const GUILD = AST_KEY.GUILD;
object[GUILD] = {react: defaultReactFnBinding};
const CHANNEL = AST_KEY.CHANNEL;
const moduleValue = require(dependencyMap[13]);
const createInlineChannelReact = moduleValue.createInlineChannelReact;
if (require(dependencyMap[15]).isFabric()) {
r6 = '💬';
} else {
const ThemedIcon = require(dependencyMap[14]).ThemedIcon;
r6 = (
<ThemedIcon
source={importDefault(dependencyMap[17])}
size={channelIconSize}
themedColor={iconColor}
/>
);
r19 = dependencyMap;
}
object[CHANNEL] = {react: Reflect.apply(createInlineChannelReact, moduleValue, [r6])};
const COMMAND_MENTION = AST_KEY.COMMAND_MENTION;
const object27 = {};
const COMMAND_MENTION2 = AST_KEY.COMMAND_MENTION;
copyDataProperties(object27, DEFAULT_RULES[COMMAND_MENTION2], r19);
object27['react'] = createMessagePreviewReactRulesReact_84061;
object[COMMAND_MENTION] = object27;
const TIMESTAMP = AST_KEY.TIMESTAMP;
const object28 = {};
const TIMESTAMP2 = AST_KEY.TIMESTAMP;
copyDataProperties(object28, DEFAULT_RULES[TIMESTAMP2], r19);
object28['react'] = createMessagePreviewReactRulesReact_84062;
object[TIMESTAMP] = object28;
const LIST = AST_KEY.LIST;
const object29 = {};
const LIST2 = AST_KEY.LIST;
copyDataProperties(object29, DEFAULT_RULES[LIST2], r19);
object29['react'] = createMessagePreviewReactRulesReact_84063;
object[LIST] = object29;
const HEADING = AST_KEY.HEADING;
defaultReactFnBinding = defaultReactFn;
object[HEADING] = {react: defaultReactFnBinding};
const SUBTEXT = AST_KEY.SUBTEXT;
object[SUBTEXT] = {react: defaultReactFnBinding};
return object;
function createMessagePreviewReactRulesReact_84054(a0, a1, a2) { // fn#84054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11165:1302, owner: createMessagePreviewReactRules.react, offset: 0x01f3692e, size: 87 bytes, params: 4, frame: 19
const value = environment.__proto__;
return ((Component) => <Component key={a2.key}>{(MarkupRulesUtilsModule).smartOutput(a0,
a1, a2)}</Component>)(HighlightText);
}
function createMessagePreviewReactRulesReact_84056(a0, a1, a2) { // fn#84056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11165:1677, owner: createMessagePreviewReactRules.react, offset: 0x01f36998, size: 226 bytes, params: 4, frame: 22
var r7;
var value;
var sizeStyle;
var FastImage;
var items2;
if (a0.src) {
value = environment.__proto__;
sizeStyle = (require(10981) /* metro dependency 10981: ChannelListLayout */).makeSizeStyle(customEmojiSize);
FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
items2 = [sizeStyle];
items2[1] = {resizeMode: 'contain'};
r7 = (require(478) /* metro dependency 478: PlatformUtils */).isAndroid() && ({transform: [{translateY: 3}]});
items2[2] = r7;
r7 = a2.muted && ({opacity: MUTED_OPACITY_CONTENT});
items2[3] = r7;
return (
<FastImage
style={items2}
source={{uri: a0.src}}
key={a2.key}
/>
);
}
return a0.alt;
}
function createMessagePreviewReactRulesReact_84057(a0, a1, a2) { // fn#84057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11165:1930, owner: createMessagePreviewReactRules.react, offset: 0x01f36a7a, size: 105 bytes, params: 4, frame: 19
const value = environment.__proto__;
return ((Component) => <Component disableReveal muted={a2.muted} key={a2.key}>{(MarkupRulesUtilsModule).smartOutput(a0,
a1, a2)}</Component>)(Spoiler);
}
function createMessagePreviewReactRulesReact_84058(a0, a1, a2) { // fn#84058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11165:2070, owner: createMessagePreviewReactRules.react, offset: 0x01f36ae3, size: 87 bytes, params: 4, frame: 17
var r0;
let value = environment.__proto__;
if (MarkupRulesUtilsModule.isStaticRouteIconType(a0.channelId)) {
value = MarkupRulesUtilsModule;
value = value.smartOutput(a0, a1, a2);
r0 = value;
} else {
r0 = null;
}
return r0;
}
function createMessagePreviewReactRulesParse(a0, a1, a2) { // fn#84059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11165:2345, owner: createMessagePreviewReactRules.parse, offset: 0x01f36b3a, size: 140 bytes, params: 4, frame: 16
const DEFAULT_RULES = (MarkupTypesDefaultRulesModule).DEFAULT_RULES;
const AST_KEY = (MarkupTypesModule).AST_KEY;
const CODE_BLOCK = AST_KEY.CODE_BLOCK;
const value2 = DEFAULT_RULES[CODE_BLOCK].parse(a0, a1, a2);
if (value2.lang.toLowerCase() === 'ansi') {
value2.content = value2.content.replaceAll(env1_6, '');
}
return value2;
}
function createMessagePreviewReactRulesReact_84060(a0, a1, a2) { // fn#84060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11165:2861, owner: createMessagePreviewReactRules.react, offset: 0x01f36bc6, size: 197 bytes, params: 4, frame: 22
let value = environment.__proto__;
const LegacyText = (NativeModule).LegacyText;
const items2 = [
(require(4020) /* metro dependency 4020: FabricUtils */).isFabric()
? '📎 '
: ((AttachmentIcon) => <AttachmentIcon color={iconColor} size={iconSize} />)((require(9786) /* metro dependency 9786: AttachmentIcon */).AttachmentIcon),
];
value = require(8778) /* metro dependency 8778: MarkupRulesUtils */;
items2[1] = value.smartOutput(a0, a1, a2);
return (
<LegacyText key={a2.key}>
{items2}
</LegacyText>
);
}
function createMessagePreviewReactRulesReact_84061(a0, a1, a2) { // fn#84061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11165:3421, owner: createMessagePreviewReactRules.react, offset: 0x01f36c8b, size: 103 bytes, params: 4, frame: 19
let value = environment.__proto__;
const LegacyText = (NativeModule).LegacyText;
value = require(8778) /* metro dependency 8778: MarkupRulesUtils */;
value = value.smartOutput(a0, a1, a2);
return (
<LegacyText key={a2.key}>
{'/'}
{value}
</LegacyText>
);
}
function createMessagePreviewReactRulesReact_84062(a0, a1, a2) { // fn#84062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11165:3591, owner: createMessagePreviewReactRules.react, offset: 0x01f36cf2, size: 62 bytes, params: 4, frame: 15
const value = environment.__proto__;
return ((Component) => <Component node={a0} style={null} key={a2.key} />)(TimestampNative);
}
function createMessagePreviewReactRulesReact_84063({items}, a1, a2) { // fn#84063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11165:3710, owner: createMessagePreviewReactRules.react, offset: 0x01f36d30, size: 98 bytes, params: 4, frame: 16
var r0;
const property = items[0];
const Array = global.Array;
const r5 = Array.isArray(property) ? property[0] : property;
let value = null;
if (value == r5) {
r0 = value;
} else {
value = environment.__proto__;
value = require(8778) /* metro dependency 8778: MarkupRulesUtils */;
value = value.smartOutput(r5, a1, a2);
r0 = value;
}
return r0;
}
}
const object2 = {};
const AST_KEY = require(dependencyMap[7]).AST_KEY;
const TEXT = AST_KEY.TEXT;
let defaultReactFnBinding = defaultReactFn;
object2[TEXT] = {react: defaultReactFnBinding};
const STRIKETHROUGH = AST_KEY.STRIKETHROUGH;
const object11 = {};
const DEFAULT_RULES = require(dependencyMap[8]).DEFAULT_RULES;
const STRIKETHROUGH2 = AST_KEY.STRIKETHROUGH;
copyDataProperties(object11, DEFAULT_RULES[STRIKETHROUGH2], r19);
object11['react'] = defaultReactFnBinding;
object2[STRIKETHROUGH] = object11;
const UNDERLINE = AST_KEY.UNDERLINE;
const object14 = {};
const UNDERLINE2 = AST_KEY.UNDERLINE;
copyDataProperties(object14, DEFAULT_RULES[UNDERLINE2], r19);
object14['react'] = defaultReactFnBinding;
object2[UNDERLINE] = object14;
const ITALICS = AST_KEY.ITALICS;
const object15 = {};
const ITALICS2 = AST_KEY.ITALICS;
copyDataProperties(object15, DEFAULT_RULES[ITALICS2], r19);
object15['react'] = defaultReactFnBinding;
object2[ITALICS] = object15;
const STRONG = AST_KEY.STRONG;
const object16 = {};
const STRONG2 = AST_KEY.STRONG;
copyDataProperties(object16, DEFAULT_RULES[STRONG2], r19);
object16['react'] = defaultReactFnBinding;
object2[STRONG] = object16;
const LINK = AST_KEY.LINK;
const object17 = {};
const LINK2 = AST_KEY.LINK;
copyDataProperties(object17, DEFAULT_RULES[LINK2], r19);
object17['react'] = defaultReactFnBinding;
object2[LINK] = object17;
const URL = AST_KEY.URL;
const object24 = {};
const URL2 = AST_KEY.URL;
copyDataProperties(object24, DEFAULT_RULES[URL2], r19);
object24['react'] = defaultReactFnBinding;
object2[URL] = object24;
const AUTOLINK = AST_KEY.AUTOLINK;
const object25 = {};
const AUTOLINK2 = AST_KEY.AUTOLINK;
copyDataProperties(object25, DEFAULT_RULES[AUTOLINK2], r19);
object25['react'] = defaultReactFnBinding;
object2[AUTOLINK] = object25;
const LINE_BREAK = AST_KEY.LINE_BREAK;
const object26 = {};
const LINE_BREAK2 = AST_KEY.LINE_BREAK;
copyDataProperties(object26, DEFAULT_RULES[LINE_BREAK2], r19);
object26['react'] = function() {
return '\n';
};
object2[LINE_BREAK] = object26;
const HIGHLIGHT = AST_KEY.HIGHLIGHT;
object2[HIGHLIGHT] = {react: react_84054};
const BLOCK_QUOTE = AST_KEY.BLOCK_QUOTE;
const object30 = {};
const BLOCK_QUOTE2 = AST_KEY.BLOCK_QUOTE;
copyDataProperties(object30, DEFAULT_RULES[BLOCK_QUOTE2], r19);
object30['react'] = defaultReactFnBinding;
object2[BLOCK_QUOTE] = object30;
const PARAGRAPH = AST_KEY.PARAGRAPH;
const object31 = {};
const PARAGRAPH2 = AST_KEY.PARAGRAPH;
copyDataProperties(object31, DEFAULT_RULES[PARAGRAPH2], r19);
object31['order'] = 600;
object31['react'] = defaultReactFnBinding;
object2[PARAGRAPH] = object31;
const EMOJI = AST_KEY.EMOJI;
object2[EMOJI] = {react: function(a0) {
return a0.surrogate || a0.content;
}};
const CUSTOM_EMOJI = AST_KEY.CUSTOM_EMOJI;
object2[CUSTOM_EMOJI] = {react: react_84056};
const SPOILER = AST_KEY.SPOILER;
object2[SPOILER] = {react: react_84057};
const STATIC_ROUTE_LINK = AST_KEY.STATIC_ROUTE_LINK;
object2[STATIC_ROUTE_LINK] = {react: react_84058};
const INLINE_CODE = AST_KEY.INLINE_CODE;
const object32 = {};
const INLINE_CODE2 = AST_KEY.INLINE_CODE;
copyDataProperties(object32, DEFAULT_RULES[INLINE_CODE2], r19);
object32['react'] = defaultReactFnBinding;
object2[INLINE_CODE] = object32;
const CODE_BLOCK = AST_KEY.CODE_BLOCK;
const object33 = {};
const CODE_BLOCK2 = AST_KEY.CODE_BLOCK;
copyDataProperties(object33, DEFAULT_RULES[CODE_BLOCK2], r19);
object33['parse'] = createMessagePreviewReactRulesParse;
object33['react'] = defaultReactFnBinding;
object2[CODE_BLOCK] = object33;
const MENTION = AST_KEY.MENTION;
const object34 = {};
const MENTION2 = AST_KEY.MENTION;
copyDataProperties(object34, DEFAULT_RULES[MENTION2], r19);
object34['react'] = defaultReactFnBinding;
object2[MENTION] = object34;
const CHANNEL_MENTION = AST_KEY.CHANNEL_MENTION;
const object35 = {};
const CHANNEL_MENTION2 = AST_KEY.CHANNEL_MENTION;
copyDataProperties(object35, DEFAULT_RULES[CHANNEL_MENTION2], r19);
object35['react'] = require(dependencyMap[13]).inlineChannelMentionReact;
object2[CHANNEL_MENTION] = object35;
const ATTACHMENT_LINK = AST_KEY.ATTACHMENT_LINK;
const object36 = {};
const ATTACHMENT_LINK2 = AST_KEY.ATTACHMENT_LINK;
copyDataProperties(object36, DEFAULT_RULES[ATTACHMENT_LINK2], r19);
object36['react'] = createMessagePreviewReactRulesReact_84060;
object2[ATTACHMENT_LINK] = object36;
const SOUNDBOARD = AST_KEY.SOUNDBOARD;
const object37 = {};
const SOUNDBOARD2 = AST_KEY.SOUNDBOARD;
copyDataProperties(object37, DEFAULT_RULES[SOUNDBOARD2], r19);
object37['react'] = defaultReactFnBinding;
object2[SOUNDBOARD] = object37;
const GUILD = AST_KEY.GUILD;
object2[GUILD] = {react: defaultReactFnBinding};
const CHANNEL = AST_KEY.CHANNEL;
const moduleValue = require(dependencyMap[13]);
const createInlineChannelReact = moduleValue.createInlineChannelReact;
if (require(dependencyMap[15]).isFabric()) {
r6 = '💬';
} else {
const ThemedIcon = require(dependencyMap[14]).ThemedIcon;
r6 = <ThemedIcon source={importDefault(dependencyMap[17])} size={channelIconSize} themedColor={iconColor} />;
r19 = dependencyMap;
function createChannelListMessagePreviewReactRules(a0, a1, a2, a3) { // fn#84064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11165:4015, offset: 0x01f36d92, size: 191 bytes, params: 5, frame: 18
var r4;
let value = a2;
const layoutStyles = (ChannelListLayoutModule).getLayoutStyles(a0);
if (a3 == null) {
r4 = value;
} else {
value = global.Math.min(value, a3);
r4 = value;
}
const createMessagePreviewReactRulesBinding = createMessagePreviewReactRules;
const object = {iconColor: a1};
object.iconSize = layoutStyles.messagePreview.messageTypeIconSizeNew;
object.channelIconSize = layoutStyles.messagePreview.messageTypeIconSize;
const ICON_SIZE = (IconSizeModule).ICON_SIZE;
object.customEmojiSize = (ICON_SIZE[layoutStyles.messagePreview.messageTypeIconSizeNew] ?? 0) * r4;
return createMessagePreviewReactRulesBinding(object);
}
object2[CHANNEL] = {react: Reflect.apply(createInlineChannelReact, moduleValue, [r6])};
const COMMAND_MENTION = AST_KEY.COMMAND_MENTION;
const object38 = {};
const COMMAND_MENTION2 = AST_KEY.COMMAND_MENTION;
copyDataProperties(object38, DEFAULT_RULES[COMMAND_MENTION2], r19);
object38['react'] = createMessagePreviewReactRulesReact_84061;
object2[COMMAND_MENTION] = object38;
const TIMESTAMP = AST_KEY.TIMESTAMP;
const object39 = {};
const TIMESTAMP2 = AST_KEY.TIMESTAMP;
copyDataProperties(object39, DEFAULT_RULES[TIMESTAMP2], r19);
object39['react'] = createMessagePreviewReactRulesReact_84062;
object2[TIMESTAMP] = object39;
const LIST = AST_KEY.LIST;
const object40 = {};
const LIST2 = AST_KEY.LIST;
copyDataProperties(object40, DEFAULT_RULES[LIST2], r19);
object40['react'] = createMessagePreviewReactRulesReact_84063;
object2[LIST] = object40;
const HEADING = AST_KEY.HEADING;
defaultReactFnBinding = defaultReactFn;
object2[HEADING] = {react: defaultReactFnBinding};
const SUBTEXT = AST_KEY.SUBTEXT;
object2[SUBTEXT] = {react: defaultReactFnBinding};
return object2;
}
function createChannelListMessagePreviewReactRules(a0, a1, a2, a3) { // fn#84064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11165:4015, offset: 0x01f36d92, size: 191 bytes, params: 5, frame: 18
var r4;
let value = a2;
const layoutStyles = (require(10981) /* metro dependency 10981: ChannelListLayout */).getLayoutStyles(a0);
if (a3 == null) {
r4 = value;
} else {
value = global.Math.min(value, a3);
r4 = value;
}
const createMessagePreviewReactRulesBinding = createMessagePreviewReactRules;
const object2 = {iconColor: a1};
object2.iconSize = layoutStyles.messagePreview.messageTypeIconSizeNew;
object2.channelIconSize = layoutStyles.messagePreview.messageTypeIconSize;
const ICON_SIZE = (require(6817) /* metro dependency 6817: IconSize */).ICON_SIZE;
object2.customEmojiSize = (ICON_SIZE[layoutStyles.messagePreview.messageTypeIconSizeNew] ?? 0) * r4;
return createMessagePreviewReactRulesBinding(object2);
}
function createMessagePreviewReactRulesReact_84054(a0, a1, a2) { // fn#84054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11165:1302, owner: createMessagePreviewReactRules.react, offset: 0x01f3692e, size: 87 bytes, params: 4, frame: 19
const value = environment.__proto__;
return ((Component) => <Component key={a2.key}>{(require(8778) /* metro dependency 8778: MarkupRulesUtils */).smartOutput(a0,
a1, a2)}</Component>)(importDefault(10987) /* metro dependency 10987: HighlightText */);
}
function createMessagePreviewReactRulesReact_84056(a0, a1, a2) { // fn#84056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11165:1677, owner: createMessagePreviewReactRules.react, offset: 0x01f36998, size: 226 bytes, params: 4, frame: 22
var r7;
var value;
var sizeStyle;
var FastImage;
var items2;
if (a0.src) {
value = environment.__proto__;
sizeStyle = (require(10981) /* metro dependency 10981: ChannelListLayout */).makeSizeStyle(customEmojiSize);
FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
items2 = [sizeStyle];
items2[1] = {resizeMode: 'contain'};
r7 = (require(478) /* metro dependency 478: PlatformUtils */).isAndroid() && ({transform: [{translateY: 3}]});
items2[2] = r7;
r7 = a2.muted && ({opacity: MUTED_OPACITY_CONTENT});
items2[3] = r7;
return (
<FastImage
style={items2}
source={{uri: a0.src}}
key={a2.key}
/>
);
}
return a0.alt;
}
function createMessagePreviewReactRulesReact_84057(a0, a1, a2) { // fn#84057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11165:1930, owner: createMessagePreviewReactRules.react, offset: 0x01f36a7a, size: 105 bytes, params: 4, frame: 19
const value = environment.__proto__;
return ((Component) => <Component disableReveal muted={a2.muted} key={a2.key}>{(require(8778) /* metro dependency 8778: MarkupRulesUtils */).smartOutput(a0,
a1, a2)}</Component>)(importDefault(10988) /* metro dependency 10988: Spoiler */);
}
function createMessagePreviewReactRulesReact_84058(a0, a1, a2) { // fn#84058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11165:2070, owner: createMessagePreviewReactRules.react, offset: 0x01f36ae3, size: 87 bytes, params: 4, frame: 17
var r0;
let value = environment.__proto__;
const markupRulesUtilsModule = require(8778) /* metro dependency 8778: MarkupRulesUtils */;
if (markupRulesUtilsModule.isStaticRouteIconType(a0.channelId)) {
value = markupRulesUtilsModule;
value = value.smartOutput(a0, a1, a2);
r0 = value;
} else {
r0 = null;
}
return r0;
}
function createMessagePreviewReactRulesParse(a0, a1, a2) { // fn#84059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11165:2345, owner: createMessagePreviewReactRules.parse, offset: 0x01f36b3a, size: 140 bytes, params: 4, frame: 16
const DEFAULT_RULES = (require(10986) /* metro dependency 10986: MarkupTypesDefaultRules */).DEFAULT_RULES;
const AST_KEY = (require(4598) /* metro dependency 4598: MarkupTypes */).AST_KEY;
const CODE_BLOCK = AST_KEY.CODE_BLOCK;
const value2 = DEFAULT_RULES[CODE_BLOCK].parse(a0, a1, a2);
if (value2.lang.toLowerCase() === 'ansi') {
value2.content = value2.content.replaceAll(env1_6, '');
}
return value2;
}
function createMessagePreviewReactRulesReact_84060(a0, a1, a2) { // fn#84060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11165:2861, owner: createMessagePreviewReactRules.react, offset: 0x01f36bc6, size: 197 bytes, params: 4, frame: 22
let value = environment.__proto__;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const items2 = [(require(4020) /* metro dependency 4020: FabricUtils */).isFabric() ? '📎 ' : ((AttachmentIcon) => <AttachmentIcon color={iconColor} size={iconSize} />)((require(9786) /* metro dependency 9786: AttachmentIcon */).AttachmentIcon)];
value = require(8778) /* metro dependency 8778: MarkupRulesUtils */;
items2[1] = value.smartOutput(a0, a1, a2);
return (
<LegacyText key={a2.key}>
{items2}
</LegacyText>
);
}
function createMessagePreviewReactRulesReact_84061(a0, a1, a2) { // fn#84061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11165:3421, owner: createMessagePreviewReactRules.react, offset: 0x01f36c8b, size: 103 bytes, params: 4, frame: 19
let value = environment.__proto__;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
value = require(8778) /* metro dependency 8778: MarkupRulesUtils */;
value = value.smartOutput(a0, a1, a2);
return (
<LegacyText key={a2.key}>
{'/'}
{value}
</LegacyText>
);
}
function createMessagePreviewReactRulesReact_84062(a0, a1, a2) { // fn#84062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11165:3591, owner: createMessagePreviewReactRules.react, offset: 0x01f36cf2, size: 62 bytes, params: 4, frame: 15
const value = environment.__proto__;
return ((Component) => <Component node={a0} style={null} key={a2.key} />)(importDefault(10990) /* metro dependency 10990: TimestampNative */);
}
function createMessagePreviewReactRulesReact_84063({items}, a1, a2) { // fn#84063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11165:3710, owner: createMessagePreviewReactRules.react, offset: 0x01f36d30, size: 98 bytes, params: 4, frame: 16
var r0;
const property = items[0];
const Array = global.Array;
const r5 = Array.isArray(property) ? property[0] : property;
let value = null;
if (value == r5) {
r0 = value;
} else {
value = environment.__proto__;
value = require(8778) /* metro dependency 8778: MarkupRulesUtils */;
value = value.smartOutput(r5, a1, a2);
r0 = value;
}
return r0;
}
global.__d(_fun84050, 10979, [31, 10980, 33, 4600, 8778, 10981, 6817, 4598, 10986, 10987, 5475, 478, 10988, 10989,
1305, 4020, 9786, 6660, 10990,
2]) /* metro module 10979, dependencies: [31, 10980, 33, 4600, 8778, 10981, 6817, 4598, 10986, 10987, 5475, 478, 10988, 10989, 1305, 4020, 9786, 6660, 10990, 2] */;
@@ -1,305 +1,324 @@
/* Metro module 8769; source: modules/markup/native/MarkupReactCommandRule.tsx; dependencies: [31, 1379, 1483, 5066, 6625, 33, 5068, 4008, 4080, 1583, 4496, 1244, 1305, 8770, 3856, 6797, 3829, 8772, 6802, 8774, 4573, 4015, 8776, 8778, 2] */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import NavigateToLastChannel from '../../main_tabs_v2/native/navigateToLastChannel.tsx'; /* Metro dependency 8776 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as AppLauncherNativeConstantsModule from '../../app_launcher/native/AppLauncherNativeConstants.tsx'; /* Metro dependency 1483 */
import * as KeyboardTypesModule from '../../keyboard/native/KeyboardTypes.tsx'; /* Metro dependency 1583 */
import * as UserSettingsModule from '../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
import * as ToastUtilsModule from '../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
import * as ChatInputUtilsModule from '../../../utils/native/ChatInputUtils.tsx'; /* Metro dependency 4015 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ApplicationCommandConstantsModule from '../../application_commands/ApplicationCommandConstants.tsx'; /* Metro dependency 5066 */
import * as ApplicationCommandTypesModule from '../../application_commands/ApplicationCommandTypes.tsx'; /* Metro dependency 5068 */
import * as ChannelAutocompleteConstantsModule from '../../channel_autocomplete/ChannelAutocompleteConstants.tsx'; /* Metro dependency 6625 */
import * as ClipboardUtilsNativeModule from '../../../utils/ClipboardUtils.native.tsx'; /* Metro dependency 6797 */
import * as ShowSimpleActionSheetModule from '../../action_sheet/native/showSimpleActionSheet.tsx'; /* Metro dependency 6802 */
import * as SlashBoxIconModule from '../../../design/components/Icon/native/redesign/generated/SlashBoxIcon.tsx'; /* Metro dependency 8770 */
import * as AppLauncherContextModule from '../../app_launcher/native/AppLauncherContext.tsx'; /* Metro dependency 8774 */
import * as MarkupRulesUtilsModule from '../MarkupRulesUtils.tsx'; /* Metro dependency 8778 */
function _fun68600(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8954:6, offset: 0x01c55991, size: 268 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = handleTapCommandMention;
const closure2 = handleLongPressCommandMention;
const handleTapCommandMention2 = handleTapCommandMention;
const handleLongPressCommandMention2 = handleLongPressCommandMention;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const appLauncherNativeConstantsModule = require(1483) /* metro dependency 1483: AppLauncherNativeConstants */;
const env0_5 = appLauncherNativeConstantsModule.AppLauncherRouteName;
const env0_6 = appLauncherNativeConstantsModule.useAppLauncherNavigation;
const env0_7 = (require(5066) /* metro dependency 5066: ApplicationCommandConstants */).SUB_COMMAND_KEY_SEPARATOR;
const env0_8 = (require(6625) /* metro dependency 6625: ChannelAutocompleteConstants */).COMMAND_SENTINEL;
const env0_9 = (require(33) /* metro dependency 33 */).jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/markup/native/MarkupReactCommandRule.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/markup/native/MarkupReactCommandRule.tsx');
exports.default = MarkupReactCommandRule;
exports.handleTapCommandMention = closure;
exports.handleLongPressCommandMention = closure2;
}
function handleTapCommandMention({appLauncherNavigator, channelId, currentText, onSetCommand, onOpenCustomKeyboard, commandId, commandName}) { // fn#68601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8954:260, offset: 0x01c55a9d, size: 797 bytes, params: 2, frame: 27
var r6;
var length;
var r1;
var defaultImport;
var show;
var object3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var includes;
var value4;
var split;
var value5;
var slice;
var value6;
var join;
var value7;
var moduleValue;
var getRootNavigationRef;
var value8;
var getState;
var value9;
var routes;
var value10;
var value11;
var goBack;
var value12;
var defaultImport2;
var hideActionSheet;
var setTimeout;
var navigate;
var object4;
var env0_2;
const channel = ChannelStore.getChannel(channelId);
if (channel != null) {
reducibleJoin2: while (true) {
if (channel.guild_id != null) {
includes = commandName.includes;
reducibleJoin7: while (true) {
if (Reflect.apply(includes, commandName, [' '])) {
value4 = commandId + SUB_COMMAND_KEY_SEPARATOR;
split = commandName.split;
value5 = Reflect.apply(split, commandName, [' ']);
slice = value5.slice;
value6 = Reflect.apply(slice, value5, [1]);
join = value6.join;
value7 = value4 + Reflect.apply(join, value6, [SUB_COMMAND_KEY_SEPARATOR]);
r6 = value7;
exports.handleTapCommandMention = handleTapCommandMention2;
exports.handleLongPressCommandMention = handleLongPressCommandMention2;
function handleTapCommandMention({appLauncherNavigator, channelId, currentText, onSetCommand, onOpenCustomKeyboard, commandId, commandName}) { // fn#68601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8954:260, offset: 0x01c55a9d, size: 797 bytes, params: 2, frame: 27
var r6;
var length;
var r1;
var defaultImport;
var show;
var object;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var includes;
var value4;
var split;
var value5;
var slice;
var value6;
var join;
var value7;
var moduleValue;
var getRootNavigationRef;
var value8;
var getState;
var value9;
var routes;
var value10;
var value11;
var goBack;
var value12;
var defaultImport2;
var hideActionSheet;
var setTimeout;
var navigate;
var object2;
var env0_2;
const channel = ChannelStore.getChannel(channelId);
if (channel != null) {
reducibleJoin2: while (true) {
if (channel.guild_id != null) {
includes = commandName.includes;
reducibleJoin7: while (true) {
if (Reflect.apply(includes, commandName, [' '])) {
value4 = commandId + SUB_COMMAND_KEY_SEPARATOR;
split = commandName.split;
value5 = Reflect.apply(split, commandName, [' ']);
slice = value5.slice;
value6 = Reflect.apply(slice, value5, [1]);
join = value6.join;
value7 = value4 + Reflect.apply(join, value6, [SUB_COMMAND_KEY_SEPARATOR]);
r6 = value7;
break reducibleJoin7;
}
r6 = commandId;
break reducibleJoin7;
}
r6 = commandId;
break reducibleJoin7;
}
env0_2 = r6;
if (appLauncherNavigator != null) {
reducibleJoin9: while (true) {
if (channel != null) {
navigate = appLauncherNavigator.navigate;
object3 = {};
object3.name = AppLauncherRouteName.COMMAND_VIEW;
object4 = {};
object4.analyticsLocation = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandTriggerLocations.MENTION;
object4.preSelectedCommand = {commandId: r6};
object4.context = {type: 'channel', channel: channel};
object3.params = object4;
Reflect.apply(navigate, appLauncherNavigator, [object3]);
return undefined;
env0_2 = r6;
if (appLauncherNavigator != null) {
reducibleJoin9: while (true) {
if (channel != null) {
navigate = appLauncherNavigator.navigate;
object = {};
object.name = AppLauncherRouteName.COMMAND_VIEW;
object2 = {};
object2.analyticsLocation = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandTriggerLocations.MENTION;
object2.preSelectedCommand = {commandId: r6};
object2.context = {type: 'channel', channel: channel};
object.params = object2;
Reflect.apply(navigate, appLauncherNavigator, [object]);
return undefined;
}
break reducibleJoin9;
}
break reducibleJoin9;
}
}
moduleValue = require(4008) /* metro dependency 4008: RootNavigationRefNative */;
getRootNavigationRef = moduleValue.getRootNavigationRef;
value8 = Reflect.apply(getRootNavigationRef, moduleValue, []);
reducibleJoin20: while (true) {
if (value8 == null) {
break reducibleJoin20;
}
getState = value8.getState;
value9 = Reflect.apply(getState, value8, []);
reducibleJoin13: while (true) {
if (value9 == null) {
length = undefined;
moduleValue = require(4008) /* metro dependency 4008: RootNavigationRefNative */;
getRootNavigationRef = moduleValue.getRootNavigationRef;
value8 = Reflect.apply(getRootNavigationRef, moduleValue, []);
reducibleJoin20: while (true) {
if (value8 == null) {
break reducibleJoin20;
}
getState = value8.getState;
value9 = Reflect.apply(getState, value8, []);
reducibleJoin13: while (true) {
if (value9 == null) {
length = undefined;
break reducibleJoin13;
}
routes = value9.routes;
if (routes == null) {
length = undefined;
break reducibleJoin13;
}
length = routes.length;
break reducibleJoin13;
}
routes = value9.routes;
if (routes == null) {
length = undefined;
break reducibleJoin13;
if (!(length > 1)) {
break reducibleJoin20;
}
length = routes.length;
break reducibleJoin13;
}
if (!(length > 1)) {
break reducibleJoin20;
}
getState = value8.getState;
value10 = Reflect.apply(getState, value8, []);
reducibleJoin17: while (true) {
if (value10 == null) {
length = undefined;
getState = value8.getState;
value10 = Reflect.apply(getState, value8, []);
reducibleJoin17: while (true) {
if (value10 == null) {
length = undefined;
break reducibleJoin17;
}
routes = value10.routes;
if (routes == null) {
length = undefined;
break reducibleJoin17;
}
length = routes.length;
break reducibleJoin17;
}
routes = value10.routes;
if (routes == null) {
length = undefined;
break reducibleJoin17;
value11 = 0;
r1 = length ?? value11;
if (!(r1 > 1)) {
break reducibleJoin20;
}
length = routes.length;
break reducibleJoin17;
}
value11 = 0;
r1 = length ?? value11;
if (!(r1 > 1)) {
break reducibleJoin20;
}
reducibleLoop19: while (true) {
goBack = value8.goBack;
Reflect.apply(goBack, value8, []);
value12 = typeof r1 === 'bigint' ? r1 - 1n : +r1 - 1;
if (value12 > 1) {
r1 = value12;
continue reducibleLoop19;
reducibleLoop19: while (true) {
goBack = value8.goBack;
Reflect.apply(goBack, value8, []);
value12 = typeof r1 === 'bigint' ? r1 - 1n : +r1 - 1;
if (value12 > 1) {
r1 = value12;
continue reducibleLoop19;
}
break reducibleJoin20;
}
break reducibleJoin20;
}
defaultImport2 = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
hideActionSheet = defaultImport2.hideActionSheet;
Reflect.apply(hideActionSheet, defaultImport2, []);
setTimeout = global.setTimeout;
setTimeout(_fun68602, 0);
return undefined;
}
defaultImport2 = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
hideActionSheet = defaultImport2.hideActionSheet;
Reflect.apply(hideActionSheet, defaultImport2, []);
setTimeout = global.setTimeout;
setTimeout(_fun68602, 0);
return undefined;
break reducibleJoin2;
}
break reducibleJoin2;
}
if (currentText === '') {
onSetCommand();
} else {
defaultImport = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
show = defaultImport.show;
object = {};
object.title = intl.string(t.pe26Cj);
object.confirmText = intl.string(t.VkKicb);
object.onConfirm = function() {
return onSetCommand();
};
object.cancelText = intl.string(t['ETE/oC']);
object.confirmColor = (require(1305) /* metro dependency 1305: native */).ButtonColors.BRAND;
object.body = intl.string(t['+awCIy']);
Reflect.apply(show, defaultImport, [object]);
}
function _fun68602() { // fn#68602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8954:995, offset: 0x01c55dba, size: 123 bytes, params: 1, frame: 16
const onOpenCustomKeyboardBinding = onOpenCustomKeyboard;
const object = {};
const KeyboardTypes = (KeyboardTypesModule).KeyboardTypes;
const APP_LAUNCHER = KeyboardTypes.APP_LAUNCHER;
object.type = APP_LAUNCHER;
const object2 = {};
const COMMAND_VIEW = AppLauncherRouteName.COMMAND_VIEW;
object2.initialRouteName = COMMAND_VIEW;
const ApplicationCommandTriggerLocations = (ApplicationCommandTypesModule).ApplicationCommandTriggerLocations;
const MENTION = ApplicationCommandTriggerLocations.MENTION;
object2.analyticsLocation = MENTION;
object2.preSelectedCommand = {commandId: env0_2};
object.context = object2;
return onOpenCustomKeyboardBinding(object);
}
}
if (currentText === '') {
onSetCommand();
} else {
defaultImport = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
show = defaultImport.show;
object3 = {};
object3.title = intl.string(t.pe26Cj);
object3.confirmText = intl.string(t.VkKicb);
object3.onConfirm = function() {
return onSetCommand();
};
object3.cancelText = intl.string(t['ETE/oC']);
object3.confirmColor = (require(1305) /* metro dependency 1305: native */).ButtonColors.BRAND;
object3.body = intl.string(t['+awCIy']);
Reflect.apply(show, defaultImport, [object3]);
function handleLongPressCommandMention(a0, a1) { // fn#68604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8954:1484, offset: 0x01c55e35, size: 310 bytes, params: 3, frame: 19
var push;
const env0_0 = a0;
const env0_1 = a1;
let object = {};
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
object.label = Reflect.apply(string, intl, [t['42H+Nb']]);
const SlashBoxIcon = (SlashBoxIconModule).SlashBoxIcon;
object.IconComponent = SlashBoxIcon;
object.onPress = onPress_68605;
const items2 = [object];
const DeveloperMode = (UserSettingsModule).DeveloperMode;
const getSetting = DeveloperMode.getSetting;
if (Reflect.apply(getSetting, DeveloperMode, [])) {
push = items2.push;
object = {};
object.label = intl.string(t.oJ1Muw);
object.IconComponent = (require(8772) /* metro dependency 8772: IdIcon */).IdIcon;
object.onPress = onPress_68606;
Reflect.apply(push, items2, [object]);
}
(ShowSimpleActionSheetModule).showSimpleActionSheet({'key': 'LongPressCommandMention',
'options': null, 'hasIcons': true, options: items2});
function handleLongPressCommandMentionOnPress() { // fn#68605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8954:1621, owner: handleLongPressCommandMention.onPress, offset: 0x01c55f6b, size: 94 bytes, params: 1, frame: 16
(ToastUtilsModule).presentCommandCopied();
ClipboardUtilsNativeModule.copy('' + COMMAND_SENTINEL + env0_0);
}
function handleLongPressCommandMentionOnPress_68606() { // fn#68606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8954:1813, owner: handleLongPressCommandMention.onPress, offset: 0x01c55fc9, size: 67 bytes, params: 1, frame: 13
const value = environment.__proto__;
(ToastUtilsModule).presentIdCopied();
(ClipboardUtilsNativeModule).copy(require);
}
}
}
function handleLongPressCommandMention(a0, a1) { // fn#68604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8954:1484, offset: 0x01c55e35, size: 310 bytes, params: 3, frame: 19
var push;
const env0_0 = a0;
const env0_1 = a1;
let object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.label = Reflect.apply(string, intl, [t['42H+Nb']]);
const SlashBoxIcon = (require(8770) /* metro dependency 8770: SlashBoxIcon */).SlashBoxIcon;
object2.IconComponent = SlashBoxIcon;
object2.onPress = onPress_68605;
const items2 = [object2];
const DeveloperMode = (require(3829) /* metro dependency 3829: UserSettings */).DeveloperMode;
const getSetting = DeveloperMode.getSetting;
if (Reflect.apply(getSetting, DeveloperMode, [])) {
push = items2.push;
object2 = {};
object2.label = intl.string(t.oJ1Muw);
object2.IconComponent = (require(8772) /* metro dependency 8772: IdIcon */).IdIcon;
object2.onPress = onPress_68606;
Reflect.apply(push, items2, [object2]);
function MarkupReactCommandRule({node, output, state, style}) { // fn#68607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8954:2049, offset: 0x01c5600c, size: 210 bytes, params: 2, frame: 22
const useContext = ReactModule.useContext;
const AppLauncherContext = (AppLauncherContextModule).AppLauncherContext;
const result = Reflect.apply(useContext, ReactModule, [AppLauncherContext]) != null;
const env0_2 = useAppLauncherNavigation();
const Text = (TextModule).Text;
const object = {style: style, variant: 'text-md/bold', onPress: onPress_68608, onLongPress: function() {
var handleLongPressCommandMentionBinding = handleLongPressCommandMention;
var nodeBinding = node;
handleLongPressCommandMentionBinding(nodeBinding.commandName, nodeBinding.commandId);
}};
let value = MarkupRulesUtilsModule;
value = value.smartOutput(node, output, state);
return (
<Text {...object}>
{'/'}
{value}
</Text>
);
function MarkupReactCommandRuleOnPress() { // fn#68608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8954:2239, owner: MarkupReactCommandRule.onPress, offset: 0x01c560de, size: 174 bytes, params: 1, frame: 16
var environment;
const value = environment.__proto__;
const value2 = undefined;
const bestActiveInput = (ChatInputUtilsModule).getBestActiveInput();
const handleTapCommandMentionBinding = handleTapCommandMention;
const object = {};
object.appLauncherNavigator = result ? env0_2 : value2;
const nodeBinding = node;
object.channelId = nodeBinding.channelId;
object.commandId = nodeBinding.commandId;
object.commandName = nodeBinding.commandName;
object.currentText = (bestActiveInput == null ? value2 : bestActiveInput.getText()) ?? '';
object.onOpenCustomKeyboard = onOpenCustomKeyboard;
object.onSetCommand = onSetCommand;
handleTapCommandMentionBinding(object);
return value2;
function onPressOnOpenCustomKeyboard_68609(a0) { // fn#68609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8954:2484, owner: MarkupReactCommandRule.onPress.onOpenCustomKeyboard, offset: 0x01c557b4, size: 38 bytes, params: 2, frame: 12
return env0_0?.openCustomKeyboard(a0);
}
function onPressOnSetCommand_68610() { // fn#68610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8954:2539, owner: MarkupReactCommandRule.onPress.onSetCommand, offset: 0x01c5618c, size: 181 bytes, params: 1, frame: 18
var r2;
var r5;
var applicationCommandManager;
var setPartialCommand;
var value7;
var nodeBinding;
const value2 = undefined;
(NavigateToLastChannel)();
(ActionSheetActionCreators).hideActionSheet();
if (env0_0 != null) {
env0_0.openSystemKeyboard();
}
const value4 = env0_0 == null;
if (value4) {
r2 = value4;
r5 = value2;
} else {
applicationCommandManager = env0_0.getApplicationCommandManager();
r2 = applicationCommandManager == null;
r5 = applicationCommandManager;
}
if (!r2) {
setPartialCommand = r5.setPartialCommand;
value7 = environment.__proto__;
nodeBinding = node;
Reflect.apply(setPartialCommand, r5, [nodeBinding.commandId, nodeBinding.commandName,
(require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandTriggerLocations.MENTION]);
}
return value2;
}
}
}
(require(6802) /* metro dependency 6802: showSimpleActionSheet */).showSimpleActionSheet({'key': 'LongPressCommandMention',
'options': null, 'hasIcons': true, options: items2});
}
function MarkupReactCommandRule({node, output, state, style}) { // fn#68607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8954:2049, offset: 0x01c5600c, size: 210 bytes, params: 2, frame: 22
const binding = env0_3;
const useContext = binding.useContext;
const AppLauncherContext = (require(8774) /* metro dependency 8774: AppLauncherContext */).AppLauncherContext;
const result = Reflect.apply(useContext, binding, [AppLauncherContext]) != null;
const env0_2 = useAppLauncherNavigation();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const object2 = {style: style, variant: 'text-md/bold', onPress: onPress_68608, onLongPress: function() {
var handleLongPressCommandMentionBinding = handleLongPressCommandMention;
var nodeBinding = node;
handleLongPressCommandMentionBinding(nodeBinding.commandName, nodeBinding.commandId);
}};
let value = require(8778) /* metro dependency 8778: MarkupRulesUtils */;
value = value.smartOutput(node, output, state);
return (
<Text {...object2}>
{'/'}
{value}
</Text>
);
}
function _fun68602() { // fn#68602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8954:995, offset: 0x01c55dba, size: 123 bytes, params: 1, frame: 16
const onOpenCustomKeyboardBinding = onOpenCustomKeyboard;
const object3 = {};
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
const APP_LAUNCHER = KeyboardTypes.APP_LAUNCHER;
object3.type = APP_LAUNCHER;
const object4 = {};
const COMMAND_VIEW = AppLauncherRouteName.COMMAND_VIEW;
object4.initialRouteName = COMMAND_VIEW;
const ApplicationCommandTriggerLocations = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandTriggerLocations;
const MENTION = ApplicationCommandTriggerLocations.MENTION;
object4.analyticsLocation = MENTION;
object4.preSelectedCommand = {commandId: env0_2};
object3.context = object4;
return onOpenCustomKeyboardBinding(object3);
}
function handleLongPressCommandMentionOnPress() { // fn#68605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8954:1621, owner: handleLongPressCommandMention.onPress, offset: 0x01c55f6b, size: 94 bytes, params: 1, frame: 16
(require(3856) /* metro dependency 3856: ToastUtils */).presentCommandCopied();
const clipboardUtilsNativeModule = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
clipboardUtilsNativeModule.copy('' + COMMAND_SENTINEL + env0_0);
}
function handleLongPressCommandMentionOnPress_68606() { // fn#68606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8954:1813, owner: handleLongPressCommandMention.onPress, offset: 0x01c55fc9, size: 67 bytes, params: 1, frame: 13
const value = environment.__proto__;
(require(3856) /* metro dependency 3856: ToastUtils */).presentIdCopied();
(require(6797) /* metro dependency 6797: ClipboardUtilsNative */).copy(require);
}
function MarkupReactCommandRuleOnPress() { // fn#68608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8954:2239, owner: MarkupReactCommandRule.onPress, offset: 0x01c560de, size: 174 bytes, params: 1, frame: 16
var environment;
const value = environment.__proto__;
const value2 = undefined;
const bestActiveInput = (require(4015) /* metro dependency 4015: ChatInputUtils */).getBestActiveInput();
const handleTapCommandMentionBinding = handleTapCommandMention;
const object2 = {};
object2.appLauncherNavigator = result ? env0_2 : value2;
const nodeBinding = node;
object2.channelId = nodeBinding.channelId;
object2.commandId = nodeBinding.commandId;
object2.commandName = nodeBinding.commandName;
object2.currentText = (bestActiveInput == null ? value2 : bestActiveInput.getText()) ?? '';
object2.onOpenCustomKeyboard = onOpenCustomKeyboard;
object2.onSetCommand = onSetCommand;
handleTapCommandMentionBinding(object2);
return value2;
}
function onPressOnSetCommand_68610() { // fn#68610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8954:2539, owner: MarkupReactCommandRule.onPress.onSetCommand, offset: 0x01c5618c, size: 181 bytes, params: 1, frame: 18
var r2;
var r5;
var applicationCommandManager;
var setPartialCommand;
var value7;
var nodeBinding;
const value2 = undefined;
(importDefault(8776) /* metro dependency 8776: navigateToLastChannel */)();
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
if (env0_0 != null) {
env0_0.openSystemKeyboard();
}
const value4 = env0_0 == null;
if (value4) {
r2 = value4;
r5 = value2;
} else {
applicationCommandManager = env0_0.getApplicationCommandManager();
r2 = applicationCommandManager == null;
r5 = applicationCommandManager;
}
if (!r2) {
setPartialCommand = r5.setPartialCommand;
value7 = environment.__proto__;
nodeBinding = node;
Reflect.apply(setPartialCommand, r5, [nodeBinding.commandId, nodeBinding.commandName,
(require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandTriggerLocations.MENTION]);
}
return value2;
}
global.__d(_fun68600, 8769, [31, 1379, 1483, 5066, 6625, 33, 5068, 4008, 4080, 1583, 4496, 1244, 1305, 8770, 3856,
6797, 3829, 8772, 6802, 8774, 4573, 4015, 8776, 8778,
2]) /* metro module 8769, dependencies: [31, 1379, 1483, 5066, 6625, 33, 5068, 4008, 4080, 1583, 4496, 1244, 1305, 8770, 3856, 6797, 3829, 8772, 6802, 8774, 4573, 4015, 8776, 8778, 2] */;
@@ -1,78 +1,89 @@
/* Metro module 12378; source: modules/markup/native/MarkupReactGameMentionRule.tsx; dependencies: [31, 33, 4501, 697, 1244, 4599, 10219, 5475, 9959, 9963, 4573, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as MarkupReactRulesNativeModule from '../MarkupReactRules.native.tsx'; /* Metro dependency 4599 */
function _fun94324(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12564:6, offset: 0x02113b6f, size: 312 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 */;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_3 = value.jsxs;
const env0_4 = value.jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object5 = {'width': 16, 'height': 16, 'borderRadius': null, 'marginRight': 2};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object4.icon = object5;
const object6 = {};
object = {};
const object2 = {'width': 16, 'height': 16, 'borderRadius': null, 'marginRight': 2};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.icon = object2;
const object3 = {};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object6.backgroundColor = BORDER_SUBTLE;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object6.paddingHorizontal = 2;
object4.chip = object6;
object3.backgroundColor = BORDER_SUBTLE;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object3.paddingHorizontal = 2;
object.chip = object3;
const BRAND_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_500;
object4.chipText = {color: BRAND_500};
const env0_5 = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/markup/native/MarkupReactGameMentionRule.tsx');
object.chipText = {color: BRAND_500};
const env0_5 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/markup/native/MarkupReactGameMentionRule.tsx');
exports.default = MarkupGameMention;
}
function MarkupGameMention({node, state}) { // fn#94325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12564:478, offset: 0x02113ca7, size: 543 bytes, params: 2, frame: 24
var r7;
const MarkupText = (require(4599) /* metro dependency 4599: MarkupReactRulesNative */).MarkupText;
var object2;
var unknownGameIcon;
var noStyleAndInteraction;
const styles = useStyles();
const env0_1 = node.gameId;
const gameName = node.gameName;
const icon = node.icon;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value3 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['11pdXZ']);
let r1 = gameName != null && gameName !== '';
if (r1) {
const UnknownGameIcon = (require(10219) /* metro dependency 10219: UnknownGameIcon */).UnknownGameIcon;
unknownGameIcon = <UnknownGameIcon size="sm" style={styles.icon} />;
r1 = icon != null && icon !== '';
r7 = r1 ? ((Component) => <Component style={styles.icon} source={{uri: icon}} />)(importDefault(5475) /* metro dependency 5475: FastImage */) : unknownGameIcon;
object2 = {};
noStyleAndInteraction = state.noStyleAndInteraction;
object2.accessibilityRole = noStyleAndInteraction ? 'text' : 'button';
object2.style = styles.chip;
object2.color = state?.textColor;
noStyleAndInteraction = state.noStyleAndInteraction;
object2.onPress = noStyleAndInteraction ? undefined : function() {
var defaultImport = importDefault(dependencyMap[8]);
var object = {};
var gameIdBinding = gameId;
object.gameId = gameIdBinding;
object.gameProfileModalChecks = {shouldOpenGameProfile: true, gameId: gameIdBinding};
object.source = require(dependencyMap[9]).GameProfileSources.GameMention;
object.sourceUserId = state.authorId;
defaultImport.openGameProfileModal(object);
};
function MarkupGameMention({node, state}) { // fn#94325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12564:478, offset: 0x02113ca7, size: 543 bytes, params: 2, frame: 24
var r7;
const MarkupText = (MarkupReactRulesNativeModule).MarkupText;
var object;
var unknownGameIcon;
var noStyleAndInteraction;
const styles = useStyles();
const env0_1 = node.gameId;
const gameName = node.gameName;
const icon = node.icon;
const intl = (IndexNativeModule).intl;
const value3 = intl.string((IndexNativeModule).t['11pdXZ']);
let r1 = gameName != null && gameName !== '';
if (r1) {
const UnknownGameIcon = (require(10219) /* metro dependency 10219: UnknownGameIcon */).UnknownGameIcon;
unknownGameIcon = <UnknownGameIcon size="sm" style={styles.icon} />;
r1 = icon != null && icon !== '';
r7 = (
r1
? ((Component) => <Component style={styles.icon} source={{uri: icon}} />)(importDefault(5475) /* metro dependency 5475: FastImage */)
: unknownGameIcon
);
object = {};
noStyleAndInteraction = state.noStyleAndInteraction;
object.accessibilityRole = noStyleAndInteraction ? 'text' : 'button';
object.style = styles.chip;
object.color = state?.textColor;
noStyleAndInteraction = state.noStyleAndInteraction;
object.onPress = noStyleAndInteraction ? undefined : function() {
var defaultImport = importDefault(dependencyMap[8]);
var object = {};
var gameIdBinding = gameId;
object.gameId = gameIdBinding;
object.gameProfileModalChecks = {shouldOpenGameProfile: true, gameId: gameIdBinding};
object.source = require(dependencyMap[9]).GameProfileSources.GameMention;
object.sourceUserId = state.authorId;
defaultImport.openGameProfileModal(object);
};
return (
<MarkupText {...object} key={state.key}>
{r7}
{((Text) => <Text variant="text-sm/medium" style={styles.chipText}>{r1 ? gameName : value3}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</MarkupText>
);
}
return (
<MarkupText {...object2} key={state.key}>
{r7}
{((Text) => <Text variant="text-sm/medium" style={styles.chipText}>{r1 ? gameName : value3}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
<MarkupText color={state?.textColor} key={state.key}>
{'@'}
{value3}
</MarkupText>
);
}
return (
<MarkupText color={state?.textColor} key={state.key}>
{'@'}
{value3}
</MarkupText>
);
}
global.__d(_fun94324, 12378, [31, 33, 4501, 697, 1244, 4599, 10219, 5475, 9959, 9963, 4573,
2]) /* metro module 12378, dependencies: [31, 33, 4501, 697, 1244, 4599, 10219, 5475, 9959, 9963, 4573, 2] */;
@@ -1,18 +1,22 @@
/* Metro module 15070; source: modules/markup/native/MarkupSearchResultLinkPreviewReactRules.tsx; dependencies: [10979, 1305, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as MarkupMessagePreviewReactRulesModule from './MarkupMessagePreviewReactRules.tsx'; /* Metro dependency 10979 */
function _fun114021(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15267:6, offset: 0x02411379, size: 96 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/markup/native/MarkupSearchResultLinkPreviewReactRules.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/markup/native/MarkupSearchResultLinkPreviewReactRules.tsx');
exports.createSearchResultLinkPreviewReactRules = createSearchResultLinkPreviewReactRules;
function createSearchResultLinkPreviewReactRules() { // fn#114022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15267:233, offset: 0x024113d9, size: 81 bytes, params: 1, frame: 15
const createMessagePreviewReactRules = MarkupMessagePreviewReactRulesModule.createMessagePreviewReactRules;
const IconSizes = (NativeModule).IconSizes;
const SMALL_14 = IconSizes.SMALL_14;
return Reflect.apply(createMessagePreviewReactRules, MarkupMessagePreviewReactRulesModule, [{'iconColor': 'mobile-text-heading-primary',
'iconSize': 'xs', 'channelIconSize': null, 'customEmojiSize': 16, channelIconSize: SMALL_14}]);
}
}
function createSearchResultLinkPreviewReactRules() { // fn#114022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15267:233, offset: 0x024113d9, size: 81 bytes, params: 1, frame: 15
const value = require(10979) /* metro dependency 10979: MarkupMessagePreviewReactRules */;
const createMessagePreviewReactRules = value.createMessagePreviewReactRules;
const IconSizes = (require(1305) /* metro dependency 1305: native */).IconSizes;
const SMALL_14 = IconSizes.SMALL_14;
return Reflect.apply(createMessagePreviewReactRules, value, [{'iconColor': 'mobile-text-heading-primary',
'iconSize': 'xs', 'channelIconSize': null, 'customEmojiSize': 16, channelIconSize: SMALL_14}]);
}
global.__d(_fun114021, 15070, [10979, 1305, 2]) /* metro module 15070, dependencies: [10979, 1305, 2] */;
+214 -208
View File
@@ -1,225 +1,231 @@
/* Metro module 10988; source: modules/markup/native/Spoiler.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 661, 10980, 33, 4501, 477, 697, 1305, 3868, 2] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as NativeModule2 from '../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as RedesignChannelListConstantsModule from '../../channel_list_v2/native/RedesignChannelListConstants.tsx'; /* Metro dependency 10980 */
function _fun84090(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11174:6, offset: 0x01f38a7a, size: 549 bytes, params: 8, frame: 25
var object5;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_8 = value2.View;
const env0_9 = value2.StyleSheet;
const EMOJI_CHAT_SIZE = (require(661) /* metro dependency 661: Constants */).EMOJI_CHAT_SIZE;
const MUTED_OPACITY_CONTENT = (require(10980) /* metro dependency 10980: RedesignChannelListConstants */).MUTED_OPACITY_CONTENT;
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
object5 = {};
const object6 = {};
object6.color = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? 'rgba(0,0,0,0.0019607844)' : 'transparent';
let value = ReactModule;
const EMOJI_CHAT_SIZE = (ConstantsModule).EMOJI_CHAT_SIZE;
const MUTED_OPACITY_CONTENT = (RedesignChannelListConstantsModule).MUTED_OPACITY_CONTENT;
const createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
object = {};
const object2 = {};
object2.color = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? 'rgba(0,0,0,0.0019607844)' : 'transparent';
let SPOILER_HIDDEN_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.SPOILER_HIDDEN_BACKGROUND;
object6.backgroundColor = SPOILER_HIDDEN_BACKGROUND;
object5.spoiler = object6;
const object7 = {width: EMOJI_CHAT_SIZE, height: EMOJI_CHAT_SIZE};
object2.backgroundColor = SPOILER_HIDDEN_BACKGROUND;
object.spoiler = object2;
const object3 = {width: EMOJI_CHAT_SIZE, height: EMOJI_CHAT_SIZE};
SPOILER_HIDDEN_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.SPOILER_HIDDEN_BACKGROUND;
object7.backgroundColor = SPOILER_HIDDEN_BACKGROUND;
object5.placeholder = object7;
const object8 = {};
object3.backgroundColor = SPOILER_HIDDEN_BACKGROUND;
object.placeholder = object3;
const object4 = {};
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object8.color = TEXT_DEFAULT;
object4.color = TEXT_DEFAULT;
const SPOILER_REVEALED_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.SPOILER_REVEALED_BACKGROUND;
object8.backgroundColor = SPOILER_REVEALED_BACKGROUND;
object5.spoilerRevealed = object8;
object5.muted = {opacity: MUTED_OPACITY_CONTENT};
const env0_11 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object5]);
object4.backgroundColor = SPOILER_REVEALED_BACKGROUND;
object.spoilerRevealed = object4;
object.muted = {opacity: MUTED_OPACITY_CONTENT};
const env0_11 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [object]);
const PureComponent = value.PureComponent;
value = _fun84096(PureComponent);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule2).ThemeContext;
value.contextType = ThemeContext;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/markup/native/Spoiler.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/markup/native/Spoiler.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_84091() { // fn#84091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11174:264, offset: 0x01f38c9f, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_84091_isNativeReflectConstruct = function() {
return !!result;
})();
}
function recursiveTextExtraction(a0, a1) { // fn#84094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11174:888, offset: 0x01f38d01, size: 45 bytes, params: 3, frame: 13
const env0_0 = a1;
const Children = env0_7.Children;
return Children.map(a0, _fun84095);
}
function _fun84096(a0) { // fn#84096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11174:1124, offset: 0x01f38dc8, size: 72 bytes, params: 2, frame: 15
const closure = Spoiler_84097;
env0_6(closure, a0);
return env0_3(closure, [{key: 'render', value: value_84099}]);
}
function _fun84095(a0) { // fn#84095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11174:913, offset: 0x01f38d2e, size: 154 bytes, params: 2, frame: 18
var r7;
var props;
var style;
var Array;
var cloneElement;
var object2;
var recursiveTextExtractionBinding;
let binding = env1_7;
if (binding.isValidElement(a0)) {
props = a0.props;
style = props.style;
Array = global.Array;
r7 = Array.isArray(style) ? StyleSheet.flatten(style) : style;
binding = env1_7;
cloneElement = binding.cloneElement;
object2 = {};
recursiveTextExtractionBinding = recursiveTextExtraction;
props = a0.props;
object2.children = recursiveTextExtractionBinding(props.children, require);
object2.style = [r7, require.spoiler];
object2.onPress = undefined;
return Reflect.apply(cloneElement, binding, [a0, object2]);
}
return a0;
}
function Spoiler_84097(a0) { // fn#84097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11174:1136, offset: 0x01f38e10, size: 160 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_2;
binding(this, Spoiler_84097);
const items = [];
arraySpread(items, value, 0, items);
value = env1_5(Spoiler_84097);
binding = env1_4;
if (_isNativeReflectConstruct_84091()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
value.state = {revealed: false};
value.handleTap = handleTap;
return value;
}
function value_84099() { // fn#84099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11174:1518, offset: 0x01f38eff, size: 284 bytes, params: 1, frame: 19
const binding = env1_11;
const context = this.context;
const value2 = undefined;
const value3 = binding(context);
const revealed = this.state.revealed;
const props = this.props;
const children = props.children;
const r7 = revealed ? [value3.spoilerRevealed, props.spoilerRevealedStyle] : [value3.spoiler, props.spoilerStyle];
let Children = env1_7.Children;
if (Children.count(children) === 0) {
return null;
}
Children = env1_7.Children;
const value5 = Children.map(children, _fun84100);
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
return (
<LegacyText
accessibilityRole="button"
style={[r7, this.props.muted && value3.muted]}
onPress={this.props.disableReveal ? value2 : this.handleTap}
>
{value5}
</LegacyText>
);
}
function handleTap() { // fn#84098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11174:1377, owner: Spoiler_84097.handleTap, offset: 0x01f38eb0, size: 79 bytes, params: 1, frame: 12
var binding;
if (!(env0_0.state.revealed || env0_0.props.disableReveal)) {
binding = env0_0;
binding.setState({revealed: !binding.state.revealed});
}
}
function _fun84100(a0) { // fn#84100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11174:1744, offset: 0x01f3901b, size: 168 bytes, params: 2, frame: 16
var r2;
var r1;
var r0;
let value = a0;
const binding = env2_7;
if (binding.isValidElement(value)) {
if (value.type.displayName === 'Image') {
if (revealed) {
if (value.props == null) {
r2 = value;
} else if (revealed) {
r2 = value;
} else {
value = recursiveTextExtraction(value, env0_0);
r2 = value;
}
r1 = r2;
} else {
r1 = <View style={env0_0.placeholder} />;
}
} else if (value.props?.source == null) {
if (value.props == null) {
r2 = value;
} else if (revealed) {
r2 = value;
} else {
value = recursiveTextExtraction(value, env0_0);
r2 = value;
}
r1 = r2;
} else if (revealed) {
if (value.props == null) {
r2 = value;
} else if (revealed) {
r2 = value;
} else {
value = recursiveTextExtraction(value, env0_0);
r2 = value;
}
r1 = r2;
} else {
r1 = <View style={env0_0.placeholder} />;
function _isNativeReflectConstruct_84091() { // fn#84091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11174:264, offset: 0x01f38c9f, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
r0 = r1;
} else {
r0 = value;
return (_isNativeReflectConstruct_84091_isNativeReflectConstruct = function() {
return !!result;
})();
}
return r0;
function recursiveTextExtraction(a0, a1) { // fn#84094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11174:888, offset: 0x01f38d01, size: 45 bytes, params: 3, frame: 13
const env0_0 = a1;
const Children = env0_7.Children;
return Children.map(a0, _fun84095);
function _fun84095(a0) { // fn#84095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11174:913, offset: 0x01f38d2e, size: 154 bytes, params: 2, frame: 18
var r7;
var props;
var style;
var Array;
var cloneElement;
var object;
var recursiveTextExtractionBinding;
let binding = env1_7;
if (binding.isValidElement(a0)) {
props = a0.props;
style = props.style;
Array = global.Array;
r7 = Array.isArray(style) ? StyleSheet.flatten(style) : style;
binding = env1_7;
cloneElement = binding.cloneElement;
object = {};
recursiveTextExtractionBinding = recursiveTextExtraction;
props = a0.props;
object.children = recursiveTextExtractionBinding(props.children, require);
object.style = [r7, require.spoiler];
object.onPress = undefined;
return Reflect.apply(cloneElement, binding, [a0, object]);
}
return a0;
}
}
function _fun84096(a0) { // fn#84096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11174:1124, offset: 0x01f38dc8, size: 72 bytes, params: 2, frame: 15
const Spoiler2 = Spoiler;
Inherits(Spoiler2, a0);
return CreateClass(Spoiler2, [{key: 'render', value: value_84099}]);
function Spoiler(a0) { // fn#84097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11174:1136, offset: 0x01f38e10, size: 160 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_2;
binding(this, Spoiler);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_5(Spoiler);
binding = env1_4;
if (_isNativeReflectConstruct_84091()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.state = {revealed: false};
value.handleTap = handleTap;
return value;
function handleTap() { // fn#84098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11174:1377, owner: Spoiler.handleTap, offset: 0x01f38eb0, size: 79 bytes, params: 1, frame: 12
var binding;
if (!(env0_0.state.revealed || env0_0.props.disableReveal)) {
binding = env0_0;
binding.setState({revealed: !binding.state.revealed});
}
}
}
function value_84099() { // fn#84099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11174:1518, offset: 0x01f38eff, size: 284 bytes, params: 1, frame: 19
const binding = env1_11;
const context = this.context;
const value2 = undefined;
const value3 = binding(context);
const revealed = this.state.revealed;
const props = this.props;
const children = props.children;
const r7 = revealed ? [value3.spoilerRevealed, props.spoilerRevealedStyle] : [value3.spoiler, props.spoilerStyle];
let Children = env1_7.Children;
if (Children.count(children) === 0) {
return null;
}
Children = env1_7.Children;
const value5 = Children.map(children, _fun84100);
const LegacyText = (NativeModule).LegacyText;
return (
<LegacyText
accessibilityRole="button"
style={[r7, this.props.muted && value3.muted]}
onPress={this.props.disableReveal ? value2 : this.handleTap}
>
{value5}
</LegacyText>
);
function _fun84100(a0) { // fn#84100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11174:1744, offset: 0x01f3901b, size: 168 bytes, params: 2, frame: 16
var r2;
var r1;
var r0;
let value = a0;
const binding = env2_7;
if (binding.isValidElement(value)) {
if (value.type.displayName === 'Image') {
if (revealed) {
if (value.props == null) {
r2 = value;
} else if (revealed) {
r2 = value;
} else {
value = recursiveTextExtraction(value, env0_0);
r2 = value;
}
r1 = r2;
} else {
r1 = <View style={env0_0.placeholder} />;
}
} else if (value.props?.source == null) {
if (value.props == null) {
r2 = value;
} else if (revealed) {
r2 = value;
} else {
value = recursiveTextExtraction(value, env0_0);
r2 = value;
}
r1 = r2;
} else if (revealed) {
if (value.props == null) {
r2 = value;
} else if (revealed) {
r2 = value;
} else {
value = recursiveTextExtraction(value, env0_0);
r2 = value;
}
r1 = r2;
} else {
r1 = <View style={env0_0.placeholder} />;
}
r0 = r1;
} else {
r0 = value;
}
return r0;
}
}
}
}
global.__d(_fun84090, 10988, [6, 7, 15, 17, 18, 31, 27, 661, 10980, 33, 4501, 477, 697, 1305, 3868,
2]) /* metro module 10988, dependencies: [6, 7, 15, 17, 18, 31, 27, 661, 10980, 33, 4501, 477, 697, 1305, 3868, 2] */;
+37 -34
View File
@@ -1,42 +1,45 @@
/* Metro module 11556; source: modules/markup/native/SpoilerIcon.tsx; dependencies: [31, 33, 7744, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as Module07744Module from '../../../by-id/module-07744.js'; /* Metro dependency 7744 */
function _fun88566(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11742:6, offset: 0x01fe8ae8, size: 140 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 value = require(33) /* metro dependency 33 */;
const env0_2 = value.jsx;
const env0_3 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/markup/native/SpoilerIcon.tsx');
exports.default = Spoiler;
}
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/markup/native/SpoilerIcon.tsx');
exports.default = Spoiler_88567;
function Spoiler_88567(a0) { // fn#88567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11742:212, offset: 0x01fe8b74, size: 259 bytes, params: 2, frame: 23
let width = a0.width;
width = width === undefined ? 24 : width;
let height = a0.height;
height = height === undefined ? 24 : height;
let color = a0.color;
color = color === undefined ? 'currentColor' : color;
const object = {'width': 0, 'height': 0, 'color': 0};
silentSetPrototypeOf(object, null, undefined);
const value = copyDataProperties({}, a0, object, undefined);
const Svg = (Module07744Module).Svg;
const svgProps = {viewBox: '0 0 24 24', ...value};
svgProps['width'] = width;
svgProps['height'] = height;
const Path = (Module07744Module).Path;
return (
<Svg {...svgProps}>
<Path
fill={color}
d="M9.09091 12C9.09091 13.5786 10.3935 14.8571 12 14.8571C13.6065 14.8571 14.9091 13.5786 14.9091 12C14.9091 10.4214 13.6065 9.14286 12 9.14286C10.3935 9.14286 9.09091 10.4214 9.09091 12ZM13.3402 12C13.3402 12.789 12.689 13.4286 11.8857 13.4286C11.0823 13.4286 10.4311 12.789 10.4311 12C10.4311 11.211 11.0823 10.5714 11.8857 10.5714C12.689 10.5714 13.3402 11.211 13.3402 12Z"
/>
<Path
fill={color}
d="M4 2C2.89543 2 2 2.89543 2 4V20C2 21.1046 2.89543 22 4 22H20C21.1046 22 22 21.1046 22 20V4C22 2.89543 21.1046 2 20 2H4ZM4 12C4 12 7.38036 7 12 7C16.6196 7 20 12 20 12C20 12 16.6196 17 12 17C7.38036 17 4 12 4 12Z"
/>
</Svg>
);
}
function Spoiler(a0) { // fn#88567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11742:212, offset: 0x01fe8b74, size: 259 bytes, params: 2, frame: 23
let width = a0.width;
width = width === undefined ? 24 : width;
let height = a0.height;
height = height === undefined ? 24 : height;
let color = a0.color;
color = color === undefined ? 'currentColor' : color;
const object2 = {'width': 0, 'height': 0, 'color': 0};
silentSetPrototypeOf(object2, null, undefined);
const value = copyDataProperties({}, a0, object2, undefined);
const Svg = (require(7744) /* metro dependency 7744 */).Svg;
const svgProps = {viewBox: '0 0 24 24', ...value};
svgProps['width'] = width;
svgProps['height'] = height;
const Path = (require(7744) /* metro dependency 7744 */).Path;
return (
<Svg {...svgProps}>
<Path
fill={color}
d="M9.09091 12C9.09091 13.5786 10.3935 14.8571 12 14.8571C13.6065 14.8571 14.9091 13.5786 14.9091 12C14.9091 10.4214 13.6065 9.14286 12 9.14286C10.3935 9.14286 9.09091 10.4214 9.09091 12ZM13.3402 12C13.3402 12.789 12.689 13.4286 11.8857 13.4286C11.0823 13.4286 10.4311 12.789 10.4311 12C10.4311 11.211 11.0823 10.5714 11.8857 10.5714C12.689 10.5714 13.3402 11.211 13.3402 12Z"
/>
<Path
fill={color}
d="M4 2C2.89543 2 2 2.89543 2 4V20C2 21.1046 2.89543 22 4 22H20C21.1046 22 22 21.1046 22 20V4C22 2.89543 21.1046 2 20 2H4ZM4 12C4 12 7.38036 7 12 7C16.6196 7 20 12 20 12C20 12 16.6196 17 12 17C7.38036 17 4 12 4 12Z"
/>
</Svg>
);
}
global.__d(_fun88566, 11556, [31, 33, 7744, 2]) /* metro module 11556, dependencies: [31, 33, 7744, 2] */;