117 lines
6.0 KiB
TypeScript
117 lines
6.0 KiB
TypeScript
/* Metro module 11858; source: modules/chat_input/native/ChatInputParser.tsx; dependencies: [6, 7, 27, 22, 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 * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
|
|
function _fun90920(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12044:6, offset: 0x0204c4eb, size: 312 bytes, params: 8, frame: 23
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
object = {COMMAND_OPTION: 0};
|
|
object[0] = 'COMMAND_OPTION';
|
|
object.ROLE_HIGHLIGHT = 1;
|
|
object[1] = 'ROLE_HIGHLIGHT';
|
|
const object2 = {COMMAND_OPTION: 0};
|
|
object2[0] = 'COMMAND_OPTION';
|
|
object2.COMMAND_OPTION_WITH_VALUE = 1;
|
|
object2[1] = 'COMMAND_OPTION_WITH_VALUE';
|
|
object2.EMOJI_HIGHLIGHT = 2;
|
|
object2[2] = 'EMOJI_HIGHLIGHT';
|
|
object2.USER_HIGHLIGHT = 3;
|
|
object2[3] = 'USER_HIGHLIGHT';
|
|
object2.ROLE_HIGHLIGHT = 4;
|
|
object2[4] = 'ROLE_HIGHLIGHT';
|
|
object2.CHANNEL_HIGHLIGHT = 5;
|
|
object2[5] = 'CHANNEL_HIGHLIGHT';
|
|
object2.SILENT_HIGHLIGHT = 6;
|
|
object2[6] = 'SILENT_HIGHLIGHT';
|
|
const value = _fun90921();
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/chat_input/native/ChatInputParser.tsx');
|
|
exports.default = value;
|
|
exports.convertToNativeStyle = convertToNativeStyle;
|
|
exports.ChatInputParseResultDataType = object;
|
|
exports.ChatInputNodeType = object2;
|
|
function _fun90921() { // fn#90921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12044:582, offset: 0x0204c623, size: 109 bytes, params: 1, frame: 15
|
|
return CreateClass(ChatInputParser, [{key: 'addRule', value: function(a0) {
|
|
this.rules[a0.ruleId] = a0;
|
|
}}, {key: 'removeRule', value: function(a0) {
|
|
delete this.rules[a0];
|
|
}}, {key: 'parse', value: value_90925}]);
|
|
function ChatInputParser() { // fn#90922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12044:603, offset: 0x0204c690, size: 35 bytes, params: 1, frame: 13
|
|
env1_2(this, ChatInputParser);
|
|
this.rules = {};
|
|
}
|
|
|
|
function value_90925(a0, a1) { // fn#90925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12044:807, offset: 0x0204c6e1, size: 86 bytes, params: 3, frame: 13
|
|
var environment;
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
let value = environment.__proto__;
|
|
value = Reflect.apply((importDefault(22) /* metro dependency 22 */).valuesIn, value, [this.rules]);
|
|
return value.reduce(_fun90926, []);
|
|
function _fun90926(a0, a1) { // fn#90926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12044:865, offset: 0x0204c737, size: 64 bytes, params: 3, frame: 15
|
|
const env0_0 = a1;
|
|
let value = a1.matchFunction(env0_0, require);
|
|
value = value.map(_fun90927);
|
|
return a0.concat(value);
|
|
function _fun90927(a0) { // fn#90927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12044:905, offset: 0x0204c777, size: 169 bytes, params: 2, frame: 16
|
|
var r4;
|
|
var r6;
|
|
const r3 = typeof require.deleteNodeOnBackspace === 'function' ? require.deleteNodeOnBackspace(a0) : require.deleteNodeOnBackspace;
|
|
const r2 = typeof require.editDisabled === 'function' ? require.editDisabled(a0) : require.editDisabled;
|
|
const object = {};
|
|
object.type = require.type;
|
|
const value4 = require.style == null;
|
|
if (value4) {
|
|
r4 = undefined;
|
|
r6 = value4;
|
|
} else {
|
|
r4 = require.style(a0);
|
|
r6 = require;
|
|
}
|
|
object.style = r4;
|
|
object.deleteNodeOnBackspace = r3;
|
|
object.editDisabled = r2;
|
|
copyDataProperties(object, a0, r6);
|
|
return object;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function convertToNativeStyle(a0) { // fn#90928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12044:1329, offset: 0x0204c820, size: 138 bytes, params: 2, frame: 18
|
|
var r2;
|
|
var object;
|
|
const backgroundColor = a0.backgroundColor;
|
|
const color = a0.color;
|
|
const borderRadius = a0.borderRadius;
|
|
const object2 = {'backgroundColor': 0, 'color': 0, 'borderRadius': 0};
|
|
const value = null;
|
|
silentSetPrototypeOf(object2, value, undefined);
|
|
const value2 = copyDataProperties({}, a0, object2, backgroundColor);
|
|
if (value != backgroundColor) {
|
|
if (value != borderRadius) {
|
|
object = {};
|
|
object.backgroundColor = processColor(backgroundColor);
|
|
object.cornerRadius = borderRadius;
|
|
r2 = object;
|
|
} else {
|
|
r2 = value;
|
|
}
|
|
} else {
|
|
r2 = value;
|
|
}
|
|
const object3 = {};
|
|
object3.color = processColor(color);
|
|
object3.backgroundStyle = r2;
|
|
copyDataProperties(object3, value2, object2);
|
|
return object3;
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun90920, 11858, [6, 7, 27, 22, 2]) /* metro module 11858, dependencies: [6, 7, 27, 22, 2] */;
|