From 74bbe65688a66788d392f221b7830db069ac3f55 Mon Sep 17 00:00:00 2001 From: Wizzard <25581244+Wizzard@users.noreply.toomuchslop.com> Date: Tue, 11 Jul 2023 23:04:56 -0400 Subject: [PATCH] Vencord fixes --- assets/vencord/Vencord.user.js | 299 ------------------------ assets/vencord/vencord.js | 410 +++++++++++++++++++++++++++++++++ resources.qrc | 19 +- src/discordpage.cpp | 4 +- submodules/Vencord | 1 - 5 files changed, 423 insertions(+), 310 deletions(-) delete mode 100644 assets/vencord/Vencord.user.js create mode 100644 assets/vencord/vencord.js delete mode 160000 submodules/Vencord diff --git a/assets/vencord/Vencord.user.js b/assets/vencord/Vencord.user.js deleted file mode 100644 index 227dcba..0000000 --- a/assets/vencord/Vencord.user.js +++ /dev/null @@ -1,299 +0,0 @@ -// ==UserScript== -// @name Vencord -// @description A Discord client mod - Web version -// @version 1.3.4.1688780477974 -// @author Vendicated (https://github.com/Vendicated) -// @namespace https://github.com/Vendicated/Vencord -// @supportURL https://github.com/Vendicated/Vencord -// @license GPL-3.0 -// @match *://*.discord.com/* -// @grant GM_xmlhttpRequest -// @run-at document-start -// @compatible chrome Chrome + Tampermonkey or Violentmonkey -// @compatible firefox Firefox Tampermonkey -// @compatible opera Opera + Tampermonkey or Violentmonkey -// @compatible edge Edge + Tampermonkey or Violentmonkey -// @compatible safari Safari + Tampermonkey or Violentmonkey -// ==/UserScript== - - -// this UserScript DOES NOT work on Firefox with Violentmonkey or Greasemonkey due to a bug that makes it impossible -// to overwrite stuff on the window on sites that use CSP. Use Tampermonkey or use a chromium based browser -// https://github.com/violentmonkey/violentmonkey/issues/997 - -// this is a compiled and minified version of Vencord. For the source code, visit the GitHub repo - -"use strict";var Vencord=(()=>{var qT=Object.create;var Xi=Object.defineProperty;var KT=Object.getOwnPropertyDescriptor;var YT=Object.getOwnPropertyNames;var ZT=Object.getPrototypeOf,XT=Object.prototype.hasOwnProperty;var Ff=(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 g=(e,t)=>()=>(e&&(t=e(e=0)),t);var Dr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ye=(e,t)=>{for(var n in t)Xi(e,n,{get:t[n],enumerable:!0})},$f=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of YT(t))!XT.call(e,i)&&i!==n&&Xi(e,i,{get:()=>t[i],enumerable:!(r=KT(t,i))||r.enumerable});return e};var cl=(e,t,n)=>(n=e!=null?qT(ZT(e)):{},$f(t||!e||!e.__esModule?Xi(n,"default",{value:e,enumerable:!0}):n,e)),Do=e=>$f(Xi({},"__esModule",{value:!0}),e);function JT(e){if(!e)return{};let t={},n=e.trim().split(` -`);for(var r=0;r{var i=new FileReader;i.onload=s=>n(s.target.result),e==="arrayBuffer"?i.readAsArrayBuffer(t):e==="text"?i.readAsText(t,"utf-8"):r("unknown to")})}function QT(e,t){return new Promise((n,r)=>{let i=t||{};i.url=e,i.data=i.body,i.responseType="blob",i.onload=s=>{var c=s.response;s.blob=()=>Promise.resolve(c),s.arrayBuffer=()=>ul("arrayBuffer",c),s.text=()=>ul("text",c),s.json=async()=>JSON.parse(await ul("text",c)),s.headers=new Headers(JT(s.responseHeaders)),s.ok=s.status>=200&&s.status<300,n(s)},i.ontimeout=()=>r("fetch timeout"),i.onerror=()=>r("fetch error"),i.onabort=()=>r("fetch abort"),GM_xmlhttpRequest(i)})}var f,a=g(()=>{"use strict";f=QT});var m,o,l=g(()=>{"use strict";m=Symbol.for("react.fragment"),o=(...e)=>(o=Vencord.Webpack.Common.React.createElement)(...e)});var Nn={};ye(Nn,{clear:()=>ox,createStore:()=>Gf,del:()=>tx,delMany:()=>nx,entries:()=>sx,get:()=>et,getMany:()=>ex,keys:()=>rx,promisifyRequest:()=>bt,set:()=>tt,setMany:()=>VT,update:()=>Oo,values:()=>ix});function bt(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Gf(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=bt(n);return(i,s)=>r.then(c=>s(c.transaction(t,i).objectStore(t)))}function sn(){return pl||(pl=Gf("VencordData","VencordStore")),pl}function et(e,t=sn()){return t("readonly",n=>bt(n.get(e)))}function tt(e,t,n=sn()){return n("readwrite",r=>(r.put(t,e),bt(r.transaction)))}function VT(e,t=sn()){return t("readwrite",n=>(e.forEach(r=>n.put(r[1],r[0])),bt(n.transaction)))}function ex(e,t=sn()){return t("readonly",n=>Promise.all(e.map(r=>bt(n.get(r)))))}function Oo(e,t,n=sn()){return n("readwrite",r=>new Promise((i,s)=>{r.get(e).onsuccess=function(){try{r.put(t(this.result),e),i(bt(r.transaction))}catch(c){s(c)}}}))}function tx(e,t=sn()){return t("readwrite",n=>(n.delete(e),bt(n.transaction)))}function nx(e,t=sn()){return t("readwrite",n=>(e.forEach(r=>n.delete(r)),bt(n.transaction)))}function ox(e=sn()){return e("readwrite",t=>(t.clear(),bt(t.transaction)))}function dl(e,t){return e.openCursor().onsuccess=function(){!this.result||(t(this.result),this.result.continue())},bt(e.transaction)}function rx(e=sn()){return e("readonly",t=>{if(t.getAllKeys)return bt(t.getAllKeys());let n=[];return dl(t,r=>n.push(r.key)).then(()=>n)})}function ix(e=sn()){return e("readonly",t=>{if(t.getAll)return bt(t.getAll());let n=[];return dl(t,r=>n.push(r.value)).then(()=>n)})}function sx(e=sn()){return e("readonly",t=>{if(t.getAll&&t.getAllKeys)return Promise.all([bt(t.getAllKeys()),bt(t.getAll())]).then(([r,i])=>r.map((s,c)=>[s,i[c]]));let n=[];return e("readonly",r=>dl(r,i=>n.push([i.key,i.value])).then(()=>n))})}var pl,kn=g(()=>{"use strict";a();l();});var Or,ml=g(()=>{"use strict";a();l();Or=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 an,_r=g(()=>{a();l();an="bea7a17"});var Ji,Hf=g(()=>{a();l();Ji="Vendicated/Vencord"});var Yt,ax,fl,Qi,d,gl,M=g(()=>{"use strict";a();l();_r();Hf();Yt="webpackChunkdiscord_app",ax="Vencord.Webpack.Common.React",fl=`Vencord/${an}${Ji?` (https://github.com/${Ji})`:""}`,Qi="1026515880080842772",d=Object.freeze({Ven:{name:"Vendicated",id:343383572805058560n},Arjix:{name:"ArjixWasTaken",id:674710789138939916n},Cyn:{name:"Cynosphere",id:150745989836308480n},Megu:{name:"Megumin",id:545581357812678656n},botato:{name:"botato",id:440990343899643943n},obscurity:{name:"obscurity",id:336678828233588736n},rushii:{name:"rushii",id:295190422244950017n},Glitch:{name:"Glitchy",id:269567451199569920n},Samu:{name:"Samu",id:702973430449832038n},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}}),gl=(()=>Object.freeze(Object.fromEntries(Object.entries(d).filter(e=>e[1].id!==0n).map(([e,t])=>[t.id,t]))))()});function Et(e,t=300){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}var rr=g(()=>{"use strict";a();l()});function Gn(e){let t;return()=>t??(t=e())}function ft(e,t=5){let n=0,r=Object.assign(function(){},{[Vi]:void 0,[ts](){return!r[Vi]&&t>n++&&(r[Vi]=e()),r[Vi]}});return new Proxy(r,es)}var zf,es,ts,Vi,ln=g(()=>{"use strict";a();l();zf=["arguments","caller","prototype"],es={},ts=Symbol.for("vencord.lazy.get"),Vi=Symbol.for("vencord.lazy.cached");for(let e of["apply","construct","defineProperty","deleteProperty","get","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf"])es[e]=(t,...n)=>Reflect[e](t[ts](),...n);es.ownKeys=e=>{let t=e[ts](),n=Reflect.ownKeys(t);for(let r of zf)n.includes(r)||n.push(r);return n};es.getOwnPropertyDescriptor=(e,t)=>{if(typeof t=="string"&&zf.includes(t))return Reflect.getOwnPropertyDescriptor(e,t);let n=Reflect.getOwnPropertyDescriptor(e[ts](),t);return n&&Object.defineProperty(e,t,n),n}});var X,xe=g(()=>{"use strict";a();l();X=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 lx,cn,ns=g(()=>{"use strict";a();l();xe();lx=(e,t,n)=>t,cn=lx});function rs(e){if(Hn!==void 0)throw"no.";zt=e.push([[Symbol("Vencord")],{},t=>t]),Hn=zt.c,e.pop()}function Ae(e,t=!0){return ft(()=>jt(e,t))}function ir(e,t=!0){if(typeof e!="function")throw new Error("Invalid filter. Expected a function got "+typeof e);let n=[];for(let r in Hn){let i=Hn[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 c=i.exports[s];c&&e(c)&&n.push(c)}}}return n}function Ze(e,t){return ft(()=>Wf(e,t))}function Rn(...e){return jt(Z.byProps(...e))}function I(...e){return Ae(Z.byProps(...e))}function We(...e){return jt(Z.byCode(...e))}function pe(...e){return Ae(Z.byCode(...e))}function cx(e){return jt(Z.byStoreName(e))}function ce(e){return Ae(Z.byStoreName(e))}function Xe(e,t){if(typeof e=="string")e=Z.byProps(e);else if(Array.isArray(e))e=Z.byProps(...e);else if(typeof e!="function")throw new Error("filter must be a string, string[] or function, got "+typeof e);let[n,r]=jt(e,!0,!0);if(n)return void t(n,r);jf.set(e,t)}function ux(e){vl.add(e)}function px(e){vl.delete(e)}function Sl(...e){let t={},n=zt.m;e:for(let r in n){let i=n[r].original??n[r],s=i.toString();for(let c of e)if(typeof c=="string"&&!s.includes(c)||c instanceof RegExp&&!c.test(s))continue e;t[r]=i}return t}function bl(e){let t=zt.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 hl,os,yl,zt,Hn,Z,jf,vl,jt,Br,is,Wf,B=g(()=>{"use strict";a();l();ln();xe();ns();hl=new X("Webpack"),yl=new Promise(e=>os=e),Z={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},jf=new Map,vl=new Set;jt=cn("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 Hn){let s=Hn[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 c=n?s.exports.default:s.exports;return r?[c,Number(i)]:c}for(let c in s.exports)if(c.length<=3){let u=s.exports[c];if(u&&t(u))return r?[u,Number(i)]:u}}}}if(!r){let i=new Error("Didn't find module matching this filter");hl.warn(i)}return r?[null,null]:null});Br=cn("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 jt(t[0]);let r=t,i=0,s=Array(n);e:for(let c in Hn){let u=Hn[c];if(!!u?.exports)for(let p=0;p{"use strict";a();l();B();ss=I("image","modal"),gt=I("buttonWrapper","buttonContent")});function _o(e,t){for(let n in t){let r=t[n];typeof r=="object"&&!Array.isArray(r)?(e[n]??={},_o(e[n],r)):e[n]??=r}return e}function V(...e){return e.filter(Boolean).join(" ")}function lo(e){return new Promise(t=>setTimeout(t,e))}function Xt(e,t="Copied to clipboard!"){Zt.SUPPORTS_COPY?Zt.copy(e):t="Your browser does not support copying to clipboard",Q.show({message:t,id:Q.genId(),type:Q.Type.SUCCESS})}function mx(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Tl(e){try{return new URL(e)}catch{return null}}function as(e){return e}var xl,fx,Fr,he=g(()=>{"use strict";a();l();w();M();xl=e=>{let t=e.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,unsafeWindow.innerHeight);return!(t.bottom<0||t.top-n>=0)};fx=navigator.userAgent.includes("Mobi"),Fr=e=>Object.hasOwn(gl,e)});function it(e,t){let n=Object.assign({fallbackValue:null,deps:[],onError:null},t),[r,i]=te({value:n.fallbackValue,error:null,pending:!0});return st(()=>{let s=!0;return r.pending||i({...r,pending:!0}),e().then(c=>{!s||(i({value:c,error:null,pending:!1}),n.onSuccess?.(c))}).catch(c=>{!s||(i({value:null,error:c,pending:!1}),n.onError?.(c))}),()=>void(s=!1)},n.deps),[r.value,r.error,r.pending]}function Dt(e){let t=sr(n=>n+1,0);return e?t:t[1]}function se(e){let t=Gn(e);return n=>{let r=t();return o(r,{...n})}}var wl,be=g(()=>{"use strict";a();l();w();ln();he();wl=(e=!1)=>{let t=N.useRef(null),[n,r]=te(!1);return[s=>{t.current?.disconnect(),t.current=null,s&&(xl(s)&&(r(!0),e)||(t.current=new IntersectionObserver(c=>{for(let u of c)u.target===s&&(u.isIntersecting&&e?(r(!0),t.current?.disconnect(),t.current=null):r(u.isIntersecting))}),t.current.observe(s)))},n]}});function ls(e,t){let n=function(){throw new Error(`Vencord could not find the ${e} Component`)},r=se(()=>n);return Xe(t,i=>{n=i,Object.assign(r,i)}),r}function Tt(e,t){Xe(Z.byStoreName(e),t)}var Pl=g(()=>{"use strict";a();l();be();B()});var b,Ot,R,ht,K,Le,cs,ee,un,us,Bo,Jt,$r,Kf,Yf,ps,ds,ms,fs,Ur,Ml,An,gx,Zf=g(()=>{"use strict";a();l();B();Pl();b={},Ml=ls("MaskedLink",e=>e?.type?.toString().includes("MASKED_LINK)")),An=ls("Timestamp",Z.byCode(".Messages.MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL.format")),gx=ls("Flex",["Justify","Align","Wrap"]);Xe("FormItem",e=>{({useToken:Ur,Card:Ot,Button:R,FormSwitch:ht,Tooltip:K,TextInput:Le,TextArea:cs,Text:ee,Select:un,SearchableSelect:us,Slider:Bo,ButtonLooks:Jt,TabBar:Yf,Popout:$r,Dialog:Kf,Paginator:ps,ScrollerThin:ds,Clickable:ms,Avatar:fs}=e),b=e})});var D,pn,Xf=g(()=>{"use strict";a();l();B();D={};Xe("MenuItem",e=>D=e);pn=Ze('type:"CONTEXT_MENU_OPEN"',{open:Z.byCode("stopPropagation"),openLazy:e=>e.toString().length<50,close:Z.byCode("CONTEXT_MENU_CLOSE")})});var N,te,st,Wt,Qt,sr,Jf,Fo,Qf=g(()=>{"use strict";a();l();B();Fo=I("createPortal","render");Xe("useState",e=>{N=e,{useEffect:st,useState:te,useMemo:Wt,useRef:Qt,useReducer:sr,useCallback:Jf}=N})});var Il,dn,Cl,qe,gs,Gr,co,hx,de,U,Ie,uo,J,Ee,nt,mn,Hr,Nl,Ue,Vf=g(()=>{"use strict";a();l();B();Pl();Il=I("connectStores"),Cl=I("openPrivateChannel"),Nl=Ze('"MaskedLinkStore"',{openUntrustedLink:Z.byCode(".apply(this,arguments)")}),Ue=pe("useStateFromStores");Tt("UserStore",e=>U=e);Tt("ChannelStore",e=>J=e);Tt("SelectedChannelStore",e=>Ie=e);Tt("SelectedGuildStore",e=>uo=e);Tt("GuildStore",e=>de=e);Tt("GuildMemberStore",e=>Ee=e);Tt("RelationshipStore",e=>nt=e);Tt("PermissionStore",e=>qe=e);Tt("PresenceStore",e=>co=e);Tt("ReadStateStore",e=>Gr=e);Tt("GuildChannelStore",e=>gs=e);Tt("MessageStore",e=>dn=e);Tt("WindowStore",e=>Hr=e);Tt("EmojiStore",e=>mn=e)});var eg={};var tg=g(()=>{"use strict";a();l()});var ng={};var og=g(()=>{"use strict";a();l()});var rg={};var ig=g(()=>{"use strict";a();l()});function hs(e,t=sg.MESSAGE){Q.show({id:Q.genId(),message:e,type:t})}var O,kl,_t,Vt,$o,at,ar,Ne,xt,sg,yx,Q,Ln,Zt,zr,ys,En,ag=g(()=>{"use strict";a();l();B();kl=Ae(e=>e.emitter?._events?.INSERT_TEXT),_t=I("getAPIBaseURL","get"),Vt=I("parseTwoDigitYear"),$o=I("highlight"),at=Ae(e=>e.Messages?.["en-US"]);Xe(["fromTimestamp","extractTimestamp"],e=>ar=e);sg={MESSAGE:0,SUCCESS:1,FAILURE:2,CUSTOM:3},yx={TOP:0,BOTTOM:1},Q={Type:sg,Position:yx,genId:()=>(Math.random()||Math.random()).toString(36).slice(2)};Ln={fetchUser:pe(".USER(","getUser")},Zt=Ze('document.queryCommandEnabled("copy")||document.queryCommandSupported("copy")',{copy:Z.byCode(".default.copy("),SUPPORTS_COPY:e=>typeof e=="boolean"}),zr=Ze("transitionToGuild - ",{transitionTo:Z.byCode("transitionTo -"),transitionToGuild:Z.byCode("transitionToGuild -"),goBack:Z.byCode("goBack()"),goForward:Z.byCode("goForward()")});Xe(["dispatch","subscribe"],e=>{O=e;let t=()=>{e.unsubscribe("CONNECTION_OPEN",t),os()};e.subscribe("CONNECTION_OPEN",t)});Xe("showToast",e=>{Q.show=e.showToast,Q.pop=e.popToast});Xe(["show","close"],e=>xt=e);Xe("parseTopic",e=>Ne=e);Xe(["open","saveAccountChanges"],e=>ys=e);En=Ae(e=>typeof e.ADMINISTRATOR=="bigint")});var Rl={};ye(Rl,{Alerts:()=>xt,Avatar:()=>fs,Button:()=>R,ButtonLooks:()=>Jt,ButtonWrapperClasses:()=>gt,Card:()=>Ot,ChannelStore:()=>J,Clickable:()=>ms,Clipboard:()=>Zt,ComponentDispatch:()=>kl,ComponentTypes:()=>eg,ContextMenu:()=>pn,Dialog:()=>Kf,EmojiStore:()=>mn,Flex:()=>gx,Flux:()=>Il,FluxDispatcher:()=>O,Forms:()=>b,GuildChannelStore:()=>gs,GuildMemberStore:()=>Ee,GuildStore:()=>de,MaskedLink:()=>Ml,MaskedLinkStore:()=>Nl,Menu:()=>D,MenuTypes:()=>ng,MessageStore:()=>dn,ModalImageClasses:()=>ss,NavigationRouter:()=>zr,Paginator:()=>ps,Parser:()=>Ne,PermissionStore:()=>qe,PermissionsBits:()=>En,PoggerModeSettingsStore:()=>hx,Popout:()=>$r,PresenceStore:()=>co,PrivateChannelsStore:()=>Cl,React:()=>N,ReactDOM:()=>Fo,ReadStateStore:()=>Gr,RelationshipStore:()=>nt,RestAPI:()=>_t,ScrollerThin:()=>ds,SearchableSelect:()=>us,Select:()=>un,SelectedChannelStore:()=>Ie,SelectedGuildStore:()=>uo,SettingsRouter:()=>ys,Slider:()=>Bo,SnowflakeUtils:()=>ar,Switch:()=>ht,TabBar:()=>Yf,Text:()=>ee,TextArea:()=>cs,TextInput:()=>Le,Timestamp:()=>An,Toasts:()=>Q,Tooltip:()=>K,UserStore:()=>U,UserUtils:()=>Ln,UtilTypes:()=>rg,WindowStore:()=>Hr,hljs:()=>$o,i18n:()=>at,moment:()=>Vt,showToast:()=>hs,useCallback:()=>Jf,useEffect:()=>st,useMemo:()=>Wt,useReducer:()=>sr,useRef:()=>Qt,useState:()=>te,useStateFromStores:()=>Ue,useToken:()=>Ur});var w=g(()=>{"use strict";a();l();qf();Zf();Xf();Qf();Vf();tg();og();ig();ag()});function jr(e,t){return vs.openModalLazy(e,t)}function ke(e,t,n){return vs.openModal(e,t,n)}function zn(e,t){return vs.closeModal(e,t)}function Ll(){return vs.closeAllModals()}var po,fn,Al,De,Ge,He,wt,Pt,vs,Je=g(()=>{"use strict";a();l();B();be();po=(i=>(i.SMALL="small",i.MEDIUM="medium",i.LARGE="large",i.DYNAMIC="dynamic",i))(po||{}),fn=Ze(".closeWithCircleBackground",{ModalRoot:Z.byCode(".root"),ModalHeader:Z.byCode(".header"),ModalContent:Z.byCode(".content"),ModalFooter:Z.byCode(".footerSeparator"),ModalCloseButton:Z.byCode(".closeWithCircleBackground")}),Al=se(()=>We(".renderLinkComponent",".responsive")),De=se(()=>fn.ModalRoot),Ge=se(()=>fn.ModalHeader),He=se(()=>fn.ModalContent),wt=se(()=>fn.ModalFooter),Pt=se(()=>fn.ModalCloseButton),vs=Ze("onCloseRequest:null!=",{openModal:Z.byCode("onCloseRequest:null!="),closeModal:Z.byCode("onCloseCallback&&"),openModalLazy:e=>e?.length===1&&Z.byCode(".apply(this,arguments)")(e),closeAllModals:Z.byCode(".value.key,")})});function lr(){return J.getChannel(Ie.getChannelId())}function El(){return de.getGuild(lr()?.guild_id)}function bx(e){Cl.openPrivateChannel(e)}function Wr(){return vx.getCurrentValue()?.appearance?.theme}function jn(e){kl.dispatchToLastSubscribed("INSERT_TEXT",{rawText:e,plainText:e})}function Tx(e,t,n,r){let i={content:"",invalidEmojis:[],tts:!1,validNonShortcutEmojis:[],...t};return Sx.sendMessage(e,i,n,r)}function Uo(e,t){return ke(n=>o(De,{...n,className:ss.modal,size:"dynamic"},o(Al,{className:ss.image,original:e,placeholder:e,src:e,renderLinkComponent:r=>o(Ml,{...r}),shouldHideMediaOptions:!1,shouldAnimate:!0,...t})))}async function gn(e){if(!await Ln.fetchUser(e))throw new Error("No such user: "+e);let n=uo.getGuildId();xx({userId:e,guildId:n,channelId:Ie.getChannelId(),analyticsLocation:{page:n?"Guild Channel":"DM Channel",section:"Profile Popout"}})}function Wn(e){return e.discriminator==="0"?e.username:e.tag}var vx,Sx,Ss,xx,ot=g(()=>{"use strict";a();l();B();w();Je();vx=Ae(e=>e.ProtoClass?.typeName.endsWith("PreloadedUserSettings")),Sx=I("editMessage","sendMessage");Ss=(n=>(n[n.Dark=1]="Dark",n[n.Light=2]="Light",n))(Ss||{});xx=pe("friendToken","USER_PROFILE_MODAL_OPEN")});function bs(e){return Boolean(e)}function Dl(e){return e!=null}var Ts=g(()=>{"use strict";a();l()});var Go,xs=g(()=>{"use strict";a();l();({localStorage:Go}=unsafeWindow)});var lg,z,Qe=g(()=>{"use strict";a();l();lg="",z={};for(let e of["top","bottom","left","right"])for(let t of[8,16,20]){let n=`vc-m-${e}-${t}`;z[`${e}${t}`]=n,lg+=`.${n}{margin-${e}:${t}px;}`}document.addEventListener("DOMContentLoaded",()=>document.head.append(Object.assign(document.createElement("style"),{textContent:lg,id:"vencord-margins"})),{once:!0})});function wx(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 cg=g(()=>{"use strict";a();l()});function Ol(e){let t=!1,n;return function(){return t?n:(t=!0,n=e.apply(this,arguments))}}var _l=g(()=>{"use strict";a();l()});function Ho(e){if(typeof e=="string")return e;let t=e.source.replaceAll("\\i","[A-Za-z_$][\\w$]*");return new RegExp(t,e.flags)}function ws(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 Bl(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 qr(e,t){let n=Object.getOwnPropertyDescriptors(e);n.match=Bl(n.match,Ho),n.replace=Bl(n.replace,r=>ws(r,t)),Object.defineProperties(e,n)}var Kr=g(()=>{"use strict";a();l()});var hn,cr=g(()=>{"use strict";a();l();hn=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 ug(e,t,n){return n===!1?t?e.slice(0,-1):e:e[0]}function Yr(e,t,n=!1){let r=Vt.duration(e,t),i=Ax.map(p=>({amount:r[p](),unit:p})),s=0;e:for(let p=0;pp==="days");if(c!==-1){let p=i[c],v=p.amount%7;v===0?i.splice(c,1):p.amount=v}let u="";for(;i.length;){let{amount:p,unit:v}=i.shift();u.length&&(u+=i.length?", ":" and "),(p>0||u.length)&&(u+=`${p} ${ug(v,p===1,n)}`)}return u.length?u:`0 ${ug(t,!1,n)}`}function Lx(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;i2?r+=", ":n-i>1&&(r+=" and ");return r}function Zr(e,t){let n="```";return`${n}${t||""} -${e.replaceAll("```","\\`\\`\\`")} -${n}`}var Fl,Px,Mx,$l,Ix,Cx,Nx,kx,Rx,qn,Ax,Kn=g(()=>{"use strict";a();l();w();Fl=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),Px=e=>e.toLowerCase().split("_"),Mx=e=>e.toLowerCase().split("-"),$l=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),Ix=e=>e.toLowerCase().split(" "),Cx=e=>e.map((t,n)=>n?t[0].toUpperCase()+t.slice(1):t).join(""),Nx=e=>e.join("_").toUpperCase(),kx=e=>e.join("-").toLowerCase(),Rx=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(""),qn=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(" "),Ax=["years","months","weeks","days","hours","minutes","seconds"]});var Ul={};ye(Ul,{ChangeList:()=>Or,Devs:()=>d,DevsById:()=>gl,ImageModal:()=>Al,LazyComponent:()=>se,Logger:()=>X,Margins:()=>z,ModalCloseButton:()=>Pt,ModalContent:()=>He,ModalFooter:()=>wt,ModalHeader:()=>Ge,ModalRoot:()=>De,ModalSize:()=>po,Modals:()=>fn,Queue:()=>hn,REACT_GLOBAL:()=>ax,SUPPORT_CHANNEL_ID:()=>Qi,Theme:()=>Ss,VENCORD_USER_AGENT:()=>fl,WEBPACK_CHUNK:()=>Yt,canonicalizeDescriptor:()=>Bl,canonicalizeMatch:()=>Ho,canonicalizeReplace:()=>ws,canonicalizeReplacement:()=>qr,checkIntersecting:()=>xl,classes:()=>V,closeAllModals:()=>Ll,closeModal:()=>zn,copyWithToast:()=>Xt,debounce:()=>Et,formatDuration:()=>Yr,getCurrentChannel:()=>lr,getCurrentGuild:()=>El,getTheme:()=>Wr,getUniqueUsername:()=>Wn,gitHash:()=>an,gitRemote:()=>Ji,humanFriendlyJoin:()=>Lx,identity:()=>as,insertTextIntoChatInputBox:()=>jn,isMobile:()=>fx,isNonNullish:()=>Dl,isObject:()=>mx,isPluginDev:()=>Fr,isTruthy:()=>bs,localStorage:()=>Go,makeCodeblock:()=>Zr,makeLazy:()=>Gn,mergeDefaults:()=>_o,onceDefined:()=>wx,onlyOnce:()=>Ol,openImageModal:()=>Uo,openModal:()=>ke,openModalLazy:()=>jr,openPrivateChannel:()=>bx,openUserProfile:()=>gn,parseUrl:()=>Tl,proxyLazy:()=>ft,sendMessage:()=>Tx,sleep:()=>lo,useAwaiter:()=>it,useForceUpdater:()=>Dt,useIntersection:()=>wl,wordsFromCamel:()=>Fl,wordsFromKebab:()=>Mx,wordsFromPascal:()=>$l,wordsFromSnake:()=>Px,wordsFromTitle:()=>Ix,wordsToCamel:()=>Cx,wordsToKebab:()=>kx,wordsToPascal:()=>Rx,wordsToSnake:()=>Nx,wordsToTitle:()=>qn});var Gl=g(()=>{"use strict";a();l();ml();M();rr();ot();Ts();ln();xs();xe();Qe();he();Je();cg();_l();Kr();cr();be();Kn();});var mg=g(()=>{});function Yn(e){return o("div",{...e,className:V(e.className,"vc-error-card")},e.children)}var Xr=g(()=>{"use strict";a();l();mg();he()});var Ox,fg,gg,Hl,E,ae=g(()=>{"use strict";a();l();xe();Qe();be();w();Xr();Ox="#e78284",fg=new X("React ErrorBoundary",Ox),gg={},Hl=se(()=>class extends N.PureComponent{state={error:gg,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}),fg.error(`A component threw an Error -`,t),fg.error("Component Stack",n.componentStack)}render(){if(this.state.error===gg)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(Yn,{style:{overflow:"hidden"}},o("h1",null,"Oh no!"),o("p",null,t),o("code",null,this.state.message,!!this.state.stack&&o("pre",{className:z.top8},this.state.stack)))}});Hl.wrap=(e,t)=>n=>o(Hl,{...t,wrappedProps:n},o(e,{...n}));E=Hl});function Ps(){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 zl=g(()=>{"use strict";a();l()});function Jr(e){return o(R,{...e,look:R.Looks.LINK,color:R.Colors.TRANSPARENT,onClick:()=>VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")},o(Ps,null),"Donate")}var jl=g(()=>{"use strict";a();l();w();zl()});function ue(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 Mt=g(()=>{"use strict";a();l()});function y(e){return e}var x=g(()=>{"use strict";a();l()});async function hg(e=!1){Wl={};let t={};e&&(t.cache="no-cache");let r=(await f("https://gist.githubusercontent.com/Vendicated/51a3dd775f6920429ec6e9b735ca7f01/raw/badges.csv",t).then(i=>i.text())).trim().split(` -`);if(r.shift()!=="id,tooltip,image"){new X("BadgeAPI").error("Invalid badges.csv file!");return}for(let i of r){let[s,c,u]=i.split(",");(Wl[s]??=[]).push({image:u,description:c})}}var _x,Bx,Wl,ql,yg=g(()=>{"use strict";a();l();Is();jl();ae();Mt();zl();M();xe();Qe();he();Je();x();w();_x="https://cdn.discordapp.com/attachments/1033680203433660458/1092089947126780035/favicon.png",Bx={description:"Vencord Contributor",image:_x,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},shouldShow:({user:e})=>Fr(e.id),link:"https://github.com/Vendicated/Vencord"},Wl={};ql=y({name:"BadgeAPI",description:"API to add badges to users.",authors:[d.Megu,d.Ven,d.TheSun],required:!0,patches:[{find:"Messages.PROFILE_USER_BADGES,role:",replacement:[{match:/&&(\i)\.push\(\{id:"premium".+?\}\);/,replace:"$&$1.unshift(...Vencord.Api.Badges._getBadges(arguments[0]));"},{match:/alt:" ","aria-hidden":!0,src:(?=(\i)\.src)/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 hg(!0),Q.show({id:Q.genId(),message:"Successfully refetched badges!",type:Q.Type.SUCCESS})}},async start(){Vencord.Api.Badges.addBadge(Bx),await hg()},renderBadgeComponent:E.wrap(e=>{let t=e.component;return o(t,{...e})},{noop:!0}),getDonorBadges(e){return Wl[e]?.map(t=>({...t,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},onClick(){let n=ke(r=>o(E,{noop:!0,onError:()=>{zn(n),VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")}},o(fn.ModalRoot,{...r},o(fn.ModalHeader,null,o(ue,{style:{width:"100%",justifyContent:"center"}},o(b.FormTitle,{tag:"h2",style:{width:"100%",textAlign:"center",margin:0}},o(Ps,null),"Vencord Donor"))),o(fn.ModalContent,null,o(ue,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(b.FormText,null,"This Badge is a special perk for Vencord Donors"),o(b.FormText,{className:z.top20},"Please consider supporting the development of Vencord by becoming a donor. It would mean a lot!!"))),o(fn.ModalFooter,null,o(ue,{style:{width:"100%",justifyContent:"center"}},o(Jr,null))))))}}))}})});var Kl,vg=g(()=>{"use strict";a();l();M();x();Kl=y({name:"CommandsAPI",authors:[d.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 Yl,Sg=g(()=>{"use strict";a();l();M();x();Yl=y({name:"ContextMenuAPI",description:"API for adding/removing items to/from context menus.",authors:[d.Nuckyz,d.Ven],required:!0,patches:[{find:"\u266B (\u3064\uFF61\u25D5\u203F\u203F\u25D5\uFF61)\u3064 \u266A",replacement:{match:/(?<=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 Zl,bg=g(()=>{"use strict";a();l();M();x();Zl=y({name:"MemberListDecoratorsAPI",description:"API to add decorators to member list (both in servers and DMs)",authors:[d.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 Xl,Tg=g(()=>{"use strict";a();l();M();x();Xl=y({name:"MessageAccessoriesAPI",description:"API to add message accessories.",authors:[d.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 Jl,xg=g(()=>{"use strict";a();l();M();x();Jl=y({name:"MessageDecorationsAPI",description:"API to add decorations to messages",authors:[d.TheSun],patches:[{find:".withMentionPrefix",replacement:{match:/(.roleDot.{10,50}{children:.{1,2})}\)/,replace:"$1.concat(Vencord.Api.MessageDecorations.__addDecorationsToMessage(arguments[0]))})"}}]})});var Ql,wg=g(()=>{"use strict";a();l();M();x();Ql=y({name:"MessageEventsAPI",description:"Api required by anything using message events.",authors:[d.Arjix,d.hunt,d.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,c)=>`${t}async ${n}if(await Vencord.Api.MessageEvents._handlePreSend(${i}.id,${r},${c},${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 Vl,Pg=g(()=>{"use strict";a();l();M();x();Vl=y({name:"MessagePopoverAPI",description:"API to add buttons to message popovers.",authors:[d.KingFish,d.Ven,d.Nuckyz],patches:[{find:"Messages.MESSAGE_UTILITIES_A11Y_LABEL",replacement:{match:/\i&&!\i\?\(0,\i\.jsxs?\)\(.{0,200}renderEmojiPicker:.{0,500}\?(\i)\(\{key:"reply-other"/,replace:(e,t)=>{let 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 ec,Mg=g(()=>{"use strict";a();l();M();x();ec=y({name:"NoticesAPI",description:"Fixes notices being automatically dismissed",authors:[d.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 tc,Ig=g(()=>{"use strict";a();l();M();x();tc=y({name:"ServerListAPI",authors:[d.kemo],description:"Api required for plugins that modify the server list",patches:[{find:"Messages.DISCODO_DISABLED",replacement:{match:/(Messages\.DISCODO_DISABLED\);return)(.*?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 nc,Cg=g(()=>{"use strict";a();l();M();x();nc=y({name:"SettingsStoreAPI",description:"Patches Discord's SettingsStores to expose their group and name",authors:[d.Nuckyz],patches:[{find:'"textAndImages","renderSpoilers"',replacement:[{match:/(?<=INFREQUENT_USER_ACTION.{0,20}),useSetting:function/,replace:",settingsStoreApiGroup:arguments[0],settingsStoreApiName:arguments[1]$&"}]}]})});var oc,Ng=g(()=>{"use strict";a();l();M();x();oc=y({name:"NoTrack",description:"Disable Discord's tracking ('science'), metrics and Sentry crash reporting",authors:[d.Cyn,d.Ven,d.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 ic={};ye(ic,{_patchContextMenu:()=>Ux,addContextMenuPatch:()=>me,addGlobalContextMenuPatch:()=>Fx,findGroupChildrenByChildId:()=>rt,globalPatches:()=>Cs,navPatches:()=>Qr,removeContextMenuPatch:()=>fe,removeGlobalContextMenuPatch:()=>$x});function me(e,t){Array.isArray(e)||(e=[e]);for(let n of e){let r=Qr.get(n);r||(r=new Set,Qr.set(n,r)),r.add(t)}}function Fx(e){Cs.add(e)}function fe(e,t){let r=(Array.isArray(e)?e:[e]).map(i=>Qr.get(i)?.delete(t)??!1);return Array.isArray(e)?r:r[0]}function $x(e){return Cs.delete(e)}function rt(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=rt(e,i,i);if(s!==null)return s}}return null}function Ux(e){e.contextMenuApiArguments??=[];let t=Qr.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);rc.has(e)||r?.()}catch(r){kg.error(`Patch for ${e.navId} errored,`,r)}for(let n of Cs)try{let r=n(e.navId,e.children,...e.contextMenuApiArguments);rc.has(e)||r?.()}catch(r){kg.error("Global patch errored,",r)}rc.add(e)}var kg,Qr,Cs,rc,It=g(()=>{"use strict";a();l();xe();kg=new X("ContextMenu"),Qr=new Map,Cs=new Set;rc=new WeakSet});var Rg=g(()=>{});var Ns,sc=g(()=>{"use strict";a();l();Rg();_();ae();he();w();Ns=E.wrap(function({title:t,body:n,richBody:r,color:i,icon:s,onClick:c,onClose:u,image:p,permanent:v,className:h,dismissOnClick:S}){let{timeout:T,position:P}=lt(["notifications.timeout","notifications.position"]).notifications,L=Ue([Hr],()=>Hr.isFocused()),[k,F]=te(!1),[G,$]=te(0),Y=Wt(()=>Date.now(),[T,k,L]);st(()=>{if(k||!L||T===0||v)return void $(0);let q=setInterval(()=>{let W=Date.now()-Y;W>=T?u():$(W)},10);return()=>clearInterval(q)},[T,k,L]);let ne=G/T;return o("button",{className:V("vc-notification-root",h),style:P==="bottom-right"?{bottom:"1rem"}:{top:"3rem"},onClick:()=>{c?.(),S!==!1&&u()},onContextMenu:q=>{q.preventDefault(),q.stopPropagation(),u()},onMouseEnter:()=>F(!0),onMouseLeave:()=>F(!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:q=>{q.preventDefault(),q.stopPropagation(),u()}},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)))),p&&o("img",{className:"vc-notification-img",src:p,alt:""}),T!==0&&!v&&o("div",{className:"vc-notification-progressbar",style:{width:`${(1-ne)*100}%`,backgroundColor:i||"var(--brand-experiment)"}}))},{onError:({props:e})=>e.onClose()})});var cc={};ye(cc,{classNameFactory:()=>Oe,classNameToSelector:()=>Lg,compileStyle:()=>lc,disableStyle:()=>Ct,enableStyle:()=>Ve,isStyleEnabled:()=>ac,requireStyle:()=>Vr,setStyleClassNames:()=>Hx,styleMap:()=>Ag,toggleStyle:()=>Gx});function Vr(e){let t=Ag.get(e);if(!t)throw new Error(`Style "${e}" does not exist`);return t}function Ve(e){let t=Vr(e);return t.dom?.isConnected?!1:(t.dom||(t.dom=document.createElement("style"),t.dom.dataset.vencordName=t.name),lc(t),document.head.appendChild(t.dom),!0)}function Ct(e){let t=Vr(e);return t.dom?.isConnected?(t.dom.remove(),t.dom=null,!0):!1}var Ag,Gx,ac,Hx,lc,Lg,Oe,ze=g(()=>{"use strict";a();l();Ag=unsafeWindow.VencordStyles??=new Map;Gx=e=>ac(e)?Ct(e):Ve(e),ac=e=>Vr(e).dom?.isConnected??!1,Hx=(e,t,n=!0)=>{let r=Vr(e);r.classNames=t,n&&ac(r.name)&&lc(r)},lc=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?Lg(r):t})},Lg=(e,t="")=>e.split(" ").map(n=>`.${t}${n}`).join(""),Oe=(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 Eg,Dg=g(()=>{a();l();Eg=(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 _g(e){if(e.noPersist)return;let t=C.notifications.logLimit;t!==0&&(await Oo(ks,n=>{let r=n??[],{onClick:i,onClose:s,richBody:c,permanent:u,noPersist:p,dismissOnClick:v,...h}=e;return r.unshift({...h,timestamp:Date.now(),id:Eg()}),r.length>t&&t!==200&&(r.length=t),r}),ei.forEach(n=>n()))}async function zx(e){let t=await Og(),n=t.findIndex(r=>r.timestamp===e);n!==-1&&(t.splice(n,1),await tt(ks,t),ei.forEach(r=>r()))}function jx(){let[e,t]=sr(s=>s+1,0);st(()=>(ei.add(t),()=>void ei.delete(t)),[]);let[n,r,i]=it(Og,{fallbackValue:[],deps:[e]});return[n,i]}function Wx({data:e}){let[t,n]=te(!1),r=N.useRef(null);return st(()=>{let i=r.current,s=()=>{if(i.clientHeight===0)return requestAnimationFrame(s);i.style.height=`${i.clientHeight}px`};s()},[]),o("div",{className:ur("wrapper",{removing:t}),ref:r},o(Ns,{...e,permanent:!0,dismissOnClick:!1,onClose:()=>{t||(n(!0),setTimeout(()=>zx(e.timestamp),200))},richBody:o("div",{className:ur("body")},e.body,o(An,{timestamp:Vt(e.timestamp),className:ur("timestamp")}))}))}function qx({log:e,pending:t}){return!e.length&&!t?o("div",{className:ur("container")},o("div",{className:ur("empty")}),o(b.FormText,{style:{textAlign:"center"}},"No notifications yet")):o("div",{className:ur("container")},e.map(n=>o(Wx,{data:n,key:n.id})))}function Kx({modalProps:e,close:t}){let[n,r]=jx();return o(De,{...e,size:"large"},o(Ge,null,o(ee,{variant:"heading-lg/semibold",style:{flexGrow:1}},"Notification Log"),o(Pt,{onClick:t})),o(He,null,o(qx,{log:n,pending:r})),o(wt,null,o(R,{disabled:n.length===0,onClick:()=>{xt.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 tt(ks,[]),ei.forEach(i=>i())},confirmText:"Do it!",confirmColor:"vc-notification-log-danger-btn",cancelText:"Nevermind"})}},"Clear Notification Log")))}function Rs(){let e=ke(t=>o(Kx,{modalProps:t,close:()=>zn(e)}))}var ks,Og,ur,ei,As=g(()=>{"use strict";a();l();kn();_();ze();Je();be();w();Dg();sc();ks="notification-log",Og=async()=>await et(ks)??[],ur=Oe("vc-notification-log-"),ei=new Set});function Xx(){if(!uc){let e=document.createElement("div");e.id="vc-notification-container",document.body.append(e),uc=Fo.createRoot(e)}return uc}function Jx(e,t){let n=Xx();return new Promise(r=>{n.render(o(Ns,{key:t,...e,onClose:()=>{e.onClose?.(),n.render(null),r()}}))})}function Qx(){if(typeof Notification>"u")return!1;let{useNative:e}=C.notifications;return e==="always"?!0:e==="not-focused"?!document.hasFocus():!1}async function Bg(){return Notification.permission==="granted"||Notification.permission!=="denied"&&await Notification.requestPermission()==="granted"}async function ve(e){if(_g(e),Qx()&&await Bg()){let{title:t,body:n,icon:r,image:i,onClick:s=null,onClose:c=null}=e,u=new Notification(t,{body:n,icon:r,image:i});u.onclick=s,u.onclose=c}else Yx.push(()=>Jx(e,Zx++))}var Yx,uc,Zx,Fg=g(()=>{"use strict";a();l();_();cr();w();sc();As();Yx=new hn,Zx=42});var pc={};ye(pc,{requestPermission:()=>Bg,showNotification:()=>ve});var mo=g(()=>{"use strict";a();l();Fg()});function Kg(e,t){return lw(e,t||{},0,0)}function Yg(e,t){return iw(e,t)}var Nt,Bt,Ls,Es,Ds,gc,Hg,zg,jg,hc,Wg,Vx,$g,yc,Zn,ge,Dn,go,ge,ge,ge,ge,oi,ge,ew,tw,nw,ow,dc,yn,mc,bc,qg,rw,fo,iw,Xn,ti,fc,vc,Ug,ni,Sc,Gg,sw,Tc,aw,lw,cw,uw,Zg=g(()=>{a();l();Nt=Uint8Array,Bt=Uint16Array,Ls=Uint32Array,Es=new Nt([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]),Ds=new Nt([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]),gc=new Nt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Hg=function(e,t){for(var n=new Bt(31),r=0;r<31;++r)n[r]=t+=1<>>1|(ge&21845)<<1,Zn=(Zn&52428)>>>2|(Zn&13107)<<2,Zn=(Zn&61680)>>>4|(Zn&3855)<<4,yc[ge]=((Zn&65280)>>>8|(Zn&255)<<8)>>>1;Dn=function(e,t,n){for(var r=e.length,i=0,s=new Bt(t);i>>p]=v}else for(u=new Bt(r),i=0;i>>15-e[i]);return u},go=new Nt(288);for(ge=0;ge<144;++ge)go[ge]=8;for(ge=144;ge<256;++ge)go[ge]=9;for(ge=256;ge<280;++ge)go[ge]=7;for(ge=280;ge<288;++ge)go[ge]=8;oi=new Nt(32);for(ge=0;ge<32;++ge)oi[ge]=5;ew=Dn(go,9,0),tw=Dn(go,9,1),nw=Dn(oi,5,0),ow=Dn(oi,5,1),dc=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},yn=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&n},mc=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},bc=function(e){return(e+7)/8|0},qg=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?Bt:e.BYTES_PER_ELEMENT==4?Ls:Nt)(n-t);return r.set(e.subarray(t,n)),r},rw=["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"],fo=function(e,t,n){var r=new Error(t||rw[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,fo),!n)throw r;return r},iw=function(e,t,n){var r=e.length;if(!r||n&&n.f&&!n.l)return t||new Nt(0);var i=!t||n,s=!n||n.i;n||(n={}),t||(t=new Nt(r*3));var c=function(Zi){var Er=t.length;if(Zi>Er){var or=new Nt(Math.max(Er*2,Zi));or.set(t),t=or}},u=n.f||0,p=n.p||0,v=n.b||0,h=n.l,S=n.d,T=n.m,P=n.n,L=r*8;do{if(!h){u=yn(e,p,1);var k=yn(e,p+1,3);if(p+=3,k)if(k==1)h=tw,S=ow,T=9,P=5;else if(k==2){var Y=yn(e,p,31)+257,ne=yn(e,p+10,15)+4,q=Y+yn(e,p+5,31)+1;p+=14;for(var W=new Nt(q),oe=new Nt(19),H=0;H>>4;if(F<16)W[H++]=F;else{var dt=0,Ke=0;for(F==16?(Ke=3+yn(e,p,3),p+=2,dt=W[H-1]):F==17?(Ke=3+yn(e,p,7),p+=3):F==18&&(Ke=11+yn(e,p,127),p+=7);Ke--;)W[H++]=dt}}var St=W.subarray(0,Y),je=W.subarray(Y);T=dc(St),P=dc(je),h=Dn(St,T,1),S=Dn(je,P,1)}else fo(1);else{var F=bc(p)+4,G=e[F-4]|e[F-3]<<8,$=F+G;if($>r){s&&fo(0);break}i&&c(v+G),t.set(e.subarray(F,$),v),n.b=v+=G,n.p=p=$*8,n.f=u;continue}if(p>L){s&&fo(0);break}}i&&c(v+131072);for(var Ye=(1<>>4;if(p+=dt&15,p>L){s&&fo(0);break}if(dt||fo(2),In<256)t[v++]=In;else if(In==256){Kt=p,h=null;break}else{var Ht=In-254;if(In>264){var H=In-257,rn=Es[H];Ht=yn(e,p,(1<>>4;Cn||fo(3),p+=Cn&15;var je=Vx[Lt];if(Lt>3){var rn=Ds[Lt];je+=mc(e,p)&(1<L){s&&fo(0);break}i&&c(v+131072);for(var mt=v+Ht;v>>8},ti=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},fc=function(e,t){for(var n=[],r=0;rT&&(T=s[r].s);var P=new Bt(T+1),L=vc(n[h-1],P,0);if(L>t){var r=0,k=0,F=L-t,G=1<t)k+=G-(1<>>=F;k>0;){var Y=s[r].s;P[Y]=0&&k;--r){var ne=s[r].s;P[ne]==t&&(--P[ne],++k)}L=t}return[new Nt(P),L]},vc=function(e,t,n){return e.s==-1?Math.max(vc(e.l,t,n+1),vc(e.r,t,n+1)):t[e.s]=n},Ug=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Bt(++t),r=0,i=e[0],s=1,c=function(p){n[r++]=p},u=1;u<=t;++u)if(e[u]==i&&u!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)c(32754);s>2&&(c(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(c(i),--s;s>6;s-=6)c(8304);s>2&&(c(s-3<<5|8208),s=0)}for(;s--;)c(i);s=1,i=e[u]}return[n.subarray(0,r),t]},ni=function(e,t){for(var n=0,r=0;r>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var s=0;s4&&!re[gc[_e-1]];--_e);var dt=v+5<<3,Ke=ni(i,go)+ni(s,oi)+c,St=ni(i,T)+ni(s,k)+c+14+3*_e+ni(oe,re)+(2*oe[16]+3*oe[17]+7*oe[18]);if(dt<=Ke&&dt<=St)return Sc(t,h,e.subarray(p,p+v));var je,Ye,Gt,Kt;if(Xn(t,h,1+(St15&&(Xn(t,h,Cn[H]>>>5&127),h+=Cn[H]>>>12)}}else je=ew,Ye=go,Gt=nw,Kt=oi;for(var H=0;H255){var Lt=r[H]>>>18&31;ti(t,h,je[Lt+257]),h+=Ye[Lt+257],Lt>7&&(Xn(t,h,r[H]>>>23&31),h+=Es[Lt]);var mt=r[H]&31;ti(t,h,Gt[mt]),h+=Kt[mt],mt>3&&(ti(t,h,r[H]>>>5&8191),h+=Ds[mt])}else ti(t,h,je[r[H]]),h+=Ye[r[H]];return ti(t,h,je[256]),h+Ye[256]},sw=new Ls([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Tc=new Nt(0),aw=function(e,t,n,r,i,s){var c=e.length,u=new Nt(r+c+5*(1+Math.ceil(c/7e3))+i),p=u.subarray(r,u.length-i),v=0;if(!t||c<8)for(var h=0;h<=c;h+=65535){var S=h+65535;S>=c&&(p[v>>3]=s),v=Sc(p,v+1,e.subarray(h,S))}else{for(var T=sw[t-1],P=T>>>13,L=T&8191,k=(1<7e3||re>24576)&&je>423){v=Gg(e,p,0,q,W,oe,Re,re,_e,h-_e,v),re=H=Re=0,_e=h;for(var Ye=0;Ye<286;++Ye)W[Ye]=0;for(var Ye=0;Ye<30;++Ye)oe[Ye]=0}var Gt=2,Kt=0,In=L,Ht=Ke-St&32767;if(je>2&&dt==ne(h-Ht))for(var rn=Math.min(P,je)-1,Cn=Math.min(32767,h),Lt=Math.min(258,je);Ht<=Cn&&--In&&Ke!=St;){if(e[h+Gt]==e[h+Gt-Ht]){for(var mt=0;mtGt){if(Gt=mt,Kt=Ht,mt>rn)break;for(var Zi=Math.min(Ht,mt-2),Er=0,Ye=0;YeEr&&(Er=Of,St=or)}}}Ke=St,St=F[Ke],Ht+=Ke-St+32768&32767}if(Kt){q[re++]=268435456|hc[Gt]<<18|$g[Kt];var _f=hc[Gt]&31,Bf=$g[Kt]&31;Re+=Es[_f]+Ds[Bf],++W[257+_f],++oe[Bf],$e=h+Gt,++H}else q[re++]=e[h],++W[e[h]]}}v=Gg(e,p,s,q,W,oe,Re,re,_e,h-_e,v),!s&&v&7&&(v=Sc(p,v+1,Tc))}return qg(u,0,r+bc(v)+i)},lw=function(e,t,n,r,i){return aw(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)};cw=typeof TextDecoder<"u"&&new TextDecoder,uw=0;try{cw.decode(Tc,{stream:!0}),uw=1}catch{}});async function Xg(){let e=await et("Vencord_cloudSecret")??{},t=xc();return e[t]?(await Oo("Vencord_cloudSecret",n=>(n??={},n[`${t}:${ri()}`]=n[t],delete n[t],n)),e[t]):e[`${t}:${ri()}`]}async function pw(e){await Oo("Vencord_cloudSecret",t=>(t??={},t[`${xc()}:${ri()}`]=e,t))}async function wc(){await Oo("Vencord_cloudSecret",e=>(e??={},delete e[`${xc()}:${ri()}`],e))}async function Jg(){if(await Xg()!==void 0){C.cloud.authenticated=!0;return}try{let r=await f(new URL("/v1/oauth/settings",ho()));var{clientId:e,redirectUri:t}=await r.json()}catch{ve({title:"Cloud Integration",body:"Setup failed (couldn't retrieve OAuth configuration)."}),C.cloud.authenticated=!1;return}let{OAuth2AuthorizeModal:n}=Rn("OAuth2AuthorizeModal");ke(r=>o(n,{...r,scopes:["identify"],responseType:"code",redirectUri:t,permissions:0n,clientId:e,cancelCompletesFlow:!1,callback:async({location:i})=>{if(!i){C.cloud.authenticated=!1;return}try{let s=await f(i,{headers:new Headers({Accept:"application/json"})}),{secret:c}=await s.json();c?(Os.info("Authorized with secret"),await pw(c),ve({title:"Cloud Integration",body:"Cloud integrations enabled!"}),C.cloud.authenticated=!0):(ve({title:"Cloud Integration",body:"Setup failed (no secret returned?)."}),C.cloud.authenticated=!1)}catch(s){Os.error("Failed to authorize",s),ve({title:"Cloud Integration",body:`Setup failed (${s.toString()}).`}),C.cloud.authenticated=!1}}}))}async function pr(){let e=await Xg();return unsafeWindow.btoa(`${e}:${ri()}`)}var Os,ho,xc,ri,Pc=g(()=>{"use strict";a();l();kn();mo();_();B();w();xe();Je();Os=new X("Cloud","#39b7e0"),ho=()=>new URL(C.cloud.url),xc=()=>ho().origin,ri=()=>{let e=U.getCurrentUser()?.id;if(!e)throw new Error("User not yet logged in");return e}});function _s(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 Mc=g(()=>{"use strict";a();l()});async function Qg(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(On,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 Vg({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 eh(){let e="vencord-settings-backup.json",t=await Vg(),n=new TextEncoder().encode(t);_s(new File([n],e,{type:"application/json"}))}async function nh(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 Qg(r.result),e&&dw()}catch(i){new X("SettingsSync").error(i),e&&mw(i)}},r.readAsText(n)},document.body.appendChild(t),t.click(),setImmediate(()=>document.body.removeChild(t))}}async function dr(e){let t=await Vg({minify:!0});try{let n=await f(new URL("/v1/settings",ho()),{method:"PUT",headers:new Headers({Authorization:await pr(),"Content-Type":"application/octet-stream"}),body:Kg(new TextEncoder().encode(t))});if(!n.ok){vn.error(`Failed to sync up, API returned ${n.status}`),ve({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();On.cloud.settingsSyncVersion=r,VencordNative.settings.set(JSON.stringify(On,null,4)),vn.info("Settings uploaded to cloud successfully"),e&&ve({title:"Cloud Settings",body:"Synchronized settings to the cloud!",noPersist:!0})}catch(n){vn.error("Failed to sync up",n),ve({title:"Cloud Settings",body:`Could not synchronize settings to the cloud (${n.toString()}).`,color:"var(--red-360)"})}}async function Bs(e=!0,t=!1){try{let n=await f(new URL("/v1/settings",ho()),{method:"GET",headers:new Headers({Authorization:await pr(),Accept:"application/octet-stream","If-None-Match":C.cloud.settingsSyncVersion.toString()})});if(n.status===404)return vn.info("No settings on the cloud"),e&&ve({title:"Cloud Settings",body:"There are no settings in the cloud.",noPersist:!0}),!1;if(n.status===304)return vn.info("Settings up to date"),e&&ve({title:"Cloud Settings",body:"Your settings are up to date.",noPersist:!0}),!1;if(!n.ok)return vn.error(`Failed to sync down, API returned ${n.status}`),ve({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=C.cloud.settingsSyncVersion;if(!t&&runsafeWindow.DiscordNative.app.relaunch(),noPersist:!0}),!0}catch(n){return vn.error("Failed to sync down",n),ve({title:"Cloud Settings",body:`Could not synchronize settings from the cloud (${n.toString()}).`,color:"var(--red-360)"}),!1}}async function oh(){try{let e=await f(new URL("/v1/settings",ho()),{method:"DELETE",headers:new Headers({Authorization:await pr()})});if(!e.ok){vn.error(`Failed to delete, API returned ${e.status}`),ve({title:"Cloud Settings",body:`Could not delete settings (API returned ${e.status}).`,color:"var(--red-360)"});return}vn.info("Settings deleted from cloud successfully"),ve({title:"Cloud Settings",body:"Settings deleted from cloud!",color:"var(--green-360)"})}catch(e){vn.error("Failed to delete",e),ve({title:"Cloud Settings",body:`Could not delete settings (${e.toString()}).`,color:"var(--red-360)"})}}var th,dw,mw,vn,ii=g(()=>{"use strict";a();l();mo();_();w();Zg();Pc();xe();Mc();th=(e,t)=>Q.show({type:e,message:t,id:Q.genId()}),dw=()=>th(Q.Type.SUCCESS,"Settings successfully imported. Restart to apply changes!"),mw=e=>th(Q.Type.FAILURE,`Failed to import settings: ${String(e)}`);vn=new X("Cloud:Settings","#39b7e0")});var Cc={};ye(Cc,{PlainSettings:()=>On,Settings:()=>C,addSettingsListener:()=>$s,definePluginSettings:()=>A,migratePluginSettings:()=>gw,useSettings:()=>lt});function Ic(e,t=e,n=""){return ih[n]??=new Proxy(e,{get(r,i){let s=r[i];if(!(i in r)){if(n==="plugins"&&i in we)return r[i]=Ic({enabled:we[i].required??we[i].enabledByDefault??!1},t,`plugins.${i}`);if(n.startsWith("plugins.")){let c=n.slice(8);if(c in we){let u=we[c].options?.[i];if(!u)return s;if("default"in u)return r[i]=u.default;if(u.type===4){let p=u.options.find(v=>v.default);return p&&(r[i]=p.value),p?.value}}}return s}return typeof s=="object"&&!Array.isArray(s)&&s!==null?Ic(s,t,`${n}${n&&"."}${i}`):s},set(r,i,s){if(r[i]===s)return!0;r[i]=s;let c=`${n}${n&&"."}${i}`;delete ih[c];for(let u of Fs)(!u._path||u._path===c)&&u(s,c);return On.cloud.settingsSyncVersion=Date.now(),Go.Vencord_settingsDirty=!0,fw(),VencordNative.settings.set(JSON.stringify(t,null,4)),!0}})}function lt(e){let[,t]=N.useReducer(()=>({}),{}),n=e?(r,i)=>e.includes(i)&&t():t;return N.useEffect(()=>(Fs.add(n),()=>void Fs.delete(n)),[]),C}function $s(e,t){t._path=e,Fs.add(t)}function gw(e,...t){let{plugins:n}=yo;if(!(e in n)){for(let r of t)if(r in n){sh.info(`Migrating settings from old name ${r} to ${e}`),n[e]=n[r],delete n[r],VencordNative.settings.set(JSON.stringify(yo,null,4));break}}}function A(e,t){let n={get store(){if(!n.pluginName)throw new Error("Cannot access settings before plugin is initialized");return C.plugins[n.pluginName]},use:r=>lt(r?.map(i=>`plugins.${n.pluginName}.${i}`)).plugins[n.pluginName],def:e,checks:t??{},pluginName:"",withPrivateSettings(){return this}};return n}var sh,rh,yo,fw,Fs,ih,On,C,_=g(()=>{"use strict";a();l();rr();xs();xe();he();ii();x();w();mr();sh=new X("Settings"),rh={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{yo=JSON.parse(VencordNative.settings.get()),_o(yo,rh)}catch(e){yo=_o({},rh),sh.error(`An error occurred while loading the settings. Corrupt settings file? -`,e)}fw=Et(async()=>{C.cloud.settingsSync&&C.cloud.authenticated&&(await dr(),delete Go.Vencord_settingsDirty)},6e4),Fs=new Set,ih={};On=yo,C=Ic(yo)});function Us(){unsafeWindow.VencordDesktopNative.app.relaunch()}var si=g(()=>{"use strict";a();l()});var ah=g(()=>{});var kc={};ye(kc,{UpdateLogger:()=>lh,changes:()=>Gs,checkForUpdates:()=>uh,getRepo:()=>hw,isNewer:()=>Nc,isOutdated:()=>vo,maybePromptToUpdate:()=>ai,update:()=>ph,updateError:()=>ch});async function Hs(e){let t=await e;if(t.ok)return t.value;throw ch=t.error,t.error}async function uh(){return Gs=await Hs(VencordNative.updater.getUpdates()),Gs.some(e=>e.hash===an)?(Nc=!0,vo=!1):vo=Gs.length>0}async function ph(){if(!vo)return!0;let e=await Hs(VencordNative.updater.update());if(e&&(vo=!1,!await Hs(VencordNative.updater.rebuild())))throw new Error("The Build failed. Please try manually building the new update");return e}async function ai(e,t=!1){return;try{if(await uh()){let r=confirm(e);if(r&&Nc)return alert("Your local copy has more recent commits. Please stash or reset them.");r&&(await ph(),Us())}}catch(n){lh.error(n),alert("That also failed :( Try updating or re-installing with the installer!")}}var lh,vo,Nc,ch,Gs,hw,fr=g(()=>{"use strict";a();l();_r();xe();si();lh=new X("Updater","white"),vo=!1,Nc=!1;hw=()=>Hs(VencordNative.updater.getRepo())});function dh(){ai("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 mh=g(()=>{"use strict";a();l();fr()});function _n({title:e,children:t}){return o(b.FormSection,null,o(ee,{variant:"heading-lg/semibold",tag:"h2",className:z.bottom16},e),t)}function Bn(e,t){return E.wrap(e,{message:`Failed to render the ${t} tab. If this issue persists, try using the installer to reinstall!`,onError:yw})}var yw,zo=g(()=>{"use strict";a();l();ah();ae();mh();Qe();_l();w();yw=Ol(dh)});var hh={};ye(hh,{default:()=>xw});function Sw(){let[e,,t]=it(VencordNative.settings.getSettingsDir,{fallbackValue:"Loading..."}),n=lt(),r=N.useMemo(()=>Math.random()>.5?gh:vw,[]),i=navigator.platform.toLowerCase().startsWith("win"),s=navigator.platform.toLowerCase().startsWith("mac"),c=[{key:"useQuickCss",title:"Enable Custom CSS",note:"Loads your Custom CSS"},!1,!1,!1,!1,!1,!1];return o(_n,{title:"Vencord Settings"},o(Tw,{image:r}),o(b.FormSection,{title:"Quick Actions"},o(Ot,{className:fh("quick-actions-card")},o(N.Fragment,null,!1,o(R,{onClick:()=>VencordNative.quickCss.openEditor(),size:R.Sizes.SMALL,disabled:e==="Loading..."},"Open QuickCSS File"),!1,o(R,{onClick:()=>VencordNative.native.openExternal("https://github.com/Vendicated/Vencord"),size:R.Sizes.SMALL,disabled:t},"Open in GitHub")))),o(b.FormDivider,null),o(b.FormSection,{className:z.top16,title:"Settings",tag:"h5"},o(b.FormText,{className:z.bottom20},'Hint: You can change the position of this settings section in the settings of the "Settings" plugin!'),c.map(u=>u&&o(ht,{key:u.key,value:n[u.key],onChange:p=>n[u.key]=p,note:u.note},u.title))),typeof Notification<"u"&&o(bw,{settings:n.notifications}))}function bw({settings:e}){return o(m,null,o(b.FormTitle,{tag:"h5"},"Notification Style"),e.useNative!=="never"&&Notification?.permission==="denied"&&o(Yn,{style:{padding:"1em"},className:z.bottom8},o(b.FormTitle,{tag:"h5"},"Desktop Notification Permission denied"),o(b.FormText,null,"You have denied Notification Permissions. Thus, Desktop notifications will not work!")),o(b.FormText,{className:z.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(un,{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:as}),o(b.FormTitle,{tag:"h5",className:z.top16+" "+z.bottom8},"Notification Position"),o(un,{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:as}),o(b.FormTitle,{tag:"h5",className:z.top16+" "+z.bottom8},"Notification Timeout"),o(b.FormText,{className:z.bottom16},"Set to 0s to never automatically time out"),o(Bo,{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(b.FormTitle,{tag:"h5",className:z.top16+" "+z.bottom8},"Notification Log Limit"),o(b.FormText,{className:z.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(Bo,{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(R,{onClick:Rs,disabled:e.logLimit===0},"Open Notification Log"))}function Tw({image:e}){return o(Ot,{className:fh("card","donate")},o("div",null,o(b.FormTitle,{tag:"h5"},"Support the Project"),o(b.FormText,null,"Please consider supporting the development of Vencord by donating!"),o(Jr,{style:{transform:"translateX(-1em)"}})),o("img",{role:"presentation",src:e,alt:"",height:128,style:{marginLeft:"auto",transform:e===gh?"rotate(10deg)":""}}))}var fh,gh,vw,xw,yh=g(()=>{"use strict";a();l();As();_();ze();jl();Xr();Qe();he();si();be();w();zo();fh=Oe("vc-settings-"),gh="https://cdn.discordapp.com/emojis/1026533090627174460.png",vw="https://media.discordapp.net/stickers/1039992459209490513.png";xw=Bn(Sw,"Vencord Settings")});var vh=g(()=>{});var Ec={};ye(Ec,{currentNotice:()=>li,nextNotice:()=>Sh,noticesQueue:()=>Ac,popNotice:()=>Lc,showNotice:()=>ci});function Lc(){Rc.dismiss()}function Sh(){li=Ac.shift(),li&&Rc.show(...li,"VencordNotice")}function ci(e,t,n){Ac.push(["GENERIC",e,t,n]),li||Sh()}var Rc,Ac,li,zs=g(()=>{"use strict";a();l();B();Xe(e=>e.show&&e.dismiss&&!e.suppressAll,e=>Rc=e);Ac=[],li=null});function bh({text:e,color:t}){return o("div",{className:"vc-plugins-badge",style:{backgroundColor:t,justifySelf:"flex-end",marginLeft:"auto"}},e)}var Th=g(()=>{"use strict";a();l()});function xh({option:e,pluginSettings:t,definedSettings:n,id:r,onChange:i,onError:s}){let c=t[r]??e.default,[u,p]=N.useState(c??!1),[v,h]=N.useState(null);N.useEffect(()=>{s(v!==null)},[v]);function S(T){let P=e.isValid?.call(n,T)??!0;typeof P=="string"?h(P):P?(h(null),p(T),i(T)):h("Invalid input provided.")}return o(b.FormSection,null,o(ht,{value:u,onChange:S,note:e.description,disabled:e.disabled?.call(n)??!1,...e.componentProps,hideBorder:!0,style:{marginBottom:"0.5em"}},qn(Fl(r))),v&&o(b.FormText,{style:{color:"var(--text-danger)"}},v))}var wh=g(()=>{"use strict";a();l();Kn();w()});function Ph({option:e,onChange:t,onError:n}){return e.component({setValue:t,setError:n,option:e})}var Mh=g(()=>{"use strict";a();l()});function Dc({option:e,pluginSettings:t,definedSettings:n,id:r,onChange:i,onError:s}){function c(T){return e.type===2?BigInt(T):Number(T)}let[u,p]=N.useState(`${t[r]??e.default??0}`),[v,h]=N.useState(null);N.useEffect(()=>{s(v!==null)},[v]);function S(T){let P=e.isValid?.call(n,T)??!0;h(null),typeof P=="string"?h(P):P||h("Invalid input provided."),e.type===1&&BigInt(T)>=ww?(p(`${Number.MAX_SAFE_INTEGER}`),i(c(T))):(p(T),i(c(T)))}return o(b.FormSection,null,o(b.FormTitle,null,e.description),o(Le,{type:"number",pattern:"-?[0-9]+",value:u,onChange:S,placeholder:e.placeholder??"Enter a number",disabled:e.disabled?.call(n)??!1,...e.componentProps}),v&&o(b.FormText,{style:{color:"var(--text-danger)"}},v))}var ww,Ih=g(()=>{"use strict";a();l();x();w();ww=BigInt(Number.MAX_SAFE_INTEGER)});function Ch({option:e,pluginSettings:t,definedSettings:n,onChange:r,onError:i,id:s}){let c=t[s]??e.options?.find(T=>T.default)?.value,[u,p]=N.useState(c??null),[v,h]=N.useState(null);N.useEffect(()=>{i(v!==null)},[v]);function S(T){let P=e.isValid?.call(n,T)??!0;typeof P=="string"?h(P):P?(h(null),p(T),r(T)):h("Invalid input provided.")}return o(b.FormSection,null,o(b.FormTitle,null,e.description),o(un,{isDisabled:e.disabled?.call(n)??!1,options:e.options,placeholder:e.placeholder??"Select an option",maxVisibleItems:5,closeOnSelect:!0,select:S,isSelected:T=>T===u,serialize:T=>String(T),...e.componentProps}),v&&o(b.FormText,{style:{color:"var(--text-danger)"}},v))}var Nh=g(()=>{"use strict";a();l();w()});function gr(e,t,n=1){let r=[];for(let i=e;i<=t;i+=n)r.push(Math.round(i*100)/100);return r}function kh({option:e,pluginSettings:t,definedSettings:n,id:r,onChange:i,onError:s}){let c=t[r]??e.default,[u,p]=N.useState(null);N.useEffect(()=>{s(u!==null)},[u]);function v(h){let S=e.isValid?.call(n,h)??!0;typeof S=="string"?p(S):S?(p(null),i(h)):p("Invalid input provided.")}return o(b.FormSection,null,o(b.FormTitle,null,e.description),o(Bo,{disabled:e.disabled?.call(n)??!1,markers:e.markers,minValue:e.markers[0],maxValue:e.markers[e.markers.length-1],initialValue:c,onValueChange:v,onValueRender:h=>String(h.toFixed(2)),stickToMarkers:e.stickToMarkers??!0,...e.componentProps}))}var Oc=g(()=>{"use strict";a();l();w()});function Rh({option:e,pluginSettings:t,definedSettings:n,id:r,onChange:i,onError:s}){let[c,u]=N.useState(t[r]??e.default??null),[p,v]=N.useState(null);N.useEffect(()=>{s(p!==null)},[p]);function h(S){let T=e.isValid?.call(n,S)??!0;typeof T=="string"?v(T):T?(v(null),u(S),i(S)):v("Invalid input provided.")}return o(b.FormSection,null,o(b.FormTitle,null,e.description),o(Le,{type:"text",value:c,onChange:h,placeholder:e.placeholder??"Enter a value",disabled:e.disabled?.call(n)??!1,...e.componentProps}),p&&o(b.FormText,{style:{color:"var(--text-danger)"}},p))}var Ah=g(()=>{"use strict";a();l();w()});var js=g(()=>{"use strict";a();l();Th();wh();Mh();Ih();Nh();Oc();Ah()});function _c(){return`-${ar.fromTimestamp(Date.now())}`}function ie(e,t){let n=Pw({channelId:e,content:"",embeds:[]});return Mw.receiveMessage(e,_o(t,n)),t}function Be(e,t,n){return e.find(r=>r.name===t)?.value||n}var Pw,Mw,Bc=g(()=>{"use strict";a();l();he();B();w();Pw=pe('username:"Clyde"'),Mw=I("receiveMessage")});var So,Sn,Fc,Ws=g(()=>{"use strict";a();l();So=(S=>(S[S.SUB_COMMAND=1]="SUB_COMMAND",S[S.SUB_COMMAND_GROUP=2]="SUB_COMMAND_GROUP",S[S.STRING=3]="STRING",S[S.INTEGER=4]="INTEGER",S[S.BOOLEAN=5]="BOOLEAN",S[S.USER=6]="USER",S[S.CHANNEL=7]="CHANNEL",S[S.ROLE=8]="ROLE",S[S.MENTIONABLE=9]="MENTIONABLE",S[S.NUMBER=10]="NUMBER",S[S.ATTACHMENT=11]="ATTACHMENT",S))(So||{}),Sn=(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))(Sn||{}),Fc=(r=>(r[r.CHAT_INPUT=1]="CHAT_INPUT",r[r.USER=2]="USER",r[r.MESSAGE=3]="MESSAGE",r))(Fc||{})});var Gc={};ye(Gc,{ApplicationCommandInputType:()=>Sn,ApplicationCommandOptionType:()=>So,ApplicationCommandType:()=>Fc,BUILT_IN:()=>bo,OptionalMessageOption:()=>To,RequiredMessageOption:()=>jo,_handleCommand:()=>Cw,_init:()=>Iw,commands:()=>$c,findOption:()=>Be,generateId:()=>_c,prepareOption:()=>Uc,registerCommand:()=>hr,sendBotMessage:()=>ie,unregisterCommand:()=>ui});function Uc(e){return e.displayName||=e.name,e.displayDescription||=e.description,e.options?.forEach((t,n,r)=>{t===Lh?r[n]=To:t===Eh&&(r[n]=jo),t.choices?.forEach(i=>i.displayName||=i.name),Uc(r[n])}),e}function Nw(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};hr(r,t)})}function hr(e,t){if(!bo){console.warn("[CommandsAPI]",`Not registering ${e.name} as the CommandsAPI hasn't been initialised.`,"Please restart to use commands");return}if(bo.some(n=>n.name===e.name))throw new Error(`Command '${e.name}' already exists.`);if(e.isVencordCommand=!0,e.id??=`-${bo.length+1}`,e.applicationId??="-1",e.type??=1,e.inputType??=1,e.plugin||=t,Uc(e),e.options?.[0]?.type===1){Nw(e,t);return}$c[e.name]=e,bo.push(e)}function ui(e){let t=bo.findIndex(n=>n.name===e);return t===-1?!1:(bo.splice(t,1),delete $c[e],!0)}var bo,$c,Lh,Eh,To,jo,Iw,Cw,Ft=g(()=>{"use strict";a();l();Kn();Bc();Ws();Bc();Ws();$c={},Lh=Symbol("OptionalMessageOption"),Eh=Symbol("RequiredMessageOption"),To=Lh,jo=Eh,Iw=function(e){try{bo=e,To=e.find(t=>t.name==="shrug").options[0],jo=e.find(t=>t.name==="me").options[0]}catch{console.error("Failed to load CommandsApi")}return e},Cw=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}"`,c=i instanceof Error?i.stack||i.message:String(i);console.error(s,i),ie(n.channel.id,{content:`${s}: -${Zr(c)}`,author:{username:"Vencord"}})};try{let i=e.execute(t,n);return i instanceof Promise?i.catch(r):i}catch(i){return r(i)}}});var Hc,Dh=g(()=>{a();l();(unsafeWindow.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});Hc="src/components/PluginSettings/userPopoutHideBotTag.css"});function zc(e){let t=new Aw({username:e.username,id:e.id??_c(),avatar:e.avatar,bot:!0});return O.dispatch({type:"USER_UPDATE",user:t}),t}function jc({plugin:e,onRestartNeeded:t,onClose:n,transitionState:r}){let[i,s]=N.useState([]),c=lt().plugins[e.name],[u,p]=N.useState({}),[v,h]=N.useState({}),[S,T]=N.useState(null),P=()=>Object.values(v).every($=>!$),L=Boolean(c&&e.options);N.useEffect(()=>{Ve(Hc);let $;return(async()=>{for(let Y of e.authors.slice(0,6)){let ne=Y.id?await Ln.fetchUser(`${Y.id}`).then(q=>($=q,zc(q))).catch(()=>zc({username:Y.name})):zc({username:Y.name});s(q=>[...q,ne])}})(),()=>{Ct(Hc),$&&O.dispatch({type:"USER_UPDATE",user:$})}},[]);async function k(){if(!e.options){n();return}if(e.beforeSave){let Y=await Promise.resolve(e.beforeSave(u));if(Y!==!0){T(Y);return}}let $=!1;for(let[Y,ne]of Object.entries(u)){let q=e.options[Y];c[Y]=ne,q?.onChange?.(ne),q?.restartNeeded&&($=!0)}$&&t(),n()}function F(){if(!L||!e.options)return o(b.FormText,null,"There are no settings for this plugin.");{let $=Object.entries(e.options).map(([Y,ne])=>{if(ne.hidden)return null;function q(H){p(Re=>({...Re,[Y]:H}))}function W(H){h(Re=>({...Re,[Y]:H}))}let oe=Lw[ne.type];return o(oe,{id:Y,key:Y,option:ne,onChange:q,onError:W,pluginSettings:c,definedSettings:e.settings})});return o(ue,{flexDirection:"column",style:{gap:12,marginBottom:16}},$)}}function G($,Y){let ne=e.authors.length-Y,q=e.authors.length-ne,W=q+e.authors.length-Y;return o(K,{text:e.authors.slice(q,W).map(oe=>oe.name).join(", ")},({onMouseEnter:oe,onMouseLeave:H})=>o("div",{className:Rw.moreUsers,onMouseEnter:oe,onMouseLeave:H},"+",ne))}return o(De,{transitionState:r,size:"medium",className:"vc-text-selectable"},o(Ge,{separator:!1},o(ee,{variant:"heading-lg/semibold",style:{flexGrow:1}},e.name),o(Pt,{onClick:n})),o(He,null,o(b.FormSection,null,o(b.FormTitle,{tag:"h3"},"About ",e.name),o(b.FormText,null,e.description),o(b.FormTitle,{tag:"h3",style:{marginTop:8,marginBottom:0}},"Authors"),o("div",{style:{width:"fit-content",marginBottom:8}},o(kw,{users:i,count:e.authors.length,guildId:void 0,renderIcon:!1,max:6,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:G}))),!!e.settingsAboutComponent&&o("div",{className:V(z.bottom8,"vc-text-selectable")},o(b.FormSection,null,o(E,{message:"An error occurred while rendering this plugin's custom InfoComponent"},o(e.settingsAboutComponent,{tempSettings:u})))),o(b.FormSection,null,o(b.FormTitle,{tag:"h3"},"Settings"),F())),L&&o(wt,null,o(ue,{flexDirection:"column",style:{width:"100%"}},o(ue,{style:{marginLeft:"auto"}},o(R,{onClick:n,size:R.Sizes.SMALL,color:R.Colors.WHITE,look:R.Looks.LINK},"Cancel"),o(K,{text:"You must fix all errors before saving",shouldShow:!P()},({onMouseEnter:$,onMouseLeave:Y})=>o(R,{size:R.Sizes.SMALL,color:R.Colors.BRAND,onClick:k,onMouseEnter:$,onMouseLeave:Y,disabled:!P()},"Save & Close"))),S&&o(ee,{variant:"text-md/semibold",style:{color:"var(--text-danger)"}},"Error while saving: ",S))))}var kw,Rw,Aw,Lw,Oh=g(()=>{"use strict";a();l();Ft();_();ze();ae();Mt();ln();Qe();he();Je();be();x();B();w();js();Dh();kw=se(()=>We("defaultRenderUser","showDefaultAvatarsForNullUsers")),Rw=I("moreUsers","emptyUser","avatarContainer","clickableAvatar"),Aw=ft(()=>U.getCurrentUser().constructor);Lw={[0]:Rh,[1]:Dc,[2]:Dc,[3]:xh,[4]:Ch,[5]:kh,[6]:Ph}});var _h=g(()=>{});function Bh({checked:e,onChange:t,disabled:n}){return o("div",null,o("div",{className:V(qs.container,"default-colors",e?qs.checked:void 0),style:{backgroundColor:e?Wc:qc,opacity:n?.3:1}},o("svg",{className:qs.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(m,null,o("path",{fill:Wc,d:"M7.89561 14.8538L6.30462 13.2629L14.3099 5.25755L15.9009 6.84854L7.89561 14.8538Z"}),o("path",{fill:Wc,d:"M4.08643 11.0903L5.67742 9.49929L9.4485 13.2704L7.85751 14.8614L4.08643 11.0903Z"})):o(m,null,o("path",{fill:qc,d:"M5.13231 6.72963L6.7233 5.13864L14.855 13.2704L13.264 14.8614L5.13231 6.72963Z"}),o("path",{fill:qc,d:"M13.2704 5.13864L14.8614 6.72963L6.72963 14.8614L5.13864 13.2704L13.2704 5.13864Z"})))),o("input",{disabled:n,type:"checkbox",className:qs.input,tabIndex:0,checked:e,onChange:r=>t(r.currentTarget.checked)})))}var Wc,qc,qs,Fh=g(()=>{"use strict";a();l();_h();he();B();Wc="var(--green-360)",qc="var(--primary-400)",qs=I("slider","input","container")});var Jc={};ye(Jc,{PMLogger:()=>Ew,isPluginEnabled:()=>Yc,patches:()=>$h,plugins:()=>Dw,startAllPlugins:()=>Zc,startDependenciesRecursive:()=>Ks,startPlugin:()=>pi,stopPlugin:()=>Xc});function Yc(e){return(we[e]?.required||we[e]?.isDependency||Kc[e]?.enabled)??!1}function Ks(e){let t=!1,n=[];return e.dependencies?.forEach(r=>{if(!C.plugins[r].enabled){if(Ks(we[r]),C.plugins[r].enabled=!0,we[r].patches){qt.warn(`Enabling dependency ${r} requires restart.`),t=!0;return}pi(we[r])||n.push(r)}}),{restartNeeded:t,failures:n}}var qt,Ew,Dw,$h,Kc,Uh,Zc,pi,Xc,Ys=g(()=>{"use strict";a();l();Ft();_();xe();w();mr();ns();qt=new X("PluginManager","#a6d189"),Ew=qt,Dw=we,$h=[],Kc=C.plugins;Uh=Object.values(we);for(let e of Uh)Kc[e.name]?.enabled&&e.dependencies?.forEach(t=>{let n=we[t];if(n)Kc[t].enabled=!0,n.isDependency=!0;else{let r=new Error(`Plugin ${e.name} has unresolved dependency ${t}`);qt.warn(r)}});for(let e of Uh){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&&Yc(e.name))for(let t of e.patches)t.plugin=e.name,Array.isArray(t.replacement)||(t.replacement=[t.replacement]),$h.push(t)}Zc=cn("startAllPlugins",function(){for(let t in we)Yc(t)&&pi(we[t])});pi=cn("startPlugin",function(t){let{name:n,commands:r,flux:i}=t;if(t.start){if(qt.info("Starting plugin",n),t.started)return qt.warn(`${n} already started`),!1;try{t.start(),t.started=!0}catch(s){return qt.error(`Failed to start ${n} -`,s),!1}}if(r?.length){qt.info("Registering commands of plugin",n);for(let s of r)try{hr(s,n)}catch(c){return qt.error(`Failed to register command ${s.name} -`,c),!1}}if(i)for(let s in i)O.subscribe(s,i[s]);return!0},e=>`startPlugin ${e.name}`),Xc=cn("stopPlugin",function(t){let{name:n,commands:r,flux:i}=t;if(t.stop){if(qt.info("Stopping plugin",n),!t.started)return qt.warn(`${n} already stopped`),!1;try{t.stop(),t.started=!1}catch(s){return qt.error(`Failed to stop ${n} -`,s),!1}}if(r?.length){qt.info("Unregistering commands of plugin",n);for(let s of r)try{ui(s.name)}catch(c){return qt.error(`Failed to unregister command ${s.name} -`,c),!1}}if(i)for(let s in i)O.unsubscribe(s,i[s]);return!0},e=>`stopPlugin ${e.name}`)});function Fw(e){Q.show({message:e,type:Q.Type.FAILURE,id:Q.genId(),options:{position:Q.Position.BOTTOM}})}function $w({required:e}){return o(Ot,{className:bn("info-card",{"restart-card":e})},e?o(m,null,o(b.FormTitle,{tag:"h5"},"Restart required!"),o(b.FormText,{className:bn("dep-text")},"Restart now to apply new plugins and their settings"),o(R,{color:R.Colors.YELLOW,onClick:()=>location.reload()},"Restart")):o(m,null,o(b.FormTitle,{tag:"h5"},"Plugin Management"),o(b.FormText,null,"Press the cog wheel or info icon to get more info on a plugin"),o(b.FormText,null,"Plugins with a cog wheel have settings you can modify!")))}function zh({plugin:e,disabled:t,onRestartNeeded:n,onMouseEnter:r,onMouseLeave:i,isNew:s}){let c=C.plugins[e.name],u=()=>c.enabled??!1;function p(){jr(async()=>h=>o(jc,{...h,plugin:e,onRestartNeeded:()=>n(e.name)}))}function v(){let h=u();if(!h){let{restartNeeded:T,failures:P}=Ks(e);if(P.length){Gh.error(`Failed to start dependencies for ${e.name}: ${P.join(", ")}`),ci("Failed to start dependencies: "+P.join(", "),"Close",()=>null);return}else if(T){c.enabled=!0,n(e.name);return}}if(e.patches?.length){c.enabled=!h,n(e.name);return}if(h&&!e.started){c.enabled=!h;return}if(!(h?Xc(e):pi(e))){c.enabled=!1;let T=`Error while ${h?"stopping":"starting"} plugin ${e.name}`;Gh.error(T),Fw(T);return}c.enabled=!h}return o(ue,{className:bn("card",{"card-disabled":t}),flexDirection:"column",onMouseEnter:r,onMouseLeave:i},o("div",{className:bn("card-header")},o(ee,{variant:"text-md/bold",className:bn("name")},e.name,s&&o(bh,{text:"NEW",color:"#ED4245"})),o("button",{role:"switch",onClick:()=>p(),className:V(Ow.button,bn("info-button"))},e.options?o(_w,null):o(Bw,{width:"24",height:"24"})),o(Bh,{checked:u(),onChange:v,disabled:t})),o(ee,{className:bn("note"),variant:"text-sm/normal"},e.description))}function Qc(){let e=lt(),t=N.useMemo(()=>new Or,[]);N.useEffect(()=>()=>void(t.hasChanges&&xt.show({title:"Restart required",body:o(m,null,o("p",null,"The following plugins require a restart:"),o("div",null,t.map((T,P)=>o(m,null,P>0&&", ",Ne.parse("`"+T+"`"))))),confirmText:"Restart now",cancelText:"Later!",onConfirm:()=>location.reload()})),[]);let n=N.useMemo(()=>{let T={};for(let P in we){let L=we[P].dependencies;if(L)for(let k of L)T[k]??=[],T[k].push(P)}return T},[]),r=N.useMemo(()=>Object.values(we).sort((T,P)=>T.name.localeCompare(P.name)),[]),[i,s]=N.useState({value:"",status:0}),c=T=>s(P=>({...P,value:T})),u=T=>s(P=>({...P,status:T})),p=T=>{let P=e.plugins[T.name]?.enabled;if(P&&i.status===2||!P&&i.status===1)return!1;if(!i.value.length)return!0;let L=i.value.toLowerCase();return T.name.toLowerCase().includes(L)||T.description.toLowerCase().includes(L)||T.tags?.some(k=>k.toLowerCase().includes(L))},[v]=it(()=>et("Vencord_existingPlugins").then(T=>{let P=Date.now()/1e3,L={},k=Object.values(r).map(G=>G.name),F=[];for(let{name:G}of r)(L[G]=T?.[G]??P)+60*60*24*2>P&&F.push(G);return tt("Vencord_existingPlugins",L),unsafeWindow._.isEqual(F,k)?[]:F})),h,S;if(r?.length){h=[],S=[];for(let T of r){if(!T.options&&T.name.endsWith("API")&&i.value!=="API"||!p(T))continue;if(T.required||n[T.name]?.some(L=>e.plugins[L].enabled)){let L=T.required?"This plugin is required for Vencord to function.":Uw(n[T.name]?.filter(k=>e.plugins[k].enabled));S.push(o(K,{text:L,key:T.name},({onMouseLeave:k,onMouseEnter:F})=>o(zh,{onMouseLeave:k,onMouseEnter:F,onRestartNeeded:G=>t.handleChange(G),disabled:!0,plugin:T})))}else h.push(o(zh,{onRestartNeeded:L=>t.handleChange(L),disabled:!1,plugin:T,isNew:v?.includes(T.name),key:T.name}))}}else h=S=o(ee,{variant:"text-md/normal"},"No plugins meet search criteria.");return o(_n,{title:"Plugins"},o($w,{required:t.hasChanges}),o(b.FormTitle,{tag:"h5",className:V(z.top20,z.bottom8)},"Filters"),o("div",{className:bn("filter-controls")},o(Le,{autoFocus:!0,value:i.value,placeholder:"Search for a plugin...",onChange:c,className:z.bottom20}),o("div",{className:Hh.inputWrapper},o(un,{className:Hh.inputDefault,options:[{label:"Show All",value:0,default:!0},{label:"Show Enabled",value:1},{label:"Show Disabled",value:2}],serialize:String,select:u,isSelected:T=>T===i.status,closeOnSelect:!0}))),o(b.FormTitle,{className:z.top20},"Plugins"),o("div",{className:bn("grid")},h),o(b.FormDivider,{className:z.top20}),o(b.FormTitle,{tag:"h5",className:V(z.top20,z.bottom8)},"Required Plugins"),o("div",{className:bn("grid")},S))}function Uw(e){return o(N.Fragment,null,o(b.FormText,null,"This plugin is required by:"),e.map(t=>o(b.FormText,{className:bn("dep-text")},t)))}var bn,Gh,Hh,Ow,_w,Bw,jh=g(()=>{"use strict";a();l();vh();kn();zs();_();ze();Mt();js();Oh();Fh();zo();ml();xe();Qe();he();Je();be();B();w();mr();Ys();bn=Oe("vc-plugins-"),Gh=new X("PluginSettings","#a6d189"),Hh=I("inputDefault","inputWrapper"),Ow=I("button","disabled","enabled"),_w=se(()=>We("18.564C15.797 19.099 14.932 19.498 14 19.738V22H10V19.738C9.069")),Bw=se(()=>We("4.4408921e-16 C4.4771525,-1.77635684e-15 4.4408921e-16"))});var Wh={};ye(Wh,{default:()=>Gw});var Gw,qh=g(()=>{"use strict";a();l();jh();zo();Gw=Bn(Qc,"Plugins")});function ct(e){return e.disabled&&(e.style??={},e.style.pointerEvents="none",e["aria-disabled"]=!0),o("a",{role:"link",target:"_blank",...e},e.children)}var xo=g(()=>{"use strict";a();l()});var Kh={};ye(Kh,{default:()=>qw});function zw({link:e}){let[t,n,r]=it(()=>f(e).then(s=>{if(s.status>300)throw`${s.status} ${s.statusText}`;let c=s.headers.get("Content-Type");if(!c?.startsWith("text/css")&&!c?.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(b.FormText,{style:{color:r?"var(--text-muted)":n?"var(--text-danger)":"var(--text-positive)"}},i)}function jw({themeLinks:e}){return e.length?o(m,null,o(b.FormTitle,{className:z.top20,tag:"h5"},"Validator"),o(b.FormText,null,"This section will tell you whether your themes can successfully be loaded"),o("div",null,e.map(t=>o(Ot,{style:{padding:".5em",marginBottom:".5em",marginTop:".5em"},key:t},o(b.FormTitle,{tag:"h5",style:{overflowWrap:"break-word"}},t),o(zw,{link:t}))))):null}function Ww(){let e=lt(["themeLinks"]),[t,n]=N.useState(e.themeLinks.join(` -`));function r(){e.themeLinks=[...new Set(t.trim().split(/\n+/).map(i=>i.trim()).filter(Boolean))]}return o(_n,{title:"Themes"},o(Ot,{className:"vc-settings-card vc-text-selectable"},o(b.FormTitle,{tag:"h5"},"Paste links to .theme.css files here"),o(b.FormText,null,"One link per line"),o(b.FormText,null,o("strong",null,"Make sure to use the raw links or github.io links!")),o(b.FormDivider,{className:z.top8+" "+z.bottom8}),o(b.FormTitle,{tag:"h5"},"Find Themes:"),o("div",{style:{marginBottom:".5em"}},o(ct,{style:{marginRight:".5em"},href:"https://betterdiscord.app/themes"},"BetterDiscord Themes"),o(ct,{href:"https://github.com/search?q=discord+theme"},"GitHub")),o(b.FormText,null,'If using the BD site, click on "Source" somewhere below the Download button'),o(b.FormText,null,'In the GitHub repository of your theme, find X.theme.css, click on it, then click the "Raw" button'),o(b.FormText,null,"If the theme has configuration that requires you to edit the file:",o("ul",null,o("li",null,"\u2022 Make a ",o(ct,{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(b.FormTitle,{tag:"h5"},"Themes"),o(cs,{value:t,onChange:n,className:`${Hw.textarea} vc-settings-theme-links`,placeholder:"Theme Links",spellCheck:!1,onBlur:r}),o(jw,{themeLinks:e.themeLinks}))}var Hw,qw,Yh=g(()=>{"use strict";a();l();_();xo();Qe();be();B();w();zo();Hw=Ae(e=>typeof e.textarea=="string");qw=Bn(Ww,"Themes")});function Zs({value:e,onChange:t,validate:n}){let[r,i]=N.useState(e),[s,c]=N.useState();function u(p){i(p);let v=n(p);v===!0?(c(void 0),t(p)):c(v)}return o(m,null,o(Le,{type:"text",value:r,onChange:u,error:s}))}var Vc=g(()=>{"use strict";a();l();w()});var Zh={};ye(Zh,{default:()=>Jw});function Kw(e){try{return new URL(e),!0}catch{return"Invalid URL"}}async function Yw(){let e=await f(new URL("/v1/",ho()),{method:"DELETE",headers:new Headers({Authorization:await pr()})});if(!e.ok){Os.error(`Failed to erase data, API returned ${e.status}`),ve({title:"Cloud Integrations",body:`Could not erase all data (API returned ${e.status}), please contact support.`,color:"var(--red-360)"});return}C.cloud.authenticated=!1,await wc(),ve({title:"Cloud Integrations",body:"Successfully erased all data.",color:"var(--green-360)"})}function Zw(){let{cloud:e}=lt(["cloud.authenticated","cloud.settingsSync"]),t=e.authenticated&&e.settingsSync;return o(b.FormSection,{title:"Settings Sync",className:z.top16},o(b.FormText,{variant:"text-md/normal",className:z.bottom20},"Synchronize your settings to the cloud. This allows easy synchronization across multiple devices with minimal effort."),o(ht,{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(R,{size:R.Sizes.SMALL,disabled:!t,onClick:()=>dr(!0)},"Sync to Cloud"),o(K,{text:"This will overwrite your local settings with the ones on the cloud. Use wisely!"},({onMouseLeave:n,onMouseEnter:r})=>o(R,{onMouseLeave:n,onMouseEnter:r,size:R.Sizes.SMALL,color:R.Colors.RED,disabled:!t,onClick:()=>Bs(!0,!0)},"Sync from Cloud")),o(R,{size:R.Sizes.SMALL,color:R.Colors.RED,disabled:!t,onClick:()=>oh()},"Delete Cloud Settings")))}function Xw(){let e=lt(["cloud.authenticated","cloud.url"]);return o(_n,{title:"Vencord Cloud"},o(b.FormSection,{title:"Cloud Settings",className:z.top16},o(b.FormText,{variant:"text-md/normal",className:z.bottom20},"Vencord comes with a cloud integration that adds goodies like settings sync across devices. It ",o(ct,{href:"https://vencord.dev/cloud/privacy"},"respects your privacy"),", and the ",o(ct,{href:"https://github.com/Vencord/Backend"},"source code")," is AGPL 3.0 licensed so you can host it yourself."),o(ht,{key:"backend",value:e.cloud.authenticated,onChange:t=>{t&&Jg(),t||(e.cloud.authenticated=t)},note:"This will request authorization if you have not yet set up cloud integrations."},"Enable Cloud Integrations"),o(b.FormTitle,{tag:"h5"},"Backend URL"),o(b.FormText,{className:z.bottom8},"Which backend to use when using cloud integrations."),o(Zs,{key:"backendUrl",value:e.cloud.url,onChange:t=>{e.cloud.url=t,e.cloud.authenticated=!1,wc()},validate:Kw}),o(R,{className:z.top8,size:R.Sizes.MEDIUM,color:R.Colors.RED,disabled:!e.cloud.authenticated,onClick:()=>xt.show({title:"Are you sure?",body:"Once your data is erased, we cannot recover it. There's no going back!",onConfirm:Yw,confirmText:"Erase it!",confirmColor:"vc-cloud-erase-data-danger-btn",cancelText:"Nevermind"})},"Erase All Data"),o(b.FormDivider,{className:z.top16})),o(Zw,null))}var Jw,Xh=g(()=>{"use strict";a();l();mo();_();Vc();xo();Pc();Qe();ii();w();zo();Jw=Bn(Xw,"Cloud")});var Jh={};ye(Jh,{default:()=>Vw});function Qw(){return o(_n,{title:"Backup & Restore"},o(Ot,{className:V("vc-settings-card","vc-backup-restore-card")},o(ue,{flexDirection:"column"},o("strong",null,"Warning"),o("span",null,"Importing a settings file will overwrite your current settings."))),o(ee,{variant:"text-md/normal",className:z.bottom8},"You can import and export your Vencord settings as a JSON file. This allows you to easily transfer your settings to another device, or recover your settings after reinstalling Vencord or Discord."),o(ee,{variant:"text-md/normal",className:z.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(ue,null,o(R,{onClick:()=>nh(),size:R.Sizes.SMALL},"Import Settings"),o(R,{onClick:eh,size:R.Sizes.SMALL},"Export Settings")))}var Vw,Qh=g(()=>{"use strict";a();l();Mt();Qe();he();ii();w();zo();Vw=Bn(Qw,"Backup & Restore")});var di,eu=g(()=>{"use strict";a();l();It();_();M();xe();x();w();_r();di=y({name:"Settings",description:"Adds Settings UI and debug info",authors:[d.Ven,d.Megu],required:!0,start(){me("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=()=>ys.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(C.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 X("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:(yh(),Do(hh)).default},{section:"VencordPlugins",label:"Plugins",element:(qh(),Do(Wh)).default},{section:"VencordThemes",label:"Themes",element:(Yh(),Do(Kh)).default},!1,{section:"VencordCloud",label:"Cloud",element:(Xh(),Do(Zh)).default},{section:"VencordSettingsSync",label:"Backup & Restore",element:(Qh(),Do(Jh)).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||unsafeWindow.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(m,null,o(e,{...t},"Vencord ",an,i),n&&o(e,{...t},"Electron ",n),r&&o(e,{...t},"Chromium ",r))}})});var tu,Vh=g(()=>{"use strict";a();l();M();x();tu=y({name:"AlwaysAnimate",description:"Animates anything that can be animated, besides status emojis.",authors:[d.FieryFlames],patches:[{find:".canAnimate",all:!0,replacement:{match:/\.canAnimate\b/g,replace:".canAnimate || true"}}]})});var nu,ey=g(()=>{"use strict";a();l();M();x();nu=y({name:"AlwaysTrust",description:"Removes the annoying untrusted domain and suspicious file popup",authors:[d.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 ou,ty=g(()=>{"use strict";a();l();_();M();x();ou=y({name:"AnonymiseFileNames",authors:[d.obscurity],description:"Anonymise uploaded file names",patches:[{find:"instantBatchUpload:function",replacement:{match:/uploadFiles:(.{1,2}),/,replace:"uploadFiles:(...args)=>(args[0].uploads.forEach(f=>f.filename=$self.anonymise(f.filename)),$1(...args)),"}}],options:{method:{description:"Anonymising method",type:4,options:[{label:"Random Characters",value:0,default:!0},{label:"Consistent",value:1},{label:"Timestamp (4chan-like)",value:2}]},randomisedLength:{description:"Random characters length",type:1,default:7,disabled:()=>C.plugins.AnonymiseFileNames.method!==0},consistent:{description:"Consistent filename",type:0,default:"image",disabled:()=>C.plugins.AnonymiseFileNames.method!==1}},anonymise(e){let t="image",n=e.lastIndexOf("."),r=n!==-1?e.slice(n):"";switch(C.plugins.AnonymiseFileNames.method){case 0:let i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";t=Array.from({length:C.plugins.AnonymiseFileNames.randomisedLength},()=>i[Math.floor(Math.random()*i.length)]).join("");break;case 1:t=C.plugins.AnonymiseFileNames.consistent;break;case 2:t=`${Math.floor(Date.now()/1e3)}${Math.floor(unsafeWindow.performance.now())}`;break}return t+r}})});async function ny(e,t){return(await e2.getAsset(e,[t,void 0]))[0]}async function n2(e){let t={};return await t2(t,e),t.application}var e2,t2,oy,yr,ru,ry=g(()=>{"use strict";a();l();zs();xo();M();x();B();w();e2=Ze("getAssetImage: size must === [number, number] for Twitch",{getAsset:Z.byCode("apply(")}),t2=pe(".APPLICATION_RPC(");oy={};ru=y({name:"WebRichPresence (arRPC)",description:"Client plugin for arRPC to enable RPC on Discord Web (experimental)",authors:[d.Ducko],settingsAboutComponent:()=>o(m,null,o(b.FormTitle,{tag:"h3"},"How to use arRPC"),o(b.FormText,null,o(ct,{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 unsafeWindow)return;if(yr&&yr.close(),yr=new WebSocket("ws://127.0.0.1:1337"),yr.onmessage=async t=>{let n=JSON.parse(t.data);if(n.activity?.assets?.large_image&&(n.activity.assets.large_image=await ny(n.activity.application_id,n.activity.assets.large_image)),n.activity?.assets?.small_image&&(n.activity.assets.small_image=await ny(n.activity.application_id,n.activity.assets.small_image)),n.activity){let r=n.activity.application_id;oy[r]||=await n2(r);let i=oy[r];n.activity.name||=i.name}O.dispatch({type:"LOCAL_ACTIVITY_UPDATE",...n})},!await new Promise(t=>setTimeout(()=>t(yr.readyState===WebSocket.OPEN),1e3))){ci("Failed to connect to arRPC, is it running?","Retry",()=>{Lc(),this.start()});return}Q.show({message:"Connected to arRPC",type:Q.Type.SUCCESS,id:Q.genId(),options:{duration:1e3,position:Q.Position.BOTTOM}})},stop(){O.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:null}),yr?.close()}})});var iu,iy=g(()=>{"use strict";a();l();M();x();iu=y({name:"BANger",description:"Replaces the GIF in the ban dialogue with a custom one.",authors:[d.Xinto,d.Glitch],patches:[{find:"BAN_CONFIRM_TITLE.",replacement:{match:/src:\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 sy=g(()=>{});function r2(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"]===at.Messages.SERVERS);r&&(n.children=r)}return t}var o2,ay,ly,cy,uy,py,dy=g(()=>{"use strict";a();l();_();ze();ae();B();w();o2=Oe("vc-bf-"),ay=I("sidebar","guilds"),ly=I("a","animated","useTransition"),cy=ce("ChannelRTCStore"),uy=ce("ExpandedGuildFolderStore");py=E.wrap(()=>{let e=Ue([uy],()=>uy.getExpandedFolders()),t=Ue([cy],()=>cy.isFullscreenInContext()),n=document.querySelector(`.${ay.guilds}`),r=!!e.size,i=o2("folder-sidebar",{fullscreen:t}),s=o(r2,{className:ay.guilds,bfGuildFolders:Array.from(e)});return!n||!C.plugins.BetterFolders.sidebarAnim?r?o("div",{className:i},s):null:o(ly.Transition,{items:r,from:{width:0},enter:{width:n.getBoundingClientRect().width},leave:{width:0},config:{duration:200}},(c,u)=>u&&o(ly.animated.div,{style:c,className:i},s))},{noop:!0})});var i2,s2,su,au,Jn,lu,my=g(()=>{"use strict";a();l();sy();_();M();x();B();w();dy();i2=Ae(e=>e.prototype?.convertToFolder),s2=ce("SortedGuildStore"),su=ce("ExpandedGuildFolderStore"),au=I("move","toggleGuildFolderExpand"),Jn=A({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}}),lu=y({name:"BetterFolders",description:"Shows server folders on dedicated sidebar and adds folder related improvements",authors:[d.juby,d.AutumnVN],patches:[{find:'("guildsnav")',predicate:()=>Jn.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:()=>Jn.store.sidebar,replacement:{match:/(\(0,\i\.jsx\))\(\i\..,{className:\i\(\)\.guilds,themeOverride:\i}\)/,replace:"$&,$1($self.FolderSideBar,{})"}},{find:'("guildsnav")',predicate:()=>Jn.store.closeAllHomeButton,replacement:{match:",onClick:function(){if(!__OVERLAY__){",replace:"$&$self.closeFolders();"}}],settings:Jn,start(){let e=t=>s2.getGuildFolders().find(n=>n.guildIds.includes(t));O.subscribe("CHANNEL_SELECT",this.onSwitch=t=>{if(!(!Jn.store.closeAllFolders&&!Jn.store.forceOpen)&&this.lastGuildId!==t.guildId){this.lastGuildId=t.guildId;let n=e(t.guildId);n?.folderId?Jn.store.forceOpen&&!su.isFolderExpanded(n.folderId)&&au.toggleGuildFolderExpand(n.folderId):Jn.store.closeAllFolders&&this.closeFolders()}}),O.subscribe("TOGGLE_GUILD_FOLDER_EXPAND",this.onToggleFolder=t=>{Jn.store.closeOthers&&!this.dispatching&&O.wait(()=>{let n=su.getExpandedFolders();if(n.size>1){this.dispatching=!0;for(let r of n)r!==t.folderId&&au.toggleGuildFolderExpand(r);this.dispatching=!1}})})},stop(){O.unsubscribe("CHANNEL_SELECT",this.onSwitch),O.unsubscribe("TOGGLE_GUILD_FOLDER_EXPAND",this.onToggleFolder)},FolderSideBar:py,getGuildsTree(e,t){let n=new i2;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 su.getExpandedFolders())au.toggleGuildFolderExpand(e)}})});var cu,fy=g(()=>{"use strict";a();l();M();x();cu=y({name:"BetterGifAltText",authors:[d.Ven],description:"Change GIF alt text from simply being 'GIF' to containing the gif tags / filename",patches:[{find:"onCloseImage=",replacement:{match:/(return.{0,10}\.jsx.{0,50}isWindowFocused)/,replace:"$self.altify(e);$1"}},{find:'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 uu,gy=g(()=>{"use strict";a();l();_();M();x();uu=y({name:"BetterNotesBox",description:"Hide notes or disable spellcheck (Configure in settings!!)",authors:[d.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:()=>C.plugins.BetterNotesBox.hide,default:!1}}})});var pu,hy=g(()=>{"use strict";a();l();_();M();x();w();pu=y({name:"BetterRoleDot",authors:[d.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:()=>C.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){Zt.copy(e),Q.show({message:"Copied to Clipboard!",type:Q.Type.SUCCESS,id:Q.genId(),options:{duration:1e3,position:Q.Position.BOTTOM}})}})});var du,yy=g(()=>{"use strict";a();l();M();x();du=y({name:"BetterUploadButton",authors:[d.obscurity,d.Ven],description:"Upload with a single click, open menu with right click",patches:[{find:"Messages.CHAT_ATTACH_UPLOAD_OR_INVITE",replacement:{match:/CHAT_ATTACH_UPLOAD_OR_INVITE,onDoubleClick:(.+?:void 0)\},(.{1,3})\)/,replace:(e,t,n)=>`${e.slice(0,-1)},{onClick:${t},onContextMenu:${n}.onClick})`}}]})});var vy=g(()=>{});function Qn({height:e=24,width:t=24,className:n,children:r,viewBox:i,...s}){return o("svg",{className:V(n,"vc-icon"),role:"img",width:t,height:e,viewBox:i,...s},r)}function Xs({height:e=24,width:t=24,className:n}){return o(Qn,{height:e,width:t,className:V(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 Sy(e){return o(Qn,{...e,className:V(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 Wo(e){return o(Qn,{...e,className:V(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 qo(e){return o(Qn,{...e,className:V(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 by(e){return o(Qn,{...e,className:V(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 Ty(e){return o(Qn,{"aria-label":at.Messages.GUILD_OWNER,...e,className:V(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 xy(e){return o(Qn,{...e,className:V(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 Js(e){return o(Qn,{...e,className:V(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 Qs(e){return o(Qn,{...e,className:V(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 Fn=g(()=>{"use strict";a();l();vy();he();w()});var wy,Py,My=g(()=>{"use strict";a();l();B();wy=ce("ApplicationStreamPreviewStore"),Py=ce("ApplicationStreamingStore")});var a2,Ny,Iy,Cy,mu,ky=g(()=>{"use strict";a();l();It();Fn();M();ot();x();w();My();a2=async({guildId:e,channelId:t,ownerId:n})=>{let r=await wy.getPreviewURL(e,t,n);!r||Uo(r)},Ny=(e,{userId:t})=>()=>{let n=Py.getAnyStreamForUser(t);if(!n)return;let r=o(D.MenuItem,{label:"View Stream Preview",id:"view-stream-preview",icon:xy,action:()=>n&&a2(n),disabled:!n});e.push(o(D.MenuSeparator,null),r)},Iy=(e,{stream:t})=>Ny(e,{userId:t.ownerId}),Cy=(e,{user:t})=>Ny(e,{userId:t.id}),mu=y({name:"BiggerStreamPreview",description:"This plugin allows you to enlarge stream previews",authors:[d.phil],start:()=>{me("user-context",Cy),me("stream-context",Iy)},stop:()=>{fe("user-context",Cy),fe("stream-context",Iy)}})});function Ry(){mi.textContent=` - .vc-nsfw-img [class^=imageWrapper] img, - .vc-nsfw-img [class^=wrapperPaused] video { - filter: blur(${C.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 mi,fu,Ay=g(()=>{"use strict";a();l();_();M();x();fu=y({name:"BlurNSFW",description:"Blur attachments in NSFW channels until hovered",authors:[d.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:Ry}},start(){mi=document.createElement("style"),mi.id="VcBlurNsfw",document.head.appendChild(mi),Ry()},stop(){mi?.remove()}})});function l2(e){let t=C.plugins.CallTimer.format==="human",n=h=>t?h:h.toString().padStart(2,"0"),r=h=>t?h:"",i=t?" ":":",s=Math.floor(e/864e5),c=Math.floor(e%864e5/36e5),u=Math.floor(e%864e5%36e5/6e4),p=Math.floor(e%864e5%36e5%6e4/1e3),v="";return s&&(v+=`${s}d `),(c||v)&&(v+=`${n(c)}${r("h")}${i}`),(u||v||!t)&&(v+=`${n(u)}${r("m")}${i}`),v+=`${n(p)}${r("s")}`,v}var gu,Ly=g(()=>{"use strict";a();l();_();ae();M();x();w();gu=y({name:"CallTimer",description:"Adds a timer to vcs",authors:[d.Ven],startTime:0,interval:void 0,options:{format:{type:4,description:"The timer format. This can be any valid moment.js format",options:[{label:"30d 23:00:42",value:"stopwatch",default:!0},{label:"30d 23h 00m 42s",value:"human"}]}},patches:[{find:".renderConnectionStatus=",replacement:{match:/(?<=renderConnectionStatus=.+\.channel,children:)\w/,replace:"[$&, $self.renderTimer(this.props.channel.id)]"}}],renderTimer(e){return o(E,{noop:!0},o(this.Timer,{channelId:e}))},Timer({channelId:e}){let[t,n]=N.useState(0),r=N.useMemo(()=>Date.now(),[e]);return N.useEffect(()=>{let i=setInterval(()=>n(Date.now()-r),1e3);return()=>{clearInterval(i),n(0)}},[e]),o("p",{style:{margin:0}},"Connected for ",l2(t))}})});var xu={};ye(xu,{_handleClick:()=>p2,_handlePreEdit:()=>u2,_handlePreSend:()=>c2,addClickListener:()=>bu,addPreEditListener:()=>Vn,addPreSendListener:()=>ut,removeClickListener:()=>Tu,removePreEditListener:()=>eo,removePreSendListener:()=>pt});async function c2(e,t,n,r){n.replyOptions=r;for(let i of yu)try{let s=await i(e,t,n);if(s&&s.cancel===!0)return!0}catch(s){hu.error(`MessageSendHandler: Listener encountered an unknown error -`,s)}return!1}async function u2(e,t,n){for(let r of vu)try{await r(e,t,n)}catch(i){hu.error(`MessageEditHandler: Listener encountered an unknown error -`,i)}}function ut(e){return yu.add(e),e}function Vn(e){return vu.add(e),e}function pt(e){return yu.delete(e)}function eo(e){return vu.delete(e)}function p2(e,t,n){e=dn.getMessage(t.id,e.id)??e;for(let r of Su)try{r(e,t,n)}catch(i){hu.error(`MessageClickHandler: Listener encountered an unknown error -`,i)}}function bu(e){return Su.add(e),e}function Tu(e){return Su.delete(e)}var hu,yu,vu,Su,Tn=g(()=>{"use strict";a();l();xe();w();hu=new X("MessageEvents","#e5c890"),yu=new Set,vu=new Set;Su=new Set});var Ey,Dy=g(()=>{"use strict";a();l();Ey=["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 Oy,d2,wu,_y=g(()=>{"use strict";a();l();Tn();M();x();Dy();Oy=/[\\^$.*+?()[\]{}|]/g,d2=RegExp(Oy.source),wu=y({name:"ClearURLs",description:"Removes tracking garbage from URLs",authors:[d.adryd],dependencies:["MessageEventsAPI"],escapeRegExp(e){return e&&d2.test(e)?e.replace(Oy,"\\$&"):e||""},createRules(){let e=Ey;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,c,u)=>{this.removeParam(i,c,u)})})}),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=ut((e,t)=>this.onSend(t)),this.preEdit=Vn((e,t,n)=>this.onSend(n))},stop(){pt(this.preSend),eo(this.preEdit)}})});var Pu,By=g(()=>{"use strict";a();l();M();x();Pu=y({name:"ColorSighted",description:"Removes the colorblind-friendly icons from statuses, just like 2015-2017 Discord",authors:[d.lewisakura],patches:[{find:"Masks.STATUS_ONLINE",replacement:{match:/Masks\.STATUS_(?:IDLE|DND|STREAMING|OFFLINE)/g,replace:"Masks.STATUS_ONLINE"}},{find:".AVATAR_STATUS_MOBILE_16;",replacement:{match:/(\.fromIsMobile,.+?)\i.status/,replace:(e,t)=>`${t}"online"`}}]})});var m2,Mu,Fy=g(()=>{"use strict";a();l();M();si();Kr();x();B();B();w();m2=e=>()=>{throw new Error(`'${e}' is Discord Desktop only.`)},Mu=y({name:"ConsoleShortcuts",description:"Adds shorter Aliases for many things on the window. Run `shortcutList` for a list.",authors:[d.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 c=ir(n(...i)),u=(()=>{switch(c.length){case 0:return null;case 1:return c[0];default:let p=[...new Set(c)];return p.length>1&&console.warn(`Warning: This filter matches ${c.length} modules. Make it more specific! -`,p),c[0]}})();return u&&s&&r.set(s,u),u}}let t;return{wp:Vencord.Webpack,wpc:zt.c,wreq:zt,wpsearch:Sl,wpex:bl,wpexs:n=>Vencord.Webpack.extract(Vencord.Webpack.findModuleId(n)),find:e(n=>n),findAll:ir,findByProps:e(Z.byProps),findAllByProps:(...n)=>ir(Z.byProps(...n)),findByCode:e(Z.byCode),findAllByCode:n=>ir(Z.byCode(n)),findStore:e(Z.byStoreName),PluginsApi:Vencord.Plugins,plugins:Vencord.Plugins.plugins,React:N,Settings:Vencord.Settings,Api:Vencord.Api,reload:()=>location.reload(),restart:m2("restart"),canonicalizeMatch:Ho,canonicalizeReplace:ws,canonicalizeReplacement:qr,fakeRender:(n,r)=>{let i=t?.deref(),s=i?.closed===!1?i:unsafeWindow.open("about:blank","Fake Render","popup,width=500,height=500");t=new WeakRef(s),s.focus(),Fo.render(N.createElement(n,r),s.document.body)}}},start(){let e=this.getShortcuts();unsafeWindow.shortcutList=e;for(let[t,n]of Object.entries(e))unsafeWindow[t]=n},stop(){delete unsafeWindow.shortcutList;for(let e in this.getShortcuts())delete unsafeWindow[e]}})});var wo,Iu,Cu,Vs,Nu,ku,$y=g(()=>{"use strict";a();l();mo();_();M();xe();Je();x();fr();w();wo=new X("CrashHandler"),Iu=A({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}}),Cu=0,Vs=0,Nu=!1,ku=y({name:"CrashHandler",description:"Utility plugin for handling and possibly recovering from Crashes without a restart",authors:[d.Nuckyz],enabledByDefault:!0,popAllModals:void 0,settings:Iu,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()-Vs<=1e3&&!Nu)return!0;if(Nu=!1,++Cu>5){try{ve({color:"#eed202",title:"Discord has crashed!",body:"Awn :( Discord has crashed more than five times, not attempting to recover.",noPersist:!0})}catch{}return Vs=Date.now(),!1}setTimeout(()=>Cu--,6e4);try{return Cu===1&&ai("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),Iu.store.attemptToPreventCrashes?(this.handlePreventCrash(e),!0):!1}catch(t){return wo.error("Failed to handle crash",t),!1}finally{Vs=Date.now()}},handlePreventCrash(e){if(Date.now()-Vs>=1e3)try{ve({color:"#eed202",title:"Discord has crashed!",body:"Attempting to recover...",noPersist:!0})}catch{}try{O.dispatch({type:"CONTEXT_MENU_CLOSE"})}catch(t){wo.debug("Failed to close open context menu.",t)}try{this.popAllModals?.()}catch(t){wo.debug("Failed to close old modals.",t)}try{Ll()}catch(t){wo.debug("Failed to close all open modals.",t)}try{O.dispatch({type:"USER_PROFILE_MODAL_CLOSE"})}catch(t){wo.debug("Failed to close user popout.",t)}try{O.dispatch({type:"LAYER_POP_ALL"})}catch(t){wo.debug("Failed to pop all layers.",t)}if(Iu.store.attemptToNavigateToHome)try{zr.transitionTo("/channels/@me")}catch(t){wo.debug("Failed to navigate to home",t)}try{Nu=!0,e.forceUpdate()}catch(t){wo.debug("Failed to update crash handler component.",t)}}})});async function Uy(e){return(await y2.getAsset(ta.store.appID,[e,void 0]))[0]}async function Hy(){let{appID:e,appName:t,details:n,state:r,type:i,startTime:s,endTime:c,imageBig:u,imageBigTooltip:p,imageSmall:v,imageSmallTooltip:h,buttonOneText:S,buttonOneURL:T,buttonTwoText:P,buttonTwoURL:L}=ta.store;if(!t)return;let k={application_id:e||"0",name:t,state:r,details:n,type:i,flags:1<<0};s&&(k.timestamps={start:s},c&&(k.timestamps.end=c)),S&&(k.buttons=[S,P].filter(bs),k.metadata={button_urls:[T,L].filter(bs)}),u&&(k.assets={large_image:await Uy(u),large_text:p}),v&&(k.assets={...k.assets,small_image:await Uy(v),small_text:h});for(let F in k){if(F==="type")continue;let G=k[F];(!G||G.length===0)&&delete k[F]}return k}async function fi(e){let t=await Hy();O.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e?null:t,socketId:"CustomRPC"})}var f2,g2,h2,y2,en,Gy,ea,v2,ta,Ru,zy=g(()=>{"use strict";a();l();_();xo();M();Ts();be();x();B();w();f2=pe("onOpenGameProfile"),g2=I("activity","buttonColor"),h2=I("profileColors"),y2=Ze("getAssetImage: size must === [number, number] for Twitch",{getAsset:Z.byCode("apply(")});en=e=>({type:0,description:e,onChange:fi}),Gy=e=>({type:1,description:e,onChange:fi}),ea=(e,t,n)=>({label:e,value:t,default:n}),v2=(e,t)=>({type:4,description:e,onChange:fi,options:t}),ta=A({appID:en("The ID of the application for the rich presence."),appName:en("The name of the presence."),details:en("Line 1 of rich presence."),state:en("Line 2 of rich presence."),type:v2("Type of presence",[ea("Playing",0,!0),ea("Listening",2),ea("Watching",3),ea("Competing",5)]),startTime:Gy("Unix Timestamp for beginning of activity."),endTime:Gy("Unix Timestamp for end of activity."),imageBig:en("Sets the big image to the specified image."),imageBigTooltip:en("Sets the tooltip text for the big image."),imageSmall:en("Sets the small image to the specified image."),imageSmallTooltip:en("Sets the tooltip text for the small image."),buttonOneText:en("The text for the first button"),buttonOneURL:en("The URL for the first button"),buttonTwoText:en("The text for the second button"),buttonTwoURL:en("The URL for the second button")});Ru=y({name:"CustomRPC",description:"Allows you to set a custom rich presence.",authors:[d.captain],start:fi,stop:()=>fi(!0),settings:ta,settingsAboutComponent:()=>{let e=it(Hy);return o(m,null,o(b.FormTitle,{tag:"h2"},"NOTE:"),o(b.FormText,null,"You will need to ",o(ct,{href:"https://discord.com/developers/applications"},"create an application")," and get its ID to use this plugin."),o(b.FormDivider,null),o("div",{style:{width:"284px"},className:h2.profileColors},e[0]&&o(f2,{activity:e[0],className:g2.activity,channelId:Ie.getChannelId(),guild:de.getGuild(uo.getLastSelectedGuildId()),application:{id:ta.store.appID},user:U.getCurrentUser()})))}})});var Au,jy=g(()=>{"use strict";a();l();M();x();Au=y({name:"DisableDMCallIdle",description:"Disables automatically getting kicked from a DM voice call after 5 minutes.",authors:[d.Nuckyz],patches:[{find:".Messages.BOT_CALL_IDLE_DISCONNECT",replacement:{match:/(?<=function \i\(\){)(?=.{1,100}\.Messages\.BOT_CALL_IDLE_DISCONNECT)/,replace:"return;"}}]})});function Lu(e){return e.t==="Emoji"?`${location.protocol}//${unsafeWindow.GLOBAL_ENV.CDN_HOST}/emojis/${e.id}.${e.isAnimated?"gif":"png"}`:`${location.origin}/stickers/${e.id}.${T2[e.format_type]}`}async function Yy(e){let t=S2.getStickerById(e);if(t)return t;let{body:n}=await _t.get({url:`/stickers/${e}`});return O.dispatch({type:"STICKER_FETCH_SUCCESS",sticker:n}),n}async function x2(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 Zy(Lu(t)));let{body:r}=await _t.post({url:`/guilds/${e}/stickers`,body:n});O.dispatch({type:"GUILD_STICKERS_CREATE_SUCCESS",guildId:e,sticker:{...r,user:U.getCurrentUser()}})}async function w2(e,t){let n=await Zy(Lu(t)),r=await new Promise(i=>{let s=new FileReader;s.onload=()=>i(s.result),s.readAsDataURL(n)});return b2({guildId:e,name:t.name.split("~")[0],image:r})}function P2(e){let t=U.getCurrentUser().id;return Object.values(de.getGuilds()).filter(n=>{if(!(n.ownerId===t||BigInt(qe.getGuildPermissions({id:n.id})&Wy)===Wy))return!1;if(e.t==="Sticker")return!0;let{isAnimated:i}=e,s=n.getMaxEmojiSlots(),{emojis:c}=mn.getGuilds()[n.id],u=0;for(let p of c)p.animated===i&&u++;return un.name.localeCompare(r.name))}async function Zy(e){let t=await f(e);if(!t.ok)throw new Error(`Failed to fetch ${e} - ${t.status}`);return t.blob()}async function M2(e,t){try{t.t==="Sticker"?await x2(e,t):await w2(e,t),Q.show({message:`Successfully cloned ${t.name} to ${de.getGuild(e)?.name??"your server"}!`,type:Q.Type.SUCCESS,id:Q.genId()})}catch(n){new X("EmoteCloner").error("Failed to clone",t.name,"to",e,n),Q.show({message:"Oopsie something went wrong :( Check console!!!",type:Q.Type.FAILURE,id:Q.genId()})}}function N2({data:e}){let[t,n]=N.useState(!1),[r,i]=N.useState(e.name),[s,c]=N.useReducer(p=>p+1,0),u=N.useMemo(()=>P2(e),[e.id,s]);return o(m,null,o(b.FormTitle,{className:z.top20},"Custom Name"),o(Zs,{value:r,onChange:p=>{e.name=p,i(p)},validate:p=>e.t==="Emoji"&&p.length>2&&p.length<32&&C2.test(p)||e.t==="Sticker"&&p.length>2&&p.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"}},u.map(p=>o(K,{text:p.name},({onMouseLeave:v,onMouseEnter:h})=>o("div",{onMouseLeave:v,onMouseEnter:h,role:"button","aria-label":"Clone to "+p.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),M2(p.id,e).finally(()=>{c(),n(!1)})}},p.icon?o("img",{"aria-hidden":!0,style:{borderRadius:"50%",width:"100%",height:"100%"},src:p.getIconURL(512,!0),alt:p.name}):o(b.FormText,{style:{fontSize:I2(p.acronym),width:"100%",overflow:"hidden",whiteSpace:"nowrap",textAlign:"center",cursor:t?"not-allowed":"pointer"}},p.acronym))))))}function na(e,t){return o(D.MenuItem,{id:"emote-cloner",key:"emote-cloner",label:`Clone ${e}`,action:()=>jr(async()=>{let n=await t(),r={t:e,...n},i=Lu(r);return s=>o(De,{...s},o(Ge,null,o("img",{role:"presentation","aria-hidden":!0,src:i,alt:"",height:24,width:24,style:{marginRight:"0.5em"}}),o(b.FormText,null,"Clone ",r.name)),o(He,null,o(N2,{data:r})))})})}function Xy(e){return new URL(e).pathname.endsWith(".gif")}var Wy,S2,b2,T2,I2,C2,qy,Ky,Eu,Jy=g(()=>{"use strict";a();l();It();Vc();M();xe();Qe();Je();x();B();w();Wy=1n<<30n,S2=ce("StickersStore"),b2=pe('"EMOJI_UPLOAD_START"',"GUILD_EMOJIS("),T2=[,"png","png","json","gif"];I2=e=>[20,20,18,18,16,14,12][e.length]??4,C2=/^\w+$/i;qy=(e,t)=>()=>{let{favoriteableId:n,itemHref:r,itemSrc:i,favoriteableType:s}=t??{};if(!n)return;let c=(()=>{switch(s){case"emoji":let u=t.message.content.match(RegExp(`|https://cdn\\.discordapp\\.com/emojis/${n}\\.`));if(!u)return;let p=u[1]??"FakeNitroEmoji";return na("Emoji",()=>({id:n,name:p,isAnimated:Xy(r??i)}));case"sticker":return t.message.stickerItems.find(h=>h.id===n)?.format_type===3?void 0:na("Sticker",()=>Yy(n))}})();c&&rt("copy-link",e)?.push(c)},Ky=(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(na("Emoji",()=>({id:n,name:r,isAnimated:s&&Xy(s.src)})))}else i==="sticker"&&!t.target.className?.includes("lottieCanvas")&&e.push(na("Sticker",()=>Yy(n)))},Eu=y({name:"EmoteCloner",description:"Allows you to clone Emotes & Stickers to your own server (right click them)",tags:["StickerCloner"],authors:[d.Ven,d.Nuckyz],start(){me("message",qy),me("expression-picker",Ky)},stop(){fe("message",qy),fe("expression-picker",Ky)}})});var Du,Ou,_u,Qy=g(()=>{"use strict";a();l();_();ae();Xr();M();Qe();x();B();w();Du=I("key","removeBuildOverride"),Ou=A({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}}),_u=y({name:"Experiments",description:"Enable Access to Experiments in Discord!",authors:[d.Megu,d.Ven,d.Nickyux,d.BanTheNons,d.Nuckyz],settings:Ou,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:()=>Ou.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:()=>Ou.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(N.Fragment,null,o(b.FormTitle,{tag:"h3"},"More Information"),o(b.FormText,{variant:"text-md/normal"},"You can enable client DevTools"," ",o("kbd",{className:Du.key},t)," +"," ",o("kbd",{className:Du.key},n)," +"," ",o("kbd",{className:Du.key},"O")," ","after enabling ",o("code",null,"isStaff")," below"),o(b.FormText,null,"and then toggling ",o("code",null,"Enable DevTools")," in the ",o("code",null,"Developer Options")," tab in settings."))},WarningCard:E.wrap(()=>o(Yn,{id:"vc-experiments-warning-card",className:z.bottom16},o(b.FormTitle,{tag:"h2"},"Hold on!!"),o(b.FormText,null,"Experiments are unreleased Discord features. They might not work, or even break your client or get your account disabled."),o(b.FormText,{className:z.top8},"Only use experiments if you know what you're doing. Vencord is not responsible for any damage caused by enabling experiments.")),{noop:!0})})});var Bu,Vy=g(()=>{"use strict";a();l();M();x();Bu=y({name:"F8Break",description:"Pause the client when you press F8 with DevTools (+ breakpoints) open.",authors:[d.lewisakura],start(){unsafeWindow.addEventListener("keydown",this.event)},stop(){unsafeWindow.removeEventListener("keydown",this.event)},event(e){if(e.code==="F8")debugger}})});var oa,ev,k2,tv,nv,ov,gi=g(()=>{"use strict";a();l();ln();oa=Gn(()=>import("https://unpkg.com/gifenc@1.0.3/dist/gifenc.esm.js")),ev=Gn(async()=>{let e={},t=new Proxy(unsafeWindow,{set:(n,r,i)=>e[r]=i});return Function("self",await f("https://cdnjs.cloudflare.com/ajax/libs/apng-canvas/2.1.1/apng-canvas.min.js").then(n=>n.text()))(t),e.APNG}),k2="https://unpkg.com/@vap/shiki-worker@0.0.8/dist",tv=`${k2}/index.min.js`,nv="https://unpkg.com/@vap/shiki@0.10.3/dist/onig.wasm",ov=Gn(()=>import("https://unpkg.com/stegcloak-dist@1.0.0/index.js"))});function iv(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 R2,A2,hi,Uu,rv,Ko,Yo,ra,L2,E2,Fu,$u,ia,Ce,Gu,sv=g(()=>{"use strict";a();l();Tn();_();M();gi();ot();ln();xe();x();B();w();R2=0,A2=pe("UPLOAD_FILE_LIMIT_ERROR"),hi=ce("UserSettingsProtoStore"),Uu=Ae(e=>e.ProtoClass?.typeName==="discord_protos.discord_users.v1.PreloadedUserSettings"),rv=I("readerFactory"),Ko=ce("StickersStore");Yo=ft(()=>iv("appearance",Uu.ProtoClass)),ra=ft(()=>iv("clientThemeSettings",Yo)),L2=1n<<18n,E2=1n<<37n,Fu=/\/emojis\/(\d+?)\.(png|webp|gif)/,$u=/\/stickers\/(\d+?)\./,ia=/\/attachments\/\d+?\/\d+?\/(\d+?)\.gif/,Ce=A({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}}),Gu=y({name:"FakeNitro",authors:[d.Arjix,d.D3SOX,d.Ven,d.obscurity,d.captain,d.Nuckyz,d.AutumnVN],description:"Allows you to stream in nitro quality, send fake emojis/stickers and use client themes.",dependencies:["MessageEventsAPI"],settings:Ce,patches:[{find:".PREMIUM_LOCKED;",predicate:()=>Ce.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:()=>Ce.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:()=>Ce.store.enableStickerBypass,replacement:{match:/canUseStickersEverywhere:function\(\i\){/,replace:"$&return true;"}},{find:'"SENDABLE"',predicate:()=>Ce.store.enableStickerBypass,replacement:{match:/(\w+)\.available\?/,replace:"true?"}},{find:"canStreamHighQuality:function",predicate:()=>Ce.store.enableStreamQualityBypass,replacement:["canUseHighVideoUploadQuality","canStreamHighQuality","canStreamMidQuality"].map(e=>({match:new RegExp(`${e}:function\\(\\i\\){`),replace:"$&return true;"}))},{find:"STREAM_FPS_OPTION.format",predicate:()=>Ce.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:()=>Ce.store.transformEmojis,match:/1!==(\i)\.length\|\|1!==\i\.length/,replace:(e,t)=>`${e}||$self.shouldKeepEmojiLink(${t}[0])`},{predicate:()=>Ce.store.transformEmojis||Ce.store.transformStickers,match:/(?=return{hasSpoilerEmbeds:\i,content:(\i)})/,replace:(e,t)=>`${t}=$self.patchFakeNitroEmojisOrRemoveStickersLinks(${t},arguments[2]?.formatInline);`}]},{find:"renderEmbeds=function",replacement:[{predicate:()=>Ce.store.transformEmojis||Ce.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:()=>Ce.store.transformStickers,match:/renderStickersAccessories=function\((\i)\){var (\i)=\(0,\i\.\i\)\(\i\),/,replace:(e,t,n)=>`${e}${n}=$self.patchFakeNitroStickers(${n},${t}),`},{predicate:()=>Ce.store.transformStickers,match:/renderAttachments=function\(\i\){var (\i)=\i.attachments.+?;/,replace:(e,t)=>`${e}${t}=$self.filterAttachments(${t});`}]},{find:".STICKER_IN_MESSAGE_HOVER,",predicate:()=>Ce.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:()=>Ce.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 El()?.id},get canUseEmotes(){return(U.getCurrentUser().premiumType??0)>0},get canUseStickers(){return(U.getCurrentUser().premiumType??0)>1},handleProtoChange(e,t){if(e==null||typeof e=="string"||!hi||!e.appearance&&!Yo)return;if((t?.premium_type??U?.getCurrentUser()?.premiumType??0)!==2&&(e.appearance??=Yo.create(),hi.settings.appearance?.theme!=null&&(e.appearance.theme=hi.settings.appearance.theme),hi.settings.appearance?.clientThemeSettings?.backgroundGradientPresetId?.value!=null&&ra)){let r=ra.create({backgroundGradientPresetId:{value:hi.settings.appearance.clientThemeSettings.backgroundGradientPresetId.value}});e.appearance.clientThemeSettings??=r,e.appearance.clientThemeSettings.backgroundGradientPresetId=r.backgroundGradientPresetId}},handleGradientThemeSelect(e,t,n){if((U?.getCurrentUser()?.premiumType??0)===2||e==null)return n();if(!Yo||!ra||!rv)return;let i=Uu.getCurrentValue().appearance,s=i!=null?Yo.fromBinary(Yo.toBinary(i),rv):Yo.create();s.theme=t;let c=ra.create({backgroundGradientPresetId:{value:e}});s.clientThemeSettings??=c,s.clientThemeSettings.backgroundGradientPresetId=c.backgroundGradientPresetId;let u=Uu.ProtoClass.create();u.appearance=s,O.dispatch({type:"USER_SETTINGS_PROTO_UPDATE",local:!0,partial:!0,settings:{type:1,proto:u}})},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")&&!Ce.store.transformCompoundSentence)return e;let n=e.length,r=u=>{if(Ce.store.transformEmojis){let p=u.props.href.match(Fu);if(p){let v=null;try{v=new URL(u.props.href)}catch{}let h=mn.getCustomEmojiById(p[1])?.name??v?.searchParams.get("name")??"FakeNitroEmoji";return Ne.defaultRules.customEmoji.react({jumboable:!t&&e.length===1&&typeof e[0].type!="string",animated:p[2]==="gif",emojiId:p[1],name:h,fake:!0},void 0,{key:String(n++)})}}if(Ce.store.transformStickers){if($u.test(u.props.href))return null;let p=u.props.href.match(ia);if(p&&Ko.getStickerById(p[1]))return null}return u},i=u=>u?.props?.trusted!=null?r(u):u?.props?.children!=null?Array.isArray(u.props.children)?(u.props.children=c(u.props.children),u.props.children.length===0?null:u):(u.props.children=s(u.props.children),u):u,s=u=>{let p=i(u);if(p?.type==="ul"||p?.type==="ol"){if(this.ensureChildrenIsArray(p),p.props.children.length===0)return null;let v=!1;for(let[h,S]of p.props.children.entries()){if(S==null){delete p.props.children[h];continue}this.ensureChildrenIsArray(S),S.props.children.length>0?v=!0:delete p.props.children[h]}if(!v)return null;p.props.children=this.clearEmptyArrayItems(p.props.children)}return p},c=u=>{for(let[p,v]of u.entries())u[p]=s(v);return u=this.clearEmptyArrayItems(u),this.trimContent(u),u};try{return c(unsafeWindow._.cloneDeep(e))}catch(u){return new X("FakeNitro").error(u),e}},patchFakeNitroStickers(e,t){let n=[],r=t.content.split(/\s/);Ce.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(!Ce.store.transformCompoundSentence&&!i.startsWith("http"))continue;let s=i.match($u);if(s){let u=null;try{u=new URL(i)}catch{}let p=Ko.getStickerById(s[1])?.name??u?.searchParams.get("name")??"FakeNitroSticker";e.push({format_type:1,id:s[1],name:p,fake:!0});continue}let c=i.match(ia);if(c){if(!Ko.getStickerById(c[1]))continue;let u=Ko.getStickerById(c[1])?.name??"FakeNitroSticker";e.push({format_type:2,id:c[1],name:u,fake:!0})}}return e},shouldIgnoreEmbed(e,t){let n=t.content.split(/\s/);if(n.length>1&&!Ce.store.transformCompoundSentence)return!1;switch(e.type){case"image":{if(!Ce.store.transformCompoundSentence&&!n.includes(e.url)&&!n.includes(e.image.proxyURL))return!1;if(Ce.store.transformEmojis&&Fu.test(e.url))return!0;if(Ce.store.transformStickers){if($u.test(e.url))return!0;let r=e.url.match(ia);if(r&&Ko.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(ia);return!(n&&Ko.getStickerById(n[1]))})},shouldKeepEmojiLink(e){return e.target&&Fu.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=J.getChannel(e);return!t||t.isDM()||t.isGroupDM()||t.isMultiUserDM()?!0:qe.can(L2,t)},hasPermissionToUseExternalStickers(e){let t=J.getChannel(e);return!t||t.isDM()||t.isGroupDM()||t.isMultiUserDM()?!0:qe.can(E2,t)},getStickerLink(e){return`https://media.discordapp.net/stickers/${e}.png?size=${C.plugins.FakeNitro.stickerSize}`},async sendAnimatedSticker(e,t,n){let[{parseURL:r},{GIFEncoder:i,quantize:s,applyPalette:c}]=await Promise.all([ev(),oa()]),{frames:u,width:p,height:v}=await r(e),h=new i,S=C.plugins.FakeNitro.stickerSize,T=document.createElement("canvas");T.width=S,T.height=S;let P=T.getContext("2d",{willReadFrequently:!0}),L=S/Math.max(p,v);P.scale(L,L);let k;for(let G of u){let{left:$,top:Y,width:ne,height:q,img:W,delay:oe,blendOp:H,disposeOp:Re}=G;k=P.getImageData($,Y,ne,q),H===0&&P.clearRect($,Y,ne,q),P.drawImage(W,$,Y,ne,q);let{data:re}=P.getImageData(0,0,S,S),$e=s(re,256),_e=c(re,$e);h.writeFrame(_e,S,S,{transparent:!0,palette:$e,delay:oe}),Re===1?P.clearRect($,Y,ne,q):Re===2&&P.putImageData(k,$,Y)}h.finish();let F=new File([h.bytesView()],`${t}.gif`,{type:"image/gif"});A2([F],J.getChannel(n),R2)},start(){let e=Ce.store;if(!e.enableEmojiBypass&&!e.enableStickerBypass)return;function t(n,r){return!n[r]||/\s/.test(n[r])?"":" "}this.preSend=ut((n,r,i)=>{let{guildId:s}=this;e:{if(!e.enableStickerBypass)break e;let c=Ko.getStickerById(i.stickers?.[0]);if(!c||"pack_id"in c)break e;let u=this.canUseStickers&&this.hasPermissionToUseExternalStickers(n);if(c.available!==!1&&(u||c.guild_id===s))break e;let p=this.getStickerLink(c.id);if(c.format_type===2)return this.sendAnimatedSticker(p,c.id,n),{cancel:!0};i.stickers.length=0,r.content+=` ${p}&name=${encodeURIComponent(c.name)}`}if(e.enableEmojiBypass){let c=this.canUseEmotes&&this.hasPermissionToUseExternalEmojis(n);for(let u of r.validNonShortcutEmojis){if(!u.require_colons||u.available!==!1&&c||u.guildId===s&&!u.animated)continue;let p=`<${u.animated?"a":""}:${u.originalName||u.name}:${u.id}>`,v=u.url.replace(/\?size=\d+/,"?"+new URLSearchParams({size:C.plugins.FakeNitro.emojiSize,name:encodeURIComponent(u.name)}));r.content=r.content.replace(p,(h,S,T)=>`${t(T,S-1)}${v}${t(T,S+h.length)}`)}}return{cancel:!1}}),this.preEdit=Vn((n,r,i)=>{if(!e.enableEmojiBypass)return;let s=this.canUseEmotes&&this.hasPermissionToUseExternalEmojis(n),{guildId:c}=this;i.content=i.content.replace(/(?/ig,(u,p,v,h)=>{let S=mn.getCustomEmojiById(p);if(S==null||!S.require_colons||S.available!==!1&&s||S.guildId===c&&!S.animated)return u;let T=S.url.replace(/\?size=\d+/,"?"+new URLSearchParams({size:C.plugins.FakeNitro.emojiSize,name:encodeURIComponent(S.name)}));return`${t(h,v-1)}${T}${t(h,v+u.length)}`})})},stop(){pt(this.preSend),eo(this.preEdit)}})});function av(...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,...c){return Reflect[i](n(c[0]),...c)};return new Proxy(t,r)}var lv,cv=g(()=>{"use strict";a();l();lv=av;typeof module<"u"&&(module.exports=av)});function D2(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 O2(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 uv,Hu,pv=g(()=>{"use strict";a();l();_();ae();M();Qe();he();x();w();cv();uv=A({nitroFirst:{description:"Default color source if both are present",type:4,options:[{label:"Nitro colors",value:!0,default:!0},{label:"Fake colors",value:!1}]}}),Hu=y({name:"FakeProfileThemes",description:"Allows profile theming by hiding the colors in your bio thanks to invisible 3y3 encoding",authors:[d.Alyxia,d.Remty],patches:[{find:"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(b.FormSection,null,o(b.FormTitle,{tag:"h3"},"Usage"),o(b.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:uv,colorDecodeHook(e){if(e){if(uv.store.nitroFirst&&e.themeColors)return e;let t=O2(e.bio);if(t)return lv(e,{premiumType:2,themeColors:t})}return e},addCopy3y3Button:E.wrap(function({primary:e,accent:t}){return o(R,{onClick:()=>{let n=D2(e,t);Xt(n)},color:R.Colors.PRIMARY,size:R.Sizes.XLARGE,className:z.left16},"Copy 3y3")},{noop:!0})})});var zu,dv=g(()=>{"use strict";a();l();M();x();w();zu=y({name:"FavoriteEmojiFirst",authors:[d.Aria,d.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=mn.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 ju,mv=g(()=>{"use strict";a();l();M();x();w();ju=y({name:"FixInbox",description:"Fixes the Unreads Inbox from crashing Discord when you're in lots of guilds.",authors:[d.Megu],patches:[{find:"INBOX_OPEN:function",replacement:{match:/INBOX_OPEN:function.+?\{/,replace:"$&return true;"}}],settingsAboutComponent(){return o(b.FormSection,null,o(b.FormTitle,{tag:"h3"},"What's the problem?"),o(b.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(b.FormTitle,{tag:"h3"},"How does it work?"),o(b.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 Wu,fv=g(()=>{"use strict";a();l();M();x();w();Wu=y({name:"ForceOwnerCrown",description:"Force the owner crown next to usernames even if the server is large.",authors:[d.D3SOX,d.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=de.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 qu,_2,Ku,gv=g(()=>{"use strict";a();l();Ft();M();x();B();w();qu=I("createFriendInvite"),_2=I("v4","v1"),Ku=y({name:"FriendInvites",description:"Create and manage friend invite links via slash commands (/create friend invite, /view friend invites, /revoke friend invites).",authors:[d.afn,d.Dziurwa],dependencies:["CommandsAPI"],commands:[{name:"create friend invite",description:"Generates a friend invite link.",inputType:3,execute:async(e,t)=>{if(!U.getCurrentUser().phone)return ie(t.channel.id,{content:"You need to have a phone number connected to your account to create a friend invite!"});let n=_2.v4(),r=await _t.post({url:"/friend-finder/find-friends",body:{modified_contacts:{[n]:[1,"",""]},phone_contact_methods_count:1}}).then(i=>qu.createFriendInvite({code:i.body.invite_suggestions[0][3],recipient_phone_number_or_email:n,contact_visibility:1,filter_visibilities:[],filtered_invite_suggestions_index:1}));ie(t.channel.id,{content:` - discord.gg/${r.code} \xB7 - Expires: \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 qu.getAllFriendInvites()).map(i=>` - _discord.gg/${i.code}_ \xB7 - Expires: \xB7 - Times used: \`${i.uses}/${i.max_uses}\` - `.trim().replace(/\s+/g," "));ie(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 qu.revokeFriendInvites(),void ie(t.channel.id,{content:"All friend invites have been revoked."}))}]})});var Zu={};ye(Zu,{getSettingStore:()=>hv,getSettingStoreLazy:()=>Yu});function hv(e,t){if(!C.plugins.SettingsStoreAPI.enabled)throw new Error("Cannot use SettingsStoreAPI without setting as dependency.");return B2?.find(n=>n?.settingsStoreApiGroup===e&&n?.settingsStoreApiName===t)}function Yu(e,t){return ft(()=>hv(e,t))}var B2,Xu=g(()=>{"use strict";a();l();ln();xe();B();_();B2=ft(()=>{let e=is('"textAndImages","renderSpoilers"');if(e==null)return new X("SettingsStoreAPI").error("Didn't find stores module.");let t=zt(e);if(t!=null)return Object.values(t).filter(n=>n?.settingsStoreApiGroup)})});var Ju,yv=g(()=>{a();l();(unsafeWindow.VencordStyles??=new Map).set("src/plugins/gameActivityToggle/style.css",{name:"src/plugins/gameActivityToggle/style.css",source:`[class*="withTagAsButton"] { - min-width: 88px; -} -`,classNames:{},dom:null});Ju="src/plugins/gameActivityToggle/style.css"});function $2(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 U2(){let e=vv?.useSetting();return o(F2,{tooltipText:e?"Disable Game Activity":"Enable Game Activity",icon:$2(e),role:"switch","aria-checked":!e,onClick:()=>vv?.updateSetting(t=>!t)})}var vv,F2,Qu,Sv=g(()=>{"use strict";a();l();Xu();ze();ae();M();x();B();yv();vv=Yu("status","showCurrentGame"),F2=pe("Button.Sizes.NONE,disabled:");Qu=y({name:"GameActivityToggle",description:"Adds a button next to the mic and deafen button to toggle game activity.",authors:[d.Nuckyz],dependencies:["SettingsStoreAPI"],patches:[{find:".Messages.ACCOUNT_SPEAKING_WHILE_MUTED",replacement:{match:/this\.renderNameZone\(\).+?children:\[/,replace:"$&$self.GameActivityToggleButton(),"}}],GameActivityToggleButton:E.wrap(U2,{noop:!0}),start(){Ve(Ju)},stop(){Ct(Ju)}})});var G2,Vu,bv=g(()=>{"use strict";a();l();M();ot();x();B();G2=Ze('name:"expression-picker-last-active-view"',{close:Z.byCode("activeView:null","setState")}),Vu=y({name:"GifPaste",description:"Makes picking a gif in the gif picker insert a link into the chatbox instead of instantly sending it",authors:[d.Ven],patches:[{find:".handleSelectGIF=",replacement:{match:/\.handleSelectGIF=function.+?\{/,replace:".handleSelectGIF=function(gif){return $self.handleSelect(gif);"}}],handleSelect(e){e&&(jn(e.url+" "),G2.close())}})});var ep={};ye(ep,{_buildPopoverElements:()=>z2,addButton:()=>xn,buttons:()=>sa,removeButton:()=>wn});function xn(e,t){sa.set(e,t)}function wn(e){sa.delete(e)}function z2(e,t){let n=[];for(let[r,i]of sa.entries())try{let s=i(e);s&&(s.key??=r,n.push(t(s)))}catch(s){H2.error(`[${r}]`,s)}return n}var H2,sa,Zo=g(()=>{"use strict";a();l();xe();H2=new X("MessagePopover"),sa=new Map});var yi,xv,vi,Tv,j2,tp,wv=g(()=>{"use strict";a();l();kn();Zo();Fn();M();x();w();xv="HideAttachments_HiddenIds",vi=new Set,Tv=()=>et(xv).then(e=>(vi=e??new Set,vi)),j2=e=>tt(xv,e),tp=y({name:"HideAttachments",description:"Hide attachments and Embeds for individual messages via hover button",authors:[d.Ven],dependencies:["MessagePopoverAPI"],async start(){yi=document.createElement("style"),yi.id="VencordHideAttachments",document.head.appendChild(yi),await Tv(),await this.buildCss(),xn("HideAttachments",e=>{if(!e.attachments.length&&!e.embeds.length)return null;let t=vi.has(e.id);return{label:t?"Show Attachments":"Hide Attachments",icon:t?Js:Qs,message:e,channel:J.getChannel(e.channel_id),onClick:()=>this.toggleHide(e.id)}})},stop(){yi.remove(),vi.clear(),wn("HideAttachments")},async buildCss(){let e=[...vi].map(t=>`#message-accessories-${t}`).join(",");yi.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 Tv();t.delete(e)||t.add(e),await j2(t),await this.buildCss()}})});var np,Pv=g(()=>{"use strict";a();l();M();x();np=y({name:"iLoveSpam",description:"Do not hide messages from 'likely spammers'",authors:[d.botato,d.Animal],patches:[{find:"),{hasFlag:",replacement:{match:/(if\((.{1,2})<=1<<30\)return)/,replace:"if($2===(1<<20)){return false};$1"}}]})});function K2(){return o("svg",{className:vr.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:vr.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:vr.fill,x:"3",y:"26",width:"26",height:"2",transform:"rotate(-45 2 20)"})))}function Y2({forceWhite:e}){return o("svg",{className:vr.overlayToggleIconOn,height:"24",width:"24",viewBox:"0 2.2 32 26"},o("path",{className:e?"":vr.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 Iv({activity:e,forceWhite:t,forceLeftMargin:n}){let r=Dt();return o(K,{text:"Toggle activity"},({onMouseLeave:i,onMouseEnter:s})=>o("div",{onMouseLeave:i,onMouseEnter:s,className:vr.overlayToggleIcon,role:"button","aria-label":"Toggle activity",tabIndex:0,style:n?{marginLeft:"2px"}:void 0,onClick:c=>X2(c,e,r)},tn.has(e.id)?o(K2,null):o(Y2,{forceWhite:t})))}function Z2({activity:e}){return o("div",{className:`${W2.tryItOutBadge} ${q2.baseShapeRound}`,style:{padding:"0px 2px",height:28}},o(Iv,{activity:e,forceWhite:!0}))}function X2(e,t,n){e.stopPropagation(),tn.has(t.id)?tn.delete(t.id):tn.set(t.id,t),n(),op()}async function op(){await tt("IgnoreActivities_ignoredActivities",tn)}var vr,W2,q2,Mv,tn,rp,Cv=g(()=>{"use strict";a();l();kn();ae();M();be();x();B();w();vr=I("overlayToggleIconOff","overlayToggleIconOn"),W2=I("tryItOutBadge","tryItOutBadgeIcon"),q2=I("baseShapeRound","baseShapeRoundLeft","baseShapeRoundRight"),Mv=ce("RunningGameStore");tn=new Map,rp=y({name:"IgnoreActivities",authors:[d.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 et("IgnoreActivities_ignoredActivities")??new Map;if(Array.isArray(e)){for(let t of e)tn.set(t,{id:t,type:0});await op()}else tn=e;if(tn.size!==0){let t=Mv.getGamesSeen();for(let n of tn.values())n.type===0&&(t.some(r=>r.id===n.id||r.exePath===n.id)||tn.delete(n.id));await op()}},renderToggleGameActivityButton(e){return o(E,{noop:!0},o(Iv,{activity:{id:e.id??e.exePath,type:0},forceLeftMargin:!0}))},renderToggleActivityButton(e){return o(E,{noop:!0},o(Z2,{activity:{id:e.id,type:1}}))},isActivityNotIgnored(e){if(e.type===0){if(e.application_id!==void 0)return!tn.has(e.application_id);{let t=Mv.getRunningGames().find(n=>n.name===e.name)?.exePath;if(t)return!tn.has(t)}}return!0}})});var Si,ip=g(()=>{"use strict";a();l();Si="vc-imgzoom-magnify-modal"});function sp(e,t){e()?t():requestAnimationFrame(()=>sp(e,t))}var Nv=g(()=>{"use strict";a();l()});var J2,ap,kv=g(()=>{"use strict";a();l();ze();w();ip();lp();Nv();J2=Oe("vc-imgzoom-"),ap=({instance:e,size:t,zoom:n})=>{let[r,i]=te(!1),[s,c]=te({x:0,y:0}),[u,p]=te({x:0,y:0}),[v,h]=te(0),S=Qt(!1),T=Qt(n),P=Qt(t),L=Qt(null),k=Qt(null),F=Qt(null),G=Qt(null);if(N.useLayoutEffect(()=>{let Y=re=>{re.key==="Shift"&&(S.current=!0)},ne=re=>{re.key==="Shift"&&(S.current=!1)},q=()=>{k.current.currentTime=F.current.currentTime},W=re=>{if(e.state.mouseOver&&e.state.mouseDown){let $e=P.current/2,_e={x:re.pageX,y:re.pageY},dt=-((_e.x-L.current.getBoundingClientRect().left)*T.current-$e),Ke=-((_e.y-L.current.getBoundingClientRect().top)*T.current-$e);c({x:re.x-$e,y:re.y-$e}),p({x:dt,y:Ke}),h(1)}else h(0)},oe=re=>{e.state.mouseOver&&re.button===0&&(T.current=Pe.store.zoom,P.current=Pe.store.size,document.getElementById("image-context")&&O.dispatch({type:"CONTEXT_MENU_CLOSE"}),W(re),h(1))},H=()=>{h(0),Pe.store.saveZoomValues&&(Pe.store.zoom=T.current,Pe.store.size=P.current)},Re=async re=>{if(e.state.mouseOver&&e.state.mouseDown&&!S.current){let $e=T.current+re.deltaY/100*(Pe.store.invertScroll?-1:1)*Pe.store.zoomSpeed;T.current=$e<=1?1:$e,W(re)}if(e.state.mouseOver&&e.state.mouseDown&&S.current){let $e=P.current+re.deltaY*(Pe.store.invertScroll?-1:1)*Pe.store.zoomSpeed;P.current=$e<=50?50:$e,W(re)}};return sp(()=>e.state.readyState==="READY",()=>{let re=document.getElementById(Si);L.current=re,re.firstElementChild.setAttribute("draggable","false"),e.props.animated&&(F.current=re.querySelector("video"),F.current.addEventListener("timeupdate",q)),i(!0)}),document.addEventListener("keydown",Y),document.addEventListener("keyup",ne),document.addEventListener("mousemove",W),document.addEventListener("mousedown",oe),document.addEventListener("mouseup",H),document.addEventListener("wheel",Re),()=>{document.removeEventListener("keydown",Y),document.removeEventListener("keyup",ne),document.removeEventListener("mousemove",W),document.removeEventListener("mousedown",oe),document.removeEventListener("mouseup",H),document.removeEventListener("wheel",Re),Pe.store.saveZoomValues&&(Pe.store.zoom=T.current,Pe.store.size=P.current)}},[]),!r)return null;let $=L.current.getBoundingClientRect();return o("div",{className:J2("lens",{"nearest-neighbor":Pe.store.nearestNeighbour,square:Pe.store.square}),style:{opacity:v,width:P.current+"px",height:P.current+"px",transform:`translate(${s.x}px, ${s.y}px)`}},e.props.animated?o("video",{ref:k,style:{position:"absolute",left:`${u.x}px`,top:`${u.y}px`},width:`${$.width*T.current}px`,height:`${$.height*T.current}px`,poster:e.props.src,src:F.current?.src??e.props.src,autoPlay:!0,loop:!0}):o("img",{ref:G,style:{position:"absolute",transform:`translate(${u.x}px, ${u.y}px)`},width:`${$.width*T.current}px`,height:`${$.height*T.current}px`,src:e.props.src,alt:""}))}});var cp,Rv=g(()=>{a();l();(unsafeWindow.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});cp="src/plugins/imageZoom/styles.css"});var Pe,Av,up,lp=g(()=>{"use strict";a();l();It();_();ze();js();M();rr();x();w();kv();ip();Rv();Pe=A({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:gr(1,50,4),default:2,stickToMarkers:!1},size:{description:"Radius / Size of the lens",type:5,markers:gr(50,1e3,50),default:100,stickToMarkers:!1},zoomSpeed:{description:"How fast the zoom / lens size changes",type:5,markers:gr(.1,5,.2),default:.5,stickToMarkers:!1}}),Av=e=>()=>{e.push(o(D.MenuGroup,{id:"image-zoom"},o(D.MenuCheckboxItem,{id:"vc-square",label:"Square Lens",checked:Pe.store.square,action:()=>{Pe.store.square=!Pe.store.square,pn.close()}}),o(D.MenuControlItem,{id:"vc-zoom",label:"Zoom",control:(t,n)=>o(D.MenuSliderControl,{ref:n,...t,minValue:1,maxValue:50,value:Pe.store.zoom,onChange:Et(r=>Pe.store.zoom=r,100)})}),o(D.MenuControlItem,{id:"vc-size",label:"Lens Size",control:(t,n)=>o(D.MenuSliderControl,{ref:n,...t,minValue:50,maxValue:1e3,value:Pe.store.size,onChange:Et(r=>Pe.store.size=r,100)})}),o(D.MenuControlItem,{id:"vc-zoom-speed",label:"Zoom Speed",control:(t,n)=>o(D.MenuSliderControl,{ref:n,...t,minValue:.1,maxValue:5,value:Pe.store.zoomSpeed,onChange:Et(r=>Pe.store.zoomSpeed=r,100),renderValue:r=>`${r.toFixed(3)}x`})})))},up=y({name:"ImageZoom",description:"Lets you zoom in to images and gifs. Use scroll wheel to zoom in and shift + scroll wheel to increase lens radius / size",authors:[d.Aria],tags:["ImageUtilities"],patches:[{find:'"renderLinkComponent","maxWidth"',replacement:{match:/(return\(.{1,100}\(\)\.wrapper.{1,100})(src)/,replace:`$1id: '${Si}',$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:Pe,currentMagnifierElement:null,element:null,Magnifier:ap,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===Si&&(this.currentMagnifierElement||(this.currentMagnifierElement=o(ap,{size:Pe.store.size,zoom:Pe.store.zoom,instance:e}),this.root=Fo.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(){Ve(cp),me("image-context",Av),this.element=document.createElement("div"),this.element.classList.add("MagnifierContainer"),document.body.appendChild(this.element)},stop(){Ct(cp),this.root&&this.root.unmount(),this.element?.remove(),fe("image-context",Av)}})});function Q2(e){let t=e?.message?.content,[n,r]=N.useState("password");return o(De,{...e},o(Ge,null,o(b.FormTitle,{tag:"h4"},"Decrypt Message")),o(He,null,o(b.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Secret"),o(Le,{defaultValue:t,disabled:!0}),o(b.FormTitle,{tag:"h5"},"Password"),o(Le,{style:{marginBottom:"20px"},onChange:r})),o(wt,null,o(R,{color:R.Colors.GREEN,onClick:()=>{let i=pp(t,n,!0);!i||!e?.message||(Vencord.Plugins.plugins.InvisibleChat.buildEmbed(e?.message,i),e.onClose())}},"Decrypt"),o(R,{color:R.Colors.TRANSPARENT,look:R.Looks.LINK,style:{left:15,position:"absolute"},onClick:e.onClose},"Cancel")))}function Lv(e){ke(t=>o(Q2,{...t,...e}))}var Ev=g(()=>{"use strict";a();l();Je();w();aa()});function V2(e){let[t,n]=N.useState(""),[r,i]=N.useState(""),[s,c]=N.useState("password"),[u,p]=N.useState(!1),v=t&&(u||r&&/\w \w/.test(r));return o(De,{...e},o(Ge,null,o(b.FormTitle,{tag:"h4"},"Encrypt Message")),o(He,null,o(b.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Secret"),o(Le,{onChange:h=>{n(h)}}),o(b.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Cover (2 or more Words!!)"),o(Le,{disabled:u,onChange:h=>{i(h)}}),o(b.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Password"),o(Le,{style:{marginBottom:"20px"},defaultValue:"password",onChange:h=>{c(h)}}),o(ht,{value:u,onChange:h=>{p(h)}},"Don't use a Cover")),o(wt,null,o(R,{color:R.Colors.GREEN,disabled:!v,onClick:()=>{if(!v)return;let h=_v(t,s,u?"d d":r),S=u?h.replaceAll("d",""):h;!S||(jn(S),e.onClose())}},"Send"),o(R,{color:R.Colors.TRANSPARENT,look:R.Looks.LINK,style:{left:15,position:"absolute"},onClick:()=>{e.onClose()}},"Cancel")))}function Dv(){ke(e=>o(V2,{...e}))}var Ov=g(()=>{"use strict";a();l();ot();Je();w();aa()});function eP(){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 tP(){return o(K,{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 nP(e){return e.type.analyticsName!=="normal"?null:o(K,{text:"Encrypt Message"},({onMouseEnter:t,onMouseLeave:n})=>o("div",{style:{display:"flex"}},o(R,{"aria-haspopup":"dialog","aria-label":"Encrypt Message",size:"",look:Jt.BLANK,onMouseEnter:t,onMouseLeave:n,innerClassName:gt.button,onClick:()=>Dv(),style:{padding:"0 2px",scale:"0.9"}},o("div",{className:gt.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 _v(e,t,n){return dp.hide(e+"\u200B",t,n)}function pp(e,t,n){let r=dp.reveal(e,t);return n?r.replace("\u200B",""):r}function oP(e){return e.endsWith("\u200B")}async function rP(e){let t=Bv.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{"use strict";a();l();Zo();_();ae();M();gi();x();w();Ev();Ov();Bv=A({savedPasswords:{type:0,default:"password, Password",description:"Saved Passwords (Seperated with a , )"}}),mp=y({name:"InvisibleChat",description:"Encrypt your Messages in a non-suspicious way!",authors:[d.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:Bv,async start(){let{default:e}=await ov();dp=new e(!0,!1),xn("invDecrypt",t=>this.INV_REGEX.test(t?.content)?{label:"Decrypt Message",icon:this.popOverIcon,message:t,channel:J.getChannel(t.channel_id),onClick:async()=>{await rP(t).then(n=>n?void this.buildEmbed(t,n):void Lv({message:t}))}}:null)},stop(){wn("invDecrypt")},async getEmbed(e){let{body:t}=await _t.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=>{O.dispatch({type:"MESSAGE_UPDATE",message:e})},chatBarIcon:E.wrap(nP,{noop:!0}),popOverIcon:()=>o(eP,null),indicator:E.wrap(tP,{noop:!0})})});function Fv(e,t){!J.hasChannel(t)||zr.transitionTo(`/channels/${e??"@me"}/${t}`)}var la,nn,fp,$v=g(()=>{"use strict";a();l();kn();M();x();w();la=!1;fp=y({name:"KeepCurrentChannel",description:"Attempt to navigate to the channel you were in before switching accounts or loading Discord.",authors:[d.Nuckyz],flux:{LOGOUT(e){({isSwitchingAccount:la}=e)},CONNECTION_OPEN(){!la||(la=!1,nn?.channelId&&Fv(nn.guildId,nn.channelId))},async CHANNEL_SELECT({guildId:e,channelId:t}){la||(nn={guildId:e,channelId:t},await tt("KeepCurrentChannel_previousData",nn))}},async start(){nn=await et("KeepCurrentChannel_previousData"),nn?nn.channelId&&Fv(nn.guildId,nn.channelId):(nn={guildId:uo.getGuildId(),channelId:Ie.getChannelId()??null},await tt("KeepCurrentChannel_previousData",nn))}})});async function gp(e){return(await aP.getAsset(hp,[e,void 0]))[0]}function lP(e){O.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e,socketId:"LastFM"})}var hp,iP,Uv,sP,aP,Pn,yp,Gv=g(()=>{"use strict";a();l();_();xo();M();xe();x();B();w();hp="1108588077900898414",iP="2a96cbd8b46e442fc41c2b86b821562f",Uv=new X("LastFMRichPresence"),sP=I("getLocalPresence"),aP=Ze("getAssetImage: size must === [number, number] for Twitch",{getAsset:Z.byCode("apply(")});Pn=A({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"}]}}),yp=y({name:"LastFMRichPresence",description:"Little plugin for Last.fm rich presence",authors:[d.dzshn,d.RuiNtD],settingsAboutComponent:()=>o(m,null,o(b.FormTitle,{tag:"h3"},"How to get an API key"),o(b.FormText,null,"An API key is required to fetch your current track. To get one, you can visit ",o(ct,{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:Pn,start(){this.updatePresence(),this.updateInterval=setInterval(()=>{this.updatePresence()},16e3)},stop(){clearInterval(this.updateInterval)},async fetchTrackData(){if(!Pn.store.username||!Pn.store.apiKey)return null;try{let e=new URLSearchParams({method:"user.getrecenttracks",api_key:Pn.store.apiKey,user:Pn.store.username,limit:"1",format:"json"}),t=await f(`https://ws.audioscrobbler.com/2.0/?${e}`);if(!t.ok)throw`${t.status} ${t.statusText}`;let n=await t.json();if(n.error)return Uv.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 Uv.error("Failed to query Last.fm API",e),null}},async updatePresence(){lP(await this.getActivity())},getLargeImage(e){if(e.imageUrl&&!e.imageUrl.includes(iP))return e.imageUrl;if(Pn.store.missingArt==="placeholder")return"placeholder"},async getActivity(){if(Pn.store.hideWithSpotify){for(let i of sP.getActivities())if(i.type===2&&i.application_id!==hp)return null}let e=await this.fetchTrackData();if(!e)return null;let t=this.getLargeImage(e),n=t?{large_image:await gp(t),large_text:e.album||void 0,small_image:await gp("lastfm-small"),small_text:"Last.fm"}:{large_image:await gp("lastfm-large"),large_text:e.album||void 0},r=[{label:"View Song",url:e.url}];return Pn.store.shareUsername&&r.push({label:"Last.fm Profile",url:`https://www.last.fm/user/${Pn.store.username}`}),{application_id:hp,name:Pn.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:Pn.store.useListeningStatus?2:0,flags:1}}})});var Hv,vp,zv=g(()=>{"use strict";a();l();M();x();Hv=["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"],vp=y({name:"LoadingQuotes",description:"Replace Discords loading quotes",authors:[d.Ven,d.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(Hv[Math.floor(Math.random()*Hv.length)])}})});function cP(){let{id:e,guild_id:t}=Ue([Ie],()=>lr()),{groups:n}=Ue([Wv],()=>Wv.getProps(t,e)),r=Ue([jv],()=>jv.getMemberCount(t));if(r==null)return null;let i=n.length===1&&n[0].id==="unknown"?0:n.reduce((s,c)=>s+(c.id==="offline"?0:c.count),0);return o(ue,{id:"vc-membercount",style:{marginTop:"1em",marginBottom:"-.5em",paddingInline:"1em",justifyContent:"center",alignContent:"center",gap:0}},o(K,{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(K,{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 jv,Wv,Sp,qv=g(()=>{"use strict";a();l();ae();Mt();M();ot();x();B();w();jv=ce("GuildMemberCountStore"),Wv=ce("ChannelMemberStore");Sp=y({name:"MemberCount",description:"Shows the amount of online & total members in the server member list",authors:[d.Ven,d.Commandtechno],patches:[{find:".isSidebarVisible,",replacement:{match:/(var (\i)=\i\.className.+?children):\[(\i\.useMemo[^}]+"aria-multiselectable")/,replace:"$1:[$2.startsWith('members')?$self.render():null,$3"}}],render:E.wrap(cP,{noop:!0})})});var bp,Kv,Yv,uP,bi,Tp,Zv=g(()=>{"use strict";a();l();Tn();_();M();x();B();w();bp=!1,Kv=e=>e.key==="Backspace"&&(bp=!0),Yv=e=>e.key==="Backspace"&&(bp=!1),uP=1n<<4n,bi=A({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}}),Tp=y({name:"MessageClickActions",description:"Hold Backspace and click to delete, double click to edit/reply",authors:[d.Ven],dependencies:["MessageEventsAPI"],settings:bi,start(){let e=I("deleteMessage","startEditMessage"),t=I("isEditing","isEditingAny");document.addEventListener("keydown",Kv),document.addEventListener("keyup",Yv),this.onClick=bu((n,r,i)=>{let s=n.author.id===U.getCurrentUser().id;if(bp)bi.store.enableDeleteOnClick&&(s||qe.can(uP,r))&&(n.deleted?O.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||bi.store.requireModifier&&!i.ctrlKey&&!i.shiftKey)return;if(s){if(!bi.store.enableDoubleClickToEdit||t.isEditing(r.id,n.id))return;e.startEditMessage(r.id,n.id,n.content),i.preventDefault()}else{if(!bi.store.enableDoubleClickToReply)return;O.dispatch({type:"CREATE_PENDING_REPLY",channel:r,message:n,shouldMention:!C.plugins.NoReplyMention.enabled,showMentionToggle:r.guild_id!==null})}}})},stop(){Tu(this.onClick),document.removeEventListener("keydown",Kv),document.removeEventListener("keyup",Yv)}})});var wp={};ye(wp,{_modifyAccessories:()=>pP,accessories:()=>ca,addAccessory:()=>Ti,removeAccessory:()=>xp});function Ti(e,t,n){ca.set(e,{callback:t,position:n})}function xp(e){ca.delete(e)}function pP(e,t){for(let n of ca.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 ca,ua=g(()=>{"use strict";a();l();ca=new Map});async function gP(e,t){let n=Sr.get(t);if(n)return n.message;Sr.set(t,{fetched:!1});let i=(await _t.get({url:`/channels/${e}/messages`,query:{limit:1,around:t},retries:2}).catch(()=>null))?.body?.[0];if(!i)return;let s=dn.getMessages(i.channel_id).receiveMessage(i).get(i.id);return Sr.set(s.id,{message:s,fetched:!0}),s}function hP(e){let t=[];for(let{content_type:n,height:r,width:i,url:s,proxy_url:c}of e.attachments??[])n?.startsWith("image/")&&t.push({height:r,width:i,url:s,proxyURL:c});for(let{type:n,image:r,thumbnail:i,url:s}of e.embeds??[])n==="image"?t.push({...r??i}):s&&n==="gifv"&&!Qv.test(s)&&t.push({height:i.height,width:i.width,url:s});return t}function yP(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 vP(e){return!!(e.components.length||e.attachments.some(t=>!t.content_type?.startsWith("image/"))||e.embeds.some(t=>t.type!=="image"&&(t.type!=="gifv"||Qv.test(t.url))))}function SP(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 bP(e,t){return new Proxy(e,{get(n,r){return r==="vencordEmbeddedBy"?t:Reflect.get(...arguments)}})}function TP({message:e}){let t=e.vencordEmbeddedBy??[],n=[],r=null;for(;(r=Pp.exec(e.content))!==null;){let[i,s,c,u]=r;if(t.includes(u))continue;let p=J.getChannel(c);if(!p||s!=="@me"&&!qe.can(1024n,p))continue;let v=Sr.get(u)?.message;if(!v)if(v??=dn.getMessage(c,u),v)Sr.set(u,{message:v,fetched:!0});else{let T={...e};delete T.embeds,delete T.interaction,fP.push(()=>gP(c,u).then(P=>P&&O.dispatch({type:"MESSAGE_UPDATE",message:T})));continue}let h={message:bP(v,[...t,e.id]),channel:p,guildID:s},S=Mp.store.automodEmbeds;n.push(S==="always"||S==="prefer"&&!vP(v)?o(wP,{...h}):o(xP,{...h}))}return n.length?o(m,null,n):null}function xP({message:e,channel:t,guildID:n}){let r=n==="@me",i=!r&&de.getGuild(t.guild_id),s=U.getUser(J.getChannel(t.id).recipients?.[0]);return o(dP,{embed:{rawDescription:"",color:"var(--background-secondary)",author:{name:o(ee,{variant:"text-xs/medium",tag:"span"},o("span",null,r?"Direct Message - ":i.name+" - "),r?Ne.parse(`<@${s.id}>`):Ne.parse(`<#${t.id}>`)),iconProxyURL:i?`https://${unsafeWindow.GLOBAL_ENV.CDN_HOST}/icons/${i.id}/${i.icon}.png`:`https://${unsafeWindow.GLOBAL_ENV.CDN_HOST}/avatars/${s.id}/${s.avatar}`}},renderDescription:()=>o("div",{key:e.id,className:V(Xv.message,Mp.store.messageBackgroundColor&&Xv.searchResult)},o(mP,{id:`message-link-embeds-${e.id}`,message:e,channel:t,subscribeToComponentDispatch:!1}))})}function wP(e){let{message:t,channel:n,guildID:r}=e,i=r==="@me",s=hP(t),{parse:c}=Ne;return o(Jv,{channel:n,childrenAccessories:o(ee,{color:"text-muted",variant:"text-xs/medium",tag:"span"},c(i?`<@${J.getChannel(n.id).recipients[0]}>`:`<#${n.id}>`),o("span",null,i?" - Direct Message":" - "+de.getGuild(n.guild_id)?.name)),compact:!1,content:o(m,null,t.content||t.attachments.length<=s.length?c(t.content):[yP(t.attachments.length,t.embeds.length)],s.map(u=>{let{width:p,height:v}=SP(u.width,u.height);return o("div",null,o("img",{src:u.url,width:p,height:v}))})),hideTimestamp:!1,message:t,_messageEmbed:"automod"})}var Sr,dP,mP,Xv,Jv,Pp,Qv,fP,Mp,Ip,Vv=g(()=>{"use strict";a();l();ua();_();ae();M();he();cr();be();x();B();w();Sr=new Map,dP=se(()=>We(".inlineMediaEmbed")),mP=se(()=>jt(e=>e.type?.toString()?.includes('["message","compact","className",'))),Xv=I("message","searchResult"),Jv=()=>null,Pp=/(?o(R,{onClick:()=>Sr.clear()},"Clear the linked message cache")}});Ip=y({name:"MessageLinkEmbeds",description:"Adds a preview to messages that link another message",authors:[d.TheSun,d.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){Jv=e},settings:Mp,start(){Ti("messageLinkEmbed",e=>Pp.test(e.message.content)?(Pp.lastIndex=0,o(E,null,o(TP,{message:e.message}))):null,4)}})});var e1=g(()=>{});var Cp,t1=g(()=>{a();l();(unsafeWindow.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});Cp="src/plugins/messageLogger/deleteStyleOverlay.css"});var Np,n1=g(()=>{a();l();(unsafeWindow.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});Np="src/plugins/messageLogger/deleteStyleText.css"});function o1(){C.plugins.MessageLogger.deleteStyle==="text"?(Ve(Np),Ct(Cp)):(Ct(Np),Ve(Cp))}var PP,r1,i1,s1,kp,a1=g(()=>{"use strict";a();l();e1();It();_();ze();ae();M();xe();x();B();w();t1();n1();PP=I("edited","communicationDisabled","isSystemMessage");r1="ml-remove-history",i1="ml-toggle-style",s1=(e,t)=>()=>{let{message:n}=t,{deleted:r,editHistory:i,id:s,channel_id:c}=n;if(!r&&!i?.length)return;e:{if(!r)break e;let u=document.getElementById(`chat-messages-${c}-${s}`);if(!u)break e;e.push(o(D.MenuItem,{id:i1,key:i1,label:"Toggle Deleted Highlight",action:()=>u.classList.toggle("messagelogger-deleted")}))}e.push(o(D.MenuItem,{id:r1,key:r1,label:"Remove Message History",color:"danger",action:()=>{r?O.dispatch({type:"MESSAGE_DELETE",channelId:c,id:s,mlDeleted:!0}):n.editHistory=[]}}))},kp=y({name:"MessageLogger",description:"Temporarily logs deleted and edited messages.",authors:[d.rushii,d.Ven],start(){o1(),me("message",s1)},stop(){fe("message",s1)},renderEdit(e){return o(E,{noop:!0},o("div",{className:"messagelogger-edited"},Ne.parse(e.content),o(An,{timestamp:e.timestamp,isEdited:!0,isInline:!1},o("span",{className:PP.edited}," ","(",at.Messages.MESSAGE_EDITED,")"))))},makeEdit(e,t){return{timestamp:Vt?.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:()=>o1()},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 p=function(v){let h=e.get(v);if(!h)return;let S=64;t.mlDeleted||(h.flags&S)===S||i&&h.author?.bot||s&&h.author?.id===u||c.includes(h.author?.id)?e=e.remove(v):e=e.update(v,P=>P.set("deleted",!0).set("attachments",P.attachments.map(L=>(L.deleted=!0,L))))};var r=p;if(e==null||!n&&!e.has(t.id))return e;let{ignoreBots:i,ignoreSelf:s,ignoreUsers:c}=C.plugins.MessageLogger,u=U.getCurrentUser().id;n?t.ids.forEach(p):p(t.id)}catch(i){new X("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 l1(e){hr({name:e.name,description:e.name,inputType:1,execute:async(t,n)=>await pa(e.name)?(C.plugins.MessageTags.clyde&&ie(n.channel.id,{author:$n,content:`${Po} The tag **${e.name}** has been sent!`}),{content:e.message.replaceAll("\\n",` -`)}):(ie(n.channel.id,{author:$n,content:`${Po} The tag **${e.name}** does not exist anymore! Please reload ur Discord to fix :)`}),{content:`/${e.name}`}),[MP]:!0},"CustomTags")}var Po,ma,MP,$n,da,pa,IP,CP,Rp,c1=g(()=>{"use strict";a();l();Ft();kn();_();M();x();Po="<:luna:1035316192220553236>",ma="MessageTags_TAGS",MP=Symbol("MessageTags"),$n={id:"821472922140803112",bot:!1},da=()=>et(ma).then(e=>e??[]),pa=e=>et(ma).then(t=>(t??[]).find(n=>n.name===e)??null),IP=async e=>{let t=await da();return t.push(e),tt(ma,t),t},CP=async e=>{let t=await da();return t=await t.filter(n=>n.name!==e),tt(ma,t),t};Rp=y({name:"MessageTags",description:"Allows you to save messages and to use them with a simple command.",authors:[d.Luna],options:{clyde:{name:"Clyde message on send",description:"If enabled, clyde will send you an ephemeral message when a tag was used.",type:3,default:!0}},dependencies:["CommandsAPI"],async start(){for(let e of await da())l1(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=Be(e[0].options,"tag-name",""),r=Be(e[0].options,"message","");if(await pa(n))return ie(t.channel.id,{author:$n,content:`${Po} A Tag with the name **${n}** already exists!`});let i={name:n,enabled:!0,message:r};l1(i),await IP(i),ie(t.channel.id,{author:$n,content:`${Po} Successfully created the tag **${n}**!`});break}case"delete":{let n=Be(e[0].options,"tag-name","");if(!await pa(n))return ie(t.channel.id,{author:$n,content:`${Po} A Tag with the name **${n}** does not exist!`});ui(n),await CP(n),ie(t.channel.id,{author:$n,content:`${Po} Successfully deleted the tag **${n}**!`});break}case"list":{ie(t.channel.id,{author:$n,embeds:[{title:"All Tags:",description:(await da()).map(n=>`\`${n.name}\`: ${n.message.slice(0,72).replaceAll("\\n"," ")}${n.message.length>72?"...":""}`).join(` -`)||`${Po} Woops! There are no tags yet, use \`/tags create\` to create one!`,color:14122879,type:"rich"}]});break}case"preview":{let n=Be(e[0].options,"tag-name",""),r=await pa(n);if(!r)return ie(t.channel.id,{author:$n,content:`${Po} A Tag with the name **${n}** does not exist!`});ie(t.channel.id,{author:$n,content:r.message.replaceAll("\\n",` -`)});break}default:{ie(t.channel.id,{author:$n,content:"Invalid sub-command"});break}}}}]})});function NP(e){let t="";for(let n=0;n{"use strict";a();l();Ft();M();x();Ap=y({name:"MoreCommands",description:"echo, lenny, mock",authors:[d.Arjix,d.echo,d.Samu],dependencies:["CommandsAPI"],commands:[{name:"echo",description:"Sends a message as Clyde (locally)",options:[To],inputType:3,execute:(e,t)=>{let n=Be(e,"message","");ie(t.channel.id,{content:n})}},{name:"lenny",description:"Sends a lenny face",options:[To],execute:e=>({content:Be(e,"message","")+" ( \u0361\xB0 \u035C\u0296 \u0361\xB0)"})},{name:"mock",description:"mOcK PeOpLe",options:[jo],execute:e=>({content:NP(Be(e,"message",""))})}]})});var Lp,p1=g(()=>{"use strict";a();l();Ft();M();x();Lp=y({name:"MoreKaomoji",description:"Adds more Kaomoji to discord. \u30FD(\xB4\u25BD`)/",authors:[d.JacobTm],dependencies:["CommandsAPI"],commands:[{name:"dissatisfaction",description:" \uFF1E\uFE4F\uFF1C"},{name:"smug",description:" \u0CA0_\u0CA0"},{name:"happy",description:" \u30FD(\xB4\u25BD`)/"},{name:"crying",description:" \u0CA5_\u0CA5"},{name:"angry",description:" \u30FD(\uFF40\u0414\xB4)\uFF89"},{name:"anger",description:" \u30FD(\uFF4F`\u76BF\u2032\uFF4F)\uFF89"},{name:"joy",description:" <(\uFFE3\uFE36\uFFE3)>"},{name:"blush",description:"\u0AEE \u02F6\u1D54 \u1D55 \u1D54\u02F6 \u10D0"},{name:"confused",description:"(\u2022\u0E34_\u2022\u0E34)?"},{name:"sleeping",description:"(\u1D17_\u1D17)"},{name:"laughing",description:"o(\u2267\u25BD\u2266)o"}].map(e=>({...e,options:[To],execute:t=>({content:Be(t,"message","")+e.description})}))})});function LP(e){Mo.store.tagSettings??=Ep;let[t,n]=te(Mo.store.tagSettings),r=i=>{n(i),e.setValue(i)};return o(ue,{flexDirection:"column"},br.map(i=>o(Ot,{style:{padding:"1em 1em 0"}},o(b.FormTitle,{style:{width:"fit-content"}},o(K,{text:i.description},({onMouseEnter:s,onMouseLeave:c})=>o("div",{onMouseEnter:s,onMouseLeave:c},i.displayName," Tag ",o(to,{type:to.Types[i.name]})))),o(Le,{type:"text",value:t[i.name]?.text??i.displayName,placeholder:`Text on tag (default: ${i.displayName})`,onChange:s=>{t[i.name].text=s,r(t)},className:z.bottom16}),o(ht,{value:t[i.name]?.showInChat??!0,onChange:s=>{t[i.name].showInChat=s,r(t)},hideBorder:!0},"Show in messages"),o(ht,{value:t[i.name]?.showInNotChat??!0,onChange:s=>{t[i.name].showInNotChat=s,r(t)},hideBorder:!0},"Show in member list and profiles"))))}var kP,RP,AP,to,d1,br,Ep,Mo,Dp,m1=g(()=>{"use strict";a();l();_();Mt();M();Qe();x();B();w();kP="1081004946872352958",RP=I("computePermissions","canEveryoneRole"),AP=I("SEND_MESSAGES","VIEW_CREATOR_MONETIZATION_ANALYTICS"),to=Ae(e=>e.Types?.[0]==="BOT"),d1=(e,t)=>!!e?.webhookId&&t.isNonUserBot(),br=[{name:"WEBHOOK",displayName:"Webhook",description:"Messages sent by webhooks",condition:d1},{name:"OWNER",displayName:"Owner",description:"Owns the server",condition:(e,t,n)=>de.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"]}],Ep=Object.fromEntries(br.map(({name:e,displayName:t})=>[e,{text:t,showInChat:!0,showInNotChat:!0}]));Mo=A({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:LP,description:"fill me"}}),Dp=y({name:"MoreUserTags",description:"Adds tags for webhooks and moderative roles (owner, admin, etc.)",authors:[d.Cyn,d.TheSun,d.RyanCaoDev,d.LordElias],settings:Mo,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(!Mo.store.tagSettings)if(!Mo.store.visibility_WEBHOOK)Mo.store.tagSettings=Ep;else{let e={...Ep};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}Mo.store.tagSettings=e,delete Vencord.Settings.plugins.MoreUserTags[t]})}},getPermissions(e,t){let n=de.getGuild(t?.guild_id);if(!n)return[];let r=RP.computePermissions({user:e,context:n,overwrites:t.permissionOverwrites});return Object.entries(AP).map(([i,s])=>r&s?i:"").filter(Boolean)},addTagVariants(e){let t=100;return br.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===to.Types.ORIGINAL_POSTER||br.some(t=>e===to.Types[`${t.name}-OP`]),getTagText(e,t){if(!e)return t.BOT_TAG_BOT;let[n,r]=e.split("-"),i=br.find(({name:c})=>n===c);if(!i||r==="BOT"&&n!=="WEBHOOK"&&this.settings.store.dontShowForBots)return t.BOT_TAG_BOT;let s=Mo.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 to.Types.OFFICIAL;if(t.id===kP)return to.Types.AI;let c=typeof r=="number"?r:null;if(s??=J.getChannel(n),!s)return c;let u=this.settings.store,p=this.getPermissions(t,s);for(let v of br)if(!(i==="chat"&&!u.tagSettings[v.name].showInChat)&&!(i==="not-chat"&&!u.tagSettings[v.name].showInNotChat)&&(v.permissions?.some(h=>p.includes(h))||v.condition?.(e,t,s))){s.isForumPost()&&s.ownerId===t.id?c=to.Types[`${v.name}-OP`]:t.bot&&!d1(e,t)&&!u.dontShowBotTag?c=to.Types[`${v.name}-BOT`]:c=to.Types[v.name];break}return c}})});function DP(e,t){let n=0,r=0;for(;(r=e.indexOf(t,r)+1)!==0;)n++;return n}function OP(e,t){if(!t.global)throw new Error("pattern must be global");let n=0;for(;t.test(e);)n++;return n}function BP(e){let t=DP(e,_p)+OP(e,_P);return Math.min(t,10)}function Op(){if(!Xo.store.triggerWhenUnfocused&&!document.hasFocus())return;let e=document.createElement("audio");e.src=EP,e.volume=Xo.store.volume,e.play()}var _p,EP,Xo,Bp,_P,f1=g(()=>{"use strict";a();l();_();Oc();M();he();x();w();_p="\u{1F5FF}",EP="https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai.mp3",Xo=A({volume:{description:"Volume of the \u{1F5FF}\u{1F5FF}\u{1F5FF}",type:5,markers:gr(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}}),Bp=y({name:"Moyai",authors:[d.Megu,d.Nuckyz],description:"\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}",settings:Xo,flux:{async MESSAGE_CREATE({optimistic:e,type:t,message:n,channelId:r}){if(e||t!=="MESSAGE_CREATE"||n.state==="SENDING"||Xo.store.ignoreBots&&n.author?.bot||Xo.store.ignoreBlocked&&nt.isBlocked(n.author?.id)||!n.content||r!==Ie.getChannelId())return;let i=BP(n.content);for(let s=0;s/gi});var fa,Fp,g1=g(()=>{"use strict";a();l();_();M();x();B();fa=A({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}}),Fp=y({name:"MuteNewGuild",description:"Mutes newly joined guilds",authors:[d.Glitch,d.Nuckyz,d.carince],patches:[{find:",acceptInvite:function",replacement:{match:/INVITE_ACCEPT_SUCCESS.+?;(\i)=null.+?;/,replace:(e,t)=>`${e}$self.handleMute(${t});`}}],settings:fa,handleMute(e){e==="@me"||e==="null"||e==null||Rn("updateGuildNotificationSettings").updateGuildNotificationSettings(e,{muted:fa.store.guild,suppress_everyone:fa.store.everyone,suppress_roles:fa.store.role})}})});function HP(e){return e.name||e.recipients.map(U.getUser).filter(Dl).map(t=>nt.getNickname(t.id)||UP.getName(t)).join(", ")}var FP,$P,UP,Io,GP,$p,h1=g(()=>{"use strict";a();l();M();Ts();x();B();w();FP=I("selectPrivateChannel"),$P=I("getChannelIconURL"),UP=I("getGlobalName"),Io=I("emptyIconFriends","emptyIconGuilds"),GP=I("guildNick","guildAvatarWithoutIcon");$p=y({name:"MutualGroupDMs",description:"Shows mutual group dms in profiles",authors:[d.amia],patches:[{find:".Messages.USER_PROFILE_MODAL",replacement:[{match:/(?<=\.MUTUAL_GUILDS\}\),)(?=(\i\.bot).{0,20}(\(0,\i\.jsx\)\(.{0,100}id:))/,replace:'$1?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=J.getSortedPrivateChannels().filter(r=>r.isGroupDM()&&r.recipients.includes(e.id)).map(r=>o(ms,{className:Io.listRow,onClick:()=>{t(),FP.selectPrivateChannel(r.id)}},o(fs,{src:$P.getChannelIconURL({id:r.id,icon:r.icon,size:32}),size:"SIZE_40",className:Io.listAvatar}),o("div",{className:Io.listRowContent},o("div",{className:Io.listName},HP(r)),o("div",{className:GP.guildNick},r.recipients.length+1," Members"))));return o(ds,{className:Io.listScroller,fade:!0,onClose:t},n.length>0?n:o("div",{className:Io.empty},o("div",{className:Io.emptyIconFriends}),o("div",{className:Io.emptyText},"No group dms in common")))}})});var zP,Up,y1=g(()=>{"use strict";a();l();_();M();x();B();zP=I("getRelationships","isBlocked"),Up=y({name:"NoBlockedMessages",description:"Hides all blocked messages from chat completely.",authors:[d.rushii,d.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:()=>C.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=>zP.isBlocked(e.author.id)})});var Gp,v1=g(()=>{"use strict";a();l();M();x();Gp=y({name:"NoDevtoolsWarning",description:"Disables the 'HOLD UP' banner in the console. As a side effect, also prevents Discord from hiding your token, which prevents random logouts.",authors:[d.Ven],patches:[{find:"setDevtoolsCallbacks",replacement:{match:/if\(.{0,10}\|\|"0.0.0"!==.{0,2}\.remoteApp\.getVersion\(\)\)/,replace:"if(false)"}}]})});var Hp,S1=g(()=>{"use strict";a();l();M();x();Hp=y({name:"NoF1",description:"Disables F1 help bind.",authors:[d.Cyn],patches:[{find:',"f1"],comboKeysBindGlobal:',replacement:{match:',"f1"],comboKeysBindGlobal:',replace:"],comboKeysBindGlobal:"}}]})});var jP,xi,zp,b1=g(()=>{"use strict";a();l();_();M();x();B();jP=I("getMessageRequestsCount"),xi=A({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}}),zp=y({name:"NoPendingCount",description:"Removes the ping count of incoming friend requests, message requests, and nitro offers.",authors:[d.amia],settings:xi,patches:[{find:".getPendingCount=",predicate:()=>xi.store.hideFriendRequestsCount,replacement:{match:/(?<=\.getPendingCount=function\(\)\{)/,replace:"return 0;"}},{find:".getMessageRequestsCount=",predicate:()=>xi.store.hideMessageRequestsCount,replacement:{match:/(?<=\.getMessageRequestsCount=function\(\)\{)/,replace:"return 0;"}},{find:".getSpamChannelsCount(),",predicate:()=>xi.store.hideMessageRequestsCount,replacement:{match:/(?<=getSpamChannelsCount\(\),\i=)\i\.getMessageRequestsCount\(\)/,replace:"$self.getRealMessageRequestCount()"}},{find:"showProgressBadge:",predicate:()=>xi.store.hidePremiumOffersCount,replacement:{match:/\(function\(\){return \i\.\i\.getUnacknowledgedOffers\(\i\)\.length}\)/,replace:"(function(){return 0})"}}],getRealMessageRequestCount(){return jP.getMessageRequestChannelIds().size}})});var jp,T1=g(()=>{"use strict";a();l();M();x();jp=y({name:"NoProfileThemes",description:"Completely removes Nitro profile themes",authors:[d.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 ga,Wp,x1=g(()=>{"use strict";a();l();_();M();x();ga=A({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}}),Wp=y({name:"NoReplyMention",description:"Disables reply pings by default",authors:[d.DustyAngel47,d.axyie,d.pylix,d.outfoxxed],settings:ga,shouldMention(e,t){let n=ga.store.userList.includes(e.author.id),r=ga.store.shouldPingListed?n:!n;return ga.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 qp,w1=g(()=>{"use strict";a();l();M();x();qp=y({name:"NoScreensharePreview",description:"Disables screenshare previews from being sent.",authors:[d.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 Kp,P1=g(()=>{"use strict";a();l();M();x();Kp=y({name:"NoUnblockToJump",description:"Allows you to jump to messages of blocked users without unblocking them",authors:[d.dzshn],patches:[{find:'.id,"Search Results"',replacement:{match:/if\(.{1,10}\)(.{1,10}\.show\({.{1,50}UNBLOCK_TO_JUMP_TITLE)/,replace:"if(false)$1"}},{find:"renderJumpButton=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 Yp,M1=g(()=>{"use strict";a();l();M();x();Yp=y({name:"NSFWGateBypass",description:"Allows you to access NSFW channels without setting/verifying your age",authors:[d.Commandtechno],patches:[{find:".nsfwAllowed=null",replacement:{match:/(\w+)\.nsfwAllowed=/,replace:"$1.nsfwAllowed=true;"}}]})});var Zp,I1=g(()=>{"use strict";a();l();M();x();Zp=y({name:"oneko",description:"cat follow mouse (real)",authors:[d.Ven,d.adryd],start(){f("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(unsafeWindow.onekoInterval),delete unsafeWindow.onekoInterval,document.getElementById("oneko")?.remove()}})});var WP,qP,KP,Jo,Xp,C1=g(()=>{"use strict";a();l();_();M();x();w();WP=/^https:\/\/open\.spotify\.com\/(track|album|artist|playlist|user)\/(.+)(?:\?.+?)?$/,qP=/^https:\/\/(steamcommunity\.com|(?:help|store)\.steampowered\.com)\/.+$/,KP=/^https:\/\/store\.epicgames\.com\/(.+)$/,Jo=A({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}}),Xp=y({name:"OpenInApp",description:"Open Spotify, Steam and Epic Games URLs in their respective apps instead of your browser",authors:[d.Ven],settings:Jo,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:()=>Jo.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(!Jo.store.spotify)break e;let r=WP.exec(n);if(!r)break e;let[,i,s]=r;return VencordNative.native.openExternal(`spotify:${i}:${s}`),t?.preventDefault(),!0}e:{if(!Jo.store.steam||!qP.test(n))break e;return VencordNative.native.openExternal(`steam://openurl/${n}`),t?.preventDefault(),hs("Opened link in Steam",Q.Type.SUCCESS),!0}e:{if(!Jo.store.epic)break e;let r=KP.exec(n);if(!r)break e;return VencordNative.native.openExternal(`com.epicgames.launcher://store/${r[1]}`),t?.preventDefault(),!0}return t?.defaultPrevented?(unsafeWindow.open(n,"_blank"),!0):!1},handleAccountView(e,t,n){t==="spotify"&&Jo.store.spotify?(VencordNative.native.openExternal(`spotify:user:${n}`),e.preventDefault()):t==="steam"&&Jo.store.steam&&(VencordNative.native.openExternal(`steam://openurl/https://steamcommunity.com/profiles/${n}`),hs("Opened link in Steam",Q.Type.SUCCESS),e.preventDefault())}})});function k1(e){Object.assign(R1.__getLocalVars().state,{enabled:e,settingsVisible:e})}function A1(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(R1.__getLocalVars().state,t)}var R1,N1,Jp,L1=g(()=>{"use strict";a();l();_();M();x();B();R1=ce("PoggermodeSettingsStore"),N1=A({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:A1}}),Jp=y({name:"Party mode \u{1F389}",description:"Allows you to use party mode cause the party never ends \u2728",authors:[d.UwUDev],settings:N1,start(){k1(!0),A1(N1.store.superIntensePartyMode)},stop(){k1(!1)}})});var E1=g(()=>{});function YP(e){return qn(e.toLowerCase().split("_"))}function ha(e){return e=D1[e]||e,at.Messages[e]||YP(e)}function O1(e){e==="USE_APPLICATION_COMMANDS"?e="USE_APPLICATION_COMMANDS_GUILD":e==="SEND_VOICE_MESSAGES"?e="SEND_VOICE_MESSAGE_GUILD":e!=="STREAM"&&(e=D1[e]||e);let t=at.Messages[`ROLE_PERMISSIONS_${e}_DESCRIPTION`];return t?.hasMarkdown?Ne.parse(t.message):typeof t=="string"?t:""}function ya({roles:e,id:t},n){return[...n.roles,t].map(r=>e[r]).sort((r,i)=>i.position-r.position)}function _1(e){switch(Co.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 va(e,t){let n=de.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 kt,D1,wi=g(()=>{"use strict";a();l();ze();Kn();w();Mi();Pi();kt=Oe("vc-permviewer-");D1={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 Qp(){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 Vp(){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 F1(){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=g(()=>{"use strict";a();l()});function XP(e,t,n){return ke(r=>o(VP,{modalProps:r,permissions:e,guild:t,header:n}))}function JP({permissions:e,guild:t,modalProps:n,header:r}){e.sort((u,p)=>u.type-p.type),Ue([Ee],()=>Ee.getMemberIds(t.id),null,(u,p)=>u.length===p.length),st(()=>{let u=e.filter(p=>p.type===1&&!Ee.isMember(t.id,p.id)).map(({id:p})=>p);O.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[t.id],userIds:u})},[]);let[i,s]=te(0),c=e[i];return o(De,{...n,size:"large"},o(Ge,null,o(ee,{className:kt("perms-title"),variant:"heading-lg/semibold"},r," permissions:"),o(Pt,{onClick:n.onClose})),o(He,null,!c&&o("div",{className:kt("perms-no-perms")},o(ee,{variant:"heading-lg/normal"},"No permissions to display!")),c&&o("div",{className:kt("perms-container")},o("div",{className:kt("perms-list")},e.map((u,p)=>{let v=U.getUser(u.id??""),h=t.roles[u.id??""];return o("button",{className:kt("perms-list-item-btn"),onClick:()=>s(p)},o("div",{className:kt("perms-list-item",{"perms-list-item-active":i===p}),onContextMenu:S=>{Co.store.unsafeViewAsRole&&u.type===0&&pn.open(S,()=>o(QP,{guild:t,roleId:u.id,onClose:n.onClose}))}},(u.type===0||u.type===2)&&o("span",{className:kt("perms-role-circle"),style:{backgroundColor:h?.colorString??"var(--primary-300)"}}),u.type===1&&v!==void 0&&o("img",{className:kt("perms-user-img"),src:v.getAvatarURL(void 0,void 0,!1)}),o(ee,{variant:"text-md/normal"},u.type===0?h?.name||"Unknown Role":u.type===1?v&&Wn(v)||"Unknown User":o(ue,{style:{gap:"0.2em",justifyItems:"center"}},"@owner",o(Ty,{height:18,width:18,"aria-hidden":"true"})))))})),o("div",{className:kt("perms-perms")},Object.entries(En).map(([u,p])=>o("div",{className:kt("perms-perms-item")},o("div",{className:kt("perms-perms-item-icon")},(()=>{let{permissions:v,overwriteAllow:h,overwriteDeny:S}=c;return v?(v&p)===p?Vp():Qp():h&&(h&p)===p?Vp():S&&(S&p)===p?Qp():F1()})()),o(ee,{variant:"text-md/normal"},ha(u)),o(K,{text:O1(u)||"No Description"},v=>o(by,{...v}))))))))}function QP({guild:e,roleId:t,onClose:n}){return o(D.Menu,{navId:kt("role-context-menu"),onClose:pn.close,"aria-label":"Role Options"},o(D.MenuItem,{id:"vc-pw-view-as-role",label:"View As Role",action:()=>{let r=e.roles[t];!r||(n(),O.dispatch({type:"IMPERSONATE_UPDATE",guildId:e.id,data:{type:"ROLES",roles:{[t]:r}}}))}}))}var VP,Tr,Pi=g(()=>{"use strict";a();l();ae();Mt();Fn();ot();Je();w();Mi();wi();$1();VP=E.wrap(JP),Tr=XP});var U1=g(()=>{});function Ii({children:e,onMoreClick:t,buttons:n,moreTooltipText:r,defaultState:i=!1,onDropDownClick:s,headerText:c}){let[u,p]=te(i);return o(m,null,o("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"8px"}},o(ee,{tag:"h2",variant:"eyebrow",style:{color:"var(--header-primary)",display:"inline"}},c),o("div",{className:ed("center-flex")},n??null,t&&o(K,{text:r},v=>o("button",{...v,className:ed("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(K,{text:u?"Hide "+c:"Show "+c},v=>o("button",{...v,className:ed("btn"),onClick:()=>{p(h=>!h),s?.(u)}},o("svg",{width:"24",height:"24",viewBox:"0 0 24 24",transform:u?"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"})))))),u&&e)}var ed,td=g(()=>{"use strict";a();l();ze();w();U1();ed=Oe("vc-expandableheader-")});function tM({guild:e,guildMember:t}){let n=Co.use(["permissionsSortOrder"]),[r,i]=Wt(()=>{let L=[],k=ya(e,t),F=k.map(G=>({type:0,...G}));if(e.ownerId===t.userId){F.push({type:2,permissions:Object.values(En).reduce(($,Y)=>$|Y,0n)});let G=at.Messages.GUILD_OWNER||"Server Owner";L.push({permission:G,roleColor:"var(--primary-300)",rolePosition:1/0})}_1(k);for(let[G,$]of Object.entries(En))for(let{permissions:Y,colorString:ne,position:q,name:W}of k)if((Y&$)===$){L.push({permission:ha(G),roleColor:ne||"var(--primary-300)",rolePosition:q});break}return L.sort((G,$)=>$.rolePosition-G.rolePosition),[F,L]},[n.permissionsSortOrder]),{root:s,role:c,roleRemoveButton:u,roleNameOverflow:p,roles:v,rolePill:h,rolePillBorder:S,roleCircle:T,roleName:P}=eM;return o(Ii,{headerText:"Permissions",moreTooltipText:"Role Details",onMoreClick:()=>Tr(r,e,t.nick||U.getUser(t.userId).username),defaultState:Co.store.defaultPermissionsDropdownState,buttons:[o(K,{text:`Sorting by ${n.permissionsSortOrder===0?"Highest Role":"Lowest Role"}`},L=>o("button",{...L,className:kt("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:V(s,v)},i.map(({permission:L,roleColor:k})=>o("div",{className:V(c,h,S)},o("div",{className:u},o("span",{className:T,style:{backgroundColor:k}})),o("div",{className:P},o(ee,{className:p,variant:"text-xs/medium"},L))))))}var eM,G1,H1=g(()=>{"use strict";a();l();ae();td();ln();he();B();w();Mi();wi();Pi();eM=ft(()=>{let e=Br(Z.byProps("roles","rolePill","rolePillBorder"),Z.byProps("roleCircle","dotBorderBase","dotBorderColor"),Z.byProps("roleNameOverflow","root","roleName","roleRemoveButton"));return Object.assign({},...e)});G1=E.wrap(tM,{noop:!0})});function nd(e,t,n){return n===0&&!Ee.isMember(e,t)?null:o(D.MenuItem,{id:"perm-viewer-permissions",label:"Permissions",action:()=>{let r=de.getGuild(e),i,s;switch(n){case 0:{let c=Ee.getMember(e,t);i=ya(r,c).map(u=>({type:0,...u})),r.ownerId===t&&i.push({type:2,permissions:Object.values(En).reduce((u,p)=>u|p,0n)}),s=c.nick??U.getUser(c.userId).username;break}case 1:{let c=J.getChannel(t);i=va(Object.values(c.permissionOverwrites).map(({id:u,allow:p,deny:v,type:h})=>({type:h,id:u,overwriteAllow:p,overwriteDeny:v})),e),s=c.name;break}default:{i=Object.values(r.roles).map(c=>({type:0,...c})),s=r.name;break}}Tr(i,r,s)}})}function od(e,t){return(n,r)=>()=>{if(!r)return n;let i=rt(e,n),s=(()=>{switch(t){case 0:return nd(r.guildId,r.user.id,t);case 1:return nd(r.guild.id,r.channel.id,t);case 2:return nd(r.guild.id);default:return null}})();s!=null&&(i?i.push(s):e==="roles"&&r.guildId&&n.splice(-1,0,o(D.MenuGroup,null,s)))}}var Co,rd,Mi=g(()=>{"use strict";a();l();E1();It();_();M();x();w();Pi();H1();wi();Co=A({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}});rd=y({name:"PermissionsViewer",description:"View the permissions a user or channel has, and the roles of a server",authors:[d.Nuckyz,d.Ven],settings:Co,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(G1,{guild:e,guildMember:t}),userContextMenuPatch:od("roles",0),channelContextMenuPatch:od(["mute-channel","unmute-channel"],1),guildContextMenuPatch:od("privacy",2),start(){me("user-context",this.userContextMenuPatch),me("channel-context",this.channelContextMenuPatch),me("guild-context",this.guildContextMenuPatch)},stop(){fe("user-context",this.userContextMenuPatch),fe("channel-context",this.channelContextMenuPatch),fe("guild-context",this.guildContextMenuPatch)}})});function j1(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=(c,u,p,v,h)=>i(h||c),s.crossOrigin="Anonymous",s.src=n})}async function lM(e,t,n){for(let r of e)switch(r.name){case"image":let i=aM.getUploads(t.channel.id,z1)[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 iM(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 z1,nM,oM,Sa,rM,iM,sM,aM,id,W1=g(()=>{"use strict";a();l();Ft();M();gi();ln();x();B();z1=0,nM=20,oM=128,Sa=10,rM=Gn(()=>Promise.all(Array.from({length:Sa},(e,t)=>j1(`https://raw.githubusercontent.com/VenPlugs/petpet/main/frames/pet${t}.gif`)))),iM=pe(".USER("),sM=pe("UPLOAD_FILE_LIMIT_ERROR"),aM=I("getUploads");id=y({name:"petpet",description:"Adds a /petpet slash command to create headpet gifs from any image",authors:[d.Ven],dependencies:["CommandsAPI"],commands:[{inputType:0,name:"petpet",description:"Create a petpet gif. You can only specify one of the image options",options:[{name:"delay",description:"The delay between each frame. Defaults to 20.",type:4},{name:"resolution",description:"Resolution for the gif. Defaults to 120. If you enter an insane number and it freezes Discord that's your fault.",type:4},{name:"image",description:"Image attachment to use",type:11},{name:"url",description:"URL to fetch image from",type:3},{name:"user",description:"User whose avatar to use as image",type:6},{name:"no-server-pfp",description:"Use the normal avatar instead of the server specific one when using the 'user' option",type:5}],execute:async(e,t)=>{let{GIFEncoder:n,quantize:r,applyPalette:i}=await oa(),s=await rM(),c=Be(e,"no-server-pfp",!1);try{var u=await lM(e,t,c);if(!u)throw"No Image specified!"}catch(k){ie(t.channel.id,{content:String(k)});return}let p=await j1(u),v=Be(e,"delay",nM),h=Be(e,"resolution",oM),S=new n,T=document.createElement("canvas");T.width=T.height=h;let P=T.getContext("2d");for(let k=0;ksM([L],t.channel,z1),10)}}]})});function Y1(){return lt(["plugins.PinDMs.pinnedDMs"]),ba()}function xr(e){return ba().has(e)}function Z1(e){let t=ba();t.delete(e)||t.add(e),K1([...t])}function ad(){return ba(),Ci.store.pinOrder===0?cM.getPrivateChannelIds().filter(xr):Un}function X1(e){return ad()[e]}function ld(e,t){let n=q1(),r=n.indexOf(e),i=r+t;[n[r],n[i]]=[n[i],n[r]],K1(n)}var Ci,cM,Un,sd,q1,K1,uM,ba,cd=g(()=>{"use strict";a();l();_();x();B();Ci=A({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}]}}),cM=ce("PrivateChannelSortStore"),q1=()=>(C.plugins.PinDMs.pinnedDMs||void 0)?.split(","),K1=e=>{sd=void 0,C.plugins.PinDMs.pinnedDMs=e.join(",")},uM=()=>(Un=q1()??[],sd=new Set(Un)),ba=()=>sd??uM()});function J1(e){let t=xr(e),n=t&&Ci.store.pinOrder===1;return o(m,null,o(D.MenuItem,{id:"pin-dm",label:t?"Unpin DM":"Pin DM",action:()=>Z1(e)}),n&&Un[0]!==e&&o(D.MenuItem,{id:"move-pin-up",label:"Move Pin Up",action:()=>ld(e,-1)}),n&&Un[Un.length-1]!==e&&o(D.MenuItem,{id:"move-pin-down",label:"Move Pin Down",action:()=>ld(e,1)}))}function eS(){me("gdm-context",Q1),me("user-context",V1)}function tS(){fe("gdm-context",Q1),fe("user-context",V1)}var Q1,V1,nS=g(()=>{"use strict";a();l();It();w();cd();Q1=(e,t)=>()=>{let n=rt("leave-channel",e);n&&n.unshift(J1(t.channel.id))},V1=(e,t)=>()=>{let n=rt("close-dm",e);if(n){let r=n.findIndex(i=>i?.props?.id==="close-dm");n.splice(r,0,J1(t.channel.id))}}});var ud,oS=g(()=>{"use strict";a();l();M();x();nS();cd();ud=y({name:"PinDMs",description:"Allows you to pin private channels to the top of your DM list. To pin/unpin or reorder pins, right click DMs",authors:[d.Ven,d.Strencher],settings:Ci,start:eS,stop:tS,usePinCount(e){let t=Y1();return e.length?[t.size]:[]},getChannel(e,t){return e[X1(t)]},isPinned:xr,getSnapshot:ad,getScrollOffset(e,t,n,r,i){return xr(e)?t*(Un.indexOf(e)+r)+n:(t+n)*2+t*Un.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 pd,rS=g(()=>{"use strict";a();l();M();x();pd=y({name:"PlainFolderIcon",description:"Doesn't show the small guild icons in folders",authors:[d.botato],patches:[{find:".expandedFolderIconWrapper",replacement:[{match:/\(\w\|\|\w\)&&(\(.{0,40}\(.{1,3}\.animated)/,replace:"$1"}]}]})});var fd={};ye(fd,{__addDecoratorsToList:()=>pM,addDecorator:()=>dd,decorators:()=>Ta,removeDecorator:()=>md});function dd(e,t,n){Ta.set(e,{decorator:t,onlyIn:n})}function md(e){Ta.delete(e)}function pM(e){let t=!!e.guildId;return[...Ta.values()].map(n=>{let{decorator:r,onlyIn:i}=n;return!i||i==="guilds"&&t||i==="dms"&&!t?r(e):null})}var Ta,gd=g(()=>{"use strict";a();l();Ta=new Map});var vd={};ye(vd,{__addDecorationsToMessage:()=>dM,addDecoration:()=>hd,decorations:()=>xa,removeDecoration:()=>yd});function hd(e,t){xa.set(e,t)}function yd(e){xa.delete(e)}function dM(e){return[...xa.values()].map(t=>t(e))}var xa,Sd=g(()=>{"use strict";a();l();xa=new Map});function wa(e,t){return({color:n,tooltip:r})=>o(K,{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 mM,iS,fM,gM,hM,Td,sS,bd,xd,aS=g(()=>{"use strict";a();l();Is();gd();Sd();_();ae();M();x();B();w();mM=ce("SessionsStore");iS={desktop:wa("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:wa("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:wa("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:wa("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"})},fM=pe(".TWITCH",".STREAMING",".INVISIBLE"),gM=({platform:e,status:t})=>{let n=e[0].toUpperCase()+e.slice(1),r=iS[e]??iS.desktop;return o(r,{color:`var(--${fM(t)}`,tooltip:n})},hM=e=>co.getState()?.clientStatuses?.[e],Td=({user:e,wantMargin:t=!0,wantTopMargin:n=!1})=>{if(!e||e.bot)return null;if(e.id===U.getCurrentUser().id){let s=mM.getSessions();if(typeof s!="object")return null;let c=Object.values(s).sort(({status:v},{status:h})=>v===h?0:v==="online"?1:h==="online"?-1:v==="idle"?1:h==="idle"?-1:0),u=Object.values(c).reduce((v,h)=>(h.clientInfo.client!=="unknown"&&(v[h.clientInfo.client]=h.status),v),{}),{clientStatuses:p}=co.getState();p[U.getCurrentUser().id]=u}let r=co.getState()?.clientStatuses?.[e.id];if(!r)return null;let i=Object.entries(r).map(([s,c])=>o(gM,{key:s,platform:s,status:c}));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},sS={component:e=>o(Td,{...e,wantMargin:!1}),position:0,shouldShow:e=>!!Object.keys(hM(e.user.id)??{}).length,key:"indicator"},bd={list:{description:"In the member list",onEnable:()=>dd("platform-indicator",e=>o(E,{noop:!0},o(Td,{user:e.user}))),onDisable:()=>md("platform-indicator")},badges:{description:"In user profiles, as badges",onEnable:()=>wd(sS),onDisable:()=>Pd(sS)},messages:{description:"Inside messages",onEnable:()=>hd("platform-indicator",e=>o(E,{noop:!0},o(Td,{user:e.message?.author,wantTopMargin:!0}))),onDisable:()=>yd("platform-indicator")}},xd=y({name:"PlatformIndicators",description:"Adds platform indicators (Desktop, Mobile, Web...) to users",authors:[d.kemo,d.TheSun,d.Nuckyz,d.Ven],dependencies:["MessageDecorationsAPI","MemberListDecoratorsAPI"],start(){let e=C.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(bd).forEach(([n,r])=>{e[n]&&r.onEnable()})},stop(){Object.entries(bd).forEach(([e,t])=>{t.onDisable()})},patches:[{find:".Masks.STATUS_ONLINE_MOBILE",predicate:()=>C.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:()=>C.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:()=>C.plugins.PlatformIndicators.colorMobileIndicator,replacement:{match:/(?<=\i\[\i\.\i\.MOBILE\])===\i\.\i\.ONLINE/,replace:"!= null"}}],options:{...Object.fromEntries(Object.entries(bd).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 lS=g(()=>{});function Md(){return o(N.Fragment,null,o(b.FormTitle,{tag:"h3"},"More Information"),o(b.FormText,null,"To add your own pronouns, visit"," ",o(ct,{href:"https://pronoundb.org"},"pronoundb.org")),o(b.FormDivider,null),o(b.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 cS=g(()=>{"use strict";a();l();xo();w()});var no,Pa=g(()=>{"use strict";a();l();_();x();Ma();no=A({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 Ia,uS=g(()=>{"use strict";a();l();Ia={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 vM(e){return pS.getGuildMemberProfile(e,lr()?.guild_id)?.pronouns||pS.getUserProfile(e)?.pronouns}function Ca(e){let t=vM(e)?.trim().replace(SM," "),[n]=it(()=>bM(e),{fallbackValue:fS(e),onError:r=>console.error("Fetching pronouns failed: ",r)});return no.store.pronounSource===1&&t?[t,"Discord"]:n&&n!=="unspecified"?[xM(n),"PronounDB"]:[t,"Discord"]}function mS(e){let t=Ca(e);return!no.store.showInProfile||!no.store.showSelf&&e===U.getCurrentUser().id?dS:t}function fS(e){let t=Id[e];return t&&t!=="unspecified"?t:t||null}function bM(e){return new Promise(t=>{let n=fS(e);if(n)return t(n);if(e in wr)return wr[e].push(t);wr[e]=[t],yM()})}async function TM(e){let t=new URLSearchParams;t.append("platform","discord"),t.append("ids",e.join(","));try{return await(await f("https://pronoundb.org/api/v1/lookup-bulk?"+t.toString(),{method:"GET",headers:{Accept:"application/json","X-PronounDB-Source":fl}})).json().then(r=>(Object.assign(Id,r),r))}catch(n){console.error("PronounDB fetching failed: ",n);let r=Object.fromEntries(e.map(i=>[i,"unspecified"]));return Object.assign(Id,r),r}}function xM(e){let{pronounsFormat:t}=C.plugins.PronounDB;return t==="CAPITALIZED"?Ia[e]:t==="LOWERCASE"&&["any","ask","avoid","other"].includes(e)?Ia[e]:Ia[e].toLowerCase()}var pS,dS,Id,wr,yM,SM,Ma=g(()=>{"use strict";a();l();_();M();rr();ot();be();B();w();Pa();uS();pS=ce("UserProfileStore"),dS=[null,""],Id={},wr={},yM=Et(async()=>{let e=Object.keys(wr),t=await TM(e);for(let n of e)wr[n]?.forEach(r=>r(t[n])),delete wr[n]});SM=/\n+/g});function gS(e){return!(!no.store.showInMessages||e.author.bot||e.author.system||e.type===wM||!no.store.showSelf&&e.author.id===U.getCurrentUser().id)}function hS({message:e}){return gS(e)?o(PM,{message:e}):null}function yS({message:e}){return gS(e)?o(MM,{message:e}):null}function PM({message:e}){let[t]=Ca(e.author.id);return t?o("span",{className:V(Na.timestampInline,Na.timestamp)},"\u2022 ",t):null}function MM({message:e}){let[t]=Ca(e.author.id);return t?o("span",{className:V(Na.timestampInline,Na.timestamp,"vc-pronoundb-compact")},"\u2022 ",t):null}var Na,wM,vS=g(()=>{"use strict";a();l();he();B();w();Ma();Pa();Na=I("timestampInline"),wM=24});var SS,Cd,bS=g(()=>{"use strict";a();l();lS();M();x();cS();vS();Ma();Pa();SS={match:/text:(.{0,10}.Messages\.USER_PROFILE_PRONOUNS)(?=,)/,replace:'$& + (typeof vcPronounSource !== "undefined" ? ` (${vcPronounSource})` : "")'},Cd=y({name:"PronounDB",authors:[d.Tyman,d.TheKodeToad,d.Ven],description:"Adds pronouns to user messages using pronoundb",patches:[{find:"showCommunicationDisabledStyles",replacement:{match:/("span",{id:\i,className:\i,children:\i}\))/,replace:"$1, $self.CompactPronounsChatComponentWrapper(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)"},SS]},{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;"},SS]}],settings:no,settingsAboutComponent:Md,PronounsChatComponentWrapper:hS,CompactPronounsChatComponentWrapper:yS,useProfilePronouns:mS})});var Nd,TS=g(()=>{"use strict";a();l();Zo();M();ot();x();w();Nd=y({name:"QuickMention",authors:[d.kemo],description:"Adds a quick mention button to the message actions bar",dependencies:["MessagePopoverAPI"],start(){xn("QuickMention",e=>({label:"Quick Mention",icon:this.Icon,message:e,channel:J.getChannel(e.channel_id),onClick:()=>jn(`<@${e.author.id}> `)}))},stop(){wn("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 kS(e,t){let n=e.findIndex(r=>r.id===t);return n===-1?n:e.length-n-1}function PS({channelId:e,messageId:t,_isQuickEdit:n}){if(n)return;let r=U.getCurrentUser().id,i=dn.getMessages(e)._array.filter(s=>s.author.id===r);Ra=kS(i,t)}function MS({message:e,_isQuickReply:t}){t||(ka=kS(dn.getMessages(e.channel_id)._array,e.id))}function IS(e){let t=e.key==="ArrowUp";!t&&e.key!=="ArrowDown"||!CM(e)||NM(e)||(e.shiftKey?AM(t):RM(t))}function RS(e,t){let n=document.getElementById("message-content-"+t);if(!n)return;let r=Math.max(document.documentElement.clientHeight,unsafeWindow.innerHeight),i=n.getBoundingClientRect();(i.bottom<200||i.top-r>=-200)&&IM.jumpToMessage({channelId:e,messageId:t,flash:!1,jumpType:"INSTANT"})}function AS(e,t){let n=dn.getMessages(Ie.getChannelId())._array;if(!t){let c=U.getCurrentUser().id;n=n.filter(u=>u.author.id===c)}let r=c=>e?Math.min(n.length-1,c+1):Math.max(-1,c-1),i=c=>{do c=r(c);while(c!==-1&&n[n.length-c-1]?.deleted===!0);return c},s;return t?ka=s=i(ka):Ra=s=i(Ra),s===-1?void 0:n[n.length-s-1]}function kM(e){let{enabled:t,userList:n,shouldPingListed:r}=C.plugins.NoReplyMention,i=!t||r===n.includes(e.author.id);switch(NS.store.shouldMention){case 2:return i;case 0:return!1;default:return!0}}function RM(e){let t=AS(e,!0);if(!t)return void O.dispatch({type:"DELETE_PENDING_REPLY",channelId:Ie.getChannelId()});let n=J.getChannel(t.channel_id),r=U.getCurrentUser().id;O.dispatch({type:"CREATE_PENDING_REPLY",channel:n,message:t,shouldMention:kM(t),showMentionToggle:n.guild_id!==null&&t.author.id!==r,_isQuickReply:!0}),RS(n.id,t.id)}function AM(e){let t=AS(e,!1);t?(O.dispatch({type:"MESSAGE_START_EDIT",channelId:t.channel_id,messageId:t.id,content:t.content,_isQuickEdit:!0}),RS(t.channel_id,t.id)):O.dispatch({type:"MESSAGE_END_EDIT",channelId:Ie.getChannelId()})}var IM,CS,ka,Ra,NS,kd,xS,wS,CM,NM,LS=g(()=>{"use strict";a();l();_();M();x();B();w();IM=I("jumpToMessage"),CS=navigator.platform.includes("Mac"),ka=-1,Ra=-1,NS=A({shouldMention:{type:4,description:"Ping reply by default",options:[{label:"Follow NoReplyMention",value:2,default:!0},{label:"Enabled",value:1},{label:"Disabled",value:0}]}}),kd=y({name:"QuickReply",authors:[d.obscurity,d.Ven,d.pylix],description:"Reply to (ctrl + up/down) and edit (ctrl + shift + up/down) messages via keybinds",settings:NS,start(){O.subscribe("DELETE_PENDING_REPLY",xS),O.subscribe("MESSAGE_END_EDIT",wS),O.subscribe("MESSAGE_START_EDIT",PS),O.subscribe("CREATE_PENDING_REPLY",MS),document.addEventListener("keydown",IS)},stop(){O.unsubscribe("DELETE_PENDING_REPLY",xS),O.unsubscribe("MESSAGE_END_EDIT",wS),O.unsubscribe("MESSAGE_START_EDIT",PS),O.unsubscribe("CREATE_PENDING_REPLY",MS),document.removeEventListener("keydown",IS)}}),xS=()=>ka=-1,wS=()=>Ra=-1;CM=e=>CS?e.metaKey:e.ctrlKey,NM=e=>e.altKey||!CS&&e.metaKey});var Rd,LM,Ad,ES=g(()=>{"use strict";a();l();M();x();LM="https://raw.githubusercontent.com/facebook/react/17.0.2/scripts/error-codes/codes.json",Ad=y({name:"ReactErrorDecoder",description:'Replaces "Minifed React Error" with the actual error.',authors:[d.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;.`${t}{var decoded=Vencord.Plugins.plugins.ReactErrorDecoder.decodeError.apply(null, arguments);if(decoded)return decoded;${n}}`}}],async start(){Rd=await f(LM).then(e=>e.json()).catch(e=>console.error(`[ReactErrorDecoder] Failed to fetch React error codes -`,e))},stop(){Rd=void 0},decodeError(e,...t){let n=0;return Rd?.[e]?.replace(/%s/g,()=>{let r=t[n];return n++,r})}})});var Ed={};ye(Ed,{ServerListRenderPosition:()=>Aa,addServerListElement:()=>Ni,removeServerListElement:()=>ki,renderAll:()=>_M});function Ld(e){return e===0?DM:OM}function Ni(e,t){Ld(e).add(t)}function ki(e,t){Ld(e).delete(t)}var EM,Aa,DM,OM,_M,La=g(()=>{"use strict";a();l();xe();EM=new X("ServerListAPI"),Aa=(n=>(n[n.Above=0]="Above",n[n.In=1]="In",n))(Aa||{}),DM=new Set,OM=new Set;_M=e=>{let t=[];for(let n of Ld(e))try{t.unshift(n())}catch(r){EM.error("Failed to render server list element:",r)}return t}});function BM(){let e=[];Object.values(de.getGuilds()).forEach(t=>{gs.getChannels(t.id).SELECTABLE.forEach(n=>{!Gr.hasUnread(n.channel.id)||e.push({channelId:n.channel.id,messageId:Gr.lastMessageId(n.channel.id),readStateType:0})})}),O.dispatch({type:"BULK_ACK",context:"APP",channels:e})}var FM,Dd,DS=g(()=>{"use strict";a();l();La();M();x();w();FM=()=>o(R,{onClick:BM,size:R.Sizes.MIN,color:R.Colors.BRAND,style:{marginTop:"2px",marginBottom:"8px",marginLeft:"9px"}},"Read all"),Dd=y({name:"ReadAllNotificationsButton",description:"Read all server notifications with a single button click!",authors:[d.kemo],dependencies:["ServerListAPI"],renderReadAllButton:()=>o(FM,null),start(){Ni(0,this.renderReadAllButton)},stop(){ki(0,this.renderReadAllButton)}})});var $t,Ea=g(()=>{"use strict";a();l();_();x();$t=A({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 Od=g(()=>{"use strict";a();l()});async function GM(){Rt.delMany(["relationship-notifier-guilds","relationship-notifier-groups","relationship-notifier-friends"])}async function _d(){await GM();let[e,t,n]=await Rt.getMany([OS(),_S(),BS()]);if(await Promise.all([Oa(),_a(),Ri()]),$t.store.offlineRemovals){if($t.store.groups&&t?.size)for(let[r,i]of t)Mr.has(r)||oo(`You are no longer in the group ${i.name}.`,i.iconURL);if($t.store.servers&&e?.size)for(let[r,i]of e)Pr.has(r)||oo(`You are no longer in the server ${i.name}.`,i.iconURL);if($t.store.friends&&n?.friends.length)for(let r of n.friends){if(Qo.friends.includes(r))continue;let i=await Ln.fetchUser(r).catch(()=>{});i&&oo(`You are no longer friends with ${Wn(i)}.`,i.getAvatarURL(void 0,void 0,!1),()=>gn(i.id))}if($t.store.friendRequestCancels&&n?.requests?.length)for(let r of n.requests){if(Qo.requests.includes(r)||[1,2,4].includes(nt.getRelationshipType(r)))continue;let i=await Ln.fetchUser(r).catch(()=>{});i&&oo(`Friend request from ${Wn(i)} has been revoked.`,i.getAvatarURL(void 0,void 0,!1),()=>gn(i.id))}}}function oo(e,t,n){$t.store.notices&&Da.showNotice(e,"OK",()=>Da.popNotice()),ve({title:"Relationship Notifier",body:e,icon:t,onClick:n})}function FS(e){return Pr.get(e)}function Bd(e){Pr.delete(e),Oa()}async function Oa(){Pr.clear();let e=U.getCurrentUser().id;for(let[t,{name:n,icon:r}]of Object.entries(de.getGuilds()))Ee.isMember(t,e)&&Pr.set(t,{id:t,name:n,iconURL:r&&`https://cdn.discordapp.com/icons/${t}/${r}.png`});await Rt.set(OS(),Pr)}function $S(e){return Mr.get(e)}function Fd(e){Mr.delete(e),_a()}async function _a(){Mr.clear();for(let{type:e,id:t,name:n,rawRecipients:r,icon:i}of J.getSortedPrivateChannels())e===3&&Mr.set(t,{id:t,name:n||r.map(s=>s.username).join(", "),iconURL:i&&`https://cdn.discordapp.com/channel-icons/${t}/${i}.png`});await Rt.set(_S(),Mr)}async function Ri(){Qo.friends=[],Qo.requests=[];let e=nt.getRelationships();for(let t in e)switch(e[t]){case 1:Qo.friends.push(t);break;case 3:Qo.requests.push(t);break}await Rt.set(BS(),Qo)}var Pr,Mr,Qo,OS,_S,BS,$d=g(()=>{"use strict";a();l();Ai();mo();ot();w();Ea();Od();Pr=new Map,Mr=new Map,Qo={friends:[],requests:[]},OS=()=>`relationship-notifier-guilds-${U.getCurrentUser().id}`,_S=()=>`relationship-notifier-groups-${U.getCurrentUser().id}`,BS=()=>`relationship-notifier-friends-${U.getCurrentUser().id}`});async function zS({relationship:{type:e,id:t}}){if(Ud===t){Ud=void 0;return}let n=await Ln.fetchUser(t).catch(()=>null);if(!!n)switch(e){case 1:$t.store.friends&&oo(`${Wn(n)} removed you as a friend.`,n.getAvatarURL(void 0,void 0,!1),()=>gn(n.id));break;case 3:$t.store.friendRequestCancels&&oo(`A friend request from ${Wn(n)} has been removed.`,n.getAvatarURL(void 0,void 0,!1),()=>gn(n.id));break}}function jS({guild:{id:e,unavailable:t}}){if(!$t.store.servers||t)return;if(Gd===e){Bd(e),Gd=void 0;return}let n=FS(e);n&&(Bd(e),oo(`You were removed from the server ${n.name}.`,n.iconURL))}function WS({channel:{id:e,type:t}}){if(!$t.store.groups||t!==3)return;if(Hd===e){Fd(e),Hd=void 0;return}let n=$S(e);n&&(Fd(e),oo(`You were removed from the group ${n.name}.`,n.iconURL))}var Ud,Gd,Hd,US,GS,HS,qS=g(()=>{"use strict";a();l();ot();w();Ea();Od();$d();US=e=>Ud=e,GS=e=>Gd=e,HS=e=>Hd=e});var zd,KS=g(()=>{"use strict";a();l();M();x();qS();Ea();$d();zd=y({name:"RelationshipNotifier",description:"Notifies you when a friend, group chat, or server removes you.",authors:[d.nick],settings:$t,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:Oa,GUILD_DELETE:jS,CHANNEL_CREATE:_a,CHANNEL_DELETE:WS,RELATIONSHIP_ADD:Ri,RELATIONSHIP_UPDATE:Ri,RELATIONSHIP_REMOVE(e){zS(e),Ri()},CONNECTION_OPEN:_d},async start(){setTimeout(()=>{_d()},5e3)},removeFriend:US,removeGroup:HS,removeGuild:GS})});var HM,zM,jd,YS=g(()=>{"use strict";a();l();M();x();B();HM=I("spoilerContent"),zM=I("messagesWrapper","messages"),jd=y({name:"RevealAllSpoilers",description:"Reveal all spoilers in a message by Ctrl-clicking a spoiler, or in the chat with Ctrl+Shift-click",authors:[d.whqwert],patches:[{find:".removeObscurity=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}=HM,{messagesWrapper:c}=zM,u=n?document.querySelector(`div.${c}`):r.parentElement;for(let p of u.querySelectorAll(`span.${i}.${s}`))p.click()}})});function ZS(e,t){open(t+encodeURIComponent(e),"_blank")}var Ba,XS,Wd,JS=g(()=>{"use strict";a();l();It();Mt();Fn();M();x();w();Ba={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="};XS=(e,t)=>()=>{if(!t)return;let{reverseImageSearchType:n,itemHref:r,itemSrc:i}=t;if(!n||n!=="img")return;let s=r??i,c=rt("copy-link",e);c&&c.push(o(D.MenuItem,{label:"Search Image",key:"search-image",id:"search-image"},Object.keys(Ba).map((u,p)=>{let v="search-image-"+u;return o(D.MenuItem,{key:v,id:v,label:o(ue,{style:{alignItems:"center",gap:"0.5em"}},o("img",{style:{borderRadius:p>=3?"50%":void 0},"aria-hidden":"true",height:16,width:16,src:new URL("/favicon.ico",Ba[u]).toString().replace("lens.","")}),u),action:()=>ZS(s,Ba[u])})}),o(D.MenuItem,{key:"search-image-all",id:"search-image-all",label:o(ue,{style:{alignItems:"center",gap:"0.5em"}},o(Wo,{height:16,width:16}),"All"),action:()=>Object.values(Ba).forEach(u=>ZS(s,u))})))},Wd=y({name:"ReverseImageSearch",description:"Adds ImageSearch to image context menus",authors:[d.Ven,d.Nuckyz],tags:["ImageUtilities"],patches:[{find:".Messages.MESSAGE_ACTIONS_MENU_LABEL",replacement:{match:/favoriteableType:\i,(?<=(\i)\.getAttribute\("data-type"\).+?)/,replace:(e,t)=>`${e}reverseImageSearchType:${t}.getAttribute("data-role"),`}}],start(){me("message",XS)},stop(){fe("message",XS)}})});var QS=g(()=>{});var Fa=g(()=>{"use strict";a();l()});function Ir(e){let{OAuth2AuthorizeModal:t}=Rn("OAuth2AuthorizeModal");ke(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 f(i,{headers:new Headers({Accept:"application/json"})}),{token:c,success:u}=await s.json();u?(Fe.store.token=c,Ut("Successfully logged in!"),e?.()):s.status===1&&Ut("An Error occurred while logging in.")}catch(i){new X("ReviewDB").error("Failed to authorize",i)}}}))}function Ut(e){Q.show({type:Q.Type.MESSAGE,message:e,id:Q.genId(),options:{position:Q.Position.BOTTOM}})}function VS(e,t){return e.sender.discordID===t||Fe.store.user?.type===1}var on,No=g(()=>{"use strict";a();l();ze();xe();Je();B();w();Fa();Vo();on=Oe("vc-rdb-")});var Fe,Vo=g(()=>{"use strict";a();l();_();x();w();No();Fe=A({authorize:{type:6,description:"Authorize with ReviewDB",component:()=>o(R,{onClick:Ir},"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(R,{onClick:()=>{let e="https://reviewdb.mantikafasi.dev/";Fe.store.token&&(e+="/api/redirect?token="+encodeURIComponent(Fe.store.token)),VencordNative.native.openExternal(e)}},"ReviewDB website")},supportServer:{type:6,description:"ReviewDB Support Server",component:()=>o(R,{onClick:()=>{VencordNative.native.openExternal("https://discord.gg/eWPBSbvznt")}},"ReviewDB Support Server")}}).withPrivateSettings()});async function e0(e,t=0){let n=0;Fe.store.showWarning||(n|=WM);let r=new URLSearchParams({flags:String(n),offset:String(t)}),i=await f(`${Li}/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:(Ut(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 t0(e){return e.token=Fe.store.token,e.token?f(Li+`/api/reviewdb/users/${e.userid}/reviews`,{method:"PUT",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}).then(t=>t.json()).then(t=>(Ut(t.message),t??null)):(Ut("Please authorize to add a review."),Ir(),null)}function n0(e){return f(Li+`/api/reviewdb/users/${e}/reviews`,{method:"DELETE",headers:new Headers({"Content-Type":"application/json",Accept:"application/json"}),body:JSON.stringify({token:Fe.store.token,reviewid:e})}).then(t=>t.json())}async function o0(e){let t=await f(Li+"/api/reviewdb/reports",{method:"PUT",headers:new Headers({"Content-Type":"application/json",Accept:"application/json"}),body:JSON.stringify({reviewid:e,token:Fe.store.token})}).then(n=>n.json());Ut(t.message)}function r0(e){return f(Li+"/api/reviewdb/users",{body:JSON.stringify({token:e}),method:"POST"}).then(t=>t.json())}var Li,$a,WM,Ei=g(()=>{"use strict";a();l();Vo();No();Li="https://manti.vendicated.dev",$a=50,WM=2});function i0({onClick:e}){return o(K,{text:"Delete Review"},t=>o("div",{...t,className:V(qd.button,qd.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 s0({onClick:e}){return o(K,{text:"Report Review"},t=>o("div",{...t,className:qd.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 qd,a0=g(()=>{"use strict";a();l();he();B();w();qd=I("button","wrapper","disabled","separator")});function Kd(e){return o(K,{text:e.name},({onMouseEnter:t,onMouseLeave:n})=>o("img",{className:on("badge"),width:"24px",height:"24px",onMouseEnter:t,onMouseLeave:n,src:e.icon,alt:e.description,onClick:()=>Nl.openUntrustedLink({href:e.redirectURL})}))}var l0=g(()=>{"use strict";a();l();w();No()});var Ua,Yd=g(()=>{"use strict";a();l();ot();he();be();B();w();Fa();Ei();Vo();No();a0();l0();Ua=se(()=>{let e=Z.byProps,[{cozyMessage:t,buttons:n,message:r,groupStart:i},{container:s,isHeader:c},{avatar:u,clickable:p,username:v,messageContent:h,wrapper:S,cozy:T},P,L]=Br(e("cozyMessage"),e("container","isHeader"),e("avatar","zalgo"),e("button","wrapper","selected"),e("botTag")),k=new Intl.DateTimeFormat;return function({review:G,refetch:$}){function Y(){gn(G.sender.discordID)}function ne(){xt.show({title:"Are you sure?",body:"Do you really want to delete this review?",confirmText:"Delete",cancelText:"Nevermind",onConfirm:()=>{n0(G.id).then(W=>{W.success&&$(),Ut(W.message)})}})}function q(){xt.show({title:"Are you sure?",body:"Do you really you want to report this review?",confirmText:"Report",cancelText:"Nevermind",onConfirm:()=>o0(G.id)})}return o("div",{className:V(t,S,r,i,T,on("review")),style:{marginLeft:"0px",paddingLeft:"52px",paddingRight:"16px"}},o("img",{className:V(u,p),onClick:Y,src:G.sender.profilePhoto||"/assets/1f0bfc0865d324c2587920a7d80c609b.png?size=128",style:{left:"0px"}}),o("div",{style:{display:"inline-flex",justifyContent:"center",alignItems:"center"}},o("span",{className:V(p,v),style:{color:"var(--channels-default)",fontSize:"14px"},onClick:()=>Y()},G.sender.username),G.type===3&&o("span",{className:V(L.botTagVerified,L.botTagRegular,L.botTag,L.px,L.rem),style:{marginLeft:"4px"}},o("span",{className:L.botText},"System"))),G.sender.badges.map(W=>o(Kd,{...W})),!Fe.store.hideTimestamps&&G.type!==3&&o(An,{timestamp:Vt(G.timestamp*1e3)},k.format(G.timestamp*1e3)),o("p",{className:V(h),style:{fontSize:15,marginTop:4,color:"var(--text-normal)"}},G.comment),G.id!==0&&o("div",{className:V(s,c,n),style:{padding:"0px"}},o("div",{className:P.wrapper},o(s0,{onClick:q}),VS(G,U.getCurrentUser().id)&&o(i0,{onClick:ne}))))}})});function Di({discordId:e,name:t,onFetchReviews:n,refetchSignal:r,scrollToTop:i,page:s=1,showInput:c=!1,hideOwnReview:u=!1}){let[p,v]=Dt(!0),[h]=it(()=>e0(e,(s-1)*$a),{fallbackValue:null,deps:[r,p,s],onSuccess:S=>{i?.(),n(S)}});return h?o(m,null,o(KM,{refetch:v,reviews:h.reviews,hideOwnReview:u}),c&&o(Zd,{name:t,discordId:e,refetch:v,isAuthor:h.reviews?.some(S=>S.sender.discordID===U.getCurrentUser().id)})):null}function KM({refetch:e,reviews:t,hideOwnReview:n}){let r=U.getCurrentUser().id;return o("div",{className:on("view")},t?.map(i=>(i.sender.discordID!==r||!n)&&o(Ua,{key:i.id,review:i,refetch:e})),t?.length===0&&o(b.FormText,{className:on("placeholder")},"Looks like nobody reviewed this user yet. You could be the first!"))}function Zd({discordId:e,isAuthor:t,refetch:n,name:r}){let{token:i}=Fe.store;function s({key:c,target:u}){c==="Enter"&&t0({userid:e,comment:u.value,star:-1}).then(p=>{p?.success?(u.value="",n()):p?.message&&Ut(p.message)})}return o("textarea",{className:V(qM.inputDefault,"enter-comment",on("input")),onKeyDownCapture:c=>{c.key==="Enter"&&c.preventDefault()},placeholder:i?t?`Update review for @${r}`:`Review @${r}`:"You need to authorize to review users!",onKeyDown:s,onClick:()=>{i||(Ut("Opening authorization window..."),Ir())}})}var qM,Xd=g(()=>{"use strict";a();l();he();be();B();w();Ei();Vo();No();Yd();qM=I("inputDefault","editable")});function YM({modalProps:e,discordId:t,name:n}){let[r,i]=te(),[s,c]=Dt(!0),[u,p]=te(1),v=Qt(null),h=r?.reviewCount,S=r?.reviews.find(T=>T.sender.discordID===Fe.store.user?.discordID);return o(E,null,o(De,{...e,size:"medium"},o(Ge,null,o(ee,{variant:"heading-lg/semibold",className:on("modal-header")},n,"'s Reviews",!!h&&o("span",null," (",h," Reviews)")),o(Pt,{onClick:e.onClose})),o(He,{scrollerRef:v},o("div",{className:on("modal-reviews")},o(Di,{discordId:t,name:n,page:u,refetchSignal:s,onFetchReviews:i,scrollToTop:()=>v.current?.scrollTo({top:0,behavior:"smooth"}),hideOwnReview:!0}))),o(wt,{className:on("modal-footer")},o("div",null,S&&o(Ua,{refetch:c,review:S}),o(Zd,{isAuthor:S!=null,discordId:t,name:n,refetch:c}),!!h&&o(ps,{currentPage:u,maxVisiblePages:5,pageSize:$a,totalCount:h,onPageChange:p})))))}function Jd(e,t){ke(n=>o(YM,{modalProps:n,discordId:e,name:t}))}var c0=g(()=>{"use strict";a();l();ae();Je();be();w();Ei();Vo();No();Yd();Xd()});var u0,Qd,p0=g(()=>{"use strict";a();l();QS();It();ae();td();Fn();M();x();w();c0();Xd();Fa();Ei();Vo();No();u0=(e,t)=>()=>{e.push(o(D.MenuItem,{label:"View Reviews",id:"vc-rdb-server-reviews",icon:Wo,action:()=>Jd(t.guild.id,t.guild.name)}))},Qd=y({name:"ReviewDB",description:"Review other users (Adds a new settings to profiles)",authors:[d.mantikafasi,d.Ven],settings:Fe,patches:[{find:"disableBorderColor:!0",replacement:{match:/\(.{0,10}\{user:(.),setNote:.,canDM:.,.+?\}\)/,replace:"$&,$self.getReviewsComponent($1)"}}],async start(){let e=Fe.store,{token:t,lastReviewId:n,notifyReviews:r}=e;!r||!t||setTimeout(async()=>{let i=await r0(t);if(n&&nDate.now()&&(e.user?.banInfo?.banEndDate??0)VencordNative.native.openExternal("https://reviewdb.mantikafasi.dev/api/redirect?"+new URLSearchParams({token:Fe.store.token,page:"dashboard/appeal"}))})}e.user=i},4e3)},stop(){fe("guild-header-popout",u0)},getReviewsComponent:E.wrap(e=>{let[t,n]=te();return o(Ii,{headerText:"User Reviews",onMoreClick:()=>Jd(e.id,e.username),moreTooltipText:t&&t>50?`View all ${t} reviews`:"Open Review Modal",onDropDownClick:r=>Fe.store.reviewsDropdownState=!r,defaultState:Fe.store.reviewsDropdownState},o(Di,{discordId:e.id,name:e.username,onFetchReviews:r=>n(r.reviewCount),showInput:!0}))},{message:"Failed to render Reviews"})})});var Oi,Vd,d0=g(()=>{"use strict";a();l();_();M();x();w();Oi=A({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}}),Vd=y({name:"RoleColorEverywhere",authors:[d.KingFish,d.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:()=>Oi.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:()=>Oi.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:()=>Oi.store.memberList},{find:"renderPrioritySpeaker",replacement:[{match:/renderName=function\(\).{50,75}speaking.{50,100}jsx.{5,10}{/,replace:"$&...$self.getVoiceProps(this.props),"}],predicate:()=>Oi.store.voiceUsers}],settings:Oi,getColor(e,{channelId:t,guildId:n}){return(n??=J.getChannel(t)?.guild_id)?Ee.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=de.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 m0,f0,g0,em,h0=g(()=>{"use strict";a();l();It();M();be();x();B();w();m0=se(()=>We("M10 8.26667V4L3 11.4667L10 18.9333V14.56C15 14.56 18.5 16.2667 21 20C20 14.6667 17 9.33333 10 8.26667Z")),f0=pe("showMentionToggle","TEXTAREA_FOCUS","shiftKey"),g0=(e,{message:t})=>()=>{if(Ie.getChannelId()!==t.channel_id)return;let n=J.getChannel(t?.channel_id);if(!n)return;let r=rt("pin",e);if(r&&!r.some(s=>s?.props?.id==="reply")){let s=r.findIndex(c=>c?.props.id==="pin");return r.splice(s+1,0,o(D.MenuItem,{id:"reply",label:at.Messages.MESSAGE_ACTION_REPLY,icon:m0,action:c=>f0(n,t,c)}))}let i=rt("mark-unread",e);if(i&&!i.some(s=>s?.props?.id==="reply"))return i.unshift(o(D.MenuItem,{id:"reply",label:at.Messages.MESSAGE_ACTION_REPLY,icon:m0,action:s=>f0(n,t,s)}))},em=y({name:"SearchReply",description:"Adds a reply button to search results",authors:[d.Aria],start(){me("message",g0)},stop(){fe("message",g0)}})});var y0=g(()=>{});function v0(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),``)}function XM({rootProps:e,close:t}){let[n,r]=te(),[i,s]=te(""),c=Math.round((new Date(n).getTime()||Date.now())/1e3),u=(h,S)=>``,[p,v]=Wt(()=>{let h=u(c,i);return[h,Ne.parse(h)]},[c,i]);return o(De,{...e},o(Ge,{className:_i("modal-header")},o(b.FormTitle,{tag:"h2"},"Timestamp Picker"),o(Pt,{onClick:t})),o(He,{className:_i("modal-content")},o("input",{type:"datetime-local",value:n,onChange:h=>r(h.currentTarget.value),style:{colorScheme:Wr()===2?"light":"dark"}}),o(b.FormTitle,null,"Timestamp Format"),o(un,{options:ZM.map(h=>({label:h,value:h})),isSelected:h=>h===i,select:h=>s(h),serialize:h=>h,renderOptionLabel:h=>o("div",{className:_i("format-label")},Ne.parse(u(c,h.value))),renderOptionValue:()=>v}),o(b.FormTitle,{className:z.bottom8},"Preview"),o(b.FormText,{className:_i("preview-text")},v," (",p,")")),o(wt,null,o(R,{onClick:()=>{jn(p+" "),t()}},"Insert")))}var ZM,_i,tm,S0=g(()=>{"use strict";a();l();y0();Tn();ze();M();ot();Qe();Je();x();w();ZM=["","t","T","d","D","f","F","R"],_i=Oe("vc-st-");tm=y({name:"SendTimestamps",description:"Send timestamps easily via chat box button & text shortcuts. Read the extended description!",authors:[d.Ven,d.Tyler],dependencies:["MessageEventsAPI"],patches:[{find:".activeCommandOption",replacement:{match:/(.)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&;try{$2||$1.push($self.chatBarIcon())}catch{}"}}],start(){this.listener=ut((e,t)=>{t.content=t.content.replace(/`\d{1,2}:\d{2} ?(?:AM|PM)?`/gi,v0)})},stop(){pt(this.listener)},chatBarIcon(){return o(K,{text:"Insert Timestamp"},({onMouseEnter:e,onMouseLeave:t})=>o("div",{style:{display:"flex"}},o(R,{"aria-haspopup":"dialog","aria-label":"",size:"",look:Jt.BLANK,onMouseEnter:e,onMouseLeave:t,innerClassName:gt.button,onClick:()=>{let n=ke(r=>o(XM,{rootProps:r,close:()=>zn(n)}))},className:_i("button")},o("div",{className:gt.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(m,null,o(b.FormText,null,"To quickly send send time only timestamps, include timestamps formatted as `HH:MM` (including the backticks!) in your message"),o(b.FormText,null,"See below for examples. If you need anything more specific, use the Date button in the chat bar!"),o(b.FormText,null,"Examples:",o("ul",null,e.map(t=>o("li",{key:t},o("code",null,t)," ","->"," ",Ne.parse(v0(t)))))))}})});function JM(){return x0=Dt(),o("span",{id:"vc-friendcount",style:{display:"inline-block",width:"100%",fontSize:"12px",fontWeight:"600",color:"var(--header-secondary)",textTransform:"uppercase",textAlign:"center"}},om," online")}function QM(){return w0=Dt(),o("span",{id:"vc-guildcount",style:{display:"inline-block",width:"100%",fontSize:"12px",fontWeight:"600",color:"var(--header-secondary)",textTransform:"uppercase",textAlign:"center"}},T0," servers")}function b0(){om=0;let e=nt.getRelationships();for(let t of Object.keys(e))e[t]===1&&co.getStatus(t)!=="offline"&&(om+=1);x0?.()}function nm(){T0=de.getGuildCount(),w0?.()}var om,T0,x0,w0,rm,P0=g(()=>{"use strict";a();l();La();_();ae();M();be();x();w();om=0,T0=0;rm=y({name:"ServerListIndicators",description:"Add online friend count or server count in the server list",authors:[d.dzshn],dependencies:["ServerListAPI"],options:{mode:{description:"mode",type:4,options:[{label:"Only online friend count",value:2,default:!0},{label:"Only server count",value:1},{label:"Both server and online friend counts",value:3}]}},renderIndicator:()=>{let{mode:e}=C.plugins.ServerListIndicators;return o(E,{noop:!0},o("div",{style:{marginBottom:"4px"}},!!(e&2)&&o(JM,null),!!(e&1)&&o(QM,null)))},flux:{PRESENCE_UPDATES:b0,GUILD_CREATE:nm,GUILD_DELETE:nm},start(){Ni(0,this.renderIndicator),b0(),nm()},stop(){ki(0,this.renderIndicator)}})});var M0=g(()=>{});var I0,C0=g(()=>{a();l();I0=`/* 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 }) => <> -

{\`Shigg\${real ? \`ies\${shigged === 0x1B ? "t" : ""}\` : "y"}\`}

- -; -`});var k0=Dr((SZ,im)=>{"use strict";a();l();var VM=Object.prototype.hasOwnProperty,At="~";function Bi(){}Object.create&&(Bi.prototype=Object.create(null),new Bi().__proto__||(At=!1));function eI(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function N0(e,t,n,r,i){if(typeof n!="function")throw new TypeError("The listener must be a function");var s=new eI(n,r||e,i),c=At?At+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function Ga(e,t){--e._eventsCount===0?e._events=new Bi:delete e._events[t]}function yt(){this._events=new Bi,this._eventsCount=0}yt.prototype.eventNames=function(){var t=[],n,r;if(this._eventsCount===0)return t;for(r in n=this._events)VM.call(n,r)&&t.push(At?r.slice(1):r);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(n)):t};yt.prototype.listeners=function(t){var n=At?At+t:t,r=this._events[n];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,s=r.length,c=new Array(s);i{"use strict";a();l();Object.defineProperty(Cr,"__esModule",{value:!0});Cr.Channel=Cr.ChannelPort=void 0;var tI=k0(),Ha="vapIpc",sm=Symbol.for("vapIpc.edgeCreate"),am=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 c=s.get(n);c&&c(...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,c)=>void r.set(s,c)};return this._pipes.set(t,i),i}getPipe(t){return this._pipes.get(t)??null}};Cr.ChannelPort=am;var lm=class{id;_edges=new Map;_callbacks=new Map;_callers=new Map;_edgePipes=new Map;_pipes=[];_emitter=new tI.EventEmitter;_logger;_destroyed=!1;constructor(t){this.id=t}addPipe(t){t.listen(`${Ha}:handshake`,n=>{this._handleHandshake(t,n)}),t.listen(`${Ha}: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(sm,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(`${Ha}:handshake`,n)}_emitMessage(t){let n=this.findEdgeId(t.destination);if(!n)return;this._edgePipes.get(n)?.emit(`${Ha}: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(sm,i),r(s.id))};this._emitter.on(sm,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,c)=>{let u=setTimeout(()=>{this._callbacks.delete(r),c(new Error("Call timed out"))},n.timeout);this._callbacks.set(r,p=>{this._callbacks.delete(r),clearTimeout(u),n.signal?.aborted?n.signal.reason instanceof Error&&c(n.signal.reason):p instanceof Error?c(p):s(p)})});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}};Cr.Channel=lm});var dm=Dr(Nr=>{"use strict";a();l();Object.defineProperty(Nr,"__esModule",{value:!0});Nr.RemoteClient=Nr.RemoteHost=void 0;var um=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()}};Nr.RemoteHost=um;var pm=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})}};Nr.RemoteClient=pm});var L0=Dr(kr=>{"use strict";a();l();Object.defineProperty(kr,"__esModule",{value:!0});kr.WorkerClient=kr.createWorkerHost=void 0;var R0=cm(),A0=dm(),nI=(e,t)=>{let n=new R0.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 A0.RemoteHost(n,t)};kr.createWorkerHost=nI;var mm=class extends A0.RemoteClient{workerOpts;worker;workerListeners=[];url;constructor(t,n,r,i={}){let s=new R0.Channel(t);if(super(n,s),this.workerOpts=i,r instanceof Blob){let c=new Blob([r],{type:"text/javascript"});this.url=URL.createObjectURL(c)}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:c,data:u}=s.data;c===n&&r(u)};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)}};kr.WorkerClient=mm});var E0=Dr(ro=>{"use strict";a();l();var oI=ro&&ro.__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]}),fm=ro&&ro.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&oI(t,e,n)};Object.defineProperty(ro,"__esModule",{value:!0});fm(cm(),ro);fm(dm(),ro);fm(L0(),ro)});function hm(e){za.id!==e.id&&(Object.assign(za,e),gm.forEach(t=>t(e)))}var za,gm,D0,ym=g(()=>{"use strict";a();l();w();za={id:null,theme:null},gm=new Set,D0=()=>{let[,e]=N.useState(za);return N.useEffect(()=>(gm.add(e),()=>void gm.delete(e)),[]),za}});function er(e){if(Object.prototype.hasOwnProperty.call(Rr,e))return Rr[e];let t=Object.values(Rr).find(n=>n.aliases?.includes(e));return t?(lI.set(e,t),t):null}var rI,iI,O0,sI,aI,Rr,_0,B0,lI,ja=g(()=>{"use strict";a();l();rI="Vap0r1ze/vapcord",iI="88a7032a59cca40da170926651b08201ea3b965a",O0=`https://raw.githubusercontent.com/${rI}/${iI}/assets/shiki-codeblocks`,sI=e=>`${O0}/${e}`,aI=`${O0}/languages.json`,Rr={},_0=async()=>{let e=await f(aI).then(n=>n.json()),t=Object.fromEntries(e.map(n=>[n.id,{...n,grammarUrl:sI(n.fileName)}]));Object.assign(Rr,t)},B0=e=>e.grammar?Promise.resolve(e.grammar):f(e.grammarUrl).then(t=>t.json()),lI=new Map});var cI,uI,Te,io,vm=g(()=>{"use strict";a();l();cI="shikijs/shiki",uI="0b28ad8ccfbf2615f2d9d38ea8255416b8ac3043",Te=e=>`https://raw.githubusercontent.com/${cI}/${uI}/packages/shiki/themes/${e}.json`,io={DarkPlus:Te("dark-plus"),MaterialCandy:"https://raw.githubusercontent.com/millsp/material-candy/master/material-candy.json",DraculaSoft:Te("dracula-soft"),Dracula:Te("dracula"),GithubDarkDimmed:Te("github-dark-dimmed"),GithubDark:Te("github-dark"),GithubLight:Te("github-light"),LightPlus:Te("light-plus"),MaterialDarker:Te("material-darker"),MaterialDefault:Te("material-default"),MaterialLighter:Te("material-lighter"),MaterialOcean:Te("material-ocean"),MaterialPalenight:Te("material-palenight"),MinDark:Te("min-dark"),MinLight:Te("min-light"),Monokai:Te("monokai"),Nord:Te("nord"),OneDarkPro:Te("one-dark-pro"),Poimandres:Te("poimandres"),RosePineDawn:Te("rose-pine-dawn"),RosePineMoon:Te("rose-pine-moon"),RosePine:Te("rose-pine"),SlackDark:Te("slack-dark"),SlackOchin:Te("slack-ochin"),SolarizedDark:Te("solarized-dark"),SolarizedLight:Te("solarized-light"),VitesseDark:Te("vitesse-dark"),VitesseLight:Te("vitesse-light"),CssVariables:Te("css-variables")}});var $0,Sm,F0,le,Fi=g(()=>{"use strict";a();l();gi();$0=cl(E0());ym();ja();vm();Sm=Object.values(io),le={client:null,currentTheme:null,currentThemeUrl:null,timeoutMs:1e4,languages:Rr,themes:io,loadedThemes:new Set,loadedLangs:new Set,clientPromise:new Promise(e=>F0=e),init:async e=>{let t=await f(tv).then(i=>i.blob()),n=le.client=new $0.WorkerClient("shiki-client","shiki-host",t,{name:"ShikiWorker"});await n.init();let r=e||Sm[0];await _0(),await n.run("setOnigasm",{wasm:nv}),await n.run("setHighlighter",{theme:r,langs:[]}),le.loadedThemes.add(r),await le._setTheme(r),F0(n)},_setTheme:async e=>{le.currentThemeUrl=e;let{themeData:t}=await le.client.run("getTheme",{theme:e});le.currentTheme=JSON.parse(t),hm({id:e,theme:le.currentTheme})},loadTheme:async e=>{let t=await le.clientPromise;le.loadedThemes.has(e)||(await t.run("loadTheme",{theme:e}),le.loadedThemes.add(e))},setTheme:async e=>{await le.clientPromise,e||=Sm[0],le.loadedThemes.has(e)||await le.loadTheme(e),await le._setTheme(e)},loadLang:async e=>{let t=await le.clientPromise,n=er(e);!n||le.loadedLangs.has(n.id)||(await t.run("loadLanguage",{lang:{...n,grammar:n.grammar??await B0(n)}}),le.loadedLangs.add(n.id))},tokenizeCode:async(e,t)=>{let n=await le.clientPromise,r=er(t);return r?(le.loadedLangs.has(r.id)||await le.loadLang(r.id),await n.run("codeToThemedTokens",{code:e,lang:t,theme:le.currentThemeUrl??Sm[0]})):[]},destroy(){le.currentTheme=null,le.currentThemeUrl=null,hm({id:null,theme:null}),le.client?.destroy()}}});var $i,bm=g(()=>{a();l();(unsafeWindow.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});$i="src/plugins/shikiCodeblocks/devicon.css"});var Ui=g(()=>{"use strict";a();l()});var dI,ko,Tm=g(()=>{"use strict";a();l();_();ze();he();Kn();x();Fi();vm();bm();Ui();dI=Object.keys(io),ko=A({theme:{type:4,description:"Default themes",options:dI.map(e=>({label:qn($l(e)),value:io[e],default:io[e]===io.DarkPlus})),onChange:le.setTheme},customTheme:{type:0,description:"A link to a custom vscode theme",placeholder:io.MaterialCandy,onChange:e=>{le.setTheme(e||ko.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"?Ct($i):Ve($i)}},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=Tl(e);return t?t.pathname.endsWith(".json")?!0:"Must be a json file":"Must be a valid URL"}}})});function G0(e,t){let n=ko.use(e),[r,i]=N.useState(!1),s={...n,...t},c=s.customTheme||s.theme;if(t){let u=le.currentThemeUrl&&c&&c!==le.currentThemeUrl,p=Object.keys(t).length===0;r&&(!u||p)&&i(!1),!r&&u&&(i(!0),le.setTheme(c))}return{...s,isThemeLoading:c!==le.currentThemeUrl}}var H0=g(()=>{"use strict";a();l();w();Fi();Tm()});function z0(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 j0=g(()=>{"use strict";a();l()});var Mn,W0,Gi=g(()=>{"use strict";a();l();ze();w();ja();Ui();Mn=Oe("shiki-"),W0=({lang:e,tryHljs:t})=>{let n=e?$o?.getLanguage?.(e):null,i=(e?er(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 q0(e){let[t,n]=N.useState(!1);function r(i){Zt.copy(i),n(!0),setTimeout(()=>{n(!1)},e)}return[t,r]}var K0=g(()=>{"use strict";a();l();w()});function Y0({content:e,...t}){let[n,r]=q0(1e3);return o("button",{...t,style:{...t.style,cursor:n?"default":void 0},onClick:()=>r(e)},n?"Copied!":"Copy")}var Z0=g(()=>{"use strict";a();l();K0()});function X0({content:e,theme:t}){let n=[];return Zt.SUPPORTS_COPY&&n.push(o(Y0,{content:e,className:Mn("btn"),style:{backgroundColor:t.accentBgColor,color:t.accentFgColor}})),o("div",{className:Mn("btns")},n)}var J0=g(()=>{"use strict";a();l();w();Gi();Z0()});var Q0,V0=g(()=>{"use strict";a();l();w();Gi();Q0=({theme:e,useHljs:t,lang:n,content:r,tokens:i})=>{let s;if(t)try{let{value:u}=$o.highlight(n,r,!0);s=u.split(` -`).map((p,v)=>o("span",{key:v,dangerouslySetInnerHTML:{__html:p}}))}catch{s=r.split(` -`).map(u=>o("span",null,u))}else s=(i??r.split(` -`).map(p=>[{color:e.plainColor,content:p}])).map(p=>p.length===0?o("span",null,` -`):o(m,null,p.map(({content:v,color:h,fontStyle:S},T)=>o("span",{key:T,style:{color:h,fontStyle:(S??0)&1?"italic":void 0,fontWeight:(S??0)&2?"bold":void 0,textDecoration:(S??0)&4?"underline":void 0}},v))));let c=s.map((u,p)=>o("tr",{key:p},o("td",{style:{color:e.plainColor}},p+1),o("td",null,u)));return o("table",{className:Mn("table")},...c)}});function eb({langName:e,useDevIcon:t,shikiLang:n}){return e?o("div",{className:Mn("lang")},t!=="DISABLED"&&n?.devicon&&o("i",{className:`${Mn("devicon")} devicon-${n.devicon}${t==="COLOR"?" colored":""}`}),e):o(m,null)}var tb=g(()=>{"use strict";a();l();Ui();Gi()});var Wa,mI,nb=g(()=>{"use strict";a();l();ae();be();w();ja();Fi();H0();ym();j0();Gi();J0();V0();tb();Wa=e=>o("pre",{className:Mn("container")},o(E,null,o(mI,{...e}))),mI=({lang:e,content:t,isPreview:n,tempSettings:r})=>{let{tryHljs:i,useDevIcon:s,bgOpacity:c}=G0(["tryHljs","useDevIcon","bgOpacity"],r),{id:u,theme:p}=D0(),v=e?er(e):null,h=W0({lang:e,tryHljs:i}),[S,T]=wl(!0),[P]=it(async()=>!v||h||!T?null:await le.tokenizeCode(t,e),{fallbackValue:null,deps:[e,t,u,T]}),L={plainColor:p?.fg||"var(--text-normal)",accentBgColor:p?.colors?.["statusBar.background"]||(h?"#7289da":"#007BC8"),accentFgColor:p?.colors?.["statusBar.foreground"]||"#FFF",backgroundColor:p?.colors?.["editor.background"]||"var(--background-secondary)"},k;return e&&(k=h?$o?.getLanguage?.(e)?.name:v?.name),o("div",{ref:S,className:Mn("root",{plain:!k,preview:n}),style:{backgroundColor:h?L.backgroundColor:`rgba(${z0(L.backgroundColor).concat(c/100).join(", ")})`,color:L.plainColor}},o("code",null,o(eb,{langName:k,useDevIcon:s,shikiLang:v}),o(Q0,{theme:L,useHljs:h,lang:e,content:t,tokens:P}),!n&&o(X0,{content:t,theme:L})))}});var ob,rb,ib=g(()=>{"use strict";a();l();ob=new Map,rb=()=>{ob.forEach(e=>e.remove()),ob.clear()}});var xm,sb=g(()=>{"use strict";a();l();M0();ze();M();x();C0();Fi();nb();bm();Tm();Ui();ib();xm=y({name:"ShikiCodeblocks",description:"Brings vscode-style codeblocks into Discord, powered by Shiki",authors:[d.Vap],patches:[{find:"codeBlock:{react:function",replacement:{match:/codeBlock:\{react:function\((\i),(\i),(\i)\)\{/,replace:"$&return $self.renderHighlighter($1,$2,$3);"}}],start:async()=>{ko.store.useDevIcon!=="DISABLED"&&Ve($i),await le.init(ko.store.customTheme||ko.store.theme)},stop:()=>{le.destroy(),rb()},settingsAboutComponent:({tempSettings:e})=>Wa({lang:"tsx",content:I0,isPreview:!0,tempSettings:e}),settings:ko,shiki:le,createHighlighter:Wa,renderHighlighter:({lang:e,content:t})=>Wa({lang:e,content:t,isPreview:!1})})});var wm,ab=g(()=>{"use strict";a();l();M();x();wm=y({name:"ShowAllMessageButtons",description:"Always show all message buttons no matter if you are holding the shift key or not.",authors:[d.Nuckyz],patches:[{find:".Messages.MESSAGE_UTILITIES_A11Y_LABEL",replacement:{match:/isExpanded:(\i),(?<=,\1=\i&&(?=(!.+?)[,;]).+?)/,replace:"isExpanded:$2,"}}]})});var lb=g(()=>{});function ub(){let e=Ur(cb.colors.INTERACTIVE_MUTED).hex(),t=Ur(cb.colors.INTERACTIVE_ACTIVE).hex();return o(fI,{color:e,forcedIconColor:t,size:16,tooltipText:at.Messages.CONNECTION_VERIFIED})}var cb,fI,pb=g(()=>{"use strict";a();l();be();B();w();cb=Ae(e=>e.colors?.INTERACTIVE_MUTED?.css),fI=se(()=>We(".CONNECTIONS_ROLE_OFFICIAL_ICON_TOOLTIP"))});function db({id:e,theme:t}){let n=hI.getUserProfile(e);if(!n)return null;let r=n.connectedAccounts;return r?.length?o(gI,null,o(ee,{tag:"h2",variant:"eyebrow",style:{color:"var(--header-primary)"}},"Connections"),o(ue,{style:{marginTop:"8px",gap:bI(qa.store.iconSpacing),flexWrap:"wrap"}},r.map(i=>o(wI,{connection:i,theme:t})))):null}function wI({connection:e,theme:t}){let n=vI.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:qa.store.iconSize,height:qa.store.iconSize}}),s=r?Xs:Sy;return o(K,{text:o("span",{className:"vc-sc-tooltip"},e.name,e.verified&&o(ub,null),o(s,{height:16,width:16})),key:e.id},c=>r?o("a",{...c,className:"vc-user-connection",href:r,target:"_blank",onClick:u=>{Vencord.Plugins.isPluginEnabled("OpenInApp")&&Vencord.Plugins.plugins.OpenInApp.handleLink(u.currentTarget,u)}},i):o("button",{...c,className:"vc-user-connection",onClick:()=>Xt(e.name)},i))}var gI,hI,yI,vI,SI,bI,qa,TI,xI,Pm,mb=g(()=>{"use strict";a();l();lb();_();ae();Mt();Fn();M();he();be();x();B();w();pb();gI=se(()=>We("().lastSection")),hI=ce("UserProfileStore"),yI=ce("ThemeStore"),vI=I("isSupported","getByUrl"),SI=pe(',"--profile-gradient-primary-color"'),bI=e=>(e??0)*2+4,qa=A({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}]}}),TI=E.wrap(e=>o(db,{id:e.user.id,theme:SI(e.user,e.displayProfile).profileTheme})),xI=E.wrap(e=>o(db,{id:e.channel.recipients[0],theme:yI.theme}));Pm=y({name:"ShowConnections",description:"Show connected accounts in user popouts",authors:[d.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:qa,profilePopoutComponent:TI,profilePanelComponent:xI})});var fb=g(()=>{});function yb(e){hb=e}function EI({channel:e}){let[t,n]=te(Ro.store.defaultAllowedUsersAndRolesDropdownState),[r,i]=te([]),{type:s,topic:c,lastMessageId:u,defaultForumLayout:p,lastPinTimestamp:v,defaultAutoArchiveDuration:h,availableTags:S,id:T,rateLimitPerUser:P,defaultThreadRateLimitPerUser:L,defaultSortOrder:k,defaultReactionEmoji:F,bitrate:G,rtcRegion:$,videoQualityMode:Y,permissionOverwrites:ne,guild_id:q}=e;return st(()=>{let W=[],oe=de.getGuild(q).ownerId;Ee.getMember(q,oe)||W.push(oe),Object.values(ne).forEach(({type:H,id:Re})=>{H===1&&!Ee.getMember(q,Re)&&W.push(Re)}),W.length>0&&O.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[q],userIds:W}),C.plugins.PermissionsViewer.enabled&&i(va(Object.values(ne).map(H=>({type:H.type,id:H.id,overwriteAllow:H.allow,overwriteDeny:H.deny})),q))},[T]),o("div",{className:gb.auto+" "+gb.customTheme+" "+PI.chatContent+" shc-lock-screen-outer-container"},o("div",{className:"shc-lock-screen-container"},o("img",{className:"shc-lock-screen-logo",src:LI}),o("div",{className:"shc-lock-screen-heading-container"},o(ee,{variant:"heading-xxl/bold"},"This is a ",qe.can(Mm,e)?"locked":"hidden"," ",NI[s]," channel."),e.isNSFW()&&o(K,{text:"NSFW"},({onMouseLeave:W,onMouseEnter:oe})=>o("svg",{onMouseLeave:W,onMouseEnter:oe,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(ee,{variant:"text-lg/normal"},"You can not see the ",e.isForumChannel()?"posts":"messages"," of this channel.",e.isForumChannel()&&c&&c.length>0&&" However you may see its guidelines:"),e.isForumChannel()&&c&&c.length>0&&o("div",{className:"shc-lock-screen-topic-container"},Ne.parseTopic(c,!1,{channelId:T})),u&&o(ee,{variant:"text-md/normal"},"Last ",e.isForumChannel()?"post":"message"," created:",o(An,{timestamp:Vt(ar.extractTimestamp(u))})),v&&o(ee,{variant:"text-md/normal"},"Last message pin: ",o(An,{timestamp:Vt(v)})),(P??0)>0&&o(ee,{variant:"text-md/normal"},"Slowmode: ",Yr(P,"seconds")),(L??0)>0&&o(ee,{variant:"text-md/normal"},"Default thread slowmode: ",Yr(L,"seconds")),(e.isGuildVoice()||e.isGuildStageVoice())&&G!=null&&o(ee,{variant:"text-md/normal"},"Bitrate: ",G," bits"),$!==void 0&&o(ee,{variant:"text-md/normal"},"Region: ",$??"Automatic"),(e.isGuildVoice()||e.isGuildStageVoice())&&o(ee,{variant:"text-md/normal"},"Video quality mode: ",AI[Y??1]),(h??0)>0&&o(ee,{variant:"text-md/normal"},"Default inactivity duration before archiving ",e.isForumChannel()?"posts":"threads",":"," "+Yr(h,"minutes")),p!=null&&o(ee,{variant:"text-md/normal"},"Default layout: ",RI[p]),k!=null&&o(ee,{variant:"text-md/normal"},"Default sort order: ",kI[k]),F!=null&&o("div",{className:"shc-lock-screen-default-emoji-container"},o(ee,{variant:"text-md/normal"},"Default reaction emoji:"),Ne.defaultRules[F.emojiName?"emoji":"customEmoji"].react({name:F.emojiName?II.convertSurrogateToName(F.emojiName):mn.getCustomEmojiById(F.emojiId)?.name??"",emojiId:F.emojiId??void 0,surrogate:F.emojiName??void 0,src:F.emojiName?CI.getURL(F.emojiName):void 0},void 0,{key:"0"})),e.hasFlag(16)&&o(ee,{variant:"text-md/normal"},"Posts on this forum require a tag to be set."),S&&S.length>0&&o("div",{className:"shc-lock-screen-tags-container"},o(ee,{variant:"text-lg/bold"},"Available tags:"),o("div",{className:"shc-lock-screen-tags"},S.map(W=>o(MI,{tag:W})))),o("div",{className:"shc-lock-screen-allowed-users-and-roles-container"},o("div",{className:"shc-lock-screen-allowed-users-and-roles-container-title"},C.plugins.PermissionsViewer.enabled&&o(K,{text:"Permission Details"},({onMouseLeave:W,onMouseEnter:oe})=>o("button",{onMouseLeave:W,onMouseEnter:oe,className:"shc-lock-screen-allowed-users-and-roles-container-permdetails-btn",onClick:()=>Tr(r,de.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(ee,{variant:"text-lg/bold"},"Allowed users and roles:"),o(K,{text:t?"Hide Allowed Users and Roles":"View Allowed Users and Roles"},({onMouseLeave:W,onMouseEnter:oe})=>o("button",{onMouseLeave:W,onMouseEnter:oe,className:"shc-lock-screen-allowed-users-and-roles-container-toggle-btn",onClick:()=>n(H=>!H)},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(hb,{channel:e}))))}var hb,gb,PI,MI,II,CI,NI,kI,RI,AI,LI,vb,Sb=g(()=>{"use strict";a();l();_();ae();be();Kn();B();w();Pi();wi();Im();gb=I("auto","content","scrollerBase"),PI=I("chat","content","noChat","chatContent"),MI=se(()=>jt(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")})),II=I("convertSurrogateToName"),CI=I("getURL","buildEmojiReactionColorsPlatformed"),NI={[0]:"text",[5]:"announcement",[15]:"forum",[2]:"voice",[13]:"stage"},kI={[0]:"Latest activity",[1]:"Creation date"},RI={[0]:"Not set",[1]:"List view",[2]:"Gallery view"},AI={[1]:"Automatic",[2]:"720p"},LI="/assets/433e3ec4319a9d11b0cbe39342614982.svg";vb=E.wrap(EI)});var bb,Mm,Cm,Ro,Nm,Im=g(()=>{"use strict";a();l();fb();_();ae();M();Kr();x();B();w();Sb();bb=I("channelEmoji","unread","icon"),Mm=1n<<10n,Cm=1n<<20n,Ro=A({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}}),Nm=y({name:"ShowHiddenChannels",description:"Show channels that you do not have access to view.",authors:[d.BigDuck,d.AverageReactEnjoyer,d.D3SOX,d.Ven,d.Nuckyz,d.Nickyux,d.dzshn],settings:Ro,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:()=>Ro.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:()=>Ro.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:()=>Ro.store.hideUnreads===!1&&Ro.store.showMode===1,match:/\.LOCKED:\i(?<=(\i)=\i\.channel,.+?)/,replace:(e,t)=>`${e}&&!$self.isHiddenChannel(${t})`},{predicate:()=>Ro.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(${Cm}n,${t})?${n}CONNECT):`},{match:/permissionOverwrites\[.+?\i=(?<=context:(\i)}.+?)(?=(.+?)VIEW_CHANNEL)/,replace:(e,t,n)=>`${e}!Vencord.Webpack.Common.PermissionStore.can(${Cm}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(Ho(/(?<=users:\i)/),`,channel:${n}`),t=t.replace(Ho(/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:yb,isHiddenChannel(e,t=!1){return!e||(e.channelId&&(e=J.getChannel(e.channelId)),!e||e.isDM()||e.isGroupDM()||e.isMultiUserDM())?!1:!qe.can(Mm,e)||t&&!qe.can(Cm,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(c=>c.id===e);return s?[s]:i},[]]},HiddenChannelLockScreen:e=>o(vb,{channel:e}),LockIcon:E.wrap(()=>o("svg",{className:bb.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:E.wrap(()=>o(K,{text:"Hidden Channel"},({onMouseLeave:e,onMouseEnter:t})=>o("svg",{onMouseLeave:e,onMouseEnter:t,className:bb.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 Tb=g(()=>{});var Ka,km,xb=g(()=>{"use strict";a();l();Tb();_();M();x();Ka=A({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"}}),km=y({name:"ShowMeYourName",description:"Display usernames next to nicks, or no nicks at all",authors:[d.dzshn],patches:[{find:".withMentionPrefix",replacement:{match:/(?<=onContextMenu:\i,children:)\i\+\i/,replace:"$self.renderUsername(arguments[0])"}}],settings:Ka,renderUsername:({author:e,message:t,isRepliedMessage:n,withMentionPrefix:r})=>{if(t.interaction)return e?.nick;try{let{username:i}=t.author,{nick:s}=e,c=r?"@":"";return i===s||n&&!Ka.store.inReplies?c+s:Ka.store.mode==="user-nick"?o(m,null,c,i," ",o("span",{className:"vc-smyn-suffix"},s)):Ka.store.mode==="nick-user"?o(m,null,c,s," ",o("span",{className:"vc-smyn-suffix"},i)):c+i}catch{return e?.nick}}})});function DI(e){let[t,n]=N.useState(Rm);function r(i){Am.store.persistState&&(Rm=i),n(i)}return N.useEffect(()=>{let i=(s,c)=>{t&&(Am.store.autoDisable&&r(!1),c.content.startsWith("@silent ")||(c.content="@silent "+c.content))};return ut(i),()=>void pt(i)},[t]),e.type.analyticsName!=="normal"?null:o(K,{text:t?"Disable Silent Message":"Enable Silent Message"},i=>o("div",{style:{display:"flex"}},o(R,{...i,onClick:()=>r(!t),size:"",look:Jt.BLANK,innerClassName:gt.button,style:{padding:"0 6px"}},o("div",{className:gt.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 Rm,Am,Lm,wb=g(()=>{"use strict";a();l();Tn();_();ae();M();x();w();Rm=!1,Am=A({persistState:{type:3,description:"Whether to persist the state of the silent message toggle when changing channels",default:!1,onChange(e){e===!1&&(Rm=!1)}},autoDisable:{type:3,description:"Automatically disable the silent message toggle again after sending one",default:!0}});Lm=y({name:"SilentMessageToggle",authors:[d.Nuckyz,d.CatNoir],description:"Adds a button to the chat bar to toggle sending a silent message.",dependencies:["MessageEventsAPI"],settings:Am,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:E.wrap(DI,{noop:!0})})});function OI(e){let{isEnabled:t}=so.use(["isEnabled"]),n=()=>so.store.isEnabled=!so.store.isEnabled;return e.type.analyticsName!=="normal"?null:o(K,{text:t?"Disable Silent Typing":"Enable Silent Typing"},r=>o("div",{style:{display:"flex"}},o(R,{...r,onClick:n,size:"",look:Jt.BLANK,innerClassName:gt.button,style:{padding:"0 6px"}},o("div",{className:gt.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 so,Em,Pb=g(()=>{"use strict";a();l();Ft();_();ae();M();x();w();so=A({showIcon:{type:3,default:!1,description:"Show an icon for toggling the plugin",restartNeeded:!0},isEnabled:{type:3,description:"Toggle functionality",default:!0}});Em=y({name:"SilentTyping",authors:[d.Ven,d.dzshn],description:"Hide that you are typing",patches:[{find:"startTyping:",replacement:{match:/startTyping:.+?,stop/,replace:"startTyping:$self.startTyping,stop"}},{find:".activeCommandOption",predicate:()=>so.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:so,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)=>{so.store.isEnabled=!!Be(e,"value",!so.store.isEnabled),ie(t.channel.id,{content:so.store.isEnabled?"Silent typing enabled!":"Silent typing disabled!"})}}],async startTyping(e){so.store.isEnabled||O.dispatch({type:"TYPING_START_LOCAL",channelId:e})},chatBarIcon:E.wrap(OI,{noop:!0})})});var Dm,Mb=g(()=>{"use strict";a();l();Mt();M();x();w();Om();Dm=y({name:"SortFriendRequests",authors:[d.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:()=>C.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(nt.getSince(e.id))},makeSubtext(e,t){let n=this.getSince(t);return o(ue,{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 Ib,Cb=g(()=>{a();l();(unsafeWindow.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});Ib="src/plugins/spotifyControls/hoverOnly.css"});var Nb=g(()=>{});var Se,kb=g(()=>{"use strict";a();l();_();ln();B();w();Se=ft(()=>{let{Store:e}=Il,t=I("getActiveSocketAndDevice"),n=I("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(u){let p=C.plugins.SpotifyControls.useSpotifyUris||Vencord.Plugins.isPluginEnabled("OpenInApp")?"spotify:"+u.replaceAll("/",(v,h)=>h===0?"":":"):"https://open.spotify.com"+u;VencordNative.native.openExternal(p)}get position(){let u=this.mPosition;return this.isPlaying&&(u+=Date.now()-this.start),u}set position(u){this.mPosition=u,this.start=Date.now()}prev(){this.req("post","/previous")}next(){this.req("post","/next")}setVolume(u){this.req("put","/volume",{query:{volume_percent:Math.round(u)}}).then(()=>{this.volume=u,this.emitChange()})}setPlaying(u){this.req("put",u?"/play":"/pause")}setRepeat(u){this.req("put","/repeat",{query:{state:u}})}setShuffle(u){this.req("put","/shuffle",{query:{state:u}}).then(()=>{this.shuffle=u,this.emitChange()})}seek(u){return this.isSettingPosition?Promise.resolve():(this.isSettingPosition=!0,this.req("put","/seek",{query:{position_ms:Math.round(u)}}).catch(p=>{console.error("[VencordSpotifyControls] Failed to seek",p),this.isSettingPosition=!1}))}req(u,p,v={}){this.device?.is_active&&((v.query??={}).device_id=this.device.id);let{socket:h}=t.getActiveSocketAndDevice();return n[u](h.accountId,h.accessToken,{url:r+p,...v})}}let s=new i(O,{SPOTIFY_PLAYER_STATE(c){s.track=c.track,s.device=c.device??null,s.isPlaying=c.isPlaying??!1,s.volume=c.volumePercent??0,s.repeat=c.actual_repeat||"off",s.position=c.position??0,s.isSettingPosition=!1,s.emitChange()},SPOTIFY_SET_DEVICES({devices:c}){s.device=c.find(u=>u.is_active)??c[0]??null,s.emitChange()}});return s})});function _m(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 Ar(e,t){return()=>o("svg",{className:V(Me("button-icon"),Me(t)),height:"24",width:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":t,focusable:!1},o("path",{d:e}))}function Hi(e){return o("button",{className:Me("button"),...e},e.children)}function HI({name:e,path:t}){let n=`spotify-copy-${e}`,r=`spotify-open-${e}`;return o(D.Menu,{navId:`spotify-${e}-menu`,onClose:()=>O.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":`Spotify ${e} Menu`},o(D.MenuItem,{key:n,id:n,label:`Copy ${e} Link`,action:()=>Xt("https://open.spotify.com"+t),icon:Xs}),o(D.MenuItem,{key:r,id:r,label:`Open ${e} in Spotify`,action:()=>Se.openExternal(t),icon:Wo}))}function zI(e,t){return n=>pn.open(n,()=>o(HI,{name:e,path:t}))}function jI(){let[e,t,n]=Ue([Se],()=>[Se.isPlaying,Se.shuffle,Se.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(ue,{className:Me("button-row"),style:{gap:0}},o(Hi,{className:V(Me("button"),Me(t?"shuffle-on":"shuffle-off")),onClick:()=>Se.setShuffle(!t)},o(GI,null)),o(Hi,{onClick:()=>Se.prev()},o(FI,null)),o(Hi,{onClick:()=>Se.setPlaying(!e)},e?o(BI,null):o(_I,null)),o(Hi,{onClick:()=>Se.next()},o($I,null)),o(Hi,{className:V(Me("button"),Me(i)),onClick:()=>Se.setRepeat(r),style:{position:"relative"}},n==="track"&&o("span",{className:Me("repeat-1")},"1"),o(UI,null)))}function qI(){let{duration:e}=Se.track,[t,n,r]=Ue([Se],()=>[Se.mPosition,Se.isSettingPosition,Se.isPlaying]),[i,s]=te(t);return st(()=>{if(r&&!n){s(Se.position);let c=setInterval(()=>{s(u=>u+1e3)},1e3);return()=>clearInterval(c)}},[t,n,r]),o("div",{id:Me("progress-bar")},o(b.FormText,{variant:"text-xs/medium",className:Me("progress-time")+" "+Me("time-left"),"aria-label":"Progress"},_m(i)),o(D.MenuSliderControl,{minValue:0,maxValue:e,value:i,onChange:c=>{n||(s(c),WI(c))},renderValue:_m}),o(b.FormText,{variant:"text-xs/medium",className:Me("progress-time")+" "+Me("time-right"),"aria-label":"Total Duration"},_m(e)))}function KI({track:e}){let t=Ue([Se],()=>Se.volume);return o(D.Menu,{navId:"spotify-album-menu",onClose:()=>O.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Spotify Album Menu"},o(D.MenuItem,{key:"open-album",id:"open-album",label:"Open Album",action:()=>Se.openExternal(`/album/${e.album.id}`),icon:Wo}),o(D.MenuItem,{key:"view-cover",id:"view-cover",label:"View Album Cover",action:()=>Uo(e.album.image.url),icon:qo}),o(D.MenuControlItem,{id:"spotify-volume",key:"spotify-volume",label:"Volume",control:(n,r)=>o(D.MenuSliderControl,{...n,ref:r,value:t,minValue:0,maxValue:100,onChange:Et(i=>Se.setVolume(i))})}))}function Bm(e,t,n){return t?{role:"link",onClick:()=>Se.openExternal(n),onContextMenu:zI(e,n)}:{}}function YI({track:e}){let t=e?.album?.image,[n,r]=te(!1),i=o(m,null,t&&o("img",{id:Me("album-image"),src:t.url,alt:"Album Image",onClick:()=>r(!n),onContextMenu:s=>{pn.open(s,()=>o(KI,{track:e}))}}));return n&&t?o("div",{id:Me("album-expanded-wrapper")},i):o("div",{id:Me("info-wrapper")},i,o("div",{id:Me("titles")},o(b.FormText,{variant:"text-sm/semibold",id:Me("song-title"),className:Me("ellipoverflow"),title:e.name,...Bm("Song",e.id,`/track/${e.id}`)},e.name),e.artists.some(s=>s.name)&&o(b.FormText,{variant:"text-sm/normal",className:Me("ellipoverflow")},"by\xA0",e.artists.map((s,c)=>o(N.Fragment,{key:s.name},o("span",{className:Me("artist"),style:{fontSize:"inherit"},title:s.name,...Bm("Artist",s.id,`/artist/${s.id}`)},s.name),c!==e.artists.length-1&&o("span",{className:Me("comma")},", ")))),e.album.name&&o(b.FormText,{variant:"text-sm/normal",className:Me("ellipoverflow")},"on\xA0",o("span",{id:Me("album-title"),className:Me("album"),style:{fontSize:"inherit"},title:e.album.name,...Bm("Album",e.album.id,`/album/${e.album.id}`)},e.album.name))))}function Rb(){let e=Ue([Se],()=>Se.track,null,(s,c)=>s?.id?s.id===c?.id:s?.name===c?.name),t=Ue([Se],()=>Se.device,null,(s,c)=>s?.id===c?.id),n=Ue([Se],()=>Se.isPlaying),[r,i]=te(!1);return N.useEffect(()=>{if(i(!1),!n){let s=setTimeout(()=>i(!0),3e5);return()=>clearTimeout(s)}},[n]),!e||!t?.is_active||r?null:o(E,{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:Me("player")},o(YI,{track:e}),o(qI,null),o(jI,null)))}var Me,_I,BI,FI,$I,UI,GI,WI,Ab=g(()=>{"use strict";a();l();Nb();ae();Mt();Fn();rr();ot();he();w();kb();Me=e=>`vc-spotify-${e}`;_I=Ar("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"),BI=Ar("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"),FI=Ar("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"),$I=Ar("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"),UI=Ar("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"),GI=Ar("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");WI=Et(e=>{Se.seek(e)})});function Lb(e){(e?Ve:Ct)(Ib)}var Fm,Eb=g(()=>{"use strict";a();l();_();ze();M();x();Cb();Ab();Fm=y({name:"SpotifyControls",description:"Adds a Spotify player above the account panel",authors:[d.Ven,d.afn,d.KraXen72],options:{hoverControls:{description:"Show controls on hover",type:3,default:!1,onChange:e=>Lb(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:()=>Lb(C.plugins.SpotifyControls.hoverControls),renderPlayer:()=>o(Rb,null)})});var $m,Um,Db=g(()=>{"use strict";a();l();_();M();x();$m=A({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}}),Um=y({name:"SpotifyCrack",description:"Free listen along, no auto-pausing in voice chat, and allows activity to continue playing when idling",authors:[d.Cyn,d.Nuckyz],settings:$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 Hm(e,t){t={invalidEmojis:[],tts:!1,validNonShortcutEmojis:[],...t};let n=ZI.getPendingReply(e);Ob.sendMessage(e,t,void 0,Ob.getSendMessageOptionsForReply(n)).then(()=>{n&&O.dispatch({type:"DELETE_PENDING_REPLY",channelId:e})})}var Gm,Ob,ZI,zm,_b=g(()=>{"use strict";a();l();Ft();M();x();B();w();Gm=I("getPlayerState"),Ob=I("getSendMessageOptionsForReply","sendMessage"),ZI=I("getPendingReply");zm=y({name:"SpotifyShareCommands",description:"Share your current Spotify track, album or artist via slash command (/track, /album, /artist)",authors:[d.katlyn],dependencies:["CommandsAPI"],commands:[{name:"track",description:"Send your current Spotify track to chat",inputType:0,options:[],execute:(e,t)=>{let n=Gm.getTrack();if(n===null){ie(t.channel.id,{content:"You're not listening to any music."});return}Hm(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=Gm.getTrack();if(n===null){ie(t.channel.id,{content:"You're not listening to any music."});return}Hm(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=Gm.getTrack();if(n===null){ie(t.channel.id,{content:"You're not listening to any music."});return}Hm(t.channel.id,{content:n.artists[0].external_urls.spotify})}}]})});var Bb={};ye(Bb,{default:()=>eC});function XI({emoji:e,prefix:t,log:n,delta:r,instance:i}){return o(N.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 JI({title:e,logs:t,traceEnd:n}){let r=t.find(c=>c.timestamp)?.timestamp??0,i=r,s=t.map(c=>{let u=c.timestamp??i,p=(u-r)/1e3,v=(u-i)/1e3;return i=u,{sinceStart:p,sinceLast:v}});return o(b.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"),zi.logs.map((c,u)=>o(XI,{key:u,...c,instance:s[u]})))))}function QI({trace:e}){let t=e.split(` -`);return o(b.FormSection,{title:"Server Trace",tag:"h2"},o("code",null,o(ue,{flexDirection:"column",style:{color:"var(--header-primary)",gap:5,userSelect:"text"}},t.map(n=>o("span",null,n)))))}function VI(){if(!zi?.logs)return o("div",null,"Loading...");let e=zi.logGroups.find(t=>t.serverTrace)?.serverTrace;return o(N.Fragment,null,o(JI,{title:"Startup Timings",logs:zi.logs,traceEnd:zi.endTime_}),o("div",{style:{marginTop:5}},"\xA0"),e&&o(QI,{trace:e}))}var zi,eC,Fb=g(()=>{"use strict";a();l();ae();Mt();B();w();zi=I("markWithDelta","markAndLog","markAt");eC=E.wrap(VI)});var jm,$b=g(()=>{"use strict";a();l();M();be();x();jm=y({name:"StartupTimings",description:"Adds Startup Timings to the Settings menu",authors:[d.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:se(()=>(Fb(),Do(Bb)).default)})});var Ub,tC,Wm,Gb=g(()=>{"use strict";a();l();Ai();M();he();Kn();x();fr();w();_r();mr();eu();Ub="Vencord-SupportHelper-Dismiss",tC=[Qi,"1024286218801926184","1033680203433660458"],Wm=y({name:"SupportHelper",required:!0,description:"Helps us provide support to you",authors:[d.Ven],dependencies:["CommandsAPI"],commands:[{name:"vencord-debug",description:"Send Vencord Debug info",predicate:e=>tC.includes(e.channel.id),execute(){let{RELEASE_CHANNEL:e}=unsafeWindow.GLOBAL_ENV,t=(()=>"armcord"in unsafeWindow?`ArmCord v${unsafeWindow.armcord.version}`:`${typeof unsafeWindow<"u"?"UserScript":"Web"} (${navigator.userAgent})`)(),n=u=>u.endsWith("API")||we[u].required,r=Object.keys(we).filter(u=>Vencord.Plugins.isPluginEnabled(u)&&!n(u)),i=Object.keys(we).filter(u=>Vencord.Plugins.isPluginEnabled(u)&&n(u)),s={Vencord:`v1.3.4 \u2022 ${an}${di.additionalInfo} - ${Intl.DateTimeFormat("en-GB",{dateStyle:"medium"}).format(1688780477964)}`,"Discord Branch":e,Client:t,Platform:unsafeWindow.navigator.platform,Outdated:vo,OpenAsar:"openasar"in unsafeWindow};return{content:` -**Vencord Debug Info** ->>> ${Object.entries(s).map(([u,p])=>`${u}: ${p}`).join(` -`)} - -Enabled Plugins (${r.length+i.length}): -${Zr(r.join(", ")+` - -`+i.join(", "))} -`.trim().replaceAll("```\n","```")}}}],flux:{async CHANNEL_SELECT({channelId:e}){if(e===Qi&&!Fr(U.getCurrentUser().id)&&vo&&an!==await Rt.get(Ub)){let t=()=>Rt.set(Ub,an);xt.show({title:"Hold on!",body:o("div",null,o(b.FormText,null,"You are using an outdated version of Vencord! Chances are, your issue is already fixed."),o(b.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 qb(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 oC(e){try{return qb(e),null}catch(t){return o("span",{style:{color:"var(--text-danger)"}},String(t))}}function qm({initialValue:e,onChange:t,placeholder:n}){let[r,i]=te(e);return o(Le,{placeholder:n,value:r,onChange:i,spellCheck:!1,onBlur:()=>r!==e&&t(r)})}function Hb({title:e,rulesArray:t,rulesKey:n,update:r}){let i=e==="Using Regex";async function s(u){t.splice(u,1),await Rt.set(n,t),r()}async function c(u,p,v){p===t.length-1&&t.push(Wb()),t[p][v]=u,t[p].find===""&&t[p].replace===""&&t[p].onlyIfIncludes===""&&p!==t.length-1&&t.splice(p,1),await Rt.set(n,t),r()}return o(m,null,o(b.FormTitle,{tag:"h4"},e),o(ue,{flexDirection:"column",style:{gap:"0.5em"}},t.map((u,p)=>o(N.Fragment,{key:`${u.find}-${p}`},o(ue,{flexDirection:"row",style:{gap:0}},o(ue,{flexDirection:"row",style:{flexGrow:1,gap:"0.5em"}},o(qm,{placeholder:"Find",initialValue:u.find,onChange:v=>c(v,p,"find")}),o(qm,{placeholder:"Replace",initialValue:u.replace,onChange:v=>c(v,p,"replace")}),o(qm,{placeholder:"Only if includes",initialValue:u.onlyIfIncludes,onChange:v=>c(v,p,"onlyIfIncludes")})),o(R,{size:R.Sizes.MIN,onClick:()=>s(p),style:{background:"none",...p===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&&oC(u.find)))))}function rC(){let[e,t]=te("");return o(m,null,o(b.FormTitle,{tag:"h4"},"Test Rules"),o(Le,{placeholder:"Type a message",onChange:t}),o(Le,{placeholder:"Message with rules applied",editable:!1,value:Kb(e)}))}function Kb(e){if(e.length===0)return e;if(e=" "+e+" ",Za)for(let t of Za)!t.find||!t.replace||t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)||(e=e.replaceAll(t.find,t.replace.replaceAll("\\n",` -`)));if(Xa){for(let t of Xa)if(!(!t.find||!t.replace)&&!(t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)))try{let n=qb(t.find);e=e.replace(n,t.replace.replaceAll("\\n",` -`))}catch{new X("TextReplace").error(`Invalid regex: ${t.find}`)}}return e=e.trim(),e}var zb,jb,Wb,Ya,Za,Xa,nC,iC,Km,Yb=g(()=>{"use strict";a();l();Ai();Tn();_();Mt();M();xe();be();x();w();zb="TextReplace_rulesString",jb="TextReplace_rulesRegex",Wb=()=>({find:"",replace:"",onlyIfIncludes:""}),Ya=()=>[Wb()],Za=Ya(),Xa=Ya(),nC=A({replace:{type:6,description:"",component:()=>{let e=Dt();return o(m,null,o(Hb,{title:"Using String",rulesArray:Za,rulesKey:zb,update:e}),o(Hb,{title:"Using Regex",rulesArray:Xa,rulesKey:jb,update:e}),o(rC,null))}}});iC="1102784112584040479",Km=y({name:"TextReplace",description:"Replace text in your messages. You can find pre-made rules in the #textreplace-rules channel in Vencord's Server",authors:[d.AutumnVN,d.TheKodeToad],dependencies:["MessageEventsAPI"],settings:nC,async start(){Za=await Rt.get(zb)??Ya(),Xa=await Rt.get(jb)??Ya(),this.preSend=ut((e,t)=>{e!==iC&&(t.content=Kb(t.content))})},stop(){pt(this.preSend)}})});var Ym,Zb=g(()=>{"use strict";a();l();M();x();Ym=y({name:"TimeBarAllActivities",description:"Adds the Spotify time bar to all activities if they have start and end timestamps",authors:[d.obscurity],patches:[{find:"renderTimeBar=function",replacement:{match:/renderTimeBar=function\((.{1,3})\){.{0,50}?var/,replace:"renderTimeBar=function($1){var"}}]})});var Xb=g(()=>{});var vt,ji=g(()=>{"use strict";a();l();_();x();vt=A({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 Ja,Zm=g(()=>{"use strict";a();l();Ja={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 Wi(e,t){let n=vt.store[e+"Input"],r=vt.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 f(i);if(!s.ok)throw new Error(`Failed to translate "${t}" (${n} -> ${r}) -${s.status} ${s.statusText}`);let{src:c,sentences:u}=await s.json();return{src:c,text:u.map(p=>p?.trans).filter(Boolean).join("")}}var ao,qi=g(()=>{"use strict";a();l();ze();ji();ao=Oe("vc-trans-")});function aC({settingsKey:e,includeAuto:t}){let n=vt.use([e])[e],r=Wt(()=>{let i=Object.entries(Ja).map(([s,c])=>({value:s,label:c}));return t||i.shift(),i},[]);return o("section",{className:z.bottom16},o(b.FormTitle,{tag:"h3"},vt.def[e].description),o(us,{options:r,value:r.find(i=>i.value===n),placeholder:"Select a language",maxVisibleItems:5,closeOnSelect:!0,onChange:i=>vt.store[e]=i}))}function lC(){let e=vt.use(["autoTranslate"]).autoTranslate;return o(ht,{value:e,onChange:t=>vt.store.autoTranslate=t,note:vt.def.autoTranslate.description,hideBorder:!0},"Auto Translate")}function Jb({rootProps:e}){return o(De,{...e},o(Ge,{className:ao("modal-header")},o(b.FormTitle,{tag:"h2"},"Translate"),o(Pt,{onClick:e.onClose})),o(He,{className:ao("modal-content")},sC.map(t=>o(aC,{key:t,settingsKey:t,includeAuto:t.endsWith("Input")})),o(b.FormDivider,{className:z.bottom16}),o(lC,null)))}var sC,Qb=g(()=>{"use strict";a();l();Qe();Je();w();Zm();ji();qi();sC=["receivedInput","receivedOutput","sentInput","sentOutput"]});function Lr({height:e=24,width:t=24,className:n}){return o("svg",{viewBox:"0 96 960 960",height:e,width:t,className:V(ao("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 Vb({slateProps:e}){let{autoTranslate:t}=vt.use(["autoTranslate"]);if(e.type.analyticsName!=="normal")return null;let n=()=>vt.store.autoTranslate=!t;return o(K,{text:"Open Translate Modal"},({onMouseEnter:r,onMouseLeave:i})=>o("div",{style:{display:"flex"}},o(R,{"aria-haspopup":"dialog","aria-label":"",size:"",look:Jt.BLANK,onMouseEnter:r,onMouseLeave:i,innerClassName:gt.button,onClick:s=>{if(s.shiftKey)return n();ke(c=>o(Jb,{rootProps:c}))},onContextMenu:()=>n(),style:{padding:"0 4px"}},o("div",{className:gt.buttonWrapper},o(Lr,{className:ao({"auto-translate":t})})))))}var Xm=g(()=>{"use strict";a();l();he();Je();w();ji();Qb();qi()});function Qm(e,t){Jm.get(e)(t)}function cC({onDismiss:e}){return o("button",{onClick:e,className:ao("dismiss")},"Dismiss")}function eT({message:e}){let[t,n]=te();return st(()=>{if(!e.vencordEmbeddedBy)return Jm.set(e.id,n),()=>void Jm.delete(e.id)},[]),t?o("span",{className:ao("accessory")},o(Lr,{width:16,height:16}),Ne.parse(t.text)," ","(translated from ",Ja[t.src]??t.src," - ",o(cC,{onDismiss:()=>n(void 0)}),")"):null}var Jm,tT=g(()=>{"use strict";a();l();w();Zm();Xm();qi();Jm=new Map});var nT,Vm,oT=g(()=>{"use strict";a();l();Xb();It();ua();Tn();Zo();ae();M();x();w();ji();Xm();tT();qi();nT=(e,{message:t})=>()=>{if(!t.content)return;let n=rt("copy-text",e);!n||n.splice(n.findIndex(r=>r?.props?.id==="copy-text")+1,0,o(D.MenuItem,{id:"vc-trans",label:"Translate",icon:Lr,action:async()=>{let r=await Wi("received",t.content);Qm(t.id,r)}}))},Vm=y({name:"Translate",description:"Translate messages with Google Translate",authors:[d.Ven],dependencies:["MessageAccessoriesAPI","MessagePopoverAPI","MessageEventsAPI"],settings:vt,translate:Wi,patches:[{find:".activeCommandOption",replacement:{match:/(.)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&;try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}"}}],start(){Ti("vc-translation",e=>o(eT,{message:e.message})),me("message",nT),xn("vc-translate",e=>e.content?{label:"Translate",icon:Lr,message:e,channel:J.getChannel(e.channel_id),onClick:async()=>{let t=await Wi("received",e.content);Qm(e.id,t)}}:null),this.preSend=ut(async(e,t)=>{!vt.store.autoTranslate||!t.content||(t.content=(await Wi("sent",t.content)).text)})},stop(){pt(this.preSend),fe("message",nT),wn("vc-translate"),xp("vc-translation")},chatBarIcon:e=>o(E,{noop:!0},o(Vb,{slateProps:e}))})});function ef({a:e,b:t,c:n}){return[o("strong",{key:"0"},e),", ",o("strong",{key:"2"},t),`, and ${n} others are typing...`]}var uC,Qa,pC,tf,nf=g(()=>{"use strict";a();l();_();ae();M();ot();x();B();w();uC=pe(".typingIndicatorRef","svg"),Qa=A({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"}});pC=E.wrap(function({user:e,guildId:t}){return o("strong",{role:"button",onClick:()=>{gn(e.id)},style:{display:"grid",gridAutoFlow:"column",gap:"4px",color:Qa.store.showRoleColors?Ee.getMember(t,e.id)?.colorString:void 0,cursor:"pointer"}},Qa.store.showAvatars&&o("div",{style:{marginTop:"4px"}},o(uC,{size:"SIZE_16",src:e.getAvatarURL(t,128)})),Ee.getNick(t,e.id)||!t&&nt.getNickname(e.id)||e.globalName||e.username)},{noop:!0}),tf=y({name:"TypingTweaks",description:"Show avatars and role colours in the typing indicator",authors:[d.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:()=>Qa.store.alternativeFormatting}],settings:Qa,buildSeveralUsers:ef,mutateChildren(e,t,n){if(!Array.isArray(n))return n;let r=0;return n.map(i=>i.type==="strong"?o(pC,{...e,user:t[r++]}):i)}})});function Ao(e,t){return Ee.getNick(e,t)??U.getUser(t).username}function fC({channelId:e}){let t=Ue([rT],()=>({...rT.getTypingUsers(e)}),null,(c,u)=>{let p=Object.keys(c),v=Object.keys(u);return p.length===v.length&&JSON.stringify(p)===JSON.stringify(v)}),n=J.getChannel(e).guild_id;if(!of.store.includeMutedChannels&&mC.isChannelMuted(n,e))return null;let r=U.getCurrentUser()?.id,i=Object.keys(t).filter(c=>c!==r&&!(nt.isBlocked(c)&&!of.store.includeBlockedUsers)),s;switch(i.length){case 0:break;case 1:{s=Va.Messages.ONE_USER_TYPING.format({a:Ao(n,i[0])});break}case 2:{s=Va.Messages.TWO_USERS_TYPING.format({a:Ao(n,i[0]),b:Ao(n,i[1])});break}case 3:{s=Va.Messages.THREE_USERS_TYPING.format({a:Ao(n,i[0]),b:Ao(n,i[1]),c:Ao(n,i[2])});break}default:{s=C.plugins.TypingTweaks.enabled?ef({a:Ao(n,i[0]),b:Ao(n,i[1]),c:i.length-2}):Va.Messages.SEVERAL_USERS_TYPING;break}}return i.length>0?o(K,{text:s},({onMouseLeave:c,onMouseEnter:u})=>o("div",{style:{marginLeft:6,height:16,display:"flex",alignItems:"center",zIndex:0,cursor:"pointer"},onMouseLeave:c,onMouseEnter:u},o(dC,{dotRadius:3,themed:!0}))):null}var dC,rT,mC,Va,of,rf,iT=g(()=>{"use strict";a();l();_();ae();M();be();x();B();w();nf();dC=se(()=>jt(e=>e.type?.render?.toString()?.includes("().dots"))),rT=ce("TypingStore"),mC=ce("UserGuildSettingsStore"),Va=Ae(e=>e.Messages?.SEVERAL_USERS_TYPING);of=A({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}}),rf=y({name:"TypingIndicator",description:"Adds an indicator if someone is typing on a channel.",authors:[d.Nuckyz,d.obscurity],settings:of,patches:[{find:".UNREAD_HIGHLIGHT",replacement:{match:/\(\).children.+?:null(?<=(\i)=\i\.channel,.+?)/,replace:(e,t)=>`${e},$self.TypingIndicator(${t}.id)`}}],TypingIndicator:e=>o(E,{noop:!0},o(fC,{channelId:e}))})});var sf,sT=g(()=>{"use strict";a();l();Tn();M();x();sf=y({name:"Unindent",description:"Trims leading indentation from codeblocks",authors:[d.Ven],dependencies:["MessageEventsAPI"],patches:[{find:"inQuote:",replacement:{match:/,content:([^,]+),inQuote/,replace:(e,t)=>`,content:Vencord.Plugins.plugins.Unindent.unindent(${t}),inQuote`}}],unindent(e){e=e.replace(/\t/g," ");let t=e.match(/^ *(?=\S)/gm)?.reduce((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=ut((e,t)=>this.unindentMsg(t)),this.preEdit=Vn((e,t,n)=>this.unindentMsg(n))},stop(){pt(this.preSend),eo(this.preEdit)}})});var af,aT,lf,lT=g(()=>{"use strict";a();l();It();Fn();M();x();w();af=1<<2,aT=(e,{channel:t,message:{author:n,embeds:r,flags:i,id:s}})=>()=>{let c=(i&af)!==0;if(!c&&!r.length)return;let u=t.isPrivate()||!!(qe.getChannelPermissions({id:t.id})&En.EMBED_LINKS);if(n.id===U.getCurrentUser().id&&!u)return;let p=rt("delete",e),v=p?.findIndex(h=>h?.props?.id==="delete");!v||!p||p.splice(v-1,0,o(D.MenuItem,{id:"unsuppress-embeds",key:"unsuppress-embeds",label:c?"Unsuppress Embeds":"Suppress Embeds",color:c?void 0:"danger",icon:c?Js:Qs,action:()=>_t.patch({url:`/channels/${t.id}/messages/${s}`,body:{flags:c?i&~af:i|af}})}))},lf=y({name:"UnsuppressEmbeds",authors:[d.rad,d.HypedDomi],description:"Allows you to unsuppress embeds in messages",start(){me("message",aT)},stop(){fe("message",aT)}})});var cf,cT=g(()=>{"use strict";a();l();Ft();Ws();M();x();cf=y({name:"UrbanDictionary",description:"Search for a word on Urban Dictionary via /urban slash command",authors:[d.jewdev],dependencies:["CommandsAPI"],commands:[{name:"urban",description:"Returns the definition of a word from Urban Dictionary",inputType:0,options:[{type:3,name:"word",description:"The word to search for on Urban Dictionary",required:!0}],execute:async(e,t)=>{try{let n=encodeURIComponent(e[0].value),{list:[r]}=await(await f(`https://api.urbandictionary.com/v0/define?term=${n}`)).json();if(!r)return void ie(t.channel.id,{content:"No results found."});let i=s=>s.replaceAll(`\r -`,` -`).replace(/([*>_`~\\])/gsi,"\\$1").replace(/\[(.+?)\]/g,(c,u)=>`[${u}](https://www.urbandictionary.com/define.php?term=${encodeURIComponent(u)} "Define '${u}' on Urban Dictionary")`).trim();return void ie(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){ie(t.channel.id,{content:`Something went wrong: \`${n}\``})}}}]})});var uT=g(()=>{});var gC,hC,yC,pT,dT=g(()=>{"use strict";a();l();uT();B();w();gC=I("selectChannel","selectVoiceChannel"),hC=pe(".lastSection",".children"),yC=1n<<20n,pT=({channel:e,label:t,showHeader:n})=>o(hC,null,n&&o(b.FormTitle,{className:"vc-uvs-header"},"In a voice channel"),o(R,{className:"vc-uvs-button",color:R.Colors.TRANSPARENT,size:R.Sizes.SMALL,onClick:()=>{qe.can(yC,e)?gC.selectVoiceChannel(e.id):Q.show({message:"Insufficient permissions to enter the channel.",id:"user-voice-show-insufficient-permissions",type:Q.Type.FAILURE,options:{position:Q.Position.BOTTOM}})}},t))});var vC,SC,uf,mT,pf,fT=g(()=>{"use strict";a();l();_();ae();M();x();B();w();dT();vC=ce("VoiceStateStore"),SC=I("section","lastSection"),uf=A({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}}),mT=E.wrap(({user:e})=>{let{channelId:t}=vC.getVoiceStateForUser(e.id)??{};if(!t)return null;let n=J.getChannel(t),r=de.getGuild(n.guild_id);if(!r)return null;let i=`${r.name} | ${n.name}`;return o(pT,{channel:n,label:i,showHeader:uf.store.showVoiceChannelSectionHeader})}),pf=y({name:"UserVoiceShow",description:"Shows whether a User is currently in a voice channel somewhere in their profile",authors:[d.LordElias],settings:uf,patchModal({user:e}){return uf.store.showInUserProfileModal?o("div",{className:"vc-uvs-modal-margin"},o(mT,{user:e})):null},patchPopout:({user:e})=>{let t=e.id===U.getCurrentUser().id;return o("div",{className:t?`vc-uvs-popout-margin ${SC.lastSection}`:""},o(mT,{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 gT,hT=g(()=>{a();l();(unsafeWindow.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});gT="src/plugins/usrbg/index.css"});var bC,tr,el,df,yT=g(()=>{"use strict";a();l();_();ze();xo();M();x();hT();bC="https://raw.githubusercontent.com/AutumnVN/usrbg/main/usrbg.json",tr={},el=A({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}}),df=y({name:"USRBG",description:"Displays user banners from USRBG, allowing anyone to get a banner without Nitro",authors:[d.AutumnVN,d.pylix,d.TheKodeToad],settings:el,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:()=>el.store.voiceBackground,replacement:[{match:/(\i)\.style,/,replace:"$self.voiceBackgroundHook($1),"}]}],settingsAboutComponent:()=>o(ct,{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-")&&tr[t])return{backgroundImage:`url(${tr[t]})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}},useBannerHook({displayProfile:e,user:t}){if(!(e?.banner&&el.store.nitroFirst)&&tr[t.id])return tr[t.id]},premiumHook({userId:e}){if(tr[e])return 2},shouldShowBadge({displayProfile:e,user:t}){return e?.banner&&(!tr[t.id]||el.store.nitroFirst)},async start(){Ve(gT);let e=await f(bC);e.ok&&(tr=await e.json())}})});function wC(e){let t=Math.floor(Math.random()*e.length);return e[t]}function ST(e){e=e.toLowerCase();for(let t of xC)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} ${wC(TC)}${r}`),e}var TC,xC,vT,mf,bT=g(()=>{"use strict";a();l();Ft();Tn();_();M();x();TC=["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)"],xC=[["small","smol"],["cute","kawaii~"],["fluff","floof"],["love","luv"],["stupid","baka"],["what","nani"],["meow","nya~"],["hello","hewwo"]],vT=A({uwuEveryMessage:{description:"Make every single message uwuified",type:3,default:!1,restartNeeded:!1}});mf=y({name:"UwUifier",description:"Simply uwuify commands",authors:[d.echo,d.skyevg,d.PandaNinjas],dependencies:["CommandsAPI","MessageEventsAPI"],settings:vT,commands:[{name:"uwuify",description:"uwuifies your messages",options:[jo],execute:e=>({content:ST(Be(e,"message",""))})}],onSend(e){vT.store.uwuEveryMessage&&(e.content=ST(e.content))},start(){this.preSend=ut((e,t)=>this.onSend(t)),this.preEdit=Vn((e,t,n)=>this.onSend(n))},stop(){pt(this.preSend),eo(this.preEdit)}})});function MC({data:e,UserMention:t,RoleMention:n,parse:r,props:i}){let[s,c]=te(e.userId);if(s)return o(t,{className:"mention",userId:s,channelId:e.channelId,inlinePreview:i.noStyleAndInteraction,key:i.key});let u=r(e.content,i);return o(n,{...e,inlinePreview:i.formatInline},o("span",{onMouseEnter:()=>{let p=u?.[0]?.props?.children;if(typeof p!="string")return;let v=p.match(/<@!?(\d+)>/)?.[1];if(!v||tl.has(v))return;if(U.getUser(v))return c(v);let h=()=>{tl.add(v),TT.unshift(()=>PC(v).then(()=>{c(v),tl.delete(v)}).catch(S=>{S?.status===429&&(TT.unshift(()=>lo(1e3).then(h)),tl.delete(v))}).finally(()=>lo(300)))};h()}},u))}var tl,TT,PC,ff,xT=g(()=>{"use strict";a();l();ae();M();he();cr();x();B();w();tl=new Set,TT=new hn(5),PC=pe("USER(");ff=y({name:"ValidUser",description:"Fix mentions for unknown users showing up as '<@343383572805058560>' (hover over a mention to fix it)",authors:[d.Ven],tags:["MentionCacheFix"],patches:[{find:'className:"mention"',replacement:{match:/react:(?=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(E,{noop:!0},o(MC,{RoleMention:e,UserMention:t,data:n,parse:r,props:i}))}})});var gf,hf,wT=g(()=>{"use strict";a();l();M();x();w();gf={},hf=y({name:"VoiceChatDoubleClick",description:"Join voice chats via double click instead of single click",authors:[d.Ven,d.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=J.getChannel(t);return!n||![2,13].includes(n.type)?!0:e.detail>=2},schedule(e,t){let n=t.props.channel.id;if(Ie.getVoiceChannelId()===n){e();return}let r=gf[n]??={timeout:void 0,i:0};clearTimeout(r.timeout),++r.i>=2?(e(),delete gf[n]):r.timeout=setTimeout(()=>{delete gf[n]},500)}})});function nl(e,t=C.plugins.VcNarrator){if(!e)return;let n=new SpeechSynthesisUtterance(e),r=speechSynthesis.getVoices().find(i=>i.voiceURI===t.voice);!r&&(new X("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 MT(e){let t=C.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 ol(e,t,n){return e.replaceAll("{{USER}}",MT(t)||(t?"Someone":"")).replaceAll("{{CHANNEL}}",MT(n)||"channel")}function IC({channelId:e,oldChannelId:t},n){if(n&&e!==yf&&(t=yf,yf=e),e!==t){if(e)return[t?"move":"join",e];if(t)return["leave",t]}return["",""]}function CC(e,t){let n=Object.assign({},C.plugins.VcNarrator,e);nl(ol(n[t+"Message"],U.getCurrentUser().username,"general"),n)}var PT,yf,vf,IT=g(()=>{"use strict";a();l();_();Xr();M();xe();Qe();Kn();x();B();w();PT=I("getVoiceStatesForChannel","getCurrentClientVoiceChannelId");vf=y({name:"VcNarrator",description:"Announces when users join, leave, or move voice channels via narrator",authors:[d.Ven],flux:{VOICE_STATE_UPDATES({voiceStates:e}){let t=Ie.getVoiceChannelId(),n=U.getCurrentUser().id;if(J.getChannel(t)?.type!==13)for(let r of e){let{userId:i,channelId:s,oldChannelId:c}=r,u=i===n;if(!u&&(!t||s!==t&&c!==t))continue;let[p,v]=IC(r,u);if(!p)continue;let h=C.plugins.VcNarrator[p+"Message"],S=u&&!C.plugins.VcNarrator.sayOwnName?"":U.getUser(i).username,T=J.getChannel(v).name;nl(ol(h,S,T))}},AUDIO_TOGGLE_SELF_MUTE(){let e=Ie.getVoiceChannelId(),t=PT.getVoiceStateForChannel(e);if(!t)return;let n=t.mute||t.selfMute?"unmute":"mute";nl(ol(C.plugins.VcNarrator[n+"Message"],"",J.getChannel(e).name))},AUDIO_TOGGLE_SELF_DEAF(){let e=Ie.getVoiceChannelId(),t=PT.getVoiceStateForChannel(e);if(!t)return;let n=t.deaf||t.selfDeaf?"undeafen":"deafen";nl(ol(C.plugins.VcNarrator[n+"Message"],"",J.getChannel(e).name))}},start(){if(typeof speechSynthesis>"u"||speechSynthesis.getVoices().length===0){new X("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:unsafeWindow.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]=Wt(()=>{let s=speechSynthesis.getVoices();return[s.length!==0,s.some(c=>c.lang.startsWith("en"))]},[]),r=Wt(()=>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(Yn,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(Yn,null,s)}return o(b.FormSection,null,o(b.FormText,null,"You can customise the spoken messages below. You can disable specific messages by setting them to nothing"),o(b.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(m,null,o(b.FormTitle,{className:z.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(R,{key:s,onClick:()=>CC(e,s)},qn([s]))))),i)}})});var CT=g(()=>{});function kC(e){let t=[];for(let n of Object.values(Vencord.Plugins.plugins))n.toolboxActions&&t.push(o(D.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(D.MenuItem,{id:s,key:s,label:r,action:i})})));return o(D.Menu,{navId:"vc-toolbox",onClose:e},o(D.MenuItem,{id:"vc-toolbox-notifications",label:"Open Notification Log",action:Rs}),o(D.MenuItem,{id:"vc-toolbox-quickcss",label:"Open QuickCSS",action:()=>VencordNative.quickCss.openEditor()}),...t)}function RC(){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 AC(){let[e,t]=te(!1);return o($r,{position:"bottom",align:"right",animation:$r.Animation.NONE,shouldShow:e,onRequestClose:()=>t(!1),renderPopout:()=>kC(()=>t(!1))},(n,{isShown:r})=>o(NC,{className:"vc-toolbox-btn",onClick:()=>t(i=>!i),tooltip:r?null:"Vencord Toolbox",icon:RC,selected:r}))}function LC({children:e}){return e.splice(e.length-1,0,o(E,{noop:!0},o(AC,null))),o(m,null,e)}var NC,Sf,NT=g(()=>{"use strict";a();l();CT();As();ae();M();be();x();B();w();NC=se(()=>We(".HEADER_BAR_BADGE,",".tooltip"));Sf=y({name:"VencordToolbox",description:"Adds a button next to the inbox button in the channel header that houses Vencord quick actions",authors:[d.Ven,d.AutumnVN],patches:[{find:".mobileToolbar",replacement:{match:/(?<=toolbar:function.{0,100}\()\i.Fragment,/,replace:"$self.ToolboxFragmentWrapper,"}}],ToolboxFragmentWrapper:E.wrap(LC,{fallback:()=>o("p",{style:{color:"red"}},"Failed to render :(")})})});function Ki(e){let t=e.startsWith("/")?"png":bf.store.format,n=new URL(e,unsafeWindow.location.href);n.searchParams.set("size",bf.store.imgSize),n.pathname=n.pathname.replace(/\.(png|jpe?g|webp)$/,`.${t}`),e=n.toString(),n.searchParams.set("size","4096");let r=n.toString();Uo(e,{original:r,height:256})}var rl,bf,kT,RT,Tf,AT=g(()=>{"use strict";a();l();It();_();Fn();M();ot();x();B();w();rl=I("getGuildBannerURL"),bf=A({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"}))}});kT=(e,{user:t,guildId:n})=>()=>{let r=Ee.getMember(n,t.id)?.avatar||null;e.splice(-1,0,o(D.MenuGroup,null,o(D.MenuItem,{id:"view-avatar",label:"View Avatar",action:()=>Ki(rl.getUserAvatarURL(t,!0)),icon:qo}),r&&o(D.MenuItem,{id:"view-server-avatar",label:"View Server Avatar",action:()=>Ki(rl.getGuildMemberAvatarURLSimple({userId:t.id,avatar:r,guildId:n,canAnimate:!0},!0)),icon:qo})))},RT=(e,{guild:t})=>()=>{if(!t)return;let{id:n,icon:r,banner:i}=t;!i&&!r||e.splice(-1,0,o(D.MenuGroup,null,r?o(D.MenuItem,{id:"view-icon",label:"View Icon",action:()=>Ki(rl.getGuildIconURL({id:n,icon:r,canAnimate:!0})),icon:qo}):null,i?o(D.MenuItem,{id:"view-banner",label:"View Banner",action:()=>Ki(rl.getGuildBannerURL({id:n,banner:i},!0)),icon:qo}):null))},Tf=y({name:"ViewIcons",authors:[d.Ven,d.TheKodeToad,d.Nuckyz],description:"Makes avatars and banners in user profiles clickable, and adds View Icon/Banner entries in the user and server context menu",tags:["ImageUtilities"],settings:bf,openImage:Ki,start(){me("user-context",kT),me("guild-context",RT)},stop(){fe("user-context",kT),fe("guild-context",RT)},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 DC(e){return Object.fromEntries(Object.entries(e).sort(([t],[n])=>t.localeCompare(n)))}function OC(e){let t=DC(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 LT(e){return o("div",{style:{userSelect:"text"}},Ne.defaultRules.codeBlock.react(e,null,{}))}function ET(e){e=OC(e);let t=JSON.stringify(e,null,4),n=ke(r=>o(E,null,o(De,{...r,size:"large"},o(Ge,null,o(ee,{variant:"heading-lg/semibold",style:{flexGrow:1}},"View Raw"),o(Pt,{onClick:()=>zn(n)})),o(He,null,o("div",{style:{padding:"16px 0"}},!!e.content&&o(m,null,o(b.FormTitle,{tag:"h5"},"Content"),o(LT,{content:e.content,lang:""}),o(b.FormDivider,{className:z.bottom20})),o(b.FormTitle,{tag:"h5"},"Message Data"),o(LT,{content:t,lang:"json"}))),o(wt,null,o(ue,{cellSpacing:10},o(R,{onClick:()=>Xt(t,"Message data copied to clipboard!")},"Copy Message JSON"),o(R,{onClick:()=>Xt(e.content,"Content copied to clipboard!")},"Copy Raw Content"))))))}var EC,il,xf,DT=g(()=>{"use strict";a();l();Zo();_();ae();Mt();M();Qe();he();Je();x();w();EC=()=>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"}));il=A({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"}]}}),xf=y({name:"ViewRaw",description:"Copy and view the raw content/data of any message.",authors:[d.KingFish,d.Ven,d.rad],dependencies:["MessagePopoverAPI"],settings:il,start(){xn("ViewRaw",e=>{let t=()=>{il.store.clickMethod==="Right"?Xt(e.content):ET(e)},n=i=>{il.store.clickMethod==="Left"?(i.preventDefault(),i.stopPropagation(),Xt(e.content)):(i.preventDefault(),i.stopPropagation(),ET(e))};return{label:il.store.clickMethod==="Right"?"Copy Raw (Left Click) / View Raw (Right Click)":"View Raw (Left Click) / Copy Raw (Right Click)",icon:EC,message:e,channel:J.getChannel(e.channel_id),onClick:t,onContextMenu:n}})},stop(){wn("CopyRawMessage")}})});async function _C(e){let t=await f(e);if(t.status===200)return await t.blob()}var BC,nr,wf,OT=g(()=>{"use strict";a();l();_();M();x();Mc();B();w();BC=Ae(e=>e.emitter?._events?.INSERT_TEXT),nr=A({addBack:{type:3,description:"Add back the Discord context menus for images, links and the chat input bar",default:!1,restartNeeded:!0}}),wf=y({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:[d.Ven],enabledByDefault:!0,required:!1,settings:nr,start(){if(nr.store.addBack){let e=Rn("contextMenuCallbackNative");unsafeWindow.removeEventListener("contextmenu",e.contextMenuCallbackWeb),unsafeWindow.addEventListener("contextmenu",e.contextMenuCallbackNative),this.changedListeners=!0}},stop(){if(this.changedListeners){let e=Rn("contextMenuCallbackNative");unsafeWindow.removeEventListener("contextmenu",e.contextMenuCallbackNative),unsafeWindow.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:()=>nr.store.addBack,replacement:{match:/return \i\.\i\?/,replace:"return true?"}},{find:'"interactionUsernameProfile"',predicate:()=>nr.store.addBack,replacement:{match:/if\("A"===\i\.tagName&&""!==\i\.textContent\)/,replace:"if(false)"}},{find:'"slate-toolbar"',predicate:()=>nr.store.addBack,replacement:{match:/(?<=\.handleContextMenu=.+?"bottom";)\i\.\i\?/,replace:"true?"}},{find:'navId:"textarea-context"',all:!0,predicate:()=>nr.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:()=>nr.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 _C(e);if(!t)return;let n=new URL(e).pathname.split("/").pop(),r=new File([t],n,{type:t.type});_s(r)},copy(){let e=document.getSelection();!e||Zt.copy(e.toString())},cut(){this.copy(),BC.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 _T(e,t,n){let r=Pf.getSendMessageOptionsForReply({channel:e,message:t,shouldMention:!0,showMentionToggle:!0});if(sl.store.greetMode==="Message"||n.length>1){r.stickerIds=n;let i={content:"",tts:!1,invalidEmojis:[],validNonShortcutEmojis:[]};Pf._sendMessage(e.id,i,r)}else Pf.sendGreetMessage(e.id,n[0],r)}function FC({stickers:e,channel:t,message:n}){let r=sl.use(["greetMode","multiGreetChoices"]),{greetMode:i,multiGreetChoices:s=[]}=r;return o(D.Menu,{navId:"greet-sticker-picker",onClose:()=>O.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Greet Sticker Picker"},o(D.MenuGroup,{label:"Greet Mode"},Object.values(BT).map(c=>o(D.MenuRadioItem,{key:c,group:"greet-mode",id:"greet-mode-"+c,label:c,checked:c===i,action:()=>r.greetMode=c}))),o(D.MenuSeparator,null),o(D.MenuGroup,{label:"Greet Stickers"},e.map(c=>o(D.MenuItem,{key:c.id,id:"greet-"+c.id,label:c.description.split(" ")[0],action:()=>_T(t,n,[c.id])}))),sl.store.unholyMultiGreetEnabled?o(m,null,o(D.MenuSeparator,null),o(D.MenuItem,{label:"Unholy Multi-Greet",id:"unholy-multi-greet"},e.map(c=>{let u=s.some(p=>p===c.id);return o(D.MenuCheckboxItem,{key:c.id,id:"multi-greet-"+c.id,label:c.description.split(" ")[0],checked:u,disabled:!u&&s.length>=3,action:()=>{r.multiGreetChoices=u?s.filter(p=>p!==c.id):[...s,c.id]}})}),o(D.MenuSeparator,null),o(D.MenuItem,{id:"multi-greet-submit",label:"Send Greets",action:()=>_T(t,n,s),disabled:s.length===0}))):null)}var BT,sl,Pf,Mf,FT=g(()=>{"use strict";a();l();_();M();x();B();w();BT=(n=>(n.Greet="Greet",n.NormalMessage="Message",n))(BT||{}),sl=A({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(),Pf=I("sendGreetMessage");Mf=y({name:"GreetStickerPicker",description:"Allows you to use any greet sticker instead of only the random one by right-clicking the 'Wave to say hi!' button",authors:[d.Ven],settings:sl,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||pn.open(e,()=>o(FC,{stickers:t,...n}))}})});function zC(e,t,n){let r=t.name+(t.id?`:${t.id}`:"");return _t.get({url:`/channels/${e.channel_id}/messages/${e.id}/reactions/${r}`,query:{limit:100,type:n},oldFormErrors:!0}).then(i=>O.dispatch({type:"MESSAGE_REACTION_ADD_USERS",channelId:e.channel_id,messageId:e.id,users:i.body,emoji:t,reactionType:n})).catch(console.error).finally(()=>lo(250))}function jC(e,t,n){let r=`${e.id}:${t.name}:${t.id??""}:${n}`,i=GC.__getLocalVars().reactions[r]??={fetched:!1,users:{}};return i.fetched||(HC.unshift(()=>zC(e,t,n)),i.fetched=!0),i.users}function WC(e){return function(n,r){return o(K,{text:e.slice(5).map(i=>i.username).join(", ")},({onMouseEnter:i,onMouseLeave:s})=>o("div",{className:UC.moreUsers,onMouseEnter:i,onMouseLeave:s},"+",e.length-5))}}function qC(e){e.stopPropagation()}var $C,UC,GC,HC,If,$T=g(()=>{"use strict";a();l();ae();M();he();cr();be();x();B();w();$C=se(()=>We("defaultRenderUser","showDefaultAvatarsForNullUsers")),UC=I("moreUsers","emptyUser","avatarContainer","clickableAvatar"),GC=I("getReactions"),HC=new hn;If=y({name:"WhoReacted",description:"Renders the Avatars of reactors",authors:[d.Ven,d.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(E,{noop:!0},o(this._renderUsers,{...e}))},_renderUsers({message:e,emoji:t,type:n}){let r=Dt();N.useEffect(()=>{let c=u=>{u.messageId===e.id&&r()};return O.subscribe("MESSAGE_REACTION_ADD_USERS",c),()=>O.unsubscribe("MESSAGE_REACTION_ADD_USERS",c)},[e.id]);let i=jC(e,t,n),s=Object.values(i).filter(Boolean);for(let c of s)O.dispatch({type:"USER_UPDATE",user:c});return o("div",{style:{marginLeft:"0.5em",transform:"scale(0.9)"}},o("div",{onClick:qC},o($C,{users:s,guildId:J.getChannel(e.channel_id)?.guild_id,renderIcon:!1,max:5,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:WC(s)})))}})});var Cf,UT=g(()=>{"use strict";a();l();Ft();M();x();Cf=y({name:"Wikisearch",description:"Searches Wikipedia for your requested query. (/wikisearch)",authors:[d.Samu],dependencies:["CommandsAPI"],commands:[{name:"wikisearch",description:"Searches Wikipedia for your request.",inputType:0,options:[{name:"search",description:"Word to search for",type:3,required:!0}],execute:async(e,t)=>{let n=Be(e,"search","");if(!n)return ie(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 f("https://en.wikipedia.org/w/api.php?"+r).then(p=>p.json()).catch(p=>(console.log(p),ie(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),ie(t.channel.id,{content:"No results given"});let s=await f(`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(p=>p.json()).then(p=>p.query.pages[0]).catch(p=>(console.log(p),ie(t.channel.id,{content:"There was an error. Check the console for more info"}),null));if(!s)return;let c=s.thumbnail,u=c&&{url:c.source.replace(/(50px-)/ig,"1000px-"),height:c.height*100,width:c.width*100};ie(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(/( |<([^>]+)>)/ig,"").replace(/(")/ig,'"')+"...",image:u,footer:{text:"Powered by the Wikimedia API"}}]})}}]})});var we,mr=g(()=>{a();l();yg();vg();Sg();bg();Tg();xg();wg();Pg();Mg();Ig();Cg();Ng();eu();Vh();ey();ty();ry();iy();my();fy();gy();hy();yy();ky();Ay();Ly();_y();By();Fy();$y();zy();jy();Jy();Qy();Vy();sv();pv();dv();mv();fv();gv();Sv();bv();wv();Pv();Cv();lp();aa();$v();Gv();zv();qv();Zv();Vv();a1();c1();u1();p1();m1();f1();g1();h1();y1();v1();S1();b1();T1();x1();w1();P1();M1();I1();C1();L1();Mi();W1();oS();rS();aS();bS();TS();LS();ES();DS();KS();YS();JS();p0();d0();h0();S0();P0();sb();ab();mb();Im();xb();wb();Pb();Mb();Eb();Db();_b();$b();Gb();Yb();Zb();oT();iT();nf();sT();lT();cT();fT();yT();bT();xT();wT();IT();NT();AT();DT();OT();FT();$T();UT();we={[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,[tc.name]:tc,[nc.name]:nc,[oc.name]:oc,[di.name]:di,[tu.name]:tu,[nu.name]:nu,[ou.name]:ou,[ru.name]:ru,[iu.name]:iu,[lu.name]:lu,[cu.name]:cu,[uu.name]:uu,[pu.name]:pu,[du.name]:du,[mu.name]:mu,[fu.name]:fu,[gu.name]:gu,[wu.name]:wu,[Pu.name]:Pu,[Mu.name]:Mu,[ku.name]:ku,[Ru.name]:Ru,[Au.name]:Au,[Eu.name]:Eu,[_u.name]:_u,[Bu.name]:Bu,[Gu.name]:Gu,[Hu.name]:Hu,[zu.name]:zu,[ju.name]:ju,[Wu.name]:Wu,[Ku.name]:Ku,[Qu.name]:Qu,[Vu.name]:Vu,[tp.name]:tp,[np.name]:np,[rp.name]:rp,[up.name]:up,[mp.name]:mp,[fp.name]:fp,[yp.name]:yp,[vp.name]:vp,[Sp.name]:Sp,[Tp.name]:Tp,[Ip.name]:Ip,[kp.name]:kp,[Rp.name]:Rp,[Ap.name]:Ap,[Lp.name]:Lp,[Dp.name]:Dp,[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,[Zp.name]:Zp,[Xp.name]:Xp,[Jp.name]:Jp,[rd.name]:rd,[id.name]:id,[ud.name]:ud,[pd.name]:pd,[xd.name]:xd,[Cd.name]:Cd,[Nd.name]:Nd,[kd.name]:kd,[Ad.name]:Ad,[Dd.name]:Dd,[zd.name]:zd,[jd.name]:jd,[Wd.name]:Wd,[Qd.name]:Qd,[Vd.name]:Vd,[em.name]:em,[tm.name]:tm,[rm.name]:rm,[xm.name]:xm,[wm.name]:wm,[Pm.name]:Pm,[Nm.name]:Nm,[km.name]:km,[Lm.name]:Lm,[Em.name]:Em,[Dm.name]:Dm,[Fm.name]:Fm,[Um.name]:Um,[zm.name]:zm,[jm.name]:jm,[Wm.name]:Wm,[Km.name]:Km,[Ym.name]:Ym,[Vm.name]:Vm,[rf.name]:rf,[tf.name]:tf,[sf.name]:sf,[lf.name]:lf,[cf.name]:cf,[pf.name]:pf,[df.name]:df,[mf.name]:mf,[ff.name]:ff,[hf.name]:hf,[vf.name]:vf,[Sf.name]:Sf,[Tf.name]:Tf,[xf.name]:xf,[wf.name]:wf,[Mf.name]:Mf,[If.name]:If,[Cf.name]:Cf}});var kf={};ye(kf,{BadgePosition:()=>Ms,_getBadges:()=>KC,addBadge:()=>wd,removeBadge:()=>Pd});function wd(e){e.component&&=E.wrap(e.component,{noop:!0}),Nf.add(e)}function Pd(e){return Nf.delete(e)}function KC(e){let t=[];for(let r of Nf)(!r.shouldShow||r.shouldShow(e))&&(r.position===0?t.unshift({...r,...e}):t.push({...r,...e}));let n=we.BadgeAPI.getDonorBadges(e.user.id);return n&&t.unshift(...n),t}var Ms,Nf,Is=g(()=>{"use strict";a();l();ae();mr();Ms=(n=>(n[n.START=0]="START",n[n.END=1]="END",n))(Ms||{}),Nf=new Set});var Rf={};ye(Rf,{Badges:()=>QC,Commands:()=>ZC,ContextMenu:()=>sN,DataStore:()=>Rt,MemberListDecorators:()=>tN,MessageAccessories:()=>XC,MessageDecorations:()=>eN,MessageEvents:()=>YC,MessagePopover:()=>JC,Notices:()=>Da,Notifications:()=>iN,ServerList:()=>VC,Settings:()=>nN,SettingsStore:()=>oN,Styles:()=>rN});var YC,Da,ZC,Rt,XC,JC,QC,VC,eN,tN,nN,oN,rN,iN,sN,Ai=g(()=>{"use strict";a();l();Is();Ft();It();kn();gd();ua();Sd();Tn();Zo();zs();mo();La();_();Xu();ze();YC=xu,Da=Ec,ZC=Gc,Rt=Nn,XC=wp,JC=ep,QC=kf,VC=Ed,eN=vd,tN=fd,nN=Cc,oN=Zu,rN=cc,iN=pc,sN=ic});var Lf={};ye(Lf,{toggle:()=>Af});async function Af(e){Lo?Lo.disabled=!e:e&&(Lo=document.createElement("style"),Lo.id="vencord-custom-css",document.documentElement.appendChild(Lo),VencordNative.quickCss.addChangeListener(t=>{Lo.textContent=t,Lo.disabled=!C.useQuickCss}),Lo.textContent=await VencordNative.quickCss.get())}async function GT(){Yi||(Yi=document.createElement("style"),Yi.id="vencord-themes",document.documentElement.appendChild(Yi));let{themeLinks:e}=C,t=e.map(n=>`@import url("${n.trim()}");`).join(` -`);Yi.textContent=t}var Lo,Yi,Ef=g(()=>{"use strict";a();l();_();document.addEventListener("DOMContentLoaded",()=>{Af(C.useQuickCss),$s("useQuickCss",Af),GT(),$s("themeLinks",GT)})});var Df={};ye(Df,{Common:()=>Rl,_initWebpack:()=>rs,_resolveReady:()=>os,addListener:()=>ux,cache:()=>Hn,extract:()=>bl,filters:()=>Z,find:()=>jt,findAll:()=>ir,findBulk:()=>Br,findByCode:()=>We,findByCodeLazy:()=>pe,findByProps:()=>Rn,findByPropsLazy:()=>I,findLazy:()=>Ae,findModuleId:()=>is,findStore:()=>cx,findStoreLazy:()=>ce,listeners:()=>vl,mapMangledModule:()=>Wf,mapMangledModuleLazy:()=>Ze,onceReady:()=>yl,removeListener:()=>px,search:()=>Sl,subscriptions:()=>jf,waitFor:()=>Xe,wreq:()=>zt});var al=g(()=>{"use strict";a();l();w();B()});function zT(){function e(t){try{let n=t[1],{subscriptions:r,listeners:i}=Vencord.Webpack,{patches:s}=Vencord.Plugins;for(let c in n){let u=n[c],p=u.toString().replaceAll(` -`,"");p.startsWith("function(")&&(p="0,"+p);let v=u,h=new Set,S=n[c]=function(T,P,L){try{u(T,P,L)}catch(F){if(u===v)throw F;return Eo.error("Error in patched chunk",F),void v(T,P,L)}if(T.exports===unsafeWindow){Object.defineProperty(L.c,c,{value:L.c[c],enumerable:!1,configurable:!0,writable:!0});return}let k=Number(c);for(let F of i)try{F(P,k)}catch(G){Eo.error("Error in webpack listener",G)}for(let[F,G]of r)try{if(F(P))r.delete(F),G(P,k);else if(typeof P=="object"){P.default&&F(P.default)&&(r.delete(F),G(P.default,k));for(let $ in P)$.length<=3&&P[$]&&F(P[$])&&(r.delete(F),G(P[$],k))}}catch($){Eo.error("Error while firing callback for webpack chunk",$)}};try{S.toString=()=>u.toString(),S.original=v}catch{}for(let T=0;Tp.replace(k,F));if(!(P.predicate&&!P.predicate())&&p.includes(P.find)){h.add(P.plugin);for(let k of P.replacement){if(k.predicate&&!k.predicate())continue;let F=u,G=p;qr(k,P.plugin);try{let $=L(k.match,k.replace);$===p&&!P.noWarn?Eo.warn(`Patch by ${P.plugin} had no effect (Module id is ${c}): ${k.match}`):(p=$,u=(0,eval)(`// Webpack Module ${c} - Patched by ${[...h].join(", ")} -${$} -//# sourceURL=WebpackModule${c}`))}catch($){Eo.error(`Patch by ${P.plugin} errored (Module id is ${c}): ${k.match} -`,$),p=G,u=F,h.delete(P.plugin)}}P.all||s.splice(T--,1)}}}}catch(n){Eo.error("Error in handlePush",n)}return e.original.call(unsafeWindow[Yt],t)}e.original=unsafeWindow[Yt].push,Object.defineProperty(unsafeWindow[Yt],"push",{get:()=>e,set:t=>e.original=t,configurable:!0})}var HT,Eo,jT=g(()=>{"use strict";a();l();M();xe();Kr();ns();al();Eo=new X("WebpackInterceptor","#8caaee");unsafeWindow[Yt]?(Eo.info(`Patching ${Yt}.push (was already existant, likely from cache!)`),rs(unsafeWindow[Yt]),zT()):Object.defineProperty(unsafeWindow,Yt,{get:()=>HT,set:e=>{e?.push!==Array.prototype.push&&(Eo.info(`Patching ${Yt}.push`),rs(e),zT(),delete unsafeWindow[Yt],unsafeWindow[Yt]=e),HT=e},configurable:!0})});async function aN(){C.cloud.settingsSync&&C.cloud.authenticated&&(Go.Vencord_settingsDirty?(await dr(),delete Go.Vencord_settingsDirty):await Bs(!1)&&ve({title:"Cloud Settings",body:"Your settings have been updated! Click here to restart to fully apply changes!",color:"var(--green-360)",onClick:Us}))}async function lN(){if(await yl,Zc(),aN(),!1)try{}catch(e){}}var Om=g(()=>{"use strict";a();l();Ai();Ys();Gl();Ef();fr();al();Ef();jT();mo();_();Ys();xs();si();ii();fr();al();w();lN()});var cN={};ye(cN,{Api:()=>Rf,PlainSettings:()=>On,Plugins:()=>Jc,QuickCss:()=>Lf,Settings:()=>C,Updater:()=>kc,Util:()=>Ul,Webpack:()=>Df});a();l();a();l();a();l();var Uf=` - - - - Vencord QuickCSS Editor - - - - - -
-