Files
2026-07-28 01:06:53 +03:00

471 lines
23 KiB
JavaScript

/* Metro module 7390; source: unknown; dependencies: [57, 77, 65, 6, 7, 7379, 7391, 7392, 7376, 7383, 7394, 7380, 7369] */
import * as ClassCallCheckModule from './module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import * as CreateClassModule from './module-00007-CreateClass.js'; /* Metro dependency 7 */
import * as Module00057Module from './module-00057.js'; /* Metro dependency 57 */
import * as Module00065Module from './module-00065.js'; /* Metro dependency 65 */
import * as Module00077Module from './module-00077.js'; /* Metro dependency 77 */
import * as Module07391Module from './module-07391.js'; /* Metro dependency 7391 */
function _fun59516(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7568:6, offset: 0x016ebd24, size: 153 bytes, params: 8, frame: 17
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
exports.Scope = _fun59517();
function _fun59517() { // fn#59517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7568:139, offset: 0x016ebdbd, size: 874 bytes, params: 1, frame: 15
return CreateClassModule(ScopeClass, [{key: 'clone', value: value_59519}, {key: 'setClient', value: function(a0) {
this._client = a0;
}}, {key: 'setLastEventId', value: function(a0) {
this._lastEventId = a0;
}}, {key: 'getClient', value: function() {
return this._client;
}}, {key: 'lastEventId', value: function() {
return this._lastEventId;
}}, {key: 'addScopeListener', value: function(a0) {
this._scopeListeners.push(a0);
}}, {key: 'addEventProcessor', value: function(a0) {
this._eventProcessors.push(a0);
return this;
}}, {key: 'setUser', value: value_59526}, {key: 'getUser', value: function() {
return this._user;
}}, {key: 'getRequestSession', value: function() {
return this._requestSession;
}}, {key: 'setRequestSession', value: function(a0) {
this._requestSession = a0;
return this;
}}, {key: 'setTags', value: function(a0) {
var Object = global.Object;
this._tags = Object.assign({}, this._tags, a0);
this._notifyScopeListeners();
return this;
}}, {key: 'setTag', value: value_59531}, {key: 'setExtras', value: function(a0) {
var Object = global.Object;
this._extra = Object.assign({}, this._extra, a0);
this._notifyScopeListeners();
return this;
}}, {key: 'setExtra', value: value_59533}, {key: 'setFingerprint', value: function(a0) {
this._fingerprint = a0;
this._notifyScopeListeners();
return this;
}}, {key: 'setLevel', value: function(a0) {
this._level = a0;
this._notifyScopeListeners();
return this;
}}, {key: 'setTransactionName', value: function(a0) {
this._transactionName = a0;
this._notifyScopeListeners();
return this;
}}, {key: 'setContext', value: function(a0, a1) {
if (a1 === null) {
delete this._contexts[a0];
} else {
this._contexts[a0] = a1;
}
this._notifyScopeListeners();
return this;
}}, {key: 'setSession', value: function(a0) {
if (a0) {
this._session = a0;
} else {
delete this._session;
}
this._notifyScopeListeners();
return this;
}}, {key: 'getSession', value: function() {
return this._session;
}}, {key: 'update', value: value_59540}, {key: 'clear', value: value_59541}, {key: 'addBreadcrumb',
value: value_59542}, {key: 'getLastBreadcrumb', value: function() {
return this._breadcrumbs[this._breadcrumbs.length - 1];
}}, {key: 'clearBreadcrumbs', value: function() {
this._breadcrumbs = [];
this._notifyScopeListeners();
return this;
}}, {key: 'addAttachment', value: function(a0) {
this._attachments.push(a0);
return this;
}}, {key: 'clearAttachments', value: function() {
this._attachments = [];
return this;
}}, {key: 'getScopeData', value: value_59547}, {key: 'setSDKProcessingMetadata', value: value_59548},
{key: 'setPropagationContext', value: value_59549}, {key: 'getPropagationContext', value: function() {
return this._propagationContext;
}}, {key: 'captureException', value: value_59551}, {key: 'captureMessage', value: value_59552},
{key: 'captureEvent', value: value_59553}, {key: '_notifyScopeListeners', value: function() {
var env0_0 = this;
if (!this._notifyingListeners) {
this._notifyingListeners = true;
this._scopeListeners.forEach(_fun59555);
this._notifyingListeners = false;
}
}}]);
function ScopeClass() { // fn#59518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7568:163, offset: 0x016ec127, size: 182 bytes, params: 1, frame: 17
const value = environment.__proto__;
env1_5(this, ScopeClass);
this._notifyingListeners = false;
this._scopeListeners = [];
this._eventProcessors = [];
this._breadcrumbs = [];
this._attachments = [];
this._user = {};
this._tags = {};
this._extra = {};
this._contexts = {};
this._sdkProcessingMetadata = {};
const object = {};
object.traceId = (require(7379) /* metro dependency 7379 */).generateTraceId();
object.spanId = (require(7379) /* metro dependency 7379 */).generateSpanId();
this._propagationContext = object;
}
function value_59519() { // fn#59519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7568:548, offset: 0x016ec1dd, size: 458 bytes, params: 1, frame: 18
var object;
const scopeClass = new ScopeClass();
let binding = env1_4;
scopeClass._breadcrumbs = binding(this._breadcrumbs);
let Object = global.Object;
let assign = Object.assign;
scopeClass._tags = Reflect.apply(assign, Object, [{}, this._tags]);
Object = global.Object;
scopeClass._extra = Object.assign({}, this._extra);
Object = global.Object;
assign = Object.assign;
let _contexts = this._contexts;
scopeClass._contexts = Reflect.apply(assign, Object, [{}, _contexts]);
if (this._contexts.flags) {
_contexts = scopeClass._contexts;
object = {};
object.values = env1_4(this._contexts.flags.values);
_contexts.flags = object;
}
scopeClass._user = this._user;
scopeClass._level = this._level;
scopeClass._session = this._session;
scopeClass._transactionName = this._transactionName;
scopeClass._fingerprint = this._fingerprint;
binding = env1_4;
scopeClass._eventProcessors = binding(this._eventProcessors);
scopeClass._requestSession = this._requestSession;
scopeClass._attachments = binding(this._attachments);
Object = global.Object;
scopeClass._sdkProcessingMetadata = Object.assign({}, this._sdkProcessingMetadata);
Object = global.Object;
scopeClass._propagationContext = Object.assign({}, this._propagationContext);
scopeClass._client = this._client;
scopeClass._lastEventId = this._lastEventId;
const _setSpanForScope = Module07391Module._setSpanForScope;
Reflect.apply(_setSpanForScope, Module07391Module, [scopeClass, Module07391Module._getSpanForScope(this)]);
return scopeClass;
}
function value_59526(a0) { // fn#59526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7568:1841, offset: 0x00d60102, size: 114 bytes, params: 2, frame: 15
var value2;
var moduleValue;
const value = a0;
this._user = value || ({email: undefined, id: undefined, ip_address: undefined, username: undefined});
if (this._session) {
value2 = environment.__proto__;
moduleValue = require(7392) /* metro dependency 7392 */;
moduleValue.updateSession(this._session, {user: value});
}
this._notifyScopeListeners();
return this;
}
function value_59531(a0, a1) { // fn#59531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7568:2432, offset: 0x016ec3c0, size: 73 bytes, params: 3, frame: 19
const Object = global.Object;
const assign = Object.assign;
const _tags = this._tags;
const value = environment.__proto__;
this._tags = Reflect.apply(assign, Object, [{}, _tags, env1_3({}, a0, a1)]);
this._notifyScopeListeners();
return this;
}
function value_59533(a0, a1) { // fn#59533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7568:2700, offset: 0x016ec409, size: 73 bytes, params: 3, frame: 19
const Object = global.Object;
const assign = Object.assign;
const _extra = this._extra;
const value = environment.__proto__;
this._extra = Reflect.apply(assign, Object, [{}, _extra, env1_3({}, a0, a1)]);
this._notifyScopeListeners();
return this;
}
function value_59540(a0) { // fn#59540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7568:3530, offset: 0x016ec452, size: 405 bytes, params: 2, frame: 24
var r5;
var r3;
var r2;
var value3;
var moduleValue;
var items2;
var property;
var property2;
var tags;
var extra;
var user;
var contexts;
var level;
var fingerprint;
var propagationContext;
var Object;
var assign;
let value = a0;
if (value) {
r5 = typeof value !== 'function' ? value : value(this);
value3 = environment.__proto__;
if (r5 instanceof env1_7) {
items2 = [r5.getScopeData()];
items2[1] = r5.getRequestSession();
r3 = items2;
} else {
moduleValue = require(7376) /* metro dependency 7376 */;
r3 = moduleValue.isPlainObject(r5) ? [value, value.requestSession] : [];
}
value = env1_2(r3, 2);
property = value[0];
property2 = value[1];
r2 = property || ({});
tags = r2.tags;
extra = r2.extra;
user = r2.user;
contexts = r2.contexts;
level = r2.level;
fingerprint = r2.fingerprint;
r3 = fingerprint !== undefined ? fingerprint : [];
propagationContext = r2.propagationContext;
Object = global.Object;
assign = Object.assign;
this._tags = Reflect.apply(assign, Object, [{}, this._tags, tags]);
Object = global.Object;
assign = Object.assign;
this._extra = Reflect.apply(assign, Object, [{}, this._extra, extra]);
Object = global.Object;
assign = Object.assign;
this._contexts = Reflect.apply(assign, Object, [{}, this._contexts, contexts]);
if (user && global.Object.keys(user).length) {
this._user = user;
}
if (level) {
this._level = level;
}
if (r3.length) {
this._fingerprint = r3;
}
if (propagationContext) {
this._propagationContext = propagationContext;
}
if (property2) {
this._requestSession = property2;
}
}
return this;
}
function value_59541() { // fn#59541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7568:4171, offset: 0x016ec5e7, size: 174 bytes, params: 1, frame: 16
this._breadcrumbs = [];
this._tags = {};
this._extra = {};
this._user = {};
this._contexts = {};
this._level = undefined;
this._transactionName = undefined;
this._fingerprint = undefined;
this._requestSession = undefined;
this._session = undefined;
const value = environment.__proto__;
(Module07391Module)._setSpanForScope(this, undefined);
this._attachments = [];
const setPropagationContext = this.setPropagationContext;
const object = {};
object.traceId = (require(7379) /* metro dependency 7379 */).generateTraceId();
Reflect.apply(setPropagationContext, this, [object]);
this._notifyScopeListeners();
return this;
}
function value_59542(a0, a1) { // fn#59542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7568:4585, offset: 0x016ec695, size: 205 bytes, params: 3, frame: 17
let value = a1;
const r1 = typeof value !== 'number' ? 100 : value;
if (!(r1 <= 0)) {
var Object = global.Object;
var assign = Object.assign;
var object = {};
value = environment.__proto__;
value = require(7383) /* metro dependency 7383 */;
object.timestamp = value.dateTimestampInSeconds();
value = Reflect.apply(assign, Object, [object, a0]);
var _breadcrumbs = this._breadcrumbs;
_breadcrumbs.push(value);
_breadcrumbs = this._breadcrumbs;
if (_breadcrumbs.length > r1) {
_breadcrumbs = this._breadcrumbs;
this._breadcrumbs = _breadcrumbs.slice(-r1);
if (this._client) {
this._client.recordDroppedEvent('buffer_overflow', 'log_item');
}
}
this._notifyScopeListeners();
}
return this;
}
function value_59547() { // fn#59547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7568:5402, offset: 0x016ec762, size: 186 bytes, params: 1, frame: 13
const object = {};
object.breadcrumbs = this._breadcrumbs;
object.attachments = this._attachments;
object.contexts = this._contexts;
object.tags = this._tags;
object.extra = this._extra;
object.user = this._user;
object.level = this._level;
object.fingerprint = this._fingerprint || [];
object.eventProcessors = this._eventProcessors;
object.propagationContext = this._propagationContext;
object.sdkProcessingMetadata = this._sdkProcessingMetadata;
object.transactionName = this._transactionName;
const value = environment.__proto__;
object.span = (require(7391) /* metro dependency 7391 */)._getSpanForScope(this);
return object;
}
function value_59548(a0) { // fn#59548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7568:5866, offset: 0x016ec81c, size: 61 bytes, params: 2, frame: 16
let value = environment.__proto__;
value = require(7394) /* metro dependency 7394 */;
this._sdkProcessingMetadata = value.merge(this._sdkProcessingMetadata, a0, 2);
return this;
}
function value_59549(a0) { // fn#59549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7568:6028, offset: 0x016ec859, size: 75 bytes, params: 2, frame: 16
const Object = global.Object;
const assign = Object.assign;
const object = {};
const value = environment.__proto__;
object.spanId = (require(7379) /* metro dependency 7379 */).generateSpanId();
this._propagationContext = Reflect.apply(assign, Object, [object, a0]);
return this;
}
function value_59551(a0, a1) { // fn#59551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7568:6284, offset: 0x016ec8a4, size: 214 bytes, params: 3, frame: 21
var r0;
var value;
var error;
var captureException;
var Object;
if (a1) {
if (a1.event_id) {
r0 = a1.event_id;
} else {
value = environment.__proto__;
value = require(7380) /* metro dependency 7380 */;
value = value.uuid4();
r0 = value;
}
} else {
value = environment.__proto__;
value = require(7380) /* metro dependency 7380 */;
value = value.uuid4();
r0 = value;
}
let _client = this._client;
if (_client) {
error = new global.Error('Sentry syntheticException');
_client = this._client;
captureException = _client.captureException;
Object = global.Object;
Reflect.apply(captureException, _client, [a0, Object.assign({originalException: a0, syntheticException: error},
a1,
{event_id: r0}), this]);
} else {
value = environment.__proto__;
(require(7369) /* metro dependency 7369 */).logger.warn('No client configured on scope - will not capture exception!');
}
return r0;
}
function value_59552(a0, a1, a2) { // fn#59552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7568:6668, offset: 0x016ec97a, size: 220 bytes, params: 4, frame: 22
var r0;
var value;
var error;
var captureMessage;
var Object;
if (a2) {
if (a2.event_id) {
r0 = a2.event_id;
} else {
value = environment.__proto__;
value = require(7380) /* metro dependency 7380 */;
value = value.uuid4();
r0 = value;
}
} else {
value = environment.__proto__;
value = require(7380) /* metro dependency 7380 */;
value = value.uuid4();
r0 = value;
}
let _client = this._client;
if (_client) {
error = new global.Error(a0);
_client = this._client;
captureMessage = _client.captureMessage;
Object = global.Object;
error = Object.assign({originalException: a0, syntheticException: error}, a2, {event_id: r0});
Reflect.apply(captureMessage, _client, [a0, a1, error, this]);
} else {
value = environment.__proto__;
(require(7369) /* metro dependency 7369 */).logger.warn('No client configured on scope - will not capture message!');
}
return r0;
}
function value_59553(a0, a1) { // fn#59553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7568:7022, offset: 0x016eca56, size: 172 bytes, params: 3, frame: 19
var r0;
var value;
var captureEvent;
var Object;
if (a1) {
if (a1.event_id) {
r0 = a1.event_id;
} else {
value = environment.__proto__;
value = require(7380) /* metro dependency 7380 */;
value = value.uuid4();
r0 = value;
}
} else {
value = environment.__proto__;
value = require(7380) /* metro dependency 7380 */;
value = value.uuid4();
r0 = value;
}
let _client = this._client;
if (_client) {
_client = this._client;
captureEvent = _client.captureEvent;
Object = global.Object;
Reflect.apply(captureEvent, _client, [a0, Object.assign({}, a1, {event_id: r0}), this]);
} else {
value = environment.__proto__;
(require(7369) /* metro dependency 7369 */).logger.warn('No client configured on scope - will not capture event!');
}
return r0;
}
function value_59554() { // fn#59554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7568:7309, offset: 0x016ecb02, size: 59 bytes, params: 1, frame: 12
if (!this._notifyingListeners) {
this._notifyingListeners = true;
this._scopeListeners.forEach(_fun59555);
this._notifyingListeners = false;
}
function _fun59555(a0) { // fn#59555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7568:7438, offset: 0x00cd9b0e, size: 19 bytes, params: 2, frame: 11
a0(env0_0);
}
}
}
}
global.__d(_fun59516, 7390, [57, 77, 65, 6, 7, 7379, 7391, 7392, 7376, 7383, 7394, 7380,
7369]) /* metro module 7390, dependencies: [57, 77, 65, 6, 7, 7379, 7391, 7392, 7376, 7383, 7394, 7380, 7369] */;