516 lines
20 KiB
JavaScript
516 lines
20 KiB
JavaScript
/* Metro module 7429; source: unknown; dependencies: [57, 77, 7375, 7376, 7414, 7380] */
|
|
import * as Module00057Module from './module-00057.js'; /* Metro dependency 57 */
|
|
import * as Module00077Module from './module-00077.js'; /* Metro dependency 77 */
|
|
import * as Module07376Module from './module-07376.js'; /* Metro dependency 7376 */
|
|
import * as Module07380Module from './module-07380.js'; /* Metro dependency 7380 */
|
|
|
|
function _fun59954(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7607:6, offset: 0x016f79ba, size: 156 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const closure = function(a0, {stack}) {
|
|
return a0(stack || '', 1);
|
|
};
|
|
const exceptionFromError_599562 = exceptionFromError_59956;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
exports.eventFromMessage = eventFromMessage_59959;
|
|
exports.eventFromUnknownInput = eventFromUnknownInput_59960;
|
|
exports.exceptionFromError = exceptionFromError_599562;
|
|
exports.parseStackFrames = closure;
|
|
function exceptionFromError_59956(a0, a1) { // fn#59956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7607:110, offset: 0x016f7a56, size: 77 bytes, params: 3, frame: 14
|
|
const object = {};
|
|
let name = a1.name;
|
|
name = !name ? a1.constructor.name : name;
|
|
object.type = name;
|
|
object.value = a1.message;
|
|
const stackFrames_59955 = parseStackFrames_59955(a0, a1);
|
|
if (stackFrames_59955.length) {
|
|
object.stacktrace = {frames: stackFrames_59955};
|
|
}
|
|
return object;
|
|
}
|
|
|
|
function getMessageForObject_59957(a0) { // fn#59957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7607:268, offset: 0x016f7aa3, size: 385 bytes, params: 2, frame: 18
|
|
var name;
|
|
var r4;
|
|
var r0;
|
|
var value;
|
|
var value2;
|
|
var moduleValue2;
|
|
var Object;
|
|
var getPrototypeOf;
|
|
var value3;
|
|
var constructor;
|
|
var error;
|
|
if ('name' in a0) {
|
|
name = a0.name;
|
|
if (typeof name === 'string') {
|
|
value = "'" + a0.name + "' captured as exception";
|
|
if ('message' in a0 && typeof a0.message === 'string') {
|
|
value += " with message '" + a0.message + "'";
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
if ('message' in a0) {
|
|
if (typeof a0.message === 'string') {
|
|
return a0.message;
|
|
}
|
|
value = undefined;
|
|
value2 = (require(7375) /* metro dependency 7375 */).extractExceptionKeysForMessage(a0);
|
|
moduleValue2 = require(7376) /* metro dependency 7376 */;
|
|
if (moduleValue2.isErrorEvent(a0)) {
|
|
return 'Event `ErrorEvent` captured as exception with message `' + a0.message + '`';
|
|
}
|
|
try {
|
|
Object = global.Object;
|
|
value3 = Object.getPrototypeOf(a0);
|
|
if (value3) {
|
|
constructor = value3.constructor;
|
|
name = constructor.name;
|
|
} else {
|
|
name = value;
|
|
}
|
|
} catch (error) {
|
|
name = value;
|
|
}
|
|
value = 'Object';
|
|
return '' + (name ? value === name ? value : "'" + name + "'" : value) + ' captured as exception with keys: ' + value2;
|
|
}
|
|
value = undefined;
|
|
value2 = (require(7375) /* metro dependency 7375 */).extractExceptionKeysForMessage(a0);
|
|
moduleValue2 = require(7376) /* metro dependency 7376 */;
|
|
if (moduleValue2.isErrorEvent(a0)) {
|
|
return 'Event `ErrorEvent` captured as exception with message `' + a0.message + '`';
|
|
}
|
|
try {
|
|
Object = global.Object;
|
|
} catch (error) {
|
|
name = value;
|
|
value = 'Object';
|
|
if (name) {
|
|
if (value === name) {
|
|
r4 = value;
|
|
} else {
|
|
value = "'" + name + "'";
|
|
r4 = value;
|
|
}
|
|
} else {
|
|
r4 = value;
|
|
}
|
|
return '' + r4 + ' captured as exception with keys: ' + value2;
|
|
}
|
|
try {
|
|
getPrototypeOf = Object.getPrototypeOf;
|
|
} catch (error) {
|
|
name = value;
|
|
value = 'Object';
|
|
if (name) {
|
|
if (value === name) {
|
|
r4 = value;
|
|
} else {
|
|
value = "'" + name + "'";
|
|
r4 = value;
|
|
}
|
|
} else {
|
|
r4 = value;
|
|
}
|
|
return '' + r4 + ' captured as exception with keys: ' + value2;
|
|
}
|
|
try {
|
|
value3 = Reflect.apply(getPrototypeOf, Object, [a0]);
|
|
} catch (error) {
|
|
name = value;
|
|
value = 'Object';
|
|
if (name) {
|
|
if (value === name) {
|
|
r4 = value;
|
|
} else {
|
|
value = "'" + name + "'";
|
|
r4 = value;
|
|
}
|
|
} else {
|
|
r4 = value;
|
|
}
|
|
return '' + r4 + ' captured as exception with keys: ' + value2;
|
|
}
|
|
if (value3) {
|
|
try {
|
|
constructor = value3.constructor;
|
|
} catch (error) {
|
|
name = value;
|
|
value = 'Object';
|
|
if (name) {
|
|
if (value === name) {
|
|
r4 = value;
|
|
} else {
|
|
value = "'" + name + "'";
|
|
r4 = value;
|
|
}
|
|
} else {
|
|
r4 = value;
|
|
}
|
|
return '' + r4 + ' captured as exception with keys: ' + value2;
|
|
}
|
|
try {
|
|
name = constructor.name;
|
|
} catch (error) {
|
|
name = value;
|
|
value = 'Object';
|
|
if (name) {
|
|
if (value === name) {
|
|
r4 = value;
|
|
} else {
|
|
value = "'" + name + "'";
|
|
r4 = value;
|
|
}
|
|
} else {
|
|
r4 = value;
|
|
}
|
|
return '' + r4 + ' captured as exception with keys: ' + value2;
|
|
}
|
|
} else {
|
|
name = value;
|
|
}
|
|
value = 'Object';
|
|
r4 = name ? value === name ? value : "'" + name + "'" : value;
|
|
return '' + r4 + ' captured as exception with keys: ' + value2;
|
|
}
|
|
if ('message' in a0) {
|
|
if (typeof a0.message === 'string') {
|
|
return a0.message;
|
|
}
|
|
value = undefined;
|
|
value2 = (require(7375) /* metro dependency 7375 */).extractExceptionKeysForMessage(a0);
|
|
moduleValue2 = require(7376) /* metro dependency 7376 */;
|
|
if (moduleValue2.isErrorEvent(a0)) {
|
|
return 'Event `ErrorEvent` captured as exception with message `' + a0.message + '`';
|
|
}
|
|
try {
|
|
Object = global.Object;
|
|
} catch (error) {
|
|
name = value;
|
|
value = 'Object';
|
|
if (name) {
|
|
if (value === name) {
|
|
r4 = value;
|
|
} else {
|
|
value = "'" + name + "'";
|
|
r4 = value;
|
|
}
|
|
} else {
|
|
r4 = value;
|
|
}
|
|
return '' + r4 + ' captured as exception with keys: ' + value2;
|
|
}
|
|
try {
|
|
getPrototypeOf = Object.getPrototypeOf;
|
|
} catch (error) {
|
|
name = value;
|
|
value = 'Object';
|
|
if (name) {
|
|
if (value === name) {
|
|
r4 = value;
|
|
} else {
|
|
value = "'" + name + "'";
|
|
r4 = value;
|
|
}
|
|
} else {
|
|
r4 = value;
|
|
}
|
|
return '' + r4 + ' captured as exception with keys: ' + value2;
|
|
}
|
|
try {
|
|
value3 = Reflect.apply(getPrototypeOf, Object, [a0]);
|
|
} catch (error) {
|
|
name = value;
|
|
value = 'Object';
|
|
if (name) {
|
|
if (value === name) {
|
|
r4 = value;
|
|
} else {
|
|
value = "'" + name + "'";
|
|
r4 = value;
|
|
}
|
|
} else {
|
|
r4 = value;
|
|
}
|
|
return '' + r4 + ' captured as exception with keys: ' + value2;
|
|
}
|
|
if (value3) {
|
|
try {
|
|
constructor = value3.constructor;
|
|
} catch (error) {
|
|
name = value;
|
|
value = 'Object';
|
|
if (name) {
|
|
if (value === name) {
|
|
r4 = value;
|
|
} else {
|
|
value = "'" + name + "'";
|
|
r4 = value;
|
|
}
|
|
} else {
|
|
r4 = value;
|
|
}
|
|
return '' + r4 + ' captured as exception with keys: ' + value2;
|
|
}
|
|
try {
|
|
name = constructor.name;
|
|
} catch (error) {
|
|
name = value;
|
|
value = 'Object';
|
|
if (name) {
|
|
if (value === name) {
|
|
r4 = value;
|
|
} else {
|
|
value = "'" + name + "'";
|
|
r4 = value;
|
|
}
|
|
} else {
|
|
r4 = value;
|
|
}
|
|
return '' + r4 + ' captured as exception with keys: ' + value2;
|
|
}
|
|
} else {
|
|
name = value;
|
|
}
|
|
value = 'Object';
|
|
r4 = name ? value === name ? value : "'" + name + "'" : value;
|
|
return '' + r4 + ' captured as exception with keys: ' + value2;
|
|
}
|
|
value = undefined;
|
|
value2 = (require(7375) /* metro dependency 7375 */).extractExceptionKeysForMessage(a0);
|
|
moduleValue2 = require(7376) /* metro dependency 7376 */;
|
|
if (moduleValue2.isErrorEvent(a0)) {
|
|
return 'Event `ErrorEvent` captured as exception with message `' + a0.message + '`';
|
|
}
|
|
try {
|
|
Object = global.Object;
|
|
} catch (error) {
|
|
name = value;
|
|
value = 'Object';
|
|
if (name) {
|
|
if (value === name) {
|
|
r4 = value;
|
|
} else {
|
|
value = "'" + name + "'";
|
|
r4 = value;
|
|
}
|
|
} else {
|
|
r4 = value;
|
|
}
|
|
return '' + r4 + ' captured as exception with keys: ' + value2;
|
|
}
|
|
try {
|
|
getPrototypeOf = Object.getPrototypeOf;
|
|
} catch (error) {
|
|
name = value;
|
|
value = 'Object';
|
|
if (name) {
|
|
if (value === name) {
|
|
r4 = value;
|
|
} else {
|
|
value = "'" + name + "'";
|
|
r4 = value;
|
|
}
|
|
} else {
|
|
r4 = value;
|
|
}
|
|
return '' + r4 + ' captured as exception with keys: ' + value2;
|
|
}
|
|
try {
|
|
value3 = Reflect.apply(getPrototypeOf, Object, [a0]);
|
|
} catch (error) {
|
|
name = value;
|
|
value = 'Object';
|
|
if (name) {
|
|
if (value === name) {
|
|
r4 = value;
|
|
} else {
|
|
value = "'" + name + "'";
|
|
r4 = value;
|
|
}
|
|
} else {
|
|
r4 = value;
|
|
}
|
|
return '' + r4 + ' captured as exception with keys: ' + value2;
|
|
}
|
|
if (value3) {
|
|
try {
|
|
constructor = value3.constructor;
|
|
} catch (error) {
|
|
name = value;
|
|
value = 'Object';
|
|
if (name) {
|
|
if (value === name) {
|
|
r4 = value;
|
|
} else {
|
|
value = "'" + name + "'";
|
|
r4 = value;
|
|
}
|
|
} else {
|
|
r4 = value;
|
|
}
|
|
return '' + r4 + ' captured as exception with keys: ' + value2;
|
|
}
|
|
try {
|
|
name = constructor.name;
|
|
} catch (error) {
|
|
name = value;
|
|
value = 'Object';
|
|
if (name) {
|
|
if (value === name) {
|
|
r4 = value;
|
|
} else {
|
|
value = "'" + name + "'";
|
|
r4 = value;
|
|
}
|
|
} else {
|
|
r4 = value;
|
|
}
|
|
return '' + r4 + ' captured as exception with keys: ' + value2;
|
|
}
|
|
} else {
|
|
name = value;
|
|
}
|
|
value = 'Object';
|
|
return '' + (name ? value === name ? value : "'" + name + "'" : value) + ' captured as exception with keys: ' + value2;
|
|
}
|
|
|
|
function getException_59958(a0, a1, a2, a3) { // fn#59958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7607:892, offset: 0x016f7c24, size: 443 bytes, params: 5, frame: 26
|
|
var r5;
|
|
var r11;
|
|
var r4;
|
|
var Error;
|
|
var prototype;
|
|
var error;
|
|
var binding;
|
|
var properties;
|
|
var properties2;
|
|
var properties3;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var Object;
|
|
var hasOwnProperty;
|
|
var call;
|
|
var property;
|
|
var messageForObject_59957;
|
|
let value = a0;
|
|
const value2 = a3;
|
|
const value4 = undefined;
|
|
if (Module07376Module.isError(a2)) {
|
|
return [a2, value4];
|
|
}
|
|
a1.synthetic = true;
|
|
if (Module07376Module.isPlainObject(a2)) {
|
|
r5 = value && value.getOptions().normalizeDepth;
|
|
binding = Module00077Module;
|
|
value = require(7414) /* metro dependency 7414 */;
|
|
value = value.normalizeToSize(a2, r5);
|
|
value = binding({}, '__serialized__', value);
|
|
properties = Object.keys(a2);
|
|
properties2 = 0;
|
|
properties3 = properties.length;
|
|
if (properties === value4) {
|
|
r4 = value4;
|
|
} else {
|
|
r11 = properties2;
|
|
while (true) {
|
|
propertyName = properties[r11];
|
|
propertyName2 = r11 + 1;
|
|
if (propertyName === value4) {
|
|
r4 = value4;
|
|
break;
|
|
}
|
|
Object = global.Object;
|
|
prototype = Object.prototype;
|
|
hasOwnProperty = prototype.hasOwnProperty;
|
|
call = hasOwnProperty.call;
|
|
if (Reflect.apply(call, hasOwnProperty, [a2, propertyName])) {
|
|
property = a2[propertyName];
|
|
Error = global.Error;
|
|
if (property instanceof Error) {
|
|
r4 = property;
|
|
break;
|
|
}
|
|
r11 = propertyName2;
|
|
continue;
|
|
}
|
|
r11 = propertyName2;
|
|
continue;
|
|
}
|
|
}
|
|
if (r4) {
|
|
return [r4, value];
|
|
}
|
|
messageForObject_59957 = getMessageForObject_59957(a2);
|
|
r5 = value2 && value2.syntheticException;
|
|
if (!r5) {
|
|
error = new global.Error();
|
|
}
|
|
r5.message = messageForObject_59957;
|
|
return [r5, value];
|
|
}
|
|
r5 = value2 && value2.syntheticException;
|
|
r5 = !r5 ? new global.Error(a2) : r5;
|
|
r5.message = '' + a2;
|
|
return [r5, value4];
|
|
}
|
|
|
|
function eventFromMessage_59959(a0, a1) { // fn#59959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7607:1508, offset: 0x016f7ddf, size: 301 bytes, params: 3, frame: 18
|
|
var stackFrames_59955;
|
|
let value = undefined;
|
|
const value2 = 'info';
|
|
const r6 = arguments.length > 2 ? value === arguments[2] ? value2 : arguments[2] : value2;
|
|
const r3 = arguments.length > 3 ? arguments[3] : value;
|
|
const r2 = arguments.length > 4 ? arguments[4] : value;
|
|
const object = {};
|
|
object.event_id = r3 && r3.event_id;
|
|
object.level = r6;
|
|
if (r2) {
|
|
if (r3) {
|
|
if (r3.syntheticException) {
|
|
stackFrames_59955 = parseStackFrames_59955(a0, r3.syntheticException);
|
|
if (stackFrames_59955.length) {
|
|
object.exception = {values: [{value: a1, stacktrace: {frames: stackFrames_59955}}]};
|
|
(require(7380) /* metro dependency 7380 */).addExceptionMechanism(object, {synthetic: true});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
value = require(7376) /* metro dependency 7376 */;
|
|
if (value.isParameterizedString(a1)) {
|
|
object.logentry = {message: a1.__sentry_template_string__, params: a1.__sentry_template_values__};
|
|
} else {
|
|
object.message = a1;
|
|
}
|
|
return object;
|
|
}
|
|
|
|
function eventFromUnknownInput_59960(a0, a1, a2, a3) { // fn#59960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7607:2108, offset: 0x016f7f0c, size: 234 bytes, params: 5, frame: 21
|
|
const value = a3;
|
|
let r2 = value && value.data && value.data.mechanism;
|
|
r2 = !r2 ? {'handled': true, 'type': 'generic'} : r2;
|
|
const value4 = Module00057Module(getException_59958(a0, r2, a2, value), 2);
|
|
const property = value4[0];
|
|
const property2 = value4[1];
|
|
const object = {};
|
|
const object2 = {};
|
|
object2.values = [exceptionFromError_59956(a1, property)];
|
|
object.exception = object2;
|
|
if (property2) {
|
|
object.extra = property2;
|
|
}
|
|
(Module07380Module).addExceptionTypeValue(object, undefined, undefined);
|
|
(Module07380Module).addExceptionMechanism(object, r2);
|
|
const Object = global.Object;
|
|
return Object.assign({}, object, {event_id: value && value.event_id});
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun59954, 7429, [57, 77, 7375, 7376, 7414,
|
|
7380]) /* metro module 7429, dependencies: [57, 77, 7375, 7376, 7414, 7380] */;
|