Files
discord-decomp/_bundle/_regeneratorRuntime.js
T
2026-11-01 12:12:55 +02:00

760 lines
20 KiB
JavaScript

// Metro module 14507 (f14508).
import * as __typeof from "./_typeof";
function $mk110017($env) {
return function invoke(a0, a1, a2, a3) {
let r39;
const r5 = $env;
let env30748 = {
$parent: $env
};
env30748[0] = a2;
env30748[1] = a3;
const r10 = $env.$parent;
const r9 = r10[6];
const r8 = r5[0];
const r12 = r9(r8[a0], r8, a1);
if (r12.type !== "throw") {
L10: {
const arg = r12.arg;
env30748[2] = arg;
const value2 = arg.value;
if (value2) {
const r19 = $env.$parent.$parent;
if ((0, r19[0])(r19[2][0]).default(value2) == "object" && r10[1].call(value2, "__await")) {
r39 = r5[1].resolve(value2.__await).then(function(result) {
(0, env30748.$parent[2])("next", result, env30748[0], env30748[1]);
}, function(a0) {
(0, env30748.$parent[2])("throw", a0, env30748[0], env30748[1]);
});
break L10;
}
}
r39 = r5[1].resolve(value2).then(function(result) {
const r2 = env30748[2];
r2.value = result;
(0, env30748[0])(r2);
}, function(a0) {
return (0, env30748.$parent[2])("throw", a0, env30748[0], env30748[1]);
});
}
return r39;
}
a3(r12.arg);
};
}
function $mk110018($env) {
return function value(a0, a1) {
let r11;
let env30749;
const r1 = $env;
const r2 = env30749 = {
$parent: $env
};
env30749[0] = a0;
env30749[1] = a1;
const r4 = r1[3];
if (r4) {
const callInvokeWithMethodAndArg = function callInvokeWithMethodAndArg() {
return new env30749.$parent[1]($mk118436(env30749));
};
r11 = r4.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg);
} else {
r11 = new r1[1]($mk118436(r2));
}
r1[3] = r11;
return r11;
};
}
function $mk110019($env) {
return function(a0, a1) {
const r11 = $env;
const r5 = r11[3];
const r10 = $env.$parent;
if (r5 === r10[9]) {
throw Error("Generator is already running");
}
if (r5 === r10[10]) {
if (a0 === "throw") {
throw a1;
}
return {
value: void 0,
done: true
};
}
const r16 = r11[2];
r16.method = a0;
r16.arg = a1;
while (true) {
const r12 = r11[2];
const delegate = r12.delegate;
if (delegate) {
const r19 = (0, r10[17])(delegate, r12);
if (r19) {
if (r19 === r10[11]) {
continue;
}
return r19;
}
}
if (r12.method === "next") {
const arg = r12.arg;
r12._sent = arg;
r12.sent = arg;
} else if (r12.method === "throw") {
if (r11[3] === r10[7]) {
r11[3] = r10[10];
throw r12.arg;
}
r12.dispatchException(r12.arg);
} else if (r12.method === "return") {
r12.abrupt("return", r12.arg);
}
r11[3] = r10[9];
const r36 = (0, r10[6])(r11[0], r11[1], r12);
if (r36.type === "normal") {
r11[3] = r12.done ? r10[10] : r10[8];
if (r36.arg !== r10[11]) {
return {
value: r36.arg,
done: r12.done
};
}
} else if (r36.type === "throw") {
r11[3] = r10[10];
r12.method = "throw";
r12.arg = r36.arg;
}
}
};
}
function $mk110020($env) {
return function next() {
let r3, r12;
const r4 = $env;
const r0 = r4[1] + 1;
r4[1] = r0;
const length = r4[0].length;
const r5 = $env.$parent;
if (r0 < length) {
do {
const r6 = r5[1];
r3 = r4[0];
if (r6.call(r3, r4[1])) {
const r17 = r4[2];
r17.value = r3[r4[1]];
r17.done = false;
return r17;
}
r12 = r4[1] + 1;
r4[1] = r12;
} while (r12 < r3.length);
}
const r14 = r4[2];
r14.value = void 0;
r14.done = true;
return r14;
};
}
function $mk118436($env) {
return function(a0, a1) {
const r1 = $env;
(0, $env.$parent[2])(r1[0], r1[1], a0, a1);
};
}
let env10211 = {};
module.exports = function _regeneratorRuntime() {
"use strict";
let r37;
let env21207 = {
$parent: env10211
};
const r1 = function(a0, a1, a2) {
Object.defineProperty(a0, a1, {
value: a2,
enumerable: true,
configurable: true,
writable: true
});
return a0[a1];
};
env21207[5] = r1;
env21207[6] = function tryCatch(a0, a1, a2) {
let r5;
try {
r5 = {
type: "normal",
arg: a0.call(a1, a2)
};
} catch ($e) {
return {
type: "throw",
arg: $e
};
}
return r5;
};
const Generator = function Generator() {};
env21207[12] = Generator;
const GeneratorFunction = function GeneratorFunction() {};
env21207[13] = GeneratorFunction;
const GeneratorFunctionPrototype = function GeneratorFunctionPrototype() {};
env21207[14] = GeneratorFunctionPrototype;
const AsyncIterator2 = function(a0, a1) {
let env27746;
const r1 = env27746 = {
$parent: env21207
};
env27746[0] = a0;
env27746[1] = a1;
env27746[2] = $mk110017(r1);
(0, env21207[2])(this, "_invoke", {
value: $mk110018(r1)
});
};
env21207[16] = AsyncIterator2;
env21207[17] = function maybeInvokeDelegate(a0, a1) {
let r25;
const method = a1.method;
const r10 = a0.iterator[method];
if (r10 === void 0) {
a1.delegate = null;
let r40 = method === "throw" && a0.iterator.return;
if (r40) {
a1.method = "return";
a1.arg = void 0;
(0, env21207[17])(a0, a1);
r40 = a1.method === "throw";
}
if (!r40 && method !== "return") {
a1.method = "throw";
a1.arg = new TypeError("The iterator does not provide a '" + method + "' method");
}
return env21207[11];
}
const r18 = (0, env21207[6])(r10, a0.iterator, a1.arg);
if (r18.type === "throw") {
a1.method = "throw";
a1.arg = r18.arg;
a1.delegate = null;
return env21207[11];
}
const arg = r18.arg;
if (arg) {
const done = arg.done;
let r27 = arg;
if (done) {
a1[a0.resultName] = arg.value;
a1.next = a0.nextLoc;
if (a1.method !== "return") {
a1.method = "next";
a1.arg = void 0;
}
a1.delegate = null;
r27 = env21207[11];
}
r25 = r27;
} else {
a1.method = "throw";
a1.arg = new TypeError("iterator result is not an object");
a1.delegate = null;
r25 = env21207[11];
}
return r25;
};
env21207[18] = function pushTryEntry(a0) {
const r4 = {
tryLoc: a0[0]
};
if (1 in a0) {
r4.catchLoc = a0[1];
}
if (2 in a0) {
r4.finallyLoc = a0[2];
r4.afterLoc = a0[3];
}
this.tryEntries.push(r4);
};
env21207[19] = function resetTryEntry(a0) {
const completion = a0.completion || {};
completion.type = "normal";
delete completion["arg"];
a0.completion = completion;
};
const Context = function Context(a0) {
this.tryEntries = [{
tryLoc: "root"
}];
a0.forEach(env21207[18], this);
this.reset(true);
};
env21207[20] = Context;
module.exports = function _regeneratorRuntime() {
return env21207[0];
};
module.exports.__esModule = true;
module.exports.default = module.exports;
const r29 = {};
env21207[0] = r29;
const prototype = Object.prototype;
const hasOwnProperty = prototype.hasOwnProperty;
env21207[1] = hasOwnProperty;
const r16 = Object.defineProperty || function(a0, a1, a2) {
a0[a1] = a2.value;
};
env21207[2] = r16;
const r8 = typeof globalThis.Symbol === "function" ? Symbol : {};
const r34 = r8.iterator || "@@iterator";
env21207[3] = r34;
const r14 = r8.asyncIterator || "@@asyncIterator";
const r9 = r8.toStringTag || "@@toStringTag";
env21207[4] = r9;
try {
r1({}, "");
r37 = r1;
} catch ($e) {
const r39 = function(a0, a1, a2) {
a0[a1] = a2;
return a2;
};
env21207[5] = r39;
r37 = r39;
}
const wrap = function wrap(a0, a1, a2, a3) {
const r1 = a1 && a1.prototype instanceof env21207[12] ? a1 : env21207[12];
let r4 = a3;
const r13 = Object.create(r1.prototype);
const r14 = env21207[20];
if (!a3) {
r4 = [];
}
let env27744;
const r6 = {
__proto__: r14.prototype
};
r6.tryEntries = [{
tryLoc: "root"
}];
r4.forEach(env21207[18], r6);
r6.reset(true);
const r24 = env21207[2];
const r25 = env27744 = {
$parent: env21207
};
env27744[0] = a0;
env27744[1] = a2;
env27744[2] = r6;
env27744[3] = env21207[7];
r24(r13, "_invoke", {
value: $mk110019(r25)
});
return r13;
};
const values = function values(a0) {
let env27747;
const r5 = env27747 = {
$parent: env21207
};
env27747[0] = a0;
if (!(!a0 && a0 !== "")) {
const r3 = a0[env21207[3]];
if (r3) {
return r3.call(a0);
}
if (typeof a0.next === "function") {
return a0;
}
if (!isNaN(a0.length)) {
env27747[1] = -1;
const next3 = $mk110020(r5);
env27747[2] = next3;
next3.next = next3;
return next3;
}
}
throw new TypeError(__typeof.default(a0) + " is not iterable");
};
r29.wrap = wrap;
env21207[7] = "suspendedStart";
env21207[8] = "suspendedYield";
env21207[9] = "executing";
env21207[10] = "completed";
env21207[11] = {};
let r17 = {};
r37(r17, r34, function() {
return this;
});
const getPrototypeOf = Object.getPrototypeOf;
const r50 = getPrototypeOf && getPrototypeOf(getPrototypeOf(values([])));
if ((r50 ? r50 !== prototype : r50) && hasOwnProperty.call(r50, r34)) {
r17 = r50;
}
const defineIteratorMethods = function defineIteratorMethods(c27745_0) {
["next", "throw", "return"].forEach(function(item) {
(0, env21207[5])(c27745_0, item, function(a0) {
return this._invoke(item, a0);
});
});
};
const prototype2 = Object.create(r17);
Generator.prototype = prototype2;
GeneratorFunctionPrototype.prototype = prototype2;
env21207[15] = prototype2;
GeneratorFunction.prototype = GeneratorFunctionPrototype;
r16(prototype2, "constructor", {
value: GeneratorFunctionPrototype,
configurable: true
});
r16(GeneratorFunctionPrototype, "constructor", {
value: GeneratorFunction,
configurable: true
});
GeneratorFunction.displayName = r37(GeneratorFunctionPrototype, r9, "GeneratorFunction");
r29.isGeneratorFunction = function(a0) {
const r3 = typeof a0 === "function" ? a0.constructor : typeof a0 === "function";
return !!r3 && (r3 === env21207[13] || (r3.displayName || r3.name) === "GeneratorFunction");
};
r29.mark = function(a0) {
if (Object.setPrototypeOf) {
Object.setPrototypeOf(a0, env21207[14]);
} else {
a0.__proto__ = env21207[14];
(0, env21207[5])(a0, env21207[4], "GeneratorFunction");
}
a0.prototype = Object.create(env21207[15]);
return a0;
};
r29.awrap = function(a0) {
return {
__await: a0
};
};
defineIteratorMethods(AsyncIterator2.prototype);
r37(AsyncIterator2.prototype, r14, function() {
return this;
});
r29.AsyncIterator = AsyncIterator2;
r29.async = function(a0, a1, a2, a3, a4) {
const r4 = a4 === void 0 ? Promise : a4;
const r5 = env21207[16];
const r15 = a1 ? a1.prototype instanceof env21207[12] ? a1 : env21207[12] : env21207[12];
let r9 = a3;
const r10 = Object.create(r15.prototype);
const r19 = env21207[20];
if (!a3) {
r9 = [];
}
let env27749;
let env27750;
const r11 = {
__proto__: r19.prototype
};
r11.tryEntries = [{
tryLoc: "root"
}];
r9.forEach(env21207[18], r11);
r11.reset(true);
const r30 = env21207[2];
const r31 = env27749 = {
$parent: env21207
};
env27749[0] = a0;
env27749[1] = a2;
env27749[2] = r11;
env27749[3] = env21207[7];
r30(r10, "_invoke", {
value: $mk110019(r31)
});
const r38 = {
__proto__: r5.prototype
};
const r39 = env27750 = {
$parent: env21207
};
env27750[0] = r10;
env27750[1] = r4;
env27750[3] = void 0;
env27750[2] = $mk110017(r39);
r30(r38, "_invoke", {
value: $mk110018(r39)
});
let c27748_0 = r38;
return env21207[0].isGeneratorFunction(a1) ? r38 : r38.next().then(function(result) {
return result.done ? result.value : c27748_0.next();
});
};
defineIteratorMethods(prototype2);
r37(prototype2, r9, "Generator");
r37(prototype2, r34, function() {
return this;
});
r37(prototype2, "toString", function() {
return "[object Generator]";
});
r29.keys = function(a0) {
const r11 = Object(a0);
let c27751_0 = r11;
const r12 = [];
let c27751_1 = r12;
for (const key in r11) {
r12.push(key);
}
r12.reverse();
const next2 = function next() {
let r3;
if (c27751_1.length) {
do {
r3 = c27751_1;
const value2 = r3.pop();
if (value2 in c27751_0) {
next2.value = value2;
next2.done = false;
return next2;
}
} while (r3.length);
}
next2.done = true;
return next2;
};
return next2;
};
r29.values = values;
Context.prototype = {
constructor: Context,
reset: function reset(a0) {
this.prev = 0;
this.next = 0;
this._sent = void 0;
this.sent = void 0;
this.done = false;
this.delegate = null;
this.method = "next";
this.arg = void 0;
this.tryEntries.forEach(env21207[19]);
if (!a0) {
for (const key in this) {
if (key.charAt(0) === "t" && env21207[1].call(this, key) && !isNaN(+key.slice(1))) {
this[key] = void 0;
}
}
}
},
stop: function stop() {
this.done = true;
const completion = this.tryEntries[0].completion;
if (completion.type === "throw") {
throw completion.arg;
}
return this.rval;
},
dispatchException: function dispatchException(a0) {
if (this.done) {
throw a0;
}
let r0 = this.tryEntries.length - 1;
while (0 <= r0) {
const r8 = this.tryEntries[r0];
const { completion, tryLoc } = r8;
const r1 = r0;
if (tryLoc === "root") {
completion.type = "throw";
completion.arg = a0;
this.next = "end";
return false;
}
L21: {
if (r8.tryLoc <= this.prev) {
const r15 = env21207[1];
const r22 = r15.call(r8, "catchLoc");
const r24 = r15.call(r8, "finallyLoc");
if (r22 && r24) {
if (this.prev < r8.catchLoc) {
const catchLoc2 = r8.catchLoc;
completion.type = "throw";
completion.arg = a0;
this.next = catchLoc2;
this.method = "next";
this.arg = void 0;
return true;
}
if (this.prev < r8.finallyLoc) {
const finallyLoc2 = r8.finallyLoc;
completion.type = "throw";
completion.arg = a0;
this.next = finallyLoc2;
return false;
}
break L21;
}
if (r22) {
if (this.prev < r8.catchLoc) {
const catchLoc = r8.catchLoc;
completion.type = "throw";
completion.arg = a0;
this.next = catchLoc;
this.method = "next";
this.arg = void 0;
return true;
}
} else {
if (!r24) {
throw Error("try statement without catch or finally");
}
if (this.prev < r8.finallyLoc) {
const finallyLoc = r8.finallyLoc;
completion.type = "throw";
completion.arg = a0;
this.next = finallyLoc;
return false;
}
}
}
}
r0 = r1 - 1;
}
},
abrupt: function abrupt(a0, a1) {
let r30;
let r0 = this.tryEntries.length - 1;
let r8 = void 0;
while (0 <= r0) {
const r12 = this.tryEntries[r0];
const tryLoc = r12.tryLoc;
const prev = this.prev;
const r1 = r0;
if (tryLoc <= prev && env21207[1].call(r12, "finallyLoc")) {
const prev2 = this.prev;
const finallyLoc = r12.finallyLoc;
r8 = r12;
if (prev2 < finallyLoc) {
break;
}
}
r0 = r1 - 1;
r8 = void 0;
}
if ((r8 ? a0 === "break" || a0 === "continue" : r8) && r8.tryLoc <= a1 && a1 <= r8.finallyLoc) {
r8 = null;
}
const r28 = r8 ? r8.completion : {};
r28.type = a0;
r28.arg = a1;
if (r8) {
this.method = "next";
this.next = r8.finallyLoc;
r30 = env21207[11];
} else {
r30 = this.complete(r28);
}
return r30;
},
complete: function complete(a0, a1) {
if (a0.type === "throw") {
throw a0.arg;
}
L10: {
if (a0.type !== "break" && a0.type !== "continue") {
if (a0.type === "return") {
const arg = a0.arg;
this.arg = arg;
this.rval = arg;
this.method = "return";
this.next = "end";
break L10;
}
if (!(a0.type === "normal" && a1)) {
break L10;
}
this.next = a1;
} else {
this.next = a0.arg;
}
}
return env21207[11];
},
finish: function finish(a0) {
let r0 = this.tryEntries.length - 1;
while (0 <= r0) {
const r7 = this.tryEntries[r0];
const finallyLoc = r7.finallyLoc;
const r1 = r0;
if (finallyLoc === a0) {
this.complete(r7.completion, r7.afterLoc);
const completion = r7.completion || {};
completion.type = "normal";
delete completion["arg"];
r7.completion = completion;
return env21207[11];
}
r0 = r1 - 1;
}
},
catch: function _catch(a0) {
let r0 = this.tryEntries.length - 1;
while (0 <= r0) {
const r8 = this.tryEntries[r0];
const tryLoc = r8.tryLoc;
const r1 = r0;
if (tryLoc === a0) {
const completion = r8.completion;
const type = completion.type;
let r19 = void 0;
if (type === "throw") {
const arg = completion.arg;
const completion2 = r8.completion || {};
completion2.type = "normal";
delete completion2["arg"];
r8.completion = completion2;
r19 = arg;
}
return r19;
}
r0 = r1 - 1;
}
throw Error("illegal catch attempt");
},
delegateYield: function delegateYield(a0, a1, a2) {
let iterator;
let env27752;
L6: {
const r6 = env27752 = {
$parent: env21207
};
env27752[0] = a0;
if (!(!a0 && a0 !== "")) {
const r4 = a0[env21207[3]];
if (r4) {
iterator = r4.call(a0);
} else {
const next3 = a0.next;
iterator = a0;
if (typeof next3 !== "function") {
if (isNaN(a0.length)) {
break L6;
}
env27752[1] = -1;
const next4 = $mk110020(r6);
env27752[2] = next4;
next4.next = next4;
iterator = next4;
}
}
this.delegate = {
iterator,
resultName: a1,
nextLoc: a2
};
if (this.method === "next") {
this.arg = void 0;
}
return env21207[11];
}
}
throw new TypeError(__typeof.default(a0) + " is not iterable");
}
};
return r29;
};
module.exports.__esModule = true;
module.exports.default = module.exports;