(function(q,ke,a,g,m,M,T,w,n,ne,b,E,_,Ae,X){"use strict";const Le=async function(){const e=await(await fetch("https://uselessfacts.jsph.pl/api/v2/facts/random")).json();return{text:e.text,source:e.source,language:e.language}},$e=async function(){return{text:(await(await fetch("https://dogapi.dog/api/v2/facts?limit=1")).json()).data[0].attributes.body}},De=async function(){const e=await(await fetch("https://catfact.ninja/fact")).json();return{text:e.fact,length:e.length}},Pe=async function(e,t){try{const r=await fetch(`https://api.obamabot.me/v2/image/petpet?image=${e.replace("webp","png")}`);if(r.ok){const s=await r.json();if(s&&s.url)return s}}catch(r){console.warn("[PetPet] Obama API failed, falling back to .ru:",r)}if(t)return{url:`https://ptc.pwn3t.ru/${t}.gif`};throw new Error("All PetPet APIs are down")},xe=async function(e="gary"){try{switch(e){case"gary":return(await(await fetch("https://api.garythe.cat/gary")).json()).url;case"goober":return(await(await fetch("https://api.garythe.cat/goober")).json()).url;case"catapi":return(await(await fetch("https://api.thecatapi.com/v1/images/search")).json())[0].url;case"minker":return"https://minky.materii.dev/";default:throw new Error("Invalid Gary image source value")}}catch(t){return console.error(`[Gary API] Error fetching image from ${e}:`,t),null}},Y=g.findByProps("sendMessage"),J=function(e){let t=e.text;return a.storage.factSettings?.includeCitation&&e.source&&(t+=` Source: ${e.source}`),t},Be={name:"catfact",displayName:"catfact",description:"Sends a random cat fact.",displayDescription:"Sends a random cat fact.",applicationId:"-1",inputType:1,type:1,execute:async function(e,t){try{const r=await De(),s=Date.now().toString();return Y.sendMessage(t.channel.id,{content:J(r)},void 0,{nonce:s}),null}catch(r){return console.error("[CatFact] Error:",r),m.showToast("Failed to fetch cat fact",3e3),null}}},Fe={name:"dogfact",displayName:"dogfact",description:"Sends a dog fact.",displayDescription:"Sends a dog fact.",applicationId:"-1",inputType:1,type:1,execute:async function(e,t){try{const r=await $e(),s=Date.now().toString();return Y.sendMessage(t.channel.id,{content:J(r)},void 0,{nonce:s}),null}catch(r){return console.error("[DogFact] Error:",r),m.showToast("Failed to fetch dog fact",3e3),null}}},Me={name:"useless",displayName:"useless",description:"Sends a useless fact.",displayDescription:"Sends a useless fact.",applicationId:"-1",inputType:1,type:1,execute:async function(e,t){try{const r=await Le(),s=Date.now().toString();return Y.sendMessage(t.channel.id,{content:J(r)},void 0,{nonce:s}),null}catch(r){return console.error("[UselessFact] Error:",r),m.showToast("Failed to fetch useless fact",3e3),null}}},$={CONTENT:"This list is over 2000 characters. Send anyway?",CONFIRM:"Send",CANCEL:"Cancel"},_e={DETAILED:"detailed"},Q="",V={SLM_NOT_INSTALLED:"This list is over 2000 characters. Install the Split Large Messages plugin to send it.",SLM_NOT_ENABLED:"This list is over 2000 characters. Enable the Split Large Messages plugin to send it."},ae={SEMICOL:"; ",NEW_LINE:` `},Ve="Nothing to see here, huh...",re="github.com/fres621/vendetta-plugins",k={ENABLED:"\u2705",DISABLED:"\u274C",SELECTED:"\u2705",NOT_SELECTED:"\u274C"},Ue=g.findByProps("sendMessage","receiveMessage"),D=g.findByProps("sendBotMessage"),se=(function(){try{return g.findByStoreName("UserStore").getCurrentUser()?.premiumType===2?4e3:2e3}catch{return 2e3}})(),ie=function(e){return Object.keys(e).includes(re)},oe=function(e){return Object.values(e).find(function(t){return t.id==re})?.enabled},le=function(e){return e.find(function(t){return t.name===_e.DETAILED})?.value??!1},U=function(e){return!e||!Array.isArray(e)||e.length===0?"Unknown":e.filter(function(t){return t&&(typeof t=="string"||typeof t=="object"&&t.name)}).map(function(t){return typeof t=="string"?t:t.name||"Unknown"}).join(ae.SEMICOL)||"Unknown"},ce=function(e){return e.join(ae.NEW_LINE).trimEnd()},W=function(e){return ce(e).length},O=async function(e,t){const r=Date.now().toString();await Ue.sendMessage(e,{content:ce(t)},void 0,{nonce:r})},de=function(e,t){return[`**My ${e} List | ${t} ${e}s**`,Q]};async function We(e,t){try{const r=le(e),s=a.storage.themeListAlwaysDetailed??!1;if(!M.themes||typeof M.themes!="object"){const u=t.channel.id;return D.sendBotMessage(u,"No themes found or themes not loaded yet."),null}const i=Object.values(M.themes),o=t.channel.id,l=de("Theme",Object.keys(M.themes).length);if(i.length)for(const u of i){if(!u||typeof u!="object")continue;const{selected:d,data:f,id:v}=u,A=f?.name||"Unknown Theme",L=f?.description||"No description",P=f?.authors;r||s?l.push(`> **Name**: ${A}`,`> **Selected**: ${d?k.SELECTED:k.NOT_SELECTED}`,`> **Description**: ${L}`,`> **Authors**: ${U(P)}`,`> **[Install!](${v||"unknown"})**`,Q):l.push(`> ${d?k.SELECTED:k.NOT_SELECTED} **${A}** by ${U(P)}`)}else l.push(Ve);const c=W(l)>se;if(c&&!ie(T.plugins))D.sendBotMessage(o,V.SLM_NOT_INSTALLED);else if(c&&!oe(T.plugins))D.sendBotMessage(o,V.SLM_NOT_ENABLED);else{if(W(l)>2e3)return w.alerts.showConfirmationAlert({content:$.CONTENT,confirmText:$.CONFIRM,cancelText:$.CANCEL,onConfirm:async function(){return await O(o,l)}});await O(o,l)}}catch(r){return console.error("[ThemeList] Error:",r),null}}async function Oe(e,t){try{const r=le(e),s=a.storage.pluginListAlwaysDetailed??!1,i=t.channel.id;if(!T.plugins||typeof T.plugins!="object")return D.sendBotMessage(i,"No plugins found or plugins not loaded yet."),null;const o=de("Plugin",Object.keys(T.plugins).length);for(const c of Object.values(T.plugins)){if(!c||typeof c!="object")continue;const{enabled:u,manifest:d,id:f}=c,v=d?.name||"Unknown Plugin",A=d?.description||"No description",L=d?.authors;r||s?o.push(`> **Name**: ${v}`,`> **Status**: ${u?k.ENABLED:k.DISABLED}`,`> **Description**: ${A}`,`> **Authors**: ${U(L)}`,`> **[Install!](${f||"unknown"})**`,Q):o.push(`> ${u?k.ENABLED:k.DISABLED} **${v}** by ${U(L)}`)}const l=W(o)>se;if(l&&!ie(T.plugins))D.sendBotMessage(i,V.SLM_NOT_INSTALLED);else if(l&&!oe(T.plugins))D.sendBotMessage(i,V.SLM_NOT_ENABLED);else{if(W(o)>2e3)return w.alerts.showConfirmationAlert({content:$.CONTENT,confirmText:$.CONFIRM,cancelText:$.CANCEL,onConfirm:async function(){return await O(i,o)}});await O(i,o)}}catch(r){return console.error("[PluginList] Error:",r),null}}const Ge={name:"plugin-list",displayName:"plugin list",description:"Send your plugin list to the current channel",displayDescription:"Send your plugin list to the current channel",options:[{name:"detailed",description:"Whether to send a list with detailed information.",type:5,required:!1,displayName:"detailed",displayDescription:"Whether to send a list with detailed information."}],execute:Oe,applicationId:"-1",inputType:1,type:1},je={name:"theme-list",displayName:"theme list",description:"Send your theme list to the current channel",displayDescription:"Send your theme list to the current channel",options:[{name:"detailed",description:"Whether to send a list with detailed information.",type:5,required:!1,displayName:"detailed",displayDescription:"Whether to send a list with detailed information."}],execute:We,applicationId:"-1",inputType:1,type:1},He=g.findByStoreName("UserStore"),ze=g.findByProps("sendMessage"),Ke={name:"petpet",displayName:"petpet",description:"PetPet someone",displayDescription:"PetPet someone",options:[{name:"user",description:"The user (or their id) to be patted",type:6,required:!0,displayName:"user",displayDescription:"The user (or their id) to be patted"}],execute:async function(e,t){try{const r=await He.getUser(e[0].value),s=r.getAvatarURL(512),i=await Pe(s,r.id),o=Date.now().toString();return ze.sendMessage(t.channel.id,{content:i.url},void 0,{nonce:o}),null}catch(r){return console.error("[PetPet] Error:",r),null}},applicationId:"-1",inputType:1,type:1},qe=g.findByProps("sendMessage"),Xe=g.findByProps("sendBotMessage","sendMessage","receiveMessage"),ue=async function(e){const t="https://konachan.com/post.json",r=e?"rating:explicit":"rating:safe",s=Math.floor(Math.random()*100);try{const i=await(await fetch(`${t}?tags=${r}&limit=1&page=${s}`)).json();return!Array.isArray(i)||i.length===0?null:i[0].file_url}catch(i){return console.error("[KonoChan Randomizer] Error fetching image:",i),null}},fe=function(){return new Promise(function(e){w.alerts.showConfirmationAlert({title:"NSFW Content Warning",content:"NSFW content can only be sent in NSFW channels!",confirmText:"Okay",cancelText:"Cancel",confirmColor:"brand",isDismissable:!0,onConfirm:function(){return e(!0)},onCancel:function(){return e(!1)}})})},ge={name:"nsfw",description:"Include NSFW content?",type:5,required:!1,displayName:"nsfw",displayDescription:"Include NSFW content?"},Ye={name:"konoself",displayName:"konoself",description:"Fetch a random image from KonoChan for yourself.",displayDescription:"Fetch a random image from KonoChan for yourself.",options:[ge],execute:async function(e,t){try{const r=new Map((e||[]).map(function(o){return[o.name,o]})).get("nsfw")?.value||!1,s=a.storage.hiddenSettings?.konochanBypassNsfw||!1;if(console.log(`[KonoSelf] NSFW: ${r}, Channel NSFW: ${t.channel.nsfw}, Bypass: ${s}`),r&&!t.channel.nsfw&&!s)return fe(),null;const i=await ue(r);return i&&Xe.sendBotMessage(t.channel.id,`Here's your random image: ${i}`),null}catch(r){return console.error("[KonoSelf] Error:",r),null}},applicationId:"-1",inputType:1,type:1},Je={name:"konosend",displayName:"konosend",description:"Fetch a random image from KonoChan and send it to the channel.",displayDescription:"Fetch a random image from KonoChan and send it to the channel.",options:[ge],execute:async function(e,t){try{const r=new Map((e||[]).map(function(l){return[l.name,l]})).get("nsfw")?.value||!1,s=a.storage.hiddenSettings?.konochanBypassNsfw||!1;if(console.log(`[KonoSend] NSFW: ${r}, Channel NSFW: ${t.channel.nsfw}, Bypass: ${s}`),r&&!t.channel.nsfw&&!s)return fe(),null;const i=await ue(r);if(!i)return null;const o=Date.now().toString();return qe.sendMessage(t.channel.id,{content:i},void 0,{nonce:o}),null}catch(r){return console.error("[KonoSend] Error:",r),{type:4}}},applicationId:"-1",inputType:1,type:1},me=g.findByProps("getAPIBaseURL","get"),Qe=g.findByProps("sendMessage"),Ze=async function(e,t,r){const s=t?`&author_id=${t}`:"",i=r?`&channel_id=${r}`:"",o=t?"":"&min_id=0";return(await me.get({url:`/guilds/${e}/messages/search`,query:`include_nsfw=true${s}${i}${o}&sort_by=timestamp&sort_order=asc&offset=0`})).body.messages[0][0]},et=async function(e,t){const r=t?`&author_id=${t}`:"",s=t?"":"&min_id=0";return(await me.get({url:`/channels/${e}/messages/search`,query:`&sort_by=timestamp&sort_order=asc&offset=0${r}${s}`})).body.messages[0][0]},tt={name:"firstmessage",displayName:"firstmessage",description:"Tired of scrolling to first message?",displayDescription:"Tired of scrolling to first message?",options:[{name:"user",displayName:"user",description:"Target user to get their first message in this server/dm",displayDescription:"Target user to get their first message in this server/dm",type:6,required:!1},{name:"channel",displayName:"channel",description:"Target channel to get first message of",displayDescription:"Target channel to get first message of",type:7,required:!1},{name:"send",displayName:"send",description:"Whether to send the resulting url",displayDescription:"Whether to send the resulting url",type:5,required:!1}],execute:async function(e,t){try{const r=new Map(e.map(function(v){return[v.name,v]})),s=r.get("user")?.value,i=r.get("channel")?.value,o=r.get("send")?.value,l=t.guild?.id,c=t.channel.id,u=t.channel.type===1;if(u&&i)return m.showToast("Channel option cannot be used in DMs",3e3),null;let d="https://discord.com/channels/",f;if(u)f=await et(c,s),d+=`@me/${c}/${f.id}`;else{f=await Ze(l,s,i);const v=i||f.channel_id;d+=`${l}/${v}/${f.id}`}if(o){const v=Date.now().toString();Qe.sendMessage(t.channel.id,{content:d},void 0,{nonce:v})}else n.ReactNative.Linking.openURL(d);return null}catch(r){return console.error("[FirstMessage] Error:",r),m.showToast("Failed to fetch first message",3e3),null}},applicationId:"-1",inputType:1,type:1},nt=g.findByProps("sendMessage"),at=g.findByProps("sendBotMessage","sendMessage","receiveMessage");function rt(){let{height:e,width:t,scale:r}=n.ReactNative.Dimensions.get("screen");return e*=r,t*=r,{width:t,height:e}}function st(){try{const e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4),r=t.getFullYear(),s=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),o=String(t.getHours()).padStart(2,"0"),l=String(t.getMinutes()).padStart(2,"0"),c=String(t.getSeconds()).padStart(2,"0");return`${r}-${s}-${i} ${o}:${l}:${c}`}catch{return"Unknown"}}function it(){try{const e=g.findByProps("memory");if(!e)return{cpuCoreCount:"N/A",cpuPerc:"N/A",memUsage:"N/A"};const{cpuCoreCount:t,cpuPercentage:r,memory:s}=e,i=r?r.toFixed(2)+"%":"N/A",o=s?parseFloat((s/1e3).toPrecision(3))+" MB":"N/A";return{cpuCoreCount:t,cpuPerc:i,memUsage:o}}catch(e){return console.warn("Hardware info unavailable:",e),{cpuCoreCount:"N/A",cpuPerc:"N/A",memUsage:"N/A"}}}function ot(){try{const{NativeModules:e}=n.ReactNative;return(e.InfoDictionaryManager??e.RTNClientInfoManager)||{}}catch(e){return console.warn("Discord info unavailable:",e),{}}}function lt(){try{const{cpuCoreCount:e,cpuPerc:t,memUsage:r}=it();ot();const s=(typeof ne.getDebugInfo=="function"?ne.getDebugInfo():{})||{},{vendetta:i,discord:o,react:l,hermes:c,os:u,device:d}=s,f=st(),{version:v,bytecodeVersion:A}=c||{},{version:L,nativeVersion:P}=l||{},{name:F,version:C,sdk:N}=u||{},{manufacturer:K,brand:I,model:Ie,codename:un}=d||{},{version:fn}=i||{},{version:gn,build:mn}=o||{},yn=F=="iOS"?un:`${I} ${Ie}`,{width:pn,height:hn}=rt(),Te={Device:{Device:yn||"Unknown",Model:Ie||"Unknown",Manufacturer:K||"Unknown",Brand:I||"Unknown",Display:`${pn}x${hn}`},Hardware:{"CPU Cores":e||"N/A","CPU Usage":t,"Memory Usage":r},Software:{OS:F||"Unknown",Version:C||"Unknown"},Discord:{Version:gn||"Unknown",Build:mn||"Unknown",Vendetta:fn||"Unknown"},React:{Version:L||"Unknown","Hermes Bytecode":A||"Unknown",Hermes:v||"Unknown",Native:P||"Unknown"},Time:{UTC:f}};return N&&(Te.Software["SDK Version"]=N),Te}catch(e){throw console.error("Error generating system info:",e),e}}const ye=["device","hardware","software","discord","react","time","ephemeral"];for(const e of ye)a.storage[e]===void 0&&(a.storage[e]=!0);function ct(e,t){try{const r=[`__System Information__ `],s=lt();Object.keys(s).forEach(function(l){const c=a.storage[l.toLowerCase()],u=e.find(function(d){return d.name==l.toLowerCase()})?.value??c;(u||c)&&!(c&&!u)&&(r.push(`[**${l}**]`),Object.keys(s[l]).forEach(function(d){r.push(`> ${d}: ${s[l][d]}`)}))});const i=a.storage.ephemeral,o=e.find(function(l){return l.name=="ephemeral"})?.value??i;if((o||i)&&!(i&&!o))return at.sendBotMessage(t.channel.id,r.join(` `)),null;{const l=Date.now().toString();return nt.sendMessage(t.channel.id,{content:r.join(` `)},void 0,{nonce:l}),null}}catch(r){return console.error("[Sysinfo] Error:",r),null}}const dt={name:"sysinfo",displayName:"sysinfo",description:"Display system information",displayDescription:"Display system information",options:[{name:"ephemeral",displayName:"ephemeral",description:"Keep sysinfo ephemeral (default: true)",displayDescription:"Keep sysinfo ephemeral (default: true)",type:5,required:!1},...ye.slice(0,-1).map(function(e){return{name:e,displayName:e,description:`Display the ${e} section. Set default in settings.`,displayDescription:`Display the ${e} section. Set default in settings.`,type:5,required:!1}})],execute:ct,applicationId:"-1",inputType:1,type:1},pe=g.findByProps("sendMessage","receiveMessage"),ut=g.findByStoreName("SpotifyStore");async function ft(e,t){return a.storage.enabledCommands?.spotifyTrack?G(t,function(r){return`https://open.spotify.com/track/${r.id}`}):null}async function gt(e,t){return a.storage.enabledCommands?.spotifyAlbum?G(t,function(r){return`https://open.spotify.com/album/${r.album.id}`}):null}async function mt(e,t){return a.storage.enabledCommands?.spotifyArtists?G(t,function(r){return r.artists.map(function(s){return`[${s.name}](${s.external_urls.spotify})`}).join(` `)}):null}async function yt(e,t){return a.storage.enabledCommands?.spotifyCover?G(t,function(r){return r.album.image.url}):null}async function G(e,t){try{const r=e.channel.id,s=ut?.getTrack?.();if(!s){const l=Date.now().toString();return pe.sendMessage(r,{content:"You are not listening to any track."},void 0,{nonce:l}),null}const i=t(s),o=Date.now().toString();return pe.sendMessage(r,{content:i},void 0,{nonce:o}),null}catch(r){return console.error("[Spotify Command] Error:",r),null}}const pt={name:"spotify track",displayName:"spotify track",description:"Sends your current Spotify track",displayDescription:"Sends your current Spotify track",applicationId:"-1",inputType:1,type:1,execute:ft},ht={name:"spotify album",displayName:"spotify album",description:"Sends your current track's album",displayDescription:"Sends your current track's album",applicationId:"-1",inputType:1,type:1,execute:gt},bt={name:"spotify artists",displayName:"spotify artists",description:"Sends your current track's artists",displayDescription:"Sends your current track's artists",applicationId:"-1",inputType:1,type:1,execute:mt},vt={name:"spotify cover",displayName:"spotify cover",description:"Sends your current track's cover",displayDescription:"Sends your current track's cover",applicationId:"-1",inputType:1,type:1,execute:yt},Ct=g.findByProps("sendMessage"),wt={name:"gary",displayName:"gary",description:"Send a random Gary image to the channel.",displayDescription:"Send a random Gary image to the channel.",options:[],execute:async function(e,t){try{a.storage.garySettings||(a.storage.garySettings={imageSource:"gary"});const r=a.storage.garySettings.imageSource||"gary";console.log(`[Gary Command] Using image source: ${r}`);const s=await xe(r);if(!s)return console.log("[Gary Command] No image URL received"),null;console.log(`[Gary Command] Sending image: ${s}`);const i=Date.now().toString();return Ct.sendMessage(t.channel.id,{content:s},void 0,{nonce:i}),{type:4}}catch(r){return console.error("[Gary] Error:",r),null}},applicationId:"-1",inputType:1,type:1},he=g.findByProps("sendMessage","receiveMessage"),St=g.findByProps("getLastSelectedChannelId"),Rt=g.findByProps("createBotMessage"),Et=g.findByProps("BOT_AVATARS");function j(e,t,r){const s=e??St?.getChannelId?.(),i=Rt.createBotMessage({channelId:s,content:"",embeds:r});i.author.username="Astolfo",i.author.avatar="Astolfo",Et.BOT_AVATARS.Astolfo="https://i.pinimg.com/736x/50/77/1f/50771f45b1c015cfbb8b0853ba7b8521.jpg",typeof t=="string"?i.content=t:Object.assign(i,t),he.receiveMessage(s,i)}const Nt={name:"lovefemboys",displayName:"lovefemboys",description:"Get an image of a femboy",displayDescription:"Get an image of a femboy",options:[{name:"nsfw",displayName:"nsfw",description:"Get the result from r/femboys instead of r/femboy (NSFW)",displayDescription:"Get the result from r/femboys instead of r/femboy (NSFW)",required:!1,type:5},{name:"sort",displayName:"sort",description:"Changes the way reddit sorts.",displayDescription:"Changes the way reddit sorts",required:!1,type:3},{name:"silent",displayName:"silent",description:"Makes it so only you can see the message.",displayDescription:"Makes it so only you can see the message.",required:!1,type:5}],applicationId:"-1",inputType:1,type:1,execute:async function(e,t){try{const r=e.find(function(c){return c.name==="nsfw"})?.value;let s=e.find(function(c){return c.name==="sort"})?.value;const i=e.find(function(c){return c.name==="silent"})?.value;if(typeof s>"u"&&(s=a.storage.sortdefs),!["best","hot","new","rising","top","controversial"].includes(s)){j(t.channel.id,"Incorrect sorting type. Valid options are\n`best`, `hot`, `new`, `rising`, `top`, `controversial`.",[]);return}if(r&&!await new Promise(function(c){w.alerts.showConfirmationAlert({title:"\u26A0\uFE0F NSFW Content Warning",content:"This command will send NSFW (Not Safe For Work) content from r/femboys. Are you sure you want to continue?",confirmText:"Yes, Continue",onConfirm:function(){return c(!0)},cancelText:"Cancel",onCancel:function(){return c(!1)}})}))return null;let o=await fetch(`https://www.reddit.com/r/femboy/${s}.json?limit=100`).then(function(c){return c.json()});if(!t.channel.nsfw_&&r&&a.storage.nsfwwarn&&!(i??!0)){j(t.channel.id,`This channel is not marked as NSFW (You can disable this check in plugin settings)`,[]);return}r&&(o=await fetch(`https://www.reddit.com/r/femboys/${s}.json?limit=100`).then(function(c){return c.json()})),o=o.data?.children?.[Math.floor(Math.random()*o.data?.children?.length)]?.data;const l=await fetch(`https://www.reddit.com/u/${o?.author}/about.json`).then(function(c){return c.json()});if(i??!0)j(t.channel.id,"",[{type:"rich",title:o?.title,url:`https://reddit.com${o?.permalink}`,author:{name:`u/${o?.author} \u2022 r/${o?.subreddit}`,proxy_icon_url:l?.data.icon_img.split("?")[0],icon_url:l?.data.icon_img.split("?")[0]},image:{proxy_url:o?.url_overridden_by_dest?.replace(/.gifv$/g,".gif")??o?.url.replace(/.gifv$/g,".gif"),url:o?.url_overridden_by_dest?.replace(/.gifv$/g,".gif")??o?.url?.replace(/.gifv$/g,".gif"),width:o?.preview?.images?.[0]?.source?.width,height:o?.preview?.images?.[0]?.source?.height},color:"0xf4b8e4"}]);else{const c=Date.now().toString();he.sendMessage(t.channel.id,{content:o?.url_overridden_by_dest??o?.url},void 0,{nonce:c})}}catch(r){console.error("[LoveFemboys] Error:",r),j(t.channel.id,"ERROR !!!!!!!!!!!! \u{1F62D}\u{1F62D}\u{1F62D} Check debug logs!! \u{1F97A}\u{1F97A}\u{1F97A}",[])}}},It=g.findByProps("sendMessage"),Tt=g.findByProps("sendBotMessage","sendMessage","receiveMessage"),kt={name:"ip",displayName:"ip",description:"IP address and domain lookup",displayDescription:"IP address and domain lookup",options:[{name:"query",displayName:"query",description:"Enter IPv4/IPv6 address or domain name",displayDescription:"Enter IPv4/IPv6 address or domain name",type:3,required:!0},{name:"send",displayName:"send",description:"Send to chat",displayDescription:"Send to chat",type:5,required:!1},{name:"ephemeral",displayName:"ephemeral",description:"Send as ephemeral message (only you can see)",displayDescription:"Send as ephemeral message (only you can see)",type:5,required:!1}],execute:async function(e,t){try{const r=e.find(function(d){return d.name==="query"})?.value,s=e.find(function(d){return d.name==="send"})?.value||!1,i=e.find(function(d){return d.name==="ephemeral"})?.value||!1;if(!r){const d="\u274C Query parameter is required!";return i?{type:4,data:{content:d,flags:64}}:(m.showToast(d,b.getAssetIDByName("CircleXIcon")),null)}!i&&!s&&m.showToast(`Looking up IP information for ${r}...`,b.getAssetIDByName("DownloadIcon"));const o=`http://ipwhois.app/json/${encodeURIComponent(r)}?objects=success,ip,type,as,org,isp,continent,country,country_capital,city,region,country_phone,latitude,longitude,timezone,currency,completed_requests`,l=await fetch(o);if(!l.ok)throw new Error(`HTTP ${l.status}: ${l.statusText}`);const c=await l.json();if(!c.success){const d=`\u274C Failed to lookup IP information for: ${r}`;return i?{type:4,data:{content:d,flags:64}}:(m.showToast(d,b.getAssetIDByName("CircleXIcon")),null)}const u=`\`\`\`json ${JSON.stringify(c,null,4)} \`\`\``;if(i)return{type:4,data:{content:u,flags:64}};if(s){const d=Date.now().toString();return It.sendMessage(t.channel.id,{content:u},void 0,{nonce:d}),{type:4}}else return Tt.sendBotMessage(t.channel.id,u),null}catch(r){console.error("[IP] Command error:",r);const s=`\u274C An error occurred while looking up IP information: ${r.message||"Unknown error"}`;return e?.find?.(function(i){return i.name==="ephemeral"})?.value??!1?{type:4,data:{content:s,flags:64}}:(m.showToast(s,b.getAssetIDByName("CircleXIcon")),null)}},applicationId:"-1",inputType:1,type:1},At=g.findByProps("sendMessage"),Lt=g.findByProps("sendBotMessage","sendMessage","receiveMessage"),$t=["avatar","classic","cuddle","fox_girl","gecg","holo","kemonomimi","kiss","neko","ngif","smug","spank","tickle","waifu","wallpaper","woof"];async function Dt(e,t){const r=[];for(let s=0;s0&&await new Promise(function(l){return setTimeout(l,1e3)});const i=await fetch(`https://nekos.life/api/v2/img/${e}`);if(!i.ok){console.error(`[NekosLife] API request failed: ${i.status}`);continue}const o=await i.json();o.url&&r.push(o.url)}catch(i){console.error(`[NekosLife] Error fetching image ${s+1}:`,i)}return r}function Pt(e){return!e||typeof e!="string"?!1:$t.includes(e.toLowerCase().trim())}const xt={name:"nekoslife",displayName:"nekoslife",description:"Get SFW images/gifs from nekos.life",displayDescription:"Get SFW images/gifs from nekos.life",options:[{name:"category",displayName:"category",description:"Category name (e.g. neko, waifu, cuddle, etc.)",displayDescription:"Category name (e.g. neko, waifu, cuddle, etc.)",type:3,required:!0},{name:"limit",displayName:"limit",description:"Number of images (1-5, default: 1)",displayDescription:"Number of images (1-5, default: 1)",type:4,required:!1},{name:"send",displayName:"send",description:"Send to chat",displayDescription:"Send to chat",type:5,required:!1},{name:"ephemeral",displayName:"ephemeral",description:"Send as ephemeral message (only you can see)",displayDescription:"Send as ephemeral message (only you can see)",type:5,required:!1}],execute:async function(e,t){try{console.log("[NekosLife] Command executed with args:",e);const r=e.find(function(f){return f.name==="category"})?.value,s=e.find(function(f){return f.name==="limit"})?.value,i=e.find(function(f){return f.name==="send"})?.value||!1,o=e.find(function(f){return f.name==="ephemeral"})?.value||!1;if(console.log("[NekosLife] Parsed values:",{categoryInput:r,limitInput:s,shouldSend:i,isEphemeral:o}),!r||typeof r!="string"){const f="\u274C Category is required! Examples: neko, waifu, cuddle, kiss";return console.error("[NekosLife] No category provided"),o?{type:4,data:{content:f,flags:64}}:(m.showToast(f,b.getAssetIDByName("CircleXIcon")),null)}const l=r.toLowerCase().trim();if(!Pt(l)){const f=`\u274C Invalid SFW category "${r}". Valid: neko, waifu, cuddle, kiss, holo, etc.`;return o?{type:4,data:{content:f,flags:64}}:(m.showToast(f,b.getAssetIDByName("CircleXIcon")),null)}let c=1;s!=null&&(c=parseInt(String(s))||1,c=Math.max(1,Math.min(5,c))),console.log("[NekosLife] Processing SFW request:",{category:l,limit:c,shouldSend:i,isEphemeral:o}),o||m.showToast(`Fetching ${c} SFW image(s) from nekos.life...`,b.getAssetIDByName("DownloadIcon"));const u=await Dt(l,c);if(u.length===0){const f="\u274C Failed to fetch images from nekos.life. Try again later!";return o?{type:4,data:{content:f,flags:64}}:(m.showToast(f,b.getAssetIDByName("CircleXIcon")),null)}const d=u.join(` `);if(o)return console.log("[NekosLife] Sending ephemeral response"),{type:4,data:{content:d,flags:64}};if(i){console.log("[NekosLife] Sending to chat");const f=Date.now().toString();return At.sendMessage(t.channel.id,{content:d},void 0,{nonce:f}),null}else return console.log("[NekosLife] Sending as bot message"),Lt.sendBotMessage(t.channel.id,d),null}catch(r){console.error("[NekosLife] Command error:",r);const s="\u274C An error occurred while fetching images.";return e?.find?.(function(i){return i.name==="ephemeral"})?.value??!1?{type:4,data:{content:s,flags:64}}:(m.showToast(s,b.getAssetIDByName("CircleXIcon")),null)}},applicationId:"-1",inputType:1,type:1},Bt=g.findByProps("sendBotMessage","sendMessage"),x=g.findByProps("getAllFriendInvites","createFriendInvite","revokeFriendInvites"),Ft=g.findByProps("getCurrentUser")?.getCurrentUser;function be(e,t){const r=Date.now().toString();Bt.sendMessage(e.channel.id,{content:t},void 0,{nonce:r})}const Mt={name:"invite create",displayName:"invite create",description:"Generates a friend invite link.",displayDescription:"Generates a friend invite link.",type:1,applicationId:"-1",inputType:1,execute:async function(e,t){try{if(!Ft?.().phone)return m.showToast("You need a phone number connected to your account!",b.getAssetIDByName("Small")),null;const r=await x.createFriendInvite({code:null,recipient_phone_number_or_email:null,contact_visibility:0,filter_visibilities:[],filtered_invite_suggestions_index:0});if(r?.code){const s=Math.floor(new Date(r.expires_at).getTime()/1e3),i=`https://discord.gg/${r.code} \xB7 Expires: `;be(t,i),m.showToast("Friend invite created!",b.getAssetIDByName("Check"))}else throw new Error("No invite code generated");return null}catch(r){return console.error("[FriendInvite] Create error:",r),m.showToast("Error creating friend invite",b.getAssetIDByName("Small")),null}}},_t={name:"view invites",displayName:"view invites",description:"View your current friend invite links that you've made.",displayDescription:"View your current friend invite links that you've made.",type:1,applicationId:"-1",execute:async function(e,t){try{const r=await x.getAllFriendInvites();if(!r?.length)return m.showToast("No active friend invites found",b.getAssetIDByName("Info")),null;const s=r.map(function(i){const o=Math.floor(new Date(i.expires_at).getTime()/1e3);return`_https://discord.gg/${i.code}_ \xB7 Expires: \xB7 Uses: \`${i.uses}/${i.max_uses}\``});return be(t,`**Your Active Friend Invites:** ${s.join(` `)}`),null}catch(r){return console.error("[FriendInvite] View error:",r),m.showToast("Error viewing friend invites",b.getAssetIDByName("Small")),null}}},Vt={name:"revoke invites",displayName:"revoke invites",description:"Revoke all your friend invite links.",displayDescription:"Revoke all your friend invite links.",type:1,applicationId:"-1",inputType:1,execute:async function(){try{const e=await x.getAllFriendInvites();if(!e?.length)return m.showToast("No active friend invites to revoke",b.getAssetIDByName("Info")),null;await x.revokeFriendInvites();const t=await x.getAllFriendInvites();return t.length===0?m.showToast(`Successfully revoked all ${e.length} friend invite(s)!`,b.getAssetIDByName("Check")):m.showToast(`\u26A0\uFE0F Partially revoked invites. ${t.length} invite(s) remain active.`,b.getAssetIDByName("Warning")),null}catch(e){return console.error("[FriendInvite] Revoke error:",e),m.showToast("Error revoking friend invites",b.getAssetIDByName("Small")),null}}},{ScrollView:S}=g.findByProps("ScrollView"),{TableRowGroup:h,TableSwitchRow:y,TableCheckboxRow:bn,TableRadioGroup:Ut,TableRadioRow:H,Stack:R,TableRow:p}=g.findByProps("TableSwitchRow","TableCheckboxRow","TableRadioGroup","TableRadioRow","TableRowGroup","Stack","TableRow"),{TextInput:vn}=g.findByProps("TextInput"),ve=g.findByProps("TextStyleSheet").TextStyleSheet,Wt=g.findByStoreName("ThemeStore"),Ce=g.findByProps("colors","unsafe_rawColors"),Ot=Ce?.internal??Ce?.meta;function we(e,t){const r=Wt?.theme;return e&&Ot?.resolveSemanticColor(r,e)||"#000000"}function Gt(){const[e,t]=n.React.useState(0),[r,s]=n.React.useState(null),[i,o]=n.React.useState(null),[l,c]=n.React.useState(!1);n.React.useEffect(function(){a.storage.sidebarEnabled===void 0&&(a.storage.sidebarEnabled=!0)},[]);let u=null;try{u=g.findByProps("getUser","getCurrentUser")?.getCurrentUser?.()}catch(C){console.warn("[Commands Header] Failed to get current user:",C)}let d=null,f=null;try{d=g.findByProps("getUserAvatarURL")?.getUserAvatarURL}catch(C){console.warn("[Commands Header] Failed to get getUserAvatarURL:",C)}try{f=g.findByProps("getDefaultAvatarURL")?.getDefaultAvatarURL}catch(C){console.warn("[Commands Header] Failed to get getDefaultAvatarURL:",C)}const v=n.ReactNative.StyleSheet.create({container:{flexDirection:"row",alignItems:"center",paddingVertical:24,paddingHorizontal:16,width:"100%",justifyContent:"center"},leftSection:{flexDirection:"row",alignItems:"center",flex:1,gap:20,maxWidth:500},avatarContainer:{position:"relative",width:96,height:96,justifyContent:"center",alignItems:"center"},avatarWrapper:{width:96,height:96,borderRadius:24,justifyContent:"center",alignItems:"center",overflow:"hidden",borderWidth:2,borderColor:w.semanticColors.MOBILE_CHATINPUT_BORDER_DEFAULT},avatar:{width:92,height:92,borderRadius:22},cogwheelBackground:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",borderRadius:24,justifyContent:"center",alignItems:"center",opacity:0},cogwheelIcon:{width:32,height:32,tintColor:w.semanticColors.INTERACTIVE_ACTIVE},textContainer:{flex:1,marginLeft:4,justifyContent:"center"},animatedIndicator:{position:"absolute",top:8,right:8,backgroundColor:"rgba(0, 0, 0, 0.7)",borderRadius:10,width:20,height:20,justifyContent:"center",alignItems:"center",zIndex:1},gifText:{color:"#FFFFFF",fontSize:10,fontWeight:"bold"},avatarPlaceholder:{width:48,height:48,tintColor:w.semanticColors.INTERACTIVE_NORMAL}});n.React.useEffect(function(){if(u){let C,N=!1;const K=u.avatar?.startsWith("a_");if(d&&u.avatar)try{C=d(u,K),N=K}catch(I){console.warn("[Commands Header] Error getting custom avatar:",I),C=null}if(!C&&f&&typeof f=="function")try{C=f(u)}catch(I){console.warn("[Commands Header] Error getting default avatar URL:",I),C=null}if(!C&&u.avatar){const I=u.avatar.startsWith("a_");C=`https://cdn.discordapp.com/avatars/${u.id}/${u.avatar}.${I?"gif":"png"}?size=256`,N=I}else C||(C=`https://cdn.discordapp.com/embed/avatars/${u.discriminator?parseInt(u.discriminator)%5:(parseInt(u.id)>>22)%6}.png`);o(C),c(N)}},[u]);const A=function(){if(a.storage.hiddenSettings?.enabled){a.storage.hiddenSettings.visible=!a.storage.hiddenSettings.visible,m.showToast(`Hidden settings ${a.storage.hiddenSettings.visible?"visible":"hidden"}`,b.getAssetIDByName("SettingsIcon"));return}r&&clearTimeout(r);const C=setTimeout(function(){t(0)},1e3);s(C);const N=e+1;t(N),!(N<10)&&(m.showToast("Hidden settings unlocked!",b.getAssetIDByName("CheckmarkIcon")),a.storage.hiddenSettings={...a.storage.hiddenSettings,enabled:!0,visible:!0},t(0))},L=function(){const C=!a.storage.sidebarEnabled;a.storage.sidebarEnabled=C,a.storage.pendingRestart=!0,m.showToast(`Sidebar ${C?"enabled":"disabled"}. Restart Discord to apply.`,b.getAssetIDByName(C?"CheckmarkIcon":"XIcon"))},[P,F]=n.React.useState(!1);return n.React.createElement(n.ReactNative.View,{style:v.container},n.React.createElement(n.ReactNative.View,{style:v.leftSection},n.React.createElement(n.ReactNative.Pressable,{style:v.avatarContainer,onPress:A,onPressIn:function(){return F(!0)},onPressOut:function(){return F(!1)},delayLongPress:500,onLongPress:L},n.React.createElement(n.ReactNative.View,{style:v.avatarWrapper},i?n.React.createElement(n.React.Fragment,null,n.React.createElement(n.ReactNative.Image,{source:{uri:i},style:v.avatar,resizeMode:"cover"}),l&&n.React.createElement(n.ReactNative.View,{style:v.animatedIndicator})):n.React.createElement(n.ReactNative.Image,{source:b.getAssetIDByName("ic_account_circle_24px"),style:v.avatarPlaceholder})),n.React.createElement(n.ReactNative.View,{style:[v.cogwheelBackground,{opacity:P?.8:0}]},n.React.createElement(n.ReactNative.Image,{source:b.getAssetIDByName("SettingsIcon"),style:v.cogwheelIcon}))),n.React.createElement(n.ReactNative.View,{style:v.textContainer},n.React.createElement(n.ReactNative.Text,{style:[ve["display-md"],{color:we(w.semanticColors.TEXT_DEFAULT)}]},"Commands"),n.React.createElement(n.ReactNative.Text,{style:[ve["text-md/bold"],{color:we(w.semanticColors.TEXT_MUTED)}]},"A collection of useful commands for Vendetta like clients"))))}function jt(){E.useProxy(a.storage);const[,e]=n.React.useReducer(function(t){return t+1},0);return n.React.createElement(S,{style:{flex:1},contentContainerStyle:{padding:10}},n.React.createElement(R,{spacing:12},n.React.createElement(h,{title:"Fact Display Settings"},n.React.createElement(y,{label:"Send as Reply",subLabel:"Send facts as a reply to the command message",value:a.storage.factSettings.sendAsReply,onValueChange:function(t){a.storage.factSettings.sendAsReply=t}}),n.React.createElement(y,{label:"Include Source Citation",subLabel:"Include the source of facts when available",value:a.storage.factSettings.includeCitation,onValueChange:function(t){a.storage.factSettings.includeCitation=t}})),n.React.createElement(h,{title:"Available Fact Commands"},n.React.createElement(y,{label:"/catfact",subLabel:"Get random cat facts",value:a.storage.enabledCommands.catfact,onValueChange:function(t){a.storage.enabledCommands.catfact=t,a.storage.pendingRestart=!0,e()}}),n.React.createElement(y,{label:"/dogfact",subLabel:"Get random dog facts",value:a.storage.enabledCommands.dogfact,onValueChange:function(t){a.storage.enabledCommands.dogfact=t,a.storage.pendingRestart=!0,e()}}),n.React.createElement(y,{label:"/useless",subLabel:"Get random useless facts",value:a.storage.enabledCommands.useless,onValueChange:function(t){a.storage.enabledCommands.useless=t,a.storage.pendingRestart=!0,e()}}))))}function Ht(){E.useProxy(a.storage);const[,e]=n.React.useReducer(function(t){return t+1},0);return n.React.createElement(S,{style:{flex:1},contentContainerStyle:{padding:10}},n.React.createElement(R,{spacing:12},n.React.createElement(h,{title:"List Display Settings"},n.React.createElement(y,{label:"Always Send Detailed Plugin List",subLabel:"Always use detailed mode when listing plugins",value:a.storage.listSettings.pluginListAlwaysDetailed,onValueChange:function(t){a.storage.listSettings.pluginListAlwaysDetailed=t}}),n.React.createElement(y,{label:"Always Send Detailed Theme List",subLabel:"Always use detailed mode when listing themes",value:a.storage.listSettings.themeListAlwaysDetailed,onValueChange:function(t){a.storage.listSettings.themeListAlwaysDetailed=t}})),n.React.createElement(h,{title:"Available List Commands"},n.React.createElement(y,{label:"/plugin-list",subLabel:"List all installed plugins",value:a.storage.enabledCommands.pluginList,onValueChange:function(t){a.storage.enabledCommands.pluginList=t,a.storage.pendingRestart=!0,e()}}),n.React.createElement(y,{label:"/theme-list",subLabel:"List all installed themes",value:a.storage.enabledCommands.themeList,onValueChange:function(t){a.storage.enabledCommands.themeList=t,a.storage.pendingRestart=!0,e()}}))))}function zt(){E.useProxy(a.storage);const[,e]=n.React.useReducer(function(t){return t+1},0);return n.React.createElement(S,{style:{flex:1},contentContainerStyle:{padding:10}},n.React.createElement(R,{spacing:12},n.React.createElement(h,{title:"Image Commands"},n.React.createElement(y,{label:"/petpet",subLabel:"Create pet-pet GIF of a user",value:a.storage.enabledCommands.petpet,onValueChange:function(t){a.storage.enabledCommands.petpet=t,a.storage.pendingRestart=!0,e()}})),n.React.createElement(h,{title:"KonoChan Commands"},n.React.createElement(y,{label:"/konoself",subLabel:"Get random image from KonoChan (private)",value:a.storage.enabledCommands.konoself,onValueChange:function(t){a.storage.enabledCommands.konoself=t,a.storage.pendingRestart=!0,e()}}),n.React.createElement(y,{label:"/konosend",subLabel:"Send random image from KonoChan to channel",value:a.storage.enabledCommands.konosend,onValueChange:function(t){a.storage.enabledCommands.konosend=t,a.storage.pendingRestart=!0,e()}}))))}function Kt(){E.useProxy(a.storage);const[,e]=n.React.useReducer(function(t){return t+1},0);return n.React.createElement(S,{style:{flex:1},contentContainerStyle:{padding:10}},n.React.createElement(R,{spacing:12},n.React.createElement(h,{title:"Gary Command Settings"},n.React.createElement(y,{label:"/gary",subLabel:"Send random Gary images to channel",value:a.storage.enabledCommands.gary,onValueChange:function(t){a.storage.enabledCommands.gary=t,a.storage.pendingRestart=!0,e()}})),n.React.createElement(h,{title:"Image Source Selection"},n.React.createElement(Ut,{value:a.storage.garySettings.imageSource,onChange:function(t){a.storage.garySettings.imageSource=t,e()}},n.React.createElement(H,{value:"gary",label:"Gary API",subLabel:"Original Gary the cat images from api.garythe.cat"}),n.React.createElement(H,{value:"catapi",label:"Cat API",subLabel:"Random cat pictures from thecatapi.com"}),n.React.createElement(H,{value:"minker",label:"Minker API",subLabel:"Minky images from minky.materii.dev"}),n.React.createElement(H,{value:"goober",label:"Goober API",subLabel:"Goober images from api.garythe.cat/goober"})))))}function qt(){E.useProxy(a.storage);const[,e]=n.React.useReducer(function(t){return t+1},0);return n.React.createElement(S,{style:{flex:1},contentContainerStyle:{padding:10}},n.React.createElement(R,{spacing:12},n.React.createElement(h,{title:"Spotify Commands"},n.React.createElement(y,{label:"/spotify track",subLabel:"Share your current Spotify track",value:a.storage.enabledCommands.spotifyTrack,onValueChange:function(t){a.storage.enabledCommands.spotifyTrack=t,a.storage.pendingRestart=!0,e()}}),n.React.createElement(y,{label:"/spotify album",subLabel:"Share your current track's album",value:a.storage.enabledCommands.spotifyAlbum,onValueChange:function(t){a.storage.enabledCommands.spotifyAlbum=t,a.storage.pendingRestart=!0,e()}}),n.React.createElement(y,{label:"/spotify artists",subLabel:"Share your current track's artists",value:a.storage.enabledCommands.spotifyArtists,onValueChange:function(t){a.storage.enabledCommands.spotifyArtists=t,a.storage.pendingRestart=!0,e()}}),n.React.createElement(y,{label:"/spotify cover",subLabel:"Share your current track's cover",value:a.storage.enabledCommands.spotifyCover,onValueChange:function(t){a.storage.enabledCommands.spotifyCover=t,a.storage.pendingRestart=!0,e()}})),n.React.createElement(h,{title:"About Spotify Commands"},n.React.createElement(p,{label:"Spotify Integration",subLabel:"These commands allow you to share your current Spotify activity in Discord. Make sure you have Spotify connected to Discord for these commands to work properly."}))))}function Xt(){const e=n.ReactNative.StyleSheet.create({tableHeader:{flexDirection:"row",alignItems:"center",paddingVertical:12,paddingHorizontal:16},headerText:{fontSize:14,fontWeight:"700",color:w.semanticColors.HEADER_PRIMARY,textTransform:"uppercase"},nameHeader:{flex:2},codeHeader:{flex:2,textAlign:"center"},badgeHeader:{flex:1,textAlign:"center"},categoryItem:{flexDirection:"row",alignItems:"center",paddingVertical:12,paddingHorizontal:16},categoryName:{fontSize:16,fontWeight:"500",color:w.semanticColors.HEADER_PRIMARY,flex:2},categoryValue:{fontSize:14,color:w.semanticColors.TEXT_MUTED,fontFamily:"monospace",flex:2,textAlign:"center"},sfwBadgeContainer:{flex:1,alignItems:"center"},sfwBadge:{backgroundColor:w.semanticColors.STATUS_POSITIVE,paddingHorizontal:8,paddingVertical:4,borderRadius:12},badgeText:{fontSize:12,fontWeight:"600",color:w.semanticColors.TEXT_NORMAL}}),t=[{name:"Avatar",value:"avatar"},{name:"Classic",value:"classic"},{name:"Cuddle",value:"cuddle"},{name:"Fox Girl",value:"fox_girl"},{name:"Gecg",value:"gecg"},{name:"Holo",value:"holo"},{name:"Kemonomimi",value:"kemonomimi"},{name:"Kiss",value:"kiss"},{name:"Neko",value:"neko"},{name:"Neko GIF",value:"ngif"},{name:"Smug",value:"smug"},{name:"Spank",value:"spank"},{name:"Tickle",value:"tickle"},{name:"Waifu",value:"waifu"},{name:"Wallpaper",value:"wallpaper"},{name:"Woof",value:"woof"}],r=t.sort(function(s,i){return s.name.localeCompare(i.name)});return n.React.createElement(S,{style:{flex:1},contentContainerStyle:{padding:10}},n.React.createElement(R,{spacing:12},n.React.createElement(h,{title:"Category Statistics"},n.React.createElement(p,{label:`${t.length} SFW Categories`,subLabel:"Use these category names with the /nekoslife command. All categories are Safe For Work (SFW)."})),n.React.createElement(h,{title:"SFW Categories"},n.React.createElement(n.ReactNative.View,{style:e.tableHeader},n.React.createElement(n.ReactNative.Text,{style:[e.headerText,e.nameHeader]},"Category Name"),n.React.createElement(n.ReactNative.Text,{style:[e.headerText,e.codeHeader]},"Command Code"),n.React.createElement(n.ReactNative.Text,{style:[e.headerText,e.badgeHeader]},"Type")),r.map(function(s,i){return n.React.createElement(n.ReactNative.View,{key:i,style:e.categoryItem},n.React.createElement(n.ReactNative.Text,{style:e.categoryName},s.name),n.React.createElement(n.ReactNative.Text,{style:e.categoryValue},s.value),n.React.createElement(n.ReactNative.View,{style:e.sfwBadgeContainer},n.React.createElement(n.ReactNative.View,{style:e.sfwBadge},n.React.createElement(n.ReactNative.Text,{style:e.badgeText},"SFW"))))}))))}function Yt(){E.useProxy(a.storage);const[,e]=n.React.useReducer(function(r){return r+1},0),t=n.NavigationNative.useNavigation();return n.React.createElement(S,{style:{flex:1},contentContainerStyle:{padding:10}},n.React.createElement(R,{spacing:12},n.React.createElement(h,{title:"IP Commands"},n.React.createElement(y,{label:"/ip",subLabel:"Get your current IP address",value:a.storage.enabledCommands.ip,onValueChange:function(r){a.storage.enabledCommands.ip=r,a.storage.pendingRestart=!0,e()}})),n.React.createElement(h,{title:"NekosLife Commands"},n.React.createElement(y,{label:"/nekoslife",subLabel:"Get images/gifs from nekos.life",value:a.storage.enabledCommands.nekoslife,onValueChange:function(r){a.storage.enabledCommands.nekoslife=r,a.storage.pendingRestart=!0,e()}}),n.React.createElement(p,{label:"View Categories",subLabel:"See all 16 available categories",trailing:n.React.createElement(p.Arrow,null),onPress:function(){return t.push("VendettaCustomPage",{title:"NekosLife Categories",render:Xt})}}))))}function Jt(){E.useProxy(a.storage);const[,e]=n.React.useReducer(function(t){return t+1},0);return n.React.createElement(S,{style:{flex:1},contentContainerStyle:{padding:10}},n.React.createElement(R,{spacing:12},n.React.createElement(h,{title:"Message Commands"},n.React.createElement(y,{label:"/firstmessage",subLabel:"Get the first message in a channel",value:a.storage.enabledCommands.firstmessage,onValueChange:function(t){a.storage.enabledCommands.firstmessage=t,a.storage.pendingRestart=!0,e()}})),n.React.createElement(h,{title:"System Commands"},n.React.createElement(y,{label:"/sysinfo",subLabel:"Display system information",value:a.storage.enabledCommands.sysinfo,onValueChange:function(t){a.storage.enabledCommands.sysinfo=t,a.storage.pendingRestart=!0,e()}})),n.React.createElement(h,{title:"Friend Invites"},n.React.createElement(y,{label:"/invite create",subLabel:"Generate a friend invite link",value:a.storage.enabledCommands.friendInviteCreate,onValueChange:function(t){a.storage.enabledCommands.friendInviteCreate=t,a.storage.pendingRestart=!0,e()}}),n.React.createElement(y,{label:"/view invites",subLabel:"View your current friend invites",value:a.storage.enabledCommands.friendInviteView,onValueChange:function(t){a.storage.enabledCommands.friendInviteView=t,a.storage.pendingRestart=!0,e()}}),n.React.createElement(y,{label:"/revoke invites",subLabel:"Revoke all your friend invites",value:a.storage.enabledCommands.friendInviteRevoke,onValueChange:function(t){a.storage.enabledCommands.friendInviteRevoke=t,a.storage.pendingRestart=!0,e()}}))))}function Qt(){E.useProxy(a.storage);const[,e]=n.React.useReducer(function(t){return t+1},0);return n.React.createElement(S,{style:{flex:1},contentContainerStyle:{padding:10}},n.React.createElement(R,{spacing:12},n.React.createElement(h,{title:"Warning"},n.React.createElement(p,{label:"Hidden Commands Warning",subLabel:"These are hidden commands that may contain mature content or experimental features. Use at your own discretion. Commands in this section are disabled by default."})),n.React.createElement(h,{title:"Hidden Commands"},n.React.createElement(y,{label:"/lovefemboys",subLabel:"Get random femboy images from r/femboys (NSFW content available)",value:a.storage.enabledCommands.lovefemboys,onValueChange:function(t){a.storage.enabledCommands.lovefemboys=t,a.storage.pendingRestart=!0,e()}})),n.React.createElement(h,{title:"NSFW Bypass Options"},n.React.createElement(y,{label:"KonoChan NSFW Bypass",subLabel:"Allow NSFW KonoChan content in non-NSFW channels (USE WITH CAUTION)",value:a.storage.hiddenSettings.konochanBypassNsfw,onValueChange:function(t){t?w.alerts.showConfirmationAlert({title:"NSFW Bypass Warning",content:"Enabling this allows NSFW content from KonoChan to be sent in any channel, including non-NSFW channels. This could violate server rules or Discord ToS. Use responsibly!",confirmText:"I Understand",cancelText:"Cancel",onConfirm:function(){a.storage.hiddenSettings.konochanBypassNsfw=!0,e()},onCancel:function(){}}):(a.storage.hiddenSettings.konochanBypassNsfw=!1,e())}})),n.React.createElement(h,{title:"Hidden Settings Control"},n.React.createElement(y,{label:"Keep Hidden Settings Visible",subLabel:"Keep this section visible even when navigating away",value:a.storage.hiddenSettings.visible,onValueChange:function(t){a.storage.hiddenSettings.visible=t}}),n.React.createElement(p,{label:"Reset Hidden Settings",subLabel:"Hide this section and disable all hidden commands",onPress:function(){w.alerts.showConfirmationAlert({title:"Reset Hidden Settings",content:"This will hide the hidden settings section and disable all hidden commands. Are you sure?",confirmText:"Reset",onConfirm:function(){a.storage.hiddenSettings.enabled=!1,a.storage.hiddenSettings.visible=!1,a.storage.hiddenSettings.konochanBypassNsfw=!1,a.storage.enabledCommands.lovefemboys=!1,a.storage.pendingRestart=!0,m.showToast("Hidden settings reset",b.getAssetIDByName("CheckmarkIcon"))},cancelText:"Cancel"})}}))))}const Zt=[{command:"Facts Commands",author:"jdev082",avatar:"https://github.com/jdev082.png",github:"https://github.com/jdev082"},{command:"List Commands",author:"Kitomanari",avatar:"https://github.com/Kitosight.png",github:"https://github.com/Kitosight"},{command:"PetPet",author:"wolfieeee",avatar:"https://github.com/WolfPlugs.png",github:"https://github.com/WolfPlugs"},{command:"KonoChan Commands",author:"btmc727 & Rico040",avatar:"https://github.com/OTKUSteyler.png",github:"https://github.com/OTKUSteyler"},{command:"FirstMessage Command",author:"sapphire",avatar:"https://github.com/aeongdesu.png",github:"https://github.com/aeongdesu"},{command:"Sysinfo Command",author:"mugman",avatar:"https://github.com/mugman174.png",github:"https://github.com/mugman174"},{command:"Spotify Commands",author:"Kitomanari",avatar:"https://github.com/Kitosight.png",github:"https://github.com/Kitosight"},{command:"Gary Command",author:"Zach Orange",avatar:"https://github.com/IAmGaryTheCat.png",github:"https://github.com/IAmGaryTheCat"},{command:"IP & NekosLife Commands",author:"scruzism",avatar:"https://github.com/scrazzz.png",github:"https://github.com/scrazzz"},{command:"FriendInvites",author:"nikosszzz",avatar:"https://github.com/nikosszzz.png",github:"https://github.com/nikosszzz"}];function en(){return React.createElement(S,{style:{flex:1},contentContainerStyle:{padding:10}},React.createElement(R,{spacing:12},React.createElement(h,{title:"Plugin Authors"},Zt.map(function(e){return React.createElement(p,{key:e.github,label:e.command,subLabel:`by ${e.author}`,icon:React.createElement(n.ReactNative.Image,{source:{uri:e.avatar},style:{width:48,height:48,borderRadius:8},resizeMode:"cover"}),trailing:React.createElement(p.Arrow,null),onPress:function(){return n.ReactNative.Linking.openURL(e.github)}})})),React.createElement(h,{title:"About"},React.createElement(p,{label:"Commands Plugin Collection",subLabel:"Version 1.3.0"}))))}a.storage.factSettings==null&&(a.storage.factSettings={sendAsReply:!0,includeCitation:!1}),a.storage.listSettings==null&&(a.storage.listSettings={pluginListAlwaysDetailed:!1,themeListAlwaysDetailed:!1}),a.storage.garySettings==null&&(a.storage.garySettings={imageSource:"gary"}),a.storage.enabledCommands==null&&(a.storage.enabledCommands={catfact:!0,dogfact:!0,useless:!0,petpet:!0,pluginList:!0,themeList:!0,konoself:!0,konosend:!0,firstmessage:!0,sysinfo:!0,spotifyTrack:!0,spotifyAlbum:!0,spotifyArtists:!0,spotifyCover:!0,gary:!0,ip:!0,lovefemboys:!1,nekoslife:!1,friendInviteCreate:!0,friendInviteView:!0,friendInviteRevoke:!0}),a.storage.pendingRestart==null&&(a.storage.pendingRestart=!1),a.storage.hiddenSettings==null&&(a.storage.hiddenSettings={enabled:!1,visible:!1,konochanBypassNsfw:!1}),a.storage.sidebarEnabled==null&&(a.storage.sidebarEnabled=!0);function Se(){E.useProxy(a.storage);const e=n.NavigationNative.useNavigation();n.React.useEffect(function(){return function(){a.storage.pendingRestart&&(a.storage.pendingRestart=!1,w.alerts.showConfirmationAlert({title:"Restart Required",content:"You have made changes to commands. Please restart Discord to apply these changes.",confirmText:"Okay",cancelText:null,onConfirm:function(){}}))}},[]);const t=a.storage.garySettings.imageSource==="gary"?"Gary API":a.storage.garySettings.imageSource==="catapi"?"Cat API":a.storage.garySettings.imageSource==="minker"?"Minker API":a.storage.garySettings.imageSource==="goober"?"Goober API":"Gary API";return n.React.createElement(S,{style:{flex:1},contentContainerStyle:{padding:10}},n.React.createElement(Gt,null),n.React.createElement(R,{spacing:12},n.React.createElement(h,{title:"Command Categories"},n.React.createElement(p,{label:"Facts Commands",subLabel:"Cat facts, dog facts, and useless facts",trailing:n.React.createElement(p.Arrow,null),onPress:function(){return e.push("VendettaCustomPage",{title:"Facts Commands",render:jt})}}),n.React.createElement(p,{label:"List Commands",subLabel:"Plugin lists and theme lists",trailing:n.React.createElement(p.Arrow,null),onPress:function(){return e.push("VendettaCustomPage",{title:"List Commands",render:Ht})}}),n.React.createElement(p,{label:"Image Commands",subLabel:"PetPet, KonoChan, and image utilities",trailing:n.React.createElement(p.Arrow,null),onPress:function(){return e.push("VendettaCustomPage",{title:"Image Commands",render:zt})}}),n.React.createElement(p,{label:"Gary Commands",subLabel:`Gary images - Current: ${t}`,trailing:n.React.createElement(p.Arrow,null),onPress:function(){return e.push("VendettaCustomPage",{title:"Gary Commands",render:Kt})}}),n.React.createElement(p,{label:"Spotify Commands",subLabel:"Share your Spotify activity",trailing:n.React.createElement(p.Arrow,null),onPress:function(){return e.push("VendettaCustomPage",{title:"Spotify Commands",render:qt})}}),n.React.createElement(p,{label:"Aliucord Commands",subLabel:"Commands from Aliucord",trailing:n.React.createElement(p.Arrow,null),onPress:function(){return e.push("VendettaCustomPage",{title:"Aliucord",render:Yt})}}),n.React.createElement(p,{label:"Other Commands",subLabel:"Utility and system commands",trailing:n.React.createElement(p.Arrow,null),onPress:function(){return e.push("VendettaCustomPage",{title:"Other Commands",render:Jt})}})),a.storage.hiddenSettings?.visible&&n.React.createElement(h,{title:"Hidden Settings"},n.React.createElement(p,{label:"Hidden Commands",subLabel:"Access to experimental and NSFW commands",trailing:n.React.createElement(p.Arrow,null),onPress:function(){return e.push("VendettaCustomPage",{title:"Hidden Settings",render:Qt})}})),n.React.createElement(h,{title:"Other"},n.React.createElement(p,{label:"Credits",subLabel:"View original authors of the plugins",trailing:n.React.createElement(p.Arrow,null),onPress:function(){return e.push("VendettaCustomPage",{title:"Credits",render:en})}}))))}const{FormSection:tn,FormRow:Z}=Ae.Forms,{TableRowIcon:nn}=g.findByProps("TableRowIcon"),B=window.bunny,Re=B?.metro?.findByPropsLazy("getRootNavigationRef"),ee=B?.metro?.findByPropsLazy("SETTING_RENDERER_CONFIG"),Ee=B?.metro?.findByPropsLazy("createList"),Ne=B?.metro?.findByNameLazy("SettingsOverviewScreen",!1);function an({tabs:e}){const t=n.NavigationNative.useNavigation();return n.React.createElement(Z,{label:e.title(),leading:n.React.createElement(Z.Icon,{source:e.icon}),trailing:n.React.createElement(n.React.Fragment,{},[e.trailing?e.trailing():null,n.React.createElement(Z.Arrow,{key:"arrow"})]),onPress:function(){const r=e.page;t.navigate("VendettaCustomPage",{title:e.title(),render:function(){return n.React.createElement(r)}})}})}function rn(e,t){try{t.push(_.after("default",B?.metro?.findByPropsLazy(["renderTitle","sections"],!1),function(r,s){const i=X.findInReactTree(s.props.children,function(o){return o.type?.name==="UserSettingsOverview"});i&&t.push(_.after("render",i.type.prototype,function(o,l){const c=X.findInReactTree(l.props.children,function(u){return u?.children?.[1]?.type===tn})?.children;if(c){const u=c.findIndex(function(d){return["BILLING_SETTINGS","PREMIUM_SETTINGS"].includes(d?.props?.label)});c.splice(-~u||4,0,n.React.createElement(an,{key:e.key,tabs:e}))}}))},!0))}catch{}}function sn(e,t){if(!ee||!Re){console.warn("[Commands Plugin] Missing required constants for tabs UI patch");return}const r={[e.key]:{type:"pressable",useTitle:e.title,title:e.title,icon:e.icon,IconComponent:e.icon&&function(){return n.React.createElement(nn,{source:e.icon})},usePredicate:e.predicate,useTrailing:e.trailing,onPress:function(){const o=Re.getRootNavigationRef(),l=e.page;o.navigate("VendettaCustomPage",{title:e.title(),render:function(){return n.React.createElement(l)}})},withArrow:!0}};let s=ee.SETTING_RENDERER_CONFIG;Object.defineProperty(ee,"SETTING_RENDERER_CONFIG",{enumerable:!0,configurable:!0,get:function(){return{...s,...r}},set(o){s=o}});const i=Symbol("pinToSettings meow meow");try{if(!Ee)return;t.push(_.after("createList",Ee,function(o){if(!o[0][i]){o[0][i]=!0;const[l]=o,c=l.sections?.find(function(u){return["Bunny","Revenge","Kettu","Vencore","ShiggyCord"].some(function(d){return u.label===d&&u.title===d})});c?.settings&&(c.settings=[...c.settings,e.key])}}))}catch{if(!Ne)return;t.push(_.after("default",Ne,function(o,l){if(!o[0][i]){o[0][i]=!0;const{sections:c}=X.findInReactTree(l,function(d){return d.props?.sections}).props,u=c?.find(function(d){return["Bunny","Revenge","Kettu","Vencore","ShiggyCord"].some(function(f){return d.label===f&&d.title===f})});u?.settings&&(u.settings=[...u.settings,e.key])}}))}}function on(e){const t=[];let r=!1;const s=e.predicate||function(){return!0};return e.predicate=function(){return r?!1:s()},rn(e,t),sn(e,t),t.push(function(){return r=!0}),function(){for(const i of t)i()}}function ln(){if(a.storage.sidebarEnabled===!1)return console.log("[Commands Plugin] Sidebar disabled in settings"),function(){};console.log("[Commands Plugin] Patching sidebar...");try{const e=on({key:"CommandsPlugin",icon:b.getAssetIDByName("SettingsIcon"),title:function(){return"Commands"},predicate:function(){return a.storage.sidebarEnabled!==!1},page:Se});return console.log("[Commands Plugin] Successfully patched sidebar"),e}catch(e){return console.error("[Commands Plugin] Failed to patch sidebar:",e),function(){}}}a.storage.factSettings||(a.storage.factSettings={sendAsReply:!0,includeCitation:!1}),a.storage.listSettings||(a.storage.listSettings={pluginListAlwaysDetailed:!1,themeListAlwaysDetailed:!1}),a.storage.garySettings||(a.storage.garySettings={imageSource:"gary"}),a.storage.enabledCommands||(a.storage.enabledCommands={catfact:!0,dogfact:!0,useless:!0,petpet:!0,pluginList:!0,themeList:!0,konoself:!0,konosend:!0,firstmessage:!0,sysinfo:!0,spotifyTrack:!0,spotifyAlbum:!0,spotifyArtists:!0,spotifyCover:!0,gary:!0,ip:!0,lovefemboys:!1,nekoslife:!1,friendInviteCreate:!0,friendInviteView:!0,friendInviteRevoke:!0}),a.storage.hiddenSettings||(a.storage.hiddenSettings={enabled:!1,visible:!1,konochanBypassNsfw:!1}),a.storage.sidebarEnabled===void 0&&(a.storage.sidebarEnabled=!0);const cn={catfact:Be,dogfact:Fe,useless:Me,petpet:Ke,pluginList:Ge,themeList:je,konoself:Ye,konosend:Je,firstmessage:tt,sysinfo:dt,spotifyTrack:pt,spotifyAlbum:ht,spotifyArtists:bt,spotifyCover:vt,gary:wt,ip:kt,lovefemboys:Nt,nekoslife:xt,friendInviteCreate:Mt,friendInviteView:_t,friendInviteRevoke:Vt};let te=[],z;var dn={onLoad:function(){if(console.log("[Commands Plugin] Loading..."),a.storage.sidebarEnabled!==!1)try{z=ln(),console.log("[Commands Plugin] Sidebar patched successfully")}catch(e){console.error("[Commands Plugin] Failed to patch sidebar:",e)}for(const[e,t]of Object.entries(cn))if(a.storage.enabledCommands[e])try{te.push(ke.registerCommand(t)),console.log(`[Commands Plugin] Registered command: ${e}`)}catch(r){console.error(`[Commands Plugin] Failed to register command ${e}:`,r)}},onUnload:function(){if(console.log("[Commands Plugin] Unloading..."),te.forEach(function(e){try{e()}catch{}}),te=[],z)try{z(),z=void 0,console.log("[Commands Plugin] Sidebar unpatched")}catch(e){console.error("[Commands Plugin] Failed to unpatch sidebar:",e)}},settings:Se};return q.default=dn,Object.defineProperty(q,"__esModule",{value:!0}),q})({},vendetta.commands,vendetta.plugin,vendetta.metro,vendetta.ui.toasts,vendetta.themes,vendetta.plugins,vendetta.ui,vendetta.metro.common,vendetta.debug,vendetta.ui.assets,vendetta.storage,vendetta.patcher,vendetta.ui.components,vendetta.utils);