renderer.js 471 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. // Vencord a9568bc
  2. // Standalone: true
  3. // Platform: Universal
  4. // Updater disabled: false
  5. "use strict";var Vencord=(()=>{var uM=Object.create;var pa=Object.defineProperty;var pM=Object.getOwnPropertyDescriptor;var dM=Object.getOwnPropertyNames;var mM=Object.getPrototypeOf,fM=Object.prototype.hasOwnProperty;var jr=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,o)=>(typeof require<"u"?require:t)[o]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var g=(e,t)=>()=>(e&&(t=e(e=0)),t);var gr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ze=(e,t)=>{for(var o in t)pa(e,o,{get:t[o],enumerable:!0})},Ah=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of dM(t))!fM.call(e,i)&&i!==o&&pa(e,i,{get:()=>t[i],enumerable:!(r=pM(t,i))||r.enumerable});return e};var da=(e,t,o)=>(o=e!=null?uM(mM(e)):{},Ah(t||!e||!e.__esModule?pa(o,"default",{value:e,enumerable:!0}):o,e)),Ln=e=>Ah(pa({},"__esModule",{value:!0}),e);var f,n,a=g(()=>{"use strict";f=Symbol.for("react.fragment"),n=(...e)=>(n=Vencord.Webpack.Common.React.createElement)(...e)});var ie,Je=g(()=>{"use strict";a();ie=class{constructor(t,o="white"){this.name=t;this.color=o}static makeTitle(t,o){return["%c %c %s ","",`background: ${t}; color: black; font-weight: bold; border-radius: 5px;`,o]}_log(t,o,r,i=""){console[t](`%c Vencord %c %c ${this.name} ${i}`,`background: ${o}; color: black; font-weight: bold; border-radius: 5px;`,"",`background: ${this.color}; color: black; font-weight: bold; border-radius: 5px;`,...r)}log(...t){this._log("log","#a6d189",t)}info(...t){this._log("info","#a6d189",t)}error(...t){this._log("error","#e78284",t)}errorCustomFmt(t,...o){this._log("error","#e78284",o,t)}warn(...t){this._log("warn","#e5c890",t)}debug(...t){this._log("debug","#eebebe",t)}}});var Nh,z,it=g(()=>{"use strict";a();Nh="",z={};for(let e of["top","bottom","left","right"])for(let t of[8,16,20]){let o=`vc-m-${e}-${t}`;z[`${e}${t}`]=o,Nh+=`.${o}{margin-${e}:${t}px;}`}document.addEventListener("DOMContentLoaded",()=>document.head.append(Object.assign(document.createElement("style"),{textContent:Nh,id:"vencord-margins"})),{once:!0})});function En(e,t=5){let o=0,r;return()=>(!r&&t>o++&&(r=e(),!r&&t===o&&console.error("Lazy factory failed:",e)),r)}function Ft(e,t=5,o=!1){let r=!0;o||setTimeout(()=>r=!1,0);let i=0,s=Object.assign(function(){},{[Gi]:void 0,[Wr](){return!s[Gi]&&t>i++&&(s[Gi]=e(),!s[Gi]&&t===i&&console.error("Lazy factory failed:",e)),s[Gi]}});return new Proxy(s,{...ma,get(l,c,u){return!o&&r?Ft(()=>Reflect.get(l[Wr](),c,u),t,!0):Reflect.get(l[Wr](),c,u)}})}var Ch,ma,Wr,Gi,zo=g(()=>{"use strict";a();Ch=["arguments","caller","prototype"],ma={},Wr=Symbol.for("vencord.lazy.get"),Gi=Symbol.for("vencord.lazy.cached");for(let e of["apply","construct","defineProperty","deleteProperty","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf"])ma[e]=(t,...o)=>Reflect[e](t[Wr](),...o);ma.ownKeys=e=>{let t=e[Wr](),o=Reflect.ownKeys(t);for(let r of Ch)o.includes(r)||o.push(r);return o};ma.getOwnPropertyDescriptor=(e,t)=>{if(typeof t=="string"&&Ch.includes(t))return Reflect.getOwnPropertyDescriptor(e,t);let o=Reflect.getOwnPropertyDescriptor(e[Wr](),t);return o&&Object.defineProperty(e,t,o),o}});function Pt(e,t=5){let o=En(e,t),r=i=>{let s=o()??gM;return n(s,{...i})};return r.$$vencordInternal=o,r}var gM,Nc=g(()=>{"use strict";a();zo();gM=()=>null});function an(e){if(typeof e=="string")return e;let t=e.source.replaceAll("\\i","[A-Za-z_$][\\w$]*");return new RegExp(t,e.flags)}function fa(e,t){let o=`Vencord.Plugins.plugins[${JSON.stringify(t)}]`;return typeof e!="function"?e.replaceAll("$self",o):(...r)=>e(...r).replaceAll("$self",o)}function Cc(e,t){if(e.get){let o=e.get;e.get=function(){return t(o.call(this))}}else e.value&&(e.value=t(e.value));return e}function Hi(e,t){let o=Object.getOwnPropertyDescriptors(e);o.match=Cc(o.match,an),o.replace=Cc(o.replace,r=>fa(r,t)),Object.defineProperties(e,o)}var qr=g(()=>{"use strict";a()});var hM,jo,ga=g(()=>{"use strict";a();Je();hM=(e,t,o)=>t,jo=hM});function ya(e){if(ln!==void 0)throw"no.";return e.push([[Symbol("Vencord")],{},t=>Qt=t]),e.pop(),Qt?(ln=Qt.c,!0):!1}function _n(e,...t){let o=new Error(`webpack.${e} found no module`);Kr.error(o,"Filter:",t)}function hr(e){if(typeof e!="function")throw new Error("Invalid filter. Expected a function got "+typeof e);let t=[];for(let o in ln){let r=ln[o];!r?.exports||(e(r.exports)&&t.push(r.exports),r.exports.default&&e(r.exports.default)&&t.push(r.exports.default))}return t}function Rh(...e){let t=va(...e);return t?Qt.m[t]:null}function Ao(e,t){return Ft(e,t)}function Dc(e,t){return Pt(e,t)}function Vt(e){return Ft(()=>Io(e))}function ji(...e){let t=Io(Ae.byProps(...e),{isIndirect:!0});return t||_n("findByProps",...e),t}function A(...e){return Ft(()=>ji(...e))}function Dh(...e){let t=Io(Ae.byCode(...e),{isIndirect:!0});return t||_n("findByCode",...e),t}function cn(...e){return Ft(()=>Dh(...e))}function Lh(e){let t=Io(Ae.byStoreName(e),{isIndirect:!0});return t||_n("findStore",e),t}function we(e){return Ft(()=>Lh(e))}function Lc(...e){let t=Io(Ae.componentByCode(...e),{isIndirect:!0});return t||_n("findComponentByCode",...e),t}function Ec(e){return Pt(()=>{let t=Io(e,{isIndirect:!0});return t||_n("findComponent",e),t})}function je(...e){return Pt(()=>{let t=Io(Ae.componentByCode(...e),{isIndirect:!0});return t||_n("findComponentByCode",...e),t})}function un(...e){return Pt(()=>{let t=Io(Ae.byProps(...e),{isIndirect:!0});return t||_n("findExportedComponent",...e),t[e[0]]})}async function Eh(e,t=/\.el\("(.+?)"\)(?<=(\i)\.el.+?)\.then\(\2\.bind\(\2,"\1"\)\)/){let o=Rh(...e);if(!o){let s=new Error("extractAndLoadChunks: Couldn't find module factory");Kr.warn(s,"Code:",e,"Matcher:",t);return}let r=o.toString().match(an(t));if(!r){let s=new Error("extractAndLoadChunks: Couldn't find entry point id in module factory code");Kr.warn(s,"Code:",e,"Matcher:",t);return}let[,i]=r;if(!i||!Number(i)){let s=new Error("extractAndLoadChunks: Matcher didn't return a capturing group with the entry point, or the entry point returned wasn't a number");Kr.warn(s,"Code:",e,"Matcher:",t);return}return await Qt.el(i),Qt(i)}function Sa(e,t=/\.el\("(.+?)"\)(?<=(\i)\.el.+?)\.then\(\2\.bind\(\2,"\1"\)\)/){return()=>Eh(e,t)}function dt(e,t,{isIndirect:o=!1}={}){if(typeof e=="string")e=Ae.byProps(e);else if(Array.isArray(e))e=Ae.byProps(...e);else if(typeof e!="function")throw new Error("filter must be a string, string[] or function, got "+typeof e);let[r,i]=Io(e,{isIndirect:!0,isWaitFor:!0});if(r)return void t(r,i);kh.set(e,t)}function vM(e){Rc.add(e)}function SM(e){Rc.delete(e)}function _c(...e){let t={},o=Qt.m;e:for(let r in o){let i=o[r].original??o[r],s=i.toString();for(let l of e)if(typeof l=="string"&&!s.includes(l)||l instanceof RegExp&&!l.test(s))continue e;t[r]=i}return t}function ba(e){let t=Qt.m[e];if(!t)return null;let o=`
  6. // [EXTRACTED] WebpackModule${e}
  7. // WARNING: This module was extracted to be more easily readable.
  8. // This module is NOT ACTUALLY USED! This means putting breakpoints will have NO EFFECT!!
  9. 0,${t.toString()}
  10. //# sourceURL=ExtractedWebpackModule${e}
  11. `;return(0,eval)(o)}var Kr,ha,kc,Qt,ln,Ae,kh,Rc,Io,zi,va,yM,W=g(()=>{"use strict";a();zo();Nc();Je();qr();ga();Kr=new ie("Webpack"),kc=new Promise(e=>ha=e),Ae={byProps:(...e)=>e.length===1?t=>t[e[0]]!==void 0:t=>e.every(o=>t[o]!==void 0),byCode:(...e)=>t=>{if(typeof t!="function")return!1;let o=Function.prototype.toString.call(t);for(let r of e)if(!o.includes(r))return!1;return!0},byStoreName:e=>t=>t.constructor?.displayName===e,componentByCode:(...e)=>{let t=Ae.byCode(...e);return o=>t(o)?!0:o.$$typeof?o.type?t(o.type):o.render?t(o.render):!1:!1}},kh=new Map,Rc=new Set;Io=jo("find",function(t,{isIndirect:o=!1,isWaitFor:r=!1}={}){if(typeof t!="function")throw new Error("Invalid filter. Expected a function got "+typeof t);for(let i in ln){let s=ln[i];if(!!s?.exports){if(t(s.exports))return r?[s.exports,i]:s.exports;if(s.exports.default&&t(s.exports.default)){let l=s.exports.default;return r?[l,i]:l}}}return o||_n("find",t),r?[null,null]:null});zi=jo("findBulk",function(...t){if(!Array.isArray(t))throw new Error("Invalid filters. Expected function[] got "+typeof t);let{length:o}=t;if(o===0)throw new Error("Expected at least two filters.");if(o===1)return Io(t[0]);let r=t,i=0,s=Array(o);e:for(let l in ln){let c=ln[l];if(!!c?.exports)for(let u=0;u<o;u++){let p=r[u];if(p!==void 0){if(p(c.exports)){if(s[u]=c.exports,r[u]=void 0,++i===o)break e;break}if(c.exports.default&&p(c.exports.default)){if(s[u]=c.exports.default,r[u]=void 0,++i===o)break e;break}}}}if(i!==o){let l=new Error(`Got ${o} filters, but only found ${i} modules!`);Kr.warn(l)}return s}),va=jo("findModuleId",function(...t){e:for(let r in Qt.m){let i=Qt.m[r].toString();for(let s of t)if(!i.includes(s))continue e;return r}let o=new Error(`Didn't find module with code(s):
  12. `+t.join(`
  13. `));return Kr.warn(o),null});yM=[]});var Ta,vt,_h=g(()=>{"use strict";a();W();Ta=Vt(e=>e.image&&e.modal&&!e.applicationIcon),vt=A("buttonWrapper","buttonContent")});function xa(e,t){let o=function(){throw new Error(`Vencord could not find the ${e} Component`)},r=Pt(()=>o);return dt(t,i=>{o=i,Object.assign(r,i)},{isIndirect:!0}),r}function Lt(e,t){dt(Ae.byStoreName(e),t,{isIndirect:!0})}var Oc=g(()=>{"use strict";a();ut();W()});var S,It,C,mt,ee,et,wa,Q,ho,Ma,yr,eo,Wi,Oh,No,Bh,Yr,Zr,Xr,qi,Jr,Wo,TM,Ki,Fh=g(()=>{"use strict";a();W();Oc();S={},Jr=xa("MaskedLink",e=>e?.type?.toString().includes("MASKED_LINK)")),Wo=xa("Timestamp",Ae.byCode(".Messages.MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL.format")),TM=xa("Flex",["Justify","Align","Wrap"]),{OAuth2AuthorizeModal:Ki}=A("OAuth2AuthorizeModal");dt(["FormItem","Button"],e=>{({useToken:qi,Card:It,Button:C,FormSwitch:mt,Tooltip:ee,TextInput:et,TextArea:wa,Text:Q,Select:ho,SearchableSelect:Ma,Slider:yr,ButtonLooks:eo,TabBar:No,Popout:Wi,Dialog:Oh,Paginator:Bh,ScrollerThin:Yr,Clickable:Zr,Avatar:Xr}=e),S=e})});var G,Ut,Uh=g(()=>{"use strict";a();W();G={};dt(["MenuItem","MenuSliderControl"],e=>G=e);Ut=A("closeContextMenu","openContextMenu")});var _,X,ue,St,to,Qr,Pa,vr,$h=g(()=>{"use strict";a();W();vr=A("createPortal","render");dt("useState",e=>{_=e,{useEffect:ue,useState:X,useMemo:St,useRef:to,useReducer:Qr,useCallback:Pa}=_})});var Bc,Vr,Yi,Gh=g(()=>{"use strict";a();W();Bc=A("MessageDisplayCompact"),Vr=A("ShowCurrentGame"),Yi=A("PreloadedUserSettingsActionCreators")});var Fc,Uc,Co,$c,Le,ei,Sr,qo,xM,pe,F,uo,Me,ko,J,Ee,at,Ro,Zi,Xi,Ke,Hh=g(()=>{"use strict";a();W();Oc();Fc=A("connectStores"),Uc=(i=>(i[i.ChannelMessage=0]="ChannelMessage",i[i.ThreadSettings=1]="ThreadSettings",i[i.FirstThreadMessage=2]="FirstThreadMessage",i[i.ApplicationLauncherCommand=3]="ApplicationLauncherCommand",i))(Uc||{}),$c=A("openPrivateChannel"),{useStateFromStores:Ke}=A("useStateFromStores");Lt("DraftStore",e=>Xi=e);Lt("UserStore",e=>F=e);Lt("UserProfileStore",e=>uo=e);Lt("ChannelStore",e=>J=e);Lt("SelectedChannelStore",e=>Me=e);Lt("SelectedGuildStore",e=>ko=e);Lt("GuildStore",e=>pe=e);Lt("GuildMemberStore",e=>Ee=e);Lt("RelationshipStore",e=>at=e);Lt("PermissionStore",e=>Le=e);Lt("PresenceStore",e=>qo=e);Lt("ReadStateStore",e=>Sr=e);Lt("GuildChannelStore",e=>ei=e);Lt("MessageStore",e=>Co=e);Lt("WindowStore",e=>Zi=e);Lt("EmojiStore",e=>Ro=e)});var zh={};var jh=g(()=>{"use strict";a()});var Wh={};var qh=g(()=>{"use strict";a()});var Kh={};var Yh=g(()=>{"use strict";a()});function $t(e,t=Zh.MESSAGE){oe.show({id:oe.genId(),message:e,type:t})}var B,Ia,At,yo,br,Tr,Qe,Ko,_e,Et,Zh,wM,oe,Nt,Ji,Qi,oo,pn,xr,Te,wr,MM,Gc,Xh=g(()=>{"use strict";a();W();dt(["dispatch","subscribe"],e=>{B=e;let t=()=>{e.unsubscribe("CONNECTION_OPEN",t),ha()};e.subscribe("CONNECTION_OPEN",t)});dt(["ComponentDispatch","ComponentDispatcher"],e=>Ia=e.ComponentDispatch);At=A("getAPIBaseURL","get"),yo=A("parseTwoDigitYear"),br=A("highlight","registerLanguage"),Tr=A("debounce","cloneDeep"),Qe=Vt(e=>e.Messages?.["en-US"]);dt(["fromTimestamp","extractTimestamp"],e=>Ko=e);dt("parseTopic",e=>_e=e);dt(["show","close"],e=>Et=e);Zh={MESSAGE:0,SUCCESS:1,FAILURE:2,CUSTOM:3},wM={TOP:0,BOTTOM:1},oe={Type:Zh,Position:wM,genId:()=>(Math.random()||Math.random()).toString(36).slice(2)};dt("showToast",e=>{oe.show=e.showToast,oe.pop=e.popToast});Nt=A("getUser","fetchCurrentUser"),Ji=A("showUploadFileSizeExceededError","promptToUpload"),Qi=A("fetchAssetIds","getAssetImage"),oo=A("SUPPORTS_COPY","copy"),pn=A("transitionTo","replaceWith","transitionToGuild");dt(["open","saveAccountChanges"],e=>xr=e);({Permissions:Te}=Vt(e=>typeof e.Permissions?.ADMINISTRATOR=="bigint")),wr=cn("will be removed in v4"),MM=Ae.byCode("[zustand persist middleware]"),{persist:Gc}=Vt(e=>e.persist&&MM(e.persist))});var Hc={};ze(Hc,{Alerts:()=>Et,ApplicationAssetUtils:()=>Qi,Avatar:()=>Xr,Button:()=>C,ButtonLooks:()=>eo,ButtonWrapperClasses:()=>vt,Card:()=>It,ChannelStore:()=>J,Clickable:()=>Zr,Clipboard:()=>oo,ComponentDispatch:()=>Ia,ComponentTypes:()=>zh,ContextMenuApi:()=>Ut,Dialog:()=>Oh,DraftStore:()=>Xi,DraftType:()=>Uc,EmojiStore:()=>Ro,Flex:()=>TM,Flux:()=>Fc,FluxDispatcher:()=>B,Forms:()=>S,GuildChannelStore:()=>ei,GuildMemberStore:()=>Ee,GuildStore:()=>pe,MaskedLink:()=>Jr,Menu:()=>G,MenuTypes:()=>Wh,MessageStore:()=>Co,ModalImageClasses:()=>Ta,NavigationRouter:()=>pn,OAuth2AuthorizeModal:()=>Ki,Paginator:()=>Bh,Parser:()=>_e,PermissionStore:()=>Le,PermissionsBits:()=>Te,PoggerModeSettingsStore:()=>xM,Popout:()=>Wi,PresenceStore:()=>qo,PrivateChannelsStore:()=>$c,React:()=>_,ReactDOM:()=>vr,ReadStateStore:()=>Sr,RelationshipStore:()=>at,RestAPI:()=>At,ScrollerThin:()=>Yr,SearchableSelect:()=>Ma,Select:()=>ho,SelectedChannelStore:()=>Me,SelectedGuildStore:()=>ko,SettingsRouter:()=>xr,Slider:()=>yr,SnowflakeUtils:()=>Ko,StatusSettingsStores:()=>Vr,Switch:()=>mt,TabBar:()=>No,Text:()=>Q,TextAndImagesSettingsStores:()=>Bc,TextArea:()=>wa,TextInput:()=>et,Timestamp:()=>Wo,Toasts:()=>oe,Tooltip:()=>ee,UploadHandler:()=>Ji,UserProfileStore:()=>uo,UserSettingsActionCreators:()=>Yi,UserStore:()=>F,UserUtils:()=>Nt,UtilTypes:()=>Kh,WindowStore:()=>Zi,hljs:()=>br,i18n:()=>Qe,lodash:()=>Tr,moment:()=>yo,showToast:()=>$t,useCallback:()=>Pa,useEffect:()=>ue,useMemo:()=>St,useReducer:()=>Qr,useRef:()=>to,useState:()=>X,useStateFromStores:()=>Ke,useToken:()=>qi,zustandCreate:()=>wr,zustandPersist:()=>Gc});var x=g(()=>{"use strict";a();_h();Fh();Uh();$h();Gh();Hh();jh();qh();Yh();Xh()});var po,ti=g(()=>{a();po="a9568bc"});var Aa,Jh=g(()=>{a();Aa="Vendicated/Vencord"});var Yo,PM,zc,Na,d,oi,I=g(()=>{"use strict";a();ti();Jh();Yo="webpackChunkdiscord_app",PM="Vencord.Webpack.Common.React",zc=`Vencord/${po}${Aa?` (https://github.com/${Aa})`:""}`,Na="1026515880080842772",d=Object.freeze({Ven:{name:"Vendicated",id:343383572805058560n},Arjix:{name:"ArjixWasTaken",id:674710789138939916n},Cyn:{name:"Cynosphere",id:150745989836308480n},Megu:{name:"Megumin",id:545581357812678656n},botato:{name:"botato",id:440990343899643943n},obscurity:{name:"obscurity",id:336678828233588736n},rushii:{name:"rushii",id:295190422244950017n},Glitch:{name:"Glitchy",id:269567451199569920n},Samu:{name:"Samu",id:702973430449832038n},Nyako:{name:"nyako",id:118437263754395652n},MaiKokain:{name:"Mai",id:722647978577363026n},echo:{name:"ECHO",id:712639419785412668n},katlyn:{name:"katlyn",id:250322741406859265n},nea:{name:"nea",id:310702108997320705n},Nuckyz:{name:"Nuckyz",id:235834946571337729n},D3SOX:{name:"D3SOX",id:201052085641281538n},Nickyux:{name:"Nickyux",id:427146305651998721n},mantikafasi:{name:"mantikafasi",id:287555395151593473n},Xinto:{name:"Xinto",id:423915768191647755n},JacobTm:{name:"Jacob.Tm",id:302872992097107991n},DustyAngel47:{name:"DustyAngel47",id:714583473804935238n},BanTheNons:{name:"BanTheNons",id:460478012794863637n},BigDuck:{name:"BigDuck",id:1024588272623681609n},AverageReactEnjoyer:{name:"Average React Enjoyer",id:1004904120056029256n},adryd:{name:"adryd",id:0n},Tyman:{name:"Tyman",id:487443883127472129n},afn:{name:"afn",id:420043923822608384n},KraXen72:{name:"KraXen72",id:379304073515499530n},kemo:{name:"kemo",id:299693897859465228n},dzshn:{name:"dzshn",id:310449948011528192n},Ducko:{name:"Ducko",id:506482395269169153n},jewdev:{name:"jewdev",id:222369866529636353n},Luna:{name:"Luny",id:821472922140803112n},Vap:{name:"Vap0r1ze",id:454072114492866560n},KingFish:{name:"King Fish",id:499400512559382538n},Commandtechno:{name:"Commandtechno",id:296776625432035328n},TheSun:{name:"ActuallyTheSun",id:406028027768733696n},axyie:{name:"'ax",id:273562710745284628n},pointy:{name:"pointy",id:99914384989519872n},SammCheese:{name:"Samm-Cheese",id:372148345894076416n},zt:{name:"zt",id:289556910426816513n},captain:{name:"Captain",id:347366054806159360n},nick:{name:"nick",id:347884694408265729n,badge:!1},whqwert:{name:"whqwert",id:586239091520176128n},lewisakura:{name:"lewisakura",id:96269247411400704n},RuiNtD:{name:"RuiNtD",id:157917665162297344n},hunt:{name:"hunt-g",id:222800179697287168n},cloudburst:{name:"cloudburst",id:892128204150685769n},Aria:{name:"Syncxv",id:549244932213309442n},TheKodeToad:{name:"TheKodeToad",id:706152404072267788n},LordElias:{name:"LordElias",id:319460781567639554n},juby:{name:"Juby210",id:324622488644616195n},Alyxia:{name:"Alyxia Sother",id:952185386350829688n},Remty:{name:"Remty",id:335055032204656642n},skyevg:{name:"skyevg",id:1090310844283363348n},Dziurwa:{name:"Dziurwa",id:1001086404203389018n},F53:{name:"F53",id:280411966126948353n},AutumnVN:{name:"AutumnVN",id:393694671383166998n},pylix:{name:"pylix",id:492949202121261067n},Tyler:{name:"\\\\GGTyler\\\\",id:143117463788191746n},RyanCaoDev:{name:"RyanCaoDev",id:952235800110694471n},Strencher:{name:"Strencher",id:415849376598982656n},FieryFlames:{name:"Fiery",id:890228870559698955n},KannaDev:{name:"Kanna",id:317728561106518019n},carince:{name:"carince",id:818323528755314698n},PandaNinjas:{name:"PandaNinjas",id:455128749071925248n},CatNoir:{name:"CatNoir",id:260371016348336128n},outfoxxed:{name:"outfoxxed",id:837425748435796060n},UwUDev:{name:"UwU",id:691413039156690994n},amia:{name:"amia",id:142007603549962240n},phil:{name:"phil",id:305288513941667851n},ImLvna:{name:"Luna <3",id:799319081723232267n},rad:{name:"rad",id:610945092504780823n},AndrewDLO:{name:"Andrew-DLO",id:434135504792059917n},HypedDomi:{name:"HypedDomi",id:354191516979429376n},Rini:{name:"Rini",id:1079479184478441643n},castdrian:{name:"castdrian",id:224617799434108928n},Arrow:{name:"arrow",id:958158495302176778n},bb010g:{name:"bb010g",id:72791153467990016n},Lumap:{name:"lumap",id:635383782576357407n},Dolfies:{name:"Dolfies",id:852892297661906993n},RuukuLada:{name:"RuukuLada",id:119705748346241027n},blahajZip:{name:"blahaj.zip",id:683954422241427471n},archeruwu:{name:"archer_uwu",id:160068695383736320n},ProffDea:{name:"ProffDea",id:609329952180928513n},ant0n:{name:"ant0n",id:145224646868860928n},philipbry:{name:"philipbry",id:554994003318276106n},Korbo:{name:"Korbo",id:455856406420258827n},maisymoe:{name:"maisy",id:257109471589957632n}}),oi=(()=>Object.freeze(Object.fromEntries(Object.entries(d).filter(e=>e[1].id!==0n).map(([e,t])=>[t.id,t]))))()});function Mr(e,t){for(let o in t){let r=t[o];typeof r=="object"&&!Array.isArray(r)?(e[o]??={},Mr(e[o],r)):e[o]??=r}return e}function te(...e){return e.filter(Boolean).join(" ")}function On(e){return new Promise(t=>setTimeout(t,e))}function vo(e,t="Copied to clipboard!"){oo.SUPPORTS_COPY?oo.copy(e):t="Your browser does not support copying to clipboard",oe.show({message:t,id:oe.genId(),type:oe.Type.SUCCESS})}function IM(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Vi(e){for(let t in e)if(Object.hasOwn(e,t))return!1;return!0}function jc(e){try{return new URL(e)}catch{return null}}function es(e){return e}var Wc,AM,ts,Pe=g(()=>{"use strict";a();x();I();Wc=e=>{let t=e.getBoundingClientRect(),o=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(t.bottom<0||t.top-o>=0)};AM=navigator.userAgent.includes("Mobi"),ts=e=>Object.hasOwn(oi,e)});function lt(e,t){let o=Object.assign({fallbackValue:null,deps:[],onError:null},t),[r,i]=X({value:o.fallbackValue,error:null,pending:!0});return ue(()=>{let s=!0;return r.pending||i({...r,pending:!0}),e().then(l=>{!s||(i({value:l,error:null,pending:!1}),o.onSuccess?.(l))}).catch(l=>{!s||(i({value:null,error:l,pending:!1}),o.onError?.(l))}),()=>void(s=!1)},o.deps),[r.value,r.error,r.pending]}function Bn(e){let t=Qr(o=>o+1,0);return e?t:t[1]}function os({interval:e=1e3,deps:t=[]}){let[o,r]=X(0),i=St(()=>Date.now(),t);return ue(()=>{let s=setInterval(()=>r(Date.now()-i),e);return()=>{r(0),clearInterval(s)}},t),o}var NM,qc,ut=g(()=>{"use strict";a();x();Pe();Nc();NM=()=>null,qc=(e=!1)=>{let t=_.useRef(null),[o,r]=X(!1);return[s=>{t.current?.disconnect(),t.current=null,s&&(Wc(s)&&(r(!0),e)||(t.current=new IntersectionObserver(l=>{for(let c of l)c.target===s&&(c.isIntersecting&&e?(r(!0),t.current?.disconnect(),t.current=null):r(c.isIntersecting))}),t.current.observe(s)))},o]}});var Qh=g(()=>{});function So(e){return n("div",{...e,className:te(e.className,"vc-error-card")},e.children)}var ni=g(()=>{"use strict";a();Qh();Pe()});var CM,Vh,ey,Kc,U,le=g(()=>{"use strict";a();Je();it();ut();x();ni();CM="#e78284",Vh=new ie("React ErrorBoundary",CM),ey={},Kc=Pt(()=>class extends _.PureComponent{state={error:ey,stack:"",message:""};static getDerivedStateFromError(t){let o=t?.stack??"",r=t?.message||String(t);if(t instanceof Error&&o){let i=o.indexOf(`
  14. `);i!==-1&&(r=o.slice(0,i),o=o.slice(i+1).replace(/https:\/\/\S+\/assets\//g,""))}return{error:t,stack:o,message:r}}componentDidCatch(t,o){this.props.onError?.({error:t,errorInfo:o,props:this.props.wrappedProps}),Vh.error(`A component threw an Error
  15. `,t),Vh.error("Component Stack",o.componentStack)}render(){if(this.state.error===ey)return this.props.children;if(this.props.noop)return null;if(this.props.fallback)return n(this.props.fallback,{children:this.props.children,...this.state});let t=this.props.message||"An error occurred while rendering this Component. More info can be found below and in your console.";return n(So,{style:{overflow:"hidden"}},n("h1",null,"Oh no!"),n("p",null,t),n("code",null,this.state.message,!!this.state.stack&&n("pre",{className:z.top8},this.state.stack)))}});Kc.wrap=(e,t)=>o=>n(Kc,{...t,wrappedProps:o},n(e,{...o}));U=Kc});function Ca(){return n("svg",{"aria-hidden":"true",height:"16",viewBox:"0 0 16 16",width:"16",style:{marginRight:"0.5em",transform:"translateY(2px)"}},n("path",{fill:"#db61a2","fill-rule":"evenodd",d:"M4.25 2.5c-1.336 0-2.75 1.164-2.75 3 0 2.15 1.58 4.144 3.365 5.682A20.565 20.565 0 008 13.393a20.561 20.561 0 003.135-2.211C12.92 9.644 14.5 7.65 14.5 5.5c0-1.836-1.414-3-2.75-3-1.373 0-2.609.986-3.029 2.456a.75.75 0 01-1.442 0C6.859 3.486 5.623 2.5 4.25 2.5zM8 14.25l-.345.666-.002-.001-.006-.003-.018-.01a7.643 7.643 0 01-.31-.17 22.075 22.075 0 01-3.434-2.414C2.045 10.731 0 8.35 0 5.5 0 2.836 2.086 1 4.25 1 5.797 1 7.153 1.802 8 3.02 8.847 1.802 10.203 1 11.75 1 13.914 1 16 2.836 16 5.5c0 2.85-2.045 5.231-3.885 6.818a22.08 22.08 0 01-3.744 2.584l-.018.01-.006.003h-.002L8 14.25zm0 0l.345.666a.752.752 0 01-.69 0L8 14.25z"}))}var Yc=g(()=>{"use strict";a()});function ns(e){return n(C,{...e,look:C.Looks.LINK,color:C.Colors.TRANSPARENT,onClick:()=>VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")},n(Ca,null),"Donate")}var Zc=g(()=>{"use strict";a();x();Yc()});function ce(e){return e.style??={},e.style.display="flex",e.style.gap??="1em",e.style.flexDirection||=e.flexDirection,delete e.flexDirection,n("div",{...e},e.children)}var Ct=g(()=>{"use strict";a()});function rs(e,t){return ka.openModalLazy(e,t)}function Ne(e,t,o){return ka.openModal(e,t,o)}function dn(e,t){return ka.closeModal(e,t)}function Xo(){return ka.closeAllModals()}var Zo,Do,Xc,Oe,tt,Ye,bt,_t,ka,st=g(()=>{"use strict";a();W();ut();Zo=(i=>(i.SMALL="small",i.MEDIUM="medium",i.LARGE="large",i.DYNAMIC="dynamic",i))(Zo||{}),Do=A("ModalRoot","ModalCloseButton"),Xc=un("ImageModal"),Oe=Pt(()=>Do.ModalRoot),tt=Pt(()=>Do.ModalHeader),Ye=Pt(()=>Do.ModalContent),bt=Pt(()=>Do.ModalFooter),_t=Pt(()=>Do.ModalCloseButton),ka=A("openModalLazy")});function y(e){return e}var w=g(()=>{"use strict";a()});async function ty(e=!1){Jc={};let t={};e&&(t.cache="no-cache"),Jc=await fetch("https://badges.vencord.dev/badges.json",t).then(o=>o.json())}var kM,RM,Jc,Qc,oy=g(()=>{"use strict";a();Da();Zc();le();Ct();Yc();I();it();Pe();st();w();x();kM="https://vencord.dev/assets/favicon.png",RM={description:"Vencord Contributor",image:kM,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},shouldShow:({user:e})=>ts(e.id),link:"https://github.com/Vendicated/Vencord"},Jc={};Qc=y({name:"BadgeAPI",description:"API to add badges to users.",authors:[d.Megu,d.Ven,d.TheSun],required:!0,patches:[{find:"Messages.PROFILE_USER_BADGES,role:",replacement:[{match:/&&(\i)\.push\(\{id:"premium".+?\}\);/,replace:"$&$1.unshift(...Vencord.Api.Badges._getBadges(arguments[0]));"},{match:/alt:" ","aria-hidden":!0,src:(?=(\i)\.src)/,replace:"...$1.props,$& $1.image??"},{match:/(?<=text:(\i)\.description,spacing:12,)children:/,replace:"children:$1.component ? () => $self.renderBadgeComponent($1) :"},{match:/href:(\i)\.link/,replace:"...($1.onClick && { onClick: $1.onClick }),$&"}]}],toolboxActions:{async"Refetch Badges"(){await ty(!0),oe.show({id:oe.genId(),message:"Successfully refetched badges!",type:oe.Type.SUCCESS})}},async start(){Vencord.Api.Badges.addBadge(RM),await ty()},renderBadgeComponent:U.wrap(e=>{let t=e.component;return n(t,{...e})},{noop:!0}),getDonorBadges(e){return Jc[e]?.map(t=>({image:t.badge,description:t.tooltip,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},onClick(){let o=Ne(r=>n(U,{noop:!0,onError:()=>{dn(o),VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")}},n(Do.ModalRoot,{...r},n(Do.ModalHeader,null,n(ce,{style:{width:"100%",justifyContent:"center"}},n(S.FormTitle,{tag:"h2",style:{width:"100%",textAlign:"center",margin:0}},n(Ca,null),"Vencord Donor"))),n(Do.ModalContent,null,n(ce,null,n("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533070955872337.png",alt:"",style:{margin:"auto"}}),n("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533090627174460.png",alt:"",style:{margin:"auto"}})),n("div",{style:{padding:"1em"}},n(S.FormText,null,"This Badge is a special perk for Vencord Donors"),n(S.FormText,{className:z.top20},"Please consider supporting the development of Vencord by becoming a donor. It would mean a lot!!"))),n(Do.ModalFooter,null,n(ce,{style:{width:"100%",justifyContent:"center"}},n(ns,null))))))}}))}})});var Vc,ny=g(()=>{"use strict";a();I();w();Vc=y({name:"CommandsAPI",authors:[d.Arjix],description:"Api required by anything that uses commands",patches:[{find:',"tenor"',replacement:[{match:/(?<=\w=)(\w)(\.filter\(.{0,60}tenor)/,replace:"Vencord.Api.Commands._init($1)$2"}]},{find:"Unexpected value for option",replacement:{match:/,(\i)\.execute\((\i),(\i)\)/,replace:(e,t,o,r)=>`,Vencord.Api.Commands._handleCommand(${t}, ${o}, ${r})`}},{find:".source,children",replacement:{match:/(?<=:(.{1,3})\.displayDescription\}.{0,200}\.source,children:)[^}]+/,replace:"$1.plugin||($&)"}}]})});var eu,ry=g(()=>{"use strict";a();I();w();eu=y({name:"ContextMenuAPI",description:"API for adding/removing items to/from context menus.",authors:[d.Nuckyz,d.Ven],required:!0,patches:[{find:"\u266B (\u3064\uFF61\u25D5\u203F\u203F\u25D5\uFF61)\u3064 \u266A",replacement:{match:/let{navId:/,replace:"Vencord.Api.ContextMenu._patchContextMenu(arguments[0]);$&"}},{find:".Menu,{",all:!0,replacement:{match:/Menu,{(?<=\.jsxs?\)\(\i\.Menu,{)/g,replace:"$&contextMenuApiArguments:typeof arguments!=='undefined'?arguments:[],"}}]})});var tu,iy=g(()=>{"use strict";a();I();w();tu=y({name:"MemberListDecoratorsAPI",description:"API to add decorators to member list (both in servers and DMs)",authors:[d.TheSun,d.Ven],patches:[{find:".lostPermission)",replacement:[{match:/let\{[^}]*lostPermissionTooltipText:\i[^}]*\}=(\i),/,replace:"$&vencordProps=$1,"},{match:/decorators:.{0,100}?children:\[/,replace:"$&...(typeof vencordProps=='undefined'?[]:Vencord.Api.MemberListDecorators.__getDecorators(vencordProps)),"}]},{find:"PrivateChannel.renderAvatar",replacement:{match:/decorators:(\i\.isSystemDM\(\))\?(.+?):null/,replace:"decorators:[...Vencord.Api.MemberListDecorators.__getDecorators(arguments[0]), $1?$2:null]"}}]})});var ou,sy=g(()=>{"use strict";a();I();w();ou=y({name:"MessageAccessoriesAPI",description:"API to add message accessories.",authors:[d.Cyn],patches:[{find:".Messages.REMOVE_ATTACHMENT_BODY",replacement:{match:/(?<=.container\)?,children:)(\[.+?\])/,replace:"Vencord.Api.MessageAccessories._modifyAccessories($1,this.props)"}}]})});var nu,ay=g(()=>{"use strict";a();I();w();nu=y({name:"MessageDecorationsAPI",description:"API to add decorations to messages",authors:[d.TheSun],patches:[{find:'"Message Username"',replacement:{match:/\.Messages\.GUILD_COMMUNICATION_DISABLED_BOTTOM_SHEET_TITLE.+?}\),\i(?=\])/,replace:"$&,...Vencord.Api.MessageDecorations.__addDecorationsToMessage(arguments[0])"}}]})});var ru,ly=g(()=>{"use strict";a();I();w();ru=y({name:"MessageEventsAPI",description:"Api required by anything using message events.",authors:[d.Arjix,d.hunt,d.Ven],patches:[{find:'"MessageActionCreators"',replacement:{match:/async editMessage\(.+?\)\{/,replace:"$&await Vencord.Api.MessageEvents._handlePreEdit(...arguments);"}},{find:".handleSendMessage=",replacement:{match:/(type:this\.props\.chatInputType.+?\.then\()(\i=>\{.+?let (\i)=\i\.\i\.parse\((\i),.+?let (\i)=\i\.\i\.getSendMessageOptionsForReply\(\i\);)(?<=\)\(({.+?})\)\.then.+?)/,replace:(e,t,o,r,i,s,l)=>`${t}async ${o}if(await Vencord.Api.MessageEvents._handlePreSend(${i}.id,${r},${l},${s}))return{shoudClear:true,shouldRefocus:true};`}},{find:'("interactionUsernameProfile',replacement:{match:/let\{id:\i}=(\i),{id:\i}=(\i);return \i\.useCallback\((\i)=>\{/,replace:(e,t,o,r)=>`const vcMsg=${t},vcChan=${o};${e}Vencord.Api.MessageEvents._handleClick(vcMsg, vcChan, ${r});`}}]})});var iu,cy=g(()=>{"use strict";a();I();w();iu=y({name:"MessagePopoverAPI",description:"API to add buttons to message popovers.",authors:[d.KingFish,d.Ven,d.Nuckyz],patches:[{find:"Messages.MESSAGE_UTILITIES_A11Y_LABEL",replacement:{match:/\i&&!\i\?\(0,\i\.jsxs?\)\(.{0,200}renderEmojiPicker:.{0,500}\?(\i)\(\{key:"reply-other"/,replace:(e,t)=>{let o=e.match(/message:(.{1,3}),/)?.[1];if(!o)throw new Error("Could not find message variable");return`...Vencord.Api.MessagePopover._buildPopoverElements(${o},${t}),${e}`}}}]})});var su,uy=g(()=>{"use strict";a();I();w();su=y({name:"NoticesAPI",description:"Fixes notices being automatically dismissed",authors:[d.Ven],required:!0,patches:[{find:'displayName="NoticeStore"',replacement:[{match:/\i=null;(?=.{0,80}getPremiumSubscription\(\))/g,replace:"if(Vencord.Api.Notices.currentNotice)return false;$&"},{match:/(?<=,NOTICE_DISMISS:function\(\i\){)return null!=(\i)/,replace:'if($1.id=="VencordNotice")return($1=null,Vencord.Api.Notices.nextNotice(),true);$&'}]}]})});var au,py=g(()=>{"use strict";a();I();w();au=y({name:"ServerListAPI",authors:[d.kemo],description:"Api required for plugins that modify the server list",patches:[{find:"Messages.DISCODO_DISABLED",replacement:{match:/(?<=Messages\.DISCODO_DISABLED.+?return)(\(.{0,75}?tutorialContainer.+?}\))(?=}function)/,replace:"[$1].concat(Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.Above))"}},{find:"Messages.SERVERS,children",replacement:{match:/(?<=Messages\.SERVERS,children:).+?default:return null\}\}\)/,replace:"Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.In).concat($&)"}}]})});var lu,dy=g(()=>{"use strict";a();I();w();lu=y({name:"NoTrack",description:"Disable Discord's tracking ('science'), metrics and Sentry crash reporting",authors:[d.Cyn,d.Ven,d.Nuckyz,d.Arrow],required:!0,patches:[{find:"AnalyticsActionHandlers.handle",replacement:{match:/^.+$/,replace:"()=>{}"}},{find:"window.DiscordSentry=",replacement:{match:/^.+$/,replace:"()=>{}"}},{find:".METRICS,",replacement:[{match:/this\._intervalId=/,replace:"this._intervalId=undefined&&"},{match:/(increment\(\i\){)/,replace:"$1return;"}]},{find:".installedLogHooks)",replacement:{match:"getDebugLogging(){",replace:"getDebugLogging(){return false;"}}]})});var uu={};ze(uu,{_patchContextMenu:()=>EM,addContextMenuPatch:()=>de,addGlobalContextMenuPatch:()=>DM,findGroupChildrenByChildId:()=>ft,globalPatches:()=>La,navPatches:()=>is,removeContextMenuPatch:()=>ge,removeGlobalContextMenuPatch:()=>LM});function de(e,t){Array.isArray(e)||(e=[e]);for(let o of e){let r=is.get(o);r||(r=new Set,is.set(o,r)),r.add(t)}}function DM(e){La.add(e)}function ge(e,t){let r=(Array.isArray(e)?e:[e]).map(i=>is.get(i)?.delete(t)??!1);return Array.isArray(e)?r:r[0]}function LM(e){return La.delete(e)}function ft(e,t,o){for(let r of t){if(r==null)continue;if(Array.isArray(e)&&e.some(s=>r.props?.id===s)||r.props?.id===e)return o??null;let i=r.props?.children;if(i){Array.isArray(i)||(i=[i],r.props.children=i);let s=ft(e,i,i);if(s!==null)return s}}return null}function EM(e){e.contextMenuApiArguments??=[];let t=is.get(e.navId);if(Array.isArray(e.children)||(e.children=[e.children]),t)for(let o of t)try{let r=o(e.children,...e.contextMenuApiArguments);cu.has(e)||r?.()}catch(r){my.error(`Patch for ${e.navId} errored,`,r)}for(let o of La)try{let r=o(e.navId,e.children,...e.contextMenuApiArguments);cu.has(e)||r?.()}catch(r){my.error("Global patch errored,",r)}cu.add(e)}var my,is,La,cu,kt=g(()=>{"use strict";a();Je();my=new ie("ContextMenu"),is=new Map,La=new Set;cu=new WeakSet});function no(e,t=300){let o;return function(...r){clearTimeout(o),o=setTimeout(()=>{e(...r)},t)}}var Pr=g(()=>{"use strict";a()});var Ir,Ea=g(()=>{"use strict";a();({localStorage:Ir}=window)});var Lo,ri=g(()=>{"use strict";a();Lo=class{constructor(t=1/0){this.maxSize=t}queue=[];promise;next(){let t=this.queue.shift();t?this.promise=Promise.resolve().then(t).finally(()=>this.next()):this.promise=void 0}run(){this.promise||this.next()}push(t){this.size>=this.maxSize&&this.queue.shift(),this.queue.push(t),this.run()}unshift(t){this.size>=this.maxSize&&this.queue.pop(),this.queue.unshift(t),this.run()}get size(){return this.queue.length}}});var fy=g(()=>{});var _a,pu=g(()=>{"use strict";a();fy();$();le();Pe();x();_a=U.wrap(function({title:t,body:o,richBody:r,color:i,icon:s,onClick:l,onClose:c,image:u,permanent:p,className:m,dismissOnClick:h}){let{timeout:v,position:T}=pt(["notifications.timeout","notifications.position"]).notifications,N=Ke([Zi],()=>Zi.isFocused()),[b,P]=X(!1),[k,M]=X(0),O=St(()=>Date.now(),[v,b,N]);ue(()=>{if(b||!N||v===0||p)return void M(0);let Z=setInterval(()=>{let K=Date.now()-O;K>=v?c():M(K)},10);return()=>clearInterval(Z)},[v,b,N]);let H=k/v;return n("button",{className:te("vc-notification-root",m),style:T==="bottom-right"?{bottom:"1rem"}:{top:"3rem"},onClick:()=>{l?.(),h!==!1&&c()},onContextMenu:Z=>{Z.preventDefault(),Z.stopPropagation(),c()},onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1)},n("div",{className:"vc-notification"},s&&n("img",{className:"vc-notification-icon",src:s,alt:""}),n("div",{className:"vc-notification-content"},n("div",{className:"vc-notification-header"},n("h2",{className:"vc-notification-title"},t),n("button",{className:"vc-notification-close-btn",onClick:Z=>{Z.preventDefault(),Z.stopPropagation(),c()}},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24",role:"img","aria-labelledby":"vc-notification-dismiss-title"},n("title",{id:"vc-notification-dismiss-title"},"Dismiss Notification"),n("path",{fill:"currentColor",d:"M18.4 4L12 10.4L5.6 4L4 5.6L10.4 12L4 18.4L5.6 20L12 13.6L18.4 20L20 18.4L13.6 12L20 5.6L18.4 4Z"})))),n("div",null,r??n("p",{className:"vc-notification-p"},o)))),u&&n("img",{className:"vc-notification-img",src:u,alt:""}),v!==0&&!p&&n("div",{className:"vc-notification-progressbar",style:{width:`${(1-H)*100}%`,backgroundColor:i||"var(--brand-experiment)"}}))},{onError:({props:e})=>e.onClose()})});var mn={};ze(mn,{clear:()=>FM,createStore:()=>gy,del:()=>mu,delMany:()=>BM,entries:()=>GM,get:()=>Rt,getMany:()=>OM,keys:()=>UM,promisifyRequest:()=>zt,set:()=>ro,setMany:()=>_M,update:()=>Ar,values:()=>$M});function zt(e){return new Promise((t,o)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>o(e.error)})}function gy(e,t){let o=indexedDB.open(e);o.onupgradeneeded=()=>o.result.createObjectStore(t);let r=zt(o);return(i,s)=>r.then(l=>s(l.transaction(t,i).objectStore(t)))}function Eo(){return du||(du=gy("VencordData","VencordStore")),du}function Rt(e,t=Eo()){return t("readonly",o=>zt(o.get(e)))}function ro(e,t,o=Eo()){return o("readwrite",r=>(r.put(t,e),zt(r.transaction)))}function _M(e,t=Eo()){return t("readwrite",o=>(e.forEach(r=>o.put(r[1],r[0])),zt(o.transaction)))}function OM(e,t=Eo()){return t("readonly",o=>Promise.all(e.map(r=>zt(o.get(r)))))}function Ar(e,t,o=Eo()){return o("readwrite",r=>new Promise((i,s)=>{r.get(e).onsuccess=function(){try{r.put(t(this.result),e),i(zt(r.transaction))}catch(l){s(l)}}}))}function mu(e,t=Eo()){return t("readwrite",o=>(o.delete(e),zt(o.transaction)))}function BM(e,t=Eo()){return t("readwrite",o=>(e.forEach(r=>o.delete(r)),zt(o.transaction)))}function FM(e=Eo()){return e("readwrite",t=>(t.clear(),zt(t.transaction)))}function fu(e,t){return e.openCursor().onsuccess=function(){!this.result||(t(this.result),this.result.continue())},zt(e.transaction)}function UM(e=Eo()){return e("readonly",t=>{if(t.getAllKeys)return zt(t.getAllKeys());let o=[];return fu(t,r=>o.push(r.key)).then(()=>o)})}function $M(e=Eo()){return e("readonly",t=>{if(t.getAll)return zt(t.getAll());let o=[];return fu(t,r=>o.push(r.value)).then(()=>o)})}function GM(e=Eo()){return e("readonly",t=>{if(t.getAll&&t.getAllKeys)return Promise.all([zt(t.getAllKeys()),zt(t.getAll())]).then(([r,i])=>r.map((s,l)=>[s,i[l]]));let o=[];return e("readonly",r=>fu(r,i=>o.push([i.key,i.value])).then(()=>o))})}var du,Jo=g(()=>{"use strict";a();});var yu={};ze(yu,{classNameFactory:()=>Be,classNameToSelector:()=>yy,compileStyle:()=>hu,disableStyle:()=>jt,enableStyle:()=>Tt,isStyleEnabled:()=>gu,requireStyle:()=>ss,setStyleClassNames:()=>zM,styleMap:()=>hy,toggleStyle:()=>HM});function ss(e){let t=hy.get(e);if(!t)throw new Error(`Style "${e}" does not exist`);return t}function Tt(e){let t=ss(e);return t.dom?.isConnected?!1:(t.dom||(t.dom=document.createElement("style"),t.dom.dataset.vencordName=t.name),hu(t),document.head.appendChild(t.dom),!0)}function jt(e){let t=ss(e);return t.dom?.isConnected?(t.dom.remove(),t.dom=null,!0):!1}var hy,HM,gu,zM,hu,yy,Be,ot=g(()=>{"use strict";a();hy=window.VencordStyles??=new Map;HM=e=>gu(e)?jt(e):Tt(e),gu=e=>ss(e).dom?.isConnected??!1,zM=(e,t,o=!0)=>{let r=ss(e);r.classNames=t,o&&gu(r.name)&&hu(r)},hu=e=>{if(!e.dom)throw new Error("Style has no DOM element");e.dom.textContent=e.source.replace(/\[--(\w+)\]/g,(t,o)=>{let r=e.classNames[o];return r?yy(r):t})},yy=(e,t="")=>e.split(" ").map(o=>`.${t}${o}`).join(""),Be=(e="")=>(...t)=>{let o=new Set;for(let r of t)r&&typeof r=="string"?o.add(r):Array.isArray(r)?r.forEach(i=>o.add(i)):r&&typeof r=="object"&&Object.entries(r).forEach(([i,s])=>s&&o.add(i));return Array.from(o,r=>e+r).join(" ")}});var vy,Sy=g(()=>{a();vy=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,o)=>(o&=63,o<36?t+=o.toString(36):o<62?t+=(o-26).toString(36).toUpperCase():o>62?t+="-":t+="_",t),"")});async function Ty(e){if(e.noPersist)return;let t=E.notifications.logLimit;t!==0&&(await Ar(Oa,o=>{let r=o??[],{onClick:i,onClose:s,richBody:l,permanent:c,noPersist:u,dismissOnClick:p,...m}=e;return r.unshift({...m,timestamp:Date.now(),id:vy()}),r.length>t&&t!==200&&(r.length=t),r}),as.forEach(o=>o()))}async function jM(e){let t=await by(),o=t.findIndex(r=>r.timestamp===e);o!==-1&&(t.splice(o,1),await ro(Oa,t),as.forEach(r=>r()))}function WM(){let[e,t]=Qr(s=>s+1,0);ue(()=>(as.add(t),()=>void as.delete(t)),[]);let[o,r,i]=lt(by,{fallbackValue:[],deps:[e]});return[o,i]}function qM({data:e}){let[t,o]=X(!1),r=_.useRef(null);return ue(()=>{let i=r.current,s=()=>{if(i.clientHeight===0)return requestAnimationFrame(s);i.style.height=`${i.clientHeight}px`};s()},[]),n("div",{className:ii("wrapper",{removing:t}),ref:r},n(_a,{...e,permanent:!0,dismissOnClick:!1,onClose:()=>{t||(o(!0),setTimeout(()=>jM(e.timestamp),200))},richBody:n("div",{className:ii("body")},e.body,n(Wo,{timestamp:yo(e.timestamp),className:ii("timestamp")}))}))}function KM({log:e,pending:t}){return!e.length&&!t?n("div",{className:ii("container")},n("div",{className:ii("empty")}),n(S.FormText,{style:{textAlign:"center"}},"No notifications yet")):n("div",{className:ii("container")},e.map(o=>n(qM,{data:o,key:o.id})))}function YM({modalProps:e,close:t}){let[o,r]=WM();return n(Oe,{...e,size:"large"},n(tt,null,n(Q,{variant:"heading-lg/semibold",style:{flexGrow:1}},"Notification Log"),n(_t,{onClick:t})),n(Ye,null,n(KM,{log:o,pending:r})),n(bt,null,n(C,{disabled:o.length===0,onClick:()=>{Et.show({title:"Are you sure?",body:`This will permanently remove ${o.length} notification${o.length===1?"":"s"}. This action cannot be undone.`,async onConfirm(){await ro(Oa,[]),as.forEach(i=>i())},confirmText:"Do it!",confirmColor:"vc-notification-log-danger-btn",cancelText:"Nevermind"})}},"Clear Notification Log")))}function Ba(){let e=Ne(t=>n(YM,{modalProps:t,close:()=>dn(e)}))}var Oa,by,ii,as,Fa=g(()=>{"use strict";a();Jo();$();ot();st();ut();x();Sy();pu();Oa="notification-log",by=async()=>await Rt(Oa)??[],ii=Be("vc-notification-log-"),as=new Set});function JM(){if(!vu){let e=document.createElement("div");e.id="vc-notification-container",document.body.append(e),vu=vr.createRoot(e)}return vu}function QM(e,t){let o=JM();return new Promise(r=>{o.render(n(_a,{key:t,...e,onClose:()=>{e.onClose?.(),o.render(null),r()}}))})}function VM(){if(typeof Notification>"u")return!1;let{useNative:e}=E.notifications;return e==="always"?!0:e==="not-focused"?!document.hasFocus():!1}async function xy(){return Notification.permission==="granted"||Notification.permission!=="denied"&&await Notification.requestPermission()==="granted"}async function ke(e){if(Ty(e),VM()&&await xy()){let{title:t,body:o,icon:r,image:i,onClick:s=null,onClose:l=null}=e,c=new Notification(t,{body:o,icon:r,image:i});c.onclick=s,c.onclose=l}else ZM.push(()=>QM(e,XM++))}var ZM,vu,XM,wy=g(()=>{"use strict";a();$();ri();x();pu();Fa();ZM=new Lo,XM=42});var Su={};ze(Su,{requestPermission:()=>xy,showNotification:()=>ke});var Fn=g(()=>{"use strict";a();wy()});function Dy(e,t){return cP(e,t||{},0,0)}function Ly(e,t){return sP(e,t)}var Wt,io,Ua,$a,Ga,wu,Ay,Ny,Cy,Mu,ky,eP,My,Pu,fn,Fe,Qo,$n,Fe,Fe,Fe,Fe,us,Fe,tP,oP,nP,rP,bu,_o,Tu,Nu,Ry,iP,Un,sP,gn,ls,xu,Iu,Py,cs,Au,Iy,aP,Cu,lP,cP,uP,pP,Ey=g(()=>{a();Wt=Uint8Array,io=Uint16Array,Ua=Uint32Array,$a=new Wt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Ga=new Wt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),wu=new Wt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ay=function(e,t){for(var o=new io(31),r=0;r<31;++r)o[r]=t+=1<<e[r-1];for(var i=new Ua(o[30]),r=1;r<30;++r)for(var s=o[r];s<o[r+1];++s)i[s]=s-o[r]<<5|r;return[o,i]},Ny=Ay($a,2),Cy=Ny[0],Mu=Ny[1];Cy[28]=258,Mu[258]=28;ky=Ay(Ga,0),eP=ky[0],My=ky[1],Pu=new io(32768);for(Fe=0;Fe<32768;++Fe)fn=(Fe&43690)>>>1|(Fe&21845)<<1,fn=(fn&52428)>>>2|(fn&13107)<<2,fn=(fn&61680)>>>4|(fn&3855)<<4,Pu[Fe]=((fn&65280)>>>8|(fn&255)<<8)>>>1;Qo=function(e,t,o){for(var r=e.length,i=0,s=new io(t);i<r;++i)e[i]&&++s[e[i]-1];var l=new io(t);for(i=0;i<t;++i)l[i]=l[i-1]+s[i-1]<<1;var c;if(o){c=new io(1<<t);var u=15-t;for(i=0;i<r;++i)if(e[i])for(var p=i<<4|e[i],m=t-e[i],h=l[e[i]-1]++<<m,v=h|(1<<m)-1;h<=v;++h)c[Pu[h]>>>u]=p}else for(c=new io(r),i=0;i<r;++i)e[i]&&(c[i]=Pu[l[e[i]-1]++]>>>15-e[i]);return c},$n=new Wt(288);for(Fe=0;Fe<144;++Fe)$n[Fe]=8;for(Fe=144;Fe<256;++Fe)$n[Fe]=9;for(Fe=256;Fe<280;++Fe)$n[Fe]=7;for(Fe=280;Fe<288;++Fe)$n[Fe]=8;us=new Wt(32);for(Fe=0;Fe<32;++Fe)us[Fe]=5;tP=Qo($n,9,0),oP=Qo($n,9,1),nP=Qo(us,5,0),rP=Qo(us,5,1),bu=function(e){for(var t=e[0],o=1;o<e.length;++o)e[o]>t&&(t=e[o]);return t},_o=function(e,t,o){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&o},Tu=function(e,t){var o=t/8|0;return(e[o]|e[o+1]<<8|e[o+2]<<16)>>(t&7)},Nu=function(e){return(e+7)/8|0},Ry=function(e,t,o){(t==null||t<0)&&(t=0),(o==null||o>e.length)&&(o=e.length);var r=new(e.BYTES_PER_ELEMENT==2?io:e.BYTES_PER_ELEMENT==4?Ua:Wt)(o-t);return r.set(e.subarray(t,o)),r},iP=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Un=function(e,t,o){var r=new Error(t||iP[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,Un),!o)throw r;return r},sP=function(e,t,o){var r=e.length;if(!r||o&&o.f&&!o.l)return t||new Wt(0);var i=!t||o,s=!o||o.i;o||(o={}),t||(t=new Wt(r*3));var l=function(pr){var Rn=t.length;if(pr>Rn){var Dn=new Wt(Math.max(Rn*2,pr));Dn.set(t),t=Dn}},c=o.f||0,u=o.p||0,p=o.b||0,m=o.l,h=o.d,v=o.m,T=o.n,N=r*8;do{if(!m){c=_o(e,u,1);var b=_o(e,u+1,3);if(u+=3,b)if(b==1)m=oP,h=rP,v=9,T=5;else if(b==2){var O=_o(e,u,31)+257,H=_o(e,u+10,15)+4,Z=O+_o(e,u+5,31)+1;u+=14;for(var K=new Wt(Z),q=new Wt(19),D=0;D<H;++D)q[wu[D]]=_o(e,u+D*3,7);u+=H*3;for(var V=bu(q),re=(1<<V)-1,xe=Qo(q,V,1),D=0;D<Z;){var ae=xe[_o(e,u,re)];u+=ae&15;var P=ae>>>4;if(P<16)K[D++]=P;else{var Re=0,he=0;for(P==16?(he=3+_o(e,u,3),u+=2,Re=K[D-1]):P==17?(he=3+_o(e,u,7),u+=3):P==18&&(he=11+_o(e,u,127),u+=7);he--;)K[D++]=Re}}var Se=K.subarray(0,O),Ie=K.subarray(O);v=bu(Se),T=bu(Ie),m=Qo(Se,v,1),h=Qo(Ie,T,1)}else Un(1);else{var P=Nu(u)+4,k=e[P-4]|e[P-3]<<8,M=P+k;if(M>r){s&&Un(0);break}i&&l(p+k),t.set(e.subarray(P,M),p),o.b=p+=k,o.p=u=M*8,o.f=c;continue}if(u>N){s&&Un(0);break}}i&&l(p+131072);for(var Ce=(1<<v)-1,be=(1<<T)-1,fe=u;;fe=u){var Re=m[Tu(e,u)&Ce],ht=Re>>>4;if(u+=Re&15,u>N){s&&Un(0);break}if(Re||Un(2),ht<256)t[p++]=ht;else if(ht==256){fe=u,m=null;break}else{var Ve=ht-254;if(ht>264){var D=ht-257,De=$a[D];Ve=_o(e,u,(1<<De)-1)+Cy[D],u+=De}var Jt=h[Tu(e,u)&be],wt=Jt>>>4;Jt||Un(3),u+=Jt&15;var Ie=eP[wt];if(wt>3){var De=Ga[wt];Ie+=Tu(e,u)&(1<<De)-1,u+=De}if(u>N){s&&Un(0);break}i&&l(p+131072);for(var yt=p+Ve;p<yt;p+=4)t[p]=t[p-Ie],t[p+1]=t[p+1-Ie],t[p+2]=t[p+2-Ie],t[p+3]=t[p+3-Ie];p=yt}}o.l=m,o.p=fe,o.b=p,o.f=c,m&&(c=1,o.m=v,o.d=h,o.n=T)}while(!c);return p==t.length?t:Ry(t,0,p)},gn=function(e,t,o){o<<=t&7;var r=t/8|0;e[r]|=o,e[r+1]|=o>>>8},ls=function(e,t,o){o<<=t&7;var r=t/8|0;e[r]|=o,e[r+1]|=o>>>8,e[r+2]|=o>>>16},xu=function(e,t){for(var o=[],r=0;r<e.length;++r)e[r]&&o.push({s:r,f:e[r]});var i=o.length,s=o.slice();if(!i)return[Cu,0];if(i==1){var l=new Wt(o[0].s+1);return l[o[0].s]=1,[l,1]}o.sort(function(Z,K){return Z.f-K.f}),o.push({s:-1,f:25001});var c=o[0],u=o[1],p=0,m=1,h=2;for(o[0]={s:-1,f:c.f+u.f,l:c,r:u};m!=i-1;)c=o[o[p].f<o[h].f?p++:h++],u=o[p!=m&&o[p].f<o[h].f?p++:h++],o[m++]={s:-1,f:c.f+u.f,l:c,r:u};for(var v=s[0].s,r=1;r<i;++r)s[r].s>v&&(v=s[r].s);var T=new io(v+1),N=Iu(o[m-1],T,0);if(N>t){var r=0,b=0,P=N-t,k=1<<P;for(s.sort(function(K,q){return T[q.s]-T[K.s]||K.f-q.f});r<i;++r){var M=s[r].s;if(T[M]>t)b+=k-(1<<N-T[M]),T[M]=t;else break}for(b>>>=P;b>0;){var O=s[r].s;T[O]<t?b-=1<<t-T[O]++-1:++r}for(;r>=0&&b;--r){var H=s[r].s;T[H]==t&&(--T[H],++b)}N=t}return[new Wt(T),N]},Iu=function(e,t,o){return e.s==-1?Math.max(Iu(e.l,t,o+1),Iu(e.r,t,o+1)):t[e.s]=o},Py=function(e){for(var t=e.length;t&&!e[--t];);for(var o=new io(++t),r=0,i=e[0],s=1,l=function(u){o[r++]=u},c=1;c<=t;++c)if(e[c]==i&&c!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)l(32754);s>2&&(l(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(l(i),--s;s>6;s-=6)l(8304);s>2&&(l(s-3<<5|8208),s=0)}for(;s--;)l(i);s=1,i=e[c]}return[o.subarray(0,r),t]},cs=function(e,t){for(var o=0,r=0;r<t.length;++r)o+=e[r]*t[r];return o},Au=function(e,t,o){var r=o.length,i=Nu(t+2);e[i]=r&255,e[i+1]=r>>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var s=0;s<r;++s)e[i+s+4]=o[s];return(i+4+r)*8},Iy=function(e,t,o,r,i,s,l,c,u,p,m){gn(t,m++,o),++i[256];for(var h=xu(i,15),v=h[0],T=h[1],N=xu(s,15),b=N[0],P=N[1],k=Py(v),M=k[0],O=k[1],H=Py(b),Z=H[0],K=H[1],q=new io(19),D=0;D<M.length;++D)q[M[D]&31]++;for(var D=0;D<Z.length;++D)q[Z[D]&31]++;for(var V=xu(q,7),re=V[0],xe=V[1],ae=19;ae>4&&!re[wu[ae-1]];--ae);var Re=p+5<<3,he=cs(i,$n)+cs(s,us)+l,Se=cs(i,v)+cs(s,b)+l+14+3*ae+cs(q,re)+(2*q[16]+3*q[17]+7*q[18]);if(Re<=he&&Re<=Se)return Au(t,m,e.subarray(u,u+p));var Ie,Ce,be,fe;if(gn(t,m,1+(Se<he)),m+=2,Se<he){Ie=Qo(v,T,0),Ce=v,be=Qo(b,P,0),fe=b;var ht=Qo(re,xe,0);gn(t,m,O-257),gn(t,m+5,K-1),gn(t,m+10,ae-4),m+=14;for(var D=0;D<ae;++D)gn(t,m+3*D,re[wu[D]]);m+=3*ae;for(var Ve=[M,Z],De=0;De<2;++De)for(var Jt=Ve[De],D=0;D<Jt.length;++D){var wt=Jt[D]&31;gn(t,m,ht[wt]),m+=re[wt],wt>15&&(gn(t,m,Jt[D]>>>5&127),m+=Jt[D]>>>12)}}else Ie=tP,Ce=$n,be=nP,fe=us;for(var D=0;D<c;++D)if(r[D]>255){var wt=r[D]>>>18&31;ls(t,m,Ie[wt+257]),m+=Ce[wt+257],wt>7&&(gn(t,m,r[D]>>>23&31),m+=$a[wt]);var yt=r[D]&31;ls(t,m,be[yt]),m+=fe[yt],yt>3&&(ls(t,m,r[D]>>>5&8191),m+=Ga[yt])}else ls(t,m,Ie[r[D]]),m+=Ce[r[D]];return ls(t,m,Ie[256]),m+Ce[256]},aP=new Ua([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Cu=new Wt(0),lP=function(e,t,o,r,i,s){var l=e.length,c=new Wt(r+l+5*(1+Math.ceil(l/7e3))+i),u=c.subarray(r,c.length-i),p=0;if(!t||l<8)for(var m=0;m<=l;m+=65535){var h=m+65535;h>=l&&(u[p>>3]=s),p=Au(u,p+1,e.subarray(m,h))}else{for(var v=aP[t-1],T=v>>>13,N=v&8191,b=(1<<o)-1,P=new io(32768),k=new io(b+1),M=Math.ceil(o/3),O=2*M,H=function(se){return(e[se]^e[se+1]<<M^e[se+2]<<O)&b},Z=new Ua(25e3),K=new io(288),q=new io(32),D=0,V=0,m=0,re=0,xe=0,ae=0;m<l;++m){var Re=H(m),he=m&32767,Se=k[Re];if(P[he]=Se,k[Re]=he,xe<=m){var Ie=l-m;if((D>7e3||re>24576)&&Ie>423){p=Iy(e,u,0,Z,K,q,V,re,ae,m-ae,p),re=D=V=0,ae=m;for(var Ce=0;Ce<286;++Ce)K[Ce]=0;for(var Ce=0;Ce<30;++Ce)q[Ce]=0}var be=2,fe=0,ht=N,Ve=he-Se&32767;if(Ie>2&&Re==H(m-Ve))for(var De=Math.min(T,Ie)-1,Jt=Math.min(32767,m),wt=Math.min(258,Ie);Ve<=Jt&&--ht&&he!=Se;){if(e[m+be]==e[m+be-Ve]){for(var yt=0;yt<wt&&e[m+yt]==e[m+yt-Ve];++yt);if(yt>be){if(be=yt,fe=Ve,yt>De)break;for(var pr=Math.min(Ve,yt-2),Rn=0,Ce=0;Ce<pr;++Ce){var Dn=m-Ve+Ce+32768&32767,dr=P[Dn],Bt=Dn-dr+32768&32767;Bt>Rn&&(Rn=Bt,Se=Dn)}}}he=Se,Se=P[he],Ve+=he-Se+32768&32767}if(fe){Z[re++]=268435456|Mu[be]<<18|My[fe];var mr=Mu[be]&31,R=My[fe]&31;V+=$a[mr]+Ga[R],++K[257+mr],++q[R],xe=m+be,++D}else Z[re++]=e[m],++K[e[m]]}}p=Iy(e,u,s,Z,K,q,V,re,ae,m-ae,p),!s&&p&7&&(p=Au(u,p+1,Cu))}return Ry(c,0,r+Nu(p)+i)},cP=function(e,t,o,r,i){return lP(e,t.level==null?6:t.level,t.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):12+t.mem,o,r,!i)};uP=typeof TextDecoder<"u"&&new TextDecoder,pP=0;try{uP.decode(Cu,{stream:!0}),pP=1}catch{}});async function _y(){let e=await Rt("Vencord_cloudSecret")??{},t=ku();return e[t]?(await Ar("Vencord_cloudSecret",o=>(o??={},o[`${t}:${ps()}`]=o[t],delete o[t],o)),e[t]):e[`${t}:${ps()}`]}async function dP(e){await Ar("Vencord_cloudSecret",t=>(t??={},t[`${ku()}:${ps()}`]=e,t))}async function Ru(){await Ar("Vencord_cloudSecret",e=>(e??={},delete e[`${ku()}:${ps()}`],e))}async function Oy(){if(await _y()!==void 0){E.cloud.authenticated=!0;return}try{let o=await fetch(new URL("/v1/oauth/settings",Gn()));var{clientId:e,redirectUri:t}=await o.json()}catch{ke({title:"Cloud Integration",body:"Setup failed (couldn't retrieve OAuth configuration)."}),E.cloud.authenticated=!1;return}Ne(o=>n(Ki,{...o,scopes:["identify"],responseType:"code",redirectUri:t,permissions:0n,clientId:e,cancelCompletesFlow:!1,callback:async({location:r})=>{if(!r){E.cloud.authenticated=!1;return}try{let i=await fetch(r,{headers:new Headers({Accept:"application/json"})}),{secret:s}=await i.json();s?(Ha.info("Authorized with secret"),await dP(s),ke({title:"Cloud Integration",body:"Cloud integrations enabled!"}),E.cloud.authenticated=!0):(ke({title:"Cloud Integration",body:"Setup failed (no secret returned?)."}),E.cloud.authenticated=!1)}catch(i){Ha.error("Failed to authorize",i),ke({title:"Cloud Integration",body:`Setup failed (${i.toString()}).`}),E.cloud.authenticated=!1}}}))}async function si(){let e=await _y();return window.btoa(`${e}:${ps()}`)}var Ha,Gn,ku,ps,Du=g(()=>{"use strict";a();Jo();Fn();$();x();Je();st();Ha=new ie("Cloud","#39b7e0"),Gn=()=>new URL(E.cloud.url),ku=()=>Gn().origin,ps=()=>{let e=F.getCurrentUser()?.id;if(!e)throw new Error("User not yet logged in");return e}});function mo(){window.DiscordNative.app.relaunch()}function za(e){window.DiscordNative.fileManager.showItemInFolder(e)}var Hn=g(()=>{"use strict";a()});function By(e){return new Promise(t=>{let o=document.createElement("input");o.type="file",o.style.display="none",o.accept=e,o.onchange=async()=>{t(o.files?.[0]??null)},document.body.appendChild(o),o.click(),setImmediate(()=>document.body.removeChild(o))})}var Lu=g(()=>{"use strict";a()});async function Fy(e){try{var t=JSON.parse(e)}catch(o){throw console.log(e),new Error("Failed to parse JSON: "+String(o))}if("settings"in t&&"quickCss"in t)Object.assign(Vo,t.settings),await VencordNative.settings.set(JSON.stringify(t.settings,null,4)),await VencordNative.quickCss.set(t.quickCss);else throw new Error("Invalid Settings. Is this even a Vencord Settings file?")}async function Uy({minify:e}={}){let t=JSON.parse(VencordNative.settings.get()),o=await VencordNative.quickCss.get();return JSON.stringify({settings:t,quickCss:o},null,e?void 0:4)}async function $y(){let e="vencord-settings-backup.json",t=await Uy(),o=new TextEncoder().encode(t);DiscordNative.fileManager.saveWithDialog(o,e)}async function Hy(e=!0){{let[t]=await DiscordNative.fileManager.openFiles({filters:[{name:"Vencord Settings Backup",extensions:["json"]},{name:"all",extensions:["*"]}]});if(t)try{await Fy(new TextDecoder().decode(t.data)),e&&mP()}catch(o){new ie("SettingsSync").error(o),e&&fP(o)}}}async function ai(e){let t=await Uy({minify:!0});try{let o=await fetch(new URL("/v1/settings",Gn()),{method:"PUT",headers:new Headers({Authorization:await si(),"Content-Type":"application/octet-stream"}),body:Dy(new TextEncoder().encode(t))});if(!o.ok){Oo.error(`Failed to sync up, API returned ${o.status}`),ke({title:"Cloud Settings",body:`Could not synchronize settings to cloud (API returned ${o.status}).`,color:"var(--red-360)"});return}let{written:r}=await o.json();Vo.cloud.settingsSyncVersion=r,VencordNative.settings.set(JSON.stringify(Vo,null,4)),Oo.info("Settings uploaded to cloud successfully"),e&&ke({title:"Cloud Settings",body:"Synchronized settings to the cloud!",noPersist:!0})}catch(o){Oo.error("Failed to sync up",o),ke({title:"Cloud Settings",body:`Could not synchronize settings to the cloud (${o.toString()}).`,color:"var(--red-360)"})}}async function ja(e=!0,t=!1){try{let o=await fetch(new URL("/v1/settings",Gn()),{method:"GET",headers:new Headers({Authorization:await si(),Accept:"application/octet-stream","If-None-Match":E.cloud.settingsSyncVersion.toString()})});if(o.status===404)return Oo.info("No settings on the cloud"),e&&ke({title:"Cloud Settings",body:"There are no settings in the cloud.",noPersist:!0}),!1;if(o.status===304)return Oo.info("Settings up to date"),e&&ke({title:"Cloud Settings",body:"Your settings are up to date.",noPersist:!0}),!1;if(!o.ok)return Oo.error(`Failed to sync down, API returned ${o.status}`),ke({title:"Cloud Settings",body:`Could not synchronize settings from the cloud (API returned ${o.status}).`,color:"var(--red-360)"}),!1;let r=Number(o.headers.get("etag")),i=E.cloud.settingsSyncVersion;if(!t&&r<i){e&&ke({title:"Cloud Settings",body:"Your local settings are newer than the cloud ones.",noPersist:!0});return}let s=await o.arrayBuffer(),l=new TextDecoder().decode(Ly(new Uint8Array(s)));return await Fy(l),Vo.cloud.settingsSyncVersion=r,VencordNative.settings.set(JSON.stringify(Vo,null,4)),Oo.info("Settings loaded from cloud successfully"),e&&ke({title:"Cloud Settings",body:"Your settings have been updated! Click here to restart to fully apply changes!",color:"var(--green-360)",onClick:mo,noPersist:!0}),!0}catch(o){return Oo.error("Failed to sync down",o),ke({title:"Cloud Settings",body:`Could not synchronize settings from the cloud (${o.toString()}).`,color:"var(--red-360)"}),!1}}async function zy(){try{let e=await fetch(new URL("/v1/settings",Gn()),{method:"DELETE",headers:new Headers({Authorization:await si()})});if(!e.ok){Oo.error(`Failed to delete, API returned ${e.status}`),ke({title:"Cloud Settings",body:`Could not delete settings (API returned ${e.status}).`,color:"var(--red-360)"});return}Oo.info("Settings deleted from cloud successfully"),ke({title:"Cloud Settings",body:"Settings deleted from cloud!",color:"var(--green-360)"})}catch(e){Oo.error("Failed to delete",e),ke({title:"Cloud Settings",body:`Could not delete settings (${e.toString()}).`,color:"var(--red-360)"})}}var Gy,mP,fP,Oo,ds=g(()=>{"use strict";a();Fn();$();x();Ey();Du();Je();Hn();Lu();Gy=(e,t)=>oe.show({type:e,message:t,id:oe.genId()}),mP=()=>Gy(oe.Type.SUCCESS,"Settings successfully imported. Restart to apply changes!"),fP=e=>Gy(oe.Type.FAILURE,`Failed to import settings: ${String(e)}`);Oo=new ie("Cloud:Settings","#39b7e0")});var _u={};ze(_u,{PlainSettings:()=>Vo,Settings:()=>E,addSettingsListener:()=>ms,definePluginSettings:()=>L,migratePluginSettings:()=>hP,useSettings:()=>pt});function Eu(e,t=e,o=""){return Wy[o]??=new Proxy(e,{get(r,i){let s=r[i];if(!(i in r)){if(o==="plugins"&&i in $e)return r[i]=Eu({enabled:$e[i].required??$e[i].enabledByDefault??!1},t,`plugins.${i}`);if(o.startsWith("plugins.")){let l=o.slice(8);if(l in $e){let c=$e[l].options?.[i];if(!c)return s;if("default"in c)return r[i]=c.default;if(c.type===4){let u=c.options.find(p=>p.default);return u&&(r[i]=u.value),u?.value}}}return s}return typeof s=="object"&&!Array.isArray(s)&&s!==null?Eu(s,t,`${o}${o&&"."}${i}`):s},set(r,i,s){if(r[i]===s)return!0;r[i]=s;let l=`${o}${o&&"."}${i}`;delete Wy[l];for(let c of Wa)(!c._paths||c._paths.includes(l))&&c(s,l);return Vo.cloud.settingsSyncVersion=Date.now(),Ir.Vencord_settingsDirty=!0,gP(),VencordNative.settings.set(JSON.stringify(t,null,4)),!0}})}function pt(e){let[,t]=_.useReducer(()=>({}),{}),o=e?(r,i)=>e.includes(i)&&t():t;return _.useEffect(()=>(Wa.add(o),()=>void Wa.delete(o)),[]),E}function ms(e,t){e&&(t._paths??=[]).push(e),Wa.add(t)}function hP(e,...t){let{plugins:o}=zn;if(!(e in o)){for(let r of t)if(r in o){qy.info(`Migrating settings from old name ${r} to ${e}`),o[e]=o[r],delete o[r],VencordNative.settings.set(JSON.stringify(zn,null,4));break}}}function L(e,t){let o={get store(){if(!o.pluginName)throw new Error("Cannot access settings before plugin is initialized");return E.plugins[o.pluginName]},use:r=>pt(r?.map(i=>`plugins.${o.pluginName}.${i}`)).plugins[o.pluginName],def:e,checks:t??{},pluginName:"",withPrivateSettings(){return this}};return o}var qy,jy,zn,gP,Wa,Wy,Vo,E,$=g(()=>{"use strict";a();Pr();Ea();Je();Pe();ds();w();x();Nr();qy=new ie("Settings"),jy={notifyAboutUpdates:!0,autoUpdate:!1,autoUpdateNotification:!0,useQuickCss:!0,themeLinks:[],enabledThemes:[],enableReactDevtools:!1,frameless:!1,transparent:!1,winCtrlQ:!1,macosTranslucency:void 0,macosVibrancyStyle:void 0,disableMinSize:!1,winNativeTitleBar:!1,plugins:{},notifications:{timeout:5e3,position:"bottom-right",useNative:"not-focused",logLimit:50},cloud:{authenticated:!1,url:"https://api.vencord.dev/",settingsSync:!1,settingsSyncVersion:0}};try{zn=JSON.parse(VencordNative.settings.get()),Mr(zn,jy)}catch(e){zn=Mr({},jy),qy.error(`An error occurred while loading the settings. Corrupt settings file?
  16. `,e)}gP=no(async()=>{E.cloud.settingsSync&&E.cloud.authenticated&&(await ai(),delete Ir.Vencord_settingsDirty)},6e4),Wa=new Set,Wy={};Vo=zn,E=Eu(zn)});var Ky=g(()=>{});var Yy=g(()=>{});var Bu={};ze(Bu,{UpdateLogger:()=>Cr,changes:()=>jn,checkForUpdates:()=>ci,getRepo:()=>Ou,isNewer:()=>fs,isOutdated:()=>Wn,maybePromptToUpdate:()=>gs,update:()=>ui,updateError:()=>li});async function qa(e){let t=await e;if(t.ok)return t.value;throw li=t.error,t.error}async function ci(){return jn=await qa(VencordNative.updater.getUpdates()),jn.some(e=>e.hash===po)?(fs=!0,Wn=!1):Wn=jn.length>0}async function ui(){if(!Wn)return!0;let e=await qa(VencordNative.updater.update());if(e&&(Wn=!1,!await qa(VencordNative.updater.rebuild())))throw new Error("The Build failed. Please try manually building the new update");return e}async function gs(e,t=!1){try{if(await ci()){let r=confirm(e);if(r&&fs)return alert("Your local copy has more recent commits. Please stash or reset them.");r&&(await ui(),mo())}}catch(o){Cr.error(o),alert("That also failed :( Try updating or re-installing with the installer!")}}var Cr,Wn,fs,li,jn,Ou,kr=g(()=>{"use strict";a();ti();Je();Hn();Cr=new ie("Updater","white"),Wn=!1,fs=!1;Ou=()=>qa(VencordNative.updater.getRepo())});function Zy(){gs("Uh Oh! Failed to render this Page. However, there is an update available that might fix it. Would you like to update and restart now?")}var Xy=g(()=>{"use strict";a();kr()});function Fu(e){let t=!1,o;return function(){return t?o:(t=!0,o=e.apply(this,arguments))}}var Uu=g(()=>{"use strict";a()});function bo({title:e,children:t}){return n(S.FormSection,null,n(Q,{variant:"heading-lg/semibold",tag:"h2",className:z.bottom16},e),t)}function To(e,t){return U.wrap(e,{message:`Failed to render the ${t} tab. If this issue persists, try using the installer to reinstall!`,onError:yP})}var yP,qn=g(()=>{"use strict";a();Ky();Yy();le();Xy();it();Uu();x();yP=Fu(Zy)});var ev={};ze(ev,{default:()=>TP});function vP(){let[e,,t]=lt(VencordNative.settings.getSettingsDir,{fallbackValue:"Loading..."}),o=pt(),r=_.useMemo(()=>Math.random()>.5?Qy:Vy,[]),i=navigator.platform.toLowerCase().startsWith("win"),l=navigator.platform.toLowerCase().startsWith("mac");_.useEffect(()=>{o.macosTranslucency===!0&&!o.macosVibrancyStyle&&(o.macosVibrancyStyle="sidebar",o.macosTranslucency=void 0)},[]);let c=[{key:"useQuickCss",title:"Enable Custom CSS",note:"Loads your Custom CSS"},{key:"enableReactDevtools",title:"Enable React Developer Tools",note:"Requires a full restart"},i?{key:"winNativeTitleBar",title:"Use Windows' native title bar instead of Discord's custom one",note:"Requires a full restart"}:{key:"frameless",title:"Disable the window frame",note:"Requires a full restart"},!1,i&&{key:"winCtrlQ",title:"Register Ctrl+Q as shortcut to close Discord (Alternative to Alt+F4)",note:"Requires a full restart"},{key:"disableMinSize",title:"Disable minimum window size",note:"Requires a full restart"}];return n(bo,{title:"Vencord Settings"},n(bP,{image:r}),n(S.FormSection,{title:"Quick Actions"},n(It,{className:Jy("quick-actions-card")},n(_.Fragment,null,n(C,{onClick:mo,size:C.Sizes.SMALL},"Restart Client"),n(C,{onClick:()=>VencordNative.quickCss.openEditor(),size:C.Sizes.SMALL,disabled:e==="Loading..."},"Open QuickCSS File"),n(C,{onClick:()=>za(e),size:C.Sizes.SMALL,disabled:t},"Open Settings Folder"),n(C,{onClick:()=>VencordNative.native.openExternal("https://github.com/Vendicated/Vencord"),size:C.Sizes.SMALL,disabled:t},"Open in GitHub")))),n(S.FormDivider,null),n(S.FormSection,{className:z.top16,title:"Settings",tag:"h5"},n(S.FormText,{className:z.bottom20},'Hint: You can change the position of this settings section in the settings of the "Settings" plugin!'),c.map(u=>u&&n(mt,{key:u.key,value:o[u.key],onChange:p=>o[u.key]=p,note:u.note},u.title))),l&&n(f,null,n(S.FormTitle,{tag:"h5"},"Window vibrancy style (requires restart)"),n(ho,{className:z.bottom20,placeholder:"Window vibrancy style",options:[{label:"No vibrancy",default:!o.macosTranslucency,value:void 0},{label:"Under Page (window tinting)",value:"under-page"},{label:"Content",value:"content"},{label:"Window",value:"window"},{label:"Selection",value:"selection"},{label:"Titlebar",value:"titlebar"},{label:"Header",value:"header"},{label:"Sidebar (old value for transparent windows)",value:"sidebar",default:o.macosTranslucency},{label:"Tooltip",value:"tooltip"},{label:"Menu",value:"menu"},{label:"Popover",value:"popover"},{label:"Fullscreen UI (transparent but slightly muted)",value:"fullscreen-ui"},{label:"HUD (Most transparent)",value:"hud"}],select:u=>o.macosVibrancyStyle=u,isSelected:u=>o.macosVibrancyStyle===u,serialize:es})),typeof Notification<"u"&&n(SP,{settings:o.notifications}))}function SP({settings:e}){return n(f,null,n(S.FormTitle,{tag:"h5"},"Notification Style"),e.useNative!=="never"&&Notification?.permission==="denied"&&n(So,{style:{padding:"1em"},className:z.bottom8},n(S.FormTitle,{tag:"h5"},"Desktop Notification Permission denied"),n(S.FormText,null,"You have denied Notification Permissions. Thus, Desktop notifications will not work!")),n(S.FormText,{className:z.bottom8},"Some plugins may show you notifications. These come in two styles:",n("ul",null,n("li",null,n("strong",null,"Vencord Notifications"),": These are in-app notifications"),n("li",null,n("strong",null,"Desktop Notifications"),": Native Desktop notifications (like when you get a ping)"))),n(ho,{placeholder:"Notification Style",options:[{label:"Only use Desktop notifications when Discord is not focused",value:"not-focused",default:!0},{label:"Always use Desktop notifications",value:"always"},{label:"Always use Vencord notifications",value:"never"}],closeOnSelect:!0,select:t=>e.useNative=t,isSelected:t=>t===e.useNative,serialize:es}),n(S.FormTitle,{tag:"h5",className:z.top16+" "+z.bottom8},"Notification Position"),n(ho,{isDisabled:e.useNative==="always",placeholder:"Notification Position",options:[{label:"Bottom Right",value:"bottom-right",default:!0},{label:"Top Right",value:"top-right"}],select:t=>e.position=t,isSelected:t=>t===e.position,serialize:es}),n(S.FormTitle,{tag:"h5",className:z.top16+" "+z.bottom8},"Notification Timeout"),n(S.FormText,{className:z.bottom16},"Set to 0s to never automatically time out"),n(yr,{disabled:e.useNative==="always",markers:[0,1e3,2500,5e3,1e4,2e4],minValue:0,maxValue:2e4,initialValue:e.timeout,onValueChange:t=>e.timeout=t,onValueRender:t=>(t/1e3).toFixed(2)+"s",onMarkerRender:t=>t/1e3+"s",stickToMarkers:!1}),n(S.FormTitle,{tag:"h5",className:z.top16+" "+z.bottom8},"Notification Log Limit"),n(S.FormText,{className:z.bottom16},"The amount of notifications to save in the log until old ones are removed. Set to ",n("code",null,"0")," to disable Notification log and ",n("code",null,"\u221E")," to never automatically remove old Notifications"),n(yr,{markers:[0,25,50,75,100,200],minValue:0,maxValue:200,stickToMarkers:!0,initialValue:e.logLimit,onValueChange:t=>e.logLimit=t,onValueRender:t=>t===200?"\u221E":t,onMarkerRender:t=>t===200?"\u221E":t}),n(C,{onClick:Ba,disabled:e.logLimit===0},"Open Notification Log"))}function bP({image:e}){return n(It,{className:Jy("card","donate")},n("div",null,n(S.FormTitle,{tag:"h5"},"Support the Project"),n(S.FormText,null,"Please consider supporting the development of Vencord by donating!"),n(ns,{style:{transform:"translateX(-1em)"}})),n("img",{role:"presentation",src:e,alt:"",height:128,style:{imageRendering:e===Vy?"pixelated":void 0,marginLeft:"auto",transform:e===Qy?"rotate(10deg)":void 0}}))}var Jy,Qy,Vy,TP,tv=g(()=>{"use strict";a();Fa();$();ot();Zc();ni();it();Pe();Hn();ut();x();qn();Jy=Be("vc-settings-"),Qy="https://cdn.discordapp.com/emojis/1026533090627174460.png",Vy="https://media.discordapp.net/stickers/1039992459209490513.png";TP=To(vP,"Vencord Settings")});var ov=g(()=>{});var zu={};ze(zu,{currentNotice:()=>hs,nextNotice:()=>nv,noticesQueue:()=>Gu,popNotice:()=>xP,showNotice:()=>Hu});function xP(){$u.dismiss()}function nv(){hs=Gu.shift(),hs&&$u.show(...hs,"VencordNotice")}function Hu(e,t,o){Gu.push(["GENERIC",e,t,o]),hs||nv()}var $u,Gu,hs,ju=g(()=>{"use strict";a();W();dt(e=>e.show&&e.dismiss&&!e.suppressAll,e=>$u=e);Gu=[],hs=null});var rv=g(()=>{});function qt({height:e=24,width:t=24,className:o,children:r,viewBox:i,...s}){return n("svg",{className:te(o,"vc-icon"),role:"img",width:t,height:e,viewBox:i,...s},r)}function pi({height:e=24,width:t=24,className:o}){return n(qt,{height:e,width:t,className:te(o,"vc-link-icon"),viewBox:"0 0 24 24"},n("g",{fill:"none","fill-rule":"evenodd"},n("path",{fill:"currentColor",d:"M10.59 13.41c.41.39.41 1.03 0 1.42-.39.39-1.03.39-1.42 0a5.003 5.003 0 0 1 0-7.07l3.54-3.54a5.003 5.003 0 0 1 7.07 0 5.003 5.003 0 0 1 0 7.07l-1.49 1.49c.01-.82-.12-1.64-.4-2.42l.47-.48a2.982 2.982 0 0 0 0-4.24 2.982 2.982 0 0 0-4.24 0l-3.53 3.53a2.982 2.982 0 0 0 0 4.24zm2.82-4.24c.39-.39 1.03-.39 1.42 0a5.003 5.003 0 0 1 0 7.07l-3.54 3.54a5.003 5.003 0 0 1-7.07 0 5.003 5.003 0 0 1 0-7.07l1.49-1.49c-.01.82.12 1.64.4 2.43l-.47.47a2.982 2.982 0 0 0 0 4.24 2.982 2.982 0 0 0 4.24 0l3.53-3.53a2.982 2.982 0 0 0 0-4.24.973.973 0 0 1 0-1.42z"}),n("rect",{width:t,height:e})))}function Ka(e){return n(qt,{...e,className:te(e.className,"vc-copy-icon"),viewBox:"0 0 24 24"},n("g",{fill:"currentColor"},n("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1z"}),n("path",{d:"M15 5H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z"})))}function ys(e){return n(qt,{...e,className:te(e.className,"vc-open-external-icon"),viewBox:"0 0 24 24"},n("polygon",{fill:"currentColor",fillRule:"nonzero",points:"13 20 11 20 11 8 5.5 13.5 4.08 12.08 12 4.16 19.92 12.08 18.5 13.5 13 8"}))}function Rr(e){return n(qt,{...e,className:te(e.className,"vc-image-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M21,19V5c0,-1.1 -0.9,-2 -2,-2H5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2zM8.5,13.5l2.5,3.01L14.5,12l4.5,6H5l3.5,-4.5z"}))}function Ya(e){return n(qt,{...e,className:te(e.className,"vc-info-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",transform:"translate(2 2)",d:"M9,7 L11,7 L11,5 L9,5 L9,7 Z M10,18 C5.59,18 2,14.41 2,10 C2,5.59 5.59,2 10,2 C14.41,2 18,5.59 18,10 C18,14.41 14.41,18 10,18 L10,18 Z M10,4.4408921e-16 C4.4771525,-1.77635684e-15 4.4408921e-16,4.4771525 0,10 C-1.33226763e-15,12.6521649 1.0535684,15.195704 2.92893219,17.0710678 C4.80429597,18.9464316 7.3478351,20 10,20 C12.6521649,20 15.195704,18.9464316 17.0710678,17.0710678 C18.9464316,15.195704 20,12.6521649 20,10 C20,7.3478351 18.9464316,4.80429597 17.0710678,2.92893219 C15.195704,1.0535684 12.6521649,2.22044605e-16 10,0 L10,4.4408921e-16 Z M9,15 L11,15 L11,9 L9,9 L9,15 L9,15 Z"}))}function iv(e){return n(qt,{"aria-label":Qe.Messages.GUILD_OWNER,...e,className:te(e.className,"vc-owner-crown-icon"),role:"img",viewBox:"0 0 16 16"},n("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M13.6572 5.42868C13.8879 5.29002 14.1806 5.30402 14.3973 5.46468C14.6133 5.62602 14.7119 5.90068 14.6473 6.16202L13.3139 11.4954C13.2393 11.7927 12.9726 12.0007 12.6666 12.0007H3.33325C3.02725 12.0007 2.76058 11.792 2.68592 11.4954L1.35258 6.16202C1.28792 5.90068 1.38658 5.62602 1.60258 5.46468C1.81992 5.30468 2.11192 5.29068 2.34325 5.42868L5.13192 7.10202L7.44592 3.63068C7.46173 3.60697 7.48377 3.5913 7.50588 3.57559C7.5192 3.56612 7.53255 3.55663 7.54458 3.54535L6.90258 2.90268C6.77325 2.77335 6.77325 2.56068 6.90258 2.43135L7.76458 1.56935C7.89392 1.44002 8.10658 1.44002 8.23592 1.56935L9.09792 2.43135C9.22725 2.56068 9.22725 2.77335 9.09792 2.90268L8.45592 3.54535C8.46794 3.55686 8.48154 3.56651 8.49516 3.57618C8.51703 3.5917 8.53897 3.60727 8.55458 3.63068L10.8686 7.10202L13.6572 5.42868ZM2.66667 12.6673H13.3333V14.0007H2.66667V12.6673Z"}))}function sv(e){return n(qt,{...e,className:te(e.className,"vc-screenshare-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M2 4.5C2 3.397 2.897 2.5 4 2.5H20C21.103 2.5 22 3.397 22 4.5V15.5C22 16.604 21.103 17.5 20 17.5H13V19.5H17V21.5H7V19.5H11V17.5H4C2.897 17.5 2 16.604 2 15.5V4.5ZM13.2 14.3375V11.6C9.864 11.6 7.668 12.6625 6 15C6.672 11.6625 8.532 8.3375 13.2 7.6625V5L18 9.6625L13.2 14.3375Z"}))}function Za(e){return n(qt,{...e,className:te(e.className,"vc-image-visible"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h14q.825 0 1.413.587Q21 4.175 21 5v14q0 .825-.587 1.413Q19.825 21 19 21Zm0-2h14V5H5v14Zm1-2h12l-3.75-5-3 4L9 13Zm-1 2V5v14Z"}))}function Xa(e){return n(qt,{...e,className:te(e.className,"vc-image-invisible"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"m21 18.15-2-2V5H7.85l-2-2H19q.825 0 1.413.587Q21 4.175 21 5Zm-1.2 4.45L18.2 21H5q-.825 0-1.413-.587Q3 19.825 3 19V5.8L1.4 4.2l1.4-1.4 18.4 18.4ZM6 17l3-4 2.25 3 .825-1.1L5 7.825V19h11.175l-2-2Zm7.425-6.425ZM10.6 13.4Z"}))}function av(e){return n(qt,{...e,className:te(e.className,"vc-microphone"),viewBox:"0 0 24 24"},n("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.99 11C14.99 12.66 13.66 14 12 14C10.34 14 9 12.66 9 11V5C9 3.34 10.34 2 12 2C13.66 2 15 3.34 15 5L14.99 11ZM12 16.1C14.76 16.1 17.3 14 17.3 11H19C19 14.42 16.28 17.24 13 17.72V21H11V17.72C7.72 17.23 5 14.41 5 11H6.7C6.7 14 9.24 16.1 12 16.1ZM12 4C11.2 4 11 4.66667 11 5V11C11 11.3333 11.2 12 12 12C12.8 12 13 11.3333 13 11V5C13 4.66667 12.8 4 12 4Z",fill:"currentColor"}),n("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.99 11C14.99 12.66 13.66 14 12 14C10.34 14 9 12.66 9 11V5C9 3.34 10.34 2 12 2C13.66 2 15 3.34 15 5L14.99 11ZM12 16.1C14.76 16.1 17.3 14 17.3 11H19C19 14.42 16.28 17.24 13 17.72V22H11V17.72C7.72 17.23 5 14.41 5 11H6.7C6.7 14 9.24 16.1 12 16.1Z",fill:"currentColor"}))}function lv(e){return n(qt,{...e,className:te(e.className,"vc-cog-wheel"),viewBox:"0 0 24 24"},n("path",{clipRule:"evenodd",fill:"currentColor",d:"M19.738 10H22V14H19.739C19.498 14.931 19.1 15.798 18.565 16.564L20 18L18 20L16.565 18.564C15.797 19.099 14.932 19.498 14 19.738V22H10V19.738C9.069 19.498 8.203 19.099 7.436 18.564L6 20L4 18L5.436 16.564C4.901 15.799 4.502 14.932 4.262 14H2V10H4.262C4.502 9.068 4.9 8.202 5.436 7.436L4 6L6 4L7.436 5.436C8.202 4.9 9.068 4.502 10 4.262V2H14V4.261C14.932 4.502 15.797 4.9 16.565 5.435L18 3.999L20 5.999L18.564 7.436C19.099 8.202 19.498 9.069 19.738 10ZM12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16Z"}))}function Wu(e){return n(qt,{...e,className:te(e.className,"vc-reply-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M10 8.26667V4L3 11.4667L10 18.9333V14.56C15 14.56 18.5 16.2667 21 20C20 14.6667 17 9.33333 10 8.26667Z"}))}function Ja(e){return n(qt,{...e,className:te(e.className,"vc-delete-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M15 3.999V2H9V3.999H3V5.999H21V3.999H15Z"}),n("path",{fill:"currentColor",d:"M5 6.99902V18.999C5 20.101 5.897 20.999 7 20.999H17C18.103 20.999 19 20.101 19 18.999V6.99902H5ZM11 17H9V11H11V17ZM15 17H13V11H15V17Z"}))}function cv(e){return n(qt,{...e,className:te(e.className,"vc-plus-icon"),viewBox:"0 0 18 18"},n("polygon",{"fill-rule":"nonzero",fill:"currentColor",points:"15 10 10 10 10 15 8 15 8 10 3 10 3 8 8 8 8 3 10 3 10 8 15 8"}))}function uv(e){return n(qt,{...e,className:te(e.className,"vc-no-entry-sign-icon"),viewBox:"0 0 24 24"},n("path",{d:"M0 0h24v24H0z",fill:"none"}),n("path",{fill:"currentColor",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z"}))}var Dt=g(()=>{"use strict";a();rv();Pe();x()});function pv(e,t,o){return o===!1?t?e.slice(0,-1):e:e[0]}function vs(e,t,o=!1){let r=yo.duration(e,t),i=kP.map(u=>({amount:r[u](),unit:u})),s=0;e:for(let u=0;u<i.length;u++)if(!(i[u].amount===0||!(u+1<i.length))){for(let p=u+1;p<i.length;p++)if(i[p].amount!==0)continue e;s=i.length-(u+1)}i=s===0?i:i.slice(0,-s);let l=i.findIndex(({unit:u})=>u==="days");if(l!==-1){let u=i[l],p=u.amount%7;p===0?i.splice(l,1):u.amount=p}let c="";for(;i.length;){let{amount:u,unit:p}=i.shift();c.length&&(c+=i.length?", ":" and "),(u>0||c.length)&&(c+=`${u} ${pv(p,u===1,o)}`)}return c.length?c:`0 ${pv(t,!1,o)}`}function RP(e,t=o=>o){let{length:o}=e;if(o===0)return"";if(o===1)return t(e[0]);let r="";for(let i=0;i<o;i++)r+=t(e[i]),o-i>2?r+=", ":o-i>1&&(r+=" and ");return r}function Ss(e,t){let o="```";return`${o}${t||""}
  17. ${e.replaceAll("```","\\`\\`\\`")}
  18. ${o}`}var qu,wP,MP,Ku,PP,IP,AP,NP,CP,hn,kP,yn=g(()=>{"use strict";a();x();qu=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),wP=e=>e.toLowerCase().split("_"),MP=e=>e.toLowerCase().split("-"),Ku=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),PP=e=>e.toLowerCase().split(" "),IP=e=>e.map((t,o)=>o?t[0].toUpperCase()+t.slice(1):t).join(""),AP=e=>e.join("_").toUpperCase(),NP=e=>e.join("-").toLowerCase(),CP=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(""),hn=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(" "),kP=["years","months","weeks","days","hours","minutes","seconds"]});async function bs(e){let{invite:t}=await mv.resolveInvite(e,"Desktop Modal");if(!t)throw new Error("Invalid invite: "+e);return B.dispatch({type:"INVITE_MODAL_OPEN",invite:t,code:e,context:"APP"}),new Promise(o=>{let r,i,s=!1;B.subscribe("INVITE_ACCEPT",i=()=>{s=!0}),B.subscribe("INVITE_MODAL_CLOSE",r=()=>{B.unsubscribe("INVITE_MODAL_CLOSE",r),B.unsubscribe("INVITE_ACCEPT",i),o(s)})})}function di(){return J.getChannel(Me.getChannelId())}function Yu(){return pe.getGuild(di()?.guild_id)}function DP(e){$c.openPrivateChannel(e)}function Kn(){return Yi.PreloadedUserSettingsActionCreators.getCurrentValue()?.appearance?.theme}function vn(e){Ia.dispatchToLastSubscribed("INSERT_TEXT",{rawText:e,plainText:e})}function LP(e,t,o,r){let i={content:"",invalidEmojis:[],tts:!1,validNonShortcutEmojis:[],...t};return fo.sendMessage(e,i,o,r)}function Bo(e,t){return Ne(o=>n(Oe,{...o,className:Ta.modal,size:"dynamic"},n(Xc,{className:Ta.image,original:e,placeholder:e,src:e,renderLinkComponent:r=>n(Jr,{...r}),shouldHideMediaOptions:!1,shouldAnimate:!0,...t})))}async function Fo(e){if(!await Nt.getUser(e))throw new Error("No such user: "+e);let o=ko.getGuildId();dv.openUserProfileModal({userId:e,guildId:o,channelId:Me.getChannelId(),analyticsLocation:{page:o?"Guild Channel":"DM Channel",section:"Profile Popout"}})}async function Zu(e,t){let o=uo.getUserProfile(e);if(o)return o;B.dispatch({type:"USER_PROFILE_FETCH_START",userId:e});let{body:r}=await At.get({url:`/users/${e}/profile`,query:{with_mutual_guilds:!1,with_mutual_friends_count:!1,...t},oldFormErrors:!0});return B.dispatch({type:"USER_UPDATE",user:r.user}),await B.dispatch({type:"USER_PROFILE_FETCH_SUCCESS",...r}),t?.guild_id&&r.guild_member&&B.dispatch({type:"GUILD_MEMBER_PROFILE_UPDATE",guildId:t.guild_id,guildMember:r.guild_member}),uo.getUserProfile(e)}function Sn(e){return e.discriminator==="0"?e.username:e.tag}var fo,dv,mv,Z_,Ts,nt=g(()=>{"use strict";a();W();x();st();fo=A("editMessage","sendMessage"),dv=A("openUserProfileModal","closeUserProfileModal"),mv=A("resolveInvite"),Z_=we("InviteModalStore");Ts=(o=>(o[o.Dark=1]="Dark",o[o.Light=2]="Light",o))(Ts||{})});function xs(){return`-${Ko.fromTimestamp(Date.now())}`}function me(e,t){let o=EP.createBotMessage({channelId:e,content:"",embeds:[]});return fo.receiveMessage(e,Mr(t,o)),t}function ct(e,t,o){return e.find(r=>r.name===t)?.value||o}var EP,Xu=g(()=>{"use strict";a();nt();Pe();W();x();EP=A("createBotMessage")});var bn,Uo,Ju,Qa=g(()=>{"use strict";a();bn=(h=>(h[h.SUB_COMMAND=1]="SUB_COMMAND",h[h.SUB_COMMAND_GROUP=2]="SUB_COMMAND_GROUP",h[h.STRING=3]="STRING",h[h.INTEGER=4]="INTEGER",h[h.BOOLEAN=5]="BOOLEAN",h[h.USER=6]="USER",h[h.CHANNEL=7]="CHANNEL",h[h.ROLE=8]="ROLE",h[h.MENTIONABLE=9]="MENTIONABLE",h[h.NUMBER=10]="NUMBER",h[h.ATTACHMENT=11]="ATTACHMENT",h))(bn||{}),Uo=(s=>(s[s.BUILT_IN=0]="BUILT_IN",s[s.BUILT_IN_TEXT=1]="BUILT_IN_TEXT",s[s.BUILT_IN_INTEGRATION=2]="BUILT_IN_INTEGRATION",s[s.BOT=3]="BOT",s[s.PLACEHOLDER=4]="PLACEHOLDER",s))(Uo||{}),Ju=(r=>(r[r.CHAT_INPUT=1]="CHAT_INPUT",r[r.USER=2]="USER",r[r.MESSAGE=3]="MESSAGE",r))(Ju||{})});var ep={};ze(ep,{ApplicationCommandInputType:()=>Uo,ApplicationCommandOptionType:()=>bn,ApplicationCommandType:()=>Ju,BUILT_IN:()=>Yn,OptionalMessageOption:()=>Zn,RequiredMessageOption:()=>ws,_handleCommand:()=>OP,_init:()=>_P,commands:()=>Qu,findOption:()=>ct,generateId:()=>xs,prepareOption:()=>Vu,registerCommand:()=>mi,sendBotMessage:()=>me,unregisterCommand:()=>Ms});function Vu(e){return e.displayName||=e.name,e.displayDescription||=e.description,e.options?.forEach((t,o,r)=>{t===fv?r[o]=Zn:t===gv&&(r[o]=ws),t.choices?.forEach(i=>i.displayName||=i.name),Vu(r[o])}),e}function BP(e,t){e.options?.forEach(o=>{if(o.type!==1)throw new Error("When specifying sub-command options, all options must be sub-commands.");let r={...e,...o,type:1,name:`${e.name} ${o.name}`,id:`${o.name}-${e.id}`,displayName:`${e.name} ${o.name}`,subCommandPath:[{name:o.name,type:o.type,displayName:o.name}],rootCommand:e};mi(r,t)})}function mi(e,t){if(!Yn){console.warn("[CommandsAPI]",`Not registering ${e.name} as the CommandsAPI hasn't been initialised.`,"Please restart to use commands");return}if(Yn.some(o=>o.name===e.name))throw new Error(`Command '${e.name}' already exists.`);if(e.isVencordCommand=!0,e.id??=`-${Yn.length+1}`,e.applicationId??="-1",e.type??=1,e.inputType??=1,e.plugin||=t,Vu(e),e.options?.[0]?.type===1){BP(e,t);return}Qu[e.name]=e,Yn.push(e)}function Ms(e){let t=Yn.findIndex(o=>o.name===e);return t===-1?!1:(Yn.splice(t,1),delete Qu[e],!0)}var Yn,Qu,fv,gv,Zn,ws,_P,OP,so=g(()=>{"use strict";a();yn();Xu();Qa();Xu();Qa();Qu={},fv=Symbol("OptionalMessageOption"),gv=Symbol("RequiredMessageOption"),Zn=fv,ws=gv,_P=function(e){try{Yn=e,Zn=e.find(t=>t.name==="shrug").options[0],ws=e.find(t=>t.name==="me").options[0]}catch{console.error("Failed to load CommandsApi")}return e},OP=function(e,t,o){if(!e.isVencordCommand)return e.execute(t,o);let r=i=>{let s=`An Error occurred while executing command "${e.name}"`,l=i instanceof Error?i.stack||i.message:String(i);console.error(s,i),me(o.channel.id,{content:`${s}:
  19. ${Ss(l)}`,author:{username:"Vencord"}})};try{let i=e.execute(t,o);return i instanceof Promise?i.catch(r):i}catch(i){return r(i)}}});function hv({text:e,color:t}){return n("div",{className:"vc-plugins-badge",style:{backgroundColor:t,justifySelf:"flex-end",marginLeft:"auto"}},e)}var tp=g(()=>{"use strict";a()});function yv({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){let l=t[r]??e.default,[c,u]=_.useState(l??!1),[p,m]=_.useState(null);_.useEffect(()=>{s(p!==null)},[p]);function h(v){let T=e.isValid?.call(o,v)??!0;typeof T=="string"?m(T):T?(m(null),u(v),i(v)):m("Invalid input provided.")}return n(S.FormSection,null,n(mt,{value:c,onChange:h,note:e.description,disabled:e.disabled?.call(o)??!1,...e.componentProps,hideBorder:!0,style:{marginBottom:"0.5em"}},hn(qu(r))),p&&n(S.FormText,{style:{color:"var(--text-danger)"}},p))}var vv=g(()=>{"use strict";a();yn();x()});function Sv({option:e,onChange:t,onError:o}){return e.component({setValue:t,setError:o,option:e})}var bv=g(()=>{"use strict";a()});function op({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){function l(v){return e.type===2?BigInt(v):Number(v)}let[c,u]=_.useState(`${t[r]??e.default??0}`),[p,m]=_.useState(null);_.useEffect(()=>{s(p!==null)},[p]);function h(v){let T=e.isValid?.call(o,v)??!0;m(null),typeof T=="string"?m(T):T||m("Invalid input provided."),e.type===1&&BigInt(v)>=FP?(u(`${Number.MAX_SAFE_INTEGER}`),i(l(v))):(u(v),i(l(v)))}return n(S.FormSection,null,n(S.FormTitle,null,e.description),n(et,{type:"number",pattern:"-?[0-9]+",value:c,onChange:h,placeholder:e.placeholder??"Enter a number",disabled:e.disabled?.call(o)??!1,...e.componentProps}),p&&n(S.FormText,{style:{color:"var(--text-danger)"}},p))}var FP,Tv=g(()=>{"use strict";a();w();x();FP=BigInt(Number.MAX_SAFE_INTEGER)});function xv({option:e,pluginSettings:t,definedSettings:o,onChange:r,onError:i,id:s}){let l=t[s]??e.options?.find(v=>v.default)?.value,[c,u]=_.useState(l??null),[p,m]=_.useState(null);_.useEffect(()=>{i(p!==null)},[p]);function h(v){let T=e.isValid?.call(o,v)??!0;typeof T=="string"?m(T):T?(m(null),u(v),r(v)):m("Invalid input provided.")}return n(S.FormSection,null,n(S.FormTitle,null,e.description),n(ho,{isDisabled:e.disabled?.call(o)??!1,options:e.options,placeholder:e.placeholder??"Select an option",maxVisibleItems:5,closeOnSelect:!0,select:h,isSelected:v=>v===c,serialize:v=>String(v),...e.componentProps}),p&&n(S.FormText,{style:{color:"var(--text-danger)"}},p))}var wv=g(()=>{"use strict";a();x()});function go(e,t,o=1){let r=[];for(let i=e;i<=t;i+=o)r.push(Math.round(i*100)/100);return r}function Mv({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){let l=t[r]??e.default,[c,u]=_.useState(null);_.useEffect(()=>{s(c!==null)},[c]);function p(m){let h=e.isValid?.call(o,m)??!0;typeof h=="string"?u(h):h?(u(null),i(m)):u("Invalid input provided.")}return n(S.FormSection,null,n(S.FormTitle,null,e.description),n(yr,{disabled:e.disabled?.call(o)??!1,markers:e.markers,minValue:e.markers[0],maxValue:e.markers[e.markers.length-1],initialValue:l,onValueChange:p,onValueRender:m=>String(m.toFixed(2)),stickToMarkers:e.stickToMarkers??!0,...e.componentProps}))}var np=g(()=>{"use strict";a();x()});function Pv({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){let[l,c]=_.useState(t[r]??e.default??null),[u,p]=_.useState(null);_.useEffect(()=>{s(u!==null)},[u]);function m(h){let v=e.isValid?.call(o,h)??!0;p(typeof v=="string"?v:v?null:"Invalid input provided."),c(h),i(h)}return n(S.FormSection,null,n(S.FormTitle,null,e.description),n(et,{type:"text",value:l,onChange:m,placeholder:e.placeholder??"Enter a value",disabled:e.disabled?.call(o)??!1,...e.componentProps}),u&&n(S.FormText,{style:{color:"var(--text-danger)"}},u))}var Iv=g(()=>{"use strict";a();x()});var fi=g(()=>{"use strict";a();tp();vv();bv();Tv();wv();np();Iv()});var Av=g(()=>{});function Nv(e){Ne(t=>n(Oe,{...t},n(U,null,n(Ye,{className:gi("root")},n(WP,{user:e})))))}function zP(){let e=Kn()===2?GP:HP;return n("img",{src:e,alt:"GitHub"})}function jP(){let e=Kn()===2?$P:UP;return n("img",{src:e,alt:"Website"})}function WP({user:e}){pt();let t=Ke([uo],()=>uo.getUserProfile(e.id));ue(()=>{!t&&!e.bot&&e.id&&Zu(e.id)},[e.id]);let o=t?.connectedAccounts?.find(s=>s.type==="github")?.name,r=t?.connectedAccounts?.find(s=>s.type==="domain")?.name,i=St(()=>{let s=Object.values($e);return(oi[e.id]?s.filter(c=>c.authors.includes(oi[e.id])):s.filter(c=>c.authors.some(u=>u.name===e.username))).filter(c=>!c.name.endsWith("API")).sort((c,u)=>Number(c.required??!1)-Number(u.required??!1))},[e.id,e.username]);return n(f,null,n("div",{className:gi("header")},n("img",{className:gi("avatar"),src:e.getAvatarURL(void 0,512,!0),alt:""}),n(S.FormTitle,{tag:"h2",className:gi("name")},e.username),n("div",{className:gi("links")},r&&n(Jr,{href:"https://"+r},n(jP,null)),o&&n(Jr,{href:`https://github.com/${o}`},n(zP,null)))),n("div",{className:gi("plugins")},i.map(s=>n(Va,{key:s.name,plugin:s,disabled:s.required??!1,onRestartNeeded:()=>$t("Restart to apply changes!")}))))}var UP,$P,GP,HP,gi,Cv=g(()=>{"use strict";a();Av();$();ot();le();I();nt();st();x();Nr();rp();UP="/assets/e1e96d89e192de1997f73730db26e94f.svg",$P="/assets/730f58bcfd5a57a5e22460c445a0c6cf.svg",GP="/assets/3ff98ad75ac94fa883af5ed62d17c459.svg",HP="/assets/6a853b4c87fce386cbfef4a2efbacb09.svg",gi=Be("vc-author-modal-")});function kv(e){let t=new KP({username:e.username,id:e.id??xs(),avatar:e.avatar,bot:!0});return B.dispatch({type:"USER_UPDATE",user:t}),t}function sp({plugin:e,onRestartNeeded:t,onClose:o,transitionState:r}){let[i,s]=_.useState([]),l=pt().plugins[e.name],[c,u]=_.useState({}),[p,m]=_.useState({}),[h,v]=_.useState(null),T=()=>Object.values(p).every(M=>!M),N=Boolean(l&&e.options&&!Vi(e.options));_.useEffect(()=>{(async()=>{for(let M of e.authors.slice(0,6)){let O=M.id?await Nt.getUser(`${M.id}`).catch(()=>kv({username:M.name})):kv({username:M.name});s(H=>[...H,O])}})()},[]);async function b(){if(!e.options){o();return}if(e.beforeSave){let O=await Promise.resolve(e.beforeSave(c));if(O!==!0){v(O);return}}let M=!1;for(let[O,H]of Object.entries(c)){let Z=e.options[O];l[O]=H,Z?.onChange?.(H),Z?.restartNeeded&&(M=!0)}M&&t(),o()}function P(){if(!N||!e.options)return n(S.FormText,null,"There are no settings for this plugin.");{let M=Object.entries(e.options).map(([O,H])=>{if(H.hidden)return null;function Z(D){u(V=>({...V,[O]:D}))}function K(D){m(V=>({...V,[O]:D}))}let q=YP[H.type];return n(q,{id:O,key:O,option:H,onChange:Z,onError:K,pluginSettings:l,definedSettings:e.settings})});return n(ce,{flexDirection:"column",style:{gap:12,marginBottom:16}},M)}}function k(M,O){let H=e.authors.length-O,Z=e.authors.length-H,K=Z+e.authors.length-O;return n(ee,{text:e.authors.slice(Z,K).map(q=>q.name).join(", ")},({onMouseEnter:q,onMouseLeave:D})=>n("div",{className:ip.moreUsers,onMouseEnter:q,onMouseLeave:D},"+",H))}return n(Oe,{transitionState:r,size:"medium",className:"vc-text-selectable"},n(tt,{separator:!1},n(Q,{variant:"heading-lg/semibold",style:{flexGrow:1}},e.name),n(_t,{onClick:o})),n(Ye,null,n(S.FormSection,null,n(S.FormTitle,{tag:"h3"},"About ",e.name),n(S.FormText,null,e.description),n(S.FormTitle,{tag:"h3",style:{marginTop:8,marginBottom:0}},"Authors"),n("div",{style:{width:"fit-content",marginBottom:8}},n(qP,{users:i,count:e.authors.length,guildId:void 0,renderIcon:!1,max:6,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:k,renderUser:M=>n(Zr,{className:ip.clickableAvatar,onClick:()=>Nv(M)},n("img",{className:ip.avatar,src:M.getAvatarURL(void 0,80,!0),alt:M.username,title:M.username}))}))),!!e.settingsAboutComponent&&n("div",{className:te(z.bottom8,"vc-text-selectable")},n(S.FormSection,null,n(U,{message:"An error occurred while rendering this plugin's custom InfoComponent"},n(e.settingsAboutComponent,{tempSettings:c})))),n(S.FormSection,{className:z.bottom16},n(S.FormTitle,{tag:"h3"},"Settings"),P())),N&&n(bt,null,n(ce,{flexDirection:"column",style:{width:"100%"}},n(ce,{style:{marginLeft:"auto"}},n(C,{onClick:o,size:C.Sizes.SMALL,color:C.Colors.PRIMARY,look:C.Looks.LINK},"Cancel"),n(ee,{text:"You must fix all errors before saving",shouldShow:!T()},({onMouseEnter:M,onMouseLeave:O})=>n(C,{size:C.Sizes.SMALL,color:C.Colors.BRAND,onClick:b,onMouseEnter:M,onMouseLeave:O,disabled:!T()},"Save & Close"))),h&&n(Q,{variant:"text-md/semibold",style:{color:"var(--text-danger)"}},"Error while saving: ",h))))}var qP,ip,KP,YP,Rv=g(()=>{"use strict";a();so();$();le();Ct();zo();it();Pe();st();w();W();x();fi();Cv();qP=je("defaultRenderUser","showDefaultAvatarsForNullUsers"),ip=A("moreUsers","emptyUser","avatarContainer","clickableAvatar"),KP=Ft(()=>F.getCurrentUser().constructor);YP={[0]:Pv,[1]:op,[2]:op,[3]:yv,[4]:xv,[5]:Mv,[6]:Sv}});var Dv=g(()=>{});var Lv=g(()=>{});function Ev({checked:e,onChange:t,disabled:o}){return n("div",null,n("div",{className:te(el.container,"default-colors",e?el.checked:void 0),style:{backgroundColor:e?ap:lp,opacity:o?.3:1}},n("svg",{className:el.slider+" vc-switch-slider",viewBox:"0 0 28 20",preserveAspectRatio:"xMinYMid meet","aria-hidden":"true",style:{transform:e?"translateX(12px)":"translateX(-3px)"}},n("rect",{fill:"white",x:"4",y:"0",height:"20",width:"20",rx:"10"}),n("svg",{viewBox:"0 0 20 20",fill:"none"},e?n(f,null,n("path",{fill:ap,d:"M7.89561 14.8538L6.30462 13.2629L14.3099 5.25755L15.9009 6.84854L7.89561 14.8538Z"}),n("path",{fill:ap,d:"M4.08643 11.0903L5.67742 9.49929L9.4485 13.2704L7.85751 14.8614L4.08643 11.0903Z"})):n(f,null,n("path",{fill:lp,d:"M5.13231 6.72963L6.7233 5.13864L14.855 13.2704L13.264 14.8614L5.13231 6.72963Z"}),n("path",{fill:lp,d:"M13.2704 5.13864L14.8614 6.72963L6.72963 14.8614L5.13864 13.2704L13.2704 5.13864Z"})))),n("input",{disabled:o,type:"checkbox",className:el.input,tabIndex:0,checked:e,onChange:r=>t(r.currentTarget.checked)})))}var ap,lp,el,_v=g(()=>{"use strict";a();Lv();Pe();W();ap="var(--green-360)",lp="var(--primary-400)",el=A("slider","input","container")});function tl({disabled:e,isNew:t,name:o,infoButton:r,footer:i,author:s,enabled:l,setEnabled:c,description:u,onMouseEnter:p,onMouseLeave:m}){return n("div",{className:hi("card",{"card-disabled":e}),onMouseEnter:p,onMouseLeave:m},n("div",{className:hi("header")},n("div",{className:hi("name-author")},n(Q,{variant:"text-md/bold",className:hi("name")},o,t&&n(hv,{text:"NEW",color:"#ED4245"})),!!s&&n(Q,{variant:"text-md/normal",className:hi("author")},s)),r,n(Ev,{checked:l,onChange:c,disabled:e})),n(Q,{className:hi("note"),variant:"text-sm/normal"},u),i)}var hi,cp=g(()=>{"use strict";a();Dv();ot();tp();_v();x();hi=Be("vc-addon-")});var Ps,up=g(()=>{"use strict";a();Ps=class{set=new Set;get changeCount(){return this.set.size}get hasChanges(){return this.changeCount>0}handleChange(t){this.set.delete(t)||this.set.add(t)}add(t){return this.set.add(t)}remove(t){return this.set.delete(t)}getChanges(){return this.set.values()}map(t){return[...this.getChanges()].map(t)}}});var fp={};ze(fp,{PMLogger:()=>ZP,isPluginEnabled:()=>dp,patches:()=>Bv,plugins:()=>XP,startAllPlugins:()=>Is,startDependenciesRecursive:()=>ol,startPlugin:()=>As,stopPlugin:()=>mp});function dp(e){return($e[e]?.required||$e[e]?.isDependency||pp[e]?.enabled)??!1}function ol(e){let t=!1,o=[];return e.dependencies?.forEach(r=>{if(!E.plugins[r].enabled){if(ol($e[r]),E.plugins[r].enabled=!0,$e[r].patches){ao.warn(`Enabling dependency ${r} requires restart.`),t=!0;return}As($e[r])||o.push(r)}}),{restartNeeded:t,failures:o}}var ao,ZP,XP,Bv,pp,Fv,Is,As,mp,nl=g(()=>{"use strict";a();so();$();Je();w();x();Nr();ga();ao=new ie("PluginManager","#a6d189"),ZP=ao,XP=$e,Bv=[],pp=E.plugins;Fv=Object.values($e);for(let e of Fv)pp[e.name]?.enabled&&e.dependencies?.forEach(t=>{let o=$e[t];if(o)pp[t].enabled=!0,o.isDependency=!0;else{let r=new Error(`Plugin ${e.name} has unresolved dependency ${t}`);ao.warn(r)}});for(let e of Fv){if(e.settings){e.settings.pluginName=e.name,e.options??={};for(let[t,o]of Object.entries(e.settings.def)){let r=e.settings.checks?.[t];e.options[t]={...o,...r}}}if(e.patches&&dp(e.name))for(let t of e.patches)t.plugin=e.name,Array.isArray(t.replacement)||(t.replacement=[t.replacement]),Bv.push(t)}Is=jo("startAllPlugins",function(t){ao.info(`Starting plugins (stage ${t})`);for(let o in $e)if(dp(o)){if(($e[o].startAt??"WebpackReady")!==t)continue;As($e[o])}});As=jo("startPlugin",function(t){let{name:o,commands:r,flux:i}=t;if(t.start){if(ao.info("Starting plugin",o),t.started)return ao.warn(`${o} already started`),!1;try{t.start(),t.started=!0}catch(s){return ao.error(`Failed to start ${o}
  20. `,s),!1}}if(r?.length){ao.info("Registering commands of plugin",o);for(let s of r)try{mi(s,o)}catch(l){return ao.error(`Failed to register command ${s.name}
  21. `,l),!1}}if(i)for(let s in i)B.subscribe(s,i[s]);return!0},e=>`startPlugin ${e.name}`),mp=jo("stopPlugin",function(t){let{name:o,commands:r,flux:i}=t;if(t.stop){if(ao.info("Stopping plugin",o),!t.started)return ao.warn(`${o} already stopped`),!1;try{t.stop(),t.started=!1}catch(s){return ao.error(`Failed to stop ${o}
  22. `,s),!1}}if(r?.length){ao.info("Unregistering commands of plugin",o);for(let s of r)try{Ms(s.name)}catch(l){return ao.error(`Failed to unregister command ${s.name}
  23. `,l),!1}}if(i)for(let s in i)B.unsubscribe(s,i[s]);return!0},e=>`stopPlugin ${e.name}`)});function QP(e){oe.show({message:e,type:oe.Type.FAILURE,id:oe.genId(),options:{position:oe.Position.BOTTOM}})}function VP({required:e}){return n(It,{className:Dr("info-card",{"restart-card":e})},e?n(f,null,n(S.FormTitle,{tag:"h5"},"Restart required!"),n(S.FormText,{className:Dr("dep-text")},"Restart now to apply new plugins and their settings"),n(C,{color:C.Colors.YELLOW,onClick:()=>location.reload()},"Restart")):n(f,null,n(S.FormTitle,{tag:"h5"},"Plugin Management"),n(S.FormText,null,"Press the cog wheel or info icon to get more info on a plugin"),n(S.FormText,null,"Plugins with a cog wheel have settings you can modify!")))}function Va({plugin:e,disabled:t,onRestartNeeded:o,onMouseEnter:r,onMouseLeave:i,isNew:s}){let l=E.plugins[e.name],c=()=>l.enabled??!1;function u(){rs(async()=>m=>n(sp,{...m,plugin:e,onRestartNeeded:()=>o(e.name)}))}function p(){let m=c();if(!m){let{restartNeeded:v,failures:T}=ol(e);if(T.length){Uv.error(`Failed to start dependencies for ${e.name}: ${T.join(", ")}`),Hu("Failed to start dependencies: "+T.join(", "),"Close",()=>null);return}else if(v){l.enabled=!0,o(e.name);return}}if(e.patches?.length){l.enabled=!m,o(e.name);return}if(m&&!e.started){l.enabled=!m;return}if(!(m?mp(e):As(e))){l.enabled=!1;let v=`Error while ${m?"stopping":"starting"} plugin ${e.name}`;Uv.error(v),QP(v);return}l.enabled=!m}return n(tl,{name:e.name,description:e.description,isNew:s,enabled:c(),setEnabled:p,disabled:t,onMouseEnter:r,onMouseLeave:i,infoButton:n("button",{role:"switch",onClick:()=>u(),className:te(JP.button,Dr("info-button"))},e.options&&!Vi(e.options)?n(lv,null):n(Ya,null))})}function gp(){let e=pt(),t=_.useMemo(()=>new Ps,[]);_.useEffect(()=>()=>void(t.hasChanges&&Et.show({title:"Restart required",body:n(f,null,n("p",null,"The following plugins require a restart:"),n("div",null,t.map((v,T)=>n(f,null,T>0&&", ",_e.parse("`"+v+"`"))))),confirmText:"Restart now",cancelText:"Later!",onConfirm:()=>location.reload()})),[]);let o=_.useMemo(()=>{let v={};for(let T in $e){let N=$e[T].dependencies;if(N)for(let b of N)v[b]??=[],v[b].push(T)}return v},[]),r=_.useMemo(()=>Object.values($e).sort((v,T)=>v.name.localeCompare(T.name)),[]),[i,s]=_.useState({value:"",status:0}),l=v=>s(T=>({...T,value:v})),c=v=>s(T=>({...T,status:v})),u=v=>{let T=e.plugins[v.name]?.enabled;if(T&&i.status===2||!T&&i.status===1||i.status===3&&!p?.includes(v.name))return!1;if(!i.value.length)return!0;let N=i.value.toLowerCase();return v.name.toLowerCase().includes(N)||v.description.toLowerCase().includes(N)||v.tags?.some(b=>b.toLowerCase().includes(N))},[p]=lt(()=>Rt("Vencord_existingPlugins").then(v=>{let T=Date.now()/1e3,N={},b=Object.values(r).map(k=>k.name),P=[];for(let{name:k}of r)(N[k]=v?.[k]??T)+60*60*24*2>T&&P.push(k);return ro("Vencord_existingPlugins",N),Tr.isEqual(P,b)?[]:P})),m,h;if(r?.length){m=[],h=[];for(let v of r){if(!v.options&&v.name.endsWith("API")&&i.value!=="API"||!u(v))continue;if(v.required||o[v.name]?.some(N=>e.plugins[N].enabled)){let N=v.required?"This plugin is required for Vencord to function.":eI(o[v.name]?.filter(b=>e.plugins[b].enabled));h.push(n(ee,{text:N,key:v.name},({onMouseLeave:b,onMouseEnter:P})=>n(Va,{onMouseLeave:b,onMouseEnter:P,onRestartNeeded:k=>t.handleChange(k),disabled:!0,plugin:v})))}else m.push(n(Va,{onRestartNeeded:N=>t.handleChange(N),disabled:!1,plugin:v,isNew:p?.includes(v.name),key:v.name}))}}else m=h=n(Q,{variant:"text-md/normal"},"No plugins meet search criteria.");return n(bo,{title:"Plugins"},n(VP,{required:t.hasChanges}),n(S.FormTitle,{tag:"h5",className:te(z.top20,z.bottom8)},"Filters"),n("div",{className:Dr("filter-controls")},n(et,{autoFocus:!0,value:i.value,placeholder:"Search for a plugin...",onChange:l,className:z.bottom20}),n("div",{className:$v.inputWrapper},n(ho,{className:$v.inputDefault,options:[{label:"Show All",value:0,default:!0},{label:"Show Enabled",value:1},{label:"Show Disabled",value:2},{label:"Show New",value:3}],serialize:String,select:c,isSelected:v=>v===i.status,closeOnSelect:!0}))),n(S.FormTitle,{className:z.top20},"Plugins"),n("div",{className:Dr("grid")},m),n(S.FormDivider,{className:z.top20}),n(S.FormTitle,{tag:"h5",className:te(z.top20,z.bottom8)},"Required Plugins"),n("div",{className:Dr("grid")},h))}function eI(e){return n(_.Fragment,null,n(S.FormText,null,"This plugin is required by:"),e.map(t=>n(S.FormText,{className:Dr("dep-text")},t)))}var Dr,Uv,$v,JP,rp=g(()=>{"use strict";a();ov();Jo();ju();$();ot();Dt();Rv();cp();qn();up();Je();it();Pe();st();ut();W();x();Nr();nl();Dr=Be("vc-plugins-"),Uv=new ie("PluginSettings","#a6d189"),$v=A("inputDefault","inputWrapper"),JP=A("button","disabled","enabled")});var Gv={};ze(Gv,{default:()=>tI});var tI,Hv=g(()=>{"use strict";a();rp();qn();tI=To(gp,"Plugins")});function rt(e){return e.disabled&&(e.style??={},e.style.pointerEvents="none",e["aria-disabled"]=!0),n("a",{role:"link",target:"_blank",...e},e.children)}var en=g(()=>{"use strict";a()});var zv={};ze(zv,{default:()=>cI});function iI({link:e}){let[t,o,r]=lt(()=>fetch(e).then(s=>{if(s.status>300)throw`${s.status} ${s.statusText}`;let l=s.headers.get("Content-Type");if(!l?.startsWith("text/css")&&!l?.startsWith("text/plain"))throw"Not a CSS file. Remember to use the raw link!";return"Okay!"})),i=r?"Checking...":o?`Error: ${o instanceof Error?o.message:String(o)}`:"Valid!";return n(S.FormText,{style:{color:r?"var(--text-muted)":o?"var(--text-danger)":"var(--text-positive)"}},i)}function sI({themeLinks:e}){return e.length?n(f,null,n(S.FormTitle,{className:z.top20,tag:"h5"},"Validator"),n(S.FormText,null,"This section will tell you whether your themes can successfully be loaded"),n("div",null,e.map(t=>n(It,{style:{padding:".5em",marginBottom:".5em",marginTop:".5em"},key:t},n(S.FormTitle,{tag:"h5",style:{overflowWrap:"break-word"}},t),n(iI,{link:t}))))):null}function aI({theme:e,enabled:t,onChange:o,onDelete:r}){return n(tl,{name:e.name,description:e.description,author:e.author,enabled:t,setEnabled:o,infoButton:!1,footer:n(ce,{flexDirection:"row",style:{gap:"0.2em"}},!!e.website&&n(rt,{href:e.website},"Website"),!!(e.website&&e.invite)&&" \u2022 ",!!e.invite&&n(rt,{href:`https://discord.gg/${e.invite}`,onClick:async i=>{i.preventDefault();let{invite:s}=await oI.resolveInvite(e.invite,"Desktop Modal");if(!s)return $t("Invalid or expired invite");B.dispatch({type:"INVITE_MODAL_OPEN",invite:s,code:e.invite,context:"APP"})}},"Discord Server"))})}function lI(){let e=pt(["themeLinks","enabledThemes"]),t=to(null),[o,r]=X(0),[i,s]=X(e.themeLinks.join(`
  24. `)),[l,c]=X(null),[u,,p]=lt(VencordNative.themes.getThemesDir);ue(()=>{m()},[]);async function m(){let P=await VencordNative.themes.getThemesList();c(P)}function h(P,k){if(k){if(e.enabledThemes.includes(P))return;e.enabledThemes=[...e.enabledThemes,P]}else e.enabledThemes=e.enabledThemes.filter(M=>M!==P)}async function v(P){if(P.stopPropagation(),P.preventDefault(),!P.currentTarget?.files?.length)return;let{files:k}=P.currentTarget,M=Array.from(k,O=>{let{name:H}=O;if(!!H.endsWith(".css"))return new Promise((Z,K)=>{let q=new FileReader;q.onload=()=>{VencordNative.themes.uploadTheme(H,q.result).then(Z).catch(K)},q.readAsText(O)})});await Promise.all(M),m()}function T(){return n(f,null,n(It,{className:"vc-settings-card"},n(S.FormTitle,{tag:"h5"},"Find Themes:"),n("div",{style:{marginBottom:".5em",display:"flex",flexDirection:"column"}},n(rt,{style:{marginRight:".5em"},href:"https://betterdiscord.app/themes"},"BetterDiscord Themes"),n(rt,{href:"https://github.com/search?q=discord+theme"},"GitHub")),n(S.FormText,null,'If using the BD site, click on "Download" and place the downloaded .theme.css file into your themes folder.')),n(S.FormSection,{title:"Local Themes"},n(It,{className:"vc-settings-quick-actions-card"},n(f,null,n(C,{onClick:()=>za(u),size:C.Sizes.SMALL,disabled:p},"Open Themes Folder"),n(C,{onClick:m,size:C.Sizes.SMALL},"Load missing Themes"),n(C,{onClick:()=>VencordNative.quickCss.openEditor(),size:C.Sizes.SMALL},"Edit QuickCSS"))),n("div",{className:rI("grid")},l?.map(P=>n(aI,{key:P.fileName,enabled:e.enabledThemes.includes(P.fileName),onChange:k=>h(P.fileName,k),onDelete:async()=>{h(P.fileName,!1),await VencordNative.themes.deleteTheme(P.fileName),m()},theme:P})))))}function N(){e.themeLinks=[...new Set(i.trim().split(/\n+/).map(P=>P.trim()).filter(Boolean))]}function b(){return n(f,null,n(It,{className:"vc-settings-card vc-text-selectable"},n(S.FormTitle,{tag:"h5"},"Paste links to css files here"),n(S.FormText,null,"One link per line"),n(S.FormText,null,"Make sure to use direct links to files (raw or github.io)!")),n(S.FormSection,{title:"Online Themes",tag:"h5"},n(wa,{value:i,onChange:s,className:te(nI.textarea,"vc-settings-theme-links"),placeholder:"Theme Links",spellCheck:!1,onBlur:N,rows:10}),n(sI,{themeLinks:e.themeLinks})))}return n(bo,{title:"Themes"},n(No,{type:"top",look:"brand",className:"vc-settings-tab-bar",selectedItem:o,onItemSelect:r},n(No.Item,{className:"vc-settings-tab-bar-item",id:0},"Local Themes"),n(No.Item,{className:"vc-settings-tab-bar-item",id:1},"Online Themes")),o===0&&T(),o===1&&b())}var oI,U6,nI,rI,cI,jv=g(()=>{"use strict";a();$();ot();Ct();Dt();en();it();Pe();Hn();ut();W();x();cp();qn();oI=A("resolveInvite"),U6=Vt(e=>e.prototype?.activateUploadDialogue&&e.prototype.setRef),nI=Vt(e=>typeof e.textarea=="string"),rI=Be("vc-settings-theme-");cI=To(lI,"Themes")});var Yv={};ze(Yv,{default:()=>mI});function Wv(e,t){return async()=>{e(!0);try{await t()}catch(r){if(Cr.error("Failed to update",r),r)if(r.code&&r.cmd){let{code:i,path:s,cmd:l,stderr:c}=r;if(i==="ENOENT")var o=`Command \`${s}\` not found.
  25. Please install it and try again`;else{var o=`An error occurred while running \`${l}\`:
  26. `;o+=c||`Code \`${i}\`. See the console for more info`}}else var o="An unknown error occurred. See the console for more info.";else var o=`An unknown error occurred (error is undefined).
  27. Please try again.`;Et.show({title:"Oops!",body:n(So,null,o.split(`
  28. `).map(i=>n("div",null,_e.parse(i))))})}finally{e(!1)}}}function qv({repo:e,hash:t,disabled:o=!1}){return n(rt,{href:`${e}/commit/${t}`,disabled:o},t)}function Kv({updates:e,repo:t,repoPending:o}){return n(It,{style:{padding:".5em"}},e.map(({hash:r,author:i,message:s})=>n("div",null,n("code",null,n(qv,{repo:t,hash:r,disabled:o})),n("span",{style:{marginLeft:"0.5em",color:"var(--text-normal)"}},s," - ",i))))}function uI(e){let[t,o]=_.useState(jn),[r,i]=_.useState(!1),[s,l]=_.useState(!1),c=(t?.length??0)>0;return n(f,null,!t&&li?n(f,null,n(S.FormText,null,"Failed to check updates. Check the console for more info"),n(So,{style:{padding:"1em"}},n("p",null,li.stderr||li.stdout||"An unknown error occurred"))):n(S.FormText,{className:z.bottom8},c?`There are ${t.length} Updates`:"Up to Date!"),c&&n(Kv,{updates:t,...e}),n(ce,{className:te(z.bottom8,z.top8)},c&&n(C,{size:C.Sizes.SMALL,disabled:s||r,onClick:Wv(l,async()=>{await ui()&&(o([]),await new Promise(u=>{Et.show({title:"Update Success!",body:"Successfully updated. Restart now to apply the changes?",confirmText:"Restart",cancelText:"Not now!",onConfirm(){mo(),u()},onCancel:u})}))})},"Update Now"),n(C,{size:C.Sizes.SMALL,disabled:s||r,onClick:Wv(i,async()=>{await ci()?o(jn):(o([]),oe.show({message:"No updates found!",id:oe.genId(),type:oe.Type.MESSAGE,options:{position:oe.Position.BOTTOM}}))})},"Check for Updates")))}function pI(e){return n(f,null,n(S.FormText,{className:z.bottom8},"Your local copy has more recent commits. Please stash or reset them."),n(Kv,{...e,updates:jn}))}function dI(){let e=pt(["notifyAboutUpdates","autoUpdate","autoUpdateNotification"]),[t,o,r]=lt(Ou,{fallbackValue:"Loading..."});_.useEffect(()=>{o&&Cr.error("Failed to retrieve repo",o)},[o]);let i={repo:t,repoPending:r};return n(bo,{title:"Vencord Updater"},n(S.FormTitle,{tag:"h5"},"Updater Settings"),n(mt,{value:e.notifyAboutUpdates,onChange:s=>e.notifyAboutUpdates=s,note:"Shows a notification on startup",disabled:e.autoUpdate},"Get notified about new updates"),n(mt,{value:e.autoUpdate,onChange:s=>e.autoUpdate=s,note:"Automatically update Vencord without confirmation prompt"},"Automatically update"),n(mt,{value:e.autoUpdateNotification,onChange:s=>e.autoUpdateNotification=s,note:"Shows a notification when Vencord automatically updates",disabled:!e.autoUpdate},"Get notified when an automatic update completes"),n(S.FormTitle,{tag:"h5"},"Repo"),n(S.FormText,{className:"vc-text-selectable"},r?t:o?"Failed to retrieve - check console":n(rt,{href:t},t.split("/").slice(-2).join("/"))," ","(",n(qv,{hash:po,repo:t,disabled:r}),")"),n(S.FormDivider,{className:z.top8+" "+z.bottom8}),n(S.FormTitle,{tag:"h5"},"Updates"),fs?n(pI,{...i}):n(uI,{...i}))}var mI,Zv=g(()=>{"use strict";a();$();ni();Ct();en();it();Pe();Hn();ut();kr();x();ti();qn();mI=To(dI,"Updater")});function rl({value:e,onChange:t,validate:o}){let[r,i]=_.useState(e),[s,l]=_.useState();function c(u){i(u);let p=o(u);p===!0?(l(void 0),t(u)):l(p)}return n(f,null,n(et,{type:"text",value:r,onChange:c,error:s}))}var hp=g(()=>{"use strict";a();x()});var Xv={};ze(Xv,{default:()=>vI});function fI(e){try{return new URL(e),!0}catch{return"Invalid URL"}}async function gI(){let e=await fetch(new URL("/v1/",Gn()),{method:"DELETE",headers:new Headers({Authorization:await si()})});if(!e.ok){Ha.error(`Failed to erase data, API returned ${e.status}`),ke({title:"Cloud Integrations",body:`Could not erase all data (API returned ${e.status}), please contact support.`,color:"var(--red-360)"});return}E.cloud.authenticated=!1,await Ru(),ke({title:"Cloud Integrations",body:"Successfully erased all data.",color:"var(--green-360)"})}function hI(){let{cloud:e}=pt(["cloud.authenticated","cloud.settingsSync"]),t=e.authenticated&&e.settingsSync;return n(S.FormSection,{title:"Settings Sync",className:z.top16},n(S.FormText,{variant:"text-md/normal",className:z.bottom20},"Synchronize your settings to the cloud. This allows easy synchronization across multiple devices with minimal effort."),n(mt,{key:"cloud-sync",disabled:!e.authenticated,value:e.settingsSync,onChange:o=>{e.settingsSync=o}},"Settings Sync"),n("div",{className:"vc-cloud-settings-sync-grid"},n(C,{size:C.Sizes.SMALL,disabled:!t,onClick:()=>ai(!0)},"Sync to Cloud"),n(ee,{text:"This will overwrite your local settings with the ones on the cloud. Use wisely!"},({onMouseLeave:o,onMouseEnter:r})=>n(C,{onMouseLeave:o,onMouseEnter:r,size:C.Sizes.SMALL,color:C.Colors.RED,disabled:!t,onClick:()=>ja(!0,!0)},"Sync from Cloud")),n(C,{size:C.Sizes.SMALL,color:C.Colors.RED,disabled:!t,onClick:()=>zy()},"Delete Cloud Settings")))}function yI(){let e=pt(["cloud.authenticated","cloud.url"]);return n(bo,{title:"Vencord Cloud"},n(S.FormSection,{title:"Cloud Settings",className:z.top16},n(S.FormText,{variant:"text-md/normal",className:z.bottom20},"Vencord comes with a cloud integration that adds goodies like settings sync across devices. It ",n(rt,{href:"https://vencord.dev/cloud/privacy"},"respects your privacy"),", and the ",n(rt,{href:"https://github.com/Vencord/Backend"},"source code")," is AGPL 3.0 licensed so you can host it yourself."),n(mt,{key:"backend",value:e.cloud.authenticated,onChange:t=>{t&&Oy(),t||(e.cloud.authenticated=t)},note:"This will request authorization if you have not yet set up cloud integrations."},"Enable Cloud Integrations"),n(S.FormTitle,{tag:"h5"},"Backend URL"),n(S.FormText,{className:z.bottom8},"Which backend to use when using cloud integrations."),n(rl,{key:"backendUrl",value:e.cloud.url,onChange:t=>{e.cloud.url=t,e.cloud.authenticated=!1,Ru()},validate:fI}),n(C,{className:z.top8,size:C.Sizes.MEDIUM,color:C.Colors.RED,disabled:!e.cloud.authenticated,onClick:()=>Et.show({title:"Are you sure?",body:"Once your data is erased, we cannot recover it. There's no going back!",onConfirm:gI,confirmText:"Erase it!",confirmColor:"vc-cloud-erase-data-danger-btn",cancelText:"Nevermind"})},"Erase All Data"),n(S.FormDivider,{className:z.top16})),n(hI,null))}var vI,Jv=g(()=>{"use strict";a();Fn();$();hp();en();Du();it();ds();x();qn();vI=To(yI,"Cloud")});var Qv={};ze(Qv,{default:()=>bI});function SI(){return n(bo,{title:"Backup & Restore"},n(It,{className:te("vc-settings-card","vc-backup-restore-card")},n(ce,{flexDirection:"column"},n("strong",null,"Warning"),n("span",null,"Importing a settings file will overwrite your current settings."))),n(Q,{variant:"text-md/normal",className:z.bottom8},"You can import and export your Vencord settings as a JSON file. This allows you to easily transfer your settings to another device, or recover your settings after reinstalling Vencord or Discord."),n(Q,{variant:"text-md/normal",className:z.bottom8},"Settings Export contains:",n("ul",null,n("li",null,"\u2014 Custom QuickCSS"),n("li",null,"\u2014 Theme Links"),n("li",null,"\u2014 Plugin Settings"))),n(ce,null,n(C,{onClick:()=>Hy(),size:C.Sizes.SMALL},"Import Settings"),n(C,{onClick:$y,size:C.Sizes.SMALL},"Export Settings")))}var bI,Vv=g(()=>{"use strict";a();Ct();it();Pe();ds();x();qn();bI=To(SI,"Backup & Restore")});var Ns,yp=g(()=>{"use strict";a();kt();$();I();w();x();ti();Ns=y({name:"Settings",description:"Adds Settings UI and debug info",authors:[d.Ven,d.Megu],required:!0,start(){de("user-settings-cog",e=>()=>{e.find(o=>Array.isArray(o)&&o.some(r=>r?.props?.id==="VencordSettings"))?.forEach(o=>{let r=o?.props?.id;(r?.startsWith("Vencord")||r?.startsWith("Vesktop"))&&(o.props.action=()=>xr.open(r))})})},patches:[{find:".versionHash",replacement:[{match:/\[\(0,.{1,3}\.jsxs?\)\((.{1,10}),(\{[^{}}]+\{.{0,20}.versionHash,.+?\})\)," "/,replace:(e,t,o)=>(o=o.replace(/children:\[.+\]/,""),`${e},Vencord.Plugins.plugins.Settings.makeInfoElements(${t}, ${o})`)}]},{find:"Messages.ACTIVITY_SETTINGS",replacement:{get match(){switch(E.plugins.Settings.settingsLocation){case"top":return/\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.USER_SETTINGS\}/;case"aboveNitro":return/\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.BILLING_SETTINGS\}/;case"belowNitro":return/\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.APP_SETTINGS\}/;case"belowActivity":return/(?<=\{section:(\i\.\i)\.DIVIDER},)\{section:"changelog"/;case"bottom":return/\{section:(\i\.\i)\.CUSTOM,\s*element:.+?}/;case"aboveActivity":default:return/\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.ACTIVITY_SETTINGS\}/}},replace:"...$self.makeSettingsCategories($1),$&"}}],customSections:[],makeSettingsCategories(e){return[{section:e.HEADER,label:"Vencord",className:"vc-settings-header"},{section:"VencordSettings",label:"Vencord",element:(tv(),Ln(ev)).default,className:"vc-settings"},{section:"VencordPlugins",label:"Plugins",element:(Hv(),Ln(Gv)).default,className:"vc-plugins"},{section:"VencordThemes",label:"Themes",element:(jv(),Ln(zv)).default,className:"vc-themes"},{section:"VencordUpdater",label:"Updater",element:(Zv(),Ln(Yv)).default,className:"vc-updater"},{section:"VencordCloud",label:"Cloud",element:(Jv(),Ln(Xv)).default,className:"vc-cloud"},{section:"VencordSettingsSync",label:"Backup & Restore",element:(Vv(),Ln(Qv)).default,className:"vc-backup-restore"},!1,...this.customSections.map(t=>t(e)),{section:e.DIVIDER}].filter(Boolean)},options:{settingsLocation:{type:4,description:"Where to put the Vencord settings section",options:[{label:"At the very top",value:"top"},{label:"Above the Nitro section",value:"aboveNitro"},{label:"Below the Nitro section",value:"belowNitro"},{label:"Above Activity Settings",value:"aboveActivity",default:!0},{label:"Below Activity Settings",value:"belowActivity"},{label:"At the very bottom",value:"bottom"}],restartNeeded:!0}},get electronVersion(){return VencordNative.native.getVersions().electron||window.armcord?.electron||null},get chromiumVersion(){try{return VencordNative.native.getVersions().chrome||navigator.userAgentData?.brands?.find(e=>e.brand==="Chromium"||e.brand==="Google Chrome")?.version||null}catch{return null}},get additionalInfo(){return" (Standalone)"},makeInfoElements(e,t){let{electronVersion:o,chromiumVersion:r,additionalInfo:i}=this;return n(f,null,n(e,{...t},"Vencord ",po,i),o&&n(e,{...t},"Electron ",o),r&&n(e,{...t},"Chromium ",r))}})});var e1,TI,vp,t1=g(()=>{"use strict";a();yi();I();Pe();yn();w();kr();x();ti();Nr();yp();e1="Vencord-SupportHelper-Dismiss",TI=[Na,"1024286218801926184","1033680203433660458"],vp=y({name:"SupportHelper",required:!0,description:"Helps us provide support to you",authors:[d.Ven],dependencies:["CommandsAPI"],commands:[{name:"vencord-debug",description:"Send Vencord Debug info",predicate:e=>TI.includes(e.channel.id),async execute(){let{RELEASE_CHANNEL:e}=window.GLOBAL_ENV,t=(()=>`Discord Desktop v${DiscordNative.app.getVersion()}`)(),o=c=>c.endsWith("API")||$e[c].required,r=Object.keys($e).filter(c=>Vencord.Plugins.isPluginEnabled(c)&&!o(c)),i=Object.keys($e).filter(c=>Vencord.Plugins.isPluginEnabled(c)&&o(c)),s={Vencord:`v1.6.5 \u2022 ${po}${Ns.additionalInfo} - ${Intl.DateTimeFormat("en-GB",{dateStyle:"medium"}).format(1702156200369)}`,"Discord Branch":e,Client:t,Platform:window.navigator.platform,Outdated:Wn,OpenAsar:"openasar"in window};return s["Last Crash Reason"]=(await DiscordNative.processUtils.getLastCrash())?.rendererCrashReason??"N/A",{content:`
  29. **Vencord Debug Info**
  30. >>> ${Object.entries(s).map(([c,u])=>`${c}: ${u}`).join(`
  31. `)}
  32. Enabled Plugins (${r.length+i.length}):
  33. ${Ss(r.join(", ")+`
  34. `+i.join(", "))}
  35. `.trim().replaceAll("```\n","```")}}}],flux:{async CHANNEL_SELECT({channelId:e}){if(e===Na&&!ts(F.getCurrentUser().id)&&Wn&&po!==await xt.get(e1)){let t=()=>xt.set(e1,po);Et.show({title:"Hold on!",body:n("div",null,n(S.FormText,null,"You are using an outdated version of Vencord! Chances are, your issue is already fixed."),n(S.FormText,null,"Please first update using the Updater Page in Settings, or use the VencordInstaller (Update Vencord Button) to do so, in case you can't access the Updater page.")),onCancel:t,onConfirm:t})}}}})});var Sp,o1=g(()=>{"use strict";a();I();w();Sp=y({name:"AlwaysAnimate",description:"Animates anything that can be animated",authors:[d.FieryFlames],patches:[{find:"canAnimate:",all:!0,noWarn:!0,replacement:{match:/canAnimate:.+?(?=([,}].*?\)))/g,replace:(e,t)=>t.match(/}=.+/)==null?"canAnimate:!0":e}},{find:".Messages.GUILD_OWNER,",replacement:{match:/(?<=\.activityEmoji,.+?animate:)\i/,replace:"!0"}}]})});var bp,n1=g(()=>{"use strict";a();I();w();bp=y({name:"AlwaysTrust",description:"Removes the annoying untrusted domain and suspicious file popup",authors:[d.zt],patches:[{find:'.displayName="MaskedLinkStore"',replacement:{match:/(?<=isTrustedDomain\(\i\){)return \i\(\i\)/,replace:"return true"}},{find:"isSuspiciousDownload:",replacement:{match:/function \i\(\i\){(?=.{0,60}\.parse\(\i\))/,replace:"$&return null;"}}]})});var xI,Tp,r1=g(()=>{"use strict";a();$();I();w();xI=/\.tar\.\w+$/,Tp=y({name:"AnonymiseFileNames",authors:[d.obscurity],description:"Anonymise uploaded file names",patches:[{find:"instantBatchUpload:function",replacement:{match:/uploadFiles:(.{1,2}),/,replace:"uploadFiles:(...args)=>(args[0].uploads.forEach(f=>f.filename=$self.anonymise(f.filename)),$1(...args)),"}}],options:{method:{description:"Anonymising method",type:4,options:[{label:"Random Characters",value:0,default:!0},{label:"Consistent",value:1},{label:"Timestamp (4chan-like)",value:2}]},randomisedLength:{description:"Random characters length",type:1,default:7,disabled:()=>E.plugins.AnonymiseFileNames.method!==0},consistent:{description:"Consistent filename",type:0,default:"image",disabled:()=>E.plugins.AnonymiseFileNames.method!==1}},anonymise(e){let t="image",r=xI.exec(e)?.index??e.lastIndexOf("."),i=r!==-1?e.slice(r):"";switch(E.plugins.AnonymiseFileNames.method){case 0:let s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";t=Array.from({length:E.plugins.AnonymiseFileNames.randomisedLength},()=>s[Math.floor(Math.random()*s.length)]).join("");break;case 1:t=E.plugins.AnonymiseFileNames.consistent;break;case 2:t=`${Math.floor(Date.now()/1e3)}${Math.floor(window.performance.now())}`;break}return t+i}})});var xp,i1=g(()=>{"use strict";a();I();w();xp=y({name:"BANger",description:"Replaces the GIF in the ban dialogue with a custom one.",authors:[d.Xinto,d.Glitch],patches:[{find:"BAN_CONFIRM_TITLE.",replacement:{match:/src:\i\("\d+"\)/g,replace:"src: Vencord.Settings.plugins.BANger.source"}}],options:{source:{description:"Source to replace ban GIF with (Video or Gif)",type:0,default:"https://i.imgur.com/wp5q52C.mp4",restartNeeded:!0}}})});var s1,a1,wI,l1,c1=g(()=>{"use strict";a();le();W();x();wp();s1=we("ChannelRTCStore"),a1=A("a","animated","useTransition"),wI=je('("guildsnav")'),l1=U.wrap(e=>{let t=Ke([vi],()=>vi.getExpandedFolders()),o=Ke([s1],()=>s1.isFullscreenInContext()),r=n(wI,{...e,isBetterFolders:!0,betterFoldersExpandedIds:t}),i=!!t.size,s=document.querySelector(e.className.split(" ").map(c=>`.${c}`).join("")),l={display:o?"none":"flex"};return!s||!gt.store.sidebarAnim?i?n("div",{style:l},r):null:n(a1.Transition,{items:i,from:{width:0},enter:{width:s.getBoundingClientRect().width},leave:{width:0},config:{duration:200}},(c,u)=>u&&n(a1.animated.div,{style:{...c,...l}},r))},{noop:!0})});function II(e){return PI.getGuildFolders().find(t=>t.guildIds.includes(e))}function p1(){for(let e of vi.getExpandedFolders())Pp.toggleGuildFolderExpand(e)}var MI,PI,vi,Pp,u1,Mp,gt,Ip,wp=g(()=>{"use strict";a();$();I();w();W();x();c1();({GuildsTree:MI}=A("GuildsTree")),PI=we("SortedGuildStore"),vi=we("ExpandedGuildFolderStore"),Pp=A("move","toggleGuildFolderExpand"),u1=null,Mp=!1;gt=L({sidebar:{type:3,description:"Display servers from folder on dedicated sidebar",restartNeeded:!0,default:!0},sidebarAnim:{type:3,description:"Animate opening the folder sidebar",default:!0},closeAllFolders:{type:3,description:"Close all folders when selecting a server not in a folder",default:!1},closeAllHomeButton:{type:3,description:"Close all folders when clicking on the home button",restartNeeded:!0,default:!1},closeOthers:{type:3,description:"Close other folders when opening a folder",default:!1},forceOpen:{type:3,description:"Force a folder to open when switching to a server of that folder",default:!1},keepIcons:{type:3,description:"Keep showing guild icons in the primary guild bar folder when it's open in the BetterFolders sidebar",restartNeeded:!0,default:!1},showFolderIcon:{type:4,description:"Show the folder icon above the folder guilds in the BetterFolders sidebar",options:[{label:"Never",value:0},{label:"Always",value:1,default:!0},{label:"When more than one folder is expanded",value:2}],restartNeeded:!0}}),Ip=y({name:"BetterFolders",description:"Shows server folders on dedicated sidebar and adds folder related improvements",authors:[d.juby,d.AutumnVN,d.Nuckyz],settings:gt,patches:[{find:'("guildsnav")',predicate:()=>gt.store.sidebar,replacement:[{match:/(?<=let{disableAppDownload:\i=\i\.isPlatformEmbedded,isOverlay:.+?)(?=}=\i,)/,replace:",isBetterFolders"},{match:/(useStateFromStoresArray\).{0,25}let \i)=(\i\.\i.getGuildsTree\(\))/,replace:(e,t,o)=>`${t}=$self.getGuildTree(!!arguments[0].isBetterFolders,${o},arguments[0].betterFoldersExpandedIds)`},{match:/lastTargetNode:\i\[\i\.length-1\].+?Fragment.+?\]}\)\]/,replace:"$&.filter($self.makeGuildsBarGuildListFilter(!!arguments[0].isBetterFolders))"},{match:/unreadMentionsIndicatorBottom,barClassName.+?}\)\]/,replace:"$&.filter($self.makeGuildsBarTreeFilter(!!arguments[0].isBetterFolders))"},{match:/(?<=\.Messages\.SERVERS.+?switch\((\i)\.type\){case \i\.\i\.FOLDER:.+?folderNode:\i,)/,replace:'isBetterFolders:typeof isBetterFolders!=="undefined"?isBetterFolders:false,'}]},{find:".MAX_GUILD_FOLDER_NAME_LENGTH,",predicate:()=>gt.store.sidebar&&gt.store.showFolderIcon!==1,replacement:[{match:/(useStateFromStores\).{0,20}=>)(\i\.\i)\.isFolderExpanded\(\i\)/,replace:(e,t,o)=>`${t}${o}.getExpandedFolders()`},{match:/(?<=folderNode:(\i),expanded:)\i(?=,)/,replace:(e,t)=>`typeof ${e}==="boolean"?${e}:${e}.has(${t}.id),betterFoldersExpandedIds:${e} instanceof Set?${e}:void 0`}]},{find:".FOLDER_ITEM_GUILD_ICON_MARGIN);",predicate:()=>gt.store.sidebar,replacement:[{predicate:()=>gt.store.keepIcons,match:/(?<=let{folderNode:\i,setNodeRef:\i,.+?expanded:(\i),.+?;)(?=let)/,replace:(e,t)=>`${t}=!!arguments[0].isBetterFolders&&${t};`},{predicate:()=>!gt.store.keepIcons,match:/(?<=\.Messages\.SERVER_FOLDER_PLACEHOLDER.+?useTransition\)\()/,replace:"!!arguments[0].isBetterFolders&&"},{predicate:()=>!gt.store.keepIcons,match:/expandedFolderBackground,.+?,(?=\i\(\(\i,\i,\i\)=>{let{key.{0,45}ul)(?<=selected:\i,expanded:(\i),.+?)/,replace:(e,t)=>`${e}!arguments[0].isBetterFolders&&${t}?null:`},{predicate:()=>gt.store.showFolderIcon!==1,match:/(?<=\.wrapper,children:\[)/,replace:"$self.shouldShowFolderIconAndBackground(!!arguments[0].isBetterFolders,arguments[0].betterFoldersExpandedIds)&&"},{predicate:()=>gt.store.showFolderIcon!==1,match:/(?<=\.expandedFolderBackground.+?}\),)(?=\i,)/,replace:"!$self.shouldShowFolderIconAndBackground(!!arguments[0].isBetterFolders,arguments[0].betterFoldersExpandedIds)?null:"}]},{find:"APPLICATION_LIBRARY,render",predicate:()=>gt.store.sidebar,replacement:{match:/(?<=({className:\i\.guilds,themeOverride:\i})\))/,replace:",$self.FolderSideBar($1)"}},{find:".Messages.DISCODO_DISABLED",predicate:()=>gt.store.closeAllHomeButton,replacement:{match:/(?<=onClick:\(\)=>{)(?=.{0,200}"discodo")/,replace:"$self.closeFolders();"}}],flux:{CHANNEL_SELECT(e){if(!(!gt.store.closeAllFolders&&!gt.store.forceOpen)&&u1!==e.guildId){u1=e.guildId;let t=II(e.guildId);t?.folderId?gt.store.forceOpen&&!vi.isFolderExpanded(t.folderId)&&Pp.toggleGuildFolderExpand(t.folderId):gt.store.closeAllFolders&&p1()}},TOGGLE_GUILD_FOLDER_EXPAND(e){gt.store.closeOthers&&!Mp&&(Mp=!0,B.wait(()=>{let t=vi.getExpandedFolders();if(t.size>1)for(let o of t)o!==e.folderId&&Pp.toggleGuildFolderExpand(o);Mp=!1}))}},getGuildTree(e,t,o){if(!e||o==null)return t;let r=new MI;return r.root.children=t.root.children.filter(i=>o.has(i.id)),r.nodes=Object.fromEntries(Object.entries(t.nodes).filter(([i,s])=>o.has(s.id)||o.has(s.parentId))),r},makeGuildsBarGuildListFilter(e){return t=>e?t?.props?.["aria-label"]===Qe.Messages.SERVERS:!0},makeGuildsBarTreeFilter(e){return t=>e?"onScroll"in t.props:!0},shouldShowFolderIconAndBackground(e,t){if(!e)return!0;switch(gt.store.showFolderIcon){case 0:return!1;case 1:return!0;case 2:return(t?.size??0)>1;default:return!0}},FolderSideBar:e=>n(l1,{...e}),closeFolders:p1})});var Ap,d1=g(()=>{"use strict";a();I();w();Ap=y({name:"BetterGifAltText",authors:[d.Ven],description:"Change GIF alt text from simply being 'GIF' to containing the gif tags / filename",patches:[{find:"onCloseImage=",replacement:{match:/(return.{0,10}\.jsx.{0,50}isWindowFocused)/,replace:"$self.altify(e);$1"}},{find:".Messages.GIF,",replacement:{match:/alt:(\i)=(\i\.default\.Messages\.GIF)(?=,[^}]*\}=(\i))/,replace:"alt_$$:$1=$self.altify($3)||$2"}}],altify(e){if(e.alt??="GIF",e.alt!=="GIF")return e.alt;let t=e.original||e.src;try{t=decodeURI(t)}catch{}let o=t.slice(t.lastIndexOf("/")+1).replace(/\d/g,"").replace(/.gif$/,"").split(/[,\-_ ]+/g).slice(0,20).join(" ");return o.length>300&&(o=o.slice(0,300)+"..."),o&&(e.alt+=` - ${o}`),e.alt}})});var AI,Np,m1=g(()=>{"use strict";a();$();I();w();W();AI=A("section","lastSection"),Np=y({name:"BetterNotesBox",description:"Hide notes or disable spellcheck (Configure in settings!!)",authors:[d.Ven],patches:[{find:"hideNote:",all:!0,noWarn:!0,predicate:()=>Vencord.Settings.plugins.BetterNotesBox.hide,replacement:{match:/hideNote:.+?(?=([,}].*?\)))/g,replace:(e,t)=>t.match(/}=.+/)==null?"hideNote:!0":e}},{find:"Messages.NOTE_PLACEHOLDER",replacement:{match:/\.NOTE_PLACEHOLDER,/,replace:"$&spellCheck:!Vencord.Settings.plugins.BetterNotesBox.noSpellCheck,"}},{find:".Messages.NOTE}",replacement:{match:/(?<=return \i\?)null(?=:\(0,\i\.jsxs)/,replace:"$self.patchPadding(arguments[0])"}}],options:{hide:{type:3,description:"Hide notes",default:!1,restartNeeded:!0},noSpellCheck:{type:3,description:"Disable spellcheck in notes",disabled:()=>E.plugins.BetterNotesBox.hide,default:!1}},patchPadding(e){if(!!e.lastSection)return n("div",{className:AI.lastSection})}})});var Cp,f1=g(()=>{"use strict";a();$();I();w();x();Cp=y({name:"BetterRoleDot",authors:[d.Ven,d.AutumnVN],description:"Copy role colour on RoleDot (accessibility setting) click. Also allows using both RoleDot and coloured names simultaneously",patches:[{find:".dotBorderBase",replacement:{match:/,viewBox:"0 0 20 20"/,replace:"$&,onClick:()=>$self.copyToClipBoard(arguments[0].color),style:{cursor:'pointer'}"}},{find:'"dot"===',all:!0,noWarn:!0,predicate:()=>E.plugins.BetterRoleDot.bothStyles,replacement:{match:/"(?:username|dot)"===\i(?!\.\i)/g,replace:"true"}},{find:".ADD_ROLE_A11Y_LABEL",predicate:()=>E.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!E.plugins.BetterRoleDot.bothStyles,noWarn:!0,replacement:{match:/"dot"===\i/,replace:"true"}},{find:".roleVerifiedIcon",predicate:()=>E.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!E.plugins.BetterRoleDot.bothStyles,noWarn:!0,replacement:{match:/"dot"===\i/,replace:"true"}}],options:{bothStyles:{type:3,description:"Show both role dot and coloured names",restartNeeded:!0,default:!1},copyRoleColorInProfilePopout:{type:3,description:"Allow click on role dot in profile popout to copy role color",restartNeeded:!0,default:!1}},copyToClipBoard(e){oo.copy(e),oe.show({message:"Copied to Clipboard!",type:oe.Type.SUCCESS,id:oe.genId(),options:{duration:1e3,position:oe.Position.BOTTOM}})}})});var kp,g1=g(()=>{"use strict";a();I();w();kp=y({name:"BetterUploadButton",authors:[d.obscurity,d.Ven],description:"Upload with a single click, open menu with right click",patches:[{find:"Messages.CHAT_ATTACH_UPLOAD_OR_INVITE",replacement:{match:/CHAT_ATTACH_UPLOAD_OR_INVITE,onDoubleClick:(.+?:void 0),\.\.\.(\i),/,replace:"$&onClick:$1,onContextMenu:$2.onClick,"}}]})});var h1,y1,v1=g(()=>{"use strict";a();W();h1=we("ApplicationStreamPreviewStore"),y1=we("ApplicationStreamingStore")});var NI,T1,S1,b1,Rp,x1=g(()=>{"use strict";a();kt();Dt();I();nt();w();x();v1();NI=async({guildId:e,channelId:t,ownerId:o})=>{let r=await h1.getPreviewURL(e,t,o);!r||Bo(r)},T1=(e,{userId:t})=>()=>{let o=y1.getAnyStreamForUser(t);if(!o)return;let r=n(G.MenuItem,{label:"View Stream Preview",id:"view-stream-preview",icon:sv,action:()=>o&&NI(o),disabled:!o});e.push(n(G.MenuSeparator,null),r)},S1=(e,{stream:t})=>T1(e,{userId:t.ownerId}),b1=(e,{user:t})=>T1(e,{userId:t.id}),Rp=y({name:"BiggerStreamPreview",description:"This plugin allows you to enlarge stream previews",authors:[d.phil],start:()=>{de("user-context",b1),de("stream-context",S1)},stop:()=>{ge("user-context",b1),ge("stream-context",S1)}})});function w1(){Cs.textContent=`
  36. .vc-nsfw-img [class^=imageWrapper] img,
  37. .vc-nsfw-img [class^=wrapperPaused] video {
  38. filter: blur(${E.plugins.BlurNSFW.blurAmount}px);
  39. transition: filter 0.2s;
  40. }
  41. .vc-nsfw-img [class^=imageWrapper]:hover img,
  42. .vc-nsfw-img [class^=wrapperPaused]:hover video {
  43. filter: unset;
  44. }
  45. `}var Cs,Dp,M1=g(()=>{"use strict";a();$();I();w();Dp=y({name:"BlurNSFW",description:"Blur attachments in NSFW channels until hovered",authors:[d.Ven],patches:[{find:".embedWrapper,embed",replacement:[{match:/\.embedWrapper/g,replace:"$&+(this.props.channel.nsfw?' vc-nsfw-img':'')"}]}],options:{blurAmount:{type:1,description:"Blur Amount",default:10,onChange:w1}},start(){Cs=document.createElement("style"),Cs.id="VcBlurNsfw",document.head.appendChild(Cs),w1()},stop(){Cs?.remove()}})});function CI(e){let t=E.plugins.CallTimer.format==="human",o=m=>t?m:m.toString().padStart(2,"0"),r=m=>t?m:"",i=t?" ":":",s=Math.floor(e/864e5),l=Math.floor(e%864e5/36e5),c=Math.floor(e%864e5%36e5/6e4),u=Math.floor(e%864e5%36e5%6e4/1e3),p="";return s&&(p+=`${s}d `),(l||p)&&(p+=`${o(l)}${r("h")}${i}`),(c||p||!t)&&(p+=`${o(c)}${r("m")}${i}`),p+=`${o(u)}${r("s")}`,p}var Lp,P1=g(()=>{"use strict";a();$();le();I();ut();w();Lp=y({name:"CallTimer",description:"Adds a timer to vcs",authors:[d.Ven],startTime:0,interval:void 0,options:{format:{type:4,description:"The timer format. This can be any valid moment.js format",options:[{label:"30d 23:00:42",value:"stopwatch",default:!0},{label:"30d 23h 00m 42s",value:"human"}]}},patches:[{find:"renderConnectionStatus(){",replacement:{match:/(?<=renderConnectionStatus\(\)\{.+\.channel,children:)\i/,replace:"[$&, $self.renderTimer(this.props.channel.id)]"}}],renderTimer(e){return n(U,{noop:!0},n(this.Timer,{channelId:e}))},Timer({channelId:e}){let t=os({deps:[e]});return n("p",{style:{margin:0}},"Connected for ",n("span",{style:{fontFamily:"var(--font-code)"}},CI(t)))}})});var $p={};ze($p,{_handleClick:()=>DI,_handlePreEdit:()=>RI,_handlePreSend:()=>kI,addClickListener:()=>Fp,addPreEditListener:()=>Lr,addPreSendListener:()=>Kt,removeClickListener:()=>Up,removePreEditListener:()=>Er,removePreSendListener:()=>Yt});async function kI(e,t,o,r){o.replyOptions=r;for(let i of _p)try{let s=await i(e,t,o);if(s&&s.cancel===!0)return!0}catch(s){Ep.error(`MessageSendHandler: Listener encountered an unknown error
  46. `,s)}return!1}async function RI(e,t,o){for(let r of Op)try{await r(e,t,o)}catch(i){Ep.error(`MessageEditHandler: Listener encountered an unknown error
  47. `,i)}}function Kt(e){return _p.add(e),e}function Lr(e){return Op.add(e),e}function Yt(e){return _p.delete(e)}function Er(e){return Op.delete(e)}function DI(e,t,o){e=Co.getMessage(t.id,e.id)??e;for(let r of Bp)try{r(e,t,o)}catch(i){Ep.error(`MessageClickHandler: Listener encountered an unknown error
  48. `,i)}}function Fp(e){return Bp.add(e),e}function Up(e){return Bp.delete(e)}var Ep,_p,Op,Bp,tn=g(()=>{"use strict";a();Je();x();Ep=new ie("MessageEvents","#e5c890"),_p=new Set,Op=new Set;Bp=new Set});var I1,A1=g(()=>{"use strict";a();I1=["action_object_map","action_type_map","action_ref_map","spm@*.aliexpress.com","scm@*.aliexpress.com","aff_platform","aff_trace_key","algo_expid@*.aliexpress.*","algo_pvid@*.aliexpress.*","btsid","ws_ab_test","pd_rd_*@amazon.*","_encoding@amazon.*","psc@amazon.*","tag@amazon.*","ref_@amazon.*","pf_rd_*@amazon.*","pf@amazon.*","crid@amazon.*","keywords@amazon.*","sprefix@amazon.*","sr@amazon.*","ie@amazon.*","node@amazon.*","qid@amazon.*","callback@bilibili.com","cvid@bing.com","form@bing.com","sk@bing.com","sp@bing.com","sc@bing.com","qs@bing.com","pq@bing.com","sc_cid","mkt_tok","trk","trkCampaign","ga_*","gclid","gclsrc","hmb_campaign","hmb_medium","hmb_source","spReportId","spJobID","spUserID","spMailingID","itm_*","s_cid","elqTrackId","elqTrack","assetType","assetId","recipientId","campaignId","siteId","mc_cid","mc_eid","pk_*","sc_campaign","sc_channel","sc_content","sc_medium","sc_outcome","sc_geo","sc_country","nr_email_referer","vero_conv","vero_id","yclid","_openstat","mbid","cmpid","cid","c_id","campaign_id","Campaign","hash@ebay.*","fb_action_ids","fb_action_types","fb_ref","fb_source","fbclid","refsrc@facebook.com","hrc@facebook.com","gs_l","gs_lcp@google.*","ved@google.*","ei@google.*","sei@google.*","gws_rd@google.*","gs_gbg@google.*","gs_mss@google.*","gs_rn@google.*","_hsenc","_hsmi","__hssc","__hstc","hsCtaTracking","source@sourceforge.net","position@sourceforge.net","t@*.twitter.com","s@*.twitter.com","ref_*@*.twitter.com","t@*.x.com","s@*.x.com","ref_*@*.x.com","t@*.fixupx.com","s@*.fixupx.com","ref_*@*.fixupx.com","t@*.fxtwitter.com","s@*.fxtwitter.com","ref_*@*.fxtwitter.com","t@*.twittpr.com","s@*.twittpr.com","ref_*@*.twittpr.com","t@*.fixvx.com","s@*.fixvx.com","ref_*@*.fixvx.com","tt_medium","tt_content","lr@yandex.*","redircnt@yandex.*","feature@youtube.com","kw@youtube.com","si@youtube.com","pp@youtube.com","si@youtu.be","wt_zmc","utm_source","utm_content","utm_medium","utm_campaign","utm_term","si@open.spotify.com","igshid","share_id@reddit.com"]});var N1,LI,Gp,C1=g(()=>{"use strict";a();tn();I();w();A1();N1=/[\\^$.*+?()[\]{}|]/g,LI=RegExp(N1.source),Gp=y({name:"ClearURLs",description:"Removes tracking garbage from URLs",authors:[d.adryd],dependencies:["MessageEventsAPI"],escapeRegExp(e){return e&&LI.test(e)?e.replace(N1,"\\$&"):e||""},createRules(){let e=I1;this.universalRules=new Set,this.rulesByHost=new Map,this.hostRules=new Map;for(let t of e){let o=t.split("@"),r=new RegExp("^"+this.escapeRegExp(o[0]).replace(/\\\*/,".+?")+"$");if(!o[1]){this.universalRules.add(r);continue}let i=new RegExp("^(www\\.)?"+this.escapeRegExp(o[1]).replace(/\\\./,"\\.").replace(/^\\\*\\\./,"(.+?\\.)?").replace(/\\\*/,".+?")+"$"),s=i.toString();this.hostRules.set(s,i),this.rulesByHost.get(s)==null&&this.rulesByHost.set(s,new Set),this.rulesByHost.get(s).add(r)}},removeParam(e,t,o){(t===e||e instanceof RegExp&&e.test(t))&&o.delete(t)},replacer(e){try{var t=new URL(e)}catch{return e}return t.searchParams.entries().next().done?e:(this.universalRules.forEach(o=>{t.searchParams.forEach((r,i,s)=>{this.removeParam(o,i,s)})}),this.hostRules.forEach((o,r)=>{!o.test(t.hostname)||this.rulesByHost.get(r).forEach(i=>{t.searchParams.forEach((s,l,c)=>{this.removeParam(i,l,c)})})}),t.toString())},onSend(e){e.content.match(/http(s)?:\/\//)&&(e.content=e.content.replace(/(https?:\/\/[^\s<]+[^<.,:;"'>)|\]\s])/g,t=>this.replacer(t)))},start(){this.createRules(),this.preSend=Kt((e,t)=>this.onSend(t)),this.preEdit=Lr((e,t,o)=>this.onSend(o))},stop(){Yt(this.preSend),Er(this.preEdit)}})});var k1=g(()=>{});function D1(e){let t=e.toString(16).padStart(6,"0");ks.store.color=t,L1(t)}function OI(){let e=UI(ks.store.color)>45,t=Kn()===2;return n("div",{className:"client-theme-settings"},n("div",{className:"client-theme-container"},n("div",{className:"client-theme-settings-labels"},n(S.FormTitle,{tag:"h3"},"Theme Color"),n(S.FormText,null,"Add a color to your Discord client theme")),n(EI,{color:parseInt(ks.store.color,16),onChange:D1,showEyeDropper:!1,suggestedColors:_I})),e||t?n("div",null,n(S.FormDivider,{className:te(z.top8,z.bottom8)}),n(S.FormText,{className:"client-theme-warning"},"Your theme won't look good:"),e&&n(S.FormText,{className:"client-theme-warning"},"Selected color is very light"),t&&n(S.FormText,{className:"client-theme-warning"},"Light mode isn't supported")):null)}async function BI(){let e=document.querySelectorAll('link[rel="stylesheet"]'),t={};for(let i of e){let s=i.getAttribute("href");if(!s)continue;let c=await(await fetch(s)).text(),u=R1.exec(c);for(;u!==null;){let[,p,m]=u;t[p]=parseFloat(m),u=R1.exec(c)}}let o=Object.entries(t).map(([i,s])=>{let l=s-t["--primary-600-hsl"],c=l>=0?"+":"-";return`${i}: var(--theme-h) var(--theme-s) calc(var(--theme-l) ${c} ${Math.abs(l).toFixed(2)}%);`}).join(`
  49. `),r=document.createElement("style");r.setAttribute("id","clientThemeOffsets"),r.textContent=`:root:root {
  50. ${o}
  51. }`,document.head.appendChild(r)}function L1(e){let{hue:t,saturation:o,lightness:r}=FI(e),i=document.getElementById("clientThemeVars");i||(i=document.createElement("style"),i.setAttribute("id","clientThemeVars"),document.head.appendChild(i)),i.textContent=`:root {
  52. --theme-h: ${t};
  53. --theme-s: ${o}%;
  54. --theme-l: ${r}%;
  55. }`}function FI(e){let t=parseInt(e.substring(0,2),16)/255,o=parseInt(e.substring(2,4),16)/255,r=parseInt(e.substring(4,6),16)/255,i=Math.max(t,o,r),s=Math.min(t,o,r),l=i-s,c,u,p;return p=(i+s)/2,l===0?(c=0,u=0):(u=l/(1-Math.abs(2*p-1)),i===t?c=(o-r)/l%6:i===o?c=(r-t)/l+2:c=(t-o)/l+4,c*=60,c<0&&(c+=360)),u*=100,p*=100,{hue:c,saturation:u,lightness:p}}function UI(e){let t=parseInt(e.substring(0,2),16)/255,o=parseInt(e.substring(2,4),16)/255,r=parseInt(e.substring(4,6),16)/255,i=Math.max(t,o,r),s=Math.min(t,o,r);return 100*((i+s)/2)}var EI,_I,ks,Hp,R1,E1=g(()=>{"use strict";a();k1();$();I();nt();it();Pe();w();W();x();EI=je(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR",".BACKGROUND_PRIMARY)"),_I=["#1E1514","#172019","#13171B","#1C1C28","#402D2D","#3A483D","#344242","#313D4B","#2D2F47","#322B42","#3C2E42","#422938"];ks=L({color:{description:"Color your Discord client theme will be based around. Light mode isn't supported",type:6,default:"313338",component:()=>n(OI,null)},resetColor:{description:"Reset Theme Color",type:6,default:"313338",component:()=>n(C,{onClick:()=>D1(3224376)},"Reset Theme Color")}}),Hp=y({name:"ClientTheme",authors:[d.F53,d.Nuckyz],description:"Recreation of the old client theme experiment. Add a color to your Discord client theme",settings:ks,startAt:"DOMContentLoaded",start(){L1(ks.store.color),BI()},stop(){document.getElementById("clientThemeVars")?.remove(),document.getElementById("clientThemeOffsets")?.remove()}}),R1=/(--primary-[5-9]\d{2}-hsl):.*?(\S*)%;/g});var zp,_1=g(()=>{"use strict";a();I();w();zp=y({name:"ColorSighted",description:"Removes the colorblind-friendly icons from statuses, just like 2015-2017 Discord",authors:[d.lewisakura],patches:[{find:"Masks.STATUS_ONLINE",replacement:{match:/Masks\.STATUS_(?:IDLE|DND|STREAMING|OFFLINE)/g,replace:"Masks.STATUS_ONLINE"}},{find:".AVATAR_STATUS_MOBILE_16;",replacement:{match:/(?<=fromIsMobile:\i=!0,.+?)status:(\i)/,replace:'status_$:$1="online"'}}]})});var jp,O1=g(()=>{"use strict";a();I();Hn();qr();w();W();W();x();jp=y({name:"ConsoleShortcuts",description:"Adds shorter Aliases for many things on the window. Run `shortcutList` for a list.",authors:[d.Ven],getShortcuts(){function e(i){let s=new Map;return function(...l){let c=String(l);if(s.has(c))return s.get(c);let u=hr(i(...l)),p=(()=>{switch(u.length){case 0:return null;case 1:return u[0];default:let m=[...new Set(u)];return m.length>1&&console.warn(`Warning: This filter matches ${u.length} modules. Make it more specific!
  56. `,m),u[0]}})();return p&&c&&s.set(c,p),p}}let t,o=e(i=>i),r=e(Ae.byProps);return{...Vencord.Webpack.Common,wp:Vencord.Webpack,wpc:Qt.c,wreq:Qt,wpsearch:_c,wpex:ba,wpexs:i=>ba(va(i)),find:o,findAll:hr,findByProps:r,findAllByProps:(...i)=>hr(Ae.byProps(...i)),findByCode:e(Ae.byCode),findAllByCode:i=>hr(Ae.byCode(i)),findComponentByCode:e(Ae.componentByCode),findAllComponentsByCode:(...i)=>hr(Ae.componentByCode(...i)),findExportedComponent:(...i)=>r(...i)[i[0]],findStore:e(Ae.byStoreName),PluginsApi:Vencord.Plugins,plugins:Vencord.Plugins.plugins,Settings:Vencord.Settings,Api:Vencord.Api,reload:()=>location.reload(),restart:mo,canonicalizeMatch:an,canonicalizeReplace:fa,canonicalizeReplacement:Hi,fakeRender:(i,s)=>{let l=t?.deref(),c=l?.closed===!1?l:window.open("about:blank","Fake Render","popup,width=500,height=500");t=new WeakRef(c),c.focus();let u=c.document;u.body.style.margin="1em",c.prepared||(c.prepared=!0,[...document.querySelectorAll("style"),...document.querySelectorAll("link[rel=stylesheet]")].forEach(p=>{let m=p.cloneNode(!0);p.parentElement?.tagName==="HEAD"?u.head.append(m):m.id?.startsWith("vencord-")||m.id?.startsWith("vcd-")?u.documentElement.append(m):u.body.append(m)})),vr.render(_.createElement(i,s),u.body.appendChild(document.createElement("div")))}}},start(){let e=this.getShortcuts();window.shortcutList=e;for(let[t,o]of Object.entries(e))window[t]=o},stop(){delete window.shortcutList;for(let e in this.getShortcuts())delete window[e]}})});var B1,Wp,F1=g(()=>{"use strict";a();kt();Dt();I();w();x();B1=(e,{user:t})=>()=>{e.push(n(G.MenuItem,{id:"vc-copy-user-url",label:"Copy User URL",action:()=>oo.copy(`<https://discord.com/users/${t.id}>`),icon:pi}))},Wp=y({name:"CopyUserURLs",authors:[d.castdrian],description:"Adds a 'Copy User URL' option to the user context menu.",start(){de("user-context",B1)},stop(){ge("user-context",B1)}})});var on,$I,U1,$1,GI,qp,Kp,il,Yp,Zp,G1=g(()=>{"use strict";a();Fn();$();I();Je();st();w();kr();W();x();on=new ie("CrashHandler"),{ModalStack:$I,DraftManager:U1,DraftType:$1,closeExpressionPicker:GI}=Ao(()=>{let e=zi(Ae.byProps("pushLazy","popAll"),Ae.byProps("clearDraft","saveDraft"),Ae.byProps("DraftType"),Ae.byProps("closeExpressionPicker","openExpressionPicker"));return{ModalStack:e[0],DraftManager:e[1],DraftType:e[2]?.DraftType,closeExpressionPicker:e[3]?.closeExpressionPicker}}),qp=L({attemptToPreventCrashes:{type:3,description:"Whether to attempt to prevent Discord crashes.",default:!0},attemptToNavigateToHome:{type:3,description:"Whether to attempt to navigate to the home when preventing Discord crashes.",default:!1}}),Kp=0,il=0,Yp=!1,Zp=y({name:"CrashHandler",description:"Utility plugin for handling and possibly recovering from Crashes without a restart",authors:[d.Nuckyz],enabledByDefault:!0,settings:qp,patches:[{find:".Messages.ERRORS_UNEXPECTED_CRASH",replacement:{match:/(?=this\.setState\()/,replace:"$self.handleCrash(this)||"}}],handleCrash(e){if(Date.now()-il<=1e3&&!Yp)return!0;if(Yp=!1,++Kp>5){try{ke({color:"#eed202",title:"Discord has crashed!",body:"Awn :( Discord has crashed more than five times, not attempting to recover.",noPersist:!0})}catch{}return il=Date.now(),!1}setTimeout(()=>Kp--,6e4);try{return Kp===1&&gs("Uh oh, Discord has just crashed... but good news, there is a Vencord update available that might fix this issue! Would you like to update now?",!0),qp.store.attemptToPreventCrashes?(this.handlePreventCrash(e),!0):!1}catch(t){return on.error("Failed to handle crash",t),!1}finally{il=Date.now()}},handlePreventCrash(e){if(Date.now()-il>=1e3)try{ke({color:"#eed202",title:"Discord has crashed!",body:"Attempting to recover...",noPersist:!0})}catch{}try{let t=Me.getChannelId();U1.clearDraft(t,$1.ChannelMessage),U1.clearDraft(t,$1.FirstThreadMessage)}catch(t){on.debug("Failed to clear drafts.",t)}try{GI()}catch(t){on.debug("Failed to close expression picker.",t)}try{B.dispatch({type:"CONTEXT_MENU_CLOSE"})}catch(t){on.debug("Failed to close open context menu.",t)}try{$I.popAll()}catch(t){on.debug("Failed to close old modals.",t)}try{Xo()}catch(t){on.debug("Failed to close all open modals.",t)}try{B.dispatch({type:"USER_PROFILE_MODAL_CLOSE"})}catch(t){on.debug("Failed to close user popout.",t)}try{B.dispatch({type:"LAYER_POP_ALL"})}catch(t){on.debug("Failed to pop all layers.",t)}if(qp.store.attemptToNavigateToHome)try{pn.transitionTo("/channels/@me")}catch(t){on.debug("Failed to navigate to home",t)}try{Yp=!0,e.forceUpdate()}catch(t){on.debug("Failed to update crash handler component.",t)}}})});function sl(e){return Boolean(e)}function Xp(e){return e!=null}var al=g(()=>{"use strict";a()});async function H1(e){return/https?:\/\/(cdn|media)\.discordapp\.(com|net)\/attachments\//.test(e)?"mp:"+e.replace(/https?:\/\/(cdn|media)\.discordapp\.(com|net)\//,""):(await Qi.fetchAssetIds(_r.store.appID,[e]))[0]}function Ot(){ll(!0),E.plugins.CustomRPC.enabled&&ll()}function W1(){return _r.store.type!==1}function WI(e){return!W1()&&!/https?:\/\/(www\.)?(twitch\.tv|youtube\.com)\/\w+/.test(e)?"Streaming link must be a valid URL.":!0}function z1(){return _r.store.timestampMode!==3}function j1(e){return/https?:\/\/(?!i\.)?imgur\.com\//.test(e)?"Imgur link must be a direct link to the image. (e.g. https://i.imgur.com/...)":/https?:\/\/(?!media\.)?tenor\.com\//.test(e)?"Tenor link must be a direct link to the image. (e.g. https://media.tenor.com/...)":!0}async function q1(){let{appID:e,appName:t,details:o,state:r,type:i,streamLink:s,startTime:l,endTime:c,imageBig:u,imageBigTooltip:p,imageSmall:m,imageSmallTooltip:h,buttonOneText:v,buttonOneURL:T,buttonTwoText:N,buttonTwoURL:b}=_r.store;if(!t)return;let P={application_id:e||"0",name:t,state:r,details:o,type:i,flags:1<<0};switch(i===1&&(P.url=s),_r.store.timestampMode){case 1:P.timestamps={start:Math.floor(Date.now()/1e3)};break;case 2:P.timestamps={start:Math.floor(Date.now()/1e3)-new Date().getHours()*3600-new Date().getMinutes()*60-new Date().getSeconds()};break;case 3:(l||c)&&(P.timestamps={},l&&(P.timestamps.start=l),c&&(P.timestamps.end=c));break;case 0:default:break}v&&(P.buttons=[v,N].filter(sl),P.metadata={button_urls:[T,b].filter(sl)}),u&&(P.assets={large_image:await H1(u),large_text:p||void 0}),m&&(P.assets={...P.assets,small_image:await H1(m),small_text:h||void 0});for(let k in P){if(k==="type")continue;let M=P[k];(!M||M.length===0)&&delete P[k]}return P}async function ll(e){let t=await q1();B.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e?null:t,socketId:"CustomRPC"})}var HI,zI,jI,_r,Jp,K1=g(()=>{"use strict";a();$();en();I();al();ut();w();W();x();HI=je("onOpenGameProfile"),zI=A("activity","buttonColor"),jI=A("profileColors");_r=L({appID:{type:0,description:"Application ID (required)",onChange:Ot,isValid:e=>e?e&&!/^\d+$/.test(e)?"Application ID must be a number.":!0:"Application ID is required."},appName:{type:0,description:"Application name (required)",onChange:Ot,isValid:e=>e?e.length>128?"Application name must be not longer than 128 characters.":!0:"Application name is required."},details:{type:0,description:"Details (line 1)",onChange:Ot,isValid:e=>e&&e.length>128?"Details (line 1) must be not longer than 128 characters.":!0},state:{type:0,description:"State (line 2)",onChange:Ot,isValid:e=>e&&e.length>128?"State (line 2) must be not longer than 128 characters.":!0},type:{type:4,description:"Activity type",onChange:Ot,options:[{label:"Playing",value:0,default:!0},{label:"Streaming",value:1},{label:"Listening",value:2},{label:"Watching",value:3},{label:"Competing",value:5}]},streamLink:{type:0,description:"Twitch.tv or Youtube.com link (only for Streaming activity type)",onChange:Ot,disabled:W1,isValid:WI},timestampMode:{type:4,description:"Timestamp mode",onChange:Ot,options:[{label:"None",value:0,default:!0},{label:"Since discord open",value:1},{label:"Same as your current time",value:2},{label:"Custom",value:3}]},startTime:{type:1,description:"Start timestamp (only for custom timestamp mode)",onChange:Ot,disabled:z1,isValid:e=>e&&e<0?"Start timestamp must be greater than 0.":!0},endTime:{type:1,description:"End timestamp (only for custom timestamp mode)",onChange:Ot,disabled:z1,isValid:e=>e&&e<0?"End timestamp must be greater than 0.":!0},imageBig:{type:0,description:"Big image key/link",onChange:Ot,isValid:j1},imageBigTooltip:{type:0,description:"Big image tooltip",onChange:Ot,isValid:e=>e&&e.length>128?"Big image tooltip must be not longer than 128 characters.":!0},imageSmall:{type:0,description:"Small image key/link",onChange:Ot,isValid:j1},imageSmallTooltip:{type:0,description:"Small image tooltip",onChange:Ot,isValid:e=>e&&e.length>128?"Small image tooltip must be not longer than 128 characters.":!0},buttonOneText:{type:0,description:"Button 1 text",onChange:Ot,isValid:e=>e&&e.length>31?"Button 1 text must be not longer than 31 characters.":!0},buttonOneURL:{type:0,description:"Button 1 URL",onChange:Ot},buttonTwoText:{type:0,description:"Button 2 text",onChange:Ot,isValid:e=>e&&e.length>31?"Button 2 text must be not longer than 31 characters.":!0},buttonTwoURL:{type:0,description:"Button 2 URL",onChange:Ot}});Jp=y({name:"CustomRPC",description:"Allows you to set a custom rich presence.",authors:[d.captain,d.AutumnVN],start:ll,stop:()=>ll(!0),settings:_r,settingsAboutComponent:()=>{let e=lt(q1);return n(f,null,n(S.FormText,null,"Go to ",n(rt,{href:"https://discord.com/developers/applications"},"Discord Developer Portal")," to create an application and get the application ID."),n(S.FormText,null,"Upload images in the Rich Presence tab to get the image keys."),n(S.FormText,null,"If you want to use image link, download your image and reupload the image to ",n(rt,{href:"https://imgur.com"},"Imgur"),' and get the image link by right-clicking the image and select "Copy image address".'),n(S.FormDivider,null),n("div",{style:{width:"284px"},className:jI.profileColors},e[0]&&n(HI,{activity:e[0],className:zI.activity,channelId:Me.getChannelId(),guild:pe.getGuild(ko.getLastSelectedGuildId()),application:{id:_r.store.appID},user:F.getCurrentUser()})))}})});var Y1=g(()=>{});async function KI(){try{let{embed:e}=this.props;if(!e||e.dearrow||e.provider?.name!=="YouTube"||!e.video?.url)return;let t=qI.exec(e.video.url)?.[1];if(!t)return;let o=await fetch(`https://sponsor.ajay.app/api/branding?videoID=${t}`);if(!o.ok)return;let{titles:r,thumbnails:i}=await o.json(),s=r[0]?.votes>=0,l=i[0]?.votes>=0&&!i[0].original;if(!s&&!l)return;e.dearrow={enabled:!0},s&&(e.dearrow.oldTitle=e.rawTitle,e.rawTitle=r[0].title.replace(/ >(\S)/g," $1")),l&&(e.dearrow.oldThumb=e.thumbnail.proxyURL,e.thumbnail.proxyURL=`https://dearrow-thumb.ajay.app/api/v1/getThumbnail?videoID=${t}&time=${i[0].timestamp}`),this.forceUpdate()}catch(e){new ie("Dearrow").error("Failed to dearrow embed",e)}}function YI({component:e}){let{embed:t}=e.props;return t?.dearrow?n(ee,{text:t.dearrow.enabled?"This embed has been dearrowed, click to restore":"Click to dearrow"},({onMouseEnter:o,onMouseLeave:r})=>n("button",{onMouseEnter:o,onMouseLeave:r,className:"vc-dearrow-toggle-"+(t.dearrow.enabled?"on":"off"),onClick:()=>{let{enabled:i,oldThumb:s,oldTitle:l}=t.dearrow;t.dearrow.enabled=!i,l&&(t.dearrow.oldTitle=t.rawTitle,t.rawTitle=l),s&&(t.dearrow.oldThumb=t.thumbnail.proxyURL,t.thumbnail.proxyURL=s),e.forceUpdate()}},n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24px",height:"24px",viewBox:"0 0 36 36","aria-label":"Toggle Dearrow"},n("path",{fill:"#1213BD",d:"M36 18.302c0 4.981-2.46 9.198-5.655 12.462s-7.323 5.152-12.199 5.152s-9.764-1.112-12.959-4.376S0 23.283 0 18.302s2.574-9.38 5.769-12.644S13.271 0 18.146 0s9.394 2.178 12.589 5.442C33.931 8.706 36 13.322 36 18.302z"}),n("path",{fill:"#88c9f9",d:"m 30.394282,18.410186 c 0,3.468849 -1.143025,6.865475 -3.416513,9.137917 -2.273489,2.272442 -5.670115,2.92874 -9.137918,2.92874 -3.467803,0 -6.373515,-1.147212 -8.6470033,-3.419654 -2.2734888,-2.272442 -3.5871299,-5.178154 -3.5871299,-8.647003 0,-3.46885 0.9420533,-6.746149 3.2144954,-9.0196379 2.2724418,-2.2734888 5.5507878,-3.9513905 9.0196378,-3.9513905 3.46885,0 6.492841,1.9322561 8.76633,4.204698 2.273489,2.2724424 3.788101,5.2974804 3.788101,8.7663304 z"}),n("path",{fill:"#0a62a5",d:"m 23.95823,17.818306 c 0,3.153748 -2.644888,5.808102 -5.798635,5.808102 -3.153748,0 -5.599825,-2.654354 -5.599825,-5.808102 0,-3.153747 2.446077,-5.721714 5.599825,-5.721714 3.153747,0 5.798635,2.567967 5.798635,5.721714 z"})))):null}var qI,Qp,Z1=g(()=>{"use strict";a();Y1();le();I();Je();w();x();qI=/https:\/\/www\.youtube\.com\/embed\/([a-zA-Z0-9_-]{11})/;Qp=y({name:"Dearrow",description:"Makes YouTube embed titles and thumbnails less sensationalist, powered by Dearrow",authors:[d.Ven],embedDidMount:KI,renderButton(e){return n(U,{noop:!0},n(YI,{component:e}))},patches:[{find:"this.renderInlineMediaEmbed",replacement:[{match:/render\(\)\{let\{embed:/,replace:"componentDidMount=$self.embedDidMount;$&"},{match:/children:\[(?=null!=\i\?\i\.renderSuppressButton)/,replace:"children:[$self.renderButton(this),"}]}]})});var X1=g(()=>{});var ZI,Xn,J1,Q1,V1,Or,cl,Si,Rs,Vp,Jn=g(()=>{"use strict";a();ZI="https://decor.fieryflames.dev",Xn=ZI+"/api",J1=Xn+"/authorize",Q1="https://ugc.decor.fieryflames.dev",V1="1096966363416899624",Or="100101099111114",cl="11497119",Si="1096357702931841148",Rs="dXp2SdxDcP",Vp=1e3*60*60*4});var XI,Qn,Ds=g(()=>{"use strict";a();yi();zo();Je();st();x();Jn();XI={async getItem(e){return xt.get(e).then(t=>t??null)},async setItem(e,t){await xt.set(e,t)},async removeItem(e){await xt.del(e)}},Qn=Ft(()=>wr(Gc((e,t)=>({token:null,tokens:{},init:()=>{e({token:t().tokens[F.getCurrentUser().id]??null})},setToken:o=>e({token:o,tokens:{...t().tokens,[F.getCurrentUser().id]:o}}),remove:o=>{let{tokens:r,init:i}=t(),s={...r};delete s[o],e({tokens:s}),i()},async authorize(){return new Promise((o,r)=>Ne(i=>n(Ki,{...i,scopes:["identify"],responseType:"code",redirectUri:J1,permissions:0n,clientId:V1,cancelCompletesFlow:!1,callback:async s=>{try{let l=new URL(s.location);l.searchParams.append("client","vencord");let c=await fetch(l);if(c?.ok){let u=await c.text();t().setToken(u)}else throw new Error("Request not OK");o(void 0)}catch(l){l instanceof Error&&($t(`Failed to authorize: ${l.message}`,oe.Type.FAILURE),new ie("Decor").error("Failed to authorize",l),r(l))}}}),{onCloseCallback(){r(new Error("Authorization cancelled"))}}))},isAuthorized:()=>!!t().token}),{name:"decor-auth",getStorage:()=>XI,partialize:e=>({tokens:e.tokens}),onRehydrateStorage:()=>e=>e?.init()})))});async function ul(e,t){let o=await fetch(e,{...t,headers:{...t?.headers,Authorization:`Bearer ${Qn.getState().token}`}});if(o.ok)return o;throw new Error(await o.text())}var eS,tS,oS,ed,nS,rS,pl=g(()=>{"use strict";a();Jn();Ds();eS=async e=>{if(e?.length===0)return{};let t=new URL(Xn+"/users");return e&&e.length!==0&&t.searchParams.set("ids",JSON.stringify(e)),await fetch(t).then(o=>o.json())},tS=async(e="@me")=>ul(Xn+`/users/${e}/decorations`).then(t=>t.json()),oS=async(e="@me")=>ul(Xn+`/users/${e}/decoration`).then(t=>t.json()),ed=async(e,t="@me")=>{let o=new FormData;return e?"hash"in e?o.append("hash",e.hash):"file"in e&&(o.append("image",e.file),o.append("alt",e.alt??"null")):o.append("hash","null"),ul(Xn+`/users/${t}/decoration`,{method:"PUT",body:o}).then(r=>e&&"file"in e?r.json():r.text())},nS=async e=>{await ul(Xn+`/decorations/${e}`,{method:"DELETE"})},rS=async()=>fetch(Xn+"/decorations/presets").then(e=>e.json())});function td(e){return`${e.animated?"a_":""}${e.hash}`}function dl(e){return{asset:td(e),skuId:Or}}var ml=g(()=>{"use strict";a();Jn()});function iS(e){let[t,o]=X(e?Tn.getState().getAsset(e.id)??null:null);return ue(()=>{let r=Tn.subscribe(i=>{if(!e)return;let s=i.getAsset(e.id);!s||t!==s&&o(s)});if(e){let{fetch:i}=Tn.getState();i(e.id)}return r},[]),t?{asset:t,skuId:Or}:null}var Tn,od=g(()=>{"use strict";a();Pr();zo();x();pl();Jn();Tn=Ft(()=>wr((e,t)=>({usersDecorations:new Map,fetchQueue:new Set,bulkFetch:no(async()=>{let{fetchQueue:o,usersDecorations:r}=t();if(o.size===0)return;e({fetchQueue:new Set});let i=Array.from(o),s=await eS(i),l=new Map(r),c=new Date;for(let u of i){let p=s[u]??null;l.set(u,{asset:p,fetchedAt:c})}e({usersDecorations:l})}),async fetch(o,r=!1){let{usersDecorations:i,fetchQueue:s,bulkFetch:l}=t(),{fetchedAt:c}=i.get(o)??{};c&&!r&&Date.now()-c.getTime()<Vp||(e({fetchQueue:new Set(s).add(o)}),l())},async fetchMany(o){if(!o.length)return;let{usersDecorations:r,fetchQueue:i,bulkFetch:s}=t(),l=new Set(i),c=Date.now();for(let u of o){let{fetchedAt:p}=r.get(u)??{};p&&c-p.getTime()<Vp||l.add(u)}e({fetchQueue:l}),s()},get(o){return t().usersDecorations.get(o)},getAsset(o){return t().usersDecorations.get(o)?.asset},has(o){return t().usersDecorations.has(o)},set(o,r){let{usersDecorations:i}=t(),s=new Map(i);s.set(o,{asset:r,fetchedAt:new Date}),e({usersDecorations:s})}})))});var nn,bi=g(()=>{"use strict";a();zo();x();pl();ml();od();nn=Ft(()=>wr((e,t)=>({decorations:[],selectedDecoration:null,async fetch(){let o=await tS(),r=await oS();e({decorations:o,selectedDecoration:r})},async create(o){let r=await ed(o);e({decorations:[...t().decorations,r]})},async delete(o){let r=typeof o=="object"?o.hash:o;await nS(r);let{selectedDecoration:i,decorations:s}=t(),l={decorations:s.filter(c=>c.hash!==r),selectedDecoration:i?.hash===r?null:i};e(l)},async select(o){t().selectedDecoration!==o&&(e({selectedDecoration:o}),ed(o),Tn.getState().set(F.getCurrentUser().id,o?td(o):null))},clear:()=>e({decorations:[],selectedDecoration:null})})))});var Ls,sS,fl,nd,aS,Br=g(()=>{"use strict";a();W();x();sS=e=>Ls=e,fl=Dc(()=>{let e=Lc("AvatarDecorationModalPreview");return _.memo(e)}),aS=e=>nd=e});var Ge,gl,lS,Fr=g(()=>{"use strict";a();ot();W();Ge=Be("vc-decor-"),gl=Sa(["openAvatarDecorationModal:"]),lS=Sa(["stickerInspected]:"])});function rd(e){return n(Ls,{...e,isSelected:!1},n(cv,null),n(Q,{variant:"text-xs/normal",color:"header-primary"},Qe.Messages.CREATE))}var cS=g(()=>{"use strict";a();Dt();x();Br()});function id(e){return n(Ls,{...e},n(uv,null),n(Q,{variant:"text-xs/normal",color:"header-primary"},Qe.Messages.NONE))}var uS=g(()=>{"use strict";a();Dt();x();Br()});function sd({decoration:e}){let{delete:t}=nn();return n(G.Menu,{navId:Ge("decoration-context-menu"),onClose:Ut.closeContextMenu,"aria-label":"Decoration Options"},n(G.MenuItem,{id:Ge("decoration-context-menu-copy-hash"),label:"Copy Decoration Hash",icon:Ka,action:()=>oo.copy(e.hash)}),e.authorId===F.getCurrentUser().id&&n(G.MenuItem,{id:Ge("decoration-context-menu-delete"),label:"Delete Decoration",color:"danger",icon:Ja,action:()=>Et.show({title:"Delete Decoration",body:`Are you sure you want to delete ${e.alt}?`,confirmText:"Delete",confirmColor:Ge("danger-btn"),cancelText:"Cancel",onConfirm(){t(e)}})}))}var pS=g(()=>{"use strict";a();Dt();x();bi();Fr()});function ad(e){let{decoration:t}=e;return n(nd,{...e,onContextMenu:o=>{Ut.openContextMenu(o,()=>n(sd,{decoration:t}))},avatarDecoration:dl(t)})}var dS=g(()=>{"use strict";a();x();ml();Br();pS()});function ld({renderItem:e,getItemKey:t,itemKeyPrefix:o,items:r}){return n("div",{className:Ge("sectioned-grid-list-grid")},r.map(i=>n(_.Fragment,{key:`${o?`${o}-`:""}${t(i)}`},e(i))))}var mS=g(()=>{"use strict";a();x();Fr()});function cd(e){return n("div",{className:te(Ge("sectioned-grid-list-container"),JI.thin)},e.sections.map(t=>n("div",{key:e.getSectionKey(t),className:Ge("sectioned-grid-list-section")},e.renderSectionHeader(t),n(ld,{renderItem:e.renderItem,getItemKey:e.getItemKey,itemKeyPrefix:e.getSectionKey(t),items:t.items}))))}var JI,fS=g(()=>{"use strict";a();Pe();W();Fr();mS();JI=A("managedReactiveScroller")});function eA(e){let[t,o]=X(null);return ue(()=>{if(!e)return;let r=URL.createObjectURL(e);return o(r),()=>{URL.revokeObjectURL(r),o(null)}},[e]),t}function gS(e){let[t,o]=X(""),[r,i]=X(null),[s,l]=X(!1),[c,u]=X(null);ue(()=>{c&&u(null)},[r]);let{create:p}=nn(),m=eA(r),h=St(()=>m?{asset:m,skuId:cl}:null,[m]);return n(Oe,{...e,size:"medium",className:QI.modal},n(tt,{separator:!1,className:Ge("modal-header")},n(Q,{color:"header-primary",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Create Decoration"),n(_t,{onClick:e.onClose})),n(Ye,{className:Ge("create-decoration-modal-content"),scrollbarType:"none"},n("div",{className:Ge("create-decoration-modal-form-preview-container")},n("div",{className:Ge("create-decoration-modal-form")},c!==null&&n(Q,{color:"text-danger",variant:"text-xs/normal"},c.message),n(S.FormSection,{title:"File"},n(VI,{filename:r?.name,placeholder:"Choose a file",buttonText:"Browse",filters:[{name:"Decoration file",extensions:["png","apng"]}],onFileSelect:i}),n(S.FormText,{type:"description",className:z.top8},"File should be APNG or PNG.")),n(S.FormSection,{title:"Name"},n(et,{placeholder:"Companion Cube",value:t,onChange:o}),n(S.FormText,{type:"description",className:z.top8},"This name will be used when referring to this decoration."))),n("div",null,n(fl,{avatarDecorationOverride:h,user:F.getCurrentUser()}))),n(S.FormText,{type:"description",className:z.bottom16},"Make sure your decoration does not violate ",n(rt,{href:"https://github.com/decor-discord/.github/blob/main/GUIDELINES.md"},"the guidelines")," before creating your decoration.",n("br",null),"You can receive updates on your decoration's review by joining ",n(rt,{href:`https://discord.gg/${Rs}`,onClick:async v=>{v.preventDefault(),pe.getGuild(Si)?(Xo(),B.dispatch({type:"LAYER_POP_ALL"}),pn.transitionToGuild(Si)):await bs(Rs)&&(Xo(),B.dispatch({type:"LAYER_POP_ALL"}))}},"Decor's Discord server"),".")),n(bt,{className:Ge("modal-footer")},n(C,{onClick:()=>{l(!0),p({alt:t,file:r}).then(e.onClose).catch(v=>{l(!1),u(v)})},disabled:!r||!t,submitting:s},"Create"),n(C,{onClick:e.onClose,color:C.Colors.PRIMARY,look:C.Looks.LINK},"Cancel")))}var QI,VI,hS,yS=g(()=>{"use strict";a();en();nt();it();st();W();x();Jn();bi();Fr();Br();QI=A("modalFooterShopButton"),VI=je("fileUploadInput,");hS=()=>Promise.all([gl(),lS()]).then(()=>Ne(e=>n(gS,{...e})))});function nA(){let[e,t]=X([]);return ue(()=>{rS().then(t)},[]),e}function rA({section:e}){let t=typeof e.subtitle<"u",o=typeof e.authorIds<"u",[r,i]=X([]);return ue(()=>{(async()=>{if(!!e.authorIds)for(let s of e.authorIds){let l=F.getUser(s)??await Nt.getUser(s);i(c=>[...c,l])}})()},[e.authorIds]),n("div",null,n(ce,null,n(S.FormTitle,{style:{flexGrow:1}},e.title),o&&n(tA,{users:r,guildId:void 0,renderIcon:!1,max:5,showDefaultAvatarsForNullUsers:!0,size:16,showUserPopout:!0,className:z.bottom8})),t&&n(S.FormText,{type:"description",className:z.bottom8},e.subtitle))}function vS(e){let[t,o]=X(void 0),r=typeof t<"u",i=t!=null?dl(t):t,{decorations:s,selectedDecoration:l,fetch:c,select:u}=nn();ue(()=>{c()},[]);let p=r?t:l,m=typeof p?.authorId<"u",h=s.some(M=>M.reviewed===!1),v=nA(),T=v.flatMap(M=>M.decorations),N=v.find(M=>M.id===p?.presetId),b=typeof N<"u",k=[{title:"Your Decorations",sectionKey:"ownDecorations",items:["none",...s.filter(M=>!T.some(O=>O.hash===M.hash)),"create"]},...v.map(M=>({title:M.name,subtitle:M.description||void 0,sectionKey:`preset-${M.id}`,items:M.decorations,authorIds:M.authorIds}))];return n(Oe,{...e,size:"dynamic",className:oA.modal},n(tt,{separator:!1,className:Ge("modal-header")},n(Q,{color:"header-primary",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Change Decoration"),n(_t,{onClick:e.onClose})),n(Ye,{className:Ge("change-decoration-modal-content"),scrollbarType:"none"},n(cd,{renderItem:M=>{if(typeof M=="string")switch(M){case"none":return n(id,{className:Ge("change-decoration-modal-decoration"),isSelected:p===null,onSelect:()=>o(null)});case"create":return n(ee,{text:"You already have a decoration pending review",shouldShow:h},O=>n(rd,{className:Ge("change-decoration-modal-decoration"),...O,onSelect:h?()=>{}:hS}))}else return n(ee,{text:"Pending review",shouldShow:M.reviewed===!1},O=>n(ad,{...O,className:Ge("change-decoration-modal-decoration"),onSelect:M.reviewed!==!1?()=>o(M):()=>{},isSelected:p?.hash===M.hash,decoration:M}))},getItemKey:M=>typeof M=="string"?M:M.hash,getSectionKey:M=>M.sectionKey,renderSectionHeader:M=>n(rA,{section:M}),sections:k}),n("div",{className:Ge("change-decoration-modal-preview")},n(fl,{avatarDecorationOverride:i,user:F.getCurrentUser()}),b&&n(S.FormTitle,{className:""},"Part of the ",N.name," Preset"),typeof p=="object"&&n(Q,{variant:"text-sm/semibold",color:"header-primary"},p?.alt),m&&n(Q,{key:`createdBy-${p.authorId}`},"Created by ",_e.parse(`<@${p.authorId}>`)))),n(bt,{className:te(Ge("change-decoration-modal-footer",Ge("modal-footer")))},n("div",{className:Ge("change-decoration-modal-footer-btn-container")},n(C,{onClick:()=>{u(t).then(e.onClose)},disabled:!r},"Apply"),n(C,{onClick:e.onClose,color:C.Colors.PRIMARY,look:C.Looks.LINK},"Cancel")),n("div",{className:Ge("change-decoration-modal-footer-btn-container")},n(C,{onClick:()=>Et.show({title:"Log Out",body:"Are you sure you want to log out of Decor?",confirmText:"Log Out",confirmColor:Ge("danger-btn"),cancelText:"Cancel",onConfirm(){Qn.getState().remove(F.getCurrentUser().id),e.onClose()}}),color:C.Colors.PRIMARY,look:C.Looks.LINK},"Log Out"),n(ee,{text:"Join Decor's Discord Server for notifications on your decoration's review, and when new presets are released"},M=>n(C,{...M,onClick:async()=>{pe.getGuild(Si)?(e.onClose(),B.dispatch({type:"LAYER_POP_ALL"}),pn.transitionToGuild(Si)):await bs(Rs)&&(Xo(),B.dispatch({type:"LAYER_POP_ALL"}))},color:C.Colors.PRIMARY,look:C.Looks.LINK},"Discord Server")))))}var tA,oA,ud,SS=g(()=>{"use strict";a();Ct();nt();it();Pe();st();W();x();pl();Jn();Ds();bi();ml();Fr();Br();cS();uS();dS();fS();yS();tA=je("defaultRenderUser","showDefaultAvatarsForNullUsers"),oA=A("modalFooterShopButton");ud=()=>gl().then(()=>Ne(e=>n(vS,{...e})))});function hl({hideTitle:e=!1,hideDivider:t=!1,noMargin:o=!1}){let r=Qn(),{selectedDecoration:i,select:s,fetch:l}=nn();return ue(()=>{r.isAuthorized()&&l()},[r.token]),n(iA,{title:!e&&"Decor",hasBackground:!0,hideDivider:t,className:o&&Ge("section-remove-margin")},n(ce,null,n(C,{onClick:()=>{r.isAuthorized()?ud():r.authorize().then(ud).catch(()=>{})},size:C.Sizes.SMALL},"Change Decoration"),i&&r.isAuthorized()&&n(C,{onClick:()=>s(null),color:C.Colors.PRIMARY,size:C.Sizes.SMALL,look:C.Looks.LINK},"Remove Decoration")))}var iA,bS=g(()=>{"use strict";a();Ct();W();x();Ds();bi();Fr();SS();iA=cn(".customizationSectionBackground")});var sA,aA,pd,TS=g(()=>{"use strict";a();X1();$();le();en();I();it();Pe();st();w();W();x();Jn();Ds();bi();od();Br();bS();({isAnimatedAvatarDecoration:sA}=A("isAnimatedAvatarDecoration")),aA=L({changeDecoration:{type:6,description:"Change your avatar decoration",component(){return n("div",null,n(hl,{hideTitle:!0,hideDivider:!0,noMargin:!0}),n(S.FormText,{type:"description",className:te(z.top8,z.bottom8)},"You can also access Decor decorations from the ",n(rt,{href:"/settings/profile-customization",onClick:e=>{e.preventDefault(),Xo(),B.dispatch({type:"USER_SETTINGS_MODAL_SET_SECTION",section:"Profile Customization"})}},"Profiles")," page."))}}}),pd=y({name:"Decor",description:"Create and use your own custom avatar decorations, or pick your favorite from the presets.",authors:[d.FieryFlames],patches:[{find:"getAvatarDecorationURL:",replacement:{match:/(?<=function \i\(\i\){)(?=let{avatarDecoration)/,replace:"const vcDecorDecoration=$self.getDecorAvatarDecorationURL(arguments[0]);if(vcDecorDecoration)return vcDecorDecoration;"}},{find:"DefaultCustomizationSections",replacement:{match:/(?<={user:\i},"decoration"\),)/,replace:"$self.DecorSection(),"}},{find:".decorationGridItem",replacement:[{match:/(?<==)\i=>{let{children.{20,100}decorationGridItem/,replace:"$self.DecorationGridItem=$&"},{match:/(?<==)\i=>{let{user:\i,avatarDecoration.{300,600}decorationGridItemChurned/,replace:"$self.DecorationGridDecoration=$&"},{match:/(?<=\.Section\.PREMIUM_PURCHASE&&\i;if\()(?<=avatarDecoration:(\i).+?)/,replace:"$1.skuId===$self.SKU_ID||"}]},{find:"isAvatarDecorationAnimating:",group:!0,replacement:[{match:/(?<=TryItOut:\i}\),)(?<=user:(\i).+?)/,replace:"vcDecorAvatarDecoration=$self.useUserDecorAvatarDecoration($1),"},{match:/(?<={avatarDecoration:).{1,20}?(?=,)(?<=avatarDecorationOverride:(\i).+?)/,replace:"$1??vcDecorAvatarDecoration??($&)"},{match:/(?<=size:\i}\),\[)/,replace:"vcDecorAvatarDecoration,"}]},{find:"renderAvatarWithPopout(){",replacement:[{match:/(?<=getAvatarDecorationURL\)\({avatarDecoration:)(\i).avatarDecoration(?=,)/,replace:"$self.useUserDecorAvatarDecoration($1)??$&"}]}],settings:aA,flux:{CONNECTION_OPEN:()=>{Qn.getState().init(),nn.getState().clear(),Tn.getState().fetch(F.getCurrentUser().id,!0)},USER_PROFILE_MODAL_OPEN:e=>{Tn.getState().fetch(e.userId,!0)}},set DecorationGridItem(e){sS(e)},set DecorationGridDecoration(e){aS(e)},SKU_ID:Or,useUserDecorAvatarDecoration:iS,async start(){Tn.getState().fetch(F.getCurrentUser().id,!0)},getDecorAvatarDecorationURL({avatarDecoration:e,canAnimate:t}){if(e?.skuId===Or){let o=new URL(`${Q1}/${e.asset}.png`);return o.searchParams.set("animate",(!!t&&sA(e.asset)).toString()),o.toString()}else if(e?.skuId===cl)return e.asset},DecorSection:U.wrap(hl)})});var dd,xS=g(()=>{"use strict";a();I();w();dd=y({name:"DisableDMCallIdle",description:"Disables automatically getting kicked from a DM voice call after 3 minutes.",authors:[d.Nuckyz],patches:[{find:".Messages.BOT_CALL_IDLE_DISCONNECT",replacement:{match:/(?<=function \i\(\){)(?=.{1,120}\.Messages\.BOT_CALL_IDLE_DISCONNECT)/,replace:"return;"}}]})});function md(e){return e.t==="Emoji"?`${location.protocol}//${window.GLOBAL_ENV.CDN_HOST}/emojis/${e.id}.${e.isAnimated?"gif":"png"}`:`${location.origin}/stickers/${e.id}.${uA[e.format_type]}`}async function PS(e){let t=lA.getStickerById(e);if(t)return t;let{body:o}=await At.get({url:`/stickers/${e}`});return B.dispatch({type:"STICKER_FETCH_SUCCESS",sticker:o}),o}async function pA(e,t){let o=new FormData;o.append("name",t.name),o.append("tags",t.tags),o.append("description",t.description),o.append("file",await IS(md(t)));let{body:r}=await At.post({url:`/guilds/${e}/stickers`,body:o});B.dispatch({type:"GUILD_STICKERS_CREATE_SUCCESS",guildId:e,sticker:{...r,user:F.getCurrentUser()}})}async function dA(e,t){let o=await IS(md(t)),r=await new Promise(i=>{let s=new FileReader;s.onload=()=>i(s.result),s.readAsDataURL(o)});return cA.uploadEmoji({guildId:e,name:t.name.split("~")[0],image:r})}function mA(e){let t=F.getCurrentUser().id;return Object.values(pe.getGuilds()).filter(o=>{if(!(o.ownerId===t||(Le.getGuildPermissions({id:o.id})&Te.CREATE_GUILD_EXPRESSIONS)===Te.CREATE_GUILD_EXPRESSIONS))return!1;if(e.t==="Sticker")return!0;let{isAnimated:i}=e,s=o.getMaxEmojiSlots(),{emojis:l}=Ro.getGuilds()[o.id],c=0;for(let u of l)u.animated===i&&c++;return c<s}).sort((o,r)=>o.name.localeCompare(r.name))}async function IS(e){let t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch ${e} - ${t.status}`);return t.blob()}async function fA(e,t){try{t.t==="Sticker"?await pA(e,t):await dA(e,t),oe.show({message:`Successfully cloned ${t.name} to ${pe.getGuild(e)?.name??"your server"}!`,type:oe.Type.SUCCESS,id:oe.genId()})}catch(o){let r="Something went wrong (check console!)";try{r=JSON.parse(o.text).message}catch{}new ie("EmoteCloner").error("Failed to clone",t.name,"to",e,o),oe.show({message:"Failed to clone: "+r,type:oe.Type.FAILURE,id:oe.genId()})}}function yA({data:e}){let[t,o]=_.useState(!1),[r,i]=_.useState(e.name),[s,l]=_.useReducer(u=>u+1,0),c=_.useMemo(()=>mA(e),[e.id,s]);return n(f,null,n(S.FormTitle,{className:z.top20},"Custom Name"),n(rl,{value:r,onChange:u=>{e.name=u,i(u)},validate:u=>e.t==="Emoji"&&u.length>2&&u.length<32&&hA.test(u)||e.t==="Sticker"&&u.length>2&&u.length<30||"Name must be between 2 and 32 characters and only contain alphanumeric characters"}),n("div",{style:{display:"flex",flexWrap:"wrap",gap:"1em",padding:"1em 0.5em",justifyContent:"center",alignItems:"center"}},c.map(u=>n(ee,{text:u.name},({onMouseLeave:p,onMouseEnter:m})=>n("div",{onMouseLeave:p,onMouseEnter:m,role:"button","aria-label":"Clone to "+u.name,"aria-disabled":t,style:{borderRadius:"50%",backgroundColor:"var(--background-secondary)",display:"inline-flex",justifyContent:"center",alignItems:"center",width:"4em",height:"4em",cursor:t?"not-allowed":"pointer",filter:t?"brightness(50%)":"none"},onClick:t?void 0:async()=>{o(!0),fA(u.id,e).finally(()=>{l(),o(!1)})}},u.icon?n("img",{"aria-hidden":!0,style:{borderRadius:"50%",width:"100%",height:"100%"},src:u.getIconURL(512,!0),alt:u.name}):n(S.FormText,{style:{fontSize:gA(u.acronym),width:"100%",overflow:"hidden",whiteSpace:"nowrap",textAlign:"center",cursor:t?"not-allowed":"pointer"}},u.acronym))))))}function yl(e,t){return n(G.MenuItem,{id:"emote-cloner",key:"emote-cloner",label:`Clone ${e}`,action:()=>rs(async()=>{let o=await t(),r={t:e,...o},i=md(r);return s=>n(Oe,{...s},n(tt,null,n("img",{role:"presentation","aria-hidden":!0,src:i,alt:"",height:24,width:24,style:{marginRight:"0.5em"}}),n(S.FormText,null,"Clone ",r.name)),n(Ye,null,n(yA,{data:r})))})})}function AS(e){return new URL(e).pathname.endsWith(".gif")}var lA,cA,uA,gA,hA,wS,MS,fd,NS=g(()=>{"use strict";a();kt();hp();I();Je();it();st();w();W();x();lA=we("StickersStore"),cA=A("fetchEmoji","uploadEmoji","deleteEmoji"),uA=[,"png","png","json","gif"];gA=e=>[20,20,18,18,16,14,12][e.length]??4,hA=/^\w+$/i;wS=(e,t)=>()=>{let{favoriteableId:o,itemHref:r,itemSrc:i,favoriteableType:s}=t??{};if(!o)return;let l=(()=>{switch(s){case"emoji":let c=t.message.content.match(RegExp(`<a?:(\\w+)(?:~\\d+)?:${o}>|https://cdn\\.discordapp\\.com/emojis/${o}\\.`));if(!c)return;let u=c[1]??"FakeNitroEmoji";return yl("Emoji",()=>({id:o,name:u,isAnimated:AS(r??i)}));case"sticker":return t.message.stickerItems.find(m=>m.id===o)?.format_type===3?void 0:yl("Sticker",()=>PS(o))}})();l&&ft("copy-link",e)?.push(l)},MS=(e,t)=>()=>{let{id:o,name:r,type:i}=t?.target?.dataset??{};if(!!o)if(i==="emoji"&&r){let s=t.target.firstChild;e.push(yl("Emoji",()=>({id:o,name:r,isAnimated:s&&AS(s.src)})))}else i==="sticker"&&!t.target.className?.includes("lottieCanvas")&&e.push(yl("Sticker",()=>PS(o)))},fd=y({name:"EmoteCloner",description:"Allows you to clone Emotes & Stickers to your own server (right click them)",tags:["StickerCloner"],authors:[d.Ven,d.Nuckyz],start(){de("message",wS),de("expression-picker",MS)},stop(){ge("message",wS),ge("expression-picker",MS)}})});var gd,CS,hd,kS=g(()=>{"use strict";a();$();le();ni();I();it();w();W();x();gd=A("key","removeBuildOverride"),CS=L({enableIsStaff:{description:"Enable isStaff",type:3,default:!1,restartNeeded:!0}}),hd=y({name:"Experiments",description:"Enable Access to Experiments in Discord!",authors:[d.Megu,d.Ven,d.Nickyux,d.BanTheNons,d.Nuckyz],settings:CS,patches:[{find:"Object.defineProperties(this,{isDeveloper",replacement:{match:/(?<={isDeveloper:\{[^}]+?,get:\(\)=>)\i/,replace:"true"}},{find:'type:"user",revision',replacement:{match:/!(\i)&&"CONNECTION_OPEN".+?;/g,replace:"$1=!0;"}},{find:".isStaff=()",predicate:()=>CS.store.enableIsStaff,replacement:[{match:/=>*?(\i)\.hasFlag\((\i\.\i)\.STAFF\)}/,replace:(e,t,o)=>`=>Vencord.Webpack.Common.UserStore.getCurrentUser()?.id===${t}.id||${t}.hasFlag(${o}.STAFF)}`},{match:/hasFreePremium\(\){return this.isStaff\(\)\s*?\|\|/,replace:"hasFreePremium(){return "}]},{find:'H1,title:"Experiments"',replacement:{match:'title:"Experiments",children:[',replace:"$&$self.WarningCard(),"}}],settingsAboutComponent:()=>{let e=navigator.platform.includes("Mac"),t=e?"cmd":"ctrl",o=e?"opt":"alt";return n(_.Fragment,null,n(S.FormTitle,{tag:"h3"},"More Information"),n(S.FormText,{variant:"text-md/normal"},"You can enable client DevTools"," ",n("kbd",{className:gd.key},t)," +"," ",n("kbd",{className:gd.key},o)," +"," ",n("kbd",{className:gd.key},"O")," ","after enabling ",n("code",null,"isStaff")," below"),n(S.FormText,null,"and then toggling ",n("code",null,"Enable DevTools")," in the ",n("code",null,"Developer Options")," tab in settings."))},WarningCard:U.wrap(()=>n(So,{id:"vc-experiments-warning-card",className:z.bottom16},n(S.FormTitle,{tag:"h2"},"Hold on!!"),n(S.FormText,null,"Experiments are unreleased Discord features. They might not work, or even break your client or get your account disabled."),n(S.FormText,{className:z.top8},"Only use experiments if you know what you're doing. Vencord is not responsible for any damage caused by enabling experiments.")),{noop:!0})})});var yd,RS=g(()=>{"use strict";a();I();w();yd=y({name:"F8Break",description:"Pause the client when you press F8 with DevTools (+ breakpoints) open.",authors:[d.lewisakura],start(){window.addEventListener("keydown",this.event)},stop(){window.removeEventListener("keydown",this.event)},event(e){if(e.code==="F8")debugger}})});var DS=g(()=>{"use strict";a()});var ES=gr((z9,LS)=>{"use strict";a();var xn=LS.exports;(function e(t,o,r){function i(c,u){if(!o[c]){if(!t[c]){var p=typeof jr=="function"&&jr;if(!u&&p)return p(c,!0);if(s)return s(c,!0);throw new Error("Cannot find module '"+c+"'")}var m=o[c]={exports:{}};t[c][0].call(m.exports,function(h){var v=t[c][1][h];return i(v||h)},m,m.exports,e,t,o,r)}return o[c].exports}for(var s=typeof jr=="function"&&jr,l=0;l<r.length;l++)i(r[l]);return i})({1:[function(e,t,o){(function(r,i){var s,l;s=this,l=function(){"use strict";function c(R){return typeof R=="function"}var u=Array.isArray?Array.isArray:function(R){return Object.prototype.toString.call(R)==="[object Array]"},p=0,m=void 0,h=void 0,v=function(R,j){O[p]=R,O[p+1]=j,(p+=2)===2&&(h?h(H):V())},T=typeof window<"u"?window:void 0,N=T||{},b=N.MutationObserver||N.WebKitMutationObserver,P=typeof xn>"u"&&r!==void 0&&{}.toString.call(r)==="[object process]",k=typeof Uint8ClampedArray<"u"&&typeof importScripts<"u"&&typeof MessageChannel<"u";function M(){var R=setTimeout;return function(){return R(H,1)}}var O=new Array(1e3);function H(){for(var R=0;R<p;R+=2)(0,O[R])(O[R+1]),O[R]=void 0,O[R+1]=void 0;p=0}var Z,K,q,D,V=void 0;function re(R,j){var se=this,ne=new this.constructor(Re);ne[ae]===void 0&&Rn(ne);var ye=se._state;if(ye){var Ue=arguments[ye-1];v(function(){return yt(ye,ne,Ue,se._result)})}else Jt(se,ne,R,j);return ne}function xe(R){if(R&&typeof R=="object"&&R.constructor===this)return R;var j=new this(Re);return fe(j,R),j}V=P?function(){return r.nextTick(H)}:b?(K=0,q=new b(H),D=document.createTextNode(""),q.observe(D,{characterData:!0}),function(){D.data=K=++K%2}):k?((Z=new MessageChannel).port1.onmessage=H,function(){return Z.port2.postMessage(0)}):T===void 0&&typeof e=="function"?function(){try{var R=Function("return this")().require("vertx");return(m=R.runOnLoop||R.runOnContext)!==void 0?function(){m(H)}:M()}catch{return M()}}():M();var ae=Math.random().toString(36).substring(2);function Re(){}var he=void 0,Se=1,Ie=2;function Ce(R,j,se){v(function(ne){var ye=!1,Ue=function(Mt,sn,fr,lM){try{Mt.call(sn,fr,lM)}catch(cM){return cM}}(se,j,function(Mt){ye||(ye=!0,j!==Mt?fe(ne,Mt):Ve(ne,Mt))},function(Mt){ye||(ye=!0,De(ne,Mt))},ne._label);!ye&&Ue&&(ye=!0,De(ne,Ue))},R)}function be(R,j,se){j.constructor===R.constructor&&se===re&&j.constructor.resolve===xe?function(ne,ye){ye._state===Se?Ve(ne,ye._result):ye._state===Ie?De(ne,ye._result):Jt(ye,void 0,function(Ue){return fe(ne,Ue)},function(Ue){return De(ne,Ue)})}(R,j):se===void 0?Ve(R,j):c(se)?Ce(R,j,se):Ve(R,j)}function fe(R,j){if(R===j)De(R,new TypeError("You cannot resolve a promise with itself"));else if(function(ne){var ye=typeof ne;return ne!==null&&(ye=="object"||ye=="function")}(j)){var se=void 0;try{se=j.then}catch(ne){return void De(R,ne)}be(R,j,se)}else Ve(R,j)}function ht(R){R._onerror&&R._onerror(R._result),wt(R)}function Ve(R,j){R._state===he&&(R._result=j,R._state=Se,R._subscribers.length!==0&&v(wt,R))}function De(R,j){R._state===he&&(R._state=Ie,R._result=j,v(ht,R))}function Jt(R,j,se,ne){var ye=R._subscribers,Ue=ye.length;R._onerror=null,ye[Ue]=j,ye[Ue+Se]=se,ye[Ue+Ie]=ne,Ue===0&&R._state&&v(wt,R)}function wt(R){var j=R._subscribers,se=R._state;if(j.length!==0){for(var ne=void 0,ye=void 0,Ue=R._result,Mt=0;Mt<j.length;Mt+=3)ne=j[Mt],ye=j[Mt+se],ne?yt(se,ne,ye,Ue):ye(Ue);R._subscribers.length=0}}function yt(R,j,se,ne){var ye=c(se),Ue=void 0,Mt=void 0,sn=!0;if(ye){try{Ue=se(ne)}catch(fr){sn=!1,Mt=fr}if(j===Ue)return void De(j,new TypeError("A promises callback cannot return that same promise."))}else Ue=ne;j._state!==he||(ye&&sn?fe(j,Ue):sn===!1?De(j,Mt):R===Se?Ve(j,Ue):R===Ie&&De(j,Ue))}var pr=0;function Rn(R){R[ae]=pr++,R._state=void 0,R._result=void 0,R._subscribers=[]}var Dn=(dr.prototype._enumerate=function(R){for(var j=0;this._state===he&&j<R.length;j++)this._eachEntry(R[j],j)},dr.prototype._eachEntry=function(R,j){var se=this._instanceConstructor,ne=se.resolve;if(ne===xe){var ye=void 0,Ue=void 0,Mt=!1;try{ye=R.then}catch(fr){Mt=!0,Ue=fr}if(ye===re&&R._state!==he)this._settledAt(R._state,j,R._result);else if(typeof ye!="function")this._remaining--,this._result[j]=R;else if(se===Bt){var sn=new se(Re);Mt?De(sn,Ue):be(sn,R,ye),this._willSettleAt(sn,j)}else this._willSettleAt(new se(function(fr){return fr(R)}),j)}else this._willSettleAt(ne(R),j)},dr.prototype._settledAt=function(R,j,se){var ne=this.promise;ne._state===he&&(this._remaining--,R===Ie?De(ne,se):this._result[j]=se),this._remaining===0&&Ve(ne,this._result)},dr.prototype._willSettleAt=function(R,j){var se=this;Jt(R,void 0,function(ne){return se._settledAt(Se,j,ne)},function(ne){return se._settledAt(Ie,j,ne)})},dr);function dr(R,j){this._instanceConstructor=R,this.promise=new R(Re),this.promise[ae]||Rn(this.promise),u(j)?(this.length=j.length,this._remaining=j.length,this._result=new Array(this.length),this.length===0?Ve(this.promise,this._result):(this.length=this.length||0,this._enumerate(j),this._remaining===0&&Ve(this.promise,this._result))):De(this.promise,new Error("Array Methods must be provided an Array"))}var Bt=(mr.prototype.catch=function(R){return this.then(null,R)},mr.prototype.finally=function(R){var j=this.constructor;return c(R)?this.then(function(se){return j.resolve(R()).then(function(){return se})},function(se){return j.resolve(R()).then(function(){throw se})}):this.then(R,R)},mr);function mr(R){this[ae]=pr++,this._result=this._state=void 0,this._subscribers=[],Re!==R&&(typeof R!="function"&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof mr?function(j,se){try{se(function(ne){fe(j,ne)},function(ne){De(j,ne)})}catch(ne){De(j,ne)}}(this,R):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return Bt.prototype.then=re,Bt.all=function(R){return new Dn(this,R).promise},Bt.race=function(R){var j=this;return u(R)?new j(function(se,ne){for(var ye=R.length,Ue=0;Ue<ye;Ue++)j.resolve(R[Ue]).then(se,ne)}):new j(function(se,ne){return ne(new TypeError("You must pass an array to race."))})},Bt.resolve=xe,Bt.reject=function(R){var j=new this(Re);return De(j,R),j},Bt._setScheduler=function(R){h=R},Bt._setAsap=function(R){v=R},Bt._asap=v,Bt.polyfill=function(){var R=void 0;if(i!==void 0)R=i;else if(typeof xn<"u")R=xn;else try{R=Function("return this")()}catch{throw new Error("polyfill failed because global object is unavailable in this environment")}var j=R.Promise;if(j){var se=null;try{se=Object.prototype.toString.call(j.resolve())}catch{}if(se==="[object Promise]"&&!j.cast)return}R.Promise=Bt},Bt.Promise=Bt},typeof o=="object"&&t!==void 0?t.exports=l():typeof define=="function"&&define.amd?define(l):s.ES6Promise=l()}).call(this,e("VCmEsw"),typeof xn<"u"?xn:typeof window<"u"?window:{})},{VCmEsw:2}],2:[function(e,t,o){var r=t.exports={};function i(){}r.nextTick=function(){var s=typeof window<"u"&&window.setImmediate,l=typeof window<"u"&&window.postMessage&&window.addEventListener;if(s)return function(u){return window.setImmediate(u)};if(l){var c=[];return window.addEventListener("message",function(u){var p=u.source;p!==window&&p!==null||u.data!=="process-tick"||(u.stopPropagation(),0<c.length&&c.shift()())},!0),function(u){c.push(u),window.postMessage("process-tick","*")}}return function(u){setTimeout(u,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.on=i,r.addListener=i,r.once=i,r.off=i,r.removeListener=i,r.removeAllListeners=i,r.emit=i,r.binding=function(s){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(s){throw new Error("process.chdir is not supported")}},{}],3:[function(e,t,o){"use strict";t.exports=function(){this.width=0,this.height=0,this.numPlays=0,this.playTime=0,this.frames=[],this.play=function(){c||u||(this.rewind(),c=!0,requestAnimationFrame(m))},this.rewind=function(){s=i=0,l=null,u=c=!1},this.addContext=function(v){if(0<p.length){var T=p[0].getImageData(0,0,this.width,this.height);v.putImageData(T,0,0)}p.push(v),v._apng_animation=this},this.removeContext=function(v){var T=p.indexOf(v);T!==-1&&(p.splice(T,1),p.length===0&&this.rewind(),"_apng_animation"in v&&delete v._apng_animation)},this.isPlayed=function(){return c},this.isFinished=function(){return u};var r=this,i=0,s=0,l=null,c=!1,u=!1,p=[],m=function(v){for(;c&&i<=v;)h(v);c&&requestAnimationFrame(m)},h=function(v){var T=s++%r.frames.length,N=r.frames[T];if(r.numPlays==0||s/r.frames.length<=r.numPlays){for(T==0&&(p.forEach(function(b){b.clearRect(0,0,r.width,r.height)}),l=null,N.disposeOp==2&&(N.disposeOp=1)),l&&l.disposeOp==1?p.forEach(function(b){b.clearRect(l.left,l.top,l.width,l.height)}):l&&l.disposeOp==2&&p.forEach(function(b){b.putImageData(l.iData,l.left,l.top)}),(l=N).iData=null,l.disposeOp==2&&(l.iData=p[0].getImageData(N.left,N.top,N.width,N.height)),N.blendOp==0&&p.forEach(function(b){b.clearRect(N.left,N.top,N.width,N.height)}),p.forEach(function(b){b.drawImage(N.img,N.left,N.top)}),i==0&&(i=v);v>i+r.playTime;)i+=r.playTime;i+=N.delay}else u=!(c=!1)}}},{}],4:[function(e,t,o){"use strict";for(var r=new Uint32Array(256),i=0;i<256;i++){for(var s=i,l=0;l<8;l++)s=1&s?3988292384^s>>>1:s>>>1;r[i]=s}t.exports=function(c,u,p){for(var m=-1,h=u=u||0,v=u+(p=p||c.length-u);h<v;h++)m=m>>>8^r[255&(m^c[h])];return-1^m}},{}],5:[function(e,t,o){(function(r){"use strict";var i=e("./support-test"),s=e("./parser"),l=e("./loader"),c=r.APNG={};c.checkNativeFeatures=i.checkNativeFeatures,c.ifNeeded=i.ifNeeded,c.parseBuffer=function(p){return s(p)};var u={};c.parseURL=function(p){return p in u||(u[p]=l(p).then(s)),u[p]},c.animateContext=function(p,m){return c.parseURL(p).then(function(h){return h.addContext(m),h.play(),h})},c.animateImage=function(p){return p.setAttribute("data-is-apng","progress"),c.parseURL(p.src).then(function(m){p.setAttribute("data-is-apng","yes");var h=document.createElement("canvas");h.width=m.width,h.height=m.height,Array.prototype.slice.call(p.attributes).forEach(function(k){["alt","src","usemap","ismap","data-is-apng","width","height"].indexOf(k.nodeName)==-1&&h.setAttributeNode(k.cloneNode(!1))}),h.setAttribute("data-apng-src",p.src),p.alt!=""&&h.appendChild(document.createTextNode(p.alt));var v="",T="",N=0,b="";p.style.width!=""&&p.style.width!="auto"?v=p.style.width:p.hasAttribute("width")&&(v=p.getAttribute("width")+"px"),p.style.height!=""&&p.style.height!="auto"?T=p.style.height:p.hasAttribute("height")&&(T=p.getAttribute("height")+"px"),v!=""&&T==""&&(N=parseFloat(v),b=v.match(/\D+$/)[0],T=Math.round(h.height*N/h.width)+b),T!=""&&v==""&&(N=parseFloat(T),b=T.match(/\D+$/)[0],v=Math.round(h.width*N/h.height)+b),h.style.width=v,h.style.height=T;var P=p.parentNode;P.insertBefore(h,p),P.removeChild(p),m.addContext(h.getContext("2d")),m.play()},function(){p.setAttribute("data-is-apng","no")})},c.releaseCanvas=function(p){var m=p.getContext("2d");"_apng_animation"in m&&m._apng_animation.removeContext(m)}}).call(this,typeof xn<"u"?xn:typeof window<"u"?window:{})},{"./loader":6,"./parser":7,"./support-test":8}],6:[function(e,t,o){"use strict";var r=r||e("es6-promise").Promise;t.exports=function(i){return new r(function(s,l){var c=new XMLHttpRequest;c.open("GET",i),c.responseType="arraybuffer",c.onload=function(){this.status==200?s(this.response):l(this)},c.send()})}},{"es6-promise":1}],7:[function(e,t,o){"use strict";var r=r||e("es6-promise").Promise,i=e("./animation"),s=e("./crc32"),l=new Uint8Array([137,80,78,71,13,10,26,10]);t.exports=function(b){var P=new Uint8Array(b);return new r(function(k,M){for(var O=0;O<l.length;O++)if(l[O]!=P[O])return void M("Not a PNG file (invalid file signature)");var H=!1;if(c(P,function(Ce){return Ce!="acTL"||!(H=!0)}),H){var Z=[],K=[],q=null,D=null,V=new i;if(c(P,function(Ce,be,fe,ht){switch(Ce){case"IHDR":q=be.subarray(fe+8,fe+8+ht),V.width=u(be,fe+8),V.height=u(be,fe+12);break;case"acTL":V.numPlays=u(be,fe+8+4);break;case"fcTL":D&&V.frames.push(D),(D={}).width=u(be,fe+8+4),D.height=u(be,fe+8+8),D.left=u(be,fe+8+12),D.top=u(be,fe+8+16);var Ve=p(be,fe+8+20),De=p(be,fe+8+22);De==0&&(De=100),D.delay=1e3*Ve/De,D.delay<=10&&(D.delay=100),V.playTime+=D.delay,D.disposeOp=m(be,fe+8+24),D.blendOp=m(be,fe+8+25),D.dataParts=[];break;case"fdAT":D&&D.dataParts.push(be.subarray(fe+8+4,fe+8+ht));break;case"IDAT":D&&D.dataParts.push(be.subarray(fe+8,fe+8+ht));break;case"IEND":K.push(h(be,fe,12+ht));break;default:Z.push(h(be,fe,12+ht))}}),D&&V.frames.push(D),V.frames.length!=0)for(var re=0,xe=new Blob(Z),ae=new Blob(K),Re=0;Re<V.frames.length;Re++){D=V.frames[Re];var he=[];he.push(l),q.set(T(D.width),0),q.set(T(D.height),4),he.push(N("IHDR",q)),he.push(xe);for(var Se=0;Se<D.dataParts.length;Se++)he.push(N("IDAT",D.dataParts[Se]));he.push(ae);var Ie=URL.createObjectURL(new Blob(he,{type:"image/png"}));delete D.dataParts,he=null,D.img=document.createElement("img"),D.img.onload=function(){URL.revokeObjectURL(this.src),++re==V.frames.length&&k(V)},D.img.onerror=function(){M("Image creation error")},D.img.src=Ie}else M("Not an animated PNG")}else M("Not an animated PNG")})};var c=function(b,P){var k=8;do{var M=u(b,k),O=v(b,k+4,4),H=P(O,b,k,M);k+=12+M}while(H!==!1&&O!="IEND"&&k<b.length)},u=function(b,P){var k=0;k+=b[0+P]<<24>>>0;for(var M=1;M<4;M++)k+=b[M+P]<<8*(3-M);return k},p=function(b,P){for(var k=0,M=0;M<2;M++)k+=b[M+P]<<8*(1-M);return k},m=function(b,P){return b[P]},h=function(b,P,k){var M=new Uint8Array(k);return M.set(b.subarray(P,P+k)),M},v=function(b,P,k){var M=Array.prototype.slice.call(b.subarray(P,P+k));return String.fromCharCode.apply(String,M)},T=function(b){return[b>>>24&255,b>>>16&255,b>>>8&255,255&b]},N=function(b,P){var k=b.length+P.length,M=new Uint8Array(new ArrayBuffer(k+8));M.set(T(P.length),0),M.set(function(H){for(var Z=[],K=0;K<H.length;K++)Z.push(H.charCodeAt(K));return Z}(b),4),M.set(P,8);var O=s(M,4,k);return M.set(T(O),k+4),M}},{"./animation":3,"./crc32":4,"es6-promise":1}],8:[function(e,t,o){(function(r){"use strict";var i,s,l=l||e("es6-promise").Promise,c=(i=function(u){var p=document.createElement("canvas"),m={TypedArrays:"ArrayBuffer"in r,BlobURLs:"URL"in r,requestAnimationFrame:"requestAnimationFrame"in r,pageProtocol:location.protocol=="http:"||location.protocol=="https:",canvas:"getContext"in document.createElement("canvas"),APNG:!1};if(m.canvas){var h=new Image;h.onload=function(){var v=p.getContext("2d");v.drawImage(h,0,0),m.APNG=v.getImageData(0,0,1,1).data[3]===0,u(m)},h.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACGFjVEwAAAABAAAAAcMq2TYAAAANSURBVAiZY2BgYPgPAAEEAQB9ssjfAAAAGmZjVEwAAAAAAAAAAQAAAAEAAAAAAAAAAAD6A+gBAbNU+2sAAAARZmRBVAAAAAEImWNgYGBgAAAABQAB6MzFdgAAAABJRU5ErkJggg=="}else u(m)},s=null,function(u){return s=s||new l(i),u&&s.then(u),s});t.exports={checkNativeFeatures:c,ifNeeded:function(u){return u===void 0&&(u=!1),c().then(function(p){if(p.APNG&&!u)reject();else{var m=!0;for(var h in p)p.hasOwnProperty(h)&&h!="APNG"&&(m=m&&p[h])}})}}}).call(this,typeof xn<"u"?xn:typeof window<"u"?window:{})},{"es6-promise":1}]},{},[5])});var _S,vA,Z9,OS,BS,FS,vl=g(()=>{"use strict";a();zo();DS();_S=En(()=>ES().APNG),vA="https://unpkg.com/@sapphi-red/web-noise-suppressor@0.3.3/dist",Z9=`${vA}/rnnoise/workletProcessor.js`,OS="https://unpkg.com/@vap/shiki-worker@0.0.8/dist/index.min.js",BS="https://unpkg.com/@vap/shiki@0.10.3/dist/onig.wasm",FS=En(()=>import("https://unpkg.com/stegcloak-dist@1.0.0/index.js"))});var xd=gr(Td=>{a();var HS=Object.defineProperty,SA=e=>HS(e,"__esModule",{value:!0}),bA=(e,t)=>{for(var o in t)HS(e,o,{get:t[o],enumerable:!0})};SA(Td);bA(Td,{GIFEncoder:()=>ZS,applyPalette:()=>CA,default:()=>UA,nearestColor:()=>LA,nearestColorIndex:()=>KS,nearestColorIndexWithDistance:()=>YS,prequantize:()=>NA,quantize:()=>IA,snapColorsToPalette:()=>DA});var TA={signature:"GIF",version:"89a",trailer:59,extensionIntroducer:33,applicationExtensionLabel:255,graphicControlExtensionLabel:249,imageSeparator:44,signatureSize:3,versionSize:3,globalColorTableFlagMask:128,colorResolutionMask:112,sortFlagMask:8,globalColorTableSizeMask:7,applicationIdentifierSize:8,applicationAuthCodeSize:3,disposalMethodMask:28,userInputFlagMask:2,transparentColorFlagMask:1,localColorTableFlagMask:128,interlaceFlagMask:64,idSortFlagMask:32,localColorTableSizeMask:7};function zS(e=256){let t=0,o=new Uint8Array(e);return{get buffer(){return o.buffer},reset(){t=0},bytesView(){return o.subarray(0,t)},bytes(){return o.slice(0,t)},writeByte(i){r(t+1),o[t]=i,t++},writeBytes(i,s=0,l=i.length){r(t+l);for(let c=0;c<l;c++)o[t++]=i[c+s]},writeBytesView(i,s=0,l=i.byteLength){r(t+l),o.set(i.subarray(s,s+l),t),t+=l}};function r(i){var s=o.length;if(s>=i)return;var l=1024*1024;i=Math.max(i,s*(s<l?2:1.125)>>>0),s!=0&&(i=Math.max(i,256));let c=o;o=new Uint8Array(i),t>0&&o.set(c.subarray(0,t),0)}}var vd=12,US=5003,xA=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function wA(e,t,o,r,i=zS(512),s=new Uint8Array(256),l=new Int32Array(US),c=new Int32Array(US)){let u=l.length,p=Math.max(2,r);s.fill(0),c.fill(0),l.fill(-1);let m=0,h=0,v=p+1,T=v,N=!1,b=T,P=(1<<b)-1,k=1<<v-1,M=k+1,O=k+2,H=0,Z=o[0],K=0;for(let V=u;V<65536;V*=2)++K;K=8-K,i.writeByte(p),D(k);let q=o.length;for(let V=1;V<q;V++){e:{let re=o[V],xe=(re<<vd)+Z,ae=re<<K^Z;if(l[ae]===xe){Z=c[ae];break e}let Re=ae===0?1:u-ae;for(;l[ae]>=0;)if(ae-=Re,ae<0&&(ae+=u),l[ae]===xe){Z=c[ae];break e}D(Z),Z=re,O<1<<vd?(c[ae]=O++,l[ae]=xe):(l.fill(-1),O=k+2,N=!0,D(k))}}return D(Z),D(M),i.writeByte(0),i.bytesView();function D(V){for(m&=xA[h],h>0?m|=V<<h:m=V,h+=b;h>=8;)s[H++]=m&255,H>=254&&(i.writeByte(H),i.writeBytesView(s,0,H),H=0),m>>=8,h-=8;if((O>P||N)&&(N?(b=T,P=(1<<b)-1,N=!1):(++b,P=b===vd?1<<b:(1<<b)-1)),V==M){for(;h>0;)s[H++]=m&255,H>=254&&(i.writeByte(H),i.writeBytesView(s,0,H),H=0),m>>=8,h-=8;H>0&&(i.writeByte(H),i.writeBytesView(s,0,H),H=0)}}}var MA=wA;function jS(e,t,o){return e<<8&63488|t<<2&992|o>>3}function WS(e,t,o,r){return e>>4|t&240|(o&240)<<4|(r&240)<<8}function qS(e,t,o){return e>>4<<8|t&240|o>>4}function Sl(e,t,o){return e<t?t:e>o?o:e}function Es(e){return e*e}function $S(e,t,o){var r=0,i=1e100;let s=e[t],l=s.cnt,c=s.ac,u=s.rc,p=s.gc,m=s.bc;for(var h=s.fw;h!=0;h=e[h].fw){let T=e[h],N=T.cnt,b=l*N/(l+N);if(!(b>=i)){var v=0;o&&(v+=b*Es(T.ac-c),v>=i)||(v+=b*Es(T.rc-u),!(v>=i)&&(v+=b*Es(T.gc-p),!(v>=i)&&(v+=b*Es(T.bc-m),!(v>=i)&&(i=v,r=h))))}}s.err=i,s.nn=r}function Sd(){return{ac:0,rc:0,gc:0,bc:0,cnt:0,nn:0,fw:0,bk:0,tm:0,mtm:0,err:0}}function PA(e,t){let o=t==="rgb444"?4096:65536,r=new Array(o),i=e.length;if(t==="rgba4444")for(let s=0;s<i;++s){let l=e[s],c=l>>24&255,u=l>>16&255,p=l>>8&255,m=l&255,h=WS(m,p,u,c),v=h in r?r[h]:r[h]=Sd();v.rc+=m,v.gc+=p,v.bc+=u,v.ac+=c,v.cnt++}else if(t==="rgb444")for(let s=0;s<i;++s){let l=e[s],c=l>>16&255,u=l>>8&255,p=l&255,m=qS(p,u,c),h=m in r?r[m]:r[m]=Sd();h.rc+=p,h.gc+=u,h.bc+=c,h.cnt++}else for(let s=0;s<i;++s){let l=e[s],c=l>>16&255,u=l>>8&255,p=l&255,m=jS(p,u,c),h=m in r?r[m]:r[m]=Sd();h.rc+=p,h.gc+=u,h.bc+=c,h.cnt++}return r}function IA(e,t,o={}){let{format:r="rgb565",clearAlpha:i=!0,clearAlphaColor:s=0,clearAlphaThreshold:l=0,oneBitAlpha:c=!1}=o;if(!e||!e.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(e instanceof Uint8Array)&&!(e instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");let u=new Uint32Array(e.buffer),p=o.useSqrt!==!1,m=r==="rgba4444",h=PA(u,r),v=h.length,T=v-1,N=new Uint32Array(v+1);for(var b=0,k=0;k<v;++k){let Se=h[k];if(Se!=null){var P=1/Se.cnt;m&&(Se.ac*=P),Se.rc*=P,Se.gc*=P,Se.bc*=P,h[b++]=Se}}Es(t)/b<.022&&(p=!1);for(var k=0;k<b-1;++k)h[k].fw=k+1,h[k+1].bk=k,p&&(h[k].cnt=Math.sqrt(h[k].cnt));p&&(h[k].cnt=Math.sqrt(h[k].cnt));var M,O,H;for(k=0;k<b;++k){$S(h,k,!1);var Z=h[k].err;for(O=++N[0];O>1&&(H=O>>1,!(h[M=N[H]].err<=Z));O=H)N[O]=M;N[O]=k}var K=b-t;for(k=0;k<K;){for(var q;;){var D=N[1];if(q=h[D],q.tm>=q.mtm&&h[q.nn].mtm<=q.tm)break;q.mtm==T?D=N[1]=N[N[0]--]:($S(h,D,!1),q.tm=k);var Z=h[D].err;for(O=1;(H=O+O)<=N[0]&&(H<N[0]&&h[N[H]].err>h[N[H+1]].err&&H++,!(Z<=h[M=N[H]].err));O=H)N[O]=M;N[O]=D}var V=h[q.nn],re=q.cnt,xe=V.cnt,P=1/(re+xe);m&&(q.ac=P*(re*q.ac+xe*V.ac)),q.rc=P*(re*q.rc+xe*V.rc),q.gc=P*(re*q.gc+xe*V.gc),q.bc=P*(re*q.bc+xe*V.bc),q.cnt+=V.cnt,q.mtm=++k,h[V.bk].fw=V.fw,h[V.fw].bk=V.bk,V.mtm=T}let ae=[];var Re=0;for(k=0;;++Re){let he=Sl(Math.round(h[k].rc),0,255),Se=Sl(Math.round(h[k].gc),0,255),Ie=Sl(Math.round(h[k].bc),0,255),Ce=255;m&&(Ce=Sl(Math.round(h[k].ac),0,255),c&&(Ce=Ce<=(typeof c=="number"?c:127)?0:255),i&&Ce<=l&&(he=Se=Ie=s,Ce=0));let be=m?[he,Se,Ie,Ce]:[he,Se,Ie];if(AA(ae,be)||ae.push(be),(k=h[k].fw)==0)break}return ae}function AA(e,t){for(let o=0;o<e.length;o++){let r=e[o],i=r[0]===t[0]&&r[1]===t[1]&&r[2]===t[2],s=r.length>=4&&t.length>=4?r[3]===t[3]:!0;if(i&&s)return!0}return!1}function Tl(e,t){var o=0,r;for(r=0;r<e.length;r++){let i=e[r]-t[r];o+=i*i}return o}function bl(e,t){return t>1?Math.round(e/t)*t:e}function NA(e,{roundRGB:t=5,roundAlpha:o=10,oneBitAlpha:r=null}={}){let i=new Uint32Array(e.buffer);for(let s=0;s<i.length;s++){let l=i[s],c=l>>24&255,u=l>>16&255,p=l>>8&255,m=l&255;c=bl(c,o),r&&(c=c<=(typeof r=="number"?r:127)?0:255),m=bl(m,t),p=bl(p,t),u=bl(u,t),i[s]=c<<24|u<<16|p<<8|m<<0}}function CA(e,t,o="rgb565"){if(!e||!e.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(e instanceof Uint8Array)&&!(e instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");if(t.length>256)throw new Error("applyPalette() only works with 256 colors or less");let r=new Uint32Array(e.buffer),i=r.length,s=o==="rgb444"?4096:65536,l=new Uint8Array(i),c=new Array(s),u=o==="rgba4444";if(o==="rgba4444")for(let p=0;p<i;p++){let m=r[p],h=m>>24&255,v=m>>16&255,T=m>>8&255,N=m&255,b=WS(N,T,v,h),P=b in c?c[b]:c[b]=kA(N,T,v,h,t);l[p]=P}else{let p=o==="rgb444"?qS:jS;for(let m=0;m<i;m++){let h=r[m],v=h>>16&255,T=h>>8&255,N=h&255,b=p(N,T,v),P=b in c?c[b]:c[b]=RA(N,T,v,t);l[m]=P}}return l}function kA(e,t,o,r,i){let s=0,l=1e100;for(let c=0;c<i.length;c++){let u=i[c],p=u[3],m=Ur(p-r);if(m>l)continue;let h=u[0];if(m+=Ur(h-e),m>l)continue;let v=u[1];if(m+=Ur(v-t),m>l)continue;let T=u[2];m+=Ur(T-o),!(m>l)&&(l=m,s=c)}return s}function RA(e,t,o,r){let i=0,s=1e100;for(let l=0;l<r.length;l++){let c=r[l],u=c[0],p=Ur(u-e);if(p>s)continue;let m=c[1];if(p+=Ur(m-t),p>s)continue;let h=c[2];p+=Ur(h-o),!(p>s)&&(s=p,i=l)}return i}function DA(e,t,o=5){if(!e.length||!t.length)return;let r=e.map(l=>l.slice(0,3)),i=o*o,s=e[0].length;for(let l=0;l<t.length;l++){let c=t[l];c.length<s?c=[c[0],c[1],c[2],255]:c.length>s?c=c.slice(0,3):c=c.slice();let u=YS(r,c.slice(0,3),Tl),p=u[0],m=u[1];m>0&&m<=i&&(e[p]=c)}}function Ur(e){return e*e}function KS(e,t,o=Tl){let r=1/0,i=-1;for(let s=0;s<e.length;s++){let l=e[s],c=o(t,l);c<r&&(r=c,i=s)}return i}function YS(e,t,o=Tl){let r=1/0,i=-1;for(let s=0;s<e.length;s++){let l=e[s],c=o(t,l);c<r&&(r=c,i=s)}return[i,r]}function LA(e,t,o=Tl){return e[KS(e,t,o)]}function ZS(e={}){let{initialCapacity:t=4096,auto:o=!0}=e,r=zS(t),i=5003,s=new Uint8Array(256),l=new Int32Array(i),c=new Int32Array(i),u=!1;return{reset(){r.reset(),u=!1},finish(){r.writeByte(TA.trailer)},bytes(){return r.bytes()},bytesView(){return r.bytesView()},get buffer(){return r.buffer},get stream(){return r},writeHeader:p,writeFrame(m,h,v,T={}){let{transparent:N=!1,transparentIndex:b=0,delay:P=0,palette:k=null,repeat:M=0,colorDepth:O=8,dispose:H=-1}=T,Z=!1;if(o?u||(Z=!0,p(),u=!0):Z=Boolean(T.first),h=Math.max(0,Math.floor(h)),v=Math.max(0,Math.floor(v)),Z){if(!k)throw new Error("First frame must include a { palette } option");_A(r,h,v,k,O),GS(r,k),M>=0&&OA(r,M)}let K=Math.round(P/10);EA(r,H,K,N,b);let q=Boolean(k)&&!Z;BA(r,h,v,q?k:null),q&&GS(r,k),FA(r,m,h,v,O,s,l,c)}};function p(){XS(r,"GIF89a")}}function EA(e,t,o,r,i){e.writeByte(33),e.writeByte(249),e.writeByte(4),i<0&&(i=0,r=!1);var s,l;r?(s=1,l=2):(s=0,l=0),t>=0&&(l=t&7),l<<=2;let c=0;e.writeByte(0|l|c|s),Vn(e,o),e.writeByte(i||0),e.writeByte(0)}function _A(e,t,o,r,i=8){let c=bd(r.length)-1,u=1<<7|i-1<<4|0<<3|c,p=0,m=0;Vn(e,t),Vn(e,o),e.writeBytes([u,p,m])}function OA(e,t){e.writeByte(33),e.writeByte(255),e.writeByte(11),XS(e,"NETSCAPE2.0"),e.writeByte(3),e.writeByte(1),Vn(e,t),e.writeByte(0)}function GS(e,t){let o=1<<bd(t.length);for(let r=0;r<o;r++){let i=[0,0,0];r<t.length&&(i=t[r]),e.writeByte(i[0]),e.writeByte(i[1]),e.writeByte(i[2])}}function BA(e,t,o,r){if(e.writeByte(44),Vn(e,0),Vn(e,0),Vn(e,t),Vn(e,o),r){let l=bd(r.length)-1;e.writeByte(128|l)}else e.writeByte(0)}function FA(e,t,o,r,i=8,s,l,c){MA(o,r,t,i,e,s,l,c)}function Vn(e,t){e.writeByte(t&255),e.writeByte(t>>8&255)}function XS(e,t){for(var o=0;o<t.length;o++)e.writeByte(t.charCodeAt(o))}function bd(e){return Math.max(Math.ceil(Math.log2(e)),1)}var UA=ZS});function QS(e,t){let o=t?.fields?.find(i=>i.localName===e);return o?Object.values(o).find(i=>typeof i=="function")?.():void 0}var Ti,$A,$r,_s,JS,Os,er,xl,GA,HA,wd,Md,wl,Ze,Pd,VS=g(()=>{"use strict";a();tn();$();I();vl();nt();Je();w();W();x();Ti=da(xd()),$A=0,$r=we("StickersStore"),_s=we("UserSettingsProtoStore"),JS=A("BINARY_READ_OPTIONS");Os=Ao(()=>Yi.PreloadedUserSettingsActionCreators),er=Ao(()=>QS("appearance",Os.ProtoClass)),xl=Ao(()=>QS("clientThemeSettings",er)),GA=1n<<18n,HA=1n<<37n,wd=/\/emojis\/(\d+?)\.(png|webp|gif)/,Md=/\/stickers\/(\d+?)\./,wl=/\/attachments\/\d+?\/\d+?\/(\d+?)\.gif/,Ze=L({enableEmojiBypass:{description:"Allow sending fake emojis",type:3,default:!0,restartNeeded:!0},emojiSize:{description:"Size of the emojis when sending",type:5,default:48,markers:[32,48,64,128,160,256,512]},transformEmojis:{description:"Whether to transform fake emojis into real ones",type:3,default:!0,restartNeeded:!0},enableStickerBypass:{description:"Allow sending fake stickers",type:3,default:!0,restartNeeded:!0},stickerSize:{description:"Size of the stickers when sending",type:5,default:160,markers:[32,64,128,160,256,512]},transformStickers:{description:"Whether to transform fake stickers into real ones",type:3,default:!0,restartNeeded:!0},transformCompoundSentence:{description:"Whether to transform fake stickers and emojis in compound sentences (sentences with more content than just the fake emoji or sticker link)",type:3,default:!1},enableStreamQualityBypass:{description:"Allow streaming in nitro quality",type:3,default:!0,restartNeeded:!0}}),Pd=y({name:"FakeNitro",authors:[d.Arjix,d.D3SOX,d.Ven,d.obscurity,d.captain,d.Nuckyz,d.AutumnVN],description:"Allows you to stream in nitro quality, send fake emojis/stickers and use client themes.",dependencies:["MessageEventsAPI"],settings:Ze,patches:[{find:".PREMIUM_LOCKED;",predicate:()=>Ze.store.enableEmojiBypass,replacement:[{match:/(?<=,intention:(\i).+?;)/,replace:(e,t)=>`let fakeNitroIntention=${t};`},{match:/\.(?:canUseEmojisEverywhere|canUseAnimatedEmojis)\(\i(?=\))/g,replace:'$&,typeof fakeNitroIntention!=="undefined"?fakeNitroIntention:void 0'},{match:/(&&!\i&&)!(\i)(?=\)return \i\.\i\.DISALLOW_EXTERNAL;)/,replace:(e,t,o)=>`${t}(!${o}&&(typeof fakeNitroIntention==="undefined"||![${3},${4}].includes(fakeNitroIntention)))`},{match:/if\(!\i\.available/,replace:e=>`${e}&&(typeof fakeNitroIntention==="undefined"||![${3},${4}].includes(fakeNitroIntention))`}]},{find:"canUseAnimatedEmojis:function",predicate:()=>Ze.store.enableEmojiBypass,replacement:{match:/((?:canUseEmojisEverywhere|canUseAnimatedEmojis):function\(\i)\){(.+?\))(?=})/g,replace:(e,t,o)=>`${t},fakeNitroIntention){${o}||fakeNitroIntention==null||[${3},${4}].includes(fakeNitroIntention)`}},{find:"canUseCustomStickersEverywhere:function",predicate:()=>Ze.store.enableStickerBypass,replacement:{match:/canUseCustomStickersEverywhere:function\(\i\){/,replace:"$&return true;"}},{find:'"SENDABLE"',predicate:()=>Ze.store.enableStickerBypass,replacement:{match:/(\w+)\.available\?/,replace:"true?"}},{find:"canUseHighVideoUploadQuality:function",predicate:()=>Ze.store.enableStreamQualityBypass,replacement:["canUseHighVideoUploadQuality","canStreamQuality"].map(e=>({match:new RegExp(`${e}:function\\(\\i(?:,\\i)?\\){`,"g"),replace:"$&return true;"}))},{find:"STREAM_FPS_OPTION.format",predicate:()=>Ze.store.enableStreamQualityBypass,replacement:{match:/guildPremiumTier:\i\.\i\.TIER_\d,?/g,replace:""}},{find:"canUseClientThemes:function",replacement:{match:/canUseClientThemes:function\(\i\){/,replace:"$&return true;"}},{find:'.displayName="UserSettingsProtoStore"',replacement:[{match:/CONNECTION_OPEN:function\((\i)\){/,replace:(e,t)=>`${e}$self.handleProtoChange(${t}.userSettingsProto,${t}.user);`},{match:/let{settings:/,replace:"arguments[0].local||$self.handleProtoChange(arguments[0].settings.proto);$&"}]},{find:",updateTheme(",replacement:{match:/(function \i\(\i\){let{backgroundGradientPresetId:(\i).+?)(\i\.\i\.updateAsync.+?theme=(.+?),.+?},\i\))/,replace:(e,t,o,r,i)=>`${t}$self.handleGradientThemeSelect(${o},${i},()=>${r});`}},{find:'["strong","em","u","text","inlineCode","s","spoiler"]',replacement:[{predicate:()=>Ze.store.transformEmojis,match:/1!==(\i)\.length\|\|1!==\i\.length/,replace:(e,t)=>`${e}||$self.shouldKeepEmojiLink(${t}[0])`},{predicate:()=>Ze.store.transformEmojis||Ze.store.transformStickers,match:/(?=return{hasSpoilerEmbeds:\i,content:(\i)})/,replace:(e,t)=>`${t}=$self.patchFakeNitroEmojisOrRemoveStickersLinks(${t},arguments[2]?.formatInline);`}]},{find:"renderEmbeds(",replacement:[{predicate:()=>Ze.store.transformEmojis||Ze.store.transformStickers,match:/(renderEmbeds\((\i)\){)(.+?embeds\.map\((\i)=>{)/,replace:(e,t,o,r,i)=>`${t}const fakeNitroMessage=${o};${r}if($self.shouldIgnoreEmbed(${i},fakeNitroMessage))return null;`},{predicate:()=>Ze.store.transformStickers,match:/(?<=renderStickersAccessories\((\i)\){let (\i)=\(0,\i\.\i\)\(\i\).+?;)/,replace:(e,t,o)=>`${o}=$self.patchFakeNitroStickers(${o},${t});`},{predicate:()=>Ze.store.transformStickers,match:/renderAttachments\(\i\){let{attachments:(\i).+?;/,replace:(e,t)=>`${e}${t}=$self.filterAttachments(${t});`}]},{find:".Messages.STICKER_POPOUT_UNJOINED_PRIVATE_GUILD_DESCRIPTION.format",predicate:()=>Ze.store.transformStickers,replacement:[{match:/let{renderableSticker:(\i).{0,250}isGuildSticker.+?channel:\i,/,replace:(e,t)=>`${e}fakeNitroRenderableSticker:${t},`},{match:/(let \i,{sticker:\i,channel:\i,closePopout:\i.+?}=(\i).+?;)(.+?description:)(\i)(?=,sticker:\i)/,replace:(e,t,o,r,i)=>`${t}let{fakeNitroRenderableSticker}=${o};${r}$self.addFakeNotice(${0},${i},!!fakeNitroRenderableSticker?.fake)`}]},{find:".EMOJI_UPSELL_POPOUT_MORE_EMOJIS_OPENED,",predicate:()=>Ze.store.transformEmojis,replacement:{match:/isDiscoverable:\i,shouldHideRoleSubscriptionCTA:\i,(?<={node:(\i),.+?)/,replace:(e,t)=>`${e}fakeNitroNode:${t},`}},{find:".Messages.EMOJI_POPOUT_UNJOINED_DISCOVERABLE_GUILD_DESCRIPTION",predicate:()=>Ze.store.transformEmojis,replacement:{match:/(?<=isDiscoverable:\i,emojiComesFromCurrentGuild:\i,.+?}=(\i).+?;)(.+?return )(.{0,1000}\.Messages\.EMOJI_POPOUT_UNJOINED_DISCOVERABLE_GUILD_DESCRIPTION.+?)(?=},)/,replace:(e,t,o,r)=>`let{fakeNitroNode}=${t};${o}$self.addFakeNotice(${1},${r},!!fakeNitroNode?.fake)`}},{find:"canUsePremiumAppIcons:function",replacement:{match:/canUsePremiumAppIcons:function\(\i\){/,replace:"$&return true;"}},{find:'location:"AppIconHome"',replacement:{match:/\i\.\i\.isPremium\(\i\.\i\.getCurrentUser\(\)\)/,replace:"true"}}],get guildId(){return Yu()?.id},get canUseEmotes(){return(F.getCurrentUser().premiumType??0)>0},get canUseStickers(){return(F.getCurrentUser().premiumType??0)>1},handleProtoChange(e,t){if(e==null||typeof e=="string"||!_s||!Os||!er||!xl)return;if((t?.premium_type??F?.getCurrentUser()?.premiumType??0)!==2){if(e.appearance??=er.create(),_s.settings.appearance?.theme!=null){let r=er.create({theme:_s.settings.appearance.theme});e.appearance.theme=r.theme}if(_s.settings.appearance?.clientThemeSettings?.backgroundGradientPresetId?.value!=null){let r=xl.create({backgroundGradientPresetId:{value:_s.settings.appearance.clientThemeSettings.backgroundGradientPresetId.value}});e.appearance.clientThemeSettings??=r,e.appearance.clientThemeSettings.backgroundGradientPresetId=r.backgroundGradientPresetId}}},handleGradientThemeSelect(e,t,o){if((F?.getCurrentUser()?.premiumType??0)===2||e==null)return o();if(!Os||!er||!xl||!JS)return;let i=Os.getCurrentValue().appearance,s=i!=null?er.fromBinary(er.toBinary(i),JS.BINARY_READ_OPTIONS):er.create();s.theme=t;let l=xl.create({backgroundGradientPresetId:{value:e}});s.clientThemeSettings??=l,s.clientThemeSettings.backgroundGradientPresetId=l.backgroundGradientPresetId;let c=Os.ProtoClass.create();c.appearance=s,B.dispatch({type:"USER_SETTINGS_PROTO_UPDATE",local:!0,partial:!0,settings:{type:1,proto:c}})},trimContent(e){let t=e[0];typeof t=="string"&&(e[0]=t.trimStart()),e[0]===""&&e.shift();let o=e.length-1,r=e[o];typeof r=="string"&&(e[o]=r.trimEnd()),e[o]===""&&e.pop()},clearEmptyArrayItems(e){return e.filter(t=>t!=null)},ensureChildrenIsArray(e){Array.isArray(e.props.children)||(e.props.children=[e.props.children])},patchFakeNitroEmojisOrRemoveStickersLinks(e,t){if((e.length>1||typeof e[0]?.type=="string")&&!Ze.store.transformCompoundSentence)return e;let o=e.length,r=c=>{if(Ze.store.transformEmojis){let u=c.props.href.match(wd);if(u){let p=null;try{p=new URL(c.props.href)}catch{}let m=Ro.getCustomEmojiById(u[1])?.name??p?.searchParams.get("name")??"FakeNitroEmoji";return _e.defaultRules.customEmoji.react({jumboable:!t&&e.length===1&&typeof e[0].type!="string",animated:u[2]==="gif",emojiId:u[1],name:m,fake:!0},void 0,{key:String(o++)})}}if(Ze.store.transformStickers){if(Md.test(c.props.href))return null;let u=c.props.href.match(wl);if(u&&$r.getStickerById(u[1]))return null}return c},i=c=>c?.props?.trusted!=null?r(c):c?.props?.children!=null?Array.isArray(c.props.children)?(c.props.children=l(c.props.children),c.props.children.length===0?null:c):(c.props.children=s(c.props.children),c):c,s=c=>{let u=i(c);if(u?.type==="ul"||u?.type==="ol"){if(this.ensureChildrenIsArray(u),u.props.children.length===0)return null;let p=!1;for(let[m,h]of u.props.children.entries()){if(h==null){delete u.props.children[m];continue}this.ensureChildrenIsArray(h),h.props.children.length>0?p=!0:delete u.props.children[m]}if(!p)return null;u.props.children=this.clearEmptyArrayItems(u.props.children)}return u},l=c=>{for(let[u,p]of c.entries())c[u]=s(p);return c=this.clearEmptyArrayItems(c),this.trimContent(c),c};try{return l(Tr.cloneDeep(e))}catch(c){return new ie("FakeNitro").error(c),e}},patchFakeNitroStickers(e,t){let o=[],r=t.content.split(/\s/);Ze.store.transformCompoundSentence?o.push(...r):r.length===1&&o.push(r[0]),o.push(...t.attachments.filter(i=>i.content_type==="image/gif").map(i=>i.url));for(let i of o){if(!Ze.store.transformCompoundSentence&&!i.startsWith("http"))continue;let s=i.match(Md);if(s){let c=null;try{c=new URL(i)}catch{}let u=$r.getStickerById(s[1])?.name??c?.searchParams.get("name")??"FakeNitroSticker";e.push({format_type:1,id:s[1],name:u,fake:!0});continue}let l=i.match(wl);if(l){if(!$r.getStickerById(l[1]))continue;let c=$r.getStickerById(l[1])?.name??"FakeNitroSticker";e.push({format_type:2,id:l[1],name:c,fake:!0})}}return e},shouldIgnoreEmbed(e,t){let o=t.content.split(/\s/);if(o.length>1&&!Ze.store.transformCompoundSentence)return!1;switch(e.type){case"image":{if(!Ze.store.transformCompoundSentence&&!o.includes(e.url)&&!o.includes(e.image?.proxyURL))return!1;if(Ze.store.transformEmojis&&wd.test(e.url))return!0;if(Ze.store.transformStickers){if(Md.test(e.url))return!0;let r=e.url.match(wl);if(r&&$r.getStickerById(r[1]))return!0}break}}return!1},filterAttachments(e){return e.filter(t=>{if(t.content_type!=="image/gif")return!0;let o=t.url.match(wl);return!(o&&$r.getStickerById(o[1]))})},shouldKeepEmojiLink(e){return e.target&&wd.test(e.target)},addFakeNotice(e,t,o){if(!o)return t;switch(t=Array.isArray(t)?t:[t],e){case 0:return t.push(" This is a FakeNitro sticker and renders like a real sticker only for you. Appears as a link to non-plugin users."),t;case 1:return t.push(" This is a FakeNitro emoji and renders like a real emoji only for you. Appears as a link to non-plugin users."),t}},hasPermissionToUseExternalEmojis(e){let t=J.getChannel(e);return!t||t.isDM()||t.isGroupDM()||t.isMultiUserDM()?!0:Le.can(GA,t)},hasPermissionToUseExternalStickers(e){let t=J.getChannel(e);return!t||t.isDM()||t.isGroupDM()||t.isMultiUserDM()?!0:Le.can(HA,t)},getStickerLink(e){return`https://media.discordapp.net/stickers/${e}.png?size=${E.plugins.FakeNitro.stickerSize}`},async sendAnimatedSticker(e,t,o){let{parseURL:r}=_S(),{frames:i,width:s,height:l}=await r(e),c=(0,Ti.GIFEncoder)(),u=E.plugins.FakeNitro.stickerSize,p=document.createElement("canvas");p.width=u,p.height=u;let m=p.getContext("2d",{willReadFrequently:!0}),h=u/Math.max(s,l);m.scale(h,h);let v;for(let N of i){let{left:b,top:P,width:k,height:M,img:O,delay:H,blendOp:Z,disposeOp:K}=N;v=m.getImageData(b,P,k,M),Z===0&&m.clearRect(b,P,k,M),m.drawImage(O,b,P,k,M);let{data:q}=m.getImageData(0,0,u,u),D=(0,Ti.quantize)(q,256),V=(0,Ti.applyPalette)(q,D);c.writeFrame(V,u,u,{transparent:!0,palette:D,delay:H}),K===1?m.clearRect(b,P,k,M):K===2&&m.putImageData(v,b,P)}c.finish();let T=new File([c.bytesView()],`${t}.gif`,{type:"image/gif"});Ji.promptToUpload([T],J.getChannel(o),$A)},start(){let e=Ze.store;if(!e.enableEmojiBypass&&!e.enableStickerBypass)return;function t(o,r){return!o[r]||/\s/.test(o[r])?"":" "}this.preSend=Kt((o,r,i)=>{let{guildId:s}=this;e:{if(!e.enableStickerBypass)break e;let l=$r.getStickerById(i.stickers?.[0]);if(!l||"pack_id"in l)break e;let c=this.canUseStickers&&this.hasPermissionToUseExternalStickers(o);if(l.available!==!1&&(c||l.guild_id===s))break e;let u=this.getStickerLink(l.id);if(l.format_type===2)return this.sendAnimatedSticker(u,l.id,o),{cancel:!0};i.stickers.length=0,r.content+=` ${u}&name=${encodeURIComponent(l.name)}`}if(e.enableEmojiBypass){let l=this.canUseEmotes&&this.hasPermissionToUseExternalEmojis(o);for(let c of r.validNonShortcutEmojis){if(!c.require_colons||c.available!==!1&&l||c.guildId===s&&!c.animated)continue;let u=`<${c.animated?"a":""}:${c.originalName||c.name}:${c.id}>`,p=c.url.replace(/\?size=\d+/,"?"+new URLSearchParams({size:E.plugins.FakeNitro.emojiSize,name:encodeURIComponent(c.name)}));r.content=r.content.replace(u,(m,h,v)=>`${t(v,h-1)}${p}${t(v,h+m.length)}`)}}return{cancel:!1}}),this.preEdit=Lr((o,r,i)=>{if(!e.enableEmojiBypass)return;let s=this.canUseEmotes&&this.hasPermissionToUseExternalEmojis(o),{guildId:l}=this;i.content=i.content.replace(/(?<!\\)<a?:(?:\w+):(\d+)>/ig,(c,u,p,m)=>{let h=Ro.getCustomEmojiById(u);if(h==null||!h.require_colons||h.available!==!1&&s||h.guildId===l&&!h.animated)return c;let v=h.url.replace(/\?size=\d+/,"?"+new URLSearchParams({size:E.plugins.FakeNitro.emojiSize,name:encodeURIComponent(h.name)}));return`${t(m,p-1)}${v}${t(m,p+c.length)}`})})},stop(){Yt(this.preSend),Er(this.preEdit)}})});function e0(...e){let t={};function o(i){for(let s=e.length-1;s>=0;s--)if(i in e[s])return e[s];return t}let r={ownKeys(){return e.reduce((i,s)=>(i.push(...Reflect.ownKeys(s)),i),Reflect.ownKeys(t))}};for(let i of["defineProperty","deleteProperty","get","getOwnPropertyDescriptor","has","set"])r[i]=function(s,...l){return Reflect[i](o(l[0]),...l)};return new Proxy(t,r)}var t0,o0=g(()=>{"use strict";a();t0=e0;typeof module<"u"&&(module.exports=e0)});function zA(e,t){let o=`[#${e.toString(16).padStart(6,"0")},#${t.toString(16).padStart(6,"0")}]`,r="",i=Array.from(o).map(s=>s.codePointAt(0)).filter(s=>s>=32&&s<=127).map(s=>String.fromCodePoint(s+917504)).join("");return(r||"")+" "+i}function jA(e){if(e==null)return null;let t=e.match(/\u{e005b}\u{e0023}([\u{e0061}-\u{e0066}\u{e0041}-\u{e0046}\u{e0030}-\u{e0039}]+?)\u{e002c}\u{e0023}([\u{e0061}-\u{e0066}\u{e0041}-\u{e0046}\u{e0030}-\u{e0039}]+?)\u{e005d}/u);if(t!=null){let o=[...t[0]].map(i=>String.fromCodePoint(i.codePointAt(0)-917504)).join("");return o.substring(1,o.length-1).split(",").map(i=>parseInt(i.replace("#","0x"),16))}else return null}var n0,Id,r0=g(()=>{"use strict";a();$();le();I();it();Pe();w();x();o0();n0=L({nitroFirst:{description:"Default color source if both are present",type:4,options:[{label:"Nitro colors",value:!0,default:!0},{label:"Fake colors",value:!1}]}}),Id=y({name:"FakeProfileThemes",description:"Allows profile theming by hiding the colors in your bio thanks to invisible 3y3 encoding",authors:[d.Alyxia,d.Remty],patches:[{find:"UserProfileStore",replacement:{match:/(?<=getUserProfile\(\i\){return )(\i\[\i\])/,replace:"$self.colorDecodeHook($1)"}},{find:".USER_SETTINGS_PROFILE_THEME_ACCENT",replacement:{match:/RESET_PROFILE_THEME}\)(?<=color:(\i),.{0,500}?color:(\i),.{0,500}?)/,replace:"$&,$self.addCopy3y3Button({primary:$1,accent:$2})"}}],settingsAboutComponent:()=>n(S.FormSection,null,n(S.FormTitle,{tag:"h3"},"Usage"),n(S.FormText,null,"After enabling this plugin, you will see custom colors in the profiles of other people using compatible plugins. ",n("br",null),"To set your own colors:",n("ul",null,n("li",null,"\u2022 go to your profile settings"),n("li",null,"\u2022 choose your own colors in the Nitro preview"),n("li",null,'\u2022 click the "Copy 3y3" button'),n("li",null,"\u2022 paste the invisible text anywhere in your bio")),n("br",null),n("b",null,"Please note:")," if you are using a theme which hides nitro ads, you should disable it temporarily to set colors.")),settings:n0,colorDecodeHook(e){if(e){if(n0.store.nitroFirst&&e.themeColors)return e;let t=jA(e.bio);if(t)return t0(e,{premiumType:2,themeColors:t})}return e},addCopy3y3Button:U.wrap(function({primary:e,accent:t}){return n(C,{onClick:()=>{let o=zA(e,t);vo(o)},color:C.Colors.PRIMARY,size:C.Sizes.XLARGE,className:z.left16},"Copy 3y3")},{noop:!0})})});var Ad,i0=g(()=>{"use strict";a();I();w();x();Ad=y({name:"FavoriteEmojiFirst",authors:[d.Aria,d.Ven],description:"Puts your favorite emoji first in the emoji autocomplete.",patches:[{find:"renderResults({results:",replacement:[{match:/let \i=.{1,100}renderResults\({results:(\i)\.query\.results,/,replace:"$self.sortEmojis($1);$&"}]},{find:"MAX_AUTOCOMPLETE_RESULTS+",replacement:[{match:/,maxCount:(\i)(.{1,500}\i)=(\i)\.slice\(0,(\i-\i\.length)\)/,replace:",maxCount:Infinity$2=($3.sliceTo = $4, $3)"}]}],sortEmojis({query:e}){if(e?.type!=="EMOJIS_AND_STICKERS"||e.typeInfo?.sentinel!==":"||!e.results?.emojis?.length)return;let t=Ro.getDisambiguatedEmojiContext();e.results.emojis=e.results.emojis.sort((o,r)=>{let i=t.isFavoriteEmojiWithoutFetchingLatest(o),s=t.isFavoriteEmojiWithoutFetchingLatest(r);return i&&!s?-1:!i&&s?1:0}).slice(0,e.results.emojis.sliceTo??10)}})});function qA({instance:e,SearchBarComponent:t}){let[o,r]=X(""),i=to(null),s=Pa(l=>{r(l);let{props:c}=e;if(l===""){c.favorites=c.favCopy,e.forceUpdate();return}i.current?.containerRef?.current.closest("#gif-picker-tab-panel")?.querySelector('[class|="content"]')?.firstElementChild?.scrollTo(0,0);let u=c.favCopy.map(p=>({score:KA(l.toLowerCase(),a0(p.url??p.src).replace(/(%20|[_-])/g," ").toLowerCase()),gif:p})).filter(p=>p.score!=null);u.sort((p,m)=>m.score-p.score),c.favorites=u.map(p=>p.gif),e.forceUpdate()},[e.state]);return ue(()=>()=>{e.dead=!0},[]),n(t,{ref:i,autoFocus:!0,className:WA.searchBar,size:t.Sizes.MEDIUM,onChange:s,onClear:()=>{r(""),e.props.favCopy!=null&&(e.props.favorites=e.props.favCopy,e.forceUpdate())},query:o,placeholder:"Search Favorite Gifs"})}function a0(e){let t=new URL(e);switch(s0.store.searchOption){case"url":return t.href;case"path":return t.host==="media.discordapp.net"||t.host==="tenor.com"?t.pathname.split("/").at(-1)??t.pathname:t.pathname;case"hostandpath":return t.host==="media.discordapp.net"||t.host==="tenor.com"?`${t.host} ${t.pathname.split("/").at(-1)??t.pathname}`:`${t.host} ${t.pathname}`;default:return""}}function KA(e,t){let o=0,r=0;for(let i=0;i<t.length;i++)if(t[i]===e[o]?(r++,o++):r--,o===e.length)return r;return null}var WA,s0,Nd,l0=g(()=>{"use strict";a();$();le();I();w();W();x();WA=A("searchBar","searchBarFullRow"),s0=L({searchOption:{type:4,description:"The part of the url you want to search",options:[{label:"Entire Url",value:"url"},{label:"Path Only (/somegif.gif)",value:"path"},{label:"Host & Path (tenor.com somgif.gif)",value:"hostandpath",default:!0}]}}),Nd=y({name:"FavoriteGifSearch",authors:[d.Aria],description:"Adds a search bar to favorite gifs.",patches:[{find:"renderHeaderContent()",replacement:[{match:/(renderHeaderContent\(\).{1,150}FAVORITES:return)(.{1,150});(case.{1,200}default:return\(0,\i\.jsx\)\((?<searchComp>\i\..{1,10}),)/,replace:"$1 this.state.resultType === 'Favorites' ? $self.renderSearchBar(this, $<searchComp>) : $2;$3"},{match:/(,suggestions:\i,favorites:)(\i),/,replace:"$1$self.getFav($2),favCopy:$2,"}]}],settings:s0,getTargetString:a0,instance:null,renderSearchBar(e,t){return this.instance=e,n(U,{noop:!0},n(qA,{instance:e,SearchBarComponent:t}))},getFav(e){if(!this.instance||this.instance.dead)return e;let{favorites:t}=this.instance.props;return t!=null&&t?.length!==e.length?t:e}})});var Cd,c0=g(()=>{"use strict";a();I();w();Cd=y({name:"FixImagesQuality",description:"Fixes the quality of images in the chat being horrible.",authors:[d.Nuckyz],patches:[{find:"handleImageLoad=",replacement:[{match:/(?<=getSrc\(\i\){.+?return )\i\.SUPPORTS_WEBP.+?:(?=\i&&\(\i="png"\))/,replace:""}]}]})});var kd,u0=g(()=>{"use strict";a();$();fi();I();w();kd=y({name:"FixSpotifyEmbeds",description:"Fixes spotify embeds being incredibly loud by letting you customise the volume",authors:[d.Ven],settings:L({volume:{type:5,description:"The volume % to set for spotify embeds. Anything above 10% is veeeery loud",markers:go(0,100,10),stickToMarkers:!1,default:10}})})});var Rd,p0=g(()=>{"use strict";a();I();w();x();Rd=y({name:"ForceOwnerCrown",description:"Force the owner crown next to usernames even if the server is large.",authors:[d.D3SOX,d.Nickyux],patches:[{find:"AVATAR_DECORATION_PADDING:",replacement:{match:/,isOwner:(\i),/,replace:",_isOwner:$1=$self.isGuildOwner(e),"}}],isGuildOwner(e){if(!e?.user?.id||e.channel?.type===3)return e.isOwner;let t=e.guildId??e.channel?.guild_id,o=e.user.id;return pe.getGuild(t)?.ownerId===o}})});var Ml,YA,Dd,d0=g(()=>{"use strict";a();so();I();w();W();x();Ml=A("createFriendInvite"),{uuid4:YA}=A("uuid4"),Dd=y({name:"FriendInvites",description:"Create and manage friend invite links via slash commands (/create friend invite, /view friend invites, /revoke friend invites).",authors:[d.afn,d.Dziurwa],dependencies:["CommandsAPI"],commands:[{name:"create friend invite",description:"Generates a friend invite link.",inputType:3,options:[{name:"Uses",description:"How many uses?",choices:[{label:"1",name:"1",value:"1"},{label:"5",name:"5",value:"5"}],required:!1,type:4}],execute:async(e,t)=>{let o=ct(e,"Uses",5);if(o===1&&!F.getCurrentUser().phone)return me(t.channel.id,{content:"You need to have a phone number connected to your account to create a friend invite with 1 use!"});let r;if(o===1){let i=YA(),{body:{invite_suggestions:s}}=await At.post({url:"/friend-finder/find-friends",body:{modified_contacts:{[i]:[1,"",""]},phone_contact_methods_count:1}});r=await Ml.createFriendInvite({code:s[0][3],recipient_phone_number_or_email:i,contact_visibility:1,filter_visibilities:[],filtered_invite_suggestions_index:1})}else r=await Ml.createFriendInvite();me(t.channel.id,{content:`
  57. discord.gg/${r.code} \xB7
  58. Expires: <t:${new Date(r.expires_at).getTime()/1e3}:R> \xB7
  59. Max uses: \`${r.max_uses}\`
  60. `.trim().replace(/\s+/g," ")})}},{name:"view friend invites",description:"View a list of all generated friend invites.",inputType:3,execute:async(e,t)=>{let r=(await Ml.getAllFriendInvites()).map(i=>`
  61. _discord.gg/${i.code}_ \xB7
  62. Expires: <t:${new Date(i.expires_at).getTime()/1e3}:R> \xB7
  63. Times used: \`${i.uses}/${i.max_uses}\`
  64. `.trim().replace(/\s+/g," "));me(t.channel.id,{content:r.join(`
  65. `)||"You have no active friend invites!"})}},{name:"revoke friend invites",description:"Revokes all generated friend invites.",inputType:3,execute:async(e,t)=>{await Ml.revokeFriendInvites(),me(t.channel.id,{content:"All friend invites have been revoked."})}}]})});var Ld,m0=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/gameActivityToggle/style.css",{name:"src/plugins/gameActivityToggle/style.css",source:`[class*="withTagAsButton"] {
  66. min-width: 88px !important;
  67. }
  68. `,classNames:{},dom:null});Ld="src/plugins/gameActivityToggle/style.css"});function XA(e){return function(){return n("svg",{width:"20",height:"20",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",mask:"url(#gameActivityMask)",d:"M3.06 20.4q-1.53 0-2.37-1.065T.06 16.74l1.26-9q.27-1.8 1.605-2.97T6.06 3.6h11.88q1.8 0 3.135 1.17t1.605 2.97l1.26 9q.21 1.53-.63 2.595T20.94 20.4q-.63 0-1.17-.225T18.78 19.5l-2.7-2.7H7.92l-2.7 2.7q-.45.45-.99.675t-1.17.225Zm14.94-7.2q.51 0 .855-.345T19.2 12q0-.51-.345-.855T18 10.8q-.51 0-.855.345T16.8 12q0 .51.345 .855T18 13.2Zm-2.4-3.6q.51 0 .855-.345T16.8 8.4q0-.51-.345-.855T15.6 7.2q-.51 0-.855.345T14.4 8.4q0 .51.345 .855T15.6 9.6ZM6.9 13.2h1.8v-2.1h2.1v-1.8h-2.1v-2.1h-1.8v2.1h-2.1v1.8h2.1v2.1Z"}),!e&&n(f,null,n("mask",{id:"gameActivityMask"},n("rect",{fill:"white",x:"0",y:"0",width:"24",height:"24"}),n("path",{fill:"black",d:"M23.27 4.54 19.46.73 .73 19.46 4.54 23.27 23.27 4.54Z"})),n("path",{fill:"var(--status-danger)",d:"M23 2.27 21.73 1 1 21.73 2.27 23 23 2.27Z"})))}}function JA(){let e=Vr.ShowCurrentGame.useSetting();return n(ZA,{tooltipText:e?"Disable Game Activity":"Enable Game Activity",icon:XA(e),role:"switch","aria-checked":!e,onClick:()=>Vr.ShowCurrentGame.updateSetting(t=>!t)})}var ZA,Ed,f0=g(()=>{"use strict";a();ot();le();I();w();W();x();m0();ZA=je("Button.Sizes.NONE,disabled:");Ed=y({name:"GameActivityToggle",description:"Adds a button next to the mic and deafen button to toggle game activity.",authors:[d.Nuckyz,d.RuukuLada],patches:[{find:".Messages.ACCOUNT_SPEAKING_WHILE_MUTED",replacement:{match:/this\.renderNameZone\(\).+?children:\[/,replace:"$&$self.GameActivityToggleButton(),"}}],GameActivityToggleButton:U.wrap(JA,{noop:!0}),start(){Tt(Ld)},stop(){jt(Ld)}})});var QA,_d,g0=g(()=>{"use strict";a();I();nt();w();W();({closeExpressionPicker:QA}=A("closeExpressionPicker")),_d=y({name:"GifPaste",description:"Makes picking a gif in the gif picker insert a link into the chatbox instead of instantly sending it",authors:[d.Ven],patches:[{find:".handleSelectGIF=",replacement:{match:/\.handleSelectGIF=(\i)=>\{/,replace:".handleSelectGIF=$1=>{if (!this.props.className) return $self.handleSelect($1);"}}],handleSelect(e){e&&(vn(e.url+" "),QA())}})});function y0(e,t,o){let r=fo.getSendMessageOptionsForReply({channel:e,message:t,shouldMention:!0,showMentionToggle:!0});if(Pl.store.greetMode==="Message"||o.length>1){r.stickerIds=o;let i={content:"",tts:!1,invalidEmojis:[],validNonShortcutEmojis:[]};fo._sendMessage(e.id,i,r)}else fo.sendGreetMessage(e.id,o[0],r)}function VA({channel:e,message:t}){let o=Pl.use(["greetMode","multiGreetChoices"]),{greetMode:r,multiGreetChoices:i=[]}=o;return n(G.Menu,{navId:"greet-sticker-picker",onClose:()=>B.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Greet Sticker Picker"},n(G.MenuGroup,{label:"Greet Mode"},Object.values(v0).map(s=>n(G.MenuRadioItem,{key:s,group:"greet-mode",id:"greet-mode-"+s,label:s,checked:s===r,action:()=>o.greetMode=s}))),n(G.MenuSeparator,null),n(G.MenuGroup,{label:"Greet Stickers"},h0.map(s=>n(G.MenuItem,{key:s.id,id:"greet-"+s.id,label:s.description.split(" ")[0],action:()=>y0(e,t,[s.id])}))),Pl.store.unholyMultiGreetEnabled?n(f,null,n(G.MenuSeparator,null),n(G.MenuItem,{label:"Unholy Multi-Greet",id:"unholy-multi-greet"},h0.map(s=>{let l=i.some(c=>c===s.id);return n(G.MenuCheckboxItem,{key:s.id,id:"multi-greet-"+s.id,label:s.description.split(" ")[0],checked:l,disabled:!l&&i.length>=3,action:()=>{o.multiGreetChoices=l?i.filter(c=>c!==s.id):[...i,s.id]}})}),n(G.MenuSeparator,null),n(G.MenuItem,{id:"multi-greet-submit",label:"Send Greets",action:()=>y0(e,t,i),disabled:i.length===0}))):null)}var v0,Pl,h0,Od,S0=g(()=>{"use strict";a();$();I();nt();w();W();x();v0=(o=>(o.Greet="Greet",o.NormalMessage="Message",o))(v0||{}),Pl=L({greetMode:{type:4,options:[{label:"Greet (you can only greet 3 times)",value:"Greet",default:!0},{label:"Normal Message (you can greet spam)",value:"Message"}],description:"Choose the greet mode"}}).withPrivateSettings(),{WELCOME_STICKERS:h0}=A("WELCOME_STICKERS");Od=y({name:"GreetStickerPicker",description:"Allows you to use any greet sticker instead of only the random one by right-clicking the 'Wave to say hi!' button",authors:[d.Ven],settings:Pl,patches:[{find:"Messages.WELCOME_CTA_LABEL",replacement:{match:/innerClassName:\i\.welcomeCTAButton,(?<={channel:\i,message:\i}=(\i).{0,400}?)/,replace:"$&onContextMenu:(vcEvent)=>$self.pickSticker(vcEvent, $1),"}}],pickSticker(e,t){t.message.deleted||Ut.openContextMenu(e,()=>n(VA,{...t}))}})});var Bd={};ze(Bd,{_buildPopoverElements:()=>tN,addButton:()=>$o,buttons:()=>Il,removeButton:()=>Go});function $o(e,t){Il.set(e,t)}function Go(e){Il.delete(e)}function tN(e,t){let o=[];for(let[r,i]of Il.entries())try{let s=i(e);s&&(s.key??=r,o.push(t(s)))}catch(s){eN.error(`[${r}]`,s)}return o}var eN,Il,Gr=g(()=>{"use strict";a();Je();eN=new ie("MessagePopover"),Il=new Map});var Bs,T0,Fs,b0,oN,Fd,x0=g(()=>{"use strict";a();Jo();Gr();Dt();I();w();x();T0="HideAttachments_HiddenIds",Fs=new Set,b0=()=>Rt(T0).then(e=>(Fs=e??new Set,Fs)),oN=e=>ro(T0,e),Fd=y({name:"HideAttachments",description:"Hide attachments and Embeds for individual messages via hover button",authors:[d.Ven],dependencies:["MessagePopoverAPI"],async start(){Bs=document.createElement("style"),Bs.id="VencordHideAttachments",document.head.appendChild(Bs),await b0(),await this.buildCss(),$o("HideAttachments",e=>{if(!e.attachments.length&&!e.embeds.length&&!e.stickerItems.length)return null;let t=Fs.has(e.id);return{label:t?"Show Attachments":"Hide Attachments",icon:t?Za:Xa,message:e,channel:J.getChannel(e.channel_id),onClick:()=>this.toggleHide(e.id)}})},stop(){Bs.remove(),Fs.clear(),Go("HideAttachments")},async buildCss(){let e=[...Fs].map(t=>`#message-accessories-${t}`).join(",");Bs.textContent=`
  69. :is(${e}) :is([class*="embedWrapper"], [class*="clickableSticker"]) {
  70. /* important is not necessary, but add it to make sure bad themes won't break it */
  71. display: none !important;
  72. }
  73. :is(${e})::after {
  74. content: "Attachments hidden";
  75. color: var(--text-muted);
  76. font-size: 80%;
  77. }
  78. `},async toggleHide(e){let t=await b0();t.delete(e)||t.add(e),await oN(t),await this.buildCss()}})});var Ud,w0=g(()=>{"use strict";a();I();w();Ud=y({name:"iLoveSpam",description:"Do not hide messages from 'likely spammers'",authors:[d.botato,d.Nyako],patches:[{find:"hasFlag:{writable",replacement:{match:/if\((\i)<=(?:1<<30|1073741824)\)return/,replace:"if($1===(1<<20))return false;$&"}}]})});function I0(e,t,o,r){return n(ee,{text:t},i=>n("button",{...i,onClick:s=>iN(s,e),style:{all:"unset",cursor:"pointer",display:"flex",justifyContent:"center",alignItems:"center"}},n("svg",{width:"24",height:"24",viewBox:"0 -960 960 960"},n("path",{fill:r,d:o}))))}function P0(e,t=!1){let o=xi.use(["ignoredActivities"]),{ignoredActivities:r=[]}=o;return r.some(i=>i.id===e.id)?rN(e,"var(--status-danger)"):nN(e,t?"var(--green-300)":"var(--primary-400)")}function iN(e,t){e.stopPropagation();let o=tr().findIndex(r=>r.id===t.id);o===-1?xi.store.ignoredActivities=tr().concat(t):xi.store.ignoredActivities=tr().filter((r,i)=>i!==o),Vr.ShowCurrentGame.updateSetting(r=>r)}function tr(){return xi.store.ignoredActivities??=[]}var M0,nN,rN,xi,$d,A0=g(()=>{"use strict";a();Jo();$();le();I();w();W();x();M0=we("RunningGameStore");nN=(e,t)=>I0(e,"Disable Activity","M480-320q75 0 127.5-52.5T660-500q0-75-52.5-127.5T480-680q-75 0-127.5 52.5T300-500q0 75 52.5 127.5T480-320Zm0-72q-45 0-76.5-31.5T372-500q0-45 31.5-76.5T480-608q45 0 76.5 31.5T588-500q0 45-31.5 76.5T480-392Zm0 192q-146 0-266-81.5T40-500q54-137 174-218.5T480-800q146 0 266 81.5T920-500q-54 137-174 218.5T480-200Zm0-300Zm0 220q113 0 207.5-59.5T832-500q-50-101-144.5-160.5T480-720q-113 0-207.5 59.5T128-500q50 101 144.5 160.5T480-280Z",t),rN=(e,t)=>I0(e,"Enable Activity","m644-428-58-58q9-47-27-88t-93-32l-58-58q17-8 34.5-12t37.5-4q75 0 127.5 52.5T660-500q0 20-4 37.5T644-428Zm128 126-58-56q38-29 67.5-63.5T832-500q-50-101-143.5-160.5T480-720q-29 0-57 4t-55 12l-62-62q41-17 84-25.5t90-8.5q151 0 269 83.5T920-500q-23 59-60.5 109.5T772-302Zm20 246L624-222q-35 11-70.5 16.5T480-200q-151 0-269-83.5T40-500q21-53 53-98.5t73-81.5L56-792l56-56 736 736-56 56ZM222-624q-29 26-53 57t-41 67q50 101 143.5 160.5T480-280q20 0 39-2.5t39-5.5l-36-38q-11 3-21 4.5t-21 1.5q-75 0-127.5-52.5T300-500q0-11 1.5-21t4.5-21l-84-82Zm319 93Zm-151 75Z",t);xi=L({}).withPrivateSettings();$d=y({name:"IgnoreActivities",authors:[d.Nuckyz],description:"Ignore activities from showing up on your status ONLY. You can configure which ones are ignored from the Registered Games and Activities tabs.",settings:xi,patches:[{find:'.displayName="LocalActivityStore"',replacement:[{match:/HANG_STATUS.+?(?=!\i\(\i,\i\)&&)(?<=(\i)\.push.+?)/,replace:(e,t)=>`${e}${t}=${t}.filter($self.isActivityNotIgnored);`}]},{find:".Messages.SETTINGS_GAMES_TOGGLE_OVERLAY",replacement:{match:/\.Messages\.SETTINGS_GAMES_TOGGLE_OVERLAY.+?}\(\),(?<={overlay:\i,.+?=(\i),.+?)(?=!(\i))/,replace:(e,t,o)=>`${e}$self.renderToggleGameActivityButton(${t},${o}),`}},{find:".activityTitleText,variant",replacement:{match:/(?<=\i\.activityTitleText.+?children:(\i)\.name.*?}\),)/,replace:(e,t)=>`$self.renderToggleActivityButton(${t}),`}},{find:".activityCardDetails,children",replacement:{match:/(?<=\i\.activityCardDetails.+?children:(\i\.application)\.name.*?}\),)/,replace:(e,t)=>`$self.renderToggleActivityButton(${t}),`}}],async start(){let e=await Rt("IgnoreActivities_ignoredActivities");if(e!=null&&(xi.store.ignoredActivities=Array.from(e.values()).map(t=>({...t,name:"Unknown Name"})),mu("IgnoreActivities_ignoredActivities")),tr().length!==0){let t=M0.getGamesSeen();for(let[o,r]of tr().entries())r.type===0&&(t.some(i=>i.id===r.id||i.exePath===r.id)||tr().splice(o,1))}},isActivityNotIgnored(e){if(e.type===0||e.type===3){if(e.application_id!=null)return!tr().some(t=>t.id===e.application_id);{let t=M0.getRunningGames().find(o=>o.name===e.name)?.exePath;if(t)return!tr().some(o=>o.id===t)}}return!0},renderToggleGameActivityButton(e,t){return n(U,{noop:!0},n("div",{style:{marginLeft:12,zIndex:0}},P0({id:e.id??e.exePath,name:e.name,type:0},t)))},renderToggleActivityButton(e){return n(U,{noop:!0},P0({id:e.id,name:e.name,type:1}))}})});var Us,Gd=g(()=>{"use strict";a();Us="vc-imgzoom-magnify-modal"});function Hd(e,t){e()?t():requestAnimationFrame(()=>Hd(e,t))}var N0=g(()=>{"use strict";a()});var sN,zd,C0=g(()=>{"use strict";a();ot();x();Gd();jd();N0();sN=Be("vc-imgzoom-"),zd=({instance:e,size:t,zoom:o})=>{let[r,i]=X(!1),[s,l]=X({x:0,y:0}),[c,u]=X({x:0,y:0}),[p,m]=X(0),h=to(!1),v=to(o),T=to(t),N=to(null),b=to(null),P=to(null),k=to(null);if(_.useLayoutEffect(()=>{let O=re=>{re.key==="Shift"&&(h.current=!0)},H=re=>{re.key==="Shift"&&(h.current=!1)},Z=()=>{b.current.currentTime=P.current.currentTime},K=re=>{if(e.state.mouseOver&&e.state.mouseDown){let xe=T.current/2,ae={x:re.pageX,y:re.pageY},Re=-((ae.x-N.current.getBoundingClientRect().left)*v.current-xe),he=-((ae.y-N.current.getBoundingClientRect().top)*v.current-xe);l({x:re.x-xe,y:re.y-xe}),u({x:Re,y:he}),m(1)}else m(0)},q=re=>{e.state.mouseOver&&re.button===0&&(v.current=He.store.zoom,T.current=He.store.size,document.getElementById("image-context")&&B.dispatch({type:"CONTEXT_MENU_CLOSE"}),K(re),m(1))},D=()=>{m(0),He.store.saveZoomValues&&(He.store.zoom=v.current,He.store.size=T.current)},V=async re=>{if(e.state.mouseOver&&e.state.mouseDown&&!h.current){let xe=v.current+re.deltaY/100*(He.store.invertScroll?-1:1)*He.store.zoomSpeed;v.current=xe<=1?1:xe,K(re)}if(e.state.mouseOver&&e.state.mouseDown&&h.current){let xe=T.current+re.deltaY*(He.store.invertScroll?-1:1)*He.store.zoomSpeed;T.current=xe<=50?50:xe,K(re)}};return Hd(()=>e.state.readyState==="READY",()=>{let re=document.getElementById(Us);N.current=re,re.firstElementChild.setAttribute("draggable","false"),e.props.animated&&(P.current=re.querySelector("video"),P.current.addEventListener("timeupdate",Z)),i(!0)}),document.addEventListener("keydown",O),document.addEventListener("keyup",H),document.addEventListener("mousemove",K),document.addEventListener("mousedown",q),document.addEventListener("mouseup",D),document.addEventListener("wheel",V),()=>{document.removeEventListener("keydown",O),document.removeEventListener("keyup",H),document.removeEventListener("mousemove",K),document.removeEventListener("mousedown",q),document.removeEventListener("mouseup",D),document.removeEventListener("wheel",V),He.store.saveZoomValues&&(He.store.zoom=v.current,He.store.size=T.current)}},[]),!r)return null;let M=N.current.getBoundingClientRect();return n("div",{className:sN("lens",{"nearest-neighbor":He.store.nearestNeighbour,square:He.store.square}),style:{opacity:p,width:T.current+"px",height:T.current+"px",transform:`translate(${s.x}px, ${s.y}px)`}},e.props.animated?n("video",{ref:b,style:{position:"absolute",left:`${c.x}px`,top:`${c.y}px`},width:`${M.width*v.current}px`,height:`${M.height*v.current}px`,poster:e.props.src,src:P.current?.src??e.props.src,autoPlay:!0,loop:!0}):n("img",{ref:k,style:{position:"absolute",transform:`translate(${c.x}px, ${c.y}px)`},width:`${M.width*v.current}px`,height:`${M.height*v.current}px`,src:e.props.src,alt:""}))}});var Wd,k0=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/imageZoom/styles.css",{name:"src/plugins/imageZoom/styles.css",source:`.vc-imgzoom-lens {
  79. position: absolute;
  80. inset: 0;
  81. z-index: 9999;
  82. border: 2px solid grey;
  83. border-radius: 50%;
  84. overflow: hidden;
  85. cursor: none;
  86. box-shadow: inset 0 0 10px 2px grey;
  87. filter: drop-shadow(0 0 2px grey);
  88. pointer-events: none;
  89. }
  90. .vc-imgzoom-square {
  91. border-radius: 0;
  92. }
  93. .vc-imgzoom-nearest-neighbor>img {
  94. image-rendering: pixelated;
  95. /* https://googlechrome.github.io/samples/image-rendering-pixelated/index.html */
  96. }
  97. /* make the carousel take up less space so we can click the backdrop and exit out of it */
  98. [class*="modalCarouselWrapper_"] {
  99. top: 0 !important;
  100. }
  101. [class*="carouselModal_"] {
  102. height: 0 !important;
  103. }
  104. `,classNames:{},dom:null});Wd="src/plugins/imageZoom/styles.css"});var He,R0,qd,jd=g(()=>{"use strict";a();kt();$();ot();fi();I();Pr();w();x();C0();Gd();k0();He=L({saveZoomValues:{type:3,description:"Whether to save zoom and lens size values",default:!0},invertScroll:{type:3,description:"Invert scroll",default:!0},nearestNeighbour:{type:3,description:"Use Nearest Neighbour Interpolation when scaling images",default:!1},square:{type:3,description:"Make the lens square",default:!1},zoom:{description:"Zoom of the lens",type:5,markers:go(1,50,4),default:2,stickToMarkers:!1},size:{description:"Radius / Size of the lens",type:5,markers:go(50,1e3,50),default:100,stickToMarkers:!1},zoomSpeed:{description:"How fast the zoom / lens size changes",type:5,markers:go(.1,5,.2),default:.5,stickToMarkers:!1}}),R0=e=>()=>{e.push(n(G.MenuGroup,{id:"image-zoom"},n(G.MenuCheckboxItem,{id:"vc-square",label:"Square Lens",checked:He.store.square,action:()=>{He.store.square=!He.store.square,Ut.closeContextMenu()}}),n(G.MenuCheckboxItem,{id:"vc-nearest-neighbour",label:"Nearest Neighbour",checked:He.store.nearestNeighbour,action:()=>{He.store.nearestNeighbour=!He.store.nearestNeighbour,Ut.closeContextMenu()}}),n(G.MenuControlItem,{id:"vc-zoom",label:"Zoom",control:(t,o)=>n(G.MenuSliderControl,{ref:o,...t,minValue:1,maxValue:50,value:He.store.zoom,onChange:no(r=>He.store.zoom=r,100)})}),n(G.MenuControlItem,{id:"vc-size",label:"Lens Size",control:(t,o)=>n(G.MenuSliderControl,{ref:o,...t,minValue:50,maxValue:1e3,value:He.store.size,onChange:no(r=>He.store.size=r,100)})}),n(G.MenuControlItem,{id:"vc-zoom-speed",label:"Zoom Speed",control:(t,o)=>n(G.MenuSliderControl,{ref:o,...t,minValue:.1,maxValue:5,value:He.store.zoomSpeed,onChange:no(r=>He.store.zoomSpeed=r,100),renderValue:r=>`${r.toFixed(3)}x`})})))},qd=y({name:"ImageZoom",description:"Lets you zoom in to images and gifs. Use scroll wheel to zoom in and shift + scroll wheel to increase lens radius / size",authors:[d.Aria],tags:["ImageUtilities"],patches:[{find:"Messages.OPEN_IN_BROWSER",replacement:{match:/return.{1,200}\.wrapper.{1,200}src:\i,/g,replace:`$&id: '${Us}',`}},{find:"handleImageLoad=",replacement:[{match:/showThumbhashPlaceholder:\i,/,replace:"...$self.makeProps(this),$&"},{match:/componentDidMount\(\){/,replace:"$&$self.renderMagnifier(this);"},{match:/componentWillUnmount\(\){/,replace:"$&$self.unMountMagnifier();"}]},{find:".carouselModal",replacement:{match:/(?<=\.carouselModal.{0,100}onClick:)\i,/,replace:"()=>{},"}}],settings:He,currentMagnifierElement:null,element:null,Magnifier:zd,root:null,makeProps(e){return{onMouseOver:()=>this.onMouseOver(e),onMouseOut:()=>this.onMouseOut(e),onMouseDown:t=>this.onMouseDown(t,e),onMouseUp:()=>this.onMouseUp(e),id:e.props.id}},renderMagnifier(e){e.props.id===Us&&(this.currentMagnifierElement||(this.currentMagnifierElement=n(zd,{size:He.store.size,zoom:He.store.zoom,instance:e}),this.root=vr.createRoot(this.element),this.root.render(this.currentMagnifierElement)))},unMountMagnifier(){this.root?.unmount(),this.currentMagnifierElement=null,this.root=null},onMouseOver(e){e.setState(t=>({...t,mouseOver:!0}))},onMouseOut(e){e.setState(t=>({...t,mouseOver:!1}))},onMouseDown(e,t){e.button===0&&t.setState(o=>({...o,mouseDown:!0}))},onMouseUp(e){e.setState(t=>({...t,mouseDown:!1}))},start(){Tt(Wd),de("image-context",R0),this.element=document.createElement("div"),this.element.classList.add("MagnifierContainer"),document.body.appendChild(this.element)},stop(){jt(Wd),this.root&&this.root.unmount(),this.element?.remove(),ge("image-context",R0)}})});function aN(e){let t=e?.message?.content,[o,r]=_.useState("password");return n(Oe,{...e},n(tt,null,n(S.FormTitle,{tag:"h4"},"Decrypt Message")),n(Ye,null,n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Message with Encryption"),n(et,{defaultValue:t,disabled:!0}),n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Password"),n(et,{style:{marginBottom:"20px"},onChange:r})),n(bt,null,n(C,{color:C.Colors.GREEN,onClick:()=>{let i=Kd(t,o,!0);!i||!e?.message||(Vencord.Plugins.plugins.InvisibleChat.buildEmbed(e?.message,i),e.onClose())}},"Decrypt"),n(C,{color:C.Colors.TRANSPARENT,look:C.Looks.LINK,style:{left:15,position:"absolute"},onClick:e.onClose},"Cancel")))}function D0(e){Ne(t=>n(aN,{...t,...e}))}var L0=g(()=>{"use strict";a();st();x();Al()});function lN(e){let[t,o]=_.useState(""),[r,i]=_.useState(""),[s,l]=_.useState("password"),[c,u]=_.useState(!1),p=t&&(c||r&&r.trim().split(" ").length>1);return n(Oe,{...e},n(tt,null,n(S.FormTitle,{tag:"h4"},"Encrypt Message")),n(Ye,null,n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Secret"),n(et,{onChange:m=>{o(m)}}),n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Cover (2 or more Words!!)"),n(et,{disabled:c,onChange:m=>{i(m)}}),n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Password"),n(et,{style:{marginBottom:"20px"},defaultValue:"password",onChange:m=>{l(m)}}),n(mt,{value:c,onChange:m=>{u(m)}},"Don't use a Cover")),n(bt,null,n(C,{color:C.Colors.GREEN,disabled:!p,onClick:()=>{if(!p)return;let m=O0(t,s,c?"d d":r),h=c?m.replaceAll("d",""):m;!h||(vn(h),e.onClose())}},"Send"),n(C,{color:C.Colors.TRANSPARENT,look:C.Looks.LINK,style:{left:15,position:"absolute"},onClick:()=>{e.onClose()}},"Cancel")))}function E0(){Ne(e=>n(lN,{...e}))}var _0=g(()=>{"use strict";a();nt();st();x();Al()});function cN(){return n("svg",{fill:"var(--header-secondary)",width:24,height:24,viewBox:"0 0 64 64"},n("path",{d:"M 32 9 C 24.832 9 19 14.832 19 22 L 19 27.347656 C 16.670659 28.171862 15 30.388126 15 33 L 15 49 C 15 52.314 17.686 55 21 55 L 43 55 C 46.314 55 49 52.314 49 49 L 49 33 C 49 30.388126 47.329341 28.171862 45 27.347656 L 45 22 C 45 14.832 39.168 9 32 9 z M 32 13 C 36.963 13 41 17.038 41 22 L 41 27 L 23 27 L 23 22 C 23 17.038 27.037 13 32 13 z"}))}function uN(){return n(ee,{text:"This message has a hidden message! (InvisibleChat)"},({onMouseEnter:e,onMouseLeave:t})=>n("img",{"aria-label":"Hidden Message Indicator (InvisibleChat)",onMouseEnter:e,onMouseLeave:t,src:"https://github.com/SammCheese/invisible-chat/raw/NewReplugged/src/assets/lock.png",width:20,height:20,style:{transform:"translateY(4p)",paddingInline:4}}))}function pN(e){return e.type.analyticsName!=="normal"?null:n(ee,{text:"Encrypt Message"},({onMouseEnter:t,onMouseLeave:o})=>n("div",{style:{display:"flex"}},n(C,{"aria-haspopup":"dialog","aria-label":"Encrypt Message",size:"",look:eo.BLANK,onMouseEnter:t,onMouseLeave:o,innerClassName:vt.button,onClick:()=>E0(),style:{padding:"0 2px",scale:"0.9"}},n("div",{className:vt.buttonWrapper},n("svg",{"aria-hidden":!0,role:"img",width:"32",height:"32",viewBox:"0 0 64 64",style:{scale:"1.1"}},n("path",{fill:"currentColor",d:"M 32 9 C 24.832 9 19 14.832 19 22 L 19 27.347656 C 16.670659 28.171862 15 30.388126 15 33 L 15 49 C 15 52.314 17.686 55 21 55 L 43 55 C 46.314 55 49 52.314 49 49 L 49 33 C 49 30.388126 47.329341 28.171862 45 27.347656 L 45 22 C 45 14.832 39.168 9 32 9 z M 32 13 C 36.963 13 41 17.038 41 22 L 41 27 L 23 27 L 23 22 C 23 17.038 27.037 13 32 13 z"}))))))}function O0(e,t,o){return Yd.hide(e+"\u200B",t,o)}function Kd(e,t,o){let r=Yd.reveal(e,t);return o?r.replace("\u200B",""):r}function dN(e){return e.endsWith("\u200B")}async function mN(e){let t=B0.store.savedPasswords.split(",").map(r=>r.trim());if(!e?.content||!t?.length)return!1;let{content:o}=e;/^\W/.test(e.content)&&(o=`d ${e.content}d`);for(let r=0;r<t.length;r++){let i=Kd(o,t[r],!1);if(dN(i))return i}return!1}var Yd,B0,Zd,Al=g(()=>{"use strict";a();Gr();$();le();I();vl();w();x();L0();_0();B0=L({savedPasswords:{type:0,default:"password, Password",description:"Saved Passwords (Seperated with a , )"}}),Zd=y({name:"InvisibleChat",description:"Encrypt your Messages in a non-suspicious way!",authors:[d.SammCheese],dependencies:["MessagePopoverAPI"],patches:[{find:".Messages.MESSAGE_EDITED,",replacement:{match:/let\{className:\i,message:\i[^}]*\}=(\i)/,replace:"try {$1 && $self.INV_REGEX.test($1.message.content) ? $1.content.push($self.indicator()) : null } catch {};$&"}},{find:"ChannelTextAreaButtons",replacement:{match:/(\i)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&,(()=>{try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}})()"}}],EMBED_API_URL:"https://embed.sammcheese.net",INV_REGEX:new RegExp(/( \u200c|\u200d |[\u2060-\u2064])[^\u200b]/),URL_REGEX:new RegExp(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/),settings:B0,async start(){let{default:e}=await FS();Yd=new e(!0,!1),$o("invDecrypt",t=>this.INV_REGEX.test(t?.content)?{label:"Decrypt Message",icon:this.popOverIcon,message:t,channel:J.getChannel(t.channel_id),onClick:async()=>{await mN(t).then(o=>o?void this.buildEmbed(t,o):void D0({message:t}))}}:null)},stop(){Go("invDecrypt")},async getEmbed(e){let{body:t}=await At.post({url:"/unfurler/embed-urls",body:{urls:[e]}});return await t.embeds[0]},async buildEmbed(e,t){let o=t.match(this.URL_REGEX);if(e.embeds.push({type:"rich",title:"Decrypted Message",color:"0x45f5f5",description:t,footer:{text:"Made with \u2764\uFE0F by c0dine and Sammy!"}}),o?.length){let r=await this.getEmbed(new URL(o[0]));r&&e.embeds.push(r)}this.updateMessage(e)},updateMessage:e=>{B.dispatch({type:"MESSAGE_UPDATE",message:e})},chatBarIcon:U.wrap(pN,{noop:!0}),popOverIcon:()=>n(cN,null),indicator:U.wrap(uN,{noop:!0})})});function F0(e,t){!J.hasChannel(t)||pn.transitionTo(`/channels/${e??"@me"}/${t}`)}var Nl,xo,Xd,U0=g(()=>{"use strict";a();Jo();I();w();x();Nl=!1;Xd=y({name:"KeepCurrentChannel",description:"Attempt to navigate to the channel you were in before switching accounts or loading Discord.",authors:[d.Nuckyz],flux:{LOGOUT(e){({isSwitchingAccount:Nl}=e)},CONNECTION_OPEN(){!Nl||(Nl=!1,xo?.channelId&&F0(xo.guildId,xo.channelId))},async CHANNEL_SELECT({guildId:e,channelId:t}){Nl||(xo={guildId:e,channelId:t},await ro("KeepCurrentChannel_previousData",xo))}},async start(){xo=await Rt("KeepCurrentChannel_previousData"),xo?xo.channelId&&F0(xo.guildId,xo.channelId):(xo={guildId:ko.getGuildId(),channelId:Me.getChannelId()??null},await ro("KeepCurrentChannel_previousData",xo))}})});async function Jd(e){return(await Qi.fetchAssetIds(Qd,[e]))[0]}function hN(e){B.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e,socketId:"LastFM"})}var Qd,fN,$0,gN,wo,Vd,G0=g(()=>{"use strict";a();$();en();I();Je();w();W();x();Qd="1108588077900898414",fN="2a96cbd8b46e442fc41c2b86b821562f",$0=new ie("LastFMRichPresence"),gN=A("getLocalPresence");wo=L({username:{description:"last.fm username",type:0},apiKey:{description:"last.fm api key",type:0},shareUsername:{description:"show link to last.fm profile",type:3,default:!1},hideWithSpotify:{description:"hide last.fm presence if spotify is running",type:3,default:!0},statusName:{description:"custom status text",type:0,default:"some music"},nameFormat:{description:"Show name of song and artist in status name",type:4,options:[{label:"Use custom status name",value:"status-name",default:!0},{label:"Use format 'artist - song'",value:"artist-first"},{label:"Use format 'song - artist'",value:"song-first"},{label:"Use artist name only",value:"artist"},{label:"Use song name only",value:"song"}]},useListeningStatus:{description:'show "Listening to" status instead of "Playing"',type:3,default:!1},missingArt:{description:"When album or album art is missing",type:4,options:[{label:"Use large Last.fm logo",value:"lastfmLogo",default:!0},{label:"Use generic placeholder",value:"placeholder"}]}}),Vd=y({name:"LastFMRichPresence",description:"Little plugin for Last.fm rich presence",authors:[d.dzshn,d.RuiNtD,d.blahajZip,d.archeruwu],settingsAboutComponent:()=>n(f,null,n(S.FormTitle,{tag:"h3"},"How to get an API key"),n(S.FormText,null,"An API key is required to fetch your current track. To get one, you can visit ",n(rt,{href:"https://www.last.fm/api/account/create"},"this page")," and fill in the following information: ",n("br",null)," ",n("br",null),"Application name: Discord Rich Presence ",n("br",null),"Application description: (personal use) ",n("br",null)," ",n("br",null),"And copy the API key (not the shared secret!)")),settings:wo,start(){this.updatePresence(),this.updateInterval=setInterval(()=>{this.updatePresence()},16e3)},stop(){clearInterval(this.updateInterval)},async fetchTrackData(){if(!wo.store.username||!wo.store.apiKey)return null;try{let e=new URLSearchParams({method:"user.getrecenttracks",api_key:wo.store.apiKey,user:wo.store.username,limit:"1",format:"json"}),t=await fetch(`https://ws.audioscrobbler.com/2.0/?${e}`);if(!t.ok)throw`${t.status} ${t.statusText}`;let o=await t.json();if(o.error)return $0.error("Error from Last.fm API",`${o.error}: ${o.message}`),null;let r=o.recenttracks?.track[0];return r?.["@attr"]?.nowplaying?{name:r.name||"Unknown",album:r.album["#text"],artist:r.artist["#text"]||"Unknown",url:r.url,imageUrl:r.image?.find(i=>i.size==="large")?.["#text"]}:null}catch(e){return $0.error("Failed to query Last.fm API",e),null}},async updatePresence(){hN(await this.getActivity())},getLargeImage(e){if(e.imageUrl&&!e.imageUrl.includes(fN))return e.imageUrl;if(wo.store.missingArt==="placeholder")return"placeholder"},async getActivity(){if(wo.store.hideWithSpotify){for(let s of gN.getActivities())if(s.type===2&&s.application_id!==Qd)return null}let e=await this.fetchTrackData();if(!e)return null;let t=this.getLargeImage(e),o=t?{large_image:await Jd(t),large_text:e.album||void 0,small_image:await Jd("lastfm-small"),small_text:"Last.fm"}:{large_image:await Jd("lastfm-large"),large_text:e.album||void 0},r=[{label:"View Song",url:e.url}];wo.store.shareUsername&&r.push({label:"Last.fm Profile",url:`https://www.last.fm/user/${wo.store.username}`});let i=(()=>{switch(wo.store.nameFormat){case"artist-first":return e.artist+" - "+e.name;case"song-first":return e.name+" - "+e.artist;case"artist":return e.artist;case"song":return e.name;default:return wo.store.statusName}})();return{application_id:Qd,name:i,details:e.name,state:e.artist,assets:o,buttons:r.map(s=>s.label),metadata:{button_urls:r.map(s=>s.url)},type:wo.store.useListeningStatus?2:0,flags:1}}})});var H0,z0,em,j0=g(()=>{"use strict";a();$();I();w();H0=["Eyrokac","Rdcg$l`'k|~n",'H`tf$d&iajo+d`{"',"Sucqplh`(Eclhualva()&","Lncgmka'8KNMDC,shpanf'`x./,","Ioqweijnfn*IeuvfvAotkfxo./,","Hd{#cp\x7Ft$)nbd!{lq%mig~*\x7Fh`v#mk&sm{gx nd#idjb(a\x7Ffao\"bja&amdkge!Rlo\xECkhf)hyedfjjb*'^hzdrdmm$lu'|ao+mnqw$fijxh~bbmg#Tjm\xEEefd+fnp#lpkffz5","h",`sijklm&cam*rot"hjjq'|ak\x7F xmv#wc'ep*mawmvvlrb(|ynr>"Aqq&cgg-\x7F ugoh%rom)e\x7Fhdpp%$`,'Tnfb}"u\'~`nno!kp$vvhfzeyee"a}%Tfam*Xh`fls%Jboldos-"lj`&hn)~ce!`jcbct|)gdbhnf$wikm$zgaxkmc%afely+og"144?\'ign+iu%p$qisiefr gpfa$',"Ndtfv%ahfgk+ghtf$|ir(|z' Oguaw&`ggdj mgw$|ir(me|n","(!\u0363\xB3$\u0359\u0290'\u0369\xB9#","(\uFF88\u25D7\u30ED\u25D1,\uFF8F-2\uFF6C\uFF95\u272C","Ynw#hjil(ze+psgwp|&sgmkr!","Tikmolh`(fl+a!dvjk\x7F'y|e\x7Fe/,-","3/3750?5><9>885:7","mdmt","Wdn`khc+(oxbeof","Ig\"zkp*'g{*xolglj`&~g|*gowg/$mgt(Eclm`.#ticf{l*xed\"wl`&Kangj igbhqn'd`dn `v#lqrw{3%$bhv-h|)kangj_imwhlhb","Tscmw%Tnoa~x",'I\u2018f#npus(ec`e!vl$lhsm{`ncu"ekw&f(defeov-$Rnf|)sdu\u2018pf$wcam{ceg!vl$du\'D`d~x-"jw%oi(okht-"DJP)Kag\x7Fs,!mq$du\'A\u2010|n sg`akrkq)~jkdl#pj&diefbnf"jp)&@F\\*{ltq#Hlhrp\'',"Ynw$v`&cg`dl fml`%rhlhs*","Dnl$p%qhz{s' hv$w%hh|aceg!;#gpvt(fl+cndea`&dg|fon&v#wjjqm(","\uD83D)pft`gs(ec`e!13$qojmz#",`a!njcmr'ide~nu"lb%rheoedldpz$lu'gbkr`,'dn"zkp&kg\x7Fo4',"hnpqkw",'sn"fau\x7F','Sn"tmqnh}}*musvkaw&flf&+ldv$w%lr{}*aulr#vlao|)cetn"jp$',"Dxkmc%ot(hhxomwwai\x7F'{hln",`hd{#}js&(pe~'sg#gprb(3#"`,"hd{b${","<;vqkijbq33271:56<3799?24944:",`Thof$lu'ofdn,!qsefc'az*bnrcma+&Om{o+iu"\`khct$)bnrd"bcdoi&`,"snofplkb{)c\x7F'r\"lod\x7F'|f*aurv#cpno`abchijklmno","Wdn`khc'|f*eghl{%"],z0=L({replaceEvents:{description:"Replace Event Quotes too",type:3,default:!0}}),em=y({name:"LoadingQuotes",description:"Replace Discords loading quotes",authors:[d.Ven,d.KraXen72],settings:z0,patches:[{find:".LOADING_DID_YOU_KNOW}",replacement:[{match:/\._loadingText=function\(\)\{/,replace:"$&return $self.quote;"},{match:/\._eventLoadingText=function\(\)\{/,replace:"$&return $self.quote;",predicate:()=>z0.store.replaceEvents}]}],xor(e){let t="read if cute",o=Array.from(e,(r,i)=>r.charCodeAt(0)^i%t.length);return String.fromCharCode(...o)},get quote(){return this.xor(H0[Math.floor(Math.random()*H0.length)])}})});function vN(){let{id:e,guild_id:t}=Ke([Me],()=>di()),{groups:o}=Ke([q0],()=>q0.getProps(t,e)),r=Ke([W0],()=>W0.getMemberCount(t));if(r==null)return null;let i=o.length===1&&o[0].id==="unknown"?0:o.reduce((s,l)=>s+(l.id==="offline"?0:l.count),0);return n(ce,{id:"vc-membercount",style:{marginTop:"1em",paddingInline:"1em",justifyContent:"center",alignContent:"center",gap:0}},n(ee,{text:`${Cl(i)} online in this channel`,position:"bottom"},s=>n("div",{...s},n("span",{style:{backgroundColor:"var(--green-360)",width:"12px",height:"12px",borderRadius:"50%",display:"inline-block",marginRight:"0.5em"}}),n("span",{style:{color:"var(--green-360)"}},Cl(i)))),n(ee,{text:`${Cl(r)} total server members`,position:"bottom"},s=>n("div",{...s},n("span",{style:{width:"6px",height:"6px",borderRadius:"50%",border:"3px solid var(--primary-400)",display:"inline-block",marginRight:"0.5em",marginLeft:"1em"}}),n("span",{style:{color:"var(--primary-400)"}},Cl(r)))))}var W0,q0,yN,Cl,tm,K0=g(()=>{"use strict";a();le();Ct();I();nt();w();W();x();W0=we("GuildMemberCountStore"),q0=we("ChannelMemberStore"),yN=new Intl.NumberFormat,Cl=e=>yN.format(e);tm=y({name:"MemberCount",description:"Shows the amount of online & total members in the server member list",authors:[d.Ven,d.Commandtechno],patches:[{find:"{isSidebarVisible:",replacement:{match:/(?<=let\{className:(\i),.+?children):\[(\i\.useMemo[^}]+"aria-multiselectable")/,replace:":[$1?.startsWith('members')?$self.render():null,$2"}}],render:U.wrap(vN,{noop:!0})})});var om,Y0,Z0,$s,nm,X0=g(()=>{"use strict";a();tn();$();I();w();W();x();om=!1,Y0=e=>e.key==="Backspace"&&(om=!0),Z0=e=>e.key==="Backspace"&&(om=!1),$s=L({enableDeleteOnClick:{type:3,description:"Enable delete on click while holding backspace",default:!0},enableDoubleClickToEdit:{type:3,description:"Enable double click to edit",default:!0},enableDoubleClickToReply:{type:3,description:"Enable double click to reply",default:!0},requireModifier:{type:3,description:"Only do double click actions when shift/ctrl is held",default:!1}}),nm=y({name:"MessageClickActions",description:"Hold Backspace and click to delete, double click to edit/reply",authors:[d.Ven],dependencies:["MessageEventsAPI"],settings:$s,start(){let e=A("deleteMessage","startEditMessage"),t=A("isEditing","isEditingAny");document.addEventListener("keydown",Y0),document.addEventListener("keyup",Z0),this.onClick=Fp((o,r,i)=>{let s=o.author.id===F.getCurrentUser().id;if(om)$s.store.enableDeleteOnClick&&(s||Le.can(Te.MANAGE_MESSAGES,r))&&(o.deleted?B.dispatch({type:"MESSAGE_DELETE",channelId:r.id,id:o.id,mlDeleted:!0}):e.deleteMessage(r.id,o.id),i.preventDefault());else{if(i.detail<2||$s.store.requireModifier&&!i.ctrlKey&&!i.shiftKey||r.guild_id&&!Le.can(Te.SEND_MESSAGES,r)||o.deleted===!0)return;if(s){if(!$s.store.enableDoubleClickToEdit||t.isEditing(r.id,o.id))return;e.startEditMessage(r.id,o.id,o.content),i.preventDefault()}else{if(!$s.store.enableDoubleClickToReply)return;let l=64;if(o.hasFlag(l))return;B.dispatch({type:"CREATE_PENDING_REPLY",channel:r,message:o,shouldMention:!E.plugins.NoReplyMention.enabled,showMentionToggle:r.guild_id!==null})}}})},stop(){Up(this.onClick),document.removeEventListener("keydown",Y0),document.removeEventListener("keyup",Z0)}})});var im={};ze(im,{_modifyAccessories:()=>SN,accessories:()=>kl,addAccessory:()=>Gs,removeAccessory:()=>rm});function Gs(e,t,o){kl.set(e,{callback:t,position:o})}function rm(e){kl.delete(e)}function SN(e,t){for(let o of kl.values()){let r=o.callback(t);if(r!=null){if(!Array.isArray(r))r=[r];else if(r.length===0)continue;e.splice(o.position!=null?o.position<0?e.length+o.position:o.position:e.length,0,...r.filter(i=>i!=null))}}return e}var kl,Rl=g(()=>{"use strict";a();kl=new Map});async function MN(e,t){let o=wi.get(t);if(o)return o.message;wi.set(t,{fetched:!1});let i=(await At.get({url:`/channels/${e}/messages`,query:{limit:1,around:t},retries:2}).catch(()=>null))?.body?.[0];if(!i)return;let s=Co.getMessages(i.channel_id).receiveMessage(i).get(i.id);return wi.set(s.id,{message:s,fetched:!0}),s}function PN(e){let t=[];for(let{content_type:o,height:r,width:i,url:s,proxy_url:l}of e.attachments??[])o?.startsWith("image/")&&t.push({height:r,width:i,url:s,proxyURL:l});for(let{type:o,image:r,thumbnail:i,url:s}of e.embeds??[])o==="image"?t.push({...r??i}):s&&o==="gifv"&&!Q0.test(s)&&t.push({height:i.height,width:i.width,url:s});return t}function IN(e,t){return!e&&!t?"":e?t?`[no content, ${e} attachment${e!==1?"s":""} and ${t} embed${t!==1?"s":""}]`:`[no content, ${e} attachment${e!==1?"s":""}]`:`[no content, ${t} embed${t!==1?"s":""}]`}function AN(e){return!!(e.components.length||e.attachments.some(t=>!t.content_type?.startsWith("image/"))||e.embeds.some(t=>t.type!=="image"&&(t.type!=="gifv"||Q0.test(t.url))))}function NN(e,t){if(e>t){let s=Math.min(e,400);return{width:s,height:Math.round(t/(e/s))}}let i=Math.min(t,300);return{width:Math.round(e/(t/i)),height:i}}function CN(e,t){return new Proxy(e,{get(o,r){return r==="vencordEmbeddedBy"?t:Reflect.get(...arguments)}})}function kN({message:e}){let t=e.vencordEmbeddedBy??[],o=[],r=null;for(;(r=sm.exec(e.content))!==null;){let[i,s,l,c]=r;if(t.includes(c))continue;let u=J.getChannel(l);if(!u||s!=="@me"&&!Le.can(1024n,u))continue;let{listMode:p,idList:m}=Dl.store,h=[s,l,e.author.id].some(b=>b&&m.includes(b));if(p==="blacklist"&&h||p==="whitelist"&&!h)continue;let v=wi.get(c)?.message;if(!v)if(v??=Co.getMessage(l,c),v)wi.set(c,{message:v,fetched:!0});else{let b={...e};delete b.embeds,delete b.interaction,wN.push(()=>MN(l,c).then(P=>P&&B.dispatch({type:"MESSAGE_UPDATE",message:b})));continue}let T={message:CN(v,[...t,e.id]),channel:u,guildID:s},N=Dl.store.automodEmbeds;o.push(N==="always"||N==="prefer"&&!AN(v)?n(DN,{...T}):n(RN,{...T}))}return o.length?n(f,null,o):null}function RN({message:e,channel:t,guildID:o}){let r=o==="@me",i=!r&&pe.getGuild(t.guild_id),s=F.getUser(J.getChannel(t.id).recipients?.[0]);return n(bN,{embed:{rawDescription:"",color:"var(--background-secondary)",author:{name:n(Q,{variant:"text-xs/medium",tag:"span"},n("span",null,r?"Direct Message - ":i.name+" - "),r?_e.parse(`<@${s.id}>`):_e.parse(`<#${t.id}>`)),iconProxyURL:i?`https://${window.GLOBAL_ENV.CDN_HOST}/icons/${i.id}/${i.icon}.png`:`https://${window.GLOBAL_ENV.CDN_HOST}/avatars/${s.id}/${s.avatar}`}},renderDescription:()=>n("div",{key:e.id,className:te(J0.message,Dl.store.messageBackgroundColor&&J0.searchResult)},n(xN,{id:`message-link-embeds-${e.id}`,message:e,channel:t,subscribeToComponentDispatch:!1}))})}function DN(e){let{message:t,channel:o,guildID:r}=e,i=Bc.MessageDisplayCompact.useSetting(),s=r==="@me",l=PN(t),{parse:c}=_e;return n(TN,{channel:o,childrenAccessories:n(Q,{color:"text-muted",variant:"text-xs/medium",tag:"span"},c(s?`<@${J.getChannel(o.id).recipients[0]}>`:`<#${o.id}>`),n("span",null,s?" - Direct Message":" - "+pe.getGuild(o.guild_id)?.name)),compact:i,content:n(f,null,t.content||t.attachments.length<=l.length?c(t.content):[IN(t.attachments.length,t.embeds.length)],l.map(u=>{let{width:p,height:m}=NN(u.width,u.height);return n("div",null,n("img",{src:u.url,width:p,height:m}))})),hideTimestamp:!1,message:t,_messageEmbed:"automod"})}var wi,bN,TN,xN,J0,sm,Q0,wN,Dl,am,V0=g(()=>{"use strict";a();Rl();$();le();I();Pe();ri();w();W();x();wi=new Map,bN=je(".inlineMediaEmbed"),TN=je(".withFooter]:","childrenMessageContent:"),xN=je("renderSimpleAccessories)"),J0=A("message","searchResult"),sm=/(?<!<)https?:\/\/(?:\w+\.)?discord(?:app)?\.com\/channels\/(\d{17,20}|@me)\/(\d{17,20})\/(\d{17,20})/g,Q0=/^https:\/\/(?:www\.)?tenor\.com\//,wN=new Lo,Dl=L({messageBackgroundColor:{description:"Background color for messages in rich embeds",type:3},automodEmbeds:{description:"Use automod embeds instead of rich embeds (smaller but less info)",type:4,options:[{label:"Always use automod embeds",value:"always"},{label:"Prefer automod embeds, but use rich embeds if some content can't be shown",value:"prefer"},{label:"Never use automod embeds",value:"never",default:!0}]},listMode:{description:"Whether to use ID list as blacklist or whitelist",type:4,options:[{label:"Blacklist",value:"blacklist",default:!0},{label:"Whitelist",value:"whitelist"}]},idList:{description:"Guild/channel/user IDs to blacklist or whitelist (separate with comma)",type:0,default:""},clearMessageCache:{type:6,description:"Clear the linked message cache",component:()=>n(C,{onClick:()=>wi.clear()},"Clear the linked message cache")}});am=y({name:"MessageLinkEmbeds",description:"Adds a preview to messages that link another message",authors:[d.TheSun,d.Ven,d.RyanCaoDev],dependencies:["MessageAccessoriesAPI"],settings:Dl,start(){Gs("messageLinkEmbed",e=>sm.test(e.message.content)?(sm.lastIndex=0,n(U,null,n(kN,{message:e.message}))):null,4)}})});var eb=g(()=>{});var lm,tb=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/messageLogger/deleteStyleOverlay.css",{name:"src/plugins/messageLogger/deleteStyleOverlay.css",source:`.messagelogger-deleted {
  105. background-color: rgba(240 71 71 / 15%) !important;
  106. }
  107. `,classNames:{},dom:null});lm="src/plugins/messageLogger/deleteStyleOverlay.css"});var cm,ob=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/messageLogger/deleteStyleText.css",{name:"src/plugins/messageLogger/deleteStyleText.css",source:`/* Message content highlighting */
  108. .messagelogger-deleted [class*="contents"] > :is(div, h1, h2, h3, p) {
  109. color: #f04747 !important;
  110. }
  111. /* Bot "thinking" text highlighting */
  112. .messagelogger-deleted [class*="colorStandard"] {
  113. color: #f04747 !important;
  114. }
  115. /* Embed highlighting */
  116. .messagelogger-deleted article :is(div, span, h1, h2, h3, p) {
  117. color: #f04747 !important;
  118. }
  119. .messagelogger-deleted a {
  120. color: #be3535 !important;
  121. text-decoration: underline;
  122. }
  123. `,classNames:{},dom:null});cm="src/plugins/messageLogger/deleteStyleText.css"});function nb(){E.plugins.MessageLogger.deleteStyle==="text"?(Tt(cm),jt(lm)):(jt(cm),Tt(lm))}var LN,rb,ib,sb,um,ab=g(()=>{"use strict";a();eb();kt();$();ot();le();I();Je();w();W();x();tb();ob();LN=A("edited","communicationDisabled","isSystemMessage");rb="ml-remove-history",ib="ml-toggle-style",sb=(e,t)=>()=>{let{message:o}=t,{deleted:r,editHistory:i,id:s,channel_id:l}=o;if(!r&&!i?.length)return;e:{if(!r)break e;let c=document.getElementById(`chat-messages-${l}-${s}`);if(!c)break e;e.push(n(G.MenuItem,{id:ib,key:ib,label:"Toggle Deleted Highlight",action:()=>c.classList.toggle("messagelogger-deleted")}))}e.push(n(G.MenuItem,{id:rb,key:rb,label:"Remove Message History",color:"danger",action:()=>{r?B.dispatch({type:"MESSAGE_DELETE",channelId:l,id:s,mlDeleted:!0}):o.editHistory=[]}}))},um=y({name:"MessageLogger",description:"Temporarily logs deleted and edited messages.",authors:[d.rushii,d.Ven,d.AutumnVN],start(){nb(),de("message",sb)},stop(){ge("message",sb)},renderEdit(e){return n(U,{noop:!0},n("div",{className:"messagelogger-edited"},_e.parse(e.content),n(Wo,{timestamp:e.timestamp,isEdited:!0,isInline:!1},n("span",{className:LN.edited}," ","(",Qe.Messages.MESSAGE_EDITED,")"))))},makeEdit(e,t){return{timestamp:yo?.call(e.edited_timestamp),content:t.content}},options:{deleteStyle:{type:4,description:"The style of deleted messages",default:"text",options:[{label:"Red text",value:"text",default:!0},{label:"Red overlay",value:"overlay"}],onChange:()=>nb()},ignoreBots:{type:3,description:"Whether to ignore messages by bots",default:!1},ignoreSelf:{type:3,description:"Whether to ignore messages by yourself",default:!1},ignoreUsers:{type:0,description:"Comma-separated list of user IDs to ignore",default:""},ignoreChannels:{type:0,description:"Comma-separated list of channel IDs to ignore",default:""},ignoreGuilds:{type:0,description:"Comma-separated list of guild IDs to ignore",default:""}},handleDelete(e,t,o){try{if(e==null||!o&&!e.has(t.id))return e;let r=i=>{let s=e.get(i);if(!s)return;let l=64;t.mlDeleted||(s.flags&l)===l||this.shouldIgnore(s)?e=e.remove(i):e=e.update(i,u=>u.set("deleted",!0).set("attachments",u.attachments.map(p=>(p.deleted=!0,p))))};o?t.ids.forEach(r):r(t.id)}catch(r){new ie("MessageLogger").error("Error during handleDelete",r)}return e},shouldIgnore(e){let{ignoreBots:t,ignoreSelf:o,ignoreUsers:r,ignoreChannels:i,ignoreGuilds:s}=E.plugins.MessageLogger,l=F.getCurrentUser().id;return t&&e.author?.bot||o&&e.author?.id===l||r.includes(e.author?.id)||i.includes(e.channel_id)||i.includes(J.getChannel(e.channel_id)?.parent_id)||s.includes(J.getChannel(e.channel_id)?.guild_id)},patches:[{find:'displayName="MessageStore"',replacement:[{match:/MESSAGE_DELETE:function\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?},/,replace:"MESSAGE_DELETE:function($1){ var cache = $2getOrCreate($1.channelId); cache = $self.handleDelete(cache, $1, false); $2commit(cache);},"},{match:/MESSAGE_DELETE_BULK:function\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?},/,replace:"MESSAGE_DELETE_BULK:function($1){ var cache = $2getOrCreate($1.channelId); cache = $self.handleDelete(cache, $1, true); $2commit(cache);},"},{match:/(MESSAGE_UPDATE:function\((\i)\).+?)\.update\((\i)/,replace:"$1.update($3,m => (($2.message.flags & 64) === 64 || $self.shouldIgnore($2.message)) ? m : $2.message.content !== m.editHistory?.[0]?.content && $2.message.content !== m.content ? m.set('editHistory',[...(m.editHistory || []), $self.makeEdit($2.message, m)]) : m).update($3"},{match:/(?<=getLastEditableMessage\(\i\)\{.{0,200}\.find\((\i)=>)/,replace:"!$1.deleted &&"}]},{find:"}addReaction(",replacement:[{match:/this\.customRenderedContent=(\i)\.customRenderedContent,/,replace:"this.customRenderedContent = $1.customRenderedContent,this.deleted = $1.deleted || false,this.editHistory = $1.editHistory || [],"}]},{find:"THREAD_STARTER_MESSAGE?null===",replacement:[{match:/interactionData:(\i)\.interactionData/,replace:"interactionData:$1.interactionData,deleted:$1.deleted,editHistory:$1.editHistory,attachments:$1.attachments"},{match:/attachments:(\i)\((\i)\)/,replace:"attachments: $1((() => { if ($self.shouldIgnore($2)) return $2; let old = arguments[1]?.attachments; if (!old) return $2; let new_ = $2.attachments?.map(a => a.id) ?? []; let diff = old.filter(a => !new_.includes(a.id)); old.forEach(a => a.deleted = true); $2.attachments = [...diff, ...$2.attachments]; return $2;})()),deleted: arguments[1]?.deleted,editHistory: arguments[1]?.editHistory"},{match:/(\((\i)\){return null==\2\.attachments.+?)spoiler:/,replace:"$1deleted: arguments[0]?.deleted,spoiler:"}]},{find:".removeAttachmentHoverButton",replacement:[{match:/(className:\i,attachment:\i),/,replace:"$1,attachment: {deleted},"},{match:/\[\i\.obscured\]:.+?,/,replace:"$& 'messagelogger-deleted-attachment': deleted,"}]},{find:"Message must not be a thread starter message",replacement:[{match:/\)\("li",\{(.+?),className:/,replace:')("li",{$1,className:(arguments[0].message.deleted ? "messagelogger-deleted " : "")+'}]},{find:'Messages.MESSAGE_EDITED,")"',replacement:[{match:/(\)\("div",\{id:.+?children:\[)/,replace:"$1 (arguments[0].message.editHistory?.length > 0 ? arguments[0].message.editHistory.map(edit => $self.renderEdit(edit)) : null), "}]},{find:'displayName="ReferencedMessageStore"',replacement:[{match:/MESSAGE_DELETE:function\((\i)\).+?},/,replace:"MESSAGE_DELETE:function($1){},"},{match:/MESSAGE_DELETE_BULK:function\((\i)\).+?},/,replace:"MESSAGE_DELETE_BULK:function($1){},"}]},{find:"useMessageMenu:",replacement:[{match:/children:(\[""===.+?\])/,replace:"children:arguments[0].message.deleted?[]:$1"}]}]})});function lb(e){mi({name:e.name,description:e.name,inputType:1,execute:async(t,o)=>await Ll(e.name)?(E.plugins.MessageTags.clyde&&me(o.channel.id,{content:`${or} The tag **${e.name}** has been sent!`}),{content:e.message.replaceAll("\\n",`
  124. `)}):(me(o.channel.id,{content:`${or} The tag **${e.name}** does not exist anymore! Please reload ur Discord to fix :)`}),{content:`/${e.name}`}),[EN]:!0},"CustomTags")}var or,_l,EN,El,Ll,_N,ON,pm,cb=g(()=>{"use strict";a();so();Jo();$();I();w();or="<:luna:1035316192220553236>",_l="MessageTags_TAGS",EN=Symbol("MessageTags"),El=()=>Rt(_l).then(e=>e??[]),Ll=e=>Rt(_l).then(t=>(t??[]).find(o=>o.name===e)??null),_N=async e=>{let t=await El();return t.push(e),ro(_l,t),t},ON=async e=>{let t=await El();return t=await t.filter(o=>o.name!==e),ro(_l,t),t};pm=y({name:"MessageTags",description:"Allows you to save messages and to use them with a simple command.",authors:[d.Luna],options:{clyde:{name:"Clyde message on send",description:"If enabled, clyde will send you an ephemeral message when a tag was used.",type:3,default:!0}},dependencies:["CommandsAPI"],async start(){for(let e of await El())lb(e)},commands:[{name:"tags",description:"Manage all the tags for yourself",inputType:0,options:[{name:"create",description:"Create a new tag",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0},{name:"message",description:"The message that you will send when using this tag",type:3,required:!0}]},{name:"list",description:"List all tags from yourself",type:1,options:[]},{name:"delete",description:"Remove a tag from your yourself",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0}]},{name:"preview",description:"Preview a tag without sending it publicly",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0}]}],async execute(e,t){switch(e[0].name){case"create":{let o=ct(e[0].options,"tag-name",""),r=ct(e[0].options,"message","");if(await Ll(o))return me(t.channel.id,{content:`${or} A Tag with the name **${o}** already exists!`});let i={name:o,enabled:!0,message:r};lb(i),await _N(i),me(t.channel.id,{content:`${or} Successfully created the tag **${o}**!`});break}case"delete":{let o=ct(e[0].options,"tag-name","");if(!await Ll(o))return me(t.channel.id,{content:`${or} A Tag with the name **${o}** does not exist!`});Ms(o),await ON(o),me(t.channel.id,{content:`${or} Successfully deleted the tag **${o}**!`});break}case"list":{me(t.channel.id,{embeds:[{title:"All Tags:",description:(await El()).map(o=>`\`${o.name}\`: ${o.message.slice(0,72).replaceAll("\\n"," ")}${o.message.length>72?"...":""}`).join(`
  125. `)||`${or} Woops! There are no tags yet, use \`/tags create\` to create one!`,color:14122879,type:"rich"}]});break}case"preview":{let o=ct(e[0].options,"tag-name",""),r=await Ll(o);if(!r)return me(t.channel.id,{content:`${or} A Tag with the name **${o}** does not exist!`});me(t.channel.id,{content:r.message.replaceAll("\\n",`
  126. `)});break}default:{me(t.channel.id,{content:"Invalid sub-command"});break}}}}]})});function BN(e){let t="";for(let o=0;o<e.length;o++)t+=o%2?e[o].toUpperCase():e[o].toLowerCase();return t}var dm,ub=g(()=>{"use strict";a();so();I();w();dm=y({name:"MoreCommands",description:"echo, lenny, mock",authors:[d.Arjix,d.echo,d.Samu],dependencies:["CommandsAPI"],commands:[{name:"echo",description:"Sends a message as Clyde (locally)",options:[Zn],inputType:3,execute:(e,t)=>{let o=ct(e,"message","");me(t.channel.id,{content:o})}},{name:"lenny",description:"Sends a lenny face",options:[Zn],execute:e=>({content:ct(e,"message","")+" ( \u0361\xB0 \u035C\u0296 \u0361\xB0)"})},{name:"mock",description:"mOcK PeOpLe",options:[ws],execute:e=>({content:BN(ct(e,"message",""))})}]})});var mm,pb=g(()=>{"use strict";a();so();I();w();mm=y({name:"MoreKaomoji",description:"Adds more Kaomoji to discord. \u30FD(\xB4\u25BD`)/",authors:[d.JacobTm],dependencies:["CommandsAPI"],commands:[{name:"dissatisfaction",description:" \uFF1E\uFE4F\uFF1C"},{name:"smug",description:" \u0CA0_\u0CA0"},{name:"happy",description:" \u30FD(\xB4\u25BD`)/"},{name:"crying",description:" \u0CA5_\u0CA5"},{name:"angry",description:" \u30FD(\uFF40\u0414\xB4)\uFF89"},{name:"anger",description:" \u30FD(\uFF4F`\u76BF\u2032\uFF4F)\uFF89"},{name:"joy",description:" <(\uFFE3\uFE36\uFFE3)>"},{name:"blush",description:"\u0AEE \u02F6\u1D54 \u1D55 \u1D54\u02F6 \u10D0"},{name:"confused",description:"(\u2022\u0E34_\u2022\u0E34)?"},{name:"sleeping",description:"(\u1D17_\u1D17)"},{name:"laughing",description:"o(\u2267\u25BD\u2266)o"}].map(e=>({...e,options:[Zn],execute:t=>({content:ct(t,"message","")+e.description})}))})});function UN(e){nr.store.tagSettings??=fm;let[t,o]=X(nr.store.tagSettings),r=i=>{o(i),e.setValue(i)};return n(ce,{flexDirection:"column"},Mi.map(i=>n(It,{style:{padding:"1em 1em 0"}},n(S.FormTitle,{style:{width:"fit-content"}},n(ee,{text:i.description},({onMouseEnter:s,onMouseLeave:l})=>n("div",{onMouseEnter:s,onMouseLeave:l},i.displayName," Tag ",n(wn,{type:wn.Types[i.name]})))),n(et,{type:"text",value:t[i.name]?.text??i.displayName,placeholder:`Text on tag (default: ${i.displayName})`,onChange:s=>{t[i.name].text=s,r(t)},className:z.bottom16}),n(mt,{value:t[i.name]?.showInChat??!0,onChange:s=>{t[i.name].showInChat=s,r(t)},hideBorder:!0},"Show in messages"),n(mt,{value:t[i.name]?.showInNotChat??!0,onChange:s=>{t[i.name].showInNotChat=s,r(t)},hideBorder:!0},"Show in member list and profiles"))))}var FN,wn,db,Mi,fm,nr,gm,mb=g(()=>{"use strict";a();$();Ct();I();it();w();W();x();FN=A("computePermissions","canEveryoneRole"),wn=Vt(e=>e.Types?.[0]==="BOT"),db=(e,t)=>!!e?.webhookId&&t.isNonUserBot(),Mi=[{name:"WEBHOOK",displayName:"Webhook",description:"Messages sent by webhooks",condition:db},{name:"OWNER",displayName:"Owner",description:"Owns the server",condition:(e,t,o)=>pe.getGuild(o?.guild_id)?.ownerId===t.id},{name:"ADMINISTRATOR",displayName:"Admin",description:"Has the administrator permission",permissions:["ADMINISTRATOR"]},{name:"MODERATOR_STAFF",displayName:"Staff",description:"Can manage the server, channels or roles",permissions:["MANAGE_GUILD","MANAGE_CHANNELS","MANAGE_ROLES"]},{name:"MODERATOR",displayName:"Mod",description:"Can manage messages or kick/ban people",permissions:["MANAGE_MESSAGES","KICK_MEMBERS","BAN_MEMBERS"]},{name:"VOICE_MODERATOR",displayName:"VC Mod",description:"Can manage voice chats",permissions:["MOVE_MEMBERS","MUTE_MEMBERS","DEAFEN_MEMBERS"]}],fm=Object.fromEntries(Mi.map(({name:e,displayName:t})=>[e,{text:t,showInChat:!0,showInNotChat:!0}]));nr=L({dontShowForBots:{description:"Don't show extra tags for bots (excluding webhooks)",type:3},dontShowBotTag:{description:"Only show extra tags for bots / Hide [BOT] text",type:3},tagSettings:{type:6,component:UN,description:"fill me"}}),gm=y({name:"MoreUserTags",description:"Adds tags for webhooks and moderative roles (owner, admin, etc.)",authors:[d.Cyn,d.TheSun,d.RyanCaoDev,d.LordElias,d.AutumnVN],settings:nr,patches:[{find:"BotTagTypes:",replacement:{match:/\((\i)=\{\}\)\)\[(\i)\.BOT/,replace:"($1=$self.getTagTypes()))[$2.BOT"}},{find:".DISCORD_SYSTEM_MESSAGE_BOT_TAG_TOOLTIP,",replacement:[{match:/(switch\((\i)\){.+?)case (\i(?:\.\i)?)\.BOT:default:(\i)=(\i\.\i\.Messages)\.BOT_TAG_BOT/,replace:(e,t,o,r,i,s)=>`${t}default:{${i} = $self.getTagText(${r}[${o}], ${s})}`},{match:/(\i)=(\i)===\i(?:\.\i)?\.ORIGINAL_POSTER/,replace:"$1=$self.isOPTag($2)"},{match:/.botText,children:(\i)}\)]/,replace:"$&,'data-tag':$1.toLowerCase()"}]},{find:"renderSystemTag:",replacement:{match:/;return\((\(null==\i\?void 0:\i\.isSystemDM\(\).+?.Types.ORIGINAL_POSTER\)),null==(\i)\)/,replace:";$1;$2=$self.getTag({...arguments[0],origType:$2,location:'chat'});return $2 == null"}},{find:".Messages.GUILD_OWNER,",replacement:{match:/(?<type>\i)=\(null==.{0,100}\.BOT;return null!=(?<user>\i)&&\i\.bot/,replace:"$<type> = $self.getTag({user: $<user>, channel: arguments[0].channel, origType: $<user>.bot ? 0 : null, location: 'not-chat' }); return typeof $<type> === 'number'"}},{find:".hasAvatarForGuild(null==",replacement:{match:/(?=usernameIcon:)/,replace:"moreTags_channelId:arguments[0].channelId,"}},{find:'copyMetaData:"User Tag"',replacement:{match:/(?=,botClass:)/,replace:",moreTags_channelId:arguments[0].moreTags_channelId"}},{find:",overrideDiscriminator:",replacement:[{match:/user:\i,nick:\i,/,replace:"$&moreTags_channelId,"},{match:/,botType:(\i\((\i)\)),/g,replace:",botType:$self.getTag({user:$2,channelId:moreTags_channelId,origType:$1,location:'not-chat'}),"}]}],start(){if(!nr.store.tagSettings)if(!nr.store.visibility_WEBHOOK)nr.store.tagSettings=fm;else{let e={...fm};Object.entries(Vencord.PlainSettings.plugins.MoreUserTags).forEach(([t,o])=>{let[r,i]=t.split("_");if(r==="visibility")switch(o){case"always":break;case"chat":e[i].showInNotChat=!1;break;case"not-chat":e[i].showInChat=!1;break;case"never":e[i].showInChat=!1,e[i].showInNotChat=!1;break}nr.store.tagSettings=e,delete Vencord.Settings.plugins.MoreUserTags[t]})}},getPermissions(e,t){let o=pe.getGuild(t?.guild_id);if(!o)return[];let r=FN.computePermissions({user:e,context:o,overwrites:t.permissionOverwrites});return Object.entries(Te).map(([i,s])=>r&s?i:"").filter(Boolean)},getTagTypes(){let e={},t=100;return Mi.forEach(({name:o})=>{e[o]=++t,e[t]=o,e[`${o}-BOT`]=++t,e[t]=`${o}-BOT`,e[`${o}-OP`]=++t,e[t]=`${o}-OP`}),e},isOPTag:e=>e===wn.Types.ORIGINAL_POSTER||Mi.some(t=>e===wn.Types[`${t.name}-OP`]),getTagText(e,t){if(!e)return t.BOT_TAG_BOT;let[o,r]=e.split("-"),i=Mi.find(({name:l})=>o===l);if(!i||r==="BOT"&&o!=="WEBHOOK"&&this.settings.store.dontShowForBots)return t.BOT_TAG_BOT;let s=nr.store.tagSettings?.[i.name]?.text||i.displayName;switch(r){case"OP":return`${t.BOT_TAG_FORUM_ORIGINAL_POSTER} \u2022 ${s}`;case"BOT":return`${t.BOT_TAG_BOT} \u2022 ${s}`;default:return s}},getTag({message:e,user:t,channelId:o,origType:r,location:i,channel:s}){if(!t)return null;if(i==="chat"&&t.id==="1")return wn.Types.OFFICIAL;if(t.isClyde())return wn.Types.AI;let l=typeof r=="number"?r:null;if(s??=J.getChannel(o),!s)return l;let c=this.settings.store,u=this.getPermissions(t,s);for(let p of Mi)if(!(i==="chat"&&!c.tagSettings[p.name].showInChat)&&!(i==="not-chat"&&!c.tagSettings[p.name].showInNotChat)&&(p.permissions?.some(m=>u.includes(m))||p.condition?.(e,t,s))){s.isForumPost()&&s.ownerId===t.id?l=wn.Types[`${p.name}-OP`]:t.bot&&!db(e,t)&&!c.dontShowBotTag?l=wn.Types[`${p.name}-BOT`]:l=wn.Types[p.name];break}return l}})});function HN(e,t){let o=0,r=0;for(;(r=e.indexOf(t,r)+1)!==0;)o++;return o}function zN(e,t){if(!t.global)throw new Error("pattern must be global");let o=0;for(;t.test(e);)o++;return o}function WN(e){let t=HN(e,ym)+zN(e,jN);return Math.min(t,10)}function hm(){if(!rr.store.triggerWhenUnfocused&&!document.hasFocus())return;let e=document.createElement("audio");e.src=rr.store.quality==="HD"?GN:$N,e.volume=rr.store.volume,e.play()}var ym,$N,GN,rr,vm,jN,fb=g(()=>{"use strict";a();$();np();I();Pe();w();x();ym="\u{1F5FF}",$N="https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai.mp3",GN="https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai_hd.wav",rr=L({volume:{description:"Volume of the \u{1F5FF}\u{1F5FF}\u{1F5FF}",type:5,markers:go(0,1,.1),default:.5,stickToMarkers:!1},quality:{description:"Quality of the \u{1F5FF}\u{1F5FF}\u{1F5FF}",type:4,options:[{label:"Normal",value:"Normal",default:!0},{label:"HD",value:"HD"}]},triggerWhenUnfocused:{description:"Trigger the \u{1F5FF} even when the window is unfocused",type:3,default:!0},ignoreBots:{description:"Ignore bots",type:3,default:!0},ignoreBlocked:{description:"Ignore blocked users",type:3,default:!0}}),vm=y({name:"Moyai",authors:[d.Megu,d.Nuckyz],description:"\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}",settings:rr,flux:{async MESSAGE_CREATE({optimistic:e,type:t,message:o,channelId:r}){if(e||t!=="MESSAGE_CREATE"||o.state==="SENDING"||rr.store.ignoreBots&&o.author?.bot||rr.store.ignoreBlocked&&at.isBlocked(o.author?.id)||!o.content||r!==Me.getChannelId())return;let i=WN(o.content);for(let s=0;s<i;s++)hm(),await On(300)},MESSAGE_REACTION_ADD({optimistic:e,type:t,channelId:o,userId:r,messageAuthorId:i,emoji:s}){if(e||t!=="MESSAGE_REACTION_ADD"||rr.store.ignoreBots&&F.getUser(r)?.bot||rr.store.ignoreBlocked&&at.isBlocked(i)||o!==Me.getChannelId())return;let l=s.name.toLowerCase();l!==ym&&!l.includes("moyai")&&!l.includes("moai")||hm()},VOICE_CHANNEL_EFFECT_SEND({emoji:e}){if(!e?.name)return;let t=e.name.toLowerCase();t!==ym&&!t.includes("moyai")&&!t.includes("moai")||hm()}}});jN=/<a?:\w*moy?ai\w*:\d{17,20}>/gi});var qN,Ol,Sm,gb=g(()=>{"use strict";a();$();I();w();W();({updateGuildNotificationSettings:qN}=A("updateGuildNotificationSettings")),Ol=L({guild:{description:"Mute Guild",type:3,default:!0},everyone:{description:"Suppress @everyone and @here",type:3,default:!0},role:{description:"Suppress All Role @mentions",type:3,default:!0}}),Sm=y({name:"MuteNewGuild",description:"Mutes newly joined guilds",authors:[d.Glitch,d.Nuckyz,d.carince],patches:[{find:",acceptInvite(",replacement:{match:/INVITE_ACCEPT_SUCCESS.+?,(\i)=null!==.+?;/,replace:(e,t)=>`${e}$self.handleMute(${t});`}},{find:"{joinGuild:",replacement:{match:/guildId:(\i),lurker:(\i).{0,20}}\)\);/,replace:(e,t,o)=>`${e}if(!${o})$self.handleMute(${t});`}}],settings:Ol,handleMute(e){e==="@me"||e==="null"||e==null||qN(e,{muted:Ol.store.guild,suppress_everyone:Ol.store.everyone,suppress_roles:Ol.store.role})}})});function JN(e){return e.name||e.recipients.map(F.getUser).filter(Xp).map(t=>at.getNickname(t.id)||ZN.getName(t)).join(", ")}var KN,YN,ZN,ir,XN,bm,hb=g(()=>{"use strict";a();I();al();w();W();x();KN=A("selectPrivateChannel"),YN=A("getChannelIconURL"),ZN=A("getGlobalName"),ir=A("emptyIconFriends","emptyIconGuilds"),XN=A("guildNick","guildAvatarWithoutIcon");bm=y({name:"MutualGroupDMs",description:"Shows mutual group dms in profiles",authors:[d.amia],patches:[{find:".Messages.USER_PROFILE_MODAL",replacement:{match:/(?<=\.MUTUAL_GUILDS\}\),)(?=(\i\.bot).{0,20}(\(0,\i\.jsx\)\(.{0,100}id:))/,replace:'($1||arguments[0].isCurrentUser)?null:$2"MUTUAL_GDMS",children:"Mutual Groups"}),'}},{find:".UserProfileSections.USER_INFO_CONNECTIONS:",replacement:{match:/(?<={user:(\i),onClose:(\i)}\);)(?=case \i\.\i\.MUTUAL_FRIENDS)/,replace:'case "MUTUAL_GDMS":return $self.renderMutualGDMs($1,$2);'}}],renderMutualGDMs(e,t){let o=J.getSortedPrivateChannels().filter(r=>r.isGroupDM()&&r.recipients.includes(e.id)).map(r=>n(Zr,{className:ir.listRow,onClick:()=>{t(),KN.selectPrivateChannel(r.id)}},n(Xr,{src:YN.getChannelIconURL({id:r.id,icon:r.icon,size:32}),size:"SIZE_40",className:ir.listAvatar}),n("div",{className:ir.listRowContent},n("div",{className:ir.listName},JN(r)),n("div",{className:XN.guildNick},r.recipients.length+1," Members"))));return n(Yr,{className:ir.listScroller,fade:!0,onClose:t},o.length>0?o:n("div",{className:ir.empty},n("div",{className:ir.emptyIconFriends}),n("div",{className:ir.emptyText},"No group dms in common")))}})});var QN,Tm,yb=g(()=>{"use strict";a();$();I();w();W();QN=A("getRelationships","isBlocked"),Tm=y({name:"NoBlockedMessages",description:"Hides all blocked messages from chat completely.",authors:[d.rushii,d.Samu],patches:[{find:"Messages.BLOCKED_MESSAGES_HIDE",replacement:[{match:/let\{[^}]*collapsedReason[^}]*\}/,replace:"return null;$&"}]},...['displayName="MessageStore"','displayName="ReadStateStore"'].map(e=>({find:e,predicate:()=>E.plugins.NoBlockedMessages.ignoreBlockedMessages===!0,replacement:[{match:/(?<=MESSAGE_CREATE:function\((\i)\){)/,replace:(t,o)=>`if($self.isBlocked(${o}.message))return;`}]}))],options:{ignoreBlockedMessages:{description:"Completely ignores (recent) incoming messages from blocked users (locally).",type:3,default:!1,restartNeeded:!0}},isBlocked:e=>QN.isBlocked(e.author.id)})});var xm,vb=g(()=>{"use strict";a();I();w();xm=y({name:"NoDevtoolsWarning",description:"Disables the 'HOLD UP' banner in the console. As a side effect, also prevents Discord from hiding your token, which prevents random logouts.",authors:[d.Ven],patches:[{find:"setDevtoolsCallbacks",replacement:{match:/if\(null!=\i&&"0.0.0"===\i\.remoteApp\.getVersion\(\)\)/,replace:"if(true)"}}]})});var wm,Sb=g(()=>{"use strict";a();I();w();wm=y({name:"NoF1",description:"Disables F1 help bind.",authors:[d.Cyn],patches:[{find:',"f1"],comboKeysBindGlobal:',replacement:{match:',"f1"],comboKeysBindGlobal:',replace:"],comboKeysBindGlobal:"}}]})});var Mm,bb=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/noMosaic/styles.css",{name:"src/plugins/noMosaic/styles.css",source:`[class^="nonMediaAttachmentsContainer_"] [class*="messageAttachment_"] {
  127. position: relative;
  128. }
  129. `,classNames:{},dom:null});Mm="src/plugins/noMosaic/styles.css"});var Pm,Im,Tb=g(()=>{"use strict";a();$();ot();I();w();bb();Pm=L({inlineVideo:{description:"Play videos without carousel modal",type:3,default:!0,restartNeeded:!0},mediaLayoutType:{description:"Choose media layout type",type:4,restartNeeded:!0,options:[{label:"STATIC, render loading image but image isn't resposive, no problem unless discord window width is too small",value:"STATIC",default:!0},{label:"RESPONSIVE, image is responsive but not render loading image, cause messages shift when loaded",value:"RESPONSIVE"}]}}),Im=y({name:"NoMosaic",authors:[d.AutumnVN],description:"Removes Discord new image mosaic",tags:["image","mosaic","media"],settings:Pm,patches:[{find:".oneByTwoLayoutThreeGrid",replacement:[{match:/mediaLayoutType:\i\.\i\.MOSAIC/,replace:"mediaLayoutType:$self.mediaLayoutType()"},{match:/null!==\(\i=\i\.get\(\i\)\)&&void 0!==\i\?\i:"INVALID"/,replace:'"INVALID"'}]},{find:"renderAttachments(",predicate:()=>Pm.store.inlineVideo,replacement:{match:/url:(\i)\.url\}\);return /,replace:"$&$1.content_type?.startsWith('image/')&&"}},{find:"Messages.REMOVE_ATTACHMENT_TOOLTIP_TEXT",replacement:{match:/\i===\i\.\i\.MOSAIC/,replace:"true"}}],mediaLayoutType(){return Pm.store.mediaLayoutType},start(){Tt(Mm)},stop(){jt(Mm)}})});var VN,Hs,Am,xb=g(()=>{"use strict";a();$();I();w();W();VN=A("getMessageRequestsCount"),Hs=L({hideFriendRequestsCount:{type:3,description:"Hide incoming friend requests count",default:!0,restartNeeded:!0},hideMessageRequestsCount:{type:3,description:"Hide message requests count",default:!0,restartNeeded:!0},hidePremiumOffersCount:{type:3,description:"Hide nitro offers count",default:!0,restartNeeded:!0}}),Am=y({name:"NoPendingCount",description:"Removes the ping count of incoming friend requests, message requests, and nitro offers.",authors:[d.amia],settings:Hs,patches:[{find:"getPendingCount(){",predicate:()=>Hs.store.hideFriendRequestsCount,replacement:{match:/(?<=getPendingCount\(\)\{)/,replace:"return 0;"}},{find:"getMessageRequestsCount(){",predicate:()=>Hs.store.hideMessageRequestsCount,replacement:{match:/(?<=getMessageRequestsCount\(\)\{)/,replace:"return 0;"}},{find:".getSpamChannelsCount(),",predicate:()=>Hs.store.hideMessageRequestsCount,replacement:{match:/(?<=getSpamChannelsCount\(\),\i=)\i\.getMessageRequestsCount\(\)/,replace:"$self.getRealMessageRequestCount()"}},{find:"showProgressBadge:",predicate:()=>Hs.store.hidePremiumOffersCount,replacement:{match:/(?<=\{unviewedTrialCount:(\i),unviewedDiscountCount:(\i)\}.{0,200}\i=)\1\+\2/,replace:"0"}}],getRealMessageRequestCount(){return VN.getMessageRequestChannelIds().size}})});var Nm,wb=g(()=>{"use strict";a();I();w();Nm=y({name:"NoProfileThemes",description:"Completely removes Nitro profile themes",authors:[d.TheKodeToad],patches:[{find:".NITRO_BANNER,",replacement:{match:/=(?=\i\.\i\.isPremiumAtLeast\(null==(\i))/,replace:"=(arguments[0]?.bannerSrc||$1?.banner)&&"}},{find:".avatarPositionPremiumNoBanner,default:",replacement:{match:/\.avatarPositionPremiumNoBanner(?=,default:\i\.(\i))/,replace:".$1"}},{find:"hasThemeColors(){",replacement:{match:/get canUsePremiumProfileCustomization\(\){return /,replace:"$&false &&"}}]})});var Cm,Mb=g(()=>{"use strict";a();I();w();Cm=y({name:"NoRPC",description:"Disables Discord's RPC server.",authors:[d.Cyn],patches:[{find:'.ensureModule("discord_rpc")',replacement:{match:/\.ensureModule\("discord_rpc"\)\.then\(\(.+?\)\)}/,replace:'.ensureModule("discord_rpc")}'}}]})});var Bl,km,Pb=g(()=>{"use strict";a();$();I();w();Bl=L({userList:{description:"List of users to allow or exempt pings for (separated by commas or spaces)",type:0,default:"1234567890123445,1234567890123445"},shouldPingListed:{description:"Behaviour",type:4,options:[{label:"Do not ping the listed users",value:!1},{label:"Only ping the listed users",value:!0,default:!0}]},inverseShiftReply:{description:"Invert Discord's shift replying behaviour (enable to make shift reply mention user)",type:3,default:!1}}),km=y({name:"NoReplyMention",description:"Disables reply pings by default",authors:[d.DustyAngel47,d.axyie,d.pylix,d.outfoxxed],settings:Bl,shouldMention(e,t){let o=Bl.store.userList.includes(e.author.id),r=Bl.store.shouldPingListed?o:!o;return Bl.store.inverseShiftReply?t!==r:!t&&r},patches:[{find:',"Message")}function',replacement:{match:/:(\i),shouldMention:!(\i)\.shiftKey/,replace:":$1,shouldMention:$self.shouldMention($1,$2.shiftKey)"}}]})});var Rm,Ib=g(()=>{"use strict";a();I();w();Rm=y({name:"NoScreensharePreview",description:"Disables screenshare previews from being sent.",authors:[d.Nuckyz],patches:[{find:'"ApplicationStreamPreviewUploadManager"',replacement:{match:/await \i\.\i\.(makeChunkedRequest\(|post\(\{url:)\i\.\i\.STREAM_PREVIEW.+?\}\)/g,replace:"0"}}]})});var Dm,Ab=g(()=>{"use strict";a();I();w();Dm=y({name:"NoSystemBadge",description:"Disables the taskbar and system tray unread count badge.",authors:[d.rushii],patches:[{find:",setSystemTrayApplications",replacement:[{match:/setBadge\(\i\).+?},/,replace:"setBadge(){},"},{match:/setSystemTrayIcon\(\i\).+?},/,replace:"setSystemTrayIcon(){},"}]}]})});var Lm,Nb=g(()=>{"use strict";a();I();w();Lm=y({name:"NoTypingAnimation",authors:[d.AutumnVN],description:"Disables the CPU-intensive typing dots animation",patches:[{find:"dotCycle",replacement:{match:/document.hasFocus\(\)/,replace:"false"}}]})});var Em,Cb=g(()=>{"use strict";a();I();w();Em=y({name:"NoUnblockToJump",description:"Allows you to jump to messages of blocked users without unblocking them",authors:[d.dzshn],patches:[{find:'.id,"Search Results"',replacement:{match:/if\(.{1,10}\)(.{1,10}\.show\({.{1,50}UNBLOCK_TO_JUMP_TITLE)/,replace:"if(false)$1"}},{find:"renderJumpButton()",replacement:{match:/if\(.{1,10}\)(.{1,10}\.show\({.{1,50}UNBLOCK_TO_JUMP_TITLE)/,replace:"if(false)$1"}},{find:"flash:!0,returnMessageId",replacement:{match:/.\?(.{1,10}\.show\({.{1,50}UNBLOCK_TO_JUMP_TITLE)/,replace:"false?$1"}}]})});var _m,kb=g(()=>{"use strict";a();I();w();_m=y({name:"NormalizeMessageLinks",description:"Strip canary/ptb from message links",authors:[d.bb010g],patches:[{find:".Messages.COPY_MESSAGE_LINK,",replacement:{match:/\.concat\(location\.host\)/,replace:".concat($self.normalizeHost(location.host))"}}],normalizeHost(e){return e.replace(/(^|\b)(canary\.|ptb\.)(discord.com)$/,"$1$3")}})});var eC,Om,Rb=g(()=>{"use strict";a();$();I();w();eC=L({notificationVolume:{type:5,description:"Notification volume",markers:[0,25,50,75,100],default:100,stickToMarkers:!1}}),Om=y({name:"NotificationVolume",description:"Save your ears and set a separate volume for notifications and in-app sounds",authors:[d.philipbry],settings:eC,patches:[{find:"_ensureAudio(){",replacement:{match:/onloadeddata=\(\)=>\{.\.volume=/,replace:"$&$self.settings.store.notificationVolume/100*"}}]})});var Bm,Db=g(()=>{"use strict";a();I();w();Bm=y({name:"NSFWGateBypass",description:"Allows you to access NSFW channels without setting/verifying your age",authors:[d.Commandtechno],patches:[{find:".nsfwAllowed=null",replacement:{match:/(\w+)\.nsfwAllowed=/,replace:"$1.nsfwAllowed=true;"}}]})});var zs,Fm,Lb=g(()=>{"use strict";a();$();I();w();x();zs=L({channelToAffect:{type:4,description:"Select the type of DM for the plugin to affect",options:[{label:"Both",value:"both_dms",default:!0},{label:"User DMs",value:"user_dm"},{label:"Group DMs",value:"group_dm"}]},allowMentions:{type:3,description:"Receive audio pings for @mentions",default:!1},allowEveryone:{type:3,description:"Receive audio pings for @everyone and @here in group DMs",default:!1}}),Fm=y({name:"OnePingPerDM",description:"If unread messages are sent by a user in DMs multiple times, you'll only receive one audio ping. Read the messages to reset the limit",authors:[d.ProffDea],settings:zs,patches:[{find:".getDesktopType()===",replacement:[{match:/(\i\.\i\.getDesktopType\(\)===\i\.\i\.NEVER)\)/,replace:"$&if(!$self.isPrivateChannelRead(arguments[0]?.message))return;else "},{match:/sound:(\i\?\i:void 0,volume:\i,onClick)/,replace:"sound:!$self.isPrivateChannelRead(arguments[0]?.message)?undefined:$1"}]}],isPrivateChannelRead(e){let t=J.getChannel(e.channel_id)?.type;return t!==1&&t!==3||t===1&&zs.store.channelToAffect==="group_dm"||t===3&&zs.store.channelToAffect==="user_dm"||zs.store.allowMentions&&e.mentions.some(o=>o.id===F.getCurrentUser().id)||zs.store.allowEveryone&&e.mention_everyone?!0:Sr.getOldestUnreadMessageId(e.channel_id)===e.id}})});var Um,Eb=g(()=>{"use strict";a();I();w();Um=y({name:"oneko",description:"cat follow mouse (real)",authors:[d.Ven,d.adryd],start(){fetch("https://raw.githubusercontent.com/adryd325/oneko.js/8fa8a1864aa71cd7a794d58bc139e755e96a236c/oneko.js").then(e=>e.text()).then(e=>e.replace("./oneko.gif","https://raw.githubusercontent.com/adryd325/oneko.js/14bab15a755d0e35cd4ae19c931d96d306f99f42/oneko.gif")).then(eval)},stop(){document.getElementById("oneko")?.remove()}})});var tC,oC,nC,rC,Pi,iC,$m,_b=g(()=>{"use strict";a();$();I();w();x();tC=/^https:\/\/(spotify\.link|s\.team)\/.+$/,oC=/^https:\/\/open\.spotify\.com\/(track|album|artist|playlist|user|episode)\/(.+)(?:\?.+?)?$/,nC=/^https:\/\/(steamcommunity\.com|(?:help|store)\.steampowered\.com)\/.+$/,rC=/^https:\/\/store\.epicgames\.com\/(.+)$/,Pi=L({spotify:{type:3,description:"Open Spotify links in the Spotify app",default:!0},steam:{type:3,description:"Open Steam links in the Steam app",default:!0},epic:{type:3,description:"Open Epic Games links in the Epic Games Launcher",default:!0}}),iC=VencordNative.pluginHelpers.OpenInApp,$m=y({name:"OpenInApp",description:"Open Spotify, Steam and Epic Games URLs in their respective apps instead of your browser",authors:[d.Ven],settings:Pi,patches:[{find:"trackAnnouncementMessageLinkClicked({",replacement:{match:/(?<=handleClick:function\(\)\{return (\i)\}.+?)function \1\(.+?\)\{/,replace:"async $& if(await $self.handleLink(...arguments)) return;"}},{find:"WEB_OPEN(",predicate:()=>!1,replacement:{match:/\i\.\i\.isProtocolRegistered\(\)(.{0,100})window.open/g,replace:"true$1VencordNative.native.openExternal"}},{find:".CONNECTED_ACCOUNT_VIEWED,",replacement:{match:/(?<=href:\i,onClick:\i=>\{)(?=.{0,10}\i=(\i)\.type,.{0,100}CONNECTED_ACCOUNT_VIEWED)/,replace:"$self.handleAccountView(arguments[0],$1.type,$1.id);"}}],async handleLink(e,t){if(!e)return!1;let o=e.href;tC.test(o)&&(t?.preventDefault(),o=await iC.resolveRedirect(o));e:{if(!Pi.store.spotify)break e;let r=oC.exec(o);if(!r)break e;let[,i,s]=r;return VencordNative.native.openExternal(`spotify:${i}:${s}`),t?.preventDefault(),!0}e:{if(!Pi.store.steam||!nC.test(o))break e;return VencordNative.native.openExternal(`steam://openurl/${o}`),t?.preventDefault(),$t("Opened link in Steam",oe.Type.SUCCESS),!0}e:{if(!Pi.store.epic)break e;let r=rC.exec(o);if(!r)break e;return VencordNative.native.openExternal(`com.epicgames.launcher://store/${r[1]}`),t?.preventDefault(),!0}return t?.defaultPrevented?(window.open(o,"_blank"),!0):!1},handleAccountView(e,t,o){t==="spotify"&&Pi.store.spotify?(VencordNative.native.openExternal(`spotify:user:${o}`),e.preventDefault()):t==="steam"&&Pi.store.steam&&(VencordNative.native.openExternal(`steam://openurl/https://steamcommunity.com/profiles/${o}`),$t("Opened link in Steam",oe.Type.SUCCESS),e.preventDefault())}})});function Bb(e){B.dispatch({type:"POGGERMODE_SETTINGS_UPDATE",settings:{enabled:e,settingsVisible:e}})}function Fb(e){let t={screenshakeEnabledLocations:{0:!0,1:!0,2:!0},shakeIntensity:1,confettiSize:16,confettiCount:5,combosRequiredCount:1};switch(e){case 0:{Object.assign(t,{screenshakeEnabledLocations:{0:!0,1:!1,2:!1},combosRequiredCount:5});break}case 1:{Object.assign(t,{confettiSize:12,confettiCount:8});break}case 2:{Object.assign(t,{shakeIntensity:20,confettiSize:25,confettiCount:15});break}}B.dispatch({type:"POGGERMODE_SETTINGS_UPDATE",settings:t})}var Ob,Gm,Ub=g(()=>{"use strict";a();$();I();w();x();Ob=L({superIntensePartyMode:{description:"Party intensity",type:4,options:[{label:"Normal",value:0,default:!0},{label:"Better",value:1},{label:"Project X",value:2}],restartNeeded:!1,onChange:Fb}}),Gm=y({name:"Party mode \u{1F389}",description:"Allows you to use party mode cause the party never ends \u2728",authors:[d.UwUDev],settings:Ob,start(){Bb(!0),Fb(Ob.store.superIntensePartyMode)},stop(){Bb(!1)}})});var Hm,zm,$b=g(()=>{"use strict";a();$();I();w();Hm=L({lockout:{type:3,default:!0,description:`Bypass the permission lockout prevention ("Pretty sure you don't want to do this")`,restartNeeded:!0},onboarding:{type:3,default:!0,description:'Bypass the onboarding requirements ("Making this change will make your server incompatible [...]")',restartNeeded:!0}}),zm=y({name:"PermissionFreeWill",description:"Disables the client-side restrictions for channel permission management.",authors:[d.lewisakura],patches:[{find:".showPermissionLockoutModal(",replacement:[{match:/case"DENY":.{0,50}if\((?=\i\.\i\.can)/,replace:"$&true||"}],predicate:()=>Hm.store.lockout},{find:".ONBOARDING_CHANNEL_THRESHOLD_WARNING",replacement:[{match:/(?<=(?:isDefaultChannelThresholdMetAfterDelete|checkDefaultChannelThresholdMetAfterChannelPermissionDeny):function\(\)\{)return \i(?=\})/g,replace:"return () => true"}],predicate:()=>Hm.store.onboarding}],settings:Hm})});var Gb=g(()=>{});function sC(e){return hn(e.toLowerCase().split("_"))}function Fl(e){return e=Hb[e]||e,Qe.Messages[e]||sC(e)}function zb(e){e==="USE_APPLICATION_COMMANDS"?e="USE_APPLICATION_COMMANDS_GUILD":e==="SEND_VOICE_MESSAGES"?e="SEND_VOICE_MESSAGE_GUILD":e!=="STREAM"&&(e=Hb[e]||e);let t=Qe.Messages[`ROLE_PERMISSIONS_${e}_DESCRIPTION`];return t?.hasMarkdown?_e.parse(t.message):typeof t=="string"?t:""}function Ul({roles:e,id:t},o){return[...o.roles,t].map(r=>e[r]).sort((r,i)=>i.position-r.position)}function jb(e){switch(sr.store.permissionsSortOrder){case 0:return e.sort((t,o)=>o.position-t.position);case 1:return e.sort((t,o)=>t.position-o.position);default:return e}}function $l(e,t){let o=pe.getGuild(t);return e.sort((r,i)=>{if(r.type!==0||i.type!==0)return 0;let s=o.roles[r.id];return o.roles[i.id].position-s.position})}var Zt,Hb,js=g(()=>{"use strict";a();ot();yn();x();qs();Ws();Zt=Be("vc-permviewer-");Hb={MANAGE_GUILD:"MANAGE_SERVER",MANAGE_GUILD_EXPRESSIONS:"MANAGE_EXPRESSIONS",CREATE_GUILD_EXPRESSIONS:"CREATE_EXPRESSIONS",MODERATE_MEMBERS:"MODERATE_MEMBER",STREAM:"VIDEO",SEND_VOICE_MESSAGES:"ROLE_PERMISSIONS_SEND_VOICE_MESSAGE"}});function jm(){return n("svg",{height:"24",width:"24",viewBox:"0 0 24 24"},n("title",null,"Denied"),n("path",{fill:"var(--status-danger)",d:"M18.4 4L12 10.4L5.6 4L4 5.6L10.4 12L4 18.4L5.6 20L12 13.6L18.4 20L20 18.4L13.6 12L20 5.6L18.4 4Z"}))}function Wm(){return n("svg",{height:"24",width:"24",viewBox:"0 0 24 24"},n("title",null,"Allowed"),n("path",{fill:"var(--text-positive)",d:"M8.99991 16.17L4.82991 12L3.40991 13.41L8.99991 19L20.9999 7.00003L19.5899 5.59003L8.99991 16.17ZZ"}))}function qb(){return n("svg",{height:"24",width:"24",viewBox:"0 0 16 16"},n("g",null,n("title",null,"Not overwritten"),n("polygon",{fill:"var(--text-normal)",points:"12 2.32 10.513 2 4 13.68 5.487 14"})))}var Kb=g(()=>{"use strict";a()});function lC(e,t,o){return Ne(r=>n(pC,{modalProps:r,permissions:e,guild:t,header:o}))}function cC({permissions:e,guild:t,modalProps:o,header:r}){e.sort((c,u)=>c.type-u.type),Ke([Ee],()=>Ee.getMemberIds(t.id),null,(c,u)=>c.length===u.length),ue(()=>{let c=e.filter(u=>u.type===1&&!Ee.isMember(t.id,u.id)).map(({id:u})=>u);B.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[t.id],userIds:c})},[]);let[i,s]=X(0),l=e[i];return n(Oe,{...o,size:"large"},n(tt,null,n(Q,{className:Zt("perms-title"),variant:"heading-lg/semibold"},r," permissions:"),n(_t,{onClick:o.onClose})),n(Ye,null,!l&&n("div",{className:Zt("perms-no-perms")},n(Q,{variant:"heading-lg/normal"},"No permissions to display!")),l&&n("div",{className:Zt("perms-container")},n("div",{className:Zt("perms-list")},e.map((c,u)=>{let p=F.getUser(c.id??""),m=t.roles[c.id??""];return n("button",{className:Zt("perms-list-item-btn"),onClick:()=>s(u)},n("div",{className:Zt("perms-list-item",{"perms-list-item-active":i===u}),onContextMenu:h=>{sr.store.unsafeViewAsRole&&c.type===0&&Ut.openContextMenu(h,()=>n(uC,{guild:t,roleId:c.id,onClose:o.onClose}))}},(c.type===0||c.type===2)&&n("span",{className:Zt("perms-role-circle"),style:{backgroundColor:m?.colorString??"var(--primary-300)"}}),c.type===1&&p!==void 0&&n("img",{className:Zt("perms-user-img"),src:p.getAvatarURL(void 0,void 0,!1)}),n(Q,{variant:"text-md/normal"},c.type===0?m?.name??"Unknown Role":c.type===1?(p&&Sn(p))??"Unknown User":n(ce,{style:{gap:"0.2em",justifyItems:"center"}},"@owner",n(iv,{height:18,width:18,"aria-hidden":"true"})))))})),n("div",{className:Zt("perms-perms")},Object.entries(Te).map(([c,u])=>n("div",{className:Zt("perms-perms-item")},n("div",{className:Zt("perms-perms-item-icon")},(()=>{let{permissions:p,overwriteAllow:m,overwriteDeny:h}=l;return p?(p&u)===u?Wm():jm():m&&(m&u)===u?Wm():h&&(h&u)===u?jm():qb()})()),n(Q,{variant:"text-md/normal"},Fl(c)),n(ee,{text:zb(c)||"No Description"},p=>n(Ya,{...p}))))))))}function uC({guild:e,roleId:t,onClose:o}){return n(G.Menu,{navId:Zt("role-context-menu"),onClose:Ut.closeContextMenu,"aria-label":"Role Options"},n(G.MenuItem,{id:"vc-pw-view-as-role",label:"View As Role",action:()=>{let r=e.roles[t];!r||(o(),B.dispatch({type:"IMPERSONATE_UPDATE",guildId:e.id,data:{type:"ROLES",roles:{[t]:r}}}))}}))}var pC,Ii,Ws=g(()=>{"use strict";a();le();Ct();Dt();nt();st();x();qs();js();Kb();pC=U.wrap(cC),Ii=lC});var Yb=g(()=>{});function Km({children:e,onMoreClick:t,buttons:o,moreTooltipText:r,defaultState:i=!1,onDropDownClick:s,headerText:l}){let[c,u]=X(i);return n(f,null,n("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"8px"}},n(Q,{tag:"h2",variant:"eyebrow",style:{color:"var(--header-primary)",display:"inline"}},l),n("div",{className:qm("center-flex")},o??null,t&&n(ee,{text:r},p=>n("button",{...p,className:qm("btn"),onClick:t},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},n("path",{fill:"var(--text-normal)",d:"M7 12.001C7 10.8964 6.10457 10.001 5 10.001C3.89543 10.001 3 10.8964 3 12.001C3 13.1055 3.89543 14.001 5 14.001C6.10457 14.001 7 13.1055 7 12.001ZM14 12.001C14 10.8964 13.1046 10.001 12 10.001C10.8954 10.001 10 10.8964 10 12.001C10 13.1055 10.8954 14.001 12 14.001C13.1046 14.001 14 13.1055 14 12.001ZM19 10.001C20.1046 10.001 21 10.8964 21 12.001C21 13.1055 20.1046 14.001 19 14.001C17.8954 14.001 17 13.1055 17 12.001C17 10.8964 17.8954 10.001 19 10.001Z"})))),n(ee,{text:c?"Hide "+l:"Show "+l},p=>n("button",{...p,className:qm("btn"),onClick:()=>{u(m=>!m),s?.(c)}},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24",transform:c?"scale(1 -1)":"scale(1 1)"},n("path",{fill:"var(--text-normal)",d:"M16.59 8.59003L12 13.17L7.41 8.59003L6 10L12 16L18 10L16.59 8.59003Z"})))))),c&&e)}var qm,Zb=g(()=>{"use strict";a();ot();x();Yb();qm=Be("vc-expandableheader-")});function mC({guild:e,guildMember:t,showBorder:o}){let r=sr.use(["permissionsSortOrder"]),[i,s]=St(()=>{let b=[],P=Ul(e,t),k=P.map(M=>({type:0,...M}));if(e.ownerId===t.userId){k.push({type:2,permissions:Object.values(Te).reduce((O,H)=>O|H,0n)});let M=Qe.Messages.GUILD_OWNER||"Server Owner";b.push({permission:M,roleColor:"var(--primary-300)",rolePosition:1/0})}jb(P);for(let[M,O]of Object.entries(Te))for(let{permissions:H,colorString:Z,position:K}of P)if((H&O)===O){b.push({permission:Fl(M),roleColor:Z||"var(--primary-300)",rolePosition:K});break}return b.sort((M,O)=>O.rolePosition-M.rolePosition),[k,b]},[r.permissionsSortOrder]),{root:l,role:c,roleRemoveButton:u,roleNameOverflow:p,roles:m,rolePill:h,rolePillBorder:v,roleCircle:T,roleName:N}=dC;return n(Km,{headerText:"Permissions",moreTooltipText:"Role Details",onMoreClick:()=>Ii(i,e,t.nick||F.getUser(t.userId).username),defaultState:sr.store.defaultPermissionsDropdownState,buttons:[n(ee,{text:`Sorting by ${r.permissionsSortOrder===0?"Highest Role":"Lowest Role"}`},b=>n("button",{...b,className:Zt("userperms-sortorder-btn"),onClick:()=>{r.permissionsSortOrder=r.permissionsSortOrder===0?1:0}},n("svg",{width:"20",height:"20",viewBox:"0 96 960 960",transform:r.permissionsSortOrder===0?"scale(1 1)":"scale(1 -1)"},n("path",{fill:"var(--text-normal)",d:"M440 896V409L216 633l-56-57 320-320 320 320-56 57-224-224v487h-80Z"}))))]},s.length>0&&n("div",{className:te(l,m)},s.map(({permission:b,roleColor:P})=>n("div",{className:te(c,h,o?v:null)},n("div",{className:u},n("span",{className:T,style:{backgroundColor:P}})),n("div",{className:N},n(Q,{className:p,variant:"text-xs/medium"},b))))))}var dC,Xb,Jb=g(()=>{"use strict";a();le();Zb();Pe();W();x();qs();js();Ws();dC=Ao(()=>Object.assign({},...zi(Ae.byProps("roles","rolePill","rolePillBorder"),Ae.byProps("roleCircle","dotBorderBase","dotBorderColor"),Ae.byProps("roleNameOverflow","root","roleName","roleRemoveButton"))));Xb=U.wrap(mC,{noop:!0})});function Ym(e,t,o){return o===0&&!Ee.isMember(e,t)?null:n(G.MenuItem,{id:"perm-viewer-permissions",label:"Permissions",action:()=>{let r=pe.getGuild(e),i,s;switch(o){case 0:{let l=Ee.getMember(e,t);i=Ul(r,l).map(c=>({type:0,...c})),r.ownerId===t&&i.push({type:2,permissions:Object.values(Te).reduce((c,u)=>c|u,0n)}),s=l.nick??F.getUser(l.userId).username;break}case 1:{let l=J.getChannel(t);i=$l(Object.values(l.permissionOverwrites).map(({id:c,allow:u,deny:p,type:m})=>({type:m,id:c,overwriteAllow:u,overwriteDeny:p})),e),s=l.name;break}default:{i=Object.values(r.roles).map(l=>({type:0,...l})),s=r.name;break}}Ii(i,r,s)}})}function Zm(e,t){return(o,r)=>()=>{if(!r||t===0&&!r.user||t===2&&!r.guild)return o;let i=ft(e,o),s=(()=>{switch(t){case 0:return Ym(r.guildId,r.user.id,t);case 1:return Ym(r.guild.id,r.channel.id,t);case 2:return Ym(r.guild.id);default:return null}})();s!=null&&(i?i.push(s):e==="roles"&&r.guildId&&o.splice(-1,0,n(G.MenuGroup,null,s)))}}var sr,Xm,qs=g(()=>{"use strict";a();Gb();kt();$();I();w();x();Ws();Jb();js();sr=L({permissionsSortOrder:{description:"The sort method used for defining which role grants an user a certain permission",type:4,options:[{label:"Highest Role",value:0,default:!0},{label:"Lowest Role",value:1}]},defaultPermissionsDropdownState:{description:"Whether the permissions dropdown on user popouts should be open by default",type:3,default:!1}});Xm=y({name:"PermissionsViewer",description:"View the permissions a user or channel has, and the roles of a server",authors:[d.Nuckyz,d.Ven],settings:sr,patches:[{find:".popularApplicationCommandIds,",replacement:{match:/showBorder:(.{0,60})}\),(?<=guild:(\i),guildMember:(\i),.+?)/,replace:(e,t,o,r)=>`${e}$self.UserPermissions(${o},${r},${t}),`}}],UserPermissions:(e,t,o)=>!!t&&n(Xb,{guild:e,guildMember:t,showBorder:o}),userContextMenuPatch:Zm("roles",0),channelContextMenuPatch:Zm(["mute-channel","unmute-channel"],1),guildContextMenuPatch:Zm("privacy",2),start(){de("user-context",this.userContextMenuPatch),de("channel-context",this.channelContextMenuPatch),de(["guild-context","guild-header-popout"],this.guildContextMenuPatch)},stop(){ge("user-context",this.userContextMenuPatch),ge("channel-context",this.channelContextMenuPatch),ge(["guild-context","guild-header-popout"],this.guildContextMenuPatch)}})});function Vb(e){let t=e instanceof File,o=t?URL.createObjectURL(e):e;return new Promise((r,i)=>{let s=new Image;s.onload=()=>{t&&URL.revokeObjectURL(o),r(s)},s.onerror=(l,c,u,p,m)=>i(m||l),s.crossOrigin="Anonymous",s.src=o})}async function vC(e,t,o){for(let r of e)switch(r.name){case"image":let i=yC.getUploads(t.channel.id,Qb)[0];if(i){if(!i.isImage)throw"Upload is not an image";return i.item.file}break;case"url":return r.value;case"user":try{return(await Nt.getUser(r.value)).getAvatarURL(o?void 0:t.guild?.id,2048).replace(/\?size=\d+$/,"?size=2048")}catch(s){throw console.error(`[petpet] Failed to fetch user
  130. `,s),"Failed to fetch user. Check the console for more info."}}return null}var Ai,Qb,fC,gC,Gl,hC,yC,Jm,eT=g(()=>{"use strict";a();so();I();zo();w();W();x();Ai=da(xd()),Qb=0,fC=20,gC=128,Gl=10,hC=En(()=>Promise.all(Array.from({length:Gl},(e,t)=>Vb(`https://raw.githubusercontent.com/VenPlugs/petpet/main/frames/pet${t}.gif`)))),yC=A("getUploads");Jm=y({name:"petpet",description:"Adds a /petpet slash command to create headpet gifs from any image",authors:[d.Ven],dependencies:["CommandsAPI"],commands:[{inputType:0,name:"petpet",description:"Create a petpet gif. You can only specify one of the image options",options:[{name:"delay",description:"The delay between each frame. Defaults to 20.",type:4},{name:"resolution",description:"Resolution for the gif. Defaults to 120. If you enter an insane number and it freezes Discord that's your fault.",type:4},{name:"image",description:"Image attachment to use",type:11},{name:"url",description:"URL to fetch image from",type:3},{name:"user",description:"User whose avatar to use as image",type:6},{name:"no-server-pfp",description:"Use the normal avatar instead of the server specific one when using the 'user' option",type:5}],execute:async(e,t)=>{let o=await hC(),r=ct(e,"no-server-pfp",!1);try{var i=await vC(e,t,r);if(!i)throw"No Image specified!"}catch(v){me(t.channel.id,{content:String(v)});return}let s=await Vb(i),l=ct(e,"delay",fC),c=ct(e,"resolution",gC),u=(0,Ai.GIFEncoder)(),p=document.createElement("canvas");p.width=p.height=c;let m=p.getContext("2d");for(let v=0;v<Gl;v++){m.clearRect(0,0,p.width,p.height);let T=v<Gl/2?v:Gl-v,N=.8+T*.02,b=.8-T*.05,P=(1-N)*.5+.1,k=1-b-.08;m.drawImage(s,P*c,k*c,N*c,b*c),m.drawImage(o[v],0,0,c,c);let{data:M}=m.getImageData(0,0,c,c),O=(0,Ai.quantize)(M,256),H=(0,Ai.applyPalette)(M,O);u.writeFrame(H,c,c,{transparent:!0,palette:O,delay:l})}u.finish();let h=new File([u.bytesView()],"petpet.gif",{type:"image/gif"});setTimeout(()=>Ji.promptToUpload([h],t.channel,Qb),10)}}]})});var tT=g(()=>{});var oT,Qm,nT=g(()=>{"use strict";a();tT();$();le();I();w();x();oT=L({loop:{description:"Whether to make the PiP video loop or not",type:3,default:!0,restartNeeded:!1}}),Qm=y({name:"PictureInPicture",description:"Adds picture in picture to videos (next to the Download button)",authors:[d.Lumap],settings:oT,patches:[{find:".nonMediaAttachment]",replacement:{match:/\.nonMediaAttachment\]:!(\i).{0,10}children:\[(\S)/,replace:"$&,$1&&$2&&$self.renderPiPButton(),"}}],renderPiPButton:U.wrap(()=>n(ee,{text:"Toggle Picture in Picture"},e=>n("div",{...e,className:"vc-pip-button",role:"button",style:{cursor:"pointer",paddingTop:"4px",paddingLeft:"4px",paddingRight:"4px"},onClick:t=>{let o=t.currentTarget.parentNode.parentNode.querySelector("video"),r=document.body.appendChild(o.cloneNode(!0));r.loop=oT.store.loop,r.style.display="none",r.onleavepictureinpicture=()=>r.remove();function i(){r.currentTime=o.currentTime,r.requestPictureInPicture(),o.pause(),r.play()}r.readyState===4?i():r.onloadedmetadata=i}},n("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M21 3a1 1 0 0 1 1 1v7h-2V5H4v14h6v2H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h18zm0 10a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1v-6a1 1 0 0 1 1-1h8zm-1 2h-6v4h6v-4z"})))),{noop:!0})})});function sT(){return pt(["plugins.PinDMs.pinnedDMs"]),Hl()}function Ni(e){return Hl().has(e)}function aT(e){let t=Hl();t.delete(e)||t.add(e),iT([...t])}function ef(){return Hl(),Ks.store.pinOrder===0?SC.getPrivateChannelIds().filter(Ni):rn}function lT(e){return ef()[e]}function tf(e,t){let o=rT(),r=o.indexOf(e),i=r+t;[o[r],o[i]]=[o[i],o[r]],iT(o)}var Ks,SC,rn,Vm,rT,iT,bC,Hl,of=g(()=>{"use strict";a();$();w();W();Ks=L({pinOrder:{type:4,description:"Which order should pinned DMs be displayed in?",options:[{label:"Most recent message",value:0,default:!0},{label:"Custom (right click channels to reorder)",value:1}]}}),SC=we("PrivateChannelSortStore"),rT=()=>(E.plugins.PinDMs.pinnedDMs||void 0)?.split(","),iT=e=>{Vm=void 0,E.plugins.PinDMs.pinnedDMs=e.join(",")},bC=()=>(rn=rT()??[],Vm=new Set(rn)),Hl=()=>Vm??bC()});function cT(e){let t=Ni(e),o=t&&Ks.store.pinOrder===1;return n(f,null,n(G.MenuItem,{id:"pin-dm",label:t?"Unpin DM":"Pin DM",action:()=>aT(e)}),o&&rn[0]!==e&&n(G.MenuItem,{id:"move-pin-up",label:"Move Pin Up",action:()=>tf(e,-1)}),o&&rn[rn.length-1]!==e&&n(G.MenuItem,{id:"move-pin-down",label:"Move Pin Down",action:()=>tf(e,1)}))}function dT(){de("gdm-context",uT),de("user-context",pT)}function mT(){ge("gdm-context",uT),ge("user-context",pT)}var uT,pT,fT=g(()=>{"use strict";a();kt();x();of();uT=(e,t)=>()=>{let o=ft("leave-channel",e);o&&o.unshift(cT(t.channel.id))},pT=(e,t)=>()=>{let o=ft("close-dm",e);if(o){let r=o.findIndex(i=>i?.props?.id==="close-dm");o.splice(r,0,cT(t.channel.id))}}});var nf,gT=g(()=>{"use strict";a();I();w();fT();of();nf=y({name:"PinDMs",description:"Allows you to pin private channels to the top of your DM list. To pin/unpin or reorder pins, right click DMs",authors:[d.Ven,d.Strencher],settings:Ks,start:dT,stop:mT,usePinCount(e){let t=sT();return e.length?[t.size]:[]},getChannel(e,t){return e[lT(t)]},isPinned:Ni,getSnapshot:ef,getScrollOffset(e,t,o,r,i){return Ni(e)?t*(rn.indexOf(e)+r)+o:(t+o)*2+t*rn.length+i},patches:[{find:".privateChannelsHeaderContainer,",replacement:[{match:/(?<=\i,{channels:\i,)privateChannelIds:(\i),/,replace:"privateChannelIds:$1.filter(c=>!$self.isPinned(c)),pinCount:$self.usePinCount($1),"},{match:/(?<=renderRow:this\.renderRow,)sections:\[\i,/,replace:"$&...this.props.pinCount??[],"},{match:/children:(\i\.\i\.Messages.DIRECT_MESSAGES)(?<=renderSection=(\i)=>{.+?)/,replace:"children:$2.section===1?'Pinned DMs':$1"},{match:/(?<=renderDM=\((\i),(\i)\)=>{.*?this.state,\i=\i\[\i\],\i=)((\i)\[\i\]);/,replace:"$1===1?$self.getChannel($4,$2):$3;"},{match:/(?<=getRowHeight=\(.{2,50}?)1===\i/,replace:"$&-1"},{match:/(?<=scrollTo\(\{to:\i\}\):\(\i\+=)(\d+)\*\(.+?(?=,)/,replace:"$self.getScrollOffset(arguments[0],$1,this.props.padding,this.state.preRenderedChildren,$&)"}]},{find:".Routes.APPLICATION_STORE&&",replacement:{match:/(?<=\i=__OVERLAY__\?\i:\[\.\.\.\i\(\),\.\.\.)\i/,replace:"$self.getSnapshot().concat($&.filter(c=>!$self.isPinned(c)))"}},{find:".getFlattenedGuildIds()],",replacement:{match:/(?<=\i===\i\.ME\?)\i\.\i\.getPrivateChannelIds\(\)/,replace:"$self.getSnapshot().concat($&.filter(c=>!$self.isPinned(c)))"}}]})});var rf,hT=g(()=>{"use strict";a();I();w();rf=y({name:"PlainFolderIcon",description:"Doesn't show the small guild icons in folders",authors:[d.botato],patches:[{find:".expandedFolderIconWrapper",replacement:[{match:/\(\w\|\|\w\)&&(\(.{0,40}\(.{1,3}\.animated)/,replace:"$1"}]}]})});var lf={};ze(lf,{__getDecorators:()=>TC,addDecorator:()=>sf,decorators:()=>zl,removeDecorator:()=>af});function sf(e,t,o){zl.set(e,{decorator:t,onlyIn:o})}function af(e){zl.delete(e)}function TC(e){let t=!!e.guildId;return Array.from(zl.values(),o=>{let{decorator:r,onlyIn:i}=o;return!i||i==="guilds"&&t||i==="dms"&&!t?r(e):null})}var zl,cf=g(()=>{"use strict";a();zl=new Map});var df={};ze(df,{__addDecorationsToMessage:()=>xC,addDecoration:()=>uf,decorations:()=>jl,removeDecoration:()=>pf});function uf(e,t){jl.set(e,t)}function pf(e){jl.delete(e)}function xC(e){return[...jl.values()].map(t=>t(e))}var jl,mf=g(()=>{"use strict";a();jl=new Map});function Wl(e,t){return({color:o,tooltip:r,small:i})=>n(ee,{text:r},s=>n("svg",{...s,height:(t?.height??20)-(i?3:0),width:(t?.width??20)-(i?3:0),viewBox:t?.viewBox??"0 0 24 24",fill:o},n("path",{d:e})))}var wC,yT,MC,PC,IC,gf,vT,ff,hf,ST=g(()=>{"use strict";a();Da();cf();mf();$();le();I();w();W();x();wC=we("SessionsStore");yT={desktop:Wl("M4 2.5c-1.103 0-2 .897-2 2v11c0 1.104.897 2 2 2h7v2H7v2h10v-2h-4v-2h7c1.103 0 2-.896 2-2v-11c0-1.103-.897-2-2-2H4Zm16 2v9H4v-9h16Z"),web:Wl("M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2Zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93Zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39Z"),mobile:Wl("M 187 0 L 813 0 C 916.277 0 1000 83.723 1000 187 L 1000 1313 C 1000 1416.277 916.277 1500 813 1500 L 187 1500 C 83.723 1500 0 1416.277 0 1313 L 0 187 C 0 83.723 83.723 0 187 0 Z M 125 1000 L 875 1000 L 875 250 L 125 250 Z M 500 1125 C 430.964 1125 375 1180.964 375 1250 C 375 1319.036 430.964 1375 500 1375 C 569.036 1375 625 1319.036 625 1250 C 625 1180.964 569.036 1125 500 1125 Z",{viewBox:"0 0 1000 1500",height:17,width:17}),console:Wl("M14.8 2.7 9 3.1V47h3.3c1.7 0 6.2.3 10 .7l6.7.6V2l-4.2.2c-2.4.1-6.9.3-10 .5zm1.8 6.4c1 1.7-1.3 3.6-2.7 2.2C12.7 10.1 13.5 8 15 8c.5 0 1.2.5 1.6 1.1zM16 33c0 6-.4 10-1 10s-1-4-1-10 .4-10 1-10 1 4 1 10zm15-8v23.3l3.8-.7c2-.3 4.7-.6 6-.6H43V3h-2.2c-1.3 0-4-.3-6-.6L31 1.7V25z",{viewBox:"0 0 50 50"})},MC=A("useStatusFillColor","StatusTypes"),PC=({platform:e,status:t,small:o})=>{let r=e[0].toUpperCase()+e.slice(1),i=yT[e]??yT.desktop;return n(i,{color:MC.useStatusFillColor(t),tooltip:r,small:o})},IC=e=>qo.getState()?.clientStatuses?.[e],gf=({user:e,wantMargin:t=!0,wantTopMargin:o=!1,small:r=!1})=>{if(!e||e.bot)return null;if(e.id===F.getCurrentUser().id){let l=wC.getSessions();if(typeof l!="object")return null;let c=Object.values(l).sort(({status:m},{status:h})=>m===h?0:m==="online"?1:h==="online"?-1:m==="idle"?1:h==="idle"?-1:0),u=Object.values(c).reduce((m,h)=>(h.clientInfo.client!=="unknown"&&(m[h.clientInfo.client]=h.status),m),{}),{clientStatuses:p}=qo.getState();p[F.getCurrentUser().id]=u}let i=qo.getState()?.clientStatuses?.[e.id];if(!i)return null;let s=Object.entries(i).map(([l,c])=>n(PC,{key:l,platform:l,status:c,small:r}));return s.length?n("span",{className:"vc-platform-indicator",style:{display:"inline-flex",justifyContent:"center",alignItems:"center",marginLeft:t?4:0,verticalAlign:"top",position:"relative",top:o?2:0,padding:t?0:1,gap:2}},s):null},vT={component:e=>n(gf,{...e,wantMargin:!1}),position:0,shouldShow:e=>!!Object.keys(IC(e.user.id)??{}).length,key:"indicator"},ff={list:{description:"In the member list",onEnable:()=>sf("platform-indicator",e=>n(U,{noop:!0},n(gf,{user:e.user,small:!0}))),onDisable:()=>af("platform-indicator")},badges:{description:"In user profiles, as badges",onEnable:()=>yf(vT),onDisable:()=>vf(vT)},messages:{description:"Inside messages",onEnable:()=>uf("platform-indicator",e=>n(U,{noop:!0},n(gf,{user:e.message?.author,wantTopMargin:!0}))),onDisable:()=>pf("platform-indicator")}},hf=y({name:"PlatformIndicators",description:"Adds platform indicators (Desktop, Mobile, Web...) to users",authors:[d.kemo,d.TheSun,d.Nuckyz,d.Ven],dependencies:["MessageDecorationsAPI","MemberListDecoratorsAPI"],start(){let e=E.plugins.PlatformIndicators,{displayMode:t}=e;t&&(t!=="both"?e[t]=!0:(e.list=!0,e.badges=!0),e.messages=!0,delete e.displayMode),Object.entries(ff).forEach(([o,r])=>{e[o]&&r.onEnable()})},stop(){Object.entries(ff).forEach(([e,t])=>{t.onDisable()})},patches:[{find:".Masks.STATUS_ONLINE_MOBILE",predicate:()=>E.plugins.PlatformIndicators.colorMobileIndicator,replacement:[{match:/\.STATUS_TYPING;switch(?=.+?(if\(\i\)return \i\.\i\.Masks\.STATUS_ONLINE_MOBILE))/,replace:".STATUS_TYPING;$1;switch"},{match:/switch\(\i\)\{case \i\.\i\.ONLINE:(if\(\i\)return\{[^}]+\})/,replace:"$1;$&"}]},{find:".AVATAR_STATUS_MOBILE_16;",predicate:()=>E.plugins.PlatformIndicators.colorMobileIndicator,replacement:[{match:/\i===\i\.\i\.ONLINE&&(?=.{0,70}\.AVATAR_STATUS_MOBILE_16;)/,replace:""},{match:/(?<=\(\i\.status,)(\i)(?=,(\i),\i\))/,replace:(e,t,o)=>`${o}?"online":${t}`},{match:/(?<=\i&&!\i)&&\i===\i\.\i\.ONLINE/,replace:""}]},{find:"}isMobileOnline(",predicate:()=>E.plugins.PlatformIndicators.colorMobileIndicator,replacement:{match:/(?<=\i\[\i\.\i\.MOBILE\])===\i\.\i\.ONLINE/,replace:"!= null"}}],options:{...Object.fromEntries(Object.entries(ff).map(([e,t])=>[e,{type:3,description:`Show indicators ${t.description.toLowerCase()}`,restartNeeded:!0,default:!0}])),colorMobileIndicator:{type:3,description:"Whether to make the mobile indicator match the color of the user status.",default:!0,restartNeeded:!0}}})});function CC(e){let{isEmpty:t,attachments:o}=e.type,r=Me.getChannelId(),i=Ke([Xi],()=>bT(r));if(e.type.analyticsName!=="normal")return null;let s=o&&TT.getUploads(r,0).length>0;return!(!t&&i?.length>0)&&!s?null:n(ee,{text:"Preview Message"},c=>n(C,{...c,onClick:async()=>me(r,{content:bT(r),author:F.getCurrentUser(),attachments:s?await NC(r):void 0}),size:"",look:eo.BLANK,innerClassName:vt.button,style:{padding:"0 2px",height:"100%"}},n("div",{className:vt.buttonWrapper},n("img",{width:24,height:24,src:"https://discord.com/assets/4c5a77a89716352686f590a6f014770c.svg"}))))}var TT,bT,AC,NC,Sf,xT=g(()=>{"use strict";a();so();le();I();w();W();x();TT=A("getUploads"),bT=e=>Xi.getDraft(e,0),AC=e=>new Promise(t=>{let o=new Image;o.onload=()=>t({width:o.width,height:o.height}),o.onerror=()=>t(null),o.src=e}),NC=async e=>await Promise.all(TT.getUploads(e,0).map(async t=>{let{isImage:o,filename:r,spoiler:i,item:{file:s}}=t,l=URL.createObjectURL(s),c={id:xs(),filename:i?"SPOILER_"+r:r,content_type:void 0,size:await t.getSize(),spoiler:i,url:l+"#",proxy_url:l+"#"};if(o){let u=await AC(l);if(!u)return c;c.width=u.width,c.height=u.height}return c}));Sf=y({name:"PreviewMessage",description:"Lets you preview your message before sending it.",authors:[d.Aria],patches:[{find:"ChannelTextAreaButtons",replacement:{match:/(\i)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&,(()=>{try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}})()"}}],chatBarIcon:U.wrap(CC,{noop:!0})})});var wT=g(()=>{});function bf(){return n(_.Fragment,null,n(S.FormTitle,{tag:"h3"},"More Information"),n(S.FormText,null,"To add your own pronouns, visit"," ",n(rt,{href:"https://pronoundb.org"},"pronoundb.org")),n(S.FormDivider,null),n(S.FormText,null,"The two pronoun formats are lowercase and capitalized. Example:",n("ul",null,n("li",null,"Lowercase: they/them"),n("li",null,"Capitalized: They/Them")),'Text like "Ask me my pronouns" or "Any pronouns" will always be capitalized. ',n("br",null),n("br",null),"You can also configure whether or not to display pronouns for the current user (since you probably already know them)"))}var MT=g(()=>{"use strict";a();en();x()});var Mn,ql=g(()=>{"use strict";a();$();w();Kl();Mn=L({pronounsFormat:{type:4,description:"The format for pronouns to appear in chat",options:[{label:"Lowercase",value:"LOWERCASE",default:!0},{label:"Capitalized",value:"CAPITALIZED"}]},pronounSource:{type:4,description:"Where to source pronouns from",options:[{label:"Prefer PronounDB, fall back to Discord",value:0,default:!0},{label:"Prefer Discord, fall back to PronounDB (might lead to inconsistency between pronouns in chat and profile)",value:1}]},showSelf:{type:3,description:"Enable or disable showing pronouns for the current user",default:!0},showInMessages:{type:3,description:"Show in messages",default:!0},showInProfile:{type:3,description:"Show in profile",default:!0}})});var Yl,PT=g(()=>{"use strict";a();Yl={hh:"He/Him",hi:"He/It",hs:"He/She",ht:"He/They",ih:"It/Him",ii:"It/Its",is:"It/She",it:"It/They",shh:"She/He",sh:"She/Her",si:"She/It",st:"She/They",th:"They/He",ti:"They/It",ts:"They/She",tt:"They/Them",any:"Any pronouns",other:"Other pronouns",ask:"Ask me my pronouns",avoid:"Avoid pronouns, use my name",unspecified:"Unspecified"}});function RC(e,t=!1){let o=uo.getUserProfile(e)?.pronouns;return t?o:uo.getGuildMemberProfile(e,di()?.guild_id)?.pronouns||o}function Zl(e,t=!1){let o=RC(e,t)?.trim().replace(DC," "),[r]=lt(()=>LC(e),{fallbackValue:NT(e),onError:i=>console.error("Fetching pronouns failed: ",i)});return Mn.store.pronounSource===1&&o?[o,"Discord"]:r&&r!=="unspecified"?[_C(r),"PronounDB"]:[o,"Discord"]}function AT(e,t=!1){let o=Zl(e,t);return!Mn.store.showInProfile||!Mn.store.showSelf&&e===F.getCurrentUser().id?IT:o}function NT(e){let t=Tf[e];return t&&t!=="unspecified"?t:t||null}function LC(e){return new Promise(t=>{let o=NT(e);if(o)return t(o);if(e in Ci)return Ci[e].push(t);Ci[e]=[t],kC()})}async function EC(e){let t=new URLSearchParams;t.append("platform","discord"),t.append("ids",e.join(","));try{return await(await fetch("https://pronoundb.org/api/v1/lookup-bulk?"+t.toString(),{method:"GET",headers:{Accept:"application/json","X-PronounDB-Source":zc}})).json().then(r=>(Object.assign(Tf,r),r))}catch(o){console.error("PronounDB fetching failed: ",o);let r=Object.fromEntries(e.map(i=>[i,"unspecified"]));return Object.assign(Tf,r),r}}function _C(e){let{pronounsFormat:t}=E.plugins.PronounDB;return t==="CAPITALIZED"?Yl[e]:t==="LOWERCASE"&&["any","ask","avoid","other"].includes(e)?Yl[e]:Yl[e].toLowerCase()}var IT,Tf,Ci,kC,DC,Kl=g(()=>{"use strict";a();$();I();Pr();nt();ut();x();ql();PT();IT=[null,""],Tf={},Ci={},kC=no(async()=>{let e=Object.keys(Ci),t=await EC(e);for(let o of e)Ci[o]?.forEach(r=>r(t[o])),delete Ci[o]});DC=/\n+/g});function CT(e){return!(!Mn.store.showInMessages||e.author.bot||e.author.system||e.type===OC||!Mn.store.showSelf&&e.author.id===F.getCurrentUser().id)}function BC({message:e}){let[t]=Zl(e.author.id);return t?n("span",{className:te(Xl.timestampInline,Xl.timestamp)},"\u2022 ",t):null}var Xl,OC,kT,RT,FC,DT=g(()=>{"use strict";a();le();Pe();W();x();Kl();ql();Xl=A("timestampInline"),OC=24;kT=U.wrap(({message:e})=>CT(e)?n(BC,{message:e}):null,{noop:!0}),RT=U.wrap(({message:e})=>CT(e)?n(FC,{message:e}):null,{noop:!0});FC=U.wrap(({message:e})=>{let[t]=Zl(e.author.id);return t?n("span",{className:te(Xl.timestampInline,Xl.timestamp,"vc-pronoundb-compact")},"\u2022 ",t):null},{noop:!0})});var LT,xf,ET=g(()=>{"use strict";a();wT();I();w();MT();DT();Kl();ql();LT={match:/text:(.{0,10}.Messages\.USER_PROFILE_PRONOUNS)(?=,)/,replace:'$& + (typeof vcPronounSource !== "undefined" ? ` (${vcPronounSource})` : "")'},xf=y({name:"PronounDB",authors:[d.Tyman,d.TheKodeToad,d.Ven],description:"Adds pronouns to user messages using pronoundb",patches:[{find:"showCommunicationDisabledStyles",replacement:{match:/("span",{id:\i,className:\i,children:\i}\))/,replace:"$1, $self.CompactPronounsChatComponentWrapper(arguments[0])"}},{find:"showCommunicationDisabledStyles",replacement:{match:/(?<=return\s*\(0,\i\.jsxs?\)\(.+!\i&&)(\(0,\i.jsxs?\)\(.+?\{.+?\}\))/,replace:"[$1, $self.PronounsChatComponentWrapper(arguments[0])]"}},{find:".userTagNoNickname",replacement:[{match:/{user:(\i),[^}]*,pronouns:(\i),[^}]*}=\i;/,replace:"$&let vcPronounSource;[$2,vcPronounSource]=$self.useProfilePronouns($1.id);"},LT]},{find:".nameTagSmall)",replacement:[{match:/\.getName\(\i\);(?<=displayProfile.{0,200})/,replace:"$&const [vcPronounce,vcPronounSource]=$self.useProfilePronouns(arguments[0].user.id,true);if(arguments[0].displayProfile&&vcPronounce)arguments[0].displayProfile.pronouns=vcPronounce;"},LT]}],settings:Mn,settingsAboutComponent:bf,PronounsChatComponentWrapper:kT,CompactPronounsChatComponentWrapper:RT,useProfilePronouns:AT})});var wf,_T=g(()=>{"use strict";a();Gr();I();nt();w();x();wf=y({name:"QuickMention",authors:[d.kemo],description:"Adds a quick mention button to the message actions bar",dependencies:["MessagePopoverAPI"],start(){$o("QuickMention",e=>{let t=J.getChannel(e.channel_id);return t.guild_id&&!Le.can(Te.SEND_MESSAGES,t)?null:{label:"Quick Mention",icon:this.Icon,message:e,channel:t,onClick:()=>vn(`<@${e.author.id}> `)}})},stop(){Go("QuickMention")},Icon:()=>n("svg",{className:"icon",height:"24",width:"24",viewBox:"0 0 24 24",fill:"currentColor"},n("path",{d:"M12 2C6.486 2 2 6.486 2 12C2 17.515 6.486 22 12 22C14.039 22 15.993 21.398 17.652 20.259L16.521 18.611C15.195 19.519 13.633 20 12 20C7.589 20 4 16.411 4 12C4 7.589 7.589 4 12 4C16.411 4 20 7.589 20 12V12.782C20 14.17 19.402 15 18.4 15L18.398 15.018C18.338 15.005 18.273 15 18.209 15H18C17.437 15 16.6 14.182 16.6 13.631V12C16.6 9.464 14.537 7.4 12 7.4C9.463 7.4 7.4 9.463 7.4 12C7.4 14.537 9.463 16.6 12 16.6C13.234 16.6 14.35 16.106 15.177 15.313C15.826 16.269 16.93 17 18 17L18.002 16.981C18.064 16.994 18.129 17 18.195 17H18.4C20.552 17 22 15.306 22 12.782V12C22 6.486 17.514 2 12 2ZM12 14.599C10.566 14.599 9.4 13.433 9.4 11.999C9.4 10.565 10.566 9.399 12 9.399C13.434 9.399 14.6 10.565 14.6 11.999C14.6 13.433 13.434 14.599 12 14.599Z"}))})});function zT(e,t){let o=e.findIndex(r=>r.id===t);return o===-1?o:e.length-o-1}function FT({channelId:e,messageId:t,_isQuickEdit:o}){if(o)return;let r=F.getCurrentUser().id,i=Co.getMessages(e)._array.filter(s=>s.author.id===r);Ql=zT(i,t)}function UT({message:e,_isQuickReply:t}){t||(Jl=zT(Co.getMessages(e.channel_id)._array,e.id))}function $T(e){let t=e.key==="ArrowUp";!t&&e.key!=="ArrowDown"||!$C(e)||GC(e)||(e.shiftKey?jC(t):zC(t))}function jT(e,t){let o=document.getElementById("message-content-"+t);if(!o)return;let r=Math.max(document.documentElement.clientHeight,window.innerHeight),i=o.getBoundingClientRect();(i.bottom<200||i.top-r>=-200)&&UC.jumpToMessage({channelId:e,messageId:t,flash:!1,jumpType:"INSTANT"})}function WT(e,t){let o=Co.getMessages(Me.getChannelId())._array;if(!t){let l=F.getCurrentUser().id;o=o.filter(c=>c.author.id===l)}let r=l=>e?Math.min(o.length-1,l+1):Math.max(-1,l-1),i=l=>{do l=r(l);while(l!==-1&&o[o.length-l-1]?.deleted===!0);return l},s;return t?Jl=s=i(Jl):Ql=s=i(Ql),s===-1?void 0:o[o.length-s-1]}function HC(e){let{enabled:t,userList:o,shouldPingListed:r}=E.plugins.NoReplyMention,i=!t||r===o.includes(e.author.id);switch(HT.store.shouldMention){case 2:return i;case 0:return!1;default:return!0}}function zC(e){let t=J.getChannel(Me.getChannelId());if(t.guild_id&&!Le.can(Te.SEND_MESSAGES,t))return;let o=WT(e,!0);if(!o)return void B.dispatch({type:"DELETE_PENDING_REPLY",channelId:Me.getChannelId()});let r=J.getChannel(o.channel_id),i=F.getCurrentUser().id;B.dispatch({type:"CREATE_PENDING_REPLY",channel:r,message:o,shouldMention:HC(o),showMentionToggle:r.guild_id!==null&&o.author.id!==i,_isQuickReply:!0}),jT(r.id,o.id)}function jC(e){let t=J.getChannel(Me.getChannelId());if(t.guild_id&&!Le.can(Te.SEND_MESSAGES,t))return;let o=WT(e,!1);if(!o)return B.dispatch({type:"MESSAGE_END_EDIT",channelId:Me.getChannelId()});B.dispatch({type:"MESSAGE_START_EDIT",channelId:o.channel_id,messageId:o.id,content:o.content,_isQuickEdit:!0}),jT(o.channel_id,o.id)}var UC,GT,Jl,Ql,HT,Mf,OT,BT,$C,GC,qT=g(()=>{"use strict";a();$();I();w();W();x();UC=A("jumpToMessage"),GT=navigator.platform.includes("Mac"),Jl=-1,Ql=-1,HT=L({shouldMention:{type:4,description:"Ping reply by default",options:[{label:"Follow NoReplyMention",value:2,default:!0},{label:"Enabled",value:1},{label:"Disabled",value:0}]}}),Mf=y({name:"QuickReply",authors:[d.obscurity,d.Ven,d.pylix],description:"Reply to (ctrl + up/down) and edit (ctrl + shift + up/down) messages via keybinds",settings:HT,start(){B.subscribe("DELETE_PENDING_REPLY",OT),B.subscribe("MESSAGE_END_EDIT",BT),B.subscribe("MESSAGE_START_EDIT",FT),B.subscribe("CREATE_PENDING_REPLY",UT),document.addEventListener("keydown",$T)},stop(){B.unsubscribe("DELETE_PENDING_REPLY",OT),B.unsubscribe("MESSAGE_END_EDIT",BT),B.unsubscribe("MESSAGE_START_EDIT",FT),B.unsubscribe("CREATE_PENDING_REPLY",UT),document.removeEventListener("keydown",$T)}}),OT=()=>Jl=-1,BT=()=>Ql=-1;$C=e=>GT?e.metaKey:e.ctrlKey,GC=e=>e.altKey||!GT&&e.metaKey});var Pf,If,KT=g(()=>{"use strict";a();I();w();x();If=y({name:"ReactErrorDecoder",description:'Replaces "Minifed React Error" with the actual error.',authors:[d.Cyn,d.maisymoe],patches:[{find:'"https://reactjs.org/docs/error-decoder.html?invariant="',replacement:{match:/(function .\(.\)){(for\(var .="https:\/\/reactjs\.org\/docs\/error-decoder\.html\?invariant="\+.,.=1;.<arguments\.length;.\+\+\).\+="&args\[\]="\+encodeURIComponent\(arguments\[.\]\);return"Minified React error #"\+.\+"; visit "\+.\+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.")}/,replace:(e,t,o)=>`${t}{var decoded=$self.decodeError.apply(null, arguments);if(decoded)return decoded;${o}}`}}],async start(){let e=`https://raw.githubusercontent.com/facebook/react/v${_.version}/scripts/error-codes/codes.json`;Pf=await fetch(e).then(t=>t.json()).catch(t=>console.error(`[ReactErrorDecoder] Failed to fetch React error codes
  131. `,t))},stop(){Pf=void 0},decodeError(e,...t){let o=0;return Pf?.[e]?.replace(/%s/g,()=>{let r=t[o];return o++,r})}})});var Nf={};ze(Nf,{ServerListRenderPosition:()=>Vl,addServerListElement:()=>Ys,removeServerListElement:()=>Zs,renderAll:()=>YC});function Af(e){return e===0?qC:KC}function Ys(e,t){Af(e).add(t)}function Zs(e,t){Af(e).delete(t)}var WC,Vl,qC,KC,YC,ec=g(()=>{"use strict";a();Je();WC=new ie("ServerListAPI"),Vl=(o=>(o[o.Above=0]="Above",o[o.In=1]="In",o))(Vl||{}),qC=new Set,KC=new Set;YC=e=>{let t=[];for(let o of Af(e))try{t.unshift(o())}catch(r){WC.error("Failed to render server list element:",r)}return t}});function ZC(){let e=[];Object.values(pe.getGuilds()).forEach(t=>{ei.getChannels(t.id).SELECTABLE.forEach(o=>{!Sr.hasUnread(o.channel.id)||e.push({channelId:o.channel.id,messageId:Sr.lastMessageId(o.channel.id),readStateType:0})})}),B.dispatch({type:"BULK_ACK",context:"APP",channels:e})}var XC,Cf,YT=g(()=>{"use strict";a();ec();I();w();x();XC=()=>n(C,{onClick:ZC,size:C.Sizes.MIN,color:C.Colors.BRAND,style:{marginTop:"2px",marginBottom:"8px",marginLeft:"9px"}},"Read all"),Cf=y({name:"ReadAllNotificationsButton",description:"Read all server notifications with a single button click!",authors:[d.kemo],dependencies:["ServerListAPI"],renderReadAllButton:()=>n(XC,null),start(){Ys(0,this.renderReadAllButton)},stop(){Zs(0,this.renderReadAllButton)}})});var lo,tc=g(()=>{"use strict";a();$();w();lo=L({notices:{type:3,description:"Also show a notice at the top of your screen when removed (use this if you don't want to miss any notifications).",default:!1},offlineRemovals:{type:3,description:"Notify you when starting discord if you were removed while offline.",default:!0},friends:{type:3,description:"Notify when a friend removes you",default:!0},friendRequestCancels:{type:3,description:"Notify when a friend request is cancelled",default:!0},servers:{type:3,description:"Notify when removed from a server",default:!0},groups:{type:3,description:"Notify when removed from a group chat",default:!0}})});var kf=g(()=>{"use strict";a()});async function VC(){xt.delMany(["relationship-notifier-guilds","relationship-notifier-groups","relationship-notifier-friends"])}async function Rf(){await VC();let[e,t,o]=await xt.getMany([ZT(),XT(),JT()]);if(await Promise.all([nc(),rc(),Xs()]),lo.store.offlineRemovals){if(lo.store.groups&&t?.size)for(let[r,i]of t)Ri.has(r)||Pn(`You are no longer in the group ${i.name}.`,i.iconURL);if(lo.store.servers&&e?.size)for(let[r,i]of e)ki.has(r)||Pn(`You are no longer in the server ${i.name}.`,i.iconURL);if(lo.store.friends&&o?.friends.length)for(let r of o.friends){if(Hr.friends.includes(r))continue;let i=await Nt.getUser(r).catch(()=>{});i&&Pn(`You are no longer friends with ${Sn(i)}.`,i.getAvatarURL(void 0,void 0,!1),()=>Fo(i.id))}if(lo.store.friendRequestCancels&&o?.requests?.length)for(let r of o.requests){if(Hr.requests.includes(r)||[1,2,4].includes(at.getRelationshipType(r)))continue;let i=await Nt.getUser(r).catch(()=>{});i&&Pn(`Friend request from ${Sn(i)} has been revoked.`,i.getAvatarURL(void 0,void 0,!1),()=>Fo(i.id))}}}function Pn(e,t,o){lo.store.notices&&oc.showNotice(e,"OK",()=>oc.popNotice()),ke({title:"Relationship Notifier",body:e,icon:t,onClick:o})}function QT(e){return ki.get(e)}function Df(e){ki.delete(e),nc()}async function nc(){ki.clear();let e=F.getCurrentUser().id;for(let[t,{name:o,icon:r}]of Object.entries(pe.getGuilds()))Ee.isMember(t,e)&&ki.set(t,{id:t,name:o,iconURL:r&&`https://cdn.discordapp.com/icons/${t}/${r}.png`});await xt.set(ZT(),ki)}function VT(e){return Ri.get(e)}function Lf(e){Ri.delete(e),rc()}async function rc(){Ri.clear();for(let{type:e,id:t,name:o,rawRecipients:r,icon:i}of J.getSortedPrivateChannels())e===3&&Ri.set(t,{id:t,name:o||r.map(s=>s.username).join(", "),iconURL:i&&`https://cdn.discordapp.com/channel-icons/${t}/${i}.png`});await xt.set(XT(),Ri)}async function Xs(){Hr.friends=[],Hr.requests=[];let e=at.getRelationships();for(let t in e)switch(e[t]){case 1:Hr.friends.push(t);break;case 3:Hr.requests.push(t);break}await xt.set(JT(),Hr)}var ki,Ri,Hr,ZT,XT,JT,Ef=g(()=>{"use strict";a();yi();Fn();nt();x();tc();kf();ki=new Map,Ri=new Map,Hr={friends:[],requests:[]},ZT=()=>`relationship-notifier-guilds-${F.getCurrentUser().id}`,XT=()=>`relationship-notifier-groups-${F.getCurrentUser().id}`,JT=()=>`relationship-notifier-friends-${F.getCurrentUser().id}`});async function nx({relationship:{type:e,id:t}}){if(_f===t){_f=void 0;return}let o=await Nt.getUser(t).catch(()=>null);if(!!o)switch(e){case 1:lo.store.friends&&Pn(`${Sn(o)} removed you as a friend.`,o.getAvatarURL(void 0,void 0,!1),()=>Fo(o.id));break;case 3:lo.store.friendRequestCancels&&Pn(`A friend request from ${Sn(o)} has been removed.`,o.getAvatarURL(void 0,void 0,!1),()=>Fo(o.id));break}}function rx({guild:{id:e,unavailable:t}}){if(!lo.store.servers||t)return;if(Of===e){Df(e),Of=void 0;return}let o=QT(e);o&&(Df(e),Pn(`You were removed from the server ${o.name}.`,o.iconURL))}function ix({channel:{id:e,type:t}}){if(!lo.store.groups||t!==3)return;if(Bf===e){Lf(e),Bf=void 0;return}let o=VT(e);o&&(Lf(e),Pn(`You were removed from the group ${o.name}.`,o.iconURL))}var _f,Of,Bf,ex,tx,ox,sx=g(()=>{"use strict";a();nt();x();tc();kf();Ef();ex=e=>_f=e,tx=e=>Of=e,ox=e=>Bf=e});var Ff,ax=g(()=>{"use strict";a();I();w();sx();tc();Ef();Ff=y({name:"RelationshipNotifier",description:"Notifies you when a friend, group chat, or server removes you.",authors:[d.nick],settings:lo,patches:[{find:"removeRelationship:(",replacement:{match:/(removeRelationship:\((\i),\i,\i\)=>)/,replace:"$1($self.removeFriend($2),0)||"}},{find:"async leaveGuild(",replacement:{match:/(leaveGuild\((\i)\){)/,replace:"$1$self.removeGuild($2);"}},{find:"},closePrivateChannel(",replacement:{match:/(closePrivateChannel\((\i)\){)/,replace:"$1$self.removeGroup($2);"}}],flux:{GUILD_CREATE:nc,GUILD_DELETE:rx,CHANNEL_CREATE:rc,CHANNEL_DELETE:ix,RELATIONSHIP_ADD:Xs,RELATIONSHIP_UPDATE:Xs,RELATIONSHIP_REMOVE(e){nx(e),Xs()},CONNECTION_OPEN:Rf},async start(){setTimeout(()=>{Rf()},5e3)},removeFriend:ex,removeGroup:ox,removeGuild:tx})});var ek,tk,Uf,lx=g(()=>{"use strict";a();I();w();W();ek=A("spoilerContent"),tk=A("messagesWrapper","messages"),Uf=y({name:"RevealAllSpoilers",description:"Reveal all spoilers in a message by Ctrl-clicking a spoiler, or in the chat with Ctrl+Shift-click",authors:[d.whqwert],patches:[{find:".removeObscurity=",replacement:{match:/(?<=\.removeObscurity=(\i)=>{)/,replace:(e,t)=>`$self.reveal(${t});`}}],reveal(e){let{ctrlKey:t,shiftKey:o,target:r}=e;if(!t)return;let{spoilerContent:i,hidden:s}=ek,{messagesWrapper:l}=tk,c=o?document.querySelector(`div.${l}`):r.parentElement;for(let u of c.querySelectorAll(`span.${i}.${s}`))u.click()}})});function cx(e,t){open(t+encodeURIComponent(e),"_blank")}var ic,ux,$f,px=g(()=>{"use strict";a();kt();Ct();Dt();I();w();x();ic={Google:"https://lens.google.com/uploadbyurl?url=",Yandex:"https://yandex.com/images/search?rpt=imageview&url=",SauceNAO:"https://saucenao.com/search.php?url=",IQDB:"https://iqdb.org/?url=",TinEye:"https://www.tineye.com/search?url=",ImgOps:"https://imgops.com/start?url="};ux=(e,t)=>()=>{if(!t)return;let{reverseImageSearchType:o,itemHref:r,itemSrc:i}=t;if(!o||o!=="img")return;let s=r??i,l=ft("copy-link",e);l&&l.push(n(G.MenuItem,{label:"Search Image",key:"search-image",id:"search-image"},Object.keys(ic).map((c,u)=>{let p="search-image-"+c;return n(G.MenuItem,{key:p,id:p,label:n(ce,{style:{alignItems:"center",gap:"0.5em"}},n("img",{style:{borderRadius:u>=3?"50%":void 0},"aria-hidden":"true",height:16,width:16,src:new URL("/favicon.ico",ic[c]).toString().replace("lens.","")}),c),action:()=>cx(s,ic[c])})}),n(G.MenuItem,{key:"search-image-all",id:"search-image-all",label:n(ce,{style:{alignItems:"center",gap:"0.5em"}},n(ys,{height:16,width:16}),"All"),action:()=>Object.values(ic).forEach(c=>cx(s,c))})))},$f=y({name:"ReverseImageSearch",description:"Adds ImageSearch to image context menus",authors:[d.Ven,d.Nuckyz],tags:["ImageUtilities"],patches:[{find:".Messages.MESSAGE_ACTIONS_MENU_LABEL",replacement:{match:/favoriteableType:\i,(?<=(\i)\.getAttribute\("data-type"\).+?)/,replace:(e,t)=>`${e}reverseImageSearchType:${t}.getAttribute("data-role"),`}}],start(){de("message",ux)},stop(){ge("message",ux)}})});var Js,Gf,dx=g(()=>{"use strict";a();$();I();w();x();Js=L({chatMentions:{type:3,default:!0,description:"Show role colors in chat mentions (including in the message box)",restartNeeded:!0},memberList:{type:3,default:!0,description:"Show role colors in member list role headers",restartNeeded:!0},voiceUsers:{type:3,default:!0,description:"Show role colors in the voice chat user list",restartNeeded:!0}}),Gf=y({name:"RoleColorEverywhere",authors:[d.KingFish,d.lewisakura,d.AutumnVN],description:"Adds the top role color anywhere possible",patches:[{find:"CLYDE_AI_MENTION_COLOR:null,",replacement:[{match:/user:(\i),channel:(\i).{0,400}?"@"\.concat\(.+?\)/,replace:"$&,color:$self.getUserColor($1?.id,{channelId:$2?.id})"}],predicate:()=>Js.store.chatMentions},{find:".userTooltip,children",replacement:[{match:/let\{id:(\i),guildId:(\i)[^}]*\}.*?\.default,{(?=children)/,replace:"$&color:$self.getUserColor($1,{guildId:$2}),"}],predicate:()=>Js.store.chatMentions},{find:'tutorialId:"whos-online',replacement:[{match:/\i.roleIcon,\.\.\.\i/,replace:"$&,color:$self.roleGroupColor(arguments[0])"},{match:/null,\i," — ",\i\]/,replace:"null,$self.roleGroupColor(arguments[0])]"}],predicate:()=>Js.store.memberList},{find:"renderPrioritySpeaker",replacement:[{match:/renderName\(\).{0,100}speaking:.{50,100}jsx.{5,10}{/,replace:"$&...$self.getVoiceProps(this.props),"}],predicate:()=>Js.store.voiceUsers}],settings:Js,getColor(e,{channelId:t,guildId:o}){return(o??=J.getChannel(t)?.guild_id)?Ee.getMember(o,e)?.colorString??null:null},getUserColor(e,t){let o=this.getColor(e,t);return o&&parseInt(o.slice(1),16)},roleGroupColor({id:e,count:t,title:o,guildId:r,label:i}){let l=pe.getGuild(r)?.roles[e];return n("span",{style:{color:l?.colorString,fontWeight:"unset",letterSpacing:".05em"}},o??i," \u2014 ",t)},getVoiceProps({user:{id:e},guildId:t}){return{style:{color:this.getColor(e,{guildId:t})}}}})});var mx,fx,Hf,gx=g(()=>{"use strict";a();kt();Dt();I();w();W();x();mx=A("replyToMessage"),fx=(e,{message:t})=>()=>{if(Me.getChannelId()!==t.channel_id)return;let o=J.getChannel(t?.channel_id);if(!o||o.guild_id&&!Le.can(Te.SEND_MESSAGES,o))return;let r=ft("pin",e);if(r&&!r.some(s=>s?.props?.id==="reply")){let s=r.findIndex(l=>l?.props.id==="pin");return r.splice(s+1,0,n(G.MenuItem,{id:"reply",label:Qe.Messages.MESSAGE_ACTION_REPLY,icon:Wu,action:l=>mx.replyToMessage(o,t,l)}))}let i=ft("mark-unread",e);if(i&&!i.some(s=>s?.props?.id==="reply"))return i.unshift(n(G.MenuItem,{id:"reply",label:Qe.Messages.MESSAGE_ACTION_REPLY,icon:Wu,action:s=>mx.replyToMessage(o,t,s)}))},Hf=y({name:"SearchReply",description:"Adds a reply button to search results",authors:[d.Aria],start(){de("message",fx)},stop(){ge("message",fx)}})});var zf,hx=g(()=>{"use strict";a();I();w();zf=y({name:"SecretRingToneEnabler",description:"Always play the secret version of the discord ringtone (except during special ringtone events)",authors:[d.AndrewDLO,d.FieryFlames],patches:[{find:'call_ringing_beat"',replacement:{match:/500===\i\.random\(1,1e3\)/,replace:"true"}}]})});var yx=g(()=>{});function vx(e){let t=e.slice(1,-1).replace(/(\d)(AM|PM)$/i,"$1 $2"),o=new Date(`${new Date().toDateString()} ${t}`).getTime()/1e3;return isNaN(o)?e:(Date.now()/1e3>o&&(o+=86400),`<t:${Math.round(o)}:t>`)}function nk({rootProps:e,close:t}){let[o,r]=X(),[i,s]=X(""),l=Math.round((new Date(o).getTime()||Date.now())/1e3),c=(m,h)=>`<t:${m}${h&&`:${h}`}>`,[u,p]=St(()=>{let m=c(l,i);return[m,_e.parse(m)]},[l,i]);return n(Oe,{...e},n(tt,{className:Qs("modal-header")},n(S.FormTitle,{tag:"h2"},"Timestamp Picker"),n(_t,{onClick:t})),n(Ye,{className:Qs("modal-content")},n("input",{type:"datetime-local",value:o,onChange:m=>r(m.currentTarget.value),style:{colorScheme:Kn()===2?"light":"dark"}}),n(S.FormTitle,null,"Timestamp Format"),n(ho,{options:ok.map(m=>({label:m,value:m})),isSelected:m=>m===i,select:m=>s(m),serialize:m=>m,renderOptionLabel:m=>n("div",{className:Qs("format-label")},_e.parse(c(l,m.value))),renderOptionValue:()=>p}),n(S.FormTitle,{className:z.bottom8},"Preview"),n(S.FormText,{className:Qs("preview-text")},p," (",u,")")),n(bt,null,n(C,{onClick:()=>{vn(u+" "),t()}},"Insert")))}var ok,Qs,jf,Sx=g(()=>{"use strict";a();yx();tn();ot();I();nt();it();st();w();x();ok=["","t","T","d","D","f","F","R"],Qs=Be("vc-st-");jf=y({name:"SendTimestamps",description:"Send timestamps easily via chat box button & text shortcuts. Read the extended description!",authors:[d.Ven,d.Tyler],dependencies:["MessageEventsAPI"],patches:[{find:"ChannelTextAreaButtons",replacement:{match:/(\i)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&,(()=>{try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}})()"}}],start(){this.listener=Kt((e,t)=>{t.content=t.content.replace(/`\d{1,2}:\d{2} ?(?:AM|PM)?`/gi,vx)})},stop(){Yt(this.listener)},chatBarIcon(e){return e.type.analyticsName!=="normal"?null:n(ee,{text:"Insert Timestamp"},({onMouseEnter:t,onMouseLeave:o})=>n("div",{style:{display:"flex"}},n(C,{"aria-haspopup":"dialog","aria-label":"Insert Timestamp",size:"",look:eo.BLANK,onMouseEnter:t,onMouseLeave:o,innerClassName:vt.button,onClick:()=>{let r=Ne(i=>n(nk,{rootProps:i,close:()=>dn(r)}))},className:Qs("button")},n("div",{className:vt.buttonWrapper},n("svg",{"aria-hidden":"true",role:"img",width:"24",height:"24",viewBox:"0 0 24 24"},n("g",{fill:"none","fill-rule":"evenodd"},n("path",{fill:"currentColor",d:"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7v-5z"}),n("rect",{width:"24",height:"24"})))))))},settingsAboutComponent(){let e=["12:00","3:51","17:59","24:00","12:00 AM","0:13PM"].map(t=>`\`${t}\``);return n(f,null,n(S.FormText,null,"To quickly send send time only timestamps, include timestamps formatted as `HH:MM` (including the backticks!) in your message"),n(S.FormText,null,"See below for examples. If you need anything more specific, use the Date button in the chat bar!"),n(S.FormText,null,"Examples:",n("ul",null,e.map(t=>n("li",{key:t},n("code",null,t)," ","->"," ",_e.parse(vx(t)))))))}})});function rk(){return xx=Bn(),n("span",{id:"vc-friendcount",style:{display:"inline-block",width:"100%",fontSize:"12px",fontWeight:"600",color:"var(--header-secondary)",textTransform:"uppercase",textAlign:"center"}},qf," online")}function ik(){return wx=Bn(),n("span",{id:"vc-guildcount",style:{display:"inline-block",width:"100%",fontSize:"12px",fontWeight:"600",color:"var(--header-secondary)",textTransform:"uppercase",textAlign:"center"}},Tx," servers")}function bx(){qf=0;let e=at.getRelationships();for(let t of Object.keys(e))e[t]===1&&qo.getStatus(t)!=="offline"&&(qf+=1);xx?.()}function Wf(){Tx=pe.getGuildCount(),wx?.()}var qf,Tx,xx,wx,Kf,Mx=g(()=>{"use strict";a();ec();$();le();I();ut();w();x();qf=0,Tx=0;Kf=y({name:"ServerListIndicators",description:"Add online friend count or server count in the server list",authors:[d.dzshn],dependencies:["ServerListAPI"],options:{mode:{description:"mode",type:4,options:[{label:"Only online friend count",value:2,default:!0},{label:"Only server count",value:1},{label:"Both server and online friend counts",value:3}]}},renderIndicator:()=>{let{mode:e}=E.plugins.ServerListIndicators;return n(U,{noop:!0},n("div",{style:{marginBottom:"4px"}},!!(e&2)&&n(rk,null),!!(e&1)&&n(ik,null)))},flux:{PRESENCE_UPDATES:bx,GUILD_CREATE:Wf,GUILD_DELETE:Wf},start(){Ys(0,this.renderIndicator),bx(),Wf()},stop(){Zs(0,this.renderIndicator)}})});var Px=g(()=>{});function Nx(e){Ne(t=>n(Oe,{...t,size:"medium"},n(ak,{guild:e})))}function Ax(e){return n(Wo,{timestamp:yo(e)})}function ak({guild:e}){let[t,o]=X(),[r,i]=X();ue(()=>{ac.friends=!1,ac.blocked=!1},[]);let[s,l]=X(0),c=e.banner&&sc.getGuildBannerURL({id:e.id,banner:e.banner},!0).replace(/\?size=\d+$/,"?size=1024"),u=e.icon&&sc.getGuildIconURL({id:e.id,icon:e.icon,canAnimate:!0,size:512});return n("div",{className:co("root")},c&&s===0&&n("img",{className:co("banner"),src:c,alt:"",onClick:()=>Bo(c)}),n("div",{className:co("header")},e.icon?n("img",{src:u,alt:"",onClick:()=>Bo(u)}):n("div",{"aria-hidden":!0,className:te(Ix.childWrapper,Ix.acronym)},e.acronym),n("div",{className:co("name-and-description")},n(S.FormTitle,{tag:"h5",className:co("name")},e.name),e.description&&n(S.FormText,null,e.description))),n(No,{type:"top",look:"brand",className:co("tab-bar"),selectedItem:s,onItemSelect:l},n(No.Item,{className:co("tab",{selected:s===0}),id:0},"Server Info"),n(No.Item,{className:co("tab",{selected:s===1}),id:1},"Friends",t!==void 0?` (${t})`:""),n(No.Item,{className:co("tab",{selected:s===2}),id:2},"Blocked Users",r!==void 0?` (${r})`:"")),n("div",{className:co("tab-content")},s===0&&n(ck,{guild:e}),s===1&&n(uk,{guild:e,setCount:o}),s===2&&n(pk,{guild:e,setCount:i})))}function lk(e,t){let o=Ee.getMember(e,t.id)?.avatar,r=o?sc.getGuildMemberAvatarURLSimple({userId:t.id,avatar:o,guildId:e,canAnimate:!0},!0):sc.getUserAvatarURL(t,!0);return n("div",{className:co("owner")},n("img",{src:r,alt:"",onClick:()=>Bo(r)}),_e.parse(`<@${t.id}>`))}function ck({guild:e}){let[t]=lt(()=>Nt.getUser(e.ownerId),{deps:[e.ownerId],fallbackValue:null}),o={"Server Owner":t?lk(e.id,t):"Loading...","Created At":Ax(Ko.extractTimestamp(e.id)),"Joined At":e.joinedAt?Ax(e.joinedAt.getTime()):"-","Vanity Link":e.vanityURLCode?n("a",null,`discord.gg/${e.vanityURLCode}`):"-","Preferred Locale":e.preferredLocale||"-","Verification Level":["None","Low","Medium","High","Highest"][e.verificationLevel]||"?","Nitro Boosts":`${e.premiumSubscriberCount??0} (Level ${e.premiumTier??0})`,Channels:ei.getChannels(e.id)?.count-1||"?",Roles:Object.keys(e.roles).length-1};return n("div",{className:co("info")},Object.entries(o).map(([r,i])=>n("div",{className:co("server-info-pair"),key:r},n(S.FormTitle,{tag:"h5"},r),typeof i=="string"?n("span",null,i):i)))}function uk({guild:e,setCount:t}){return Cx("friends",e,at.getFriendIDs(),t)}function pk({guild:e,setCount:t}){let o=Object.keys(at.getRelationships()).filter(r=>at.isBlocked(r));return Cx("blocked",e,o,t)}function Cx(e,t,o,r){let i=[],s=[];for(let l of o)Ee.isMember(t.id,l)?s.push(l):i.push(l);return Ke([Ee],()=>Ee.getMemberIds(t.id),null,(l,c)=>l.length===c.length),ue(()=>{!ac[e]&&i.length&&(ac[e]=!0,B.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[t.id],userIds:i}))},[]),ue(()=>r(s.length),[s.length]),n(Yr,{fade:!0,className:co("scroller")},s.map(l=>n(sk,{user:F.getUser(l),status:qo.getStatus(l)||"offline",onSelect:()=>Fo(l),onContextMenu:()=>{}})))}var sc,Ix,sk,co,ac,kx=g(()=>{"use strict";a();Px();ot();nt();Pe();st();ut();W();x();sc=A("getGuildBannerURL"),Ix=A("icon","acronym","childWrapper"),sk=un("FriendRow"),co=Be("vc-gp-");ac={friends:!1,blocked:!1}});var Rx,Yf,Dx=g(()=>{"use strict";a();kt();I();w();x();kx();Rx=(e,{guild:t})=>()=>{ft("privacy",e)?.push(n(G.MenuItem,{id:"vc-server-profile",label:"Server Info",action:()=>Nx(t)}))},Yf=y({name:"ServerProfile",description:"Allows you to view info about a server by right clicking it in the server list",authors:[d.Ven,d.Nuckyz],tags:["guild","info"],start(){de(["guild-context","guild-header-popout"],Rx)},stop(){ge(["guild-context","guild-header-popout"],Rx)}})});var Lx=g(()=>{});var Ex,_x=g(()=>{a();Ex=`/* eslint-disable simple-header/header */
  132. import React from "react";
  133. const handleClick = async () =>
  134. console.log((await import("@webpack/common")).Clipboard.copy("\\u200b"));
  135. export const Example: React.FC<{
  136. real: boolean,
  137. shigged?: number,
  138. }> = ({ real, shigged }) => <>
  139. <p>{\`Shigg\${real ? \`ies\${shigged === 0x1B ? "t" : ""}\` : "y"}\`}</p>
  140. <button onClick={handleClick}>Click Me</button>
  141. </>;
  142. `});var Bx=gr((NV,Zf)=>{"use strict";a();var dk=Object.prototype.hasOwnProperty,Xt="~";function Vs(){}Object.create&&(Vs.prototype=Object.create(null),new Vs().__proto__||(Xt=!1));function mk(e,t,o){this.fn=e,this.context=t,this.once=o||!1}function Ox(e,t,o,r,i){if(typeof o!="function")throw new TypeError("The listener must be a function");var s=new mk(o,r||e,i),l=Xt?Xt+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function lc(e,t){--e._eventsCount===0?e._events=new Vs:delete e._events[t]}function Gt(){this._events=new Vs,this._eventsCount=0}Gt.prototype.eventNames=function(){var t=[],o,r;if(this._eventsCount===0)return t;for(r in o=this._events)dk.call(o,r)&&t.push(Xt?r.slice(1):r);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o)):t};Gt.prototype.listeners=function(t){var o=Xt?Xt+t:t,r=this._events[o];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,s=r.length,l=new Array(s);i<s;i++)l[i]=r[i].fn;return l};Gt.prototype.listenerCount=function(t){var o=Xt?Xt+t:t,r=this._events[o];return r?r.fn?1:r.length:0};Gt.prototype.emit=function(t,o,r,i,s,l){var c=Xt?Xt+t:t;if(!this._events[c])return!1;var u=this._events[c],p=arguments.length,m,h;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),p){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,o),!0;case 3:return u.fn.call(u.context,o,r),!0;case 4:return u.fn.call(u.context,o,r,i),!0;case 5:return u.fn.call(u.context,o,r,i,s),!0;case 6:return u.fn.call(u.context,o,r,i,s,l),!0}for(h=1,m=new Array(p-1);h<p;h++)m[h-1]=arguments[h];u.fn.apply(u.context,m)}else{var v=u.length,T;for(h=0;h<v;h++)switch(u[h].once&&this.removeListener(t,u[h].fn,void 0,!0),p){case 1:u[h].fn.call(u[h].context);break;case 2:u[h].fn.call(u[h].context,o);break;case 3:u[h].fn.call(u[h].context,o,r);break;case 4:u[h].fn.call(u[h].context,o,r,i);break;default:if(!m)for(T=1,m=new Array(p-1);T<p;T++)m[T-1]=arguments[T];u[h].fn.apply(u[h].context,m)}}return!0};Gt.prototype.on=function(t,o,r){return Ox(this,t,o,r,!1)};Gt.prototype.once=function(t,o,r){return Ox(this,t,o,r,!0)};Gt.prototype.removeListener=function(t,o,r,i){var s=Xt?Xt+t:t;if(!this._events[s])return this;if(!o)return lc(this,s),this;var l=this._events[s];if(l.fn)l.fn===o&&(!i||l.once)&&(!r||l.context===r)&&lc(this,s);else{for(var c=0,u=[],p=l.length;c<p;c++)(l[c].fn!==o||i&&!l[c].once||r&&l[c].context!==r)&&u.push(l[c]);u.length?this._events[s]=u.length===1?u[0]:u:lc(this,s)}return this};Gt.prototype.removeAllListeners=function(t){var o;return t?(o=Xt?Xt+t:t,this._events[o]&&lc(this,o)):(this._events=new Vs,this._eventsCount=0),this};Gt.prototype.off=Gt.prototype.removeListener;Gt.prototype.addListener=Gt.prototype.on;Gt.prefixed=Xt;Gt.EventEmitter=Gt;typeof Zf<"u"&&(Zf.exports=Gt)});var Vf=gr(Di=>{"use strict";a();Object.defineProperty(Di,"__esModule",{value:!0});Di.Channel=Di.ChannelPort=void 0;var fk=Bx(),cc="vapIpc",Xf=Symbol.for("vapIpc.edgeCreate"),Jf=class{_pipes=new Map;_listeners=new Map;_createListenerMap(){return new Map}_emit(t,o,...r){for(let[i,s]of this._listeners.entries()){if(i===t)continue;let l=s.get(o);l&&l(...r)}}createPipe(t){let o=this.getPipe(t);if(o)return o;let r=this._createListenerMap();this._listeners.set(t,r);let i={emit:this._emit.bind(this,t),listen:(s,l)=>void r.set(s,l)};return this._pipes.set(t,i),i}getPipe(t){return this._pipes.get(t)??null}};Di.ChannelPort=Jf;var Qf=class{id;_edges=new Map;_callbacks=new Map;_callers=new Map;_edgePipes=new Map;_pipes=[];_emitter=new fk.EventEmitter;_logger;_destroyed=!1;constructor(t){this.id=t}addPipe(t){t.listen(`${cc}:handshake`,o=>{this._handleHandshake(t,o)}),t.listen(`${cc}:message`,o=>{this._handleMessage(t,o)}),this._pipes.push(t),this._logger?.log(`Adding pipe to channel "${this.id}"`)}setLogger(t){this._logger=t}_handleHandshake(t,o){if(this.id===o.id)return;this._logger?.log(`\u{1F91D} "${o.id}" -> "${this.id}" (edges: [${o.channelIds.join(", ")}])`);let r=this._edges.get(o.id);if(r){let i=o.channelIds.filter(s=>!r?.channelIds.includes(s));if(i.includes(this.id)&&i.splice(i.indexOf(this.id),1),!i.length)return;this._edges.set(o.id,{...o,channelIds:[...r.channelIds,...i]})}else{let i=[...o.channelIds].filter(s=>s!==this.id);this._edges.set(o.id,{...o,channelIds:i}),this._edgePipes.set(o.id,t)}this._emitter.emit(Xf,o),this.handshakeAll()}_handleMessage(t,o){if(o.proxiedBy===this.id)return;if(o.destination!==this.id)return this._emitMessage({...o,proxiedBy:this.id});if(!o.nonce)return void this._emitter.emit(o.name,o.data);let r=this._callbacks.get(o.nonce);if(r)return void r(o.data);let i=this._callers.get(o.name);if(i){i(o.data).catch(s=>(console.error(s),new Error(s?.message??`${s}`))).then(s=>{this._emitMessage({name:o.name,source:this.id,destination:o.source,data:s,nonce:o.nonce})});return}}_emitHandshake(t){let o=this.getEdge();t.emit(`${cc}:handshake`,o)}_emitMessage(t){let o=this.findEdgeId(t.destination);if(!o)return;this._edgePipes.get(o)?.emit(`${cc}:message`,t)}getEdge(){let t=[...this._edges.keys(),...[...this._edges.values()].map(o=>o.channelIds).flat()].filter((o,r,i)=>i.indexOf(o)===r);return{id:this.id,channelIds:t}}findEdgeId(t){for(let o of this._edges.values())if(o.id===t||o.channelIds.includes(t))return o.id;return null}waitForEdge(t){let o=this.findEdgeId(t);return o?Promise.resolve(o):new Promise(r=>{let i=s=>{(s.id===t||s.channelIds.includes(t))&&(this._emitter.off(Xf,i),r(s.id))};this._emitter.on(Xf,i)})}createNonce(){return Math.random().toString(16).slice(2)}send(t){this._emitMessage({...t,source:this.id})}call(t,o={timeout:1e4}){let r=this.createNonce(),i=new Promise((s,l)=>{let c=setTimeout(()=>{this._callbacks.delete(r),l(new Error("Call timed out"))},o.timeout);this._callbacks.set(r,u=>{this._callbacks.delete(r),clearTimeout(c),o.signal?.aborted?o.signal.reason instanceof Error&&l(o.signal.reason):u instanceof Error?l(u):s(u)})});return this._emitMessage({...t,source:this.id,nonce:r}),i}on(t,o){return this._emitter.on(t,o),this}off(t,o){return this._emitter.off(t,o),this}once(t,o){this._emitter.once(t,o)}onCall(t,o){this._callers.set(t,async(...r)=>await o(...r))}removeCaller(){}handshakeAll(){this._pipes.forEach(t=>this._emitHandshake(t))}destroy(){this._emitter.removeAllListeners(),this._callbacks.clear(),this._callers.clear(),this._edgePipes.clear(),this._pipes=[],this._destroyed=!0}};Di.Channel=Qf});var og=gr(Li=>{"use strict";a();Object.defineProperty(Li,"__esModule",{value:!0});Li.RemoteClient=Li.RemoteHost=void 0;var eg=class{channel;constructor(t,o){this.channel=t;for(let[r,i]of Object.entries(o))t.onCall(r,async s=>await i(...s));t.handshakeAll()}};Li.RemoteHost=eg;var tg=class{hostName;channel;constructor(t,o){this.hostName=t,this.channel=o}async connect(){await this.channel.waitForEdge(this.hostName)}run(t,...o){return this.channel.call({name:t,destination:this.hostName,data:o})}};Li.RemoteClient=tg});var $x=gr(Ei=>{"use strict";a();Object.defineProperty(Ei,"__esModule",{value:!0});Ei.WorkerClient=Ei.createWorkerHost=void 0;var Fx=Vf(),Ux=og(),gk=(e,t)=>{let o=new Fx.Channel(e);return o.addPipe({emit:(r,i)=>postMessage({event:r,data:i}),listen:(r,i)=>addEventListener("message",({data:s})=>{s.event===r&&i(s.data)})}),new Ux.RemoteHost(o,t)};Ei.createWorkerHost=gk;var ng=class extends Ux.RemoteClient{workerOpts;worker;workerListeners=[];url;constructor(t,o,r,i={}){let s=new Fx.Channel(t);if(super(o,s),this.workerOpts=i,r instanceof Blob){let l=new Blob([r],{type:"text/javascript"});this.url=URL.createObjectURL(l)}else this.url=r}async init(){let t=this.worker=new Worker(this.url,this.workerOpts);this.channel.addPipe({emit:(o,r)=>t.postMessage({event:o,data:r}),listen:(o,r)=>{let i=s=>{let{event:l,data:c}=s.data;l===o&&r(c)};this.workerListeners.push(i),t.addEventListener("message",i)}}),await this.connect()}destroy(){if(this.worker){for(let t of this.workerListeners)this.worker.removeEventListener("message",t);this.worker.terminate()}this.channel.destroy(),this.url.startsWith("blob:")&&URL.revokeObjectURL(this.url)}};Ei.WorkerClient=ng});var Gx=gr(In=>{"use strict";a();var hk=In&&In.__createBinding||(Object.create?function(e,t,o,r){r===void 0&&(r=o);var i=Object.getOwnPropertyDescriptor(t,o);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,r,i)}:function(e,t,o,r){r===void 0&&(r=o),e[r]=t[o]}),rg=In&&In.__exportStar||function(e,t){for(var o in e)o!=="default"&&!Object.prototype.hasOwnProperty.call(t,o)&&hk(t,e,o)};Object.defineProperty(In,"__esModule",{value:!0});rg(Vf(),In);rg(og(),In);rg($x(),In)});function sg(e){uc.id!==e.id&&(Object.assign(uc,e),ig.forEach(t=>t(e)))}var uc,ig,Hx,ag=g(()=>{"use strict";a();x();uc={id:null,theme:null},ig=new Set,Hx=()=>{let[,e]=_.useState(uc);return _.useEffect(()=>(ig.add(e),()=>void ig.delete(e)),[]),uc}});function zr(e){if(Object.prototype.hasOwnProperty.call(_i,e))return _i[e];let t=Object.values(_i).find(o=>o.aliases?.includes(e));return t?(Tk.set(e,t),t):null}var yk,vk,zx,Sk,bk,_i,jx,Wx,Tk,pc=g(()=>{"use strict";a();yk="Vap0r1ze/vapcord",vk="88a7032a59cca40da170926651b08201ea3b965a",zx=`https://raw.githubusercontent.com/${yk}/${vk}/assets/shiki-codeblocks`,Sk=e=>`${zx}/${e}`,bk=`${zx}/languages.json`,_i={},jx=async()=>{let e=await fetch(bk).then(o=>o.json()),t=Object.fromEntries(e.map(o=>[o.id,{...o,grammarUrl:Sk(o.fileName)}]));Object.assign(_i,t)},Wx=e=>e.grammar?Promise.resolve(e.grammar):fetch(e.grammarUrl).then(t=>t.json()),Tk=new Map});var xk,wk,qe,An,lg=g(()=>{"use strict";a();xk="shikijs/shiki",wk="0b28ad8ccfbf2615f2d9d38ea8255416b8ac3043",qe=e=>`https://raw.githubusercontent.com/${xk}/${wk}/packages/shiki/themes/${e}.json`,An={DarkPlus:qe("dark-plus"),MaterialCandy:"https://raw.githubusercontent.com/millsp/material-candy/master/material-candy.json",DraculaSoft:qe("dracula-soft"),Dracula:qe("dracula"),GithubDarkDimmed:qe("github-dark-dimmed"),GithubDark:qe("github-dark"),GithubLight:qe("github-light"),LightPlus:qe("light-plus"),MaterialDarker:qe("material-darker"),MaterialDefault:qe("material-default"),MaterialLighter:qe("material-lighter"),MaterialOcean:qe("material-ocean"),MaterialPalenight:qe("material-palenight"),MinDark:qe("min-dark"),MinLight:qe("min-light"),Monokai:qe("monokai"),Nord:qe("nord"),OneDarkPro:qe("one-dark-pro"),Poimandres:qe("poimandres"),RosePineDawn:qe("rose-pine-dawn"),RosePineMoon:qe("rose-pine-moon"),RosePine:qe("rose-pine"),SlackDark:qe("slack-dark"),SlackOchin:qe("slack-ochin"),SolarizedDark:qe("solarized-dark"),SolarizedLight:qe("solarized-light"),VitesseDark:qe("vitesse-dark"),VitesseLight:qe("vitesse-light"),CssVariables:qe("css-variables")}});var Kx,cg,qx,ve,ea=g(()=>{"use strict";a();vl();Kx=da(Gx());ag();pc();lg();cg=Object.values(An),ve={client:null,currentTheme:null,currentThemeUrl:null,timeoutMs:1e4,languages:_i,themes:An,loadedThemes:new Set,loadedLangs:new Set,clientPromise:new Promise(e=>qx=e),init:async e=>{let t=await fetch(OS).then(i=>i.blob()),o=ve.client=new Kx.WorkerClient("shiki-client","shiki-host",t,{name:"ShikiWorker"});await o.init();let r=e||cg[0];await jx(),await o.run("setOnigasm",{wasm:BS}),await o.run("setHighlighter",{theme:r,langs:[]}),ve.loadedThemes.add(r),await ve._setTheme(r),qx(o)},_setTheme:async e=>{ve.currentThemeUrl=e;let{themeData:t}=await ve.client.run("getTheme",{theme:e});ve.currentTheme=JSON.parse(t),sg({id:e,theme:ve.currentTheme})},loadTheme:async e=>{let t=await ve.clientPromise;ve.loadedThemes.has(e)||(await t.run("loadTheme",{theme:e}),ve.loadedThemes.add(e))},setTheme:async e=>{await ve.clientPromise,e||=cg[0],ve.loadedThemes.has(e)||await ve.loadTheme(e),await ve._setTheme(e)},loadLang:async e=>{let t=await ve.clientPromise,o=zr(e);!o||ve.loadedLangs.has(o.id)||(await t.run("loadLanguage",{lang:{...o,grammar:o.grammar??await Wx(o)}}),ve.loadedLangs.add(o.id))},tokenizeCode:async(e,t)=>{let o=await ve.clientPromise,r=zr(t);return r?(ve.loadedLangs.has(r.id)||await ve.loadLang(r.id),await o.run("codeToThemedTokens",{code:e,lang:t,theme:ve.currentThemeUrl??cg[0]})):[]},destroy(){ve.currentTheme=null,ve.currentThemeUrl=null,sg({id:null,theme:null}),ve.client?.destroy()}}});var ta,ug=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/shikiCodeblocks.desktop/devicon.css",{name:"src/plugins/shikiCodeblocks.desktop/devicon.css",source:`@import url("https://cdn.jsdelivr.net/gh/devicons/devicon@v2.10.1/devicon.min.css");
  143. `,classNames:{},dom:null});ta="src/plugins/shikiCodeblocks.desktop/devicon.css"});var oa=g(()=>{"use strict";a()});var Pk,ar,pg=g(()=>{"use strict";a();$();ot();Pe();yn();w();ea();lg();ug();oa();Pk=Object.keys(An),ar=L({theme:{type:4,description:"Default themes",options:Pk.map(e=>({label:hn(Ku(e)),value:An[e],default:An[e]===An.DarkPlus})),onChange:ve.setTheme},customTheme:{type:0,description:"A link to a custom vscode theme",placeholder:An.MaterialCandy,onChange:e=>{ve.setTheme(e||ar.store.theme)}},tryHljs:{type:4,description:"Use the more lightweight default Discord highlighter and theme.",options:[{label:"Never",value:"NEVER"},{label:"Prefer Shiki instead of Highlight.js",value:"SECONDARY",default:!0},{label:"Prefer Highlight.js instead of Shiki",value:"PRIMARY"},{label:"Always",value:"ALWAYS"}]},useDevIcon:{type:4,description:"How to show language icons on codeblocks",options:[{label:"Disabled",value:"DISABLED"},{label:"Colorless",value:"GREYSCALE",default:!0},{label:"Colored",value:"COLOR"}],onChange:e=>{e==="DISABLED"?jt(ta):Tt(ta)}},bgOpacity:{type:5,description:"Background opacity",markers:[0,20,40,60,80,100],default:100,componentProps:{stickToMarkers:!1,onValueRender:null}}},{theme:{disabled(){return!!this.store.customTheme}},customTheme:{isValid(e){if(!e)return!0;let t=jc(e);return t?t.pathname.endsWith(".json")?!0:"Must be a json file":"Must be a valid URL"}}})});function Zx(e,t){let o=ar.use(e),[r,i]=_.useState(!1),s={...o,...t},l=s.customTheme||s.theme;if(t){let c=ve.currentThemeUrl&&l&&l!==ve.currentThemeUrl,u=Object.keys(t).length===0;r&&(!c||u)&&i(!1),!r&&c&&(i(!0),ve.setTheme(l))}return{...s,isThemeLoading:l!==ve.currentThemeUrl}}var Xx=g(()=>{"use strict";a();x();ea();pg()});function Jx(e){return e=e.slice(1),e.length<6&&(e=e.split("").map(t=>t+t).join("")),e.length===6&&(e+="ff"),e.length>6&&(e=e.slice(0,6)),e.split(/(..)/).filter(Boolean).map(t=>parseInt(t,16))}var Qx=g(()=>{"use strict";a()});var Ho,Vx,na=g(()=>{"use strict";a();ot();x();pc();oa();Ho=Be("shiki-"),Vx=({lang:e,tryHljs:t})=>{let o=e?br?.getLanguage?.(e):null,i=(e?zr(e):null)?.name;switch(t){case"ALWAYS":return!0;case"PRIMARY":return!!o||e==="";case"SECONDARY":return!i&&!!o;case"NEVER":return!1;default:return!1}}});function ew(e){let[t,o]=_.useState(!1);function r(i){oo.copy(i),o(!0),setTimeout(()=>{o(!1)},e)}return[t,r]}var tw=g(()=>{"use strict";a();x()});function ow({content:e,...t}){let[o,r]=ew(1e3);return n("button",{...t,style:{...t.style,cursor:o?"default":void 0},onClick:()=>r(e)},o?"Copied!":"Copy")}var nw=g(()=>{"use strict";a();tw()});function rw({content:e,theme:t}){let o=[];return oo.SUPPORTS_COPY&&o.push(n(ow,{content:e,className:Ho("btn"),style:{backgroundColor:t.accentBgColor,color:t.accentFgColor}})),n("div",{className:Ho("btns")},o)}var iw=g(()=>{"use strict";a();x();na();nw()});var sw,aw=g(()=>{"use strict";a();x();na();sw=({theme:e,useHljs:t,lang:o,content:r,tokens:i})=>{let s;if(t)try{let{value:c}=br.highlight(o,r,!0);s=c.split(`
  144. `).map((u,p)=>n("span",{key:p,dangerouslySetInnerHTML:{__html:u}}))}catch{s=r.split(`
  145. `).map(c=>n("span",null,c))}else s=(i??r.split(`
  146. `).map(u=>[{color:e.plainColor,content:u}])).map(u=>u.length===0?n("span",null,`
  147. `):n(f,null,u.map(({content:p,color:m,fontStyle:h},v)=>n("span",{key:v,style:{color:m,fontStyle:(h??0)&1?"italic":void 0,fontWeight:(h??0)&2?"bold":void 0,textDecoration:(h??0)&4?"underline":void 0}},p))));let l=s.map((c,u)=>n("tr",{key:u},n("td",{style:{color:e.plainColor}},u+1),n("td",null,c)));return n("table",{className:Ho("table")},...l)}});function lw({langName:e,useDevIcon:t,shikiLang:o}){return e?n("div",{className:Ho("lang")},t!=="DISABLED"&&o?.devicon&&n("i",{className:`${Ho("devicon")} devicon-${o.devicon}${t==="COLOR"?" colored":""}`}),e):n(f,null)}var cw=g(()=>{"use strict";a();oa();na()});var dc,Ik,uw=g(()=>{"use strict";a();le();ut();x();pc();ea();Xx();ag();Qx();na();iw();aw();cw();dc=e=>n("pre",{className:Ho("container")},n(U,null,n(Ik,{...e}))),Ik=({lang:e,content:t,isPreview:o,tempSettings:r})=>{let{tryHljs:i,useDevIcon:s,bgOpacity:l}=Zx(["tryHljs","useDevIcon","bgOpacity"],r),{id:c,theme:u}=Hx(),p=e?zr(e):null,m=Vx({lang:e,tryHljs:i}),[h,v]=qc(!0),[T]=lt(async()=>!p||m||!v?null:await ve.tokenizeCode(t,e),{fallbackValue:null,deps:[e,t,c,v]}),N={plainColor:u?.fg||"var(--text-normal)",accentBgColor:u?.colors?.["statusBar.background"]||(m?"#7289da":"#007BC8"),accentFgColor:u?.colors?.["statusBar.foreground"]||"#FFF",backgroundColor:u?.colors?.["editor.background"]||"var(--background-secondary)"},b;return e&&(b=m?br?.getLanguage?.(e)?.name:p?.name),n("div",{ref:h,className:Ho("root",{plain:!b,preview:o}),style:{backgroundColor:m?N.backgroundColor:`rgba(${Jx(N.backgroundColor).concat(l/100).join(", ")})`,color:N.plainColor}},n("code",null,n(lw,{langName:b,useDevIcon:s,shikiLang:p}),n(sw,{theme:N,useHljs:m,lang:e,content:t,tokens:T}),!o&&n(rw,{content:t,theme:N})))}});var pw,dw,mw=g(()=>{"use strict";a();pw=new Map,dw=()=>{pw.forEach(e=>e.remove()),pw.clear()}});var dg,fw=g(()=>{"use strict";a();Lx();ot();I();w();_x();ea();uw();ug();pg();oa();mw();dg=y({name:"ShikiCodeblocks",description:"Brings vscode-style codeblocks into Discord, powered by Shiki",authors:[d.Vap],patches:[{find:"codeBlock:{react(",replacement:{match:/codeBlock:\{react\((\i),(\i),(\i)\)\{/,replace:"$&return $self.renderHighlighter($1,$2,$3);"}},{find:".PREVIEW_NUM_LINES",replacement:{match:/(?<=function \i\((\i)\)\{)(?=let\{text:\i,language:)/,replace:"return $self.renderHighlighter({lang:$1.language,content:$1.text});"}}],start:async()=>{ar.store.useDevIcon!=="DISABLED"&&Tt(ta),await ve.init(ar.store.customTheme||ar.store.theme)},stop:()=>{ve.destroy(),dw()},settingsAboutComponent:({tempSettings:e})=>dc({lang:"tsx",content:Ex,isPreview:!0,tempSettings:e}),settings:ar,shiki:ve,createHighlighter:dc,renderHighlighter:({lang:e,content:t})=>dc({lang:e?.toLowerCase(),content:t,isPreview:!1})})});var mg,gw=g(()=>{"use strict";a();I();w();mg=y({name:"ShowAllMessageButtons",description:"Always show all message buttons no matter if you are holding the shift key or not.",authors:[d.Nuckyz],patches:[{find:".Messages.MESSAGE_UTILITIES_A11Y_LABEL",replacement:{match:/isExpanded:\i&&(.+?),/,replace:"isExpanded:$1,"}}]})});var hw=g(()=>{});function vw(){let e=qi(yw.colors.INTERACTIVE_MUTED).hex(),t=qi(yw.colors.INTERACTIVE_ACTIVE).hex();return n(Ak,{color:e,forcedIconColor:t,size:16,tooltipText:Qe.Messages.CONNECTION_VERIFIED})}var yw,Ak,Sw=g(()=>{"use strict";a();W();x();yw=Vt(e=>e.colors?.INTERACTIVE_MUTED?.css),Ak=je(".CONNECTIONS_ROLE_OFFICIAL_ICON_TOOLTIP")});function bw({id:e,theme:t}){let o=uo.getUserProfile(e);if(!o)return null;let r=o.connectedAccounts;return r?.length?n(Nk,null,n(Q,{tag:"h2",variant:"eyebrow",style:{color:"var(--header-primary)"}},"Connections"),n(ce,{style:{marginTop:"8px",gap:Dk(mc.store.iconSpacing),flexWrap:"wrap"}},r.map(i=>n(_k,{connection:i,theme:t})))):null}function _k({connection:e,theme:t}){let o=kk.get(e.type),r=o.getPlatformUserUrl?.(e),i=n("img",{"aria-label":e.name,src:t==="light"?o.icon.lightSVG:o.icon.darkSVG,style:{width:mc.store.iconSize,height:mc.store.iconSize}}),s=r?pi:Ka;return n(ee,{text:n("span",{className:"vc-sc-tooltip"},e.name,e.verified&&n(vw,null),n(s,{height:16,width:16})),key:e.id},l=>r?n("a",{...l,className:"vc-user-connection",href:r,target:"_blank",onClick:c=>{Vencord.Plugins.isPluginEnabled("OpenInApp")&&Vencord.Plugins.plugins.OpenInApp.handleLink(c.currentTarget,c)}},i):n("button",{...l,className:"vc-user-connection",onClick:()=>vo(e.name)},i))}var Nk,Ck,kk,Rk,Dk,mc,Lk,Ek,fg,Tw=g(()=>{"use strict";a();hw();$();le();Ct();Dt();I();Pe();w();W();x();Sw();Nk=je(".lastSection","children:"),Ck=we("ThemeStore"),kk=A("isSupported","getByUrl"),Rk=cn(',"--profile-gradient-primary-color"'),Dk=e=>(e??0)*2+4,mc=L({iconSize:{type:1,description:"Icon size (px)",default:32},iconSpacing:{type:4,description:"Icon margin",default:1,options:[{label:"Compact",value:0},{label:"Cozy",value:1},{label:"Roomy",value:2}]}}),Lk=U.wrap(({user:e,displayProfile:t})=>n(bw,{id:e.id,theme:Rk(e,t).profileTheme})),Ek=U.wrap(({id:e})=>n(bw,{id:e,theme:Ck.theme}));fg=y({name:"ShowConnections",description:"Show connected accounts in user popouts",authors:[d.TheKodeToad],patches:[{find:"{isUsingGuildBio:null!==(",replacement:{match:/,theme:\i\}\)(?=,.{0,150}setNote:)/,replace:"$&,$self.profilePopoutComponent({ user: arguments[0].user, displayProfile: arguments[0].displayProfile })"}},{find:'"Profile Panel: user cannot be undefined"',replacement:{match:/\(0,\i\.jsx\)\(\i\.\i,\{\}\).{0,100}setNote:(?=.+?channelId:(\i).id)/,replace:"$self.profilePanelComponent({ id: $1.recipients[0] }),$&"}}],settings:mc,profilePopoutComponent:Lk,profilePanelComponent:Ek})});var xw=g(()=>{});function qk({channel:e}){let[t,o]=X(lr.store.defaultAllowedUsersAndRolesDropdownState),[r,i]=X([]),{type:s,topic:l,lastMessageId:c,defaultForumLayout:u,lastPinTimestamp:p,defaultAutoArchiveDuration:m,availableTags:h,id:v,rateLimitPerUser:T,defaultThreadRateLimitPerUser:N,defaultSortOrder:b,defaultReactionEmoji:P,bitrate:k,rtcRegion:M,videoQualityMode:O,permissionOverwrites:H,guild_id:Z}=e;return ue(()=>{let K=[],q=pe.getGuild(Z).ownerId;Ee.getMember(Z,q)||K.push(q),Object.values(H).forEach(({type:D,id:V})=>{D===1&&!Ee.getMember(Z,V)&&K.push(V)}),K.length>0&&B.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[Z],userIds:K}),E.plugins.PermissionsViewer.enabled&&i($l(Object.values(H).map(D=>({type:D.type,id:D.id,overwriteAllow:D.allow,overwriteDeny:D.deny})),Z))},[v]),n("div",{className:ww.auto+" "+ww.customTheme+" "+Ok.chatContent+" shc-lock-screen-outer-container"},n("div",{className:"shc-lock-screen-container"},n("img",{className:"shc-lock-screen-logo",src:Wk}),n("div",{className:"shc-lock-screen-heading-container"},n(Q,{variant:"heading-xxl/bold"},"This is a ",Le.can(Te.VIEW_CHANNEL,e)?"locked":"hidden"," ",Gk[s]," channel."),e.isNSFW()&&n(ee,{text:"NSFW"},({onMouseLeave:K,onMouseEnter:q})=>n("svg",{onMouseLeave:K,onMouseEnter:q,className:"shc-lock-screen-heading-nsfw-icon",width:"32",height:"32",viewBox:"0 0 48 48","aria-hidden":!0,role:"img"},n("path",{fill:"currentColor",d:"M.7 43.05 24 2.85l23.3 40.2Zm23.55-6.25q.75 0 1.275-.525.525-.525.525-1.275 0-.75-.525-1.3t-1.275-.55q-.8 0-1.325.55-.525.55-.525 1.3t.55 1.275q.55.525 1.3.525Zm-1.85-6.1h3.65V19.4H22.4Z"})))),!e.isGuildVoice()&&!e.isGuildStageVoice()&&n(Q,{variant:"text-lg/normal"},"You can not see the ",e.isForumChannel()?"posts":"messages"," of this channel.",e.isForumChannel()&&l&&l.length>0&&" However you may see its guidelines:"),e.isForumChannel()&&l&&l.length>0&&n("div",{className:"shc-lock-screen-topic-container"},_e.parseTopic(l,!1,{channelId:v})),c&&n(Q,{variant:"text-md/normal"},"Last ",e.isForumChannel()?"post":"message"," created:",n(Wo,{timestamp:yo(Ko.extractTimestamp(c))})),p&&n(Q,{variant:"text-md/normal"},"Last message pin: ",n(Wo,{timestamp:yo(p)})),(T??0)>0&&n(Q,{variant:"text-md/normal"},"Slowmode: ",vs(T,"seconds")),(N??0)>0&&n(Q,{variant:"text-md/normal"},"Default thread slowmode: ",vs(N,"seconds")),(e.isGuildVoice()||e.isGuildStageVoice())&&k!=null&&n(Q,{variant:"text-md/normal"},"Bitrate: ",k," bits"),M!==void 0&&n(Q,{variant:"text-md/normal"},"Region: ",M??"Automatic"),(e.isGuildVoice()||e.isGuildStageVoice())&&n(Q,{variant:"text-md/normal"},"Video quality mode: ",jk[O??1]),(m??0)>0&&n(Q,{variant:"text-md/normal"},"Default inactivity duration before archiving ",e.isForumChannel()?"posts":"threads",":"," "+vs(m,"minutes")),u!=null&&n(Q,{variant:"text-md/normal"},"Default layout: ",zk[u]),b!=null&&n(Q,{variant:"text-md/normal"},"Default sort order: ",Hk[b]),P!=null&&n("div",{className:"shc-lock-screen-default-emoji-container"},n(Q,{variant:"text-md/normal"},"Default reaction emoji:"),_e.defaultRules[P.emojiName?"emoji":"customEmoji"].react({name:P.emojiName?Uk.convertSurrogateToName(P.emojiName):Ro.getCustomEmojiById(P.emojiId)?.name??"",emojiId:P.emojiId??void 0,surrogate:P.emojiName??void 0,src:P.emojiName?$k.getURL(P.emojiName):void 0},void 0,{key:"0"})),e.hasFlag(16)&&n(Q,{variant:"text-md/normal"},"Posts on this forum require a tag to be set."),h&&h.length>0&&n("div",{className:"shc-lock-screen-tags-container"},n(Q,{variant:"text-lg/bold"},"Available tags:"),n("div",{className:"shc-lock-screen-tags"},h.map(K=>n(Fk,{tag:K})))),n("div",{className:"shc-lock-screen-allowed-users-and-roles-container"},n("div",{className:"shc-lock-screen-allowed-users-and-roles-container-title"},E.plugins.PermissionsViewer.enabled&&n(ee,{text:"Permission Details"},({onMouseLeave:K,onMouseEnter:q})=>n("button",{onMouseLeave:K,onMouseEnter:q,className:"shc-lock-screen-allowed-users-and-roles-container-permdetails-btn",onClick:()=>Ii(r,pe.getGuild(e.guild_id),e.name)},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M7 12.001C7 10.8964 6.10457 10.001 5 10.001C3.89543 10.001 3 10.8964 3 12.001C3 13.1055 3.89543 14.001 5 14.001C6.10457 14.001 7 13.1055 7 12.001ZM14 12.001C14 10.8964 13.1046 10.001 12 10.001C10.8954 10.001 10 10.8964 10 12.001C10 13.1055 10.8954 14.001 12 14.001C13.1046 14.001 14 13.1055 14 12.001ZM19 10.001C20.1046 10.001 21 10.8964 21 12.001C21 13.1055 20.1046 14.001 19 14.001C17.8954 14.001 17 13.1055 17 12.001C17 10.8964 17.8954 10.001 19 10.001Z"})))),n(Q,{variant:"text-lg/bold"},"Allowed users and roles:"),n(ee,{text:t?"Hide Allowed Users and Roles":"View Allowed Users and Roles"},({onMouseLeave:K,onMouseEnter:q})=>n("button",{onMouseLeave:K,onMouseEnter:q,className:"shc-lock-screen-allowed-users-and-roles-container-toggle-btn",onClick:()=>o(D=>!D)},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24",transform:t?"scale(1 -1)":"scale(1 1)"},n("path",{fill:"currentColor",d:"M16.59 8.59003L12 13.17L7.41 8.59003L6 10L12 16L18 10L16.59 8.59003Z"}))))),t&&n(Bk,{channel:e}))))}var ww,Ok,Bk,Fk,Uk,$k,Gk,Hk,zk,jk,Wk,Mw,Pw=g(()=>{"use strict";a();$();le();yn();W();x();Ws();js();gg();ww=A("auto","content","scrollerBase"),Ok=A("chat","content","noChat","chatContent"),Bk=je(".Messages.ROLE_REQUIRED_SINGLE_USER_MESSAGE"),Fk=Ec(e=>{if(typeof e!="function")return!1;let t=Function.prototype.toString.call(e);return t.includes(".Messages.FORUM_TAG_A11Y_FILTER_BY_TAG")&&!t.includes("increasedActivityPill")}),Uk=A("convertSurrogateToName"),$k=A("getURL","getEmojiColors"),Gk={[0]:"text",[5]:"announcement",[15]:"forum",[2]:"voice",[13]:"stage"},Hk={[0]:"Latest activity",[1]:"Creation date"},zk={[0]:"Not set",[1]:"List view",[2]:"Gallery view"},jk={[1]:"Automatic",[2]:"720p"},Wk="/assets/433e3ec4319a9d11b0cbe39342614982.svg";Mw=U.wrap(qk)});var Iw,lr,hg,gg=g(()=>{"use strict";a();xw();$();le();I();qr();w();W();x();Pw();Iw=A("channelEmoji","unread","icon"),lr=L({hideUnreads:{description:"Hide Unreads",type:3,default:!0,restartNeeded:!0},showMode:{description:"The mode used to display hidden channels.",type:4,options:[{label:"Plain style with Lock Icon instead",value:0,default:!0},{label:"Muted style with hidden eye icon on the right",value:1}],restartNeeded:!0},defaultAllowedUsersAndRolesDropdownState:{description:"Whether the allowed users and roles dropdown on hidden channels should be open by default",type:3,default:!0}}),hg=y({name:"ShowHiddenChannels",description:"Show channels that you do not have access to view.",authors:[d.BigDuck,d.AverageReactEnjoyer,d.D3SOX,d.Ven,d.Nuckyz,d.Nickyux,d.dzshn],settings:lr,patches:[{find:'"placeholder-channel-id"',replacement:[{match:/if\(!\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL.+?{if\(this\.id===\i\).+?threadIds:\i}}/,replace:""},{match:/(?=!\(0,\i\.getHasImportantUnread\)\(this\.record\))/,replace:"$self.isHiddenChannel(this.record)||"},{match:/(activeJoinedRelevantThreads:.{0,50}VIEW_CHANNEL.+?renderLevel:(.+?),threadIds.+?renderLevel:).+?(?=,threadIds)/g,replace:(e,t,o)=>`${t}${o}`},{match:/(?<=getRenderLevel\(\i\){.+?return)!\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL,this\.record\)\|\|/,replace:" "}]},{find:"VoiceChannel, transitionTo: Channel does not have a guildId",replacement:[{match:/(?<=getCurrentClientVoiceChannelId\((\i)\.guild_id\);return)/,replace:(e,t)=>`!$self.isHiddenChannel(${t})&&`},{match:/(?=&&\i\.\i\.selectVoiceChannel\((\i)\.id\))/,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`},{match:/!__OVERLAY__&&\((?<=selectVoiceChannel\((\i)\.id\).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t},true)||`}]},{find:".MAX_STAGE_VOICE_USER_LIMIT})",replacement:{match:/!(\i)\.isRoleSubscriptionTemplatePreviewChannel\(\)/,replace:(e,t)=>`${e}&&!$self.isHiddenChannel(${t})`}},{find:"ChannelItemEditButton:function(){",replacement:[...["renderEditButton","renderInviteButton"].map(e=>({match:new RegExp(`(?<=${e}\\(\\){)`,"g"),replace:"if($self.isHiddenChannel(this.props.channel))return null;"}))]},{find:"VoiceChannel.renderPopout: There must always be something to render",all:!0,replacement:{match:/(?<=renderOpenChatButton=\(\)=>{)/,replace:"if($self.isHiddenChannel(this.props.channel))return null;"}},{find:".Messages.CHANNEL_TOOLTIP_DIRECTORY",predicate:()=>lr.store.showMode===0,replacement:{match:/(?=switch\((\i)\.type\).{0,30}\.GUILD_ANNOUNCEMENT.{0,70}\(0,\i\.\i\))/,replace:(e,t)=>`if($self.isHiddenChannel(${t}))return $self.LockIcon;`}},{find:"UNREAD_IMPORTANT:",predicate:()=>lr.store.showMode===1,replacement:[{match:/(?<={channel:(\i),name:\i,muted:(\i).+?;)/,replace:(e,t,o)=>`${o}=$self.isHiddenChannel(${t})?true:${o};`},{match:/\i\.children.+?:null(?<=,channel:(\i).+?)/,replace:(e,t)=>`${e},$self.isHiddenChannel(${t})?$self.HiddenChannelIcon():null`},{match:/(?<=\.wrapper:\i\.notInteractive,)(.+?)if\((\i)\)return (\i\.MUTED);/,replace:(e,t,o,r)=>`${o}?${r}:"",${t}if(${o})return "";`}]},{find:"UNREAD_IMPORTANT:",replacement:[{predicate:()=>lr.store.hideUnreads===!1&&lr.store.showMode===1,match:/\.LOCKED;if\((?<={channel:(\i).+?)/,replace:(e,t)=>`${e}!$self.isHiddenChannel(${t})&&`},{predicate:()=>lr.store.hideUnreads===!0,match:/(?<={channel:(\i),name:\i,.+?unread:(\i).+?;)/,replace:(e,t,o)=>`${o}=$self.isHiddenChannel(${t})?false:${o};`}]},{find:'.displayName="ChannelListUnreadsStore"',replacement:{match:/(?<=if\(null==(\i))(?=.{0,160}?getHasImportantUnread\)\(\i\))/g,replace:(e,t)=>`||$self.isHiddenChannel(${t})`}},{find:"renderBottomUnread(){",replacement:{match:/(?=&&\(0,\i\.getHasImportantUnread\)\((\i\.record)\))/,replace:"&&!$self.isHiddenChannel($1)"}},{find:".useFlattenedChannelIdListWithThreads)",replacement:{match:/(?=&&\(0,\i\.getHasImportantUnread\)\((\i)\))/,replace:"&&!$self.isHiddenChannel($1)"}},{find:"Missing channel in Channel.renderHeaderToolbar",replacement:[{match:/(?<=renderHeaderToolbar=\(\)=>{.+?case \i\.\i\.GUILD_TEXT:)(?=.+?(\i\.push.{0,50}channel:(\i)},"notifications"\)\)))(?<=isLurking:(\i).+?)/,replace:(e,t,o,r)=>`if(!${r}&&$self.isHiddenChannel(${o})){${t};break;}`},{match:/(?<=renderHeaderToolbar=\(\)=>{.+?case \i\.\i\.GUILD_MEDIA:)(?=.+?(\i\.push.{0,40}channel:(\i)},"notifications"\)\)))(?<=isLurking:(\i).+?)/,replace:(e,t,o,r)=>`if(!${r}&&$self.isHiddenChannel(${o})){${t};break;}`},{match:/renderMobileToolbar=\(\)=>{.+?case \i\.\i\.GUILD_DIRECTORY:(?<=let{channel:(\i).+?)/,replace:(e,t)=>`${e}if($self.isHiddenChannel(${t}))break;`},{match:/(?<=renderHeaderBar=\(\)=>{.+?hideSearch:(\i)\.isDirectory\(\))/,replace:(e,t)=>`||$self.isHiddenChannel(${t})`},{match:/(?<=renderSidebar\(\){)/,replace:"if($self.isHiddenChannel(this.props.channel))return null;"},{match:/(?<=renderChat\(\){)/,replace:"if($self.isHiddenChannel(this.props.channel))return $self.HiddenChannelLockScreen(this.props.channel);"}]},{find:'"MessageManager"',replacement:{match:/"Skipping fetch because channelId is a static route"\);return}(?=.+?getChannel\((\i)\))/,replace:(e,t)=>`${e}if($self.isHiddenChannel({channelId:${t}}))return;`}},{find:'"alt+shift+down"',replacement:{match:/(?<=getChannel\(\i\);return null!=(\i))(?=.{0,150}?getHasImportantUnread\)\(\i\))/,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`}},{find:".APPLICATION_STORE&&null!=",replacement:{match:/(?<=getState\(\)\.channelId.{0,30}?\(0,\i\.\i\)\(\i\))(?=\.map\()/,replace:".filter(e=>!$self.isHiddenChannel(e))"}},{find:".Messages.ROLE_REQUIRED_SINGLE_USER_MESSAGE",replacement:[{match:/ADMINISTRATOR\)\|\|(?<=context:(\i)}.+?)(?=(.+?)VIEW_CHANNEL)/,replace:(e,t,o)=>`${e}!Vencord.Webpack.Common.PermissionStore.can(${Te.CONNECT}n,${t})?${o}CONNECT):`},{match:/permissionOverwrites\[.+?\i=(?<=context:(\i)}.+?)(?=(.+?)VIEW_CHANNEL)/,replace:(e,t,o)=>`${e}!Vencord.Webpack.Common.PermissionStore.can(${Te.CONNECT}n,${t})?${o}CONNECT):`},{match:/sortBy.{0,30}?\.filter\(\i=>(?<=channel:(\i).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?true:`},{match:/computePermissionsForRoles.+?.value\(\)(?<=channel:(\i).+?)/,replace:(e,t)=>`${e}.reduce(...$self.makeAllowedRolesReduce(${t}.guild_id))`},{match:/MANAGE_ROLES.{0,90}?return(?=\(.+?(\(0,\i\.jsxs\)\("div",{className:\i\.members.+?guildId:(\i)\.guild_id.+?roleColor.+?\]}\)))/,replace:(e,t,o)=>(t=t.replace(an(/(?<=users:\i)/),`,shcChannel:${o}`),t=t.replace(an(/1!==\i\.length/),"true"),`${e} $self.isHiddenChannel(${o},true)?${t}:`)}]},{find:".avatars),children",replacement:[{match:/maxUsers:\i,users:\i.+?=(\i).+?;/,replace:(e,t)=>`${e}let{shcChannel}=${t};`},{match:/\i>0(?=&&.{0,60}renderPopout)/,replace:e=>`($self.isHiddenChannel(shcChannel,true)?true:${e})`},{match:/(?<=\.value\(\),(\i)=.+?length-)1(?=\]=.{0,60}renderPopout)/,replace:(e,t)=>`($self.isHiddenChannel(shcChannel,true)&&${t}<=0?0:1)`},{match:/(?<="\+",)(\i)\+1/,replace:(e,t)=>`$self.isHiddenChannel(shcChannel,true)&&${t}<=0?"":${e}`}]},{find:".Messages.CHANNEL_CALL_CURRENT_SPEAKER.format",replacement:[{match:/"more-options-popout"\)\),(?<=let{channel:(\i).+?inCall:(\i).+?)/,replace:(e,t,o)=>`${e}${o}||!$self.isHiddenChannel(${t},true)&&`},{match:/"popup".{0,100}?if\((?<=let{channel:(\i).+?inCall:(\i).+?)/,replace:(e,t,o)=>`${e}(${o}||!$self.isHiddenChannel(${t},true))&&`}]},{find:".Messages.EMBEDDED_ACTIVITIES_DEVELOPER_ACTIVITY_SHELF_FETCH_ERROR",replacement:[{match:/renderContent\(\i\){.+?this\.renderVoiceChannelEffects.+?children:/,replace:"$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?$self.HiddenChannelLockScreen(this.props.channel):"},{match:/renderContent\(\i\){.+?disableGradients:/,replace:"$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)||"},{match:/(?:{|,)render(?!Header|ExternalHeader).{0,30}?:/g,replace:"$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?()=>null:"},{match:/callContainer,(?<=\i\.callContainer,)/,replace:'$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?"":'}]},{find:'"HasBeenInStageChannel"',replacement:[{match:/"124px".+?children:(?<=let \i,{channel:(\i).+?)(?=.{0,20}?}\)}function)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?$self.HiddenChannelLockScreen(${t}):`},{match:/render(?:BottomLeft|BottomCenter|BottomRight|ChatToasts):\(\)=>(?<=let \i,{channel:(\i).+?)/g,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?null:`},{match:/"124px".+?disableGradients:(?<=let \i,{channel:(\i).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})||`},{match:/"124px".+?style:(?<=let \i,{channel:(\i).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?void 0:`}]},{find:".Messages.STAGE_FULL_MODERATOR_TITLE",replacement:[{match:/\(0,\i\.jsx\)\(\i\.\i\.Divider.+?}\)]}\)(?=.+?:(\i)\.guild_id)/,replace:(e,t)=>`$self.isHiddenChannel(${t})?null:(${e})`},{match:/"recents".+?&&(?=\(.+?channelId:(\i)\.id,showRequestToSpeakSidebar)/,replace:(e,t)=>`${e}!$self.isHiddenChannel(${t})&&`}]},{find:",queryStaticRouteChannels(",replacement:[{match:/(?<=queryChannels\(\i\){.+?getChannels\(\i)(?=\))/,replace:",true"},{match:/(?<=queryChannels\(\i\){.+?isGuildChannelType\)\((\i)\.type\))(?=&&!\i\.\i\.can\()/,replace:"&&!$self.isHiddenChannel($1)"}]},{find:'"^/guild-stages/(\\\\d+)(?:/)?(\\\\d+)?"',replacement:{match:/\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL,\i\)/,replace:"true"}},{find:".shouldCloseDefaultModals",replacement:{match:/(?<=getChannel\(\i\);if\(null!=(\i))(?=.{0,100}?selectVoiceChannel)/,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`}},{find:'.displayName="GuildChannelStore"',replacement:[{match:/isChannelGated\(.+?\)(?=&&)/,replace:e=>`${e}&&false`},{match:/(?<=getChannels\(\i)(\){.+?)return (.+?)}/,replace:(e,t,o)=>`,shouldIncludeHidden${t}return $self.resolveGuildChannels(${o},shouldIncludeHidden??false);}`}]},{find:".Messages.FORM_LABEL_MUTED",replacement:{match:/(?<=getChannels\(\i)(?=\))/,replace:",true"}},{find:'.displayName="NowPlayingViewStore"',replacement:{match:/(getVoiceStateForUser.{0,150}?)&&\i\.\i\.canWithPartialContext.{0,20}VIEW_CHANNEL.+?}\)(?=\?)/,replace:"$1"}}],isHiddenChannel(e,t=!1){return!e||(e.channelId&&(e=J.getChannel(e.channelId)),!e||e.isDM()||e.isGroupDM()||e.isMultiUserDM())?!1:!Le.can(Te.VIEW_CHANNEL,e)||t&&!Le.can(Te.CONNECT,e)},resolveGuildChannels(e,t){if(t)return e;let o={};for(let[r,i]of Object.entries(e)){if(!Array.isArray(i)){o[r]=i;continue}o[r]??=[];for(let s of i)(s.channel.id===null||!this.isHiddenChannel(s.channel))&&o[r].push(s)}return o},makeAllowedRolesReduce(e){return[(t,o,r,i)=>{if(r!==0)return t;let s=i.find(l=>l.id===e);return s?[s]:i},[]]},HiddenChannelLockScreen:e=>n(Mw,{channel:e}),LockIcon:U.wrap(()=>n("svg",{className:Iw.icon,height:"18",width:"20",viewBox:"0 0 24 24","aria-hidden":!0,role:"img"},n("path",{className:"shc-evenodd-fill-current-color",d:"M17 11V7C17 4.243 14.756 2 12 2C9.242 2 7 4.243 7 7V11C5.897 11 5 11.896 5 13V20C5 21.103 5.897 22 7 22H17C18.103 22 19 21.103 19 20V13C19 11.896 18.103 11 17 11ZM12 18C11.172 18 10.5 17.328 10.5 16.5C10.5 15.672 11.172 15 12 15C12.828 15 13.5 15.672 13.5 16.5C13.5 17.328 12.828 18 12 18ZM15 11H9V7C9 5.346 10.346 4 12 4C13.654 4 15 5.346 15 7V11Z"})),{noop:!0}),HiddenChannelIcon:U.wrap(()=>n(ee,{text:"Hidden Channel"},({onMouseLeave:e,onMouseEnter:t})=>n("svg",{onMouseLeave:e,onMouseEnter:t,className:Iw.icon+" shc-hidden-channel-icon",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":!0,role:"img"},n("path",{className:"shc-evenodd-fill-current-color",d:"m19.8 22.6-4.2-4.15q-.875.275-1.762.413Q12.95 19 12 19q-3.775 0-6.725-2.087Q2.325 14.825 1 11.5q.525-1.325 1.325-2.463Q3.125 7.9 4.15 7L1.4 4.2l1.4-1.4 18.4 18.4ZM12 16q.275 0 .512-.025.238-.025.513-.1l-5.4-5.4q-.075.275-.1.513-.025.237-.025.512 0 1.875 1.312 3.188Q10.125 16 12 16Zm7.3.45-3.175-3.15q.175-.425.275-.862.1-.438.1-.938 0-1.875-1.312-3.188Q13.875 7 12 7q-.5 0-.938.1-.437.1-.862.3L7.65 4.85q1.025-.425 2.1-.638Q10.825 4 12 4q3.775 0 6.725 2.087Q21.675 8.175 23 11.5q-.575 1.475-1.512 2.738Q20.55 15.5 19.3 16.45Zm-4.625-4.6-3-3q.7-.125 1.288.112.587.238 1.012.688.425.45.613 1.038.187.587.087 1.162Z"}))),{noop:!0})})});var Aw=g(()=>{});var ra,yg,Nw=g(()=>{"use strict";a();Aw();$();I();w();ra=L({mode:{type:4,description:"How to display usernames and nicks",options:[{label:"Username then nickname",value:"user-nick",default:!0},{label:"Nickname then username",value:"nick-user"},{label:"Username only",value:"user"}]},displayNames:{type:3,description:"Use display names in place of usernames",default:!1},inReplies:{type:3,default:!1,description:"Also apply functionality to reply previews"}}),yg=y({name:"ShowMeYourName",description:"Display usernames next to nicks, or no nicks at all",authors:[d.Rini,d.TheKodeToad],patches:[{find:".useCanSeeRemixBadge)",replacement:{match:/(?<=onContextMenu:\i,children:).*?\}/,replace:"$self.renderUsername(arguments[0])}"}}],settings:ra,renderUsername:({author:e,message:t,isRepliedMessage:o,withMentionPrefix:r,userOverride:i})=>{try{let s=i??t.author,{username:l}=s;ra.store.displayNames&&(l=s.globalName||l);let{nick:c}=e,u=r?"@":"";return l===c||o&&!ra.store.inReplies?u+c:ra.store.mode==="user-nick"?n(f,null,u,l," ",n("span",{className:"vc-smyn-suffix"},c)):ra.store.mode==="nick-user"?n(f,null,u,c," ",n("span",{className:"vc-smyn-suffix"},l)):u+l}catch{return e?.nick}}})});var vg,Cw=g(()=>{"use strict";a();I();w();vg=y({name:"ShowTimeouts",description:"Display member timeout icons in chat regardless of permissions.",authors:[d.Dolfies],patches:[{find:"showCommunicationDisabledStyles",replacement:{match:/&&\i\.\i\.canManageUser\(\i\.\i\.MODERATE_MEMBERS,\i\.author,\i\)/,replace:""}}]})});function Kk(e){let[t,o]=_.useState(Sg);function r(i){bg.store.persistState&&(Sg=i),o(i)}return _.useEffect(()=>{let i=(s,l)=>{t&&(bg.store.autoDisable&&r(!1),l.content.startsWith("@silent ")||(l.content="@silent "+l.content))};return Kt(i),()=>void Yt(i)},[t]),e.type.analyticsName!=="normal"?null:n(ee,{text:t?"Disable Silent Message":"Enable Silent Message"},i=>n("div",{style:{display:"flex"}},n(C,{...i,onClick:()=>r(!t),size:"",look:eo.BLANK,innerClassName:vt.button,style:{padding:"0 6px"}},n("div",{className:vt.buttonWrapper},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",mask:"url(#_)",d:"M18 10.7101C15.1085 9.84957 13 7.17102 13 4c0-.30736.0198-.6101.0582-.907C12.7147 3.03189 12.3611 3 12 3 8.686 3 6 5.686 6 9v5c0 1.657-1.344 3-3 3v1h18v-1c-1.656 0-3-1.343-3-3v-3.2899ZM8.55493 19c.693 1.19 1.96897 2 3.44497 2s2.752-.81 3.445-2H8.55493ZM18.2624 5.50209 21 2.5V1h-4.9651v1.49791h2.4411L16 5.61088V7h5V5.50209h-2.7376Z"}),!t&&n(f,null,n("mask",{id:"_"},n("path",{fill:"#fff",d:"M0 0h24v24H0Z"}),n("path",{stroke:"#000","stroke-width":"5.99068",d:"M0 24 24 0"})),n("path",{fill:"var(--status-danger)",d:"m21.178 1.70703 1.414 1.414L4.12103 21.593l-1.414-1.415L21.178 1.70703Z"})))))))}var Sg,bg,Tg,kw=g(()=>{"use strict";a();tn();$();le();I();w();x();Sg=!1,bg=L({persistState:{type:3,description:"Whether to persist the state of the silent message toggle when changing channels",default:!1,onChange(e){e===!1&&(Sg=!1)}},autoDisable:{type:3,description:"Automatically disable the silent message toggle again after sending one",default:!0}});Tg=y({name:"SilentMessageToggle",authors:[d.Nuckyz,d.CatNoir],description:"Adds a button to the chat bar to toggle sending a silent message.",dependencies:["MessageEventsAPI"],settings:bg,patches:[{find:"ChannelTextAreaButtons",replacement:{match:/(\i)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&,(()=>{try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}})()"}}],chatBarIcon:U.wrap(Kk,{noop:!0})})});function Yk(e){let{isEnabled:t}=Nn.use(["isEnabled"]),o=()=>Nn.store.isEnabled=!Nn.store.isEnabled;return e.type.analyticsName!=="normal"?null:n(ee,{text:t?"Disable Silent Typing":"Enable Silent Typing"},r=>n("div",{style:{display:"flex"}},n(C,{...r,onClick:o,size:"",look:eo.BLANK,innerClassName:vt.button,style:{padding:"0 6px"}},n("div",{className:vt.buttonWrapper},n("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},n("path",{fill:"currentColor",d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}),t&&n("path",{d:"M13 432L590 48",stroke:"var(--red-500)","stroke-width":"72","stroke-linecap":"round"}))))))}var Nn,xg,Rw=g(()=>{"use strict";a();so();$();le();I();w();x();Nn=L({showIcon:{type:3,default:!1,description:"Show an icon for toggling the plugin",restartNeeded:!0},isEnabled:{type:3,description:"Toggle functionality",default:!0}});xg=y({name:"SilentTyping",authors:[d.Ven,d.Rini],description:"Hide that you are typing",patches:[{find:'.dispatch({type:"TYPING_START_LOCAL"',replacement:{match:/startTyping\(\i\){.+?},stop/,replace:"startTyping:$self.startTyping,stop"}},{find:"ChannelTextAreaButtons",predicate:()=>Nn.store.showIcon,replacement:{match:/(\i)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&,(()=>{try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}})()"}}],dependencies:["CommandsAPI"],settings:Nn,commands:[{name:"silenttype",description:"Toggle whether you're hiding that you're typing or not.",inputType:0,options:[{name:"value",description:"whether to hide or not that you're typing (default is toggle)",required:!1,type:5}],execute:async(e,t)=>{Nn.store.isEnabled=!!ct(e,"value",!Nn.store.isEnabled),me(t.channel.id,{content:Nn.store.isEnabled?"Silent typing enabled!":"Silent typing disabled!"})}}],async startTyping(e){Nn.store.isEnabled||B.dispatch({type:"TYPING_START_LOCAL",channelId:e})},chatBarIcon:U.wrap(Yk,{noop:!0})})});var Dw,wg,Lw=g(()=>{"use strict";a();$();Ct();I();w();x();Dw=L({showDates:{type:3,description:"Show dates on friend requests",default:!1,restartNeeded:!0}}),wg=y({name:"SortFriendRequests",authors:[d.Megu],description:"Sorts friend requests by date of receipt",settings:Dw,patches:[{find:"getRelationshipCounts(){",replacement:{match:/\.sortBy\(\i=>\i\.comparator\)/,replace:".sortBy((row) => $self.sortList(row))"}},{find:".Messages.FRIEND_REQUEST_CANCEL",replacement:{predicate:()=>Dw.store.showDates,match:/subText:(\i)(?=,className:\i\.userInfo}\))(?<=user:(\i).+?)/,replace:(e,t,o)=>`subText:$self.makeSubtext(${t},${o})`}}],sortList(e){return e.type===3||e.type===4?-this.getSince(e.user):e.comparator},getSince(e){return new Date(at.getSince(e.id))},makeSubtext(e,t){let o=this.getSince(t);return n(ce,{flexDirection:"row",style:{gap:0,flexWrap:"wrap",lineHeight:"0.9rem"}},n("span",null,e),!isNaN(o.getTime())&&n("span",null,"Received \u2014 ",o.toDateString()))}})});var Ew,_w=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/spotifyControls/hoverOnly.css",{name:"src/plugins/spotifyControls/hoverOnly.css",source:`.vc-spotify-button-row {
  148. height: 0;
  149. opacity: 0;
  150. pointer-events: none;
  151. transition: 0.2s;
  152. transition-property: height;
  153. }
  154. #vc-spotify-player:hover .vc-spotify-button-row {
  155. opacity: 1;
  156. height: 32px;
  157. pointer-events: auto;
  158. /* only transition opacity on show to prevent clipping */
  159. transition-property: height, opacity;
  160. }
  161. `,classNames:{},dom:null});Ew="src/plugins/spotifyControls/hoverOnly.css"});var Ow=g(()=>{});var We,Bw=g(()=>{"use strict";a();$();W();x();We=Ao(()=>{let{Store:e}=Fc,t=ji("getActiveSocketAndDevice"),o=ji("SpotifyAPI"),r="https://api.spotify.com/v1/me/player";class i extends e{mPosition=0;start=0;track=null;device=null;isPlaying=!1;repeat="off";shuffle=!1;volume=0;isSettingPosition=!1;openExternal(c){let u=E.plugins.SpotifyControls.useSpotifyUris||Vencord.Plugins.isPluginEnabled("OpenInApp")?"spotify:"+c.replaceAll("/",(p,m)=>m===0?"":":"):"https://open.spotify.com"+c;VencordNative.native.openExternal(u)}get position(){let c=this.mPosition;return this.isPlaying&&(c+=Date.now()-this.start),c}set position(c){this.mPosition=c,this.start=Date.now()}prev(){this.req("post","/previous")}next(){this.req("post","/next")}setVolume(c){this.req("put","/volume",{query:{volume_percent:Math.round(c)}}).then(()=>{this.volume=c,this.emitChange()})}setPlaying(c){this.req("put",c?"/play":"/pause")}setRepeat(c){this.req("put","/repeat",{query:{state:c}})}setShuffle(c){this.req("put","/shuffle",{query:{state:c}}).then(()=>{this.shuffle=c,this.emitChange()})}seek(c){return this.isSettingPosition?Promise.resolve():(this.isSettingPosition=!0,this.req("put","/seek",{query:{position_ms:Math.round(c)}}).catch(u=>{console.error("[VencordSpotifyControls] Failed to seek",u),this.isSettingPosition=!1}))}req(c,u,p={}){this.device?.is_active&&((p.query??={}).device_id=this.device.id);let{socket:m}=t.getActiveSocketAndDevice();return o.SpotifyAPI[c](m.accountId,m.accessToken,{url:r+u,...p})}}let s=new i(B,{SPOTIFY_PLAYER_STATE(l){s.track=l.track,s.device=l.device??null,s.isPlaying=l.isPlaying??!1,s.volume=l.volumePercent??0,s.repeat=l.actual_repeat||"off",s.position=l.position??0,s.isSettingPosition=!1,s.emitChange()},SPOTIFY_SET_DEVICES({devices:l}){s.device=l.find(c=>c.is_active)??l[0]??null,s.emitChange()}});return s})});function Mg(e){let t=e/1e3/60,o=Math.floor(t),r=Math.floor((t-o)*60);return`${o.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`}function Oi(e,t){return()=>n("svg",{className:te(Xe("button-icon"),Xe(t)),height:"24",width:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":t,focusable:!1},n("path",{d:e}))}function ia(e){return n("button",{className:Xe("button"),...e},e.children)}function tR({name:e,path:t}){let o=`spotify-copy-${e}`,r=`spotify-open-${e}`;return n(G.Menu,{navId:`spotify-${e}-menu`,onClose:()=>B.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":`Spotify ${e} Menu`},n(G.MenuItem,{key:o,id:o,label:`Copy ${e} Link`,action:()=>vo("https://open.spotify.com"+t),icon:pi}),n(G.MenuItem,{key:r,id:r,label:`Open ${e} in Spotify`,action:()=>We.openExternal(t),icon:ys}))}function oR(e,t){return o=>Ut.openContextMenu(o,()=>n(tR,{name:e,path:t}))}function nR(){let[e,t,o]=Ke([We],()=>[We.isPlaying,We.shuffle,We.repeat]),[r,i]=(()=>{switch(o){case"off":return["context","repeat-off"];case"context":return["track","repeat-context"];case"track":return["off","repeat-track"];default:throw new Error(`Invalid repeat state ${o}`)}})();return n(ce,{className:Xe("button-row"),style:{gap:0}},n(ia,{className:te(Xe("button"),Xe(t?"shuffle-on":"shuffle-off")),onClick:()=>We.setShuffle(!t)},n(eR,null)),n(ia,{onClick:()=>We.prev()},n(Jk,null)),n(ia,{onClick:()=>We.setPlaying(!e)},e?n(Xk,null):n(Zk,null)),n(ia,{onClick:()=>We.next()},n(Qk,null)),n(ia,{className:te(Xe("button"),Xe(i)),onClick:()=>We.setRepeat(r),style:{position:"relative"}},o==="track"&&n("span",{className:Xe("repeat-1")},"1"),n(Vk,null)))}function iR(){let{duration:e}=We.track,[t,o,r]=Ke([We],()=>[We.mPosition,We.isSettingPosition,We.isPlaying]),[i,s]=X(t);return ue(()=>{if(r&&!o){s(We.position);let l=setInterval(()=>{s(c=>c+1e3)},1e3);return()=>clearInterval(l)}},[t,o,r]),n("div",{id:Xe("progress-bar")},n(S.FormText,{variant:"text-xs/medium",className:Xe("progress-time")+" "+Xe("time-left"),"aria-label":"Progress"},Mg(i)),n(G.MenuSliderControl,{minValue:0,maxValue:e,value:i,onChange:l=>{o||(s(l),rR(l))},renderValue:Mg}),n(S.FormText,{variant:"text-xs/medium",className:Xe("progress-time")+" "+Xe("time-right"),"aria-label":"Total Duration"},Mg(e)))}function sR({track:e}){let t=Ke([We],()=>We.volume);return n(G.Menu,{navId:"spotify-album-menu",onClose:()=>B.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Spotify Album Menu"},n(G.MenuItem,{key:"open-album",id:"open-album",label:"Open Album",action:()=>We.openExternal(`/album/${e.album.id}`),icon:ys}),n(G.MenuItem,{key:"view-cover",id:"view-cover",label:"View Album Cover",action:()=>Bo(e.album.image.url),icon:Rr}),n(G.MenuControlItem,{id:"spotify-volume",key:"spotify-volume",label:"Volume",control:(o,r)=>n(G.MenuSliderControl,{...o,ref:r,value:t,minValue:0,maxValue:100,onChange:no(i=>We.setVolume(i))})}))}function Pg(e,t,o){return t?{role:"link",onClick:()=>We.openExternal(o),onContextMenu:oR(e,o)}:{}}function aR({track:e}){let t=e?.album?.image,[o,r]=X(!1),i=n(f,null,t&&n("img",{id:Xe("album-image"),src:t.url,alt:"Album Image",onClick:()=>r(!o),onContextMenu:s=>{Ut.openContextMenu(s,()=>n(sR,{track:e}))}}));return o&&t?n("div",{id:Xe("album-expanded-wrapper")},i):n("div",{id:Xe("info-wrapper")},i,n("div",{id:Xe("titles")},n(S.FormText,{variant:"text-sm/semibold",id:Xe("song-title"),className:Xe("ellipoverflow"),title:e.name,...Pg("Song",e.id,`/track/${e.id}`)},e.name),e.artists.some(s=>s.name)&&n(S.FormText,{variant:"text-sm/normal",className:Xe("ellipoverflow")},"by\xA0",e.artists.map((s,l)=>n(_.Fragment,{key:s.name},n("span",{className:Xe("artist"),style:{fontSize:"inherit"},title:s.name,...Pg("Artist",s.id,`/artist/${s.id}`)},s.name),l!==e.artists.length-1&&n("span",{className:Xe("comma")},", ")))),e.album.name&&n(S.FormText,{variant:"text-sm/normal",className:Xe("ellipoverflow")},"on\xA0",n("span",{id:Xe("album-title"),className:Xe("album"),style:{fontSize:"inherit"},title:e.album.name,...Pg("Album",e.album.id,`/album/${e.album.id}`)},e.album.name))))}function Fw(){let e=Ke([We],()=>We.track,null,(s,l)=>s?.id?s.id===l?.id:s?.name===l?.name),t=Ke([We],()=>We.device,null,(s,l)=>s?.id===l?.id),o=Ke([We],()=>We.isPlaying),[r,i]=X(!1);return _.useEffect(()=>{if(i(!1),!o){let s=setTimeout(()=>i(!0),3e5);return()=>clearTimeout(s)}},[o]),!e||!t?.is_active||r?null:n(U,{fallback:()=>n("div",{className:"vc-spotify-fallback"},n("p",null,"Failed to render Spotify Modal :("),n("p",null,"Check the console for errors"))},n("div",{id:Xe("player")},n(aR,{track:e}),n(iR,null),n(nR,null)))}var Xe,Zk,Xk,Jk,Qk,Vk,eR,rR,Uw=g(()=>{"use strict";a();Ow();le();Ct();Dt();Pr();nt();Pe();x();Bw();Xe=e=>`vc-spotify-${e}`;Zk=Oi("M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18c.62-.39.62-1.29 0-1.69L9.54 5.98C8.87 5.55 8 6.03 8 6.82z","play"),Xk=Oi("M8 19c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2v10c0 1.1.9 2 2 2zm6-12v10c0 1.1.9 2 2 2s2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2z","pause"),Jk=Oi("M7 6c.55 0 1 .45 1 1v10c0 .55-.45 1-1 1s-1-.45-1-1V7c0-.55.45-1 1-1zm3.66 6.82l5.77 4.07c.66.47 1.58-.01 1.58-.82V7.93c0-.81-.91-1.28-1.58-.82l-5.77 4.07c-.57.4-.57 1.24 0 1.64z","previous"),Qk=Oi("M7.58 16.89l5.77-4.07c.56-.4.56-1.24 0-1.63L7.58 7.11C6.91 6.65 6 7.12 6 7.93v8.14c0 .81.91 1.28 1.58.82zM16 7v10c0 .55.45 1 1 1s1-.45 1-1V7c0-.55-.45-1-1-1s-1 .45-1 1z","next"),Vk=Oi("M7 7h10v1.79c0 .45.54.67.85.35l2.79-2.79c.2-.2.2-.51 0-.71l-2.79-2.79c-.31-.31-.85-.09-.85.36V5H6c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1V7zm10 10H7v-1.79c0-.45-.54-.67-.85-.35l-2.79 2.79c-.2.2-.2.51 0 .71l2.79 2.79c.31.31.85.09.85-.36V19h11c.55 0 1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1v3z","repeat"),eR=Oi("M10.59 9.17L6.12 4.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41l4.46 4.46 1.42-1.4zm4.76-4.32l1.19 1.19L4.7 17.88c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L17.96 7.46l1.19 1.19c.31.31.85.09.85-.36V4.5c0-.28-.22-.5-.5-.5h-3.79c-.45 0-.67.54-.36.85zm-.52 8.56l-1.41 1.41 3.13 3.13-1.2 1.2c-.31.31-.09.85.36.85h3.79c.28 0 .5-.22.5-.5v-3.79c0-.45-.54-.67-.85-.35l-1.19 1.19-3.13-3.14z","shuffle");rR=no(e=>{We.seek(e)})});function $w(e){(e?Tt:jt)(Ew)}var Ig,Gw=g(()=>{"use strict";a();$();ot();I();w();_w();Uw();Ig=y({name:"SpotifyControls",description:"Adds a Spotify player above the account panel",authors:[d.Ven,d.afn,d.KraXen72],options:{hoverControls:{description:"Show controls on hover",type:3,default:!1,onChange:e=>$w(e)},useSpotifyUris:{type:3,description:"Open Spotify URIs instead of Spotify URLs. Will only work if you have Spotify installed and might not work on all platforms",default:!1}},patches:[{find:"showTaglessAccountPanel:",replacement:{match:/return ?(.{0,30}\(.{1,3},\{[^}]+?,showTaglessAccountPanel:.+?\}\))/,replace:"return [$self.renderPlayer(),$1]"}},{find:".PLAYER_DEVICES",replacement:[{match:/get:(\i)\.bind\(null,(\i\.\i)\.get\)/,replace:"post:$1.bind(null,$2.post),$&"},{match:/202===\i\.status/,replace:"false"}]},{find:'repeat:"off"!==',replacement:{match:/repeat:"off"!==(.{1,3}),/,replace:"actual_repeat:$1,$&"}}],start:()=>$w(E.plugins.SpotifyControls.hoverControls),renderPlayer:()=>n(Fw,null)})});var Ag,Ng,Hw=g(()=>{"use strict";a();$();I();w();Ag=L({noSpotifyAutoPause:{description:"Disable Spotify auto-pause",type:3,default:!0,restartNeeded:!0},keepSpotifyActivityOnIdle:{description:"Keep Spotify activity playing when idling",type:3,default:!1,restartNeeded:!0}}),Ng=y({name:"SpotifyCrack",description:"Free listen along, no auto-pausing in voice chat, and allows activity to continue playing when idling",authors:[d.Cyn,d.Nuckyz],settings:Ag,patches:[{find:'dispatch({type:"SPOTIFY_PROFILE_UPDATE"',replacement:{match:/SPOTIFY_PROFILE_UPDATE.+?isPremium:(?="premium"===(\i)\.body\.product)/,replace:(e,t)=>`${e}(${t}.body.product="premium")&&`}},{find:'.displayName="SpotifyStore"',replacement:[{predicate:()=>Ag.store.noSpotifyAutoPause,match:/(?<=function \i\(\){)(?=.{0,200}SPOTIFY_AUTO_PAUSED\))/,replace:"return;"},{predicate:()=>Ag.store.keepSpotifyActivityOnIdle,match:/(?<=shouldShowActivity\(\){.{0,50})&&!\i\.\i\.isIdle\(\)/,replace:""}]}]})});function kg(e,t){t={invalidEmojis:[],tts:!1,validNonShortcutEmojis:[],...t};let o=lR.getPendingReply(e);fo.sendMessage(e,t,void 0,fo.getSendMessageOptionsForReply(o)).then(()=>{o&&B.dispatch({type:"DELETE_PENDING_REPLY",channelId:e})})}var Cg,lR,Rg,zw=g(()=>{"use strict";a();so();I();nt();w();W();x();Cg=A("getPlayerState"),lR=A("getPendingReply");Rg=y({name:"SpotifyShareCommands",description:"Share your current Spotify track, album or artist via slash command (/track, /album, /artist)",authors:[d.katlyn],dependencies:["CommandsAPI"],commands:[{name:"track",description:"Send your current Spotify track to chat",inputType:0,options:[],execute:(e,t)=>{let o=Cg.getTrack();if(o===null){me(t.channel.id,{content:"You're not listening to any music."});return}kg(t.channel.id,{content:`https://open.spotify.com/track/${o.id}`})}},{name:"album",description:"Send your current Spotify album to chat",inputType:0,options:[],execute:(e,t)=>{let o=Cg.getTrack();if(o===null){me(t.channel.id,{content:"You're not listening to any music."});return}kg(t.channel.id,{content:`https://open.spotify.com/album/${o.album.id}`})}},{name:"artist",description:"Send your current Spotify artist to chat",inputType:0,options:[],execute:(e,t)=>{let o=Cg.getTrack();if(o===null){me(t.channel.id,{content:"You're not listening to any music."});return}kg(t.channel.id,{content:o.artists[0].external_urls.spotify})}}]})});var jw={};ze(jw,{default:()=>mR});function cR({emoji:e,prefix:t,log:o,delta:r,instance:i}){return n(_.Fragment,null,n("span",null,i.sinceStart.toFixed(3),"s"),n("span",null,i.sinceLast.toFixed(3),"s"),n("span",null,r?.toFixed(0)??""),n("span",null,n("pre",null,e," ",t??" ",o)))}function uR({title:e,logs:t,traceEnd:o}){let r=t.find(l=>l.timestamp)?.timestamp??0,i=r,s=t.map(l=>{let c=l.timestamp??i,u=(c-r)/1e3,p=(c-i)/1e3;return i=c,{sinceStart:u,sinceLast:p}});return n(S.FormSection,{title:e,tag:"h1"},n("code",null,o&&n("div",{style:{color:"var(--header-primary)",marginBottom:5,userSelect:"text"}},"Trace ended at: ",new Date(o).toTimeString()),n("div",{style:{color:"var(--header-primary)",display:"grid",gridTemplateColumns:"repeat(3, auto) 1fr",gap:"2px 10px",userSelect:"text"}},n("span",null,"Start"),n("span",null,"Interval"),n("span",null,"Delta"),n("span",{style:{marginBottom:5}},"Event"),sa.logs.map((l,c)=>n(cR,{key:c,...l,instance:s[c]})))))}function pR({trace:e}){let t=e.split(`
  162. `);return n(S.FormSection,{title:"Server Trace",tag:"h2"},n("code",null,n(ce,{flexDirection:"column",style:{color:"var(--header-primary)",gap:5,userSelect:"text"}},t.map(o=>n("span",null,o)))))}function dR(){if(!sa?.logs)return n("div",null,"Loading...");let e=sa.logGroups.find(t=>t.serverTrace)?.serverTrace;return n(_.Fragment,null,n(uR,{title:"Startup Timings",logs:sa.logs,traceEnd:sa.endTime_}),n("div",{style:{marginTop:5}},"\xA0"),e&&n(pR,{trace:e}))}var sa,mR,Ww=g(()=>{"use strict";a();le();Ct();W();x();sa=A("markWithDelta","markAndLog","markAt");mR=U.wrap(dR)});var Dg,qw=g(()=>{"use strict";a();I();ut();w();Dg=y({name:"StartupTimings",description:"Adds Startup Timings to the Settings menu",authors:[d.Megu],patches:[{find:"UserSettingsSections.PAYMENT_FLOW_MODAL_TEST_PAGE,",replacement:{match:/{section:\i\.UserSettingsSections\.PAYMENT_FLOW_MODAL_TEST_PAGE/,replace:'{section:"StartupTimings",label:"Startup Timings",element:$self.StartupTimingPage},$&'}}],StartupTimingPage:Pt(()=>(Ww(),Ln(jw)).default)})});var Lg,Eg,Kw=g(()=>{"use strict";a();$();I();w();Lg=L({superReactByDefault:{type:3,description:"Reaction picker will default to Super Reactions",default:!0},unlimitedSuperReactionPlaying:{type:3,description:"Remove the limit on Super Reactions playing at once",default:!1},superReactionPlayingLimit:{description:"Max Super Reactions to play at once",type:5,default:20,markers:[5,10,20,40,60,80,100],stickToMarkers:!0}},{superReactionPlayingLimit:{disabled(){return this.store.unlimitedSuperReactionPlaying}}}),Eg=y({name:"SuperReactionTweaks",description:"Customize the limit of Super Reactions playing at once, and super react by default",authors:[d.FieryFlames,d.ant0n],patches:[{find:",BURST_REACTION_EFFECT_PLAY",replacement:{match:/(?<=BURST_REACTION_EFFECT_PLAY:\i=>{.{50,100})(\i\(\i,\i\))>=\d+/,replace:"!$self.shouldPlayBurstReaction($1)"}},{find:".trackEmojiSearchEmpty,200",replacement:{match:/(\.trackEmojiSearchEmpty,200(?=.+?isBurstReaction:(\i).+?(\i===\i\.EmojiIntention.REACTION)).+?\[\2,\i\]=\i\.useState\().+?\)/,replace:(e,t,o,r)=>`${t}$self.settings.store.superReactByDefault&&${r})`}}],settings:Lg,shouldPlayBurstReaction(e){return!!(Lg.store.unlimitedSuperReactionPlaying||e<=Lg.store.superReactionPlayingLimit)}})});function Qw(e){let t=e.match(/^(\/)?(.+?)(?:\/([gimsuy]*))?$/);return t?new RegExp(t[2],t[3]?.split("").filter((o,r,i)=>i.indexOf(o)===r).join("")??"g"):new RegExp(e)}function gR(e){try{return Qw(e),null}catch(t){return n("span",{style:{color:"var(--text-danger)"}},String(t))}}function _g({initialValue:e,onChange:t,placeholder:o}){let[r,i]=X(e);return n(et,{placeholder:o,value:r,onChange:i,spellCheck:!1,onBlur:()=>r!==e&&t(r)})}function Yw({title:e,rulesArray:t,rulesKey:o,update:r}){let i=e==="Using Regex";async function s(c){c!==t.length-1&&(t.splice(c,1),await xt.set(o,t),r())}async function l(c,u,p){u===t.length-1&&t.push(Jw()),t[u][p]=c,t[u].find===""&&t[u].replace===""&&t[u].onlyIfIncludes===""&&u!==t.length-1&&t.splice(u,1),await xt.set(o,t),r()}return n(f,null,n(S.FormTitle,{tag:"h4"},e),n(ce,{flexDirection:"column",style:{gap:"0.5em"}},t.map((c,u)=>n(_.Fragment,{key:`${c.find}-${u}`},n(ce,{flexDirection:"row",style:{gap:0}},n(ce,{flexDirection:"row",style:{flexGrow:1,gap:"0.5em"}},n(_g,{placeholder:"Find",initialValue:c.find,onChange:p=>l(p,u,"find")}),n(_g,{placeholder:"Replace",initialValue:c.replace,onChange:p=>l(p,u,"replace")}),n(_g,{placeholder:"Only if includes",initialValue:c.onlyIfIncludes,onChange:p=>l(p,u,"onlyIfIncludes")})),n(C,{size:C.Sizes.MIN,onClick:()=>s(u),style:{background:"none",color:"var(--status-danger)",...u===t.length-1?{visibility:"hidden",pointerEvents:"none"}:{}}},n(Ja,null))),i&&gR(c.find)))))}function hR(){let[e,t]=X("");return n(f,null,n(S.FormTitle,{tag:"h4"},"Test Rules"),n(et,{placeholder:"Type a message",onChange:t}),n(et,{placeholder:"Message with rules applied",editable:!1,value:Vw(e)}))}function Vw(e){if(e.length===0)return e;if(gc)for(let t of gc)!t.find||!t.replace||t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)||(e=` ${e} `.replaceAll(t.find,t.replace.replaceAll("\\n",`
  163. `)).replace(/^\s|\s$/g,""));if(hc){for(let t of hc)if(!(!t.find||!t.replace)&&!(t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)))try{let o=Qw(t.find);e=e.replace(o,t.replace.replaceAll("\\n",`
  164. `))}catch{new ie("TextReplace").error(`Invalid regex: ${t.find}`)}}return e=e.trim(),e}var Zw,Xw,Jw,fc,gc,hc,fR,yR,Og,e2=g(()=>{"use strict";a();yi();tn();$();Ct();Dt();I();Je();ut();w();x();Zw="TextReplace_rulesString",Xw="TextReplace_rulesRegex",Jw=()=>({find:"",replace:"",onlyIfIncludes:""}),fc=()=>[Jw()],gc=fc(),hc=fc(),fR=L({replace:{type:6,description:"",component:()=>{let e=Bn();return n(f,null,n(Yw,{title:"Using String",rulesArray:gc,rulesKey:Zw,update:e}),n(Yw,{title:"Using Regex",rulesArray:hc,rulesKey:Xw,update:e}),n(hR,null))}}});yR="1102784112584040479",Og=y({name:"TextReplace",description:"Replace text in your messages. You can find pre-made rules in the #textreplace-rules channel in Vencord's Server",authors:[d.AutumnVN,d.TheKodeToad],dependencies:["MessageEventsAPI"],settings:fR,async start(){gc=await xt.get(Zw)??fc(),hc=await xt.get(Xw)??fc(),this.preSend=Kt((e,t)=>{e!==yR&&(t.content=Vw(t.content))})},stop(){Yt(this.preSend)}})});var Bg,t2=g(()=>{"use strict";a();I();w();x();Bg=y({name:"ThemeAttributes",description:"Adds data attributes to various elements for theming purposes",authors:[d.Ven],patches:[{find:".tabBarRef",replacement:{match:/style:this\.getStyle\(\),role:"tab"/,replace:"$&,'data-tab-id':this.props.id"}},{find:".messageListItem",replacement:{match:/\.messageListItem(?=,"aria)/,replace:"$&,...$self.getMessageProps(arguments[0])"}}],getMessageProps(e){let t=e.message?.author?.id;return{"data-author-id":t,"data-is-self":t&&t===F.getCurrentUser()?.id}}})});var Fg,o2=g(()=>{"use strict";a();I();w();Fg=y({name:"TimeBarAllActivities",description:"Adds the Spotify time bar to all activities if they have start and end timestamps",authors:[d.obscurity],patches:[{find:"}renderTimeBar(",replacement:{match:/renderTimeBar\((.{1,3})\){.{0,50}?let/,replace:"renderTimeBar($1){let"}}]})});var n2=g(()=>{});var Ht,aa=g(()=>{"use strict";a();$();w();Ht=L({receivedInput:{type:0,description:"Input language for received messages",default:"auto",hidden:!0},receivedOutput:{type:0,description:"Output language for received messages",default:"en",hidden:!0},sentInput:{type:0,description:"Input language for sent messages",default:"auto",hidden:!0},sentOutput:{type:0,description:"Output language for sent messages",default:"en",hidden:!0},autoTranslate:{type:3,description:"Automatically translate your messages before sending. You can also shift/right click the translate button to toggle this",default:!1}})});var yc,Ug=g(()=>{"use strict";a();yc={auto:"Detect language",af:"Afrikaans",sq:"Albanian",am:"Amharic",ar:"Arabic",hy:"Armenian",as:"Assamese",ay:"Aymara",az:"Azerbaijani",bm:"Bambara",eu:"Basque",be:"Belarusian",bn:"Bengali",bho:"Bhojpuri",bs:"Bosnian",bg:"Bulgarian",ca:"Catalan",ceb:"Cebuano",ny:"Chichewa","zh-CN":"Chinese (Simplified)","zh-TW":"Chinese (Traditional)",co:"Corsican",hr:"Croatian",cs:"Czech",da:"Danish",dv:"Dhivehi",doi:"Dogri",nl:"Dutch",en:"English",eo:"Esperanto",et:"Estonian",ee:"Ewe",tl:"Filipino",fi:"Finnish",fr:"French",fy:"Frisian",gl:"Galician",ka:"Georgian",de:"German",el:"Greek",gn:"Guarani",gu:"Gujarati",ht:"Haitian Creole",ha:"Hausa",haw:"Hawaiian",iw:"Hebrew",hi:"Hindi",hmn:"Hmong",hu:"Hungarian",is:"Icelandic",ig:"Igbo",ilo:"Ilocano",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",jw:"Javanese",kn:"Kannada",kk:"Kazakh",km:"Khmer",rw:"Kinyarwanda",gom:"Konkani",ko:"Korean",kri:"Krio",ku:"Kurdish (Kurmanji)",ckb:"Kurdish (Sorani)",ky:"Kyrgyz",lo:"Lao",la:"Latin",lv:"Latvian",ln:"Lingala",lt:"Lithuanian",lg:"Luganda",lb:"Luxembourgish",mk:"Macedonian",mai:"Maithili",mg:"Malagasy",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi","mni-Mtei":"Meiteilon (Manipuri)",lus:"Mizo",mn:"Mongolian",my:"Myanmar (Burmese)",ne:"Nepali",no:"Norwegian",or:"Odia (Oriya)",om:"Oromo",ps:"Pashto",fa:"Persian",pl:"Polish",pt:"Portuguese",pa:"Punjabi",qu:"Quechua",ro:"Romanian",ru:"Russian",sm:"Samoan",sa:"Sanskrit",gd:"Scots Gaelic",nso:"Sepedi",sr:"Serbian",st:"Sesotho",sn:"Shona",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",so:"Somali",es:"Spanish",su:"Sundanese",sw:"Swahili",sv:"Swedish",tg:"Tajik",ta:"Tamil",tt:"Tatar",te:"Telugu",th:"Thai",ti:"Tigrinya",ts:"Tsonga",tr:"Turkish",tk:"Turkmen",ak:"Twi",uk:"Ukrainian",ur:"Urdu",ug:"Uyghur",uz:"Uzbek",vi:"Vietnamese",cy:"Welsh",xh:"Xhosa",yi:"Yiddish",yo:"Yoruba",zu:"Zulu"}});async function la(e,t){let o=Ht.store[e+"Input"],r=Ht.store[e+"Output"],i="https://translate.googleapis.com/translate_a/single?"+new URLSearchParams({client:"gtx",sl:o,tl:r,dt:"t",dj:"1",source:"input",q:t}),s=await fetch(i);if(!s.ok)throw new Error(`Failed to translate "${t}" (${o} -> ${r})
  165. ${s.status} ${s.statusText}`);let{src:l,sentences:c}=await s.json();return{src:l,text:c.map(u=>u?.trans).filter(Boolean).join("")}}var Cn,ca=g(()=>{"use strict";a();ot();aa();Cn=Be("vc-trans-")});function SR({settingsKey:e,includeAuto:t}){let o=Ht.use([e])[e],r=St(()=>{let i=Object.entries(yc).map(([s,l])=>({value:s,label:l}));return t||i.shift(),i},[]);return n("section",{className:z.bottom16},n(S.FormTitle,{tag:"h3"},Ht.def[e].description),n(Ma,{options:r,value:r.find(i=>i.value===o),placeholder:"Select a language",maxVisibleItems:5,closeOnSelect:!0,onChange:i=>Ht.store[e]=i}))}function bR(){let e=Ht.use(["autoTranslate"]).autoTranslate;return n(mt,{value:e,onChange:t=>Ht.store.autoTranslate=t,note:Ht.def.autoTranslate.description,hideBorder:!0},"Auto Translate")}function r2({rootProps:e}){return n(Oe,{...e},n(tt,{className:Cn("modal-header")},n(S.FormTitle,{tag:"h2"},"Translate"),n(_t,{onClick:e.onClose})),n(Ye,{className:Cn("modal-content")},vR.map(t=>n(SR,{key:t,settingsKey:t,includeAuto:t.endsWith("Input")})),n(S.FormDivider,{className:z.bottom16}),n(bR,null)))}var vR,i2=g(()=>{"use strict";a();it();st();x();Ug();aa();ca();vR=["receivedInput","receivedOutput","sentInput","sentOutput"]});function Bi({height:e=24,width:t=24,className:o}){return n("svg",{viewBox:"0 96 960 960",height:e,width:t,className:te(Cn("icon"),o)},n("path",{fill:"currentColor",d:"m475 976 181-480h82l186 480h-87l-41-126H604l-47 126h-82Zm151-196h142l-70-194h-2l-70 194Zm-466 76-55-55 204-204q-38-44-67.5-88.5T190 416h87q17 33 37.5 62.5T361 539q45-47 75-97.5T487 336H40v-80h280v-80h80v80h280v80H567q-22 69-58.5 135.5T419 598l98 99-30 81-127-122-200 200Z"}))}function s2({slateProps:e}){let{autoTranslate:t}=Ht.use(["autoTranslate"]);if(e.type.analyticsName!=="normal")return null;let o=()=>Ht.store.autoTranslate=!t;return n(ee,{text:"Open Translate Modal"},({onMouseEnter:r,onMouseLeave:i})=>n("div",{style:{display:"flex"}},n(C,{"aria-haspopup":"dialog","aria-label":"Open Translate Modal",size:"",look:eo.BLANK,onMouseEnter:r,onMouseLeave:i,innerClassName:vt.button,onClick:s=>{if(s.shiftKey)return o();Ne(l=>n(r2,{rootProps:l}))},onContextMenu:()=>o(),style:{padding:"0 4px"}},n("div",{className:vt.buttonWrapper},n(Bi,{className:Cn({"auto-translate":t})})))))}var $g=g(()=>{"use strict";a();Pe();st();x();aa();i2();ca()});function Hg(e,t){Gg.get(e)(t)}function TR({onDismiss:e}){return n("button",{onClick:e,className:Cn("dismiss")},"Dismiss")}function a2({message:e}){let[t,o]=X();return ue(()=>{if(!e.vencordEmbeddedBy)return Gg.set(e.id,o),()=>void Gg.delete(e.id)},[]),t?n("span",{className:Cn("accessory")},n(Bi,{width:16,height:16}),_e.parse(t.text)," ","(translated from ",yc[t.src]??t.src," - ",n(TR,{onDismiss:()=>o(void 0)}),")"):null}var Gg,l2=g(()=>{"use strict";a();x();Ug();$g();ca();Gg=new Map});var c2,zg,u2=g(()=>{"use strict";a();n2();kt();Rl();tn();Gr();le();I();w();x();aa();$g();l2();ca();c2=(e,{message:t})=>()=>{if(!t.content)return;let o=ft("copy-text",e);!o||o.splice(o.findIndex(r=>r?.props?.id==="copy-text")+1,0,n(G.MenuItem,{id:"vc-trans",label:"Translate",icon:Bi,action:async()=>{let r=await la("received",t.content);Hg(t.id,r)}}))},zg=y({name:"Translate",description:"Translate messages with Google Translate",authors:[d.Ven],dependencies:["MessageAccessoriesAPI","MessagePopoverAPI","MessageEventsAPI"],settings:Ht,translate:la,patches:[{find:"ChannelTextAreaButtons",replacement:{match:/(\i)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&,(()=>{try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}})()"}}],start(){Gs("vc-translation",e=>n(a2,{message:e.message})),de("message",c2),$o("vc-translate",e=>e.content?{label:"Translate",icon:Bi,message:e,channel:J.getChannel(e.channel_id),onClick:async()=>{let t=await la("received",e.content);Hg(e.id,t)}}:null),this.preSend=Kt(async(e,t)=>{!Ht.store.autoTranslate||!t.content||(t.content=(await la("sent",t.content)).text)})},stop(){Yt(this.preSend),ge("message",c2),Go("vc-translate"),rm("vc-translation")},chatBarIcon:e=>n(U,{noop:!0},n(s2,{slateProps:e}))})});function jg({a:e,b:t,count:o}){return[n("strong",{key:"0"},e),", ",n("strong",{key:"1"},t),`, and ${o} others are typing...`]}var vc,xR,Wg,qg=g(()=>{"use strict";a();$();le();I();nt();w();x();vc=L({showAvatars:{type:3,default:!0,description:"Show avatars in the typing indicator"},showRoleColors:{type:3,default:!0,description:"Show role colors in the typing indicator"},alternativeFormatting:{type:3,default:!0,description:"Show a more useful message when several users are typing"}});xR=U.wrap(function({user:e,guildId:t}){return n("strong",{role:"button",onClick:()=>{Fo(e.id)},style:{display:"grid",gridAutoFlow:"column",gap:"4px",color:vc.store.showRoleColors?Ee.getMember(t,e.id)?.colorString:void 0,cursor:"pointer"}},vc.store.showAvatars&&n("div",{style:{marginTop:"4px"}},n(Xr,{size:"SIZE_16",src:e.getAvatarURL(t,128)})),Ee.getNick(t,e.id)||!t&&at.getNickname(e.id)||e.globalName||e.username)},{noop:!0}),Wg=y({name:"TypingTweaks",description:"Show avatars and role colours in the typing indicator",authors:[d.zt],patches:[{find:"getCooldownTextStyle",replacement:{match:/(?<=children:\[(\i)\.length>0.{0,200}?"aria-atomic":!0,children:)\i/,replace:"$self.mutateChildren(this.props, $1, $&), style: $self.TYPING_TEXT_STYLE"}},{find:"getCooldownTextStyle",replacement:{match:/(?<=map\(\i=>)\i\.\i\.getName\(\i,this\.props\.channel\.id,(\i)\)/,replace:"$1"}},{find:"getCooldownTextStyle",replacement:{match:/(?<=(\i)\.length\?\i.\i\.Messages.THREE_USERS_TYPING\.format\({\i:(\i),(?:\i:)?(\i),\i:\i}\):)\i\.\i\.Messages\.SEVERAL_USERS_TYPING/,replace:(e,t,o,r)=>`$self.buildSeveralUsers({ a: ${o}, b: ${r}, count: ${t}.length - 2 })`},predicate:()=>vc.store.alternativeFormatting}],settings:vc,TYPING_TEXT_STYLE:{display:"grid",gridAutoFlow:"column",gridGap:"0.25em"},buildSeveralUsers:jg,mutateChildren(e,t,o){if(!Array.isArray(o))return o;let r=0;return o.map(i=>i.type==="strong"?n(xR,{...e,user:t[r++]}):i)}})});function cr(e,t){let o=F.getUser(t);return Ee.getNick(e,t)??o.globalName??o.username}function PR({channelId:e}){let t=Ke([p2],()=>({...p2.getTypingUsers(e)}),null,(l,c)=>{let u=Object.keys(l),p=Object.keys(c);return u.length===p.length&&p.every(m=>l[m]!=null)}),o=J.getChannel(e).guild_id;if(!Kg.store.includeMutedChannels&&MR.isChannelMuted(o,e))return null;let r=F.getCurrentUser()?.id,i=Object.keys(t).filter(l=>l!==r&&!(at.isBlocked(l)&&!Kg.store.includeBlockedUsers)),s;switch(i.length){case 0:break;case 1:{s=Qe.Messages.ONE_USER_TYPING.format({a:cr(o,i[0])});break}case 2:{s=Qe.Messages.TWO_USERS_TYPING.format({a:cr(o,i[0]),b:cr(o,i[1])});break}case 3:{s=Qe.Messages.THREE_USERS_TYPING.format({a:cr(o,i[0]),b:cr(o,i[1]),c:cr(o,i[2])});break}default:{s=E.plugins.TypingTweaks.enabled?jg({a:cr(o,i[0]),b:cr(o,i[1]),count:i.length-2}):Qe.Messages.SEVERAL_USERS_TYPING;break}}return i.length>0?n(ee,{text:s},l=>n("div",{...l,style:{marginLeft:6,height:16,display:"flex",alignItems:"center",zIndex:0,cursor:"pointer"}},n(wR,{dotRadius:3,themed:!0}))):null}var wR,p2,MR,Kg,Yg,d2=g(()=>{"use strict";a();$();le();I();w();W();x();qg();wR=un("Dots","AnimatedDots"),p2=we("TypingStore"),MR=we("UserGuildSettingsStore");Kg=L({includeMutedChannels:{type:3,description:"Whether to show the typing indicator for muted channels.",default:!1},includeBlockedUsers:{type:3,description:"Whether to show the typing indicator for blocked users.",default:!1}}),Yg=y({name:"TypingIndicator",description:"Adds an indicator if someone is typing on a channel.",authors:[d.Nuckyz,d.obscurity],settings:Kg,patches:[{find:"UNREAD_IMPORTANT:",replacement:{match:/channel:(\i).{0,100}?channelEmoji,.{0,250}?\.children.{0,50}?:null/,replace:"$&,$self.TypingIndicator($1.id)"}},{find:"M11 9H4C2.89543 9 2 8.10457 2 7V1C2 0.447715 1.55228 0 1 0C0.447715 0 0 0.447715 0 1V7C0 9.20914 1.79086 11 4 11H11C11.5523 11 12 10.5523 12 10C12 9.44771 11.5523 9 11 9Z",replacement:{match:/mentionsCount:\i.+?null(?<=channel:(\i).+?)/,replace:"$&,$self.TypingIndicator($1.id)"}}],TypingIndicator:e=>n(U,{noop:!0},n(PR,{channelId:e}))})});var Zg,m2=g(()=>{"use strict";a();tn();I();w();Zg=y({name:"Unindent",description:"Trims leading indentation from codeblocks",authors:[d.Ven],dependencies:["MessageEventsAPI"],patches:[{find:"inQuote:",replacement:{match:/,content:([^,]+),inQuote/,replace:(e,t)=>`,content:Vencord.Plugins.plugins.Unindent.unindent(${t}),inQuote`}}],unindent(e){e=e.replace(/\t/g," ");let t=e.match(/^ *(?=\S)/gm)?.reduce((o,r)=>Math.min(o,r.length),1/0)??0;return t?e.replace(new RegExp(`^ {${t}}`,"gm"),""):e},unindentMsg(e){e.content=e.content.replace(/```(.|\n)*?```/g,t=>{let o=t.split(`
  166. `);if(o.length<2)return t;let r="";return o[o.length-1]==="```"&&(r=o.pop()),`${o[0]}
  167. ${this.unindent(o.slice(1).join(`
  168. `))}
  169. ${r}`})},start(){this.preSend=Kt((e,t)=>this.unindentMsg(t)),this.preEdit=Lr((e,t,o)=>this.unindentMsg(o))},stop(){Yt(this.preSend),Er(this.preEdit)}})});var Xg,f2,Jg,g2=g(()=>{"use strict";a();kt();Dt();I();w();x();Xg=1<<2,f2=(e,{channel:t,message:{author:o,embeds:r,flags:i,id:s}})=>()=>{let l=(i&Xg)!==0;if(!l&&!r.length)return;let c=t.isPrivate()||!!(Le.getChannelPermissions({id:t.id})&Te.EMBED_LINKS);if(o.id===F.getCurrentUser().id&&!c)return;let u=ft("delete",e),p=u?.findIndex(m=>m?.props?.id==="delete");!p||!u||u.splice(p-1,0,n(G.MenuItem,{id:"unsuppress-embeds",key:"unsuppress-embeds",label:l?"Unsuppress Embeds":"Suppress Embeds",color:l?void 0:"danger",icon:l?Za:Xa,action:()=>At.patch({url:`/channels/${t.id}/messages/${s}`,body:{flags:l?i&~Xg:i|Xg}})}))},Jg=y({name:"UnsuppressEmbeds",authors:[d.rad,d.HypedDomi],description:"Allows you to unsuppress embeds in messages",start(){de("message",f2)},stop(){ge("message",f2)}})});var Qg,h2=g(()=>{"use strict";a();so();Qa();I();w();Qg=y({name:"UrbanDictionary",description:"Search for a word on Urban Dictionary via /urban slash command",authors:[d.jewdev],dependencies:["CommandsAPI"],commands:[{name:"urban",description:"Returns the definition of a word from Urban Dictionary",inputType:0,options:[{type:3,name:"word",description:"The word to search for on Urban Dictionary",required:!0}],execute:async(e,t)=>{try{let o=encodeURIComponent(e[0].value),{list:[r]}=await(await fetch(`https://api.urbandictionary.com/v0/define?term=${o}`)).json();if(!r)return void me(t.channel.id,{content:"No results found."});let i=s=>s.replaceAll(`\r
  170. `,`
  171. `).replace(/([*>_`~\\])/gsi,"\\$1").replace(/\[(.+?)\]/g,(l,c)=>`[${c}](https://www.urbandictionary.com/define.php?term=${encodeURIComponent(c)} "Define '${c}' on Urban Dictionary")`).trim();return void me(t.channel.id,{embeds:[{type:"rich",author:{name:`Uploaded by "${r.author}"`,url:`https://www.urbandictionary.com/author.php?author=${encodeURIComponent(r.author)}`},title:r.word,url:`https://www.urbandictionary.com/define.php?term=${encodeURIComponent(r.word)}`,description:i(r.definition),fields:[{name:"Example",value:i(r.example)},{name:"Want more definitions?",value:`Check out [more definitions](https://www.urbandictionary.com/define.php?term=${o} "Define "${e[0].value}" on Urban Dictionary") on Urban Dictionary.`}],color:16750848,footer:{text:`\u{1F44D} ${r.thumbs_up.toString()} | \u{1F44E} ${r.thumbs_down.toString()}`,icon_url:"https://www.urbandictionary.com/favicon.ico"},timestamp:new Date(r.written_on).toISOString()}]})}catch(o){me(t.channel.id,{content:`Something went wrong: \`${o}\``})}}}]})});var y2=g(()=>{});var IR,AR,NR,v2,S2=g(()=>{"use strict";a();y2();W();x();IR=A("selectChannel","selectVoiceChannel"),AR=cn(".lastSection","children:"),NR=1n<<20n,v2=({channel:e,label:t,showHeader:o})=>n(AR,null,o&&n(S.FormTitle,{className:"vc-uvs-header"},"In a voice channel"),n(C,{className:"vc-uvs-button",color:C.Colors.TRANSPARENT,size:C.Sizes.SMALL,onClick:()=>{Le.can(NR,e)?IR.selectVoiceChannel(e.id):oe.show({message:"Insufficient permissions to enter the channel.",id:"user-voice-show-insufficient-permissions",type:oe.Type.FAILURE,options:{position:oe.Position.BOTTOM}})}},t))});var CR,Vg,b2,eh,T2=g(()=>{"use strict";a();$();le();I();w();W();x();S2();CR=we("VoiceStateStore"),Vg=L({showInUserProfileModal:{type:3,description:"Show a user's voice channel in their profile modal",default:!0},showVoiceChannelSectionHeader:{type:3,description:'Whether to show "IN A VOICE CHANNEL" above the join button',default:!0}}),b2=U.wrap(({user:e})=>{let{channelId:t}=CR.getVoiceStateForUser(e.id)??{};if(!t)return null;let o=J.getChannel(t);if(!o)return null;let r=pe.getGuild(o.guild_id);if(!r)return null;let i=`${r.name} | ${o.name}`;return n(v2,{channel:o,label:i,showHeader:Vg.store.showVoiceChannelSectionHeader})}),eh=y({name:"UserVoiceShow",description:"Shows whether a User is currently in a voice channel somewhere in their profile",authors:[d.LordElias],settings:Vg,patchModal({user:e}){return Vg.store.showInUserProfileModal?n("div",{className:"vc-uvs-modal-margin"},n(b2,{user:e})):null},patchPopout:({user:e})=>{let t=e.id===F.getCurrentUser().id;return n("div",{className:t?"vc-uvs-popout-margin-self":""},n(b2,{user:e}))},patches:[{find:".lastEditedByContainer",replacement:{match:/\(0,\i\.jsx\)\(\i\.\i,{user:\i,setNote/,replace:"$self.patchPopout(arguments[0]),$&"}},{find:".USER_PROFILE_MODAL",replacement:{match:/\.body.+?displayProfile:\i}\),/,replace:"$&$self.patchModal(arguments[0]),"}}]})});var x2,w2=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/usrbg/index.css",{name:"src/plugins/usrbg/index.css",source:`:is([class*="userProfile"], [class*="userPopout"]) [class*="bannerPremium"] {
  172. background: center / cover no-repeat;
  173. }
  174. [class*="NonPremium"]:has([class*="bannerPremium"]) [class*="avatarPositionNormal"],
  175. [class*="PremiumWithoutBanner"]:has([class*="bannerPremium"]) [class*="avatarPositionPremiumNoBanner"] {
  176. top: 76px;
  177. }
  178. [style*="background-image"] [class*="background_"] {
  179. background-color: transparent !important;
  180. }
  181. `,classNames:{},dom:null});x2="src/plugins/usrbg/index.css"});var kR,kn,Sc,th,M2=g(()=>{"use strict";a();$();ot();en();I();w();w2();kR="https://raw.githubusercontent.com/AutumnVN/usrbg/main/usrbg.json",kn={},Sc=L({nitroFirst:{description:"Banner to use if both Nitro and USRBG banners are present",type:4,options:[{label:"Nitro banner",value:!0,default:!0},{label:"USRBG banner",value:!1}]},voiceBackground:{description:"Use USRBG banners as voice chat backgrounds",type:3,default:!0,restartNeeded:!0}}),th=y({name:"USRBG",description:"Displays user banners from USRBG, allowing anyone to get a banner without Nitro",authors:[d.AutumnVN,d.pylix,d.TheKodeToad],settings:Sc,patches:[{find:".NITRO_BANNER,",replacement:[{match:/(\i)\.premiumType/,replace:"$self.premiumHook($1)||$&"},{match:/(?<=function \i\((\i)\)\{)(?=var.{30,50},bannerSrc:)/,replace:"$1.bannerSrc=$self.useBannerHook($1);"},{match:/\?\(0,\i\.jsx\)\(\i,{type:\i,shown/,replace:"&&$self.shouldShowBadge(arguments[0])$&"}]},{find:'"data-selenium-video-tile":',predicate:()=>Sc.store.voiceBackground,replacement:[{match:/(?<=function\((\i),\i\)\{)(?=let.{20,40},style:)/,replace:"$1.style=$self.voiceBackgroundHook($1);"}]}],data:kn,settingsAboutComponent:()=>n(rt,{href:"https://github.com/AutumnVN/usrbg#how-to-request-your-own-usrbg-banner"},"CLICK HERE TO GET YOUR OWN BANNER"),voiceBackgroundHook({className:e,participantUserId:t}){if(e.includes("tile_")&&kn[t])return{backgroundImage:`url(${kn[t]})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}},useBannerHook({displayProfile:e,user:t}){if(!(e?.banner&&Sc.store.nitroFirst)&&kn[t.id])return kn[t.id]},premiumHook({userId:e}){if(kn[e])return 2},shouldShowBadge({displayProfile:e,user:t}){return e?.banner&&(!kn[t.id]||Sc.store.nitroFirst)},async start(){Tt(x2);let e=await fetch(kR);e.ok&&(kn=await e.json(),this.data=kn)}})});function RR({data:e,UserMention:t,RoleMention:o,parse:r,props:i}){let[s,l]=X(e.userId);if(s)return n(t,{className:"mention",userId:s,channelId:e.channelId,inlinePreview:i.noStyleAndInteraction,key:i.key});let c=r(e.content,i);return n(o,{...e,inlinePreview:i.formatInline},n("span",{onMouseEnter:()=>{let u=c?.[0]?.props?.children;if(typeof u!="string")return;let p=u.match(/<@!?(\d+)>/)?.[1];if(!p||bc.has(p))return;if(F.getUser(p))return l(p);let m=()=>{bc.add(p),P2.unshift(()=>Nt.getUser(p).then(()=>{l(p),bc.delete(p)}).catch(h=>{h?.status===429&&(P2.unshift(()=>On(1e3).then(m)),bc.delete(p))}).finally(()=>On(300)))};m()}},c))}var bc,P2,oh,I2=g(()=>{"use strict";a();le();I();Pe();ri();w();x();bc=new Set,P2=new Lo(5);oh=y({name:"ValidUser",description:"Fix mentions for unknown users showing up as '<@343383572805058560>' (hover over a mention to fix it)",authors:[d.Ven],tags:["MentionCacheFix"],patches:[{find:'className:"mention"',replacement:{match:/react(?=\(\i,\i,\i\).{0,50}return null==\i\?\(0,\i\.jsx\)\((\i\.\i),.+?jsx\)\((\i\.\i),\{className:"mention")/,replace:"react:(...args)=>$self.renderMention($1,$2,...args),originalReact"}}],renderMention(e,t,o,r,i){return n(U,{noop:!0},n(RR,{RoleMention:e,UserMention:t,data:o,parse:r,props:i}))}})});var nh,rh,A2=g(()=>{"use strict";a();I();w();x();nh={},rh=y({name:"VoiceChatDoubleClick",description:"Join voice chats via double click instead of single click",authors:[d.Ven,d.D3SOX],patches:[...[".handleVoiceStatusClick",".handleClickChat"].map(e=>({find:e,replacement:[{match:/onClick:\(\)=>\{this.handleClick\(\)/g,replace:"onClick:()=>{$self.schedule(()=>{this.handleClick()},this)"}]})),{find:".shouldCloseDefaultModals",replacement:{match:/onClick:(\i)(?=,.{0,30}className:"channelMention".+?(\i)\.inContent)/,replace:(e,t,o)=>`onClick:(vcDoubleClickEvt)=>$self.shouldRunOnClick(vcDoubleClickEvt,${o})&&${t}()`}}],shouldRunOnClick(e,{channelId:t}){let o=J.getChannel(t);return!o||![2,13].includes(o.type)?!0:e.detail>=2},schedule(e,t){let o=t.props.channel.id;if(Me.getVoiceChannelId()===o){e();return}let r=nh[o]??={timeout:void 0,i:0};clearTimeout(r.timeout),++r.i>=2?(e(),delete nh[o]):r.timeout=setTimeout(()=>{delete nh[o]},500)}})});function xc(e,t=E.plugins.VcNarrator){if(!e)return;let o=new SpeechSynthesisUtterance(e),r=speechSynthesis.getVoices().find(i=>i.voiceURI===t.voice);!r&&(new ie("VcNarrator").error(`Voice "${t.voice}" not found. Resetting to default.`),r=speechSynthesis.getVoices().find(i=>i.default),t.voice=r?.voiceURI,!r)||(o.voice=r,o.volume=t.volume,o.rate=t.rate,speechSynthesis.speak(o))}function Tc(e){let t=E.plugins.VcNarrator.latinOnly?/[^\p{Script=Latin}\p{Number}\p{Punctuation}\s]/gu:/[^\p{Letter}\p{Number}\p{Punctuation}\s]/gu;return e.normalize("NFKC").replace(t,"").replace(/_{2,}/g,"_").trim()}function wc(e,t,o,r,i){return e.replaceAll("{{USER}}",Tc(t)||(t?"Someone":"")).replaceAll("{{CHANNEL}}",Tc(o)||"channel").replaceAll("{{DISPLAY_NAME}}",Tc(r)||(r?"Someone":"")).replaceAll("{{NICKNAME}}",Tc(i)||(i?"Someone":""))}function DR({channelId:e,oldChannelId:t},o){if(o&&e!==ih&&(t=ih,ih=e),e!==t){if(e)return[t?"move":"join",e];if(t)return["leave",t]}return["",""]}function LR(e,t){let o=Object.assign({},E.plugins.VcNarrator,e),r=F.getCurrentUser(),i=ko.getGuildId();xc(wc(o[t+"Message"],r.username,"general",r.globalName??r.username,Ee.getNick(i,r.id)??r.username),o)}var N2,ih,sh,C2=g(()=>{"use strict";a();$();ni();I();Je();it();yn();w();W();x();N2=A("getVoiceStatesForChannel","getCurrentClientVoiceChannelId");sh=y({name:"VcNarrator",description:"Announces when users join, leave, or move voice channels via narrator",authors:[d.Ven],flux:{VOICE_STATE_UPDATES({voiceStates:e}){let t=ko.getGuildId(),o=Me.getVoiceChannelId(),r=F.getCurrentUser().id;if(J.getChannel(o)?.type!==13)for(let i of e){let{userId:s,channelId:l,oldChannelId:c}=i,u=s===r;if(!u&&(!o||l!==o&&c!==o))continue;let[p,m]=DR(i,u);if(!p)continue;let h=E.plugins.VcNarrator[p+"Message"],v=u&&!E.plugins.VcNarrator.sayOwnName?"":F.getUser(s).username,T=v&&(F.getUser(s).globalName??v),N=v&&(Ee.getNick(t,s)??v),b=J.getChannel(m).name;xc(wc(h,v,b,T,N))}},AUDIO_TOGGLE_SELF_MUTE(){let e=Me.getVoiceChannelId(),t=N2.getVoiceStateForChannel(e);if(!t)return;let o=t.mute||t.selfMute?"unmute":"mute";xc(wc(E.plugins.VcNarrator[o+"Message"],"",J.getChannel(e).name,"",""))},AUDIO_TOGGLE_SELF_DEAF(){let e=Me.getVoiceChannelId(),t=N2.getVoiceStateForChannel(e);if(!t)return;let o=t.deaf||t.selfDeaf?"undeafen":"deafen";xc(wc(E.plugins.VcNarrator[o+"Message"],"",J.getChannel(e).name,"",""))}},start(){if(typeof speechSynthesis>"u"||speechSynthesis.getVoices().length===0){new ie("VcNarrator").warn("SpeechSynthesis not supported or no Narrator voices found. Thus, this plugin will not work. Check my Settings for more info");return}},optionsCache:null,get options(){return this.optionsCache??={voice:{type:4,description:"Narrator Voice",options:window.speechSynthesis?.getVoices().map(e=>({label:e.name,value:e.voiceURI,default:e.default}))??[]},volume:{type:5,description:"Narrator Volume",default:1,markers:[0,.25,.5,.75,1],stickToMarkers:!1},rate:{type:5,description:"Narrator Speed",default:1,markers:[.1,.5,1,2,5,10],stickToMarkers:!1},sayOwnName:{description:"Say own name",type:3,default:!1},latinOnly:{description:"Strip non latin characters from names before saying them",type:3,default:!1},joinMessage:{type:0,description:"Join Message",default:"{{USER}} joined"},leaveMessage:{type:0,description:"Leave Message",default:"{{USER}} left"},moveMessage:{type:0,description:"Move Message",default:"{{USER}} moved to {{CHANNEL}}"},muteMessage:{type:0,description:"Mute Message (only self for now)",default:"{{USER}} Muted"},unmuteMessage:{type:0,description:"Unmute Message (only self for now)",default:"{{USER}} unmuted"},deafenMessage:{type:0,description:"Deafen Message (only self for now)",default:"{{USER}} deafened"},undeafenMessage:{type:0,description:"Undeafen Message (only self for now)",default:"{{USER}} undeafened"}}},settingsAboutComponent({tempSettings:e}){let[t,o]=St(()=>{let s=speechSynthesis.getVoices();return[s.length!==0,s.some(l=>l.lang.startsWith("en"))]},[]),r=St(()=>Object.keys(Vencord.Plugins.plugins.VcNarrator.options).filter(s=>s.endsWith("Message")).map(s=>s.slice(0,-7)),[]),i=null;if(t)o||(i=n(So,null,"You don't have any English voices installed, so the narrator might sound weird"));else{let s="No narrator voices found. ";s+=navigator.platform?.toLowerCase().includes("linux")?"Install speech-dispatcher or espeak and run Discord with the --enable-speech-dispatcher flag":"Try installing some in the Narrator settings of your Operating System",i=n(So,null,s)}return n(S.FormSection,null,n(S.FormText,null,"You can customise the spoken messages below. You can disable specific messages by setting them to nothing"),n(S.FormText,null,"The special placeholders ",n("code",null,"{{USER}}"),", ",n("code",null,"{{DISPLAY_NAME}}"),", ",n("code",null,"{{NICKNAME}}")," and ",n("code",null,"{{CHANNEL}}")," ","will be replaced with the user's name (nothing if it's yourself), the user's display name, the user's nickname on current server and the channel's name respectively"),o&&n(f,null,n(S.FormTitle,{className:z.top20,tag:"h3"},"Play Example Sounds"),n("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"1rem"},className:"vc-narrator-buttons"},r.map(s=>n(C,{key:s,onClick:()=>LR(e,s)},hn([s]))))),i)}})});var k2=g(()=>{});function _R(e){let t=[];for(let o of Object.values(Vencord.Plugins.plugins))o.toolboxActions&&t.push(n(G.MenuGroup,{label:o.name,key:`vc-toolbox-${o.name}`},Object.entries(o.toolboxActions).map(([r,i])=>{let s=`vc-toolbox-${o.name}-${r}`;return n(G.MenuItem,{id:s,key:s,label:r,action:i})})));return n(G.Menu,{navId:"vc-toolbox",onClose:e},n(G.MenuItem,{id:"vc-toolbox-notifications",label:"Open Notification Log",action:Ba}),n(G.MenuCheckboxItem,{id:"vc-toolbox-quickcss-toggle",checked:E.useQuickCss,label:"Enable QuickCSS",action:()=>{E.useQuickCss=!E.useQuickCss,e()}}),n(G.MenuItem,{id:"vc-toolbox-quickcss",label:"Open QuickCSS",action:()=>VencordNative.quickCss.openEditor()}),...t)}function OR(e){return n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 27 27",width:24,height:24},n("path",{fill:"currentColor",d:e?"M9 0h1v1h1v2h1v2h3V3h1V1h1V0h1v2h1v2h1v7h-1v-1h-3V9h1V6h-1v4h-3v1h1v-1h2v1h3v1h-1v1h-3v2h1v1h1v1h1v3h-1v4h-2v-1h-1v-4h-1v4h-1v1h-2v-4H9v-3h1v-1h1v-1h1v-2H9v-1H8v-1h3V6h-1v3h1v1H8v1H7V4h1V2h1M5 19h2v1h1v1h1v3H4v-1h2v-1H4v-2h1m15-1h2v1h1v2h-2v1h2v1h-5v-3h1v-1h1m4 3h4v1h-4":"M0 0h7v1H6v1H5v1H4v1H3v1H2v1h5v1H0V6h1V5h1V4h1V3h1V2h1V1H0m13 2h5v1h-1v1h-1v1h-1v1h3v1h-5V7h1V6h1V5h1V4h-3m8 5h1v5h1v-1h1v1h-1v1h1v-1h1v1h-1v3h-1v1h-2v1h-1v1h1v-1h2v-1h1v2h-1v1h-2v1h-1v-1h-1v1h-6v-1h-1v-1h-1v-2h1v1h2v1h3v1h1v-1h-1v-1h-3v-1h-4v-4h1v-2h1v-1h1v-1h1v2h1v1h1v-1h1v1h-1v1h2v-2h1v-2h1v-1h1M8 14h2v1H9v4h1v2h1v1h1v1h1v1h4v1h-6v-1H5v-1H4v-5h1v-1h1v-2h2m17 3h1v3h-1v1h-1v1h-1v2h-2v-2h2v-1h1v-1h1m1 0h1v3h-1v1h-2v-1h1v-1h1"}))}function BR(){let[e,t]=X(!1);return n(Wi,{position:"bottom",align:"right",animation:Wi.Animation.NONE,shouldShow:e,onRequestClose:()=>t(!1),renderPopout:()=>_R(()=>t(!1))},(o,{isShown:r})=>n(ER,{className:"vc-toolbox-btn",onClick:()=>t(i=>!i),tooltip:r?null:"Vencord Toolbox",icon:()=>OR(r),selected:r}))}function FR({children:e}){return e.splice(e.length-1,0,n(U,{noop:!0},n(BR,null))),n(f,null,e)}var ER,ah,R2=g(()=>{"use strict";a();k2();Fa();$();le();I();w();W();x();ER=un("Icon","Divider");ah=y({name:"VencordToolbox",description:"Adds a button next to the inbox button in the channel header that houses Vencord quick actions",authors:[d.Ven,d.AutumnVN],patches:[{find:"toolbar:function",replacement:{match:/(?<=toolbar:function.{0,100}\()\i.Fragment,/,replace:"$self.ToolboxFragmentWrapper,"}}],ToolboxFragmentWrapper:U.wrap(FR,{fallback:()=>n("p",{style:{color:"red"}},"Failed to render :(")})})});function ua(e){let t=e.startsWith("/")?"png":lh.store.format,o=new URL(e,window.location.href);o.searchParams.set("size",lh.store.imgSize),o.pathname=o.pathname.replace(/\.(png|jpe?g|webp)$/,`.${t}`),e=o.toString(),o.searchParams.set("size","4096");let r=o.toString();Bo(e,{original:r,height:256})}var Mc,lh,D2,L2,ch,E2=g(()=>{"use strict";a();kt();$();Dt();I();nt();w();W();x();Mc=A("getGuildBannerURL"),lh=L({format:{type:4,description:"Choose the image format to use for non animated images. Animated images will always use .gif",options:[{label:"webp",value:"webp",default:!0},{label:"png",value:"png"},{label:"jpg",value:"jpg"}]},imgSize:{type:4,description:"The image size to use",options:["128","256","512","1024","2048","4096"].map(e=>({label:e,value:e,default:e==="1024"}))}});D2=(e,{user:t,guildId:o})=>()=>{if(!t)return;let r=Ee.getMember(o,t.id)?.avatar||null;e.splice(-1,0,n(G.MenuGroup,null,n(G.MenuItem,{id:"view-avatar",label:"View Avatar",action:()=>ua(Mc.getUserAvatarURL(t,!0)),icon:Rr}),r&&n(G.MenuItem,{id:"view-server-avatar",label:"View Server Avatar",action:()=>ua(Mc.getGuildMemberAvatarURLSimple({userId:t.id,avatar:r,guildId:o,canAnimate:!0},!0)),icon:Rr})))},L2=(e,{guild:t})=>()=>{if(!t)return;let{id:o,icon:r,banner:i}=t;!i&&!r||e.splice(-1,0,n(G.MenuGroup,null,r?n(G.MenuItem,{id:"view-icon",label:"View Icon",action:()=>ua(Mc.getGuildIconURL({id:o,icon:r,canAnimate:!0})),icon:Rr}):null,i?n(G.MenuItem,{id:"view-banner",label:"View Banner",action:()=>ua(Mc.getGuildBannerURL({id:o,banner:i},!0)),icon:Rr}):null))},ch=y({name:"ViewIcons",authors:[d.Ven,d.TheKodeToad,d.Nuckyz],description:"Makes avatars and banners in user profiles clickable, and adds View Icon/Banner entries in the user and server context menu",tags:["ImageUtilities"],settings:lh,openImage:ua,start(){de("user-context",D2),de("guild-context",L2)},stop(){ge("user-context",D2),ge("guild-context",L2)},patches:[{find:"User Profile Modal - Context Menu",replacement:{match:/\{src:(\i)(?=,avatarDecoration)/,replace:"{src:$1,onClick:()=>$self.openImage($1)"}},{find:".NITRO_BANNER,",replacement:{match:/style:\{(?=backgroundImage:(\i&&\i)\?"url\("\.concat\((\i),)/,replace:'onClick:ev=>$1&&ev.target.style.backgroundImage&&$self.openImage($2),style:{cursor:$1?"pointer":void 0,'}},{find:".avatarPositionPanel",replacement:{match:/(?<=avatarWrapperNonUserBot.{0,50})onClick:(\i\|\|\i)\?void 0(?<=,avatarSrc:(\i).+?)/,replace:'style:($1)?{cursor:"pointer"}:{},onClick:$1?()=>{$self.openImage($2)}'}}]})});function uh(e){return n("div",{className:UR.markup},_e.defaultRules.codeBlock.react(e,null,{}))}var UR,_2=g(()=>{"use strict";a();W();x();UR=A("markup","codeContainer")});function $R(e){return Object.fromEntries(Object.entries(e).sort(([t],[o])=>t.localeCompare(o)))}function GR(e){let t=$R(JSON.parse(JSON.stringify(e)));for(let r of["email","phone","mfaEnabled","personalConnectionId"])delete t.author[r];let o=t;return delete o.editHistory,delete o.deleted,o.attachments?.forEach(r=>delete r.deleted),t}function F2(e,t,o){let r=Ne(i=>n(U,null,n(Oe,{...i,size:"large"},n(tt,null,n(Q,{variant:"heading-lg/semibold",style:{flexGrow:1}},"View Raw"),n(_t,{onClick:()=>dn(r)})),n(Ye,null,n("div",{style:{padding:"16px 0"}},!!o&&n(f,null,n(S.FormTitle,{tag:"h5"},"Content"),n(uh,{content:o,lang:""}),n(S.FormDivider,{className:z.bottom20})),n(S.FormTitle,{tag:"h5"},t," Data"),n(uh,{content:e,lang:"json"}))),n(bt,null,n(ce,{cellSpacing:10},n(C,{onClick:()=>vo(e,`${t} data copied to clipboard!`)},"Copy ",t," JSON"),!!o&&n(C,{onClick:()=>vo(o,"Content copied to clipboard!")},"Copy Raw Content"))))))}function O2(e){e=GR(e);let t=JSON.stringify(e,null,4);return F2(t,"Message",e.content)}function Fi(e){return(o,r)=>()=>{if(e==="Guild"&&!r.guild||e==="User"&&!r.user)return;let i=o.at(-1);if(i?.key==="developer-actions"){let s=i.props;Array.isArray(s.children)||(s.children=[s.children]),{children:o}=s}o.splice(-1,0,n(G.MenuItem,{id:`vc-view-${e.toLowerCase()}-raw`,label:"View Raw",action:()=>F2(JSON.stringify(r[e.toLowerCase()],null,4),e),icon:B2}))}}var B2,Pc,ph,U2=g(()=>{"use strict";a();kt();Gr();$();_2();le();Ct();I();it();Pe();st();w();x();B2=()=>n("svg",{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",width:"18",height:"18"},n("path",{d:"M12.9297 3.25007C12.7343 3.05261 12.4154 3.05226 12.2196 3.24928L11.5746 3.89824C11.3811 4.09297 11.3808 4.40733 11.5739 4.60245L16.5685 9.64824C16.7614 9.84309 16.7614 10.1569 16.5685 10.3517L11.5739 15.3975C11.3808 15.5927 11.3811 15.907 11.5746 16.1017L12.2196 16.7507C12.4154 16.9477 12.7343 16.9474 12.9297 16.7499L19.2604 10.3517C19.4532 10.1568 19.4532 9.84314 19.2604 9.64832L12.9297 3.25007Z"}),n("path",{d:"M8.42616 4.60245C8.6193 4.40733 8.61898 4.09297 8.42545 3.89824L7.78047 3.24928C7.58466 3.05226 7.26578 3.05261 7.07041 3.25007L0.739669 9.64832C0.5469 9.84314 0.546901 10.1568 0.739669 10.3517L7.07041 16.7499C7.26578 16.9474 7.58465 16.9477 7.78047 16.7507L8.42545 16.1017C8.61898 15.907 8.6193 15.5927 8.42616 15.3975L3.43155 10.3517C3.23869 10.1569 3.23869 9.84309 3.43155 9.64824L8.42616 4.60245Z"}));Pc=L({clickMethod:{description:"Change the button to view the raw content/data of any message.",type:4,options:[{label:"Left Click to view the raw content.",value:"Left",default:!0},{label:"Right click to view the raw content.",value:"Right"}]}});ph=y({name:"ViewRaw",description:"Copy and view the raw content/data of any message, channel or guild",authors:[d.KingFish,d.Ven,d.rad,d.ImLvna],dependencies:["MessagePopoverAPI"],settings:Pc,start(){$o("ViewRaw",e=>{let t=()=>{Pc.store.clickMethod==="Right"?vo(e.content):O2(e)},o=i=>{Pc.store.clickMethod==="Left"?(i.preventDefault(),i.stopPropagation(),vo(e.content)):(i.preventDefault(),i.stopPropagation(),O2(e))};return{label:Pc.store.clickMethod==="Right"?"Copy Raw (Left Click) / View Raw (Right Click)":"View Raw (Left Click) / Copy Raw (Right Click)",icon:B2,message:e,channel:J.getChannel(e.channel_id),onClick:t,onContextMenu:o}}),de("guild-context",Fi("Guild")),de("channel-context",Fi("Channel")),de("user-context",Fi("User"))},stop(){Go("CopyRawMessage"),ge("guild-context",Fi("Guild")),ge("channel-context",Fi("Channel")),ge("user-context",Fi("User"))}})});var $2=g(()=>{});var Ui,Ic=g(()=>{"use strict";a();$();w();Ui=L({noiseSuppression:{type:3,description:"Noise Suppression",default:!0},echoCancellation:{type:3,description:"Echo Cancellation",default:!0}})});var HR,G2,H2=g(()=>{"use strict";a();x();Ic();HR=VencordNative.pluginHelpers.VoiceMessages,G2=({setAudioBlob:e,onRecordingChange:t})=>{let[o,r]=X(!1),i=l=>{r(l),t?.(l)};function s(){let l=DiscordNative.nativeModules.requireModule("discord_voice");!o?l.startLocalAudioRecording({echoCancellation:Ui.store.echoCancellation,noiseCancellation:Ui.store.noiseSuppression},u=>{u?i(!0):$t("Failed to start recording",oe.Type.FAILURE)}):l.stopLocalAudioRecording(async u=>{if(u){let p=await HR.readRecording(u);p?e(new Blob([p],{type:"audio/ogg; codecs=opus"})):$t("Failed to finish recording",oe.Type.FAILURE)}i(!1)})}return n(C,{onClick:s},o?"Stop":"Start"," recording")}});var ur,dh=g(()=>{"use strict";a();ot();ur=Be("vc-vmsg-")});var zR,z2,j2=g(()=>{"use strict";a();ut();W();dh();zR=je("waveform:","onVolumeChange"),z2=({src:e,waveform:t,recording:o})=>{let r=os({deps:[o]}),i=o?Math.floor(r/1e3):0,s=Math.floor(i/60)+":"+(i%60).toString().padStart(2,"0");return e&&!o?n(zR,{key:e,src:e,waveform:t}):n("div",{className:ur("preview",o?"preview-recording":[])},n("div",{className:ur("preview-indicator")}),n("div",{className:ur("preview-time")},s),n("div",{className:ur("preview-label")},o?"RECORDING":"----"))}});var W2=g(()=>{"use strict";a();x();Ic()});function KR(e,t){let o=Me.getChannelId(),r=WR.getPendingReply(o);r&&B.dispatch({type:"DELETE_PENDING_REPLY",channelId:o});let i=new jR.CloudUpload({file:new File([e],"voice-message.ogg",{type:"audio/ogg; codecs=opus"}),isClip:!1,isThumbnail:!1,platform:1},o,!1,0);i.on("complete",()=>{At.post({url:`/channels/${o}/messages`,body:{flags:1<<13,channel_id:o,content:"",nonce:Ko.fromTimestamp(Date.now()),sticker_ids:[],type:0,attachments:[{id:"0",filename:i.filename,uploaded_filename:i.uploadedFilename,waveform:t.waveform,duration_secs:t.duration}],message_reference:r?fo.getSendMessageOptionsForReply(r)?.messageReference:null}})}),i.on("error",()=>$t("Failed to upload voice message",oe.Type.FAILURE)),i.upload()}function YR(){let[e,t]=X();return[e,r=>{e&&URL.revokeObjectURL(e),t(URL.createObjectURL(r))}]}function ZR({modalProps:e}){let[t,o]=X(!1),[r,i]=X(),[s,l]=YR();ue(()=>()=>{s&&URL.revokeObjectURL(s)},[s]);let[c]=lt(async()=>{if(!r)return q2;let p=await new AudioContext().decodeAudioData(await r.arrayBuffer()),m=p.getChannelData(0),h=new Uint8Array(Tr.clamp(Math.floor(p.duration*10),Math.min(32,m.length),256)),v=Math.floor(m.length/h.length);for(let b=0;b<h.length;b++){let P=0;for(let k=0;k<v;k++){let M=b*v+k;P+=m[M]**2}h[b]=~~(Math.sqrt(P/v)*255)}let T=Math.max(...h),N=1+(255/T-1)*Math.min(1,100*(T/255)**3);for(let b=0;b<h.length;b++)h[b]=Math.min(255,~~(h[b]*N));return{waveform:window.btoa(String.fromCharCode(...h)),duration:p.duration}},{deps:[r],fallbackValue:q2});return n(Oe,{...e},n(tt,null,n(S.FormTitle,null,"Record Voice Message")),n(Ye,{className:ur("modal")},n("div",{className:ur("buttons")},n(qR,{setAudioBlob:u=>{i(u),l(u)},onRecordingChange:o}),n(C,{onClick:async()=>{let u=await By("audio/*");u&&(i(u),l(u))}},"Upload File")),n(S.FormTitle,null,"Preview"),n(z2,{src:s,waveform:c.waveform,recording:t})),n(bt,null,n(C,{disabled:!r,onClick:()=>{KR(r,c),e.onClose(),$t("Now sending voice message... Please be patient",oe.Type.MESSAGE)}},"Send")))}var jR,WR,mh,qR,fh,q2,K2,Y2=g(()=>{"use strict";a();$2();kt();Dt();I();nt();st();ut();w();Lu();W();x();H2();Ic();dh();j2();W2();jR=A("CloudUpload"),WR=we("PendingReplyStore"),mh=A("optionName","optionIcon","optionLabel"),qR=G2,fh=y({name:"VoiceMessages",description:"Allows you to send voice messages like on mobile. To do so, right click the upload button and click Send Voice Message",authors:[d.Ven,d.Vap,d.Nickyux],settings:Ui,start(){de("channel-attach",K2)},stop(){ge("channel-attach",K2)}}),q2={waveform:"AAAAAAAAAAAA",duration:1};K2=(e,t)=>()=>{t.channel.guild_id&&!(Le.can(Te.SEND_VOICE_MESSAGES,t.channel)&&Le.can(Te.SEND_MESSAGES,t.channel))||e.push(n(G.MenuItem,{id:"vc-send-vmsg",label:n("div",{className:mh.optionLabel},n(av,{className:mh.optionIcon,height:24,width:24}),n("div",{className:mh.optionName},"Send voice message")),action:()=>Ne(o=>n(ZR,{modalProps:o}))}))}});var XR,gh,Z2=g(()=>{"use strict";a();$();fi();I();w();XR=L({multiplier:{description:"Volume Multiplier",type:5,markers:go(1,5,1),default:2,stickToMarkers:!0}}),gh=y({name:"VolumeBooster",authors:[d.Nuckyz],description:"Allows you to set the user and stream volume above the default maximum.",settings:XR,patches:[...[".Messages.USER_VOLUME","currentVolume:"].map(e=>({find:e,replacement:{match:/(?<=maxValue:\i\.\i)\?(\d+?):(\d+?)(?=,)/,replace:(t,o,r)=>`?${o}*$self.settings.store.multiplier:${r}*$self.settings.store.multiplier`}})),{find:"AudioContextSettingsMigrated",replacement:[{match:/(?<=isLocalMute\(\i,\i\),volume:.+?volume:)\i(?=})/,replace:"$&>200?200:$&"},{match:/(?<=Object\.entries\(\i\.localMutes\).+?volume:).+?(?=,)/,replace:"$&>200?200:$&"},{match:/(?<=Object\.entries\(\i\.localVolumes\).+?volume:).+?(?=})/,replace:"$&>200?200:$&"}]},{find:'.displayName="MediaEngineStore"',replacement:[{match:/(\.settings\.audioContextSettings.+?)(\i\[\i\])=(\i\.volume)(.+?setLocalVolume\(\i,).+?\)/,replace:(e,t,o,r,i)=>t+`(${o}>200?void 0:${o}=${r})`+i+`${o}??${r})`}]}]})});function eD(e,t,o){let r=t.name+(t.id?`:${t.id}`:"");return At.get({url:`/channels/${e.channel_id}/messages/${e.id}/reactions/${r}`,query:{limit:100,type:o},oldFormErrors:!0}).then(i=>B.dispatch({type:"MESSAGE_REACTION_ADD_USERS",channelId:e.channel_id,messageId:e.id,users:i.body,emoji:t,reactionType:o})).catch(console.error).finally(()=>On(250))}function tD(e,t,o){let r=`${e.id}:${t.name}:${t.id??""}:${o}`,i=X2[r]??={fetched:!1,users:{}};return i.fetched||(VR.unshift(()=>eD(e,t,o)),i.fetched=!0),i.users}function oD(e){return function(o,r){return n(ee,{text:e.slice(5).map(i=>i.username).join(", ")},({onMouseEnter:i,onMouseLeave:s})=>n("div",{className:QR.moreUsers,onMouseEnter:i,onMouseLeave:s},"+",e.length-5))}}function nD(e){e.stopPropagation()}var JR,QR,VR,X2,hh,J2=g(()=>{"use strict";a();le();I();Pe();ri();ut();w();W();x();JR=je("defaultRenderUser","showDefaultAvatarsForNullUsers"),QR=A("moreUsers","emptyUser","avatarContainer","clickableAvatar"),VR=new Lo;hh=y({name:"WhoReacted",description:"Renders the avatars of users who reacted to a message",authors:[d.Ven,d.KannaDev],patches:[{find:",reactionRef:",replacement:{match:/(\i)\?null:\(0,\i\.jsx\)\(\i\.\i,{className:\i\.reactionCount,.*?}\),/,replace:"$&$1?null:$self.renderUsers(this.props),"}},{find:'.displayName="MessageReactionsStore";',replacement:{match:/(?<=CONNECTION_OPEN:function\(\){)(\i)={}/,replace:"$&;$self.reactions=$1"}}],renderUsers(e){return e.message.reactions.length>10?null:n(U,{noop:!0},n(this._renderUsers,{...e}))},_renderUsers({message:e,emoji:t,type:o}){let r=Bn();_.useEffect(()=>{let l=c=>{c.messageId===e.id&&r()};return B.subscribe("MESSAGE_REACTION_ADD_USERS",l),()=>B.unsubscribe("MESSAGE_REACTION_ADD_USERS",l)},[e.id]);let i=tD(e,t,o),s=Object.values(i).filter(Boolean);for(let l of s)B.dispatch({type:"USER_UPDATE",user:l});return n("div",{style:{marginLeft:"0.5em",transform:"scale(0.9)"}},n("div",{onClick:nD},n(JR,{users:s,guildId:J.getChannel(e.channel_id)?.guild_id,renderIcon:!1,max:5,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:oD(s)})))},set reactions(e){X2=e}})});var yh,Q2=g(()=>{"use strict";a();so();I();w();yh=y({name:"Wikisearch",description:"Searches Wikipedia for your requested query. (/wikisearch)",authors:[d.Samu],dependencies:["CommandsAPI"],commands:[{name:"wikisearch",description:"Searches Wikipedia for your request.",inputType:0,options:[{name:"search",description:"Word to search for",type:3,required:!0}],execute:async(e,t)=>{let o=ct(e,"search","");if(!o)return me(t.channel.id,{content:"No word was defined!"});let r=new URLSearchParams({action:"query",format:"json",list:"search",formatversion:"2",origin:"*",srsearch:o}),i=await fetch("https://en.wikipedia.org/w/api.php?"+r).then(u=>u.json()).catch(u=>(console.log(u),me(t.channel.id,{content:"There was an error. Check the console for more info"}),null));if(!i)return;if(!i.query?.search?.length)return console.log(i),me(t.channel.id,{content:"No results given"});let s=await fetch(`https://en.wikipedia.org/w/api.php?action=query&format=json&prop=info%7Cdescription%7Cimages%7Cimageinfo%7Cpageimages&list=&meta=&indexpageids=1&pageids=${i.query.search[0].pageid}&formatversion=2&origin=*`).then(u=>u.json()).then(u=>u.query.pages[0]).catch(u=>(console.log(u),me(t.channel.id,{content:"There was an error. Check the console for more info"}),null));if(!s)return;let l=s.thumbnail,c=l&&{url:l.source.replace(/(50px-)/ig,"1000px-"),height:l.height*100,width:l.width*100};me(t.channel.id,{embeds:[{type:"rich",title:i.query.search[0].title,url:`https://wikipedia.org/w/index.php?curid=${i.query.search[0].pageid}`,color:"0x8663BE",description:i.query.search[0].snippet.replace(/(&nbsp;|<([^>]+)>)/ig,"").replace(/(&quot;)/ig,'"')+"...",image:c,footer:{text:"Powered by the Wikimedia API"}}]})}}]})});function iD(e,t,o){fetch(`https://cdn.discordapp.com/avatars/${o.author.id}/${o.author.avatar}.png?size=128`).then(r=>r.arrayBuffer()).then(r=>{let i={messageType:1,index:0,timeout:Mo.store.timeout,height:tM(oM(t)),opacity:Mo.store.opacity,volume:Mo.store.volume,audioPath:Mo.store.soundPath,title:e,content:t,useBase64Icon:!0,icon:r,sourceApp:"Vencord"};eM.sendToOverlay(i)})}function sD(e,t){let o={messageType:1,index:0,timeout:Mo.store.timeout,height:tM(oM(e)),opacity:Mo.store.opacity,volume:Mo.store.volume,audioPath:Mo.store.soundPath,title:t,content:e,useBase64Icon:!1,icon:null,sourceApp:"Vencord"};eM.sendToOverlay(o)}function aD(e,t){let o=F.getCurrentUser();return e.author.id===o.id||e.author.bot&&Mo.store.ignoreBots?!1:V2.allowAllMessages(t)||e.mention_everyone&&!V2.isSuppressEveryoneEnabled(e.guild_id)?!0:e.mentions.some(r=>r.id===o.id)}function tM(e){return e.length<=100?100:e.length<=200?150:e.length<=300?200:250}function oM(e){return e.replace(new RegExp("<[^>]*>","g"),"")}var V2,rD,Mo,eM,vh,nM=g(()=>{"use strict";a();$();fi();I();Je();w();W();x();V2=A("isSuppressEveryoneEnabled"),rD=new ie("XSOverlay"),Mo=L({ignoreBots:{type:3,description:"Ignore messages from bots",default:!1},pingColor:{type:0,description:"User mention color",default:"#7289da"},channelPingColor:{type:0,description:"Channel mention color",default:"#8a2be2"},soundPath:{type:0,description:"Notification sound (default/warning/error)",default:"default"},timeout:{type:1,description:"Notif duration (secs)",default:1},opacity:{type:5,description:"Notif opacity",default:1,markers:go(0,1,.1)},volume:{type:5,description:"Volume",default:.2,markers:go(0,1,.1)}}),eM=VencordNative.pluginHelpers.XsOverlay,vh=y({name:"XSOverlay",description:"Forwards discord notifications to XSOverlay, for easy viewing in VR",authors:[d.Nyako],tags:["vr","notify"],settings:Mo,flux:{CALL_UPDATE({call:e}){if(e?.ringing?.includes(F.getCurrentUser().id)){let t=J.getChannel(e.channel_id);sD("Incoming call",`${t.name} is calling you...`)}},MESSAGE_CREATE({message:e,optimistic:t}){try{if(t)return;let o=J.getChannel(e.channel_id);if(!aD(e,o))return;let r=Mo.store.pingColor.replaceAll("#","").trim(),i=Mo.store.channelPingColor.replaceAll("#","").trim(),s=e.content,l="";if(o.guild_id){let m=pe.getGuild(o.guild_id);l=`${e.author.username} (${m.name}, #${o.name})`}switch(o.type){case 1:l=e.author.username.trim();break;case 3:let m=o.name.trim()??o.rawRecipients.map(h=>h.username).join(", ");l=`${e.author.username} (${m})`;break}if(e.referenced_message&&(l+=" (reply)"),e.embeds.length>0&&(s+=" [embed] ",e.content===""&&(s="sent message embed(s)")),e.sticker_items&&(s+=" [sticker] ",e.content===""&&(s="sent a sticker")),e.attachments.filter(m=>typeof m?.content_type=="string"&&m?.content_type.startsWith("image")).forEach(m=>{s+=` [image: ${m.filename}] `}),e.attachments.filter(m=>m&&!m.content_type?.startsWith("image")).forEach(m=>{s+=` [attachment: ${m.filename}] `}),e.mentions.length>0&&(s=s.replace(/<@!?(\d{17,20})>/g,(m,h)=>`<color=#${r}><b>@${F.getUser(h)?.username||"unknown-user"}</color></b>`)),e.mention_roles.length>0)for(let m of e.mention_roles){let h=pe.getGuild(o.guild_id).roles[m];if(!h)continue;let v=h.colorString??`#${r}`;s=s.replace(`<@&${m}>`,`<b><color=${v}>@${h.name}</color></b>`)}let u=s.match(new RegExp("(<a?:\\w+:\\d+>)","g")),p=s.match(new RegExp("<(#\\d+)>","g"));if(u)for(let m of u)s=s.replace(new RegExp(`${m}`,"g"),`:${m.split(":")[1]}:`);if(p)for(let m of p){let h=m.split("<#")[1];h=h.substring(0,h.length-1),s=s.replace(new RegExp(`${m}`,"g"),`<b><color=#${i}>#${J.getChannel(h).name}</color></b>`)}iD(l,s,e)}catch(o){rD.error(`Failed to catch MESSAGE_CREATE: ${o}`)}}}})});var $e,Nr=g(()=>{a();oy();ny();ry();iy();sy();ay();ly();cy();uy();py();dy();yp();t1();o1();n1();r1();i1();wp();d1();m1();f1();g1();x1();M1();P1();C1();E1();_1();O1();F1();G1();K1();Z1();TS();xS();NS();kS();RS();VS();r0();i0();l0();c0();u0();p0();d0();f0();g0();S0();x0();w0();A0();jd();Al();U0();G0();j0();K0();X0();V0();ab();cb();ub();pb();mb();fb();gb();hb();yb();vb();Sb();Tb();xb();wb();Mb();Pb();Ib();Ab();Nb();Cb();kb();Rb();Db();Lb();Eb();_b();Ub();$b();qs();eT();nT();gT();hT();ST();xT();ET();_T();qT();KT();YT();ax();lx();px();dx();gx();hx();Sx();Mx();Dx();fw();gw();Tw();gg();Nw();Cw();kw();Rw();Lw();Gw();Hw();zw();qw();Kw();e2();t2();o2();u2();d2();qg();m2();g2();h2();T2();M2();I2();A2();C2();R2();E2();U2();Y2();Z2();J2();Q2();nM();$e={[Qc.name]:Qc,[Vc.name]:Vc,[eu.name]:eu,[tu.name]:tu,[ou.name]:ou,[nu.name]:nu,[ru.name]:ru,[iu.name]:iu,[su.name]:su,[au.name]:au,[lu.name]:lu,[Ns.name]:Ns,[vp.name]:vp,[Sp.name]:Sp,[bp.name]:bp,[Tp.name]:Tp,[xp.name]:xp,[Ip.name]:Ip,[Ap.name]:Ap,[Np.name]:Np,[Cp.name]:Cp,[kp.name]:kp,[Rp.name]:Rp,[Dp.name]:Dp,[Lp.name]:Lp,[Gp.name]:Gp,[Hp.name]:Hp,[zp.name]:zp,[jp.name]:jp,[Wp.name]:Wp,[Zp.name]:Zp,[Jp.name]:Jp,[Qp.name]:Qp,[pd.name]:pd,[dd.name]:dd,[fd.name]:fd,[hd.name]:hd,[yd.name]:yd,[Pd.name]:Pd,[Id.name]:Id,[Ad.name]:Ad,[Nd.name]:Nd,[Cd.name]:Cd,[kd.name]:kd,[Rd.name]:Rd,[Dd.name]:Dd,[Ed.name]:Ed,[_d.name]:_d,[Od.name]:Od,[Fd.name]:Fd,[Ud.name]:Ud,[$d.name]:$d,[qd.name]:qd,[Zd.name]:Zd,[Xd.name]:Xd,[Vd.name]:Vd,[em.name]:em,[tm.name]:tm,[nm.name]:nm,[am.name]:am,[um.name]:um,[pm.name]:pm,[dm.name]:dm,[mm.name]:mm,[gm.name]:gm,[vm.name]:vm,[Sm.name]:Sm,[bm.name]:bm,[Tm.name]:Tm,[xm.name]:xm,[wm.name]:wm,[Im.name]:Im,[Am.name]:Am,[Nm.name]:Nm,[Cm.name]:Cm,[km.name]:km,[Rm.name]:Rm,[Dm.name]:Dm,[Lm.name]:Lm,[Em.name]:Em,[_m.name]:_m,[Om.name]:Om,[Bm.name]:Bm,[Fm.name]:Fm,[Um.name]:Um,[$m.name]:$m,[Gm.name]:Gm,[zm.name]:zm,[Xm.name]:Xm,[Jm.name]:Jm,[Qm.name]:Qm,[nf.name]:nf,[rf.name]:rf,[hf.name]:hf,[Sf.name]:Sf,[xf.name]:xf,[wf.name]:wf,[Mf.name]:Mf,[If.name]:If,[Cf.name]:Cf,[Ff.name]:Ff,[Uf.name]:Uf,[$f.name]:$f,[Gf.name]:Gf,[Hf.name]:Hf,[zf.name]:zf,[jf.name]:jf,[Kf.name]:Kf,[Yf.name]:Yf,[dg.name]:dg,[mg.name]:mg,[fg.name]:fg,[hg.name]:hg,[yg.name]:yg,[vg.name]:vg,[Tg.name]:Tg,[xg.name]:xg,[wg.name]:wg,[Ig.name]:Ig,[Ng.name]:Ng,[Rg.name]:Rg,[Dg.name]:Dg,[Eg.name]:Eg,[Og.name]:Og,[Bg.name]:Bg,[Fg.name]:Fg,[zg.name]:zg,[Yg.name]:Yg,[Wg.name]:Wg,[Zg.name]:Zg,[Jg.name]:Jg,[Qg.name]:Qg,[eh.name]:eh,[th.name]:th,[oh.name]:oh,[rh.name]:rh,[sh.name]:sh,[ah.name]:ah,[ch.name]:ch,[ph.name]:ph,[fh.name]:fh,[gh.name]:gh,[hh.name]:hh,[yh.name]:yh,[vh.name]:vh}});var bh={};ze(bh,{BadgePosition:()=>Ra,_getBadges:()=>lD,addBadge:()=>yf,removeBadge:()=>vf});function yf(e){e.component&&=U.wrap(e.component,{noop:!0}),Sh.add(e)}function vf(e){return Sh.delete(e)}function lD(e){let t=[];for(let r of Sh)(!r.shouldShow||r.shouldShow(e))&&(r.position===0?t.unshift({...r,...e}):t.push({...r,...e}));let o=$e.BadgeAPI.getDonorBadges(e.user.id);return o&&t.unshift(...o),t}var Ra,Sh,Da=g(()=>{"use strict";a();le();Nr();Ra=(o=>(o[o.START=0]="START",o[o.END=1]="END",o))(Ra||{}),Sh=new Set});var Th={};ze(Th,{Badges:()=>mD,Commands:()=>uD,ContextMenu:()=>bD,DataStore:()=>xt,MemberListDecorators:()=>hD,MessageAccessories:()=>pD,MessageDecorations:()=>gD,MessageEvents:()=>cD,MessagePopover:()=>dD,Notices:()=>oc,Notifications:()=>SD,ServerList:()=>fD,Settings:()=>yD,Styles:()=>vD});var cD,oc,uD,xt,pD,dD,mD,fD,gD,hD,yD,vD,SD,bD,yi=g(()=>{"use strict";a();Da();so();kt();Jo();cf();Rl();mf();tn();Gr();ju();Fn();ec();$();ot();cD=$p,oc=zu,uD=ep,xt=mn,pD=im,dD=Bd,mD=bh,fD=Nf,gD=df,hD=lf,yD=_u,vD=yu,SD=Su,bD=uu});var PD={};ze(PD,{Api:()=>Th,PlainSettings:()=>Vo,Plugins:()=>fp,QuickCss:()=>Ph,Settings:()=>E,Updater:()=>Bu,Util:()=>xh,Webpack:()=>Ih});a();yi();nl();var xh={};ze(xh,{ChangeList:()=>Ps,Devs:()=>d,DevsById:()=>oi,ImageModal:()=>Xc,InviteActions:()=>mv,LazyComponent:()=>Pt,Logger:()=>ie,Margins:()=>z,MessageActions:()=>fo,ModalCloseButton:()=>_t,ModalContent:()=>Ye,ModalFooter:()=>bt,ModalHeader:()=>tt,ModalRoot:()=>Oe,ModalSize:()=>Zo,Modals:()=>Do,NoopComponent:()=>NM,Queue:()=>Lo,REACT_GLOBAL:()=>PM,SUPPORT_CHANNEL_ID:()=>Na,Theme:()=>Ts,UserProfileActions:()=>dv,VENCORD_USER_AGENT:()=>zc,WEBPACK_CHUNK:()=>Yo,canonicalizeDescriptor:()=>Cc,canonicalizeMatch:()=>an,canonicalizeReplace:()=>fa,canonicalizeReplacement:()=>Hi,checkIntersecting:()=>Wc,classes:()=>te,closeAllModals:()=>Xo,closeModal:()=>dn,copyWithToast:()=>vo,debounce:()=>no,fetchUserProfile:()=>Zu,formatDuration:()=>vs,getCurrentChannel:()=>di,getCurrentGuild:()=>Yu,getTheme:()=>Kn,getUniqueUsername:()=>Sn,gitHash:()=>po,gitRemote:()=>Aa,humanFriendlyJoin:()=>RP,identity:()=>es,insertTextIntoChatInputBox:()=>vn,isMobile:()=>AM,isNonNullish:()=>Xp,isObject:()=>IM,isObjectEmpty:()=>Vi,isPluginDev:()=>ts,isTruthy:()=>sl,localStorage:()=>Ir,makeCodeblock:()=>Ss,makeLazy:()=>En,mergeDefaults:()=>Mr,onceDefined:()=>TD,onlyOnce:()=>Fu,openImageModal:()=>Bo,openInviteModal:()=>bs,openModal:()=>Ne,openModalLazy:()=>rs,openPrivateChannel:()=>DP,openUserProfile:()=>Fo,parseUrl:()=>jc,proxyLazy:()=>Ft,sendMessage:()=>LP,sleep:()=>On,useAwaiter:()=>lt,useForceUpdater:()=>Bn,useIntersection:()=>qc,useTimer:()=>os,wordsFromCamel:()=>qu,wordsFromKebab:()=>MP,wordsFromPascal:()=>Ku,wordsFromSnake:()=>wP,wordsFromTitle:()=>PP,wordsToCamel:()=>IP,wordsToKebab:()=>NP,wordsToPascal:()=>CP,wordsToSnake:()=>AP,wordsToTitle:()=>hn});a();up();I();Pr();nt();al();zo();Ea();Je();it();Pe();st();a();function TD(e,t,o){let r=t;if(t in e)return void o(e[r]);Object.defineProperty(e,t,{set(i){delete e[r],e[r]=i,o(i)},configurable:!0,enumerable:!1})}Uu();qr();ri();ut();yn();var Ph={};ze(Ph,{toggle:()=>wh});a();$();var $i,rM;function Mh(e){let t=document.createElement("style");return t.id=e,document.documentElement.append(t),t}async function xD(){let e=await VencordNative.themes.getSystemValues(),t=Object.entries(e).filter(([,o])=>o!=="#").map(([o,r])=>`--${o}: ${r};`).join("");Mh("vencord-os-theme-values").textContent=`:root{${t}}`}async function wh(e){$i?$i.disabled=!e:e&&($i=Mh("vencord-custom-css"),VencordNative.quickCss.addChangeListener(t=>{$i.textContent=t,$i.disabled=!E.useQuickCss}),$i.textContent=await VencordNative.quickCss.get())}async function Ac(){rM??=Mh("vencord-themes");let{themeLinks:e,enabledThemes:t}=E,o=[...e];{let r=t.map(i=>`vencord:///themes/${i}?v=${Date.now()}`);o.push(...r)}rM.textContent=o.map(r=>`@import url("${r.trim()}");`).join(`
  182. `)}document.addEventListener("DOMContentLoaded",()=>{xD(),Ac(),wh(E.useQuickCss),ms("useQuickCss",wh),ms("themeLinks",Ac),ms("enabledThemes",Ac),VencordNative.quickCss.addThemeChangeListener(Ac)});kr();var Ih={};ze(Ih,{Common:()=>Hc,LazyComponentWebpack:()=>Dc,_initWebpack:()=>ya,_resolveReady:()=>ha,addListener:()=>vM,cache:()=>ln,extract:()=>ba,extractAndLoadChunks:()=>Eh,extractAndLoadChunksLazy:()=>Sa,filters:()=>Ae,find:()=>Io,findAll:()=>hr,findBulk:()=>zi,findByCode:()=>Dh,findByCodeLazy:()=>cn,findByProps:()=>ji,findByPropsLazy:()=>A,findComponentByCode:()=>Lc,findComponentByCodeLazy:()=>je,findComponentLazy:()=>Ec,findExportedComponentLazy:()=>un,findLazy:()=>Vt,findModuleFactory:()=>Rh,findModuleId:()=>va,findStore:()=>Lh,findStoreLazy:()=>we,lazyWebpackSearchHistory:()=>yM,listeners:()=>Rc,onceReady:()=>kc,proxyLazyWebpack:()=>Ao,removeListener:()=>SM,search:()=>_c,subscriptions:()=>kh,waitFor:()=>dt,wreq:()=>Qt});a();x();W();a();I();Je();qr();ga();var iM,Po=new ie("WebpackInterceptor","#8caaee");window[Yo]?(Po.info(`Patching ${Yo}.push (was already existent, likely from cache!)`),ya(window[Yo]),sM(window[Yo])):(Object.defineProperty(window,Yo,{get:()=>iM,set:e=>{e?.push&&(e.push.$$vencordOriginal||(Po.info(`Patching ${Yo}.push`),sM(e)),ya(e)&&(Po.info("Successfully initialised Vencord webpack"),delete window[Yo],window[Yo]=e)),iM=e},configurable:!0}),Object.defineProperty(Function.prototype,"m",{set(e){new Error().stack?.includes("discord.com")&&(Po.info("Found webpack module factory"),aM(e),delete Function.prototype.m),Object.defineProperty(this,"m",{value:e,configurable:!0})},configurable:!0}));function sM(e){function t(o){try{aM(o[1])}catch(r){Po.error("Error in handlePush",r)}return t.$$vencordOriginal.call(e,o)}t.$$vencordOriginal=e.push,t.bind=(...o)=>t.$$vencordOriginal.bind(...o),Object.defineProperty(e,"push",{get:()=>t,set(o){t.$$vencordOriginal=o},configurable:!0})}function aM(e){let{subscriptions:t,listeners:o}=Vencord.Webpack,{patches:r}=Vencord.Plugins;for(let i in e){let s=e[i],l="0,"+s.toString().replaceAll(`
  183. `,""),c=s,u=new Set,p=e[i]=function(m,h,v){try{s(m,h,v)}catch(T){if(s===c)throw T;return Po.error("Error in patched chunk",T),void c(m,h,v)}if(h=m.exports,!!h){if(h===window){Object.defineProperty(v.c,i,{value:v.c[i],enumerable:!1,configurable:!0,writable:!0});return}for(let T of o)try{T(h,i)}catch(N){Po.error("Error in webpack listener",N)}for(let[T,N]of t)try{T(h)?(t.delete(T),N(h,i)):h.default&&T(h.default)&&(t.delete(T),N(h.default,i))}catch(b){Po.error("Error while firing callback for webpack chunk",b)}}};p.toString=()=>s.toString(),p.original=c;for(let m=0;m<r.length;m++){let h=r[m],v=jo(`patch by ${h.plugin}`,(T,N)=>l.replace(T,N));if(!(h.predicate&&!h.predicate())&&l.includes(h.find)){u.add(h.plugin);let T=s,N=l;for(let b of h.replacement){if(b.predicate&&!b.predicate())continue;let P=s,k=l;Hi(b,h.plugin);try{let M=v(b.match,b.replace);if(M===l){if(h.noWarn||Po.warn(`Patch by ${h.plugin} had no effect (Module id is ${i}): ${b.match}`),h.group){Po.warn(`Undoing patch group ${h.find} by ${h.plugin} because replacement ${b.match} had no effect`),l=N,s=T,u.delete(h.plugin);break}}else l=M,s=(0,eval)(`// Webpack Module ${i} - Patched by ${[...u].join(", ")}
  184. ${M}
  185. //# sourceURL=WebpackModule${i}`)}catch(M){if(Po.error(`Patch by ${h.plugin} errored (Module id is ${i}): ${b.match}
  186. `,M),u.delete(h.plugin),h.group){Po.warn(`Undoing patch group ${h.find} by ${h.plugin} because replacement ${b.match} errored`),l=N,s=T;break}l=k,s=P}}h.all||r.splice(m--,1)}}}}w();Jo();Fn();$();nl();Ea();Hn();ds();kr();x();async function wD(){if(E.cloud.authenticated&&await Rt("Vencord_cloudSecret")===null){ke({title:"Cloud Integrations",body:"We've noticed you have cloud integrations enabled in another client! Due to limitations, you will need to re-authenticate to continue using them. Click here to go to the settings page to do so!",color:"var(--yellow-360)",onClick:()=>xr.open("VencordCloud")});return}E.cloud.settingsSync&&E.cloud.authenticated&&(Ir.Vencord_settingsDirty?(await ai(),delete Ir.Vencord_settingsDirty):await ja(!1)&&ke({title:"Cloud Settings",body:"Your settings have been updated! Click here to restart to fully apply changes!",color:"var(--green-360)",onClick:mo}))}async function MD(){await kc,Is("WebpackReady"),wD();try{if(!await ci())return;if(E.autoUpdate){await ui(),E.autoUpdateNotification&&setTimeout(()=>ke({title:"Vencord has been updated!",body:"Click here to restart",permanent:!0,noPersist:!0,onClick:mo}),1e4);return}E.notifyAboutUpdates&&setTimeout(()=>ke({title:"A Vencord update is available!",body:"Click here to view the update",permanent:!0,noPersist:!0,onClick(){xr.open("VencordUpdater")}}),1e4)}catch(e){Cr.error("Failed to check for updates",e)}}Is("Init");MD();document.addEventListener("DOMContentLoaded",()=>{Is("DOMContentLoaded"),E.winNativeTitleBar&&navigator.platform.toLowerCase().startsWith("win")&&document.head.append(Object.assign(document.createElement("style"),{id:"vencord-native-titlebar-style",textContent:"[class*=titleBar]{display: none!important}"}))},{once:!0});return Ln(PD);})();
  187. //# sourceURL=VencordRenderer
  188. //# sourceMappingURL=vencord://renderer.js.map
  189. /*! For license information please see renderer.js.LEGAL.txt */