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

140 lines
7.8 KiB
JavaScript

/* Metro module 1164; source: unknown; dependencies: [65, 77, 826, 825] */
import Module00065 from './module-00065.js'; /* Metro dependency 65 */
import Module00077 from './module-00077.js'; /* Metro dependency 77 */
import * as RN_GLOBAL_OBJModule from './module-00825-RN_GLOBAL_OBJ.js'; /* Metro dependency 825 */
import * as Module00826Module from './module-00826.js'; /* Metro dependency 826 */
function _fun12938(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#12938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1291:6, offset: 0x00ddb6b5, size: 259 bytes, params: 8, frame: 21
const env0_0 = require;
const setSpanMeasurement2 = setSpanMeasurement;
const createSpanJSON2 = createSpanJSON;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const Date = global.Date;
const env0_4 = Date.now();
exports.defaultTransactionSource = 'component';
exports.customTransactionSource = 'custom';
exports.MARGIN_OF_ERROR_SECONDS = 0.05;
exports.getTimeOriginMilliseconds = getTimeOriginMilliseconds;
exports.isNearToNow = isNearToNow;
exports.setSpanDurationAsMeasurement = setSpanDurationAsMeasurement;
exports.setSpanDurationAsMeasurementOnSpan = function(a0, a1, a2) {
var {timestamp, start_timestamp} = require(dependencyMap[2]).spanToJSON(a1);
if (timestamp && start_timestamp) {
setSpanMeasurement(a2, a0, 1000 * (timestamp - start_timestamp), 'millisecond');
}
};
exports.setSpanMeasurement = setSpanMeasurement2;
exports.getLatestChildSpanEndTimestamp = getLatestChildSpanEndTimestamp;
exports.getBundleStartTimestampMs = getBundleStartTimestampMs;
exports.createSpanJSON = createSpanJSON2;
exports.createChildSpanJSON = createChildSpanJSON;
function setSpanMeasurement(a0, a1, a2, a3) { // fn#12939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1291:129, offset: 0x00ddb7b8, size: 92 bytes, params: 5, frame: 20
const addEvent = a0.addEvent;
const SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = (Module00826Module).SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE;
let value = Module00077({}, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE, a2);
const SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = (Module00826Module).SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT;
value = Module00077(value, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT, a3);
Reflect.apply(addEvent, a0, [a1, value]);
}
function createSpanJSON(a0) { // fn#12940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1291:296, offset: 0x00ddb814, size: 328 bytes, params: 2, frame: 29
const dropUndefinedKeys = Module00826Module.dropUndefinedKeys;
const Object = global.Object;
const assign = Object.assign;
const Object2 = global.Object;
const value2 = Object2.assign({status: 'ok'}, a0);
object = {};
object.span_id = a0.span_id || Module00826Module.uuid4().substring(16);
object.trace_id = a0.trace_id || Module00826Module.uuid4();
const dropUndefinedKeys2 = Module00826Module.dropUndefinedKeys;
const Object3 = global.Object;
const assign3 = Object3.assign;
const SEMANTIC_ATTRIBUTE_SENTRY_OP = Module00826Module.SEMANTIC_ATTRIBUTE_SENTRY_OP;
let value = Module00077({}, SEMANTIC_ATTRIBUTE_SENTRY_OP, a0.op);
const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = Module00826Module.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN;
value = Module00077(value, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, a0.origin);
object.data = Reflect.apply(dropUndefinedKeys2, Module00826Module, [Reflect.apply(assign3, Object3, [value,
a0.data || ({})])]);
return Reflect.apply(dropUndefinedKeys, Module00826Module, [Reflect.apply(assign, Object, [value2, object])]);
}
function getTimeOriginMilliseconds() { // fn#12941, offset: 0x00d16d26, size: 9 bytes, params: 1, frame: 1
return env0_4;
}
function isNearToNow(a0) { // fn#12942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1291:868, offset: 0x00ddb95c, size: 86 bytes, params: 2, frame: 15
var r0;
var Math;
var abs;
let value = !!a0;
if (a0) {
Math = global.Math;
abs = Math.abs;
value = require(826) /* metro dependency 826 */;
value = Reflect.apply(abs, Math, [value.timestampInSeconds() - a0]);
value = value <= 0.05;
r0 = value;
} else {
r0 = value;
}
return r0;
}
function setSpanDurationAsMeasurement(a0, a1) { // fn#12943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1291:981, offset: 0x00ddb9b2, size: 116 bytes, params: 3, frame: 17
const {timestamp, start_timestamp} = (require(826) /* metro dependency 826 */).spanToJSON(a1);
if (timestamp && start_timestamp) {
(require(826) /* metro dependency 826 */).setMeasurement(a0, 1000 * (timestamp - start_timestamp),
'millisecond');
}
}
function getLatestChildSpanEndTimestamp(a0) { // fn#12945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1291:1421, offset: 0x00ddba89, size: 122 bytes, params: 2, frame: 16
var r0;
var Math;
var max;
var apply;
const value2 = undefined;
const value5 = (require(826) /* metro dependency 826 */).getSpanDescendants(a0).map(_fun12946).filter(function(a0) {
return !!a0;
});
if (value5.length) {
Math = global.Math;
max = Math.max;
apply = max.apply;
Math = global.Math;
r0 = Reflect.apply(apply, max, [Math, Module00065(value5)]);
} else {
r0 = value2;
}
return r0;
function _fun12946(a0) { // fn#12946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1291:1505, offset: 0x00ddbb03, size: 47 bytes, params: 2, frame: 11
let value = environment.__proto__;
value = require(826) /* metro dependency 826 */;
return value.spanToJSON(a0).timestamp;
}
}
function getBundleStartTimestampMs() { // fn#12948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1291:1670, offset: 0x00ddbb32, size: 171 bytes, params: 1, frame: 17
const RN_GLOBAL_OBJ = (RN_GLOBAL_OBJModule).RN_GLOBAL_OBJ;
const __BUNDLE_START_TIME__ = RN_GLOBAL_OBJ.__BUNDLE_START_TIME__;
if (__BUNDLE_START_TIME__) {
return RN_GLOBAL_OBJ.nativePerformanceNow ? global.Date.now() - RN_GLOBAL_OBJ.nativePerformanceNow() + __BUNDLE_START_TIME__ : __BUNDLE_START_TIME__;
}
(Module00826Module).debug.warn('Missing the bundle start time on the global object.');
}
function createChildSpanJSON({op, trace_id, span_id, origin}, a1) { // fn#12949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1291:2001, offset: 0x00ddbbdd, size: 92 bytes, params: 3, frame: 15
const createSpanJSONBinding = createSpanJSON;
const Object = global.Object;
const assign = Object.assign;
origin = !origin ? 'manual' : origin;
return createSpanJSONBinding(Reflect.apply(assign, Object, [{op: op, trace_id: trace_id, parent_span_id: span_id,
origin: origin}, a1]));
}
}
global.__d(_fun12938, 1164, [65, 77, 826, 825]) /* metro module 1164, dependencies: [65, 77, 826, 825] */;