discord-awesomeaudio/assets/vencord/vencord.js

269 lines
395 KiB
JavaScript

// Vencord bea7a17
// Standalone: false
// Platform: linux
"use strict";var Vencord=(()=>{var zT=Object.create;var Yi=Object.defineProperty;var jT=Object.getOwnPropertyDescriptor;var WT=Object.getOwnPropertyNames;var qT=Object.getPrototypeOf,KT=Object.prototype.hasOwnProperty;var Of=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var m=(e,t)=>()=>(e&&(t=e(e=0)),t);var Lr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ge=(e,t)=>{for(var n in t)Yi(e,n,{get:t[n],enumerable:!0})},_f=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of WT(t))!KT.call(e,i)&&i!==n&&Yi(e,i,{get:()=>t[i],enumerable:!(r=jT(t,i))||r.enumerable});return e};var al=(e,t,n)=>(n=e!=null?zT(qT(e)):{},_f(t||!e||!e.__esModule?Yi(n,"default",{value:e,enumerable:!0}):n,e)),Lo=e=>_f(Yi({},"__esModule",{value:!0}),e);var d,o,a=m(()=>{"use strict";d=Symbol.for("react.fragment"),o=(...e)=>(o=Vencord.Webpack.Common.React.createElement)(...e)});var In={};ge(In,{clear:()=>QT,createStore:()=>Ff,del:()=>XT,delMany:()=>JT,entries:()=>tx,get:()=>Qe,getMany:()=>ZT,keys:()=>VT,promisifyRequest:()=>vt,set:()=>Ve,setMany:()=>YT,update:()=>Eo,values:()=>ex});function vt(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Ff(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=vt(n);return(i,s)=>r.then(l=>s(l.transaction(t,i).objectStore(t)))}function on(){return ll||(ll=Ff("VencordData","VencordStore")),ll}function Qe(e,t=on()){return t("readonly",n=>vt(n.get(e)))}function Ve(e,t,n=on()){return n("readwrite",r=>(r.put(t,e),vt(r.transaction)))}function YT(e,t=on()){return t("readwrite",n=>(e.forEach(r=>n.put(r[1],r[0])),vt(n.transaction)))}function ZT(e,t=on()){return t("readonly",n=>Promise.all(e.map(r=>vt(n.get(r)))))}function Eo(e,t,n=on()){return n("readwrite",r=>new Promise((i,s)=>{r.get(e).onsuccess=function(){try{r.put(t(this.result),e),i(vt(r.transaction))}catch(l){s(l)}}}))}function XT(e,t=on()){return t("readwrite",n=>(n.delete(e),vt(n.transaction)))}function JT(e,t=on()){return t("readwrite",n=>(e.forEach(r=>n.delete(r)),vt(n.transaction)))}function QT(e=on()){return e("readwrite",t=>(t.clear(),vt(t.transaction)))}function cl(e,t){return e.openCursor().onsuccess=function(){!this.result||(t(this.result),this.result.continue())},vt(e.transaction)}function VT(e=on()){return e("readonly",t=>{if(t.getAllKeys)return vt(t.getAllKeys());let n=[];return cl(t,r=>n.push(r.key)).then(()=>n)})}function ex(e=on()){return e("readonly",t=>{if(t.getAll)return vt(t.getAll());let n=[];return cl(t,r=>n.push(r.value)).then(()=>n)})}function tx(e=on()){return e("readonly",t=>{if(t.getAll&&t.getAllKeys)return Promise.all([vt(t.getAllKeys()),vt(t.getAll())]).then(([r,i])=>r.map((s,l)=>[s,i[l]]));let n=[];return e("readonly",r=>cl(r,i=>n.push([i.key,i.value])).then(()=>n))})}var ll,Cn=m(()=>{"use strict";a();});var Er,ul=m(()=>{"use strict";a();Er=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 rn,Dr=m(()=>{a();rn="bea7a17"});var Zi,$f=m(()=>{a();Zi="Vendicated/Vencord"});var qt,nx,pl,Xi,p,dl,w=m(()=>{"use strict";a();Dr();$f();qt="webpackChunkdiscord_app",nx="Vencord.Webpack.Common.React",pl=`Vencord/${rn}${Zi?` (https://github.com/${Zi})`:""}`,Xi="1026515880080842772",p=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},Animal:{name:"Animal",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:787017887877169173n},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:174200708818665472n},rad:{name:"rad",id:113027285765885952n},HypedDomi:{name:"HypedDomi",id:354191516979429376n}}),dl=(()=>Object.freeze(Object.fromEntries(Object.entries(p).filter(e=>e[1].id!==0n).map(([e,t])=>[t.id,t]))))()});function At(e,t=300){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}var nr=m(()=>{"use strict";a()});function $n(e){let t;return()=>t??(t=e())}function dt(e,t=5){let n=0,r=Object.assign(function(){},{[Ji]:void 0,[Vi](){return!r[Ji]&&t>n++&&(r[Ji]=e()),r[Ji]}});return new Proxy(r,Qi)}var Uf,Qi,Vi,Ji,sn=m(()=>{"use strict";a();Uf=["arguments","caller","prototype"],Qi={},Vi=Symbol.for("vencord.lazy.get"),Ji=Symbol.for("vencord.lazy.cached");for(let e of["apply","construct","defineProperty","deleteProperty","get","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf"])Qi[e]=(t,...n)=>Reflect[e](t[Vi](),...n);Qi.ownKeys=e=>{let t=e[Vi](),n=Reflect.ownKeys(t);for(let r of Uf)n.includes(r)||n.push(r);return n};Qi.getOwnPropertyDescriptor=(e,t)=>{if(typeof t=="string"&&Uf.includes(t))return Reflect.getOwnPropertyDescriptor(e,t);let n=Reflect.getOwnPropertyDescriptor(e[Vi](),t);return n&&Object.defineProperty(e,t,n),n}});var Y,be=m(()=>{"use strict";a();Y=class{constructor(t,n="white"){this.name=t;this.color=n}static makeTitle(t,n){return["%c %c %s ","",`background: ${t}; color: black; font-weight: bold; border-radius: 5px;`,n]}_log(t,n,r,i=""){console[t](`%c Vencord %c %c ${this.name} ${i}`,`background: ${n}; 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,...n){this._log("error","#e78284",n,t)}warn(...t){this._log("warn","#e5c890",t)}debug(...t){this._log("debug","#eebebe",t)}}});var ox,an,es=m(()=>{"use strict";a();be();ox=(e,t,n)=>t,an=ox});function ns(e){if(Un!==void 0)throw"no.";Gt=e.push([[Symbol("Vencord")],{},t=>t]),Un=Gt.c,e.pop()}function ke(e,t=!0){return dt(()=>Ht(e,t))}function or(e,t=!0){if(typeof e!="function")throw new Error("Invalid filter. Expected a function got "+typeof e);let n=[];for(let r in Un){let i=Un[r];if(!!i?.exports){if(e(i.exports))n.push(i.exports);else if(typeof i.exports!="object")continue;if(i.exports.default&&e(i.exports.default))n.push(t?i.exports.default:i.exports);else for(let s in i.exports)if(s.length<=3){let l=i.exports[s];l&&e(l)&&n.push(l)}}}return n}function Ke(e,t){return dt(()=>Hf(e,t))}function Nn(...e){return Ht(K.byProps(...e))}function P(...e){return ke(K.byProps(...e))}function ze(...e){return Ht(K.byCode(...e))}function ce(...e){return ke(K.byCode(...e))}function rx(e){return Ht(K.byStoreName(e))}function ae(e){return ke(K.byStoreName(e))}function Ye(e,t){if(typeof e=="string")e=K.byProps(e);else if(Array.isArray(e))e=K.byProps(...e);else if(typeof e!="function")throw new Error("filter must be a string, string[] or function, got "+typeof e);let[n,r]=Ht(e,!0,!0);if(n)return void t(n,r);Gf.set(e,t)}function ix(e){gl.add(e)}function sx(e){gl.delete(e)}function hl(...e){let t={},n=Gt.m;e:for(let r in n){let i=n[r].original??n[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 yl(e){let t=Gt.m[e];if(!t)return null;let n=`
// [EXTRACTED] WebpackModule${e}
// WARNING: This module was extracted to be more easily readable.
// This module is NOT ACTUALLY USED! This means putting breakpoints will have NO EFFECT!!
${t.toString()}
//# sourceURL=ExtractedWebpackModule${e}
`;return(0,eval)(n)}var ml,ts,fl,Gt,Un,K,Gf,gl,Ht,Or,os,Hf,O=m(()=>{"use strict";a();sn();be();es();ml=new Y("Webpack"),fl=new Promise(e=>ts=e),K={byProps:(...e)=>e.length===1?t=>t[e[0]]!==void 0:t=>e.every(n=>t[n]!==void 0),byCode:(...e)=>t=>{if(typeof t!="function")return!1;let n=Function.prototype.toString.call(t);for(let r of e)if(!n.includes(r))return!1;return!0},byStoreName:e=>t=>t.constructor?.displayName===e},Gf=new Map,gl=new Set;Ht=an("find",function(t,n=!0,r=!1){if(typeof t!="function")throw new Error("Invalid filter. Expected a function got "+typeof t);for(let i in Un){let s=Un[i];if(!!s?.exports){if(t(s.exports))return r?[s.exports,Number(i)]:s.exports;if(typeof s.exports=="object"){if(s.exports.default&&t(s.exports.default)){let l=n?s.exports.default:s.exports;return r?[l,Number(i)]:l}for(let l in s.exports)if(l.length<=3){let c=s.exports[l];if(c&&t(c))return r?[c,Number(i)]:c}}}}if(!r){let i=new Error("Didn't find module matching this filter");ml.warn(i)}return r?[null,null]:null});Or=an("findBulk",function(...t){if(!Array.isArray(t))throw new Error("Invalid filters. Expected function[] got "+typeof t);let{length:n}=t;if(n===0)throw new Error("Expected at least two filters.");if(n===1)return Ht(t[0]);let r=t,i=0,s=Array(n);e:for(let l in Un){let c=Un[l];if(!!c?.exports)for(let u=0;u<n;u++){let h=r[u];if(h!==void 0){if(h(c.exports)){if(s[u]=c.exports,r[u]=void 0,++i===n)break e;break}if(typeof c.exports=="object"){if(c.exports.default&&h(c.exports.default)){if(s[u]=c.exports.default,r[u]=void 0,++i===n)break e;break}for(let f in c.exports)if(f.length<=3){let y=c.exports[f];if(y&&h(y)){if(s[u]=y,r[u]=void 0,++i===n)break e;continue e}}}}}}if(i!==n){let l=new Error(`Got ${n} filters, but only found ${i} modules!`);ml.warn(l)}return s}),os=an("findModuleId",function(t){for(let r in Gt.m)if(Gt.m[r].toString().includes(t))return Number(r);let n=new Error(`Didn't find module with code:
`+t);return ml.warn(n),null}),Hf=an("mapMangledModule",function(t,n){let r={},i=os(t);if(i===null)return r;let s=Gt(i);e:for(let l in s){let c=s[l];for(let u in n)if(n[u](c)){r[u]=c;continue e}}return r})});var rs,mt,zf=m(()=>{"use strict";a();O();rs=P("image","modal"),mt=P("buttonWrapper","buttonContent")});function Do(e,t){for(let n in t){let r=t[n];typeof r=="object"&&!Array.isArray(r)?(e[n]??={},Do(e[n],r)):e[n]??=r}return e}function J(...e){return e.filter(Boolean).join(" ")}function so(e){return new Promise(t=>setTimeout(t,e))}function Yt(e,t="Copied to clipboard!"){Kt.SUPPORTS_COPY?Kt.copy(e):t="Your browser does not support copying to clipboard",X.show({message:t,id:X.genId(),type:X.Type.SUCCESS})}function lx(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function vl(e){try{return new URL(e)}catch{return null}}function is(e){return e}var Sl,cx,_r,fe=m(()=>{"use strict";a();T();w();Sl=e=>{let t=e.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(t.bottom<0||t.top-n>=0)};cx=navigator.userAgent.includes("Mobi"),_r=e=>Object.hasOwn(dl,e)});function ot(e,t){let n=Object.assign({fallbackValue:null,deps:[],onError:null},t),[r,i]=V({value:n.fallbackValue,error:null,pending:!0});return rt(()=>{let s=!0;return r.pending||i({...r,pending:!0}),e().then(l=>{!s||(i({value:l,error:null,pending:!1}),n.onSuccess?.(l))}).catch(l=>{!s||(i({value:null,error:l,pending:!1}),n.onError?.(l))}),()=>void(s=!1)},n.deps),[r.value,r.error,r.pending]}function Lt(e){let t=rr(n=>n+1,0);return e?t:t[1]}function re(e){let t=$n(e);return n=>{let r=t();return o(r,{...n})}}var bl,ve=m(()=>{"use strict";a();T();sn();fe();bl=(e=!1)=>{let t=I.useRef(null),[n,r]=V(!1);return[s=>{t.current?.disconnect(),t.current=null,s&&(Sl(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)))},n]}});function ss(e,t){let n=function(){throw new Error(`Vencord could not find the ${e} Component`)},r=re(()=>n);return Ye(t,i=>{n=i,Object.assign(r,i)}),r}function St(e,t){Ye(K.byStoreName(e),t)}var Tl=m(()=>{"use strict";a();ve();O()});var v,Et,N,ft,W,Re,as,Q,ln,ls,Oo,Zt,Br,jf,Wf,cs,us,ps,ds,Fr,xl,kn,ux,qf=m(()=>{"use strict";a();O();Tl();v={},xl=ss("MaskedLink",e=>e?.type?.toString().includes("MASKED_LINK)")),kn=ss("Timestamp",K.byCode(".Messages.MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL.format")),ux=ss("Flex",["Justify","Align","Wrap"]);Ye("FormItem",e=>{({useToken:Fr,Card:Et,Button:N,FormSwitch:ft,Tooltip:W,TextInput:Re,TextArea:as,Text:Q,Select:ln,SearchableSelect:ls,Slider:Oo,ButtonLooks:Zt,TabBar:Wf,Popout:Br,Dialog:jf,Paginator:cs,ScrollerThin:us,Clickable:ps,Avatar:ds}=e),v=e})});var L,cn,Kf=m(()=>{"use strict";a();O();L={};Ye("MenuItem",e=>L=e);cn=Ke('type:"CONTEXT_MENU_OPEN"',{open:K.byCode("stopPropagation"),openLazy:e=>e.toString().length<50,close:K.byCode("CONTEXT_MENU_CLOSE")})});var I,V,rt,zt,Xt,rr,Yf,_o,Zf=m(()=>{"use strict";a();O();_o=P("createPortal","render");Ye("useState",e=>{I=e,{useEffect:rt,useState:V,useMemo:zt,useRef:Xt,useReducer:rr,useCallback:Yf}=I})});var wl,un,Pl,je,ms,$r,ao,px,ue,F,Pe,lo,Z,Ae,et,pn,Ur,Ml,Fe,Xf=m(()=>{"use strict";a();O();Tl();wl=P("connectStores"),Pl=P("openPrivateChannel"),Ml=Ke('"MaskedLinkStore"',{openUntrustedLink:K.byCode(".apply(this,arguments)")}),Fe=ce("useStateFromStores");St("UserStore",e=>F=e);St("ChannelStore",e=>Z=e);St("SelectedChannelStore",e=>Pe=e);St("SelectedGuildStore",e=>lo=e);St("GuildStore",e=>ue=e);St("GuildMemberStore",e=>Ae=e);St("RelationshipStore",e=>et=e);St("PermissionStore",e=>je=e);St("PresenceStore",e=>ao=e);St("ReadStateStore",e=>$r=e);St("GuildChannelStore",e=>ms=e);St("MessageStore",e=>un=e);St("WindowStore",e=>Ur=e);St("EmojiStore",e=>pn=e)});var Jf={};var Qf=m(()=>{"use strict";a()});var Vf={};var eg=m(()=>{"use strict";a()});var tg={};var ng=m(()=>{"use strict";a()});function fs(e,t=og.MESSAGE){X.show({id:X.genId(),message:e,type:t})}var E,Il,Dt,Jt,Bo,it,ir,Ie,bt,og,dx,X,Rn,Kt,Gr,gs,An,rg=m(()=>{"use strict";a();O();Il=ke(e=>e.emitter?._events?.INSERT_TEXT),Dt=P("getAPIBaseURL","get"),Jt=P("parseTwoDigitYear"),Bo=P("highlight"),it=ke(e=>e.Messages?.["en-US"]);Ye(["fromTimestamp","extractTimestamp"],e=>ir=e);og={MESSAGE:0,SUCCESS:1,FAILURE:2,CUSTOM:3},dx={TOP:0,BOTTOM:1},X={Type:og,Position:dx,genId:()=>(Math.random()||Math.random()).toString(36).slice(2)};Rn={fetchUser:ce(".USER(","getUser")},Kt=Ke('document.queryCommandEnabled("copy")||document.queryCommandSupported("copy")',{copy:K.byCode(".default.copy("),SUPPORTS_COPY:e=>typeof e=="boolean"}),Gr=Ke("transitionToGuild - ",{transitionTo:K.byCode("transitionTo -"),transitionToGuild:K.byCode("transitionToGuild -"),goBack:K.byCode("goBack()"),goForward:K.byCode("goForward()")});Ye(["dispatch","subscribe"],e=>{E=e;let t=()=>{e.unsubscribe("CONNECTION_OPEN",t),ts()};e.subscribe("CONNECTION_OPEN",t)});Ye("showToast",e=>{X.show=e.showToast,X.pop=e.popToast});Ye(["show","close"],e=>bt=e);Ye("parseTopic",e=>Ie=e);Ye(["open","saveAccountChanges"],e=>gs=e);An=ke(e=>typeof e.ADMINISTRATOR=="bigint")});var Cl={};ge(Cl,{Alerts:()=>bt,Avatar:()=>ds,Button:()=>N,ButtonLooks:()=>Zt,ButtonWrapperClasses:()=>mt,Card:()=>Et,ChannelStore:()=>Z,Clickable:()=>ps,Clipboard:()=>Kt,ComponentDispatch:()=>Il,ComponentTypes:()=>Jf,ContextMenu:()=>cn,Dialog:()=>jf,EmojiStore:()=>pn,Flex:()=>ux,Flux:()=>wl,FluxDispatcher:()=>E,Forms:()=>v,GuildChannelStore:()=>ms,GuildMemberStore:()=>Ae,GuildStore:()=>ue,MaskedLink:()=>xl,MaskedLinkStore:()=>Ml,Menu:()=>L,MenuTypes:()=>Vf,MessageStore:()=>un,ModalImageClasses:()=>rs,NavigationRouter:()=>Gr,Paginator:()=>cs,Parser:()=>Ie,PermissionStore:()=>je,PermissionsBits:()=>An,PoggerModeSettingsStore:()=>px,Popout:()=>Br,PresenceStore:()=>ao,PrivateChannelsStore:()=>Pl,React:()=>I,ReactDOM:()=>_o,ReadStateStore:()=>$r,RelationshipStore:()=>et,RestAPI:()=>Dt,ScrollerThin:()=>us,SearchableSelect:()=>ls,Select:()=>ln,SelectedChannelStore:()=>Pe,SelectedGuildStore:()=>lo,SettingsRouter:()=>gs,Slider:()=>Oo,SnowflakeUtils:()=>ir,Switch:()=>ft,TabBar:()=>Wf,Text:()=>Q,TextArea:()=>as,TextInput:()=>Re,Timestamp:()=>kn,Toasts:()=>X,Tooltip:()=>W,UserStore:()=>F,UserUtils:()=>Rn,UtilTypes:()=>tg,WindowStore:()=>Ur,hljs:()=>Bo,i18n:()=>it,moment:()=>Jt,showToast:()=>fs,useCallback:()=>Yf,useEffect:()=>rt,useMemo:()=>zt,useReducer:()=>rr,useRef:()=>Xt,useState:()=>V,useStateFromStores:()=>Fe,useToken:()=>Fr});var T=m(()=>{"use strict";a();zf();qf();Kf();Zf();Xf();Qf();eg();ng();rg()});function Hr(e,t){return hs.openModalLazy(e,t)}function Ce(e,t,n){return hs.openModal(e,t,n)}function Gn(e,t){return hs.closeModal(e,t)}function kl(){return hs.closeAllModals()}var co,dn,Nl,Le,$e,Ue,Tt,xt,hs,Ze=m(()=>{"use strict";a();O();ve();co=(i=>(i.SMALL="small",i.MEDIUM="medium",i.LARGE="large",i.DYNAMIC="dynamic",i))(co||{}),dn=Ke(".closeWithCircleBackground",{ModalRoot:K.byCode(".root"),ModalHeader:K.byCode(".header"),ModalContent:K.byCode(".content"),ModalFooter:K.byCode(".footerSeparator"),ModalCloseButton:K.byCode(".closeWithCircleBackground")}),Nl=re(()=>ze(".renderLinkComponent",".responsive")),Le=re(()=>dn.ModalRoot),$e=re(()=>dn.ModalHeader),Ue=re(()=>dn.ModalContent),Tt=re(()=>dn.ModalFooter),xt=re(()=>dn.ModalCloseButton),hs=Ke("onCloseRequest:null!=",{openModal:K.byCode("onCloseRequest:null!="),closeModal:K.byCode("onCloseCallback&&"),openModalLazy:e=>e?.length===1&&K.byCode(".apply(this,arguments)")(e),closeAllModals:K.byCode(".value.key,")})});function sr(){return Z.getChannel(Pe.getChannelId())}function Rl(){return ue.getGuild(sr()?.guild_id)}function gx(e){Pl.openPrivateChannel(e)}function zr(){return mx.getCurrentValue()?.appearance?.theme}function Hn(e){Il.dispatchToLastSubscribed("INSERT_TEXT",{rawText:e,plainText:e})}function hx(e,t,n,r){let i={content:"",invalidEmojis:[],tts:!1,validNonShortcutEmojis:[],...t};return fx.sendMessage(e,i,n,r)}function Fo(e,t){return Ce(n=>o(Le,{...n,className:rs.modal,size:"dynamic"},o(Nl,{className:rs.image,original:e,placeholder:e,src:e,renderLinkComponent:r=>o(xl,{...r}),shouldHideMediaOptions:!1,shouldAnimate:!0,...t})))}async function mn(e){if(!await Rn.fetchUser(e))throw new Error("No such user: "+e);let n=lo.getGuildId();yx({userId:e,guildId:n,channelId:Pe.getChannelId(),analyticsLocation:{page:n?"Guild Channel":"DM Channel",section:"Profile Popout"}})}function zn(e){return e.discriminator==="0"?e.username:e.tag}var mx,fx,ys,yx,tt=m(()=>{"use strict";a();O();T();Ze();mx=ke(e=>e.ProtoClass?.typeName.endsWith("PreloadedUserSettings")),fx=P("editMessage","sendMessage");ys=(n=>(n[n.Dark=1]="Dark",n[n.Light=2]="Light",n))(ys||{});yx=ce("friendToken","USER_PROFILE_MODAL_OPEN")});function vs(e){return Boolean(e)}function Al(e){return e!=null}var Ss=m(()=>{"use strict";a()});var $o,bs=m(()=>{"use strict";a();({localStorage:$o}=window)});var ig,G,Xe=m(()=>{"use strict";a();ig="",G={};for(let e of["top","bottom","left","right"])for(let t of[8,16,20]){let n=`vc-m-${e}-${t}`;G[`${e}${t}`]=n,ig+=`.${n}{margin-${e}:${t}px;}`}document.addEventListener("DOMContentLoaded",()=>document.head.append(Object.assign(document.createElement("style"),{textContent:ig,id:"vencord-margins"})),{once:!0})});function vx(e,t,n){let r=t;if(t in e)return void n(e[r]);Object.defineProperty(e,t,{set(i){delete e[r],e[r]=i,n(i)},configurable:!0,enumerable:!1})}var sg=m(()=>{"use strict";a()});function Ll(e){let t=!1,n;return function(){return t?n:(t=!0,n=e.apply(this,arguments))}}var El=m(()=>{"use strict";a()});function Uo(e){if(typeof e=="string")return e;let t=e.source.replaceAll("\\i","[A-Za-z_$][\\w$]*");return new RegExp(t,e.flags)}function Ts(e,t){let n=`Vencord.Plugins.plugins[${JSON.stringify(t)}]`;return typeof e!="function"?e.replaceAll("$self",n):(...r)=>e(...r).replaceAll("$self",n)}function Dl(e,t){if(e.get){let n=e.get;e.get=function(){return t(n.call(this))}}else e.value&&(e.value=t(e.value));return e}function jr(e,t){let n=Object.getOwnPropertyDescriptors(e);n.match=Dl(n.match,Uo),n.replace=Dl(n.replace,r=>Ts(r,t)),Object.defineProperties(e,n)}var Wr=m(()=>{"use strict";a()});var fn,ar=m(()=>{"use strict";a();fn=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}}});function ag(e,t,n){return n===!1?t?e.slice(0,-1):e:e[0]}function qr(e,t,n=!1){let r=Jt.duration(e,t),i=Ix.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 h=u+1;h<i.length;h++)if(i[h].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],h=u.amount%7;h===0?i.splice(l,1):u.amount=h}let c="";for(;i.length;){let{amount:u,unit:h}=i.shift();c.length&&(c+=i.length?", ":" and "),(u>0||c.length)&&(c+=`${u} ${ag(h,u===1,n)}`)}return c.length?c:`0 ${ag(t,!1,n)}`}function Cx(e,t=n=>n){let{length:n}=e;if(n===0)return"";if(n===1)return t(e[0]);let r="";for(let i=0;i<n;i++)r+=t(e[i]),n-i>2?r+=", ":n-i>1&&(r+=" and ");return r}function Kr(e,t){let n="```";return`${n}${t||""}
${e.replaceAll("```","\\`\\`\\`")}
${n}`}var Ol,Sx,bx,_l,Tx,xx,wx,Px,Mx,jn,Ix,Wn=m(()=>{"use strict";a();T();Ol=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),Sx=e=>e.toLowerCase().split("_"),bx=e=>e.toLowerCase().split("-"),_l=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),Tx=e=>e.toLowerCase().split(" "),xx=e=>e.map((t,n)=>n?t[0].toUpperCase()+t.slice(1):t).join(""),wx=e=>e.join("_").toUpperCase(),Px=e=>e.join("-").toLowerCase(),Mx=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(""),jn=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(" "),Ix=["years","months","weeks","days","hours","minutes","seconds"]});var Bl={};ge(Bl,{ChangeList:()=>Er,Devs:()=>p,DevsById:()=>dl,ImageModal:()=>Nl,LazyComponent:()=>re,Logger:()=>Y,Margins:()=>G,ModalCloseButton:()=>xt,ModalContent:()=>Ue,ModalFooter:()=>Tt,ModalHeader:()=>$e,ModalRoot:()=>Le,ModalSize:()=>co,Modals:()=>dn,Queue:()=>fn,REACT_GLOBAL:()=>nx,SUPPORT_CHANNEL_ID:()=>Xi,Theme:()=>ys,VENCORD_USER_AGENT:()=>pl,WEBPACK_CHUNK:()=>qt,canonicalizeDescriptor:()=>Dl,canonicalizeMatch:()=>Uo,canonicalizeReplace:()=>Ts,canonicalizeReplacement:()=>jr,checkIntersecting:()=>Sl,classes:()=>J,closeAllModals:()=>kl,closeModal:()=>Gn,copyWithToast:()=>Yt,debounce:()=>At,formatDuration:()=>qr,getCurrentChannel:()=>sr,getCurrentGuild:()=>Rl,getTheme:()=>zr,getUniqueUsername:()=>zn,gitHash:()=>rn,gitRemote:()=>Zi,humanFriendlyJoin:()=>Cx,identity:()=>is,insertTextIntoChatInputBox:()=>Hn,isMobile:()=>cx,isNonNullish:()=>Al,isObject:()=>lx,isPluginDev:()=>_r,isTruthy:()=>vs,localStorage:()=>$o,makeCodeblock:()=>Kr,makeLazy:()=>$n,mergeDefaults:()=>Do,onceDefined:()=>vx,onlyOnce:()=>Ll,openImageModal:()=>Fo,openModal:()=>Ce,openModalLazy:()=>Hr,openPrivateChannel:()=>gx,openUserProfile:()=>mn,parseUrl:()=>vl,proxyLazy:()=>dt,sendMessage:()=>hx,sleep:()=>so,useAwaiter:()=>ot,useForceUpdater:()=>Lt,useIntersection:()=>bl,wordsFromCamel:()=>Ol,wordsFromKebab:()=>bx,wordsFromPascal:()=>_l,wordsFromSnake:()=>Sx,wordsFromTitle:()=>Tx,wordsToCamel:()=>xx,wordsToKebab:()=>Px,wordsToPascal:()=>Mx,wordsToSnake:()=>wx,wordsToTitle:()=>jn});var Fl=m(()=>{"use strict";a();ul();w();nr();tt();Ss();sn();bs();be();Xe();fe();Ze();sg();El();Wr();ar();ve();Wn();});var ug=m(()=>{});function qn(e){return o("div",{...e,className:J(e.className,"vc-error-card")},e.children)}var Yr=m(()=>{"use strict";a();ug();fe()});var Rx,pg,dg,$l,A,ie=m(()=>{"use strict";a();be();Xe();ve();T();Yr();Rx="#e78284",pg=new Y("React ErrorBoundary",Rx),dg={},$l=re(()=>class extends I.PureComponent{state={error:dg,stack:"",message:""};static getDerivedStateFromError(t){let n=t?.stack??"",r=t?.message||String(t);if(t instanceof Error&&n){let i=n.indexOf(`
`);i!==-1&&(r=n.slice(0,i),n=n.slice(i+1).replace(/https:\/\/\S+\/assets\//g,""))}return{error:t,stack:n,message:r}}componentDidCatch(t,n){this.props.onError?.({error:t,errorInfo:n,props:this.props.wrappedProps}),pg.error(`A component threw an Error
`,t),pg.error("Component Stack",n.componentStack)}render(){if(this.state.error===dg)return this.props.children;if(this.props.noop)return null;if(this.props.fallback)return o(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 o(qn,{style:{overflow:"hidden"}},o("h1",null,"Oh no!"),o("p",null,t),o("code",null,this.state.message,!!this.state.stack&&o("pre",{className:G.top8},this.state.stack)))}});$l.wrap=(e,t)=>n=>o($l,{...t,wrappedProps:n},o(e,{...n}));A=$l});function xs(){return o("svg",{"aria-hidden":"true",height:"16",viewBox:"0 0 16 16",width:"16",style:{marginRight:"0.5em",transform:"translateY(2px)"}},o("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 Ul=m(()=>{"use strict";a()});function Zr(e){return o(N,{...e,look:N.Looks.LINK,color:N.Colors.TRANSPARENT,onClick:()=>VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")},o(xs,null),"Donate")}var Gl=m(()=>{"use strict";a();T();Ul()});function le(e){return e.style??={},e.style.display="flex",e.style.gap??="1em",e.style.flexDirection||=e.flexDirection,delete e.flexDirection,o("div",{...e},e.children)}var wt=m(()=>{"use strict";a()});function g(e){return e}var b=m(()=>{"use strict";a()});async function mg(e=!1){Hl={};let t={};e&&(t.cache="no-cache");let r=(await fetch("https://gist.githubusercontent.com/Vendicated/51a3dd775f6920429ec6e9b735ca7f01/raw/badges.csv",t).then(i=>i.text())).trim().split(`
`);if(r.shift()!=="id,tooltip,image"){new Y("BadgeAPI").error("Invalid badges.csv file!");return}for(let i of r){let[s,l,c]=i.split(",");(Hl[s]??=[]).push({image:c,description:l})}}var Ax,Lx,Hl,zl,fg=m(()=>{"use strict";a();Ps();Gl();ie();wt();Ul();w();be();Xe();fe();Ze();b();T();Ax="https://cdn.discordapp.com/attachments/1033680203433660458/1092089947126780035/favicon.png",Lx={description:"Vencord Contributor",image:Ax,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},shouldShow:({user:e})=>_r(e.id),link:"https://github.com/Vendicated/Vencord"},Hl={};zl=g({name:"BadgeAPI",description:"API to add badges to users.",authors:[p.Megu,p.Ven,p.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)/g,replace:"...$1.props,$& $1.image??"},{match:/children:function(?<=(\i)\.(?:tooltip|description),spacing:\d.+?)/g,replace:"children:$1.component ? () => $self.renderBadgeComponent($1) : function"},{match:/onClick:function(?=.{0,200}href:(\i)\.link)/,replace:"onClick:$1.onClick??function"}]}],toolboxActions:{async"Refetch Badges"(){await mg(!0),X.show({id:X.genId(),message:"Successfully refetched badges!",type:X.Type.SUCCESS})}},async start(){Vencord.Api.Badges.addBadge(Lx),await mg()},renderBadgeComponent:A.wrap(e=>{let t=e.component;return o(t,{...e})},{noop:!0}),getDonorBadges(e){return Hl[e]?.map(t=>({...t,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},onClick(){let n=Ce(r=>o(A,{noop:!0,onError:()=>{Gn(n),VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")}},o(dn.ModalRoot,{...r},o(dn.ModalHeader,null,o(le,{style:{width:"100%",justifyContent:"center"}},o(v.FormTitle,{tag:"h2",style:{width:"100%",textAlign:"center",margin:0}},o(xs,null),"Vencord Donor"))),o(dn.ModalContent,null,o(le,null,o("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533070955872337.png",alt:"",style:{margin:"auto"}}),o("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533090627174460.png",alt:"",style:{margin:"auto"}})),o("div",{style:{padding:"1em"}},o(v.FormText,null,"This Badge is a special perk for Vencord Donors"),o(v.FormText,{className:G.top20},"Please consider supporting the development of Vencord by becoming a donor. It would mean a lot!!"))),o(dn.ModalFooter,null,o(le,{style:{width:"100%",justifyContent:"center"}},o(Zr,null))))))}}))}})});var jl,gg=m(()=>{"use strict";a();w();b();jl=g({name:"CommandsAPI",authors:[p.Arjix],description:"Api required by anything that uses commands",patches:[{find:'"giphy","tenor"',replacement:[{match:/(?<=\w=)(\w)(\.filter\(.{0,30}giphy)/,replace:"Vencord.Api.Commands._init($1)$2"}]},{find:"Unexpected value for option",replacement:{match:/,(.{1,2})\.execute\((.{1,2}),(.{1,2})\)]/,replace:(e,t,n,r)=>`,Vencord.Api.Commands._handleCommand(${t}, ${n}, ${r})]`}},{find:".source,children",replacement:{match:/(?<=:(.{1,3})\.displayDescription\}.{0,200}\.source,children:)[^}]+/,replace:"$1.plugin||($&)"}}]})});var Wl,hg=m(()=>{"use strict";a();w();b();Wl=g({name:"ContextMenuAPI",description:"API for adding/removing items to/from context menus.",authors:[p.Nuckyz,p.Ven],required:!0,patches:[{find:"\u266B (\u3064\uFF61\u25D5\u203F\u203F\u25D5\uFF61)\u3064 \u266A",replacement:{match:/(?<=function \i\((\i)\){)(?=var \i,\i=\i\.navId)/,replace:(e,t)=>`Vencord.Api.ContextMenu._patchContextMenu(${t});`}},{find:".Menu,{",all:!0,replacement:{match:/Menu,{(?<=\.jsxs?\)\(\i\.Menu,{)/g,replace:"$&contextMenuApiArguments:typeof arguments!=='undefined'?arguments:[],"}}]})});var ql,yg=m(()=>{"use strict";a();w();b();ql=g({name:"MemberListDecoratorsAPI",description:"API to add decorators to member list (both in servers and DMs)",authors:[p.TheSun],patches:[{find:"lostPermissionTooltipText,",replacement:{match:/Fragment,{children:\[(.{30,80})\]/,replace:"Fragment,{children:Vencord.Api.MemberListDecorators.__addDecoratorsToList(this.props).concat($1)"}},{find:"PrivateChannel.renderAvatar",replacement:{match:/(subText:(.{1,2})\.renderSubtitle\(\).{1,50}decorators):(.{30,100}:null)/,replace:"$1:Vencord.Api.MemberListDecorators.__addDecoratorsToList($2.props).concat($3)"}}]})});var Kl,vg=m(()=>{"use strict";a();w();b();Kl=g({name:"MessageAccessoriesAPI",description:"API to add message accessories.",authors:[p.Cyn],patches:[{find:".Messages.REMOVE_ATTACHMENT_BODY",replacement:{match:/(.container\)?,children:)(\[[^\]]+\])(}\)\};return)/,replace:(e,t,n,r)=>`${t}Vencord.Api.MessageAccessories._modifyAccessories(${n},this.props)${r}`}}]})});var Yl,Sg=m(()=>{"use strict";a();w();b();Yl=g({name:"MessageDecorationsAPI",description:"API to add decorations to messages",authors:[p.TheSun],patches:[{find:".withMentionPrefix",replacement:{match:/(.roleDot.{10,50}{children:.{1,2})}\)/,replace:"$1.concat(Vencord.Api.MessageDecorations.__addDecorationsToMessage(arguments[0]))})"}}]})});var Zl,bg=m(()=>{"use strict";a();w();b();Zl=g({name:"MessageEventsAPI",description:"Api required by anything using message events.",authors:[p.Arjix,p.hunt,p.Ven],patches:[{find:'"MessageActionCreators"',replacement:{match:/\beditMessage:(function\(.+?\))\{/,replace:"editMessage:async $1{await Vencord.Api.MessageEvents._handlePreEdit(...arguments);"}},{find:".handleSendMessage=",replacement:{match:/(props\.chatInputType.+?\.then\(\()(function.+?var (\i)=\i\.\i\.parse\((\i),.+?var (\i)=\i\.\i\.getSendMessageOptionsForReply\(\i\);)(?<=\)\(({.+?})\)\.then.+?)/,replace:(e,t,n,r,i,s,l)=>`${t}async ${n}if(await Vencord.Api.MessageEvents._handlePreSend(${i}.id,${r},${l},${s}))return{shoudClear:true,shouldRefocus:true};`}},{find:'("interactionUsernameProfile',replacement:{match:/var \i=(\i)\.id,\i=(\i)\.id;return \i\.useCallback\(\(?function\((\i)\){/,replace:(e,t,n,r)=>`var _msg=${t},_chan=${n};${e}Vencord.Api.MessageEvents._handleClick(_msg, _chan, ${r});`}}]})});var Xl,Tg=m(()=>{"use strict";a();w();b();Xl=g({name:"MessagePopoverAPI",description:"API to add buttons to message popovers.",authors:[p.KingFish,p.Ven,p.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 n=e.match(/message:(.{1,3}),/)?.[1];if(!n)throw new Error("Could not find message variable");return`...Vencord.Api.MessagePopover._buildPopoverElements(${n},${t}),${e}`}}}]})});var Jl,xg=m(()=>{"use strict";a();w();b();Jl=g({name:"NoticesAPI",description:"Fixes notices being automatically dismissed",authors:[p.Ven],required:!0,patches:[{find:'displayName="NoticeStore"',replacement:[{match:/(?=;\i=null;.{0,70}getPremiumSubscription)/g,replace:";if(Vencord.Api.Notices.currentNotice)return false"},{match:/(?<=,NOTICE_DISMISS:function\(\i\){)(?=if\(null==(\i)\))/,replace:(e,t)=>`if(${t}.id=="VencordNotice")return(${t}=null,Vencord.Api.Notices.nextNotice(),true);`}]}]})});var Ql,wg=m(()=>{"use strict";a();w();b();Ql=g({name:"ServerListAPI",authors:[p.kemo],description:"Api required for plugins that modify the server list",patches:[{find:"Messages.DISCODO_DISABLED",replacement:{match:/(Messages\.DISCODO_DISABLED\);return)(.*?homeIcon.*?)(\}function)/,replace:"$1[$2].concat(Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.Above))$3"}},{find:"Messages.SERVERS,children",replacement:{match:/(Messages\.SERVERS,children:)(.+?default:return null\}\}\)\))/,replace:"$1Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.In).concat($2)"}}]})});var Vl,Pg=m(()=>{"use strict";a();w();b();Vl=g({name:"SettingsStoreAPI",description:"Patches Discord's SettingsStores to expose their group and name",authors:[p.Nuckyz],patches:[{find:'"textAndImages","renderSpoilers"',replacement:[{match:/(?<=INFREQUENT_USER_ACTION.{0,20}),useSetting:function/,replace:",settingsStoreApiGroup:arguments[0],settingsStoreApiName:arguments[1]$&"}]}]})});var ec,Mg=m(()=>{"use strict";a();w();b();ec=g({name:"NoTrack",description:"Disable Discord's tracking ('science'), metrics and Sentry crash reporting",authors:[p.Cyn,p.Ven,p.Nuckyz],required:!0,patches:[{find:"TRACKING_URL:",replacement:{match:/^.+$/,replace:"()=>{}"}},{find:"window.DiscordSentry=",replacement:{match:/^.+$/,replace:"()=>{}"}},{find:".METRICS,",replacement:[{match:/this\._intervalId.+?12e4\)/,replace:""},{match:/(?<=increment=function\(\i\){)/,replace:"return;"}]}]})});var nc={};ge(nc,{_patchContextMenu:()=>Ox,addContextMenuPatch:()=>pe,addGlobalContextMenuPatch:()=>Ex,findGroupChildrenByChildId:()=>nt,globalPatches:()=>Ms,navPatches:()=>Xr,removeContextMenuPatch:()=>de,removeGlobalContextMenuPatch:()=>Dx});function pe(e,t){Array.isArray(e)||(e=[e]);for(let n of e){let r=Xr.get(n);r||(r=new Set,Xr.set(n,r)),r.add(t)}}function Ex(e){Ms.add(e)}function de(e,t){let r=(Array.isArray(e)?e:[e]).map(i=>Xr.get(i)?.delete(t)??!1);return Array.isArray(e)?r:r[0]}function Dx(e){return Ms.delete(e)}function nt(e,t,n){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 n??null;let i=r.props?.children;if(i){Array.isArray(i)||(i=[i],r.props.children=i);let s=nt(e,i,i);if(s!==null)return s}}return null}function Ox(e){e.contextMenuApiArguments??=[];let t=Xr.get(e.navId);if(Array.isArray(e.children)||(e.children=[e.children]),t)for(let n of t)try{let r=n(e.children,...e.contextMenuApiArguments);tc.has(e)||r?.()}catch(r){Ig.error(`Patch for ${e.navId} errored,`,r)}for(let n of Ms)try{let r=n(e.navId,e.children,...e.contextMenuApiArguments);tc.has(e)||r?.()}catch(r){Ig.error("Global patch errored,",r)}tc.add(e)}var Ig,Xr,Ms,tc,Pt=m(()=>{"use strict";a();be();Ig=new Y("ContextMenu"),Xr=new Map,Ms=new Set;tc=new WeakSet});var Cg=m(()=>{});var Is,oc=m(()=>{"use strict";a();Cg();D();ie();fe();T();Is=A.wrap(function({title:t,body:n,richBody:r,color:i,icon:s,onClick:l,onClose:c,image:u,permanent:h,className:f,dismissOnClick:y}){let{timeout:S,position:x}=st(["notifications.timeout","notifications.position"]).notifications,R=Fe([Ur],()=>Ur.isFocused()),[C,_]=V(!1),[$,B]=V(0),q=zt(()=>Date.now(),[S,C,R]);rt(()=>{if(C||!R||S===0||h)return void B(0);let j=setInterval(()=>{let z=Date.now()-q;z>=S?c():B(z)},10);return()=>clearInterval(j)},[S,C,R]);let ee=$/S;return o("button",{className:J("vc-notification-root",f),style:x==="bottom-right"?{bottom:"1rem"}:{top:"3rem"},onClick:()=>{l?.(),y!==!1&&c()},onContextMenu:j=>{j.preventDefault(),j.stopPropagation(),c()},onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!1)},o("div",{className:"vc-notification"},s&&o("img",{className:"vc-notification-icon",src:s,alt:""}),o("div",{className:"vc-notification-content"},o("div",{className:"vc-notification-header"},o("h2",{className:"vc-notification-title"},t),o("button",{className:"vc-notification-close-btn",onClick:j=>{j.preventDefault(),j.stopPropagation(),c()}},o("svg",{width:"24",height:"24",viewBox:"0 0 24 24",role:"img","aria-labelledby":"vc-notification-dismiss-title"},o("title",{id:"vc-notification-dismiss-title"},"Dismiss Notification"),o("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"})))),o("div",null,r??o("p",{className:"vc-notification-p"},n)))),u&&o("img",{className:"vc-notification-img",src:u,alt:""}),S!==0&&!h&&o("div",{className:"vc-notification-progressbar",style:{width:`${(1-ee)*100}%`,backgroundColor:i||"var(--brand-experiment)"}}))},{onError:({props:e})=>e.onClose()})});var sc={};ge(sc,{classNameFactory:()=>Ee,classNameToSelector:()=>kg,compileStyle:()=>ic,disableStyle:()=>Mt,enableStyle:()=>Je,isStyleEnabled:()=>rc,requireStyle:()=>Jr,setStyleClassNames:()=>Bx,styleMap:()=>Ng,toggleStyle:()=>_x});function Jr(e){let t=Ng.get(e);if(!t)throw new Error(`Style "${e}" does not exist`);return t}function Je(e){let t=Jr(e);return t.dom?.isConnected?!1:(t.dom||(t.dom=document.createElement("style"),t.dom.dataset.vencordName=t.name),ic(t),document.head.appendChild(t.dom),!0)}function Mt(e){let t=Jr(e);return t.dom?.isConnected?(t.dom.remove(),t.dom=null,!0):!1}var Ng,_x,rc,Bx,ic,kg,Ee,Ge=m(()=>{"use strict";a();Ng=window.VencordStyles??=new Map;_x=e=>rc(e)?Mt(e):Je(e),rc=e=>Jr(e).dom?.isConnected??!1,Bx=(e,t,n=!0)=>{let r=Jr(e);r.classNames=t,n&&rc(r.name)&&ic(r)},ic=e=>{if(!e.dom)throw new Error("Style has no DOM element");e.dom.textContent=e.source.replace(/\[--(\w+)\]/g,(t,n)=>{let r=e.classNames[n];return r?kg(r):t})},kg=(e,t="")=>e.split(" ").map(n=>`.${t}${n}`).join(""),Ee=(e="")=>(...t)=>{let n=new Set;for(let r of t)typeof r=="string"?n.add(r):Array.isArray(r)?r.forEach(i=>n.add(i)):typeof r=="object"&&Object.entries(r).forEach(([i,s])=>s&&n.add(i));return Array.from(n,r=>e+r).join(" ")}});var Rg,Ag=m(()=>{a();Rg=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"")});async function Eg(e){if(e.noPersist)return;let t=M.notifications.logLimit;t!==0&&(await Eo(Cs,n=>{let r=n??[],{onClick:i,onClose:s,richBody:l,permanent:c,noPersist:u,dismissOnClick:h,...f}=e;return r.unshift({...f,timestamp:Date.now(),id:Rg()}),r.length>t&&t!==200&&(r.length=t),r}),Qr.forEach(n=>n()))}async function Fx(e){let t=await Lg(),n=t.findIndex(r=>r.timestamp===e);n!==-1&&(t.splice(n,1),await Ve(Cs,t),Qr.forEach(r=>r()))}function $x(){let[e,t]=rr(s=>s+1,0);rt(()=>(Qr.add(t),()=>void Qr.delete(t)),[]);let[n,r,i]=ot(Lg,{fallbackValue:[],deps:[e]});return[n,i]}function Ux({data:e}){let[t,n]=V(!1),r=I.useRef(null);return rt(()=>{let i=r.current,s=()=>{if(i.clientHeight===0)return requestAnimationFrame(s);i.style.height=`${i.clientHeight}px`};s()},[]),o("div",{className:lr("wrapper",{removing:t}),ref:r},o(Is,{...e,permanent:!0,dismissOnClick:!1,onClose:()=>{t||(n(!0),setTimeout(()=>Fx(e.timestamp),200))},richBody:o("div",{className:lr("body")},e.body,o(kn,{timestamp:Jt(e.timestamp),className:lr("timestamp")}))}))}function Gx({log:e,pending:t}){return!e.length&&!t?o("div",{className:lr("container")},o("div",{className:lr("empty")}),o(v.FormText,{style:{textAlign:"center"}},"No notifications yet")):o("div",{className:lr("container")},e.map(n=>o(Ux,{data:n,key:n.id})))}function Hx({modalProps:e,close:t}){let[n,r]=$x();return o(Le,{...e,size:"large"},o($e,null,o(Q,{variant:"heading-lg/semibold",style:{flexGrow:1}},"Notification Log"),o(xt,{onClick:t})),o(Ue,null,o(Gx,{log:n,pending:r})),o(Tt,null,o(N,{disabled:n.length===0,onClick:()=>{bt.show({title:"Are you sure?",body:`This will permanently remove ${n.length} notification${n.length===1?"":"s"}. This action cannot be undone.`,async onConfirm(){await Ve(Cs,[]),Qr.forEach(i=>i())},confirmText:"Do it!",confirmColor:"vc-notification-log-danger-btn",cancelText:"Nevermind"})}},"Clear Notification Log")))}function Ns(){let e=Ce(t=>o(Hx,{modalProps:t,close:()=>Gn(e)}))}var Cs,Lg,lr,Qr,ks=m(()=>{"use strict";a();Cn();D();Ge();Ze();ve();T();Ag();oc();Cs="notification-log",Lg=async()=>await Qe(Cs)??[],lr=Ee("vc-notification-log-"),Qr=new Set});function Wx(){if(!ac){let e=document.createElement("div");e.id="vc-notification-container",document.body.append(e),ac=_o.createRoot(e)}return ac}function qx(e,t){let n=Wx();return new Promise(r=>{n.render(o(Is,{key:t,...e,onClose:()=>{e.onClose?.(),n.render(null),r()}}))})}function Kx(){if(typeof Notification>"u")return!1;let{useNative:e}=M.notifications;return e==="always"?!0:e==="not-focused"?!document.hasFocus():!1}async function Dg(){return Notification.permission==="granted"||Notification.permission!=="denied"&&await Notification.requestPermission()==="granted"}async function he(e){if(Eg(e),Kx()&&await Dg()){let{title:t,body:n,icon:r,image:i,onClick:s=null,onClose:l=null}=e,c=new Notification(t,{body:n,icon:r,image:i});c.onclick=s,c.onclose=l}else zx.push(()=>qx(e,jx++))}var zx,ac,jx,Og=m(()=>{"use strict";a();D();ar();T();oc();ks();zx=new fn,jx=42});var lc={};ge(lc,{requestPermission:()=>Dg,showNotification:()=>he});var uo=m(()=>{"use strict";a();Og()});function jg(e,t){return ow(e,t||{},0,0)}function Wg(e,t){return ew(e,t)}var It,Ot,Rs,As,Ls,dc,$g,Ug,Gg,mc,Hg,Yx,_g,fc,Kn,me,Ln,mo,me,me,me,me,ti,me,Zx,Xx,Jx,Qx,cc,gn,uc,yc,zg,Vx,po,ew,Yn,Vr,pc,gc,Bg,ei,hc,Fg,tw,vc,nw,ow,rw,iw,qg=m(()=>{a();It=Uint8Array,Ot=Uint16Array,Rs=Uint32Array,As=new It([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]),Ls=new It([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]),dc=new It([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),$g=function(e,t){for(var n=new Ot(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var i=new Rs(n[30]),r=1;r<30;++r)for(var s=n[r];s<n[r+1];++s)i[s]=s-n[r]<<5|r;return[n,i]},Ug=$g(As,2),Gg=Ug[0],mc=Ug[1];Gg[28]=258,mc[258]=28;Hg=$g(Ls,0),Yx=Hg[0],_g=Hg[1],fc=new Ot(32768);for(me=0;me<32768;++me)Kn=(me&43690)>>>1|(me&21845)<<1,Kn=(Kn&52428)>>>2|(Kn&13107)<<2,Kn=(Kn&61680)>>>4|(Kn&3855)<<4,fc[me]=((Kn&65280)>>>8|(Kn&255)<<8)>>>1;Ln=function(e,t,n){for(var r=e.length,i=0,s=new Ot(t);i<r;++i)e[i]&&++s[e[i]-1];var l=new Ot(t);for(i=0;i<t;++i)l[i]=l[i-1]+s[i-1]<<1;var c;if(n){c=new Ot(1<<t);var u=15-t;for(i=0;i<r;++i)if(e[i])for(var h=i<<4|e[i],f=t-e[i],y=l[e[i]-1]++<<f,S=y|(1<<f)-1;y<=S;++y)c[fc[y]>>>u]=h}else for(c=new Ot(r),i=0;i<r;++i)e[i]&&(c[i]=fc[l[e[i]-1]++]>>>15-e[i]);return c},mo=new It(288);for(me=0;me<144;++me)mo[me]=8;for(me=144;me<256;++me)mo[me]=9;for(me=256;me<280;++me)mo[me]=7;for(me=280;me<288;++me)mo[me]=8;ti=new It(32);for(me=0;me<32;++me)ti[me]=5;Zx=Ln(mo,9,0),Xx=Ln(mo,9,1),Jx=Ln(ti,5,0),Qx=Ln(ti,5,1),cc=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},gn=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&n},uc=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},yc=function(e){return(e+7)/8|0},zg=function(e,t,n){(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length);var r=new(e.BYTES_PER_ELEMENT==2?Ot:e.BYTES_PER_ELEMENT==4?Rs:It)(n-t);return r.set(e.subarray(t,n)),r},Vx=["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"],po=function(e,t,n){var r=new Error(t||Vx[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,po),!n)throw r;return r},ew=function(e,t,n){var r=e.length;if(!r||n&&n.f&&!n.l)return t||new It(0);var i=!t||n,s=!n||n.i;n||(n={}),t||(t=new It(r*3));var l=function(Ki){var Ar=t.length;if(Ki>Ar){var tr=new It(Math.max(Ar*2,Ki));tr.set(t),t=tr}},c=n.f||0,u=n.p||0,h=n.b||0,f=n.l,y=n.d,S=n.m,x=n.n,R=r*8;do{if(!f){c=gn(e,u,1);var C=gn(e,u+1,3);if(u+=3,C)if(C==1)f=Xx,y=Qx,S=9,x=5;else if(C==2){var q=gn(e,u,31)+257,ee=gn(e,u+10,15)+4,j=q+gn(e,u+5,31)+1;u+=14;for(var z=new It(j),te=new It(19),U=0;U<ee;++U)te[dc[U]]=gn(e,u+U*3,7);u+=ee*3;for(var Ne=cc(te),ne=(1<<Ne)-1,Be=Ln(te,Ne,1),U=0;U<j;){var De=Be[gn(e,u,ne)];u+=De&15;var _=De>>>4;if(_<16)z[U++]=_;else{var ut=0,We=0;for(_==16?(We=3+gn(e,u,3),u+=2,ut=z[U-1]):_==17?(We=3+gn(e,u,7),u+=3):_==18&&(We=11+gn(e,u,127),u+=7);We--;)z[U++]=ut}}var yt=z.subarray(0,q),He=z.subarray(q);S=cc(yt),x=cc(He),f=Ln(yt,S,1),y=Ln(He,x,1)}else po(1);else{var _=yc(u)+4,$=e[_-4]|e[_-3]<<8,B=_+$;if(B>r){s&&po(0);break}i&&l(h+$),t.set(e.subarray(_,B),h),n.b=h+=$,n.p=u=B*8,n.f=c;continue}if(u>R){s&&po(0);break}}i&&l(h+131072);for(var qe=(1<<S)-1,$t=(1<<x)-1,Wt=u;;Wt=u){var ut=f[uc(e,u)&qe],Pn=ut>>>4;if(u+=ut&15,u>R){s&&po(0);break}if(ut||po(2),Pn<256)t[h++]=Pn;else if(Pn==256){Wt=u,f=null;break}else{var Ut=Pn-254;if(Pn>264){var U=Pn-257,nn=As[U];Ut=gn(e,u,(1<<nn)-1)+Gg[U],u+=nn}var Mn=y[uc(e,u)&$t],Rt=Mn>>>4;Mn||po(3),u+=Mn&15;var He=Yx[Rt];if(Rt>3){var nn=Ls[Rt];He+=uc(e,u)&(1<<nn)-1,u+=nn}if(u>R){s&&po(0);break}i&&l(h+131072);for(var pt=h+Ut;h<pt;h+=4)t[h]=t[h-He],t[h+1]=t[h+1-He],t[h+2]=t[h+2-He],t[h+3]=t[h+3-He];h=pt}}n.l=f,n.p=Wt,n.b=h,n.f=c,f&&(c=1,n.m=S,n.d=y,n.n=x)}while(!c);return h==t.length?t:zg(t,0,h)},Yn=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8},Vr=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},pc=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,s=n.slice();if(!i)return[vc,0];if(i==1){var l=new It(n[0].s+1);return l[n[0].s]=1,[l,1]}n.sort(function(j,z){return j.f-z.f}),n.push({s:-1,f:25001});var c=n[0],u=n[1],h=0,f=1,y=2;for(n[0]={s:-1,f:c.f+u.f,l:c,r:u};f!=i-1;)c=n[n[h].f<n[y].f?h++:y++],u=n[h!=f&&n[h].f<n[y].f?h++:y++],n[f++]={s:-1,f:c.f+u.f,l:c,r:u};for(var S=s[0].s,r=1;r<i;++r)s[r].s>S&&(S=s[r].s);var x=new Ot(S+1),R=gc(n[f-1],x,0);if(R>t){var r=0,C=0,_=R-t,$=1<<_;for(s.sort(function(z,te){return x[te.s]-x[z.s]||z.f-te.f});r<i;++r){var B=s[r].s;if(x[B]>t)C+=$-(1<<R-x[B]),x[B]=t;else break}for(C>>>=_;C>0;){var q=s[r].s;x[q]<t?C-=1<<t-x[q]++-1:++r}for(;r>=0&&C;--r){var ee=s[r].s;x[ee]==t&&(--x[ee],++C)}R=t}return[new It(x),R]},gc=function(e,t,n){return e.s==-1?Math.max(gc(e.l,t,n+1),gc(e.r,t,n+1)):t[e.s]=n},Bg=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Ot(++t),r=0,i=e[0],s=1,l=function(u){n[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[n.subarray(0,r),t]},ei=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},hc=function(e,t,n){var r=n.length,i=yc(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]=n[s];return(i+4+r)*8},Fg=function(e,t,n,r,i,s,l,c,u,h,f){Yn(t,f++,n),++i[256];for(var y=pc(i,15),S=y[0],x=y[1],R=pc(s,15),C=R[0],_=R[1],$=Bg(S),B=$[0],q=$[1],ee=Bg(C),j=ee[0],z=ee[1],te=new Ot(19),U=0;U<B.length;++U)te[B[U]&31]++;for(var U=0;U<j.length;++U)te[j[U]&31]++;for(var Ne=pc(te,7),ne=Ne[0],Be=Ne[1],De=19;De>4&&!ne[dc[De-1]];--De);var ut=h+5<<3,We=ei(i,mo)+ei(s,ti)+l,yt=ei(i,S)+ei(s,C)+l+14+3*De+ei(te,ne)+(2*te[16]+3*te[17]+7*te[18]);if(ut<=We&&ut<=yt)return hc(t,f,e.subarray(u,u+h));var He,qe,$t,Wt;if(Yn(t,f,1+(yt<We)),f+=2,yt<We){He=Ln(S,x,0),qe=S,$t=Ln(C,_,0),Wt=C;var Pn=Ln(ne,Be,0);Yn(t,f,q-257),Yn(t,f+5,z-1),Yn(t,f+10,De-4),f+=14;for(var U=0;U<De;++U)Yn(t,f+3*U,ne[dc[U]]);f+=3*De;for(var Ut=[B,j],nn=0;nn<2;++nn)for(var Mn=Ut[nn],U=0;U<Mn.length;++U){var Rt=Mn[U]&31;Yn(t,f,Pn[Rt]),f+=ne[Rt],Rt>15&&(Yn(t,f,Mn[U]>>>5&127),f+=Mn[U]>>>12)}}else He=Zx,qe=mo,$t=Jx,Wt=ti;for(var U=0;U<c;++U)if(r[U]>255){var Rt=r[U]>>>18&31;Vr(t,f,He[Rt+257]),f+=qe[Rt+257],Rt>7&&(Yn(t,f,r[U]>>>23&31),f+=As[Rt]);var pt=r[U]&31;Vr(t,f,$t[pt]),f+=Wt[pt],pt>3&&(Vr(t,f,r[U]>>>5&8191),f+=Ls[pt])}else Vr(t,f,He[r[U]]),f+=qe[r[U]];return Vr(t,f,He[256]),f+qe[256]},tw=new Rs([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),vc=new It(0),nw=function(e,t,n,r,i,s){var l=e.length,c=new It(r+l+5*(1+Math.ceil(l/7e3))+i),u=c.subarray(r,c.length-i),h=0;if(!t||l<8)for(var f=0;f<=l;f+=65535){var y=f+65535;y>=l&&(u[h>>3]=s),h=hc(u,h+1,e.subarray(f,y))}else{for(var S=tw[t-1],x=S>>>13,R=S&8191,C=(1<<n)-1,_=new Ot(32768),$=new Ot(C+1),B=Math.ceil(n/3),q=2*B,ee=function(sl){return(e[sl]^e[sl+1]<<B^e[sl+2]<<q)&C},j=new Rs(25e3),z=new Ot(288),te=new Ot(32),U=0,Ne=0,f=0,ne=0,Be=0,De=0;f<l;++f){var ut=ee(f),We=f&32767,yt=$[ut];if(_[We]=yt,$[ut]=We,Be<=f){var He=l-f;if((U>7e3||ne>24576)&&He>423){h=Fg(e,u,0,j,z,te,Ne,ne,De,f-De,h),ne=U=Ne=0,De=f;for(var qe=0;qe<286;++qe)z[qe]=0;for(var qe=0;qe<30;++qe)te[qe]=0}var $t=2,Wt=0,Pn=R,Ut=We-yt&32767;if(He>2&&ut==ee(f-Ut))for(var nn=Math.min(x,He)-1,Mn=Math.min(32767,f),Rt=Math.min(258,He);Ut<=Mn&&--Pn&&We!=yt;){if(e[f+$t]==e[f+$t-Ut]){for(var pt=0;pt<Rt&&e[f+pt]==e[f+pt-Ut];++pt);if(pt>$t){if($t=pt,Wt=Ut,pt>nn)break;for(var Ki=Math.min(Ut,pt-2),Ar=0,qe=0;qe<Ki;++qe){var tr=f-Ut+qe+32768&32767,HT=_[tr],Lf=tr-HT+32768&32767;Lf>Ar&&(Ar=Lf,yt=tr)}}}We=yt,yt=_[We],Ut+=We-yt+32768&32767}if(Wt){j[ne++]=268435456|mc[$t]<<18|_g[Wt];var Ef=mc[$t]&31,Df=_g[Wt]&31;Ne+=As[Ef]+Ls[Df],++z[257+Ef],++te[Df],Be=f+$t,++U}else j[ne++]=e[f],++z[e[f]]}}h=Fg(e,u,s,j,z,te,Ne,ne,De,f-De,h),!s&&h&7&&(h=hc(u,h+1,vc))}return zg(c,0,r+yc(h)+i)},ow=function(e,t,n,r,i){return nw(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,n,r,!i)};rw=typeof TextDecoder<"u"&&new TextDecoder,iw=0;try{rw.decode(vc,{stream:!0}),iw=1}catch{}});async function Kg(){let e=await Qe("Vencord_cloudSecret")??{},t=Sc();return e[t]?(await Eo("Vencord_cloudSecret",n=>(n??={},n[`${t}:${ni()}`]=n[t],delete n[t],n)),e[t]):e[`${t}:${ni()}`]}async function sw(e){await Eo("Vencord_cloudSecret",t=>(t??={},t[`${Sc()}:${ni()}`]=e,t))}async function bc(){await Eo("Vencord_cloudSecret",e=>(e??={},delete e[`${Sc()}:${ni()}`],e))}async function Yg(){if(await Kg()!==void 0){M.cloud.authenticated=!0;return}try{let r=await fetch(new URL("/v1/oauth/settings",fo()));var{clientId:e,redirectUri:t}=await r.json()}catch{he({title:"Cloud Integration",body:"Setup failed (couldn't retrieve OAuth configuration)."}),M.cloud.authenticated=!1;return}let{OAuth2AuthorizeModal:n}=Nn("OAuth2AuthorizeModal");Ce(r=>o(n,{...r,scopes:["identify"],responseType:"code",redirectUri:t,permissions:0n,clientId:e,cancelCompletesFlow:!1,callback:async({location:i})=>{if(!i){M.cloud.authenticated=!1;return}try{let s=await fetch(i,{headers:new Headers({Accept:"application/json"})}),{secret:l}=await s.json();l?(Es.info("Authorized with secret"),await sw(l),he({title:"Cloud Integration",body:"Cloud integrations enabled!"}),M.cloud.authenticated=!0):(he({title:"Cloud Integration",body:"Setup failed (no secret returned?)."}),M.cloud.authenticated=!1)}catch(s){Es.error("Failed to authorize",s),he({title:"Cloud Integration",body:`Setup failed (${s.toString()}).`}),M.cloud.authenticated=!1}}}))}async function cr(){let e=await Kg();return window.btoa(`${e}:${ni()}`)}var Es,fo,Sc,ni,Tc=m(()=>{"use strict";a();Cn();uo();D();O();T();be();Ze();Es=new Y("Cloud","#39b7e0"),fo=()=>new URL(M.cloud.url),Sc=()=>fo().origin,ni=()=>{let e=F.getCurrentUser()?.id;if(!e)throw new Error("User not yet logged in");return e}});function Ds(e){let t=document.createElement("a");t.href=URL.createObjectURL(e),t.download=e.name,document.body.appendChild(t),t.click(),setImmediate(()=>{URL.revokeObjectURL(t.href),document.body.removeChild(t)})}var xc=m(()=>{"use strict";a()});async function Zg(e){try{var t=JSON.parse(e)}catch(n){throw console.log(e),new Error("Failed to parse JSON: "+String(n))}if("settings"in t&&"quickCss"in t)Object.assign(En,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 Xg({minify:e}={}){let t=JSON.parse(VencordNative.settings.get()),n=await VencordNative.quickCss.get();return JSON.stringify({settings:t,quickCss:n},null,e?void 0:4)}async function Jg(){let e="vencord-settings-backup.json",t=await Xg(),n=new TextEncoder().encode(t);Ds(new File([n],e,{type:"application/json"}))}async function Vg(e=!0){if(!1){if(t)try{}catch(n){}}else{let t=document.createElement("input");t.type="file",t.style.display="none",t.accept="application/json",t.onchange=async()=>{let n=t.files?.[0];if(!n)return;let r=new FileReader;r.onload=async()=>{try{await Zg(r.result),e&&aw()}catch(i){new Y("SettingsSync").error(i),e&&lw(i)}},r.readAsText(n)},document.body.appendChild(t),t.click(),setImmediate(()=>document.body.removeChild(t))}}async function ur(e){let t=await Xg({minify:!0});try{let n=await fetch(new URL("/v1/settings",fo()),{method:"PUT",headers:new Headers({Authorization:await cr(),"Content-Type":"application/octet-stream"}),body:jg(new TextEncoder().encode(t))});if(!n.ok){hn.error(`Failed to sync up, API returned ${n.status}`),he({title:"Cloud Settings",body:`Could not synchronize settings to cloud (API returned ${n.status}).`,color:"var(--red-360)"});return}let{written:r}=await n.json();En.cloud.settingsSyncVersion=r,VencordNative.settings.set(JSON.stringify(En,null,4)),hn.info("Settings uploaded to cloud successfully"),e&&he({title:"Cloud Settings",body:"Synchronized settings to the cloud!",noPersist:!0})}catch(n){hn.error("Failed to sync up",n),he({title:"Cloud Settings",body:`Could not synchronize settings to the cloud (${n.toString()}).`,color:"var(--red-360)"})}}async function Os(e=!0,t=!1){try{let n=await fetch(new URL("/v1/settings",fo()),{method:"GET",headers:new Headers({Authorization:await cr(),Accept:"application/octet-stream","If-None-Match":M.cloud.settingsSyncVersion.toString()})});if(n.status===404)return hn.info("No settings on the cloud"),e&&he({title:"Cloud Settings",body:"There are no settings in the cloud.",noPersist:!0}),!1;if(n.status===304)return hn.info("Settings up to date"),e&&he({title:"Cloud Settings",body:"Your settings are up to date.",noPersist:!0}),!1;if(!n.ok)return hn.error(`Failed to sync down, API returned ${n.status}`),he({title:"Cloud Settings",body:`Could not synchronize settings from the cloud (API returned ${n.status}).`,color:"var(--red-360)"}),!1;let r=Number(n.headers.get("etag")),i=M.cloud.settingsSyncVersion;if(!t&&r<i){e&&he({title:"Cloud Settings",body:"Your local settings are newer than the cloud ones.",noPersist:!0});return}let s=await n.arrayBuffer(),l=new TextDecoder().decode(Wg(new Uint8Array(s)));return await Zg(l),En.cloud.settingsSyncVersion=r,VencordNative.settings.set(JSON.stringify(En,null,4)),hn.info("Settings loaded from cloud successfully"),e&&he({title:"Cloud Settings",body:"Your settings have been updated! Click here to restart to fully apply changes!",color:"var(--green-360)",onClick:()=>window.DiscordNative.app.relaunch(),noPersist:!0}),!0}catch(n){return hn.error("Failed to sync down",n),he({title:"Cloud Settings",body:`Could not synchronize settings from the cloud (${n.toString()}).`,color:"var(--red-360)"}),!1}}async function eh(){try{let e=await fetch(new URL("/v1/settings",fo()),{method:"DELETE",headers:new Headers({Authorization:await cr()})});if(!e.ok){hn.error(`Failed to delete, API returned ${e.status}`),he({title:"Cloud Settings",body:`Could not delete settings (API returned ${e.status}).`,color:"var(--red-360)"});return}hn.info("Settings deleted from cloud successfully"),he({title:"Cloud Settings",body:"Settings deleted from cloud!",color:"var(--green-360)"})}catch(e){hn.error("Failed to delete",e),he({title:"Cloud Settings",body:`Could not delete settings (${e.toString()}).`,color:"var(--red-360)"})}}var Qg,aw,lw,hn,oi=m(()=>{"use strict";a();uo();D();T();qg();Tc();be();xc();Qg=(e,t)=>X.show({type:e,message:t,id:X.genId()}),aw=()=>Qg(X.Type.SUCCESS,"Settings successfully imported. Restart to apply changes!"),lw=e=>Qg(X.Type.FAILURE,`Failed to import settings: ${String(e)}`);hn=new Y("Cloud:Settings","#39b7e0")});var Pc={};ge(Pc,{PlainSettings:()=>En,Settings:()=>M,addSettingsListener:()=>Bs,definePluginSettings:()=>k,migratePluginSettings:()=>uw,useSettings:()=>st});function wc(e,t=e,n=""){return nh[n]??=new Proxy(e,{get(r,i){let s=r[i];if(!(i in r)){if(n==="plugins"&&i in Te)return r[i]=wc({enabled:Te[i].required??Te[i].enabledByDefault??!1},t,`plugins.${i}`);if(n.startsWith("plugins.")){let l=n.slice(8);if(l in Te){let c=Te[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(h=>h.default);return u&&(r[i]=u.value),u?.value}}}return s}return typeof s=="object"&&!Array.isArray(s)&&s!==null?wc(s,t,`${n}${n&&"."}${i}`):s},set(r,i,s){if(r[i]===s)return!0;r[i]=s;let l=`${n}${n&&"."}${i}`;delete nh[l];for(let c of _s)(!c._path||c._path===l)&&c(s,l);return En.cloud.settingsSyncVersion=Date.now(),$o.Vencord_settingsDirty=!0,cw(),VencordNative.settings.set(JSON.stringify(t,null,4)),!0}})}function st(e){let[,t]=I.useReducer(()=>({}),{}),n=e?(r,i)=>e.includes(i)&&t():t;return I.useEffect(()=>(_s.add(n),()=>void _s.delete(n)),[]),M}function Bs(e,t){t._path=e,_s.add(t)}function uw(e,...t){let{plugins:n}=go;if(!(e in n)){for(let r of t)if(r in n){oh.info(`Migrating settings from old name ${r} to ${e}`),n[e]=n[r],delete n[r],VencordNative.settings.set(JSON.stringify(go,null,4));break}}}function k(e,t){let n={get store(){if(!n.pluginName)throw new Error("Cannot access settings before plugin is initialized");return M.plugins[n.pluginName]},use:r=>st(r?.map(i=>`plugins.${n.pluginName}.${i}`)).plugins[n.pluginName],def:e,checks:t??{},pluginName:"",withPrivateSettings(){return this}};return n}var oh,th,go,cw,_s,nh,En,M,D=m(()=>{"use strict";a();nr();bs();be();fe();oi();b();T();pr();oh=new Y("Settings"),th={notifyAboutUpdates:!0,autoUpdate:!1,autoUpdateNotification:!0,useQuickCss:!0,themeLinks:[],enableReactDevtools:!1,frameless:!1,transparent:!1,winCtrlQ:!1,macosTranslucency:!1,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{go=JSON.parse(VencordNative.settings.get()),Do(go,th)}catch(e){go=Do({},th),oh.error(`An error occurred while loading the settings. Corrupt settings file?
`,e)}cw=At(async()=>{M.cloud.settingsSync&&M.cloud.authenticated&&(await ur(),delete $o.Vencord_settingsDirty)},6e4),_s=new Set,nh={};En=go,M=wc(go)});function Fs(){window.VencordDesktopNative.app.relaunch()}var ri=m(()=>{"use strict";a()});var rh=m(()=>{});var Ic={};ge(Ic,{UpdateLogger:()=>ih,changes:()=>$s,checkForUpdates:()=>ah,getRepo:()=>pw,isNewer:()=>Mc,isOutdated:()=>ho,maybePromptToUpdate:()=>ii,update:()=>lh,updateError:()=>sh});async function Us(e){let t=await e;if(t.ok)return t.value;throw sh=t.error,t.error}async function ah(){return $s=await Us(VencordNative.updater.getUpdates()),$s.some(e=>e.hash===rn)?(Mc=!0,ho=!1):ho=$s.length>0}async function lh(){if(!ho)return!0;let e=await Us(VencordNative.updater.update());if(e&&(ho=!1,!await Us(VencordNative.updater.rebuild())))throw new Error("The Build failed. Please try manually building the new update");return e}async function ii(e,t=!1){return;try{if(await ah()){let r=confirm(e);if(r&&Mc)return alert("Your local copy has more recent commits. Please stash or reset them.");r&&(await lh(),Fs())}}catch(n){ih.error(n),alert("That also failed :( Try updating or re-installing with the installer!")}}var ih,ho,Mc,sh,$s,pw,dr=m(()=>{"use strict";a();Dr();be();ri();ih=new Y("Updater","white"),ho=!1,Mc=!1;pw=()=>Us(VencordNative.updater.getRepo())});function ch(){ii("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 uh=m(()=>{"use strict";a();dr()});function Dn({title:e,children:t}){return o(v.FormSection,null,o(Q,{variant:"heading-lg/semibold",tag:"h2",className:G.bottom16},e),t)}function On(e,t){return A.wrap(e,{message:`Failed to render the ${t} tab. If this issue persists, try using the installer to reinstall!`,onError:dw})}var dw,Go=m(()=>{"use strict";a();rh();ie();uh();Xe();El();T();dw=Ll(ch)});var mh={};ge(mh,{default:()=>yw});function fw(){let[e,,t]=ot(VencordNative.settings.getSettingsDir,{fallbackValue:"Loading..."}),n=st(),r=I.useMemo(()=>Math.random()>.5?dh:mw,[]),i=navigator.platform.toLowerCase().startsWith("win"),s=navigator.platform.toLowerCase().startsWith("mac"),l=[{key:"useQuickCss",title:"Enable Custom CSS",note:"Loads your Custom CSS"},!1,!1,!1,!1,!1,!1];return o(Dn,{title:"Vencord Settings"},o(hw,{image:r}),o(v.FormSection,{title:"Quick Actions"},o(Et,{className:ph("quick-actions-card")},o(I.Fragment,null,!1,o(N,{onClick:()=>VencordNative.quickCss.openEditor(),size:N.Sizes.SMALL,disabled:e==="Loading..."},"Open QuickCSS File"),!1,o(N,{onClick:()=>VencordNative.native.openExternal("https://github.com/Vendicated/Vencord"),size:N.Sizes.SMALL,disabled:t},"Open in GitHub")))),o(v.FormDivider,null),o(v.FormSection,{className:G.top16,title:"Settings",tag:"h5"},o(v.FormText,{className:G.bottom20},'Hint: You can change the position of this settings section in the settings of the "Settings" plugin!'),l.map(c=>c&&o(ft,{key:c.key,value:n[c.key],onChange:u=>n[c.key]=u,note:c.note},c.title))),typeof Notification<"u"&&o(gw,{settings:n.notifications}))}function gw({settings:e}){return o(d,null,o(v.FormTitle,{tag:"h5"},"Notification Style"),e.useNative!=="never"&&Notification?.permission==="denied"&&o(qn,{style:{padding:"1em"},className:G.bottom8},o(v.FormTitle,{tag:"h5"},"Desktop Notification Permission denied"),o(v.FormText,null,"You have denied Notification Permissions. Thus, Desktop notifications will not work!")),o(v.FormText,{className:G.bottom8},"Some plugins may show you notifications. These come in two styles:",o("ul",null,o("li",null,o("strong",null,"Vencord Notifications"),": These are in-app notifications"),o("li",null,o("strong",null,"Desktop Notifications"),": Native Desktop notifications (like when you get a ping)"))),o(ln,{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:is}),o(v.FormTitle,{tag:"h5",className:G.top16+" "+G.bottom8},"Notification Position"),o(ln,{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:is}),o(v.FormTitle,{tag:"h5",className:G.top16+" "+G.bottom8},"Notification Timeout"),o(v.FormText,{className:G.bottom16},"Set to 0s to never automatically time out"),o(Oo,{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}),o(v.FormTitle,{tag:"h5",className:G.top16+" "+G.bottom8},"Notification Log Limit"),o(v.FormText,{className:G.bottom16},"The amount of notifications to save in the log until old ones are removed. Set to ",o("code",null,"0")," to disable Notification log and ",o("code",null,"\u221E")," to never automatically remove old Notifications"),o(Oo,{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}),o(N,{onClick:Ns,disabled:e.logLimit===0},"Open Notification Log"))}function hw({image:e}){return o(Et,{className:ph("card","donate")},o("div",null,o(v.FormTitle,{tag:"h5"},"Support the Project"),o(v.FormText,null,"Please consider supporting the development of Vencord by donating!"),o(Zr,{style:{transform:"translateX(-1em)"}})),o("img",{role:"presentation",src:e,alt:"",height:128,style:{marginLeft:"auto",transform:e===dh?"rotate(10deg)":""}}))}var ph,dh,mw,yw,fh=m(()=>{"use strict";a();ks();D();Ge();Gl();Yr();Xe();fe();ri();ve();T();Go();ph=Ee("vc-settings-"),dh="https://cdn.discordapp.com/emojis/1026533090627174460.png",mw="https://media.discordapp.net/stickers/1039992459209490513.png";yw=On(fw,"Vencord Settings")});var gh=m(()=>{});var Rc={};ge(Rc,{currentNotice:()=>si,nextNotice:()=>hh,noticesQueue:()=>Nc,popNotice:()=>kc,showNotice:()=>ai});function kc(){Cc.dismiss()}function hh(){si=Nc.shift(),si&&Cc.show(...si,"VencordNotice")}function ai(e,t,n){Nc.push(["GENERIC",e,t,n]),si||hh()}var Cc,Nc,si,Gs=m(()=>{"use strict";a();O();Ye(e=>e.show&&e.dismiss&&!e.suppressAll,e=>Cc=e);Nc=[],si=null});function yh({text:e,color:t}){return o("div",{className:"vc-plugins-badge",style:{backgroundColor:t,justifySelf:"flex-end",marginLeft:"auto"}},e)}var vh=m(()=>{"use strict";a()});function Sh({option:e,pluginSettings:t,definedSettings:n,id:r,onChange:i,onError:s}){let l=t[r]??e.default,[c,u]=I.useState(l??!1),[h,f]=I.useState(null);I.useEffect(()=>{s(h!==null)},[h]);function y(S){let x=e.isValid?.call(n,S)??!0;typeof x=="string"?f(x):x?(f(null),u(S),i(S)):f("Invalid input provided.")}return o(v.FormSection,null,o(ft,{value:c,onChange:y,note:e.description,disabled:e.disabled?.call(n)??!1,...e.componentProps,hideBorder:!0,style:{marginBottom:"0.5em"}},jn(Ol(r))),h&&o(v.FormText,{style:{color:"var(--text-danger)"}},h))}var bh=m(()=>{"use strict";a();Wn();T()});function Th({option:e,onChange:t,onError:n}){return e.component({setValue:t,setError:n,option:e})}var xh=m(()=>{"use strict";a()});function Ac({option:e,pluginSettings:t,definedSettings:n,id:r,onChange:i,onError:s}){function l(S){return e.type===2?BigInt(S):Number(S)}let[c,u]=I.useState(`${t[r]??e.default??0}`),[h,f]=I.useState(null);I.useEffect(()=>{s(h!==null)},[h]);function y(S){let x=e.isValid?.call(n,S)??!0;f(null),typeof x=="string"?f(x):x||f("Invalid input provided."),e.type===1&&BigInt(S)>=vw?(u(`${Number.MAX_SAFE_INTEGER}`),i(l(S))):(u(S),i(l(S)))}return o(v.FormSection,null,o(v.FormTitle,null,e.description),o(Re,{type:"number",pattern:"-?[0-9]+",value:c,onChange:y,placeholder:e.placeholder??"Enter a number",disabled:e.disabled?.call(n)??!1,...e.componentProps}),h&&o(v.FormText,{style:{color:"var(--text-danger)"}},h))}var vw,wh=m(()=>{"use strict";a();b();T();vw=BigInt(Number.MAX_SAFE_INTEGER)});function Ph({option:e,pluginSettings:t,definedSettings:n,onChange:r,onError:i,id:s}){let l=t[s]??e.options?.find(S=>S.default)?.value,[c,u]=I.useState(l??null),[h,f]=I.useState(null);I.useEffect(()=>{i(h!==null)},[h]);function y(S){let x=e.isValid?.call(n,S)??!0;typeof x=="string"?f(x):x?(f(null),u(S),r(S)):f("Invalid input provided.")}return o(v.FormSection,null,o(v.FormTitle,null,e.description),o(ln,{isDisabled:e.disabled?.call(n)??!1,options:e.options,placeholder:e.placeholder??"Select an option",maxVisibleItems:5,closeOnSelect:!0,select:y,isSelected:S=>S===c,serialize:S=>String(S),...e.componentProps}),h&&o(v.FormText,{style:{color:"var(--text-danger)"}},h))}var Mh=m(()=>{"use strict";a();T()});function mr(e,t,n=1){let r=[];for(let i=e;i<=t;i+=n)r.push(Math.round(i*100)/100);return r}function Ih({option:e,pluginSettings:t,definedSettings:n,id:r,onChange:i,onError:s}){let l=t[r]??e.default,[c,u]=I.useState(null);I.useEffect(()=>{s(c!==null)},[c]);function h(f){let y=e.isValid?.call(n,f)??!0;typeof y=="string"?u(y):y?(u(null),i(f)):u("Invalid input provided.")}return o(v.FormSection,null,o(v.FormTitle,null,e.description),o(Oo,{disabled:e.disabled?.call(n)??!1,markers:e.markers,minValue:e.markers[0],maxValue:e.markers[e.markers.length-1],initialValue:l,onValueChange:h,onValueRender:f=>String(f.toFixed(2)),stickToMarkers:e.stickToMarkers??!0,...e.componentProps}))}var Lc=m(()=>{"use strict";a();T()});function Ch({option:e,pluginSettings:t,definedSettings:n,id:r,onChange:i,onError:s}){let[l,c]=I.useState(t[r]??e.default??null),[u,h]=I.useState(null);I.useEffect(()=>{s(u!==null)},[u]);function f(y){let S=e.isValid?.call(n,y)??!0;typeof S=="string"?h(S):S?(h(null),c(y),i(y)):h("Invalid input provided.")}return o(v.FormSection,null,o(v.FormTitle,null,e.description),o(Re,{type:"text",value:l,onChange:f,placeholder:e.placeholder??"Enter a value",disabled:e.disabled?.call(n)??!1,...e.componentProps}),u&&o(v.FormText,{style:{color:"var(--text-danger)"}},u))}var Nh=m(()=>{"use strict";a();T()});var Hs=m(()=>{"use strict";a();vh();bh();xh();wh();Mh();Lc();Nh()});function Ec(){return`-${ir.fromTimestamp(Date.now())}`}function oe(e,t){let n=Sw({channelId:e,content:"",embeds:[]});return bw.receiveMessage(e,Do(t,n)),t}function Oe(e,t,n){return e.find(r=>r.name===t)?.value||n}var Sw,bw,Dc=m(()=>{"use strict";a();fe();O();T();Sw=ce('username:"Clyde"'),bw=P("receiveMessage")});var yo,yn,Oc,zs=m(()=>{"use strict";a();yo=(y=>(y[y.SUB_COMMAND=1]="SUB_COMMAND",y[y.SUB_COMMAND_GROUP=2]="SUB_COMMAND_GROUP",y[y.STRING=3]="STRING",y[y.INTEGER=4]="INTEGER",y[y.BOOLEAN=5]="BOOLEAN",y[y.USER=6]="USER",y[y.CHANNEL=7]="CHANNEL",y[y.ROLE=8]="ROLE",y[y.MENTIONABLE=9]="MENTIONABLE",y[y.NUMBER=10]="NUMBER",y[y.ATTACHMENT=11]="ATTACHMENT",y))(yo||{}),yn=(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))(yn||{}),Oc=(r=>(r[r.CHAT_INPUT=1]="CHAT_INPUT",r[r.USER=2]="USER",r[r.MESSAGE=3]="MESSAGE",r))(Oc||{})});var Fc={};ge(Fc,{ApplicationCommandInputType:()=>yn,ApplicationCommandOptionType:()=>yo,ApplicationCommandType:()=>Oc,BUILT_IN:()=>vo,OptionalMessageOption:()=>So,RequiredMessageOption:()=>Ho,_handleCommand:()=>xw,_init:()=>Tw,commands:()=>_c,findOption:()=>Oe,generateId:()=>Ec,prepareOption:()=>Bc,registerCommand:()=>fr,sendBotMessage:()=>oe,unregisterCommand:()=>li});function Bc(e){return e.displayName||=e.name,e.displayDescription||=e.description,e.options?.forEach((t,n,r)=>{t===kh?r[n]=So:t===Rh&&(r[n]=Ho),t.choices?.forEach(i=>i.displayName||=i.name),Bc(r[n])}),e}function ww(e,t){e.options?.forEach(n=>{if(n.type!==1)throw new Error("When specifying sub-command options, all options must be sub-commands.");let r={...e,...n,type:1,name:`${e.name} ${n.name}`,id:`${n.name}-${e.id}`,displayName:`${e.name} ${n.name}`,subCommandPath:[{name:n.name,type:n.type,displayName:n.name}],rootCommand:e};fr(r,t)})}function fr(e,t){if(!vo){console.warn("[CommandsAPI]",`Not registering ${e.name} as the CommandsAPI hasn't been initialised.`,"Please restart to use commands");return}if(vo.some(n=>n.name===e.name))throw new Error(`Command '${e.name}' already exists.`);if(e.isVencordCommand=!0,e.id??=`-${vo.length+1}`,e.applicationId??="-1",e.type??=1,e.inputType??=1,e.plugin||=t,Bc(e),e.options?.[0]?.type===1){ww(e,t);return}_c[e.name]=e,vo.push(e)}function li(e){let t=vo.findIndex(n=>n.name===e);return t===-1?!1:(vo.splice(t,1),delete _c[e],!0)}var vo,_c,kh,Rh,So,Ho,Tw,xw,_t=m(()=>{"use strict";a();Wn();Dc();zs();Dc();zs();_c={},kh=Symbol("OptionalMessageOption"),Rh=Symbol("RequiredMessageOption"),So=kh,Ho=Rh,Tw=function(e){try{vo=e,So=e.find(t=>t.name==="shrug").options[0],Ho=e.find(t=>t.name==="me").options[0]}catch{console.error("Failed to load CommandsApi")}return e},xw=function(e,t,n){if(!e.isVencordCommand)return e.execute(t,n);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),oe(n.channel.id,{content:`${s}:
${Kr(l)}`,author:{username:"Vencord"}})};try{let i=e.execute(t,n);return i instanceof Promise?i.catch(r):i}catch(i){return r(i)}}});var $c,Ah=m(()=>{a();(window.VencordStyles??=new Map).set("src/components/PluginSettings/userPopoutHideBotTag.css",{name:"src/components/PluginSettings/userPopoutHideBotTag.css",source:`[class|="userPopoutOuter"] [class*="botTag"] {
display: none;
}
`,classNames:{},dom:null});$c="src/components/PluginSettings/userPopoutHideBotTag.css"});function Uc(e){let t=new Iw({username:e.username,id:e.id??Ec(),avatar:e.avatar,bot:!0});return E.dispatch({type:"USER_UPDATE",user:t}),t}function Gc({plugin:e,onRestartNeeded:t,onClose:n,transitionState:r}){let[i,s]=I.useState([]),l=st().plugins[e.name],[c,u]=I.useState({}),[h,f]=I.useState({}),[y,S]=I.useState(null),x=()=>Object.values(h).every(B=>!B),R=Boolean(l&&e.options);I.useEffect(()=>{Je($c);let B;return(async()=>{for(let q of e.authors.slice(0,6)){let ee=q.id?await Rn.fetchUser(`${q.id}`).then(j=>(B=j,Uc(j))).catch(()=>Uc({username:q.name})):Uc({username:q.name});s(j=>[...j,ee])}})(),()=>{Mt($c),B&&E.dispatch({type:"USER_UPDATE",user:B})}},[]);async function C(){if(!e.options){n();return}if(e.beforeSave){let q=await Promise.resolve(e.beforeSave(c));if(q!==!0){S(q);return}}let B=!1;for(let[q,ee]of Object.entries(c)){let j=e.options[q];l[q]=ee,j?.onChange?.(ee),j?.restartNeeded&&(B=!0)}B&&t(),n()}function _(){if(!R||!e.options)return o(v.FormText,null,"There are no settings for this plugin.");{let B=Object.entries(e.options).map(([q,ee])=>{if(ee.hidden)return null;function j(U){u(Ne=>({...Ne,[q]:U}))}function z(U){f(Ne=>({...Ne,[q]:U}))}let te=Cw[ee.type];return o(te,{id:q,key:q,option:ee,onChange:j,onError:z,pluginSettings:l,definedSettings:e.settings})});return o(le,{flexDirection:"column",style:{gap:12,marginBottom:16}},B)}}function $(B,q){let ee=e.authors.length-q,j=e.authors.length-ee,z=j+e.authors.length-q;return o(W,{text:e.authors.slice(j,z).map(te=>te.name).join(", ")},({onMouseEnter:te,onMouseLeave:U})=>o("div",{className:Mw.moreUsers,onMouseEnter:te,onMouseLeave:U},"+",ee))}return o(Le,{transitionState:r,size:"medium",className:"vc-text-selectable"},o($e,{separator:!1},o(Q,{variant:"heading-lg/semibold",style:{flexGrow:1}},e.name),o(xt,{onClick:n})),o(Ue,null,o(v.FormSection,null,o(v.FormTitle,{tag:"h3"},"About ",e.name),o(v.FormText,null,e.description),o(v.FormTitle,{tag:"h3",style:{marginTop:8,marginBottom:0}},"Authors"),o("div",{style:{width:"fit-content",marginBottom:8}},o(Pw,{users:i,count:e.authors.length,guildId:void 0,renderIcon:!1,max:6,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:$}))),!!e.settingsAboutComponent&&o("div",{className:J(G.bottom8,"vc-text-selectable")},o(v.FormSection,null,o(A,{message:"An error occurred while rendering this plugin's custom InfoComponent"},o(e.settingsAboutComponent,{tempSettings:c})))),o(v.FormSection,null,o(v.FormTitle,{tag:"h3"},"Settings"),_())),R&&o(Tt,null,o(le,{flexDirection:"column",style:{width:"100%"}},o(le,{style:{marginLeft:"auto"}},o(N,{onClick:n,size:N.Sizes.SMALL,color:N.Colors.WHITE,look:N.Looks.LINK},"Cancel"),o(W,{text:"You must fix all errors before saving",shouldShow:!x()},({onMouseEnter:B,onMouseLeave:q})=>o(N,{size:N.Sizes.SMALL,color:N.Colors.BRAND,onClick:C,onMouseEnter:B,onMouseLeave:q,disabled:!x()},"Save & Close"))),y&&o(Q,{variant:"text-md/semibold",style:{color:"var(--text-danger)"}},"Error while saving: ",y))))}var Pw,Mw,Iw,Cw,Lh=m(()=>{"use strict";a();_t();D();Ge();ie();wt();sn();Xe();fe();Ze();ve();b();O();T();Hs();Ah();Pw=re(()=>ze("defaultRenderUser","showDefaultAvatarsForNullUsers")),Mw=P("moreUsers","emptyUser","avatarContainer","clickableAvatar"),Iw=dt(()=>F.getCurrentUser().constructor);Cw={[0]:Ch,[1]:Ac,[2]:Ac,[3]:Sh,[4]:Ph,[5]:Ih,[6]:Th}});var Eh=m(()=>{});function Dh({checked:e,onChange:t,disabled:n}){return o("div",null,o("div",{className:J(js.container,"default-colors",e?js.checked:void 0),style:{backgroundColor:e?Hc:zc,opacity:n?.3:1}},o("svg",{className:js.slider+" vc-switch-slider",viewBox:"0 0 28 20",preserveAspectRatio:"xMinYMid meet","aria-hidden":"true",style:{transform:e?"translateX(12px)":"translateX(-3px)"}},o("rect",{fill:"white",x:"4",y:"0",height:"20",width:"20",rx:"10"}),o("svg",{viewBox:"0 0 20 20",fill:"none"},e?o(d,null,o("path",{fill:Hc,d:"M7.89561 14.8538L6.30462 13.2629L14.3099 5.25755L15.9009 6.84854L7.89561 14.8538Z"}),o("path",{fill:Hc,d:"M4.08643 11.0903L5.67742 9.49929L9.4485 13.2704L7.85751 14.8614L4.08643 11.0903Z"})):o(d,null,o("path",{fill:zc,d:"M5.13231 6.72963L6.7233 5.13864L14.855 13.2704L13.264 14.8614L5.13231 6.72963Z"}),o("path",{fill:zc,d:"M13.2704 5.13864L14.8614 6.72963L6.72963 14.8614L5.13864 13.2704L13.2704 5.13864Z"})))),o("input",{disabled:n,type:"checkbox",className:js.input,tabIndex:0,checked:e,onChange:r=>t(r.currentTarget.checked)})))}var Hc,zc,js,Oh=m(()=>{"use strict";a();Eh();fe();O();Hc="var(--green-360)",zc="var(--primary-400)",js=P("slider","input","container")});var Yc={};ge(Yc,{PMLogger:()=>Nw,isPluginEnabled:()=>Wc,patches:()=>_h,plugins:()=>kw,startAllPlugins:()=>qc,startDependenciesRecursive:()=>Ws,startPlugin:()=>ci,stopPlugin:()=>Kc});function Wc(e){return(Te[e]?.required||Te[e]?.isDependency||jc[e]?.enabled)??!1}function Ws(e){let t=!1,n=[];return e.dependencies?.forEach(r=>{if(!M.plugins[r].enabled){if(Ws(Te[r]),M.plugins[r].enabled=!0,Te[r].patches){jt.warn(`Enabling dependency ${r} requires restart.`),t=!0;return}ci(Te[r])||n.push(r)}}),{restartNeeded:t,failures:n}}var jt,Nw,kw,_h,jc,Bh,qc,ci,Kc,qs=m(()=>{"use strict";a();_t();D();be();T();pr();es();jt=new Y("PluginManager","#a6d189"),Nw=jt,kw=Te,_h=[],jc=M.plugins;Bh=Object.values(Te);for(let e of Bh)jc[e.name]?.enabled&&e.dependencies?.forEach(t=>{let n=Te[t];if(n)jc[t].enabled=!0,n.isDependency=!0;else{let r=new Error(`Plugin ${e.name} has unresolved dependency ${t}`);jt.warn(r)}});for(let e of Bh){if(e.settings){e.settings.pluginName=e.name,e.options??={};for(let[t,n]of Object.entries(e.settings.def)){let r=e.settings.checks?.[t];e.options[t]={...n,...r}}}if(e.patches&&Wc(e.name))for(let t of e.patches)t.plugin=e.name,Array.isArray(t.replacement)||(t.replacement=[t.replacement]),_h.push(t)}qc=an("startAllPlugins",function(){for(let t in Te)Wc(t)&&ci(Te[t])});ci=an("startPlugin",function(t){let{name:n,commands:r,flux:i}=t;if(t.start){if(jt.info("Starting plugin",n),t.started)return jt.warn(`${n} already started`),!1;try{t.start(),t.started=!0}catch(s){return jt.error(`Failed to start ${n}
`,s),!1}}if(r?.length){jt.info("Registering commands of plugin",n);for(let s of r)try{fr(s,n)}catch(l){return jt.error(`Failed to register command ${s.name}
`,l),!1}}if(i)for(let s in i)E.subscribe(s,i[s]);return!0},e=>`startPlugin ${e.name}`),Kc=an("stopPlugin",function(t){let{name:n,commands:r,flux:i}=t;if(t.stop){if(jt.info("Stopping plugin",n),!t.started)return jt.warn(`${n} already stopped`),!1;try{t.stop(),t.started=!1}catch(s){return jt.error(`Failed to stop ${n}
`,s),!1}}if(r?.length){jt.info("Unregistering commands of plugin",n);for(let s of r)try{li(s.name)}catch(l){return jt.error(`Failed to unregister command ${s.name}
`,l),!1}}if(i)for(let s in i)E.unsubscribe(s,i[s]);return!0},e=>`stopPlugin ${e.name}`)});function Ew(e){X.show({message:e,type:X.Type.FAILURE,id:X.genId(),options:{position:X.Position.BOTTOM}})}function Dw({required:e}){return o(Et,{className:vn("info-card",{"restart-card":e})},e?o(d,null,o(v.FormTitle,{tag:"h5"},"Restart required!"),o(v.FormText,{className:vn("dep-text")},"Restart now to apply new plugins and their settings"),o(N,{color:N.Colors.YELLOW,onClick:()=>location.reload()},"Restart")):o(d,null,o(v.FormTitle,{tag:"h5"},"Plugin Management"),o(v.FormText,null,"Press the cog wheel or info icon to get more info on a plugin"),o(v.FormText,null,"Plugins with a cog wheel have settings you can modify!")))}function Uh({plugin:e,disabled:t,onRestartNeeded:n,onMouseEnter:r,onMouseLeave:i,isNew:s}){let l=M.plugins[e.name],c=()=>l.enabled??!1;function u(){Hr(async()=>f=>o(Gc,{...f,plugin:e,onRestartNeeded:()=>n(e.name)}))}function h(){let f=c();if(!f){let{restartNeeded:S,failures:x}=Ws(e);if(x.length){Fh.error(`Failed to start dependencies for ${e.name}: ${x.join(", ")}`),ai("Failed to start dependencies: "+x.join(", "),"Close",()=>null);return}else if(S){l.enabled=!0,n(e.name);return}}if(e.patches?.length){l.enabled=!f,n(e.name);return}if(f&&!e.started){l.enabled=!f;return}if(!(f?Kc(e):ci(e))){l.enabled=!1;let S=`Error while ${f?"stopping":"starting"} plugin ${e.name}`;Fh.error(S),Ew(S);return}l.enabled=!f}return o(le,{className:vn("card",{"card-disabled":t}),flexDirection:"column",onMouseEnter:r,onMouseLeave:i},o("div",{className:vn("card-header")},o(Q,{variant:"text-md/bold",className:vn("name")},e.name,s&&o(yh,{text:"NEW",color:"#ED4245"})),o("button",{role:"switch",onClick:()=>u(),className:J(Rw.button,vn("info-button"))},e.options?o(Aw,null):o(Lw,{width:"24",height:"24"})),o(Dh,{checked:c(),onChange:h,disabled:t})),o(Q,{className:vn("note"),variant:"text-sm/normal"},e.description))}function Zc(){let e=st(),t=I.useMemo(()=>new Er,[]);I.useEffect(()=>()=>void(t.hasChanges&&bt.show({title:"Restart required",body:o(d,null,o("p",null,"The following plugins require a restart:"),o("div",null,t.map((S,x)=>o(d,null,x>0&&", ",Ie.parse("`"+S+"`"))))),confirmText:"Restart now",cancelText:"Later!",onConfirm:()=>location.reload()})),[]);let n=I.useMemo(()=>{let S={};for(let x in Te){let R=Te[x].dependencies;if(R)for(let C of R)S[C]??=[],S[C].push(x)}return S},[]),r=I.useMemo(()=>Object.values(Te).sort((S,x)=>S.name.localeCompare(x.name)),[]),[i,s]=I.useState({value:"",status:0}),l=S=>s(x=>({...x,value:S})),c=S=>s(x=>({...x,status:S})),u=S=>{let x=e.plugins[S.name]?.enabled;if(x&&i.status===2||!x&&i.status===1)return!1;if(!i.value.length)return!0;let R=i.value.toLowerCase();return S.name.toLowerCase().includes(R)||S.description.toLowerCase().includes(R)||S.tags?.some(C=>C.toLowerCase().includes(R))},[h]=ot(()=>Qe("Vencord_existingPlugins").then(S=>{let x=Date.now()/1e3,R={},C=Object.values(r).map($=>$.name),_=[];for(let{name:$}of r)(R[$]=S?.[$]??x)+60*60*24*2>x&&_.push($);return Ve("Vencord_existingPlugins",R),window._.isEqual(_,C)?[]:_})),f,y;if(r?.length){f=[],y=[];for(let S of r){if(!S.options&&S.name.endsWith("API")&&i.value!=="API"||!u(S))continue;if(S.required||n[S.name]?.some(R=>e.plugins[R].enabled)){let R=S.required?"This plugin is required for Vencord to function.":Ow(n[S.name]?.filter(C=>e.plugins[C].enabled));y.push(o(W,{text:R,key:S.name},({onMouseLeave:C,onMouseEnter:_})=>o(Uh,{onMouseLeave:C,onMouseEnter:_,onRestartNeeded:$=>t.handleChange($),disabled:!0,plugin:S})))}else f.push(o(Uh,{onRestartNeeded:R=>t.handleChange(R),disabled:!1,plugin:S,isNew:h?.includes(S.name),key:S.name}))}}else f=y=o(Q,{variant:"text-md/normal"},"No plugins meet search criteria.");return o(Dn,{title:"Plugins"},o(Dw,{required:t.hasChanges}),o(v.FormTitle,{tag:"h5",className:J(G.top20,G.bottom8)},"Filters"),o("div",{className:vn("filter-controls")},o(Re,{autoFocus:!0,value:i.value,placeholder:"Search for a plugin...",onChange:l,className:G.bottom20}),o("div",{className:$h.inputWrapper},o(ln,{className:$h.inputDefault,options:[{label:"Show All",value:0,default:!0},{label:"Show Enabled",value:1},{label:"Show Disabled",value:2}],serialize:String,select:c,isSelected:S=>S===i.status,closeOnSelect:!0}))),o(v.FormTitle,{className:G.top20},"Plugins"),o("div",{className:vn("grid")},f),o(v.FormDivider,{className:G.top20}),o(v.FormTitle,{tag:"h5",className:J(G.top20,G.bottom8)},"Required Plugins"),o("div",{className:vn("grid")},y))}function Ow(e){return o(I.Fragment,null,o(v.FormText,null,"This plugin is required by:"),e.map(t=>o(v.FormText,{className:vn("dep-text")},t)))}var vn,Fh,$h,Rw,Aw,Lw,Gh=m(()=>{"use strict";a();gh();Cn();Gs();D();Ge();wt();Hs();Lh();Oh();Go();ul();be();Xe();fe();Ze();ve();O();T();pr();qs();vn=Ee("vc-plugins-"),Fh=new Y("PluginSettings","#a6d189"),$h=P("inputDefault","inputWrapper"),Rw=P("button","disabled","enabled"),Aw=re(()=>ze("18.564C15.797 19.099 14.932 19.498 14 19.738V22H10V19.738C9.069")),Lw=re(()=>ze("4.4408921e-16 C4.4771525,-1.77635684e-15 4.4408921e-16"))});var Hh={};ge(Hh,{default:()=>_w});var _w,zh=m(()=>{"use strict";a();Gh();Go();_w=On(Zc,"Plugins")});function at(e){return e.disabled&&(e.style??={},e.style.pointerEvents="none",e["aria-disabled"]=!0),o("a",{role:"link",target:"_blank",...e},e.children)}var bo=m(()=>{"use strict";a()});var jh={};ge(jh,{default:()=>Gw});function Fw({link:e}){let[t,n,r]=ot(()=>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...":n?`Error: ${n instanceof Error?n.message:String(n)}`:"Valid!";return o(v.FormText,{style:{color:r?"var(--text-muted)":n?"var(--text-danger)":"var(--text-positive)"}},i)}function $w({themeLinks:e}){return e.length?o(d,null,o(v.FormTitle,{className:G.top20,tag:"h5"},"Validator"),o(v.FormText,null,"This section will tell you whether your themes can successfully be loaded"),o("div",null,e.map(t=>o(Et,{style:{padding:".5em",marginBottom:".5em",marginTop:".5em"},key:t},o(v.FormTitle,{tag:"h5",style:{overflowWrap:"break-word"}},t),o(Fw,{link:t}))))):null}function Uw(){let e=st(["themeLinks"]),[t,n]=I.useState(e.themeLinks.join(`
`));function r(){e.themeLinks=[...new Set(t.trim().split(/\n+/).map(i=>i.trim()).filter(Boolean))]}return o(Dn,{title:"Themes"},o(Et,{className:"vc-settings-card vc-text-selectable"},o(v.FormTitle,{tag:"h5"},"Paste links to .theme.css files here"),o(v.FormText,null,"One link per line"),o(v.FormText,null,o("strong",null,"Make sure to use the raw links or github.io links!")),o(v.FormDivider,{className:G.top8+" "+G.bottom8}),o(v.FormTitle,{tag:"h5"},"Find Themes:"),o("div",{style:{marginBottom:".5em"}},o(at,{style:{marginRight:".5em"},href:"https://betterdiscord.app/themes"},"BetterDiscord Themes"),o(at,{href:"https://github.com/search?q=discord+theme"},"GitHub")),o(v.FormText,null,'If using the BD site, click on "Source" somewhere below the Download button'),o(v.FormText,null,'In the GitHub repository of your theme, find X.theme.css, click on it, then click the "Raw" button'),o(v.FormText,null,"If the theme has configuration that requires you to edit the file:",o("ul",null,o("li",null,"\u2022 Make a ",o(at,{href:"https://github.com/signup"},"GitHub")," account"),o("li",null,"\u2022 Click the fork button on the top right"),o("li",null,"\u2022 Edit the file"),o("li",null,"\u2022 Use the link to your own repository instead")))),o(v.FormTitle,{tag:"h5"},"Themes"),o(as,{value:t,onChange:n,className:`${Bw.textarea} vc-settings-theme-links`,placeholder:"Theme Links",spellCheck:!1,onBlur:r}),o($w,{themeLinks:e.themeLinks}))}var Bw,Gw,Wh=m(()=>{"use strict";a();D();bo();Xe();ve();O();T();Go();Bw=ke(e=>typeof e.textarea=="string");Gw=On(Uw,"Themes")});function Ks({value:e,onChange:t,validate:n}){let[r,i]=I.useState(e),[s,l]=I.useState();function c(u){i(u);let h=n(u);h===!0?(l(void 0),t(u)):l(h)}return o(d,null,o(Re,{type:"text",value:r,onChange:c,error:s}))}var Xc=m(()=>{"use strict";a();T()});var qh={};ge(qh,{default:()=>qw});function Hw(e){try{return new URL(e),!0}catch{return"Invalid URL"}}async function zw(){let e=await fetch(new URL("/v1/",fo()),{method:"DELETE",headers:new Headers({Authorization:await cr()})});if(!e.ok){Es.error(`Failed to erase data, API returned ${e.status}`),he({title:"Cloud Integrations",body:`Could not erase all data (API returned ${e.status}), please contact support.`,color:"var(--red-360)"});return}M.cloud.authenticated=!1,await bc(),he({title:"Cloud Integrations",body:"Successfully erased all data.",color:"var(--green-360)"})}function jw(){let{cloud:e}=st(["cloud.authenticated","cloud.settingsSync"]),t=e.authenticated&&e.settingsSync;return o(v.FormSection,{title:"Settings Sync",className:G.top16},o(v.FormText,{variant:"text-md/normal",className:G.bottom20},"Synchronize your settings to the cloud. This allows easy synchronization across multiple devices with minimal effort."),o(ft,{key:"cloud-sync",disabled:!e.authenticated,value:e.settingsSync,onChange:n=>{e.settingsSync=n}},"Settings Sync"),o("div",{className:"vc-cloud-settings-sync-grid"},o(N,{size:N.Sizes.SMALL,disabled:!t,onClick:()=>ur(!0)},"Sync to Cloud"),o(W,{text:"This will overwrite your local settings with the ones on the cloud. Use wisely!"},({onMouseLeave:n,onMouseEnter:r})=>o(N,{onMouseLeave:n,onMouseEnter:r,size:N.Sizes.SMALL,color:N.Colors.RED,disabled:!t,onClick:()=>Os(!0,!0)},"Sync from Cloud")),o(N,{size:N.Sizes.SMALL,color:N.Colors.RED,disabled:!t,onClick:()=>eh()},"Delete Cloud Settings")))}function Ww(){let e=st(["cloud.authenticated","cloud.url"]);return o(Dn,{title:"Vencord Cloud"},o(v.FormSection,{title:"Cloud Settings",className:G.top16},o(v.FormText,{variant:"text-md/normal",className:G.bottom20},"Vencord comes with a cloud integration that adds goodies like settings sync across devices. It ",o(at,{href:"https://vencord.dev/cloud/privacy"},"respects your privacy"),", and the ",o(at,{href:"https://github.com/Vencord/Backend"},"source code")," is AGPL 3.0 licensed so you can host it yourself."),o(ft,{key:"backend",value:e.cloud.authenticated,onChange:t=>{t&&Yg(),t||(e.cloud.authenticated=t)},note:"This will request authorization if you have not yet set up cloud integrations."},"Enable Cloud Integrations"),o(v.FormTitle,{tag:"h5"},"Backend URL"),o(v.FormText,{className:G.bottom8},"Which backend to use when using cloud integrations."),o(Ks,{key:"backendUrl",value:e.cloud.url,onChange:t=>{e.cloud.url=t,e.cloud.authenticated=!1,bc()},validate:Hw}),o(N,{className:G.top8,size:N.Sizes.MEDIUM,color:N.Colors.RED,disabled:!e.cloud.authenticated,onClick:()=>bt.show({title:"Are you sure?",body:"Once your data is erased, we cannot recover it. There's no going back!",onConfirm:zw,confirmText:"Erase it!",confirmColor:"vc-cloud-erase-data-danger-btn",cancelText:"Nevermind"})},"Erase All Data"),o(v.FormDivider,{className:G.top16})),o(jw,null))}var qw,Kh=m(()=>{"use strict";a();uo();D();Xc();bo();Tc();Xe();oi();T();Go();qw=On(Ww,"Cloud")});var Yh={};ge(Yh,{default:()=>Yw});function Kw(){return o(Dn,{title:"Backup & Restore"},o(Et,{className:J("vc-settings-card","vc-backup-restore-card")},o(le,{flexDirection:"column"},o("strong",null,"Warning"),o("span",null,"Importing a settings file will overwrite your current settings."))),o(Q,{variant:"text-md/normal",className:G.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."),o(Q,{variant:"text-md/normal",className:G.bottom8},"Settings Export contains:",o("ul",null,o("li",null,"\u2014 Custom QuickCSS"),o("li",null,"\u2014 Theme Links"),o("li",null,"\u2014 Plugin Settings"))),o(le,null,o(N,{onClick:()=>Vg(),size:N.Sizes.SMALL},"Import Settings"),o(N,{onClick:Jg,size:N.Sizes.SMALL},"Export Settings")))}var Yw,Zh=m(()=>{"use strict";a();wt();Xe();fe();oi();T();Go();Yw=On(Kw,"Backup & Restore")});var ui,Jc=m(()=>{"use strict";a();Pt();D();w();be();b();T();Dr();ui=g({name:"Settings",description:"Adds Settings UI and debug info",authors:[p.Ven,p.Megu],required:!0,start(){pe("user-settings-cog",e=>()=>{e.find(n=>Array.isArray(n)&&n.some(r=>r?.props?.id==="VencordSettings"))?.forEach(n=>{n?.props?.id?.startsWith("Vencord")&&(n.props.action=()=>gs.open(n.props.id))})})},patches:[{find:".versionHash",replacement:[{match:/\[\(0,.{1,3}\.jsxs?\)\((.{1,10}),(\{[^{}}]+\{.{0,20}.versionHash,.+?\})\)," "/,replace:(e,t,n)=>(n=n.replace(/children:\[.+\]/,""),`${e},Vencord.Plugins.plugins.Settings.makeInfoElements(${t}, ${n})`)}]},{find:"Messages.ACTIVITY_SETTINGS",replacement:{get match(){switch(M.plugins.Settings.settingsLocation){case"top":return/\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.USER_SETTINGS\}/;case"aboveNitro":return/\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.BILLING_SETTINGS\}/;case"belowNitro":return/\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.APP_SETTINGS\}/;case"aboveActivity":return/\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.ACTIVITY_SETTINGS\}/;case"belowActivity":return/(?<=\{section:(.{1,2})\.ID\.DIVIDER},)\{section:"changelog"/;case"bottom":return/\{section:(.{1,2})\.ID\.CUSTOM,\s*element:.+?}/;default:return new Y("Settings").error(new Error("No switch case matched????? Don't mess with the settings, silly")),/(?!a)a/}},replace:"...$self.makeSettingsCategories($1),$&"}}],customSections:[],makeSettingsCategories({ID:e}){return[{section:e.HEADER,label:"Vencord"},{section:"VencordSettings",label:"Vencord",element:(fh(),Lo(mh)).default},{section:"VencordPlugins",label:"Plugins",element:(zh(),Lo(Hh)).default},{section:"VencordThemes",label:"Themes",element:(Wh(),Lo(jh)).default},!1,{section:"VencordCloud",label:"Cloud",element:(Kh(),Lo(qh)).default},{section:"VencordSettingsSync",label:"Backup & Restore",element:(Zh(),Lo(Yh)).default},!1,!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" (Web)"},makeInfoElements(e,t){let{electronVersion:n,chromiumVersion:r,additionalInfo:i}=this;return o(d,null,o(e,{...t},"Vencord ",rn,i),n&&o(e,{...t},"Electron ",n),r&&o(e,{...t},"Chromium ",r))}})});var Qc,Xh=m(()=>{"use strict";a();w();b();Qc=g({name:"AlwaysAnimate",description:"Animates anything that can be animated, besides status emojis.",authors:[p.FieryFlames],patches:[{find:".canAnimate",all:!0,replacement:{match:/\.canAnimate\b/g,replace:".canAnimate || true"}}]})});var Vc,Jh=m(()=>{"use strict";a();w();b();Vc=g({name:"AlwaysTrust",description:"Removes the annoying untrusted domain and suspicious file popup",authors:[p.zt],patches:[{find:'.displayName="MaskedLinkStore"',replacement:{match:/\.isTrustedDomain=function\(.\){return.+?};/,replace:".isTrustedDomain=function(){return true};"}},{find:'"7z","ade","adp"',replacement:{match:/JSON\.parse\('\[.+?'\)/,replace:"[]"}}]})});var eu,Qh=m(()=>{"use strict";a();D();w();b();eu=g({name:"AnonymiseFileNames",authors:[p.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:()=>M.plugins.AnonymiseFileNames.method!==0},consistent:{description:"Consistent filename",type:0,default:"image",disabled:()=>M.plugins.AnonymiseFileNames.method!==1}},anonymise(e){let t="image",n=e.lastIndexOf("."),r=n!==-1?e.slice(n):"";switch(M.plugins.AnonymiseFileNames.method){case 0:let i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";t=Array.from({length:M.plugins.AnonymiseFileNames.randomisedLength},()=>i[Math.floor(Math.random()*i.length)]).join("");break;case 1:t=M.plugins.AnonymiseFileNames.consistent;break;case 2:t=`${Math.floor(Date.now()/1e3)}${Math.floor(window.performance.now())}`;break}return t+r}})});async function Vh(e,t){return(await Zw.getAsset(e,[t,void 0]))[0]}async function Jw(e){let t={};return await Xw(t,e),t.application}var Zw,Xw,ey,gr,tu,ty=m(()=>{"use strict";a();Gs();bo();w();b();O();T();Zw=Ke("getAssetImage: size must === [number, number] for Twitch",{getAsset:K.byCode("apply(")}),Xw=ce(".APPLICATION_RPC(");ey={};tu=g({name:"WebRichPresence (arRPC)",description:"Client plugin for arRPC to enable RPC on Discord Web (experimental)",authors:[p.Ducko],settingsAboutComponent:()=>o(d,null,o(v.FormTitle,{tag:"h3"},"How to use arRPC"),o(v.FormText,null,o(at,{href:"https://github.com/OpenAsar/arrpc/tree/main#server"},"Follow the instructions in the GitHub repo")," to get the server running, and then enable the plugin.")),async start(){if("armcord"in window)return;if(gr&&gr.close(),gr=new WebSocket("ws://127.0.0.1:1337"),gr.onmessage=async t=>{let n=JSON.parse(t.data);if(n.activity?.assets?.large_image&&(n.activity.assets.large_image=await Vh(n.activity.application_id,n.activity.assets.large_image)),n.activity?.assets?.small_image&&(n.activity.assets.small_image=await Vh(n.activity.application_id,n.activity.assets.small_image)),n.activity){let r=n.activity.application_id;ey[r]||=await Jw(r);let i=ey[r];n.activity.name||=i.name}E.dispatch({type:"LOCAL_ACTIVITY_UPDATE",...n})},!await new Promise(t=>setTimeout(()=>t(gr.readyState===WebSocket.OPEN),1e3))){ai("Failed to connect to arRPC, is it running?","Retry",()=>{kc(),this.start()});return}X.show({message:"Connected to arRPC",type:X.Type.SUCCESS,id:X.genId(),options:{duration:1e3,position:X.Position.BOTTOM}})},stop(){E.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:null}),gr?.close()}})});var nu,ny=m(()=>{"use strict";a();w();b();nu=g({name:"BANger",description:"Replaces the GIF in the ban dialogue with a custom one.",authors:[p.Xinto,p.Glitch],patches:[{find:"BAN_CONFIRM_TITLE.",replacement:{match:/src:\w\(\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 oy=m(()=>{});function Vw(e){let t=Vencord.Plugins.plugins.BetterFolders.Guilds(e),n=t.props.children?.props?.children?.props?.children?.[1]?.props;if(n?.children){let r=n.children.find(i=>i?.props?.["aria-label"]===it.Messages.SERVERS);r&&(n.children=r)}return t}var Qw,ry,iy,sy,ay,ly,cy=m(()=>{"use strict";a();D();Ge();ie();O();T();Qw=Ee("vc-bf-"),ry=P("sidebar","guilds"),iy=P("a","animated","useTransition"),sy=ae("ChannelRTCStore"),ay=ae("ExpandedGuildFolderStore");ly=A.wrap(()=>{let e=Fe([ay],()=>ay.getExpandedFolders()),t=Fe([sy],()=>sy.isFullscreenInContext()),n=document.querySelector(`.${ry.guilds}`),r=!!e.size,i=Qw("folder-sidebar",{fullscreen:t}),s=o(Vw,{className:ry.guilds,bfGuildFolders:Array.from(e)});return!n||!M.plugins.BetterFolders.sidebarAnim?r?o("div",{className:i},s):null:o(iy.Transition,{items:r,from:{width:0},enter:{width:n.getBoundingClientRect().width},leave:{width:0},config:{duration:200}},(l,c)=>c&&o(iy.animated.div,{style:l,className:i},s))},{noop:!0})});var e2,t2,ou,ru,Zn,iu,uy=m(()=>{"use strict";a();oy();D();w();b();O();T();cy();e2=ke(e=>e.prototype?.convertToFolder),t2=ae("SortedGuildStore"),ou=ae("ExpandedGuildFolderStore"),ru=P("move","toggleGuildFolderExpand"),Zn=k({sidebar:{type:3,description:"Display servers from folder on dedicated sidebar",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",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}}),iu=g({name:"BetterFolders",description:"Shows server folders on dedicated sidebar and adds folder related improvements",authors:[p.juby,p.AutumnVN],patches:[{find:'("guildsnav")',predicate:()=>Zn.store.sidebar,replacement:[{match:/(\i)\(\){return \i\(\(0,\i\.jsx\)\("div",{className:\i\(\)\.guildSeparator}\)\)}/,replace:"$&$self.Separator=$1;"},{match:/\i\(\(function\(\i,\i,\i\){var \i=\i\.key;return.+\(\i\)},\i\)}\)\)/,replace:"arguments[0].bfHideServers?null:$&"},{match:/(\i)\.themeOverride,(.{15,25}\(function\(\){var \i=)(\i\.\i\.getGuildsTree\(\))/,replace:"$1.themeOverride,bfPatch=$1.bfGuildFolders,$2bfPatch?$self.getGuildsTree(bfPatch,$3):$3"},{match:/return(\(0,\i\.jsx\))(\(\i,{)(folderNode:\i,setNodeRef:\i\.setNodeRef,draggable:!0,.+},\i\.id\));case/,replace:"var bfHideServers=typeof bfPatch==='undefined',folder=$1$2bfHideServers,$3;return !bfHideServers&&arguments[1]?[$1($self.Separator,{}),folder]:folder;case"},{match:/\("guildsnav"\);return\(0,\i\.jsx\)\(.{1,6},{navigator:\i,children:\(0,\i\.jsx\)\(/,replace:"$&$self.Guilds="}]},{find:"APPLICATION_LIBRARY,render",predicate:()=>Zn.store.sidebar,replacement:{match:/(\(0,\i\.jsx\))\(\i\..,{className:\i\(\)\.guilds,themeOverride:\i}\)/,replace:"$&,$1($self.FolderSideBar,{})"}},{find:'("guildsnav")',predicate:()=>Zn.store.closeAllHomeButton,replacement:{match:",onClick:function(){if(!__OVERLAY__){",replace:"$&$self.closeFolders();"}}],settings:Zn,start(){let e=t=>t2.getGuildFolders().find(n=>n.guildIds.includes(t));E.subscribe("CHANNEL_SELECT",this.onSwitch=t=>{if(!(!Zn.store.closeAllFolders&&!Zn.store.forceOpen)&&this.lastGuildId!==t.guildId){this.lastGuildId=t.guildId;let n=e(t.guildId);n?.folderId?Zn.store.forceOpen&&!ou.isFolderExpanded(n.folderId)&&ru.toggleGuildFolderExpand(n.folderId):Zn.store.closeAllFolders&&this.closeFolders()}}),E.subscribe("TOGGLE_GUILD_FOLDER_EXPAND",this.onToggleFolder=t=>{Zn.store.closeOthers&&!this.dispatching&&E.wait(()=>{let n=ou.getExpandedFolders();if(n.size>1){this.dispatching=!0;for(let r of n)r!==t.folderId&&ru.toggleGuildFolderExpand(r);this.dispatching=!1}})})},stop(){E.unsubscribe("CHANNEL_SELECT",this.onSwitch),E.unsubscribe("TOGGLE_GUILD_FOLDER_EXPAND",this.onToggleFolder)},FolderSideBar:ly,getGuildsTree(e,t){let n=new e2;return n.root.children=t.root.children.filter(r=>e.includes(r.id)),n.nodes=e.map(r=>t.nodes[r]),n},closeFolders(){for(let e of ou.getExpandedFolders())ru.toggleGuildFolderExpand(e)}})});var su,py=m(()=>{"use strict";a();w();b();su=g({name:"BetterGifAltText",authors:[p.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:'preload:"none","aria',replacement:{match:/(?<==(.{1,3})\.alt.{0,20})\?.{0,5}\.Messages\.GIF/,replace:"?($1.alt='GIF',$self.altify($1))"}}],altify(e){if(e.alt!=="GIF")return e.alt;let t=e.original||e.src;try{t=decodeURI(t)}catch{}let n=t.slice(t.lastIndexOf("/")+1).replace(/\d/g,"").replace(/.gif$/,"").split(/[,\-_ ]+/g).slice(0,20).join(" ");return n.length>300&&(n=n.slice(0,300)+"..."),n&&(e.alt+=` - ${n}`),e.alt}})});var au,dy=m(()=>{"use strict";a();D();w();b();au=g({name:"BetterNotesBox",description:"Hide notes or disable spellcheck (Configure in settings!!)",authors:[p.Ven],patches:[{find:"hideNote:",all:!0,predicate:()=>Vencord.Settings.plugins.BetterNotesBox.hide,replacement:{match:/hideNote:.+?(?=[,}])/g,replace:"hideNote:true"}},{find:"Messages.NOTE_PLACEHOLDER",replacement:{match:/\.NOTE_PLACEHOLDER,/,replace:"$&spellCheck:!Vencord.Settings.plugins.BetterNotesBox.noSpellCheck,"}}],options:{hide:{type:3,description:"Hide notes",default:!1,restartNeeded:!0},noSpellCheck:{type:3,description:"Disable spellcheck in notes",disabled:()=>M.plugins.BetterNotesBox.hide,default:!1}}})});var lu,my=m(()=>{"use strict";a();D();w();b();T();lu=g({name:"BetterRoleDot",authors:[p.Ven],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,predicate:()=>M.plugins.BetterRoleDot.bothStyles,replacement:{match:/"(?:username|dot)"===\i(?!\.\i)/g,replace:"true"}}],options:{bothStyles:{type:3,description:"Show both role dot and coloured names",default:!1}},copyToClipBoard(e){Kt.copy(e),X.show({message:"Copied to Clipboard!",type:X.Type.SUCCESS,id:X.genId(),options:{duration:1e3,position:X.Position.BOTTOM}})}})});var cu,fy=m(()=>{"use strict";a();w();b();cu=g({name:"BetterUploadButton",authors:[p.obscurity,p.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)\},(.{1,3})\)/,replace:(e,t,n)=>`${e.slice(0,-1)},{onClick:${t},onContextMenu:${n}.onClick})`}}]})});var gy=m(()=>{});function Xn({height:e=24,width:t=24,className:n,children:r,viewBox:i,...s}){return o("svg",{className:J(n,"vc-icon"),role:"img",width:t,height:e,viewBox:i,...s},r)}function Ys({height:e=24,width:t=24,className:n}){return o(Xn,{height:e,width:t,className:J(n,"vc-link-icon"),viewBox:"0 0 24 24"},o("g",{fill:"none","fill-rule":"evenodd"},o("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"}),o("rect",{width:t,height:e})))}function hy(e){return o(Xn,{...e,className:J(e.className,"vc-copy-icon"),viewBox:"0 0 24 24"},o("g",{fill:"currentColor"},o("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1z"}),o("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 zo(e){return o(Xn,{...e,className:J(e.className,"vc-open-external-icon"),viewBox:"0 0 24 24"},o("polygon",{fill:"currentColor","fill-rule":"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 jo(e){return o(Xn,{...e,className:J(e.className,"vc-image-icon"),viewBox:"0 0 24 24"},o("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 yy(e){return o(Xn,{...e,className:J(e.className,"vc-info-icon"),viewBox:"0 0 12 12"},o("path",{fill:"currentColor",d:"M6 1C3.243 1 1 3.244 1 6c0 2.758 2.243 5 5 5s5-2.242 5-5c0-2.756-2.243-5-5-5zm0 2.376a.625.625 0 110 1.25.625.625 0 010-1.25zM7.5 8.5h-3v-1h1V6H5V5h1a.5.5 0 01.5.5v2h1v1z"}))}function vy(e){return o(Xn,{"aria-label":it.Messages.GUILD_OWNER,...e,className:J(e.className,"vc-owner-crown-icon"),role:"img",viewBox:"0 0 16 16"},o("path",{fill:"currentColor","fill-rule":"evenodd","clip-rule":"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 Sy(e){return o(Xn,{...e,className:J(e.className,"vc-screenshare-icon"),viewBox:"0 0 24 24"},o("path",{fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd",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 Zs(e){return o(Xn,{...e,className:J(e.className,"vc-image-visible"),viewBox:"0 0 24 24"},o("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 Xs(e){return o(Xn,{...e,className:J(e.className,"vc-image-invisible"),viewBox:"0 0 24 24"},o("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"}))}var _n=m(()=>{"use strict";a();gy();fe();T()});var by,Ty,xy=m(()=>{"use strict";a();O();by=ae("ApplicationStreamPreviewStore"),Ty=ae("ApplicationStreamingStore")});var n2,My,wy,Py,uu,Iy=m(()=>{"use strict";a();Pt();_n();w();tt();b();T();xy();n2=async({guildId:e,channelId:t,ownerId:n})=>{let r=await by.getPreviewURL(e,t,n);!r||Fo(r)},My=(e,{userId:t})=>()=>{let n=Ty.getAnyStreamForUser(t);if(!n)return;let r=o(L.MenuItem,{label:"View Stream Preview",id:"view-stream-preview",icon:Sy,action:()=>n&&n2(n),disabled:!n});e.push(o(L.MenuSeparator,null),r)},wy=(e,{stream:t})=>My(e,{userId:t.ownerId}),Py=(e,{user:t})=>My(e,{userId:t.id}),uu=g({name:"BiggerStreamPreview",description:"This plugin allows you to enlarge stream previews",authors:[p.phil],start:()=>{pe("user-context",Py),pe("stream-context",wy)},stop:()=>{de("user-context",Py),de("stream-context",wy)}})});function Cy(){pi.textContent=`
.vc-nsfw-img [class^=imageWrapper] img,
.vc-nsfw-img [class^=wrapperPaused] video {
filter: blur(${M.plugins.BlurNSFW.blurAmount}px);
transition: filter 0.2s;
}
.vc-nsfw-img [class^=imageWrapper]:hover img,
.vc-nsfw-img [class^=wrapperPaused]:hover video {
filter: unset;
}
`}var pi,pu,Ny=m(()=>{"use strict";a();D();w();b();pu=g({name:"BlurNSFW",description:"Blur attachments in NSFW channels until hovered",authors:[p.Ven],patches:[{find:".embedWrapper,embed",replacement:[{match:/(\.renderEmbed=.+?(.)=.\.props)(.+?\.embedWrapper)/g,replace:"$1,vcProps=$2$3+(vcProps.channel.nsfw?' vc-nsfw-img':'')"},{match:/(\.renderAttachments=.+?(.)=this\.props)(.+?\.embedWrapper)/g,replace:"$1,vcProps=$2$3+(vcProps.channel.nsfw?' vc-nsfw-img':'')"}]}],options:{blurAmount:{type:1,description:"Blur Amount",default:10,onChange:Cy}},start(){pi=document.createElement("style"),pi.id="VcBlurNsfw",document.head.appendChild(pi),Cy()},stop(){pi?.remove()}})});function o2(e){let t=M.plugins.CallTimer.format==="human",n=f=>t?f:f.toString().padStart(2,"0"),r=f=>t?f:"",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),h="";return s&&(h+=`${s}d `),(l||h)&&(h+=`${n(l)}${r("h")}${i}`),(c||h||!t)&&(h+=`${n(c)}${r("m")}${i}`),h+=`${n(u)}${r("s")}`,h}var du,ky=m(()=>{"use strict";a();D();ie();w();b();T();du=g({name:"CallTimer",description:"Adds a timer to vcs",authors:[p.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:)\w/,replace:"[$&, $self.renderTimer(this.props.channel.id)]"}}],renderTimer(e){return o(A,{noop:!0},o(this.Timer,{channelId:e}))},Timer({channelId:e}){let[t,n]=I.useState(0),r=I.useMemo(()=>Date.now(),[e]);return I.useEffect(()=>{let i=setInterval(()=>n(Date.now()-r),1e3);return()=>{clearInterval(i),n(0)}},[e]),o("p",{style:{margin:0}},"Connected for ",o2(t))}})});var Su={};ge(Su,{_handleClick:()=>s2,_handlePreEdit:()=>i2,_handlePreSend:()=>r2,addClickListener:()=>yu,addPreEditListener:()=>Jn,addPreSendListener:()=>lt,removeClickListener:()=>vu,removePreEditListener:()=>Qn,removePreSendListener:()=>ct});async function r2(e,t,n,r){n.replyOptions=r;for(let i of fu)try{let s=await i(e,t,n);if(s&&s.cancel===!0)return!0}catch(s){mu.error(`MessageSendHandler: Listener encountered an unknown error
`,s)}return!1}async function i2(e,t,n){for(let r of gu)try{await r(e,t,n)}catch(i){mu.error(`MessageEditHandler: Listener encountered an unknown error
`,i)}}function lt(e){return fu.add(e),e}function Jn(e){return gu.add(e),e}function ct(e){return fu.delete(e)}function Qn(e){return gu.delete(e)}function s2(e,t,n){e=un.getMessage(t.id,e.id)??e;for(let r of hu)try{r(e,t,n)}catch(i){mu.error(`MessageClickHandler: Listener encountered an unknown error
`,i)}}function yu(e){return hu.add(e),e}function vu(e){return hu.delete(e)}var mu,fu,gu,hu,Sn=m(()=>{"use strict";a();be();T();mu=new Y("MessageEvents","#e5c890"),fu=new Set,gu=new Set;hu=new Set});var Ry,Ay=m(()=>{"use strict";a();Ry=["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","tt_medium","tt_content","lr@yandex.*","redircnt@yandex.*","feature@youtube.com","kw@youtube.com","wt_zmc","utm_source","utm_content","utm_medium","utm_campaign","utm_term","si@open.spotify.com","igshid"]});var Ly,a2,bu,Ey=m(()=>{"use strict";a();Sn();w();b();Ay();Ly=/[\\^$.*+?()[\]{}|]/g,a2=RegExp(Ly.source),bu=g({name:"ClearURLs",description:"Removes tracking garbage from URLs",authors:[p.adryd],dependencies:["MessageEventsAPI"],escapeRegExp(e){return e&&a2.test(e)?e.replace(Ly,"\\$&"):e||""},createRules(){let e=Ry;this.universalRules=new Set,this.rulesByHost=new Map,this.hostRules=new Map;for(let t of e){let n=t.split("@"),r=new RegExp("^"+this.escapeRegExp(n[0]).replace(/\\\*/,".+?")+"$");if(!n[1]){this.universalRules.add(r);continue}let i=new RegExp("^(www\\.)?"+this.escapeRegExp(n[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,n){(t===e||e instanceof RegExp&&e.test(t))&&n.delete(t)},replacer(e){try{var t=new URL(e)}catch{return e}return t.searchParams.entries().next().done?e:(this.universalRules.forEach(n=>{t.searchParams.forEach((r,i,s)=>{this.removeParam(n,i,s)})}),this.hostRules.forEach((n,r)=>{!n.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=lt((e,t)=>this.onSend(t)),this.preEdit=Jn((e,t,n)=>this.onSend(n))},stop(){ct(this.preSend),Qn(this.preEdit)}})});var Tu,Dy=m(()=>{"use strict";a();w();b();Tu=g({name:"ColorSighted",description:"Removes the colorblind-friendly icons from statuses, just like 2015-2017 Discord",authors:[p.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.status/,replace:(e,t)=>`${t}"online"`}}]})});var l2,xu,Oy=m(()=>{"use strict";a();w();ri();Wr();b();O();O();T();l2=e=>()=>{throw new Error(`'${e}' is Discord Desktop only.`)},xu=g({name:"ConsoleShortcuts",description:"Adds shorter Aliases for many things on the window. Run `shortcutList` for a list.",authors:[p.Ven],getShortcuts(){function e(n){let r=new Map;return function(...i){let s=String(i);if(r.has(s))return r.get(s);let l=or(n(...i)),c=(()=>{switch(l.length){case 0:return null;case 1:return l[0];default:let u=[...new Set(l)];return u.length>1&&console.warn(`Warning: This filter matches ${l.length} modules. Make it more specific!
`,u),l[0]}})();return c&&s&&r.set(s,c),c}}let t;return{wp:Vencord.Webpack,wpc:Gt.c,wreq:Gt,wpsearch:hl,wpex:yl,wpexs:n=>Vencord.Webpack.extract(Vencord.Webpack.findModuleId(n)),find:e(n=>n),findAll:or,findByProps:e(K.byProps),findAllByProps:(...n)=>or(K.byProps(...n)),findByCode:e(K.byCode),findAllByCode:n=>or(K.byCode(n)),findStore:e(K.byStoreName),PluginsApi:Vencord.Plugins,plugins:Vencord.Plugins.plugins,React:I,Settings:Vencord.Settings,Api:Vencord.Api,reload:()=>location.reload(),restart:l2("restart"),canonicalizeMatch:Uo,canonicalizeReplace:Ts,canonicalizeReplacement:jr,fakeRender:(n,r)=>{let i=t?.deref(),s=i?.closed===!1?i:window.open("about:blank","Fake Render","popup,width=500,height=500");t=new WeakRef(s),s.focus(),_o.render(I.createElement(n,r),s.document.body)}}},start(){let e=this.getShortcuts();window.shortcutList=e;for(let[t,n]of Object.entries(e))window[t]=n},stop(){delete window.shortcutList;for(let e in this.getShortcuts())delete window[e]}})});var To,wu,Pu,Js,Mu,Iu,_y=m(()=>{"use strict";a();uo();D();w();be();Ze();b();dr();T();To=new Y("CrashHandler"),wu=k({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}}),Pu=0,Js=0,Mu=!1,Iu=g({name:"CrashHandler",description:"Utility plugin for handling and possibly recovering from Crashes without a restart",authors:[p.Nuckyz],enabledByDefault:!0,popAllModals:void 0,settings:wu,patches:[{find:".Messages.ERRORS_UNEXPECTED_CRASH",replacement:{match:/(?=this\.setState\()/,replace:"$self.handleCrash(this)||"}},{find:'dispatch({type:"MODAL_POP_ALL"})',replacement:{match:/"MODAL_POP_ALL".+?};(?<=(\i)=function.+?)/,replace:(e,t)=>`${e}$self.popAllModals=${t};`}}],handleCrash(e){if(Date.now()-Js<=1e3&&!Mu)return!0;if(Mu=!1,++Pu>5){try{he({color:"#eed202",title:"Discord has crashed!",body:"Awn :( Discord has crashed more than five times, not attempting to recover.",noPersist:!0})}catch{}return Js=Date.now(),!1}setTimeout(()=>Pu--,6e4);try{return Pu===1&&ii("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),wu.store.attemptToPreventCrashes?(this.handlePreventCrash(e),!0):!1}catch(t){return To.error("Failed to handle crash",t),!1}finally{Js=Date.now()}},handlePreventCrash(e){if(Date.now()-Js>=1e3)try{he({color:"#eed202",title:"Discord has crashed!",body:"Attempting to recover...",noPersist:!0})}catch{}try{E.dispatch({type:"CONTEXT_MENU_CLOSE"})}catch(t){To.debug("Failed to close open context menu.",t)}try{this.popAllModals?.()}catch(t){To.debug("Failed to close old modals.",t)}try{kl()}catch(t){To.debug("Failed to close all open modals.",t)}try{E.dispatch({type:"USER_PROFILE_MODAL_CLOSE"})}catch(t){To.debug("Failed to close user popout.",t)}try{E.dispatch({type:"LAYER_POP_ALL"})}catch(t){To.debug("Failed to pop all layers.",t)}if(wu.store.attemptToNavigateToHome)try{Gr.transitionTo("/channels/@me")}catch(t){To.debug("Failed to navigate to home",t)}try{Mu=!0,e.forceUpdate()}catch(t){To.debug("Failed to update crash handler component.",t)}}})});async function By(e){return(await d2.getAsset(Vs.store.appID,[e,void 0]))[0]}async function $y(){let{appID:e,appName:t,details:n,state:r,type:i,startTime:s,endTime:l,imageBig:c,imageBigTooltip:u,imageSmall:h,imageSmallTooltip:f,buttonOneText:y,buttonOneURL:S,buttonTwoText:x,buttonTwoURL:R}=Vs.store;if(!t)return;let C={application_id:e||"0",name:t,state:r,details:n,type:i,flags:1<<0};s&&(C.timestamps={start:s},l&&(C.timestamps.end=l)),y&&(C.buttons=[y,x].filter(vs),C.metadata={button_urls:[S,R].filter(vs)}),c&&(C.assets={large_image:await By(c),large_text:u}),h&&(C.assets={...C.assets,small_image:await By(h),small_text:f});for(let _ in C){if(_==="type")continue;let $=C[_];(!$||$.length===0)&&delete C[_]}return C}async function di(e){let t=await $y();E.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e?null:t,socketId:"CustomRPC"})}var c2,u2,p2,d2,Qt,Fy,Qs,m2,Vs,Cu,Uy=m(()=>{"use strict";a();D();bo();w();Ss();ve();b();O();T();c2=ce("onOpenGameProfile"),u2=P("activity","buttonColor"),p2=P("profileColors"),d2=Ke("getAssetImage: size must === [number, number] for Twitch",{getAsset:K.byCode("apply(")});Qt=e=>({type:0,description:e,onChange:di}),Fy=e=>({type:1,description:e,onChange:di}),Qs=(e,t,n)=>({label:e,value:t,default:n}),m2=(e,t)=>({type:4,description:e,onChange:di,options:t}),Vs=k({appID:Qt("The ID of the application for the rich presence."),appName:Qt("The name of the presence."),details:Qt("Line 1 of rich presence."),state:Qt("Line 2 of rich presence."),type:m2("Type of presence",[Qs("Playing",0,!0),Qs("Listening",2),Qs("Watching",3),Qs("Competing",5)]),startTime:Fy("Unix Timestamp for beginning of activity."),endTime:Fy("Unix Timestamp for end of activity."),imageBig:Qt("Sets the big image to the specified image."),imageBigTooltip:Qt("Sets the tooltip text for the big image."),imageSmall:Qt("Sets the small image to the specified image."),imageSmallTooltip:Qt("Sets the tooltip text for the small image."),buttonOneText:Qt("The text for the first button"),buttonOneURL:Qt("The URL for the first button"),buttonTwoText:Qt("The text for the second button"),buttonTwoURL:Qt("The URL for the second button")});Cu=g({name:"CustomRPC",description:"Allows you to set a custom rich presence.",authors:[p.captain],start:di,stop:()=>di(!0),settings:Vs,settingsAboutComponent:()=>{let e=ot($y);return o(d,null,o(v.FormTitle,{tag:"h2"},"NOTE:"),o(v.FormText,null,"You will need to ",o(at,{href:"https://discord.com/developers/applications"},"create an application")," and get its ID to use this plugin."),o(v.FormDivider,null),o("div",{style:{width:"284px"},className:p2.profileColors},e[0]&&o(c2,{activity:e[0],className:u2.activity,channelId:Pe.getChannelId(),guild:ue.getGuild(lo.getLastSelectedGuildId()),application:{id:Vs.store.appID},user:F.getCurrentUser()})))}})});var Nu,Gy=m(()=>{"use strict";a();w();b();Nu=g({name:"DisableDMCallIdle",description:"Disables automatically getting kicked from a DM voice call after 5 minutes.",authors:[p.Nuckyz],patches:[{find:".Messages.BOT_CALL_IDLE_DISCONNECT",replacement:{match:/(?<=function \i\(\){)(?=.{1,100}\.Messages\.BOT_CALL_IDLE_DISCONNECT)/,replace:"return;"}}]})});function ku(e){return e.t==="Emoji"?`${location.protocol}//${window.GLOBAL_ENV.CDN_HOST}/emojis/${e.id}.${e.isAnimated?"gif":"png"}`:`${location.origin}/stickers/${e.id}.${h2[e.format_type]}`}async function Wy(e){let t=f2.getStickerById(e);if(t)return t;let{body:n}=await Dt.get({url:`/stickers/${e}`});return E.dispatch({type:"STICKER_FETCH_SUCCESS",sticker:n}),n}async function y2(e,t){let n=new FormData;n.append("name",t.name),n.append("tags",t.tags),n.append("description",t.description),n.append("file",await qy(ku(t)));let{body:r}=await Dt.post({url:`/guilds/${e}/stickers`,body:n});E.dispatch({type:"GUILD_STICKERS_CREATE_SUCCESS",guildId:e,sticker:{...r,user:F.getCurrentUser()}})}async function v2(e,t){let n=await qy(ku(t)),r=await new Promise(i=>{let s=new FileReader;s.onload=()=>i(s.result),s.readAsDataURL(n)});return g2({guildId:e,name:t.name.split("~")[0],image:r})}function S2(e){let t=F.getCurrentUser().id;return Object.values(ue.getGuilds()).filter(n=>{if(!(n.ownerId===t||BigInt(je.getGuildPermissions({id:n.id})&Hy)===Hy))return!1;if(e.t==="Sticker")return!0;let{isAnimated:i}=e,s=n.getMaxEmojiSlots(),{emojis:l}=pn.getGuilds()[n.id],c=0;for(let u of l)u.animated===i&&c++;return c<s}).sort((n,r)=>n.name.localeCompare(r.name))}async function qy(e){let t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch ${e} - ${t.status}`);return t.blob()}async function b2(e,t){try{t.t==="Sticker"?await y2(e,t):await v2(e,t),X.show({message:`Successfully cloned ${t.name} to ${ue.getGuild(e)?.name??"your server"}!`,type:X.Type.SUCCESS,id:X.genId()})}catch(n){new Y("EmoteCloner").error("Failed to clone",t.name,"to",e,n),X.show({message:"Oopsie something went wrong :( Check console!!!",type:X.Type.FAILURE,id:X.genId()})}}function w2({data:e}){let[t,n]=I.useState(!1),[r,i]=I.useState(e.name),[s,l]=I.useReducer(u=>u+1,0),c=I.useMemo(()=>S2(e),[e.id,s]);return o(d,null,o(v.FormTitle,{className:G.top20},"Custom Name"),o(Ks,{value:r,onChange:u=>{e.name=u,i(u)},validate:u=>e.t==="Emoji"&&u.length>2&&u.length<32&&x2.test(u)||e.t==="Sticker"&&u.length>2&&u.length<30||"Name must be between 2 and 32 characters and only contain alphanumeric characters"}),o("div",{style:{display:"flex",flexWrap:"wrap",gap:"1em",padding:"1em 0.5em",justifyContent:"center",alignItems:"center"}},c.map(u=>o(W,{text:u.name},({onMouseLeave:h,onMouseEnter:f})=>o("div",{onMouseLeave:h,onMouseEnter:f,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()=>{n(!0),b2(u.id,e).finally(()=>{l(),n(!1)})}},u.icon?o("img",{"aria-hidden":!0,style:{borderRadius:"50%",width:"100%",height:"100%"},src:u.getIconURL(512,!0),alt:u.name}):o(v.FormText,{style:{fontSize:T2(u.acronym),width:"100%",overflow:"hidden",whiteSpace:"nowrap",textAlign:"center",cursor:t?"not-allowed":"pointer"}},u.acronym))))))}function ea(e,t){return o(L.MenuItem,{id:"emote-cloner",key:"emote-cloner",label:`Clone ${e}`,action:()=>Hr(async()=>{let n=await t(),r={t:e,...n},i=ku(r);return s=>o(Le,{...s},o($e,null,o("img",{role:"presentation","aria-hidden":!0,src:i,alt:"",height:24,width:24,style:{marginRight:"0.5em"}}),o(v.FormText,null,"Clone ",r.name)),o(Ue,null,o(w2,{data:r})))})})}function Ky(e){return new URL(e).pathname.endsWith(".gif")}var Hy,f2,g2,h2,T2,x2,zy,jy,Ru,Yy=m(()=>{"use strict";a();Pt();Xc();w();be();Xe();Ze();b();O();T();Hy=1n<<30n,f2=ae("StickersStore"),g2=ce('"EMOJI_UPLOAD_START"',"GUILD_EMOJIS("),h2=[,"png","png","json","gif"];T2=e=>[20,20,18,18,16,14,12][e.length]??4,x2=/^\w+$/i;zy=(e,t)=>()=>{let{favoriteableId:n,itemHref:r,itemSrc:i,favoriteableType:s}=t??{};if(!n)return;let l=(()=>{switch(s){case"emoji":let c=t.message.content.match(RegExp(`<a?:(\\w+)(?:~\\d+)?:${n}>|https://cdn\\.discordapp\\.com/emojis/${n}\\.`));if(!c)return;let u=c[1]??"FakeNitroEmoji";return ea("Emoji",()=>({id:n,name:u,isAnimated:Ky(r??i)}));case"sticker":return t.message.stickerItems.find(f=>f.id===n)?.format_type===3?void 0:ea("Sticker",()=>Wy(n))}})();l&&nt("copy-link",e)?.push(l)},jy=(e,t)=>()=>{let{id:n,name:r,type:i}=t?.target?.dataset??{};if(!!n)if(i==="emoji"&&r){let s=t.target.firstChild;e.push(ea("Emoji",()=>({id:n,name:r,isAnimated:s&&Ky(s.src)})))}else i==="sticker"&&!t.target.className?.includes("lottieCanvas")&&e.push(ea("Sticker",()=>Wy(n)))},Ru=g({name:"EmoteCloner",description:"Allows you to clone Emotes & Stickers to your own server (right click them)",tags:["StickerCloner"],authors:[p.Ven,p.Nuckyz],start(){pe("message",zy),pe("expression-picker",jy)},stop(){de("message",zy),de("expression-picker",jy)}})});var Au,Lu,Eu,Zy=m(()=>{"use strict";a();D();ie();Yr();w();Xe();b();O();T();Au=P("key","removeBuildOverride"),Lu=k({enableIsStaff:{description:"Enable isStaff",type:3,default:!1,restartNeeded:!0},forceStagingBanner:{description:"Whether to force Staging banner under user area.",type:3,default:!1,restartNeeded:!0}}),Eu=g({name:"Experiments",description:"Enable Access to Experiments in Discord!",authors:[p.Megu,p.Ven,p.Nickyux,p.BanTheNons,p.Nuckyz],settings:Lu,patches:[{find:"Object.defineProperties(this,{isDeveloper",replacement:{match:/(?<={isDeveloper:\{[^}]+?,get:function\(\)\{return )\w/,replace:"true"}},{find:'type:"user",revision',replacement:{match:/!(\i)&&"CONNECTION_OPEN".+?;/g,replace:"$1=!0;"}},{find:".isStaff=function(){",predicate:()=>Lu.store.enableIsStaff,replacement:[{match:/return\s*?(\i)\.hasFlag\((\i\.\i)\.STAFF\)}/,replace:(e,t,n)=>`return Vencord.Webpack.Common.UserStore.getCurrentUser().id===${t}.id||${t}.hasFlag(${n}.STAFF)}`},{match:/hasFreePremium=function\(\){return this.isStaff\(\)\s*?\|\|/,replace:"hasFreePremium=function(){return "}]},{find:".Messages.DEV_NOTICE_STAGING",predicate:()=>Lu.store.forceStagingBanner,replacement:{match:/"staging"===window\.GLOBAL_ENV\.RELEASE_CHANNEL/,replace:"true"}},{find:'H1,title:"Experiments"',replacement:{match:'title:"Experiments",children:[',replace:"$&$self.WarningCard(),"}}],settingsAboutComponent:()=>{let e=navigator.platform.includes("Mac"),t=e?"cmd":"ctrl",n=e?"opt":"alt";return o(I.Fragment,null,o(v.FormTitle,{tag:"h3"},"More Information"),o(v.FormText,{variant:"text-md/normal"},"You can enable client DevTools"," ",o("kbd",{className:Au.key},t)," +"," ",o("kbd",{className:Au.key},n)," +"," ",o("kbd",{className:Au.key},"O")," ","after enabling ",o("code",null,"isStaff")," below"),o(v.FormText,null,"and then toggling ",o("code",null,"Enable DevTools")," in the ",o("code",null,"Developer Options")," tab in settings."))},WarningCard:A.wrap(()=>o(qn,{id:"vc-experiments-warning-card",className:G.bottom16},o(v.FormTitle,{tag:"h2"},"Hold on!!"),o(v.FormText,null,"Experiments are unreleased Discord features. They might not work, or even break your client or get your account disabled."),o(v.FormText,{className:G.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 Du,Xy=m(()=>{"use strict";a();w();b();Du=g({name:"F8Break",description:"Pause the client when you press F8 with DevTools (+ breakpoints) open.",authors:[p.lewisakura],start(){window.addEventListener("keydown",this.event)},stop(){window.removeEventListener("keydown",this.event)},event(e){if(e.code==="F8")debugger}})});var ta,Jy,P2,Qy,Vy,ev,mi=m(()=>{"use strict";a();sn();ta=$n(()=>import("https://unpkg.com/gifenc@1.0.3/dist/gifenc.esm.js")),Jy=$n(async()=>{let e={},t=new Proxy(window,{set:(n,r,i)=>e[r]=i});return Function("self",await fetch("https://cdnjs.cloudflare.com/ajax/libs/apng-canvas/2.1.1/apng-canvas.min.js").then(n=>n.text()))(t),e.APNG}),P2="https://unpkg.com/@vap/shiki-worker@0.0.8/dist",Qy=`${P2}/index.min.js`,Vy="https://unpkg.com/@vap/shiki@0.10.3/dist/onig.wasm",ev=$n(()=>import("https://unpkg.com/stegcloak-dist@1.0.0/index.js"))});function nv(e,t){if(!t)return;let n=t.fields.find(i=>i.localName===e);return n?Object.values(n).find(i=>typeof i=="function")?.():void 0}var M2,I2,fi,Bu,tv,Wo,qo,na,C2,N2,Ou,_u,oa,Me,Fu,ov=m(()=>{"use strict";a();Sn();D();w();mi();tt();sn();be();b();O();T();M2=0,I2=ce("UPLOAD_FILE_LIMIT_ERROR"),fi=ae("UserSettingsProtoStore"),Bu=ke(e=>e.ProtoClass?.typeName==="discord_protos.discord_users.v1.PreloadedUserSettings"),tv=P("readerFactory"),Wo=ae("StickersStore");qo=dt(()=>nv("appearance",Bu.ProtoClass)),na=dt(()=>nv("clientThemeSettings",qo)),C2=1n<<18n,N2=1n<<37n,Ou=/\/emojis\/(\d+?)\.(png|webp|gif)/,_u=/\/stickers\/(\d+?)\./,oa=/\/attachments\/\d+?\/\d+?\/(\d+?)\.gif/,Me=k({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}}),Fu=g({name:"FakeNitro",authors:[p.Arjix,p.D3SOX,p.Ven,p.obscurity,p.captain,p.Nuckyz,p.AutumnVN],description:"Allows you to stream in nitro quality, send fake emojis/stickers and use client themes.",dependencies:["MessageEventsAPI"],settings:Me,patches:[{find:".PREMIUM_LOCKED;",predicate:()=>Me.store.enableEmojiBypass,replacement:[{match:/(?<=(\i)=\i\.intention)/,replace:(e,t)=>`,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,n)=>`${t}(!${n}&&(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:()=>Me.store.enableEmojiBypass,replacement:{match:/((?:canUseEmojisEverywhere|canUseAnimatedEmojis):function\(\i)\){(.+?\))/g,replace:(e,t,n)=>`${t},fakeNitroIntention){${n}||fakeNitroIntention==null||[${3},${4}].includes(fakeNitroIntention)`}},{find:"canUseStickersEverywhere:function",predicate:()=>Me.store.enableStickerBypass,replacement:{match:/canUseStickersEverywhere:function\(\i\){/,replace:"$&return true;"}},{find:'"SENDABLE"',predicate:()=>Me.store.enableStickerBypass,replacement:{match:/(\w+)\.available\?/,replace:"true?"}},{find:"canStreamHighQuality:function",predicate:()=>Me.store.enableStreamQualityBypass,replacement:["canUseHighVideoUploadQuality","canStreamHighQuality","canStreamMidQuality"].map(e=>({match:new RegExp(`${e}:function\\(\\i\\){`),replace:"$&return true;"}))},{find:"STREAM_FPS_OPTION.format",predicate:()=>Me.store.enableStreamQualityBypass,replacement:{match:/(userPremiumType|guildPremiumTier):.{0,10}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:/=(\i)\.local;/,replace:(e,t)=>`${e}${t}.local||$self.handleProtoChange(${t}.settings.proto);`}]},{find:"updateTheme:function",replacement:{match:/(function \i\(\i\){var (\i)=\i\.backgroundGradientPresetId.+?)(\i\.\i\.updateAsync.+?theme=(.+?);.+?\),\i\))/,replace:(e,t,n,r,i)=>`${t}$self.handleGradientThemeSelect(${n},${i},()=>${r});`}},{find:'["strong","em","u","text","inlineCode","s","spoiler"]',replacement:[{predicate:()=>Me.store.transformEmojis,match:/1!==(\i)\.length\|\|1!==\i\.length/,replace:(e,t)=>`${e}||$self.shouldKeepEmojiLink(${t}[0])`},{predicate:()=>Me.store.transformEmojis||Me.store.transformStickers,match:/(?=return{hasSpoilerEmbeds:\i,content:(\i)})/,replace:(e,t)=>`${t}=$self.patchFakeNitroEmojisOrRemoveStickersLinks(${t},arguments[2]?.formatInline);`}]},{find:"renderEmbeds=function",replacement:[{predicate:()=>Me.store.transformEmojis||Me.store.transformStickers,match:/(renderEmbeds=function\((\i)\){)(.+?embeds\.map\(\(function\((\i)\){)/,replace:(e,t,n,r,i)=>`${t}const fakeNitroMessage=${n};${r}if($self.shouldIgnoreEmbed(${i},fakeNitroMessage))return null;`},{predicate:()=>Me.store.transformStickers,match:/renderStickersAccessories=function\((\i)\){var (\i)=\(0,\i\.\i\)\(\i\),/,replace:(e,t,n)=>`${e}${n}=$self.patchFakeNitroStickers(${n},${t}),`},{predicate:()=>Me.store.transformStickers,match:/renderAttachments=function\(\i\){var (\i)=\i.attachments.+?;/,replace:(e,t)=>`${e}${t}=$self.filterAttachments(${t});`}]},{find:".STICKER_IN_MESSAGE_HOVER,",predicate:()=>Me.store.transformStickers,replacement:[{match:/var (\i)=\i\.renderableSticker,.{0,50}closePopout.+?channel:\i,closePopout:\i,/,replace:(e,t)=>`${e}renderableSticker:${t},`},{match:/(emojiSection.{0,50}description:)(\i)(?<=(\i)\.sticker,.+?)(?=,)/,replace:(e,t,n,r)=>`${t}$self.addFakeNotice("STICKER",${n},!!${r}.renderableSticker?.fake)`}]},{find:".Messages.EMOJI_POPOUT_PREMIUM_JOINED_GUILD_DESCRIPTION",predicate:()=>Me.store.transformEmojis,replacement:{match:/((\i)=\i\.node,\i=\i\.emojiSourceDiscoverableGuild)(.+?return )(.{0,450}Messages\.EMOJI_POPOUT_PREMIUM_JOINED_GUILD_DESCRIPTION.+?}\))/,replace:(e,t,n,r,i)=>`${t},fakeNitroNode=${n}${r}$self.addFakeNotice("EMOJI",${i},fakeNitroNode.fake)`}}],get guildId(){return Rl()?.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"||!fi||!e.appearance&&!qo)return;if((t?.premium_type??F?.getCurrentUser()?.premiumType??0)!==2&&(e.appearance??=qo.create(),fi.settings.appearance?.theme!=null&&(e.appearance.theme=fi.settings.appearance.theme),fi.settings.appearance?.clientThemeSettings?.backgroundGradientPresetId?.value!=null&&na)){let r=na.create({backgroundGradientPresetId:{value:fi.settings.appearance.clientThemeSettings.backgroundGradientPresetId.value}});e.appearance.clientThemeSettings??=r,e.appearance.clientThemeSettings.backgroundGradientPresetId=r.backgroundGradientPresetId}},handleGradientThemeSelect(e,t,n){if((F?.getCurrentUser()?.premiumType??0)===2||e==null)return n();if(!qo||!na||!tv)return;let i=Bu.getCurrentValue().appearance,s=i!=null?qo.fromBinary(qo.toBinary(i),tv):qo.create();s.theme=t;let l=na.create({backgroundGradientPresetId:{value:e}});s.clientThemeSettings??=l,s.clientThemeSettings.backgroundGradientPresetId=l.backgroundGradientPresetId;let c=Bu.ProtoClass.create();c.appearance=s,E.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 n=e.length-1,r=e[n];typeof r=="string"&&(e[n]=r.trimEnd()),e[n]===""&&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")&&!Me.store.transformCompoundSentence)return e;let n=e.length,r=c=>{if(Me.store.transformEmojis){let u=c.props.href.match(Ou);if(u){let h=null;try{h=new URL(c.props.href)}catch{}let f=pn.getCustomEmojiById(u[1])?.name??h?.searchParams.get("name")??"FakeNitroEmoji";return Ie.defaultRules.customEmoji.react({jumboable:!t&&e.length===1&&typeof e[0].type!="string",animated:u[2]==="gif",emojiId:u[1],name:f,fake:!0},void 0,{key:String(n++)})}}if(Me.store.transformStickers){if(_u.test(c.props.href))return null;let u=c.props.href.match(oa);if(u&&Wo.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 h=!1;for(let[f,y]of u.props.children.entries()){if(y==null){delete u.props.children[f];continue}this.ensureChildrenIsArray(y),y.props.children.length>0?h=!0:delete u.props.children[f]}if(!h)return null;u.props.children=this.clearEmptyArrayItems(u.props.children)}return u},l=c=>{for(let[u,h]of c.entries())c[u]=s(h);return c=this.clearEmptyArrayItems(c),this.trimContent(c),c};try{return l(window._.cloneDeep(e))}catch(c){return new Y("FakeNitro").error(c),e}},patchFakeNitroStickers(e,t){let n=[],r=t.content.split(/\s/);Me.store.transformCompoundSentence?n.push(...r):r.length===1&&n.push(r[0]),n.push(...t.attachments.filter(i=>i.content_type==="image/gif").map(i=>i.url));for(let i of n){if(!Me.store.transformCompoundSentence&&!i.startsWith("http"))continue;let s=i.match(_u);if(s){let c=null;try{c=new URL(i)}catch{}let u=Wo.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(oa);if(l){if(!Wo.getStickerById(l[1]))continue;let c=Wo.getStickerById(l[1])?.name??"FakeNitroSticker";e.push({format_type:2,id:l[1],name:c,fake:!0})}}return e},shouldIgnoreEmbed(e,t){let n=t.content.split(/\s/);if(n.length>1&&!Me.store.transformCompoundSentence)return!1;switch(e.type){case"image":{if(!Me.store.transformCompoundSentence&&!n.includes(e.url)&&!n.includes(e.image.proxyURL))return!1;if(Me.store.transformEmojis&&Ou.test(e.url))return!0;if(Me.store.transformStickers){if(_u.test(e.url))return!0;let r=e.url.match(oa);if(r&&Wo.getStickerById(r[1]))return!0}break}}return!1},filterAttachments(e){return e.filter(t=>{if(t.content_type!=="image/gif")return!0;let n=t.url.match(oa);return!(n&&Wo.getStickerById(n[1]))})},shouldKeepEmojiLink(e){return e.target&&Ou.test(e.target)},addFakeNotice(e,t,n){if(!n)return t;switch(t=Array.isArray(t)?t:[t],e){case"STICKER":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"EMOJI":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=Z.getChannel(e);return!t||t.isDM()||t.isGroupDM()||t.isMultiUserDM()?!0:je.can(C2,t)},hasPermissionToUseExternalStickers(e){let t=Z.getChannel(e);return!t||t.isDM()||t.isGroupDM()||t.isMultiUserDM()?!0:je.can(N2,t)},getStickerLink(e){return`https://media.discordapp.net/stickers/${e}.png?size=${M.plugins.FakeNitro.stickerSize}`},async sendAnimatedSticker(e,t,n){let[{parseURL:r},{GIFEncoder:i,quantize:s,applyPalette:l}]=await Promise.all([Jy(),ta()]),{frames:c,width:u,height:h}=await r(e),f=new i,y=M.plugins.FakeNitro.stickerSize,S=document.createElement("canvas");S.width=y,S.height=y;let x=S.getContext("2d",{willReadFrequently:!0}),R=y/Math.max(u,h);x.scale(R,R);let C;for(let $ of c){let{left:B,top:q,width:ee,height:j,img:z,delay:te,blendOp:U,disposeOp:Ne}=$;C=x.getImageData(B,q,ee,j),U===0&&x.clearRect(B,q,ee,j),x.drawImage(z,B,q,ee,j);let{data:ne}=x.getImageData(0,0,y,y),Be=s(ne,256),De=l(ne,Be);f.writeFrame(De,y,y,{transparent:!0,palette:Be,delay:te}),Ne===1?x.clearRect(B,q,ee,j):Ne===2&&x.putImageData(C,B,q)}f.finish();let _=new File([f.bytesView()],`${t}.gif`,{type:"image/gif"});I2([_],Z.getChannel(n),M2)},start(){let e=Me.store;if(!e.enableEmojiBypass&&!e.enableStickerBypass)return;function t(n,r){return!n[r]||/\s/.test(n[r])?"":" "}this.preSend=lt((n,r,i)=>{let{guildId:s}=this;e:{if(!e.enableStickerBypass)break e;let l=Wo.getStickerById(i.stickers?.[0]);if(!l||"pack_id"in l)break e;let c=this.canUseStickers&&this.hasPermissionToUseExternalStickers(n);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,n),{cancel:!0};i.stickers.length=0,r.content+=` ${u}&name=${encodeURIComponent(l.name)}`}if(e.enableEmojiBypass){let l=this.canUseEmotes&&this.hasPermissionToUseExternalEmojis(n);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}>`,h=c.url.replace(/\?size=\d+/,"?"+new URLSearchParams({size:M.plugins.FakeNitro.emojiSize,name:encodeURIComponent(c.name)}));r.content=r.content.replace(u,(f,y,S)=>`${t(S,y-1)}${h}${t(S,y+f.length)}`)}}return{cancel:!1}}),this.preEdit=Jn((n,r,i)=>{if(!e.enableEmojiBypass)return;let s=this.canUseEmotes&&this.hasPermissionToUseExternalEmojis(n),{guildId:l}=this;i.content=i.content.replace(/(?<!\\)<a?:(?:\w+):(\d+)>/ig,(c,u,h,f)=>{let y=pn.getCustomEmojiById(u);if(y==null||!y.require_colons||y.available!==!1&&s||y.guildId===l&&!y.animated)return c;let S=y.url.replace(/\?size=\d+/,"?"+new URLSearchParams({size:M.plugins.FakeNitro.emojiSize,name:encodeURIComponent(y.name)}));return`${t(f,h-1)}${S}${t(f,h+c.length)}`})})},stop(){ct(this.preSend),Qn(this.preEdit)}})});function rv(...e){let t={};function n(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](n(l[0]),...l)};return new Proxy(t,r)}var iv,sv=m(()=>{"use strict";a();iv=rv;typeof module<"u"&&(module.exports=rv)});function k2(e,t){let n=`[#${e.toString(16).padStart(6,"0")},#${t.toString(16).padStart(6,"0")}]`,r="",i=Array.from(n).map(s=>s.codePointAt(0)).filter(s=>s>=32&&s<=127).map(s=>String.fromCodePoint(s+917504)).join("");return(r||"")+" "+i}function R2(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 n=[...t[0]].map(i=>String.fromCodePoint(i.codePointAt(0)-917504)).join("");return n.substring(1,n.length-1).split(",").map(i=>parseInt(i.replace("#","0x"),16))}else return null}var av,$u,lv=m(()=>{"use strict";a();D();ie();w();Xe();fe();b();T();sv();av=k({nitroFirst:{description:"Default color source if both are present",type:4,options:[{label:"Nitro colors",value:!0,default:!0},{label:"Fake colors",value:!1}]}}),$u=g({name:"FakeProfileThemes",description:"Allows profile theming by hiding the colors in your bio thanks to invisible 3y3 encoding",authors:[p.Alyxia,p.Remty],patches:[{find:"getUserProfile=",replacement:{match:/(?<=getUserProfile=function\(\i\){return )(\i\[\i\])/,replace:"$self.colorDecodeHook($1)"}},{find:".USER_SETTINGS_PROFILE_THEME_ACCENT",replacement:{match:/RESET_PROFILE_THEME}\)(?<=},color:(\i).+?},color:(\i).+?)/,replace:"$&,$self.addCopy3y3Button({primary:$1,accent:$2})"}}],settingsAboutComponent:()=>o(v.FormSection,null,o(v.FormTitle,{tag:"h3"},"Usage"),o(v.FormText,null,"After enabling this plugin, you will see custom colors in the profiles of other people using compatible plugins. ",o("br",null),"To set your own colors:",o("ul",null,o("li",null,"\u2022 go to your profile settings"),o("li",null,"\u2022 choose your own colors in the Nitro preview"),o("li",null,'\u2022 click the "Copy 3y3" button'),o("li",null,"\u2022 paste the invisible text anywhere in your bio")),o("br",null),o("b",null,"Please note:")," if you are using a theme which hides nitro ads, you should disable it temporarily to set colors.")),settings:av,colorDecodeHook(e){if(e){if(av.store.nitroFirst&&e.themeColors)return e;let t=R2(e.bio);if(t)return iv(e,{premiumType:2,themeColors:t})}return e},addCopy3y3Button:A.wrap(function({primary:e,accent:t}){return o(N,{onClick:()=>{let n=k2(e,t);Yt(n)},color:N.Colors.PRIMARY,size:N.Sizes.XLARGE,className:G.left16},"Copy 3y3")},{noop:!0})})});var Uu,cv=m(()=>{"use strict";a();w();b();T();Uu=g({name:"FavoriteEmojiFirst",authors:[p.Aria,p.Ven],description:"Puts your favorite emoji first in the emoji autocomplete.",patches:[{find:".activeCommandOption",replacement:[{match:/=\i\(\i\.selectedIndex\);(?=.+?state:(\i),isInPopoutExperiment:\i)/,replace:"$&$self.sortEmojis($1);"},{match:/,maxCount:(\i)(.+?)=(\i)\.slice\(0,(\1-\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=pn.getDisambiguatedEmojiContext();e.results.emojis=e.results.emojis.sort((n,r)=>{let i=t.isFavoriteEmojiWithoutFetchingLatest(n),s=t.isFavoriteEmojiWithoutFetchingLatest(r);return i&&!s?-1:!i&&s?1:0}).slice(0,e.results.emojis.sliceTo??10)}})});var Gu,uv=m(()=>{"use strict";a();w();b();T();Gu=g({name:"FixInbox",description:"Fixes the Unreads Inbox from crashing Discord when you're in lots of guilds.",authors:[p.Megu],patches:[{find:"INBOX_OPEN:function",replacement:{match:/INBOX_OPEN:function.+?\{/,replace:"$&return true;"}}],settingsAboutComponent(){return o(v.FormSection,null,o(v.FormTitle,{tag:"h3"},"What's the problem?"),o(v.FormText,{style:{marginBottom:8}},"By default, Discord emits a GUILD_SUBSCRIPTIONS event for every guild you're in. When you're in a lot of guilds, this can cause the gateway to ratelimit you. This causes the client to crash and get stuck in an infinite ratelimit loop as it tries to reconnect."),o(v.FormTitle,{tag:"h3"},"How does it work?"),o(v.FormText,null,"This plugin works by stopping the client from sending GUILD_SUBSCRIPTIONS events to the gateway when you open the unreads inbox. This means that not all unreads will be shown, instead only already-subscribed guilds' unreads will be shown, but your client won't crash anymore."))}})});var Hu,pv=m(()=>{"use strict";a();w();b();T();Hu=g({name:"ForceOwnerCrown",description:"Force the owner crown next to usernames even if the server is large.",authors:[p.D3SOX,p.Nickyux],patches:[{find:".renderOwner=",replacement:{match:/isOwner;return null!=(\w+)?&&/g,replace:"isOwner;if($self.isGuildOwner(this.props)){$1=true;}return null!=$1&&"}}],isGuildOwner(e){if(e?.channel?.type===3)return!1;let t=e?.guildId??e?.channel?.guild_id,n=e?.user?.id;if(t&&n){let r=ue.getGuild(t);if(r)return r.ownerId===n;console.error("[ForceOwnerCrown] failed to get guild",{guildId:t,guild:r,props:e})}else console.error("[ForceOwnerCrown] no guildId or userId",{guildId:t,userId:n,props:e});return!1}})});var zu,A2,ju,dv=m(()=>{"use strict";a();_t();w();b();O();T();zu=P("createFriendInvite"),A2=P("v4","v1"),ju=g({name:"FriendInvites",description:"Create and manage friend invite links via slash commands (/create friend invite, /view friend invites, /revoke friend invites).",authors:[p.afn,p.Dziurwa],dependencies:["CommandsAPI"],commands:[{name:"create friend invite",description:"Generates a friend invite link.",inputType:3,execute:async(e,t)=>{if(!F.getCurrentUser().phone)return oe(t.channel.id,{content:"You need to have a phone number connected to your account to create a friend invite!"});let n=A2.v4(),r=await Dt.post({url:"/friend-finder/find-friends",body:{modified_contacts:{[n]:[1,"",""]},phone_contact_methods_count:1}}).then(i=>zu.createFriendInvite({code:i.body.invite_suggestions[0][3],recipient_phone_number_or_email:n,contact_visibility:1,filter_visibilities:[],filtered_invite_suggestions_index:1}));oe(t.channel.id,{content:`
discord.gg/${r.code} \xB7
Expires: <t:${new Date(r.expires_at).getTime()/1e3}:R> \xB7
Max uses: \`${r.max_uses}\`
`.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 zu.getAllFriendInvites()).map(i=>`
_discord.gg/${i.code}_ \xB7
Expires: <t:${new Date(i.expires_at).getTime()/1e3}:R> \xB7
Times used: \`${i.uses}/${i.max_uses}\`
`.trim().replace(/\s+/g," "));oe(t.channel.id,{content:r.join(`
`)||"You have no active friend invites!"})}},{name:"revoke friend invites",description:"Revokes all generated friend invites.",inputType:3,execute:async(e,t)=>(await zu.revokeFriendInvites(),void oe(t.channel.id,{content:"All friend invites have been revoked."}))}]})});var qu={};ge(qu,{getSettingStore:()=>mv,getSettingStoreLazy:()=>Wu});function mv(e,t){if(!M.plugins.SettingsStoreAPI.enabled)throw new Error("Cannot use SettingsStoreAPI without setting as dependency.");return L2?.find(n=>n?.settingsStoreApiGroup===e&&n?.settingsStoreApiName===t)}function Wu(e,t){return dt(()=>mv(e,t))}var L2,Ku=m(()=>{"use strict";a();sn();be();O();D();L2=dt(()=>{let e=os('"textAndImages","renderSpoilers"');if(e==null)return new Y("SettingsStoreAPI").error("Didn't find stores module.");let t=Gt(e);if(t!=null)return Object.values(t).filter(n=>n?.settingsStoreApiGroup)})});var Yu,fv=m(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/gameActivityToggle/style.css",{name:"src/plugins/gameActivityToggle/style.css",source:`[class*="withTagAsButton"] {
min-width: 88px;
}
`,classNames:{},dom:null});Yu="src/plugins/gameActivityToggle/style.css"});function D2(e){return function(){return o("svg",{width:"24",height:"24",viewBox:"0 96 960 960"},o("path",{fill:"currentColor",d:"M182 856q-51 0-79-35.5T82 734l42-300q9-60 53.5-99T282 296h396q60 0 104.5 39t53.5 99l42 300q7 51-21 86.5T778 856q-21 0-39-7.5T706 826l-90-90H344l-90 90q-15 15-33 22.5t-39 7.5Zm498-240q17 0 28.5-11.5T720 576q0-17-11.5-28.5T680 536q-17 0-28.5 11.5T640 576q0 17 11.5 28.5T680 616Zm-80-120q17 0 28.5-11.5T640 456q0-17-11.5-28.5T600 416q-17 0-28.5 11.5T560 456q0 17 11.5 28.5T600 496ZM310 616h60v-70h70v-60h-70v-70h-60v70h-70v60h70v70Z"}),!e&&o("line",{x1:"920",y1:"280",x2:"40",y2:"880",stroke:"var(--status-danger)","stroke-width":"80"}))}}function O2(){let e=gv?.useSetting();return o(E2,{tooltipText:e?"Disable Game Activity":"Enable Game Activity",icon:D2(e),role:"switch","aria-checked":!e,onClick:()=>gv?.updateSetting(t=>!t)})}var gv,E2,Zu,hv=m(()=>{"use strict";a();Ku();Ge();ie();w();b();O();fv();gv=Wu("status","showCurrentGame"),E2=ce("Button.Sizes.NONE,disabled:");Zu=g({name:"GameActivityToggle",description:"Adds a button next to the mic and deafen button to toggle game activity.",authors:[p.Nuckyz],dependencies:["SettingsStoreAPI"],patches:[{find:".Messages.ACCOUNT_SPEAKING_WHILE_MUTED",replacement:{match:/this\.renderNameZone\(\).+?children:\[/,replace:"$&$self.GameActivityToggleButton(),"}}],GameActivityToggleButton:A.wrap(O2,{noop:!0}),start(){Je(Yu)},stop(){Mt(Yu)}})});var _2,Xu,yv=m(()=>{"use strict";a();w();tt();b();O();_2=Ke('name:"expression-picker-last-active-view"',{close:K.byCode("activeView:null","setState")}),Xu=g({name:"GifPaste",description:"Makes picking a gif in the gif picker insert a link into the chatbox instead of instantly sending it",authors:[p.Ven],patches:[{find:".handleSelectGIF=",replacement:{match:/\.handleSelectGIF=function.+?\{/,replace:".handleSelectGIF=function(gif){return $self.handleSelect(gif);"}}],handleSelect(e){e&&(Hn(e.url+" "),_2.close())}})});var Ju={};ge(Ju,{_buildPopoverElements:()=>F2,addButton:()=>bn,buttons:()=>ra,removeButton:()=>Tn});function bn(e,t){ra.set(e,t)}function Tn(e){ra.delete(e)}function F2(e,t){let n=[];for(let[r,i]of ra.entries())try{let s=i(e);s&&(s.key??=r,n.push(t(s)))}catch(s){B2.error(`[${r}]`,s)}return n}var B2,ra,Ko=m(()=>{"use strict";a();be();B2=new Y("MessagePopover"),ra=new Map});var gi,Sv,hi,vv,$2,Qu,bv=m(()=>{"use strict";a();Cn();Ko();_n();w();b();T();Sv="HideAttachments_HiddenIds",hi=new Set,vv=()=>Qe(Sv).then(e=>(hi=e??new Set,hi)),$2=e=>Ve(Sv,e),Qu=g({name:"HideAttachments",description:"Hide attachments and Embeds for individual messages via hover button",authors:[p.Ven],dependencies:["MessagePopoverAPI"],async start(){gi=document.createElement("style"),gi.id="VencordHideAttachments",document.head.appendChild(gi),await vv(),await this.buildCss(),bn("HideAttachments",e=>{if(!e.attachments.length&&!e.embeds.length)return null;let t=hi.has(e.id);return{label:t?"Show Attachments":"Hide Attachments",icon:t?Zs:Xs,message:e,channel:Z.getChannel(e.channel_id),onClick:()=>this.toggleHide(e.id)}})},stop(){gi.remove(),hi.clear(),Tn("HideAttachments")},async buildCss(){let e=[...hi].map(t=>`#message-accessories-${t}`).join(",");gi.textContent=`
:is(${e}) [class*="embedWrapper"] {
/* important is not necessary, but add it to make sure bad themes won't break it */
display: none !important;
}
:is(${e})::after {
content: "Attachments hidden";
color: var(--text-muted);
font-size: 80%;
}
`},async toggleHide(e){let t=await vv();t.delete(e)||t.add(e),await $2(t),await this.buildCss()}})});var Vu,Tv=m(()=>{"use strict";a();w();b();Vu=g({name:"iLoveSpam",description:"Do not hide messages from 'likely spammers'",authors:[p.botato,p.Animal],patches:[{find:"),{hasFlag:",replacement:{match:/(if\((.{1,2})<=1<<30\)return)/,replace:"if($2===(1<<20)){return false};$1"}}]})});function H2(){return o("svg",{className:hr.overlayToggleIconOff,height:"24",width:"24",viewBox:"0 2.2 32 26","aria-hidden":!0,role:"img"},o("g",{fill:"none",fillRule:"evenodd"},o("path",{className:hr.fill,fill:"currentColor",d:"M 16 8 C 7.664063 8 1.25 15.34375 1.25 15.34375 L 0.65625 16 L 1.25 16.65625 C 1.25 16.65625 7.097656 23.324219 14.875 23.9375 C 15.246094 23.984375 15.617188 24 16 24 C 16.382813 24 16.753906 23.984375 17.125 23.9375 C 24.902344 23.324219 30.75 16.65625 30.75 16.65625 L 31.34375 16 L 30.75 15.34375 C 30.75 15.34375 24.335938 8 16 8 Z M 16 10 C 18.203125 10 20.234375 10.601563 22 11.40625 C 22.636719 12.460938 23 13.675781 23 15 C 23 18.613281 20.289063 21.582031 16.78125 21.96875 C 16.761719 21.972656 16.738281 21.964844 16.71875 21.96875 C 16.480469 21.980469 16.242188 22 16 22 C 15.734375 22 15.476563 21.984375 15.21875 21.96875 C 11.710938 21.582031 9 18.613281 9 15 C 9 13.695313 9.351563 12.480469 9.96875 11.4375 L 9.9375 11.4375 C 11.71875 10.617188 13.773438 10 16 10 Z M 16 12 C 14.34375 12 13 13.34375 13 15 C 13 16.65625 14.34375 18 16 18 C 17.65625 18 19 16.65625 19 15 C 19 13.34375 17.65625 12 16 12 Z M 7.25 12.9375 C 7.09375 13.609375 7 14.285156 7 15 C 7 16.753906 7.5 18.394531 8.375 19.78125 C 5.855469 18.324219 4.105469 16.585938 3.53125 16 C 4.011719 15.507813 5.351563 14.203125 7.25 12.9375 Z M 24.75 12.9375 C 26.648438 14.203125 27.988281 15.507813 28.46875 16 C 27.894531 16.585938 26.144531 18.324219 23.625 19.78125 C 24.5 18.394531 25 16.753906 25 15 C 25 14.285156 24.90625 13.601563 24.75 12.9375 Z"}),o("rect",{className:hr.fill,x:"3",y:"26",width:"26",height:"2",transform:"rotate(-45 2 20)"})))}function z2({forceWhite:e}){return o("svg",{className:hr.overlayToggleIconOn,height:"24",width:"24",viewBox:"0 2.2 32 26"},o("path",{className:e?"":hr.fill,fill:e?"var(--white-500)":"",d:"M 16 8 C 7.664063 8 1.25 15.34375 1.25 15.34375 L 0.65625 16 L 1.25 16.65625 C 1.25 16.65625 7.097656 23.324219 14.875 23.9375 C 15.246094 23.984375 15.617188 24 16 24 C 16.382813 24 16.753906 23.984375 17.125 23.9375 C 24.902344 23.324219 30.75 16.65625 30.75 16.65625 L 31.34375 16 L 30.75 15.34375 C 30.75 15.34375 24.335938 8 16 8 Z M 16 10 C 18.203125 10 20.234375 10.601563 22 11.40625 C 22.636719 12.460938 23 13.675781 23 15 C 23 18.613281 20.289063 21.582031 16.78125 21.96875 C 16.761719 21.972656 16.738281 21.964844 16.71875 21.96875 C 16.480469 21.980469 16.242188 22 16 22 C 15.734375 22 15.476563 21.984375 15.21875 21.96875 C 11.710938 21.582031 9 18.613281 9 15 C 9 13.695313 9.351563 12.480469 9.96875 11.4375 L 9.9375 11.4375 C 11.71875 10.617188 13.773438 10 16 10 Z M 16 12 C 14.34375 12 13 13.34375 13 15 C 13 16.65625 14.34375 18 16 18 C 17.65625 18 19 16.65625 19 15 C 19 13.34375 17.65625 12 16 12 Z M 7.25 12.9375 C 7.09375 13.609375 7 14.285156 7 15 C 7 16.753906 7.5 18.394531 8.375 19.78125 C 5.855469 18.324219 4.105469 16.585938 3.53125 16 C 4.011719 15.507813 5.351563 14.203125 7.25 12.9375 Z M 24.75 12.9375 C 26.648438 14.203125 27.988281 15.507813 28.46875 16 C 27.894531 16.585938 26.144531 18.324219 23.625 19.78125 C 24.5 18.394531 25 16.753906 25 15 C 25 14.285156 24.90625 13.601563 24.75 12.9375 Z"}))}function wv({activity:e,forceWhite:t,forceLeftMargin:n}){let r=Lt();return o(W,{text:"Toggle activity"},({onMouseLeave:i,onMouseEnter:s})=>o("div",{onMouseLeave:i,onMouseEnter:s,className:hr.overlayToggleIcon,role:"button","aria-label":"Toggle activity",tabIndex:0,style:n?{marginLeft:"2px"}:void 0,onClick:l=>W2(l,e,r)},Vt.has(e.id)?o(H2,null):o(z2,{forceWhite:t})))}function j2({activity:e}){return o("div",{className:`${U2.tryItOutBadge} ${G2.baseShapeRound}`,style:{padding:"0px 2px",height:28}},o(wv,{activity:e,forceWhite:!0}))}function W2(e,t,n){e.stopPropagation(),Vt.has(t.id)?Vt.delete(t.id):Vt.set(t.id,t),n(),ep()}async function ep(){await Ve("IgnoreActivities_ignoredActivities",Vt)}var hr,U2,G2,xv,Vt,tp,Pv=m(()=>{"use strict";a();Cn();ie();w();ve();b();O();T();hr=P("overlayToggleIconOff","overlayToggleIconOn"),U2=P("tryItOutBadge","tryItOutBadgeIcon"),G2=P("baseShapeRound","baseShapeRoundLeft","baseShapeRoundRight"),xv=ae("RunningGameStore");Vt=new Map,tp=g({name:"IgnoreActivities",authors:[p.Nuckyz],description:"Ignore certain activities (like games and actual activities) from showing up on your status. You can configure which ones are ignored from the Registered Games and Activities tabs.",patches:[{find:".Messages.SETTINGS_GAMES_TOGGLE_OVERLAY",replacement:{match:/!(\i)(\)return null;var \i=(\i)\.overlay.+?children:)(\[.{0,70}overlayStatusText.+?\])(?=}\)}\(\))/,replace:(e,t,n,r,i)=>`false${n}(${t}?${i}:[]).concat(Vencord.Plugins.plugins.IgnoreActivities.renderToggleGameActivityButton(${r}))`}},{find:".overlayBadge",replacement:[{match:/(?<=\(\)\.badgeContainer,children:).{0,50}?name:(\i)\.name.+?null/,replace:(e,t)=>`[${e},$self.renderToggleActivityButton(${t})]`},{match:/(?<=\(\)\.badgeContainer,children:).{0,50}?name:(\i\.application)\.name.+?null/,replace:(e,t)=>`${e},$self.renderToggleActivityButton(${t})`}]},{find:'.displayName="LocalActivityStore"',replacement:{match:/LISTENING.+?\)\);(?<=(\i)\.push.+?)/,replace:(e,t)=>`${e}${t}=${t}.filter($self.isActivityNotIgnored);`}}],async start(){let e=await Qe("IgnoreActivities_ignoredActivities")??new Map;if(Array.isArray(e)){for(let t of e)Vt.set(t,{id:t,type:0});await ep()}else Vt=e;if(Vt.size!==0){let t=xv.getGamesSeen();for(let n of Vt.values())n.type===0&&(t.some(r=>r.id===n.id||r.exePath===n.id)||Vt.delete(n.id));await ep()}},renderToggleGameActivityButton(e){return o(A,{noop:!0},o(wv,{activity:{id:e.id??e.exePath,type:0},forceLeftMargin:!0}))},renderToggleActivityButton(e){return o(A,{noop:!0},o(j2,{activity:{id:e.id,type:1}}))},isActivityNotIgnored(e){if(e.type===0){if(e.application_id!==void 0)return!Vt.has(e.application_id);{let t=xv.getRunningGames().find(n=>n.name===e.name)?.exePath;if(t)return!Vt.has(t)}}return!0}})});var yi,np=m(()=>{"use strict";a();yi="vc-imgzoom-magnify-modal"});function op(e,t){e()?t():requestAnimationFrame(()=>op(e,t))}var Mv=m(()=>{"use strict";a()});var q2,rp,Iv=m(()=>{"use strict";a();Ge();T();np();ip();Mv();q2=Ee("vc-imgzoom-"),rp=({instance:e,size:t,zoom:n})=>{let[r,i]=V(!1),[s,l]=V({x:0,y:0}),[c,u]=V({x:0,y:0}),[h,f]=V(0),y=Xt(!1),S=Xt(n),x=Xt(t),R=Xt(null),C=Xt(null),_=Xt(null),$=Xt(null);if(I.useLayoutEffect(()=>{let q=ne=>{ne.key==="Shift"&&(y.current=!0)},ee=ne=>{ne.key==="Shift"&&(y.current=!1)},j=()=>{C.current.currentTime=_.current.currentTime},z=ne=>{if(e.state.mouseOver&&e.state.mouseDown){let Be=x.current/2,De={x:ne.pageX,y:ne.pageY},ut=-((De.x-R.current.getBoundingClientRect().left)*S.current-Be),We=-((De.y-R.current.getBoundingClientRect().top)*S.current-Be);l({x:ne.x-Be,y:ne.y-Be}),u({x:ut,y:We}),f(1)}else f(0)},te=ne=>{e.state.mouseOver&&ne.button===0&&(S.current=xe.store.zoom,x.current=xe.store.size,document.getElementById("image-context")&&E.dispatch({type:"CONTEXT_MENU_CLOSE"}),z(ne),f(1))},U=()=>{f(0),xe.store.saveZoomValues&&(xe.store.zoom=S.current,xe.store.size=x.current)},Ne=async ne=>{if(e.state.mouseOver&&e.state.mouseDown&&!y.current){let Be=S.current+ne.deltaY/100*(xe.store.invertScroll?-1:1)*xe.store.zoomSpeed;S.current=Be<=1?1:Be,z(ne)}if(e.state.mouseOver&&e.state.mouseDown&&y.current){let Be=x.current+ne.deltaY*(xe.store.invertScroll?-1:1)*xe.store.zoomSpeed;x.current=Be<=50?50:Be,z(ne)}};return op(()=>e.state.readyState==="READY",()=>{let ne=document.getElementById(yi);R.current=ne,ne.firstElementChild.setAttribute("draggable","false"),e.props.animated&&(_.current=ne.querySelector("video"),_.current.addEventListener("timeupdate",j)),i(!0)}),document.addEventListener("keydown",q),document.addEventListener("keyup",ee),document.addEventListener("mousemove",z),document.addEventListener("mousedown",te),document.addEventListener("mouseup",U),document.addEventListener("wheel",Ne),()=>{document.removeEventListener("keydown",q),document.removeEventListener("keyup",ee),document.removeEventListener("mousemove",z),document.removeEventListener("mousedown",te),document.removeEventListener("mouseup",U),document.removeEventListener("wheel",Ne),xe.store.saveZoomValues&&(xe.store.zoom=S.current,xe.store.size=x.current)}},[]),!r)return null;let B=R.current.getBoundingClientRect();return o("div",{className:q2("lens",{"nearest-neighbor":xe.store.nearestNeighbour,square:xe.store.square}),style:{opacity:h,width:x.current+"px",height:x.current+"px",transform:`translate(${s.x}px, ${s.y}px)`}},e.props.animated?o("video",{ref:C,style:{position:"absolute",left:`${c.x}px`,top:`${c.y}px`},width:`${B.width*S.current}px`,height:`${B.height*S.current}px`,poster:e.props.src,src:_.current?.src??e.props.src,autoPlay:!0,loop:!0}):o("img",{ref:$,style:{position:"absolute",transform:`translate(${c.x}px, ${c.y}px)`},width:`${B.width*S.current}px`,height:`${B.height*S.current}px`,src:e.props.src,alt:""}))}});var sp,Cv=m(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/imageZoom/styles.css",{name:"src/plugins/imageZoom/styles.css",source:`.vc-imgzoom-lens {
position: absolute;
inset: 0;
z-index: 9999;
border: 2px solid grey;
border-radius: 50%;
overflow: hidden;
cursor: none;
box-shadow: inset 0 0 10px 2px grey;
filter: drop-shadow(0 0 2px grey);
pointer-events: none;
}
.vc-imgzoom-square {
border-radius: 0;
}
.vc-imgzoom-nearest-neighbor > img {
image-rendering: pixelated; /* https://googlechrome.github.io/samples/image-rendering-pixelated/index.html */
}
/* make the carousel take up less space so we can click the backdrop and exit out of it */
[class|="carouselModal"] {
height: fit-content;
box-shadow: none;
}
[class*="modalCarouselWrapper"] {
height: fit-content;
top: 50%;
transform: translateY(-50%);
}
[class|="wrapper"]:has(> #vc-imgzoom-magnify-modal) {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
`,classNames:{},dom:null});sp="src/plugins/imageZoom/styles.css"});var xe,Nv,ap,ip=m(()=>{"use strict";a();Pt();D();Ge();Hs();w();nr();b();T();Iv();np();Cv();xe=k({saveZoomValues:{type:3,description:"Whether to save zoom and lens size values",default:!0},preventCarouselFromClosingOnClick:{type:3,description:"Allow the image modal in the image slideshow thing / carousel to remain open when clicking on the image",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:mr(1,50,4),default:2,stickToMarkers:!1},size:{description:"Radius / Size of the lens",type:5,markers:mr(50,1e3,50),default:100,stickToMarkers:!1},zoomSpeed:{description:"How fast the zoom / lens size changes",type:5,markers:mr(.1,5,.2),default:.5,stickToMarkers:!1}}),Nv=e=>()=>{e.push(o(L.MenuGroup,{id:"image-zoom"},o(L.MenuCheckboxItem,{id:"vc-square",label:"Square Lens",checked:xe.store.square,action:()=>{xe.store.square=!xe.store.square,cn.close()}}),o(L.MenuControlItem,{id:"vc-zoom",label:"Zoom",control:(t,n)=>o(L.MenuSliderControl,{ref:n,...t,minValue:1,maxValue:50,value:xe.store.zoom,onChange:At(r=>xe.store.zoom=r,100)})}),o(L.MenuControlItem,{id:"vc-size",label:"Lens Size",control:(t,n)=>o(L.MenuSliderControl,{ref:n,...t,minValue:50,maxValue:1e3,value:xe.store.size,onChange:At(r=>xe.store.size=r,100)})}),o(L.MenuControlItem,{id:"vc-zoom-speed",label:"Zoom Speed",control:(t,n)=>o(L.MenuSliderControl,{ref:n,...t,minValue:.1,maxValue:5,value:xe.store.zoomSpeed,onChange:At(r=>xe.store.zoomSpeed=r,100),renderValue:r=>`${r.toFixed(3)}x`})})))},ap=g({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:[p.Aria],tags:["ImageUtilities"],patches:[{find:'"renderLinkComponent","maxWidth"',replacement:{match:/(return\(.{1,100}\(\)\.wrapper.{1,100})(src)/,replace:`$1id: '${yi}',$2`}},{find:"handleImageLoad=",replacement:[{match:/(render=function\(\){.{1,500}limitResponsiveWidth.{1,600})onMouseEnter:/,replace:"$1...$self.makeProps(this),onMouseEnter:"},{match:/componentDidMount=function\(\){/,replace:"$&$self.renderMagnifier(this);"},{match:/componentWillUnmount=function\(\){/,replace:"$&$self.unMountMagnifier();"}]},{find:".carouselModal,",replacement:{match:/onClick:(\i),/,replace:"onClick:$self.settings.store.preventCarouselFromClosingOnClick ? () => {} : $1,"}}],settings:xe,currentMagnifierElement:null,element:null,Magnifier:rp,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===yi&&(this.currentMagnifierElement||(this.currentMagnifierElement=o(rp,{size:xe.store.size,zoom:xe.store.zoom,instance:e}),this.root=_o.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(n=>({...n,mouseDown:!0}))},onMouseUp(e){e.setState(t=>({...t,mouseDown:!1}))},start(){Je(sp),pe("image-context",Nv),this.element=document.createElement("div"),this.element.classList.add("MagnifierContainer"),document.body.appendChild(this.element)},stop(){Mt(sp),this.root&&this.root.unmount(),this.element?.remove(),de("image-context",Nv)}})});function K2(e){let t=e?.message?.content,[n,r]=I.useState("password");return o(Le,{...e},o($e,null,o(v.FormTitle,{tag:"h4"},"Decrypt Message")),o(Ue,null,o(v.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Secret"),o(Re,{defaultValue:t,disabled:!0}),o(v.FormTitle,{tag:"h5"},"Password"),o(Re,{style:{marginBottom:"20px"},onChange:r})),o(Tt,null,o(N,{color:N.Colors.GREEN,onClick:()=>{let i=lp(t,n,!0);!i||!e?.message||(Vencord.Plugins.plugins.InvisibleChat.buildEmbed(e?.message,i),e.onClose())}},"Decrypt"),o(N,{color:N.Colors.TRANSPARENT,look:N.Looks.LINK,style:{left:15,position:"absolute"},onClick:e.onClose},"Cancel")))}function kv(e){Ce(t=>o(K2,{...t,...e}))}var Rv=m(()=>{"use strict";a();Ze();T();ia()});function Y2(e){let[t,n]=I.useState(""),[r,i]=I.useState(""),[s,l]=I.useState("password"),[c,u]=I.useState(!1),h=t&&(c||r&&/\w \w/.test(r));return o(Le,{...e},o($e,null,o(v.FormTitle,{tag:"h4"},"Encrypt Message")),o(Ue,null,o(v.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Secret"),o(Re,{onChange:f=>{n(f)}}),o(v.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Cover (2 or more Words!!)"),o(Re,{disabled:c,onChange:f=>{i(f)}}),o(v.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Password"),o(Re,{style:{marginBottom:"20px"},defaultValue:"password",onChange:f=>{l(f)}}),o(ft,{value:c,onChange:f=>{u(f)}},"Don't use a Cover")),o(Tt,null,o(N,{color:N.Colors.GREEN,disabled:!h,onClick:()=>{if(!h)return;let f=Ev(t,s,c?"d d":r),y=c?f.replaceAll("d",""):f;!y||(Hn(y),e.onClose())}},"Send"),o(N,{color:N.Colors.TRANSPARENT,look:N.Looks.LINK,style:{left:15,position:"absolute"},onClick:()=>{e.onClose()}},"Cancel")))}function Av(){Ce(e=>o(Y2,{...e}))}var Lv=m(()=>{"use strict";a();tt();Ze();T();ia()});function Z2(){return o("svg",{fill:"var(--header-secondary)",width:24,height:24,viewBox:"0 0 64 64"},o("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 X2(){return o(W,{text:"This message has a hidden message! (InvisibleChat)"},({onMouseEnter:e,onMouseLeave:t})=>o("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 J2(e){return e.type.analyticsName!=="normal"?null:o(W,{text:"Encrypt Message"},({onMouseEnter:t,onMouseLeave:n})=>o("div",{style:{display:"flex"}},o(N,{"aria-haspopup":"dialog","aria-label":"Encrypt Message",size:"",look:Zt.BLANK,onMouseEnter:t,onMouseLeave:n,innerClassName:mt.button,onClick:()=>Av(),style:{padding:"0 2px",scale:"0.9"}},o("div",{className:mt.buttonWrapper},o("svg",{"aria-hidden":!0,role:"img",width:"32",height:"32",viewBox:"0 0 64 64",style:{scale:"1.1"}},o("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 Ev(e,t,n){return cp.hide(e+"\u200B",t,n)}function lp(e,t,n){let r=cp.reveal(e,t);return n?r.replace("\u200B",""):r}function Q2(e){return e.endsWith("\u200B")}async function V2(e){let t=Dv.store.savedPasswords.split(",").map(r=>r.trim());if(!e?.content||!t?.length)return!1;let{content:n}=e;/^\W/.test(e.content)&&(n=`d ${e.content}d`);for(let r=0;r<t.length;r++){let i=lp(n,t[r],!1);if(Q2(i))return i}return!1}var cp,Dv,up,ia=m(()=>{"use strict";a();Ko();D();ie();w();mi();b();T();Rv();Lv();Dv=k({savedPasswords:{type:0,default:"password, Password",description:"Saved Passwords (Seperated with a , )"}}),up=g({name:"InvisibleChat",description:"Encrypt your Messages in a non-suspicious way!",authors:[p.SammCheese],dependencies:["MessagePopoverAPI"],patches:[{find:".Messages.MESSAGE_EDITED,",replacement:{match:/var .,.,.=(.)\.className,.=.\.message,.=.\.children,.=.\.content,.=.\.onUpdate/gm,replace:"try {$1 && $self.INV_REGEX.test($1.message.content) ? $1.content.push($self.indicator()) : null } catch {};$&"}},{find:".activeCommandOption",replacement:{match:/(.)\.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:Dv,async start(){let{default:e}=await ev();cp=new e(!0,!1),bn("invDecrypt",t=>this.INV_REGEX.test(t?.content)?{label:"Decrypt Message",icon:this.popOverIcon,message:t,channel:Z.getChannel(t.channel_id),onClick:async()=>{await V2(t).then(n=>n?void this.buildEmbed(t,n):void kv({message:t}))}}:null)},stop(){Tn("invDecrypt")},async getEmbed(e){let{body:t}=await Dt.post({url:"/unfurler/embed-urls",body:{urls:[e]}});return await t.embeds[0]},async buildEmbed(e,t){let n=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!"}}),n?.length){let r=await this.getEmbed(new URL(n[0]));r&&e.embeds.push(r)}this.updateMessage(e)},updateMessage:e=>{E.dispatch({type:"MESSAGE_UPDATE",message:e})},chatBarIcon:A.wrap(J2,{noop:!0}),popOverIcon:()=>o(Z2,null),indicator:A.wrap(X2,{noop:!0})})});function Ov(e,t){!Z.hasChannel(t)||Gr.transitionTo(`/channels/${e??"@me"}/${t}`)}var sa,en,pp,_v=m(()=>{"use strict";a();Cn();w();b();T();sa=!1;pp=g({name:"KeepCurrentChannel",description:"Attempt to navigate to the channel you were in before switching accounts or loading Discord.",authors:[p.Nuckyz],flux:{LOGOUT(e){({isSwitchingAccount:sa}=e)},CONNECTION_OPEN(){!sa||(sa=!1,en?.channelId&&Ov(en.guildId,en.channelId))},async CHANNEL_SELECT({guildId:e,channelId:t}){sa||(en={guildId:e,channelId:t},await Ve("KeepCurrentChannel_previousData",en))}},async start(){en=await Qe("KeepCurrentChannel_previousData"),en?en.channelId&&Ov(en.guildId,en.channelId):(en={guildId:lo.getGuildId(),channelId:Pe.getChannelId()??null},await Ve("KeepCurrentChannel_previousData",en))}})});async function dp(e){return(await nP.getAsset(mp,[e,void 0]))[0]}function oP(e){E.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e,socketId:"LastFM"})}var mp,eP,Bv,tP,nP,xn,fp,Fv=m(()=>{"use strict";a();D();bo();w();be();b();O();T();mp="1108588077900898414",eP="2a96cbd8b46e442fc41c2b86b821562f",Bv=new Y("LastFMRichPresence"),tP=P("getLocalPresence"),nP=Ke("getAssetImage: size must === [number, number] for Twitch",{getAsset:K.byCode("apply(")});xn=k({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:"text shown in status",type:0,default:"some music"},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"}]}}),fp=g({name:"LastFMRichPresence",description:"Little plugin for Last.fm rich presence",authors:[p.dzshn,p.RuiNtD],settingsAboutComponent:()=>o(d,null,o(v.FormTitle,{tag:"h3"},"How to get an API key"),o(v.FormText,null,"An API key is required to fetch your current track. To get one, you can visit ",o(at,{href:"https://www.last.fm/api/account/create"},"this page")," and fill in the following information: ",o("br",null)," ",o("br",null),"Application name: Discord Rich Presence ",o("br",null),"Application description: (personal use) ",o("br",null)," ",o("br",null),"And copy the API key (not the shared secret!)")),settings:xn,start(){this.updatePresence(),this.updateInterval=setInterval(()=>{this.updatePresence()},16e3)},stop(){clearInterval(this.updateInterval)},async fetchTrackData(){if(!xn.store.username||!xn.store.apiKey)return null;try{let e=new URLSearchParams({method:"user.getrecenttracks",api_key:xn.store.apiKey,user:xn.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 n=await t.json();if(n.error)return Bv.error("Error from Last.fm API",`${n.error}: ${n.message}`),null;let r=n.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 Bv.error("Failed to query Last.fm API",e),null}},async updatePresence(){oP(await this.getActivity())},getLargeImage(e){if(e.imageUrl&&!e.imageUrl.includes(eP))return e.imageUrl;if(xn.store.missingArt==="placeholder")return"placeholder"},async getActivity(){if(xn.store.hideWithSpotify){for(let i of tP.getActivities())if(i.type===2&&i.application_id!==mp)return null}let e=await this.fetchTrackData();if(!e)return null;let t=this.getLargeImage(e),n=t?{large_image:await dp(t),large_text:e.album||void 0,small_image:await dp("lastfm-small"),small_text:"Last.fm"}:{large_image:await dp("lastfm-large"),large_text:e.album||void 0},r=[{label:"View Song",url:e.url}];return xn.store.shareUsername&&r.push({label:"Last.fm Profile",url:`https://www.last.fm/user/${xn.store.username}`}),{application_id:mp,name:xn.store.statusName,details:e.name,state:e.artist,assets:n,buttons:r.map(i=>i.label),metadata:{button_urls:r.map(i=>i.url)},type:xn.store.useListeningStatus?2:0,flags:1}}})});var $v,gp,Uv=m(()=>{"use strict";a();w();b();$v=["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"],gp=g({name:"LoadingQuotes",description:"Replace Discords loading quotes",authors:[p.Ven,p.KraXen72],patches:[{find:".LOADING_DID_YOU_KNOW",replacement:{match:/\._loadingText=.+?random\(.+?;/s,replace:"._loadingText=$self.quote;"}}],xor(e){let t="read if cute",n=Array.from(e,(r,i)=>r.charCodeAt(0)^i%t.length);return String.fromCharCode(...n)},get quote(){return this.xor($v[Math.floor(Math.random()*$v.length)])}})});function rP(){let{id:e,guild_id:t}=Fe([Pe],()=>sr()),{groups:n}=Fe([Hv],()=>Hv.getProps(t,e)),r=Fe([Gv],()=>Gv.getMemberCount(t));if(r==null)return null;let i=n.length===1&&n[0].id==="unknown"?0:n.reduce((s,l)=>s+(l.id==="offline"?0:l.count),0);return o(le,{id:"vc-membercount",style:{marginTop:"1em",marginBottom:"-.5em",paddingInline:"1em",justifyContent:"center",alignContent:"center",gap:0}},o(W,{text:`${i} Online in this Channel`,position:"bottom"},s=>o("div",{...s},o("span",{style:{backgroundColor:"var(--green-360)",width:"12px",height:"12px",borderRadius:"50%",display:"inline-block",marginRight:"0.5em"}}),o("span",{style:{color:"var(--green-360)"}},i))),o(W,{text:`${r} Total Server Members`,position:"bottom"},s=>o("div",{...s},o("span",{style:{width:"6px",height:"6px",borderRadius:"50%",border:"3px solid var(--primary-400)",display:"inline-block",marginRight:"0.5em",marginLeft:"1em"}}),o("span",{style:{color:"var(--primary-400)"}},r))))}var Gv,Hv,hp,zv=m(()=>{"use strict";a();ie();wt();w();tt();b();O();T();Gv=ae("GuildMemberCountStore"),Hv=ae("ChannelMemberStore");hp=g({name:"MemberCount",description:"Shows the amount of online & total members in the server member list",authors:[p.Ven,p.Commandtechno],patches:[{find:".isSidebarVisible,",replacement:{match:/(var (\i)=\i\.className.+?children):\[(\i\.useMemo[^}]+"aria-multiselectable")/,replace:"$1:[$2.startsWith('members')?$self.render():null,$3"}}],render:A.wrap(rP,{noop:!0})})});var yp,jv,Wv,iP,vi,vp,qv=m(()=>{"use strict";a();Sn();D();w();b();O();T();yp=!1,jv=e=>e.key==="Backspace"&&(yp=!0),Wv=e=>e.key==="Backspace"&&(yp=!1),iP=1n<<4n,vi=k({enableDeleteOnClick:{type:3,description:"Enable delete on click",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}}),vp=g({name:"MessageClickActions",description:"Hold Backspace and click to delete, double click to edit/reply",authors:[p.Ven],dependencies:["MessageEventsAPI"],settings:vi,start(){let e=P("deleteMessage","startEditMessage"),t=P("isEditing","isEditingAny");document.addEventListener("keydown",jv),document.addEventListener("keyup",Wv),this.onClick=yu((n,r,i)=>{let s=n.author.id===F.getCurrentUser().id;if(yp)vi.store.enableDeleteOnClick&&(s||je.can(iP,r))&&(n.deleted?E.dispatch({type:"MESSAGE_DELETE",channelId:r.id,id:n.id,mlDeleted:!0}):e.deleteMessage(r.id,n.id),i.preventDefault());else{if(i.detail<2||vi.store.requireModifier&&!i.ctrlKey&&!i.shiftKey)return;if(s){if(!vi.store.enableDoubleClickToEdit||t.isEditing(r.id,n.id))return;e.startEditMessage(r.id,n.id,n.content),i.preventDefault()}else{if(!vi.store.enableDoubleClickToReply)return;E.dispatch({type:"CREATE_PENDING_REPLY",channel:r,message:n,shouldMention:!M.plugins.NoReplyMention.enabled,showMentionToggle:r.guild_id!==null})}}})},stop(){vu(this.onClick),document.removeEventListener("keydown",jv),document.removeEventListener("keyup",Wv)}})});var bp={};ge(bp,{_modifyAccessories:()=>sP,accessories:()=>aa,addAccessory:()=>Si,removeAccessory:()=>Sp});function Si(e,t,n){aa.set(e,{callback:t,position:n})}function Sp(e){aa.delete(e)}function sP(e,t){for(let n of aa.values()){let r=n.callback(t);if(r!=null){if(!Array.isArray(r))r=[r];else if(r.length===0)continue;e.splice(n.position!=null?n.position<0?e.length+n.position:n.position:e.length,0,...r.filter(i=>i!=null))}}return e}var aa,la=m(()=>{"use strict";a();aa=new Map});async function uP(e,t){let n=yr.get(t);if(n)return n.message;yr.set(t,{fetched:!1});let i=(await Dt.get({url:`/channels/${e}/messages`,query:{limit:1,around:t},retries:2}).catch(()=>null))?.body?.[0];if(!i)return;let s=un.getMessages(i.channel_id).receiveMessage(i).get(i.id);return yr.set(s.id,{message:s,fetched:!0}),s}function pP(e){let t=[];for(let{content_type:n,height:r,width:i,url:s,proxy_url:l}of e.attachments??[])n?.startsWith("image/")&&t.push({height:r,width:i,url:s,proxyURL:l});for(let{type:n,image:r,thumbnail:i,url:s}of e.embeds??[])n==="image"?t.push({...r??i}):s&&n==="gifv"&&!Zv.test(s)&&t.push({height:i.height,width:i.width,url:s});return t}function dP(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 mP(e){return!!(e.components.length||e.attachments.some(t=>!t.content_type?.startsWith("image/"))||e.embeds.some(t=>t.type!=="image"&&(t.type!=="gifv"||Zv.test(t.url))))}function fP(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 gP(e,t){return new Proxy(e,{get(n,r){return r==="vencordEmbeddedBy"?t:Reflect.get(...arguments)}})}function hP({message:e}){let t=e.vencordEmbeddedBy??[],n=[],r=null;for(;(r=Tp.exec(e.content))!==null;){let[i,s,l,c]=r;if(t.includes(c))continue;let u=Z.getChannel(l);if(!u||s!=="@me"&&!je.can(1024n,u))continue;let h=yr.get(c)?.message;if(!h)if(h??=un.getMessage(l,c),h)yr.set(c,{message:h,fetched:!0});else{let S={...e};delete S.embeds,delete S.interaction,cP.push(()=>uP(l,c).then(x=>x&&E.dispatch({type:"MESSAGE_UPDATE",message:S})));continue}let f={message:gP(h,[...t,e.id]),channel:u,guildID:s},y=xp.store.automodEmbeds;n.push(y==="always"||y==="prefer"&&!mP(h)?o(vP,{...f}):o(yP,{...f}))}return n.length?o(d,null,n):null}function yP({message:e,channel:t,guildID:n}){let r=n==="@me",i=!r&&ue.getGuild(t.guild_id),s=F.getUser(Z.getChannel(t.id).recipients?.[0]);return o(aP,{embed:{rawDescription:"",color:"var(--background-secondary)",author:{name:o(Q,{variant:"text-xs/medium",tag:"span"},o("span",null,r?"Direct Message - ":i.name+" - "),r?Ie.parse(`<@${s.id}>`):Ie.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:()=>o("div",{key:e.id,className:J(Kv.message,xp.store.messageBackgroundColor&&Kv.searchResult)},o(lP,{id:`message-link-embeds-${e.id}`,message:e,channel:t,subscribeToComponentDispatch:!1}))})}function vP(e){let{message:t,channel:n,guildID:r}=e,i=r==="@me",s=pP(t),{parse:l}=Ie;return o(Yv,{channel:n,childrenAccessories:o(Q,{color:"text-muted",variant:"text-xs/medium",tag:"span"},l(i?`<@${Z.getChannel(n.id).recipients[0]}>`:`<#${n.id}>`),o("span",null,i?" - Direct Message":" - "+ue.getGuild(n.guild_id)?.name)),compact:!1,content:o(d,null,t.content||t.attachments.length<=s.length?l(t.content):[dP(t.attachments.length,t.embeds.length)],s.map(c=>{let{width:u,height:h}=fP(c.width,c.height);return o("div",null,o("img",{src:c.url,width:u,height:h}))})),hideTimestamp:!1,message:t,_messageEmbed:"automod"})}var yr,aP,lP,Kv,Yv,Tp,Zv,cP,xp,wp,Xv=m(()=>{"use strict";a();la();D();ie();w();fe();ar();ve();b();O();T();yr=new Map,aP=re(()=>ze(".inlineMediaEmbed")),lP=re(()=>Ht(e=>e.type?.toString()?.includes('["message","compact","className",'))),Kv=P("message","searchResult"),Yv=()=>null,Tp=/(?<!<)https?:\/\/(?:\w+\.)?discord(?:app)?\.com\/channels\/(\d{17,20}|@me)\/(\d{17,20})\/(\d{17,20})/g,Zv=/^https:\/\/(?:www\.)?tenor\.com\//,cP=new fn,xp=k({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}]},clearMessageCache:{type:6,description:"Clear the linked message cache",component:()=>o(N,{onClick:()=>yr.clear()},"Clear the linked message cache")}});wp=g({name:"MessageLinkEmbeds",description:"Adds a preview to messages that link another message",authors:[p.TheSun,p.Ven],dependencies:["MessageAccessoriesAPI"],patches:[{find:".embedCard",replacement:[{match:/function (\i)\(\i\){var \i=\i\.message,\i=\i\.channel.{0,200}\.hideTimestamp/,replace:"$self.AutoModEmbed=$1;$&"}]}],set AutoModEmbed(e){Yv=e},settings:xp,start(){Si("messageLinkEmbed",e=>Tp.test(e.message.content)?(Tp.lastIndex=0,o(A,null,o(hP,{message:e.message}))):null,4)}})});var Jv=m(()=>{});var Pp,Qv=m(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/messageLogger/deleteStyleOverlay.css",{name:"src/plugins/messageLogger/deleteStyleOverlay.css",source:`.messagelogger-deleted {
background-color: rgba(240 71 71 / 15%) !important;
}
`,classNames:{},dom:null});Pp="src/plugins/messageLogger/deleteStyleOverlay.css"});var Mp,Vv=m(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/messageLogger/deleteStyleText.css",{name:"src/plugins/messageLogger/deleteStyleText.css",source:`/* Message content highlighting */
.messagelogger-deleted [class*="contents-"] > :is(div, h1, h2, h3, p) {
color: #f04747 !important;
}
/* Embed highlighting */
.messagelogger-deleted article :is(div, span, h1, h2, h3, p) {
color: #f04747 !important;
}
.messagelogger-deleted a {
color: #be3535 !important;
text-decoration: underline;
}
`,classNames:{},dom:null});Mp="src/plugins/messageLogger/deleteStyleText.css"});function e1(){M.plugins.MessageLogger.deleteStyle==="text"?(Je(Mp),Mt(Pp)):(Mt(Mp),Je(Pp))}var SP,t1,n1,o1,Ip,r1=m(()=>{"use strict";a();Jv();Pt();D();Ge();ie();w();be();b();O();T();Qv();Vv();SP=P("edited","communicationDisabled","isSystemMessage");t1="ml-remove-history",n1="ml-toggle-style",o1=(e,t)=>()=>{let{message:n}=t,{deleted:r,editHistory:i,id:s,channel_id:l}=n;if(!r&&!i?.length)return;e:{if(!r)break e;let c=document.getElementById(`chat-messages-${l}-${s}`);if(!c)break e;e.push(o(L.MenuItem,{id:n1,key:n1,label:"Toggle Deleted Highlight",action:()=>c.classList.toggle("messagelogger-deleted")}))}e.push(o(L.MenuItem,{id:t1,key:t1,label:"Remove Message History",color:"danger",action:()=>{r?E.dispatch({type:"MESSAGE_DELETE",channelId:l,id:s,mlDeleted:!0}):n.editHistory=[]}}))},Ip=g({name:"MessageLogger",description:"Temporarily logs deleted and edited messages.",authors:[p.rushii,p.Ven],start(){e1(),pe("message",o1)},stop(){de("message",o1)},renderEdit(e){return o(A,{noop:!0},o("div",{className:"messagelogger-edited"},Ie.parse(e.content),o(kn,{timestamp:e.timestamp,isEdited:!0,isInline:!1},o("span",{className:SP.edited}," ","(",it.Messages.MESSAGE_EDITED,")"))))},makeEdit(e,t){return{timestamp:Jt?.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:()=>e1()},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:""}},handleDelete(e,t,n){try{let u=function(h){let f=e.get(h);if(!f)return;let y=64;t.mlDeleted||(f.flags&y)===y||i&&f.author?.bot||s&&f.author?.id===c||l.includes(f.author?.id)?e=e.remove(h):e=e.update(h,x=>x.set("deleted",!0).set("attachments",x.attachments.map(R=>(R.deleted=!0,R))))};var r=u;if(e==null||!n&&!e.has(t.id))return e;let{ignoreBots:i,ignoreSelf:s,ignoreUsers:l}=M.plugins.MessageLogger,c=F.getCurrentUser().id;n?t.ids.forEach(u):u(t.id)}catch(i){new Y("MessageLogger").error("Error during handleDelete",i)}return e},patches:[{find:'displayName="MessageStore"',replacement:[{match:/MESSAGE_DELETE:function\((\w)\){var .+?((?:\w{1,2}\.){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\((\w)\){var .+?((?:\w{1,2}\.){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\((\w)\).+?)\.update\((\w)/,replace:"$1.update($3,m => (($2.message.flags & 64) === 64 || (Vencord.Settings.plugins.MessageLogger.ignoreBots && $2.message.author?.bot) || (Vencord.Settings.plugins.MessageLogger.ignoreSelf && $2.message.author?.id === Vencord.Webpack.Common.UserStore.getCurrentUser().id)) ? 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=.{0,200}\.find\(\(function\((\i)\)\{)return/,replace:"return !$1.deleted &&"}]},{find:"isFirstMessageInForumPost=function",replacement:[{match:/(\w)\.customRenderedContent=(\w)\.customRenderedContent;/,replace:"$1.customRenderedContent = $2.customRenderedContent;$1.deleted = $2.deleted || false;$1.editHistory = $2.editHistory || [];"}]},{find:"THREAD_STARTER_MESSAGE?null===",replacement:[{match:/interactionData:(\w)\.interactionData/,replace:"interactionData:$1.interactionData,deleted:$1.deleted,editHistory:$1.editHistory,attachments:$1.attachments"},{match:/attachments:(\w{1,2})\((\w)\)/,replace:"attachments: $1((() => { 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:/(\((\w)\){return null==\2\.attachments.+?)spoiler:/,replace:"$1deleted: arguments[0]?.deleted,spoiler:"}]},{find:'["className","attachment","inlineMedia"',replacement:[{match:/((\w)\.className,\w=\2\.attachment),/,replace:"$1,deleted=$2.attachment?.deleted,"},{match:/\["className","attachment","inlineMedia".+?className:/,replace:"$& (deleted ? 'messagelogger-deleted-attachment ' : '') +"}]},{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\((\w)\).+?},/,replace:"MESSAGE_DELETE:function($1){},"},{match:/MESSAGE_DELETE_BULK:function\((\w)\).+?},/,replace:"MESSAGE_DELETE_BULK:function($1){},"}]},{find:'id:"remove-reactions"',replacement:[{match:/children:(\[""===.+?\])/,replace:"children:arguments[0].message.deleted?[]:$1"}]}]})});function i1(e){fr({name:e.name,description:e.name,inputType:1,execute:async(t,n)=>await ca(e.name)?(M.plugins.MessageTags.clyde&&oe(n.channel.id,{author:Bn,content:`${xo} The tag **${e.name}** has been sent!`}),{content:e.message.replaceAll("\\n",`
`)}):(oe(n.channel.id,{author:Bn,content:`${xo} The tag **${e.name}** does not exist anymore! Please reload ur Discord to fix :)`}),{content:`/${e.name}`}),[bP]:!0},"CustomTags")}var xo,pa,bP,Bn,ua,ca,TP,xP,Cp,s1=m(()=>{"use strict";a();_t();Cn();D();w();b();xo="<:luna:1035316192220553236>",pa="MessageTags_TAGS",bP=Symbol("MessageTags"),Bn={id:"821472922140803112",bot:!1},ua=()=>Qe(pa).then(e=>e??[]),ca=e=>Qe(pa).then(t=>(t??[]).find(n=>n.name===e)??null),TP=async e=>{let t=await ua();return t.push(e),Ve(pa,t),t},xP=async e=>{let t=await ua();return t=await t.filter(n=>n.name!==e),Ve(pa,t),t};Cp=g({name:"MessageTags",description:"Allows you to save messages and to use them with a simple command.",authors:[p.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 ua())i1(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 n=Oe(e[0].options,"tag-name",""),r=Oe(e[0].options,"message","");if(await ca(n))return oe(t.channel.id,{author:Bn,content:`${xo} A Tag with the name **${n}** already exists!`});let i={name:n,enabled:!0,message:r};i1(i),await TP(i),oe(t.channel.id,{author:Bn,content:`${xo} Successfully created the tag **${n}**!`});break}case"delete":{let n=Oe(e[0].options,"tag-name","");if(!await ca(n))return oe(t.channel.id,{author:Bn,content:`${xo} A Tag with the name **${n}** does not exist!`});li(n),await xP(n),oe(t.channel.id,{author:Bn,content:`${xo} Successfully deleted the tag **${n}**!`});break}case"list":{oe(t.channel.id,{author:Bn,embeds:[{title:"All Tags:",description:(await ua()).map(n=>`\`${n.name}\`: ${n.message.slice(0,72).replaceAll("\\n"," ")}${n.message.length>72?"...":""}`).join(`
`)||`${xo} Woops! There are no tags yet, use \`/tags create\` to create one!`,color:14122879,type:"rich"}]});break}case"preview":{let n=Oe(e[0].options,"tag-name",""),r=await ca(n);if(!r)return oe(t.channel.id,{author:Bn,content:`${xo} A Tag with the name **${n}** does not exist!`});oe(t.channel.id,{author:Bn,content:r.message.replaceAll("\\n",`
`)});break}default:{oe(t.channel.id,{author:Bn,content:"Invalid sub-command"});break}}}}]})});function wP(e){let t="";for(let n=0;n<e.length;n++)t+=n%2?e[n].toUpperCase():e[n].toLowerCase();return t}var Np,a1=m(()=>{"use strict";a();_t();w();b();Np=g({name:"MoreCommands",description:"echo, lenny, mock",authors:[p.Arjix,p.echo,p.Samu],dependencies:["CommandsAPI"],commands:[{name:"echo",description:"Sends a message as Clyde (locally)",options:[So],inputType:3,execute:(e,t)=>{let n=Oe(e,"message","");oe(t.channel.id,{content:n})}},{name:"lenny",description:"Sends a lenny face",options:[So],execute:e=>({content:Oe(e,"message","")+" ( \u0361\xB0 \u035C\u0296 \u0361\xB0)"})},{name:"mock",description:"mOcK PeOpLe",options:[Ho],execute:e=>({content:wP(Oe(e,"message",""))})}]})});var kp,l1=m(()=>{"use strict";a();_t();w();b();kp=g({name:"MoreKaomoji",description:"Adds more Kaomoji to discord. \u30FD(\xB4\u25BD`)/",authors:[p.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:[So],execute:t=>({content:Oe(t,"message","")+e.description})}))})});function CP(e){wo.store.tagSettings??=Rp;let[t,n]=V(wo.store.tagSettings),r=i=>{n(i),e.setValue(i)};return o(le,{flexDirection:"column"},vr.map(i=>o(Et,{style:{padding:"1em 1em 0"}},o(v.FormTitle,{style:{width:"fit-content"}},o(W,{text:i.description},({onMouseEnter:s,onMouseLeave:l})=>o("div",{onMouseEnter:s,onMouseLeave:l},i.displayName," Tag ",o(Vn,{type:Vn.Types[i.name]})))),o(Re,{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:G.bottom16}),o(ft,{value:t[i.name]?.showInChat??!0,onChange:s=>{t[i.name].showInChat=s,r(t)},hideBorder:!0},"Show in messages"),o(ft,{value:t[i.name]?.showInNotChat??!0,onChange:s=>{t[i.name].showInNotChat=s,r(t)},hideBorder:!0},"Show in member list and profiles"))))}var PP,MP,IP,Vn,c1,vr,Rp,wo,Ap,u1=m(()=>{"use strict";a();D();wt();w();Xe();b();O();T();PP="1081004946872352958",MP=P("computePermissions","canEveryoneRole"),IP=P("SEND_MESSAGES","VIEW_CREATOR_MONETIZATION_ANALYTICS"),Vn=ke(e=>e.Types?.[0]==="BOT"),c1=(e,t)=>!!e?.webhookId&&t.isNonUserBot(),vr=[{name:"WEBHOOK",displayName:"Webhook",description:"Messages sent by webhooks",condition:c1},{name:"OWNER",displayName:"Owner",description:"Owns the server",condition:(e,t,n)=>ue.getGuild(n?.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"]}],Rp=Object.fromEntries(vr.map(({name:e,displayName:t})=>[e,{text:t,showInChat:!0,showInNotChat:!0}]));wo=k({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:CP,description:"fill me"}}),Ap=g({name:"MoreUserTags",description:"Adds tags for webhooks and moderative roles (owner, admin, etc.)",authors:[p.Cyn,p.TheSun,p.RyanCaoDev,p.LordElias],settings:wo,patches:[{find:'.BOT=0]="BOT"',replacement:[{match:/(\i)\[.\.BOT=0\]="BOT";/,replace:"$&$1=$self.addTagVariants($1);"}]},{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,n,r,i,s)=>`${t}default:{${i} = $self.getTagText(${r}[${n}], ${s})}`},{match:/(\i)=(\i)===\i(?:\.\i)?\.ORIGINAL_POSTER/,replace:"$1=$self.isOPTag($2)"},{match:/children:\[(?=\i,\(0,\i\.jsx\)\("span",{className:\i\(\)\.botText,children:(\i)}\)\])/,replace:"'data-tag':$1.toLowerCase(),children:["}]},{find:".Types.ORIGINAL_POSTER",replacement:{match:/return null==(\i)\?null:\(0,/,replace:"$1=$self.getTag({...arguments[0],origType:$1,location:'chat'});$&"}},{find:".renderBot=function(){",replacement:{match:/this.props.user;return null!=(\i)&&.{0,10}\?(.{0,50})\.botTag/,replace:"this.props.user;var type=$self.getTag({...this.props,origType:$1.bot?0:null,location:'not-chat'});return type!==null?$2.botTag,type"}},{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:",botType:",replacement:{match:/,botType:(\i\((\i)\)),/g,replace:",botType:$self.getTag({user:$2,channelId:arguments[0].moreTags_channelId,origType:$1,location:'not-chat'}),"}}],start(){if(!wo.store.tagSettings)if(!wo.store.visibility_WEBHOOK)wo.store.tagSettings=Rp;else{let e={...Rp};Object.entries(Vencord.PlainSettings.plugins.MoreUserTags).forEach(([t,n])=>{let[r,i]=t.split("_");if(r==="visibility")switch(n){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}wo.store.tagSettings=e,delete Vencord.Settings.plugins.MoreUserTags[t]})}},getPermissions(e,t){let n=ue.getGuild(t?.guild_id);if(!n)return[];let r=MP.computePermissions({user:e,context:n,overwrites:t.permissionOverwrites});return Object.entries(IP).map(([i,s])=>r&s?i:"").filter(Boolean)},addTagVariants(e){let t=100;return vr.forEach(({name:n})=>{e[n]=++t,e[t]=n,e[`${n}-BOT`]=++t,e[t]=`${n}-BOT`,e[`${n}-OP`]=++t,e[t]=`${n}-OP`}),e},isOPTag:e=>e===Vn.Types.ORIGINAL_POSTER||vr.some(t=>e===Vn.Types[`${t.name}-OP`]),getTagText(e,t){if(!e)return t.BOT_TAG_BOT;let[n,r]=e.split("-"),i=vr.find(({name:l})=>n===l);if(!i||r==="BOT"&&n!=="WEBHOOK"&&this.settings.store.dontShowForBots)return t.BOT_TAG_BOT;let s=wo.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:n,origType:r,location:i,channel:s}){if(i==="chat"&&t.id==="1")return Vn.Types.OFFICIAL;if(t.id===PP)return Vn.Types.AI;let l=typeof r=="number"?r:null;if(s??=Z.getChannel(n),!s)return l;let c=this.settings.store,u=this.getPermissions(t,s);for(let h of vr)if(!(i==="chat"&&!c.tagSettings[h.name].showInChat)&&!(i==="not-chat"&&!c.tagSettings[h.name].showInNotChat)&&(h.permissions?.some(f=>u.includes(f))||h.condition?.(e,t,s))){s.isForumPost()&&s.ownerId===t.id?l=Vn.Types[`${h.name}-OP`]:t.bot&&!c1(e,t)&&!c.dontShowBotTag?l=Vn.Types[`${h.name}-BOT`]:l=Vn.Types[h.name];break}return l}})});function kP(e,t){let n=0,r=0;for(;(r=e.indexOf(t,r)+1)!==0;)n++;return n}function RP(e,t){if(!t.global)throw new Error("pattern must be global");let n=0;for(;t.test(e);)n++;return n}function LP(e){let t=kP(e,Ep)+RP(e,AP);return Math.min(t,10)}function Lp(){if(!Yo.store.triggerWhenUnfocused&&!document.hasFocus())return;let e=document.createElement("audio");e.src=NP,e.volume=Yo.store.volume,e.play()}var Ep,NP,Yo,Dp,AP,p1=m(()=>{"use strict";a();D();Lc();w();fe();b();T();Ep="\u{1F5FF}",NP="https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai.mp3",Yo=k({volume:{description:"Volume of the \u{1F5FF}\u{1F5FF}\u{1F5FF}",type:5,markers:mr(0,1,.1),default:.5,stickToMarkers:!1},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}}),Dp=g({name:"Moyai",authors:[p.Megu,p.Nuckyz],description:"\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}",settings:Yo,flux:{async MESSAGE_CREATE({optimistic:e,type:t,message:n,channelId:r}){if(e||t!=="MESSAGE_CREATE"||n.state==="SENDING"||Yo.store.ignoreBots&&n.author?.bot||Yo.store.ignoreBlocked&&et.isBlocked(n.author?.id)||!n.content||r!==Pe.getChannelId())return;let i=LP(n.content);for(let s=0;s<i;s++)Lp(),await so(300)},MESSAGE_REACTION_ADD({optimistic:e,type:t,channelId:n,userId:r,messageAuthorId:i,emoji:s}){if(e||t!=="MESSAGE_REACTION_ADD"||Yo.store.ignoreBots&&F.getUser(r)?.bot||Yo.store.ignoreBlocked&&et.isBlocked(i)||n!==Pe.getChannelId())return;let l=s.name.toLowerCase();l!==Ep&&!l.includes("moyai")&&!l.includes("moai")||Lp()},VOICE_CHANNEL_EFFECT_SEND({emoji:e}){if(!e?.name)return;let t=e.name.toLowerCase();t!==Ep&&!t.includes("moyai")&&!t.includes("moai")||Lp()}}});AP=/<a?:\w*moy?ai\w*:\d{17,20}>/gi});var da,Op,d1=m(()=>{"use strict";a();D();w();b();O();da=k({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}}),Op=g({name:"MuteNewGuild",description:"Mutes newly joined guilds",authors:[p.Glitch,p.Nuckyz,p.carince],patches:[{find:",acceptInvite:function",replacement:{match:/INVITE_ACCEPT_SUCCESS.+?;(\i)=null.+?;/,replace:(e,t)=>`${e}$self.handleMute(${t});`}}],settings:da,handleMute(e){e==="@me"||e==="null"||e==null||Nn("updateGuildNotificationSettings").updateGuildNotificationSettings(e,{muted:da.store.guild,suppress_everyone:da.store.everyone,suppress_roles:da.store.role})}})});function BP(e){return e.name||e.recipients.map(F.getUser).filter(Al).map(t=>et.getNickname(t.id)||OP.getName(t)).join(", ")}var EP,DP,OP,Po,_P,_p,m1=m(()=>{"use strict";a();w();Ss();b();O();T();EP=P("selectPrivateChannel"),DP=P("getChannelIconURL"),OP=P("getGlobalName"),Po=P("emptyIconFriends","emptyIconGuilds"),_P=P("guildNick","guildAvatarWithoutIcon");_p=g({name:"MutualGroupDMs",description:"Shows mutual group dms in profiles",authors:[p.amia],patches:[{find:".Messages.USER_PROFILE_MODAL",replacement:[{match:/(?<=\.MUTUAL_GUILDS\}\),)(?=(\i\.bot).{0,20}(\(0,\i\.jsx\)\(.{0,100}id:))/,replace:'$1?null:$2"MUTUAL_GDMS",children:"Mutual Groups"}),'},{match:/(?<={user:(\i),onClose:(\i)}\);)(?=case \i\.\i\.MUTUAL_FRIENDS)/,replace:'case "MUTUAL_GDMS":return $self.renderMutualGDMs($1,$2);'}]}],renderMutualGDMs(e,t){let n=Z.getSortedPrivateChannels().filter(r=>r.isGroupDM()&&r.recipients.includes(e.id)).map(r=>o(ps,{className:Po.listRow,onClick:()=>{t(),EP.selectPrivateChannel(r.id)}},o(ds,{src:DP.getChannelIconURL({id:r.id,icon:r.icon,size:32}),size:"SIZE_40",className:Po.listAvatar}),o("div",{className:Po.listRowContent},o("div",{className:Po.listName},BP(r)),o("div",{className:_P.guildNick},r.recipients.length+1," Members"))));return o(us,{className:Po.listScroller,fade:!0,onClose:t},n.length>0?n:o("div",{className:Po.empty},o("div",{className:Po.emptyIconFriends}),o("div",{className:Po.emptyText},"No group dms in common")))}})});var FP,Bp,f1=m(()=>{"use strict";a();D();w();b();O();FP=P("getRelationships","isBlocked"),Bp=g({name:"NoBlockedMessages",description:"Hides all blocked messages from chat completely.",authors:[p.rushii,p.Samu],patches:[{find:'safety_prompt:"DMSpamExperiment",response:"show_redacted_messages"',replacement:[{match:/\.collapsedReason;return/,replace:".collapsedReason;return null;return;"}]},...['displayName="MessageStore"','displayName="ReadStateStore"'].map(e=>({find:e,predicate:()=>M.plugins.NoBlockedMessages.ignoreBlockedMessages===!0,replacement:[{match:/(?<=MESSAGE_CREATE:function\((\i)\){)/,replace:(t,n)=>`if($self.isBlocked(${n}.message))return;`}]}))],options:{ignoreBlockedMessages:{description:"Completely ignores (recent) incoming messages from blocked users (locally).",type:3,default:!1,restartNeeded:!0}},isBlocked:e=>FP.isBlocked(e.author.id)})});var Fp,g1=m(()=>{"use strict";a();w();b();Fp=g({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:[p.Ven],patches:[{find:"setDevtoolsCallbacks",replacement:{match:/if\(.{0,10}\|\|"0.0.0"!==.{0,2}\.remoteApp\.getVersion\(\)\)/,replace:"if(false)"}}]})});var $p,h1=m(()=>{"use strict";a();w();b();$p=g({name:"NoF1",description:"Disables F1 help bind.",authors:[p.Cyn],patches:[{find:',"f1"],comboKeysBindGlobal:',replacement:{match:',"f1"],comboKeysBindGlobal:',replace:"],comboKeysBindGlobal:"}}]})});var $P,bi,Up,y1=m(()=>{"use strict";a();D();w();b();O();$P=P("getMessageRequestsCount"),bi=k({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}}),Up=g({name:"NoPendingCount",description:"Removes the ping count of incoming friend requests, message requests, and nitro offers.",authors:[p.amia],settings:bi,patches:[{find:".getPendingCount=",predicate:()=>bi.store.hideFriendRequestsCount,replacement:{match:/(?<=\.getPendingCount=function\(\)\{)/,replace:"return 0;"}},{find:".getMessageRequestsCount=",predicate:()=>bi.store.hideMessageRequestsCount,replacement:{match:/(?<=\.getMessageRequestsCount=function\(\)\{)/,replace:"return 0;"}},{find:".getSpamChannelsCount(),",predicate:()=>bi.store.hideMessageRequestsCount,replacement:{match:/(?<=getSpamChannelsCount\(\),\i=)\i\.getMessageRequestsCount\(\)/,replace:"$self.getRealMessageRequestCount()"}},{find:"showProgressBadge:",predicate:()=>bi.store.hidePremiumOffersCount,replacement:{match:/\(function\(\){return \i\.\i\.getUnacknowledgedOffers\(\i\)\.length}\)/,replace:"(function(){return 0})"}}],getRealMessageRequestCount(){return $P.getMessageRequestChannelIds().size}})});var Gp,v1=m(()=>{"use strict";a();w();b();Gp=g({name:"NoProfileThemes",description:"Completely removes Nitro profile themes",authors:[p.TheKodeToad],patches:[{find:".NITRO_BANNER,",replacement:{match:/=(?=\i\.\i\.isPremiumAtLeast\(null==(\i))/,replace:"=$1?.banner&&"}},{find:"().avatarPositionPremiumNoBanner,default:",replacement:{match:/\.avatarPositionPremiumNoBanner(?=,default:\i\(\)\.(\i))/,replace:".$1"}},{find:".hasThemeColors=function(){",replacement:{match:/(?<=key:"canUsePremiumProfileCustomization",get:function\(\){return)/,replace:" false;"}}]})});var ma,Hp,S1=m(()=>{"use strict";a();D();w();b();ma=k({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}}),Hp=g({name:"NoReplyMention",description:"Disables reply pings by default",authors:[p.DustyAngel47,p.axyie,p.pylix,p.outfoxxed],settings:ma,shouldMention(e,t){let n=ma.store.userList.includes(e.author.id),r=ma.store.shouldPingListed?n:!n;return ma.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 zp,b1=m(()=>{"use strict";a();w();b();zp=g({name:"NoScreensharePreview",description:"Disables screenshare previews from being sent.",authors:[p.Nuckyz],patches:[{find:'("ApplicationStreamPreviewUploadManager")',replacement:["\\i\\.default\\.makeChunkedRequest\\(","\\i\\.\\i\\.post\\({url:"].map(e=>({match:new RegExp(`(?=return\\[(\\d),${e}\\i\\.\\i\\.STREAM_PREVIEW.+?}\\)\\];)`),replace:(t,n)=>`return[${n},Promise.resolve({body:"",status:204})];`}))}]})});var jp,T1=m(()=>{"use strict";a();w();b();jp=g({name:"NoUnblockToJump",description:"Allows you to jump to messages of blocked users without unblocking them",authors:[p.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=function()",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 Wp,x1=m(()=>{"use strict";a();w();b();Wp=g({name:"NSFWGateBypass",description:"Allows you to access NSFW channels without setting/verifying your age",authors:[p.Commandtechno],patches:[{find:".nsfwAllowed=null",replacement:{match:/(\w+)\.nsfwAllowed=/,replace:"$1.nsfwAllowed=true;"}}]})});var qp,w1=m(()=>{"use strict";a();w();b();qp=g({name:"oneko",description:"cat follow mouse (real)",authors:[p.Ven,p.adryd],start(){fetch("https://raw.githubusercontent.com/adryd325/oneko.js/5977144dce83e4d71af1de005d16e38eebeb7b72/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(){clearInterval(window.onekoInterval),delete window.onekoInterval,document.getElementById("oneko")?.remove()}})});var UP,GP,HP,Zo,Kp,P1=m(()=>{"use strict";a();D();w();b();T();UP=/^https:\/\/open\.spotify\.com\/(track|album|artist|playlist|user)\/(.+)(?:\?.+?)?$/,GP=/^https:\/\/(steamcommunity\.com|(?:help|store)\.steampowered\.com)\/.+$/,HP=/^https:\/\/store\.epicgames\.com\/(.+)$/,Zo=k({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}}),Kp=g({name:"OpenInApp",description:"Open Spotify, Steam and Epic Games URLs in their respective apps instead of your browser",authors:[p.Ven],settings:Zo,patches:[{find:'"MaskedLinkStore"',replacement:{match:/return ((\i)\.apply\(this,arguments\))(?=\}function \i.{0,200}\.trusted)/,replace:"return $self.handleLink(...arguments).then(handled => handled || $1)"}},{find:"WEB_OPEN(",predicate:()=>Zo.store.spotify,replacement:{match:/\i\.\i\.isProtocolRegistered\(\)(.{0,100})window.open/g,replace:"true$1VencordNative.native.openExternal"}},{find:".CONNECTED_ACCOUNT_VIEWED,",replacement:{match:/(?<=href:\i,onClick:function\(\)\{)(?=return \i=(\i)\.type,.{0,50}CONNECTED_ACCOUNT_VIEWED)/,replace:"$self.handleAccountView(arguments[0],$1.type,$1.id);"}}],async handleLink(e,t){if(!e)return!1;let n=e.href;e:{if(!Zo.store.spotify)break e;let r=UP.exec(n);if(!r)break e;let[,i,s]=r;return VencordNative.native.openExternal(`spotify:${i}:${s}`),t?.preventDefault(),!0}e:{if(!Zo.store.steam||!GP.test(n))break e;return VencordNative.native.openExternal(`steam://openurl/${n}`),t?.preventDefault(),fs("Opened link in Steam",X.Type.SUCCESS),!0}e:{if(!Zo.store.epic)break e;let r=HP.exec(n);if(!r)break e;return VencordNative.native.openExternal(`com.epicgames.launcher://store/${r[1]}`),t?.preventDefault(),!0}return t?.defaultPrevented?(window.open(n,"_blank"),!0):!1},handleAccountView(e,t,n){t==="spotify"&&Zo.store.spotify?(VencordNative.native.openExternal(`spotify:user:${n}`),e.preventDefault()):t==="steam"&&Zo.store.steam&&(VencordNative.native.openExternal(`steam://openurl/https://steamcommunity.com/profiles/${n}`),fs("Opened link in Steam",X.Type.SUCCESS),e.preventDefault())}})});function I1(e){Object.assign(C1.__getLocalVars().state,{enabled:e,settingsVisible:e})}function N1(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}}Object.assign(C1.__getLocalVars().state,t)}var C1,M1,Yp,k1=m(()=>{"use strict";a();D();w();b();O();C1=ae("PoggermodeSettingsStore"),M1=k({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:N1}}),Yp=g({name:"Party mode \u{1F389}",description:"Allows you to use party mode cause the party never ends \u2728",authors:[p.UwUDev],settings:M1,start(){I1(!0),N1(M1.store.superIntensePartyMode)},stop(){I1(!1)}})});var R1=m(()=>{});function zP(e){return jn(e.toLowerCase().split("_"))}function fa(e){return e=A1[e]||e,it.Messages[e]||zP(e)}function L1(e){e==="USE_APPLICATION_COMMANDS"?e="USE_APPLICATION_COMMANDS_GUILD":e==="SEND_VOICE_MESSAGES"?e="SEND_VOICE_MESSAGE_GUILD":e!=="STREAM"&&(e=A1[e]||e);let t=it.Messages[`ROLE_PERMISSIONS_${e}_DESCRIPTION`];return t?.hasMarkdown?Ie.parse(t.message):typeof t=="string"?t:""}function ga({roles:e,id:t},n){return[...n.roles,t].map(r=>e[r]).sort((r,i)=>i.position-r.position)}function E1(e){switch(Mo.store.permissionsSortOrder){case 0:return e.sort((t,n)=>n.position-t.position);case 1:return e.sort((t,n)=>t.position-n.position);default:return e}}function ha(e,t){let n=ue.getGuild(t);return e.sort((r,i)=>{if(r.type!==0||i.type!==0)return 0;let s=n.roles[r.id];return n.roles[i.id].position-s.position})}var Ct,A1,Ti=m(()=>{"use strict";a();Ge();Wn();T();wi();xi();Ct=Ee("vc-permviewer-");A1={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 Zp(){return o("svg",{height:"24",width:"24",viewBox:"0 0 24 24"},o("title",null,"Denied"),o("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 Xp(){return o("svg",{height:"24",width:"24",viewBox:"0 0 24 24"},o("title",null,"Allowed"),o("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 O1(){return o("svg",{height:"24",width:"24",viewBox:"0 0 16 16"},o("g",null,o("title",null,"Not overwritten"),o("polygon",{fill:"var(--text-normal)",points:"12 2.32 10.513 2 4 13.68 5.487 14"})))}var _1=m(()=>{"use strict";a()});function WP(e,t,n){return Ce(r=>o(YP,{modalProps:r,permissions:e,guild:t,header:n}))}function qP({permissions:e,guild:t,modalProps:n,header:r}){e.sort((c,u)=>c.type-u.type),Fe([Ae],()=>Ae.getMemberIds(t.id),null,(c,u)=>c.length===u.length),rt(()=>{let c=e.filter(u=>u.type===1&&!Ae.isMember(t.id,u.id)).map(({id:u})=>u);E.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[t.id],userIds:c})},[]);let[i,s]=V(0),l=e[i];return o(Le,{...n,size:"large"},o($e,null,o(Q,{className:Ct("perms-title"),variant:"heading-lg/semibold"},r," permissions:"),o(xt,{onClick:n.onClose})),o(Ue,null,!l&&o("div",{className:Ct("perms-no-perms")},o(Q,{variant:"heading-lg/normal"},"No permissions to display!")),l&&o("div",{className:Ct("perms-container")},o("div",{className:Ct("perms-list")},e.map((c,u)=>{let h=F.getUser(c.id??""),f=t.roles[c.id??""];return o("button",{className:Ct("perms-list-item-btn"),onClick:()=>s(u)},o("div",{className:Ct("perms-list-item",{"perms-list-item-active":i===u}),onContextMenu:y=>{Mo.store.unsafeViewAsRole&&c.type===0&&cn.open(y,()=>o(KP,{guild:t,roleId:c.id,onClose:n.onClose}))}},(c.type===0||c.type===2)&&o("span",{className:Ct("perms-role-circle"),style:{backgroundColor:f?.colorString??"var(--primary-300)"}}),c.type===1&&h!==void 0&&o("img",{className:Ct("perms-user-img"),src:h.getAvatarURL(void 0,void 0,!1)}),o(Q,{variant:"text-md/normal"},c.type===0?f?.name||"Unknown Role":c.type===1?h&&zn(h)||"Unknown User":o(le,{style:{gap:"0.2em",justifyItems:"center"}},"@owner",o(vy,{height:18,width:18,"aria-hidden":"true"})))))})),o("div",{className:Ct("perms-perms")},Object.entries(An).map(([c,u])=>o("div",{className:Ct("perms-perms-item")},o("div",{className:Ct("perms-perms-item-icon")},(()=>{let{permissions:h,overwriteAllow:f,overwriteDeny:y}=l;return h?(h&u)===u?Xp():Zp():f&&(f&u)===u?Xp():y&&(y&u)===u?Zp():O1()})()),o(Q,{variant:"text-md/normal"},fa(c)),o(W,{text:L1(c)||"No Description"},h=>o(yy,{...h}))))))))}function KP({guild:e,roleId:t,onClose:n}){return o(L.Menu,{navId:Ct("role-context-menu"),onClose:cn.close,"aria-label":"Role Options"},o(L.MenuItem,{id:"vc-pw-view-as-role",label:"View As Role",action:()=>{let r=e.roles[t];!r||(n(),E.dispatch({type:"IMPERSONATE_UPDATE",guildId:e.id,data:{type:"ROLES",roles:{[t]:r}}}))}}))}var YP,Sr,xi=m(()=>{"use strict";a();ie();wt();_n();tt();Ze();T();wi();Ti();_1();YP=A.wrap(qP),Sr=WP});var B1=m(()=>{});function Pi({children:e,onMoreClick:t,buttons:n,moreTooltipText:r,defaultState:i=!1,onDropDownClick:s,headerText:l}){let[c,u]=V(i);return o(d,null,o("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"8px"}},o(Q,{tag:"h2",variant:"eyebrow",style:{color:"var(--header-primary)",display:"inline"}},l),o("div",{className:Jp("center-flex")},n??null,t&&o(W,{text:r},h=>o("button",{...h,className:Jp("btn"),onClick:t},o("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},o("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"})))),o(W,{text:c?"Hide "+l:"Show "+l},h=>o("button",{...h,className:Jp("btn"),onClick:()=>{u(f=>!f),s?.(c)}},o("svg",{width:"24",height:"24",viewBox:"0 0 24 24",transform:c?"scale(1 -1)":"scale(1 1)"},o("path",{fill:"var(--text-normal)",d:"M16.59 8.59003L12 13.17L7.41 8.59003L6 10L12 16L18 10L16.59 8.59003Z"})))))),c&&e)}var Jp,Qp=m(()=>{"use strict";a();Ge();T();B1();Jp=Ee("vc-expandableheader-")});function XP({guild:e,guildMember:t}){let n=Mo.use(["permissionsSortOrder"]),[r,i]=zt(()=>{let R=[],C=ga(e,t),_=C.map($=>({type:0,...$}));if(e.ownerId===t.userId){_.push({type:2,permissions:Object.values(An).reduce((B,q)=>B|q,0n)});let $=it.Messages.GUILD_OWNER||"Server Owner";R.push({permission:$,roleColor:"var(--primary-300)",rolePosition:1/0})}E1(C);for(let[$,B]of Object.entries(An))for(let{permissions:q,colorString:ee,position:j,name:z}of C)if((q&B)===B){R.push({permission:fa($),roleColor:ee||"var(--primary-300)",rolePosition:j});break}return R.sort(($,B)=>B.rolePosition-$.rolePosition),[_,R]},[n.permissionsSortOrder]),{root:s,role:l,roleRemoveButton:c,roleNameOverflow:u,roles:h,rolePill:f,rolePillBorder:y,roleCircle:S,roleName:x}=ZP;return o(Pi,{headerText:"Permissions",moreTooltipText:"Role Details",onMoreClick:()=>Sr(r,e,t.nick||F.getUser(t.userId).username),defaultState:Mo.store.defaultPermissionsDropdownState,buttons:[o(W,{text:`Sorting by ${n.permissionsSortOrder===0?"Highest Role":"Lowest Role"}`},R=>o("button",{...R,className:Ct("userperms-sortorder-btn"),onClick:()=>{n.permissionsSortOrder=n.permissionsSortOrder===0?1:0}},o("svg",{width:"20",height:"20",viewBox:"0 96 960 960",transform:n.permissionsSortOrder===0?"scale(1 1)":"scale(1 -1)"},o("path",{fill:"var(--text-normal)",d:"M440 896V409L216 633l-56-57 320-320 320 320-56 57-224-224v487h-80Z"}))))]},i.length>0&&o("div",{className:J(s,h)},i.map(({permission:R,roleColor:C})=>o("div",{className:J(l,f,y)},o("div",{className:c},o("span",{className:S,style:{backgroundColor:C}})),o("div",{className:x},o(Q,{className:u,variant:"text-xs/medium"},R))))))}var ZP,F1,$1=m(()=>{"use strict";a();ie();Qp();sn();fe();O();T();wi();Ti();xi();ZP=dt(()=>{let e=Or(K.byProps("roles","rolePill","rolePillBorder"),K.byProps("roleCircle","dotBorderBase","dotBorderColor"),K.byProps("roleNameOverflow","root","roleName","roleRemoveButton"));return Object.assign({},...e)});F1=A.wrap(XP,{noop:!0})});function Vp(e,t,n){return n===0&&!Ae.isMember(e,t)?null:o(L.MenuItem,{id:"perm-viewer-permissions",label:"Permissions",action:()=>{let r=ue.getGuild(e),i,s;switch(n){case 0:{let l=Ae.getMember(e,t);i=ga(r,l).map(c=>({type:0,...c})),r.ownerId===t&&i.push({type:2,permissions:Object.values(An).reduce((c,u)=>c|u,0n)}),s=l.nick??F.getUser(l.userId).username;break}case 1:{let l=Z.getChannel(t);i=ha(Object.values(l.permissionOverwrites).map(({id:c,allow:u,deny:h,type:f})=>({type:f,id:c,overwriteAllow:u,overwriteDeny:h})),e),s=l.name;break}default:{i=Object.values(r.roles).map(l=>({type:0,...l})),s=r.name;break}}Sr(i,r,s)}})}function ed(e,t){return(n,r)=>()=>{if(!r)return n;let i=nt(e,n),s=(()=>{switch(t){case 0:return Vp(r.guildId,r.user.id,t);case 1:return Vp(r.guild.id,r.channel.id,t);case 2:return Vp(r.guild.id);default:return null}})();s!=null&&(i?i.push(s):e==="roles"&&r.guildId&&n.splice(-1,0,o(L.MenuGroup,null,s)))}}var Mo,td,wi=m(()=>{"use strict";a();R1();Pt();D();w();b();T();xi();$1();Ti();Mo=k({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}});td=g({name:"PermissionsViewer",description:"View the permissions a user or channel has, and the roles of a server",authors:[p.Nuckyz,p.Ven],settings:Mo,patches:[{find:".Messages.BOT_PROFILE_SLASH_COMMANDS",replacement:{match:/showBorder:.{0,60}}\),(?<=guild:(\i),guildMember:(\i),.+?)/,replace:(e,t,n)=>`${e}$self.UserPermissions(${t},${n}),`}}],UserPermissions:(e,t)=>!!t&&o(F1,{guild:e,guildMember:t}),userContextMenuPatch:ed("roles",0),channelContextMenuPatch:ed(["mute-channel","unmute-channel"],1),guildContextMenuPatch:ed("privacy",2),start(){pe("user-context",this.userContextMenuPatch),pe("channel-context",this.channelContextMenuPatch),pe("guild-context",this.guildContextMenuPatch)},stop(){de("user-context",this.userContextMenuPatch),de("channel-context",this.channelContextMenuPatch),de("guild-context",this.guildContextMenuPatch)}})});function G1(e){let t=e instanceof File,n=t?URL.createObjectURL(e):e;return new Promise((r,i)=>{let s=new Image;s.onload=()=>{t&&URL.revokeObjectURL(n),r(s)},s.onerror=(l,c,u,h,f)=>i(f||l),s.crossOrigin="Anonymous",s.src=n})}async function oM(e,t,n){for(let r of e)switch(r.name){case"image":let i=nM.getUploads(t.channel.id,U1)[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 eM(r.value)).getAvatarURL(n?void 0:t.guild?.id,2048).replace(/\?size=\d+$/,"?size=2048")}catch(s){throw console.error(`[petpet] Failed to fetch user
`,s),"Failed to fetch user. Check the console for more info."}}return null}var U1,JP,QP,ya,VP,eM,tM,nM,nd,H1=m(()=>{"use strict";a();_t();w();mi();sn();b();O();U1=0,JP=20,QP=128,ya=10,VP=$n(()=>Promise.all(Array.from({length:ya},(e,t)=>G1(`https://raw.githubusercontent.com/VenPlugs/petpet/main/frames/pet${t}.gif`)))),eM=ce(".USER("),tM=ce("UPLOAD_FILE_LIMIT_ERROR"),nM=P("getUploads");nd=g({name:"petpet",description:"Adds a /petpet slash command to create headpet gifs from any image",authors:[p.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{GIFEncoder:n,quantize:r,applyPalette:i}=await ta(),s=await VP(),l=Oe(e,"no-server-pfp",!1);try{var c=await oM(e,t,l);if(!c)throw"No Image specified!"}catch(C){oe(t.channel.id,{content:String(C)});return}let u=await G1(c),h=Oe(e,"delay",JP),f=Oe(e,"resolution",QP),y=new n,S=document.createElement("canvas");S.width=S.height=f;let x=S.getContext("2d");for(let C=0;C<ya;C++){x.clearRect(0,0,S.width,S.height);let _=C<ya/2?C:ya-C,$=.8+_*.02,B=.8-_*.05,q=(1-$)*.5+.1,ee=1-B-.08;x.drawImage(u,q*f,ee*f,$*f,B*f),x.drawImage(s[C],0,0,f,f);let{data:j}=x.getImageData(0,0,f,f),z=r(j,256),te=i(j,z);y.writeFrame(te,f,f,{transparent:!0,palette:z,delay:h})}y.finish();let R=new File([y.bytesView()],"petpet.gif",{type:"image/gif"});setTimeout(()=>tM([R],t.channel,U1),10)}}]})});function W1(){return st(["plugins.PinDMs.pinnedDMs"]),va()}function br(e){return va().has(e)}function q1(e){let t=va();t.delete(e)||t.add(e),j1([...t])}function rd(){return va(),Mi.store.pinOrder===0?rM.getPrivateChannelIds().filter(br):Fn}function K1(e){return rd()[e]}function id(e,t){let n=z1(),r=n.indexOf(e),i=r+t;[n[r],n[i]]=[n[i],n[r]],j1(n)}var Mi,rM,Fn,od,z1,j1,iM,va,sd=m(()=>{"use strict";a();D();b();O();Mi=k({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}]}}),rM=ae("PrivateChannelSortStore"),z1=()=>(M.plugins.PinDMs.pinnedDMs||void 0)?.split(","),j1=e=>{od=void 0,M.plugins.PinDMs.pinnedDMs=e.join(",")},iM=()=>(Fn=z1()??[],od=new Set(Fn)),va=()=>od??iM()});function Y1(e){let t=br(e),n=t&&Mi.store.pinOrder===1;return o(d,null,o(L.MenuItem,{id:"pin-dm",label:t?"Unpin DM":"Pin DM",action:()=>q1(e)}),n&&Fn[0]!==e&&o(L.MenuItem,{id:"move-pin-up",label:"Move Pin Up",action:()=>id(e,-1)}),n&&Fn[Fn.length-1]!==e&&o(L.MenuItem,{id:"move-pin-down",label:"Move Pin Down",action:()=>id(e,1)}))}function J1(){pe("gdm-context",Z1),pe("user-context",X1)}function Q1(){de("gdm-context",Z1),de("user-context",X1)}var Z1,X1,V1=m(()=>{"use strict";a();Pt();T();sd();Z1=(e,t)=>()=>{let n=nt("leave-channel",e);n&&n.unshift(Y1(t.channel.id))},X1=(e,t)=>()=>{let n=nt("close-dm",e);if(n){let r=n.findIndex(i=>i?.props?.id==="close-dm");n.splice(r,0,Y1(t.channel.id))}}});var ad,eS=m(()=>{"use strict";a();w();b();V1();sd();ad=g({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:[p.Ven,p.Strencher],settings:Mi,start:J1,stop:Q1,usePinCount(e){let t=W1();return e.length?[t.size]:[]},getChannel(e,t){return e[K1(t)]},isPinned:br,getSnapshot:rd,getScrollOffset(e,t,n,r,i){return br(e)?t*(Fn.indexOf(e)+r)+n:(t+n)*2+t*Fn.length+i},patches:[{find:".privateChannelsHeaderContainer,",replacement:[{match:/privateChannelIds:(\i),/,replace:"privateChannelIds:$1.filter(c=>!$self.isPinned(c)),pinCount:$self.usePinCount($1),"},{match:/(?<=renderRow:(\i)\.renderRow,)sections:\[\i,/,replace:"$&...$1.props.pinCount,"},{match:/children:(\i\.\i\.Messages.DIRECT_MESSAGES)(?<=renderSection=function\((\i)\).+?)/,replace:"children:$2.section===1?'Pinned DMs':$1"},{match:/(?<=preRenderedChildren,(\i)=)((\i)\[\i\[\i\]\]);/,replace:"arguments[0]===1?$self.getChannel($3,arguments[1]):$2;"},{match:/===\i.DMS&&0/,replace:"-1$&"},{match:/(?<=else\{\i\+=)(\i)\*\(.+?(?=;)/,replace:"$self.getScrollOffset(arguments[0],$1,this.props.padding,this.state.preRenderedChildren,$&)"}]},{find:'"mod+alt+right"',replacement:{match:/(?<=(\i)=__OVERLAY__\?\i:.{0,10})\.concat\((.{0,10})\)/,replace:".concat($self.getSnapshot()).concat($2.filter(c=>!$self.isPinned(c)))"}}]})});var ld,tS=m(()=>{"use strict";a();w();b();ld=g({name:"PlainFolderIcon",description:"Doesn't show the small guild icons in folders",authors:[p.botato],patches:[{find:".expandedFolderIconWrapper",replacement:[{match:/\(\w\|\|\w\)&&(\(.{0,40}\(.{1,3}\.animated)/,replace:"$1"}]}]})});var pd={};ge(pd,{__addDecoratorsToList:()=>sM,addDecorator:()=>cd,decorators:()=>Sa,removeDecorator:()=>ud});function cd(e,t,n){Sa.set(e,{decorator:t,onlyIn:n})}function ud(e){Sa.delete(e)}function sM(e){let t=!!e.guildId;return[...Sa.values()].map(n=>{let{decorator:r,onlyIn:i}=n;return!i||i==="guilds"&&t||i==="dms"&&!t?r(e):null})}var Sa,dd=m(()=>{"use strict";a();Sa=new Map});var gd={};ge(gd,{__addDecorationsToMessage:()=>aM,addDecoration:()=>md,decorations:()=>ba,removeDecoration:()=>fd});function md(e,t){ba.set(e,t)}function fd(e){ba.delete(e)}function aM(e){return[...ba.values()].map(t=>t(e))}var ba,hd=m(()=>{"use strict";a();ba=new Map});function Ta(e,t){return({color:n,tooltip:r})=>o(W,{text:r},i=>o("svg",{...i,height:t?.height??20,width:t?.width??20,viewBox:t?.viewBox??"0 0 24 24",fill:n},o("path",{d:e})))}var lM,nS,cM,uM,pM,vd,oS,yd,Sd,rS=m(()=>{"use strict";a();Ps();dd();hd();D();ie();w();b();O();T();lM=ae("SessionsStore");nS={desktop:Ta("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:Ta("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:Ta("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:Ta("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"})},cM=ce(".TWITCH",".STREAMING",".INVISIBLE"),uM=({platform:e,status:t})=>{let n=e[0].toUpperCase()+e.slice(1),r=nS[e]??nS.desktop;return o(r,{color:`var(--${cM(t)}`,tooltip:n})},pM=e=>ao.getState()?.clientStatuses?.[e],vd=({user:e,wantMargin:t=!0,wantTopMargin:n=!1})=>{if(!e||e.bot)return null;if(e.id===F.getCurrentUser().id){let s=lM.getSessions();if(typeof s!="object")return null;let l=Object.values(s).sort(({status:h},{status:f})=>h===f?0:h==="online"?1:f==="online"?-1:h==="idle"?1:f==="idle"?-1:0),c=Object.values(l).reduce((h,f)=>(f.clientInfo.client!=="unknown"&&(h[f.clientInfo.client]=f.status),h),{}),{clientStatuses:u}=ao.getState();u[F.getCurrentUser().id]=c}let r=ao.getState()?.clientStatuses?.[e.id];if(!r)return null;let i=Object.entries(r).map(([s,l])=>o(uM,{key:s,platform:s,status:l}));return i.length?o("span",{className:"vc-platform-indicator",style:{display:"inline-flex",justifyContent:"center",alignItems:"center",marginLeft:t?4:0,verticalAlign:"top",position:"relative",top:n?2:0,padding:t?0:1,gap:2}},i):null},oS={component:e=>o(vd,{...e,wantMargin:!1}),position:0,shouldShow:e=>!!Object.keys(pM(e.user.id)??{}).length,key:"indicator"},yd={list:{description:"In the member list",onEnable:()=>cd("platform-indicator",e=>o(A,{noop:!0},o(vd,{user:e.user}))),onDisable:()=>ud("platform-indicator")},badges:{description:"In user profiles, as badges",onEnable:()=>bd(oS),onDisable:()=>Td(oS)},messages:{description:"Inside messages",onEnable:()=>md("platform-indicator",e=>o(A,{noop:!0},o(vd,{user:e.message?.author,wantTopMargin:!0}))),onDisable:()=>fd("platform-indicator")}},Sd=g({name:"PlatformIndicators",description:"Adds platform indicators (Desktop, Mobile, Web...) to users",authors:[p.kemo,p.TheSun,p.Nuckyz,p.Ven],dependencies:["MessageDecorationsAPI","MemberListDecoratorsAPI"],start(){let e=M.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(yd).forEach(([n,r])=>{e[n]&&r.onEnable()})},stop(){Object.entries(yd).forEach(([e,t])=>{t.onDisable()})},patches:[{find:".Masks.STATUS_ONLINE_MOBILE",predicate:()=>M.plugins.PlatformIndicators.colorMobileIndicator,replacement:[{match:/(?<=return \i\.\i\.Masks\.STATUS_TYPING;)(.+?)(\i)\?(\i\.\i\.Masks\.STATUS_ONLINE_MOBILE):/,replace:(e,t,n,r)=>`if(${n})return ${r};${t}`},{match:/(switch\(\i\){case \i\.\i\.ONLINE:return )(\i)\?({.+?}):/,replace:(e,t,n,r)=>`if(${n})return${r};${t}`}]},{find:".AVATAR_STATUS_MOBILE_16;",predicate:()=>M.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,n)=>`${n}?"online":${t}`},{match:/(?<=\i&&!\i)&&\i===\i\.\i\.ONLINE/,replace:""}]},{find:"isMobileOnline=function",predicate:()=>M.plugins.PlatformIndicators.colorMobileIndicator,replacement:{match:/(?<=\i\[\i\.\i\.MOBILE\])===\i\.\i\.ONLINE/,replace:"!= null"}}],options:{...Object.fromEntries(Object.entries(yd).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}}})});var iS=m(()=>{});function xd(){return o(I.Fragment,null,o(v.FormTitle,{tag:"h3"},"More Information"),o(v.FormText,null,"To add your own pronouns, visit"," ",o(at,{href:"https://pronoundb.org"},"pronoundb.org")),o(v.FormDivider,null),o(v.FormText,null,"The two pronoun formats are lowercase and capitalized. Example:",o("ul",null,o("li",null,"Lowercase: they/them"),o("li",null,"Capitalized: They/Them")),'Text like "Ask me my pronouns" or "Any pronouns" will always be capitalized. ',o("br",null),o("br",null),"You can also configure whether or not to display pronouns for the current user (since you probably already know them)"))}var sS=m(()=>{"use strict";a();bo();T()});var eo,xa=m(()=>{"use strict";a();D();b();wa();eo=k({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 Pa,aS=m(()=>{"use strict";a();Pa={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 mM(e){return lS.getGuildMemberProfile(e,sr()?.guild_id)?.pronouns||lS.getUserProfile(e)?.pronouns}function Ma(e){let t=mM(e)?.trim().replace(fM," "),[n]=ot(()=>gM(e),{fallbackValue:pS(e),onError:r=>console.error("Fetching pronouns failed: ",r)});return eo.store.pronounSource===1&&t?[t,"Discord"]:n&&n!=="unspecified"?[yM(n),"PronounDB"]:[t,"Discord"]}function uS(e){let t=Ma(e);return!eo.store.showInProfile||!eo.store.showSelf&&e===F.getCurrentUser().id?cS:t}function pS(e){let t=wd[e];return t&&t!=="unspecified"?t:t||null}function gM(e){return new Promise(t=>{let n=pS(e);if(n)return t(n);if(e in Tr)return Tr[e].push(t);Tr[e]=[t],dM()})}async function hM(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":pl}})).json().then(r=>(Object.assign(wd,r),r))}catch(n){console.error("PronounDB fetching failed: ",n);let r=Object.fromEntries(e.map(i=>[i,"unspecified"]));return Object.assign(wd,r),r}}function yM(e){let{pronounsFormat:t}=M.plugins.PronounDB;return t==="CAPITALIZED"?Pa[e]:t==="LOWERCASE"&&["any","ask","avoid","other"].includes(e)?Pa[e]:Pa[e].toLowerCase()}var lS,cS,wd,Tr,dM,fM,wa=m(()=>{"use strict";a();D();w();nr();tt();ve();O();T();xa();aS();lS=ae("UserProfileStore"),cS=[null,""],wd={},Tr={},dM=At(async()=>{let e=Object.keys(Tr),t=await hM(e);for(let n of e)Tr[n]?.forEach(r=>r(t[n])),delete Tr[n]});fM=/\n+/g});function dS(e){return!(!eo.store.showInMessages||e.author.bot||e.author.system||e.type===vM||!eo.store.showSelf&&e.author.id===F.getCurrentUser().id)}function mS({message:e}){return dS(e)?o(SM,{message:e}):null}function fS({message:e}){return dS(e)?o(bM,{message:e}):null}function SM({message:e}){let[t]=Ma(e.author.id);return t?o("span",{className:J(Ia.timestampInline,Ia.timestamp)},"\u2022 ",t):null}function bM({message:e}){let[t]=Ma(e.author.id);return t?o("span",{className:J(Ia.timestampInline,Ia.timestamp,"vc-pronoundb-compact")},"\u2022 ",t):null}var Ia,vM,gS=m(()=>{"use strict";a();fe();O();T();wa();xa();Ia=P("timestampInline"),vM=24});var hS,Pd,yS=m(()=>{"use strict";a();iS();w();b();sS();gS();wa();xa();hS={match:/text:(.{0,10}.Messages\.USER_PROFILE_PRONOUNS)(?=,)/,replace:'$& + (typeof vcPronounSource !== "undefined" ? ` (${vcPronounSource})` : "")'},Pd=g({name:"PronounDB",authors:[p.Tyman,p.TheKodeToad,p.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(e)"}},{find:"showCommunicationDisabledStyles",replacement:{match:/(?<=return\s*\(0,\i\.jsxs?\)\(.+!\i&&)(\(0,\i.jsxs?\)\(.+?\{.+?\}\))/,replace:"[$1, $self.PronounsChatComponentWrapper(e)]"}},{find:".userTagNoNickname",replacement:[{match:/,(\i)=(\i)\.pronouns/,replace:",[$1,vcPronounSource]=$self.useProfilePronouns($2.user.id)"},hS]},{find:".USER_PROFILE_ACTIVITY",replacement:[{match:/getGlobalName\(\i\);(?<=displayProfile.{0,200})/,replace:"$&const [vcPronounce,vcPronounSource]=$self.useProfilePronouns(arguments[0].user.id);if(arguments[0].displayProfile&&vcPronounce)arguments[0].displayProfile.pronouns=vcPronounce;"},hS]}],settings:eo,settingsAboutComponent:xd,PronounsChatComponentWrapper:mS,CompactPronounsChatComponentWrapper:fS,useProfilePronouns:uS})});var Md,vS=m(()=>{"use strict";a();Ko();w();tt();b();T();Md=g({name:"QuickMention",authors:[p.kemo],description:"Adds a quick mention button to the message actions bar",dependencies:["MessagePopoverAPI"],start(){bn("QuickMention",e=>({label:"Quick Mention",icon:this.Icon,message:e,channel:Z.getChannel(e.channel_id),onClick:()=>Hn(`<@${e.author.id}> `)}))},stop(){Tn("QuickMention")},Icon:()=>o("svg",{className:"icon",height:"24",width:"24",viewBox:"0 0 24 24",fill:"currentColor"},o("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 IS(e,t){let n=e.findIndex(r=>r.id===t);return n===-1?n:e.length-n-1}function TS({channelId:e,messageId:t,_isQuickEdit:n}){if(n)return;let r=F.getCurrentUser().id,i=un.getMessages(e)._array.filter(s=>s.author.id===r);Na=IS(i,t)}function xS({message:e,_isQuickReply:t}){t||(Ca=IS(un.getMessages(e.channel_id)._array,e.id))}function wS(e){let t=e.key==="ArrowUp";!t&&e.key!=="ArrowDown"||!xM(e)||wM(e)||(e.shiftKey?IM(t):MM(t))}function CS(e,t){let n=document.getElementById("message-content-"+t);if(!n)return;let r=Math.max(document.documentElement.clientHeight,window.innerHeight),i=n.getBoundingClientRect();(i.bottom<200||i.top-r>=-200)&&TM.jumpToMessage({channelId:e,messageId:t,flash:!1,jumpType:"INSTANT"})}function NS(e,t){let n=un.getMessages(Pe.getChannelId())._array;if(!t){let l=F.getCurrentUser().id;n=n.filter(c=>c.author.id===l)}let r=l=>e?Math.min(n.length-1,l+1):Math.max(-1,l-1),i=l=>{do l=r(l);while(l!==-1&&n[n.length-l-1]?.deleted===!0);return l},s;return t?Ca=s=i(Ca):Na=s=i(Na),s===-1?void 0:n[n.length-s-1]}function PM(e){let{enabled:t,userList:n,shouldPingListed:r}=M.plugins.NoReplyMention,i=!t||r===n.includes(e.author.id);switch(MS.store.shouldMention){case 2:return i;case 0:return!1;default:return!0}}function MM(e){let t=NS(e,!0);if(!t)return void E.dispatch({type:"DELETE_PENDING_REPLY",channelId:Pe.getChannelId()});let n=Z.getChannel(t.channel_id),r=F.getCurrentUser().id;E.dispatch({type:"CREATE_PENDING_REPLY",channel:n,message:t,shouldMention:PM(t),showMentionToggle:n.guild_id!==null&&t.author.id!==r,_isQuickReply:!0}),CS(n.id,t.id)}function IM(e){let t=NS(e,!1);t?(E.dispatch({type:"MESSAGE_START_EDIT",channelId:t.channel_id,messageId:t.id,content:t.content,_isQuickEdit:!0}),CS(t.channel_id,t.id)):E.dispatch({type:"MESSAGE_END_EDIT",channelId:Pe.getChannelId()})}var TM,PS,Ca,Na,MS,Id,SS,bS,xM,wM,kS=m(()=>{"use strict";a();D();w();b();O();T();TM=P("jumpToMessage"),PS=navigator.platform.includes("Mac"),Ca=-1,Na=-1,MS=k({shouldMention:{type:4,description:"Ping reply by default",options:[{label:"Follow NoReplyMention",value:2,default:!0},{label:"Enabled",value:1},{label:"Disabled",value:0}]}}),Id=g({name:"QuickReply",authors:[p.obscurity,p.Ven,p.pylix],description:"Reply to (ctrl + up/down) and edit (ctrl + shift + up/down) messages via keybinds",settings:MS,start(){E.subscribe("DELETE_PENDING_REPLY",SS),E.subscribe("MESSAGE_END_EDIT",bS),E.subscribe("MESSAGE_START_EDIT",TS),E.subscribe("CREATE_PENDING_REPLY",xS),document.addEventListener("keydown",wS)},stop(){E.unsubscribe("DELETE_PENDING_REPLY",SS),E.unsubscribe("MESSAGE_END_EDIT",bS),E.unsubscribe("MESSAGE_START_EDIT",TS),E.unsubscribe("CREATE_PENDING_REPLY",xS),document.removeEventListener("keydown",wS)}}),SS=()=>Ca=-1,bS=()=>Na=-1;xM=e=>PS?e.metaKey:e.ctrlKey,wM=e=>e.altKey||!PS&&e.metaKey});var Cd,CM,Nd,RS=m(()=>{"use strict";a();w();b();CM="https://raw.githubusercontent.com/facebook/react/17.0.2/scripts/error-codes/codes.json",Nd=g({name:"ReactErrorDecoder",description:'Replaces "Minifed React Error" with the actual error.',authors:[p.Cyn],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,n)=>`${t}{var decoded=Vencord.Plugins.plugins.ReactErrorDecoder.decodeError.apply(null, arguments);if(decoded)return decoded;${n}}`}}],async start(){Cd=await fetch(CM).then(e=>e.json()).catch(e=>console.error(`[ReactErrorDecoder] Failed to fetch React error codes
`,e))},stop(){Cd=void 0},decodeError(e,...t){let n=0;return Cd?.[e]?.replace(/%s/g,()=>{let r=t[n];return n++,r})}})});var Rd={};ge(Rd,{ServerListRenderPosition:()=>ka,addServerListElement:()=>Ii,removeServerListElement:()=>Ci,renderAll:()=>AM});function kd(e){return e===0?kM:RM}function Ii(e,t){kd(e).add(t)}function Ci(e,t){kd(e).delete(t)}var NM,ka,kM,RM,AM,Ra=m(()=>{"use strict";a();be();NM=new Y("ServerListAPI"),ka=(n=>(n[n.Above=0]="Above",n[n.In=1]="In",n))(ka||{}),kM=new Set,RM=new Set;AM=e=>{let t=[];for(let n of kd(e))try{t.unshift(n())}catch(r){NM.error("Failed to render server list element:",r)}return t}});function LM(){let e=[];Object.values(ue.getGuilds()).forEach(t=>{ms.getChannels(t.id).SELECTABLE.forEach(n=>{!$r.hasUnread(n.channel.id)||e.push({channelId:n.channel.id,messageId:$r.lastMessageId(n.channel.id),readStateType:0})})}),E.dispatch({type:"BULK_ACK",context:"APP",channels:e})}var EM,Ad,AS=m(()=>{"use strict";a();Ra();w();b();T();EM=()=>o(N,{onClick:LM,size:N.Sizes.MIN,color:N.Colors.BRAND,style:{marginTop:"2px",marginBottom:"8px",marginLeft:"9px"}},"Read all"),Ad=g({name:"ReadAllNotificationsButton",description:"Read all server notifications with a single button click!",authors:[p.kemo],dependencies:["ServerListAPI"],renderReadAllButton:()=>o(EM,null),start(){Ii(0,this.renderReadAllButton)},stop(){Ci(0,this.renderReadAllButton)}})});var Bt,Aa=m(()=>{"use strict";a();D();b();Bt=k({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 Ld=m(()=>{"use strict";a()});async function _M(){Nt.delMany(["relationship-notifier-guilds","relationship-notifier-groups","relationship-notifier-friends"])}async function Ed(){await _M();let[e,t,n]=await Nt.getMany([LS(),ES(),DS()]);if(await Promise.all([Ea(),Da(),Ni()]),Bt.store.offlineRemovals){if(Bt.store.groups&&t?.size)for(let[r,i]of t)wr.has(r)||to(`You are no longer in the group ${i.name}.`,i.iconURL);if(Bt.store.servers&&e?.size)for(let[r,i]of e)xr.has(r)||to(`You are no longer in the server ${i.name}.`,i.iconURL);if(Bt.store.friends&&n?.friends.length)for(let r of n.friends){if(Xo.friends.includes(r))continue;let i=await Rn.fetchUser(r).catch(()=>{});i&&to(`You are no longer friends with ${zn(i)}.`,i.getAvatarURL(void 0,void 0,!1),()=>mn(i.id))}if(Bt.store.friendRequestCancels&&n?.requests?.length)for(let r of n.requests){if(Xo.requests.includes(r)||[1,2,4].includes(et.getRelationshipType(r)))continue;let i=await Rn.fetchUser(r).catch(()=>{});i&&to(`Friend request from ${zn(i)} has been revoked.`,i.getAvatarURL(void 0,void 0,!1),()=>mn(i.id))}}}function to(e,t,n){Bt.store.notices&&La.showNotice(e,"OK",()=>La.popNotice()),he({title:"Relationship Notifier",body:e,icon:t,onClick:n})}function OS(e){return xr.get(e)}function Dd(e){xr.delete(e),Ea()}async function Ea(){xr.clear();let e=F.getCurrentUser().id;for(let[t,{name:n,icon:r}]of Object.entries(ue.getGuilds()))Ae.isMember(t,e)&&xr.set(t,{id:t,name:n,iconURL:r&&`https://cdn.discordapp.com/icons/${t}/${r}.png`});await Nt.set(LS(),xr)}function _S(e){return wr.get(e)}function Od(e){wr.delete(e),Da()}async function Da(){wr.clear();for(let{type:e,id:t,name:n,rawRecipients:r,icon:i}of Z.getSortedPrivateChannels())e===3&&wr.set(t,{id:t,name:n||r.map(s=>s.username).join(", "),iconURL:i&&`https://cdn.discordapp.com/channel-icons/${t}/${i}.png`});await Nt.set(ES(),wr)}async function Ni(){Xo.friends=[],Xo.requests=[];let e=et.getRelationships();for(let t in e)switch(e[t]){case 1:Xo.friends.push(t);break;case 3:Xo.requests.push(t);break}await Nt.set(DS(),Xo)}var xr,wr,Xo,LS,ES,DS,_d=m(()=>{"use strict";a();ki();uo();tt();T();Aa();Ld();xr=new Map,wr=new Map,Xo={friends:[],requests:[]},LS=()=>`relationship-notifier-guilds-${F.getCurrentUser().id}`,ES=()=>`relationship-notifier-groups-${F.getCurrentUser().id}`,DS=()=>`relationship-notifier-friends-${F.getCurrentUser().id}`});async function US({relationship:{type:e,id:t}}){if(Bd===t){Bd=void 0;return}let n=await Rn.fetchUser(t).catch(()=>null);if(!!n)switch(e){case 1:Bt.store.friends&&to(`${zn(n)} removed you as a friend.`,n.getAvatarURL(void 0,void 0,!1),()=>mn(n.id));break;case 3:Bt.store.friendRequestCancels&&to(`A friend request from ${zn(n)} has been removed.`,n.getAvatarURL(void 0,void 0,!1),()=>mn(n.id));break}}function GS({guild:{id:e,unavailable:t}}){if(!Bt.store.servers||t)return;if(Fd===e){Dd(e),Fd=void 0;return}let n=OS(e);n&&(Dd(e),to(`You were removed from the server ${n.name}.`,n.iconURL))}function HS({channel:{id:e,type:t}}){if(!Bt.store.groups||t!==3)return;if($d===e){Od(e),$d=void 0;return}let n=_S(e);n&&(Od(e),to(`You were removed from the group ${n.name}.`,n.iconURL))}var Bd,Fd,$d,BS,FS,$S,zS=m(()=>{"use strict";a();tt();T();Aa();Ld();_d();BS=e=>Bd=e,FS=e=>Fd=e,$S=e=>$d=e});var Ud,jS=m(()=>{"use strict";a();w();b();zS();Aa();_d();Ud=g({name:"RelationshipNotifier",description:"Notifies you when a friend, group chat, or server removes you.",authors:[p.nick],settings:Bt,patches:[{find:"removeRelationship:function(",replacement:{match:/(removeRelationship:function\((\i),\i,\i\){)/,replace:"$1$self.removeFriend($2);"}},{find:"leaveGuild:function(",replacement:{match:/(leaveGuild:function\((\i)\){)/,replace:"$1$self.removeGuild($2);"}},{find:"closePrivateChannel:function(",replacement:{match:/(closePrivateChannel:function\((\i)\){)/,replace:"$1$self.removeGroup($2);"}}],flux:{GUILD_CREATE:Ea,GUILD_DELETE:GS,CHANNEL_CREATE:Da,CHANNEL_DELETE:HS,RELATIONSHIP_ADD:Ni,RELATIONSHIP_UPDATE:Ni,RELATIONSHIP_REMOVE(e){US(e),Ni()},CONNECTION_OPEN:Ed},async start(){setTimeout(()=>{Ed()},5e3)},removeFriend:BS,removeGroup:$S,removeGuild:FS})});var BM,FM,Gd,WS=m(()=>{"use strict";a();w();b();O();BM=P("spoilerContent"),FM=P("messagesWrapper","messages"),Gd=g({name:"RevealAllSpoilers",description:"Reveal all spoilers in a message by Ctrl-clicking a spoiler, or in the chat with Ctrl+Shift-click",authors:[p.whqwert],patches:[{find:".removeObscurity=function",replacement:{match:/(?<=\.removeObscurity=function\((\i)\){)/,replace:(e,t)=>`$self.reveal(${t});`}}],reveal(e){let{ctrlKey:t,shiftKey:n,target:r}=e;if(!t)return;let{spoilerContent:i,hidden:s}=BM,{messagesWrapper:l}=FM,c=n?document.querySelector(`div.${l}`):r.parentElement;for(let u of c.querySelectorAll(`span.${i}.${s}`))u.click()}})});function qS(e,t){open(t+encodeURIComponent(e),"_blank")}var Oa,KS,Hd,YS=m(()=>{"use strict";a();Pt();wt();_n();w();b();T();Oa={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="};KS=(e,t)=>()=>{if(!t)return;let{reverseImageSearchType:n,itemHref:r,itemSrc:i}=t;if(!n||n!=="img")return;let s=r??i,l=nt("copy-link",e);l&&l.push(o(L.MenuItem,{label:"Search Image",key:"search-image",id:"search-image"},Object.keys(Oa).map((c,u)=>{let h="search-image-"+c;return o(L.MenuItem,{key:h,id:h,label:o(le,{style:{alignItems:"center",gap:"0.5em"}},o("img",{style:{borderRadius:u>=3?"50%":void 0},"aria-hidden":"true",height:16,width:16,src:new URL("/favicon.ico",Oa[c]).toString().replace("lens.","")}),c),action:()=>qS(s,Oa[c])})}),o(L.MenuItem,{key:"search-image-all",id:"search-image-all",label:o(le,{style:{alignItems:"center",gap:"0.5em"}},o(zo,{height:16,width:16}),"All"),action:()=>Object.values(Oa).forEach(c=>qS(s,c))})))},Hd=g({name:"ReverseImageSearch",description:"Adds ImageSearch to image context menus",authors:[p.Ven,p.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(){pe("message",KS)},stop(){de("message",KS)}})});var ZS=m(()=>{});var _a=m(()=>{"use strict";a()});function Pr(e){let{OAuth2AuthorizeModal:t}=Nn("OAuth2AuthorizeModal");Ce(n=>o(t,{...n,scopes:["identify"],responseType:"code",redirectUri:"https://manti.vendicated.dev/api/reviewdb/auth",permissions:0n,clientId:"915703782174752809",cancelCompletesFlow:!1,callback:async r=>{try{let i=new URL(r.location);i.searchParams.append("clientMod","vencord");let s=await fetch(i,{headers:new Headers({Accept:"application/json"})}),{token:l,success:c}=await s.json();c?(_e.store.token=l,Ft("Successfully logged in!"),e?.()):s.status===1&&Ft("An Error occurred while logging in.")}catch(i){new Y("ReviewDB").error("Failed to authorize",i)}}}))}function Ft(e){X.show({type:X.Type.MESSAGE,message:e,id:X.genId(),options:{position:X.Position.BOTTOM}})}function XS(e,t){return e.sender.discordID===t||_e.store.user?.type===1}var tn,Io=m(()=>{"use strict";a();Ge();be();Ze();O();T();_a();Jo();tn=Ee("vc-rdb-")});var _e,Jo=m(()=>{"use strict";a();D();b();T();Io();_e=k({authorize:{type:6,description:"Authorize with ReviewDB",component:()=>o(N,{onClick:Pr},"Authorize with ReviewDB")},notifyReviews:{type:3,description:"Notify about new reviews on startup",default:!0},showWarning:{type:3,description:"Display warning to be respectful at the top of the reviews list",default:!0},hideTimestamps:{type:3,description:"Hide timestamps on reviews",default:!1},website:{type:6,description:"ReviewDB website",component:()=>o(N,{onClick:()=>{let e="https://reviewdb.mantikafasi.dev/";_e.store.token&&(e+="/api/redirect?token="+encodeURIComponent(_e.store.token)),VencordNative.native.openExternal(e)}},"ReviewDB website")},supportServer:{type:6,description:"ReviewDB Support Server",component:()=>o(N,{onClick:()=>{VencordNative.native.openExternal("https://discord.gg/eWPBSbvznt")}},"ReviewDB Support Server")}}).withPrivateSettings()});async function JS(e,t=0){let n=0;_e.store.showWarning||(n|=UM);let r=new URLSearchParams({flags:String(n),offset:String(t)}),i=await fetch(`${Ri}/api/reviewdb/users/${e}/reviews?${r}`),s=i.status===200?await i.json():{success:!1,message:"An Error occured while fetching reviews. Please try again later.",reviews:[],updated:!1,hasNextPage:!1,reviewCount:0};return s.success?s:(Ft(s.message),{...s,reviews:[{id:0,comment:"An Error occured while fetching reviews. Please try again later.",star:0,timestamp:0,sender:{id:0,username:"Error",profilePhoto:"https://cdn.discordapp.com/attachments/1045394533384462377/1084900598035513447/646808599204593683.png?size=128",discordID:"0",badges:[]}}]})}async function QS(e){return e.token=_e.store.token,e.token?fetch(Ri+`/api/reviewdb/users/${e.userid}/reviews`,{method:"PUT",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}).then(t=>t.json()).then(t=>(Ft(t.message),t??null)):(Ft("Please authorize to add a review."),Pr(),null)}function VS(e){return fetch(Ri+`/api/reviewdb/users/${e}/reviews`,{method:"DELETE",headers:new Headers({"Content-Type":"application/json",Accept:"application/json"}),body:JSON.stringify({token:_e.store.token,reviewid:e})}).then(t=>t.json())}async function e0(e){let t=await fetch(Ri+"/api/reviewdb/reports",{method:"PUT",headers:new Headers({"Content-Type":"application/json",Accept:"application/json"}),body:JSON.stringify({reviewid:e,token:_e.store.token})}).then(n=>n.json());Ft(t.message)}function t0(e){return fetch(Ri+"/api/reviewdb/users",{body:JSON.stringify({token:e}),method:"POST"}).then(t=>t.json())}var Ri,Ba,UM,Ai=m(()=>{"use strict";a();Jo();Io();Ri="https://manti.vendicated.dev",Ba=50,UM=2});function n0({onClick:e}){return o(W,{text:"Delete Review"},t=>o("div",{...t,className:J(zd.button,zd.dangerous),onClick:e},o("svg",{width:"16",height:"16",viewBox:"0 0 20 20"},o("path",{fill:"currentColor",d:"M15 3.999V2H9V3.999H3V5.999H21V3.999H15Z"}),o("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 o0({onClick:e}){return o(W,{text:"Report Review"},t=>o("div",{...t,className:zd.button,onClick:e},o("svg",{width:"16",height:"16",viewBox:"0 0 20 20"},o("path",{fill:"currentColor",d:"M20,6.002H14V3.002C14,2.45 13.553,2.002 13,2.002H4C3.447,2.002 3,2.45 3,3.002V22.002H5V14.002H10.586L8.293,16.295C8.007,16.581 7.922,17.011 8.076,17.385C8.23,17.759 8.596,18.002 9,18.002H20C20.553,18.002 21,17.554 21,17.002V7.002C21,6.45 20.553,6.002 20,6.002Z"}))))}var zd,r0=m(()=>{"use strict";a();fe();O();T();zd=P("button","wrapper","disabled","separator")});function jd(e){return o(W,{text:e.name},({onMouseEnter:t,onMouseLeave:n})=>o("img",{className:tn("badge"),width:"24px",height:"24px",onMouseEnter:t,onMouseLeave:n,src:e.icon,alt:e.description,onClick:()=>Ml.openUntrustedLink({href:e.redirectURL})}))}var i0=m(()=>{"use strict";a();T();Io()});var Fa,Wd=m(()=>{"use strict";a();tt();fe();ve();O();T();_a();Ai();Jo();Io();r0();i0();Fa=re(()=>{let e=K.byProps,[{cozyMessage:t,buttons:n,message:r,groupStart:i},{container:s,isHeader:l},{avatar:c,clickable:u,username:h,messageContent:f,wrapper:y,cozy:S},x,R]=Or(e("cozyMessage"),e("container","isHeader"),e("avatar","zalgo"),e("button","wrapper","selected"),e("botTag")),C=new Intl.DateTimeFormat;return function({review:$,refetch:B}){function q(){mn($.sender.discordID)}function ee(){bt.show({title:"Are you sure?",body:"Do you really want to delete this review?",confirmText:"Delete",cancelText:"Nevermind",onConfirm:()=>{VS($.id).then(z=>{z.success&&B(),Ft(z.message)})}})}function j(){bt.show({title:"Are you sure?",body:"Do you really you want to report this review?",confirmText:"Report",cancelText:"Nevermind",onConfirm:()=>e0($.id)})}return o("div",{className:J(t,y,r,i,S,tn("review")),style:{marginLeft:"0px",paddingLeft:"52px",paddingRight:"16px"}},o("img",{className:J(c,u),onClick:q,src:$.sender.profilePhoto||"/assets/1f0bfc0865d324c2587920a7d80c609b.png?size=128",style:{left:"0px"}}),o("div",{style:{display:"inline-flex",justifyContent:"center",alignItems:"center"}},o("span",{className:J(u,h),style:{color:"var(--channels-default)",fontSize:"14px"},onClick:()=>q()},$.sender.username),$.type===3&&o("span",{className:J(R.botTagVerified,R.botTagRegular,R.botTag,R.px,R.rem),style:{marginLeft:"4px"}},o("span",{className:R.botText},"System"))),$.sender.badges.map(z=>o(jd,{...z})),!_e.store.hideTimestamps&&$.type!==3&&o(kn,{timestamp:Jt($.timestamp*1e3)},C.format($.timestamp*1e3)),o("p",{className:J(f),style:{fontSize:15,marginTop:4,color:"var(--text-normal)"}},$.comment),$.id!==0&&o("div",{className:J(s,l,n),style:{padding:"0px"}},o("div",{className:x.wrapper},o(o0,{onClick:j}),XS($,F.getCurrentUser().id)&&o(n0,{onClick:ee}))))}})});function Li({discordId:e,name:t,onFetchReviews:n,refetchSignal:r,scrollToTop:i,page:s=1,showInput:l=!1,hideOwnReview:c=!1}){let[u,h]=Lt(!0),[f]=ot(()=>JS(e,(s-1)*Ba),{fallbackValue:null,deps:[r,u,s],onSuccess:y=>{i?.(),n(y)}});return f?o(d,null,o(HM,{refetch:h,reviews:f.reviews,hideOwnReview:c}),l&&o(qd,{name:t,discordId:e,refetch:h,isAuthor:f.reviews?.some(y=>y.sender.discordID===F.getCurrentUser().id)})):null}function HM({refetch:e,reviews:t,hideOwnReview:n}){let r=F.getCurrentUser().id;return o("div",{className:tn("view")},t?.map(i=>(i.sender.discordID!==r||!n)&&o(Fa,{key:i.id,review:i,refetch:e})),t?.length===0&&o(v.FormText,{className:tn("placeholder")},"Looks like nobody reviewed this user yet. You could be the first!"))}function qd({discordId:e,isAuthor:t,refetch:n,name:r}){let{token:i}=_e.store;function s({key:l,target:c}){l==="Enter"&&QS({userid:e,comment:c.value,star:-1}).then(u=>{u?.success?(c.value="",n()):u?.message&&Ft(u.message)})}return o("textarea",{className:J(GM.inputDefault,"enter-comment",tn("input")),onKeyDownCapture:l=>{l.key==="Enter"&&l.preventDefault()},placeholder:i?t?`Update review for @${r}`:`Review @${r}`:"You need to authorize to review users!",onKeyDown:s,onClick:()=>{i||(Ft("Opening authorization window..."),Pr())}})}var GM,Kd=m(()=>{"use strict";a();fe();ve();O();T();Ai();Jo();Io();Wd();GM=P("inputDefault","editable")});function zM({modalProps:e,discordId:t,name:n}){let[r,i]=V(),[s,l]=Lt(!0),[c,u]=V(1),h=Xt(null),f=r?.reviewCount,y=r?.reviews.find(S=>S.sender.discordID===_e.store.user?.discordID);return o(A,null,o(Le,{...e,size:"medium"},o($e,null,o(Q,{variant:"heading-lg/semibold",className:tn("modal-header")},n,"'s Reviews",!!f&&o("span",null," (",f," Reviews)")),o(xt,{onClick:e.onClose})),o(Ue,{scrollerRef:h},o("div",{className:tn("modal-reviews")},o(Li,{discordId:t,name:n,page:c,refetchSignal:s,onFetchReviews:i,scrollToTop:()=>h.current?.scrollTo({top:0,behavior:"smooth"}),hideOwnReview:!0}))),o(Tt,{className:tn("modal-footer")},o("div",null,y&&o(Fa,{refetch:l,review:y}),o(qd,{isAuthor:y!=null,discordId:t,name:n,refetch:l}),!!f&&o(cs,{currentPage:c,maxVisiblePages:5,pageSize:Ba,totalCount:f,onPageChange:u})))))}function Yd(e,t){Ce(n=>o(zM,{modalProps:n,discordId:e,name:t}))}var s0=m(()=>{"use strict";a();ie();Ze();ve();T();Ai();Jo();Io();Wd();Kd()});var a0,Zd,l0=m(()=>{"use strict";a();ZS();Pt();ie();Qp();_n();w();b();T();s0();Kd();_a();Ai();Jo();Io();a0=(e,t)=>()=>{e.push(o(L.MenuItem,{label:"View Reviews",id:"vc-rdb-server-reviews",icon:zo,action:()=>Yd(t.guild.id,t.guild.name)}))},Zd=g({name:"ReviewDB",description:"Review other users (Adds a new settings to profiles)",authors:[p.mantikafasi,p.Ven],settings:_e,patches:[{find:"disableBorderColor:!0",replacement:{match:/\(.{0,10}\{user:(.),setNote:.,canDM:.,.+?\}\)/,replace:"$&,$self.getReviewsComponent($1)"}}],async start(){let e=_e.store,{token:t,lastReviewId:n,notifyReviews:r}=e;!r||!t||setTimeout(async()=>{let i=await t0(t);if(n&&n<i.lastReviewID&&(e.lastReviewId=i.lastReviewID,i.lastReviewID!==0&&Ft("You have new reviews on your profile!")),pe("guild-header-popout",a0),i.banInfo){let s=new Date(i.banInfo.banEndDate);s.getTime()>Date.now()&&(e.user?.banInfo?.banEndDate??0)<s.getTime()&&bt.show({title:"You have been banned from ReviewDB",body:o(d,null,o("p",null,"You are banned from ReviewDB ",i.type===-1?"permanently":"until "+s.toLocaleString()),i.banInfo.reviewContent&&o("p",null,"Offending Review: ",i.banInfo.reviewContent),o("p",null,"Continued offenses will result in a permanent ban.")),cancelText:"Appeal",confirmText:"Ok",onCancel:()=>VencordNative.native.openExternal("https://reviewdb.mantikafasi.dev/api/redirect?"+new URLSearchParams({token:_e.store.token,page:"dashboard/appeal"}))})}e.user=i},4e3)},stop(){de("guild-header-popout",a0)},getReviewsComponent:A.wrap(e=>{let[t,n]=V();return o(Pi,{headerText:"User Reviews",onMoreClick:()=>Yd(e.id,e.username),moreTooltipText:t&&t>50?`View all ${t} reviews`:"Open Review Modal",onDropDownClick:r=>_e.store.reviewsDropdownState=!r,defaultState:_e.store.reviewsDropdownState},o(Li,{discordId:e.id,name:e.username,onFetchReviews:r=>n(r.reviewCount),showInput:!0}))},{message:"Failed to render Reviews"})})});var Ei,Xd,c0=m(()=>{"use strict";a();D();w();b();T();Ei=k({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}}),Xd=g({name:"RoleColorEverywhere",authors:[p.KingFish,p.lewisakura],description:"Adds the top role color anywhere possible",patches:[{find:'className:"mention"',replacement:[{match:/user:(\i),channel:(\i).{0,300}?"@"\.concat\(.+?\)/,replace:"$&,color:$self.getUserColor($1?.id,{channelId:$2?.id})"}],predicate:()=>Ei.store.chatMentions},{find:".source,children",replacement:[{match:/function \i\((\i)\).{5,20}id.{5,20}guildId.{5,10}channelId.{100,150}hidePersonalInformation.{5,50}jsx.{5,20},{/,replace:"$&color:$self.getUserColor($1.id,{guildId:$1?.guildId}),"}],predicate:()=>Ei.store.chatMentions},{find:".memberGroupsPlaceholder",replacement:[{match:/(memo\(\(function\((\i)\).{300,500}CHANNEL_MEMBERS_A11Y_LABEL.{100,200}roleIcon.{5,20}null,).," \u2014 ",.\]/,replace:"$1$self.roleGroupColor($2)]"}],predicate:()=>Ei.store.memberList},{find:"renderPrioritySpeaker",replacement:[{match:/renderName=function\(\).{50,75}speaking.{50,100}jsx.{5,10}{/,replace:"$&...$self.getVoiceProps(this.props),"}],predicate:()=>Ei.store.voiceUsers}],settings:Ei,getColor(e,{channelId:t,guildId:n}){return(n??=Z.getChannel(t)?.guild_id)?Ae.getMember(n,e)?.colorString??null:null},getUserColor(e,t){let n=this.getColor(e,t);return n&&parseInt(n.slice(1),16)},roleGroupColor({id:e,count:t,title:n,guildId:r}){let s=ue.getGuild(r)?.roles[e];return o("span",{style:{color:s?.colorString,fontWeight:"unset",letterSpacing:".05em"}},n," \u2014 ",t)},getVoiceProps({user:{id:e},guildId:t}){return{style:{color:this.getColor(e,{guildId:t})}}}})});var u0,p0,d0,Jd,m0=m(()=>{"use strict";a();Pt();w();ve();b();O();T();u0=re(()=>ze("M10 8.26667V4L3 11.4667L10 18.9333V14.56C15 14.56 18.5 16.2667 21 20C20 14.6667 17 9.33333 10 8.26667Z")),p0=ce("showMentionToggle","TEXTAREA_FOCUS","shiftKey"),d0=(e,{message:t})=>()=>{if(Pe.getChannelId()!==t.channel_id)return;let n=Z.getChannel(t?.channel_id);if(!n)return;let r=nt("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,o(L.MenuItem,{id:"reply",label:it.Messages.MESSAGE_ACTION_REPLY,icon:u0,action:l=>p0(n,t,l)}))}let i=nt("mark-unread",e);if(i&&!i.some(s=>s?.props?.id==="reply"))return i.unshift(o(L.MenuItem,{id:"reply",label:it.Messages.MESSAGE_ACTION_REPLY,icon:u0,action:s=>p0(n,t,s)}))},Jd=g({name:"SearchReply",description:"Adds a reply button to search results",authors:[p.Aria],start(){pe("message",d0)},stop(){de("message",d0)}})});var f0=m(()=>{});function g0(e){let t=e.slice(1,-1).replace(/(\d)(AM|PM)$/i,"$1 $2"),n=new Date(`${new Date().toDateString()} ${t}`).getTime()/1e3;return isNaN(n)?e:(Date.now()/1e3>n&&(n+=86400),`<t:${Math.round(n)}:t>`)}function WM({rootProps:e,close:t}){let[n,r]=V(),[i,s]=V(""),l=Math.round((new Date(n).getTime()||Date.now())/1e3),c=(f,y)=>`<t:${f}${y&&`:${y}`}>`,[u,h]=zt(()=>{let f=c(l,i);return[f,Ie.parse(f)]},[l,i]);return o(Le,{...e},o($e,{className:Di("modal-header")},o(v.FormTitle,{tag:"h2"},"Timestamp Picker"),o(xt,{onClick:t})),o(Ue,{className:Di("modal-content")},o("input",{type:"datetime-local",value:n,onChange:f=>r(f.currentTarget.value),style:{colorScheme:zr()===2?"light":"dark"}}),o(v.FormTitle,null,"Timestamp Format"),o(ln,{options:jM.map(f=>({label:f,value:f})),isSelected:f=>f===i,select:f=>s(f),serialize:f=>f,renderOptionLabel:f=>o("div",{className:Di("format-label")},Ie.parse(c(l,f.value))),renderOptionValue:()=>h}),o(v.FormTitle,{className:G.bottom8},"Preview"),o(v.FormText,{className:Di("preview-text")},h," (",u,")")),o(Tt,null,o(N,{onClick:()=>{Hn(u+" "),t()}},"Insert")))}var jM,Di,Qd,h0=m(()=>{"use strict";a();f0();Sn();Ge();w();tt();Xe();Ze();b();T();jM=["","t","T","d","D","f","F","R"],Di=Ee("vc-st-");Qd=g({name:"SendTimestamps",description:"Send timestamps easily via chat box button & text shortcuts. Read the extended description!",authors:[p.Ven,p.Tyler],dependencies:["MessageEventsAPI"],patches:[{find:".activeCommandOption",replacement:{match:/(.)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&;try{$2||$1.push($self.chatBarIcon())}catch{}"}}],start(){this.listener=lt((e,t)=>{t.content=t.content.replace(/`\d{1,2}:\d{2} ?(?:AM|PM)?`/gi,g0)})},stop(){ct(this.listener)},chatBarIcon(){return o(W,{text:"Insert Timestamp"},({onMouseEnter:e,onMouseLeave:t})=>o("div",{style:{display:"flex"}},o(N,{"aria-haspopup":"dialog","aria-label":"",size:"",look:Zt.BLANK,onMouseEnter:e,onMouseLeave:t,innerClassName:mt.button,onClick:()=>{let n=Ce(r=>o(WM,{rootProps:r,close:()=>Gn(n)}))},className:Di("button")},o("div",{className:mt.buttonWrapper},o("svg",{"aria-hidden":"true",role:"img",width:"24",height:"24",viewBox:"0 0 24 24"},o("g",{fill:"none","fill-rule":"evenodd"},o("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"}),o("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 o(d,null,o(v.FormText,null,"To quickly send send time only timestamps, include timestamps formatted as `HH:MM` (including the backticks!) in your message"),o(v.FormText,null,"See below for examples. If you need anything more specific, use the Date button in the chat bar!"),o(v.FormText,null,"Examples:",o("ul",null,e.map(t=>o("li",{key:t},o("code",null,t)," ","->"," ",Ie.parse(g0(t)))))))}})});function qM(){return S0=Lt(),o("span",{id:"vc-friendcount",style:{display:"inline-block",width:"100%",fontSize:"12px",fontWeight:"600",color:"var(--header-secondary)",textTransform:"uppercase",textAlign:"center"}},em," online")}function KM(){return b0=Lt(),o("span",{id:"vc-guildcount",style:{display:"inline-block",width:"100%",fontSize:"12px",fontWeight:"600",color:"var(--header-secondary)",textTransform:"uppercase",textAlign:"center"}},v0," servers")}function y0(){em=0;let e=et.getRelationships();for(let t of Object.keys(e))e[t]===1&&ao.getStatus(t)!=="offline"&&(em+=1);S0?.()}function Vd(){v0=ue.getGuildCount(),b0?.()}var em,v0,S0,b0,tm,T0=m(()=>{"use strict";a();Ra();D();ie();w();ve();b();T();em=0,v0=0;tm=g({name:"ServerListIndicators",description:"Add online friend count or server count in the server list",authors:[p.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}=M.plugins.ServerListIndicators;return o(A,{noop:!0},o("div",{style:{marginBottom:"4px"}},!!(e&2)&&o(qM,null),!!(e&1)&&o(KM,null)))},flux:{PRESENCE_UPDATES:y0,GUILD_CREATE:Vd,GUILD_DELETE:Vd},start(){Ii(0,this.renderIndicator),y0(),Vd()},stop(){Ci(0,this.renderIndicator)}})});var x0=m(()=>{});var w0,P0=m(()=>{a();w0=`/* eslint-disable header/header */
import React from "react";
const handleClick = async () =>
console.log((await import("@webpack/common")).Clipboard.copy("\\u200b"));
export const Example: React.FC<{
real: boolean,
shigged?: number,
}> = ({ real, shigged }) => <>
<p>{\`Shigg\${real ? \`ies\${shigged === 0x1B ? "t" : ""}\` : "y"}\`}</p>
<button onClick={handleClick}>Click Me</button>
</>;
`});var I0=Lr((aW,nm)=>{"use strict";a();var YM=Object.prototype.hasOwnProperty,kt="~";function Oi(){}Object.create&&(Oi.prototype=Object.create(null),new Oi().__proto__||(kt=!1));function ZM(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function M0(e,t,n,r,i){if(typeof n!="function")throw new TypeError("The listener must be a function");var s=new ZM(n,r||e,i),l=kt?kt+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 $a(e,t){--e._eventsCount===0?e._events=new Oi:delete e._events[t]}function gt(){this._events=new Oi,this._eventsCount=0}gt.prototype.eventNames=function(){var t=[],n,r;if(this._eventsCount===0)return t;for(r in n=this._events)YM.call(n,r)&&t.push(kt?r.slice(1):r);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(n)):t};gt.prototype.listeners=function(t){var n=kt?kt+t:t,r=this._events[n];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 n=kt?kt+t:t,r=this._events[n];return r?r.fn?1:r.length:0};gt.prototype.emit=function(t,n,r,i,s,l){var c=kt?kt+t:t;if(!this._events[c])return!1;var u=this._events[c],h=arguments.length,f,y;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),h){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,n),!0;case 3:return u.fn.call(u.context,n,r),!0;case 4:return u.fn.call(u.context,n,r,i),!0;case 5:return u.fn.call(u.context,n,r,i,s),!0;case 6:return u.fn.call(u.context,n,r,i,s,l),!0}for(y=1,f=new Array(h-1);y<h;y++)f[y-1]=arguments[y];u.fn.apply(u.context,f)}else{var S=u.length,x;for(y=0;y<S;y++)switch(u[y].once&&this.removeListener(t,u[y].fn,void 0,!0),h){case 1:u[y].fn.call(u[y].context);break;case 2:u[y].fn.call(u[y].context,n);break;case 3:u[y].fn.call(u[y].context,n,r);break;case 4:u[y].fn.call(u[y].context,n,r,i);break;default:if(!f)for(x=1,f=new Array(h-1);x<h;x++)f[x-1]=arguments[x];u[y].fn.apply(u[y].context,f)}}return!0};gt.prototype.on=function(t,n,r){return M0(this,t,n,r,!1)};gt.prototype.once=function(t,n,r){return M0(this,t,n,r,!0)};gt.prototype.removeListener=function(t,n,r,i){var s=kt?kt+t:t;if(!this._events[s])return this;if(!n)return $a(this,s),this;var l=this._events[s];if(l.fn)l.fn===n&&(!i||l.once)&&(!r||l.context===r)&&$a(this,s);else{for(var c=0,u=[],h=l.length;c<h;c++)(l[c].fn!==n||i&&!l[c].once||r&&l[c].context!==r)&&u.push(l[c]);u.length?this._events[s]=u.length===1?u[0]:u:$a(this,s)}return this};gt.prototype.removeAllListeners=function(t){var n;return t?(n=kt?kt+t:t,this._events[n]&&$a(this,n)):(this._events=new Oi,this._eventsCount=0),this};gt.prototype.off=gt.prototype.removeListener;gt.prototype.addListener=gt.prototype.on;gt.prefixed=kt;gt.EventEmitter=gt;typeof nm<"u"&&(nm.exports=gt)});var sm=Lr(Mr=>{"use strict";a();Object.defineProperty(Mr,"__esModule",{value:!0});Mr.Channel=Mr.ChannelPort=void 0;var XM=I0(),Ua="vapIpc",om=Symbol.for("vapIpc.edgeCreate"),rm=class{_pipes=new Map;_listeners=new Map;_createListenerMap(){return new Map}_emit(t,n,...r){for(let[i,s]of this._listeners.entries()){if(i===t)continue;let l=s.get(n);l&&l(...r)}}createPipe(t){let n=this.getPipe(t);if(n)return n;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}};Mr.ChannelPort=rm;var im=class{id;_edges=new Map;_callbacks=new Map;_callers=new Map;_edgePipes=new Map;_pipes=[];_emitter=new XM.EventEmitter;_logger;_destroyed=!1;constructor(t){this.id=t}addPipe(t){t.listen(`${Ua}:handshake`,n=>{this._handleHandshake(t,n)}),t.listen(`${Ua}:message`,n=>{this._handleMessage(t,n)}),this._pipes.push(t),this._logger?.log(`Adding pipe to channel "${this.id}"`)}setLogger(t){this._logger=t}_handleHandshake(t,n){if(this.id===n.id)return;this._logger?.log(`\u{1F91D} "${n.id}" -> "${this.id}" (edges: [${n.channelIds.join(", ")}])`);let r=this._edges.get(n.id);if(r){let i=n.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(n.id,{...n,channelIds:[...r.channelIds,...i]})}else{let i=[...n.channelIds].filter(s=>s!==this.id);this._edges.set(n.id,{...n,channelIds:i}),this._edgePipes.set(n.id,t)}this._emitter.emit(om,n),this.handshakeAll()}_handleMessage(t,n){if(n.proxiedBy===this.id)return;if(n.destination!==this.id)return this._emitMessage({...n,proxiedBy:this.id});if(!n.nonce)return void this._emitter.emit(n.name,n.data);let r=this._callbacks.get(n.nonce);if(r)return void r(n.data);let i=this._callers.get(n.name);if(i){i(n.data).catch(s=>(console.error(s),new Error(s?.message??`${s}`))).then(s=>{this._emitMessage({name:n.name,source:this.id,destination:n.source,data:s,nonce:n.nonce})});return}}_emitHandshake(t){let n=this.getEdge();t.emit(`${Ua}:handshake`,n)}_emitMessage(t){let n=this.findEdgeId(t.destination);if(!n)return;this._edgePipes.get(n)?.emit(`${Ua}:message`,t)}getEdge(){let t=[...this._edges.keys(),...[...this._edges.values()].map(n=>n.channelIds).flat()].filter((n,r,i)=>i.indexOf(n)===r);return{id:this.id,channelIds:t}}findEdgeId(t){for(let n of this._edges.values())if(n.id===t||n.channelIds.includes(t))return n.id;return null}waitForEdge(t){let n=this.findEdgeId(t);return n?Promise.resolve(n):new Promise(r=>{let i=s=>{(s.id===t||s.channelIds.includes(t))&&(this._emitter.off(om,i),r(s.id))};this._emitter.on(om,i)})}createNonce(){return Math.random().toString(16).slice(2)}send(t){this._emitMessage({...t,source:this.id})}call(t,n={timeout:1e4}){let r=this.createNonce(),i=new Promise((s,l)=>{let c=setTimeout(()=>{this._callbacks.delete(r),l(new Error("Call timed out"))},n.timeout);this._callbacks.set(r,u=>{this._callbacks.delete(r),clearTimeout(c),n.signal?.aborted?n.signal.reason instanceof Error&&l(n.signal.reason):u instanceof Error?l(u):s(u)})});return this._emitMessage({...t,source:this.id,nonce:r}),i}on(t,n){return this._emitter.on(t,n),this}off(t,n){return this._emitter.off(t,n),this}once(t,n){this._emitter.once(t,n)}onCall(t,n){this._callers.set(t,async(...r)=>await n(...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}};Mr.Channel=im});var cm=Lr(Ir=>{"use strict";a();Object.defineProperty(Ir,"__esModule",{value:!0});Ir.RemoteClient=Ir.RemoteHost=void 0;var am=class{channel;constructor(t,n){this.channel=t;for(let[r,i]of Object.entries(n))t.onCall(r,async s=>await i(...s));t.handshakeAll()}};Ir.RemoteHost=am;var lm=class{hostName;channel;constructor(t,n){this.hostName=t,this.channel=n}async connect(){await this.channel.waitForEdge(this.hostName)}run(t,...n){return this.channel.call({name:t,destination:this.hostName,data:n})}};Ir.RemoteClient=lm});var k0=Lr(Cr=>{"use strict";a();Object.defineProperty(Cr,"__esModule",{value:!0});Cr.WorkerClient=Cr.createWorkerHost=void 0;var C0=sm(),N0=cm(),JM=(e,t)=>{let n=new C0.Channel(e);return n.addPipe({emit:(r,i)=>postMessage({event:r,data:i}),listen:(r,i)=>addEventListener("message",({data:s})=>{s.event===r&&i(s.data)})}),new N0.RemoteHost(n,t)};Cr.createWorkerHost=JM;var um=class extends N0.RemoteClient{workerOpts;worker;workerListeners=[];url;constructor(t,n,r,i={}){let s=new C0.Channel(t);if(super(n,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:(n,r)=>t.postMessage({event:n,data:r}),listen:(n,r)=>{let i=s=>{let{event:l,data:c}=s.data;l===n&&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)}};Cr.WorkerClient=um});var R0=Lr(no=>{"use strict";a();var QM=no&&no.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),pm=no&&no.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&QM(t,e,n)};Object.defineProperty(no,"__esModule",{value:!0});pm(sm(),no);pm(cm(),no);pm(k0(),no)});function mm(e){Ga.id!==e.id&&(Object.assign(Ga,e),dm.forEach(t=>t(e)))}var Ga,dm,A0,fm=m(()=>{"use strict";a();T();Ga={id:null,theme:null},dm=new Set,A0=()=>{let[,e]=I.useState(Ga);return I.useEffect(()=>(dm.add(e),()=>void dm.delete(e)),[]),Ga}});function Qo(e){if(Object.prototype.hasOwnProperty.call(Nr,e))return Nr[e];let t=Object.values(Nr).find(n=>n.aliases?.includes(e));return t?(oI.set(e,t),t):null}var VM,eI,L0,tI,nI,Nr,E0,D0,oI,Ha=m(()=>{"use strict";a();VM="Vap0r1ze/vapcord",eI="88a7032a59cca40da170926651b08201ea3b965a",L0=`https://raw.githubusercontent.com/${VM}/${eI}/assets/shiki-codeblocks`,tI=e=>`${L0}/${e}`,nI=`${L0}/languages.json`,Nr={},E0=async()=>{let e=await fetch(nI).then(n=>n.json()),t=Object.fromEntries(e.map(n=>[n.id,{...n,grammarUrl:tI(n.fileName)}]));Object.assign(Nr,t)},D0=e=>e.grammar?Promise.resolve(e.grammar):fetch(e.grammarUrl).then(t=>t.json()),oI=new Map});var rI,iI,Se,oo,gm=m(()=>{"use strict";a();rI="shikijs/shiki",iI="0b28ad8ccfbf2615f2d9d38ea8255416b8ac3043",Se=e=>`https://raw.githubusercontent.com/${rI}/${iI}/packages/shiki/themes/${e}.json`,oo={DarkPlus:Se("dark-plus"),MaterialCandy:"https://raw.githubusercontent.com/millsp/material-candy/master/material-candy.json",DraculaSoft:Se("dracula-soft"),Dracula:Se("dracula"),GithubDarkDimmed:Se("github-dark-dimmed"),GithubDark:Se("github-dark"),GithubLight:Se("github-light"),LightPlus:Se("light-plus"),MaterialDarker:Se("material-darker"),MaterialDefault:Se("material-default"),MaterialLighter:Se("material-lighter"),MaterialOcean:Se("material-ocean"),MaterialPalenight:Se("material-palenight"),MinDark:Se("min-dark"),MinLight:Se("min-light"),Monokai:Se("monokai"),Nord:Se("nord"),OneDarkPro:Se("one-dark-pro"),Poimandres:Se("poimandres"),RosePineDawn:Se("rose-pine-dawn"),RosePineMoon:Se("rose-pine-moon"),RosePine:Se("rose-pine"),SlackDark:Se("slack-dark"),SlackOchin:Se("slack-ochin"),SolarizedDark:Se("solarized-dark"),SolarizedLight:Se("solarized-light"),VitesseDark:Se("vitesse-dark"),VitesseLight:Se("vitesse-light"),CssVariables:Se("css-variables")}});var _0,hm,O0,se,_i=m(()=>{"use strict";a();mi();_0=al(R0());fm();Ha();gm();hm=Object.values(oo),se={client:null,currentTheme:null,currentThemeUrl:null,timeoutMs:1e4,languages:Nr,themes:oo,loadedThemes:new Set,loadedLangs:new Set,clientPromise:new Promise(e=>O0=e),init:async e=>{let t=await fetch(Qy).then(i=>i.blob()),n=se.client=new _0.WorkerClient("shiki-client","shiki-host",t,{name:"ShikiWorker"});await n.init();let r=e||hm[0];await E0(),await n.run("setOnigasm",{wasm:Vy}),await n.run("setHighlighter",{theme:r,langs:[]}),se.loadedThemes.add(r),await se._setTheme(r),O0(n)},_setTheme:async e=>{se.currentThemeUrl=e;let{themeData:t}=await se.client.run("getTheme",{theme:e});se.currentTheme=JSON.parse(t),mm({id:e,theme:se.currentTheme})},loadTheme:async e=>{let t=await se.clientPromise;se.loadedThemes.has(e)||(await t.run("loadTheme",{theme:e}),se.loadedThemes.add(e))},setTheme:async e=>{await se.clientPromise,e||=hm[0],se.loadedThemes.has(e)||await se.loadTheme(e),await se._setTheme(e)},loadLang:async e=>{let t=await se.clientPromise,n=Qo(e);!n||se.loadedLangs.has(n.id)||(await t.run("loadLanguage",{lang:{...n,grammar:n.grammar??await D0(n)}}),se.loadedLangs.add(n.id))},tokenizeCode:async(e,t)=>{let n=await se.clientPromise,r=Qo(t);return r?(se.loadedLangs.has(r.id)||await se.loadLang(r.id),await n.run("codeToThemedTokens",{code:e,lang:t,theme:se.currentThemeUrl??hm[0]})):[]},destroy(){se.currentTheme=null,se.currentThemeUrl=null,mm({id:null,theme:null}),se.client?.destroy()}}});var Bi,ym=m(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/shikiCodeblocks/devicon.css",{name:"src/plugins/shikiCodeblocks/devicon.css",source:`@import url("https://cdn.jsdelivr.net/gh/devicons/devicon@v2.10.1/devicon.min.css");
`,classNames:{},dom:null});Bi="src/plugins/shikiCodeblocks/devicon.css"});var Fi=m(()=>{"use strict";a()});var aI,Co,vm=m(()=>{"use strict";a();D();Ge();fe();Wn();b();_i();gm();ym();Fi();aI=Object.keys(oo),Co=k({theme:{type:4,description:"Default themes",options:aI.map(e=>({label:jn(_l(e)),value:oo[e],default:oo[e]===oo.DarkPlus})),onChange:se.setTheme},customTheme:{type:0,description:"A link to a custom vscode theme",placeholder:oo.MaterialCandy,onChange:e=>{se.setTheme(e||Co.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"?Mt(Bi):Je(Bi)}},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=vl(e);return t?t.pathname.endsWith(".json")?!0:"Must be a json file":"Must be a valid URL"}}})});function F0(e,t){let n=Co.use(e),[r,i]=I.useState(!1),s={...n,...t},l=s.customTheme||s.theme;if(t){let c=se.currentThemeUrl&&l&&l!==se.currentThemeUrl,u=Object.keys(t).length===0;r&&(!c||u)&&i(!1),!r&&c&&(i(!0),se.setTheme(l))}return{...s,isThemeLoading:l!==se.currentThemeUrl}}var $0=m(()=>{"use strict";a();T();_i();vm()});function U0(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 G0=m(()=>{"use strict";a()});var wn,H0,$i=m(()=>{"use strict";a();Ge();T();Ha();Fi();wn=Ee("shiki-"),H0=({lang:e,tryHljs:t})=>{let n=e?Bo?.getLanguage?.(e):null,i=(e?Qo(e):null)?.name;switch(t){case"ALWAYS":return!0;case"PRIMARY":return!!n||e==="";case"SECONDARY":return!i&&!!n;case"NEVER":return!1;default:return!1}}});function z0(e){let[t,n]=I.useState(!1);function r(i){Kt.copy(i),n(!0),setTimeout(()=>{n(!1)},e)}return[t,r]}var j0=m(()=>{"use strict";a();T()});function W0({content:e,...t}){let[n,r]=z0(1e3);return o("button",{...t,style:{...t.style,cursor:n?"default":void 0},onClick:()=>r(e)},n?"Copied!":"Copy")}var q0=m(()=>{"use strict";a();j0()});function K0({content:e,theme:t}){let n=[];return Kt.SUPPORTS_COPY&&n.push(o(W0,{content:e,className:wn("btn"),style:{backgroundColor:t.accentBgColor,color:t.accentFgColor}})),o("div",{className:wn("btns")},n)}var Y0=m(()=>{"use strict";a();T();$i();q0()});var Z0,X0=m(()=>{"use strict";a();T();$i();Z0=({theme:e,useHljs:t,lang:n,content:r,tokens:i})=>{let s;if(t)try{let{value:c}=Bo.highlight(n,r,!0);s=c.split(`
`).map((u,h)=>o("span",{key:h,dangerouslySetInnerHTML:{__html:u}}))}catch{s=r.split(`
`).map(c=>o("span",null,c))}else s=(i??r.split(`
`).map(u=>[{color:e.plainColor,content:u}])).map(u=>u.length===0?o("span",null,`
`):o(d,null,u.map(({content:h,color:f,fontStyle:y},S)=>o("span",{key:S,style:{color:f,fontStyle:(y??0)&1?"italic":void 0,fontWeight:(y??0)&2?"bold":void 0,textDecoration:(y??0)&4?"underline":void 0}},h))));let l=s.map((c,u)=>o("tr",{key:u},o("td",{style:{color:e.plainColor}},u+1),o("td",null,c)));return o("table",{className:wn("table")},...l)}});function J0({langName:e,useDevIcon:t,shikiLang:n}){return e?o("div",{className:wn("lang")},t!=="DISABLED"&&n?.devicon&&o("i",{className:`${wn("devicon")} devicon-${n.devicon}${t==="COLOR"?" colored":""}`}),e):o(d,null)}var Q0=m(()=>{"use strict";a();Fi();$i()});var za,lI,V0=m(()=>{"use strict";a();ie();ve();T();Ha();_i();$0();fm();G0();$i();Y0();X0();Q0();za=e=>o("pre",{className:wn("container")},o(A,null,o(lI,{...e}))),lI=({lang:e,content:t,isPreview:n,tempSettings:r})=>{let{tryHljs:i,useDevIcon:s,bgOpacity:l}=F0(["tryHljs","useDevIcon","bgOpacity"],r),{id:c,theme:u}=A0(),h=e?Qo(e):null,f=H0({lang:e,tryHljs:i}),[y,S]=bl(!0),[x]=ot(async()=>!h||f||!S?null:await se.tokenizeCode(t,e),{fallbackValue:null,deps:[e,t,c,S]}),R={plainColor:u?.fg||"var(--text-normal)",accentBgColor:u?.colors?.["statusBar.background"]||(f?"#7289da":"#007BC8"),accentFgColor:u?.colors?.["statusBar.foreground"]||"#FFF",backgroundColor:u?.colors?.["editor.background"]||"var(--background-secondary)"},C;return e&&(C=f?Bo?.getLanguage?.(e)?.name:h?.name),o("div",{ref:y,className:wn("root",{plain:!C,preview:n}),style:{backgroundColor:f?R.backgroundColor:`rgba(${U0(R.backgroundColor).concat(l/100).join(", ")})`,color:R.plainColor}},o("code",null,o(J0,{langName:C,useDevIcon:s,shikiLang:h}),o(Z0,{theme:R,useHljs:f,lang:e,content:t,tokens:x}),!n&&o(K0,{content:t,theme:R})))}});var eb,tb,nb=m(()=>{"use strict";a();eb=new Map,tb=()=>{eb.forEach(e=>e.remove()),eb.clear()}});var Sm,ob=m(()=>{"use strict";a();x0();Ge();w();b();P0();_i();V0();ym();vm();Fi();nb();Sm=g({name:"ShikiCodeblocks",description:"Brings vscode-style codeblocks into Discord, powered by Shiki",authors:[p.Vap],patches:[{find:"codeBlock:{react:function",replacement:{match:/codeBlock:\{react:function\((\i),(\i),(\i)\)\{/,replace:"$&return $self.renderHighlighter($1,$2,$3);"}}],start:async()=>{Co.store.useDevIcon!=="DISABLED"&&Je(Bi),await se.init(Co.store.customTheme||Co.store.theme)},stop:()=>{se.destroy(),tb()},settingsAboutComponent:({tempSettings:e})=>za({lang:"tsx",content:w0,isPreview:!0,tempSettings:e}),settings:Co,shiki:se,createHighlighter:za,renderHighlighter:({lang:e,content:t})=>za({lang:e,content:t,isPreview:!1})})});var bm,rb=m(()=>{"use strict";a();w();b();bm=g({name:"ShowAllMessageButtons",description:"Always show all message buttons no matter if you are holding the shift key or not.",authors:[p.Nuckyz],patches:[{find:".Messages.MESSAGE_UTILITIES_A11Y_LABEL",replacement:{match:/isExpanded:(\i),(?<=,\1=\i&&(?=(!.+?)[,;]).+?)/,replace:"isExpanded:$2,"}}]})});var ib=m(()=>{});function ab(){let e=Fr(sb.colors.INTERACTIVE_MUTED).hex(),t=Fr(sb.colors.INTERACTIVE_ACTIVE).hex();return o(cI,{color:e,forcedIconColor:t,size:16,tooltipText:it.Messages.CONNECTION_VERIFIED})}var sb,cI,lb=m(()=>{"use strict";a();ve();O();T();sb=ke(e=>e.colors?.INTERACTIVE_MUTED?.css),cI=re(()=>ze(".CONNECTIONS_ROLE_OFFICIAL_ICON_TOOLTIP"))});function cb({id:e,theme:t}){let n=pI.getUserProfile(e);if(!n)return null;let r=n.connectedAccounts;return r?.length?o(uI,null,o(Q,{tag:"h2",variant:"eyebrow",style:{color:"var(--header-primary)"}},"Connections"),o(le,{style:{marginTop:"8px",gap:gI(ja.store.iconSpacing),flexWrap:"wrap"}},r.map(i=>o(vI,{connection:i,theme:t})))):null}function vI({connection:e,theme:t}){let n=mI.get(e.type),r=n.getPlatformUserUrl?.(e),i=o("img",{"aria-label":e.name,src:t==="light"?n.icon.lightSVG:n.icon.darkSVG,style:{width:ja.store.iconSize,height:ja.store.iconSize}}),s=r?Ys:hy;return o(W,{text:o("span",{className:"vc-sc-tooltip"},e.name,e.verified&&o(ab,null),o(s,{height:16,width:16})),key:e.id},l=>r?o("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):o("button",{...l,className:"vc-user-connection",onClick:()=>Yt(e.name)},i))}var uI,pI,dI,mI,fI,gI,ja,hI,yI,Tm,ub=m(()=>{"use strict";a();ib();D();ie();wt();_n();w();fe();ve();b();O();T();lb();uI=re(()=>ze("().lastSection")),pI=ae("UserProfileStore"),dI=ae("ThemeStore"),mI=P("isSupported","getByUrl"),fI=ce(',"--profile-gradient-primary-color"'),gI=e=>(e??0)*2+4,ja=k({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}]}}),hI=A.wrap(e=>o(cb,{id:e.user.id,theme:fI(e.user,e.displayProfile).profileTheme})),yI=A.wrap(e=>o(cb,{id:e.channel.recipients[0],theme:dI.theme}));Tm=g({name:"ShowConnections",description:"Show connected accounts in user popouts",authors:[p.TheKodeToad],patches:[{find:".Messages.BOT_PROFILE_SLASH_COMMANDS",replacement:{match:/,theme:\i\}\)(?=,.{0,100}setNote:)/,replace:"$&,$self.profilePopoutComponent(arguments[0])"}},{find:'"Profile Panel: user cannot be undefined"',replacement:{match:/\(0,\i\.jsx\)\(\i\.\i,\{\}\).{0,100}setNote:/,replace:"$self.profilePanelComponent(arguments[0]),$&"}}],settings:ja,profilePopoutComponent:hI,profilePanelComponent:yI})});var pb=m(()=>{});function fb(e){mb=e}function NI({channel:e}){let[t,n]=V(No.store.defaultAllowedUsersAndRolesDropdownState),[r,i]=V([]),{type:s,topic:l,lastMessageId:c,defaultForumLayout:u,lastPinTimestamp:h,defaultAutoArchiveDuration:f,availableTags:y,id:S,rateLimitPerUser:x,defaultThreadRateLimitPerUser:R,defaultSortOrder:C,defaultReactionEmoji:_,bitrate:$,rtcRegion:B,videoQualityMode:q,permissionOverwrites:ee,guild_id:j}=e;return rt(()=>{let z=[],te=ue.getGuild(j).ownerId;Ae.getMember(j,te)||z.push(te),Object.values(ee).forEach(({type:U,id:Ne})=>{U===1&&!Ae.getMember(j,Ne)&&z.push(Ne)}),z.length>0&&E.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[j],userIds:z}),M.plugins.PermissionsViewer.enabled&&i(ha(Object.values(ee).map(U=>({type:U.type,id:U.id,overwriteAllow:U.allow,overwriteDeny:U.deny})),j))},[S]),o("div",{className:db.auto+" "+db.customTheme+" "+SI.chatContent+" shc-lock-screen-outer-container"},o("div",{className:"shc-lock-screen-container"},o("img",{className:"shc-lock-screen-logo",src:CI}),o("div",{className:"shc-lock-screen-heading-container"},o(Q,{variant:"heading-xxl/bold"},"This is a ",je.can(xm,e)?"locked":"hidden"," ",wI[s]," channel."),e.isNSFW()&&o(W,{text:"NSFW"},({onMouseLeave:z,onMouseEnter:te})=>o("svg",{onMouseLeave:z,onMouseEnter:te,className:"shc-lock-screen-heading-nsfw-icon",width:"32",height:"32",viewBox:"0 0 48 48","aria-hidden":!0,role:"img"},o("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()&&o(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&&o("div",{className:"shc-lock-screen-topic-container"},Ie.parseTopic(l,!1,{channelId:S})),c&&o(Q,{variant:"text-md/normal"},"Last ",e.isForumChannel()?"post":"message"," created:",o(kn,{timestamp:Jt(ir.extractTimestamp(c))})),h&&o(Q,{variant:"text-md/normal"},"Last message pin: ",o(kn,{timestamp:Jt(h)})),(x??0)>0&&o(Q,{variant:"text-md/normal"},"Slowmode: ",qr(x,"seconds")),(R??0)>0&&o(Q,{variant:"text-md/normal"},"Default thread slowmode: ",qr(R,"seconds")),(e.isGuildVoice()||e.isGuildStageVoice())&&$!=null&&o(Q,{variant:"text-md/normal"},"Bitrate: ",$," bits"),B!==void 0&&o(Q,{variant:"text-md/normal"},"Region: ",B??"Automatic"),(e.isGuildVoice()||e.isGuildStageVoice())&&o(Q,{variant:"text-md/normal"},"Video quality mode: ",II[q??1]),(f??0)>0&&o(Q,{variant:"text-md/normal"},"Default inactivity duration before archiving ",e.isForumChannel()?"posts":"threads",":"," "+qr(f,"minutes")),u!=null&&o(Q,{variant:"text-md/normal"},"Default layout: ",MI[u]),C!=null&&o(Q,{variant:"text-md/normal"},"Default sort order: ",PI[C]),_!=null&&o("div",{className:"shc-lock-screen-default-emoji-container"},o(Q,{variant:"text-md/normal"},"Default reaction emoji:"),Ie.defaultRules[_.emojiName?"emoji":"customEmoji"].react({name:_.emojiName?TI.convertSurrogateToName(_.emojiName):pn.getCustomEmojiById(_.emojiId)?.name??"",emojiId:_.emojiId??void 0,surrogate:_.emojiName??void 0,src:_.emojiName?xI.getURL(_.emojiName):void 0},void 0,{key:"0"})),e.hasFlag(16)&&o(Q,{variant:"text-md/normal"},"Posts on this forum require a tag to be set."),y&&y.length>0&&o("div",{className:"shc-lock-screen-tags-container"},o(Q,{variant:"text-lg/bold"},"Available tags:"),o("div",{className:"shc-lock-screen-tags"},y.map(z=>o(bI,{tag:z})))),o("div",{className:"shc-lock-screen-allowed-users-and-roles-container"},o("div",{className:"shc-lock-screen-allowed-users-and-roles-container-title"},M.plugins.PermissionsViewer.enabled&&o(W,{text:"Permission Details"},({onMouseLeave:z,onMouseEnter:te})=>o("button",{onMouseLeave:z,onMouseEnter:te,className:"shc-lock-screen-allowed-users-and-roles-container-permdetails-btn",onClick:()=>Sr(r,ue.getGuild(e.guild_id),e.name)},o("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},o("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"})))),o(Q,{variant:"text-lg/bold"},"Allowed users and roles:"),o(W,{text:t?"Hide Allowed Users and Roles":"View Allowed Users and Roles"},({onMouseLeave:z,onMouseEnter:te})=>o("button",{onMouseLeave:z,onMouseEnter:te,className:"shc-lock-screen-allowed-users-and-roles-container-toggle-btn",onClick:()=>n(U=>!U)},o("svg",{width:"24",height:"24",viewBox:"0 0 24 24",transform:t?"scale(1 -1)":"scale(1 1)"},o("path",{fill:"currentColor",d:"M16.59 8.59003L12 13.17L7.41 8.59003L6 10L12 16L18 10L16.59 8.59003Z"}))))),t&&o(mb,{channel:e}))))}var mb,db,SI,bI,TI,xI,wI,PI,MI,II,CI,gb,hb=m(()=>{"use strict";a();D();ie();ve();Wn();O();T();xi();Ti();wm();db=P("auto","content","scrollerBase"),SI=P("chat","content","noChat","chatContent"),bI=re(()=>Ht(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")})),TI=P("convertSurrogateToName"),xI=P("getURL","buildEmojiReactionColorsPlatformed"),wI={[0]:"text",[5]:"announcement",[15]:"forum",[2]:"voice",[13]:"stage"},PI={[0]:"Latest activity",[1]:"Creation date"},MI={[0]:"Not set",[1]:"List view",[2]:"Gallery view"},II={[1]:"Automatic",[2]:"720p"},CI="/assets/433e3ec4319a9d11b0cbe39342614982.svg";gb=A.wrap(NI)});var yb,xm,Pm,No,Mm,wm=m(()=>{"use strict";a();pb();D();ie();w();Wr();b();O();T();hb();yb=P("channelEmoji","unread","icon"),xm=1n<<10n,Pm=1n<<20n,No=k({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}}),Mm=g({name:"ShowHiddenChannels",description:"Show channels that you do not have access to view.",authors:[p.BigDuck,p.AverageReactEnjoyer,p.D3SOX,p.Ven,p.Nuckyz,p.Nickyux,p.dzshn],settings:No,patches:[{find:".CannotShow=",replacement:[{match:/(?<=isChannelGatedAndVisible\(this\.record\.guild_id,this\.record\.id\).+?renderLevel:)(\i)\..+?(?=,)/,replace:(e,t)=>`this.category.isCollapsed?${t}.WouldShowIfUncollapsed:${t}.Show`},{match:/(?<=(if\(!\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL.+?{)if\(this\.id===\i\).+?};)(if\(!\i\.\i\.isChannelGatedAndVisible\(.+?})(.+?)(?=return{renderLevel:\i\.Show.{0,40}?return \i)/,replace:(e,t,n,r)=>`${r}${t}${n}}`},{match:/(?<=renderLevel:(\i\(this,\i\)\?\i\.Show:\i\.WouldShowIfUncollapsed).+?renderLevel:).+?(?=,)/,replace:(e,t)=>t},{match:/(?<=activeJoinedRelevantThreads.+?renderLevel:.+?,threadIds:\i\(this.record.+?renderLevel:)(\i)\..+?(?=,)/,replace:(e,t)=>`${t}.Show`},{match:/(?<=getRenderLevel=function.+?return ).+?\?(.+?):\i\.CannotShow(?=})/,replace:(e,t)=>t}]},{find:"VoiceChannel, transitionTo: Channel does not have a guildId",replacement:[{match:/(?<=getCurrentClientVoiceChannelId\((\i)\.guild_id\);if\()/,replace:(e,t)=>`!$self.isHiddenChannel(${t})&&`},{match:/(?=\|\|\i\.default\.selectVoiceChannel\((\i)\.id\))/,replace:(e,t)=>`||$self.isHiddenChannel(${t})`},{match:/!__OVERLAY__&&\((?<=selectVoiceChannel\((\i)\.id\).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t},true)||`}]},{find:"VoiceChannel.renderPopout: There must always be something to render",replacement:[...["renderEditButton","renderInviteButton","renderOpenChatButton"].map(e=>({match:new RegExp(`(?<=${e}=function\\(\\){)`,"g"),replace:"if($self.isHiddenChannel(this.props.channel))return null;"}))]},{find:".Messages.CHANNEL_TOOLTIP_DIRECTORY",predicate:()=>No.store.showMode===0,replacement:{match:/(?=switch\((\i)\.type\).{0,30}\.GUILD_ANNOUNCEMENT.{0,30}\(0,\i\.\i\))/,replace:(e,t)=>`if($self.isHiddenChannel(${t}))return $self.LockIcon;`}},{find:".UNREAD_HIGHLIGHT",predicate:()=>No.store.showMode===1,replacement:[{match:/(?<=\i\.name,\i=)(?=(\i)\.muted)/,replace:(e,t)=>`$self.isHiddenChannel(${t}.channel)?true:`},{match:/\(\).children.+?:null(?<=(\i)=\i\.channel,.+?)/,replace:(e,t)=>`${e},$self.isHiddenChannel(${t})?$self.HiddenChannelIcon():null`},{match:/(?<=\.wrapper:\i\(\)\.notInteractive,)(.+?)((\i)\?\i\.MUTED)/,replace:(e,t,n,r)=>`${n}:"",${t}${r}?""`}]},{find:".UNREAD_HIGHLIGHT",replacement:[{predicate:()=>No.store.hideUnreads===!1&&No.store.showMode===1,match:/\.LOCKED:\i(?<=(\i)=\i\.channel,.+?)/,replace:(e,t)=>`${e}&&!$self.isHiddenChannel(${t})`},{predicate:()=>No.store.hideUnreads===!0,match:/(?<=\i\.connected,\i=)(?=(\i)\.unread)/,replace:(e,t)=>`$self.isHiddenChannel(${t}.channel)?false:`}]},{find:'.displayName="ChannelListUnreadsStore"',replacement:{match:/(?<=return null!=(\i))(?=.{0,130}?hasRelevantUnread\(\i\))/g,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`}},{find:"Missing channel in Channel.renderHeaderToolbar",replacement:[{match:/(?<=renderHeaderToolbar=function.+?case \i\.\i\.GUILD_TEXT:)(?=.+?;(.+?{channel:(\i)},"notifications"\)\);))/,replace:(e,t,n)=>`if($self.isHiddenChannel(${n})){${t}break;}`},{match:/(?<=renderHeaderToolbar=function.+?case \i\.\i\.GUILD_FORUM:.+?if\(!\i\){)(?=.+?;(.+?{channel:(\i)},"notifications"\)\)))/,replace:(e,t,n)=>`if($self.isHiddenChannel(${n})){${t};break;}`},{match:/renderMobileToolbar=function.+?case \i\.\i\.GUILD_FORUM:(?<=(\i)\.renderMobileToolbar.+?)/,replace:(e,t)=>`${e}if($self.isHiddenChannel(${t}.props.channel))break;`},{match:/(?<=renderHeaderBar=function.+?hideSearch:(\i)\.isDirectory\(\))/,replace:(e,t)=>`||$self.isHiddenChannel(${t})`},{match:/(?<=renderSidebar=function\(\){)/,replace:"if($self.isHiddenChannel(this.props.channel))return null;"},{match:/(?<=renderChat=function\(\){)/,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"\);else{(?=.+?getChannel\((\i)\))/,replace:(e,t)=>`${e}if($self.isHiddenChannel({channelId:${t}}))return;`}},{find:'"alt+shift+down"',replacement:{match:/(?<=getChannel\(\i\);return null!=(\i))(?=.{0,130}?hasRelevantUnread\(\i\))/,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`}},{find:'"alt+down"',replacement:{match:/(?<=getState\(\)\.channelId.{0,30}?\(0,\i\.\i\)\(\i\))(?=\.map\()/,replace:".filter(ch=>!$self.isHiddenChannel(ch))"}},{find:".Messages.ROLE_REQUIRED_SINGLE_USER_MESSAGE",replacement:[{match:/computePermissionsForRoles.+?}\)}(?<=function (\i)\(.+?)(?=var)/,replace:(e,t)=>`${e}$self.setChannelBeginHeaderComponent(${t});`},{match:/ADMINISTRATOR\)\|\|(?<=context:(\i)}.+?)(?=(.+?)VIEW_CHANNEL)/,replace:(e,t,n)=>`${e}!Vencord.Webpack.Common.PermissionStore.can(${Pm}n,${t})?${n}CONNECT):`},{match:/permissionOverwrites\[.+?\i=(?<=context:(\i)}.+?)(?=(.+?)VIEW_CHANNEL)/,replace:(e,t,n)=>`${e}!Vencord.Webpack.Common.PermissionStore.can(${Pm}n,${t})?${n}CONNECT):`},{match:/sortBy.{0,100}?return (?<=var (\i)=\i\.channel.+?)(?=\i\.id)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?true:`},{match:/computePermissionsForRoles.+?.value\(\)(?<=var (\i)=\i\.channel.+?)/,replace:(e,t)=>`${e}.reduce(...$self.makeAllowedRolesReduce(${t}.guild_id))`},{match:/MANAGE_ROLES.{0,60}?return(?=\(.+?(\(0,\i\.jsxs\)\("div",{className:\i\(\)\.members.+?guildId:(\i)\.guild_id.+?roleColor.+?]}\)))/,replace:(e,t,n)=>(t=t.replace(Uo(/(?<=users:\i)/),`,channel:${n}`),t=t.replace(Uo(/1!==\i\.length/),"true"),`${e} $self.isHiddenChannel(${n},true)?${t}:`)}]},{find:"().avatars),children",replacement:[{match:/=(\i)\.maxUsers,/,replace:(e,t)=>`${e}channel=${t}.channel,`},{match:/\i>0(?=&&.{0,60}renderPopout)/,replace:e=>`($self.isHiddenChannel(typeof channel!=="undefined"?channel:void 0,true)?true:${e})`},{match:/(?<=\.value\(\),(\i)=.+?length-)1(?=\]=.{0,60}renderPopout)/,replace:(e,t)=>`($self.isHiddenChannel(typeof channel!=="undefined"?channel:void 0,true)&&${t}<=0?0:1)`},{match:/(?<="\+",)(\i)\+1/,replace:(e,t)=>`$self.isHiddenChannel(typeof channel!=="undefined"?channel:void 0,true)&&${t}<=0?"":${e}`}]},{find:".Messages.SHOW_CHAT",replacement:[{match:/"more-options-popout"\)\);if\((?<=function \i\((\i)\).+?)/,replace:(e,t)=>`${e}!${t}.inCall&&$self.isHiddenChannel(${t}.channel,true)){}else if(`},{match:/"popup".{0,100}?if\((?<=(\i)\.channel.+?)/,replace:(e,t)=>`${e}(${t}.inCall||!$self.isHiddenChannel(${t}.channel,true))&&`},{match:/this\.renderVoiceChannelEffects.+?children:(?<=renderContent=function.+?)/,replace:"$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?$self.HiddenChannelLockScreen(this.props.channel):"},{match:/this\.renderVoiceChannelEffects.+?disableGradients:(?<=renderContent=function.+?)/,replace:"$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)||"},{match:/(?:{|,)render(?!Header|ExternalHeader).{0,30}?:(?<=renderContent=function.+?)(?!void)/g,replace:"$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?null:"},{match:/callContainer,(?<=\(\)\.callContainer,)/,replace:'$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?"":'}]},{find:"useNotificationSettingsItem: channel cannot be undefined",replacement:[{match:/"124px".+?children:(?<=var (\i)=\i\.channel.+?)(?=.{0,20}?}\)}function)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?$self.HiddenChannelLockScreen(${t}):`},{match:/render(?:BottomLeft|BottomCenter|BottomRight|ChatToasts):(?<=var (\i)=\i\.channel.+?)/g,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?null:`},{match:/"124px".+?disableGradients:(?<=(\i)\.getGuildId\(\).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})||`},{match:/"124px".+?style:(?<=(\i)\.getGuildId\(\).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?void 0:`},{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:'"^/guild-stages/(\\\\d+)(?:/)?(\\\\d+)?"',replacement:{match:/\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL,\i\)/,replace:"true"}},{find:".shouldCloseDefaultModals",replacement:{match:/(?<=getChannel\((\i)\)\)(?=.{0,100}?selectVoiceChannel))/,replace:(e,t)=>`&&!$self.isHiddenChannel({channelId:${t}})`}},{find:'.displayName="GuildChannelStore"',replacement:[{match:/isChannelGated\(.+?\)(?=\|\|)/,replace:e=>`${e}||true`},{match:/(?<=getChannels=function\(\i)\).+?(?=return (\i)})/,replace:(e,t)=>`,shouldIncludeHidden=false${e}${t}=$self.resolveGuildChannels(${t},shouldIncludeHidden);`}]},{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"}}],setChannelBeginHeaderComponent:fb,isHiddenChannel(e,t=!1){return!e||(e.channelId&&(e=Z.getChannel(e.channelId)),!e||e.isDM()||e.isGroupDM()||e.isMultiUserDM())?!1:!je.can(xm,e)||t&&!je.can(Pm,e)},resolveGuildChannels(e,t){if(t)return e;let n={};for(let[r,i]of Object.entries(e)){if(!Array.isArray(i)){n[r]=i;continue}n[r]??=[];for(let s of i)(s.channel.id===null||!this.isHiddenChannel(s.channel))&&n[r].push(s)}return n},makeAllowedRolesReduce(e){return[(t,n,r,i)=>{if(r!==0)return t;let s=i.find(l=>l.id===e);return s?[s]:i},[]]},HiddenChannelLockScreen:e=>o(gb,{channel:e}),LockIcon:A.wrap(()=>o("svg",{className:yb.icon,height:"18",width:"20",viewBox:"0 0 24 24","aria-hidden":!0,role:"img"},o("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:A.wrap(()=>o(W,{text:"Hidden Channel"},({onMouseLeave:e,onMouseEnter:t})=>o("svg",{onMouseLeave:e,onMouseEnter:t,className:yb.icon+" shc-hidden-channel-icon",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":!0,role:"img"},o("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 vb=m(()=>{});var Wa,Im,Sb=m(()=>{"use strict";a();vb();D();w();b();Wa=k({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"}]},inReplies:{type:3,default:!1,description:"Also apply functionality to reply previews"}}),Im=g({name:"ShowMeYourName",description:"Display usernames next to nicks, or no nicks at all",authors:[p.dzshn],patches:[{find:".withMentionPrefix",replacement:{match:/(?<=onContextMenu:\i,children:)\i\+\i/,replace:"$self.renderUsername(arguments[0])"}}],settings:Wa,renderUsername:({author:e,message:t,isRepliedMessage:n,withMentionPrefix:r})=>{if(t.interaction)return e?.nick;try{let{username:i}=t.author,{nick:s}=e,l=r?"@":"";return i===s||n&&!Wa.store.inReplies?l+s:Wa.store.mode==="user-nick"?o(d,null,l,i," ",o("span",{className:"vc-smyn-suffix"},s)):Wa.store.mode==="nick-user"?o(d,null,l,s," ",o("span",{className:"vc-smyn-suffix"},i)):l+i}catch{return e?.nick}}})});function kI(e){let[t,n]=I.useState(Cm);function r(i){Nm.store.persistState&&(Cm=i),n(i)}return I.useEffect(()=>{let i=(s,l)=>{t&&(Nm.store.autoDisable&&r(!1),l.content.startsWith("@silent ")||(l.content="@silent "+l.content))};return lt(i),()=>void ct(i)},[t]),e.type.analyticsName!=="normal"?null:o(W,{text:t?"Disable Silent Message":"Enable Silent Message"},i=>o("div",{style:{display:"flex"}},o(N,{...i,onClick:()=>r(!t),size:"",look:Zt.BLANK,innerClassName:mt.button,style:{padding:"0 6px"}},o("div",{className:mt.buttonWrapper},o("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},o("g",{fill:"currentColor"},o("path",{d:"M18 10.7101C15.1085 9.84957 13 7.17102 13 4C13 3.69264 13.0198 3.3899 13.0582 3.093C12.7147 3.03189 12.3611 3 12 3C8.686 3 6 5.686 6 9V14C6 15.657 4.656 17 3 17V18H21V17C19.344 17 18 15.657 18 14V10.7101ZM8.55493 19C9.24793 20.19 10.5239 21 11.9999 21C13.4759 21 14.7519 20.19 15.4449 19H8.55493Z"}),o("path",{d:"M18.2624 5.50209L21 2.5V1H16.0349V2.49791H18.476L16 5.61088V7H21V5.50209H18.2624Z"}),!t&&o("line",{x1:"22",y1:"2",x2:"2",y2:"22",stroke:"var(--red-500)","stroke-width":"2.5"})))))))}var Cm,Nm,km,bb=m(()=>{"use strict";a();Sn();D();ie();w();b();T();Cm=!1,Nm=k({persistState:{type:3,description:"Whether to persist the state of the silent message toggle when changing channels",default:!1,onChange(e){e===!1&&(Cm=!1)}},autoDisable:{type:3,description:"Automatically disable the silent message toggle again after sending one",default:!0}});km=g({name:"SilentMessageToggle",authors:[p.Nuckyz,p.CatNoir],description:"Adds a button to the chat bar to toggle sending a silent message.",dependencies:["MessageEventsAPI"],settings:Nm,patches:[{find:".activeCommandOption",replacement:{match:/"gift"\)\);(?<=(\i)\.push.+?disabled:(\i),.+?)/,replace:(e,t,n)=>`${e};try{${n}||${t}.push($self.SilentMessageToggle(arguments[0]));}catch{}`}}],SilentMessageToggle:A.wrap(kI,{noop:!0})})});function RI(e){let{isEnabled:t}=ro.use(["isEnabled"]),n=()=>ro.store.isEnabled=!ro.store.isEnabled;return e.type.analyticsName!=="normal"?null:o(W,{text:t?"Disable Silent Typing":"Enable Silent Typing"},r=>o("div",{style:{display:"flex"}},o(N,{...r,onClick:n,size:"",look:Zt.BLANK,innerClassName:mt.button,style:{padding:"0 6px"}},o("div",{className:mt.buttonWrapper},o("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},o("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&&o("path",{d:"M13 432L590 48",stroke:"var(--red-500)","stroke-width":"72","stroke-linecap":"round"}))))))}var ro,Rm,Tb=m(()=>{"use strict";a();_t();D();ie();w();b();T();ro=k({showIcon:{type:3,default:!1,description:"Show an icon for toggling the plugin",restartNeeded:!0},isEnabled:{type:3,description:"Toggle functionality",default:!0}});Rm=g({name:"SilentTyping",authors:[p.Ven,p.dzshn],description:"Hide that you are typing",patches:[{find:"startTyping:",replacement:{match:/startTyping:.+?,stop/,replace:"startTyping:$self.startTyping,stop"}},{find:".activeCommandOption",predicate:()=>ro.store.showIcon,replacement:{match:/(.)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&;try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}"}}],dependencies:["CommandsAPI"],settings:ro,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)=>{ro.store.isEnabled=!!Oe(e,"value",!ro.store.isEnabled),oe(t.channel.id,{content:ro.store.isEnabled?"Silent typing enabled!":"Silent typing disabled!"})}}],async startTyping(e){ro.store.isEnabled||E.dispatch({type:"TYPING_START_LOCAL",channelId:e})},chatBarIcon:A.wrap(RI,{noop:!0})})});var Am,xb=m(()=>{"use strict";a();wt();w();b();T();Lm();Am=g({name:"SortFriendRequests",authors:[p.Megu],description:"Sorts friend requests by date of receipt",patches:[{find:".PENDING_INCOMING||",replacement:[{match:/\.sortBy\(\(function\((\w)\){return \w{1,3}\.comparator}\)\)/,replace:(e,t)=>`.sortBy((function(${t}) {
return ${t}.type === 3 || ${t}.type === 4
? -Vencord.Plugins.plugins.SortFriendRequests.getSince(${t}.user)
: ${t}.comparator
}))`},{predicate:()=>M.plugins.SortFriendRequests.showDates,match:/(user:(\w{1,3}),.{10,30}),subText:(\w{1,3}),(.{10,30}userInfo}\))/,replace:(e,t,n,r,i)=>`${t},
subText: Vencord.Plugins.plugins.SortFriendRequests.makeSubtext(${r}, ${n}),
${i}`}]}],getSince(e){return new Date(et.getSince(e.id))},makeSubtext(e,t){let n=this.getSince(t);return o(le,{flexDirection:"row",style:{gap:0,flexWrap:"wrap",lineHeight:"0.9rem"}},o("span",null,e),!isNaN(n.getTime())&&o("span",null,"Received \u2014 ",n.toDateString()))},options:{showDates:{type:3,description:"Show dates on friend requests",default:!1,restartNeeded:!0}}})});var wb,Pb=m(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/spotifyControls/hoverOnly.css",{name:"src/plugins/spotifyControls/hoverOnly.css",source:`.vc-spotify-button-row {
height: 0;
opacity: 0;
pointer-events: none;
transition: 0.2s;
transition-property: height;
}
#vc-spotify-player:hover .vc-spotify-button-row {
opacity: 1;
height: 32px;
pointer-events: auto;
/* only transition opacity on show to prevent clipping */
transition-property: height, opacity;
}
`,classNames:{},dom:null});wb="src/plugins/spotifyControls/hoverOnly.css"});var Mb=m(()=>{});var ye,Ib=m(()=>{"use strict";a();D();sn();O();T();ye=dt(()=>{let{Store:e}=wl,t=P("getActiveSocketAndDevice"),n=P("SpotifyAPIMarker"),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=M.plugins.SpotifyControls.useSpotifyUris||Vencord.Plugins.isPluginEnabled("OpenInApp")?"spotify:"+c.replaceAll("/",(h,f)=>f===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,h={}){this.device?.is_active&&((h.query??={}).device_id=this.device.id);let{socket:f}=t.getActiveSocketAndDevice();return n[c](f.accountId,f.accessToken,{url:r+u,...h})}}let s=new i(E,{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 Em(e){let t=e/1e3/60,n=Math.floor(t),r=Math.floor((t-n)*60);return`${n.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`}function kr(e,t){return()=>o("svg",{className:J(we("button-icon"),we(t)),height:"24",width:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":t,focusable:!1},o("path",{d:e}))}function Ui(e){return o("button",{className:we("button"),...e},e.children)}function BI({name:e,path:t}){let n=`spotify-copy-${e}`,r=`spotify-open-${e}`;return o(L.Menu,{navId:`spotify-${e}-menu`,onClose:()=>E.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":`Spotify ${e} Menu`},o(L.MenuItem,{key:n,id:n,label:`Copy ${e} Link`,action:()=>Yt("https://open.spotify.com"+t),icon:Ys}),o(L.MenuItem,{key:r,id:r,label:`Open ${e} in Spotify`,action:()=>ye.openExternal(t),icon:zo}))}function FI(e,t){return n=>cn.open(n,()=>o(BI,{name:e,path:t}))}function $I(){let[e,t,n]=Fe([ye],()=>[ye.isPlaying,ye.shuffle,ye.repeat]),[r,i]=(()=>{switch(n){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 ${n}`)}})();return o(le,{className:we("button-row"),style:{gap:0}},o(Ui,{className:J(we("button"),we(t?"shuffle-on":"shuffle-off")),onClick:()=>ye.setShuffle(!t)},o(_I,null)),o(Ui,{onClick:()=>ye.prev()},o(EI,null)),o(Ui,{onClick:()=>ye.setPlaying(!e)},e?o(LI,null):o(AI,null)),o(Ui,{onClick:()=>ye.next()},o(DI,null)),o(Ui,{className:J(we("button"),we(i)),onClick:()=>ye.setRepeat(r),style:{position:"relative"}},n==="track"&&o("span",{className:we("repeat-1")},"1"),o(OI,null)))}function GI(){let{duration:e}=ye.track,[t,n,r]=Fe([ye],()=>[ye.mPosition,ye.isSettingPosition,ye.isPlaying]),[i,s]=V(t);return rt(()=>{if(r&&!n){s(ye.position);let l=setInterval(()=>{s(c=>c+1e3)},1e3);return()=>clearInterval(l)}},[t,n,r]),o("div",{id:we("progress-bar")},o(v.FormText,{variant:"text-xs/medium",className:we("progress-time")+" "+we("time-left"),"aria-label":"Progress"},Em(i)),o(L.MenuSliderControl,{minValue:0,maxValue:e,value:i,onChange:l=>{n||(s(l),UI(l))},renderValue:Em}),o(v.FormText,{variant:"text-xs/medium",className:we("progress-time")+" "+we("time-right"),"aria-label":"Total Duration"},Em(e)))}function HI({track:e}){let t=Fe([ye],()=>ye.volume);return o(L.Menu,{navId:"spotify-album-menu",onClose:()=>E.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Spotify Album Menu"},o(L.MenuItem,{key:"open-album",id:"open-album",label:"Open Album",action:()=>ye.openExternal(`/album/${e.album.id}`),icon:zo}),o(L.MenuItem,{key:"view-cover",id:"view-cover",label:"View Album Cover",action:()=>Fo(e.album.image.url),icon:jo}),o(L.MenuControlItem,{id:"spotify-volume",key:"spotify-volume",label:"Volume",control:(n,r)=>o(L.MenuSliderControl,{...n,ref:r,value:t,minValue:0,maxValue:100,onChange:At(i=>ye.setVolume(i))})}))}function Dm(e,t,n){return t?{role:"link",onClick:()=>ye.openExternal(n),onContextMenu:FI(e,n)}:{}}function zI({track:e}){let t=e?.album?.image,[n,r]=V(!1),i=o(d,null,t&&o("img",{id:we("album-image"),src:t.url,alt:"Album Image",onClick:()=>r(!n),onContextMenu:s=>{cn.open(s,()=>o(HI,{track:e}))}}));return n&&t?o("div",{id:we("album-expanded-wrapper")},i):o("div",{id:we("info-wrapper")},i,o("div",{id:we("titles")},o(v.FormText,{variant:"text-sm/semibold",id:we("song-title"),className:we("ellipoverflow"),title:e.name,...Dm("Song",e.id,`/track/${e.id}`)},e.name),e.artists.some(s=>s.name)&&o(v.FormText,{variant:"text-sm/normal",className:we("ellipoverflow")},"by\xA0",e.artists.map((s,l)=>o(I.Fragment,{key:s.name},o("span",{className:we("artist"),style:{fontSize:"inherit"},title:s.name,...Dm("Artist",s.id,`/artist/${s.id}`)},s.name),l!==e.artists.length-1&&o("span",{className:we("comma")},", ")))),e.album.name&&o(v.FormText,{variant:"text-sm/normal",className:we("ellipoverflow")},"on\xA0",o("span",{id:we("album-title"),className:we("album"),style:{fontSize:"inherit"},title:e.album.name,...Dm("Album",e.album.id,`/album/${e.album.id}`)},e.album.name))))}function Cb(){let e=Fe([ye],()=>ye.track,null,(s,l)=>s?.id?s.id===l?.id:s?.name===l?.name),t=Fe([ye],()=>ye.device,null,(s,l)=>s?.id===l?.id),n=Fe([ye],()=>ye.isPlaying),[r,i]=V(!1);return I.useEffect(()=>{if(i(!1),!n){let s=setTimeout(()=>i(!0),3e5);return()=>clearTimeout(s)}},[n]),!e||!t?.is_active||r?null:o(A,{fallback:()=>o("div",{className:"vc-spotify-fallback"},o("p",null,"Failed to render Spotify Modal :("),o("p",null,"Check the console for errors"))},o("div",{id:we("player")},o(zI,{track:e}),o(GI,null),o($I,null)))}var we,AI,LI,EI,DI,OI,_I,UI,Nb=m(()=>{"use strict";a();Mb();ie();wt();_n();nr();tt();fe();T();Ib();we=e=>`vc-spotify-${e}`;AI=kr("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"),LI=kr("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"),EI=kr("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"),DI=kr("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"),OI=kr("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"),_I=kr("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");UI=At(e=>{ye.seek(e)})});function kb(e){(e?Je:Mt)(wb)}var Om,Rb=m(()=>{"use strict";a();D();Ge();w();b();Pb();Nb();Om=g({name:"SpotifyControls",description:"Adds a Spotify player above the account panel",authors:[p.Ven,p.afn,p.KraXen72],options:{hoverControls:{description:"Show controls on hover",type:3,default:!1,onChange:e=>kb(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:(.{1,3})\.bind\(null,(.{1,6})\.get\)/,replace:"SpotifyAPIMarker:1,post:$1.bind(null,$2.post),$&"}},{find:'repeat:"off"!==',replacement:{match:/repeat:"off"!==(.{1,3}),/,replace:"actual_repeat:$1,$&"}}],start:()=>kb(M.plugins.SpotifyControls.hoverControls),renderPlayer:()=>o(Cb,null)})});var _m,Bm,Ab=m(()=>{"use strict";a();D();w();b();_m=k({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}}),Bm=g({name:"SpotifyCrack",description:"Free listen along, no auto-pausing in voice chat, and allows activity to continue playing when idling",authors:[p.Cyn,p.Nuckyz],settings:_m,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:()=>_m.store.noSpotifyAutoPause,match:/(?<=function \i\(\){)(?=.{0,200}SPOTIFY_AUTO_PAUSED\))/,replace:"return;"},{predicate:()=>_m.store.keepSpotifyActivityOnIdle,match:/(?<=shouldShowActivity=function\(\){.{0,50})&&!\i\.\i\.isIdle\(\)/,replace:""}]}]})});function $m(e,t){t={invalidEmojis:[],tts:!1,validNonShortcutEmojis:[],...t};let n=jI.getPendingReply(e);Lb.sendMessage(e,t,void 0,Lb.getSendMessageOptionsForReply(n)).then(()=>{n&&E.dispatch({type:"DELETE_PENDING_REPLY",channelId:e})})}var Fm,Lb,jI,Um,Eb=m(()=>{"use strict";a();_t();w();b();O();T();Fm=P("getPlayerState"),Lb=P("getSendMessageOptionsForReply","sendMessage"),jI=P("getPendingReply");Um=g({name:"SpotifyShareCommands",description:"Share your current Spotify track, album or artist via slash command (/track, /album, /artist)",authors:[p.katlyn],dependencies:["CommandsAPI"],commands:[{name:"track",description:"Send your current Spotify track to chat",inputType:0,options:[],execute:(e,t)=>{let n=Fm.getTrack();if(n===null){oe(t.channel.id,{content:"You're not listening to any music."});return}$m(t.channel.id,{content:`https://open.spotify.com/track/${n.id}`})}},{name:"album",description:"Send your current Spotify album to chat",inputType:0,options:[],execute:(e,t)=>{let n=Fm.getTrack();if(n===null){oe(t.channel.id,{content:"You're not listening to any music."});return}$m(t.channel.id,{content:`https://open.spotify.com/album/${n.album.id}`})}},{name:"artist",description:"Send your current Spotify artist to chat",inputType:0,options:[],execute:(e,t)=>{let n=Fm.getTrack();if(n===null){oe(t.channel.id,{content:"You're not listening to any music."});return}$m(t.channel.id,{content:n.artists[0].external_urls.spotify})}}]})});var Db={};ge(Db,{default:()=>ZI});function WI({emoji:e,prefix:t,log:n,delta:r,instance:i}){return o(I.Fragment,null,o("span",null,i.sinceStart.toFixed(3),"s"),o("span",null,i.sinceLast.toFixed(3),"s"),o("span",null,r?.toFixed(0)??""),o("span",null,o("pre",null,e," ",t??" ",n)))}function qI({title:e,logs:t,traceEnd:n}){let r=t.find(l=>l.timestamp)?.timestamp??0,i=r,s=t.map(l=>{let c=l.timestamp??i,u=(c-r)/1e3,h=(c-i)/1e3;return i=c,{sinceStart:u,sinceLast:h}});return o(v.FormSection,{title:e,tag:"h1"},o("code",null,n&&o("div",{style:{color:"var(--header-primary)",marginBottom:5,userSelect:"text"}},"Trace ended at: ",new Date(n).toTimeString()),o("div",{style:{color:"var(--header-primary)",display:"grid",gridTemplateColumns:"repeat(3, auto) 1fr",gap:"2px 10px",userSelect:"text"}},o("span",null,"Start"),o("span",null,"Interval"),o("span",null,"Delta"),o("span",{style:{marginBottom:5}},"Event"),Gi.logs.map((l,c)=>o(WI,{key:c,...l,instance:s[c]})))))}function KI({trace:e}){let t=e.split(`
`);return o(v.FormSection,{title:"Server Trace",tag:"h2"},o("code",null,o(le,{flexDirection:"column",style:{color:"var(--header-primary)",gap:5,userSelect:"text"}},t.map(n=>o("span",null,n)))))}function YI(){if(!Gi?.logs)return o("div",null,"Loading...");let e=Gi.logGroups.find(t=>t.serverTrace)?.serverTrace;return o(I.Fragment,null,o(qI,{title:"Startup Timings",logs:Gi.logs,traceEnd:Gi.endTime_}),o("div",{style:{marginTop:5}},"\xA0"),e&&o(KI,{trace:e}))}var Gi,ZI,Ob=m(()=>{"use strict";a();ie();wt();O();T();Gi=P("markWithDelta","markAndLog","markAt");ZI=A.wrap(YI)});var Gm,_b=m(()=>{"use strict";a();w();ve();b();Gm=g({name:"StartupTimings",description:"Adds Startup Timings to the Settings menu",authors:[p.Megu],patches:[{find:"PAYMENT_FLOW_MODAL_TEST_PAGE,",replacement:{match:/{section:.{1,2}\..{1,3}\.PAYMENT_FLOW_MODAL_TEST_PAGE/,replace:'{section:"StartupTimings",label:"Startup Timings",element:$self.StartupTimingPage},$&'}}],StartupTimingPage:re(()=>(Ob(),Lo(Db)).default)})});var Bb,XI,Hm,Fb=m(()=>{"use strict";a();ki();w();fe();Wn();b();dr();T();Dr();pr();Jc();Bb="Vencord-SupportHelper-Dismiss",XI=[Xi,"1024286218801926184","1033680203433660458"],Hm=g({name:"SupportHelper",required:!0,description:"Helps us provide support to you",authors:[p.Ven],dependencies:["CommandsAPI"],commands:[{name:"vencord-debug",description:"Send Vencord Debug info",predicate:e=>XI.includes(e.channel.id),execute(){let{RELEASE_CHANNEL:e}=window.GLOBAL_ENV,t=(()=>"armcord"in window?`ArmCord v${window.armcord.version}`:`${typeof unsafeWindow<"u"?"UserScript":"Web"} (${navigator.userAgent})`)(),n=c=>c.endsWith("API")||Te[c].required,r=Object.keys(Te).filter(c=>Vencord.Plugins.isPluginEnabled(c)&&!n(c)),i=Object.keys(Te).filter(c=>Vencord.Plugins.isPluginEnabled(c)&&n(c)),s={Vencord:`v1.3.4 \u2022 ${rn}${ui.additionalInfo} - ${Intl.DateTimeFormat("en-GB",{dateStyle:"medium"}).format(1689131711949)}`,"Discord Branch":e,Client:t,Platform:window.navigator.platform,Outdated:ho,OpenAsar:"openasar"in window};return{content:`
**Vencord Debug Info**
>>> ${Object.entries(s).map(([c,u])=>`${c}: ${u}`).join(`
`)}
Enabled Plugins (${r.length+i.length}):
${Kr(r.join(", ")+`
`+i.join(", "))}
`.trim().replaceAll("```\n","```")}}}],flux:{async CHANNEL_SELECT({channelId:e}){if(e===Xi&&!_r(F.getCurrentUser().id)&&ho&&rn!==await Nt.get(Bb)){let t=()=>Nt.set(Bb,rn);bt.show({title:"Hold on!",body:o("div",null,o(v.FormText,null,"You are using an outdated version of Vencord! Chances are, your issue is already fixed."),o(v.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})}}}})});function zb(e){let t=e.match(/^(\/)?(.+?)(?:\/([gimsuy]*))?$/);return t?new RegExp(t[2],t[3]?.split("").filter((n,r,i)=>i.indexOf(n)===r).join("")??"g"):new RegExp(e)}function QI(e){try{return zb(e),null}catch(t){return o("span",{style:{color:"var(--text-danger)"}},String(t))}}function zm({initialValue:e,onChange:t,placeholder:n}){let[r,i]=V(e);return o(Re,{placeholder:n,value:r,onChange:i,spellCheck:!1,onBlur:()=>r!==e&&t(r)})}function $b({title:e,rulesArray:t,rulesKey:n,update:r}){let i=e==="Using Regex";async function s(c){t.splice(c,1),await Nt.set(n,t),r()}async function l(c,u,h){u===t.length-1&&t.push(Hb()),t[u][h]=c,t[u].find===""&&t[u].replace===""&&t[u].onlyIfIncludes===""&&u!==t.length-1&&t.splice(u,1),await Nt.set(n,t),r()}return o(d,null,o(v.FormTitle,{tag:"h4"},e),o(le,{flexDirection:"column",style:{gap:"0.5em"}},t.map((c,u)=>o(I.Fragment,{key:`${c.find}-${u}`},o(le,{flexDirection:"row",style:{gap:0}},o(le,{flexDirection:"row",style:{flexGrow:1,gap:"0.5em"}},o(zm,{placeholder:"Find",initialValue:c.find,onChange:h=>l(h,u,"find")}),o(zm,{placeholder:"Replace",initialValue:c.replace,onChange:h=>l(h,u,"replace")}),o(zm,{placeholder:"Only if includes",initialValue:c.onlyIfIncludes,onChange:h=>l(h,u,"onlyIfIncludes")})),o(N,{size:N.Sizes.MIN,onClick:()=>s(u),style:{background:"none",...u===t.length-1?{visibility:"hidden",pointerEvents:"none"}:{}}},o("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},o("title",null,"Delete Rule"),o("path",{fill:"var(--status-danger)",d:"M15 3.999V2H9V3.999H3V5.999H21V3.999H15Z"}),o("path",{fill:"var(--status-danger)",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"})))),i&&QI(c.find)))))}function VI(){let[e,t]=V("");return o(d,null,o(v.FormTitle,{tag:"h4"},"Test Rules"),o(Re,{placeholder:"Type a message",onChange:t}),o(Re,{placeholder:"Message with rules applied",editable:!1,value:jb(e)}))}function jb(e){if(e.length===0)return e;if(e=" "+e+" ",Ka)for(let t of Ka)!t.find||!t.replace||t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)||(e=e.replaceAll(t.find,t.replace.replaceAll("\\n",`
`)));if(Ya){for(let t of Ya)if(!(!t.find||!t.replace)&&!(t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)))try{let n=zb(t.find);e=e.replace(n,t.replace.replaceAll("\\n",`
`))}catch{new Y("TextReplace").error(`Invalid regex: ${t.find}`)}}return e=e.trim(),e}var Ub,Gb,Hb,qa,Ka,Ya,JI,eC,jm,Wb=m(()=>{"use strict";a();ki();Sn();D();wt();w();be();ve();b();T();Ub="TextReplace_rulesString",Gb="TextReplace_rulesRegex",Hb=()=>({find:"",replace:"",onlyIfIncludes:""}),qa=()=>[Hb()],Ka=qa(),Ya=qa(),JI=k({replace:{type:6,description:"",component:()=>{let e=Lt();return o(d,null,o($b,{title:"Using String",rulesArray:Ka,rulesKey:Ub,update:e}),o($b,{title:"Using Regex",rulesArray:Ya,rulesKey:Gb,update:e}),o(VI,null))}}});eC="1102784112584040479",jm=g({name:"TextReplace",description:"Replace text in your messages. You can find pre-made rules in the #textreplace-rules channel in Vencord's Server",authors:[p.AutumnVN,p.TheKodeToad],dependencies:["MessageEventsAPI"],settings:JI,async start(){Ka=await Nt.get(Ub)??qa(),Ya=await Nt.get(Gb)??qa(),this.preSend=lt((e,t)=>{e!==eC&&(t.content=jb(t.content))})},stop(){ct(this.preSend)}})});var Wm,qb=m(()=>{"use strict";a();w();b();Wm=g({name:"TimeBarAllActivities",description:"Adds the Spotify time bar to all activities if they have start and end timestamps",authors:[p.obscurity],patches:[{find:"renderTimeBar=function",replacement:{match:/renderTimeBar=function\((.{1,3})\){.{0,50}?var/,replace:"renderTimeBar=function($1){var"}}]})});var Kb=m(()=>{});var ht,Hi=m(()=>{"use strict";a();D();b();ht=k({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 Za,qm=m(()=>{"use strict";a();Za={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 zi(e,t){let n=ht.store[e+"Input"],r=ht.store[e+"Output"],i="https://translate.googleapis.com/translate_a/single?"+new URLSearchParams({client:"gtx",sl:n,tl:r,dt:"t",dj:"1",source:"input",q:t}),s=await fetch(i);if(!s.ok)throw new Error(`Failed to translate "${t}" (${n} -> ${r})
${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 io,ji=m(()=>{"use strict";a();Ge();Hi();io=Ee("vc-trans-")});function nC({settingsKey:e,includeAuto:t}){let n=ht.use([e])[e],r=zt(()=>{let i=Object.entries(Za).map(([s,l])=>({value:s,label:l}));return t||i.shift(),i},[]);return o("section",{className:G.bottom16},o(v.FormTitle,{tag:"h3"},ht.def[e].description),o(ls,{options:r,value:r.find(i=>i.value===n),placeholder:"Select a language",maxVisibleItems:5,closeOnSelect:!0,onChange:i=>ht.store[e]=i}))}function oC(){let e=ht.use(["autoTranslate"]).autoTranslate;return o(ft,{value:e,onChange:t=>ht.store.autoTranslate=t,note:ht.def.autoTranslate.description,hideBorder:!0},"Auto Translate")}function Yb({rootProps:e}){return o(Le,{...e},o($e,{className:io("modal-header")},o(v.FormTitle,{tag:"h2"},"Translate"),o(xt,{onClick:e.onClose})),o(Ue,{className:io("modal-content")},tC.map(t=>o(nC,{key:t,settingsKey:t,includeAuto:t.endsWith("Input")})),o(v.FormDivider,{className:G.bottom16}),o(oC,null)))}var tC,Zb=m(()=>{"use strict";a();Xe();Ze();T();qm();Hi();ji();tC=["receivedInput","receivedOutput","sentInput","sentOutput"]});function Rr({height:e=24,width:t=24,className:n}){return o("svg",{viewBox:"0 96 960 960",height:e,width:t,className:J(io("icon"),n)},o("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 Xb({slateProps:e}){let{autoTranslate:t}=ht.use(["autoTranslate"]);if(e.type.analyticsName!=="normal")return null;let n=()=>ht.store.autoTranslate=!t;return o(W,{text:"Open Translate Modal"},({onMouseEnter:r,onMouseLeave:i})=>o("div",{style:{display:"flex"}},o(N,{"aria-haspopup":"dialog","aria-label":"",size:"",look:Zt.BLANK,onMouseEnter:r,onMouseLeave:i,innerClassName:mt.button,onClick:s=>{if(s.shiftKey)return n();Ce(l=>o(Yb,{rootProps:l}))},onContextMenu:()=>n(),style:{padding:"0 4px"}},o("div",{className:mt.buttonWrapper},o(Rr,{className:io({"auto-translate":t})})))))}var Km=m(()=>{"use strict";a();fe();Ze();T();Hi();Zb();ji()});function Zm(e,t){Ym.get(e)(t)}function rC({onDismiss:e}){return o("button",{onClick:e,className:io("dismiss")},"Dismiss")}function Jb({message:e}){let[t,n]=V();return rt(()=>{if(!e.vencordEmbeddedBy)return Ym.set(e.id,n),()=>void Ym.delete(e.id)},[]),t?o("span",{className:io("accessory")},o(Rr,{width:16,height:16}),Ie.parse(t.text)," ","(translated from ",Za[t.src]??t.src," - ",o(rC,{onDismiss:()=>n(void 0)}),")"):null}var Ym,Qb=m(()=>{"use strict";a();T();qm();Km();ji();Ym=new Map});var Vb,Xm,eT=m(()=>{"use strict";a();Kb();Pt();la();Sn();Ko();ie();w();b();T();Hi();Km();Qb();ji();Vb=(e,{message:t})=>()=>{if(!t.content)return;let n=nt("copy-text",e);!n||n.splice(n.findIndex(r=>r?.props?.id==="copy-text")+1,0,o(L.MenuItem,{id:"vc-trans",label:"Translate",icon:Rr,action:async()=>{let r=await zi("received",t.content);Zm(t.id,r)}}))},Xm=g({name:"Translate",description:"Translate messages with Google Translate",authors:[p.Ven],dependencies:["MessageAccessoriesAPI","MessagePopoverAPI","MessageEventsAPI"],settings:ht,translate:zi,patches:[{find:".activeCommandOption",replacement:{match:/(.)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&;try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}"}}],start(){Si("vc-translation",e=>o(Jb,{message:e.message})),pe("message",Vb),bn("vc-translate",e=>e.content?{label:"Translate",icon:Rr,message:e,channel:Z.getChannel(e.channel_id),onClick:async()=>{let t=await zi("received",e.content);Zm(e.id,t)}}:null),this.preSend=lt(async(e,t)=>{!ht.store.autoTranslate||!t.content||(t.content=(await zi("sent",t.content)).text)})},stop(){ct(this.preSend),de("message",Vb),Tn("vc-translate"),Sp("vc-translation")},chatBarIcon:e=>o(A,{noop:!0},o(Xb,{slateProps:e}))})});function Jm({a:e,b:t,c:n}){return[o("strong",{key:"0"},e),", ",o("strong",{key:"2"},t),`, and ${n} others are typing...`]}var iC,Xa,sC,Qm,Vm=m(()=>{"use strict";a();D();ie();w();tt();b();O();T();iC=ce(".typingIndicatorRef","svg"),Xa=k({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"}});sC=A.wrap(function({user:e,guildId:t}){return o("strong",{role:"button",onClick:()=>{mn(e.id)},style:{display:"grid",gridAutoFlow:"column",gap:"4px",color:Xa.store.showRoleColors?Ae.getMember(t,e.id)?.colorString:void 0,cursor:"pointer"}},Xa.store.showAvatars&&o("div",{style:{marginTop:"4px"}},o(iC,{size:"SIZE_16",src:e.getAvatarURL(t,128)})),Ae.getNick(t,e.id)||!t&&et.getNickname(e.id)||e.globalName||e.username)},{noop:!0}),Qm=g({name:"TypingTweaks",description:"Show avatars and role colours in the typing indicator",authors:[p.zt],patches:[{find:"getCooldownTextStyle",replacement:{match:/=(\i)\[2];(.+)"aria-atomic":!0,children:(\i)}\)/,replace:'=$1[2];$2"aria-atomic":!0,style:{display:"grid",gridAutoFlow:"column",gridGap:"0.25em"},children:$self.mutateChildren(this.props,$1,$3)})'}},{find:"getCooldownTextStyle",replacement:{match:/return \i\.\i\.getName\(.,.\.props\.channel\.id,(.)\)/,replace:"return $1"}},{find:"getCooldownTextStyle",replacement:{match:/((\i)\.length\?.\..\.Messages\.THREE_USERS_TYPING.format\(\{a:(\i),b:(\i),c:.}\)):.+?SEVERAL_USERS_TYPING/,replace:"$1:$self.buildSeveralUsers({a:$3,b:$4,c:$2.length-2})"},predicate:()=>Xa.store.alternativeFormatting}],settings:Xa,buildSeveralUsers:Jm,mutateChildren(e,t,n){if(!Array.isArray(n))return n;let r=0;return n.map(i=>i.type==="strong"?o(sC,{...e,user:t[r++]}):i)}})});function ko(e,t){return Ae.getNick(e,t)??F.getUser(t).username}function cC({channelId:e}){let t=Fe([tT],()=>({...tT.getTypingUsers(e)}),null,(l,c)=>{let u=Object.keys(l),h=Object.keys(c);return u.length===h.length&&JSON.stringify(u)===JSON.stringify(h)}),n=Z.getChannel(e).guild_id;if(!ef.store.includeMutedChannels&&lC.isChannelMuted(n,e))return null;let r=F.getCurrentUser()?.id,i=Object.keys(t).filter(l=>l!==r&&!(et.isBlocked(l)&&!ef.store.includeBlockedUsers)),s;switch(i.length){case 0:break;case 1:{s=Ja.Messages.ONE_USER_TYPING.format({a:ko(n,i[0])});break}case 2:{s=Ja.Messages.TWO_USERS_TYPING.format({a:ko(n,i[0]),b:ko(n,i[1])});break}case 3:{s=Ja.Messages.THREE_USERS_TYPING.format({a:ko(n,i[0]),b:ko(n,i[1]),c:ko(n,i[2])});break}default:{s=M.plugins.TypingTweaks.enabled?Jm({a:ko(n,i[0]),b:ko(n,i[1]),c:i.length-2}):Ja.Messages.SEVERAL_USERS_TYPING;break}}return i.length>0?o(W,{text:s},({onMouseLeave:l,onMouseEnter:c})=>o("div",{style:{marginLeft:6,height:16,display:"flex",alignItems:"center",zIndex:0,cursor:"pointer"},onMouseLeave:l,onMouseEnter:c},o(aC,{dotRadius:3,themed:!0}))):null}var aC,tT,lC,Ja,ef,tf,nT=m(()=>{"use strict";a();D();ie();w();ve();b();O();T();Vm();aC=re(()=>Ht(e=>e.type?.render?.toString()?.includes("().dots"))),tT=ae("TypingStore"),lC=ae("UserGuildSettingsStore"),Ja=ke(e=>e.Messages?.SEVERAL_USERS_TYPING);ef=k({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}}),tf=g({name:"TypingIndicator",description:"Adds an indicator if someone is typing on a channel.",authors:[p.Nuckyz,p.obscurity],settings:ef,patches:[{find:".UNREAD_HIGHLIGHT",replacement:{match:/\(\).children.+?:null(?<=(\i)=\i\.channel,.+?)/,replace:(e,t)=>`${e},$self.TypingIndicator(${t}.id)`}}],TypingIndicator:e=>o(A,{noop:!0},o(cC,{channelId:e}))})});var nf,oT=m(()=>{"use strict";a();Sn();w();b();nf=g({name:"Unindent",description:"Trims leading indentation from codeblocks",authors:[p.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((n,r)=>Math.min(n,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 n=t.split(`
`);if(n.length<2)return t;let r="";return n[n.length-1]==="```"&&(r=n.pop()),`${n[0]}
${this.unindent(n.slice(1).join(`
`))}
${r}`})},start(){this.preSend=lt((e,t)=>this.unindentMsg(t)),this.preEdit=Jn((e,t,n)=>this.unindentMsg(n))},stop(){ct(this.preSend),Qn(this.preEdit)}})});var of,rT,rf,iT=m(()=>{"use strict";a();Pt();_n();w();b();T();of=1<<2,rT=(e,{channel:t,message:{author:n,embeds:r,flags:i,id:s}})=>()=>{let l=(i&of)!==0;if(!l&&!r.length)return;let c=t.isPrivate()||!!(je.getChannelPermissions({id:t.id})&An.EMBED_LINKS);if(n.id===F.getCurrentUser().id&&!c)return;let u=nt("delete",e),h=u?.findIndex(f=>f?.props?.id==="delete");!h||!u||u.splice(h-1,0,o(L.MenuItem,{id:"unsuppress-embeds",key:"unsuppress-embeds",label:l?"Unsuppress Embeds":"Suppress Embeds",color:l?void 0:"danger",icon:l?Zs:Xs,action:()=>Dt.patch({url:`/channels/${t.id}/messages/${s}`,body:{flags:l?i&~of:i|of}})}))},rf=g({name:"UnsuppressEmbeds",authors:[p.rad,p.HypedDomi],description:"Allows you to unsuppress embeds in messages",start(){pe("message",rT)},stop(){de("message",rT)}})});var sf,sT=m(()=>{"use strict";a();_t();zs();w();b();sf=g({name:"UrbanDictionary",description:"Search for a word on Urban Dictionary via /urban slash command",authors:[p.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 n=encodeURIComponent(e[0].value),{list:[r]}=await(await fetch(`https://api.urbandictionary.com/v0/define?term=${n}`)).json();if(!r)return void oe(t.channel.id,{content:"No results found."});let i=s=>s.replaceAll(`\r
`,`
`).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 oe(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=${n} "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(n){oe(t.channel.id,{content:`Something went wrong: \`${n}\``})}}}]})});var aT=m(()=>{});var uC,pC,dC,lT,cT=m(()=>{"use strict";a();aT();O();T();uC=P("selectChannel","selectVoiceChannel"),pC=ce(".lastSection",".children"),dC=1n<<20n,lT=({channel:e,label:t,showHeader:n})=>o(pC,null,n&&o(v.FormTitle,{className:"vc-uvs-header"},"In a voice channel"),o(N,{className:"vc-uvs-button",color:N.Colors.TRANSPARENT,size:N.Sizes.SMALL,onClick:()=>{je.can(dC,e)?uC.selectVoiceChannel(e.id):X.show({message:"Insufficient permissions to enter the channel.",id:"user-voice-show-insufficient-permissions",type:X.Type.FAILURE,options:{position:X.Position.BOTTOM}})}},t))});var mC,fC,af,uT,lf,pT=m(()=>{"use strict";a();D();ie();w();b();O();T();cT();mC=ae("VoiceStateStore"),fC=P("section","lastSection"),af=k({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}}),uT=A.wrap(({user:e})=>{let{channelId:t}=mC.getVoiceStateForUser(e.id)??{};if(!t)return null;let n=Z.getChannel(t),r=ue.getGuild(n.guild_id);if(!r)return null;let i=`${r.name} | ${n.name}`;return o(lT,{channel:n,label:i,showHeader:af.store.showVoiceChannelSectionHeader})}),lf=g({name:"UserVoiceShow",description:"Shows whether a User is currently in a voice channel somewhere in their profile",authors:[p.LordElias],settings:af,patchModal({user:e}){return af.store.showInUserProfileModal?o("div",{className:"vc-uvs-modal-margin"},o(uT,{user:e})):null},patchPopout:({user:e})=>{let t=e.id===F.getCurrentUser().id;return o("div",{className:t?`vc-uvs-popout-margin ${fC.lastSection}`:""},o(uT,{user:e}))},patches:[{find:".showCopiableUsername",replacement:{match:/\(0,\w\.jsx\)\(\w{2},{user:\w,setNote/,replace:"$self.patchPopout(arguments[0]),$&"}},{find:".USER_PROFILE_MODAL",replacement:{match:/\(\)\.body.+?displayProfile:\i}\),/,replace:"$&$self.patchModal(arguments[0]),"}}]})});var dT,mT=m(()=>{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"] {
background: center / cover no-repeat;
}
[class*="NonPremium"]:has([class*="bannerPremium"]) [class*="avatarPositionNormal"],
[class*="PremiumWithoutBanner"]:has([class*="bannerPremium"]) [class*="avatarPositionPremiumNoBanner"] {
top: 76px;
}
[style*="background-image"] [class*="background-"] {
background-color: transparent !important;
}
`,classNames:{},dom:null});dT="src/plugins/usrbg/index.css"});var gC,Vo,Qa,cf,fT=m(()=>{"use strict";a();D();Ge();bo();w();b();mT();gC="https://raw.githubusercontent.com/AutumnVN/usrbg/main/usrbg.json",Vo={},Qa=k({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}}),cf=g({name:"USRBG",description:"Displays user banners from USRBG, allowing anyone to get a banner without Nitro",authors:[p.AutumnVN,p.pylix,p.TheKodeToad],settings:Qa,patches:[{find:".NITRO_BANNER,",replacement:[{match:/(\i)\.premiumType/,replace:"$self.premiumHook($1)||$&"},{match:/(\i)\.bannerSrc,/,replace:"$self.useBannerHook($1),"},{match:/\?\(0,\i\.jsx\)\(\i,{type:\i,shown/,replace:"&&$self.shouldShowBadge(arguments[0])$&"}]},{find:'"data-selenium-video-tile":',predicate:()=>Qa.store.voiceBackground,replacement:[{match:/(\i)\.style,/,replace:"$self.voiceBackgroundHook($1),"}]}],settingsAboutComponent:()=>o(at,{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-")&&Vo[t])return{backgroundImage:`url(${Vo[t]})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}},useBannerHook({displayProfile:e,user:t}){if(!(e?.banner&&Qa.store.nitroFirst)&&Vo[t.id])return Vo[t.id]},premiumHook({userId:e}){if(Vo[e])return 2},shouldShowBadge({displayProfile:e,user:t}){return e?.banner&&(!Vo[t.id]||Qa.store.nitroFirst)},async start(){Je(dT);let e=await fetch(gC);e.ok&&(Vo=await e.json())}})});function vC(e){let t=Math.floor(Math.random()*e.length);return e[t]}function hT(e){e=e.toLowerCase();for(let t of yC)e=e.replaceAll(t[0],t[1]);return e=e.replaceAll(/([ \t\n])n/g,"$1ny").replaceAll(/[lr]/g,"w").replaceAll(/([ \t\n])([a-z])/g,(t,n,r)=>Math.random()<.5?`${n}${r}-${r}`:`${n}${r}`).replaceAll(/([^.,!][.,!])([ \t\n])/g,(t,n,r)=>`${n} ${vC(hC)}${r}`),e}var hC,yC,gT,uf,yT=m(()=>{"use strict";a();_t();Sn();D();w();b();hC=["rawr x3","OwO","UwU","o.O","-.-",">w<","(\u2445\u02D8\uA4B3\u02D8)","(\uA20D\u1D17\uA20D)","(\u02D8\u03C9\u02D8)","(U \u1D55 U\u2741)","\u03C3\u03C9\u03C3","\xF2\u03C9\xF3","(///\u02EC///\u273F)","(U \uFE4F U)","( \u0361o \u03C9 \u0361o )","\u0298w\u0298",":3",":3","XD","nyaa~~","mya",">_<","\u{1F633}","\u{1F97A}","\u{1F633}\u{1F633}\u{1F633}","rawr","^^","^^;;","(\u02C6 \uFECC \u02C6)\u2661","^\u2022\uFECC\u2022^","/(^\u2022\u03C9\u2022^)","(\u273Fo\u03C9o)"],yC=[["small","smol"],["cute","kawaii~"],["fluff","floof"],["love","luv"],["stupid","baka"],["what","nani"],["meow","nya~"],["hello","hewwo"]],gT=k({uwuEveryMessage:{description:"Make every single message uwuified",type:3,default:!1,restartNeeded:!1}});uf=g({name:"UwUifier",description:"Simply uwuify commands",authors:[p.echo,p.skyevg,p.PandaNinjas],dependencies:["CommandsAPI","MessageEventsAPI"],settings:gT,commands:[{name:"uwuify",description:"uwuifies your messages",options:[Ho],execute:e=>({content:hT(Oe(e,"message",""))})}],onSend(e){gT.store.uwuEveryMessage&&(e.content=hT(e.content))},start(){this.preSend=lt((e,t)=>this.onSend(t)),this.preEdit=Jn((e,t,n)=>this.onSend(n))},stop(){ct(this.preSend),Qn(this.preEdit)}})});function bC({data:e,UserMention:t,RoleMention:n,parse:r,props:i}){let[s,l]=V(e.userId);if(s)return o(t,{className:"mention",userId:s,channelId:e.channelId,inlinePreview:i.noStyleAndInteraction,key:i.key});let c=r(e.content,i);return o(n,{...e,inlinePreview:i.formatInline},o("span",{onMouseEnter:()=>{let u=c?.[0]?.props?.children;if(typeof u!="string")return;let h=u.match(/<@!?(\d+)>/)?.[1];if(!h||Va.has(h))return;if(F.getUser(h))return l(h);let f=()=>{Va.add(h),vT.unshift(()=>SC(h).then(()=>{l(h),Va.delete(h)}).catch(y=>{y?.status===429&&(vT.unshift(()=>so(1e3).then(f)),Va.delete(h))}).finally(()=>so(300)))};f()}},c))}var Va,vT,SC,pf,ST=m(()=>{"use strict";a();ie();w();fe();ar();b();O();T();Va=new Set,vT=new fn(5),SC=ce("USER(");pf=g({name:"ValidUser",description:"Fix mentions for unknown users showing up as '<@343383572805058560>' (hover over a mention to fix it)",authors:[p.Ven],tags:["MentionCacheFix"],patches:[{find:'className:"mention"',replacement:{match:/react:(?=function\(\i,\i,\i\).{0,50}return null==\i\?\(0,\i\.jsx\)\((\i),.+?jsx\)\((\i),\{className:"mention")/,replace:"react:(...args)=>$self.renderMention($1,$2,...args),originalReact:"}}],renderMention(e,t,n,r,i){return o(A,{noop:!0},o(bC,{RoleMention:e,UserMention:t,data:n,parse:r,props:i}))}})});var df,mf,bT=m(()=>{"use strict";a();w();b();T();df={},mf=g({name:"VoiceChatDoubleClick",description:"Join voice chats via double click instead of single click",authors:[p.Ven,p.D3SOX],patches:[{find:"VoiceChannel.renderPopout",replacement:[{match:/onClick:function\(\)\{(e\.handleClick.+?)}/g,replace:"onClick:function(){$self.schedule(()=>{$1},e)}"}]},{find:".shouldCloseDefaultModals",replacement:{match:/onClick:(\i)(?=,.{0,30}className:"channelMention".+?(\i)\.inContent)/,replace:(e,t,n)=>`onClick:(vcDoubleClickEvt)=>$self.shouldRunOnClick(vcDoubleClickEvt,${n})&&${t}()`}}],shouldRunOnClick(e,{channelId:t}){let n=Z.getChannel(t);return!n||![2,13].includes(n.type)?!0:e.detail>=2},schedule(e,t){let n=t.props.channel.id;if(Pe.getVoiceChannelId()===n){e();return}let r=df[n]??={timeout:void 0,i:0};clearTimeout(r.timeout),++r.i>=2?(e(),delete df[n]):r.timeout=setTimeout(()=>{delete df[n]},500)}})});function el(e,t=M.plugins.VcNarrator){if(!e)return;let n=new SpeechSynthesisUtterance(e),r=speechSynthesis.getVoices().find(i=>i.voiceURI===t.voice);!r&&(new Y("VcNarrator").error(`Voice "${t.voice}" not found. Resetting to default.`),r=speechSynthesis.getVoices().find(i=>i.default),t.voice=r?.voiceURI,!r)||(n.voice=r,n.volume=t.volume,n.rate=t.rate,speechSynthesis.speak(n))}function xT(e){let t=M.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,"").trim()}function tl(e,t,n){return e.replaceAll("{{USER}}",xT(t)||(t?"Someone":"")).replaceAll("{{CHANNEL}}",xT(n)||"channel")}function TC({channelId:e,oldChannelId:t},n){if(n&&e!==ff&&(t=ff,ff=e),e!==t){if(e)return[t?"move":"join",e];if(t)return["leave",t]}return["",""]}function xC(e,t){let n=Object.assign({},M.plugins.VcNarrator,e);el(tl(n[t+"Message"],F.getCurrentUser().username,"general"),n)}var TT,ff,gf,wT=m(()=>{"use strict";a();D();Yr();w();be();Xe();Wn();b();O();T();TT=P("getVoiceStatesForChannel","getCurrentClientVoiceChannelId");gf=g({name:"VcNarrator",description:"Announces when users join, leave, or move voice channels via narrator",authors:[p.Ven],flux:{VOICE_STATE_UPDATES({voiceStates:e}){let t=Pe.getVoiceChannelId(),n=F.getCurrentUser().id;if(Z.getChannel(t)?.type!==13)for(let r of e){let{userId:i,channelId:s,oldChannelId:l}=r,c=i===n;if(!c&&(!t||s!==t&&l!==t))continue;let[u,h]=TC(r,c);if(!u)continue;let f=M.plugins.VcNarrator[u+"Message"],y=c&&!M.plugins.VcNarrator.sayOwnName?"":F.getUser(i).username,S=Z.getChannel(h).name;el(tl(f,y,S))}},AUDIO_TOGGLE_SELF_MUTE(){let e=Pe.getVoiceChannelId(),t=TT.getVoiceStateForChannel(e);if(!t)return;let n=t.mute||t.selfMute?"unmute":"mute";el(tl(M.plugins.VcNarrator[n+"Message"],"",Z.getChannel(e).name))},AUDIO_TOGGLE_SELF_DEAF(){let e=Pe.getVoiceChannelId(),t=TT.getVoiceStateForChannel(e);if(!t)return;let n=t.deaf||t.selfDeaf?"undeafen":"deafen";el(tl(M.plugins.VcNarrator[n+"Message"],"",Z.getChannel(e).name))}},start(){if(typeof speechSynthesis>"u"||speechSynthesis.getVoices().length===0){new Y("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,n]=zt(()=>{let s=speechSynthesis.getVoices();return[s.length!==0,s.some(l=>l.lang.startsWith("en"))]},[]),r=zt(()=>Object.keys(Vencord.Plugins.plugins.VcNarrator.options).filter(s=>s.endsWith("Message")).map(s=>s.slice(0,-7)),[]),i=null;if(t)n||(i=o(qn,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=o(qn,null,s)}return o(v.FormSection,null,o(v.FormText,null,"You can customise the spoken messages below. You can disable specific messages by setting them to nothing"),o(v.FormText,null,"The special placeholders ",o("code",null,"{{USER}}")," and ",o("code",null,"{{CHANNEL}}")," ","will be replaced with the user's name (nothing if it's yourself) and the channel's name respectively"),n&&o(d,null,o(v.FormTitle,{className:G.top20,tag:"h3"},"Play Example Sounds"),o("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"1rem"},className:"vc-narrator-buttons"},r.map(s=>o(N,{key:s,onClick:()=>xC(e,s)},jn([s]))))),i)}})});var PT=m(()=>{});function PC(e){let t=[];for(let n of Object.values(Vencord.Plugins.plugins))n.toolboxActions&&t.push(o(L.MenuGroup,{label:n.name,key:`vc-toolbox-${n.name}`},Object.entries(n.toolboxActions).map(([r,i])=>{let s=`vc-toolbox-${n.name}-${r}`;return o(L.MenuItem,{id:s,key:s,label:r,action:i})})));return o(L.Menu,{navId:"vc-toolbox",onClose:e},o(L.MenuItem,{id:"vc-toolbox-notifications",label:"Open Notification Log",action:Ns}),o(L.MenuItem,{id:"vc-toolbox-quickcss",label:"Open QuickCSS",action:()=>VencordNative.quickCss.openEditor()}),...t)}function MC(){return o("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96",width:24,height:24},o("path",{fill:"currentColor",d:"M53 10h7v1h-1v1h-1v1h-1v1h-1v1h-1v1h5v1h-7v-1h1v-1h1v-1h1v-1h1v-1h1v-1h-5m-43 1v32h2v2h2v2h2v2h2v2h2v2h2v2h2v2h2v2h8v-2h2V46h-2v2h-2v2h-4v-2h-2v-2h-2v-2h-2v-2h-2v-2h-2V12m24 0v27h-2v3h4v-6h2v-2h4V12m13 2h5v1h-1v1h-1v1h-1v1h3v1h-5v-1h1v-1h1v-1h1v-1h-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-1h1m-13 4h2v1h-1v4h1v2h1v1h1v1h1v1h4v1h-6v-1h-6v-1h-1v-5h1v-1h1v-2h2m17 3h1v3h-1v1h-1v1h-1v2h-2v-2h2v-1h1v-1h1m1 0h1v3h-1v1h-2v-1h1v-1h1m-30 2v8h-8v32h8v8h32v-8h8v-8H70v8H54V44h16v8h16v-8h-8v-8h-1v1h-7v-1h-2v1h-8v-1"}))}function IC(){let[e,t]=V(!1);return o(Br,{position:"bottom",align:"right",animation:Br.Animation.NONE,shouldShow:e,onRequestClose:()=>t(!1),renderPopout:()=>PC(()=>t(!1))},(n,{isShown:r})=>o(wC,{className:"vc-toolbox-btn",onClick:()=>t(i=>!i),tooltip:r?null:"Vencord Toolbox",icon:MC,selected:r}))}function CC({children:e}){return e.splice(e.length-1,0,o(A,{noop:!0},o(IC,null))),o(d,null,e)}var wC,hf,MT=m(()=>{"use strict";a();PT();ks();ie();w();ve();b();O();T();wC=re(()=>ze(".HEADER_BAR_BADGE,",".tooltip"));hf=g({name:"VencordToolbox",description:"Adds a button next to the inbox button in the channel header that houses Vencord quick actions",authors:[p.Ven,p.AutumnVN],patches:[{find:".mobileToolbar",replacement:{match:/(?<=toolbar:function.{0,100}\()\i.Fragment,/,replace:"$self.ToolboxFragmentWrapper,"}}],ToolboxFragmentWrapper:A.wrap(CC,{fallback:()=>o("p",{style:{color:"red"}},"Failed to render :(")})})});function Wi(e){let t=e.startsWith("/")?"png":yf.store.format,n=new URL(e,window.location.href);n.searchParams.set("size",yf.store.imgSize),n.pathname=n.pathname.replace(/\.(png|jpe?g|webp)$/,`.${t}`),e=n.toString(),n.searchParams.set("size","4096");let r=n.toString();Fo(e,{original:r,height:256})}var nl,yf,IT,CT,vf,NT=m(()=>{"use strict";a();Pt();D();_n();w();tt();b();O();T();nl=P("getGuildBannerURL"),yf=k({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"}))}});IT=(e,{user:t,guildId:n})=>()=>{let r=Ae.getMember(n,t.id)?.avatar||null;e.splice(-1,0,o(L.MenuGroup,null,o(L.MenuItem,{id:"view-avatar",label:"View Avatar",action:()=>Wi(nl.getUserAvatarURL(t,!0)),icon:jo}),r&&o(L.MenuItem,{id:"view-server-avatar",label:"View Server Avatar",action:()=>Wi(nl.getGuildMemberAvatarURLSimple({userId:t.id,avatar:r,guildId:n,canAnimate:!0},!0)),icon:jo})))},CT=(e,{guild:t})=>()=>{if(!t)return;let{id:n,icon:r,banner:i}=t;!i&&!r||e.splice(-1,0,o(L.MenuGroup,null,r?o(L.MenuItem,{id:"view-icon",label:"View Icon",action:()=>Wi(nl.getGuildIconURL({id:n,icon:r,canAnimate:!0})),icon:jo}):null,i?o(L.MenuItem,{id:"view-banner",label:"View Banner",action:()=>Wi(nl.getGuildBannerURL({id:n,banner:i},!0)),icon:jo}):null))},vf=g({name:"ViewIcons",authors:[p.Ven,p.TheKodeToad,p.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:yf,openImage:Wi,start(){pe("user-context",IT),pe("guild-context",CT)},stop(){de("user-context",IT),de("guild-context",CT)},patches:[{find:"onAddFriend:",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:"().avatarWrapperNonUserBot",replacement:{match:/(?<=avatarPositionPanel.+?)onClick:(\i\|\|\i)\?void 0(?<=,(\i)=\i\.avatarSrc.+?)/,replace:'style:($1)?{cursor:"pointer"}:{},onClick:$1?()=>{$self.openImage($2)}'}}]})});function kC(e){return Object.fromEntries(Object.entries(e).sort(([t],[n])=>t.localeCompare(n)))}function RC(e){let t=kC(JSON.parse(JSON.stringify(e)));for(let r of["email","phone","mfaEnabled","personalConnectionId"])delete t.author[r];let n=t;return delete n.editHistory,delete n.deleted,n.attachments?.forEach(r=>delete r.deleted),t}function kT(e){return o("div",{style:{userSelect:"text"}},Ie.defaultRules.codeBlock.react(e,null,{}))}function RT(e){e=RC(e);let t=JSON.stringify(e,null,4),n=Ce(r=>o(A,null,o(Le,{...r,size:"large"},o($e,null,o(Q,{variant:"heading-lg/semibold",style:{flexGrow:1}},"View Raw"),o(xt,{onClick:()=>Gn(n)})),o(Ue,null,o("div",{style:{padding:"16px 0"}},!!e.content&&o(d,null,o(v.FormTitle,{tag:"h5"},"Content"),o(kT,{content:e.content,lang:""}),o(v.FormDivider,{className:G.bottom20})),o(v.FormTitle,{tag:"h5"},"Message Data"),o(kT,{content:t,lang:"json"}))),o(Tt,null,o(le,{cellSpacing:10},o(N,{onClick:()=>Yt(t,"Message data copied to clipboard!")},"Copy Message JSON"),o(N,{onClick:()=>Yt(e.content,"Content copied to clipboard!")},"Copy Raw Content"))))))}var NC,ol,Sf,AT=m(()=>{"use strict";a();Ko();D();ie();wt();w();Xe();fe();Ze();b();T();NC=()=>o("svg",{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",width:"22",height:"22"},o("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"}),o("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"}));ol=k({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"}]}}),Sf=g({name:"ViewRaw",description:"Copy and view the raw content/data of any message.",authors:[p.KingFish,p.Ven,p.rad],dependencies:["MessagePopoverAPI"],settings:ol,start(){bn("ViewRaw",e=>{let t=()=>{ol.store.clickMethod==="Right"?Yt(e.content):RT(e)},n=i=>{ol.store.clickMethod==="Left"?(i.preventDefault(),i.stopPropagation(),Yt(e.content)):(i.preventDefault(),i.stopPropagation(),RT(e))};return{label:ol.store.clickMethod==="Right"?"Copy Raw (Left Click) / View Raw (Right Click)":"View Raw (Left Click) / Copy Raw (Right Click)",icon:NC,message:e,channel:Z.getChannel(e.channel_id),onClick:t,onContextMenu:n}})},stop(){Tn("CopyRawMessage")}})});async function AC(e){let t=await fetch(e);if(t.status===200)return await t.blob()}var LC,er,bf,LT=m(()=>{"use strict";a();D();w();b();xc();O();T();LC=ke(e=>e.emitter?._events?.INSERT_TEXT),er=k({addBack:{type:3,description:"Add back the Discord context menus for images, links and the chat input bar",default:!1,restartNeeded:!0}}),bf=g({name:"WebContextMenus",description:"Re-adds context menus missing in the web version of Discord: Links & Images (Copy/Open Link/Image), Text Area (Copy, Cut, Paste, SpellCheck)",authors:[p.Ven],enabledByDefault:!0,required:!1,settings:er,start(){if(er.store.addBack){let e=Nn("contextMenuCallbackNative");window.removeEventListener("contextmenu",e.contextMenuCallbackWeb),window.addEventListener("contextmenu",e.contextMenuCallbackNative),this.changedListeners=!0}},stop(){if(this.changedListeners){let e=Nn("contextMenuCallbackNative");window.removeEventListener("contextmenu",e.contextMenuCallbackNative),window.addEventListener("contextmenu",e.contextMenuCallbackWeb)}},patches:[{find:"open-native-link",replacement:[{match:/if\(!\i\.\i\|\|null==/,replace:"if(null=="},{match:/\w\.default\.copy/,replace:"Vencord.Webpack.Common.Clipboard.copy"}]},{find:'id:"copy-image"',replacement:[{match:/if\(!\i\.\i\|\|null==/,replace:"if(null=="},{match:/return\s*?\[\i\.default\.canCopyImage\(\)/,replace:"return [true"},{match:/(?<=COPY_IMAGE_MENU_ITEM,)action:/,replace:"action:()=>$self.copyImage(arguments[0]),oldAction:"},{match:/(?<=SAVE_IMAGE_MENU_ITEM,)action:/,replace:"action:()=>$self.saveImage(arguments[0]),oldAction:"}]},{find:'navId:"image-context"',predicate:()=>er.store.addBack,replacement:{match:/return \i\.\i\?/,replace:"return true?"}},{find:'"interactionUsernameProfile"',predicate:()=>er.store.addBack,replacement:{match:/if\("A"===\i\.tagName&&""!==\i\.textContent\)/,replace:"if(false)"}},{find:'"slate-toolbar"',predicate:()=>er.store.addBack,replacement:{match:/(?<=\.handleContextMenu=.+?"bottom";)\i\.\i\?/,replace:"true?"}},{find:'navId:"textarea-context"',all:!0,predicate:()=>er.store.addBack,replacement:[{match:/if\(!\i\.\i\)return null;/,replace:""},{match:/\b\i\.default\.(copy|cut|paste)/g,replace:"$self.$1"}]},{find:'"add-to-dictionary"',predicate:()=>er.store.addBack,replacement:{match:/var \i=\i\.text,/,replace:"return [null,null];$&"}}],async copyImage(e){let t=new Image;t.onload=()=>{let n=document.createElement("canvas");n.width=t.naturalWidth,n.height=t.naturalHeight,n.getContext("2d").drawImage(t,0,0),n.toBlob(r=>{navigator.clipboard.write([new ClipboardItem({"image/png":r})])},"image/png")},t.crossOrigin="anonymous",t.src=e},async saveImage(e){let t=await AC(e);if(!t)return;let n=new URL(e).pathname.split("/").pop(),r=new File([t],n,{type:t.type});Ds(r)},copy(){let e=document.getSelection();!e||Kt.copy(e.toString())},cut(){this.copy(),LC.dispatch("INSERT_TEXT",{rawText:""})},async paste(){let e=await navigator.clipboard.readText(),t=new DataTransfer;t.setData("text/plain",e),document.dispatchEvent(new ClipboardEvent("paste",{clipboardData:t}))}})});function ET(e,t,n){let r=Tf.getSendMessageOptionsForReply({channel:e,message:t,shouldMention:!0,showMentionToggle:!0});if(rl.store.greetMode==="Message"||n.length>1){r.stickerIds=n;let i={content:"",tts:!1,invalidEmojis:[],validNonShortcutEmojis:[]};Tf._sendMessage(e.id,i,r)}else Tf.sendGreetMessage(e.id,n[0],r)}function EC({stickers:e,channel:t,message:n}){let r=rl.use(["greetMode","multiGreetChoices"]),{greetMode:i,multiGreetChoices:s=[]}=r;return o(L.Menu,{navId:"greet-sticker-picker",onClose:()=>E.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Greet Sticker Picker"},o(L.MenuGroup,{label:"Greet Mode"},Object.values(DT).map(l=>o(L.MenuRadioItem,{key:l,group:"greet-mode",id:"greet-mode-"+l,label:l,checked:l===i,action:()=>r.greetMode=l}))),o(L.MenuSeparator,null),o(L.MenuGroup,{label:"Greet Stickers"},e.map(l=>o(L.MenuItem,{key:l.id,id:"greet-"+l.id,label:l.description.split(" ")[0],action:()=>ET(t,n,[l.id])}))),rl.store.unholyMultiGreetEnabled?o(d,null,o(L.MenuSeparator,null),o(L.MenuItem,{label:"Unholy Multi-Greet",id:"unholy-multi-greet"},e.map(l=>{let c=s.some(u=>u===l.id);return o(L.MenuCheckboxItem,{key:l.id,id:"multi-greet-"+l.id,label:l.description.split(" ")[0],checked:c,disabled:!c&&s.length>=3,action:()=>{r.multiGreetChoices=c?s.filter(u=>u!==l.id):[...s,l.id]}})}),o(L.MenuSeparator,null),o(L.MenuItem,{id:"multi-greet-submit",label:"Send Greets",action:()=>ET(t,n,s),disabled:s.length===0}))):null)}var DT,rl,Tf,xf,OT=m(()=>{"use strict";a();D();w();b();O();T();DT=(n=>(n.Greet="Greet",n.NormalMessage="Message",n))(DT||{}),rl=k({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(),Tf=P("sendGreetMessage");xf=g({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:[p.Ven],settings:rl,patches:[{find:"Messages.WELCOME_CTA_LABEL",replacement:{match:/innerClassName:\i\(\).welcomeCTAButton,(?<=%\i\.length;return (\i)\[\i\].+?)/,replace:"$&onContextMenu:(e)=>$self.pickSticker(e,$1,arguments[0]),"}}],pickSticker(e,t,n){n.message.deleted||cn.open(e,()=>o(EC,{stickers:t,...n}))}})});function FC(e,t,n){let r=t.name+(t.id?`:${t.id}`:"");return Dt.get({url:`/channels/${e.channel_id}/messages/${e.id}/reactions/${r}`,query:{limit:100,type:n},oldFormErrors:!0}).then(i=>E.dispatch({type:"MESSAGE_REACTION_ADD_USERS",channelId:e.channel_id,messageId:e.id,users:i.body,emoji:t,reactionType:n})).catch(console.error).finally(()=>so(250))}function $C(e,t,n){let r=`${e.id}:${t.name}:${t.id??""}:${n}`,i=_C.__getLocalVars().reactions[r]??={fetched:!1,users:{}};return i.fetched||(BC.unshift(()=>FC(e,t,n)),i.fetched=!0),i.users}function UC(e){return function(n,r){return o(W,{text:e.slice(5).map(i=>i.username).join(", ")},({onMouseEnter:i,onMouseLeave:s})=>o("div",{className:OC.moreUsers,onMouseEnter:i,onMouseLeave:s},"+",e.length-5))}}function GC(e){e.stopPropagation()}var DC,OC,_C,BC,wf,_T=m(()=>{"use strict";a();ie();w();fe();ar();ve();b();O();T();DC=re(()=>ze("defaultRenderUser","showDefaultAvatarsForNullUsers")),OC=P("moreUsers","emptyUser","avatarContainer","clickableAvatar"),_C=P("getReactions"),BC=new fn;wf=g({name:"WhoReacted",description:"Renders the Avatars of reactors",authors:[p.Ven,p.KannaDev],patches:[{find:",reactionRef:",replacement:{match:/(?<=(\i)=(\i)\.hideCount,)(.+?reactionCount.+?\}\))/,replace:(e,t,n,r)=>`whoReactedProps=${n},${r},${t}?null:$self.renderUsers(whoReactedProps)`}}],renderUsers(e){return e.message.reactions.length>10?null:o(A,{noop:!0},o(this._renderUsers,{...e}))},_renderUsers({message:e,emoji:t,type:n}){let r=Lt();I.useEffect(()=>{let l=c=>{c.messageId===e.id&&r()};return E.subscribe("MESSAGE_REACTION_ADD_USERS",l),()=>E.unsubscribe("MESSAGE_REACTION_ADD_USERS",l)},[e.id]);let i=$C(e,t,n),s=Object.values(i).filter(Boolean);for(let l of s)E.dispatch({type:"USER_UPDATE",user:l});return o("div",{style:{marginLeft:"0.5em",transform:"scale(0.9)"}},o("div",{onClick:GC},o(DC,{users:s,guildId:Z.getChannel(e.channel_id)?.guild_id,renderIcon:!1,max:5,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:UC(s)})))}})});var Pf,BT=m(()=>{"use strict";a();_t();w();b();Pf=g({name:"Wikisearch",description:"Searches Wikipedia for your requested query. (/wikisearch)",authors:[p.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 n=Oe(e,"search","");if(!n)return oe(t.channel.id,{content:"No word was defined!"});let r=new URLSearchParams({action:"query",format:"json",list:"search",formatversion:"2",origin:"*",srsearch:n}),i=await fetch("https://en.wikipedia.org/w/api.php?"+r).then(u=>u.json()).catch(u=>(console.log(u),oe(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),oe(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),oe(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};oe(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"}}]})}}]})});var Te,pr=m(()=>{a();fg();gg();hg();yg();vg();Sg();bg();Tg();xg();wg();Pg();Mg();Jc();Xh();Jh();Qh();ty();ny();uy();py();dy();my();fy();Iy();Ny();ky();Ey();Dy();Oy();_y();Uy();Gy();Yy();Zy();Xy();ov();lv();cv();uv();pv();dv();hv();yv();bv();Tv();Pv();ip();ia();_v();Fv();Uv();zv();qv();Xv();r1();s1();a1();l1();u1();p1();d1();m1();f1();g1();h1();y1();v1();S1();b1();T1();x1();w1();P1();k1();wi();H1();eS();tS();rS();yS();vS();kS();RS();AS();jS();WS();YS();l0();c0();m0();h0();T0();ob();rb();ub();wm();Sb();bb();Tb();xb();Rb();Ab();Eb();_b();Fb();Wb();qb();eT();nT();Vm();oT();iT();sT();pT();fT();yT();ST();bT();wT();MT();NT();AT();LT();OT();_T();BT();Te={[zl.name]:zl,[jl.name]:jl,[Wl.name]:Wl,[ql.name]:ql,[Kl.name]:Kl,[Yl.name]:Yl,[Zl.name]:Zl,[Xl.name]:Xl,[Jl.name]:Jl,[Ql.name]:Ql,[Vl.name]:Vl,[ec.name]:ec,[ui.name]:ui,[Qc.name]:Qc,[Vc.name]:Vc,[eu.name]:eu,[tu.name]:tu,[nu.name]:nu,[iu.name]:iu,[su.name]:su,[au.name]:au,[lu.name]:lu,[cu.name]:cu,[uu.name]:uu,[pu.name]:pu,[du.name]:du,[bu.name]:bu,[Tu.name]:Tu,[xu.name]:xu,[Iu.name]:Iu,[Cu.name]:Cu,[Nu.name]:Nu,[Ru.name]:Ru,[Eu.name]:Eu,[Du.name]:Du,[Fu.name]:Fu,[$u.name]:$u,[Uu.name]:Uu,[Gu.name]:Gu,[Hu.name]:Hu,[ju.name]:ju,[Zu.name]:Zu,[Xu.name]:Xu,[Qu.name]:Qu,[Vu.name]:Vu,[tp.name]:tp,[ap.name]:ap,[up.name]:up,[pp.name]:pp,[fp.name]:fp,[gp.name]:gp,[hp.name]:hp,[vp.name]:vp,[wp.name]:wp,[Ip.name]:Ip,[Cp.name]:Cp,[Np.name]:Np,[kp.name]:kp,[Ap.name]:Ap,[Dp.name]:Dp,[Op.name]:Op,[_p.name]:_p,[Bp.name]:Bp,[Fp.name]:Fp,[$p.name]:$p,[Up.name]:Up,[Gp.name]:Gp,[Hp.name]:Hp,[zp.name]:zp,[jp.name]:jp,[Wp.name]:Wp,[qp.name]:qp,[Kp.name]:Kp,[Yp.name]:Yp,[td.name]:td,[nd.name]:nd,[ad.name]:ad,[ld.name]:ld,[Sd.name]:Sd,[Pd.name]:Pd,[Md.name]:Md,[Id.name]:Id,[Nd.name]:Nd,[Ad.name]:Ad,[Ud.name]:Ud,[Gd.name]:Gd,[Hd.name]:Hd,[Zd.name]:Zd,[Xd.name]:Xd,[Jd.name]:Jd,[Qd.name]:Qd,[tm.name]:tm,[Sm.name]:Sm,[bm.name]:bm,[Tm.name]:Tm,[Mm.name]:Mm,[Im.name]:Im,[km.name]:km,[Rm.name]:Rm,[Am.name]:Am,[Om.name]:Om,[Bm.name]:Bm,[Um.name]:Um,[Gm.name]:Gm,[Hm.name]:Hm,[jm.name]:jm,[Wm.name]:Wm,[Xm.name]:Xm,[tf.name]:tf,[Qm.name]:Qm,[nf.name]:nf,[rf.name]:rf,[sf.name]:sf,[lf.name]:lf,[cf.name]:cf,[uf.name]:uf,[pf.name]:pf,[mf.name]:mf,[gf.name]:gf,[hf.name]:hf,[vf.name]:vf,[Sf.name]:Sf,[bf.name]:bf,[xf.name]:xf,[wf.name]:wf,[Pf.name]:Pf}});var If={};ge(If,{BadgePosition:()=>ws,_getBadges:()=>HC,addBadge:()=>bd,removeBadge:()=>Td});function bd(e){e.component&&=A.wrap(e.component,{noop:!0}),Mf.add(e)}function Td(e){return Mf.delete(e)}function HC(e){let t=[];for(let r of Mf)(!r.shouldShow||r.shouldShow(e))&&(r.position===0?t.unshift({...r,...e}):t.push({...r,...e}));let n=Te.BadgeAPI.getDonorBadges(e.user.id);return n&&t.unshift(...n),t}var ws,Mf,Ps=m(()=>{"use strict";a();ie();pr();ws=(n=>(n[n.START=0]="START",n[n.END=1]="END",n))(ws||{}),Mf=new Set});var Cf={};ge(Cf,{Badges:()=>KC,Commands:()=>jC,ContextMenu:()=>tN,DataStore:()=>Nt,MemberListDecorators:()=>XC,MessageAccessories:()=>WC,MessageDecorations:()=>ZC,MessageEvents:()=>zC,MessagePopover:()=>qC,Notices:()=>La,Notifications:()=>eN,ServerList:()=>YC,Settings:()=>JC,SettingsStore:()=>QC,Styles:()=>VC});var zC,La,jC,Nt,WC,qC,KC,YC,ZC,XC,JC,QC,VC,eN,tN,ki=m(()=>{"use strict";a();Ps();_t();Pt();Cn();dd();la();hd();Sn();Ko();Gs();uo();Ra();D();Ku();Ge();zC=Su,La=Rc,jC=Fc,Nt=In,WC=bp,qC=Ju,KC=If,YC=Rd,ZC=gd,XC=pd,JC=Pc,QC=qu,VC=sc,eN=lc,tN=nc});var kf={};ge(kf,{toggle:()=>Nf});async function Nf(e){Ro?Ro.disabled=!e:e&&(Ro=document.createElement("style"),Ro.id="vencord-custom-css",document.documentElement.appendChild(Ro),VencordNative.quickCss.addChangeListener(t=>{Ro.textContent=t,Ro.disabled=!M.useQuickCss}),Ro.textContent=await VencordNative.quickCss.get())}async function FT(){qi||(qi=document.createElement("style"),qi.id="vencord-themes",document.documentElement.appendChild(qi));let{themeLinks:e}=M,t=e.map(n=>`@import url("${n.trim()}");`).join(`
`);qi.textContent=t}var Ro,qi,Rf=m(()=>{"use strict";a();D();document.addEventListener("DOMContentLoaded",()=>{Nf(M.useQuickCss),Bs("useQuickCss",Nf),FT(),Bs("themeLinks",FT)})});var Af={};ge(Af,{Common:()=>Cl,_initWebpack:()=>ns,_resolveReady:()=>ts,addListener:()=>ix,cache:()=>Un,extract:()=>yl,filters:()=>K,find:()=>Ht,findAll:()=>or,findBulk:()=>Or,findByCode:()=>ze,findByCodeLazy:()=>ce,findByProps:()=>Nn,findByPropsLazy:()=>P,findLazy:()=>ke,findModuleId:()=>os,findStore:()=>rx,findStoreLazy:()=>ae,listeners:()=>gl,mapMangledModule:()=>Hf,mapMangledModuleLazy:()=>Ke,onceReady:()=>fl,removeListener:()=>sx,search:()=>hl,subscriptions:()=>Gf,waitFor:()=>Ye,wreq:()=>Gt});var il=m(()=>{"use strict";a();T();O()});function UT(){function e(t){try{let n=t[1],{subscriptions:r,listeners:i}=Vencord.Webpack,{patches:s}=Vencord.Plugins;for(let l in n){let c=n[l],u=c.toString().replaceAll(`
`,"");u.startsWith("function(")&&(u="0,"+u);let h=c,f=new Set,y=n[l]=function(S,x,R){try{c(S,x,R)}catch(_){if(c===h)throw _;return Ao.error("Error in patched chunk",_),void h(S,x,R)}if(S.exports===window){Object.defineProperty(R.c,l,{value:R.c[l],enumerable:!1,configurable:!0,writable:!0});return}let C=Number(l);for(let _ of i)try{_(x,C)}catch($){Ao.error("Error in webpack listener",$)}for(let[_,$]of r)try{if(_(x))r.delete(_),$(x,C);else if(typeof x=="object"){x.default&&_(x.default)&&(r.delete(_),$(x.default,C));for(let B in x)B.length<=3&&x[B]&&_(x[B])&&(r.delete(_),$(x[B],C))}}catch(B){Ao.error("Error while firing callback for webpack chunk",B)}};try{y.toString=()=>c.toString(),y.original=h}catch{}for(let S=0;S<s.length;S++){let x=s[S],R=an(`patch by ${x.plugin}`,(C,_)=>u.replace(C,_));if(!(x.predicate&&!x.predicate())&&u.includes(x.find)){f.add(x.plugin);for(let C of x.replacement){if(C.predicate&&!C.predicate())continue;let _=c,$=u;jr(C,x.plugin);try{let B=R(C.match,C.replace);B===u&&!x.noWarn?Ao.warn(`Patch by ${x.plugin} had no effect (Module id is ${l}): ${C.match}`):(u=B,c=(0,eval)(`// Webpack Module ${l} - Patched by ${[...f].join(", ")}
${B}
//# sourceURL=WebpackModule${l}`))}catch(B){Ao.error(`Patch by ${x.plugin} errored (Module id is ${l}): ${C.match}
`,B),u=$,c=_,f.delete(x.plugin)}}x.all||s.splice(S--,1)}}}}catch(n){Ao.error("Error in handlePush",n)}return e.original.call(window[qt],t)}e.original=window[qt].push,Object.defineProperty(window[qt],"push",{get:()=>e,set:t=>e.original=t,configurable:!0})}var $T,Ao,GT=m(()=>{"use strict";a();w();be();Wr();es();il();Ao=new Y("WebpackInterceptor","#8caaee");window[qt]?(Ao.info(`Patching ${qt}.push (was already existant, likely from cache!)`),ns(window[qt]),UT()):Object.defineProperty(window,qt,{get:()=>$T,set:e=>{e?.push!==Array.prototype.push&&(Ao.info(`Patching ${qt}.push`),ns(e),UT(),delete window[qt],window[qt]=e),$T=e},configurable:!0})});async function nN(){M.cloud.settingsSync&&M.cloud.authenticated&&($o.Vencord_settingsDirty?(await ur(),delete $o.Vencord_settingsDirty):await Os(!1)&&he({title:"Cloud Settings",body:"Your settings have been updated! Click here to restart to fully apply changes!",color:"var(--green-360)",onClick:Fs}))}async function oN(){if(await fl,qc(),nN(),!1)try{}catch(e){}}var Lm=m(()=>{"use strict";a();ki();qs();Fl();Rf();dr();il();Rf();GT();uo();D();qs();bs();ri();oi();dr();il();T();oN()});var rN={};ge(rN,{Api:()=>Cf,PlainSettings:()=>En,Plugins:()=>Yc,QuickCss:()=>kf,Settings:()=>M,Updater:()=>Ic,Util:()=>Bl,Webpack:()=>Af});a();a();a();var Bf=`<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Vencord QuickCSS Editor</title>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.37.1/min/vs/editor/editor.main.min.css"
integrity="sha512-wB3xfL98hWg1bpkVYSyL0js/Jx9s7FsDg9aYO6nOMSJTgPuk/PFqxXQJKKSUjteZjeYrfgo9NFBOA1r9HwDuZw=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>
<style>
html,
body,
#container {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
}
</style>
</head>
<body>
<div id="container"></div>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.37.1/min/vs/loader.min.js"
integrity="sha512-A+6SvPGkIN9Rf0mUXmW4xh7rDvALXf/f0VtOUiHlDUSPknu2kcfz1KzLpOJyL2pO+nZS13hhIjLqVgiQExLJrw=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
><\/script>
<script>
require.config({
paths: {
vs: "https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.37.1/min/vs",
},
});
require(["vs/editor/editor.main"], () => {
getCurrentCss().then((css) => {
var editor = monaco.editor.create(
document.getElementById("container"),
{
value: css,
language: "css",
theme: getTheme(),
}
);
editor.onDidChangeModelContent(() =>
setCss(editor.getValue())
);
window.addEventListener("resize", () => {
// make monaco re-layout
editor.layout();
});
});
});
<\/script>
</body>
</html>
`;Cn();Fl();tt();var{localStorage:lg}=window,cg=new Set;var Nx=async()=>{},kx=At(e=>VencordNative.quickCss.set(e));window.VencordNative={native:{getVersions:()=>({}),openExternal:async e=>void open(e,"_blank")},updater:{getRepo:async()=>({ok:!0,value:"https://github.com/Vendicated/Vencord"}),getUpdates:async()=>({ok:!0,value:[]}),update:async()=>({ok:!0,value:!1}),rebuild:async()=>({ok:!0,value:!0})},quickCss:{get:()=>Qe("VencordQuickCss").then(e=>e??""),set:async e=>{await Ve("VencordQuickCss",e),cg.forEach(t=>t(e))},addChangeListener(e){cg.add(e)},openFile:Nx,async openEditor(){let e=`popup,width=${Math.min(window.innerWidth,1e3)},height=${Math.min(window.innerHeight,1e3)}`,t=open("about:blank","VencordQuickCss",e);if(!t){alert("Failed to open QuickCSS popup. Make sure to allow popups!");return}t.setCss=kx,t.getCurrentCss=()=>VencordNative.quickCss.get(),t.getTheme=()=>zr()===2?"vs-light":"vs-dark",t.document.write(Bf)}},settings:{get:()=>lg.getItem("VencordSettings")||"{}",set:async e=>lg.setItem("VencordSettings",e),getSettingsDir:async()=>"LocalStorage"}};Lm();return Lo(rN);})();
//# sourceURL=VencordWeb
/*! For license information please see browser.js.LEGAL.txt */