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

557 lines
19 KiB
React

/* Metro module 513; source: unknown; dependencies: [511] */
function _fun6568(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#6568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:563:6, offset: 0x00d002de, size: 264 bytes, params: 8, frame: 19
var r10;
var push;
var toString;
var value4;
var toUpperCase;
var value5;
let env0_0 = require;
let Object = global.Object;
const env0_2 = Object.prototype.hasOwnProperty;
const Array = global.Array;
const env0_3 = Array.isArray;
const items = [];
let value = '0';
let value2 = '';
let r7 = 0;
while (true) {
push = items.push;
r10 = r7 < 16 ? value : value2;
toString = r7.toString;
value4 = r10 + Reflect.apply(toString, r7, [16]);
toUpperCase = value4.toUpperCase;
Reflect.apply(push, items, ['%' + Reflect.apply(toUpperCase, value4, [])]);
value5 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
if (value5 < 256) {
r7 = value5;
continue;
}
break;
}
module.exports = {arrayToObject: function(a0, a1) {
var r0;
var r3;
var value;
r0 = a1 && a1.plainObjects ? Object.create(null) : {};
value = 0;
if (value < a0.length) {
r3 = value;
while (true) {
if (a0[r3] !== undefined) {
r0[r3] = a0[r3];
}
value = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
if (value < a0.length) {
r3 = value;
continue;
}
break;
}
}
return r0;
}, assign: function(a0, a1) {
var env0_0 = a1;
var Object = global.Object;
return Object.keys(a1).reduce(_fun6571, a0);
}, combine: function(a0, a1) {
return [].concat(a0, a1);
}, compact: compact, decode: function(a0, a1, a2) {
var property;
var value2;
var error;
var value = a0.replace(RegExp('\\+', 'g'), ' ');
if (a2 === 'iso-8859-1') {
return value.replace(RegExp('%[0-9a-f]{2}', 'gi'), global.unescape);
}
try {
property = global.decodeURIComponent;
value2 = property(value);
} catch (error) {
return value;
}
return value2;
}, encode: encode, isBuffer: function(a0) {
var r1;
var r0;
r1 = a0 ? typeof a0 !== 'object' : !a0;
if (r1) {
r0 = !r1;
} else {
r1 = a0.constructor && a0.constructor.isBuffer;
r1 = r1 && a0.constructor.isBuffer(a0);
r0 = !!r1;
}
return r0;
}, isRegExp: function(a0) {
return global.Object.prototype.toString.call(a0) === '[object RegExp]';
}, maybeMap: maybeMap, merge: merge_6580};
}
function assign(a0, a1) { // fn#6570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:563:384, offset: 0x00d0042f, size: 49 bytes, params: 3, frame: 13
const env0_0 = a1;
const Object = global.Object;
return Object.keys(a1).reduce(function(a0, a1) {
a0[a1] = require[a1];
return a0;
}, a0);
}
function compact(a0) { // fn#6573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:563:546, offset: 0x00d0048e, size: 387 bytes, params: 2, frame: 28
var r4;
var r13;
var r1;
var r12;
var property;
var obj;
var prop;
var Object;
var value2;
var property2;
var property3;
var value3;
var value4;
var indexOf;
var value5;
var value6;
var value7;
var value9;
var value10;
const items3 = [{obj: {o: a0}, prop: 'o'}];
items2 = [];
let length = items3.length;
const value = 0;
if (value < length) {
r4 = value;
while (true) {
property = items3[r4];
obj = property.obj;
prop = property.prop;
property = obj[prop];
Object = global.Object;
value2 = Object.keys(property);
length = value2.length;
if (value < length) {
r13 = value;
while (true) {
property2 = value2[r13];
property3 = property[property2];
value3 = typeof property3 === 'object';
if (value3) {
value4 = property3 !== null;
r1 = value4;
} else {
r1 = value3;
}
if (!r1) {
continue;
}
indexOf = items2.indexOf;
value5 = Reflect.apply(indexOf, items2, [property3]) === -1;
r1 = value5;
if (!r1) {
continue;
}
items3.push({obj: property, prop: property2});
items2.push(property3);
value6 = typeof r13 === 'bigint' ? r13 + 1n : +r13 + 1;
length = value2.length;
if (value6 < length) {
r13 = value6;
continue;
}
break;
}
}
value7 = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
length = items3.length;
if (value7 < length) {
r4 = value7;
continue;
}
break;
}
}
length = items3.length;
if (length > 1) {
while (true) {
value9 = items3.pop();
obj = value9.obj;
prop = value9.prop;
property = obj[prop];
if (isArray(property)) {
items2 = [];
length = property.length;
if (!(value < length)) {
continue;
}
r12 = value;
while (true) {
if (property[r12] !== undefined) {
items2.push(property[r12]);
}
value10 = typeof r12 === 'bigint' ? r12 + 1n : +r12 + 1;
length = property.length;
if (value10 < length) {
r12 = value10;
continue;
}
break;
}
obj = value9.obj;
prop = value9.prop;
obj[prop] = items2;
}
length = items3.length;
if (length > 1) {
continue;
}
break;
}
}
return a0;
}
function encode(a0, a1, a2, a3, a4) { // fn#6575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:563:1148, offset: 0x00d00683, size: 825 bytes, params: 6, frame: 59
var r3;
var r5;
var r6;
var r42;
var r41;
var r2;
var r1;
var String;
var slice;
var value5;
var items2;
var charCodeAt;
var value6;
var RFC1738;
var value7;
var value8;
var value9;
var value10;
var binding;
var property;
var value11;
var value12;
var value13;
var charAt;
var value14;
var join;
var value15;
var value16;
let value = a0;
let length = value.length;
const value2 = 0;
if (value2 === length) {
return value;
}
const value3 = typeof value;
if (value3 === 'symbol') {
value = global.Symbol.prototype.toString.call(value);
r3 = value;
} else {
reducibleJoin5: while (true) {
if (value3 === 'string') {
r3 = value;
break reducibleJoin5;
}
String = global.String;
value = String(value);
r3 = value;
break reducibleJoin5;
}
}
if (a2 === 'iso-8859-1') {
value = global.escape(r3);
return value.replace(RegExp('%u[0-9a-f]{4}', 'gi'), function(a0) {
var parseInt = global.parseInt;
var value = a0.slice(2);
value = parseInt(value, 16);
return '%26%23' + value + '%3B';
});
}
length = r3.length;
value = '';
if (value2 < length) {
r5 = value2;
r6 = value;
reducibleLoop7: while (true) {
length = r3.length;
reducibleJoin9: while (true) {
if (length >= 1024) {
slice = r3.slice;
value5 = Reflect.apply(slice, r3, [r5, r5 + 1024]);
r42 = value5;
break reducibleJoin9;
}
r42 = r3;
break reducibleJoin9;
}
items2 = [];
length = r42.length;
if (value2 < length) {
r41 = value2;
reducibleLoop10: while (true) {
charCodeAt = r42.charCodeAt;
value6 = Reflect.apply(charCodeAt, r42, [r41]);
reducibleJoin32: while (true) {
reducibleJoin31: while (true) {
if (value6 === 45) {
break reducibleJoin31;
}
if (value6 === 46) {
break reducibleJoin31;
}
if (value6 === 95) {
break reducibleJoin31;
}
if (value6 === 126) {
break reducibleJoin31;
}
if (value6 >= 48) {
if (value6 <= 57) {
break reducibleJoin31;
}
}
if (value6 >= 65) {
if (value6 <= 90) {
break reducibleJoin31;
}
}
if (value6 >= 97) {
if (value6 <= 122) {
break reducibleJoin31;
}
}
RFC1738 = require(dependencyMap[value2]).RFC1738;
if (a4 === RFC1738) {
if (value6 === 40) {
break reducibleJoin31;
}
if (value6 === 41) {
break reducibleJoin31;
}
}
if (value6 < 128) {
items2[items2.length] = env0_4[value6];
r2 = r41;
break reducibleJoin32;
}
if (value6 < 2048) {
length = items2.length;
binding = env0_4;
items2[length] = binding[192 | value6 >> 6] + binding[128 | 63 & value6];
r2 = r41;
break reducibleJoin32;
}
if (!(value6 < 55296)) {
if (!(value6 >= 57344)) {
value7 = r41 + 1;
value8 = 1023 & value6;
charCodeAt = r42.charCodeAt;
value9 = 1023 & Reflect.apply(charCodeAt, r42, [value7]);
value10 = 65536 + (value8 << 10 | value9);
length = items2.length;
binding = env0_4;
value11 = binding[240 | value10 >> 18] + binding[128 | value10 >> 12 & 63];
value12 = value11 + binding[128 | value10 >> 6 & 63];
items2[length] = value12 + binding[128 | 63 & value10];
r2 = value7;
break reducibleJoin32;
}
}
length = items2.length;
binding = env0_4;
property = binding[224 | value6 >> 12];
value13 = property + binding[128 | value6 >> 6 & 63];
items2[length] = value13 + binding[128 | 63 & value6];
r2 = r41;
break reducibleJoin32;
}
length = items2.length;
charAt = r42.charAt;
items2[length] = Reflect.apply(charAt, r42, [r41]);
r2 = r41;
break reducibleJoin32;
}
value14 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
length = r42.length;
if (value14 < length) {
r41 = value14;
continue reducibleLoop10;
}
break reducibleLoop10;
}
}
join = items2.join;
value15 = r6 + Reflect.apply(join, items2, [value]);
value16 = r5 + 1024;
length = r3.length;
if (value16 < length) {
r5 = value16;
r6 = value15;
continue reducibleLoop7;
}
r1 = value15;
break reducibleLoop7;
}
} else {
r1 = value;
}
return r1;
}
function maybeMap(a0, a1) { // fn#6579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:563:2191, offset: 0x00d00a66, size: 85 bytes, params: 3, frame: 16
var r3;
var items2;
var length;
var push;
var value;
if (isArray(a0)) {
items2 = [];
length = a0.length;
value = 0;
if (value < length) {
r3 = value;
reducibleLoop3: while (true) {
push = items2.push;
Reflect.apply(push, items2, [a1(a0[r3])]);
value = r3 + 1;
length = a0.length;
if (value < length) {
r3 = value;
continue reducibleLoop3;
}
break reducibleLoop3;
}
}
return items2;
}
return a1(a0);
}
function merge_6580(a0, a1, a2) { // fn#6580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:563:2300, offset: 0x00d00abb, size: 334 bytes, params: 4, frame: 18
var r8;
var r1;
var value3;
let value = a0;
const value2 = a2;
const env0_1 = a1;
if (a1) {
value3 = typeof a1;
if (value3 === 'object') {
if (value) {
if (typeof value !== 'object') {
return [value].concat(a1);
}
r8 = isArray(value) && !isArray(a1) ? arrayToObject(value, value2) : value;
if (isArray(value)) {
if (isArray(a1)) {
a1.forEach(_fun6581);
r1 = value;
} else {
value = global.Object.keys(a1);
value = value.reduce(function(a0, a1) {
var property = require[a1];
if (hasOwnProperty.call(a0, a1)) {
a0[a1] = merge_6580(a0[a1], property, importDefault);
} else {
a0[a1] = property;
}
return a0;
}, r8);
r1 = value;
}
} else {
value = global.Object.keys(a1);
value = value.reduce(_fun6582, r8);
r1 = value;
}
return r1;
}
return [value].concat(a1);
}
if (value3 !== 'function') {
if (isArray(value)) {
value.push(a1);
return value;
}
if (value) {
if (typeof value !== 'object') {
return [value, a1];
}
r1 = value2 && (value2.plainObjects || value2.allowPrototypes);
r1 = !r1 ? !hasOwnProperty.call(global.Object.prototype, a1) : r1;
if (r1) {
value[a1] = true;
}
return value;
}
return [value, a1];
}
if (value) {
if (typeof value !== 'object') {
return [value].concat(a1);
}
r8 = isArray(value) && !isArray(a1) ? arrayToObject(value, value2) : value;
if (isArray(value)) {
if (isArray(a1)) {
a1.forEach(_fun6581);
r1 = value;
} else {
value = global.Object.keys(a1);
value = value.reduce(_fun6582, r8);
r1 = value;
}
} else {
value = global.Object.keys(a1);
value = value.reduce(_fun6582, r8);
r1 = value;
}
return r1;
}
return [value].concat(a1);
}
return value;
}
function _fun6581(a0, a1) { // fn#6581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:563:2641, offset: 0x00d00c09, size: 117 bytes, params: 3, frame: 17
var property;
const value3 = hasOwnProperty.call(env0_0, a1);
const binding = env0_0;
if (value3) {
property = binding[a1];
if (property) {
if (typeof property !== 'object') {
env0_0.push(a0);
} else if (a0) {
if (typeof a0 === 'object') {
env0_0[a1] = merge_6580(property, a0, importDefault);
} else {
env0_0.push(a0);
}
} else {
env0_0.push(a0);
}
} else {
env0_0.push(a0);
}
} else {
binding[a1] = a0;
}
}
function _fun6582(a0, a1) { // fn#6582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:563:2796, offset: 0x00d00c7e, size: 71 bytes, params: 3, frame: 17
const property = require[a1];
const hasOwnPropertyBinding = hasOwnProperty;
if (hasOwnPropertyBinding.call(a0, a1)) {
a0[a1] = merge_6580(a0[a1], property, importDefault);
} else {
a0[a1] = property;
}
return a0;
}