decord/beta/source/modules/badges/BadgeIdResolution.tsx
github-actions 30c0bb2ec3 chore: update source for beta 347.10
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4975.js (118.4 MB)
2026-09-24 16:03:38 +00:00

49 lines
1.7 KiB
TypeScript

// Module ID: 8499
// Function ID: 8500
// Name: BadgeIdResolution
// Dependencies: [8500, 8489, 8501, 8490, 8502, 2]
// Exports: isLegacyBadgeId, legacyBadgeIdToBadgeId, resolveProfileBadgeId, toProfileBadgeLegacyId
// Module 8499 (BadgeIdResolution)
import Constants from "Constants" /* 8489 */;
import BadgeId from "BadgeId" /* 8490 */;
import Constants2 from "Constants" /* 8500 */;
import LegacyBadgeIdMap from "LegacyBadgeIdMap" /* 8501 */;
import types from "types" /* 8502 */;
import size from "module_2" /* 2 */;
const getBadgeName = Constants.getBadgeName;
const items = [BadgeId.BadgeId.PREMIUM_TENURE, Constants2.DEFAULT_PREMIUM_BADGE_ID];
const items1 = [items, ];
const items2 = [BadgeId.BadgeId.ORB_PROFILE, types.OrbBadges.ORB_PROFILE_BADGE];
items1[1] = items2;
const map = new Map(items1);
const set = new Set(Object.values(LegacyBadgeIdMap.LEGACY_BADGE_ID_MAP));
const result = size.fileFinishedImporting("modules/badges/BadgeIdResolution.tsx");
export const legacyBadgeIdToBadgeId = function legacyBadgeIdToBadgeId(arg0) {
return LegacyBadgeIdMap.LEGACY_BADGE_ID_MAP[arg0];
};
export const resolveProfileBadgeId = function resolveProfileBadgeId(id) {
const tmp3 = LegacyBadgeIdMap.LEGACY_BADGE_ID_MAP[id];
if (null != tmp3) {
return tmp3;
} else {
const tmp4 = BadgeId.BadgeId[id.toUpperCase(id)];
let tmp5;
if (typeof tmp4 === "number") {
tmp5 = tmp4;
}
return tmp5;
}
};
export const toProfileBadgeLegacyId = function toProfileBadgeLegacyId(badge_id) {
value = map.get(badge_id);
if (value == null) {
value = getBadgeName(badge_id);
}
return value;
};
export const isLegacyBadgeId = function isLegacyBadgeId(arg0) {
return set.has(arg0);
};