Loading
function(e,n,t){var i=t(855986),l=t(73153),a=t(967198);let o=null,r=null,s={reportedMessages:{}};function c(){let e=a.A.getLastSelectedGuildId();e!==o&&(r=null,o=e??null)}class d extends i.Ay.PersistedStore{static displayName="ReportToModStore";static persistKey="ReportToModStore";static migrations=[e=>({reportedMessages:e?.reportedMessages??{}})];initialize(e){null!=e&&(s.reportedMessages=Object.fromEntries(Object.entries(e.reportedMessages).map(e=>{let[n,t]=e;return[n,new Set(t)]}))),this.syncWith([a.A],c)}getState(){return s}isUserBanned(e){return r?.get(e)??null}getReportedMessages(){return s.reportedMessages}hasReportedMessage(e,n){return s.reportedMessages[e]?.has(n)??!1}}let u=new d(l.h,{REPORT_TO_MOD_REPORT_MESSAGE_SUCCESS:function(e){let{channelId:n,messageId:t}=e;null==s.reportedMessages[n]&&(s.reportedMessages[n]=new Set),s.reportedMessages[n].add(t)},GUILD_BAN_ADD:function(e){let{user:n,guildId:t}=e;t!==o||null!=r&&r.set(n.id,!0)},GUILD_BAN_REMOVE:function(e){let{user:n,guildId:t}=e;t!==o||null!=r&&r.set(n.id,!1)},GUILD_SETTINGS_LOADED_BANS_BATCH:function(e){let{bans:n,guildId:t,userIds:i}=e;if(t!==o)return;let l=new Set(n.map(e=>e.user?.id)),a=Array.from(new Set(i??[])).filter(e=>!l.has(e));null==r&&(r=new Map),l.forEach(e=>{r?.set(e,!0)}),a.forEach(e=>{r?.set(e,!1)})},LOGOUT:function(){o=null,r=null,s.reportedMessages={}}});t.d(n,{},{A:u})}