/* Metro module 1169; source: unknown; dependencies: [27, 1130, 826] */ import * as ReactNativeModule from './module-00027-ReactNative.js'; /* Metro dependency 27 */ import * as Module00826Module from './module-00826.js'; /* Metro dependency 826 */ import * as Module01130Module from './module-01130.js'; /* Metro dependency 1130 */ function _fun12964(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#12964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1296:6, offset: 0x00ddc5b7, size: 153 bytes, params: 8, frame: 18 let env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let env0_2 = (ReactNativeModule).AppState; exports.onThisSpanEnd = function(a0, a1, a2) { var env0_0 = a1; var env0_1 = a2; a0.on('spanEnd', _fun12970); }; exports.adjustTransactionDuration = function(a0, a1, a2) { var env0_0 = a1; var env0_1 = a2; if (require(dependencyMap[1]).isRootSpan(a1)) { a0.on('spanEnd', _fun12972); } else { require(dependencyMap[2]).debug.warn('Not sampling empty back spans only works for Sentry Transactions (Root Spans).'); } }; exports.ignoreEmptyBackNavigation = function(a0, a1) { discardEmptyNavigationSpan(a0, a1, _fun12974, _fun12975); }; exports.ignoreEmptyRouteChangeTransactions = function(a0, a1, a2, a3) { var env0_0 = a0; var env0_1 = a2; var env0_2 = a3; discardEmptyNavigationSpan(a0, a1, _fun12977, _fun12978); }; exports.onlySampleIfChildSpans = onlySampleIfChildSpans; exports.cancelInBackground = cancelInBackground; function discardEmptyNavigationSpan(a0, a1, a2, a3) { // fn#12965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1296:115, offset: 0x00ddc650, size: 255 bytes, params: 5, frame: 18 const debug = (Module00826Module).debug; var moduleValue; var moduleValue2; const env0_0 = a1; const env0_1 = a2; const env0_2 = a3; if (a0) { if (a1) { moduleValue = require(1130) /* metro dependency 1130 */; if (moduleValue.isRootSpan(a1)) { moduleValue2 = require(1130) /* metro dependency 1130 */; if (moduleValue2.isSentrySpan(a1)) { a0.on('spanEnd', function(a0) { if (a0 === require) { if (importDefault(require)) { if (_fun12967(require).length <= 0) { importAll(require); require._sampled = false; } } } }); } else { debug.warn('Not sampling empty navigation spans only works for Sentry Transactions (Root Spans).'); } } else { debug.warn('Not sampling empty navigation spans only works for Sentry Transactions (Root Spans).'); } } else { debug.warn('Could not hook on spanEnd event because span is not defined.'); } } else { debug.warn('Could not hook on spanEnd event because client is not defined.'); } function _fun12966(a0) { // fn#12966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1296:227, offset: 0x00ddc74f, size: 84 bytes, params: 2, frame: 12 if (a0 === require) { if (importDefault(require)) { if (getMeaningfulChildSpans(require).length <= 0) { importAll(require); require._sampled = false; } } } function getMeaningfulChildSpans(a0) { // fn#12967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1296:261, offset: 0x00ddc7a3, size: 62 bytes, params: 2, frame: 13 var environment; const env0_0 = a0; let value = environment.__proto__.__proto__; value = require(826) /* metro dependency 826 */; value = value.getSpanDescendants(a0); return value.filter(_fun12968); function _fun12968(a0) { // fn#12968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1296:342, offset: 0x00ddc7e1, size: 156 bytes, params: 2, frame: 13 var r0; const spanId = a0.spanContext().spanId; const binding = env0_0; let value = spanId !== binding.spanContext().spanId; if (value) { value = environment.__proto__.__proto__.__proto__; value = require(826) /* metro dependency 826 */; value = value.spanToJSON(a0).op !== 'ui.load.initial_display'; r0 = value; } else { r0 = value; } if (r0) { value = environment.__proto__.__proto__.__proto__; value = require(826) /* metro dependency 826 */; value = value.spanToJSON(a0).op !== 'navigation.processing'; r0 = value; } return r0; } } } } function onThisSpanEnd(a0, a1, a2) { // fn#12969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1296:851, offset: 0x00ddc87d, size: 46 bytes, params: 4, frame: 13 const env0_0 = a1; const env0_1 = a2; a0.on('spanEnd', function(a0) { if (require === a0) { importDefault(a0); } }); function _fun12970(a0) { // fn#12970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1296:897, offset: 0x00ddc8ab, size: 29 bytes, params: 2, frame: 11 if (require === a0) { importDefault(a0); } } } function adjustTransactionDuration(a0, a1, a2) { // fn#12971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1296:953, offset: 0x00ddc8c8, size: 127 bytes, params: 4, frame: 16 const env0_0 = a1; const env0_1 = a2; if (Module01130Module.isRootSpan(a1)) { a0.on('spanEnd', _fun12972); } else { (require(826) /* metro dependency 826 */).debug.warn('Not sampling empty back spans only works for Sentry Transactions (Root Spans).'); } function _fun12972(a0) { // fn#12972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1296:1033, offset: 0x00ddc947, size: 205 bytes, params: 2, frame: 18 var value2; var moduleValue; var spanToJSON; var timestamp; var moduleValue2; var start_timestamp; var value3; var setStatus; var object; if (a0 === require) { value2 = environment.__proto__; moduleValue = require(826) /* metro dependency 826 */; spanToJSON = moduleValue.spanToJSON; timestamp = Reflect.apply(spanToJSON, moduleValue, [require]).timestamp; moduleValue2 = require(826) /* metro dependency 826 */; spanToJSON = moduleValue2.spanToJSON; start_timestamp = Reflect.apply(spanToJSON, moduleValue2, [require]).start_timestamp; if (timestamp) { if (start_timestamp) { value3 = timestamp - start_timestamp; if (timestamp && (value3 > importDefault || value3 < 0)) { setStatus = require.setStatus; object = {}; object.code = (require(826) /* metro dependency 826 */).SPAN_STATUS_ERROR; object.message = 'deadline_exceeded'; Reflect.apply(setStatus, require, [object]); require.setAttribute('maxTransactionDurationExceeded', 'true'); } } } } } } function ignoreEmptyBackNavigation(a0, a1) { // fn#12973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1296:1434, offset: 0x00ddca14, size: 35 bytes, params: 3, frame: 17 discardEmptyNavigationSpan(a0, a1, _fun12974, function() { require(dependencyMap[2]).debug.log('Not sampling transaction as route has been seen before. Pass ignoreEmptyBackNavigationTransactions = false to disable this feature.'); }); function _fun12974(a0) { // fn#12974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1296:1506, offset: 0x00ddca37, size: 72 bytes, params: 2, frame: 12 let value = environment.__proto__; value = undefined; const data = Module00826Module.spanToJSON(a0).data; return (data === null || value === data ? value : data['route.has_been_seen']) === true; } function _fun12975() { // fn#12975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1296:1622, offset: 0x00ddca7f, size: 50 bytes, params: 1, frame: 12 (Module00826Module).debug.log('Not sampling transaction as route has been seen before. Pass ignoreEmptyBackNavigationTransactions = false to disable this feature.'); } } function ignoreEmptyRouteChangeTransactions(a0, a1, a2, a3) { // fn#12976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1296:1827, offset: 0x00ddcab1, size: 56 bytes, params: 5, frame: 17 const env0_0 = a0; const env0_1 = a2; const env0_2 = a3; discardEmptyNavigationSpan(a0, a1, _fun12977, _fun12978); function _fun12977(a0) { // fn#12977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1296:1912, offset: 0x00ddcae9, size: 99 bytes, params: 2, frame: 14 let value = environment.__proto__; value = undefined; const value2 = (Module00826Module).spanToJSON(a0); return value2.description === importDefault && !(value2.data === null || value === value2.data ? value : value2.data['route.name']) && importAll(); } function _fun12978(a0) { // fn#12978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1296:2044, offset: 0x00ddcb4c, size: 116 bytes, params: 2, frame: 17 (Module00826Module).debug.log('Discarding empty "' + importDefault + '" transaction that never received route information.'); if (env0_0 != null) { env0_0.recordDroppedEvent('sample_rate', 'transaction'); } } } function onlySampleIfChildSpans(a0, a1) { // fn#12979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1296:2240, offset: 0x00ddcbc0, size: 151 bytes, params: 3, frame: 17 var moduleValue2; const debug = (Module00826Module).debug; const env0_0 = a1; if (Module01130Module.isRootSpan(a1)) { moduleValue2 = Module01130Module; if (moduleValue2.isSentrySpan(a1)) { a0.on('spanEnd', _fun12980); } else { debug.warn('Not sampling childless spans only works for Sentry Transactions (Root Spans).'); } } else { debug.warn('Not sampling childless spans only works for Sentry Transactions (Root Spans).'); } function _fun12980(a0) { // fn#12980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1296:2340, offset: 0x00ddcc57, size: 175 bytes, params: 2, frame: 16 var value2; var moduleValue; var debug; var log; var moduleValue2; if (a0 === require) { value2 = environment.__proto__; moduleValue = require(826) /* metro dependency 826 */; if (moduleValue.getSpanDescendants(require).length <= 1) { debug = (require(826) /* metro dependency 826 */).debug; log = debug.log; moduleValue2 = require(826) /* metro dependency 826 */; Reflect.apply(log, debug, ['Not sampling as ' + moduleValue2.spanToJSON(require).op + ' transaction has no child spans.']); require._sampled = false; } } } } function cancelInBackground(a0, a1) { // fn#12981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1296:2640, offset: 0x00ddcd06, size: 74 bytes, params: 3, frame: 15 const env0_0 = a1; if (AppState.addEventListener('change', _fun12982)) { a0.on('spanEnd', _fun12983); } function _fun12982(a0) { // fn#12982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1296:2708, offset: 0x00ddcd50, size: 172 bytes, params: 2, frame: 20 var value; var debug; var log; var setStatus; var object; if (a0 === 'background') { value = environment.__proto__; debug = (require(826) /* metro dependency 826 */).debug; log = debug.log; value = require(826) /* metro dependency 826 */; Reflect.apply(log, debug, ['Setting ' + value.spanToJSON(require).op + ' transaction to cancelled because the app is in the background.']); setStatus = require.setStatus; object = {}; object.code = (require(826) /* metro dependency 826 */).SPAN_STATUS_ERROR; object.message = 'cancelled'; Reflect.apply(setStatus, require, [object]); require.end(); } } function _fun12983(a0) { // fn#12983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1296:2956, offset: 0x00ddcdfc, size: 176 bytes, params: 2, frame: 17 var remove; var value2; var value3; var debug; var log; var moduleValue; if (a0 === require) { value2 = environment.__proto__; value3 = undefined; debug = (require(826) /* metro dependency 826 */).debug; log = debug.log; moduleValue = require(826) /* metro dependency 826 */; Reflect.apply(log, debug, ['Removing AppState listener for ' + moduleValue.spanToJSON(require).op + ' transaction.']); remove = env0_1 == null ? value3 : env0_1.remove; if (!(remove === null || value3 === remove)) { remove.call(env0_1); } } } } } global.__d(_fun12964, 1169, [27, 1130, 826]) /* metro module 1169, dependencies: [27, 1130, 826] */;