/* Metro module 12403; source: lib/NetworkQuality.tsx; dependencies: [6, 7, 4401, 661, 4303, 2] */ function _fun94557(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:6, offset: 0x0211d49b, size: 193 bytes, params: 8, frame: 19 const env0_0 = require; const round_94558 = function(a0) { var r0; var value = a1; r0 = value !== undefined ? value : 0; r0 = a0 != null ? global.Math.round(a0) : r0; return r0; }; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_2 = importDefault(6) /* metro dependency 6 */; const env0_3 = importDefault(7) /* metro dependency 7 */; const networkStore = importDefault(4401) /* metro dependency 4401: NetworkStore */; let value = require(661) /* metro dependency 661: Constants */; const env0_5 = value.NetworkConnectionTypes; const env0_6 = value.NetworkConnectionSpeeds; value = _fun94559(); (require(2) /* metro dependency 2 */).fileFinishedImporting('lib/NetworkQuality.tsx'); exports.default = value; } function _fun94559() { // fn#94559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:250, offset: 0x0211d55c, size: 111 bytes, params: 1, frame: 15 return env0_3(NetworkQuality, [{key: '_initStats', value: value_94561}, {key: 'getStats', value: value_94564}, {key: 'incrementNetworkStats', value: value_94565}]); } function NetworkQuality() { // fn#94560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:271, offset: 0x0211d5cb, size: 80 bytes, params: 1, frame: 14 let value = environment.__proto__; env1_2(this, NetworkQuality); this._networkStats = this._initStats(); value = require(4303) /* metro dependency 4303: TimeUtils */; this._lastSampleTimestamp = value.now(); } function value_94561() { // fn#94561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:424, offset: 0x0211d61b, size: 103 bytes, params: 1, frame: 15 var environment; let Object = global.Object; const values = Object.values; const value = environment.__proto__; Reflect.apply(values, Object, [NetworkConnectionTypes]).forEach(_fun94562); Object = global.Object; Object.values(NetworkConnectionSpeeds).forEach(_fun94563); return {effectiveConnectionSpeedBuckets: {}, connectionTypeBuckets: {}}; } function value_94564() { // fn#94564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:670, offset: 0x0211d6b6, size: 366 bytes, params: 1, frame: 16 const _networkStats = this._networkStats; const object2 = {}; const round_94558Binding = round_94558; let connectionTypeBuckets = _networkStats.connectionTypeBuckets; const WIFI = NetworkConnectionTypes.WIFI; object2.duration_connection_type_wifi = round_94558Binding(connectionTypeBuckets[WIFI]); connectionTypeBuckets = _networkStats.connectionTypeBuckets; const CELLULAR = NetworkConnectionTypes.CELLULAR; object2.duration_connection_type_cellular = round_94558Binding(connectionTypeBuckets[CELLULAR]); connectionTypeBuckets = _networkStats.connectionTypeBuckets; const ETHERNET = NetworkConnectionTypes.ETHERNET; object2.duration_connection_type_ethernet = round_94558Binding(connectionTypeBuckets[ETHERNET]); connectionTypeBuckets = _networkStats.connectionTypeBuckets; const BLUETOOTH = NetworkConnectionTypes.BLUETOOTH; object2.duration_connection_type_bluetooth = round_94558Binding(connectionTypeBuckets[BLUETOOTH]); connectionTypeBuckets = _networkStats.connectionTypeBuckets; const OTHER = NetworkConnectionTypes.OTHER; object2.duration_connection_type_other = round_94558Binding(connectionTypeBuckets[OTHER]); connectionTypeBuckets = _networkStats.connectionTypeBuckets; let UNKNOWN = NetworkConnectionTypes.UNKNOWN; object2.duration_connection_type_unknown = round_94558Binding(connectionTypeBuckets[UNKNOWN]); connectionTypeBuckets = _networkStats.connectionTypeBuckets; const NONE = NetworkConnectionTypes.NONE; object2.duration_connection_type_none = round_94558Binding(connectionTypeBuckets[NONE]); let effectiveConnectionSpeedBuckets = _networkStats.effectiveConnectionSpeedBuckets; const TWO_G = NetworkConnectionSpeeds.TWO_G; object2.duration_effective_connection_speed_2g = round_94558Binding(effectiveConnectionSpeedBuckets[TWO_G]); effectiveConnectionSpeedBuckets = _networkStats.effectiveConnectionSpeedBuckets; const THREE_G = NetworkConnectionSpeeds.THREE_G; object2.duration_effective_connection_speed_3g = round_94558Binding(effectiveConnectionSpeedBuckets[THREE_G]); effectiveConnectionSpeedBuckets = _networkStats.effectiveConnectionSpeedBuckets; const FOUR_G = NetworkConnectionSpeeds.FOUR_G; object2.duration_effective_connection_speed_4g = round_94558Binding(effectiveConnectionSpeedBuckets[FOUR_G]); effectiveConnectionSpeedBuckets = _networkStats.effectiveConnectionSpeedBuckets; const FIVE_G = NetworkConnectionSpeeds.FIVE_G; object2.duration_effective_connection_speed_5g = round_94558Binding(effectiveConnectionSpeedBuckets[FIVE_G]); effectiveConnectionSpeedBuckets = _networkStats.effectiveConnectionSpeedBuckets; UNKNOWN = NetworkConnectionSpeeds.UNKNOWN; object2.duration_effective_connection_speed_unknown = round_94558Binding(effectiveConnectionSpeedBuckets[UNKNOWN]); return object2; } function value_94565(a0) { // fn#94565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:1724, offset: 0x0211d824, size: 163 bytes, params: 2, frame: 14 const value = (a0 - this._lastSampleTimestamp) / 1000; const effectiveConnectionSpeed = NetworkStore.getEffectiveConnectionSpeed(); const SLOW_TWO_G = NetworkConnectionSpeeds.SLOW_TWO_G; const r6 = effectiveConnectionSpeed !== SLOW_TWO_G ? effectiveConnectionSpeed : NetworkConnectionSpeeds.TWO_G; const type = NetworkStore.getType(); const WIMAX = NetworkConnectionTypes.WIMAX; const r4 = type !== WIMAX ? type : NetworkConnectionTypes.WIFI; this._networkStats.effectiveConnectionSpeedBuckets[r6] += value; this._networkStats.connectionTypeBuckets[r4] += value; this._lastSampleTimestamp = a0; } function _fun94562(a0) { // fn#94562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:536, offset: 0x0211d682, size: 26 bytes, params: 2, frame: 3 env0_0.connectionTypeBuckets[a0] = 0; } function _fun94563(a0) { // fn#94563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:598, offset: 0x0211d69c, size: 26 bytes, params: 2, frame: 3 env0_0.effectiveConnectionSpeedBuckets[a0] = 0; }