/* Metro module 1323; source: unknown; dependencies: [57, 15, 17, 18, 6, 7, 1322] */ function _fun15119(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#15119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1450:6, offset: 0x00e23a86, size: 568 bytes, params: 8, frame: 20 const env0_0 = require; const assertBi = function(a0) { if (a0) { return undefined; } var Error = global.Error; throw new Error('BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support'); }; const value = undefined; const env0_2 = require(57) /* metro dependency 57 */; const env0_3 = require(15) /* metro dependency 15 */; const env0_4 = require(17) /* metro dependency 17 */; const env0_5 = require(18) /* metro dependency 18 */; const env0_6 = require(6) /* metro dependency 6 */; const env0_7 = require(7) /* metro dependency 7 */; const Object = global.Object; let object2 = {value: true}; Object.defineProperty(exports, '__esModule', object2); exports.PbULong = value; exports.PbLong = value; const DataView = global.DataView; const ArrayBuffer = global.ArrayBuffer; const dataView = new DataView(new ArrayBuffer(8)); let BigInt = global.globalThis.BigInt; if (value !== BigInt) { if (typeof dataView.getBigInt64 === 'function') { if (typeof dataView.getBigUint64 === 'function') { if (typeof dataView.setBigInt64 === 'function') { if (typeof dataView.setBigUint64 === 'function') { object2 = {}; BigInt = global.BigInt; object2.MIN = BigInt('-9223372036854775808'); BigInt = global.BigInt; object2.MAX = BigInt('9223372036854775807'); BigInt = global.BigInt; object2.UMIN = BigInt('0'); BigInt = global.BigInt; object2.UMAX = BigInt('18446744073709551615'); BigInt = global.BigInt; object2.C = BigInt; object2.V = dataView; } } } } } const env0_9 = RegExp('^-?[0-9]+$', ''); const value6 = _fun15125(); const value7 = _fun15129(value6); exports.PbULong = value7; const value8 = Object.create(value7.prototype, {constructor: {value: value7}}); const value9 = new value7(0, 0); value7.ZERO = value9 instanceof Object ? value9 : value8; const value11 = _fun15134(value6); exports.PbLong = value11; const value12 = Object.create(value11.prototype, {constructor: {value: value11}}); const value13 = new value11(0, 0); value11.ZERO = value13 instanceof Object ? value13 : value12; return value; } function _isNativeReflectConstruct_15121() { // fn#15121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1450:239, offset: 0x00e23d22, size: 94 bytes, params: 1, frame: 18 var Boolean; var prototype; var valueOf; var call; var Reflect; var construct; var closure; var value; var error; try { Boolean = global.Boolean; prototype = Boolean.prototype; valueOf = prototype.valueOf; call = valueOf.call; Reflect = global.Reflect; construct = Reflect.construct; Boolean = global.Boolean; closure = function() { }; value = Reflect.apply(construct, Reflect, [Boolean, [], closure]); value = Reflect.apply(call, valueOf, [value]); var result = !value; } catch (error) { } return (_isNativeReflectConstruct_15121_isNativeReflectConstruct = function() { return !!result; })(); } function _fun15125() { // fn#15125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1450:1102, offset: 0x00e23dae, size: 78 bytes, params: 1, frame: 15 return env0_7(SharedPbLong, [{key: 'isZero', value: function() { return this.lo == 0 && this.hi == 0; }}, {key: 'toNumber', value: function() { var value = this.hi * 4294967296; value += this.lo >>> 0; if (global.Number.isSafeInteger(value)) { return value; } throw new global.Error('cannot convert to safe number'); }}]); } function _fun15129(a0) { // fn#15129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1450:1435, offset: 0x00e23eae, size: 119 bytes, params: 2, frame: 17 const closure = PbULong; env0_5(closure, a0); return env0_7(closure, [{key: 'toString', value: value_15131}, {key: 'toBigInt', value: value_15132}], [{key: 'from', value: value_15133}]); } function _fun15134(a0) { // fn#15134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1450:2759, offset: 0x00e24339, size: 165 bytes, params: 2, frame: 17 const closure = PbLong; env0_5(closure, a0); return env0_7(closure, [{key: 'isNegative', value: function() { return !!(2147483648 & this.hi); }}, {key: 'negate', value: value_15137}, {key: 'toString', value: value_15138}, {key: 'toBigInt', value: value_15139}], [{key: 'from', value: value_15140}]); } function SharedPbLong(a0, a1) { // fn#15126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1450:1123, offset: 0x00e23dfc, size: 51 bytes, params: 3, frame: 13 env1_6(this, SharedPbLong); this.lo = a0 | 0; this.hi = a1 | 0; } function PbULong() { // fn#15130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1450:1447, offset: 0x00e23f25, size: 42 bytes, params: 1, frame: 16 env1_6(this, PbULong); return _callSuper_15120(this, PbULong, arguments); } function value_15131() { // fn#15131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1450:1577, offset: 0x00e23f4f, size: 82 bytes, params: 1, frame: 14 var r0; let value = environment.__proto__; if (env1_8) { value = this.toBigInt(); value = value.toString(); r0 = value; } else { value = require(1322) /* metro dependency 1322 */; value = value.int64toString(this.lo, this.hi); r0 = value; } return r0; } function value_15132() { // fn#15132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1450:1696, offset: 0x00e23fa1, size: 98 bytes, params: 1, frame: 17 const assertBiBinding = assertBi; const binding = env1_8; assertBiBinding(binding); let V = binding.V; V.setInt32(0, this.lo, true); V = binding.V; V.setInt32(4, this.hi, true); V = binding.V; return V.getBigUint64(0, true); } function value_15133(a0) { // fn#15133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1450:1834, offset: 0x00e24003, size: 822 bytes, params: 2, frame: 19 var r5; var r4; var value5; var value6; var pbULong; var binding; var property; var property2; var property3; var V; var value8; var value9; let value = a0; const value3 = typeof value; if (env1_8) { if (value3 === 'string') { if (value == '0') { return this.ZERO; } if (value == '') { throw new global.Error('string is no integer'); } binding = env1_8; value = binding.C(value); r5 = value; if (r5 === 0) { return this.ZERO; } binding = env1_8; value = binding.C(r5); r4 = value; if (r4) { if (r4 < env1_8.UMIN) { throw new global.Error('signed value for ulong'); } if (r4 > env1_8.UMAX) { throw new global.Error('ulong too large'); } binding = env1_8; V = binding.V; V.setBigUint64(0, r4, true); V = binding.V; value = V.getInt32(0, true); V = binding.V; value8 = V.getInt32(4, true); value9 = Object.create(PbULong.prototype, {constructor: {value: PbULong}}); pbULong = new PbULong(value); return pbULong instanceof Object ? pbULong : value9; } return this.ZERO; } if (value3 === 'number') { r5 = value; if (r5 === 0) { return this.ZERO; } binding = env1_8; value = binding.C(r5); r4 = value; if (r4) { if (r4 < env1_8.UMIN) { throw new global.Error('signed value for ulong'); } if (r4 > env1_8.UMAX) { throw new global.Error('ulong too large'); } binding = env1_8; V = binding.V; V.setBigUint64(0, r4, true); V = binding.V; value = V.getInt32(0, true); V = binding.V; value8 = V.getInt32(4, true); value9 = Object.create(PbULong.prototype, {constructor: {value: PbULong}}); pbULong = new PbULong(value); return pbULong instanceof Object ? pbULong : value9; } return this.ZERO; } if (value3 === 'bigint') { r4 = value; if (r4) { if (r4 < env1_8.UMIN) { throw new global.Error('signed value for ulong'); } if (r4 > env1_8.UMAX) { throw new global.Error('ulong too large'); } binding = env1_8; V = binding.V; V.setBigUint64(0, r4, true); V = binding.V; value = V.getInt32(0, true); V = binding.V; value8 = V.getInt32(4, true); value9 = Object.create(PbULong.prototype, {constructor: {value: PbULong}}); pbULong = new PbULong(value); return pbULong instanceof Object ? pbULong : value9; } return this.ZERO; } throw new global.Error('unknown value ' + value3); } if (value3 === 'string') { if (value == '0') { return this.ZERO; } value = value.trim(); binding = env1_9; if (binding.test(value)) { value = (require(1322) /* metro dependency 1322 */).int64fromString(value); value = env1_2(value, 3); property = value[0]; property2 = value[1]; property3 = value[2]; if (property) { throw new global.Error('signed value'); } value = Object.create(PbULong.prototype, {constructor: {value: PbULong}}); pbULong = new PbULong(); return pbULong instanceof Object ? pbULong : value; } throw new global.Error('string is no integer'); } if (value3 !== 'number') { throw new global.Error('unknown value ' + value3); } if (value == 0) { return this.ZERO; } const Number = global.Number; if (Number.isSafeInteger(value)) { if (value < 0) { throw new global.Error('signed value for ulong'); } value5 = value / 4294967296; value6 = Object.create(PbULong.prototype, {constructor: {value: PbULong}}); pbULong = new PbULong(value); return pbULong instanceof Object ? pbULong : value6; } const Error = global.Error; throw new Error('number is no integer'); } function value_15137() { // fn#15137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1450:2971, offset: 0x00e243fd, size: 78 bytes, params: 1, frame: 15 var r2; var r3; let value = ~this.hi; const lo = this.lo; if (lo) { r2 = 1 + ~lo; r3 = value; } else { value += 1; r2 = lo; r3 = value; } value = Object.create(PbLong.prototype, {constructor: {value: PbLong}}); const pbLong = new PbLong(); return pbLong instanceof Object ? pbLong : value; } function value_15138() { // fn#15138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1450:3075, offset: 0x00e2444b, size: 164 bytes, params: 1, frame: 15 var value2; let value = environment.__proto__; if (env1_8) { return this.toBigInt().toString(); } if (this.isNegative()) { value2 = this.negate(); value = require(1322) /* metro dependency 1322 */; value = value.int64toString(value2.lo, value2.hi); return '-' + value; } value = require(1322) /* metro dependency 1322 */; return value.int64toString(this.lo, this.hi); } function value_15139() { // fn#15139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1450:3289, offset: 0x00e244ef, size: 98 bytes, params: 1, frame: 17 const assertBiBinding = assertBi; const binding = env1_8; assertBiBinding(binding); let V = binding.V; V.setInt32(0, this.lo, true); V = binding.V; V.setInt32(4, this.hi, true); V = binding.V; return V.getBigInt64(0, true); } function value_15140(a0) { // fn#15140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1450:3426, offset: 0x00e24551, size: 818 bytes, params: 2, frame: 19 var r2; var r5; var r4; var value5; var pbLong; var value8; var binding; var property; var property2; var property3; var V; var value12; var value13; let value = a0; const value3 = typeof value; if (env1_8) { if (value3 === 'string') { if (value == '0') { return this.ZERO; } if (value == '') { throw new global.Error('string is no integer'); } binding = env1_8; value = binding.C(value); r5 = value; if (r5 === 0) { return this.ZERO; } binding = env1_8; value = binding.C(r5); r4 = value; if (r4) { if (r4 < env1_8.MIN) { throw new global.Error('ulong too small'); } if (r4 > env1_8.MAX) { throw new global.Error('ulong too large'); } binding = env1_8; V = binding.V; V.setBigInt64(0, r4, true); V = binding.V; value = V.getInt32(0, true); V = binding.V; value12 = V.getInt32(4, true); value13 = Object.create(PbLong.prototype, {constructor: {value: PbLong}}); pbLong = new PbLong(value); return pbLong instanceof Object ? pbLong : value13; } return this.ZERO; } if (value3 === 'number') { r5 = value; if (r5 === 0) { return this.ZERO; } binding = env1_8; value = binding.C(r5); r4 = value; if (r4) { if (r4 < env1_8.MIN) { throw new global.Error('ulong too small'); } if (r4 > env1_8.MAX) { throw new global.Error('ulong too large'); } binding = env1_8; V = binding.V; V.setBigInt64(0, r4, true); V = binding.V; value = V.getInt32(0, true); V = binding.V; value12 = V.getInt32(4, true); value13 = Object.create(PbLong.prototype, {constructor: {value: PbLong}}); pbLong = new PbLong(value); return pbLong instanceof Object ? pbLong : value13; } return this.ZERO; } if (value3 === 'bigint') { r4 = value; if (r4) { if (r4 < env1_8.MIN) { throw new global.Error('ulong too small'); } if (r4 > env1_8.MAX) { throw new global.Error('ulong too large'); } binding = env1_8; V = binding.V; V.setBigInt64(0, r4, true); V = binding.V; value = V.getInt32(0, true); V = binding.V; value12 = V.getInt32(4, true); value13 = Object.create(PbLong.prototype, {constructor: {value: PbLong}}); pbLong = new PbLong(value); return pbLong instanceof Object ? pbLong : value13; } return this.ZERO; } throw new global.Error('unknown value ' + value3); } if (value3 === 'string') { if (value == '0') { return this.ZERO; } value = value.trim(); binding = env1_9; if (binding.test(value)) { value = (require(1322) /* metro dependency 1322 */).int64fromString(value); value = env1_2(value, 3); property = value[0]; property2 = value[1]; property3 = value[2]; pbLong = new PbLong(); if (property) { pbLong = pbLong.negate(); r2 = pbLong; } else { r2 = pbLong; } return r2; } throw new global.Error('string is no integer'); } if (value3 !== 'number') { throw new global.Error('unknown value ' + value3); } if (value == 0) { return this.ZERO; } const Number = global.Number; if (Number.isSafeInteger(value)) { if (value > 0) { value8 = value / 4294967296; r2 = new PbLong(value); } else { value5 = -value; value = -value / 4294967296; pbLong = new PbLong(value5, value); pbLong = pbLong.negate(); r2 = pbLong; } return r2; } const Error = global.Error; throw new Error('number is no integer'); }