/* Metro module 7470; source: unknown; dependencies: [65, 57, 7375] */ import * as Module00057Module from './module-00057.js'; /* Metro dependency 57 */ import * as Module00065Module from './module-00065.js'; /* Metro dependency 65 */ function _fun60242(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7648:6, offset: 0x016ff2d9, size: 262 bytes, params: 8, frame: 17 const env0_0 = require; const sanitizeTagKey = function(a0) { return a0.replace(RegExp('[^\\w\\-./]+', 'gi'), ''); }; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); object = [['\n', '\\n'], ['\r', '\\r'], ['\t', '\\t'], ['\\', '\\\\'], ['|', '\\u{7c}'], [',', '\\u{2c}']]; exports.getBucketKey = getBucketKey; exports.sanitizeMetricKey = function(a0) { return a0.replace(RegExp('[^\\w\\-.]+', 'gi'), '_'); }; exports.sanitizeTags = function(a0) { var r6; var propertyName; var propertyName2; var property; var value2; var sanitizeTagValueBinding; var object = {}; for (propertyName in a0) { property = global.Object.prototype.hasOwnProperty; if (!property.call(a0, propertyName)) { r6 = propertyName2; continue; } value2 = sanitizeTagKey(propertyName); sanitizeTagValueBinding = sanitizeTagValue; property = global.String; object[value2] = sanitizeTagValueBinding(property(a0[propertyName])); r6 = propertyName2; } return object; }; exports.sanitizeUnit = function(a0) { return a0.replace(RegExp('[^\\w]+', 'gi'), '_'); }; exports.serializeMetricBuckets = serializeMetricBuckets; exports.simpleHash = function(a0) { var r3; var r4; var r0; var value2; var value3; var value4; var value5; var value = 0; if (value < a0.length) { r3 = value; for (r4 = value; true; r4 = value4) { value2 = a0.charCodeAt(r3); value3 = (r4 << 5) - r4 + value2; value4 = value3 & value3; value5 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1; if (!(value5 < a0.length)) { r0 = value4; break; } r3 = value5; } } else { r0 = value; } return r0 >>> value; }; function sanitizeTagValue(a0) { // fn#60244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7648:261, offset: 0x016ff401, size: 42 bytes, params: 2, frame: 13 return Module00065Module(a0).reduce(_fun60245, ''); function _fun60245(a0, a1) { // fn#60245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7648:310, offset: 0x016ff42b, size: 90 bytes, params: 3, frame: 20 var r1; var binding; var value3; var property; var property2; var value4; var error; const value = a1; const iterator = env1_4[Symbol.iterator](); const iterator2 = iterator.next; let r3 = iterator; let item2 = Reflect.apply(iterator2, r3, []); let item = item2.value; item2 = item2.done ? undefined : r3; reducibleJoin2: while (true) { if (item2 === undefined) { return a0 + value; } break reducibleJoin2; } reducibleLoop2: while (true) { try { binding = env1_3; } catch (error) { try { item2.return(); } catch { } throw error; } try { value3 = binding(item, 2); } catch (error) { try { item2.return(); } catch { } throw error; } try { property = value3[0]; } catch (error) { try { item2.return(); } catch { } throw error; } try { property2 = value3[1]; } catch (error) { try { item2.return(); } catch { } throw error; } try { value4 = value === property; } catch (error) { try { item2.return(); } catch { } throw error; } if (value4) { item2.return(); r1 = property2; break reducibleLoop2; } r3 = item2; item2 = Reflect.apply(iterator2, r3, []); item = item2.value; item2 = item2.done ? undefined : r3; if (item2 === undefined) { r1 = value; break reducibleLoop2; } continue reducibleLoop2; } return a0 + r1; } } function getBucketKey(a0, a1, a2, a3) { // fn#60246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7648:461, offset: 0x016ff485, size: 106 bytes, params: 5, frame: 17 const Object = global.Object; var value; value = Object.entries(Reflect.apply((require(7375) /* metro dependency 7375 */).dropUndefinedKeys, value, [a3])); value = value.sort(function([property], a1) { return property.localeCompare(a1[0]); }); return '' + a0 + a1 + a2 + value; } function serializeMetricBuckets(a0) { // fn#60251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7648:974, offset: 0x016ff5bb, size: 248 bytes, params: 2, frame: 43 var r24; var Object; var entries; var tags; var value2; var length; var value3; var map; var closure; var value4; var join; var value5; var HermesInternal; var concat; var value6; var name; var unit; var metric; var metricType; var timestamp; var value7; var value8; var error; const value = ''; const iterator = a0[Symbol.iterator](); const iterator2 = iterator.next; let r0 = value; let r2 = iterator; let item2 = Reflect.apply(iterator2, r2, []); let item = item2.value; item2 = item2.done ? undefined : r2; reducibleJoin2: while (true) { if (item2 === undefined) { return r0; } break reducibleJoin2; } reducibleLoop2: while (true) { try { Object = global.Object; } catch (error) { try { item2.return(); } catch { } throw error; } try { entries = Object.entries; } catch (error) { try { item2.return(); } catch { } throw error; } try { tags = item.tags; } catch (error) { try { item2.return(); } catch { } throw error; } try { value2 = Reflect.apply(entries, Object, [tags]); } catch (error) { try { item2.return(); } catch { } throw error; } try { length = value2.length; } catch (error) { try { item2.return(); } catch { } throw error; } try { value3 = length > 0; } catch (error) { try { item2.return(); } catch { } throw error; } reducibleJoin20: while (true) { if (value3) { try { map = value2.map; } catch (error) { try { item2.return(); } catch { } throw error; } try { closure = _fun60252; } catch (error) { try { item2.return(); } catch { } throw error; } try { value4 = Reflect.apply(map, value2, [closure]); } catch (error) { try { item2.return(); } catch { } throw error; } try { join = value4.join; } catch (error) { try { item2.return(); } catch { } throw error; } try { value5 = Reflect.apply(join, value4, [',']); } catch (error) { try { item2.return(); } catch { } throw error; } try { HermesInternal = global.HermesInternal; } catch (error) { try { item2.return(); } catch { } throw error; } try { concat = HermesInternal.concat; } catch (error) { try { item2.return(); } catch { } throw error; } try { value6 = '|#' + value5; } catch (error) { try { item2.return(); } catch { } throw error; } r24 = value6; break reducibleJoin20; } r24 = value; break reducibleJoin20; } try { name = item.name; } catch (error) { try { item2.return(); } catch { } throw error; } try { unit = item.unit; } catch (error) { try { item2.return(); } catch { } throw error; } try { metric = item.metric; } catch (error) { try { item2.return(); } catch { } throw error; } try { metricType = item.metricType; } catch (error) { try { item2.return(); } catch { } throw error; } try { timestamp = item.timestamp; } catch (error) { try { item2.return(); } catch { } throw error; } try { HermesInternal = global.HermesInternal; } catch (error) { try { item2.return(); } catch { } throw error; } try { concat = HermesInternal.concat; } catch (error) { try { item2.return(); } catch { } throw error; } try { value7 = value + name + '@' + unit + ':' + metric + '|' + metricType + r24 + '|T' + timestamp + '\n'; } catch (error) { try { item2.return(); } catch { } throw error; } try { value8 = r0 + value7; } catch (error) { try { item2.return(); } catch { } throw error; } r0 = value8; r2 = item2; item2 = Reflect.apply(iterator2, r2, []); item = item2.value; item2 = item2.done ? undefined : r2; if (item2 === undefined) { break reducibleLoop2; } continue reducibleLoop2; } return r0; function _fun60252(a0) { // fn#60252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7648:1088, offset: 0x016ff6b3, size: 64 bytes, params: 2, frame: 15 let value = environment.__proto__; value = env1_3(a0, 2); return '' + value[0] + ':' + value[1]; } } } global.__d(_fun60242, 7470, [65, 57, 7375]) /* metro module 7470, dependencies: [65, 57, 7375] */;