/* Metro module 1073; source: unknown; dependencies: [826, 1047] */ function _fun11227(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#11227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1200:6, offset: 0x00da5924, size: 104 bytes, params: 8, frame: 18 let env0_0 = require; const closure = instrumentDOM; const makeDOMEventHandler = function(a0) { var env0_0 = a0; var env0_1 = arguments.length > 1 && arguments[1] !== undefined && arguments[1]; return _fun11235; }; const Object = global.Object; const defineProperty = Object.defineProperty; const Symbol = global.Symbol; Reflect.apply(defineProperty, Object, [exports, Symbol.toStringTag, {value: 'Module'}]); exports.addClickKeypressInstrumentationHandler = function(a0) { require(dependencyMap[0]).addHandler('dom', a0); require(dependencyMap[0]).maybeInstrument('dom', instrumentDOM); }; exports.instrumentDOM = closure; } function instrumentDOM() { // fn#11228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1200:101, offset: 0x00da598c, size: 210 bytes, params: 1, frame: 20 var dOMEventHandler; const WINDOW = (require(1047) /* metro dependency 1047 */).WINDOW; let document = WINDOW.document; if (document) { dOMEventHandler = makeDOMEventHandler((require(826) /* metro dependency 826 */).triggerHandlers.bind(null, 'dom'), true); document = WINDOW.document; document.addEventListener('click', dOMEventHandler, false); document = WINDOW.document; document.addEventListener('keypress', dOMEventHandler, false); ['EventTarget', 'Node'].forEach(_fun11229); } } function makeDOMEventHandler(a0) { // fn#11234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1200:1239, offset: 0x00da5cde, size: 52 bytes, params: 2, frame: 6 const env0_0 = a0; const r1 = arguments.length > 1 && arguments[1] !== undefined && arguments[1]; return _fun11235; } function _fun11229(a0) { // fn#11229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1200:374, offset: 0x00da5a5e, size: 168 bytes, params: 2, frame: 20 var environment; let value = environment.__proto__; const value2 = undefined; const WINDOW = (require(1047) /* metro dependency 1047 */).WINDOW; const property = WINDOW[a0]; const prototype = property == null ? value2 : property.prototype; if (prototype != null && prototype.hasOwnProperty != null && prototype.hasOwnProperty('addEventListener')) { value = require(826) /* metro dependency 826 */; value.fill(prototype, 'addEventListener', function(a0) { var env0_0 = a0; return _fun11231; }); value = require(826) /* metro dependency 826 */; value.fill(prototype, 'removeEventListener', _fun11232); } return value2; } function _fun11235(a0) { // fn#11235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1200:1340, offset: 0x00da5d12, size: 466 bytes, params: 2, frame: 21 var environment; var target; var r3; var r4; var r1; var type; var _sentryId; var error; var value; var value2; var moduleValue; var value3; var moduleValue2; var type2; var value7; var target2; var target3; var binding; var value8; if (a0) { if (!a0._sentryCaptured) { try { target = a0.target; } catch (error) { value = null; target = value; } type = a0.type; value = type === 'keypress'; if (value) { r3 = target == null || !target.tagName; if (!r3) { r4 = target.tagName !== 'INPUT' && target.tagName !== 'TEXTAREA'; r4 = r4 && !target.isContentEditable; r3 = r4; } r1 = r3; } else { r1 = value; } if (!r1) { value = environment.__proto__; value2 = undefined; moduleValue = require(826) /* metro dependency 826 */; value3 = true; moduleValue.addNonEnumerableProperty(a0, '_sentryCaptured', value3); if (target) { _sentryId = target._sentryId; r4 = !_sentryId; } else { r4 = target; } if (r4) { moduleValue2 = require(826) /* metro dependency 826 */; moduleValue2.addNonEnumerableProperty(target, '_sentryId', (require(826) /* metro dependency 826 */).uuid4()); } type = a0.type; type = type === 'keypress' ? 'input' : a0.type; type2 = a0.type; value7 = false; if (type2 !== env1_3) { r4 = value7; } else { try { target2 = a0.target; if (target2) { target3 = a0.target; _sentryId = target3._sentryId; binding = env1_4; value8 = _sentryId !== binding; r4 = value8 ? value7 : value3; } else { r4 = value7; } } catch (error) { r4 = value3; } } if (!r4) { env0_0({event: a0, name: type, global: env0_1}); type = a0.type; _sentryId = target ? target._sentryId : value2; } global.clearTimeout(env1_2); env1_2 = (require(1047) /* metro dependency 1047 */).WINDOW.setTimeout(function() { env2_4 = undefined; env2_3 = undefined; }, 1000); } } } } function _fun11230(a0) { // fn#11230, offset: 0x00da5b06, size: 16 bytes, params: 2, frame: 2 const env0_0 = a0; return _fun11231; } function _fun11232(a0) { // fn#11232, offset: 0x00da5bef, size: 16 bytes, params: 2, frame: 2 const env0_0 = a0; return _fun11233; } function _fun11231(a0, a1, a2) { // fn#11231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1200:567, offset: 0x00da5b16, size: 217 bytes, params: 4, frame: 21 var r3; var r32; var __sentry_instrumentation_handlers__; var object2; var property; var handler; var value; var makeDOMEventHandlerBinding; var binding; var value2; var call; var refCount; var error; reducibleJoin2: while (true) { reduciblePort35: while (true) { exceptionLanding34: while (true) { if (a0 === 'click') { break reducibleJoin2; } if (a0 != 'keypress') { break reduciblePort35; } break reducibleJoin2; } break reduciblePort35; } value = environment; binding = env0_0; call = binding.call; return Reflect.apply(call, binding, [this, a0, a1, a2]); } try { __sentry_instrumentation_handlers__ = this.__sentry_instrumentation_handlers__; } catch (error) { break exceptionLanding34; } reducibleJoin5: while (true) { if (__sentry_instrumentation_handlers__) { r3 = __sentry_instrumentation_handlers__; break reducibleJoin5; } try { object2 = {}; } catch (error) { break exceptionLanding34; } r3 = object2; break reducibleJoin5; } try { this.__sentry_instrumentation_handlers__ = r3; } catch (error) { break exceptionLanding34; } try { property = r3[a0]; } catch (error) { break exceptionLanding34; } reducibleJoin14: while (true) { if (property) { r32 = property; break reducibleJoin14; } try { object2 = {}; } catch (error) { break exceptionLanding34; } try { object2.refCount = 0; } catch (error) { break exceptionLanding34; } r32 = object2; break reducibleJoin14; } try { r3[a0] = r32; } catch (error) { break exceptionLanding34; } try { handler = r32.handler; } catch (error) { break exceptionLanding34; } reducibleJoin30: while (true) { if (handler) { break reducibleJoin30; } value = environment.__proto__.__proto__.__proto__; try { makeDOMEventHandlerBinding = makeDOMEventHandler; } catch (error) { break exceptionLanding34; } value = environment.__proto__.__proto__; try { binding = env2_0; } catch (error) { break exceptionLanding34; } try { value = makeDOMEventHandlerBinding(binding); } catch (error) { break exceptionLanding34; } try { r32.handler = value; } catch (error) { break exceptionLanding34; } value2 = environment; try { binding = env0_0; } catch (error) { break exceptionLanding34; } try { call = binding.call; } catch (error) { break exceptionLanding34; } try { Reflect.apply(call, binding, [this, a0, value, a2]); } catch (error) { break exceptionLanding34; } break reducibleJoin30; } try { refCount = r32.refCount; } catch (error) { break exceptionLanding34; } try { value = typeof refCount === 'bigint' ? refCount + 1n : +refCount + 1; } catch (error) { break exceptionLanding34; } try { r32.refCount = value; } catch (error) { break exceptionLanding34; } return env0_0.call(this, a0, a1, a2); } function _fun11233(a0, a1, a2) { // fn#11233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1200:920, offset: 0x00da5bff, size: 223 bytes, params: 4, frame: 23 var r3; var __sentry_instrumentation_handlers__; var object2; var property; var refCount; var value; var binding; var call; var handler; var Object; var keys; var length; var error; reducibleJoin2: while (true) { reduciblePort33: while (true) { exceptionLanding32: while (true) { if (a0 === 'click') { break reducibleJoin2; } if (a0 != 'keypress') { break reduciblePort33; } break reducibleJoin2; } break reduciblePort33; } value = environment; binding = env0_0; call = binding.call; return Reflect.apply(call, binding, [this, a0, a1, a2]); } try { __sentry_instrumentation_handlers__ = this.__sentry_instrumentation_handlers__; } catch (error) { break exceptionLanding32; } reducibleJoin5: while (true) { if (__sentry_instrumentation_handlers__) { r3 = __sentry_instrumentation_handlers__; break reducibleJoin5; } try { object2 = {}; } catch (error) { break exceptionLanding32; } r3 = object2; break reducibleJoin5; } try { property = r3[a0]; } catch (error) { break exceptionLanding32; } reducibleJoin33: while (true) { if (property) { try { refCount = property.refCount; } catch (error) { break exceptionLanding32; } try { value = typeof refCount === 'bigint' ? refCount - 1n : +refCount - 1; } catch (error) { break exceptionLanding32; } try { property.refCount = value; } catch (error) { break exceptionLanding32; } try { refCount = property.refCount; } catch (error) { break exceptionLanding32; } try { value = refCount <= 0; } catch (error) { break exceptionLanding32; } reducibleJoin25: while (true) { if (value) { value = environment; try { binding = env0_0; } catch (error) { break exceptionLanding32; } try { call = binding.call; } catch (error) { break exceptionLanding32; } try { handler = property.handler; } catch (error) { break exceptionLanding32; } try { Reflect.apply(call, binding, [this, a0, handler, a2]); } catch (error) { break exceptionLanding32; } try { property.handler = undefined; } catch (error) { break exceptionLanding32; } try { delete r3[a0]; } catch (error) { break exceptionLanding32; } break reducibleJoin25; } break reducibleJoin25; } try { Object = global.Object; } catch (error) { break exceptionLanding32; } try { keys = Object.keys; } catch (error) { break exceptionLanding32; } try { value = Reflect.apply(keys, Object, [r3]); } catch (error) { break exceptionLanding32; } try { length = value.length; } catch (error) { break exceptionLanding32; } try { value = length !== 0; } catch (error) { break exceptionLanding32; } if (value) { break reducibleJoin33; } try { delete this.__sentry_instrumentation_handlers__; } catch (error) { break exceptionLanding32; } break reducibleJoin33; } break reducibleJoin33; } return env0_0.call(this, a0, a1, a2); }