414 lines
17 KiB
JavaScript
414 lines
17 KiB
JavaScript
/* Metro module 4731; source: unknown; dependencies: [4732] */
|
|
function _fun40838(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4909:6, offset: 0x0110d676, size: 248 bytes, params: 8, frame: 19
|
|
const getStringFromDataView2 = getStringFromDataView;
|
|
const closure2 = function(a0) {
|
|
return a0.map(_fun40841).join('');
|
|
};
|
|
const closure3 = function(a0, a1) {
|
|
var Array = global.Array;
|
|
var value = a1 + 1;
|
|
value = new Array(value);
|
|
return value.join(a0);
|
|
};
|
|
let Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
exports.getDataView = getDataView;
|
|
exports.getStringFromDataView = getStringFromDataView2;
|
|
exports.getNullTerminatedStringFromDataView = getNullTerminatedStringFromDataView;
|
|
exports.getUnicodeStringFromDataView = getUnicodeStringFromDataView;
|
|
exports.getPascalStringFromDataView = function(a0, a1) {
|
|
var value = a0.getUint8(a1);
|
|
var items = [value];
|
|
items[1] = getStringFromDataView(a0, a1 + 1, value);
|
|
return items;
|
|
};
|
|
exports.getStringValueFromArray = closure2;
|
|
exports.getCharacterArray = function(a0) {
|
|
return a0.split('').map(_fun40848);
|
|
};
|
|
exports.objectAssign = function() {
|
|
var r3;
|
|
var propertyName;
|
|
var value2;
|
|
var value = 1;
|
|
if (value < arguments.length) {
|
|
r3 = value;
|
|
while (true) {
|
|
value = arguments[r3];
|
|
for (propertyName in value) {
|
|
value2 = arguments[0];
|
|
value2[propertyName] = arguments[r3][propertyName];
|
|
}
|
|
value = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
|
|
if (value < arguments.length) {
|
|
r3 = value;
|
|
continue;
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
return arguments[0];
|
|
};
|
|
exports.deferInit = function(a0, a1, a2) {
|
|
var env0_0 = a0;
|
|
var env0_1 = a1;
|
|
var env0_2 = a2;
|
|
var env0_3 = false;
|
|
var Object = global.Object;
|
|
Object.defineProperty(a0, a1, {'get': null, 'configurable': true, 'enumerable': true, get: _fun40851});
|
|
};
|
|
exports.getBase64Image = getBase64Image;
|
|
exports.dataUriToBuffer = dataUriToBuffer;
|
|
exports.padStart = function(a0, a1, a2) {
|
|
return strRepeat(a2, a1 - a0.length) + a0;
|
|
};
|
|
exports.parseFloatRadix = function(a0, a1) {
|
|
var property = global.parseInt;
|
|
var value = '';
|
|
var int = property(a0.replace('.', value), a1);
|
|
property = global.Math;
|
|
return int / property.pow(a1, (a0.split('.')[1] || value).length);
|
|
};
|
|
exports.strRepeat = closure3;
|
|
exports.COMPRESSION_METHOD_NONE = undefined;
|
|
exports.COMPRESSION_METHOD_DEFLATE = 0;
|
|
exports.decompress = decompress;
|
|
function getStringFromDataView(a0, a1, a2) { // fn#40839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4909:44, offset: 0x0110d76e, size: 100 bytes, params: 4, frame: 16
|
|
var r3;
|
|
var value2;
|
|
var byteLength;
|
|
var push;
|
|
var getUint8;
|
|
var value3;
|
|
const items2 = [];
|
|
let value = 0;
|
|
if (value < a2) {
|
|
value2 = a1 + value;
|
|
byteLength = a0.byteLength;
|
|
if (value2 < byteLength) {
|
|
r3 = value;
|
|
while (true) {
|
|
push = items2.push;
|
|
getUint8 = a0.getUint8;
|
|
Reflect.apply(push, items2, [Reflect.apply(getUint8, a0, [a1 + r3])]);
|
|
value = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
|
|
if (!(value < a2)) {
|
|
break;
|
|
}
|
|
value3 = a1 + value;
|
|
byteLength = a0.byteLength;
|
|
if (value3 < byteLength) {
|
|
r3 = value;
|
|
continue;
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
return getStringValueFromArray(items2);
|
|
}
|
|
|
|
function getStringValueFromArray(a0) { // fn#40840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4909:183, offset: 0x0110d7d2, size: 36 bytes, params: 2, frame: 11
|
|
return a0.map(function(a0) {
|
|
var String = global.String;
|
|
return String.fromCharCode(a0);
|
|
}).join('');
|
|
}
|
|
|
|
function getDataView(a0, a1, a2) { // fn#40843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4909:404, offset: 0x0110d82b, size: 105 bytes, params: 4, frame: 18
|
|
var DataView;
|
|
var prototype;
|
|
var value;
|
|
var dataView;
|
|
var error;
|
|
var value2;
|
|
try {
|
|
DataView = global.DataView;
|
|
prototype = DataView.prototype;
|
|
value = Object.create(prototype, {constructor: {value: DataView}});
|
|
dataView = new DataView(a0, a1, a2);
|
|
value = dataView instanceof Object ? dataView : value;
|
|
} catch (error) {
|
|
value = environment;
|
|
value = importDefault(4732) /* metro dependency 4732 */;
|
|
prototype = value.prototype;
|
|
value2 = Object.create(prototype, {constructor: {value: value}});
|
|
value = new value(a0, a1, a2);
|
|
return value instanceof Object ? value : value2;
|
|
}
|
|
return value;
|
|
}
|
|
|
|
function getNullTerminatedStringFromDataView(a0, a1) { // fn#40844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4909:586, offset: 0x0110d894, size: 93 bytes, params: 3, frame: 15
|
|
var r3;
|
|
var uint8;
|
|
var value4;
|
|
var value5;
|
|
const items2 = [];
|
|
const value = 0;
|
|
const value2 = a1 + value;
|
|
let byteLength = a0.byteLength;
|
|
if (value2 < byteLength) {
|
|
r3 = value;
|
|
while (true) {
|
|
uint8 = a0.getUint8(a1 + r3);
|
|
if (value === uint8) {
|
|
break;
|
|
}
|
|
items2.push(uint8);
|
|
value4 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
|
|
value5 = a1 + value4;
|
|
byteLength = a0.byteLength;
|
|
if (value5 < byteLength) {
|
|
r3 = value4;
|
|
continue;
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
return getStringValueFromArray(items2);
|
|
}
|
|
|
|
function getUnicodeStringFromDataView(a0, a1, a2) { // fn#40845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4909:789, offset: 0x0110d8f1, size: 134 bytes, params: 4, frame: 18
|
|
var r4;
|
|
var value2;
|
|
var byteLength;
|
|
var push;
|
|
var getUint16;
|
|
var value3;
|
|
var value4;
|
|
const items2 = [];
|
|
const value = 0;
|
|
if (value < a2) {
|
|
value2 = a1 + value;
|
|
byteLength = a0.byteLength;
|
|
if (value2 < byteLength) {
|
|
r4 = value;
|
|
while (true) {
|
|
push = items2.push;
|
|
getUint16 = a0.getUint16;
|
|
Reflect.apply(push, items2, [Reflect.apply(getUint16, a0, [a1 + r4])]);
|
|
value3 = r4 + 2;
|
|
if (!(value3 < a2)) {
|
|
break;
|
|
}
|
|
value4 = a1 + value3;
|
|
byteLength = a0.byteLength;
|
|
if (value4 < byteLength) {
|
|
r4 = value3;
|
|
continue;
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
if (value === items2[items2.length - 1]) {
|
|
items2.pop();
|
|
}
|
|
return getStringValueFromArray(items2);
|
|
}
|
|
|
|
function getCharacterArray(a0) { // fn#40847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4909:1169, offset: 0x0110d9ad, size: 36 bytes, params: 2, frame: 11
|
|
return a0.split('').map(function(a0) {
|
|
return a0.charCodeAt(0);
|
|
});
|
|
}
|
|
|
|
function deferInit(a0, a1, a2) { // fn#40850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4909:1427, offset: 0x0110da1c, size: 78 bytes, params: 4, frame: 16
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = a2;
|
|
const Object = global.Object;
|
|
Object.defineProperty(a0, a1, {'get': null, 'configurable': true, 'enumerable': true, get: get_40851});
|
|
function deferInitGet() { // fn#40851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4909:1493, owner: deferInit.get, offset: 0x0110da6a, size: 88 bytes, params: 1, frame: 18
|
|
var Object;
|
|
var defineProperty;
|
|
var binding;
|
|
var object;
|
|
if (!env0_3) {
|
|
Object = global.Object;
|
|
defineProperty = Object.defineProperty;
|
|
binding = env0_0;
|
|
object = {'configurable': true, 'enumerable': true, 'value': null, 'writable': true};
|
|
object.value = importDefault.apply(binding);
|
|
Reflect.apply(defineProperty, Object, [binding, require, object]);
|
|
}
|
|
return env0_0[require];
|
|
}
|
|
|
|
}
|
|
|
|
function getBase64Image(a0) { // fn#40852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4909:1669, offset: 0x0110dac2, size: 247 bytes, params: 2, frame: 19
|
|
var r1;
|
|
var r0;
|
|
var Buffer;
|
|
var value;
|
|
var prototype;
|
|
var buffer;
|
|
var reduce;
|
|
var call;
|
|
var Uint8Array;
|
|
var uint8Array;
|
|
let btoa = global.btoa;
|
|
if (typeof btoa !== 'undefined') {
|
|
if (typeof a0 === 'string') {
|
|
r1 = global.btoa(a0);
|
|
} else {
|
|
btoa = global.btoa;
|
|
prototype = global.Array.prototype;
|
|
reduce = prototype.reduce;
|
|
call = reduce.call;
|
|
Uint8Array = global.Uint8Array;
|
|
prototype = Uint8Array.prototype;
|
|
value = Object.create(prototype, {constructor: {value: Uint8Array}});
|
|
uint8Array = new Uint8Array(a0);
|
|
value = uint8Array instanceof Object ? uint8Array : value;
|
|
value = Reflect.apply(call, reduce, [value, function(a0, a1) {
|
|
var String = global.String;
|
|
return a0 + String.fromCharCode(a1);
|
|
}, '']);
|
|
value = btoa(value);
|
|
r1 = value;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
Buffer = global.Buffer;
|
|
value = undefined;
|
|
if (typeof Buffer === 'undefined') {
|
|
r0 = value;
|
|
} else {
|
|
if (value !== global.Buffer.from) {
|
|
value = global.Buffer.from(a0);
|
|
value = value.toString('base64');
|
|
r1 = value;
|
|
} else {
|
|
buffer = new global.Buffer(a0);
|
|
buffer = buffer.toString('base64');
|
|
r1 = buffer;
|
|
}
|
|
r0 = r1;
|
|
}
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function dataUriToBuffer(a0) { // fn#40854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4909:2000, offset: 0x0110dbd8, size: 351 bytes, params: 2, frame: 17
|
|
var r2;
|
|
var r1;
|
|
var Buffer;
|
|
var Uint8Array;
|
|
var from;
|
|
const substring = a0.substring;
|
|
let value = a0.indexOf(',');
|
|
value = Reflect.apply(substring, a0, [value + 1]);
|
|
if (a0.indexOf(';base64') !== -1) {
|
|
if (typeof global.atob !== 'undefined') {
|
|
Uint8Array = global.Uint8Array;
|
|
from = Uint8Array.from;
|
|
value = global.atob(value);
|
|
return Reflect.apply(from, Uint8Array, [value, function(a0) {
|
|
return a0.charCodeAt(0);
|
|
}]).buffer;
|
|
}
|
|
Buffer = global.Buffer;
|
|
if (typeof Buffer === 'undefined') {
|
|
return undefined;
|
|
}
|
|
Buffer = global.Buffer;
|
|
from = Buffer.from;
|
|
if (from !== undefined) {
|
|
value = global.Buffer.from(value, 'base64');
|
|
r2 = value;
|
|
} else {
|
|
r2 = new global.Buffer(value, 'base64');
|
|
}
|
|
return r2;
|
|
}
|
|
value = global.decodeURIComponent(value);
|
|
Buffer = global.Buffer;
|
|
if (typeof Buffer !== 'undefined') {
|
|
if (global.Buffer.from !== undefined) {
|
|
value = global.Buffer.from(value);
|
|
r2 = value;
|
|
} else {
|
|
r2 = new global.Buffer(value);
|
|
}
|
|
r1 = r2;
|
|
} else {
|
|
Uint8Array = global.Uint8Array;
|
|
r1 = Uint8Array.from(value, function(a0) {
|
|
return a0.charCodeAt(0);
|
|
}).buffer;
|
|
}
|
|
return r1;
|
|
}
|
|
|
|
function decompress(a0, a1, a2) { // fn#40859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4909:2786, offset: 0x0110ddbb, size: 346 bytes, params: 4, frame: 20
|
|
var r0;
|
|
var prototype;
|
|
var value4;
|
|
var decompressionStream;
|
|
var value5;
|
|
var Blob;
|
|
var items;
|
|
var blob;
|
|
var response;
|
|
let value = a0;
|
|
const env0_0 = a2;
|
|
let value2 = 'string';
|
|
if (a1 === 0) {
|
|
var DecompressionStream = global.DecompressionStream;
|
|
if (typeof DecompressionStream === 'function') {
|
|
DecompressionStream = global.DecompressionStream;
|
|
prototype = DecompressionStream.prototype;
|
|
value4 = Object.create(prototype, {constructor: {value: DecompressionStream}});
|
|
decompressionStream = new DecompressionStream('deflate');
|
|
value5 = decompressionStream instanceof Object ? decompressionStream : value4;
|
|
Blob = global.Blob;
|
|
items = [value];
|
|
prototype = Blob.prototype;
|
|
value = Object.create(prototype, {constructor: {value: Blob}});
|
|
blob = new Blob();
|
|
value = blob instanceof Object ? blob : value;
|
|
value = value.stream();
|
|
value = value.pipeThrough(value5);
|
|
if ((arguments.length > 3 ? arguments[3] === undefined ? value2 : arguments[3] : value2) === 'dataview') {
|
|
response = new global.Response(value);
|
|
response = response.arrayBuffer();
|
|
response = response.then(function(a0) {
|
|
var DataView = global.DataView;
|
|
var value = Object.create(DataView.prototype, {constructor: {value: DataView}});
|
|
var value2 = new DataView(a0);
|
|
return value2 instanceof Object ? value2 : value;
|
|
});
|
|
r0 = response;
|
|
} else {
|
|
response = new global.Response(value);
|
|
response = response.arrayBuffer();
|
|
response = response.then(_fun40861);
|
|
r0 = response;
|
|
}
|
|
return r0;
|
|
}
|
|
}
|
|
return a1 === undefined ? value : global.Promise.reject('Unknown compression method ' + a1 + '.');
|
|
function _fun40861(a0) { // fn#40861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4909:3145, offset: 0x0110df36, size: 51 bytes, params: 2, frame: 11
|
|
const TextDecoder = global.TextDecoder;
|
|
return new TextDecoder(importDefault).decode(a0);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function _fun40841(a0) { // fn#40841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4909:233, offset: 0x011075bf, size: 24 bytes, params: 2, frame: 11
|
|
const String = global.String;
|
|
return String.fromCharCode(a0);
|
|
}
|
|
|
|
function _fun40848(a0) { // fn#40848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4909:1223, offset: 0x00de9a52, size: 18 bytes, params: 2, frame: 11
|
|
return a0.charCodeAt(0);
|
|
}
|
|
|
|
global.__d(_fun40838, 4731, [4732]) /* metro module 4731, dependencies: [4732] */;
|