130 lines
6.0 KiB
React
130 lines
6.0 KiB
React
/* Metro module 7382; source: unknown; dependencies: [57, 7376, 7368, 7369] */
|
|
function _fun59463(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7560:6, offset: 0x016eaf63, size: 174 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const closure = parseBaggageHeader_59464;
|
|
const baggageHeaderToObject_59467 = function(a0) {
|
|
var value = a0.split(',');
|
|
value = value.map(_fun59468);
|
|
return value.reduce(_fun59470, {});
|
|
};
|
|
const env0_2 = require(57) /* metro dependency 57 */;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const regexp = RegExp('^sentry-', '');
|
|
exports.BAGGAGE_HEADER_NAME = 'baggage';
|
|
exports.MAX_BAGGAGE_STRING_LENGTH = 8192;
|
|
exports.SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-';
|
|
exports.SENTRY_BAGGAGE_KEY_PREFIX_REGEX = regexp;
|
|
exports.baggageHeaderToDynamicSamplingContext = baggageHeaderToDynamicSamplingContext_59471;
|
|
exports.dynamicSamplingContextToSentryBaggageHeader = function(a0) {
|
|
var value;
|
|
if (a0) {
|
|
value = global.Object.entries(a0);
|
|
value = value.reduce(_fun59476, {});
|
|
return _fun59474(value);
|
|
}
|
|
};
|
|
exports.parseBaggageHeader = closure;
|
|
}
|
|
|
|
function parseBaggageHeader_59464(a0) { // fn#59464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7560:129, offset: 0x016eb011, size: 125 bytes, params: 2, frame: 14
|
|
var moduleValue;
|
|
var Array;
|
|
if (a0) {
|
|
moduleValue = require(7376) /* metro dependency 7376 */;
|
|
if (moduleValue.isString(a0)) {
|
|
Array = global.Array;
|
|
return Array.isArray(a0) ? a0.reduce(_fun59465, {}) : baggageHeaderToObject_59467(a0);
|
|
}
|
|
Array = global.Array;
|
|
if (Array.isArray(a0)) {
|
|
Array = global.Array;
|
|
return Array.isArray(a0) ? a0.reduce(_fun59465, {}) : baggageHeaderToObject_59467(a0);
|
|
}
|
|
}
|
|
}
|
|
|
|
function baggageHeaderToObject_59467(a0) { // fn#59467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7560:401, offset: 0x016eb0cc, size: 55 bytes, params: 2, frame: 13
|
|
let value = a0.split(',');
|
|
value = value.map(function(a0) {
|
|
return a0.split('=').map(_fun59469);
|
|
});
|
|
return value.reduce(_fun59470, {});
|
|
}
|
|
|
|
function baggageHeaderToDynamicSamplingContext_59471(a0) { // fn#59471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7560:798, offset: 0x016eb145, size: 99 bytes, params: 2, frame: 15
|
|
var Object;
|
|
var value3;
|
|
const parseBaggageHeader_59464Binding = parseBaggageHeader_59464;
|
|
const value = undefined;
|
|
const baggageHeader_59464 = parseBaggageHeader_59464Binding(a0);
|
|
if (baggageHeader_59464) {
|
|
Object = global.Object;
|
|
value3 = Object.entries(baggageHeader_59464).reduce(_fun59472, {});
|
|
Object = global.Object;
|
|
return Object.keys(value3).length > 0 ? value3 : value;
|
|
}
|
|
return value;
|
|
}
|
|
|
|
function dynamicSamplingContextToSentryBaggageHeader_59473(a0) { // fn#59473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7560:1088, offset: 0x016eb1a8, size: 64 bytes, params: 2, frame: 14
|
|
var value;
|
|
if (a0) {
|
|
value = global.Object.entries(a0);
|
|
value = value.reduce(_fun59476, {});
|
|
return ((a0) => {
|
|
var property = global.Object;
|
|
property = property.keys(a0).length;
|
|
if (property === 0) {
|
|
return undefined;
|
|
}
|
|
return global.Object.entries(a0).reduce(_fun59475, '');
|
|
})(value);
|
|
}
|
|
}
|
|
|
|
function _fun59465(a0, a1) { // fn#59465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7560:240, offset: 0x016eb08e, size: 62 bytes, params: 3, frame: 13
|
|
var environment;
|
|
const env0_0 = a0;
|
|
let value = environment.__proto__;
|
|
value = baggageHeaderToObject_59467(a1);
|
|
const Object = global.Object;
|
|
value = Object.entries(value);
|
|
value.forEach(_fun59466);
|
|
return a0;
|
|
}
|
|
|
|
function _fun59468(a0) { // fn#59468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7560:460, offset: 0x016eb103, size: 36 bytes, params: 2, frame: 11
|
|
return a0.split('=').map(function(a0) {
|
|
return global.decodeURIComponent(a0.trim());
|
|
});
|
|
}
|
|
|
|
function dynamicSamplingContextToSentryBaggageHeader_59473ObjectToBaggageHeader(a0) { // fn#59474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7560:1156, owner: dynamicSamplingContextToSentryBaggageHeader_59473.objectToBaggageHeader, offset: 0x016eb1e8, size: 78 bytes, params: 2, frame: 13
|
|
let Object = global.Object;
|
|
if (Object.keys(a0).length === 0) {
|
|
return undefined;
|
|
}
|
|
Object = global.Object;
|
|
return Object.entries(a0).reduce(_fun59475, '');
|
|
}
|
|
|
|
function _fun59475(a0, a1, a2) { // fn#59475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7560:1259, offset: 0x016eb236, size: 243 bytes, params: 4, frame: 24
|
|
const value = a0;
|
|
const value3 = env2_2(a1, 2);
|
|
const property = value3[0];
|
|
const property2 = value3[1];
|
|
const value6 = '' + global.encodeURIComponent(property) + '=' + global.encodeURIComponent(property2);
|
|
let r0 = a2 === 0 ? value6 : '' + value + ',' + value6;
|
|
if (r0.length > 8192) {
|
|
if ((require(7368) /* metro dependency 7368 */).DEBUG_BUILD) {
|
|
(require(7369) /* metro dependency 7369 */).logger.warn('Not adding key: ' + property + ' with val: ' + property2 + ' to baggage header due to exceeding baggage size limits.');
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
}
|
|
return r0;
|
|
}
|
|
|