103 lines
4.9 KiB
TypeScript
103 lines
4.9 KiB
TypeScript
/* Metro module 8053; source: modules/application_commands/ApplicationCommandChoiceUtils.tsx; dependencies: [7167, 5066, 2] */
|
|
import ApplicationCommandAutocompleteStore from './ApplicationCommandAutocompleteStore.tsx'; /* Metro dependency 7167 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ApplicationCommandConstantsModule from './ApplicationCommandConstants.tsx'; /* Metro dependency 5066 */
|
|
|
|
function _fun63878(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8231:6, offset: 0x01b94379, size: 188 bytes, params: 8, frame: 20
|
|
const closure = function(a0, a1) {
|
|
var r0;
|
|
var value2;
|
|
var env0_0 = a1;
|
|
var value = undefined;
|
|
if (a0 == null) {
|
|
r0 = value;
|
|
} else {
|
|
value2 = a0.find(_fun63880);
|
|
r0 = value2 == null ? value : value2.value;
|
|
}
|
|
return typeof r0 === 'string' ? r0 : value;
|
|
};
|
|
const closure2 = function(a0, a1) {
|
|
var r0;
|
|
var value2;
|
|
var env0_0 = a1;
|
|
var value = undefined;
|
|
if (a0 == null) {
|
|
r0 = value;
|
|
} else {
|
|
value2 = a0.find(_fun63882);
|
|
r0 = value2 == null ? value : value2.value;
|
|
}
|
|
return typeof r0 === 'number' ? r0 : value;
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/ApplicationCommandChoiceUtils.tsx');
|
|
exports.toChoiceBooleanValue = function(a0) {
|
|
var value = a0.toLowerCase();
|
|
value = value === TRUE_OPTION_NAME.toLowerCase();
|
|
var value3 = a0.toLowerCase();
|
|
var value4 = FALSE_OPTION_NAME.toLowerCase();
|
|
if (value) {
|
|
return value;
|
|
}
|
|
if (value3 === value4) {
|
|
return value;
|
|
}
|
|
};
|
|
exports.findChoiceStringValue = closure;
|
|
exports.findChoiceNumberValue = closure2;
|
|
exports.findAutocompleteChoiceStringValue = findAutocompleteChoiceStringValue;
|
|
exports.findAutocompleteChoiceNumberValue = findAutocompleteChoiceNumberValue;
|
|
function findChoiceStringValue(a0, a1) { // fn#63879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8231:159, offset: 0x01b94435, size: 70 bytes, params: 3, frame: 14
|
|
var r0;
|
|
var value2;
|
|
const env0_0 = a1;
|
|
const value = undefined;
|
|
if (a0 == null) {
|
|
r0 = value;
|
|
} else {
|
|
value2 = a0.find(function({displayName}) {
|
|
return displayName === require;
|
|
});
|
|
r0 = value2 == null ? value : value2.value;
|
|
}
|
|
return typeof r0 === 'string' ? r0 : value;
|
|
function _fun63880({displayName}) { // fn#63880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8231:229, offset: 0x01b9447b, size: 21 bytes, params: 2, frame: 2
|
|
return displayName === require;
|
|
}
|
|
|
|
}
|
|
|
|
function findChoiceNumberValue(a0, a1) { // fn#63881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8231:299, offset: 0x01b94490, size: 70 bytes, params: 3, frame: 14
|
|
var r0;
|
|
var value2;
|
|
const env0_0 = a1;
|
|
const value = undefined;
|
|
if (a0 == null) {
|
|
r0 = value;
|
|
} else {
|
|
value2 = a0.find(function({displayName}) {
|
|
return displayName === require;
|
|
});
|
|
r0 = value2 == null ? value : value2.value;
|
|
}
|
|
return typeof r0 === 'number' ? r0 : value;
|
|
function _fun63882({displayName}) { // fn#63882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8231:369, offset: 0x01b9447b, size: 21 bytes, params: 2, frame: 2
|
|
return displayName === require;
|
|
}
|
|
|
|
}
|
|
|
|
function findAutocompleteChoiceStringValue(a0, a1, a2) { // fn#63884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8231:813, offset: 0x01b9451d, size: 42 bytes, params: 4, frame: 14
|
|
return findChoiceStringValue(ApplicationCommandAutocompleteStore.getAutocompleteLastChoices(a0, a1), a2);
|
|
}
|
|
|
|
function findAutocompleteChoiceNumberValue(a0, a1, a2) { // fn#63885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8231:966, offset: 0x01b94547, size: 42 bytes, params: 4, frame: 14
|
|
return findChoiceNumberValue(ApplicationCommandAutocompleteStore.getAutocompleteLastChoices(a0, a1), a2);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun63878, 8053, [7167, 5066, 2]) /* metro module 8053, dependencies: [7167, 5066, 2] */;
|