"use strict";varVencord=(()=>{varXi=Object.create;vartt=Object.defineProperty;varJi=Object.getOwnPropertyDescriptor;varZi=Object.getOwnPropertyNames;vares=Object.getPrototypeOf,ts=Object.prototype.hasOwnProperty;varns=(e=>typeofrequire!="undefined"?require:typeofProxy!="undefined"?newProxy(e,{get:(t,n)=>(typeofrequire!="undefined"?require:t)[n]}):e)(function(e){if(typeofrequire!="undefined")returnrequire.apply(this,arguments);thrownewError('Dynamic require of "'+e+'" is not supported')});vara=(e,t)=>()=>(e&&(t=e(e=0)),t);varD=(e,t)=>{for(varnint)tt(e,n,{get:t[n],enumerable:!0})},Lo=(e,t,n,o)=>{if(t&&typeoft=="object"||typeoft=="function")for(letrofZi(t))!ts.call(e,r)&&r!==n&&tt(e,r,{get:()=>t[r],enumerable:!(o=Ji(t,r))||o.enumerable});returne};varos=(e,t,n)=>(n=e!=null?Xi(es(e)):{},Lo(t||!e||!e.__esModule?tt(n,"default",{value:e,enumerable:!0}):n,e)),rs=e=>Lo(tt({},"__esModule",{value:!0}),e);functionhe(e){lett=te(e);returnnewProxy(ss,{get:(n,o)=>t()[o],set:(n,o,r)=>t()[o]=r,has:(n,o)=>oint(),apply:(n,o,r)=>t().apply(o,r),ownKeys:()=>Reflect.ownKeys(t()),construct:(n,o)=>Reflect.construct(t(),o),deleteProperty:(n,o)=>deletet()[o],defineProperty:(n,o,r)=>!!Object.defineProperty(t(),o,r),getPrototypeOf:()=>Object.getPrototypeOf(t())})}varss,ot=a(()=>{"use strict";O();ss=function(){}});functionMt(e){if(ye!==void0)throw"no.";le=e.push([[Symbol()],{},t=>t]),ye=le.c,e.pop()}functionX(e,t=!0){if(typeofe!="function")thrownewError("Invalid filter. Expected a function got "+typeofe);for(letninye){leto=ye[n];if(!!o?.exports){if(e(o.exports))returno.exports;if(typeofo.exports=="object"){if(o.exports.default&&e(o.exports.default))returnt?o.exports.default:o.exports;for(letrino.exports)if(r.length<=3){leti=o.exports[r];if(i&&e(i))returni}}}}returnnull}functionVo(e,t=!0){if(typeofe!="function")thrownewError("Invalid filter. Expected a function got "+typeofe);letn=[];for(letoinye){letr=ye[o];if(!!r?.exports){if(e(r.exports))n.push(r.exports);elseif(typeofr.exports!="object")continue;if(r.exports.default&&e(r.exports.default))n.push(t?r.exports.default:r.exports);elsefor(letiinr.exports)if(i.length<=3){letl=r.exports[i];l&&e(l)&&n.push(l)}}}returnn}function$o(e,t){letn={};for(letoinle.m)if(le.m[o].toString().includes(e)){leti=le(o);e:for(letlini){letm=i[l];for(letgint)if(t[g](m)){n[g]=m;continuee}}break}returnn}functionNe(e,t){returnhe(()=>$o(e,t))}functionbe(...e){returnX(h.byProps(e))}functionas(...e){returnVo(h.byProps(e))}functioncs(e){returnX(h.byDisplayName(e))}functionk(e,t){if(typeofe=="string")e=h.byProps([e]);elseif(Array.isArray(e))e=h.byProps(e);elseif(typeofe!="function")thrownewError("filter must be a string, string[] or function, got "+typeofe);letn=X(e);if(n)returnvoidt(n);Bo.set(e,t)}functionls(e){It.add(e)}functionds(e){It.delete(e)}functionps(...e){lett={},n=le.m;e:for(letoinn){letr=n[o].original??n[o],i=r.toString();for(letlofe)if(typeofl=="string"&&!i.includes(l)||linstanceofRegExp&&!l.test(i))continuee;t[o]=r}returnt}functionms(e){lett=le.m[e];if(!t)returnnull;letn=`
${n}`}var hs,O=a(()=>{"use strict";A();v();ot();hs=te});function He(){return`-${jo.fromTimestamp(Date.now())}`}function oe(e,t){let n=xs({channelId:e,content:"",embeds:[]});return Es.receiveMessage(e,Pe(t,n)),t}function j(e,t,n){return e.find(o=>o.name===t)?.value||n}var xs,Es,jo,Lt=a(()=>{"use strict";O();A();xs=C(h.byCode('username:"Clyde"')),Es=C(h.byProps(["receiveMessage"]));k("fromTimestamp",e=>jo=e)});var ct,Oe,Ut,Bt=a(()=>{"use strict";ct=(s=>(s[s.SUB_COMMAND=1]="SUB_COMMAND",s[s.SUB_COMMAND_GROUP=2]="SUB_COMMAND_GROUP",s[s.STRING=3]="STRING",s[s.INTEGER=4]="INTEGER",s[s.BOOLEAN=5]="BOOLEAN",s[s.USER=6]="USER",s[s.CHANNEL=7]="CHANNEL",s[s.ROLE=8]="ROLE",s[s.MENTIONABLE=9]="MENTIONABLE",s[s.NUMBER=10]="NUMBER",s[s.ATTACHMENT=11]="ATTACHMENT",s))(ct||{}),Oe=(i=>(i[i.BUILT_IN=0]="BUILT_IN",i[i.BUILT_IN_TEXT=1]="BUILT_IN_TEXT",i[i.BUILT_IN_INTEGRATION=2]="BUILT_IN_INTEGRATION",i[i.BOT=3]="BOT",i[i.PLACEHOLDER=4]="PLACEHOLDER",i))(Oe||{}),Ut=(o=>(o[o.CHAT_INPUT=1]="CHAT_INPUT",o[o.USER=2]="USER",o[o.MESSAGE=3]="MESSAGE",o))(Ut||{})});var jt={};D(jt,{ApplicationCommandInputType:()=>Oe,ApplicationCommandOptionType:()=>ct,ApplicationCommandType:()=>Ut,BUILT_IN:()=>Ce,OptionalMessageOption:()=>Le,RequiredMessageOption:()=>ve,_handleCommand:()=>Ts,_init:()=>Ps,commands:()=>Vt,findOption:()=>j,generateId:()=>He,registerCommand:()=>$t,sendBotMessage:()=>oe,unregisterCommand:()=>Gt});function Ho(e){e.displayName||=e.name,e.displayDescription||=e.description,e.options?.forEach((t,n,o)=>{t===zo?o[n]=Le:t===Wo&&(o[n]=ve),t.choices?.forEach(r=>r.displayName||=r.name),Ho(o[n])})}function $t(e,t){if(!Ce){console.warn("[CommandsAPI]",`Notregistering${e.name}astheCommandsAPIhasn't been initialised.`,"Please restart to use commands");return}if(Ce.some(n=>n.name===e.name))throw new Error(`Command '${e.name}'alreadyexists.`);e.isVencordCommand=!0,e.id??=He(),e.applicationId??="-1",e.type??=1,e.inputType??=1,e.plugin||=t,Ho(e),Vt[e.name]=e,Ce.push(e)}function Gt(e){let t=Ce.findIndex(n=>n.name===e);return t===-1?!1:(Ce.splice(t,1),delete Vt[e],!0)}var Ce,Vt,zo,Wo,Le,ve,Ps,Ts,re=a(()=>{"use strict";O();Lt();Bt();Lt();Bt();Vt={},zo=Symbol("OptionalMessageOption"),Wo=Symbol("RequiredMessageOption"),Le=zo,ve=Wo,Ps=function(e){try{Ce=e,Le=e.find(t=>t.name==="shrug").options[0],ve=e.find(t=>t.name==="me").options[0]}catch{console.error("Failed to load CommandsApi")}return e},Ts=function(e,t,n){if(!e.isVencordCommand)return e.execute(t,n);let o=r=>{let i=`AnErroroccurredwhileexecutingcommand"${e.name}"`,l=r instanceof Error?r.stack||r.message:String(r);console.error(i,r),oe(n.channel.id,{content:`${i}:
${Ot(l)}`,author:{username:"Vencord"}})};try{let r=e.execute(t,n);return r instanceof Promise?r.catch(o):r}catch(r){return o(r)}}});var Ht={};D(Ht,{clear:()=>_s,createStore:()=>Ko,del:()=>Is,delMany:()=>Ms,entries:()=>Ns,get:()=>Cs,getMany:()=>Rs,keys:()=>Fs,promisifyRequest:()=>L,set:()=>vs,setMany:()=>ws,update:()=>ks,values:()=>As});function L(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Ko(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let o=L(n);return(r,i)=>o.then(l=>i(l.transaction(t,r).objectStore(t)))}function z(){return zt||(zt=Ko("VencordData","VencordStore")),zt}function Cs(e,t=z()){return t("readonly",n=>L(n.get(e)))}function vs(e,t,n=z()){return n("readwrite",o=>(o.put(t,e),L(o.transaction)))}function ws(e,t=z()){return t("readwrite",n=>(e.forEach(o=>n.put(o[1],o[0])),L(n.transaction)))}function Rs(e,t=z()){return t("readonly",n=>Promise.all(e.map(o=>L(n.get(o)))))}function ks(e,t,n=z()){return n("readwrite",o=>new Promise((r,i)=>{o.get(e).onsuccess=function(){try{o.put(t(this.result),e),r(L(o.transaction))}catch(l){i(l)}}}))}function Is(e,t=z()){return t("readwrite",n=>(n.delete(e),L(n.transaction)))}function Ms(e,t=z()){return t("readwrite",n=>(e.forEach(o=>n.delete(o)),L(n.transaction)))}function _s(e=z()){return e("readwrite",t=>(t.clear(),L(t.transaction)))}function Wt(e,t){return e.openCursor().onsuccess=function(){!this.result||(t(this.result),this.result.continue())},L(e.transaction)}function Fs(e=z()){return e("readonly",t=>{if(t.getAllKeys)return L(t.getAllKeys());let n=[];return Wt(t,o=>n.push(o.key)).then(()=>n)})}function As(e=z()){return e("readonly",t=>{if(t.getAll)return L(t.getAll());let n=[];return Wt(t,o=>n.push(o.value)).then(()=>n)})}function Ns(e=z()){return e("readonly",t=>{if(t.getAll&&t.getAllKeys)return Promise.all([L(t.getAllKeys()),L(t.getAll())]).then(([o,r])=>o.map((i,l)=>[i,r[l]]));let n=[];return e("readonly",o=>Wt(o,r=>n.push([r.key,r.value])).then(()=>n))})}var zt,qo=a(()=>{"use strict";});var Kt={};D(Kt,{_modifyAccessories:()=>Ls,accessories:()=>lt,addAccessory:()=>Ds,removeAccessory:()=>Os});function Ds(e,t,n){lt.set(e,{callback:t,position:n})}function Os(e){lt.delete(e)}function Ls(e,t){for(let n of lt.values())e.splice(n.position!=null?n.position<0?e.length+n.position:n.position:e.length,0,n.callback(t));return e}var lt,Qo=a(()=>{"use strict";lt=new Map});var U,we=a(()=>{"use strict";U=class{constructor(t,n){this.name=t;this.color=n}_log(t,n,o){console[t](`%cVencord%c%c${this.name}`,`background:${n};color:black;font-weight:bold;border-radius:5px;`,"",`background:${this.color};color:black;font-weight:bold;border-radius:5px;`,...o)}log(...t){this._log("log","#a6d189",t)}info(...t){this._log("info","#a6d189",t)}error(...t){this._log("error","#e78284",t)}warn(...t){this._log("warn","#e5c890",t)}debug(...t){this._log("debug","#eebebe",t)}}});var tn={};D(tn,{_handleClick:()=>Vs,_handlePreEdit:()=>Bs,_handlePreSend:()=>Us,addClickListener:()=>Zt,addPreEditListener:()=>Re,addPreSendListener:()=>W,removeClickListener:()=>en,removePreEditListener:()=>ke,removePreSendListener:()=>H});function Us(e,t,n){for(let o of Yt)try{o(e,t,n)}catch(r){Qt.error(`MessageSendHandler:Listenerencouteredanunknownerror.(${r})`)}}function Bs(e,t,n){for(let o of Xt)try{o(e,t,n)}catch(r){Qt.error(`MessageEditHandler:Listenerencouteredanunknownerror.(${r})`)}}function W(e){return Yt.add(e),e}function Re(e){return Xt.add(e),e}function H(e){return Yt.delete(e)}function ke(e){return Xt.delete(e)}function Vs(e,t,n){for(let o of Jt)try{o(e,t,n)}catch(r){Qt.error(`MessageClickHandler:Listenerencouteredanunknownerror.(${r})`)}}function Zt(e){return Jt.add(e),e}function en(e){return Jt.delete(e)}var Qt,Yt,Xt,Jt,me=a(()=>{"use strict";we();Qt=new U("MessageEvents","#e5c890"),Yt=new Set,Xt=new Set;Jt=new Set});var rn={};D(rn,{currentNotice:()=>Ke,nextNotice:()=>Yo,noticesQueue:()=>on,popNotice:()=>$s,showNotice:()=>Gs});function $s(){nn.dismiss()}function Yo(){Ke=on.shift
`,i),"Failed to fetch user. Check the console for more info."}}return null}var ni,ua,fa,ht,ga,ha,ya,ba,Sa,eo,ri=a(()=>{"use strict";re();E();O();y();A();ni=0,ua=20,fa=128,ht=10,ga=te(()=>import("https://unpkg.com/gifenc@1.0.3/dist/gifenc.esm.js")),ha=te(()=>Promise.all(Array.from({length:ht},(e,t)=>oi(`https://raw.githubusercontent.com/VenPlugs/petpet/main/frames/pet${t}.gif`)))),ya=C(h.byCode(".USER(")),ba=C(h.byCode("UPLOAD_FILE_LIMIT_ERROR")),Sa=C(h.byProps(["getUploads"]));eo=c({name:"petpet",description:"headpet a cutie",authors:[d.Ven],dependencies:["CommandsAPI"],commands:[{inputType:0,name:"petpet",description:"Create a petpet gif. You can only specify one of the image options",options:[{name:"delay",description:"The delay between each frame. Defaults to 20.",type:4},{name:"resolution",description:"Resolution for the gif. Defaults to 120. If you enter an insane number and it freezes Discord that's your fault.",type:4},{name:"image",description:"Image attachment to use",type:11},{name:"url",description:"URL to fetch image from",type:3},{name:"user",description:"User whose avatar to use as image",type:6},{name:"no-server-pfp",description:"Use the normal avatar instead of the server specific one when using the 'user' option",type:5}],execute:async(e,t)=>{let{GIFEncoder:n,quantize:o,applyPalette:r}=await ga(),i=await ha(),l=j(e,"no-server-pfp",!1);try{var m=await xa(e,t,l);if(!m)throw"No Image specified!"}catch(x){console.log(x);return}let g=await oi(m),b=j(e,"delay",ua),S=j(e,"resolution",fa),s=new n,p=document.createElement("canvas");p.width=p.height=S;let T=p.getContext("2d");for(let x=0;x<ht;x++){T.clearRect(0,0,p.width,p.height);let R=x<ht/2?x:ht-x,Q=.8+R*.02,N=.8-R*.05,Y=(1-Q)*.5+.1,ae=1-N-.08;T.drawImage(g,Y*S,ae*S,Q*S,N*S),T.drawImage(i[x],0,0,S,S);let{data:ge}=T.getImageData(0,0,S,S),ce=o(ge,256),je=r(ge,ce);s.writeFrame(je,S,S,{transparent:!0,palette:ce,delay:b})}s.finish();let w=new File([s.bytesView()],"petpet.gif",{type:"image/gif"});setImmediate(()=>ba([w],t.channel,ni))}}]})});var to,ii=a(()=>{"use strict";E();y();to=c({name:"PlainFolderIcon",description:"Doesn't show the small guild icons in folders",authors:[d.botato],patches:[{find:"().expandedFolderIconWrapper",replacement:[{match:/\(\w\|\|\w\)(&&\(\w=\w\.createElement\(\w+\.animated)/,replace:"true$1"}]}]})});function no(){return Vencord.Webpack.Common.React.createElement(f.Fragment,null,Vencord.Webpack.Common.React.createElement(u.FormTitle,{tag:"h3"},"More Information"),Vencord.Webpack.Common.React.createElement(u.FormText,null,"The two pronoun formats are lowercase and capitalized. Example:",Vencord.Webpack.Common.React.createElement("ul",null,Vencord.Webpack.Common.React.createElement("li",null,"Lowercase: they/them"),Vencord.Webpack.Common.React.createElement("li",null,"Capitalized: They/Them")),'Text like "Ask me my pronouns" or "Any pronouns" will always be capitalized. ',Vencord.Webpack.Common.React.createElement("br",null),Vencord.Webpack.Common.React.createElement("br",null),"You can also configure whether or not to display pronouns for the current user (since you probably already know them)"))}var si=a(()=>{"use strict";v()});var fe,yt=a(()=>{"use strict";fe={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"}});var Me,Ye=a(()=>{Me="35d2b8d"});function St(e){return new Promise(t=>{e in bt?t(bt[e]):e in Ve?Ve[e].push(t):(Ve[e]=[t],Ea())})}async function Pa(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":`Vencord/${Me} (github.com/Vendicated/Vencord)`}})).json().then(o=>(Object.assign(bt,o),o))}catch(n){console.error("PronounDB fetching failed: ",n);let o=Object.fromEn
${o}`})},start(){this.preSend=W((e,t)=>this.unindentMsg(t)),this.preEdit=Re((e,t,n)=>this.unindentMsg(n))},stop(){H(this.preSend),ke(this.preEdit)}})});var go,Ca,ho,gi=a(()=>{"use strict";E();y();Ca="https://raw.githubusercontent.com/facebook/react/17.0.2/scripts/error-codes/codes.json",ho=c({name:"ReactErrorDecoder",description:'Replaces "Minifed React Error" with the actual error.',authors:[d.Cyn],patches:[{find:'"https://reactjs.org/docs/error-decoder.html?invariant="',replacement:{match:/(function .\(.\)){(for\(var .="https:\/\/reactjs\.org\/docs\/error-decoder\.html\?invariant="\+.,.=1;.<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(){go=await fetch(Ca).then(e=>e.json()).catch(e=>console.error(`[ReactErrorDecoder]FailedtofetchReacterrorcodes
`,t),!1}}if(e.commands?.length){Z.info("Registering commands of plugin",e.name);for(let t of e.commands)try{$t(t,e.name)}catch(n){return Z.error(`Failedtoregistercommand${t.name}
`,t),!1}}if(e.commands?.length){Z.info("Unregistering commands of plugin",e.name);for(let t of e.commands)try{Gt(t.name)}catch(n){return Z.error(`Failedtounregistercommand${t.name}
`,n),!1}}return!0}var Z,Ia,Ci,vt=a(()=>{"use strict";Pt();re();Fe();we();Z=new U("PluginManager","#a6d189"),Ia=V,Ci=[];for(let e of Object.values(V))if(e.patches&&P.plugins[e.name].enabled)for(let t of e.patches)t.plugin=e.name,Array.isArray(t.replacement)||(t.replacement=[t.replacement]),Ci.push(t)});var Ro={};D(Ro,{toggle:()=>wo});async function wo(e){Ae?Ae.disabled=!e:e&&(Ae=document.createElement("style"),Ae.id="vencord-custom-css",document.head.appendChild(Ae),VencordNative.ipc.on(_.QUICK_CSS_UPDATE,(t,n)=>Ae.innerText=n),Ae.innerText=await VencordNative.ipc.invoke(_.GET_QUICK_CSS))}var Ae,ko=a(()=>{"use strict";Fe();Ue();document.addEventListener("DOMContentLoaded",()=>{wo(P.useQuickCss),Ti("useQuickCss",wo)})});var _o={};D(_o,{UpdateLogger:()=>vi,changes:()=>Xe,checkForUpdates:()=>wi,getRepo:()=>ki,isNewer:()=>Io,isOutdated:()=>Je,rebuild:()=>Ii,update:()=>Ri,updateError:()=>Mo});async function Ge(e){let t=await e;if(t.ok)return t.value;throw Mo=t.error,t.error}async function wi(){return Xe=await Ge(VencordNative.ipc.invoke(_.GET_UPDATES)),Xe.some(e=>e.hash===Me)?(Io=!0,Je=!1):Je=Xe.length>0}async function Ri(){if(!Je)return!0;let e=await Ge(VencordNative.ipc.invoke(_.UPDATE));return e&&(Je=!1),e}function ki(){return Ge(VencordNative.ipc.invoke(_.GET_REPO))}async function Ii(){let e=await Ge(VencordNative.ipc.invoke(_.GET_HASHES));if(!await Ge(VencordNative.ipc.invoke(_.BUILD)))throw new Error("The Build failed. Please try manually building the new update");let t=await Ge(VencordNative.ipc.invoke(_.GET_HASHES));return e["patcher.js"]!==t["patcher.js"]||e["preload.js"]!==t["preload.js"]}var vi,Je,Io,Mo,Xe,wt=a(()=>{"use strict";Ye();Ue();we();vi=new U("Updater","white"),Je=!1,Io=!1});function Ma(){function e(t){try{let n=t[1],{subscriptions:o,listeners:r}=Vencord.Webpack,{patches:i}=Vencord.Plugins;for(let l in n){let m=n[l],g=m.toString().replaceAll(`
`,""),b=m,S=new Set;n[l]=function(s,p,T){try{m(s,p,T)}catch(w){if(m===b)throw w;return ee.error("Error in patched chunk",w),void b(s,p,T)}if(s.exports===window){Object.defineProperty(T.c,l,{value:T.c[l],enumerable:!1,configurable:!0,writable:!0});return}for(let w of r)try{w(p)}catch(x){ee.error("Error in webpack listener",x)}for(let[w,x]of o)try{if(w(p))o.delete(w),x(p);else if(typeof p=="object"){p.default&&w(p.default)&&(o.delete(w),x(p.default));for(let R in p)R.length<3&&p[R]&&w(p[R])&&(o.delete(w),x(p[R]))}}catch(R){ee.error("Error while firing callback for webpack chunk",R)}},n[l].toString=()=>m.toString(),n[l].original=b;for(let s=0;s<i.length;s++){let p=i[s];if(!(p.predicate&&!p.predicate())&&g.includes(p.find)){S.add(p.plugin);for(let T of p.replacement){let w=m,x=g;try{let R=g.replace(T.match,T.replace);R===g?(ee.warn(`Patchby${p.plugin}hadnoeffect:${T.match}`),ee.debug(`FunctionSource:
`,g)):(g=R,m=(0,eval)(`// Webpack Module ${l} - Patched by ${[...S].join(", ")}
${R}
//# sourceURL=WebpackModule${l}`))}catch(R){ee.error("Failed to apply patch of",p.plugin,R),ee.debug(`Original Source
`,t),Fi.error("Component Stack",n.componentStack)}render(){if(this.state.error===Ai)return this.props.children;if(this.props.fallback)return Vencord.Webpack.Common.React.createElement(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 Vencord.Webpack.Common.React.createElement(Fo,{style:{overflow:"hidden"}},Vencord.Webpack.Common.React.createElement("h1",null,"Oh no!"),Vencord.Webpack.Common.React.createElement("p",null,t),Vencord.Webpack.Common.React.createElement("code",null,this.state.message,!!this.state.stack&&Vencord.Webpack.Common.React.createElement("pre",{className:$.marginTop8},this.state.stack)))}}});function se(e){return e.style??={},e.style.flexDirection||=e.flexDirection,e.style.gap??="1em",e.style.display="flex",Vencord.Webpack.Common.React.createElement("div",{...e},e.children)}var et=a(()=>{"use strict"});function Ni(e){let t=new Na({username:e.name,id:He(),bot:!0});return I.dispatch({type:"USER_UPDATE",user:t}),t}function No({plugin:e,onRestartNeeded:t,onClose:n,transitionState:o}){let[r,i]=f.useState([]),l=_e().plugins[e.name],[m,g]=f.useState({}),[b,S]=f.useState({}),s=()=>Object.values(b).every(x=>!x);f.useEffect(()=>{(async()=>{for(let x of e.authors.slice(0,6)){let R=x.id?await Ft.fetchUser(`${x.id}`).catch(()=>null):Ni(x);i(Q=>[...Q,R||Ni(x)])}})()},[]);function p(){if(!e.options){n();return}let x=!1;for(let[R,Q]of Object.entries(m)){let N=e.options[R];l[R]=Q,N?.onChange?.(Q),N?.restartNeeded&&(x=!0)}x&&t(),n()}function T(){if(!l||!e.options)return Vencord.Webpack.Common.React.createElement(u.FormText,null,"There are no settings for this plugin.");let x=[];for(let[N,Y]of Object.entries(e.options)){let ae=function(je){g(Rt=>({...Rt,[N]:je}))},ge=function(je){S(Rt=>({...Rt,[N]:je}))};var R=ae,Q=ge;let ce={onChange:ae,pluginSettings:l,id:N,onError:ge};switch(Y.type){case 4:{x.push(Vencord.Webpack.Common.React.createElement(Pr,{key:N,option:Y,...ce}));break}case 0:{x.push(Vencord.Webpack.Common.React.createElement(vr,{key:N,option:Y,...ce}));break}case 1:case 2:{x.push(Vencord.Webpack.Common.React.createElement(xr,{key:N,option:Y,...ce}));break}case 3:{x.push(Vencord.Webpack.Common.React.createElement(br,{key:N,option:Y,...ce}));break}case 5:{x.push(Vencord.Webpack.Common.React.createElement(Cr,{key:N,option:Y,...ce}));break}}}return Vencord.Webpack.Common.React.createElement(se,{flexDirection:"column",style:{gap:12}},x)}function w(x,R){let Q=e.authors.length-R,N=e.authors.length-Q,Y=N+e.authors.length-R;return Vencord.Webpack.Common.React.createElement(Se,{text:e.authors.slice(N,Y).map(ae=>ae.name).join(", ")},({onMouseEnter:ae,onMouseLeave:ge})=>Vencord.Webpack.Common.React.createElement("div",{className:Aa.moreUsers,onMouseEnter:ae,onMouseLeave:ge},"+",Q))}return Vencord.Webpack.Common.React.createElement(qe,{transitionState:o,size:"medium"},Vencord.Webpack.Common.React.createElement(vn,null,Vencord.Webpack.Common.React.createElement(ne,{variant:"heading-md/bold"},e.name)),Vencord.Webpack.Common.React.createElement(wn,{style:{marginBottom:8,marginTop:8}},Vencord.Webpack.Common.React.createElement(u.FormSection,null,Vencord.Webpack.Common.React.createElement(u.FormTitle,{tag:"h3"},"About ",e.name),Vencord.Webpack.Common.React.createElement(u.FormText,null,e.description),Vencord.Webpack.Common.React.createElement("div",{style:{marginTop:8,marginBottom:8,width:"fit-content"}},Vencord.Webpack.Common.React.createElement(Fa,{users:r,count:e.authors.length,guildId:void 0,renderIcon:!1,max:6,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:w}))),!!e.settingsAboutComponent&&Vencord.Webpack.Common.React.createElement("div",{style:{marginBottom:8}},Vencord.Webpack.Common.React.createElement(u.FormSection,null,Vencord.Webpack.Common.React.createElement(q,{message:"An error occurred while rendering this plugin's custom InfoComponent"},Vencord.Webpack.Common.React.createElement(e.settingsAboutComponent,null)))),Vencord.Webpack.Common.React.creat