/* Metro module 7075; source: stores/EditMessageStore.tsx; dependencies: [6, 7, 15, 17, 18, 4814, 3829, 7076, 7079, 566, 694, 2] */ import ClassCallCheck from '../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */ import CreateClass from '../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */ import PossibleConstructorReturn from '../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */ import Module00017 from '../by-id/module-00017.js'; /* Metro dependency 17 */ import Inherits from '../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */ import Flux from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */ import MessageStore from './MessageStore.tsx'; /* Metro dependency 4814 */ import MessageParser from '../modules/messages/MessageParser.tsx'; /* Metro dependency 7076 */ import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as UserSettingsModule from '../modules/user_settings/UserSettings.tsx'; /* Metro dependency 3829 */ import * as SlateUtilsModule from '../modules/channel_text_area/slate/SlateUtils.tsx'; /* Metro dependency 7079 */ function _fun56398(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:6, offset: 0x013c6bf0, size: 343 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let env0_9 = {}; let env0_10 = {}; const Store = (Flux).Store; let value = _fun56402(Store); value.displayName = 'EditMessageStore'; value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {MESSAGE_START_EDIT: MESSAGE_START_EDIT, MESSAGE_UPDATE_EDIT: MESSAGE_UPDATE_EDIT, MESSAGE_END_EDIT: MESSAGE_END_EDIT, MESSAGE_DELETE: MESSAGE_DELETE_56415, LOGOUT: function() { env0_9 = {}; env0_10 = {}; }}); (FileImportTrackerModule).fileFinishedImporting('stores/EditMessageStore.tsx'); exports.default = value; function _isNativeReflectConstruct_56399() { // fn#56399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:158, offset: 0x013c6d47, size: 94 bytes, params: 1, frame: 18 var Boolean; var prototype; var valueOf; var call; var Reflect; var construct; var closure; var value; var error; try { Boolean = global.Boolean; prototype = Boolean.prototype; valueOf = prototype.valueOf; call = valueOf.call; Reflect = global.Reflect; construct = Reflect.construct; Boolean = global.Boolean; closure = function() { }; value = Reflect.apply(construct, Reflect, [Boolean, [], closure]); value = Reflect.apply(call, valueOf, [value]); var result = !value; } catch (error) { } return (_isNativeReflectConstruct_56399_isNativeReflectConstruct = function() { return !!result; })(); } function _fun56402(a0) { // fn#56402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:371, offset: 0x013c6da5, size: 237 bytes, params: 2, frame: 16 const EditMessageStore2 = EditMessageStore; Inherits(EditMessageStore2, a0); return CreateClass(EditMessageStore2, [{key: 'initialize', value: function() { this.waitFor(MessageStore); }}, {key: 'isEditing', value: value_56405}, {key: 'isEditingAny', value: value_56406}, {key: 'getEditingTextValue', value: value_56407}, {key: 'getEditingRichValue', value: value_56408}, {key: 'getEditingMessageId', value: value_56409}, {key: 'getEditingMessage', value: value_56410}, {key: 'getEditActionSource', value: value_56411}]); function EditMessageStore() { // fn#56403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:383, offset: 0x0102b796, size: 113 bytes, params: 1, frame: 20 const value = environment.__proto__; env1_3(this, EditMessageStore); const value3 = env1_6(EditMessageStore); return env1_5(this, _isNativeReflectConstruct_56399() ? global.Reflect.construct(value3, arguments, env1_6(this).constructor) : value3.apply(this, arguments)); } function value_56405(a0, a1) { // fn#56405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:733, offset: 0x013c6e92, size: 39 bytes, params: 3, frame: 3 const value = environment.__proto__; return env1_9[a0]?.messageId === a1; } function value_56406(a0) { // fn#56406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:827, offset: 0x013c6eb9, size: 22 bytes, params: 2, frame: 2 return env1_9[a0] != null; } function value_56407(a0) { // fn#56407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:892, offset: 0x013c6ecf, size: 33 bytes, params: 2, frame: 3 const value = environment.__proto__; return env1_9[a0]?.textValue; } function value_56408(a0) { // fn#56408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:986, offset: 0x013c6ef0, size: 33 bytes, params: 2, frame: 3 const value = environment.__proto__; return env1_9[a0]?.richValue; } function value_56409(a0) { // fn#56409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:1080, offset: 0x013c6f11, size: 32 bytes, params: 2, frame: 3 const value = environment.__proto__; return env1_9[a0]?.messageId; } function value_56410(a0) { // fn#56410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:1172, offset: 0x013c6f31, size: 62 bytes, params: 2, frame: 15 const value = environment.__proto__; const property = env1_9[a0]; const value2 = null; return value2 != property && value2 != property.messageId ? MessageStore.getMessage(a0, property.messageId) : value2; } function value_56411(a0) { // fn#56411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:1297, offset: 0x010353e1, size: 16 bytes, params: 2, frame: 2 return env1_10[a0]; } } function MESSAGE_START_EDIT({channelId, messageId, content, source}) { // fn#56412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:1415, offset: 0x013c6f6f, size: 159 bytes, params: 2, frame: 22 const UseLegacyChatInput = (UserSettingsModule).UseLegacyChatInput; const setting = UseLegacyChatInput.getSetting(); const value3 = (MessageParser).unparse(content, channelId); const binding = env0_9; const object = {channelId: channelId, messageId: messageId, textValue: value3}; object.richValue = SlateUtilsModule.toRichValue(setting ? value3 : content); binding[channelId] = object; env0_10[channelId] = source; } function MESSAGE_UPDATE_EDIT({channelId, textValue, richValue}) { // fn#56413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:1670, offset: 0x013c700e, size: 83 bytes, params: 2, frame: 15 const property = env0_9[channelId]; if (property == null) { return false; } const binding = env0_9; const object = {}; copyDataProperties(object, property, textValue); object['textValue'] = textValue; object['richValue'] = richValue; binding[channelId] = object; } function MESSAGE_END_EDIT({channelId}) { // fn#56414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:1827, offset: 0x013c7061, size: 53 bytes, params: 2, frame: 4 if (channelId == null) { return false; } if (env0_9[channelId] == null) { return false; } delete env0_9[channelId]; delete env0_10[channelId]; } function MESSAGE_DELETE_56415({channelId, id}) { // fn#56415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:1944, offset: 0x013c7096, size: 64 bytes, params: 2, frame: 7 if (env0_9[channelId]?.messageId === id) { delete env0_9[channelId]; delete env0_10[channelId]; } } } global.__d(_fun56398, 7075, [6, 7, 15, 17, 18, 4814, 3829, 7076, 7079, 566, 694, 2]) /* metro module 7075, dependencies: [6, 7, 15, 17, 18, 4814, 3829, 7076, 7079, 566, 694, 2] */;