Files
discord-decomp/sources/modules/routing/RouteParam.tsx
T
2026-07-28 01:06:53 +03:00

61 lines
3.6 KiB
TypeScript

/* Metro module 3988; source: modules/routing/RouteParam.tsx; dependencies: [662, 1386, 484, 3989, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as PathUtilsModule from '../../external/discord_common/js/shared/utils/PathUtils.tsx'; /* Metro dependency 484 */
import * as RouteConstantsModule from './RouteConstants.tsx'; /* Metro dependency 662 */
import * as ChannelConstantsModule from '../channel/ChannelConstants.tsx'; /* Metro dependency 1386 */
function _fun32785(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#32785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4146:6, offset: 0x0101e2d9, size: 168 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object = {guildId: guildId, channelId: channelId};
(FileImportTrackerModule).fileFinishedImporting('modules/routing/RouteParam.tsx');
exports.RouteParam = object;
function paramPattern(a0, a1) { // fn#32786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4146:153, offset: 0x0101e381, size: 151 bytes, params: 3, frame: 20
let value = a2;
let optional = (value !== undefined ? value : {}).optional;
optional = !(optional === undefined) && optional;
const UnescapedPathParam = (PathUtilsModule).UnescapedPathParam;
value = importDefault(3989) /* metro dependency 3989 */;
value = value(a0);
value = ':' + value + '(' + a1 + ')' + (optional ? '?' : '');
const value4 = Object.create(UnescapedPathParam.prototype, {constructor: {value: UnescapedPathParam}});
const unescapedPathParam = new UnescapedPathParam(value);
return unescapedPathParam instanceof Object ? unescapedPathParam : value4;
}
function guildId() { // fn#32787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4146:288, offset: 0x0101e418, size: 136 bytes, params: 1, frame: 19
let value = a0;
const r0 = value !== undefined ? value : {};
let name = r0.name;
name = name === undefined ? 'guildId' : name;
let optional = r0.optional;
optional = !(optional === undefined) && optional;
const paramPatternBinding = paramPattern;
value = PSEUDO_GUILD_IDS.map(importDefault(3989) /* metro dependency 3989 */);
value = value.join('|');
value = '' + value + '|\\d+';
return paramPatternBinding(name, value, {optional: optional});
}
function channelId() { // fn#32788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4146:401, offset: 0x0101e4a0, size: 149 bytes, params: 1, frame: 19
let value = a0;
const r0 = value !== undefined ? value : {};
let name = r0.name;
name = name === undefined ? 'channelId' : name;
let optional = r0.optional;
optional = !(optional === undefined) && optional;
const paramPatternBinding = paramPattern;
const items2 = [];
arraySpread(items2, StaticChannelRoutes, 0, undefined);
value = items2.map(importDefault(3989) /* metro dependency 3989 */);
value = value.join('|');
value = '' + value + '|\\d+';
return paramPatternBinding(name, value, {optional: optional});
}
}
global.__d(_fun32785, 3988, [662, 1386, 484, 3989,
2]) /* metro module 3988, dependencies: [662, 1386, 484, 3989, 2] */;