dotfiles/VencordDesktop/vencordDist/vencordDesktopRenderer.js
2024-01-10 23:19:19 -06:00

206 lines
477 KiB
JavaScript

// Vencord d73790e
// Standalone: true
// Platform: Universal
// Updater disabled: false
"use strict";var Vencord=(()=>{var MM=Object.create;var Sa=Object.defineProperty;var PM=Object.getOwnPropertyDescriptor;var IM=Object.getOwnPropertyNames;var AM=Object.getPrototypeOf,NM=Object.prototype.hasOwnProperty;var Zr=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,o)=>(typeof require<"u"?require:t)[o]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var g=(e,t)=>()=>(e&&(t=e(e=0)),t);var vr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ze=(e,t)=>{for(var o in t)Sa(e,o,{get:t[o],enumerable:!0})},Gh=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of IM(t))!NM.call(e,i)&&i!==o&&Sa(e,i,{get:()=>t[i],enumerable:!(r=PM(t,i))||r.enumerable});return e};var ba=(e,t,o)=>(o=e!=null?MM(AM(e)):{},Gh(t||!e||!e.__esModule?Sa(o,"default",{value:e,enumerable:!0}):o,e)),En=e=>Gh(Sa({},"__esModule",{value:!0}),e);var f,n,a=g(()=>{"use strict";f=Symbol.for("react.fragment"),n=(...e)=>(n=Vencord.Webpack.Common.React.createElement)(...e)});var ie,Ve=g(()=>{"use strict";a();ie=class{constructor(t,o="white"){this.name=t;this.color=o}static makeTitle(t,o){return["%c %c %s ","",`background: ${t}; color: black; font-weight: bold; border-radius: 5px;`,o]}_log(t,o,r,i=""){console[t](`%c Vencord %c %c ${this.name} ${i}`,`background: ${o}; color: black; font-weight: bold; border-radius: 5px;`,"",`background: ${this.color}; color: black; font-weight: bold; border-radius: 5px;`,...r)}log(...t){this._log("log","#a6d189",t)}info(...t){this._log("info","#a6d189",t)}error(...t){this._log("error","#e78284",t)}errorCustomFmt(t,...o){this._log("error","#e78284",o,t)}warn(...t){this._log("warn","#e5c890",t)}debug(...t){this._log("debug","#eebebe",t)}}});var Hh,z,it=g(()=>{"use strict";a();Hh="",z={};for(let e of["top","bottom","left","right"])for(let t of[8,16,20]){let o=`vc-m-${e}-${t}`;z[`${e}${t}`]=o,Hh+=`.${o}{margin-${e}:${t}px;}`}document.addEventListener("DOMContentLoaded",()=>document.head.append(Object.assign(document.createElement("style"),{textContent:Hh,id:"vencord-margins"})),{once:!0})});function _n(e,t=5){let o=0,r;return()=>(!r&&t>o++&&(r=e(),!r&&t===o&&console.error("Lazy factory failed:",e)),r)}function Ft(e,t=5,o=!1){let r=!0;o||setTimeout(()=>r=!1,0);let i=0,s=Object.assign(function(){},{[Yi]:void 0,[Xr](){return!s[Yi]&&t>i++&&(s[Yi]=e(),!s[Yi]&&t===i&&console.error("Lazy factory failed:",e)),s[Yi]}});return new Proxy(s,{...Ta,get(l,c,u){return!o&&r?Ft(()=>Reflect.get(l[Xr](),c,u),t,!0):Reflect.get(l[Xr](),c,u)}})}var zh,Ta,Xr,Yi,qo=g(()=>{"use strict";a();zh=["arguments","caller","prototype"],Ta={},Xr=Symbol.for("vencord.lazy.get"),Yi=Symbol.for("vencord.lazy.cached");for(let e of["apply","construct","defineProperty","deleteProperty","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf"])Ta[e]=(t,...o)=>Reflect[e](t[Xr](),...o);Ta.ownKeys=e=>{let t=e[Xr](),o=Reflect.ownKeys(t);for(let r of zh)o.includes(r)||o.push(r);return o};Ta.getOwnPropertyDescriptor=(e,t)=>{if(typeof t=="string"&&zh.includes(t))return Reflect.getOwnPropertyDescriptor(e,t);let o=Reflect.getOwnPropertyDescriptor(e[Xr](),t);return o&&Object.defineProperty(e,t,o),o}});function It(e,t=5){let o=_n(e,t),r=i=>{let s=o()??CM;return n(s,{...i})};return r.$$vencordInternal=o,r}var CM,Gc=g(()=>{"use strict";a();qo();CM=()=>null});function ln(e){if(typeof e=="string")return e;let t=e.source.replaceAll("\\i","[A-Za-z_$][\\w$]*");return new RegExp(t,e.flags)}function xa(e,t){let o=`Vencord.Plugins.plugins[${JSON.stringify(t)}]`;return typeof e!="function"?e.replaceAll("$self",o):(...r)=>e(...r).replaceAll("$self",o)}function Hc(e,t){if(e.get){let o=e.get;e.get=function(){return t(o.call(this))}}else e.value&&(e.value=t(e.value));return e}function Zi(e,t){let o=Object.getOwnPropertyDescriptors(e);o.match=Hc(o.match,ln),o.replace=Hc(o.replace,r=>xa(r,t)),Object.defineProperties(e,o)}var Jr=g(()=>{"use strict";a()});var kM,Ko,wa=g(()=>{"use strict";a();Ve();kM=(e,t,o)=>t,Ko=kM});function Pa(e){if(cn!==void 0)throw"no.";return e.push([[Symbol("Vencord")],{},t=>Qt=t]),e.pop(),Qt?(cn=Qt.c,!0):!1}function On(e,...t){let o=new Error(`webpack.${e} found no module`);Qr.error(o,"Filter:",t)}function Sr(e){if(typeof e!="function")throw new Error("Invalid filter. Expected a function got "+typeof e);let t=[];for(let o in cn){let r=cn[o];!r?.exports||(e(r.exports)&&t.push(r.exports),r.exports.default&&e(r.exports.default)&&t.push(r.exports.default))}return t}function Wh(...e){let t=Ia(...e);return t?Qt.m[t]:null}function No(e,t){return Ft(e,t)}function Wc(e,t){return It(e,t)}function Vt(e){return Ft(()=>Ao(e))}function Ji(...e){let t=Ao(Ae.byProps(...e),{isIndirect:!0});return t||On("findByProps",...e),t}function P(...e){return Ft(()=>Ji(...e))}function qh(...e){let t=Ao(Ae.byCode(...e),{isIndirect:!0});return t||On("findByCode",...e),t}function un(...e){return Ft(()=>qh(...e))}function Kh(e){let t=Ao(Ae.byStoreName(e),{isIndirect:!0});return t||On("findStore",e),t}function Re(e){return Ft(()=>Kh(e))}function qc(...e){let t=Ao(Ae.componentByCode(...e),{isIndirect:!0});return t||On("findComponentByCode",...e),t}function Kc(e){return It(()=>{let t=Ao(e,{isIndirect:!0});return t||On("findComponent",e),t})}function je(...e){return It(()=>{let t=Ao(Ae.componentByCode(...e),{isIndirect:!0});return t||On("findComponentByCode",...e),t})}function pn(...e){return It(()=>{let t=Ao(Ae.byProps(...e),{isIndirect:!0});return t||On("findExportedComponent",...e),t[e[0]]})}async function Yh(e,t=/\.el\("(.+?)"\)(?<=(\i)\.el.+?)\.then\(\2\.bind\(\2,"\1"\)\)/){let o=Wh(...e);if(!o){let s=new Error("extractAndLoadChunks: Couldn't find module factory");Qr.warn(s,"Code:",e,"Matcher:",t);return}let r=o.toString().match(ln(t));if(!r){let s=new Error("extractAndLoadChunks: Couldn't find entry point id in module factory code");Qr.warn(s,"Code:",e,"Matcher:",t);return}let[,i]=r;if(!i||!Number(i)){let s=new Error("extractAndLoadChunks: Matcher didn't return a capturing group with the entry point, or the entry point returned wasn't a number");Qr.warn(s,"Code:",e,"Matcher:",t);return}return await Qt.el(i),Qt(i)}function Aa(e,t=/\.el\("(.+?)"\)(?<=(\i)\.el.+?)\.then\(\2\.bind\(\2,"\1"\)\)/){return()=>Yh(e,t)}function ft(e,t,{isIndirect:o=!1}={}){if(typeof e=="string")e=Ae.byProps(e);else if(Array.isArray(e))e=Ae.byProps(...e);else if(typeof e!="function")throw new Error("filter must be a string, string[] or function, got "+typeof e);let[r,i]=Ao(e,{isIndirect:!0,isWaitFor:!0});if(r)return void t(r,i);jh.set(e,t)}function DM(e){jc.add(e)}function LM(e){jc.delete(e)}function Yc(...e){let t={},o=Qt.m;e:for(let r in o){let i=o[r].original??o[r],s=i.toString();for(let l of e)if(typeof l=="string"&&!s.includes(l)||l instanceof RegExp&&!l.test(s))continue e;t[r]=i}return t}function Na(e){let t=Qt.m[e];if(!t)return null;let o=`
// [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!!
0,${t.toString()}
//# sourceURL=ExtractedWebpackModule${e}
`;return(0,eval)(o)}var Qr,Ma,zc,Qt,cn,Ae,jh,jc,Ao,Xi,Ia,RM,j=g(()=>{"use strict";a();qo();Gc();Ve();Jr();wa();Qr=new ie("Webpack"),zc=new Promise(e=>Ma=e),Ae={byProps:(...e)=>e.length===1?t=>t[e[0]]!==void 0:t=>e.every(o=>t[o]!==void 0),byCode:(...e)=>t=>{if(typeof t!="function")return!1;let o=Function.prototype.toString.call(t);for(let r of e)if(!o.includes(r))return!1;return!0},byStoreName:e=>t=>t.constructor?.displayName===e,componentByCode:(...e)=>{let t=Ae.byCode(...e);return o=>t(o)?!0:o.$$typeof?o.type?t(o.type):o.render?t(o.render):!1:!1}},jh=new Map,jc=new Set;Ao=Ko("find",function(t,{isIndirect:o=!1,isWaitFor:r=!1}={}){if(typeof t!="function")throw new Error("Invalid filter. Expected a function got "+typeof t);for(let i in cn){let s=cn[i];if(!!s?.exports){if(t(s.exports))return r?[s.exports,i]:s.exports;if(s.exports.default&&t(s.exports.default)){let l=s.exports.default;return r?[l,i]:l}}}return o||On("find",t),r?[null,null]:null});Xi=Ko("findBulk",function(...t){if(!Array.isArray(t))throw new Error("Invalid filters. Expected function[] got "+typeof t);let{length:o}=t;if(o===0)throw new Error("Expected at least two filters.");if(o===1)return Ao(t[0]);let r=t,i=0,s=Array(o);e:for(let l in cn){let c=cn[l];if(!!c?.exports)for(let u=0;u<o;u++){let p=r[u];if(p!==void 0){if(p(c.exports)){if(s[u]=c.exports,r[u]=void 0,++i===o)break e;break}if(c.exports.default&&p(c.exports.default)){if(s[u]=c.exports.default,r[u]=void 0,++i===o)break e;break}}}}if(i!==o){let l=new Error(`Got ${o} filters, but only found ${i} modules!`);Qr.warn(l)}return s}),Ia=Ko("findModuleId",function(...t){e:for(let r in Qt.m){let i=Qt.m[r].toString();for(let s of t)if(!i.includes(s))continue e;return r}let o=new Error(`Didn't find module with code(s):
`+t.join(`
`));return Qr.warn(o),null});RM=[]});var Ca,St,Zh=g(()=>{"use strict";a();j();Ca=Vt(e=>e.image&&e.modal&&!e.applicationIcon),St=P("buttonWrapper","buttonContent")});function ka(e,t){let o=function(){throw new Error(`Vencord could not find the ${e} Component`)},r=It(()=>o);return ft(t,i=>{o=i,Object.assign(r,i)},{isIndirect:!0}),r}function Et(e,t){ft(Ae.byStoreName(e),t,{isIndirect:!0})}var Zc=g(()=>{"use strict";a();ut();j()});var S,At,C,gt,ee,ot,Ra,J,ho,Da,br,eo,Qi,Xh,Co,Jh,Vr,ei,ti,Vi,oi,Yo,_M,es,Qh=g(()=>{"use strict";a();j();Zc();S={},oi=ka("MaskedLink",e=>e?.type?.toString().includes("MASKED_LINK)")),Yo=ka("Timestamp",Ae.byCode(".Messages.MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL.format")),_M=ka("Flex",["Justify","Align","Wrap"]),{OAuth2AuthorizeModal:es}=P("OAuth2AuthorizeModal");ft(["FormItem","Button"],e=>{({useToken:Vi,Card:At,Button:C,FormSwitch:gt,Tooltip:ee,TextInput:ot,TextArea:Ra,Text:J,Select:ho,SearchableSelect:Da,Slider:br,ButtonLooks:eo,TabBar:Co,Popout:Qi,Dialog:Xh,Paginator:Jh,ScrollerThin:Vr,Clickable:ei,Avatar:ti}=e),S=e})});var G,Ut,Vh=g(()=>{"use strict";a();j();G={};ft(["MenuItem","MenuSliderControl"],e=>G=e);Ut=P("closeContextMenu","openContextMenu")});var _,Y,pe,bt,to,ni,La,Tr,ey=g(()=>{"use strict";a();j();Tr=P("createPortal","render");ft("useState",e=>{_=e,{useEffect:pe,useState:Y,useMemo:bt,useRef:to,useReducer:ni,useCallback:La}=_})});var Xc,ri,ts,ty=g(()=>{"use strict";a();j();Xc=P("MessageDisplayCompact"),ri=P("ShowCurrentGame"),ts=P("PreloadedUserSettingsActionCreators")});var Jc,Qc,ko,Vc,_e,ii,xr,Zo,OM,de,U,po,be,mo,Q,Oe,st,Ro,os,ns,Ye,oy=g(()=>{"use strict";a();j();Zc();Jc=P("connectStores"),Qc=(i=>(i[i.ChannelMessage=0]="ChannelMessage",i[i.ThreadSettings=1]="ThreadSettings",i[i.FirstThreadMessage=2]="FirstThreadMessage",i[i.ApplicationLauncherCommand=3]="ApplicationLauncherCommand",i))(Qc||{}),Vc=P("openPrivateChannel"),{useStateFromStores:Ye}=P("useStateFromStores");Et("DraftStore",e=>ns=e);Et("UserStore",e=>U=e);Et("UserProfileStore",e=>po=e);Et("ChannelStore",e=>Q=e);Et("SelectedChannelStore",e=>be=e);Et("SelectedGuildStore",e=>mo=e);Et("GuildStore",e=>de=e);Et("GuildMemberStore",e=>Oe=e);Et("RelationshipStore",e=>st=e);Et("PermissionStore",e=>_e=e);Et("PresenceStore",e=>Zo=e);Et("ReadStateStore",e=>xr=e);Et("GuildChannelStore",e=>ii=e);Et("MessageStore",e=>ko=e);Et("WindowStore",e=>os=e);Et("EmojiStore",e=>Ro=e)});var ny={};var ry=g(()=>{"use strict";a()});var iy={};var sy=g(()=>{"use strict";a()});var ay={};var ly=g(()=>{"use strict";a()});function oo(e,t=cy.MESSAGE){oe.show({id:oe.genId(),message:e,type:t})}var O,Bn,Nt,yo,wr,Mr,et,Xo,Be,_t,cy,BM,oe,Ct,rs,Pr,$t,Do,dn,xe,Ir,FM,eu,no,tu,ou,uy=g(()=>{"use strict";a();j();ft(["dispatch","subscribe"],e=>{O=e;let t=()=>{e.unsubscribe("CONNECTION_OPEN",t),Ma()};e.subscribe("CONNECTION_OPEN",t)});ft(["ComponentDispatch","ComponentDispatcher"],e=>Bn=e.ComponentDispatch);Nt=P("getAPIBaseURL","get"),yo=P("parseTwoDigitYear"),wr=P("highlight","registerLanguage"),Mr=P("debounce","cloneDeep"),et=Vt(e=>e.Messages?.["en-US"]);ft(["fromTimestamp","extractTimestamp"],e=>Xo=e);ft("parseTopic",e=>Be=e);ft(["show","close"],e=>_t=e);cy={MESSAGE:0,SUCCESS:1,FAILURE:2,CUSTOM:3},BM={TOP:0,BOTTOM:1},oe={Type:cy,Position:BM,genId:()=>(Math.random()||Math.random()).toString(36).slice(2)};ft("showToast",e=>{oe.show=e.showToast,oe.pop=e.popToast});Ct=P("getUser","fetchCurrentUser"),rs=P("showUploadFileSizeExceededError","promptToUpload"),Pr=P("fetchAssetIds","getAssetImage"),$t=P("SUPPORTS_COPY","copy"),Do=P("transitionTo","replaceWith","transitionToGuild");ft(["open","saveAccountChanges"],e=>dn=e);({Permissions:xe}=Vt(e=>typeof e.Permissions?.ADMINISTRATOR=="bigint")),Ir=un("will be removed in v4"),FM=Ae.byCode("[zustand persist middleware]"),{persist:eu}=Vt(e=>e.persist&&FM(e.persist)),no=P("editMessage","sendMessage"),tu=P("openUserProfileModal","closeUserProfileModal"),ou=P("resolveInvite")});var nu={};ze(nu,{Alerts:()=>_t,ApplicationAssetUtils:()=>Pr,Avatar:()=>ti,Button:()=>C,ButtonLooks:()=>eo,ButtonWrapperClasses:()=>St,Card:()=>At,ChannelStore:()=>Q,Clickable:()=>ei,Clipboard:()=>$t,ComponentDispatch:()=>Bn,ComponentTypes:()=>ny,ContextMenuApi:()=>Ut,Dialog:()=>Xh,DraftStore:()=>ns,DraftType:()=>Qc,EmojiStore:()=>Ro,Flex:()=>_M,Flux:()=>Jc,FluxDispatcher:()=>O,Forms:()=>S,GuildChannelStore:()=>ii,GuildMemberStore:()=>Oe,GuildStore:()=>de,InviteActions:()=>ou,MaskedLink:()=>oi,Menu:()=>G,MenuTypes:()=>iy,MessageActions:()=>no,MessageStore:()=>ko,ModalImageClasses:()=>Ca,NavigationRouter:()=>Do,OAuth2AuthorizeModal:()=>es,Paginator:()=>Jh,Parser:()=>Be,PermissionStore:()=>_e,PermissionsBits:()=>xe,PoggerModeSettingsStore:()=>OM,Popout:()=>Qi,PresenceStore:()=>Zo,PrivateChannelsStore:()=>Vc,React:()=>_,ReactDOM:()=>Tr,ReadStateStore:()=>xr,RelationshipStore:()=>st,RestAPI:()=>Nt,ScrollerThin:()=>Vr,SearchableSelect:()=>Da,Select:()=>ho,SelectedChannelStore:()=>be,SelectedGuildStore:()=>mo,SettingsRouter:()=>dn,Slider:()=>br,SnowflakeUtils:()=>Xo,StatusSettingsStores:()=>ri,Switch:()=>gt,TabBar:()=>Co,Text:()=>J,TextAndImagesSettingsStores:()=>Xc,TextArea:()=>Ra,TextInput:()=>ot,Timestamp:()=>Yo,Toasts:()=>oe,Tooltip:()=>ee,UploadHandler:()=>rs,UserProfileActions:()=>tu,UserProfileStore:()=>po,UserSettingsActionCreators:()=>ts,UserStore:()=>U,UserUtils:()=>Ct,UtilTypes:()=>ay,WindowStore:()=>os,hljs:()=>wr,i18n:()=>et,lodash:()=>Mr,moment:()=>yo,showToast:()=>oo,useCallback:()=>La,useEffect:()=>pe,useMemo:()=>bt,useReducer:()=>ni,useRef:()=>to,useState:()=>Y,useStateFromStores:()=>Ye,useToken:()=>Vi,zustandCreate:()=>Ir,zustandPersist:()=>eu});var x=g(()=>{"use strict";a();Zh();Qh();Vh();ey();ty();oy();ry();sy();ly();uy()});var fo,si=g(()=>{a();fo="d73790e"});var Ea,py=g(()=>{a();Ea="Vendicated/Vencord"});var Jo,UM,ru,_a,m,ai,A=g(()=>{"use strict";a();si();py();Jo="webpackChunkdiscord_app",UM="Vencord.Webpack.Common.React",ru=`Vencord/${fo}${Ea?` (https://github.com/${Ea})`:""}`,_a="1026515880080842772",m=Object.freeze({Ven:{name:"Vendicated",id:343383572805058560n},Arjix:{name:"ArjixWasTaken",id:674710789138939916n},Cyn:{name:"Cynosphere",id:150745989836308480n},Megu:{name:"Megumin",id:545581357812678656n},botato:{name:"botato",id:440990343899643943n},obscurity:{name:"obscurity",id:336678828233588736n},rushii:{name:"rushii",id:295190422244950017n},Glitch:{name:"Glitchy",id:269567451199569920n},Samu:{name:"Samu",id:702973430449832038n},Nyako:{name:"nyako",id:118437263754395652n},MaiKokain:{name:"Mai",id:722647978577363026n},echo:{name:"ECHO",id:712639419785412668n},katlyn:{name:"katlyn",id:250322741406859265n},nea:{name:"nea",id:310702108997320705n},Nuckyz:{name:"Nuckyz",id:235834946571337729n},D3SOX:{name:"D3SOX",id:201052085641281538n},Nickyux:{name:"Nickyux",id:427146305651998721n},mantikafasi:{name:"mantikafasi",id:287555395151593473n},Xinto:{name:"Xinto",id:423915768191647755n},JacobTm:{name:"Jacob.Tm",id:302872992097107991n},DustyAngel47:{name:"DustyAngel47",id:714583473804935238n},BanTheNons:{name:"BanTheNons",id:460478012794863637n},BigDuck:{name:"BigDuck",id:1024588272623681609n},AverageReactEnjoyer:{name:"Average React Enjoyer",id:1004904120056029256n},adryd:{name:"adryd",id:0n},Tyman:{name:"Tyman",id:487443883127472129n},afn:{name:"afn",id:420043923822608384n},KraXen72:{name:"KraXen72",id:379304073515499530n},kemo:{name:"kemo",id:299693897859465228n},dzshn:{name:"dzshn",id:310449948011528192n},Ducko:{name:"Ducko",id:506482395269169153n},jewdev:{name:"jewdev",id:222369866529636353n},Luna:{name:"Luny",id:821472922140803112n},Vap:{name:"Vap0r1ze",id:454072114492866560n},KingFish:{name:"King Fish",id:499400512559382538n},Commandtechno:{name:"Commandtechno",id:296776625432035328n},TheSun:{name:"ActuallyTheSun",id:406028027768733696n},axyie:{name:"'ax",id:273562710745284628n},pointy:{name:"pointy",id:99914384989519872n},SammCheese:{name:"Samm-Cheese",id:372148345894076416n},zt:{name:"zt",id:289556910426816513n},captain:{name:"Captain",id:347366054806159360n},nick:{name:"nick",id:347884694408265729n,badge:!1},whqwert:{name:"whqwert",id:586239091520176128n},lewisakura:{name:"lewisakura",id:96269247411400704n},RuiNtD:{name:"RuiNtD",id:157917665162297344n},hunt:{name:"hunt-g",id:222800179697287168n},cloudburst:{name:"cloudburst",id:892128204150685769n},Aria:{name:"Syncxv",id:549244932213309442n},TheKodeToad:{name:"TheKodeToad",id:706152404072267788n},LordElias:{name:"LordElias",id:319460781567639554n},juby:{name:"Juby210",id:324622488644616195n},Alyxia:{name:"Alyxia Sother",id:952185386350829688n},Remty:{name:"Remty",id:335055032204656642n},skyevg:{name:"skyevg",id:1090310844283363348n},Dziurwa:{name:"Dziurwa",id:1001086404203389018n},F53:{name:"F53",id:280411966126948353n},AutumnVN:{name:"AutumnVN",id:393694671383166998n},pylix:{name:"pylix",id:492949202121261067n},Tyler:{name:"\\\\GGTyler\\\\",id:143117463788191746n},RyanCaoDev:{name:"RyanCaoDev",id:952235800110694471n},Strencher:{name:"Strencher",id:415849376598982656n},FieryFlames:{name:"Fiery",id:890228870559698955n},KannaDev:{name:"Kanna",id:317728561106518019n},carince:{name:"carince",id:818323528755314698n},PandaNinjas:{name:"PandaNinjas",id:455128749071925248n},CatNoir:{name:"CatNoir",id:260371016348336128n},outfoxxed:{name:"outfoxxed",id:837425748435796060n},UwUDev:{name:"UwU",id:691413039156690994n},amia:{name:"amia",id:142007603549962240n},phil:{name:"phil",id:305288513941667851n},ImLvna:{name:"Luna <3",id:799319081723232267n},rad:{name:"rad",id:610945092504780823n},AndrewDLO:{name:"Andrew-DLO",id:434135504792059917n},HypedDomi:{name:"HypedDomi",id:354191516979429376n},Rini:{name:"Rini",id:1079479184478441643n},castdrian:{name:"castdrian",id:224617799434108928n},Arrow:{name:"arrow",id:958158495302176778n},bb010g:{name:"bb010g",id:72791153467990016n},Lumap:{name:"lumap",id:635383782576357407n},Dolfies:{name:"Dolfies",id:852892297661906993n},RuukuLada:{name:"RuukuLada",id:119705748346241027n},blahajZip:{name:"blahaj.zip",id:683954422241427471n},archeruwu:{name:"archer_uwu",id:160068695383736320n},ProffDea:{name:"ProffDea",id:609329952180928513n},ant0n:{name:"ant0n",id:145224646868860928n},philipbry:{name:"philipbry",id:554994003318276106n},Korbo:{name:"Korbo",id:455856406420258827n},maisymoe:{name:"maisy",id:257109471589957632n},Grzesiek11:{name:"Grzesiek11",id:368475654662127616n}}),ai=(()=>Object.freeze(Object.fromEntries(Object.entries(m).filter(e=>e[1].id!==0n).map(([e,t])=>[t.id,t]))))()});function Ar(e,t){for(let o in t){let r=t[o];typeof r=="object"&&!Array.isArray(r)?(e[o]??={},Ar(e[o],r)):e[o]??=r}return e}function te(...e){return e.filter(Boolean).join(" ")}function Fn(e){return new Promise(t=>setTimeout(t,e))}function vo(e,t="Copied to clipboard!"){$t.SUPPORTS_COPY?$t.copy(e):t="Your browser does not support copying to clipboard",oe.show({message:t,id:oe.genId(),type:oe.Type.SUCCESS})}function $M(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function is(e){for(let t in e)if(Object.hasOwn(e,t))return!1;return!0}function iu(e){try{return new URL(e)}catch{return null}}function ss(e){return e}var su,GM,as,Pe=g(()=>{"use strict";a();x();A();su=e=>{let t=e.getBoundingClientRect(),o=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(t.bottom<0||t.top-o>=0)};GM=navigator.userAgent.includes("Mobi"),as=e=>Object.hasOwn(ai,e)});function at(e,t){let o=Object.assign({fallbackValue:null,deps:[],onError:null},t),[r,i]=Y({value:o.fallbackValue,error:null,pending:!0});return pe(()=>{let s=!0;return r.pending||i({...r,pending:!0}),e().then(l=>{!s||(i({value:l,error:null,pending:!1}),o.onSuccess?.(l))}).catch(l=>{!s||(i({value:null,error:l,pending:!1}),o.onError?.(l))}),()=>void(s=!1)},o.deps),[r.value,r.error,r.pending]}function Un(e){let t=ni(o=>o+1,0);return e?t:t[1]}function ls({interval:e=1e3,deps:t=[]}){let[o,r]=Y(0),i=bt(()=>Date.now(),t);return pe(()=>{let s=setInterval(()=>r(Date.now()-i),e);return()=>{r(0),clearInterval(s)}},t),o}var HM,au,ut=g(()=>{"use strict";a();x();Pe();Gc();HM=()=>null,au=(e=!1)=>{let t=_.useRef(null),[o,r]=Y(!1);return[s=>{t.current?.disconnect(),t.current=null,s&&(su(s)&&(r(!0),e)||(t.current=new IntersectionObserver(l=>{for(let c of l)c.target===s&&(c.isIntersecting&&e?(r(!0),t.current?.disconnect(),t.current=null):r(c.isIntersecting))}),t.current.observe(s)))},o]}});var dy=g(()=>{});function So(e){return n("div",{...e,className:te(e.className,"vc-error-card")},e.children)}var li=g(()=>{"use strict";a();dy();Pe()});var zM,my,fy,lu,B,ae=g(()=>{"use strict";a();Ve();it();ut();x();li();zM="#e78284",my=new ie("React ErrorBoundary",zM),fy={},lu=It(()=>class extends _.PureComponent{state={error:fy,stack:"",message:""};static getDerivedStateFromError(t){let o=t?.stack??"",r=t?.message||String(t);if(t instanceof Error&&o){let i=o.indexOf(`
`);i!==-1&&(r=o.slice(0,i),o=o.slice(i+1).replace(/https:\/\/\S+\/assets\//g,""))}return{error:t,stack:o,message:r}}componentDidCatch(t,o){this.props.onError?.({error:t,errorInfo:o,props:this.props.wrappedProps}),my.error(`A component threw an Error
`,t),my.error("Component Stack",o.componentStack)}render(){if(this.state.error===fy)return this.props.children;if(this.props.noop)return null;if(this.props.fallback)return n(this.props.fallback,{children:this.props.children,...this.state});let t=this.props.message||"An error occurred while rendering this Component. More info can be found below and in your console.";return n(So,{style:{overflow:"hidden"}},n("h1",null,"Oh no!"),n("p",null,t),n("code",null,this.state.message,!!this.state.stack&&n("pre",{className:z.top8},this.state.stack)))}});lu.wrap=(e,t)=>o=>n(lu,{...t,wrappedProps:o},n(e,{...o}));B=lu});function Oa(){return n("svg",{"aria-hidden":"true",height:"16",viewBox:"0 0 16 16",width:"16",style:{marginRight:"0.5em",transform:"translateY(2px)"}},n("path",{fill:"#db61a2","fill-rule":"evenodd",d:"M4.25 2.5c-1.336 0-2.75 1.164-2.75 3 0 2.15 1.58 4.144 3.365 5.682A20.565 20.565 0 008 13.393a20.561 20.561 0 003.135-2.211C12.92 9.644 14.5 7.65 14.5 5.5c0-1.836-1.414-3-2.75-3-1.373 0-2.609.986-3.029 2.456a.75.75 0 01-1.442 0C6.859 3.486 5.623 2.5 4.25 2.5zM8 14.25l-.345.666-.002-.001-.006-.003-.018-.01a7.643 7.643 0 01-.31-.17 22.075 22.075 0 01-3.434-2.414C2.045 10.731 0 8.35 0 5.5 0 2.836 2.086 1 4.25 1 5.797 1 7.153 1.802 8 3.02 8.847 1.802 10.203 1 11.75 1 13.914 1 16 2.836 16 5.5c0 2.85-2.045 5.231-3.885 6.818a22.08 22.08 0 01-3.744 2.584l-.018.01-.006.003h-.002L8 14.25zm0 0l.345.666a.752.752 0 01-.69 0L8 14.25z"}))}var cu=g(()=>{"use strict";a()});function cs(e){return n(C,{...e,look:C.Looks.LINK,color:C.Colors.TRANSPARENT,onClick:()=>VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")},n(Oa,null),"Donate")}var uu=g(()=>{"use strict";a();x();cu()});function ce(e){return e.style??={},e.style.display="flex",e.style.gap??="1em",e.style.flexDirection||=e.flexDirection,delete e.flexDirection,n("div",{...e},e.children)}var kt=g(()=>{"use strict";a()});function us(e,t){return Ba.openModalLazy(e,t)}function we(e,t,o){return Ba.openModal(e,t,o)}function mn(e,t){return Ba.closeModal(e,t)}function Qo(){return Ba.closeAllModals()}var Lo,Eo,pu,Ne,Xe,We,pt,Tt,Ba,nt=g(()=>{"use strict";a();j();ut();Lo=(i=>(i.SMALL="small",i.MEDIUM="medium",i.LARGE="large",i.DYNAMIC="dynamic",i))(Lo||{}),Eo=P("ModalRoot","ModalCloseButton"),pu=pn("ImageModal"),Ne=It(()=>Eo.ModalRoot),Xe=It(()=>Eo.ModalHeader),We=It(()=>Eo.ModalContent),pt=It(()=>Eo.ModalFooter),Tt=It(()=>Eo.ModalCloseButton),Ba=P("openModalLazy")});function y(e){return e}var w=g(()=>{"use strict";a()});async function gy(e=!1){du={};let t={};e&&(t.cache="no-cache"),du=await fetch("https://badges.vencord.dev/badges.json",t).then(o=>o.json())}var jM,WM,du,mu,hy=g(()=>{"use strict";a();Ua();uu();ae();kt();cu();A();it();Pe();nt();w();x();jM="https://vencord.dev/assets/favicon.png",WM={description:"Vencord Contributor",image:jM,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},shouldShow:({user:e})=>as(e.id),link:"https://github.com/Vendicated/Vencord"},du={};mu=y({name:"BadgeAPI",description:"API to add badges to users.",authors:[m.Megu,m.Ven,m.TheSun],required:!0,patches:[{find:"Messages.PROFILE_USER_BADGES,role:",replacement:[{match:/&&(\i)\.push\(\{id:"premium".+?\}\);/,replace:"$&$1.unshift(...Vencord.Api.Badges._getBadges(arguments[0]));"},{match:/alt:" ","aria-hidden":!0,src:(?=(\i)\.src)/,replace:"...$1.props,$& $1.image??"},{match:/(?<=text:(\i)\.description,spacing:12,)children:/,replace:"children:$1.component ? () => $self.renderBadgeComponent($1) :"},{match:/href:(\i)\.link/,replace:"...($1.onClick && { onClick: $1.onClick }),$&"}]}],toolboxActions:{async"Refetch Badges"(){await gy(!0),oe.show({id:oe.genId(),message:"Successfully refetched badges!",type:oe.Type.SUCCESS})}},async start(){Vencord.Api.Badges.addBadge(WM),await gy()},renderBadgeComponent:B.wrap(e=>{let t=e.component;return n(t,{...e})},{noop:!0}),getDonorBadges(e){return du[e]?.map(t=>({image:t.badge,description:t.tooltip,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},onClick(){let o=we(r=>n(B,{noop:!0,onError:()=>{mn(o),VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")}},n(Eo.ModalRoot,{...r},n(Eo.ModalHeader,null,n(ce,{style:{width:"100%",justifyContent:"center"}},n(S.FormTitle,{tag:"h2",style:{width:"100%",textAlign:"center",margin:0}},n(Oa,null),"Vencord Donor"))),n(Eo.ModalContent,null,n(ce,null,n("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533070955872337.png",alt:"",style:{margin:"auto"}}),n("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533090627174460.png",alt:"",style:{margin:"auto"}})),n("div",{style:{padding:"1em"}},n(S.FormText,null,"This Badge is a special perk for Vencord Donors"),n(S.FormText,{className:z.top20},"Please consider supporting the development of Vencord by becoming a donor. It would mean a lot!!"))),n(Eo.ModalFooter,null,n(ce,{style:{width:"100%",justifyContent:"center"}},n(cs,null))))))}}))}})});var fu,yy=g(()=>{"use strict";a();A();w();fu=y({name:"CommandsAPI",authors:[m.Arjix],description:"Api required by anything that uses commands",patches:[{find:',"tenor"',replacement:[{match:/(?<=\w=)(\w)(\.filter\(.{0,60}tenor)/,replace:"Vencord.Api.Commands._init($1)$2"}]},{find:"Unexpected value for option",replacement:{match:/,(\i)\.execute\((\i),(\i)\)/,replace:(e,t,o,r)=>`,Vencord.Api.Commands._handleCommand(${t}, ${o}, ${r})`}},{find:".source,children",replacement:{match:/(?<=:(.{1,3})\.displayDescription\}.{0,200}\.source,children:)[^}]+/,replace:"$1.plugin||($&)"}}]})});var gu,vy=g(()=>{"use strict";a();A();w();gu=y({name:"ContextMenuAPI",description:"API for adding/removing items to/from context menus.",authors:[m.Nuckyz,m.Ven],required:!0,patches:[{find:"\u266B (\u3064\uFF61\u25D5\u203F\u203F\u25D5\uFF61)\u3064 \u266A",replacement:{match:/let{navId:/,replace:"Vencord.Api.ContextMenu._patchContextMenu(arguments[0]);$&"}},{find:".Menu,{",all:!0,replacement:{match:/Menu,{(?<=\.jsxs?\)\(\i\.Menu,{)/g,replace:"$&contextMenuApiArguments:typeof arguments!=='undefined'?arguments:[],"}}]})});var hu,Sy=g(()=>{"use strict";a();A();w();hu=y({name:"MemberListDecoratorsAPI",description:"API to add decorators to member list (both in servers and DMs)",authors:[m.TheSun,m.Ven],patches:[{find:".lostPermission)",replacement:[{match:/let\{[^}]*lostPermissionTooltipText:\i[^}]*\}=(\i),/,replace:"$&vencordProps=$1,"},{match:/decorators:.{0,100}?children:\[/,replace:"$&...(typeof vencordProps=='undefined'?[]:Vencord.Api.MemberListDecorators.__getDecorators(vencordProps)),"}]},{find:"PrivateChannel.renderAvatar",replacement:{match:/decorators:(\i\.isSystemDM\(\))\?(.+?):null/,replace:"decorators:[...Vencord.Api.MemberListDecorators.__getDecorators(arguments[0]), $1?$2:null]"}}]})});var yu,by=g(()=>{"use strict";a();A();w();yu=y({name:"MessageAccessoriesAPI",description:"API to add message accessories.",authors:[m.Cyn],patches:[{find:".Messages.REMOVE_ATTACHMENT_BODY",replacement:{match:/(?<=.container\)?,children:)(\[.+?\])/,replace:"Vencord.Api.MessageAccessories._modifyAccessories($1,this.props)"}}]})});var vu,Ty=g(()=>{"use strict";a();A();w();vu=y({name:"MessageDecorationsAPI",description:"API to add decorations to messages",authors:[m.TheSun],patches:[{find:'"Message Username"',replacement:{match:/\.Messages\.GUILD_COMMUNICATION_DISABLED_BOTTOM_SHEET_TITLE.+?}\),\i(?=\])/,replace:"$&,...Vencord.Api.MessageDecorations.__addDecorationsToMessage(arguments[0])"}}]})});var Su,xy=g(()=>{"use strict";a();A();w();Su=y({name:"MessageEventsAPI",description:"Api required by anything using message events.",authors:[m.Arjix,m.hunt,m.Ven],patches:[{find:'"MessageActionCreators"',replacement:{match:/async editMessage\(.+?\)\{/,replace:"$&await Vencord.Api.MessageEvents._handlePreEdit(...arguments);"}},{find:".handleSendMessage=",replacement:{match:/(type:this\.props\.chatInputType.+?\.then\()(\i=>\{.+?let (\i)=\i\.\i\.parse\((\i),.+?let (\i)=\i\.\i\.getSendMessageOptionsForReply\(\i\);)(?<=\)\(({.+?})\)\.then.+?)/,replace:(e,t,o,r,i,s,l)=>`${t}async ${o}if(await Vencord.Api.MessageEvents._handlePreSend(${i}.id,${r},${l},${s}))return{shoudClear:true,shouldRefocus:true};`}},{find:'("interactionUsernameProfile',replacement:{match:/let\{id:\i}=(\i),{id:\i}=(\i);return \i\.useCallback\((\i)=>\{/,replace:(e,t,o,r)=>`const vcMsg=${t},vcChan=${o};${e}Vencord.Api.MessageEvents._handleClick(vcMsg, vcChan, ${r});`}}]})});var bu,wy=g(()=>{"use strict";a();A();w();bu=y({name:"MessagePopoverAPI",description:"API to add buttons to message popovers.",authors:[m.KingFish,m.Ven,m.Nuckyz],patches:[{find:"Messages.MESSAGE_UTILITIES_A11Y_LABEL",replacement:{match:/\i&&!\i\?\(0,\i\.jsxs?\)\(.{0,200}renderEmojiPicker:.{0,500}\?(\i)\(\{key:"reply-other"/,replace:(e,t)=>{let o=e.match(/message:(.{1,3}),/)?.[1];if(!o)throw new Error("Could not find message variable");return`...Vencord.Api.MessagePopover._buildPopoverElements(${o},${t}),${e}`}}}]})});var Tu,My=g(()=>{"use strict";a();A();w();Tu=y({name:"NoticesAPI",description:"Fixes notices being automatically dismissed",authors:[m.Ven],required:!0,patches:[{find:'displayName="NoticeStore"',replacement:[{match:/\i=null;(?=.{0,80}getPremiumSubscription\(\))/g,replace:"if(Vencord.Api.Notices.currentNotice)return false;$&"},{match:/(?<=,NOTICE_DISMISS:function\(\i\){)return null!=(\i)/,replace:'if($1.id=="VencordNotice")return($1=null,Vencord.Api.Notices.nextNotice(),true);$&'}]}]})});var xu,Py=g(()=>{"use strict";a();A();w();xu=y({name:"ServerListAPI",authors:[m.kemo],description:"Api required for plugins that modify the server list",patches:[{find:"Messages.DISCODO_DISABLED",replacement:{match:/(?<=Messages\.DISCODO_DISABLED.+?return)(\(.{0,75}?tutorialContainer.+?}\))(?=}function)/,replace:"[$1].concat(Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.Above))"}},{find:"Messages.SERVERS,children",replacement:{match:/(?<=Messages\.SERVERS,children:).+?default:return null\}\}\)/,replace:"Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.In).concat($&)"}}]})});var wu,Iy=g(()=>{"use strict";a();A();w();wu=y({name:"NoTrack",description:"Disable Discord's tracking ('science'), metrics and Sentry crash reporting",authors:[m.Cyn,m.Ven,m.Nuckyz,m.Arrow],required:!0,patches:[{find:"AnalyticsActionHandlers.handle",replacement:{match:/^.+$/,replace:"()=>{}"}},{find:"window.DiscordSentry=",replacement:{match:/^.+$/,replace:"()=>{}"}},{find:".METRICS,",replacement:[{match:/this\._intervalId=/,replace:"this._intervalId=undefined&&"},{match:/(increment\(\i\){)/,replace:"$1return;"}]},{find:".installedLogHooks)",replacement:{match:"getDebugLogging(){",replace:"getDebugLogging(){return false;"}}]})});var Pu={};ze(Pu,{_patchContextMenu:()=>YM,addContextMenuPatch:()=>ue,addGlobalContextMenuPatch:()=>qM,findGroupChildrenByChildId:()=>dt,globalPatches:()=>$a,navPatches:()=>ps,removeContextMenuPatch:()=>fe,removeGlobalContextMenuPatch:()=>KM});function ue(e,t){Array.isArray(e)||(e=[e]);for(let o of e){let r=ps.get(o);r||(r=new Set,ps.set(o,r)),r.add(t)}}function qM(e){$a.add(e)}function fe(e,t){let r=(Array.isArray(e)?e:[e]).map(i=>ps.get(i)?.delete(t)??!1);return Array.isArray(e)?r:r[0]}function KM(e){return $a.delete(e)}function dt(e,t,o){for(let r of t){if(r==null)continue;if(Array.isArray(e)&&e.some(s=>r.props?.id===s)||r.props?.id===e)return o??null;let i=r.props?.children;if(i){Array.isArray(i)||(i=[i],r.props.children=i);let s=dt(e,i,i);if(s!==null)return s}}return null}function YM(e){e.contextMenuApiArguments??=[];let t=ps.get(e.navId);if(Array.isArray(e.children)||(e.children=[e.children]),t)for(let o of t)try{let r=o(e.children,...e.contextMenuApiArguments);Mu.has(e)||r?.()}catch(r){Ay.error(`Patch for ${e.navId} errored,`,r)}for(let o of $a)try{let r=o(e.navId,e.children,...e.contextMenuApiArguments);Mu.has(e)||r?.()}catch(r){Ay.error("Global patch errored,",r)}Mu.add(e)}var Ay,ps,$a,Mu,Rt=g(()=>{"use strict";a();Ve();Ay=new ie("ContextMenu"),ps=new Map,$a=new Set;Mu=new WeakSet});function ro(e,t=300){let o;return function(...r){clearTimeout(o),o=setTimeout(()=>{e(...r)},t)}}var Nr=g(()=>{"use strict";a()});var Cr,Ga=g(()=>{"use strict";a();({localStorage:Cr}=window)});var _o,ci=g(()=>{"use strict";a();_o=class{constructor(t=1/0){this.maxSize=t}queue=[];promise;next(){let t=this.queue.shift();t?this.promise=Promise.resolve().then(t).finally(()=>this.next()):this.promise=void 0}run(){this.promise||this.next()}push(t){this.size>=this.maxSize&&this.queue.shift(),this.queue.push(t),this.run()}unshift(t){this.size>=this.maxSize&&this.queue.pop(),this.queue.unshift(t),this.run()}get size(){return this.queue.length}}});var Ny=g(()=>{});var Ha,Iu=g(()=>{"use strict";a();Ny();$();ae();Pe();x();Ha=B.wrap(function({title:t,body:o,richBody:r,color:i,icon:s,onClick:l,onClose:c,image:u,permanent:p,className:d,dismissOnClick:h}){let{timeout:v,position:T}=mt(["notifications.timeout","notifications.position"]).notifications,N=Ye([os],()=>os.isFocused()),[b,I]=Y(!1),[k,M]=Y(0),F=bt(()=>Date.now(),[v,b,N]);pe(()=>{if(b||!N||v===0||p)return void M(0);let X=setInterval(()=>{let Z=Date.now()-F;Z>=v?c():M(Z)},10);return()=>clearInterval(X)},[v,b,N]);let H=k/v;return n("button",{className:te("vc-notification-root",d),style:T==="bottom-right"?{bottom:"1rem"}:{top:"3rem"},onClick:()=>{l?.(),h!==!1&&c()},onContextMenu:X=>{X.preventDefault(),X.stopPropagation(),c()},onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1)},n("div",{className:"vc-notification"},s&&n("img",{className:"vc-notification-icon",src:s,alt:""}),n("div",{className:"vc-notification-content"},n("div",{className:"vc-notification-header"},n("h2",{className:"vc-notification-title"},t),n("button",{className:"vc-notification-close-btn",onClick:X=>{X.preventDefault(),X.stopPropagation(),c()}},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24",role:"img","aria-labelledby":"vc-notification-dismiss-title"},n("title",{id:"vc-notification-dismiss-title"},"Dismiss Notification"),n("path",{fill:"currentColor",d:"M18.4 4L12 10.4L5.6 4L4 5.6L10.4 12L4 18.4L5.6 20L12 13.6L18.4 20L20 18.4L13.6 12L20 5.6L18.4 4Z"})))),n("div",null,r??n("p",{className:"vc-notification-p"},o)))),u&&n("img",{className:"vc-notification-img",src:u,alt:""}),v!==0&&!p&&n("div",{className:"vc-notification-progressbar",style:{width:`${(1-H)*100}%`,backgroundColor:i||"var(--brand-experiment)"}}))},{onError:({props:e})=>e.onClose()})});var fn={};ze(fn,{clear:()=>QM,createStore:()=>Cy,del:()=>Nu,delMany:()=>JM,entries:()=>tP,get:()=>Dt,getMany:()=>XM,keys:()=>VM,promisifyRequest:()=>zt,set:()=>io,setMany:()=>ZM,update:()=>kr,values:()=>eP});function zt(e){return new Promise((t,o)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>o(e.error)})}function Cy(e,t){let o=indexedDB.open(e);o.onupgradeneeded=()=>o.result.createObjectStore(t);let r=zt(o);return(i,s)=>r.then(l=>s(l.transaction(t,i).objectStore(t)))}function Oo(){return Au||(Au=Cy("VencordData","VencordStore")),Au}function Dt(e,t=Oo()){return t("readonly",o=>zt(o.get(e)))}function io(e,t,o=Oo()){return o("readwrite",r=>(r.put(t,e),zt(r.transaction)))}function ZM(e,t=Oo()){return t("readwrite",o=>(e.forEach(r=>o.put(r[1],r[0])),zt(o.transaction)))}function XM(e,t=Oo()){return t("readonly",o=>Promise.all(e.map(r=>zt(o.get(r)))))}function kr(e,t,o=Oo()){return o("readwrite",r=>new Promise((i,s)=>{r.get(e).onsuccess=function(){try{r.put(t(this.result),e),i(zt(r.transaction))}catch(l){s(l)}}}))}function Nu(e,t=Oo()){return t("readwrite",o=>(o.delete(e),zt(o.transaction)))}function JM(e,t=Oo()){return t("readwrite",o=>(e.forEach(r=>o.delete(r)),zt(o.transaction)))}function QM(e=Oo()){return e("readwrite",t=>(t.clear(),zt(t.transaction)))}function Cu(e,t){return e.openCursor().onsuccess=function(){!this.result||(t(this.result),this.result.continue())},zt(e.transaction)}function VM(e=Oo()){return e("readonly",t=>{if(t.getAllKeys)return zt(t.getAllKeys());let o=[];return Cu(t,r=>o.push(r.key)).then(()=>o)})}function eP(e=Oo()){return e("readonly",t=>{if(t.getAll)return zt(t.getAll());let o=[];return Cu(t,r=>o.push(r.value)).then(()=>o)})}function tP(e=Oo()){return e("readonly",t=>{if(t.getAll&&t.getAllKeys)return Promise.all([zt(t.getAllKeys()),zt(t.getAll())]).then(([r,i])=>r.map((s,l)=>[s,i[l]]));let o=[];return e("readonly",r=>Cu(r,i=>o.push([i.key,i.value])).then(()=>o))})}var Au,Vo=g(()=>{"use strict";a();});var Du={};ze(Du,{classNameFactory:()=>Fe,classNameToSelector:()=>Ry,compileStyle:()=>Ru,disableStyle:()=>jt,enableStyle:()=>xt,isStyleEnabled:()=>ku,requireStyle:()=>ds,setStyleClassNames:()=>nP,styleMap:()=>ky,toggleStyle:()=>oP});function ds(e){let t=ky.get(e);if(!t)throw new Error(`Style "${e}" does not exist`);return t}function xt(e){let t=ds(e);return t.dom?.isConnected?!1:(t.dom||(t.dom=document.createElement("style"),t.dom.dataset.vencordName=t.name),Ru(t),document.head.appendChild(t.dom),!0)}function jt(e){let t=ds(e);return t.dom?.isConnected?(t.dom.remove(),t.dom=null,!0):!1}var ky,oP,ku,nP,Ru,Ry,Fe,rt=g(()=>{"use strict";a();ky=window.VencordStyles??=new Map;oP=e=>ku(e)?jt(e):xt(e),ku=e=>ds(e).dom?.isConnected??!1,nP=(e,t,o=!0)=>{let r=ds(e);r.classNames=t,o&&ku(r.name)&&Ru(r)},Ru=e=>{if(!e.dom)throw new Error("Style has no DOM element");e.dom.textContent=e.source.replace(/\[--(\w+)\]/g,(t,o)=>{let r=e.classNames[o];return r?Ry(r):t})},Ry=(e,t="")=>e.split(" ").map(o=>`.${t}${o}`).join(""),Fe=(e="")=>(...t)=>{let o=new Set;for(let r of t)r&&typeof r=="string"?o.add(r):Array.isArray(r)?r.forEach(i=>o.add(i)):r&&typeof r=="object"&&Object.entries(r).forEach(([i,s])=>s&&o.add(i));return Array.from(o,r=>e+r).join(" ")}});var Dy,Ly=g(()=>{a();Dy=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,o)=>(o&=63,o<36?t+=o.toString(36):o<62?t+=(o-26).toString(36).toUpperCase():o>62?t+="-":t+="_",t),"")});async function _y(e){if(e.noPersist)return;let t=E.notifications.logLimit;t!==0&&(await kr(za,o=>{let r=o??[],{onClick:i,onClose:s,richBody:l,permanent:c,noPersist:u,dismissOnClick:p,...d}=e;return r.unshift({...d,timestamp:Date.now(),id:Dy()}),r.length>t&&t!==200&&(r.length=t),r}),ms.forEach(o=>o()))}async function rP(e){let t=await Ey(),o=t.findIndex(r=>r.timestamp===e);o!==-1&&(t.splice(o,1),await io(za,t),ms.forEach(r=>r()))}function iP(){let[e,t]=ni(s=>s+1,0);pe(()=>(ms.add(t),()=>void ms.delete(t)),[]);let[o,r,i]=at(Ey,{fallbackValue:[],deps:[e]});return[o,i]}function sP({data:e}){let[t,o]=Y(!1),r=_.useRef(null);return pe(()=>{let i=r.current,s=()=>{if(i.clientHeight===0)return requestAnimationFrame(s);i.style.height=`${i.clientHeight}px`};s()},[]),n("div",{className:ui("wrapper",{removing:t}),ref:r},n(Ha,{...e,permanent:!0,dismissOnClick:!1,onClose:()=>{t||(o(!0),setTimeout(()=>rP(e.timestamp),200))},richBody:n("div",{className:ui("body")},e.body,n(Yo,{timestamp:yo(e.timestamp),className:ui("timestamp")}))}))}function aP({log:e,pending:t}){return!e.length&&!t?n("div",{className:ui("container")},n("div",{className:ui("empty")}),n(S.FormText,{style:{textAlign:"center"}},"No notifications yet")):n("div",{className:ui("container")},e.map(o=>n(sP,{data:o,key:o.id})))}function lP({modalProps:e,close:t}){let[o,r]=iP();return n(Ne,{...e,size:"large"},n(Xe,null,n(J,{variant:"heading-lg/semibold",style:{flexGrow:1}},"Notification Log"),n(Tt,{onClick:t})),n(We,null,n(aP,{log:o,pending:r})),n(pt,null,n(C,{disabled:o.length===0,onClick:()=>{_t.show({title:"Are you sure?",body:`This will permanently remove ${o.length} notification${o.length===1?"":"s"}. This action cannot be undone.`,async onConfirm(){await io(za,[]),ms.forEach(i=>i())},confirmText:"Do it!",confirmColor:"vc-notification-log-danger-btn",cancelText:"Nevermind"})}},"Clear Notification Log")))}function ja(){let e=we(t=>n(lP,{modalProps:t,close:()=>mn(e)}))}var za,Ey,ui,ms,Wa=g(()=>{"use strict";a();Vo();$();rt();nt();ut();x();Ly();Iu();za="notification-log",Ey=async()=>await Dt(za)??[],ui=Fe("vc-notification-log-"),ms=new Set});function pP(){if(!Lu){let e=document.createElement("div");e.id="vc-notification-container",document.body.append(e),Lu=Tr.createRoot(e)}return Lu}function dP(e,t){let o=pP();return new Promise(r=>{o.render(n(Ha,{key:t,...e,onClose:()=>{e.onClose?.(),o.render(null),r()}}))})}function mP(){if(typeof Notification>"u")return!1;let{useNative:e}=E.notifications;return e==="always"?!0:e==="not-focused"?!document.hasFocus():!1}async function Oy(){return Notification.permission==="granted"||Notification.permission!=="denied"&&await Notification.requestPermission()==="granted"}async function De(e){if(_y(e),mP()&&await Oy()){let{title:t,body:o,icon:r,image:i,onClick:s=null,onClose:l=null}=e,c=new Notification(t,{body:o,icon:r,image:i});c.onclick=s,c.onclose=l}else cP.push(()=>dP(e,uP++))}var cP,Lu,uP,By=g(()=>{"use strict";a();$();ci();x();Iu();Wa();cP=new _o,uP=42});var Eu={};ze(Eu,{requestPermission:()=>Oy,showNotification:()=>De});var $n=g(()=>{"use strict";a();By()});function qy(e,t){return wP(e,t||{},0,0)}function Ky(e,t){return bP(e,t)}var Wt,so,qa,Ka,Ya,Fu,Gy,Hy,zy,Uu,jy,fP,Fy,$u,gn,Ue,en,Hn,Ue,Ue,Ue,Ue,hs,Ue,gP,hP,yP,vP,_u,Bo,Ou,zu,Wy,SP,Gn,bP,hn,fs,Bu,Gu,Uy,gs,Hu,$y,TP,ju,xP,wP,MP,PP,Yy=g(()=>{a();Wt=Uint8Array,so=Uint16Array,qa=Uint32Array,Ka=new Wt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Ya=new Wt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Fu=new Wt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Gy=function(e,t){for(var o=new so(31),r=0;r<31;++r)o[r]=t+=1<<e[r-1];for(var i=new qa(o[30]),r=1;r<30;++r)for(var s=o[r];s<o[r+1];++s)i[s]=s-o[r]<<5|r;return[o,i]},Hy=Gy(Ka,2),zy=Hy[0],Uu=Hy[1];zy[28]=258,Uu[258]=28;jy=Gy(Ya,0),fP=jy[0],Fy=jy[1],$u=new so(32768);for(Ue=0;Ue<32768;++Ue)gn=(Ue&43690)>>>1|(Ue&21845)<<1,gn=(gn&52428)>>>2|(gn&13107)<<2,gn=(gn&61680)>>>4|(gn&3855)<<4,$u[Ue]=((gn&65280)>>>8|(gn&255)<<8)>>>1;en=function(e,t,o){for(var r=e.length,i=0,s=new so(t);i<r;++i)e[i]&&++s[e[i]-1];var l=new so(t);for(i=0;i<t;++i)l[i]=l[i-1]+s[i-1]<<1;var c;if(o){c=new so(1<<t);var u=15-t;for(i=0;i<r;++i)if(e[i])for(var p=i<<4|e[i],d=t-e[i],h=l[e[i]-1]++<<d,v=h|(1<<d)-1;h<=v;++h)c[$u[h]>>>u]=p}else for(c=new so(r),i=0;i<r;++i)e[i]&&(c[i]=$u[l[e[i]-1]++]>>>15-e[i]);return c},Hn=new Wt(288);for(Ue=0;Ue<144;++Ue)Hn[Ue]=8;for(Ue=144;Ue<256;++Ue)Hn[Ue]=9;for(Ue=256;Ue<280;++Ue)Hn[Ue]=7;for(Ue=280;Ue<288;++Ue)Hn[Ue]=8;hs=new Wt(32);for(Ue=0;Ue<32;++Ue)hs[Ue]=5;gP=en(Hn,9,0),hP=en(Hn,9,1),yP=en(hs,5,0),vP=en(hs,5,1),_u=function(e){for(var t=e[0],o=1;o<e.length;++o)e[o]>t&&(t=e[o]);return t},Bo=function(e,t,o){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&o},Ou=function(e,t){var o=t/8|0;return(e[o]|e[o+1]<<8|e[o+2]<<16)>>(t&7)},zu=function(e){return(e+7)/8|0},Wy=function(e,t,o){(t==null||t<0)&&(t=0),(o==null||o>e.length)&&(o=e.length);var r=new(e.BYTES_PER_ELEMENT==2?so:e.BYTES_PER_ELEMENT==4?qa:Wt)(o-t);return r.set(e.subarray(t,o)),r},SP=["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"],Gn=function(e,t,o){var r=new Error(t||SP[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,Gn),!o)throw r;return r},bP=function(e,t,o){var r=e.length;if(!r||o&&o.f&&!o.l)return t||new Wt(0);var i=!t||o,s=!o||o.i;o||(o={}),t||(t=new Wt(r*3));var l=function(fr){var Dn=t.length;if(fr>Dn){var Ln=new Wt(Math.max(Dn*2,fr));Ln.set(t),t=Ln}},c=o.f||0,u=o.p||0,p=o.b||0,d=o.l,h=o.d,v=o.m,T=o.n,N=r*8;do{if(!d){c=Bo(e,u,1);var b=Bo(e,u+1,3);if(u+=3,b)if(b==1)d=hP,h=vP,v=9,T=5;else if(b==2){var F=Bo(e,u,31)+257,H=Bo(e,u+10,15)+4,X=F+Bo(e,u+5,31)+1;u+=14;for(var Z=new Wt(X),q=new Wt(19),L=0;L<H;++L)q[Fu[L]]=Bo(e,u+L*3,7);u+=H*3;for(var V=_u(q),re=(1<<V)-1,Me=en(q,V,1),L=0;L<X;){var le=Me[Bo(e,u,re)];u+=le&15;var I=le>>>4;if(I<16)Z[L++]=I;else{var Le=0,he=0;for(I==16?(he=3+Bo(e,u,3),u+=2,Le=Z[L-1]):I==17?(he=3+Bo(e,u,7),u+=3):I==18&&(he=11+Bo(e,u,127),u+=7);he--;)Z[L++]=Le}}var Se=Z.subarray(0,F),Ie=Z.subarray(F);v=_u(Se),T=_u(Ie),d=en(Se,v,1),h=en(Ie,T,1)}else Gn(1);else{var I=zu(u)+4,k=e[I-4]|e[I-3]<<8,M=I+k;if(M>r){s&&Gn(0);break}i&&l(p+k),t.set(e.subarray(I,M),p),o.b=p+=k,o.p=u=M*8,o.f=c;continue}if(u>N){s&&Gn(0);break}}i&&l(p+131072);for(var ke=(1<<v)-1,Te=(1<<T)-1,ge=u;;ge=u){var Le=d[Ou(e,u)&ke],yt=Le>>>4;if(u+=Le&15,u>N){s&&Gn(0);break}if(Le||Gn(2),yt<256)t[p++]=yt;else if(yt==256){ge=u,d=null;break}else{var tt=yt-254;if(yt>264){var L=yt-257,Ee=Ka[L];tt=Bo(e,u,(1<<Ee)-1)+zy[L],u+=Ee}var Jt=h[Ou(e,u)&Te],Mt=Jt>>>4;Jt||Gn(3),u+=Jt&15;var Ie=fP[Mt];if(Mt>3){var Ee=Ya[Mt];Ie+=Ou(e,u)&(1<<Ee)-1,u+=Ee}if(u>N){s&&Gn(0);break}i&&l(p+131072);for(var vt=p+tt;p<vt;p+=4)t[p]=t[p-Ie],t[p+1]=t[p+1-Ie],t[p+2]=t[p+2-Ie],t[p+3]=t[p+3-Ie];p=vt}}o.l=d,o.p=ge,o.b=p,o.f=c,d&&(c=1,o.m=v,o.d=h,o.n=T)}while(!c);return p==t.length?t:Wy(t,0,p)},hn=function(e,t,o){o<<=t&7;var r=t/8|0;e[r]|=o,e[r+1]|=o>>>8},fs=function(e,t,o){o<<=t&7;var r=t/8|0;e[r]|=o,e[r+1]|=o>>>8,e[r+2]|=o>>>16},Bu=function(e,t){for(var o=[],r=0;r<e.length;++r)e[r]&&o.push({s:r,f:e[r]});var i=o.length,s=o.slice();if(!i)return[ju,0];if(i==1){var l=new Wt(o[0].s+1);return l[o[0].s]=1,[l,1]}o.sort(function(X,Z){return X.f-Z.f}),o.push({s:-1,f:25001});var c=o[0],u=o[1],p=0,d=1,h=2;for(o[0]={s:-1,f:c.f+u.f,l:c,r:u};d!=i-1;)c=o[o[p].f<o[h].f?p++:h++],u=o[p!=d&&o[p].f<o[h].f?p++:h++],o[d++]={s:-1,f:c.f+u.f,l:c,r:u};for(var v=s[0].s,r=1;r<i;++r)s[r].s>v&&(v=s[r].s);var T=new so(v+1),N=Gu(o[d-1],T,0);if(N>t){var r=0,b=0,I=N-t,k=1<<I;for(s.sort(function(Z,q){return T[q.s]-T[Z.s]||Z.f-q.f});r<i;++r){var M=s[r].s;if(T[M]>t)b+=k-(1<<N-T[M]),T[M]=t;else break}for(b>>>=I;b>0;){var F=s[r].s;T[F]<t?b-=1<<t-T[F]++-1:++r}for(;r>=0&&b;--r){var H=s[r].s;T[H]==t&&(--T[H],++b)}N=t}return[new Wt(T),N]},Gu=function(e,t,o){return e.s==-1?Math.max(Gu(e.l,t,o+1),Gu(e.r,t,o+1)):t[e.s]=o},Uy=function(e){for(var t=e.length;t&&!e[--t];);for(var o=new so(++t),r=0,i=e[0],s=1,l=function(u){o[r++]=u},c=1;c<=t;++c)if(e[c]==i&&c!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)l(32754);s>2&&(l(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(l(i),--s;s>6;s-=6)l(8304);s>2&&(l(s-3<<5|8208),s=0)}for(;s--;)l(i);s=1,i=e[c]}return[o.subarray(0,r),t]},gs=function(e,t){for(var o=0,r=0;r<t.length;++r)o+=e[r]*t[r];return o},Hu=function(e,t,o){var r=o.length,i=zu(t+2);e[i]=r&255,e[i+1]=r>>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var s=0;s<r;++s)e[i+s+4]=o[s];return(i+4+r)*8},$y=function(e,t,o,r,i,s,l,c,u,p,d){hn(t,d++,o),++i[256];for(var h=Bu(i,15),v=h[0],T=h[1],N=Bu(s,15),b=N[0],I=N[1],k=Uy(v),M=k[0],F=k[1],H=Uy(b),X=H[0],Z=H[1],q=new so(19),L=0;L<M.length;++L)q[M[L]&31]++;for(var L=0;L<X.length;++L)q[X[L]&31]++;for(var V=Bu(q,7),re=V[0],Me=V[1],le=19;le>4&&!re[Fu[le-1]];--le);var Le=p+5<<3,he=gs(i,Hn)+gs(s,hs)+l,Se=gs(i,v)+gs(s,b)+l+14+3*le+gs(q,re)+(2*q[16]+3*q[17]+7*q[18]);if(Le<=he&&Le<=Se)return Hu(t,d,e.subarray(u,u+p));var Ie,ke,Te,ge;if(hn(t,d,1+(Se<he)),d+=2,Se<he){Ie=en(v,T,0),ke=v,Te=en(b,I,0),ge=b;var yt=en(re,Me,0);hn(t,d,F-257),hn(t,d+5,Z-1),hn(t,d+10,le-4),d+=14;for(var L=0;L<le;++L)hn(t,d+3*L,re[Fu[L]]);d+=3*le;for(var tt=[M,X],Ee=0;Ee<2;++Ee)for(var Jt=tt[Ee],L=0;L<Jt.length;++L){var Mt=Jt[L]&31;hn(t,d,yt[Mt]),d+=re[Mt],Mt>15&&(hn(t,d,Jt[L]>>>5&127),d+=Jt[L]>>>12)}}else Ie=gP,ke=Hn,Te=yP,ge=hs;for(var L=0;L<c;++L)if(r[L]>255){var Mt=r[L]>>>18&31;fs(t,d,Ie[Mt+257]),d+=ke[Mt+257],Mt>7&&(hn(t,d,r[L]>>>23&31),d+=Ka[Mt]);var vt=r[L]&31;fs(t,d,Te[vt]),d+=ge[vt],vt>3&&(fs(t,d,r[L]>>>5&8191),d+=Ya[vt])}else fs(t,d,Ie[r[L]]),d+=ke[r[L]];return fs(t,d,Ie[256]),d+ke[256]},TP=new qa([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ju=new Wt(0),xP=function(e,t,o,r,i,s){var l=e.length,c=new Wt(r+l+5*(1+Math.ceil(l/7e3))+i),u=c.subarray(r,c.length-i),p=0;if(!t||l<8)for(var d=0;d<=l;d+=65535){var h=d+65535;h>=l&&(u[p>>3]=s),p=Hu(u,p+1,e.subarray(d,h))}else{for(var v=TP[t-1],T=v>>>13,N=v&8191,b=(1<<o)-1,I=new so(32768),k=new so(b+1),M=Math.ceil(o/3),F=2*M,H=function(se){return(e[se]^e[se+1]<<M^e[se+2]<<F)&b},X=new qa(25e3),Z=new so(288),q=new so(32),L=0,V=0,d=0,re=0,Me=0,le=0;d<l;++d){var Le=H(d),he=d&32767,Se=k[Le];if(I[he]=Se,k[Le]=he,Me<=d){var Ie=l-d;if((L>7e3||re>24576)&&Ie>423){p=$y(e,u,0,X,Z,q,V,re,le,d-le,p),re=L=V=0,le=d;for(var ke=0;ke<286;++ke)Z[ke]=0;for(var ke=0;ke<30;++ke)q[ke]=0}var Te=2,ge=0,yt=N,tt=he-Se&32767;if(Ie>2&&Le==H(d-tt))for(var Ee=Math.min(T,Ie)-1,Jt=Math.min(32767,d),Mt=Math.min(258,Ie);tt<=Jt&&--yt&&he!=Se;){if(e[d+Te]==e[d+Te-tt]){for(var vt=0;vt<Mt&&e[d+vt]==e[d+vt-tt];++vt);if(vt>Te){if(Te=vt,ge=tt,vt>Ee)break;for(var fr=Math.min(tt,vt-2),Dn=0,ke=0;ke<fr;++ke){var Ln=d-tt+ke+32768&32767,gr=I[Ln],Bt=Ln-gr+32768&32767;Bt>Dn&&(Dn=Bt,Se=Ln)}}}he=Se,Se=I[he],tt+=he-Se+32768&32767}if(ge){X[re++]=268435456|Uu[Te]<<18|Fy[ge];var hr=Uu[Te]&31,R=Fy[ge]&31;V+=Ka[hr]+Ya[R],++Z[257+hr],++q[R],Me=d+Te,++L}else X[re++]=e[d],++Z[e[d]]}}p=$y(e,u,s,X,Z,q,V,re,le,d-le,p),!s&&p&7&&(p=Hu(u,p+1,ju))}return Wy(c,0,r+zu(p)+i)},wP=function(e,t,o,r,i){return xP(e,t.level==null?6:t.level,t.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):12+t.mem,o,r,!i)};MP=typeof TextDecoder<"u"&&new TextDecoder,PP=0;try{MP.decode(ju,{stream:!0}),PP=1}catch{}});async function Zy(){let e=await Dt("Vencord_cloudSecret")??{},t=Wu();return e[t]?(await kr("Vencord_cloudSecret",o=>(o??={},o[`${t}:${ys()}`]=o[t],delete o[t],o)),e[t]):e[`${t}:${ys()}`]}async function IP(e){await kr("Vencord_cloudSecret",t=>(t??={},t[`${Wu()}:${ys()}`]=e,t))}async function qu(){await kr("Vencord_cloudSecret",e=>(e??={},delete e[`${Wu()}:${ys()}`],e))}async function Xy(){if(await Zy()!==void 0){E.cloud.authenticated=!0;return}try{let o=await fetch(new URL("/v1/oauth/settings",zn()));var{clientId:e,redirectUri:t}=await o.json()}catch{De({title:"Cloud Integration",body:"Setup failed (couldn't retrieve OAuth configuration)."}),E.cloud.authenticated=!1;return}we(o=>n(es,{...o,scopes:["identify"],responseType:"code",redirectUri:t,permissions:0n,clientId:e,cancelCompletesFlow:!1,callback:async({location:r})=>{if(!r){E.cloud.authenticated=!1;return}try{let i=await fetch(r,{headers:new Headers({Accept:"application/json"})}),{secret:s}=await i.json();s?(Za.info("Authorized with secret"),await IP(s),De({title:"Cloud Integration",body:"Cloud integrations enabled!"}),E.cloud.authenticated=!0):(De({title:"Cloud Integration",body:"Setup failed (no secret returned?)."}),E.cloud.authenticated=!1)}catch(i){Za.error("Failed to authorize",i),De({title:"Cloud Integration",body:`Setup failed (${i.toString()}).`}),E.cloud.authenticated=!1}}}))}async function pi(){let e=await Zy();return window.btoa(`${e}:${ys()}`)}var Za,zn,Wu,ys,Ku=g(()=>{"use strict";a();Vo();$n();$();x();Ve();nt();Za=new ie("Cloud","#39b7e0"),zn=()=>new URL(E.cloud.url),Wu=()=>zn().origin,ys=()=>{let e=U.getCurrentUser()?.id;if(!e)throw new Error("User not yet logged in");return e}});function go(){window.VesktopNative.app.relaunch()}function Xa(e){window.VesktopNative.fileManager.showItemInFolder(e)}var jn=g(()=>{"use strict";a()});function Ja(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)})}function Qa(e){return new Promise(t=>{let o=document.createElement("input");o.type="file",o.style.display="none",o.accept=e,o.onchange=async()=>{t(o.files?.[0]??null)},document.body.appendChild(o),o.click(),setImmediate(()=>document.body.removeChild(o))})}var Va=g(()=>{"use strict";a()});async function Jy(e){try{var t=JSON.parse(e)}catch(o){throw console.log(e),new Error("Failed to parse JSON: "+String(o))}if("settings"in t&&"quickCss"in t)Object.assign(tn,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 Qy({minify:e}={}){let t=JSON.parse(VencordNative.settings.get()),o=await VencordNative.quickCss.get();return JSON.stringify({settings:t,quickCss:o},null,e?void 0:4)}async function Vy(){let e="vencord-settings-backup.json",t=await Qy(),o=new TextEncoder().encode(t);Ja(new File([o],e,{type:"application/json"}))}async function tv(e=!0){if(!1){if(t)try{}catch(o){}}else{let t=await Qa("application/json");if(!t)return;let o=new FileReader;o.onload=async()=>{try{await Jy(o.result),e&&AP()}catch(r){new ie("SettingsSync").error(r),e&&NP(r)}},o.readAsText(t)}}async function di(e){let t=await Qy({minify:!0});try{let o=await fetch(new URL("/v1/settings",zn()),{method:"PUT",headers:new Headers({Authorization:await pi(),"Content-Type":"application/octet-stream"}),body:qy(new TextEncoder().encode(t))});if(!o.ok){Fo.error(`Failed to sync up, API returned ${o.status}`),De({title:"Cloud Settings",body:`Could not synchronize settings to cloud (API returned ${o.status}).`,color:"var(--red-360)"});return}let{written:r}=await o.json();tn.cloud.settingsSyncVersion=r,VencordNative.settings.set(JSON.stringify(tn,null,4)),Fo.info("Settings uploaded to cloud successfully"),e&&De({title:"Cloud Settings",body:"Synchronized settings to the cloud!",noPersist:!0})}catch(o){Fo.error("Failed to sync up",o),De({title:"Cloud Settings",body:`Could not synchronize settings to the cloud (${o.toString()}).`,color:"var(--red-360)"})}}async function el(e=!0,t=!1){try{let o=await fetch(new URL("/v1/settings",zn()),{method:"GET",headers:new Headers({Authorization:await pi(),Accept:"application/octet-stream","If-None-Match":E.cloud.settingsSyncVersion.toString()})});if(o.status===404)return Fo.info("No settings on the cloud"),e&&De({title:"Cloud Settings",body:"There are no settings in the cloud.",noPersist:!0}),!1;if(o.status===304)return Fo.info("Settings up to date"),e&&De({title:"Cloud Settings",body:"Your settings are up to date.",noPersist:!0}),!1;if(!o.ok)return Fo.error(`Failed to sync down, API returned ${o.status}`),De({title:"Cloud Settings",body:`Could not synchronize settings from the cloud (API returned ${o.status}).`,color:"var(--red-360)"}),!1;let r=Number(o.headers.get("etag")),i=E.cloud.settingsSyncVersion;if(!t&&r<i){e&&De({title:"Cloud Settings",body:"Your local settings are newer than the cloud ones.",noPersist:!0});return}let s=await o.arrayBuffer(),l=new TextDecoder().decode(Ky(new Uint8Array(s)));return await Jy(l),tn.cloud.settingsSyncVersion=r,VencordNative.settings.set(JSON.stringify(tn,null,4)),Fo.info("Settings loaded from cloud successfully"),e&&De({title:"Cloud Settings",body:"Your settings have been updated! Click here to restart to fully apply changes!",color:"var(--green-360)",onClick:go,noPersist:!0}),!0}catch(o){return Fo.error("Failed to sync down",o),De({title:"Cloud Settings",body:`Could not synchronize settings from the cloud (${o.toString()}).`,color:"var(--red-360)"}),!1}}async function ov(){try{let e=await fetch(new URL("/v1/settings",zn()),{method:"DELETE",headers:new Headers({Authorization:await pi()})});if(!e.ok){Fo.error(`Failed to delete, API returned ${e.status}`),De({title:"Cloud Settings",body:`Could not delete settings (API returned ${e.status}).`,color:"var(--red-360)"});return}Fo.info("Settings deleted from cloud successfully"),De({title:"Cloud Settings",body:"Settings deleted from cloud!",color:"var(--green-360)"})}catch(e){Fo.error("Failed to delete",e),De({title:"Cloud Settings",body:`Could not delete settings (${e.toString()}).`,color:"var(--red-360)"})}}var ev,AP,NP,Fo,vs=g(()=>{"use strict";a();$n();$();x();Yy();Ku();Ve();jn();Va();ev=(e,t)=>oe.show({type:e,message:t,id:oe.genId()}),AP=()=>ev(oe.Type.SUCCESS,"Settings successfully imported. Restart to apply changes!"),NP=e=>ev(oe.Type.FAILURE,`Failed to import settings: ${String(e)}`);Fo=new ie("Cloud:Settings","#39b7e0")});var Zu={};ze(Zu,{PlainSettings:()=>tn,Settings:()=>E,addSettingsListener:()=>Ss,definePluginSettings:()=>D,migratePluginSettings:()=>kP,useSettings:()=>mt});function Yu(e,t=e,o=""){return rv[o]??=new Proxy(e,{get(r,i){let s=r[i];if(!(i in r)){if(o==="plugins"&&i in Ge)return r[i]=Yu({enabled:Ge[i].required??Ge[i].enabledByDefault??!1},t,`plugins.${i}`);if(o.startsWith("plugins.")){let l=o.slice(8);if(l in Ge){let c=Ge[l].options?.[i];if(!c)return s;if("default"in c)return r[i]=c.default;if(c.type===4){let u=c.options.find(p=>p.default);return u&&(r[i]=u.value),u?.value}}}return s}return typeof s=="object"&&!Array.isArray(s)&&s!==null?Yu(s,t,`${o}${o&&"."}${i}`):s},set(r,i,s){if(r[i]===s)return!0;r[i]=s;let l=`${o}${o&&"."}${i}`;delete rv[l];for(let c of tl)(!c._paths||c._paths.includes(l))&&c(s,l);return tn.cloud.settingsSyncVersion=Date.now(),Cr.Vencord_settingsDirty=!0,CP(),VencordNative.settings.set(JSON.stringify(t,null,4)),!0}})}function mt(e){let[,t]=_.useReducer(()=>({}),{}),o=e?(r,i)=>e.includes(i)&&t():t;return _.useEffect(()=>(tl.add(o),()=>void tl.delete(o)),[]),E}function Ss(e,t){e&&(t._paths??=[]).push(e),tl.add(t)}function kP(e,...t){let{plugins:o}=Wn;if(!(e in o)){for(let r of t)if(r in o){iv.info(`Migrating settings from old name ${r} to ${e}`),o[e]=o[r],delete o[r],VencordNative.settings.set(JSON.stringify(Wn,null,4));break}}}function D(e,t){let o={get store(){if(!o.pluginName)throw new Error("Cannot access settings before plugin is initialized");return E.plugins[o.pluginName]},use:r=>mt(r?.map(i=>`plugins.${o.pluginName}.${i}`)).plugins[o.pluginName],def:e,checks:t??{},pluginName:"",withPrivateSettings(){return this}};return o}var iv,nv,Wn,CP,tl,rv,tn,E,$=g(()=>{"use strict";a();Nr();Ga();Ve();Pe();vs();w();x();Rr();iv=new ie("Settings"),nv={notifyAboutUpdates:!0,autoUpdate:!1,autoUpdateNotification:!0,useQuickCss:!0,themeLinks:[],enabledThemes:[],enableReactDevtools:!1,frameless:!1,transparent:!1,winCtrlQ:!1,macosTranslucency:void 0,macosVibrancyStyle:void 0,disableMinSize:!1,winNativeTitleBar:!1,plugins:{},notifications:{timeout:5e3,position:"bottom-right",useNative:"not-focused",logLimit:50},cloud:{authenticated:!1,url:"https://api.vencord.dev/",settingsSync:!1,settingsSyncVersion:0}};try{Wn=JSON.parse(VencordNative.settings.get()),Ar(Wn,nv)}catch(e){Wn=Ar({},nv),iv.error(`An error occurred while loading the settings. Corrupt settings file?
`,e)}CP=ro(async()=>{E.cloud.settingsSync&&E.cloud.authenticated&&(await di(),delete Cr.Vencord_settingsDirty)},6e4),tl=new Set,rv={};tn=Wn,E=Yu(Wn)});var sv=g(()=>{});var av=g(()=>{});var Ju={};ze(Ju,{UpdateLogger:()=>Dr,changes:()=>qn,checkForUpdates:()=>fi,getRepo:()=>Xu,isNewer:()=>bs,isOutdated:()=>Kn,maybePromptToUpdate:()=>Ts,update:()=>gi,updateError:()=>mi});async function ol(e){let t=await e;if(t.ok)return t.value;throw mi=t.error,t.error}async function fi(){return qn=await ol(VencordNative.updater.getUpdates()),qn.some(e=>e.hash===fo)?(bs=!0,Kn=!1):Kn=qn.length>0}async function gi(){if(!Kn)return!0;let e=await ol(VencordNative.updater.update());if(e&&(Kn=!1,!await ol(VencordNative.updater.rebuild())))throw new Error("The Build failed. Please try manually building the new update");return e}async function Ts(e,t=!1){try{if(await fi()){let r=confirm(e);if(r&&bs)return alert("Your local copy has more recent commits. Please stash or reset them.");r&&(await gi(),go())}}catch(o){Dr.error(o),alert("That also failed :( Try updating or re-installing with the installer!")}}var Dr,Kn,bs,mi,qn,Xu,Lr=g(()=>{"use strict";a();si();Ve();jn();Dr=new ie("Updater","white"),Kn=!1,bs=!1;Xu=()=>ol(VencordNative.updater.getRepo())});function lv(){Ts("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 cv=g(()=>{"use strict";a();Lr()});function Qu(e){let t=!1,o;return function(){return t?o:(t=!0,o=e.apply(this,arguments))}}var Vu=g(()=>{"use strict";a()});function bo({title:e,children:t}){return n(S.FormSection,null,n(J,{variant:"heading-lg/semibold",tag:"h2",className:z.bottom16},e),t)}function To(e,t){return B.wrap(e,{message:`Failed to render the ${t} tab. If this issue persists, try using the installer to reinstall!`,onError:RP})}var RP,Yn=g(()=>{"use strict";a();sv();av();ae();cv();it();Vu();x();RP=Qu(lv)});var mv={};ze(mv,{default:()=>_P});function DP(){let[e,,t]=at(VencordNative.settings.getSettingsDir,{fallbackValue:"Loading..."}),o=mt(),r=_.useMemo(()=>Math.random()>.5?pv:dv,[]),i=navigator.platform.toLowerCase().startsWith("win"),s=navigator.platform.toLowerCase().startsWith("mac"),l=!1;_.useEffect(()=>{o.macosTranslucency===!0&&!o.macosVibrancyStyle&&(o.macosVibrancyStyle="sidebar",o.macosTranslucency=void 0)},[]);let c=[{key:"useQuickCss",title:"Enable Custom CSS",note:"Loads your Custom CSS"},{key:"enableReactDevtools",title:"Enable React Developer Tools",note:"Requires a full restart"},{key:"frameless",title:"Disable the window frame",note:"Requires a full restart"},!1,i&&{key:"winCtrlQ",title:"Register Ctrl+Q as shortcut to close Discord (Alternative to Alt+F4)",note:"Requires a full restart"},!1];return n(bo,{title:"Vencord Settings"},n(EP,{image:r}),n(S.FormSection,{title:"Quick Actions"},n(At,{className:uv("quick-actions-card")},n(_.Fragment,null,n(C,{onClick:go,size:C.Sizes.SMALL},"Restart Client"),n(C,{onClick:()=>VencordNative.quickCss.openEditor(),size:C.Sizes.SMALL,disabled:e==="Loading..."},"Open QuickCSS File"),n(C,{onClick:()=>Xa(e),size:C.Sizes.SMALL,disabled:t},"Open Settings Folder"),n(C,{onClick:()=>VencordNative.native.openExternal("https://github.com/Vendicated/Vencord"),size:C.Sizes.SMALL,disabled:t},"Open in GitHub")))),n(S.FormDivider,null),n(S.FormSection,{className:z.top16,title:"Settings",tag:"h5"},n(S.FormText,{className:z.bottom20},'Hint: You can change the position of this settings section in the settings of the "Settings" plugin!'),c.map(u=>u&&n(gt,{key:u.key,value:o[u.key],onChange:p=>o[u.key]=p,note:u.note},u.title))),l&&n(f,null,n(S.FormTitle,{tag:"h5"},"Window vibrancy style (requires restart)"),n(ho,{className:z.bottom20,placeholder:"Window vibrancy style",options:[{label:"No vibrancy",default:!o.macosTranslucency,value:void 0},{label:"Under Page (window tinting)",value:"under-page"},{label:"Content",value:"content"},{label:"Window",value:"window"},{label:"Selection",value:"selection"},{label:"Titlebar",value:"titlebar"},{label:"Header",value:"header"},{label:"Sidebar (old value for transparent windows)",value:"sidebar",default:o.macosTranslucency},{label:"Tooltip",value:"tooltip"},{label:"Menu",value:"menu"},{label:"Popover",value:"popover"},{label:"Fullscreen UI (transparent but slightly muted)",value:"fullscreen-ui"},{label:"HUD (Most transparent)",value:"hud"}],select:u=>o.macosVibrancyStyle=u,isSelected:u=>o.macosVibrancyStyle===u,serialize:ss})),typeof Notification<"u"&&n(LP,{settings:o.notifications}))}function LP({settings:e}){return n(f,null,n(S.FormTitle,{tag:"h5"},"Notification Style"),e.useNative!=="never"&&Notification?.permission==="denied"&&n(So,{style:{padding:"1em"},className:z.bottom8},n(S.FormTitle,{tag:"h5"},"Desktop Notification Permission denied"),n(S.FormText,null,"You have denied Notification Permissions. Thus, Desktop notifications will not work!")),n(S.FormText,{className:z.bottom8},"Some plugins may show you notifications. These come in two styles:",n("ul",null,n("li",null,n("strong",null,"Vencord Notifications"),": These are in-app notifications"),n("li",null,n("strong",null,"Desktop Notifications"),": Native Desktop notifications (like when you get a ping)"))),n(ho,{placeholder:"Notification Style",options:[{label:"Only use Desktop notifications when Discord is not focused",value:"not-focused",default:!0},{label:"Always use Desktop notifications",value:"always"},{label:"Always use Vencord notifications",value:"never"}],closeOnSelect:!0,select:t=>e.useNative=t,isSelected:t=>t===e.useNative,serialize:ss}),n(S.FormTitle,{tag:"h5",className:z.top16+" "+z.bottom8},"Notification Position"),n(ho,{isDisabled:e.useNative==="always",placeholder:"Notification Position",options:[{label:"Bottom Right",value:"bottom-right",default:!0},{label:"Top Right",value:"top-right"}],select:t=>e.position=t,isSelected:t=>t===e.position,serialize:ss}),n(S.FormTitle,{tag:"h5",className:z.top16+" "+z.bottom8},"Notification Timeout"),n(S.FormText,{className:z.bottom16},"Set to 0s to never automatically time out"),n(br,{disabled:e.useNative==="always",markers:[0,1e3,2500,5e3,1e4,2e4],minValue:0,maxValue:2e4,initialValue:e.timeout,onValueChange:t=>e.timeout=t,onValueRender:t=>(t/1e3).toFixed(2)+"s",onMarkerRender:t=>t/1e3+"s",stickToMarkers:!1}),n(S.FormTitle,{tag:"h5",className:z.top16+" "+z.bottom8},"Notification Log Limit"),n(S.FormText,{className:z.bottom16},"The amount of notifications to save in the log until old ones are removed. Set to ",n("code",null,"0")," to disable Notification log and ",n("code",null,"\u221E")," to never automatically remove old Notifications"),n(br,{markers:[0,25,50,75,100,200],minValue:0,maxValue:200,stickToMarkers:!0,initialValue:e.logLimit,onValueChange:t=>e.logLimit=t,onValueRender:t=>t===200?"\u221E":t,onMarkerRender:t=>t===200?"\u221E":t}),n(C,{onClick:ja,disabled:e.logLimit===0},"Open Notification Log"))}function EP({image:e}){return n(At,{className:uv("card","donate")},n("div",null,n(S.FormTitle,{tag:"h5"},"Support the Project"),n(S.FormText,null,"Please consider supporting the development of Vencord by donating!"),n(cs,{style:{transform:"translateX(-1em)"}})),n("img",{role:"presentation",src:e,alt:"",height:128,style:{imageRendering:e===dv?"pixelated":void 0,marginLeft:"auto",transform:e===pv?"rotate(10deg)":void 0}}))}var uv,pv,dv,_P,fv=g(()=>{"use strict";a();Wa();$();rt();uu();li();it();Pe();jn();ut();x();Yn();uv=Fe("vc-settings-"),pv="https://cdn.discordapp.com/emojis/1026533090627174460.png",dv="https://media.discordapp.net/stickers/1039992459209490513.png";_P=To(DP,"Vencord Settings")});var gv=g(()=>{});var np={};ze(np,{currentNotice:()=>xs,nextNotice:()=>hv,noticesQueue:()=>tp,popNotice:()=>op,showNotice:()=>ws});function op(){ep.dismiss()}function hv(){xs=tp.shift(),xs&&ep.show(...xs,"VencordNotice")}function ws(e,t,o){tp.push(["GENERIC",e,t,o]),xs||hv()}var ep,tp,xs,nl=g(()=>{"use strict";a();j();ft(e=>e.show&&e.dismiss&&!e.suppressAll,e=>ep=e);tp=[],xs=null});var yv=g(()=>{});function qt({height:e=24,width:t=24,className:o,children:r,viewBox:i,...s}){return n("svg",{className:te(o,"vc-icon"),role:"img",width:t,height:e,viewBox:i,...s},r)}function hi({height:e=24,width:t=24,className:o}){return n(qt,{height:e,width:t,className:te(o,"vc-link-icon"),viewBox:"0 0 24 24"},n("g",{fill:"none","fill-rule":"evenodd"},n("path",{fill:"currentColor",d:"M10.59 13.41c.41.39.41 1.03 0 1.42-.39.39-1.03.39-1.42 0a5.003 5.003 0 0 1 0-7.07l3.54-3.54a5.003 5.003 0 0 1 7.07 0 5.003 5.003 0 0 1 0 7.07l-1.49 1.49c.01-.82-.12-1.64-.4-2.42l.47-.48a2.982 2.982 0 0 0 0-4.24 2.982 2.982 0 0 0-4.24 0l-3.53 3.53a2.982 2.982 0 0 0 0 4.24zm2.82-4.24c.39-.39 1.03-.39 1.42 0a5.003 5.003 0 0 1 0 7.07l-3.54 3.54a5.003 5.003 0 0 1-7.07 0 5.003 5.003 0 0 1 0-7.07l1.49-1.49c-.01.82.12 1.64.4 2.43l-.47.47a2.982 2.982 0 0 0 0 4.24 2.982 2.982 0 0 0 4.24 0l3.53-3.53a2.982 2.982 0 0 0 0-4.24.973.973 0 0 1 0-1.42z"}),n("rect",{width:t,height:e})))}function rl(e){return n(qt,{...e,className:te(e.className,"vc-copy-icon"),viewBox:"0 0 24 24"},n("g",{fill:"currentColor"},n("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1z"}),n("path",{d:"M15 5H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z"})))}function Ms(e){return n(qt,{...e,className:te(e.className,"vc-open-external-icon"),viewBox:"0 0 24 24"},n("polygon",{fill:"currentColor",fillRule:"nonzero",points:"13 20 11 20 11 8 5.5 13.5 4.08 12.08 12 4.16 19.92 12.08 18.5 13.5 13 8"}))}function Er(e){return n(qt,{...e,className:te(e.className,"vc-image-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M21,19V5c0,-1.1 -0.9,-2 -2,-2H5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2zM8.5,13.5l2.5,3.01L14.5,12l4.5,6H5l3.5,-4.5z"}))}function il(e){return n(qt,{...e,className:te(e.className,"vc-info-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",transform:"translate(2 2)",d:"M9,7 L11,7 L11,5 L9,5 L9,7 Z M10,18 C5.59,18 2,14.41 2,10 C2,5.59 5.59,2 10,2 C14.41,2 18,5.59 18,10 C18,14.41 14.41,18 10,18 L10,18 Z M10,4.4408921e-16 C4.4771525,-1.77635684e-15 4.4408921e-16,4.4771525 0,10 C-1.33226763e-15,12.6521649 1.0535684,15.195704 2.92893219,17.0710678 C4.80429597,18.9464316 7.3478351,20 10,20 C12.6521649,20 15.195704,18.9464316 17.0710678,17.0710678 C18.9464316,15.195704 20,12.6521649 20,10 C20,7.3478351 18.9464316,4.80429597 17.0710678,2.92893219 C15.195704,1.0535684 12.6521649,2.22044605e-16 10,0 L10,4.4408921e-16 Z M9,15 L11,15 L11,9 L9,9 L9,15 L9,15 Z"}))}function vv(e){return n(qt,{"aria-label":et.Messages.GUILD_OWNER,...e,className:te(e.className,"vc-owner-crown-icon"),role:"img",viewBox:"0 0 16 16"},n("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M13.6572 5.42868C13.8879 5.29002 14.1806 5.30402 14.3973 5.46468C14.6133 5.62602 14.7119 5.90068 14.6473 6.16202L13.3139 11.4954C13.2393 11.7927 12.9726 12.0007 12.6666 12.0007H3.33325C3.02725 12.0007 2.76058 11.792 2.68592 11.4954L1.35258 6.16202C1.28792 5.90068 1.38658 5.62602 1.60258 5.46468C1.81992 5.30468 2.11192 5.29068 2.34325 5.42868L5.13192 7.10202L7.44592 3.63068C7.46173 3.60697 7.48377 3.5913 7.50588 3.57559C7.5192 3.56612 7.53255 3.55663 7.54458 3.54535L6.90258 2.90268C6.77325 2.77335 6.77325 2.56068 6.90258 2.43135L7.76458 1.56935C7.89392 1.44002 8.10658 1.44002 8.23592 1.56935L9.09792 2.43135C9.22725 2.56068 9.22725 2.77335 9.09792 2.90268L8.45592 3.54535C8.46794 3.55686 8.48154 3.56651 8.49516 3.57618C8.51703 3.5917 8.53897 3.60727 8.55458 3.63068L10.8686 7.10202L13.6572 5.42868ZM2.66667 12.6673H13.3333V14.0007H2.66667V12.6673Z"}))}function Sv(e){return n(qt,{...e,className:te(e.className,"vc-screenshare-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M2 4.5C2 3.397 2.897 2.5 4 2.5H20C21.103 2.5 22 3.397 22 4.5V15.5C22 16.604 21.103 17.5 20 17.5H13V19.5H17V21.5H7V19.5H11V17.5H4C2.897 17.5 2 16.604 2 15.5V4.5ZM13.2 14.3375V11.6C9.864 11.6 7.668 12.6625 6 15C6.672 11.6625 8.532 8.3375 13.2 7.6625V5L18 9.6625L13.2 14.3375Z"}))}function sl(e){return n(qt,{...e,className:te(e.className,"vc-image-visible"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h14q.825 0 1.413.587Q21 4.175 21 5v14q0 .825-.587 1.413Q19.825 21 19 21Zm0-2h14V5H5v14Zm1-2h12l-3.75-5-3 4L9 13Zm-1 2V5v14Z"}))}function al(e){return n(qt,{...e,className:te(e.className,"vc-image-invisible"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"m21 18.15-2-2V5H7.85l-2-2H19q.825 0 1.413.587Q21 4.175 21 5Zm-1.2 4.45L18.2 21H5q-.825 0-1.413-.587Q3 19.825 3 19V5.8L1.4 4.2l1.4-1.4 18.4 18.4ZM6 17l3-4 2.25 3 .825-1.1L5 7.825V19h11.175l-2-2Zm7.425-6.425ZM10.6 13.4Z"}))}function bv(e){return n(qt,{...e,className:te(e.className,"vc-microphone"),viewBox:"0 0 24 24"},n("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.99 11C14.99 12.66 13.66 14 12 14C10.34 14 9 12.66 9 11V5C9 3.34 10.34 2 12 2C13.66 2 15 3.34 15 5L14.99 11ZM12 16.1C14.76 16.1 17.3 14 17.3 11H19C19 14.42 16.28 17.24 13 17.72V21H11V17.72C7.72 17.23 5 14.41 5 11H6.7C6.7 14 9.24 16.1 12 16.1ZM12 4C11.2 4 11 4.66667 11 5V11C11 11.3333 11.2 12 12 12C12.8 12 13 11.3333 13 11V5C13 4.66667 12.8 4 12 4Z",fill:"currentColor"}),n("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.99 11C14.99 12.66 13.66 14 12 14C10.34 14 9 12.66 9 11V5C9 3.34 10.34 2 12 2C13.66 2 15 3.34 15 5L14.99 11ZM12 16.1C14.76 16.1 17.3 14 17.3 11H19C19 14.42 16.28 17.24 13 17.72V22H11V17.72C7.72 17.23 5 14.41 5 11H6.7C6.7 14 9.24 16.1 12 16.1Z",fill:"currentColor"}))}function Tv(e){return n(qt,{...e,className:te(e.className,"vc-cog-wheel"),viewBox:"0 0 24 24"},n("path",{clipRule:"evenodd",fill:"currentColor",d:"M19.738 10H22V14H19.739C19.498 14.931 19.1 15.798 18.565 16.564L20 18L18 20L16.565 18.564C15.797 19.099 14.932 19.498 14 19.738V22H10V19.738C9.069 19.498 8.203 19.099 7.436 18.564L6 20L4 18L5.436 16.564C4.901 15.799 4.502 14.932 4.262 14H2V10H4.262C4.502 9.068 4.9 8.202 5.436 7.436L4 6L6 4L7.436 5.436C8.202 4.9 9.068 4.502 10 4.262V2H14V4.261C14.932 4.502 15.797 4.9 16.565 5.435L18 3.999L20 5.999L18.564 7.436C19.099 8.202 19.498 9.069 19.738 10ZM12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16Z"}))}function rp(e){return n(qt,{...e,className:te(e.className,"vc-reply-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M10 8.26667V4L3 11.4667L10 18.9333V14.56C15 14.56 18.5 16.2667 21 20C20 14.6667 17 9.33333 10 8.26667Z"}))}function ll(e){return n(qt,{...e,className:te(e.className,"vc-delete-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M15 3.999V2H9V3.999H3V5.999H21V3.999H15Z"}),n("path",{fill:"currentColor",d:"M5 6.99902V18.999C5 20.101 5.897 20.999 7 20.999H17C18.103 20.999 19 20.101 19 18.999V6.99902H5ZM11 17H9V11H11V17ZM15 17H13V11H15V17Z"}))}function xv(e){return n(qt,{...e,className:te(e.className,"vc-plus-icon"),viewBox:"0 0 18 18"},n("polygon",{"fill-rule":"nonzero",fill:"currentColor",points:"15 10 10 10 10 15 8 15 8 10 3 10 3 8 8 8 8 3 10 3 10 8 15 8"}))}function wv(e){return n(qt,{...e,className:te(e.className,"vc-no-entry-sign-icon"),viewBox:"0 0 24 24"},n("path",{d:"M0 0h24v24H0z",fill:"none"}),n("path",{fill:"currentColor",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z"}))}var Lt=g(()=>{"use strict";a();yv();Pe();x()});function Mv(e,t,o){return o===!1?t?e.slice(0,-1):e:e[0]}function Ps(e,t,o=!1){let r=yo.duration(e,t),i=zP.map(u=>({amount:r[u](),unit:u})),s=0;e:for(let u=0;u<i.length;u++)if(!(i[u].amount===0||!(u+1<i.length))){for(let p=u+1;p<i.length;p++)if(i[p].amount!==0)continue e;s=i.length-(u+1)}i=s===0?i:i.slice(0,-s);let l=i.findIndex(({unit:u})=>u==="days");if(l!==-1){let u=i[l],p=u.amount%7;p===0?i.splice(l,1):u.amount=p}let c="";for(;i.length;){let{amount:u,unit:p}=i.shift();c.length&&(c+=i.length?", ":" and "),(u>0||c.length)&&(c+=`${u} ${Mv(p,u===1,o)}`)}return c.length?c:`0 ${Mv(t,!1,o)}`}function jP(e,t=o=>o){let{length:o}=e;if(o===0)return"";if(o===1)return t(e[0]);let r="";for(let i=0;i<o;i++)r+=t(e[i]),o-i>2?r+=", ":o-i>1&&(r+=" and ");return r}function Is(e,t){let o="```";return`${o}${t||""}
${e.replaceAll("```","\\`\\`\\`")}
${o}`}var ip,OP,BP,sp,FP,UP,$P,GP,HP,yn,zP,vn=g(()=>{"use strict";a();x();ip=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),OP=e=>e.toLowerCase().split("_"),BP=e=>e.toLowerCase().split("-"),sp=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),FP=e=>e.toLowerCase().split(" "),UP=e=>e.map((t,o)=>o?t[0].toUpperCase()+t.slice(1):t).join(""),$P=e=>e.join("_").toUpperCase(),GP=e=>e.join("-").toLowerCase(),HP=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(""),yn=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(" "),zP=["years","months","weeks","days","hours","minutes","seconds"]});function As(){return`-${Xo.fromTimestamp(Date.now())}`}function me(e,t){let o=WP.createBotMessage({channelId:e,content:"",embeds:[]});return no.receiveMessage(e,Ar(t,o)),t}function lt(e,t,o){return e.find(r=>r.name===t)?.value||o}var WP,ap=g(()=>{"use strict";a();Pe();j();x();WP=P("createBotMessage")});var Sn,Uo,lp,cl=g(()=>{"use strict";a();Sn=(h=>(h[h.SUB_COMMAND=1]="SUB_COMMAND",h[h.SUB_COMMAND_GROUP=2]="SUB_COMMAND_GROUP",h[h.STRING=3]="STRING",h[h.INTEGER=4]="INTEGER",h[h.BOOLEAN=5]="BOOLEAN",h[h.USER=6]="USER",h[h.CHANNEL=7]="CHANNEL",h[h.ROLE=8]="ROLE",h[h.MENTIONABLE=9]="MENTIONABLE",h[h.NUMBER=10]="NUMBER",h[h.ATTACHMENT=11]="ATTACHMENT",h))(Sn||{}),Uo=(s=>(s[s.BUILT_IN=0]="BUILT_IN",s[s.BUILT_IN_TEXT=1]="BUILT_IN_TEXT",s[s.BUILT_IN_INTEGRATION=2]="BUILT_IN_INTEGRATION",s[s.BOT=3]="BOT",s[s.PLACEHOLDER=4]="PLACEHOLDER",s))(Uo||{}),lp=(r=>(r[r.CHAT_INPUT=1]="CHAT_INPUT",r[r.USER=2]="USER",r[r.MESSAGE=3]="MESSAGE",r))(lp||{})});var pp={};ze(pp,{ApplicationCommandInputType:()=>Uo,ApplicationCommandOptionType:()=>Sn,ApplicationCommandType:()=>lp,BUILT_IN:()=>Zn,OptionalMessageOption:()=>Xn,RequiredMessageOption:()=>Ns,_handleCommand:()=>KP,_init:()=>qP,commands:()=>cp,findOption:()=>lt,generateId:()=>As,prepareOption:()=>up,registerCommand:()=>yi,sendBotMessage:()=>me,unregisterCommand:()=>Cs});function up(e){return e.displayName||=e.name,e.displayDescription||=e.description,e.options?.forEach((t,o,r)=>{t===Pv?r[o]=Xn:t===Iv&&(r[o]=Ns),t.choices?.forEach(i=>i.displayName||=i.name),up(r[o])}),e}function YP(e,t){e.options?.forEach(o=>{if(o.type!==1)throw new Error("When specifying sub-command options, all options must be sub-commands.");let r={...e,...o,type:1,name:`${e.name} ${o.name}`,id:`${o.name}-${e.id}`,displayName:`${e.name} ${o.name}`,subCommandPath:[{name:o.name,type:o.type,displayName:o.name}],rootCommand:e};yi(r,t)})}function yi(e,t){if(!Zn){console.warn("[CommandsAPI]",`Not registering ${e.name} as the CommandsAPI hasn't been initialised.`,"Please restart to use commands");return}if(Zn.some(o=>o.name===e.name))throw new Error(`Command '${e.name}' already exists.`);if(e.isVencordCommand=!0,e.id??=`-${Zn.length+1}`,e.applicationId??="-1",e.type??=1,e.inputType??=1,e.plugin||=t,up(e),e.options?.[0]?.type===1){YP(e,t);return}cp[e.name]=e,Zn.push(e)}function Cs(e){let t=Zn.findIndex(o=>o.name===e);return t===-1?!1:(Zn.splice(t,1),delete cp[e],!0)}var Zn,cp,Pv,Iv,Xn,Ns,qP,KP,ao=g(()=>{"use strict";a();vn();ap();cl();ap();cl();cp={},Pv=Symbol("OptionalMessageOption"),Iv=Symbol("RequiredMessageOption"),Xn=Pv,Ns=Iv,qP=function(e){try{Zn=e,Xn=e.find(t=>t.name==="shrug").options[0],Ns=e.find(t=>t.name==="me").options[0]}catch{console.error("Failed to load CommandsApi")}return e},KP=function(e,t,o){if(!e.isVencordCommand)return e.execute(t,o);let r=i=>{let s=`An Error occurred while executing command "${e.name}"`,l=i instanceof Error?i.stack||i.message:String(i);console.error(s,i),me(o.channel.id,{content:`${s}:
${Is(l)}`,author:{username:"Vencord"}})};try{let i=e.execute(t,o);return i instanceof Promise?i.catch(r):i}catch(i){return r(i)}}});function Av({text:e,color:t}){return n("div",{className:"vc-plugins-badge",style:{backgroundColor:t,justifySelf:"flex-end",marginLeft:"auto"}},e)}var dp=g(()=>{"use strict";a()});function Nv({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){let l=t[r]??e.default,[c,u]=_.useState(l??!1),[p,d]=_.useState(null);_.useEffect(()=>{s(p!==null)},[p]);function h(v){let T=e.isValid?.call(o,v)??!0;typeof T=="string"?d(T):T?(d(null),u(v),i(v)):d("Invalid input provided.")}return n(S.FormSection,null,n(gt,{value:c,onChange:h,note:e.description,disabled:e.disabled?.call(o)??!1,...e.componentProps,hideBorder:!0,style:{marginBottom:"0.5em"}},yn(ip(r))),p&&n(S.FormText,{style:{color:"var(--text-danger)"}},p))}var Cv=g(()=>{"use strict";a();vn();x()});function kv({option:e,onChange:t,onError:o}){return e.component({setValue:t,setError:o,option:e})}var Rv=g(()=>{"use strict";a()});function mp({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){function l(v){return e.type===2?BigInt(v):Number(v)}let[c,u]=_.useState(`${t[r]??e.default??0}`),[p,d]=_.useState(null);_.useEffect(()=>{s(p!==null)},[p]);function h(v){let T=e.isValid?.call(o,v)??!0;d(null),typeof T=="string"?d(T):T||d("Invalid input provided."),e.type===1&&BigInt(v)>=ZP?(u(`${Number.MAX_SAFE_INTEGER}`),i(l(v))):(u(v),i(l(v)))}return n(S.FormSection,null,n(S.FormTitle,null,e.description),n(ot,{type:"number",pattern:"-?[0-9]+",value:c,onChange:h,placeholder:e.placeholder??"Enter a number",disabled:e.disabled?.call(o)??!1,...e.componentProps}),p&&n(S.FormText,{style:{color:"var(--text-danger)"}},p))}var ZP,Dv=g(()=>{"use strict";a();w();x();ZP=BigInt(Number.MAX_SAFE_INTEGER)});function Lv({option:e,pluginSettings:t,definedSettings:o,onChange:r,onError:i,id:s}){let l=t[s]??e.options?.find(v=>v.default)?.value,[c,u]=_.useState(l??null),[p,d]=_.useState(null);_.useEffect(()=>{i(p!==null)},[p]);function h(v){let T=e.isValid?.call(o,v)??!0;typeof T=="string"?d(T):T?(d(null),u(v),r(v)):d("Invalid input provided.")}return n(S.FormSection,null,n(S.FormTitle,null,e.description),n(ho,{isDisabled:e.disabled?.call(o)??!1,options:e.options,placeholder:e.placeholder??"Select an option",maxVisibleItems:5,closeOnSelect:!0,select:h,isSelected:v=>v===c,serialize:v=>String(v),...e.componentProps}),p&&n(S.FormText,{style:{color:"var(--text-danger)"}},p))}var Ev=g(()=>{"use strict";a();x()});function $o(e,t,o=1){let r=[];for(let i=e;i<=t;i+=o)r.push(Math.round(i*100)/100);return r}function _v({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){let l=t[r]??e.default,[c,u]=_.useState(null);_.useEffect(()=>{s(c!==null)},[c]);function p(d){let h=e.isValid?.call(o,d)??!0;typeof h=="string"?u(h):h?(u(null),i(d)):u("Invalid input provided.")}return n(S.FormSection,null,n(S.FormTitle,null,e.description),n(br,{disabled:e.disabled?.call(o)??!1,markers:e.markers,minValue:e.markers[0],maxValue:e.markers[e.markers.length-1],initialValue:l,onValueChange:p,onValueRender:d=>String(d.toFixed(2)),stickToMarkers:e.stickToMarkers??!0,...e.componentProps}))}var fp=g(()=>{"use strict";a();x()});function Ov({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){let[l,c]=_.useState(t[r]??e.default??null),[u,p]=_.useState(null);_.useEffect(()=>{s(u!==null)},[u]);function d(h){let v=e.isValid?.call(o,h)??!0;p(typeof v=="string"?v:v?null:"Invalid input provided."),c(h),i(h)}return n(S.FormSection,null,n(S.FormTitle,null,e.description),n(ot,{type:"text",value:l,onChange:d,placeholder:e.placeholder??"Enter a value",disabled:e.disabled?.call(o)??!1,...e.componentProps}),u&&n(S.FormText,{style:{color:"var(--text-danger)"}},u))}var Bv=g(()=>{"use strict";a();x()});var ks=g(()=>{"use strict";a();dp();Cv();Rv();Dv();Ev();fp();Bv()});var Fv=g(()=>{});async function _r(e){let{invite:t}=await ou.resolveInvite(e,"Desktop Modal");if(!t)throw new Error("Invalid invite: "+e);return O.dispatch({type:"INVITE_MODAL_OPEN",invite:t,code:e,context:"APP"}),new Promise(o=>{let r,i,s=!1;O.subscribe("INVITE_ACCEPT",i=()=>{s=!0}),O.subscribe("INVITE_MODAL_CLOSE",r=()=>{O.unsubscribe("INVITE_MODAL_CLOSE",r),O.unsubscribe("INVITE_ACCEPT",i),o(s)})})}function vi(){return Q.getChannel(be.getChannelId())}function gp(){return de.getGuild(vi()?.guild_id)}function XP(e){Vc.openPrivateChannel(e)}function Jn(){return ts.PreloadedUserSettingsActionCreators.getCurrentValue()?.appearance?.theme}function bn(e){Bn.dispatchToLastSubscribed("INSERT_TEXT",{rawText:e,plainText:e})}function JP(e,t,o,r){let i={content:"",invalidEmojis:[],tts:!1,validNonShortcutEmojis:[],...t};return no.sendMessage(e,i,o,r)}function Go(e,t){return we(o=>n(Ne,{...o,className:Ca.modal,size:"dynamic"},n(pu,{className:Ca.image,original:e,placeholder:e,src:e,renderLinkComponent:r=>n(oi,{...r}),shouldHideMediaOptions:!1,shouldAnimate:!0,...t})))}async function Ho(e){if(!await Ct.getUser(e))throw new Error("No such user: "+e);let o=mo.getGuildId();tu.openUserProfileModal({userId:e,guildId:o,channelId:be.getChannelId(),analyticsLocation:{page:o?"Guild Channel":"DM Channel",section:"Profile Popout"}})}async function hp(e,t){let o=po.getUserProfile(e);if(o)return o;O.dispatch({type:"USER_PROFILE_FETCH_START",userId:e});let{body:r}=await Nt.get({url:`/users/${e}/profile`,query:{with_mutual_guilds:!1,with_mutual_friends_count:!1,...t},oldFormErrors:!0});return O.dispatch({type:"USER_UPDATE",user:r.user}),await O.dispatch({type:"USER_PROFILE_FETCH_SUCCESS",...r}),t?.guild_id&&r.guild_member&&O.dispatch({type:"GUILD_MEMBER_PROFILE_UPDATE",guildId:t.guild_id,guildMember:r.guild_member}),po.getUserProfile(e)}function Tn(e){return e.discriminator==="0"?e.username:e.tag}var Rs,ct=g(()=>{"use strict";a();x();nt();Rs=(o=>(o[o.Dark=1]="Dark",o[o.Light=2]="Light",o))(Rs||{})});function Uv(e){we(t=>n(Ne,{...t},n(B,null,n(We,{className:Si("root")},n(rI,{user:e})))))}function oI(){let e=Jn()===2?eI:tI;return n("img",{src:e,alt:"GitHub"})}function nI(){let e=Jn()===2?VP:QP;return n("img",{src:e,alt:"Website"})}function rI({user:e}){mt();let t=Ye([po],()=>po.getUserProfile(e.id));pe(()=>{!t&&!e.bot&&e.id&&hp(e.id)},[e.id]);let o=t?.connectedAccounts?.find(s=>s.type==="github")?.name,r=t?.connectedAccounts?.find(s=>s.type==="domain")?.name,i=bt(()=>{let s=Object.values(Ge);return(ai[e.id]?s.filter(c=>c.authors.includes(ai[e.id])):s.filter(c=>c.authors.some(u=>u.name===e.username))).filter(c=>!c.name.endsWith("API")).sort((c,u)=>Number(c.required??!1)-Number(u.required??!1))},[e.id,e.username]);return n(f,null,n("div",{className:Si("header")},n("img",{className:Si("avatar"),src:e.getAvatarURL(void 0,512,!0),alt:""}),n(S.FormTitle,{tag:"h2",className:Si("name")},e.username),n("div",{className:Si("links")},r&&n(oi,{href:"https://"+r},n(nI,null)),o&&n(oi,{href:`https://github.com/${o}`},n(oI,null)))),n("div",{className:Si("plugins")},i.map(s=>n(ul,{key:s.name,plugin:s,disabled:s.required??!1,onRestartNeeded:()=>oo("Restart to apply changes!")}))))}var QP,VP,eI,tI,Si,$v=g(()=>{"use strict";a();Fv();$();rt();ae();A();ct();nt();x();Rr();yp();QP="/assets/e1e96d89e192de1997f73730db26e94f.svg",VP="/assets/730f58bcfd5a57a5e22460c445a0c6cf.svg",eI="/assets/3ff98ad75ac94fa883af5ed62d17c459.svg",tI="/assets/6a853b4c87fce386cbfef4a2efbacb09.svg",Si=Fe("vc-author-modal-")});function Gv(e){let t=new sI({username:e.username,id:e.id??As(),avatar:e.avatar,bot:!0});return O.dispatch({type:"USER_UPDATE",user:t}),t}function Sp({plugin:e,onRestartNeeded:t,onClose:o,transitionState:r}){let[i,s]=_.useState([]),l=mt().plugins[e.name],[c,u]=_.useState({}),[p,d]=_.useState({}),[h,v]=_.useState(null),T=()=>Object.values(p).every(M=>!M),N=Boolean(l&&e.options&&!is(e.options));_.useEffect(()=>{(async()=>{for(let M of e.authors.slice(0,6)){let F=M.id?await Ct.getUser(`${M.id}`).catch(()=>Gv({username:M.name})):Gv({username:M.name});s(H=>[...H,F])}})()},[]);async function b(){if(!e.options){o();return}if(e.beforeSave){let F=await Promise.resolve(e.beforeSave(c));if(F!==!0){v(F);return}}let M=!1;for(let[F,H]of Object.entries(c)){let X=e.options[F];l[F]=H,X?.onChange?.(H),X?.restartNeeded&&(M=!0)}M&&t(),o()}function I(){if(!N||!e.options)return n(S.FormText,null,"There are no settings for this plugin.");{let M=Object.entries(e.options).map(([F,H])=>{if(H.hidden)return null;function X(L){u(V=>({...V,[F]:L}))}function Z(L){d(V=>({...V,[F]:L}))}let q=aI[H.type];return n(q,{id:F,key:F,option:H,onChange:X,onError:Z,pluginSettings:l,definedSettings:e.settings})});return n(ce,{flexDirection:"column",style:{gap:12,marginBottom:16}},M)}}function k(M,F){let H=e.authors.length-F,X=e.authors.length-H,Z=X+e.authors.length-F;return n(ee,{text:e.authors.slice(X,Z).map(q=>q.name).join(", ")},({onMouseEnter:q,onMouseLeave:L})=>n("div",{className:vp.moreUsers,onMouseEnter:q,onMouseLeave:L},"+",H))}return n(Ne,{transitionState:r,size:"medium",className:"vc-text-selectable"},n(Xe,{separator:!1},n(J,{variant:"heading-lg/semibold",style:{flexGrow:1}},e.name),n(Tt,{onClick:o})),n(We,null,n(S.FormSection,null,n(S.FormTitle,{tag:"h3"},"About ",e.name),n(S.FormText,null,e.description),n(S.FormTitle,{tag:"h3",style:{marginTop:8,marginBottom:0}},"Authors"),n("div",{style:{width:"fit-content",marginBottom:8}},n(iI,{users:i,count:e.authors.length,guildId:void 0,renderIcon:!1,max:6,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:k,renderUser:M=>n(ei,{className:vp.clickableAvatar,onClick:()=>Uv(M)},n("img",{className:vp.avatar,src:M.getAvatarURL(void 0,80,!0),alt:M.username,title:M.username}))}))),!!e.settingsAboutComponent&&n("div",{className:te(z.bottom8,"vc-text-selectable")},n(S.FormSection,null,n(B,{message:"An error occurred while rendering this plugin's custom InfoComponent"},n(e.settingsAboutComponent,{tempSettings:c})))),n(S.FormSection,{className:z.bottom16},n(S.FormTitle,{tag:"h3"},"Settings"),I())),N&&n(pt,null,n(ce,{flexDirection:"column",style:{width:"100%"}},n(ce,{style:{marginLeft:"auto"}},n(C,{onClick:o,size:C.Sizes.SMALL,color:C.Colors.PRIMARY,look:C.Looks.LINK},"Cancel"),n(ee,{text:"You must fix all errors before saving",shouldShow:!T()},({onMouseEnter:M,onMouseLeave:F})=>n(C,{size:C.Sizes.SMALL,color:C.Colors.BRAND,onClick:b,onMouseEnter:M,onMouseLeave:F,disabled:!T()},"Save & Close"))),h&&n(J,{variant:"text-md/semibold",style:{color:"var(--text-danger)"}},"Error while saving: ",h))))}var iI,vp,sI,aI,Hv=g(()=>{"use strict";a();ao();$();ae();kt();qo();it();Pe();nt();w();j();x();ks();$v();iI=je("defaultRenderUser","showDefaultAvatarsForNullUsers"),vp=P("moreUsers","emptyUser","avatarContainer","clickableAvatar"),sI=Ft(()=>U.getCurrentUser().constructor);aI={[0]:Ov,[1]:mp,[2]:mp,[3]:Nv,[4]:Lv,[5]:_v,[6]:kv}});var zv=g(()=>{});var jv=g(()=>{});function Wv({checked:e,onChange:t,disabled:o}){return n("div",null,n("div",{className:te(pl.container,"default-colors",e?pl.checked:void 0),style:{backgroundColor:e?bp:Tp,opacity:o?.3:1}},n("svg",{className:pl.slider+" vc-switch-slider",viewBox:"0 0 28 20",preserveAspectRatio:"xMinYMid meet","aria-hidden":"true",style:{transform:e?"translateX(12px)":"translateX(-3px)"}},n("rect",{fill:"white",x:"4",y:"0",height:"20",width:"20",rx:"10"}),n("svg",{viewBox:"0 0 20 20",fill:"none"},e?n(f,null,n("path",{fill:bp,d:"M7.89561 14.8538L6.30462 13.2629L14.3099 5.25755L15.9009 6.84854L7.89561 14.8538Z"}),n("path",{fill:bp,d:"M4.08643 11.0903L5.67742 9.49929L9.4485 13.2704L7.85751 14.8614L4.08643 11.0903Z"})):n(f,null,n("path",{fill:Tp,d:"M5.13231 6.72963L6.7233 5.13864L14.855 13.2704L13.264 14.8614L5.13231 6.72963Z"}),n("path",{fill:Tp,d:"M13.2704 5.13864L14.8614 6.72963L6.72963 14.8614L5.13864 13.2704L13.2704 5.13864Z"})))),n("input",{disabled:o,type:"checkbox",className:pl.input,tabIndex:0,checked:e,onChange:r=>t(r.currentTarget.checked)})))}var bp,Tp,pl,qv=g(()=>{"use strict";a();jv();Pe();j();bp="var(--green-360)",Tp="var(--primary-400)",pl=P("slider","input","container")});function dl({disabled:e,isNew:t,name:o,infoButton:r,footer:i,author:s,enabled:l,setEnabled:c,description:u,onMouseEnter:p,onMouseLeave:d}){return n("div",{className:bi("card",{"card-disabled":e}),onMouseEnter:p,onMouseLeave:d},n("div",{className:bi("header")},n("div",{className:bi("name-author")},n(J,{variant:"text-md/bold",className:bi("name")},o,t&&n(Av,{text:"NEW",color:"#ED4245"})),!!s&&n(J,{variant:"text-md/normal",className:bi("author")},s)),r,n(Wv,{checked:l,onChange:c,disabled:e})),n(J,{className:bi("note"),variant:"text-sm/normal"},u),i)}var bi,xp=g(()=>{"use strict";a();zv();rt();dp();qv();x();bi=Fe("vc-addon-")});var Ds,wp=g(()=>{"use strict";a();Ds=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 Ap={};ze(Ap,{PMLogger:()=>lI,isPluginEnabled:()=>Pp,patches:()=>Yv,plugins:()=>cI,startAllPlugins:()=>Ls,startDependenciesRecursive:()=>ml,startPlugin:()=>Es,stopPlugin:()=>Ip});function Pp(e){return(Ge[e]?.required||Ge[e]?.isDependency||Mp[e]?.enabled)??!1}function ml(e){let t=!1,o=[];return e.dependencies?.forEach(r=>{if(!E.plugins[r].enabled){if(ml(Ge[r]),E.plugins[r].enabled=!0,Ge[r].patches){lo.warn(`Enabling dependency ${r} requires restart.`),t=!0;return}Es(Ge[r])||o.push(r)}}),{restartNeeded:t,failures:o}}var lo,lI,cI,Yv,Mp,Zv,Ls,Es,Ip,fl=g(()=>{"use strict";a();ao();$();Ve();w();x();Rr();wa();lo=new ie("PluginManager","#a6d189"),lI=lo,cI=Ge,Yv=[],Mp=E.plugins;Zv=Object.values(Ge);for(let e of Zv)Mp[e.name]?.enabled&&e.dependencies?.forEach(t=>{let o=Ge[t];if(o)Mp[t].enabled=!0,o.isDependency=!0;else{let r=new Error(`Plugin ${e.name} has unresolved dependency ${t}`);lo.warn(r)}});for(let e of Zv){if(e.settings){e.settings.pluginName=e.name,e.options??={};for(let[t,o]of Object.entries(e.settings.def)){let r=e.settings.checks?.[t];e.options[t]={...o,...r}}}if(e.patches&&Pp(e.name))for(let t of e.patches)t.plugin=e.name,Array.isArray(t.replacement)||(t.replacement=[t.replacement]),Yv.push(t)}Ls=Ko("startAllPlugins",function(t){lo.info(`Starting plugins (stage ${t})`);for(let o in Ge)if(Pp(o)){if((Ge[o].startAt??"WebpackReady")!==t)continue;Es(Ge[o])}});Es=Ko("startPlugin",function(t){let{name:o,commands:r,flux:i}=t;if(t.start){if(lo.info("Starting plugin",o),t.started)return lo.warn(`${o} already started`),!1;try{t.start(),t.started=!0}catch(s){return lo.error(`Failed to start ${o}
`,s),!1}}if(r?.length){lo.info("Registering commands of plugin",o);for(let s of r)try{yi(s,o)}catch(l){return lo.error(`Failed to register command ${s.name}
`,l),!1}}if(i)for(let s in i)O.subscribe(s,i[s]);return!0},e=>`startPlugin ${e.name}`),Ip=Ko("stopPlugin",function(t){let{name:o,commands:r,flux:i}=t;if(t.stop){if(lo.info("Stopping plugin",o),!t.started)return lo.warn(`${o} already stopped`),!1;try{t.stop(),t.started=!1}catch(s){return lo.error(`Failed to stop ${o}
`,s),!1}}if(r?.length){lo.info("Unregistering commands of plugin",o);for(let s of r)try{Cs(s.name)}catch(l){return lo.error(`Failed to unregister command ${s.name}
`,l),!1}}if(i)for(let s in i)O.unsubscribe(s,i[s]);return!0},e=>`stopPlugin ${e.name}`)});function pI(e){oe.show({message:e,type:oe.Type.FAILURE,id:oe.genId(),options:{position:oe.Position.BOTTOM}})}function dI({required:e}){return n(At,{className:Or("info-card",{"restart-card":e})},e?n(f,null,n(S.FormTitle,{tag:"h5"},"Restart required!"),n(S.FormText,{className:Or("dep-text")},"Restart now to apply new plugins and their settings"),n(C,{color:C.Colors.YELLOW,onClick:()=>location.reload()},"Restart")):n(f,null,n(S.FormTitle,{tag:"h5"},"Plugin Management"),n(S.FormText,null,"Press the cog wheel or info icon to get more info on a plugin"),n(S.FormText,null,"Plugins with a cog wheel have settings you can modify!")))}function ul({plugin:e,disabled:t,onRestartNeeded:o,onMouseEnter:r,onMouseLeave:i,isNew:s}){let l=E.plugins[e.name],c=()=>l.enabled??!1;function u(){us(async()=>d=>n(Sp,{...d,plugin:e,onRestartNeeded:()=>o(e.name)}))}function p(){let d=c();if(!d){let{restartNeeded:v,failures:T}=ml(e);if(T.length){Xv.error(`Failed to start dependencies for ${e.name}: ${T.join(", ")}`),ws("Failed to start dependencies: "+T.join(", "),"Close",()=>null);return}else if(v){l.enabled=!0,o(e.name);return}}if(e.patches?.length){l.enabled=!d,o(e.name);return}if(d&&!e.started){l.enabled=!d;return}if(!(d?Ip(e):Es(e))){l.enabled=!1;let v=`Error while ${d?"stopping":"starting"} plugin ${e.name}`;Xv.error(v),pI(v);return}l.enabled=!d}return n(dl,{name:e.name,description:e.description,isNew:s,enabled:c(),setEnabled:p,disabled:t,onMouseEnter:r,onMouseLeave:i,infoButton:n("button",{role:"switch",onClick:()=>u(),className:te(uI.button,Or("info-button"))},e.options&&!is(e.options)?n(Tv,null):n(il,null))})}function Np(){let e=mt(),t=_.useMemo(()=>new Ds,[]);_.useEffect(()=>()=>void(t.hasChanges&&_t.show({title:"Restart required",body:n(f,null,n("p",null,"The following plugins require a restart:"),n("div",null,t.map((v,T)=>n(f,null,T>0&&", ",Be.parse("`"+v+"`"))))),confirmText:"Restart now",cancelText:"Later!",onConfirm:()=>location.reload()})),[]);let o=_.useMemo(()=>{let v={};for(let T in Ge){let N=Ge[T].dependencies;if(N)for(let b of N)v[b]??=[],v[b].push(T)}return v},[]),r=_.useMemo(()=>Object.values(Ge).sort((v,T)=>v.name.localeCompare(T.name)),[]),[i,s]=_.useState({value:"",status:0}),l=v=>s(T=>({...T,value:v})),c=v=>s(T=>({...T,status:v})),u=v=>{let T=e.plugins[v.name]?.enabled;if(T&&i.status===2||!T&&i.status===1||i.status===3&&!p?.includes(v.name))return!1;if(!i.value.length)return!0;let N=i.value.toLowerCase();return v.name.toLowerCase().includes(N)||v.description.toLowerCase().includes(N)||v.tags?.some(b=>b.toLowerCase().includes(N))},[p]=at(()=>Dt("Vencord_existingPlugins").then(v=>{let T=Date.now()/1e3,N={},b=Object.values(r).map(k=>k.name),I=[];for(let{name:k}of r)(N[k]=v?.[k]??T)+60*60*24*2>T&&I.push(k);return io("Vencord_existingPlugins",N),Mr.isEqual(I,b)?[]:I})),d,h;if(r?.length){d=[],h=[];for(let v of r){if(!v.options&&v.name.endsWith("API")&&i.value!=="API"||!u(v))continue;if(v.required||o[v.name]?.some(N=>e.plugins[N].enabled)){let N=v.required?"This plugin is required for Vencord to function.":mI(o[v.name]?.filter(b=>e.plugins[b].enabled));h.push(n(ee,{text:N,key:v.name},({onMouseLeave:b,onMouseEnter:I})=>n(ul,{onMouseLeave:b,onMouseEnter:I,onRestartNeeded:k=>t.handleChange(k),disabled:!0,plugin:v})))}else d.push(n(ul,{onRestartNeeded:N=>t.handleChange(N),disabled:!1,plugin:v,isNew:p?.includes(v.name),key:v.name}))}}else d=h=n(J,{variant:"text-md/normal"},"No plugins meet search criteria.");return n(bo,{title:"Plugins"},n(dI,{required:t.hasChanges}),n(S.FormTitle,{tag:"h5",className:te(z.top20,z.bottom8)},"Filters"),n("div",{className:Or("filter-controls")},n(ot,{autoFocus:!0,value:i.value,placeholder:"Search for a plugin...",onChange:l,className:z.bottom20}),n("div",{className:Jv.inputWrapper},n(ho,{className:Jv.inputDefault,options:[{label:"Show All",value:0,default:!0},{label:"Show Enabled",value:1},{label:"Show Disabled",value:2},{label:"Show New",value:3}],serialize:String,select:c,isSelected:v=>v===i.status,closeOnSelect:!0}))),n(S.FormTitle,{className:z.top20},"Plugins"),n("div",{className:Or("grid")},d),n(S.FormDivider,{className:z.top20}),n(S.FormTitle,{tag:"h5",className:te(z.top20,z.bottom8)},"Required Plugins"),n("div",{className:Or("grid")},h))}function mI(e){return n(_.Fragment,null,n(S.FormText,null,"This plugin is required by:"),e.map(t=>n(S.FormText,{className:Or("dep-text")},t)))}var Or,Xv,Jv,uI,yp=g(()=>{"use strict";a();gv();Vo();nl();$();rt();Lt();Hv();xp();Yn();wp();Ve();it();Pe();nt();ut();j();x();Rr();fl();Or=Fe("vc-plugins-"),Xv=new ie("PluginSettings","#a6d189"),Jv=P("inputDefault","inputWrapper"),uI=P("button","disabled","enabled")});var Qv={};ze(Qv,{default:()=>fI});var fI,Vv=g(()=>{"use strict";a();yp();Yn();fI=To(Np,"Plugins")});function qe(e){return e.disabled&&(e.style??={},e.style.pointerEvents="none",e["aria-disabled"]=!0),n("a",{role:"link",target:"_blank",...e},e.children)}var xo=g(()=>{"use strict";a()});var e1={};ze(e1,{default:()=>TI});function yI({link:e}){let[t,o,r]=at(()=>fetch(e).then(s=>{if(s.status>300)throw`${s.status} ${s.statusText}`;let l=s.headers.get("Content-Type");if(!l?.startsWith("text/css")&&!l?.startsWith("text/plain"))throw"Not a CSS file. Remember to use the raw link!";return"Okay!"})),i=r?"Checking...":o?`Error: ${o instanceof Error?o.message:String(o)}`:"Valid!";return n(S.FormText,{style:{color:r?"var(--text-muted)":o?"var(--text-danger)":"var(--text-positive)"}},i)}function vI({themeLinks:e}){return e.length?n(f,null,n(S.FormTitle,{className:z.top20,tag:"h5"},"Validator"),n(S.FormText,null,"This section will tell you whether your themes can successfully be loaded"),n("div",null,e.map(t=>n(At,{style:{padding:".5em",marginBottom:".5em",marginTop:".5em"},key:t},n(S.FormTitle,{tag:"h5",style:{overflowWrap:"break-word"}},t),n(yI,{link:t}))))):null}function SI({theme:e,enabled:t,onChange:o,onDelete:r}){return n(dl,{name:e.name,description:e.description,author:e.author,enabled:t,setEnabled:o,infoButton:!1,footer:n(ce,{flexDirection:"row",style:{gap:"0.2em"}},!!e.website&&n(qe,{href:e.website},"Website"),!!(e.website&&e.invite)&&" \u2022 ",!!e.invite&&n(qe,{href:`https://discord.gg/${e.invite}`,onClick:async i=>{i.preventDefault(),e.invite!=null&&_r(e.invite).catch(()=>oo("Invalid or expired invite"))}},"Discord Server"))})}function bI(){let e=mt(["themeLinks","enabledThemes"]),t=to(null),[o,r]=Y(0),[i,s]=Y(e.themeLinks.join(`
`)),[l,c]=Y(null),[u,,p]=at(VencordNative.themes.getThemesDir);pe(()=>{d()},[]);async function d(){let I=await VencordNative.themes.getThemesList();c(I)}function h(I,k){if(k){if(e.enabledThemes.includes(I))return;e.enabledThemes=[...e.enabledThemes,I]}else e.enabledThemes=e.enabledThemes.filter(M=>M!==I)}async function v(I){if(I.stopPropagation(),I.preventDefault(),!I.currentTarget?.files?.length)return;let{files:k}=I.currentTarget,M=Array.from(k,F=>{let{name:H}=F;if(!!H.endsWith(".css"))return new Promise((X,Z)=>{let q=new FileReader;q.onload=()=>{VencordNative.themes.uploadTheme(H,q.result).then(X).catch(Z)},q.readAsText(F)})});await Promise.all(M),d()}function T(){return n(f,null,n(At,{className:"vc-settings-card"},n(S.FormTitle,{tag:"h5"},"Find Themes:"),n("div",{style:{marginBottom:".5em",display:"flex",flexDirection:"column"}},n(qe,{style:{marginRight:".5em"},href:"https://betterdiscord.app/themes"},"BetterDiscord Themes"),n(qe,{href:"https://github.com/search?q=discord+theme"},"GitHub")),n(S.FormText,null,'If using the BD site, click on "Download" and place the downloaded .theme.css file into your themes folder.')),n(S.FormSection,{title:"Local Themes"},n(At,{className:"vc-settings-quick-actions-card"},n(f,null,n(C,{onClick:()=>Xa(u),size:C.Sizes.SMALL,disabled:p},"Open Themes Folder"),n(C,{onClick:d,size:C.Sizes.SMALL},"Load missing Themes"),n(C,{onClick:()=>VencordNative.quickCss.openEditor(),size:C.Sizes.SMALL},"Edit QuickCSS"))),n("div",{className:hI("grid")},l?.map(I=>n(SI,{key:I.fileName,enabled:e.enabledThemes.includes(I.fileName),onChange:k=>h(I.fileName,k),onDelete:async()=>{h(I.fileName,!1),await VencordNative.themes.deleteTheme(I.fileName),d()},theme:I})))))}function N(){e.themeLinks=[...new Set(i.trim().split(/\n+/).map(I=>I.trim()).filter(Boolean))]}function b(){return n(f,null,n(At,{className:"vc-settings-card vc-text-selectable"},n(S.FormTitle,{tag:"h5"},"Paste links to css files here"),n(S.FormText,null,"One link per line"),n(S.FormText,null,"Make sure to use direct links to files (raw or github.io)!")),n(S.FormSection,{title:"Online Themes",tag:"h5"},n(Ra,{value:i,onChange:s,className:te(gI.textarea,"vc-settings-theme-links"),placeholder:"Theme Links",spellCheck:!1,onBlur:N,rows:10}),n(vI,{themeLinks:e.themeLinks})))}return n(bo,{title:"Themes"},n(Co,{type:"top",look:"brand",className:"vc-settings-tab-bar",selectedItem:o,onItemSelect:r},n(Co.Item,{className:"vc-settings-tab-bar-item",id:0},"Local Themes"),n(Co.Item,{className:"vc-settings-tab-bar-item",id:1},"Online Themes")),o===0&&T(),o===1&&b())}var J6,Q6,gI,hI,TI,t1=g(()=>{"use strict";a();$();rt();kt();Lt();xo();ct();it();Pe();jn();ut();j();x();xp();Yn();J6=P("resolveInvite"),Q6=Vt(e=>e.prototype?.activateUploadDialogue&&e.prototype.setRef),gI=Vt(e=>typeof e.textarea=="string"),hI=Fe("vc-settings-theme-");TI=To(bI,"Themes")});var i1={};ze(i1,{default:()=>PI});function o1(e,t){return async()=>{e(!0);try{await t()}catch(r){if(Dr.error("Failed to update",r),r)if(r.code&&r.cmd){let{code:i,path:s,cmd:l,stderr:c}=r;if(i==="ENOENT")var o=`Command \`${s}\` not found.
Please install it and try again`;else{var o=`An error occurred while running \`${l}\`:
`;o+=c||`Code \`${i}\`. See the console for more info`}}else var o="An unknown error occurred. See the console for more info.";else var o=`An unknown error occurred (error is undefined).
Please try again.`;_t.show({title:"Oops!",body:n(So,null,o.split(`
`).map(i=>n("div",null,Be.parse(i))))})}finally{e(!1)}}}function n1({repo:e,hash:t,disabled:o=!1}){return n(qe,{href:`${e}/commit/${t}`,disabled:o},t)}function r1({updates:e,repo:t,repoPending:o}){return n(At,{style:{padding:"0 0.5em"}},e.map(({hash:r,author:i,message:s})=>n("div",{style:{marginTop:"0.5em",marginBottom:"0.5em"}},n("code",null,n(n1,{repo:t,hash:r,disabled:o})),n("span",{style:{marginLeft:"0.5em",color:"var(--text-normal)"}},s," - ",i))))}function xI(e){let[t,o]=_.useState(qn),[r,i]=_.useState(!1),[s,l]=_.useState(!1),c=(t?.length??0)>0;return n(f,null,!t&&mi?n(f,null,n(S.FormText,null,"Failed to check updates. Check the console for more info"),n(So,{style:{padding:"1em"}},n("p",null,mi.stderr||mi.stdout||"An unknown error occurred"))):n(S.FormText,{className:z.bottom8},c?t.length===1?"There is 1 Update":`There are ${t.length} Updates`:"Up to Date!"),c&&n(r1,{updates:t,...e}),n(ce,{className:te(z.bottom8,z.top8)},c&&n(C,{size:C.Sizes.SMALL,disabled:s||r,onClick:o1(l,async()=>{await gi()&&(o([]),await new Promise(u=>{_t.show({title:"Update Success!",body:"Successfully updated. Restart now to apply the changes?",confirmText:"Restart",cancelText:"Not now!",onConfirm(){go(),u()},onCancel:u})}))})},"Update Now"),n(C,{size:C.Sizes.SMALL,disabled:s||r,onClick:o1(i,async()=>{await fi()?o(qn):(o([]),oe.show({message:"No updates found!",id:oe.genId(),type:oe.Type.MESSAGE,options:{position:oe.Position.BOTTOM}}))})},"Check for Updates")))}function wI(e){return n(f,null,n(S.FormText,{className:z.bottom8},"Your local copy has more recent commits. Please stash or reset them."),n(r1,{...e,updates:qn}))}function MI(){let e=mt(["notifyAboutUpdates","autoUpdate","autoUpdateNotification"]),[t,o,r]=at(Xu,{fallbackValue:"Loading..."});_.useEffect(()=>{o&&Dr.error("Failed to retrieve repo",o)},[o]);let i={repo:t,repoPending:r};return n(bo,{title:"Vencord Updater"},n(S.FormTitle,{tag:"h5"},"Updater Settings"),n(gt,{value:e.notifyAboutUpdates,onChange:s=>e.notifyAboutUpdates=s,note:"Shows a notification on startup",disabled:e.autoUpdate},"Get notified about new updates"),n(gt,{value:e.autoUpdate,onChange:s=>e.autoUpdate=s,note:"Automatically update Vencord without confirmation prompt"},"Automatically update"),n(gt,{value:e.autoUpdateNotification,onChange:s=>e.autoUpdateNotification=s,note:"Shows a notification when Vencord automatically updates",disabled:!e.autoUpdate},"Get notified when an automatic update completes"),n(S.FormTitle,{tag:"h5"},"Repo"),n(S.FormText,{className:"vc-text-selectable"},r?t:o?"Failed to retrieve - check console":n(qe,{href:t},t.split("/").slice(-2).join("/"))," ","(",n(n1,{hash:fo,repo:t,disabled:r}),")"),n(S.FormDivider,{className:z.top8+" "+z.bottom8}),n(S.FormTitle,{tag:"h5"},"Updates"),bs?n(wI,{...i}):n(xI,{...i}))}var PI,s1=g(()=>{"use strict";a();$();li();kt();xo();it();Pe();jn();ut();Lr();x();si();Yn();PI=To(MI,"Updater")});function gl({value:e,onChange:t,validate:o}){let[r,i]=_.useState(e),[s,l]=_.useState();function c(u){i(u);let p=o(u);p===!0?(l(void 0),t(u)):l(p)}return n(f,null,n(ot,{type:"text",value:r,onChange:c,error:s}))}var Cp=g(()=>{"use strict";a();x()});var a1={};ze(a1,{default:()=>kI});function II(e){try{return new URL(e),!0}catch{return"Invalid URL"}}async function AI(){let e=await fetch(new URL("/v1/",zn()),{method:"DELETE",headers:new Headers({Authorization:await pi()})});if(!e.ok){Za.error(`Failed to erase data, API returned ${e.status}`),De({title:"Cloud Integrations",body:`Could not erase all data (API returned ${e.status}), please contact support.`,color:"var(--red-360)"});return}E.cloud.authenticated=!1,await qu(),De({title:"Cloud Integrations",body:"Successfully erased all data.",color:"var(--green-360)"})}function NI(){let{cloud:e}=mt(["cloud.authenticated","cloud.settingsSync"]),t=e.authenticated&&e.settingsSync;return n(S.FormSection,{title:"Settings Sync",className:z.top16},n(S.FormText,{variant:"text-md/normal",className:z.bottom20},"Synchronize your settings to the cloud. This allows easy synchronization across multiple devices with minimal effort."),n(gt,{key:"cloud-sync",disabled:!e.authenticated,value:e.settingsSync,onChange:o=>{e.settingsSync=o}},"Settings Sync"),n("div",{className:"vc-cloud-settings-sync-grid"},n(C,{size:C.Sizes.SMALL,disabled:!t,onClick:()=>di(!0)},"Sync to Cloud"),n(ee,{text:"This will overwrite your local settings with the ones on the cloud. Use wisely!"},({onMouseLeave:o,onMouseEnter:r})=>n(C,{onMouseLeave:o,onMouseEnter:r,size:C.Sizes.SMALL,color:C.Colors.RED,disabled:!t,onClick:()=>el(!0,!0)},"Sync from Cloud")),n(C,{size:C.Sizes.SMALL,color:C.Colors.RED,disabled:!t,onClick:()=>ov()},"Delete Cloud Settings")))}function CI(){let e=mt(["cloud.authenticated","cloud.url"]);return n(bo,{title:"Vencord Cloud"},n(S.FormSection,{title:"Cloud Settings",className:z.top16},n(S.FormText,{variant:"text-md/normal",className:z.bottom20},"Vencord comes with a cloud integration that adds goodies like settings sync across devices. It ",n(qe,{href:"https://vencord.dev/cloud/privacy"},"respects your privacy"),", and the ",n(qe,{href:"https://github.com/Vencord/Backend"},"source code")," is AGPL 3.0 licensed so you can host it yourself."),n(gt,{key:"backend",value:e.cloud.authenticated,onChange:t=>{t&&Xy(),t||(e.cloud.authenticated=t)},note:"This will request authorization if you have not yet set up cloud integrations."},"Enable Cloud Integrations"),n(S.FormTitle,{tag:"h5"},"Backend URL"),n(S.FormText,{className:z.bottom8},"Which backend to use when using cloud integrations."),n(gl,{key:"backendUrl",value:e.cloud.url,onChange:t=>{e.cloud.url=t,e.cloud.authenticated=!1,qu()},validate:II}),n(C,{className:z.top8,size:C.Sizes.MEDIUM,color:C.Colors.RED,disabled:!e.cloud.authenticated,onClick:()=>_t.show({title:"Are you sure?",body:"Once your data is erased, we cannot recover it. There's no going back!",onConfirm:AI,confirmText:"Erase it!",confirmColor:"vc-cloud-erase-data-danger-btn",cancelText:"Nevermind"})},"Erase All Data"),n(S.FormDivider,{className:z.top16})),n(NI,null))}var kI,l1=g(()=>{"use strict";a();$n();$();Cp();xo();Ku();it();vs();x();Yn();kI=To(CI,"Cloud")});var c1={};ze(c1,{default:()=>DI});function RI(){return n(bo,{title:"Backup & Restore"},n(At,{className:te("vc-settings-card","vc-backup-restore-card")},n(ce,{flexDirection:"column"},n("strong",null,"Warning"),n("span",null,"Importing a settings file will overwrite your current settings."))),n(J,{variant:"text-md/normal",className:z.bottom8},"You can import and export your Vencord settings as a JSON file. This allows you to easily transfer your settings to another device, or recover your settings after reinstalling Vencord or Discord."),n(J,{variant:"text-md/normal",className:z.bottom8},"Settings Export contains:",n("ul",null,n("li",null,"\u2014 Custom QuickCSS"),n("li",null,"\u2014 Theme Links"),n("li",null,"\u2014 Plugin Settings"))),n(ce,null,n(C,{onClick:()=>tv(),size:C.Sizes.SMALL},"Import Settings"),n(C,{onClick:Vy,size:C.Sizes.SMALL},"Export Settings")))}var DI,u1=g(()=>{"use strict";a();kt();it();Pe();vs();x();Yn();DI=To(RI,"Backup & Restore")});var _s,kp=g(()=>{"use strict";a();Rt();$();A();w();x();si();_s=y({name:"Settings",description:"Adds Settings UI and debug info",authors:[m.Ven,m.Megu],required:!0,start(){ue("user-settings-cog",e=>()=>{e.find(o=>Array.isArray(o)&&o.some(r=>r?.props?.id==="VencordSettings"))?.forEach(o=>{let r=o?.props?.id;(r?.startsWith("Vencord")||r?.startsWith("Vesktop"))&&(o.props.action=()=>dn.open(r))})})},patches:[{find:".versionHash",replacement:[{match:/\[\(0,.{1,3}\.jsxs?\)\((.{1,10}),(\{[^{}}]+\{.{0,20}.versionHash,.+?\})\)," "/,replace:(e,t,o)=>(o=o.replace(/children:\[.+\]/,""),`${e},Vencord.Plugins.plugins.Settings.makeInfoElements(${t}, ${o})`)}]},{find:"Messages.ACTIVITY_SETTINGS",replacement:{get match(){switch(E.plugins.Settings.settingsLocation){case"top":return/\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.USER_SETTINGS\}/;case"aboveNitro":return/\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.BILLING_SETTINGS\}/;case"belowNitro":return/\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.APP_SETTINGS\}/;case"belowActivity":return/(?<=\{section:(\i\.\i)\.DIVIDER},)\{section:"changelog"/;case"bottom":return/\{section:(\i\.\i)\.CUSTOM,\s*element:.+?}/;case"aboveActivity":default:return/\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.ACTIVITY_SETTINGS\}/}},replace:"...$self.makeSettingsCategories($1),$&"}}],customSections:[],makeSettingsCategories(e){return[{section:e.HEADER,label:"Vencord",className:"vc-settings-header"},{section:"VencordSettings",label:"Vencord",element:(fv(),En(mv)).default,className:"vc-settings"},{section:"VencordPlugins",label:"Plugins",element:(Vv(),En(Qv)).default,className:"vc-plugins"},{section:"VencordThemes",label:"Themes",element:(t1(),En(e1)).default,className:"vc-themes"},{section:"VencordUpdater",label:"Updater",element:(s1(),En(i1)).default,className:"vc-updater"},{section:"VencordCloud",label:"Cloud",element:(l1(),En(a1)).default,className:"vc-cloud"},{section:"VencordSettingsSync",label:"Backup & Restore",element:(u1(),En(c1)).default,className:"vc-backup-restore"},!1,...this.customSections.map(t=>t(e)),{section:e.DIVIDER}].filter(Boolean)},options:{settingsLocation:{type:4,description:"Where to put the Vencord settings section",options:[{label:"At the very top",value:"top"},{label:"Above the Nitro section",value:"aboveNitro"},{label:"Below the Nitro section",value:"belowNitro"},{label:"Above Activity Settings",value:"aboveActivity",default:!0},{label:"Below Activity Settings",value:"belowActivity"},{label:"At the very bottom",value:"bottom"}],restartNeeded:!0}},get electronVersion(){return VencordNative.native.getVersions().electron||window.armcord?.electron||null},get chromiumVersion(){try{return VencordNative.native.getVersions().chrome||navigator.userAgentData?.brands?.find(e=>e.brand==="Chromium"||e.brand==="Google Chrome")?.version||null}catch{return null}},get additionalInfo(){return` (Vesktop v${VesktopNative.app.getVersion()})`},makeInfoElements(e,t){let{electronVersion:o,chromiumVersion:r,additionalInfo:i}=this;return n(f,null,n(e,{...t},"Vencord ",fo,i),o&&n(e,{...t},"Electron ",o),r&&n(e,{...t},"Chromium ",r))}})});var p1,LI,Rp,d1=g(()=>{"use strict";a();Ti();A();Pe();vn();w();Lr();x();si();Rr();kp();p1="Vencord-SupportHelper-Dismiss",LI=[_a,"1024286218801926184","1033680203433660458"],Rp=y({name:"SupportHelper",required:!0,description:"Helps us provide support to you",authors:[m.Ven],dependencies:["CommandsAPI"],commands:[{name:"vencord-debug",description:"Send Vencord Debug info",predicate:e=>LI.includes(e.channel.id),async execute(){let{RELEASE_CHANNEL:e}=window.GLOBAL_ENV,t=(()=>`Vesktop v${VesktopNative.app.getVersion()}`)(),o=c=>c.endsWith("API")||Ge[c].required,r=Object.keys(Ge).filter(c=>Vencord.Plugins.isPluginEnabled(c)&&!o(c)),i=Object.keys(Ge).filter(c=>Vencord.Plugins.isPluginEnabled(c)&&o(c)),s={Vencord:`v1.6.6 \u2022 ${fo}${_s.additionalInfo} - ${Intl.DateTimeFormat("en-GB",{dateStyle:"medium"}).format(1704500565086)}`,"Discord Branch":e,Client:t,Platform:window.navigator.platform,Outdated:Kn,OpenAsar:"openasar"in window};return{content:`
**Vencord Debug Info**
>>> ${Object.entries(s).map(([c,u])=>`${c}: ${u}`).join(`
`)}
Enabled Plugins (${r.length+i.length}):
${Is(r.join(", ")+`
`+i.join(", "))}
`.trim().replaceAll("```\n","```")}}}],flux:{async CHANNEL_SELECT({channelId:e}){if(e===_a&&!as(U.getCurrentUser().id)&&Kn&&fo!==await wt.get(p1)){let t=()=>wt.set(p1,fo);_t.show({title:"Hold on!",body:n("div",null,n(S.FormText,null,"You are using an outdated version of Vencord! Chances are, your issue is already fixed."),n(S.FormText,null,"Please first update using the Updater Page in Settings, or use the VencordInstaller (Update Vencord Button) to do so, in case you can't access the Updater page.")),onCancel:t,onConfirm:t})}}}})});var Dp,m1=g(()=>{"use strict";a();A();w();Dp=y({name:"AlwaysAnimate",description:"Animates anything that can be animated",authors:[m.FieryFlames],patches:[{find:"canAnimate:",all:!0,noWarn:!0,replacement:{match:/canAnimate:.+?(?=([,}].*?\)))/g,replace:(e,t)=>t.match(/}=.+/)==null?"canAnimate:!0":e}},{find:".Messages.GUILD_OWNER,",replacement:{match:/(?<=\.activityEmoji,.+?animate:)\i/,replace:"!0"}},{find:".animatedBannerHoverLayer,onMouseEnter:",replacement:{match:/(?<=guildBanner:\i,animate:)\i(?=}\))/,replace:"!0"}}]})});var Lp,f1=g(()=>{"use strict";a();A();w();Lp=y({name:"AlwaysTrust",description:"Removes the annoying untrusted domain and suspicious file popup",authors:[m.zt],patches:[{find:'.displayName="MaskedLinkStore"',replacement:{match:/(?<=isTrustedDomain\(\i\){)return \i\(\i\)/,replace:"return true"}},{find:"isSuspiciousDownload:",replacement:{match:/function \i\(\i\){(?=.{0,60}\.parse\(\i\))/,replace:"$&return null;"}}]})});var EI,Ep,g1=g(()=>{"use strict";a();$();A();w();EI=/\.tar\.\w+$/,Ep=y({name:"AnonymiseFileNames",authors:[m.obscurity],description:"Anonymise uploaded file names",patches:[{find:"instantBatchUpload:function",replacement:{match:/uploadFiles:(.{1,2}),/,replace:"uploadFiles:(...args)=>(args[0].uploads.forEach(f=>f.filename=$self.anonymise(f.filename)),$1(...args)),"}}],options:{method:{description:"Anonymising method",type:4,options:[{label:"Random Characters",value:0,default:!0},{label:"Consistent",value:1},{label:"Timestamp (4chan-like)",value:2}]},randomisedLength:{description:"Random characters length",type:1,default:7,disabled:()=>E.plugins.AnonymiseFileNames.method!==0},consistent:{description:"Consistent filename",type:0,default:"image",disabled:()=>E.plugins.AnonymiseFileNames.method!==1}},anonymise(e){let t="image",r=EI.exec(e)?.index??e.lastIndexOf("."),i=r!==-1?e.slice(r):"";switch(E.plugins.AnonymiseFileNames.method){case 0:let s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";t=Array.from({length:E.plugins.AnonymiseFileNames.randomisedLength},()=>s[Math.floor(Math.random()*s.length)]).join("");break;case 1:t=E.plugins.AnonymiseFileNames.consistent;break;case 2:t=`${Math.floor(Date.now()/1e3)}${Math.floor(window.performance.now())}`;break}return t+i}})});async function h1(e,t){return(await Pr.fetchAssetIds(e,[t]))[0]}async function OI(e){let t={};return await _I.fetchApplicationsRPC(t,e),t.application}var _I,y1,xi,_p,v1=g(()=>{"use strict";a();nl();xo();A();w();j();x();_I=P("fetchApplicationsRPC","getRemoteIconURL");y1={};_p=y({name:"WebRichPresence (arRPC)",description:"Client plugin for arRPC to enable RPC on Discord Web (experimental)",authors:[m.Ducko],settingsAboutComponent:()=>n(f,null,n(S.FormTitle,{tag:"h3"},"How to use arRPC"),n(S.FormText,null,n(qe,{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 handleEvent(e){let t=JSON.parse(e.data),{activity:o}=t,r=o?.assets;if(r?.large_image&&(r.large_image=await h1(o.application_id,r.large_image)),r?.small_image&&(r.small_image=await h1(o.application_id,r.small_image)),o){let i=o.application_id;y1[i]||=await OI(i);let s=y1[i];o.name||=s.name}O.dispatch({type:"LOCAL_ACTIVITY_UPDATE",...t})},async start(){if("armcord"in window)return;if(xi&&xi.close(),xi=new WebSocket("ws://127.0.0.1:1337"),xi.onmessage=this.handleEvent,!await new Promise(t=>setTimeout(()=>t(xi.readyState===WebSocket.OPEN),1e3))){ws("Failed to connect to arRPC, is it running?","Retry",()=>{op(),this.start()});return}oe.show({message:"Connected to arRPC",type:oe.Type.SUCCESS,id:oe.genId(),options:{duration:1e3,position:oe.Position.BOTTOM}})},stop(){O.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:null}),xi?.close()}})});var Op,S1=g(()=>{"use strict";a();A();w();Op=y({name:"BANger",description:"Replaces the GIF in the ban dialogue with a custom one.",authors:[m.Xinto,m.Glitch],patches:[{find:"BAN_CONFIRM_TITLE.",replacement:{match:/src:\i\("\d+"\)/g,replace:"src: Vencord.Settings.plugins.BANger.source"}}],options:{source:{description:"Source to replace ban GIF with (Video or Gif)",type:0,default:"https://i.imgur.com/wp5q52C.mp4",restartNeeded:!0}}})});var b1,T1,BI,x1,w1=g(()=>{"use strict";a();ae();j();x();Bp();b1=Re("ChannelRTCStore"),T1=P("a","animated","useTransition"),BI=je('("guildsnav")'),x1=B.wrap(e=>{let t=Ye([wi],()=>wi.getExpandedFolders()),o=Ye([b1],()=>b1.isFullscreenInContext()),r=n(BI,{...e,isBetterFolders:!0,betterFoldersExpandedIds:t}),i=!!t.size,s=document.querySelector(e.className.split(" ").map(c=>`.${c}`).join("")),l={display:o?"none":"flex"};return!s||!ht.store.sidebarAnim?i?n("div",{style:l},r):null:n(T1.Transition,{items:i,from:{width:0},enter:{width:s.getBoundingClientRect().width},leave:{width:0},config:{duration:200}},(c,u)=>u&&n(T1.animated.div,{style:{...c,...l}},r))},{noop:!0})});function $I(e){return UI.getGuildFolders().find(t=>t.guildIds.includes(e))}function P1(){for(let e of wi.getExpandedFolders())Up.toggleGuildFolderExpand(e)}var FI,UI,wi,Up,M1,Fp,ht,$p,Bp=g(()=>{"use strict";a();$();A();w();j();x();w1();({GuildsTree:FI}=P("GuildsTree")),UI=Re("SortedGuildStore"),wi=Re("ExpandedGuildFolderStore"),Up=P("move","toggleGuildFolderExpand"),M1=null,Fp=!1;ht=D({sidebar:{type:3,description:"Display servers from folder on dedicated sidebar",restartNeeded:!0,default:!0},sidebarAnim:{type:3,description:"Animate opening the folder sidebar",default:!0},closeAllFolders:{type:3,description:"Close all folders when selecting a server not in a folder",default:!1},closeAllHomeButton:{type:3,description:"Close all folders when clicking on the home button",restartNeeded:!0,default:!1},closeOthers:{type:3,description:"Close other folders when opening a folder",default:!1},forceOpen:{type:3,description:"Force a folder to open when switching to a server of that folder",default:!1},keepIcons:{type:3,description:"Keep showing guild icons in the primary guild bar folder when it's open in the BetterFolders sidebar",restartNeeded:!0,default:!1},showFolderIcon:{type:4,description:"Show the folder icon above the folder guilds in the BetterFolders sidebar",options:[{label:"Never",value:0},{label:"Always",value:1,default:!0},{label:"When more than one folder is expanded",value:2}],restartNeeded:!0}}),$p=y({name:"BetterFolders",description:"Shows server folders on dedicated sidebar and adds folder related improvements",authors:[m.juby,m.AutumnVN,m.Nuckyz],settings:ht,patches:[{find:'("guildsnav")',predicate:()=>ht.store.sidebar,replacement:[{match:/(?<=let{disableAppDownload:\i=\i\.isPlatformEmbedded,isOverlay:.+?)(?=}=\i,)/,replace:",isBetterFolders"},{match:/(useStateFromStoresArray\).{0,25}let \i)=(\i\.\i.getGuildsTree\(\))/,replace:(e,t,o)=>`${t}=$self.getGuildTree(!!arguments[0].isBetterFolders,${o},arguments[0].betterFoldersExpandedIds)`},{match:/lastTargetNode:\i\[\i\.length-1\].+?Fragment.+?\]}\)\]/,replace:"$&.filter($self.makeGuildsBarGuildListFilter(!!arguments[0].isBetterFolders))"},{match:/unreadMentionsIndicatorBottom,barClassName.+?}\)\]/,replace:"$&.filter($self.makeGuildsBarTreeFilter(!!arguments[0].isBetterFolders))"},{match:/(?<=\.Messages\.SERVERS.+?switch\((\i)\.type\){case \i\.\i\.FOLDER:.+?folderNode:\i,)/,replace:'isBetterFolders:typeof isBetterFolders!=="undefined"?isBetterFolders:false,'}]},{find:".MAX_GUILD_FOLDER_NAME_LENGTH,",predicate:()=>ht.store.sidebar&&ht.store.showFolderIcon!==1,replacement:[{match:/(useStateFromStores\).{0,20}=>)(\i\.\i)\.isFolderExpanded\(\i\)/,replace:(e,t,o)=>`${t}${o}.getExpandedFolders()`},{match:/(?<=folderNode:(\i),expanded:)\i(?=,)/,replace:(e,t)=>`typeof ${e}==="boolean"?${e}:${e}.has(${t}.id),betterFoldersExpandedIds:${e} instanceof Set?${e}:void 0`}]},{find:".FOLDER_ITEM_GUILD_ICON_MARGIN);",predicate:()=>ht.store.sidebar,replacement:[{predicate:()=>ht.store.keepIcons,match:/(?<=let{folderNode:\i,setNodeRef:\i,.+?expanded:(\i),.+?;)(?=let)/,replace:(e,t)=>`${t}=!!arguments[0].isBetterFolders&&${t};`},{predicate:()=>!ht.store.keepIcons,match:/(?<=\.Messages\.SERVER_FOLDER_PLACEHOLDER.+?useTransition\)\()/,replace:"!!arguments[0].isBetterFolders&&"},{predicate:()=>!ht.store.keepIcons,match:/expandedFolderBackground,.+?,(?=\i\(\(\i,\i,\i\)=>{let{key.{0,45}ul)(?<=selected:\i,expanded:(\i),.+?)/,replace:(e,t)=>`${e}!arguments[0].isBetterFolders&&${t}?null:`},{predicate:()=>ht.store.showFolderIcon!==1,match:/(?<=\.wrapper,children:\[)/,replace:"$self.shouldShowFolderIconAndBackground(!!arguments[0].isBetterFolders,arguments[0].betterFoldersExpandedIds)&&"},{predicate:()=>ht.store.showFolderIcon!==1,match:/(?<=\.expandedFolderBackground.+?}\),)(?=\i,)/,replace:"!$self.shouldShowFolderIconAndBackground(!!arguments[0].isBetterFolders,arguments[0].betterFoldersExpandedIds)?null:"}]},{find:"APPLICATION_LIBRARY,render",predicate:()=>ht.store.sidebar,replacement:{match:/(?<=({className:\i\.guilds,themeOverride:\i})\))/,replace:",$self.FolderSideBar($1)"}},{find:".Messages.DISCODO_DISABLED",predicate:()=>ht.store.closeAllHomeButton,replacement:{match:/(?<=onClick:\(\)=>{)(?=.{0,200}"discodo")/,replace:"$self.closeFolders();"}}],flux:{CHANNEL_SELECT(e){if(!(!ht.store.closeAllFolders&&!ht.store.forceOpen)&&M1!==e.guildId){M1=e.guildId;let t=$I(e.guildId);t?.folderId?ht.store.forceOpen&&!wi.isFolderExpanded(t.folderId)&&Up.toggleGuildFolderExpand(t.folderId):ht.store.closeAllFolders&&P1()}},TOGGLE_GUILD_FOLDER_EXPAND(e){ht.store.closeOthers&&!Fp&&(Fp=!0,O.wait(()=>{let t=wi.getExpandedFolders();if(t.size>1)for(let o of t)o!==e.folderId&&Up.toggleGuildFolderExpand(o);Fp=!1}))}},getGuildTree(e,t,o){if(!e||o==null)return t;let r=new FI;return r.root.children=t.root.children.filter(i=>o.has(i.id)),r.nodes=Object.fromEntries(Object.entries(t.nodes).filter(([i,s])=>o.has(s.id)||o.has(s.parentId))),r},makeGuildsBarGuildListFilter(e){return t=>e?t?.props?.["aria-label"]===et.Messages.SERVERS:!0},makeGuildsBarTreeFilter(e){return t=>e?"onScroll"in t.props:!0},shouldShowFolderIconAndBackground(e,t){if(!e)return!0;switch(ht.store.showFolderIcon){case 0:return!1;case 1:return!0;case 2:return(t?.size??0)>1;default:return!0}},FolderSideBar:e=>n(x1,{...e}),closeFolders:P1})});var Gp,I1=g(()=>{"use strict";a();A();w();Gp=y({name:"BetterGifAltText",authors:[m.Ven],description:"Change GIF alt text from simply being 'GIF' to containing the gif tags / filename",patches:[{find:"onCloseImage=",replacement:{match:/(return.{0,10}\.jsx.{0,50}isWindowFocused)/,replace:"$self.altify(e);$1"}},{find:".Messages.GIF,",replacement:{match:/alt:(\i)=(\i\.default\.Messages\.GIF)(?=,[^}]*\}=(\i))/,replace:"alt_$$:$1=$self.altify($3)||$2"}}],altify(e){if(e.alt??="GIF",e.alt!=="GIF")return e.alt;let t=e.original||e.src;try{t=decodeURI(t)}catch{}let o=t.slice(t.lastIndexOf("/")+1).replace(/\d/g,"").replace(/.gif$/,"").split(/[,\-_ ]+/g).slice(0,20).join(" ");return o.length>300&&(o=o.slice(0,300)+"..."),o&&(e.alt+=` - ${o}`),e.alt}})});var GI,Hp,A1=g(()=>{"use strict";a();$();A();w();j();GI=P("section","lastSection"),Hp=y({name:"BetterNotesBox",description:"Hide notes or disable spellcheck (Configure in settings!!)",authors:[m.Ven],patches:[{find:"hideNote:",all:!0,noWarn:!0,predicate:()=>Vencord.Settings.plugins.BetterNotesBox.hide,replacement:{match:/hideNote:.+?(?=([,}].*?\)))/g,replace:(e,t)=>t.match(/}=.+/)==null?"hideNote:!0":e}},{find:"Messages.NOTE_PLACEHOLDER",replacement:{match:/\.NOTE_PLACEHOLDER,/,replace:"$&spellCheck:!Vencord.Settings.plugins.BetterNotesBox.noSpellCheck,"}},{find:".Messages.NOTE}",replacement:{match:/(?<=return \i\?)null(?=:\(0,\i\.jsxs)/,replace:"$self.patchPadding(arguments[0])"}}],options:{hide:{type:3,description:"Hide notes",default:!1,restartNeeded:!0},noSpellCheck:{type:3,description:"Disable spellcheck in notes",disabled:()=>E.plugins.BetterNotesBox.hide,default:!1}},patchPadding(e){if(!!e.lastSection)return n("div",{className:GI.lastSection})}})});var zp,N1=g(()=>{"use strict";a();$();A();w();x();zp=y({name:"BetterRoleDot",authors:[m.Ven,m.AutumnVN],description:"Copy role colour on RoleDot (accessibility setting) click. Also allows using both RoleDot and coloured names simultaneously",patches:[{find:".dotBorderBase",replacement:{match:/,viewBox:"0 0 20 20"/,replace:"$&,onClick:()=>$self.copyToClipBoard(arguments[0].color),style:{cursor:'pointer'}"}},{find:'"dot"===',all:!0,noWarn:!0,predicate:()=>E.plugins.BetterRoleDot.bothStyles,replacement:{match:/"(?:username|dot)"===\i(?!\.\i)/g,replace:"true"}},{find:".ADD_ROLE_A11Y_LABEL",predicate:()=>E.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!E.plugins.BetterRoleDot.bothStyles,noWarn:!0,replacement:{match:/"dot"===\i/,replace:"true"}},{find:".roleVerifiedIcon",predicate:()=>E.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!E.plugins.BetterRoleDot.bothStyles,noWarn:!0,replacement:{match:/"dot"===\i/,replace:"true"}}],options:{bothStyles:{type:3,description:"Show both role dot and coloured names",restartNeeded:!0,default:!1},copyRoleColorInProfilePopout:{type:3,description:"Allow click on role dot in profile popout to copy role color",restartNeeded:!0,default:!1}},copyToClipBoard(e){$t.copy(e),oe.show({message:"Copied to Clipboard!",type:oe.Type.SUCCESS,id:oe.genId(),options:{duration:1e3,position:oe.Position.BOTTOM}})}})});var jp,C1=g(()=>{"use strict";a();A();w();jp=y({name:"BetterUploadButton",authors:[m.obscurity,m.Ven],description:"Upload with a single click, open menu with right click",patches:[{find:"Messages.CHAT_ATTACH_UPLOAD_OR_INVITE",replacement:{match:/CHAT_ATTACH_UPLOAD_OR_INVITE,onDoubleClick:(.+?:void 0),\.\.\.(\i),/,replace:"$&onClick:$1,onContextMenu:$2.onClick,"}}]})});var k1,R1,D1=g(()=>{"use strict";a();j();k1=Re("ApplicationStreamPreviewStore"),R1=Re("ApplicationStreamingStore")});var HI,_1,L1,E1,Wp,O1=g(()=>{"use strict";a();Rt();Lt();A();ct();w();x();D1();HI=async({guildId:e,channelId:t,ownerId:o})=>{let r=await k1.getPreviewURL(e,t,o);!r||Go(r)},_1=(e,{userId:t})=>()=>{let o=R1.getAnyStreamForUser(t);if(!o)return;let r=n(G.MenuItem,{label:"View Stream Preview",id:"view-stream-preview",icon:Sv,action:()=>o&&HI(o),disabled:!o});e.push(n(G.MenuSeparator,null),r)},L1=(e,{stream:t})=>_1(e,{userId:t.ownerId}),E1=(e,{user:t})=>{if(t)return _1(e,{userId:t.id})},Wp=y({name:"BiggerStreamPreview",description:"This plugin allows you to enlarge stream previews",authors:[m.phil],start:()=>{ue("user-context",E1),ue("stream-context",L1)},stop:()=>{fe("user-context",E1),fe("stream-context",L1)}})});function B1(){Os.textContent=`
.vc-nsfw-img [class^=imageWrapper] img,
.vc-nsfw-img [class^=wrapperPaused] video {
filter: blur(${E.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 Os,qp,F1=g(()=>{"use strict";a();$();A();w();qp=y({name:"BlurNSFW",description:"Blur attachments in NSFW channels until hovered",authors:[m.Ven],patches:[{find:".embedWrapper,embed",replacement:[{match:/\.embedWrapper(?=.+?channel_id:(\i)\.id)/g,replace:"$&+($1.nsfw?' vc-nsfw-img':'')"}]}],options:{blurAmount:{type:1,description:"Blur Amount",default:10,onChange:B1}},start(){Os=document.createElement("style"),Os.id="VcBlurNsfw",document.head.appendChild(Os),B1()},stop(){Os?.remove()}})});function zI(e){let t=E.plugins.CallTimer.format==="human",o=d=>t?d:d.toString().padStart(2,"0"),r=d=>t?d:"",i=t?" ":":",s=Math.floor(e/864e5),l=Math.floor(e%864e5/36e5),c=Math.floor(e%864e5%36e5/6e4),u=Math.floor(e%864e5%36e5%6e4/1e3),p="";return s&&(p+=`${s}d `),(l||p)&&(p+=`${o(l)}${r("h")}${i}`),(c||p||!t)&&(p+=`${o(c)}${r("m")}${i}`),p+=`${o(u)}${r("s")}`,p}var Kp,U1=g(()=>{"use strict";a();$();ae();A();ut();w();Kp=y({name:"CallTimer",description:"Adds a timer to vcs",authors:[m.Ven],startTime:0,interval:void 0,options:{format:{type:4,description:"The timer format. This can be any valid moment.js format",options:[{label:"30d 23:00:42",value:"stopwatch",default:!0},{label:"30d 23h 00m 42s",value:"human"}]}},patches:[{find:"renderConnectionStatus(){",replacement:{match:/(?<=renderConnectionStatus\(\)\{.+\.channel,children:)\i/,replace:"[$&, $self.renderTimer(this.props.channel.id)]"}}],renderTimer(e){return n(B,{noop:!0},n(this.Timer,{channelId:e}))},Timer({channelId:e}){let t=ls({deps:[e]});return n("p",{style:{margin:0}},"Connected for ",n("span",{style:{fontFamily:"var(--font-code)"}},zI(t)))}})});var ed={};ze(ed,{_handleClick:()=>qI,_handlePreEdit:()=>WI,_handlePreSend:()=>jI,addClickListener:()=>Qp,addPreEditListener:()=>Br,addPreSendListener:()=>Kt,removeClickListener:()=>Vp,removePreEditListener:()=>Fr,removePreSendListener:()=>Yt});async function jI(e,t,o,r){o.replyOptions=r;for(let i of Zp)try{let s=await i(e,t,o);if(s&&s.cancel===!0)return!0}catch(s){Yp.error(`MessageSendHandler: Listener encountered an unknown error
`,s)}return!1}async function WI(e,t,o){for(let r of Xp)try{await r(e,t,o)}catch(i){Yp.error(`MessageEditHandler: Listener encountered an unknown error
`,i)}}function Kt(e){return Zp.add(e),e}function Br(e){return Xp.add(e),e}function Yt(e){return Zp.delete(e)}function Fr(e){return Xp.delete(e)}function qI(e,t,o){e=ko.getMessage(t.id,e.id)??e;for(let r of Jp)try{r(e,t,o)}catch(i){Yp.error(`MessageClickHandler: Listener encountered an unknown error
`,i)}}function Qp(e){return Jp.add(e),e}function Vp(e){return Jp.delete(e)}var Yp,Zp,Xp,Jp,on=g(()=>{"use strict";a();Ve();x();Yp=new ie("MessageEvents","#e5c890"),Zp=new Set,Xp=new Set;Jp=new Set});var $1,G1=g(()=>{"use strict";a();$1=["action_object_map","action_type_map","action_ref_map","spm@*.aliexpress.com","scm@*.aliexpress.com","aff_platform","aff_trace_key","algo_expid@*.aliexpress.*","algo_pvid@*.aliexpress.*","btsid","ws_ab_test","pd_rd_*@amazon.*","_encoding@amazon.*","psc@amazon.*","tag@amazon.*","ref_@amazon.*","pf_rd_*@amazon.*","pf@amazon.*","crid@amazon.*","keywords@amazon.*","sprefix@amazon.*","sr@amazon.*","ie@amazon.*","node@amazon.*","qid@amazon.*","callback@bilibili.com","cvid@bing.com","form@bing.com","sk@bing.com","sp@bing.com","sc@bing.com","qs@bing.com","pq@bing.com","sc_cid","mkt_tok","trk","trkCampaign","ga_*","gclid","gclsrc","hmb_campaign","hmb_medium","hmb_source","spReportId","spJobID","spUserID","spMailingID","itm_*","s_cid","elqTrackId","elqTrack","assetType","assetId","recipientId","campaignId","siteId","mc_cid","mc_eid","pk_*","sc_campaign","sc_channel","sc_content","sc_medium","sc_outcome","sc_geo","sc_country","nr_email_referer","vero_conv","vero_id","yclid","_openstat","mbid","cmpid","cid","c_id","campaign_id","Campaign","hash@ebay.*","fb_action_ids","fb_action_types","fb_ref","fb_source","fbclid","refsrc@facebook.com","hrc@facebook.com","gs_l","gs_lcp@google.*","ved@google.*","ei@google.*","sei@google.*","gws_rd@google.*","gs_gbg@google.*","gs_mss@google.*","gs_rn@google.*","_hsenc","_hsmi","__hssc","__hstc","hsCtaTracking","source@sourceforge.net","position@sourceforge.net","t@*.twitter.com","s@*.twitter.com","ref_*@*.twitter.com","t@*.x.com","s@*.x.com","ref_*@*.x.com","t@*.fixupx.com","s@*.fixupx.com","ref_*@*.fixupx.com","t@*.fxtwitter.com","s@*.fxtwitter.com","ref_*@*.fxtwitter.com","t@*.twittpr.com","s@*.twittpr.com","ref_*@*.twittpr.com","t@*.fixvx.com","s@*.fixvx.com","ref_*@*.fixvx.com","tt_medium","tt_content","lr@yandex.*","redircnt@yandex.*","feature@youtube.com","kw@youtube.com","si@youtube.com","pp@youtube.com","si@youtu.be","wt_zmc","utm_source","utm_content","utm_medium","utm_campaign","utm_term","si@open.spotify.com","igshid","share_id@reddit.com"]});var H1,KI,td,z1=g(()=>{"use strict";a();on();A();w();G1();H1=/[\\^$.*+?()[\]{}|]/g,KI=RegExp(H1.source),td=y({name:"ClearURLs",description:"Removes tracking garbage from URLs",authors:[m.adryd],dependencies:["MessageEventsAPI"],escapeRegExp(e){return e&&KI.test(e)?e.replace(H1,"\\$&"):e||""},createRules(){let e=$1;this.universalRules=new Set,this.rulesByHost=new Map,this.hostRules=new Map;for(let t of e){let o=t.split("@"),r=new RegExp("^"+this.escapeRegExp(o[0]).replace(/\\\*/,".+?")+"$");if(!o[1]){this.universalRules.add(r);continue}let i=new RegExp("^(www\\.)?"+this.escapeRegExp(o[1]).replace(/\\\./,"\\.").replace(/^\\\*\\\./,"(.+?\\.)?").replace(/\\\*/,".+?")+"$"),s=i.toString();this.hostRules.set(s,i),this.rulesByHost.get(s)==null&&this.rulesByHost.set(s,new Set),this.rulesByHost.get(s).add(r)}},removeParam(e,t,o){(t===e||e instanceof RegExp&&e.test(t))&&o.delete(t)},replacer(e){try{var t=new URL(e)}catch{return e}return t.searchParams.entries().next().done?e:(this.universalRules.forEach(o=>{t.searchParams.forEach((r,i,s)=>{this.removeParam(o,i,s)})}),this.hostRules.forEach((o,r)=>{!o.test(t.hostname)||this.rulesByHost.get(r).forEach(i=>{t.searchParams.forEach((s,l,c)=>{this.removeParam(i,l,c)})})}),t.toString())},onSend(e){e.content.match(/http(s)?:\/\//)&&(e.content=e.content.replace(/(https?:\/\/[^\s<]+[^<.,:;"'>)|\]\s])/g,t=>this.replacer(t)))},start(){this.createRules(),this.preSend=Kt((e,t)=>this.onSend(t)),this.preEdit=Br((e,t,o)=>this.onSend(o))},stop(){Yt(this.preSend),Fr(this.preEdit)}})});var j1=g(()=>{});function q1(e){let t=e.toString(16).padStart(6,"0");Bs.store.color=t,K1(t)}function XI(){let e=VI(Bs.store.color)>45,t=Jn()===2;return n("div",{className:"client-theme-settings"},n("div",{className:"client-theme-container"},n("div",{className:"client-theme-settings-labels"},n(S.FormTitle,{tag:"h3"},"Theme Color"),n(S.FormText,null,"Add a color to your Discord client theme")),n(YI,{color:parseInt(Bs.store.color,16),onChange:q1,showEyeDropper:!1,suggestedColors:ZI})),e||t?n("div",null,n(S.FormDivider,{className:te(z.top8,z.bottom8)}),n(S.FormText,{className:"client-theme-warning"},"Your theme won't look good:"),e&&n(S.FormText,{className:"client-theme-warning"},"Selected color is very light"),t&&n(S.FormText,{className:"client-theme-warning"},"Light mode isn't supported")):null)}async function JI(){let e=document.querySelectorAll('link[rel="stylesheet"]'),t={};for(let i of e){let s=i.getAttribute("href");if(!s)continue;let c=await(await fetch(s)).text(),u=W1.exec(c);for(;u!==null;){let[,p,d]=u;t[p]=parseFloat(d),u=W1.exec(c)}}let o=Object.entries(t).map(([i,s])=>{let l=s-t["--primary-600-hsl"],c=l>=0?"+":"-";return`${i}: var(--theme-h) var(--theme-s) calc(var(--theme-l) ${c} ${Math.abs(l).toFixed(2)}%);`}).join(`
`),r=document.createElement("style");r.setAttribute("id","clientThemeOffsets"),r.textContent=`:root:root {
${o}
}`,document.head.appendChild(r)}function K1(e){let{hue:t,saturation:o,lightness:r}=QI(e),i=document.getElementById("clientThemeVars");i||(i=document.createElement("style"),i.setAttribute("id","clientThemeVars"),document.head.appendChild(i)),i.textContent=`:root {
--theme-h: ${t};
--theme-s: ${o}%;
--theme-l: ${r}%;
}`}function QI(e){let t=parseInt(e.substring(0,2),16)/255,o=parseInt(e.substring(2,4),16)/255,r=parseInt(e.substring(4,6),16)/255,i=Math.max(t,o,r),s=Math.min(t,o,r),l=i-s,c,u,p;return p=(i+s)/2,l===0?(c=0,u=0):(u=l/(1-Math.abs(2*p-1)),i===t?c=(o-r)/l%6:i===o?c=(r-t)/l+2:c=(t-o)/l+4,c*=60,c<0&&(c+=360)),u*=100,p*=100,{hue:c,saturation:u,lightness:p}}function VI(e){let t=parseInt(e.substring(0,2),16)/255,o=parseInt(e.substring(2,4),16)/255,r=parseInt(e.substring(4,6),16)/255,i=Math.max(t,o,r),s=Math.min(t,o,r);return 100*((i+s)/2)}var YI,ZI,Bs,od,W1,Y1=g(()=>{"use strict";a();j1();$();A();ct();it();Pe();w();j();x();YI=je(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR",".BACKGROUND_PRIMARY)"),ZI=["#1E1514","#172019","#13171B","#1C1C28","#402D2D","#3A483D","#344242","#313D4B","#2D2F47","#322B42","#3C2E42","#422938"];Bs=D({color:{description:"Color your Discord client theme will be based around. Light mode isn't supported",type:6,default:"313338",component:()=>n(XI,null)},resetColor:{description:"Reset Theme Color",type:6,default:"313338",component:()=>n(C,{onClick:()=>q1(3224376)},"Reset Theme Color")}}),od=y({name:"ClientTheme",authors:[m.F53,m.Nuckyz],description:"Recreation of the old client theme experiment. Add a color to your Discord client theme",settings:Bs,startAt:"DOMContentLoaded",start(){K1(Bs.store.color),JI()},stop(){document.getElementById("clientThemeVars")?.remove(),document.getElementById("clientThemeOffsets")?.remove()}}),W1=/(--primary-[5-9]\d{2}-hsl):.*?(\S*)%;/g});var nd,Z1=g(()=>{"use strict";a();A();w();nd=y({name:"ColorSighted",description:"Removes the colorblind-friendly icons from statuses, just like 2015-2017 Discord",authors:[m.lewisakura],patches:[{find:"Masks.STATUS_ONLINE",replacement:{match:/Masks\.STATUS_(?:IDLE|DND|STREAMING|OFFLINE)/g,replace:"Masks.STATUS_ONLINE"}},{find:".AVATAR_STATUS_MOBILE_16;",replacement:{match:/(?<=fromIsMobile:\i=!0,.+?)status:(\i)/,replace:'status_$:$1="online"'}}]})});var rd,X1=g(()=>{"use strict";a();A();jn();Jr();w();j();j();x();rd=y({name:"ConsoleShortcuts",description:"Adds shorter Aliases for many things on the window. Run `shortcutList` for a list.",authors:[m.Ven],getShortcuts(){function e(i){let s=new Map;return function(...l){let c=String(l);if(s.has(c))return s.get(c);let u=Sr(i(...l)),p=(()=>{switch(u.length){case 0:return null;case 1:return u[0];default:let d=[...new Set(u)];return d.length>1&&console.warn(`Warning: This filter matches ${u.length} modules. Make it more specific!
`,d),u[0]}})();return p&&c&&s.set(c,p),p}}let t,o=e(i=>i),r=e(Ae.byProps);return{...Vencord.Webpack.Common,wp:Vencord.Webpack,wpc:Qt.c,wreq:Qt,wpsearch:Yc,wpex:Na,wpexs:i=>Na(Ia(i)),find:o,findAll:Sr,findByProps:r,findAllByProps:(...i)=>Sr(Ae.byProps(...i)),findByCode:e(Ae.byCode),findAllByCode:i=>Sr(Ae.byCode(i)),findComponentByCode:e(Ae.componentByCode),findAllComponentsByCode:(...i)=>Sr(Ae.componentByCode(...i)),findExportedComponent:(...i)=>r(...i)[i[0]],findStore:e(Ae.byStoreName),PluginsApi:Vencord.Plugins,plugins:Vencord.Plugins.plugins,Settings:Vencord.Settings,Api:Vencord.Api,reload:()=>location.reload(),restart:go,canonicalizeMatch:ln,canonicalizeReplace:xa,canonicalizeReplacement:Zi,fakeRender:(i,s)=>{let l=t?.deref(),c=l?.closed===!1?l:window.open("about:blank","Fake Render","popup,width=500,height=500");t=new WeakRef(c),c.focus();let u=c.document;u.body.style.margin="1em",c.prepared||(c.prepared=!0,[...document.querySelectorAll("style"),...document.querySelectorAll("link[rel=stylesheet]")].forEach(p=>{let d=p.cloneNode(!0);p.parentElement?.tagName==="HEAD"?u.head.append(d):d.id?.startsWith("vencord-")||d.id?.startsWith("vcd-")?u.documentElement.append(d):u.body.append(d)})),Tr.render(_.createElement(i,s),u.body.appendChild(document.createElement("div")))}}},start(){let e=this.getShortcuts();window.shortcutList=e;for(let[t,o]of Object.entries(e))window[t]=o},stop(){delete window.shortcutList;for(let e in this.getShortcuts())delete window[e]}})});var J1,id,Q1=g(()=>{"use strict";a();Rt();Lt();A();w();x();J1=(e,{user:t})=>()=>{!t||e.push(n(G.MenuItem,{id:"vc-copy-user-url",label:"Copy User URL",action:()=>$t.copy(`<https://discord.com/users/${t.id}>`),icon:hi}))},id=y({name:"CopyUserURLs",authors:[m.castdrian],description:"Adds a 'Copy User URL' option to the user context menu.",start(){ue("user-context",J1)},stop(){fe("user-context",J1)}})});var nn,eA,V1,eS,tA,sd,ad,hl,ld,cd,tS=g(()=>{"use strict";a();$n();$();A();Ve();nt();w();Lr();j();x();nn=new ie("CrashHandler"),{ModalStack:eA,DraftManager:V1,DraftType:eS,closeExpressionPicker:tA}=No(()=>{let e=Xi(Ae.byProps("pushLazy","popAll"),Ae.byProps("clearDraft","saveDraft"),Ae.byProps("DraftType"),Ae.byProps("closeExpressionPicker","openExpressionPicker"));return{ModalStack:e[0],DraftManager:e[1],DraftType:e[2]?.DraftType,closeExpressionPicker:e[3]?.closeExpressionPicker}}),sd=D({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}}),ad=0,hl=0,ld=!1,cd=y({name:"CrashHandler",description:"Utility plugin for handling and possibly recovering from Crashes without a restart",authors:[m.Nuckyz],enabledByDefault:!0,settings:sd,patches:[{find:".Messages.ERRORS_UNEXPECTED_CRASH",replacement:{match:/(?=this\.setState\()/,replace:"$self.handleCrash(this)||"}}],handleCrash(e){if(Date.now()-hl<=1e3&&!ld)return!0;if(ld=!1,++ad>5){try{De({color:"#eed202",title:"Discord has crashed!",body:"Awn :( Discord has crashed more than five times, not attempting to recover.",noPersist:!0})}catch{}return hl=Date.now(),!1}setTimeout(()=>ad--,6e4);try{return ad===1&&Ts("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),sd.store.attemptToPreventCrashes?(this.handlePreventCrash(e),!0):!1}catch(t){return nn.error("Failed to handle crash",t),!1}finally{hl=Date.now()}},handlePreventCrash(e){if(Date.now()-hl>=1e3)try{De({color:"#eed202",title:"Discord has crashed!",body:"Attempting to recover...",noPersist:!0})}catch{}try{let t=be.getChannelId();V1.clearDraft(t,eS.ChannelMessage),V1.clearDraft(t,eS.FirstThreadMessage)}catch(t){nn.debug("Failed to clear drafts.",t)}try{tA()}catch(t){nn.debug("Failed to close expression picker.",t)}try{O.dispatch({type:"CONTEXT_MENU_CLOSE"})}catch(t){nn.debug("Failed to close open context menu.",t)}try{eA.popAll()}catch(t){nn.debug("Failed to close old modals.",t)}try{Qo()}catch(t){nn.debug("Failed to close all open modals.",t)}try{O.dispatch({type:"USER_PROFILE_MODAL_CLOSE"})}catch(t){nn.debug("Failed to close user popout.",t)}try{O.dispatch({type:"LAYER_POP_ALL"})}catch(t){nn.debug("Failed to pop all layers.",t)}if(sd.store.attemptToNavigateToHome)try{Do.transitionTo("/channels/@me")}catch(t){nn.debug("Failed to navigate to home",t)}try{ld=!0,e.forceUpdate()}catch(t){nn.debug("Failed to update crash handler component.",t)}}})});function yl(e){return Boolean(e)}function ud(e){return e!=null}var vl=g(()=>{"use strict";a()});async function oS(e){return/https?:\/\/(cdn|media)\.discordapp\.(com|net)\/attachments\//.test(e)?"mp:"+e.replace(/https?:\/\/(cdn|media)\.discordapp\.(com|net)\//,""):(await Pr.fetchAssetIds(Ur.store.appID,[e]))[0]}function Ot(){Sl(!0),E.plugins.CustomRPC.enabled&&Sl()}function iS(){return Ur.store.type!==1}function iA(e){return!iS()&&!/https?:\/\/(www\.)?(twitch\.tv|youtube\.com)\/\w+/.test(e)?"Streaming link must be a valid URL.":!0}function nS(){return Ur.store.timestampMode!==3}function rS(e){return/https?:\/\/(?!i\.)?imgur\.com\//.test(e)?"Imgur link must be a direct link to the image. (e.g. https://i.imgur.com/...)":/https?:\/\/(?!media\.)?tenor\.com\//.test(e)?"Tenor link must be a direct link to the image. (e.g. https://media.tenor.com/...)":!0}async function sS(){let{appID:e,appName:t,details:o,state:r,type:i,streamLink:s,startTime:l,endTime:c,imageBig:u,imageBigTooltip:p,imageSmall:d,imageSmallTooltip:h,buttonOneText:v,buttonOneURL:T,buttonTwoText:N,buttonTwoURL:b}=Ur.store;if(!t)return;let I={application_id:e||"0",name:t,state:r,details:o,type:i,flags:1<<0};switch(i===1&&(I.url=s),Ur.store.timestampMode){case 1:I.timestamps={start:Math.floor(Date.now()/1e3)};break;case 2:I.timestamps={start:Math.floor(Date.now()/1e3)-new Date().getHours()*3600-new Date().getMinutes()*60-new Date().getSeconds()};break;case 3:(l||c)&&(I.timestamps={},l&&(I.timestamps.start=l),c&&(I.timestamps.end=c));break;case 0:default:break}v&&(I.buttons=[v,N].filter(yl),I.metadata={button_urls:[T,b].filter(yl)}),u&&(I.assets={large_image:await oS(u),large_text:p||void 0}),d&&(I.assets={...I.assets,small_image:await oS(d),small_text:h||void 0});for(let k in I){if(k==="type")continue;let M=I[k];(!M||M.length===0)&&delete I[k]}return I}async function Sl(e){let t=await sS();O.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e?null:t,socketId:"CustomRPC"})}var oA,nA,rA,Ur,pd,aS=g(()=>{"use strict";a();$();xo();A();vl();ut();w();j();x();oA=je("onOpenGameProfile"),nA=P("activity","buttonColor"),rA=P("profileColors");Ur=D({appID:{type:0,description:"Application ID (required)",onChange:Ot,isValid:e=>e?e&&!/^\d+$/.test(e)?"Application ID must be a number.":!0:"Application ID is required."},appName:{type:0,description:"Application name (required)",onChange:Ot,isValid:e=>e?e.length>128?"Application name must be not longer than 128 characters.":!0:"Application name is required."},details:{type:0,description:"Details (line 1)",onChange:Ot,isValid:e=>e&&e.length>128?"Details (line 1) must be not longer than 128 characters.":!0},state:{type:0,description:"State (line 2)",onChange:Ot,isValid:e=>e&&e.length>128?"State (line 2) must be not longer than 128 characters.":!0},type:{type:4,description:"Activity type",onChange:Ot,options:[{label:"Playing",value:0,default:!0},{label:"Streaming",value:1},{label:"Listening",value:2},{label:"Watching",value:3},{label:"Competing",value:5}]},streamLink:{type:0,description:"Twitch.tv or Youtube.com link (only for Streaming activity type)",onChange:Ot,disabled:iS,isValid:iA},timestampMode:{type:4,description:"Timestamp mode",onChange:Ot,options:[{label:"None",value:0,default:!0},{label:"Since discord open",value:1},{label:"Same as your current time",value:2},{label:"Custom",value:3}]},startTime:{type:1,description:"Start timestamp (only for custom timestamp mode)",onChange:Ot,disabled:nS,isValid:e=>e&&e<0?"Start timestamp must be greater than 0.":!0},endTime:{type:1,description:"End timestamp (only for custom timestamp mode)",onChange:Ot,disabled:nS,isValid:e=>e&&e<0?"End timestamp must be greater than 0.":!0},imageBig:{type:0,description:"Big image key/link",onChange:Ot,isValid:rS},imageBigTooltip:{type:0,description:"Big image tooltip",onChange:Ot,isValid:e=>e&&e.length>128?"Big image tooltip must be not longer than 128 characters.":!0},imageSmall:{type:0,description:"Small image key/link",onChange:Ot,isValid:rS},imageSmallTooltip:{type:0,description:"Small image tooltip",onChange:Ot,isValid:e=>e&&e.length>128?"Small image tooltip must be not longer than 128 characters.":!0},buttonOneText:{type:0,description:"Button 1 text",onChange:Ot,isValid:e=>e&&e.length>31?"Button 1 text must be not longer than 31 characters.":!0},buttonOneURL:{type:0,description:"Button 1 URL",onChange:Ot},buttonTwoText:{type:0,description:"Button 2 text",onChange:Ot,isValid:e=>e&&e.length>31?"Button 2 text must be not longer than 31 characters.":!0},buttonTwoURL:{type:0,description:"Button 2 URL",onChange:Ot}});pd=y({name:"CustomRPC",description:"Allows you to set a custom rich presence.",authors:[m.captain,m.AutumnVN],start:Sl,stop:()=>Sl(!0),settings:Ur,settingsAboutComponent:()=>{let e=at(sS);return n(f,null,n(S.FormText,null,"Go to ",n(qe,{href:"https://discord.com/developers/applications"},"Discord Developer Portal")," to create an application and get the application ID."),n(S.FormText,null,"Upload images in the Rich Presence tab to get the image keys."),n(S.FormText,null,"If you want to use image link, download your image and reupload the image to ",n(qe,{href:"https://imgur.com"},"Imgur"),' and get the image link by right-clicking the image and select "Copy image address".'),n(S.FormDivider,null),n("div",{style:{width:"284px"},className:rA.profileColors},e[0]&&n(oA,{activity:e[0],className:nA.activity,channelId:be.getChannelId(),guild:de.getGuild(mo.getLastSelectedGuildId()),application:{id:Ur.store.appID},user:U.getCurrentUser()})))}})});var lS=g(()=>{});async function aA(){try{let{embed:e}=this.props;if(!e||e.dearrow||e.provider?.name!=="YouTube"||!e.video?.url)return;let t=sA.exec(e.video.url)?.[1];if(!t)return;let o=await fetch(`https://sponsor.ajay.app/api/branding?videoID=${t}`);if(!o.ok)return;let{titles:r,thumbnails:i}=await o.json(),s=r[0]?.votes>=0,l=i[0]?.votes>=0&&!i[0].original;if(!s&&!l)return;e.dearrow={enabled:!0},s&&(e.dearrow.oldTitle=e.rawTitle,e.rawTitle=r[0].title.replace(/ >(\S)/g," $1")),l&&(e.dearrow.oldThumb=e.thumbnail.proxyURL,e.thumbnail.proxyURL=`https://dearrow-thumb.ajay.app/api/v1/getThumbnail?videoID=${t}&time=${i[0].timestamp}`),this.forceUpdate()}catch(e){new ie("Dearrow").error("Failed to dearrow embed",e)}}function lA({component:e}){let{embed:t}=e.props;return t?.dearrow?n(ee,{text:t.dearrow.enabled?"This embed has been dearrowed, click to restore":"Click to dearrow"},({onMouseEnter:o,onMouseLeave:r})=>n("button",{onMouseEnter:o,onMouseLeave:r,className:"vc-dearrow-toggle-"+(t.dearrow.enabled?"on":"off"),onClick:()=>{let{enabled:i,oldThumb:s,oldTitle:l}=t.dearrow;t.dearrow.enabled=!i,l&&(t.dearrow.oldTitle=t.rawTitle,t.rawTitle=l),s&&(t.dearrow.oldThumb=t.thumbnail.proxyURL,t.thumbnail.proxyURL=s),e.forceUpdate()}},n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24px",height:"24px",viewBox:"0 0 36 36","aria-label":"Toggle Dearrow"},n("path",{fill:"#1213BD",d:"M36 18.302c0 4.981-2.46 9.198-5.655 12.462s-7.323 5.152-12.199 5.152s-9.764-1.112-12.959-4.376S0 23.283 0 18.302s2.574-9.38 5.769-12.644S13.271 0 18.146 0s9.394 2.178 12.589 5.442C33.931 8.706 36 13.322 36 18.302z"}),n("path",{fill:"#88c9f9",d:"m 30.394282,18.410186 c 0,3.468849 -1.143025,6.865475 -3.416513,9.137917 -2.273489,2.272442 -5.670115,2.92874 -9.137918,2.92874 -3.467803,0 -6.373515,-1.147212 -8.6470033,-3.419654 -2.2734888,-2.272442 -3.5871299,-5.178154 -3.5871299,-8.647003 0,-3.46885 0.9420533,-6.746149 3.2144954,-9.0196379 2.2724418,-2.2734888 5.5507878,-3.9513905 9.0196378,-3.9513905 3.46885,0 6.492841,1.9322561 8.76633,4.204698 2.273489,2.2724424 3.788101,5.2974804 3.788101,8.7663304 z"}),n("path",{fill:"#0a62a5",d:"m 23.95823,17.818306 c 0,3.153748 -2.644888,5.808102 -5.798635,5.808102 -3.153748,0 -5.599825,-2.654354 -5.599825,-5.808102 0,-3.153747 2.446077,-5.721714 5.599825,-5.721714 3.153747,0 5.798635,2.567967 5.798635,5.721714 z"})))):null}var sA,dd,cS=g(()=>{"use strict";a();lS();ae();A();Ve();w();x();sA=/https:\/\/www\.youtube\.com\/embed\/([a-zA-Z0-9_-]{11})/;dd=y({name:"Dearrow",description:"Makes YouTube embed titles and thumbnails less sensationalist, powered by Dearrow",authors:[m.Ven],embedDidMount:aA,renderButton(e){return n(B,{noop:!0},n(lA,{component:e}))},patches:[{find:"this.renderInlineMediaEmbed",replacement:[{match:/render\(\)\{.{0,30}let\{embed:/,replace:"componentDidMount=$self.embedDidMount;$&"},{match:/children:\[(?=null!=\i\?\i\.renderSuppressButton)/,replace:"children:[$self.renderButton(this),"}]}]})});var uS=g(()=>{});var cA,Qn,pS,dS,mS,$r,bl,Mi,Fs,md,Vn=g(()=>{"use strict";a();cA="https://decor.fieryflames.dev",Qn=cA+"/api",pS=Qn+"/authorize",dS="https://ugc.decor.fieryflames.dev",mS="1096966363416899624",$r="100101099111114",bl="11497119",Mi="1096357702931841148",Fs="dXp2SdxDcP",md=1e3*60*60*4});var uA,er,Us=g(()=>{"use strict";a();Ti();qo();Ve();nt();x();Vn();uA={async getItem(e){return wt.get(e).then(t=>t??null)},async setItem(e,t){await wt.set(e,t)},async removeItem(e){await wt.del(e)}},er=Ft(()=>Ir(eu((e,t)=>({token:null,tokens:{},init:()=>{e({token:t().tokens[U.getCurrentUser().id]??null})},setToken:o=>e({token:o,tokens:{...t().tokens,[U.getCurrentUser().id]:o}}),remove:o=>{let{tokens:r,init:i}=t(),s={...r};delete s[o],e({tokens:s}),i()},async authorize(){return new Promise((o,r)=>we(i=>n(es,{...i,scopes:["identify"],responseType:"code",redirectUri:pS,permissions:0n,clientId:mS,cancelCompletesFlow:!1,callback:async s=>{try{let l=new URL(s.location);l.searchParams.append("client","vencord");let c=await fetch(l);if(c?.ok){let u=await c.text();t().setToken(u)}else throw new Error("Request not OK");o(void 0)}catch(l){l instanceof Error&&(oo(`Failed to authorize: ${l.message}`,oe.Type.FAILURE),new ie("Decor").error("Failed to authorize",l),r(l))}}}),{onCloseCallback(){r(new Error("Authorization cancelled"))}}))},isAuthorized:()=>!!t().token}),{name:"decor-auth",getStorage:()=>uA,partialize:e=>({tokens:e.tokens}),onRehydrateStorage:()=>e=>e?.init()})))});async function Tl(e,t){let o=await fetch(e,{...t,headers:{...t?.headers,Authorization:`Bearer ${er.getState().token}`}});if(o.ok)return o;throw new Error(await o.text())}var fS,gS,hS,fd,yS,vS,xl=g(()=>{"use strict";a();Vn();Us();fS=async e=>{if(e?.length===0)return{};let t=new URL(Qn+"/users");return e&&e.length!==0&&t.searchParams.set("ids",JSON.stringify(e)),await fetch(t).then(o=>o.json())},gS=async(e="@me")=>Tl(Qn+`/users/${e}/decorations`).then(t=>t.json()),hS=async(e="@me")=>Tl(Qn+`/users/${e}/decoration`).then(t=>t.json()),fd=async(e,t="@me")=>{let o=new FormData;return e?"hash"in e?o.append("hash",e.hash):"file"in e&&(o.append("image",e.file),o.append("alt",e.alt??"null")):o.append("hash","null"),Tl(Qn+`/users/${t}/decoration`,{method:"PUT",body:o}).then(r=>e&&"file"in e?r.json():r.text())},yS=async e=>{await Tl(Qn+`/decorations/${e}`,{method:"DELETE"})},vS=async()=>fetch(Qn+"/decorations/presets").then(e=>e.json())});function gd(e){return`${e.animated?"a_":""}${e.hash}`}function wl(e){return{asset:gd(e),skuId:$r}}var Ml=g(()=>{"use strict";a();Vn()});function SS(e){let[t,o]=Y(e?xn.getState().getAsset(e.id)??null:null);return pe(()=>{let r=xn.subscribe(i=>{if(!e)return;let s=i.getAsset(e.id);!s||t!==s&&o(s)});if(e){let{fetch:i}=xn.getState();i(e.id)}return r},[]),t?{asset:t,skuId:$r}:null}var xn,hd=g(()=>{"use strict";a();Nr();qo();x();xl();Vn();xn=Ft(()=>Ir((e,t)=>({usersDecorations:new Map,fetchQueue:new Set,bulkFetch:ro(async()=>{let{fetchQueue:o,usersDecorations:r}=t();if(o.size===0)return;e({fetchQueue:new Set});let i=Array.from(o),s=await fS(i),l=new Map(r),c=new Date;for(let u of i){let p=s[u]??null;l.set(u,{asset:p,fetchedAt:c})}e({usersDecorations:l})}),async fetch(o,r=!1){let{usersDecorations:i,fetchQueue:s,bulkFetch:l}=t(),{fetchedAt:c}=i.get(o)??{};c&&!r&&Date.now()-c.getTime()<md||(e({fetchQueue:new Set(s).add(o)}),l())},async fetchMany(o){if(!o.length)return;let{usersDecorations:r,fetchQueue:i,bulkFetch:s}=t(),l=new Set(i),c=Date.now();for(let u of o){let{fetchedAt:p}=r.get(u)??{};p&&c-p.getTime()<md||l.add(u)}e({fetchQueue:l}),s()},get(o){return t().usersDecorations.get(o)},getAsset(o){return t().usersDecorations.get(o)?.asset},has(o){return t().usersDecorations.has(o)},set(o,r){let{usersDecorations:i}=t(),s=new Map(i);s.set(o,{asset:r,fetchedAt:new Date}),e({usersDecorations:s})}})))});var rn,Pi=g(()=>{"use strict";a();qo();x();xl();Ml();hd();rn=Ft(()=>Ir((e,t)=>({decorations:[],selectedDecoration:null,async fetch(){let o=await gS(),r=await hS();e({decorations:o,selectedDecoration:r})},async create(o){let r=await fd(o);e({decorations:[...t().decorations,r]})},async delete(o){let r=typeof o=="object"?o.hash:o;await yS(r);let{selectedDecoration:i,decorations:s}=t(),l={decorations:s.filter(c=>c.hash!==r),selectedDecoration:i?.hash===r?null:i};e(l)},async select(o){t().selectedDecoration!==o&&(e({selectedDecoration:o}),fd(o),xn.getState().set(U.getCurrentUser().id,o?gd(o):null))},clear:()=>e({decorations:[],selectedDecoration:null})})))});var Ce,Ii,Ai,bS,tr=g(()=>{"use strict";a();rt();j();Ce=Fe("vc-decor-"),Ii=P("modalFooterShopButton"),Ai=Aa(["openAvatarDecorationModal:"]),bS=Aa(["stickerInspected]:"])});var $s,TS,Pl,yd,xS,Gr=g(()=>{"use strict";a();j();x();TS=e=>$s=e,Pl=Wc(()=>{let e=qc(".shopPreviewBanner");return _.memo(e)}),xS=e=>yd=e});function vd(e){return n($s,{...e,isSelected:!1},n(xv,null),n(J,{variant:"text-xs/normal",color:"header-primary"},et.Messages.CREATE))}var wS=g(()=>{"use strict";a();Lt();x();Gr()});function Sd(e){return n($s,{...e},n(wv,null),n(J,{variant:"text-xs/normal",color:"header-primary"},et.Messages.NONE))}var MS=g(()=>{"use strict";a();Lt();x();Gr()});function bd({decoration:e}){let{delete:t}=rn();return n(G.Menu,{navId:Ce("decoration-context-menu"),onClose:Ut.closeContextMenu,"aria-label":"Decoration Options"},n(G.MenuItem,{id:Ce("decoration-context-menu-copy-hash"),label:"Copy Decoration Hash",icon:rl,action:()=>$t.copy(e.hash)}),e.authorId===U.getCurrentUser().id&&n(G.MenuItem,{id:Ce("decoration-context-menu-delete"),label:"Delete Decoration",color:"danger",icon:ll,action:()=>_t.show({title:"Delete Decoration",body:`Are you sure you want to delete ${e.alt}?`,confirmText:"Delete",confirmColor:Ce("danger-btn"),cancelText:"Cancel",onConfirm(){t(e)}})}))}var PS=g(()=>{"use strict";a();Lt();x();Pi();tr()});function Td(e){let{decoration:t}=e;return n(yd,{...e,onContextMenu:o=>{Ut.openContextMenu(o,()=>n(bd,{decoration:t}))},avatarDecoration:wl(t)})}var IS=g(()=>{"use strict";a();x();Ml();Gr();PS()});function xd({renderItem:e,getItemKey:t,itemKeyPrefix:o,items:r}){return n("div",{className:Ce("sectioned-grid-list-grid")},r.map(i=>n(_.Fragment,{key:`${o?`${o}-`:""}${t(i)}`},e(i))))}var AS=g(()=>{"use strict";a();x();tr()});function wd(e){return n("div",{className:te(Ce("sectioned-grid-list-container"),pA.thin)},e.sections.map(t=>n("div",{key:e.getSectionKey(t),className:Ce("sectioned-grid-list-section")},e.renderSectionHeader(t),n(xd,{renderItem:e.renderItem,getItemKey:e.getItemKey,itemKeyPrefix:e.getSectionKey(t),items:t.items}))))}var pA,NS=g(()=>{"use strict";a();Pe();j();tr();AS();pA=P("managedReactiveScroller")});function gA(e){let[t,o]=Y(null);return pe(()=>{if(!e)return;let r=URL.createObjectURL(e);return o(r),()=>{URL.revokeObjectURL(r),o(null)}},[e]),t}function hA(e){let[t,o]=Y(""),[r,i]=Y(null),[s,l]=Y(!1),[c,u]=Y(null);pe(()=>{c&&u(null)},[r]);let{create:p}=rn(),d=gA(r),h=bt(()=>d?{asset:d,skuId:bl}:null,[d]);return n(Ne,{...e,size:"medium",className:Ii.modal},n(Xe,{separator:!1,className:Ce("modal-header")},n(J,{color:"header-primary",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Create Decoration"),n(Tt,{onClick:e.onClose})),n(We,{className:Ce("create-decoration-modal-content"),scrollbarType:"none"},n(B,null,n(mA,{messageType:fA.WARNING},"Make sure your decoration does not violate ",n(qe,{href:"https://github.com/decor-discord/.github/blob/main/GUIDELINES.md"},"the guidelines")," before submitting it."),n("div",{className:Ce("create-decoration-modal-form-preview-container")},n("div",{className:Ce("create-decoration-modal-form")},c!==null&&n(J,{color:"text-danger",variant:"text-xs/normal"},c.message),n(S.FormSection,{title:"File"},n(dA,{filename:r?.name,placeholder:"Choose a file",buttonText:"Browse",filters:[{name:"Decoration file",extensions:["png","apng"]}],onFileSelect:i}),n(S.FormText,{type:"description",className:z.top8},"File should be APNG or PNG.")),n(S.FormSection,{title:"Name"},n(ot,{placeholder:"Companion Cube",value:t,onChange:o}),n(S.FormText,{type:"description",className:z.top8},"This name will be used when referring to this decoration."))),n("div",null,n(Pl,{avatarDecorationOverride:h,user:U.getCurrentUser()}))),n(S.FormText,{type:"description",className:z.bottom16},n("br",null),"You can receive updates on your decoration's review by joining ",n(qe,{href:`https://discord.gg/${Fs}`,onClick:async v=>{v.preventDefault(),de.getGuild(Mi)?(Qo(),O.dispatch({type:"LAYER_POP_ALL"}),Do.transitionToGuild(Mi)):await _r(Fs)&&(Qo(),O.dispatch({type:"LAYER_POP_ALL"}))}},"Decor's Discord server"),"."))),n(pt,{className:Ce("modal-footer")},n(C,{onClick:()=>{l(!0),p({alt:t,file:r}).then(e.onClose).catch(v=>{l(!1),u(v)})},disabled:!r||!t,submitting:s},"Submit for Review"),n(C,{onClick:e.onClose,color:C.Colors.PRIMARY,look:C.Looks.LINK},"Cancel")))}var dA,mA,fA,Il,Md=g(()=>{"use strict";a();ae();xo();ct();it();nt();j();x();Vn();Pi();tr();Gr();dA=je("fileUploadInput,"),{default:mA,HelpMessageTypes:fA}=P("HelpMessageTypes");Il=()=>Promise.all([Ai(),bS()]).then(()=>we(e=>n(hA,{...e})))});function yA(e){return n(Ne,{...e,size:"small",className:Ii.modal},n(Xe,{separator:!1,className:Ce("modal-header")},n(J,{color:"header-primary",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Hold on"),n(Tt,{onClick:e.onClose})),n(We,{scrollbarType:"none"},n(S.FormText,null,"By submitting a decoration, you agree to ",n(qe,{href:"https://github.com/decor-discord/.github/blob/main/GUIDELINES.md"},"the guidelines"),". Not reading these guidelines may get your account suspended from creating more decorations in the future.")),n(pt,{className:Ce("modal-footer")},n(C,{onClick:()=>{Ni.store.agreedToGuidelines=!0,e.onClose(),Il()}},"Continue"),n(C,{onClick:e.onClose,color:C.Colors.PRIMARY,look:C.Looks.LINK},"Go Back")))}var CS,kS=g(()=>{"use strict";a();xo();nt();x();Al();tr();Md();CS=()=>Ai().then(()=>we(e=>n(yA,{...e})))});function SA(){let[e,t]=Y([]);return pe(()=>{vS().then(t)},[]),e}function bA({section:e}){let t=typeof e.subtitle<"u",o=typeof e.authorIds<"u",[r,i]=Y([]);return pe(()=>{(async()=>{if(!!e.authorIds)for(let s of e.authorIds){let l=U.getUser(s)??await Ct.getUser(s);i(c=>[...c,l])}})()},[e.authorIds]),n("div",null,n(ce,null,n(S.FormTitle,{style:{flexGrow:1}},e.title),o&&n(vA,{users:r,guildId:void 0,renderIcon:!1,max:5,showDefaultAvatarsForNullUsers:!0,size:16,showUserPopout:!0,className:z.bottom8})),t&&n(S.FormText,{type:"description",className:z.bottom8},e.subtitle))}function TA(e){let[t,o]=Y(void 0),r=typeof t<"u",i=t!=null?wl(t):t,{decorations:s,selectedDecoration:l,fetch:c,select:u}=rn();pe(()=>{c()},[]);let p=r?t:l,d=typeof p?.authorId<"u",h=s.some(M=>M.reviewed===!1),v=SA(),T=v.flatMap(M=>M.decorations),N=v.find(M=>M.id===p?.presetId),b=typeof N<"u",k=[{title:"Your Decorations",subtitle:"You can delete your own decorations by right clicking on them.",sectionKey:"ownDecorations",items:["none",...s.filter(M=>!T.some(F=>F.hash===M.hash)),"create"]},...v.map(M=>({title:M.name,subtitle:M.description||void 0,sectionKey:`preset-${M.id}`,items:M.decorations,authorIds:M.authorIds}))];return n(Ne,{...e,size:"dynamic",className:Ii.modal},n(Xe,{separator:!1,className:Ce("modal-header")},n(J,{color:"header-primary",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Change Decoration"),n(Tt,{onClick:e.onClose})),n(We,{className:Ce("change-decoration-modal-content"),scrollbarType:"none"},n(B,null,n(wd,{renderItem:M=>{if(typeof M=="string")switch(M){case"none":return n(Sd,{className:Ce("change-decoration-modal-decoration"),isSelected:p===null,onSelect:()=>o(null)});case"create":return n(ee,{text:"You already have a decoration pending review",shouldShow:h},F=>n(vd,{className:Ce("change-decoration-modal-decoration"),...F,onSelect:h?()=>{}:Ni.store.agreedToGuidelines?Il:CS}))}else return n(ee,{text:"Pending review",shouldShow:M.reviewed===!1},F=>n(Td,{...F,className:Ce("change-decoration-modal-decoration"),onSelect:M.reviewed!==!1?()=>o(M):()=>{},isSelected:p?.hash===M.hash,decoration:M}))},getItemKey:M=>typeof M=="string"?M:M.hash,getSectionKey:M=>M.sectionKey,renderSectionHeader:M=>n(bA,{section:M}),sections:k}),n("div",{className:Ce("change-decoration-modal-preview")},n(Pl,{avatarDecorationOverride:i,user:U.getCurrentUser()}),b&&n(S.FormTitle,{className:""},"Part of the ",N.name," Preset"),typeof p=="object"&&n(J,{variant:"text-sm/semibold",color:"header-primary"},p?.alt),d&&n(J,{key:`createdBy-${p.authorId}`},"Created by ",Be.parse(`<@${p.authorId}>`))))),n(pt,{className:te(Ce("change-decoration-modal-footer",Ce("modal-footer")))},n("div",{className:Ce("change-decoration-modal-footer-btn-container")},n(C,{onClick:()=>{u(t).then(e.onClose)},disabled:!r},"Apply"),n(C,{onClick:e.onClose,color:C.Colors.PRIMARY,look:C.Looks.LINK},"Cancel")),n("div",{className:Ce("change-decoration-modal-footer-btn-container")},n(C,{onClick:()=>_t.show({title:"Log Out",body:"Are you sure you want to log out of Decor?",confirmText:"Log Out",confirmColor:Ce("danger-btn"),cancelText:"Cancel",onConfirm(){er.getState().remove(U.getCurrentUser().id),e.onClose()}}),color:C.Colors.PRIMARY,look:C.Looks.LINK},"Log Out"),n(ee,{text:"Join Decor's Discord Server for notifications on your decoration's review, and when new presets are released"},M=>n(C,{...M,onClick:async()=>{de.getGuild(Mi)?(e.onClose(),O.dispatch({type:"LAYER_POP_ALL"}),Do.transitionToGuild(Mi)):await _r(Fs)&&(Qo(),O.dispatch({type:"LAYER_POP_ALL"}))},color:C.Colors.PRIMARY,look:C.Looks.LINK},"Discord Server")))))}var vA,Pd,RS=g(()=>{"use strict";a();ae();kt();ct();it();Pe();nt();j();x();xl();Vn();Us();Pi();Ml();Al();tr();Gr();wS();MS();IS();NS();Md();kS();vA=je("defaultRenderUser","showDefaultAvatarsForNullUsers");Pd=()=>Ai().then(()=>we(e=>n(TA,{...e})))});function Gs({hideTitle:e=!1,hideDivider:t=!1,noMargin:o=!1}){let r=er(),{selectedDecoration:i,select:s,fetch:l}=rn();return pe(()=>{r.isAuthorized()&&l()},[r.token]),n(xA,{title:!e&&"Decor",hasBackground:!0,hideDivider:t,className:o&&Ce("section-remove-margin")},n(ce,null,n(C,{onClick:()=>{r.isAuthorized()?Pd():r.authorize().then(Pd).catch(()=>{})},size:C.Sizes.SMALL},"Change Decoration"),i&&r.isAuthorized()&&n(C,{onClick:()=>s(null),color:C.Colors.PRIMARY,size:C.Sizes.SMALL,look:C.Looks.LINK},"Remove Decoration")))}var xA,Id=g(()=>{"use strict";a();kt();j();x();Us();Pi();tr();RS();xA=un(".customizationSectionBackground")});var Ni,Al=g(()=>{"use strict";a();$();xo();it();Pe();nt();w();x();Id();Ni=D({changeDecoration:{type:6,description:"Change your avatar decoration",component(){return Vencord.Plugins.plugins.Decor.started?n("div",null,n(Gs,{hideTitle:!0,hideDivider:!0,noMargin:!0}),n(S.FormText,{type:"description",className:te(z.top8,z.bottom8)},"You can also access Decor decorations from the ",n(qe,{href:"/settings/profile-customization",onClick:e=>{e.preventDefault(),Qo(),O.dispatch({type:"USER_SETTINGS_MODAL_SET_SECTION",section:"Profile Customization"})}},"Profiles")," page.")):n(S.FormText,null,"Enable Decor and restart your client to change your avatar decoration.")}},agreedToGuidelines:{type:3,description:"Agreed to guidelines",hidden:!0,default:!1}})});var wA,Ad,DS=g(()=>{"use strict";a();uS();ae();A();w();j();x();Vn();Us();Pi();hd();Al();Gr();Id();({isAnimatedAvatarDecoration:wA}=P("isAnimatedAvatarDecoration")),Ad=y({name:"Decor",description:"Create and use your own custom avatar decorations, or pick your favorite from the presets.",authors:[m.FieryFlames],patches:[{find:"getAvatarDecorationURL:",replacement:{match:/(?<=function \i\(\i\){)(?=let{avatarDecoration)/,replace:"const vcDecorDecoration=$self.getDecorAvatarDecorationURL(arguments[0]);if(vcDecorDecoration)return vcDecorDecoration;"}},{find:"DefaultCustomizationSections",replacement:{match:/(?<={user:\i},"decoration"\),)/,replace:"$self.DecorSection(),"}},{find:".decorationGridItem",replacement:[{match:/(?<==)\i=>{let{children.{20,100}decorationGridItem/,replace:"$self.DecorationGridItem=$&"},{match:/(?<==)\i=>{let{user:\i,avatarDecoration.{300,600}decorationGridItemChurned/,replace:"$self.DecorationGridDecoration=$&"},{match:/(?<=\.Section\.PREMIUM_PURCHASE&&\i;if\()(?<=avatarDecoration:(\i).+?)/,replace:"$1.skuId===$self.SKU_ID||"}]},{find:"isAvatarDecorationAnimating:",group:!0,replacement:[{match:/(?<=TryItOut:\i}\),)(?<=user:(\i).+?)/,replace:"vcDecorAvatarDecoration=$self.useUserDecorAvatarDecoration($1),"},{match:/(?<={avatarDecoration:).{1,20}?(?=,)(?<=avatarDecorationOverride:(\i).+?)/,replace:"$1??vcDecorAvatarDecoration??($&)"},{match:/(?<=size:\i}\),\[)/,replace:"vcDecorAvatarDecoration,"}]},{find:"renderAvatarWithPopout(){",replacement:[{match:/(?<=getAvatarDecorationURL\)\({avatarDecoration:)(\i).avatarDecoration(?=,)/,replace:"$self.useUserDecorAvatarDecoration($1)??$&"}]}],settings:Ni,flux:{CONNECTION_OPEN:()=>{er.getState().init(),rn.getState().clear(),xn.getState().fetch(U.getCurrentUser().id,!0)},USER_PROFILE_MODAL_OPEN:e=>{xn.getState().fetch(e.userId,!0)}},set DecorationGridItem(e){TS(e)},set DecorationGridDecoration(e){xS(e)},SKU_ID:$r,useUserDecorAvatarDecoration:SS,async start(){xn.getState().fetch(U.getCurrentUser().id,!0)},getDecorAvatarDecorationURL({avatarDecoration:e,canAnimate:t}){if(e?.skuId===$r){let o=new URL(`${dS}/${e.asset}.png`);return o.searchParams.set("animate",(!!t&&wA(e.asset)).toString()),o.toString()}else if(e?.skuId===bl)return e.asset},DecorSection:B.wrap(Gs)})});var Nd,LS=g(()=>{"use strict";a();A();w();Nd=y({name:"DisableDMCallIdle",description:"Disables automatically getting kicked from a DM voice call after 3 minutes.",authors:[m.Nuckyz],patches:[{find:".Messages.BOT_CALL_IDLE_DISCONNECT",replacement:{match:/(?<=function \i\(\){)(?=.{1,120}\.Messages\.BOT_CALL_IDLE_DISCONNECT)/,replace:"return;"}}]})});function Cd(e){return e.t==="Emoji"?`${location.protocol}//${window.GLOBAL_ENV.CDN_HOST}/emojis/${e.id}.${e.isAnimated?"gif":"png"}`:`${location.origin}/stickers/${e.id}.${IA[e.format_type]}`}async function OS(e){let t=MA.getStickerById(e);if(t)return t;let{body:o}=await Nt.get({url:`/stickers/${e}`});return O.dispatch({type:"STICKER_FETCH_SUCCESS",sticker:o}),o}async function AA(e,t){let o=new FormData;o.append("name",t.name),o.append("tags",t.tags),o.append("description",t.description),o.append("file",await BS(Cd(t)));let{body:r}=await Nt.post({url:`/guilds/${e}/stickers`,body:o});O.dispatch({type:"GUILD_STICKERS_CREATE_SUCCESS",guildId:e,sticker:{...r,user:U.getCurrentUser()}})}async function NA(e,t){let o=await BS(Cd(t)),r=await new Promise(i=>{let s=new FileReader;s.onload=()=>i(s.result),s.readAsDataURL(o)});return PA.uploadEmoji({guildId:e,name:t.name.split("~")[0],image:r})}function CA(e){let t=U.getCurrentUser().id;return Object.values(de.getGuilds()).filter(o=>{if(!(o.ownerId===t||(_e.getGuildPermissions({id:o.id})&xe.CREATE_GUILD_EXPRESSIONS)===xe.CREATE_GUILD_EXPRESSIONS))return!1;if(e.t==="Sticker")return!0;let{isAnimated:i}=e,s=o.getMaxEmojiSlots(),{emojis:l}=Ro.getGuilds()[o.id],c=0;for(let u of l)u.animated===i&&c++;return c<s}).sort((o,r)=>o.name.localeCompare(r.name))}async function BS(e){let t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch ${e} - ${t.status}`);return t.blob()}async function kA(e,t){try{t.t==="Sticker"?await AA(e,t):await NA(e,t),oe.show({message:`Successfully cloned ${t.name} to ${de.getGuild(e)?.name??"your server"}!`,type:oe.Type.SUCCESS,id:oe.genId()})}catch(o){let r="Something went wrong (check console!)";try{r=JSON.parse(o.text).message}catch{}new ie("EmoteCloner").error("Failed to clone",t.name,"to",e,o),oe.show({message:"Failed to clone: "+r,type:oe.Type.FAILURE,id:oe.genId()})}}function LA({data:e}){let[t,o]=_.useState(!1),[r,i]=_.useState(e.name),[s,l]=_.useReducer(u=>u+1,0),c=_.useMemo(()=>CA(e),[e.id,s]);return n(f,null,n(S.FormTitle,{className:z.top20},"Custom Name"),n(gl,{value:r,onChange:u=>{e.name=u,i(u)},validate:u=>e.t==="Emoji"&&u.length>2&&u.length<32&&DA.test(u)||e.t==="Sticker"&&u.length>2&&u.length<30||"Name must be between 2 and 32 characters and only contain alphanumeric characters"}),n("div",{style:{display:"flex",flexWrap:"wrap",gap:"1em",padding:"1em 0.5em",justifyContent:"center",alignItems:"center"}},c.map(u=>n(ee,{text:u.name},({onMouseLeave:p,onMouseEnter:d})=>n("div",{onMouseLeave:p,onMouseEnter:d,role:"button","aria-label":"Clone to "+u.name,"aria-disabled":t,style:{borderRadius:"50%",backgroundColor:"var(--background-secondary)",display:"inline-flex",justifyContent:"center",alignItems:"center",width:"4em",height:"4em",cursor:t?"not-allowed":"pointer",filter:t?"brightness(50%)":"none"},onClick:t?void 0:async()=>{o(!0),kA(u.id,e).finally(()=>{l(),o(!1)})}},u.icon?n("img",{"aria-hidden":!0,style:{borderRadius:"50%",width:"100%",height:"100%"},src:u.getIconURL(512,!0),alt:u.name}):n(S.FormText,{style:{fontSize:RA(u.acronym),width:"100%",overflow:"hidden",whiteSpace:"nowrap",textAlign:"center",cursor:t?"not-allowed":"pointer"}},u.acronym))))))}function Nl(e,t){return n(G.MenuItem,{id:"emote-cloner",key:"emote-cloner",label:`Clone ${e}`,action:()=>us(async()=>{let o=await t(),r={t:e,...o},i=Cd(r);return s=>n(Ne,{...s},n(Xe,null,n("img",{role:"presentation","aria-hidden":!0,src:i,alt:"",height:24,width:24,style:{marginRight:"0.5em"}}),n(S.FormText,null,"Clone ",r.name)),n(We,null,n(LA,{data:r})))})})}function FS(e){return new URL(e).pathname.endsWith(".gif")}var MA,PA,IA,RA,DA,ES,_S,kd,US=g(()=>{"use strict";a();Rt();Cp();A();Ve();it();nt();w();j();x();MA=Re("StickersStore"),PA=P("fetchEmoji","uploadEmoji","deleteEmoji"),IA=[,"png","png","json","gif"];RA=e=>[20,20,18,18,16,14,12][e.length]??4,DA=/^\w+$/i;ES=(e,t)=>()=>{let{favoriteableId:o,itemHref:r,itemSrc:i,favoriteableType:s}=t??{};if(!o)return;let l=(()=>{switch(s){case"emoji":let c=t.message.content.match(RegExp(`<a?:(\\w+)(?:~\\d+)?:${o}>|https://cdn\\.discordapp\\.com/emojis/${o}\\.`));if(!c)return;let u=c[1]??"FakeNitroEmoji";return Nl("Emoji",()=>({id:o,name:u,isAnimated:FS(r??i)}));case"sticker":return t.message.stickerItems.find(d=>d.id===o)?.format_type===3?void 0:Nl("Sticker",()=>OS(o))}})();l&&dt("copy-link",e)?.push(l)},_S=(e,t)=>()=>{let{id:o,name:r,type:i}=t?.target?.dataset??{};if(!!o)if(i==="emoji"&&r){let s=t.target.firstChild;e.push(Nl("Emoji",()=>({id:o,name:r,isAnimated:s&&FS(s.src)})))}else i==="sticker"&&!t.target.className?.includes("lottieCanvas")&&e.push(Nl("Sticker",()=>OS(o)))},kd=y({name:"EmoteCloner",description:"Allows you to clone Emotes & Stickers to your own server (right click them)",tags:["StickerCloner"],authors:[m.Ven,m.Nuckyz],start(){ue("message",ES),ue("expression-picker",_S)},stop(){fe("message",ES),fe("expression-picker",_S)}})});var Rd,$S,Dd,GS=g(()=>{"use strict";a();$();ae();li();A();it();w();j();x();Rd=P("key","removeBuildOverride"),$S=D({enableIsStaff:{description:"Enable isStaff",type:3,default:!1,restartNeeded:!0}}),Dd=y({name:"Experiments",description:"Enable Access to Experiments in Discord!",authors:[m.Megu,m.Ven,m.Nickyux,m.BanTheNons,m.Nuckyz],settings:$S,patches:[{find:"Object.defineProperties(this,{isDeveloper",replacement:{match:/(?<={isDeveloper:\{[^}]+?,get:\(\)=>)\i/,replace:"true"}},{find:'type:"user",revision',replacement:{match:/!(\i)&&"CONNECTION_OPEN".+?;/g,replace:"$1=!0;"}},{find:".isStaff=()",predicate:()=>$S.store.enableIsStaff,replacement:[{match:/=>*?(\i)\.hasFlag\((\i\.\i)\.STAFF\)}/,replace:(e,t,o)=>`=>Vencord.Webpack.Common.UserStore.getCurrentUser()?.id===${t}.id||${t}.hasFlag(${o}.STAFF)}`},{match:/hasFreePremium\(\){return this.isStaff\(\)\s*?\|\|/,replace:"hasFreePremium(){return "}]},{find:'H1,title:"Experiments"',replacement:{match:'title:"Experiments",children:[',replace:"$&$self.WarningCard(),"}}],settingsAboutComponent:()=>{let e=navigator.platform.includes("Mac"),t=e?"cmd":"ctrl",o=e?"opt":"alt";return n(_.Fragment,null,n(S.FormTitle,{tag:"h3"},"More Information"),n(S.FormText,{variant:"text-md/normal"},"You can enable client DevTools"," ",n("kbd",{className:Rd.key},t)," +"," ",n("kbd",{className:Rd.key},o)," +"," ",n("kbd",{className:Rd.key},"O")," ","after enabling ",n("code",null,"isStaff")," below"),n(S.FormText,null,"and then toggling ",n("code",null,"Enable DevTools")," in the ",n("code",null,"Developer Options")," tab in settings."))},WarningCard:B.wrap(()=>n(So,{id:"vc-experiments-warning-card",className:z.bottom16},n(S.FormTitle,{tag:"h2"},"Hold on!!"),n(S.FormText,null,"Experiments are unreleased Discord features. They might not work, or even break your client or get your account disabled."),n(S.FormText,{className:z.top8},"Only use experiments if you know what you're doing. Vencord is not responsible for any damage caused by enabling experiments.")),{noop:!0})})});var Ld,HS=g(()=>{"use strict";a();A();w();Ld=y({name:"F8Break",description:"Pause the client when you press F8 with DevTools (+ breakpoints) open.",authors:[m.lewisakura],start(){window.addEventListener("keydown",this.event)},stop(){window.removeEventListener("keydown",this.event)},event(e){if(e.code==="F8")debugger}})});var zS=g(()=>{"use strict";a()});var WS=vr((RG,jS)=>{"use strict";a();var wn=jS.exports;(function e(t,o,r){function i(c,u){if(!o[c]){if(!t[c]){var p=typeof Zr=="function"&&Zr;if(!u&&p)return p(c,!0);if(s)return s(c,!0);throw new Error("Cannot find module '"+c+"'")}var d=o[c]={exports:{}};t[c][0].call(d.exports,function(h){var v=t[c][1][h];return i(v||h)},d,d.exports,e,t,o,r)}return o[c].exports}for(var s=typeof Zr=="function"&&Zr,l=0;l<r.length;l++)i(r[l]);return i})({1:[function(e,t,o){(function(r,i){var s,l;s=this,l=function(){"use strict";function c(R){return typeof R=="function"}var u=Array.isArray?Array.isArray:function(R){return Object.prototype.toString.call(R)==="[object Array]"},p=0,d=void 0,h=void 0,v=function(R,W){F[p]=R,F[p+1]=W,(p+=2)===2&&(h?h(H):V())},T=typeof window<"u"?window:void 0,N=T||{},b=N.MutationObserver||N.WebKitMutationObserver,I=typeof wn>"u"&&r!==void 0&&{}.toString.call(r)==="[object process]",k=typeof Uint8ClampedArray<"u"&&typeof importScripts<"u"&&typeof MessageChannel<"u";function M(){var R=setTimeout;return function(){return R(H,1)}}var F=new Array(1e3);function H(){for(var R=0;R<p;R+=2)(0,F[R])(F[R+1]),F[R]=void 0,F[R+1]=void 0;p=0}var X,Z,q,L,V=void 0;function re(R,W){var se=this,ne=new this.constructor(Le);ne[le]===void 0&&Dn(ne);var ye=se._state;if(ye){var $e=arguments[ye-1];v(function(){return vt(ye,ne,$e,se._result)})}else Jt(se,ne,R,W);return ne}function Me(R){if(R&&typeof R=="object"&&R.constructor===this)return R;var W=new this(Le);return ge(W,R),W}V=I?function(){return r.nextTick(H)}:b?(Z=0,q=new b(H),L=document.createTextNode(""),q.observe(L,{characterData:!0}),function(){L.data=Z=++Z%2}):k?((X=new MessageChannel).port1.onmessage=H,function(){return X.port2.postMessage(0)}):T===void 0&&typeof e=="function"?function(){try{var R=Function("return this")().require("vertx");return(d=R.runOnLoop||R.runOnContext)!==void 0?function(){d(H)}:M()}catch{return M()}}():M();var le=Math.random().toString(36).substring(2);function Le(){}var he=void 0,Se=1,Ie=2;function ke(R,W,se){v(function(ne){var ye=!1,$e=function(Pt,an,yr,xM){try{Pt.call(an,yr,xM)}catch(wM){return wM}}(se,W,function(Pt){ye||(ye=!0,W!==Pt?ge(ne,Pt):tt(ne,Pt))},function(Pt){ye||(ye=!0,Ee(ne,Pt))},ne._label);!ye&&$e&&(ye=!0,Ee(ne,$e))},R)}function Te(R,W,se){W.constructor===R.constructor&&se===re&&W.constructor.resolve===Me?function(ne,ye){ye._state===Se?tt(ne,ye._result):ye._state===Ie?Ee(ne,ye._result):Jt(ye,void 0,function($e){return ge(ne,$e)},function($e){return Ee(ne,$e)})}(R,W):se===void 0?tt(R,W):c(se)?ke(R,W,se):tt(R,W)}function ge(R,W){if(R===W)Ee(R,new TypeError("You cannot resolve a promise with itself"));else if(function(ne){var ye=typeof ne;return ne!==null&&(ye=="object"||ye=="function")}(W)){var se=void 0;try{se=W.then}catch(ne){return void Ee(R,ne)}Te(R,W,se)}else tt(R,W)}function yt(R){R._onerror&&R._onerror(R._result),Mt(R)}function tt(R,W){R._state===he&&(R._result=W,R._state=Se,R._subscribers.length!==0&&v(Mt,R))}function Ee(R,W){R._state===he&&(R._state=Ie,R._result=W,v(yt,R))}function Jt(R,W,se,ne){var ye=R._subscribers,$e=ye.length;R._onerror=null,ye[$e]=W,ye[$e+Se]=se,ye[$e+Ie]=ne,$e===0&&R._state&&v(Mt,R)}function Mt(R){var W=R._subscribers,se=R._state;if(W.length!==0){for(var ne=void 0,ye=void 0,$e=R._result,Pt=0;Pt<W.length;Pt+=3)ne=W[Pt],ye=W[Pt+se],ne?vt(se,ne,ye,$e):ye($e);R._subscribers.length=0}}function vt(R,W,se,ne){var ye=c(se),$e=void 0,Pt=void 0,an=!0;if(ye){try{$e=se(ne)}catch(yr){an=!1,Pt=yr}if(W===$e)return void Ee(W,new TypeError("A promises callback cannot return that same promise."))}else $e=ne;W._state!==he||(ye&&an?ge(W,$e):an===!1?Ee(W,Pt):R===Se?tt(W,$e):R===Ie&&Ee(W,$e))}var fr=0;function Dn(R){R[le]=fr++,R._state=void 0,R._result=void 0,R._subscribers=[]}var Ln=(gr.prototype._enumerate=function(R){for(var W=0;this._state===he&&W<R.length;W++)this._eachEntry(R[W],W)},gr.prototype._eachEntry=function(R,W){var se=this._instanceConstructor,ne=se.resolve;if(ne===Me){var ye=void 0,$e=void 0,Pt=!1;try{ye=R.then}catch(yr){Pt=!0,$e=yr}if(ye===re&&R._state!==he)this._settledAt(R._state,W,R._result);else if(typeof ye!="function")this._remaining--,this._result[W]=R;else if(se===Bt){var an=new se(Le);Pt?Ee(an,$e):Te(an,R,ye),this._willSettleAt(an,W)}else this._willSettleAt(new se(function(yr){return yr(R)}),W)}else this._willSettleAt(ne(R),W)},gr.prototype._settledAt=function(R,W,se){var ne=this.promise;ne._state===he&&(this._remaining--,R===Ie?Ee(ne,se):this._result[W]=se),this._remaining===0&&tt(ne,this._result)},gr.prototype._willSettleAt=function(R,W){var se=this;Jt(R,void 0,function(ne){return se._settledAt(Se,W,ne)},function(ne){return se._settledAt(Ie,W,ne)})},gr);function gr(R,W){this._instanceConstructor=R,this.promise=new R(Le),this.promise[le]||Dn(this.promise),u(W)?(this.length=W.length,this._remaining=W.length,this._result=new Array(this.length),this.length===0?tt(this.promise,this._result):(this.length=this.length||0,this._enumerate(W),this._remaining===0&&tt(this.promise,this._result))):Ee(this.promise,new Error("Array Methods must be provided an Array"))}var Bt=(hr.prototype.catch=function(R){return this.then(null,R)},hr.prototype.finally=function(R){var W=this.constructor;return c(R)?this.then(function(se){return W.resolve(R()).then(function(){return se})},function(se){return W.resolve(R()).then(function(){throw se})}):this.then(R,R)},hr);function hr(R){this[le]=fr++,this._result=this._state=void 0,this._subscribers=[],Le!==R&&(typeof R!="function"&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof hr?function(W,se){try{se(function(ne){ge(W,ne)},function(ne){Ee(W,ne)})}catch(ne){Ee(W,ne)}}(this,R):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return Bt.prototype.then=re,Bt.all=function(R){return new Ln(this,R).promise},Bt.race=function(R){var W=this;return u(R)?new W(function(se,ne){for(var ye=R.length,$e=0;$e<ye;$e++)W.resolve(R[$e]).then(se,ne)}):new W(function(se,ne){return ne(new TypeError("You must pass an array to race."))})},Bt.resolve=Me,Bt.reject=function(R){var W=new this(Le);return Ee(W,R),W},Bt._setScheduler=function(R){h=R},Bt._setAsap=function(R){v=R},Bt._asap=v,Bt.polyfill=function(){var R=void 0;if(i!==void 0)R=i;else if(typeof wn<"u")R=wn;else try{R=Function("return this")()}catch{throw new Error("polyfill failed because global object is unavailable in this environment")}var W=R.Promise;if(W){var se=null;try{se=Object.prototype.toString.call(W.resolve())}catch{}if(se==="[object Promise]"&&!W.cast)return}R.Promise=Bt},Bt.Promise=Bt},typeof o=="object"&&t!==void 0?t.exports=l():typeof define=="function"&&define.amd?define(l):s.ES6Promise=l()}).call(this,e("VCmEsw"),typeof wn<"u"?wn:typeof window<"u"?window:{})},{VCmEsw:2}],2:[function(e,t,o){var r=t.exports={};function i(){}r.nextTick=function(){var s=typeof window<"u"&&window.setImmediate,l=typeof window<"u"&&window.postMessage&&window.addEventListener;if(s)return function(u){return window.setImmediate(u)};if(l){var c=[];return window.addEventListener("message",function(u){var p=u.source;p!==window&&p!==null||u.data!=="process-tick"||(u.stopPropagation(),0<c.length&&c.shift()())},!0),function(u){c.push(u),window.postMessage("process-tick","*")}}return function(u){setTimeout(u,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.on=i,r.addListener=i,r.once=i,r.off=i,r.removeListener=i,r.removeAllListeners=i,r.emit=i,r.binding=function(s){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(s){throw new Error("process.chdir is not supported")}},{}],3:[function(e,t,o){"use strict";t.exports=function(){this.width=0,this.height=0,this.numPlays=0,this.playTime=0,this.frames=[],this.play=function(){c||u||(this.rewind(),c=!0,requestAnimationFrame(d))},this.rewind=function(){s=i=0,l=null,u=c=!1},this.addContext=function(v){if(0<p.length){var T=p[0].getImageData(0,0,this.width,this.height);v.putImageData(T,0,0)}p.push(v),v._apng_animation=this},this.removeContext=function(v){var T=p.indexOf(v);T!==-1&&(p.splice(T,1),p.length===0&&this.rewind(),"_apng_animation"in v&&delete v._apng_animation)},this.isPlayed=function(){return c},this.isFinished=function(){return u};var r=this,i=0,s=0,l=null,c=!1,u=!1,p=[],d=function(v){for(;c&&i<=v;)h(v);c&&requestAnimationFrame(d)},h=function(v){var T=s++%r.frames.length,N=r.frames[T];if(r.numPlays==0||s/r.frames.length<=r.numPlays){for(T==0&&(p.forEach(function(b){b.clearRect(0,0,r.width,r.height)}),l=null,N.disposeOp==2&&(N.disposeOp=1)),l&&l.disposeOp==1?p.forEach(function(b){b.clearRect(l.left,l.top,l.width,l.height)}):l&&l.disposeOp==2&&p.forEach(function(b){b.putImageData(l.iData,l.left,l.top)}),(l=N).iData=null,l.disposeOp==2&&(l.iData=p[0].getImageData(N.left,N.top,N.width,N.height)),N.blendOp==0&&p.forEach(function(b){b.clearRect(N.left,N.top,N.width,N.height)}),p.forEach(function(b){b.drawImage(N.img,N.left,N.top)}),i==0&&(i=v);v>i+r.playTime;)i+=r.playTime;i+=N.delay}else u=!(c=!1)}}},{}],4:[function(e,t,o){"use strict";for(var r=new Uint32Array(256),i=0;i<256;i++){for(var s=i,l=0;l<8;l++)s=1&s?3988292384^s>>>1:s>>>1;r[i]=s}t.exports=function(c,u,p){for(var d=-1,h=u=u||0,v=u+(p=p||c.length-u);h<v;h++)d=d>>>8^r[255&(d^c[h])];return-1^d}},{}],5:[function(e,t,o){(function(r){"use strict";var i=e("./support-test"),s=e("./parser"),l=e("./loader"),c=r.APNG={};c.checkNativeFeatures=i.checkNativeFeatures,c.ifNeeded=i.ifNeeded,c.parseBuffer=function(p){return s(p)};var u={};c.parseURL=function(p){return p in u||(u[p]=l(p).then(s)),u[p]},c.animateContext=function(p,d){return c.parseURL(p).then(function(h){return h.addContext(d),h.play(),h})},c.animateImage=function(p){return p.setAttribute("data-is-apng","progress"),c.parseURL(p.src).then(function(d){p.setAttribute("data-is-apng","yes");var h=document.createElement("canvas");h.width=d.width,h.height=d.height,Array.prototype.slice.call(p.attributes).forEach(function(k){["alt","src","usemap","ismap","data-is-apng","width","height"].indexOf(k.nodeName)==-1&&h.setAttributeNode(k.cloneNode(!1))}),h.setAttribute("data-apng-src",p.src),p.alt!=""&&h.appendChild(document.createTextNode(p.alt));var v="",T="",N=0,b="";p.style.width!=""&&p.style.width!="auto"?v=p.style.width:p.hasAttribute("width")&&(v=p.getAttribute("width")+"px"),p.style.height!=""&&p.style.height!="auto"?T=p.style.height:p.hasAttribute("height")&&(T=p.getAttribute("height")+"px"),v!=""&&T==""&&(N=parseFloat(v),b=v.match(/\D+$/)[0],T=Math.round(h.height*N/h.width)+b),T!=""&&v==""&&(N=parseFloat(T),b=T.match(/\D+$/)[0],v=Math.round(h.width*N/h.height)+b),h.style.width=v,h.style.height=T;var I=p.parentNode;I.insertBefore(h,p),I.removeChild(p),d.addContext(h.getContext("2d")),d.play()},function(){p.setAttribute("data-is-apng","no")})},c.releaseCanvas=function(p){var d=p.getContext("2d");"_apng_animation"in d&&d._apng_animation.removeContext(d)}}).call(this,typeof wn<"u"?wn:typeof window<"u"?window:{})},{"./loader":6,"./parser":7,"./support-test":8}],6:[function(e,t,o){"use strict";var r=r||e("es6-promise").Promise;t.exports=function(i){return new r(function(s,l){var c=new XMLHttpRequest;c.open("GET",i),c.responseType="arraybuffer",c.onload=function(){this.status==200?s(this.response):l(this)},c.send()})}},{"es6-promise":1}],7:[function(e,t,o){"use strict";var r=r||e("es6-promise").Promise,i=e("./animation"),s=e("./crc32"),l=new Uint8Array([137,80,78,71,13,10,26,10]);t.exports=function(b){var I=new Uint8Array(b);return new r(function(k,M){for(var F=0;F<l.length;F++)if(l[F]!=I[F])return void M("Not a PNG file (invalid file signature)");var H=!1;if(c(I,function(ke){return ke!="acTL"||!(H=!0)}),H){var X=[],Z=[],q=null,L=null,V=new i;if(c(I,function(ke,Te,ge,yt){switch(ke){case"IHDR":q=Te.subarray(ge+8,ge+8+yt),V.width=u(Te,ge+8),V.height=u(Te,ge+12);break;case"acTL":V.numPlays=u(Te,ge+8+4);break;case"fcTL":L&&V.frames.push(L),(L={}).width=u(Te,ge+8+4),L.height=u(Te,ge+8+8),L.left=u(Te,ge+8+12),L.top=u(Te,ge+8+16);var tt=p(Te,ge+8+20),Ee=p(Te,ge+8+22);Ee==0&&(Ee=100),L.delay=1e3*tt/Ee,L.delay<=10&&(L.delay=100),V.playTime+=L.delay,L.disposeOp=d(Te,ge+8+24),L.blendOp=d(Te,ge+8+25),L.dataParts=[];break;case"fdAT":L&&L.dataParts.push(Te.subarray(ge+8+4,ge+8+yt));break;case"IDAT":L&&L.dataParts.push(Te.subarray(ge+8,ge+8+yt));break;case"IEND":Z.push(h(Te,ge,12+yt));break;default:X.push(h(Te,ge,12+yt))}}),L&&V.frames.push(L),V.frames.length!=0)for(var re=0,Me=new Blob(X),le=new Blob(Z),Le=0;Le<V.frames.length;Le++){L=V.frames[Le];var he=[];he.push(l),q.set(T(L.width),0),q.set(T(L.height),4),he.push(N("IHDR",q)),he.push(Me);for(var Se=0;Se<L.dataParts.length;Se++)he.push(N("IDAT",L.dataParts[Se]));he.push(le);var Ie=URL.createObjectURL(new Blob(he,{type:"image/png"}));delete L.dataParts,he=null,L.img=document.createElement("img"),L.img.onload=function(){URL.revokeObjectURL(this.src),++re==V.frames.length&&k(V)},L.img.onerror=function(){M("Image creation error")},L.img.src=Ie}else M("Not an animated PNG")}else M("Not an animated PNG")})};var c=function(b,I){var k=8;do{var M=u(b,k),F=v(b,k+4,4),H=I(F,b,k,M);k+=12+M}while(H!==!1&&F!="IEND"&&k<b.length)},u=function(b,I){var k=0;k+=b[0+I]<<24>>>0;for(var M=1;M<4;M++)k+=b[M+I]<<8*(3-M);return k},p=function(b,I){for(var k=0,M=0;M<2;M++)k+=b[M+I]<<8*(1-M);return k},d=function(b,I){return b[I]},h=function(b,I,k){var M=new Uint8Array(k);return M.set(b.subarray(I,I+k)),M},v=function(b,I,k){var M=Array.prototype.slice.call(b.subarray(I,I+k));return String.fromCharCode.apply(String,M)},T=function(b){return[b>>>24&255,b>>>16&255,b>>>8&255,255&b]},N=function(b,I){var k=b.length+I.length,M=new Uint8Array(new ArrayBuffer(k+8));M.set(T(I.length),0),M.set(function(H){for(var X=[],Z=0;Z<H.length;Z++)X.push(H.charCodeAt(Z));return X}(b),4),M.set(I,8);var F=s(M,4,k);return M.set(T(F),k+4),M}},{"./animation":3,"./crc32":4,"es6-promise":1}],8:[function(e,t,o){(function(r){"use strict";var i,s,l=l||e("es6-promise").Promise,c=(i=function(u){var p=document.createElement("canvas"),d={TypedArrays:"ArrayBuffer"in r,BlobURLs:"URL"in r,requestAnimationFrame:"requestAnimationFrame"in r,pageProtocol:location.protocol=="http:"||location.protocol=="https:",canvas:"getContext"in document.createElement("canvas"),APNG:!1};if(d.canvas){var h=new Image;h.onload=function(){var v=p.getContext("2d");v.drawImage(h,0,0),d.APNG=v.getImageData(0,0,1,1).data[3]===0,u(d)},h.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACGFjVEwAAAABAAAAAcMq2TYAAAANSURBVAiZY2BgYPgPAAEEAQB9ssjfAAAAGmZjVEwAAAAAAAAAAQAAAAEAAAAAAAAAAAD6A+gBAbNU+2sAAAARZmRBVAAAAAEImWNgYGBgAAAABQAB6MzFdgAAAABJRU5ErkJggg=="}else u(d)},s=null,function(u){return s=s||new l(i),u&&s.then(u),s});t.exports={checkNativeFeatures:c,ifNeeded:function(u){return u===void 0&&(u=!1),c().then(function(p){if(p.APNG&&!u)reject();else{var d=!0;for(var h in p)p.hasOwnProperty(h)&&h!="APNG"&&(d=d&&p[h])}})}}}).call(this,typeof wn<"u"?wn:typeof window<"u"?window:{})},{"es6-promise":1}]},{},[5])});var qS,EA,BG,KS,YS,ZS,Cl=g(()=>{"use strict";a();qo();zS();qS=_n(()=>WS().APNG),EA="https://unpkg.com/@sapphi-red/web-noise-suppressor@0.3.3/dist",BG=`${EA}/rnnoise/workletProcessor.js`,KS="https://unpkg.com/@vap/shiki-worker@0.0.8/dist/index.min.js",YS="https://unpkg.com/@vap/shiki@0.10.3/dist/onig.wasm",ZS=_n(()=>import("https://unpkg.com/stegcloak-dist@1.0.0/index.js"))});var Fd=vr(Bd=>{a();var VS=Object.defineProperty,_A=e=>VS(e,"__esModule",{value:!0}),OA=(e,t)=>{for(var o in t)VS(e,o,{get:t[o],enumerable:!0})};_A(Bd);OA(Bd,{GIFEncoder:()=>s0,applyPalette:()=>WA,default:()=>tN,nearestColor:()=>ZA,nearestColorIndex:()=>r0,nearestColorIndexWithDistance:()=>i0,prequantize:()=>jA,quantize:()=>HA,snapColorsToPalette:()=>YA});var BA={signature:"GIF",version:"89a",trailer:59,extensionIntroducer:33,applicationExtensionLabel:255,graphicControlExtensionLabel:249,imageSeparator:44,signatureSize:3,versionSize:3,globalColorTableFlagMask:128,colorResolutionMask:112,sortFlagMask:8,globalColorTableSizeMask:7,applicationIdentifierSize:8,applicationAuthCodeSize:3,disposalMethodMask:28,userInputFlagMask:2,transparentColorFlagMask:1,localColorTableFlagMask:128,interlaceFlagMask:64,idSortFlagMask:32,localColorTableSizeMask:7};function e0(e=256){let t=0,o=new Uint8Array(e);return{get buffer(){return o.buffer},reset(){t=0},bytesView(){return o.subarray(0,t)},bytes(){return o.slice(0,t)},writeByte(i){r(t+1),o[t]=i,t++},writeBytes(i,s=0,l=i.length){r(t+l);for(let c=0;c<l;c++)o[t++]=i[c+s]},writeBytesView(i,s=0,l=i.byteLength){r(t+l),o.set(i.subarray(s,s+l),t),t+=l}};function r(i){var s=o.length;if(s>=i)return;var l=1024*1024;i=Math.max(i,s*(s<l?2:1.125)>>>0),s!=0&&(i=Math.max(i,256));let c=o;o=new Uint8Array(i),t>0&&o.set(c.subarray(0,t),0)}}var Ed=12,XS=5003,FA=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function UA(e,t,o,r,i=e0(512),s=new Uint8Array(256),l=new Int32Array(XS),c=new Int32Array(XS)){let u=l.length,p=Math.max(2,r);s.fill(0),c.fill(0),l.fill(-1);let d=0,h=0,v=p+1,T=v,N=!1,b=T,I=(1<<b)-1,k=1<<v-1,M=k+1,F=k+2,H=0,X=o[0],Z=0;for(let V=u;V<65536;V*=2)++Z;Z=8-Z,i.writeByte(p),L(k);let q=o.length;for(let V=1;V<q;V++){e:{let re=o[V],Me=(re<<Ed)+X,le=re<<Z^X;if(l[le]===Me){X=c[le];break e}let Le=le===0?1:u-le;for(;l[le]>=0;)if(le-=Le,le<0&&(le+=u),l[le]===Me){X=c[le];break e}L(X),X=re,F<1<<Ed?(c[le]=F++,l[le]=Me):(l.fill(-1),F=k+2,N=!0,L(k))}}return L(X),L(M),i.writeByte(0),i.bytesView();function L(V){for(d&=FA[h],h>0?d|=V<<h:d=V,h+=b;h>=8;)s[H++]=d&255,H>=254&&(i.writeByte(H),i.writeBytesView(s,0,H),H=0),d>>=8,h-=8;if((F>I||N)&&(N?(b=T,I=(1<<b)-1,N=!1):(++b,I=b===Ed?1<<b:(1<<b)-1)),V==M){for(;h>0;)s[H++]=d&255,H>=254&&(i.writeByte(H),i.writeBytesView(s,0,H),H=0),d>>=8,h-=8;H>0&&(i.writeByte(H),i.writeBytesView(s,0,H),H=0)}}}var $A=UA;function t0(e,t,o){return e<<8&63488|t<<2&992|o>>3}function o0(e,t,o,r){return e>>4|t&240|(o&240)<<4|(r&240)<<8}function n0(e,t,o){return e>>4<<8|t&240|o>>4}function kl(e,t,o){return e<t?t:e>o?o:e}function Hs(e){return e*e}function JS(e,t,o){var r=0,i=1e100;let s=e[t],l=s.cnt,c=s.ac,u=s.rc,p=s.gc,d=s.bc;for(var h=s.fw;h!=0;h=e[h].fw){let T=e[h],N=T.cnt,b=l*N/(l+N);if(!(b>=i)){var v=0;o&&(v+=b*Hs(T.ac-c),v>=i)||(v+=b*Hs(T.rc-u),!(v>=i)&&(v+=b*Hs(T.gc-p),!(v>=i)&&(v+=b*Hs(T.bc-d),!(v>=i)&&(i=v,r=h))))}}s.err=i,s.nn=r}function _d(){return{ac:0,rc:0,gc:0,bc:0,cnt:0,nn:0,fw:0,bk:0,tm:0,mtm:0,err:0}}function GA(e,t){let o=t==="rgb444"?4096:65536,r=new Array(o),i=e.length;if(t==="rgba4444")for(let s=0;s<i;++s){let l=e[s],c=l>>24&255,u=l>>16&255,p=l>>8&255,d=l&255,h=o0(d,p,u,c),v=h in r?r[h]:r[h]=_d();v.rc+=d,v.gc+=p,v.bc+=u,v.ac+=c,v.cnt++}else if(t==="rgb444")for(let s=0;s<i;++s){let l=e[s],c=l>>16&255,u=l>>8&255,p=l&255,d=n0(p,u,c),h=d in r?r[d]:r[d]=_d();h.rc+=p,h.gc+=u,h.bc+=c,h.cnt++}else for(let s=0;s<i;++s){let l=e[s],c=l>>16&255,u=l>>8&255,p=l&255,d=t0(p,u,c),h=d in r?r[d]:r[d]=_d();h.rc+=p,h.gc+=u,h.bc+=c,h.cnt++}return r}function HA(e,t,o={}){let{format:r="rgb565",clearAlpha:i=!0,clearAlphaColor:s=0,clearAlphaThreshold:l=0,oneBitAlpha:c=!1}=o;if(!e||!e.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(e instanceof Uint8Array)&&!(e instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");let u=new Uint32Array(e.buffer),p=o.useSqrt!==!1,d=r==="rgba4444",h=GA(u,r),v=h.length,T=v-1,N=new Uint32Array(v+1);for(var b=0,k=0;k<v;++k){let Se=h[k];if(Se!=null){var I=1/Se.cnt;d&&(Se.ac*=I),Se.rc*=I,Se.gc*=I,Se.bc*=I,h[b++]=Se}}Hs(t)/b<.022&&(p=!1);for(var k=0;k<b-1;++k)h[k].fw=k+1,h[k+1].bk=k,p&&(h[k].cnt=Math.sqrt(h[k].cnt));p&&(h[k].cnt=Math.sqrt(h[k].cnt));var M,F,H;for(k=0;k<b;++k){JS(h,k,!1);var X=h[k].err;for(F=++N[0];F>1&&(H=F>>1,!(h[M=N[H]].err<=X));F=H)N[F]=M;N[F]=k}var Z=b-t;for(k=0;k<Z;){for(var q;;){var L=N[1];if(q=h[L],q.tm>=q.mtm&&h[q.nn].mtm<=q.tm)break;q.mtm==T?L=N[1]=N[N[0]--]:(JS(h,L,!1),q.tm=k);var X=h[L].err;for(F=1;(H=F+F)<=N[0]&&(H<N[0]&&h[N[H]].err>h[N[H+1]].err&&H++,!(X<=h[M=N[H]].err));F=H)N[F]=M;N[F]=L}var V=h[q.nn],re=q.cnt,Me=V.cnt,I=1/(re+Me);d&&(q.ac=I*(re*q.ac+Me*V.ac)),q.rc=I*(re*q.rc+Me*V.rc),q.gc=I*(re*q.gc+Me*V.gc),q.bc=I*(re*q.bc+Me*V.bc),q.cnt+=V.cnt,q.mtm=++k,h[V.bk].fw=V.fw,h[V.fw].bk=V.bk,V.mtm=T}let le=[];var Le=0;for(k=0;;++Le){let he=kl(Math.round(h[k].rc),0,255),Se=kl(Math.round(h[k].gc),0,255),Ie=kl(Math.round(h[k].bc),0,255),ke=255;d&&(ke=kl(Math.round(h[k].ac),0,255),c&&(ke=ke<=(typeof c=="number"?c:127)?0:255),i&&ke<=l&&(he=Se=Ie=s,ke=0));let Te=d?[he,Se,Ie,ke]:[he,Se,Ie];if(zA(le,Te)||le.push(Te),(k=h[k].fw)==0)break}return le}function zA(e,t){for(let o=0;o<e.length;o++){let r=e[o],i=r[0]===t[0]&&r[1]===t[1]&&r[2]===t[2],s=r.length>=4&&t.length>=4?r[3]===t[3]:!0;if(i&&s)return!0}return!1}function Dl(e,t){var o=0,r;for(r=0;r<e.length;r++){let i=e[r]-t[r];o+=i*i}return o}function Rl(e,t){return t>1?Math.round(e/t)*t:e}function jA(e,{roundRGB:t=5,roundAlpha:o=10,oneBitAlpha:r=null}={}){let i=new Uint32Array(e.buffer);for(let s=0;s<i.length;s++){let l=i[s],c=l>>24&255,u=l>>16&255,p=l>>8&255,d=l&255;c=Rl(c,o),r&&(c=c<=(typeof r=="number"?r:127)?0:255),d=Rl(d,t),p=Rl(p,t),u=Rl(u,t),i[s]=c<<24|u<<16|p<<8|d<<0}}function WA(e,t,o="rgb565"){if(!e||!e.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(e instanceof Uint8Array)&&!(e instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");if(t.length>256)throw new Error("applyPalette() only works with 256 colors or less");let r=new Uint32Array(e.buffer),i=r.length,s=o==="rgb444"?4096:65536,l=new Uint8Array(i),c=new Array(s),u=o==="rgba4444";if(o==="rgba4444")for(let p=0;p<i;p++){let d=r[p],h=d>>24&255,v=d>>16&255,T=d>>8&255,N=d&255,b=o0(N,T,v,h),I=b in c?c[b]:c[b]=qA(N,T,v,h,t);l[p]=I}else{let p=o==="rgb444"?n0:t0;for(let d=0;d<i;d++){let h=r[d],v=h>>16&255,T=h>>8&255,N=h&255,b=p(N,T,v),I=b in c?c[b]:c[b]=KA(N,T,v,t);l[d]=I}}return l}function qA(e,t,o,r,i){let s=0,l=1e100;for(let c=0;c<i.length;c++){let u=i[c],p=u[3],d=Hr(p-r);if(d>l)continue;let h=u[0];if(d+=Hr(h-e),d>l)continue;let v=u[1];if(d+=Hr(v-t),d>l)continue;let T=u[2];d+=Hr(T-o),!(d>l)&&(l=d,s=c)}return s}function KA(e,t,o,r){let i=0,s=1e100;for(let l=0;l<r.length;l++){let c=r[l],u=c[0],p=Hr(u-e);if(p>s)continue;let d=c[1];if(p+=Hr(d-t),p>s)continue;let h=c[2];p+=Hr(h-o),!(p>s)&&(s=p,i=l)}return i}function YA(e,t,o=5){if(!e.length||!t.length)return;let r=e.map(l=>l.slice(0,3)),i=o*o,s=e[0].length;for(let l=0;l<t.length;l++){let c=t[l];c.length<s?c=[c[0],c[1],c[2],255]:c.length>s?c=c.slice(0,3):c=c.slice();let u=i0(r,c.slice(0,3),Dl),p=u[0],d=u[1];d>0&&d<=i&&(e[p]=c)}}function Hr(e){return e*e}function r0(e,t,o=Dl){let r=1/0,i=-1;for(let s=0;s<e.length;s++){let l=e[s],c=o(t,l);c<r&&(r=c,i=s)}return i}function i0(e,t,o=Dl){let r=1/0,i=-1;for(let s=0;s<e.length;s++){let l=e[s],c=o(t,l);c<r&&(r=c,i=s)}return[i,r]}function ZA(e,t,o=Dl){return e[r0(e,t,o)]}function s0(e={}){let{initialCapacity:t=4096,auto:o=!0}=e,r=e0(t),i=5003,s=new Uint8Array(256),l=new Int32Array(i),c=new Int32Array(i),u=!1;return{reset(){r.reset(),u=!1},finish(){r.writeByte(BA.trailer)},bytes(){return r.bytes()},bytesView(){return r.bytesView()},get buffer(){return r.buffer},get stream(){return r},writeHeader:p,writeFrame(d,h,v,T={}){let{transparent:N=!1,transparentIndex:b=0,delay:I=0,palette:k=null,repeat:M=0,colorDepth:F=8,dispose:H=-1}=T,X=!1;if(o?u||(X=!0,p(),u=!0):X=Boolean(T.first),h=Math.max(0,Math.floor(h)),v=Math.max(0,Math.floor(v)),X){if(!k)throw new Error("First frame must include a { palette } option");JA(r,h,v,k,F),QS(r,k),M>=0&&QA(r,M)}let Z=Math.round(I/10);XA(r,H,Z,N,b);let q=Boolean(k)&&!X;VA(r,h,v,q?k:null),q&&QS(r,k),eN(r,d,h,v,F,s,l,c)}};function p(){a0(r,"GIF89a")}}function XA(e,t,o,r,i){e.writeByte(33),e.writeByte(249),e.writeByte(4),i<0&&(i=0,r=!1);var s,l;r?(s=1,l=2):(s=0,l=0),t>=0&&(l=t&7),l<<=2;let c=0;e.writeByte(0|l|c|s),or(e,o),e.writeByte(i||0),e.writeByte(0)}function JA(e,t,o,r,i=8){let c=Od(r.length)-1,u=1<<7|i-1<<4|0<<3|c,p=0,d=0;or(e,t),or(e,o),e.writeBytes([u,p,d])}function QA(e,t){e.writeByte(33),e.writeByte(255),e.writeByte(11),a0(e,"NETSCAPE2.0"),e.writeByte(3),e.writeByte(1),or(e,t),e.writeByte(0)}function QS(e,t){let o=1<<Od(t.length);for(let r=0;r<o;r++){let i=[0,0,0];r<t.length&&(i=t[r]),e.writeByte(i[0]),e.writeByte(i[1]),e.writeByte(i[2])}}function VA(e,t,o,r){if(e.writeByte(44),or(e,0),or(e,0),or(e,t),or(e,o),r){let l=Od(r.length)-1;e.writeByte(128|l)}else e.writeByte(0)}function eN(e,t,o,r,i=8,s,l,c){$A(o,r,t,i,e,s,l,c)}function or(e,t){e.writeByte(t&255),e.writeByte(t>>8&255)}function a0(e,t){for(var o=0;o<t.length;o++)e.writeByte(t.charCodeAt(o))}function Od(e){return Math.max(Math.ceil(Math.log2(e)),1)}var tN=s0});function c0(e,t){let o=t?.fields?.find(i=>i.localName===e);return o?Object.values(o).find(i=>typeof i=="function")?.():void 0}var Ci,oN,zr,zs,l0,js,nr,Ll,nN,rN,Ud,$d,El,Je,Gd,u0=g(()=>{"use strict";a();on();$();A();Cl();ct();Ve();w();j();x();Ci=ba(Fd()),oN=0,zr=Re("StickersStore"),zs=Re("UserSettingsProtoStore"),l0=P("BINARY_READ_OPTIONS");js=No(()=>ts.PreloadedUserSettingsActionCreators),nr=No(()=>c0("appearance",js.ProtoClass)),Ll=No(()=>c0("clientThemeSettings",nr)),nN=1n<<18n,rN=1n<<37n,Ud=/\/emojis\/(\d+?)\.(png|webp|gif)/,$d=/\/stickers\/(\d+?)\./,El=/\/attachments\/\d+?\/\d+?\/(\d+?)\.gif/,Je=D({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}}),Gd=y({name:"FakeNitro",authors:[m.Arjix,m.D3SOX,m.Ven,m.obscurity,m.captain,m.Nuckyz,m.AutumnVN],description:"Allows you to stream in nitro quality, send fake emojis/stickers and use client themes.",dependencies:["MessageEventsAPI"],settings:Je,patches:[{find:".PREMIUM_LOCKED;",predicate:()=>Je.store.enableEmojiBypass,replacement:[{match:/(?<=,intention:(\i).+?;)/,replace:(e,t)=>`let fakeNitroIntention=${t};`},{match:/\.(?:canUseEmojisEverywhere|canUseAnimatedEmojis)\(\i(?=\))/g,replace:'$&,typeof fakeNitroIntention!=="undefined"?fakeNitroIntention:void 0'},{match:/(&&!\i&&)!(\i)(?=\)return \i\.\i\.DISALLOW_EXTERNAL;)/,replace:(e,t,o)=>`${t}(!${o}&&(typeof fakeNitroIntention==="undefined"||![${3},${4}].includes(fakeNitroIntention)))`},{match:/if\(!\i\.available/,replace:e=>`${e}&&(typeof fakeNitroIntention==="undefined"||![${3},${4}].includes(fakeNitroIntention))`}]},{find:"canUseAnimatedEmojis:function",predicate:()=>Je.store.enableEmojiBypass,replacement:{match:/((?:canUseEmojisEverywhere|canUseAnimatedEmojis):function\(\i)\){(.+?\))(?=})/g,replace:(e,t,o)=>`${t},fakeNitroIntention){${o}||fakeNitroIntention==null||[${3},${4}].includes(fakeNitroIntention)`}},{find:"canUseCustomStickersEverywhere:function",predicate:()=>Je.store.enableStickerBypass,replacement:{match:/canUseCustomStickersEverywhere:function\(\i\){/,replace:"$&return true;"}},{find:'"SENDABLE"',predicate:()=>Je.store.enableStickerBypass,replacement:{match:/(\w+)\.available\?/,replace:"true?"}},{find:"canUseHighVideoUploadQuality:function",predicate:()=>Je.store.enableStreamQualityBypass,replacement:["canUseHighVideoUploadQuality","canStreamQuality"].map(e=>({match:new RegExp(`${e}:function\\(\\i(?:,\\i)?\\){`,"g"),replace:"$&return true;"}))},{find:"STREAM_FPS_OPTION.format",predicate:()=>Je.store.enableStreamQualityBypass,replacement:{match:/guildPremiumTier:\i\.\i\.TIER_\d,?/g,replace:""}},{find:"canUseClientThemes:function",replacement:{match:/canUseClientThemes:function\(\i\){/,replace:"$&return true;"}},{find:'.displayName="UserSettingsProtoStore"',replacement:[{match:/CONNECTION_OPEN:function\((\i)\){/,replace:(e,t)=>`${e}$self.handleProtoChange(${t}.userSettingsProto,${t}.user);`},{match:/let{settings:/,replace:"arguments[0].local||$self.handleProtoChange(arguments[0].settings.proto);$&"}]},{find:",updateTheme(",replacement:{match:/(function \i\(\i\){let{backgroundGradientPresetId:(\i).+?)(\i\.\i\.updateAsync.+?theme=(.+?),.+?},\i\))/,replace:(e,t,o,r,i)=>`${t}$self.handleGradientThemeSelect(${o},${i},()=>${r});`}},{find:'["strong","em","u","text","inlineCode","s","spoiler"]',replacement:[{predicate:()=>Je.store.transformEmojis,match:/1!==(\i)\.length\|\|1!==\i\.length/,replace:(e,t)=>`${e}||$self.shouldKeepEmojiLink(${t}[0])`},{predicate:()=>Je.store.transformEmojis||Je.store.transformStickers,match:/(?=return{hasSpoilerEmbeds:\i,content:(\i)})/,replace:(e,t)=>`${t}=$self.patchFakeNitroEmojisOrRemoveStickersLinks(${t},arguments[2]?.formatInline);`}]},{find:"renderEmbeds(",replacement:[{predicate:()=>Je.store.transformEmojis||Je.store.transformStickers,match:/(renderEmbeds\((\i)\){)(.+?embeds\.map\((\i)=>{)/,replace:(e,t,o,r,i)=>`${t}const fakeNitroMessage=${o};${r}if($self.shouldIgnoreEmbed(${i},fakeNitroMessage))return null;`},{predicate:()=>Je.store.transformStickers,match:/(?<=renderStickersAccessories\((\i)\){let (\i)=\(0,\i\.\i\)\(\i\).+?;)/,replace:(e,t,o)=>`${o}=$self.patchFakeNitroStickers(${o},${t});`},{predicate:()=>Je.store.transformStickers,match:/renderAttachments\(\i\){let{attachments:(\i).+?;/,replace:(e,t)=>`${e}${t}=$self.filterAttachments(${t});`}]},{find:".Messages.STICKER_POPOUT_UNJOINED_PRIVATE_GUILD_DESCRIPTION.format",predicate:()=>Je.store.transformStickers,replacement:[{match:/let{renderableSticker:(\i).{0,250}isGuildSticker.+?channel:\i,/,replace:(e,t)=>`${e}fakeNitroRenderableSticker:${t},`},{match:/(let \i,{sticker:\i,channel:\i,closePopout:\i.+?}=(\i).+?;)(.+?description:)(\i)(?=,sticker:\i)/,replace:(e,t,o,r,i)=>`${t}let{fakeNitroRenderableSticker}=${o};${r}$self.addFakeNotice(${0},${i},!!fakeNitroRenderableSticker?.fake)`}]},{find:".EMOJI_UPSELL_POPOUT_MORE_EMOJIS_OPENED,",predicate:()=>Je.store.transformEmojis,replacement:{match:/isDiscoverable:\i,shouldHideRoleSubscriptionCTA:\i,(?<={node:(\i),.+?)/,replace:(e,t)=>`${e}fakeNitroNode:${t},`}},{find:".Messages.EMOJI_POPOUT_UNJOINED_DISCOVERABLE_GUILD_DESCRIPTION",predicate:()=>Je.store.transformEmojis,replacement:{match:/(?<=isDiscoverable:\i,emojiComesFromCurrentGuild:\i,.+?}=(\i).+?;)(.+?return )(.{0,1000}\.Messages\.EMOJI_POPOUT_UNJOINED_DISCOVERABLE_GUILD_DESCRIPTION.+?)(?=},)/,replace:(e,t,o,r)=>`let{fakeNitroNode}=${t};${o}$self.addFakeNotice(${1},${r},!!fakeNitroNode?.fake)`}},{find:"canUsePremiumAppIcons:function",replacement:{match:/canUsePremiumAppIcons:function\(\i\){/,replace:"$&return true;"}},{find:".FreemiumAppIconIds.DEFAULT&&(",replacement:{match:/\i\.\i\.isPremium\(\i\.\i\.getCurrentUser\(\)\)/,replace:"true"}}],get guildId(){return gp()?.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"||!zs||!js||!nr||!Ll)return;if((t?.premium_type??U?.getCurrentUser()?.premiumType??0)!==2){if(e.appearance??=nr.create(),zs.settings.appearance?.theme!=null){let r=nr.create({theme:zs.settings.appearance.theme});e.appearance.theme=r.theme}if(zs.settings.appearance?.clientThemeSettings?.backgroundGradientPresetId?.value!=null){let r=Ll.create({backgroundGradientPresetId:{value:zs.settings.appearance.clientThemeSettings.backgroundGradientPresetId.value}});e.appearance.clientThemeSettings??=r,e.appearance.clientThemeSettings.backgroundGradientPresetId=r.backgroundGradientPresetId}}},handleGradientThemeSelect(e,t,o){if((U?.getCurrentUser()?.premiumType??0)===2||e==null)return o();if(!js||!nr||!Ll||!l0)return;let i=js.getCurrentValue().appearance,s=i!=null?nr.fromBinary(nr.toBinary(i),l0.BINARY_READ_OPTIONS):nr.create();s.theme=t;let l=Ll.create({backgroundGradientPresetId:{value:e}});s.clientThemeSettings??=l,s.clientThemeSettings.backgroundGradientPresetId=l.backgroundGradientPresetId;let c=js.ProtoClass.create();c.appearance=s,O.dispatch({type:"USER_SETTINGS_PROTO_UPDATE",local:!0,partial:!0,settings:{type:1,proto:c}})},trimContent(e){let t=e[0];typeof t=="string"&&(e[0]=t.trimStart()),e[0]===""&&e.shift();let o=e.length-1,r=e[o];typeof r=="string"&&(e[o]=r.trimEnd()),e[o]===""&&e.pop()},clearEmptyArrayItems(e){return e.filter(t=>t!=null)},ensureChildrenIsArray(e){Array.isArray(e.props.children)||(e.props.children=[e.props.children])},patchFakeNitroEmojisOrRemoveStickersLinks(e,t){if((e.length>1||typeof e[0]?.type=="string")&&!Je.store.transformCompoundSentence)return e;let o=e.length,r=c=>{if(Je.store.transformEmojis){let u=c.props.href.match(Ud);if(u){let p=null;try{p=new URL(c.props.href)}catch{}let d=Ro.getCustomEmojiById(u[1])?.name??p?.searchParams.get("name")??"FakeNitroEmoji";return Be.defaultRules.customEmoji.react({jumboable:!t&&e.length===1&&typeof e[0].type!="string",animated:u[2]==="gif",emojiId:u[1],name:d,fake:!0},void 0,{key:String(o++)})}}if(Je.store.transformStickers){if($d.test(c.props.href))return null;let u=c.props.href.match(El);if(u&&zr.getStickerById(u[1]))return null}return c},i=c=>c?.props?.trusted!=null?r(c):c?.props?.children!=null?Array.isArray(c.props.children)?(c.props.children=l(c.props.children),c.props.children.length===0?null:c):(c.props.children=s(c.props.children),c):c,s=c=>{let u=i(c);if(u?.type==="ul"||u?.type==="ol"){if(this.ensureChildrenIsArray(u),u.props.children.length===0)return null;let p=!1;for(let[d,h]of u.props.children.entries()){if(h==null){delete u.props.children[d];continue}this.ensureChildrenIsArray(h),h.props.children.length>0?p=!0:delete u.props.children[d]}if(!p)return null;u.props.children=this.clearEmptyArrayItems(u.props.children)}return u},l=c=>{for(let[u,p]of c.entries())c[u]=s(p);return c=this.clearEmptyArrayItems(c),this.trimContent(c),c};try{return l(Mr.cloneDeep(e))}catch(c){return new ie("FakeNitro").error(c),e}},patchFakeNitroStickers(e,t){let o=[],r=t.content.split(/\s/);Je.store.transformCompoundSentence?o.push(...r):r.length===1&&o.push(r[0]),o.push(...t.attachments.filter(i=>i.content_type==="image/gif").map(i=>i.url));for(let i of o){if(!Je.store.transformCompoundSentence&&!i.startsWith("http"))continue;let s=i.match($d);if(s){let c=null;try{c=new URL(i)}catch{}let u=zr.getStickerById(s[1])?.name??c?.searchParams.get("name")??"FakeNitroSticker";e.push({format_type:1,id:s[1],name:u,fake:!0});continue}let l=i.match(El);if(l){if(!zr.getStickerById(l[1]))continue;let c=zr.getStickerById(l[1])?.name??"FakeNitroSticker";e.push({format_type:2,id:l[1],name:c,fake:!0})}}return e},shouldIgnoreEmbed(e,t){let o=t.content.split(/\s/);if(o.length>1&&!Je.store.transformCompoundSentence)return!1;switch(e.type){case"image":{if(!Je.store.transformCompoundSentence&&!o.includes(e.url)&&!o.includes(e.image?.proxyURL))return!1;if(Je.store.transformEmojis&&Ud.test(e.url))return!0;if(Je.store.transformStickers){if($d.test(e.url))return!0;let r=e.url.match(El);if(r&&zr.getStickerById(r[1]))return!0}break}}return!1},filterAttachments(e){return e.filter(t=>{if(t.content_type!=="image/gif")return!0;let o=t.url.match(El);return!(o&&zr.getStickerById(o[1]))})},shouldKeepEmojiLink(e){return e.target&&Ud.test(e.target)},addFakeNotice(e,t,o){if(!o)return t;switch(t=Array.isArray(t)?t:[t],e){case 0:return t.push(" This is a FakeNitro sticker and renders like a real sticker only for you. Appears as a link to non-plugin users."),t;case 1:return t.push(" This is a FakeNitro emoji and renders like a real emoji only for you. Appears as a link to non-plugin users."),t}},hasPermissionToUseExternalEmojis(e){let t=Q.getChannel(e);return!t||t.isDM()||t.isGroupDM()||t.isMultiUserDM()?!0:_e.can(nN,t)},hasPermissionToUseExternalStickers(e){let t=Q.getChannel(e);return!t||t.isDM()||t.isGroupDM()||t.isMultiUserDM()?!0:_e.can(rN,t)},getStickerLink(e){return`https://media.discordapp.net/stickers/${e}.png?size=${E.plugins.FakeNitro.stickerSize}`},async sendAnimatedSticker(e,t,o){let{parseURL:r}=qS(),{frames:i,width:s,height:l}=await r(e),c=(0,Ci.GIFEncoder)(),u=E.plugins.FakeNitro.stickerSize,p=document.createElement("canvas");p.width=u,p.height=u;let d=p.getContext("2d",{willReadFrequently:!0}),h=u/Math.max(s,l);d.scale(h,h);let v;for(let N of i){let{left:b,top:I,width:k,height:M,img:F,delay:H,blendOp:X,disposeOp:Z}=N;v=d.getImageData(b,I,k,M),X===0&&d.clearRect(b,I,k,M),d.drawImage(F,b,I,k,M);let{data:q}=d.getImageData(0,0,u,u),L=(0,Ci.quantize)(q,256),V=(0,Ci.applyPalette)(q,L);c.writeFrame(V,u,u,{transparent:!0,palette:L,delay:H}),Z===1?d.clearRect(b,I,k,M):Z===2&&d.putImageData(v,b,I)}c.finish();let T=new File([c.bytesView()],`${t}.gif`,{type:"image/gif"});rs.promptToUpload([T],Q.getChannel(o),oN)},start(){let e=Je.store;if(!e.enableEmojiBypass&&!e.enableStickerBypass)return;function t(o,r){return!o[r]||/\s/.test(o[r])?"":" "}this.preSend=Kt((o,r,i)=>{let{guildId:s}=this;e:{if(!e.enableStickerBypass)break e;let l=zr.getStickerById(i.stickers?.[0]);if(!l||"pack_id"in l)break e;let c=this.canUseStickers&&this.hasPermissionToUseExternalStickers(o);if(l.available!==!1&&(c||l.guild_id===s))break e;let u=this.getStickerLink(l.id);if(l.format_type===4&&u.includes(".png")&&(u=u.replace(".png",".gif")),l.format_type===2)return this.sendAnimatedSticker(u,l.id,o),{cancel:!0};i.stickers.length=0,r.content+=` ${u}&name=${encodeURIComponent(l.name)}`}if(e.enableEmojiBypass){let l=this.canUseEmotes&&this.hasPermissionToUseExternalEmojis(o);for(let c of r.validNonShortcutEmojis){if(!c.require_colons||c.available!==!1&&l||c.guildId===s&&!c.animated)continue;let u=`<${c.animated?"a":""}:${c.originalName||c.name}:${c.id}>`,p=c.url.replace(/\?size=\d+/,"?"+new URLSearchParams({size:E.plugins.FakeNitro.emojiSize,name:encodeURIComponent(c.name)}));r.content=r.content.replace(u,(d,h,v)=>`${t(v,h-1)}${p}${t(v,h+d.length)}`)}}return{cancel:!1}}),this.preEdit=Br((o,r,i)=>{if(!e.enableEmojiBypass)return;let s=this.canUseEmotes&&this.hasPermissionToUseExternalEmojis(o),{guildId:l}=this;i.content=i.content.replace(/(?<!\\)<a?:(?:\w+):(\d+)>/ig,(c,u,p,d)=>{let h=Ro.getCustomEmojiById(u);if(h==null||!h.require_colons||h.available!==!1&&s||h.guildId===l&&!h.animated)return c;let v=h.url.replace(/\?size=\d+/,"?"+new URLSearchParams({size:E.plugins.FakeNitro.emojiSize,name:encodeURIComponent(h.name)}));return`${t(d,p-1)}${v}${t(d,p+c.length)}`})})},stop(){Yt(this.preSend),Fr(this.preEdit)}})});function p0(...e){let t={};function o(i){for(let s=e.length-1;s>=0;s--)if(i in e[s])return e[s];return t}let r={ownKeys(){return e.reduce((i,s)=>(i.push(...Reflect.ownKeys(s)),i),Reflect.ownKeys(t))}};for(let i of["defineProperty","deleteProperty","get","getOwnPropertyDescriptor","has","set"])r[i]=function(s,...l){return Reflect[i](o(l[0]),...l)};return new Proxy(t,r)}var d0,m0=g(()=>{"use strict";a();d0=p0;typeof module<"u"&&(module.exports=p0)});function iN(e,t){let o=`[#${e.toString(16).padStart(6,"0")},#${t.toString(16).padStart(6,"0")}]`,r="",i=Array.from(o).map(s=>s.codePointAt(0)).filter(s=>s>=32&&s<=127).map(s=>String.fromCodePoint(s+917504)).join("");return(r||"")+" "+i}function sN(e){if(e==null)return null;let t=e.match(/\u{e005b}\u{e0023}([\u{e0061}-\u{e0066}\u{e0041}-\u{e0046}\u{e0030}-\u{e0039}]+?)\u{e002c}\u{e0023}([\u{e0061}-\u{e0066}\u{e0041}-\u{e0046}\u{e0030}-\u{e0039}]+?)\u{e005d}/u);if(t!=null){let o=[...t[0]].map(i=>String.fromCodePoint(i.codePointAt(0)-917504)).join("");return o.substring(1,o.length-1).split(",").map(i=>parseInt(i.replace("#","0x"),16))}else return null}var f0,Hd,g0=g(()=>{"use strict";a();$();ae();A();it();Pe();w();x();m0();f0=D({nitroFirst:{description:"Default color source if both are present",type:4,options:[{label:"Nitro colors",value:!0,default:!0},{label:"Fake colors",value:!1}]}}),Hd=y({name:"FakeProfileThemes",description:"Allows profile theming by hiding the colors in your bio thanks to invisible 3y3 encoding",authors:[m.Alyxia,m.Remty],patches:[{find:"UserProfileStore",replacement:{match:/(?<=getUserProfile\(\i\){return )(\i\[\i\])/,replace:"$self.colorDecodeHook($1)"}},{find:".USER_SETTINGS_PROFILE_THEME_ACCENT",replacement:{match:/RESET_PROFILE_THEME}\)(?<=color:(\i),.{0,500}?color:(\i),.{0,500}?)/,replace:"$&,$self.addCopy3y3Button({primary:$1,accent:$2})"}}],settingsAboutComponent:()=>n(S.FormSection,null,n(S.FormTitle,{tag:"h3"},"Usage"),n(S.FormText,null,"After enabling this plugin, you will see custom colors in the profiles of other people using compatible plugins. ",n("br",null),"To set your own colors:",n("ul",null,n("li",null,"\u2022 go to your profile settings"),n("li",null,"\u2022 choose your own colors in the Nitro preview"),n("li",null,'\u2022 click the "Copy 3y3" button'),n("li",null,"\u2022 paste the invisible text anywhere in your bio")),n("br",null),n("b",null,"Please note:")," if you are using a theme which hides nitro ads, you should disable it temporarily to set colors.")),settings:f0,colorDecodeHook(e){if(e){if(f0.store.nitroFirst&&e.themeColors)return e;let t=sN(e.bio);if(t)return d0(e,{premiumType:2,themeColors:t})}return e},addCopy3y3Button:B.wrap(function({primary:e,accent:t}){return n(C,{onClick:()=>{let o=iN(e,t);vo(o)},color:C.Colors.PRIMARY,size:C.Sizes.XLARGE,className:z.left16},"Copy 3y3")},{noop:!0})})});var zd,h0=g(()=>{"use strict";a();A();w();x();zd=y({name:"FavoriteEmojiFirst",authors:[m.Aria,m.Ven],description:"Puts your favorite emoji first in the emoji autocomplete.",patches:[{find:"renderResults({results:",replacement:[{match:/let \i=.{1,100}renderResults\({results:(\i)\.query\.results,/,replace:"$self.sortEmojis($1);$&"}]},{find:"MAX_AUTOCOMPLETE_RESULTS+",replacement:[{match:/,maxCount:(\i)(.{1,500}\i)=(\i)\.slice\(0,(\i-\i\.length)\)/,replace:",maxCount:Infinity$2=($3.sliceTo = $4, $3)"}]}],sortEmojis({query:e}){if(e?.type!=="EMOJIS_AND_STICKERS"||e.typeInfo?.sentinel!==":"||!e.results?.emojis?.length)return;let t=Ro.getDisambiguatedEmojiContext();e.results.emojis=e.results.emojis.sort((o,r)=>{let i=t.isFavoriteEmojiWithoutFetchingLatest(o),s=t.isFavoriteEmojiWithoutFetchingLatest(r);return i&&!s?-1:!i&&s?1:0}).slice(0,e.results.emojis.sliceTo??10)}})});function lN({instance:e,SearchBarComponent:t}){let[o,r]=Y(""),i=to(null),s=La(l=>{r(l);let{props:c}=e;if(l===""){c.favorites=c.favCopy,e.forceUpdate();return}i.current?.containerRef?.current.closest("#gif-picker-tab-panel")?.querySelector('[class|="content"]')?.firstElementChild?.scrollTo(0,0);let u=c.favCopy.map(p=>({score:cN(l.toLowerCase(),v0(p.url??p.src).replace(/(%20|[_-])/g," ").toLowerCase()),gif:p})).filter(p=>p.score!=null);u.sort((p,d)=>d.score-p.score),c.favorites=u.map(p=>p.gif),e.forceUpdate()},[e.state]);return pe(()=>()=>{e.dead=!0},[]),n(t,{ref:i,autoFocus:!0,className:aN.searchBar,size:t.Sizes.MEDIUM,onChange:s,onClear:()=>{r(""),e.props.favCopy!=null&&(e.props.favorites=e.props.favCopy,e.forceUpdate())},query:o,placeholder:"Search Favorite Gifs"})}function v0(e){let t=new URL(e);switch(y0.store.searchOption){case"url":return t.href;case"path":return t.host==="media.discordapp.net"||t.host==="tenor.com"?t.pathname.split("/").at(-1)??t.pathname:t.pathname;case"hostandpath":return t.host==="media.discordapp.net"||t.host==="tenor.com"?`${t.host} ${t.pathname.split("/").at(-1)??t.pathname}`:`${t.host} ${t.pathname}`;default:return""}}function cN(e,t){let o=0,r=0;for(let i=0;i<t.length;i++)if(t[i]===e[o]?(r++,o++):r--,o===e.length)return r;return null}var aN,y0,jd,S0=g(()=>{"use strict";a();$();ae();A();w();j();x();aN=P("searchBar","searchBarFullRow"),y0=D({searchOption:{type:4,description:"The part of the url you want to search",options:[{label:"Entire Url",value:"url"},{label:"Path Only (/somegif.gif)",value:"path"},{label:"Host & Path (tenor.com somgif.gif)",value:"hostandpath",default:!0}]}}),jd=y({name:"FavoriteGifSearch",authors:[m.Aria],description:"Adds a search bar to favorite gifs.",patches:[{find:"renderHeaderContent()",replacement:[{match:/(renderHeaderContent\(\).{1,150}FAVORITES:return)(.{1,150});(case.{1,200}default:return\(0,\i\.jsx\)\((?<searchComp>\i\..{1,10}),)/,replace:"$1 this.state.resultType === 'Favorites' ? $self.renderSearchBar(this, $<searchComp>) : $2;$3"},{match:/(,suggestions:\i,favorites:)(\i),/,replace:"$1$self.getFav($2),favCopy:$2,"}]}],settings:y0,getTargetString:v0,instance:null,renderSearchBar(e,t){return this.instance=e,n(B,{noop:!0},n(lN,{instance:e,SearchBarComponent:t}))},getFav(e){if(!this.instance||this.instance.dead)return e;let{favorites:t}=this.instance.props;return t!=null&&t?.length!==e.length?t:e}})});var Wd,b0=g(()=>{"use strict";a();$();ks();A();w();Wd=y({name:"FixSpotifyEmbeds",description:"Fixes spotify embeds being incredibly loud by letting you customise the volume",authors:[m.Ven],settings:D({volume:{type:5,description:"The volume % to set for spotify embeds. Anything above 10% is veeeery loud",markers:$o(0,100,10),stickToMarkers:!1,default:10}})})});var qd,T0=g(()=>{"use strict";a();A();w();x();qd=y({name:"ForceOwnerCrown",description:"Force the owner crown next to usernames even if the server is large.",authors:[m.D3SOX,m.Nickyux],patches:[{find:"AVATAR_DECORATION_PADDING:",replacement:{match:/,isOwner:(\i),/,replace:",_isOwner:$1=$self.isGuildOwner(e),"}}],isGuildOwner(e){if(!e?.user?.id||e.channel?.type===3)return e.isOwner;let t=e.guildId??e.channel?.guild_id,o=e.user.id;return de.getGuild(t)?.ownerId===o}})});var _l,uN,Kd,x0=g(()=>{"use strict";a();ao();A();w();j();x();_l=P("createFriendInvite"),{uuid4:uN}=P("uuid4"),Kd=y({name:"FriendInvites",description:"Create and manage friend invite links via slash commands (/create friend invite, /view friend invites, /revoke friend invites).",authors:[m.afn,m.Dziurwa],dependencies:["CommandsAPI"],commands:[{name:"create friend invite",description:"Generates a friend invite link.",inputType:3,options:[{name:"Uses",description:"How many uses?",choices:[{label:"1",name:"1",value:"1"},{label:"5",name:"5",value:"5"}],required:!1,type:4}],execute:async(e,t)=>{let o=lt(e,"Uses",5);if(o===1&&!U.getCurrentUser().phone)return me(t.channel.id,{content:"You need to have a phone number connected to your account to create a friend invite with 1 use!"});let r;if(o===1){let i=uN(),{body:{invite_suggestions:s}}=await Nt.post({url:"/friend-finder/find-friends",body:{modified_contacts:{[i]:[1,"",""]},phone_contact_methods_count:1}});r=await _l.createFriendInvite({code:s[0][3],recipient_phone_number_or_email:i,contact_visibility:1,filter_visibilities:[],filtered_invite_suggestions_index:1})}else r=await _l.createFriendInvite();me(t.channel.id,{content:`
discord.gg/${r.code} \xB7
Expires: <t:${new Date(r.expires_at).getTime()/1e3}:R> \xB7
Max uses: \`${r.max_uses}\`
`.trim().replace(/\s+/g," ")})}},{name:"view friend invites",description:"View a list of all generated friend invites.",inputType:3,execute:async(e,t)=>{let r=(await _l.getAllFriendInvites()).map(i=>`
_discord.gg/${i.code}_ \xB7
Expires: <t:${new Date(i.expires_at).getTime()/1e3}:R> \xB7
Times used: \`${i.uses}/${i.max_uses}\`
`.trim().replace(/\s+/g," "));me(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 _l.revokeFriendInvites(),me(t.channel.id,{content:"All friend invites have been revoked."})}}]})});var Yd,w0=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/gameActivityToggle/style.css",{name:"src/plugins/gameActivityToggle/style.css",source:`[class*="withTagAsButton"] {
min-width: 88px !important;
}
`,classNames:{},dom:null});Yd="src/plugins/gameActivityToggle/style.css"});function dN(e){let{oldIcon:t}=M0.use(["oldIcon"]),o=t?"M23 2.27 21.73 1 1 21.73 2.27 23 23 2.27Z":"M22.7 2.7a1 1 0 0 0-1.4-1.4l-20 20a1 1 0 1 0 1.4 1.4Z",r=t?"M23.27 4.54 19.46.73 .73 19.46 4.54 23.27 23.27 4.54Z":"M23.27 4.73 19.27 .73 -.27 20.27 3.73 24.27Z";return function(){return n("svg",{width:"20",height:"20",viewBox:"0 0 24 24"},n("path",{fill:!e&&!t?"var(--status-danger)":"currentColor",mask:e?void 0:"url(#gameActivityMask)",d:"M3.06 20.4q-1.53 0-2.37-1.065T.06 16.74l1.26-9q.27-1.8 1.605-2.97T6.06 3.6h11.88q1.8 0 3.135 1.17t1.605 2.97l1.26 9q.21 1.53-.63 2.595T20.94 20.4q-.63 0-1.17-.225T18.78 19.5l-2.7-2.7H7.92l-2.7 2.7q-.45.45-.99.675t-1.17.225Zm14.94-7.2q.51 0 .855-.345T19.2 12q0-.51-.345-.855T18 10.8q-.51 0-.855.345T16.8 12q0 .51.345 .855T18 13.2Zm-2.4-3.6q.51 0 .855-.345T16.8 8.4q0-.51-.345-.855T15.6 7.2q-.51 0-.855.345T14.4 8.4q0 .51.345 .855T15.6 9.6ZM6.9 13.2h1.8v-2.1h2.1v-1.8h-2.1v-2.1h-1.8v2.1h-2.1v1.8h2.1v2.1Z"}),!e&&n(f,null,n("path",{fill:"var(--status-danger)",d:o}),n("mask",{id:"gameActivityMask"},n("rect",{fill:"white",x:"0",y:"0",width:"24",height:"24"}),n("path",{fill:"black",d:r}))))}}function mN(){let e=ri.ShowCurrentGame.useSetting();return n(pN,{tooltipText:e?"Disable Game Activity":"Enable Game Activity",icon:dN(e),role:"switch","aria-checked":!e,onClick:()=>ri.ShowCurrentGame.updateSetting(t=>!t)})}var pN,M0,Zd,P0=g(()=>{"use strict";a();$();rt();ae();A();w();j();x();w0();pN=je("Button.Sizes.NONE,disabled:");M0=D({oldIcon:{type:3,description:"Use the old icon style before Discord icon redesign",default:!1}}),Zd=y({name:"GameActivityToggle",description:"Adds a button next to the mic and deafen button to toggle game activity.",authors:[m.Nuckyz,m.RuukuLada],settings:M0,patches:[{find:".Messages.ACCOUNT_SPEAKING_WHILE_MUTED",replacement:{match:/this\.renderNameZone\(\).+?children:\[/,replace:"$&$self.GameActivityToggleButton(),"}}],GameActivityToggleButton:B.wrap(mN,{noop:!0}),start(){xt(Yd)},stop(){jt(Yd)}})});var fN,Xd,I0=g(()=>{"use strict";a();A();ct();w();j();({closeExpressionPicker:fN}=P("closeExpressionPicker")),Xd=y({name:"GifPaste",description:"Makes picking a gif in the gif picker insert a link into the chatbox instead of instantly sending it",authors:[m.Ven],patches:[{find:".handleSelectGIF=",replacement:{match:/\.handleSelectGIF=(\i)=>\{/,replace:".handleSelectGIF=$1=>{if (!this.props.className) return $self.handleSelect($1);"}}],handleSelect(e){e&&(bn(e.url+" "),fN())}})});function N0(e,t,o){let r=no.getSendMessageOptionsForReply({channel:e,message:t,shouldMention:!0,showMentionToggle:!0});if(Ol.store.greetMode==="Message"||o.length>1){r.stickerIds=o;let i={content:"",tts:!1,invalidEmojis:[],validNonShortcutEmojis:[]};no._sendMessage(e.id,i,r)}else no.sendGreetMessage(e.id,o[0],r)}function gN({channel:e,message:t}){let o=Ol.use(["greetMode","multiGreetChoices"]),{greetMode:r,multiGreetChoices:i=[]}=o;return n(G.Menu,{navId:"greet-sticker-picker",onClose:()=>O.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Greet Sticker Picker"},n(G.MenuGroup,{label:"Greet Mode"},Object.values(C0).map(s=>n(G.MenuRadioItem,{key:s,group:"greet-mode",id:"greet-mode-"+s,label:s,checked:s===r,action:()=>o.greetMode=s}))),n(G.MenuSeparator,null),n(G.MenuGroup,{label:"Greet Stickers"},A0.map(s=>n(G.MenuItem,{key:s.id,id:"greet-"+s.id,label:s.description.split(" ")[0],action:()=>N0(e,t,[s.id])}))),Ol.store.unholyMultiGreetEnabled?n(f,null,n(G.MenuSeparator,null),n(G.MenuItem,{label:"Unholy Multi-Greet",id:"unholy-multi-greet"},A0.map(s=>{let l=i.some(c=>c===s.id);return n(G.MenuCheckboxItem,{key:s.id,id:"multi-greet-"+s.id,label:s.description.split(" ")[0],checked:l,disabled:!l&&i.length>=3,action:()=>{o.multiGreetChoices=l?i.filter(c=>c!==s.id):[...i,s.id]}})}),n(G.MenuSeparator,null),n(G.MenuItem,{id:"multi-greet-submit",label:"Send Greets",action:()=>N0(e,t,i),disabled:i.length===0}))):null)}var C0,Ol,A0,Jd,k0=g(()=>{"use strict";a();$();A();w();j();x();C0=(o=>(o.Greet="Greet",o.NormalMessage="Message",o))(C0||{}),Ol=D({greetMode:{type:4,options:[{label:"Greet (you can only greet 3 times)",value:"Greet",default:!0},{label:"Normal Message (you can greet spam)",value:"Message"}],description:"Choose the greet mode"}}).withPrivateSettings(),{WELCOME_STICKERS:A0}=P("WELCOME_STICKERS");Jd=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:[m.Ven],settings:Ol,patches:[{find:"Messages.WELCOME_CTA_LABEL",replacement:{match:/innerClassName:\i\.welcomeCTAButton,(?<={channel:\i,message:\i}=(\i).{0,400}?)/,replace:"$&onContextMenu:(vcEvent)=>$self.pickSticker(vcEvent, $1),"}}],pickSticker(e,t){t.message.deleted||Ut.openContextMenu(e,()=>n(gN,{...t}))}})});var Qd={};ze(Qd,{_buildPopoverElements:()=>yN,addButton:()=>zo,buttons:()=>Bl,removeButton:()=>jo});function zo(e,t){Bl.set(e,t)}function jo(e){Bl.delete(e)}function yN(e,t){let o=[];for(let[r,i]of Bl.entries())try{let s=i(e);s&&(s.key??=r,o.push(t(s)))}catch(s){hN.error(`[${r}]`,s)}return o}var hN,Bl,jr=g(()=>{"use strict";a();Ve();hN=new ie("MessagePopover"),Bl=new Map});var Ws,D0,qs,R0,vN,Vd,L0=g(()=>{"use strict";a();Vo();jr();Lt();A();w();x();D0="HideAttachments_HiddenIds",qs=new Set,R0=()=>Dt(D0).then(e=>(qs=e??new Set,qs)),vN=e=>io(D0,e),Vd=y({name:"HideAttachments",description:"Hide attachments and Embeds for individual messages via hover button",authors:[m.Ven],dependencies:["MessagePopoverAPI"],async start(){Ws=document.createElement("style"),Ws.id="VencordHideAttachments",document.head.appendChild(Ws),await R0(),await this.buildCss(),zo("HideAttachments",e=>{if(!e.attachments.length&&!e.embeds.length&&!e.stickerItems.length)return null;let t=qs.has(e.id);return{label:t?"Show Attachments":"Hide Attachments",icon:t?sl:al,message:e,channel:Q.getChannel(e.channel_id),onClick:()=>this.toggleHide(e.id)}})},stop(){Ws.remove(),qs.clear(),jo("HideAttachments")},async buildCss(){let e=[...qs].map(t=>`#message-accessories-${t}`).join(",");Ws.textContent=`
:is(${e}) :is([class*="embedWrapper"], [class*="clickableSticker"]) {
/* 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 R0();t.delete(e)||t.add(e),await vN(t),await this.buildCss()}})});var em,E0=g(()=>{"use strict";a();A();w();em=y({name:"iLoveSpam",description:"Do not hide messages from 'likely spammers'",authors:[m.botato,m.Nyako],patches:[{find:"hasFlag:{writable",replacement:{match:/if\((\i)<=(?:1<<30|1073741824)\)return/,replace:"if($1===(1<<20))return false;$&"}}]})});function B0(e,t,o,r){return n(ee,{text:t},i=>n("button",{...i,onClick:s=>TN(s,e),style:{all:"unset",cursor:"pointer",display:"flex",justifyContent:"center",alignItems:"center"}},n("svg",{width:"24",height:"24",viewBox:"0 -960 960 960"},n("path",{fill:r,d:o}))))}function O0(e,t=!1){let o=ki.use(["ignoredActivities"]),{ignoredActivities:r=[]}=o;return r.some(i=>i.id===e.id)?bN(e,"var(--status-danger)"):SN(e,t?"var(--green-300)":"var(--primary-400)")}function TN(e,t){e.stopPropagation();let o=rr().findIndex(r=>r.id===t.id);o===-1?ki.store.ignoredActivities=rr().concat(t):ki.store.ignoredActivities=rr().filter((r,i)=>i!==o),ri.ShowCurrentGame.updateSetting(r=>r)}function rr(){return ki.store.ignoredActivities??=[]}var _0,SN,bN,ki,tm,F0=g(()=>{"use strict";a();Vo();$();ae();A();w();j();x();_0=Re("RunningGameStore");SN=(e,t)=>B0(e,"Disable Activity","M480-320q75 0 127.5-52.5T660-500q0-75-52.5-127.5T480-680q-75 0-127.5 52.5T300-500q0 75 52.5 127.5T480-320Zm0-72q-45 0-76.5-31.5T372-500q0-45 31.5-76.5T480-608q45 0 76.5 31.5T588-500q0 45-31.5 76.5T480-392Zm0 192q-146 0-266-81.5T40-500q54-137 174-218.5T480-800q146 0 266 81.5T920-500q-54 137-174 218.5T480-200Zm0-300Zm0 220q113 0 207.5-59.5T832-500q-50-101-144.5-160.5T480-720q-113 0-207.5 59.5T128-500q50 101 144.5 160.5T480-280Z",t),bN=(e,t)=>B0(e,"Enable Activity","m644-428-58-58q9-47-27-88t-93-32l-58-58q17-8 34.5-12t37.5-4q75 0 127.5 52.5T660-500q0 20-4 37.5T644-428Zm128 126-58-56q38-29 67.5-63.5T832-500q-50-101-143.5-160.5T480-720q-29 0-57 4t-55 12l-62-62q41-17 84-25.5t90-8.5q151 0 269 83.5T920-500q-23 59-60.5 109.5T772-302Zm20 246L624-222q-35 11-70.5 16.5T480-200q-151 0-269-83.5T40-500q21-53 53-98.5t73-81.5L56-792l56-56 736 736-56 56ZM222-624q-29 26-53 57t-41 67q50 101 143.5 160.5T480-280q20 0 39-2.5t39-5.5l-36-38q-11 3-21 4.5t-21 1.5q-75 0-127.5-52.5T300-500q0-11 1.5-21t4.5-21l-84-82Zm319 93Zm-151 75Z",t);ki=D({}).withPrivateSettings();tm=y({name:"IgnoreActivities",authors:[m.Nuckyz],description:"Ignore activities from showing up on your status ONLY. You can configure which ones are ignored from the Registered Games and Activities tabs.",settings:ki,patches:[{find:'.displayName="LocalActivityStore"',replacement:[{match:/HANG_STATUS.+?(?=!\i\(\i,\i\)&&)(?<=(\i)\.push.+?)/,replace:(e,t)=>`${e}${t}=${t}.filter($self.isActivityNotIgnored);`}]},{find:".Messages.SETTINGS_GAMES_TOGGLE_OVERLAY",replacement:{match:/\.Messages\.SETTINGS_GAMES_TOGGLE_OVERLAY.+?}\(\),(?<={overlay:\i,.+?=(\i),.+?)(?=!(\i))/,replace:(e,t,o)=>`${e}$self.renderToggleGameActivityButton(${t},${o}),`}},{find:".activityTitleText,variant",replacement:{match:/(?<=\i\.activityTitleText.+?children:(\i)\.name.*?}\),)/,replace:(e,t)=>`$self.renderToggleActivityButton(${t}),`}},{find:".activityCardDetails,children",replacement:{match:/(?<=\i\.activityCardDetails.+?children:(\i\.application)\.name.*?}\),)/,replace:(e,t)=>`$self.renderToggleActivityButton(${t}),`}}],async start(){let e=await Dt("IgnoreActivities_ignoredActivities");if(e!=null&&(ki.store.ignoredActivities=Array.from(e.values()).map(t=>({...t,name:"Unknown Name"})),Nu("IgnoreActivities_ignoredActivities")),rr().length!==0){let t=_0.getGamesSeen();for(let[o,r]of rr().entries())r.type===0&&(t.some(i=>i.id===r.id||i.exePath===r.id)||rr().splice(o,1))}},isActivityNotIgnored(e){if(e.type===0||e.type===3){if(e.application_id!=null)return!rr().some(t=>t.id===e.application_id);{let t=_0.getRunningGames().find(o=>o.name===e.name)?.exePath;if(t)return!rr().some(o=>o.id===t)}}return!0},renderToggleGameActivityButton(e,t){return n(B,{noop:!0},n("div",{style:{marginLeft:12,zIndex:0}},O0({id:e.id??e.exePath,name:e.name,type:0},t)))},renderToggleActivityButton(e){return n(B,{noop:!0},O0({id:e.id,name:e.name,type:1}))}})});var Ks,om=g(()=>{"use strict";a();Ks="vc-imgzoom-magnify-modal"});function nm(e,t){e()?t():requestAnimationFrame(()=>nm(e,t))}var U0=g(()=>{"use strict";a()});var xN,rm,$0=g(()=>{"use strict";a();rt();x();om();im();U0();xN=Fe("vc-imgzoom-"),rm=({instance:e,size:t,zoom:o})=>{let[r,i]=Y(!1),[s,l]=Y({x:0,y:0}),[c,u]=Y({x:0,y:0}),[p,d]=Y(0),h=to(!1),v=to(o),T=to(t),N=to(null),b=to(null),I=to(null),k=to(null);if(_.useLayoutEffect(()=>{let F=re=>{re.key==="Shift"&&(h.current=!0)},H=re=>{re.key==="Shift"&&(h.current=!1)},X=()=>{b.current.currentTime=I.current.currentTime},Z=re=>{if(e.state.mouseOver&&e.state.mouseDown){let Me=T.current/2,le={x:re.pageX,y:re.pageY},Le=-((le.x-N.current.getBoundingClientRect().left)*v.current-Me),he=-((le.y-N.current.getBoundingClientRect().top)*v.current-Me);l({x:re.x-Me,y:re.y-Me}),u({x:Le,y:he}),d(1)}else d(0)},q=re=>{e.state.mouseOver&&re.button===0&&(v.current=He.store.zoom,T.current=He.store.size,document.getElementById("image-context")&&O.dispatch({type:"CONTEXT_MENU_CLOSE"}),Z(re),d(1))},L=()=>{d(0),He.store.saveZoomValues&&(He.store.zoom=v.current,He.store.size=T.current)},V=async re=>{if(e.state.mouseOver&&e.state.mouseDown&&!h.current){let Me=v.current+re.deltaY/100*(He.store.invertScroll?-1:1)*He.store.zoomSpeed;v.current=Me<=1?1:Me,Z(re)}if(e.state.mouseOver&&e.state.mouseDown&&h.current){let Me=T.current+re.deltaY*(He.store.invertScroll?-1:1)*He.store.zoomSpeed;T.current=Me<=50?50:Me,Z(re)}};return nm(()=>e.state.readyState==="READY",()=>{let re=document.getElementById(Ks);N.current=re,re.firstElementChild.setAttribute("draggable","false"),e.props.animated&&(I.current=re.querySelector("video"),I.current.addEventListener("timeupdate",X)),i(!0)}),document.addEventListener("keydown",F),document.addEventListener("keyup",H),document.addEventListener("mousemove",Z),document.addEventListener("mousedown",q),document.addEventListener("mouseup",L),document.addEventListener("wheel",V),()=>{document.removeEventListener("keydown",F),document.removeEventListener("keyup",H),document.removeEventListener("mousemove",Z),document.removeEventListener("mousedown",q),document.removeEventListener("mouseup",L),document.removeEventListener("wheel",V),He.store.saveZoomValues&&(He.store.zoom=v.current,He.store.size=T.current)}},[]),!r)return null;let M=N.current.getBoundingClientRect();return n("div",{className:xN("lens",{"nearest-neighbor":He.store.nearestNeighbour,square:He.store.square}),style:{opacity:p,width:T.current+"px",height:T.current+"px",transform:`translate(${s.x}px, ${s.y}px)`}},e.props.animated?n("video",{ref:b,style:{position:"absolute",left:`${c.x}px`,top:`${c.y}px`},width:`${M.width*v.current}px`,height:`${M.height*v.current}px`,poster:e.props.src,src:I.current?.src??e.props.src,autoPlay:!0,loop:!0}):n("img",{ref:k,style:{position:"absolute",transform:`translate(${c.x}px, ${c.y}px)`},width:`${M.width*v.current}px`,height:`${M.height*v.current}px`,src:e.props.src,alt:""}))}});var sm,G0=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/imageZoom/styles.css",{name:"src/plugins/imageZoom/styles.css",source:`.vc-imgzoom-lens {
position: absolute;
inset: 0;
z-index: 9999;
border: 2px solid grey;
border-radius: 50%;
overflow: hidden;
cursor: none;
box-shadow: inset 0 0 10px 2px grey;
filter: drop-shadow(0 0 2px grey);
pointer-events: none;
}
.vc-imgzoom-square {
border-radius: 0;
}
.vc-imgzoom-nearest-neighbor>img {
image-rendering: pixelated;
/* https://googlechrome.github.io/samples/image-rendering-pixelated/index.html */
}
/* make the carousel take up less space so we can click the backdrop and exit out of it */
[class*="modalCarouselWrapper_"] {
top: 0 !important;
}
[class*="carouselModal_"] {
height: 0 !important;
}
`,classNames:{},dom:null});sm="src/plugins/imageZoom/styles.css"});var He,H0,am,im=g(()=>{"use strict";a();Rt();$();rt();ks();A();Nr();w();x();$0();om();G0();He=D({saveZoomValues:{type:3,description:"Whether to save zoom and lens size values",default:!0},invertScroll:{type:3,description:"Invert scroll",default:!0},nearestNeighbour:{type:3,description:"Use Nearest Neighbour Interpolation when scaling images",default:!1},square:{type:3,description:"Make the lens square",default:!1},zoom:{description:"Zoom of the lens",type:5,markers:$o(1,50,4),default:2,stickToMarkers:!1},size:{description:"Radius / Size of the lens",type:5,markers:$o(50,1e3,50),default:100,stickToMarkers:!1},zoomSpeed:{description:"How fast the zoom / lens size changes",type:5,markers:$o(.1,5,.2),default:.5,stickToMarkers:!1}}),H0=e=>()=>{e.push(n(G.MenuGroup,{id:"image-zoom"},n(G.MenuCheckboxItem,{id:"vc-square",label:"Square Lens",checked:He.store.square,action:()=>{He.store.square=!He.store.square,Ut.closeContextMenu()}}),n(G.MenuCheckboxItem,{id:"vc-nearest-neighbour",label:"Nearest Neighbour",checked:He.store.nearestNeighbour,action:()=>{He.store.nearestNeighbour=!He.store.nearestNeighbour,Ut.closeContextMenu()}}),n(G.MenuControlItem,{id:"vc-zoom",label:"Zoom",control:(t,o)=>n(G.MenuSliderControl,{ref:o,...t,minValue:1,maxValue:50,value:He.store.zoom,onChange:ro(r=>He.store.zoom=r,100)})}),n(G.MenuControlItem,{id:"vc-size",label:"Lens Size",control:(t,o)=>n(G.MenuSliderControl,{ref:o,...t,minValue:50,maxValue:1e3,value:He.store.size,onChange:ro(r=>He.store.size=r,100)})}),n(G.MenuControlItem,{id:"vc-zoom-speed",label:"Zoom Speed",control:(t,o)=>n(G.MenuSliderControl,{ref:o,...t,minValue:.1,maxValue:5,value:He.store.zoomSpeed,onChange:ro(r=>He.store.zoomSpeed=r,100),renderValue:r=>`${r.toFixed(3)}x`})})))},am=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:[m.Aria],tags:["ImageUtilities"],patches:[{find:"Messages.OPEN_IN_BROWSER",replacement:{match:/return.{1,200}\.wrapper.{1,200}src:\i,/g,replace:`$&id: '${Ks}',`}},{find:"handleImageLoad=",replacement:[{match:/showThumbhashPlaceholder:\i,/,replace:"...$self.makeProps(this),$&"},{match:/componentDidMount\(\){/,replace:"$&$self.renderMagnifier(this);"},{match:/componentWillUnmount\(\){/,replace:"$&$self.unMountMagnifier();"}]},{find:".carouselModal",replacement:{match:/(?<=\.carouselModal.{0,100}onClick:)\i,/,replace:"()=>{},"}}],settings:He,currentMagnifierElement:null,element:null,Magnifier:rm,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===Ks&&(this.currentMagnifierElement||(this.currentMagnifierElement=n(rm,{size:He.store.size,zoom:He.store.zoom,instance:e}),this.root=Tr.createRoot(this.element),this.root.render(this.currentMagnifierElement)))},unMountMagnifier(){this.root?.unmount(),this.currentMagnifierElement=null,this.root=null},onMouseOver(e){e.setState(t=>({...t,mouseOver:!0}))},onMouseOut(e){e.setState(t=>({...t,mouseOver:!1}))},onMouseDown(e,t){e.button===0&&t.setState(o=>({...o,mouseDown:!0}))},onMouseUp(e){e.setState(t=>({...t,mouseDown:!1}))},start(){xt(sm),ue("image-context",H0),this.element=document.createElement("div"),this.element.classList.add("MagnifierContainer"),document.body.appendChild(this.element)},stop(){jt(sm),this.root&&this.root.unmount(),this.element?.remove(),fe("image-context",H0)}})});function wN(e){let t=e?.message?.content,[o,r]=_.useState("password");return n(Ne,{...e},n(Xe,null,n(S.FormTitle,{tag:"h4"},"Decrypt Message")),n(We,null,n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Message with Encryption"),n(ot,{defaultValue:t,disabled:!0}),n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Password"),n(ot,{style:{marginBottom:"20px"},onChange:r})),n(pt,null,n(C,{color:C.Colors.GREEN,onClick:()=>{let i=lm(t,o,!0);!i||!e?.message||(Vencord.Plugins.plugins.InvisibleChat.buildEmbed(e?.message,i),e.onClose())}},"Decrypt"),n(C,{color:C.Colors.TRANSPARENT,look:C.Looks.LINK,style:{left:15,position:"absolute"},onClick:e.onClose},"Cancel")))}function z0(e){we(t=>n(wN,{...t,...e}))}var j0=g(()=>{"use strict";a();nt();x();Fl()});function MN(e){let[t,o]=_.useState(""),[r,i]=_.useState(""),[s,l]=_.useState("password"),[c,u]=_.useState(!1),p=t&&(c||r&&r.trim().split(" ").length>1);return n(Ne,{...e},n(Xe,null,n(S.FormTitle,{tag:"h4"},"Encrypt Message")),n(We,null,n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Secret"),n(ot,{onChange:d=>{o(d)}}),n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Cover (2 or more Words!!)"),n(ot,{disabled:c,onChange:d=>{i(d)}}),n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Password"),n(ot,{style:{marginBottom:"20px"},defaultValue:"password",onChange:d=>{l(d)}}),n(gt,{value:c,onChange:d=>{u(d)}},"Don't use a Cover")),n(pt,null,n(C,{color:C.Colors.GREEN,disabled:!p,onClick:()=>{if(!p)return;let d=K0(t,s,c?"d d":r),h=c?d.replaceAll("d",""):d;!h||(bn(h),e.onClose())}},"Send"),n(C,{color:C.Colors.TRANSPARENT,look:C.Looks.LINK,style:{left:15,position:"absolute"},onClick:()=>{e.onClose()}},"Cancel")))}function W0(){we(e=>n(MN,{...e}))}var q0=g(()=>{"use strict";a();ct();nt();x();Fl()});function PN(){return n("svg",{fill:"var(--header-secondary)",width:24,height:24,viewBox:"0 0 64 64"},n("path",{d:"M 32 9 C 24.832 9 19 14.832 19 22 L 19 27.347656 C 16.670659 28.171862 15 30.388126 15 33 L 15 49 C 15 52.314 17.686 55 21 55 L 43 55 C 46.314 55 49 52.314 49 49 L 49 33 C 49 30.388126 47.329341 28.171862 45 27.347656 L 45 22 C 45 14.832 39.168 9 32 9 z M 32 13 C 36.963 13 41 17.038 41 22 L 41 27 L 23 27 L 23 22 C 23 17.038 27.037 13 32 13 z"}))}function IN(){return n(ee,{text:"This message has a hidden message! (InvisibleChat)"},({onMouseEnter:e,onMouseLeave:t})=>n("img",{"aria-label":"Hidden Message Indicator (InvisibleChat)",onMouseEnter:e,onMouseLeave:t,src:"https://github.com/SammCheese/invisible-chat/raw/NewReplugged/src/assets/lock.png",width:20,height:20,style:{transform:"translateY(4p)",paddingInline:4}}))}function AN(e){return e.type.analyticsName!=="normal"?null:n(ee,{text:"Encrypt Message"},({onMouseEnter:t,onMouseLeave:o})=>n("div",{style:{display:"flex"}},n(C,{"aria-haspopup":"dialog","aria-label":"Encrypt Message",size:"",look:eo.BLANK,onMouseEnter:t,onMouseLeave:o,innerClassName:St.button,onClick:()=>W0(),style:{padding:"0 2px",scale:"0.9"}},n("div",{className:St.buttonWrapper},n("svg",{"aria-hidden":!0,role:"img",width:"32",height:"32",viewBox:"0 0 64 64",style:{scale:"1.1"}},n("path",{fill:"currentColor",d:"M 32 9 C 24.832 9 19 14.832 19 22 L 19 27.347656 C 16.670659 28.171862 15 30.388126 15 33 L 15 49 C 15 52.314 17.686 55 21 55 L 43 55 C 46.314 55 49 52.314 49 49 L 49 33 C 49 30.388126 47.329341 28.171862 45 27.347656 L 45 22 C 45 14.832 39.168 9 32 9 z M 32 13 C 36.963 13 41 17.038 41 22 L 41 27 L 23 27 L 23 22 C 23 17.038 27.037 13 32 13 z"}))))))}function K0(e,t,o){return cm.hide(e+"\u200B",t,o)}function lm(e,t,o){let r=cm.reveal(e,t);return o?r.replace("\u200B",""):r}function NN(e){return e.endsWith("\u200B")}async function CN(e){let t=Y0.store.savedPasswords.split(",").map(r=>r.trim());if(!e?.content||!t?.length)return!1;let{content:o}=e;/^\W/.test(e.content)&&(o=`d ${e.content}d`);for(let r=0;r<t.length;r++){let i=lm(o,t[r],!1);if(NN(i))return i}return!1}var cm,Y0,um,Fl=g(()=>{"use strict";a();jr();$();ae();A();Cl();w();x();j0();q0();Y0=D({savedPasswords:{type:0,default:"password, Password",description:"Saved Passwords (Seperated with a , )"}}),um=y({name:"InvisibleChat",description:"Encrypt your Messages in a non-suspicious way!",authors:[m.SammCheese],dependencies:["MessagePopoverAPI"],patches:[{find:".Messages.MESSAGE_EDITED,",replacement:{match:/let\{className:\i,message:\i[^}]*\}=(\i)/,replace:"try {$1 && $self.INV_REGEX.test($1.message.content) ? $1.content.push($self.indicator()) : null } catch {};$&"}},{find:"ChannelTextAreaButtons",replacement:{match:/(\i)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&,(()=>{try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}})()"}}],EMBED_API_URL:"https://embed.sammcheese.net",INV_REGEX:new RegExp(/( \u200c|\u200d |[\u2060-\u2064])[^\u200b]/),URL_REGEX:new RegExp(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/),settings:Y0,async start(){let{default:e}=await ZS();cm=new e(!0,!1),zo("invDecrypt",t=>this.INV_REGEX.test(t?.content)?{label:"Decrypt Message",icon:this.popOverIcon,message:t,channel:Q.getChannel(t.channel_id),onClick:async()=>{await CN(t).then(o=>o?void this.buildEmbed(t,o):void z0({message:t}))}}:null)},stop(){jo("invDecrypt")},async getEmbed(e){let{body:t}=await Nt.post({url:"/unfurler/embed-urls",body:{urls:[e]}});return await t.embeds[0]},async buildEmbed(e,t){let o=t.match(this.URL_REGEX);if(e.embeds.push({type:"rich",title:"Decrypted Message",color:"0x45f5f5",description:t,footer:{text:"Made with \u2764\uFE0F by c0dine and Sammy!"}}),o?.length){let r=await this.getEmbed(new URL(o[0]));r&&e.embeds.push(r)}this.updateMessage(e)},updateMessage:e=>{O.dispatch({type:"MESSAGE_UPDATE",message:e})},chatBarIcon:B.wrap(AN,{noop:!0}),popOverIcon:()=>n(PN,null),indicator:B.wrap(IN,{noop:!0})})});function Z0(e,t){!Q.hasChannel(t)||Do.transitionTo(`/channels/${e??"@me"}/${t}`)}var Ul,wo,pm,X0=g(()=>{"use strict";a();Vo();A();w();x();Ul=!1;pm=y({name:"KeepCurrentChannel",description:"Attempt to navigate to the channel you were in before switching accounts or loading Discord.",authors:[m.Nuckyz],flux:{LOGOUT(e){({isSwitchingAccount:Ul}=e)},CONNECTION_OPEN(){!Ul||(Ul=!1,wo?.channelId&&Z0(wo.guildId,wo.channelId))},async CHANNEL_SELECT({guildId:e,channelId:t}){Ul||(wo={guildId:e,channelId:t},await io("KeepCurrentChannel_previousData",wo))}},async start(){wo=await Dt("KeepCurrentChannel_previousData"),wo?wo.channelId&&Z0(wo.guildId,wo.channelId):(wo={guildId:mo.getGuildId(),channelId:be.getChannelId()??null},await io("KeepCurrentChannel_previousData",wo))}})});async function dm(e){return(await Pr.fetchAssetIds(mm,[e]))[0]}function DN(e){O.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e,socketId:"LastFM"})}var mm,kN,J0,RN,Mo,fm,Q0=g(()=>{"use strict";a();$();xo();A();Ve();w();j();x();mm="1108588077900898414",kN="2a96cbd8b46e442fc41c2b86b821562f",J0=new ie("LastFMRichPresence"),RN=P("getLocalPresence");Mo=D({username:{description:"last.fm username",type:0},apiKey:{description:"last.fm api key",type:0},shareUsername:{description:"show link to last.fm profile",type:3,default:!1},hideWithSpotify:{description:"hide last.fm presence if spotify is running",type:3,default:!0},statusName:{description:"custom status text",type:0,default:"some music"},nameFormat:{description:"Show name of song and artist in status name",type:4,options:[{label:"Use custom status name",value:"status-name",default:!0},{label:"Use format 'artist - song'",value:"artist-first"},{label:"Use format 'song - artist'",value:"song-first"},{label:"Use artist name only",value:"artist"},{label:"Use song name only",value:"song"}]},useListeningStatus:{description:'show "Listening to" status instead of "Playing"',type:3,default:!1},missingArt:{description:"When album or album art is missing",type:4,options:[{label:"Use large Last.fm logo",value:"lastfmLogo",default:!0},{label:"Use generic placeholder",value:"placeholder"}]}}),fm=y({name:"LastFMRichPresence",description:"Little plugin for Last.fm rich presence",authors:[m.dzshn,m.RuiNtD,m.blahajZip,m.archeruwu],settingsAboutComponent:()=>n(f,null,n(S.FormTitle,{tag:"h3"},"How to get an API key"),n(S.FormText,null,"An API key is required to fetch your current track. To get one, you can visit ",n(qe,{href:"https://www.last.fm/api/account/create"},"this page")," and fill in the following information: ",n("br",null)," ",n("br",null),"Application name: Discord Rich Presence ",n("br",null),"Application description: (personal use) ",n("br",null)," ",n("br",null),"And copy the API key (not the shared secret!)")),settings:Mo,start(){this.updatePresence(),this.updateInterval=setInterval(()=>{this.updatePresence()},16e3)},stop(){clearInterval(this.updateInterval)},async fetchTrackData(){if(!Mo.store.username||!Mo.store.apiKey)return null;try{let e=new URLSearchParams({method:"user.getrecenttracks",api_key:Mo.store.apiKey,user:Mo.store.username,limit:"1",format:"json"}),t=await fetch(`https://ws.audioscrobbler.com/2.0/?${e}`);if(!t.ok)throw`${t.status} ${t.statusText}`;let o=await t.json();if(o.error)return J0.error("Error from Last.fm API",`${o.error}: ${o.message}`),null;let r=o.recenttracks?.track[0];return r?.["@attr"]?.nowplaying?{name:r.name||"Unknown",album:r.album["#text"],artist:r.artist["#text"]||"Unknown",url:r.url,imageUrl:r.image?.find(i=>i.size==="large")?.["#text"]}:null}catch(e){return J0.error("Failed to query Last.fm API",e),null}},async updatePresence(){DN(await this.getActivity())},getLargeImage(e){if(e.imageUrl&&!e.imageUrl.includes(kN))return e.imageUrl;if(Mo.store.missingArt==="placeholder")return"placeholder"},async getActivity(){if(Mo.store.hideWithSpotify){for(let s of RN.getActivities())if(s.type===2&&s.application_id!==mm)return null}let e=await this.fetchTrackData();if(!e)return null;let t=this.getLargeImage(e),o=t?{large_image:await dm(t),large_text:e.album||void 0,small_image:await dm("lastfm-small"),small_text:"Last.fm"}:{large_image:await dm("lastfm-large"),large_text:e.album||void 0},r=[{label:"View Song",url:e.url}];Mo.store.shareUsername&&r.push({label:"Last.fm Profile",url:`https://www.last.fm/user/${Mo.store.username}`});let i=(()=>{switch(Mo.store.nameFormat){case"artist-first":return e.artist+" - "+e.name;case"song-first":return e.name+" - "+e.artist;case"artist":return e.artist;case"song":return e.name;default:return Mo.store.statusName}})();return{application_id:mm,name:i,details:e.name,state:e.artist,assets:o,buttons:r.map(s=>s.label),metadata:{button_urls:r.map(s=>s.url)},type:Mo.store.useListeningStatus?2:0,flags:1}}})});var V0,eb,gm,tb=g(()=>{"use strict";a();$();A();w();V0=["Eyrokac","Rdcg$l`'k|~n",'H`tf$d&iajo+d`{"',"Sucqplh`(Eclhualva()&","Lncgmka'8KNMDC,shpanf'`x./,","Ioqweijnfn*IeuvfvAotkfxo./,","Hd{#cp\x7Ft$)nbd!{lq%mig~*\x7Fh`v#mk&sm{gx nd#idjb(a\x7Ffao\"bja&amdkge!Rlo\xECkhf)hyedfjjb*'^hzdrdmm$lu'|ao+mnqw$fijxh~bbmg#Tjm\xEEefd+fnp#lpkffz5","h",`sijklm&cam*rot"hjjq'|ak\x7F xmv#wc'ep*mawmvvlrb(|ynr>"Aqq&cgg-\x7F ugoh%rom)e\x7Fhdpp%$`,'Tnfb}"u\'~`nno!kp$vvhfzeyee"a}%Tfam*Xh`fls%Jboldos-"lj`&hn)~ce!`jcbct|)gdbhnf$wikm$zgaxkmc%afely+og"144?\'ign+iu%p$qisiefr gpfa$',"Ndtfv%ahfgk+ghtf$|ir(|z' Oguaw&`ggdj mgw$|ir(me|n","(!\u0363\xB3$\u0359\u0290'\u0369\xB9#","(\uFF88\u25D7\u30ED\u25D1,\uFF8F-2\uFF6C\uFF95\u272C","Ynw#hjil(ze+psgwp|&sgmkr!","Tikmolh`(fl+a!dvjk\x7F'y|e\x7Fe/,-","3/3750?5><9>885:7","mdmt","Wdn`khc+(oxbeof","Ig\"zkp*'g{*xolglj`&~g|*gowg/$mgt(Eclm`.#ticf{l*xed\"wl`&Kangj igbhqn'd`dn `v#lqrw{3%$bhv-h|)kangj_imwhlhb","Tscmw%Tnoa~x",'I\u2018f#npus(ec`e!vl$lhsm{`ncu"ekw&f(defeov-$Rnf|)sdu\u2018pf$wcam{ceg!vl$du\'D`d~x-"jw%oi(okht-"DJP)Kag\x7Fs,!mq$du\'A\u2010|n sg`akrkq)~jkdl#pj&diefbnf"jp)&@F\\*{ltq#Hlhrp\'',"Ynw$v`&cg`dl fml`%rhlhs*","Dnl$p%qhz{s' hv$w%hh|aceg!;#gpvt(fl+cndea`&dg|fon&v#wjjqm(","\uD83D)pft`gs(ec`e!13$qojmz#",`a!njcmr'ide~nu"lb%rheoedldpz$lu'gbkr`,'dn"zkp&kg\x7Fo4',"hnpqkw",'sn"fau\x7F','Sn"tmqnh}}*musvkaw&flf&+ldv$w%lr{}*aulr#vlao|)cetn"jp$',"Dxkmc%ot(hhxomwwai\x7F'{hln",`hd{#}js&(pe~'sg#gprb(3#"`,"hd{b${","<;vqkijbq33271:56<3799?24944:",`Thof$lu'ofdn,!qsefc'az*bnrcma+&Om{o+iu"\`khct$)bnrd"bcdoi&`,"snofplkb{)c\x7F'r\"lod\x7F'|f*aurv#cpno`abchijklmno","Wdn`khc'|f*eghl{%"],eb=D({replaceEvents:{description:"Replace Event Quotes too",type:3,default:!0}}),gm=y({name:"LoadingQuotes",description:"Replace Discords loading quotes",authors:[m.Ven,m.KraXen72],settings:eb,patches:[{find:".LOADING_DID_YOU_KNOW}",replacement:[{match:/\._loadingText=function\(\)\{/,replace:"$&return $self.quote;"},{match:/\._eventLoadingText=function\(\)\{/,replace:"$&return $self.quote;",predicate:()=>eb.store.replaceEvents}]}],xor(e){let t="read if cute",o=Array.from(e,(r,i)=>r.charCodeAt(0)^i%t.length);return String.fromCharCode(...o)},get quote(){return this.xor(V0[Math.floor(Math.random()*V0.length)])}})});function EN(){let{id:e,guild_id:t}=Ye([be],()=>vi()),{groups:o}=Ye([nb],()=>nb.getProps(t,e)),r=Ye([ob],()=>ob.getMemberCount(t));if(r==null)return null;let i=o.length===1&&o[0].id==="unknown"?0:o.reduce((s,l)=>s+(l.id==="offline"?0:l.count),0);return n(ce,{id:"vc-membercount",style:{marginTop:"1em",paddingInline:"1em",justifyContent:"center",alignContent:"center",gap:0}},n(ee,{text:`${$l(i)} online in this channel`,position:"bottom"},s=>n("div",{...s},n("span",{style:{backgroundColor:"var(--green-360)",width:"12px",height:"12px",borderRadius:"50%",display:"inline-block",marginRight:"0.5em"}}),n("span",{style:{color:"var(--green-360)"}},$l(i)))),n(ee,{text:`${$l(r)} total server members`,position:"bottom"},s=>n("div",{...s},n("span",{style:{width:"6px",height:"6px",borderRadius:"50%",border:"3px solid var(--primary-400)",display:"inline-block",marginRight:"0.5em",marginLeft:"1em"}}),n("span",{style:{color:"var(--primary-400)"}},$l(r)))))}var ob,nb,LN,$l,hm,rb=g(()=>{"use strict";a();ae();kt();A();ct();w();j();x();ob=Re("GuildMemberCountStore"),nb=Re("ChannelMemberStore"),LN=new Intl.NumberFormat,$l=e=>LN.format(e);hm=y({name:"MemberCount",description:"Shows the amount of online & total members in the server member list",authors:[m.Ven,m.Commandtechno],patches:[{find:"{isSidebarVisible:",replacement:{match:/(?<=let\{className:(\i),.+?children):\[(\i\.useMemo[^}]+"aria-multiselectable")/,replace:":[$1?.startsWith('members')?$self.render():null,$2"}}],render:B.wrap(EN,{noop:!0})})});var ym,ib,sb,Ys,vm,ab=g(()=>{"use strict";a();on();$();A();w();j();x();ym=!1,ib=e=>e.key==="Backspace"&&(ym=!0),sb=e=>e.key==="Backspace"&&(ym=!1),Ys=D({enableDeleteOnClick:{type:3,description:"Enable delete on click while holding backspace",default:!0},enableDoubleClickToEdit:{type:3,description:"Enable double click to edit",default:!0},enableDoubleClickToReply:{type:3,description:"Enable double click to reply",default:!0},requireModifier:{type:3,description:"Only do double click actions when shift/ctrl is held",default:!1}}),vm=y({name:"MessageClickActions",description:"Hold Backspace and click to delete, double click to edit/reply",authors:[m.Ven],dependencies:["MessageEventsAPI"],settings:Ys,start(){let e=P("deleteMessage","startEditMessage"),t=P("isEditing","isEditingAny");document.addEventListener("keydown",ib),document.addEventListener("keyup",sb),this.onClick=Qp((o,r,i)=>{let s=o.author.id===U.getCurrentUser().id;if(ym)Ys.store.enableDeleteOnClick&&(s||_e.can(xe.MANAGE_MESSAGES,r))&&(o.deleted?O.dispatch({type:"MESSAGE_DELETE",channelId:r.id,id:o.id,mlDeleted:!0}):e.deleteMessage(r.id,o.id),i.preventDefault());else{if(i.detail<2||Ys.store.requireModifier&&!i.ctrlKey&&!i.shiftKey||r.guild_id&&!_e.can(xe.SEND_MESSAGES,r)||o.deleted===!0)return;if(s){if(!Ys.store.enableDoubleClickToEdit||t.isEditing(r.id,o.id))return;e.startEditMessage(r.id,o.id,o.content),i.preventDefault()}else{if(!Ys.store.enableDoubleClickToReply)return;let l=64;if(o.hasFlag(l))return;O.dispatch({type:"CREATE_PENDING_REPLY",channel:r,message:o,shouldMention:!E.plugins.NoReplyMention.enabled,showMentionToggle:r.guild_id!==null})}}})},stop(){Vp(this.onClick),document.removeEventListener("keydown",ib),document.removeEventListener("keyup",sb)}})});var bm={};ze(bm,{_modifyAccessories:()=>_N,accessories:()=>Gl,addAccessory:()=>Zs,removeAccessory:()=>Sm});function Zs(e,t,o){Gl.set(e,{callback:t,position:o})}function Sm(e){Gl.delete(e)}function _N(e,t){for(let o of Gl.values()){let r=o.callback(t);if(r!=null){if(!Array.isArray(r))r=[r];else if(r.length===0)continue;e.splice(o.position!=null?o.position<0?e.length+o.position:o.position:e.length,0,...r.filter(i=>i!=null))}}return e}var Gl,Hl=g(()=>{"use strict";a();Gl=new Map});async function $N(e,t){let o=Ri.get(t);if(o)return o.message;Ri.set(t,{fetched:!1});let i=(await Nt.get({url:`/channels/${e}/messages`,query:{limit:1,around:t},retries:2}).catch(()=>null))?.body?.[0];if(!i)return;let s=ko.getMessages(i.channel_id).receiveMessage(i).get(i.id);return Ri.set(s.id,{message:s,fetched:!0}),s}function GN(e){let t=[];for(let{content_type:o,height:r,width:i,url:s,proxy_url:l}of e.attachments??[])o?.startsWith("image/")&&t.push({height:r,width:i,url:s,proxyURL:l});for(let{type:o,image:r,thumbnail:i,url:s}of e.embeds??[])o==="image"?t.push({...r??i}):s&&o==="gifv"&&!cb.test(s)&&t.push({height:i.height,width:i.width,url:s});return t}function HN(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 zN(e){return!!(e.components.length||e.attachments.some(t=>!t.content_type?.startsWith("image/"))||e.embeds.some(t=>t.type!=="image"&&(t.type!=="gifv"||cb.test(t.url))))}function jN(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 WN(e,t){return new Proxy(e,{get(o,r){return r==="vencordEmbeddedBy"?t:Reflect.get(...arguments)}})}function qN({message:e}){let t=e.vencordEmbeddedBy??[],o=[],r=null;for(;(r=Tm.exec(e.content))!==null;){let[i,s,l,c]=r;if(t.includes(c))continue;let u=Q.getChannel(l);if(!u||s!=="@me"&&!_e.can(1024n,u))continue;let{listMode:p,idList:d}=zl.store,h=[s,l,e.author.id].some(b=>b&&d.includes(b));if(p==="blacklist"&&h||p==="whitelist"&&!h)continue;let v=Ri.get(c)?.message;if(!v)if(v??=ko.getMessage(l,c),v)Ri.set(c,{message:v,fetched:!0});else{let b={...e};delete b.embeds,delete b.interaction,UN.push(()=>$N(l,c).then(I=>I&&O.dispatch({type:"MESSAGE_UPDATE",message:b})));continue}let T={message:WN(v,[...t,e.id]),channel:u,guildID:s},N=zl.store.automodEmbeds;o.push(N==="always"||N==="prefer"&&!zN(v)?n(YN,{...T}):n(KN,{...T}))}return o.length?n(f,null,o):null}function KN({message:e,channel:t,guildID:o}){let r=o==="@me",i=!r&&de.getGuild(t.guild_id),s=U.getUser(Q.getChannel(t.id).recipients?.[0]);return n(ON,{embed:{rawDescription:"",color:"var(--background-secondary)",author:{name:n(J,{variant:"text-xs/medium",tag:"span"},n("span",null,r?"Direct Message - ":i.name+" - "),r?Be.parse(`<@${s.id}>`):Be.parse(`<#${t.id}>`)),iconProxyURL:i?`https://${window.GLOBAL_ENV.CDN_HOST}/icons/${i.id}/${i.icon}.png`:`https://${window.GLOBAL_ENV.CDN_HOST}/avatars/${s.id}/${s.avatar}`}},renderDescription:()=>n("div",{key:e.id,className:te(lb.message,zl.store.messageBackgroundColor&&lb.searchResult)},n(FN,{id:`message-link-embeds-${e.id}`,message:e,channel:t,subscribeToComponentDispatch:!1}))})}function YN(e){let{message:t,channel:o,guildID:r}=e,i=Xc.MessageDisplayCompact.useSetting(),s=r==="@me",l=GN(t),{parse:c}=Be;return n(BN,{channel:o,childrenAccessories:n(J,{color:"text-muted",variant:"text-xs/medium",tag:"span"},c(s?`<@${Q.getChannel(o.id).recipients[0]}>`:`<#${o.id}>`),n("span",null,s?" - Direct Message":" - "+de.getGuild(o.guild_id)?.name)),compact:i,content:n(f,null,t.content||t.attachments.length<=l.length?c(t.content):[HN(t.attachments.length,t.embeds.length)],l.map(u=>{let{width:p,height:d}=jN(u.width,u.height);return n("div",null,n("img",{src:u.url,width:p,height:d}))})),hideTimestamp:!1,message:t,_messageEmbed:"automod"})}var Ri,ON,BN,FN,lb,Tm,cb,UN,zl,xm,ub=g(()=>{"use strict";a();Hl();$();ae();A();Pe();ci();w();j();x();Ri=new Map,ON=je(".inlineMediaEmbed"),BN=je(".withFooter]:","childrenMessageContent:"),FN=je("renderSimpleAccessories)"),lb=P("message","searchResult"),Tm=/(?<!<)https?:\/\/(?:\w+\.)?discord(?:app)?\.com\/channels\/(\d{17,20}|@me)\/(\d{17,20})\/(\d{17,20})/g,cb=/^https:\/\/(?:www\.)?tenor\.com\//,UN=new _o,zl=D({messageBackgroundColor:{description:"Background color for messages in rich embeds",type:3},automodEmbeds:{description:"Use automod embeds instead of rich embeds (smaller but less info)",type:4,options:[{label:"Always use automod embeds",value:"always"},{label:"Prefer automod embeds, but use rich embeds if some content can't be shown",value:"prefer"},{label:"Never use automod embeds",value:"never",default:!0}]},listMode:{description:"Whether to use ID list as blacklist or whitelist",type:4,options:[{label:"Blacklist",value:"blacklist",default:!0},{label:"Whitelist",value:"whitelist"}]},idList:{description:"Guild/channel/user IDs to blacklist or whitelist (separate with comma)",type:0,default:""},clearMessageCache:{type:6,description:"Clear the linked message cache",component:()=>n(C,{onClick:()=>Ri.clear()},"Clear the linked message cache")}});xm=y({name:"MessageLinkEmbeds",description:"Adds a preview to messages that link another message",authors:[m.TheSun,m.Ven,m.RyanCaoDev],dependencies:["MessageAccessoriesAPI"],settings:zl,start(){Zs("messageLinkEmbed",e=>Tm.test(e.message.content)?(Tm.lastIndex=0,n(B,null,n(qN,{message:e.message}))):null,4)}})});var pb=g(()=>{});var wm,db=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/messageLogger/deleteStyleOverlay.css",{name:"src/plugins/messageLogger/deleteStyleOverlay.css",source:`.messagelogger-deleted {
background-color: rgba(240 71 71 / 15%) !important;
}
`,classNames:{},dom:null});wm="src/plugins/messageLogger/deleteStyleOverlay.css"});var Mm,mb=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/messageLogger/deleteStyleText.css",{name:"src/plugins/messageLogger/deleteStyleText.css",source:`/* Message content highlighting */
.messagelogger-deleted [class*="contents"] > :is(div, h1, h2, h3, p) {
color: #f04747 !important;
}
/* Bot "thinking" text highlighting */
.messagelogger-deleted [class*="colorStandard"] {
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});Mm="src/plugins/messageLogger/deleteStyleText.css"});function fb(){E.plugins.MessageLogger.deleteStyle==="text"?(xt(Mm),jt(wm)):(jt(Mm),xt(wm))}var ZN,gb,hb,yb,Pm,vb=g(()=>{"use strict";a();pb();Rt();$();rt();ae();A();Ve();w();j();x();db();mb();ZN=P("edited","communicationDisabled","isSystemMessage");gb="ml-remove-history",hb="ml-toggle-style",yb=(e,t)=>()=>{let{message:o}=t,{deleted:r,editHistory:i,id:s,channel_id:l}=o;if(!r&&!i?.length)return;e:{if(!r)break e;let c=document.getElementById(`chat-messages-${l}-${s}`);if(!c)break e;e.push(n(G.MenuItem,{id:hb,key:hb,label:"Toggle Deleted Highlight",action:()=>c.classList.toggle("messagelogger-deleted")}))}e.push(n(G.MenuItem,{id:gb,key:gb,label:"Remove Message History",color:"danger",action:()=>{r?O.dispatch({type:"MESSAGE_DELETE",channelId:l,id:s,mlDeleted:!0}):o.editHistory=[]}}))},Pm=y({name:"MessageLogger",description:"Temporarily logs deleted and edited messages.",authors:[m.rushii,m.Ven,m.AutumnVN],start(){fb(),ue("message",yb)},stop(){fe("message",yb)},renderEdit(e){return n(B,{noop:!0},n("div",{className:"messagelogger-edited"},Be.parse(e.content),n(Yo,{timestamp:e.timestamp,isEdited:!0,isInline:!1},n("span",{className:ZN.edited}," ","(",et.Messages.MESSAGE_EDITED,")"))))},makeEdit(e,t){return{timestamp:yo?.call(e.edited_timestamp),content:t.content}},options:{deleteStyle:{type:4,description:"The style of deleted messages",default:"text",options:[{label:"Red text",value:"text",default:!0},{label:"Red overlay",value:"overlay"}],onChange:()=>fb()},ignoreBots:{type:3,description:"Whether to ignore messages by bots",default:!1},ignoreSelf:{type:3,description:"Whether to ignore messages by yourself",default:!1},ignoreUsers:{type:0,description:"Comma-separated list of user IDs to ignore",default:""},ignoreChannels:{type:0,description:"Comma-separated list of channel IDs to ignore",default:""},ignoreGuilds:{type:0,description:"Comma-separated list of guild IDs to ignore",default:""}},handleDelete(e,t,o){try{if(e==null||!o&&!e.has(t.id))return e;let r=i=>{let s=e.get(i);if(!s)return;let l=64;t.mlDeleted||(s.flags&l)===l||this.shouldIgnore(s)?e=e.remove(i):e=e.update(i,u=>u.set("deleted",!0).set("attachments",u.attachments.map(p=>(p.deleted=!0,p))))};o?t.ids.forEach(r):r(t.id)}catch(r){new ie("MessageLogger").error("Error during handleDelete",r)}return e},shouldIgnore(e){let{ignoreBots:t,ignoreSelf:o,ignoreUsers:r,ignoreChannels:i,ignoreGuilds:s}=E.plugins.MessageLogger,l=U.getCurrentUser().id;return t&&e.author?.bot||o&&e.author?.id===l||r.includes(e.author?.id)||i.includes(e.channel_id)||i.includes(Q.getChannel(e.channel_id)?.parent_id)||s.includes(Q.getChannel(e.channel_id)?.guild_id)},patches:[{find:'displayName="MessageStore"',replacement:[{match:/MESSAGE_DELETE:function\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?},/,replace:"MESSAGE_DELETE:function($1){ var cache = $2getOrCreate($1.channelId); cache = $self.handleDelete(cache, $1, false); $2commit(cache);},"},{match:/MESSAGE_DELETE_BULK:function\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?},/,replace:"MESSAGE_DELETE_BULK:function($1){ var cache = $2getOrCreate($1.channelId); cache = $self.handleDelete(cache, $1, true); $2commit(cache);},"},{match:/(MESSAGE_UPDATE:function\((\i)\).+?)\.update\((\i)/,replace:"$1.update($3,m => (($2.message.flags & 64) === 64 || $self.shouldIgnore($2.message)) ? m : $2.message.content !== m.editHistory?.[0]?.content && $2.message.content !== m.content ? m.set('editHistory',[...(m.editHistory || []), $self.makeEdit($2.message, m)]) : m).update($3"},{match:/(?<=getLastEditableMessage\(\i\)\{.{0,200}\.find\((\i)=>)/,replace:"!$1.deleted &&"}]},{find:"}addReaction(",replacement:[{match:/this\.customRenderedContent=(\i)\.customRenderedContent,/,replace:"this.customRenderedContent = $1.customRenderedContent,this.deleted = $1.deleted || false,this.editHistory = $1.editHistory || [],"}]},{find:"THREAD_STARTER_MESSAGE?null===",replacement:[{match:/interactionData:(\i)\.interactionData/,replace:"interactionData:$1.interactionData,deleted:$1.deleted,editHistory:$1.editHistory,attachments:$1.attachments"},{match:/attachments:(\i)\((\i)\)/,replace:"attachments: $1((() => { if ($self.shouldIgnore($2)) return $2; let old = arguments[1]?.attachments; if (!old) return $2; let new_ = $2.attachments?.map(a => a.id) ?? []; let diff = old.filter(a => !new_.includes(a.id)); old.forEach(a => a.deleted = true); $2.attachments = [...diff, ...$2.attachments]; return $2;})()),deleted: arguments[1]?.deleted,editHistory: arguments[1]?.editHistory"},{match:/(\((\i)\){return null==\2\.attachments.+?)spoiler:/,replace:"$1deleted: arguments[0]?.deleted,spoiler:"}]},{find:".removeAttachmentHoverButton",group:!0,replacement:[{match:/(className:\i,attachment:\i),/,replace:"$1,attachment: {deleted},"},{match:/\[\i\.obscured\]:.+?,/,replace:"$& 'messagelogger-deleted-attachment': deleted,"}]},{find:"Message must not be a thread starter message",replacement:[{match:/\)\("li",\{(.+?),className:/,replace:')("li",{$1,className:(arguments[0].message.deleted ? "messagelogger-deleted " : "")+'}]},{find:'Messages.MESSAGE_EDITED,")"',replacement:[{match:/(\)\("div",\{id:.+?children:\[)/,replace:"$1 (arguments[0].message.editHistory?.length > 0 ? arguments[0].message.editHistory.map(edit => $self.renderEdit(edit)) : null), "}]},{find:'displayName="ReferencedMessageStore"',replacement:[{match:/MESSAGE_DELETE:function\((\i)\).+?},/,replace:"MESSAGE_DELETE:function($1){},"},{match:/MESSAGE_DELETE_BULK:function\((\i)\).+?},/,replace:"MESSAGE_DELETE_BULK:function($1){},"}]},{find:"useMessageMenu:",replacement:[{match:/children:(\[""===.+?\])/,replace:"children:arguments[0].message.deleted?[]:$1"}]}]})});function Sb(e){yi({name:e.name,description:e.name,inputType:1,execute:async(t,o)=>await jl(e.name)?(E.plugins.MessageTags.clyde&&me(o.channel.id,{content:`${ir} The tag **${e.name}** has been sent!`}),{content:e.message.replaceAll("\\n",`
`)}):(me(o.channel.id,{content:`${ir} The tag **${e.name}** does not exist anymore! Please reload ur Discord to fix :)`}),{content:`/${e.name}`}),[XN]:!0},"CustomTags")}var ir,ql,XN,Wl,jl,JN,QN,Im,bb=g(()=>{"use strict";a();ao();Vo();$();A();w();ir="<:luna:1035316192220553236>",ql="MessageTags_TAGS",XN=Symbol("MessageTags"),Wl=()=>Dt(ql).then(e=>e??[]),jl=e=>Dt(ql).then(t=>(t??[]).find(o=>o.name===e)??null),JN=async e=>{let t=await Wl();return t.push(e),io(ql,t),t},QN=async e=>{let t=await Wl();return t=await t.filter(o=>o.name!==e),io(ql,t),t};Im=y({name:"MessageTags",description:"Allows you to save messages and to use them with a simple command.",authors:[m.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 Wl())Sb(e)},commands:[{name:"tags",description:"Manage all the tags for yourself",inputType:0,options:[{name:"create",description:"Create a new tag",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0},{name:"message",description:"The message that you will send when using this tag",type:3,required:!0}]},{name:"list",description:"List all tags from yourself",type:1,options:[]},{name:"delete",description:"Remove a tag from your yourself",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0}]},{name:"preview",description:"Preview a tag without sending it publicly",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0}]}],async execute(e,t){switch(e[0].name){case"create":{let o=lt(e[0].options,"tag-name",""),r=lt(e[0].options,"message","");if(await jl(o))return me(t.channel.id,{content:`${ir} A Tag with the name **${o}** already exists!`});let i={name:o,enabled:!0,message:r};Sb(i),await JN(i),me(t.channel.id,{content:`${ir} Successfully created the tag **${o}**!`});break}case"delete":{let o=lt(e[0].options,"tag-name","");if(!await jl(o))return me(t.channel.id,{content:`${ir} A Tag with the name **${o}** does not exist!`});Cs(o),await QN(o),me(t.channel.id,{content:`${ir} Successfully deleted the tag **${o}**!`});break}case"list":{me(t.channel.id,{embeds:[{title:"All Tags:",description:(await Wl()).map(o=>`\`${o.name}\`: ${o.message.slice(0,72).replaceAll("\\n"," ")}${o.message.length>72?"...":""}`).join(`
`)||`${ir} Woops! There are no tags yet, use \`/tags create\` to create one!`,color:14122879,type:"rich"}]});break}case"preview":{let o=lt(e[0].options,"tag-name",""),r=await jl(o);if(!r)return me(t.channel.id,{content:`${ir} A Tag with the name **${o}** does not exist!`});me(t.channel.id,{content:r.message.replaceAll("\\n",`
`)});break}default:{me(t.channel.id,{content:"Invalid sub-command"});break}}}}]})});function VN(e){let t="";for(let o=0;o<e.length;o++)t+=o%2?e[o].toUpperCase():e[o].toLowerCase();return t}var Am,Tb=g(()=>{"use strict";a();ao();A();w();Am=y({name:"MoreCommands",description:"echo, lenny, mock",authors:[m.Arjix,m.echo,m.Samu],dependencies:["CommandsAPI"],commands:[{name:"echo",description:"Sends a message as Clyde (locally)",options:[Xn],inputType:3,execute:(e,t)=>{let o=lt(e,"message","");me(t.channel.id,{content:o})}},{name:"lenny",description:"Sends a lenny face",options:[Xn],execute:e=>({content:lt(e,"message","")+" ( \u0361\xB0 \u035C\u0296 \u0361\xB0)"})},{name:"mock",description:"mOcK PeOpLe",options:[Ns],execute:e=>({content:VN(lt(e,"message",""))})}]})});var Nm,xb=g(()=>{"use strict";a();ao();A();w();Nm=y({name:"MoreKaomoji",description:"Adds more Kaomoji to discord. \u30FD(\xB4\u25BD`)/",authors:[m.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:[Xn],execute:t=>({content:lt(t,"message","")+e.description})}))})});function tC(e){sr.store.tagSettings??=Cm;let[t,o]=Y(sr.store.tagSettings),r=i=>{o(i),e.setValue(i)};return n(ce,{flexDirection:"column"},Di.map(i=>n(At,{style:{padding:"1em 1em 0"}},n(S.FormTitle,{style:{width:"fit-content"}},n(ee,{text:i.description},({onMouseEnter:s,onMouseLeave:l})=>n("div",{onMouseEnter:s,onMouseLeave:l},i.displayName," Tag ",n(Mn,{type:Mn.Types[i.name]})))),n(ot,{type:"text",value:t[i.name]?.text??i.displayName,placeholder:`Text on tag (default: ${i.displayName})`,onChange:s=>{t[i.name].text=s,r(t)},className:z.bottom16}),n(gt,{value:t[i.name]?.showInChat??!0,onChange:s=>{t[i.name].showInChat=s,r(t)},hideBorder:!0},"Show in messages"),n(gt,{value:t[i.name]?.showInNotChat??!0,onChange:s=>{t[i.name].showInNotChat=s,r(t)},hideBorder:!0},"Show in member list and profiles"))))}var eC,Mn,wb,Di,Cm,sr,km,Mb=g(()=>{"use strict";a();$();kt();A();it();w();j();x();eC=P("computePermissions","canEveryoneRole"),Mn=Vt(e=>e.Types?.[0]==="BOT"),wb=(e,t)=>!!e?.webhookId&&t.isNonUserBot(),Di=[{name:"WEBHOOK",displayName:"Webhook",description:"Messages sent by webhooks",condition:wb},{name:"OWNER",displayName:"Owner",description:"Owns the server",condition:(e,t,o)=>de.getGuild(o?.guild_id)?.ownerId===t.id},{name:"ADMINISTRATOR",displayName:"Admin",description:"Has the administrator permission",permissions:["ADMINISTRATOR"]},{name:"MODERATOR_STAFF",displayName:"Staff",description:"Can manage the server, channels or roles",permissions:["MANAGE_GUILD","MANAGE_CHANNELS","MANAGE_ROLES"]},{name:"MODERATOR",displayName:"Mod",description:"Can manage messages or kick/ban people",permissions:["MANAGE_MESSAGES","KICK_MEMBERS","BAN_MEMBERS"]},{name:"VOICE_MODERATOR",displayName:"VC Mod",description:"Can manage voice chats",permissions:["MOVE_MEMBERS","MUTE_MEMBERS","DEAFEN_MEMBERS"]}],Cm=Object.fromEntries(Di.map(({name:e,displayName:t})=>[e,{text:t,showInChat:!0,showInNotChat:!0}]));sr=D({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:tC,description:"fill me"}}),km=y({name:"MoreUserTags",description:"Adds tags for webhooks and moderative roles (owner, admin, etc.)",authors:[m.Cyn,m.TheSun,m.RyanCaoDev,m.LordElias,m.AutumnVN],settings:sr,patches:[{find:"BotTagTypes:",replacement:{match:/\((\i)=\{\}\)\)\[(\i)\.BOT/,replace:"($1=$self.getTagTypes()))[$2.BOT"}},{find:".DISCORD_SYSTEM_MESSAGE_BOT_TAG_TOOLTIP,",replacement:[{match:/(switch\((\i)\){.+?)case (\i(?:\.\i)?)\.BOT:default:(\i)=(\i\.\i\.Messages)\.BOT_TAG_BOT/,replace:(e,t,o,r,i,s)=>`${t}default:{${i} = $self.getTagText(${r}[${o}], ${s})}`},{match:/(\i)=(\i)===\i(?:\.\i)?\.ORIGINAL_POSTER/,replace:"$1=$self.isOPTag($2)"},{match:/.botText,children:(\i)}\)]/,replace:"$&,'data-tag':$1.toLowerCase()"}]},{find:"renderSystemTag:",replacement:{match:/;return\((\(null==\i\?void 0:\i\.isSystemDM\(\).+?.Types.ORIGINAL_POSTER\)),null==(\i)\)/,replace:";$1;$2=$self.getTag({...arguments[0],origType:$2,location:'chat'});return $2 == null"}},{find:".Messages.GUILD_OWNER,",replacement:{match:/(?<type>\i)=\(null==.{0,100}\.BOT;return null!=(?<user>\i)&&\i\.bot/,replace:"$<type> = $self.getTag({user: $<user>, channel: arguments[0].channel, origType: $<user>.bot ? 0 : null, location: 'not-chat' }); return typeof $<type> === 'number'"}},{find:".hasAvatarForGuild(null==",replacement:{match:/(?=usernameIcon:)/,replace:"moreTags_channelId:arguments[0].channelId,"}},{find:'copyMetaData:"User Tag"',replacement:{match:/(?=,botClass:)/,replace:",moreTags_channelId:arguments[0].moreTags_channelId"}},{find:",overrideDiscriminator:",replacement:[{match:/user:\i,nick:\i,/,replace:"$&moreTags_channelId,"},{match:/,botType:(\i\((\i)\)),/g,replace:",botType:$self.getTag({user:$2,channelId:moreTags_channelId,origType:$1,location:'not-chat'}),"}]}],start(){if(!sr.store.tagSettings)if(!sr.store.visibility_WEBHOOK)sr.store.tagSettings=Cm;else{let e={...Cm};Object.entries(Vencord.PlainSettings.plugins.MoreUserTags).forEach(([t,o])=>{let[r,i]=t.split("_");if(r==="visibility")switch(o){case"always":break;case"chat":e[i].showInNotChat=!1;break;case"not-chat":e[i].showInChat=!1;break;case"never":e[i].showInChat=!1,e[i].showInNotChat=!1;break}sr.store.tagSettings=e,delete Vencord.Settings.plugins.MoreUserTags[t]})}},getPermissions(e,t){let o=de.getGuild(t?.guild_id);if(!o)return[];let r=eC.computePermissions({user:e,context:o,overwrites:t.permissionOverwrites});return Object.entries(xe).map(([i,s])=>r&s?i:"").filter(Boolean)},getTagTypes(){let e={},t=100;return Di.forEach(({name:o})=>{e[o]=++t,e[t]=o,e[`${o}-BOT`]=++t,e[t]=`${o}-BOT`,e[`${o}-OP`]=++t,e[t]=`${o}-OP`}),e},isOPTag:e=>e===Mn.Types.ORIGINAL_POSTER||Di.some(t=>e===Mn.Types[`${t.name}-OP`]),getTagText(e,t){if(!e)return t.BOT_TAG_BOT;let[o,r]=e.split("-"),i=Di.find(({name:l})=>o===l);if(!i||r==="BOT"&&o!=="WEBHOOK"&&this.settings.store.dontShowForBots)return t.BOT_TAG_BOT;let s=sr.store.tagSettings?.[i.name]?.text||i.displayName;switch(r){case"OP":return`${t.BOT_TAG_FORUM_ORIGINAL_POSTER} \u2022 ${s}`;case"BOT":return`${t.BOT_TAG_BOT} \u2022 ${s}`;default:return s}},getTag({message:e,user:t,channelId:o,origType:r,location:i,channel:s}){if(!t)return null;if(i==="chat"&&t.id==="1")return Mn.Types.OFFICIAL;if(t.isClyde())return Mn.Types.AI;let l=typeof r=="number"?r:null;if(s??=Q.getChannel(o),!s)return l;let c=this.settings.store,u=this.getPermissions(t,s);for(let p of Di)if(!(i==="chat"&&!c.tagSettings[p.name].showInChat)&&!(i==="not-chat"&&!c.tagSettings[p.name].showInNotChat)&&(p.permissions?.some(d=>u.includes(d))||p.condition?.(e,t,s))){s.isForumPost()&&s.ownerId===t.id?l=Mn.Types[`${p.name}-OP`]:t.bot&&!wb(e,t)&&!c.dontShowBotTag?l=Mn.Types[`${p.name}-BOT`]:l=Mn.Types[p.name];break}return l}})});function rC(e,t){let o=0,r=0;for(;(r=e.indexOf(t,r)+1)!==0;)o++;return o}function iC(e,t){if(!t.global)throw new Error("pattern must be global");let o=0;for(;t.test(e);)o++;return o}function aC(e){let t=rC(e,Dm)+iC(e,sC);return Math.min(t,10)}function Rm(){if(!ar.store.triggerWhenUnfocused&&!document.hasFocus())return;let e=document.createElement("audio");e.src=ar.store.quality==="HD"?nC:oC,e.volume=ar.store.volume,e.play()}var Dm,oC,nC,ar,Lm,sC,Pb=g(()=>{"use strict";a();$();fp();A();Pe();w();x();Dm="\u{1F5FF}",oC="https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai.mp3",nC="https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai_hd.wav",ar=D({volume:{description:"Volume of the \u{1F5FF}\u{1F5FF}\u{1F5FF}",type:5,markers:$o(0,1,.1),default:.5,stickToMarkers:!1},quality:{description:"Quality of the \u{1F5FF}\u{1F5FF}\u{1F5FF}",type:4,options:[{label:"Normal",value:"Normal",default:!0},{label:"HD",value:"HD"}]},triggerWhenUnfocused:{description:"Trigger the \u{1F5FF} even when the window is unfocused",type:3,default:!0},ignoreBots:{description:"Ignore bots",type:3,default:!0},ignoreBlocked:{description:"Ignore blocked users",type:3,default:!0}}),Lm=y({name:"Moyai",authors:[m.Megu,m.Nuckyz],description:"\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}",settings:ar,flux:{async MESSAGE_CREATE({optimistic:e,type:t,message:o,channelId:r}){if(e||t!=="MESSAGE_CREATE"||o.state==="SENDING"||ar.store.ignoreBots&&o.author?.bot||ar.store.ignoreBlocked&&st.isBlocked(o.author?.id)||!o.content||r!==be.getChannelId())return;let i=aC(o.content);for(let s=0;s<i;s++)Rm(),await Fn(300)},MESSAGE_REACTION_ADD({optimistic:e,type:t,channelId:o,userId:r,messageAuthorId:i,emoji:s}){if(e||t!=="MESSAGE_REACTION_ADD"||ar.store.ignoreBots&&U.getUser(r)?.bot||ar.store.ignoreBlocked&&st.isBlocked(i)||o!==be.getChannelId())return;let l=s.name.toLowerCase();l!==Dm&&!l.includes("moyai")&&!l.includes("moai")||Rm()},VOICE_CHANNEL_EFFECT_SEND({emoji:e}){if(!e?.name)return;let t=e.name.toLowerCase();t!==Dm&&!t.includes("moyai")&&!t.includes("moai")||Rm()}}});sC=/<a?:\w*moy?ai\w*:\d{17,20}>/gi});var lC,Kl,Em,Ib=g(()=>{"use strict";a();$();A();w();j();({updateGuildNotificationSettings:lC}=P("updateGuildNotificationSettings")),Kl=D({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}}),Em=y({name:"MuteNewGuild",description:"Mutes newly joined guilds",authors:[m.Glitch,m.Nuckyz,m.carince],patches:[{find:",acceptInvite(",replacement:{match:/INVITE_ACCEPT_SUCCESS.+?,(\i)=null!==.+?;/,replace:(e,t)=>`${e}$self.handleMute(${t});`}},{find:"{joinGuild:",replacement:{match:/guildId:(\i),lurker:(\i).{0,20}}\)\);/,replace:(e,t,o)=>`${e}if(!${o})$self.handleMute(${t});`}}],settings:Kl,handleMute(e){e==="@me"||e==="null"||e==null||lC(e,{muted:Kl.store.guild,suppress_everyone:Kl.store.everyone,suppress_roles:Kl.store.role})}})});function mC(e){return e.name||e.recipients.map(U.getUser).filter(ud).map(t=>st.getNickname(t.id)||pC.getName(t)).join(", ")}var cC,uC,pC,lr,dC,_m,Ab=g(()=>{"use strict";a();A();vl();w();j();x();cC=P("selectPrivateChannel"),uC=P("getChannelIconURL"),pC=P("getGlobalName"),lr=P("emptyIconFriends","emptyIconGuilds"),dC=P("guildNick","guildAvatarWithoutIcon");_m=y({name:"MutualGroupDMs",description:"Shows mutual group dms in profiles",authors:[m.amia],patches:[{find:".Messages.USER_PROFILE_MODAL",replacement:{match:/(?<=\.MUTUAL_GUILDS\}\),)(?=(\i\.bot).{0,20}(\(0,\i\.jsx\)\(.{0,100}id:))/,replace:'($1||arguments[0].isCurrentUser)?null:$2"MUTUAL_GDMS",children:"Mutual Groups"}),'}},{find:".UserProfileSections.USER_INFO_CONNECTIONS:",replacement:{match:/(?<={user:(\i),onClose:(\i)}\);)(?=case \i\.\i\.MUTUAL_FRIENDS)/,replace:'case "MUTUAL_GDMS":return $self.renderMutualGDMs($1,$2);'}}],renderMutualGDMs(e,t){let o=Q.getSortedPrivateChannels().filter(r=>r.isGroupDM()&&r.recipients.includes(e.id)).map(r=>n(ei,{className:lr.listRow,onClick:()=>{t(),cC.selectPrivateChannel(r.id)}},n(ti,{src:uC.getChannelIconURL({id:r.id,icon:r.icon,size:32}),size:"SIZE_40",className:lr.listAvatar}),n("div",{className:lr.listRowContent},n("div",{className:lr.listName},mC(r)),n("div",{className:dC.guildNick},r.recipients.length+1," Members"))));return n(Vr,{className:lr.listScroller,fade:!0,onClose:t},o.length>0?o:n("div",{className:lr.empty},n("div",{className:lr.emptyIconFriends}),n("div",{className:lr.emptyText},"No group dms in common")))}})});var fC,Om,Nb=g(()=>{"use strict";a();$();A();w();j();fC=P("getRelationships","isBlocked"),Om=y({name:"NoBlockedMessages",description:"Hides all blocked messages from chat completely.",authors:[m.rushii,m.Samu],patches:[{find:"Messages.BLOCKED_MESSAGES_HIDE",replacement:[{match:/let\{[^}]*collapsedReason[^}]*\}/,replace:"return null;$&"}]},...['displayName="MessageStore"','displayName="ReadStateStore"'].map(e=>({find:e,predicate:()=>E.plugins.NoBlockedMessages.ignoreBlockedMessages===!0,replacement:[{match:/(?<=MESSAGE_CREATE:function\((\i)\){)/,replace:(t,o)=>`if($self.isBlocked(${o}.message))return;`}]}))],options:{ignoreBlockedMessages:{description:"Completely ignores (recent) incoming messages from blocked users (locally).",type:3,default:!1,restartNeeded:!0}},isBlocked:e=>fC.isBlocked(e.author.id)})});var Bm,Cb=g(()=>{"use strict";a();A();w();Bm=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:[m.Ven],patches:[{find:"setDevtoolsCallbacks",replacement:{match:/if\(null!=\i&&"0.0.0"===\i\.remoteApp\.getVersion\(\)\)/,replace:"if(true)"}}]})});var Fm,kb=g(()=>{"use strict";a();A();w();Fm=y({name:"NoF1",description:"Disables F1 help bind.",authors:[m.Cyn],patches:[{find:',"f1"],comboKeysBindGlobal:',replacement:{match:',"f1"],comboKeysBindGlobal:',replace:"],comboKeysBindGlobal:"}}]})});var Um,Rb=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/noMosaic/styles.css",{name:"src/plugins/noMosaic/styles.css",source:`[class^="nonMediaAttachmentsContainer_"] [class*="messageAttachment_"] {
position: relative;
}
`,classNames:{},dom:null});Um="src/plugins/noMosaic/styles.css"});var $m,Gm,Db=g(()=>{"use strict";a();$();rt();A();w();Rb();$m=D({inlineVideo:{description:"Play videos without carousel modal",type:3,default:!0,restartNeeded:!0},mediaLayoutType:{description:"Choose media layout type",type:4,restartNeeded:!0,options:[{label:"STATIC, render loading image but image isn't resposive, no problem unless discord window width is too small",value:"STATIC",default:!0},{label:"RESPONSIVE, image is responsive but not render loading image, cause messages shift when loaded",value:"RESPONSIVE"}]}}),Gm=y({name:"NoMosaic",authors:[m.AutumnVN],description:"Removes Discord new image mosaic",tags:["image","mosaic","media"],settings:$m,patches:[{find:".oneByTwoLayoutThreeGrid",replacement:[{match:/mediaLayoutType:\i\.\i\.MOSAIC/,replace:"mediaLayoutType:$self.mediaLayoutType()"},{match:/null!==\(\i=\i\.get\(\i\)\)&&void 0!==\i\?\i:"INVALID"/,replace:'"INVALID"'}]},{find:"renderAttachments(",predicate:()=>$m.store.inlineVideo,replacement:{match:/url:(\i)\.url\}\);return /,replace:"$&$1.content_type?.startsWith('image/')&&"}},{find:"Messages.REMOVE_ATTACHMENT_TOOLTIP_TEXT",replacement:{match:/\i===\i\.\i\.MOSAIC/,replace:"true"}}],mediaLayoutType(){return $m.store.mediaLayoutType},start(){xt(Um)},stop(){jt(Um)}})});var gC,Xs,Hm,Lb=g(()=>{"use strict";a();$();A();w();j();gC=P("getMessageRequestsCount"),Xs=D({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}}),Hm=y({name:"NoPendingCount",description:"Removes the ping count of incoming friend requests, message requests, and nitro offers.",authors:[m.amia],settings:Xs,patches:[{find:"getPendingCount(){",predicate:()=>Xs.store.hideFriendRequestsCount,replacement:{match:/(?<=getPendingCount\(\)\{)/,replace:"return 0;"}},{find:"getMessageRequestsCount(){",predicate:()=>Xs.store.hideMessageRequestsCount,replacement:{match:/(?<=getMessageRequestsCount\(\)\{)/,replace:"return 0;"}},{find:".getSpamChannelsCount(),",predicate:()=>Xs.store.hideMessageRequestsCount,replacement:{match:/(?<=getSpamChannelsCount\(\),\i=)\i\.getMessageRequestsCount\(\)/,replace:"$self.getRealMessageRequestCount()"}},{find:"showProgressBadge:",predicate:()=>Xs.store.hidePremiumOffersCount,replacement:{match:/(?<=\{unviewedTrialCount:(\i),unviewedDiscountCount:(\i)\}.{0,200}\i=)\1\+\2/,replace:"0"}}],getRealMessageRequestCount(){return gC.getMessageRequestChannelIds().size}})});var zm,Eb=g(()=>{"use strict";a();A();w();zm=y({name:"NoProfileThemes",description:"Completely removes Nitro profile themes",authors:[m.TheKodeToad],patches:[{find:".NITRO_BANNER,",replacement:{match:/=(?=\i\.\i\.isPremiumAtLeast\(null==(\i))/,replace:"=(arguments[0]?.bannerSrc||$1?.banner)&&"}},{find:".avatarPositionPremiumNoBanner,default:",replacement:{match:/\.avatarPositionPremiumNoBanner(?=,default:\i\.(\i))/,replace:".$1"}},{find:"hasThemeColors(){",replacement:{match:/get canUsePremiumProfileCustomization\(\){return /,replace:"$&false &&"}}]})});var Yl,jm,_b=g(()=>{"use strict";a();$();A();w();Yl=D({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}}),jm=y({name:"NoReplyMention",description:"Disables reply pings by default",authors:[m.DustyAngel47,m.axyie,m.pylix,m.outfoxxed],settings:Yl,shouldMention(e,t){let o=Yl.store.userList.includes(e.author.id),r=Yl.store.shouldPingListed?o:!o;return Yl.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 Wm,Ob=g(()=>{"use strict";a();A();w();Wm=y({name:"NoScreensharePreview",description:"Disables screenshare previews from being sent.",authors:[m.Nuckyz],patches:[{find:'"ApplicationStreamPreviewUploadManager"',replacement:{match:/await \i\.\i\.(makeChunkedRequest\(|post\(\{url:)\i\.\i\.STREAM_PREVIEW.+?\}\)/g,replace:"0"}}]})});var qm,Bb=g(()=>{"use strict";a();A();w();qm=y({name:"NoTypingAnimation",authors:[m.AutumnVN],description:"Disables the CPU-intensive typing dots animation",patches:[{find:"dotCycle",replacement:{match:/document.hasFocus\(\)/,replace:"false"}}]})});var Km,Fb=g(()=>{"use strict";a();A();w();Km=y({name:"NoUnblockToJump",description:"Allows you to jump to messages of blocked users without unblocking them",authors:[m.dzshn],patches:[{find:'.id,"Search Results"',replacement:{match:/if\(.{1,10}\)(.{1,10}\.show\({.{1,50}UNBLOCK_TO_JUMP_TITLE)/,replace:"if(false)$1"}},{find:"renderJumpButton()",replacement:{match:/if\(.{1,10}\)(.{1,10}\.show\({.{1,50}UNBLOCK_TO_JUMP_TITLE)/,replace:"if(false)$1"}},{find:"flash:!0,returnMessageId",replacement:{match:/.\?(.{1,10}\.show\({.{1,50}UNBLOCK_TO_JUMP_TITLE)/,replace:"false?$1"}}]})});var Ym,Ub=g(()=>{"use strict";a();A();w();Ym=y({name:"NormalizeMessageLinks",description:"Strip canary/ptb from message links",authors:[m.bb010g],patches:[{find:".Messages.COPY_MESSAGE_LINK,",replacement:{match:/\.concat\(location\.host\)/,replace:".concat($self.normalizeHost(location.host))"}}],normalizeHost(e){return e.replace(/(^|\b)(canary\.|ptb\.)(discord.com)$/,"$1$3")}})});var hC,Zm,$b=g(()=>{"use strict";a();$();A();w();hC=D({notificationVolume:{type:5,description:"Notification volume",markers:[0,25,50,75,100],default:100,stickToMarkers:!1}}),Zm=y({name:"NotificationVolume",description:"Save your ears and set a separate volume for notifications and in-app sounds",authors:[m.philipbry],settings:hC,patches:[{find:"_ensureAudio(){",replacement:{match:/onloadeddata=\(\)=>\{.\.volume=/,replace:"$&$self.settings.store.notificationVolume/100*"}}]})});var Xm,Gb=g(()=>{"use strict";a();A();w();Xm=y({name:"NSFWGateBypass",description:"Allows you to access NSFW channels without setting/verifying your age",authors:[m.Commandtechno],patches:[{find:".nsfwAllowed=null",replacement:{match:/(?<=\.nsfwAllowed=)null!==.+?(?=[,;])/,replace:"!0"}}]})});var Js,Jm,Hb=g(()=>{"use strict";a();$();A();w();x();Js=D({channelToAffect:{type:4,description:"Select the type of DM for the plugin to affect",options:[{label:"Both",value:"both_dms",default:!0},{label:"User DMs",value:"user_dm"},{label:"Group DMs",value:"group_dm"}]},allowMentions:{type:3,description:"Receive audio pings for @mentions",default:!1},allowEveryone:{type:3,description:"Receive audio pings for @everyone and @here in group DMs",default:!1}}),Jm=y({name:"OnePingPerDM",description:"If unread messages are sent by a user in DMs multiple times, you'll only receive one audio ping. Read the messages to reset the limit",authors:[m.ProffDea],settings:Js,patches:[{find:".getDesktopType()===",replacement:[{match:/(\i\.\i\.getDesktopType\(\)===\i\.\i\.NEVER)\)/,replace:"$&if(!$self.isPrivateChannelRead(arguments[0]?.message))return;else "},{match:/sound:(\i\?\i:void 0,volume:\i,onClick)/,replace:"sound:!$self.isPrivateChannelRead(arguments[0]?.message)?undefined:$1"}]}],isPrivateChannelRead(e){let t=Q.getChannel(e.channel_id)?.type;return t!==1&&t!==3||t===1&&Js.store.channelToAffect==="group_dm"||t===3&&Js.store.channelToAffect==="user_dm"||Js.store.allowMentions&&e.mentions.some(o=>o.id===U.getCurrentUser().id)||Js.store.allowEveryone&&e.mention_everyone?!0:xr.getOldestUnreadMessageId(e.channel_id)===e.id}})});var Qm,zb=g(()=>{"use strict";a();A();w();Qm=y({name:"oneko",description:"cat follow mouse (real)",authors:[m.Ven,m.adryd],start(){fetch("https://raw.githubusercontent.com/adryd325/oneko.js/8fa8a1864aa71cd7a794d58bc139e755e96a236c/oneko.js").then(e=>e.text()).then(e=>e.replace("./oneko.gif","https://raw.githubusercontent.com/adryd325/oneko.js/14bab15a755d0e35cd4ae19c931d96d306f99f42/oneko.gif").replace("(isReducedMotion)","(false)")).then(eval)},stop(){document.getElementById("oneko")?.remove()}})});var yC,vC,SC,bC,Wr,TC,Vm,jb=g(()=>{"use strict";a();$();A();w();x();yC=/^https:\/\/(spotify\.link|s\.team)\/.+$/,vC=/^https:\/\/open\.spotify\.com\/(track|album|artist|playlist|user|episode)\/(.+)(?:\?.+?)?$/,SC=/^https:\/\/(steamcommunity\.com|(?:help|store)\.steampowered\.com)\/.+$/,bC=/^https:\/\/store\.epicgames\.com\/(.+)$/,Wr=D({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}}),TC=VencordNative.pluginHelpers.OpenInApp,Vm=y({name:"OpenInApp",description:"Open Spotify, Steam and Epic Games URLs in their respective apps instead of your browser",authors:[m.Ven],settings:Wr,patches:[{find:"trackAnnouncementMessageLinkClicked({",replacement:{match:/(?<=handleClick:function\(\)\{return (\i)\}.+?)function \1\(.+?\)\{/,replace:"async $& if(await $self.handleLink(...arguments)) return;"}},{find:"WEB_OPEN(",predicate:()=>Wr.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:\i=>\{)(?=.{0,10}\i=(\i)\.type,.{0,100}CONNECTED_ACCOUNT_VIEWED)/,replace:"$self.handleAccountView(arguments[0],$1.type,$1.id);"}}],async handleLink(e,t){if(!e)return!1;let o=e.href;yC.test(o)&&(t?.preventDefault(),o=await TC.resolveRedirect(o));e:{if(!Wr.store.spotify)break e;let r=vC.exec(o);if(!r)break e;let[,i,s]=r;return VencordNative.native.openExternal(`spotify:${i}:${s}`),t?.preventDefault(),!0}e:{if(!Wr.store.steam||!SC.test(o))break e;return VencordNative.native.openExternal(`steam://openurl/${o}`),t?.preventDefault(),oo("Opened link in Steam",oe.Type.SUCCESS),!0}e:{if(!Wr.store.epic)break e;let r=bC.exec(o);if(!r)break e;return VencordNative.native.openExternal(`com.epicgames.launcher://store/${r[1]}`),t?.preventDefault(),!0}return t?.defaultPrevented?(window.open(o,"_blank"),!0):!1},handleAccountView(e,t,o){t==="spotify"&&Wr.store.spotify?(VencordNative.native.openExternal(`spotify:user:${o}`),e.preventDefault()):t==="steam"&&Wr.store.steam&&(VencordNative.native.openExternal(`steam://openurl/https://steamcommunity.com/profiles/${o}`),oo("Opened link in Steam",oe.Type.SUCCESS),e.preventDefault())}})});function qb(e){O.dispatch({type:"POGGERMODE_SETTINGS_UPDATE",settings:{enabled:e,settingsVisible:e}})}function Kb(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}}O.dispatch({type:"POGGERMODE_SETTINGS_UPDATE",settings:t})}var Wb,ef,Yb=g(()=>{"use strict";a();$();A();w();x();Wb=D({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:Kb}}),ef=y({name:"Party mode \u{1F389}",description:"Allows you to use party mode cause the party never ends \u2728",authors:[m.UwUDev],settings:Wb,start(){qb(!0),Kb(Wb.store.superIntensePartyMode)},stop(){qb(!1)}})});var tf,of,Zb=g(()=>{"use strict";a();$();A();w();tf=D({lockout:{type:3,default:!0,description:`Bypass the permission lockout prevention ("Pretty sure you don't want to do this")`,restartNeeded:!0},onboarding:{type:3,default:!0,description:'Bypass the onboarding requirements ("Making this change will make your server incompatible [...]")',restartNeeded:!0}}),of=y({name:"PermissionFreeWill",description:"Disables the client-side restrictions for channel permission management.",authors:[m.lewisakura],patches:[{find:".showPermissionLockoutModal(",replacement:[{match:/case"DENY":.{0,50}if\((?=\i\.\i\.can)/,replace:"$&true||"}],predicate:()=>tf.store.lockout},{find:".ONBOARDING_CHANNEL_THRESHOLD_WARNING",replacement:[{match:/(?<=(?:isDefaultChannelThresholdMetAfterDelete|checkDefaultChannelThresholdMetAfterChannelPermissionDeny):function\(\)\{)return \i(?=\})/g,replace:"return () => true"}],predicate:()=>tf.store.onboarding}],settings:tf})});var Xb=g(()=>{});function xC(e){return yn(e.toLowerCase().split("_"))}function Zl(e){return e=Jb[e]||e,et.Messages[e]||xC(e)}function Qb(e){e==="USE_APPLICATION_COMMANDS"?e="USE_APPLICATION_COMMANDS_GUILD":e==="SEND_VOICE_MESSAGES"?e="SEND_VOICE_MESSAGE_GUILD":e!=="STREAM"&&(e=Jb[e]||e);let t=et.Messages[`ROLE_PERMISSIONS_${e}_DESCRIPTION`];return t?.hasMarkdown?Be.parse(t.message):typeof t=="string"?t:""}function Xl({roles:e,id:t},o){return[...o.roles,t].map(r=>e[r]).sort((r,i)=>i.position-r.position)}function Vb(e){switch(cr.store.permissionsSortOrder){case 0:return e.sort((t,o)=>o.position-t.position);case 1:return e.sort((t,o)=>t.position-o.position);default:return e}}function Jl(e,t){let o=de.getGuild(t);return e.sort((r,i)=>{if(r.type!==0||i.type!==0)return 0;let s=o.roles[r.id];return o.roles[i.id].position-s.position})}var Zt,Jb,Qs=g(()=>{"use strict";a();rt();vn();x();ea();Vs();Zt=Fe("vc-permviewer-");Jb={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 nf(){return n("svg",{height:"24",width:"24",viewBox:"0 0 24 24"},n("title",null,"Denied"),n("path",{fill:"var(--status-danger)",d:"M18.4 4L12 10.4L5.6 4L4 5.6L10.4 12L4 18.4L5.6 20L12 13.6L18.4 20L20 18.4L13.6 12L20 5.6L18.4 4Z"}))}function rf(){return n("svg",{height:"24",width:"24",viewBox:"0 0 24 24"},n("title",null,"Allowed"),n("path",{fill:"var(--text-positive)",d:"M8.99991 16.17L4.82991 12L3.40991 13.41L8.99991 19L20.9999 7.00003L19.5899 5.59003L8.99991 16.17ZZ"}))}function tT(){return n("svg",{height:"24",width:"24",viewBox:"0 0 16 16"},n("g",null,n("title",null,"Not overwritten"),n("polygon",{fill:"var(--text-normal)",points:"12 2.32 10.513 2 4 13.68 5.487 14"})))}var oT=g(()=>{"use strict";a()});function MC(e,t,o){return we(r=>n(AC,{modalProps:r,permissions:e,guild:t,header:o}))}function PC({permissions:e,guild:t,modalProps:o,header:r}){e.sort((c,u)=>c.type-u.type),Ye([Oe],()=>Oe.getMemberIds(t.id),null,(c,u)=>c.length===u.length),pe(()=>{let c=e.filter(u=>u.type===1&&!Oe.isMember(t.id,u.id)).map(({id:u})=>u);O.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[t.id],userIds:c})},[]);let[i,s]=Y(0),l=e[i];return n(Ne,{...o,size:"large"},n(Xe,null,n(J,{className:Zt("perms-title"),variant:"heading-lg/semibold"},r," permissions:"),n(Tt,{onClick:o.onClose})),n(We,null,!l&&n("div",{className:Zt("perms-no-perms")},n(J,{variant:"heading-lg/normal"},"No permissions to display!")),l&&n("div",{className:Zt("perms-container")},n("div",{className:Zt("perms-list")},e.map((c,u)=>{let p=U.getUser(c.id??""),d=t.roles[c.id??""];return n("button",{className:Zt("perms-list-item-btn"),onClick:()=>s(u)},n("div",{className:Zt("perms-list-item",{"perms-list-item-active":i===u}),onContextMenu:h=>{cr.store.unsafeViewAsRole&&c.type===0&&Ut.openContextMenu(h,()=>n(IC,{guild:t,roleId:c.id,onClose:o.onClose}))}},(c.type===0||c.type===2)&&n("span",{className:Zt("perms-role-circle"),style:{backgroundColor:d?.colorString??"var(--primary-300)"}}),c.type===1&&p!==void 0&&n("img",{className:Zt("perms-user-img"),src:p.getAvatarURL(void 0,void 0,!1)}),n(J,{variant:"text-md/normal"},c.type===0?d?.name??"Unknown Role":c.type===1?(p&&Tn(p))??"Unknown User":n(ce,{style:{gap:"0.2em",justifyItems:"center"}},"@owner",n(vv,{height:18,width:18,"aria-hidden":"true"})))))})),n("div",{className:Zt("perms-perms")},Object.entries(xe).map(([c,u])=>n("div",{className:Zt("perms-perms-item")},n("div",{className:Zt("perms-perms-item-icon")},(()=>{let{permissions:p,overwriteAllow:d,overwriteDeny:h}=l;return p?(p&u)===u?rf():nf():d&&(d&u)===u?rf():h&&(h&u)===u?nf():tT()})()),n(J,{variant:"text-md/normal"},Zl(c)),n(ee,{text:Qb(c)||"No Description"},p=>n(il,{...p}))))))))}function IC({guild:e,roleId:t,onClose:o}){return n(G.Menu,{navId:Zt("role-context-menu"),onClose:Ut.closeContextMenu,"aria-label":"Role Options"},n(G.MenuItem,{id:"vc-pw-view-as-role",label:"View As Role",action:()=>{let r=e.roles[t];!r||(o(),O.dispatch({type:"IMPERSONATE_UPDATE",guildId:e.id,data:{type:"ROLES",roles:{[t]:r}}}))}}))}var AC,Li,Vs=g(()=>{"use strict";a();ae();kt();Lt();ct();nt();x();ea();Qs();oT();AC=B.wrap(PC),Li=MC});var nT=g(()=>{});function af({children:e,onMoreClick:t,buttons:o,moreTooltipText:r,defaultState:i=!1,onDropDownClick:s,headerText:l}){let[c,u]=Y(i);return n(f,null,n("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"8px"}},n(J,{tag:"h2",variant:"eyebrow",style:{color:"var(--header-primary)",display:"inline"}},l),n("div",{className:sf("center-flex")},o??null,t&&n(ee,{text:r},p=>n("button",{...p,className:sf("btn"),onClick:t},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},n("path",{fill:"var(--text-normal)",d:"M7 12.001C7 10.8964 6.10457 10.001 5 10.001C3.89543 10.001 3 10.8964 3 12.001C3 13.1055 3.89543 14.001 5 14.001C6.10457 14.001 7 13.1055 7 12.001ZM14 12.001C14 10.8964 13.1046 10.001 12 10.001C10.8954 10.001 10 10.8964 10 12.001C10 13.1055 10.8954 14.001 12 14.001C13.1046 14.001 14 13.1055 14 12.001ZM19 10.001C20.1046 10.001 21 10.8964 21 12.001C21 13.1055 20.1046 14.001 19 14.001C17.8954 14.001 17 13.1055 17 12.001C17 10.8964 17.8954 10.001 19 10.001Z"})))),n(ee,{text:c?"Hide "+l:"Show "+l},p=>n("button",{...p,className:sf("btn"),onClick:()=>{u(d=>!d),s?.(c)}},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24",transform:c?"scale(1 -1)":"scale(1 1)"},n("path",{fill:"var(--text-normal)",d:"M16.59 8.59003L12 13.17L7.41 8.59003L6 10L12 16L18 10L16.59 8.59003Z"})))))),c&&e)}var sf,rT=g(()=>{"use strict";a();rt();x();nT();sf=Fe("vc-expandableheader-")});function CC({guild:e,guildMember:t,showBorder:o}){let r=cr.use(["permissionsSortOrder"]),[i,s]=bt(()=>{let b=[],I=Xl(e,t),k=I.map(M=>({type:0,...M}));if(e.ownerId===t.userId){k.push({type:2,permissions:Object.values(xe).reduce((F,H)=>F|H,0n)});let M=et.Messages.GUILD_OWNER||"Server Owner";b.push({permission:M,roleColor:"var(--primary-300)",rolePosition:1/0})}Vb(I);for(let[M,F]of Object.entries(xe))for(let{permissions:H,colorString:X,position:Z}of I)if((H&F)===F){b.push({permission:Zl(M),roleColor:X||"var(--primary-300)",rolePosition:Z});break}return b.sort((M,F)=>F.rolePosition-M.rolePosition),[k,b]},[r.permissionsSortOrder]),{root:l,role:c,roleRemoveButton:u,roleNameOverflow:p,roles:d,rolePill:h,rolePillBorder:v,roleCircle:T,roleName:N}=NC;return n(af,{headerText:"Permissions",moreTooltipText:"Role Details",onMoreClick:()=>Li(i,e,t.nick||U.getUser(t.userId).username),defaultState:cr.store.defaultPermissionsDropdownState,buttons:[n(ee,{text:`Sorting by ${r.permissionsSortOrder===0?"Highest Role":"Lowest Role"}`},b=>n("button",{...b,className:Zt("userperms-sortorder-btn"),onClick:()=>{r.permissionsSortOrder=r.permissionsSortOrder===0?1:0}},n("svg",{width:"20",height:"20",viewBox:"0 96 960 960",transform:r.permissionsSortOrder===0?"scale(1 1)":"scale(1 -1)"},n("path",{fill:"var(--text-normal)",d:"M440 896V409L216 633l-56-57 320-320 320 320-56 57-224-224v487h-80Z"}))))]},s.length>0&&n("div",{className:te(l,d)},s.map(({permission:b,roleColor:I})=>n("div",{className:te(c,h,o?v:null)},n("div",{className:u},n("span",{className:T,style:{backgroundColor:I}})),n("div",{className:N},n(J,{className:p,variant:"text-xs/medium"},b))))))}var NC,iT,sT=g(()=>{"use strict";a();ae();rT();Pe();j();x();ea();Qs();Vs();NC=No(()=>Object.assign({},...Xi(Ae.byProps("roles","rolePill","rolePillBorder"),Ae.byProps("roleCircle","dotBorderBase","dotBorderColor"),Ae.byProps("roleNameOverflow","root","roleName","roleRemoveButton"))));iT=B.wrap(CC,{noop:!0})});function lf(e,t,o){return o===0&&!Oe.isMember(e,t)?null:n(G.MenuItem,{id:"perm-viewer-permissions",label:"Permissions",action:()=>{let r=de.getGuild(e),i,s;switch(o){case 0:{let l=Oe.getMember(e,t);i=Xl(r,l).map(c=>({type:0,...c})),r.ownerId===t&&i.push({type:2,permissions:Object.values(xe).reduce((c,u)=>c|u,0n)}),s=l.nick??U.getUser(l.userId).username;break}case 1:{let l=Q.getChannel(t);i=Jl(Object.values(l.permissionOverwrites).map(({id:c,allow:u,deny:p,type:d})=>({type:d,id:c,overwriteAllow:u,overwriteDeny:p})),e),s=l.name;break}default:{i=Object.values(r.roles).map(l=>({type:0,...l})),s=r.name;break}}Li(i,r,s)}})}function cf(e,t){return(o,r)=>()=>{if(!r||t===0&&!r.user||t===2&&!r.guild)return o;let i=dt(e,o),s=(()=>{switch(t){case 0:return lf(r.guildId,r.user.id,t);case 1:return lf(r.guild.id,r.channel.id,t);case 2:return lf(r.guild.id);default:return null}})();s!=null&&(i?i.push(s):e==="roles"&&r.guildId&&o.splice(-1,0,n(G.MenuGroup,null,s)))}}var cr,uf,ea=g(()=>{"use strict";a();Xb();Rt();$();A();w();x();Vs();sT();Qs();cr=D({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}});uf=y({name:"PermissionsViewer",description:"View the permissions a user or channel has, and the roles of a server",authors:[m.Nuckyz,m.Ven],settings:cr,patches:[{find:".popularApplicationCommandIds,",replacement:{match:/showBorder:(.{0,60})}\),(?<=guild:(\i),guildMember:(\i),.+?)/,replace:(e,t,o,r)=>`${e}$self.UserPermissions(${o},${r},${t}),`}}],UserPermissions:(e,t,o)=>!!t&&n(iT,{guild:e,guildMember:t,showBorder:o}),userContextMenuPatch:cf("roles",0),channelContextMenuPatch:cf(["mute-channel","unmute-channel"],1),guildContextMenuPatch:cf("privacy",2),start(){ue("user-context",this.userContextMenuPatch),ue("channel-context",this.channelContextMenuPatch),ue(["guild-context","guild-header-popout"],this.guildContextMenuPatch)},stop(){fe("user-context",this.userContextMenuPatch),fe("channel-context",this.channelContextMenuPatch),fe(["guild-context","guild-header-popout"],this.guildContextMenuPatch)}})});function lT(e){let t=e instanceof File,o=t?URL.createObjectURL(e):e;return new Promise((r,i)=>{let s=new Image;s.onload=()=>{t&&URL.revokeObjectURL(o),r(s)},s.onerror=(l,c,u,p,d)=>i(d||l),s.crossOrigin="Anonymous",s.src=o})}async function EC(e,t,o){for(let r of e)switch(r.name){case"image":let i=LC.getUploads(t.channel.id,aT)[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 Ct.getUser(r.value)).getAvatarURL(o?void 0:t.guild?.id,2048).replace(/\?size=\d+$/,"?size=2048")}catch(s){throw console.error(`[petpet] Failed to fetch user
`,s),"Failed to fetch user. Check the console for more info."}}return null}var Ei,aT,kC,RC,Ql,DC,LC,pf,cT=g(()=>{"use strict";a();ao();A();qo();w();j();x();Ei=ba(Fd()),aT=0,kC=20,RC=128,Ql=10,DC=_n(()=>Promise.all(Array.from({length:Ql},(e,t)=>lT(`https://raw.githubusercontent.com/VenPlugs/petpet/main/frames/pet${t}.gif`)))),LC=P("getUploads");pf=y({name:"petpet",description:"Adds a /petpet slash command to create headpet gifs from any image",authors:[m.Ven],dependencies:["CommandsAPI"],commands:[{inputType:0,name:"petpet",description:"Create a petpet gif. You can only specify one of the image options",options:[{name:"delay",description:"The delay between each frame. Defaults to 20.",type:4},{name:"resolution",description:"Resolution for the gif. Defaults to 120. If you enter an insane number and it freezes Discord that's your fault.",type:4},{name:"image",description:"Image attachment to use",type:11},{name:"url",description:"URL to fetch image from",type:3},{name:"user",description:"User whose avatar to use as image",type:6},{name:"no-server-pfp",description:"Use the normal avatar instead of the server specific one when using the 'user' option",type:5}],execute:async(e,t)=>{let o=await DC(),r=lt(e,"no-server-pfp",!1);try{var i=await EC(e,t,r);if(!i)throw"No Image specified!"}catch(v){me(t.channel.id,{content:String(v)});return}let s=await lT(i),l=lt(e,"delay",kC),c=lt(e,"resolution",RC),u=(0,Ei.GIFEncoder)(),p=document.createElement("canvas");p.width=p.height=c;let d=p.getContext("2d");for(let v=0;v<Ql;v++){d.clearRect(0,0,p.width,p.height);let T=v<Ql/2?v:Ql-v,N=.8+T*.02,b=.8-T*.05,I=(1-N)*.5+.1,k=1-b-.08;d.drawImage(s,I*c,k*c,N*c,b*c),d.drawImage(o[v],0,0,c,c);let{data:M}=d.getImageData(0,0,c,c),F=(0,Ei.quantize)(M,256),H=(0,Ei.applyPalette)(M,F);u.writeFrame(H,c,c,{transparent:!0,palette:F,delay:l})}u.finish();let h=new File([u.bytesView()],"petpet.gif",{type:"image/gif"});setTimeout(()=>rs.promptToUpload([h],t.channel,aT),10)}}]})});var uT=g(()=>{});var pT,df,dT=g(()=>{"use strict";a();uT();$();ae();A();w();x();pT=D({loop:{description:"Whether to make the PiP video loop or not",type:3,default:!0,restartNeeded:!1}}),df=y({name:"PictureInPicture",description:"Adds picture in picture to videos (next to the Download button)",authors:[m.Lumap],settings:pT,patches:[{find:".nonMediaAttachment]",replacement:{match:/\.nonMediaAttachment\]:!(\i).{0,10}children:\[(\S)/,replace:"$&,$1&&$2&&$self.renderPiPButton(),"}}],renderPiPButton:B.wrap(()=>n(ee,{text:"Toggle Picture in Picture"},e=>n("div",{...e,className:"vc-pip-button",role:"button",style:{cursor:"pointer",paddingTop:"4px",paddingLeft:"4px",paddingRight:"4px"},onClick:t=>{let o=t.currentTarget.parentNode.parentNode.querySelector("video"),r=document.body.appendChild(o.cloneNode(!0));r.loop=pT.store.loop,r.style.display="none",r.onleavepictureinpicture=()=>r.remove();function i(){r.currentTime=o.currentTime,r.requestPictureInPicture(),o.pause(),r.play()}r.readyState===4?i():r.onloadedmetadata=i}},n("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M21 3a1 1 0 0 1 1 1v7h-2V5H4v14h6v2H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h18zm0 10a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1v-6a1 1 0 0 1 1-1h8zm-1 2h-6v4h6v-4z"})))),{noop:!0})})});function gT(){return mt(["plugins.PinDMs.pinnedDMs"]),Vl()}function _i(e){return Vl().has(e)}function hT(e){let t=Vl();t.delete(e)||t.add(e),fT([...t])}function ff(){return Vl(),ta.store.pinOrder===0?_C.getPrivateChannelIds().filter(_i):sn}function yT(e){return ff()[e]}function gf(e,t){let o=mT(),r=o.indexOf(e),i=r+t;[o[r],o[i]]=[o[i],o[r]],fT(o)}var ta,_C,sn,mf,mT,fT,OC,Vl,hf=g(()=>{"use strict";a();$();w();j();ta=D({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}]}}),_C=Re("PrivateChannelSortStore"),mT=()=>(E.plugins.PinDMs.pinnedDMs||void 0)?.split(","),fT=e=>{mf=void 0,E.plugins.PinDMs.pinnedDMs=e.join(",")},OC=()=>(sn=mT()??[],mf=new Set(sn)),Vl=()=>mf??OC()});function vT(e){let t=_i(e),o=t&&ta.store.pinOrder===1;return n(f,null,n(G.MenuItem,{id:"pin-dm",label:t?"Unpin DM":"Pin DM",action:()=>hT(e)}),o&&sn[0]!==e&&n(G.MenuItem,{id:"move-pin-up",label:"Move Pin Up",action:()=>gf(e,-1)}),o&&sn[sn.length-1]!==e&&n(G.MenuItem,{id:"move-pin-down",label:"Move Pin Down",action:()=>gf(e,1)}))}function TT(){ue("gdm-context",ST),ue("user-context",bT)}function xT(){fe("gdm-context",ST),fe("user-context",bT)}var ST,bT,wT=g(()=>{"use strict";a();Rt();x();hf();ST=(e,t)=>()=>{let o=dt("leave-channel",e);o&&o.unshift(vT(t.channel.id))},bT=(e,t)=>()=>{let o=dt("close-dm",e);if(o){let r=o.findIndex(i=>i?.props?.id==="close-dm");o.splice(r,0,vT(t.channel.id))}}});var yf,MT=g(()=>{"use strict";a();A();w();wT();hf();yf=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:[m.Ven,m.Strencher],settings:ta,start:TT,stop:xT,usePinCount(e){let t=gT();return e.length?[t.size]:[]},getChannel(e,t){return e[yT(t)]},isPinned:_i,getSnapshot:ff,getScrollOffset(e,t,o,r,i){return _i(e)?t*(sn.indexOf(e)+r)+o:(t+o)*2+t*sn.length+i},patches:[{find:".privateChannelsHeaderContainer,",replacement:[{match:/(?<=\i,{channels:\i,)privateChannelIds:(\i),/,replace:"privateChannelIds:$1.filter(c=>!$self.isPinned(c)),pinCount:$self.usePinCount($1),"},{match:/(?<=renderRow:this\.renderRow,)sections:\[\i,/,replace:"$&...this.props.pinCount??[],"},{match:/children:(\i\.\i\.Messages.DIRECT_MESSAGES)(?<=renderSection=(\i)=>{.+?)/,replace:"children:$2.section===1?'Pinned DMs':$1"},{match:/(?<=renderDM=\((\i),(\i)\)=>{.*?this.state,\i=\i\[\i\],\i=)((\i)\[\i\]);/,replace:"$1===1?$self.getChannel($4,$2):$3;"},{match:/(?<=getRowHeight=\(.{2,50}?)1===\i/,replace:"$&-1"},{match:/(?<=scrollTo\(\{to:\i\}\):\(\i\+=)(\d+)\*\(.+?(?=,)/,replace:"$self.getScrollOffset(arguments[0],$1,this.props.padding,this.state.preRenderedChildren,$&)"}]},{find:".Routes.APPLICATION_STORE&&",replacement:{match:/(?<=\i=__OVERLAY__\?\i:\[\.\.\.\i\(\),\.\.\.)\i/,replace:"$self.getSnapshot().concat($&.filter(c=>!$self.isPinned(c)))"}},{find:".getFlattenedGuildIds()],",replacement:{match:/(?<=\i===\i\.ME\?)\i\.\i\.getPrivateChannelIds\(\)/,replace:"$self.getSnapshot().concat($&.filter(c=>!$self.isPinned(c)))"}}]})});var vf,PT=g(()=>{"use strict";a();A();w();vf=y({name:"PlainFolderIcon",description:"Doesn't show the small guild icons in folders",authors:[m.botato],patches:[{find:".expandedFolderIconWrapper",replacement:[{match:/\(\w\|\|\w\)&&(\(.{0,40}\(.{1,3}\.animated)/,replace:"$1"}]}]})});var Tf={};ze(Tf,{__getDecorators:()=>BC,addDecorator:()=>Sf,decorators:()=>ec,removeDecorator:()=>bf});function Sf(e,t,o){ec.set(e,{decorator:t,onlyIn:o})}function bf(e){ec.delete(e)}function BC(e){let t=!!e.guildId;return Array.from(ec.values(),o=>{let{decorator:r,onlyIn:i}=o;return!i||i==="guilds"&&t||i==="dms"&&!t?r(e):null})}var ec,xf=g(()=>{"use strict";a();ec=new Map});var Pf={};ze(Pf,{__addDecorationsToMessage:()=>FC,addDecoration:()=>wf,decorations:()=>tc,removeDecoration:()=>Mf});function wf(e,t){tc.set(e,t)}function Mf(e){tc.delete(e)}function FC(e){return[...tc.values()].map(t=>t(e))}var tc,If=g(()=>{"use strict";a();tc=new Map});function oc(e,t){return({color:o,tooltip:r,small:i})=>n(ee,{text:r},s=>n("svg",{...s,height:(t?.height??20)-(i?3:0),width:(t?.width??20)-(i?3:0),viewBox:t?.viewBox??"0 0 24 24",fill:o},n("path",{d:e})))}var UC,IT,$C,GC,HC,Nf,AT,Af,Cf,NT=g(()=>{"use strict";a();Ua();xf();If();$();ae();A();w();j();x();UC=Re("SessionsStore");IT={desktop:oc("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:oc("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:oc("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:oc("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"})},$C=P("useStatusFillColor","StatusTypes"),GC=({platform:e,status:t,small:o})=>{let r=e[0].toUpperCase()+e.slice(1),i=IT[e]??IT.desktop;return n(i,{color:$C.useStatusFillColor(t),tooltip:r,small:o})},HC=e=>Zo.getState()?.clientStatuses?.[e],Nf=({user:e,wantMargin:t=!0,wantTopMargin:o=!1,small:r=!1})=>{if(!e||e.bot)return null;if(e.id===U.getCurrentUser().id){let l=UC.getSessions();if(typeof l!="object")return null;let c=Object.values(l).sort(({status:d},{status:h})=>d===h?0:d==="online"?1:h==="online"?-1:d==="idle"?1:h==="idle"?-1:0),u=Object.values(c).reduce((d,h)=>(h.clientInfo.client!=="unknown"&&(d[h.clientInfo.client]=h.status),d),{}),{clientStatuses:p}=Zo.getState();p[U.getCurrentUser().id]=u}let i=Zo.getState()?.clientStatuses?.[e.id];if(!i)return null;let s=Object.entries(i).map(([l,c])=>n(GC,{key:l,platform:l,status:c,small:r}));return s.length?n("span",{className:"vc-platform-indicator",style:{display:"inline-flex",justifyContent:"center",alignItems:"center",marginLeft:t?4:0,verticalAlign:"top",position:"relative",top:o?2:0,padding:t?0:1,gap:2}},s):null},AT={component:e=>n(Nf,{...e,wantMargin:!1}),position:0,shouldShow:e=>!!Object.keys(HC(e.user.id)??{}).length,key:"indicator"},Af={list:{description:"In the member list",onEnable:()=>Sf("platform-indicator",e=>n(B,{noop:!0},n(Nf,{user:e.user,small:!0}))),onDisable:()=>bf("platform-indicator")},badges:{description:"In user profiles, as badges",onEnable:()=>kf(AT),onDisable:()=>Rf(AT)},messages:{description:"Inside messages",onEnable:()=>wf("platform-indicator",e=>n(B,{noop:!0},n(Nf,{user:e.message?.author,wantTopMargin:!0}))),onDisable:()=>Mf("platform-indicator")}},Cf=y({name:"PlatformIndicators",description:"Adds platform indicators (Desktop, Mobile, Web...) to users",authors:[m.kemo,m.TheSun,m.Nuckyz,m.Ven],dependencies:["MessageDecorationsAPI","MemberListDecoratorsAPI"],start(){let e=E.plugins.PlatformIndicators,{displayMode:t}=e;t&&(t!=="both"?e[t]=!0:(e.list=!0,e.badges=!0),e.messages=!0,delete e.displayMode),Object.entries(Af).forEach(([o,r])=>{e[o]&&r.onEnable()})},stop(){Object.entries(Af).forEach(([e,t])=>{t.onDisable()})},patches:[{find:".Masks.STATUS_ONLINE_MOBILE",predicate:()=>E.plugins.PlatformIndicators.colorMobileIndicator,replacement:[{match:/\.STATUS_TYPING;switch(?=.+?(if\(\i\)return \i\.\i\.Masks\.STATUS_ONLINE_MOBILE))/,replace:".STATUS_TYPING;$1;switch"},{match:/switch\(\i\)\{case \i\.\i\.ONLINE:(if\(\i\)return\{[^}]+\})/,replace:"$1;$&"}]},{find:".AVATAR_STATUS_MOBILE_16;",predicate:()=>E.plugins.PlatformIndicators.colorMobileIndicator,replacement:[{match:/\i===\i\.\i\.ONLINE&&(?=.{0,70}\.AVATAR_STATUS_MOBILE_16;)/,replace:""},{match:/(?<=\(\i\.status,)(\i)(?=,(\i),\i\))/,replace:(e,t,o)=>`${o}?"online":${t}`},{match:/(?<=\i&&!\i)&&\i===\i\.\i\.ONLINE/,replace:""}]},{find:"}isMobileOnline(",predicate:()=>E.plugins.PlatformIndicators.colorMobileIndicator,replacement:{match:/(?<=\i\[\i\.\i\.MOBILE\])===\i\.\i\.ONLINE/,replace:"!= null"}}],options:{...Object.fromEntries(Object.entries(Af).map(([e,t])=>[e,{type:3,description:`Show indicators ${t.description.toLowerCase()}`,restartNeeded:!0,default:!0}])),colorMobileIndicator:{type:3,description:"Whether to make the mobile indicator match the color of the user status.",default:!0,restartNeeded:!0}}})});function WC(e){let{isEmpty:t,attachments:o}=e.type,r=be.getChannelId(),i=Ye([ns],()=>CT(r));if(e.type.analyticsName!=="normal")return null;let s=o&&kT.getUploads(r,0).length>0;return!(!t&&i?.length>0)&&!s?null:n(ee,{text:"Preview Message"},c=>n(C,{...c,onClick:async()=>me(r,{content:CT(r),author:U.getCurrentUser(),attachments:s?await jC(r):void 0}),size:"",look:eo.BLANK,innerClassName:St.button,style:{padding:"0 2px",height:"100%"}},n("div",{className:St.buttonWrapper},n("img",{width:24,height:24,src:"https://discord.com/assets/4c5a77a89716352686f590a6f014770c.svg"}))))}var kT,CT,zC,jC,Df,RT=g(()=>{"use strict";a();ao();ae();A();w();j();x();kT=P("getUploads"),CT=e=>ns.getDraft(e,0),zC=e=>new Promise(t=>{let o=new Image;o.onload=()=>t({width:o.width,height:o.height}),o.onerror=()=>t(null),o.src=e}),jC=async e=>await Promise.all(kT.getUploads(e,0).map(async t=>{let{isImage:o,filename:r,spoiler:i,item:{file:s}}=t,l=URL.createObjectURL(s),c={id:As(),filename:i?"SPOILER_"+r:r,content_type:void 0,size:await t.getSize(),spoiler:i,url:l+"#",proxy_url:l+"#"};if(o){let u=await zC(l);if(!u)return c;c.width=u.width,c.height=u.height}return c}));Df=y({name:"PreviewMessage",description:"Lets you preview your message before sending it.",authors:[m.Aria],patches:[{find:"ChannelTextAreaButtons",replacement:{match:/(\i)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&,(()=>{try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}})()"}}],chatBarIcon:B.wrap(WC,{noop:!0})})});var DT=g(()=>{});function Lf(){return n(_.Fragment,null,n(S.FormTitle,{tag:"h3"},"More Information"),n(S.FormText,null,"To add your own pronouns, visit"," ",n(qe,{href:"https://pronoundb.org"},"pronoundb.org")),n(S.FormDivider,null),n(S.FormText,null,"The two pronoun formats are lowercase and capitalized. Example:",n("ul",null,n("li",null,"Lowercase: they/them"),n("li",null,"Capitalized: They/Them")),'Text like "Ask me my pronouns" or "Any pronouns" will always be capitalized. ',n("br",null),n("br",null),"You can also configure whether or not to display pronouns for the current user (since you probably already know them)"))}var LT=g(()=>{"use strict";a();xo();x()});var Pn,nc=g(()=>{"use strict";a();$();w();rc();Pn=D({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 ic,ET=g(()=>{"use strict";a();ic={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 KC(e,t=!1){let o=po.getUserProfile(e)?.pronouns;return t?o:po.getGuildMemberProfile(e,vi()?.guild_id)?.pronouns||o}function sc(e,t=!1){let o=KC(e,t)?.trim().replace(YC," "),[r]=at(()=>ZC(e),{fallbackValue:BT(e),onError:i=>console.error("Fetching pronouns failed: ",i)});return Pn.store.pronounSource===1&&o?[o,"Discord"]:r&&r!=="unspecified"?[JC(r),"PronounDB"]:[o,"Discord"]}function OT(e,t=!1){let o=sc(e,t);return!Pn.store.showInProfile||!Pn.store.showSelf&&e===U.getCurrentUser().id?_T:o}function BT(e){let t=Ef[e];return t&&t!=="unspecified"?t:t||null}function ZC(e){return new Promise(t=>{let o=BT(e);if(o)return t(o);if(e in Oi)return Oi[e].push(t);Oi[e]=[t],qC()})}async function XC(e){let t=new URLSearchParams;t.append("platform","discord"),t.append("ids",e.join(","));try{return await(await fetch("https://pronoundb.org/api/v1/lookup-bulk?"+t.toString(),{method:"GET",headers:{Accept:"application/json","X-PronounDB-Source":ru}})).json().then(r=>(Object.assign(Ef,r),r))}catch(o){console.error("PronounDB fetching failed: ",o);let r=Object.fromEntries(e.map(i=>[i,"unspecified"]));return Object.assign(Ef,r),r}}function JC(e){let{pronounsFormat:t}=E.plugins.PronounDB;return t==="CAPITALIZED"?ic[e]:t==="LOWERCASE"&&["any","ask","avoid","other"].includes(e)?ic[e]:ic[e].toLowerCase()}var _T,Ef,Oi,qC,YC,rc=g(()=>{"use strict";a();$();A();Nr();ct();ut();x();nc();ET();_T=[null,""],Ef={},Oi={},qC=ro(async()=>{let e=Object.keys(Oi),t=await XC(e);for(let o of e)Oi[o]?.forEach(r=>r(t[o])),delete Oi[o]});YC=/\n+/g});function FT(e){return!(!Pn.store.showInMessages||e.author.bot||e.author.system||e.type===QC||!Pn.store.showSelf&&e.author.id===U.getCurrentUser().id)}function VC({message:e}){let[t]=sc(e.author.id);return t?n("span",{className:te(ac.timestampInline,ac.timestamp)},"\u2022 ",t):null}var ac,QC,UT,$T,ek,GT=g(()=>{"use strict";a();ae();Pe();j();x();rc();nc();ac=P("timestampInline"),QC=24;UT=B.wrap(({message:e})=>FT(e)?n(VC,{message:e}):null,{noop:!0}),$T=B.wrap(({message:e})=>FT(e)?n(ek,{message:e}):null,{noop:!0});ek=B.wrap(({message:e})=>{let[t]=sc(e.author.id);return t?n("span",{className:te(ac.timestampInline,ac.timestamp,"vc-pronoundb-compact")},"\u2022 ",t):null},{noop:!0})});var HT,_f,zT=g(()=>{"use strict";a();DT();A();w();LT();GT();rc();nc();HT={match:/text:(.{0,10}.Messages\.USER_PROFILE_PRONOUNS)(?=,)/,replace:'$& + (typeof vcPronounSource !== "undefined" ? ` (${vcPronounSource})` : "")'},_f=y({name:"PronounDB",authors:[m.Tyman,m.TheKodeToad,m.Ven],description:"Adds pronouns to user messages using pronoundb",patches:[{find:"showCommunicationDisabledStyles",replacement:{match:/("span",{id:\i,className:\i,children:\i}\))/,replace:"$1, $self.CompactPronounsChatComponentWrapper(arguments[0])"}},{find:"showCommunicationDisabledStyles",replacement:{match:/(?<=return\s*\(0,\i\.jsxs?\)\(.+!\i&&)(\(0,\i.jsxs?\)\(.+?\{.+?\}\))/,replace:"[$1, $self.PronounsChatComponentWrapper(arguments[0])]"}},{find:".userTagNoNickname",replacement:[{match:/{user:(\i),[^}]*,pronouns:(\i),[^}]*}=\i;/,replace:"$&let vcPronounSource;[$2,vcPronounSource]=$self.useProfilePronouns($1.id);"},HT]},{find:".nameTagSmall)",replacement:[{match:/\.getName\(\i\);(?<=displayProfile.{0,200})/,replace:"$&const [vcPronounce,vcPronounSource]=$self.useProfilePronouns(arguments[0].user.id,true);if(arguments[0].displayProfile&&vcPronounce)arguments[0].displayProfile.pronouns=vcPronounce;"},HT]}],settings:Pn,settingsAboutComponent:Lf,PronounsChatComponentWrapper:UT,CompactPronounsChatComponentWrapper:$T,useProfilePronouns:OT})});var Of,jT=g(()=>{"use strict";a();jr();A();ct();w();x();Of=y({name:"QuickMention",authors:[m.kemo],description:"Adds a quick mention button to the message actions bar",dependencies:["MessagePopoverAPI"],start(){zo("QuickMention",e=>{let t=Q.getChannel(e.channel_id);return t.guild_id&&!_e.can(xe.SEND_MESSAGES,t)?null:{label:"Quick Mention",icon:this.Icon,message:e,channel:t,onClick:()=>bn(`<@${e.author.id}> `)}})},stop(){jo("QuickMention")},Icon:()=>n("svg",{className:"icon",height:"24",width:"24",viewBox:"0 0 24 24",fill:"currentColor"},n("path",{d:"M12 2C6.486 2 2 6.486 2 12C2 17.515 6.486 22 12 22C14.039 22 15.993 21.398 17.652 20.259L16.521 18.611C15.195 19.519 13.633 20 12 20C7.589 20 4 16.411 4 12C4 7.589 7.589 4 12 4C16.411 4 20 7.589 20 12V12.782C20 14.17 19.402 15 18.4 15L18.398 15.018C18.338 15.005 18.273 15 18.209 15H18C17.437 15 16.6 14.182 16.6 13.631V12C16.6 9.464 14.537 7.4 12 7.4C9.463 7.4 7.4 9.463 7.4 12C7.4 14.537 9.463 16.6 12 16.6C13.234 16.6 14.35 16.106 15.177 15.313C15.826 16.269 16.93 17 18 17L18.002 16.981C18.064 16.994 18.129 17 18.195 17H18.4C20.552 17 22 15.306 22 12.782V12C22 6.486 17.514 2 12 2ZM12 14.599C10.566 14.599 9.4 13.433 9.4 11.999C9.4 10.565 10.566 9.399 12 9.399C13.434 9.399 14.6 10.565 14.6 11.999C14.6 13.433 13.434 14.599 12 14.599Z"}))})});function QT(e,t){let o=e.findIndex(r=>r.id===t);return o===-1?o:e.length-o-1}function KT({channelId:e,messageId:t,_isQuickEdit:o}){if(o)return;let r=U.getCurrentUser().id,i=ko.getMessages(e)._array.filter(s=>s.author.id===r);cc=QT(i,t)}function YT({message:e,_isQuickReply:t}){t||(lc=QT(ko.getMessages(e.channel_id)._array,e.id))}function ZT(e){let t=e.key==="ArrowUp";!t&&e.key!=="ArrowDown"||!ok(e)||nk(e)||(e.shiftKey?sk(t):ik(t))}function VT(e,t){let o=document.getElementById("message-content-"+t);if(!o)return;let r=Math.max(document.documentElement.clientHeight,window.innerHeight),i=o.getBoundingClientRect();(i.bottom<200||i.top-r>=-200)&&tk.jumpToMessage({channelId:e,messageId:t,flash:!1,jumpType:"INSTANT"})}function ex(e,t){let o=ko.getMessages(be.getChannelId())._array;if(!t){let l=U.getCurrentUser().id;o=o.filter(c=>c.author.id===l)}let r=l=>e?Math.min(o.length-1,l+1):Math.max(-1,l-1),i=l=>{do l=r(l);while(l!==-1&&o[o.length-l-1]?.deleted===!0);return l},s;return t?lc=s=i(lc):cc=s=i(cc),s===-1?void 0:o[o.length-s-1]}function rk(e){let{enabled:t,userList:o,shouldPingListed:r}=E.plugins.NoReplyMention,i=!t||r===o.includes(e.author.id);switch(JT.store.shouldMention){case 2:return i;case 0:return!1;default:return!0}}function ik(e){let t=Q.getChannel(be.getChannelId());if(t.guild_id&&!_e.can(xe.SEND_MESSAGES,t))return;let o=ex(e,!0);if(!o)return void O.dispatch({type:"DELETE_PENDING_REPLY",channelId:be.getChannelId()});let r=Q.getChannel(o.channel_id),i=U.getCurrentUser().id;O.dispatch({type:"CREATE_PENDING_REPLY",channel:r,message:o,shouldMention:rk(o),showMentionToggle:r.guild_id!==null&&o.author.id!==i,_isQuickReply:!0}),VT(r.id,o.id)}function sk(e){let t=Q.getChannel(be.getChannelId());if(t.guild_id&&!_e.can(xe.SEND_MESSAGES,t))return;let o=ex(e,!1);if(!o)return O.dispatch({type:"MESSAGE_END_EDIT",channelId:be.getChannelId()});O.dispatch({type:"MESSAGE_START_EDIT",channelId:o.channel_id,messageId:o.id,content:o.content,_isQuickEdit:!0}),VT(o.channel_id,o.id)}var tk,XT,lc,cc,JT,Bf,WT,qT,ok,nk,tx=g(()=>{"use strict";a();$();A();w();j();x();tk=P("jumpToMessage"),XT=navigator.platform.includes("Mac"),lc=-1,cc=-1,JT=D({shouldMention:{type:4,description:"Ping reply by default",options:[{label:"Follow NoReplyMention",value:2,default:!0},{label:"Enabled",value:1},{label:"Disabled",value:0}]}}),Bf=y({name:"QuickReply",authors:[m.obscurity,m.Ven,m.pylix],description:"Reply to (ctrl + up/down) and edit (ctrl + shift + up/down) messages via keybinds",settings:JT,start(){O.subscribe("DELETE_PENDING_REPLY",WT),O.subscribe("MESSAGE_END_EDIT",qT),O.subscribe("MESSAGE_START_EDIT",KT),O.subscribe("CREATE_PENDING_REPLY",YT),document.addEventListener("keydown",ZT)},stop(){O.unsubscribe("DELETE_PENDING_REPLY",WT),O.unsubscribe("MESSAGE_END_EDIT",qT),O.unsubscribe("MESSAGE_START_EDIT",KT),O.unsubscribe("CREATE_PENDING_REPLY",YT),document.removeEventListener("keydown",ZT)}}),WT=()=>lc=-1,qT=()=>cc=-1;ok=e=>XT?e.metaKey:e.ctrlKey,nk=e=>e.altKey||!XT&&e.metaKey});var Ff,Uf,ox=g(()=>{"use strict";a();A();w();x();Uf=y({name:"ReactErrorDecoder",description:'Replaces "Minifed React Error" with the actual error.',authors:[m.Cyn,m.maisymoe],patches:[{find:'"https://reactjs.org/docs/error-decoder.html?invariant="',replacement:{match:/(function .\(.\)){(for\(var .="https:\/\/reactjs\.org\/docs\/error-decoder\.html\?invariant="\+.,.=1;.<arguments\.length;.\+\+\).\+="&args\[\]="\+encodeURIComponent\(arguments\[.\]\);return"Minified React error #"\+.\+"; visit "\+.\+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.")}/,replace:(e,t,o)=>`${t}{var decoded=$self.decodeError.apply(null, arguments);if(decoded)return decoded;${o}}`}}],async start(){let e=`https://raw.githubusercontent.com/facebook/react/v${_.version}/scripts/error-codes/codes.json`;Ff=await fetch(e).then(t=>t.json()).catch(t=>console.error(`[ReactErrorDecoder] Failed to fetch React error codes
`,t))},stop(){Ff=void 0},decodeError(e,...t){let o=0;return Ff?.[e]?.replace(/%s/g,()=>{let r=t[o];return o++,r})}})});var Gf={};ze(Gf,{ServerListRenderPosition:()=>uc,addServerListElement:()=>oa,removeServerListElement:()=>na,renderAll:()=>uk});function $f(e){return e===0?lk:ck}function oa(e,t){$f(e).add(t)}function na(e,t){$f(e).delete(t)}var ak,uc,lk,ck,uk,pc=g(()=>{"use strict";a();Ve();ak=new ie("ServerListAPI"),uc=(o=>(o[o.Above=0]="Above",o[o.In=1]="In",o))(uc||{}),lk=new Set,ck=new Set;uk=e=>{let t=[];for(let o of $f(e))try{t.unshift(o())}catch(r){ak.error("Failed to render server list element:",r)}return t}});function pk(){let e=[];Object.values(de.getGuilds()).forEach(t=>{ii.getChannels(t.id).SELECTABLE.forEach(o=>{!xr.hasUnread(o.channel.id)||e.push({channelId:o.channel.id,messageId:xr.lastMessageId(o.channel.id),readStateType:0})})}),O.dispatch({type:"BULK_ACK",context:"APP",channels:e})}var dk,Hf,nx=g(()=>{"use strict";a();pc();A();w();x();dk=()=>n(C,{onClick:pk,size:C.Sizes.MIN,color:C.Colors.BRAND,style:{marginTop:"2px",marginBottom:"8px",marginLeft:"9px"}},"Read all"),Hf=y({name:"ReadAllNotificationsButton",description:"Read all server notifications with a single button click!",authors:[m.kemo],dependencies:["ServerListAPI"],renderReadAllButton:()=>n(dk,null),start(){oa(0,this.renderReadAllButton)},stop(){na(0,this.renderReadAllButton)}})});var co,dc=g(()=>{"use strict";a();$();w();co=D({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 zf=g(()=>{"use strict";a()});async function gk(){wt.delMany(["relationship-notifier-guilds","relationship-notifier-groups","relationship-notifier-friends"])}async function jf(){await gk();let[e,t,o]=await wt.getMany([rx(),ix(),sx()]);if(await Promise.all([fc(),gc(),ra()]),co.store.offlineRemovals){if(co.store.groups&&t?.size)for(let[r,i]of t)Fi.has(r)||In(`You are no longer in the group ${i.name}.`,i.iconURL);if(co.store.servers&&e?.size)for(let[r,i]of e)Bi.has(r)||In(`You are no longer in the server ${i.name}.`,i.iconURL);if(co.store.friends&&o?.friends.length)for(let r of o.friends){if(qr.friends.includes(r))continue;let i=await Ct.getUser(r).catch(()=>{});i&&In(`You are no longer friends with ${Tn(i)}.`,i.getAvatarURL(void 0,void 0,!1),()=>Ho(i.id))}if(co.store.friendRequestCancels&&o?.requests?.length)for(let r of o.requests){if(qr.requests.includes(r)||[1,2,4].includes(st.getRelationshipType(r)))continue;let i=await Ct.getUser(r).catch(()=>{});i&&In(`Friend request from ${Tn(i)} has been revoked.`,i.getAvatarURL(void 0,void 0,!1),()=>Ho(i.id))}}}function In(e,t,o){co.store.notices&&mc.showNotice(e,"OK",()=>mc.popNotice()),De({title:"Relationship Notifier",body:e,icon:t,onClick:o})}function ax(e){return Bi.get(e)}function Wf(e){Bi.delete(e),fc()}async function fc(){Bi.clear();let e=U.getCurrentUser().id;for(let[t,{name:o,icon:r}]of Object.entries(de.getGuilds()))Oe.isMember(t,e)&&Bi.set(t,{id:t,name:o,iconURL:r&&`https://cdn.discordapp.com/icons/${t}/${r}.png`});await wt.set(rx(),Bi)}function lx(e){return Fi.get(e)}function qf(e){Fi.delete(e),gc()}async function gc(){Fi.clear();for(let{type:e,id:t,name:o,rawRecipients:r,icon:i}of Q.getSortedPrivateChannels())e===3&&Fi.set(t,{id:t,name:o||r.map(s=>s.username).join(", "),iconURL:i&&`https://cdn.discordapp.com/channel-icons/${t}/${i}.png`});await wt.set(ix(),Fi)}async function ra(){qr.friends=[],qr.requests=[];let e=st.getRelationships();for(let t in e)switch(e[t]){case 1:qr.friends.push(t);break;case 3:qr.requests.push(t);break}await wt.set(sx(),qr)}var Bi,Fi,qr,rx,ix,sx,Kf=g(()=>{"use strict";a();Ti();$n();ct();x();dc();zf();Bi=new Map,Fi=new Map,qr={friends:[],requests:[]},rx=()=>`relationship-notifier-guilds-${U.getCurrentUser().id}`,ix=()=>`relationship-notifier-groups-${U.getCurrentUser().id}`,sx=()=>`relationship-notifier-friends-${U.getCurrentUser().id}`});async function dx({relationship:{type:e,id:t}}){if(Yf===t){Yf=void 0;return}let o=await Ct.getUser(t).catch(()=>null);if(!!o)switch(e){case 1:co.store.friends&&In(`${Tn(o)} removed you as a friend.`,o.getAvatarURL(void 0,void 0,!1),()=>Ho(o.id));break;case 3:co.store.friendRequestCancels&&In(`A friend request from ${Tn(o)} has been removed.`,o.getAvatarURL(void 0,void 0,!1),()=>Ho(o.id));break}}function mx({guild:{id:e,unavailable:t}}){if(!co.store.servers||t)return;if(Zf===e){Wf(e),Zf=void 0;return}let o=ax(e);o&&(Wf(e),In(`You were removed from the server ${o.name}.`,o.iconURL))}function fx({channel:{id:e,type:t}}){if(!co.store.groups||t!==3)return;if(Xf===e){qf(e),Xf=void 0;return}let o=lx(e);o&&(qf(e),In(`You were removed from the group ${o.name}.`,o.iconURL))}var Yf,Zf,Xf,cx,ux,px,gx=g(()=>{"use strict";a();ct();x();dc();zf();Kf();cx=e=>Yf=e,ux=e=>Zf=e,px=e=>Xf=e});var Jf,hx=g(()=>{"use strict";a();A();w();gx();dc();Kf();Jf=y({name:"RelationshipNotifier",description:"Notifies you when a friend, group chat, or server removes you.",authors:[m.nick],settings:co,patches:[{find:"removeRelationship:(",replacement:{match:/(removeRelationship:\((\i),\i,\i\)=>)/,replace:"$1($self.removeFriend($2),0)||"}},{find:"async leaveGuild(",replacement:{match:/(leaveGuild\((\i)\){)/,replace:"$1$self.removeGuild($2);"}},{find:"},closePrivateChannel(",replacement:{match:/(closePrivateChannel\((\i)\){)/,replace:"$1$self.removeGroup($2);"}}],flux:{GUILD_CREATE:fc,GUILD_DELETE:mx,CHANNEL_CREATE:gc,CHANNEL_DELETE:fx,RELATIONSHIP_ADD:ra,RELATIONSHIP_UPDATE:ra,RELATIONSHIP_REMOVE(e){dx(e),ra()},CONNECTION_OPEN:jf},async start(){setTimeout(()=>{jf()},5e3)},removeFriend:cx,removeGroup:px,removeGuild:ux})});var hk,yk,Qf,yx=g(()=>{"use strict";a();A();w();j();hk=P("spoilerContent"),yk=P("messagesWrapper","messages"),Qf=y({name:"RevealAllSpoilers",description:"Reveal all spoilers in a message by Ctrl-clicking a spoiler, or in the chat with Ctrl+Shift-click",authors:[m.whqwert],patches:[{find:".removeObscurity=",replacement:{match:/(?<=\.removeObscurity=(\i)=>{)/,replace:(e,t)=>`$self.reveal(${t});`}}],reveal(e){let{ctrlKey:t,shiftKey:o,target:r}=e;if(!t)return;let{spoilerContent:i,hidden:s}=hk,{messagesWrapper:l}=yk,c=o?document.querySelector(`div.${l}`):r.parentElement;for(let u of c.querySelectorAll(`span.${i}.${s}`))u.click()}})});function vx(e,t){open(t+encodeURIComponent(e),"_blank")}function Tx(e){return n(G.MenuItem,{label:"Search Image",key:"search-image",id:"search-image"},Object.keys(hc).map((t,o)=>{let r="search-image-"+t;return n(G.MenuItem,{key:r,id:r,label:n(ce,{style:{alignItems:"center",gap:"0.5em"}},n("img",{style:{borderRadius:o>=3?"50%":void 0},"aria-hidden":"true",height:16,width:16,src:new URL("/favicon.ico",hc[t]).toString().replace("lens.","")}),t),action:()=>vx(e,hc[t])})}),n(G.MenuItem,{key:"search-image-all",id:"search-image-all",label:n(ce,{style:{alignItems:"center",gap:"0.5em"}},n(Ms,{height:16,width:16}),"All"),action:()=>Object.values(hc).forEach(t=>vx(e,t))}))}var hc,Sx,bx,Vf,xx=g(()=>{"use strict";a();Rt();kt();Lt();A();w();x();hc={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="};Sx=(e,t)=>()=>{if(t?.reverseImageSearchType!=="img")return;let o=t.itemHref??t.itemSrc;dt("copy-link",e)?.push(Tx(o))},bx=(e,t)=>()=>{if(!t?.src)return;(dt("copy-native-link",e)??e).push(Tx(t.src))},Vf=y({name:"ReverseImageSearch",description:"Adds ImageSearch to image context menus",authors:[m.Ven,m.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(){ue("message",Sx),ue("image-context",bx)},stop(){fe("message",Sx),fe("image-context",bx)}})});var ia,eg,wx=g(()=>{"use strict";a();$();A();w();x();ia=D({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}}),eg=y({name:"RoleColorEverywhere",authors:[m.KingFish,m.lewisakura,m.AutumnVN],description:"Adds the top role color anywhere possible",patches:[{find:"CLYDE_AI_MENTION_COLOR:null,",replacement:[{match:/user:(\i),channel:(\i).{0,400}?"@"\.concat\(.+?\)/,replace:"$&,color:$self.getUserColor($1?.id,{channelId:$2?.id})"}],predicate:()=>ia.store.chatMentions},{find:".userTooltip,children",replacement:[{match:/let\{id:(\i),guildId:(\i)[^}]*\}.*?\.default,{(?=children)/,replace:"$&color:$self.getUserColor($1,{guildId:$2}),"}],predicate:()=>ia.store.chatMentions},{find:'tutorialId:"whos-online',replacement:[{match:/\i.roleIcon,\.\.\.\i/,replace:"$&,color:$self.roleGroupColor(arguments[0])"},{match:/null,\i," — ",\i\]/,replace:"null,$self.roleGroupColor(arguments[0])]"}],predicate:()=>ia.store.memberList},{find:"renderPrioritySpeaker",replacement:[{match:/renderName\(\).{0,100}speaking:.{50,100}jsx.{5,10}{/,replace:"$&...$self.getVoiceProps(this.props),"}],predicate:()=>ia.store.voiceUsers}],settings:ia,getColor(e,{channelId:t,guildId:o}){return(o??=Q.getChannel(t)?.guild_id)?Oe.getMember(o,e)?.colorString??null:null},getUserColor(e,t){let o=this.getColor(e,t);return o&&parseInt(o.slice(1),16)},roleGroupColor({id:e,count:t,title:o,guildId:r,label:i}){let l=de.getGuild(r)?.roles[e];return n("span",{style:{color:l?.colorString,fontWeight:"unset",letterSpacing:".05em"}},o??i," \u2014 ",t)},getVoiceProps({user:{id:e},guildId:t}){return{style:{color:this.getColor(e,{guildId:t})}}}})});var Mx,Px,tg,Ix=g(()=>{"use strict";a();Rt();Lt();A();w();j();x();Mx=P("replyToMessage"),Px=(e,{message:t})=>()=>{if(be.getChannelId()!==t.channel_id)return;let o=Q.getChannel(t?.channel_id);if(!o||o.guild_id&&!_e.can(xe.SEND_MESSAGES,o))return;let r=dt("pin",e);if(r&&!r.some(s=>s?.props?.id==="reply")){let s=r.findIndex(l=>l?.props.id==="pin");return r.splice(s+1,0,n(G.MenuItem,{id:"reply",label:et.Messages.MESSAGE_ACTION_REPLY,icon:rp,action:l=>Mx.replyToMessage(o,t,l)}))}let i=dt("mark-unread",e);if(i&&!i.some(s=>s?.props?.id==="reply"))return i.unshift(n(G.MenuItem,{id:"reply",label:et.Messages.MESSAGE_ACTION_REPLY,icon:rp,action:s=>Mx.replyToMessage(o,t,s)}))},tg=y({name:"SearchReply",description:"Adds a reply button to search results",authors:[m.Aria],start(){ue("message",Px)},stop(){fe("message",Px)}})});var og,Ax=g(()=>{"use strict";a();A();w();og=y({name:"SecretRingToneEnabler",description:"Always play the secret version of the discord ringtone (except during special ringtone events)",authors:[m.AndrewDLO,m.FieryFlames],patches:[{find:'call_ringing_beat"',replacement:{match:/500===\i\.random\(1,1e3\)/,replace:"true"}}]})});var Nx=g(()=>{});function kx(e){let t=e.slice(1,-1).replace(/(\d)(AM|PM)$/i,"$1 $2"),o=new Date(`${new Date().toDateString()} ${t}`).getTime()/1e3;return isNaN(o)?e:(Date.now()/1e3>o&&(o+=86400),`<t:${Math.round(o)}:t>`)}function Sk({rootProps:e,close:t}){let[o,r]=Y(),[i,s]=Y(""),l=Math.round((new Date(o).getTime()||Date.now())/1e3),c=(d,h)=>`<t:${d}${h&&`:${h}`}>`,[u,p]=bt(()=>{let d=c(l,i);return[d,Be.parse(d)]},[l,i]);return n(Ne,{...e},n(Xe,{className:sa("modal-header")},n(S.FormTitle,{tag:"h2"},"Timestamp Picker"),n(Tt,{onClick:t})),n(We,{className:sa("modal-content")},n("input",{type:"datetime-local",value:o,onChange:d=>r(d.currentTarget.value),style:{colorScheme:Jn()===2?"light":"dark"}}),n(S.FormTitle,null,"Timestamp Format"),n(ho,{options:vk.map(d=>({label:d,value:d})),isSelected:d=>d===i,select:d=>s(d),serialize:d=>d,renderOptionLabel:d=>n("div",{className:sa("format-label")},Be.parse(c(l,d.value))),renderOptionValue:()=>p}),n(S.FormTitle,{className:z.bottom8},"Preview"),n(S.FormText,{className:sa("preview-text")},p," (",u,")")),n(pt,null,n(C,{onClick:()=>{bn(u+" "),t()}},"Insert")))}var Cx,vk,sa,ng,Rx=g(()=>{"use strict";a();Nx();on();$();rt();A();ct();it();nt();w();x();Cx=D({replaceMessageContents:{description:"Replace timestamps in message contents",type:3,default:!0}});vk=["","t","T","d","D","f","F","R"],sa=Fe("vc-st-");ng=y({name:"SendTimestamps",description:"Send timestamps easily via chat box button & text shortcuts. Read the extended description!",authors:[m.Ven,m.Tyler,m.Grzesiek11],dependencies:["MessageEventsAPI"],settings:Cx,patches:[{find:"ChannelTextAreaButtons",replacement:{match:/(\i)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&,(()=>{try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}})()"}}],start(){this.listener=Kt((e,t)=>{Cx.store.replaceMessageContents&&(t.content=t.content.replace(/`\d{1,2}:\d{2} ?(?:AM|PM)?`/gi,kx))})},stop(){Yt(this.listener)},chatBarIcon(e){return e.type.analyticsName!=="normal"?null:n(ee,{text:"Insert Timestamp"},({onMouseEnter:t,onMouseLeave:o})=>n("div",{style:{display:"flex"}},n(C,{"aria-haspopup":"dialog","aria-label":"Insert Timestamp",size:"",look:eo.BLANK,onMouseEnter:t,onMouseLeave:o,innerClassName:St.button,onClick:()=>{let r=we(i=>n(Sk,{rootProps:i,close:()=>mn(r)}))},className:sa("button")},n("div",{className:St.buttonWrapper},n("svg",{"aria-hidden":"true",role:"img",width:"24",height:"24",viewBox:"0 0 24 24"},n("g",{fill:"none","fill-rule":"evenodd"},n("path",{fill:"currentColor",d:"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7v-5z"}),n("rect",{width:"24",height:"24"})))))))},settingsAboutComponent(){let e=["12:00","3:51","17:59","24:00","12:00 AM","0:13PM"].map(t=>`\`${t}\``);return n(f,null,n(S.FormText,null,"To quickly send send time only timestamps, include timestamps formatted as `HH:MM` (including the backticks!) in your message"),n(S.FormText,null,"See below for examples. If you need anything more specific, use the Date button in the chat bar!"),n(S.FormText,null,"Examples:",n("ul",null,e.map(t=>n("li",{key:t},n("code",null,t)," ","->"," ",Be.parse(kx(t)))))))}})});function bk(){return Ex=Un(),n("span",{id:"vc-friendcount",style:{display:"inline-block",width:"100%",fontSize:"12px",fontWeight:"600",color:"var(--header-secondary)",textTransform:"uppercase",textAlign:"center"}},ig," online")}function Tk(){return _x=Un(),n("span",{id:"vc-guildcount",style:{display:"inline-block",width:"100%",fontSize:"12px",fontWeight:"600",color:"var(--header-secondary)",textTransform:"uppercase",textAlign:"center"}},Lx," servers")}function Dx(){ig=0;let e=st.getRelationships();for(let t of Object.keys(e))e[t]===1&&Zo.getStatus(t)!=="offline"&&(ig+=1);Ex?.()}function rg(){Lx=de.getGuildCount(),_x?.()}var ig,Lx,Ex,_x,sg,Ox=g(()=>{"use strict";a();pc();$();ae();A();ut();w();x();ig=0,Lx=0;sg=y({name:"ServerListIndicators",description:"Add online friend count or server count in the server list",authors:[m.dzshn],dependencies:["ServerListAPI"],options:{mode:{description:"mode",type:4,options:[{label:"Only online friend count",value:2,default:!0},{label:"Only server count",value:1},{label:"Both server and online friend counts",value:3}]}},renderIndicator:()=>{let{mode:e}=E.plugins.ServerListIndicators;return n(B,{noop:!0},n("div",{style:{marginBottom:"4px"}},!!(e&2)&&n(bk,null),!!(e&1)&&n(Tk,null)))},flux:{PRESENCE_UPDATES:Dx,GUILD_CREATE:rg,GUILD_DELETE:rg},start(){oa(0,this.renderIndicator),Dx(),rg()},stop(){na(0,this.renderIndicator)}})});var Bx=g(()=>{});function $x(e){we(t=>n(Ne,{...t,size:"medium"},n(wk,{guild:e})))}function Ux(e){return n(Yo,{timestamp:yo(e)})}function wk({guild:e}){let[t,o]=Y(),[r,i]=Y();pe(()=>{vc.friends=!1,vc.blocked=!1},[]);let[s,l]=Y(0),c=e.banner&&yc.getGuildBannerURL({id:e.id,banner:e.banner},!0).replace(/\?size=\d+$/,"?size=1024"),u=e.icon&&yc.getGuildIconURL({id:e.id,icon:e.icon,canAnimate:!0,size:512});return n("div",{className:uo("root")},c&&s===0&&n("img",{className:uo("banner"),src:c,alt:"",onClick:()=>Go(c)}),n("div",{className:uo("header")},e.icon?n("img",{src:u,alt:"",onClick:()=>Go(u)}):n("div",{"aria-hidden":!0,className:te(Fx.childWrapper,Fx.acronym)},e.acronym),n("div",{className:uo("name-and-description")},n(S.FormTitle,{tag:"h5",className:uo("name")},e.name),e.description&&n(S.FormText,null,e.description))),n(Co,{type:"top",look:"brand",className:uo("tab-bar"),selectedItem:s,onItemSelect:l},n(Co.Item,{className:uo("tab",{selected:s===0}),id:0},"Server Info"),n(Co.Item,{className:uo("tab",{selected:s===1}),id:1},"Friends",t!==void 0?` (${t})`:""),n(Co.Item,{className:uo("tab",{selected:s===2}),id:2},"Blocked Users",r!==void 0?` (${r})`:"")),n("div",{className:uo("tab-content")},s===0&&n(Pk,{guild:e}),s===1&&n(Ik,{guild:e,setCount:o}),s===2&&n(Ak,{guild:e,setCount:i})))}function Mk(e,t){let o=Oe.getMember(e,t.id)?.avatar,r=o?yc.getGuildMemberAvatarURLSimple({userId:t.id,avatar:o,guildId:e,canAnimate:!0},!0):yc.getUserAvatarURL(t,!0);return n("div",{className:uo("owner")},n("img",{src:r,alt:"",onClick:()=>Go(r)}),Be.parse(`<@${t.id}>`))}function Pk({guild:e}){let[t]=at(()=>Ct.getUser(e.ownerId),{deps:[e.ownerId],fallbackValue:null}),o={"Server Owner":t?Mk(e.id,t):"Loading...","Created At":Ux(Xo.extractTimestamp(e.id)),"Joined At":e.joinedAt?Ux(e.joinedAt.getTime()):"-","Vanity Link":e.vanityURLCode?n("a",null,`discord.gg/${e.vanityURLCode}`):"-","Preferred Locale":e.preferredLocale||"-","Verification Level":["None","Low","Medium","High","Highest"][e.verificationLevel]||"?","Nitro Boosts":`${e.premiumSubscriberCount??0} (Level ${e.premiumTier??0})`,Channels:ii.getChannels(e.id)?.count-1||"?",Roles:Object.keys(e.roles).length-1};return n("div",{className:uo("info")},Object.entries(o).map(([r,i])=>n("div",{className:uo("server-info-pair"),key:r},n(S.FormTitle,{tag:"h5"},r),typeof i=="string"?n("span",null,i):i)))}function Ik({guild:e,setCount:t}){return Gx("friends",e,st.getFriendIDs(),t)}function Ak({guild:e,setCount:t}){let o=Object.keys(st.getRelationships()).filter(r=>st.isBlocked(r));return Gx("blocked",e,o,t)}function Gx(e,t,o,r){let i=[],s=[];for(let l of o)Oe.isMember(t.id,l)?s.push(l):i.push(l);return Ye([Oe],()=>Oe.getMemberIds(t.id),null,(l,c)=>l.length===c.length),pe(()=>{!vc[e]&&i.length&&(vc[e]=!0,O.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[t.id],userIds:i}))},[]),pe(()=>r(s.length),[s.length]),n(Vr,{fade:!0,className:uo("scroller")},s.map(l=>n(xk,{user:U.getUser(l),status:Zo.getStatus(l)||"offline",onSelect:()=>Ho(l),onContextMenu:()=>{}})))}var yc,Fx,xk,uo,vc,Hx=g(()=>{"use strict";a();Bx();rt();ct();Pe();nt();ut();j();x();yc=P("getGuildBannerURL"),Fx=P("icon","acronym","childWrapper"),xk=pn("FriendRow"),uo=Fe("vc-gp-");vc={friends:!1,blocked:!1}});var zx,ag,jx=g(()=>{"use strict";a();Rt();A();w();x();Hx();zx=(e,{guild:t})=>()=>{dt("privacy",e)?.push(n(G.MenuItem,{id:"vc-server-profile",label:"Server Info",action:()=>$x(t)}))},ag=y({name:"ServerProfile",description:"Allows you to view info about a server by right clicking it in the server list",authors:[m.Ven,m.Nuckyz],tags:["guild","info"],start(){ue(["guild-context","guild-header-popout"],zx)},stop(){fe(["guild-context","guild-header-popout"],zx)}})});var Wx=g(()=>{});var qx,Kx=g(()=>{a();qx=`/* eslint-disable simple-header/header */
import React from "react";
const handleClick = async () =>
console.log((await import("@webpack/common")).Clipboard.copy("\\u200b"));
export const Example: React.FC<{
real: boolean,
shigged?: number,
}> = ({ real, shigged }) => <>
<p>{\`Shigg\${real ? \`ies\${shigged === 0x1B ? "t" : ""}\` : "y"}\`}</p>
<button onClick={handleClick}>Click Me</button>
</>;
`});var Zx=vr((iee,lg)=>{"use strict";a();var Nk=Object.prototype.hasOwnProperty,Xt="~";function aa(){}Object.create&&(aa.prototype=Object.create(null),new aa().__proto__||(Xt=!1));function Ck(e,t,o){this.fn=e,this.context=t,this.once=o||!1}function Yx(e,t,o,r,i){if(typeof o!="function")throw new TypeError("The listener must be a function");var s=new Ck(o,r||e,i),l=Xt?Xt+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function Sc(e,t){--e._eventsCount===0?e._events=new aa:delete e._events[t]}function Gt(){this._events=new aa,this._eventsCount=0}Gt.prototype.eventNames=function(){var t=[],o,r;if(this._eventsCount===0)return t;for(r in o=this._events)Nk.call(o,r)&&t.push(Xt?r.slice(1):r);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o)):t};Gt.prototype.listeners=function(t){var o=Xt?Xt+t:t,r=this._events[o];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,s=r.length,l=new Array(s);i<s;i++)l[i]=r[i].fn;return l};Gt.prototype.listenerCount=function(t){var o=Xt?Xt+t:t,r=this._events[o];return r?r.fn?1:r.length:0};Gt.prototype.emit=function(t,o,r,i,s,l){var c=Xt?Xt+t:t;if(!this._events[c])return!1;var u=this._events[c],p=arguments.length,d,h;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),p){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,o),!0;case 3:return u.fn.call(u.context,o,r),!0;case 4:return u.fn.call(u.context,o,r,i),!0;case 5:return u.fn.call(u.context,o,r,i,s),!0;case 6:return u.fn.call(u.context,o,r,i,s,l),!0}for(h=1,d=new Array(p-1);h<p;h++)d[h-1]=arguments[h];u.fn.apply(u.context,d)}else{var v=u.length,T;for(h=0;h<v;h++)switch(u[h].once&&this.removeListener(t,u[h].fn,void 0,!0),p){case 1:u[h].fn.call(u[h].context);break;case 2:u[h].fn.call(u[h].context,o);break;case 3:u[h].fn.call(u[h].context,o,r);break;case 4:u[h].fn.call(u[h].context,o,r,i);break;default:if(!d)for(T=1,d=new Array(p-1);T<p;T++)d[T-1]=arguments[T];u[h].fn.apply(u[h].context,d)}}return!0};Gt.prototype.on=function(t,o,r){return Yx(this,t,o,r,!1)};Gt.prototype.once=function(t,o,r){return Yx(this,t,o,r,!0)};Gt.prototype.removeListener=function(t,o,r,i){var s=Xt?Xt+t:t;if(!this._events[s])return this;if(!o)return Sc(this,s),this;var l=this._events[s];if(l.fn)l.fn===o&&(!i||l.once)&&(!r||l.context===r)&&Sc(this,s);else{for(var c=0,u=[],p=l.length;c<p;c++)(l[c].fn!==o||i&&!l[c].once||r&&l[c].context!==r)&&u.push(l[c]);u.length?this._events[s]=u.length===1?u[0]:u:Sc(this,s)}return this};Gt.prototype.removeAllListeners=function(t){var o;return t?(o=Xt?Xt+t:t,this._events[o]&&Sc(this,o)):(this._events=new aa,this._eventsCount=0),this};Gt.prototype.off=Gt.prototype.removeListener;Gt.prototype.addListener=Gt.prototype.on;Gt.prefixed=Xt;Gt.EventEmitter=Gt;typeof lg<"u"&&(lg.exports=Gt)});var dg=vr(Ui=>{"use strict";a();Object.defineProperty(Ui,"__esModule",{value:!0});Ui.Channel=Ui.ChannelPort=void 0;var kk=Zx(),bc="vapIpc",cg=Symbol.for("vapIpc.edgeCreate"),ug=class{_pipes=new Map;_listeners=new Map;_createListenerMap(){return new Map}_emit(t,o,...r){for(let[i,s]of this._listeners.entries()){if(i===t)continue;let l=s.get(o);l&&l(...r)}}createPipe(t){let o=this.getPipe(t);if(o)return o;let r=this._createListenerMap();this._listeners.set(t,r);let i={emit:this._emit.bind(this,t),listen:(s,l)=>void r.set(s,l)};return this._pipes.set(t,i),i}getPipe(t){return this._pipes.get(t)??null}};Ui.ChannelPort=ug;var pg=class{id;_edges=new Map;_callbacks=new Map;_callers=new Map;_edgePipes=new Map;_pipes=[];_emitter=new kk.EventEmitter;_logger;_destroyed=!1;constructor(t){this.id=t}addPipe(t){t.listen(`${bc}:handshake`,o=>{this._handleHandshake(t,o)}),t.listen(`${bc}:message`,o=>{this._handleMessage(t,o)}),this._pipes.push(t),this._logger?.log(`Adding pipe to channel "${this.id}"`)}setLogger(t){this._logger=t}_handleHandshake(t,o){if(this.id===o.id)return;this._logger?.log(`\u{1F91D} "${o.id}" -> "${this.id}" (edges: [${o.channelIds.join(", ")}])`);let r=this._edges.get(o.id);if(r){let i=o.channelIds.filter(s=>!r?.channelIds.includes(s));if(i.includes(this.id)&&i.splice(i.indexOf(this.id),1),!i.length)return;this._edges.set(o.id,{...o,channelIds:[...r.channelIds,...i]})}else{let i=[...o.channelIds].filter(s=>s!==this.id);this._edges.set(o.id,{...o,channelIds:i}),this._edgePipes.set(o.id,t)}this._emitter.emit(cg,o),this.handshakeAll()}_handleMessage(t,o){if(o.proxiedBy===this.id)return;if(o.destination!==this.id)return this._emitMessage({...o,proxiedBy:this.id});if(!o.nonce)return void this._emitter.emit(o.name,o.data);let r=this._callbacks.get(o.nonce);if(r)return void r(o.data);let i=this._callers.get(o.name);if(i){i(o.data).catch(s=>(console.error(s),new Error(s?.message??`${s}`))).then(s=>{this._emitMessage({name:o.name,source:this.id,destination:o.source,data:s,nonce:o.nonce})});return}}_emitHandshake(t){let o=this.getEdge();t.emit(`${bc}:handshake`,o)}_emitMessage(t){let o=this.findEdgeId(t.destination);if(!o)return;this._edgePipes.get(o)?.emit(`${bc}:message`,t)}getEdge(){let t=[...this._edges.keys(),...[...this._edges.values()].map(o=>o.channelIds).flat()].filter((o,r,i)=>i.indexOf(o)===r);return{id:this.id,channelIds:t}}findEdgeId(t){for(let o of this._edges.values())if(o.id===t||o.channelIds.includes(t))return o.id;return null}waitForEdge(t){let o=this.findEdgeId(t);return o?Promise.resolve(o):new Promise(r=>{let i=s=>{(s.id===t||s.channelIds.includes(t))&&(this._emitter.off(cg,i),r(s.id))};this._emitter.on(cg,i)})}createNonce(){return Math.random().toString(16).slice(2)}send(t){this._emitMessage({...t,source:this.id})}call(t,o={timeout:1e4}){let r=this.createNonce(),i=new Promise((s,l)=>{let c=setTimeout(()=>{this._callbacks.delete(r),l(new Error("Call timed out"))},o.timeout);this._callbacks.set(r,u=>{this._callbacks.delete(r),clearTimeout(c),o.signal?.aborted?o.signal.reason instanceof Error&&l(o.signal.reason):u instanceof Error?l(u):s(u)})});return this._emitMessage({...t,source:this.id,nonce:r}),i}on(t,o){return this._emitter.on(t,o),this}off(t,o){return this._emitter.off(t,o),this}once(t,o){this._emitter.once(t,o)}onCall(t,o){this._callers.set(t,async(...r)=>await o(...r))}removeCaller(){}handshakeAll(){this._pipes.forEach(t=>this._emitHandshake(t))}destroy(){this._emitter.removeAllListeners(),this._callbacks.clear(),this._callers.clear(),this._edgePipes.clear(),this._pipes=[],this._destroyed=!0}};Ui.Channel=pg});var gg=vr($i=>{"use strict";a();Object.defineProperty($i,"__esModule",{value:!0});$i.RemoteClient=$i.RemoteHost=void 0;var mg=class{channel;constructor(t,o){this.channel=t;for(let[r,i]of Object.entries(o))t.onCall(r,async s=>await i(...s));t.handshakeAll()}};$i.RemoteHost=mg;var fg=class{hostName;channel;constructor(t,o){this.hostName=t,this.channel=o}async connect(){await this.channel.waitForEdge(this.hostName)}run(t,...o){return this.channel.call({name:t,destination:this.hostName,data:o})}};$i.RemoteClient=fg});var Qx=vr(Gi=>{"use strict";a();Object.defineProperty(Gi,"__esModule",{value:!0});Gi.WorkerClient=Gi.createWorkerHost=void 0;var Xx=dg(),Jx=gg(),Rk=(e,t)=>{let o=new Xx.Channel(e);return o.addPipe({emit:(r,i)=>postMessage({event:r,data:i}),listen:(r,i)=>addEventListener("message",({data:s})=>{s.event===r&&i(s.data)})}),new Jx.RemoteHost(o,t)};Gi.createWorkerHost=Rk;var hg=class extends Jx.RemoteClient{workerOpts;worker;workerListeners=[];url;constructor(t,o,r,i={}){let s=new Xx.Channel(t);if(super(o,s),this.workerOpts=i,r instanceof Blob){let l=new Blob([r],{type:"text/javascript"});this.url=URL.createObjectURL(l)}else this.url=r}async init(){let t=this.worker=new Worker(this.url,this.workerOpts);this.channel.addPipe({emit:(o,r)=>t.postMessage({event:o,data:r}),listen:(o,r)=>{let i=s=>{let{event:l,data:c}=s.data;l===o&&r(c)};this.workerListeners.push(i),t.addEventListener("message",i)}}),await this.connect()}destroy(){if(this.worker){for(let t of this.workerListeners)this.worker.removeEventListener("message",t);this.worker.terminate()}this.channel.destroy(),this.url.startsWith("blob:")&&URL.revokeObjectURL(this.url)}};Gi.WorkerClient=hg});var Vx=vr(An=>{"use strict";a();var Dk=An&&An.__createBinding||(Object.create?function(e,t,o,r){r===void 0&&(r=o);var i=Object.getOwnPropertyDescriptor(t,o);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,r,i)}:function(e,t,o,r){r===void 0&&(r=o),e[r]=t[o]}),yg=An&&An.__exportStar||function(e,t){for(var o in e)o!=="default"&&!Object.prototype.hasOwnProperty.call(t,o)&&Dk(t,e,o)};Object.defineProperty(An,"__esModule",{value:!0});yg(dg(),An);yg(gg(),An);yg(Qx(),An)});function Sg(e){Tc.id!==e.id&&(Object.assign(Tc,e),vg.forEach(t=>t(e)))}var Tc,vg,ew,bg=g(()=>{"use strict";a();x();Tc={id:null,theme:null},vg=new Set,ew=()=>{let[,e]=_.useState(Tc);return _.useEffect(()=>(vg.add(e),()=>void vg.delete(e)),[]),Tc}});function Kr(e){if(Object.prototype.hasOwnProperty.call(Hi,e))return Hi[e];let t=Object.values(Hi).find(o=>o.aliases?.includes(e));return t?(Bk.set(e,t),t):null}var Lk,Ek,tw,_k,Ok,Hi,ow,nw,Bk,xc=g(()=>{"use strict";a();Lk="Vap0r1ze/vapcord",Ek="88a7032a59cca40da170926651b08201ea3b965a",tw=`https://raw.githubusercontent.com/${Lk}/${Ek}/assets/shiki-codeblocks`,_k=e=>`${tw}/${e}`,Ok=`${tw}/languages.json`,Hi={},ow=async()=>{let e=await fetch(Ok).then(o=>o.json()),t=Object.fromEntries(e.map(o=>[o.id,{...o,grammarUrl:_k(o.fileName)}]));Object.assign(Hi,t)},nw=e=>e.grammar?Promise.resolve(e.grammar):fetch(e.grammarUrl).then(t=>t.json()),Bk=new Map});var Fk,Uk,Ze,Nn,Tg=g(()=>{"use strict";a();Fk="shikijs/shiki",Uk="0b28ad8ccfbf2615f2d9d38ea8255416b8ac3043",Ze=e=>`https://raw.githubusercontent.com/${Fk}/${Uk}/packages/shiki/themes/${e}.json`,Nn={DarkPlus:Ze("dark-plus"),MaterialCandy:"https://raw.githubusercontent.com/millsp/material-candy/master/material-candy.json",DraculaSoft:Ze("dracula-soft"),Dracula:Ze("dracula"),GithubDarkDimmed:Ze("github-dark-dimmed"),GithubDark:Ze("github-dark"),GithubLight:Ze("github-light"),LightPlus:Ze("light-plus"),MaterialDarker:Ze("material-darker"),MaterialDefault:Ze("material-default"),MaterialLighter:Ze("material-lighter"),MaterialOcean:Ze("material-ocean"),MaterialPalenight:Ze("material-palenight"),MinDark:Ze("min-dark"),MinLight:Ze("min-light"),Monokai:Ze("monokai"),Nord:Ze("nord"),OneDarkPro:Ze("one-dark-pro"),Poimandres:Ze("poimandres"),RosePineDawn:Ze("rose-pine-dawn"),RosePineMoon:Ze("rose-pine-moon"),RosePine:Ze("rose-pine"),SlackDark:Ze("slack-dark"),SlackOchin:Ze("slack-ochin"),SolarizedDark:Ze("solarized-dark"),SolarizedLight:Ze("solarized-light"),VitesseDark:Ze("vitesse-dark"),VitesseLight:Ze("vitesse-light"),CssVariables:Ze("css-variables")}});var iw,xg,rw,ve,la=g(()=>{"use strict";a();Cl();iw=ba(Vx());bg();xc();Tg();xg=Object.values(Nn),ve={client:null,currentTheme:null,currentThemeUrl:null,timeoutMs:1e4,languages:Hi,themes:Nn,loadedThemes:new Set,loadedLangs:new Set,clientPromise:new Promise(e=>rw=e),init:async e=>{let t=await fetch(KS).then(i=>i.blob()),o=ve.client=new iw.WorkerClient("shiki-client","shiki-host",t,{name:"ShikiWorker"});await o.init();let r=e||xg[0];await ow(),await o.run("setOnigasm",{wasm:YS}),await o.run("setHighlighter",{theme:r,langs:[]}),ve.loadedThemes.add(r),await ve._setTheme(r),rw(o)},_setTheme:async e=>{ve.currentThemeUrl=e;let{themeData:t}=await ve.client.run("getTheme",{theme:e});ve.currentTheme=JSON.parse(t),Sg({id:e,theme:ve.currentTheme})},loadTheme:async e=>{let t=await ve.clientPromise;ve.loadedThemes.has(e)||(await t.run("loadTheme",{theme:e}),ve.loadedThemes.add(e))},setTheme:async e=>{await ve.clientPromise,e||=xg[0],ve.loadedThemes.has(e)||await ve.loadTheme(e),await ve._setTheme(e)},loadLang:async e=>{let t=await ve.clientPromise,o=Kr(e);!o||ve.loadedLangs.has(o.id)||(await t.run("loadLanguage",{lang:{...o,grammar:o.grammar??await nw(o)}}),ve.loadedLangs.add(o.id))},tokenizeCode:async(e,t)=>{let o=await ve.clientPromise,r=Kr(t);return r?(ve.loadedLangs.has(r.id)||await ve.loadLang(r.id),await o.run("codeToThemedTokens",{code:e,lang:t,theme:ve.currentThemeUrl??xg[0]})):[]},destroy(){ve.currentTheme=null,ve.currentThemeUrl=null,Sg({id:null,theme:null}),ve.client?.destroy()}}});var ca,wg=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/shikiCodeblocks.desktop/devicon.css",{name:"src/plugins/shikiCodeblocks.desktop/devicon.css",source:`@import url("https://cdn.jsdelivr.net/gh/devicons/devicon@v2.10.1/devicon.min.css");
`,classNames:{},dom:null});ca="src/plugins/shikiCodeblocks.desktop/devicon.css"});var ua=g(()=>{"use strict";a()});var Gk,ur,Mg=g(()=>{"use strict";a();$();rt();Pe();vn();w();la();Tg();wg();ua();Gk=Object.keys(Nn),ur=D({theme:{type:4,description:"Default themes",options:Gk.map(e=>({label:yn(sp(e)),value:Nn[e],default:Nn[e]===Nn.DarkPlus})),onChange:ve.setTheme},customTheme:{type:0,description:"A link to a custom vscode theme",placeholder:Nn.MaterialCandy,onChange:e=>{ve.setTheme(e||ur.store.theme)}},tryHljs:{type:4,description:"Use the more lightweight default Discord highlighter and theme.",options:[{label:"Never",value:"NEVER"},{label:"Prefer Shiki instead of Highlight.js",value:"SECONDARY",default:!0},{label:"Prefer Highlight.js instead of Shiki",value:"PRIMARY"},{label:"Always",value:"ALWAYS"}]},useDevIcon:{type:4,description:"How to show language icons on codeblocks",options:[{label:"Disabled",value:"DISABLED"},{label:"Colorless",value:"GREYSCALE",default:!0},{label:"Colored",value:"COLOR"}],onChange:e=>{e==="DISABLED"?jt(ca):xt(ca)}},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=iu(e);return t?t.pathname.endsWith(".json")?!0:"Must be a json file":"Must be a valid URL"}}})});function aw(e,t){let o=ur.use(e),[r,i]=_.useState(!1),s={...o,...t},l=s.customTheme||s.theme;if(t){let c=ve.currentThemeUrl&&l&&l!==ve.currentThemeUrl,u=Object.keys(t).length===0;r&&(!c||u)&&i(!1),!r&&c&&(i(!0),ve.setTheme(l))}return{...s,isThemeLoading:l!==ve.currentThemeUrl}}var lw=g(()=>{"use strict";a();x();la();Mg()});function cw(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 uw=g(()=>{"use strict";a()});var Wo,pw,pa=g(()=>{"use strict";a();rt();x();xc();ua();Wo=Fe("shiki-"),pw=({lang:e,tryHljs:t})=>{let o=e?wr?.getLanguage?.(e):null,i=(e?Kr(e):null)?.name;switch(t){case"ALWAYS":return!0;case"PRIMARY":return!!o||e==="";case"SECONDARY":return!i&&!!o;case"NEVER":return!1;default:return!1}}});function dw(e){let[t,o]=_.useState(!1);function r(i){$t.copy(i),o(!0),setTimeout(()=>{o(!1)},e)}return[t,r]}var mw=g(()=>{"use strict";a();x()});function fw({content:e,...t}){let[o,r]=dw(1e3);return n("button",{...t,style:{...t.style,cursor:o?"default":void 0},onClick:()=>r(e)},o?"Copied!":"Copy")}var gw=g(()=>{"use strict";a();mw()});function hw({content:e,theme:t}){let o=[];return $t.SUPPORTS_COPY&&o.push(n(fw,{content:e,className:Wo("btn"),style:{backgroundColor:t.accentBgColor,color:t.accentFgColor}})),n("div",{className:Wo("btns")},o)}var yw=g(()=>{"use strict";a();x();pa();gw()});var vw,Sw=g(()=>{"use strict";a();x();pa();vw=({theme:e,useHljs:t,lang:o,content:r,tokens:i})=>{let s;if(t)try{let{value:c}=wr.highlight(o,r,!0);s=c.split(`
`).map((u,p)=>n("span",{key:p,dangerouslySetInnerHTML:{__html:u}}))}catch{s=r.split(`
`).map(c=>n("span",null,c))}else s=(i??r.split(`
`).map(u=>[{color:e.plainColor,content:u}])).map(u=>u.length===0?n("span",null,`
`):n(f,null,u.map(({content:p,color:d,fontStyle:h},v)=>n("span",{key:v,style:{color:d,fontStyle:(h??0)&1?"italic":void 0,fontWeight:(h??0)&2?"bold":void 0,textDecoration:(h??0)&4?"underline":void 0}},p))));let l=s.map((c,u)=>n("tr",{key:u},n("td",{style:{color:e.plainColor}},u+1),n("td",null,c)));return n("table",{className:Wo("table")},...l)}});function bw({langName:e,useDevIcon:t,shikiLang:o}){return e?n("div",{className:Wo("lang")},t!=="DISABLED"&&o?.devicon&&n("i",{className:`${Wo("devicon")} devicon-${o.devicon}${t==="COLOR"?" colored":""}`}),e):n(f,null)}var Tw=g(()=>{"use strict";a();ua();pa()});var wc,Hk,xw=g(()=>{"use strict";a();ae();ut();x();xc();la();lw();bg();uw();pa();yw();Sw();Tw();wc=e=>n("pre",{className:Wo("container")},n(B,null,n(Hk,{...e}))),Hk=({lang:e,content:t,isPreview:o,tempSettings:r})=>{let{tryHljs:i,useDevIcon:s,bgOpacity:l}=aw(["tryHljs","useDevIcon","bgOpacity"],r),{id:c,theme:u}=ew(),p=e?Kr(e):null,d=pw({lang:e,tryHljs:i}),[h,v]=au(!0),[T]=at(async()=>!p||d||!v?null:await ve.tokenizeCode(t,e),{fallbackValue:null,deps:[e,t,c,v]}),N={plainColor:u?.fg||"var(--text-normal)",accentBgColor:u?.colors?.["statusBar.background"]||(d?"#7289da":"#007BC8"),accentFgColor:u?.colors?.["statusBar.foreground"]||"#FFF",backgroundColor:u?.colors?.["editor.background"]||"var(--background-secondary)"},b;return e&&(b=d?wr?.getLanguage?.(e)?.name:p?.name),n("div",{ref:h,className:Wo("root",{plain:!b,preview:o}),style:{backgroundColor:d?N.backgroundColor:`rgba(${cw(N.backgroundColor).concat(l/100).join(", ")})`,color:N.plainColor}},n("code",null,n(bw,{langName:b,useDevIcon:s,shikiLang:p}),n(vw,{theme:N,useHljs:d,lang:e,content:t,tokens:T}),!o&&n(hw,{content:t,theme:N})))}});var ww,Mw,Pw=g(()=>{"use strict";a();ww=new Map,Mw=()=>{ww.forEach(e=>e.remove()),ww.clear()}});var Pg,Iw=g(()=>{"use strict";a();Wx();rt();A();w();Kx();la();xw();wg();Mg();ua();Pw();Pg=y({name:"ShikiCodeblocks",description:"Brings vscode-style codeblocks into Discord, powered by Shiki",authors:[m.Vap],patches:[{find:"codeBlock:{react(",replacement:{match:/codeBlock:\{react\((\i),(\i),(\i)\)\{/,replace:"$&return $self.renderHighlighter($1,$2,$3);"}},{find:".PREVIEW_NUM_LINES",replacement:{match:/(?<=function \i\((\i)\)\{)(?=let\{text:\i,language:)/,replace:"return $self.renderHighlighter({lang:$1.language,content:$1.text});"}}],start:async()=>{ur.store.useDevIcon!=="DISABLED"&&xt(ca),await ve.init(ur.store.customTheme||ur.store.theme)},stop:()=>{ve.destroy(),Mw()},settingsAboutComponent:({tempSettings:e})=>wc({lang:"tsx",content:qx,isPreview:!0,tempSettings:e}),settings:ur,shiki:ve,createHighlighter:wc,renderHighlighter:({lang:e,content:t})=>wc({lang:e?.toLowerCase(),content:t,isPreview:!1})})});var Ig,Aw=g(()=>{"use strict";a();A();w();Ig=y({name:"ShowAllMessageButtons",description:"Always show all message buttons no matter if you are holding the shift key or not.",authors:[m.Nuckyz],patches:[{find:".Messages.MESSAGE_UTILITIES_A11Y_LABEL",replacement:{match:/isExpanded:\i&&(.+?),/,replace:"isExpanded:$1,"}}]})});var Nw=g(()=>{});function kw(){let e=Vi(Cw.colors.INTERACTIVE_MUTED).hex(),t=Vi(Cw.colors.INTERACTIVE_ACTIVE).hex();return n(zk,{color:e,forcedIconColor:t,size:16,tooltipText:et.Messages.CONNECTION_VERIFIED})}var Cw,zk,Rw=g(()=>{"use strict";a();j();x();Cw=Vt(e=>e.colors?.INTERACTIVE_MUTED?.css),zk=je(".CONNECTIONS_ROLE_OFFICIAL_ICON_TOOLTIP")});function Dw({id:e,theme:t}){let o=po.getUserProfile(e);if(!o)return null;let r=o.connectedAccounts;return r?.length?n(jk,null,n(J,{tag:"h2",variant:"eyebrow",style:{color:"var(--header-primary)"}},"Connections"),n(ce,{style:{marginTop:"8px",gap:Zk(Mc.store.iconSpacing),flexWrap:"wrap"}},r.map(i=>n(Qk,{connection:i,theme:t})))):null}function Qk({connection:e,theme:t}){let o=Kk.get(qk.useLegacyPlatformType(e.type)),r=o.getPlatformUserUrl?.(e),i=n("img",{"aria-label":e.name,src:t==="light"?o.icon.lightSVG:o.icon.darkSVG,style:{width:Mc.store.iconSize,height:Mc.store.iconSize}}),s=r?hi:rl;return n(ee,{text:n("span",{className:"vc-sc-tooltip"},e.name,e.verified&&n(kw,null),n(s,{height:16,width:16})),key:e.id},l=>r?n("a",{...l,className:"vc-user-connection",href:r,target:"_blank",onClick:c=>{Vencord.Plugins.isPluginEnabled("OpenInApp")&&Vencord.Plugins.plugins.OpenInApp.handleLink(c.currentTarget,c)}},i):n("button",{...l,className:"vc-user-connection",onClick:()=>vo(e.name)},i))}var jk,Wk,qk,Kk,Yk,Zk,Mc,Xk,Jk,Ag,Lw=g(()=>{"use strict";a();Nw();$();ae();kt();Lt();A();Pe();w();j();x();Rw();jk=je(".lastSection","children:"),Wk=Re("ThemeStore"),qk=P("useLegacyPlatformType"),Kk=P("isSupported","getByUrl"),Yk=un(',"--profile-gradient-primary-color"'),Zk=e=>(e??0)*2+4,Mc=D({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}]}}),Xk=B.wrap(({user:e,displayProfile:t})=>n(Dw,{id:e.id,theme:Yk(e,t).profileTheme})),Jk=B.wrap(({id:e})=>n(Dw,{id:e,theme:Wk.theme}));Ag=y({name:"ShowConnections",description:"Show connected accounts in user popouts",authors:[m.TheKodeToad],patches:[{find:"{isUsingGuildBio:null!==(",replacement:{match:/,theme:\i\}\)(?=,.{0,150}setNote:)/,replace:"$&,$self.profilePopoutComponent({ user: arguments[0].user, displayProfile: arguments[0].displayProfile })"}},{find:'"Profile Panel: user cannot be undefined"',replacement:{match:/\(0,\i\.jsx\)\(\i\.\i,\{\}\).{0,100}setNote:(?=.+?channelId:(\i).id)/,replace:"$self.profilePanelComponent({ id: $1.recipients[0] }),$&"}}],settings:Mc,profilePopoutComponent:Xk,profilePanelComponent:Jk})});var Ew=g(()=>{});function cR({channel:e}){let[t,o]=Y(pr.store.defaultAllowedUsersAndRolesDropdownState),[r,i]=Y([]),{type:s,topic:l,lastMessageId:c,defaultForumLayout:u,lastPinTimestamp:p,defaultAutoArchiveDuration:d,availableTags:h,id:v,rateLimitPerUser:T,defaultThreadRateLimitPerUser:N,defaultSortOrder:b,defaultReactionEmoji:I,bitrate:k,rtcRegion:M,videoQualityMode:F,permissionOverwrites:H,guild_id:X}=e;return pe(()=>{let Z=[],q=de.getGuild(X).ownerId;Oe.getMember(X,q)||Z.push(q),Object.values(H).forEach(({type:L,id:V})=>{L===1&&!Oe.getMember(X,V)&&Z.push(V)}),Z.length>0&&O.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[X],userIds:Z}),E.plugins.PermissionsViewer.enabled&&i(Jl(Object.values(H).map(L=>({type:L.type,id:L.id,overwriteAllow:L.allow,overwriteDeny:L.deny})),X))},[v]),n("div",{className:_w.auto+" "+_w.customTheme+" "+Vk.chatContent+" shc-lock-screen-outer-container"},n("div",{className:"shc-lock-screen-container"},n("img",{className:"shc-lock-screen-logo",src:lR}),n("div",{className:"shc-lock-screen-heading-container"},n(J,{variant:"heading-xxl/bold"},"This is a ",_e.can(xe.VIEW_CHANNEL,e)?"locked":"hidden"," ",rR[s]," channel."),e.isNSFW()&&n(ee,{text:"NSFW"},({onMouseLeave:Z,onMouseEnter:q})=>n("svg",{onMouseLeave:Z,onMouseEnter:q,className:"shc-lock-screen-heading-nsfw-icon",width:"32",height:"32",viewBox:"0 0 48 48","aria-hidden":!0,role:"img"},n("path",{fill:"currentColor",d:"M.7 43.05 24 2.85l23.3 40.2Zm23.55-6.25q.75 0 1.275-.525.525-.525.525-1.275 0-.75-.525-1.3t-1.275-.55q-.8 0-1.325.55-.525.55-.525 1.3t.55 1.275q.55.525 1.3.525Zm-1.85-6.1h3.65V19.4H22.4Z"})))),!e.isGuildVoice()&&!e.isGuildStageVoice()&&n(J,{variant:"text-lg/normal"},"You can not see the ",e.isForumChannel()?"posts":"messages"," of this channel.",e.isForumChannel()&&l&&l.length>0&&" However you may see its guidelines:"),e.isForumChannel()&&l&&l.length>0&&n("div",{className:"shc-lock-screen-topic-container"},Be.parseTopic(l,!1,{channelId:v})),c&&n(J,{variant:"text-md/normal"},"Last ",e.isForumChannel()?"post":"message"," created:",n(Yo,{timestamp:yo(Xo.extractTimestamp(c))})),p&&n(J,{variant:"text-md/normal"},"Last message pin: ",n(Yo,{timestamp:yo(p)})),(T??0)>0&&n(J,{variant:"text-md/normal"},"Slowmode: ",Ps(T,"seconds")),(N??0)>0&&n(J,{variant:"text-md/normal"},"Default thread slowmode: ",Ps(N,"seconds")),(e.isGuildVoice()||e.isGuildStageVoice())&&k!=null&&n(J,{variant:"text-md/normal"},"Bitrate: ",k," bits"),M!==void 0&&n(J,{variant:"text-md/normal"},"Region: ",M??"Automatic"),(e.isGuildVoice()||e.isGuildStageVoice())&&n(J,{variant:"text-md/normal"},"Video quality mode: ",aR[F??1]),(d??0)>0&&n(J,{variant:"text-md/normal"},"Default inactivity duration before archiving ",e.isForumChannel()?"posts":"threads",":"," "+Ps(d,"minutes")),u!=null&&n(J,{variant:"text-md/normal"},"Default layout: ",sR[u]),b!=null&&n(J,{variant:"text-md/normal"},"Default sort order: ",iR[b]),I!=null&&n("div",{className:"shc-lock-screen-default-emoji-container"},n(J,{variant:"text-md/normal"},"Default reaction emoji:"),Be.defaultRules[I.emojiName?"emoji":"customEmoji"].react({name:I.emojiName?oR.convertSurrogateToName(I.emojiName):Ro.getCustomEmojiById(I.emojiId)?.name??"",emojiId:I.emojiId??void 0,surrogate:I.emojiName??void 0,src:I.emojiName?nR.getURL(I.emojiName):void 0},void 0,{key:"0"})),e.hasFlag(16)&&n(J,{variant:"text-md/normal"},"Posts on this forum require a tag to be set."),h&&h.length>0&&n("div",{className:"shc-lock-screen-tags-container"},n(J,{variant:"text-lg/bold"},"Available tags:"),n("div",{className:"shc-lock-screen-tags"},h.map(Z=>n(tR,{tag:Z})))),n("div",{className:"shc-lock-screen-allowed-users-and-roles-container"},n("div",{className:"shc-lock-screen-allowed-users-and-roles-container-title"},E.plugins.PermissionsViewer.enabled&&n(ee,{text:"Permission Details"},({onMouseLeave:Z,onMouseEnter:q})=>n("button",{onMouseLeave:Z,onMouseEnter:q,className:"shc-lock-screen-allowed-users-and-roles-container-permdetails-btn",onClick:()=>Li(r,de.getGuild(e.guild_id),e.name)},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M7 12.001C7 10.8964 6.10457 10.001 5 10.001C3.89543 10.001 3 10.8964 3 12.001C3 13.1055 3.89543 14.001 5 14.001C6.10457 14.001 7 13.1055 7 12.001ZM14 12.001C14 10.8964 13.1046 10.001 12 10.001C10.8954 10.001 10 10.8964 10 12.001C10 13.1055 10.8954 14.001 12 14.001C13.1046 14.001 14 13.1055 14 12.001ZM19 10.001C20.1046 10.001 21 10.8964 21 12.001C21 13.1055 20.1046 14.001 19 14.001C17.8954 14.001 17 13.1055 17 12.001C17 10.8964 17.8954 10.001 19 10.001Z"})))),n(J,{variant:"text-lg/bold"},"Allowed users and roles:"),n(ee,{text:t?"Hide Allowed Users and Roles":"View Allowed Users and Roles"},({onMouseLeave:Z,onMouseEnter:q})=>n("button",{onMouseLeave:Z,onMouseEnter:q,className:"shc-lock-screen-allowed-users-and-roles-container-toggle-btn",onClick:()=>o(L=>!L)},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24",transform:t?"scale(1 -1)":"scale(1 1)"},n("path",{fill:"currentColor",d:"M16.59 8.59003L12 13.17L7.41 8.59003L6 10L12 16L18 10L16.59 8.59003Z"}))))),t&&n(eR,{channel:e}))))}var _w,Vk,eR,tR,oR,nR,rR,iR,sR,aR,lR,Ow,Bw=g(()=>{"use strict";a();$();ae();vn();j();x();Vs();Qs();Ng();_w=P("auto","content","scrollerBase"),Vk=P("chat","content","noChat","chatContent"),eR=je(".Messages.ROLE_REQUIRED_SINGLE_USER_MESSAGE"),tR=Kc(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")}),oR=P("convertSurrogateToName"),nR=P("getURL","getEmojiColors"),rR={[0]:"text",[5]:"announcement",[15]:"forum",[2]:"voice",[13]:"stage"},iR={[0]:"Latest activity",[1]:"Creation date"},sR={[0]:"Not set",[1]:"List view",[2]:"Gallery view"},aR={[1]:"Automatic",[2]:"720p"},lR="/assets/433e3ec4319a9d11b0cbe39342614982.svg";Ow=B.wrap(cR)});var Fw,pr,Cg,Ng=g(()=>{"use strict";a();Ew();$();ae();A();Jr();w();j();x();Bw();Fw=P("channelEmoji","unread","icon"),pr=D({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}}),Cg=y({name:"ShowHiddenChannels",description:"Show channels that you do not have access to view.",authors:[m.BigDuck,m.AverageReactEnjoyer,m.D3SOX,m.Ven,m.Nuckyz,m.Nickyux,m.dzshn],settings:pr,patches:[{find:'"placeholder-channel-id"',replacement:[{match:/if\(!\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL.+?{if\(this\.id===\i\).+?threadIds:\i}}/,replace:""},{match:/(?<=&&)(?=!\i\.\i\.hasUnread\(this\.record\.id\))/,replace:"$self.isHiddenChannel(this.record)||"},{match:/(activeJoinedRelevantThreads:.{0,50}VIEW_CHANNEL.+?renderLevel:(.+?),threadIds.+?renderLevel:).+?(?=,threadIds)/g,replace:(e,t,o)=>`${t}${o}`},{match:/(?<=getRenderLevel\(\i\){.+?return)!\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL,this\.record\)\|\|/,replace:" "}]},{find:"VoiceChannel, transitionTo: Channel does not have a guildId",replacement:[{match:/(?<=getCurrentClientVoiceChannelId\((\i)\.guild_id\);return)/,replace:(e,t)=>`!$self.isHiddenChannel(${t})&&`},{match:/(?=&&\i\.\i\.selectVoiceChannel\((\i)\.id\))/,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`},{match:/!__OVERLAY__&&\((?<=selectVoiceChannel\((\i)\.id\).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t},true)||`}]},{find:".MAX_STAGE_VOICE_USER_LIMIT})",replacement:{match:/!(\i)\.isRoleSubscriptionTemplatePreviewChannel\(\)/,replace:(e,t)=>`${e}&&!$self.isHiddenChannel(${t})`}},{find:"ChannelItemEditButton:function(){",replacement:[...["renderEditButton","renderInviteButton"].map(e=>({match:new RegExp(`(?<=${e}\\(\\){)`,"g"),replace:"if($self.isHiddenChannel(this.props.channel))return null;"}))]},{find:"VoiceChannel.renderPopout: There must always be something to render",all:!0,replacement:{match:/(?<=renderOpenChatButton=\(\)=>{)/,replace:"if($self.isHiddenChannel(this.props.channel))return null;"}},{find:".Messages.CHANNEL_TOOLTIP_DIRECTORY",predicate:()=>pr.store.showMode===0,replacement:{match:/(?=switch\((\i)\.type\).{0,30}\.GUILD_ANNOUNCEMENT.{0,70}\(0,\i\.\i\))/,replace:(e,t)=>`if($self.isHiddenChannel(${t}))return $self.LockIcon;`}},{find:"UNREAD_IMPORTANT:",predicate:()=>pr.store.showMode===1,replacement:[{match:/(?<={channel:(\i),name:\i,muted:(\i).+?;)/,replace:(e,t,o)=>`${o}=$self.isHiddenChannel(${t})?true:${o};`},{match:/\i\.children.+?:null(?<=,channel:(\i).+?)/,replace:(e,t)=>`${e},$self.isHiddenChannel(${t})?$self.HiddenChannelIcon():null`},{match:/(?<=\.wrapper:\i\.notInteractive,)(.+?)if\((\i)\)return (\i\.MUTED);/,replace:(e,t,o,r)=>`${o}?${r}:"",${t}if(${o})return "";`}]},{find:"UNREAD_IMPORTANT:",replacement:[{predicate:()=>pr.store.hideUnreads===!1&&pr.store.showMode===1,match:/\.LOCKED;if\((?<={channel:(\i).+?)/,replace:(e,t)=>`${e}!$self.isHiddenChannel(${t})&&`},{predicate:()=>pr.store.hideUnreads===!0,match:/(?<={channel:(\i),name:\i,.+?unread:(\i).+?;)/,replace:(e,t,o)=>`${o}=$self.isHiddenChannel(${t})?false:${o};`}]},{find:'.displayName="ChannelListUnreadsStore"',replacement:{match:/(?<=if\(null==(\i))(?=.{0,160}?getHasImportantUnread\)\(\i\))/g,replace:(e,t)=>`||$self.isHiddenChannel(${t})`}},{find:"renderBottomUnread(){",replacement:{match:/(?=&&\(0,\i\.getHasImportantUnread\)\((\i\.record)\))/,replace:"&&!$self.isHiddenChannel($1)"}},{find:".useFlattenedChannelIdListWithThreads)",replacement:{match:/(?=&&\(0,\i\.getHasImportantUnread\)\((\i)\))/,replace:"&&!$self.isHiddenChannel($1)"}},{find:"Missing channel in Channel.renderHeaderToolbar",replacement:[{match:/(?<=renderHeaderToolbar=\(\)=>{.+?case \i\.\i\.GUILD_TEXT:)(?=.+?(\i\.push.{0,50}channel:(\i)},"notifications"\)\)))(?<=isLurking:(\i).+?)/,replace:(e,t,o,r)=>`if(!${r}&&$self.isHiddenChannel(${o})){${t};break;}`},{match:/(?<=renderHeaderToolbar=\(\)=>{.+?case \i\.\i\.GUILD_MEDIA:)(?=.+?(\i\.push.{0,40}channel:(\i)},"notifications"\)\)))(?<=isLurking:(\i).+?)/,replace:(e,t,o,r)=>`if(!${r}&&$self.isHiddenChannel(${o})){${t};break;}`},{match:/renderMobileToolbar=\(\)=>{.+?case \i\.\i\.GUILD_DIRECTORY:(?<=let{channel:(\i).+?)/,replace:(e,t)=>`${e}if($self.isHiddenChannel(${t}))break;`},{match:/(?<=renderHeaderBar=\(\)=>{.+?hideSearch:(\i)\.isDirectory\(\))/,replace:(e,t)=>`||$self.isHiddenChannel(${t})`},{match:/(?<=renderSidebar\(\){)/,replace:"if($self.isHiddenChannel(this.props.channel))return null;"},{match:/(?<=renderChat\(\){)/,replace:"if($self.isHiddenChannel(this.props.channel))return $self.HiddenChannelLockScreen(this.props.channel);"}]},{find:'"MessageManager"',replacement:{match:/"Skipping fetch because channelId is a static route"\);return}(?=.+?getChannel\((\i)\))/,replace:(e,t)=>`${e}if($self.isHiddenChannel({channelId:${t}}))return;`}},{find:'"alt+shift+down"',replacement:{match:/(?<=getChannel\(\i\);return null!=(\i))(?=.{0,150}?getHasImportantUnread\)\(\i\))/,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`}},{find:".APPLICATION_STORE&&null!=",replacement:{match:/(?<=getState\(\)\.channelId.{0,30}?\(0,\i\.\i\)\(\i\))(?=\.map\()/,replace:".filter(e=>!$self.isHiddenChannel(e))"}},{find:".Messages.ROLE_REQUIRED_SINGLE_USER_MESSAGE",replacement:[{match:/ADMINISTRATOR\)\|\|(?<=context:(\i)}.+?)(?=(.+?)VIEW_CHANNEL)/,replace:(e,t,o)=>`${e}!Vencord.Webpack.Common.PermissionStore.can(${xe.CONNECT}n,${t})?${o}CONNECT):`},{match:/permissionOverwrites\[.+?\i=(?<=context:(\i)}.+?)(?=(.+?)VIEW_CHANNEL)/,replace:(e,t,o)=>`${e}!Vencord.Webpack.Common.PermissionStore.can(${xe.CONNECT}n,${t})?${o}CONNECT):`},{match:/sortBy.{0,30}?\.filter\(\i=>(?<=channel:(\i).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?true:`},{match:/computePermissionsForRoles.+?.value\(\)(?<=channel:(\i).+?)/,replace:(e,t)=>`${e}.reduce(...$self.makeAllowedRolesReduce(${t}.guild_id))`},{match:/MANAGE_ROLES.{0,90}?return(?=\(.+?(\(0,\i\.jsxs\)\("div",{className:\i\.members.+?guildId:(\i)\.guild_id.+?roleColor.+?\]}\)))/,replace:(e,t,o)=>(t=t.replace(ln(/(?<=users:\i)/),`,shcChannel:${o}`),t=t.replace(ln(/1!==\i\.length/),"true"),`${e} $self.isHiddenChannel(${o},true)?${t}:`)}]},{find:".avatars),children",replacement:[{match:/maxUsers:\i,users:\i.+?=(\i).+?;/,replace:(e,t)=>`${e}let{shcChannel}=${t};`},{match:/\i>0(?=&&.{0,60}renderPopout)/,replace:e=>`($self.isHiddenChannel(shcChannel,true)?true:${e})`},{match:/(?<=\.value\(\),(\i)=.+?length-)1(?=\]=.{0,60}renderPopout)/,replace:(e,t)=>`($self.isHiddenChannel(shcChannel,true)&&${t}<=0?0:1)`},{match:/(?<="\+",)(\i)\+1/,replace:(e,t)=>`$self.isHiddenChannel(shcChannel,true)&&${t}<=0?"":${e}`}]},{find:".Messages.CHANNEL_CALL_CURRENT_SPEAKER.format",replacement:[{match:/"more-options-popout"\)\),(?<=channel:(\i).+?inCall:(\i).+?)/,replace:(e,t,o)=>`${e}${o}||!$self.isHiddenChannel(${t},true)&&`},{match:/"popup".{0,100}?if\((?<=channel:(\i).+?inCall:(\i).+?)/,replace:(e,t,o)=>`${e}(${o}||!$self.isHiddenChannel(${t},true))&&`}]},{find:".Messages.EMBEDDED_ACTIVITIES_DEVELOPER_ACTIVITY_SHELF_FETCH_ERROR",replacement:[{match:/renderContent\(\i\){.+?this\.renderVoiceChannelEffects.+?children:/,replace:"$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?$self.HiddenChannelLockScreen(this.props.channel):"},{match:/renderContent\(\i\){.+?disableGradients:/,replace:"$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)||"},{match:/(?:{|,)render(?!Header|ExternalHeader).{0,30}?:/g,replace:"$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?()=>null:"},{match:/callContainer,(?<=\i\.callContainer,)/,replace:'$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?"":'}]},{find:'"HasBeenInStageChannel"',replacement:[{match:/"124px".+?children:(?<=let \i,{channel:(\i).+?)(?=.{0,20}?}\)}function)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?$self.HiddenChannelLockScreen(${t}):`},{match:/render(?:BottomLeft|BottomCenter|BottomRight|ChatToasts):\(\)=>(?<=let \i,{channel:(\i).+?)/g,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?null:`},{match:/"124px".+?disableGradients:(?<=let \i,{channel:(\i).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})||`},{match:/"124px".+?style:(?<=let \i,{channel:(\i).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?void 0:`}]},{find:".Messages.STAGE_FULL_MODERATOR_TITLE",replacement:[{match:/\(0,\i\.jsx\)\(\i\.\i\.Divider.+?}\)]}\)(?=.+?:(\i)\.guild_id)/,replace:(e,t)=>`$self.isHiddenChannel(${t})?null:(${e})`},{match:/"recents".+?&&(?=\(.+?channelId:(\i)\.id,showRequestToSpeakSidebar)/,replace:(e,t)=>`${e}!$self.isHiddenChannel(${t})&&`}]},{find:",queryStaticRouteChannels(",replacement:[{match:/(?<=queryChannels\(\i\){.+?getChannels\(\i)(?=\))/,replace:",true"},{match:/(?<=queryChannels\(\i\){.+?isGuildChannelType\)\((\i)\.type\))(?=&&!\i\.\i\.can\()/,replace:"&&!$self.isHiddenChannel($1)"}]},{find:'"^/guild-stages/(\\\\d+)(?:/)?(\\\\d+)?"',replacement:{match:/\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL,\i\)/,replace:"true"}},{find:".shouldCloseDefaultModals",replacement:{match:/(?<=getChannel\(\i\);if\(null!=(\i))(?=.{0,100}?selectVoiceChannel)/,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`}},{find:'.displayName="GuildChannelStore"',replacement:[{match:/isChannelGated\(.+?\)(?=&&)/,replace:e=>`${e}&&false`},{match:/(?<=getChannels\(\i)(\){.+?)return (.+?)}/,replace:(e,t,o)=>`,shouldIncludeHidden${t}return $self.resolveGuildChannels(${o},shouldIncludeHidden??false);}`}]},{find:".Messages.FORM_LABEL_MUTED",replacement:{match:/(?<=getChannels\(\i)(?=\))/,replace:",true"}},{find:'.displayName="NowPlayingViewStore"',replacement:{match:/(getVoiceStateForUser.{0,150}?)&&\i\.\i\.canWithPartialContext.{0,20}VIEW_CHANNEL.+?}\)(?=\?)/,replace:"$1"}}],isHiddenChannel(e,t=!1){return!e||(e.channelId&&(e=Q.getChannel(e.channelId)),!e||e.isDM()||e.isGroupDM()||e.isMultiUserDM())?!1:!_e.can(xe.VIEW_CHANNEL,e)||t&&!_e.can(xe.CONNECT,e)},resolveGuildChannels(e,t){if(t)return e;let o={};for(let[r,i]of Object.entries(e)){if(!Array.isArray(i)){o[r]=i;continue}o[r]??=[];for(let s of i)(s.channel.id===null||!this.isHiddenChannel(s.channel))&&o[r].push(s)}return o},makeAllowedRolesReduce(e){return[(t,o,r,i)=>{if(r!==0)return t;let s=i.find(l=>l.id===e);return s?[s]:i},[]]},HiddenChannelLockScreen:e=>n(Ow,{channel:e}),LockIcon:B.wrap(()=>n("svg",{className:Fw.icon,height:"18",width:"20",viewBox:"0 0 24 24","aria-hidden":!0,role:"img"},n("path",{className:"shc-evenodd-fill-current-color",d:"M17 11V7C17 4.243 14.756 2 12 2C9.242 2 7 4.243 7 7V11C5.897 11 5 11.896 5 13V20C5 21.103 5.897 22 7 22H17C18.103 22 19 21.103 19 20V13C19 11.896 18.103 11 17 11ZM12 18C11.172 18 10.5 17.328 10.5 16.5C10.5 15.672 11.172 15 12 15C12.828 15 13.5 15.672 13.5 16.5C13.5 17.328 12.828 18 12 18ZM15 11H9V7C9 5.346 10.346 4 12 4C13.654 4 15 5.346 15 7V11Z"})),{noop:!0}),HiddenChannelIcon:B.wrap(()=>n(ee,{text:"Hidden Channel"},({onMouseLeave:e,onMouseEnter:t})=>n("svg",{onMouseLeave:e,onMouseEnter:t,className:Fw.icon+" shc-hidden-channel-icon",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":!0,role:"img"},n("path",{className:"shc-evenodd-fill-current-color",d:"m19.8 22.6-4.2-4.15q-.875.275-1.762.413Q12.95 19 12 19q-3.775 0-6.725-2.087Q2.325 14.825 1 11.5q.525-1.325 1.325-2.463Q3.125 7.9 4.15 7L1.4 4.2l1.4-1.4 18.4 18.4ZM12 16q.275 0 .512-.025.238-.025.513-.1l-5.4-5.4q-.075.275-.1.513-.025.237-.025.512 0 1.875 1.312 3.188Q10.125 16 12 16Zm7.3.45-3.175-3.15q.175-.425.275-.862.1-.438.1-.938 0-1.875-1.312-3.188Q13.875 7 12 7q-.5 0-.938.1-.437.1-.862.3L7.65 4.85q1.025-.425 2.1-.638Q10.825 4 12 4q3.775 0 6.725 2.087Q21.675 8.175 23 11.5q-.575 1.475-1.512 2.738Q20.55 15.5 19.3 16.45Zm-4.625-4.6-3-3q.7-.125 1.288.112.587.238 1.012.688.425.45.613 1.038.187.587.087 1.162Z"}))),{noop:!0})})});var Uw=g(()=>{});var da,kg,$w=g(()=>{"use strict";a();Uw();$();A();w();da=D({mode:{type:4,description:"How to display usernames and nicks",options:[{label:"Username then nickname",value:"user-nick",default:!0},{label:"Nickname then username",value:"nick-user"},{label:"Username only",value:"user"}]},displayNames:{type:3,description:"Use display names in place of usernames",default:!1},inReplies:{type:3,default:!1,description:"Also apply functionality to reply previews"}}),kg=y({name:"ShowMeYourName",description:"Display usernames next to nicks, or no nicks at all",authors:[m.Rini,m.TheKodeToad],patches:[{find:".useCanSeeRemixBadge)",replacement:{match:/(?<=onContextMenu:\i,children:).*?\}/,replace:"$self.renderUsername(arguments[0])}"}}],settings:da,renderUsername:({author:e,message:t,isRepliedMessage:o,withMentionPrefix:r,userOverride:i})=>{try{let s=i??t.author,{username:l}=s;da.store.displayNames&&(l=s.globalName||l);let{nick:c}=e,u=r?"@":"";return l===c||o&&!da.store.inReplies?u+c:da.store.mode==="user-nick"?n(f,null,u,l," ",n("span",{className:"vc-smyn-suffix"},c)):da.store.mode==="nick-user"?n(f,null,u,c," ",n("span",{className:"vc-smyn-suffix"},l)):u+l}catch{return e?.nick}}})});var Rg,Gw=g(()=>{"use strict";a();A();w();Rg=y({name:"ShowTimeouts",description:"Display member timeout icons in chat regardless of permissions.",authors:[m.Dolfies],patches:[{find:"showCommunicationDisabledStyles",replacement:{match:/&&\i\.\i\.canManageUser\(\i\.\i\.MODERATE_MEMBERS,\i\.author,\i\)/,replace:""}}]})});function uR(e){let[t,o]=_.useState(Dg);function r(i){Lg.store.persistState&&(Dg=i),o(i)}return _.useEffect(()=>{let i=(s,l)=>{t&&(Lg.store.autoDisable&&r(!1),l.content.startsWith("@silent ")||(l.content="@silent "+l.content))};return Kt(i),()=>void Yt(i)},[t]),e.type.analyticsName!=="normal"?null:n(ee,{text:t?"Disable Silent Message":"Enable Silent Message"},i=>n("div",{style:{display:"flex"}},n(C,{...i,onClick:()=>r(!t),size:"",look:eo.BLANK,innerClassName:St.button,style:{padding:"0 6px"}},n("div",{className:St.buttonWrapper},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",mask:"url(#_)",d:"M18 10.7101C15.1085 9.84957 13 7.17102 13 4c0-.30736.0198-.6101.0582-.907C12.7147 3.03189 12.3611 3 12 3 8.686 3 6 5.686 6 9v5c0 1.657-1.344 3-3 3v1h18v-1c-1.656 0-3-1.343-3-3v-3.2899ZM8.55493 19c.693 1.19 1.96897 2 3.44497 2s2.752-.81 3.445-2H8.55493ZM18.2624 5.50209 21 2.5V1h-4.9651v1.49791h2.4411L16 5.61088V7h5V5.50209h-2.7376Z"}),!t&&n(f,null,n("mask",{id:"_"},n("path",{fill:"#fff",d:"M0 0h24v24H0Z"}),n("path",{stroke:"#000","stroke-width":"5.99068",d:"M0 24 24 0"})),n("path",{fill:"var(--status-danger)",d:"m21.178 1.70703 1.414 1.414L4.12103 21.593l-1.414-1.415L21.178 1.70703Z"})))))))}var Dg,Lg,Eg,Hw=g(()=>{"use strict";a();on();$();ae();A();w();x();Dg=!1,Lg=D({persistState:{type:3,description:"Whether to persist the state of the silent message toggle when changing channels",default:!1,onChange(e){e===!1&&(Dg=!1)}},autoDisable:{type:3,description:"Automatically disable the silent message toggle again after sending one",default:!0}});Eg=y({name:"SilentMessageToggle",authors:[m.Nuckyz,m.CatNoir],description:"Adds a button to the chat bar to toggle sending a silent message.",dependencies:["MessageEventsAPI"],settings:Lg,patches:[{find:"ChannelTextAreaButtons",replacement:{match:/(\i)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&,(()=>{try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}})()"}}],chatBarIcon:B.wrap(uR,{noop:!0})})});function pR(e){let{isEnabled:t}=Cn.use(["isEnabled"]),o=()=>Cn.store.isEnabled=!Cn.store.isEnabled;return e.type.analyticsName!=="normal"?null:n(ee,{text:t?"Disable Silent Typing":"Enable Silent Typing"},r=>n("div",{style:{display:"flex"}},n(C,{...r,onClick:o,size:"",look:eo.BLANK,innerClassName:St.button,style:{padding:"0 6px"}},n("div",{className:St.buttonWrapper},n("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},n("path",{fill:"currentColor",d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}),t&&n("path",{d:"M13 432L590 48",stroke:"var(--red-500)","stroke-width":"72","stroke-linecap":"round"}))))))}var Cn,_g,zw=g(()=>{"use strict";a();ao();$();ae();A();w();x();Cn=D({showIcon:{type:3,default:!1,description:"Show an icon for toggling the plugin",restartNeeded:!0},isEnabled:{type:3,description:"Toggle functionality",default:!0}});_g=y({name:"SilentTyping",authors:[m.Ven,m.Rini],description:"Hide that you are typing",patches:[{find:'.dispatch({type:"TYPING_START_LOCAL"',replacement:{match:/startTyping\(\i\){.+?},stop/,replace:"startTyping:$self.startTyping,stop"}},{find:"ChannelTextAreaButtons",predicate:()=>Cn.store.showIcon,replacement:{match:/(\i)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&,(()=>{try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}})()"}}],dependencies:["CommandsAPI"],settings:Cn,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)=>{Cn.store.isEnabled=!!lt(e,"value",!Cn.store.isEnabled),me(t.channel.id,{content:Cn.store.isEnabled?"Silent typing enabled!":"Silent typing disabled!"})}}],async startTyping(e){Cn.store.isEnabled||O.dispatch({type:"TYPING_START_LOCAL",channelId:e})},chatBarIcon:B.wrap(pR,{noop:!0})})});var jw,Og,Ww=g(()=>{"use strict";a();$();kt();A();w();x();jw=D({showDates:{type:3,description:"Show dates on friend requests",default:!1,restartNeeded:!0}}),Og=y({name:"SortFriendRequests",authors:[m.Megu],description:"Sorts friend requests by date of receipt",settings:jw,patches:[{find:"getRelationshipCounts(){",replacement:{match:/\.sortBy\(\i=>\i\.comparator\)/,replace:".sortBy((row) => $self.sortList(row))"}},{find:".Messages.FRIEND_REQUEST_CANCEL",replacement:{predicate:()=>jw.store.showDates,match:/subText:(\i)(?=,className:\i\.userInfo}\))(?<=user:(\i).+?)/,replace:(e,t,o)=>`subText:$self.makeSubtext(${t},${o})`}}],sortList(e){return e.type===3||e.type===4?-this.getSince(e.user):e.comparator},getSince(e){return new Date(st.getSince(e.id))},makeSubtext(e,t){let o=this.getSince(t);return n(ce,{flexDirection:"row",style:{gap:0,flexWrap:"wrap",lineHeight:"0.9rem"}},n("span",null,e),!isNaN(o.getTime())&&n("span",null,"Received \u2014 ",o.toDateString()))}})});var qw,Kw=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/spotifyControls/hoverOnly.css",{name:"src/plugins/spotifyControls/hoverOnly.css",source:`.vc-spotify-button-row {
height: 0;
opacity: 0;
pointer-events: none;
transition: 0.2s;
transition-property: height;
}
#vc-spotify-player:hover .vc-spotify-button-row {
opacity: 1;
height: 32px;
pointer-events: auto;
/* only transition opacity on show to prevent clipping */
transition-property: height, opacity;
}
`,classNames:{},dom:null});qw="src/plugins/spotifyControls/hoverOnly.css"});var Yw=g(()=>{});var Ke,Zw=g(()=>{"use strict";a();$();j();x();Ke=No(()=>{let{Store:e}=Jc,t=Ji("getActiveSocketAndDevice"),o=Ji("SpotifyAPI"),r="https://api.spotify.com/v1/me/player";class i extends e{mPosition=0;start=0;track=null;device=null;isPlaying=!1;repeat="off";shuffle=!1;volume=0;isSettingPosition=!1;openExternal(c){let u=E.plugins.SpotifyControls.useSpotifyUris||Vencord.Plugins.isPluginEnabled("OpenInApp")?"spotify:"+c.replaceAll("/",(p,d)=>d===0?"":":"):"https://open.spotify.com"+c;VencordNative.native.openExternal(u)}get position(){let c=this.mPosition;return this.isPlaying&&(c+=Date.now()-this.start),c}set position(c){this.mPosition=c,this.start=Date.now()}prev(){this.req("post","/previous")}next(){this.req("post","/next")}setVolume(c){this.req("put","/volume",{query:{volume_percent:Math.round(c)}}).then(()=>{this.volume=c,this.emitChange()})}setPlaying(c){this.req("put",c?"/play":"/pause")}setRepeat(c){this.req("put","/repeat",{query:{state:c}})}setShuffle(c){this.req("put","/shuffle",{query:{state:c}}).then(()=>{this.shuffle=c,this.emitChange()})}seek(c){return this.isSettingPosition?Promise.resolve():(this.isSettingPosition=!0,this.req("put","/seek",{query:{position_ms:Math.round(c)}}).catch(u=>{console.error("[VencordSpotifyControls] Failed to seek",u),this.isSettingPosition=!1}))}req(c,u,p={}){this.device?.is_active&&((p.query??={}).device_id=this.device.id);let{socket:d}=t.getActiveSocketAndDevice();return o.SpotifyAPI[c](d.accountId,d.accessToken,{url:r+u,...p})}}let s=new i(O,{SPOTIFY_PLAYER_STATE(l){s.track=l.track,s.device=l.device??null,s.isPlaying=l.isPlaying??!1,s.volume=l.volumePercent??0,s.repeat=l.actual_repeat||"off",s.position=l.position??0,s.isSettingPosition=!1,s.emitChange()},SPOTIFY_SET_DEVICES({devices:l}){s.device=l.find(c=>c.is_active)??l[0]??null,s.emitChange()}});return s})});function Bg(e){let t=e/1e3/60,o=Math.floor(t),r=Math.floor((t-o)*60);return`${o.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`}function zi(e,t){return()=>n("svg",{className:te(Qe("button-icon"),Qe(t)),height:"24",width:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":t,focusable:!1},n("path",{d:e}))}function ma(e){return n("button",{className:Qe("button"),...e},e.children)}function vR({name:e,path:t}){let o=`spotify-copy-${e}`,r=`spotify-open-${e}`;return n(G.Menu,{navId:`spotify-${e}-menu`,onClose:()=>O.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":`Spotify ${e} Menu`},n(G.MenuItem,{key:o,id:o,label:`Copy ${e} Link`,action:()=>vo("https://open.spotify.com"+t),icon:hi}),n(G.MenuItem,{key:r,id:r,label:`Open ${e} in Spotify`,action:()=>Ke.openExternal(t),icon:Ms}))}function SR(e,t){return o=>Ut.openContextMenu(o,()=>n(vR,{name:e,path:t}))}function bR(){let[e,t,o]=Ye([Ke],()=>[Ke.isPlaying,Ke.shuffle,Ke.repeat]),[r,i]=(()=>{switch(o){case"off":return["context","repeat-off"];case"context":return["track","repeat-context"];case"track":return["off","repeat-track"];default:throw new Error(`Invalid repeat state ${o}`)}})();return n(ce,{className:Qe("button-row"),style:{gap:0}},n(ma,{className:te(Qe("button"),Qe(t?"shuffle-on":"shuffle-off")),onClick:()=>Ke.setShuffle(!t)},n(yR,null)),n(ma,{onClick:()=>Ke.prev()},n(fR,null)),n(ma,{onClick:()=>Ke.setPlaying(!e)},e?n(mR,null):n(dR,null)),n(ma,{onClick:()=>Ke.next()},n(gR,null)),n(ma,{className:te(Qe("button"),Qe(i)),onClick:()=>Ke.setRepeat(r),style:{position:"relative"}},o==="track"&&n("span",{className:Qe("repeat-1")},"1"),n(hR,null)))}function xR(){let{duration:e}=Ke.track,[t,o,r]=Ye([Ke],()=>[Ke.mPosition,Ke.isSettingPosition,Ke.isPlaying]),[i,s]=Y(t);return pe(()=>{if(r&&!o){s(Ke.position);let l=setInterval(()=>{s(c=>c+1e3)},1e3);return()=>clearInterval(l)}},[t,o,r]),n("div",{id:Qe("progress-bar")},n(S.FormText,{variant:"text-xs/medium",className:Qe("progress-time")+" "+Qe("time-left"),"aria-label":"Progress"},Bg(i)),n(G.MenuSliderControl,{minValue:0,maxValue:e,value:i,onChange:l=>{o||(s(l),TR(l))},renderValue:Bg}),n(S.FormText,{variant:"text-xs/medium",className:Qe("progress-time")+" "+Qe("time-right"),"aria-label":"Total Duration"},Bg(e)))}function wR({track:e}){let t=Ye([Ke],()=>Ke.volume);return n(G.Menu,{navId:"spotify-album-menu",onClose:()=>O.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Spotify Album Menu"},n(G.MenuItem,{key:"open-album",id:"open-album",label:"Open Album",action:()=>Ke.openExternal(`/album/${e.album.id}`),icon:Ms}),n(G.MenuItem,{key:"view-cover",id:"view-cover",label:"View Album Cover",action:()=>Go(e.album.image.url),icon:Er}),n(G.MenuControlItem,{id:"spotify-volume",key:"spotify-volume",label:"Volume",control:(o,r)=>n(G.MenuSliderControl,{...o,ref:r,value:t,minValue:0,maxValue:100,onChange:ro(i=>Ke.setVolume(i))})}))}function Fg(e,t,o){return t?{role:"link",onClick:()=>Ke.openExternal(o),onContextMenu:SR(e,o)}:{}}function MR({track:e}){let t=e?.album?.image,[o,r]=Y(!1),i=n(f,null,t&&n("img",{id:Qe("album-image"),src:t.url,alt:"Album Image",onClick:()=>r(!o),onContextMenu:s=>{Ut.openContextMenu(s,()=>n(wR,{track:e}))}}));return o&&t?n("div",{id:Qe("album-expanded-wrapper")},i):n("div",{id:Qe("info-wrapper")},i,n("div",{id:Qe("titles")},n(S.FormText,{variant:"text-sm/semibold",id:Qe("song-title"),className:Qe("ellipoverflow"),title:e.name,...Fg("Song",e.id,`/track/${e.id}`)},e.name),e.artists.some(s=>s.name)&&n(S.FormText,{variant:"text-sm/normal",className:Qe("ellipoverflow")},"by\xA0",e.artists.map((s,l)=>n(_.Fragment,{key:s.name},n("span",{className:Qe("artist"),style:{fontSize:"inherit"},title:s.name,...Fg("Artist",s.id,`/artist/${s.id}`)},s.name),l!==e.artists.length-1&&n("span",{className:Qe("comma")},", ")))),e.album.name&&n(S.FormText,{variant:"text-sm/normal",className:Qe("ellipoverflow")},"on\xA0",n("span",{id:Qe("album-title"),className:Qe("album"),style:{fontSize:"inherit"},title:e.album.name,...Fg("Album",e.album.id,`/album/${e.album.id}`)},e.album.name))))}function Xw(){let e=Ye([Ke],()=>Ke.track,null,(s,l)=>s?.id?s.id===l?.id:s?.name===l?.name),t=Ye([Ke],()=>Ke.device,null,(s,l)=>s?.id===l?.id),o=Ye([Ke],()=>Ke.isPlaying),[r,i]=Y(!1);return _.useEffect(()=>{if(i(!1),!o){let s=setTimeout(()=>i(!0),3e5);return()=>clearTimeout(s)}},[o]),!e||!t?.is_active||r?null:n(B,{fallback:()=>n("div",{className:"vc-spotify-fallback"},n("p",null,"Failed to render Spotify Modal :("),n("p",null,"Check the console for errors"))},n("div",{id:Qe("player")},n(MR,{track:e}),n(xR,null),n(bR,null)))}var Qe,dR,mR,fR,gR,hR,yR,TR,Jw=g(()=>{"use strict";a();Yw();ae();kt();Lt();Nr();ct();Pe();x();Zw();Qe=e=>`vc-spotify-${e}`;dR=zi("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"),mR=zi("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"),fR=zi("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"),gR=zi("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"),hR=zi("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"),yR=zi("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");TR=ro(e=>{Ke.seek(e)})});function Qw(e){(e?xt:jt)(qw)}var Ug,Vw=g(()=>{"use strict";a();$();rt();A();w();Kw();Jw();Ug=y({name:"SpotifyControls",description:"Adds a Spotify player above the account panel",authors:[m.Ven,m.afn,m.KraXen72],options:{hoverControls:{description:"Show controls on hover",type:3,default:!1,onChange:e=>Qw(e)},useSpotifyUris:{type:3,description:"Open Spotify URIs instead of Spotify URLs. Will only work if you have Spotify installed and might not work on all platforms",default:!1}},patches:[{find:"showTaglessAccountPanel:",replacement:{match:/return ?(.{0,30}\(.{1,3},\{[^}]+?,showTaglessAccountPanel:.+?\}\))/,replace:"return [$self.renderPlayer(),$1]"}},{find:".PLAYER_DEVICES",replacement:[{match:/get:(\i)\.bind\(null,(\i\.\i)\.get\)/,replace:"post:$1.bind(null,$2.post),$&"},{match:/202===\i\.status/,replace:"false"}]},{find:'repeat:"off"!==',replacement:{match:/repeat:"off"!==(.{1,3}),/,replace:"actual_repeat:$1,$&"}}],start:()=>Qw(E.plugins.SpotifyControls.hoverControls),renderPlayer:()=>n(Xw,null)})});var $g,Gg,e2=g(()=>{"use strict";a();$();A();w();$g=D({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}}),Gg=y({name:"SpotifyCrack",description:"Free listen along, no auto-pausing in voice chat, and allows activity to continue playing when idling",authors:[m.Cyn,m.Nuckyz],settings:$g,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:()=>$g.store.noSpotifyAutoPause,match:/(?<=function \i\(\){)(?=.{0,200}SPOTIFY_AUTO_PAUSED\))/,replace:"return;"},{predicate:()=>$g.store.keepSpotifyActivityOnIdle,match:/(?<=shouldShowActivity\(\){.{0,50})&&!\i\.\i\.isIdle\(\)/,replace:""}]}]})});function zg(e,t){t={invalidEmojis:[],tts:!1,validNonShortcutEmojis:[],...t};let o=PR.getPendingReply(e);no.sendMessage(e,t,void 0,no.getSendMessageOptionsForReply(o)).then(()=>{o&&O.dispatch({type:"DELETE_PENDING_REPLY",channelId:e})})}var Hg,PR,jg,t2=g(()=>{"use strict";a();ao();A();w();j();x();Hg=P("getPlayerState"),PR=P("getPendingReply");jg=y({name:"SpotifyShareCommands",description:"Share your current Spotify track, album or artist via slash command (/track, /album, /artist)",authors:[m.katlyn],dependencies:["CommandsAPI"],commands:[{name:"track",description:"Send your current Spotify track to chat",inputType:0,options:[],execute:(e,t)=>{let o=Hg.getTrack();if(o===null){me(t.channel.id,{content:"You're not listening to any music."});return}zg(t.channel.id,{content:`https://open.spotify.com/track/${o.id}`})}},{name:"album",description:"Send your current Spotify album to chat",inputType:0,options:[],execute:(e,t)=>{let o=Hg.getTrack();if(o===null){me(t.channel.id,{content:"You're not listening to any music."});return}zg(t.channel.id,{content:`https://open.spotify.com/album/${o.album.id}`})}},{name:"artist",description:"Send your current Spotify artist to chat",inputType:0,options:[],execute:(e,t)=>{let o=Hg.getTrack();if(o===null){me(t.channel.id,{content:"You're not listening to any music."});return}zg(t.channel.id,{content:o.artists[0].external_urls.spotify})}}]})});var o2={};ze(o2,{default:()=>kR});function IR({emoji:e,prefix:t,log:o,delta:r,instance:i}){return n(_.Fragment,null,n("span",null,i.sinceStart.toFixed(3),"s"),n("span",null,i.sinceLast.toFixed(3),"s"),n("span",null,r?.toFixed(0)??""),n("span",null,n("pre",null,e," ",t??" ",o)))}function AR({title:e,logs:t,traceEnd:o}){let r=t.find(l=>l.timestamp)?.timestamp??0,i=r,s=t.map(l=>{let c=l.timestamp??i,u=(c-r)/1e3,p=(c-i)/1e3;return i=c,{sinceStart:u,sinceLast:p}});return n(S.FormSection,{title:e,tag:"h1"},n("code",null,o&&n("div",{style:{color:"var(--header-primary)",marginBottom:5,userSelect:"text"}},"Trace ended at: ",new Date(o).toTimeString()),n("div",{style:{color:"var(--header-primary)",display:"grid",gridTemplateColumns:"repeat(3, auto) 1fr",gap:"2px 10px",userSelect:"text"}},n("span",null,"Start"),n("span",null,"Interval"),n("span",null,"Delta"),n("span",{style:{marginBottom:5}},"Event"),fa.logs.map((l,c)=>n(IR,{key:c,...l,instance:s[c]})))))}function NR({trace:e}){let t=e.split(`
`);return n(S.FormSection,{title:"Server Trace",tag:"h2"},n("code",null,n(ce,{flexDirection:"column",style:{color:"var(--header-primary)",gap:5,userSelect:"text"}},t.map(o=>n("span",null,o)))))}function CR(){if(!fa?.logs)return n("div",null,"Loading...");let e=fa.logGroups.find(t=>t.serverTrace)?.serverTrace;return n(_.Fragment,null,n(AR,{title:"Startup Timings",logs:fa.logs,traceEnd:fa.endTime_}),n("div",{style:{marginTop:5}},"\xA0"),e&&n(NR,{trace:e}))}var fa,kR,n2=g(()=>{"use strict";a();ae();kt();j();x();fa=P("markWithDelta","markAndLog","markAt");kR=B.wrap(CR)});var Wg,r2=g(()=>{"use strict";a();A();ut();w();Wg=y({name:"StartupTimings",description:"Adds Startup Timings to the Settings menu",authors:[m.Megu],patches:[{find:"UserSettingsSections.PAYMENT_FLOW_MODAL_TEST_PAGE,",replacement:{match:/{section:\i\.UserSettingsSections\.PAYMENT_FLOW_MODAL_TEST_PAGE/,replace:'{section:"StartupTimings",label:"Startup Timings",element:$self.StartupTimingPage},$&'}}],StartupTimingPage:It(()=>(n2(),En(o2)).default)})});var qg,Kg,i2=g(()=>{"use strict";a();$();A();w();qg=D({superReactByDefault:{type:3,description:"Reaction picker will default to Super Reactions",default:!0},unlimitedSuperReactionPlaying:{type:3,description:"Remove the limit on Super Reactions playing at once",default:!1},superReactionPlayingLimit:{description:"Max Super Reactions to play at once",type:5,default:20,markers:[5,10,20,40,60,80,100],stickToMarkers:!0}},{superReactionPlayingLimit:{disabled(){return this.store.unlimitedSuperReactionPlaying}}}),Kg=y({name:"SuperReactionTweaks",description:"Customize the limit of Super Reactions playing at once, and super react by default",authors:[m.FieryFlames,m.ant0n],patches:[{find:",BURST_REACTION_EFFECT_PLAY",replacement:{match:/(?<=BURST_REACTION_EFFECT_PLAY:\i=>{.{50,100})(\i\(\i,\i\))>=\d+/,replace:"!$self.shouldPlayBurstReaction($1)"}},{find:".trackEmojiSearchEmpty,200",replacement:{match:/(\.trackEmojiSearchEmpty,200(?=.+?isBurstReaction:(\i).+?(\i===\i\.EmojiIntention.REACTION)).+?\[\2,\i\]=\i\.useState\().+?\)/,replace:(e,t,o,r)=>`${t}$self.settings.store.superReactByDefault&&${r})`}}],settings:qg,shouldPlayBurstReaction(e){return!!(qg.store.unlimitedSuperReactionPlaying||e<=qg.store.superReactionPlayingLimit)}})});function u2(e){let t=e.match(/^(\/)?(.+?)(?:\/([gimsuy]*))?$/);return t?new RegExp(t[2],t[3]?.split("").filter((o,r,i)=>i.indexOf(o)===r).join("")??"g"):new RegExp(e)}function DR(e){try{return u2(e),null}catch(t){return n("span",{style:{color:"var(--text-danger)"}},String(t))}}function Yg({initialValue:e,onChange:t,placeholder:o}){let[r,i]=Y(e);return n(ot,{placeholder:o,value:r,onChange:i,spellCheck:!1,onBlur:()=>r!==e&&t(r)})}function s2({title:e,rulesArray:t,rulesKey:o,update:r}){let i=e==="Using Regex";async function s(c){c!==t.length-1&&(t.splice(c,1),await wt.set(o,t),r())}async function l(c,u,p){u===t.length-1&&t.push(c2()),t[u][p]=c,t[u].find===""&&t[u].replace===""&&t[u].onlyIfIncludes===""&&u!==t.length-1&&t.splice(u,1),await wt.set(o,t),r()}return n(f,null,n(S.FormTitle,{tag:"h4"},e),n(ce,{flexDirection:"column",style:{gap:"0.5em"}},t.map((c,u)=>n(_.Fragment,{key:`${c.find}-${u}`},n(ce,{flexDirection:"row",style:{gap:0}},n(ce,{flexDirection:"row",style:{flexGrow:1,gap:"0.5em"}},n(Yg,{placeholder:"Find",initialValue:c.find,onChange:p=>l(p,u,"find")}),n(Yg,{placeholder:"Replace",initialValue:c.replace,onChange:p=>l(p,u,"replace")}),n(Yg,{placeholder:"Only if includes",initialValue:c.onlyIfIncludes,onChange:p=>l(p,u,"onlyIfIncludes")})),n(C,{size:C.Sizes.MIN,onClick:()=>s(u),style:{background:"none",color:"var(--status-danger)",...u===t.length-1?{visibility:"hidden",pointerEvents:"none"}:{}}},n(ll,null))),i&&DR(c.find)))))}function LR(){let[e,t]=Y("");return n(f,null,n(S.FormTitle,{tag:"h4"},"Test Rules"),n(ot,{placeholder:"Type a message",onChange:t}),n(ot,{placeholder:"Message with rules applied",editable:!1,value:p2(e)}))}function p2(e){if(e.length===0)return e;if(Ic)for(let t of Ic)!t.find||t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)||(e=` ${e} `.replaceAll(t.find,t.replace.replaceAll("\\n",`
`)).replace(/^\s|\s$/g,""));if(Ac){for(let t of Ac)if(!!t.find&&!(t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)))try{let o=u2(t.find);e=e.replace(o,t.replace.replaceAll("\\n",`
`))}catch{new ie("TextReplace").error(`Invalid regex: ${t.find}`)}}return e=e.trim(),e}var a2,l2,c2,Pc,Ic,Ac,RR,ER,Zg,d2=g(()=>{"use strict";a();Ti();on();$();kt();Lt();A();Ve();ut();w();x();a2="TextReplace_rulesString",l2="TextReplace_rulesRegex",c2=()=>({find:"",replace:"",onlyIfIncludes:""}),Pc=()=>[c2()],Ic=Pc(),Ac=Pc(),RR=D({replace:{type:6,description:"",component:()=>{let e=Un();return n(f,null,n(s2,{title:"Using String",rulesArray:Ic,rulesKey:a2,update:e}),n(s2,{title:"Using Regex",rulesArray:Ac,rulesKey:l2,update:e}),n(LR,null))}}});ER="1102784112584040479",Zg=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:[m.AutumnVN,m.TheKodeToad],dependencies:["MessageEventsAPI"],settings:RR,async start(){Ic=await wt.get(a2)??Pc(),Ac=await wt.get(l2)??Pc(),this.preSend=Kt((e,t)=>{e!==ER&&(t.content=p2(t.content))})},stop(){Yt(this.preSend)}})});var Xg,m2=g(()=>{"use strict";a();A();w();x();Xg=y({name:"ThemeAttributes",description:"Adds data attributes to various elements for theming purposes",authors:[m.Ven],patches:[{find:".tabBarRef",replacement:{match:/style:this\.getStyle\(\),role:"tab"/,replace:"$&,'data-tab-id':this.props.id"}},{find:".messageListItem",replacement:{match:/\.messageListItem(?=,"aria)/,replace:"$&,...$self.getMessageProps(arguments[0])"}}],getMessageProps(e){let t=e.message?.author?.id;return{"data-author-id":t,"data-is-self":t&&t===U.getCurrentUser()?.id}}})});var Jg,f2=g(()=>{"use strict";a();A();w();Jg=y({name:"TimeBarAllActivities",description:"Adds the Spotify time bar to all activities if they have start and end timestamps",authors:[m.obscurity],patches:[{find:"}renderTimeBar(",replacement:{match:/renderTimeBar\((.{1,3})\){.{0,50}?let/,replace:"renderTimeBar($1){let"}}]})});var g2=g(()=>{});var Ht,ga=g(()=>{"use strict";a();$();w();Ht=D({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 Nc,Qg=g(()=>{"use strict";a();Nc={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 ha(e,t){let o=Ht.store[e+"Input"],r=Ht.store[e+"Output"],i="https://translate.googleapis.com/translate_a/single?"+new URLSearchParams({client:"gtx",sl:o,tl:r,dt:"t",dj:"1",source:"input",q:t}),s=await fetch(i);if(!s.ok)throw new Error(`Failed to translate "${t}" (${o} -> ${r})
${s.status} ${s.statusText}`);let{src:l,sentences:c}=await s.json();return{src:l,text:c.map(u=>u?.trans).filter(Boolean).join("")}}var kn,ya=g(()=>{"use strict";a();rt();ga();kn=Fe("vc-trans-")});function OR({settingsKey:e,includeAuto:t}){let o=Ht.use([e])[e],r=bt(()=>{let i=Object.entries(Nc).map(([s,l])=>({value:s,label:l}));return t||i.shift(),i},[]);return n("section",{className:z.bottom16},n(S.FormTitle,{tag:"h3"},Ht.def[e].description),n(Da,{options:r,value:r.find(i=>i.value===o),placeholder:"Select a language",maxVisibleItems:5,closeOnSelect:!0,onChange:i=>Ht.store[e]=i}))}function BR(){let e=Ht.use(["autoTranslate"]).autoTranslate;return n(gt,{value:e,onChange:t=>Ht.store.autoTranslate=t,note:Ht.def.autoTranslate.description,hideBorder:!0},"Auto Translate")}function h2({rootProps:e}){return n(Ne,{...e},n(Xe,{className:kn("modal-header")},n(S.FormTitle,{tag:"h2"},"Translate"),n(Tt,{onClick:e.onClose})),n(We,{className:kn("modal-content")},_R.map(t=>n(OR,{key:t,settingsKey:t,includeAuto:t.endsWith("Input")})),n(S.FormDivider,{className:z.bottom16}),n(BR,null)))}var _R,y2=g(()=>{"use strict";a();it();nt();x();Qg();ga();ya();_R=["receivedInput","receivedOutput","sentInput","sentOutput"]});function ji({height:e=24,width:t=24,className:o}){return n("svg",{viewBox:"0 96 960 960",height:e,width:t,className:te(kn("icon"),o)},n("path",{fill:"currentColor",d:"m475 976 181-480h82l186 480h-87l-41-126H604l-47 126h-82Zm151-196h142l-70-194h-2l-70 194Zm-466 76-55-55 204-204q-38-44-67.5-88.5T190 416h87q17 33 37.5 62.5T361 539q45-47 75-97.5T487 336H40v-80h280v-80h80v80h280v80H567q-22 69-58.5 135.5T419 598l98 99-30 81-127-122-200 200Z"}))}function v2({slateProps:e}){let{autoTranslate:t}=Ht.use(["autoTranslate"]);if(e.type.analyticsName!=="normal")return null;let o=()=>Ht.store.autoTranslate=!t;return n(ee,{text:"Open Translate Modal"},({onMouseEnter:r,onMouseLeave:i})=>n("div",{style:{display:"flex"}},n(C,{"aria-haspopup":"dialog","aria-label":"Open Translate Modal",size:"",look:eo.BLANK,onMouseEnter:r,onMouseLeave:i,innerClassName:St.button,onClick:s=>{if(s.shiftKey)return o();we(l=>n(h2,{rootProps:l}))},onContextMenu:()=>o(),style:{padding:"0 4px"}},n("div",{className:St.buttonWrapper},n(ji,{className:kn({"auto-translate":t})})))))}var Vg=g(()=>{"use strict";a();Pe();nt();x();ga();y2();ya()});function th(e,t){eh.get(e)(t)}function FR({onDismiss:e}){return n("button",{onClick:e,className:kn("dismiss")},"Dismiss")}function S2({message:e}){let[t,o]=Y();return pe(()=>{if(!e.vencordEmbeddedBy)return eh.set(e.id,o),()=>void eh.delete(e.id)},[]),t?n("span",{className:kn("accessory")},n(ji,{width:16,height:16}),Be.parse(t.text)," ","(translated from ",Nc[t.src]??t.src," - ",n(FR,{onDismiss:()=>o(void 0)}),")"):null}var eh,b2=g(()=>{"use strict";a();x();Qg();Vg();ya();eh=new Map});var T2,oh,x2=g(()=>{"use strict";a();g2();Rt();Hl();on();jr();ae();A();w();x();ga();Vg();b2();ya();T2=(e,{message:t})=>()=>{if(!t.content)return;let o=dt("copy-text",e);!o||o.splice(o.findIndex(r=>r?.props?.id==="copy-text")+1,0,n(G.MenuItem,{id:"vc-trans",label:"Translate",icon:ji,action:async()=>{let r=await ha("received",t.content);th(t.id,r)}}))},oh=y({name:"Translate",description:"Translate messages with Google Translate",authors:[m.Ven],dependencies:["MessageAccessoriesAPI","MessagePopoverAPI","MessageEventsAPI"],settings:Ht,translate:ha,patches:[{find:"ChannelTextAreaButtons",replacement:{match:/(\i)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&,(()=>{try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}})()"}}],start(){Zs("vc-translation",e=>n(S2,{message:e.message})),ue("message",T2),zo("vc-translate",e=>e.content?{label:"Translate",icon:ji,message:e,channel:Q.getChannel(e.channel_id),onClick:async()=>{let t=await ha("received",e.content);th(e.id,t)}}:null),this.preSend=Kt(async(e,t)=>{!Ht.store.autoTranslate||!t.content||(t.content=(await ha("sent",t.content)).text)})},stop(){Yt(this.preSend),fe("message",T2),jo("vc-translate"),Sm("vc-translation")},chatBarIcon:e=>n(B,{noop:!0},n(v2,{slateProps:e}))})});function nh({a:e,b:t,count:o}){return[n("strong",{key:"0"},e),", ",n("strong",{key:"1"},t),`, and ${o} others are typing...`]}var Cc,UR,rh,ih=g(()=>{"use strict";a();$();ae();A();ct();w();x();Cc=D({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"}});UR=B.wrap(function({user:e,guildId:t}){return n("strong",{role:"button",onClick:()=>{Ho(e.id)},style:{display:"grid",gridAutoFlow:"column",gap:"4px",color:Cc.store.showRoleColors?Oe.getMember(t,e.id)?.colorString:void 0,cursor:"pointer"}},Cc.store.showAvatars&&n("div",{style:{marginTop:"4px"}},n(ti,{size:"SIZE_16",src:e.getAvatarURL(t,128)})),Oe.getNick(t,e.id)||!t&&st.getNickname(e.id)||e.globalName||e.username)},{noop:!0}),rh=y({name:"TypingTweaks",description:"Show avatars and role colours in the typing indicator",authors:[m.zt],patches:[{find:"getCooldownTextStyle",replacement:{match:/(?<=children:\[(\i)\.length>0.{0,200}?"aria-atomic":!0,children:)\i/,replace:"$self.mutateChildren(this.props, $1, $&), style: $self.TYPING_TEXT_STYLE"}},{find:"getCooldownTextStyle",replacement:{match:/(?<=map\(\i=>)\i\.\i\.getName\(\i,this\.props\.channel\.id,(\i)\)/,replace:"$1"}},{find:"getCooldownTextStyle",replacement:{match:/(?<=(\i)\.length\?\i.\i\.Messages.THREE_USERS_TYPING\.format\({\i:(\i),(?:\i:)?(\i),\i:\i}\):)\i\.\i\.Messages\.SEVERAL_USERS_TYPING/,replace:(e,t,o,r)=>`$self.buildSeveralUsers({ a: ${o}, b: ${r}, count: ${t}.length - 2 })`},predicate:()=>Cc.store.alternativeFormatting}],settings:Cc,TYPING_TEXT_STYLE:{display:"grid",gridAutoFlow:"column",gridGap:"0.25em"},buildSeveralUsers:nh,mutateChildren(e,t,o){if(!Array.isArray(o))return o;let r=0;return o.map(i=>i.type==="strong"?n(UR,{...e,user:t[r++]}):i)}})});function dr(e,t){let o=U.getUser(t);return Oe.getNick(e,t)??o.globalName??o.username}function HR({channelId:e}){let t=Ye([w2],()=>({...w2.getTypingUsers(e)}),null,(c,u)=>{let p=Object.keys(c),d=Object.keys(u);return p.length===d.length&&d.every(h=>c[h]!=null)}),o=Ye([be],()=>be.getChannelId()),r=Q.getChannel(e).guild_id;if(!kc.store.includeMutedChannels&&GR.isChannelMuted(r,e)||!kc.store.includeCurrentChannel&&o===e)return null;let i=U.getCurrentUser()?.id,s=Object.keys(t).filter(c=>c!==i&&!(st.isBlocked(c)&&!kc.store.includeBlockedUsers)),l;switch(s.length){case 0:break;case 1:{l=et.Messages.ONE_USER_TYPING.format({a:dr(r,s[0])});break}case 2:{l=et.Messages.TWO_USERS_TYPING.format({a:dr(r,s[0]),b:dr(r,s[1])});break}case 3:{l=et.Messages.THREE_USERS_TYPING.format({a:dr(r,s[0]),b:dr(r,s[1]),c:dr(r,s[2])});break}default:{l=E.plugins.TypingTweaks.enabled?nh({a:dr(r,s[0]),b:dr(r,s[1]),count:s.length-2}):et.Messages.SEVERAL_USERS_TYPING;break}}return s.length>0?n(ee,{text:l},c=>n("div",{...c,style:{marginLeft:6,height:16,display:"flex",alignItems:"center",zIndex:0,cursor:"pointer"}},n($R,{dotRadius:3,themed:!0}))):null}var $R,w2,GR,kc,sh,M2=g(()=>{"use strict";a();$();ae();A();w();j();x();ih();$R=pn("Dots","AnimatedDots"),w2=Re("TypingStore"),GR=Re("UserGuildSettingsStore");kc=D({includeCurrentChannel:{type:3,description:"Whether to show the typing indicator for the currently selected channel",default:!0},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}}),sh=y({name:"TypingIndicator",description:"Adds an indicator if someone is typing on a channel.",authors:[m.Nuckyz,m.obscurity],settings:kc,patches:[{find:"UNREAD_IMPORTANT:",replacement:{match:/channel:(\i).{0,100}?channelEmoji,.{0,250}?\.children.{0,50}?:null/,replace:"$&,$self.TypingIndicator($1.id)"}},{find:"M11 9H4C2.89543 9 2 8.10457 2 7V1C2 0.447715 1.55228 0 1 0C0.447715 0 0 0.447715 0 1V7C0 9.20914 1.79086 11 4 11H11C11.5523 11 12 10.5523 12 10C12 9.44771 11.5523 9 11 9Z",replacement:{match:/mentionsCount:\i.+?null(?<=channel:(\i).+?)/,replace:"$&,$self.TypingIndicator($1.id)"}}],TypingIndicator:e=>n(B,{noop:!0},n(HR,{channelId:e}))})});var ah,P2=g(()=>{"use strict";a();on();A();w();ah=y({name:"Unindent",description:"Trims leading indentation from codeblocks",authors:[m.Ven],dependencies:["MessageEventsAPI"],patches:[{find:"inQuote:",replacement:{match:/,content:([^,]+),inQuote/,replace:(e,t)=>`,content:Vencord.Plugins.plugins.Unindent.unindent(${t}),inQuote`}}],unindent(e){e=e.replace(/\t/g," ");let t=e.match(/^ *(?=\S)/gm)?.reduce((o,r)=>Math.min(o,r.length),1/0)??0;return t?e.replace(new RegExp(`^ {${t}}`,"gm"),""):e},unindentMsg(e){e.content=e.content.replace(/```(.|\n)*?```/g,t=>{let o=t.split(`
`);if(o.length<2)return t;let r="";return o[o.length-1]==="```"&&(r=o.pop()),`${o[0]}
${this.unindent(o.slice(1).join(`
`))}
${r}`})},start(){this.preSend=Kt((e,t)=>this.unindentMsg(t)),this.preEdit=Br((e,t,o)=>this.unindentMsg(o))},stop(){Yt(this.preSend),Fr(this.preEdit)}})});var lh,I2,ch,A2=g(()=>{"use strict";a();Rt();Lt();A();w();x();lh=1<<2,I2=(e,{channel:t,message:{author:o,embeds:r,flags:i,id:s}})=>()=>{let l=(i&lh)!==0;if(!l&&!r.length)return;let c=t.isPrivate()||!!(_e.getChannelPermissions({id:t.id})&xe.EMBED_LINKS);if(o.id===U.getCurrentUser().id&&!c)return;let u=dt("delete",e),p=u?.findIndex(d=>d?.props?.id==="delete");!p||!u||u.splice(p-1,0,n(G.MenuItem,{id:"unsuppress-embeds",key:"unsuppress-embeds",label:l?"Unsuppress Embeds":"Suppress Embeds",color:l?void 0:"danger",icon:l?sl:al,action:()=>Nt.patch({url:`/channels/${t.id}/messages/${s}`,body:{flags:l?i&~lh:i|lh}})}))},ch=y({name:"UnsuppressEmbeds",authors:[m.rad,m.HypedDomi],description:"Allows you to unsuppress embeds in messages",start(){ue("message",I2)},stop(){fe("message",I2)}})});var N2,uh,C2=g(()=>{"use strict";a();ao();cl();$();A();w();N2=D({resultsAmount:{type:1,description:"The amount of results you want to get (more gives better results, but is slower)",default:10}}),uh=y({name:"UrbanDictionary",description:"Search for a word on Urban Dictionary via /urban slash command",authors:[m.jewdev],dependencies:["CommandsAPI"],settings:N2,commands:[{name:"urban",description:"Returns the definition of a word from Urban Dictionary",inputType:0,options:[{type:3,name:"word",description:"The word to search for on Urban Dictionary",required:!0}],execute:async(e,t)=>{try{let o=encodeURIComponent(e[0].value),{list:r}=await fetch(`https://api.urbandictionary.com/v0/define?term=${o}&per_page=${N2.store.resultsAmount}`).then(l=>l.json());if(!r.length)return void me(t.channel.id,{content:"No results found."});let i=r.reduce((l,c)=>l.thumbs_up>c.thumbs_up?l:c),s=l=>l.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 me(t.channel.id,{embeds:[{type:"rich",author:{name:`Uploaded by "${i.author}"`,url:`https://www.urbandictionary.com/author.php?author=${encodeURIComponent(i.author)}`},title:i.word,url:`https://www.urbandictionary.com/define.php?term=${encodeURIComponent(i.word)}`,description:s(i.definition),fields:[{name:"Example",value:s(i.example)},{name:"Want more definitions?",value:`Check out [more definitions](https://www.urbandictionary.com/define.php?term=${o} "Define "${e[0].value}" on Urban Dictionary") on Urban Dictionary.`}],color:16750848,footer:{text:`\u{1F44D} ${i.thumbs_up.toString()} | \u{1F44E} ${i.thumbs_down.toString()}`,icon_url:"https://www.urbandictionary.com/favicon.ico"},timestamp:new Date(i.written_on).toISOString()}]})}catch(o){me(t.channel.id,{content:`Something went wrong: \`${o}\``})}}}]})});var k2=g(()=>{});var zR,jR,WR,R2,D2=g(()=>{"use strict";a();k2();j();x();zR=P("selectChannel","selectVoiceChannel"),jR=un(".lastSection","children:"),WR=1n<<20n,R2=({channel:e,label:t,showHeader:o})=>n(jR,null,o&&n(S.FormTitle,{className:"vc-uvs-header"},"In a voice channel"),n(C,{className:"vc-uvs-button",color:C.Colors.TRANSPARENT,size:C.Sizes.SMALL,onClick:()=>{_e.can(WR,e)?zR.selectVoiceChannel(e.id):oe.show({message:"Insufficient permissions to enter the channel.",id:"user-voice-show-insufficient-permissions",type:oe.Type.FAILURE,options:{position:oe.Position.BOTTOM}})}},t))});var qR,ph,L2,dh,E2=g(()=>{"use strict";a();$();ae();A();w();j();x();D2();qR=Re("VoiceStateStore"),ph=D({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}}),L2=B.wrap(({user:e})=>{let{channelId:t}=qR.getVoiceStateForUser(e.id)??{};if(!t)return null;let o=Q.getChannel(t);if(!o)return null;let r=de.getGuild(o.guild_id);if(!r)return null;let i=`${r.name} | ${o.name}`;return n(R2,{channel:o,label:i,showHeader:ph.store.showVoiceChannelSectionHeader})}),dh=y({name:"UserVoiceShow",description:"Shows whether a User is currently in a voice channel somewhere in their profile",authors:[m.LordElias],settings:ph,patchModal({user:e}){return ph.store.showInUserProfileModal?n("div",{className:"vc-uvs-modal-margin"},n(L2,{user:e})):null},patchPopout:({user:e})=>{let t=e.id===U.getCurrentUser().id;return n("div",{className:t?"vc-uvs-popout-margin-self":""},n(L2,{user:e}))},patches:[{find:".lastEditedByContainer",replacement:{match:/\(0,\i\.jsx\)\(\i\.\i,{user:\i,setNote/,replace:"$self.patchPopout(arguments[0]),$&"}},{find:".USER_PROFILE_MODAL",replacement:{match:/\.body.+?displayProfile:\i}\),/,replace:"$&$self.patchModal(arguments[0]),"}}]})});var _2,O2=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/usrbg/index.css",{name:"src/plugins/usrbg/index.css",source:`:is([class*="userProfile"], [class*="userPopout"]) [class*="bannerPremium"] {
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});_2="src/plugins/usrbg/index.css"});var KR,Rn,Rc,mh,B2=g(()=>{"use strict";a();$();rt();xo();A();w();O2();KR="https://raw.githubusercontent.com/AutumnVN/usrbg/main/usrbg.json",Rn={},Rc=D({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}}),mh=y({name:"USRBG",description:"Displays user banners from USRBG, allowing anyone to get a banner without Nitro",authors:[m.AutumnVN,m.pylix,m.TheKodeToad],settings:Rc,patches:[{find:".NITRO_BANNER,",replacement:[{match:/(\i)\.premiumType/,replace:"$self.premiumHook($1)||$&"},{match:/(?<=function \i\((\i)\)\{)(?=var.{30,50},bannerSrc:)/,replace:"$1.bannerSrc=$self.useBannerHook($1);"},{match:/\?\(0,\i\.jsx\)\(\i,{type:\i,shown/,replace:"&&$self.shouldShowBadge(arguments[0])$&"}]},{find:'"data-selenium-video-tile":',predicate:()=>Rc.store.voiceBackground,replacement:[{match:/(?<=function\((\i),\i\)\{)(?=let.{20,40},style:)/,replace:"$1.style=$self.voiceBackgroundHook($1);"}]}],data:Rn,settingsAboutComponent:()=>n(qe,{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_")&&Rn[t])return{backgroundImage:`url(${Rn[t]})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}},useBannerHook({displayProfile:e,user:t}){if(!(e?.banner&&Rc.store.nitroFirst)&&Rn[t.id])return Rn[t.id]},premiumHook({userId:e}){if(Rn[e])return 2},shouldShowBadge({displayProfile:e,user:t}){return e?.banner&&(!Rn[t.id]||Rc.store.nitroFirst)},async start(){xt(_2);let e=await fetch(KR);e.ok&&(Rn=await e.json(),this.data=Rn)}})});function YR({data:e,UserMention:t,RoleMention:o,parse:r,props:i}){let[s,l]=Y(e.userId);if(s)return n(t,{className:"mention",userId:s,channelId:e.channelId,inlinePreview:i.noStyleAndInteraction,key:i.key});let c=r(e.content,i);return n(o,{...e,inlinePreview:i.formatInline},n("span",{onMouseEnter:()=>{let u=c?.[0]?.props?.children;if(typeof u!="string")return;let p=u.match(/<@!?(\d+)>/)?.[1];if(!p||Dc.has(p))return;if(U.getUser(p))return l(p);let d=()=>{Dc.add(p),F2.unshift(()=>Ct.getUser(p).then(()=>{l(p),Dc.delete(p)}).catch(h=>{h?.status===429&&(F2.unshift(()=>Fn(1e3).then(d)),Dc.delete(p))}).finally(()=>Fn(300)))};d()}},c))}var Dc,F2,fh,U2=g(()=>{"use strict";a();ae();A();Pe();ci();w();x();Dc=new Set,F2=new _o(5);fh=y({name:"ValidUser",description:"Fix mentions for unknown users showing up as '<@343383572805058560>' (hover over a mention to fix it)",authors:[m.Ven],tags:["MentionCacheFix"],patches:[{find:'className:"mention"',replacement:{match:/react(?=\(\i,\i,\i\).{0,50}return null==\i\?\(0,\i\.jsx\)\((\i\.\i),.+?jsx\)\((\i\.\i),\{className:"mention")/,replace:"react:(...args)=>$self.renderMention($1,$2,...args),originalReact"}}],renderMention(e,t,o,r,i){return n(B,{noop:!0},n(YR,{RoleMention:e,UserMention:t,data:o,parse:r,props:i}))}})});var gh,hh,$2=g(()=>{"use strict";a();A();w();x();gh={},hh=y({name:"VoiceChatDoubleClick",description:"Join voice chats via double click instead of single click",authors:[m.Ven,m.D3SOX],patches:[...[".handleVoiceStatusClick",".handleClickChat"].map(e=>({find:e,replacement:[{match:/onClick:\(\)=>\{this.handleClick\(\)/g,replace:"onClick:()=>{$self.schedule(()=>{this.handleClick()},this)"}]})),{find:".shouldCloseDefaultModals",replacement:{match:/onClick:(\i)(?=,.{0,30}className:"channelMention".+?(\i)\.inContent)/,replace:(e,t,o)=>`onClick:(vcDoubleClickEvt)=>$self.shouldRunOnClick(vcDoubleClickEvt,${o})&&${t}()`}}],shouldRunOnClick(e,{channelId:t}){let o=Q.getChannel(t);return!o||![2,13].includes(o.type)?!0:e.detail>=2},schedule(e,t){let o=t.props.channel.id;if(be.getVoiceChannelId()===o){e();return}let r=gh[o]??={timeout:void 0,i:0};clearTimeout(r.timeout),++r.i>=2?(e(),delete gh[o]):r.timeout=setTimeout(()=>{delete gh[o]},500)}})});function Ec(e,t=E.plugins.VcNarrator){if(!e)return;let o=new SpeechSynthesisUtterance(e),r=speechSynthesis.getVoices().find(i=>i.voiceURI===t.voice);!r&&(new ie("VcNarrator").error(`Voice "${t.voice}" not found. Resetting to default.`),r=speechSynthesis.getVoices().find(i=>i.default),t.voice=r?.voiceURI,!r)||(o.voice=r,o.volume=t.volume,o.rate=t.rate,speechSynthesis.speak(o))}function Lc(e){let t=E.plugins.VcNarrator.latinOnly?/[^\p{Script=Latin}\p{Number}\p{Punctuation}\s]/gu:/[^\p{Letter}\p{Number}\p{Punctuation}\s]/gu;return e.normalize("NFKC").replace(t,"").replace(/_{2,}/g,"_").trim()}function _c(e,t,o,r,i){return e.replaceAll("{{USER}}",Lc(t)||(t?"Someone":"")).replaceAll("{{CHANNEL}}",Lc(o)||"channel").replaceAll("{{DISPLAY_NAME}}",Lc(r)||(r?"Someone":"")).replaceAll("{{NICKNAME}}",Lc(i)||(i?"Someone":""))}function ZR({channelId:e,oldChannelId:t},o){if(o&&e!==yh&&(t=yh,yh=e),e!==t){if(e)return[t?"move":"join",e];if(t)return["leave",t]}return["",""]}function XR(e,t){let o=Object.assign({},E.plugins.VcNarrator,e),r=U.getCurrentUser(),i=mo.getGuildId();Ec(_c(o[t+"Message"],r.username,"general",r.globalName??r.username,Oe.getNick(i,r.id)??r.username),o)}var G2,yh,vh,H2=g(()=>{"use strict";a();$();li();A();Ve();it();vn();w();j();x();G2=P("getVoiceStatesForChannel","getCurrentClientVoiceChannelId");vh=y({name:"VcNarrator",description:"Announces when users join, leave, or move voice channels via narrator",authors:[m.Ven],flux:{VOICE_STATE_UPDATES({voiceStates:e}){let t=mo.getGuildId(),o=be.getVoiceChannelId(),r=U.getCurrentUser().id;if(Q.getChannel(o)?.type!==13)for(let i of e){let{userId:s,channelId:l,oldChannelId:c}=i,u=s===r;if(!u&&(!o||l!==o&&c!==o))continue;let[p,d]=ZR(i,u);if(!p)continue;let h=E.plugins.VcNarrator[p+"Message"],v=u&&!E.plugins.VcNarrator.sayOwnName?"":U.getUser(s).username,T=v&&(U.getUser(s).globalName??v),N=v&&(Oe.getNick(t,s)??v),b=Q.getChannel(d).name;Ec(_c(h,v,b,T,N))}},AUDIO_TOGGLE_SELF_MUTE(){let e=be.getVoiceChannelId(),t=G2.getVoiceStateForChannel(e);if(!t)return;let o=t.mute||t.selfMute?"unmute":"mute";Ec(_c(E.plugins.VcNarrator[o+"Message"],"",Q.getChannel(e).name,"",""))},AUDIO_TOGGLE_SELF_DEAF(){let e=be.getVoiceChannelId(),t=G2.getVoiceStateForChannel(e);if(!t)return;let o=t.deaf||t.selfDeaf?"undeafen":"deafen";Ec(_c(E.plugins.VcNarrator[o+"Message"],"",Q.getChannel(e).name,"",""))}},start(){if(typeof speechSynthesis>"u"||speechSynthesis.getVoices().length===0){new ie("VcNarrator").warn("SpeechSynthesis not supported or no Narrator voices found. Thus, this plugin will not work. Check my Settings for more info");return}},optionsCache:null,get options(){return this.optionsCache??={voice:{type:4,description:"Narrator Voice",options:window.speechSynthesis?.getVoices().map(e=>({label:e.name,value:e.voiceURI,default:e.default}))??[]},volume:{type:5,description:"Narrator Volume",default:1,markers:[0,.25,.5,.75,1],stickToMarkers:!1},rate:{type:5,description:"Narrator Speed",default:1,markers:[.1,.5,1,2,5,10],stickToMarkers:!1},sayOwnName:{description:"Say own name",type:3,default:!1},latinOnly:{description:"Strip non latin characters from names before saying them",type:3,default:!1},joinMessage:{type:0,description:"Join Message",default:"{{USER}} joined"},leaveMessage:{type:0,description:"Leave Message",default:"{{USER}} left"},moveMessage:{type:0,description:"Move Message",default:"{{USER}} moved to {{CHANNEL}}"},muteMessage:{type:0,description:"Mute Message (only self for now)",default:"{{USER}} Muted"},unmuteMessage:{type:0,description:"Unmute Message (only self for now)",default:"{{USER}} unmuted"},deafenMessage:{type:0,description:"Deafen Message (only self for now)",default:"{{USER}} deafened"},undeafenMessage:{type:0,description:"Undeafen Message (only self for now)",default:"{{USER}} undeafened"}}},settingsAboutComponent({tempSettings:e}){let[t,o]=bt(()=>{let s=speechSynthesis.getVoices();return[s.length!==0,s.some(l=>l.lang.startsWith("en"))]},[]),r=bt(()=>Object.keys(Vencord.Plugins.plugins.VcNarrator.options).filter(s=>s.endsWith("Message")).map(s=>s.slice(0,-7)),[]),i=null;if(t)o||(i=n(So,null,"You don't have any English voices installed, so the narrator might sound weird"));else{let s="No narrator voices found. ";s+=navigator.platform?.toLowerCase().includes("linux")?"Install speech-dispatcher or espeak and run Discord with the --enable-speech-dispatcher flag":"Try installing some in the Narrator settings of your Operating System",i=n(So,null,s)}return n(S.FormSection,null,n(S.FormText,null,"You can customise the spoken messages below. You can disable specific messages by setting them to nothing"),n(S.FormText,null,"The special placeholders ",n("code",null,"{{USER}}"),", ",n("code",null,"{{DISPLAY_NAME}}"),", ",n("code",null,"{{NICKNAME}}")," and ",n("code",null,"{{CHANNEL}}")," ","will be replaced with the user's name (nothing if it's yourself), the user's display name, the user's nickname on current server and the channel's name respectively"),o&&n(f,null,n(S.FormTitle,{className:z.top20,tag:"h3"},"Play Example Sounds"),n("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"1rem"},className:"vc-narrator-buttons"},r.map(s=>n(C,{key:s,onClick:()=>XR(e,s)},yn([s]))))),i)}})});var z2=g(()=>{});function QR(e){let t=[];for(let o of Object.values(Vencord.Plugins.plugins))o.toolboxActions&&Vencord.Plugins.isPluginEnabled(o.name)&&t.push(n(G.MenuGroup,{label:o.name,key:`vc-toolbox-${o.name}`},Object.entries(o.toolboxActions).map(([r,i])=>{let s=`vc-toolbox-${o.name}-${r}`;return n(G.MenuItem,{id:s,key:s,label:r,action:i})})));return n(G.Menu,{navId:"vc-toolbox",onClose:e},n(G.MenuItem,{id:"vc-toolbox-notifications",label:"Open Notification Log",action:ja}),n(G.MenuCheckboxItem,{id:"vc-toolbox-quickcss-toggle",checked:E.useQuickCss,label:"Enable QuickCSS",action:()=>{E.useQuickCss=!E.useQuickCss,e()}}),n(G.MenuItem,{id:"vc-toolbox-quickcss",label:"Open QuickCSS",action:()=>VencordNative.quickCss.openEditor()}),...t)}function VR(e){return n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 27 27",width:24,height:24},n("path",{fill:"currentColor",d:e?"M9 0h1v1h1v2h1v2h3V3h1V1h1V0h1v2h1v2h1v7h-1v-1h-3V9h1V6h-1v4h-3v1h1v-1h2v1h3v1h-1v1h-3v2h1v1h1v1h1v3h-1v4h-2v-1h-1v-4h-1v4h-1v1h-2v-4H9v-3h1v-1h1v-1h1v-2H9v-1H8v-1h3V6h-1v3h1v1H8v1H7V4h1V2h1M5 19h2v1h1v1h1v3H4v-1h2v-1H4v-2h1m15-1h2v1h1v2h-2v1h2v1h-5v-3h1v-1h1m4 3h4v1h-4":"M0 0h7v1H6v1H5v1H4v1H3v1H2v1h5v1H0V6h1V5h1V4h1V3h1V2h1V1H0m13 2h5v1h-1v1h-1v1h-1v1h3v1h-5V7h1V6h1V5h1V4h-3m8 5h1v5h1v-1h1v1h-1v1h1v-1h1v1h-1v3h-1v1h-2v1h-1v1h1v-1h2v-1h1v2h-1v1h-2v1h-1v-1h-1v1h-6v-1h-1v-1h-1v-2h1v1h2v1h3v1h1v-1h-1v-1h-3v-1h-4v-4h1v-2h1v-1h1v-1h1v2h1v1h1v-1h1v1h-1v1h2v-2h1v-2h1v-1h1M8 14h2v1H9v4h1v2h1v1h1v1h1v1h4v1h-6v-1H5v-1H4v-5h1v-1h1v-2h2m17 3h1v3h-1v1h-1v1h-1v2h-2v-2h2v-1h1v-1h1m1 0h1v3h-1v1h-2v-1h1v-1h1"}))}function eD(){let[e,t]=Y(!1);return n(Qi,{position:"bottom",align:"right",animation:Qi.Animation.NONE,shouldShow:e,onRequestClose:()=>t(!1),renderPopout:()=>QR(()=>t(!1))},(o,{isShown:r})=>n(JR,{className:"vc-toolbox-btn",onClick:()=>t(i=>!i),tooltip:r?null:"Vencord Toolbox",icon:()=>VR(r),selected:r}))}function tD({children:e}){return e.splice(e.length-1,0,n(B,{noop:!0},n(eD,null))),n(f,null,e)}var JR,Sh,j2=g(()=>{"use strict";a();z2();Wa();$();ae();A();w();j();x();JR=pn("Icon","Divider");Sh=y({name:"VencordToolbox",description:"Adds a button next to the inbox button in the channel header that houses Vencord quick actions",authors:[m.Ven,m.AutumnVN],patches:[{find:"toolbar:function",replacement:{match:/(?<=toolbar:function.{0,100}\()\i.Fragment,/,replace:"$self.ToolboxFragmentWrapper,"}}],ToolboxFragmentWrapper:B.wrap(tD,{fallback:()=>n("p",{style:{color:"red"}},"Failed to render :(")})})});function va(e){let t=e.startsWith("/")?"png":bh.store.format,o=new URL(e,window.location.href);o.searchParams.set("size",bh.store.imgSize),o.pathname=o.pathname.replace(/\.(png|jpe?g|webp)$/,`.${t}`),e=o.toString(),o.searchParams.set("size","4096");let r=o.toString();Go(e,{original:r,height:256})}var Oc,bh,W2,q2,Th,K2=g(()=>{"use strict";a();Rt();$();Lt();A();ct();w();j();x();Oc=P("getGuildBannerURL"),bh=D({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"}))}});W2=(e,{user:t,guildId:o})=>()=>{if(!t)return;let r=Oe.getMember(o,t.id)?.avatar||null;e.splice(-1,0,n(G.MenuGroup,null,n(G.MenuItem,{id:"view-avatar",label:"View Avatar",action:()=>va(Oc.getUserAvatarURL(t,!0)),icon:Er}),r&&n(G.MenuItem,{id:"view-server-avatar",label:"View Server Avatar",action:()=>va(Oc.getGuildMemberAvatarURLSimple({userId:t.id,avatar:r,guildId:o,canAnimate:!0},!0)),icon:Er})))},q2=(e,{guild:t})=>()=>{if(!t)return;let{id:o,icon:r,banner:i}=t;!i&&!r||e.splice(-1,0,n(G.MenuGroup,null,r?n(G.MenuItem,{id:"view-icon",label:"View Icon",action:()=>va(Oc.getGuildIconURL({id:o,icon:r,canAnimate:!0})),icon:Er}):null,i?n(G.MenuItem,{id:"view-banner",label:"View Banner",action:()=>va(Oc.getGuildBannerURL({id:o,banner:i},!0)),icon:Er}):null))},Th=y({name:"ViewIcons",authors:[m.Ven,m.TheKodeToad,m.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:bh,openImage:va,start(){ue("user-context",W2),ue("guild-context",q2)},stop(){fe("user-context",W2),fe("guild-context",q2)},patches:[{find:"User Profile Modal - Context Menu",replacement:{match:/\{src:(\i)(?=,avatarDecoration)/,replace:"{src:$1,onClick:()=>$self.openImage($1)"}},{find:".NITRO_BANNER,",replacement:{match:/style:\{(?=backgroundImage:(\i&&\i)\?"url\("\.concat\((\i),)/,replace:'onClick:ev=>$1&&ev.target.style.backgroundImage&&$self.openImage($2),style:{cursor:$1?"pointer":void 0,'}},{find:".avatarPositionPanel",replacement:{match:/(?<=avatarWrapperNonUserBot.{0,50})onClick:(\i\|\|\i)\?void 0(?<=,avatarSrc:(\i).+?)/,replace:'style:($1)?{cursor:"pointer"}:{},onClick:$1?()=>{$self.openImage($2)}'}}]})});function xh(e){return n("div",{className:oD.markup},Be.defaultRules.codeBlock.react(e,null,{}))}var oD,Y2=g(()=>{"use strict";a();j();x();oD=P("markup","codeContainer")});function nD(e){return Object.fromEntries(Object.entries(e).sort(([t],[o])=>t.localeCompare(o)))}function rD(e){let t=nD(JSON.parse(JSON.stringify(e)));for(let r of["email","phone","mfaEnabled","personalConnectionId"])delete t.author[r];let o=t;return delete o.editHistory,delete o.deleted,o.attachments?.forEach(r=>delete r.deleted),t}function J2(e,t,o){let r=we(i=>n(B,null,n(Ne,{...i,size:"large"},n(Xe,null,n(J,{variant:"heading-lg/semibold",style:{flexGrow:1}},"View Raw"),n(Tt,{onClick:()=>mn(r)})),n(We,null,n("div",{style:{padding:"16px 0"}},!!o&&n(f,null,n(S.FormTitle,{tag:"h5"},"Content"),n(xh,{content:o,lang:""}),n(S.FormDivider,{className:z.bottom20})),n(S.FormTitle,{tag:"h5"},t," Data"),n(xh,{content:e,lang:"json"}))),n(pt,null,n(ce,{cellSpacing:10},n(C,{onClick:()=>vo(e,`${t} data copied to clipboard!`)},"Copy ",t," JSON"),!!o&&n(C,{onClick:()=>vo(o,"Content copied to clipboard!")},"Copy Raw Content"))))))}function Z2(e){e=rD(e);let t=JSON.stringify(e,null,4);return J2(t,"Message",e.content)}function Wi(e){return(o,r)=>()=>{if(e==="Guild"&&!r.guild||e==="User"&&!r.user)return;let i=o.at(-1);if(i?.key==="developer-actions"){let s=i.props;Array.isArray(s.children)||(s.children=[s.children]),{children:o}=s}o.splice(-1,0,n(G.MenuItem,{id:`vc-view-${e.toLowerCase()}-raw`,label:"View Raw",action:()=>J2(JSON.stringify(r[e.toLowerCase()],null,4),e),icon:X2}))}}var X2,Bc,wh,Q2=g(()=>{"use strict";a();Rt();jr();$();Y2();ae();kt();A();it();Pe();nt();w();x();X2=()=>n("svg",{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",width:"18",height:"18"},n("path",{d:"M12.9297 3.25007C12.7343 3.05261 12.4154 3.05226 12.2196 3.24928L11.5746 3.89824C11.3811 4.09297 11.3808 4.40733 11.5739 4.60245L16.5685 9.64824C16.7614 9.84309 16.7614 10.1569 16.5685 10.3517L11.5739 15.3975C11.3808 15.5927 11.3811 15.907 11.5746 16.1017L12.2196 16.7507C12.4154 16.9477 12.7343 16.9474 12.9297 16.7499L19.2604 10.3517C19.4532 10.1568 19.4532 9.84314 19.2604 9.64832L12.9297 3.25007Z"}),n("path",{d:"M8.42616 4.60245C8.6193 4.40733 8.61898 4.09297 8.42545 3.89824L7.78047 3.24928C7.58466 3.05226 7.26578 3.05261 7.07041 3.25007L0.739669 9.64832C0.5469 9.84314 0.546901 10.1568 0.739669 10.3517L7.07041 16.7499C7.26578 16.9474 7.58465 16.9477 7.78047 16.7507L8.42545 16.1017C8.61898 15.907 8.6193 15.5927 8.42616 15.3975L3.43155 10.3517C3.23869 10.1569 3.23869 9.84309 3.43155 9.64824L8.42616 4.60245Z"}));Bc=D({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"}]}});wh=y({name:"ViewRaw",description:"Copy and view the raw content/data of any message, channel or guild",authors:[m.KingFish,m.Ven,m.rad,m.ImLvna],dependencies:["MessagePopoverAPI"],settings:Bc,start(){zo("ViewRaw",e=>{let t=()=>{Bc.store.clickMethod==="Right"?vo(e.content):Z2(e)},o=i=>{Bc.store.clickMethod==="Left"?(i.preventDefault(),i.stopPropagation(),vo(e.content)):(i.preventDefault(),i.stopPropagation(),Z2(e))};return{label:Bc.store.clickMethod==="Right"?"Copy Raw (Left Click) / View Raw (Right Click)":"View Raw (Left Click) / Copy Raw (Right Click)",icon:X2,message:e,channel:Q.getChannel(e.channel_id),onClick:t,onContextMenu:o}}),ue("guild-context",Wi("Guild")),ue("channel-context",Wi("Channel")),ue("user-context",Wi("User"))},stop(){jo("CopyRawMessage"),fe("guild-context",Wi("Guild")),fe("channel-context",Wi("Channel")),fe("user-context",Wi("User"))}})});var V2=g(()=>{});var qi,Fc=g(()=>{"use strict";a();$();w();qi=D({noiseSuppression:{type:3,description:"Noise Suppression",default:!0},echoCancellation:{type:3,description:"Echo Cancellation",default:!0}})});var Nle,eM=g(()=>{"use strict";a();x();Fc();Nle=VencordNative.pluginHelpers.VoiceMessages});var mr,Mh=g(()=>{"use strict";a();rt();mr=Fe("vc-vmsg-")});var iD,tM,oM=g(()=>{"use strict";a();ut();j();Mh();iD=je("waveform:","onVolumeChange"),tM=({src:e,waveform:t,recording:o})=>{let r=ls({deps:[o]}),i=o?Math.floor(r/1e3):0,s=Math.floor(i/60)+":"+(i%60).toString().padStart(2,"0");return e&&!o?n(iD,{key:e,src:e,waveform:t}):n("div",{className:mr("preview",o?"preview-recording":[])},n("div",{className:mr("preview-indicator")}),n("div",{className:mr("preview-time")},s),n("div",{className:mr("preview-label")},o?"RECORDING":"----"))}});var nM,rM=g(()=>{"use strict";a();x();Fc();nM=({setAudioBlob:e,onRecordingChange:t})=>{let[o,r]=Y(!1),[i,s]=Y(!1),[l,c]=Y(),[u,p]=Y([]),d=v=>{r(v),t?.(v)};function h(){!o?navigator.mediaDevices.getUserMedia({audio:{echoCancellation:qi.store.echoCancellation,noiseSuppression:qi.store.noiseSuppression}}).then(T=>{let N=[];p(N);let b=new MediaRecorder(T);c(b),b.addEventListener("dataavailable",I=>{N.push(I.data)}),b.start(),d(!0)}):l&&(l.addEventListener("stop",()=>{e(new Blob(u,{type:"audio/ogg; codecs=opus"})),d(!1)}),l.stop())}return n(f,null,n(C,{onClick:h},o?"Stop":"Start"," recording"),n(C,{disabled:!o,onClick:()=>{s(!i),i?l?.resume():l?.pause()}},i?"Resume":"Pause"," recording"))}});function cD(e,t){let o=be.getChannelId(),r=aD.getPendingReply(o);r&&O.dispatch({type:"DELETE_PENDING_REPLY",channelId:o});let i=new sD.CloudUpload({file:new File([e],"voice-message.ogg",{type:"audio/ogg; codecs=opus"}),isClip:!1,isThumbnail:!1,platform:1},o,!1,0);i.on("complete",()=>{Nt.post({url:`/channels/${o}/messages`,body:{flags:1<<13,channel_id:o,content:"",nonce:Xo.fromTimestamp(Date.now()),sticker_ids:[],type:0,attachments:[{id:"0",filename:i.filename,uploaded_filename:i.uploadedFilename,waveform:t.waveform,duration_secs:t.duration}],message_reference:r?no.getSendMessageOptionsForReply(r)?.messageReference:null}})}),i.on("error",()=>oo("Failed to upload voice message",oe.Type.FAILURE)),i.upload()}function uD(){let[e,t]=Y();return[e,r=>{e&&URL.revokeObjectURL(e),t(URL.createObjectURL(r))}]}function pD({modalProps:e}){let[t,o]=Y(!1),[r,i]=Y(),[s,l]=uD();pe(()=>()=>{s&&URL.revokeObjectURL(s)},[s]);let[c]=at(async()=>{if(!r)return iM;let p=await new AudioContext().decodeAudioData(await r.arrayBuffer()),d=p.getChannelData(0),h=new Uint8Array(Mr.clamp(Math.floor(p.duration*10),Math.min(32,d.length),256)),v=Math.floor(d.length/h.length);for(let b=0;b<h.length;b++){let I=0;for(let k=0;k<v;k++){let M=b*v+k;I+=d[M]**2}h[b]=~~(Math.sqrt(I/v)*255)}let T=Math.max(...h),N=1+(255/T-1)*Math.min(1,100*(T/255)**3);for(let b=0;b<h.length;b++)h[b]=Math.min(255,~~(h[b]*N));return{waveform:window.btoa(String.fromCharCode(...h)),duration:p.duration}},{deps:[r],fallbackValue:iM});return n(Ne,{...e},n(Xe,null,n(S.FormTitle,null,"Record Voice Message")),n(We,{className:mr("modal")},n("div",{className:mr("buttons")},n(lD,{setAudioBlob:u=>{i(u),l(u)},onRecordingChange:o}),n(C,{onClick:async()=>{let u=await Qa("audio/*");u&&(i(u),l(u))}},"Upload File")),n(S.FormTitle,null,"Preview"),n(tM,{src:s,waveform:c.waveform,recording:t})),n(pt,null,n(C,{disabled:!r,onClick:()=>{cD(r,c),e.onClose(),oo("Now sending voice message... Please be patient",oe.Type.MESSAGE)}},"Send")))}var sD,aD,Ph,lD,Ih,iM,sM,aM=g(()=>{"use strict";a();V2();Rt();Lt();A();nt();ut();w();Va();j();x();eM();Fc();Mh();oM();rM();sD=P("CloudUpload"),aD=Re("PendingReplyStore"),Ph=P("optionName","optionIcon","optionLabel"),lD=nM,Ih=y({name:"VoiceMessages",description:"Allows you to send voice messages like on mobile. To do so, right click the upload button and click Send Voice Message",authors:[m.Ven,m.Vap,m.Nickyux],settings:qi,start(){ue("channel-attach",sM)},stop(){fe("channel-attach",sM)}}),iM={waveform:"AAAAAAAAAAAA",duration:1};sM=(e,t)=>()=>{t.channel.guild_id&&!(_e.can(xe.SEND_VOICE_MESSAGES,t.channel)&&_e.can(xe.SEND_MESSAGES,t.channel))||e.push(n(G.MenuItem,{id:"vc-send-vmsg",label:n("div",{className:Ph.optionLabel},n(bv,{className:Ph.optionIcon,height:24,width:24}),n("div",{className:Ph.optionName},"Send voice message")),action:()=>we(o=>n(pD,{modalProps:o}))}))}});async function dD(e){let t=await fetch(e);if(t.status===200)return await t.blob()}var Uc,Yr,Ah,lM=g(()=>{"use strict";a();$();A();w();Va();j();x();Uc=P("contextMenuCallbackNative");Yr=D({addBack:{type:3,description:"Add back the Discord context menus for images, links and the chat input bar",default:!0,restartNeeded:!0}}),Ah=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:[m.Ven],enabledByDefault:!0,required:!0,settings:Yr,start(){Yr.store.addBack&&(window.removeEventListener("contextmenu",Uc.contextMenuCallbackWeb),window.addEventListener("contextmenu",Uc.contextMenuCallbackNative),this.changedListeners=!0)},stop(){this.changedListeners&&(window.removeEventListener("contextmenu",Uc.contextMenuCallbackNative),window.addEventListener("contextmenu",Uc.contextMenuCallbackWeb))},patches:[{find:"open-native-link",replacement:[{match:/if\(!\i\.\i\|\|null==/,replace:"if(null=="},{match:/\i\.\i\.copy/,replace:"Vencord.Webpack.Common.Clipboard.copy"}]},{find:'id:"copy-image"',replacement:[{match:/!\i\.isPlatformEmbedded/,replace:"false"},{match:/return\s*?\[\i\.\i\.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"',all:!0,predicate:()=>Yr.store.addBack,replacement:{match:/return \i\.\i(?=\?|&&)/,replace:"return true"}},{find:'"interactionUsernameProfile"',predicate:()=>Yr.store.addBack,replacement:{match:/if\((?="A"===\i\.tagName&&""!==\i\.textContent)/,replace:"if(false&&"}},{find:'getElementById("slate-toolbar"',predicate:()=>Yr.store.addBack,replacement:{match:/(?<=handleContextMenu\(\i\)\{.{0,200}isPlatformEmbedded)\?/,replace:"||true?"}},{find:".SLASH_COMMAND_SUGGESTIONS_TOGGLED,{",predicate:()=>Yr.store.addBack,replacement:[{match:/if\(!\i\.\i\)return null;/,replace:""},{match:/\b\i\.\i\.(copy|cut|paste)/g,replace:"$self.$1"}]},{find:'"add-to-dictionary"',predicate:()=>Yr.store.addBack,replacement:{match:/let\{text:\i=""/,replace:"return [null,null];$&"}},{find:'.default("MediaEngineWebRTC");',replacement:{match:/supports\(\i\)\{switch\(\i\)\{case (\i).Features/,replace:"$&.DISABLE_VIDEO:return true;case $1.Features"}}],async copyImage(e){let t=new Image;t.onload=()=>{let o=document.createElement("canvas");o.width=t.naturalWidth,o.height=t.naturalHeight,o.getContext("2d").drawImage(t,0,0),o.toBlob(r=>{navigator.clipboard.write([new ClipboardItem({"image/png":r})])},"image/png")},t.crossOrigin="anonymous",t.src=e},async saveImage(e){let t=await dD(e);if(!t)return;let o=new URL(e).pathname.split("/").pop(),r=new File([t],o,{type:t.type});Ja(r)},copy(){let e=document.getSelection();!e||$t.copy(e.toString())},cut(){this.copy(),Bn.dispatch("INSERT_TEXT",{rawText:""})},async paste(){let e=(await navigator.clipboard.read())[0];if(!e)return;let t=new DataTransfer;for(let o of e.types)if(o==="image/png"){let r=new File([await e.getType(o)],"unknown.png",{type:o});t.items.add(r)}else if(o==="text/plain"){let r=await e.getType(o);t.setData(o,await r.text())}document.dispatchEvent(new ClipboardEvent("paste",{clipboardData:t}))}})});var Nh,Ch,cM=g(()=>{"use strict";a();A();w();j();x();Nh=P("JUMP_TO_GUILD","SERVER_NEXT"),Ch=y({name:"WebKeybinds",description:"Re-adds keybinds missing in the web version of Discord: ctrl+t, ctrl+shift+t, ctrl+tab, ctrl+shift+tab, ctrl+1-9, ctrl+,. Only works fully on Vesktop/ArmCord, not inside your browser",authors:[m.Ven],enabledByDefault:!0,onKey(e){if(e.ctrlKey||e.metaKey&&navigator.platform.includes("Mac"))switch(e.key){case"t":case"T":e.preventDefault(),e.shiftKey?(mo.getGuildId()&&Do.transitionToGuild("@me"),Bn.safeDispatch("TOGGLE_DM_CREATE")):O.dispatch({type:"QUICKSWITCHER_SHOW",query:"",queryMode:null});break;case",":e.preventDefault(),dn.open("My Account");break;case"Tab":(e.shiftKey?Nh.SERVER_PREV:Nh.SERVER_NEXT).action(e);break;default:e.key>="1"&&e.key<="9"&&(e.preventDefault(),Nh.JUMP_TO_GUILD.action(e,`mod+${e.key}`));break}},start(){document.addEventListener("keydown",this.onKey)},stop(){document.removeEventListener("keydown",this.onKey)}})});function hD(e,t,o){let r=t.name+(t.id?`:${t.id}`:"");return Nt.get({url:`/channels/${e.channel_id}/messages/${e.id}/reactions/${r}`,query:{limit:100,type:o},oldFormErrors:!0}).then(i=>O.dispatch({type:"MESSAGE_REACTION_ADD_USERS",channelId:e.channel_id,messageId:e.id,users:i.body,emoji:t,reactionType:o})).catch(console.error).finally(()=>Fn(250))}function yD(e,t,o){let r=`${e.id}:${t.name}:${t.id??""}:${o}`,i=uM[r]??={fetched:!1,users:{}};return i.fetched||(gD.unshift(()=>hD(e,t,o)),i.fetched=!0),i.users}function vD(e){return function(o,r){return n(ee,{text:e.slice(5).map(i=>i.username).join(", ")},({onMouseEnter:i,onMouseLeave:s})=>n("div",{className:fD.moreUsers,onMouseEnter:i,onMouseLeave:s},"+",e.length-5))}}function SD(e){e.stopPropagation()}var mD,fD,gD,uM,kh,pM=g(()=>{"use strict";a();ae();A();Pe();ci();ut();w();j();x();mD=je("defaultRenderUser","showDefaultAvatarsForNullUsers"),fD=P("moreUsers","emptyUser","avatarContainer","clickableAvatar"),gD=new _o;kh=y({name:"WhoReacted",description:"Renders the avatars of users who reacted to a message",authors:[m.Ven,m.KannaDev],patches:[{find:",reactionRef:",replacement:{match:/(\i)\?null:\(0,\i\.jsx\)\(\i\.\i,{className:\i\.reactionCount,.*?}\),/,replace:"$&$1?null:$self.renderUsers(this.props),"}},{find:'.displayName="MessageReactionsStore";',replacement:{match:/(?<=CONNECTION_OPEN:function\(\){)(\i)={}/,replace:"$&;$self.reactions=$1"}}],renderUsers(e){return e.message.reactions.length>10?null:n(B,{noop:!0},n(this._renderUsers,{...e}))},_renderUsers({message:e,emoji:t,type:o}){let r=Un();_.useEffect(()=>{let l=c=>{c.messageId===e.id&&r()};return O.subscribe("MESSAGE_REACTION_ADD_USERS",l),()=>O.unsubscribe("MESSAGE_REACTION_ADD_USERS",l)},[e.id]);let i=yD(e,t,o),s=Object.values(i).filter(Boolean);for(let l of s)O.dispatch({type:"USER_UPDATE",user:l});return n("div",{style:{marginLeft:"0.5em",transform:"scale(0.9)"}},n("div",{onClick:SD},n(mD,{users:s,guildId:Q.getChannel(e.channel_id)?.guild_id,renderIcon:!1,max:5,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:vD(s)})))},set reactions(e){uM=e}})});var Rh,dM=g(()=>{"use strict";a();ao();A();w();Rh=y({name:"Wikisearch",description:"Searches Wikipedia for your requested query. (/wikisearch)",authors:[m.Samu],dependencies:["CommandsAPI"],commands:[{name:"wikisearch",description:"Searches Wikipedia for your request.",inputType:0,options:[{name:"search",description:"Word to search for",type:3,required:!0}],execute:async(e,t)=>{let o=lt(e,"search","");if(!o)return me(t.channel.id,{content:"No word was defined!"});let r=new URLSearchParams({action:"query",format:"json",list:"search",formatversion:"2",origin:"*",srsearch:o}),i=await fetch("https://en.wikipedia.org/w/api.php?"+r).then(u=>u.json()).catch(u=>(console.log(u),me(t.channel.id,{content:"There was an error. Check the console for more info"}),null));if(!i)return;if(!i.query?.search?.length)return console.log(i),me(t.channel.id,{content:"No results given"});let s=await fetch(`https://en.wikipedia.org/w/api.php?action=query&format=json&prop=info%7Cdescription%7Cimages%7Cimageinfo%7Cpageimages&list=&meta=&indexpageids=1&pageids=${i.query.search[0].pageid}&formatversion=2&origin=*`).then(u=>u.json()).then(u=>u.query.pages[0]).catch(u=>(console.log(u),me(t.channel.id,{content:"There was an error. Check the console for more info"}),null));if(!s)return;let l=s.thumbnail,c=l&&{url:l.source.replace(/(50px-)/ig,"1000px-"),height:l.height*100,width:l.width*100};me(t.channel.id,{embeds:[{type:"rich",title:i.query.search[0].title,url:`https://wikipedia.org/w/index.php?curid=${i.query.search[0].pageid}`,color:"0x8663BE",description:i.query.search[0].snippet.replace(/(&nbsp;|<([^>]+)>)/ig,"").replace(/(&quot;)/ig,'"')+"...",image:c,footer:{text:"Powered by the Wikimedia API"}}]})}}]})});function TD(e,t,o){fetch(`https://cdn.discordapp.com/avatars/${o.author.id}/${o.author.avatar}.png?size=128`).then(r=>r.arrayBuffer()).then(r=>{let i={messageType:1,index:0,timeout:Po.store.timeout,height:gM(hM(t)),opacity:Po.store.opacity,volume:Po.store.volume,audioPath:Po.store.soundPath,title:e,content:t,useBase64Icon:!0,icon:r,sourceApp:"Vencord"};fM.sendToOverlay(i)})}function xD(e,t){let o={messageType:1,index:0,timeout:Po.store.timeout,height:gM(hM(e)),opacity:Po.store.opacity,volume:Po.store.volume,audioPath:Po.store.soundPath,title:t,content:e,useBase64Icon:!1,icon:null,sourceApp:"Vencord"};fM.sendToOverlay(o)}function wD(e,t){let o=U.getCurrentUser();return e.author.id===o.id||e.author.bot&&Po.store.ignoreBots?!1:mM.allowAllMessages(t)||e.mention_everyone&&!mM.isSuppressEveryoneEnabled(e.guild_id)?!0:e.mentions.some(r=>r.id===o.id)}function gM(e){return e.length<=100?100:e.length<=200?150:e.length<=300?200:250}function hM(e){return e.replace(new RegExp("<[^>]*>","g"),"")}var mM,bD,Po,fM,Dh,yM=g(()=>{"use strict";a();$();ks();A();Ve();w();j();x();mM=P("isSuppressEveryoneEnabled"),bD=new ie("XSOverlay"),Po=D({ignoreBots:{type:3,description:"Ignore messages from bots",default:!1},pingColor:{type:0,description:"User mention color",default:"#7289da"},channelPingColor:{type:0,description:"Channel mention color",default:"#8a2be2"},soundPath:{type:0,description:"Notification sound (default/warning/error)",default:"default"},timeout:{type:1,description:"Notif duration (secs)",default:1},opacity:{type:5,description:"Notif opacity",default:1,markers:$o(0,1,.1)},volume:{type:5,description:"Volume",default:.2,markers:$o(0,1,.1)}}),fM=VencordNative.pluginHelpers.XsOverlay,Dh=y({name:"XSOverlay",description:"Forwards discord notifications to XSOverlay, for easy viewing in VR",authors:[m.Nyako],tags:["vr","notify"],settings:Po,flux:{CALL_UPDATE({call:e}){if(e?.ringing?.includes(U.getCurrentUser().id)){let t=Q.getChannel(e.channel_id);xD("Incoming call",`${t.name} is calling you...`)}},MESSAGE_CREATE({message:e,optimistic:t}){try{if(t)return;let o=Q.getChannel(e.channel_id);if(!wD(e,o))return;let r=Po.store.pingColor.replaceAll("#","").trim(),i=Po.store.channelPingColor.replaceAll("#","").trim(),s=e.content,l="";if(o.guild_id){let d=de.getGuild(o.guild_id);l=`${e.author.username} (${d.name}, #${o.name})`}switch(o.type){case 1:l=e.author.username.trim();break;case 3:let d=o.name.trim()??o.rawRecipients.map(h=>h.username).join(", ");l=`${e.author.username} (${d})`;break}if(e.referenced_message&&(l+=" (reply)"),e.embeds.length>0&&(s+=" [embed] ",e.content===""&&(s="sent message embed(s)")),e.sticker_items&&(s+=" [sticker] ",e.content===""&&(s="sent a sticker")),e.attachments.filter(d=>typeof d?.content_type=="string"&&d?.content_type.startsWith("image")).forEach(d=>{s+=` [image: ${d.filename}] `}),e.attachments.filter(d=>d&&!d.content_type?.startsWith("image")).forEach(d=>{s+=` [attachment: ${d.filename}] `}),e.mentions.length>0&&(s=s.replace(/<@!?(\d{17,20})>/g,(d,h)=>`<color=#${r}><b>@${U.getUser(h)?.username||"unknown-user"}</color></b>`)),e.mention_roles.length>0)for(let d of e.mention_roles){let h=de.getGuild(o.guild_id).roles[d];if(!h)continue;let v=h.colorString??`#${r}`;s=s.replace(`<@&${d}>`,`<b><color=${v}>@${h.name}</color></b>`)}let u=s.match(new RegExp("(<a?:\\w+:\\d+>)","g")),p=s.match(new RegExp("<(#\\d+)>","g"));if(u)for(let d of u)s=s.replace(new RegExp(`${d}`,"g"),`:${d.split(":")[1]}:`);if(p)for(let d of p){let h=d.split("<#")[1];h=h.substring(0,h.length-1),s=s.replace(new RegExp(`${d}`,"g"),`<b><color=#${i}>#${Q.getChannel(h).name}</color></b>`)}TD(l,s,e)}catch(o){bD.error(`Failed to catch MESSAGE_CREATE: ${o}`)}}}})});var Ge,Rr=g(()=>{a();hy();yy();vy();Sy();by();Ty();xy();wy();My();Py();Iy();kp();d1();m1();f1();g1();v1();S1();Bp();I1();A1();N1();C1();O1();F1();U1();z1();Y1();Z1();X1();Q1();tS();aS();cS();DS();LS();US();GS();HS();u0();g0();h0();S0();b0();T0();x0();P0();I0();k0();L0();E0();F0();im();Fl();X0();Q0();tb();rb();ab();ub();vb();bb();Tb();xb();Mb();Pb();Ib();Ab();Nb();Cb();kb();Db();Lb();Eb();_b();Ob();Bb();Fb();Ub();$b();Gb();Hb();zb();jb();Yb();Zb();ea();cT();dT();MT();PT();NT();RT();zT();jT();tx();ox();nx();hx();yx();xx();wx();Ix();Ax();Rx();Ox();jx();Iw();Aw();Lw();Ng();$w();Gw();Hw();zw();Ww();Vw();e2();t2();r2();i2();d2();m2();f2();x2();M2();ih();P2();A2();C2();E2();B2();U2();$2();H2();j2();K2();Q2();aM();lM();cM();pM();dM();yM();Ge={[mu.name]:mu,[fu.name]:fu,[gu.name]:gu,[hu.name]:hu,[yu.name]:yu,[vu.name]:vu,[Su.name]:Su,[bu.name]:bu,[Tu.name]:Tu,[xu.name]:xu,[wu.name]:wu,[_s.name]:_s,[Rp.name]:Rp,[Dp.name]:Dp,[Lp.name]:Lp,[Ep.name]:Ep,[_p.name]:_p,[Op.name]:Op,[$p.name]:$p,[Gp.name]:Gp,[Hp.name]:Hp,[zp.name]:zp,[jp.name]:jp,[Wp.name]:Wp,[qp.name]:qp,[Kp.name]:Kp,[td.name]:td,[od.name]:od,[nd.name]:nd,[rd.name]:rd,[id.name]:id,[cd.name]:cd,[pd.name]:pd,[dd.name]:dd,[Ad.name]:Ad,[Nd.name]:Nd,[kd.name]:kd,[Dd.name]:Dd,[Ld.name]:Ld,[Gd.name]:Gd,[Hd.name]:Hd,[zd.name]:zd,[jd.name]:jd,[Wd.name]:Wd,[qd.name]:qd,[Kd.name]:Kd,[Zd.name]:Zd,[Xd.name]:Xd,[Jd.name]:Jd,[Vd.name]:Vd,[em.name]:em,[tm.name]:tm,[am.name]:am,[um.name]:um,[pm.name]:pm,[fm.name]:fm,[gm.name]:gm,[hm.name]:hm,[vm.name]:vm,[xm.name]:xm,[Pm.name]:Pm,[Im.name]:Im,[Am.name]:Am,[Nm.name]:Nm,[km.name]:km,[Lm.name]:Lm,[Em.name]:Em,[_m.name]:_m,[Om.name]:Om,[Bm.name]:Bm,[Fm.name]:Fm,[Gm.name]:Gm,[Hm.name]:Hm,[zm.name]:zm,[jm.name]:jm,[Wm.name]:Wm,[qm.name]:qm,[Km.name]:Km,[Ym.name]:Ym,[Zm.name]:Zm,[Xm.name]:Xm,[Jm.name]:Jm,[Qm.name]:Qm,[Vm.name]:Vm,[ef.name]:ef,[of.name]:of,[uf.name]:uf,[pf.name]:pf,[df.name]:df,[yf.name]:yf,[vf.name]:vf,[Cf.name]:Cf,[Df.name]:Df,[_f.name]:_f,[Of.name]:Of,[Bf.name]:Bf,[Uf.name]:Uf,[Hf.name]:Hf,[Jf.name]:Jf,[Qf.name]:Qf,[Vf.name]:Vf,[eg.name]:eg,[tg.name]:tg,[og.name]:og,[ng.name]:ng,[sg.name]:sg,[ag.name]:ag,[Pg.name]:Pg,[Ig.name]:Ig,[Ag.name]:Ag,[Cg.name]:Cg,[kg.name]:kg,[Rg.name]:Rg,[Eg.name]:Eg,[_g.name]:_g,[Og.name]:Og,[Ug.name]:Ug,[Gg.name]:Gg,[jg.name]:jg,[Wg.name]:Wg,[Kg.name]:Kg,[Zg.name]:Zg,[Xg.name]:Xg,[Jg.name]:Jg,[oh.name]:oh,[sh.name]:sh,[rh.name]:rh,[ah.name]:ah,[ch.name]:ch,[uh.name]:uh,[dh.name]:dh,[mh.name]:mh,[fh.name]:fh,[hh.name]:hh,[vh.name]:vh,[Sh.name]:Sh,[Th.name]:Th,[wh.name]:wh,[Ih.name]:Ih,[Ah.name]:Ah,[Ch.name]:Ch,[kh.name]:kh,[Rh.name]:Rh,[Dh.name]:Dh}});var Eh={};ze(Eh,{BadgePosition:()=>Fa,_getBadges:()=>MD,addBadge:()=>kf,removeBadge:()=>Rf});function kf(e){e.component&&=B.wrap(e.component,{noop:!0}),Lh.add(e)}function Rf(e){return Lh.delete(e)}function MD(e){let t=[];for(let r of Lh)(!r.shouldShow||r.shouldShow(e))&&(r.position===0?t.unshift({...r,...e}):t.push({...r,...e}));let o=Ge.BadgeAPI.getDonorBadges(e.user.id);return o&&t.unshift(...o),t}var Fa,Lh,Ua=g(()=>{"use strict";a();ae();Rr();Fa=(o=>(o[o.START=0]="START",o[o.END=1]="END",o))(Fa||{}),Lh=new Set});var _h={};ze(_h,{Badges:()=>CD,Commands:()=>ID,ContextMenu:()=>OD,DataStore:()=>wt,MemberListDecorators:()=>DD,MessageAccessories:()=>AD,MessageDecorations:()=>RD,MessageEvents:()=>PD,MessagePopover:()=>ND,Notices:()=>mc,Notifications:()=>_D,ServerList:()=>kD,Settings:()=>LD,Styles:()=>ED});var PD,mc,ID,wt,AD,ND,CD,kD,RD,DD,LD,ED,_D,OD,Ti=g(()=>{"use strict";a();Ua();ao();Rt();Vo();xf();Hl();If();on();jr();nl();$n();pc();$();rt();PD=ed,mc=np,ID=pp,wt=fn,AD=bm,ND=Qd,CD=Eh,kD=Gf,RD=Pf,DD=Tf,LD=Zu,ED=Du,_D=Eu,OD=Pu});var GD={};ze(GD,{Api:()=>_h,PlainSettings:()=>tn,Plugins:()=>Ap,QuickCss:()=>Uh,Settings:()=>E,Updater:()=>Ju,Util:()=>Oh,Webpack:()=>$h});a();Ti();fl();var Oh={};ze(Oh,{ChangeList:()=>Ds,Devs:()=>m,DevsById:()=>ai,ImageModal:()=>pu,LazyComponent:()=>It,Logger:()=>ie,Margins:()=>z,ModalCloseButton:()=>Tt,ModalContent:()=>We,ModalFooter:()=>pt,ModalHeader:()=>Xe,ModalRoot:()=>Ne,ModalSize:()=>Lo,Modals:()=>Eo,NoopComponent:()=>HM,Queue:()=>_o,REACT_GLOBAL:()=>UM,SUPPORT_CHANNEL_ID:()=>_a,Theme:()=>Rs,VENCORD_USER_AGENT:()=>ru,WEBPACK_CHUNK:()=>Jo,canonicalizeDescriptor:()=>Hc,canonicalizeMatch:()=>ln,canonicalizeReplace:()=>xa,canonicalizeReplacement:()=>Zi,checkIntersecting:()=>su,classes:()=>te,closeAllModals:()=>Qo,closeModal:()=>mn,copyWithToast:()=>vo,debounce:()=>ro,fetchUserProfile:()=>hp,formatDuration:()=>Ps,getCurrentChannel:()=>vi,getCurrentGuild:()=>gp,getTheme:()=>Jn,getUniqueUsername:()=>Tn,gitHash:()=>fo,gitRemote:()=>Ea,humanFriendlyJoin:()=>jP,identity:()=>ss,insertTextIntoChatInputBox:()=>bn,isMobile:()=>GM,isNonNullish:()=>ud,isObject:()=>$M,isObjectEmpty:()=>is,isPluginDev:()=>as,isTruthy:()=>yl,localStorage:()=>Cr,makeCodeblock:()=>Is,makeLazy:()=>_n,mergeDefaults:()=>Ar,onceDefined:()=>BD,onlyOnce:()=>Qu,openImageModal:()=>Go,openInviteModal:()=>_r,openModal:()=>we,openModalLazy:()=>us,openPrivateChannel:()=>XP,openUserProfile:()=>Ho,parseUrl:()=>iu,proxyLazy:()=>Ft,sendMessage:()=>JP,sleep:()=>Fn,useAwaiter:()=>at,useForceUpdater:()=>Un,useIntersection:()=>au,useTimer:()=>ls,wordsFromCamel:()=>ip,wordsFromKebab:()=>BP,wordsFromPascal:()=>sp,wordsFromSnake:()=>OP,wordsFromTitle:()=>FP,wordsToCamel:()=>UP,wordsToKebab:()=>GP,wordsToPascal:()=>HP,wordsToSnake:()=>$P,wordsToTitle:()=>yn});a();wp();A();Nr();ct();vl();qo();Ga();Ve();it();Pe();nt();a();function BD(e,t,o){let r=t;if(t in e)return void o(e[r]);Object.defineProperty(e,t,{set(i){delete e[r],e[r]=i,o(i)},configurable:!0,enumerable:!1})}Vu();Jr();ci();ut();vn();var Uh={};ze(Uh,{toggle:()=>Bh});a();$();var Ki,vM;function Fh(e){let t=document.createElement("style");return t.id=e,document.documentElement.append(t),t}async function FD(){let e=await VencordNative.themes.getSystemValues(),t=Object.entries(e).filter(([,o])=>o!=="#").map(([o,r])=>`--${o}: ${r};`).join("");Fh("vencord-os-theme-values").textContent=`:root{${t}}`}async function Bh(e){Ki?Ki.disabled=!e:e&&(Ki=Fh("vencord-custom-css"),VencordNative.quickCss.addChangeListener(t=>{Ki.textContent=t,Ki.disabled=!E.useQuickCss}),Ki.textContent=await VencordNative.quickCss.get())}async function $c(){vM??=Fh("vencord-themes");let{themeLinks:e,enabledThemes:t}=E,o=[...e];{let r=t.map(i=>`vencord:///themes/${i}?v=${Date.now()}`);o.push(...r)}vM.textContent=o.map(r=>`@import url("${r.trim()}");`).join(`
`)}document.addEventListener("DOMContentLoaded",()=>{FD(),$c(),Bh(E.useQuickCss),Ss("useQuickCss",Bh),Ss("themeLinks",$c),Ss("enabledThemes",$c),VencordNative.quickCss.addThemeChangeListener($c)});Lr();var $h={};ze($h,{Common:()=>nu,LazyComponentWebpack:()=>Wc,_initWebpack:()=>Pa,_resolveReady:()=>Ma,addListener:()=>DM,cache:()=>cn,extract:()=>Na,extractAndLoadChunks:()=>Yh,extractAndLoadChunksLazy:()=>Aa,filters:()=>Ae,find:()=>Ao,findAll:()=>Sr,findBulk:()=>Xi,findByCode:()=>qh,findByCodeLazy:()=>un,findByProps:()=>Ji,findByPropsLazy:()=>P,findComponentByCode:()=>qc,findComponentByCodeLazy:()=>je,findComponentLazy:()=>Kc,findExportedComponentLazy:()=>pn,findLazy:()=>Vt,findModuleFactory:()=>Wh,findModuleId:()=>Ia,findStore:()=>Kh,findStoreLazy:()=>Re,lazyWebpackSearchHistory:()=>RM,listeners:()=>jc,onceReady:()=>zc,proxyLazyWebpack:()=>No,removeListener:()=>LM,search:()=>Yc,subscriptions:()=>jh,waitFor:()=>ft,wreq:()=>Qt});a();x();j();a();A();Ve();Jr();wa();var SM,Io=new ie("WebpackInterceptor","#8caaee");window[Jo]?(Io.info(`Patching ${Jo}.push (was already existent, likely from cache!)`),Pa(window[Jo]),bM(window[Jo])):(Object.defineProperty(window,Jo,{get:()=>SM,set:e=>{e?.push&&(e.push.$$vencordOriginal||(Io.info(`Patching ${Jo}.push`),bM(e)),Pa(e)&&(Io.info("Successfully initialised Vencord webpack"),delete window[Jo],window[Jo]=e)),SM=e},configurable:!0}),Object.defineProperty(Function.prototype,"m",{set(e){new Error().stack?.includes("discord.com")&&(Io.info("Found webpack module factory"),TM(e)),Object.defineProperty(this,"m",{value:e,configurable:!0})},configurable:!0}));function bM(e){function t(o){try{TM(o[1])}catch(r){Io.error("Error in handlePush",r)}return t.$$vencordOriginal.call(e,o)}t.$$vencordOriginal=e.push,t.bind=(...o)=>t.$$vencordOriginal.bind(...o),Object.defineProperty(e,"push",{get:()=>t,set(o){t.$$vencordOriginal=o},configurable:!0})}function TM(e){let{subscriptions:t,listeners:o}=Vencord.Webpack,{patches:r}=Vencord.Plugins;for(let i in e){let s=e[i],l="0,"+s.toString().replaceAll(`
`,""),c=s,u=new Set,p=e[i]=function(d,h,v){try{s(d,h,v)}catch(T){if(s===c)throw T;return Io.error("Error in patched chunk",T),void c(d,h,v)}if(h=d.exports,!!h){if(h===window&&v.c){Object.defineProperty(v.c,i,{value:v.c[i],enumerable:!1,configurable:!0,writable:!0});return}for(let T of o)try{T(h,i)}catch(N){Io.error("Error in webpack listener",N)}for(let[T,N]of t)try{T(h)?(t.delete(T),N(h,i)):h.default&&T(h.default)&&(t.delete(T),N(h.default,i))}catch(b){Io.error("Error while firing callback for webpack chunk",b)}}};p.toString=()=>s.toString(),p.original=c;for(let d=0;d<r.length;d++){let h=r[d],v=Ko(`patch by ${h.plugin}`,(T,N)=>l.replace(T,N));if(!(h.predicate&&!h.predicate())&&l.includes(h.find)){u.add(h.plugin);let T=s,N=l;for(let b of h.replacement){if(b.predicate&&!b.predicate())continue;let I=s,k=l;Zi(b,h.plugin);try{let M=v(b.match,b.replace);if(M===l){if(h.noWarn||Io.warn(`Patch by ${h.plugin} had no effect (Module id is ${i}): ${b.match}`),h.group){Io.warn(`Undoing patch group ${h.find} by ${h.plugin} because replacement ${b.match} had no effect`),l=N,s=T,u.delete(h.plugin);break}}else l=M,s=(0,eval)(`// Webpack Module ${i} - Patched by ${[...u].join(", ")}
${M}
//# sourceURL=WebpackModule${i}`)}catch(M){if(Io.error(`Patch by ${h.plugin} errored (Module id is ${i}): ${b.match}
`,M),u.delete(h.plugin),h.group){Io.warn(`Undoing patch group ${h.find} by ${h.plugin} because replacement ${b.match} errored`),l=N,s=T;break}l=k,s=I}}h.all||r.splice(d--,1)}}}}w();Vo();$n();$();fl();Ga();jn();vs();Lr();x();async function UD(){if(E.cloud.authenticated&&!await Dt("Vencord_cloudSecret")){De({title:"Cloud Integrations",body:"We've noticed you have cloud integrations enabled in another client! Due to limitations, you will need to re-authenticate to continue using them. Click here to go to the settings page to do so!",color:"var(--yellow-360)",onClick:()=>dn.open("VencordCloud")});return}E.cloud.settingsSync&&E.cloud.authenticated&&(Cr.Vencord_settingsDirty?(await di(),delete Cr.Vencord_settingsDirty):await el(!1)&&De({title:"Cloud Settings",body:"Your settings have been updated! Click here to restart to fully apply changes!",color:"var(--green-360)",onClick:go}))}async function $D(){await zc,Ls("WebpackReady"),UD();try{if(!await fi())return;if(E.autoUpdate){await gi(),E.autoUpdateNotification&&setTimeout(()=>De({title:"Vencord has been updated!",body:"Click here to restart",permanent:!0,noPersist:!0,onClick:go}),1e4);return}E.notifyAboutUpdates&&setTimeout(()=>De({title:"A Vencord update is available!",body:"Click here to view the update",permanent:!0,noPersist:!0,onClick(){dn.open("VencordUpdater")}}),1e4)}catch(e){Dr.error("Failed to check for updates",e)}}Ls("Init");$D();document.addEventListener("DOMContentLoaded",()=>{Ls("DOMContentLoaded")},{once:!0});return En(GD);})();
//# sourceURL=VencordDesktopRenderer
//# sourceMappingURL=vencord://vencordDesktopRenderer.js.map
/*! For license information please see vencordDesktopRenderer.js.LEGAL.txt */