/* Metro module 315; source: unknown; dependencies: [65, 57, 6, 7, 44] */ import ClassCallCheck from './module-00006-ClassCallCheck.js'; /* Metro dependency 6 */ import CreateClass from './module-00007-CreateClass.js'; /* Metro dependency 7 */ import Module00044 from './module-00044.js'; /* Metro dependency 44 */ import Module00057 from './module-00057.js'; /* Metro dependency 57 */ import Module00065 from './module-00065.js'; /* Metro dependency 65 */ function _fun4802(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#4802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:356:6, offset: 0x00ccd8cb, size: 133 bytes, params: 8, frame: 18 const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); exports.CellRenderMask = _fun4803(); function _fun4803() { // fn#4803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:356:143, offset: 0x00ccd950, size: 147 bytes, params: 1, frame: 15 return CreateClass(CellRenderMask, [{key: 'enumerateRegions', value: function() { return this._regions; }}, {key: 'addCells', value: value_4806}, {key: 'numCells', value: function() { return this._numCells; }}, {key: 'equals', value: function(a0) { var env0_0 = a0; return this._numCells === a0._numCells && this._regions.length === a0._regions.length && this._regions.every(_fun4809); }}, {key: '_findRegion', value: value_4810}]); function CellRenderMask(a0) { // fn#4804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:356:164, offset: 0x00ccd9e3, size: 121 bytes, params: 2, frame: 16 const value = environment.__proto__; env1_4(this, CellRenderMask); (Module00044)(a0 >= 0, 'CellRenderMask must contain a non-negative number os cells'); this._numCells = a0; this._regions = a0 === 0 ? [] : [{'first': 0, 'last': null, 'isSpacer': true, last: a0 - 1}]; } function value_4806(a0) { // fn#4806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:356:469, offset: 0x00ccda67, size: 540 bytes, params: 2, frame: 25 var _findRegion; var value7; var binding; var value8; var property; var property2; var value9; var property3; var property4; var items3; var items2; var value10; var push; var object2; var object3; var value11; var value12; var _regions; var splice; var apply; const defaultImport = Module00044; let first = a0.first; let r4 = first >= 0 && a0.first < this._numCells && a0.last >= -1; r4 = r4 && a0.last < this._numCells && a0.last >= a0.first - 1; defaultImport(r4, 'CellRenderMask.addCells called with invalid cell range'); let last = a0.last; first = a0.first; if (!(last < first)) { _findRegion = this._findRegion; first = a0.first; value7 = Reflect.apply(_findRegion, this, [first]); binding = env1_3; value8 = binding(value7, 2); property = value8[0]; property2 = value8[1]; _findRegion = this._findRegion; last = a0.last; value9 = binding(Reflect.apply(_findRegion, this, [last]), 2); property3 = value9[0]; property4 = value9[1]; if (property2 !== property4) { items3 = []; items2 = []; value10 = global.Object.assign({}, a0, {isSpacer: false}); first = property.first; if (first < value10.first) { if (property.isSpacer) { push = items3.push; object2 = {}; first = property.first; object2.first = first; first = value10.first; object2.last = first - 1; object2.isSpacer = true; Reflect.apply(push, items3, [object2]); } else { value10.first = property.first; } } last = property3.last; if (last > value10.last) { if (property3.isSpacer) { push = items2.push; object3 = {}; last = value10.last; object3.first = last + 1; last = property3.last; object3.last = last; object3.isSpacer = true; Reflect.apply(push, items2, [object3]); } else { value10.last = property3.last; } } value11 = [].concat(items3, [value10], items2); value12 = property4 - property2 + 1; _regions = this._regions; splice = _regions.splice; apply = splice.apply; items3 = [property2, value12]; Reflect.apply(apply, splice, [_regions, items3.concat(env1_2(value11))]); } else if (property.isSpacer) { items3 = []; items2 = []; value10 = global.Object.assign({}, a0, {isSpacer: false}); first = property.first; if (first < value10.first) { if (property.isSpacer) { push = items3.push; object2 = {}; first = property.first; object2.first = first; first = value10.first; object2.last = first - 1; object2.isSpacer = true; Reflect.apply(push, items3, [object2]); } else { value10.first = property.first; } } last = property3.last; if (last > value10.last) { if (property3.isSpacer) { push = items2.push; object3 = {}; last = value10.last; object3.first = last + 1; last = property3.last; object3.last = last; object3.isSpacer = true; Reflect.apply(push, items2, [object3]); } else { value10.last = property3.last; } } value11 = [].concat(items3, [value10], items2); value12 = property4 - property2 + 1; _regions = this._regions; splice = _regions.splice; apply = splice.apply; items3 = [property2, value12]; Reflect.apply(apply, splice, [_regions, items3.concat(env1_2(value11))]); } } } function value_4808(a0) { // fn#4808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:356:1215, offset: 0x00ccdc8e, size: 84 bytes, params: 2, frame: 13 var r0; var _regions; var length; const env0_0 = a0; const value = this._numCells === a0._numCells; if (value) { _regions = this._regions; length = _regions.length; _regions = a0._regions; r0 = length === _regions.length; } else { r0 = value; } r0 = r0 && this._regions.every(_fun4809); return r0; function _fun4809(a0, a1) { // fn#4809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:356:1334, offset: 0x00ccdce2, size: 107 bytes, params: 3, frame: 6 return a0.first === env0_0._regions[a1].first && a0.last === env0_0._regions[a1].last && a0.isSpacer === env0_0._regions[a1].isSpacer; } } function value_4810(a0) { // fn#4810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:356:1481, offset: 0x00ccdd4d, size: 213 bytes, params: 2, frame: 21 var r4; var r5; var r9; var r10; var Math; var floor; var property; var first; var last; var concat; let _regions = this._regions; let value = _regions.length - 1; const value2 = 0; if (value2 <= value) { r4 = value2; r5 = value; reducibleLoop1: while (true) { Math = global.Math; floor = Math.floor; value = Reflect.apply(floor, Math, [(r4 + r5) / 2]); _regions = this._regions; property = _regions[value]; first = property.first; if (a0 >= first) { last = property.last; reducibleJoin3: while (true) { if (a0 <= last) { return [property, value]; } break reducibleJoin3; } } first = property.first; if (a0 < first) { value -= 1; r9 = value; r10 = r4; } else { last = property.last; reducibleJoin7: while (true) { if (a0 > last) { value += 1; r9 = r5; r10 = value; break reducibleJoin7; } r9 = r5; r10 = r4; break reducibleJoin7; } } if (!(r10 <= r9)) { value = environment.__proto__; value = importDefault(44) /* metro dependency 44 */; concat = global.HermesInternal.concat; value(false, 'A region was not found containing cellIdx ' + a0); return undefined; } r4 = r10; r5 = r9; continue reducibleLoop1; } } value = environment.__proto__; (importDefault(44) /* metro dependency 44 */)(false, 'A region was not found containing cellIdx ' + a0); } } } global.__d(_fun4802, 315, [65, 57, 6, 7, 44]) /* metro module 315, dependencies: [65, 57, 6, 7, 44] */;