decord/source/modules/links/safeTransitionTo.native.tsx

175 lines
6.2 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 5972
// Function ID: 5973
2026-07-20 16:05:17 +00:00
// Name: _safeTransitionTo
2026-08-25 06:04:03 +00:00
// Dependencies: [5, 1910, 676, 4575, 5973, 1222, 5974, 4745, 1236, 6001, 2437, 6039, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-25 06:04:03 +00:00
// Module 5972 (_safeTransitionTo)
2026-08-24 06:08:38 +00:00
import closure_3 from "asyncGeneratorStep" /* 5 */;
import closure_4 from "createGuildRecordFromRust" /* 1910 */;
import { Routes } from "ME" /* 676 */;
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
function _safeTransitionTo() {
const self = this;
const tmp = callback((arg0, arg1) => {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
closure_1 = arg1;
c5 = 0;
c6 = 0;
2026-07-29 08:29:29 +00:00
return (function*(arg0, arg1) {
if (c6 === 2) {
c6 = 3;
HermesBuiltin.throwTypeError();
} else if (tmp4 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-08-25 06:04:03 +00:00
return { value: "HermesInternal", done: "HermesInternal" };
2026-07-29 08:29:29 +00:00
}
} else {
try {
c6 = 2;
if (0 === c5) {
if (arg0 === 1) {
c6 = 3;
throw arg1;
} else if (arg0 === 2) {
c6 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
let channelId = 0;
let guild = tmp2;
2026-08-24 06:08:38 +00:00
closure_2 = undefined;
2026-07-29 08:29:29 +00:00
guild = undefined;
channelId = undefined;
2026-08-24 06:08:38 +00:00
const tryParseDiceRollLinkResult = callback(closure_1_2[3]).tryParseDiceRollLink(callback);
2026-07-29 08:29:29 +00:00
if (null != tryParseDiceRollLinkResult) {
channelId = tryParseDiceRollLinkResult.channelId;
({ guildId, diceCount, diceSides } = tryParseDiceRollLinkResult);
2026-08-24 06:08:38 +00:00
callback(closure_1_2[4]).startDiceRoll(channelId, diceCount, diceSides);
const obj13 = callback(closure_1_2[4]);
callback(closure_1_2[5]).transitionTo(c5.CHANNEL(guildId, channelId), tmp83);
2026-07-29 08:29:29 +00:00
c6 = 3;
2026-08-24 06:08:38 +00:00
obj1 = { value: null, done: true };
2026-07-29 08:29:29 +00:00
obj1[0] = undefined;
return obj1;
} else {
2026-08-24 06:08:38 +00:00
const tryParseChannelPathResult = callback(closure_1_2[3]).tryParseChannelPath(tmp82);
2026-07-29 08:29:29 +00:00
closure_2 = tryParseChannelPathResult;
if (null != tryParseChannelPathResult) {
c5 = 1;
c6 = 1;
let obj2 = { value: null, done: false };
2026-08-24 06:08:38 +00:00
obj2[0] = callback2(closure_1_2[6])(tryParseChannelPathResult);
2026-07-29 08:29:29 +00:00
return obj2;
}
2026-08-24 06:08:38 +00:00
const obj19 = callback(closure_1_2[3]);
2026-07-29 08:29:29 +00:00
}
2026-08-24 06:08:38 +00:00
const obj18 = callback(closure_1_2[3]);
2026-07-29 08:29:29 +00:00
tmp82 = callback;
tmp83 = callback2;
}
} else {
if (1 === tmp5) {
if (arg0 === 1) {
c6 = 3;
throw arg1;
} else if (arg0 === 2) {
c6 = 3;
const obj3 = { value: null, done: true };
obj3[0] = arg1;
return obj3;
} else if (!arg1) {
obj2 = callback2(closure_2[7]);
const obj4 = { title: null, body: null, confirmText: null };
const intl = callback(closure_2[8]).intl;
obj4[0] = intl.string(callback(closure_2[8]).t.r0DLNm);
const intl2 = callback(closure_2[8]).intl;
obj4[1] = intl2.string(callback(closure_2[8]).t["6Y0JlN"]);
const intl3 = callback(closure_2[8]).intl;
obj4[2] = intl3.string(callback(closure_2[8]).t.BddRzS);
obj2.show(obj4);
c6 = 3;
}
} else if (arg0 === 1) {
c6 = 3;
throw arg1;
} else if (arg0 !== 2) {
if (!arg1) {
obj = callback(closure_2[5]);
obj.transitionTo(callback, callback2);
}
}
c6 = 3;
const obj5 = { value: null, done: true };
obj5[0] = arg1;
return obj5;
}
if (null != closure_2) {
if (null != closure_2.guildId) {
guild = channelId.getGuild(closure_2.guildId);
channelId = closure_2.channelId;
if (null != guild) {
let obj6 = callback(closure_2[9]);
if (obj6.isModeratorReportOrPostChannelId(channelId)) {
obj6 = { title: null, body: null, confirmText: null };
const intl4 = callback(closure_2[8]).intl;
obj6[0] = intl4.string(callback2(closure_2[10]).iCIEAV);
const intl5 = callback(closure_2[8]).intl;
obj6[1] = intl5.string(callback2(closure_2[10]).bvzo6p);
const intl6 = callback(closure_2[8]).intl;
obj6[2] = intl6.string(callback(closure_2[8]).t.BddRzS);
callback2(closure_2[7]).show(obj6);
c6 = 3;
let obj7 = { value: null, done: true };
obj7[0] = undefined;
return obj7;
}
}
}
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj7 = callback2(closure_2[11]);
if (closure_2 == null) {
2026-08-15 05:55:55 +00:00
closure_2 = { guildId: "r" };
2026-07-29 08:29:29 +00:00
}
c5 = 2;
c6 = 1;
const obj8 = { value: null, done: false };
obj8[0] = obj7.maybePerformRoleSubscriptionUpsellRedirect(closure_2);
return obj8;
} catch (tmp76) {
c6 = tmp;
throw tmp76;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
})();
});
2026-08-24 06:08:38 +00:00
closure_6 = tmp;
2026-07-29 08:29:29 +00:00
const apply = tmp.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/links/safeTransitionTo.native.tsx");
2026-07-20 16:05:17 +00:00
export default function safeTransitionTo() {
2026-07-29 08:29:29 +00:00
const self = this;
const apply = _safeTransitionTo.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
};