365 lines
17 KiB
JavaScript
365 lines
17 KiB
JavaScript
/* Metro module 1154; source: unknown; dependencies: [77, 57, 31, 1032, 826, 1148] */
|
|
import * as ReactModule from './module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as Module00057Module from './module-00057.js'; /* Metro dependency 57 */
|
|
import * as Module00077Module from './module-00077.js'; /* Metro dependency 77 */
|
|
import * as Module00826Module from './module-00826.js'; /* Metro dependency 826 */
|
|
import * as Module01032Module from './module-01032.js'; /* Metro dependency 1032 */
|
|
import * as HoistNonReactStaticsModule from './module-01148-hoistNonReactStatics.js'; /* Metro dependency 1148 */
|
|
|
|
function _fun12778(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#12778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1281:6, offset: 0x00dd555f, size: 165 bytes, params: 8, frame: 20
|
|
let env0_0 = require;
|
|
const matchRoutes = function(a0, a1, a2) {
|
|
var r0;
|
|
var env0_0 = a1;
|
|
var env0_1 = a2;
|
|
r0 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
|
var env0_2 = r0;
|
|
a0.some(_fun12783);
|
|
return r0;
|
|
};
|
|
let env0_2 = Module00077Module;
|
|
const Object = global.Object;
|
|
const defineProperty = Object.defineProperty;
|
|
const Symbol = global.Symbol;
|
|
Reflect.apply(defineProperty, Object, [exports, Symbol.toStringTag, {value: 'Module'}]);
|
|
exports.reactRouterV4BrowserTracingIntegration = reactRouterV4BrowserTracingIntegration;
|
|
exports.reactRouterV5BrowserTracingIntegration = reactRouterV5BrowserTracingIntegration;
|
|
exports.withSentryRouting = withSentryRouting;
|
|
function instrumentReactRouter(a0, a1, a2, a3, a4) { // fn#12779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1281:129, offset: 0x00dd5604, size: 411 bytes, params: 6, frame: 28
|
|
var pathname;
|
|
var object;
|
|
const WINDOW = (require(1032) /* metro dependency 1032 */).WINDOW;
|
|
var value8;
|
|
var property;
|
|
var property2;
|
|
var moduleValue;
|
|
var startBrowserTracingPageLoadSpan;
|
|
var binding;
|
|
const value = a2;
|
|
const value2 = undefined;
|
|
const env0_0 = a0;
|
|
const env0_1 = a4;
|
|
if (a1) {
|
|
pathname = a3.location ? a3.location.pathname : WINDOW.location ? WINDOW.location.pathname : value2;
|
|
if (pathname) {
|
|
value8 = (arguments.length > 6 ? arguments[6] : value2)(instrumentReactRouterNormalizeTransactionName(pathname),
|
|
|
|
2);
|
|
property = value8[0];
|
|
property2 = value8[1];
|
|
moduleValue = require(1032) /* metro dependency 1032 */;
|
|
startBrowserTracingPageLoadSpan = moduleValue.startBrowserTracingPageLoadSpan;
|
|
object = {name: property};
|
|
binding = arguments.length > 5 && value2 !== arguments[5] ? arguments[5] : [];
|
|
object.attributes = binding(binding(binding({},
|
|
(require(826) /* metro dependency 826 */).SEMANTIC_ATTRIBUTE_SENTRY_OP, 'pageload'),
|
|
(require(826) /* metro dependency 826 */).SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
|
|
'auto.pageload.react.' + a4),
|
|
(require(826) /* metro dependency 826 */).SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, property2);
|
|
Reflect.apply(startBrowserTracingPageLoadSpan, moduleValue, [a0, object]);
|
|
}
|
|
}
|
|
if (value && a3.listen) {
|
|
a3.listen(_fun12781);
|
|
}
|
|
return value2;
|
|
function instrumentReactRouterNormalizeTransactionName(a0) { // fn#12780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1281:276, owner: instrumentReactRouter.normalizeTransactionName, offset: 0x00dd579f, size: 170 bytes, params: 2, frame: 17
|
|
var r2;
|
|
var value2;
|
|
var matchRoutesBinding;
|
|
var binding;
|
|
var iterator;
|
|
var iterator2;
|
|
var item;
|
|
var item2;
|
|
var match;
|
|
var isExact;
|
|
var path;
|
|
var items2;
|
|
var error;
|
|
reducibleJoin4: while (true) {
|
|
reducibleJoin17: while (true) {
|
|
if (env0_2.length === 0) {
|
|
break reducibleJoin17;
|
|
}
|
|
if (Module00057Module) {
|
|
value2 = environment.__proto__;
|
|
matchRoutesBinding = matchRoutes;
|
|
binding = env0_2;
|
|
iterator = matchRoutesBinding(binding, a0, Module00057Module)[Symbol.iterator]();
|
|
iterator2 = iterator.next;
|
|
r2 = iterator;
|
|
item2 = Reflect.apply(iterator2, r2, []);
|
|
item = item2.value;
|
|
item2 = item2.done ? undefined : r2;
|
|
if (item2 === undefined) {
|
|
return [a0, 'url'];
|
|
}
|
|
break reducibleJoin4;
|
|
}
|
|
break reducibleJoin17;
|
|
}
|
|
return [a0, 'url'];
|
|
}
|
|
reducibleLoop4: while (true) {
|
|
try {
|
|
match = item.match;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
isExact = match.isExact;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
if (isExact) {
|
|
break reducibleLoop4;
|
|
}
|
|
r2 = item2;
|
|
item2 = Reflect.apply(iterator2, r2, []);
|
|
item = item2.value;
|
|
item2 = item2.done ? undefined : r2;
|
|
if (item2 === undefined) {
|
|
return [a0, 'url'];
|
|
}
|
|
continue reducibleLoop4;
|
|
}
|
|
try {
|
|
match = item.match;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
path = match.path;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
items2 = [];
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
items2[0] = path;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
items2[1] = 'route';
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
item2.return();
|
|
return items2;
|
|
}
|
|
|
|
function _fun12781(a0, a1) { // fn#12781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1281:918, offset: 0x00dd5849, size: 238 bytes, params: 3, frame: 25
|
|
var value2;
|
|
var value3;
|
|
var value4;
|
|
var property;
|
|
var property2;
|
|
var moduleValue;
|
|
var startBrowserTracingNavigationSpan;
|
|
var binding;
|
|
var object;
|
|
var binding2;
|
|
const SEMANTIC_ATTRIBUTE_SENTRY_OP = (Module00826Module).SEMANTIC_ATTRIBUTE_SENTRY_OP;
|
|
const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = (Module00826Module).SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN;
|
|
const SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = (Module00826Module).SEMANTIC_ATTRIBUTE_SENTRY_SOURCE;
|
|
if (a1) {
|
|
if (a1 === 'PUSH') {
|
|
value2 = instrumentReactRouterNormalizeTransactionName(a0.pathname);
|
|
value3 = environment.__proto__;
|
|
value4 = env1_3(value2, 2);
|
|
property = value4[0];
|
|
property2 = value4[1];
|
|
moduleValue = require(1032) /* metro dependency 1032 */;
|
|
startBrowserTracingNavigationSpan = moduleValue.startBrowserTracingNavigationSpan;
|
|
binding = env0_0;
|
|
object = {name: property};
|
|
binding2 = env1_2;
|
|
object.attributes = binding2(binding2(binding2({}, SEMANTIC_ATTRIBUTE_SENTRY_OP, 'navigation'),
|
|
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto.navigation.react.' + env0_1), SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
|
|
property2);
|
|
Reflect.apply(startBrowserTracingNavigationSpan, moduleValue, [binding, object]);
|
|
} else if (a1 === 'POP') {
|
|
value2 = instrumentReactRouterNormalizeTransactionName(a0.pathname);
|
|
value3 = environment.__proto__;
|
|
value4 = env1_3(value2, 2);
|
|
property = value4[0];
|
|
property2 = value4[1];
|
|
moduleValue = require(1032) /* metro dependency 1032 */;
|
|
startBrowserTracingNavigationSpan = moduleValue.startBrowserTracingNavigationSpan;
|
|
binding = env0_0;
|
|
object = {name: property};
|
|
binding2 = env1_2;
|
|
object.attributes = binding2(binding2(binding2({}, SEMANTIC_ATTRIBUTE_SENTRY_OP, 'navigation'),
|
|
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto.navigation.react.' + env0_1), SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
|
|
property2);
|
|
Reflect.apply(startBrowserTracingNavigationSpan, moduleValue, [binding, object]);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function matchRoutes(a0, a1, a2) { // fn#12782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1281:1273, offset: 0x00dd5937, size: 73 bytes, params: 4, frame: 14
|
|
const env0_0 = a1;
|
|
const env0_1 = a2;
|
|
const r0 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
|
a0.some(_fun12783);
|
|
return r0;
|
|
function _fun12783(a0) { // fn#12783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1281:1380, offset: 0x00dd5980, size: 188 bytes, params: 2, frame: 18
|
|
var r0;
|
|
var binding;
|
|
var value2;
|
|
if (a0.path) {
|
|
r0 = importDefault(require, a0);
|
|
} else if (env0_2.length) {
|
|
binding = env0_2;
|
|
r0 = binding[binding.length - 1].match;
|
|
} else {
|
|
r0 = {'path': '/', 'url': '/', params: {}, isExact: require === '/'};
|
|
}
|
|
if (r0) {
|
|
binding = env0_2;
|
|
binding.push({route: a0, match: r0});
|
|
if (a0.routes) {
|
|
value2 = environment.__proto__;
|
|
matchRoutes(a0.routes, require, importDefault, env0_2);
|
|
}
|
|
}
|
|
return !!r0;
|
|
}
|
|
|
|
}
|
|
|
|
function reactRouterV4BrowserTracingIntegration(a0) { // fn#12784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1281:1651, offset: 0x00dd5a3c, size: 181 bytes, params: 2, frame: 20
|
|
var value;
|
|
const browserTracingIntegration = (Module01032Module).browserTracingIntegration;
|
|
let Object = global.Object;
|
|
value = Reflect.apply(browserTracingIntegration, value, [Object.assign({}, a0, {'instrumentPageLoad': false,
|
|
'instrumentNavigation': false})]);
|
|
const env0_1 = a0.history;
|
|
const env0_2 = a0.routes;
|
|
const env0_3 = a0.matchPath;
|
|
const instrumentPageLoad = a0.instrumentPageLoad;
|
|
const env0_4 = instrumentPageLoad === undefined || instrumentPageLoad;
|
|
const instrumentNavigation = a0.instrumentNavigation;
|
|
const env0_5 = instrumentNavigation === undefined || instrumentNavigation;
|
|
Object = global.Object;
|
|
return Object.assign({}, value, {afterAllSetup: afterAllSetup_12785});
|
|
function reactRouterV4BrowserTracingIntegrationAfterAllSetup(a0) { // fn#12785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1281:1969, owner: reactRouterV4BrowserTracingIntegration.afterAllSetup, offset: 0x00dd5af1, size: 67 bytes, params: 2, frame: 23
|
|
env0_0.afterAllSetup(a0);
|
|
instrumentReactRouter(a0, env0_4, env0_5, history, 'reactrouter_v4', routes, matchPath);
|
|
}
|
|
|
|
}
|
|
|
|
function reactRouterV5BrowserTracingIntegration(a0) { // fn#12786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1281:2111, offset: 0x00dd5b34, size: 181 bytes, params: 2, frame: 20
|
|
var value;
|
|
const browserTracingIntegration = (Module01032Module).browserTracingIntegration;
|
|
let Object = global.Object;
|
|
value = Reflect.apply(browserTracingIntegration, value, [Object.assign({}, a0, {'instrumentPageLoad': false,
|
|
'instrumentNavigation': false})]);
|
|
const env0_1 = a0.history;
|
|
const env0_2 = a0.routes;
|
|
const env0_3 = a0.matchPath;
|
|
const instrumentPageLoad = a0.instrumentPageLoad;
|
|
const env0_4 = instrumentPageLoad === undefined || instrumentPageLoad;
|
|
const instrumentNavigation = a0.instrumentNavigation;
|
|
const env0_5 = instrumentNavigation === undefined || instrumentNavigation;
|
|
Object = global.Object;
|
|
return Object.assign({}, value, {afterAllSetup: afterAllSetup_12787});
|
|
function reactRouterV5BrowserTracingIntegrationAfterAllSetup(a0) { // fn#12787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1281:2429, owner: reactRouterV5BrowserTracingIntegration.afterAllSetup, offset: 0x00dd5be9, size: 67 bytes, params: 2, frame: 23
|
|
env0_0.afterAllSetup(a0);
|
|
instrumentReactRouter(a0, env0_4, env0_5, history, 'reactrouter_v5', routes, matchPath);
|
|
}
|
|
|
|
}
|
|
|
|
function withSentryRouting(a0) { // fn#12788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1281:2550, offset: 0x00dd5c2c, size: 103 bytes, params: 2, frame: 15
|
|
const env0_0 = a0;
|
|
const r5 = a0.displayName || a0.name;
|
|
const WrappedRoute2 = WrappedRoute;
|
|
WrappedRoute2.displayName = 'sentryRoute(' + r5 + ')';
|
|
(HoistNonReactStaticsModule).hoistNonReactStatics(WrappedRoute2, a0);
|
|
return WrappedRoute2;
|
|
function WrappedRoute(a0) { // fn#12789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1281:2610, owner: withSentryRouting.WrappedRoute, offset: 0x00dd5c93, size: 322 bytes, params: 2, frame: 19
|
|
var r7;
|
|
var r3;
|
|
var computedMatch;
|
|
var path;
|
|
var value;
|
|
var value2;
|
|
var activeSpan;
|
|
var moduleValue3;
|
|
var op;
|
|
if (a0 != null) {
|
|
computedMatch = a0.computedMatch;
|
|
if (computedMatch != null) {
|
|
if (computedMatch.isExact) {
|
|
path = a0.computedMatch.path;
|
|
value = environment.__proto__;
|
|
value2 = undefined;
|
|
activeSpan = (require(826) /* metro dependency 826 */).getActiveSpan();
|
|
r7 = activeSpan && (require(826) /* metro dependency 826 */).getRootSpan(activeSpan);
|
|
if (r7) {
|
|
moduleValue3 = require(826) /* metro dependency 826 */;
|
|
op = moduleValue3.spanToJSON(r7).op;
|
|
r3 = op === 'navigation' ? r7 : op !== 'pageload' ? value2 : r7;
|
|
} else {
|
|
r3 = value2;
|
|
}
|
|
(require(826) /* metro dependency 826 */).getCurrentScope().setTransactionName(path);
|
|
if (r3) {
|
|
r3.updateName(path);
|
|
r3.setAttribute((require(826) /* metro dependency 826 */).SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
|
|
'route');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const binding = env1_4;
|
|
const createElement = binding.createElement;
|
|
const binding2 = env0_0;
|
|
const Object = global.Object;
|
|
return Reflect.apply(createElement, binding, [binding2, Object.assign({}, a0)]);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun12778, 1154, [77, 57, 31, 1032, 826,
|
|
1148]) /* metro module 1154, dependencies: [77, 57, 31, 1032, 826, 1148] */;
|