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

561 lines
22 KiB
React

/* Metro module 173; source: unknown; dependencies: [172] */
function _fun2537(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#2537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:198:6, offset: 0x00c8323e, size: 303 bytes, params: 8, frame: 16
const env0_0 = require;
const closure = valuePromise;
const onSettledFulfill = function(a0) {
return {status: 'fulfilled', value: a0};
};
const onSettledReject = function(a0) {
return {status: 'rejected', reason: a0};
};
const getAggregateError = function(a0) {
var property;
var value;
var value3;
if (typeof global.AggregateError === 'function') {
property = global.AggregateError;
value = Object.create(property.prototype, {constructor: {value: property}});
value3 = new property(a0, 'All promises were rejected');
return value3 instanceof Object ? value3 : value;
}
var value2 = new global.Error('All promises were rejected');
value2.name = 'AggregateError';
value2.errors = a0;
return value2;
};
module.exports = require(172) /* metro dependency 172 */;
const env0_2 = closure(true);
const env0_3 = closure(false);
const env0_4 = closure(null);
const env0_5 = closure(undefined);
const env0_6 = closure(0);
const env0_7 = closure('');
(require(172) /* metro dependency 172 */).resolve = resolve_2543;
(require(172) /* metro dependency 172 */).all = all;
(require(172) /* metro dependency 172 */).allSettled = function(a0) {
return require(dependencyMap[0]).all(iterableToArray(a0).map(mapAllSettled));
};
(require(172) /* metro dependency 172 */).reject = reject_2553;
(require(172) /* metro dependency 172 */).race = race;
(require(172) /* metro dependency 172 */).prototype.catch = function(a0) {
return this.then(null, a0);
};
(require(172) /* metro dependency 172 */).any = any;
}
function valuePromise(a0) { // fn#2538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:198:185, offset: 0x00c8336d, size: 79 bytes, params: 2, frame: 13
let value = require(172) /* metro dependency 172 */;
value = new value((require(172) /* metro dependency 172 */)._D);
value._y = 1;
value._z = a0;
return value;
}
function mapAllSettled(a0) { // fn#2541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:198:963, offset: 0x00c833e7, size: 213 bytes, params: 2, frame: 16
var value;
var then;
var moduleValue;
var value2;
if (a0) {
value = typeof a0;
if (value === 'object') {
if (a0 instanceof (require(172) /* metro dependency 172 */)) {
then = a0.then;
if (then === (require(172) /* metro dependency 172 */).prototype.then) {
return a0.then(onSettledFulfill, onSettledReject);
}
then = a0.then;
if (typeof then === 'function') {
moduleValue = require(172) /* metro dependency 172 */;
value2 = then.bind(a0);
return new moduleValue().then(onSettledFulfill, onSettledReject);
}
return onSettledFulfill(a0);
}
then = a0.then;
if (typeof then === 'function') {
moduleValue = require(172) /* metro dependency 172 */;
value2 = then.bind(a0);
return new moduleValue().then(onSettledFulfill, onSettledReject);
}
value = environment;
return onSettledFulfill(a0);
}
if (value !== 'function') {
return onSettledFulfill(a0);
}
if (a0 instanceof (require(172) /* metro dependency 172 */)) {
then = a0.then;
if (then === (require(172) /* metro dependency 172 */).prototype.then) {
return a0.then(onSettledFulfill, onSettledReject);
}
then = a0.then;
if (typeof then === 'function') {
moduleValue = require(172) /* metro dependency 172 */;
value2 = then.bind(a0);
return new moduleValue().then(onSettledFulfill, onSettledReject);
}
return onSettledFulfill(a0);
}
then = a0.then;
if (typeof then === 'function') {
moduleValue = require(172) /* metro dependency 172 */;
value2 = then.bind(a0);
return new moduleValue().then(onSettledFulfill, onSettledReject);
}
}
return onSettledFulfill(a0);
}
function resolve_2543(a0) { // fn#2543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:198:280, offset: 0x00c83529, size: 318 bytes, params: 2, frame: 17
var environment;
var then;
var value3;
var property;
var moduleValue;
var bind;
var value4;
var prototype;
var moduleValue2;
var value7;
var error;
var value8;
var closure;
let value = environment;
if (a0 instanceof require(dependencyMap[0])) {
return a0;
}
if (a0 === null) {
return env0_4;
}
if (a0 === undefined) {
return env0_5;
}
if (a0 === true) {
return env0_2;
}
if (a0 === false) {
return env0_3;
}
if (a0 === 0) {
return env0_6;
}
if (a0 === '') {
return env0_7;
}
const value2 = typeof a0;
if (value2 !== 'object') {
if (value2 !== 'function') {
return valuePromise(a0);
}
}
try {
then = a0.then;
} catch (error) {
var env0_0 = error;
value = require(dependencyMap[0]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
closure = _fun2544;
value = new value();
return value instanceof Object ? value : value8;
}
try {
value3 = typeof then === 'function';
} catch (error) {
var env0_0 = error;
value = require(dependencyMap[0]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
closure = _fun2544;
value = new value();
return value instanceof Object ? value : value8;
}
if (value3) {
try {
} catch (error) {
var env0_0 = error;
value = require(dependencyMap[0]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
closure = _fun2544;
value = new value();
return value instanceof Object ? value : value8;
}
try {
} catch (error) {
var env0_0 = error;
value = require(dependencyMap[0]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
closure = _fun2544;
value = new value();
return value instanceof Object ? value : value8;
}
try {
property = dependencyMap[0];
} catch (error) {
var env0_0 = error;
value = require(dependencyMap[0]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
closure = _fun2544;
value = new value();
return value instanceof Object ? value : value8;
}
try {
moduleValue = require(property);
} catch (error) {
var env0_0 = error;
value = require(dependencyMap[0]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
closure = _fun2544;
value = new value();
return value instanceof Object ? value : value8;
}
try {
bind = then.bind;
} catch (error) {
var env0_0 = error;
value = require(dependencyMap[0]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
closure = _fun2544;
value = new value();
return value instanceof Object ? value : value8;
}
try {
value4 = Reflect.apply(bind, then, [a0]);
} catch (error) {
var env0_0 = error;
value = require(dependencyMap[0]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
closure = _fun2544;
value = new value();
return value instanceof Object ? value : value8;
}
try {
prototype = moduleValue.prototype;
} catch (error) {
var env0_0 = error;
value = require(dependencyMap[0]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
closure = _fun2544;
value = new value();
return value instanceof Object ? value : value8;
}
try {
} catch (error) {
var env0_0 = error;
value = require(dependencyMap[0]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
closure = _fun2544;
value = new value();
return value instanceof Object ? value : value8;
}
try {
moduleValue2 = new moduleValue();
} catch (error) {
var env0_0 = error;
value = require(dependencyMap[0]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
closure = _fun2544;
value = new value();
return value instanceof Object ? value : value8;
}
try {
value7 = moduleValue2 instanceof Object ? moduleValue2 : undefined;
} catch (error) {
var env0_0 = error;
value = require(dependencyMap[0]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
closure = _fun2544;
value = new value();
return value instanceof Object ? value : value8;
}
return value7;
}
return valuePromise(a0);
}
function iterableToArray(a0) { // fn#2545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:198:642, offset: 0x00c8367a, size: 105 bytes, params: 2, frame: 13
var r0;
let Array = global.Array;
let from = Array.from;
if (typeof from === 'function') {
Array = global.Array;
from = Array.from;
Array = global.Array;
r0 = Array.from(a0);
} else {
iterableToArray_body = function(a0) {
return global.Array.prototype.slice.call(a0);
};
r0 = global.Array.prototype.slice.call(a0);
}
return r0;
}
function all(a0) { // fn#2547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:198:1505, offset: 0x00c83704, size: 69 bytes, params: 2, frame: 13
const env0_0 = iterableToArray(a0);
let value = require(172) /* metro dependency 172 */;
const value2 = Object.create(value.prototype, {constructor: {value: value}});
value = new value(_fun2548);
return value instanceof Object ? value : value2;
}
function reject_2553(a0) { // fn#2553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:198:2101, offset: 0x00c8398d, size: 60 bytes, params: 2, frame: 12
const env0_0 = a0;
let value = require(172) /* metro dependency 172 */;
const value2 = Object.create(value.prototype, {constructor: {value: value}});
value = new value(_fun2554);
return value instanceof Object ? value : value2;
}
function race(a0) { // fn#2555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:198:2170, offset: 0x00c839c9, size: 60 bytes, params: 2, frame: 12
const env0_0 = a0;
let value = require(172) /* metro dependency 172 */;
const value2 = Object.create(value.prototype, {constructor: {value: value}});
value = new value(_fun2556);
return value instanceof Object ? value : value2;
}
function any(a0) { // fn#2559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:198:2353, offset: 0x00c83a8d, size: 60 bytes, params: 2, frame: 12
const env0_0 = a0;
let value = require(172) /* metro dependency 172 */;
const value2 = Object.create(value.prototype, {constructor: {value: value}});
value = new value(_fun2560);
return value instanceof Object ? value : value2;
}
function _fun2548(a0, a1) { // fn#2548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:198:1549, offset: 0x00c83749, size: 113 bytes, params: 3, frame: 16
var r3;
var value3;
const env0_0 = a0;
const env0_1 = a1;
const closure = res;
let length = env0_0.length;
const value2 = 0;
if (value2 === length) {
return a0([]);
}
let binding = env0_0;
length = binding.length;
length = binding.length;
if (value2 < length) {
r3 = value2;
reducibleLoop2: while (true) {
binding = env0_0;
closure(r3, binding[r3]);
value3 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
length = binding.length;
if (value3 < length) {
r3 = value3;
continue reducibleLoop2;
}
break reducibleLoop2;
}
}
}
function _fun2556(a0, a1) { // fn#2556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:198:2203, offset: 0x00c83a05, size: 54 bytes, params: 3, frame: 12
var environment;
const env0_0 = a0;
const env0_1 = a1;
const value = environment.__proto__;
iterableToArray(env0_0).forEach(_fun2557);
}
function _fun2560(a0, a1) { // fn#2560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:198:2397, offset: 0x00c83ac9, size: 117 bytes, params: 3, frame: 16
const env0_0 = a0;
const env0_1 = a1;
const value3 = iterableToArray(env0_0);
if (value3.length === 0) {
a1(getAggregateError([]));
} else {
value3.forEach(_fun2563);
}
}
function res(a0, a1) { // fn#2549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:198:1607, offset: 0x00c837ba, size: 377 bytes, params: 3, frame: 20
var environment;
var r5;
var r1;
var r0;
var value2;
var value3;
var value4;
var then;
const prototype = (require(172) /* metro dependency 172 */).prototype;
var then2;
var binding;
var moduleValue;
var value8;
var _y;
var _z;
var resBinding;
let value = a1;
const env0_0 = a0;
if (value) {
value2 = typeof value;
reducibleJoin6: while (true) {
reducibleJoin5: while (true) {
if (value2 === 'object') {
value3 = environment.__proto__.__proto__;
if (value instanceof (require(172) /* metro dependency 172 */)) {
then = value.then;
then2 = prototype.then;
if (then === then2) {
_y = value._y;
if (_y !== 3) {
r1 = value;
} else {
r5 = value;
reducibleLoop11: while (true) {
_z = r5._z;
_y = _z._y;
if (_y === 3) {
r5 = _z;
continue reducibleLoop11;
}
r1 = _z;
break reducibleLoop11;
}
}
_y = r1._y;
if (_y === 1) {
value = environment;
resBinding = res;
_z = r1._z;
value = resBinding(a0, _z);
r0 = value;
} else {
_y = r1._y;
reducibleJoin15: while (true) {
if (_y !== 2) {
break reducibleJoin15;
}
value = environment;
_z = r1._z;
require(_z);
break reducibleJoin15;
}
then = r1.then;
value = environment;
Reflect.apply(then, r1, [_fun2550, require]);
r0 = undefined;
}
return r0;
}
break reducibleJoin5;
}
break reducibleJoin5;
}
if (value2 !== 'function') {
break reducibleJoin6;
}
value3 = environment.__proto__.__proto__;
value4 = undefined;
if (value instanceof (require(172) /* metro dependency 172 */)) {
then = value.then;
then2 = prototype.then;
if (then === then2) {
_y = value._y;
if (_y !== 3) {
r1 = value;
} else {
r5 = value;
reducibleLoop11: while (true) {
_z = r5._z;
_y = _z._y;
if (_y === 3) {
r5 = _z;
continue reducibleLoop11;
}
r1 = _z;
break reducibleLoop11;
}
}
_y = r1._y;
if (_y === 1) {
value = environment;
resBinding = res;
_z = r1._z;
value = resBinding(a0, _z);
r0 = value;
} else {
_y = r1._y;
reducibleJoin15: while (true) {
if (_y !== 2) {
break reducibleJoin15;
}
value = environment;
_z = r1._z;
require(_z);
break reducibleJoin15;
}
then = r1.then;
value = environment;
Reflect.apply(then, r1, [_fun2550, require]);
r0 = value4;
}
return r0;
}
break reducibleJoin5;
}
break reducibleJoin5;
}
then = value.then;
if (typeof then === 'function') {
moduleValue = require(172) /* metro dependency 172 */;
value = then.bind(value);
value = new moduleValue(value);
then = value.then;
value8 = environment;
Reflect.apply(then, value, [_fun2551, require]);
return value4;
}
break reducibleJoin6;
}
}
env1_0[a0] = value;
const lengthBinding = length;
reducibleJoin8: while (true) {
if ((typeof lengthBinding === 'bigint' ? lengthBinding - 1n : +lengthBinding - 1) != 0) {
break reducibleJoin8;
}
binding = env0_0;
binding(env1_0);
break reducibleJoin8;
}
}
function resolveOnce(a0) { // fn#2561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:198:2432, offset: 0x00c83b3e, size: 34 bytes, params: 2, frame: 11
if (!env0_3) {
env0_0(a0);
}
}
function rejectionCheck(a0) { // fn#2562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:198:2471, offset: 0x00c83b60, size: 73 bytes, params: 2, frame: 12
var value2;
env0_4.push(a0);
if (env0_4.length === env0_2.length) {
value2 = environment.__proto__.__proto__;
require(getAggregateError(env0_4));
}
}
function _fun2563(a0) { // fn#2563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:198:2601, offset: 0x00c83ba9, size: 61 bytes, params: 2, frame: 14
let value = environment.__proto__.__proto__;
value = require(172) /* metro dependency 172 */;
value = value.resolve(a0);
value.then(resolveOnce, rejectionCheck);
}