214 lines
9.3 KiB
React
214 lines
9.3 KiB
React
/* Metro module 360; source: unknown; dependencies: [6, 7, 44] */
|
|
function _fun5334(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#5334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:401:6, offset: 0x00cda0ab, size: 104 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
|
exports.default = _fun5335();
|
|
}
|
|
|
|
function _fun5335() { // fn#5335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:401:120, offset: 0x00cda113, size: 193 bytes, params: 1, frame: 15
|
|
return env0_3(TaskQueue, [{key: 'enqueue', value: function(a0) {
|
|
this._getCurrentQueue().push(a0);
|
|
}}, {key: 'enqueueTasks', value: function(a0) {
|
|
var env0_0 = this;
|
|
a0.forEach(_fun5339);
|
|
}}, {key: 'cancelTasks', value: function(a0) {
|
|
var env0_0 = a0;
|
|
this._queueStack = this._queueStack.map(_fun5341).filter(_fun5343);
|
|
}}, {key: 'hasTasksToProcess', value: function() {
|
|
return this._getCurrentQueue().length > 0;
|
|
}}, {key: 'processNext', value: value_5345}, {key: '_getCurrentQueue', value: function() {
|
|
var r0;
|
|
var property = this._queueStack[this._queueStack.length - 1];
|
|
if (property.popable) {
|
|
if (property.tasks.length !== 0) {
|
|
property = property.tasks;
|
|
r0 = property;
|
|
} else if (this._queueStack.length > 1) {
|
|
this._queueStack.pop();
|
|
r0 = this._getCurrentQueue();
|
|
} else {
|
|
property = property.tasks;
|
|
r0 = property;
|
|
}
|
|
} else {
|
|
property = property.tasks;
|
|
r0 = property;
|
|
}
|
|
return r0;
|
|
}}, {key: '_genPromise', value: function(a0) {
|
|
var env0_0 = a0;
|
|
var env0_1 = this;
|
|
this._queueStack.push({tasks: [], popable: false});
|
|
var env0_2 = this._queueStack[this._queueStack.length - 1];
|
|
value = a0.gen();
|
|
value = value.then(_fun5348);
|
|
value.catch(_fun5349);
|
|
}}]);
|
|
}
|
|
|
|
function TaskQueue({onMoreTasks}) { // fn#5336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:401:141, offset: 0x00cda1d4, size: 74 bytes, params: 2, frame: 14
|
|
env1_2(this, TaskQueue);
|
|
this._onMoreTasks = onMoreTasks;
|
|
this._queueStack = [{tasks: [], popable: false}];
|
|
}
|
|
|
|
function value_5338(a0) { // fn#5338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:401:366, offset: 0x00cda23c, size: 31 bytes, params: 2, frame: 11
|
|
a0.forEach(_fun5339);
|
|
}
|
|
|
|
function value_5340(a0) { // fn#5340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:401:475, offset: 0x00cda272, size: 58 bytes, params: 2, frame: 13
|
|
const env0_0 = a0;
|
|
const value = this._queueStack.map(function(a0) {
|
|
var Object = global.Object;
|
|
var object = {};
|
|
object.tasks = a0.tasks.filter(_fun5342);
|
|
return Object.assign({}, a0, object);
|
|
});
|
|
this._queueStack = value.filter(function(a0, a1) {
|
|
return a0.tasks.length > 0 || a1 === 0;
|
|
});
|
|
}
|
|
|
|
function value_5345() { // fn#5345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:401:828, offset: 0x00cda340, size: 267 bytes, params: 1, frame: 20
|
|
var r1;
|
|
var value2;
|
|
var value3;
|
|
var gen;
|
|
var value4;
|
|
var run;
|
|
var value5;
|
|
var property;
|
|
var moduleValue;
|
|
var JSON;
|
|
var value6;
|
|
var value7;
|
|
var error;
|
|
var name;
|
|
var message;
|
|
let value = this._getCurrentQueue();
|
|
if (value.length) {
|
|
value = value.shift();
|
|
try {
|
|
value2 = typeof value;
|
|
value3 = value2 !== 'object';
|
|
if (value3) {
|
|
value4 = value2 !== 'object';
|
|
if (value4) {
|
|
value5 = environment.__proto__;
|
|
property = dependencyMap[2];
|
|
moduleValue = require(property);
|
|
JSON = global.JSON;
|
|
value6 = JSON.stringify(value, null, 2);
|
|
value7 = 'Expected Function, SimpleTask, or PromiseTask, but got:\n' + value6;
|
|
moduleValue(value2 === 'function', value7);
|
|
value();
|
|
} else {
|
|
run = value.run;
|
|
if (run) {
|
|
value.run();
|
|
} else {
|
|
value5 = environment.__proto__;
|
|
property = dependencyMap[2];
|
|
moduleValue = require(property);
|
|
JSON = global.JSON;
|
|
value6 = JSON.stringify(value, null, 2);
|
|
value7 = 'Expected Function, SimpleTask, or PromiseTask, but got:\n' + value6;
|
|
moduleValue(value2 === 'function', value7);
|
|
value();
|
|
}
|
|
}
|
|
} else {
|
|
gen = value.gen;
|
|
if (gen) {
|
|
this._genPromise(value);
|
|
} else {
|
|
value4 = value2 !== 'object';
|
|
if (value4) {
|
|
value5 = environment.__proto__;
|
|
property = dependencyMap[2];
|
|
moduleValue = require(property);
|
|
JSON = global.JSON;
|
|
value6 = JSON.stringify(value, null, 2);
|
|
value7 = 'Expected Function, SimpleTask, or PromiseTask, but got:\n' + value6;
|
|
moduleValue(value2 === 'function', value7);
|
|
value();
|
|
} else {
|
|
run = value.run;
|
|
if (run) {
|
|
value.run();
|
|
} else {
|
|
value5 = environment.__proto__;
|
|
property = dependencyMap[2];
|
|
moduleValue = require(property);
|
|
JSON = global.JSON;
|
|
value6 = JSON.stringify(value, null, 2);
|
|
value7 = 'Expected Function, SimpleTask, or PromiseTask, but got:\n' + value6;
|
|
moduleValue(value2 === 'function', value7);
|
|
value();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} catch (error) {
|
|
name = value.name;
|
|
r1 = name || '';
|
|
value = 'TaskQueue: Error with task ' + r1;
|
|
message = error.message;
|
|
error.message = value + ': ' + message;
|
|
throw error;
|
|
}
|
|
}
|
|
}
|
|
|
|
function value_5347(a0) { // fn#5347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:401:1464, offset: 0x00cda4b7, size: 127 bytes, params: 2, frame: 15
|
|
let env0_0 = a0;
|
|
this._queueStack.push({tasks: [], popable: false});
|
|
const env0_2 = this._queueStack[this._queueStack.length - 1];
|
|
value = a0.gen();
|
|
value = value.then(_fun5348);
|
|
value.catch(function(a0) {
|
|
var env0_0 = a0;
|
|
global.setTimeout(_fun5350, 0);
|
|
});
|
|
}
|
|
|
|
function _fun5339(a0) { // fn#5339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:401:413, offset: 0x00cda25b, size: 23 bytes, params: 2, frame: 11
|
|
return env0_0.enqueue(a0);
|
|
}
|
|
|
|
function _fun5341(a0) { // fn#5341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:401:538, offset: 0x00cda2ac, size: 57 bytes, params: 2, frame: 17
|
|
const Object = global.Object;
|
|
const assign = Object.assign;
|
|
const object2 = {};
|
|
object2.tasks = a0.tasks.filter(_fun5342);
|
|
return Reflect.apply(assign, Object, [{}, a0, object2]);
|
|
}
|
|
|
|
function _fun5348() { // fn#5348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:401:1612, offset: 0x00cda536, size: 50 bytes, params: 1, frame: 10
|
|
env0_2.popable = true;
|
|
const binding = env0_1;
|
|
if (binding.hasTasksToProcess()) {
|
|
env0_1._onMoreTasks();
|
|
}
|
|
}
|
|
|
|
function _fun5349(a0) { // fn#5349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:401:1686, offset: 0x00cda568, size: 34 bytes, params: 2, frame: 13
|
|
const env0_0 = a0;
|
|
global.setTimeout(_fun5350, 0);
|
|
}
|
|
|
|
function _fun5342(a0) { // fn#5342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:401:599, offset: 0x00cda2e5, size: 33 bytes, params: 2, frame: 11
|
|
const value = environment.__proto__;
|
|
return env1_0.indexOf(a0) === -1;
|
|
}
|
|
|
|
function _fun5350() { // fn#5350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:401:1710, offset: 0x00cda58a, size: 64 bytes, params: 1, frame: 16
|
|
const binding = env0_0;
|
|
binding.message = 'TaskQueue: Error resolving Promise in task ' + env1_0.name + ': ' + binding.message;
|
|
throw binding;
|
|
}
|
|
|