From 38f45a7e0b222996cdcb9096d85d9ffae1ef7c93 Mon Sep 17 00:00:00 2001 From: Rosie Val Date: Fri, 25 Sep 2026 16:34:09 -0400 Subject: [PATCH] fix(hook): prevent startup deadlock, fix target package/activity filters, restore bundle asset and shake detector --- app/src/main/assets/Shiggy.bundle | 28 ++++++ .../kotlin/ShiggyXposed/xposed/xposed/Main.kt | 61 ++++++++++++- .../xposed/modules/HookScriptLoaderModule.kt | 35 +++++--- .../xposed/modules/LogBox/LogBoxModule.kt | 85 +++++++++++++------ .../xposed/modules/LogBox/ShakeDetector.kt | 56 ++++++++++++ 5 files changed, 227 insertions(+), 38 deletions(-) create mode 100644 app/src/main/assets/Shiggy.bundle create mode 100644 app/src/main/kotlin/ShiggyXposed/xposed/xposed/modules/LogBox/ShakeDetector.kt diff --git a/app/src/main/assets/Shiggy.bundle b/app/src/main/assets/Shiggy.bundle new file mode 100644 index 0000000..dd94b3d --- /dev/null +++ b/app/src/main/assets/Shiggy.bundle @@ -0,0 +1,28 @@ +"use strict";(()=>{var Vv=Object.create;var ts=Object.defineProperty;var $v=Object.getOwnPropertyDescriptor;var zv=Object.getOwnPropertyNames;var Wv=Object.getPrototypeOf,Yv=Object.prototype.hasOwnProperty;var _=(e,r,t)=>()=>{if(t)throw t[0];try{return e&&(r=e(e=0)),r}catch(o){throw t=[o],o}};var Nt=(e,r)=>()=>{try{return r||e((r={exports:{}}).exports,r),r.exports}catch(t){throw r=0,t}},k=(e,r)=>{for(var t in r)ts(e,t,{get:r[t],enumerable:!0})},_d=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(var n=zv(r),a=0,s=n.length,d;ar[f]).bind(null,d),enumerable:!(o=$v(r,d))||o.enumerable});return e};var H=(e,r,t)=>(t=e!=null?Vv(Wv(e)):{},_d(r||!e||!e.__esModule?ts(t,"default",{value:e,enumerable:!0}):t,e)),Oe=e=>_d(ts({},"__esModule",{value:!0}),e);var l=_(()=>{"use strict"});var Kv,qv,Xv,h,c=_(()=>{"use strict";Kv=e=>({status:"fulfilled",value:e}),qv=e=>({status:"rejected",reason:e}),Xv=e=>Promise.resolve(e).then(Kv,qv),h=Promise.allSettled??=e=>Promise.all(Array.from(e).map(Xv))});function Ke(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}var xn=_(()=>{l();c();u()});function bd(e,r){for(var t=0;t{l();c();u()});function Zl(e){if(!Sd){try{typeof console<"u"&&typeof console.warn=="function"&&console.warn(`[weakref-shim] ${e}`)}catch{}Sd=!0}}var Sd,Jv,Zv,Qv,ey,g,v,u=_(()=>{"use strict";xn();wn();Sd=!1;Jv=(function(){"use strict";function e(r){Ke(this,e),this.__value=r,Zl("WeakRef is not available in this runtime. Using a strong-reference fallback \u2014 memory usage/semantics may differ.")}return qe(e,[{key:"deref",value:function(){return this.__value}}]),e})(),Zv=(function(){"use strict";function e(r){Ke(this,e),this.__cleanupCallback=typeof r=="function"?r:null,Zl("FinalizationRegistry is not available in this runtime. Using a no-op fallback \u2014 finalizers will not run based on GC.")}return qe(e,[{key:"register",value:function(t){}},{key:"unregister",value:function(t){}},{key:"cleanupSome",value:function(t){var o=typeof t=="function"?t:this.__cleanupCallback;if(typeof o=="function")try{o()}catch(n){try{typeof console<"u"&&typeof console.error=="function"&&console.error("[weakref-shim] error running cleanupSome callback:",n)}catch{}}}}]),e})(),Qv=typeof globalThis<"u"&&typeof globalThis.WeakRef=="function"?globalThis.WeakRef:void 0,ey=typeof globalThis<"u"&&typeof globalThis.FinalizationRegistry=="function"?globalThis.FinalizationRegistry:void 0,g=Qv??Jv,v=ey??Zv;try{typeof globalThis<"u"&&(typeof globalThis.WeakRef>"u"&&(globalThis.WeakRef=g),typeof globalThis.FinalizationRegistry>"u"&&(globalThis.FinalizationRegistry=v))}catch(e){Zl("Unable to assign WeakRef/FinalizationRegistry to globalThis: "+(e&&e.message))}});function xd(e,r,t,o,n,a,s){try{var d=e[a](s),f=d.value}catch(m){t(m);return}d.done?r(f):Promise.resolve(f).then(o,n)}function x(e){return function(){var r=this,t=arguments;return new Promise(function(o,n){var a=e.apply(r,t);function s(f){xd(a,o,n,s,d,"next",f)}function d(f){xd(a,o,n,s,d,"throw",f)}s(void 0)})}}var be=_(()=>{l();c();u()});var os={};k(os,{after:()=>iy,before:()=>ny,instead:()=>ay,unpatchAll:()=>wd});function ty(e,r,t,o){var n=Ea.get(e);if(!n)return r(...t);for(var a of n.b.values()){var s=a.call(o,t);Array.isArray(s)&&(t=s)}var d=[...n.i.values()].reduce((p,E)=>(...I)=>E.call(o,I,p),r)(...t);for(var f of n.a.values())d=f.call(o,t,d)??d;for(var m of n.c)m();return n.c=[],d}function oy(e,r,t){var o=e.deref();if(!o||!o[t].delete(r))return!1;var n=o.p.deref();if(n&&ry.every(s=>o[s].size===0)){var a=o.n;Ea.delete(n[a]),Reflect.defineProperty(n,a,{value:o.o,writable:!0,configurable:!0})||(n[a]=o.o)}return!0}var ry,Ea,wd,Ql,ny,ay,iy,ns=_(()=>{l();c();u();ry=["a","b","i"],wd=()=>Ea=new WeakMap;wd();Ql=e=>(r,t,o,n=!1)=>{var a=t[r];if(typeof a!="function")throw new Error(`${r} is not a function in ${t.constructor.name}`);var s=Ea.get(a);if(!s){s={n:r,o:a,p:new g(t),c:[],b:new Map,i:new Map,a:new Map};var d=new Proxy(a,{apply:(I,P,C)=>f(P,C,!1),construct:(I,P)=>f(a,P,!0),get:(I,P,C,F)=>(F=Reflect.get(I,P,C),(typeof F)[0]=="f"?F.bind(a):F)}),f=(I,P,C)=>ty(d,(...F)=>C?Reflect.construct(a,F,I):a.apply(I,F),P,I);Ea.set(d,s),Reflect.defineProperty(t,r,{value:d,configurable:!0,writable:!0})||(t[r]=d)}var m=Symbol(),p=new g(s),E=()=>oy(p,m,e);return n&&s.c.push(E),s[e].set(m,o),E},ny=Ql("b"),ay=Ql("i"),iy=Ql("a")});function Uo(...e){for(var r of e){if(globalThis.__turboModuleProxy){var t=globalThis.__turboModuleProxy(r);if(t)return t}if(Ed[r])return Ed[r]}}var Ed,Go,ae,En,Tn,Td,Br,lw,lt=_(()=>{"use strict";l();c();u();Ed=globalThis.nativeModuleProxy;Go=Uo("NativeCacheModule","MMKVManager"),ae=Uo("NativeFileModule","RTNFileManager","DCDFileManager"),En=Uo("NativeClientInfoModule","RTNClientInfoManager","InfoDictionaryManager"),Tn=Uo("NativeDeviceModule","RTNDeviceManager","DCDDeviceManager"),Td=Uo("NativeThemeModule","RTNThemeManager","DCDTheme"),Br=Uo("BundleUpdaterManager"),lw=Uo("ImageLoader")});var Ta={};k(Ta,{clearFolder:()=>ec,downloadFile:()=>rc,fileExists:()=>Ot,readFile:()=>Vo,removeCacheFile:()=>Ad,removeFile:()=>Ho,writeFile:()=>ct});function ec(e){return x(function*(r,{prefix:t="pyoncord/"}={}){if(typeof ae.clearFolder!="function")throw new Error("'fs.clearFolder' is not supported");yield ae.clearFolder("documents",`${t}${r}`)}).apply(this,arguments)}function Ho(e){return x(function*(r,{prefix:t="pyoncord/"}={}){if(typeof ae.removeFile!="function")throw new Error("'fs.removeFile' is not supported");yield ae.removeFile("documents",`${t}${r}`)}).apply(this,arguments)}function Ad(e,r="pyoncord/"){return x(function*(){if(typeof ae.removeFile!="function")throw new Error("'fs.removeFile' is not supported");yield ae.removeFile("cache",`${r}${e}`)})()}function Ot(e){return x(function*(r,{prefix:t="pyoncord/"}={}){return yield ae.fileExists(`${ae.getConstants().DocumentsDirPath}/${t}${r}`)}).apply(this,arguments)}function ct(e,r){return x(function*(t,o,{prefix:n="pyoncord/"}={}){if(typeof o!="string")throw new Error("Argument 'data' must be a string");yield ae.writeFile("documents",`${n}${t}`,o,"utf8")}).apply(this,arguments)}function Vo(e){return x(function*(r,{prefix:t="pyoncord/"}={}){try{return yield ae.readFile(`${ae.getConstants().DocumentsDirPath}/${t}${r}`,"utf8")}catch(o){throw new Error(`An error occured while writing to '${r}'`,{cause:o})}}).apply(this,arguments)}function rc(e,r){return x(function*(t,o,{prefix:n="pyoncord/"}={}){var a=yield fetch(t);if(!a.ok)throw new Error(`Failed to download file from ${t}: ${a.status}`);var s=yield a.arrayBuffer(),d=Buffer.from(s).toString("base64");yield ae.writeFile("documents",`${n}${o}`,d,"base64")}).apply(this,arguments)}var Ft=_(()=>{"use strict";l();c();u();be();lt()});function _t(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var as=_(()=>{l();c();u()});function $o(e){return $o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},$o(e)}var tc=_(()=>{l();c();u()});function Aa(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Aa=function(){return!!e})()}var oc=_(()=>{l();c();u()});function Cd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Rd=_(()=>{l();c();u()});function Id(e){"@swc/helpers - typeof";return e&&typeof Symbol<"u"&&e.constructor===Symbol?"symbol":typeof e}var Pd=_(()=>{l();c();u()});function Dd(e,r){return r&&(Id(r)==="object"||typeof r=="function")?r:Cd(e)}var Ld=_(()=>{l();c();u();Rd();Pd()});function oo(e,r,t){return r=$o(r),Dd(e,Aa()?Reflect.construct(r,t||[],$o(e).constructor):r.apply(e,t))}var is=_(()=>{l();c();u();tc();oc();Ld()});function no(e,r){return no=Object.setPrototypeOf||function(o,n){return o.__proto__=n,o},no(e,r)}var ss=_(()=>{l();c();u()});function ao(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&no(e,r)}var ls=_(()=>{l();c();u();ss()});function Ca(e,r,t){return Aa()?Ca=Reflect.construct:Ca=function(n,a,s){var d=[null];d.push.apply(d,a);var f=Function.bind.apply(n,d),m=new f;return s&&no(m,s.prototype),m},Ca.apply(null,arguments)}var Nd=_(()=>{l();c();u();oc();ss()});function Od(e){return Function.toString.call(e).indexOf("[native code]")!==-1}var Fd=_(()=>{l();c();u()});function cs(e){var r=typeof Map=="function"?new Map:void 0;return cs=function(o){if(o===null||!Od(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof r<"u"){if(r.has(o))return r.get(o);r.set(o,n)}function n(){return Ca(o,arguments,$o(this).constructor)}return n.prototype=Object.create(o.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),no(n,o)},cs(e)}var Md=_(()=>{l();c();u();Nd();tc();Fd();ss()});function Ra(e,r,{signal:t,edges:o}={}){var n=void 0,a=null,s=o!=null&&o.includes("leading"),d=o==null||o.includes("trailing"),f=()=>{a!==null&&(e.apply(n,a),n=void 0,a=null)},m=()=>{d&&f(),P()},p=null,E=()=>{p!=null&&clearTimeout(p),p=setTimeout(()=>{p=null,m()},r)},I=()=>{p!==null&&(clearTimeout(p),p=null)},P=()=>{I(),n=void 0,a=null},C=()=>{f()},F=function(...Ce){if(!t?.aborted){n=this,a=Ce;var me=p==null;E(),s&&me&&f()}};return F.schedule=E,F.cancel=P,F.flush=C,t?.addEventListener("abort",P,{once:!0}),F}var Bd=_(()=>{l();c();u()});function Ia(e,r){for(var t={...e},o=0;o{l();c();u()});function us(e){return e!=null}var jd=_(()=>{l();c();u()});var An=_(()=>{l();c();u();Bd();kd();jd()});var Mt,io,fs=_(()=>{"use strict";l();c();u();Mt=(function(e){return e[e.EXISTS=1]="EXISTS",e[e.BLACKLISTED=2]="BLACKLISTED",e[e.ASSET=4]="ASSET",e})({}),io=(function(e){return e[e.FULL_LOOKUP=0]="FULL_LOOKUP",e[e.NOT_FOUND=1]="NOT_FOUND",e})({})});var zo={};k(zo,{_patcherDelaySymbol:()=>Pa,after:()=>xe,before:()=>Yr,default:()=>Da,instead:()=>ut});function nc(e){function r(...o){if(typeof o[1][Pa]=="function"){var n=o[1][Pa],a=!1,s=()=>a=!0;return n(d=>{a||(o[1]=d,s=e.apply(this,o))}),()=>s()}return e.apply(this,o)}function t(...o){var n=o[1];if(!n||!("then"in n))throw new Error("target is not a then-able object");var a=!1,s=()=>a=!0;return n.then(d=>{a||(o[1]=d,s=r.apply(this,o))}),()=>s()}return Object.assign(r,{await:t})}var sy,ly,cy,Pa,xe,Yr,ut,Da,He=_(()=>{"use strict";l();c();u();({after:sy,before:ly,instead:cy}=(ns(),Oe(os))),Pa=Symbol.for("bunny.api.patcher.delay");xe=nc(sy),Yr=nc(ly),ut=nc(cy),Da={after:xe,before:Yr,instead:ut}});var Ud={};k(Ud,{assetsModule:()=>Cn,patchAssets:()=>uy});function uy(e){if(!Cn){Cn=e;var r=xe("registerAsset",Cn,()=>{var t=ic();t!==-1&&sc(t)});return r}}var Cn,ac=_(()=>{"use strict";l();c();u();He();lo();so()});var fy,ds,lc=_(()=>{"use strict";l();c();u();xn();wn();as();fy=(function(e){return e.GET="GET",e.SET="SET",e.DEL="DEL",e})({}),ds=(function(){"use strict";function e(){Ke(this,e),_t(this,"listeners",Object.values(fy).reduce((r,t)=>(r[t]=new Set,r),{}))}return qe(e,[{key:"on",value:function(t,o){this.listeners[t].has(o)||this.listeners[t].add(o)}},{key:"off",value:function(t,o){this.listeners[t].delete(o)}},{key:"once",value:function(t,o){var n=(a,s)=>{this.off(a,n),o(a,s)};this.on(t,n)}},{key:"emit",value:function(t,o){for(var n of this.listeners[t])n(t,o)}}]),e})()});var La={};k(La,{createFilterDefinition:()=>Kr,createSimpleFilter:()=>dy});function Kr(e,r){function t(n,a,s){return Object.assign(n,{filter:e,raw:s,uniq:[s&&"raw::",r(a)].filter(Boolean).join("")})}var o=n=>(...a)=>t((s,d,f)=>e(a,s,d,f),a,n);return Object.assign(o(!1),{byRaw:o(!0),uniqMaker:r})}function dy(e,r){return Kr((t,o)=>e(o),()=>`dynamic::${r}`)()}var ms=_(()=>{"use strict";l();c();u()});var cc={};k(cc,{byDisplayName:()=>uo,byFilePath:()=>hs,byMutableProp:()=>Oa,byName:()=>co,byProps:()=>Na,byStoreName:()=>ps,byTypeName:()=>fo});var Na,co,uo,fo,ps,hs,Oa,Fa=_(()=>{"use strict";l();c();u();ms();so();Na=Kr((e,r)=>e.length===0?r[e[0]]:e.every(t=>r[t]),e=>`bunny.metro.byProps(${e.join(",")})`),co=Kr(([e],r)=>r.name===e,e=>`bunny.metro.byName(${e})`),uo=Kr(([e],r)=>r.displayName===e,e=>`bunny.metro.byDisplayName(${e})`),fo=Kr(([e],r)=>r.type?.name===e,e=>`bunny.metro.byTypeName(${e})`),ps=Kr(([e],r)=>r.getName?.length===0&&r.getName()===e,e=>`bunny.metro.byStoreName(${e})`),hs=Kr(([e,r],t,o,n)=>r===n&&vr[o]?.__filePath===e,([e,r])=>`bunny.metro.byFilePath(${e},${r})`),Oa=Kr(([e],r)=>r?.[e]&&!Object.getOwnPropertyDescriptor(r,e)?.get,e=>`bunny.metro.byMutableProp(${e})`)});function Gd(e,r,t){return e.default&&e.__esModule&&t(e.default,r,!0)?{exports:t.raw?e:e.default,defaultExport:!t.raw}:!t.raw&&t(e,r,!1)?{exports:e,defaultExport:!1}:{}}function uc(e){var{cacheId:r,finish:t}=vs(e.uniq,!1);for(var[o,n]of gs(e.uniq,!1)){var{exports:a,defaultExport:s}=Gd(n,o,e);if(a!==void 0)return r(o,a),{id:o,defaultExport:s}}return t(!0),{}}function my(e){return uc(e)?.id}function cr(e){var{id:r,defaultExport:t}=uc(e);if(r!=null)return t?Ar(r).default:Ar(r)}function fc(e){var{cacheId:r,finish:t}=vs(e.uniq,!0),o=[];for(var[n,a]of gs(e.uniq,!0)){var{exports:s,defaultExport:d}=Gd(a,n,e);s!==void 0&&typeof d=="boolean"&&(o.push({id:n,defaultExport:d}),r(n,s))}return t(o.length===0),o}function py(e){return fc(e).map(r=>r.id)}function mo(e){return fc(e).map(r=>{if(r.id){var{id:t,defaultExport:o}=r;return o?Ar(t).default:Ar(t)}})}var Rn=_(()=>{"use strict";l();c();u();lo();so()});var mc={};k(mc,{getProxyFactory:()=>dc,lazyDestructure:()=>K,proxyLazy:()=>Ve});function Ve(e,r={}){var t,o=r.hint!=="object"?function(){}:{},n=()=>t??=e(),a=new Proxy(o,gy);return Vd.set(a,n),In.set(o,{factory:n,options:r}),a}function K(e,r={}){var t=Ve(e);return new Proxy({},{get(o,n){return n===Symbol.iterator?function*(){throw yield t,yield new Proxy({},{get:(a,s)=>Ve(()=>t[s],r)}),new Error("This is not a real iterator, this is likely used incorrectly")}:Ve(()=>t[n],r)}})}function dc(e){return Vd.get(e)}var Hd,hy,Vd,In,gy,Ne=_(()=>{"use strict";l();c();u();Hd=new Set(["arguments","caller","prototype"]),hy=e=>typeof e=="string"&&Hd.has(e),Vd=new WeakMap,In=new WeakMap,gy={...Object.fromEntries(Object.getOwnPropertyNames(Reflect).map(e=>[e,(r,...t)=>{var o=In.get(r),n=o?.factory();if(!n)throw new Error(`Trying to Reflect.${e} of ${typeof n}`);return Reflect[e](n,...t)}])),has(e,r){var t=In.get(e);if(t?.options){var{exemptedEntries:o}=t.options;if(o&&r in o)return!0}var n=t?.factory();if(!n)throw new Error(`Trying to Reflect.has of ${typeof n}`);return Reflect.has(n,r)},get(e,r,t){if(r==="__IS_BUNNY_LAZY_PROXY__")return!0;var o=In.get(e);if(o?.options){var{exemptedEntries:n}=o.options;if(n?.[r])return n[r]}var a=o?.factory();if(!a)throw new Error(`Trying to Reflect.get of ${typeof a}`);return Reflect.get(a,r,t)},ownKeys:e=>{var r=In.get(e),t=r?.factory();if(!t)throw new Error(`Trying to Reflect.ownKeys of ${typeof t}`);var o=Reflect.ownKeys(t);return Hd.forEach(n=>!o.includes(n)&&o.push(n)),o},getOwnPropertyDescriptor:(e,r)=>{if(hy(r))return Reflect.getOwnPropertyDescriptor(e,r);var t=In.get(e),o=t?.factory();if(!o)throw new Error(`Trying to getOwnPropertyDescriptor of ${typeof o}`);var n=Reflect.getOwnPropertyDescriptor(o,r);return n&&Object.defineProperty(e,r,n),n}}});var pc={};k(pc,{_lazyContextSymbol:()=>ys,createLazyModule:()=>bt,getLazyContext:()=>zd});function vy(e){var r=Bt().findIndex[e.uniq];if(r){for(var t in r)if(t[0]!=="_")return Number(t)}}function yy(e,r){var t=zd(e);if(!t)throw new Error("Subscribing a module for non-proxy-find");if(!t.indexed)throw new Error("Attempting to subscribe to a non-indexed find");return hc(t.moduleId,()=>{r(cr(t.filter))})}function zd(e){return $d.get(e)}function bt(e){var r=void 0,t=vy(e),o={filter:e,indexed:!!t,moduleId:t,getExports(a){return!t||vr[t]?.isInitialized?(a(this.forceLoad()),()=>{}):this.subscribe(a)},subscribe(a){return yy(n,a)},get cache(){return r},forceLoad(){if(r??=cr(e),!r)throw new Error(`${e.uniq} is ${typeof r}! (id ${o.moduleId??"unknown"})`);return r}},n=Ve(()=>o.forceLoad(),{exemptedEntries:{[ys]:o,[Pa]:a=>o.getExports(a)}});return $d.set(n,o),n}var ys,$d,Ma=_(()=>{"use strict";l();c();u();He();Ne();Rn();lo();so();ys=Symbol.for("bunny.metro.lazyContext"),$d=new WeakMap});var L,U,gc,_s,Sr,vc,yc,_c,bc,Sc,_y,xc,Wo,kt,wc,Pn,Le=_(()=>{"use strict";l();c();u();Fa();Rn();Ma();L=(...e)=>cr(Na(...e)),U=(...e)=>bt(Na(...e)),gc=(...e)=>mo(Na(...e)),_s=(e,r=!0)=>cr(r?co(e):co.byRaw(e)),Sr=(e,r=!0)=>bt(r?co(e):co.byRaw(e)),vc=(e,r=!0)=>mo(r?co(e):co.byRaw(e)),yc=(e,r=!0)=>cr(r?uo(e):uo.byRaw(e)),_c=(e,r=!0)=>bt(r?uo(e):uo.byRaw(e)),bc=(e,r=!0)=>mo(r?uo(e):uo.byRaw(e)),Sc=(e,r=!0)=>cr(r?fo(e):fo.byRaw(e)),_y=(e,r=!0)=>bt(r?fo(e):fo.byRaw(e)),xc=(e,r=!0)=>mo(r?fo(e):fo.byRaw(e)),Wo=e=>cr(ps(e)),kt=e=>bt(ps(e)),wc=(e,r=!1)=>cr(hs(e,r)),Pn=(e,r=!1)=>bt(hs(e,r))});var po=Nt((HT,Wd)=>{"use strict";l();c();u();Le();Wd.exports={react:U("createElement"),"react-native":U("AppRegistry"),util:U("inspect","isNullOrUndefined"),moment:U("isMoment"),"chroma-js":U("brewer"),lodash:U("forEachRight"),"react-native-webview":U("WebView")}});var re=Nt((WT,Yd)=>{l();c();u();Yd.exports=po()["react-native"]});function jt(e={}){var r=new ds,t=new WeakMap,o=new WeakSet;function n(a,s){return new Proxy(a,{get(d,f){if(f===Ba)return r;if(typeof f=="symbol")return d[f];var m=[...s,f],p=d[f];if(p!=null){if(r.emit("GET",{path:m,value:p}),typeof p=="object"){if(o.has(p))return p;if(t.has(p))return t.get(p);var E=n(p,m);return t.set(p,E),E}return p}return p},set(d,f,m){if(typeof m=="object")if(t.has(m))d[f]=t.get(m);else{var p=n(m,[...s,f]);t.set(m,p),o.add(m),d[f]=p}else d[f]=m;return r.emit("SET",{path:[...s,f],value:d[f]}),!0},deleteProperty(d,f){var m=typeof d[f]=="object"?t.get(d[f]):d[f],p=delete d[f];return p&&r.emit("DEL",{value:m,path:[...s,f]}),p}})}return{proxy:n(e,[]),emitter:r}}function ie(e){var[,r]=React.useReducer(t=>~t,0);return React.useEffect(()=>{if(e){var t,o=a=>{var s=a?.[Ba];if(s){var d=(f,m)=>{f==="DEL"&&m.value===a||r()};s.on("SET",d),s.on("DEL",d),t=()=>{s.off("SET",d),s.off("DEL",d)}}},n=e?.[Ba];return n?o(e):typeof e?.[bs]=="function"&&e[bs](()=>{o(e),r()}),()=>{t?.()}}},[e]),e}function Cr(e){return x(function*(){var r=yield e.get(),{proxy:t,emitter:o}=jt(r),n=()=>e.set(t);return o.on("SET",n),o.on("DEL",n),t})()}function qr(e){var r=void 0,t=[],o=n=>r?n():t.push(n);return e.then(n=>{r=n,t.forEach(a=>a())}),new Proxy({},{...Object.fromEntries(Object.getOwnPropertyNames(Reflect).map(n=>[n,(a,...s)=>Reflect[n](r??a,...s)])),get(n,a,s){return a===bs?o:a===Ba?r?.[Ba]:Reflect.get(r??n,a,s)}})}function Ut(...e){return Promise.all(e.map(r=>new Promise(t=>r[bs](t))))}var Tc,Ba,bs,Kd,qd,Ec,Ac,Ss,St,Xd,Yo,$e=_(()=>{"use strict";l();c();u();be();lc();lt();Tc=H(re()),Ba=Symbol.for("vendetta.storage.emitter"),bs=Symbol.for("vendetta.storage.accessor");Kd=/[<>:"/\\|?*]/g,qd=new Map,Ec=e=>Tc.Platform.select({default:e,ios:ae.saveFileToGallery?e:`Documents/${e}`}),Ac=e=>(Kd.test(e)&&(e=e.replace(Kd,"-").replace(/-+/g,"-")),`vd_mmkv/${e}`),Ss=e=>x(function*(){(yield Go.getItem(e))&&Go.removeItem(e);var r=Ac(e);(yield ae.fileExists(`${ae.getConstants().DocumentsDirPath}/${r}`))&&(yield ae.removeFile?.("documents",r))})(),St=(e,r={})=>{var t=Ac(e),o=JSON.stringify(r);return Yo(t,r,x(function*(){var n=`${ae.getConstants().DocumentsDirPath}/${t}`;if(!(yield ae.fileExists(n))){var a=(yield Go.getItem(e))??o;if(a==="!!LARGE_VALUE!!"){var s=`${ae.getConstants().CacheDirPath}/mmkv/${e}`;(yield ae.fileExists(s))?a=yield ae.readFile(s,"utf8"):(console.log(`${e}: Experienced data loss :(`),a=o)}try{JSON.parse(a)}catch{console.error(`${e} had an unparseable data while migrating`),a=o}yield ae.writeFile("documents",Ec(t),a,"utf8"),(yield Go.getItem(e))!==null&&(Go.removeItem(e),console.log(`Successfully migrated ${e} store from MMKV storage to fs`))}})())},Xd=(e,r={})=>{var t=Ac(e),o=JSON.stringify(r),n={...r};x(function*(){try{var s=yield Go.getItem(e);if(s){var d=JSON.parse(s);Object.assign(n,d)}}catch{}try{var f=`${ae.getConstants().DocumentsDirPath}/${t}`;if(yield ae.fileExists(f)){var m=yield ae.readFile(f,"utf8"),p=JSON.parse(m);Object.assign(n,p)}}catch{}})();var a=s=>Tc.Platform.select({default:s,ios:ae.saveFileToGallery?s:`Documents/${s}`});return{get:()=>x(function*(){return n})(),set:s=>x(function*(){Object.assign(n,s);try{var d=qd.get(e);d&&clearTimeout(d);var f=setTimeout(()=>x(function*(){try{yield ae.writeFile("documents",a(t),JSON.stringify(n),"utf8")}catch{}})(),120);qd.set(e,f)}catch{}})()}},Yo=(e,r={},t)=>({get:()=>x(function*(){yield t;var o=`${ae.getConstants().DocumentsDirPath}/${e}`;if(yield ae.fileExists(o)){var n=yield ae.readFile(o,"utf8");try{return JSON.parse(n)}catch{}}return yield ae.writeFile("documents",Ec(e),JSON.stringify(r),"utf8"),JSON.parse(yield ae.readFile(o,"utf8"))})(),set:o=>x(function*(){yield t,yield ae.writeFile("documents",Ec(e),JSON.stringify(o),"utf8")})()})});function xs(e,r){return r.get?r.get.call(e):r.value}var Cc=_(()=>{l();c();u()});function ws(e,r,t){if(!r.has(e))throw new TypeError("attempted to "+t+" private field on non-instance");return r.get(e)}var Rc=_(()=>{l();c();u()});function Ae(e,r){var t=ws(e,r,"get");return xs(e,t)}var Jd=_(()=>{l();c();u();Cc();Rc()});function Es(e,r){if(r.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}var Ic=_(()=>{l();c();u()});function Qe(e,r,t){Es(e,r),r.set(e,t)}var Zd=_(()=>{l();c();u();Ic()});function Qd(e,r,t){if(r.set)r.set.call(e,t);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=t}}var em=_(()=>{l();c();u()});function er(e,r,t){var o=ws(e,r,"set");return Qd(e,o,t),t}var rm=_(()=>{l();c();u();em();Rc()});function tm(e,r,t){if(!r.has(e))throw new TypeError("attempted to get private field on non-instance");return t}var om=_(()=>{l();c();u()});function nm(e,r){Es(e,r),r.add(e)}var am=_(()=>{l();c();u();Ic()});function im(e,r){if(e!==r)throw new TypeError("Private static access of wrong provenance")}var sm=_(()=>{l();c();u()});function lm(e,r){if(e===void 0)throw new TypeError("attempted to "+r+" private static field before its declaration")}var cm=_(()=>{l();c();u()});function ho(e,r,t){return im(e,r),lm(t,"get"),xs(e,t)}var um=_(()=>{l();c();u();Cc();sm();cm()});var Em={};k(Em,{Filter:()=>wm,ObjectObserver:()=>My,Observable:()=>Xo,Validator:()=>pm});function Sy(e,r){var t=e[r],o=[new Ie(Zo,[r],void 0,t,this.proxy)];Gt(this,o),delete e[r];var n=Qo(t),a=[new Ie(Zo,[r],void 0,n,this.proxy)];return Xr(this,a),!0}function xy(e,r,t){var o=e[r];if(t!==o){var n=o===void 0?[new Ie(go,[r],t,void 0,this.proxy)]:[new Ie(Jo,[r],t,o,this.proxy)];Gt(this,n);var a=vo(t,r,this);e[r]=a;var s=Qo(o),d=s===void 0?[new Ie(go,[r],a,void 0,this.proxy)]:[new Ie(Jo,[r],a,s,this.proxy)];Xr(this,d)}return!0}function hm(e,r,t){var o=this[Xe],n=o.target,a=n.length;e=e<0?Math.max(a+e,0):e,r=r===void 0?0:r<0?Math.max(a+r,0):Math.min(r,a),t=t===void 0?a:t<0?Math.max(a+t,0):Math.min(t,a);var s=Math.min(t-r,a-e);if(e0){var d=n.slice(0),f=[];n.copyWithin(e,r,t);for(var m=e;mr){n.fill(e,r,t);for(var f=r;f0){for(var a=o.slice(r,r+n),s=new Array(n),d=0;dnew Ie(f.type,[...t,...f.path],f.value,f.oldValue,f.object)),s=0,d=n.length;s!(o in wy));if(r.length)throw new Error(`'${r.join(", ")}' is/are not a valid Observable option/s`);if(er(this,Ns,!!e.async),e.validators!==void 0){if(!Array.isArray(e.validators)||e.validators.length===0)throw new Error('"validators" option, if/when provided, MUST be a non-empty array of Validator instances');for(var t of e.validators)if(!(t instanceof pm))throw new Error('"validators" option, if/when provided, MUST be a non-empty array of Validator instances');Ae(this,Os).push(...e.validators)}}}var Ts,ka,As,Cs,Rs,ja,Is,Ps,Pc,Dn,Ln,Ds,Dc,Ns,Os,Lc,Nc,fm,Ls,Ko,Nn,On,qo,Xe,go,Jo,Zo,dm,mm,Ie,pm,wy,Oc,Iy,_m,bm,Dy,Sm,wm,Fy,Xo,My,Tm=_(()=>{l();c();u();is();xn();Jd();Zd();rm();om();am();um();wn();as();ls();Xe=Symbol.for("object-observer-meta-key-0"),go="insert",Jo="update",Zo="delete",dm="reverse",mm="shuffle",Ie=(Ts=new WeakMap,ka=new WeakMap,As=new WeakMap,Cs=new WeakMap,Rs=new WeakMap,ja=new WeakMap,(function(){"use strict";function e(r,t,o,n,a){Ke(this,e),Qe(this,Ts,{writable:!0,value:void 0}),Qe(this,ka,{writable:!0,value:void 0}),Qe(this,As,{writable:!0,value:void 0}),Qe(this,Cs,{writable:!0,value:void 0}),Qe(this,Rs,{writable:!0,value:void 0}),Qe(this,ja,{writable:!0,value:void 0}),er(this,Ts,r),er(this,ka,t),er(this,As,o),er(this,Cs,n),er(this,Rs,a)}return qe(e,[{key:"type",get:function(){return Ae(this,Ts)}},{key:"path",get:function(){return Ae(this,ka)}},{key:"value",get:function(){return Ae(this,As)}},{key:"oldValue",get:function(){return Ae(this,Cs)}},{key:"object",get:function(){return Ae(this,Rs)}},{key:"pathAsString",get:function(){return Ae(this,ja)===void 0&&er(this,ja,Ae(this,ka).join(".")),Ae(this,ja)}}]),e})()),pm=(Is=new WeakMap,Ps=(function(){"use strict";function e(r,t){if(Ke(this,e),Qe(this,Is,{writable:!0,value:void 0}),r!==ho(e,Ps,Pc))throw new Error("Validator class cannot be instantiated directly; use provided factory methods");er(this,Is,t)}return qe(e,[{key:"validate",get:function(){return Ae(this,Is)}}],[{key:"custom",value:function(t){if(typeof t!="function")throw new Error("custom Validator requires a function as argument");return new e(ho(e,Ps,Pc),t)}}]),e})(),Pc={writable:!0,value:Symbol("ValidatorPrivateConstructorKey")},Ps);wy={async:1,validators:1},Oc=(Dn=new WeakMap,Ln=new WeakMap,Ds=new WeakMap,Dc=new WeakMap,Ns=new WeakMap,Os=new WeakMap,Lc=new WeakMap,Nc=new WeakSet,fm=(function(){"use strict";function e(r){Ke(this,e),nm(this,Nc),Qe(this,Dn,{writable:!0,value:void 0}),_t(this,"ownKey",void 0),Qe(this,Ln,{writable:!0,value:void 0}),Qe(this,Ds,{writable:!0,value:void 0}),Qe(this,Dc,{writable:!0,value:void 0}),Qe(this,Ns,{writable:!0,value:!1}),_t(this,"batches",new Map),_t(this,"set",void 0),_t(this,"deleteProperty",void 0),Qe(this,Os,{writable:!0,value:[]}),Qe(this,Lc,{writable:!0,value:[]}),this.set=xy,this.deleteProperty=Sy;var{target:t,parent:o,ownKey:n,options:a,visited:s=new Set}=r;o&&n!==void 0?(er(this,Dn,o),this.ownKey=n):(er(this,Dn,null),this.ownKey=null),s.add(t),er(this,Ln,this.observedGraphProcessor(t,this,s)),s.delete(t);var d=Proxy.revocable(Ae(this,Ln),this);er(this,Ds,d.proxy),er(this,Dc,d.revoke),tm(this,Nc,By).call(this,a)}return qe(e,[{key:"detach",value:function(){return er(this,Dn,null),Ae(this,Ln)}},{key:"parent",get:function(){return Ae(this,Dn)}},{key:"target",get:function(){return Ae(this,Ln)}},{key:"proxy",get:function(){return Ae(this,Ds)}},{key:"async",get:function(){return Ae(this,Ns)}},{key:"validators",get:function(){return Ae(this,Os)}},{key:"observers",get:function(){return Ae(this,Lc)}}]),e})(),fm);Iy={copyWithin:hm,fill:gm,pop:Ey,push:Ty,reverse:vm,shift:Ay,sort:ym,splice:Cy,unshift:Ry},_m=(function(e){"use strict";ao(r,e);function r(){return Ke(this,r),oo(this,r,arguments)}return qe(r,[{key:"get",value:function(o,n){return Iy[n]||o[n]}},{key:"observedGraphProcessor",value:function(o,n,a){for(var s=o.length,d=new Array(s),f=0;fn.filter(a=>o.has(a.pathAsString)))}},{key:"pathsStartWith",value:function(t){if(typeof t!="string"||t==="")throw new Error("pathsStartWith Filter requires a non-empty string as argument");return new e(ho(e,Ko,Nn),o=>o.filter(n=>n.pathAsString.startsWith(t)))}},{key:"directChildrenOf",value:function(t){if(typeof t!="string")throw new Error("directChildrenOf Filter requires a string as argument (MAY be empty)");var o=t.split(".").filter(Boolean),n=o.length,a=o.join(".");return new e(ho(e,Ko,Nn),s=>s.filter(d=>{var f=d.path,m=f.length;if(m===n+1){for(var p=0;p{if(!e||typeof e!="object")return null;var r={},t=[];for(var[o,n]of Object.entries(e))if(o==="filters"){if(!Array.isArray(n)||n.length===0)throw new Error('"filters" option, if/when provided, MUST be a non-empty array of Filter instances');for(var a=new Array(n.length),s=0;s!!(e&&e[Xe]),observe:(e,r,t)=>{if(!Xo.isObservable(e))throw new Error("invalid observable parameter");if(typeof r!="function")throw new Error(`observer MUST be a function, got '${r}'`);var o=e[Xe].observers;o.some(n=>n[0]===r)?console.warn("observer may be bound to an observable only once; will NOT rebind"):o.push([r,Fy(t)])},unobserve:(e,...r)=>{if(!Xo.isObservable(e))throw new Error("invalid observable parameter");var t=e[Xe].observers,o=t.length;if(o){if(!r.length){t.splice(0);return}for(;o;)r.indexOf(t[--o][0])>=0&&t.splice(o,1)}}}),My=(On=new WeakMap,qo=new WeakMap,(function(){"use strict";function e(r){Ke(this,e),Qe(this,On,{writable:!0,value:void 0}),Qe(this,qo,{writable:!0,value:void 0}),er(this,On,r),er(this,qo,new Set),Object.freeze(this)}return qe(e,[{key:"observe",value:function(t,o){var n=Xo.from(t);return Xo.observe(n,Ae(this,On),o),Ae(this,qo).add(n),n}},{key:"unobserve",value:function(t){Xo.unobserve(t,Ae(this,On)),Ae(this,qo).delete(t)}},{key:"disconnect",value:function(){for(var t of Ae(this,qo))Xo.unobserve(t,Ae(this,On));Ae(this,qo).clear()}}]),e})())});var kc={};k(kc,{awaitStorage:()=>en,createStorage:()=>yo,createStorageAndCallback:()=>Bc,createStorageAsync:()=>ky,getPreloadedStorage:()=>Ms,preloadStorageIfExists:()=>Ga,purgeStorage:()=>Mn,updateStorage:()=>Mc,useObservable:()=>Ht});function Fn(){if(Fs)return Fs;var e=(Tm(),Oe(Em));return Fs=e.Observable??e,Fs}function Fc(e){var r=Ra(t=>{ct(e,JSON.stringify(t))},500);return{get:()=>x(function*(){try{return JSON.parse(yield Vo(e))}catch(t){throw new Error(`Failed to parse storage from '${e}'`,{cause:t})}})(),set:t=>x(function*(){if(!t||typeof t!="object")throw new Error("data needs to be an object");r(t)})(),exists:()=>x(function*(){return yield Ot(e)})()}}function Ht(e,r){if(e.some(o=>o?.[Am]))throw new Error("An error occured while initializing the storage");if(e.some(o=>!Fn().isObservable(o)))throw new Error("Argument passed isn't an Observable");var[,t]=React.useReducer(o=>~o,0);React.useEffect(()=>{var o=()=>t();return e.forEach(n=>Fn().observe(n,o,r)),()=>{e.forEach(n=>Fn().unobserve(n,o))}},[])}function Mc(e,r){return x(function*(){xt[e]=r,Fc(e).set(r)})()}function Bc(e,r,{dflt:t={},nullIfEmpty:o=!1}={}){var n,a=d=>{var f=new Proxy(Fn().from(d),{get(p,E,I){return E===Symbol.for("vendetta.storage.emitter")?n||(n=new ds,Fn().observe(p,P=>{for(var C of P)n.emit(C.type!=="delete"?"SET":"DEL",{path:C.path,value:C.value})}),n):Reflect.get(p,E,I)}}),m=()=>s.set(f);Fn().observe(f,m),r(f)},s=Fc(e);xt[e]?a(xt[e]):s.exists().then(d=>x(function*(){d?a(xt[e]=yield s.get()):o?a(xt[e]=null):(xt[e]=t,yield s.set(t),a(t))})())}function ky(e){return x(function*(r,t={}){return new Promise(o=>Bc(r,o,t))}).apply(this,arguments)}function Ga(e){return x(function*(){if(xt[e])return!0;var r=Fc(e);return(yield r.exists())?(xt[e]=yield r.get(),!0):!1})()}function Mn(e){return x(function*(){yield Ho(e),delete xt[e]})()}function en(...e){return Promise.all(e.map(r=>r[Cm]))}function Ms(e){return xt[e]}var Fs,Am,Cm,xt,yo,ft=_(()=>{"use strict";l();c();u();be();lc();Ft();An();Fs=null;Am=Symbol.for("bunny.storage.initError"),Cm=Symbol.for("bunny.storage.promise"),xt={};yo=(e,r={})=>{var t=new Promise(f=>s=f),o,n,a,s;Bc(e,f=>{o=f,n=!0,s()},r);var d=()=>{if(n)return!0;throw new Error(`Attempted to access storage without initializing: ${e}`)};return new Proxy({},{...Object.fromEntries(Object.getOwnPropertyNames(Reflect).map(f=>[f,(m,...p)=>d()&&Reflect[f](o,...p)])),get(f,m,p){return m===Am?a:m===Cm?t:d()&&Reflect.get(o??f,m,p)}})}});var Wc={};k(Wc,{DISCORD_SERVER:()=>jc,GITHUB:()=>Uc,HTTP_REGEX:()=>jy,HTTP_REGEX_MULTI:()=>Gc,KETTU_DISCORD_SERVER_ID:()=>$c,KETTU_PLUGINS_CHANNEL_ID:()=>zc,KETTU_THEMES_CHANNEL_ID:()=>$a,NEXPID_PLUGINS_REPO_URL:()=>Uy,OFFICIAL_PLUGINS_REPO_URL:()=>rn,VD_DISCORD_SERVER_ID:()=>Hc,VD_PLUGINS_CHANNEL_ID:()=>Vc,VD_PROXY_PREFIX:()=>Ha,VD_THEMES_CHANNEL_ID:()=>Va});var jc,Uc,jy,Gc,Uy,rn,Ha,Hc,Vc,Va,$c,zc,$a,Bn=_(()=>{"use strict";l();c();u();jc="https://discord.gg/nQykFF9Ud6",Uc="https://github.com/kmmiio99o/ShiggyCord",jy=/^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/,Gc=/https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&\/=]*)/g,Uy="https://revenge.nexpid.xyz",rn="https://raw.githubusercontent.com/Purple-EyeZ/Plugins-List/refs/heads/main/src/plugins-data.json",Ha="https://vd-plugins.github.io/proxy",Hc="1427396621905432699",Vc="1432796541210333284",Va="1408405946434195540",$c="1368145952266911755",zc="1432796541210333284",$a="1408405946434195540"});function Bs(e,r=0){for(var t=3735928559^r,o=1103547991^r,n=0,a;n>>16,2246822507),t^=Math.imul(o^o>>>13,3266489909),o=Math.imul(o^o>>>16,2246822507),o^=Math.imul(t^t>>>13,3266489909),[o>>>0,t>>>0]}function Rm(e,r=0){var[t,o]=Bs(e,r);return t.toString(36).padStart(7,"0")+o.toString(36).padStart(7,"0")}var Yc=_(()=>{"use strict";l();c();u()});function Vt(e,r){return $t(e,r,{walkable:["props","children","child","sibling"]})}var Im=_(()=>{"use strict";l();c();u();Jr()});function Kc(e,r,t,o,n,a){if(!(a>n)&&e){try{if(r(e))return e}catch{}if(Array.isArray(e)){for(var s of e)if(!(typeof s!="object"||s===null))try{var d=Kc(s,r,t,o,n,a+1);if(d)return d}catch{}}else if(typeof e=="object"){for(var f in e)if(Object.prototype.hasOwnProperty.call(e,f)!==!1&&!(typeof e[f]!="object"||e[f]===null)&&!(t.size&&!t.has(f))&&!(o.size&&o.has(f)))try{var m=Kc(e[f],r,t,o,n,a+1);if(m)return m}catch{}}}}function $t(e,r,{walkable:t=[],ignore:o=[],maxDepth:n=100}={}){return Kc(e,r,new Set(t),new Set(o),n,0)}var Pm=_(()=>{"use strict";l();c();u()});function qc(e,r,t){var o=e;if(r in e)return void t(o[r]);var n;return Object.defineProperty(o,r,{get:()=>n,set(a){n=t(a)??a},configurable:!0,enumerable:!1}),()=>{delete o[r],o[r]=n}}var Dm=_(()=>{"use strict";l();c();u()});function Xc(e,r){if(!e){var t=typeof r=="function"?r():r,o="[Invariant Violation]",n=t?`${o}: ${t}`:o;throw new Error(n)}}var Lm=_(()=>{"use strict";l();c();u()});var Jc={};k(Jc,{LoggerClass:()=>Ja,connectToDebugger:()=>Vy,disconnectFromDebugger:()=>$y,isConnectedToDebugger:()=>zy,logger:()=>A});function Nm(e){return JSON.stringify(e)}function kn(e,...r){if(xr?.readyState===WebSocket.OPEN){var t={type:"log",data:{level:e,message:r}};xr.send(Nm(t))}}function Hy(){za=console.log,console.log=function(...e){za.apply(console,e),kn("default",...e)},Wa=console.error,console.error=function(...e){Wa.apply(console,e),kn("error",...e)},Ya=console.warn,console.warn=function(...e){Ya.apply(console,e),kn("warn",...e)},A&&(Ka=A.log,A.log=function(...e){Ka.apply(A,e),kn("default",...e)},qa=A.error,A.error=function(...e){qa.apply(A,e),kn("error",...e)},Xa=A.warn,A.warn=function(...e){Xa.apply(A,e),kn("warn",...e)})}function ks(){za&&(console.log=za,za=void 0),Wa&&(console.error=Wa,Wa=void 0),Ya&&(console.warn=Ya,Ya=void 0),A&&(Ka&&(A.log=Ka,Ka=void 0),qa&&(A.error=qa,qa=void 0),Xa&&(A.warn=Xa,Xa=void 0))}function Vy(e){if(xr!==void 0&&xr.readyState!==WebSocket.CLOSED&&(ks(),xr.close()),!e){console.error("Invalid debugger URL!");return}try{xr=new WebSocket(`ws://${e}`),xr.addEventListener("open",()=>{console.log("Connected to debugger.");var r={type:"hello",data:{version:Gy}};xr?.send(Nm(r)),Hy()}),xr.addEventListener("message",r=>{try{var t=JSON.parse(r.data);if(t.type==="run"&&t.data?.code)try{(0,eval)(t.data.code)}catch(o){console.error("Error executing remote code:",o)}}catch(o){console.error("Error processing message:",o)}}),xr.addEventListener("close",()=>{console.log("Disconnected from debugger."),ks()}),xr.addEventListener("error",r=>{console.error(`Debugger error: ${r.message}`),ks()})}catch(r){console.error("Failed to connect to debugger:",r)}}function $y(){xr&&(ks(),xr.close(),xr=void 0)}function zy(){return xr?.readyState===WebSocket.OPEN}var Ja,A,xr,za,Wa,Ya,Ka,qa,Xa,Gy,yr=_(()=>{"use strict";l();c();u();Le();Ja=Sr("Logger"),A=new Ja("ShiggyCord"),Gy=1});function ze(e,r,t=1e4){return x(function*(){var o=yield fetch(e,{signal:Wy(t),...r});if(!o.ok)throw new Error(`Request returned non-ok: ${o.status} ${o.statusText}`);return o})()}function Wy(e){var r=new AbortController;return setTimeout(()=>r.abort(`Timed out after ${e}ms`),e),r.signal}var js=_(()=>{"use strict";l();c();u();be()});var Us={};k(Us,{constants:()=>Wc,cyrb64:()=>Bs,findInReactTree:()=>Vt,findInTree:()=>$t,hookDefineProperty:()=>qc,invariant:()=>Xc,lazy:()=>mc,logger:()=>Jc,safeFetch:()=>ze});var Jr=_(()=>{"use strict";l();c();u();Bn();Yc();Im();Pm();Dm();Lm();Ne();yr();js()});var Zc={};k(Zc,{Fragment:()=>jn,jsx:()=>i,jsxs:()=>b});function Fm(e){if(!e[0])throw new Error("The first argument (Component) is falsy. Ensure that you are passing a valid component.");var r=dc(e[0]);return r&&(e[0]=r()),e}var Om,jn,i,b,ne=_(()=>{"use strict";l();c();u();Ne();Le();Om=U("jsx","jsxs","Fragment");jn=Symbol.for("react.fragment"),i=(...e)=>Om.jsx(...Fm(e)),b=(...e)=>Om.jsxs(...Fm(e))});var Ge,Za=_(()=>{"use strict";l();c();u();ft();Ge=yo("themes/colors/preferences.json",{dflt:{selected:null,customBackground:null}})});var Vs={};k(Vs,{ActionSheet:()=>rr,ActionSheetRow:()=>Ky,AlertActionButton:()=>Gn,AlertActions:()=>su,AlertModal:()=>ti,Avatar:()=>cu,AvatarPile:()=>lu,BottomSheetTitleHeader:()=>Qr,Button:()=>Z,Card:()=>de,CompatButton:()=>Qc,CompatSegmentedControl:()=>l_,ContextMenu:()=>o_,FlashList:()=>du,FloatingActionButton:()=>uu,FormCheckbox:()=>r_,FormRadio:()=>iu,FormSwitch:()=>au,Forms:()=>Gs,HelpMessage:()=>ei,IconButton:()=>we,LegacyAlert:()=>Qa,LegacyForm:()=>u_,LegacyFormArrow:()=>f_,LegacyFormCTA:()=>d_,LegacyFormCTAButton:()=>m_,LegacyFormCardSection:()=>p_,LegacyFormCheckbox:()=>h_,LegacyFormCheckboxRow:()=>g_,LegacyFormCheckmark:()=>v_,LegacyFormDivider:()=>y_,LegacyFormHint:()=>__,LegacyFormIcon:()=>b_,LegacyFormInput:()=>fu,LegacyFormLabel:()=>S_,LegacyFormRadio:()=>x_,LegacyFormRadioGroup:()=>w_,LegacyFormRadioRow:()=>E_,LegacyFormRow:()=>oi,LegacyFormSection:()=>T_,LegacyFormSelect:()=>A_,LegacyFormSliderRow:()=>C_,LegacyFormSubLabel:()=>R_,LegacyFormSwitch:()=>I_,LegacyFormSwitchRow:()=>P_,LegacyFormTernaryCheckBox:()=>D_,LegacyFormText:()=>Hs,LegacyFormTitle:()=>L_,PressableScale:()=>Xy,RedesignCompat:()=>t_,RowButton:()=>qy,SafeAreaProvider:()=>eu,SafeAreaView:()=>ri,SegmentedControl:()=>a_,SegmentedControlPages:()=>i_,Stack:()=>oe,TableCheckbox:()=>e_,TableCheckboxRow:()=>zt,TableRadio:()=>Qy,TableRadioGroup:()=>Jy,TableRadioRow:()=>Zy,TableRow:()=>B,TableRowGroup:()=>pe,TableRowIcon:()=>Un,TableRowTrailingText:()=>ou,TableSwitch:()=>nu,TableSwitchRow:()=>dt,Text:()=>D,TextArea:()=>n_,TextInput:()=>ur,TwinButtons:()=>tu,useSafeAreaInsets:()=>ru,useSegmentedControlState:()=>s_});var Yy,Zr,Pe,Qa,Qc,ei,ri,eu,ru,Ky,Z,tu,we,qy,Xy,B,Un,ou,pe,Jy,Zy,dt,zt,nu,Qy,e_,au,iu,r_,de,t_,ti,Gn,su,lu,o_,oe,cu,ur,n_,a_,i_,s_,l_,uu,rr,Qr,c_,D,Gs,u_,f_,d_,m_,p_,h_,g_,v_,y_,__,b_,fu,S_,x_,w_,E_,oi,T_,A_,C_,R_,I_,P_,D_,Hs,L_,du,ce=_(()=>{"use strict";l();c();u();Ne();ms();Rn();Le();Yy=Kr(([e],r)=>r[e]&&Object.keys(r).length===1,e=>`bunny.metro.common.components.bySingularProp(${e})`),Zr=e=>Ve(()=>cr(Yy(e))?.[e]),Pe=(...e)=>Ve(()=>L(...e)[e[0]]),Qa=_c("FluxContainer(Alert)"),Qc=U("Looks","Colors","Sizes"),ei=Sr("HelpMessage"),{SafeAreaView:ri,SafeAreaProvider:eu,useSafeAreaInsets:ru}=K(()=>L("useSafeAreaInsets")),Ky=Pe("ActionSheetRow"),Z=Zr("Button"),tu=Pe("TwinButtons"),we=Zr("IconButton"),qy=Pe("RowButton"),Xy=Pe("PressableScale"),B=Pe("TableRow"),Un=Pe("TableRowIcon"),ou=Pe("TableRowTrailingText"),pe=Pe("TableRowGroup"),Jy=Pe("TableRadioGroup"),Zy=Pe("TableRadioRow"),dt=Pe("TableSwitchRow"),zt=Pe("TableCheckboxRow"),nu=Zr("FormSwitch"),Qy=Zr("FormRadio"),e_=Zr("FormCheckbox"),au=Zr("FormSwitch"),iu=Zr("FormRadio"),r_=Zr("FormCheckbox"),de=Pe("Card"),t_=Ve(()=>L("RedesignCompat").RedesignCompat),ti=Pe("AlertModal"),Gn=Pe("AlertActionButton"),su=Pe("AlertActions"),lu=Zr("AvatarPile"),o_=Pe("ContextMenu"),oe=Pe("Stack"),cu=Pe("default","AvatarSizes","getStatusSize"),ur=Zr("TextInput"),n_=Zr("TextArea"),a_=Pe("SegmentedControl"),i_=Pe("SegmentedControlPages"),s_=Zr("useSegmentedControlState"),l_=Pe("CompatSegmentedControl"),uu=Pe("FloatingActionButton"),rr=Pe("ActionSheet"),Qr=Pe("BottomSheetTitleHeader"),c_=U("Text","LegacyText"),D=Ve(()=>c_.Text),Gs=U("Form","FormSection"),{Form:u_,FormArrow:f_,FormCTA:d_,FormCTAButton:m_,FormCardSection:p_,FormCheckbox:h_,FormCheckboxRow:g_,FormCheckmark:v_,FormDivider:y_,FormHint:__,FormIcon:b_,FormInput:fu,FormLabel:S_,FormRadio:x_,FormRadioGroup:w_,FormRadioRow:E_,FormRow:oi,FormSection:T_,FormSelect:A_,FormSliderRow:C_,FormSubLabel:R_,FormSwitch:I_,FormSwitchRow:P_,FormTernaryCheckBox:D_,FormText:Hs,FormTitle:L_}=K(()=>Gs),du=Pe("FlashList")});var zs={};k(zs,{Flux:()=>bu,FluxDispatcher:()=>wr,FluxUtils:()=>Su,NavigationNative:()=>Ee,React:()=>W,ReactNative:()=>$s,assets:()=>hu,channels:()=>ni,clipboard:()=>Be,commands:()=>tn,components:()=>Vs,constants:()=>mt,i18n:()=>pu,invites:()=>gu,messageUtil:()=>et,navigation:()=>vu,navigationStack:()=>yu,semver:()=>Hn,toasts:()=>ai,tokens:()=>wt,url:()=>_u,useToken:()=>N_});var Mm,mt,ni,pu,Be,hu,gu,tn,vu,ai,et,yu,Ee,Hn,wt,N_,mu,_u,bu,wr,Su,W,$s,Q=_(()=>{"use strict";l();c();u();Ne();Le();Mm=H(re());ce();mt=U("Fonts","Permissions"),ni=U("getVoiceChannelId"),pu=U("Messages"),Be=U("setString","getString","hasString"),hu=U("registerAsset"),gu=U("acceptInviteAndTransitionToInviteChannel"),tn=U("getBuiltInCommands"),vu=U("pushLazy"),ai=Pn("modules/toast/native/ToastActionCreators.tsx",!0),et=U("sendBotMessage"),yu=U("createStackNavigator"),Ee=U("NavigationContainer"),Hn=U("parse","clean"),wt=U("unsafe_rawColors","colors"),{useToken:N_}=K(()=>L("useToken")),mu=e=>Mm.Linking.openURL(e),_u=nativeModuleProxy.NativeLinkingModule||nativeModuleProxy.DCDLinkingManager?{openURL:mu,openDeeplink:mu,handleSupportedURL:mu,isDiscordConnectOauth2Deeplink:()=>(console.warn("url.isDiscordConnectOauth2Deeplink is not implemented and will always return false"),!1),showLongPressUrlActionSheet:()=>console.warn("url.showLongPressUrlActionSheet is not implemented"),handleMessageLinking:Pn("modules/links/native/handleContentLinking.tsx",!0)}:U("openURL","openDeeplink"),bu=U("connectStores"),wr=L("_interceptors"),Su=L("useStateFromStores"),W=globalThis.React=U("createElement"),$s=globalThis.ReactNative=U("AppRegistry")});var Ws={};k(Ws,{common:()=>zs,factories:()=>La,filters:()=>cc,findAllExports:()=>mo,findAllModule:()=>fc,findAllModuleId:()=>py,findByDisplayName:()=>yc,findByDisplayNameAll:()=>bc,findByDisplayNameLazy:()=>_c,findByFilePath:()=>wc,findByFilePathLazy:()=>Pn,findByName:()=>_s,findByNameAll:()=>vc,findByNameLazy:()=>Sr,findByProps:()=>L,findByPropsAll:()=>gc,findByPropsLazy:()=>U,findByStoreName:()=>Wo,findByStoreNameLazy:()=>kt,findByTypeName:()=>Sc,findByTypeNameAll:()=>xc,findByTypeNameLazy:()=>_y,findExports:()=>cr,findModule:()=>uc,findModuleId:()=>my,lazy:()=>pc});var Fe=_(()=>{"use strict";l();c();u();Q();ms();Fa();Rn();Ma();Le()});var Vn=Nt((GR,Bm)=>{l();c();u();Bm.exports=po()["chroma-js"]});function km(e){var r=(it="dark")=>{var Sa=Ge.type??it;if(Sa==="light")return"light";if(Ys?.SemanticColor){var Ye=Object.values(Ys.SemanticColor)[0];if(Ye){if("darker"in Ye)return"darker";if("midnight"in Ye)return"midnight";if("dark"in Ye)return"dark";if("onyx"in Ye)return"onyx"}}return"dark"};if(e.spec===3){var t={};for(var[o,n]of Object.entries(e.main.semantic??{}))if(typeof n=="object"){var{type:a,value:s,opacity:d}=n;if(a==="raw")t[o]={value:s,opacity:d??1};else{var f=Ys.RawColor[s];t[o]={value:f,opacity:d??1}}}else if(typeof n=="string")n.startsWith("#")?t[o]={value:ii()(n).hex(),opacity:1}:t[o]={value:Ys.RawColor[n],opacity:1};else throw new Error(`Invalid semantic definitions: ${n}`);return $n.Platform.OS==="android"&&si(e.main.raw),{spec:3,reference:r(e.type),semantic:t,raw:e.main.raw??{},background:e.main.background}}if(e.spec===2){var m={},p=e.background?{...Ia(e.background,["alpha"]),opacity:e.background.alpha}:void 0;if(e.semanticColors)for(var E in e.semanticColors){var I=e.semanticColors[E].map(it=>it||void 0).slice(0,2);I[0]&&(m[E]={value:_o(I[r()==="light"?1:0]),opacity:1})}if(e.rawColors){var P={};for(var C in e.rawColors){var F=e.rawColors[C];F&&(P[C]=_o(F))}$n.Platform.OS==="android"&&si(P),e.rawColors=P}return{spec:2,reference:r(),semantic:m,raw:e.rawColors??{},background:p}}if(e.spec===1||e.theme_color_map&&!e.spec){var te={},Ce={},me=r()==="light"?1:0;if(e.theme_color_map)for(var[ee,ir]of Object.entries(e.theme_color_map)){if(!Array.isArray(ir)||ir.length<2){console.warn(`[Parser] Invalid color array for ${ee}:`,ir);continue}var Fo=ir[me];if(!Fo){console.warn(`[Parser] Missing color value for ${ee} at index ${me}`);continue}var at=_o(Fo);at&&(te[ee]={value:at,opacity:1})}var pr=e.colours||e.colors;if(pr){for(var[Vr,Ue]of Object.entries(pr))if(typeof Ue=="string"){var hr=_o(Ue);if(hr){var $r=O_(Vr);Ce[$r]=hr,$r!==Vr&&(Ce[Vr]=hr)}}}if(e.unsafe_colors){for(var[z,sr]of Object.entries(e.unsafe_colors))if(typeof sr=="string"){var Mo=_o(sr);Mo&&(Ce[z]=Mo)}}return $n.Platform.OS==="android"&&si(Ce),{spec:2,reference:r(),semantic:te,raw:Ce,background:e.background}}throw new Error("Invalid theme spec")}function O_(e){var r={PRIMARY_DARK:"PRIMARY_100",PRIMARY_DARK_100:"PRIMARY_100",PRIMARY_DARK_200:"PRIMARY_200",PRIMARY_DARK_300:"PRIMARY_300",PRIMARY_DARK_360:"PRIMARY_360",PRIMARY_DARK_400:"PRIMARY_400",PRIMARY_DARK_500:"PRIMARY_500",PRIMARY_DARK_600:"PRIMARY_600",PRIMARY_DARK_630:"PRIMARY_630",PRIMARY_DARK_700:"PRIMARY_700",PRIMARY_DARK_800:"PRIMARY_800",PRIMARY_DARK_900:"PRIMARY_900"};return r[e]||e}function si(e){if(e){var r={BLACK_ALPHA_60:["BLACK",.6],BRAND_NEW_360_ALPHA_20:["BRAND_360",.2],BRAND_NEW_360_ALPHA_25:["BRAND_360",.25],BRAND_NEW_500_ALPHA_20:["BRAND_500",.2],PRIMARY_DARK_500_ALPHA_20:["PRIMARY_500",.2],PRIMARY_DARK_700_ALPHA_60:["PRIMARY_700",.6],STATUS_GREEN_500_ALPHA_20:["GREEN_500",.2],STATUS_RED_500_ALPHA_20:["RED_500",.2]};for(var t in r){var[o,n]=r[t];e[o]&&(e[t]=ii()(e[o]).alpha(n).hex())}return e}}function _o(e){if(e!==void 0){if(e.toLowerCase()==="transparent")return"#00000000";if(ii().valid(e))return ii()(e).hex();var r=Number((0,$n.processColor)(e));return ii().rgb(r>>16&255,r>>8&255,r&255,r>>24&255).hex()}}var $n,ii,Ys,xu=_(()=>{"use strict";l();c();u();Fe();An();$n=H(re());Za();ii=()=>Vn(),Ys=L("SemanticColor")});function Et(e,{update:r=!0}){if(!N.safeMode?.enabled){var t=L("SemanticColor");t?.RawColor&&Object.keys(he.origRaw).length===0&&Object.assign(he.origRaw,t.RawColor);var o=e?km(e):null,n=F_?.theme??"dark",a=Object.assign(he,{current:o,key:`bn-theme-${++jm}`,lastSetDiscordTheme:n.startsWith("bn-theme-")?he.lastSetDiscordTheme:n});if(o!=null&&t)try{t.Theme&&(t.Theme[a.key.toUpperCase()]=a.key);var s=a.current?.reference??"dark";if(zn?.DIVIDER_COLORS){var d=zn.DIVIDER_COLORS[s]??zn.DIVIDER_COLORS.dark??zn.DIVIDER_COLORS.darker??Object.values(zn.DIVIDER_COLORS)[0];zn.DIVIDER_COLORS[a.key]=d}t.Shadow&&Object.keys(t.Shadow).forEach(m=>{var p=t.Shadow[m];if(p){var E=p[s]??p.dark??p.darker??p.midnight??p.onyx??Object.values(p)[0];p[a.key]=E}}),t.SemanticColor&&Object.keys(t.SemanticColor).forEach(m=>{var p=t.SemanticColor[m];if(p){var E=p[s]??p.dark??p.darker??p.midnight??p.onyx??Object.values(p)[0];p[a.key]={...E}}})}catch(m){console.error("Failed to register custom theme keys:",m)}if(r&&Ks?.updateTheme){try{Ks.setShouldSyncAppearanceSettings?.(!1)}catch{}var f=a.current!=null?a.key:a.lastSetDiscordTheme;try{Ks.updateTheme(f)}catch(m){console.error(`Native rejected theme "${f}", reverting to "${a.lastSetDiscordTheme}"`,m);try{Ks.updateTheme(a.lastSetDiscordTheme)}catch(p){console.error("Fallback theme also failed to apply",p)}}}}}var Ks,F_,zn,jm,he,bo=_(()=>{"use strict";l();c();u();ke();Fe();xu();Ks=U("updateTheme"),F_=kt("ThemeStore"),zn=U("DIVIDER_COLORS"),jm=1,he={current:null,key:`bn-theme-${jm}`,origRaw:{},lastSetDiscordTheme:"dark"}});function B_({children:e}){Ht([Ge]);var r=he.current?.background,t=r?.url,o=r?.blur;return!he.current||Ge.customBackground==="hidden"||!t||o!==void 0&&typeof o!="number"?e:i(li.ImageBackground,{style:{flex:1,height:"100%"},source:{uri:t},blurRadius:typeof o=="number"?o:0,children:e})}function wu(){try{if(!Um)return;var e=[xe("render",Um,(r,t)=>{if(!t)return t;try{if(!he.current||!he.current.background?.url)return t;var o=Vt(t,s=>s&&"HACK_fixModalInteraction"in(s.props??{})&&s?.props?.style);if(o)try{var n=li.StyleSheet.flatten(o.props.style),a=M_()(n.backgroundColor||"black").alpha(1-(he.current.background?.opacity??1)).hex();o.props.style=li.StyleSheet.flatten([o.props.style,{backgroundColor:a}])}catch(s){A.warn("Background patch: failed to modify style",s)}}catch(s){return A.warn("Background patch: render error",s),t}return i(B_,{children:t})})];return()=>e.forEach(r=>r?.())}catch(r){A.error("Background patch: failed to initialize",r)}}var li,M_,Um,Gm=_(()=>{"use strict";l();c();u();ne();Za();bo();He();ft();Jr();Fe();li=H(re());yr();M_=()=>Vn(),Um=Pn("modules/messages/native/Messages.tsx",!0)});function zm(e,r){$m!==he.key&&(Eu.clear(),$m=he.key);var t=`${e}|${r}`,o=Eu.get(t);return o===void 0&&(o=(0,Wm.default)(e).alpha(r).hex(),Eu.set(t,o)),o}function Tu(){var e=L("SemanticColor");if(!e)return()=>{};var r={...e.RawColor},t=([a])=>a===he.key?[he.current?.reference??"dark"]:void 0;e.RawColor&&Object.keys(e.RawColor).forEach(a=>{Object.defineProperty(e.RawColor,a,{configurable:!0,enumerable:!0,get:()=>{var s=he.current?.raw[a];return s||r[a]}})});var o=e.default?.meta??e.default?.internal??e.default,n=[Yr("isThemeDark",Hm,t),Yr("isThemeLight",Hm,t),Yr("updateTheme",Td,t),o?ut("resolveSemanticColor",o,(a,s)=>{if(!he.current)return s(...a);if(a[0]!==he.key)return s(...a);a[0]=he.current.reference;var[d,f]=Ym(he.current.reference,a[1],e),m=he.current.semantic[d];if(!m&&he.current.spec===2&&d in Vm&&(m=he.current.semantic[Vm[d]]),m?.value)return m.opacity===1?m.value:zm(m.value,m.opacity);if(f?.raw){var p=he.current.raw[f.raw];if(p)return f.opacity===1?p:zm(p,f.opacity)}return s(...a)}):()=>{},()=>{e.RawColor&&Object.defineProperty(e,"RawColor",{configurable:!0,writable:!0,value:r})}];return()=>n.forEach(a=>a())}function Ym(e,r,t){if(!r||typeof r!="object")return["",null];var o=r[Ym._sym??=Object.getOwnPropertySymbols(r)[0]],n=t?.SemanticColor?.[o];if(!n)return[o,null];var a=n[e]??n.darker??n.dark??n.midnight??n.onyx??Object.values(n)[0];return[o,a]}var Wm,Hm,Vm,Eu,$m,Km=_(()=>{"use strict";l();c();u();bo();lt();He();Fe();Fa();Ma();Wm=H(Vn()),Hm=bt(Oa("isThemeDark")),Vm={BG_BACKDROP:"BACKGROUND_FLOATING",BG_BASE_PRIMARY:"BACKGROUND_PRIMARY",BG_BASE_SECONDARY:"BACKGROUND_SECONDARY",BG_BASE_TERTIARY:"BACKGROUND_SECONDARY_ALT",BG_MOD_FAINT:"BACKGROUND_MODIFIER_ACCENT",BG_MOD_STRONG:"BACKGROUND_MODIFIER_ACCENT",BG_MOD_SUBTLE:"BACKGROUND_MODIFIER_ACCENT",BG_SURFACE_OVERLAY:"BACKGROUND_FLOATING",BG_SURFACE_OVERLAY_TMP:"BACKGROUND_FLOATING",BG_SURFACE_RAISED:"BACKGROUND_MOBILE_PRIMARY"},Eu=new Map,$m=null});function Au(){var e=new Set(["ThemeStore","SelectivelySyncedUserSettingsStore"]),r=[xe("get",qm,([t],o)=>{if(!(!he.current||!e.has(t))){var n=$t(o._state,a=>typeof a.theme=="string");n&&(n.theme=he.key)}}),Yr("set",qm,([t,o])=>{if(e.has(t)){var n=JSON.stringify(o),a=he.lastSetDiscordTheme??"darker",s=n.replace(/"theme":"bn-theme-\d+"/,`"theme":${JSON.stringify(a)}`);return[t,JSON.parse(s)]}})];return()=>r.forEach(t=>t())}var qm,Xm=_(()=>{"use strict";l();c();u();bo();He();Jr();Ne();Fe();qm=Ve(()=>{var e=L("impl");return typeof e?.impl=="object"?e.impl:L("storage")})});function Jm(){var e=he.current;if(e?.reference)return e.reference==="light"?"dark-content":"light-content";var r=Zm?.theme;if(typeof r=="string"){var t=r.toLowerCase();return t.includes("dark")||t.includes("midnight")?"light-content":"dark-content"}return"light-content"}function Cu(){function e(){var a=Jm();Wt.StatusBar.setBarStyle(a,!0),Wt.Platform.OS==="android"&&(Wt.StatusBar.setTranslucent?.(!0),Wt.StatusBar.setBackgroundColor?.("#00000000",!0))}if(Wt.Platform.OS==="android"){var r=Wt.StatusBar.setBarStyle;Wt.StatusBar.setBarStyle=function(a,...s){return r.call(this,Jm(),...s)}}var t=Zm?.addChangeListener?.(e);e();for(var o=200,n=0;n<5;n++,o*=2)setTimeout(e,o);return t}var Wt,Zm,Qm=_(()=>{"use strict";l();c();u();Wt=H(re());Le();bo();Zm=kt("ThemeStore")});function Ru(e){e&&Et(e,{update:!1});var r=[Au(),Tu(),wu(),Cu()];return()=>r.forEach(t=>t&&(typeof t=="function"?t():null))}var ep=_(()=>{"use strict";l();c();u();Gm();Km();Xm();bo();Qm()});var nn={};k(nn,{fetchTheme:()=>on,getCurrentTheme:()=>Rr,getThemeFromLoader:()=>So,initThemes:()=>Iu,installTheme:()=>Tt,removeTheme:()=>Yt,selectTheme:()=>rt,themes:()=>ge,updateThemes:()=>qs,writeThemeToNative:()=>Wn});function Wn(e){return x(function*(){if(typeof e!="object")throw new Error("Theme must be an object");yield Yo(tp()||"theme.json").set(e)})()}function k_(e){if(e.semanticColors){var{semanticColors:r}=e;for(var t in r)for(var o in r[t])r[t][o]&&=_o(r[t][o])||!1}if(e.rawColors){var{rawColors:n}=e;for(var a in n){var s=_o(n[a]);s&&(e.rawColors[a]=s)}rp.Platform.OS==="android"&&si(n)}return e.spec===void 0&&("theme_color_map"in e||(e.spec=2)),e}function j_(e){return typeof e!="object"||e===null||e.spec===3&&!e.main?!1:e.spec===2||e.theme_color_map?!0:e.spec===2||e.spec===3}function on(e,r=!1){return x(function*(){var t;try{t=yield(yield ze(e,{cache:"no-store"})).json()}catch{throw new Error(`Failed to fetch theme at ${e}`)}if(!j_(t))throw new Error(`Invalid theme at ${e}`);ge[e]={id:e,selected:r,data:k_(t)},r&&(Wn(ge[e]),Et(ge[e].data,{update:!0}))})()}function Tt(e){return x(function*(){if(typeof e!="string"||e in ge)throw new Error("Theme already installed");yield on(e)})()}function rt(e,r=!0){if(e&&(e.selected=!0),Object.keys(ge).forEach(t=>ge[t].selected=ge[t].id===e?.id),e==null&&r)return Et(null,{update:!0}),Wn({});if(e)return Et(e.data,{update:!0}),Wn(e)}function Yt(e){return x(function*(){var r=ge[e];return r.selected&&(yield rt(null)),delete ge[e],r.selected})()}function qs(){return x(function*(){yield Ut(ge);var e=So();yield h(Object.keys(ge).map(r=>on(r,e?.id===r)))})()}function Rr(){return Object.values(ge).find(e=>e.selected)??null}function So(){return Xs()??Rr()}function Iu(){return x(function*(){if(pt()&&!N.safeMode?.enabled)try{fr()&&ct("../vendetta_theme.json","null"),yield en(Ge),yield Ut(ge);var e=So();Ru(e?.data??null),qs().catch(r=>console.error("Failed to update themes",r))}catch(r){console.error("Failed to initialize themes",r)}})()}var rp,ge,Ir=_(()=>{"use strict";l();c();u();be();$e();Ft();Kt();ft();Jr();rp=H(re());ke();ep();xu();Za();bo();ge=qr(Cr(St("VENDETTA_THEMES")))});function kr(){return qt!=null}function fr(){return xo!=null}function an(){return Js!=null}function Kn(){return Yn!=null}function U_(){if(!fr()||kr()||!an())return null;var e;return an()==!0?e={name:Js.loaderName,features:{}}:e={name:xo.loaderName,features:{}},Zs()&&(e.features.loaderConfig=!0),ip()&&(e.features.syscolors={prop:"__vendetta_syscolors"},Object.defineProperty(globalThis,"__vendetta_syscolors",{get:()=>G_(),configurable:!0})),pt()&&(e.features.themes={prop:"__vendetta_theme"},Object.defineProperty(globalThis,"__vendetta_theme",{get:()=>{var r=Xs()?.id;if(!r)return null;var{themes:t}=(Ir(),Oe(nn));return t[r]??Xs()??null},configurable:!0})),Object.defineProperty(globalThis,"__vendetta_loader",{get:()=>e,configurable:!0}),e}function Pu(){return globalThis.__vendetta_loader?globalThis.__vendetta_loader:U_()}function Du(){return fr()?xo.loaderName:an()?Js.loadername:kr()?qt.name:Kn()?Yn.loaderName:"Unknown"}function op(){return fr()?xo.loaderVersion:an()?Js.loaderVersion:Kn()?Yn.loaderVersion:null}function Zs(){return fr()?!0:kr()?qt.features.loaderConfig:!!an()}function pt(){return fr()?xo.hasThemeSupport:kr()?qt.features.themes!=null:an()?!1:Kn()?Yn.hasThemeSupport:!1}function Xs(){if(fr())return xo.storedTheme;if(kr()){var e=qt.features.themes?.prop;return e&&globalThis[e]||null}else if(Kn())return Yn.storedTheme||null;return null}function tp(){return fr()?"pyoncord/current-theme.json":kr()?"vendetta_theme.json":Kn()?"ShiggyCord/current-theme.json":null}function qn(){return fr()?!!globalThis.__REACT_DEVTOOLS__:kr()?qt.features.devtools!=null:!1}function np(){return qn()?fr()?(globalThis.__pyoncord_rdt=globalThis.__REACT_DEVTOOLS__.exports,"__pyoncord_rdt"):kr()?qt.features.devtools.prop:null:null}function ap(){return qn()?fr()?globalThis.__REACT_DEVTOOLS__.version||null:kr()?qt.features.devtools.version:null:null}function ip(){return!0}function G_(){return ip()?fr()?xo.sysColors:kr()?qt.features.syscolors.prop:null:null}function sp(){return fr()?"pyoncord/loader.json":kr()?"vendetta_loader.json":an()?"rain/loader.json":"loader.json"}function lp(){return fr()?xo.fontPatch===2:Kn()?Yn.fontPatch===2:!1}var xo,Js,qt,Yn,Kt=_(()=>{"use strict";l();c();u();Ft();xo=globalThis.__PYON_LOADER__,Js=globalThis.__RAIN_LOADER__,qt=globalThis.__vendetta_loader,Yn=globalThis.__SHIGGY_LOADER__;Pu()});var Qs={};k(Qs,{loaderConfig:()=>Pr,settings:()=>N,updaterSettings:()=>Xn});var N,Pr,Xn,ke=_(()=>{"use strict";l();c();u();$e();Kt();N=qr(Cr(St("VENDETTA_SETTINGS"))),Pr=qr(Cr(Yo(sp(),{customLoadUrl:{enabled:!1,url:"http://localhost:4040/kettu.js"}}))),Xn=qr(Cr(St("VENDETTA_UPDATER_SETTINGS")))});var Ou={};k(Ou,{default:()=>V_});var H_,fp,Lu,Nu,Jn,up,wo,cp,ci,V_,Fu=_(()=>{"use strict";l();c();u();lo();H_=new Set(["AlertActionButton","AlertModal","AlertModalContainer","AvatarDuoPile","AvatarPile","BACKDROP_OPAQUE_MAX_OPACITY","Backdrop","Button","Card","ContextMenu","ContextMenuContainer","FauxHeader","FloatingActionButton","GhostInput","GuildIconPile","HeaderActionButton","HeaderButton","HeaderSubmittingIndicator","IconButton","Input","InputButton","InputContainer","LayerContext","LayerScope","Modal","ModalActionButton","ModalContent","ModalDisclaimer","ModalFloatingAction","ModalFloatingActionSpacer","ModalFooter","ModalScreen","ModalStepIndicator","NAV_BAR_HEIGHT","NAV_BAR_HEIGHT_MULTILINE","Navigator","NavigatorHeader","NavigatorScreen","Pile","PileOverflow","RedesignCompat","RedesignCompatContext","RowButton","STATUS_BAR_HEIGHT","SceneLoadingIndicator","SearchField","SegmentedControl","SegmentedControlPages","Slider","Stack","StepModal","StickyContext","StickyHeader","StickyWrapper","TABLE_ROW_CONTENT_HEIGHT","TABLE_ROW_HEIGHT","TableCheckboxRow","TableRadioGroup","TableRadioRow","TableRow","TableRowGroup","TableRowGroupTitle","TableRowIcon","TableSwitchRow","Tabs","TextArea","TextField","TextInput","Toast","dismissAlerts","getHeaderBackButton","getHeaderCloseButton","getHeaderConditionalBackButton","getHeaderNoTitle","getHeaderTextButton","hideContextMenu","navigatorShouldCrossfade","openAlert","useAccessibilityNativeStackOptions","useAndroidNavScrim","useCoachmark","useFloatingActionButtonScroll","useFloatingActionButtonState","useNativeStackNavigation","useNavigation","useNavigationTheme","useNavigatorBackPressHandler","useNavigatorScreens","useNavigatorShouldCrossfade","useSegmentedControlState","useStackNavigation","useTabNavigation","useTooltip"]),fp={},Lu={},Nu=Mu("redesign_module");for([cp,ci]of Nu.getModules())for(wo of H_){if(Jn=void 0,ci[wo])Jn=ci;else if(ci.default?.[wo])Jn=ci.default;else continue;up=Reflect.ownKeys(Jn).length,!(Lu[wo]&&up<=Lu[wo])&&(fp[wo]=Jn[wo],Lu[wo]=Reflect.ownKeys(Jn).length,Nu.cacheId(cp))}Nu.finish();V_=fp});var vp={};k(vp,{getCachedPolyfillModules:()=>q_,getImportingModuleId:()=>ic,getModules:()=>gs,metroModules:()=>vr,requireModule:()=>Ar,subscribeModule:()=>hc});function rl(e){Object.defineProperty(vr,e,{enumerable:!1}),gp.add(e),Uu(Number(e))}function ui(e){return!e||e===globalThis||e[``]===null||e.__proto__===Object.prototype&&Reflect.ownKeys(e).length===0||e.default?.[Symbol.toStringTag]==="IntlMessagesProxy"}function K_(e,r){if(ju(r,e),e.initSentry&&=()=>{},e.default?.track&&e.default.trackMaker&&(e.default.track=()=>Promise.resolve()),e.registerAsset&&(ac(),Oe(Ud)).patchAssets(e),!pp&&["customBubblingEventTypes","customDirectEventTypes","register","get"].every(s=>e[s])&&(ku("register",e,([s,d],f)=>{try{return f(s,d)}catch{return s}}),pp=!0),e?.default?.constructor?.displayName==="DeveloperExperimentStore"&&(e.default=new Proxy(e.default,{get(s,d,f){if(d==="isDeveloper"){var{settings:m}=(ke(),Oe(Qs));return m.enableDiscordDeveloperSettings??!1}return Reflect.get(s,d,f)}})),!mp&&e.fileFinishedImporting&&(z_("fileFinishedImporting",e,([s])=>{Zn===-1||!s||(vr[Zn].__filePath=s)}),mp=!0),!dp&&globalThis["__core-js_shared__"]){var t=s=>typeof s=="function"&&Y_.apply(s,[]);globalThis["__core-js_shared__"].inspectSource=t,dp=!0}if(e.findHostInstance_DEPRECATED){var o=vr[r-1]?.publicModule.exports,n=o.default?.reactProfilingEnabled?1:-1;vr[r+n]?.isInitialized||rl(r+n)}e.isMoment&&ku("defineLocale",e,(s,d)=>{var f=e.locale();d(...s),e.locale(f)});var a=el.get(Number(r));a&&(a.forEach(s=>s()),el.delete(Number(r)))}function ic(){return Zn}function hc(e,r){var t=el.get(e)??new Set;return t.add(r),el.set(e,t),()=>t.delete(r)}function Ar(e){if(vr[0]?.isInitialized||Bu(0),!gp.has(e)){if(Number(e)===-1)return Fu(),Oe(Ou);if(vr[e]?.isInitialized&&!vr[e]?.hasError)return Bu(e);var r=ErrorUtils.getGlobalHandler();ErrorUtils.setGlobalHandler(W_);var t;try{t=Bu(e)}catch{rl(e),t=void 0}return ErrorUtils.setGlobalHandler(r),t}}function*gs(e,r=!1){yield[-1,(Fu(),Oe(Ou))];var t=Bt().findIndex[e];if(r&&!t?.[`_${io.FULL_LOOKUP}`]&&(t=void 0),!t?.[`_${io.NOT_FOUND}`]){for(var o in t)if(o[0]!=="_"){var n=Ar(Number(o));ui(n)||(yield[o,n])}for(var a in vr){var s=Ar(Number(a));ui(s)||(yield[a,s])}}}function*q_(e){var r=Bt().polyfillIndex[e];for(var t in r){var o=Ar(Number(t));ui(o)||(yield[t,o])}if(!r[`_${io.FULL_LOOKUP}`])for(var n in vr){var a=Ar(Number(n));ui(a)||(yield[n,a])}}var $_,z_,ku,vr,Bu,el,gp,W_,Y_,dp,mp,pp,Zn,hp,so=_(()=>{"use strict";l();c();u();lo();fs();$_=function(e){var r=Number(e),t=vr[r],o=Bt().flagsIndex[r];if(o&Mt.BLACKLISTED)return rl(r),"continue";t.factory&&ku("factory",t,(n,a)=>{var s=Zn;Zn=r;var{1:d,4:f}=n;n[2]=m=>{var p=d(m);return p&&p.__esModule?p.default:p},n[3]=m=>{var p=d(m);if(p&&p.__esModule)return p;var E={};return p&&Object.assign(E,p),E.default=p,E},a(...n),ui(f.exports)?rl(r):K_(f.exports,r),Zn=s})},{before:z_,instead:ku}=(ns(),Oe(os)),vr=globalThis.modules,Bu=e=>globalThis.__r(+e),el=new Map,gp=new Set,W_=()=>{},Y_=Function.prototype.toString,dp=!1,mp=!1,pp=!1,Zn=-1;for(hp in vr)$_(hp)});var Sp={};k(Sp,{getCacherForUniq:()=>vs,getMetroCache:()=>Bt,getPolyfillModuleCacher:()=>Mu,indexAssetModuleFlag:()=>sc,indexBlacklistFlag:()=>Uu,indexExportsFlags:()=>ju,initMetroCache:()=>X_});function yp(){var e=Object.keys(globalThis.modules).length,r={_v:_p,_buildNumber:En.getConstants().Build,_modulesCount:e,flagsIndex:{},findIndex:{},polyfillIndex:{}};return Er=r,r}function X_(){return x(function*(){try{if(!(yield Ot(Gu)))return void yp();var e=yield Vo(Gu);if(Er=JSON.parse(e),Er._v!==_p)throw Er=null,"cache invalidated; cache version outdated";if(Er._buildNumber!==En.getConstants().Build)throw Er=null,"cache invalidated; version mismatch";var r=Object.keys(globalThis.modules).length;if(Er._modulesCount!==r)throw Er=null,"cache invalidated; modules count mismatch"}catch{yp()}})()}function bp(e){if(e){var r=Mt.EXISTS;return r}}function ju(e,r){var t=bp(r);t&&t!==Mt.EXISTS&&(Er.flagsIndex[e]=t)}function Uu(e){Er.flagsIndex[e]|=Mt.BLACKLISTED}function sc(e){Er.flagsIndex[e]|=Mt.ASSET}function vs(e,r){var t=Er.findIndex[e]??={};return{cacheId(o,n){t[o]??=bp(n),tl()},finish(o){r&&(t[`_${io.FULL_LOOKUP}`]=1),o&&(t[`_${io.NOT_FOUND}`]=1),tl()}}}function Mu(e){var r=Er.polyfillIndex[e]??={};return{getModules(){return(so(),Oe(vp)).getCachedPolyfillModules(e)},cacheId(t){r[t]=1,tl()},finish(){r[`_${io.FULL_LOOKUP}`]=1,tl()}}}var _p,Gu,Er,Bt,tl,lo=_(()=>{"use strict";l();c();u();be();Ft();lt();An();fs();_p=102,Gu="caches/metro_modules.json",Er=null,Bt=()=>Er;tl=Ra(()=>{ct(Gu,JSON.stringify(Er))},1e3)});var dr=Nt((k0,xp)=>{l();c();u();xp.exports=po().react});function ol(e){return"componentStack"in e&&typeof e.componentStack=="string"}function nl(e){return!!e.stack}var Hu=_(()=>{"use strict";l();c();u()});var il={};k(il,{filterAssets:()=>Q_,findAsset:()=>Qn,findAssetId:()=>S,invalidateAssetCache:()=>Z_,iterateAssets:()=>Eo});function Z_(){al=null,Vu=0;for(var e in fi)delete fi[e]}function*Eo(){var e=Date.now();if(al&&e-Vu{"use strict";l();c();u();lo();fs();so();ac();fi={},al=null,Vu=0,J_=2500});var $u,Ep=_(()=>{$u={ABOUT:"About",ACTIONS:"Actions",ARE_YOU_SURE_TO_CLEAR_DATA:"Are you sure you wish to clear the data of {name}?",ARE_YOU_SURE_TO_DELETE_PLUGIN:"Are you sure you wish to delete {name}? This will clear all of the plugin's data.",ARE_YOU_SURE_TO_DELETE_THEME:"Are you sure you wish to delete {name}?",AUTO_DEBUGGER:"Automatically connect to Debugger",AUTO_DEVTOOLS:"Automatically connect to Devtools",ASSET_BROWSER:"Asset Browser",ASSET_TYPES:"Asset Types",IMAGE_FILES:"Image Files",TEXT_FILES:"Text Files",BRAND:"Brand",SHIGGYCORD:"GoonCord",SHIGGYCORD_URL:"GoonCord URL",BROWSER:"Browser",BYTECODE:"Bytecode",CANCEL:"Cancel",CLEAR:"Clear",CLEAR_BUNDLE:"Clear JS Bundle",CLEAR_BUNDLE_DESC:"Clear the cached bundle. This will force a re-download of the bundle next app launch.",CLEAR_DATA:"Clear data",CLEAR_DATA_FAILED:"Failed to clear data for {name}",CLEAR_DATA_SUCCESSFUL:"Cleared data for {name}",CODEBERG:"Codeberg",CODENAME:"Codename",COMMAND_DEBUG_DESC:"Send \u{1F4A6}GoonCord\u{1F4A6} debug info.",COMMAND_DEBUG_OPT_EPHEMERALLY:"Send debug info ephemerally.",COMMAND_EVAL_DESC:"Evaluate JavaScript code.",COMMAND_EVAL_OPT_ASYNC:"Whether to support 'await' in code. Must explicitly return for result (default: false)",COMMAND_EVAL_OPT_CODE:"The code to evaluate.",COMMAND_PLUGINS_DESC:"Send list of installed plugins.",COMMAND_PLUGINS_OPT_EPHEMERALLY:"Send plugins list ephemerally.",COMMAND_RELOAD_DESC:"Reload Discord.",COMPONENT:"Component",CONFIRMATION_LINK_IS_A_TYPE:"This link is a **{urlType, select, plugin {Plugin} theme {Theme} other {Add-on}}**, would you like to install it?",CONNECT_TO_DEBUG_WEBSOCKET:"Connect to debug WebSocket",CONNECT_TO_REACT_DEVTOOLS:"Connect to React DevTools",CONTINUE:"Continue",COPIED_TO_CLIPBOARD:"Copied to clipboard",COPY_URL:"Copy URL",DEBUG:"Debug",DEBUGGER_URL:"Debugger URL",DELETE:"Delete",DEVTOOLS_URL:"DevTools URL",DESC_EXTRACT_FONTS_FROM_THEME:'Looks out for "fonts" field in your currently applied theme and install it.',DEVELOPER:"Developer",DEVELOPER_SETTINGS:"Developer Settings",DISABLE_THEME:"Disable Theme",DISABLE_UPDATES:"Disable Updates",DISCORD_SERVER:"Discord Server",DONE:"Done",ENABLE_EVAL_COMMAND:"Enable /eval command",ENABLE_EVAL_COMMAND_DESC:"Evaluate JavaScript directly from a command. Be cautious when using this command as it may pose a security risk. Make sure to know what you are doing.",ENABLE_UPDATES:"Enable Updates",ERROR_BOUNDARY_TOOLS_LABEL:"ErrorBoundary Tools",EXTRACT:"Extract",FONT_NAME:"Font Name",FONTS:"Fonts",GENERAL:"General",GITHUB:"GitHub",HOLD_UP:"Hold Up",INFO:"Info",INSTALL:"Install",INSTALL_ADDON:"Install an add-on",INSTALL_FONT:"Install a font",INSTALL_PLUGIN:"Install a plugin",INSTALL_REACT_DEVTOOLS:"Install React DevTools",INSTALL_THEME:"Install a theme",LABEL_EXTRACT_FONTS_FROM_THEME:"Extract font from theme",LINKS:"Links",LOAD_FROM_CUSTOM_URL:"Load from custom URL",LOAD_FROM_CUSTOM_URL_DEC:"Load GoonCord from a custom endpoint.",LOAD_REACT_DEVTOOLS:"Load React DevTools",SHIGGY_URL:"ShiggyCord URL",LOADER:"Loader",MACHINE_ID:"Machine ID",MANUFACTURER:"Manufacturer",MESSAGE:"Message",MISCELLANEOUS:"Miscellaneous",MODAL_RELOAD_REQUIRED:"Reload app?",MODAL_RELOAD_REQUIRED_DESC:"A reload is required to see the changes. Do you want to reload now?",MODAL_THEME_REFETCHED:"Theme refetched",MODAL_THEME_REFETCHED_DESC:"A reload is required to see the changes. Do you want to reload now?",MODAL_UNPROXIED_PLUGIN_DESC:"The plugin you are trying to install has not been proxied/verified by staff. Are you sure you want to continue?",MODAL_UNPROXIED_PLUGIN_HEADER:"Unproxied Plugin",MODEL:"Model",OPEN_IN_BROWSER:"Open in Browser",OPERATING_SYSTEM:"Operating System",OVERFLOW_PLUGIN_SETTINGS:"Plugin Settings",PLATFORM:"Platform",PLUGIN_REFETCH_FAILED:"Failed to refetch plugin",PLUGIN_REFETCH_SUCCESSFUL:"Successfully refetched plugin",PLUGINS:"Plugins",REFETCH:"Refetch",RELOAD:"Reload",RELOAD_DISCORD:"ReGoon your Discord",RELOAD_IN_NORMAL_MODE:"Reload in Normal Mode",RELOAD_IN_NORMAL_MODE_DESC:"Safe mode currently enabled, tap to reload in normal mode",RELOAD_IN_SAFE_MODE:"Reload in Safe Mode",RELOAD_IN_SAFE_MODE_DESC:"Tap to reload Discord without loading addons",REMOVE:"Remove",RESTART_REQUIRED_TO_TAKE_EFFECT:"Restart is required to take effect",RETRY:"Retry",RETRY_RENDER:"Retry Render",SAFE_MODE:"Safe Mode",SAFE_MODE_NOTICE_FONTS:"You are in safe mode, meaning fonts have been temporarily disabled. {enabled, select, true {If a font appears to be causing the issue, you can press below to disable it persistently.} other {}}",SAFE_MODE_NOTICE_PLUGINS:"You are in safe mode, so plugins cannot be loaded. Disable any misbehaving plugins, then return to Normal Mode from the General settings page.",SAFE_MODE_NOTICE_THEMES:"You are in safe mode, meaning themes have been temporarily disabled. {enabled, select, true {If a theme appears to be causing the issue, you can press below to disable it persistently.} other {}}",SEARCH:"Search",SEPARATOR:", ",SETTINGS_ACTIVATE_DISCORD_EXPERIMENTS:"Activate Discord Experiments",SETTINGS_ACTIVATE_DISCORD_EXPERIMENTS_DESC:"Warning: Messing with this feature may lead to account termination. I heavily discourage using this and am not responsible for anything that happens if you use it",STACK_TRACE:"Stack Trace",SUCCESSFULLY_INSTALLED:"Successfully installed",THEME_EXTRACTOR_DESC:"This pack overrides the following: {fonts}",THEME_REFETCH_FAILED:"Failed to refetch theme",THEME_REFETCH_SUCCESSFUL:"Successfully refetched theme",THEMES:"Themes",THEMES_RELOAD_FOR_CHANGES:"Reload the app to fully apply changes",TOASTS_INSTALLED_PLUGIN:"Installed plugin",TOASTS_PLUGIN_UPDATE:"{update, select, true {Enabled} other {Disabled}} updates for {name}",UH_OH:"Uh Oh",UNINSTALL:"Uninstall",UNINSTALL_TITLE:"Uninstall {title}",URL_PLACEHOLDER:"https://github.com/OTKUSteyler/GoonCord",VERSION:"Version",VERSIONS:"Versions"}});function Ap(e){var r=tb=ob[e]??e;A.log("[i18n] fetchLocale called:",e,"->",r),Tp.has(r)?ea=r:(Tp.add(r),r.toLowerCase().startsWith("en")?(A.log("[i18n] Using local default.json for English locale"),sl[r]=$u,ea=r):fetch(`https://codeberg.org/cocobo1/kettu-i18n/raw/branch/main/base/${r}.json`).then(t=>t.json()).then(t=>{A.log("[i18n] Loaded strings for:",r),sl[r]=t,ea=r}).catch(t=>A.error(`[i18n] Error fetching strings for ${r}: ${t}`)))}function Cp(){var e=0,r=()=>{e++;try{var n=Wo("LocaleStore");if(A.log("[i18n] Attempt",e,"- LocaleStore:",!!n),!n)return A.log("[i18n] LocaleStore not found yet"),!1;if(n?._isInitialized!==!0)return A.log("[i18n] LocaleStore not initialized yet"),!1;var a=n.locale;if(a)return A.log("[i18n] Using LocaleStore:",a),Ap(a),!0}catch(s){A.log("[i18n] Error:",s)}return!1},t=()=>{r()||e<15&&setTimeout(t,500)};t();var o=n=>{if(n?.settings?.changes?.loading){A.log("[i18n] Settings loading, skipping...");return}var a=n?.settings?.changes?.protoToSave?.localization?.locale?.value;A.log("[i18n] Locale changed:",a),a&&(A.log("[i18n] Found locale in event:",a),Ap(a))};return wr.subscribe("USER_SETTINGS_PROTO_UPDATE_EDIT_INFO",o),()=>{wr.unsubscribe("USER_SETTINGS_PROTO_UPDATE_EDIT_INFO",o)}}function To(e,r){var t=T[e];if(!t)return t;try{return new rb(t).format(r)}catch(o){return o?.name==="SyntaxError"?(A.warn(`[i18n] Failed to parse message for key "${String(e)}":`,o.message),t):(A.warn(`[i18n] Failed to format message for key "${String(e)}":`,o?.message??o),t)}}var rb,ea,tb,Tp,sl,T,ob,je=_(()=>{"use strict";l();c();u();yr();Q();Le();Ep();rb=Sr("MessageFormat"),ea=null,tb=null,Tp=new Set,sl={},T=new Proxy({},{get:(e,r)=>ea&&sl[ea]?.[r]?sl[ea]?.[r]:$u[r]}),ob={"ar-SA":"ar","bn-BD":"bn","ca-ES":"ca","de-DE":"de","es-ES":"es","es-419":"es","fa-IR":"fa","fi-FI":"fi","fr-FR":"fr","hi-IN":"hi","hr-HR":"hr","hu-HU":"hu","id-ID":"id","it-IT":"it","ja-JP":"ja","pl-PL":"pl","pt-BR":"pt_BR","ru-RU":"ru","sk-SK":"sk","sv-SE":"sv","tr-TR":"tr","vi-VN":"vi"}});var ll={};k(ll,{showToast:()=>q});var nb,q,ht=_(()=>{"use strict";l();c();u();je();Te();Ne();Q();Le();({uuid4:nb}=K(()=>L("uuid4"))),q=(e,r)=>ai.open({key:`vd-toast-${nb()}`,content:e,source:r,icon:r});q.showCopyToClipboard=(e=T.COPIED_TO_CLIPBOARD)=>{q(e,S("toast_copy_link"))}});var fl={};k(fl,{connectRdt:()=>ul,connectToDebugger:()=>ta,disconnectFromDebugger:()=>Yu,disconnectRdt:()=>Ku,getDebugInfo:()=>gt,initDebugger:()=>Ju,isConnectedToDebugger:()=>bi,patchLogHook:()=>Xu,rdtClient:()=>yi,rdtConnected:()=>Si,toggleSafeMode:()=>Wu,useIsRdtConnected:()=>qu,versionHash:()=>_i});function Wu(){return x(function*(){N.safeMode={...N.safeMode,enabled:!N.safeMode?.enabled},pt()&&(So()?.id&&(N.safeMode.currentThemeId=So().id),N.safeMode?.enabled?yield rt(null):N.safeMode?.currentThemeId&&(yield rt(ge[N.safeMode?.currentThemeId]))),setTimeout(Br.reload,400)})()}function Ip(e){return JSON.stringify(e)}function sn(e,...r){if(tr?.readyState===WebSocket.OPEN){var t={type:"log",data:{level:e,message:r}};tr.send(Ip(t))}}function ib(){di=console.log,console.log=function(...e){di.apply(console,e),sn("default",...e)},mi=console.error,console.error=function(...e){mi.apply(console,e),sn("error",...e)},pi=console.warn,console.warn=function(...e){pi.apply(console,e),sn("warn",...e)},A&&(hi=A.log,A.log=function(...e){hi.apply(A,e),sn("default",...e)},gi=A.error,A.error=function(...e){gi.apply(A,e),sn("error",...e)},vi=A.warn,A.warn=function(...e){vi.apply(A,e),sn("warn",...e)})}function cl(){di&&(console.log=di,di=void 0),mi&&(console.error=mi,mi=void 0),pi&&(console.warn=pi,pi=void 0),A&&(hi&&(A.log=hi,hi=void 0),gi&&(A.error=gi,gi=void 0),vi&&(A.warn=vi,vi=void 0))}function ta(e){if(tr!==void 0&&tr.readyState!==WebSocket.CLOSED&&(cl(),tr.close()),!e){q("Invalid debugger URL!",S("Small"));return}try{tr=new WebSocket(`ws://${e}`),tr.addEventListener("open",()=>{q("Connected to debugger.",S("Check"));var r={type:"hello",data:{version:ab}};tr?.send(Ip(r)),ib()}),tr.addEventListener("message",r=>{try{var t=JSON.parse(r.data);if(t.type==="run"&&t.data?.code)try{(0,eval)(t.data.code)}catch(o){console.error("Error executing remote code:",o)}}catch{try{(0,eval)(r.data)}catch(n){console.error(n)}}}),tr.addEventListener("close",r=>{A.error(`Debugger disconnected. (${r?.code}, ${r?.reason||"no reason specified"})`),cl()}),tr.addEventListener("error",r=>{var t=r?.message||r?.error?.message||"WebSocket Connection Errored";A.error("Debugger error:",t),q("An error occurred with the debugger connection!",S("Small")),cl()})}catch(r){A.error("Failed to connect to debugger:",r),q("Failed to connect to debugger!",S("Small"))}}function Yu(){tr&&(cl(),tr.close(),tr=void 0,q("Disconnected from debugger.",S("Check")))}function bi(){return tr?.readyState===WebSocket.OPEN}function Pp(){for(var e of zu)e(Si)}function Rp(){yi=null,Si=!1,Pp()}function ul(e,r){if(!(!qn()||yi)){var t=e.split(":").slice(0,-1).join(":"),o=yi=new WebSocket(`ws://${t}:${sb}`);o.addEventListener("open",()=>{r||q("Connected to React DevTools",S("CheckmarkSmallIcon")),Si=!0,Pp()}),o.addEventListener("close",a=>{A.error(`React DevTools disconnected. (${a?.code}, ${a?.reason||"no reason specified"})`),Rp()}),o.addEventListener("error",a=>{Rp();var s=a?.message||a?.error?.message||"WebSocket Connection Errored";A.error("React DevTools error:",s),r||q(s,S("CircleXIcon-primary"))});var n=globalThis[np()||"__vendetta_rdc"];n?.connectToDevTools&&n.connectToDevTools({websocket:o,resolveRNStyle:ra.StyleSheet.flatten})}}function Ku(){yi?.close()}function qu(){var[e,r]=React.useState(Si);return React.useEffect(()=>(zu.add(r),()=>{zu.delete(r)}),[]),e}function Xu(){var e=xe("nativeLoggingHook",globalThis,r=>{tr?.readyState===WebSocket.OPEN&&sn(r[1]==="error"?"error":r[1]==="warn"?"warn":"default",r[0]),A.log(r[0])});return()=>{tr&&tr.close(),e()}}function gt(){var e=globalThis.HermesInternal.getRuntimeProperties(),r=e["OSS Release Version"],t="for RN ",o=ra.Platform.constants,n=o.reactNativeVersion;return{vendetta:{version:_i.split("-")[0],loader:Du()},bunny:{version:_i,loader:{name:Du(),version:op()}},discord:{version:En.getConstants().Version,build:En.getConstants().Build},react:{version:React.version,nativeVersion:r.startsWith(t)?r.substring(t.length):`${n.major}.${n.minor}.${n.patch}`},hermes:{version:r,buildType:e.Build,bytecodeVersion:e["Bytecode Version"]},...ra.Platform.select({android:{os:{name:"Android",version:o.Release,sdk:o.Version}},ios:{os:{name:o.systemName,version:o.osVersion}}}),...ra.Platform.select({android:{device:{manufacturer:o.Manufacturer,brand:o.Brand,model:o.Model,codename:Tn.device}},ios:{device:{manufacturer:Tn.deviceManufacturer,brand:Tn.deviceBrand,model:Tn.deviceModel,codename:Tn.device}}})}}function Ju(){if(N.autoDebugger)try{ta(N.debuggerUrl)}catch(e){A.error("Failed to connect to Debugger during startup:",e)}if(N.autoDevTools)try{N.devToolsUrl&&ul(N.devToolsUrl,!0)}catch(e){A.error("Failed to connect to ReactDevTools during startup:",e)}}var ra,tr,di,mi,pi,hi,gi,vi,ab,sb,yi,Si,zu,_i,At=_(()=>{"use strict";l();c();u();be();Ir();Te();Kt();lt();He();ke();yr();ht();ra=H(re());ab=1;sb=8097,yi=null,Si=!1,zu=new Set;_i="1.4.1.8"});function Np(e){return Lp.isSemanticColor(e)}function Op(e,r=lb.theme){return Lp.resolveSemanticColor(r,e)}var dl,or,Dp,lb,Lp,Ao=_(()=>{"use strict";l();c();u();Q();Le();dl=L("SemanticColor"),or=dl?.default?.colors??mt?.ThemeColorMap,Dp=dl?.default?.unsafe_rawColors??mt?.Colors,lb=kt("ThemeStore"),Lp=dl.default.meta??=dl.default.internal});var ef={};k(ef,{TextStyleSheet:()=>Ct,ThemeContext:()=>Zu,createLegacyClassComponentStyles:()=>ub,createStyles:()=>jr,createThemedStyleSheet:()=>Qu});function jr(e){return Ve(()=>Mp.createStyles(e))}function ub(e){return Ve(()=>Mp.createLegacyClassComponentStyles(e))}function Qu(e){for(var r in e)e[r]=new Proxy(Fp.StyleSheet.flatten(e[r]),{get(t,o,n){var a=Reflect.get(t,o,n);return Np(a)?Op(a):a}});return e}var Fp,Mp,Zu,Ct,Rt=_(()=>{"use strict";l();c();u();Ne();Le();Ao();Fp=H(re()),Mp=U("createStyles"),{ThemeContext:Zu}=K(()=>L("ThemeContext"),{hint:"object"}),{TextStyleSheet:Ct}=K(()=>L("TextStyleSheet"))});function Bp(e){return e.split(/[\s|\n]+?in /).filter(Boolean)}var kp=_(()=>{"use strict";l();c();u()});function xi(e){var[r,t]=(0,jp.useState)(!0),o;try{o=Bp(e.componentStack),o=r?o.slice(0,4):o}catch{return}return i(de,{children:b(ln.View,{style:{gap:8},children:[i(D,{variant:"heading-lg/bold",children:"Component Stack"}),i(ln.View,{style:{gap:4},children:o.map(n=>b(ln.View,{style:{flexDirection:"row"},children:[i(D,{variant:"text-md/bold",color:"text-muted",children:"<"}),i(D,{variant:"text-md/bold",children:n}),i(D,{variant:"text-md/bold",color:"text-muted",children:"/>"})]}))}),r&&i(D,{children:"..."}),b(ln.View,{style:{gap:8,flexDirection:"row",justifyContent:"center",alignItems:"center"},children:[i(Z,{variant:"secondary",text:`Show ${r?"more":"less"}`,icon:r?S("down_arrow"):i(ln.Image,{style:{transform:[{rotate:`${r?0:180}deg`}]},source:S("down_arrow")}),onPress:()=>t(n=>!n)}),i(Z,{variant:"secondary",text:"Copy",icon:S("CopyIcon"),onPress:()=>Be.setString(e.componentStack)})]})]})})}var jp,ln,rf=_(()=>{"use strict";l();c();u();ne();kp();Te();Q();ce();jp=H(dr()),ln=H(re())});function pb(e){return e==="InternalBytecode.js"}function hb(e){var r=e.match(fb);if(r)return{type:"FRAME",functionName:r[1],location:r[2]==="native"?{type:"NATIVE"}:r[3]==="address at "?pb(r[4])?{type:"INTERNAL_BYTECODE",sourceUrl:r[4],line1Based:Number.parseInt(r[5],10),virtualOffset0Based:Number.parseInt(r[6],10)}:{type:"BYTECODE",sourceUrl:r[4],line1Based:Number.parseInt(r[5],10),virtualOffset0Based:Number.parseInt(r[6],10)}:{type:"SOURCE",sourceUrl:r[4],line1Based:Number.parseInt(r[5],10),column1Based:Number.parseInt(r[6],10)}};var t=e.match(db);if(t)return{type:"SKIPPED",count:Number.parseInt(t[1],10)}}function gb(e){for(var r=e.split(/\n/),t=[],o=-1,n=0;n{"use strict";l();c();u();fb=/^ {4}at (.+?)(?: \((native)\)?| \((address at )?(.*?):(\d+):(\d+)\))$/,db=/^ {4}... skipping (\d+) frames$/,mb=/^ {4}at .*$/});var of={};k(of,{hideSheet:()=>Xt,showSheet:()=>nr});function nr(e,r,t){"then"in r||(r=Promise.resolve({default:r})),Gp.openLazy(r,e,t??{})}function Xt(e){Gp.hideActionSheet(e)}var Gp,vt=_(()=>{"use strict";l();c();u();Le();Gp=U("openLazy","hideActionSheet")});function af(e){var r=wc("modules/forwarding/native/ForwardFailedAlertModal.tsx");return!r&&"extraContent"in e&&(e.content=b(nf.View,{style:{gap:16},children:[i(D,{variant:"text-md/medium",color:"text-muted",children:e.content}),i(nf.View,{children:e.extraContent})]}),delete e.extraContent),i(yb,{...e})}var nf,yb,_b,Hp,Vp=_(()=>{"use strict";l();c();u();ne();Ne();Fe();ce();nf=H(re()),{AlertModal:yb,AlertActionButton:_b}=K(()=>L("AlertModal","AlertActions")),Hp=_b});var sf={};k(sf,{AlertActionButton:()=>Hp,AlertModal:()=>af});var $p=_(()=>{"use strict";l();c();u();Vp()});function cn({selectable:e,style:r,children:t}){return e?oa.Platform.select({ios:i(bb,{style:r,children:t}),default:i(zp,{style:r,children:t,selectable:!0})}):i(zp,{style:r,children:t})}var oa,Wp,bb,zp,Yp=_(()=>{"use strict";l();c();u();ne();Q();Ao();Rt();oa=H(re()),Wp=jr({codeBlock:{fontFamily:mt.Fonts.CODE_NORMAL,fontSize:12,textAlignVertical:"center",backgroundColor:or.CARD_BACKGROUND_DEFAULT,color:or.TEXT_DEFAULT,borderWidth:1,borderRadius:12,borderColor:or.BORDER_SUBTLE,padding:10}}),bb=({style:e,children:r})=>i(oa.TextInput,{editable:!1,multiline:!0,style:[Wp().codeBlock,e&&e],value:r}),zp=({selectable:e,style:r,children:t})=>i(oa.Text,{selectable:e,style:[Wp().codeBlock,r&&r],children:t})});var Sb,We,lf=_(()=>{"use strict";l();c();u();is();xn();wn();as();ls();ne();uf();Q();Rt();We=(function(e){"use strict";ao(r,e);function r(t){Ke(this,r);var o;return o=oo(this,r,[t]),o.state={hasErr:!1},o}return qe(r,[{key:"render",value:function(){return this.state.hasErr?i(cf,{error:this.state.error,onRetryRender:()=>this.setState({hasErr:!1})}):this.props.children}}]),r})(Sb=W.Component);_t(We,"contextType",Zu);_t(We,"getDerivedStateFromError",e=>({hasErr:!0,error:e}))});function xb(){return i(ml.Image,{style:{width:16,height:16},source:S("icon-search")})}var ml,Co,Kp=_(()=>{"use strict";l();c();u();ne();Q();je();Te();ce();lf();ml=H(re());Co=(({onChangeText:e,placeholder:r,style:t,isRound:o})=>{var[n,a]=W.useState(""),s=f=>{a(f),e?.(f)},d=o?{borderRadius:9999,overflow:"hidden"}:void 0;return i(We,{children:i(ml.View,{style:t,children:i(ur,{grow:!0,isClearable:!0,leadingIcon:xb,placeholder:r??T.SEARCH,onChange:s,returnKeyType:"search",size:"md",autoCapitalize:"none",autoCorrect:!1,isRound:o,style:d,value:n})})})})});function Ei({label:e,icon:r,noPadding:t=!1,noAnimation:o=!1,children:n}){var[a,s]=React.useState(!0);return b(jn,{children:[i(B,{label:e,icon:r&&i(B.Icon,{source:S(r)}),trailing:i(oi.Arrow,{style:{transform:[{rotate:`${a?180:90}deg`}]}}),onPress:()=>{s(!a),o||wi.LayoutAnimation.configureNext(wi.LayoutAnimation.Presets.easeInEaseOut)}}),!a&&i(jn,{children:i(wi.View,{style:!t&&{paddingHorizontal:15},children:n})})]})}var wi,qp=_(()=>{"use strict";l();c();u();ne();Te();ce();wi=H(re())});var pl={};k(pl,{Codeblock:()=>cn,ErrorBoundary:()=>We,Search:()=>Co,Summary:()=>Ei,wrappers:()=>sf});var It=_(()=>{"use strict";l();c();u();$p();Yp();lf();Kp();qp()});function ff(e){return i(rr,{children:b(Xp.View,{style:{gap:12,paddingVertical:12},children:[i(D,{variant:"heading-lg/extrabold",children:"Error"}),i(cn,{selectable:!0,children:e.error.message}),nl(e.error)&&i(Ti,{error:e.error}),ol(e.error)?i(xi,{componentStack:e.error.componentStack}):null]})})}var Xp,Jp=_(()=>{"use strict";l();c();u();ne();Hu();It();ce();Xp=H(re());rf();df()});function cf(e){return i(de,{children:b(oe,{children:[e.header&&typeof e.header!="string"?e.header:i(D,{variant:"heading-lg/bold",children:e.header??T.UH_OH}),i(Zp.View,{style:{backgroundColor:or.BACKGROUND_SECONDARY,borderRadius:8,borderWidth:1,borderColor:or.BACKGROUND_TERTIARY,padding:12},children:i(D,{style:{color:or.TEXT_MUTED},children:String(e.error)})}),b(tu,{children:[e.onRetryRender&&i(Z,{variant:"destructive",text:T.RETRY_RENDER,onPress:e.onRetryRender}),e.error instanceof Error?i(Z,{text:"Details",onPress:()=>nr("BunnyErrorDetailsActionSheet",ff,{error:e.error})}):null]})]})})}var Zp,Qp,uf=_(()=>{"use strict";l();c();u();ne();je();vt();ce();Ao();Zp=H(re());Jp();Qp=globalThis.HermesInternal.getFunctionLocation(globalThis.__r).fileName});function Ti(e){var[r,t]=(0,mf.useState)(!0),o;try{var n=tf(e.error.stack);o=r?n.slice(0,4):n}catch{return null}return i(de,{children:b(Ro.View,{style:{gap:12},children:[i(D,{variant:"heading-lg/bold",children:"Call Stack"}),i(Ro.View,{style:{gap:4},children:o.map((a,s)=>i(wb,{id:s,frame:a}))}),r&&i(D,{children:"..."}),b(Ro.View,{style:{gap:8,flexDirection:"row",justifyContent:"center",alignItems:"center"},children:[i(Z,{variant:"secondary",text:`Show ${r?"more":"less"}`,icon:r?S("down_arrow"):i(Ro.Image,{style:{transform:[{rotate:`${r?0:180}deg`}]},source:S("down_arrow")}),onPress:()=>t(a=>!a)}),i(Z,{variant:"secondary",text:"Copy",icon:S("CopyIcon"),onPress:()=>Be.setString(e.error.stack)})]})]})})}function wb(e){var[r,t]=(0,mf.useState)(!0);return b(Ro.Pressable,{onPress:()=>t(o=>!o),children:[i(D,{style:{fontFamily:mt.Fonts.CODE_BOLD},children:e.frame.methodName}),i(D,{style:{fontFamily:mt.Fonts.CODE_NORMAL},ellipsizeMode:"middle",numberOfLines:r?1:void 0,children:b(D,{color:"text-muted",children:[e.frame.file===Qp?"jsbundle":e.frame.file,":",e.frame.lineNumber,":",e.frame.column]})})]},e.id)}var mf,Ro,df=_(()=>{"use strict";l();c();u();ne();Up();Te();Q();ce();mf=H(dr()),Ro=H(re());uf()});function Ai(e){var r=Eb(),t=gt(),o=Ee.useNavigation(),[n,a]=hl.default.useState(null),[s,d]=hl.default.useState(0),[f,m]=hl.default.useState(!1),p=n??[],E=p[s]??[];return i(eu,{children:b(ri,{style:r.container,children:[b(gl.View,{style:{gap:4},children:[i(D,{variant:"display-lg",children:"Uh oh."}),i(D,{variant:"text-md/normal",children:"A crash occurred while rendering a component. This could be caused by a plugin, ShiggyCord, or Discord itself."}),b(D,{variant:"text-sm/normal",color:"text-muted",children:[t.os.name,"; ",t.discord.build," (",t.discord.version,"); ",t.bunny.version]})]}),b(gl.ScrollView,{fadingEdgeLength:64,contentContainerStyle:{gap:12},children:[i(D,{variant:"heading-md/extrabold",color:"text-default",style:{marginBottom:8,textAlign:"center"},selectable:!0,children:e.error.message||"Unknown error occurred"}),nl(e.error)&&i(Ti,{error:e.error}),ol(e.error)?i(xi,{componentStack:e.error.componentStack}):null]}),b(de,{style:{gap:12,paddingVertical:16,alignItems:"center"},children:[b(oe,{direction:"horizontal",spacing:12,style:{justifyContent:"center",width:"100%"},children:[i(Z,{text:"Reload Discord",onPress:()=>Br.reload(),style:{flex:1}}),!N.safeMode?.enabled&&i(Z,{text:"Safe Mode",onPress:()=>Wu(),style:{flex:1}})]}),i(Z,{variant:"destructive",text:"Retry Render",onPress:()=>{try{console.log("[ShiggyCord][ErrorBoundaryScreen] Retry Render clicked")}catch{}e.rerender()},style:{width:"100%"}})]})]})})}var hl,gl,Eb,pf=_(()=>{"use strict";l();c();u();ne();hl=H(dr());Hu();At();lt();ke();Rt();Q();ce();gl=H(re());rf();df();Q();Eb=jr({container:{flex:1,backgroundColor:wt.colors.BG_BASE_SECONDARY,paddingHorizontal:16,height:"100%",gap:12}})});function Tb(){try{var e=Sr("ErrorBoundary")[ys];if(e)return new Promise(r=>e.getExports(t=>r(t.prototype)))}catch{}return Promise.reject(new Error("ErrorBoundary context not found"))}function gf(){try{console.log("[ShiggyCord] patchErrorBoundary: registering")}catch{}var e=Tb().catch(a=>{try{console.warn("[ShiggyCord] patchErrorBoundary: context lookup failed",a)}catch{}return null}),r=xe.await("render",e,function(){try{if(!this||!this.state||!this.state.error)return;try{console.log("[ShiggyCord] patchErrorBoundary: rendering custom error screen",this.state.error)}catch{}return hf.default.createElement(Ab,{error:this.state.error,rerender:()=>{try{try{this.setState?.({info:null,error:null,hasErr:!1})}catch{try{this.setState?.({error:null})}catch{}}}catch{}}})}catch(a){try{console.error("[ShiggyCord] patchErrorBoundary: error while rendering custom screen",a)}catch{}return}});try{var t=global;if(t){try{var o=t.ErrorUtils;if(o&&typeof o.setGlobalHandler=="function"){var n=o.getGlobalHandler?.()??o._globalHandler??null;o.setGlobalHandler((a,s)=>{try{console.error("[ShiggyCord] global uncaught error:",a,{isFatal:s}),globalThis.__SHIGGY_LAST_UNCAUGHT_ERROR=a}catch{}try{typeof n=="function"&&n(a,s)}catch{}})}}catch{}try{typeof t.addEventListener=="function"&&t.addEventListener("unhandledrejection",a=>{try{console.error("[ShiggyCord] unhandledrejection:",a?.reason??a),globalThis.__SHIGGY_LAST_UNCAUGHT_ERROR=a?.reason??a}catch{}})}catch{}}}catch{}return r}var hf,Ab,eh=_(()=>{"use strict";l();c();u();hf=H(dr());pf();He();Ma();Le();Ab=({error:e,rerender:r})=>hf.default.createElement(Ai,{error:e,rerender:r})});var vf=Nt((lN,rh)=>{l();c();u();rh.exports=po().moment});function th({locale:e}){try{var r=vf();r.locale(e.toLowerCase())}catch(t){A.error("Failed to fix timestamps (lazy moment)...",t)}wr.unsubscribe("I18N_LOAD_SUCCESS",th)}var oh,nh=_(()=>{"use strict";l();c();u();yr();Q();oh=(()=>{wr.subscribe("I18N_LOAD_SUCCESS",th)})});var na,ah=_(()=>{na="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAMAAABiM0N1AAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAuVQTFRFAAAA5uz74+375Or79vr99/r83+f35PD68/f9/v7//v799fr90+Lw8Pf7/P39/////f7+7fX63ur66fH7+/z9///+/v//+/z97/b71t745e/59vr+9/v97fP7ydb08vf8/v7+//7+/f7+9vn85+/67fT7/Pz9/f///P398vf93ev35fD6+fz9/v/9+vz+7vX83uX39fn8///99vr96PD78vb8/f39/f7+8/f83Oj17PL8/Pv9+/z97/X8t73y+Pr89/j+5On48PT7/f7+/f3+9Pb8xM/o5Oj5+/z9//7/+fv88PP89Pn9/v789vr94+v76fL8/f/8/v/+/f397/P8vsnw+fv9+/z+7PH68Pf89Pj8xsvw1+L5+v38/Pz96/D74+z99fn+/f/99/n92eL48fb9+/z+/P387fL74uv49/v99vr91Nr07/b9+/3+/P3+6/L83+f59/r99Pn9ytfx7/X8+vz+/Pz96/H7pa7d9fj98/b85uv7+Pr++vv+4+n78fb8/P3+/f7+7fT89fn88vX80t3x9/v99fn9v83t5ez6+Pv9+v3+3eb45+77+fr9/f797vX95+38+Pr9/P796vL/5u/7+fv++/7+3ur62eT1+Pv9+Pr+0N/xytfx9/n+9Pf99Pf98/b88Pb8+v39/f797vX84ez39/v9+fz+4Ov7vcrx9fn8/v7+/v397PL8+fv8+vz85/D6zdny8/f9/P79/v798fb9yNH05u/7+Pn9+fr96O767/P6+vv++v378PT94uT47fD8+v39/P398vf919/28fX8+/38+/399Pj84ev+7/T7+/3/+fz98Pb93en46/P89/r7/f39//79+Pv87/T70t3xzdj78/f8+fr9/f7++Pv98ff94er61tz08Pf8+fv++Pv9/P3+/P3+/v7//f3+/P39+fz99/v+8ff94Oj70t3z7vb98fX88vf+9vz99/v+8/j88ff87/X92eT1t8LoI12d5wAAAPd0Uk5TAB0hC8XHCwOP//+ZAlv8//tiBS7y///xSwEMusQhA4D///6UDVn5//ZhBCbn/981CLv/sBVy/vx1BTHs5kABuasOZ//9aAEa7f/kL6//oQtH///7ZAbd5h18lgIV8vMxC6D/uAc+9fQ1CaK2BT709DcGma4DL+ntJQF7hBTA1A0/+fg2cnsFnLMCEr3TCRrN4BQbzuAUFcPXCwmrxQQCj6JscTfz9C4Qt80KAW7+/iLW4BoCb/z8dwEWu8gPOuTqNAI98fRWAWXw83oGVuDcaQYytff/szUBCWbF88RmDgxWpMvm9/746M+jVxALNFl1g4R0WTkQAc0H/SkAAAKZSURBVHic7ddfSFNRHMDx+yW6g8oHFxH14IMjYkRgDxYZRH/RhwitjIqSUYRESQwpixYoNKtRFpKmIwSLMCmKiOgPjBFFC9uLL2EQRPaQQWjEBrWgundJue3ce87dfBH2e7m7Z+d+OOfce875HbRpCopQEZppEPyaFmgWkJoGyIUZicKhEjA6x3ih0HyzX2arPhUGLU53Sk+6+VgQVAYT5tVtNOldIdASGDOvutnFN/lDywxn8s3rixjOG6rga/L3JOQZ8RLPF6rk7f8bvRxi+UFVfBudcqsv5Xle0Fo+JDOmxs+VRPOBNmSPicf4CJ46h6rhZVaR28tD59AWXuXMefdy7juFahMl37NbpG2EOw6heqKiNci1nlvOoN2xCWF5qo6bTqC9PBYviq4a+h1APqLiBmnadrimDh1k0MLRtW30KEOHGItYQEbn6rmiCjUxYLNt+LisCPnpWWiz1usNXFCDjtFrzRhTbjPnlKCTdNk5xk7gDypBATptIc94A20qUCtdP2wlrZnTKtCZwdHcwowo23VKAWrnkqRBmruRFjkUIiTLPfQWmuVQB+3SJKaNo3Kok4DM0YIclkPdnJBC52mUQ2EeWc/Yv1Ea4IAc6uO4bIxcIV9OmeA76m+VZWep3gYV6EbuSGZFN3tUoIHckcyKMDtVoNuw344p7Tj7OrdUtB7dw5+wG+/rbFWDHsARy/HWtX6oUYO0J9TOtoTmhdkkKBdvRxHqLJ0+1on+EEPPYJ9oh9TNAaRKHdK0GNWCUvfnKFQKH7BMa+LsWBHRM1+ePvcuVIjrWydaw7BqaE0GE6wAr0V1mxxyBC5OTYbixjGi3LK2bZ79Pn1Uo+nF1dXpHwts6spOR1/4F3NsK87MU3YRKkKy+AMzsY5JpiynWAAAAABJRU5ErkJggg=="});function ih(e,r,t,o,n){return()=>x(function*(){if(e)return void e();var a=yield t().then(s=>s.default);typeof o=="string"&&(o={title:o}),r??=Rb.getRootNavigationRef(),r.navigate("SHIGGYCORD_CUSTOM_PAGE",{...o,render:()=>i(a,{...n})})})()}var Rb,vl,sh=_(()=>{"use strict";l();c();u();be();ne();Q();Le();It();Rb=U("getRootNavigationRef"),vl=React.memo(()=>{var e=Ee.useNavigation(),r=Ee.useRoute(),{render:t,...o}=r.params;return React.useEffect(()=>{e.setOptions({...o})},[]),i(We,{children:i(t,{})})})});function Db(){var e=!1;return React.useEffect(()=>{e=!0},[]),e}function lh(e){var r=()=>Object.values(Jt).flatMap(n=>n.map(a=>({[a.key]:{type:"pressable",title:a.title,icon:a.icon,IconComponent:()=>i(B.Icon,{source:a.icon}),usePredicate:a.usePredicate,useTrailing:a.useTrailing,useTitle:a.title,onPress:ih(a.onPress,null,a.render,a.title()),withArrow:!0}}))).reduce((n,a)=>Object.assign(n,a)),t=yl.SETTING_RENDERER_CONFIG,o=yl.SETTING_RENDERER_CONFIG;Object.defineProperty(yl,"SETTING_RENDERER_CONFIG",{enumerable:!0,configurable:!0,get:()=>({...o,VendettaCustomPage:{type:"route",title:()=>"ShiggyCord",useTitle:()=>"ShiggyCord",screen:{route:"VendettaCustomPage",getComponent:()=>vl}},SHIGGYCORD_CUSTOM_PAGE:{type:"route",title:()=>"ShiggyCord",useTitle:()=>"ShiggyCord",screen:{route:"SHIGGYCORD_CUSTOM_PAGE",getComponent:()=>vl}},BUNNY_CUSTOM_PAGE:{type:"route",title:()=>"ShiggyCord",useTitle:()=>"ShiggyCord",screen:{route:"BUNNY_CUSTOM_PAGE",getComponent:()=>vl}},...r()}),set:n=>o=n}),e.push(()=>{Object.defineProperty(yl,"SETTING_RENDERER_CONFIG",{value:t,writable:!0,get:void 0,set:void 0})});try{e.push(xe("createList",Ib,function(n,a){var[s]=n;if(s?.sections&&Array.isArray(s.sections)){var d=s.sections,f=d.findIndex(p=>p.settings?.includes("ACCOUNT"));if(f!==-1){var m=f+1;Object.keys(Jt).forEach(p=>{var E=d.some(I=>I.label===p);E||d.splice(m++,0,{label:p,title:p,settings:Jt[p].map(I=>I.key)})})}}return a}))}catch{e.push(xe("default",Pb,(a,s)=>{if(!Db()){var{sections:d}=Vt(s,m=>m.props?.sections).props,f=-~d.findIndex(m=>m.settings.includes("ACCOUNT"))||1;Object.keys(Jt).forEach(m=>{d.splice(f++,0,{label:m,title:m,settings:Jt[m].map(p=>p.key)})})}}))}}var yl,Ib,Pb,ch=_(()=>{"use strict";l();c();u();ne();He();ce();Le();Ci();sh();Jr();yl=U("SETTING_RENDERER_CONFIG"),Ib=U("createList"),Pb=Sr("SettingsOverviewScreen",!1)});var _f={};k(_f,{patchSettings:()=>yf,registerSection:()=>aa,registeredSections:()=>Jt});function aa(e){return Jt[e.name]=e.items,()=>delete Jt[e.name]}function yf(){var e=new Array;return lh(e),()=>e.forEach(r=>r())}var Jt,Ci=_(()=>{"use strict";l();c();u();ch();Jt={}});function bf(){return N.safeMode?.enabled===!0}function uh(){return x(function*({to:e=!bf(),reload:r=!0}={}){var t=(N.safeMode??={enabled:e}).enabled=e,o=Rr();yield Wn(t?{}:o?.data??{}),r&&setTimeout(()=>Br.reload(),500)}).apply(this,arguments)}var fh=_(()=>{"use strict";l();c();u();be();Ir();lt();ke()});function Ri({label:e,version:r,icon:t}){return i(B,{label:e,trailing:i(ou,{text:r}),icon:i(B.Icon,{source:typeof t=="string"?S(t):t}),onPress:()=>{Be.setString(`${e} - ${r}`),q.showCopyToClipboard()}})}var dh=_(()=>{"use strict";l();c();u();ne();Te();Q();ce();ht()});function Sf(){var e=gt();ie(N),ie(Pr);var r=[{label:T.SHIGGYCORD,version:e.bunny.version,icon:{uri:na}},{label:"Discord",version:`${e.discord.version} (${e.discord.build})`,icon:"Discord"},{label:T.LOADER,version:`${e.bunny.loader.name} ${e.bunny.loader.version}`,icon:"DownloadIcon"}],t=[{label:"React",version:e.react.version,icon:"ScienceIcon"},{label:"React Native",version:e.react.nativeVersion,icon:"MobilePhoneIcon"},{label:T.BYTECODE,version:e.hermes.bytecodeVersion,icon:"TopicsIcon"}],o=[{label:T.OPERATING_SYSTEM,version:`${e.os.name} ${e.os.version}`,icon:"ScreenIcon"},...e.os.sdk?[{label:"SDK Version",version:e.os.sdk,icon:"StaffBadgeIcon"}]:[],...un.Platform.OS!=="ios"?[{label:"Device",version:`${e.device.brand} ${e.device.model}`,icon:"MobilePhoneIcon"},{label:T.MANUFACTURER,version:e.device.manufacturer,icon:"WrenchIcon"}]:[]];return i(un.ScrollView,{style:{flex:1},contentContainerStyle:{paddingBottom:38},children:b(oe,{style:{paddingVertical:24,paddingHorizontal:12},spacing:24,children:[b(un.View,{style:{alignItems:"center",paddingVertical:16},children:[i(D,{variant:"heading-xl/bold",style:{textAlign:"center"},children:T.SHIGGYCORD}),i(D,{variant:"text-md/medium",style:{textAlign:"center",marginTop:4},children:"\u{1F4A6}Goon\u{1F4A6} your discord client!"})]}),i(pe,{title:"Core Components",children:r.map((n,a)=>i(Ri,{label:n.label,version:n.version,icon:n.icon},a))}),i(pe,{title:"Runtime Environment",children:t.map((n,a)=>i(Ri,{label:n.label,version:n.version,icon:n.icon},a))}),i(pe,{title:"Device Information",children:o.map((n,a)=>i(Ri,{label:n.label,version:n.version,icon:n.icon},a))}),i(pe,{title:"Additional Details",children:i(B,{label:"Architecture",trailing:i(B.TrailingText,{text:un.Platform.OS==="android"?"Android ARM64":"iOS ARM64"}),icon:i(B.Icon,{source:S("ScreenIcon")})})})]})})}var un,mh=_(()=>{"use strict";l();c();u();ne();je();_l();dh();$e();At();ke();ce();un=H(re());Te()});var wf={};k(wf,{dismissAlert:()=>xf,openAlert:()=>Ii});var Ii,xf,bl=_(()=>{"use strict";l();c();u();Ne();Fe();({openAlert:Ii,dismissAlert:xf}=K(()=>L("openAlert","dismissAlert")))});var hh={};k(hh,{default:()=>ph});function ph(){ie(N);var e=gt(),r=Ee.useNavigation(),t=({icon:o,label:n,subLabel:a,color:s,onPress:d})=>i(tt.TouchableOpacity,{style:{flex:1},onPress:d,activeOpacity:.7,children:i(de,{style:{backgroundColor:s,borderRadius:16,padding:16,height:100,justifyContent:"center"},children:b(tt.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:12},children:[i(tt.View,{style:{width:32,height:32,justifyContent:"center",alignItems:"center"},children:i(B.Icon,{source:o,style:{tintColor:"#FFFFFF",width:24,height:24}})}),b(tt.View,{style:{flexDirection:"column",alignItems:"flex-start",justifyContent:"center",flex:1},children:[i(D,{variant:"text-md/semibold",style:{color:"text-default",textAlign:"left"},children:n}),a&&i(D,{variant:"text-sm/medium",style:{color:"#FFFFFFCC",textAlign:"left"},children:a})]})]})})});return i(tt.ScrollView,{style:{flex:1},contentContainerStyle:{paddingBottom:38},children:b(oe,{style:{paddingVertical:24,paddingHorizontal:12},spacing:24,children:[b(pe,{title:"App Information",children:[i(B,{label:"GoonCord",icon:i(B.Icon,{source:{uri:na??""}}),trailing:i(B.TrailingText,{text:e.bunny.version})}),i(B,{label:"Discord",subLabel:`Version ${e.discord.version}`,icon:i(B.Icon,{source:S("Discord")}),trailing:i(B.TrailingText,{text:`Build ${e.discord.build}`})}),i(B,{label:"Loader",subLabel:`${e.bunny.loader.name} loader`,icon:i(B.Icon,{source:S("DownloadIcon")}),trailing:i(B.TrailingText,{text:e.bunny.loader.version??""})})]}),b(pe,{title:"Quick Actions",children:[i(B,{label:T.RELOAD_DISCORD,subLabel:"Restart the application",icon:i(B.Icon,{source:S("RetryIcon")}),onPress:()=>Br.reload()}),i(dt,{label:"Safe Mode",subLabel:"Temporarily disable all add-ons",icon:i(B.Icon,{source:S("ShieldIcon")}),value:bf(),onValueChange:o=>{uh({to:o,reload:!1}),Ii("bunny-reload-safe-mode",i(ti,{title:"Reload now?",content:o?"All add-ons will be temporarily disabled upon reload.":"All add-ons will load normally.",actions:b(su,{children:[i(Gn,{text:"Reload Now",variant:"destructive",onPress:()=>Br.reload()}),i(Gn,{text:"Later",variant:"secondary"})]})}))}})]}),b(pe,{title:"Developer",children:[i(dt,{label:T.DEVELOPER_SETTINGS,subLabel:"Enable developer tools and settings",icon:i(B.Icon,{source:S("WrenchIcon")}),value:N.developerSettings,onValueChange:o=>{N.developerSettings=o}}),i(dt,{label:T.SETTINGS_ACTIVATE_DISCORD_EXPERIMENTS,subLabel:T.SETTINGS_ACTIVATE_DISCORD_EXPERIMENTS_DESC,icon:i(B.Icon,{source:S("StaffBadgeIcon")}),value:N.enableDiscordDeveloperSettings,onValueChange:o=>{N.enableDiscordDeveloperSettings=o}})]}),i(pe,{title:"Community & Support",children:b(tt.View,{style:{flexDirection:"row",gap:12},children:[i(t,{icon:S("Discord"),label:"Discord",subLabel:"Join our support server",color:"#5865F2",onPress:()=>tt.Linking.openURL(jc)}),i(t,{icon:S("img_account_sync_github_white"),label:"GitHub",subLabel:"View the source code",color:"#24292E",onPress:()=>tt.Linking.openURL(Uc)})]})}),i(pe,{title:"System Information",children:i(B,{arrow:!0,label:T.ABOUT,subLabel:"Detailed technical information",icon:i(B.Icon,{source:S("CircleInformationIcon-primary")}),onPress:()=>r.push("SHIGGYCORD_CUSTOM_PAGE",{title:T.ABOUT,render:()=>i(Sf,{})})})})]})})}var tt,kO,gh=_(()=>{"use strict";l();c();u();ne();fh();je();_l();mh();$e();Te();At();lt();ke();bl();Bn();Q();ce();tt=H(re()),kO=H(dr())});function Sl(e){var r;try{r=new URL(e)}catch{return!1}return r.protocol==="http:"||r.protocol==="https:"}var vh=_(()=>{"use strict";l();c();u()});var _h=Nt((yh,xl)=>{l();c();u();is();xn();wn();ls();Md();((e,r)=>{typeof define=="function"&&define.amd?define([],r):typeof xl=="object"&&xl.exports?xl.exports=r():e.fuzzysort=r()})(yh,e=>{"use strict";var r=(R,w)=>{if(!R||!w)return Ze;var O=P(R);it(w)||(w=I(w));var j=O.bitflags;return(j&w._bitflags)!==j?Ze:F(O,w)},t=(R,w,O)=>{if(!R)return O?.all?C(w,O):Jl;var j=P(R),V=j.bitflags,G=j.containsSpace,M=p(O?.threshold||0),J=O?.limit||Sa,$=0,ue=0,le=w.length;function Tr(jo){$rs.peek()._score&&rs.replaceTop(jo))}if(O?.key)for(var gr=O.key,fe=0;fe-1e3&&hr[Y]>Ye){var Or=(hr[Y]+$r[Y])/4;Or>hr[Y]&&(hr[Y]=Or)}$r[Y]>hr[Y]&&(hr[Y]=$r[Y])}}if(G){for(var zr=0;zr-1e3&&Re>Ye){var Or=(Re+Se._score)/4;Or>Re&&(Re=Or)}Se._score>Re&&(Re=Se._score)}if(Wr.obj=br,Wr._score=Re,O?.scoreFn){if(Re=O.scoreFn(Wr),!Re)continue;Re=p(Re),Wr._score=Re}Re=0;--fe)wa[fe]=rs.poll();return wa.total=$+ue,wa},o=(R,w="",O="")=>{for(var j=typeof w=="function"?w:void 0,V=R.target,G=V.length,M=R.indexes,J="",$=0,ue=0,le=!1,Tr=[],gr=0;gr{typeof R=="number"?R=""+R:typeof R!="string"&&(R="");var w=me(R);return f(R,{_targetLower:w._lower,_targetLowerCodes:w.lowerCodes,_bitflags:w.bitflags})},a=()=>{Fo.clear(),at.clear()},s=(function(){function R(){Ke(this,R)}return qe(R,[{key:"indexes",get:function(){return this._indexes.slice(0,this._indexes.len).sort((O,j)=>O-j)}},{key:"indexes",set:function(O){return this._indexes=O}},{key:"highlight",value:function(O,j){return o(this,O,j)}},{key:"score",get:function(){return m(this._score)}},{key:"score",set:function(O){this._score=p(O)}}]),R})(),d=(function(R){ao(w,R);function w(){return Ke(this,w),oo(this,w,arguments)}return qe(w,[{key:"score",get:function(){return m(this._score)}},{key:"score",set:function(j){this._score=p(j)}}]),w})(cs(Array)),f=(R,w)=>{var O=new s;return O.target=R,O.obj=w.obj??Ze,O._score=w._score??Ye,O._indexes=w._indexes??[],O._targetLower=w._targetLower??"",O._targetLowerCodes=w._targetLowerCodes??Ze,O._nextBeginningIndexes=w._nextBeginningIndexes??Ze,O._bitflags=w._bitflags??0,O},m=R=>R===Ye?0:R>1?R:Math.E**(((-R+1)**.04307-1)*-2),p=R=>R===0?Ye:R>1?R:1-Math.pow(Math.log(R)/-2+1,1/.04307),E=R=>{typeof R=="number"?R=""+R:typeof R!="string"&&(R=""),R=R.trim();var w=me(R),O=[];if(w.containsSpace){var j=R.split(/\s+/);j=[...new Set(j)];for(var V=0;V{if(R.length>999)return n(R);var w=Fo.get(R);return w!==void 0||(w=n(R),Fo.set(R,w)),w},P=R=>{if(R.length>999)return E(R);var w=at.get(R);return w!==void 0||(w=E(R),at.set(R,w)),w},C=(R,w)=>{var O=[];O.total=R.length;var j=w?.limit||Sa;if(w?.key)for(var V=0;V=j)return O}}else if(w?.keys)for(var V=0;V=0;--ue){var M=Mo(G,w.keys[ue]);if(!M){$[ue]=xa;continue}it(M)||(M=I(M)),M._score=Ye,M._indexes.len=0,$[ue]=M}if($.obj=G,$._score=Ye,O.push($),O.length>=j)return O}else for(var V=0;V=j))return O}return O},F=(R,w,O=!1,j=!1)=>{if(O===!1&&R.containsSpace)return te(R,w,j);for(var V=R._lower,G=R.lowerCodes,M=G[0],J=w._targetLowerCodes,$=G.length,ue=J.length,fe=0,le=0,Tr=0;;){var gr=M===J[le];if(gr){if(pr[Tr++]=le,++fe,fe===$)break;M=G[fe]}if(++le,le>=ue)return Ze}var fe=0,br=!1,_e=0,Se=w._nextBeginningIndexes;Se===Ze&&(Se=w._nextBeginningIndexes=ir(w.target)),le=pr[0]===0?0:Se[pr[0]-1];var Lt=0;if(le!==ue)for(;;)if(le>=ue){if(fe<=0||(++Lt,Lt>200))break;--fe;var st=Vr[--_e];le=Se[st]}else{var gr=G[fe]===J[le];if(gr){if(Vr[_e++]=le,++fe,fe===$){br=!0;break}++le}else le=Se[le]}var lr=$<=1?-1:w._targetLower.indexOf(V,pr[0]),Me=!!~lr,Nr=Me?lr===0||w._nextBeginningIndexes[lr-1]===lr:!1;if(Me&&!Nr){for(var Y=0;Y{for(var Re=0,Sn=0,Mr=1;Mr<$;++Mr)Fr[Mr]-Fr[Mr-1]!==1&&(Re-=Fr[Mr],++Sn);var wa=Fr[$-1]-Fr[0]-($-1);if(Re-=(12+wa)*Sn,Fr[0]!==0&&(Re-=Fr[0]*Fr[0]*.2),!br)Re*=1e3;else{for(var jo=1,Mr=Se[0];Mr24&&(Re*=(jo-24)*10)}return Re-=(ue-$)/2,Me&&(Re/=1+$*$*1),Nr&&(Re/=1+$*$*1),Re-=(ue-$)/2,Re};if(br)if(Nr){for(var Y=0;Y<$;++Y)pr[Y]=lr+Y;var Bo=pr,ko=zr(pr)}else var Bo=Vr,ko=zr(Vr);else{if(Me)for(var Y=0;Y<$;++Y)pr[Y]=lr+Y;var Bo=pr,ko=zr(Bo)}w._score=ko;for(var Y=0;Y<$;++Y)w._indexes[Y]=Bo[Y];w._indexes.len=$;var Wr=new s;return Wr.target=w.target,Wr._score=w._score,Wr._indexes=w._indexes,Wr},te=(R,w,O)=>{for(var j=new Set,V=0,G=Ze,M=0,J=R.spaceSearches,$=J.length,ue=0,le=()=>{for(var zr=ue-1;zr>=0;zr--)w._nextBeginningIndexes[Ue[zr*2+0]]=Ue[zr*2+1]},Tr=!1,Y=0;Y<$;++Y){$r[Y]=Ye;var gr=J[Y];if(G=F(gr,w),O){if(G===Ze)continue;Tr=!0}else if(G===Ze)return le(),Ze;var fe=Y===$-1;if(!fe){for(var br=G._indexes,_e=!0,Se=0;Se=0&&st===w._nextBeginningIndexes[lr];lr--)w._nextBeginningIndexes[lr]=Lt,Ue[ue*2+0]=lr,Ue[ue*2+1]=st,ue++}V+=G._score/$,$r[Y]=G._score/$,G._indexes[0]V){if(O)for(var Y=0;Y<$;++Y)$r[Y]=Nr._score/$;return Nr}O&&(G=w),G._score=V;var Y=0;for(var Or of j)G._indexes[Y++]=Or;return G._indexes.len=Y,G},Ce=R=>R.replace(RegExp("[\\u0041-\\u005A\\u0061-\\u007A\\u00AA\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02B8\\u02E0-\\u02E4\\u1D00-\\u1D25\\u1D2C-\\u1D5C\\u1D62-\\u1D65\\u1D6B-\\u1D77\\u1D79-\\u1DBE\\u1E00-\\u1EFF\\u2071\\u207F\\u2090-\\u209C\\u212A-\\u212B\\u2132\\u214E\\u2160-\\u2188\\u2C60-\\u2C7F\\uA722-\\uA787\\uA78B-\\uA7DC\\uA7F1-\\uA7FF\\uAB30-\\uAB5A\\uAB5C-\\uAB64\\uAB66-\\uAB69\\uFB00-\\uFB06\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\u{10780}-\\u{10785}\\u{10787}-\\u{107B0}\\u{107B2}-\\u{107BA}\\u{1DF00}-\\u{1DF1E}\\u{1DF25}-\\u{1DF2A}]+","gu"),w=>w.normalize("NFD")).replace(/[\u0300-\u036f]/g,""),me=R=>{R=Ce(R);for(var w=R.length,O=R.toLowerCase(),j=[],V=0,G=!1,M=0;M=97&&J<=122?J-97:J>=48&&J<=57?26:J<=127?30:31;V|=1<<$}return{lowerCodes:j,bitflags:V,containsSpace:G,_lower:O}},ee=R=>{for(var w=R.length,O=[],j=0,V=!1,G=!1,M=0;M=65&&J<=90,ue=$||J>=97&&J<=122||J>=48&&J<=57,le=$&&!V||!G||!ue;V=$,G=ue,le&&(O[j++]=M)}return O},ir=R=>{R=Ce(R);for(var w=R.length,O=ee(R),j=[],V=O[0],G=0,M=0;MM?j[M]=V:(V=O[++G],j[M]=V===void 0?w:V);return j},Fo=new Map,at=new Map,pr=[],Vr=[],Ue=[],hr=[],$r=[],z=[],sr=[],Mo=(R,w)=>{var O=R[w];if(O!==void 0)return O;if(typeof w=="function")return w(R);var j=w;Array.isArray(w)||(j=w.split("."));for(var V=j.length,G=-1;R&&++Gtypeof R=="object"&&typeof R._bitflags=="number",Sa=1/0,Ye=-Sa,Jl=[];Jl.total=0;var Ze=null,xa=n(""),Hv=R=>{var w=[],O=0,j={},V=G=>{for(var M=0,J=w[M],$=1;$>1]=w[M],$=1+(M<<1)}for(var le=M-1>>1;M>0&&J._score>1)w[M]=w[le];w[M]=J};return j.add=G=>{var M=O;w[O++]=G;for(var J=M-1>>1;M>0&&G._score>1)w[M]=w[J];w[M]=G},j.poll=G=>{if(O!==0){var M=w[0];return w[0]=w[--O],V(),M}},j.peek=G=>{if(O!==0)return w[0]},j.replaceTop=G=>{w[0]=G,V()},j},rs=Hv();return{single:r,go:t,prepare:n,cleanup:a}})});function Nb(e){var[r,t]=React.useState(""),[o,n]=React.useState(""),[a,s]=React.useState(!1),[d,f]=React.useState(!1);React.useEffect(()=>{f(Sl(r))},[r]);function m(){!r||!Sl(r)||(s(!0),e.fetchFn(r).then(()=>xf("AddonInputAlert")).catch(p=>p instanceof Error?n(p.message):String(p)).finally(()=>s(!1)))}return i(ti,{title:e.label,content:"Type in the source URL you want to install from:",extraContent:b(oe,{style:{marginTop:-8,gap:12},children:[i(Dr.View,{style:{backgroundColor:"rgba(0,0,0,0.05)",borderRadius:8,padding:4,paddingHorizontal:8},children:i(ur,{autoFocus:!0,isClearable:!0,value:r,onChange:p=>{t(p),o&&n("")},returnKeyType:"done",onSubmitEditing:m,state:o?"error":void 0,errorMessage:o||void 0,style:{fontSize:16}})}),i(Dr.View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:i(Z,{size:"sm",variant:"tertiary",text:"Import from clipboard",icon:S("ClipboardListIcon"),onPress:()=>Be.getString().then(p=>t(p.trim()))})})]}),actions:b(Dr.View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",gap:8},children:[i(Gn,{disabled:a,text:"Cancel",variant:"secondary",style:{flex:1}}),i(Z,{loading:a,text:a?"Installing...":"Install",variant:"primary",onPress:m,icon:a?void 0:S("DownloadIcon"),style:{flex:1}})]})})}function Zt({CardComponent:e,...r}){var[t,o]=React.useState(""),[n,a]=React.useState(()=>null),{bottom:s}=ru(),d=Ee.useNavigation(),f=React.useRef(null),[m,p]=React.useState(!1);React.useEffect(()=>{var C=!0;return Promise.resolve().then(()=>H(_h())).then(F=>{var te=F.default??F;C&&(f.current=te,p(!0))}).catch(()=>{}),()=>{C=!1}},[]),(0,ia.useEffect)(()=>{r.OptionsActionSheetComponent&&d.setOptions({headerRight:()=>i(we,{size:"sm",variant:"secondary",icon:S("MoreHorizontalIcon"),onPress:()=>nr("AddonMoreSheet",r.OptionsActionSheetComponent)})})},[d]);var E=(0,ia.useMemo)(()=>{var C=r.items;r.resolveItem&&(C=C.map(r.resolveItem).filter(us));var F=C.filter(te=>us(te)&&typeof te=="object");return!t&&n&&F.sort(n),!m||!f.current?[]:f.current.go(t,F,{keys:r.searchKeywords,all:!0})},[r.items,n,t,m]),I=(0,ia.useCallback)(()=>{if(!r.installAction)return()=>{};var{label:C,onPress:F,fetchFn:te}=r.installAction;te?Ii("AddonInputAlert",i(Nb,{label:C??"Install",fetchFn:te})):F?.()},[]);if(E.length===0&&!t)return b(Dr.View,{style:{gap:32,flexGrow:1,justifyContent:"center",alignItems:"center"},children:[b(Dr.View,{style:{gap:8,alignItems:"center"},children:[i(Dr.Image,{source:S("empty_quick_switcher")}),i(D,{variant:"text-lg/semibold",color:"text-default",children:"Oops! Nothing to see here\u2026 yet!"})]}),i(Z,{size:"lg",icon:S("DownloadIcon"),text:r.installAction?.label??"Install",onPress:I})]});var P=b(Dr.View,{style:{paddingBottom:8},children:[N.safeMode?.enabled&&b(Dr.View,{style:{marginBottom:10},children:[i(ei,{messageType:0,children:r.safeModeHint?.message}),r.safeModeHint?.footer]}),b(Dr.View,{style:{flexDirection:"row",gap:8},children:[i(Co,{style:{flexGrow:1},isRound:!!r.sortOptions,onChangeText:C=>o(C)}),r.sortOptions&&i(we,{icon:S("MoreVerticalIcon"),variant:"tertiary",disabled:!!t,onPress:()=>Lb({key:"AddonListSortOptions",header:{title:"Sort Options"},options:Object.entries(r.sortOptions).map(([C,F])=>({label:C,onPress:()=>a(()=>F)}))})})]}),r.ListHeaderComponent&&i(r.ListHeaderComponent,{})]});return b(We,{children:[i(du,{data:E,extraData:t,estimatedItemSize:136,ListHeaderComponent:P,ListEmptyComponent:()=>b(Dr.View,{style:{gap:12,padding:12,alignItems:"center"},children:[i(Dr.Image,{source:S("devices_not_found")}),i(D,{variant:"text-lg/semibold",color:"text-default",children:"Hmmm... could not find that!"})]}),contentContainerStyle:{padding:8,paddingHorizontal:12,paddingBottom:90},ItemSeparatorComponent:()=>i(Dr.View,{style:{height:8}}),ListFooterComponent:r.ListFooterComponent,renderItem:({item:C})=>i(e,{item:C.obj,result:C})}),r.installAction&&i(uu,{positionBottom:s+8,icon:S("PlusLargeIcon"),onPress:I})]})}var ia,Dr,Lb,mF,wl=_(()=>{"use strict";l();c();u();ne();Te();ke();bl();vt();vh();Ne();Fe();Q();ce();It();An();ia=H(dr()),Dr=H(re()),{showSimpleActionSheet:Lb,hideActionSheet:mF}=K(()=>L("showSimpleActionSheet"))});var Ef,bh=_(()=>{"use strict";l();c();u();Q();Rt();Ef=jr({smallIcon:{tintColor:wt.colors.LOGO_PRIMARY,height:18,width:18},badgeIcon:{tintColor:wt.colors.LOGO_PRIMARY,height:12,width:12},badgesContainer:{flexWrap:"wrap",flexDirection:"row",gap:6,borderRadius:6,padding:4}})});function Tf(){return Ob()(wt.unsafe_rawColors.YELLOW_300).alpha(.3).hex()}function Fb(){var e=Ef(),{plugin:r,result:t}=El(),o=t[0].highlight((s,d)=>i(D,{style:{backgroundColor:Tf()},children:s},d)),n=r.icon&&S(r.icon),a=i(D,{numberOfLines:1,variant:"heading-lg/semibold",children:o.length?o:r.name});return b(ot.View,{style:{flexDirection:"row",alignItems:"center",gap:6},children:[n&&i(ot.Image,{style:e.smallIcon,source:n}),a]})}function Mb(){var{plugin:e,result:r}=El(),t=Ef();if(!e.authors)return null;var o=r[2].highlight((s,d)=>i(D,{style:{backgroundColor:Tf()},children:s},d)),n=e.getBadges(),a=o.length>0?o:e.authors.map(s=>s.name).join(", ");return b(ot.View,{style:{flexDirection:"row",flexWrap:"wrap",flexShrink:1,gap:4},children:[b(D,{variant:"text-sm/semibold",color:"text-muted",children:["by ",a]}),n.length>0&&i(ot.View,{style:t.badgesContainer,children:n.map((s,d)=>i(ot.Image,{source:s.source,style:t.badgeIcon},d))})]})}function Bb(){var{plugin:e,result:r}=El(),t=r[1].highlight((o,n)=>i(D,{style:{backgroundColor:Tf()},children:o},n));return i(D,{variant:"text-md/medium",children:t.length?t:e.description})}function Af({result:e,item:r}){r.usePluginState();var[,t]=W.useReducer(()=>({}),0),o=(0,sa.useMemo)(()=>({plugin:r,result:e}),[r,e]),n=(r.id||"").toLowerCase(),a=n.includes("quickinstall");return i(Sh.Provider,{value:o,children:i(de,{children:b(oe,{spacing:16,children:[b(ot.View,{style:{flexDirection:"row",justifyContent:"space-between"},children:[b(ot.View,{style:{flexShrink:1},children:[i(Fb,{}),i(Mb,{})]}),i(ot.View,{children:b(oe,{spacing:12,direction:"horizontal",children:[i(kb,{}),i(ot.View,{style:{opacity:a?.45:1},children:i(nu,{value:r.isEnabled(),disabled:a,onValueChange:s=>{a||(r.toggle(s),t())}})})]})})]}),i(Bb,{})]})})})}var sa,ot,Ob,Sh,El,kb,xh=_(()=>{"use strict";l();c();u();ne();Q();bh();Te();ce();vt();sa=H(dr()),ot=H(re()),Ob=()=>Vn(),Sh=(0,sa.createContext)(null),El=()=>(0,sa.useContext)(Sh);kb=()=>{var{plugin:e}=El(),r=Ee.useNavigation();return b(ot.View,{style:{flexDirection:"row",gap:6},children:[i(we,{size:"sm",variant:"secondary",icon:S("SettingsIcon"),disabled:!e.getPluginSettingsComponent(),onPress:()=>r.push("SHIGGYCORD_CUSTOM_PAGE",{title:e.name,render:e.getPluginSettingsComponent()})}),i(we,{size:"sm",variant:"secondary",icon:S("CircleInformationIcon-primary"),onPress:()=>{nr("PluginInfoActionSheet",e.resolveSheetComponent(),{plugin:e,navigation:r})}})]})}});var wh={};k(wh,{VdPluginManager:()=>X});var Ur,fn,X,Qt=_(()=>{"use strict";l();c();u();be();$e();ke();Jr();yr();Ur=qr(Cr(St("VENDETTA_PLUGINS"))),fn={},X={plugins:Ur,pluginFetch(e){return x(function*(){return yield ze(e,{cache:"no-store"})})()},fetchPlugin(e){return x(function*(){e.endsWith("/")||(e+="/");var r=Ur[e],t;try{t=yield(yield this.pluginFetch(e+"manifest.json")).json()}catch{throw new Error(`Failed to fetch manifest for ${e}`)}var o;if(r?.manifest.hash!==t.hash)try{o=yield(yield this.pluginFetch(e+(t.main||"index.js"))).text()}catch{}if(!o&&!r)throw new Error(`Failed to fetch JS for ${e}`);Ur[e]={id:e,manifest:t,enabled:r?.enabled??!1,update:r?.update??!0,js:o??r.js}}).call(this)},installPlugin(e,r=!0){return x(function*(){if(e.endsWith("/")||(e+="/"),typeof e!="string"||e in Ur)throw new Error("Plugin already installed");yield this.fetchPlugin(e),r&&(yield this.startPlugin(e))}).call(this)},evalPlugin(e){return x(function*(){var r={...globalThis.vendetta,plugin:{id:e.id,manifest:e.manifest,storage:yield Cr(St(e.id))},logger:new Ja(`ShiggyCord \xBB ${e.manifest.name}`)},t=`vendetta=>{return ${e.js}} +//# sourceURL=${e.id}`,o=(0,eval)(t)(r),n=typeof o=="function"?o():o;return n?.default??n??{}})()},startPlugin(e){return x(function*(){e.endsWith("/")||(e+="/");var r=Ur[e];if(!r)throw new Error("Attempted to start non-existent plugin");try{if(!N.safeMode?.enabled){var t=yield this.evalPlugin(r);fn[e]=t,t.onLoad?.()}r.enabled=!0}catch(o){A.error(`Plugin ${r.id} errored whilst loading, and will be unloaded`,o);try{fn[r.id]?.onUnload?.()}catch(n){A.error(`Plugin ${r.id} errored whilst unloading`,n)}delete fn[e],r.enabled=!1}}).call(this)},stopPlugin(e,r=!0){e.endsWith("/")||(e+="/");var t=Ur[e],o=fn[e];if(!t)throw new Error("Attempted to stop non-existent plugin");if(!N.safeMode?.enabled){try{o?.onUnload?.()}catch(n){A.error(`Plugin ${t.id} errored whilst unloading`,n)}delete fn[e]}r&&(t.enabled=!1)},removePlugin(e){return x(function*(){e.endsWith("/")||(e+="/");var r=Ur[e];r.enabled&&this.stopPlugin(e),delete Ur[e],yield Ss(e)}).call(this)},initPlugins(){return x(function*(){yield Ut(N,Ur);var e=Object.keys(Ur);if(!N.safeMode?.enabled){var r=e.filter(d=>Ur[d].enabled),t=2,o=500;if(r.length>0)for(var n=d=>new Promise(f=>setTimeout(f,d)),a=0;ax(function*(){try{if(!Ur[d])return;yield this.startPlugin(d).catch(f=>A.error(`Vendetta plugin ${d} failed to start:`,f))}catch(f){A.error(`Unexpected error while starting vendetta plugin ${d}:`,f)}}).call(this))),a+tUr[m]?.update);for(var f of d){try{yield this.fetchPlugin(f).catch(m=>{A.error(m.message)})}catch(m){A.error(`Failed background fetch for vendetta plugin ${f}:`,m)}yield new Promise(m=>setTimeout(m,200))}}).call(this)}return()=>this.stopAllPlugins()}).call(this)},stopAllPlugins(){return Object.keys(fn).forEach(e=>this.stopPlugin(e,!1))},getSettings:e=>fn[e]?.settings}});function Gb(e,r=null,t=!1){if(!(e.guild_id!==$c&&e.guild_id!==Hc)){var o;if(e.parent_id===zc||e.parent_id===Vc)o="Plugin";else if((e.parent_id===$a||e.parent_id===Va)&&pt())o="Theme";else return;var{firstMessage:n}=t?jb(e):{firstMessage:r},a=n?.content?.match(Gc)?.filter(Pi[o].urlsFilter);if(!(!a||!a[0]))return o==="Plugin"&&!a[0].endsWith("/")&&(a[0]+="/"),[o,a[0]]}}function Hb(e,r=null,t=!1){var[o,n]=Gb(e,r,t)??[];ie(X.plugins),ie(ge);var[a,s]=React.useState(!1);if(!o||!n)return[!0];var d=!!Pi[o].storage[n],f=()=>x(function*(){s(!0);try{yield Pi[o].installOrRemove(n)}catch(m){q(m.message,S("Small"))}finally{s(!1)}})();return[!1,o,d,a,f]}var jb,Ub,Pi,Vb,Eh,Th=_(()=>{"use strict";l();c();u();be();ne();je();Qt();$e();Ir();Te();Kt();He();Bn();Ne();ce();Le();It();ht();({useFirstForumPostMessage:jb}=K(()=>L("useFirstForumPostMessage"))),Ub=U("MostCommonForumPostReaction"),Pi={Plugin:{storage:X.plugins,urlsFilter:e=>e.startsWith(Ha),installOrRemove:e=>{var r=Pi.Plugin.storage[e];return r?X.removePlugin(e):X.installPlugin(e)}},Theme:{storage:ge,urlsFilter:e=>e.endsWith(".json"),installOrRemove:e=>{var r=Pi.Theme.storage[e];return r?Yt(e):Tt(e)}}};Vb=()=>xe("MostCommonForumPostReaction",Ub,([{thread:e,firstMessage:r}],t)=>{var[o,n,a,s,d]=Hb(e,r,!0);if(!o)return b(jn,{children:[t,i(We,{children:i(Z,{size:"sm",loading:s,disabled:s,variant:a?"secondary":"primary",text:a?T.UNINSTALL:T.INSTALL,onPress:d,icon:S(a?"ic_message_delete":"DownloadIcon"),style:{marginLeft:8}})})]})}),Eh=(()=>{var e=[Vb()];return()=>e.map(r=>r())})});function Cf({title:e,confirmText:r,confirmColor:t,onConfirm:o,cancelText:n,placeholder:a,initialValue:s="",secureTextEntry:d}){var[f,m]=React.useState(s),[p,E]=React.useState("");function I(){var P=Promise.resolve(o(f));P.then(()=>{Ah.close()}).catch(C=>{E(C.message)})}return i(Qa,{title:e,confirmText:r,confirmColor:t,isConfirmButtonDisabled:p.length!==0,onConfirm:I,cancelText:n,onCancel:()=>Ah.close(),children:i(fu,{placeholder:a,value:f,onChange:P=>{m(typeof P=="string"?P:P.text),p&&E("")},returnKeyType:"done",onSubmitEditing:I,error:p||void 0,secureTextEntry:d,autoFocus:!0,showBorder:!0,style:{alignSelf:"stretch"}})})}var Ah,Ch=_(()=>{"use strict";l();c();u();ne();ce();Le();Ah=U("openLazy","close")});function yt(e){var r=e;return r.body=e.content,delete r.content,r.isDismissable??=!0,Rh.show(r)}var Rh,Rf,Ih,la=_(()=>{"use strict";l();c();u();be();Le();Ch();Rh=U("openLazy","close");Rf=(e,r)=>Rh.openLazy({importer:()=>x(function*(){return()=>React.createElement(e,r)})()}),Ih=e=>Rf(Cf,e)});function Lh(e){if(e.startsWith(Ha))return"plugin";if(e.endsWith(".json")&&pt())return"theme"}function Nh(e,r){(e==="plugin"?X.installPlugin.bind(X):Tt)(r).then(()=>{q(T.SUCCESSFULLY_INSTALLED,S("Check"))}).catch(t=>{q(t.message,S("Small"))})}var Oh,zb,Wb,Ph,Dh,Fh,Mh=_(()=>{"use strict";l();c();u();be();je();la();Qt();Ir();Te();Kt();He();Bn();Ne();Q();Fa();Rn();Le();ht();Oh=H(re()),zb=cr(Oa("showSimpleActionSheet")),Wb=U("handleClick"),{getChannelId:Ph}=K(()=>ni),{getChannel:Dh}=K(()=>L("getChannel"));Fh=(()=>{var e=new Array;return e.push(xe("showSimpleActionSheet",zb,r=>{if(r[0].key==="LongPressUrl"){var{header:{title:t},options:o}=r[0],n=Lh(t);n&&o.push({label:T.INSTALL_ADDON,onPress:()=>Nh(n,t)})}})),e.push(ut("handleClick",Wb,function(r,t){return x(function*(){var{href:o}=r[0],n=Lh(o);if(!n)return t.apply(this,r);if(n==="theme"&&Dh(Ph())?.parent_id!==Va&&Dh(Ph())?.parent_id!==$a)return t.apply(this,r);yt({title:T.HOLD_UP,content:To("CONFIRMATION_LINK_IS_A_TYPE",{urlType:n}),onConfirm:()=>Nh(n,o),confirmText:T.INSTALL,cancelText:T.CANCEL,secondaryConfirmText:T.OPEN_IN_BROWSER,onConfirmSecondary:()=>Oh.Linking.openURL(o)})}).call(this)})),()=>e.forEach(r=>r())})});var kh={};k(kh,{default:()=>Yb});var Bh,Yb,jh=_(()=>{"use strict";l();c();u();eo();Th();Mh();Bh=[],Yb=Lr({manifest:{id:"bunny.quickinstall",version:"1.0.0",type:"plugin",spec:3,main:"",display:{name:"QuickInstall",description:"Quickly install Vendetta plugins and themes",authors:[{name:"Vendetta Team"}]}},start(){Bh=[Eh(),Fh()]},stop(){Bh.forEach(e=>e())}})});var Pf={};k(Pf,{deleteJsxCreate:()=>Kb,onJsxCreate:()=>Tl,patchJsx:()=>If});function Tl(e,r){Io.has(e)||Io.set(e,[]),Io.get(e).push(r)}function Kb(e,r){if(Io.has(e)){var t=Io.get(e);t.splice(t.indexOf(r),1),t.length===0&&Io.delete(e)}}function If(){var e=([t],o)=>{if(typeof o.type>"u")return o.type="RCTView",o;if(typeof t=="function"&&Io.has(t.name)){var n=Io.get(t.name);for(var a of n){var s=a(t,o);s!==void 0&&(o=s)}return o}},r=[xe("jsx",Uh,e),xe("jsxs",Uh,e)];return()=>r.forEach(t=>t())}var Io,Uh,Al=_(()=>{"use strict";l();c();u();He();Fe();Io=new Map,Uh=U("jsx","jsxs")});var Hh={};k(Hh,{default:()=>Xb});var qb,Gh,Df,Cl,Xb,Vh=_(()=>{"use strict";l();c();u();be();He();Al();Fe();eo();Q();qb=Sr("useBadges",!1),Gh=new Map,Df=new Map,Cl=new Set,Xb=Lr({manifest:{id:"bunny.badges",version:"1.2.0",type:"plugin",spec:3,main:"",display:{name:"Badges",description:"Adds badges to user's profile",authors:[{name:"cocobo1"},{name:"pylixonly"}]}},start(){Tl("ProfileBadge",(t,o)=>{if(o.props.id?.startsWith("rain-")){var n=Df.get(o.props.id);n&&(o.props.source=n.source,o.props.label=n.label,o.props.id=n.id)}}),Tl("RenderedBadge",(t,o)=>{if(o.props.id?.startsWith("rain-")){var n=Df.get(o.props.id);n&&Object.assign(o.props,n)}});var e=(t,o)=>x(function*(){try{var n=yield fetch(t);return n.ok?yield n.json():o}catch{return o}})(),r=t=>x(function*(){if(!Cl.has(t)){Cl.add(t);try{var[o,n,a,s,d]=yield Promise.all([e("https://codeberg.org/chocomint-chan/GoonCord_Badges/raw/branch/main/badges.json",{}),e("https://codeberg.org/chocomint-chan/GoonCord_Badges/raw/branch/main/assets/roles/roles.json",{}),e("https://codeberg.org/raincord/badges/raw/branch/main/badges.json",{}),e("https://codeberg.org/raincord/badges/raw/branch/main/assets/roles/roles.json",{}),e("https://badge.equicord.org/badges.json",{})]),f=[],m=[{badges:o,roles:n},{badges:a,roles:s}];m.forEach(({badges:E,roles:I})=>{var P=E[t];P&&(P.roles?.forEach(C=>{var F=I[C];F&&f.push({label:F.label,url:F.url})}),P.custom&&f.push(...P.custom))});var p=d[t]??[];p.forEach(E=>{f.push({label:E.tooltip,url:E.badge})}),Gh.set(t,f),f.forEach((E,I)=>{var P=`rain-${t}-${I}`;Df.set(P,{id:P,source:{uri:E.url},label:E.label,userId:t})}),wr.dispatch({type:"USER_UPDATE",user:{id:t}})}catch(E){console.error("[bunny.badges] Failed to fetch/process badges:",E)}finally{Cl.delete(t)}}})();return xe("default",qb,([t],o)=>{if(t){var n=t.userId,a=Gh.get(n);if(!a){Cl.has(n)||r(n);return}a.forEach((s,d)=>{var f=`rain-${n}-${d}`;o.unshift({id:f,description:s.label,icon:" _"})})}})}})});var qh={};k(qh,{default:()=>oS});function Qb(){var e=/client-analytics\.braintreegateway\.com|discord\.com\/api\/v9\/(science|track)|app\.adjust\..*|.*\.ingest\.sentry\.io/;try{var r=ut("send",XMLHttpRequest.prototype,function(t,o){if(!(this.__sentry_xhr__?.url&&e.test(this.__sentry_xhr__.url)))return o.apply(this,t)});return r}catch{return()=>!1}}function eS(){var e={};try{Object.keys(console).forEach(r=>{var t=console[r];if(t){e[r]=t;var o=t.__sentry_original__;console[r]=o??t}})}catch(r){A.log("Failed to de-sentrify console functions!",r)}return()=>{Object.keys(e).forEach(r=>{e[r]&&(console[r]=e[r])})}}function rS(){var e=[Rl?.AnalyticsActionHandlers&&Po("handleTrack",Rl.AnalyticsActionHandlers),Rl?.AnalyticsActionHandlers&&Po("handleFingerprint",Rl.AnalyticsActionHandlers),$h&&Po("track",$h),zh&&Po("trackWithMetadata",zh),Wh&&Po("submitLiveCrashReport",Wh),Yh?._metrics&&Po("push",Yh._metrics)].filter(Boolean);return()=>e.forEach(r=>r())}function tS(){var e=[];if(_r.initializer&&e.push(Po("initSentry",_r.initializer)),_r.main&&_r.main.addBreadcrumb&&e.push(Po("addBreadcrumb",_r.main)),_r.client)try{_r.client.getOptions().enabled=!1,_r.client.close(),_r.main&&(_r.main.getStackTop&&_r.main.getStackTop().scope.clear(),_r.main.getScope&&_r.main.getScope().clear())}catch{}return()=>{try{e.forEach(r=>r()),_r.client&&(_r.client.getOptions().enabled=!0,_r.client.open())}catch{}}}var Lf,Rl,$h,zh,Wh,Yh,Jb,Kh,Zb,_r,Po,oS,Xh=_(()=>{"use strict";l();c();u();eo();Fe();He();yr();Lf=[],Rl=L("AnalyticsActionHandlers"),$h=L("encodeProperties","track"),zh=L("getVoiceStateMetadata"),Wh=L("submitLiveCrashReport"),Yh=L("_metrics"),Jb=globalThis.__SENTRY__,Kh=Jb?.hub,Zb=Kh?.getClient(),_r={initializer:L("initSentry"),main:Kh,client:Zb},Po=(e,r)=>{try{return ut(e,r,()=>{})}catch{return()=>!1}};oS=Lr({manifest:{id:"bunny.notrack",version:"1.1.0",type:"plugin",spec:3,main:"",display:{name:"NoTrack",description:"Disables Discord's telemetry",authors:[{name:"maisymoe"}]}},start(){Lf=[Qb(),eS(),rS(),tS()].filter(Boolean),A.log("NoTrack: Enabled - all telemetry tracking disabled")},stop(){Lf.forEach(e=>e?.()),Lf=[],A.log("NoTrack: Disabled - telemetry tracking restored")}})});var Zh={};k(Zh,{default:()=>sS});function iS(e,r){var t=e;return r.twitter&&(t=t.replace(/https?:\/\/(?:www\.)?(twitter\.com|x\.com)(\/[^\s]+)/gi,"https://fxtwitter.com$2")),r.instagram&&(t=t.replace(/https?:\/\/(?:www\.)?instagram\.com(\/[^\s]+)/gi,"https://kkinstagram.com$1")),r.tiktok&&(t=t.replace(/https?:\/\/(?:www\.)?tiktok\.com(\/[^\s]+)/gi,"https://tiktokez.com$1"),t=t.replace(/https?:\/\/vm\.tiktok\.com\/([A-Za-z0-9]+)\/?/gi,"https://vm.tiktokez.com/$1")),r.reddit&&(t=t.replace(/https?:\/\/(?:www\.)?reddit\.com(\/[^\s]+)/gi,"https://rxddit.com$1")),t}var yB,_B,bB,SB,Jh,nS,aS,Di,sS,Qh=_(()=>{"use strict";l();c();u();eo();Fe();He();yr();ke();Q();({TableRowGroup:yB,TableRow:_B,TableSwitchRow:bB,Stack:SB}=L("TableRowGroup","TableRow","TableSwitchRow","Stack")),{ScrollView:Jh,Text:nS}=re(),aS=L("sendMessage"),Di=null;sS=Lr({manifest:{id:"bunny.fixembed",version:"1.0.0",type:"plugin",spec:3,main:"",display:{name:"FixEmbed",description:"Improves social media embeds by using privacy-friendly alternative frontends.",authors:[{name:"ShiggyCord Team"}]}},SettingsComponent(){var{useState:e,useEffect:r}=W,[t,o]=e({twitter:N.fixembed?.twitter??!0,instagram:N.fixembed?.instagram??!0,tiktok:N.fixembed?.tiktok??!0,reddit:N.fixembed?.reddit??!0});r(()=>{N.fixembed=t},[t]);var n=(P,C)=>{o(F=>({...F,[P]:C}))},{TableRowGroup:a,TableRow:s,TableSwitchRow:d,Stack:f}=L("TableRowGroup","TableRow","TableSwitchRow","Stack");if(!a||!d||!s||!f)return W.createElement(Jh,{style:{flex:1,padding:12}},W.createElement(nS,null,"FixEmbed UI unavailable (missing TableRow components)."));var m=a,p=s,E=d,I=f;return W.createElement(Jh,{style:{flex:1}},[W.createElement(I,{spacing:8,style:{padding:10}},W.createElement(m,{title:"Platforms"},W.createElement(E,{label:"Twitter/X",value:t.twitter,onValueChange:P=>n("twitter",P)}),W.createElement(E,{label:"Instagram",value:t.instagram,onValueChange:P=>n("instagram",P)}),W.createElement(E,{label:"TikTok",value:t.tiktok,onValueChange:P=>n("tiktok",P)}),W.createElement(E,{label:"Reddit",value:t.reddit,onValueChange:P=>n("reddit",P)})),W.createElement(m,{title:"About"},W.createElement(p,{label:"Description",subLabel:"This plugin automatically converts social media links to privacy-friendly alternative frontends for better embeds.",disabled:!0})))])},start(){A.log("FixEmbed: Starting plugin"),N.fixembed=N.fixembed||{twitter:!0,instagram:!0,tiktok:!0,reddit:!0},Di||(Di=xe("sendMessage",aS,e=>{var r=N.fixembed;e[1]?.content&&(e[1].content=iS(e[1].content,r),e[1].nonce=e[1].nonce||Math.random().toString(36).slice(2))})),A.log("FixEmbed: Patched outgoing messages")},stop(){A.log("FixEmbed: Stopping plugin"),Di&&(Di(),Di=null),A.log("FixEmbed: Unpatched outgoing messages")}})});var tg={};k(tg,{default:()=>pS});function Dl(e){if(!e)return!1;var r=e.split("?")[0].toLowerCase();return lS.some(t=>r.endsWith(t))}function cS(e){if(!e)return e;var r=e.replace("cdn.discordapp.com","media.discordapp.net");return r.includes("media.discordapp.net")||r.includes("images-ext")?r+(r.includes("?")?"&":"?")+"format=jpeg":e}function uS(){var e=globalThis.__bunny?.metro?.modules??globalThis.modules;if(!e)return null;for(var r in e)try{var t=e[r]?.publicModule?.exports;if(!t)continue;var o=t.default;if(o?.$$typeof?.toString().includes("memo")&&o.type&&(o.type.displayName==="GIFFavButton"||o.type.name==="GIFFavButton"))return o;if(typeof t=="function"&&(t.displayName==="GIFFavButton"||t.name==="GIFFavButton"))return t}catch{}return null}function fS(e){return e.isGIFV?e:{...e,isGIFV:!0,embedURI:e.embedURI||e.sourceURI||e.uri,videoURI:e.videoURI||e.uri,embedProviderName:e.embedProviderName||""}}function rg(){return Do=uS(),Do?(Li=Do.type,Do.type=function(r){var t={...r};return t.source&&!t.source.isGIFV&&(t.source=fS(t.source)),Li(t)},Do.type.displayName="GIFFavButton",!0):!1}function dS(){var e=L("addFavoriteGIF");e&&(Il=Yr("addFavoriteGIF",e,r=>{var t=r[0];if(!(!t||typeof t!="object")){var o=t.url||"",n=t.src||"";Dl(o)||Dl(n)?t.format=2:t.format===2&&(t.format=1)}}))}function mS(){var e=L("useFavoriteGIFsMobile");if(e){Pl=e,Ni=e.useFavoriteGIFsMobile;var r=null;e.useFavoriteGIFsMobile=function(...t){var o=Ni.apply(this,t);if(o?.favorites&&Array.isArray(o.favorites)&&o.favorites!==r){r=o.favorites;for(var n of o.favorites)!n||eg.has(n)||(eg.add(n),(Dl(n.url)||Dl(n.src))&&(n.src=cS(n.src||n.url)))}return o}}}var Li,Do,ca,Il,Ni,Pl,lS,eg,pS,og=_(()=>{"use strict";l();c();u();eo();Fe();He();yr();Li=null,Do=null,ca=null,Il=null,Ni=null,Pl=null,lS=[".mp4",".webm",".mov",".avi",".mkv",".flv",".wmv",".m4v",".gifv"],eg=new WeakSet;pS=Lr({manifest:{id:"bunny.favouriteanything",version:"1.0.0",type:"plugin",spec:3,main:"",display:{name:"FavouriteAnything",description:"Adds the favourite button to ALL media, not just GIFs",authors:[{name:"TheUnrealZaka"}]}},start(){if(rg())A.log("[FavouriteAnything] Patched GIFFavButton.");else{var e=0,r=()=>{rg()?(A.log("[FavouriteAnything] Patched GIFFavButton (after retry)."),ca=null):e++<50?ca=setTimeout(r,300):A.error("[FavouriteAnything] GIFFavButton not found after retries.")};ca=setTimeout(r,300)}dS(),mS()},stop(){ca&&(clearTimeout(ca),ca=null),Do&&Li&&(Do.type=Li,Li=null,Do=null),Il&&(Il(),Il=null),Pl&&Ni&&(Pl.useFavoriteGIFsMobile=Ni,Ni=null,Pl=null)}})});var ng={};k(ng,{default:()=>gS});function hS(){return Yr("dispatch",wr,e=>{try{Of||(Of=Wo("MessageStore"));var r=e[0];if(!r||r?.type!=="MESSAGE_DELETE"||!r?.id||!r?.channelId)return;if(Oi.includes(r.id)){Oi.splice(Oi.indexOf(r.id),1);return}Oi.push(r.id),e[0]={type:"MESSAGE_EDIT_FAILED_AUTOMOD",messageData:{type:1,message:{channelId:r.channelId,messageId:r.id}},errorResponseBody:{code:2e5,message:"[deleted]"}}}catch(t){A.error("NoDelete: dispatcher patch failed",t)}})}var Nf,Of,Oi,gS,ag=_(()=>{"use strict";l();c();u();eo();Fe();He();yr();Q();Nf=[],Of=null,Oi=[];gS=Lr({manifest:{id:"bunny.nodelete",version:"1.0.0",type:"plugin",spec:3,main:"",display:{name:"NoDelete",description:"Prevents messages from being deleted from your view",authors:[{name:"meqativ"}]}},start(){Nf=[hS()].filter(Boolean),A.log("NoDelete: Enabled")},stop(){Nf.forEach(e=>e?.()),Nf=[],Oi=[],Of=null,A.log("NoDelete: Disabled")}})});var lg={};k(lg,{default:()=>wS});function SS(){return Math.random()<_S}function ig(e){return e?bS.test(e)&&SS():!1}function xS(){return new Promise(e=>{if(Ff)return e(Bi);if(Ll)return e(-1);Ll=!0,dn.prepare(yS,"music",Nl,(r,t)=>{if(Ll=!1,r)return A.error("[MaxVerstappen] Failed to prepare:",r),e(-1);Ff=!0,Bi=t?.duration||3e4,e(Bi)})})}function sg(){return x(function*(){if(dn&&!ua){var e=yield xS();if(e!==-1){ua=!0;try{yield dn.play(Nl),ki=setTimeout(()=>{dn.stop(Nl),ua=!1,ki=null},Bi)}catch(r){A.error("[MaxVerstappen] Playback error:",r),ua=!1}}}})()}var vS,dn,yS,Nl,_S,bS,ua,Ff,Ll,Bi,ki,Fi,Mi,wS,cg=_(()=>{"use strict";l();c();u();be();eo();Fe();yr();({ReactNative:vS}=globalThis),{DCDSoundManager:dn}=vS?.NativeModules||{},yS="https://github.com/OTKUSteyler/GoonCord/raw/refs/heads/main/src/core/plugins/maxverstappen/Max%20Verstappen.mp3",Nl=6972,_S=.33,bS=/\bmax\s*verst[ae]pp?en\b/i,ua=!1,Ff=!1,Ll=!1,Bi=3e4,ki=null,Fi=null,Mi=null;wS=Lr({manifest:{id:"bunny.maxverstappen",version:"1.0.0",type:"plugin",spec:3,main:"",display:{name:"Max Verstappen",description:"Plays audio when Max Verstappen is mentioned (33% chance)",authors:[{name:"GoonCord Team"}]}},start(){if(!dn){A.error("[MaxVerstappen] DCDSoundManager not found");return}var e=L("dispatch","subscribe");if(!e){A.error("[MaxVerstappen] FluxDispatcher not found");return}Fi=({message:r})=>{try{if(!r?.content)return;ig(r.content)&&sg()}catch(t){A.error("[MaxVerstappen] MESSAGE_CREATE error:",t)}},Mi=({message:r})=>{try{if(!r?.content)return;ig(r.content)&&sg()}catch(t){A.error("[MaxVerstappen] MESSAGE_SEND error:",t)}},e.subscribe("MESSAGE_CREATE",Fi),e.subscribe("MESSAGE_SEND",Mi),A.log("[MaxVerstappen] Enabled")},stop(){dn&&ua&&(dn.stop(Nl),ua=!1),ki&&(clearTimeout(ki),ki=null);var e=L("dispatch","subscribe");e&&(Fi&&e.unsubscribe("MESSAGE_CREATE",Fi),Mi&&e.unsubscribe("MESSAGE_SEND",Mi)),Fi=null,Mi=null,Ff=!1,Ll=!1,Bi=3e4,A.log("[MaxVerstappen] Disabled")}})});function mn(e,r=!0){var t={loader:()=>{var o=e(),n=o&&(o.default??o);return n},preenabled:r,get default(){var o=t.loader();return Object.defineProperty(t,"default",{value:o,writable:!1,enumerable:!0}),o}};return t}function Lr(e){return e[Symbol.for("bunny.core.plugin")]=!0,e}var Mf,eo=_(()=>{"use strict";l();c();u();Mf=()=>({"bunny.quickinstall":mn(()=>(jh(),Oe(kh)),!0),"bunny.badges":mn(()=>(Vh(),Oe(Hh))),"bunny.notrack":mn(()=>(Xh(),Oe(qh))),"bunny.fixembed":mn(()=>(Qh(),Oe(Zh))),"bunny.favouriteanything":mn(()=>(og(),Oe(tg))),"bunny.nodelete":mn(()=>(ag(),Oe(ng))),"bunny.maxverstappen":mn(()=>(cg(),Oe(lg)))})});var ug,pn,Ol,ji=_(()=>{"use strict";l();c();u();ug=(function(e){return e[e.BUILT_IN=0]="BUILT_IN",e[e.BUILT_IN_TEXT=1]="BUILT_IN_TEXT",e[e.BUILT_IN_INTEGRATION=2]="BUILT_IN_INTEGRATION",e[e.BOT=3]="BOT",e[e.PLACEHOLDER=4]="PLACEHOLDER",e})({}),pn=(function(e){return e[e.SUB_COMMAND=1]="SUB_COMMAND",e[e.SUB_COMMAND_GROUP=2]="SUB_COMMAND_GROUP",e[e.STRING=3]="STRING",e[e.INTEGER=4]="INTEGER",e[e.BOOLEAN=5]="BOOLEAN",e[e.USER=6]="USER",e[e.CHANNEL=7]="CHANNEL",e[e.ROLE=8]="ROLE",e[e.MENTIONABLE=9]="MENTIONABLE",e[e.NUMBER=10]="NUMBER",e[e.ATTACHMENT=11]="ATTACHMENT",e})({}),Ol=(function(e){return e[e.CHAT=1]="CHAT",e[e.USER=2]="USER",e[e.MESSAGE=3]="MESSAGE",e})({})});var dg={};k(dg,{default:()=>CS});function fg(e){return"```js\n"+e.replaceAll("`","`"+AS)+"\n```"}var ES,TS,AS,CS,mg=_(()=>{"use strict";l();c();u();be();je();ji();ke();Q();Le();ES=U("inspect"),TS=(()=>x(function*(){})()).constructor,AS="\u200B";CS=(()=>({name:"eval",description:T.COMMAND_EVAL_DESC,shouldHide:()=>N.enableEvalCommand===!0,options:[{name:"code",type:pn.STRING,description:T.COMMAND_EVAL_OPT_CODE,required:!0},{name:"async",type:pn.BOOLEAN,description:T.COMMAND_EVAL_OPT_ASYNC}],execute(e,r){return x(function*([t,o],n){try{var a=ES.inspect(o?.value?yield TS(t.value)():eval?.(t.value)),s=a.length>2e3?a.slice(0,2e3)+"...":a;et.sendBotMessage(n.channel.id,fg(s))}catch(d){et.sendBotMessage(n.channel.id,fg(d?.stack??d))}}).apply(this,arguments)}}))});var pg={};k(pg,{default:()=>RS});var RS,hg=_(()=>{"use strict";l();c();u();je();ji();At();Q();RS=(()=>({name:"Goon",description:T.COMMAND_DEBUG_DESC,options:[{name:"ephemeral",type:pn.BOOLEAN,description:T.COMMAND_DEBUG_OPT_EPHEMERALLY}],execute([e],r){var t=gt();t.device.codename===void 0?t.device.codename="":t.device.codename="("+t.device.codename+")";var o=["**\u{1F4A6}GoonCord\u{1F4A6} Debug Info**",`> GoonCord: ${t.bunny.version} (${t.bunny.loader.name} ${t.bunny.loader.version})`,`> Discord: ${t.discord.version} (${t.discord.build})`,`> React: ${t.react.version} (RN ${t.react.nativeVersion})`,`> Hermes: ${t.hermes.version} (bcv${t.hermes.bytecodeVersion})`,`> System: ${t.os.name} ${t.os.version} ${t.os.sdk?`(SDK ${t.os.sdk})`:""}`.trimEnd(),`> Device: ${t.device.model} ${t.device.codename}`].join(` +`);if(e?.value)et.sendBotMessage(r.channel.id,o);else{var n=(BigInt(Date.now()-14200704e5)<<22n).toString();et.sendMessage(r.channel.id,{content:o},void 0,{nonce:n})}}}))});var gg={};k(gg,{default:()=>IS});var IS,vg=_(()=>{"use strict";l();c();u();je();ji();Q();Qt();ro();IS=(()=>({name:"plugins",description:T.COMMAND_PLUGINS_DESC,options:[{name:"ephemeral",displayName:"ephemeral",type:pn.BOOLEAN,description:T.COMMAND_DEBUG_OPT_EPHEMERALLY}],execute([e],r){var t=[...Pt.keys()],o=t.map(z=>ve.get(z)).filter(Boolean),n=o.filter(z=>!!se[z.id]?.enabled).map(z=>z.display?.name??z.name??z.id).sort((z,sr)=>z.localeCompare(sr)),a=o.filter(z=>!se[z.id]?.enabled).map(z=>z.display?.name??z.name??z.id).sort((z,sr)=>z.localeCompare(sr)),s=new Map;try{var d=X&&X.plugins||{},f=Object.values(d).filter(Boolean);for(var m of f){var p=m.manifest?.id??m.id??String(m.manifest?.name??Math.random()),E=m.manifest?.name??p,I=!!m.enabled,P=s.get(p);P?(P.sources.add("vendetta"),P.enabled=P.enabled||I):s.set(p,{id:p,name:E,sources:new Set(["vendetta"]),enabled:I})}}catch{}for(var[C,F]of ve)if(F){var te=F.parentRepository!=null;if(te&&!Pt.has(C)){var Ce=F.display?.name??F.name??C,me=se[C]!=null,ee=!!se[C]?.enabled,ir=s.get(C);ir?(ir.sources.add("bunny"),ir.enabled=ir.enabled||ee):me&&s.set(C,{id:C,name:Ce,sources:new Set(["bunny"]),enabled:ee})}}var Fo=[...ve.values()].filter(z=>!!z&&z.parentRepository&&!Pt.has(z.id)).map(z=>({id:z.id,name:z.display?.name??z.name??z.id,installed:se[z.id]!=null})).filter(z=>!z.installed).sort((z,sr)=>z.name.localeCompare(sr.name)).map(z=>z.name),at=Array.from(s.values()).sort((z,sr)=>z.name.localeCompare(sr.name)),pr=at.filter(z=>z.enabled).map(z=>z.name),Vr=at.filter(z=>!z.enabled).map(z=>z.name),Ue=[];Ue.push(`**Plugins (${o.length}):**`),n.length>0&&(Ue.push(`Enabled (${n.length}):`),Ue.push("> "+n.join(", "))),a.length>0&&(Ue.push(`Disabled (${a.length}):`),Ue.push("> "+a.join(", "))),o.length===0&&Ue.push("_No core plugins registered._"),Ue.push(`**External Plugins (${at.length}):**`),pr.length>0&&(Ue.push(`Installed & Enabled (${pr.length}):`),Ue.push("> "+pr.join(", "))),Vr.length>0&&(Ue.push(`Installed & Disabled (${Vr.length}):`),Ue.push("> "+Vr.join(", "))),at.length===0&&Ue.push("_No external plugins found._");var hr=Ue.join(` +`);if(e?.value)et.sendBotMessage(r.channel.id,hr);else{var $r=(BigInt(Date.now()-14200704e5)<<22n).toString();et.sendMessage(r.channel.id,{content:hr},void 0,{nonce:$r})}}}))});var yg={};k(yg,{default:()=>PS});var PS,_g=_(()=>{"use strict";l();c();u();je();lt();PS=(()=>({name:"ReGoon",description:T.COMMAND_RELOAD_DESC,options:[],execute(){Br.reload()}}))});var Fl={};k(Fl,{patchCommands:()=>Bf,registerCommand:()=>fa});function Bf(){var e=xe("getBuiltInCommands",tn,([r],t)=>[...t,...Ui.filter(o=>(r instanceof Array?r.includes(o.type):r===o.type)&&o.__bunny?.shouldHide?.()!==!1)]);return[(mg(),Oe(dg)),(hg(),Oe(pg)),(vg(),Oe(gg)),(_g(),Oe(yg))].forEach(r=>fa(r.default())),()=>{Ui=[],e()}}function fa(e){var r;try{r=tn.getBuiltInCommands(Ol.CHAT,!0,!1)}catch{r=tn.getBuiltInCommands(Object.values(Ol),!0,!1)}r.sort((n,a)=>parseInt(a.id)-parseInt(n.id));var t=r[r.length-1];if(e.id=(parseInt(t.id,10)-1).toString(),e.__bunny={shouldHide:e.shouldHide},e.applicationId??="-1",e.type??=Ol.CHAT,e.inputType=ug.BUILT_IN,e.displayName??=e.name,e.untranslatedName??=e.name,e.displayDescription??=e.description,e.untranslatedDescription??=e.description,e.options)for(var o of e.options)o.displayName??=o.name,o.displayDescription??=o.description;return ut("execute",e,(n,a)=>{Promise.resolve(a.apply(e,n)).then(s=>{s&&typeof s=="object"&&et.sendMessage(n[1].channel.id,s)}).catch(s=>{A.error("Failed to execute command",s)})}),Ui.push(e),()=>Ui=Ui.filter(({id:n})=>n!==e.id)}var Ui,Gi=_(()=>{"use strict";l();c();u();ji();He();yr();Q();Ui=[]});var jf={};k(jf,{dispatcher:()=>Sg,injectFluxInterceptor:()=>kf,intercept:()=>NS});function kf(){var e=r=>{for(var t of da){var o=t(r);o!=null&&(o?typeof o=="object"&&(Object.assign(r,o),r[DS]=!0):r[bg]=!0)}return bg in r};return(Sg._interceptors??=[]).unshift(e),()=>{var r=hn.get(e);r!==void 0&&(da.splice(r,1),hn.delete(e),da.forEach((t,o)=>hn.set(t,o)))}}function NS(e){var r=LS++;return hn.set(e,r),da.push(e),()=>{var t=hn.get(e);t!==void 0&&(da.splice(t,1),hn.delete(e),da.forEach((o,n)=>hn.set(o,n)))}}var bg,DS,Sg,da,hn,LS,Uf=_(()=>{"use strict";l();c();u();Q();bg=Symbol.for("bunny.flux.blocked"),DS=Symbol.for("bunny.flux.modified"),Sg=wr,da=[],hn=new Map,LS=0});var Gf={};k(Gf,{fs:()=>Ta});var xg=_(()=>{"use strict";l();c();u();Ft()});var Hf={};k(Hf,{jsx:()=>Pf});var wg=_(()=>{"use strict";l();c();u();Al()});var Vf={};k(Vf,{assets:()=>il,commands:()=>Fl,debug:()=>fl,flux:()=>jf,native:()=>Gf,patcher:()=>zo,react:()=>Hf,settings:()=>Qs,storage:()=>kc});var $f=_(()=>{"use strict";l();c();u();Te();Gi();At();Uf();xg();He();wg();ke();ft()});function ma(e,r){var t=(...n)=>{var a=r(...n);return e.push(a),a};for(var o in r)typeof r[o]=="function"&&(t[o]=ma(e,r[o]));return t}function Eg(e){var r=new Array,t={...globalThis.bunny,api:{...globalThis.bunny.api,patcher:{before:ma(r,zo.before),after:ma(r,zo.after),instead:ma(r,zo.instead)},commands:{...globalThis.bunny.api.commands,registerCommand:ma(r,fa)},flux:{...globalThis.bunny.api.flux,intercept:ma(r,globalThis.bunny.api.flux.intercept)}},plugin:{createStorage:()=>yo(`plugins/storage/${e}.json`),manifest:ve.get(e),logger:A}};return{object:t,disposers:r}}var Tg=_(()=>{"use strict";l();c();u();$f();Gi();ft();yr();ro()});var ga={};k(ga,{apiObjects:()=>Yf,corePluginInstances:()=>Pt,deleteRepository:()=>FS,disablePlugin:()=>Ml,enablePlugin:()=>Xf,getBisectBatches:()=>BS,getPluginSettingsComponent:()=>Kf,initPlugins:()=>jS,installPlugin:()=>MS,isCorePlugin:()=>Rg,isGreaterVersion:()=>Wf,isPluginEnabled:()=>pa,isPluginInstalled:()=>gn,pluginInstances:()=>nt,pluginRepositories:()=>Gr,pluginSettings:()=>se,refreshPlugin:()=>qf,registerCorePlugins:()=>Ag,registerInstalledPlugins:()=>Ig,registeredPlugins:()=>ve,startPlugin:()=>ha,stopPlugin:()=>kl,uninstallPlugin:()=>Bl,updateAllRepository:()=>Jf,updateAndWritePlugin:()=>Hi,updatePlugins:()=>kS,updateRepository:()=>Vi});function Ag(){try{var e=Mf();for(var r in e)try{var{default:t,preenabled:o}=e[r];ve.set(r,t.manifest),Pt.set(r,t);try{se[r]==null&&(se[r]={enabled:o??!0})}catch(n){console.error("Failed to set default pluginSettings for core plugin",r,n)}}catch(n){console.error("Failed to register core plugin",r,n)}}catch(n){console.error("registerCorePlugins: unexpected error",n)}}function ar(e,r,t){if(!e)throw new Error(`[${r}] Attempted to ${t}`)}function Wf(e,r){if(Hn.gt(e,r))return!0;var t=Hn.coerce(e);return t==null?!1:Hn.prerelease(e)?.includes("dev")&&Hn.eq(t,r)}function $i(e){return"parentRepository"in e}function Rg(e){return Pt.has(e)}function Kf(e){var r=nt.get(e);return r&&r.SettingsComponent?r.SettingsComponent:null}function gn(e){return se[e]!=null}function pa(e){return!!se[e]?.enabled}function Hi(e,r,t){return x(function*(){var o=[`builds/${r}/manifest.json`,`${r}/manifest.json`],n,a=null;for(var s of o){var d=new URL(s,e).toString();try{n=yield zf(e,s);break}catch(C){a=C}}if(!n)throw a??new Error(`Failed to fetch manifest for ${r}`);if(n.parentRepository=e,t){n.jsPath=`plugins/scripts/${r}.js`;var f=[`builds/${r}/index.js`,`${r}/index.js`],m,p=null;for(var E of f){var I=new URL(E,e).toString();try{m=yield OS(e,E);break}catch(C){p=C}}if(!m)throw p??new Error(`Failed to fetch script for ${r}`);try{yield ct(n.jsPath,m)}catch(C){throw C}}try{yield Mc(`plugins/manifests/${r}.json`,n)}catch(C){throw C}if(ve.has(r)){var P=ve.get(r);return Object.assign(P,n)}return n})()}function qf(e,r){return x(function*(){var t=ve.get(e);ar(t,e,"refresh a non-registered plugin"),ar(nt.get(e),e,"refresh a non-started plugin"),kl(e),$i(t)&&(t=yield Hi(r??t.parentRepository,e,!0)),ve.delete(e),ve.set(e,t),yield ha(e)})()}function Vi(e){return x(function*(){var r,t=Gr[e],o=!1;try{r=yield zf(e,"repo.json")}catch(I){try{var n=yield zf(e,"manifest.json"),a=n?.id??n?.name??(()=>{try{var P=new URL(e),C=P.pathname.replace(/^\/|\/$/g,"");return C||P.hostname}catch{return"local-plugin"}})();r={[a]:n,$meta:{source:e}},Gr[e]=r,t=Gr[e],o=!0}catch{throw I}}if(t)for(var d in t)r[d]||delete t[d];else{for(var s in r)if(Pt.has(s))throw new Error(`Plugins can't have the same ID as any of Bunny core plugin '${s}'`);o=!0,Gr[e]=r}var f=Object.keys(r).filter(I=>!I.startsWith("$"));yield Promise.all(f.map(I=>x(function*(){if(!t||!t[I]||r[I].alwaysFetch||Wf(r[I].version,t[I].version))o=!0,Gr[e][I]=r[I],yield Hi(e,I,!!(t&&se[I]));else{var P=yield Ga(`plugins/manifests/${I}.json`);P||(yield Hi(e,I,!!(t&&se[I])))}})()));for(var m of f){var p=Ms(`plugins/manifests/${m}.json`);if(p!==void 0){var E=ve.get(m);E&&!Wf(p.version,E.version)||ve.set(m,p)}}return o})()}function FS(e){return x(function*(){ar(e!==rn,e,"delete the official repository"),ar(Gr[e],e,"delete a non-registered repository");var r=[];for(var[t,o]of ve)!$i(o)||o.parentRepository!==e||(gn(t)&&r.push(Bl(t)),r.push(Mn(`plugins/manifests/${t}.json`)),ve.delete(t));delete Gr[e],yield Promise.all(r),Jf()})()}function Xf(e,r){return x(function*(){ar(gn(e),e,"enable a non-installed plugin"),r&&(yield ha(e)),se[e].enabled=!0})()}function Ml(e){ar(gn(e),e,"disable a non-installed plugin"),nt.has(e)&&kl(e),se[e].enabled=!1}function MS(e,r){return x(function*(){var t=ve.get(e);ar(t,e,"install an non-registered plugin"),ar(!gn(e),e,"install an already installed plugin"),ar($i(t),e,"install a core plugin"),yield Hi(t.parentRepository,e,!0),se[e]={enabled:!0},r&&ha(e)})()}function Bl(e){return x(function*(){var r=ve.get(e);ar(r,e,"uninstall an unregistered plugin"),ar(gn(e),e,"uninstall a non-installed plugin"),ar($i(r),e,"uninstall a core plugin"),nt.has(e)&&kl(e),delete se[e],yield Mn(`plugins/storage/${e}.json`),yield Ho(`plugins/scripts/${e}.js`)})()}function ha(e){return x(function*(r,{throwIfDisabled:t=!1,disableWhenThrown:o=!0}={}){var n=ve.get(r);ar(n,r,"start a non-registered plugin"),ar(gn(r),r,"start a non-installed plugin"),ar(!t||se[r]?.enabled,r,"start a disabled plugin"),ar(!nt.has(r),r,"start an already started plugin"),yield Ga(`plugins/storage/${r}.json`);var a;if($i(n)){try{var s=yield Vo(n.jsPath);try{globalThis.__SHIGGY_CURRENT_PLUGIN=r}catch{}var d=globalEvalWithSourceUrl(`(bunny,definePlugin)=>{${s};return plugin?.default ?? plugin;}`,`bunny-plugin/${r}-${n.version}`)}catch(I){var f=new Error("An error occured while parsing plugin's code, possibly a syntax error?",{cause:I});throw f.pluginId=r,f}finally{try{globalThis.__SHIGGY_CURRENT_PLUGIN=null}catch{}}try{try{globalThis.__SHIGGY_CURRENT_PLUGIN=r}catch{}var m=Eg(r);try{a=d(m.object,I=>Object.assign(I,{manifest:n}))}catch(I){var p=new Error("An error occured while instantiating plugin's code");throw p.cause=I,p.pluginId=r,p}if(!a){var E=new Error(`Plugin '${r}' does not export a valid plugin instance`);throw E.pluginId=r,E}Yf.set(r,m),nt.set(r,a)}catch(I){throw I.pluginId||(I.pluginId=r),I}finally{try{globalThis.__SHIGGY_CURRENT_PLUGIN=null}catch{}}}else a=Pt.get(r),ar(a,r,"start a non-existent core plugin"),nt.set(r,a);try{a.start?.(),se[r].enabled=!0}catch(I){throw o&&Ml(r),new Error("An error occured while starting the plugin",{cause:I})}}).apply(this,arguments)}function kl(e){var r=nt.get(e);ar(r,e,"stop a non-started plugin"),r.stop?.();var t=Yf.get(e);t?.disposers.forEach(o=>o()),nt.delete(e)}function BS(e=50){var r=[];for(var[t,o]of ve)try{var n=o.parentRepository!=null,a=!!se[t]?.enabled;if(!n||!a)continue;r.push(t)}catch{}var s=r.slice(0,e);if(s.length<=1)return s.length===1?[[s[0]]]:[];for(var d=[],f=s.slice();f.length>1;){var m=Math.ceil(f.length/2),p=f.slice(0,m);if(d.push(p),f=f.slice(m),f.length===1){d.push([f[0]]);break}}return d}function Jf(){return x(function*(){try{yield Vi(rn)}catch(o){console.error("Failed to update official plugins repository",o)}var e=!!(Xn.fetchPluginsOnStart??!0),r=Xn.repoAutoFetchOverrides??{},t=Object.keys(Gr);yield h(t.map(o=>x(function*(){if(o!==rn){var n=r[o];if(!(!e&&n!==!0))try{yield Vi(o)}catch(a){console.error(`Failed to update repository ${o}`,a)}}})()))})()}function kS(){return x(function*(){yield en(Gr,se);var e=Mf();for(var r in e){var{default:t,preenabled:o}=e[r];se[r]??={enabled:o??!0},ve.set(r,t.manifest),Pt.set(r,t)}try{yield Vi(rn)}catch(f){console.error("Failed to update official plugins repository",f)}var n=!!(Xn.fetchPluginsOnStart??!0),a=Xn.repoAutoFetchOverrides??{};if(n)yield Jf();else{var s=Object.keys(Gr).filter(f=>f!==rn&&a[f]===!0);yield h(s.map(f=>x(function*(){try{yield Vi(f)}catch(m){console.error(`Failed to update repository ${f}`,m)}})()))}var d=[...ve.keys()].filter(f=>pa(f)&&!nt.has(f));yield h(d.map(f=>x(function*(){try{yield ha(f).catch(m=>{console.error(`Failed to start plugin ${f}:`,m)})}catch(m){console.error(`Unexpected error while starting plugin ${f}:`,m)}})()))})()}function Ig(){return x(function*(){yield en(Gr,se);var e=Object.keys(se??{});if(e.length!==0)var r=yield h(e.map(t=>x(function*(){if(!(ve.has(t)||Rg(t))){var o=yield Ga(`plugins/manifests/${t}.json`);if(o){var n=Ms(`plugins/manifests/${t}.json`);n&&ve.set(t,n)}}})()))})()}function jS(){return x(function*(){try{Ag()}catch{}yield en(Gr,se),yield Ig();var e=[...ve.keys()].filter(r=>pa(r));e.length!==0&&(yield h(e.map(r=>x(function*(){try{if(!pa(r)||nt.has(r))return;yield ha(r).catch(t=>{console.error(`Failed to start plugin ${r}:`,t)})}catch(t){console.error(`Unexpected error while starting plugin ${r}:`,t)}})())))})()}var Pt,ve,nt,Yf,Gr,se,Cg,OS,zf,ro=_(()=>{"use strict";l();c();u();be();eo();Ft();ft();Jr();Bn();Q();ke();Tg();Pt=new Map,ve=new Map,nt=new Map,Yf=new Map;Gr=yo("plugins/repositories.json"),se=yo("plugins/settings.json"),Cg=(e,r)=>{try{var t=new URL(r,e);return t.searchParams.set("_",String(Date.now())),ze(t,{cache:"no-store"})}catch{return ze(new URL(r,e),{cache:"no-store"})}},OS=(e,r)=>Cg(e,r).then(t=>t.text()),zf=(e,r)=>Cg(e,r).then(t=>t.json())});var Zf,Pg=_(()=>{"use strict";l();c();u();Le();Zf=kt("UserStore")});function Qf({plugin:e}){var r=Su.useStateFromStoresArray([Zf],()=>(e.authors?.forEach(n=>n.id&&GS(n.id)),e.authors?.map(n=>Zf.getUser(n.id)))),{authors:t}=e,o=i(D,{variant:"text-md/medium",style:{flexWrap:"wrap"},children:(t??[]).map((n,a)=>b(Dg.default.Fragment,{children:[i(D,{variant:"text-md/medium",onPress:n.id?()=>US({userId:n.id}):void 0,children:n.name}),a<(t?.length??0)-1?", ":""]},n.id??n.name))});return b(va.View,{style:{gap:4},children:[i(va.View,{children:i(D,{variant:"heading-xl/semibold",children:e.name})}),i(va.View,{style:{flexDirection:"row",flexShrink:1},children:t?.length&&b(va.View,{style:{flexDirection:"row",gap:8,alignItems:"center",paddingVertical:4,paddingHorizontal:8,backgroundColor:"#00000016",borderRadius:32},children:[r.length&&i(lu,{size:"xxsmall",names:e.authors?.map(n=>n.name),totalCount:e.authors?.length,children:r.map(n=>i(cu,{size:"xxsmall",user:n}))}),i(va.View,{style:{flexDirection:"row",alignItems:"center",flexWrap:"wrap"},children:o})]})})]})}var Dg,va,US,GS,Lg=_(()=>{"use strict";l();c();u();ne();Dg=H(dr());Ne();Fe();Q();ce();Pg();va=H(re()),US=Sr("showUserProfileActionSheet"),{getUser:GS}=K(()=>L("getUser","fetchProfile"))});var ed={};k(ed,{default:()=>Og});function zi(e){var{onPress:r}=e;return e.onPress&&=()=>{Xt("PluginInfoActionSheet"),r?.()},i(we,{...e})}function Og({plugin:e,navigation:r}){e.usePluginState();var[t,o]=(0,Ng.useState)(!1),n=e.id.includes("/"),a=e.id.startsWith("bunny.")||e.id.startsWith("vendetta."),s=()=>{var p=e.id;if(n)p=e.id;else try{var E=e,I=E._manifest?.parentRepository||E.manifest?.parentRepository;p=I?`${I}/builds/${e.id}`:e.id}catch{p=e.id}Be.setString(p),typeof q?.showCopyToClipboard=="function"?q.showCopyToClipboard():q("Copied to clipboard")},d=()=>x(function*(){o(!0);try{if(n){var p=X.plugins[e.id];p.enabled&&X.stopPlugin(e.id,!1),yield X.fetchPlugin(e.id),p.enabled&&(yield X.startPlugin(e.id)),q("Plugin refreshed successfully")}else qf(e.id),q("Plugin refreshed successfully")}catch(E){console.error("Failed to refresh plugin:",E),q("Failed to refresh plugin")}finally{o(!1)}})(),f=()=>{yt({title:"Clear Data",content:"Are you sure you want to clear all data for this plugin? This action cannot be undone.",confirmText:"Clear",confirmColor:"red",cancelText:"Cancel",onConfirm:()=>x(function*(){Xt("PluginInfoActionSheet");try{if(n){var p=X.plugins[e.id];p.enabled&&X.stopPlugin(e.id,!1),yield Ss(e.id),p.enabled&&(yield X.startPlugin(e.id))}else yield Mn(`plugins/storage/${e.id}.json`);q("Plugin data cleared successfully")}catch(E){console.error("Failed to clear plugin data:",E),q("Failed to clear plugin data")}})()})},m=()=>{if(a){q("Core plugins cannot be uninstalled");return}yt({title:"Uninstall Plugin",content:"Are you sure you want to uninstall this plugin? This action cannot be undone.",confirmText:"Uninstall",confirmColor:"red",cancelText:"Cancel",onConfirm:()=>x(function*(){Xt("PluginInfoActionSheet");try{n?yield X.removePlugin(e.id):yield Bl(e.id),q("Plugin uninstalled successfully")}catch(p){console.error("Failed to uninstall plugin:",p),q(`Failed to uninstall plugin: ${p instanceof Error?p.message:String(p)}`)}})()})};return i(rr,{children:b(Wi.ScrollView,{contentContainerStyle:{gap:12,marginBottom:12},children:[i(Wi.View,{style:{flexDirection:"row",alignItems:"center",gap:8,paddingVertical:24,justifyContent:"space-between",width:"100%"},children:i(Qf,{plugin:e})}),b(Wi.View,{style:{flexDirection:"row",justifyContent:"center",alignItems:"center",flexWrap:"wrap",gap:12,paddingHorizontal:4},children:[i(zi,{label:"Configure",variant:"secondary",disabled:!e.getPluginSettingsComponent(),icon:S("SettingsIcon"),onPress:()=>{r.push("SHIGGYCORD_CUSTOM_PAGE",{title:e.name,render:e.getPluginSettingsComponent()})}}),i(zi,{label:"Refetch",variant:"secondary",icon:S("RetryIcon"),onPress:d,disabled:t}),i(zi,{label:"Copy URL",variant:"secondary",icon:S("LinkIcon"),onPress:s}),i(zi,{label:"Clear Data",variant:"secondary",icon:S("FileIcon"),onPress:f}),!a&&i(zi,{label:"Uninstall",variant:"secondary",icon:S("TrashIcon"),onPress:m})]}),b(de,{children:[i(D,{variant:"text-md/semibold",style:{marginBottom:4,color:"text-strong"},children:"Description"}),i(D,{variant:"text-md/medium",children:e.description})]})]})})}var Ng,Wi,rd=_(()=>{"use strict";l();c();u();be();ne();ro();Te();ft();vt();ce();Q();Ng=H(dr()),Wi=H(re());ht();la();Qt();$e();Lg()});function td(e){return{id:e.id,name:e.display.name,description:e.display.description,authors:e.display.authors,getBadges(){return[]},isEnabled:()=>pa(e.id),isInstalled:()=>e.id in se,usePluginState(){Ht([se])},toggle(r){try{r?Xf(e.id,!0):Ml(e.id)}catch(t){console.error(t)}},resolveSheetComponent(){return Promise.resolve().then(()=>(rd(),ed))},getPluginSettingsComponent(){return Kf(e.id)}}}var Fg=_(()=>{"use strict";l();c();u();ro();ft()});function od(e){return{id:e.id,name:e.manifest.name,description:e.manifest.description,authors:e.manifest.authors,icon:e.manifest.vendetta?.icon,getBadges(){return[]},isEnabled:()=>e.enabled,isInstalled:()=>!!(e&&X.plugins[e.id]),usePluginState(){var r=jt({}).proxy;ie(X.plugins[e.id]??r)},toggle(r){r?X.startPlugin(e.id):X.stopPlugin(e.id)},resolveSheetComponent(){return Promise.resolve().then(()=>(rd(),ed))},getPluginSettingsComponent(){return X.getSettings(e.id)}}}var Mg=_(()=>{"use strict";l();c();u();Qt();$e()});var Ug={};k(Ug,{default:()=>jg});function Yi(e){return e.endsWith("/")?e:e+"/"}function KS({addon:e,installing:r,setInstalling:t,setRefreshTick:o}){var n=Yi(e.installUrl),a=X.plugins[n],s=!!a,d=r.has(n),f=n.toLowerCase().includes("quickinstall"),[,m]=HS(me=>me+1,0),[p,E]=W.useState(0),[I,P]=W.useState(1),C=()=>{te()},F=()=>x(function*(){if(!d){if(e.status==="broken"||e.status==="warning"){var me=e.status==="broken";Bg("bunny-plugin-status-warning",i(kg,{title:me?"Plugin is Broken":"Plugin Warning",content:me?"This plugin is marked as broken and may not work properly or could cause issues. Do you still want to install it?":"This plugin has warnings and might have issues. Do you want to continue with the installation?",extraContent:e.warningMessage?i(de,{children:i(D,{variant:"text-md/normal",children:e.warningMessage})}):null,actions:b(VS,{children:[i(jl,{text:"Install Anyway",variant:me?"destructive":"primary",onPress:C}),i(jl,{text:"Cancel",variant:"secondary"})]})}));return}C()}})(),te=()=>x(function*(){t(ee=>new Set([...ee,n]));var me=setInterval(()=>{E(ee=>(ee+15)%360),P(ee=>.8+.2*Math.sin(Date.now()/200)),m()},100);try{yield X.installPlugin(e.installUrl),o(ee=>ee+1),nr("PluginInstalledSheet",()=>b(rr,{children:[i(Qr,{title:"Plugin Installed"}),b(mr.View,{style:{padding:16,alignItems:"center",gap:12},children:[i(mr.View,{style:{backgroundColor:"rgba(67, 181, 129, 0.1)",borderRadius:50,padding:16},children:i(mr.Image,{source:S("CheckmarkCircle"),style:{width:32,height:32,tintColor:"#43b581"}})}),b(D,{variant:"heading-md/bold",children:[e.name," installed successfully!"]}),i(D,{variant:"text-md/medium",color:"text-muted",style:{textAlign:"center"},children:"The plugin has been added to your plugins list."}),i(Z,{size:"lg",text:"Close",variant:"primary",style:{width:"100%"},onPress:()=>$S()})]})]}))}catch(ee){Bg("bunny-plugin-install-failed",i(kg,{title:"Installation Failed",content:"Failed to install plugin",extraContent:b(oe,{spacing:16,style:{width:"100%"},children:[i(mr.View,{style:{alignItems:"center",marginTop:8},children:i(mr.View,{style:{backgroundColor:"rgba(240, 71, 71, 0.1)",borderRadius:50,padding:16,marginBottom:12},children:i(mr.Image,{source:S("ErrorCircle"),style:{width:32,height:32,tintColor:"#f04747"}})})}),i(de,{style:{backgroundColor:"rgba(0,0,0,0.05)",padding:12,borderRadius:8},children:i(D,{variant:"text-md/semibold",color:"text-danger",children:ee instanceof Error?ee.message:String(ee)})})]}),actions:b(mr.View,{style:{flexDirection:"row",justifyContent:"space-between",gap:8},children:[i(jl,{text:"Cancel",variant:"secondary",style:{flex:1}}),i(jl,{text:"Try Again",icon:S("RetryIcon"),variant:"primary",style:{flex:1},onPress:()=>{WS("bunny-plugin-install-failed"),setTimeout(te,500)}})]})}))}finally{clearInterval(me),E(0),P(1),t(ee=>{var ir=new Set(ee);return ir.delete(n),ir})}})(),Ce=()=>{X.removePlugin(n),o(me=>me+1)};return s?i(Z,{size:"sm",text:"Uninstall",variant:"destructive",icon:S("TrashIcon"),onPress:Ce,disabled:f,style:{shadowColor:"#000",shadowOpacity:.1,shadowRadius:2,elevation:1}}):i(mr.View,{style:{opacity:I},children:i(Z,{size:"sm",text:d?"Installing...":"Install",variant:"primary",disabled:d,loading:d,style:{shadowColor:"#000",shadowOpacity:.1,shadowRadius:2,elevation:1},icon:d?i(mr.View,{style:{transform:[{rotate:`${p}deg`}]},children:i(mr.Image,{source:S("RetryIcon"),style:{width:16,height:16}})}):S("DownloadIcon"),onPress:F})})}function qS({addon:e,installing:r,setInstalling:t,setRefreshTick:o}){return b(mr.View,{style:{flexDirection:"row",alignItems:"center",gap:8},children:[i(we,{size:"sm",variant:"secondary",icon:S("MoreHorizontalIcon"),onPress:()=>{zS({key:"AddonShareSheet",header:{title:"Share Plugin"},options:[{label:"Copy Install URL",onPress:()=>{Be.setString(e.installUrl)}},{label:"Copy Source URL",onPress:()=>{e.sourceUrl&&Be.setString(e.sourceUrl)}}]})}}),i(KS,{addon:e,installing:r,setInstalling:t,setRefreshTick:o})]})}function XS({addon:e,installing:r,setInstalling:t,setRefreshTick:o}){var{name:n,description:a,authors:s,status:d,warningMessage:f}=e,m="text-normal";return d==="working"&&(m="#4ADE80"),d==="broken"&&(m="#EF4444"),d==="warning"&&(m="#F59E0B"),i(de,{children:b(oe,{spacing:16,children:[b(mr.View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[b(mr.View,{style:{flexShrink:1},children:[i(D,{numberOfLines:1,variant:"heading-lg/semibold",children:n}),b(D,{variant:"text-md/semibold",color:"text-muted",children:["by ",s?.join(", ")||"Unknown"]}),b(D,{variant:"text-md/semibold",style:{color:m},children:["Status: ",d]})]}),i(mr.View,{children:i(qS,{addon:e,installing:r,setInstalling:t,setRefreshTick:o})})]}),i(D,{variant:"text-md/medium",children:a}),f&&b(D,{variant:"text-sm/medium",color:"text-muted",children:["Warning: ",f]})]})})}function JS(e){var r=e.useItems();return i(Zt,{CardComponent:Af,title:T.PLUGINS,searchKeywords:["name","description",t=>t.authors?.map(o=>typeof o=="string"?o:o.name).join()||""],sortOptions:{"Enabled First":(t,o)=>Number(o.isEnabled())-Number(t.isEnabled()),"Disabled First":(t,o)=>Number(t.isEnabled())-Number(o.isEnabled()),"Date (Newest)":(t,o)=>{var n=Object.keys(X.plugins||{}),a=Object.keys(se||{}),s=d=>{var f=n.indexOf(d),m=a.indexOf(d);return Math.max(f,m)};return s(o.id)-s(t.id)},"Date (Oldest)":(t,o)=>{var n=Object.keys(X.plugins||{}),a=Object.keys(se||{}),s=d=>{var f=n.indexOf(d),m=a.indexOf(d);return Math.max(f,m)};return s(t.id)-s(o.id)},"Name (A-Z)":(t,o)=>t.name.localeCompare(o.name),"Name (Z-A)":(t,o)=>o.name.localeCompare(t.name)},safeModeHint:{message:T.SAFE_MODE_NOTICE_PLUGINS},items:r,...e})}function ZS(e){var r=new Map;(e.plugins||[]).forEach((s,d)=>r.set(Yi(s.installUrl),d));var t=s=>{for(var[d,f]of ve)if(f){var m=f.display?.name??d;if(m===s.name)return d}return null},o=s=>{var d=Yi(s.installUrl),f=X.plugins[d];if(f)return!!(f.enabled??!0);var m=t(s);return m?!!se[m]?.enabled:!1},n=s=>{var d=Yi(s.installUrl);if(X.plugins[d])return!0;var f=t(s);return f?se[f]!=null:!1},a=s=>r.get(Yi(s.installUrl))??0;return i(Zt,{CardComponent:({item:s})=>i(XS,{addon:s,installing:e.installing,setInstalling:e.setInstalling,setRefreshTick:e.setRefreshTick}),title:T.PLUGINS,searchKeywords:["name","description",s=>(s.authors||[]).join(", ")],sortOptions:{"Date (Newest)":(s,d)=>a(d)-a(s),"Date (Oldest)":(s,d)=>a(s)-a(d),"Broken First":(s,d)=>{var f=m=>m.status==="broken"?3:m.status==="warning"?2:m.status==="working"?1:0;return f(d)-f(s)},"Warning First":(s,d)=>{var f=m=>m.status==="warning"?3:m.status==="broken"?2:m.status==="working"?1:0;return f(d)-f(s)},"Working First":(s,d)=>{var f=m=>m.status==="working"?3:m.status==="warning"?2:m.status==="broken"?1:0;return f(d)-f(s)},"Name (A-Z)":(s,d)=>s.name.localeCompare(d.name),"Name (Z-A)":(s,d)=>d.name.localeCompare(s.name)},items:e.plugins})}function jg(){ie(N);var e=Ee.useNavigation(),[r,t]=W.useState("installed"),[o,n]=W.useState([]),[a,s]=W.useState(!1),[d,f]=W.useState(null),[m,p]=W.useState(new Set),[E,I]=W.useState(0);W.useEffect(()=>{e.setOptions({headerRight:()=>i(Z,{size:"sm",variant:"secondary",text:r==="installed"?"Browse":"Installed",icon:S(r==="installed"?"LinkIcon":"DownloadIcon"),onPress:()=>t(r==="installed"?"browse":"installed")})})},[e,r]);var P=W.useCallback(()=>x(function*(){s(!0),f(null);try{var C=yield ze(YS);if(!C.ok)throw new Error(`HTTP ${C.status}: ${C.statusText}`);var F=yield C.json(),te=[];Array.isArray(F)?te=F:F.OFFICIAL_PLUGINS&&(te=F.OFFICIAL_PLUGINS),n(te)}catch(Ce){f(Ce instanceof Error?Ce.message:String(Ce)),n([])}finally{s(!1)}})(),[]);return W.useEffect(()=>{r==="browse"&&P()},[r,P,E]),r==="installed"?i(JS,{useItems:()=>{ie(X.plugins),Ht([se]);var C=Object.keys(X.plugins||{}),F=C.slice().reverse().map(ee=>od(X.plugins[ee])),te=Object.keys(se||{}).filter(ee=>ve.has(ee)).slice().reverse(),Ce=te.map(ee=>ve.get(ee)).map(td),me=[...F,...Ce];return me},ListHeaderComponent:()=>null,installAction:{label:"Install a plugin",fetchFn:C=>x(function*(){return yield X.installPlugin(C)})()}}):d?i(mr.View,{style:{flex:1,paddingHorizontal:8,justifyContent:"center",alignItems:"center"},children:b(de,{style:{gap:8},children:[i(D,{style:{textAlign:"center"},variant:"heading-lg/bold",children:"An error occurred while fetching the repository"}),i(D,{style:{textAlign:"center"},variant:"text-sm/medium",color:"text-muted",children:d}),i(Z,{size:"lg",text:"Refetch",onPress:P,icon:S("RetryIcon")})]})}):i(ZS,{plugins:o,installing:m,setInstalling:p,setRefreshTick:I})}var mr,HS,Bg,kg,VS,jl,$S,zS,WS,YS,Gg=_(()=>{"use strict";l();c();u();be();ne();Q();mr=H(re());ce();je();wl();xh();Qt();$e();ro();Te();ke();ft();Ne();Fe();js();Q();ce();vt();Ne();Fg();Mg();({useReducer:HS}=W),{openAlert:Bg}=K(()=>L("openAlert","dismissAlert")),{AlertModal:kg,AlertActions:VS,AlertActionButton:jl}=K(()=>L("AlertModal","AlertActions")),{hideActionSheet:$S}=K(()=>L("openLazy","hideActionSheet")),{showSimpleActionSheet:zS}=K(()=>L("showSimpleActionSheet")),WS=Ve(()=>L("close","openLazy").close),YS="https://raw.githubusercontent.com/Purple-EyeZ/Plugins-List/refs/heads/main/src/plugins-data.json"});function nd(e){var r=ex();return i(de,{children:b(oe,{spacing:16,children:[b(vn.View,{style:{flexDirection:"row",alignItems:"center"},children:[b(vn.View,{style:r.headerLeading,children:[i(D,{numberOfLines:1,ellipsizeMode:"tail",style:r.headerLabel,children:e.headerLabel}),e.headerSublabel&&i(D,{numberOfLines:1,ellipsizeMode:"tail",style:r.headerSubtitle,children:e.headerSublabel})]}),b(vn.View,{style:[r.headerTrailing,{marginLeft:"auto"}],children:[b(vn.View,{style:r.actions,children:[e.overflowActions&&i(we,{onPress:()=>QS({key:"CardOverflow",header:{title:e.overflowTitle,icon:e.headerIcon&&i(oi.Icon,{style:{marginRight:8},source:S(e.headerIcon)})},options:e.overflowActions?.map(t=>({...t,icon:S(t.icon)}))}),size:"sm",variant:"secondary",icon:S("CircleInformationIcon-primary")}),e.actions?.map(({icon:t,onPress:o,disabled:n})=>i(we,{onPress:o,disabled:n,size:"sm",variant:"secondary",icon:S(t)}))]}),e.toggleType&&(e.toggleType==="switch"?i(au,{value:e.toggleValue(),onValueChange:e.onToggleChange}):i(vn.TouchableOpacity,{onPress:()=>{e.onToggleChange?.(!e.toggleValue())},children:i(iu,{selected:e.toggleValue()})}))]})]}),e.descriptionLabel&&i(D,{variant:"text-md/medium",children:e.descriptionLabel})]})})}var vn,kj,QS,ex,Hg=_(()=>{"use strict";l();c();u();ne();Te();Ne();ce();Le();Ao();Rt();vn=H(re()),{hideActionSheet:kj}=K(()=>L("openLazy","hideActionSheet")),{showSimpleActionSheet:QS}=K(()=>L("showSimpleActionSheet")),ex=jr({card:{backgroundColor:or?.CARD_SECONDARY_BG,borderRadius:12,overflow:"hidden"},header:{padding:0},headerLeading:{flex:1,flexDirection:"column",justifyContent:"center",scale:1.2},headerTrailing:{display:"flex",flexDirection:"row",gap:15,alignItems:"center"},headerLabel:{...Ct["heading-lg/semibold"]},headerLabelCompact:{...Ct["text-md/semibold"]},headerSubtitle:{...Ct["text-sm/semibold"],color:or.TEXT_MUTED},descriptionLabel:{...Ct["text-md/semibold"],color:"text-strong"},actions:{flexDirection:"row-reverse",alignItems:"center",gap:5},iconStyle:{tintColor:or.LOGO_PRIMARY,opacity:.2,height:64,width:64,left:void 0,right:"30%",top:"-10%"}})});var $g={};k($g,{default:()=>Vg});function ad(e){var{onPress:r}=e;return e.onPress&&=()=>{Xt("ThemeInfoActionSheet"),r?.()},i(we,{...e,label:e.label})}function rx({theme:e}){var{authors:r}=e.data;return b(Dt.View,{style:{gap:4},children:[i(Dt.View,{children:i(D,{variant:"heading-xl/semibold",children:e.data.name})}),i(Dt.View,{style:{flexDirection:"row",flexShrink:1},children:r&&r.length>0&&i(Dt.TouchableOpacity,{style:{flexDirection:"row",gap:8,alignItems:"center",paddingVertical:4,paddingHorizontal:8,backgroundColor:"#00000016",borderRadius:32},disabled:!r.some(t=>t.id),children:b(D,{variant:"text-md/medium",children:["by ",r.map(t=>t.name).join(", ")]})})})]})}function Vg({theme:e,navigation:r}){var[t,o]=(0,Ki.useState)({...e}),[n,a]=(0,Ki.useState)(!1);(0,Ki.useEffect)(()=>{var p=setInterval(()=>{o({...e})},500);return()=>clearInterval(p)},[e]);var s=()=>{Be.setString(t.id),typeof q?.showCopyToClipboard=="function"?q.showCopyToClipboard():q("Copied to clipboard")},d=()=>x(function*(){a(!0);try{yield on(t.id,t.selected),q("Theme refreshed successfully")}catch(p){console.error("Failed to refresh theme:",p),q("Failed to refresh theme")}finally{a(!1)}})(),f=()=>{yt({title:T.HOLD_UP,content:To("ARE_YOU_SURE_TO_DELETE_THEME",{name:t.data.name}),confirmText:T.DELETE,cancelText:T.CANCEL,confirmColor:"red",onConfirm:()=>x(function*(){Xt("ThemeInfoActionSheet");try{var p=yield Yt(t.id);p&&rt(null),q("Theme removed successfully")}catch(E){console.error("Failed to remove theme:",E),q("Failed to remove theme")}})()})},m=()=>{try{rt(t),Xt("ThemeInfoActionSheet"),q(`Applied theme: ${t.data.name}`)}catch(p){console.error("Failed to apply theme:",p),q("Failed to apply theme")}};return i(rr,{children:b(Dt.ScrollView,{contentContainerStyle:{gap:12,marginBottom:12},children:[i(Dt.View,{style:{flexDirection:"row",alignItems:"center",gap:8,paddingVertical:24,justifyContent:"space-between",width:"100%"},children:i(rx,{theme:t})}),b(Dt.View,{style:{flexDirection:"row",justifyContent:"center",alignItems:"center",flexWrap:"wrap",gap:65,paddingHorizontal:8},children:[i(ad,{label:T.REFETCH,variant:"secondary",icon:S("RetryIcon"),onPress:d,disabled:n}),i(ad,{label:T.COPY_URL,variant:"secondary",icon:S("LinkIcon"),onPress:s}),i(ad,{label:T.UNINSTALL,variant:"secondary",icon:S("TrashIcon"),onPress:f})]}),b(de,{children:[i(D,{variant:"text-md/semibold",style:{marginBottom:4,color:or.MOBILE_TEXT_HEADING_PRIMARY},children:"Description"}),i(D,{variant:"text-md/medium",children:t.data.description||"No description provided."})]})]})})}var Ki,Dt,zg=_(()=>{"use strict";l();c();u();be();ne();Te();vt();ce();Q();Ki=H(dr()),Dt=H(re());ht();la();Ir();je();Ao()});function id({item:e}){var r=Ee.useNavigation(),[t,o]=W.useState(!1);if(t)return null;var{authors:n}=e.data;return i(nd,{headerLabel:e.data.name,headerSublabel:n?`by ${n.map(a=>a.name).join(", ")}`:"",descriptionLabel:e.data.description??"No description.",toggleType:N.safeMode?.enabled?void 0:"radio",toggleValue:()=>ge[e.id].selected,onToggleChange:a=>{try{rt(a?e:null)}catch(s){console.error("Error while selecting theme:",s)}},overflowTitle:e.data.name,actions:[{icon:"CircleInformationIcon-primary",onPress:()=>{var a=Promise.resolve().then(()=>(zg(),$g));nr("ThemeInfoActionSheet",a,{theme:e,navigation:r})}}]})}var Wg=_(()=>{"use strict";l();c();u();ne();Hg();Ir();ke();vt();Q()});var Kg={};k(Kg,{default:()=>Yg});function ax({theme:e,installing:r,setInstalling:t,setRefreshTick:o}){var{name:n,description:a,authors:s,installUrl:d}=e;ie(ge);var f=d,m=r.has(f),p=ge[f],[,E]=tx(me=>me+1,0),[I,P]=W.useState(0),[C,F]=W.useState(1),te=()=>x(function*(){if(!m){t(ee=>new Set([...ee,f]));var me=setInterval(()=>{P(ee=>(ee+15)%360),F(ee=>.8+.2*Math.sin(Date.now()/200)),E()},100);try{yield Tt(f),o(ee=>ee+1),E(),nr("ThemeInstalledSheet",()=>b(rr,{children:[i(Qr,{title:"Theme Installed"}),b(De.View,{style:{padding:16,alignItems:"center",gap:12},children:[i(De.View,{style:{backgroundColor:"rgba(67, 181, 129, 0.1)",borderRadius:50,padding:16},children:i(De.Image,{source:S("CheckmarkCircle"),style:{width:32,height:32,tintColor:"#43b581"}})}),b(D,{variant:"heading-md/bold",children:[n," installed successfully!"]}),i(D,{variant:"text-md/medium",color:"text-muted",style:{textAlign:"center"},children:"The theme has been added to your themes list."}),i(De.View,{style:{flexDirection:"row",gap:8,width:"100%",justifyContent:"space-between"},children:i(Z,{size:"lg",text:"Close",variant:"primary",style:{flex:1},onPress:()=>Ul()})})]})]}))}catch(ee){console.error("Failed to install theme:",ee),nr("ThemeInstallFailedSheet",()=>b(rr,{children:[i(Qr,{title:"Installation Failed"}),b(De.View,{style:{padding:16,alignItems:"center",gap:12},children:[i(De.View,{style:{backgroundColor:"rgba(240, 71, 71, 0.1)",borderRadius:50,padding:16},children:i(De.Image,{source:S("ErrorCircle"),style:{width:32,height:32,tintColor:"#f04747"}})}),i(D,{variant:"heading-md/bold",children:"Failed to install theme"}),i(de,{style:{width:"100%"},children:i(D,{variant:"text-md/medium",children:ee instanceof Error?ee.message:String(ee)})}),b(De.View,{style:{flexDirection:"row",gap:8,width:"100%",justifyContent:"space-between"},children:[i(Z,{size:"md",text:"Cancel",variant:"secondary",style:{flex:1},onPress:()=>Ul()}),i(Z,{size:"md",text:"Try Again",variant:"primary",icon:S("RetryIcon"),style:{flex:1},onPress:()=>{Ul(),setTimeout(te,500)}})]})]})]}))}finally{clearInterval(me),P(0),F(1),t(ee=>{var ir=new Set(ee);return ir.delete(f),ir})}}})(),Ce=()=>x(function*(){try{yield Yt(f),o(me=>me+1),E()}catch(me){console.error("Failed to uninstall theme:",me)}})();return i(de,{children:b(oe,{spacing:16,children:[b(De.View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[b(De.View,{style:{flexShrink:1},children:[i(D,{numberOfLines:1,variant:"heading-lg/semibold",children:n}),b(D,{variant:"text-md/semibold",color:"text-muted",children:["by ",s?.join(", ")||"Unknown"]})]}),b(De.View,{style:{flexDirection:"row",alignItems:"center",gap:8},children:[i(we,{size:"sm",variant:"secondary",icon:S("MoreHorizontalIcon"),onPress:()=>{ox({key:"ThemeShareSheet",header:{title:"Share Theme"},options:[{label:"Copy Install URL",onPress:()=>{Be.setString(f)}}]})}}),p?i(Z,{size:"sm",text:"Uninstall",variant:"destructive",icon:S("TrashIcon"),onPress:Ce}):i(De.View,{style:{opacity:C},children:i(Z,{size:"sm",text:m?"Installing...":"Install",variant:"primary",disabled:m,loading:m,icon:m?i(De.View,{style:{transform:[{rotate:`${I}deg`}]},children:i(De.Image,{source:S("RetryIcon"),style:{width:16,height:16}})}):S("DownloadIcon"),onPress:te})})]})]}),i(D,{variant:"text-md/medium",children:a})]})})}function ix(e){return ie(ge),i(Zt,{CardComponent:({item:r})=>i(ax,{theme:r,installing:e.installing,setInstalling:e.setInstalling,setRefreshTick:e.setRefreshTick}),title:T.THEMES,searchKeywords:["name","description",r=>(r.authors||[]).join(", ")],sortOptions:{"Date (Newest)":(r,t)=>0,"Date (Oldest)":(r,t)=>0,"Name (A-Z)":(r,t)=>r.name.localeCompare(t.name),"Name (Z-A)":(r,t)=>t.name.localeCompare(r.name)},items:e.themes})}function Yg(){ie(N),ie(ge);var e=Ee.useNavigation(),[r,t]=W.useState("installed"),[o,n]=W.useState([]),[a,s]=W.useState(!1),[d,f]=W.useState(null),[m,p]=W.useState(new Set),[E,I]=W.useState(0);W.useEffect(()=>{var C=[];C.push(i(Z,{size:"sm",variant:"secondary",text:r==="installed"?"Browse":"Installed",icon:S(r==="installed"?"LinkIcon":"DownloadIcon"),style:{shadowColor:"#000",shadowOpacity:.1,shadowRadius:4,elevation:2},onPress:()=>t(r==="installed"?"browse":"installed")},"mode-toggle")),C.push(i(we,{size:"sm",variant:"secondary",icon:S("MoreHorizontalIcon"),onPress:()=>nr("ThemeOptionsSheet",()=>(Ht([Ge]),b(rr,{children:[i(Qr,{title:"Options"}),b(De.View,{style:{paddingVertical:20,gap:12},children:[b(pe,{title:"Override Theme Type",children:[i(zt,{label:"Auto",icon:i(Un,{source:S("RobotIcon")}),checked:!Ge.type,onPress:()=>{Ge.type||(Ge.type="dark"),Rr()?.data&&Et(Rr().data,{update:!0})}}),i(zt,{label:"Dark",icon:i(Un,{source:S("ThemeDarkIcon")}),checked:Ge.type==="dark",onPress:()=>{Ge.type=Ge.type==="dark"?void 0:"dark",Rr()?.data&&Et(Rr().data,{update:!0})}}),i(zt,{label:"Light",icon:i(Un,{source:S("ThemeLightIcon")}),checked:Ge.type==="light",onPress:()=>{Ge.type=Ge.type==="light"?void 0:"light",Rr()?.data&&Et(Rr().data,{update:!0})}})]}),i(pe,{title:"Chat Background",children:i(zt,{label:"Show Background",subLabel:"Enable or disable themes background on chat",icon:i(Un,{source:S("ImageIcon")}),checked:!Ge.customBackground,onPress:()=>{Ge.customBackground=Ge.customBackground?null:"hidden"}})})]})]})))},"options")),e.setOptions({headerRight:()=>i(De.View,{style:{flexDirection:"row",gap:8},children:C})})},[e,r]);var P=W.useCallback(()=>x(function*(){s(!0),f(null);try{var C=yield ze(nx);if(!C.ok)throw new Error(`HTTP ${C.status}: ${C.statusText}`);var F=yield C.json(),te=[];Array.isArray(F)?te=F:F.OFFICIAL_THEMES?te=F.OFFICIAL_THEMES:F.themes?te=F.themes:F.THEMES?te=F.THEMES:F.items&&(te=F.items),n(te)}catch(Ce){f(Ce instanceof Error?Ce.message:String(Ce)),n([])}finally{s(!1)}})(),[]);return W.useEffect(()=>{r==="browse"&&P()},[r,P,E]),r==="installed"?i(Zt,{title:T.THEMES,searchKeywords:["data.name","data.description",C=>C.data.authors?.map(F=>F.name).join(", ")??""],sortOptions:{"Name (A-Z)":(C,F)=>C.data.name.localeCompare(F.data.name),"Name (Z-A)":(C,F)=>F.data.name.localeCompare(C.data.name)},installAction:{label:"Install a theme",fetchFn:C=>x(function*(){try{yield Tt(C),nr("ThemeInstalledSheet",()=>b(rr,{children:[i(Qr,{title:"Theme Installed"}),b(De.View,{style:{padding:16,alignItems:"center",gap:12},children:[i(De.View,{style:{backgroundColor:"rgba(67, 181, 129, 0.1)",borderRadius:50,padding:16},children:i(De.Image,{source:S("CheckmarkCircle"),style:{width:32,height:32,tintColor:"#43b581"}})}),i(D,{variant:"heading-md/bold",children:"Theme installed successfully!"}),i(D,{variant:"text-md/medium",color:"text-muted",style:{textAlign:"center"},children:"The theme has been added to your themes list."}),i(De.View,{style:{flexDirection:"row",gap:8,width:"100%",justifyContent:"space-between"},children:i(Z,{size:"md",text:"Cancel",variant:"secondary",style:{flex:1},onPress:()=>Ul()})})]})]}))}catch(F){throw F}})()},items:Object.values(ge),safeModeHint:{message:To("SAFE_MODE_NOTICE_THEMES",{enabled:!!N.safeMode?.currentThemeId}),footer:N.safeMode?.currentThemeId&&i(Z,{size:"small",text:T.DISABLE_THEME,onPress:()=>delete N.safeMode?.currentThemeId,style:{marginTop:8}})},CardComponent:id}):d?i(De.View,{style:{flex:1,paddingHorizontal:16,justifyContent:"center",alignItems:"center"},children:b(de,{style:{gap:16,padding:20,width:"100%",maxWidth:400},children:[b(De.View,{style:{alignItems:"center"},children:[i(De.View,{style:{backgroundColor:"rgba(240, 71, 71, 0.1)",borderRadius:50,padding:16,marginBottom:12},children:i(De.Image,{source:S("ErrorCircle"),style:{width:32,height:32,tintColor:"#f04747"}})}),i(D,{style:{textAlign:"center"},variant:"heading-lg/bold",children:"Connection Error"}),i(D,{style:{textAlign:"center",marginTop:8,marginBottom:8},variant:"text-md/medium",color:"text-muted",children:"An error occurred while fetching the theme repository:"})]}),i(de,{style:{backgroundColor:"rgba(0,0,0,0.05)",padding:12,borderRadius:8},children:i(D,{variant:"text-md/semibold",color:"text-danger",children:d})}),i(Z,{size:"lg",text:"Try Again",onPress:P,icon:S("RetryIcon"),style:{marginTop:8}})]})}):i(ix,{themes:o,installing:m,setInstalling:p,setRefreshTick:I})}var De,tx,Ul,ox,nx,qg=_(()=>{"use strict";l();c();u();be();ne();je();wl();Wg();$e();Ir();Za();bo();Te();ke();ft();Ne();js();Fe();Q();vt();ce();De=H(re()),{useReducer:tx}=W,{hideActionSheet:Ul}=K(()=>L("openLazy","hideActionSheet")),{showSimpleActionSheet:ox}=K(()=>L("showSimpleActionSheet")),nx="https://raw.githubusercontent.com/kmmiio99o/theme-marketplace/refs/heads/main/themes.json"});var Ji={};k(Ji,{fonts:()=>ye,installFont:()=>sx,removeFont:()=>Hl,saveFont:()=>ya,selectFont:()=>Xi,updateFont:()=>Gl,updateFonts:()=>sd,validateFont:()=>qi});function Xg(e){return x(function*(){if(!e&&e!==null)throw new Error("Arg font must be a valid object or null");e?yield ct("fonts.json",JSON.stringify(e)):yield Ho("fonts.json")})()}function qi(e){if(!e||typeof e!="object")throw new Error("URL returned a null/non-object JSON");if(typeof e.spec!="number")throw new Error("Invalid font 'spec' number");if(e.spec!==1)throw new Error("Only fonts which follows spec:1 are supported");var r=["name","main"];if(r.some(t=>!e[t]))throw new Error(`Font is missing one of the fields: ${r}`);if(e.name.startsWith("__"))throw new Error("Font names cannot start with __");if(e.name in ye)throw new Error(`There is already a font named '${e.name}' installed`)}function ya(e,r=!1){return x(function*(){var t;if(typeof e=="string")try{t=yield(yield ze(e)).json()}catch(n){throw new Error(`Failed to fetch fonts at ${e}`,{cause:n})}else t=e;qi(t);var o=yield h(Object.entries(t.main).map(([n,a])=>x(function*(){var s=a.split(".").pop();s!=="ttf"&&s!=="otf"&&(s="ttf");var d=`downloads/fonts/${t.name}/${n}.${s}`;(yield Ot(d))||(yield rc(a,d))})())).then(n=>n.map(a=>a.status==="fulfilled"?void 0:a.reason));if(o.some(n=>n))throw o;return ye[t.name]=t,r&&Xg(ye[t.name]),t})()}function Gl(e){return x(function*(){var r={...e};r.source&&(r={...yield fetch(r.source).then(o=>o.json()),name:e.name,source:e.source});var t=ye.__selected===e.name;yield Hl(e.name),yield ya(r,t)})()}function sx(e,r=!1){return x(function*(){var t=yield ya(e);r&&(yield Xi(t.name))})()}function Xi(e){return x(function*(){if(e&&!(e in ye))throw new Error("Selected font does not exist!");e?ye.__selected=e:delete ye.__selected,yield Xg(e==null?null:ye[e])})()}function Hl(e){return x(function*(){var r=ye.__selected===e;r&&(yield Xi(null)),delete ye[e];try{yield ec(`downloads/fonts/${e}`)}catch{}})()}function sd(){return x(function*(){yield Ut(ye),h(Object.keys(ye).map(e=>ya(ye[e],ye.__selected===e)))})()}var ye,yn=_(()=>{"use strict";l();c();u();be();$e();Ft();Jr();ye=qr(Cr(Xd("BUNNY_FONTS",{})))});function cd(e,r){e&&ye[e].source?lx("revenge-fonts-detach-source-confirmation",i(cx,{title:"Detach font pack URL?",content:"You need to detach the font pack URL from this font pack before you can manually edit its font entries. Do you want to detach the font pack URL?",actions:b(oe,{children:[i(Jg,{text:"Detach",variant:"destructive",onPress:()=>{delete ye[e].source,r()}}),i(Jg,{text:T.CANCEL,variant:"secondary"})]})})):r()}function ux(e){var r=e.map(o=>{var{pathname:n}=new URL(o),a=n.replace(/\.[^/.]+$/,"");return a.split("/").pop()}).filter(Boolean),t=r.reduce((o,n)=>n.length{if(n)try{qi({spec:1,name:n,main:o}),r(n),Object.assign(e,o),Vl.hideActionSheet()}catch(f){d(String(f))}}})]})}function dx({fonts:e,setName:r,setSource:t}){var[o,n]=(0,Je.useState)(""),[a,s]=(0,Je.useState)(!1),[d,f]=(0,Je.useState)(void 0);return b(to.View,{style:{padding:8,paddingBottom:16,gap:12},children:[i(ur,{autoFocus:!0,size:"md",label:"Font Link",value:o,placeholder:"https://link.to/font/pack.json",onChange:n,errorMessage:d,state:d?"error":void 0}),i(Z,{size:"md",variant:"primary",text:"Import",disabled:!o||a,loading:a,onPress:()=>{s(!0),x(function*(){var m=yield ze(o,{cache:"no-store"}),p=yield m.json();qi(p),r(p.name),t(o),Object.assign(e,p.main)})().then(()=>Vl.hideActionSheet()).catch(m=>f(String(m))).finally(()=>s(!1))}})]})}function mx(e){var[r,t]=(0,Je.useState)(e.name),[o,n]=(0,Je.useState)(e.fontEntries[e.name]);return b(to.View,{style:{padding:8,paddingBottom:16,gap:12},children:[i(ur,{autoFocus:!0,size:"md",label:"Family Name (to override)",value:r,placeholder:"ggsans-Bold",onChange:t}),i(ur,{size:"md",label:"Font URL",value:o,placeholder:"https://link.to/the/font.ttf",onChange:n}),i(Z,{size:"md",variant:"primary",text:"Apply",onPress:()=>{delete e.fontEntries[e.name],e.fontEntries[r]=o,e.onChange(),Vl.hideActionSheet()}})]})}function ld(e,r,t){Vl.openLazy(Promise.resolve({default:()=>i(We,{children:b(rr,{children:[i(Qr,{title:"Import Font"}),i(e,{fonts:r,...t})]})})}),"FontEditorActionSheet")}function px({fontName:e,fontEntry:r}){var t=(0,Je.useRef)(),o=(0,Je.useRef)(),[n,a]=(0,Je.useState)(!1),[s,d]=(0,Je.useState)();return b(to.View,{style:{flexDirection:"row",gap:8,justifyContent:"flex-start"},children:[i(to.View,{style:{flex:1},children:i(ur,{isRound:!0,size:"md",label:n?t.current:void 0,placeholder:n?"https://path.to/the/file.ttf":"PostScript name (e.g. ggsans-Bold)",leadingIcon:()=>n?null:i(B.Icon,{source:S("PlusSmallIcon")}),leadingText:n?t.current:"",onChange:f=>(n?o:t).current=f,errorMessage:s,state:s?"error":void 0})}),n&&i(we,{size:"md",variant:"secondary",onPress:()=>{t.current="",a(!1)},icon:S("TrashIcon")}),i(we,{size:"md",variant:"primary",onPress:()=>cd(e,()=>{if(!n&&t.current)a(!0);else if(n&&t.current&&o.current)try{var f=new URL(o.current);if(!f.protocol||!f.host)throw"Invalid URL";r[t.current]=o.current,t.current=void 0,o.current=void 0,a(!1)}catch(m){d(String(m))}}),icon:S(n?"PlusSmallIcon":"ArrowLargeRightIcon")})]})}function Zi(e){var[r,t]=(0,Je.useState)(e.name),[o,n]=(0,Je.useState)(e.name&&ye[e.name].source),[a,s]=(0,Je.useState)(!1),[d,f]=(0,Je.useState)(),m=(0,Je.useMemo)(()=>jt(e.name?{...ye[e.name].main}:{}).proxy,[e.name]),p=ie(m),E=Ee.useNavigation(),[,I]=React.useReducer(()=>({}),0);return i(to.ScrollView,{style:{flex:1},contentContainerStyle:{paddingBottom:38},children:b(oe,{style:{paddingVertical:24,paddingHorizontal:12},spacing:12,children:[e.name?b(pe,{title:"Actions",children:[i(B,{label:"Refetch fonts from source",icon:i(B.Icon,{source:S("RetryIcon")}),onPress:()=>x(function*(){yield Gl(ye[e.name]),E.goBack()})()}),i(B,{variant:"danger",label:"Delete font pack",icon:i(B.Icon,{variant:"danger",source:S("TrashIcon")}),onPress:()=>Hl(e.name).then(()=>E.goBack())})]}):b(pe,{title:"Import",children:[Rr()?.data?.fonts&&i(B,{label:T.LABEL_EXTRACT_FONTS_FROM_THEME,subLabel:T.DESC_EXTRACT_FONTS_FROM_THEME,icon:i(B.Icon,{source:S("HammerIcon")}),onPress:()=>ld(fx,p,{setName:t})}),i(B,{label:"Import font entries from a link",subLabel:"Directly import from a link with a pre-configured JSON file",icon:i(B.Icon,{source:S("LinkIcon")}),onPress:()=>ld(dx,p,{setName:t,setSource:n})})]}),i(ur,{size:"lg",value:r,label:T.FONT_NAME,placeholder:"Whitney",onChange:t}),e.name&&ye[e.name].source&&i(ur,{size:"lg",value:o,label:"Font Pack URL",onChange:n}),b(pe,{title:"Font Entries",children:[Object.entries(p).map(([P,C],F)=>{var te=d?.[F];return i(B,{label:P,subLabel:te?i(D,{variant:"text-xs/medium",color:"text-feedback-critical",children:te.message}):C,trailing:b(oe,{spacing:8,direction:"horizontal",children:[i(we,{size:"sm",variant:"secondary",icon:S("PencilIcon"),onPress:()=>cd(e.name,()=>ld(mx,p,{name:P,fontEntries:p,onChange:()=>{f(void 0),I()}}))}),i(we,{size:"sm",variant:"secondary",icon:S("TrashIcon"),onPress:()=>cd(e.name,()=>{delete p[P],f(void 0)})})]})})}),i(B,{label:i(px,{fontName:e.name,fontEntry:p})})]}),d&&i(D,{variant:"text-sm/medium",color:"text-feedback-critical",children:"Some font entries cannot be imported. Please modify the entries and try again."}),i(to.View,{style:{flexDirection:"row",justifyContent:"flex-end",bottom:0,left:0},children:i(Z,{size:"lg",loading:a,disabled:a||!r||Object.keys(p).length===0,variant:"primary",text:e.name?"Save":"Import",onPress:()=>x(function*(){r&&(f(void 0),s(!0),e.name?(Object.assign(ye[e.name],{name:r,main:p}),Gl(ye[e.name]).then(()=>E.goBack()).catch(P=>f(P)).finally(()=>s(!1))):ya({spec:1,name:r,main:p,source:o}).then(()=>E.goBack()).catch(P=>f(P)).finally(()=>s(!1)))})(),icon:S(e.name?"toast_image_saved":"DownloadIcon"),style:{marginLeft:8}})})]})})}var Je,to,Vl,lx,cx,Jg,ud=_(()=>{"use strict";l();c();u();be();ne();je();$e();yn();Ir();Te();Jr();Ne();Q();ce();Le();It();Je=H(dr()),to=H(re()),Vl=U("hideActionSheet"),{openAlert:lx}=K(()=>L("openAlert","dismissAlert")),{AlertModal:cx,AlertActionButton:Jg}=K(()=>L("AlertModal","AlertActions"))});var Qg=Nt((aG,Zg)=>{l();c();u();Zg.exports=po()["react-native-webview"]});var rv,ev=_(()=>{rv=`\r + \r +\r +\r +