decord/source/modules/routing/KeybindRouterStore.tsx

82 lines
2.5 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 12695
// Function ID: 12696
2026-07-20 16:05:17 +00:00
// Name: getMatchData
2026-08-24 06:08:38 +00:00
// Dependencies: [676, 4206, 4219, 700, 705, 2]
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
// Module 12695 (getMatchData)
import set from "set" /* 2 */;
import matchPath from "matchPath" /* 4206 */;
import ME from "ME" /* 676 */;
import identity from "identity" /* 700 */;
2026-07-23 10:11:24 +00:00
2026-07-20 16:05:17 +00:00
function getMatchData(pathname) {
2026-07-29 08:29:29 +00:00
let str = pathname;
2026-08-24 06:08:38 +00:00
let obj = matchPath;
2026-07-29 08:29:29 +00:00
let str2 = pathname;
if (pathname == null) {
str2 = "";
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { path: null };
let obj2 = closure_2;
2026-08-24 06:08:38 +00:00
const RouteParam = tmp(4219).RouteParam;
const RouteParam2 = tmp(4219).RouteParam;
2026-07-29 08:29:29 +00:00
obj[0] = closure_2.CHANNEL(RouteParam.guildId(), RouteParam2.channelId({ optional: true }), ":messageId?");
2026-07-20 16:05:17 +00:00
const matchPathResult = obj.matchPath(str2, obj);
if (null != matchPathResult) {
({ guildId, channelId } = matchPathResult.params);
2026-07-29 08:29:29 +00:00
let tmp7 = null;
2026-07-20 16:05:17 +00:00
if (guildId !== closure_3) {
2026-07-29 08:29:29 +00:00
tmp7 = guildId;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { guildId: null, channelId: null };
obj[0] = tmp7;
if (channelId == null) {
channelId = null;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[1] = channelId;
2026-07-20 16:05:17 +00:00
return obj;
} else {
2026-07-29 08:29:29 +00:00
if (str == null) {
str = "";
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
obj1 = { path: null };
const RouteParam3 = tmp(4219).RouteParam;
2026-07-29 08:29:29 +00:00
obj1[0] = obj2.GUILD_BOOSTING_MARKETING(RouteParam3.guildId());
2026-08-24 06:08:38 +00:00
const matchPathResult1 = tmp(4206).matchPath(str, obj1);
2026-07-20 16:05:17 +00:00
if (null != matchPathResult1) {
2026-07-29 08:29:29 +00:00
obj2 = { guildId: null, channelId: null };
obj2[0] = matchPathResult1.params.guildId;
2026-07-20 16:05:17 +00:00
let obj3 = obj2;
} else {
2026-07-23 10:11:24 +00:00
obj3 = { guildId: null, channelId: null };
2026-07-20 16:05:17 +00:00
}
return obj3;
}
const guildIdResult = RouteParam.guildId();
}
2026-07-29 08:29:29 +00:00
({ Routes: obj1, ME: c3 } = ME);
const withEqualityFn = identity.createWithEqualityFn((arg0) => {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
2026-07-29 08:29:29 +00:00
return {
2026-07-23 10:11:24 +00:00
path: null,
basePath: "/",
guildId: null,
channelId: null,
2026-07-20 16:05:17 +00:00
updatePath(arg0) {
2026-07-23 10:11:24 +00:00
const callback = arg0;
2026-08-24 06:08:38 +00:00
({ guildId: closure_1, channelId: closure_2 } = closure_1_4(arg0));
const tmp = closure_1_4(arg0);
callback(closure_1_1[4]).batchUpdates(() => callback({ path: callback, guildId: closure_1, channelId: closure_2 }));
2026-07-20 16:05:17 +00:00
},
resetPath(pathname) {
2026-07-23 10:11:24 +00:00
const callback = pathname;
2026-08-24 06:08:38 +00:00
({ guildId: closure_1, channelId: closure_2 } = closure_1_4(pathname));
const tmp = closure_1_4(pathname);
callback(closure_1_1[4]).batchUpdates(() => pathname({ path: null, guildId: closure_1, channelId: closure_2, basePath: pathname }));
2026-07-20 16:05:17 +00:00
}
};
});
2026-08-24 06:08:38 +00:00
const result = set.fileFinishedImporting("modules/routing/KeybindRouterStore.tsx");
2026-07-20 16:05:17 +00:00
export default withEqualityFn;