/* Metro module 6463; source: unknown; dependencies: [6464, 6461] */ function _fun50751(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#50751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6641:6, offset: 0x012207a2, size: 131 bytes, params: 8, frame: 18 const value = this; const env0_0 = require; if (value && value.__extends) { } const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); exports.GridLayoutProvider = undefined; const LayoutProvider = (require(6461) /* metro dependency 6461 */).LayoutProvider; exports.GridLayoutProvider = _fun50757(LayoutProvider); } function extendStatics_50752(a0, a1) { // fn#50752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6641:77, offset: 0x01220825, size: 78 bytes, params: 3, frame: 13 var r3; var Array; var value; const Object = global.Object; const setPrototypeOf = Object.setPrototypeOf; if (setPrototypeOf) { r3 = setPrototypeOf; } else { Array = global.Array; value = Object.create([]); value = value instanceof Array; r3 = value && (function(a0, a1) { a0.__proto__ = a1; }); } r3 = !r3 ? function(a0, a1) { var r3; var propertyName; var propertyName2; var hasOwnProperty; for (propertyName in a1) { hasOwnProperty = global.Object.prototype.hasOwnProperty; if (!hasOwnProperty.call(a1, propertyName)) { r3 = propertyName2; continue; } a0[propertyName] = a1[propertyName]; r3 = propertyName2; } } : r3; return r3(a0, a1); } function _fun50755(a0, a1) { // fn#50755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6641:292, offset: 0x01220873, size: 177 bytes, params: 3, frame: 15 var r1; var value; var prototype; var closure2; var TypeError; var value3; var typeError; const env0_0 = a0; const closure = ___50756; if (typeof a1 === 'function') { extendStatics_50752(a0, a1); if (a1 === null) { r1 = global.Object.create(a1); } else { prototype = a1.prototype; closure.prototype = prototype; prototype = closure.prototype; value = Object.create(prototype, {constructor: {value: closure}}); closure2 = new closure(); value = closure2 instanceof Object ? closure2 : value; r1 = value; } a0.prototype = r1; } else { if (a1 !== null) { TypeError = global.TypeError; value = global.String(a1); value = 'Class extends value ' + value; value3 = Object.create(TypeError.prototype, {constructor: {value: TypeError}}); value += ' is not a constructor or null'; typeError = new TypeError(); value = typeError instanceof Object ? typeError : value3; throw value; } extendStatics_50752(a0, a1); if (a1 === null) { r1 = global.Object.create(a1); } else { prototype = a1.prototype; closure.prototype = prototype; prototype = closure.prototype; value = Object.create(prototype, {constructor: {value: closure}}); closure2 = new closure(); value = closure2 instanceof Object ? closure2 : value; r1 = value; } a0.prototype = r1; } } function _fun50757(a0) { // fn#50757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6641:623, offset: 0x01220924, size: 63 bytes, params: 2, frame: 14 const env0_0 = a0; const closure = GridLayoutProvider; env0_3(closure, a0); closure.prototype.newLayoutManager = newLayoutManager_50760; closure.prototype.setLayout = setLayout_50761; return closure; } function GridLayoutProvider(a0, a1, a2, a3, a4) { // fn#50758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6641:635, offset: 0x01220963, size: 95 bytes, params: 6, frame: 17 const value = a4; const value2 = this; const r0 = env0_0.call(value2, a1, _fun50759) || value2; r0._getHeightOrWidth = a3; r0._getSpan = a2; r0._maxSpan = a0; r0._acceptableRelayoutDelta = value ?? 1; return r0; } function newLayoutManager_50760(a0, a1, a2) { // fn#50760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6641:910, offset: 0x012209df, size: 106 bytes, params: 4, frame: 23 this._isHorizontal = a1; this._renderWindowSize = a0; let value = environment.__proto__; const GridLayoutManager = (require(6464) /* metro dependency 6464 */).GridLayoutManager; const _getSpan = this._getSpan; const _maxSpan = this._maxSpan; const _acceptableRelayoutDelta = this._acceptableRelayoutDelta; const _isHorizontal = this._isHorizontal; value = Object.create(GridLayoutManager.prototype, {constructor: {value: GridLayoutManager}}); const gridLayoutManager = new GridLayoutManager(this, a0, _getSpan, _maxSpan, _acceptableRelayoutDelta, _isHorizontal, a2); return gridLayoutManager instanceof Object ? gridLayoutManager : value; } function setLayout_50761(a0, a1) { // fn#50761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6641:1138, offset: 0x01220a49, size: 216 bytes, params: 3, frame: 16 var Error; var error; var _isHorizontal; var value2; var value3; const _maxSpan = this._maxSpan; let value = this._getSpan(a1); if (value > _maxSpan) { Error = global.Error; value = 'Item span for index ' + a1; value3 = Object.create(Error.prototype, {constructor: {value: Error}}); value += ' is more than the max span'; error = new Error(value); value = error instanceof Object ? error : value3; throw value; } if (this._renderWindowSize) { _isHorizontal = this._isHorizontal; value2 = this._getHeightOrWidth(a1); if (_isHorizontal) { a0.width = value2; a0.height = this._renderWindowSize.height / _maxSpan * value; } else { a0.height = value2; a0.width = this._renderWindowSize.width / _maxSpan * value; } return undefined; } Error = global.Error; throw new Error('setLayout called before layoutmanager was created, cannot be handled'); } function _fun50759(a0, a1, a2) { // fn#50759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6641:695, offset: 0x012209c2, size: 29 bytes, params: 4, frame: 13 env0_0.setLayout(a1, a2); }