81 lines
2.5 KiB
TypeScript
81 lines
2.5 KiB
TypeScript
// Module ID: 11056
|
|
// Function ID: 11057
|
|
// Name: getMatchData
|
|
// Dependencies: [676, 4207, 4220, 700, 705, 2]
|
|
|
|
// Module 11056 (getMatchData)
|
|
import set from "set" /* 2 */;
|
|
import matchPath from "matchPath" /* 4207 */;
|
|
import ME from "ME" /* 676 */;
|
|
import identity from "identity" /* 700 */;
|
|
|
|
function getMatchData(pathname) {
|
|
let str = pathname;
|
|
let obj = matchPath;
|
|
let str2 = pathname;
|
|
if (pathname == null) {
|
|
str2 = "";
|
|
}
|
|
obj = { path: null };
|
|
let obj2 = closure_2;
|
|
const RouteParam = tmp(4220).RouteParam;
|
|
const RouteParam2 = tmp(4220).RouteParam;
|
|
obj[0] = closure_2.CHANNEL(RouteParam.guildId(), RouteParam2.channelId({ optional: true }), ":messageId?");
|
|
const matchPathResult = obj.matchPath(str2, obj);
|
|
if (null != matchPathResult) {
|
|
({ guildId, channelId } = matchPathResult.params);
|
|
let tmp7 = null;
|
|
if (guildId !== closure_3) {
|
|
tmp7 = guildId;
|
|
}
|
|
obj = { guildId: null, channelId: null };
|
|
obj[0] = tmp7;
|
|
if (channelId == null) {
|
|
channelId = null;
|
|
}
|
|
obj[1] = channelId;
|
|
return obj;
|
|
} else {
|
|
if (str == null) {
|
|
str = "";
|
|
}
|
|
obj1 = { path: null };
|
|
const RouteParam3 = tmp(4220).RouteParam;
|
|
obj1[0] = obj2.GUILD_BOOSTING_MARKETING(RouteParam3.guildId());
|
|
const matchPathResult1 = tmp(4207).matchPath(str, obj1);
|
|
if (null != matchPathResult1) {
|
|
obj2 = { guildId: null, channelId: null };
|
|
obj2[0] = matchPathResult1.params.guildId;
|
|
let obj3 = obj2;
|
|
} else {
|
|
obj3 = { guildId: null, channelId: null };
|
|
}
|
|
return obj3;
|
|
}
|
|
const guildIdResult = RouteParam.guildId();
|
|
}
|
|
({ Routes: obj1, ME: c3 } = ME);
|
|
const withEqualityFn = identity.createWithEqualityFn((arg0) => {
|
|
closure_0 = arg0;
|
|
return {
|
|
path: null,
|
|
basePath: "/",
|
|
guildId: null,
|
|
channelId: null,
|
|
updatePath(arg0) {
|
|
const callback = arg0;
|
|
({ 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 }));
|
|
},
|
|
resetPath(pathname) {
|
|
const callback = pathname;
|
|
({ 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 }));
|
|
}
|
|
};
|
|
});
|
|
const result = set.fileFinishedImporting("modules/routing/KeybindRouterStore.tsx");
|
|
|
|
export default withEqualityFn;
|