-
Notifications
You must be signed in to change notification settings - Fork 0
/
felocord.min.js
9 lines (9 loc) · 130 KB
/
felocord.min.js
1
2
3
4
5
6
7
8
9
"use strict";(()=>{var Gm=Object.create;var kn=Object.defineProperty;var Vm=Object.getOwnPropertyDescriptor;var zm=Object.getOwnPropertyNames;var $m=Object.getPrototypeOf,Ym=Object.prototype.hasOwnProperty;var h=(e,r)=>()=>(e&&(r=e(e=0)),r);var Rr=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),F=(e,r)=>{for(var t in r)kn(e,t,{get:r[t],enumerable:!0})},ac=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(var n=zm(r),a=0,c=n.length,f;a<c;a++)f=n[a],!Ym.call(e,f)&&f!==t&&kn(e,f,{get:(g=>r[g]).bind(null,f),enumerable:!(o=Vm(r,f))||o.enumerable});return e};var k=(e,r,t)=>(t=e!=null?Gm($m(e)):{},ac(r||!e||!e.__esModule?kn(t,"default",{value:e,enumerable:!0}):t,e)),je=e=>ac(kn({},"__esModule",{value:!0}),e);var d,s=h(()=>{"use strict";d=Symbol("Symbol.asyncIterator")});var Wm,Km,Xm,m,l=h(()=>{"use strict";Wm=e=>({status:"fulfilled",value:e}),Km=e=>({status:"rejected",reason:e}),Xm=e=>Promise.resolve(e).then(Wm,Km),m=Promise.allSettled??=e=>Promise.all(Array.from(e).map(Xm))});function ic(e,r,t,o,n,a,c){try{var f=e[a](c),g=f.value}catch(E){t(E);return}f.done?r(g):Promise.resolve(g).then(o,n)}function y(e){return function(){var r=this,t=arguments;return new Promise(function(o,n){var a=e.apply(r,t);function c(g){ic(a,o,n,c,f,"next",g)}function f(g){ic(a,o,n,c,f,"throw",g)}c(void 0)})}}var te=h(()=>{s();l()});var Hn=Rr((Tg,fc)=>{s();l();var ii=Object.defineProperty,qm=Object.getOwnPropertyDescriptor,Jm=Object.getOwnPropertyNames,Zm=Object.prototype.hasOwnProperty,Qm=(e,r)=>{for(var t in r)ii(e,t,{get:r[t],enumerable:!0})},ed=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function"){var n=function(c){!Zm.call(e,c)&&c!==t&&ii(e,c,{get:()=>r[c],enumerable:!(o=qm(r,c))||o.enumerable})};for(var a of Jm(r))n(a)}return e},rd=e=>ed(ii({},"__esModule",{value:!0}),e),sc={};Qm(sc,{after:()=>id,before:()=>nd,instead:()=>ad,unpatchAll:()=>od});fc.exports=rd(sc);var lc=["a","b","i"],Ot=new Map;function td(e,r,t,o,n){var a=Ot.get(r)?.[e];if(!a)return n?Reflect.construct(r[e],t,o):r[e].apply(o,t);for(var c of a.b.values()){var f=c.call(o,t);Array.isArray(f)&&(t=f)}var g=[...a.i.values()].reduce((x,O)=>(...ue)=>O.call(o,ue,x),(...x)=>n?Reflect.construct(a.o,x,o):a.o.apply(o,x))(...t);for(var E of a.a.values())g=E.call(o,t,g)??g;return g}function cc(e,r,t,o){var n=Ot.get(e),a=n?.[r];if(!a?.[o].has(t))return!1;if(a[o].delete(t),lc.every(f=>a[f].size===0)){var c=Reflect.defineProperty(e,r,{value:a.o,writable:!0,configurable:!0});c||(e[r]=a.o),delete n[r]}return Object.keys(n).length==0&&Ot.delete(e),!0}function od(){for(var[e,r]of Ot.entries())for(var t in r)for(var o of lc)for(var n of r[t]?.[o].keys()??[])cc(e,t,n,o)}var si=e=>(r,t,o,n=!1)=>{if(typeof t[r]!="function")throw new Error(`${r} is not a function in ${t.constructor.name}`);Ot.has(t)||Ot.set(t,Object.create(null));var a=Ot.get(t);if(!a[r]){var c=t[r];a[r]={o:c,b:new Map,i:new Map,a:new Map};var f=(ue,be,Gr)=>{var st=td(r,t,be,ue,Gr);return n&&O(),st},g=new Proxy(c,{apply:(ue,be,Gr)=>f(be,Gr,!1),construct:(ue,be)=>f(c,be,!0),get:(ue,be,Gr)=>be=="toString"?c.toString.bind(c):Reflect.get(ue,be,Gr)}),E=Reflect.defineProperty(t,r,{value:g,configurable:!0,writable:!0});E||(t[r]=g)}var x=Symbol(),O=()=>cc(t,r,x,e);return a[r][e].set(x,o),O},nd=si("b"),ad=si("i"),id=si("a")});var Gn={};F(Gn,{BundleUpdaterManager:()=>Bo,ClientInfoManager:()=>Dt,DeviceManager:()=>Lr,FileManager:()=>Y,MMKVManager:()=>Ir,ThemeManager:()=>li});var Cr,Ir,Y,Dt,Lr,Bo,li,hr=h(()=>{"use strict";s();l();Cr=window.nativeModuleProxy,Ir=Cr.MMKVManager;Y=Cr.DCDFileManager??Cr.RTNFileManager;Dt=Cr.InfoDictionaryManager??Cr.RTNClientInfoManager;Lr=Cr.DCDDeviceManager??Cr.RTNDeviceManager,{BundleUpdaterManager:Bo}=Cr,li=Cr.RTNThemeManager??Cr.DCDTheme});function Ft(e){return Ft=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ft(e)}var ci=h(()=>{s();l()});function Uo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Uo=function(){return!!e})()}var fi=h(()=>{s();l()});function uc(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var mc=h(()=>{s();l()});function dc(e){"@swc/helpers - typeof";return e&&typeof Symbol<"u"&&e.constructor===Symbol?"symbol":typeof e}var pc=h(()=>{s();l()});function gc(e,r){return r&&(dc(r)==="object"||typeof r=="function")?r:uc(e)}var hc=h(()=>{s();l();mc();pc()});function Vn(e,r,t){return r=Ft(r),gc(e,Uo()?Reflect.construct(r,t||[],Ft(e).constructor):r.apply(e,t))}var ui=h(()=>{s();l();ci();fi();hc()});function Mt(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}var zn=h(()=>{s();l()});function lt(e,r){return lt=Object.setPrototypeOf||function(o,n){return o.__proto__=n,o},lt(e,r)}var $n=h(()=>{s();l()});function Yn(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&<(e,r)}var mi=h(()=>{s();l();$n()});function jo(e,r,t){return Uo()?jo=Reflect.construct:jo=function(n,a,c){var f=[null];f.push.apply(f,a);var g=Function.bind.apply(n,f),E=new g;return c&<(E,c.prototype),E},jo.apply(null,arguments)}var vc=h(()=>{s();l();fi();$n()});function _c(e){return Function.toString.call(e).indexOf("[native code]")!==-1}var yc=h(()=>{s();l()});function Wn(e){var r=typeof Map=="function"?new Map:void 0;return Wn=function(o){if(o===null||!_c(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 jo(o,arguments,Ft(this).constructor)}return n.prototype=Object.create(o.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),lt(n,o)},Wn(e)}var xc=h(()=>{s();l();vc();ci();yc();$n()});function di(e,r,{signal:t}={}){var o=null,n=function(...f){o!==null&&clearTimeout(o),!t?.aborted&&(o=setTimeout(()=>{e(...f),o=null},r))},a=function(){n.cancel()};return n.cancel=function(){o!==null&&(clearTimeout(o),o=null)},t?.addEventListener("abort",a,{once:!0}),n}var Sc=h(()=>{s();l()});function pi(e,r){var t={...e};for(var o of r)delete t[o];return t}var Ec=h(()=>{s();l()});var gi=h(()=>{s();l();Sc();Ec()});var ct,Pr,hi=h(()=>{"use strict";s();l();(function(e){e[e.EXISTS=1]="EXISTS",e[e.BLACKLISTED=2]="BLACKLISTED"})(ct||(ct={}));(function(e){e[e.FULL_LOOKUP=0]="FULL_LOOKUP",e[e.NOT_FOUND=1]="NOT_FOUND"})(Pr||(Pr={}))});var Ut={};F(Ut,{_patcherDelaySymbol:()=>ko,after:()=>Z,before:()=>Bt,default:()=>Ho,instead:()=>ft});function vi(e){function r(...o){if(ko in o[1]){var n=o[1][ko],a=!1,c=()=>a=!0;return n(f=>{a||(o[1]=f,c=e.apply(this,o))}),()=>c()}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,c=()=>a=!0;return n.then(f=>{a||(o[1]=f,c=r.apply(this,o))}),()=>c()}return Object.assign(r,{await:t})}var sd,ld,cd,ko,Z,Bt,ft,Ho,qe=h(()=>{"use strict";s();l();({after:sd,before:ld,instead:cd}=Hn()),ko=Symbol.for("felocord.api.patcher.delay");Z=vi(sd),Bt=vi(ld),ft=vi(cd),Ho={after:Z,before:Bt,instead:ft}});var zo={};F(zo,{assetsMap:()=>ut,findAsset:()=>Vo,findAssetId:()=>v,patchAssets:()=>fd});function fd(e){if(!Go){Go=e;var r=Z("registerAsset",Go,([t])=>{var o=_i();o!==-1&&yi(t.name,o)});return r}}function Vo(e){return typeof e=="number"?Go.getAssetByID(e):typeof e=="string"?ut[e]:Object.values(ut).find(e)}function v(e){return ut[e]?.index}var ut,Go,ne=h(()=>{"use strict";s();l();qe();kt();jt();ut=new Proxy({},{get(e,r){if(typeof r=="string"){if(e[r])return e[r];var t=Nr().assetsIndex[r];if(t!=null){for(var o in t){var n=ar(Number(o));if(typeof n=="number"){var a=Go.getAssetByID(n);a&&(a.index??=a.id??=n,a.moduleId??=o,e[r]??=a)}}return e[r]}}},ownKeys(e){var r=[];for(var t in Nr().assetsIndex)e[t]=this.get(e,t,{}),e[t]&&r.push(t);return r}})});function bc(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Ht(e,r,t){return r&&bc(e.prototype,r),t&&bc(e,t),e}var Kn=h(()=>{s();l()});function Xn(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var xi=h(()=>{s();l()});var Si,fo,qn=h(()=>{"use strict";s();l();zn();Kn();xi();(function(e){e.GET="GET",e.SET="SET",e.DEL="DEL"})(Si||(Si={}));fo=function(){"use strict";function e(){Mt(this,e),Xn(this,"listeners",Object.values(Si).reduce((r,t)=>(r[t]=new Set,r),{}))}return Ht(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,c)=>{this.off(a,n),o(a,c)};this.on(t,n)}},{key:"emit",value:function(t,o){for(var n of this.listeners[t])n(t,o)}}]),e}()});var $o={};F($o,{createFilterDefinition:()=>ir,createSimpleFilter:()=>ud});function ir(e,r){function t(n,a,c){return Object.assign(n,{filter:e,raw:c,uniq:[c&&"raw::",r(a)].filter(Boolean).join("")})}var o=n=>(...a)=>t((c,f,g)=>e(a,c,f,g),a,n);return Object.assign(o(!1),{byRaw:o(!0),uniqMaker:r})}function ud(e,r){return ir((t,o)=>e(o),()=>`dynamic::${r}`)()}var Jn=h(()=>{"use strict";s();l()});var Ei={};F(Ei,{byDisplayName:()=>dt,byFilePath:()=>Qn,byMutableProp:()=>Wo,byName:()=>mt,byProps:()=>Yo,byStoreName:()=>Zn,byTypeName:()=>pt});var Yo,mt,dt,pt,Zn,Qn,Wo,Ko=h(()=>{"use strict";s();l();Jn();jt();Yo=ir((e,r)=>e.length===0?r[e[0]]:e.every(t=>r[t]),e=>`felocord.metro.byProps(${e.join(",")})`),mt=ir(([e],r)=>r.name===e,e=>`felocord.metro.byName(${e})`),dt=ir(([e],r)=>r.displayName===e,e=>`felocord.metro.byDisplayName(${e})`),pt=ir(([e],r)=>r.type?.name===e,e=>`felocord.metro.byTypeName(${e})`),Zn=ir(([e],r)=>r.getName?.length===0&&r.getName()===e,e=>`felocord.metro.byStoreName(${e})`),Qn=ir(([e,r],t,o,n)=>r===n&&Pe[o]?.__filePath===e,([e,r])=>`felocord.metro.byFilePath(${e},${r})`),Wo=ir(([e],r)=>r?.[e]&&!Object.getOwnPropertyDescriptor(r,e)?.get,e=>`felocord.metro.byMutableProp(${e})`)});function Tc(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 bi(e){var{cacheId:r,finish:t}=ra(e.uniq,!1);for(var[o,n]of ea(e.uniq,!1)){var{exports:a,defaultExport:c}=Tc(n,o,e);if(a!==void 0)return r(o,a),{id:o,defaultExport:c}}return t(!0),{}}function md(e){return bi(e)?.id}function Ae(e){var{id:r,defaultExport:t}=bi(e);if(r!=null)return t?ar(r).default:ar(r)}function Ti(e){var{cacheId:r,finish:t}=ra(e.uniq,!0),o=[];for(var[n,a]of ea(e.uniq,!0)){var{exports:c,defaultExport:f}=Tc(a,n,e);c!==void 0&&typeof f=="boolean"&&(o.push({id:n,defaultExport:f}),r(n,c))}return t(o.length===0),o}function dd(e){return Ti(e).map(r=>r.id)}function gt(e){return Ti(e).map(r=>{if(r.id){var{id:t,defaultExport:o}=r;return o?ar(t).default:ar(t)}})}var uo=h(()=>{"use strict";s();l();kt();jt()});var wi={};F(wi,{getProxyFactory:()=>Ai,lazyDestructure:()=>G,proxyLazy:()=>ye});function ye(e,r={}){var t,o=r.hint!=="object"?function(){}:{},n=()=>t??=e(),a=new Proxy(o,gd);return wc.set(a,n),mo.set(o,{factory:e,options:r}),a}function G(e,r={}){var t=ye(e);return new Proxy({},{get(o,n){return n===Symbol.iterator?function*(){throw yield t,yield new Proxy({},{get:(a,c)=>ye(()=>t[c],r)}),new Error("This is not a real iterator, this is likely used incorrectly")}:ye(()=>t[n],r)}})}function Ai(e){return wc.get(e)}var Ac,pd,wc,mo,gd,we=h(()=>{"use strict";s();l();Ac=new Set(["arguments","caller","prototype"]),pd=e=>typeof e=="string"&&Ac.has(e),wc=new WeakMap,mo=new WeakMap,gd={...Object.fromEntries(Object.getOwnPropertyNames(Reflect).map(e=>[e,(r,...t)=>{var o=mo.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=mo.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){var o=mo.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=mo.get(e),t=r?.factory();if(!t)throw new Error(`Trying to Reflect.ownKeys of ${typeof t}`);var o=Reflect.ownKeys(t);return Ac.forEach(n=>!o.includes(n)&&o.push(n)),o},getOwnPropertyDescriptor:(e,r)=>{var t=mo.get(e),o=t?.factory();if(!o)throw new Error(`Trying to getOwnPropertyDescriptor of ${typeof o}`);if(pd(r))return Reflect.getOwnPropertyDescriptor(e,r);var n=Reflect.getOwnPropertyDescriptor(o,r);return n&&Object.defineProperty(e,r,n),n}}});var Ri={};F(Ri,{_lazyContextSymbol:()=>ta,createLazyModule:()=>Or,getLazyContext:()=>Cc});function hd(e){var r=Nr().findIndex[e.uniq];if(r){for(var t in r)if(t[0]!=="_")return Number(t)}}function vd(e,r){var t=Cc(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 Ci(t.moduleId,()=>{r(Ae(t.filter))})}function Cc(e){return Rc.get(e)}function Or(e){var r=void 0,t=hd(e),o={filter:e,indexed:!!t,moduleId:t,getExports(a){return!t||Pe[t]?.isInitialized?(a(this.forceLoad()),()=>{}):this.subscribe(a)},subscribe(a){return vd(n,a)},get cache(){return r},forceLoad(){if(r??=Ae(e),!r)throw new Error(`${e.uniq} is ${typeof r}! (id ${o.moduleId??"unknown"})`);return r}},n=ye(()=>o.forceLoad(),{exemptedEntries:{[ta]:o,[ko]:a=>o.getExports(a)}});return Rc.set(n,o),n}var ta,Rc,Xo=h(()=>{"use strict";s();l();qe();we();uo();kt();jt();ta=Symbol.for("felocord.metro.lazyContext"),Rc=new WeakMap});var B,C,Ii,oa,Re,Li,Pi,Ni,Oi,Di,_d,Fi,Mi,qo,yd,Bi,Q=h(()=>{"use strict";s();l();Ko();uo();Xo();B=(...e)=>Ae(Yo(...e)),C=(...e)=>Or(Yo(...e)),Ii=(...e)=>gt(Yo(...e)),oa=(e,r=!0)=>Ae(r?mt(e):mt.byRaw(e)),Re=(e,r=!0)=>Or(r?mt(e):mt.byRaw(e)),Li=(e,r=!0)=>gt(r?mt(e):mt.byRaw(e)),Pi=(e,r=!0)=>Ae(r?dt(e):dt.byRaw(e)),Ni=(e,r=!0)=>Or(r?dt(e):dt.byRaw(e)),Oi=(e,r=!0)=>gt(r?dt(e):dt.byRaw(e)),Di=(e,r=!0)=>Ae(r?pt(e):pt.byRaw(e)),_d=(e,r=!0)=>Or(r?pt(e):pt.byRaw(e)),Fi=(e,r=!0)=>gt(r?pt(e):pt.byRaw(e)),Mi=e=>Ae(Zn(e)),qo=e=>Or(Zn(e)),yd=(e,r=!1)=>Ae(Qn(e,r)),Bi=(e,r=!1)=>Or(Qn(e,r))});var ht=Rr((Iv,Ic)=>{"use strict";s();l();Q();Ic.exports={react:C("createElement"),"react-native":C("AppRegistry"),util:C("inspect","isNullOrUndefined"),moment:C("isMoment"),"chroma-js":C("brewer"),lodash:C("forEachRight"),"@shopify/react-native-skia":C("useFont")}});var ae=Rr((Nv,Lc)=>{s();l();Lc.exports=ht()["react-native"]});var Nc,Pc,Ui,Oc,po,Je,Yr,Dc=h(()=>{"use strict";s();l();te();hr();Nc=k(ae()),Pc=/[<>:"/\\|?*]/g,Ui=e=>Nc.Platform.select({default:e,ios:Y.saveFileToGallery?e:`Documents/${e}`}),Oc=e=>(Pc.test(e)&&(e=e.replace(Pc,"-").replace(/-+/g,"-")),`vd_mmkv/${e}`),po=function(){var e=y(function*(r){(yield Ir.getItem(r))&&Ir.removeItem(r);var t=Oc(r);(yield Y.fileExists(`${Y.getConstants().DocumentsDirPath}/${t}`))&&(yield Y.removeFile?.("documents",t))});return function(t){return e.apply(this,arguments)}}(),Je=(e,r={})=>{var t=Oc(e),o=JSON.stringify(r);return Yr(t,r,y(function*(){var n=`${Y.getConstants().DocumentsDirPath}/${t}`;if(!(yield Y.fileExists(n))){var a=(yield Ir.getItem(e))??o;if(a==="!!LARGE_VALUE!!"){var c=`${Y.getConstants().CacheDirPath}/mmkv/${e}`;(yield Y.fileExists(c))?a=yield Y.readFile(c,"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 Y.writeFile("documents",Ui(t),a,"utf8"),(yield Ir.getItem(e))!==null&&(Ir.removeItem(e),console.log(`Successfully migrated ${e} store from MMKV storage to fs`))}})())},Yr=(e,r={},t)=>({get:y(function*(){yield t;var o=`${Y.getConstants().DocumentsDirPath}/${e}`;if(yield Y.fileExists(o)){var n=yield Y.readFile(o,"utf8");try{return JSON.parse(n)}catch{}}return yield Y.writeFile("documents",Ui(e),JSON.stringify(r),"utf8"),JSON.parse(yield Y.readFile(o,"utf8"))}),set:function(){var o=y(function*(n){yield t,yield Y.writeFile("documents",Ui(e),JSON.stringify(n),"utf8")});return function(n){return o.apply(this,arguments)}}()})});var na={};F(na,{awaitStorage:()=>Wr,createFileBackend:()=>Yr,createMMKVBackend:()=>Je,createProxy:()=>go,createStorage:()=>ke,purgeStorage:()=>po,useProxy:()=>U,wrapSync:()=>sr});function go(e={}){var r=new fo,t=e,o=new WeakMap,n=new WeakSet;function a(c,f){return new Proxy(c,{get(g,E){if(E===Fc)return r;var x=[...f,E],O=g[E];if(O!=null){if(r.emit("GET",{parent:t,path:x,value:O}),typeof O=="object"){if(n.has(O))return O;if(o.has(O))return o.get(O);var ue=a(O,x);return o.set(O,ue),ue}return O}return O},set(g,E,x){if(typeof x=="object")if(o.has(x))g[E]=o.get(x);else{var O=a(x,[...f,E]);o.set(x,O),n.add(x),g[E]=O}else g[E]=x;return r.emit("SET",{parent:t,path:[...f,E],value:g[E]}),!0},deleteProperty(g,E){var x=typeof g[E]=="object"?o.get(g[E]):g[E],O=delete g[E];return O&&r.emit("DEL",{value:x,parent:t,path:[...f,E]}),O}})}return{proxy:a(e,[]),emitter:r}}function U(e){var r=e?.[Fc];if(!r)throw new Error("storage?.[emitterSymbol] is undefined");var[,t]=React.useReducer(o=>~o,0);return React.useEffect(()=>{var o=(n,a)=>{n==="DEL"&&a.value===e||t()};return r.on("SET",o),r.on("DEL",o),()=>{r.off("SET",o),r.off("DEL",o)}},[]),e}function ke(e){return ji.apply(this,arguments)}function ji(){return ji=y(function*(e){var r=yield e.get(),{proxy:t,emitter:o}=go(r),n=()=>e.set(t);return o.on("SET",n),o.on("DEL",n),t}),ji.apply(this,arguments)}function sr(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,...c)=>Reflect[n](r??a,...c)])),get(n,a,c){return a===Mc?o:Reflect.get(r??n,a,c)}})}function Wr(...e){return Promise.all(e.map(r=>new Promise(t=>r[Mc](t))))}var Fc,Mc,le=h(()=>{"use strict";s();l();te();qn();Dc();Fc=Symbol.for("vendetta.storage.emitter"),Mc=Symbol.for("vendetta.storage.accessor")});var Yi={};F(Yi,{BUNNY_PROXY_PREFIX:()=>ho,DISCORD_SERVER:()=>ki,DISCORD_SERVER_ID:()=>zi,GITHUB:()=>Hi,HTTP_REGEX:()=>xd,HTTP_REGEX_MULTI:()=>Gi,OFFICIAL_PLUGINS_REPO_URL:()=>Vi,OLD_BUNNY_PROXY_PREFIX:()=>Sd,PLUGINS_CHANNEL_ID:()=>$i,THEMES_CHANNEL_ID:()=>Jo,VD_PROXY_PREFIX:()=>vr});var ki,Hi,xd,Gi,vr,ho,Sd,Vi,zi,$i,Jo,vt=h(()=>{"use strict";s();l();ki="https://discord.gg/XjYgWXHb9Q",Hi="https://github.com/felitendo",xd=/^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/,Gi=/https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&//=]*)/g,vr="https://vd-plugins.github.io/proxy",ho="https://bn-plugins.github.io/vd-proxy",Sd="https://felocord-mod.github.io/plugins-proxy",Vi="https://bn-plugins.github.io/dist/repo.json",zi="1015931589865246730",$i="1091880384561684561",Jo="1091880434939482202"});function Wi(e,r=0){for(var t=3735928559^r,o=1103547991^r,n=0,a;n<e.length;n++)a=e.charCodeAt(n),t=Math.imul(t^a,2654435761),o=Math.imul(o^a,1597334677);return t=Math.imul(t^t>>>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 Bc(e,r=0){var[t,o]=Wi(e,r);return t.toString(36).padStart(7,"0")+o.toString(36).padStart(7,"0")}var Ki=h(()=>{"use strict";s();l()});var _r,Uc=h(()=>{"use strict";s();l();yr();_r=(e,r)=>vo(e,r,{walkable:["props","children","child","sibling"]})});function Xi(e,r,t,o){if(!(o>t.maxDepth)&&e){try{if(r(e))return e}catch{}if(Array.isArray(e)){for(var n of e)if(!(typeof n!="object"||n===null))try{var a=Xi(n,r,t,o+1);if(a)return a}catch{}}else if(typeof e=="object"){for(var c of Object.keys(e))if(!(typeof e[c]!="object"||e[c]===null)&&!(t.walkable.length&&!t.walkable.includes(c))&&!t.ignore.includes(c))try{var f=Xi(e[c],r,t,o+1);if(f)return f}catch{}}}}var vo,jc=h(()=>{"use strict";s();l();vo=(e,r,{walkable:t=[],ignore:o=[],maxDepth:n=100}={})=>Xi(e,r,{walkable:t,ignore:o,maxDepth:n},0)});function kc(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 Hc=h(()=>{"use strict";s();l()});function qi(e,r){if(!e){var t=typeof r=="function"?r():r,o="[Invariant Violation]",n=t?`${o}: ${t}`:o;throw new Error(n)}}var Gc=h(()=>{"use strict";s();l()});var Ji={};F(Ji,{DiscordLogger:()=>Zo,logger:()=>Ne});var Zo,Ne,Kr=h(()=>{"use strict";s();l();Q();Zo=Re("Logger"),Ne=new Zo("Felocord")});function He(e,r){return Zi.apply(this,arguments)}function Zi(){return Zi=y(function*(e,r,t=1e4){var o=yield fetch(e,{signal:Ed(t),...r});if(!o.ok)throw new Error(`Request returned non-ok: ${o.status} ${o.statusText}`);return o}),Zi.apply(this,arguments)}function Ed(e){var r=new AbortController;return setTimeout(()=>r.abort(`Timed out after ${e}ms`),e),r.signal}var Vc=h(()=>{"use strict";s();l();te()});var aa={};F(aa,{Emitter:()=>fo,constants:()=>Yi,cyrb64:()=>Wi,findInReactTree:()=>_r,findInTree:()=>vo,hookDefineProperty:()=>kc,invariant:()=>qi,lazy:()=>wi,logger:()=>Ji,safeFetch:()=>He});var yr=h(()=>{"use strict";s();l();vt();Ki();qn();Uc();jc();Hc();Gc();we();Kr();Vc()});var ia=Rr((A_,zc)=>{s();l();zc.exports=ht()["chroma-js"]});var $t={};F($t,{applyTheme:()=>Qo,color:()=>ge,fetchTheme:()=>Vt,getCurrentTheme:()=>la,getThemeFromLoader:()=>yt,initThemes:()=>ls,installTheme:()=>Xr,patchChatBackground:()=>ss,removeTheme:()=>zt,selectTheme:()=>qr,themes:()=>ee,updateThemes:()=>sa});function Qi(e){return es.apply(this,arguments)}function es(){return es=y(function*(e){if(typeof e!="object")throw new Error("Theme must be an object");yield Yr(cs()||"theme.json").set(e)}),es.apply(this,arguments)}function ss(){var e=[Z("default",Td,(r,t)=>_t?React.createElement(_o.ImageBackground,{style:{flex:1,height:"100%"},source:Ge?.data?.background?.url&&{uri:Ge.data.background.url}||0,blurRadius:typeof Ge?.data?.background?.blur=="number"?Ge?.data?.background?.blur:0,children:t}):t),Z("render",Ad.prototype,(r,t)=>{if(!(!_t||!Ge?.data?.background?.url)){var o=_r(t,n=>n&&"HACK_fixModalInteraction"in n.props&&n?.props?.style);o?o.props.style=[o.props.style,{backgroundColor:(0,Gt.default)(o.props.style.backgroundColor||"black").alpha(1-(Ge?.data.background?.alpha??1)).hex()}]:console.error("Didn't find Messages when patching MessagesWrapper!")}})];return()=>e.forEach(r=>r())}function Xc(e){if(Gt.default.valid(e))return(0,Gt.default)(e).hex();var r=Number((0,_o.processColor)(e));return Gt.default.rgb(r>>16&255,r>>8&255,r&255,r>>24&255).hex()}function Rd(e){if(e.semanticColors){var{semanticColors:r}=e;for(var t in r)for(var o in r[t])r[t][o]&&=Xc(r[t][o])}if(e.rawColors){var{rawColors:n}=e;for(var a in n)e.rawColors[a]=Xc(n[a]);_o.Platform.OS==="android"&&Cd(n)}return e.spec??=2,e}function Cd(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]=(0,Gt.default)(e[o]).alpha(n).hex())}}function Vt(e){return rs.apply(this,arguments)}function rs(){return rs=y(function*(e,r=!1){var t;try{t=yield(yield He(e,{cache:"no-store"})).json()}catch{throw new Error(`Failed to fetch theme at ${e}`)}ee[e]={id:e,selected:r,data:Rd(t)},r&&(Qi(ee[e]),Qo(ee[e],xe))}),rs.apply(this,arguments)}function Xr(e){return ts.apply(this,arguments)}function ts(){return ts=y(function*(e){if(typeof e!="string"||e in ee)throw new Error("Theme already installed");yield Vt(e)}),ts.apply(this,arguments)}function qr(e,r=!0){if(e&&(e.selected=!0),Object.keys(ee).forEach(t=>ee[t].selected=ee[t].id===e?.id),e==null&&r)return Qi({});if(e)return Qi(e)}function zt(e){return os.apply(this,arguments)}function os(){return os=y(function*(e){var r=ee[e];return r.selected&&(yield qr(null)),delete ee[e],r.selected}),os.apply(this,arguments)}function yt(){return en()}function sa(){return ns.apply(this,arguments)}function ns(){return ns=y(function*(){yield Wr(ee);var e=yt();yield m(Object.keys(ee).map(r=>Vt(r,e?.id===r)))}),ns.apply(this,arguments)}function la(){return Ge}function is(e){return Ld.has(e)}function Pd(){var e=([r])=>r===xr?[xe]:void 0;Object.keys(ge.RawColor).forEach(r=>{Object.defineProperty(ge.RawColor,r,{configurable:!0,enumerable:!0,get:()=>_t?Ge?.data?.rawColors?.[r]??qc[r]:qc[r]})}),Bt("isThemeDark",Kc,e),Bt("isThemeLight",Kc,e),Bt("updateTheme",li,e),Z("get",$c,([r],t)=>{r==="SelectivelySyncedUserSettingsStore"?(as=!0,t?._state?.appearance?.settings?.theme&&_t&&(xe=t._state.appearance.settings.theme,t._state.appearance.settings.theme=xr)):r==="ThemeStore"&&(as=!0,t?._state?.theme&&_t&&(xe=t._state.theme,t._state.theme=xr))}),Bt("set",$c,r=>{if(r[1]){var t=r[0],o=JSON.parse(JSON.stringify(r[1])),n={SelectivelySyncedUserSettingsStore:()=>{if(o._state?.appearance?.settings?.theme){var{theme:a}=o._state?.appearance?.settings??{};is(a)?xe=a:o._state.appearance.settings.theme=xe}},ThemeStore:()=>{if(o._state?.theme){var{theme:a}=o._state;is(a)?xe=a:o._state.theme=xe}}};return t in n?(n[t](),[t,o]):r}}),ft("resolveSemanticColor",ge.default.meta??ge.default.internal,(r,t)=>{if(!_t||!Ge)return t(...r);if(r[0]!==xr)return t(...r);r[0]=xe;var[o,n]=Jc(xe,r[1]),a=xe==="midnight"?2:xe==="light"?1:0;var c=wd[o]??o,f=(Ge.data?.semanticColors?.[o]??Ge.data?.semanticColors?.[c])?.[a];if(f)return f;var g=Ge.data?.rawColors?.[n.raw];return g?n.opacity===1?g:(0,Gt.default)(g).alpha(n.opacity).hex():t(...r)})}function Nd(e=xe){var r=bd.theme.toLowerCase();return is(r)?r:e}function Qo(e,r){r||(r=Nd()),Ge=e,_t=!!Ge,xe=r,xr=`vd-theme-${Id++}-${r}`,e&&(ge.Theme[xr.toUpperCase()]=xr,Wc.DIVIDER_COLORS[xr]=Wc.DIVIDER_COLORS[xe],Object.keys(ge.Shadow).forEach(t=>ge.Shadow[t][xr]=ge.Shadow[t][xe]),Object.keys(ge.SemanticColor).forEach(t=>{ge.SemanticColor[t][xr]={...ge.SemanticColor[t][xe],override:e?.data?.semanticColors?.[t]?.[0]}})),as&&(Yc.setShouldSyncAppearanceSettings(!1),Yc.updateTheme(e?xr:r))}function ls(){var e=yt();_t=!!e,Pd(),Qo(e,xe),sa().catch(r=>console.error("Failed to update themes",r))}function Jc(e,r){var t=r[Jc._sym??=Object.getOwnPropertySymbols(r)[0]],o=ge.SemanticColor[t];return[t,o[e]]}var Gt,_o,ge,$c,Yc,bd,Wc,Td,Ad,Kc,ee,wd,qc,Id,xr,xe,_t,Ge,as,Ld,Ze=h(()=>{"use strict";s();l();te();Sr();hr();qe();le();yr();we();Ko();Xo();Q();Gt=k(ia()),_o=k(ae());ge=C("SemanticColor"),$c=ye(()=>{var e=B("impl");return typeof e?.impl=="object"?e.impl:B("storage")}),Yc=C("updateTheme"),bd=qo("ThemeStore"),Wc=C("DIVIDER_COLORS"),Td=Re("MessagesWrapperConnected",!1),{MessagesWrapper:Ad}=G(()=>B("MessagesWrapper")),Kc=Or(Wo("isThemeDark")),ee=sr(ke(Je("VENDETTA_THEMES"))),wd={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"};qc={...ge.RawColor},Id=0,xr="vd-theme",xe="darker",_t=!1,as=!1,Ld=new Set(["darker","midnight","dark","light"])});var hs={};F(hs,{getLoaderConfigPath:()=>ps,getLoaderIdentity:()=>Dd,getLoaderName:()=>ca,getLoaderVersion:()=>fs,getReactDevToolsProp:()=>us,getReactDevToolsVersion:()=>ms,getStoredTheme:()=>en,getSysColors:()=>Zc,getThemeFilePath:()=>cs,getVendettaLoaderIdentity:()=>rn,isFontSupported:()=>gs,isLoaderConfigSupported:()=>fa,isPyonLoader:()=>de,isReactDevToolsPreloaded:()=>yo,isSysColorsSupported:()=>ds,isThemeSupported:()=>lr,isVendettaLoader:()=>Oe});function Oe(){return Fr!=null}function de(){return Dr!=null}function Od(){if(!de()||Oe())return null;var e={name:Dr.loaderName,features:{}};return fa()&&(e.features.loaderConfig=!0),ds()&&(e.features.syscolors={prop:"__vendetta_syscolors"},Object.defineProperty(globalThis,"__vendetta_syscolors",{get:()=>Zc(),configurable:!0})),lr()&&(e.features.themes={prop:"__vendetta_theme"},Object.defineProperty(globalThis,"__vendetta_theme",{get:()=>{var r=en()?.id;if(!r)return null;var{themes:t}=(Ze(),je($t));return t[r]??en()??null},configurable:!0})),Object.defineProperty(globalThis,"__vendetta_loader",{get:()=>e,configurable:!0}),e}function Dd(){return de()?Dr:Oe()?rn():null}function rn(){return globalThis.__vendetta_loader?globalThis.__vendetta_loader:Od()}function ca(){return de()?Dr.loaderName:Oe()?Fr.name:"Unknown"}function fs(){return de()?Dr.loaderVersion:null}function fa(){return de()?!0:Oe()?Fr.features.loaderConfig:!1}function lr(){return de()?Dr.hasThemeSupport:Oe()?Fr.features.themes!=null:!1}function en(){if(de())return Dr.storedTheme;if(Oe()){var e=Fr.features.themes?.prop;return e&&globalThis[e]||null}return null}function cs(){return de()?"felitendo/current-theme.json":Oe()?"vendetta_theme.json":null}function yo(){return de()?!!window.__reactDevTools:Oe()?Fr.features.devtools!=null:!1}function us(){return yo()?de()?(window.__felitendo_rdt=window.__reactDevTools.exports,"__felitendo_rdt"):Oe()?Fr.features.devtools.prop:null:null}function ms(){return yo()?de()?window.__reactDevTools.version||null:Oe()?Fr.features.devtools.version:null:null}function ds(){return de()?Dr.isSysColorsSupported:Oe()?Fr.features.syscolors!=null:!1}function Zc(){return ds()?de()?Dr.sysColors:Oe()?Fr.features.syscolors.prop:null:null}function ps(){return de()?"felitendo/loader.json":Oe()?"vendetta_loader.json":"loader.json"}function gs(){return de()?Dr.fontPatch===2:!1}var Dr,Fr,Sr=h(()=>{"use strict";s();l();Dr=globalThis.__PYON_LOADER__,Fr=globalThis.__vendetta_loader;rn()});var ua={};F(ua,{loaderConfig:()=>cr,settings:()=>I});var I,cr,Ce=h(()=>{"use strict";s();l();Sr();le();I=sr(ke(Je("VENDETTA_SETTINGS"))),cr=sr(ke(Yr(ps(),{customLoadUrl:{enabled:!1,url:"http://localhost:4040/felocord.js"}})))});var xs={};F(xs,{default:()=>Fd});var Qc,rf,vs,ys,xo,_s,Jr,ef,tn,Fd,Ss=h(()=>{"use strict";s();l();kt();Qc=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"]),rf={},vs={},ys=Es("redesign_module");for([ef,tn]of ys.getModules())for(Jr of Qc){if(xo=void 0,tn[Jr])xo=tn;else if(tn.default?.[Jr])xo=tn.default;else continue;_s=Reflect.ownKeys(xo).length,!(vs[Jr]&&_s>=vs[Jr])&&(rf[Jr]=xo[Jr],vs[Jr]=Reflect.ownKeys(xo).length,ys.cacheId(ef),_s===1&&Qc.delete(Jr))}ys.finish();Fd=rf});var As={};F(As,{getCachedPolyfillModules:()=>Hd,getImportingModuleId:()=>_i,getModules:()=>ea,metroModules:()=>Pe,requireModule:()=>ar,subscribeModule:()=>Ci});function da(e){Object.defineProperty(Pe,e,{enumerable:!1}),sf.add(e),Rs(Number(e))}function on(e){return!e||e===window||e["<!@ pylix was here :fuyusquish: !@>"]===null||e.__proto__===Object.prototype&&Reflect.ownKeys(e).length===0}function kd(e,r){if(ws(r,e),e.initSentry&&=()=>{},e.default?.track&&e.default.trackMaker&&(e.default.track=()=>Promise.resolve()),e.registerAsset&&(ne(),je(zo)).patchAssets(e),!nf&&["customBubblingEventTypes","customDirectEventTypes","register","get"].every(c=>e[c])&&(Ts("register",e,(c,f)=>{try{return f(...c)}catch{}}),nf=!0),e?.default?.constructor?.displayName==="DeveloperExperimentStore"&&(e.default=new Proxy(e.default,{get(c,f,g){if(f==="isDeveloper"){var{settings:E}=(Ce(),je(ua));return E.enableDiscordDeveloperSettings??!1}return Reflect.get(c,f,g)}})),!of&&e.fileFinishedImporting&&(Bd("fileFinishedImporting",e,([c])=>{So===-1||!c||(Pe[So].__filePath=c)}),of=!0),!tf&&window["__core-js_shared__"]){var t=c=>typeof c=="function"&&jd.apply(c,[]);window["__core-js_shared__"].inspectSource=t,tf=!0}if(e.findHostInstance_DEPRECATED){var o=Pe[r-1]?.publicModule.exports,n=o.default?.reactProfilingEnabled?1:-1;Pe[r+n]?.isInitialized||da(r+n)}e.isMoment&&Ts("defineLocale",e,(c,f)=>{var g=e.locale();f(...c),e.locale(g)});var a=ma.get(Number(r));a&&(a.forEach(c=>c()),ma.delete(Number(r)))}function _i(){return So}function Ci(e,r){var t=ma.get(e)??new Set;return t.add(r),ma.set(e,t),()=>t.delete(r)}function ar(e){if(Pe[0]?.isInitialized||bs(0),!sf.has(e)){if(Number(e)===-1)return Ss(),je(xs);if(Pe[e]?.isInitialized&&!Pe[e]?.hasError)return bs(e);var r=ErrorUtils.getGlobalHandler();ErrorUtils.setGlobalHandler(Ud);var t;try{t=bs(e)}catch{da(e),t=void 0}return ErrorUtils.setGlobalHandler(r),t}}function*ea(e,r=!1){yield[-1,(Ss(),je(xs))];var t=Nr().findIndex[e];if(r&&!t?.[`_${Pr.FULL_LOOKUP}`]&&(t=void 0),!t?.[`_${Pr.NOT_FOUND}`]){for(var o in t)if(o[0]!=="_"){var n=ar(Number(o));on(n)||(yield[o,n])}for(var a in Pe){var c=ar(Number(a));on(c)||(yield[a,c])}}}function*Hd(e){var r=Nr().polyfillIndex[e];for(var t in r){var o=ar(Number(t));on(o)||(yield[t,o])}if(!r[`_${Pr.FULL_LOOKUP}`])for(var n in Pe){var a=ar(Number(n));on(a)||(yield[n,a])}}var Md,Bd,Ts,Pe,bs,ma,sf,Ud,jd,tf,of,nf,So,af,jt=h(()=>{"use strict";s();l();kt();hi();Md=function(e){var r=Number(e),t=Pe[r],o=Nr().exportsIndex[r];if(o&ct.BLACKLISTED)return da(r),"continue";t.factory&&Ts("factory",t,(n,a)=>{var c=So;So=r;var{1:f,4:g}=n;n[2]=E=>{var x=f(E);return x&&x.__esModule?x.default:x},n[3]=E=>{var x=f(E);if(x&&x.__esModule)return x;var O={};return x&&Object.assign(O,x),O.default=x,O},a(...n),on(g.exports)?da(r):kd(g.exports,r),So=c})},{before:Bd,instead:Ts}=Hn(),Pe=window.modules,bs=window.__r,ma=new Map,sf=new Set,Ud=()=>{},jd=Function.prototype.toString,tf=!1,of=!1,nf=!1,So=-1;for(af in Pe)Md(af)});var mf={};F(mf,{getCacherForUniq:()=>ra,getMetroCache:()=>Nr,getPolyfillModuleCacher:()=>Es,indexAssetName:()=>yi,indexBlacklistFlag:()=>Rs,indexExportsFlags:()=>ws,initMetroCache:()=>Gd});function lf(){var e={_v:cf,_buildNumber:Dt.Build,_modulesCount:Object.keys(window.modules).length,exportsIndex:{},findIndex:{},polyfillIndex:{},assetsIndex:{}};return setTimeout(()=>{for(var r in window.modules)(jt(),je(As)).requireModule(r)},100),Me=e,e}function Gd(){return Cs.apply(this,arguments)}function Cs(){return Cs=y(function*(){var e=yield Ir.getItem(ff);if(e==null)return void lf();try{if(Me=JSON.parse(e),Me._v!==cf)throw Me=null,"cache invalidated; cache version outdated";if(Me._buildNumber!==Dt.Build)throw Me=null,"cache invalidated; version mismatch";if(Me._modulesCount!==Object.keys(window.modules).length)throw Me=null,"cache invalidated; modules count mismatch"}catch{lf()}}),Cs.apply(this,arguments)}function uf(e){if(e){var r=ct.EXISTS;return r}}function ws(e,r){var t=uf(r);t&&t!==ct.EXISTS&&(Me.exportsIndex[e]=t)}function Rs(e){Me.exportsIndex[e]|=ct.BLACKLISTED}function ra(e,r){var t=Me.findIndex[e]??={};return{cacheId(o,n){t[o]??=uf(n),nn()},finish(o){r&&(t[`_${Pr.FULL_LOOKUP}`]=1),o&&(t[`_${Pr.NOT_FOUND}`]=1),nn()}}}function Es(e){var r=Me.polyfillIndex[e]??={};return{getModules(){return(jt(),je(As)).getCachedPolyfillModules(e)},cacheId(t){r[t]=1,nn()},finish(){r[`_${Pr.FULL_LOOKUP}`]=1,nn()}}}function yi(e,r){isNaN(r)||((Me.assetsIndex[e]??={})[r]=1,nn())}var cf,ff,Me,Nr,nn,kt=h(()=>{"use strict";s();l();te();hr();gi();hi();cf=52,ff="__felocord_metro_cache_key__",Me=null,Nr=window.__getMetroCache=()=>Me;nn=di(()=>{Ir.setItem(ff,JSON.stringify(Me))},1e3)});var ga={};F(ga,{Flux:()=>Os,FluxDispatcher:()=>Er,NavigationNative:()=>ce,React:()=>ln,ReactNative:()=>pa,assets:()=>Is,channels:()=>an,clipboard:()=>Qe,commands:()=>Yt,constants:()=>xt,i18n:()=>St,invites:()=>Ls,messageUtil:()=>fr,navigation:()=>Ps,navigationStack:()=>Ns,semver:()=>Eo,toasts:()=>sn,tokens:()=>Wt,url:()=>Et});var xt,an,St,Et,Qe,Is,Ls,Yt,Ps,sn,fr,Ns,ce,Wt,Eo,Os,Er,ln,pa,V=h(()=>{"use strict";s();l();Q();xt=C("Fonts","Permissions"),an=C("getVoiceChannelId"),St=C("Messages"),Et=C("openURL","openDeeplink"),Qe=C("setString","getString","hasString"),Is=C("registerAsset"),Ls=C("acceptInviteAndTransitionToInviteChannel"),Yt=C("getBuiltInCommands"),Ps=C("pushLazy"),sn=Bi("modules/toast/native/ToastActionCreators.tsx",!0),fr=C("sendBotMessage"),Ns=C("createStackNavigator"),ce=C("NavigationContainer"),Wt=C("colors","unsafe_rawColors"),Eo=C("parse","clean"),Os=C("connectStores"),Er=B("_interceptors"),ln=window.React=C("createElement"),pa=window.ReactNative=C("AppRegistry")});var Ds=Rr((ly,df)=>{s();l();df.exports=ht().moment});function gf({locale:e}){try{pf.default.locale(e.toLowerCase())}catch(r){Ne.error("Failed to fix timestamps...",r)}Er.unsubscribe("I18N_LOAD_SUCCESS",gf)}var pf,hf,vf=h(()=>{"use strict";s();l();Kr();V();pf=k(Ds());hf=()=>{Er.subscribe("I18N_LOAD_SUCCESS",gf)}});var yf,_f=h(()=>{yf={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}?",ASSET_BROWSER:"Asset Browser",BRAND:"Brand",BUNNY:"Felocord",BUNNY_URL:"Felocord URL",BYTECODE:"Bytecode",CANCEL:"Cancel",CLEAR:"Clear",CLEAR_DATA:"Clear data",CLEAR_DATA_FAILED:"Failed to clear data for {name}!",CLEAR_DATA_SUCCESSFUL:"Cleared data for {name}.",CODENAME:"Codename",COMMAND_DEBUG_DESC:"Send Felocord 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.",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",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 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 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 Felocord from a custom endpoint.",LOAD_REACT_DEVTOOLS:"Load React DevTools",LOADER:"Loader",MACHINE_ID:"Machine ID",MANUFACTURER:"Manufacturer",MESSAGE:"Message",MISCELLANEOUS:"Miscellaneous",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 staffs. 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:"Reload Discord",RELOAD_IN_NORMAL_MODE:"Reload in Normal Mode",RELOAD_IN_NORMAL_MODE_DESC:"This will reload Discord normally",RELOAD_IN_SAFE_MODE:"Reload in Safe Mode",RELOAD_IN_SAFE_MODE_DESC:"This will 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. We are not responsible for what you do with this feature.",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://example.com",VERSION:"Version",VERSIONS:"Versions"}});function Ef(){var e=({locale:r})=>{var t={"es-ES":"es","es-419":"es_419","zh-TW":"zh-Hant","zh-CN":"zh-Hans","pt-PT":"pt","pt-BR":"pt_BR","sv-SE":"sv"},o=xf=t[r]??r;if(o.startsWith("en-")){bo=null;return}Sf.has(o)?bo=o:(Sf.add(o),fetch(`https://raw.githubusercontent.com/felitendo/i18n/main/resources/${o}/felocord.json`).then(n=>n.json()).then(n=>Fs[o]=n).then(()=>o===xf&&(bo=o)).catch(n=>console.error(`An error occured while fetching strings for ${o}: ${n}`)))};return Er.subscribe("I18N_LOAD_SUCCESS",e),()=>Er.unsubscribe("I18N_LOAD_SUCCESS",e)}function er(e,r){var t=u[e];return new zd(t).format(r)}var zd,bo,xf,Sf,Fs,u,fe=h(()=>{"use strict";s();l();V();Q();_f();zd=Re("MessageFormat"),bo=null,xf=null,Sf=new Set,Fs={},u=new Proxy({},{get:(e,r)=>bo&&Fs[bo]?.[r]?Fs[bo]?.[r]:yf[r]})});var ha,bf=h(()=>{ha="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAABoBJREFUeF7lW1nIVlUUXasom80kijJKaVQzGtTUjCJteNBmeqigssnIpDIqwmw0GqhQi4iw8SEaHtKgMpNKM7SiyUZpLppoTi0rd2f9nCu36/2+79zxv/5t8MV/n333WWefffb0EQ0iM+sH4AEAowG8CGAqycVVqsgqhWeVbWavAtg/tu4vABNIPphVVih/YwAws2EAlrRQfChJgVM6NQmARwGc0GKHX5PcofTdA2gSAJ8A2KXNJueQPLpsEJoEwI8A+rTZ4GrnIAeQ/KpMEJoEwCoAm3TY3DKSezcKADPbCMDWADYEIK/9B4CVJC2LomYWwv8PgC1JCqxSqJAFmNlOAF6PAfA3ACn3MYBLSD4bqmUgABI3l+T4ULmd+IoCcDeAs9p8RI5NPDNJrminTAYAZAVbkJSlFaaiALwJYEiAFh8CuJHk7Fa8ZqaNbRAgSyzjSc4N5G3LVhQAmfiYDIosBXAGyXeSa8xMJ9orUNb7AAZm9TNpsosCMNnd/9sDlY7Y/gRwAYDZJOUzusjMfvK+JFRcX5J6OgtRUQB2B/BBDg3k8ZeQHBED4AsASoZCaTTJRaHMrfiKAqD1jwM4NqcinwE4mOTnZiYgBWgozSN5RChzJQB40x0A4KMCivwO4GQAFwI4JIMcRYa9i74GhSwgZr5XuWs8LYPyaazPAMh6ojvLeop8tywA5L0V/FSSsbXZ4Eh3DV7udgD8VdgMwK8+JC6iU5a115GcmmVBkrcUC4hdhYPcPX6+RhAWkDysMQB4SzgXwB0Zoroi+q8iKcvLTaVaQMwSZgGYWBMIfUj+nBeBSgDwljADwHk1XIdCL0FlAMRAOL/i0tsgku82zgI8AMruLgNwfV4FA9btQ/KtAL5UlkotIOYTjgdwr6o5eRVts244SWWZuagWALw1DFUGCGBwLk1bLxpG8pW8MmsDwIPQ25W+7wNwTF6FU9bJ2U7L+xLUCkDsSij5keLblASEagmjSL6XVV63AOCtQSVw3d2yytxr3JN7LUklZsHUnQAMcnUE1RRVTi+TXgIwjqSsoiN1CwBmtqvzA28A2LyjhvkYlCKr9vhcp+W1A2BmewB4AcB2nZQr+Hc1aaaQlK9pSbUC4E9eLfCynF8IRoo/JpJUMXYdqgUAM9N3RgFYGKJxDh71FK5WAwbAvgAeShRnPgWwZxoIdQFwEwCV0DfOsbmQJWPi993MZGGqMsdT5e9VdE3GC5UCYGY69ehUQjaSh0dv/5B4j0FCXJ8hrWexHMAIkj9EH6oEADNTZUjNj+MqeOaSIM0nOTb5n2amStH8FEQVNh8eWcJaAHybe7gfU9kLgEzmbd/91VCCujArXdd3hdA2M73fKobKzDTYIK+uRsel7tT75jnKnGvUUtuWpMrra8nMNG12aguZatjKMa7pAsDMtnK9tkdylKVz6lz6snsATFKPwB+M+gtppx//sBoyCyMAkuNppWtYg0CVxeT4tvfPbKcI8zHXpD2RZnaOW3RXDQo27ROrSfYSAGowylv/30iR4qYCQBFSVe9zk0Fd5GKH0QJAPfpO96XJG8mjmyJHOcHFAuA1APvlkbIerzmN5P3SXwBc7IaOblmPN5NVdaXK/RUDRACoTqcOq4KfptA37l1XuKpma0QKrlQ/2LEEJY8i+XQXAD4Q6u+uwZwKKrbtdNWYjMboNDClf0qTl+ktb5W6RsLMbDc/naZK80Cvt/YQSvruYJIr46GwanQTAJzph5Y1/Vk2aVZQCck8xR4kpUgpZGYCQDHNOK9/p6bpRSRvS02GzEx1tZGlaAbopH8DcDnJO0uS2VaMmWnzk1xz9hrXldIob9o+ldf0W+cPZiafkLvbmtDsSY3MytQ7mXUVwJiZrFozTKoK6QcZSVrXAszsSABPFVRIs4MzyjTxgvoo4TsAwCm+Yy2rEC1PswC9CAfm+KBMSsWPW0l+l2N9LUt8UfYKf8Vn/gcAM9MT82VGTeTYngBwdqeB6Ixya2FPAnCSKx4+HPhlBRJ6vsaS/DZwTePYkgCozx7SqpJXl69YmqzFNW6HHRSKxwGhc79XApgV2npqOiBxAE73/ftWOquRqbJT7mGEJoIRhcIaZVGjMm14QT+BucHVDKa7oUSlkT2KIgAUT6/zIwbXYFTmpLxZU909kiIAprhM6+bEDqf7Hy93pY09lSIAFriO7aF+k7/4aYs0i+hxOEQAqIGgNrJ+iDS5p3j4kNP6F9f7+CyBdXonAAAAAElFTkSuQmCC"});function Af(e){var r=Ai(e[0]);return r&&(e[0]=r()),e}var Tf,Mr,i,T,q=h(()=>{"use strict";s();l();we();Q();Tf=C("jsx","jsxs","Fragment");Mr=Symbol.for("react.fragment"),i=(...e)=>Tf.jsx(...Af(e)),T=(...e)=>Tf.jsxs(...Af(e))});var Yd,Br,Se,va,_a,ya,xa,Kt,ie,Oy,Be,Dy,Fy,A,My,By,De,Xt,wf,Uy,jy,Rf,Cf,ky,br,Hy,pe,Ve,Gy,Vy,zy,$y,If,Sa,Lf,Wd,X,Ms,Yy,Wy,Ky,Xy,qy,Jy,Zy,Qy,Pf,ex,Nf,Of,rx,tx,ox,nx,Zr,Bs,ax,ix,sx,lx,cx,fx,To,ux,Ea,oe=h(()=>{"use strict";s();l();we();Jn();uo();Q();Yd=ir(([e],r)=>r[e]&&Object.keys(r).length===1,e=>`felocord.metro.common.components.bySingularProp(${e})`),Br=e=>ye(()=>Ae(Yd(e))?.[e]),Se=e=>ye(()=>B(e)[e]),va=Ni("FluxContainer(Alert)"),_a=C("Looks","Colors","Sizes"),ya=Re("HelpMessage"),xa=ye(()=>B("useSafeAreaInsets").SafeAreaView),Kt=Se("ActionSheetRow"),ie=Br("Button"),Oy=Se("TwinButtons"),Be=Br("IconButton"),Dy=Se("RowButton"),Fy=Se("PressableScale"),A=Se("TableRow"),My=Se("TableRowIcon"),By=Se("TableRowTrailingText"),De=Se("TableRowGroup"),Xt=Se("TableSwitchRow"),wf=Br("FormSwitch"),Uy=Br("FormRadio"),jy=Br("FormCheckbox"),Rf=Br("FormSwitch"),Cf=Br("FormRadio"),ky=Br("FormCheckbox"),br=Se("Card"),Hy=ye(()=>B("RedesignCompat").RedesignCompat),pe=Se("Stack"),Ve=Br("TextInput"),Gy=Se("SegmentedControl"),Vy=Se("SegmentedControlPages"),zy=Br("useSegmentedControlState"),$y=Se("CompatSegmentedControl"),If=Se("FloatingActionButton"),Sa=Se("ActionSheet"),Lf=Se("BottomSheetTitleHeader"),Wd=C("Text","LegacyText"),X=ye(()=>Wd.Text),Ms=C("Form","FormSection"),{Form:Yy,FormArrow:Wy,FormCTA:Ky,FormCTAButton:Xy,FormCardSection:qy,FormCheckbox:Jy,FormCheckboxRow:Zy,FormCheckmark:Qy,FormDivider:Pf,FormHint:ex,FormIcon:Nf,FormInput:Of,FormLabel:rx,FormRadio:tx,FormRadioGroup:ox,FormRadioRow:nx,FormRow:Zr,FormSection:Bs,FormSelect:ax,FormSliderRow:ix,FormSubLabel:sx,FormSwitch:lx,FormSwitchRow:cx,FormTernaryCheckBox:fx,FormText:To,FormTitle:ux}=G(()=>Ms),Ea=Se("FlashList")});var ba={};F(ba,{isSemanticColor:()=>js,rawColors:()=>Us,resolveSemanticColor:()=>ks,semanticColors:()=>he});function js(e){return Df.isSemanticColor(e)}function ks(e,r=Xd.theme){return Df.resolveSemanticColor(r,e)}var he,Us,Xd,Df,bt=h(()=>{"use strict";s();l();Ze();V();Q();he=ge?.default?.colors??xt?.ThemeColorMap,Us=ge?.default?.unsafe_rawColors??xt?.Colors,Xd=qo("ThemeStore"),Df=ge.default.meta??=ge.default.internal});var Hs={};F(Hs,{TextStyleSheet:()=>ur,createStyles:()=>Qr,createThemedStyleSheet:()=>qt});function Qr(e){return ye(()=>qd.createStyles(e))}function qt(e){for(var r in e)e[r]=new Proxy(Ff.StyleSheet.flatten(e[r]),{get(t,o,n){var a=Reflect.get(t,o,n);return js(a)?ks(a):a}});return e}var Ff,qd,ur,Ur=h(()=>{"use strict";s();l();we();Q();bt();Ff=k(ae()),qd=C("createStyles"),{TextStyleSheet:ur}=G(()=>B("TextStyleSheet"))});function Tr({selectable:e,style:r,children:t}){return e?Ao.Platform.select({ios:i(Jd,{style:r,children:t}),default:i(Mf,{style:r,children:t,selectable:!0})}):i(Mf,{style:r,children:t})}var Ao,Bf,Jd,Mf,Uf=h(()=>{"use strict";s();l();q();V();bt();Ur();Ao=k(ae()),Bf=Qr({codeBlock:{fontFamily:xt.Fonts.CODE_NORMAL,fontSize:12,textAlignVertical:"center",backgroundColor:he.BACKGROUND_SECONDARY,color:he.TEXT_NORMAL,borderWidth:1,borderRadius:12,borderColor:he.BACKGROUND_TERTIARY,padding:10}}),Jd=({style:e,children:r})=>i(Ao.TextInput,{editable:!1,multiline:!0,style:[Bf().codeBlock,e&&e],value:r}),Mf=({selectable:e,style:r,children:t})=>i(Ao.Text,{selectable:e,style:[Bf().codeBlock,r&&r],children:t})});var Gs,jf,Zd,me,Vs=h(()=>{"use strict";s();l();ui();zn();Kn();xi();mi();q();fe();V();oe();Ar();Ur();Gs=k(ae()),jf=qt({view:{flex:1,flexDirection:"column",margin:10},title:{fontSize:20,textAlign:"center",marginBottom:5}}),me=function(e){"use strict";Yn(r,e);function r(t){Mt(this,r);var o;return o=Vn(this,r,[t]),o.state={hasErr:!1},o}return Ht(r,[{key:"render",value:function(){return this.state.hasErr?T(Gs.ScrollView,{style:jf.view,children:[i(To,{style:jf.title,children:u.UH_OH}),i(Tr,{selectable:!0,style:{marginBottom:5},children:this.state.error.name}),i(Tr,{selectable:!0,style:{marginBottom:5},children:this.state.error.message}),this.state.error.stack&&i(Gs.ScrollView,{style:{maxHeight:420,marginBottom:5},children:i(Tr,{selectable:!0,children:this.state.error.stack})}),i(ie,{size:"md",variant:"destructive",onPress:()=>this.setState({hasErr:!1}),text:u.RETRY})]}):this.props.children}}]),r}(Zd=ln.Component);Xn(me,"getDerivedStateFromError",e=>({hasErr:!0,error:e}))});function Qd(){return i(Ta.Image,{style:{width:16,height:16},source:v("search")})}var Ta,Tt,kf=h(()=>{"use strict";s();l();q();fe();ne();oe();Vs();Ta=k(ae());Tt=({onChangeText:e,placeholder:r,style:t,isRound:o})=>{var[n,a]=React.useState(""),c=f=>{a(f),e?.(f)};return i(me,{children:i(Ta.View,{style:t,children:i(Ve,{grow:!0,isClearable:!0,leadingIcon:Qd,placeholder:r??u.SEARCH,onChange:c,returnKeyType:"search",size:"md",autoCapitalize:"none",autoCorrect:!1,isRound:o,value:n})})})}});function fn({label:e,icon:r,noPadding:t=!1,noAnimation:o=!1,children:n}){var[a,c]=React.useState(!0);return T(Mr,{children:[i(A,{label:e,icon:r&&i(A.Icon,{source:v(r)}),trailing:i(Zr.Arrow,{style:{transform:[{rotate:`${a?180:90}deg`}]}}),onPress:()=>{c(!a),o||cn.LayoutAnimation.configureNext(cn.LayoutAnimation.Presets.easeInEaseOut)}}),!a&&i(Mr,{children:i(cn.View,{style:!t&&{paddingHorizontal:15},children:n})})]})}var cn,Hf=h(()=>{"use strict";s();l();q();ne();oe();cn=k(ae())});var Aa={};F(Aa,{Codeblock:()=>Tr,ErrorBoundary:()=>me,Search:()=>Tt,Summary:()=>fn});var Ar=h(()=>{"use strict";s();l();Uf();Vs();kf();Hf()});function wa(e,r,t,o,n){return y(function*(){if(e)return void e();var a=yield t().then(c=>c.default);typeof o=="string"&&(o={title:o}),r??=ep.getRootNavigationRef(),r.navigate("BUNNY_CUSTOM_PAGE",{...o,render:()=>i(a,{...n})})})}var ep,wo,zs=h(()=>{"use strict";s();l();te();q();V();Q();Ar();ep=C("getRootNavigationRef"),wo=React.memo(()=>{var e=ce.useNavigation(),r=ce.useRoute(),{render:t,...o}=r.params;return React.useEffect(()=>void e.setOptions({...o}),[]),i(me,{children:i(t,{})})})});function rp(){var e=ce.useNavigation();return i(Mr,{children:Object.keys(jr).map(r=>i(Bs,{title:r,children:jr[r].filter(t=>t.usePredicate?.()??!0).map(t=>i(Zr,{label:t.title(),leading:i(Nf,{source:t.icon}),trailing:Zr.Arrow,onPress:wa(t.onPress,e,t.render,t.title())}))},r))})}function Gf(e){e.push(Z("default",Re("getScreens",!1),(t,o)=>({...o,VendettaCustomPage:{title:"Felocord",render:()=>i(wo,{})},BUNNY_CUSTOM_PAGE:{title:"Felocord",render:()=>i(wo,{})}})));var r=Z("default",Re("UserSettingsOverviewWrapper",!1),(t,o)=>{var n=_r(o.props.children,a=>a.type?.name==="UserSettingsOverview");e.push(Z("renderSupportAndAcknowledgements",n.type.prototype,(a,{props:{children:c}})=>{var f=c.findIndex(g=>g?.type?.name==="UploadLogsButton");f!==-1&&c.splice(f,1)})),e.push(Z("render",n.type.prototype,(a,c)=>{var f=[St.Messages.BILLING_SETTINGS,St.Messages.PREMIUM_SETTINGS],g=_r(c.props.children,x=>x?.children?.[1]?.type===Bs)?.children;if(g){var E=g.findIndex(x=>f.includes(x?.props.label));g.splice(-~E||4,0,i(rp,{}))}}))},!0);e.push(r)}var Vf=h(()=>{"use strict";s();l();q();qe();yr();V();oe();Q();Ro();zs()});function op(){var e=!1;return React.useEffect(()=>void(e=!0),[]),e}function zf(e){var r=()=>Object.values(jr).flatMap(n=>n.map(a=>({[a.key]:{type:"pressable",title:a.title,icon:a.icon,usePredicate:a.usePredicate,onPress:wa(a.onPress,null,a.render,a.title()),withArrow:!0,...a.rawTabsConfig}}))).reduce((n,a)=>Object.assign(n,a)),t=Ra.SETTING_RENDERER_CONFIG,o=Ra.SETTING_RENDERER_CONFIG;Object.defineProperty(Ra,"SETTING_RENDERER_CONFIG",{enumerable:!0,configurable:!0,get:()=>({...o,VendettaCustomPage:{type:"route",title:()=>"Felocord",screen:{route:"VendettaCustomPage",getComponent:()=>wo}},BUNNY_CUSTOM_PAGE:{type:"route",title:()=>"Felocord",screen:{route:"BUNNY_CUSTOM_PAGE",getComponent:()=>wo}},...r()}),set:n=>o=n}),e.push(()=>{Object.defineProperty(Ra,"SETTING_RENDERER_CONFIG",{value:t,writable:!0,get:void 0,set:void 0})}),e.push(Z("default",tp,(n,a)=>{if(!op()){var{sections:c}=_r(a,g=>g.props?.sections).props,f=-~c.findIndex(g=>g.label===St.Messages.ACCOUNT_SETTINGS)||1;Object.keys(jr).forEach(g=>{c.splice(f++,0,{label:g,title:g,settings:jr[g].map(E=>E.key)})})}}))}var Ra,tp,$f=h(()=>{"use strict";s();l();qe();yr();V();Q();Ro();zs();Ra=C("SETTING_RENDERER_CONFIG"),tp=Re("SettingsOverviewScreen",!1)});var Ys={};F(Ys,{patchSettings:()=>$s,registerSection:()=>Ca,registeredSections:()=>jr});function Ca(e){return jr[e.name]=e.items,()=>delete jr[e.name]}function $s(){var e=new Array;return Gf(e),zf(e),()=>e.forEach(r=>r())}var jr,Ro=h(()=>{"use strict";s();l();Vf();$f();jr={}});var Ia={};F(Ia,{showToast:()=>j});var np,j,wr=h(()=>{"use strict";s();l();fe();ne();we();V();Q();({uuid4:np}=G(()=>B("uuid4"))),j=(e,r)=>sn.open({key:`vd-toast-${np()}`,content:e,source:r,icon:r});j.showCopyToClipboard=(e=u.COPIED_TO_CLIPBOARD)=>{j(e,v("toast_copy_link"))}});function La({label:e,version:r,icon:t}){return i(A,{label:e,icon:i(A.Icon,{source:v(t)}),trailing:i(To,{children:r}),onPress:()=>{Qe.setString(`${e} - ${r}`),j.showCopyToClipboard()}})}var Yf=h(()=>{"use strict";s();l();q();ne();V();oe();wr()});var Na={};F(Na,{connectToDebugger:()=>dn,getDebugInfo:()=>et,patchLogHook:()=>Ks,socket:()=>mr,toggleSafeMode:()=>mn,versionHash:()=>un});function mn(){return Ws.apply(this,arguments)}function Ws(){return Ws=y(function*(){I.safeMode={...I.safeMode,enabled:!I.safeMode?.enabled},lr()&&(yt()?.id&&(I.safeMode.currentThemeId=yt().id),I.safeMode?.enabled?yield qr(null):I.safeMode?.currentThemeId&&(yield qr(ee[I.safeMode?.currentThemeId]))),setTimeout(Bo.reload,400)}),Ws.apply(this,arguments)}function dn(e){if(mr!==void 0&&mr.readyState!==WebSocket.CLOSED&&mr.close(),!e){j("Invalid debugger URL!",v("Small"));return}mr=new WebSocket(`ws://${e}`),mr.addEventListener("open",()=>j("Connected to debugger.",v("Check"))),mr.addEventListener("message",r=>{try{(0,eval)(r.data)}catch(t){console.error(t)}}),mr.addEventListener("error",r=>{console.log(`Debugger error: ${r.message}`),j("An error occurred with the debugger connection!",v("Small"))})}function Ks(){var e=Z("nativeLoggingHook",globalThis,r=>{mr?.readyState===WebSocket.OPEN&&mr.send(JSON.stringify({message:r[0],level:r[1]})),Ne.log(r[0])});return()=>{mr&&mr.close(),e()}}function et(){var e=window.HermesInternal.getRuntimeProperties(),r=e["OSS Release Version"],t="for RN ",o=Pa.Platform.constants,n=o.reactNativeVersion;return{vendetta:{version:un.split("-")[0],loader:ca()},felocord:{version:un,loader:{name:ca(),version:fs()}},discord:{version:Dt.Version,build:Dt.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"]},...Pa.Platform.select({android:{os:{name:"Android",version:o.Release,sdk:o.Version}},ios:{os:{name:o.systemName,version:o.osVersion}}}),...Pa.Platform.select({android:{device:{manufacturer:o.Manufacturer,brand:o.Brand,model:o.Model,codename:Lr.device}},ios:{device:{manufacturer:Lr.deviceManufacturer,brand:Lr.deviceBrand,model:Lr.deviceModel,codename:Lr.device}}})}}var Pa,mr,un,rt=h(()=>{"use strict";s();l();te();ne();Sr();hr();qe();Ce();Ze();Kr();wr();Pa=k(ae());un="10885c3-main"});function Xs(){var e=et();U(I);var r=[{label:u.BUNNY,version:e.felocord.version,icon:"ic_progress_wrench_24px"},{label:"Discord",version:`${e.discord.version} (${e.discord.build})`,icon:"Discord"},{label:"React",version:e.react.version,icon:"ic_category_16px"},{label:"React Native",version:e.react.nativeVersion,icon:"mobile"},{label:u.BYTECODE,version:e.hermes.bytecodeVersion,icon:"ic_server_security_24px"}],t=[{label:u.LOADER,version:`${e.felocord.loader.name} (${e.felocord.loader.version})`,icon:"ic_download_24px"},{label:u.OPERATING_SYSTEM,version:`${e.os.name} ${e.os.version}`,icon:"ic_cog_24px"},...e.os.sdk?[{label:"SDK",version:e.os.sdk,icon:"pencil"}]:[],{label:u.MANUFACTURER,version:e.device.manufacturer,icon:"ic_badge_staff"},{label:u.BRAND,version:e.device.brand,icon:"ic_settings_boost_24px"},{label:u.MODEL,version:e.device.model,icon:"ic_phonelink_24px"},{label:Oa.Platform.select({android:u.CODENAME,ios:u.MACHINE_ID}),version:e.device.codename,icon:"ic_compose_24px"}];return i(Oa.ScrollView,{style:{flex:1},contentContainerStyle:{paddingBottom:38},children:T(pe,{style:{paddingVertical:24,paddingHorizontal:12},spacing:24,children:[i(De,{title:u.VERSIONS,children:r.map(o=>i(La,{label:o.label,version:o.version,icon:o.icon}))}),i(De,{title:u.PLATFORM,children:t.map(o=>i(La,{label:o.label,version:o.version,icon:o.icon}))})]})})}var Oa,Wf=h(()=>{"use strict";s();l();q();fe();Yf();rt();Ce();le();oe();Oa=k(ae())});var Xf={};F(Xf,{default:()=>Kf});function Kf(){U(I);var e=et(),r=ce.useNavigation();return i(Da.ScrollView,{style:{flex:1},contentContainerStyle:{paddingBottom:38},children:T(pe,{style:{paddingVertical:24,paddingHorizontal:12},spacing:24,children:[T(De,{title:u.INFO,children:[i(A,{label:u.BUNNY,icon:i(A.Icon,{source:{uri:ha}}),trailing:i(A.TrailingText,{text:e.felocord.version})}),i(A,{label:"Discord",icon:i(A.Icon,{source:v("Discord")}),trailing:i(A.TrailingText,{text:`${e.discord.version} (${e.discord.build})`})}),i(A,{arrow:!0,label:u.ABOUT,icon:i(A.Icon,{source:v("CircleInformationIcon-primary")}),trailing:A.Arrow,onPress:()=>r.push("BUNNY_CUSTOM_PAGE",{title:u.ABOUT,render:()=>i(Xs,{})})})]}),T(De,{title:u.LINKS,children:[i(A,{label:u.DISCORD_SERVER,icon:i(A.Icon,{source:v("Discord")}),trailing:A.Arrow,onPress:()=>Et.openDeeplink(ki)}),i(A,{label:u.GITHUB,icon:i(A.Icon,{source:v("img_account_sync_github_white")}),trailing:A.Arrow,onPress:()=>Et.openURL(Hi)})]}),T(De,{title:u.ACTIONS,children:[i(A,{label:u.RELOAD_DISCORD,icon:i(A.Icon,{source:v("ic_message_retry")}),onPress:()=>Da.NativeModules.BundleUpdaterManager.reload()}),i(A,{label:I.safeMode?.enabled?u.RELOAD_IN_NORMAL_MODE:u.RELOAD_IN_SAFE_MODE,subLabel:I.safeMode?.enabled?u.RELOAD_IN_NORMAL_MODE_DESC:u.RELOAD_IN_SAFE_MODE_DESC,icon:i(A.Icon,{source:v("ic_privacy_24px")}),onPress:mn}),i(Xt,{label:u.DEVELOPER_SETTINGS,icon:i(A.Icon,{source:v("ic_progress_wrench_24px")}),value:I.developerSettings,onValueChange:t=>{I.developerSettings=t}})]}),i(De,{title:u.MISCELLANEOUS,children:i(Xt,{label:u.SETTINGS_ACTIVATE_DISCORD_EXPERIMENTS,subLabel:u.SETTINGS_ACTIVATE_DISCORD_EXPERIMENTS_DESC,icon:i(A.Icon,{source:v("ic_progress_wrench_24px")}),value:I.enableDiscordDeveloperSettings,onValueChange:t=>{I.enableDiscordDeveloperSettings=t}})})]})})}var Da,qf=h(()=>{"use strict";s();l();q();fe();qs();Wf();ne();rt();Ce();le();vt();V();oe();Da=k(ae())});function Js(e){var r;try{r=new URL(e)}catch{return!1}return r.protocol==="http:"||r.protocol==="https:"}var Jf=h(()=>{"use strict";s();l()});var Fa={};F(Fa,{common:()=>ga,factories:()=>$o,filters:()=>Ei,findAllExports:()=>gt,findAllModule:()=>Ti,findAllModuleId:()=>dd,findByDisplayName:()=>Pi,findByDisplayNameAll:()=>Oi,findByDisplayNameLazy:()=>Ni,findByFilePath:()=>yd,findByFilePathLazy:()=>Bi,findByName:()=>oa,findByNameAll:()=>Li,findByNameLazy:()=>Re,findByProps:()=>B,findByPropsAll:()=>Ii,findByPropsLazy:()=>C,findByStoreName:()=>Mi,findByStoreNameLazy:()=>qo,findByTypeName:()=>Di,findByTypeNameAll:()=>Fi,findByTypeNameLazy:()=>_d,findExports:()=>Ae,findModule:()=>bi,findModuleId:()=>md,lazy:()=>Ri});var Co=h(()=>{"use strict";s();l();V();Jn();Ko();uo();Xo();Q()});var Qf=Rr((Zf,Ma)=>{s();l();ui();zn();Kn();mi();xc();((e,r)=>{typeof define=="function"&&define.amd?define([],r):typeof Ma=="object"&&Ma.exports?Ma.exports=r():e.fuzzysort=r()})(Zf,e=>{"use strict";var r=(_,p)=>{if(!_||!p)return _e;var S=be(_);It(p)||(p=ue(p));var w=S.bitflags;return(w&p._bitflags)!==w?_e:st(S,p)},t=(_,p,S)=>{if(!_)return S?.all?Gr(p,S):ai;var w=be(_),L=w.bitflags,R=w.containsSpace,b=x(S?.threshold||0),D=S?.limit||ni,P=0,z=0,H=p.length;function Ue(Nt){P<D?(jn.add(Nt),++P):(++z,Nt._score>jn.peek()._score&&jn.replaceTop(Nt))}if(S?.key)for(var Le=S.key,$=0;$<H;++$){var Fe=p[$],W=Un(Fe,Le);if(W&&(It(W)||(W=ue(W)),(L&W._bitflags)===L)){var K=st(w,W);K!==_e&&(K._score<b||(K.obj=Fe,Ue(K)))}}else if(S?.keys){var $r=S.keys,gr=$r.length;e:for(var $=0;$<H;++$){var Fe=p[$];{for(var Te=0,se=0;se<gr;++se){var Le=$r[se],W=Un(Fe,Le);if(!W){oi[se]=Fo;continue}It(W)||(W=ue(W)),oi[se]=W,Te|=W._bitflags}if((L&Te)!==L)continue}if(R)for(var Ye=0;Ye<w.spaceSearches.length;Ye++)zr[Ye]=$e;for(var se=0;se<gr;++se){if(W=oi[se],W===Fo){lo[se]=Fo;continue}if(lo[se]=st(w,W,!1,R),lo[se]===_e){lo[se]=Fo;continue}if(R)for(var N=0;N<w.spaceSearches.length;N++){if(Ct[N]>-1e3&&zr[N]>$e){var We=(zr[N]+Ct[N])/4;We>zr[N]&&(zr[N]=We)}Ct[N]>zr[N]&&(zr[N]=Ct[N])}}if(R){for(var or=0;or<w.spaceSearches.length;or++)if(zr[or]===$e)continue e}else{for(var Lt=!1,Pt=0;Pt<gr;Pt++)if(lo[Pt]._score!==$e){Lt=!0;break}if(!Lt)continue}for(var nr=new f(gr),Ke=0;Ke<gr;Ke++)nr[Ke]=lo[Ke];if(R)for(var J=0,co=0;co<w.spaceSearches.length;co++)J+=zr[co];else for(var J=$e,Xe=0;Xe<gr;Xe++){var K=nr[Xe];if(K._score>-1e3&&J>$e){var We=(J+K._score)/4;We>J&&(J=We)}K._score>J&&(J=K._score)}if(nr.obj=Fe,nr._score=J,S?.scoreFn){if(J=S.scoreFn(nr),!J)continue;J=x(J),nr._score=J}J<b||Ue(nr)}}else for(var $=0;$<H;++$){var W=p[$];if(W&&(It(W)||(W=ue(W)),(L&W._bitflags)===L)){var K=st(w,W);K!==_e&&(K._score<b||Ue(K))}}if(P===0)return ai;for(var Mo=new Array(P),$=P-1;$>=0;--$)Mo[$]=jn.poll();return Mo.total=P+z,Mo},o=(_,p="<b>",S="</b>")=>{for(var w=typeof p=="function"?p:void 0,L=_.target,R=L.length,b=_.indexes,D="",P=0,z=0,H=!1,Ue=[],Le=0;Le<R;++Le){var $=L[Le];if(b[z]===Le){if(++z,H||(H=!0,w?(Ue.push(D),D=""):D+=p),z===b.length){w?(D+=$,Ue.push(w(D,P++)),D="",Ue.push(L.substr(Le+1))):D+=$+S+L.substr(Le+1);break}}else H&&(H=!1,w?(Ue.push(w(D,P++)),D=""):D+=S);D+=$}return w?Ue:D},n=_=>{typeof _=="number"?_=""+_:typeof _!="string"&&(_="");var p=ei(_);return g(_,{_targetLower:p._lower,_targetLowerCodes:p.lowerCodes,_bitflags:p.bitflags})},a=()=>{ri.clear(),ti.clear()},c=function(){function _(){Mt(this,_)}return Ht(_,[{key:"indexes",get:function(){return this._indexes.slice(0,this._indexes.len).sort((S,w)=>S-w)}},{key:"indexes",set:function(S){return this._indexes=S}},{key:"highlight",value:function(S,w){return o(this,S,w)}},{key:"score",get:function(){return E(this._score)}},{key:"score",set:function(S){this._score=x(S)}}]),_}(),f=function(_){Yn(p,_);function p(){return Mt(this,p),Vn(this,p,arguments)}return Ht(p,[{key:"score",get:function(){return E(this._score)}},{key:"score",set:function(w){this._score=x(w)}}]),p}(Wn(Array)),g=(_,p)=>{var S=new c;return S.target=_,S.obj=p.obj??_e,S._score=p._score??$e,S._indexes=p._indexes??[],S._targetLower=p._targetLower??"",S._targetLowerCodes=p._targetLowerCodes??_e,S._nextBeginningIndexes=p._nextBeginningIndexes??_e,S._bitflags=p._bitflags??0,S},E=_=>_===$e?0:_>1?_:Math.E**(((-_+1)**.04307-1)*-2),x=_=>_===0?$e:_>1?_:1-Math.pow(Math.log(_)/-2+1,1/.04307),O=_=>{typeof _=="number"?_=""+_:typeof _!="string"&&(_=""),_=_.trim();var p=ei(_),S=[];if(p.containsSpace){var w=_.split(/\s+/);w=[...new Set(w)];for(var L=0;L<w.length;L++)if(w[L]!==""){var R=ei(w[L]);S.push({lowerCodes:R.lowerCodes,_lower:w[L].toLowerCase(),containsSpace:!1})}}return{lowerCodes:p.lowerCodes,_lower:p._lower,containsSpace:p.containsSpace,bitflags:p.bitflags,spaceSearches:S}},ue=_=>{if(_.length>999)return n(_);var p=ri.get(_);return p!==void 0||(p=n(_),ri.set(_,p)),p},be=_=>{if(_.length>999)return O(_);var p=ti.get(_);return p!==void 0||(p=O(_),ti.set(_,p)),p},Gr=(_,p)=>{var S=[];S.total=_.length;var w=p?.limit||ni;if(p?.key)for(var L=0;L<_.length;L++){var R=_[L],b=Un(R,p.key);if(b!=_e){It(b)||(b=ue(b));var D=g(b.target,{_score:b._score,obj:R});if(S.push(D),S.length>=w)return S}}else if(p?.keys)for(var L=0;L<_.length;L++){for(var R=_[L],P=new f(p.keys.length),z=p.keys.length-1;z>=0;--z){var b=Un(R,p.keys[z]);if(!b){P[z]=Fo;continue}It(b)||(b=ue(b)),b._score=$e,b._indexes.len=0,P[z]=b}if(P.obj=R,P._score=$e,S.push(P),S.length>=w)return S}else for(var L=0;L<_.length;L++){var b=_[L];if(b!=_e&&(It(b)||(b=ue(b)),b._score=$e,b._indexes.len=0,S.push(b),S.length>=w))return S}return S},st=(_,p,S=!1,w=!1)=>{if(S===!1&&_.containsSpace)return Um(_,p,w);for(var L=_._lower,R=_.lowerCodes,b=R[0],D=p._targetLowerCodes,P=R.length,z=D.length,$=0,H=0,Ue=0;;){var Le=b===D[H];if(Le){if(Vr[Ue++]=H,++$,$===P)break;b=R[$]}if(++H,H>=z)return _e}var $=0,Fe=!1,W=0,K=p._nextBeginningIndexes;K===_e&&(K=p._nextBeginningIndexes=km(p.target)),H=Vr[0]===0?0:K[Vr[0]-1];var $r=0;if(H!==z)for(;;)if(H>=z){if($<=0||(++$r,$r>200))break;--$;var gr=Mn[--W];H=K[gr]}else{var Le=R[$]===D[H];if(Le){if(Mn[W++]=H,++$,$===P){Fe=!0;break}++H}else H=K[H]}var Te=P<=1?-1:p._targetLower.indexOf(L,Vr[0]),se=!!~Te,Ye=se?Te===0||p._nextBeginningIndexes[Te-1]===Te:!1;if(se&&!Ye){for(var N=0;N<K.length;N=K[N])if(!(N<=Te)){for(var We=0;We<P&&R[We]===p._targetLowerCodes[N+We];We++);if(We===P){Te=N,Ye=!0;break}}}var or=Ke=>{for(var J=0,co=0,Xe=1;Xe<P;++Xe)Ke[Xe]-Ke[Xe-1]!==1&&(J-=Ke[Xe],++co);var Mo=Ke[P-1]-Ke[0]-(P-1);if(J-=(12+Mo)*co,Ke[0]!==0&&(J-=Ke[0]*Ke[0]*.2),!Fe)J*=1e3;else{for(var Nt=1,Xe=K[0];Xe<z;Xe=K[Xe])++Nt;Nt>24&&(J*=(Nt-24)*10)}return J-=(z-P)/2,se&&(J/=1+P*P*1),Ye&&(J/=1+P*P*1),J-=(z-P)/2,J};if(Fe)if(Ye){for(var N=0;N<P;++N)Vr[N]=Te+N;var Lt=Vr,Pt=or(Vr)}else var Lt=Mn,Pt=or(Mn);else{if(se)for(var N=0;N<P;++N)Vr[N]=Te+N;var Lt=Vr,Pt=or(Lt)}p._score=Pt;for(var N=0;N<P;++N)p._indexes[N]=Lt[N];p._indexes.len=P;var nr=new c;return nr.target=p.target,nr._score=p._score,nr._indexes=p._indexes,nr},Um=(_,p,S)=>{for(var w=new Set,L=0,R=_e,b=0,D=_.spaceSearches,P=D.length,z=0,H=()=>{for(var or=z-1;or>=0;or--)p._nextBeginningIndexes[Bn[or*2+0]]=Bn[or*2+1]},Ue=!1,N=0;N<P;++N){Ct[N]=$e;var Le=D[N];if(R=st(Le,p),S){if(R===_e)continue;Ue=!0}else if(R===_e)return H(),_e;var $=N===P-1;if(!$){for(var Fe=R._indexes,W=!0,K=0;K<Fe.len-1;K++)if(Fe[K+1]-Fe[K]!==1){W=!1;break}if(W)for(var $r=Fe[Fe.len-1]+1,gr=p._nextBeginningIndexes[$r-1],Te=$r-1;Te>=0&&gr===p._nextBeginningIndexes[Te];Te--)p._nextBeginningIndexes[Te]=$r,Bn[z*2+0]=Te,Bn[z*2+1]=gr,z++}L+=R._score/P,Ct[N]=R._score/P,R._indexes[0]<b&&(L-=(b-R._indexes[0])*2),b=R._indexes[0];for(var se=0;se<R._indexes.len;++se)w.add(R._indexes[se])}if(S&&!Ue)return _e;H();var Ye=st(_,p,!0);if(Ye!==_e&&Ye._score>L){if(S)for(var N=0;N<P;++N)Ct[N]=Ye._score/P;return Ye}S&&(R=p),R._score=L;var N=0;for(var We of w)R._indexes[N++]=We;return R._indexes.len=N,R},ei=_=>{for(var p=_.length,S=_.toLowerCase(),w=[],L=0,R=!1,b=0;b<p;++b){var D=w[b]=S.charCodeAt(b);if(D===32){R=!0;continue}var P=D>=97&&D<=122?D-97:D>=48&&D<=57?26:D<=127?30:31;L|=1<<P}return{lowerCodes:w,bitflags:L,containsSpace:R,_lower:S}},jm=_=>{for(var p=_.length,S=[],w=0,L=!1,R=!1,b=0;b<p;++b){var D=_.charCodeAt(b),P=D>=65&&D<=90,z=P||D>=97&&D<=122||D>=48&&D<=57,H=P&&!L||!R||!z;L=P,R=z,H&&(S[w++]=b)}return S},km=_=>{for(var p=_.length,S=jm(_),w=[],L=S[0],R=0,b=0;b<p;++b)L>b?w[b]=L:(L=S[++R],w[b]=L===void 0?p:L);return w},ri=new Map,ti=new Map,Vr=[],Mn=[],Bn=[],zr=[],Ct=[],oi=[],lo=[],Un=(_,p)=>{var S=_[p];if(S!==void 0)return S;if(typeof p=="function")return p(_);var w=p;Array.isArray(p)||(w=p.split("."));for(var L=w.length,R=-1;_&&++R<L;)_=_[w[R]];return _},It=_=>typeof _=="object"&&typeof _._bitflags=="number",ni=1/0,$e=-ni,ai=[];ai.total=0;var _e=null,Fo=n(""),Hm=_=>{var p=[],S=0,w={},L=R=>{for(var b=0,D=p[b],P=1;P<S;){var z=P+1;b=P,z<S&&p[z]._score<p[P]._score&&(b=z),p[b-1>>1]=p[b],P=1+(b<<1)}for(var H=b-1>>1;b>0&&D._score<p[H]._score;H=(b=H)-1>>1)p[b]=p[H];p[b]=D};return w.add=R=>{var b=S;p[S++]=R;for(var D=b-1>>1;b>0&&R._score<p[D]._score;D=(b=D)-1>>1)p[b]=p[D];p[b]=R},w.poll=R=>{if(S!==0){var b=p[0];return p[0]=p[--S],L(),b}},w.peek=R=>{if(S!==0)return p[0]},w.replaceTop=R=>{p[0]=R,L()},w},jn=Hm();return{single:r,go:t,prepare:n,cleanup:a}})});var Jt=Rr((ZE,eu)=>{s();l();eu.exports=ht().react});function up(e){var[r,t]=React.useState(""),[o,n]=React.useState(""),[a,c]=React.useState(!1);function f(){c(!0),e.fetchFn(r).then(()=>lp("AddonInputAlert")).catch(g=>g instanceof Error?n(g.message):String(g)).finally(()=>c(!1))}return i(cp,{title:e.label,content:"Type in the source URL you want to install from:",extraContent:T(pe,{style:{marginTop:-12},children:[i(Ve,{autoFocus:!0,isClearable:!0,value:r,onChange:g=>{t(g),o&&n("")},returnKeyType:"done",onSubmitEditing:f,state:o?"error":void 0,errorMessage:o||void 0}),i(rr.ScrollView,{horizontal:!0,showsHorizontalScrollIndicator:!1,style:{gap:8},children:i(ie,{size:"sm",variant:"tertiary",text:"Import from clipboard",icon:v("ClipboardListIcon"),onPress:()=>Qe.getString().then(g=>t(g))})})]}),actions:T(pe,{children:[i(ie,{loading:a,text:"Install",variant:"primary",disabled:!r||!Js(r),onPress:f}),i(fp,{disabled:a,text:"Cancel",variant:"secondary"})]})})}function Zt({CardComponent:e,...r}){U(I);var[t,o]=React.useState(""),[n,a]=React.useState(()=>null),c=(0,Ba.useMemo)(()=>{var E=r.items;r.resolveItem&&(E=E.map(r.resolveItem));var x=E.filter(O=>O&&typeof O=="object");return!t&&n&&x.sort(n),ru.default.go(t,x,{keys:r.searchKeywords,all:!0})},[r.items,n,t]),f=(0,Ba.useCallback)(()=>{if(!r.installAction)return()=>{};var{label:E,onPress:x,fetchFn:O}=r.installAction;O?sp("AddonInputAlert",i(up,{label:E??"Install",fetchFn:O})):x?.()},[]);if(c.length===0&&!t)return T(rr.View,{style:{gap:32,flexGrow:1,justifyContent:"center",alignItems:"center"},children:[T(rr.View,{style:{gap:8,alignItems:"center"},children:[i(rr.Image,{source:v("empty_quick_switcher")}),i(X,{variant:"text-lg/semibold",color:"text-normal",children:"Oops! Nothing to see here\u2026 yet!"})]}),i(ie,{size:"lg",icon:v("DownloadIcon"),text:r.installAction?.label??"Install",onPress:f})]});var g=T(rr.View,{style:{paddingBottom:8},children:[I.safeMode?.enabled&&T(rr.View,{style:{marginBottom:10},children:[i(ya,{messageType:0,children:r.safeModeHint?.message}),r.safeModeHint?.footer]}),T(rr.View,{style:{flexDirection:"row",gap:8},children:[i(Tt,{style:{flexGrow:1},isRound:!!r.sortOptions,onChangeText:E=>o(E)}),r.sortOptions&&i(Be,{icon:v("ic_forum_channel_sort_order_24px"),variant:"tertiary",disabled:!!t,onPress:()=>ap({key:"AddonListSortOptions",header:{title:"Sort Options",onClose:()=>ip("AddonListSortOptions")},options:Object.entries(r.sortOptions).map(([E,x])=>({label:E,onPress:()=>a(()=>x)}))})})]}),r.ListHeaderComponent&&i(r.ListHeaderComponent,{})]});return T(me,{children:[i(Ea,{data:c,extraData:t,estimatedItemSize:136,ListHeaderComponent:g,ListEmptyComponent:()=>T(rr.View,{style:{gap:12,padding:12,alignItems:"center"},children:[i(rr.Image,{source:v("devices_not_found")}),i(X,{variant:"text-lg/semibold",color:"text-normal",children:"Hmmm... could not find that!"})]}),contentContainerStyle:{padding:8,paddingHorizontal:12},ItemSeparatorComponent:()=>i(rr.View,{style:{height:8}}),ListFooterComponent:r.ListFooterComponent,renderItem:({item:E})=>i(e,{item:E.obj,result:E})}),r.installAction&&i(If,{icon:v("PlusLargeIcon"),onPress:f})]})}var ru,Ba,rr,ap,ip,sp,lp,cp,fp,Ua=h(()=>{"use strict";s();l();q();ne();Ce();le();Jf();we();Co();V();oe();Ar();ru=k(Qf()),Ba=k(Jt()),rr=k(ae()),{showSimpleActionSheet:ap,hideActionSheet:ip}=G(()=>B("showSimpleActionSheet")),{openAlert:sp,dismissAlert:lp}=G(()=>B("openAlert","dismissAlert")),{AlertModal:cp,AlertActionButton:fp}=G(()=>B("AlertModal","AlertActions"))});var tu,ou=h(()=>{"use strict";s();l();V();Ur();tu=Qr({smallIcon:{tintColor:Wt.colors.LOGO_PRIMARY,height:18,width:18}})});function au(e,r,t){nu.openLazy(r,e,t??{})}function pn(e){nu.hideActionSheet(e)}var nu,Zs=h(()=>{"use strict";s();l();Q();nu=C("openLazy","hideActionSheet")});function Qs(){return(0,iu.default)(Wt.unsafe_rawColors.YELLOW_300).alpha(.3).hex()}function mp(){var e=tu(),{plugin:r,result:t}=ja(),o=t[0].highlight((c,f)=>i(X,{style:{backgroundColor:Qs()},children:c},f)),n=r.icon&&v(r.icon),a=i(X,{numberOfLines:1,variant:"heading-lg/semibold",children:o.length?o:r.name});return T(At.View,{style:{flexDirection:"row",alignItems:"center",gap:6},children:[n&&i(At.Image,{style:e.smallIcon,source:n}),a]})}function dp(){var{plugin:e,result:r}=ja();if(!e.authors)return null;var t=r[2].highlight((a,c)=>i(X,{style:{backgroundColor:Qs()},children:a},c));if(t.length>0)return T(X,{variant:"text-md/semibold",color:"text-muted",children:["by ",t]});var o=["by "];for(var n of e.authors)o.push(typeof n=="string"?n:n.name),o.push(", ");return o.pop(),i(X,{variant:"text-md/semibold",color:"text-muted",children:o})}function pp(){var{plugin:e,result:r}=ja(),t=r[1].highlight((o,n)=>i(X,{style:{backgroundColor:Qs()},children:o},n));return i(X,{variant:"text-md/medium",children:t.length?t:e.description})}function el({result:e,item:r}){r.usePluginState();var[,t]=React.useReducer(()=>({}),0),o=(0,wt.useMemo)(()=>({plugin:r,result:e}),[r,e]);return i(su.Provider,{value:o,children:i(br,{children:T(pe,{spacing:16,children:[T(At.View,{style:{flexDirection:"row",justifyContent:"space-between"},children:[T(At.View,{style:{flexShrink:1},children:[i(mp,{}),i(dp,{})]}),i(At.View,{children:T(pe,{spacing:12,direction:"horizontal",children:[i(gp,{}),i(wf,{value:r.isEnabled(),onValueChange:n=>{r.toggle(n),t()}})]})})]}),i(pp,{})]})})})}var iu,wt,At,su,ja,gp,lu=h(()=>{"use strict";s();l();q();ou();ne();V();oe();Zs();iu=k(ia()),wt=k(Jt()),At=k(ae()),su=(0,wt.createContext)(null),ja=()=>(0,wt.useContext)(su);gp=(0,wt.memo)(()=>{var{plugin:e}=ja(),r=ce.useNavigation();return T(At.View,{style:{flexDirection:"row",gap:6},children:[i(Be,{size:"sm",variant:"secondary",icon:v("WrenchIcon"),disabled:!e.getPluginSettingsComponent(),onPress:()=>r.push("BUNNY_CUSTOM_PAGE",{title:e.name,render:e.getPluginSettingsComponent()})}),i(Be,{size:"sm",variant:"secondary",icon:v("CircleInformationIcon-primary"),onPress:()=>void au("PluginInfoActionSheet",e.resolveSheetComponent(),{plugin:e,navigation:r})})]})})});var ze,Qt,M,tt=h(()=>{"use strict";s();l();te();Ce();le();yr();vt();Kr();ze=sr(ke(Je("VENDETTA_PLUGINS"))),Qt={},M={plugins:ze,pluginFetch(e){return y(function*(){return e.startsWith(vr)&&(e=e.replace(vr,ho)),yield He(e,{cache:"no-store"})})()},fetchPlugin(e){return y(function*(){e.endsWith("/")||(e+="/");var r=ze[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}`);ze[e]={id:e,manifest:t,enabled:r?.enabled??!1,update:r?.update??!0,js:o??r.js}}).apply(this)},installPlugin(e,r=!0){return y(function*(){if(e.endsWith("/")||(e+="/"),typeof e!="string"||e in ze)throw new Error("Plugin already installed");yield this.fetchPlugin(e),r&&(yield this.startPlugin(e))}).apply(this)},evalPlugin(e){return y(function*(){var r={...window.vendetta,plugin:{id:e.id,manifest:e.manifest,storage:yield ke(Je(e.id))},logger:new Zo(`Felocord \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 y(function*(){e.endsWith("/")||(e+="/");var r=ze[e];if(!r)throw new Error("Attempted to start non-existent plugin");try{if(!I.safeMode?.enabled){var t=yield this.evalPlugin(r);Qt[e]=t,t.onLoad?.()}r.enabled=!0}catch(o){Ne.error(`Plugin ${r.id} errored whilst loading, and will be unloaded`,o);try{Qt[r.id]?.onUnload?.()}catch(n){Ne.error(`Plugin ${r.id} errored whilst unloading`,n)}delete Qt[e],r.enabled=!1}}).apply(this)},stopPlugin(e,r=!0){e.endsWith("/")||(e+="/");var t=ze[e],o=Qt[e];if(!t)throw new Error("Attempted to stop non-existent plugin");if(!I.safeMode?.enabled){try{o?.onUnload?.()}catch(n){Ne.error(`Plugin ${t.id} errored whilst unloading`,n)}delete Qt[e]}r&&(t.enabled=!1)},removePlugin(e){return y(function*(){e.endsWith("/")||(e+="/");var r=ze[e];r.enabled&&this.stopPlugin(e),delete ze[e],yield po(e)}).apply(this)},initPlugins(){return y(function*(){yield Wr(I,ze);var e=Object.keys(ze);if(!I.safeMode?.enabled){var r=this;yield m(e.filter(t=>ze[t].enabled).map(function(){var t=y(function*(o){return ze[o].update&&(yield r.fetchPlugin(o).catch(n=>Ne.error(n.message))),yield r.startPlugin(o)});return function(o){return t.apply(this,arguments)}}())),e.filter(t=>!ze[t].enabled&&ze[t].update).forEach(t=>this.fetchPlugin(t))}return()=>this.stopAllPlugins()}).apply(this)},stopAllPlugins(){return Object.keys(Qt).forEach(e=>this.stopPlugin(e,!1))},getSettings:e=>Qt[e]?.settings}});var dr,gn=h(()=>{"use strict";s();l();(function(e){e.BRAND="brand",e.RED="red",e.GREEN="green",e.PRIMARY="primary",e.TRANSPARENT="transparent",e.GREY="grey",e.LIGHTGREY="lightgrey",e.WHITE="white",e.LINK="link"})(dr||(dr={}))});function rl({title:e,confirmText:r,confirmColor:t,onConfirm:o,cancelText:n,placeholder:a,initialValue:c="",secureTextEntry:f}){var[g,E]=React.useState(c),[x,O]=React.useState("");function ue(){var be=Promise.resolve(o(g));be.then(()=>{cu.close()}).catch(Gr=>{O(Gr.message)})}return i(va,{title:e,confirmText:r,confirmColor:t,isConfirmButtonDisabled:x.length!==0,onConfirm:ue,cancelText:n,onCancel:()=>cu.close(),children:i(Of,{placeholder:a,value:g,onChange:be=>{E(typeof be=="string"?be:be.text),x&&O("")},returnKeyType:"done",onSubmitEditing:ue,error:x||void 0,secureTextEntry:f,autoFocus:!0,showBorder:!0,style:{alignSelf:"stretch"}})})}var cu,fu=h(()=>{"use strict";s();l();q();oe();Q();cu=C("openLazy","close")});var Ha={};F(Ha,{showConfirmationAlert:()=>pr,showCustomAlert:()=>ka,showInputAlert:()=>tl});function pr(e){var r=e;return r.body=e.content,delete r.content,r.isDismissable??=!0,uu.show(r)}var uu,ka,tl,eo=h(()=>{"use strict";s();l();te();Q();fu();uu=C("openLazy","close");ka=(e,r)=>uu.openLazy({importer:y(function*(){return()=>React.createElement(e,r)})}),tl=e=>ka(rl,e)});var du={};F(du,{default:()=>mu});function mu({plugin:e,navigation:r}){e.usePluginState();var t=M.plugins[e.id],o=e.getPluginSettingsComponent();return i(Sa,{children:T(hn.ScrollView,{children:[T(hn.View,{style:{flexDirection:"row",alignItems:"center",paddingVertical:24},children:[i(X,{variant:"heading-xl/semibold",children:e.name}),i(hn.View,{style:{marginLeft:"auto"},children:o&&i(ie,{size:"md",text:"Configure",variant:"secondary",icon:v("WrenchIcon"),onPress:()=>{pn("PluginInfoActionSheet"),r.push("BUNNY_CUSTOM_PAGE",{title:e.name,render:o})}})})]}),T(Kt.Group,{children:[i(Kt,{label:u.REFETCH,icon:i(A.Icon,{source:v("RetryIcon")}),onPress:y(function*(){t.enabled&&M.stopPlugin(e.id,!1);try{yield M.fetchPlugin(e.id),j(u.PLUGIN_REFETCH_SUCCESSFUL,v("toast_image_saved"))}catch{j(u.PLUGIN_REFETCH_FAILED,v("Small"))}t.enabled&&(yield M.startPlugin(e.id)),pn("PluginInfoActionSheet")})}),i(Kt,{label:u.COPY_URL,icon:i(A.Icon,{source:v("copy")}),onPress:()=>{Qe.setString(e.id),j.showCopyToClipboard()}}),i(Kt,{label:t.update?u.DISABLE_UPDATES:u.ENABLE_UPDATES,icon:i(A.Icon,{source:v("ic_download_24px")}),onPress:()=>{t.update=!t.update,j(er("TOASTS_PLUGIN_UPDATE",{update:t.update,name:e.name}),v("toast_image_saved"))}}),i(Kt,{label:u.CLEAR_DATA,icon:i(A.Icon,{source:v("ic_duplicate")}),onPress:()=>pr({title:u.HOLD_UP,content:er("ARE_YOU_SURE_TO_CLEAR_DATA",{name:e.name}),confirmText:u.CLEAR,cancelText:u.CANCEL,confirmColor:dr.RED,onConfirm:y(function*(){t.enabled&&M.stopPlugin(e.id,!1);try{yield M.fetchPlugin(e.id),j(u.PLUGIN_REFETCH_SUCCESSFUL,v("toast_image_saved"))}catch{j(u.PLUGIN_REFETCH_FAILED,v("Small"))}var n;try{po(e.id),n=["CLEAR_DATA_SUCCESSFUL","trash"]}catch{n=["CLEAR_DATA_FAILED","Small"]}j(er(n[0],{name:e.name}),v(n[1])),t.enabled&&(yield M.startPlugin(e.id)),pn("PluginInfoActionSheet")})})}),i(Kt,{label:u.DELETE,icon:i(A.Icon,{source:v("ic_message_delete")}),onPress:()=>pr({title:u.HOLD_UP,content:er("ARE_YOU_SURE_TO_DELETE_PLUGIN",{name:e.name}),confirmText:u.DELETE,cancelText:u.CANCEL,confirmColor:dr.RED,onConfirm:()=>{try{M.removePlugin(e.id)}catch(n){j(String(n),v("Small"))}pn("PluginInfoActionSheet")}})})]})]})})}var hn,pu=h(()=>{"use strict";s();l();te();q();fe();tt();ne();le();gn();V();oe();eo();Zs();wr();hn=k(ae())});function ol(e){return{id:e.id,name:e.manifest.name,description:e.manifest.description,authors:e.manifest.authors,icon:e.manifest.vendetta?.icon,isEnabled:()=>e.enabled,isInstalled:()=>!!(e&&M.plugins[e.id]),usePluginState(){U(M.plugins[e.id])},toggle(r){r?M.startPlugin(e.id):M.stopPlugin(e.id)},resolveSheetComponent(){return Promise.resolve().then(()=>(pu(),du))},getPluginSettingsComponent(){return M.getSettings(e.id)}}}var gu=h(()=>{"use strict";s();l();tt();le()});var yu={};F(yu,{default:()=>_u});function vp(e){var r=e.useItems();return i(Zt,{CardComponent:el,title:u.PLUGINS,searchKeywords:["name","description",t=>t.authors?.map(o=>typeof o=="string"?o:o.name).join()],sortOptions:{"Name (A-Z)":(t,o)=>t.name.localeCompare(o.name),"Name (Z-A)":(t,o)=>o.name.localeCompare(t.name)},safeModeHint:{message:u.SAFE_MODE_NOTICE_PLUGINS},items:r,...e})}function _u(){U(I);var e=ce.useNavigation();return i(vp,{useItems:()=>U(M.plugins)&&Object.values(M.plugins),resolveItem:ol,ListHeaderComponent:()=>{var r=Object.values(M.plugins).filter(t=>!t.id.startsWith(vr)&&!t.id.startsWith(ho));return r.length?T(br,{style:{marginVertical:8,gap:4},children:[i(X,{variant:"heading-lg/bold",children:"Unproxied Plugins Detected"}),i(X,{variant:"text-md/medium",children:"Installed plugins from unproxied sources may execute unreviewed code in this app without your knowledge."}),i(al.View,{style:{marginTop:8,flexDirection:"row"},children:i(ie,{style:{flexShrink:1},size:"sm",text:"Review",variant:"secondary",onPress:()=>{e.push("BUNNY_CUSTOM_PAGE",{title:"Unproxied Plugins",render:()=>i(Ea,{data:r,contentContainerStyle:{padding:8},ItemSeparatorComponent:()=>i(al.View,{style:{height:8}}),renderItem:({item:t})=>i(br,{children:i(X,{variant:"heading-md/semibold",children:t.id})})})})}})})]}):null},installAction:{label:"Install a plugin",fetchFn:function(){var r=y(function*(t){if(!t.startsWith(vr)&&!t.startsWith(ho)&&!I.developerSettings)hu("felocord-plugin-unproxied-confirmation",i(vu,{title:"Hold On!",content:"You're trying to install a plugin from an unproxied external source. This means you're trusting the creator to run their code in this app without your knowledge. Are you sure you want to continue?",extraContent:i(br,{children:i(X,{variant:"text-md/bold",children:t})}),actions:T(hp,{children:[i(nl,{text:"Continue",variant:"primary",onPress:()=>{M.installPlugin(t).then(()=>j(u.TOASTS_INSTALLED_PLUGIN,v("Check"))).catch(o=>hu("felocord-plugin-install-failed",i(vu,{title:"Install Failed",content:`Unable to install plugin from '${t}':`,extraContent:i(br,{children:i(X,{variant:"text-md/normal",children:o instanceof Error?o.message:String(o)})}),actions:i(nl,{text:"Okay",variant:"primary"})})))}}),i(nl,{text:"Cancel",variant:"secondary"})]})}));else return yield M.installPlugin(t)});return function(t){return r.apply(this,arguments)}}()}})}var al,hu,vu,hp,nl,xu=h(()=>{"use strict";s();l();te();q();fe();Ua();lu();tt();ne();Ce();le();wr();vt();we();Co();V();oe();al=k(ae());gu();({openAlert:hu}=G(()=>B("openAlert","dismissAlert"))),{AlertModal:vu,AlertActions:hp,AlertActionButton:nl}=G(()=>B("AlertModal","AlertActions"))});function il(e){var r=xp();return i(br,{children:T(pe,{spacing:16,children:[T(ro.View,{style:{flexDirection:"row",alignItems:"center"},children:[T(ro.View,{style:r.headerLeading,children:[i(X,{style:r.headerLabel,children:e.headerLabel}),e.headerSublabel&&i(X,{style:r.headerSubtitle,children:e.headerSublabel})]}),T(ro.View,{style:[r.headerTrailing,{marginLeft:"auto"}],children:[T(ro.View,{style:r.actions,children:[e.overflowActions&&i(Be,{onPress:()=>yp({key:"CardOverflow",header:{title:e.overflowTitle,icon:e.headerIcon&&i(Zr.Icon,{style:{marginRight:8},source:v(e.headerIcon)}),onClose:()=>_p()},options:e.overflowActions?.map(t=>({...t,icon:v(t.icon)}))}),size:"sm",variant:"secondary",icon:v("CircleInformationIcon-primary")}),e.actions?.map(({icon:t,onPress:o,disabled:n})=>i(Be,{onPress:o,disabled:n,size:"sm",variant:"secondary",icon:v(t)}))]}),e.toggleType&&(e.toggleType==="switch"?i(Rf,{value:e.toggleValue(),onValueChange:e.onToggleChange}):i(ro.TouchableOpacity,{onPress:()=>{e.onToggleChange?.(!e.toggleValue())},children:i(Cf,{selected:e.toggleValue()})}))]})]}),e.descriptionLabel&&i(X,{variant:"text-md/medium",children:e.descriptionLabel})]})})}var ro,_p,yp,xp,Su=h(()=>{"use strict";s();l();q();ne();we();oe();Q();bt();Ur();ro=k(ae()),{hideActionSheet:_p}=G(()=>B("openLazy","hideActionSheet")),{showSimpleActionSheet:yp}=G(()=>B("showSimpleActionSheet")),xp=Qr({card:{backgroundColor:he?.CARD_SECONDARY_BG,borderRadius:12,overflow:"hidden"},header:{padding:0},headerLeading:{flexDirection:"column",justifyContent:"center",scale:1.2},headerTrailing:{display:"flex",flexDirection:"row",gap:15,alignItems:"center"},headerLabel:{...ur["heading-md/semibold"],color:he.TEXT_NORMAL},headerSubtitle:{...ur["text-md/semibold"],color:he.TEXT_MUTED},descriptionLabel:{...ur["text-md/semibold"],color:he.TEXT_NORMAL},actions:{flexDirection:"row-reverse",alignItems:"center",gap:5},iconStyle:{tintColor:he.LOGO_PRIMARY,opacity:.2,height:64,width:64,left:void 0,right:"30%",top:"-10%"}})});function Eu(e,r){try{qr(e?r:null),Qo(e?r:null)}catch(t){console.error("Error while selectAndApply,",t)}}function sl({item:e}){U(e);var[r,t]=React.useState(!1);if(r)return null;var{authors:o}=e.data;return i(il,{headerLabel:e.data.name,headerSublabel:o?`by ${o.map(n=>n.name).join(", ")}`:"",descriptionLabel:e.data.description??"No description.",toggleType:I.safeMode?.enabled?void 0:"radio",toggleValue:()=>ee[e.id].selected,onToggleChange:n=>{Eu(n,e)},overflowTitle:e.data.name,overflowActions:[{icon:"ic_sync_24px",label:u.REFETCH,onPress:()=>{Vt(e.id,e.selected).then(()=>{j(u.THEME_REFETCH_SUCCESSFUL,v("toast_image_saved"))}).catch(()=>{j(u.THEME_REFETCH_FAILED,v("Small"))})}},{icon:"copy",label:u.COPY_URL,onPress:()=>{Qe.setString(e.id),j.showCopyToClipboard()}},{icon:"ic_message_delete",label:u.DELETE,isDestructive:!0,onPress:()=>pr({title:u.HOLD_UP,content:er("ARE_YOU_SURE_TO_DELETE_THEME",{name:e.data.name}),confirmText:u.DELETE,cancelText:u.CANCEL,confirmColor:dr.RED,onConfirm:()=>{zt(e.id).then(n=>{t(!0),n&&Eu(!1,e)}).catch(n=>{j(n.message,v("Small"))})}})}]})}var bu=h(()=>{"use strict";s();l();q();fe();Su();ne();Ce();le();Ze();gn();V();eo();wr()});var Au={};F(Au,{default:()=>Tu});function Tu(){return U(I),U(ee),i(Zt,{title:u.THEMES,searchKeywords:["data.name","data.description",e=>e.data.authors?.map(r=>r.name).join(", ")],sortOptions:{"Name (A-Z)":(e,r)=>e.name.localeCompare(r.name),"Name (Z-A)":(e,r)=>r.name.localeCompare(e.name)},installAction:{label:"Install a theme",fetchFn:Xr},items:Object.values(ee),safeModeHint:{message:er("SAFE_MODE_NOTICE_THEMES",{enabled:!!I.safeMode?.currentThemeId}),footer:I.safeMode?.currentThemeId&&i(ie,{size:"small",text:u.DISABLE_THEME,onPress:()=>delete I.safeMode?.currentThemeId,style:{marginTop:8}})},CardComponent:sl})}var wu=h(()=>{"use strict";s();l();q();fe();Ua();bu();Ce();le();Ze();oe()});var _n={};F(_n,{clearFolder:()=>pl,downloadFile:()=>gl,fileExists:()=>oo,readFile:()=>vn,removeFile:()=>to,writeFile:()=>ot});function pl(e){return ll.apply(this,arguments)}function ll(){return ll=y(function*(e,r="felitendo/"){if(typeof Y.clearFolder!="function")throw new Error("'fs.clearFolder' is not supported");return void(yield Y.clearFolder("documents",`${r}${e}`))}),ll.apply(this,arguments)}function to(e){return cl.apply(this,arguments)}function cl(){return cl=y(function*(e,r="felitendo/"){if(typeof Y.removeFile!="function")throw new Error("'fs.removeFile' is not supported");return void(yield Y.removeFile("documents",`${r}${e}`))}),cl.apply(this,arguments)}function oo(e){return fl.apply(this,arguments)}function fl(){return fl=y(function*(e,r="felitendo/"){return yield Y.fileExists(`${Y.getConstants().DocumentsDirPath}/${r}${e}`)}),fl.apply(this,arguments)}function ot(e,r){return ul.apply(this,arguments)}function ul(){return ul=y(function*(e,r,t="felitendo/"){if(typeof r!="string")throw new Error("Argument 'data' must be a string");return void(yield Y.writeFile("documents",`${t}${e}`,r,"utf8"))}),ul.apply(this,arguments)}function vn(e){return ml.apply(this,arguments)}function ml(){return ml=y(function*(e,r="felitendo/"){try{return yield Y.readFile(`${Y.getConstants().DocumentsDirPath}/${r}${e}`,"utf8")}catch(t){throw new Error(`An error occured while writing to '${e}'`,{cause:t})}}),ml.apply(this,arguments)}function gl(e,r){return dl.apply(this,arguments)}function dl(){return dl=y(function*(e,r,t="felitendo/"){var o=yield fetch(e).then(f=>f.blob()),n=yield new Promise(f=>{var g=new FileReader;g.onload=()=>f(g.result),g.readAsDataURL(o)}),a;if(n==null)throw new Error("Failed to convert blob to data URL");var c=n.indexOf("base64,");if(c===-1)throw new Error("dataURL does not contain base64");return a=n.slice(c+7),void(yield Y.writeFile("documents",`${t}${r}`,a,"base64"))}),dl.apply(this,arguments)}var no=h(()=>{"use strict";s();l();te();hr()});var Sn={};F(Sn,{fonts:()=>re,installFont:()=>Sp,removeFont:()=>Ga,saveFont:()=>Io,selectFont:()=>xn,updateFonts:()=>El,validateFont:()=>yn});function Ru(e){return hl.apply(this,arguments)}function hl(){return hl=y(function*(e){if(!e&&e!==null)throw new Error("Arg font must be a valid object or null");e?yield ot("fonts.json",JSON.stringify(e)):yield to("fonts.json")}),hl.apply(this,arguments)}function yn(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 re)throw new Error(`There is already a font named '${e.name}' installed`)}function Io(e){return vl.apply(this,arguments)}function vl(){return vl=y(function*(e,r=!1){var t;if(typeof e=="object"&&e.__source&&(e=e.__source),typeof e=="string")try{t=yield(yield He(e)).json(),t.__source=e}catch(o){throw new Error(`Failed to fetch fonts at ${e}`,{cause:o})}else t=e;yn(t);try{yield Promise.all(Object.entries(t.main).map(function(){var o=y(function*([n,a]){var c=a.split(".").pop();c!=="ttf"&&c!=="otf"&&(c="ttf");var f=`downloads/fonts/${t.name}/${n}.${c}`;(yield oo(f))||(yield gl(a,f))});return function(n){return o.apply(this,arguments)}}()))}catch(o){throw new Error("Failed to download font assets",{cause:o})}return re[t.name]=t,r&&Ru(re[t.name]),t}),vl.apply(this,arguments)}function Sp(e){return _l.apply(this,arguments)}function _l(){return _l=y(function*(e,r=!1){if(typeof e!="string"||Object.values(re).some(o=>typeof o=="object"&&o.__source===e))throw new Error("Invalid source or font was already installed");var t=yield Io(e);r&&(yield xn(t.name))}),_l.apply(this,arguments)}function xn(e){return yl.apply(this,arguments)}function yl(){return yl=y(function*(e){if(e&&!(e in re))throw new Error("Selected font does not exist!");e?re.__selected=e:delete re.__selected,yield Ru(e==null?null:re[e])}),yl.apply(this,arguments)}function Ga(e){return xl.apply(this,arguments)}function xl(){return xl=y(function*(e){var r=re.__selected===e;r&&(yield xn(null)),delete re[e];try{yield pl(`downloads/fonts/${e}`)}catch{}}),xl.apply(this,arguments)}function El(){return Sl.apply(this,arguments)}function Sl(){return Sl=y(function*(){yield Wr(re),yield m(Object.keys(re).map(e=>Io(re[e],re.__selected===e)))}),Sl.apply(this,arguments)}var re,ao=h(()=>{"use strict";s();l();te();no();le();yr();re=sr(ke(Je("BUNNY_FONTS")))});function Ep(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<o.length?n:o,r[0]||"");return t?.replace(/-[A-Za-z]*$/,"")||null}function bp({fonts:e,setName:r}){var t=la().data,o=t.fonts,[n,a]=(0,Ee.useState)(Ep(Object.values(o))),[c,f]=(0,Ee.useState)(void 0);return T(nt.View,{style:{padding:8,paddingBottom:16,gap:12},children:[i(Ve,{autoFocus:!0,size:"md",label:u.FONT_NAME,value:n,placeholder:n||"Whitney",onChange:a,errorMessage:c,state:c?"error":void 0}),i(X,{variant:"text-xs/normal",color:"text-muted",children:er("THEME_EXTRACTOR_DESC",{fonts:Object.keys(o).join(u.SEPARATOR)})}),i(ie,{size:"md",variant:"primary",text:u.EXTRACT,disabled:!n,onPress:()=>{if(n)try{yn({spec:1,name:n,main:o}),r(n),Object.assign(e,o),Tl.hideActionSheet()}catch(g){f(String(g))}}})]})}function Tp({fonts:e,setName:r,setSource:t}){var[o,n]=(0,Ee.useState)(""),[a,c]=(0,Ee.useState)(!1),[f,g]=(0,Ee.useState)(void 0);return T(nt.View,{style:{padding:8,paddingBottom:16,gap:12},children:[i(Ve,{autoFocus:!0,size:"md",label:"Font Link",value:o,placeholder:"https://link.to/font/pack.json",onChange:n,errorMessage:f,state:f?"error":void 0}),i(ie,{size:"md",variant:"primary",text:"Import",disabled:!o||a,loading:a,onPress:()=>{c(!0),y(function*(){var E=yield He(o,{cache:"no-store"}),x=yield E.json();yn(x),r(x.name),t(o),Object.assign(e,x.main)})().then(()=>Tl.hideActionSheet()).catch(E=>g(String(E))).finally(()=>c(!1))}})]})}function Ap(e){var[r,t]=(0,Ee.useState)(e.name),[o,n]=(0,Ee.useState)(e.fontEntries[e.name]);return T(nt.View,{style:{padding:8,paddingBottom:16,gap:12},children:[i(Ve,{autoFocus:!0,size:"md",label:"Family Name (to override)",value:r,placeholder:"ggsans-Bold",onChange:t}),i(Ve,{size:"md",label:"Font URL",value:o,placeholder:"https://link.to/the/font.ttf",onChange:n}),i(ie,{size:"md",variant:"primary",text:"Apply",onPress:()=>{delete e.fontEntries[e.name],e.fontEntries[r]=o}})]})}function bl(e,r,t){Tl.openLazy(Promise.resolve({default:()=>i(me,{children:T(Sa,{children:[i(Lf,{title:"Import Font"}),i(e,{fonts:r,...t})]})})}),"FontEditorActionSheet")}function wp({fontEntry:e}){var r=(0,Ee.useRef)(),t=(0,Ee.useRef)(),[o,n]=(0,Ee.useState)(!1),[a,c]=(0,Ee.useState)();return T(nt.View,{style:{flexDirection:"row",gap:8,justifyContent:"flex-start"},children:[i(nt.View,{style:{flex:1},children:i(Ve,{isRound:!0,size:"md",label:o?r.current:void 0,placeholder:o?"https://path.to/the/file.ttf":"PostScript name (e.g. ggsans-Bold)",leadingIcon:()=>o?null:i(A.Icon,{source:v("PlusSmallIcon")}),leadingText:o?r.current:"",onChange:f=>(o?t:r).current=f,errorMessage:a,state:a?"error":void 0})}),o&&i(Be,{size:"md",variant:"secondary",onPress:()=>{r.current="",n(!1)},icon:v("TrashIcon")}),i(Be,{size:"md",variant:"primary",onPress:()=>{if(!o&&r.current)n(!0);else if(o&&r.current&&t.current)try{var f=new URL(t.current);if(!f.protocol||!f.host)throw"Invalid URL";e[r.current]=t.current,r.current=void 0,t.current=void 0,n(!1)}catch(g){c(String(g))}},icon:v(o?"PlusSmallIcon":"ArrowLargeRightIcon")})]})}function En(e){var[r,t]=(0,Ee.useState)(e.name),[o,n]=(0,Ee.useState)(),[a,c]=(0,Ee.useState)(!1),f=(0,Ee.useMemo)(()=>go(e.name?{...re[e.name].main}:{}).proxy,[e.name]),g=U(f),E=ce.useNavigation();return i(nt.ScrollView,{style:{flex:1},contentContainerStyle:{paddingBottom:38},children:T(pe,{style:{paddingVertical:24,paddingHorizontal:12},spacing:12,children:[e.name?T(De,{title:"Actions",children:[i(A,{label:"Refetch fonts from source",icon:i(A.Icon,{source:v("RetryIcon")}),onPress:y(function*(){var x={...re[e.name]};yield Ga(e.name),yield Io(x),E.goBack()})}),i(A,{label:"Delete font pack",icon:i(A.Icon,{source:v("TrashIcon")}),onPress:()=>Ga(e.name).then(()=>E.goBack())})]}):T(De,{title:"Import",children:[la()?.data?.fonts&&i(A,{label:u.LABEL_EXTRACT_FONTS_FROM_THEME,subLabel:u.DESC_EXTRACT_FONTS_FROM_THEME,icon:i(A.Icon,{source:v("HammerIcon")}),onPress:()=>bl(bp,g,{setName:t})}),i(A,{label:"Import font entries from a link",subLabel:"Directly import from a link with a pre-configured JSON file",icon:i(A.Icon,{source:v("LinkIcon")}),onPress:()=>bl(Tp,g,{setName:t,setSource:n})})]}),i(Ve,{size:"lg",value:r,label:u.FONT_NAME,placeholder:"Whitney",onChange:t}),T(De,{title:"Font Entries",children:[Object.entries(g).map(([x,O])=>i(A,{label:x,subLabel:O,trailing:T(pe,{spacing:2,direction:"horizontal",children:[i(Be,{size:"sm",variant:"secondary",icon:v("PencilIcon"),onPress:()=>bl(Ap,g,{name:x,fontEntries:g})}),i(Be,{size:"sm",variant:"secondary",icon:v("TrashIcon"),onPress:()=>delete g[x]})]})})),i(A,{label:i(wp,{fontEntry:g})})]}),i(nt.View,{style:{flexDirection:"row",justifyContent:"flex-end",bottom:0,left:0},children:i(ie,{size:"lg",loading:a,disabled:a||!r||Object.keys(g).length===0,variant:"primary",text:e.name?"Save":"Import",onPress:y(function*(){r&&(c(!0),e.name?(Object.assign(re[e.name],{name:r,main:g,__edited:!0}),c(!1),E.goBack()):Io({spec:1,name:r,main:g,__source:o}).then(()=>E.goBack()).finally(()=>c(!1)))}),icon:v(e.name?"toast_image_saved":"DownloadIcon"),style:{marginLeft:8}})})]})})}var Ee,nt,Tl,Al=h(()=>{"use strict";s();l();te();q();fe();ne();le();ao();Ze();yr();V();oe();Q();Ar();Ee=k(Jt()),nt=k(ae()),Tl=C("hideActionSheet")});var Iu=Rr((VA,Cu)=>{s();l();Cu.exports=ht()["@shopify/react-native-skia"]});function Cp({font:e}){var r=Rp(Wt.colors.TEXT_NORMAL),{fontFamily:t,fontSize:o}=ur["text-md/medium"],n=t.split(/,/g)[0],a=Po.useFont(e.main[n])?.getTypeface(),c=(0,Lu.useMemo)(()=>{if(!a)return null;var f=SkiaApi.TypefaceFontProvider.Make();return f.registerFont(a,n),SkiaApi.ParagraphBuilder.Make({},f).pushStyle({color:SkiaApi.Color(r),fontFamilies:[n],fontSize:o}).addText("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.").pop().build()},[a]);return i(Lo.View,{style:{height:64},children:a?i(Po.Canvas,{style:{height:64},children:i(Po.Paragraph,{paragraph:c,x:0,y:0,width:300})}):i(Lo.View,{style:{justifyContent:"center",alignItems:"center"},children:i(X,{color:"text-muted",variant:"heading-lg/semibold",children:"Loading..."})})})}function wl({item:e}){U(re);var r=ce.useNavigation(),t=re.__selected===e.name;return i(br,{children:T(pe,{spacing:16,children:[T(Lo.View,{style:{flexDirection:"row",alignItems:"center"},children:[i(Lo.View,{children:i(X,{variant:"heading-lg/semibold",children:e.name})}),i(Lo.View,{style:{marginLeft:"auto"},children:T(pe,{spacing:12,direction:"horizontal",children:[i(Be,{onPress:()=>{r.push("BUNNY_CUSTOM_PAGE",{title:"Edit Font",render:()=>i(En,{name:e.name})})},size:"sm",variant:"secondary",disabled:t,icon:v("PencilIcon")}),i(ie,{size:"sm",variant:t?"secondary":"primary",text:t?"Unapply":"Apply",onPress:y(function*(){yield xn(t?null:e.name),pr({title:u.HOLD_UP,content:"Reload Discord to apply changes?",confirmText:u.RELOAD,cancelText:u.CANCEL,confirmColor:dr.RED,onConfirm:Bo.reload})})})]})})]}),i(Cp,{font:e})]})})}var Po,Lu,Lo,Rp,Pu=h(()=>{"use strict";s();l();te();q();fe();ne();hr();le();ao();we();gn();Co();V();oe();Po=k(Iu());eo();Ur();Lu=k(Jt()),Lo=k(ae());Al();({useToken:Rp}=G(()=>B("useToken")))});var Ou={};F(Ou,{default:()=>Nu});function Nu(){U(I),U(re);var e=ce.useNavigation();return i(Zt,{title:u.FONTS,searchKeywords:["name","description"],sortOptions:{"Name (A-Z)":(r,t)=>r.name.localeCompare(t.name),"Name (Z-A)":(r,t)=>t.name.localeCompare(r.name)},items:Object.values(re),safeModeHint:{message:u.SAFE_MODE_NOTICE_FONTS},CardComponent:wl,installAction:{label:"Install a font",onPress:()=>{e.push("BUNNY_CUSTOM_PAGE",{title:"Import Font",render:()=>i(En,{})})}}})}var Du=h(()=>{"use strict";s();l();q();fe();Ua();Al();Ce();le();ao();V();Pu()});function Fu(e,r){var[t,o]=(0,No.useState)(2),n=()=>oo(e,r).then(c=>o(c?1:0)).catch(()=>o(3)),a=(0,No.useMemo)(()=>new Proxy(_n,{get(c,f,g){var E=Reflect.get(c,f,g);if(typeof E=="function")return(...x)=>{var O=(n(),E(...x));return O?.constructor?.name==="Promise"&&(o(2),O.finally(n)),O}}}),[]);return(0,No.useEffect)(()=>void n(),[]),[t,a]}var No,kr,Mu=h(()=>{"use strict";s();l();no();No=k(Jt());(function(e){e[e.FALSE=0]="FALSE",e[e.TRUE=1]="TRUE",e[e.LOADING=2]="LOADING",e[e.ERROR=3]="ERROR"})(kr||(kr={}))});function Rl({asset:e}){return i(Zr,{label:`${e.name} - ${e.id}`,trailing:i(Bu.Image,{source:e.id,style:{width:32,height:32}}),onPress:()=>{Qe.setString(e.name),j.showCopyToClipboard()}})}var Bu,Uu=h(()=>{"use strict";s();l();q();V();oe();wr();Bu=k(ae())});function Cl(){var[e,r]=React.useState("");return i(me,{children:T(Va.View,{style:{flex:1},children:[i(Tt,{style:{margin:10},onChangeText:t=>r(t)}),i(Va.FlatList,{data:Object.values(ut).filter(t=>t.name.includes(e)||t.id.toString()===e),renderItem:({item:t})=>i(Rl,{asset:t}),ItemSeparatorComponent:Pf,keyExtractor:t=>t.name})]})})}var Va,ju=h(()=>{"use strict";s();l();q();Uu();ne();oe();Ar();Va=k(ae())});var Hu={};F(Hu,{default:()=>ku});function ku(){var[e,r]=Fu("preloads/reactDevtools.js"),t=Np(),o=ce.useNavigation();return U(I),U(cr),i(me,{children:i(za.ScrollView,{style:{flex:1},contentContainerStyle:{paddingBottom:38},children:T(pe,{style:{paddingVertical:24,paddingHorizontal:12},spacing:24,children:[i(Ve,{label:u.DEBUGGER_URL,placeholder:"127.0.0.1:9090",size:"md",leadingIcon:()=>i(To,{style:t.leadingText,children:"ws://"}),defaultValue:I.debuggerUrl,onChange:n=>I.debuggerUrl=n}),T(De,{title:u.DEBUG,children:[i(A,{label:u.CONNECT_TO_DEBUG_WEBSOCKET,icon:i(A.Icon,{source:v("copy")}),onPress:()=>dn(I.debuggerUrl)}),yo()&&i(Mr,{children:i(A,{label:u.CONNECT_TO_REACT_DEVTOOLS,icon:i(A.Icon,{source:v("ic_badge_staff")}),onPress:()=>window[us()||"__vendetta_rdc"]?.connectToDevTools({host:I.debuggerUrl.split(":")?.[0],resolveRNStyle:za.StyleSheet.flatten})})})]}),fa()&&i(Mr,{children:T(De,{title:"Loader config",children:[i(Xt,{label:u.LOAD_FROM_CUSTOM_URL,subLabel:u.LOAD_FROM_CUSTOM_URL_DEC,icon:i(A.Icon,{source:v("copy")}),value:cr.customLoadUrl.enabled,onValueChange:n=>{cr.customLoadUrl.enabled=n}}),cr.customLoadUrl.enabled&&i(A,{label:i(Ve,{defaultValue:cr.customLoadUrl.url,size:"md",onChange:n=>cr.customLoadUrl.url=n,placeholder:"http://localhost:4040/vendetta.js",label:u.BUNNY_URL})}),yo()&&Oe()&&i(Xt,{label:u.LOAD_REACT_DEVTOOLS,subLabel:`${u.VERSION}: ${ms()}`,icon:i(A.Icon,{source:v("ic_badge_staff")}),value:cr.loadReactDevTools,onValueChange:n=>{cr.loadReactDevTools=n}})]})}),T(De,{title:"Other",children:[i(A,{arrow:!0,label:u.ASSET_BROWSER,icon:i(A.Icon,{source:v("ic_image")}),trailing:A.Arrow,onPress:()=>o.push("BUNNY_CUSTOM_PAGE",{title:u.ASSET_BROWSER,render:Cl})}),i(A,{arrow:!0,label:u.ERROR_BOUNDARY_TOOLS_LABEL,icon:i(A.Icon,{source:v("ic_warning_24px")}),onPress:()=>Lp({key:"ErrorBoundaryTools",header:{title:"Which ErrorBoundary do you want to trip?",icon:i(A.Icon,{style:{marginRight:8},source:v("ic_warning_24px")}),onClose:()=>Ip()},options:[{label:u.BUNNY,onPress:()=>o.push("BUNNY_CUSTOM_PAGE",{render:()=>i("undefined",{})})},{label:"Discord",isDestructive:!0,onPress:()=>o.push("BUNNY_CUSTOM_PAGE",{noErrorBoundary:!0})}]})}),i(A,{label:u.INSTALL_REACT_DEVTOOLS,subLabel:u.RESTART_REQUIRED_TO_TAKE_EFFECT,icon:i(A.Icon,{source:v("DownloadIcon")}),trailing:i(ie,{size:"sm",loading:e===kr.LOADING,disabled:e===kr.LOADING,variant:e===kr.TRUE?"secondary":"primary",text:e===kr.TRUE?u.UNINSTALL:u.INSTALL,onPress:y(function*(){e===kr.FALSE?r.downloadFile(Pp,"preloads/reactDevtools.js"):e===kr.TRUE&&r.removeFile("preloads/reactDevtools.js")}),icon:v(e===kr.TRUE?"ic_message_delete":"DownloadIcon"),style:{marginLeft:8}})}),i(Xt,{label:u.ENABLE_EVAL_COMMAND,subLabel:u.ENABLE_EVAL_COMMAND_DESC,icon:i(A.Icon,{source:v("PencilIcon")}),value:I.enableEvalCommand,onValueChange:n=>{I.enableEvalCommand=n}})]})]})})})}var za,Ip,Lp,Pp,Np,Gu=h(()=>{"use strict";s();l();te();q();fe();Mu();ju();ne();rt();Sr();Ce();le();we();V();oe();Q();bt();Ar();Ur();za=k(ae()),{hideActionSheet:Ip}=G(()=>B("openLazy","hideActionSheet")),{showSimpleActionSheet:Lp}=G(()=>B("showSimpleActionSheet")),Pp="https://raw.githubusercontent.com/amsyarasyiq/rdt-embedder/main/dist.js",Np=Qr({leadingText:{...ur["heading-md/semibold"],color:he.TEXT_MUTED,marginRight:-4}})});function Il(){Ca({name:"Felocord",items:[{key:"BUNNY",title:()=>u.BUNNY,icon:{uri:ha},render:()=>Promise.resolve().then(()=>(qf(),Xf)),rawTabsConfig:{useTrailing:()=>"(10885c3-main)"}},{key:"BUNNY_PLUGINS",title:()=>u.PLUGINS,icon:v("ActivitiesIcon"),render:()=>Promise.resolve().then(()=>(xu(),yu))},{key:"BUNNY_THEMES",title:()=>u.THEMES,icon:v("PaintPaletteIcon"),render:()=>Promise.resolve().then(()=>(wu(),Au)),usePredicate:()=>lr()},{key:"BUNNY_FONTS",title:()=>u.FONTS,icon:v("ic_add_text"),render:()=>Promise.resolve().then(()=>(Du(),Ou)),usePredicate:()=>gs()},{key:"BUNNY_DEVELOPER",title:()=>u.DEVELOPER,icon:v("WrenchIcon"),render:()=>Promise.resolve().then(()=>(Gu(),Hu)),usePredicate:()=>U(I).developerSettings??!1}]}),Ca({name:"Vendetta",items:[]})}var qs=h(()=>{"use strict";s();l();bf();fe();ne();Sr();Ce();le();Ro()});var $a,at,Oo,bn=h(()=>{"use strict";s();l();(function(e){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"})($a||($a={}));(function(e){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"})(at||(at={}));(function(e){e[e.CHAT=1]="CHAT",e[e.USER=2]="USER",e[e.MESSAGE=3]="MESSAGE"})(Oo||(Oo={}))});var zu={};F(zu,{default:()=>Mp});function Vu(e){return"```js\n"+e.replaceAll("`","`"+Fp)+"\n```"}var Op,Dp,Fp,Mp,$u=h(()=>{"use strict";s();l();te();fe();bn();Ce();V();Q();Op=C("inspect"),Dp=y(function*(){}).constructor,Fp="\u200B";Mp=()=>({name:"eval",description:u.COMMAND_EVAL_DESC,shouldHide:()=>I.enableEvalCommand===!0,options:[{name:"code",type:at.STRING,description:u.COMMAND_EVAL_OPT_CODE,required:!0},{name:"async",type:at.BOOLEAN,description:u.COMMAND_EVAL_OPT_ASYNC}],execute([e,r],t){return y(function*(){try{var o=Op.inspect(r?.value?yield Dp(e.value)():eval?.(e.value)),n=o.length>2e3?o.slice(0,2e3)+"...":o;fr.sendBotMessage(t.channel.id,Vu(n))}catch(a){fr.sendBotMessage(t.channel.id,Vu(a?.stack??a))}})()}})});var Yu={};F(Yu,{default:()=>Bp});var Bp,Wu=h(()=>{"use strict";s();l();fe();bn();rt();V();Bp=()=>({name:"debug",description:u.COMMAND_DEBUG_DESC,options:[{name:"ephemeral",type:at.BOOLEAN,description:u.COMMAND_DEBUG_OPT_EPHEMERALLY}],execute([e],r){var t=et(),o=["**Felocord Debug Info**",`> Felocord: ${t.felocord.version} (${t.felocord.loader.name} ${t.felocord.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(`
`);e?.value?fr.sendBotMessage(r.channel.id,o):fr.sendMessage(r.channel.id,{content:o})}})});var Ku={};F(Ku,{default:()=>Up});var Up,Xu=h(()=>{"use strict";s();l();fe();tt();bn();V();Up=()=>({name:"plugins",description:u.COMMAND_PLUGINS_DESC,options:[{name:"ephemeral",displayName:"ephemeral",type:at.BOOLEAN,description:u.COMMAND_DEBUG_OPT_EPHEMERALLY}],execute([e],r){var t=Object.values(M.plugins).filter(Boolean);t.sort((c,f)=>c.manifest.name.localeCompare(f.manifest.name));var o=t.filter(c=>c.enabled).map(c=>c.manifest.name),n=t.filter(c=>!c.enabled).map(c=>c.manifest.name),a=[`**Installed Plugins (${t.length}):**`,...o.length>0?[`Enabled (${o.length}):`,"> "+o.join(", ")]:[],...n.length>0?[`Disabled (${n.length}):`,"> "+n.join(", ")]:[]].join(`
`);e?.value?fr.sendBotMessage(r.channel.id,a):fr.sendMessage(r.channel.id,{content:a})}})});var Ya={};F(Ya,{patchCommands:()=>Ll,registerCommand:()=>Do});function Ll(){var e=Z("getBuiltInCommands",Yt,([r],t)=>[...t,...Tn.filter(o=>(r instanceof Array?r.includes(o.type):r===o.type)&&o.__felocord?.shouldHide?.()!==!1)]);return[($u(),je(zu)),(Wu(),je(Yu)),(Xu(),je(Ku))].forEach(r=>Do(r.default())),()=>{Tn=[],e()}}function Do(e){var r;try{r=Yt.getBuiltInCommands(Oo.CHAT,!0,!1)}catch{r=Yt.getBuiltInCommands(Object.values(Oo),!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.__felocord={shouldHide:e.shouldHide},e.applicationId??="-1",e.type??=Oo.CHAT,e.inputType=$a.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 ft("execute",e,(n,a)=>{Promise.resolve(a.apply(e,n)).then(c=>{c&&typeof c=="object"&&fr.sendMessage(n[1].channel.id,c)}).catch(c=>{Ne.error("Failed to execute command",c)})}),Tn.push(e),()=>Tn=Tn.filter(({id:n})=>n!==e.id)}var Tn,An=h(()=>{"use strict";s();l();bn();qe();Kr();V();Tn=[]});var Ju=Rr((VR,qu)=>{s();l();qu.exports=ht().lodash});var Qu=Rr((YR,Zu)=>{s();l();Zu.exports=ht().util});var Wa,em,rm,tm=h(()=>{"use strict";s();l();q();ne();An();rt();Sr();qe();Ce();le();le();Ze();yr();Ki();Kr();Co();V();oe();oe();eo();bt();Ar();Ur();wr();gi();Wa=k(Jt()),em=k(ae());tt();rm=()=>{var e=t=>o=>t($o.createSimpleFilter(o,Bc(new Error().stack))),r=window.vendetta={patcher:{before:Ho.before,after:Ho.after,instead:Ho.instead},metro:{modules:window.modules,find:e(Ae),findAll:e(gt),findByProps:(...t)=>{t.length===1&&t[0]==="KeyboardAwareScrollView"&&t.push("listenToKeyboardEvents");var o=B(...t);if(o==null&&t.includes("ActionSheetTitleHeader")){var n=B("ActionSheetRow");return{...n,ActionSheetTitleHeader:n.BottomSheetTitleHeader,ActionSheetContentContainer:({children:a})=>((0,Wa.useEffect)(()=>console.warn("Discord has removed 'ActionSheetContentContainer', please move into something else. This has been temporarily replaced with View"),[]),(0,Wa.createElement)(em.View,null,a))}}return o},findByPropsAll:(...t)=>Ii(...t),findByName:(t,o)=>t==="create"&&typeof o>"u"?oa("create",!1).default:oa(t,o??!0),findByNameAll:(t,o=!0)=>Li(t,o),findByDisplayName:(t,o=!0)=>Pi(t,o),findByDisplayNameAll:(t,o=!0)=>Oi(t,o),findByTypeName:(t,o=!0)=>Di(t,o),findByTypeNameAll:(t,o=!0)=>Fi(t,o),findByStoreName:t=>Mi(t),common:{constants:xt,channels:an,i18n:St,url:Et,toasts:sn,stylesheet:{createThemedStyleSheet:qt},clipboard:Qe,assets:Is,invites:Ls,commands:Yt,navigation:Ps,navigationStack:Ns,NavigationNative:ce,Flux:Os,FluxDispatcher:Er,React:ln,ReactNative:pa,moment:Ds(),chroma:ia(),lodash:Ju(),util:Qu()}},constants:{DISCORD_SERVER:"https://discord.gg/n9QQ4XhhJP",GITHUB:"https://github.com/vendetta-mod",PROXY_PREFIX:"https://vd-plugins.github.io/proxy",HTTP_REGEX:/^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/,HTTP_REGEX_MULTI:/https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&//=]*)/g,DISCORD_SERVER_ID:"1015931589865246730",PLUGINS_CHANNEL_ID:"1091880384561684561",THEMES_CHANNEL_ID:"1091880434939482202"},utils:{findInReactTree:(t,o)=>_r(t,o),findInTree:(t,o,n)=>vo(t,o,n),safeFetch:(t,o,n)=>He(t,o,n),unfreeze:t=>Object.isFrozen(t)?{...t}:t,without:(t,...o)=>pi(t,o)},debug:{connectToDebugger:t=>dn(t),getDebugInfo:()=>et()},ui:{components:{Forms:Ms,General:pa,Alert:va,Button:_a,HelpMessage:(...t)=>i(ya,{...t}),SafeAreaView:(...t)=>i(xa,{...t}),Summary:fn,ErrorBoundary:me,Codeblock:Tr,Search:Tt},toasts:{showToast:(t,o)=>j(t,o)},alerts:{showConfirmationAlert:t=>pr(t),showCustomAlert:(t,o)=>ka(t,o),showInputAlert:t=>tl(t)},assets:{all:ut,find:t=>Vo(t),getAssetByName:t=>Vo(t),getAssetByID:t=>Vo(t),getAssetIDByName:t=>v(t)},semanticColors:he,rawColors:Us},plugins:{plugins:M.plugins,fetchPlugin:t=>M.fetchPlugin(t),installPlugin:(t,o=!0)=>M.installPlugin(t,o),startPlugin:t=>M.startPlugin(t),stopPlugin:(t,o=!0)=>M.stopPlugin(t,o),removePlugin:t=>M.removePlugin(t),getSettings:t=>M.getSettings(t)},themes:{themes:ee,fetchTheme:(t,o)=>Vt(t,o),installTheme:t=>Xr(t),selectTheme:t=>qr(t==="default"?null:ee[t]),removeTheme:t=>zt(t),getCurrentTheme:()=>yt(),updateThemes:()=>sa()},commands:{registerCommand:Do},storage:{createProxy:t=>go(t),useProxy:t=>U(t),createStorage:t=>ke(t),wrapSync:t=>sr(t),awaitSyncWrapper:t=>Wr(t),createMMKVBackend:t=>Je(t),createFileBackend:t=>(de()&&t==="vendetta_theme.json"&&(t="felitendo/current-theme.json"),Yr(t))},settings:I,loader:{identity:rn()??void 0,config:cr},logger:{log:(...t)=>console.log(...t),info:(...t)=>console.info(...t),warn:(...t)=>console.warn(...t),error:(...t)=>console.error(...t),time:(...t)=>console.time(...t),trace:(...t)=>console.trace(...t),verbose:(...t)=>console.log(...t)},version:un,unload:()=>{delete window.vendetta}};return()=>r.unload()}});var Nl={};F(Nl,{dispatcher:()=>Ka,injectFluxInterceptor:()=>Pl,intercept:()=>kp});function Pl(){var e=r=>{for(var t of Xa){var o=t(r);o!=null&&(o?typeof o=="object"&&(Object.assign(r,o),r[jp]=!0):r[om]=!0)}return om in r};return(Ka._interceptors??=[]).unshift(e),()=>Ka._interceptors&&=Ka._interceptors.filter(r=>r!==e)}function kp(e){return Xa.push(e),()=>{Xa=Xa.filter(r=>r!==e)}}var om,jp,Ka,Xa,Ol=h(()=>{"use strict";s();l();V();om=Symbol.for("felocord.flux.blocked"),jp=Symbol.for("felocord.flux.modified"),Ka=Er,Xa=[]});function Vp(e,r=null,t=!1){if(e.guild_id===zi){var o;if(e.parent_id===$i)o="Plugin";else if(e.parent_id===Jo&&lr())o="Theme";else return;var{firstMessage:n}=t?Hp(e):{firstMessage:r},a=n?.content?.match(Gi)?.filter(wn[o].urlsFilter);if(!(!a||!a[0]))return o==="Plugin"&&!a[0].endsWith("/")&&(a[0]+="/"),[o,a[0]]}}function zp(e,r=null,t=!1){var[o,n]=Vp(e,r,t)??[];U(M.plugins),U(ee);var[a,c]=React.useState(!1);if(!o||!n)return[!0];var f=!!wn[o].storage[n],g=function(){var E=y(function*(){c(!0);try{yield wn[o].installOrRemove(n)}catch(x){j(x.message,v("Small"))}finally{c(!1)}});return function(){return E.apply(this,arguments)}}();return[!1,o,f,a,g]}var Hp,Gp,wn,$p,nm,am=h(()=>{"use strict";s();l();te();q();fe();tt();ne();Sr();qe();le();Ze();vt();we();oe();Q();Ar();wr();({useFirstForumPostMessage:Hp}=G(()=>B("useFirstForumPostMessage"))),Gp=C("MostCommonForumPostReaction"),wn={Plugin:{storage:M.plugins,urlsFilter:e=>e.startsWith(vr),installOrRemove:e=>{var r=wn.Plugin.storage[e];return r?M.removePlugin(e):M.installPlugin(e)}},Theme:{storage:ee,urlsFilter:e=>e.endsWith(".json"),installOrRemove:e=>{var r=wn.Theme.storage[e];return r?zt(e):Xr(e)}}};$p=()=>Z("MostCommonForumPostReaction",Gp,([{thread:e,firstMessage:r}],t)=>{var[o,n,a,c,f]=zp(e,r,!0);if(!o)return T(Mr,{children:[t,i(me,{children:i(ie,{size:"sm",loading:c,disabled:c,variant:a?"secondary":"primary",text:a?u.UNINSTALL:u.INSTALL,onPress:f,icon:v(a?"ic_message_delete":"DownloadIcon"),style:{marginLeft:8}})})]})}),nm=()=>{var e=[$p()];return()=>e.map(r=>r())}});function im(e){if(e.startsWith(vr))return"plugin";if(e.endsWith(".json")&&lr())return"theme"}function sm(e,r){(e==="plugin"?M.installPlugin.bind(M):Xr)(r).then(()=>{j(u.SUCCESSFULLY_INSTALLED,v("Check"))}).catch(t=>{j(t.message,v("Small"))})}var Yp,Wp,Kp,Xp,qp,lm,cm=h(()=>{"use strict";s();l();te();fe();tt();ne();Sr();qe();Ze();vt();we();V();Ko();uo();Q();eo();wr();Yp=Ae(Wo("showSimpleActionSheet")),Wp=C("handleClick"),{openURL:Kp}=G(()=>Et),{getChannelId:Xp}=G(()=>an),{getChannel:qp}=G(()=>B("getChannel"));lm=()=>{var e=new Array;return e.push(Z("showSimpleActionSheet",Yp,r=>{if(r[0].key==="LongPressUrl"){var{header:{title:t},options:o}=r[0],n=im(t);n&&o.push({label:u.INSTALL_ADDON,onPress:()=>sm(n,t)})}})),e.push(ft("handleClick",Wp,function(){var r=y(function*(t,o){var{href:n}=t[0],a=im(n);if(!a)return o.apply(this,t);if(a==="theme"&&qp(Xp())?.parent_id!==Jo)return o.apply(this,t);pr({title:u.HOLD_UP,content:er("CONFIRMATION_LINK_IS_A_TYPE",{urlType:a}),onConfirm:()=>sm(a,n),confirmText:u.INSTALL,cancelText:u.CANCEL,secondaryConfirmText:u.OPEN_IN_BROWSER,onConfirmSecondary:()=>Kp(n)})});return function(t,o){return r.apply(this,arguments)}}())),()=>e.forEach(r=>r())}});var um={};F(um,{default:()=>Jp});var fm,Jp,mm=h(()=>{"use strict";s();l();Dl();am();cm();fm=[],Jp=dm({manifest:{id:"felocord.quickinstall",name:"QuickInstall",version:"1.0.0",description:"Quickly install Vendetta plugins and themes",authors:["felitendo"]},start(){fm=[nm(),lm()]},stop(){fm.forEach(e=>e())}})});function dm(e){return e[Symbol.for("felocord.core.plugin")]=!0,e}var pm,Dl=h(()=>{"use strict";s();l();pm=()=>({"felocord.quickinstall":(mm(),je(um))})});function Bl(e){return{get:y(function*(){try{return JSON.parse(yield vn(e))}catch(r){throw new Error(`Failed to parse storage from '${e}'`,{cause:r})}}),set:function(){var r=y(function*(t){if(!t||typeof t!="object")throw new Error("data needs to be an object");yield ot(e,JSON.stringify(t))});return function(t){return r.apply(this,arguments)}}(),exists:y(function*(){return yield oo(e)})}}function hm(e,r,t){var o=new WeakMap;return new Proxy(e,{get(n,a){if(a===Zp)return t;var c=[...r,a],f=n[a];if(f&&typeof f=="object"){var g=f;f=o.get(g),f||(f=hm(g,c,t),o.set(g,f))}return f!=null&&t.emit("GET",{path:c,value:f}),f},set(n,a,c){return n[a]=c,t.emit("SET",{path:[...r,a],value:c}),!0},deleteProperty(n,a){var c=delete n[a];return c&&t.emit("DEL",{path:[...r,a]}),c}})}function eg(e={}){var r=new fo;return{proxy:hm(e,[],r),emitter:r}}function vm(e,r){return Fl.apply(this,arguments)}function Fl(){return Fl=y(function*(e,r){io[e]=r,yield Bl(e).set(r)}),Fl.apply(this,arguments)}function rg(e,r={},t){var o=a=>{var{proxy:c,emitter:f}=eg(a),g=()=>n.set(c);f.on("SET",g),f.on("DEL",g),t(c)},n=Bl(e);io[e]?o(io[e]):n.exists().then(function(){var a=y(function*(c){c?o(yield n.get()):(yield n.set(r),o(r))});return function(c){return a.apply(this,arguments)}}())}function Ul(e){return Ml.apply(this,arguments)}function Ml(){return Ml=y(function*(e){if(io[e])return io[e];var r=Bl(e);if(yield r.exists())return io[e]=yield r.get();console.log("no "+e)}),Ml.apply(this,arguments)}function _m(e){return io[e]}function jl(...e){return Promise.all(e.map(r=>r[gm]))}var Zp,Qp,gm,io,Rn,kl=h(()=>{"use strict";s();l();te();no();qn();Zp=Symbol.for("felocord.storage.emitter"),Qp=Symbol.for("felocord.storage.initError"),gm=Symbol.for("felocord.storage.promise"),io={};Rn=(e,r={})=>{var t=new Promise(g=>c=g),o,n,a,c;rg(e,r,g=>{o=g,n=!0,c()});var f=()=>{if(n)return!0;throw new Error("Attempted to access storage without initializing")};return new Proxy({},{...Object.fromEntries(Object.getOwnPropertyNames(Reflect).map(g=>[g,(E,...x)=>f()&&Reflect[g](o,...x)])),get(g,E,x){return E===Qp?a:E===gm?t:f()&&Reflect.get(o??g,E,x)}})}});var Hl={};F(Hl,{fs:()=>_n,loader:()=>hs,modules:()=>Gn});var ym=h(()=>{"use strict";s();l();no();Sr();hr()});var Gl={};F(Gl,{assets:()=>zo,commands:()=>Ya,debug:()=>Na,flux:()=>Nl,native:()=>Hl,patcher:()=>Ut,settings:()=>ua,storage:()=>na});var Vl=h(()=>{"use strict";s();l();ne();An();rt();Ol();ym();qe();Ce();le()});function Cn(e,r){return(...t)=>{var o=r(...t);return e.push(o),o}}function xm(e){var r=new Array,t={...window.felocord,api:{...window.felocord.api,patcher:{before:Cn(r,Ut.before),after:Cn(r,Ut.after),instead:Cn(r,Ut.instead)},commands:{...window.felocord.api.commands,registerCommand:Cn(r,Do)},flux:{...window.felocord.api.flux,intercept:Cn(r,window.felocord.api.flux.intercept)}},plugin:{createStorage:()=>Rn(`plugins/storage/${e}.json`),manifest:Ie.get(e),logger:Ne}};return{object:t,disposers:r}}var Sm=h(()=>{"use strict";s();l();Vl();An();kl();Kr();In()});var On={};F(On,{apiObjects:()=>ec,checkAndRegisterUpdates:()=>ug,corePluginInstances:()=>qa,deleteRepository:()=>sg,disablePlugin:()=>cg,enablePlugin:()=>lg,getId:()=>og,getPluginSettingsComponent:()=>ng,initPlugins:()=>rc,installPlugin:()=>fg,isPluginEnabled:()=>Am,isPluginInstalled:()=>so,pluginInstances:()=>Hr,pluginRepositories:()=>Rt,pluginSettings:()=>tr,refreshPlugin:()=>ag,registeredPlugins:()=>Ie,startPlugin:()=>Nn,stopPlugin:()=>Za,uninstallPlugin:()=>wm,updateAndWritePlugin:()=>Ln,updateRepository:()=>ig});function ve(e,r,t){if(!e)throw new Error(`[${r}] Attempted to ${t}`)}function Em(e,r){if(Eo.gt(e,r))return!0;var t=Eo.coerce(e);return t==null?!1:Eo.prerelease(e)?.includes("dev")&&Eo.eq(t,r)}function Pn(e){return"parentRepository"in e}function og(e){var r=Ja.get(e);return ve(r,e?.name??"unknown","getting ID from an unregistered/invalid manifest"),r}function ng(e){var r=Hr.get(e);return r&&r.SettingsComponent?r.SettingsComponent:null}function so(e){return tr[e]!=null}function Am(e){return!!tr[e]?.enabled}function Ln(e,r,t){return zl.apply(this,arguments)}function zl(){return zl=y(function*(e,r,t){var o=yield Tm(e,`plugins/${r}/manifest.json`);if(o.parentRepository=e,t){o.jsPath=`plugins/scripts/${r}.js`;var n=yield tg(e,`plugins/${r}/index.js`);yield ot(o.jsPath,n)}if(yield vm(`plugins/manifests/${r}.json`,o),Ie.has(r)){var a=Ie.get(r);return Object.assign(a,o)}return o}),zl.apply(this,arguments)}function ag(e,r){return $l.apply(this,arguments)}function $l(){return $l=y(function*(e,r){var t=Ie.get(e);ve(t,e,"refresh a non-registered plugin"),ve(Hr.get(e),e,"refresh a non-started plugin"),Za(e),Pn(t)&&(t=yield Ln(r??t.parentRepository,e,!0)),Ie.delete(e),Ie.set(e,t),Ja.set(t,e),yield Nn(e)}),$l.apply(this,arguments)}function ig(e){return Yl.apply(this,arguments)}function Yl(){return Yl=y(function*(e){var r=yield Tm(e,"repo.json"),t=Rt[e],o=!1;if(t)for(var a in t)r[a]||delete t[a];else{for(var n in r)if(qa.has(n))throw new Error(`Plugins can't have the same ID as any of Felocord core plugin '${n}'`);o=!0,Rt[e]=r}yield Promise.all(Object.keys(r).map(function(){var E=y(function*(x){if(!t||!t[x]||r[x].alwaysFetch||Em(r[x].version,t[x].version))o=!0,Rt[e][x]=r[x],yield Ln(e,x,!!(t&&tr[x]));else{var O=yield Ul(`plugins/manifests/${x}.json`);O===void 0&&(yield Ln(e,x,!!(t&&tr[x])))}});return function(x){return E.apply(this,arguments)}}()));for(var c in r){var f=_m(`plugins/manifests/${c}.json`);if(f!==void 0){var g=Ie.get(c);g&&!Em(f.version,g.version)||(Ie.set(c,f),Ja.set(f,c))}}return o}),Yl.apply(this,arguments)}function sg(e){return Wl.apply(this,arguments)}function Wl(){return Wl=y(function*(e){ve(e!==Vi,e,"delete the official repository"),ve(Rt[e],e,"delete a non-registered repository");var r=[];for(var[t,o]of Ie)!Pn(o)||o.parentRepository!==e||(so(t)&&r.push(wm(t)),Ie.delete(t));delete Rt[e],yield Promise.all(r)}),Wl.apply(this,arguments)}function lg(e,r){return Kl.apply(this,arguments)}function Kl(){return Kl=y(function*(e,r){ve(so(e),e,"enable a non-installed plugin"),tr[e].enabled=!0,r&&(yield Nn(e))}),Kl.apply(this,arguments)}function cg(e){ve(so(e),e,"disable a non-installed plugin"),Hr.has(e)&&Za(e),tr[e].enabled=!1}function fg(e,r){return Xl.apply(this,arguments)}function Xl(){return Xl=y(function*(e,r){var t=Ie.get(e);ve(t,e,"install an non-registered plugin"),ve(!so(e),e,"install an already installed plugin"),ve(Pn(t),e,"install a core plugin"),yield Ln(t.parentRepository,e,!0),tr[e]={enabled:!0},r&&Nn(e)}),Xl.apply(this,arguments)}function wm(e){return ql.apply(this,arguments)}function ql(){return ql=y(function*(e){var r=Ie.get(e);ve(r,e,"uninstall an unregistered plugin"),ve(so(e),e,"uninstall a non-installed plugin"),ve(Pn(r),e,"uninstall a core plugin"),Hr.has(e)&&Za(e),delete tr[e],yield to(`plugins/scripts/${e}.js`)}),ql.apply(this,arguments)}function Nn(e){return Jl.apply(this,arguments)}function Jl(){return Jl=y(function*(e){var r=Ie.get(e);ve(r,e,"start a non-registered plugin"),ve(so(e),e,"start a non-installed plugin"),ve(tr[e]?.enabled,e,"start a disabled plugin"),ve(!Hr.has(e),e,"start an already started plugin"),yield Ul(`plugins/storage/${e}.json`);var t;if(Pn(r)){try{var o=yield vn(r.jsPath),n=globalEvalWithSourceUrl(`(felocord,definePlugin)=>{${o};return plugin?.default ?? plugin;}`,`felocord-plugin/${e}-${r.version}`)}catch(c){throw new Error("An error occured while parsing plugin's code, possibly a syntax error?",{cause:c})}try{var a=xm(e);if(t=n(a.object,c=>Object.assign(c,{manifest:r})),!t)throw new Error(`Plugin '${e}' does not export a valid plugin instance`);ec.set(e,a),Hr.set(e,t)}catch(c){throw new Error("An error occured while instantiating plugin's code",{cause:c})}}else t=qa.get(e),ve(t,e,"start a non-existent core plugin"),Hr.set(e,t);try{t.start?.()}catch(c){throw new Error("An error occured while starting the plugin",{cause:c})}}),Jl.apply(this,arguments)}function Za(e){var r=Hr.get(e);ve(r,e,"stop a non-started plugin"),r.stop?.();var t=ec.get(e);t?.disposers.forEach(o=>o()),Hr.delete(e)}function ug(){return Zl.apply(this,arguments)}function Zl(){return Zl=y(function*(){yield jl(Rt,tr);var e=pm();for(var r in e){var{default:t,preenabled:o}=e[r];tr[r]??={enabled:o??!0},Ie.set(r,t.manifest),Ja.set(t.manifest,r),qa.set(r,t)}}),Zl.apply(this,arguments)}function rc(){return Ql.apply(this,arguments)}function Ql(){return Ql=y(function*(){yield jl(Rt,tr),yield m([...Ie.keys()].map(function(){var e=y(function*(r){Am(r)&&(yield Nn(r))});return function(r){return e.apply(this,arguments)}}()))}),Ql.apply(this,arguments)}var qa,Ie,Hr,ec,Rt,tr,Ja,bm,tg,Tm,In=h(()=>{"use strict";s();l();te();Dl();no();kl();yr();vt();V();Sm();qa=new Map,Ie=new Map,Hr=new Map,ec=new Map,Rt=Rn("plugins/repositories.json"),tr=Rn("plugins/settings.json"),Ja=new WeakMap,bm=(e,r)=>He(new URL(r,e),{cache:"no-store"}),tg=(e,r)=>bm(e,r).then(t=>t.text()),Tm=(e,r)=>bm(e,r).then(t=>t.json())});function dg(){var e=Re("ErrorBoundary")[ta];return new Promise(r=>{e.getExports(t=>{r(t.prototype)})})}var it,zI,mg,Dn,Rm,Cm,Im=h(()=>{"use strict";s();l();q();fe();rt();hr();qe();Ce();we();gn();oe();Xo();Q();bt();Ar();Ur();it=k(ae()),zI=Re("ErrorBoundary"),{BadgableTabBar:mg}=G(()=>B("BadgableTabBar")),Dn=qt({container:{flex:1,backgroundColor:he.BACKGROUND_PRIMARY,paddingHorizontal:16},header:{flex:1,flexDirection:"row",justifyContent:"center",alignItems:"center",marginVertical:8},headerTitle:{...ur["heading-md/semibold"],textAlign:"center",textTransform:"uppercase",color:he.HEADER_PRIMARY},headerDescription:{...ur["text-sm/medium"],textAlign:"center",color:he.TEXT_MUTED},footer:{flexDirection:Lr.isTablet?"row":"column",justifyContent:"flex-end",marginVertical:8}}),Rm=[{id:"message",title:()=>u.MESSAGE},{id:"stack",title:()=>u.STACK_TRACE},{id:"componentStack",title:()=>u.COMPONENT,trimWhitespace:!0}];Cm=()=>Z.await("render",dg(),function(e,r){if(this.state.error){this.state.activeTab??="message";var t=Rm.find(a=>a.id===this.state.activeTab),o=this.state.error[this.state.activeTab],n=[{text:u.RELOAD_DISCORD,onPress:this.handleReload},...I.safeMode?.enabled?[]:[{text:u.RELOAD_IN_SAFE_MODE,onPress:mn}],{text:u.RETRY_RENDER,color:dr.RED,onPress:()=>this.setState({info:null,error:null})}];return i(me,{children:T(xa,{style:Dn.container,children:[T(it.View,{style:Dn.header,children:[i(r.props.Illustration,{style:{transform:[{scale:.6}],marginLeft:-40,marginRight:-80}}),T(it.View,{style:{flex:2,paddingLeft:24},children:[i(it.Text,{style:Dn.headerTitle,children:r.props.title}),i(it.Text,{style:Dn.headerDescription,children:r.props.body})]})]}),T(it.View,{style:{flex:6},children:[i(it.View,{style:{paddingBottom:8},children:i(mg,{tabs:Rm.map(a=>({...a,title:a.title()})),activeTab:this.state.activeTab,onTabSelected:a=>{this.setState({activeTab:a})}})}),i(Tr,{selectable:!0,style:{flex:1,textAlignVertical:"top"},children:t?.trimWhitespace?o.split(`
`).filter(a=>a.length!==0).map(a=>a.trim()).join(`
`):o})]}),i(it.View,{style:Dn.footer,children:n.map(a=>{var c=n.indexOf(a)!==0?8:0;return i(_a,{text:a.text,color:a.color??dr.BRAND,size:a.size??"small",onPress:a.onPress,style:{...Lr.isTablet?{flex:`0.${n.length}`,marginLeft:c}:{marginTop:c},borderRadius:16}})})})]})})}})});var Lm=h(()=>{"use strict";s();l()});var Pm=h(()=>{"use strict";s();l()});var tc={};F(tc,{alerts:()=>Ha,color:()=>ba,components:()=>Aa,settings:()=>Ys,styles:()=>Hs,toasts:()=>Ia});var Nm=h(()=>{"use strict";s();l();eo();bt();Ar();Ro();Ur();wr()});var oc={};F(oc,{api:()=>Gl,fonts:()=>Sn,managers:()=>pg,metro:()=>Fa,plugins:()=>On,themes:()=>$t,ui:()=>tc,unload:()=>Fn,utils:()=>aa});function Fn(){for(var e of Om)typeof e=="function"&&e();delete window.felocord}var pg,Om,Dm=h(()=>{"use strict";s();l();Lm();Pm();Vl();ao();In();Ze();Nm();yr();Co();ao();In();Ze();we();pg=ye(()=>(console.warn("felocord.managers.* is deprecated, and moved the top level (felocord.*). felocord.managers will be eventually removed soon"),{get fonts(){return Sn},get plugins(){return On},get themes(){return $t}}),{hint:"object"}),Om=[];Fn.push=e=>{Om.push(e)}});var Fm={};F(Fm,{default:()=>gg});var gg,Mm=h(()=>{"use strict";s();l();te();vf();fe();qs();tm();tt();An();rt();Ol();no();Sr();hr();ao();In();Ze();Kr();Im();Ro();Dm();gg=y(function*(){if(lr())try{de()&&(Y.removeFile!=null?to("vendetta_theme.json",""):ot("vendetta_theme.json","null","")),ls()}catch(e){console.error("[Felocord] Failed to initialize themes...",e)}yield Promise.all([Pl(),$s(),Ks(),Ll(),ss(),rm(),Ef(),Il(),hf(),Cm()]).then(e=>e.forEach(r=>r&&Fn.push(r))),window.felocord=oc,M.initPlugins().then(e=>Fn.push(e)).catch(()=>alert("Failed to initialize Vendetta plugins")),rc(),El(),Ne.log("Felocord is ready!")})});s();l();te();var{instead:hg}=Hn();globalThis.window=globalThis;function Bm(){return nc.apply(this,arguments)}function nc(){return nc=y(function*(){try{Object.freeze=Object.seal=Object,yield(kt(),je(mf)).initMetroCache(),yield(Mm(),je(Fm)).default()}catch(t){var{ClientInfoManager:e}=(hr(),je(Gn)),r=t instanceof Error?t.stack:void 0;console.log(r??t?.toString?.()??t),alert([`Failed to load Felocord!
`,`Build Number: ${e.Build}`,"Felocord: 10885c3-main",r||t?.toString?.()].join(`
`))}}),nc.apply(this,arguments)}if(typeof globalThis.__r<"u")Bm();else{var e=function(r){var t=window.__fbBatchedBridge,o=new Array,n=hg("callFunctionReturnFlushedQueue",t,(c,f)=>c[0]==="AppRegistry"||!t.getCallableModule(c[0])?(o.push(c),t.flushedQueue()):f.apply(t,c)),a=function(){var c=y(function*(){yield Bm(),n(),r(0),o.forEach(f=>t.getCallableModule(f[0])&&t.__callFunction(...f))});return function(){return c.apply(this,arguments)}}();a()};vg=e,Object.defineProperties(globalThis,{__r:{configurable:!0,get:()=>Qa,set(r){Qa=function(o){if(o===0)e(r),Qa=r;else return r(o)}}},__d:{configurable:!0,get(){return window.Object&&!window.modules&&(window.modules=window.__c?.()),this.value},set(r){this.value=r}}})}var Qa,vg;})();
//# sourceURL=felocord