/* Metro module 11885; source: modules/application_commands/native/ApplicationCommandManager.tsx; dependencies: [57, 6, 7, 4645, 7168, 661, 6625, 1580, 11858, 7166, 5065, 8060, 5068, 8051, 11857, 1909, 11573, 4100, 22, 11695, 11647, 4081, 4863, 11017, 7879, 4022, 1583, 11693, 2] */ import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */ import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */ import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */ import RegexUtils from '../../../utils/RegexUtils.tsx'; /* Metro dependency 4100 */ import ApplicationCommandStore from '../ApplicationCommandStore.tsx'; /* Metro dependency 7168 */ import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as moduleValue32 from '../../../by-id/module-00022.js'; /* Metro dependency 22 */ import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */ import * as MediaKeyboardConstantsModule from '../../media_keyboard/native/MediaKeyboardConstants.tsx'; /* Metro dependency 1580 */ import * as KeyboardTypesModule from '../../keyboard/native/KeyboardTypes.tsx'; /* Metro dependency 1583 */ import * as ServerModule from '../../../flow/Server.tsx'; /* Metro dependency 1909 */ import * as DraftStoreModule from '../../../stores/DraftStore.tsx'; /* Metro dependency 4645 */ import * as ApplicationCommandUtilsModule from '../ApplicationCommandUtils.tsx'; /* Metro dependency 5065 */ import * as ApplicationCommandTypesModule from '../ApplicationCommandTypes.tsx'; /* Metro dependency 5068 */ import * as ChannelAutocompleteConstantsModule from '../../channel_autocomplete/ChannelAutocompleteConstants.tsx'; /* Metro dependency 6625 */ import * as ApplicationCommandActionCreatorsModule from '../ApplicationCommandActionCreators.tsx'; /* Metro dependency 7166 */ import * as ApplicationCommandQueryApiModule from '../ApplicationCommandQueryApi.tsx'; /* Metro dependency 8060 */ import * as ChatInputCommandOptionParserModule from '../../chat_input/native/ChatInputCommandOptionParser.tsx'; /* Metro dependency 11857 */ import * as ChatInputParserModule from '../../chat_input/native/ChatInputParser.tsx'; /* Metro dependency 11858 */ function _fun91179(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:6, offset: 0x02054cab, size: 352 bytes, params: 8, frame: 19 let env0_0 = require; const _arrayLikeToArray_91182 = function(a0, a1) { var r0; var r1; var r2; var value3; var length; var value5; var value = undefined; var value2 = value == null; reducibleJoin2: while (true) { if (value2) { r0 = value2; break reducibleJoin2; } value3 = value > a0.length; r0 = value3; break reducibleJoin2; } reducibleJoin4: while (true) { if (r0) { length = a0.length; r1 = length; break reducibleJoin4; } r1 = value; break reducibleJoin4; } value = (0, global.Array)(r1); var value4 = 0; if (value4 < r1) { r2 = value4; reducibleLoop5: while (true) { value[r2] = a0[r2]; value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1; if (value5 < r1) { r2 = value5; continue reducibleLoop5; } break reducibleLoop5; } } return value; }; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ConstantsModule; const env0_9 = value.AnalyticEvents; const env0_10 = value.AutoCompleteResultTypes; const env0_11 = value.WHITESPACE_RE; const getNextOption = function(a0, a1, a2) { var r2; var env0_0 = a1; var env0_1 = a2; var property = a0.options; var value = null; r2 = value == property ? undefined : property.filter(_fun91184); return value != r2 && r2.length > 0 ? r2[0] : value; }; object = {FULL_COMMAND: 0}; object[0] = 'FULL_COMMAND'; object.PARTIAL_COMMAND = 1; object[1] = 'PARTIAL_COMMAND'; value = _fun91185(); (FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ApplicationCommandManager.tsx'); exports.default = value; function _createForOfIteratorHelperLoose_91180(a0, a1) { // fn#91180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:301, offset: 0x02054e0b, 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)) { if (r1) { } return _fun91181; } value = undefined; if (a0) { if (typeof a0 === 'string') { value = _arrayLikeToArray_91182(a0, value); r5 = value; } else { value3 = ({}).toString.call(a0).slice(8, -1); r6 = value3 === 'Object' && a0.constructor; r9 = r6 ? a0.constructor.name : value3; if (r9 === 'Map') { r6 = global.Array.from(a0); } else if (r9 === 'Set') { r6 = global.Array.from(a0); } else if (r9 === 'Arguments') { value = _arrayLikeToArray_91182(a0, value); r6 = value; } else { regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', ''); if (regexp.test(r9)) { value = _arrayLikeToArray_91182(a0, value); r6 = value; } else { r6 = value; } } r5 = r6; } } else { r5 = value; } if (r5) { if (r5) { } return _fun91181; } 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 _fun91181() { // fn#91181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:872, 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]}; } } function getNextOption({options}, a1, a2) { // fn#91183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:1229, offset: 0x02054f7f, size: 83 bytes, params: 4, frame: 13 const env0_0 = a1; const env0_1 = a2; const r2 = options?.filter(_fun91184); return r2 != null && r2.length > 0 ? r2[0] : null; function _fun91184(a0) { // fn#91184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:1284, offset: 0x02054fd2, size: 49 bytes, params: 2, frame: 12 return (a0.required || importDefault) && !require.has(a0.name); } } function _fun91185() { // fn#91185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:1468, offset: 0x02055003, size: 115 bytes, params: 1, frame: 15 return CreateClass(ApplicationCommandManager, [{key: 'setPreferredOptionValue', value: function(a0, a1, a2) { if (this.preferredOptionValues[a0] == null) { this.preferredOptionValues[a0] = {}; } this.preferredOptionValues[a0][a1] = a2; }}, {key: 'mergePropsAndUpdate', value: value_91230}, {key: 'updateValidationResults', value: value_91236}]); function ApplicationCommandManager({props, ref, optionValueParser, styles}) { // fn#91186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:1489, offset: 0x02055076, size: 406 bytes, params: 2, frame: 17 var environment; let value = environment.__proto__; env1_5(this, ApplicationCommandManager); this.chatInputNodes = []; let Map = global.Map; const value3 = Object.create(Map.prototype, {constructor: {value: Map}}); let map = new Map(); this.optionsToNodes = map instanceof Object ? map : value3; Map = global.Map; const value5 = Object.create(Map.prototype, {constructor: {value: Map}}); map = new Map(); this.optionValueNodes = map instanceof Object ? map : value5; value = importDefault(11858) /* metro dependency 11858: ChatInputParser */; value = new value(); this.parser = value; this.optionValues = {}; this.optionValidationResults = {}; this.canAutoInsertFirstOption = true; this.preferredOptionValues = {}; this.setAutoCompleteResult = setAutoCompleteResult; this.setCommand = setCommand; this.setPartialCommand = setPartialCommand; this.setPastedCommand = setPastedCommand; this.updateApplicationCommandManagerState = updateApplicationCommandManagerState; this.addCommandOptionParserRules = addCommandOptionParserRules; this.getCurrentCommand = getCurrentCommand; this.getCurrentOption = getCurrentOption; this.getAllCommandOptionValues = getAllCommandOptionValues; this.insertFirstOptionIfValid = insertFirstOptionIfValid; this.insertOrJumpCommandOption = insertOrJumpCommandOption; this.sendCommand = sendCommand; this.props = props; this.ref = ref; this.optionValueParser = optionValueParser; this.styles = styles; this.addCommandOptionParserRules(); function setAutoCompleteResult(a0, a1, a2, a3) { // fn#91187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:1822, owner: ApplicationCommandManager.setAutoCompleteResult, offset: 0x0205520c, size: 351 bytes, params: 5, frame: 19 var type; const activeCommand = env0_0.props.activeCommand; const activeOption = ApplicationCommandStore.getActiveOption(a0); if (a2) { if (activeCommand == null) { if (a3.type !== AutoCompleteResultTypes.SLASH) { return false; } env0_0.setCommand({channelId: a0, command: a3.command, section: a3.section, location: a3.location, visualSection: a3.visualSection, query: a3.query, addSpace: true}); return true; } if (activeOption != null) { type = a3.type; env0_0.insertOrJumpCommandOption(activeOption, undefined, false, {displayText: a1, preferred: true, value: AutoCompleteResultTypes.USER === type ? {type: 'userMention', userId: a3.user.id} : AutoCompleteResultTypes.ROLE === type ? {type: 'roleMention', roleId: a3.id} : AutoCompleteResultTypes.CHANNEL !== type ? undefined : {type: 'channelMention', channelId: a3.channel.id}}); return true; } type = a3.type; if (type !== AutoCompleteResultTypes.SLASH) { return false; } env0_0.setCommand({channelId: a0, command: a3.command, section: a3.section, location: a3.location, visualSection: a3.visualSection, query: a3.query, addSpace: true}); } else { if (a3.type !== AutoCompleteResultTypes.SLASH) { return false; } env0_0.setCommand({channelId: a0, command: a3.command, section: a3.section, location: a3.location, visualSection: a3.visualSection, query: a3.query, addSpace: true}); } return true; } function setCommand({channelId, command, section, location, visualSection, query, addSpace, commandText}) { // fn#91188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:2392, owner: ApplicationCommandManager.setCommand, offset: 0x0205536b, size: 343 bytes, params: 2, frame: 25 var r15; var r4; var value2; var displayName; var value3; var binding; var updateApplicationCommandManagerState; var object; const current = env0_0.ref.current; const setText = current.setText; if (commandText != null) { r4 = commandText; } else { value2 = environment.__proto__.__proto__; displayName = command.displayName; value3 = ''; r4 = value3 + COMMAND_SENTINEL + displayName + (addSpace ? ' ' : value3); r15 = COMMAND_SENTINEL; } Reflect.apply(setText, current, [r4]); const setActiveCommand = ApplicationCommandActionCreatorsModule.setActiveCommand; const object2 = {channelId: channelId, command: command, section: section, location: location}; object2.triggerSection = (require(5065) /* metro dependency 5065: ApplicationCommandUtils */).getCommandTriggerSection(visualSection); object2.queryLength = query?.length; Reflect.apply(setActiveCommand, ApplicationCommandActionCreatorsModule, [object2]); if (command.id !== (env0_0 == null || env0_0.preferredCommand == null ? undefined : env0_0.preferredCommand.id)) { if (env0_0 != null) { binding = env0_0; updateApplicationCommandManagerState = binding.updateApplicationCommandManagerState; object = {}; copyDataProperties(object, command, r15); object['preferredCommandType'] = env2_15.FULL_COMMAND; Reflect.apply(updateApplicationCommandManagerState, binding, [{preferredCommand: object}]); } } } function setPartialCommand(a0, a1, a2) { // fn#91189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:2936, owner: ApplicationCommandManager.setPartialCommand, offset: 0x020554c2, size: 153 bytes, params: 4, frame: 19 const binding = env0_0; binding.ref.current.setText('' + COMMAND_SENTINEL + a1); const preferredCommand = binding.preferredCommand; const value3 = undefined; if (a0 !== (preferredCommand == null ? value3 : preferredCommand.id)) { env0_0.updateApplicationCommandManagerState({preferredCommand: {id: a0, untranslatedName: a1, displayName: a1, preferredCommandType: env2_15.PARTIAL_COMMAND}, location: a2}); } return value3; } function setPastedCommand(a0, a1) { // fn#91190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:3215, owner: ApplicationCommandManager.setPastedCommand, offset: 0x0205555b, size: 564 bytes, params: 3, frame: 26 var username; var r9; var binding; const ApplicationCommandTriggerLocations = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandTriggerLocations; var bot; var setCommand; var displayName; var value9; const JSON = global.JSON; let value = JSON.parse(a0); const value3 = undefined; const {commandKey, interactionOptions} = (ApplicationCommandUtilsModule).extractInteractionDataProps(value); let object = {type: 'channel', channel: a1}; const {application, command} = ApplicationCommandQueryApiModule.getCachedCommand(object, commandKey); const command2 = command; const value6 = null; if (value6 != command) { if (value6 != application) { object = {}; object.type = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandSectionType.APPLICATION; object.id = application.id; object.icon = application.icon; bot = application.bot; username = value6 == bot ? value3 : bot.username; object.name = value6 != username ? username : application.name; object.application = application; r9 = object; } else { r9 = value6; } value = require(8051) /* metro dependency 8051: ApplicationCommandOptionUtils */; value = value.getInitialValuesFromInteractionOptions(command, value6 != interactionOptions ? interactionOptions : []); value = global.Object.keys(value); value = value.map(_fun91191); value = value.filter(function(a0) { return a0 != null; }); value = value.join(' '); binding = command2; setCommand = binding.setCommand; displayName = command.displayName; value9 = ''; Reflect.apply(setCommand, binding, [{channelId: a1.id, command: command, section: r9, location: ApplicationCommandTriggerLocations.PASTE, commandText: value9 + COMMAND_SENTINEL + displayName + (value.length === 0 ? value9 : ' ' + value)}]); } else { binding = command2; binding.setPartialCommand(value.id, value.name, ApplicationCommandTriggerLocations.PASTE); } return value3; function _fun91191(a0) { // fn#91191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:3686, offset: 0x0205578f, size: 181 bytes, params: 2, frame: 19 var r5; const env0_0 = a0; const options = command.options; const value2 = undefined; const r1 = options == null ? value2 : options.find(_fun91192); const property = env0_1[a0]; if (r1 == null) { return null; } if (property == null) { return null; } let value = property.value; if (value == null) { r5 = value2; } else { value = value.toString(); r5 = value; } if (r1.choices != null) { value = r1.choices.find(_fun91193); r5 = value == null ? value2 : value.displayName; } return '' + r1.displayName + ':' + r5; function _fun91192({name}) { // fn#91192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:3735, offset: 0x00e6222e, size: 21 bytes, params: 2, frame: 2 return name === env0_0; } function _fun91193({value}) { // fn#91193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:3881, offset: 0x01ff0ea0, size: 26 bytes, params: 2, frame: 2 return value === env0_1.value; } } } function updateApplicationCommandManagerState({newState, preferredCommand, location}) { // fn#91195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:4301, owner: ApplicationCommandManager.updateApplicationCommandManagerState, offset: 0x02055844, size: 89 bytes, params: 2, frame: 17 const binding = env0_0; const mergePropsAndUpdate = binding.mergePropsAndUpdate; const object = {}; copyDataProperties(object, newState ?? env0_0.props, null); object['preferredCommand'] = preferredCommand; object['location'] = location; Reflect.apply(mergePropsAndUpdate, binding, [object]); } function addCommandOptionParserRules() { // fn#91196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:4464, owner: ApplicationCommandManager.addCommandOptionParserRules, offset: 0x0205589d, size: 651 bytes, params: 1, frame: 18 const binding = env0_0; let parser = binding.parser; let addRule = parser.addRule; const ChatInputNodeType = (ChatInputParserModule).ChatInputNodeType; const COMMAND_OPTION = ChatInputNodeType.COMMAND_OPTION; Reflect.apply(addRule, parser, [{'ruleId': 'commandOptionParserRuleId', 'type': null, 'matchFunction': null, 'style': null, 'deleteNodeOnBackspace': true, 'editDisabled': true, type: COMMAND_OPTION, matchFunction: matchFunction, style: style_91198}]); parser = binding.parser; addRule = parser.addRule; const COMMAND_OPTION_WITH_VALUE = ChatInputNodeType.COMMAND_OPTION_WITH_VALUE; Reflect.apply(addRule, parser, [{ruleId: 'commandOptionValueParserRuleId', type: COMMAND_OPTION_WITH_VALUE, matchFunction: matchFunction_91199, style: style_91200, editDisabled: function({data}) { return (data == null ? undefined : data.option.type) === require(dependencyMap[15]).ApplicationCommandOptionType.ATTACHMENT; }}]); parser = binding.parser; addRule = parser.addRule; const EMOJI_HIGHLIGHT = ChatInputNodeType.EMOJI_HIGHLIGHT; Reflect.apply(addRule, parser, [{ruleId: 'emojiHighlightRuleId', type: EMOJI_HIGHLIGHT, matchFunction: matchFunction_91202, style: style_91203, editDisabled: function() { return false; }}]); parser = binding.parser; addRule = parser.addRule; const ROLE_HIGHLIGHT = ChatInputNodeType.ROLE_HIGHLIGHT; Reflect.apply(addRule, parser, [{ruleId: 'roleHighlightRuleId', type: ROLE_HIGHLIGHT, matchFunction: matchFunction_91205, style: style_91206, editDisabled: function() { return false; }}]); parser = binding.parser; addRule = parser.addRule; const USER_HIGHLIGHT = ChatInputNodeType.USER_HIGHLIGHT; Reflect.apply(addRule, parser, [{ruleId: 'userHighlightRuleId', type: USER_HIGHLIGHT, matchFunction: matchFunction_91208, style: style_91209, editDisabled: function() { return false; }}]); parser = binding.parser; addRule = parser.addRule; const CHANNEL_HIGHLIGHT = ChatInputNodeType.CHANNEL_HIGHLIGHT; Reflect.apply(addRule, parser, [{ruleId: 'channelHighlightRuleId', type: CHANNEL_HIGHLIGHT, matchFunction: matchFunction_91211, style: style_91212, editDisabled: function() { return false; }}]); parser = binding.parser; addRule = parser.addRule; const SILENT_HIGHLIGHT = ChatInputNodeType.SILENT_HIGHLIGHT; Reflect.apply(addRule, parser, [{ruleId: 'silentHighlightRuleId', type: SILENT_HIGHLIGHT, matchFunction: matchFunction_91214, style: style_91215, editDisabled: function() { return false; }}]); function addCommandOptionParserRulesMatchFunction(a0, a1) { // fn#91197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:4586, owner: ApplicationCommandManager.addCommandOptionParserRules.matchFunction, offset: 0x02055b28, size: 45 bytes, params: 3, frame: 13 const value = environment.__proto__.__proto__.__proto__; return (ChatInputCommandOptionParserModule).getMatchedOptions(a0, a1); } function addCommandOptionParserRulesStyle() { // fn#91198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:4632, owner: ApplicationCommandManager.addCommandOptionParserRules.style, offset: 0x02055b55, size: 25 bytes, params: 1, frame: 9 const styles = env1_0.styles; return styles.commandOption(); } function addCommandOptionParserRulesMatchFunction_91199(a0, a1) { // fn#91199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:4840, owner: ApplicationCommandManager.addCommandOptionParserRules.matchFunction, offset: 0x02055b6e, size: 45 bytes, params: 3, frame: 13 const value = environment.__proto__.__proto__.__proto__; return (ChatInputCommandOptionParserModule).getMatchedOptionsWithValue(a0, a1); } function addCommandOptionParserRulesStyle_91200() { // fn#91200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:4895, owner: ApplicationCommandManager.addCommandOptionParserRules.style, offset: 0x02055b55, size: 25 bytes, params: 1, frame: 9 const styles = env1_0.styles; return styles.commandOption(); } function addCommandOptionParserRulesMatchFunction_91202(a0) { // fn#91202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:5164, owner: ApplicationCommandManager.addCommandOptionParserRules.matchFunction, offset: 0x02055be4, size: 59 bytes, params: 2, frame: 13 const value = environment.__proto__.__proto__.__proto__; return (ChatInputCommandOptionParserModule).getEmojiHighlightNodes(env1_0.props.channel, a0); } function addCommandOptionParserRulesStyle_91203() { // fn#91203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:5228, owner: ApplicationCommandManager.addCommandOptionParserRules.style, offset: 0x02055c1f, size: 25 bytes, params: 1, frame: 9 const styles = env1_0.styles; return styles.autocomplete(); } function addCommandOptionParserRulesMatchFunction_91205(a0) { // fn#91205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:5392, owner: ApplicationCommandManager.addCommandOptionParserRules.matchFunction, offset: 0x02055c38, size: 59 bytes, params: 2, frame: 13 const value = environment.__proto__.__proto__.__proto__; return (ChatInputCommandOptionParserModule).getRoleHighlightNodes(env1_0.props.channel, a0); } function addCommandOptionParserRulesStyle_91206({data}) { // fn#91206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:5455, owner: ApplicationCommandManager.addCommandOptionParserRules.style, offset: 0x02055c73, size: 62 bytes, params: 2, frame: 13 const color = data?.color; const styles = env1_0.styles; return styles.autocomplete(color ?? undefined); } function addCommandOptionParserRulesMatchFunction_91208(a0) { // fn#91208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:5683, owner: ApplicationCommandManager.addCommandOptionParserRules.matchFunction, offset: 0x02055cb1, size: 59 bytes, params: 2, frame: 13 const value = environment.__proto__.__proto__.__proto__; return (ChatInputCommandOptionParserModule).getUsernameHighlightNodes(env1_0.props.channel, a0); } function addCommandOptionParserRulesStyle_91209() { // fn#91209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:5750, owner: ApplicationCommandManager.addCommandOptionParserRules.style, offset: 0x02055c1f, size: 25 bytes, params: 1, frame: 9 const styles = env1_0.styles; return styles.autocomplete(); } function addCommandOptionParserRulesMatchFunction_91211(a0) { // fn#91211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:5920, owner: ApplicationCommandManager.addCommandOptionParserRules.matchFunction, offset: 0x02055cec, size: 59 bytes, params: 2, frame: 13 const value = environment.__proto__.__proto__.__proto__; return (ChatInputCommandOptionParserModule).getChannelHighlightNodes(env1_0.props.channel, a0); } function addCommandOptionParserRulesStyle_91212() { // fn#91212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:5986, owner: ApplicationCommandManager.addCommandOptionParserRules.style, offset: 0x02055c1f, size: 25 bytes, params: 1, frame: 9 const styles = env1_0.styles; return styles.autocomplete(); } function addCommandOptionParserRulesMatchFunction_91214(a0) { // fn#91214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:6154, owner: ApplicationCommandManager.addCommandOptionParserRules.matchFunction, offset: 0x02055d27, size: 41 bytes, params: 2, frame: 11 const value = environment.__proto__.__proto__.__proto__; return (ChatInputCommandOptionParserModule).getSilentHighlightNodes(a0); } function addCommandOptionParserRulesStyle_91215() { // fn#91215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:6200, owner: ApplicationCommandManager.addCommandOptionParserRules.style, offset: 0x02055c1f, size: 25 bytes, params: 1, frame: 9 const styles = env1_0.styles; return styles.autocomplete(); } } function getCurrentCommand(a0, a1, a2, a3) { // fn#91217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:6277, owner: ApplicationCommandManager.getCurrentCommand, offset: 0x02055d50, size: 667 bytes, params: 5, frame: 26 var environment; var r5; var preferredCommandType; var r10; var r11; var r4; var r1; var startsWith; var value3; var value4; var moduleValue; var getTextBeforeFirstOption; var value5; var match; var text; var value6; var displayName; var HermesInternal; var concat; var untranslatedName; var FULL_COMMAND; var value7; var contextCommands; var moduleValue2; var getCommandContext; var PARTIAL_COMMAND; var slice; var split; var getCurrentCommand_loop2; var value8; var length; var currentCommand_loop2; var value10; var currentCommand_loop22; var find; var moduleValue3; var getCachedApplicationSection; var ApplicationCommandType; var CHAT; var applicationId; var value12; var object2; const env0_0 = a1; const env0_1 = a2; let value = environment; const commandsDisabled = env0_0.props.commandsDisabled; const value2 = null; if (value2 != a0) { reducibleJoin27: while (true) { if (commandsDisabled) { break reducibleJoin27; } startsWith = a0.startsWith; value3 = environment.__proto__.__proto__; if (Reflect.apply(startsWith, a0, [COMMAND_SENTINEL])) { value4 = undefined; moduleValue = require(11857) /* metro dependency 11857: ChatInputCommandOptionParser */; getTextBeforeFirstOption = moduleValue.getTextBeforeFirstOption; value5 = Reflect.apply(getTextBeforeFirstOption, moduleValue, [a0]); match = value5.match; var env0_2 = match; text = value5.text; value6 = false; if (value2 != a2) { startsWith = text.startsWith; displayName = a2.displayName; HermesInternal = global.HermesInternal; concat = HermesInternal.concat; reducibleJoin7: while (true) { reducibleJoin6: while (true) { if (Reflect.apply(startsWith, text, ['' + COMMAND_SENTINEL + displayName])) { break reducibleJoin6; } startsWith = text.startsWith; untranslatedName = a2.untranslatedName; HermesInternal = global.HermesInternal; concat = HermesInternal.concat; if (Reflect.apply(startsWith, text, ['' + COMMAND_SENTINEL + untranslatedName])) { break reducibleJoin6; } r5 = value6; break reducibleJoin7; } preferredCommandType = a2.preferredCommandType; FULL_COMMAND = env2_15.FULL_COMMAND; value7 = true; if (preferredCommandType === FULL_COMMAND) { return {command: a2, section: a3}; } r5 = value7; break reducibleJoin7; } } else { r5 = value6; } contextCommands = env0_0.contextCommands; if (value2 == contextCommands) { return value2; } moduleValue2 = require(11573) /* metro dependency 11573: useCommandContext */; getCommandContext = moduleValue2.getCommandContext; var env0_3 = Reflect.apply(getCommandContext, moduleValue2, [{channel: a1, type: 'channel'}]); reducibleJoin10: while (true) { if (value2 == a2) { preferredCommandType = value4; break reducibleJoin10; } preferredCommandType = a2.preferredCommandType; break reducibleJoin10; } PARTIAL_COMMAND = env2_15.PARTIAL_COMMAND; if (preferredCommandType === PARTIAL_COMMAND) { contextCommands = env0_0.contextCommands; find = contextCommands.find; value = Reflect.apply(find, contextCommands, [function({id}) { return id === importDefault.id; }]); reducibleJoin18: while (true) { if (value2 != value) { moduleValue3 = importAll(8060) /* metro dependency 8060: ApplicationCommandQueryApi */; getCachedApplicationSection = moduleValue3.getCachedApplicationSection; ApplicationCommandType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandType; CHAT = ApplicationCommandType.CHAT; applicationId = value.applicationId; value12 = Reflect.apply(getCachedApplicationSection, moduleValue3, [{channel: a1, type: 'channel'}, CHAT, applicationId]); reducibleJoin24: while (true) { if (value2 == value12) { r1 = value2; break reducibleJoin24; } object2 = {}; copyDataProperties(object2, value, undefined); FULL_COMMAND = env2_15.FULL_COMMAND; object2['preferredCommandType'] = FULL_COMMAND; r1 = {command: object2, section: value12}; break reducibleJoin24; } return r1; } break reducibleJoin18; } } else { slice = text.slice; value = Reflect.apply(slice, text, [1]); split = value.split; value = Reflect.apply(split, value, [' ', 3]); var env0_4 = value; getCurrentCommand_loop2 = getCurrentCommand_loop; value8 = 0; var env0_5 = value8; length = value.length; reducibleJoin18: while (true) { if (!(value8 < length)) { break reducibleJoin18; } currentCommand_loop2 = getCurrentCommand_loop2(); if (value8 === currentCommand_loop2) { break reducibleJoin18; } r10 = currentCommand_loop2; r11 = value8; reducibleLoop13: while (true) { if (r10) { return r10.v; } value10 = typeof r11 === 'bigint' ? r11 + 1n : +r11 + 1; env0_5 = value10; length = value.length; if (value10 < length) { currentCommand_loop22 = getCurrentCommand_loop2(); if (value8 !== currentCommand_loop22) { r10 = currentCommand_loop22; r11 = value10; continue reducibleLoop13; } break reducibleJoin18; } break reducibleJoin18; } } } reducibleJoin21: while (true) { if (r5) { if (value2 != a2) { r4 = {command: a2, section: value2}; break reducibleJoin21; } r4 = value2; break reducibleJoin21; } r4 = value2; break reducibleJoin21; } return r4; } break reducibleJoin27; } } return value2; function getCurrentCommand_loop() { // fn#91219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:7092, owner: ApplicationCommandManager.getCurrentCommand._loop, offset: 0x02055feb, size: 430 bytes, params: 1, frame: 25 var r3; var object3; var property; const ApplicationCommandType = (ServerModule).ApplicationCommandType; var object4; var cachedApplicationSection; let binding = env0_4; const slice = binding.slice; let length = env0_4.length; const value3 = Reflect.apply(slice, binding, [0, length - env0_5]).join(' '); const getMatchingGroupCommands = ApplicationCommandUtilsModule.getMatchingGroupCommands; const contextCommands = env1_1.contextCommands; const RegExp = global.RegExp; const regExp = new RegExp('^' + (RegexUtils).escape(value3), 'i'); binding = env0_3; const value10 = Reflect.apply(getMatchingGroupCommands, ApplicationCommandUtilsModule, [contextCommands, regExp, binding, 2]); const value11 = value10.filter(_fun91220); length = value11.length; if (length > 0) { property = value11[0]; r3 = env0_5 > 0 || match != null; length = value10.length; if (r3) { cachedApplicationSection = (importAll(8060) /* metro dependency 8060: ApplicationCommandQueryApi */).getCachedApplicationSection({channel: require, type: 'channel'}, ApplicationCommandType.CHAT, property.applicationId); if (cachedApplicationSection == null) { object3 = {v: null}; } else { object4 = {}; copyDataProperties(object4, property, binding); object4['preferredCommandType'] = env3_15.FULL_COMMAND; object3 = {v: {command: object4, section: cachedApplicationSection}}; } return object3; } if (length === 1) { cachedApplicationSection = (importAll(8060) /* metro dependency 8060: ApplicationCommandQueryApi */).getCachedApplicationSection({channel: require, type: 'channel'}, ApplicationCommandType.CHAT, property.applicationId); if (cachedApplicationSection == null) { object3 = {v: null}; } else { object4 = {}; copyDataProperties(object4, property, binding); object4['preferredCommandType'] = env3_15.FULL_COMMAND; object3 = {v: {command: object4, section: cachedApplicationSection}}; } return object3; } length = value10.length; return length > 0 ? 0 : undefined; } return value10.length > 0 ? 0 : undefined; function _fun91220(a0) { // fn#91220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:7255, offset: 0x02056199, size: 91 bytes, params: 2, frame: 13 const inputType = a0.inputType; const value = environment.__proto__.__proto__.__proto__.__proto__; const ApplicationCommandInputType = (ApplicationCommandTypesModule).ApplicationCommandInputType; const PLACEHOLDER = ApplicationCommandInputType.PLACEHOLDER; return inputType !== PLACEHOLDER && (a0.displayName === env0_0 || a0.untranslatedName === env0_0); } } } function getCurrentOption(a0, a1) { // fn#91221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:7799, owner: ApplicationCommandManager.getCurrentOption, offset: 0x020561f4, size: 229 bytes, params: 3, frame: 19 var environment; var option; var r4; var value; var defaultImport; var findLast; var Array; var from; var optionValueNodes; var last; var binding; var property; const env0_0 = a1; if (a0) { value = environment.__proto__.__proto__; value = undefined; defaultImport = importDefault(22) /* metro dependency 22 */; findLast = defaultImport.findLast; Array = global.Array; from = Array.from; optionValueNodes = env0_0.optionValueNodes; last = Reflect.apply(findLast, defaultImport, [Reflect.apply(from, Array, [optionValueNodes.values()]), function({location}) { return location <= require; }]); option = last == null || last.data == null ? value : last.data.option; if (last == null) { return null; } if (option == null) { return null; } binding = env0_0; property = binding.preferredOptionValues[binding.props.channel.id]; r4 = property == null ? value : property[option.name]; if (r4 == null) { return option; } if (r4.displayText === '') { return option; } return last.location + last.length > a1 ? option : null; } return null; } function getAllCommandOptionValues({options}, a1) { // fn#91223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:8176, owner: ApplicationCommandManager.getAllCommandOptionValues, offset: 0x020562ee, size: 374 bytes, params: 3, frame: 31 var r4; var type; var optionValue; var value6; var value7; var property; var property2; var data; var ChatInputParseResultDataType; var COMMAND_OPTION; var binding; var preferredOptionValues; var props; var channel; var id; var property3; var property4; var option; var substring; var location; var displayName; var length; var value8; var value9; var optionValueParser; var value10; var value11; if (options == null) { return {}; } const object = {}; const value4 = _createForOfIteratorHelperLoose_91180(env0_0.optionValueNodes); const value5 = value4(); let done = value5.done; if (!done) { r4 = value5; while (true) { value6 = r4.value; value7 = env2_4(value6, 2); property = value7[0]; property2 = value7[1]; data = property2.data; type = data?.type; ChatInputParseResultDataType = (require(11858) /* metro dependency 11858: ChatInputParser */).ChatInputParseResultDataType; COMMAND_OPTION = ChatInputParseResultDataType.COMMAND_OPTION; if (type !== COMMAND_OPTION) { continue; } binding = env0_0; preferredOptionValues = binding.preferredOptionValues; props = binding.props; channel = props.channel; id = channel.id; property3 = preferredOptionValues[id]; if (property3 == null) { optionValue = undefined; continue; } property4 = property3[property]; if (property4 == null) { optionValue = undefined; continue; } optionValue = property4.optionValue; if (optionValue != null) { object[property] = [optionValue]; } else { data = property2.data; option = data.option; substring = a1.substring; location = property2.location; displayName = option.displayName; length = displayName.length; value8 = location + length + 1; location = property2.location; length = property2.length; value9 = Reflect.apply(substring, a1, [value8, location + length]); optionValueParser = env0_0.optionValueParser; value10 = optionValueParser.parse(value9, option); object[property] = [value10]; } value11 = value4(); done = value11.done; if (done) { break; } r4 = value11; continue; } } return object; } function insertFirstOptionIfValid(a0, a1, a2, a3, a4) { // fn#91224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:8733, owner: ApplicationCommandManager.insertFirstOptionIfValid, offset: 0x02056464, size: 256 bytes, params: 6, frame: 21 var getNextOptionBinding; var Set; var value2; var value3; var set; var nextOptionBinding; var binding; if (a0.startsWith('' + COMMAND_SENTINEL + a2)) { if (a0.length > a2.length + 1) { if (WHITESPACE_RE.test(a0[a2.length + 1])) { if (a3) { getNextOptionBinding = getNextOption; Set = global.Set; value2 = env0_0.optionValueNodes.keys(); value3 = Object.create(Set.prototype, {constructor: {value: Set}}); set = new Set(); nextOptionBinding = getNextOptionBinding(a1, set instanceof Object ? set : value3, true); if (nextOptionBinding != null) { binding = env0_0; binding.insertOrJumpCommandOption(nextOptionBinding, a1.displayName.length + 2, true, undefined, a1); } return true; } if (a4) { if (a0.length > a2.length + 2) { getNextOptionBinding = getNextOption; Set = global.Set; value2 = env0_0.optionValueNodes.keys(); value3 = Object.create(Set.prototype, {constructor: {value: Set}}); set = new Set(); nextOptionBinding = getNextOptionBinding(a1, set instanceof Object ? set : value3, true); if (nextOptionBinding != null) { binding = env0_0; binding.insertOrJumpCommandOption(nextOptionBinding, a1.displayName.length + 2, true, undefined, a1); } return true; } return false; } return false; } return false; } } return false; } function insertOrJumpCommandOption(a0, a1) { // fn#91225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:9042, owner: ApplicationCommandManager.insertOrJumpCommandOption, offset: 0x02056564, size: 1415 bytes, params: 3, frame: 38 var r6; var displayText; var r17; var length; var r20; var r12; var r9; var r11; var props; var binding; var text; var selectionStart; var optionValueNodes; var location; var test; var Math; var min; var Set; var value14; var set; var value17; var nextOption; var value19; var value25; var displayName; var value30; var current; var replaceRange; var object; var object2; const ChatInputNodeType = (ChatInputParserModule).ChatInputNodeType; var styles; var value31; var value32; var items2; var setSelectedRange; var value33; var object3; var value35; let value = a1; const value2 = a2; const value3 = a4; const value4 = undefined; const r8 = value2 !== value4 ? value2 : false; let r14 = value3 ?? env0_0.props.activeCommand; if (r14 != null) { binding = env0_0; props = binding.props; text = props.text; selectionStart = props.selectionStart; optionValueNodes = binding.optionValueNodes; r6 = optionValueNodes == null ? value4 : optionValueNodes.get(a0.name); displayText = a3 == null ? value4 : a3.displayText; if (displayText == null) { if (r6 == null) { r9 = value ?? selectionStart; value = text != null; r11 = value && r9 <= text.length; if (r11) { value = environment.__proto__.__proto__; test = WHITESPACE_RE.test; Math = global.Math; min = Math.min; value = r9 - 1; value = !Reflect.apply(test, WHITESPACE_RE, [text[Reflect.apply(min, Math, [value, text.length - 1])]]); r11 = value; } current = env0_0.ref.current; replaceRange = current.replaceRange; object = {location: r9}; value = 0; object.length = value; value33 = ''; r14 = r11 ? ' ' : value33; displayName = a0.displayName; object.text = value33 + r14 + displayName + ':'; object3 = {}; value35 = environment.__proto__.__proto__; object3.type = ChatInputNodeType.COMMAND_OPTION; object3.style = env0_0.styles.commandOption(); r9 = r11 ? 1 : value; object3.location = r9; displayName = a0.displayName; object3.length = displayName.length + 1; object.nodes = [object3]; object.keepCursorPosition = r8; object.editId = env0_0.editId; Reflect.apply(replaceRange, current, [object]); } else { current = env0_0.ref.current; setSelectedRange = current.setSelectedRange; location = r6.location; displayName = a0.displayName; length = displayName.length; value = location + length + 1; length = r6.length; displayName = a0.displayName; Reflect.apply(setSelectedRange, current, [value, length - displayName.length - 1]); } } else { r17 = r6 != null ? r6.location : value ?? selectionStart; value = 0; length = r6 != null ? r6.length : value; r20 = text != null && r17 <= text.length; r20 = r20 && !WHITESPACE_RE.test(text[global.Math.min(r17 - 1, text.length - 1)]); Set = global.Set; value14 = env0_0.optionValueNodes.keys(); set = new Set(); set.add(a0.name); value17 = environment.__proto__.__proto__; nextOption = getNextOption(r14, set); value19 = a3 != null; if (value19) { r14 = r17 + length !== text.length && !WHITESPACE_RE.test(text[global.Math.min(r17 + length, text.length - 1)]); r14 = !r14 ? nextOption != null : r14; r12 = r14; } else { r12 = value19; } displayText = a3 == null ? value4 : a3.displayText; value25 = ''; r14 = value25 !== displayText ? value25 + a0.displayName + ':' + a3.displayText : value25 + a0.displayName + ':'; value30 = value25 + (r20 ? ' ' : value25) + r14 + (r12 ? ' ' : value25); if (nextOption != null) { value31 = value25 + nextOption.displayName + ':'; value32 = value25 + value30 + value31; object = {}; object.type = ChatInputNodeType.COMMAND_OPTION_WITH_VALUE; styles = env0_0.styles; object.style = styles.commandOption(); object.location = r20 ? 1 : value; object.length = r14.length; items2 = [object]; object = {}; object.type = ChatInputNodeType.COMMAND_OPTION; binding = env0_0; styles = binding.styles; object.style = styles.commandOption(); object.location = value30.length; object.length = value31.length; items2[1] = object; binding.ref.current.replaceRange({location: r17, length: length, text: value32, nodes: items2, editId: binding.editId}); } else { binding = env0_0; current = binding.ref.current; replaceRange = current.replaceRange; object = {location: r17, length: length, text: value30}; object2 = {}; object2.type = ChatInputNodeType.COMMAND_OPTION_WITH_VALUE; object2.style = binding.styles.commandOption(); object2.location = r20 ? 1 : value; length = r14.length; object2.length = length; object.nodes = [object2]; object.keepCursorPosition = r8; object.editId = env0_0.editId; Reflect.apply(replaceRange, current, [object]); } } value = a3 != null; if (value && a3.preferred) { if (env0_0 != null) { binding = env0_0; binding.setPreferredOptionValue(binding.props.channel.id, a0.name, a3); } } } return value4; } function sendCommand(a0, a1, a2) { // fn#91226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:10857, owner: ApplicationCommandManager.sendCommand, offset: 0x02056aeb, size: 795 bytes, params: 4, frame: 25 var environment; var object; var property; var value7; var binding; var setCommand; var value8; var value9; var moduleValue4; var getFirstInvalidOption; var optionValidationResults; var value10; var applicationCommandStoreBinding; var value11; var trackWithMetadata; var APPLICATION_COMMAND_VALIDATION_FAILED; var ApplicationCommandOptionType; var type; var value; const activeCommand = object3.props.activeCommand; const value2 = null; if (value2 != activeCommand) { value8 = environment.__proto__.__proto__; value9 = undefined; moduleValue4 = require(11695) /* metro dependency 11695: ApplicationCommandValidationUtils */; getFirstInvalidOption = moduleValue4.getFirstInvalidOption; optionValidationResults = object3.optionValidationResults; value10 = Reflect.apply(getFirstInvalidOption, moduleValue4, [activeCommand, value2 != optionValidationResults ? optionValidationResults : {}]); applicationCommandStoreBinding = ApplicationCommandStore; value11 = applicationCommandStoreBinding.getOptionStates(a1.id); object = {}; var object3 = object; global.Object.entries(value11).forEach(_fun91227); if (value2 == value10) { value = require(11647) /* metro dependency 11647: ApplicationCommandOptionValueParser */; value = value.parseOptionValuesForSend(a1, activeCommand, object); a2(activeCommand, value); } else { binding = object3; binding.insertOrJumpCommandOption(value10); binding.updateValidationResults(); value = require(4081) /* metro dependency 4081: HapticUtilsNative */; value.triggerHapticFeedback((require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes.NOTIFICATION_ERROR); value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */; trackWithMetadata = value.trackWithMetadata; APPLICATION_COMMAND_VALIDATION_FAILED = AnalyticEvents.APPLICATION_COMMAND_VALIDATION_FAILED; object = {}; object.application_id = value2 == activeCommand ? value9 : activeCommand.applicationId; object.command_id = value2 == activeCommand || value2 == activeCommand.rootCommand ? value9 : activeCommand.rootCommand.id; ApplicationCommandOptionType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandOptionType; type = value10.type; object.argument_type = ApplicationCommandOptionType[value2 != type ? type : 3]; object.is_required = value2 == value10 ? value9 : value10.required; Reflect.apply(trackWithMetadata, value, [APPLICATION_COMMAND_VALIDATION_FAILED, object]); } return true; } const r7 = (require(11017) /* metro dependency 11017: AutocompleteUtils */).getPrefix(a0) !== COMMAND_SENTINEL ? value2 : (require(11017) /* metro dependency 11017: AutocompleteUtils */).getQuery(a0); if (value2 != r7) { var moduleValue3 = importAll(8060) /* metro dependency 8060: ApplicationCommandQueryApi */; var getCachedResults = moduleValue3.getCachedResults; object = {channel: a1, type: 'channel'}; var ApplicationCommandType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandType; var CHAT = ApplicationCommandType.CHAT; var {commands, sections} = Reflect.apply(getCachedResults, moduleValue3, [object, CHAT, r7]); if (value2 == commands) { return false; } if (commands.length > 0) { if (commands[0].inputType !== (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandInputType.PLACEHOLDER) { property = commands[0]; value7 = sections.find(_fun91228); binding = object3; setCommand = binding.setCommand; object = {}; object.channelId = a1.id; object.command = property; object.section = value2 != value7 ? value7 : value2; object.location = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandTriggerLocations.DISCOVERY; object.query = r7; Reflect.apply(setCommand, binding, [object]); return true; } return false; } } return false; function _fun91227(a0) { // fn#91227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:11062, offset: 0x02056e06, size: 94 bytes, params: 2, frame: 8 var r1; var r2; var r4; var item3; var value3; const iterator = a0[Symbol.iterator](); const iterator2 = iterator.next; let item2 = Reflect.apply(iterator2, iterator, []); let item = item2.value; item2 = item2.done ? undefined : iterator; const value = undefined; const value2 = item2 === value; const r3 = value2 ? value : item; if (value2) { r1 = value; r2 = item2; r4 = value2; } else { item3 = Reflect.apply(iterator2, item2, []); item = item3.value; item3 = item3.done ? undefined : item2; value3 = item3 === value; if (value3) { r1 = value; r2 = item3; r4 = value3; } else { r1 = item; r2 = item3; r4 = value3; } } if (!r4) { r2.return(); } if (r1.optionValue != null) { env0_0[r3] = r1.optionValue; } return value; } function _fun91228({application}) { // fn#91228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:11931, offset: 0x02056e64, size: 42 bytes, params: 2, frame: 3 return application?.id === env0_1.applicationId; } } } function value_91230(a0) { // fn#91230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:12521, offset: 0x02056ec8, size: 3005 bytes, params: 2, frame: 48 var environment; var r0; var r17; var r3; var r1; var command; var id; var id2; var preferredCommandType; var id3; var preferredCommandType2; var r18; var r23; var options; var r6; var r19; var r28; var r29; var r2; var r10; var r11; var id4; var r16; var name; var name2; var type; var r15; var r12; var location; var length; var r7; var editId3; var editId4; var selectionEnd2; var value3; var queryCommands2; var preferredCommand; var value5; var preferredCommand2; var value6; var preferredCommand3; var commandsDisabled; var preferredCommand4; var preferredCommand5; var value7; var FULL_COMMAND; var object; var preferredCommand6; var preferredCommandSection; var getCurrentCommand; var text3; var channel2; var preferredCommand7; var value8; var section; var preferredCommand8; var value9; var id5; var preferredCommand9; var value10; var PARTIAL_COMMAND; var value11; var value12; var preferredCommand10; var id6; var value13; var preferredCommandType3; var value14; var preferredOptionValues; var property; var parser; var parse; var text4; var value15; var optionsToNodes; var clear; var optionValueNodes; var chatInputNodes; var forEach; var _createForOfIteratorHelperLoose_91180Binding; var value16; var value17; var done; var value18; var get; var value19; var value20; var displayText; var value21; var value22; var text5; var substring; var displayName; var value23; var value24; var value25; const ApplicationCommandOptionType = (ServerModule).ApplicationCommandOptionType; var ATTACHMENT; var push; var value26; var defaultImport; var removeFiles; var SlashCommand; var id7; var getCurrentOption; var value30; var moduleValue; var getKeyboardType; var value31; const KeyboardTypes = (KeyboardTypesModule).KeyboardTypes; var SYSTEM; var value32; var value33; var value34; var value35; var defaultImport2; var clearAll; var name3; var value38; var value39; var getAllCommandOptionValues; var text6; var value40; var moduleValue2; var getValidationResults; var optionValues; var guild_id; var map; var editId5; var value41; var ref; var current; var updateNativeTextBlocksThrottled; var value42; var value46; var moduleValue4; var isEmpty2; var text7; var length2; var value47; var insertFirstOptionIfValid; var untranslatedName; var optionValidationResults; var success; var openCustomKeyboard; var MEDIA; var COMMAND; var value48; var value49; var moduleValue5; var value50; var value51; var closeCustomKeyboard; var focus; var value52; var value53; var hasValue; var Object; var keys; var updateChannelState; var object3; const env0_1 = a0; let {text, selectionStart, selectionEnd, focused, queryCommands, editId, channel, lastCommandAutocompleteResponseNonce} = this.props; let value = editId !== a0.editId; reducibleJoin2: while (true) { if (value) { editId3 = a0.editId; value = editId3 != null; r0 = value; break reducibleJoin2; } r0 = value; break reducibleJoin2; } reducibleJoin4: while (true) { if (r0) { editId4 = a0.editId; this.editId = editId4; break reducibleJoin4; } break reducibleJoin4; } value = text !== a0.text; const value2 = selectionStart !== a0.selectionStart; reducibleJoin6: while (true) { if (value2) { r17 = value2; break reducibleJoin6; } selectionEnd2 = a0.selectionEnd; value3 = selectionEnd !== selectionEnd2; r17 = value3; break reducibleJoin6; } const value4 = focused !== a0.focused; let activeCommand = this.activeCommand; let activeCommandSection = this.activeCommandSection; reducibleJoin72: while (true) { reducibleJoin24: while (true) { if (value) { queryCommands = a0.queryCommands; this.contextCommands = queryCommands; preferredCommand = this.preferredCommand; preferredCommand2 = a0.preferredCommand; value6 = null; reducibleJoin11: while (true) { if (value6 == preferredCommand2) { break reducibleJoin11; } preferredCommand3 = a0.preferredCommand; this.preferredCommand = preferredCommand3; location = a0.location; this.location = location; break reducibleJoin11; } reducibleJoin18: while (true) { if (a0.commandsDisabled) { r0 = value6; break reducibleJoin18; } reducibleJoin17: while (true) { reducibleJoin16: while (true) { if (value) { break reducibleJoin16; } preferredCommand4 = this.preferredCommand; if (value6 == preferredCommand4) { break reducibleJoin16; } preferredCommand5 = this.preferredCommand; preferredCommandType = preferredCommand5.preferredCommandType; value7 = environment.__proto__; FULL_COMMAND = env1_15.FULL_COMMAND; if (preferredCommandType !== FULL_COMMAND) { break reducibleJoin16; } preferredCommand6 = this.preferredCommand; preferredCommandSection = this.preferredCommandSection; r3 = {command: preferredCommand6, section: preferredCommandSection}; break reducibleJoin17; } getCurrentCommand = this.getCurrentCommand; text3 = a0.text; channel2 = a0.channel; preferredCommand7 = this.preferredCommand; preferredCommandSection = this.preferredCommandSection; value8 = Reflect.apply(getCurrentCommand, this, [text3, channel2, preferredCommand7, preferredCommandSection]); r3 = value8; break reducibleJoin17; } r0 = r3; break reducibleJoin18; } reducibleJoin20: while (true) { if (value6 != r0) { command = r0.command; section = r0.section; r1 = section; break reducibleJoin20; } r1 = activeCommandSection; command = value6; break reducibleJoin20; } preferredCommand8 = this.preferredCommand; value9 = undefined; reducibleJoin22: while (true) { if (value6 == preferredCommand8) { id = value9; break reducibleJoin22; } id = preferredCommand8.id; break reducibleJoin22; } if (value6 == command) { id2 = value9; break reducibleJoin24; } id2 = command.id; break reducibleJoin24; } queryCommands2 = a0.queryCommands; if (queryCommands === queryCommands2) { preferredCommand = a0.preferredCommand; value5 = false; if (preferredCommand == null) { r2 = value5; r10 = activeCommandSection; r11 = activeCommand; break reducibleJoin72; } } queryCommands = a0.queryCommands; this.contextCommands = queryCommands; preferredCommand = this.preferredCommand; preferredCommand2 = a0.preferredCommand; value6 = null; reducibleJoin11: while (true) { if (value6 == preferredCommand2) { break reducibleJoin11; } preferredCommand3 = a0.preferredCommand; this.preferredCommand = preferredCommand3; location = a0.location; this.location = location; break reducibleJoin11; } commandsDisabled = a0.commandsDisabled; reducibleJoin18: while (true) { if (commandsDisabled) { r0 = value6; break reducibleJoin18; } reducibleJoin17: while (true) { reducibleJoin16: while (true) { if (value) { break reducibleJoin16; } preferredCommand4 = this.preferredCommand; if (value6 == preferredCommand4) { break reducibleJoin16; } preferredCommand5 = this.preferredCommand; preferredCommandType = preferredCommand5.preferredCommandType; value7 = environment.__proto__; FULL_COMMAND = env1_15.FULL_COMMAND; if (preferredCommandType !== FULL_COMMAND) { break reducibleJoin16; } preferredCommand6 = this.preferredCommand; preferredCommandSection = this.preferredCommandSection; r3 = {command: preferredCommand6, section: preferredCommandSection}; break reducibleJoin17; } getCurrentCommand = this.getCurrentCommand; text3 = a0.text; channel2 = a0.channel; preferredCommand7 = this.preferredCommand; preferredCommandSection = this.preferredCommandSection; value8 = Reflect.apply(getCurrentCommand, this, [text3, channel2, preferredCommand7, preferredCommandSection]); r3 = value8; break reducibleJoin17; } r0 = r3; break reducibleJoin18; } reducibleJoin20: while (true) { if (value6 != r0) { command = r0.command; section = r0.section; r1 = section; break reducibleJoin20; } r1 = activeCommandSection; command = value6; break reducibleJoin20; } preferredCommand8 = this.preferredCommand; value9 = undefined; reducibleJoin22: while (true) { if (value6 == preferredCommand8) { id = value9; break reducibleJoin22; } id = preferredCommand8.id; break reducibleJoin22; } if (value6 == command) { id2 = value9; break reducibleJoin24; } id5 = command.id; id2 = id5; break reducibleJoin24; } if (id !== id2) { reducibleJoin35: while (true) { if (value) { this.preferredCommand = value6; this.preferredCommandSection = value6; this.location = value9; break reducibleJoin35; } break reducibleJoin35; } } else { preferredCommand9 = this.preferredCommand; reducibleJoin27: while (true) { if (value6 == preferredCommand9) { preferredCommandType = value9; break reducibleJoin27; } preferredCommandType = preferredCommand9.preferredCommandType; break reducibleJoin27; } value10 = environment.__proto__; PARTIAL_COMMAND = env1_15.PARTIAL_COMMAND; value11 = preferredCommandType === PARTIAL_COMMAND; reducibleJoin31: while (true) { if (value11) { reducibleJoin30: while (true) { if (value6 == command) { preferredCommandType = value9; break reducibleJoin30; } preferredCommandType = command.preferredCommandType; break reducibleJoin30; } FULL_COMMAND = env1_15.FULL_COMMAND; value12 = preferredCommandType === FULL_COMMAND; r0 = value12; break reducibleJoin31; } r0 = value11; break reducibleJoin31; } reducibleJoin35: while (true) { if (r0) { this.preferredCommand = command; break reducibleJoin35; } break reducibleJoin35; } } reducibleJoin37: while (true) { if (value6 == preferredCommand) { id = value9; break reducibleJoin37; } id = preferredCommand.id; break reducibleJoin37; } preferredCommand10 = this.preferredCommand; reducibleJoin39: while (true) { if (value6 == preferredCommand10) { id3 = value9; break reducibleJoin39; } id6 = preferredCommand10.id; id3 = id6; break reducibleJoin39; } value13 = id !== id3; reducibleJoin45: while (true) { if (value13) { r0 = value13; break reducibleJoin45; } reducibleJoin42: while (true) { if (value6 == preferredCommand) { preferredCommandType = value9; break reducibleJoin42; } preferredCommandType = preferredCommand.preferredCommandType; break reducibleJoin42; } preferredCommand = this.preferredCommand; reducibleJoin44: while (true) { if (value6 == preferredCommand) { preferredCommandType2 = value9; break reducibleJoin44; } preferredCommandType3 = preferredCommand.preferredCommandType; preferredCommandType2 = preferredCommandType3; break reducibleJoin44; } value14 = preferredCommandType !== preferredCommandType2; r0 = value14; break reducibleJoin45; } preferredOptionValues = this.preferredOptionValues; id = channel.id; property = preferredOptionValues[id]; reducibleJoin47: while (true) { if (value6 != property) { r18 = property; break reducibleJoin47; } r18 = {}; break reducibleJoin47; } parser = this.parser; parse = parser.parse; text4 = a0.text; object = {}; reducibleJoin49: while (true) { if (value6 == command) { preferredCommandType = value9; break reducibleJoin49; } preferredCommandType = command.preferredCommandType; break reducibleJoin49; } value15 = environment.__proto__; FULL_COMMAND = env1_15.FULL_COMMAND; r23 = preferredCommandType !== FULL_COMMAND ? value6 : command; object.activeCommand = r23; object.preferredOptionValues = r18; this.chatInputNodes = Reflect.apply(parse, parser, [text4, object]); optionsToNodes = this.optionsToNodes; clear = optionsToNodes.clear; Reflect.apply(clear, optionsToNodes, []); optionValueNodes = this.optionValueNodes; clear = optionValueNodes.clear; Reflect.apply(clear, optionValueNodes, []); chatInputNodes = this.chatInputNodes; forEach = chatInputNodes.forEach; Reflect.apply(forEach, chatInputNodes, [_fun91231]); reducibleJoin71: while (true) { if (value) { activeCommand = this.activeCommand; reducibleJoin53: while (true) { if (value6 == activeCommand) { preferredCommandType = value9; break reducibleJoin53; } preferredCommandType = activeCommand.preferredCommandType; break reducibleJoin53; } FULL_COMMAND = env1_15.FULL_COMMAND; if (preferredCommandType !== FULL_COMMAND) { break reducibleJoin71; } object = []; _createForOfIteratorHelperLoose_91180Binding = _createForOfIteratorHelperLoose_91180; activeCommand = this.activeCommand; reducibleJoin56: while (true) { if (value6 == activeCommand) { options = value9; break reducibleJoin56; } options = activeCommand.options; break reducibleJoin56; } reducibleJoin58: while (true) { if (value6 != options) { r6 = options; break reducibleJoin58; } r6 = []; break reducibleJoin58; } value16 = _createForOfIteratorHelperLoose_91180Binding(r6); value17 = value16(); done = value17.done; if (!done) { r19 = value17; reducibleLoop59: while (true) { value18 = r19.value; name = value18.name; property = r18[name]; optionValueNodes = this.optionValueNodes; get = optionValueNodes.get; value19 = Reflect.apply(get, optionValueNodes, [name]); value20 = value6 == property; reducibleJoin61: while (true) { if (value20) { r28 = value20; break reducibleJoin61; } displayText = property.displayText; value21 = displayText === ''; r28 = value21; break reducibleJoin61; } reducibleJoin65: while (true) { if (r28) { break reducibleJoin65; } value22 = value6 != value19; reducibleJoin64: while (true) { if (value22) { text5 = a0.text; substring = text5.substring; location = value19.location; displayName = value18.displayName; length = displayName.length; value23 = location + length + 1; location = value19.location; length = value19.length; value24 = Reflect.apply(substring, text5, [value23, location + length]); displayText = property.displayText; value25 = value24 === displayText; r29 = value25; break reducibleJoin64; } r29 = value22; break reducibleJoin64; } r28 = r29; break reducibleJoin65; } reducibleJoin68: while (true) { if (r28) { break reducibleJoin68; } delete r18[name]; type = value18.type; ATTACHMENT = ApplicationCommandOptionType.ATTACHMENT; if (type !== ATTACHMENT) { break reducibleJoin68; } push = object.push; Reflect.apply(push, object, [name]); break reducibleJoin68; } value26 = value16(); done = value26.done; if (done) { break reducibleLoop59; } r19 = value26; continue reducibleLoop59; } } length = object.length; if (length > 0) { defaultImport = importDefault(7879) /* metro dependency 7879: UploadAttachmentActionCreators */; removeFiles = defaultImport.removeFiles; id = channel.id; SlashCommand = DraftType.SlashCommand; Reflect.apply(removeFiles, defaultImport, [id, object, SlashCommand]); break reducibleJoin71; } break reducibleJoin71; } break reducibleJoin71; } preferredOptionValues = this.preferredOptionValues; id = channel.id; preferredOptionValues[id] = r18; r2 = r0; r10 = r1; r11 = command; break reducibleJoin72; } const value27 = null; const value28 = undefined; reducibleJoin74: while (true) { if (value27 == r11) { id = value28; break reducibleJoin74; } id = r11.id; break reducibleJoin74; } activeCommand = this.activeCommand; reducibleJoin76: while (true) { if (value27 == activeCommand) { id4 = value28; break reducibleJoin76; } id7 = activeCommand.id; id4 = id7; break reducibleJoin76; } const value29 = id !== id4; let activeOption = this.activeOption; var env0_4; let r4 = value || r17; r4 = !r4 ? value4 : r4; r4 = !r4 ? value29 : r4; reducibleJoin83: while (true) { if (r4) { getCurrentOption = this.getCurrentOption; focused = a0.focused; reducibleJoin82: while (true) { if (focused) { r16 = focused; break reducibleJoin82; } value30 = environment.__proto__; moduleValue = require(4022) /* metro dependency 4022: useKeyboardType */; getKeyboardType = moduleValue.getKeyboardType; value31 = Reflect.apply(getKeyboardType, moduleValue, []); SYSTEM = KeyboardTypes.SYSTEM; value32 = value31 !== SYSTEM; r16 = value32; break reducibleJoin82; } selectionStart = a0.selectionStart; value33 = Reflect.apply(getCurrentOption, this, [r16, selectionStart]); env0_4 = value33; r3 = value33; break reducibleJoin83; } r3 = activeOption; break reducibleJoin83; } reducibleJoin85: while (true) { if (value29) { activeCommand = this.activeCommand; value34 = value27 != activeCommand; r4 = value34; break reducibleJoin85; } r4 = value29; break reducibleJoin85; } reducibleJoin87: while (true) { if (r4) { value35 = environment.__proto__; defaultImport2 = importDefault(7879) /* metro dependency 7879: UploadAttachmentActionCreators */; clearAll = defaultImport2.clearAll; id = channel.id; SlashCommand = DraftType.SlashCommand; Reflect.apply(clearAll, defaultImport2, [id, SlashCommand]); break reducibleJoin87; } break reducibleJoin87; } reducibleJoin89: while (true) { if (value27 == r3) { name = value28; break reducibleJoin89; } name = r3.name; break reducibleJoin89; } activeOption = this.activeOption; reducibleJoin91: while (true) { if (value27 == activeOption) { name2 = value28; break reducibleJoin91; } name3 = activeOption.name; name2 = name3; break reducibleJoin91; } const value36 = name !== name2; const value37 = lastCommandAutocompleteResponseNonce !== a0.lastCommandAutocompleteResponseNonce; r4 = value || value36; r4 = !r4 ? value37 : r4; reducibleJoin97: while (true) { if (r4) { reducibleJoin96: while (true) { if (value27 == r11) { preferredCommandType = value28; break reducibleJoin96; } preferredCommandType = r11.preferredCommandType; break reducibleJoin96; } value38 = environment.__proto__; FULL_COMMAND = env1_15.FULL_COMMAND; value39 = preferredCommandType === FULL_COMMAND; r4 = value39; break reducibleJoin97; } break reducibleJoin97; } reducibleJoin99: while (true) { if (r4) { getAllCommandOptionValues = this.getAllCommandOptionValues; text6 = a0.text; this.optionValues = Reflect.apply(getAllCommandOptionValues, this, [r11, text6]); value40 = environment.__proto__; moduleValue2 = require(11693) /* metro dependency 11693: ApplicationCommandValidationUtils */; getValidationResults = moduleValue2.getValidationResults; optionValues = this.optionValues; channel = a0.channel; guild_id = channel.guild_id; channel = a0.channel; id = channel.id; this.optionValidationResults = Reflect.apply(getValidationResults, moduleValue2, [r11, optionValues, guild_id, id, false]); chatInputNodes = this.chatInputNodes; map = chatInputNodes.map; this.chatInputNodes = Reflect.apply(map, chatInputNodes, [_fun91232]); break reducibleJoin99; } break reducibleJoin99; } r4 = value || value29; r4 = !r4 ? value36 : r4; reducibleJoin103: while (true) { if (r4) { break reducibleJoin103; } editId5 = a0.editId; value41 = editId !== editId5; r4 = value41; break reducibleJoin103; } reducibleJoin105: while (true) { if (r4) { ref = this.ref; current = ref.current; updateNativeTextBlocksThrottled = current.updateNativeTextBlocksThrottled; chatInputNodes = this.chatInputNodes; editId = a0.editId; Reflect.apply(updateNativeTextBlocksThrottled, current, [chatInputNodes, editId]); break reducibleJoin105; } break reducibleJoin105; } reducibleJoin107: while (true) { if (value29) { value42 = value27 != r11; r4 = value42; break reducibleJoin107; } r4 = value29; break reducibleJoin107; } reducibleJoin109: while (true) { if (r4) { this.canAutoInsertFirstOption = true; break reducibleJoin109; } break reducibleJoin109; } let isEmpty = moduleValue32.isEmpty; reducibleJoin111: while (true) { if (Reflect.apply(isEmpty, moduleValue32, [this.optionsToNodes])) { break reducibleJoin111; } this.canAutoInsertFirstOption = false; break reducibleJoin111; } reducibleJoin113: while (true) { if (value27 == r11) { preferredCommandType = value28; break reducibleJoin113; } preferredCommandType = r11.preferredCommandType; break reducibleJoin113; } FULL_COMMAND = env1_15.FULL_COMMAND; reducibleJoin118: while (true) { reducibleJoin117: while (true) { if (preferredCommandType !== FULL_COMMAND) { break reducibleJoin117; } reducibleJoin116: while (true) { if (value27 == r11) { options = value28; break reducibleJoin116; } options = r11.options; break reducibleJoin116; } if (value27 != options) { r16 = options; break reducibleJoin118; } break reducibleJoin117; } r16 = []; break reducibleJoin118; } const value44 = r16.filter(function(a0) { return a0.required; }).length > 0; reducibleJoin120: while (true) { if (value27 == r11) { preferredCommandType = value28; break reducibleJoin120; } preferredCommandType = r11.preferredCommandType; break reducibleJoin120; } FULL_COMMAND = env1_15.FULL_COMMAND; reducibleJoin125: while (true) { reducibleJoin124: while (true) { if (preferredCommandType !== FULL_COMMAND) { break reducibleJoin124; } reducibleJoin123: while (true) { if (value27 == r11) { options = value28; break reducibleJoin123; } options = r11.options; break reducibleJoin123; } if (value27 != options) { r17 = options; break reducibleJoin125; } break reducibleJoin124; } r17 = []; break reducibleJoin125; } const value45 = r17.filter(function(a0) { return !a0.required; }).length === 1; const canAutoInsertFirstOption = this.canAutoInsertFirstOption; reducibleJoin129: while (true) { if (canAutoInsertFirstOption) { reducibleJoin128: while (true) { if (value27 == r11) { preferredCommandType = value28; break reducibleJoin128; } preferredCommandType = r11.preferredCommandType; break reducibleJoin128; } FULL_COMMAND = env1_15.FULL_COMMAND; value46 = preferredCommandType === FULL_COMMAND; r4 = value46; break reducibleJoin129; } r4 = canAutoInsertFirstOption; break reducibleJoin129; } reducibleJoin131: while (true) { if (r4) { moduleValue4 = moduleValue32; isEmpty = moduleValue4.isEmpty; optionsToNodes = this.optionsToNodes; isEmpty2 = Reflect.apply(isEmpty, moduleValue4, [optionsToNodes]); r4 = isEmpty2; break reducibleJoin131; } break reducibleJoin131; } reducibleJoin133: while (true) { if (r4) { text7 = a0.text; length = text7.length; length2 = text.length; value47 = length >= length2; r4 = value47; break reducibleJoin133; } break reducibleJoin133; } reducibleJoin136: while (true) { if (r4) { insertFirstOptionIfValid = this.insertFirstOptionIfValid; text = a0.text; displayName = r11.displayName; if (Reflect.apply(insertFirstOptionIfValid, this, [text, r11, displayName, value44, value45])) { break reducibleJoin136; } insertFirstOptionIfValid = this.insertFirstOptionIfValid; text = a0.text; untranslatedName = r11.untranslatedName; Reflect.apply(insertFirstOptionIfValid, this, [text, r11, untranslatedName, value44, value45]); break reducibleJoin136; } break reducibleJoin136; } reducibleJoin150: while (true) { reducibleJoin148: while (true) { if (value36) { reducibleJoin139: while (true) { if (value27 == r3) { type = value28; break reducibleJoin139; } type = r3.type; break reducibleJoin139; } ATTACHMENT = ApplicationCommandOptionType.ATTACHMENT; if (type === ATTACHMENT) { optionValidationResults = this.optionValidationResults; name = r3.name; success = optionValidationResults[name].success; if (!success) { ref = this.ref; current = ref.current; openCustomKeyboard = current.openCustomKeyboard; MEDIA = KeyboardTypes.MEDIA; COMMAND = MediaKeyboardTarget.COMMAND; Reflect.apply(openCustomKeyboard, current, [{type: MEDIA, context: {target: COMMAND, option: r3}}]); break reducibleJoin150; } } reducibleJoin144: while (true) { if (value36) { value48 = value27 != r3; r4 = value48; break reducibleJoin144; } r4 = value36; break reducibleJoin144; } reducibleJoin146: while (true) { if (r4) { type = r3.type; ATTACHMENT = ApplicationCommandOptionType.ATTACHMENT; value49 = type !== ATTACHMENT; r4 = value49; break reducibleJoin146; } break reducibleJoin146; } if (r4) { moduleValue5 = require(4022) /* metro dependency 4022: useKeyboardType */; getKeyboardType = moduleValue5.getKeyboardType; value50 = Reflect.apply(getKeyboardType, moduleValue5, []); SYSTEM = KeyboardTypes.SYSTEM; value51 = value50 !== SYSTEM; r4 = value51; break reducibleJoin148; } break reducibleJoin148; } reducibleJoin144: while (true) { if (value36) { value48 = value27 != r3; r4 = value48; break reducibleJoin144; } r4 = value36; break reducibleJoin144; } reducibleJoin146: while (true) { if (r4) { type = r3.type; ATTACHMENT = ApplicationCommandOptionType.ATTACHMENT; value49 = type !== ATTACHMENT; r4 = value49; break reducibleJoin146; } break reducibleJoin146; } if (r4) { moduleValue5 = require(4022) /* metro dependency 4022: useKeyboardType */; getKeyboardType = moduleValue5.getKeyboardType; value50 = Reflect.apply(getKeyboardType, moduleValue5, []); SYSTEM = KeyboardTypes.SYSTEM; value51 = value50 !== SYSTEM; r4 = value51; break reducibleJoin148; } break reducibleJoin148; } if (r4) { ref = this.ref; current = ref.current; closeCustomKeyboard = current.closeCustomKeyboard; Reflect.apply(closeCustomKeyboard, current, []); ref = this.ref; current = ref.current; focus = current.focus; Reflect.apply(focus, current, []); break reducibleJoin150; } break reducibleJoin150; } this.props = a0; object = {}; reducibleJoin152: while (true) { if (value27 == r11) { preferredCommandType = value28; break reducibleJoin152; } preferredCommandType = r11.preferredCommandType; break reducibleJoin152; } FULL_COMMAND = env1_15.FULL_COMMAND; reducibleJoin167: while (true) { if (preferredCommandType !== FULL_COMMAND) { break reducibleJoin167; } if (!value36) { if (!value) { break reducibleJoin167; } if (value27 != r3) { break reducibleJoin167; } } value52 = value27 == r11; reducibleJoin158: while (true) { if (value52) { r15 = value52; r16 = r11; break reducibleJoin158; } options = r11.options; value53 = value27 == options; r15 = value53; r16 = options; break reducibleJoin158; } reducibleJoin160: while (true) { if (r15) { break reducibleJoin160; } forEach = r16.forEach; Reflect.apply(forEach, r16, [_fun91235]); break reducibleJoin160; } if (value36) { reducibleJoin163: while (true) { if (value27 == r3) { break reducibleJoin163; } name = r3.name; object[name].hasValue = true; break reducibleJoin163; } activeOption = this.activeOption; if (value27 == activeOption) { break reducibleJoin167; } activeOption = this.activeOption; name = activeOption.name; property = object[name]; if (value27 == property) { break reducibleJoin167; } hasValue = property.hasValue; if (hasValue) { optionValidationResults = this.optionValidationResults; activeOption = this.activeOption; name = activeOption.name; property = optionValidationResults[name]; activeOption = this.activeOption; name = activeOption.name; object[name].lastValidationResult = property; break reducibleJoin167; } break reducibleJoin167; } break reducibleJoin167; } const currentOption = this.getCurrentOption(true, a0.selectionStart); reducibleJoin176: while (true) { if (value) { if (value27 == currentOption) { break reducibleJoin176; } name = currentOption.name; property = object[name]; reducibleJoin171: while (true) { if (value27 != property) { r12 = property; break reducibleJoin171; } r12 = {}; break reducibleJoin171; } optionsToNodes = this.optionsToNodes; get = optionsToNodes.get; value = Reflect.apply(get, optionsToNodes, [name]); reducibleJoin173: while (true) { if (value27 == value) { location = value28; break reducibleJoin173; } location = value.location; break reducibleJoin173; } r12.location = location; optionsToNodes = this.optionsToNodes; get = optionsToNodes.get; value = Reflect.apply(get, optionsToNodes, [name]); reducibleJoin175: while (true) { if (value27 == value) { length = value28; break reducibleJoin175; } length = value.length; break reducibleJoin175; } r12.length = length; optionValues = this.optionValues; r12.optionValue = optionValues[name]; r12.hasValue = true; object[name] = r12; break reducibleJoin176; } break reducibleJoin176; } this.activeCommand = r11; this.activeCommandSection = r10; this.activeOption = r3; reducibleJoin178: while (true) { if (value29) { r1 = value29; break reducibleJoin178; } Object = global.Object; keys = Object.keys; length = Reflect.apply(keys, Object, [object]).length; value = length > 0; r1 = value; break reducibleJoin178; } r1 = !r1 ? r2 : r1; reducibleJoin189: while (true) { if (r1) { value = importAll(7166) /* metro dependency 7166: ApplicationCommandActionCreators */; updateChannelState = value.updateChannelState; object3 = {}; channel = a0.channel; id = channel.id; object3.channelId = id; activeCommand = this.activeCommand; reducibleJoin182: while (true) { if (value27 == activeCommand) { preferredCommandType = value28; break reducibleJoin182; } preferredCommandType = activeCommand.preferredCommandType; break reducibleJoin182; } FULL_COMMAND = env1_15.FULL_COMMAND; reducibleJoin184: while (true) { if (preferredCommandType !== FULL_COMMAND) { activeCommand = value27; break reducibleJoin184; } activeCommand = this.activeCommand; break reducibleJoin184; } object3.command = activeCommand; activeCommandSection = this.activeCommandSection; r7 = value27 != activeCommandSection ? activeCommandSection : value27; object3.section = r7; preferredCommand = this.preferredCommand; reducibleJoin187: while (true) { if (value27 == preferredCommand) { id = value28; break reducibleJoin187; } id = preferredCommand.id; break reducibleJoin187; } r6 = value27 != id ? id : value27; object3.preferredCommandId = r6; location = this.location; object3.location = location; object3.changedOptionStates = object; Reflect.apply(updateChannelState, value, [object3]); break reducibleJoin189; } break reducibleJoin189; } return value28; function _fun91231(a0) { // fn#91231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:14289, offset: 0x02057a85, size: 288 bytes, params: 2, frame: 17 var data; const ChatInputParseResultDataType = (ChatInputParserModule).ChatInputParseResultDataType; var optionValueNodes; var optionsToNodes; const type = a0.type; const value = environment.__proto__.__proto__; const value2 = undefined; const ChatInputNodeType = (ChatInputParserModule).ChatInputNodeType; const COMMAND_OPTION = ChatInputNodeType.COMMAND_OPTION; if (type !== COMMAND_OPTION) { if (a0.type === ChatInputNodeType.COMMAND_OPTION_WITH_VALUE && (a0.data == null ? value2 : a0.data.type) === ChatInputParseResultDataType.COMMAND_OPTION) { optionValueNodes = env0_0.optionValueNodes; optionValueNodes.set(a0.data.option.name, a0); } } else { data = a0.data; if ((data == null ? value2 : data.type) === ChatInputParseResultDataType.COMMAND_OPTION) { optionsToNodes = env0_0.optionsToNodes; optionsToNodes.set(a0.data.option.name, a0); } else if (a0.type === ChatInputNodeType.COMMAND_OPTION_WITH_VALUE && (a0.data == null ? value2 : a0.data.type) === ChatInputParseResultDataType.COMMAND_OPTION) { optionValueNodes = env0_0.optionValueNodes; optionValueNodes.set(a0.data.option.name, a0); } } return value2; } function _fun91232(a0) { // fn#91232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:16006, offset: 0x02057ba5, size: 467 bytes, params: 2, frame: 20 var name; var r1; var option; var name2; var activeOptionBinding; var object; var optionValidationResults; var property; var name3; const ApplicationCommandOptionType = (ServerModule).ApplicationCommandOptionType; const type = a0.type; const value = environment.__proto__.__proto__; const value2 = undefined; const ChatInputNodeType = (ChatInputParserModule).ChatInputNodeType; const COMMAND_OPTION = ChatInputNodeType.COMMAND_OPTION; if (type === COMMAND_OPTION) { if (a0.data != null) { option = a0.data.option; if (a0.type !== ChatInputNodeType.COMMAND_OPTION_WITH_VALUE) { object = {}; copyDataProperties(object, a0, undefined); optionValidationResults = env0_0.optionValidationResults; name = option.name; property = optionValidationResults[name]; name3 = option.name; activeOptionBinding = activeOption; name = activeOptionBinding == null ? value2 : activeOptionBinding.name; if (name3 === name) { object.style = env0_0.styles.commandOption(); } else if (value2 === property) { object.style = env0_0.styles.commandOption(); } else if (property.success) { object.style = env0_0.styles.commandOption(); } else { object.style = env0_0.styles.commandErrorOption(); } r1 = property != null && property.success; r1 = r1 && option.type === ApplicationCommandOptionType.ATTACHMENT; if (r1) { object.tapAction = {action: 'tapAttachment', channelId: env0_1.channel.id, optionName: option.name}; object.deleteNodeOnBackspace = true; } return object; } name2 = option.name; activeOptionBinding = activeOption; name = activeOptionBinding == null ? value2 : activeOptionBinding.name; if (name2 !== name) { object = {}; copyDataProperties(object, a0, undefined); optionValidationResults = env0_0.optionValidationResults; name = option.name; property = optionValidationResults[name]; name3 = option.name; activeOptionBinding = activeOption; name = activeOptionBinding == null ? value2 : activeOptionBinding.name; if (name3 === name) { object.style = env0_0.styles.commandOption(); } else if (value2 === property) { object.style = env0_0.styles.commandOption(); } else if (property.success) { object.style = env0_0.styles.commandOption(); } else { object.style = env0_0.styles.commandErrorOption(); } r1 = property != null && property.success; r1 = r1 && option.type === ApplicationCommandOptionType.ATTACHMENT; if (r1) { object.tapAction = {action: 'tapAttachment', channelId: env0_1.channel.id, optionName: option.name}; object.deleteNodeOnBackspace = true; } return object; } if (result) { if (result_2) { if (result_3) { object = {}; copyDataProperties(object, a0, undefined); optionValidationResults = env0_0.optionValidationResults; name = option.name; property = optionValidationResults[name]; name3 = option.name; activeOptionBinding = activeOption; name = activeOptionBinding == null ? value2 : activeOptionBinding.name; if (name3 === name) { object.style = env0_0.styles.commandOption(); } else if (value2 === property) { object.style = env0_0.styles.commandOption(); } else if (property.success) { object.style = env0_0.styles.commandOption(); } else { object.style = env0_0.styles.commandErrorOption(); } r1 = property != null && property.success; r1 = r1 && option.type === ApplicationCommandOptionType.ATTACHMENT; if (r1) { object.tapAction = {action: 'tapAttachment', channelId: env0_1.channel.id, optionName: option.name}; object.deleteNodeOnBackspace = true; } return object; } object = {}; copyDataProperties(object, a0, undefined); object['style'] = value2; return object; } object = {}; copyDataProperties(object, a0, undefined); object['style'] = value2; return object; } object = {}; copyDataProperties(object, a0, undefined); optionValidationResults = env0_0.optionValidationResults; name = option.name; property = optionValidationResults[name]; name3 = option.name; activeOptionBinding = activeOption; name = activeOptionBinding == null ? value2 : activeOptionBinding.name; if (name3 === name) { object.style = env0_0.styles.commandOption(); } else if (value2 === property) { object.style = env0_0.styles.commandOption(); } else if (property.success) { object.style = env0_0.styles.commandOption(); } else { object.style = env0_0.styles.commandErrorOption(); } r1 = property != null && property.success; r1 = r1 && option.type === ApplicationCommandOptionType.ATTACHMENT; if (r1) { object.tapAction = {action: 'tapAttachment', channelId: env0_1.channel.id, optionName: option.name}; object.deleteNodeOnBackspace = true; } return object; } } else { if (a0.type !== ChatInputNodeType.COMMAND_OPTION_WITH_VALUE) { return a0; } if (a0.data != null) { option = a0.data.option; if (a0.type !== ChatInputNodeType.COMMAND_OPTION_WITH_VALUE) { object = {}; copyDataProperties(object, a0, undefined); optionValidationResults = env0_0.optionValidationResults; name = option.name; property = optionValidationResults[name]; name3 = option.name; activeOptionBinding = activeOption; name = activeOptionBinding == null ? value2 : activeOptionBinding.name; if (name3 === name) { object.style = env0_0.styles.commandOption(); } else if (value2 === property) { object.style = env0_0.styles.commandOption(); } else if (property.success) { object.style = env0_0.styles.commandOption(); } else { object.style = env0_0.styles.commandErrorOption(); } r1 = property != null && property.success; r1 = r1 && option.type === ApplicationCommandOptionType.ATTACHMENT; if (r1) { object.tapAction = {action: 'tapAttachment', channelId: env0_1.channel.id, optionName: option.name}; object.deleteNodeOnBackspace = true; } return object; } name2 = option.name; activeOptionBinding = activeOption; name = activeOptionBinding == null ? value2 : activeOptionBinding.name; if (name2 !== name) { object = {}; copyDataProperties(object, a0, undefined); optionValidationResults = env0_0.optionValidationResults; name = option.name; property = optionValidationResults[name]; name3 = option.name; activeOptionBinding = activeOption; name = activeOptionBinding == null ? value2 : activeOptionBinding.name; if (name3 === name) { object.style = env0_0.styles.commandOption(); } else if (value2 === property) { object.style = env0_0.styles.commandOption(); } else if (property.success) { object.style = env0_0.styles.commandOption(); } else { object.style = env0_0.styles.commandErrorOption(); } r1 = property != null && property.success; r1 = r1 && option.type === ApplicationCommandOptionType.ATTACHMENT; if (r1) { object.tapAction = {action: 'tapAttachment', channelId: env0_1.channel.id, optionName: option.name}; object.deleteNodeOnBackspace = true; } return object; } if (result) { if (result_2) { if (result_3) { object = {}; copyDataProperties(object, a0, undefined); optionValidationResults = env0_0.optionValidationResults; name = option.name; property = optionValidationResults[name]; name3 = option.name; activeOptionBinding = activeOption; name = activeOptionBinding == null ? value2 : activeOptionBinding.name; if (name3 === name) { object.style = env0_0.styles.commandOption(); } else if (value2 === property) { object.style = env0_0.styles.commandOption(); } else if (property.success) { object.style = env0_0.styles.commandOption(); } else { object.style = env0_0.styles.commandErrorOption(); } r1 = property != null && property.success; r1 = r1 && option.type === ApplicationCommandOptionType.ATTACHMENT; if (r1) { object.tapAction = {action: 'tapAttachment', channelId: env0_1.channel.id, optionName: option.name}; object.deleteNodeOnBackspace = true; } return object; } object = {}; copyDataProperties(object, a0, undefined); object['style'] = value2; return object; } object = {}; copyDataProperties(object, a0, undefined); object['style'] = value2; return object; } object = {}; copyDataProperties(object, a0, undefined); optionValidationResults = env0_0.optionValidationResults; name = option.name; property = optionValidationResults[name]; name3 = option.name; activeOptionBinding = activeOption; name = activeOptionBinding == null ? value2 : activeOptionBinding.name; if (name3 === name) { object.style = env0_0.styles.commandOption(); } else if (value2 === property) { object.style = env0_0.styles.commandOption(); } else if (property.success) { object.style = env0_0.styles.commandOption(); } else { object.style = env0_0.styles.commandErrorOption(); } r1 = property != null && property.success; r1 = r1 && option.type === ApplicationCommandOptionType.ATTACHMENT; if (r1) { object.tapAction = {action: 'tapAttachment', channelId: env0_1.channel.id, optionName: option.name}; object.deleteNodeOnBackspace = true; } return object; } } return a0; } function _fun91235({name}) { // fn#91235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:18132, offset: 0x02057d91, size: 172 bytes, params: 2, frame: 18 const property = env0_0.optionValues[name]; const object = {}; var name = activeOption?.name; object.isActive = name === name; object.optionValue = property; object.hasValue = property != null && property.length > 0; object.location = env0_0.optionsToNodes.get(name)?.location; object.length = env0_0.optionsToNodes.get(name)?.length; CreateClass[name] = object; } } function value_91236() { // fn#91236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:19449, offset: 0x02057e3d, size: 154 bytes, params: 1, frame: 19 var r5; var r6; var value3; var options; let activeCommand = this.activeCommand; const value = undefined; const preferredCommandType = activeCommand == null ? value : activeCommand.preferredCommandType; const FULL_COMMAND = env1_15.FULL_COMMAND; if (preferredCommandType === FULL_COMMAND) { activeCommand = this.activeCommand; value3 = activeCommand == null; if (value3) { r5 = value3; r6 = activeCommand; } else { options = activeCommand.options; r5 = options == null; r6 = options; } if (!r5) { r6.forEach(_fun91237); } } ApplicationCommandActionCreatorsModule.updateOptionStates(this.props.channel.id, {}); return value; function _fun91237({name}) { // fn#91237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12071:19639, offset: 0x02057ed7, size: 44 bytes, params: 2, frame: 4 env0_1[name] = {lastValidationResult: env0_0.optionValidationResults[name]}; } } } } global.__d(_fun91179, 11885, [57, 6, 7, 4645, 7168, 661, 6625, 1580, 11858, 7166, 5065, 8060, 5068, 8051, 11857, 1909, 11573, 4100, 22, 11695, 11647, 4081, 4863, 11017, 7879, 4022, 1583, 11693, 2]) /* metro module 11885, dependencies: [57, 6, 7, 4645, 7168, 661, 6625, 1580, 11858, 7166, 5065, 8060, 5068, 8051, 11857, 1909, 11573, 4100, 22, 11695, 11647, 4081, 4863, 11017, 7879, 4022, 1583, 11693, 2] */;