/* Metro module 12404; source: lib/SystemResponsiveness.tsx; dependencies: [6, 7, 22, 7131, 4406, 2] */ function _fun94566(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12590:6, offset: 0x0211d8c7, size: 160 bytes, params: 8, frame: 19 const env0_0 = require; const _arrayLikeToArray_94569 = function(a0, a1) { var r0; var r1; var r2; var value3; var length; var value5; var value = undefined; var value2 = value == null; reducibleJoin2: while (true) { if (value2) { r0 = value2; break reducibleJoin2; } value3 = value > a0.length; r0 = value3; break reducibleJoin2; } reducibleJoin4: while (true) { if (r0) { length = a0.length; r1 = length; break reducibleJoin4; } r1 = value; break reducibleJoin4; } value = (0, global.Array)(r1); var value4 = 0; if (value4 < r1) { r2 = value4; reducibleLoop5: while (true) { value[r2] = a0[r2]; value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1; if (value5 < r1) { r2 = value5; continue reducibleLoop5; } break reducibleLoop5; } } return value; }; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importDefault(6) /* metro dependency 6 */; const env0_4 = importDefault(7) /* metro dependency 7 */; let value = _fun94570(); (require(2) /* metro dependency 2 */).fileFinishedImporting('lib/SystemResponsiveness.tsx'); exports.default = value; } function _createForOfIteratorHelperLoose_94567(a0, a1) { // fn#94567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12590:120, offset: 0x0211d967, size: 372 bytes, params: 3, frame: 20 var r6; var r9; var r5; var value3; var regexp; const env0_0 = a0; const Symbol = global.Symbol; let value = typeof Symbol !== 'undefined'; let r1 = value && a0[global.Symbol.iterator]; r1 = !r1 ? a0['@@iterator'] : r1; if (r1) { value = r1.call(a0); return value.next.bind(value); } const Array = global.Array; if (Array.isArray(a0)) { if (r1) { } return _fun94568; } value = undefined; if (a0) { if (typeof a0 === 'string') { value = _arrayLikeToArray_94569(a0, value); r5 = value; } else { value3 = ({}).toString.call(a0).slice(8, -1); r6 = value3 === 'Object' && a0.constructor; r9 = r6 ? a0.constructor.name : value3; if (r9 === 'Map') { r6 = global.Array.from(a0); } else if (r9 === 'Set') { r6 = global.Array.from(a0); } else if (r9 === 'Arguments') { value = _arrayLikeToArray_94569(a0, value); r6 = value; } else { regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', ''); if (regexp.test(r9)) { value = _arrayLikeToArray_94569(a0, value); r6 = value; } else { r6 = value; } } r5 = r6; } } else { r5 = value; } if (r5) { if (r5) { } return _fun94568; } const TypeError = global.TypeError; throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.'); } function _fun94570() { // fn#94570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12590:1036, offset: 0x0211dadb, size: 111 bytes, params: 1, frame: 15 return env0_4(SystemResponsiveness, [{key: 'start', value: function() { var connection = this.connection; var Stats = require(dependencyMap[4]).BaseConnectionEvent.Stats; connection.on(Stats, this.sampleStats); }}, {key: 'stop', value: function() { var connection = this.connection; var Stats = require(dependencyMap[4]).BaseConnectionEvent.Stats; connection.off(Stats, this.sampleStats); }}, {key: 'getPttQueueLatencyStats', value: function() { var value = this.pttQueueLatencyHistogram.getReport([50, 95]); return {ptt_queue_latency_max: value.max, ptt_queue_latency_mean: value.mean, ptt_queue_latency_p50: value.percentiles[50], ptt_queue_latency_p95: value.percentiles[95], ptt_queue_latency_samples: value.samples}; }}]); } function SystemResponsiveness(a0) { // fn#94571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12590:1057, offset: 0x0211db4a, size: 107 bytes, params: 2, frame: 15 var environment; const value = environment.__proto__; env1_3(this, SystemResponsiveness); this.connection = a0; this.sampleStats = sampleStats; const Histogram = (require(7131) /* metro dependency 7131: Histogram */).Histogram; this.pttQueueLatencyHistogram = new Histogram(); } function SystemResponsivenessSampleStats(a0) { // fn#94572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12590:1154, owner: SystemResponsiveness.sampleStats, offset: 0x0211dbb5, size: 70 bytes, params: 2, frame: 13 var environment; var value; if (a0 != null) { value = environment.__proto__.__proto__; value = importDefault(22) /* metro dependency 22 */; value.forEach(a0.rtp.outbound, _fun94573); } } function _fun94573(a0) { // fn#94573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12590:1199, offset: 0x0211dbfb, size: 116 bytes, params: 2, frame: 16 var r0; var r1; var value; var _createForOfIteratorHelperLoose_94567Binding; var pttQueueLatencyMicrosSamples; var value2; var done; var value3; var value4; var value5; var pttQueueLatencyHistogram; var addSample; var value6; reducibleJoin5: while (true) { if (a0.type !== 'audio') { break reducibleJoin5; } value = environment.__proto__.__proto__.__proto__; _createForOfIteratorHelperLoose_94567Binding = _createForOfIteratorHelperLoose_94567; pttQueueLatencyMicrosSamples = a0.pttQueueLatencyMicrosSamples; reducibleJoin3: while (true) { if (pttQueueLatencyMicrosSamples != null) { r0 = pttQueueLatencyMicrosSamples; break reducibleJoin3; } r0 = []; break reducibleJoin3; } value = _createForOfIteratorHelperLoose_94567Binding(r0); value2 = value(); done = value2.done; value3 = environment.__proto__; if (done) { break reducibleJoin5; } r1 = value2; reducibleLoop4: while (true) { value4 = r1.value; value5 = value4 / 1000; pttQueueLatencyHistogram = env1_0.pttQueueLatencyHistogram; addSample = pttQueueLatencyHistogram.addSample; Reflect.apply(addSample, pttQueueLatencyHistogram, [value5]); value6 = value(); done = value6.done; if (done) { break reducibleJoin5; } r1 = value6; continue reducibleLoop4; } } }