/* Metro module 1198; source: unknown; dependencies: [77, 1168, 1174, 826, 1166, 1169, 1130] */ import Module00077 from './module-00077.js'; /* Metro dependency 77 */ import * as Module01168Module from './module-01168.js'; /* Metro dependency 1168 */ function _fun13299(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#13299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1325:6, offset: 0x00de715d, size: 103 bytes, params: 8, frame: 17 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); exports.INTEGRATION_NAME = 'ReactNativeNavigation'; exports.reactNativeNavigationIntegration = reactNativeNavigationIntegration; function reactNativeNavigationIntegration({navigation, routeChangeTimeoutMs, enableTabsInstrumentation, ignoreEmptyBackNavigationTransactions}) { // fn#13300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1325:199, offset: 0x00de71c4, size: 254 bytes, params: 2, frame: 15 let r0 = routeChangeTimeoutMs === undefined ? 1000 : routeChangeTimeoutMs; r0 = enableTabsInstrumentation !== undefined && enableTabsInstrumentation; const env0_4 = ignoreEmptyBackNavigationTransactions === undefined || ignoreEmptyBackNavigationTransactions; const env0_5 = []; const reactNativeNavigationIntegrationStartIdleNavigationSpan2 = reactNativeNavigationIntegrationStartIdleNavigationSpan; navigation.events().registerCommandListener(reactNativeNavigationIntegrationStartIdleNavigationSpan2); if (r0) { navigation.events().registerBottomTabPressedListener(reactNativeNavigationIntegrationStartIdleNavigationSpan2); } navigation.events().registerComponentWillAppearListener(updateLatestNavigationSpanWithCurrentComponent); return {name: 'ReactNativeNavigation', afterAllSetup: afterAllSetup_13307}; function reactNativeNavigationIntegrationStartIdleNavigationSpan() { // fn#13301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1325:464, owner: reactNativeNavigationIntegration.startIdleNavigationSpan, offset: 0x00de72c2, size: 436 bytes, params: 1, frame: 24 var r6; var options; var moduleValue3; var binding; var moduleValue4; if (env0_2) { discardLatestNavigationSpan(); } const value3 = undefined; const moduleValue = require(1168) /* metro dependency 1168 */; const startIdleNavigationSpan = moduleValue.startIdleNavigationSpan; let beforeStartSpan = env0_0 == null ? value3 : env0_0.options.beforeStartSpan; if (beforeStartSpan) { options = env0_0.options; beforeStartSpan = options.beforeStartSpan; moduleValue3 = moduleValue; r6 = Reflect.apply(beforeStartSpan, options, [moduleValue3.getDefaultIdleNavigationSpanOptions()]); } else { r6 = (require(1168) /* metro dependency 1168 */).getDefaultIdleNavigationSpanOptions(); } const value6 = Reflect.apply(startIdleNavigationSpan, moduleValue, [r6, defaultIdleOptions]); env0_2 = value6; if (value6 != null) { binding = env0_2; binding.setAttribute((require(826) /* metro dependency 826 */).SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, (require(1166) /* metro dependency 1166 */).SPAN_ORIGIN_AUTO_NAVIGATION_REACT_NATIVE_NAVIGATION); } if (env0_4) { moduleValue4 = require(1169) /* metro dependency 1169 */; moduleValue4.ignoreEmptyBackNavigation((require(826) /* metro dependency 826 */).getClient(), env0_2); } binding = env0_2; const moduleValue6 = require(1169) /* metro dependency 1169 */; const ignoreEmptyRouteChangeTransactions = moduleValue6.ignoreEmptyRouteChangeTransactions; const client = (require(826) /* metro dependency 826 */).getClient(); const DEFAULT_NAVIGATION_SPAN_NAME = moduleValue.DEFAULT_NAVIGATION_SPAN_NAME; Reflect.apply(ignoreEmptyRouteChangeTransactions, moduleValue6, [client, binding, DEFAULT_NAVIGATION_SPAN_NAME, _fun13302]); env0_1 = global.setTimeout(discardLatestNavigationSpan.bind(env1_2), Module00077); return value3; function _fun13302() { // fn#13302, offset: 0x00de7476, size: 20 bytes, params: 1, frame: 2 return env1_2 === env0_0; } } function updateLatestNavigationSpanWithCurrentComponent(a0) { // fn#13303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1325:1192, owner: reactNativeNavigationIntegration.updateLatestNavigationSpanWithCurrentComponent, offset: 0x00de748a, size: 562 bytes, params: 2, frame: 24 var componentName; var componentId; var componentType; var reactNativeNavigationIntegrationClearStateChangeTimeoutBinding; var value2; var binding; var includes; var value3; var value4; var moduleValue; const DEFAULT_NAVIGATION_SPAN_NAME = (Module01168Module).DEFAULT_NAVIGATION_SPAN_NAME; var setAttributes; var binding2; var object; const SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = (require(826) /* metro dependency 826 */).SEMANTIC_ATTRIBUTE_SENTRY_SOURCE; const SEMANTIC_ATTRIBUTE_SENTRY_OP = (require(826) /* metro dependency 826 */).SEMANTIC_ATTRIBUTE_SENTRY_OP; var moduleValue2; var addBreadcrumb; var object2; var pushRecentComponentIdBinding; if (env0_2) { if (env0_7) { componentId = a0.componentId; if (componentId === env0_7.componentId) { discardLatestNavigationSpan(); } else { reactNativeNavigationIntegrationClearStateChangeTimeoutBinding = reactNativeNavigationIntegrationClearStateChangeTimeout; value2 = undefined; reactNativeNavigationIntegrationClearStateChangeTimeoutBinding(); binding = env0_5; includes = binding.includes; componentId = a0.componentId; value3 = Reflect.apply(includes, binding, [componentId]); value4 = environment.__proto__; moduleValue = require(826) /* metro dependency 826 */; if (moduleValue.spanToJSON(env0_2).description === DEFAULT_NAVIGATION_SPAN_NAME) { binding = env0_2; binding.updateName(a0.componentName); } binding = env0_2; setAttributes = binding.setAttributes; binding2 = env1_3; object = {}; componentName = a0.componentName; object['route.name'] = componentName; componentId = a0.componentId; object['route.component_id'] = componentId; componentType = a0.componentType; object['route.component_type'] = componentType; object['route.has_been_seen'] = value3; componentName = env0_7 == null ? value2 : env0_7.componentName; object['previous_route.name'] = componentName; componentId = env0_7 == null ? value2 : env0_7.componentId; object['previous_route.component_id'] = componentId; componentType = env0_7 == null ? value2 : env0_7.componentType; object['previous_route.component_type'] = componentType; Reflect.apply(setAttributes, binding, [binding2(binding2(object, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'component'), SEMANTIC_ATTRIBUTE_SENTRY_OP, 'navigation')]); if (env0_0 != null) { binding = env0_0; binding.setCurrentRoute(a0.componentName); } moduleValue2 = require(826) /* metro dependency 826 */; addBreadcrumb = moduleValue2.addBreadcrumb; object = {'category': 'navigation', 'type': 'navigation'}; componentName = a0.componentName; object.message = 'Navigation to ' + componentName; object2 = {}; componentName = env0_7 == null ? value2 : env0_7.componentName; object2.from = componentName; componentName = a0.componentName; object2.to = componentName; object.data = object2; Reflect.apply(addBreadcrumb, moduleValue2, [object]); pushRecentComponentIdBinding = pushRecentComponentId; componentId = a0.componentId; pushRecentComponentIdBinding(componentId); env0_7 = a0; } } else { reactNativeNavigationIntegrationClearStateChangeTimeoutBinding = reactNativeNavigationIntegrationClearStateChangeTimeout; value2 = undefined; reactNativeNavigationIntegrationClearStateChangeTimeoutBinding(); binding = env0_5; includes = binding.includes; componentId = a0.componentId; value3 = Reflect.apply(includes, binding, [componentId]); value4 = environment.__proto__; moduleValue = require(826) /* metro dependency 826 */; if (moduleValue.spanToJSON(env0_2).description === DEFAULT_NAVIGATION_SPAN_NAME) { binding = env0_2; binding.updateName(a0.componentName); } binding = env0_2; setAttributes = binding.setAttributes; binding2 = env1_3; object = {}; componentName = a0.componentName; object['route.name'] = componentName; componentId = a0.componentId; object['route.component_id'] = componentId; componentType = a0.componentType; object['route.component_type'] = componentType; object['route.has_been_seen'] = value3; componentName = env0_7 == null ? value2 : env0_7.componentName; object['previous_route.name'] = componentName; componentId = env0_7 == null ? value2 : env0_7.componentId; object['previous_route.component_id'] = componentId; componentType = env0_7 == null ? value2 : env0_7.componentType; object['previous_route.component_type'] = componentType; Reflect.apply(setAttributes, binding, [binding2(binding2(object, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'component'), SEMANTIC_ATTRIBUTE_SENTRY_OP, 'navigation')]); if (env0_0 != null) { binding = env0_0; binding.setCurrentRoute(a0.componentName); } moduleValue2 = require(826) /* metro dependency 826 */; addBreadcrumb = moduleValue2.addBreadcrumb; object = {'category': 'navigation', 'type': 'navigation'}; componentName = a0.componentName; object.message = 'Navigation to ' + componentName; object2 = {}; componentName = env0_7 == null ? value2 : env0_7.componentName; object2.from = componentName; componentName = a0.componentName; object2.to = componentName; object.data = object2; Reflect.apply(addBreadcrumb, moduleValue2, [object]); pushRecentComponentIdBinding = pushRecentComponentId; componentId = a0.componentId; pushRecentComponentIdBinding(componentId); env0_7 = a0; } } } function pushRecentComponentId(a0) { // fn#13304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1325:2125, owner: reactNativeNavigationIntegration.pushRecentComponentId, offset: 0x00de76bc, size: 71 bytes, params: 2, frame: 13 let binding = env0_5; binding.push(a0); if (env0_5.length > 200) { binding = env0_5; env0_5 = binding.slice(env0_5.length - 200); } } function discardLatestNavigationSpan() { // fn#13305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1325:2212, owner: reactNativeNavigationIntegration.discardLatestNavigationSpan, offset: 0x00de7703, size: 94 bytes, params: 1, frame: 13 var value2; var moduleValue; if (env0_2) { value2 = environment.__proto__; moduleValue = require(1130) /* metro dependency 1130 */; if (moduleValue.isSentrySpan(env0_2)) { env0_2._sampled = false; } env0_2.end(); } reactNativeNavigationIntegrationClearStateChangeTimeout(); } function reactNativeNavigationIntegrationClearStateChangeTimeout() { // fn#13306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1325:2321, owner: reactNativeNavigationIntegration.clearStateChangeTimeout, offset: 0x00de7761, size: 36 bytes, params: 1, frame: 12 if (env0_1 !== undefined) { global.clearTimeout(env0_1); } } function reactNativeNavigationIntegrationAfterAllSetup(a0) { // fn#13307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1325:2424, owner: reactNativeNavigationIntegration.afterAllSetup, offset: 0x00de7785, size: 97 bytes, params: 2, frame: 12 var object; var options; let value = environment.__proto__; value = require(1174) /* metro dependency 1174 */; value = value.getReactNativeTracingIntegration(a0); env0_0 = value; if (value) { object = {}; options = env0_0.options; object.finalTimeout = options.finalTimeoutMs; options = env0_0.options; object.idleTimeout = options.idleTimeoutMs; } } } } global.__d(_fun13299, 1198, [77, 1168, 1174, 826, 1166, 1169, 1130]) /* metro module 1198, dependencies: [77, 1168, 1174, 826, 1166, 1169, 1130] */;