`;return(0,eval)(n)}var Lo,On,Eo,st,et,E,_a,Fo,Ce,No,Ea,Bn,Fa=m(()=>{"use strict";i();le();Et();_o();Lo=new N("Webpack"),Eo=new Promise(e=>On=e),E={byProps:(...e)=>e.length===1?t=>t[e[0]]!==void 0:t=>e.every(n=>t[n]!==void 0),byCode:(...e)=>t=>{if(typeof t!="function")return!1;let n=Function.prototype.toString.call(t);for(let r of e)if(!n.includes(r))return!1;return!0}},_a=new Map,Fo=new Set;Ce=Ve("find",function(t,n=!0,r=!1){if(typeof t!="function")throw new Error("Invalid filter. Expected a function got "+typeof t);for(let s in et){let a=et[s];if(!!a?.exports){if(t(a.exports))return a.exports;if(typeof a.exports=="object"){if(a.exports.default&&t(a.exports.default))return n?a.exports.default:a.exports;for(let c in a.exports)if(c.length<=3){let f=a.exports[c];if(f&&t(f))return f}}}}if(!r){let s=new Error("Didn't find module matching this filter");Lo.warn(s)}return null});No=Ve("findBulk",function(...t){if(!Array.isArray(t))throw new Error("Invalid filters. Expected function[] got "+typeof t);let{length:n}=t;if(n===0)throw new Error("Expected at least two filters.");if(n===1)return Ce(t[0]);let r=t,s=0,a=Array(n);e:for(let c in et){let f=et[c];if(!!f?.exports)for(let d=0;d<n;d++){let v=r[d];if(v!==void 0){if(v(f.exports)){if(a[d]=f.exports,r[d]=void 0,++s===n)break e;break}if(typeof f.exports=="object"){if(f.exports.default&&v(f.exports.default)){if(a[d]=f.exports.default,r[d]=void 0,++s===n)break e;break}for(let h in f.exports)if(h.length<=3){let g=f.exports[h];if(g&&v(g)){if(a[d]=g,r[d]=void 0,++s===n)break e;continue e}}}}}}if(s!==n){let c=new Error(`Got${n}filters,butonlyfound${s}modules!`);Lo.warn(c)}return a}),Ea=Ve("findModuleId",function(t){for(let r in st.m)if(st.m[r].toString().includes(t))return Number(r);let n=new Error(`Didn'tfindmodulewithcode:
`+t);return Lo.warn(n),null}),Bn=Ve("mapMangledModule",function(t,n){let r={},s=Ea(t);if(s===null)return r;let a=st(s);e:for(let c in a){let f=a[c];for(let d in n)if(n[d](f)){r[d]=f;continue e}}return r})});var Bo={};ee(Bo,{Common:()=>$o,_initWebpack:()=>Do,_resolveReady:()=>On,addListener:()=>Mm,cache:()=>et,extract:()=>Cm,filters:()=>E,find:()=>Ce,findAll:()=>La,findAllByProps:()=>Im,findBulk:()=>No,findByCode:()=>xe,findByCodeLazy:()=>re,findByProps:()=>_e,findByPropsLazy:()=>M,findLazy:()=>Ae,findModuleId:()=>Ea,listeners:()=>Fo,mapMangledModule:()=>Bn,mapMangledModuleLazy:()=>Me,onceReady:()=>Eo,removeListener:()=>Rm,search:()=>Oo,subscriptions:()=>_a,waitFor:()=>$,wreq:()=>st});var L=m(()=>{"use strict";i();k();Fa()});var $o={};ee($o,{Alerts:()=>at,Button:()=>F,Card:()=>Te,ChannelStore:()=>ae,Clipboard:()=>Ee,ContextMenu:()=>Yo,Flux:()=>Uo,FluxDispatcher:()=>I,Forms:()=>y,GuildChannelStore:()=>zo,GuildStore:()=>qe,Margins:()=>V,Menu:()=>ue,MessageStore:()=>vt,NavigationRouter:()=>Ko,Parser:()=>Ke,PermissionStore:()=>jo,PresenceStore:()=>Xt,PrivateChannelsStore:()=>Go,React:()=>b,ReactDOM:()=>Am,ReadStateStore:()=>$n,RelationshipStore:()=>Hn,RestAPI:()=>Ho,Router:()=>jn,Select:()=>St,SelectedChannelStore:()=>pe,SelectedGuildStore:()=>Un,Slider:()=>qo,Switch:()=>bt,Text:()=>Y,TextArea:()=>Wo,TextInput:()=>Le,Toasts:()=>A,Tooltip:()=>me,UserStore:()=>G,UserUtils:()=>Zt,hljs:()=>Jt,moment:()=>_m});var V,I,Uo,b,Am,Ho,_m,Jt,vt,jo,Go,zo,$n,Xt,qe,G,pe,Un,ae,Hn,y,Te,F,bt,me,jn,Le,Y,Wo,St,qo,Ke,at,Lm,Em,A,Zt,Ee,Ko,ue,Yo,k=m(()=>{"use strict";i();O();Et();L();V=M("marginTop20"),Uo=M("connectStores"),Am=M("createPortal","render"),Ho=M("getAPIBaseURL","get"),_m=M("parseTwoDigitYear"),Jt=M("highlight"),vt=M("getRawMessages"),jo=M("can","getGuildPermissions"),Go=M("openPrivateChannel"),zo=M("getChannels"),$n=M("lastMessageId"),Xt=M("setCurrentUserOnConnectionOpen"),y={},Wo=re("handleSetRef","textArea"),St=Q(()=>xe("optionClassName","popoutPosition","autoFocus","maxVisibleItems")),qo=Q(()=>xe("closestMarkerIndex","stickToMarkers")),Lm={MESSAGE:0,SUCCESS:1,FAILURE:2,CUSTOM:3},Em={TOP:0,BOTTOM:1},A={Type:Lm,Position:Em,genId:()=>(Math.random()||Math.random()).toString(36).slice(2)},Zt={fetchUser:re(".USER(","getUser")},Ee=Me('document.queryCommandEnabled("copy")||document.queryCommandSupported("copy")',{copy:E.byCode(".default.copy("),SUPPORTS_COPY:e=>typeof e=="boolean"}),Ko=Me("Transitioning to external path",{transitionTo:E.byCode("Transitioning to external path"),transitionToGuild:E.byCode("transitionToGuild"),goBack:E.byCode("goBack()"),goForward:E.byCode("goForward()")});$("useState",e=>b=e);$(["dispatch","subscribe"],e=>{I=e;let t=()=>{e.unsubscribe("CONNECTION_OPEN",t),On()};e.subscribe("CONNECTION_OPEN",t)});$(["getCurrentUser","initialize"],e=>G=e);$("getSortedPrivateChannels",e=>ae=e);$("getCurrentlySelectedChannelId",e=>pe=e);$("getLastSelectedGuildId",e=>Un=e);$("getGuildCount",e=>qe=e);$("getRelationshipType",e=>Hn=e);$(["Hovers","Looks","Sizes"],e=>F=e);$(E.byCode("helpdeskArticleId"),e=>bt=e);$(["Positions","Colors"],e=>me=e);$(e=>e.Types?.PRIMARY==="cardPrimary",e=>Te=e);$(E.byCode("errorSeparator"),e=>y.FormTitle=e);$(E.byCode("titleClassName","sectionTitle"),e=>y.FormSection=e);$(e=>e.Types?.INPUT_PLACEHOLDER,e=>y.FormText=e);$(e=>{if(typeof e!="function")return!1;let t=e.toString();return t.length<200&&t.includes("().divider")},e=>y.FormDivider=e);$(E.byCode("currentToast?"),e=>A.show=e);$(E.byCode("currentToast:null"),e=>A.pop=e);$(["show","close"],e=>at=e);$("parseTopic",e=>Ke=e);$(["open","saveAccountChanges"],e=>jn=e);$(["defaultProps","Sizes","contextType"],e=>Le=e);$(e=>{if(typeof e!="function")return!1;let t=e.toString();return t.length<1500&&t.includes("data-text-variant")&&t.includes("always-white")},e=>Y=e);ue=We(()=>{let e=Vencord.Settings.plugins.MenuItemDeobfuscatorAPI.enabled,t=["MenuSeparator","MenuGroup","MenuItem","MenuCheckboxItem","MenuRadioItem","MenuControlItem"],n=Bn("\u266B \u2282(\uFF61\u25D5\u203F\u203F\u25D5\uFF61\u2282) \u266A",{ContextMenu:E.byCode("getContainerProps"),...Object.fromE
${n}`}function en(e,t="Copied to clipboard!"){Ee.SUPPORTS_COPY?Ee.copy(e):t="Your browser does not support copying to clipboard",A.show({message:t,id:A.genId(),type:A.Type.SUCCESS})}function Nm(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Qo(e){try{return new URL(e)}catch{return null}}var Jo,O=m(()=>{"use strict";i();k();Jo=e=>{let t=e.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(t.bottom<0||t.top-n>=0)}});function u(e){return e}var T=m(()=>{"use strict";i()});function Xo(e,t=e,n=""){return Om[n]??=new Proxy(e,{get(r,s){let a=r[s];if(!(s in r)){if(n==="plugins"&&s in te)return r[s]=Xo({enabled:te[s].required??!1},t,`plugins.${s}`);if(n.startsWith("plugins.")){let c=n.slice(8);if(c in te){let f=te[c].options?.[s];if(!f)return a;if("default"in f)return r[s]=f.default;if(f.type===4){let d=f.options.find(v=>v.default);return d&&(r[s]=d.value),d?.value}}}return a}return typeof a=="object"&&!Array.isArray(a)&&a!==null?Xo(a,t,`${n}${n&&"."}${s}`):a},set(r,s,a){if(r[s]===a)return!0;r[s]=a;let c=`${n}${n&&"."}${s}`;for(let f of zn)(!f._path||f._path===c)&&f(a,c);return VencordNative.ipc.invoke(j.SET_SETTINGS,JSON.stringify(t,null,4)),!0}})}function De(e){let[,t]=b.useReducer(()=>({}),{}),n=e?(r,s)=>e.includes(s)&&t():t;return b.useEffect(()=>(zn.add(n),()=>void zn.delete(n)),[]),S}function Zo(e,t){t._path=e,zn.add(t)}function X(e,...t){let{plugins:n}=lt;if(!(e in n)){for(let r of t)if(r in n){Na.info(`Migratingsettingsfromoldname${r}to${e}`),n[e]=n[r],delete n[r],VencordNative.ipc.invoke(j.SET_SETTINGS,JSON.stringify(lt,null,4));break}}}var Na,Da,lt,zn,Om,Oa,S,R=m(()=>{"use strict";i();ze();le();O();T();k();tn();Na=new N("Settings"),Da={notifyAboutUpdates:!0,useQuickCss:!0,themeLinks:[],enableReactDevtools:!1,plugins:{}};try{lt=JSON.parse(VencordNative.ipc.sendSync(j.GET_SETTINGS)),xt(lt,Da)}catch(e){lt=xt({},Da),Na.error(`Anerroroccurredwhileloadingthesettings.Corruptsettingsfile?
`,e)}zn=new Set,Om={};Oa=lt,S=Xo(lt)});var Tt,nn=m(()=>{i();Tt="62b2ace"});var Vo,Ba=m(()=>{i();Vo="Vendicated/Vencord"});var tr={};ee(tr,{Devs:()=>p,REACT_GLOBAL:()=>Bm,VENCORD_USER_AGENT:()=>er,WEBPACK_CHUNK:()=>tt});var tt,Bm,er,p,x=m(()=>{"use strict";i();nn();Ba();tt="webpackChunkdiscord_app",Bm="Vencord.Webpack.Common.React",er=`Vencord/${Tt}${Vo?` (https://github.com/${Vo})`:""}`,p=Object.freeze({Ven:{name:"Vendicated",id:343383572805058560n},Arjix:{name:"ArjixWasTaken",id:674710789138939916n},Cyn:{name:"Cynosphere",id:150745989836308480n},Megu:{name:"Megumin",id:545581357812678656n},botato:{name:"botato",id:440990343899643943n},obscurity:{name:"obscurity",id:336678828233588736n},rushii:{name:"rushii",id:295190422244950017n},Glitch:{name:"Glitchy",id:269567451199569920n},Samu:{name:"Samu",id:702973430449832038n},Animal:{name:"Animal",id:118437263754395652n},MaiKokain:{name:"Mai",id:722647978577363026n},echo:{name:"ECHO",id:712639419785412668n},katlyn:{name:"katlyn",id:250322741406859265n},nea:{name:"nea",id:310702108997320705n},Nuckyz:{name:"Nuckyz",id:235834946571337729n},D3SOX:{name:"D3SOX",id:201052085641281538n},Nickyux:{name:"Nickyux",id:427146305651998721n},mantikafasi:{name:"mantikafasi",id:287555395151593473n},Xinto:{name:"Xinto",id:423915768191647755n},JacobTm:{name:"Jacob.Tm",id:302872992097107991n},DustyAngel47:{name:"DustyAngel47",id:714583473804935238n},BanTheNons:{name:"BanTheNons",id:460478012794863637n},BigDuck:{name:"BigDuck",id:1024588272623681609n},AverageReactEnjoyer:{name:"Average React Enjoyer",id:1004904120056029256n},adryd:{name:"adryd",id:0n},Tyman:{name:"Tyman",id:487443883127472129n},afn:{name:"afn",id:420043923822608384n},KraXen72:{name:"KraXen72",id:379304073515499530n},kemo:{name:"kemo",id:299693897859465228n},dzshn:{name:"dzshn",id:310449948011528192n},Ducko:{name:"Ducko",id:506482395269169153n},jewdev:{name:"jewdev",id:222369866529636353n},Luna:{name:"Luny",id:821472922140803112n},Vap:{name:"Vap0r1ze",id:454072114492866560n},KingFish:{name:"King Fish",id:499400512559382538n}})});var nr,$a=m(()=>{"use strict";i();R();x();O();T();nr=u({name:"BetterNotesBox",description:"Hide notes or disable spellcheck (Configure in settings!!)",authors:[p.Ven],patches:[{find:"hideNote:",all:!0,predicate:Fe(()=>Vencord.Settings.plugins.BetterNotesBox.hide),replacement:{match:/hideNote:.+?(?=[,}])/g,replace:"hideNote:true"}},{find:"Messages.NOTE_PLACEHOLDER",replacement:{match:/\.NOTE_PLACEHOLDER,/,replace:"$&spellCheck:!Vencord.Settings.plugins.BetterNotesBox.noSpellCheck,"}}],options:{hide:{type:3,description:"Hide notes",default:!1,restartNeeded:!0},noSpellCheck:{type:3,description:"Disable spellcheck in notes",disabled:()=>S.plugins.BetterNotesBox.hide,default:!1}}})});var or,Ua=m(()=>{"use strict";i();x();T();or=u({name:"TimeBarAllActivities",description:"Adds the Spotify time bar to all activities if they have start and end timestamps",authors:[p.obscurity],patches:[{find:"renderTimeBar=function",replacement:{match:/renderTimeBar=function\((.{1,3})\){.{0,50}?var/,replace:"renderTimeBar=function($1){var"}}]})});var rr,Ha=m(()=>{"use strict";i();R();x();T();rr=u({name:"AnonymiseFileNames",authors:[p.obscurity],description:"Anonymise uploaded file names",patches:[{find:"instantBatchUpload:function",replacement:{match:/uploadFiles:(.{1,2}),/,replace:"uploadFiles:(...args)=>(args[0].uploads.forEach(f=>f.filename=Vencord.Plugins.plugins.AnonymiseFileNames.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:()=>S.plugins.AnonymiseFileNames.method!==0},consistent:{description:"Consistent filename",type:0,default:"image",disabled:()=>S.plugins.AnonymiseFileNames.method!==1}},anonymise(e){let t="image",n=e.lastIndexOf("."),r=n!==-1?e.slice(n):"";switch(S.plugins.AnonymiseFileNames.method){case 0:let s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxy
`,t),ja.error("Component Stack",n.componentStack)}render(){if(this.state.error===Ga)return this.props.children;if(this.props.noop)return null;if(this.props.fallback)return o(this.props.fallback,{children:this.props.children,...this.state});let t=this.props.message||"An error occurred while rendering this Component. More info can be found below and in your console.";return o(rn,{style:{overflow:"hidden"}},o("h1",null,"Oh no!"),o("p",null,t),o("code",null,this.state.message,!!this.state.stack&&o("pre",{className:V.marginTop8},this.state.stack)))}});ar.wrap=(e,t)=>n=>o(ar,{...t},o(e,{...n}));D=ar});function Z(e){return e.style??={},e.style.display="flex",e.style.gap??="1em",e.style.flexDirection||=e.flexDirection,delete e.flexDirection,o("div",{...e},e.children)}var Ne=m(()=>{"use strict";i()});var dr={};ee(dr,{ModalCloseButton:()=>cr,ModalContent:()=>ot,ModalFooter:()=>sn,ModalHeader:()=>nt,ModalRoot:()=>Be,ModalSize:()=>Ft,Modals:()=>Oe,closeModal:()=>an,openModal:()=>we,openModalLazy:()=>pr});function pr(e,t){return lr.openModalLazy(e,t)}function we(e,t,n){return lr.openModal(e,t,n)}function an(e,t){return lr.closeModal(e,t)}var Ft,Oe,Be,nt,ot,sn,cr,lr,Ye=m(()=>{"use strict";i();L();Ft=(s=>(s.SMALL="small",s.MEDIUM="medium",s.LARGE="large",s.DYNAMIC="dynamic",s))(Ft||{}),Oe=Me("().closeWithCircleBackground",{ModalRoot:E.byCode("().root"),ModalHeader:E.byCode("().header"),ModalContent:E.byCode("().content"),ModalFooter:E.byCode("().footerSeparator"),ModalCloseButton:E.byCode("().closeWithCircleBackground")}),Be=e=>o(Oe.ModalRoot,{...e}),nt=e=>o(Oe.ModalHeader,{...e}),ot=e=>o(Oe.ModalContent,{...e}),sn=e=>o(Oe.ModalFooter,{...e}),cr=e=>o(Oe.ModalCloseButton,{...e}),lr=Me("onCloseRequest:null!=",{openModal:E.byCode("onCloseRequest:null!="),closeModal:E.byCode("onCloseCallback&&"),openModalLazy:e=>e?.length===1&&E.byCode(".apply(this,arguments)")(e)})});var Um,Hm,jm,za,mr,Wa=m(()=>{"use strict";i();fr();sr();ne();Ne();ir();x();ze();le();Ye();T();k();Um="https://media.discordapp.net/stickers/1026517526106087454.webp",Hm=Object.values(p).map(e=>e.id.toString()),jm={tooltip:"Vencord Contributor",image:Um,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},shouldShow:({user:e})=>Hm.includes(e.id),onClick:()=>VencordNative.ipc.invoke(j.OPEN_EXTERNAL,"https://github.com/Vendicated/Vencord")},za={},mr=u({name:"BadgeAPI",description:"API to add badges to users.",authors:[p.Megu],required:!0,patches:[{find:"PREMIUM_GUILD_SUBSCRIPTION_TOOLTIP.format({date:",replacement:{match:/&&((\w{1,3})\.push\({tooltip:\w{1,3}\.\w{1,3}\.Messages\.PREMIUM_GUILD_SUBSCRIPTION_TOOLTIP\.format.+?;)(?:return\s\w{1,3};?})/,replace:(e,t,n)=>`&&${t}returnVencord.Api.Badges.inject(${n},arguments[0]);}`}},{find:"Messages.PROFILE_USER_BADGES,role:",replacement:{match:/src:(\w{1,3})\[(\w{1,3})\.key\],/,replace:(e,t,n)=>`src:${n}.image??${t}[${n}.key],...${n}.props,`}}],async start(){Vencord.Api.Badges.addBadge(jm);let t=(await fetch("https://gist.githubusercontent.com/Vendicated/51a3dd775f6920429ec6e9b735ca7f01/raw/badges.csv").then(n=>n.text())).trim().split(`
`);if(t.shift()!=="id,tooltip,image"){new N("BadgeAPI").error("Invalid badges.csv file!");return}for(let n of t){let[r,s,a]=n.split(",");za[r]={image:a,tooltip:s}}},addDonorBadge(e,t){let n=za[t];n&&e.unshift({...n,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},onClick(){let r=we(s=>o(D,{noop:!0,onError:()=>{an(r),VencordNative.ipc.invoke(j.OPEN_EXTERNAL,"https://github.com/sponsors/Vendicated")}},o(Oe.ModalRoot,{...s},o(Oe.ModalHeader,null,o(Z,{style:{width:"100%",justifyContent:"center"}},o(y.FormTitle,{tag:"h2",style:{width:"100%",textAlign:"center",margin:0}},o(Wn,null),"Vencord Donor"))),o(Oe.ModalContent,null,o(Z,null,o("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533070955872337.png",alt:"",style:{margin:"auto"}}),o("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533090627174460.png",alt:"",style:{margin:"auto"}})),o("div",{style:{padding:"1em"}},o(y.FormText,null,"This Badge is a special perk for Vencord Donors"),o(y.FormText,{className:V.marginTop20},"Please consider supporting the development of Vencord by becoming a donor. It would mean a lot!!"))),o(Oe.ModalFooter,null,o(Z,{style:{width:"100%",justifyContent:"center"}},o(on,null))))))}})}})});var gr,qa=m(()=>{"use strict";i();x();T();gr=u({name:"CommandsAPI",authors:[p.Arjix],description:"Api required by anything that uses commands",patches:[{find:'"giphy","tenor"',replacement:[{match:/(?<=\w=)(\w)(\.filter\(.{0,30}giphy)/,replace:"Vencord.Api.Commands._init($1)$2"}]},{find:"Unexpected value for option",replacement:{match:/,(.{1,2})\.execute\((.{1,2}),(.{1,2})\)]/,replace:(e,t,n,r)=>`,Vencord.Api.Commands._handleCommand(${t},${n},${r})]`}},{find:"().source,children",replacement:{match:/(?<=:(.{1,3})\.displayDescription\}.{0,200}\(\)\.source,children:)[^}]+/,replace:"$1.plugin||($&)"}}]})});var Ka,hr,Ya=m(()=>{"use strict";i();R();x();T();Ka={radio:"MenuRadioItem",separator:"MenuSeparator",checkbox:"MenuCheckboxItem",groupstart:"MenuGroup",control:"MenuControlItem",compositecontrol:"MenuControlItem",item:"MenuItem",customitem:"MenuItem"};X("MenuItemDeobfuscatorAPI","MenuItemDeobfuscatorApi");hr=u({name:"MenuItemDeobfuscatorAPI",description:"Deobfuscates Discord's Menu Item module",authors:[p.Ven],patches:[{find:'"Menu API',replacement:{match:/function.{0,80}type===(.{1,3})\..{1,3}\).{0,50}navigable:.+?Menu API/s,replace:(e,t)=>{let n="",r=[],s=/\(.{1,3}\.type===(.{1,5})\)/g,a=/type:"(\w+)"/g,c;for(;(c=s.exec(e))!==null;){let f=c[1];a.lastIndex=s.lastIndex;let d=a.exec(e)?.[1];if(d&&d in Ka){let v=Ka[d];n+=`Object.defineProperty(${f},"name",{value:"${v}"});`,r.push(`${v}:${f}`)}}return r.length<6&&console.warn("[ApiMenuItemDeobfuscator] Expected to at least remap 6 items, only remapped",r.length),`${n}Object.assign(${t},{${r.join(",")}});${e}`}}}]})});var yr,Qa=m(()=>{"use strict";i();x();T();yr=u({name:"MessageAccessoriesAPI",description:"API to add message accessories.",authors:[p.Cyn],patches:[{find:"_messageAttachmentToEmbedMedia",replacement:{match:/(\(\)\.container\)?,children:)(\[[^\]]+\])(}\)\};return)/,replace:(e,t,n,r)=>`${t}Vencord.Api.MessageAccessories._modifyAccessories(${n},this.props)${r}`}}]})});var vr,Ja=m(()=>{"use strict";i();x();T();vr=u({name:"MessageEventsAPI",description:"Api required by anything using message events.",authors:[p.Arjix],patches:[{find:"sendMessage:function",replacement:[{match:/(?<=_sendMessage:function\([^)]+\)){/,replace:"{if(Vencord.Api.MessageEvents._handlePreSend(...arguments)){return;};"},{match:/(?<=\beditMessage:function\([^)]+\)){/,replace:"{Vencord.Api.MessageEvents._handlePreEdit(...arguments);"}]},{find:'("interactionUsernameProfile',replacement:{match:/var \w=(\w)\.id,\w=(\w)\.id;return .{1,2}\.useCallback\(\(?function\((.{1,2})\){/,replace:(e,t,n,r)=>`var_msg=${t},_chan=${n};${e}Vencord.Api.MessageEvents._handleClick(_msg,_chan,${r});`}}]})});var br,Xa=m(()=>{"use strict";i();x();T();br=u({name:"MessagePopoverAPI",description:"API to add buttons to message popovers.",authors:[p.KingFish],patches:[{find:"Messages.MESSAGE_UTILITIES_A11
.vc-nsfw-img[class^=imageWrapper]img,
.vc-nsfw-img[class^=wrapperPaused]video{
filter:blur(${S.plugins.BlurNSFW.blurAmount}px);
transition:filter0.2s;
}
.vc-nsfw-img[class^=imageWrapper]:hoverimg,
.vc-nsfw-img[class^=wrapperPaused]:hovervideo{
filter:unset;
}
`}var dn,_r,lc=m(()=>{"use strict";i();R();x();T();_r=u({name:"BlurNSFW",description:"Blur attachments in NSFW channels until hovered",authors:[p.Ven],patches:[{find:"().embedWrapper,embed",replacement:[{match:/(\.renderEmbed=.+?(.)=.\.props)(.+?\(\)\.embedWrapper)/g,replace:"$1,vcProps=$2$3+(vcProps.channel.nsfw?' vc-nsfw-img':'')"},{match:/(\.renderAttachments=.+?(.)=this\.props)(.+?\(\)\.embedWrapper)/g,replace:"$1,vcProps=$2$3+(vcProps.channel.nsfw?' vc-nsfw-img':'')"}]}],options:{blurAmount:{type:1,description:"Blur Amount",default:10,onChange:cc}},start(){dn=document.createElement("style"),dn.id="VcBlurNsfw",document.head.appendChild(dn),cc()},stop(){dn?.remove()}})});function qm(e){let t=S.plugins.CallTimer.format==="human",n=h=>t?h:h.toString().padStart(2,"0"),r=h=>t?h:"",s=t?" ":":",a=Math.floor(e/864e5),c=Math.floor(e%864e5/36e5),f=Math.floor(e%864e5%36e5/6e4),d=Math.floor(e%864e5%36e5%6e4/1e3),v="";return a&&(v+=`${a}d`),(c||v)&&(v+=`${n(c)}${r("h")}${s}`),(f||v||!t)&&(v+=`${n(f)}${r("m")}${s}`),v+=`${n(d)}${r("s")}`,v}var Lr,pc=m(()=>{"use strict";i();R();ne();x();T();k();Lr=u({name:"CallTimer",description:"Adds a timer to vcs",authors:[p.Ven],startTime:0,interval:void 0,options:{format:{type:4,description:"The timer format. This can be any valid moment.js format",options:[{label:"30d 23:00:42",value:"stopwatch",default:!0},{label:"30d 23h 00m 42s",value:"human"}]}},patches:[{find:".renderConnectionStatus=",replacement:{match:/(?<=renderConnectionStatus=.+\(\)\.channel,children:)\w/,replace:"[$&, Vencord.Plugins.plugins.CallTimer.renderTimer(this.props.channel.id)]"}}],renderTimer(e){return o(D,{noop:!0},o(this.Timer,{channelId:e}))},Timer({channelId:e}){let[t,n]=b.useState(0),r=b.useMemo(()=>Date.now(),[e]);return b.useEffect(()=>{let s=setInterval(()=>n(Date.now()-r),1e3);return()=>{clearInterval(s),n(0)}},[e]),o("p",{style:{margin:0}},"Connected for ",qm(t))}})});var $r={};ee($r,{_handleClick:()=>Qm,_handlePreEdit:()=>Ym,_handlePreSend:()=>Km,addClickListener:()=>Or,addPreEditListener:()=>Pt,addPreSendListener:()=>$e,removeClickListener:()=>Br,removePreEditListener:()=>kt,removePreSendListener:()=>Ue});function Km(e,t,n){for(let r of Fr)try{let s=r(e,t,n);if(s&&s.cancel===!0)return!0}catch(s){Er.error(`MessageSendHandler:Listenerencounteredanunknownerror
`,s)}return!1}function Ym(e,t,n){for(let r of Dr)try{r(e,t,n)}catch(s){Er.error(`MessageEditHandler:Listenerencounteredanunknownerror
`,s)}}function $e(e){return Fr.add(e),e}function Pt(e){return Dr.add(e),e}function Ue(e){return Fr.delete(e)}function kt(e){return Dr.delete(e)}function Qm(e,t,n){e=vt.getMessage(t.id,e.id)??e;for(let r of Nr)try{r(e,t,n)}catch(s){Er.error(`MessageClickHandler:Listenerencounteredanunknownerror
`,s)}}function Or(e){return Nr.add(e),e}function Br(e){return Nr.delete(e)}var Er,Fr,Dr,Nr,pt=m(()=>{"use strict";i();le();k();Er=new N("MessageEvents","#e5c890"),Fr=new Set,Dr=new Set;Nr=new Set});var dc,mc=m(()=>{"use strict";i();dc=["action_object_map","action_type_map","action_ref_map","spm@*.aliexpress.com","scm@*.aliexpress.com","aff_platform","aff_trace_key","algo_expid@*.aliexpress.*","algo_pvid@*.aliexpress.*","btsid","ws_ab_test","pd_rd_*@amazon.*","_encoding@amazon.*","psc@amazon.*","tag@amazon.*","ref_@amazon.*","pf_rd_*@amazon.*","pf@amazon.*","crid@amazon.*","keywords@amazon.*","sprefix@amazon.*","sr@amazon.*","ie@amazon.*","node@amazon.*","qid@amazon.*","callback@bilibili.com","cvid@bing.com","form@bing.com","sk@bing.com","sp@bing.com","sc@bing.com","qs@bing.com","pq@bing.com","sc_cid","mkt_tok","trk","trkCampaign","ga_*","gclid","gclsrc","hmb_campaign","hmb_medium","hmb_source","spReportId","spJobID","spUserID","spMailingID","itm_*","s_cid","elqTrackId","elqTrack","assetType","assetId","recipientId","campaignId","siteId","mc_cid","mc_eid","pk_*","sc_campaign","sc_channel","sc_content","sc_medium","sc_outcome","sc_geo","sc_country","nr_email_referer","vero_conv","vero_id","yclid","_openstat","mbid","cmpid","cid","c_id","campaign_id","Campaign","hash@ebay.*","fb_action_ids","fb_action_types","fb_ref","fb_source","fbclid","refsrc@facebook.com","hrc@facebook.com","gs_l","gs_lcp@google.*","ved@google.*","ei@google.*","sei@google.*","gws_rd@google.*","gs_gbg@google.*","gs_mss@google.*","gs_rn@google.*","_hsenc","_hsmi","__hssc","__hstc","hsCtaTracking","source@sourceforge.net","position@sourceforge.net","t@*.twitter.com","s@*.twitter.com","ref_*@*.twitter.com","tt_medium","tt_content","lr@yandex.*","redircnt@yandex.*","feature@youtube.com","kw@youtube.com","wt_zmc","utm_source","utm_content","utm_medium","utm_campaign","utm_term","si@open.spotify.com"]});var uc,Jm,Ur,fc=m(()=>{"use strict";i();pt();R();x();T();mc();uc=/[\\^$.*+?()[\]{}|]/g,Jm=RegExp(uc.source);X("ClearURLs","clearURLs");Ur=u({name:"ClearURLs",description:"Removes tracking garbage from URLs",authors:[p.adryd],dependencies:["MessageEventsAPI"],escapeRegExp(e){return e&&Jm.test(e)?e.replace(uc,"\\$&"):e||""},createRules(){let e=dc;this.universalRules=new Set,this.rulesByHost=new Map,this.hostRules=new Map;for(let t of e){let n=t.split("@"),r=new RegExp("^"+this.escapeRegExp(n[0]).replace(/\\\*/,".+?")+"$");if(!n[1]){this.universalRules.add(r);continue}let s=new RegExp("^(www\\.)?"+this.escapeRegExp(n[1]).replace(/\\\./,"\\.").replace(/^\\\*\\\./,"(.+?\\.)?").replace(/\\\*/,".+?")+"$"),a=s.toString();this.hostRules.set(a,s),this.rulesByHost.get(a)==null&&this.rulesByHost.set(a,new Set),this.rulesByHost.get(a).add(r)}},removeParam(e,t,n){(t===e||e instanceof RegExp&&e.test(t))&&n.delete(t)},replacer(e){try{var t=new URL(e)}catch{return e}return t.searchParams.entries().next().done?e:(this.universalRules.forEach(n=>{t.searchParams.forEach((r,s,a)=>{this.removeParam(n,s,a)})}),this.hostRules.forEach((n,r)=>{!n.test(t.hostname)||this.rulesByHost.get(r).forEach(s=>{t.searchParams.forEach((a,c,f)=>{this.removeParam(s,c,f)})})}),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=$e((e,t)=>this.onSend(t)),this.preEdit=Pt((e,t,n)=>this.onSend(n))},stop(){Ue(this.preSend),kt(this.preEdit)}})});var Hr,jr,gc=m(()=>{"use strict";i();x();T();Hr=e=>()=>{throw new Error(`'${e}'isDiscordDesktoponly.`)},jr=u({name:"ConsoleShortcuts",description:"Adds shorter Aliases for many things on the window. Run `shortcutList` for a list.",authors:[p.Ven],getShortcuts(){return{toClip:Hr("toClip"),fromClip:Hr("fromClip"),wp:Vencord.Webpack,wpc:Vencord.Webpack.wreq.c,wreq:Vencord.Webpack.wreq,wpsearch:Vencord.Webpack.search,wpex:Vencord.Webpack.extract,wpexs:e=>Vencord.Webpack.extract(Vencord.Webpack.findModuleId(e)),findByProps:Vencord.Webpack.findByProps,find:Vencord.Webpack.find,Plugins:Vencord.Plugins,React:Vencord.Webpack.Common.Re
${Gn(c)}`,author:{username:"Vencord"}})};try{let s=e.execute(t,n);return s instanceof Promise?s.catch(r):s}catch(s){return r(s)}}});var bc,Yr,Sc=m(()=>{"use strict";i();be();Kn();mn();x();T();L();bc=0,Yr=u({name:"CorruptMp4s",description:"Create corrupt mp4s with extremely high or negative duration",authors:[p.Ven],dependencies:["CommandsAPI"],commands:[{name:"corrupt",description:"Create a corrupt mp4 with extremely high or negative duration",inputType:0,options:[{name:"mp4",description:"the video to corrupt",type:11,required:!0},{name:"kind",description:"the kind of corruption",type:3,choices:[{name:"infinite",value:"infinite",label:"Very high duration"},{name:"negative",value:"negative",label:"Negative duration"}]}],execute:async(e,t)=>{let s=_e("getUploads").getUploads(t.channel.id,bc)[0]?.item?.file;if(s?.type!=="video/mp4")return void U(t.channel.id,{content:"Please upload a mp4 file"});let a=ce(e,"kind","infinite"),c=new Uint8Array(await s.arrayBuffer()),f=!1;for(let g=0;g<c.length;g++)if(c[g]===109&&c[g+1]===118&&c[g+2]===104&&c[g+3]===100){let w=g+18;c[w++]=0,c[w++]=1,c[w++]=a==="negative"?255:127,c[w++]=255,c[w++]=255,c[w++]=a==="negative"?240:255,f=!0;break}if(!f)return void U(t.channel.id,{content:"Could not find signature. Is this even a mp4?"});let d=s.name.replace(/\.mp4$/i,".corrupt.mp4"),v=xe("UPLOAD_FILE_LIMIT_ERROR"),h=new File([c],d,{type:"video/mp4"});setImmediate(()=>v([h],t.channel,bc))}}]})});var Qr,xc=m(()=>{"use strict";i();be();mn();x();T();Qr=u({name:"UrbanDictionary",description:"Searches for a word on Urban Dictionary",authors:[p.jewdev],dependencies:["CommandsAPI"],commands:[{name:"urban",description:"Returns the definition of a word from Urban Dictionary",inputType:0,options:[{type:3,name:"word",description:"The word to search for on Urban Dictionary",required:!0}],execute:async(e,t)=>{try{let{list:[n]}=await(await fetch(`https://api.urbandictionary.com/v0/define?term=${e[0].value}`)).json();if(!n)return void U(t.channel.id,{content:"No results found."});let r=s=>s.replace(/\[(.+?)\]/g,(a,c)=>`[${c}](https://www.urbandictionary.com/define.php?term=${encodeURIComponent(c)})`);return void U(t.channel.id,{embeds:[{type:"rich",author:{name:`Definition of ${n.word}`,url:n.permalink},description:r(n.definition),fields:[{name:"Example",value:r(n.example)}],color:16750848,footer:{text:`\u{1F44D} ${n.thumbs_up.toString()} | \u{1F44E} ${n.thumbs_down.toString()} | Uploaded by ${n.author}`,icon_url:"https://www.urbandictionary.com/favicon.ico"},timestamp:new Date(n.written_on).toISOString()}]})}catch(n){return void U(t.channel.id,{content:`Something went wrong: \`${n}\``})}}}]})});var Jr,Tc=m(()=>{"use strict";i();T();Jr=u({name:"discord-screenaudio",authors:[{name:"maltejur",id:205966226709676032n}],required:!0,description:"UI patches for discord-screenaudio.",patches:[]})});function Xr({value:e,onChange:t,validate:n}){let[r,s]=b.useState(e),[a,c]=b.useState();function f(d){s(d);let v=n(d);v===!0?(c(void 0),t(d)):c(v)}return o(l,null,o(Le,{type:"text",value:r,onChange:f,error:a}))}var Zr=m(()=>{"use strict";i();k()});function ru(e){let t=G.getCurrentUser().id;return Object.values(qe.getGuilds()).filter(n=>{if(!(n.ownerId===t||BigInt(jo.getGuildPermissions({id:n.id})&wc)===wc))return!1;let s=n.getMaxEmojiSlots(),{emojis:a}=nu.getGuilds()[n.id],c=0;for(let f of a)f.animated===e&&c++;return c<s}).sort((n,r)=>n.name.localeCompare(r.name))}async function iu(e,t,n,r){let s=await fetch(`https://cdn.discordapp.com/emojis/${t}.${r?"gif":"png"}`).then(c=>c.blob()),a=new FileReader;a.onload=()=>{ou({guildId:e,name:n,image:a.result}).then(()=>{A.show({message:`Successfully cloned ${n}!`,type:A.Type.SUCCESS,id:A.genId()})}).catch(c=>{new N("EmoteCloner").error("Failed to upload emoji",c),A.show({message:"Oopsie something went wrong :( Check console!!!",type:A.Type.FAILURE,id:A.genId()})})},a.readAsDataURL(s)}function cu({id:e,name:t,isAnimated:n}){let[r,s]=b.useState(!1),[a,c]=b.useState(t),[f,d]=b.useReducer(h=>h+1,0),v=b.useMemo(()=>ru(n),[n,f]);return o(l,null,o(y.FormTitle,{className:V.marginTop20},"Custom
`.trim().replace(/\s+/g," ")})}},{name:"view friend invites",description:"View a list of all generated friend invites.",inputType:3,execute:async(e,t)=>{let s=(await _e("createFriendInvite").getAllFriendInvites()).map(a=>`_discord.gg/${a.code}_
/* 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 qc();t.delete(e)||t.add(e),await Mu(t),await this.buildCss(),I.dispatch({type:"MESSAGE_UPDATE",message:{id:e}})}})});var ui,Qc=m(()=>{"use strict";i();x();T();ui=u({name:"iLoveSpam",description:"Do not hide messages from 'likely spammers'",authors:[p.botato,p.Animal],patches:[{find:"),{hasFlag:",replacement:{match:/(if\((.{1,2})<=1<<30\)return)/,replace:"if($2===(1<<20)){return false};$1"}}]})});var fi,Se,gi,Jc=m(()=>{"use strict";i();$t();x();T();L();fi=M("IgnoreActivities_reRenderGames"),Se=[],gi=u({name:"IgnoreActivities",authors:[p.Nuckyz],description:"Ignore certain activities (like games) from showing up on your status. You can configure which ones are ignored from the Registered Games tab.",patches:[{find:".Messages.SETTINGS_GAMES_OVERLAY_ON",replacement:[{match:/;(.\.renderOverlayToggle=function\(\).+?\)};)/,replace:(e,t)=>{let n=[{match:/,.{1,2}=.{1,2}\.overlayWarn/,replace:""},{match:/,.{1,2}=.{1,2}\?\(0,.{1,2}\.jsx\)\(.{1,20}Messages\.SETTINGS_GAMES_OVERLAY_WARNING.{1,100}null/,replace:""},{match:/,.{1,2}=.{1,2}\?.{1,50}Messages\.SETTINGS_GAMES_OVERLAY_OFF/,replace:""},{match:/[^[]{1,2},\(0,.{1,2}\.jsx\)\("div".{1,20}\(\)\.overlayStatusText.+}\),/,replace:""},{match:/renderOverlayToggle/,replace:"renderIgnoreActivitiesToggle"},{match:/((.)=this\.props\.game)(.{1,70})=.{1,2}overlay/,replace:"$1,IgnoreActivities_gameProps=$2$3=Vencord.Plugins.plugins.IgnoreActivities.isActivityEnabled(IgnoreActivities_gameProps)"},{match:/.\.handleOverlayToggle/,replace:"() => Vencord.Plugins.plugins.IgnoreActivities.handleActivityToggle(IgnoreActivities_gameProps)"},{match:/(\(0,.{1,2}\.jsx\)\()(.{2})\..(.{1,50}\.overlayToggleIconOn)/,replace:"$1$2.IgnoreActivities_toggleOn$3"},{match:/(\(0,.{1,2}\.jsx\)\()(.{2})\..{1}(.{1,50}\.overlayToggleIconOff)/,replace:"$1$2.IgnoreActivities_toggleOff$3"},{match:/text:.{2}\..\.Messages\.SETTINGS_GAMES_TOGGLE_OVERLAY/,replace:'text:"Toggle activity"'},{match:/"aria-label":.{2}\..\.Messages\.SETTINGS_GAMES_TOGGLE_OVERLAY/,replace:'"aria-label":"Toggle activity"'}].reduce((r,{match:s,replace:a})=>r.replace(s,a),t);return`;${t}${n}`}},{match:/(this.renderLastPlayed\(\)]}\),this.renderOverlayToggle\(\))/,replace:"$1,this.renderIgnoreActivitiesToggle()"}]},{find:'.displayName="RunningGameStore"',replacement:{match:/(.:\(\)=>.{2})(.+function (.{2})\(\){.+\.dispatch\({type:"RUNNING_GAMES_CHANGE")/,replace:"$1,IgnoreActivities_reRenderGames:()=>$3$2"}},{find:"M8.67872 19H11V21H7V23H17V21H13V19H20C21.103 19 22 18.104 22 17V6C22 5.89841 21.9924 5.79857 21.9777 5.70101L20 7.67872V15H12.6787L8.67872 19ZM13.1496 6H4V15H4.14961L2.00515 17.1445C2.00174 17.0967 2 17.0486 2 17V6C2 4.897 2.897 4 4 4H15.1496L13.1496 6Z",replacement:{match:/(.:\(\)=>.)(.+)(function (.)\(.{1,10}\.width.+\)\)})/s,replace:(e,t,n,r)=>{let s=[{match:/function ./,replace:"function IgnoreActivities_toggleOffToExport"},{match:/M8.67872 19H11V21H7V23H17V21H13V19H20C21.103 19 22 18.104 22 17V6C22 5.89841 21.9924 5.79857 21.9777 5.70101L20 7.67872V15H12.6787L8.67872 19ZM13.1496 6H4V15H4.14961L2.00515 17.1445C2.00174 17.0967 2 17.0486 2 17V6C2 4.897 2.897 4 4 4H15.1496L13.1496 6Z/,replace:"M 16 8 C 7.664063 8 1.25 15.34375 1.25 15.34375 L 0.65625 16 L 1.25 16.65625 C 1.25 16.65625 7.097656 23.324219 14.875 23.9375 C 15.246094 23.984375 15.617188 24 16 24 C 16.382813 24 16.753906 23.984375 17.125 23.9375 C 24.902344 23.324219 30.75 16.65625 30.75 16.65625 L 31.34375 16 L 30.75 15.34375 C 30.75 15.34375 24.335938 8 16 8 Z M 16 10 C 18.203125 10 20.234375 10.601563 22 11.40625 C 22.636719 12.460938 23 13.675781 23 15 C 23 18.613281 20.289063 21.582031 16.78125 21.96875 C 16.761719 21.972656 16.738281 21.964844 16.71875 21.96875 C 16.480469 21.980469 16.242188 22 16 22 C 15.734375 22 15.476563 21.984375 15.21875 21.96875 C 11.710938 21.582031 9 18.613281 9 15 C 9 13.695313 9.351563 12.480469 9.96875 11.4375 L 9.9375 11.4375 C 11.71875 10.617188 13.773438 10 16 10 Z M 16 12 C 14.34375 12 13 13.34375 13 15 C 13 16.65625 14.34375 18 16 18 C 17.65625 18 19 16.65625 19 15 C 19 13.34375 17.65625 12 16 12
.messagelogger-red-overlay.messageLogger-deleted{
background-color:rgba(240,71,71,0.15);
}
.messagelogger-red-text.messageLogger-deleteddiv{
color:#f04747;
}
.messageLogger-deleted[class^="buttons"]{
display:none;
}
.messageLogger-deleted-attachment{
filter:grayscale(1);
}
.messageLogger-deleted-attachment:hover{
filter:grayscale(0);
transition:250msfilterlinear;
}
.theme-dark.messageLogger-edited{
filter:brightness(80%);
}
.theme-light.messageLogger-edited{
opacity:0.5;
}
`,start(){this.moment=M("relativeTimeRounding","relativeTimeThreshold"),this.timestampModule=M("messageLogger_TimestampComponent");let e=this.style=document.createElement("style");e.textContent=this.css,e.id="MessageLogger-css",document.head.appendChild(e),sl()},stop(){this.style?.remove(),document.querySelectorAll(".messageLogger-deleted").forEach(e=>e.remove()),document.querySelectorAll(".messageLogger-edited").forEach(e=>e.remove()),document.body.classList.remove("messagelogger-red-overlay"),document.body.classList.remove("messagelogger-red-text")},renderEdit(e){let t=this.timestampModule.messageLogger_TimestampComponent;return o(D,{noop:!0},o("div",{className:"messageLogger-edited"},Ke.parse(e.content),o(t,{timestamp:e.timestamp,isEdited:!0,isInline:!1},o("span",null," ","(edited)"))))},makeEdit(e,t){return{timestamp:this.moment?.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:()=>sl()},ignoreBots:{type:3,description:"Whether to ignore messages by bots",default:!1},ignoreSelf:{type:3,description:"Whether to ignore messages by yourself",default:!1}},handleDelete(e,t,n){try{let f=function(d){let v=e.get(d);if(!v)return;let h=64;(v.flags&h)===h||s&&v.author?.bot||a&&v.author?.id===c?e=e.remove(d):e=e.update(d,w=>w.set("deleted",!0).set("attachments",w.attachments.map(P=>(P.deleted=!0,P))))};var r=f;if(e==null||!n&&!e.has(t.id))return e;let{ignoreBots:s,ignoreSelf:a}=S.plugins.MessageLogger,c=G.getCurrentUser().id;n?t.ids.forEach(f):f(t.id)}catch(s){new N("MessageLogger").error("Error during handleDelete",s)}return e},patches:[{find:'displayName="MessageStore"',replacement:[{match:/MESSAGE_DELETE:function\((\w)\){var .+?((?:\w{1,2}\.){2})getOrCreate.+?},/,replace:"MESSAGE_DELETE:function($1){ var cache = $2getOrCreate($1.channelId); cache = Vencord.Plugins.plugins.MessageLogger.handleDelete(cache, $1, false); $2commit(cache);},"},{match:/MESSAGE_DELETE_BULK:function\((\w)\){var .+?((?:\w{1,2}\.){2})getOrCreate.+?},/,replace:"MESSAGE_DELETE_BULK:function($1){ var cache = $2getOrCreate($1.channelId); cache = Vencord.Plugins.plugins.MessageLogger.handleDelete(cache, $1, true); $2commit(cache);},"},{match:/(MESSAGE_UPDATE:function\((\w)\).+?)\.update\((\w)/,replace:"$1.update($3,m => $2.message.content !== m.editHistory?.[0]?.content && $2.message.content !== m.content ? m.set('editHistory',[...(m.editHistory || []), Vencord.Plugins.plugins.MessageLogger.makeEdit($2.message, m)]) : m).update($3"}]},{find:"isFirstMessageInForumPost=function",replacement:[{match:/(\w)\.customRenderedContent=(\w)\.customRenderedContent;/,replace:"$1.customRenderedContent = $2.customRenderedContent;$1.deleted = $2.deleted || false;$1.editHistory = $2.editHistory || [];"}]},{find:"THREAD_STARTER_MESSAGE?null===",replacement:[{match:/interactionData:(\w)\.interactionData/,replace:"interactionData:$1.interactionData,deleted:$1.deleted,editHistory:$1.editHistory,attachments:$1.attachments"},{match:/attachments:(\w{1,2})\((\w)\)/,replace:"attachments: $1((() => { let old = arguments[1]?.attachments; if (!old) return $2; let new_ = $2.attachments?.map(a => a.id) ?? []; let diff = old.filter(a => !new_.includes(a.id)); old.forEach(a => a.deleted = true); $2.attachments = [...diff, ...$2.attachments]; return $2;})()),deleted: arguments[1]?.deleted,editHistory: arguments[1]?.editHistory"},{match:/(\((\w)\){return null==\2\.attachments.+?)spoiler:/,replace:"$1deleted: arguments[0]?.deleted,spoiler:"}]},{find:'["className","attachment","inlineMedia"]',replacement:[{match:/((\w)\.className,\w=\2\.attachment),/,replace:"$1,deleted=$2.attachment?.deleted,"},{match:/(hiddenSpoilers:\w,className:)/,replace:"$1 (deleted ? 'messageLogger-deleted-attachment ' : '') +"}]},{find:"Message must not be a thread starter message",replacement:[{match:/var (\w)=(\w).id,(?=\w=\w.message)/,replace:"var $1=$2.id,deleted=$2.message.deleted,"},{match:/
`)}):(U(n.channel.id,{author:Xe,content:`${ft}Thetag**${e.name}**doesnotexistanymore!PleasereloadurDiscordtofix:)`}),{content:`/${e.name}`}),[Eu]:!0},"CustomTags")}var ft,to,Eu,Xe,eo,Vn,Fu,Du,Ci,ll=m(()=>{"use strict";i();be();$t();R();x();T();ft="<:luna:1035316192220553236>",to="MessageTags_TAGS",Eu=Symbol("MessageTags"),Xe={id:"821472922140803112",bot:!1},eo=()=>Je(to).then(e=>e??[]),Vn=e=>Je(to).then(t=>(t??[]).find(n=>n.name===e)??null),Fu=async e=>{let t=await eo();return t.push(e),Re(to,t),t},Du=async e=>{let t=await eo();return t=await t.filter(n=>n.name!==e),Re(to,t),t};Ci=u({name:"MessageTags",description:"Allows you to save messages and to use them with a simple command.",authors:[p.Luna],options:{clyde:{name:"Clyde message on send",description:"If enabled, clyde will send you an ephemeral message when a tag was used.",type:3,default:!0}},dependencies:["CommandsAPI"],async start(){for(let e of await eo())cl(e)},commands:[{name:"tags",description:"Manage all the tags for yourself",inputType:0,options:[{name:"create",description:"Create a new tag",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0},{name:"message",description:"The message that you will send when using this tag",type:3,required:!0}]},{name:"list",description:"List all tags from yourself",type:1,options:[]},{name:"delete",description:"Remove a tag from your yourself",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0}]},{name:"preview",description:"Preview a tag without sending it publicly",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0}]}],async execute(e,t){switch(e[0].name){case"create":{let n=ce(e[0].options,"tag-name",""),r=ce(e[0].options,"message","");if(await Vn(n))return U(t.channel.id,{author:Xe,content:`${ft}ATagwiththename**${n}**alreadyexists!`});let s={name:n,enabled:!0,message:r};cl(s),await Fu(s),U(t.channel.id,{author:Xe,content:`${ft}Successfullycreatedthetag**${n}**!`});break}case"delete":{let n=ce(e[0].options,"tag-name","");if(!await Vn(n))return U(t.channel.id,{author:Xe,content:`${ft}ATagwiththename**${n}**doesnotexist!`});un(n),await Du(n),U(t.channel.id,{author:Xe,content:`${ft}Successfullydeletedthetag**${n}**!`});break}case"list":{U(t.channel.id,{author:Xe,embeds:[{title:"All Tags:",description:(await eo()).map(n=>`\`${n.name}\`: ${n.message.slice(0,72).replaceAll("\\n"," ")}${n.message.length>72?"...":""}`).join(`
`)||`${ft}Woops!Therearenotagsyet,use\`/tags create\` to create one!`,color:14122879,type:"rich"}]});break}case"preview":{letn=ce(e[0].options,"tag-name",""),r=awaitVn(n);if(!r)returnU(t.channel.id,{author:Xe,content:`${ft} A Tag with the name **${n}** does not exist!`});U(t.channel.id,{author:Xe,content:r.message.replaceAll("\\n",`
`)});break}}return U(t.channel.id,{author:Xe,content:"Invalid sub-command"})}}]})});function Nu(e){let t="";for(let n=0;n<e.length;n++)t+=n%2?e[n].toUpperCase():e[n].toLowerCase();return t}var Ai,pl=m(()=>{"use strict";i();be();x();T();Ai=u({name:"MoreCommands",description:"echo, lenny, mock",authors:[p.Arjix,p.echo,p.Samu],dependencies:["CommandsAPI"],commands:[{name:"echo",description:"Sends a message as Clyde (locally)",options:[ut],inputType:3,execute:(e,t)=>{let n=ce(e,"message","");U(t.channel.id,{content:n})}},{name:"lenny",description:"Sends a lenny face",options:[ut],execute:e=>({content:ce(e,"message","")+" ( \u0361\xB0 \u035C\u0296 \u0361\xB0)"})},{name:"mock",description:"mOcK PeOpLe",options:[It],execute:e=>({content:Nu(ce(e,"message",""))})}]})});var _i,dl=m(()=>{"use strict";i();be();R();x();T();X("MoreKaomoji","moarKaomojis");_i=u({name:"MoreKaomoji",description:"Adds more Kaomoji to discord. \u30FD(\xB4\u25BD`)/",authors:[p.JacobTm],dependencies:["CommandsAPI"],commands:[{name:"dissatisfaction",description:"\uFF1E\uFE4F\uFF1C"},{name:"smug",description:"\u0CA0_\u0CA0"},{name:"happy",description:"\u30FD(\xB4\u25BD`)/"},{name:"crying",description:" \u0CA5_\u0CA5"},{name:"angry",description:" \u30FD(\uFF40\u0414\xB4)\uFF89"},{name:"anger",description:" \u30FD(\uFF4F`\u76BF\u2032\uFF4F)\uFF89"},{name:"joy",description:"<(\uFFE3\uFE36\uFFE3)>"}].map(e=>({...e,options:[ut],execute:t=>({content:ce(t,"message","")+e.description})}))})});function Bu(e,t){let n=0,r=0;for(;(r=e.indexOf(t,r)+1)!==0;)n++;return n}function $u(e,t){if(!t.global)throw new Error("patternmustbeglobal");let n=0;for(;t.test(e);)n++;return n}function Hu(e){let t=Bu(e,Ei)+$u(e,Uu);return Math.min(t,10)}function Li(){if(!S.plugins.Moyai.triggerWhenUnfocused&&!document.hasFocus())return;let e=document.createElement("audio");e.src=Ou,e.volume=S.plugins.Moyai.volume,e.play()}var Ei,Ou,Fi,Uu,ml=m(()=>{"usestrict";i();R();Jn();x();O();T();k();Ei="\u{1F5FF}",Ou="https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai.mp3",Fi=u({name:"Moyai",authors:[p.Megu,p.Nuckyz],description:"\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}",async onMessage(e){if(e.optimistic||e.type!=="MESSAGE_CREATE"||e.message.state==="SENDING"||S.plugins.Moyai.ignoreBots&&e.message.author?.bot||!e.message.content||e.channelId!==pe.getChannelId())return;let t=Hu(e.message.content);for(let n=0;n<t;n++)Li(),await Vt(300)},onReaction(e){if(e.optimistic||e.type!=="MESSAGE_REACTION_ADD"||S.plugins.Moyai.ignoreBots&&G.getUser(e.userId)?.bot||e.channelId!==pe.getChannelId())return;let t=e.emoji.name.toLowerCase();t!==Ei&&!t.includes("moyai")&&!t.includes("moai")||Li()},onVoiceChannelEffect(e){if(!e.emoji?.name)return;let t=e.emoji.name.toLowerCase();t!==Ei&&!t.includes("moyai")&&!t.includes("moai")||Li()},start(){I.subscribe("MESSAGE_CREATE",this.onMessage),I.subscribe("MESSAGE_REACTION_ADD",this.onReaction),I.subscribe("VOICE_CHANNEL_EFFECT_SEND",this.onVoiceChannelEffect)},stop(){I.unsubscribe("MESSAGE_CREATE",this.onMessage),I.unsubscribe("MESSAGE_REACTION_ADD",this.onReaction),I.unsubscribe("VOICE_CHANNEL_EFFECT_SEND",this.onVoiceChannelEffect)},options:{volume:{description:"Volume of the \u{1F5FF}\u{1F5FF}\u{1F5FF}",type:5,markers:Ot(0,1,.1),default:.5,stickToMarkers:!1},triggerWhenUnfocused:{description:"Trigger the \u{1F5FF} even when the window is unfocused",type:3,default:!0,restartNeeded:!1},ignoreBots:{description:"Ignore bots",type:3,default:!0,restartNeeded:!1}}});Uu=/<a?:\w*moy?ai\w*:\d{17,20}>/gi});var Di,ul=m(()=>{"use strict";i();x();T();Di=u({name:"MuteNewGuild",description:"Mutes newly joined guilds",authors:[p.Glitch],patches:[{find:",acceptInvite:function",replacement:{match:/(\w=null!==[^;]+)/,replace:"$1;Vencord.Webpack.findByProps('updateGuildNotificationSettings').updateGuildNotificationSettings($1,{'muted':true,'suppress_everyone':true,'suppress_roles':true})"}}]})});var ju,Ni,fl=m(()=>{"use strict";i();R();x();T();L();ju=M("getRelationships","isBlocked"),Ni=u({name:"NoBlockedMessages",descriptio
`,a),"Failed to fetch user. Check the console for more info."}}return null}var Pl,Gu,zu,no,Wu,qu,Ku,Yu,qi,Il=m(()=>{"use strict";i();be();x();Qn();O();T();L();Pl=0,Gu=20,zu=128,no=10,Wu=Fe(()=>Promise.all(Array.from({length:no},(e,t)=>kl(`https://raw.githubusercontent.com/VenPlugs/petpet/main/frames/pet${t}.gif`)))),qu=re(".USER("),Ku=re("UPLOAD_FILE_LIMIT_ERROR"),Yu=M("getUploads");qi=u({name:"petpet",description:"headpet a cutie",authors:[p.Ven],dependencies:["CommandsAPI"],commands:[{inputType:0,name:"petpet",description:"Create a petpet gif. You can only specify one of the image options",options:[{name:"delay",description:"The delay between each frame. Defaults to 20.",type:4},{name:"resolution",description:"Resolution for the gif. Defaults to 120. If you enter an insane number and it freezes Discord that's your fault.",type:4},{name:"image",description:"Image attachment to use",type:11},{name:"url",description:"URL to fetch image from",type:3},{name:"user",description:"User whose avatar to use as image",type:6},{name:"no-server-pfp",description:"Use the normal avatar instead of the server specific one when using the 'user' option",type:5}],execute:async(e,t)=>{let{GIFEncoder:n,quantize:r,applyPalette:s}=await Yn(),a=await Wu(),c=ce(e,"no-server-pfp",!1);try{var f=await Qu(e,t,c);if(!f)throw"No Image specified!"}catch(_){U(t.channel.id,{content:String(_)});return}let d=await kl(f),v=ce(e,"delay",Gu),h=ce(e,"resolution",zu),g=new n,w=document.createElement("canvas");w.width=w.height=h;let P=w.getContext("2d");for(let _=0;_<no;_++){P.clearRect(0,0,w.width,w.height);let oe=_<no/2?_:no-_,C=.8+oe*.02,q=.8-oe*.05,se=(1-C)*.5+.1,de=1-q-.08;P.drawImage(d,se*h,de*h,C*h,q*h),P.drawImage(a[_],0,0,h,h);let{data:Ie}=P.getImageData(0,0,h,h),ge=r(Ie,256),Ge=s(Ie,ge);g.writeFrame(Ge,h,h,{transparent:!0,palette:ge,delay:v})}g.finish();let B=new File([g.bytesView()],"petpet.gif",{type:"image/gif"});setImmediate(()=>Ku([B],t.channel,Pl))}}]})});var Ki,Ml=m(()=>{"use strict";i();x();T();Ki=u({name:"PlainFolderIcon",description:"Doesn't show the small guild icons in folders",authors:[p.botato],patches:[{find:"().expandedFolderIconWrapper",replacement:[{match:/\(\w\|\|\w\)&&(\(.{0,40}\(.{1,3}\.animated)/,replace:"$1"}]}]})});function oo(e,t="0 0 24 24"){return({color:n,tooltip:r})=>o(me,{text:r},s=>o("svg",{...s,height:"18",width:"18",viewBox:t,fill:n},o("path",{d:e})))}var Rl,Ju,Xu,Zu,Yi,Cl=m(()=>{"use strict";i();R();ne();x();T();L();k();Rl={desktop:oo("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:oo("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:oo("M15.5 1h-8A2.5 2.5 0 0 0 5 3.5v17A2.5 2.5 0 0 0 7.5 23h8a2.5 2.5 0 0 0 2.5-2.5v-17A2.5 2.5 0 0 0 15.5 1zm-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm4.5-4H7V4h9v14z"),console:oo("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","0 0 50 50")},Ju=re("STATUS_YELLOW","TWITCH","STATUS_GREY"),Xu=({platform:e,status:t})=>{let n=e[0].toUpperCase()+e.slice(1),r=Rl[e]??Rl.desktop;return o(r,{color:`var(--${Ju(t)}`,tooltip:n})},Zu=({user:e})=>{if(!e||e.bot)return null;let t=Xt.getState()?.clientStatuses?.[e.id];if(!t)return null;let n=Object.entries(t).map(([r,s])=>o(Xu,{key:r,platform:r,status:s}));return n.length?o("div",{className:"vc-platform-indicator",style:{display:"flex",alignItems:"center",marginLeft:"4px",gap:"4px"}},n):null},Yi=u({name:"PlatformIndicators",description:"Adds platform indicators (Desktop, Mobile, Web...) to users",authors:[p.kemo],patches:[{find:"this.renderPremium()",predi
`});async function bf(e){try{var t=JSON.parse(e)}catch(n){throw console.log(e),new Error("Failed to parse JSON: "+String(n))}if("settings"in t&&"quickCss"in t)await VencordNative.ipc.invoke(j.SET_SETTINGS,JSON.stringify(t.settings,null,4)),await VencordNative.ipc.invoke(j.SET_QUICK_CSS,t.quickCss);else throw new Error("Invalid Settings. Is this even a Vencord Settings file?")}async function Sf(){let e=JSON.parse(VencordNative.ipc.sendSync(j.GET_SETTINGS)),t=await VencordNative.ipc.invoke(j.GET_QUICK_CSS);return JSON.stringify({settings:e,quickCss:t},null,4)}async function mp(){let e="vencord-settings-backup.json",t=await Sf(),n=new TextEncoder().encode(t);{let r=new File([n],e,{type:"application/json"}),s=document.createElement("a");s.href=URL.createObjectURL(r),s.download=e,document.body.appendChild(s),s.click(),setImmediate(()=>{URL.revokeObjectURL(s.href),document.body.removeChild(s)})}}async function up(e=!0){if(!0){let t=document.createElement("input");t.type="file",t.style.display="none",t.accept="application/json",t.onchange=async()=>{let n=t.files?.[0];if(!n)return;let r=new FileReader;r.onload=async()=>{try{await bf(r.result),e&&xf()}catch(s){new N("SettingsSync").error(s),e&&Tf(s)}},r.readAsText(n)},document.body.appendChild(t),t.click(),setImmediate(()=>document.body.removeChild(t))}else if(t)try{}catch(n){}}var xf,Tf,fp=m(()=>{"use strict";i();k();ze();le();xf=()=>A.show({type:A.Type.SUCCESS,message:"Settings successfully imported. Restart to apply changes!",id:A.genId()}),Tf=e=>A.show({type:A.Type.FAILURE,message:`Failedtoimportsettings:${String(e)}`,id:A.genId()})});function wf(){return o(y.FormSection,{title:"Settings Sync"},o(Te,{style:{backgroundColor:"var(--info-warning-background)",borderColor:"var(--info-warning-foreground)",color:"var(--info-warning-text)",padding:"1em",marginBottom:"0.5em"}},o(Z,{flexDirection:"column"},o("strong",null,"Warning"),o("span",null,"Importing a settings file will overwrite your current settings."))),o(Y,{variant:"text-md/normal",className:V.marginBottom8},"You can import and export your Vencord settings as a JSON file. This allows you to easily transfer your settings to another device, or recover your settings after reinstalling Vencord or Discord."),o(Y,{variant:"text-md/normal",className:V.marginBottom8},"Settings Export contains:",o("ul",null,o("li",null,"\u2014 Custom QuickCSS"),o("li",null,"\u2014 Plugin Settings"))),o(Z,null,o(F,{onClick:up,size:F.Sizes.SMALL},"Import Settings"),o(F,{onClick:mp,size:F.Sizes.SMALL},"Export Settings")))}var gp,hp=m(()=>{"use strict";i();ne();Ne();fp();k();gp=D.wrap(wf)});var hs={};ee(hs,{UpdateLogger:()=>yp,changes:()=>xn,checkForUpdates:()=>vp,getRepo:()=>bp,isNewer:()=>fs,isOutdated:()=>Ct,rebuild:()=>yo,update:()=>ho,updateError:()=>gs});async function Ht(e){let t=await e;if(t.ok)return t.value;throw gs=t.error,t.error}async function vp(){return xn=await Ht(VencordNative.ipc.invoke(j.GET_UPDATES)),xn.some(e=>e.hash===Tt)?(fs=!0,Ct=!1):Ct=xn.length>0}async function ho(){if(!Ct)return!0;let e=await Ht(VencordNative.ipc.invoke(j.UPDATE));return e&&(Ct=!1),e}function bp(){return Ht(VencordNative.ipc.invoke(j.GET_REPO))}async function yo(){let e=await Ht(VencordNative.ipc.invoke(j.GET_HASHES));if(!await Ht(VencordNative.ipc.invoke(j.BUILD)))throw new Error("The Build failed. Please try manually building the new update");let t=await Ht(VencordNative.ipc.invoke(j.GET_HASHES));return e["patcher.js"]!==t["patcher.js"]||e["preload.js"]!==t["preload.js"]}var yp,Ct,fs,gs,xn,Tn=m(()=>{"use strict";i();nn();ze();le();yp=new N("Updater","white"),Ct=!1,fs=!1});async function Sp(){Ct&&setImmediate(async()=>{if(confirm("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?"))try{await ho(),await yo(),location.reload()}catch(t){console.error(t),alert("That also failed :( Try updating or reinstalling with the installer!")}})}var ys=m(()=>{"use strict";i();Tn()});var wn,vs=m(()=>{"use strict";i();wn=class{set=new Set;get changeCount(){return this.set.size}get hasChang
`,n),!1}}if(t.commands?.length){ke.info("Registering commands of plugin",t.name);for(let n of t.commands)try{Nt(n,t.name)}catch(r){return ke.error(`Failedtoregistercommand${n.name}
`,n),!1}}if(t.commands?.length){ke.info("Unregistering commands of plugin",t.name);for(let n of t.commands)try{un(n.name)}catch(r){return ke.error(`Failedtounregistercommand${n.name}
`,r),!1}}return!0},e=>`stopPlugin${e.name}`)});function Pp(e){let t=new Rf({username:e.name,id:Gr(),bot:!0});return I.dispatch({type:"USER_UPDATE",user:t}),t}function ws({plugin:e,onRestartNeeded:t,onClose:n,transitionState:r}){let[s,a]=b.useState([]),c=De().plugins[e.name],[f,d]=b.useState({}),[v,h]=b.useState({}),[g,w]=b.useState(null),P=()=>Object.values(v).every(C=>!C);b.useEffect(()=>{(async()=>{for(let C of e.authors.slice(0,6)){let q=C.id?await Zt.fetchUser(`${C.id}`).catch(()=>Pp(C)):Pp(C);a(se=>[...se,q])}})()},[]);async function B(){if(!e.options){n();return}if(e.beforeSave){let q=await Promise.resolve(e.beforeSave(f));if(q!==!0){w(q);return}}let C=!1;for(let[q,se]of Object.entries(f)){let de=e.options[q];c[q]=se,de?.onChange?.(se),de?.restartNeeded&&(C=!0)}C&&t(),n()}function _(){if(!c||!e.options)return o(y.FormText,null,"There are no settings for this plugin.");let C=Object.entries(e.options).map(([q,se])=>{function de(Ge){d(yt=>({...yt,[q]:Ge}))}function Ie(Ge){h(yt=>({...yt,[q]:Ge}))}let ge=Cf[se.type];return o(ge,{id:q,key:q,option:se,onChange:de,onError:Ie,pluginSettings:c})});return o(Z,{flexDirection:"column",style:{gap:12}},C)}function oe(C,q){let se=e.authors.length-q,de=e.authors.length-se,Ie=de+e.authors.length-q;return o(me,{text:e.authors.slice(de,Ie).map(ge=>ge.name).join(", ")},({onMouseEnter:ge,onMouseLeave:Ge})=>o("div",{className:Mf.moreUsers,onMouseEnter:ge,onMouseLeave:Ge},"+",se))}return o(Be,{transitionState:r,size:"medium"},o(nt,null,o(Y,{variant:"heading-md/bold"},e.name)),o(ot,{style:{marginBottom:8,marginTop:8}},o(y.FormSection,null,o(y.FormTitle,{tag:"h3"},"About ",e.name),o(y.FormText,null,e.description),o("div",{style:{marginTop:8,marginBottom:8,width:"fit-content"}},o(If,{users:s,count:e.authors.length,guildId:void 0,renderIcon:!1,max:6,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:oe}))),!!e.settingsAboutComponent&&o("div",{style:{marginBottom:8}},o(y.FormSection,null,o(D,{message:"An error occurred while rendering this plugin's custom InfoComponent"},o(e.settingsAboutComponent,null)))),o(y.FormSection,null,o(y.FormTitle,{tag:"h3"},"Settings"),_())),o(sn,null,o(Z,{flexDirection:"column",style:{width:"100%"}},o(Z,{style:{marginLeft:"auto"}},o(F,{onClick:n,size:F.Sizes.SMALL,color:F.Colors.RED},"Cancel"),o(me,{text:"You must fix all errors before saving",shouldShow:!P()},({onMouseEnter:C,onMouseLeave:q})=>o(F,{size:F.Sizes.SMALL,color:F.Colors.BRAND,onClick:B,onMouseEnter:C,onMouseLeave:q,disabled:!P()},"Save & Close"))),g&&o(Y,{variant:"text-md/semibold",style:{color:"var(--text-danger)"}},"Error while saving: ",g))))}var If,Mf,Rf,Cf,kp=m(()=>{"use strict";i();be();R();ne();Ne();O();Ye();Et();T();L();k();ri();If=Q(()=>xe("defaultRenderUser","showDefaultAvatarsForNullUsers")),Mf=M("moreUsers","emptyUser","avatarContainer","clickableAvatar"),Rf=We(()=>G.getCurrentUser().constructor);Cf={[0]:Bc,[1]:oi,[2]:oi,[3]:Ac,[4]:Dc,[5]:Oc,[6]:Lc}});var Ps,Ip,Mp,Rp,Cp=m(()=>{"use strict";i();Ps={marginTop:16,display:"grid",gridGap:16,gridTemplateColumns:"repeat(auto-fill, minmax(250px, 1fr))"},Ip={backgroundColor:"var(--background-modifier-selected)",color:"var(--interactive-active)",borderRadius:3,cursor:"pointer",display:"block",height:"min-content",padding:10,width:"100%"},Mp={gap:10,height:40,gridTemplateColumns:"1fr 150px",display:"grid"},Rp={height:"24px",width:"24px",padding:"0",background:"transparent",marginRight:8}});function Ef(e){A.show({message:e,type:A.Type.FAILURE,id:A.genId(),options:{position:A.Position.BOTTOM}})}function Ff({plugins:e,...t}){if(e.length===0)return null;let n=e.length===1?"The plugin":"The following plugins require a reload to apply changes:",r=e.length===1?" requires a reload to apply changes.":".";return o(rn,{...t,style:{padding:"1em",display:"grid",gridTemplateColumns:"1fr auto",gap:8,...t.style}},o("span",{style:{margin:"auto 0"}},n," ",o("code",null,e.join(", ")),r),o(F,{look:F.Looks.INVERTED,onClick:()=>location.reload()},"Reload"))}function Lp({plugin:e,disabled:t,onRestartNeeded:n,onMouseEnter:r,onMouseLeave:s}){let c=De().plug
`),className:Nf.textarea,placeholder:"Theme Links",spellCheck:!1,onBlur:n}),o(Bf,{themeLinks:e.themeLinks}))})});var Op=m(()=>{"use strict";i();ne();qn();Ne();ys();wt();O();Tn();k();nn()});function Uf(){let[e,,t]=ve(()=>VencordNative.ipc.invoke(j.GET_SETTINGS_DIR),{fallbackValue:"Loading..."}),n=De(),[r]=b.useState(Math.random()>.5?"https://cdn.discordapp.com/emojis/1026533090627174460.png":"https://media.discordapp.net/stickers/1039992459209490513.png");return o(b.Fragment,null,o(Hf,{image:r}),o(y.FormSection,{title:"Quick Actions"},o(Te,{className:$f("QuickActionCard")},o(F,{onClick:()=>VencordNative.ipc.send(j.OPEN_EXTERNAL,e),size:F.Sizes.SMALL,disabled:e==="Loading..."},"Launch Directory"))),o(y.FormDivider,null),o(y.FormSection,{title:"Settings"},o(y.FormText,{className:V.marginBottom20},'Hint: You can change the position of this settings section in the settings of the "Settings" plugin!'),o(bt,{value:n.useQuickCss,onChange:s=>n.useQuickCss=s,note:"Loads styles from your QuickCss file"},"Use QuickCss"),!1))}function Hf({image:e}){return o(Te,{style:{padding:"1em",display:"flex",flexDirection:"row",marginBottom:"1em",marginTop:"1em"}},o("div",null,o(y.FormTitle,{tag:"h5"},"Support the Project"),o(y.FormText,null,"Please consider supporting the Development of Vencord by donating!"),o(on,{style:{transform:"translateX(-1em)"}})),o("img",{role:"presentation",src:e,alt:"",height:128,style:{marginLeft:"auto",transform:"rotate(10deg)"}}))}var $f,Bp,$p=m(()=>{"use strict";i();R();sr();ne();ze();O();k();$f=e=>`vcSettings${e}`;Bp=D.wrap(Uf)});var Gp={};ee(Gp,{default:()=>Ms});function jf(e){let{tab:t="VencordSettings"}=e,n=Hp[t]?.component;return o(y.FormSection,null,o(Y,{variant:"heading-md/normal",tag:"h2"},"Vencord Settings"),o(xo,{type:xo.Types.TOP,look:xo.Looks.BRAND,className:Up("TabBar"),selectedItem:t,onItemSelect:jn.open},Object.entries(Hp).map(([r,{name:s,component:a}])=>a?o(xo.Item,{id:r,className:Up("TabBarItem"),key:r},s):null)),o(y.FormDivider,null),n&&o(n,null))}function Ms(e){return o(D,null,o(jf,{tab:e.tab}))}var jp,Up,xo,Hp,Rs=m(()=>{"use strict";i();ne();L();k();dp();hp();Fp();Np();Op();$p();jp=document.createElement("style");jp.textContent=pp;document.head.appendChild(jp);Up=e=>`vcSettings${e}`,xo=re('[role="tab"][aria-disabled="false"]'),Hp={VencordSettings:{name:"Vencord",component:()=>o(Bp,null)},VencordPlugins:{name:"Plugins",component:()=>o(Ep,null)},VencordThemes:{name:"Themes",component:()=>o(Dp,null)},VencordUpdater:{name:"Updater"},VencordSettingsSync:{name:"Backup & Restore",component:()=>o(gp,null)}}});var kn,Cs,zp=m(()=>{"use strict";i();R();x();le();O();T();nn();kn=Q(()=>(Rs(),Ao(Gp)).default),Cs=u({name:"Settings",description:"Adds Settings UI and debug info",authors:[p.Ven,p.Megu],required:!0,patches:[{find:"().versionHash",replacement:[{match:/\[\(0,.{1,3}\.jsxs?\)\((.{1,10}),(\{[^{}}]+\{.{0,20}\(\)\.versionHash,.+?\})\)," "/,replace:(e,t,n)=>(n=n.replace(/children:\[.+\]/,""),`${e},Vencord.Plugins.plugins.Settings.makeInfoElements(${t},${n})`)}]},{find:"Messages.ACTIVITY_SETTINGS",replacement:{get match(){switch(S.plugins.Settings.settingsLocation){case"top":return/\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.USER_SETTINGS\}/;case"aboveNitro":return/\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.BILLING_SETTINGS\}/;case"belowNitro":return/\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.APP_SETTINGS\}/;case"aboveActivity":return/\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.ACTIVITY_SETTINGS\}/;case"belowActivity":return/(?<=\{section:(.{1,2})\.ID\.DIVIDER},)\{section:"changelog"/;case"bottom":return/\{section:(.{1,2})\.ID\.CUSTOM,\s*element:.+?}/;default:return new N("Settings").error(new Error("No switch case matched????? Don't mess with the settings, silly")),/(?!a)a/}},replace:(e,t)=>{let n="",r="";return`{section:${t}.ID.HEADER,label:"Vencord"},{section:"VencordSettings",label:"Vencord",element:Vencord.Plugins.plugins.Settings.tabs.vencord},{section:"VencordPlugins",label:"Plugins",element:Vencord.P
`):o(l,null,d.map(({content:v,color:h,fontStyle:g},w)=>o("span",{key:w,style:{color:h,fontStyle:(g??0)&1?"italic":void 0,fontWeight:(g??0)&2?"bold":void 0,textDecoration:(g??0)&4?"underline":void 0}},v))));let c=a.map((f,d)=>o("tr",{key:d},o("td",{style:{color:e.plainColor}},d+1),o("td",null,f)));return o("table",{className:je("table")},...c)}});function wd({langName:e,useDevIcon:t,shikiLang:n}){return e?o("div",{className:je("lang")},t!=="DISABLED"&&n?.devicon&&o("i",{className:`devicon-${n.devicon}${t==="COLOR"?" colored":""}`}),e):o(l,null)}var Pd=m(()=>{"use strict";i();Io();Mn()});var qs,og,kd=m(()=>{"use strict";i();ne();O();ld();k();ko();Ws();dd();js();ud();Mn();Sd();Td();Pd();qs=e=>o(D,null,o(og,{...e})),og=({lang:e,content:t,isPreview:n})=>{let{tryHljs:r,useDevIcon:s,bgOpacity:a}=pd(["tryHljs","useDevIcon","bgOpacity"]),{id:c,theme:f}=nd(),d=e?At(e):null,v=fd({lang:e,tryHljs:r}),[h,g]=cd(!0),[w]=ve(async()=>!d||v||!g?null:await H.tokenizeCode(t,e),{fallbackValue:null,deps:[e,t,c,g]}),P={plainColor:f?.fg||"var(--text-normal)",accentBgColor:f?.colors?.["statusBar.background"]||(v?"#7289da":"#007BC8"),accentFgColor:f?.colors?.["statusBar.foreground"]||"#FFF",backgroundColor:f?.colors?.["editor.background"]||"var(--background-secondary)"},B;e&&(B=v?Jt?.getLanguage?.(e)?.name:d?.name);let _=[je("root")];return B||_.push(je("plain")),n&&_.push(je("preview")),o("pre",{ref:h,className:_.join(" "),style:{backgroundColor:v?P.backgroundColor:`rgba(${md(P.backgroundColor).concat(a/100).join(", ")})`,color:P.plainColor}},o("code",null,o(wd,{langName:B,useDevIcon:s,shikiLang:d}),o(xd,{theme:P,useHljs:v,lang:e,content:t,tokens:w}),!n&&o(bd,{content:t,theme:P})))}});function Mo(e,t){let n=document.createElement("style");n.innerText=e,document.head.appendChild(n),Rn.set(t,n)}function Id(e){return Rn.get(e)?.remove(),Rn.delete(e)}var Rn,Md,Rd=m(()=>{"use strict";i();Rn=new Map;Md=()=>{Rn.forEach(e=>e.remove()),Rn.clear()}});var rg,Cd,Cn,Ks,Ad=m(()=>{"use strict";i();x();O();Kp();T();Qp();Ys();Ws();Gs();kd();Io();Rd();rg=Object.keys(it),Cd="@import url('https://cdn.jsdelivr.net/gh/devicons/devicon@v2.10.1/devicon.min.css');",Cn=()=>S.plugins.ShikiCodeblocks,Ks=u({name:"ShikiCodeblocks",description:"Brings vscode-style codeblocks into Discord, powered by Shiki",authors:[p.Vap],patches:[{find:"codeBlock:{react:function",replacement:{match:/codeBlock:\{react:function\((.),(.),(.)\)\{/,replace:"$&return Vencord.Plugins.plugins.ShikiCodeblocks.renderHighlighter($1,$2,$3);"}}],start:async()=>{Mo(Yp,"MAIN"),Cn().useDevIcon!=="DISABLED"&&Mo(Cd,"DEVICONS"),await H.init(Cn().customTheme||Cn().theme)},stop:()=>{H.destroy(),Md()},options:{theme:{type:4,description:"Default themes",options:rg.map(e=>({label:qp(Wp(e)),value:it[e],default:it[e]===it.DarkPlus})),disabled:()=>!!Cn().customTheme,onChange:H.setTheme},customTheme:{type:0,description:"A link to a custom vscode theme",placeholder:it.MaterialCandy,isValid:e=>{if(!e)return!0;let t=Qo(e);return t?t.pathname.endsWith(".json")?!0:"Must be a json file":"Must be a valid URL"},onChange:e=>H.setTheme(e||Cn().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"?Id("DEVICONS"):Mo(Cd,"DEVICONS")}},bgOpacity:{type:5,description:"Background opacity",markers:[0,20,40,60,80,100],default:100,stickToMarkers:!1}},shiki:H,createHighlighter:qs,renderHighlighter:({lang:e,content:t})=>qs({lang:e,content:t,isPreview:!1})})});var ig,sg,Qs,Js,_d=m(()=>{"use strict";i();R();Ne();x();Ye();T();L();k();ig=1048576n,sg=1024n,Qs=(e,t)=>!0;$(e=>e.can&&e.initialize,e=>({can:Qs}=e));Js=u({name:"ShowHiddenChannels",description:"Show hidden
${r}`})},start(){this.preSend=$e((e,t)=>this.unindentMsg(t)),this.preEdit=Pt((e,t,n)=>this.unindentMsg(n))},stop(){Ue(this.preSend),kt(this.preEdit)}})});var sa,Pg,aa,Kd=m(()=>{"use strict";i();x();T();Pg="https://raw.githubusercontent.com/facebook/react/17.0.2/scripts/error-codes/codes.json",aa=u({name:"ReactErrorDecoder",description:'Replaces "Minifed React Error" with the actual error.',authors:[p.Cyn],patches:[{find:'"https://reactjs.org/docs/error-decoder.html?invariant="',replacement:{match:/(function .\(.\)){(for\(var .="https:\/\/reactjs\.org\/docs\/error-decoder\.html\?invariant="\+.,.=1;.<arguments\.length;.\+\+\).\+="&args\[\]="\+encodeURIComponent\(arguments\[.\]\);return"Minified React error #"\+.\+"; visit "\+.\+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.")}/,replace:(e,t,n)=>`${t}{vardecoded=Vencord.Plugins.plugins.ReactErrorDecoder.decodeError.apply(null,arguments);if(decoded)returndecoded;${n}}`}}],async start(){sa=await fetch(Pg).then(e=>e.json()).catch(e=>console.error(`[ReactErrorDecoder]FailedtofetchReacterrorcodes
`);En.textContent=t}var _t,En,ka=m(()=>{"use strict";i();R();ze();document.addEventListener("DOMContentLoaded",()=>{wa(S.useQuickCss),Zo("useQuickCss",wa),lm(),Zo("themeLinks",lm)})});function nh(){function e(t){try{let n=t[1],{subscriptions:r,listeners:s}=Vencord.Webpack,{patches:a}=Vencord.Plugins;for(let c in n){let f=n[c],d=f.toString().replaceAll(`
`,"");d.startsWith("function(")&&(d="0,"+d);let v=f,h=new Set,g=n[c]=function(w,P,B){try{f(w,P,B)}catch(_){if(f===v)throw _;return Lt.error("Error in patched chunk",_),void v(w,P,B)}if(w.exports===window){Object.defineProperty(B.c,c,{value:B.c[c],enumerable:!1,configurable:!0,writable:!0});return}for(let _ of s)try{_(P)}catch(oe){Lt.error("Error in webpack listener",oe)}for(let[_,oe]of r)try{if(_(P))r.delete(_),oe(P);else if(typeof P=="object"){P.default&&_(P.default)&&(r.delete(_),oe(P.default));for(let C in P)C.length<=3&&P[C]&&_(P[C])&&(r.delete(_),oe(P[C]))}}catch(C){Lt.error("Error while firing callback for webpack chunk",C)}};try{g.toString=()=>f.toString(),g.original=v}catch{}for(let w=0;w<a.length;w++){let P=a[w];if(!(P.predicate&&!P.predicate())&&d.includes(P.find)){h.add(P.plugin);for(let B of P.replacement){let _=f,oe=d;try{let C=d.replace(B.match,B.replace);C===d&&!B.noWarn?Lt.warn(`Patchby${P.plugin}hadnoeffect(Moduleidis${c}):${B.match}`):(d=C,f=(0,eval)(`// Webpack Module ${c} - Patched by ${[...h].join(", ")}
${C}
//# sourceURL=WebpackModule${c}`))}catch(C){Lt.error(`Patch by ${P.plugin} errored (Module id is ${c}): ${B.match}
`,C),d=oe,f=_,h.delete(P.plugin)}}P.all||a.splice(w--,1)}}}}catch(n){Lt.error("Error in handlePush",n)}return e.original.call(window[tt],t)}e.original=window[tt].push,Object.defineProperty(window[tt],"push",{get:()=>e,set:t=>e.original=t,configurable:!0})}var pm,Lt,dm=m(()=>{"use strict";i();x();le();L();Lt=new N("WebpackInterceptor","#8caaee");Object.defineProperty(window,tt,{get:()=>pm,set:e=>{e?.push!==Array.prototype.push&&(Lt.info(`Patching${tt}.push`),Do(e),nh(),delete window[tt],window[tt]=e),pm=e},configurable:!0})});var uC,mm,um=m(()=>{"use strict";i();yn();O();L();k();Zr();ne();uC=gt(function({find:e,setModule:t,setError:n}){let r=Oo(e),s=Object.keys(r),a=s.length;a===0?n("No match. Perhaps that module is lazy loaded?"):a!==1?n("Multiple matches. Please refine your filter"):t([s[0],r[s[0]]])}),mm=null});var fm={};ee(fm,{PatchHelper:()=>mm,PluginSettings:()=>So,VencordSettings:()=>Ms});var gm=m(()=>{"use strict";i();um();Is();Rs()});async function oh(){if(await Eo,Ss(),hm=await Promise.resolve().then(()=>(gm(),fm)),!1)try{}catch(e){}}var hm,Ys=m(()=>{"use strict";i();sm();bo();cm();ka();Tn();L();ka();dm();pn();R();bo();Tn();L();k();oh()});var rh={};ee(rh,{Api:()=>xa,Components:()=>hm,PlainSettings:()=>Oa,Plugins:()=>Ts,QuickCss:()=>Pa,Settings:()=>S,Updater:()=>hs,Util:()=>Ta,Webpack:()=>Bo});i();i();var Dn,wm=new Promise(e=>{setTimeout(()=>{new QWebChannel(qt.webChannelTransport,function(t){Dn=t.objects.webclass,e()})})});async function Ca(){Dn||await wm}window.VencordNative={getVersions:()=>({}),ipc:{send:async(e,...t)=>{await Ca(),Dn.vencordSend(e,t)},sendSync:(e,...t)=>{if(e==="VencordGetSettings")return window.discordScreenaudioVencordSettings||"{}";throw new Error("Synchroneous IPC not implemented")},on(e,t){},off(e,t){},invoke:async(e,...t)=>(await Ca(),e==="VencordSetSettings"&&(window.discordScreenaudioVencordSettings=t[0]),Dn.vencordSend(e,t))}};Ys();return Ao(rh);})();