(function(){lett=window.require("fs"),a=window.require("process"),o=a.platform,d=("win32"===o?a.env.APPDATA:"darwin"===o?a.env.HOME+"/Library/Preferences":process.env.HOME+"/.config")+"/BetterDiscord/",l="localStorage.json",u={};if(t.existsSync(`${d}${l}`))try{u=JSON.parse(t.readFileSync(`${d}${l}`))}catch(b){console.log(b)}elseif(t.existsSync(l))try{u=JSON.parse(t.readFileSync(l))}catch(b){console.log(b)}varh=u;h.setItem=function(b,f){h[b]=f,this.save()},h.getItem=function(b){returnh[b]||null},h.save=function(){t.writeFileSync(`${d}${l}`,JSON.stringify(this),null,4)};varg=newProxy(h,{set:function(b,f,y){h[f]=y,h.save()},get:function(b,f){returnh[f]||null}});window.localStorage=g})(),(()=>{lett=document.createElement("div");t.className="bd-loaderv2",t.title="BetterDiscord is loading...",document.body.appendChild(t)})();varbetterDiscordIPC=require("electron").ipcRenderer;window.bdStorage={},window.bdStorage.get=function(t){returnbetterDiscordIPC.sendSync("synchronous-message",{arg:"storage",cmd:"get","var":t})},window.bdStorage.set=function(t,a){betterDiscordIPC.sendSync("synchronous-message",{arg:"storage",cmd:"set","var":t,data:a})},window.bdPluginStorage={},window.bdPluginStorage.get=function(t,a){returnbetterDiscordIPC.sendSync("synchronous-message",{arg:"pluginstorage",cmd:"get",pn:t,"var":a})},window.bdPluginStorage.set=function(t,a,o){return"undefined"==typeofo?Utils.warn("Trying to set undefined value in plugin "+t):voidbetterDiscordIPC.sendSync("synchronous-message",{arg:"pluginstorage",cmd:"set",pn:t,"var":a,data:o})},window.bdPluginStorage.delete=function(t,a){betterDiscordIPC.sendSync("synchronous-message",{arg:"pluginstorage",cmd:"delete",pn:t,"var":a})};varbdSettings={},bdSettingsStorage={},releaseChannel=DiscordNative.globals.releaseChannel;bdSettingsStorage.initialize=function(){lett=require("fs"),a={stable:{},canary:{},ptb:{}};if(t.existsSync(bdConfig.dataPath+"/bdsettings.json"))try{a=JSON.parse(t.readFileSync(bdConfig.dataPath+"/bdsettings.json")),a.hasOwnProperty("settings")&&(a={[releaseChannel]:a})}catch(o){a={stable:{},canary:{},ptb:{}}}bdSettings=a?a:{stable:{},canary:{},ptb:{}}},bdSettingsStorage.get=function(t){returnbdSettings[releaseChannel][t]?bdSettings[releaseChannel][t]:null},bdSettingsStorage.set=function(t,a){leto=require("fs");bdSettings[releaseChannel][t]=a;try{returno.writeFileSync(bdConfig.dataPath+"/bdsettings.json",JSON.stringify(bdSettings,null,4)),!0}catch(d){returnUtils.err(d),!1}};varsettingsPanel,emoteModule,quickEmoteMenu,voiceMode,pluginModule,themeModule,dMode,publicServersModule,minSupportedVersion="0.2.81",bbdVersion="0.1.2",mainCore,settings={"Save logs locally":{id:"bda-gs-0",info:"Saves chat logs locally",implemented:!1,hidden:!1,cat:"core"},"Public Servers":{id:"bda-gs-1",info:"Display public servers button",implemented:!0,hidden:!1,cat:"core"},"Minimal Mode":{id:"bda-gs-2",info:"Hide elements and reduce the size of elements.",implemented:!0,hidden:!1,cat:"core"},"Voice Mode":{id:"bda-gs-4",info:"Only show voice chat",implemented:!0,hidden:!1,cat:"core"},"Hide Channels":{id:"bda-gs-3",info:"Hide channels in minimal mode",implemented:!0,hidden:!1,cat:"core"},"Dark Mode":{id:"bda-gs-5",info:"Make certain elements dark by default(wip)",implemented:!0,hidden:!1,cat:"core"},"Override Default Emotes":{id:"bda-es-5",info:"Override default emotes",implemented:!1,hidden:!1,cat:"core"},"Voice Disconnect":{id:"bda-dc-0",info:"Disconnect from voice server when closing Discord",implemented:!0,hidden:!1,cat:"core"},"Custom css live update":{id:"bda-css-0",info:"",implemented:!0,hidden:!0,cat:"core"},"Custom css auto udpate":{id:"bda-css-1",info:"",implemented:!0,hidden:!0,cat:"core"},"24 Hour Timestamps":{id:"bda-gs-6",info:"Replace 12hr timestamps with proper ones",implemented:!0,hidden:!1,cat:"core"},"Coloured Text":{id:"bda-gs-7",info:"Make text colour the same as role colour",implemented:!0,hidden:!1,cat:"core"},"BetterDiscord Blue":{id:"bda-gs-b",info:"Replace Discord blue with BD Blue",implemented:!0,hidden:!1,cat:"core"},"Developer Mode":{id:"bda-gs-8",in