Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5014.js (118.4 MB)
945 lines
36 KiB
TypeScript
945 lines
36 KiB
TypeScript
// Module ID: 5327
|
|
// Function ID: 5328
|
|
// Name: utils/ChannelUtils
|
|
// Dependencies: [2044, 2107, 2066, 1372, 1074, 5328, 5329, 5330, 5331, 5332, 5333, 5334, 5335, 5336, 5337, 5338, 5339, 5340, 5341, 5342, 5343, 5344, 5345, 5346, 5347, 5348, 5349, 5350, 5351, 5352, 5353, 5354, 5355, 5356, 5359, 5360, 5369, 5365, 5370, 5371, 5372, 5373, 5374, 5375, 5368, 5376, 5377, 5378, 5379, 5380, 5381, 5382, 5383, 5384, 5385, 5386, 5387, 5388, 5389, 5390, 5391, 5392, 5393, 5394, 5395, 5396, 5397, 5398, 5399, 5400, 5401, 5402, 5403, 5404, 5405, 5406, 5407, 5408, 5409, 5410, 5367, 5366, 2]
|
|
// Exports: getChannelIconComponentWithGuild, getChannelIconWithGuild, getChannelMentionIcon, getSimpleChannelIcon, getSimpleChannelIconComponent, getThreadChannelIcon
|
|
|
|
// Module 5327 (utils/ChannelUtils)
|
|
import _modDef5328 from "module_5328" /* 5328 */;
|
|
import _modDef5329 from "module_5329" /* 5329 */;
|
|
import _modDef5330 from "module_5330" /* 5330 */;
|
|
import _modDef5331 from "module_5331" /* 5331 */;
|
|
import _modDef5332 from "module_5332" /* 5332 */;
|
|
import _modDef5333 from "module_5333" /* 5333 */;
|
|
import _modDef5334 from "module_5334" /* 5334 */;
|
|
import _modDef5335 from "module_5335" /* 5335 */;
|
|
import _modDef5336 from "module_5336" /* 5336 */;
|
|
import _modDef5337 from "module_5337" /* 5337 */;
|
|
import _modDef5338 from "module_5338" /* 5338 */;
|
|
import _modDef5339 from "module_5339" /* 5339 */;
|
|
import _modDef5340 from "module_5340" /* 5340 */;
|
|
import _modDef5341 from "module_5341" /* 5341 */;
|
|
import _modDef5342 from "module_5342" /* 5342 */;
|
|
import _modDef5343 from "module_5343" /* 5343 */;
|
|
import _modDef5344 from "module_5344" /* 5344 */;
|
|
import _modDef5345 from "module_5345" /* 5345 */;
|
|
import _modDef5346 from "module_5346" /* 5346 */;
|
|
import _modDef5347 from "module_5347" /* 5347 */;
|
|
import _modDef5348 from "module_5348" /* 5348 */;
|
|
import _modDef5349 from "module_5349" /* 5349 */;
|
|
import _modDef5350 from "module_5350" /* 5350 */;
|
|
import _modDef5351 from "module_5351" /* 5351 */;
|
|
import _modDef5352 from "module_5352" /* 5352 */;
|
|
import _modDef5353 from "module_5353" /* 5353 */;
|
|
import _modDef5354 from "module_5354" /* 5354 */;
|
|
import _modDef5355 from "module_5355" /* 5355 */;
|
|
import useShowMemberVerificationGate from "useShowMemberVerificationGate" /* 5356 */;
|
|
import _modDef5359 from "module_5359" /* 5359 */;
|
|
import isRoleRequiredDefault from "isRoleRequired" /* 5365 */;
|
|
import _modDef5369 from "module_5369" /* 5369 */;
|
|
import _modDef5375 from "module_5375" /* 5375 */;
|
|
import ChannelStore from "ChannelStore" /* 2044 */;
|
|
import GuildMemberStore from "GuildMemberStore" /* 2107 */;
|
|
import GuildStore from "GuildStore" /* 2066 */;
|
|
import UserStore from "UserStore" /* 1372 */;
|
|
|
|
const getVibegrationsChannelIcon = tmp(5360);
|
|
const AppsIcon2 = tmp(5366);
|
|
const AppsLockIcon = tmp(5367);
|
|
const ExperimentalLfgIcon = tmp(5376);
|
|
const ChatIcon2 = tmp(5377);
|
|
const ThreadLockIcon = tmp(5378);
|
|
const ThreadIcon2 = tmp(5379);
|
|
const FolderIcon = tmp(5380);
|
|
const BookCheckIcon = tmp(5381);
|
|
const TextWarningIcon2 = tmp(5382);
|
|
const TextSpoilerIcon2 = tmp(5383);
|
|
const TextLockIcon2 = tmp(5384);
|
|
const TextControllerIcon = tmp(5385);
|
|
const TextIcon2 = tmp(5386);
|
|
const ImageWarningIcon2 = tmp(5387);
|
|
const ForumWarningIcon2 = tmp(5388);
|
|
const ForumSpoilerIcon3 = tmp(5389);
|
|
const ExperimentalLfgLockIcon = tmp(5390);
|
|
const ImageLockIcon = tmp(5391);
|
|
const ForumLockIcon2 = tmp(5392);
|
|
const ImageIcon2 = tmp(5393);
|
|
const ForumIcon2 = tmp(5394);
|
|
const GroupIcon = tmp(5395);
|
|
const AtIcon = tmp(5396);
|
|
const AnnouncementsWarningIcon2 = tmp(5397);
|
|
const AnnouncementsSpoilerIcon2 = tmp(5398);
|
|
const AnnouncementsLockIcon = tmp(5399);
|
|
const AnnouncementsIcon2 = tmp(5400);
|
|
const LockIcon3 = tmp(5401);
|
|
const StageLockIcon2 = tmp(5402);
|
|
const StageIcon2 = tmp(5403);
|
|
const VoiceLockIcon3 = tmp(5404);
|
|
const VoiceWarningIcon2 = tmp(5405);
|
|
const VoiceNormalSpoilerIcon = tmp(5406);
|
|
const VoiceNormalIcon2 = tmp(5407);
|
|
const HubIcon = tmp(5408);
|
|
const AppsWarningIcon = tmp(5409);
|
|
const AppsSpoilerIcon2 = tmp(5410);
|
|
require = fn;
|
|
function getChannelIcon(channel, ignoreTraits) {
|
|
let obj = ignoreTraits;
|
|
if (ignoreTraits == null) {
|
|
obj = {};
|
|
}
|
|
({ isRulesChannel, locked } = obj);
|
|
const items = [GuildStore, UserStore, GuildMemberStore];
|
|
const result = useShowMemberVerificationGate.shouldShowMembershipVerificationGate(channel.guild_id, items);
|
|
if (channel.isForumPost()) {
|
|
channel = null;
|
|
if (null != channel.parent_id) {
|
|
channel = ChannelStore.getChannel(channel.parent_id);
|
|
}
|
|
let isGameInvitesChannelResult;
|
|
if (channel != null) {
|
|
isGameInvitesChannelResult = channel.isGameInvitesChannel();
|
|
}
|
|
if (true === isGameInvitesChannelResult) {
|
|
let tmp96 = _modDef5359;
|
|
} else {
|
|
tmp96 = _modDef5347;
|
|
}
|
|
return tmp96;
|
|
} else {
|
|
const vibegrationsChannelIconSource = getVibegrationsChannelIcon.getVibegrationsChannelIconSource(channel, "getChannelIcon");
|
|
if (null != vibegrationsChannelIconSource) {
|
|
return vibegrationsChannelIconSource;
|
|
} else {
|
|
const isMediaChannelResult = channel.isMediaChannel();
|
|
const isNSFWResult = channel.isNSFW();
|
|
const type2 = channel.type;
|
|
if (ChannelTypes.PRIVATE_THREAD !== type2) {
|
|
if (tmp100.ANNOUNCEMENT_THREAD !== type2) {
|
|
if (tmp100.PUBLIC_THREAD !== type2) {
|
|
if (tmp100.MEDIA_THREAD !== type2) {
|
|
if (tmp100.GUILD_CATEGORY === type2) {
|
|
return _modDef5330;
|
|
} else if (tmp100.GUILD_TEXT === type2) {
|
|
if (isRulesChannel) {
|
|
let tmp78 = _modDef5369;
|
|
} else {
|
|
if (isNSFWResult) {
|
|
ignoreTraits = undefined;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits) {
|
|
tmp78 = _modDef5343;
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits1;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits1 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits1) {
|
|
_modDef5344;
|
|
}
|
|
}
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let ignoreTraits2;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits2 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits2) {
|
|
tmp81(5353);
|
|
}
|
|
}
|
|
if (null != channel.linkedLobby) {
|
|
let tmp81Result2 = tmp81(5370);
|
|
} else {
|
|
tmp81Result2 = tmp81(5331);
|
|
}
|
|
}
|
|
return tmp78;
|
|
} else if (tmp100.GUILD_FORUM === type2) {
|
|
if (isRulesChannel) {
|
|
let tmp65 = _modDef5369;
|
|
} else {
|
|
if (isNSFWResult) {
|
|
let ignoreTraits3;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits3 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits3) {
|
|
tmp65 = importDefault(isMediaChannelResult ? 5352 : 5349);
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits4;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits4 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits4) {
|
|
_modDef5350;
|
|
}
|
|
}
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let ignoreTraits5;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits5 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits5) {
|
|
if (channel.isGameInvitesChannel()) {
|
|
let tmp68Result = tmp68(5371);
|
|
} else {
|
|
tmp68Result = tmp68(isMediaChannelResult ? 5372 : 5373);
|
|
}
|
|
}
|
|
}
|
|
if (channel.isGameInvitesChannel()) {
|
|
let tmp68Result2 = tmp68(5359);
|
|
} else {
|
|
tmp68Result2 = tmp68(isMediaChannelResult ? 5351 : 5348);
|
|
}
|
|
}
|
|
return tmp65;
|
|
} else if (tmp100.GUILD_MEDIA === type2) {
|
|
if (isRulesChannel) {
|
|
let tmp55 = _modDef5369;
|
|
} else {
|
|
if (isNSFWResult) {
|
|
let ignoreTraits6;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits6 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits6) {
|
|
tmp55 = _modDef5352;
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits7;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits7 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits7) {
|
|
_modDef5350;
|
|
}
|
|
}
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let ignoreTraits8;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits8 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits8) {
|
|
let tmp58Result = tmp58(5372);
|
|
}
|
|
}
|
|
tmp58Result = tmp58(5351);
|
|
}
|
|
return tmp55;
|
|
} else if (tmp100.GROUP_DM === type2) {
|
|
return _modDef5333;
|
|
} else if (tmp100.DM === type2) {
|
|
return _modDef5334;
|
|
} else if (tmp100.GUILD_ANNOUNCEMENT === type2) {
|
|
if (isRulesChannel) {
|
|
let tmp42 = _modDef5369;
|
|
} else {
|
|
if (isNSFWResult) {
|
|
let ignoreTraits9;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits9 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits9) {
|
|
tmp42 = _modDef5345;
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits10;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits10 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits10) {
|
|
_modDef5346;
|
|
}
|
|
}
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let ignoreTraits11;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits11 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits11) {
|
|
let tmp45Result = tmp45(5374);
|
|
}
|
|
}
|
|
tmp45Result = tmp45(5335);
|
|
}
|
|
return tmp42;
|
|
} else if (tmp100.GUILD_STAGE_VOICE === type2) {
|
|
if (result) {
|
|
let ignoreTraits12;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits12 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits12) {
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let tmp31Result = tmp31(5375);
|
|
} else {
|
|
tmp31Result = tmp31(5342);
|
|
}
|
|
return tmp31Result;
|
|
}
|
|
}
|
|
if (locked) {
|
|
let ignoreTraits13;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits13 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits13) {
|
|
_modDef5375;
|
|
}
|
|
}
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let ignoreTraits14;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits14 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits14) {
|
|
let tmp35Result = tmp35(5342);
|
|
}
|
|
}
|
|
tmp35Result = tmp35(5336);
|
|
} else if (tmp100.GUILD_VOICE === type2) {
|
|
if (obj.textFocused) {
|
|
let tmp16Result = _modDef5347;
|
|
} else {
|
|
if (result) {
|
|
let ignoreTraits15;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits15 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits15) {
|
|
if (isRoleRequiredDefault(channel)) {
|
|
tmp16Result = tmp16(5375);
|
|
} else {
|
|
tmp16Result = tmp16(5339);
|
|
}
|
|
}
|
|
}
|
|
if (locked) {
|
|
let ignoreTraits16;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits16 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits16) {
|
|
_modDef5375;
|
|
}
|
|
}
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let ignoreTraits17;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits17 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits17) {
|
|
tmp20(5339);
|
|
}
|
|
}
|
|
if (isNSFWResult) {
|
|
let ignoreTraits18;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits18 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits18) {
|
|
tmp20(5340);
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits19;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits19 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits19) {
|
|
let tmp20Result4 = tmp20(5341);
|
|
}
|
|
}
|
|
tmp20Result4 = tmp20(5337);
|
|
}
|
|
return tmp16Result;
|
|
} else if (tmp100.GUILD_DIRECTORY === type2) {
|
|
return _modDef5338;
|
|
} else if (tmp100.GUILD_APP === type2) {
|
|
if (isNSFWResult) {
|
|
let ignoreTraits20;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits20 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits20) {
|
|
return _modDef5354;
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits21;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits21 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits21) {
|
|
_modDef5355;
|
|
}
|
|
}
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let ignoreTraits22;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits22 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits22) {
|
|
let tmp9Result = tmp9(5368);
|
|
}
|
|
}
|
|
tmp9Result = tmp9(5332);
|
|
} else {
|
|
if (tmp100.GUILD_STORE !== type2) {
|
|
if (tmp100.GUILD_SPACE !== type2) {
|
|
const UNKNOWN = tmp100.UNKNOWN;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const type = channel.type;
|
|
if (ChannelTypes.PRIVATE_THREAD === type) {
|
|
let tmp89 = _modDef5328;
|
|
} else {
|
|
if (tmp100.ANNOUNCEMENT_THREAD !== type) {
|
|
if (tmp100.PUBLIC_THREAD !== type) {
|
|
tmp89 = null;
|
|
}
|
|
}
|
|
tmp89 = _modDef5329;
|
|
}
|
|
return tmp89;
|
|
}
|
|
const tmpResult = getVibegrationsChannelIcon;
|
|
}
|
|
}
|
|
function getChannelIconComponent(channel, ignoreTraits) {
|
|
let obj = ignoreTraits;
|
|
if (ignoreTraits == null) {
|
|
obj = {};
|
|
}
|
|
({ isRulesChannel, locked } = obj);
|
|
const items = [GuildStore, UserStore, GuildMemberStore];
|
|
const result = useShowMemberVerificationGate.shouldShowMembershipVerificationGate(channel.guild_id, items);
|
|
if (channel.isForumPost()) {
|
|
channel = null;
|
|
if (null != channel.parent_id) {
|
|
channel = ChannelStore.getChannel(channel.parent_id);
|
|
}
|
|
let isGameInvitesChannelResult;
|
|
if (channel != null) {
|
|
isGameInvitesChannelResult = channel.isGameInvitesChannel();
|
|
}
|
|
if (true === isGameInvitesChannelResult) {
|
|
let ChatIcon = ExperimentalLfgIcon.ExperimentalLfgIcon;
|
|
} else {
|
|
ChatIcon = ChatIcon2.ChatIcon;
|
|
}
|
|
return ChatIcon;
|
|
} else {
|
|
const vibegrationsChannelIconComponent = getVibegrationsChannelIcon.getVibegrationsChannelIconComponent(channel, "getChannelIconComponent");
|
|
if (null != vibegrationsChannelIconComponent) {
|
|
return vibegrationsChannelIconComponent;
|
|
} else {
|
|
const isMediaChannelResult = channel.isMediaChannel();
|
|
const isNSFWResult = channel.isNSFW();
|
|
const type = channel.type;
|
|
if (ChannelTypes.PRIVATE_THREAD === type) {
|
|
return ThreadLockIcon.ThreadLockIcon;
|
|
} else {
|
|
if (tmp50.ANNOUNCEMENT_THREAD !== type) {
|
|
if (tmp50.PUBLIC_THREAD !== type) {
|
|
if (tmp50.MEDIA_THREAD !== type) {
|
|
if (tmp50.GUILD_CATEGORY === type) {
|
|
return FolderIcon.FolderIcon;
|
|
} else if (tmp50.GUILD_TEXT === type) {
|
|
if (isRulesChannel) {
|
|
let TextWarningIcon = BookCheckIcon.BookCheckIcon;
|
|
} else {
|
|
if (isNSFWResult) {
|
|
ignoreTraits = undefined;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits) {
|
|
TextWarningIcon = TextWarningIcon2.TextWarningIcon;
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits1;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits1 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits1) {
|
|
const TextSpoilerIcon = TextSpoilerIcon2.TextSpoilerIcon;
|
|
}
|
|
}
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let ignoreTraits2;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits2 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits2) {
|
|
const TextLockIcon = TextLockIcon2.TextLockIcon;
|
|
}
|
|
}
|
|
if (null != channel.linkedLobby) {
|
|
let TextIcon = TextControllerIcon.TextControllerIcon;
|
|
} else {
|
|
TextIcon = TextIcon2.TextIcon;
|
|
}
|
|
}
|
|
return TextWarningIcon;
|
|
} else if (tmp50.GUILD_FORUM === type) {
|
|
if (isRulesChannel) {
|
|
let ForumWarningIcon = BookCheckIcon.BookCheckIcon;
|
|
} else {
|
|
if (isNSFWResult) {
|
|
let ignoreTraits3;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits3 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits3) {
|
|
if (isMediaChannelResult) {
|
|
ForumWarningIcon = ImageWarningIcon2.ImageWarningIcon;
|
|
} else {
|
|
ForumWarningIcon = ForumWarningIcon2.ForumWarningIcon;
|
|
}
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits4;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits4 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits4) {
|
|
const ForumSpoilerIcon2 = ForumSpoilerIcon3.ForumSpoilerIcon;
|
|
}
|
|
}
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let ignoreTraits5;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits5 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits5) {
|
|
if (channel.isGameInvitesChannel()) {
|
|
let ForumLockIcon = ExperimentalLfgLockIcon.ExperimentalLfgLockIcon;
|
|
} else if (isMediaChannelResult) {
|
|
ForumLockIcon = ImageLockIcon.ImageLockIcon;
|
|
} else {
|
|
ForumLockIcon = ForumLockIcon2.ForumLockIcon;
|
|
}
|
|
}
|
|
}
|
|
if (channel.isGameInvitesChannel()) {
|
|
let ForumIcon = ExperimentalLfgIcon.ExperimentalLfgIcon;
|
|
} else if (isMediaChannelResult) {
|
|
ForumIcon = ImageIcon2.ImageIcon;
|
|
} else {
|
|
ForumIcon = ForumIcon2.ForumIcon;
|
|
}
|
|
}
|
|
return ForumWarningIcon;
|
|
} else if (tmp50.GUILD_MEDIA === type) {
|
|
if (isRulesChannel) {
|
|
let ImageWarningIcon = BookCheckIcon.BookCheckIcon;
|
|
} else {
|
|
if (isNSFWResult) {
|
|
let ignoreTraits6;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits6 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits6) {
|
|
ImageWarningIcon = ImageWarningIcon2.ImageWarningIcon;
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits7;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits7 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits7) {
|
|
const ForumSpoilerIcon = ForumSpoilerIcon3.ForumSpoilerIcon;
|
|
}
|
|
}
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let ignoreTraits8;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits8 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits8) {
|
|
let ImageIcon = ImageLockIcon.ImageLockIcon;
|
|
}
|
|
}
|
|
ImageIcon = ImageIcon2.ImageIcon;
|
|
}
|
|
return ImageWarningIcon;
|
|
} else if (tmp50.GROUP_DM === type) {
|
|
return GroupIcon.GroupIcon;
|
|
} else if (tmp50.DM === type) {
|
|
return AtIcon.AtIcon;
|
|
} else if (tmp50.GUILD_ANNOUNCEMENT === type) {
|
|
if (isRulesChannel) {
|
|
let AnnouncementsWarningIcon = BookCheckIcon.BookCheckIcon;
|
|
} else {
|
|
if (isNSFWResult) {
|
|
let ignoreTraits9;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits9 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits9) {
|
|
AnnouncementsWarningIcon = AnnouncementsWarningIcon2.AnnouncementsWarningIcon;
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits10;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits10 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits10) {
|
|
const AnnouncementsSpoilerIcon = AnnouncementsSpoilerIcon2.AnnouncementsSpoilerIcon;
|
|
}
|
|
}
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let ignoreTraits11;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits11 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits11) {
|
|
let AnnouncementsIcon = AnnouncementsLockIcon.AnnouncementsLockIcon;
|
|
}
|
|
}
|
|
AnnouncementsIcon = AnnouncementsIcon2.AnnouncementsIcon;
|
|
}
|
|
return AnnouncementsWarningIcon;
|
|
} else if (tmp50.GUILD_STAGE_VOICE === type) {
|
|
if (result) {
|
|
let ignoreTraits12;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits12 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits12) {
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let StageLockIcon = LockIcon3.LockIcon;
|
|
} else {
|
|
StageLockIcon = StageLockIcon2.StageLockIcon;
|
|
}
|
|
return StageLockIcon;
|
|
}
|
|
}
|
|
if (locked) {
|
|
let ignoreTraits13;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits13 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits13) {
|
|
const LockIcon2 = LockIcon3.LockIcon;
|
|
}
|
|
}
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let ignoreTraits14;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits14 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits14) {
|
|
let StageIcon = StageLockIcon2.StageLockIcon;
|
|
}
|
|
}
|
|
StageIcon = StageIcon2.StageIcon;
|
|
} else if (tmp50.GUILD_VOICE === type) {
|
|
if (obj.textFocused) {
|
|
let VoiceLockIcon = ChatIcon2.ChatIcon;
|
|
} else {
|
|
if (result) {
|
|
let ignoreTraits15;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits15 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits15) {
|
|
if (isRoleRequiredDefault(channel)) {
|
|
VoiceLockIcon = LockIcon3.LockIcon;
|
|
} else {
|
|
VoiceLockIcon = VoiceLockIcon3.VoiceLockIcon;
|
|
}
|
|
}
|
|
}
|
|
if (locked) {
|
|
let ignoreTraits16;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits16 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits16) {
|
|
const LockIcon = LockIcon3.LockIcon;
|
|
}
|
|
}
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let ignoreTraits17;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits17 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits17) {
|
|
const VoiceLockIcon2 = VoiceLockIcon3.VoiceLockIcon;
|
|
}
|
|
}
|
|
if (isNSFWResult) {
|
|
let ignoreTraits18;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits18 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits18) {
|
|
const VoiceWarningIcon = VoiceWarningIcon2.VoiceWarningIcon;
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits19;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits19 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits19) {
|
|
let VoiceNormalIcon = VoiceNormalSpoilerIcon.VoiceNormalSpoilerIcon;
|
|
}
|
|
}
|
|
VoiceNormalIcon = VoiceNormalIcon2.VoiceNormalIcon;
|
|
}
|
|
return VoiceLockIcon;
|
|
} else if (tmp50.GUILD_DIRECTORY === type) {
|
|
return HubIcon.HubIcon;
|
|
} else if (tmp50.GUILD_APP === type) {
|
|
if (isNSFWResult) {
|
|
let ignoreTraits20;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits20 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits20) {
|
|
return AppsWarningIcon.AppsWarningIcon;
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits21;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits21 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits21) {
|
|
const AppsSpoilerIcon = AppsSpoilerIcon2.AppsSpoilerIcon;
|
|
}
|
|
}
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let ignoreTraits22;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits22 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits22) {
|
|
let AppsIcon = AppsLockIcon.AppsLockIcon;
|
|
}
|
|
}
|
|
AppsIcon = AppsIcon2.AppsIcon;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return ThreadIcon2.ThreadIcon;
|
|
}
|
|
}
|
|
const tmpResult = getVibegrationsChannelIcon;
|
|
}
|
|
}
|
|
const ChannelTypes = fn(1074).ChannelTypes;
|
|
const size = fn(2);
|
|
let result = size.fileFinishedImporting("utils/native/ChannelUtils.tsx");
|
|
|
|
export const getThreadChannelIcon = function getThreadChannelIcon(arg0) {
|
|
if (ChannelTypes.PRIVATE_THREAD === arg0) {
|
|
return _modDef5328;
|
|
} else {
|
|
if (tmp.ANNOUNCEMENT_THREAD !== arg0) {
|
|
if (tmp.PUBLIC_THREAD !== arg0) {
|
|
if (tmp.MEDIA_THREAD !== arg0) {
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
return _modDef5329;
|
|
}
|
|
};
|
|
export const getSimpleChannelIcon = function getSimpleChannelIcon(channel) {
|
|
const type = channel.type;
|
|
if (ChannelTypes.PRIVATE_THREAD !== type) {
|
|
if (tmp.ANNOUNCEMENT_THREAD !== type) {
|
|
if (tmp.PUBLIC_THREAD !== type) {
|
|
if (tmp.MEDIA_THREAD !== type) {
|
|
if (tmp.GUILD_CATEGORY === type) {
|
|
return _modDef5330;
|
|
} else {
|
|
if (tmp.GUILD_TEXT !== type) {
|
|
if (tmp.GUILD_FORUM !== type) {
|
|
if (tmp.GUILD_MEDIA !== type) {
|
|
if (tmp.GUILD_APP === type) {
|
|
return _modDef5332;
|
|
} else if (tmp.GROUP_DM === type) {
|
|
return _modDef5333;
|
|
} else if (tmp.DM === type) {
|
|
return _modDef5334;
|
|
} else if (tmp.GUILD_ANNOUNCEMENT === type) {
|
|
return _modDef5335;
|
|
} else if (tmp.GUILD_STAGE_VOICE === type) {
|
|
return _modDef5336;
|
|
} else if (tmp.GUILD_VOICE === type) {
|
|
return _modDef5337;
|
|
} else if (tmp.GUILD_DIRECTORY === type) {
|
|
return _modDef5338;
|
|
} else {
|
|
if (tmp.GUILD_STORE !== type) {
|
|
if (tmp.GUILD_SPACE !== type) {
|
|
const UNKNOWN = tmp.UNKNOWN;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return _modDef5331;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const type2 = channel.type;
|
|
if (ChannelTypes.PRIVATE_THREAD === type2) {
|
|
let tmp21 = _modDef5328;
|
|
} else {
|
|
if (tmp.ANNOUNCEMENT_THREAD !== type2) {
|
|
if (tmp.PUBLIC_THREAD !== type2) {
|
|
tmp21 = null;
|
|
}
|
|
}
|
|
tmp21 = _modDef5329;
|
|
}
|
|
return tmp21;
|
|
};
|
|
export const getChannelIconWithGuild = function getChannelIconWithGuild(channel, guild) {
|
|
let rulesChannelId;
|
|
if (guild != null) {
|
|
rulesChannelId = guild.rulesChannelId;
|
|
}
|
|
return getChannelIcon(channel, { isRulesChannel: rulesChannelId === channel.id });
|
|
};
|
|
export const getChannelMentionIcon = function getChannelMentionIcon(iconType) {
|
|
switch (iconType) {
|
|
case "voice":
|
|
return _modDef5337;
|
|
case "voice-locked":
|
|
return _modDef5339;
|
|
case "voice-nsfw":
|
|
return _modDef5340;
|
|
case "voice-spoiler":
|
|
return _modDef5341;
|
|
case "stage":
|
|
return _modDef5336;
|
|
case "stage-locked":
|
|
return _modDef5342;
|
|
case "text":
|
|
return _modDef5331;
|
|
case "text-nsfw":
|
|
return _modDef5343;
|
|
case "text-spoiler":
|
|
return _modDef5344;
|
|
case "announcement":
|
|
return _modDef5335;
|
|
case "announcement-nsfw":
|
|
return _modDef5345;
|
|
case "announcement-spoiler":
|
|
return _modDef5346;
|
|
case "thread":
|
|
return _modDef5329;
|
|
case "post":
|
|
let tmp21 = _modDef5347;
|
|
return tmp21;
|
|
case "message":
|
|
tmp21 = _modDef5347;
|
|
return tmp21;
|
|
case "forum":
|
|
return _modDef5348;
|
|
case "forum-nsfw":
|
|
return _modDef5349;
|
|
case "forum-spoiler":
|
|
return _modDef5350;
|
|
case "media":
|
|
return _modDef5351;
|
|
case "media-nsfw":
|
|
return _modDef5352;
|
|
case "locked":
|
|
return _modDef5353;
|
|
case "app":
|
|
return _modDef5332;
|
|
case "app-nsfw":
|
|
return _modDef5354;
|
|
case "app-spoiler":
|
|
return _modDef5355;
|
|
default:
|
|
return null;
|
|
}
|
|
};
|
|
export { getChannelIcon };
|
|
export const getChannelIconComponentWithGuild = function getChannelIconComponentWithGuild(channel, guild) {
|
|
let rulesChannelId;
|
|
if (guild != null) {
|
|
rulesChannelId = guild.rulesChannelId;
|
|
}
|
|
return getChannelIconComponent(channel, { isRulesChannel: rulesChannelId === channel.id });
|
|
};
|
|
export { getChannelIconComponent };
|
|
export const getSimpleChannelIconComponent = function getSimpleChannelIconComponent(channel) {
|
|
const type = channel.type;
|
|
if (ChannelTypes.PRIVATE_THREAD !== type) {
|
|
if (tmp.ANNOUNCEMENT_THREAD !== type) {
|
|
if (tmp.PUBLIC_THREAD !== type) {
|
|
if (tmp.MEDIA_THREAD !== type) {
|
|
if (tmp.GUILD_CATEGORY === type) {
|
|
return FolderIcon.FolderIcon;
|
|
} else if (tmp.GUILD_TEXT === type) {
|
|
return TextIcon2.TextIcon;
|
|
} else if (tmp.GUILD_FORUM === type) {
|
|
return ForumIcon2.ForumIcon;
|
|
} else if (tmp.GUILD_MEDIA === type) {
|
|
return ImageIcon2.ImageIcon;
|
|
} else if (tmp.GROUP_DM === type) {
|
|
return GroupIcon.GroupIcon;
|
|
} else if (tmp.DM === type) {
|
|
return AtIcon.AtIcon;
|
|
} else if (tmp.GUILD_ANNOUNCEMENT === type) {
|
|
return AnnouncementsIcon2.AnnouncementsIcon;
|
|
} else if (tmp.GUILD_STAGE_VOICE === type) {
|
|
return StageIcon2.StageIcon;
|
|
} else if (tmp.GUILD_VOICE === type) {
|
|
return VoiceNormalIcon2.VoiceNormalIcon;
|
|
} else if (tmp.GUILD_DIRECTORY === type) {
|
|
return HubIcon.HubIcon;
|
|
} else if (tmp.GUILD_APP === type) {
|
|
return AppsIcon2.AppsIcon;
|
|
} else {
|
|
if (tmp.GUILD_STORE !== type) {
|
|
if (tmp.GUILD_SPACE !== type) {
|
|
const UNKNOWN = tmp.UNKNOWN;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (channel.isForumPost()) {
|
|
let ThreadIcon = tmp25(5377).ChatIcon;
|
|
} else {
|
|
ThreadIcon = tmp25(5379).ThreadIcon;
|
|
}
|
|
return ThreadIcon;
|
|
};
|