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,367 +1,437 @@
/* Metro module 11869; source: modules/application_commands/native/ApplicationCommandBar.tsx; dependencies: [57, 31, 27, 1945, 33, 4501, 697, 6235, 5278, 1244, 1305, 566, 11752, 5475, 4573, 7972, 6266, 11870, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import GuildMemberStore from '../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import UsePrevious from '../../../hooks/usePrevious.tsx'; /* Metro dependency 6266 */
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 FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as LegacyTokensModule from '../../../design/migrations/native/LegacyTokens.tsx'; /* Metro dependency 6235 */
import * as NativeModule2 from '../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
import * as ApplicationCommandUtilsModule from './ApplicationCommandUtils.tsx'; /* Metro dependency 11752 */
function _fun91003(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:6, offset: 0x0204f649, size: 963 bytes, params: 8, frame: 26
var object5;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.View;
const StyleSheet = value.StyleSheet;
const env0_6 = value.ScrollView;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.Fragment;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object5 = {};
const object6 = {flexDirection: 'column'};
object = {};
const object2 = {flexDirection: 'column'};
const MOBILE_COMMAND_BAR_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_COMMAND_BAR_BACKGROUND;
object6.backgroundColor = MOBILE_COMMAND_BAR_BACKGROUND;
object2.backgroundColor = MOBILE_COMMAND_BAR_BACKGROUND;
const CHAT_INPUT_FLOATING_BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_FLOATING_BORDER_RADIUS;
object6.borderRadius = CHAT_INPUT_FLOATING_BORDER_RADIUS;
object2.borderRadius = CHAT_INPUT_FLOATING_BORDER_RADIUS;
const CHAT_INPUT_FLOATING_ACCESSORY_BORDER_WIDTH = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_FLOATING_ACCESSORY_BORDER_WIDTH;
object6.borderWidth = CHAT_INPUT_FLOATING_ACCESSORY_BORDER_WIDTH;
object2.borderWidth = CHAT_INPUT_FLOATING_ACCESSORY_BORDER_WIDTH;
const MOBILE_FLOATING_ACCESSORY_BORDER = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_FLOATING_ACCESSORY_BORDER;
object6.borderColor = MOBILE_FLOATING_ACCESSORY_BORDER;
object6.overflow = 'hidden';
object5.applicationCommandBar = object6;
const object7 = {'width': 24, 'height': 24, 'borderRadius': null, 'marginRight': 16};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object5.applicationIcon = object7;
object5.applicationTopWrapperScrollView = {'flexDirection': 'row', 'alignItems': 'center', 'paddingHorizontal': 16,
object2.borderColor = MOBILE_FLOATING_ACCESSORY_BORDER;
object2.overflow = 'hidden';
object.applicationCommandBar = object2;
const object3 = {'width': 24, 'height': 24, 'borderRadius': null, 'marginRight': 16};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object.applicationIcon = object3;
object.applicationTopWrapperScrollView = {'flexDirection': 'row', 'alignItems': 'center', 'paddingHorizontal': 16,
'paddingVertical': 8};
object5.applicationName = {'textAlignVertical': 'center', 'marginRight': 12};
const object9 = {'width': null, 'marginVertical': 8, 'marginHorizontal': 12, 'backgroundColor': null,
object.applicationName = {'textAlignVertical': 'center', 'marginRight': 12};
const object4 = {'width': null, 'marginVertical': 8, 'marginHorizontal': 12, 'backgroundColor': null,
'height': '100%'};
object9.width = StyleSheet.hairlineWidth;
object4.width = StyleSheet.hairlineWidth;
const BACKGROUND_MOD_NORMAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_NORMAL;
object9.backgroundColor = BACKGROUND_MOD_NORMAL;
object5.applicationOptionalOptionsDivider = object9;
object5.applicationOptionalOptionsDividerWithNoRequired = {marginLeft: 4};
object5.applicationOptionalOptionsIndicator = {'marginHorizontal': 4, 'paddingVertical': 8};
object5.applicationDescriptionContainer = {flexShrink: 1};
object4.backgroundColor = BACKGROUND_MOD_NORMAL;
object.applicationOptionalOptionsDivider = object4;
object.applicationOptionalOptionsDividerWithNoRequired = {marginLeft: 4};
object.applicationOptionalOptionsIndicator = {'marginHorizontal': 4, 'paddingVertical': 8};
object.applicationDescriptionContainer = {flexShrink: 1};
const MOBILE_COMMAND_BAR_DIVIDER = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_COMMAND_BAR_DIVIDER;
object5.applicationDescriptionDivider = {marginLeft: 0, backgroundColor: MOBILE_COMMAND_BAR_DIVIDER};
const object10 = {'marginHorizontal': 4, 'padding': 8, 'fontSize': 12, 'alignItems': 'center'};
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const DARK_PRIMARY_800_LIGHT_PRIMARY_300 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_PRIMARY_800_LIGHT_PRIMARY_300;
object10.backgroundColor = DARK_PRIMARY_800_LIGHT_PRIMARY_300;
object5.applicationCommandOption = object10;
object.applicationDescriptionDivider = {marginLeft: 0, backgroundColor: MOBILE_COMMAND_BAR_DIVIDER};
const object8 = {'marginHorizontal': 4, 'padding': 8, 'fontSize': 12, 'alignItems': 'center'};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const DARK_PRIMARY_800_LIGHT_PRIMARY_300 = (LegacyTokensModule).DARK_PRIMARY_800_LIGHT_PRIMARY_300;
object8.backgroundColor = DARK_PRIMARY_800_LIGHT_PRIMARY_300;
object.applicationCommandOption = object8;
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object5.applicationCommandOptionText = {color: TEXT_DEFAULT};
object.applicationCommandOptionText = {color: TEXT_DEFAULT};
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object5.activeCommandOption = {backgroundColor: BACKGROUND_BRAND};
object.activeCommandOption = {backgroundColor: BACKGROUND_BRAND};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object5.activeCommandOptionText = {color: WHITE};
object5.completeCommandOptionText = {opacity: 0.5};
object.activeCommandOptionText = {color: WHITE};
object.completeCommandOptionText = {opacity: 0.5};
const TEXT_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_CRITICAL;
object5.errorCommandOptionText = {color: TEXT_FEEDBACK_CRITICAL};
object5.optionDescriptionContainer = {'overflow': 'hidden', 'paddingHorizontal': 16, 'paddingVertical': 8,
object.errorCommandOptionText = {color: TEXT_FEEDBACK_CRITICAL};
object.optionDescriptionContainer = {'overflow': 'hidden', 'paddingHorizontal': 16, 'paddingVertical': 8,
'flexDirection': 'row'};
const MOBILE_FLOATING_ACCESSORY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_FLOATING_ACCESSORY_BACKGROUND;
object5.descriptionEllipsis = {marginLeft: 10, backgroundColor: MOBILE_FLOATING_ACCESSORY_BACKGROUND};
object.descriptionEllipsis = {marginLeft: 10, backgroundColor: MOBILE_FLOATING_ACCESSORY_BACKGROUND};
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object5.descriptionEllipsisDots = {backgroundColor: INTERACTIVE_TEXT_DEFAULT};
const DARK_PRIMARY_660_LIGHT_PRIMARY_300 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_PRIMARY_660_LIGHT_PRIMARY_300;
object5.completeCommandOption = {backgroundColor: DARK_PRIMARY_660_LIGHT_PRIMARY_300};
const env0_11 = Reflect.apply(createStyles, value, [object5]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandBar.tsx');
object.descriptionEllipsisDots = {backgroundColor: INTERACTIVE_TEXT_DEFAULT};
const DARK_PRIMARY_660_LIGHT_PRIMARY_300 = (LegacyTokensModule).DARK_PRIMARY_660_LIGHT_PRIMARY_300;
object.completeCommandOption = {backgroundColor: DARK_PRIMARY_660_LIGHT_PRIMARY_300};
const env0_11 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ApplicationCommandBar.tsx');
exports.default = _default_91009;
}
function ApplicationCommandOptionItem(a0) { // fn#91004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:2157, offset: 0x0204fa0c, size: 501 bytes, params: 2, frame: 27
const option = a0.option;
const optionState = a0.optionState;
const value = Object.create(null);
value.option = 0;
value.optionState = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const value4 = undefined;
const styles = useStyles();
const isActive = optionState == null ? value4 : optionState.isActive;
let r9 = isActive != null && isActive;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.evoEHc,
{optionName: option.displayName});
object2.accessibilityRole = 'button';
object2.disabled = r9;
const value6 = !r9;
object2.style = [styles.applicationCommandOption, r9 && styles.activeCommandOption,
(r9 ? value6 : optionState == null || optionState.lastValidationResult == null ? value4 : optionState.lastValidationResult.success) && styles.completeCommandOption];
copyDataProperties(object2, value2, value);
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const items2 = [styles.applicationCommandOptionText];
items2[1] = r9 && styles.activeCommandOptionText;
items2[2] = (r9 ? value6 : optionState == null || optionState.lastValidationResult == null ? value4 : optionState.lastValidationResult.success) && styles.completeCommandOptionText;
r9 = (r9 ? value6 : (optionState == null || optionState.lastValidationResult == null ? value4 : optionState.lastValidationResult.success) === false) && styles.errorCommandOptionText;
items2[3] = r9;
return (
<PressableOpacity {...object2}>
<LegacyText style={items2} numberOfLines={1}>
{option.displayName}
</LegacyText>
</PressableOpacity>
);
}
function ApplicationCommandOptionDescription({command, option, optionState}) { // fn#91005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:2945, offset: 0x0204fc01, size: 675 bytes, params: 2, frame: 31
var r8;
var value;
const styles = useStyles();
const value3 = (importDefault(6266) /* metro dependency 6266: usePrevious */)(option);
const binding = env0_4;
let useState = binding.useState;
const value4 = Reflect.apply(useState, binding, [undefined]);
const binding2 = env0_3;
const value5 = binding2(value4, 2);
const property = value5[0];
var env0_3 = value5[1];
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, [0]), 2);
const property2 = value6[0];
const env0_5 = value6[1];
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, [0]), 2);
const property3 = value7[0];
const env0_6 = value7[1];
binding.useEffect(_fun91006, [value3, option, property2,
(importDefault(6266) /* metro dependency 6266: usePrevious */)(property2)]);
const value9 = binding.useCallback(_fun91007, [property]);
const closure = onLayout_91008;
const r5 = property === 1 && property3 === property2;
const r6 = r5 ? 'text' : 'button';
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const view = <View style={styles.applicationDescriptionContainer}>{(optionState == null || optionState.lastValidationResult == null ? undefined : optionState.lastValidationResult.error) != null ? ((Text) => <Text lineClamp={property} onLayout={closure} variant="text-sm/medium" color="text-feedback-critical">{optionState.lastValidationResult.error}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : ((Text) => <Text lineClamp={property} onLayout={closure} variant="text-sm/medium" color="mobile-text-heading-primary">{option != null ? option.displayDescription : command.displayDescription}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>;
if (property3 === property2) {
r8 = null;
} else {
value = importDefault(11870) /* metro dependency 11870: DescriptionEllipsis */;
value = ((Component) => <Component style={styles.descriptionEllipsis} dotStyle={styles.descriptionEllipsisDots} />)(value);
r8 = value;
function ApplicationCommandOptionItem(a0) { // fn#91004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:2157, offset: 0x0204fa0c, size: 501 bytes, params: 2, frame: 27
const option = a0.option;
const optionState = a0.optionState;
const value = Object.create(null);
value.option = 0;
value.optionState = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const value4 = undefined;
const styles = useStyles();
const isActive = optionState == null ? value4 : optionState.isActive;
let r9 = isActive != null && isActive;
const PressableOpacity = (PressablesModule).PressableOpacity;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.evoEHc,
{optionName: option.displayName});
object.accessibilityRole = 'button';
object.disabled = r9;
const value6 = !r9;
object.style = [styles.applicationCommandOption, r9 && styles.activeCommandOption,
(r9 ? value6 : optionState == null || optionState.lastValidationResult == null ? value4 : optionState.lastValidationResult.success) && styles.completeCommandOption];
copyDataProperties(object, value2, value);
const LegacyText = (NativeModule).LegacyText;
const items2 = [styles.applicationCommandOptionText];
items2[1] = r9 && styles.activeCommandOptionText;
items2[2] = (r9 ? value6 : optionState == null || optionState.lastValidationResult == null ? value4 : optionState.lastValidationResult.success) && styles.completeCommandOptionText;
r9 = (r9 ? value6 : (optionState == null || optionState.lastValidationResult == null ? value4 : optionState.lastValidationResult.success) === false) && styles.errorCommandOptionText;
items2[3] = r9;
return (
<PressableOpacity {...object}>
<LegacyText style={items2} numberOfLines={1}>
{option.displayName}
</LegacyText>
</PressableOpacity>
);
}
return (
<PressableOpacity
accessibilityRole={r6}
disabled={r5}
onPress={value9}
>
<View style={styles.optionDescriptionContainer}>
{view}
{r8}
function ApplicationCommandOptionDescription({command, option, optionState}) { // fn#91005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:2945, offset: 0x0204fc01, size: 675 bytes, params: 2, frame: 31
var r8;
var value;
const styles = useStyles();
const value3 = (UsePrevious)(option);
let useState = ReactModule.useState;
const value4 = Reflect.apply(useState, ReactModule, [undefined]);
const binding2 = env0_3;
const value5 = binding2(value4, 2);
const property = value5[0];
var env0_3 = value5[1];
useState = ReactModule.useState;
const value6 = binding2(Reflect.apply(useState, ReactModule, [0]), 2);
const property2 = value6[0];
const env0_5 = value6[1];
useState = ReactModule.useState;
const value7 = binding2(Reflect.apply(useState, ReactModule, [0]), 2);
const property3 = value7[0];
const env0_6 = value7[1];
ReactModule.useEffect(_fun91006, [value3, option, property2,
(UsePrevious)(property2)]);
const value9 = ReactModule.useCallback(_fun91007, [property]);
const onLayout_910082 = onLayout_91008;
const r5 = property === 1 && property3 === property2;
const r6 = r5 ? 'text' : 'button';
const PressableOpacity = (PressablesModule).PressableOpacity;
const view = (
<View style={styles.applicationDescriptionContainer}>
{
(optionState == null || optionState.lastValidationResult == null ? undefined : optionState.lastValidationResult.error) != null
? ((Text) => <Text lineClamp={property} onLayout={onLayout_910082} variant="text-sm/medium" color="text-feedback-critical">{optionState.lastValidationResult.error}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)
: ((Text) => <Text lineClamp={property} onLayout={onLayout_910082} variant="text-sm/medium" color="mobile-text-heading-primary">{option != null ? option.displayDescription : command.displayDescription}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)
}
</View>
</PressableOpacity>
);
}
function _default_91009({command, section, guildId, currentOption, optionStates, onPressOption}) { // fn#91009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4105, offset: 0x0204ff71, size: 1077 bytes, params: 2, frame: 36
var r7;
var jsxRuntimeEnv0_9Binding;
var items3;
var intl;
const env0_3 = currentOption;
const env0_4 = optionStates;
const styles = useStyles();
const binding = env0_4;
const value4 = binding.useRef(null);
const env0_8 = binding.useRef({});
let useState = binding.useState;
const value5 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_3;
const value6 = binding2(value5, 2);
const property = value6[0];
const env0_9 = value6[1];
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value7[0];
const env0_10 = value7[1];
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, []), 2);
const property3 = value8[0];
const env0_12 = value8[1];
binding.useEffect(_fun91010, [command]);
binding.useEffect(_fun91012, [currentOption]);
binding.useEffect(_fun91013, [property3, styles]);
const value9 = binding.useMemo(_fun91015, [section,
(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun91014)]);
const env0_14 = binding.useCallback(_fun91016, []);
const r12 = currentOption?.name != null ? optionStates[currentOption?.name] : undefined;
const items2 = [value9 != null && ((Component) => <Component style={styles.applicationIcon} source={value9} />)(importDefault(5475) /* metro dependency 5475: FastImage */)];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <Text style={styles.applicationName} lineClamp={1} variant="text-sm/semibold" color="mobile-text-heading-primary">{'/ ' + command.displayName}</Text>;
items2[2] = command.options?.map(_fun91017);
if (property) {
jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
items3 = [<View style={[styles.applicationOptionalOptionsDivider,
!property2 && styles.applicationOptionalOptionsDividerWithNoRequired]} />];
var textProps = {'style': null, 'lineClamp': 1, 'variant': 'eyebrow', 'color': 'text-muted',
style: styles.applicationOptionalOptionsIndicator};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items3[1] = <Text {...textProps}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.U19GM3)}</Text>;
items3[2] = command.options?.map(_fun91020);
r7 = <>{items3}</>;
} else {
r7 = null;
}
items2[3] = r7;
const items4 = [<ScrollView ref={value4} contentContainerStyle={styles.applicationTopWrapperScrollView} keyboardShouldPersistTaps="always" showsHorizontalScrollIndicator={false} horizontal>{items2}</ScrollView>];
const FormDivider = (require(7972) /* metro dependency 7972: native */).FormDivider;
items4[1] = <FormDivider style={styles.applicationDescriptionDivider} />;
items4[2] = <ApplicationCommandOptionDescription command={command} option={currentOption} optionState={r12} />;
items4[3] = <FormDivider style={styles.applicationDescriptionDivider} />;
return (
<View style={styles.applicationCommandBar}>
{items4}
</View>
);
}
function _fun91006() { // fn#91006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:3159, offset: 0x0204fea4, size: 90 bytes, params: 1, frame: 12
if (env0_1 !== option) {
env0_5(0);
env0_6(0);
env0_3(undefined);
} else if (env0_4 > 0 && env0_7 === 0) {
env0_3(1);
}
}
function _fun91007() { // fn#91007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:3243, offset: 0x0204fefe, size: 29 bytes, params: 1, frame: 11
const binding = env0_3;
const value = 1;
binding(value !== env0_2 ? value : undefined);
}
function ApplicationCommandOptionDescriptionOnLayout({nativeEvent}) { // fn#91008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:3293, owner: ApplicationCommandOptionDescription.onLayout, offset: 0x0204ff1b, size: 86 bytes, params: 2, frame: 13
const height = nativeEvent.layout.height;
const Math = global.Math;
const value = Math.trunc(height);
if (env0_2 === undefined || value > env0_4) {
env0_5(value);
}
env0_6(value);
}
function _fun91010() { // fn#91010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4365, offset: 0x020503a6, size: 77 bytes, params: 1, frame: 13
const env0_0 = false;
const env0_1 = false;
const options = command.options;
if (options != null) {
options.forEach(_fun91011);
}
env0_9(env0_0);
env0_10(env0_1);
}
function _fun91012() { // fn#91012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4481, offset: 0x02050416, size: 40 bytes, params: 1, frame: 13
const binding = env0_12;
const currentOptionBinding = currentOption;
const value2 = undefined;
binding(currentOptionBinding == null ? value2 : currentOption.name);
return value2;
}
function _fun91013() { // fn#91013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4531, offset: 0x0205043e, size: 104 bytes, params: 1, frame: 13
var current;
const value2 = null;
const r4 = value2 != env0_11 ? env0_8.current[env0_11] : value2;
if (value2 != r4) {
current = env0_7.current;
if (value2 != current) {
current.scrollTo({x: r4.x - styles.applicationTopWrapperScrollView.paddingHorizontal, animated: true});
);
if (property3 === property2) {
r8 = null;
} else {
value = importDefault(11870) /* metro dependency 11870: DescriptionEllipsis */;
value = ((Component) => <Component style={styles.descriptionEllipsis} dotStyle={styles.descriptionEllipsisDots} />)(value);
r8 = value;
}
}
}
function _fun91014() { // fn#91014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4734, offset: 0x020504a6, size: 79 bytes, params: 1, frame: 13
var value3;
if (guildId != null) {
if (section?.botId != null) {
value3 = environment.__proto__;
return GuildMemberStore.getMember(guildId, section.botId);
return (
<PressableOpacity
accessibilityRole={r6}
disabled={r5}
onPress={value9}
>
<View style={styles.optionDescriptionContainer}>
{view}
{r8}
</View>
</PressableOpacity>
);
function _fun91006() { // fn#91006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:3159, offset: 0x0204fea4, size: 90 bytes, params: 1, frame: 12
if (env0_1 !== option) {
env0_5(0);
env0_6(0);
env0_3(undefined);
} else if (ReactModule > 0 && env0_7 === 0) {
env0_3(1);
}
}
function _fun91007() { // fn#91007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:3243, offset: 0x0204fefe, size: 29 bytes, params: 1, frame: 11
const binding = env0_3;
const value = 1;
binding(value !== env0_2 ? value : undefined);
}
function ApplicationCommandOptionDescriptionOnLayout({nativeEvent}) { // fn#91008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:3293, owner: ApplicationCommandOptionDescription.onLayout, offset: 0x0204ff1b, size: 86 bytes, params: 2, frame: 13
const height = nativeEvent.layout.height;
const Math = global.Math;
const value = Math.trunc(height);
if (env0_2 === undefined || value > ReactModule) {
env0_5(value);
}
env0_6(value);
}
}
}
function _fun91015() { // fn#91015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4828, offset: 0x020504f5, size: 50 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (require(11752) /* metro dependency 11752: ApplicationCommandUtils */).getApplicationCommandsIconSource(section,
member);
}
function _default_91009({command, section, guildId, currentOption, optionStates, onPressOption}) { // fn#91009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4105, offset: 0x0204ff71, size: 1077 bytes, params: 2, frame: 36
var r7;
var jsxRuntimeEnv0_9Binding;
var items3;
var intl;
const currentOption2 = currentOption;
const optionStates2 = optionStates;
const styles = useStyles();
const binding = optionStates2;
const value4 = binding.useRef(null);
const env0_8 = binding.useRef({});
let useState = binding.useState;
const value5 = Reflect.apply(useState, binding, [false]);
const binding2 = currentOption2;
const value6 = binding2(value5, 2);
const property = value6[0];
const env0_9 = value6[1];
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value7[0];
const env0_10 = value7[1];
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, []), 2);
const property3 = value8[0];
const env0_12 = value8[1];
binding.useEffect(_fun91010, [command]);
binding.useEffect(_fun91012, [currentOption]);
binding.useEffect(_fun91013, [property3, styles]);
const value9 = binding.useMemo(_fun91015, [section,
(FluxModule).useStateFromStores([GuildMemberStore], _fun91014)]);
const env0_14 = binding.useCallback(_fun91016, []);
const r12 = currentOption?.name != null ? optionStates[currentOption?.name] : undefined;
const items2 = [
value9 != null && ((Component) => <Component style={styles.applicationIcon} source={value9} />)(importDefault(5475) /* metro dependency 5475: FastImage */),
];
const Text = (TextModule).Text;
items2[1] = (
<Text
style={styles.applicationName}
lineClamp={1}
variant="text-sm/semibold"
color="mobile-text-heading-primary"
>
{'/ ' + command.displayName}
</Text>
);
items2[2] = command.options?.map(_fun91017);
if (property) {
jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
items3 = [
<View
style={[styles.applicationOptionalOptionsDivider,
!property2 && styles.applicationOptionalOptionsDividerWithNoRequired]}
/>,
];
var textProps = {'style': null, 'lineClamp': 1, 'variant': 'eyebrow', 'color': 'text-muted',
style: styles.applicationOptionalOptionsIndicator};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items3[1] = (
<Text {...textProps}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.U19GM3)}
</Text>
);
items3[2] = command.options?.map(_fun91020);
r7 = (
<>
{items3}
</>
);
} else {
r7 = null;
}
items2[3] = r7;
const items4 = [
<ScrollView
ref={value4}
contentContainerStyle={styles.applicationTopWrapperScrollView}
keyboardShouldPersistTaps="always"
showsHorizontalScrollIndicator={false}
horizontal
>
{items2}
</ScrollView>,
];
const FormDivider = (NativeModule2).FormDivider;
items4[1] = <FormDivider style={styles.applicationDescriptionDivider} />;
items4[2] = (
<ApplicationCommandOptionDescription
command={command}
option={currentOption}
optionState={r12}
/>
);
items4[3] = <FormDivider style={styles.applicationDescriptionDivider} />;
return (
<View style={styles.applicationCommandBar}>
{items4}
</View>
);
function _fun91010() { // fn#91010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4365, offset: 0x020503a6, size: 77 bytes, params: 1, frame: 13
const env0_0 = false;
const env0_1 = false;
const options = command.options;
if (options != null) {
options.forEach(_fun91011);
}
env0_9(env0_0);
env0_10(env0_1);
function _fun91011({required}) { // fn#91011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4418, offset: 0x020503f3, size: 35 bytes, params: 2, frame: 2
if (required !== true) {
}
}
function _fun91016({nativeEvent}, {name}) { // fn#91016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4904, offset: 0x02050527, size: 75 bytes, params: 3, frame: 6
const binding = env0_8;
const current = binding.current;
current[name] = {x: nativeEvent.layout.x, width: nativeEvent.layout.width};
binding.current = current;
}
}
function _fun91012() { // fn#91012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4481, offset: 0x02050416, size: 40 bytes, params: 1, frame: 13
const binding = env0_12;
const currentOptionBinding = currentOption;
const value2 = undefined;
binding(currentOptionBinding == null ? value2 : currentOption.name);
return value2;
}
function _fun91013() { // fn#91013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4531, offset: 0x0205043e, size: 104 bytes, params: 1, frame: 13
var current;
const value2 = null;
const r4 = value2 != env0_11 ? env0_8.current[env0_11] : value2;
if (value2 != r4) {
current = env0_7.current;
if (value2 != current) {
current.scrollTo({x: r4.x - styles.applicationTopWrapperScrollView.paddingHorizontal, animated: true});
}
}
}
function _fun91014() { // fn#91014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4734, offset: 0x020504a6, size: 79 bytes, params: 1, frame: 13
var value3;
var guildMemberStoreBinding;
if (guildId != null) {
if (section?.botId != null) {
value3 = environment.__proto__;
guildMemberStoreBinding = GuildMemberStore;
return guildMemberStoreBinding.getMember(guildId, section.botId);
}
}
}
function _fun91015() { // fn#91015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4828, offset: 0x020504f5, size: 50 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (ApplicationCommandUtilsModule).getApplicationCommandsIconSource(section,
member);
}
function _fun91016({nativeEvent}, {name}) { // fn#91016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4904, offset: 0x02050527, size: 75 bytes, params: 3, frame: 6
const binding = env0_8;
const current = binding.current;
current[name] = {x: nativeEvent.layout.x, width: nativeEvent.layout.width};
binding.current = current;
}
function _fun91017(a0) { // fn#91017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:5518, offset: 0x02050572, size: 98 bytes, params: 2, frame: 18
var environment;
var r0;
var object;
var optionStatesBinding;
var name;
const env0_0 = a0;
const required = a0.required;
let value = null;
if (required) {
value = environment.__proto__;
object = {option: a0, onPress: onPress_91018};
optionStatesBinding = optionStates;
name = a0.name;
object.optionState = optionStatesBinding[name];
object.onLayout = onLayout_91019;
name = a0.name;
value = <ApplicationCommandOptionItem {...object} key={name} />;
r0 = value;
} else {
r0 = value;
}
return r0;
function onPress_91018() { // fn#91018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:5581, offset: 0x020505d4, size: 38 bytes, params: 1, frame: 12
const value = environment.__proto__;
return onPressOption?.(env0_0);
}
function onLayout_91019(a0) { // fn#91019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:5636, offset: 0x020505fa, size: 27 bytes, params: 2, frame: 13
return env1_14(a0, env0_0);
}
}
function _fun91020(a0) { // fn#91020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:5977, offset: 0x02050615, size: 98 bytes, params: 2, frame: 18
var environment;
var r0;
var object;
var optionStatesBinding;
var name;
const env0_0 = a0;
const required = a0.required;
let value = null;
if (required) {
r0 = value;
} else {
value = environment.__proto__;
object = {option: a0, onPress: onPress_91021};
optionStatesBinding = optionStates;
name = a0.name;
object.optionState = optionStatesBinding[name];
object.onLayout = onLayout_91022;
name = a0.name;
value = <ApplicationCommandOptionItem {...object} key={name} />;
r0 = value;
}
return r0;
function onPress_91021() { // fn#91021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:6045, offset: 0x01bda28e, size: 23 bytes, params: 1, frame: 11
return onPressOption(env0_0);
}
function onLayout_91022(a0) { // fn#91022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:6085, offset: 0x020505fa, size: 27 bytes, params: 2, frame: 13
return env1_14(a0, env0_0);
}
}
function _fun91017(a0) { // fn#91017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:5518, offset: 0x02050572, size: 98 bytes, params: 2, frame: 18
var environment;
var r0;
var object2;
var optionStatesBinding;
var name;
const env0_0 = a0;
const required = a0.required;
let value = null;
if (required) {
value = environment.__proto__;
object2 = {option: a0, onPress: onPress_91018};
optionStatesBinding = optionStates;
name = a0.name;
object2.optionState = optionStatesBinding[name];
object2.onLayout = onLayout_91019;
name = a0.name;
value = <ApplicationCommandOptionItem {...object2} key={name} />;
r0 = value;
} else {
r0 = value;
}
return r0;
}
function _fun91020(a0) { // fn#91020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:5977, offset: 0x02050615, size: 98 bytes, params: 2, frame: 18
var environment;
var r0;
var object2;
var optionStatesBinding;
var name;
const env0_0 = a0;
const required = a0.required;
let value = null;
if (required) {
r0 = value;
} else {
value = environment.__proto__;
object2 = {option: a0, onPress: onPress_91021};
optionStatesBinding = optionStates;
name = a0.name;
object2.optionState = optionStatesBinding[name];
object2.onLayout = onLayout_91022;
name = a0.name;
value = <ApplicationCommandOptionItem {...object2} key={name} />;
r0 = value;
}
return r0;
}
function _fun91011({required}) { // fn#91011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4418, offset: 0x020503f3, size: 35 bytes, params: 2, frame: 2
if (required !== true) {
}
}
function onPress_91018() { // fn#91018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:5581, offset: 0x020505d4, size: 38 bytes, params: 1, frame: 12
const value = environment.__proto__;
return onPressOption?.(env0_0);
}
function onLayout_91019(a0) { // fn#91019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:5636, offset: 0x020505fa, size: 27 bytes, params: 2, frame: 13
return env1_14(a0, env0_0);
}
global.__d(_fun91003, 11869, [57, 31, 27, 1945, 33, 4501, 697, 6235, 5278, 1244, 1305, 566, 11752, 5475, 4573, 7972,
6266, 11870,
2]) /* metro module 11869, dependencies: [57, 31, 27, 1945, 33, 4501, 697, 6235, 5278, 1244, 1305, 566, 11752, 5475, 4573, 7972, 6266, 11870, 2] */;
@@ -1,105 +1,113 @@
/* Metro module 7873; source: modules/application_commands/native/ApplicationCommandBuiltIns.tsx; dependencies: [3793, 1878, 5066, 1909, 5068, 1244, 4805, 4647, 4603, 7067, 2] */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ServerModule from '../../../flow/Server.tsx'; /* Metro dependency 1909 */
import * as ApplicationCommandConstantsModule from '../ApplicationCommandConstants.tsx'; /* Metro dependency 5066 */
import * as ApplicationCommandTypesModule from '../ApplicationCommandTypes.tsx'; /* Metro dependency 5068 */
function _fun63116(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8051:6, offset: 0x01b70e18, size: 284 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const BuiltInSectionId = (require(5066) /* metro dependency 5066: ApplicationCommandConstants */).BuiltInSectionId;
object2 = {'id': '-15', 'untranslatedName': 'leave', 'displayName': 'leave'};
const ApplicationCommandType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandType;
const BuiltInSectionId = (ApplicationCommandConstantsModule).BuiltInSectionId;
object = {'id': '-15', 'untranslatedName': 'leave', 'displayName': 'leave'};
const ApplicationCommandType = (ServerModule).ApplicationCommandType;
const CHAT = ApplicationCommandType.CHAT;
object2.type = CHAT;
const ApplicationCommandInputType = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandInputType;
object.type = CHAT;
const ApplicationCommandInputType = (ApplicationCommandTypesModule).ApplicationCommandInputType;
let BUILT_IN = ApplicationCommandInputType.BUILT_IN;
object2.inputType = BUILT_IN;
object.inputType = BUILT_IN;
BUILT_IN = BuiltInSectionId.BUILT_IN;
object2.applicationId = BUILT_IN;
Object.defineProperty(object2, 'untranslatedDescription', {get: function() {
object.applicationId = BUILT_IN;
Object.defineProperty(object, 'untranslatedDescription', {get: function() {
return require(dependencyMap[5]).intl.string(require(dependencyMap[5]).t['26C4oi']);
}, set: undefined, enumerable: true, configurable: true});
Object.defineProperty(object2, 'displayDescription', {get: function() {
Object.defineProperty(object, 'displayDescription', {get: function() {
return require(dependencyMap[5]).intl.string(require(dependencyMap[5]).t['26C4oi']);
}, set: undefined, enumerable: true, configurable: true});
object2.predicate = function({channel}) {
object.predicate = function({channel}) {
return channel != null && channel.isGroupDM();
};
object2.execute = execute_63120;
const items2 = [object2];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandBuiltIns.tsx');
object.execute = execute_63120;
const items2 = [object];
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ApplicationCommandBuiltIns.tsx');
exports.default = items2;
}
function execute_63120(a0, {channel}) { // fn#63120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8051:533, offset: 0x01b70f8f, size: 457 bytes, params: 3, frame: 24
var r6;
var r7;
var channelName;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var object2;
var value2;
var format;
var SSIVOu;
var value4;
var defaultImport;
var show;
if (channel != null) {
channelName = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(channel, UserStore,
RelationshipStore);
value2 = intl.formatToPlainString(t.hJ5Ap4, {name: channelName});
format = intl.format;
SSIVOu = t.SSIVOu;
object2 = {name: channelName};
if (channel.isManaged()) {
value4 = intl.formatToPlainString(t.hVGjEW, {name: channelName});
r6 = intl.format(t.IK1Qvs, {name: channelName});
r7 = value4;
} else {
r6 = Reflect.apply(format, intl, [SSIVOu, object2]);
r7 = value2;
function execute_63120(a0, {channel}) { // fn#63120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8051:533, offset: 0x01b70f8f, size: 457 bytes, params: 3, frame: 24
var r6;
var r7;
var moduleValue;
var channelName;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var object;
var value2;
var format;
var SSIVOu;
var value4;
var defaultImport;
var show;
if (channel != null) {
moduleValue = require(4805) /* metro dependency 4805: useChannelName */;
channelName = moduleValue.computeChannelName(channel, UserStore, RelationshipStore);
value2 = intl.formatToPlainString(t.hJ5Ap4, {name: channelName});
format = intl.format;
SSIVOu = t.SSIVOu;
object = {name: channelName};
if (channel.isManaged()) {
value4 = intl.formatToPlainString(t.hVGjEW, {name: channelName});
r6 = intl.format(t.IK1Qvs, {name: channelName});
r7 = value4;
} else {
r6 = Reflect.apply(format, intl, [SSIVOu, object]);
r7 = value2;
}
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport.show;
object = {title: r7, body: r6};
object.confirmText = intl.string(t['26C4oi']);
object.cancelText = intl.string(t['ETE/oC']);
object.onConfirm = onConfirm_63121;
Reflect.apply(show, defaultImport, [object]);
}
function execute_63120OnConfirm() { // fn#63121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8051:986, owner: execute_63120.onConfirm, offset: 0x01b71158, size: 158 bytes, params: 1, frame: 18
var value;
var property;
var defaultImport;
var closePrivateChannel;
var value2;
var id;
var error;
var defaultImport2;
var sendBotMessage;
var value3;
var intl;
var string;
var t;
try {
value = environment.__proto__;
property = dependencyMap[8];
defaultImport = importDefault(property);
closePrivateChannel = defaultImport.closePrivateChannel;
value2 = environment;
id = channel.id;
Reflect.apply(closePrivateChannel, defaultImport, [id]);
} catch (error) {
defaultImport2 = importDefault(dependencyMap[9]);
sendBotMessage = defaultImport2.sendBotMessage;
value3 = environment;
id = channel.id;
intl = require(dependencyMap[5]).intl;
string = intl.string;
t = require(dependencyMap[5]).t;
Reflect.apply(sendBotMessage, defaultImport2, [id, Reflect.apply(string, intl, [t['YOsuT/']])]);
}
}
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport.show;
object2 = {title: r7, body: r6};
object2.confirmText = intl.string(t['26C4oi']);
object2.cancelText = intl.string(t['ETE/oC']);
object2.onConfirm = onConfirm;
Reflect.apply(show, defaultImport, [object2]);
}
}
function execute_63120OnConfirm() { // fn#63121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8051:986, owner: execute_63120.onConfirm, offset: 0x01b71158, size: 158 bytes, params: 1, frame: 18
var value;
var property;
var defaultImport;
var closePrivateChannel;
var value2;
var id;
var error;
var defaultImport2;
var sendBotMessage;
var value3;
var intl;
var string;
var t;
try {
value = environment.__proto__;
property = dependencyMap[8];
defaultImport = importDefault(property);
closePrivateChannel = defaultImport.closePrivateChannel;
value2 = environment;
id = channel.id;
Reflect.apply(closePrivateChannel, defaultImport, [id]);
} catch (error) {
defaultImport2 = importDefault(dependencyMap[9]);
sendBotMessage = defaultImport2.sendBotMessage;
value3 = environment;
id = channel.id;
intl = require(dependencyMap[5]).intl;
string = intl.string;
t = require(dependencyMap[5]).t;
Reflect.apply(sendBotMessage, defaultImport2, [id, Reflect.apply(string, intl, [t['YOsuT/']])]);
}
}
global.__d(_fun63116, 7873, [3793, 1878, 5066, 1909, 5068, 1244, 4805, 4647, 4603, 7067,
2]) /* metro module 7873, dependencies: [3793, 1878, 5066, 1909, 5068, 1244, 4805, 4647, 4603, 7067, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,82 +1,121 @@
/* Metro module 11867; source: modules/application_commands/native/ApplicationCommandItem.tsx; dependencies: [31, 27, 1945, 11018, 33, 4501, 697, 4584, 566, 11752, 5278, 1244, 5475, 4573, 2] */
import GuildMemberStore from '../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
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 FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as UseFontScaleModule from '../../screen/native/useFontScale.tsx'; /* Metro dependency 4584 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as ApplicationCommandsConstantsModule from './ApplicationCommandsConstants.tsx'; /* Metro dependency 11018 */
import * as ApplicationCommandUtilsModule from './ApplicationCommandUtils.tsx'; /* Metro dependency 11752 */
function _fun90990(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12053:6, offset: 0x0204ed84, size: 243 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const env0_6 = (require(11018) /* metro dependency 11018: ApplicationCommandsConstants */).AUTOCOMPLETE_ROW_HEIGHT;
const value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun90991);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandItem.tsx');
const env0_9 = (CreateStylesModule).createStyles(_fun90991);
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ApplicationCommandItem.tsx');
exports.default = _default_90992;
}
function _fun90991(a0) { // fn#90991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12053:216, offset: 0x0204ee77, size: 187 bytes, params: 2, frame: 16
const object3 = {};
const object5 = {'flexDirection': 'row', 'paddingVertical': 8, 'paddingHorizontal': 16, 'alignItems': 'center'};
const Math = global.Math;
object5.height = Math.max(a0 * AUTOCOMPLETE_ROW_HEIGHT, AUTOCOMPLETE_ROW_HEIGHT);
object3.applicationCommandItem = object5;
const INTERACTIVE_BACKGROUND_HOVER = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_HOVER;
object3.highlightedApplicationCommandItem = {backgroundColor: INTERACTIVE_BACKGROUND_HOVER};
const object6 = {'width': 32, 'height': 32, 'borderRadius': null, 'marginRight': 16};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object3.applicationCommandIcon = object6;
object3.applicationCommandDescriptionWrapper = {'flexDirection': 'column', 'flexShrink': 1, 'alignSelf': 'flex-end'};
object3.applicationCommandSectionName = {'paddingLeft': 16, 'marginLeft': 'auto'};
return object3;
}
function _default_90992({command, onPress, section, guildId, showIcon, highlighted}) { // fn#90992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12053:707, offset: 0x0204ef32, size: 688 bytes, params: 2, frame: 28
showIcon = showIcon === undefined || showIcon;
highlighted = !(highlighted === undefined) && highlighted;
const styles = useStyles((require(4584) /* metro dependency 4584: useFontScale */).useFontScale());
const member = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun90993);
const value6 = env0_3.useMemo(_fun90994, [section, member]);
const r8 = member?.nick != null ? member.nick : section?.name;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const eo8b3e = (require(1244) /* metro dependency 1244: indexNative */).t.eo8b3e;
const object = {applicationName: r8};
object.commandDescription = command.displayDescription;
object.commandName = command.displayName;
const object4 = {};
copyDataProperties(object4, styles.applicationCommandItem, undefined);
copyDataProperties(object4, highlighted ? styles.highlightedApplicationCommandItem : {}, undefined);
const items2 = [showIcon && value6 != null && ((Component) => <Component style={styles.applicationCommandIcon} source={value6} />)(importDefault(5475) /* metro dependency 5475: FastImage */)];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <View style={styles.applicationCommandDescriptionWrapper}><Text lineClamp={1} variant="text-md/semibold" color="mobile-text-heading-primary">{'/ ' + command.displayName}</Text><Text lineClamp={1} variant="text-xs/medium" color="text-default">{command.displayDescription}</Text></View>;
items2[2] = <Text style={styles.applicationCommandSectionName} variant="eyebrow" color="text-muted">{r8}</Text>;
return (
<PressableOpacity
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [eo8b3e, object])}
style={object4}
accessibilityRole="button"
onPress={onPress}
>
{items2}
</PressableOpacity>
);
}
function _fun90993() { // fn#90993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12053:854, offset: 0x0204f1e2, size: 79 bytes, params: 1, frame: 13
var value3;
if (guildId != null) {
if (section?.botId != null) {
value3 = environment.__proto__;
return GuildMemberStore.getMember(guildId, section.botId);
}
function _fun90991(a0) { // fn#90991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12053:216, offset: 0x0204ee77, size: 187 bytes, params: 2, frame: 16
const object = {};
const object2 = {'flexDirection': 'row', 'paddingVertical': 8, 'paddingHorizontal': 16, 'alignItems': 'center'};
const Math = global.Math;
object2.height = Math.max(a0 * AUTOCOMPLETE_ROW_HEIGHT, AUTOCOMPLETE_ROW_HEIGHT);
object.applicationCommandItem = object2;
const INTERACTIVE_BACKGROUND_HOVER = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_HOVER;
object.highlightedApplicationCommandItem = {backgroundColor: INTERACTIVE_BACKGROUND_HOVER};
const object4 = {'width': 32, 'height': 32, 'borderRadius': null, 'marginRight': 16};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.applicationCommandIcon = object4;
object.applicationCommandDescriptionWrapper = {'flexDirection': 'column', 'flexShrink': 1, 'alignSelf': 'flex-end'};
object.applicationCommandSectionName = {'paddingLeft': 16, 'marginLeft': 'auto'};
return object;
}
function _default_90992({command, onPress, section, guildId, showIcon, highlighted}) { // fn#90992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12053:707, offset: 0x0204ef32, size: 688 bytes, params: 2, frame: 28
showIcon = showIcon === undefined || showIcon;
highlighted = !(highlighted === undefined) && highlighted;
const styles = useStyles((UseFontScaleModule).useFontScale());
const member = (FluxModule).useStateFromStores([GuildMemberStore], _fun90993);
const value6 = ReactModule.useMemo(_fun90994, [section, member]);
const r8 = member?.nick != null ? member.nick : section?.name;
const PressableOpacity = (PressablesModule).PressableOpacity;
const intl = (IndexNativeModule).intl;
const formatToPlainString = intl.formatToPlainString;
const eo8b3e = (IndexNativeModule).t.eo8b3e;
const object2 = {applicationName: r8};
object2.commandDescription = command.displayDescription;
object2.commandName = command.displayName;
const object3 = {};
copyDataProperties(object3, styles.applicationCommandItem, undefined);
copyDataProperties(object3, highlighted ? styles.highlightedApplicationCommandItem : {}, undefined);
const items2 = [
showIcon && value6 != null && ((Component) => <Component style={styles.applicationCommandIcon} source={value6} />)(importDefault(5475) /* metro dependency 5475: FastImage */),
];
const Text = (TextModule).Text;
items2[1] = (
<View style={styles.applicationCommandDescriptionWrapper}>
<Text
lineClamp={1}
variant="text-md/semibold"
color="mobile-text-heading-primary"
>
{'/ ' + command.displayName}
</Text>
<Text
lineClamp={1}
variant="text-xs/medium"
color="text-default"
>
{command.displayDescription}
</Text>
</View>
);
items2[2] = (
<Text
style={styles.applicationCommandSectionName}
variant="eyebrow"
color="text-muted"
>
{r8}
</Text>
);
return (
<PressableOpacity
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [eo8b3e, object2])}
style={object3}
accessibilityRole="button"
onPress={onPress}
>
{items2}
</PressableOpacity>
);
function _fun90993() { // fn#90993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12053:854, offset: 0x0204f1e2, size: 79 bytes, params: 1, frame: 13
var value3;
var guildMemberStoreBinding;
if (guildId != null) {
if (section?.botId != null) {
value3 = environment.__proto__;
guildMemberStoreBinding = GuildMemberStore;
return guildMemberStoreBinding.getMember(guildId, section.botId);
}
}
}
function _fun90994() { // fn#90994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12053:948, offset: 0x0204f231, size: 50 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (ApplicationCommandUtilsModule).getApplicationCommandsIconSource(section,
member);
}
}
}
function _fun90994() { // fn#90994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12053:948, offset: 0x0204f231, size: 50 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (require(11752) /* metro dependency 11752: ApplicationCommandUtils */).getApplicationCommandsIconSource(section,
member);
}
global.__d(_fun90990, 11867, [31, 27, 1945, 11018, 33, 4501, 697, 4584, 566, 11752, 5278, 1244, 5475, 4573,
2]) /* metro module 11867, dependencies: [31, 27, 1945, 11018, 33, 4501, 697, 4584, 566, 11752, 5278, 1244, 5475, 4573, 2] */;
@@ -1,76 +1,84 @@
/* Metro module 11868; source: modules/application_commands/native/ApplicationCommandList.tsx; dependencies: [31, 27, 11018, 33, 8060, 1909, 7869, 5068, 11866, 11867, 2] */
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 ServerModule from '../../../flow/Server.tsx'; /* Metro dependency 1909 */
import * as ApplicationCommandTypesModule from '../ApplicationCommandTypes.tsx'; /* Metro dependency 5068 */
import * as ApplicationCommandQueryTypesModule from '../ApplicationCommandQueryTypes.tsx'; /* Metro dependency 7869 */
import * as ApplicationCommandQueryApiModule from '../ApplicationCommandQueryApi.tsx'; /* Metro dependency 8060 */
import * as ApplicationCommandsConstantsModule from './ApplicationCommandsConstants.tsx'; /* Metro dependency 11018 */
function _fun90995(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12054:6, offset: 0x0204f263, size: 194 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).FlatList;
const AUTOCOMPLETE_ROW_HEIGHT = (require(11018) /* metro dependency 11018: ApplicationCommandsConstants */).AUTOCOMPLETE_ROW_HEIGHT;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const AUTOCOMPLETE_ROW_HEIGHT = (ApplicationCommandsConstantsModule).AUTOCOMPLETE_ROW_HEIGHT;
const env0_7 = 3 * AUTOCOMPLETE_ROW_HEIGHT;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandList.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ApplicationCommandList.tsx');
exports.default = _default_90996;
}
function _default_90996({style, channel, onPressCommandItem, query, ItemSeparatorComponent, getItemLayout, onCommandsChange}) { // fn#90996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12054:188, offset: 0x0204f325, size: 406 bytes, params: 2, frame: 27
const useQuery = ApplicationCommandQueryApiModule.useQuery;
const object = {channel: channel, type: 'channel'};
const object2 = {text: query};
const ApplicationCommandType = (ServerModule).ApplicationCommandType;
const CHAT = ApplicationCommandType.CHAT;
object2.commandTypes = [CHAT];
const ScoreMethod = (ApplicationCommandQueryTypesModule).ScoreMethod;
const COMMAND_OR_APPLICATION = ScoreMethod.COMMAND_OR_APPLICATION;
const value3 = Reflect.apply(useQuery, ApplicationCommandQueryApiModule, [object, object2, {'placeholderCount': 3,
'limit': 7, scoreMethod: COMMAND_OR_APPLICATION}]);
const commands = value3.commands;
const sections = value3.sections;
const sections2 = sections;
const scrollDown = value3.scrollDown;
const binding = sections2;
const value4 = binding.useCallback(_fun90997, [sections, channel.guild_id, onPressCommandItem]);
binding.useEffect(_fun91000, [commands?.length, onCommandsChange]);
return (
<FlatList
style={style}
keyExtractor={function(a0) {
return a0.id;
}}
data={commands}
renderItem={value4}
ItemSeparatorComponent={ItemSeparatorComponent}
getItemLayout={getItemLayout}
onScroll={sections2.useCallback(_fun91001, [scrollDown])}
/>
);
function _fun90997({item, index}) { // fn#90997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12054:554, offset: 0x0204f4bb, size: 230 bytes, params: 2, frame: 20
const inputType = item.inputType;
const ApplicationCommandInputType = (ApplicationCommandTypesModule).ApplicationCommandInputType;
const PLACEHOLDER = ApplicationCommandInputType.PLACEHOLDER;
if (inputType === PLACEHOLDER) {
return ((Component) => <Component />)(importDefault(11866) /* metro dependency 11866: ApplicationCommandLoadingItem */);
}
return ((Component) => <Component command={item} section={sections?.find(function({id}) {
return id === item.applicationId;
})} onPress={onPress_90999} guildId={channel.guild_id} highlighted={index === 0} />)(importDefault(11867) /* metro dependency 11867: ApplicationCommandItem */);
function onPress_90999() { // fn#90999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12054:764, offset: 0x0204f5a1, size: 28 bytes, params: 1, frame: 13
return onPressCommandItem(item, env0_1);
}
function _default_90996({style, channel, onPressCommandItem, query, ItemSeparatorComponent, getItemLayout, onCommandsChange}) { // fn#90996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12054:188, offset: 0x0204f325, size: 406 bytes, params: 2, frame: 27
const applicationCommandQueryApiModule = importAll(8060) /* metro dependency 8060: ApplicationCommandQueryApi */;
const useQuery = applicationCommandQueryApiModule.useQuery;
const object3 = {channel: channel, type: 'channel'};
const object4 = {text: query};
const ApplicationCommandType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandType;
const CHAT = ApplicationCommandType.CHAT;
object4.commandTypes = [CHAT];
const ScoreMethod = (require(7869) /* metro dependency 7869: ApplicationCommandQueryTypes */).ScoreMethod;
const COMMAND_OR_APPLICATION = ScoreMethod.COMMAND_OR_APPLICATION;
const value3 = Reflect.apply(useQuery, applicationCommandQueryApiModule, [object3, object4, {'placeholderCount': 3,
'limit': 7, scoreMethod: COMMAND_OR_APPLICATION}]);
const commands = value3.commands;
const sections = value3.sections;
const env0_4 = sections;
const scrollDown = value3.scrollDown;
const binding = env0_4;
const value4 = binding.useCallback(_fun90997, [sections, channel.guild_id, onPressCommandItem]);
binding.useEffect(_fun91000, [commands?.length, onCommandsChange]);
return (
<FlatList
style={style}
keyExtractor={function(a0) {
return a0.id;
}}
data={commands}
renderItem={value4}
ItemSeparatorComponent={ItemSeparatorComponent}
getItemLayout={getItemLayout}
onScroll={env0_4.useCallback(_fun91001, [scrollDown])}
/>
);
}
}
function _fun91000() { // fn#91000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12054:847, offset: 0x0204f5bd, size: 62 bytes, params: 1, frame: 14
if (onCommandsChange != null) {
onCommandsChange(commands?.length ?? 0);
}
}
function _fun91001({nativeEvent}) { // fn#91001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12054:960, offset: 0x0204f5fb, size: 78 bytes, params: 2, frame: 10
if (nativeEvent.contentOffset.y + nativeEvent.layoutMeasurement.height >= nativeEvent.contentSize.height - env1_7) {
scrollDown();
}
}
function _fun90997({item, index}) { // fn#90997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12054:554, offset: 0x0204f4bb, size: 230 bytes, params: 2, frame: 20
const inputType = item.inputType;
const ApplicationCommandInputType = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandInputType;
const PLACEHOLDER = ApplicationCommandInputType.PLACEHOLDER;
if (inputType === PLACEHOLDER) {
return ((Component) => <Component />)(importDefault(11866) /* metro dependency 11866: ApplicationCommandLoadingItem */);
}
return ((Component) => <Component command={item} section={sections?.find(function({id}) {
return id === item.applicationId;
})} onPress={onPress_90999} guildId={channel.guild_id} highlighted={index === 0} />)(importDefault(11867) /* metro dependency 11867: ApplicationCommandItem */);
}
function _fun91000() { // fn#91000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12054:847, offset: 0x0204f5bd, size: 62 bytes, params: 1, frame: 14
if (onCommandsChange != null) {
onCommandsChange(commands?.length ?? 0);
}
}
function _fun91001({nativeEvent}) { // fn#91001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12054:960, offset: 0x0204f5fb, size: 78 bytes, params: 2, frame: 10
if (nativeEvent.contentOffset.y + nativeEvent.layoutMeasurement.height >= nativeEvent.contentSize.height - env1_7) {
scrollDown();
}
}
function onPress_90999() { // fn#90999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12054:764, offset: 0x0204f5a1, size: 28 bytes, params: 1, frame: 13
return onPressCommandItem(item, env0_1);
}
global.__d(_fun90995, 11868, [31, 27, 11018, 33, 8060, 1909, 7869, 5068, 11866, 11867,
2]) /* metro module 11868, dependencies: [31, 27, 11018, 33, 8060, 1909, 7869, 5068, 11866, 11867, 2] */;
@@ -1,48 +1,58 @@
/* Metro module 11866; source: modules/application_commands/native/ApplicationCommandLoadingItem.tsx; dependencies: [31, 27, 11018, 33, 4501, 697, 4584, 2] */
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 CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as UseFontScaleModule from '../../screen/native/useFontScale.tsx'; /* Metro dependency 4584 */
import * as ApplicationCommandsConstantsModule from './ApplicationCommandsConstants.tsx'; /* Metro dependency 11018 */
function _fun90987(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12052:6, offset: 0x0204eb0e, size: 223 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(11018) /* metro dependency 11018: ApplicationCommandsConstants */).AUTOCOMPLETE_ROW_HEIGHT;
const value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun90988);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandLoadingItem.tsx');
ReactModule;
const env0_7 = (CreateStylesModule).createStyles(_fun90988);
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ApplicationCommandLoadingItem.tsx');
exports.default = _default_90989;
function _fun90988(a0) { // fn#90988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12052:209, offset: 0x0204ebed, size: 227 bytes, params: 2, frame: 16
const object = {};
const object2 = {'flexDirection': 'row', 'paddingVertical': 4, 'paddingHorizontal': 16, 'alignItems': 'center'};
const Math = global.Math;
object2.height = Math.max(a0 * AUTOCOMPLETE_ROW_HEIGHT, AUTOCOMPLETE_ROW_HEIGHT);
object.applicationCommandLoadingItem = object2;
object.applicationCommandLoadingLeftWrapper = {'flexDirection': 'column', 'width': '75%', 'height': '100%',
'justifyContent': 'space-between'};
let BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object.applicationCommandLoadingName = {'backgroundColor': null, 'height': 16, 'borderRadius': 16, 'width': '20%',
backgroundColor: BACKGROUND_MOD_STRONG};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.applicationCommandLoadingDescription = {'backgroundColor': null, 'height': 16, 'borderRadius': 16,
'width': '80%', backgroundColor: BACKGROUND_BASE_LOW};
BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object.applicationCommandLoadingSectionName = {'backgroundColor': null, 'paddingLeft': 16, 'width': '25%',
'marginLeft': 'auto', 'height': 16, 'borderRadius': 16, backgroundColor: BACKGROUND_MOD_STRONG};
return object;
}
function _default_90989() { // fn#90989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12052:888, offset: 0x0204ecd0, size: 180 bytes, params: 1, frame: 19
const styles = useStyles((UseFontScaleModule).useFontScale());
let view = <View style={styles.applicationCommandLoadingName} />;
view = (
<View style={styles.applicationCommandLoadingLeftWrapper}>
{view}
<View style={styles.applicationCommandLoadingDescription} />
</View>
);
return (
<View style={styles.applicationCommandLoadingItem}>
{view}
<View style={styles.applicationCommandLoadingSectionName} />
</View>
);
}
}
function _fun90988(a0) { // fn#90988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12052:209, offset: 0x0204ebed, size: 227 bytes, params: 2, frame: 16
const object3 = {};
const object4 = {'flexDirection': 'row', 'paddingVertical': 4, 'paddingHorizontal': 16, 'alignItems': 'center'};
const Math = global.Math;
object4.height = Math.max(a0 * AUTOCOMPLETE_ROW_HEIGHT, AUTOCOMPLETE_ROW_HEIGHT);
object3.applicationCommandLoadingItem = object4;
object3.applicationCommandLoadingLeftWrapper = {'flexDirection': 'column', 'width': '75%', 'height': '100%',
'justifyContent': 'space-between'};
let BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object3.applicationCommandLoadingName = {'backgroundColor': null, 'height': 16, 'borderRadius': 16, 'width': '20%',
backgroundColor: BACKGROUND_MOD_STRONG};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.applicationCommandLoadingDescription = {'backgroundColor': null, 'height': 16, 'borderRadius': 16,
'width': '80%', backgroundColor: BACKGROUND_BASE_LOW};
BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object3.applicationCommandLoadingSectionName = {'backgroundColor': null, 'paddingLeft': 16, 'width': '25%',
'marginLeft': 'auto', 'height': 16, 'borderRadius': 16, backgroundColor: BACKGROUND_MOD_STRONG};
return object3;
}
function _default_90989() { // fn#90989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12052:888, offset: 0x0204ecd0, size: 180 bytes, params: 1, frame: 19
const styles = useStyles((require(4584) /* metro dependency 4584: useFontScale */).useFontScale());
let view = <View style={styles.applicationCommandLoadingName} />;
view = <View style={styles.applicationCommandLoadingLeftWrapper}>{view}<View style={styles.applicationCommandLoadingDescription} /></View>;
return (
<View style={styles.applicationCommandLoadingItem}>
{view}
<View style={styles.applicationCommandLoadingSectionName} />
</View>
);
}
global.__d(_fun90987, 11866, [31, 27, 11018, 33, 4501, 697, 4584,
2]) /* metro module 11866, dependencies: [31, 27, 11018, 33, 4501, 697, 4584, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,80 +1,87 @@
/* Metro module 11752; source: modules/application_commands/native/ApplicationCommandUtils.tsx; dependencies: [4645, 4644, 5066, 1423, 11753, 11754, 5068, 1860, 11093, 7879, 2] */
import UploadAttachmentStore from '../../../stores/UploadAttachmentStore.tsx'; /* Metro dependency 4644 */
import UploadAttachmentActionCreators from '../../../actions/UploadAttachmentActionCreators.tsx'; /* Metro dependency 7879 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as DraftStoreModule from '../../../stores/DraftStore.tsx'; /* Metro dependency 4645 */
import * as ApplicationCommandConstantsModule from '../ApplicationCommandConstants.tsx'; /* Metro dependency 5066 */
import * as ApplicationCommandTypesModule from '../ApplicationCommandTypes.tsx'; /* Metro dependency 5068 */
function _fun90058(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11938:6, offset: 0x02028f7a, size: 175 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
const uploadAttachmentStore = importDefault(4644) /* metro dependency 4644: UploadAttachmentStore */;
const env0_5 = (require(5066) /* metro dependency 5066: ApplicationCommandConstants */).BuiltInSectionId;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ApplicationCommandUtils.tsx');
exports.getApplicationCommandsIconSource = getApplicationCommandsIconSource;
exports.openCommandAttachmentPreview = openCommandAttachmentPreview;
}
function getApplicationCommandsIconSource(a0, a1) { // fn#90059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11938:286, offset: 0x02029029, size: 308 bytes, params: 3, frame: 17
var r2;
var getApplicationIconSource;
var application;
if (a0 == null) {
return null;
}
const id = a0.id;
var value;
const BUILT_IN = BuiltInSectionId.BUILT_IN;
if (BUILT_IN === id) {
return (importDefault(1423) /* metro dependency 1423: AvatarUtils */).makeSource(importDefault(11753) /* metro dependency 11753 */);
}
const FRECENCY = BuiltInSectionId.FRECENCY;
if (FRECENCY === id) {
return (importDefault(1423) /* metro dependency 1423: AvatarUtils */).makeSource(importDefault(11754) /* metro dependency 11754 */);
}
const type = a0.type;
const value2 = undefined;
const ApplicationCommandSectionType = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandSectionType;
const APPLICATION = ApplicationCommandSectionType.APPLICATION;
if (type === APPLICATION) {
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getApplicationIconSource = value.getApplicationIconSource;
application = a0.application;
value = Reflect.apply(getApplicationIconSource, value, [{id: a0.id, icon: a0.icon,
bot: application == null ? value2 : application.bot, botIconFirst: true, guildMember: a1}]);
r2 = value;
} else {
r2 = importDefault(1860) /* metro dependency 1860 */;
}
return r2;
}
function openCommandAttachmentPreview(a0, a1, a2, a3) { // fn#90060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11938:671, offset: 0x0202915d, size: 132 bytes, params: 5, frame: 17
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const getUpload = UploadAttachmentStore.getUpload;
const SlashCommand = DraftType.SlashCommand;
const value2 = Reflect.apply(getUpload, UploadAttachmentStore, [a1, a2, SlashCommand]);
if (value2 != null) {
(importDefault(11093) /* metro dependency 11093: showUploadPreviewActionSheet */)({channelId: a1,
disableSpoiler: true, onClose: a3, onRemove: onRemove, upload: value2});
}
}
function openCommandAttachmentPreviewOnRemove() { // fn#90061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11938:823, owner: openCommandAttachmentPreview.onRemove, offset: 0x020291e1, size: 189 bytes, params: 1, frame: 18
var environment;
const value = environment.__proto__;
const value2 = undefined;
const defaultImport = importDefault(7879) /* metro dependency 7879: UploadAttachmentActionCreators */;
const remove = defaultImport.remove;
const id = env0_3.id;
const SlashCommand = DraftType.SlashCommand;
Reflect.apply(remove, defaultImport, [require, id, SlashCommand]);
const r5 = env0_0 == null || env0_0.props.activeCommand == null || env0_0.props.activeCommand.options == null ? value2 : env0_0.props.activeCommand.options.find(function({name}) {
return name === importDefault;
});
if (r5 != null) {
if (env0_0 != null) {
env0_0.insertOrJumpCommandOption(r5, value2, false, {displayText: ''});
function getApplicationCommandsIconSource(a0, a1) { // fn#90059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11938:286, offset: 0x02029029, size: 308 bytes, params: 3, frame: 17
var r2;
var getApplicationIconSource;
var application;
if (a0 == null) {
return null;
}
const id = a0.id;
var value;
const BUILT_IN = BuiltInSectionId.BUILT_IN;
if (BUILT_IN === id) {
return (importDefault(1423) /* metro dependency 1423: AvatarUtils */).makeSource(importDefault(11753) /* metro dependency 11753 */);
}
const FRECENCY = BuiltInSectionId.FRECENCY;
if (FRECENCY === id) {
return (importDefault(1423) /* metro dependency 1423: AvatarUtils */).makeSource(importDefault(11754) /* metro dependency 11754 */);
}
const type = a0.type;
const value2 = undefined;
const ApplicationCommandSectionType = (ApplicationCommandTypesModule).ApplicationCommandSectionType;
const APPLICATION = ApplicationCommandSectionType.APPLICATION;
if (type === APPLICATION) {
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getApplicationIconSource = value.getApplicationIconSource;
application = a0.application;
value = Reflect.apply(getApplicationIconSource, value, [{id: a0.id, icon: a0.icon,
bot: application == null ? value2 : application.bot, botIconFirst: true, guildMember: a1}]);
r2 = value;
} else {
r2 = importDefault(1860) /* metro dependency 1860 */;
}
return r2;
}
return value2;
function openCommandAttachmentPreview(a0, a1, a2, a3) { // fn#90060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11938:671, offset: 0x0202915d, size: 132 bytes, params: 5, frame: 17
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const uploadAttachmentStoreBinding = UploadAttachmentStore;
const getUpload = uploadAttachmentStoreBinding.getUpload;
const SlashCommand = DraftType.SlashCommand;
const value2 = Reflect.apply(getUpload, uploadAttachmentStoreBinding, [a1, a2, SlashCommand]);
if (value2 != null) {
(importDefault(11093) /* metro dependency 11093: showUploadPreviewActionSheet */)({channelId: a1,
disableSpoiler: true, onClose: a3, onRemove: onRemove_90061, upload: value2});
}
function openCommandAttachmentPreviewOnRemove() { // fn#90061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11938:823, owner: openCommandAttachmentPreview.onRemove, offset: 0x020291e1, size: 189 bytes, params: 1, frame: 18
var environment;
const value = environment.__proto__;
const value2 = undefined;
const defaultImport = UploadAttachmentActionCreators;
const remove = defaultImport.remove;
const id = DraftStoreModule.DraftType.id;
const SlashCommand = DraftType.SlashCommand;
Reflect.apply(remove, defaultImport, [require, id, SlashCommand]);
const r5 = env0_0 == null || env0_0.props.activeCommand == null || env0_0.props.activeCommand.options == null ? value2 : env0_0.props.activeCommand.options.find(function({name}) {
return name === importDefault;
});
if (r5 != null) {
if (env0_0 != null) {
env0_0.insertOrJumpCommandOption(r5, value2, false, {displayText: ''});
}
}
return value2;
}
}
}
global.__d(_fun90058, 11752, [4645, 4644, 5066, 1423, 11753, 11754, 5068, 1860, 11093, 7879,
2]) /* metro module 11752, dependencies: [4645, 4644, 5066, 1423, 11753, 11754, 5068, 1860, 11093, 7879, 2] */;
@@ -1,4 +1,6 @@
/* Metro module 11695; source: modules/application_commands/native/ApplicationCommandValidationUtils.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun89658(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11881:6, offset: 0x02019297, size: 109 bytes, params: 8, frame: 16
const _arrayLikeToArray_89661 = function(a0, a1) {
var r0;
@@ -45,117 +47,123 @@ function _fun89658(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandValidationUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ApplicationCommandValidationUtils.tsx');
exports.getFirstInvalidOption = getFirstInvalidOption;
}
function _createForOfIteratorHelperLoose_89659(a0, a1) { // fn#89659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11881:46, offset: 0x02019304, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
function _createForOfIteratorHelperLoose_89659(a0, a1) { // fn#89659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11881:46, offset: 0x02019304, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
return _fun89660;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_89661(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun89660;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_89661(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_89661(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_89661(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun89660;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun89660() { // fn#89660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11881:617, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
return _fun89660;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function getFirstInvalidOption({options}, a1) { // fn#89662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11881:1139, offset: 0x02019478, size: 111 bytes, params: 3, frame: 16
var r3;
var value3;
var name;
var property;
var required;
var success;
var value4;
if (options != null) {
var value;
value = _createForOfIteratorHelperLoose_89659(options);
var value2 = value();
var done = value2.done;
if (!done) {
r3 = value2;
reducibleLoop2: while (true) {
value3 = r3.value;
name = value3.name;
property = a1[name];
required = value3.required;
if (required) {
reducibleJoin4: while (true) {
if (property == null) {
return value3;
}
function getFirstInvalidOption({options}, a1) { // fn#89662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11881:1139, offset: 0x02019478, size: 111 bytes, params: 3, frame: 16
var r3;
var value3;
var name;
var property;
var required;
var success;
var value4;
if (options != null) {
var value;
value = _createForOfIteratorHelperLoose_89659(options);
var value2 = value();
var done = value2.done;
if (!done) {
r3 = value2;
reducibleLoop2: while (true) {
value3 = r3.value;
name = value3.name;
property = a1[name];
required = value3.required;
if (required) {
reducibleJoin4: while (true) {
if (property == null) {
return value3;
}
break reducibleJoin4;
}
break reducibleJoin4;
}
}
if (property != null) {
success = property.success;
reducibleJoin7: while (true) {
if (!success) {
return value3;
if (property != null) {
success = property.success;
reducibleJoin7: while (true) {
if (!success) {
return value3;
}
break reducibleJoin7;
}
break reducibleJoin7;
}
value4 = value();
done = value4.done;
if (done) {
return null;
}
r3 = value4;
continue reducibleLoop2;
}
value4 = value();
done = value4.done;
if (done) {
return null;
}
r3 = value4;
continue reducibleLoop2;
}
}
return null;
}
return null;
}
global.__d(_fun89658, 11695, [2]) /* metro module 11695, dependencies: [2] */;
@@ -1,188 +1,197 @@
/* Metro module 11865; source: modules/application_commands/native/ApplicationCommandsCategories.tsx; dependencies: [31, 27, 1310, 1945, 11862, 33, 4501, 697, 566, 11752, 5475, 5278, 1244, 1357, 4081, 4082, 4564, 4002, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ThemeStore from '../../user_settings/ThemeStore.tsx'; /* Metro dependency 1310 */
import GuildMemberStore from '../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
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 FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as MobileVisualRefreshExperimentModule from '../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as ApplicationCommandUtilsModule from './ApplicationCommandUtils.tsx'; /* Metro dependency 11752 */
import * as ApplicationCommandsCategoriesConstantsModule from './ApplicationCommandsCategoriesConstants.tsx'; /* Metro dependency 11862 */
function _fun90974(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:6, offset: 0x0204e2c5, size: 542 bytes, params: 8, frame: 29
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.View;
const env0_5 = value2.StyleSheet;
const env0_6 = value2.FlatList;
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const applicationCommandsCategoriesConstantsModule = require(11862) /* metro dependency 11862: ApplicationCommandsCategoriesConstants */;
const ICON_SIZE = applicationCommandsCategoriesConstantsModule.ICON_SIZE;
const NODE_SIZE = applicationCommandsCategoriesConstantsModule.NODE_SIZE;
const NODE_MARGIN = applicationCommandsCategoriesConstantsModule.NODE_MARGIN;
const env0_9 = applicationCommandsCategoriesConstantsModule.ITEM_WIDTH;
const value4 = require(33) /* metro dependency 33 */;
const env0_10 = value4.jsx;
const env0_11 = value4.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object4 = {'backgroundColor': null, 'borderTopWidth': null, 'borderTopColor': null, 'paddingHorizontal': 8,
const ICON_SIZE = ApplicationCommandsCategoriesConstantsModule.ICON_SIZE;
const NODE_SIZE = ApplicationCommandsCategoriesConstantsModule.NODE_SIZE;
const NODE_MARGIN = ApplicationCommandsCategoriesConstantsModule.NODE_MARGIN;
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {'backgroundColor': null, 'borderTopWidth': null, 'borderTopColor': null, 'paddingHorizontal': 8,
'paddingVertical': 4, 'flexDirection': 'row', 'alignItems': 'center'};
const MOBILE_COMMAND_CATEGORIES_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_COMMAND_CATEGORIES_BACKGROUND;
object4.backgroundColor = MOBILE_COMMAND_CATEGORIES_BACKGROUND;
const CHAT_INPUT_COMMAND_CATEGORIES_BORDER_TOP_WIDTH = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_COMMAND_CATEGORIES_BORDER_TOP_WIDTH;
object4.borderTopWidth = CHAT_INPUT_COMMAND_CATEGORIES_BORDER_TOP_WIDTH;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object4.borderTopColor = BORDER_SUBTLE;
object3.container = object4;
object3.categoryImage = {height: ICON_SIZE, width: ICON_SIZE, borderRadius: ICON_SIZE / 2};
object3.fadedItem = {opacity: 0.5};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object3.activeItem = {opacity: 1, backgroundColor: BACKGROUND_BASE_LOWER};
object3.item = {marginVertical: NODE_MARGIN, marginHorizontal: NODE_MARGIN, height: NODE_SIZE, width: NODE_SIZE,
const MOBILE_COMMAND_CATEGORIES_BACKGROUND = (Native).colors.MOBILE_COMMAND_CATEGORIES_BACKGROUND;
object2.backgroundColor = MOBILE_COMMAND_CATEGORIES_BACKGROUND;
const CHAT_INPUT_COMMAND_CATEGORIES_BORDER_TOP_WIDTH = (Native).modules.mobile.CHAT_INPUT_COMMAND_CATEGORIES_BORDER_TOP_WIDTH;
object2.borderTopWidth = CHAT_INPUT_COMMAND_CATEGORIES_BORDER_TOP_WIDTH;
const BORDER_SUBTLE = (Native).colors.BORDER_SUBTLE;
object2.borderTopColor = BORDER_SUBTLE;
object.container = object2;
object.categoryImage = {height: ICON_SIZE, width: ICON_SIZE, borderRadius: ICON_SIZE / 2};
object.fadedItem = {opacity: 0.5};
const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER;
object.activeItem = {opacity: 1, backgroundColor: BACKGROUND_BASE_LOWER};
object.item = {marginVertical: NODE_MARGIN, marginHorizontal: NODE_MARGIN, height: NODE_SIZE, width: NODE_SIZE,
borderRadius: NODE_SIZE / 2, alignItems: 'center', justifyContent: 'center'};
const env0_12 = Reflect.apply(createStyles, createStylesModule, [object3]);
const env0_13 = value.memo(_fun90975);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandsCategories.tsx');
const env0_12 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const env0_13 = ReactModule.memo(_fun90975);
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ApplicationCommandsCategories.tsx');
exports.default = _default_90979;
}
function _fun90975({section, handlePressCategory, active, index, guildId}) { // fn#90975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:862, offset: 0x0204e4e3, size: 437 bytes, params: 2, frame: 25
const styles = useStyles();
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
const value2 = guildId.useMemo(_fun90977, [section, Reflect.apply(useStateFromStores, fluxModule,
[[GuildMemberStore], _fun90976])]);
const r8 = value2 != null && ((Component) => <Component style={styles.categoryImage} source={value2} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return (
<PressableOpacity
onPress={function() {
return handlePressCategory(index);
}}
accessibilityRole="button"
accessibilityLabel={active ? Reflect.apply(formatToPlainString, intl, [t.yl24Gd,
{applicationName: section.name}]) : Reflect.apply(formatToPlainString, intl, [t['9uqD4O'],
{applicationName: section.name}])}
key={section.name}
>
<View style={[styles.item, active ? styles.activeItem : styles.fadedItem]}>
{r8}
</View>
</PressableOpacity>
);
}
function _default_90979({style, sections, onPressSection, selectedIndex, guildId}) { // fn#90979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:1535, offset: 0x0204e719, size: 563 bytes, params: 2, frame: 28
var r6;
var VisualEffectView;
var moduleValue2;
const styles = useStyles();
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const enabled = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
[{location: 'ApplicationCommandsCategories'}]).enabled;
const binding = env0_3;
var env0_3 = binding.useRef(null);
const env0_4 = binding.useRef(null);
const env0_5 = binding.useRef(null);
const value2 = binding.useRef(null);
binding.useEffect(_fun90980, [selectedIndex]);
const value3 = binding.useCallback(function(a0) {
onPressSection(a0);
require(dependencyMap[14]).triggerHapticFeedback(importDefault(dependencyMap[15]).IMPACT_LIGHT);
}, [onPressSection]);
const value4 = binding.useCallback(_fun90982, []);
const value5 = binding.useCallback(_fun90983, []);
const value6 = binding.useCallback(function(a0, a1) {
return {length: ITEM_WIDTH, offset: ITEM_WIDTH * a1, index: a1};
}, []);
const value7 = binding.useCallback(_fun90985, [selectedIndex, value3, guildId]);
const items2 = [styles.container, style];
if (enabled) {
r6 = !enabled;
} else {
VisualEffectView = importDefault(4564) /* metro dependency 4564: VisualEffectView */;
moduleValue2 = require(4002) /* metro dependency 4002: shared */;
r6 = <VisualEffectView blurTheme={moduleValue2.isThemeDark(ThemeStore.theme) ? 'dark' : 'light'} style={StyleSheet.absoluteFill} />;
}
return (
<View style={items2}>
{r6}
<FlatList
ref={value2}
getItemLayout={value6}
data={sections}
keyboardShouldPersistTaps="always"
horizontal
keyExtractor={function(a0) {
return a0.id;
}}
renderItem={value7}
showsHorizontalScrollIndicator={false}
onScroll={value4}
onLayout={value5}
/>
</View>
);
}
function _fun90976() { // fn#90976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:977, offset: 0x0204e698, size: 79 bytes, params: 1, frame: 13
var value3;
if (guildId != null) {
if (section?.botId != null) {
value3 = environment.__proto__;
return GuildMemberStore.getMember(guildId, section.botId);
function _fun90975({section, handlePressCategory, active, index, guildId}) { // fn#90975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:862, offset: 0x0204e4e3, size: 437 bytes, params: 2, frame: 25
const styles = useStyles();
const useStateFromStores = FluxModule.useStateFromStores;
const value2 = guildId.useMemo(_fun90977, [section, Reflect.apply(useStateFromStores, FluxModule,
[[GuildMemberStore], _fun90976])]);
const r8 = value2 != null && ((Component) => <Component style={styles.categoryImage} source={value2} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
const PressableOpacity = (PressablesModule).PressableOpacity;
const intl = (IndexNativeModule).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (IndexNativeModule).t;
return (
<PressableOpacity
onPress={function() {
return handlePressCategory(index);
}}
accessibilityRole="button"
accessibilityLabel={active ? Reflect.apply(formatToPlainString, intl, [t.yl24Gd,
{applicationName: section.name}]) : Reflect.apply(formatToPlainString, intl, [t['9uqD4O'],
{applicationName: section.name}])}
key={section.name}
>
<View style={[styles.item, active ? styles.activeItem : styles.fadedItem]}>
{r8}
</View>
</PressableOpacity>
);
function _fun90976() { // fn#90976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:977, offset: 0x0204e698, size: 79 bytes, params: 1, frame: 13
var value3;
var guildMemberStoreBinding;
if (guildId != null) {
if (section?.botId != null) {
value3 = environment.__proto__;
guildMemberStoreBinding = GuildMemberStore;
return guildMemberStoreBinding.getMember(guildId, section.botId);
}
}
}
function _fun90977() { // fn#90977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:1071, offset: 0x0204e6e7, size: 50 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (ApplicationCommandUtilsModule).getApplicationCommandsIconSource(section,
member);
}
}
}
function _fun90977() { // fn#90977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:1071, offset: 0x0204e6e7, size: 50 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (require(11752) /* metro dependency 11752: ApplicationCommandUtils */).getApplicationCommandsIconSource(section,
member);
}
function _fun90980() { // fn#90980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:1786, offset: 0x0204e94c, size: 135 bytes, params: 1, frame: 12
var selectedIndexBinding;
var value2;
var value3;
let current = env0_3.current;
if (current != null) {
current = env0_4.current;
if (current != null) {
current = env0_6.current;
function _default_90979({style, sections, onPressSection, selectedIndex, guildId}) { // fn#90979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:1535, offset: 0x0204e719, size: 563 bytes, params: 2, frame: 28
var r6;
var VisualEffectView;
var moduleValue2;
const styles = useStyles();
const useMobileVisualRefreshConfig = MobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const enabled = Reflect.apply(useMobileVisualRefreshConfig, MobileVisualRefreshExperimentModule,
[{location: 'ApplicationCommandsCategories'}]).enabled;
const binding = env0_3;
var env0_3 = binding.useRef(null);
const env0_4 = binding.useRef(null);
const env0_5 = binding.useRef(null);
const value2 = binding.useRef(null);
binding.useEffect(_fun90980, [selectedIndex]);
const value3 = binding.useCallback(function(a0) {
onPressSection(a0);
require(dependencyMap[14]).triggerHapticFeedback(importDefault(dependencyMap[15]).IMPACT_LIGHT);
}, [onPressSection]);
const value4 = binding.useCallback(_fun90982, []);
const value5 = binding.useCallback(_fun90983, []);
const value6 = binding.useCallback(function(a0, a1) {
return {length: ITEM_WIDTH, offset: ITEM_WIDTH * a1, index: a1};
}, []);
const value7 = binding.useCallback(_fun90985, [selectedIndex, value3, guildId]);
const items2 = [styles.container, style];
if (enabled) {
r6 = !enabled;
} else {
VisualEffectView = importDefault(4564) /* metro dependency 4564: VisualEffectView */;
moduleValue2 = require(4002) /* metro dependency 4002: shared */;
r6 = (
<VisualEffectView
blurTheme={moduleValue2.isThemeDark(ThemeStore.theme) ? 'dark' : 'light'}
style={StyleSheet.absoluteFill}
/>
);
}
return (
<View style={items2}>
{r6}
<FlatList
ref={value2}
getItemLayout={value6}
data={sections}
keyboardShouldPersistTaps="always"
horizontal
keyExtractor={function(a0) {
return a0.id;
}}
renderItem={value7}
showsHorizontalScrollIndicator={false}
onScroll={value4}
onLayout={value5}
/>
</View>
);
function _fun90980() { // fn#90980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:1786, offset: 0x0204e94c, size: 135 bytes, params: 1, frame: 12
var selectedIndexBinding;
var value2;
var value3;
let current = env0_3.current;
if (current != null) {
current = env0_5.current;
current = env0_4.current;
if (current != null) {
selectedIndexBinding = selectedIndex;
value2 = environment.__proto__;
value3 = selectedIndexBinding * ITEM_WIDTH;
current = env0_4.current;
if (value3 > current || value3 < env0_3.current) {
current = env0_6.current;
current.scrollToOffset({offset: value3});
current = ReactNativeModule.FlatList.current;
if (current != null) {
current = env0_5.current;
if (current != null) {
selectedIndexBinding = selectedIndex;
value2 = environment.__proto__;
value3 = selectedIndexBinding * ITEM_WIDTH;
current = env0_4.current;
if (value3 > current || value3 < env0_3.current) {
current = ReactNativeModule.FlatList.current;
current.scrollToOffset({offset: value3});
}
}
}
}
}
}
function _fun90982({nativeEvent}) { // fn#90982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:2053, offset: 0x0204ea1e, size: 67 bytes, params: 2, frame: 5
const contentOffset = nativeEvent.contentOffset;
const layoutMeasurement = nativeEvent.layoutMeasurement;
env0_3.current = contentOffset.x;
env0_4.current = contentOffset.x + layoutMeasurement.width;
}
function _fun90983({nativeEvent}) { // fn#90983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:2176, offset: 0x0204ea61, size: 64 bytes, params: 2, frame: 4
const layout = nativeEvent.layout;
env0_3.current = 0;
env0_4.current = layout.width;
env0_5.current = layout.width;
}
function _fun90985({item, index}) { // fn#90985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:2339, offset: 0x0204eac0, size: 78 bytes, params: 2, frame: 16
return ((Component) => <Component active={index === selectedIndex} section={item} index={index} handlePressCategory={env0_7} guildId={guildId} />)(env1_13);
}
}
}
function _fun90982({nativeEvent}) { // fn#90982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:2053, offset: 0x0204ea1e, size: 67 bytes, params: 2, frame: 5
const contentOffset = nativeEvent.contentOffset;
const layoutMeasurement = nativeEvent.layoutMeasurement;
env0_3.current = contentOffset.x;
env0_4.current = contentOffset.x + layoutMeasurement.width;
}
function _fun90983({nativeEvent}) { // fn#90983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:2176, offset: 0x0204ea61, size: 64 bytes, params: 2, frame: 4
const layout = nativeEvent.layout;
env0_3.current = 0;
env0_4.current = layout.width;
env0_5.current = layout.width;
}
function _fun90985({item, index}) { // fn#90985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:2339, offset: 0x0204eac0, size: 78 bytes, params: 2, frame: 16
return ((Component) => <Component active={index === selectedIndex} section={item} index={index} handlePressCategory={env0_7} guildId={guildId} />)(env1_13);
}
global.__d(_fun90974, 11865, [31, 27, 1310, 1945, 11862, 33, 4501, 697, 566, 11752, 5475, 5278, 1244, 1357, 4081,
4082, 4564, 4002,
2]) /* metro module 11865, dependencies: [31, 27, 1310, 1945, 11862, 33, 4501, 697, 566, 11752, 5475, 5278, 1244, 1357, 4081, 4082, 4564, 4002, 2] */;
@@ -1,8 +1,10 @@
/* Metro module 11862; source: modules/application_commands/native/ApplicationCommandsCategoriesConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun90965(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12048:6, offset: 0x0204de61, size: 114 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandsCategoriesConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ApplicationCommandsCategoriesConstants.tsx');
exports.ICON_SIZE = 24;
exports.NODE_SIZE = 32;
exports.NODE_MARGIN = 4;
@@ -10,3 +12,4 @@ function _fun90965(global, require, importDefault, importAll, module, exports, d
exports.ITEM_HEIGHT = 40;
}
global.__d(_fun90965, 11862, [2]) /* metro module 11862, dependencies: [2] */;
@@ -1,12 +1,16 @@
/* Metro module 11018; source: modules/application_commands/native/ApplicationCommandsConstants.tsx; dependencies: [477, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
function _fun84402(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11204:6, offset: 0x01f48922, size: 118 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(477) /* metro dependency 477: PlatformUtils */;
let value = PlatformUtilsModule;
value = value.isAndroid();
const r1 = value ? 64 : 56;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandsConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ApplicationCommandsConstants.tsx');
exports.AUTOCOMPLETE_ROW_HEIGHT = 48;
exports.AUTOCOMPLETE_EMOJI_ROW_HEIGHT = r1;
}
global.__d(_fun84402, 11018, [477, 2]) /* metro module 11018, dependencies: [477, 2] */;
@@ -1,62 +1,73 @@
/* Metro module 11863; source: modules/application_commands/native/ApplicationSectionHeader.tsx; dependencies: [31, 27, 1945, 33, 4501, 697, 566, 11752, 1244, 5475, 4573, 2] */
import GuildMemberStore from '../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
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 FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ApplicationCommandUtilsModule from './ApplicationCommandUtils.tsx'; /* Metro dependency 11752 */
function _fun90966(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12049:6, offset: 0x0204ded3, size: 314 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
const MOBILE_FLOATING_ACCESSORY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_FLOATING_ACCESSORY_BACKGROUND;
object2.applicationHeaderWrapper = {'flexDirection': 'row', 'alignItems': 'center', 'height': 32,
object.applicationHeaderWrapper = {'flexDirection': 'row', 'alignItems': 'center', 'height': 32,
'backgroundColor': null, 'paddingHorizontal': 16, backgroundColor: MOBILE_FLOATING_ACCESSORY_BACKGROUND};
const object4 = {'width': 16, 'height': 16, 'borderRadius': null, 'marginRight': 8};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.applicationIcon = object4;
const env0_7 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationSectionHeader.tsx');
const object3 = {'width': 16, 'height': 16, 'borderRadius': null, 'marginRight': 8};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.applicationIcon = object3;
const env0_7 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ApplicationSectionHeader.tsx');
exports.default = _default_90967;
exports.APPLICATION_SECTION_HEADER_HEIGHT = 32;
}
function _default_90967({section, guildId}) { // fn#90967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12049:438, offset: 0x0204e00d, size: 373 bytes, params: 2, frame: 23
const styles = useStyles();
const member = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun90968);
const applicationCommandsIconSource = (require(11752) /* metro dependency 11752: ApplicationCommandUtils */).getApplicationCommandsIconSource(section,
member);
const r8 = member?.nick != null ? member.nick : section?.name;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const property = (require(1244) /* metro dependency 1244: indexNative */).t['Ocw/sM'];
const object = {applicationName: r8};
const r6 = applicationCommandsIconSource != null && ((Component) => <Component style={styles.applicationIcon} source={applicationCommandsIconSource} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View
style={styles.applicationHeaderWrapper}
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [property, object])}
>
{r6}
<Text variant="eyebrow" color="interactive-text-default">
{r8}
</Text>
</View>
);
}
function _fun90968() { // fn#90968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12049:508, offset: 0x0204e182, size: 79 bytes, params: 1, frame: 13
var value3;
if (guildId != null) {
if (section?.botId != null) {
value3 = environment.__proto__;
return GuildMemberStore.getMember(guildId, section.botId);
function _default_90967({section, guildId}) { // fn#90967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12049:438, offset: 0x0204e00d, size: 373 bytes, params: 2, frame: 23
const styles = useStyles();
const member = (FluxModule).useStateFromStores([GuildMemberStore], _fun90968);
const applicationCommandsIconSource = (ApplicationCommandUtilsModule).getApplicationCommandsIconSource(section,
member);
const r8 = member?.nick != null ? member.nick : section?.name;
const intl = (IndexNativeModule).intl;
const formatToPlainString = intl.formatToPlainString;
const property = (IndexNativeModule).t['Ocw/sM'];
const object2 = {applicationName: r8};
const r6 = applicationCommandsIconSource != null && ((Component) => <Component style={styles.applicationIcon} source={applicationCommandsIconSource} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
const Text = (TextModule).Text;
return (
<View
style={styles.applicationHeaderWrapper}
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [property, object2])}
>
{r6}
<Text variant="eyebrow" color="interactive-text-default">
{r8}
</Text>
</View>
);
function _fun90968() { // fn#90968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12049:508, offset: 0x0204e182, size: 79 bytes, params: 1, frame: 13
var value3;
var guildMemberStoreBinding;
if (guildId != null) {
if (section?.botId != null) {
value3 = environment.__proto__;
guildMemberStoreBinding = GuildMemberStore;
return guildMemberStoreBinding.getMember(guildId, section.botId);
}
}
}
}
}
global.__d(_fun90966, 11863, [31, 27, 1945, 33, 4501, 697, 566, 11752, 1244, 5475, 4573,
2]) /* metro module 11863, dependencies: [31, 27, 1945, 33, 4501, 697, 566, 11752, 1244, 5475, 4573, 2] */;
@@ -1,34 +1,47 @@
/* Metro module 15230; source: modules/application_commands/native/ContextMenuCommandAppScreen.tsx; dependencies: [31, 33, 4501, 697, 5463, 7705, 15229, 8671, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsKeyboardAwareNative from '../../safe_area/useSafeAreaInsetsKeyboardAware.native.tsx'; /* Metro dependency 5463 */
import UseScaledRowHeight from '../../main_tabs_v2/native/shared_components/user_list/useScaledRowHeight.tsx'; /* Metro dependency 7705 */
import FastestListAndroid from '../../fastest_list/FastestList.android.tsx'; /* Metro dependency 8671 */
import ContextMenuCommandItem from './ContextMenuCommandItem.tsx'; /* Metro dependency 15229 */
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 CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun116514(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15427:6, offset: 0x0248c55d, size: 200 bytes, params: 8, frame: 21
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const env0_4 = Reflect.apply(createStyles, createStylesModule, [{list: {marginHorizontal: PX_16}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ContextMenuCommandAppScreen.tsx');
const createStyles = CreateStylesModule.createStyles;
const PX_16 = (Native).space.PX_16;
const env0_4 = Reflect.apply(createStyles, CreateStylesModule, [{list: {marginHorizontal: PX_16}}]);
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ContextMenuCommandAppScreen.tsx');
exports.default = ContextMenuCommandAppScreen;
function ContextMenuCommandAppScreen(a0) { // fn#116515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15427:301, offset: 0x0248c625, size: 255 bytes, params: 2, frame: 23
const {section, commands, onPressCommand} = a0.route.params;
const onPressCommand2 = onPressCommand;
const insets = (UseSafeAreaInsetsKeyboardAwareNative)({includeKeyboardHeight: true}).insets;
const value2 = (UseScaledRowHeight)();
const binding = onPressCommand2;
const value3 = binding.useMemo(function() {
return [commands.length];
}, [commands.length]);
const value4 = binding.useCallback(_fun116517, [commands, onPressCommand, section]);
const styles = useStyles();
return ((Component) => <Component style={styles.list} sections={value3} estimatedListSize="windowSize" itemSize={value2} insetEnd={insets.bottom} renderItem={value4} />)(FastestListAndroid);
function _fun116517(a0, a1) { // fn#116517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15427:515, offset: 0x0248c73a, size: 119 bytes, params: 3, frame: 20
const commandsBinding = commands;
const property = commandsBinding[a1];
return ((Component) => <Component item={property} onPress={onPress_116518} section={section} start={a1 === 0} end={a1 === commandsBinding.length - 1} key={property.id} />)(ContextMenuCommandItem);
function onPress_116518() { // fn#116518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15427:584, offset: 0x016f88b2, size: 23 bytes, params: 1, frame: 11
return onPressCommand(env0_0);
}
}
}
}
function ContextMenuCommandAppScreen(a0) { // fn#116515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15427:301, offset: 0x0248c625, size: 255 bytes, params: 2, frame: 23
const {section, commands, onPressCommand} = a0.route.params;
const env0_2 = onPressCommand;
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
const value2 = (importDefault(7705) /* metro dependency 7705: useScaledRowHeight */)();
const binding = env0_2;
const value3 = binding.useMemo(function() {
return [commands.length];
}, [commands.length]);
const value4 = binding.useCallback(_fun116517, [commands, onPressCommand, section]);
const styles = useStyles();
return ((Component) => <Component style={styles.list} sections={value3} estimatedListSize="windowSize" itemSize={value2} insetEnd={insets.bottom} renderItem={value4} />)(importDefault(8671) /* metro dependency 8671: FastestListAndroid */);
}
function _fun116517(a0, a1) { // fn#116517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15427:515, offset: 0x0248c73a, size: 119 bytes, params: 3, frame: 20
const commandsBinding = commands;
const property = commandsBinding[a1];
return ((Component) => <Component item={property} onPress={onPress_116518} section={section} start={a1 === 0} end={a1 === commandsBinding.length - 1} key={property.id} />)(importDefault(15229) /* metro dependency 15229: ContextMenuCommandItem */);
}
global.__d(_fun116514, 15230, [31, 33, 4501, 697, 5463, 7705, 15229, 8671,
2]) /* metro module 15230, dependencies: [31, 33, 4501, 697, 5463, 7705, 15229, 8671, 2] */;
@@ -1,131 +1,140 @@
/* Metro module 15229; source: modules/application_commands/native/ContextMenuCommandItem.tsx; dependencies: [31, 27, 33, 4501, 697, 6238, 22, 1244, 11752, 5475, 1909, 4058, 2] */
import Module00022 from '../../../by-id/module-00022.js'; /* Metro dependency 22 */
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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ServerModule from '../../../flow/Server.tsx'; /* Metro dependency 1909 */
import * as SendMessageIconModule from '../../../design/components/Icon/native/redesign/generated/SendMessageIcon.tsx'; /* Metro dependency 4058 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TableRowNativeModule from '../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as ApplicationCommandUtilsModule from './ApplicationCommandUtils.tsx'; /* Metro dependency 11752 */
function _fun116508(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15426:6, offset: 0x0248bfc8, size: 369 bytes, params: 8, frame: 22
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object5 = {'width': 32, 'height': 32};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object3.commandIcon = object5;
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {'width': 32, 'height': 32};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.commandIcon = object2;
let BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object3.loadingIcon = {backgroundColor: BACKGROUND_MOD_MUTED};
const object6 = {};
object.loadingIcon = {backgroundColor: BACKGROUND_MOD_MUTED};
const object4 = {};
BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object6.backgroundColor = BACKGROUND_MOD_MUTED;
object6.height = 24;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object3.loadingName = object6;
const env0_6 = Reflect.apply(createStyles, createStylesModule, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ContextMenuCommandItem.tsx');
object4.backgroundColor = BACKGROUND_MOD_MUTED;
object4.height = 24;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object.loadingName = object4;
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ContextMenuCommandItem.tsx');
exports.default = ContextMenuCommandItem;
exports.ContextMenuCommandLoadingItem = ContextMenuCommandLoadingItem;
exports.ContextMenuCommandEmptyItem = ContextMenuCommandEmptyItem;
exports.ContextMenuCommandAppItem = ContextMenuCommandAppItem;
}
function ContextMenuCommandItem({item, onPress, section, start, end}) { // fn#116509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15426:503, offset: 0x0248c139, size: 290 bytes, params: 2, frame: 24
const styles = useStyles();
const value3 = ReactModule.useMemo(_fun116510, [item, section?.name]);
const applicationCommandsIconSource = (ApplicationCommandUtilsModule).getApplicationCommandsIconSource(section);
const TableRow = (TableRowNativeModule).TableRow;
const displayName = item.displayName;
const r7 = applicationCommandsIconSource != null && ((Component) => <Component style={styles.commandIcon} source={applicationCommandsIconSource} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
const SendMessageIcon = (SendMessageIconModule).SendMessageIcon;
return (
<TableRow
accessibilityLabel={value3}
onPress={onPress}
label={displayName}
icon={r7}
trailing={<SendMessageIcon />}
start={start}
end={end}
/>
);
function _fun116510() { // fn#116510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15426:602, offset: 0x0248c25b, size: 193 bytes, params: 1, frame: 17
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const type = item.type;
const value3 = undefined;
const ApplicationCommandType = (ServerModule).ApplicationCommandType;
const MESSAGE = ApplicationCommandType.MESSAGE;
if (MESSAGE === type) {
return intl.formatToPlainString(t.Pk4Mz3, {applicationName: section == null ? value3 : section.name,
commandName: item.displayName});
}
const USER = ApplicationCommandType.USER;
if (USER === type) {
return intl.formatToPlainString(t.Pk4Mz3, {applicationName: section == null ? value3 : section.name,
commandName: item.displayName});
}
return value3;
}
function ContextMenuCommandItem({item, onPress, section, start, end}) { // fn#116509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15426:503, offset: 0x0248c139, size: 290 bytes, params: 2, frame: 24
const styles = useStyles();
const value3 = env0_3.useMemo(_fun116510, [item, section?.name]);
const applicationCommandsIconSource = (require(11752) /* metro dependency 11752: ApplicationCommandUtils */).getApplicationCommandsIconSource(section);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const displayName = item.displayName;
const r7 = applicationCommandsIconSource != null && ((Component) => <Component style={styles.commandIcon} source={applicationCommandsIconSource} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
const SendMessageIcon = (require(4058) /* metro dependency 4058: SendMessageIcon */).SendMessageIcon;
return (
<TableRow
accessibilityLabel={value3}
onPress={onPress}
label={displayName}
icon={r7}
trailing={<SendMessageIcon />}
start={start}
end={end}
/>
);
}
function ContextMenuCommandLoadingItem({start, end}) { // fn#116511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15426:1147, offset: 0x0248c31c, size: 219 bytes, params: 2, frame: 24
const styles = useStyles();
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const items2 = [styles.loadingName];
let value = importDefault(22) /* metro dependency 22 */;
value = value.random(60, 80);
items2[1] = {width: '' + value + '%'};
return (
<TableRow
label={<View style={items2} />}
icon={<View style={[styles.commandIcon, styles.loadingIcon]} />}
start={start}
end={end}
/>
);
}
function ContextMenuCommandEmptyItem({start, end}) { // fn#116512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15426:1406, offset: 0x0248c3f7, size: 171 bytes, params: 2, frame: 22
const styles = useStyles();
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const YSNlV2 = (require(1244) /* metro dependency 1244: indexNative */).t.YSNlV2;
return (
<TableRow
label={Reflect.apply(string, intl, [YSNlV2])}
icon={<View style={[styles.commandIcon, styles.loadingIcon]} />}
start={start}
end={end}
/>
);
}
function ContextMenuCommandAppItem({section, onPress, start, end}) { // fn#116513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15426:1634, offset: 0x0248c4a2, size: 187 bytes, params: 2, frame: 22
var r6;
var value;
const styles = useStyles();
const applicationCommandsIconSource = (require(11752) /* metro dependency 11752: ApplicationCommandUtils */).getApplicationCommandsIconSource(section);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const name = section.name;
const value3 = applicationCommandsIconSource != null;
if (value3) {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component style={styles.commandIcon} source={applicationCommandsIconSource} />)(value);
r6 = value;
} else {
r6 = value3;
}
return (
<TableRow
onPress={onPress}
label={name}
icon={r6}
start={start}
end={end}
arrow
/>
);
}
function _fun116510() { // fn#116510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15426:602, offset: 0x0248c25b, size: 193 bytes, params: 1, frame: 17
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const type = item.type;
const value3 = undefined;
const ApplicationCommandType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandType;
const MESSAGE = ApplicationCommandType.MESSAGE;
if (MESSAGE === type) {
return intl.formatToPlainString(t.Pk4Mz3, {applicationName: section == null ? value3 : section.name,
commandName: item.displayName});
function ContextMenuCommandLoadingItem({start, end}) { // fn#116511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15426:1147, offset: 0x0248c31c, size: 219 bytes, params: 2, frame: 24
const styles = useStyles();
const TableRow = (TableRowNativeModule).TableRow;
const items2 = [styles.loadingName];
let value = Module00022;
value = value.random(60, 80);
items2[1] = {width: '' + value + '%'};
return (
<TableRow
label={<View style={items2} />}
icon={<View style={[styles.commandIcon, styles.loadingIcon]} />}
start={start}
end={end}
/>
);
}
const USER = ApplicationCommandType.USER;
if (USER === type) {
return intl.formatToPlainString(t.Pk4Mz3, {applicationName: section == null ? value3 : section.name,
commandName: item.displayName});
function ContextMenuCommandEmptyItem({start, end}) { // fn#116512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15426:1406, offset: 0x0248c3f7, size: 171 bytes, params: 2, frame: 22
const styles = useStyles();
const TableRow = (TableRowNativeModule).TableRow;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const YSNlV2 = (IndexNativeModule).t.YSNlV2;
return (
<TableRow
label={Reflect.apply(string, intl, [YSNlV2])}
icon={<View style={[styles.commandIcon, styles.loadingIcon]} />}
start={start}
end={end}
/>
);
}
function ContextMenuCommandAppItem({section, onPress, start, end}) { // fn#116513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15426:1634, offset: 0x0248c4a2, size: 187 bytes, params: 2, frame: 22
var r6;
var value;
const styles = useStyles();
const applicationCommandsIconSource = (ApplicationCommandUtilsModule).getApplicationCommandsIconSource(section);
const TableRow = (TableRowNativeModule).TableRow;
const name = section.name;
const value3 = applicationCommandsIconSource != null;
if (value3) {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component style={styles.commandIcon} source={applicationCommandsIconSource} />)(value);
r6 = value;
} else {
r6 = value3;
}
return (
<TableRow
onPress={onPress}
label={name}
icon={r6}
start={start}
end={end}
arrow
/>
);
}
return value3;
}
global.__d(_fun116508, 15229, [31, 27, 33, 4501, 697, 6238, 22, 1244, 11752, 5475, 1909, 4058,
2]) /* metro module 15229, dependencies: [31, 27, 33, 4501, 697, 6238, 22, 1244, 11752, 5475, 1909, 4058, 2] */;
@@ -1,93 +1,118 @@
/* Metro module 15227; source: modules/application_commands/native/ContextMenuCommandNavigator.tsx; dependencies: [31, 27, 33, 9884, 4501, 697, 4884, 5280, 1585, 9603, 1244, 15228, 15230, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TTIAnalyticsUtilsModule from '../../tti_analytics/native/TTIAnalyticsUtils.tsx'; /* Metro dependency 4884 */
import * as NavigatorNativeModule from '../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as HeaderSharedModule from '../../main_tabs_v2/native/shared_components/HeaderShared.tsx'; /* Metro dependency 9603 */
import * as Module09884Module from '../../../by-id/module-09884.js'; /* Metro dependency 9884 */
function _fun116476(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15424:6, offset: 0x0248ae64, size: 293 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = (require(9884) /* metro dependency 9884 */).createNativeStackNavigator();
const env0_7 = (Module09884Module).createNativeStackNavigator();
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOWEST};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.content = {backgroundColor: BACKGROUND_BASE_LOWER};
const env0_8 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ContextMenuCommandNavigator.tsx');
object = {};
const BACKGROUND_BASE_LOWEST = (Native).colors.BACKGROUND_BASE_LOWEST;
object.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOWEST};
const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER;
object.content = {backgroundColor: BACKGROUND_BASE_LOWER};
const env0_8 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ContextMenuCommandNavigator.tsx');
exports.default = ContextMenuCommandNavigator;
}
function ContextMenuCommandNavigator() { // fn#116477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15424:461, offset: 0x0248af89, size: 351 bytes, params: 1, frame: 26
const styles = useStyles();
let binding = ReactModule;
binding.useLayoutEffect(_fun116478, []);
const env0_1 = (NavigatorNativeModule).useAccessibilityNativeStackOptions();
const {left, right} = (UseSafeAreaInsetsNative)();
const items2 = [styles.container];
items2[1] = {paddingLeft: left, paddingRight: right};
binding = env0_7;
const Navigator = binding.Navigator;
const object2 = {screenOptions: screenOptions_116479};
let Screen = binding.Screen;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const PHjkRE = (IndexNativeModule).t.PHjkRE;
const screen = (
<Screen
name="root"
options={{title: Reflect.apply(string, intl, [PHjkRE])}}
getComponent={function() {
return require(dependencyMap[11]).default;
}}
/>
);
Screen = binding.Screen;
return (
<View style={items2}>
<Navigator {...object2}>
{screen}
<Screen
name="app"
options={function({route}) {
route = route.params.section;
return {title: route?.name};
}}
getComponent={function() {
return require(dependencyMap[12]).default;
}}
/>
</Navigator>
</View>
);
function _fun116478() { // fn#116478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15424:529, offset: 0x0248b0e8, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (TTIAnalyticsUtilsModule).trackAppUIViewed();
}
function ContextMenuCommandNavigator() { // fn#116477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15424:461, offset: 0x0248af89, size: 351 bytes, params: 1, frame: 26
const styles = useStyles();
let binding = env0_3;
binding.useLayoutEffect(_fun116478, []);
const env0_1 = (require(5280) /* metro dependency 5280: NavigatorNative */).useAccessibilityNativeStackOptions();
const {left, right} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const items2 = [styles.container];
items2[1] = {paddingLeft: left, paddingRight: right};
binding = env0_7;
const Navigator = binding.Navigator;
const object = {screenOptions: screenOptions_116479};
let Screen = binding.Screen;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const PHjkRE = (require(1244) /* metro dependency 1244: indexNative */).t.PHjkRE;
const screen = <Screen name="root" options={{title: Reflect.apply(string, intl,
[PHjkRE])}} getComponent={function() {
return require(dependencyMap[11]).default;
}} />;
Screen = binding.Screen;
return (
<View style={items2}>
<Navigator {...object}>
{screen}
<Screen
name="app"
options={function({route}) {
route = route.params.section;
return {title: route?.name};
}}
getComponent={function() {
return require(dependencyMap[12]).default;
}}
/>
</Navigator>
</View>
);
}
function ContextMenuCommandNavigatorScreenOptions({navigation, route}) { // fn#116479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15424:748, owner: ContextMenuCommandNavigator.screenOptions, offset: 0x0248b10d, size: 192 bytes, params: 2, frame: 16
var r6;
var environment;
var r2;
var value2;
var value4;
const object = {};
object.contentStyle = styles.content;
object.headerShadowVisible = false;
object.headerTitle = headerTitle_116480;
object.headerTitleAlign = 'center';
const getState = navigation.getState;
if (Reflect.apply(getState, navigation, []).routes[0].key === route.key) {
value4 = environment.__proto__;
r2 = (require(9603) /* metro dependency 9603: HeaderShared */).getRenderModalCloseImage(navigation);
r6 = require;
} else {
value2 = environment.__proto__;
r2 = (require(9603) /* metro dependency 9603: HeaderShared */).getRenderModalBackImage(navigation);
}
object.headerLeft = r2;
copyDataProperties(object, env0_1, r6);
return object;
function screenOptionsHeaderTitle_116480(a0) { // fn#116480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15424:834, owner: ContextMenuCommandNavigator.screenOptions.headerTitle, offset: 0x0248b1cd, size: 87 bytes, params: 2, frame: 16
const children = a0.children;
const value = Object.create(null);
value.children = 0;
const value2 = copyDataProperties({}, a0, value, children);
const GenericHeaderTitle = (HeaderSharedModule).GenericHeaderTitle;
return <GenericHeaderTitle title={children} {...value2} />;
}
function _fun116478() { // fn#116478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15424:529, offset: 0x0248b0e8, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(4884) /* metro dependency 4884: TTIAnalyticsUtils */).trackAppUIViewed();
}
}
function ContextMenuCommandNavigatorScreenOptions({navigation, route}) { // fn#116479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15424:748, owner: ContextMenuCommandNavigator.screenOptions, offset: 0x0248b10d, size: 192 bytes, params: 2, frame: 16
var r6;
var environment;
var r2;
var value2;
var value4;
const object2 = {};
object2.contentStyle = styles.content;
object2.headerShadowVisible = false;
object2.headerTitle = headerTitle_116480;
object2.headerTitleAlign = 'center';
const getState = navigation.getState;
if (Reflect.apply(getState, navigation, []).routes[0].key === route.key) {
value4 = environment.__proto__;
r2 = (require(9603) /* metro dependency 9603: HeaderShared */).getRenderModalCloseImage(navigation);
r6 = require;
} else {
value2 = environment.__proto__;
r2 = (require(9603) /* metro dependency 9603: HeaderShared */).getRenderModalBackImage(navigation);
}
object2.headerLeft = r2;
copyDataProperties(object2, env0_1, r6);
return object2;
}
global.__d(_fun116476, 15227, [31, 27, 33, 9884, 4501, 697, 4884, 5280, 1585, 9603, 1244, 15228, 15230,
2]) /* metro module 15227, dependencies: [31, 27, 33, 9884, 4501, 697, 4884, 5280, 1585, 9603, 1244, 15228, 15230, 2] */;
@@ -1,14 +1,23 @@
/* Metro module 15228; source: modules/application_commands/native/ContextMenuCommandRootScreen.tsx; dependencies: [57, 31, 27, 1867, 5066, 33, 4501, 697, 566, 8060, 7869, 8050, 5463, 7705, 8518, 1244, 4573, 15229, 6984, 8671, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UseSafeAreaInsetsKeyboardAwareNative from '../../safe_area/useSafeAreaInsetsKeyboardAware.native.tsx'; /* Metro dependency 5463 */
import UseScaledRowHeight from '../../main_tabs_v2/native/shared_components/user_list/useScaledRowHeight.tsx'; /* Metro dependency 7705 */
import ExecuteCommand from '../executeCommand.tsx'; /* Metro dependency 8050 */
import FastestListAndroid from '../../fastest_list/FastestList.android.tsx'; /* Metro dependency 8671 */
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 TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ApplicationCommandConstantsModule from '../ApplicationCommandConstants.tsx'; /* Metro dependency 5066 */
import * as ApplicationCommandQueryApiModule from '../ApplicationCommandQueryApi.tsx'; /* Metro dependency 8060 */
import * as UseScaledTextLineHeightAndroidModule from '../../screen/native/useScaledTextLineHeight.android.tsx'; /* Metro dependency 8518 */
function _fun116484(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:6, offset: 0x0248b271, size: 384 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).View;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
let value = require(5066) /* metro dependency 5066: ApplicationCommandConstants */;
let value = ApplicationCommandConstantsModule;
const env0_8 = value.CONTEXT_MENU_COMMANDS_QUERY_LIMIT;
const env0_9 = value.BuiltInSectionId;
value = require(33) /* metro dependency 33 */;
@@ -16,317 +25,331 @@ function _fun116484(global, require, importDefault, importAll, module, exports,
const env0_11 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.container = {flex: 1, marginHorizontal: PX_16};
const object4 = {};
object.container = {flex: 1, marginHorizontal: PX_16};
const object3 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingTop = PX_16;
object3.paddingTop = PX_16;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.paddingBottom = PX_8;
object3.paddingBottom = PX_8;
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object4.backgroundColor = BACKGROUND_BASE_LOWER;
object2.sectionHeader = object4;
const env0_12 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ContextMenuCommandRootScreen.tsx');
object3.backgroundColor = BACKGROUND_BASE_LOWER;
object.sectionHeader = object3;
const env0_12 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ContextMenuCommandRootScreen.tsx');
exports.default = ContextMenuCommandRootScreen;
}
function ContextMenuCommandRootScreen(a0) { // fn#116485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:568, offset: 0x0248b3f1, size: 1323 bytes, params: 2, frame: 32
var object10;
var object2;
var object3;
var SearchField;
var object8;
var intl;
const navigation = a0.navigation;
const {channel, commandType, commandTargetId, onPressAppCommand, onClose} = a0.route.params;
const env0_4 = onClose;
const value = undefined;
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(channel.guild_id);
});
const env0_5 = guild;
let binding = env0_5;
const env0_6 = binding.useRef(false);
const value4 = env0_4(binding.useState(''), 2);
const value5 = 0;
const property = value4[value5];
const property2 = value4[1];
const value6 = property !== '';
binding.useEffect(function() {
return navigation.addListener('beforeRemove', _fun116488);
}, [navigation, onClose]);
const applicationCommandQueryApiModule = importAll(8060) /* metro dependency 8060: ApplicationCommandQueryApi */;
const useDiscovery = applicationCommandQueryApiModule.useDiscovery;
object10 = {context: {channel: channel, type: 'channel'}};
object10.filters = {text: value6 ? property : value, commandTypes: [commandType]};
const object9 = {};
object9.limit = CONTEXT_MENU_COMMANDS_QUERY_LIMIT;
object9.includeFrecency = !value6;
const COMMAND_OR_APPLICATION = value6 ? (require(7869) /* metro dependency 7869: ApplicationCommandQueryTypes */).ScoreMethod.COMMAND_OR_APPLICATION : value;
object9.scoreMethod = COMMAND_OR_APPLICATION;
object10.options = object9;
object10.allowFetch = true;
const {commands, commandsByActiveSection, sectionDescriptors, loading} = Reflect.apply(useDiscovery,
applicationCommandQueryApiModule, [object10]);
binding = env0_5;
const useMemo = binding.useMemo;
const sections = Reflect.apply(useMemo, binding, [function() {
sectionDescriptors.forEach(_fun116490);
return {sections: {}};
}, [sectionDescriptors]]).sections;
const value8 = binding.useCallback(_fun116491, [channel, commandTargetId, guild, navigation, onPressAppCommand]);
const value9 = binding.useCallback(_fun116492, [commandsByActiveSection, navigation, value8]);
const value10 = binding.useMemo(_fun116494, [loading, commands.length, commandsByActiveSection]);
const frecencyItems = value10.frecencyItems;
const value11 = binding.useMemo(_fun116499, [loading, commands, value6, frecencyItems, value10.appItems]);
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
const value12 = (importDefault(7705) /* metro dependency 7705: useScaledRowHeight */)();
const value13 = binding.useMemo(_fun116501, [value11]);
const styles = useStyles();
const value14 = (require(8518) /* metro dependency 8518: useScaledTextLineHeightAndroid */).useScaledTextLineHeight('text-sm/semibold');
const value15 = binding.useCallback(_fun116503, [loading, commands.length, value6, frecencyItems.length,
styles.sectionHeader]);
const value16 = binding.useCallback(_fun116504, [value11, value8, value9, sections]);
const value17 = binding.useMemo(_fun116507, [loading, commands.length, value6, value14,
styles.sectionHeader.paddingTop, styles.sectionHeader.paddingBottom]);
let r6 = value6 || !loading && commands.length > value5;
if (r6) {
object2 = {};
object3 = {};
object3.marginBottom = value6 ? (importDefault(697) /* metro dependency 697: native */).space.PX_16 : value5;
object2.style = object3;
SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
object8 = {size: 'md', onChange: property2};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object8.placeholder = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.m1UwbP);
r6 = <View {...object2}><SearchField {...object8} /></View>;
}
return (
<View style={styles.container}>
{r6}
{((Component) => <Component sections={value13} estimatedListSize="windowSize" itemSize={value12} insetEnd={insets.bottom} renderItem={value16} renderSectionHeader={value15} sectionHeaderSize={value17} />)(importDefault(8671) /* metro dependency 8671: FastestListAndroid */)}
</View>
);
}
function _fun116487() { // fn#116487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:855, offset: 0x0248b93c, size: 34 bytes, params: 1, frame: 13
return navigation.addListener('beforeRemove', _fun116488);
}
function _fun116489() { // fn#116489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:1242, offset: 0x0248b988, size: 41 bytes, params: 1, frame: 12
sectionDescriptors.forEach(_fun116490);
return {sections: {}};
}
function _fun116491(a0) { // fn#116491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:1337, offset: 0x0248b9b1, size: 147 bytes, params: 2, frame: 15
if (onPressAppCommand != null) {
onPressAppCommand();
}
env0_6.current = true;
(importDefault(8050) /* metro dependency 8050: executeCommand */)({command: a0, optionValues: {},
context: {channel: channel, guild: guild}, commandTargetId: commandTargetId});
(navigation.getParent() ?? navigation).goBack();
}
function _fun116492(a0) { // fn#116492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:1528, offset: 0x0248ba44, size: 103 bytes, params: 2, frame: 16
const env0_0 = a0;
const value2 = commandsByActiveSection.find(_fun116493);
const value3 = undefined;
const r5 = (value2 == null ? value3 : value2.data) ?? [];
const navigationBinding = navigation;
navigationBinding.navigate('app', {section: a0, commands: r5, onPressCommand: env0_13});
return value3;
}
function _fun116494() { // fn#116494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:1696, offset: 0x0248baab, size: 167 bytes, params: 1, frame: 16
var r2;
var object2;
var value;
if (loading) {
object2 = {frecencyItems: [], appItems: []};
} else {
if (commands.length === 0) {
return {frecencyItems: [], appItems: []};
function ContextMenuCommandRootScreen(a0) { // fn#116485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:568, offset: 0x0248b3f1, size: 1323 bytes, params: 2, frame: 32
var object7;
var object;
var object4;
var SearchField;
var object5;
var intl;
const navigation = a0.navigation;
const {channel, commandType, commandTargetId, onPressAppCommand, onClose} = a0.route.params;
const onClose2 = onClose;
const value = undefined;
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(channel.guild_id);
});
const guild2 = guild;
let binding = guild2;
const env0_6 = binding.useRef(false);
const value4 = onClose2(binding.useState(''), 2);
const value5 = 0;
const property = value4[value5];
const property2 = value4[1];
const value6 = property !== '';
binding.useEffect(function() {
return navigation.addListener('beforeRemove', _fun116488);
}, [navigation, onClose]);
const useDiscovery = ApplicationCommandQueryApiModule.useDiscovery;
object7 = {context: {channel: channel, type: 'channel'}};
object7.filters = {text: value6 ? property : value, commandTypes: [commandType]};
const object6 = {};
object6.limit = CONTEXT_MENU_COMMANDS_QUERY_LIMIT;
object6.includeFrecency = !value6;
const COMMAND_OR_APPLICATION = value6 ? (require(7869) /* metro dependency 7869: ApplicationCommandQueryTypes */).ScoreMethod.COMMAND_OR_APPLICATION : value;
object6.scoreMethod = COMMAND_OR_APPLICATION;
object7.options = object6;
object7.allowFetch = true;
const {commands, commandsByActiveSection, sectionDescriptors, loading} = Reflect.apply(useDiscovery,
ApplicationCommandQueryApiModule, [object7]);
binding = guild2;
const useMemo = binding.useMemo;
const sections = Reflect.apply(useMemo, binding, [function() {
sectionDescriptors.forEach(_fun116490);
return {sections: {}};
}, [sectionDescriptors]]).sections;
const value8 = binding.useCallback(_fun116491, [channel, commandTargetId, guild, navigation, onPressAppCommand]);
const value9 = binding.useCallback(_fun116492, [commandsByActiveSection, navigation, value8]);
const value10 = binding.useMemo(_fun116494, [loading, commands.length, commandsByActiveSection]);
const frecencyItems = value10.frecencyItems;
const value11 = binding.useMemo(_fun116499, [loading, commands, value6, frecencyItems, value10.appItems]);
const insets = (UseSafeAreaInsetsKeyboardAwareNative)({includeKeyboardHeight: true}).insets;
const value12 = (UseScaledRowHeight)();
const value13 = binding.useMemo(_fun116501, [value11]);
const styles = useStyles();
const value14 = (UseScaledTextLineHeightAndroidModule).useScaledTextLineHeight('text-sm/semibold');
const value15 = binding.useCallback(_fun116503, [loading, commands.length, value6, frecencyItems.length,
styles.sectionHeader]);
const value16 = binding.useCallback(_fun116504, [value11, value8, value9, sections]);
const value17 = binding.useMemo(_fun116507, [loading, commands.length, value6, value14,
styles.sectionHeader.paddingTop, styles.sectionHeader.paddingBottom]);
let r6 = value6 || !loading && commands.length > value5;
if (r6) {
object = {};
object4 = {};
object4.marginBottom = value6 ? (importDefault(697) /* metro dependency 697: native */).space.PX_16 : value5;
object.style = object4;
SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
object5 = {size: 'md', onChange: property2};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object5.placeholder = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.m1UwbP);
r6 = (
<View {...object}>
<SearchField {...object5} />
</View>
);
}
var value2 = commandsByActiveSection.find(function(a0) {
return a0.section.id === BuiltInSectionId.FRECENCY;
});
value = commandsByActiveSection.filter(function(a0) {
return a0.section.id !== BuiltInSectionId.FRECENCY;
});
object2 = {};
r2 = value2 == null ? undefined : value2.data.map(function(a0) {
return {type: 'command', command: a0};
});
r2 = r2 ?? [];
object2.frecencyItems = r2;
object2.appItems = value.map(function({section}) {
return {type: 'app', section: section};
});
}
return object2;
}
return (
<View style={styles.container}>
{r6}
{((Component) => <Component sections={value13} estimatedListSize="windowSize" itemSize={value12} insetEnd={insets.bottom} renderItem={value16} renderSectionHeader={value15} sectionHeaderSize={value17} />)(FastestListAndroid)}
</View>
);
function _fun116487() { // fn#116487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:855, offset: 0x0248b93c, size: 34 bytes, params: 1, frame: 13
return navigation.addListener('beforeRemove', _fun116488);
function _fun116488() { // fn#116488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:889, offset: 0x0248b95e, size: 42 bytes, params: 1, frame: 11
if (!(env1_6.current || onClose == null)) {
onClose();
}
}
function _fun116499() { // fn#116499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:2077, offset: 0x0248bbc2, size: 186 bytes, params: 1, frame: 13
var object;
if (loading) {
object = {type: 'placeholder'};
object = [[object]];
} else {
var length = commands.length;
if (length === 0) {
object = {type: 'no_commands'};
object = [[object]];
}
function _fun116489() { // fn#116489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:1242, offset: 0x0248b988, size: 41 bytes, params: 1, frame: 12
sectionDescriptors.forEach(_fun116490);
return {sections: {}};
function _fun116490(a0) { // fn#116490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:1274, offset: 0x0115ee18, size: 23 bytes, params: 2, frame: 3
env0_0[a0.id] = a0;
}
}
function _fun116491(a0) { // fn#116491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:1337, offset: 0x0248b9b1, size: 147 bytes, params: 2, frame: 15
if (onPressAppCommand != null) {
onPressAppCommand();
}
env0_6.current = true;
(ExecuteCommand)({command: a0, optionValues: {},
context: {channel: channel, guild: guild}, commandTargetId: commandTargetId});
(navigation.getParent() ?? navigation).goBack();
}
function _fun116492(a0) { // fn#116492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:1528, offset: 0x0248ba44, size: 103 bytes, params: 2, frame: 16
const env0_0 = a0;
const value2 = commandsByActiveSection.find(_fun116493);
const value3 = undefined;
const r5 = (value2 == null ? value3 : value2.data) ?? [];
const navigationBinding = navigation;
navigationBinding.navigate('app', {section: a0, commands: r5, onPressCommand: env0_13});
return value3;
function _fun116493({section}) { // fn#116493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:1568, offset: 0x0204d7c8, size: 32 bytes, params: 2, frame: 2
return section.id === env0_0.id;
}
}
function _fun116494() { // fn#116494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:1696, offset: 0x0248baab, size: 167 bytes, params: 1, frame: 16
var r2;
var object;
var value;
if (loading) {
object = {frecencyItems: [], appItems: []};
} else {
if (commands.length === 0) {
return {frecencyItems: [], appItems: []};
}
var value2 = commandsByActiveSection.find(function(a0) {
return a0.section.id === BuiltInSectionId.FRECENCY;
});
value = commandsByActiveSection.filter(function(a0) {
return a0.section.id !== BuiltInSectionId.FRECENCY;
});
object = {};
r2 = value2 == null ? undefined : value2.data.map(function(a0) {
return {type: 'command', command: a0};
});
r2 = r2 ?? [];
object.frecencyItems = r2;
object.appItems = value.map(function({section}) {
return {type: 'app', section: section};
});
}
return object;
}
if (result) {
return [commands.map(function(a0) {
return {type: 'command', command: a0};
})];
function _fun116499() { // fn#116499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:2077, offset: 0x0248bbc2, size: 186 bytes, params: 1, frame: 13
var object;
if (loading) {
object = {type: 'placeholder'};
object = [[object]];
} else {
var length = commands.length;
if (length === 0) {
object = {type: 'no_commands'};
object = [[object]];
return object;
}
if (result) {
return [commands.map(function(a0) {
return {type: 'command', command: a0};
})];
}
object = [];
length = frecencyItems.length;
if (length > 0) {
object.push(frecencyItems);
}
length = appItems.length;
if (length > 0) {
object.push(appItems);
}
}
return object;
}
object = [];
length = frecencyItems.length;
if (length > 0) {
object.push(frecencyItems);
function _fun116501() { // fn#116501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:2368, offset: 0x0248bc7c, size: 28 bytes, params: 1, frame: 11
return env0_17.map(function(a0) {
return a0.length;
});
}
length = appItems.length;
if (length > 0) {
object.push(appItems);
function _fun116503(a0) { // fn#116503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:2481, offset: 0x0248bc98, size: 269 bytes, params: 2, frame: 17
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
if (loading) {
return null;
}
if (commands.length === 0) {
return null;
}
if (result) {
return null;
}
const r4 = a0 !== 0 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PHjkRE) : frecencyItems.length > 0 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.V0w2ap) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PHjkRE);
const Text = (TextModule).Text;
return (
<Text
variant={env0_19}
color="text-default"
style={styles.sectionHeader}
>
{r4}
</Text>
);
}
function _fun116504(a0, a1) { // fn#116504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:2773, offset: 0x0248bda5, size: 405 bytes, params: 3, frame: 22
var environment;
var ContextMenuCommandAppItem;
var object;
var section;
var value4;
var ContextMenuCommandItem;
var command;
var sectionsBinding;
const property = env0_17[a0][a1];
const value2 = a1 === 0;
const value3 = a1 === env0_17[a0].length - 1;
const type = property.type;
if (type === 'placeholder') {
value = environment.__proto__;
const ContextMenuCommandLoadingItem = (require(15229) /* metro dependency 15229: ContextMenuCommandItem */).ContextMenuCommandLoadingItem;
return (
<ContextMenuCommandLoadingItem
start={value2}
end={value3}
key="placeholder"
/>
);
}
if (type === 'no_commands') {
value = environment.__proto__;
const ContextMenuCommandEmptyItem = (require(15229) /* metro dependency 15229: ContextMenuCommandItem */).ContextMenuCommandEmptyItem;
return (
<ContextMenuCommandEmptyItem
start={value2}
end={value3}
key="no_commands"
/>
);
}
if (type === 'command') {
value4 = environment.__proto__;
ContextMenuCommandItem = importDefault(15229) /* metro dependency 15229: ContextMenuCommandItem */;
object = {};
command = property.command;
object.item = command;
object.onPress = onPress_116505;
sectionsBinding = sections;
command = property.command;
object.section = sectionsBinding[command.applicationId];
object.start = value2;
object.end = value3;
command = property.command;
return <ContextMenuCommandItem {...object} key={command.id} />;
}
if (type === 'app') {
value = environment.__proto__;
ContextMenuCommandAppItem = (require(15229) /* metro dependency 15229: ContextMenuCommandItem */).ContextMenuCommandAppItem;
object = {};
section = property.section;
object.section = section;
object.onPress = onPress_116506;
object.start = value2;
object.end = value3;
section = property.section;
return <ContextMenuCommandAppItem {...object} key={section.id} />;
}
function onPress_116505() { // fn#116505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:3086, offset: 0x0248bf3a, size: 29 bytes, params: 1, frame: 11
return env1_13(env0_0.command);
}
function onPress_116506() { // fn#116506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:3248, offset: 0x0248bf57, size: 29 bytes, params: 1, frame: 11
return env1_14(env0_0.section);
}
}
function _fun116507() { // fn#116507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:3321, offset: 0x0248bf74, size: 84 bytes, params: 1, frame: 4
var r0;
var binding;
var sectionHeader;
var value3;
const loadingBinding = loading;
const value2 = 0;
if (loadingBinding) {
r0 = value2;
} else if (value2 === commands.length) {
r0 = value2;
} else if (result) {
r0 = value2;
} else {
binding = env0_20;
sectionHeader = styles.sectionHeader;
value3 = binding + sectionHeader.paddingTop;
sectionHeader = styles.sectionHeader;
r0 = value3 + sectionHeader.paddingBottom;
}
return r0;
}
}
return object;
}
function _fun116501() { // fn#116501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:2368, offset: 0x0248bc7c, size: 28 bytes, params: 1, frame: 11
return env0_17.map(function(a0) {
return a0.length;
});
}
function _fun116503(a0) { // fn#116503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:2481, offset: 0x0248bc98, size: 269 bytes, params: 2, frame: 17
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
if (loading) {
return null;
}
if (commands.length === 0) {
return null;
}
if (result) {
return null;
}
const r4 = a0 !== 0 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PHjkRE) : frecencyItems.length > 0 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.V0w2ap) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PHjkRE);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant={env0_19}
color="text-default"
style={styles.sectionHeader}
>
{r4}
</Text>
);
}
function _fun116504(a0, a1) { // fn#116504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:2773, offset: 0x0248bda5, size: 405 bytes, params: 3, frame: 22
var environment;
var ContextMenuCommandAppItem;
var object2;
var section;
var value4;
var ContextMenuCommandItem;
var command;
var sectionsBinding;
const property = env0_17[a0][a1];
const value2 = a1 === 0;
const value3 = a1 === env0_17[a0].length - 1;
const type = property.type;
if (type === 'placeholder') {
value = environment.__proto__;
const ContextMenuCommandLoadingItem = (require(15229) /* metro dependency 15229: ContextMenuCommandItem */).ContextMenuCommandLoadingItem;
return (
<ContextMenuCommandLoadingItem
start={value2}
end={value3}
key="placeholder"
/>
);
}
if (type === 'no_commands') {
value = environment.__proto__;
const ContextMenuCommandEmptyItem = (require(15229) /* metro dependency 15229: ContextMenuCommandItem */).ContextMenuCommandEmptyItem;
return (
<ContextMenuCommandEmptyItem
start={value2}
end={value3}
key="no_commands"
/>
);
}
if (type === 'command') {
value4 = environment.__proto__;
ContextMenuCommandItem = importDefault(15229) /* metro dependency 15229: ContextMenuCommandItem */;
object2 = {};
command = property.command;
object2.item = command;
object2.onPress = onPress_116505;
sectionsBinding = sections;
command = property.command;
object2.section = sectionsBinding[command.applicationId];
object2.start = value2;
object2.end = value3;
command = property.command;
return <ContextMenuCommandItem {...object2} key={command.id} />;
}
if (type === 'app') {
value = environment.__proto__;
ContextMenuCommandAppItem = (require(15229) /* metro dependency 15229: ContextMenuCommandItem */).ContextMenuCommandAppItem;
object2 = {};
section = property.section;
object2.section = section;
object2.onPress = onPress_116506;
object2.start = value2;
object2.end = value3;
section = property.section;
return <ContextMenuCommandAppItem {...object2} key={section.id} />;
}
}
function _fun116507() { // fn#116507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:3321, offset: 0x0248bf74, size: 84 bytes, params: 1, frame: 4
var r0;
var binding;
var sectionHeader;
var value3;
const loadingBinding = loading;
const value2 = 0;
if (loadingBinding) {
r0 = value2;
} else if (value2 === commands.length) {
r0 = value2;
} else if (result) {
r0 = value2;
} else {
binding = env0_20;
sectionHeader = styles.sectionHeader;
value3 = binding + sectionHeader.paddingTop;
sectionHeader = styles.sectionHeader;
r0 = value3 + sectionHeader.paddingBottom;
}
return r0;
}
function _fun116488() { // fn#116488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:889, offset: 0x0248b95e, size: 42 bytes, params: 1, frame: 11
if (!(env1_6.current || onClose == null)) {
onClose();
}
}
function onPress_116505() { // fn#116505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:3086, offset: 0x0248bf3a, size: 29 bytes, params: 1, frame: 11
return env1_13(env0_0.command);
}
function onPress_116506() { // fn#116506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:3248, offset: 0x0248bf57, size: 29 bytes, params: 1, frame: 11
return env1_14(env0_0.section);
}
global.__d(_fun116484, 15228, [57, 31, 27, 1867, 5066, 33, 4501, 697, 566, 8060, 7869, 8050, 5463, 7705, 8518, 1244,
4573, 15229, 6984, 8671,
2]) /* metro module 15228, dependencies: [57, 31, 27, 1867, 5066, 33, 4501, 697, 566, 8060, 7869, 8050, 5463, 7705, 8518, 1244, 4573, 15229, 6984, 8671, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,17 +1,20 @@
/* Metro module 9900; source: modules/application_commands/native/showExecutedApplicationCommandPopout.tsx; dependencies: [4080, 9901, 1962, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun77584(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10086:6, offset: 0x01e02018, size: 103 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/application_commands/native/showExecutedApplicationCommandPopout.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/showExecutedApplicationCommandPopout.tsx');
exports.default = showExecutedApplicationCommandPopout;
function showExecutedApplicationCommandPopout(a0) { // fn#77585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10086:212, offset: 0x01e0207f, size: 105 bytes, params: 2, frame: 18
const defaultImport = importDefault(dependencyMap[0]);
const openLazy = defaultImport.openLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'ExecutedCommandPopout:' + a0.messageId, a0]);
}
}
function showExecutedApplicationCommandPopout(a0) { // fn#77585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10086:212, offset: 0x01e0207f, size: 105 bytes, params: 2, frame: 18
const defaultImport = importDefault(dependencyMap[0]);
const openLazy = defaultImport.openLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'ExecutedCommandPopout:' + a0.messageId, a0]);
}
global.__d(_fun77584, 9900, [4080, 9901, 1962, 2]) /* metro module 9900, dependencies: [4080, 9901, 1962, 2] */;