/* Metro module 12387; source: lib/RTCConnectionStats.tsx; dependencies: [6, 7, 661, 4303, 22, 12388, 2] */ function _fun94355(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:6, offset: 0x02114f1f, size: 160 bytes, params: 8, frame: 19 const env0_0 = require; 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 */; const env0_5 = (require(661) /* metro dependency 661: Constants */).RTCConnectionStates; const value = _fun94356(); (require(2) /* metro dependency 2 */).fileFinishedImporting('lib/RTCConnectionStats.tsx'); exports.StateHistory = value; } function _fun94356() { // fn#94356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:149, offset: 0x02114fbf, size: 138 bytes, params: 1, frame: 15 return env0_4(StateHistory, [{key: 'reset', value: function(a0) { this.current = null; this.history = []; if (a0 != null) { this.update(a0); } }}, {key: 'update', value: value_94359}, {key: 'getVoiceConnectionSuccessStats', value: value_94360}, {key: 'getStateDurations', value: value_94363}]); } function StateHistory(a0) { // fn#94357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:170, offset: 0x02115049, size: 63 bytes, params: 2, frame: 14 env1_3(this, StateHistory); this.current = null; this.history = []; if (a0 != null) { this.update(a0); } } function value_94359(a0) { // fn#94359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:388, offset: 0x021150b3, size: 86 bytes, params: 2, frame: 14 var history; var push; var object2; var value; if (this.current !== a0) { this.current = a0; history = this.history; push = history.push; object2 = {state: a0}; value = environment.__proto__; value = require(4303) /* metro dependency 4303: TimeUtils */; object2.startTime = value.now(); Reflect.apply(push, history, [object2]); } } function value_94360() { // fn#94360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:534, offset: 0x02115109, size: 229 bytes, params: 1, frame: 15 var environment; var r5; let value = a0; if (value !== undefined) { r5 = value; } else { value = environment.__proto__; value = require(4303) /* metro dependency 4303: TimeUtils */; value = value.now(); r5 = value; } const closure = totalDuration; const env0_0 = this.getStateDurations(r5); const object2 = {}; value = environment.__proto__; const AWAITING_ENDPOINT = RTCConnectionStates.AWAITING_ENDPOINT; object2.state_awaiting_endpoint_ms = closure(AWAITING_ENDPOINT); const AUTHENTICATING = RTCConnectionStates.AUTHENTICATING; object2.state_authenticating_ms = closure(AUTHENTICATING); const CONNECTING = RTCConnectionStates.CONNECTING; object2.state_connecting_ms = closure(CONNECTING); const DISCONNECTED = RTCConnectionStates.DISCONNECTED; object2.state_disconnected_ms = closure(DISCONNECTED); const ICE_CHECKING = RTCConnectionStates.ICE_CHECKING; object2.state_ice_checking_ms = closure(ICE_CHECKING); const NO_ROUTE = RTCConnectionStates.NO_ROUTE; object2.state_no_route_ms = closure(NO_ROUTE); const RTC_CONNECTING = RTCConnectionStates.RTC_CONNECTING; object2.state_rtc_connecting_ms = closure(RTC_CONNECTING); const RTC_DISCONNECTED = RTCConnectionStates.RTC_DISCONNECTED; object2.state_rtc_disconnected_ms = closure(RTC_DISCONNECTED); return object2; } function value_94363(a0) { // fn#94363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:1145, offset: 0x02115249, size: 142 bytes, params: 2, frame: 16 var environment; if (this.history.length === 0) { return []; } let value = environment.__proto__; value = importDefault(12388) /* metro dependency 12388: zipWithNext */; value = value(this.history, function(a0, a1) { return {state: a0.state, durationMs: a1.startTime - a0.startTime}; }); const push = value.push; const defaultImport = importDefault(22) /* metro dependency 22 */; const value2 = defaultImport.last(this.history); Reflect.apply(push, value, [{state: value2.state, durationMs: a0 - value2.startTime}]); return value; } function totalDuration(a0) { // fn#94361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:592, owner: value_94360.totalDuration, offset: 0x021151ee, size: 62 bytes, params: 2, frame: 13 var environment; const env0_0 = a0; let value = environment.__proto__.__proto__; value = importDefault(22) /* metro dependency 22 */; return value.sumBy(env0_0, _fun94362); } function _fun94362(a0) { // fn#94362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:642, offset: 0x0211522c, size: 29 bytes, params: 2, frame: 4 return a0.state !== env0_0 ? 0 : a0.durationMs; }