decord/source/utils/ModerationUtils.tsx

273 lines
11 KiB
TypeScript
Raw Normal View History

2026-07-27 11:26:19 +00:00
// Module ID: 13803
// Function ID: 105840
2026-07-20 16:05:17 +00:00
// Name: mapColorToHighlightColor
2026-07-27 11:26:19 +00:00
// Dependencies: [653, 3806, 688, 13804, 1212, 1282, 2]
2026-07-20 16:05:17 +00:00
// Exports: generateContentFilterHighlightedOptions, generateContentFilterOptions, generateDmSpamOptions, generateExplicitImageOptions, generateVerificationLevelOptions, mapOptionToHighlightedRowOptions
2026-07-27 11:26:19 +00:00
// Module 13803 (mapColorToHighlightColor)
2026-07-23 10:11:24 +00:00
import ME from "ME";
import { ExplicitContentFilterTypes as closure_5 } from "items";
let closure_2;
let closure_3;
let closure_4;
2026-07-20 16:05:17 +00:00
function mapColorToHighlightColor(arg0) {
if (obj.unsafe_getRawColor("PRIMARY_400") === arg0) {
2026-07-27 11:26:19 +00:00
return require(13804) /* HighlightColors */.HighlightColors.ACCENT;
2026-07-20 16:05:17 +00:00
} else {
if (obj3.unsafe_getRawColor("GREEN_360") === arg0) {
2026-07-27 11:26:19 +00:00
return require(13804) /* HighlightColors */.HighlightColors.GREEN;
2026-07-20 16:05:17 +00:00
} else {
if (obj4.unsafe_getRawColor("YELLOW_360") === arg0) {
2026-07-27 11:26:19 +00:00
return require(13804) /* HighlightColors */.HighlightColors.YELLOW;
2026-07-20 16:05:17 +00:00
} else {
if (obj5.unsafe_getRawColor("ORANGE_345") === arg0) {
2026-07-27 11:26:19 +00:00
return require(13804) /* HighlightColors */.HighlightColors.ORANGE;
2026-07-20 16:05:17 +00:00
} else {
if (obj2.unsafe_getRawColor("RED_400") === arg0) {
2026-07-27 11:26:19 +00:00
return require(13804) /* HighlightColors */.HighlightColors.RED;
2026-07-20 16:05:17 +00:00
} else {
2026-07-27 11:26:19 +00:00
return require(13804) /* HighlightColors */.HighlightColors.NONE;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
obj2 = require(688) /* unsafe_getRawColor */;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
obj5 = require(688) /* unsafe_getRawColor */;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
obj4 = require(688) /* unsafe_getRawColor */;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
obj3 = require(688) /* unsafe_getRawColor */;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
obj = require(688) /* unsafe_getRawColor */;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
({ VerificationLevels: closure_2, VerificationCriteria: closure_3, GuildExplicitContentFilterTypes: closure_4 } = ME);
const result = require("unsafe_getRawColor").fileFinishedImporting("utils/ModerationUtils.tsx");
2026-07-20 16:05:17 +00:00
export { mapColorToHighlightColor };
export const mapOptionToHighlightedRowOptions = function mapOptionToHighlightedRowOptions(arr) {
2026-07-23 10:11:24 +00:00
return arr.map((name) => ({ title: name.name, description: name.desc, highlightColor: outer1_6(name.color), value: name.value, disabled: name.disabled }));
2026-07-20 16:05:17 +00:00
};
export const generateVerificationLevelOptions = function generateVerificationLevelOptions(features) {
let flag = features;
let flag2 = arg1;
if (features === undefined) {
flag = false;
}
if (flag2 === undefined) {
flag2 = false;
}
let obj = {};
2026-07-23 10:11:24 +00:00
const intl = require(1212) /* getSystemLocale */.intl;
obj.name = intl.string(require(1212) /* getSystemLocale */.t.PEzffq);
const intl2 = require(1212) /* getSystemLocale */.intl;
2026-07-20 16:05:17 +00:00
const string = intl2.string;
2026-07-23 10:11:24 +00:00
const t = require(1212) /* getSystemLocale */.t;
2026-07-20 16:05:17 +00:00
if (flag) {
let stringResult = string(t.j9WtHx);
} else {
stringResult = string(t.nDQy0p);
}
obj.desc = stringResult;
obj.value = constants.NONE;
obj.disabled = flag;
const items = [obj, , , , ];
obj = {};
2026-07-23 10:11:24 +00:00
const intl3 = require(1212) /* getSystemLocale */.intl;
obj.name = intl3.string(require(1212) /* getSystemLocale */.t.SsCK8I);
const intl4 = require(1212) /* getSystemLocale */.intl;
obj.desc = intl4.string(require(1212) /* getSystemLocale */.t["8GCOX6"]);
2026-07-20 16:05:17 +00:00
obj.value = constants.LOW;
let unsafe_getRawColorResult;
if (!flag2) {
2026-07-23 10:11:24 +00:00
let obj2 = require(688) /* unsafe_getRawColor */;
2026-07-20 16:05:17 +00:00
unsafe_getRawColorResult = obj2.unsafe_getRawColor("GREEN_360");
}
obj.color = unsafe_getRawColorResult;
items[1] = obj;
obj = {};
2026-07-23 10:11:24 +00:00
const intl5 = require(1212) /* getSystemLocale */.intl;
obj.name = intl5.string(require(1212) /* getSystemLocale */.t.WwNoR4);
const intl6 = require(1212) /* getSystemLocale */.intl;
obj.desc = intl6.formatToPlainString(require(1212) /* getSystemLocale */.t.VS14ga, { min: constants2.ACCOUNT_AGE });
2026-07-20 16:05:17 +00:00
obj.value = constants.MEDIUM;
let unsafe_getRawColorResult1;
if (!flag2) {
2026-07-23 10:11:24 +00:00
unsafe_getRawColorResult1 = require(688) /* unsafe_getRawColor */.unsafe_getRawColor("YELLOW_360");
const obj6 = require(688) /* unsafe_getRawColor */;
2026-07-20 16:05:17 +00:00
}
obj.color = unsafe_getRawColorResult1;
items[2] = obj;
obj2 = {};
2026-07-23 10:11:24 +00:00
const intl7 = require(1212) /* getSystemLocale */.intl;
obj2.name = intl7.string(require(1212) /* getSystemLocale */.t.I2jMUF);
const intl8 = require(1212) /* getSystemLocale */.intl;
obj2.desc = intl8.formatToPlainString(require(1212) /* getSystemLocale */.t["r+b3I4"], { min: constants2.MEMBER_AGE });
2026-07-20 16:05:17 +00:00
obj2.value = constants.HIGH;
let unsafe_getRawColorResult2;
if (!flag2) {
2026-07-23 10:11:24 +00:00
unsafe_getRawColorResult2 = require(688) /* unsafe_getRawColor */.unsafe_getRawColor("ORANGE_345");
const obj9 = require(688) /* unsafe_getRawColor */;
2026-07-20 16:05:17 +00:00
}
obj2.color = unsafe_getRawColorResult2;
items[3] = obj2;
const obj4 = {};
2026-07-23 10:11:24 +00:00
const intl9 = require(1212) /* getSystemLocale */.intl;
obj4.name = intl9.string(require(1212) /* getSystemLocale */.t.cJY8w9);
const intl10 = require(1212) /* getSystemLocale */.intl;
obj4.desc = intl10.string(require(1212) /* getSystemLocale */.t.PWaKme);
2026-07-20 16:05:17 +00:00
obj4.value = constants.VERY_HIGH;
let unsafe_getRawColorResult3;
if (!flag2) {
2026-07-23 10:11:24 +00:00
unsafe_getRawColorResult3 = require(688) /* unsafe_getRawColor */.unsafe_getRawColor("RED_400");
const obj11 = require(688) /* unsafe_getRawColor */;
2026-07-20 16:05:17 +00:00
}
obj4.color = unsafe_getRawColorResult3;
items[4] = obj4;
return items;
};
export const generateContentFilterHighlightedOptions = function generateContentFilterHighlightedOptions() {
let flag = arg0;
if (arg0 === undefined) {
flag = false;
}
let obj = {};
2026-07-23 10:11:24 +00:00
const intl = require(1212) /* getSystemLocale */.intl;
obj.name = intl.string(require(1212) /* getSystemLocale */.t.iHuPE6);
const intl2 = require(1212) /* getSystemLocale */.intl;
obj.desc = intl2.string(require(1212) /* getSystemLocale */.t["Z+yUWF"]);
2026-07-20 16:05:17 +00:00
obj.value = constants3.ALL_MEMBERS;
2026-07-23 10:11:24 +00:00
obj.color = require(688) /* unsafe_getRawColor */.unsafe_getRawColor("RED_400");
2026-07-20 16:05:17 +00:00
const items = [obj, , ];
obj = {};
2026-07-23 10:11:24 +00:00
const intl3 = require(1212) /* getSystemLocale */.intl;
obj.name = intl3.string(require(1212) /* getSystemLocale */.t.ynfFaI);
const intl4 = require(1212) /* getSystemLocale */.intl;
2026-07-20 16:05:17 +00:00
const string = intl4.string;
2026-07-23 10:11:24 +00:00
const t = require(1212) /* getSystemLocale */.t;
2026-07-20 16:05:17 +00:00
if (flag) {
let stringResult = string(t.j9WtHx);
} else {
2026-07-23 10:11:24 +00:00
stringResult = string(t["3fRIN4"]);
2026-07-20 16:05:17 +00:00
}
obj.desc = stringResult;
obj.value = constants3.MEMBERS_WITHOUT_ROLES;
obj.disabled = flag;
2026-07-23 10:11:24 +00:00
const obj2 = require(688) /* unsafe_getRawColor */;
obj.color = require(688) /* unsafe_getRawColor */.unsafe_getRawColor("YELLOW_360");
2026-07-20 16:05:17 +00:00
items[1] = obj;
obj = {};
2026-07-23 10:11:24 +00:00
const intl5 = require(1212) /* getSystemLocale */.intl;
obj.name = intl5.string(require(1212) /* getSystemLocale */.t.VbSyAx);
const intl6 = require(1212) /* getSystemLocale */.intl;
2026-07-20 16:05:17 +00:00
const string2 = intl6.string;
2026-07-23 10:11:24 +00:00
const t2 = require(1212) /* getSystemLocale */.t;
2026-07-20 16:05:17 +00:00
if (flag) {
let string2Result = string2(t2.j9WtHx);
} else {
string2Result = string2(t2.M6GNsJ);
}
obj.desc = string2Result;
obj.value = constants3.DISABLED;
obj.disabled = flag;
2026-07-23 10:11:24 +00:00
const obj4 = require(688) /* unsafe_getRawColor */;
obj.color = require(688) /* unsafe_getRawColor */.unsafe_getRawColor("PRIMARY_400");
2026-07-20 16:05:17 +00:00
items[2] = obj;
return items;
};
export const generateContentFilterOptions = function generateContentFilterOptions(features) {
let flag = features;
if (features === undefined) {
flag = false;
}
let obj = {};
2026-07-23 10:11:24 +00:00
const intl = require(1212) /* getSystemLocale */.intl;
obj.name = intl.string(require(1212) /* getSystemLocale */.t.iHuPE6);
const intl2 = require(1212) /* getSystemLocale */.intl;
obj.desc = intl2.string(require(1212) /* getSystemLocale */.t["Z+yUWF"]);
2026-07-20 16:05:17 +00:00
obj.value = constants3.ALL_MEMBERS;
const items = [obj, , ];
obj = {};
2026-07-23 10:11:24 +00:00
const intl3 = require(1212) /* getSystemLocale */.intl;
obj.name = intl3.string(require(1212) /* getSystemLocale */.t.ynfFaI);
const intl4 = require(1212) /* getSystemLocale */.intl;
2026-07-20 16:05:17 +00:00
const string = intl4.string;
2026-07-23 10:11:24 +00:00
const t = require(1212) /* getSystemLocale */.t;
2026-07-20 16:05:17 +00:00
if (flag) {
let stringResult = string(t.j9WtHx);
} else {
2026-07-23 10:11:24 +00:00
stringResult = string(t["3fRIN4"]);
2026-07-20 16:05:17 +00:00
}
obj.desc = stringResult;
obj.value = constants3.MEMBERS_WITHOUT_ROLES;
obj.disabled = flag;
items[1] = obj;
obj = {};
2026-07-23 10:11:24 +00:00
const intl5 = require(1212) /* getSystemLocale */.intl;
obj.name = intl5.string(require(1212) /* getSystemLocale */.t.VbSyAx);
const intl6 = require(1212) /* getSystemLocale */.intl;
2026-07-20 16:05:17 +00:00
const string2 = intl6.string;
2026-07-23 10:11:24 +00:00
const t2 = require(1212) /* getSystemLocale */.t;
2026-07-20 16:05:17 +00:00
if (flag) {
let string2Result = string2(t2.j9WtHx);
} else {
string2Result = string2(t2.M6GNsJ);
}
obj.desc = string2Result;
obj.value = constants3.DISABLED;
obj.disabled = flag;
items[2] = obj;
return items;
};
export const generateDmSpamOptions = function generateDmSpamOptions() {
let obj = {};
2026-07-23 10:11:24 +00:00
const intl = require(1212) /* getSystemLocale */.intl;
obj.name = intl.string(require(1212) /* getSystemLocale */.t["4IaoCI"]);
const intl2 = require(1212) /* getSystemLocale */.intl;
obj.desc = intl2.string(require(1212) /* getSystemLocale */.t.TgipjE);
obj.value = require(1282) /* _callSuper */.DmSpamFilterV2.FRIENDS_AND_NON_FRIENDS;
2026-07-20 16:05:17 +00:00
const items = [obj, , ];
obj = {};
2026-07-23 10:11:24 +00:00
const intl3 = require(1212) /* getSystemLocale */.intl;
obj.name = intl3.string(require(1212) /* getSystemLocale */.t["6NnX6F"]);
const intl4 = require(1212) /* getSystemLocale */.intl;
obj.desc = intl4.string(require(1212) /* getSystemLocale */.t["+dw1qu"]);
obj.value = require(1282) /* _callSuper */.DmSpamFilterV2.NON_FRIENDS;
2026-07-20 16:05:17 +00:00
items[1] = obj;
obj = {};
2026-07-23 10:11:24 +00:00
const intl5 = require(1212) /* getSystemLocale */.intl;
obj.name = intl5.string(require(1212) /* getSystemLocale */.t["1tiAFz"]);
const intl6 = require(1212) /* getSystemLocale */.intl;
obj.desc = intl6.string(require(1212) /* getSystemLocale */.t.LKTyeA);
obj.value = require(1282) /* _callSuper */.DmSpamFilterV2.DISABLED;
2026-07-20 16:05:17 +00:00
items[2] = obj;
return items;
};
export const generateExplicitImageOptions = function generateExplicitImageOptions() {
let obj = {};
2026-07-23 10:11:24 +00:00
const intl = require(1212) /* getSystemLocale */.intl;
obj.name = intl.string(require(1212) /* getSystemLocale */.t.PhNlhz);
const intl2 = require(1212) /* getSystemLocale */.intl;
obj.desc = intl2.string(require(1212) /* getSystemLocale */.t["Fw+Lvp"]);
2026-07-20 16:05:17 +00:00
obj.value = constants4.FRIENDS_AND_NON_FRIENDS;
2026-07-23 10:11:24 +00:00
obj.color = require(688) /* unsafe_getRawColor */.unsafe_getRawColor("GREEN_360");
2026-07-20 16:05:17 +00:00
const items = [obj, , ];
obj = {};
2026-07-23 10:11:24 +00:00
const intl3 = require(1212) /* getSystemLocale */.intl;
obj.name = intl3.string(require(1212) /* getSystemLocale */.t["8ioJ4S"]);
const intl4 = require(1212) /* getSystemLocale */.intl;
obj.desc = intl4.string(require(1212) /* getSystemLocale */.t.z4l4Cr);
2026-07-20 16:05:17 +00:00
obj.value = constants4.NON_FRIENDS;
2026-07-23 10:11:24 +00:00
const obj2 = require(688) /* unsafe_getRawColor */;
obj.color = require(688) /* unsafe_getRawColor */.unsafe_getRawColor("YELLOW_360");
2026-07-20 16:05:17 +00:00
items[1] = obj;
obj = {};
2026-07-23 10:11:24 +00:00
const intl5 = require(1212) /* getSystemLocale */.intl;
obj.name = intl5.string(require(1212) /* getSystemLocale */.t.FLfuhL);
const intl6 = require(1212) /* getSystemLocale */.intl;
obj.desc = intl6.string(require(1212) /* getSystemLocale */.t.MoZlaD);
2026-07-20 16:05:17 +00:00
obj.value = constants4.DISABLED;
2026-07-23 10:11:24 +00:00
const obj4 = require(688) /* unsafe_getRawColor */;
obj.color = require(688) /* unsafe_getRawColor */.unsafe_getRawColor("RED_400");
2026-07-20 16:05:17 +00:00
items[2] = obj;
return items;
};