2026-09-16 07:03:15 +00:00
|
|
|
// Module ID: 4477
|
|
|
|
|
// Function ID: 4478
|
2026-09-10 05:38:07 +00:00
|
|
|
// Name: RouteUtils
|
2026-09-16 07:03:15 +00:00
|
|
|
// Dependencies: [1075, 1965, 2, 4478]
|
2026-07-29 08:29:29 +00:00
|
|
|
// Exports: isPseudoGuildId, isValidChannelId, isValidGuildId
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-09-16 07:03:15 +00:00
|
|
|
// Module 4477 (RouteUtils)
|
2026-09-10 05:38:07 +00:00
|
|
|
import RouteConstants from "RouteConstants" /* 1075 */;
|
2026-09-15 14:23:42 +00:00
|
|
|
import ChannelConstants from "ChannelConstants" /* 1965 */;
|
2026-09-16 07:03:15 +00:00
|
|
|
import RouteParam from "RouteParam" /* 4478 */;
|
2026-09-10 05:38:07 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
2026-07-23 10:11:24 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
const PSEUDO_GUILD_IDS = RouteConstants.PSEUDO_GUILD_IDS;
|
|
|
|
|
const isStaticChannelRoute = ChannelConstants.isStaticChannelRoute;
|
2026-07-23 10:11:24 +00:00
|
|
|
const re2 = /^\d+$/;
|
2026-09-10 05:38:07 +00:00
|
|
|
const result = size.fileFinishedImporting("modules/routing/RouteUtils.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-08-24 06:08:38 +00:00
|
|
|
export const RouteParam = RouteParam.RouteParam;
|
2026-09-05 10:56:28 +00:00
|
|
|
export const isPseudoGuildId = function isPseudoGuildId(guildId) {
|
|
|
|
|
return PSEUDO_GUILD_IDS.includes(guildId);
|
2026-07-29 08:29:29 +00:00
|
|
|
};
|
2026-07-20 16:05:17 +00:00
|
|
|
export const isValidGuildId = function isValidGuildId(guildId) {
|
|
|
|
|
let tmp = null != guildId;
|
|
|
|
|
if (tmp) {
|
2026-07-29 08:29:29 +00:00
|
|
|
let hasItem = PSEUDO_GUILD_IDS.includes(guildId);
|
|
|
|
|
if (!hasItem) {
|
2026-09-10 05:38:07 +00:00
|
|
|
hasItem = re2.test(guildId);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
tmp = hasItem;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
};
|
|
|
|
|
export const isValidChannelId = function isValidChannelId(channelId) {
|
|
|
|
|
let tmp = null == channelId;
|
|
|
|
|
if (!tmp) {
|
2026-09-10 05:38:07 +00:00
|
|
|
let isMatch = re2.test(channelId);
|
2026-07-29 08:29:29 +00:00
|
|
|
if (!isMatch) {
|
|
|
|
|
isMatch = isStaticChannelRoute(channelId);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
tmp = isMatch;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
};
|