154 lines
6.4 KiB
React
154 lines
6.4 KiB
React
/* Metro module 844; source: unknown; dependencies: [57, 836, 832, 833] */
|
|
function _fun9132(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#9132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:971:6, offset: 0x00d5e1e9, size: 191 bytes, params: 8, frame: 20
|
|
const env0_0 = require;
|
|
const closure = parseBaggageHeader;
|
|
const baggageHeaderToObject = function(a0) {
|
|
var value = a0.split(',');
|
|
value = value.map(_fun9137);
|
|
return value.reduce(_fun9139, {});
|
|
};
|
|
const closure2 = function(a0) {
|
|
var property = global.Object;
|
|
property = property.keys(a0).length;
|
|
if (property !== 0) {
|
|
return global.Object.entries(a0).reduce(_fun9141, '');
|
|
}
|
|
};
|
|
const env0_2 = require(57) /* metro dependency 57 */;
|
|
const Object = global.Object;
|
|
const defineProperty = Object.defineProperty;
|
|
const Symbol = global.Symbol;
|
|
Reflect.apply(defineProperty, Object, [exports, Symbol.toStringTag, {value: 'Module'}]);
|
|
const regexp = RegExp('^sentry-', '');
|
|
exports.MAX_BAGGAGE_STRING_LENGTH = 8192;
|
|
exports.SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-';
|
|
exports.SENTRY_BAGGAGE_KEY_PREFIX_REGEX = regexp;
|
|
exports.baggageHeaderToDynamicSamplingContext = baggageHeaderToDynamicSamplingContext;
|
|
exports.dynamicSamplingContextToSentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader;
|
|
exports.objectToBaggageHeader = closure2;
|
|
exports.parseBaggageHeader = closure;
|
|
}
|
|
|
|
function parseBaggageHeader(a0) { // fn#9133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:971:134, offset: 0x00d5e2a8, size: 125 bytes, params: 2, frame: 14
|
|
var moduleValue;
|
|
var Array;
|
|
if (a0) {
|
|
moduleValue = require(836) /* metro dependency 836 */;
|
|
if (moduleValue.isString(a0)) {
|
|
Array = global.Array;
|
|
return Array.isArray(a0) ? a0.reduce(_fun9134, {}) : baggageHeaderToObject(a0);
|
|
}
|
|
Array = global.Array;
|
|
if (Array.isArray(a0)) {
|
|
Array = global.Array;
|
|
return Array.isArray(a0) ? a0.reduce(_fun9134, {}) : baggageHeaderToObject(a0);
|
|
}
|
|
}
|
|
}
|
|
|
|
function baggageHeaderToObject(a0) { // fn#9136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:971:406, offset: 0x00d5e392, size: 55 bytes, params: 2, frame: 13
|
|
let value = a0.split(',');
|
|
value = value.map(function(a0) {
|
|
var r0;
|
|
var value = a0.indexOf('=');
|
|
if (value === -1) {
|
|
r0 = [];
|
|
} else {
|
|
value = [a0.slice(0, value), a0.slice(value + 1)].map(_fun9138);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
});
|
|
return value.reduce(_fun9139, {});
|
|
}
|
|
|
|
function objectToBaggageHeader(a0) { // fn#9140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:971:701, offset: 0x00d5e486, size: 78 bytes, params: 2, frame: 13
|
|
const Object = global.Object;
|
|
if (Object.keys(a0).length !== 0) {
|
|
return global.Object.entries(a0).reduce(_fun9141, '');
|
|
}
|
|
}
|
|
|
|
function baggageHeaderToDynamicSamplingContext(a0) { // fn#9142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:971:1223, offset: 0x00d5e5c7, size: 99 bytes, params: 2, frame: 15
|
|
var Object;
|
|
var value3;
|
|
const parseBaggageHeaderBinding = parseBaggageHeader;
|
|
const value = undefined;
|
|
const baggageHeader = parseBaggageHeaderBinding(a0);
|
|
if (baggageHeader) {
|
|
Object = global.Object;
|
|
value3 = Object.entries(baggageHeader).reduce(_fun9143, {});
|
|
Object = global.Object;
|
|
return Object.keys(value3).length > 0 ? value3 : value;
|
|
}
|
|
return value;
|
|
}
|
|
|
|
function dynamicSamplingContextToSentryBaggageHeader(a0) { // fn#9144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:971:1513, offset: 0x00d5e674, size: 66 bytes, params: 2, frame: 14
|
|
var value;
|
|
var objectToBaggageHeaderBinding;
|
|
if (a0) {
|
|
objectToBaggageHeaderBinding = objectToBaggageHeader;
|
|
value = global.Object.entries(a0);
|
|
value = value.reduce(_fun9145, {});
|
|
return objectToBaggageHeaderBinding(value);
|
|
}
|
|
}
|
|
|
|
function _fun9134(a0, a1) { // fn#9134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:971:245, offset: 0x00d5e325, size: 62 bytes, params: 3, frame: 13
|
|
var environment;
|
|
const env0_0 = a0;
|
|
let value = environment.__proto__;
|
|
value = baggageHeaderToObject(a1);
|
|
const Object = global.Object;
|
|
value = Object.entries(value);
|
|
value.forEach(_fun9135);
|
|
return a0;
|
|
}
|
|
|
|
function _fun9137(a0) { // fn#9137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:971:465, offset: 0x00d5e3c9, size: 95 bytes, params: 2, frame: 14
|
|
var r0;
|
|
var items2;
|
|
let value = a0.indexOf('=');
|
|
if (value === -1) {
|
|
r0 = [];
|
|
} else {
|
|
items2 = [a0.slice(0, value)];
|
|
items2[1] = a0.slice(value + 1);
|
|
value = items2.map(function(a0) {
|
|
var decodeURIComponent;
|
|
var value;
|
|
var error;
|
|
try {
|
|
decodeURIComponent = global.decodeURIComponent;
|
|
value = a0.trim();
|
|
value = decodeURIComponent(value);
|
|
} catch (error) {
|
|
return undefined;
|
|
}
|
|
return value;
|
|
});
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun9141(a0, a1, a2) { // fn#9141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:971:797, offset: 0x00d5e4d4, size: 243 bytes, params: 4, frame: 24
|
|
const value = a0;
|
|
const value3 = env1_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(832) /* metro dependency 832 */).DEBUG_BUILD) {
|
|
(require(833) /* metro dependency 833 */).debug.warn('Not adding key: ' + property + ' with val: ' + property2 + ' to baggage header due to exceeding baggage size limits.');
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
}
|
|
return r0;
|
|
}
|
|
|