decord/source/modules/routing/KeybindRouterStore.tsx

88 lines
2.7 KiB
TypeScript
Raw Normal View History

2026-07-27 11:26:19 +00:00
// Module ID: 10814
// Function ID: 83891
2026-07-20 16:05:17 +00:00
// Name: getMatchData
2026-07-25 08:10:48 +00:00
// Dependencies: [653, 3953, 3966, 677, 682, 2]
2026-07-20 16:05:17 +00:00
2026-07-27 11:26:19 +00:00
// Module 10814 (getMatchData)
2026-07-23 10:11:24 +00:00
import ME from "ME";
import useStoreWithEqualityFn from "useStoreWithEqualityFn";
let closure_2;
let closure_3;
2026-07-20 16:05:17 +00:00
function getMatchData(pathname) {
let channelId;
let guildId;
2026-07-25 08:10:48 +00:00
let obj = require(3953) /* matchPath */;
2026-07-20 16:05:17 +00:00
let str = "";
let str2 = "";
if (null != pathname) {
str2 = pathname;
}
obj = {};
2026-07-25 08:10:48 +00:00
const RouteParam = require(3966) /* isPseudoGuildId */.RouteParam;
const RouteParam2 = require(3966) /* isPseudoGuildId */.RouteParam;
2026-07-20 16:05:17 +00:00
obj.path = closure_2.CHANNEL(RouteParam.guildId(), RouteParam2.channelId({ optional: true }), ":messageId?");
const matchPathResult = obj.matchPath(str2, obj);
if (null != matchPathResult) {
({ guildId, channelId } = matchPathResult.params);
obj = {};
let tmp8 = null;
if (guildId !== closure_3) {
tmp8 = guildId;
}
obj.guildId = tmp8;
let tmp9 = null;
if (null != channelId) {
tmp9 = channelId;
}
obj.channelId = tmp9;
return obj;
} else {
if (null != pathname) {
str = pathname;
}
const obj1 = {};
2026-07-25 08:10:48 +00:00
const RouteParam3 = require(3966) /* isPseudoGuildId */.RouteParam;
2026-07-20 16:05:17 +00:00
obj1.path = closure_2.GUILD_BOOSTING_MARKETING(RouteParam3.guildId());
2026-07-25 08:10:48 +00:00
const matchPathResult1 = require(3953) /* matchPath */.matchPath(str, obj1);
2026-07-20 16:05:17 +00:00
if (null != matchPathResult1) {
const obj2 = { guildId: matchPathResult1.params.guildId, channelId: null };
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-23 10:11:24 +00:00
({ Routes: closure_2, ME: closure_3 } = ME);
const withEqualityFn = useStoreWithEqualityFn.createWithEqualityFn((arg0) => {
let closure_0 = arg0;
const obj = {
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
let closure_1;
let closure_2;
const callback = arg0;
({ guildId: closure_1, channelId: closure_2 } = outer1_4(arg0));
const tmp = outer1_4(arg0);
callback(outer1_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
let closure_1;
let closure_2;
const callback = pathname;
({ guildId: closure_1, channelId: closure_2 } = outer1_4(pathname));
const tmp = outer1_4(pathname);
callback(outer1_1[4]).batchUpdates(() => pathname({ path: null, guildId: closure_1, channelId: closure_2, basePath: pathname }));
2026-07-20 16:05:17 +00:00
}
};
2026-07-23 10:11:24 +00:00
return obj;
2026-07-20 16:05:17 +00:00
});
2026-07-23 10:11:24 +00:00
const result = require("isPseudoGuildId").fileFinishedImporting("modules/routing/KeybindRouterStore.tsx");
2026-07-20 16:05:17 +00:00
export default withEqualityFn;