decord/source/utils/ModerationUtils.tsx

275 lines
9.9 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 14262
// Function ID: 14263
2026-07-20 16:05:17 +00:00
// Name: mapColorToHighlightColor
2026-08-24 06:08:38 +00:00
// Dependencies: [676, 4071, 711, 14263, 1236, 1306, 2]
2026-07-20 16:05:17 +00:00
// Exports: generateContentFilterHighlightedOptions, generateContentFilterOptions, generateDmSpamOptions, generateExplicitImageOptions, generateVerificationLevelOptions, mapOptionToHighlightedRowOptions
2026-08-24 06:08:38 +00:00
// Module 14262 (mapColorToHighlightColor)
import set from "set" /* 2 */;
import unsafe_getRawColor from "unsafe_getRawColor" /* 711 */;
import getSystemLocale from "getSystemLocale" /* 1236 */;
import create from "create" /* 1306 */;
import items2 from "items" /* 4071 */;
import ME from "ME" /* 676 */;
2026-07-23 10:11:24 +00:00
2026-07-20 16:05:17 +00:00
function mapColorToHighlightColor(arg0) {
if (obj.unsafe_getRawColor("PRIMARY_400") === arg0) {
2026-08-24 06:08:38 +00:00
return tmp(14263).HighlightColors.ACCENT;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
let tmpResult = tmp(711);
if (tmpResult.unsafe_getRawColor("GREEN_360") === arg0) {
2026-08-24 06:08:38 +00:00
return tmp(14263).HighlightColors.GREEN;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
tmpResult = tmp(711);
if (tmpResult.unsafe_getRawColor("YELLOW_360") === arg0) {
2026-08-24 06:08:38 +00:00
return tmp(14263).HighlightColors.YELLOW;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
if (tmpResult1.unsafe_getRawColor("ORANGE_345") === arg0) {
2026-08-24 06:08:38 +00:00
return tmp(14263).HighlightColors.ORANGE;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
if (tmpResult2.unsafe_getRawColor("RED_400") === arg0) {
2026-08-24 06:08:38 +00:00
return tmp(14263).HighlightColors.RED;
2026-07-20 16:05:17 +00:00
} else {
2026-08-24 06:08:38 +00:00
return tmp(14263).HighlightColors.NONE;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmpResult2 = tmp(711);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmpResult1 = tmp(711);
2026-07-20 16:05:17 +00:00
}
}
}
2026-08-24 06:08:38 +00:00
obj = unsafe_getRawColor;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
({ VerificationLevels: obj1, VerificationCriteria: c3, GuildExplicitContentFilterTypes: c4 } = ME);
2026-08-24 06:08:38 +00:00
let closure_5 = items2.ExplicitContentFilterTypes;
const result = set.fileFinishedImporting("utils/ModerationUtils.tsx");
2026-07-20 16:05:17 +00:00
export { mapColorToHighlightColor };
export const mapOptionToHighlightedRowOptions = function mapOptionToHighlightedRowOptions(arr) {
2026-07-29 08:29:29 +00:00
return arr.map((name) => ({ title: name.name, description: name.desc, highlightColor: callback(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;
if (features === undefined) {
flag = false;
}
2026-07-29 08:29:29 +00:00
let flag2 = arg1;
if (arg1 === undefined) {
2026-07-20 16:05:17 +00:00
flag2 = false;
}
2026-07-29 08:29:29 +00:00
let obj = { name: null, desc: null, value: null, disabled: null };
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
obj[0] = intl.string(getSystemLocale.t.PEzffq);
const intl2 = getSystemLocale.intl;
2026-07-20 16:05:17 +00:00
const string = intl2.string;
2026-08-24 06:08:38 +00:00
const t = getSystemLocale.t;
2026-07-20 16:05:17 +00:00
if (flag) {
let stringResult = string(t.j9WtHx);
} else {
stringResult = string(t.nDQy0p);
}
2026-07-29 08:29:29 +00:00
obj[1] = stringResult;
obj[2] = constants.NONE;
obj[3] = flag;
2026-07-20 16:05:17 +00:00
const items = [obj, , , , ];
2026-07-29 08:29:29 +00:00
obj = { name: null, desc: null, value: null, color: null };
const intl3 = tmp(1236).intl;
2026-08-24 06:08:38 +00:00
obj[0] = intl3.string(getSystemLocale.t.SsCK8I);
2026-07-29 08:29:29 +00:00
const intl4 = tmp(1236).intl;
2026-08-24 06:08:38 +00:00
obj[1] = intl4.string(getSystemLocale.t["8GCOX6"]);
2026-07-29 08:29:29 +00:00
obj[2] = constants.LOW;
2026-07-20 16:05:17 +00:00
let unsafe_getRawColorResult;
if (!flag2) {
2026-07-29 08:29:29 +00:00
let tmpResult = tmp(711);
unsafe_getRawColorResult = tmpResult.unsafe_getRawColor("GREEN_360");
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[3] = unsafe_getRawColorResult;
2026-07-20 16:05:17 +00:00
items[1] = obj;
2026-07-29 08:29:29 +00:00
obj = { name: null, desc: null, value: null, color: null };
const intl5 = tmp(1236).intl;
2026-08-24 06:08:38 +00:00
obj[0] = intl5.string(getSystemLocale.t.WwNoR4);
2026-07-29 08:29:29 +00:00
const intl6 = tmp(1236).intl;
2026-08-24 06:08:38 +00:00
obj[1] = intl6.formatToPlainString(getSystemLocale.t.VS14ga, { min: constants2.ACCOUNT_AGE });
2026-07-29 08:29:29 +00:00
obj[2] = constants.MEDIUM;
2026-07-20 16:05:17 +00:00
let unsafe_getRawColorResult1;
if (!flag2) {
2026-07-29 08:29:29 +00:00
tmpResult = tmp(711);
unsafe_getRawColorResult1 = tmpResult.unsafe_getRawColor("YELLOW_360");
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[3] = unsafe_getRawColorResult1;
2026-07-20 16:05:17 +00:00
items[2] = obj;
2026-07-29 08:29:29 +00:00
const obj2 = { name: null, desc: null, value: null, color: null };
const intl7 = tmp(1236).intl;
2026-08-24 06:08:38 +00:00
obj2[0] = intl7.string(getSystemLocale.t.I2jMUF);
2026-07-29 08:29:29 +00:00
const intl8 = tmp(1236).intl;
2026-08-24 06:08:38 +00:00
obj2[1] = intl8.formatToPlainString(getSystemLocale.t["r+b3I4"], { min: constants2.MEMBER_AGE });
2026-07-29 08:29:29 +00:00
obj2[2] = constants.HIGH;
2026-07-20 16:05:17 +00:00
let unsafe_getRawColorResult2;
if (!flag2) {
2026-07-29 08:29:29 +00:00
unsafe_getRawColorResult2 = tmp(711).unsafe_getRawColor("ORANGE_345");
const tmpResult1 = tmp(711);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj2[3] = unsafe_getRawColorResult2;
2026-07-20 16:05:17 +00:00
items[3] = obj2;
2026-07-29 08:29:29 +00:00
const obj4 = { name: null, desc: null, value: null, color: null };
const intl9 = tmp(1236).intl;
2026-08-24 06:08:38 +00:00
obj4[0] = intl9.string(getSystemLocale.t.cJY8w9);
2026-07-29 08:29:29 +00:00
const intl10 = tmp(1236).intl;
2026-08-24 06:08:38 +00:00
obj4[1] = intl10.string(getSystemLocale.t.PWaKme);
2026-07-29 08:29:29 +00:00
obj4[2] = constants.VERY_HIGH;
2026-07-20 16:05:17 +00:00
let unsafe_getRawColorResult3;
if (!flag2) {
2026-07-29 08:29:29 +00:00
unsafe_getRawColorResult3 = tmp(711).unsafe_getRawColor("RED_400");
const tmpResult2 = tmp(711);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj4[3] = unsafe_getRawColorResult3;
2026-07-20 16:05:17 +00:00
items[4] = obj4;
return items;
};
export const generateContentFilterHighlightedOptions = function generateContentFilterHighlightedOptions() {
let flag = arg0;
if (arg0 === undefined) {
flag = false;
}
2026-07-29 08:29:29 +00:00
let obj = { name: null, desc: null, value: null, color: null };
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
obj[0] = intl.string(getSystemLocale.t.iHuPE6);
const intl2 = getSystemLocale.intl;
obj[1] = intl2.string(getSystemLocale.t["Z+yUWF"]);
2026-07-29 08:29:29 +00:00
obj[2] = constants3.ALL_MEMBERS;
2026-08-24 06:08:38 +00:00
obj[3] = unsafe_getRawColor.unsafe_getRawColor("RED_400");
2026-07-20 16:05:17 +00:00
const items = [obj, , ];
2026-07-29 08:29:29 +00:00
obj = { name: null, desc: null, value: null, disabled: null, color: null };
2026-08-24 06:08:38 +00:00
const intl3 = getSystemLocale.intl;
obj[0] = intl3.string(getSystemLocale.t.ynfFaI);
const intl4 = getSystemLocale.intl;
2026-07-20 16:05:17 +00:00
const string = intl4.string;
2026-08-24 06:08:38 +00:00
const t = 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
}
2026-07-29 08:29:29 +00:00
obj[1] = stringResult;
obj[2] = constants3.MEMBERS_WITHOUT_ROLES;
obj[3] = flag;
let tmpResult = tmp(711);
obj[4] = tmpResult.unsafe_getRawColor("YELLOW_360");
2026-07-20 16:05:17 +00:00
items[1] = obj;
2026-07-29 08:29:29 +00:00
obj = { name: null, desc: null, value: null, disabled: null, color: null };
const intl5 = tmp(1236).intl;
2026-08-24 06:08:38 +00:00
obj[0] = intl5.string(getSystemLocale.t.VbSyAx);
2026-07-29 08:29:29 +00:00
const intl6 = tmp(1236).intl;
2026-07-20 16:05:17 +00:00
const string2 = intl6.string;
2026-07-29 08:29:29 +00:00
const t2 = tmp(1236).t;
2026-07-20 16:05:17 +00:00
if (flag) {
let string2Result = string2(t2.j9WtHx);
} else {
string2Result = string2(t2.M6GNsJ);
}
2026-07-29 08:29:29 +00:00
obj[1] = string2Result;
obj[2] = constants3.DISABLED;
obj[3] = flag;
tmpResult = tmp(711);
obj[4] = tmpResult.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;
}
2026-07-29 08:29:29 +00:00
let obj = { name: null, desc: null, value: null };
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
obj[0] = intl.string(getSystemLocale.t.iHuPE6);
const intl2 = getSystemLocale.intl;
obj[1] = intl2.string(getSystemLocale.t["Z+yUWF"]);
2026-07-29 08:29:29 +00:00
obj[2] = constants3.ALL_MEMBERS;
2026-07-20 16:05:17 +00:00
const items = [obj, , ];
2026-07-29 08:29:29 +00:00
obj = { name: null, desc: null, value: null, disabled: null };
2026-08-24 06:08:38 +00:00
const intl3 = getSystemLocale.intl;
obj[0] = intl3.string(getSystemLocale.t.ynfFaI);
const intl4 = getSystemLocale.intl;
2026-07-20 16:05:17 +00:00
const string = intl4.string;
2026-08-24 06:08:38 +00:00
const t = 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
}
2026-07-29 08:29:29 +00:00
obj[1] = stringResult;
obj[2] = constants3.MEMBERS_WITHOUT_ROLES;
obj[3] = flag;
2026-07-20 16:05:17 +00:00
items[1] = obj;
2026-07-29 08:29:29 +00:00
obj = { name: null, desc: null, value: null, disabled: null };
const intl5 = tmp(1236).intl;
2026-08-24 06:08:38 +00:00
obj[0] = intl5.string(getSystemLocale.t.VbSyAx);
2026-07-29 08:29:29 +00:00
const intl6 = tmp(1236).intl;
2026-07-20 16:05:17 +00:00
const string2 = intl6.string;
2026-07-29 08:29:29 +00:00
const t2 = tmp(1236).t;
2026-07-20 16:05:17 +00:00
if (flag) {
let string2Result = string2(t2.j9WtHx);
} else {
string2Result = string2(t2.M6GNsJ);
}
2026-07-29 08:29:29 +00:00
obj[1] = string2Result;
obj[2] = constants3.DISABLED;
obj[3] = flag;
2026-07-20 16:05:17 +00:00
items[2] = obj;
return items;
};
export const generateDmSpamOptions = function generateDmSpamOptions() {
2026-07-29 08:29:29 +00:00
let obj = { name: null, desc: null, value: null };
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
obj[0] = intl.string(getSystemLocale.t["4IaoCI"]);
const intl2 = getSystemLocale.intl;
obj[1] = intl2.string(getSystemLocale.t.TgipjE);
obj[2] = create.DmSpamFilterV2.FRIENDS_AND_NON_FRIENDS;
2026-07-20 16:05:17 +00:00
const items = [obj, , ];
2026-07-29 08:29:29 +00:00
obj = { name: null, desc: null, value: null };
2026-08-24 06:08:38 +00:00
const intl3 = getSystemLocale.intl;
obj[0] = intl3.string(getSystemLocale.t["6NnX6F"]);
const intl4 = getSystemLocale.intl;
obj[1] = intl4.string(getSystemLocale.t["+dw1qu"]);
obj[2] = create.DmSpamFilterV2.NON_FRIENDS;
2026-07-20 16:05:17 +00:00
items[1] = obj;
2026-07-29 08:29:29 +00:00
obj = { name: null, desc: null, value: null };
2026-08-24 06:08:38 +00:00
const intl5 = getSystemLocale.intl;
obj[0] = intl5.string(getSystemLocale.t["1tiAFz"]);
const intl6 = getSystemLocale.intl;
obj[1] = intl6.string(getSystemLocale.t.LKTyeA);
obj[2] = create.DmSpamFilterV2.DISABLED;
2026-07-20 16:05:17 +00:00
items[2] = obj;
return items;
};
export const generateExplicitImageOptions = function generateExplicitImageOptions() {
2026-07-29 08:29:29 +00:00
let obj = { name: null, desc: null, value: null, color: null };
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
obj[0] = intl.string(getSystemLocale.t.PhNlhz);
const intl2 = getSystemLocale.intl;
obj[1] = intl2.string(getSystemLocale.t["Fw+Lvp"]);
2026-07-29 08:29:29 +00:00
obj[2] = constants4.FRIENDS_AND_NON_FRIENDS;
2026-08-24 06:08:38 +00:00
obj[3] = unsafe_getRawColor.unsafe_getRawColor("GREEN_360");
2026-07-20 16:05:17 +00:00
const items = [obj, , ];
2026-07-29 08:29:29 +00:00
obj = { name: null, desc: null, value: null, color: null };
2026-08-24 06:08:38 +00:00
const intl3 = getSystemLocale.intl;
obj[0] = intl3.string(getSystemLocale.t["8ioJ4S"]);
const intl4 = getSystemLocale.intl;
obj[1] = intl4.string(getSystemLocale.t.z4l4Cr);
2026-07-29 08:29:29 +00:00
obj[2] = constants4.NON_FRIENDS;
2026-08-24 06:08:38 +00:00
const obj2 = unsafe_getRawColor;
obj[3] = unsafe_getRawColor.unsafe_getRawColor("YELLOW_360");
2026-07-20 16:05:17 +00:00
items[1] = obj;
2026-07-29 08:29:29 +00:00
obj = { name: null, desc: null, value: null, color: null };
2026-08-24 06:08:38 +00:00
const intl5 = getSystemLocale.intl;
obj[0] = intl5.string(getSystemLocale.t.FLfuhL);
const intl6 = getSystemLocale.intl;
obj[1] = intl6.string(getSystemLocale.t.MoZlaD);
2026-07-29 08:29:29 +00:00
obj[2] = constants4.DISABLED;
2026-08-24 06:08:38 +00:00
const obj4 = unsafe_getRawColor;
obj[3] = unsafe_getRawColor.unsafe_getRawColor("RED_400");
2026-07-20 16:05:17 +00:00
items[2] = obj;
return items;
};