Files
discord-decomp/sources/by-id/module-06457.jsx
T
2026-07-27 16:20:00 +03:00

240 lines
8.9 KiB
React

/* Metro module 6457; source: unknown; dependencies: [6458] */
function _fun50678(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#50678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6635:6, offset: 0x0121f586, size: 128 bytes, params: 8, frame: 16
let value = this;
const env0_0 = require;
if (value && value.__extends) {
}
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
exports.BaseDataProvider = undefined;
value = (() => {
var closure = _fun50685;
closure.prototype.getDataForIndex = _fun50687;
closure.prototype.getAllData = _fun50688;
closure.prototype.getSize = _fun50689;
closure.prototype.hasStableIds = _fun50690;
closure.prototype.requiresDataChangeHandling = _fun50691;
closure.prototype.getFirstIndexToProcessInternal = _fun50692;
closure.prototype.cloneWithRows = _fun50693;
return closure;
})();
exports.BaseDataProvider = value;
exports.default = _fun50694(value);
}
function extendStatics_50679(a0, a1) { // fn#50679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6635:78, offset: 0x0121f606, 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 _fun50682(a0, a1) { // fn#50682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6635:293, offset: 0x0121f654, 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 = ___50683;
if (typeof a1 === 'function') {
extendStatics_50679(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_50679(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 _fun50684() { // fn#50684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6635:622, offset: 0x0121f705, size: 121 bytes, params: 1, frame: 4
const closure = function(a0, a1) {
this._firstIndexToProcess = 0;
this._size = 0;
this._data = [];
this._hasStableIds = false;
this._requiresDataChangeHandling = false;
this.rowHasChanged = a0;
if (a1) {
this.getStableId = a1;
this._hasStableIds = true;
} else {
this.getStableId = _fun50686;
}
};
closure.prototype.getDataForIndex = function(a0) {
return this._data[a0];
};
closure.prototype.getAllData = function() {
return this._data;
};
closure.prototype.getSize = function() {
return this._size;
};
closure.prototype.hasStableIds = function() {
return this._hasStableIds;
};
closure.prototype.requiresDataChangeHandling = function() {
return this._requiresDataChangeHandling;
};
closure.prototype.getFirstIndexToProcessInternal = function() {
return this._firstIndexToProcess;
};
closure.prototype.cloneWithRows = cloneWithRows;
return closure;
}
function _fun50694(a0) { // fn#50694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6635:1936, offset: 0x0121f956, size: 51 bytes, params: 2, frame: 14
const env0_0 = a0;
const closure = DataProvider;
env0_3(closure, a0);
closure.prototype.newInstance = newInstance;
return closure;
}
function BaseDataProvider(a0, a1) { // fn#50685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6635:633, offset: 0x0121f77e, size: 89 bytes, params: 3, frame: 4
this._firstIndexToProcess = 0;
this._size = 0;
this._data = [];
this._hasStableIds = false;
this._requiresDataChangeHandling = false;
this.rowHasChanged = a0;
if (a1) {
this.getStableId = a1;
this._hasStableIds = true;
} else {
this.getStableId = function(a0) {
return a0.toString();
};
}
}
function cloneWithRows(a0, a1) { // fn#50693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6635:1438, offset: 0x0121f823, size: 307 bytes, params: 3, frame: 21
var r6;
var r4;
var max;
var Math2;
var _data;
var property;
const newInstance = this.newInstance;
let rowHasChanged = this.rowHasChanged;
const _hasStableIds = this._hasStableIds;
let value = undefined;
const getStableId = _hasStableIds ? this.getStableId : value;
const value2 = Reflect.apply(newInstance, this, [rowHasChanged, getStableId]);
const length = a0.length;
let Math = global.Math;
const value3 = Math.min(this._size, length);
const value5 = 0;
const ObjectUtil = require(dependencyMap[value5]).ObjectUtil;
if (ObjectUtil.isNullOrUndefined(a1)) {
if (value5 < value3) {
rowHasChanged = this.rowHasChanged;
_data = this._data;
property = _data[value5];
if (Reflect.apply(rowHasChanged, this, [property, a0[value5]])) {
r4 = value5;
} else {
r6 = value5;
while (true) {
value = typeof r6 === 'bigint' ? r6 + 1n : +r6 + 1;
if (!(value < value3)) {
r4 = value;
break;
}
rowHasChanged = this.rowHasChanged;
_data = this._data;
property = _data[value];
if (Reflect.apply(rowHasChanged, this, [property, a0[value]])) {
r4 = value;
break;
}
r6 = value;
continue;
}
}
} else {
r4 = value5;
}
value2._firstIndexToProcess = r4;
} else {
Math = global.Math;
max = Math.max;
Math2 = global.Math;
value2._firstIndexToProcess = Reflect.apply(max, Math, [Math2.min(a1, this._data.length), value5]);
}
if (value2._firstIndexToProcess !== this._data.length) {
value2._requiresDataChangeHandling = true;
}
value2._data = a0;
value2._size = length;
return value2;
}
function newInstance(a0, a1) { // fn#50696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6635:2079, offset: 0x0121f9b7, size: 35 bytes, params: 3, frame: 13
const value = Object.create(DataProvider.prototype, {constructor: {value: DataProvider}});
const dataProvider = new DataProvider(a0, a1);
return dataProvider instanceof Object ? dataProvider : value;
}