decord/source/modules/active_channels/ActiveChannelsActionCreators.tsx

162 lines
4.7 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 15418
// Function ID: 15419
2026-07-20 16:05:17 +00:00
// Name: _fetchActiveChannels
2026-08-25 06:04:03 +00:00
// Dependencies: [5, 676, 709, 530, 4279, 2]
2026-07-20 16:05:17 +00:00
// Exports: fetchActiveChannels
2026-08-25 06:04:03 +00:00
// Module 15418 (_fetchActiveChannels)
2026-08-24 06:08:38 +00:00
import closure_3 from "asyncGeneratorStep" /* 5 */;
import { Endpoints } from "ME" /* 676 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-20 16:05:17 +00:00
function _fetchActiveChannels() {
2026-07-29 08:29:29 +00:00
const self = this;
const tmp = callback((arg0) => {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
closure_1 = arg1;
c7 = 0;
c8 = 0;
c6 = 0;
2026-07-29 08:29:29 +00:00
const iter = (function*(arg0) {
if (c8 === 2) {
c8 = 3;
HermesBuiltin.throwTypeError();
} else if (tmp6 === 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 {
c8 = 2;
if (0 === c7) {
if (arg0 === 1) {
c8 = 3;
throw arg1;
} else if (arg0 === 2) {
c8 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-08-24 06:08:38 +00:00
closure_4 = tmp3;
closure_3 = tmp7;
2026-07-29 08:29:29 +00:00
let num7;
if (num7 === undefined) {
num7 = 10;
}
let body;
2026-08-24 06:08:38 +00:00
closure_3 = undefined;
2026-07-29 08:29:29 +00:00
c7 = 1;
c8 = 1;
2026-08-12 06:57:52 +00:00
return { value: "ct", done: true };
2026-07-29 08:29:29 +00:00
}
} else if (1 === tmp7) {
if (arg0 === 1) {
c8 = 3;
throw arg1;
} else if (arg0 === 2) {
c8 = 3;
2026-08-24 06:08:38 +00:00
obj1 = { value: null, done: true };
2026-07-29 08:29:29 +00:00
obj1[0] = arg1;
return obj1;
} else {
const obj2 = { type: "ACTIVE_CHANNELS_FETCH_START", guildId: null };
obj2[1] = callback;
num7(body[2]).dispatch(obj2);
2026-08-24 06:08:38 +00:00
c6 = 1;
2026-07-29 08:29:29 +00:00
const HTTP = callback(body[3]).HTTP;
const obj3 = { url: null, query: null, rejectWithError: true };
obj3[0] = closure_4.ACTIVE_CHANNELS(callback);
let obj4 = { channel_limit: null };
obj4[0] = num7;
obj3[1] = obj4;
c7 = 3;
c8 = 1;
const obj5 = { value: null, done: false };
obj5[0] = HTTP.get(obj3);
return obj5;
}
} else if (2 === tmp7) {
c6 = 0;
closure_4 = closure_5;
obj4 = num7(body[2]);
const obj6 = { type: "ACTIVE_CHANNELS_FETCH_FAILURE", guildId: null, error: null };
obj6[1] = callback;
const tmp29 = new num7(body[4])(closure_4);
obj6[2] = tmp29;
obj4.dispatch(obj6);
throw closure_4;
} else if (arg0 === 1) {
c8 = 3;
throw arg1;
} else if (arg0 === 2) {
c6 = 0;
c8 = 3;
const obj7 = { value: null, done: true };
obj7[0] = arg1;
return obj7;
} else {
body = arg1;
body = body.body;
let channels;
if (body != null) {
channels = body.channels;
}
body = channels;
if (channels == null) {
body = [];
}
2026-08-24 06:08:38 +00:00
closure_3 = body;
2026-07-29 08:29:29 +00:00
obj = num7(body[2]);
const obj8 = { type: "ACTIVE_CHANNELS_FETCH_SUCCESS", guildId: null, channels: null };
obj8[1] = callback;
2026-08-24 06:08:38 +00:00
obj8[2] = closure_3;
2026-07-29 08:29:29 +00:00
obj.dispatch(obj8);
c6 = 0;
c8 = 3;
const obj9 = { value: null, done: true };
obj9[0] = body;
return obj9;
}
} catch (tmp34) {
closure_5 = tmp34;
if (tmp4 === c6) {
c8 = tmp2;
throw tmp34;
} else {
c7 = tmp;
}
}
}
})();
iter.next();
return iter;
});
2026-08-24 06:08:38 +00:00
closure_5 = 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);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/active_channels/ActiveChannelsActionCreators.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export const fetchActiveChannels = function fetchActiveChannels(arg0) {
const self = this;
const apply = _fetchActiveChannels.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
};