diff --git a/docs/assets/index-46943740.js b/docs/assets/index-f96bc5d5.js similarity index 82% rename from docs/assets/index-46943740.js rename to docs/assets/index-f96bc5d5.js index a887d26..5f225a9 100644 --- a/docs/assets/index-46943740.js +++ b/docs/assets/index-f96bc5d5.js @@ -1,14 +1,14 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const r of s.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&n(r)}).observe(document,{childList:!0,subtree:!0});function l(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=l(i);fetch(i.href,s)}})();function z(){}function Nt(e){return!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}function ht(e){return e()}function qe(){return Object.create(null)}function ae(e){e.forEach(ht)}function bt(e){return typeof e=="function"}function me(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function Ct(e){return Object.keys(e).length===0}function d(e,t){e.appendChild(t)}function g(e,t,l){e.insertBefore(t,l||null)}function b(e){e.parentNode&&e.parentNode.removeChild(e)}function Ce(e,t){for(let l=0;le.removeEventListener(t,l,n)}function y(e,t,l){l==null?e.removeAttribute(t):e.getAttribute(t)!==l&&e.setAttribute(t,l)}function jt(e,t,l){const n=new Set;for(let i=0;ie.push(n))},r(){t.forEach(l=>e.splice(e.indexOf(l),1))}}}function Pt(e){return Array.from(e.childNodes)}function I(e,t){t=""+t,e.data!==t&&(e.data=t)}function re(e,t){e.value=t??""}let Ne;function te(e){Ne=e}function Et(){if(!Ne)throw new Error("Function called outside component initialization");return Ne}const pe=[],x=[];let _e=[];const Se=[],Mt=Promise.resolve();let Be=!1;function At(){Be||(Be=!0,Mt.then(De))}function Re(e){_e.push(e)}function ce(e){Se.push(e)}const Le=new Set;let de=0;function De(){if(de!==0)return;const e=Ne;do{try{for(;dee.indexOf(n)===-1?t.push(n):l.push(n)),l.forEach(n=>n()),_e=t}const Me=new Set;let ue;function he(){ue={r:0,c:[],p:ue}}function be(){ue.r||ae(ue.c),ue=ue.p}function D(e,t){e&&e.i&&(Me.delete(e),e.i(t))}function G(e,t,l,n){if(e&&e.o){if(Me.has(e))return;Me.add(e),ue.c.push(()=>{Me.delete(e),n&&(l&&e.d(1),n())}),e.o(t)}else n&&n()}function ze(e,t){const l=t.token={};function n(i,s,r,u){if(t.token!==l)return;t.resolved=u;let o=t.ctx;r!==void 0&&(o=o.slice(),o[r]=u);const c=i&&(t.current=i)(o);let a=!1;t.block&&(t.blocks?t.blocks.forEach((_,h)=>{h!==s&&_&&(he(),G(_,1,1,()=>{t.blocks[h]===_&&(t.blocks[h]=null)}),be())}):t.block.d(1),c.c(),D(c,1),c.m(t.mount(),t.anchor),a=!0),t.block=c,t.blocks&&(t.blocks[s]=c),a&&De()}if(Nt(e)){const i=Et();if(e.then(s=>{te(i),n(t.then,1,t.value,s),te(null)},s=>{if(te(i),n(t.catch,2,t.error,s),te(null),!t.hasCatch)throw s}),t.current!==t.pending)return n(t.pending,0),!0}else{if(t.current!==t.then)return n(t.then,1,t.value,e),!0;t.resolved=e}}function vt(e,t,l){const n=t.slice(),{resolved:i}=e;e.current===e.then&&(n[e.value]=i),e.current===e.catch&&(n[e.error]=i),e.block.p(n,l)}function fe(e,t,l){const n=e.$$.props[t];n!==void 0&&(e.$$.bound[n]=l,l(e.$$.ctx[n]))}function ie(e){e&&e.c()}function le(e,t,l,n){const{fragment:i,after_update:s}=e.$$;i&&i.m(t,l),n||Re(()=>{const r=e.$$.on_mount.map(ht).filter(bt);e.$$.on_destroy?e.$$.on_destroy.push(...r):ae(r),e.$$.on_mount=[]}),s.forEach(Re)}function ne(e,t){const l=e.$$;l.fragment!==null&&(Tt(l.after_update),ae(l.on_destroy),l.fragment&&l.fragment.d(t),l.on_destroy=l.fragment=null,l.ctx=[])}function St(e,t){e.$$.dirty[0]===-1&&(pe.push(e),At(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const v=N.length?N[0]:h;return c.ctx&&i(c.ctx[_],c.ctx[_]=v)&&(!c.skip_bound&&c.bound[_]&&c.bound[_](v),a&&St(e,_)),h}):[],c.update(),a=!0,ae(c.before_update),c.fragment=n?n(c.ctx):!1,t.target){if(t.hydrate){const _=Pt(t.target);c.fragment&&c.fragment.l(_),_.forEach(b)}else c.fragment&&c.fragment.c();t.intro&&D(e.$$.fragment),le(e,t.target,t.anchor,t.customElement),De()}te(o)}class ke{$destroy(){ne(this,1),this.$destroy=z}$on(t,l){if(!bt(l))return z;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(l),()=>{const i=n.indexOf(l);i!==-1&&n.splice(i,1)}}$set(t){this.$$set&&!Ct(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function Bt(e){let t,l,n;return{c(){t=k("button"),t.textContent="Copy",y(t,"id","cbut"),y(t,"class","transition ease-in-out hover:-translate-y-0.5 rounded-lg border w-full p-3 mb-3 items-stretch bg-gray-300 border-gray-400 text-sm leading-5 font-medium text-gray-900 hover:text-gray-600 focus:outline-none")},m(i,s){g(i,t,s),e[2](t),l||(n=[Y(t,"mouseleave",e[3]),Y(t,"click",e[4])],l=!0)},p:z,i:z,o:z,d(i){i&&b(t),e[2](null),l=!1,ae(n)}}}function Rt(e,t,l){let n,{id:i}=t;function s(o){x[o?"unshift":"push"](()=>{n=o,l(1,n)})}const r=()=>{n.textContent!=="Copy"&&l(1,n.textContent="Copy",n)},u=()=>{navigator.clipboard.writeText(document.getElementById(i).innerText),n.textContent!=="Copied ✔"&&l(1,n.textContent="Copied ✔",n)};return e.$$set=o=>{"id"in o&&l(0,i=o.id)},[i,n,s,r,u]}class Je extends ke{constructor(t){super(),ge(this,t,Rt,Bt,me,{id:0})}}function We(e,t,l){const n=e.slice();return n[6]=t[l],n[7]=t,n[8]=l,n}function Ye(e){let t,l,n,i=e[0].patchOptions,s=[];for(let r=0;rl(3,r=!r),o=(c,a,_,h)=>{l(0,a[_].value=h.target.value,n),l(0,a[_].is_selected=!0,n),s[n.name]===void 0&&l(1,s[n.name]={},s),s[n.name][c.key]===void 0&&l(1,s[n.name][c.key]=[],s),l(1,s[n.name][c.key]=c.value,s)};return e.$$set=c=>{"patch"in c&&l(0,n=c.patch),"optionName"in c&&l(2,i=c.optionName),"selectedOpts"in c&&l(1,s=c.selectedOpts)},[n,s,i,r,u,o]}class Vt extends ke{constructor(t){super(),ge(this,t,Dt,zt,me,{patch:0,optionName:2,selectedOpts:1})}}function Ue(e,t,l){const n=e.slice();return n[12]=t[l],n}function Xe(e){let t,l,n,i,s,r,u,o,c,a,_=e[3],h=[];for(let v=0;v<_.length;v+=1)h[v]=xe(Ue(e,_,v));const N=v=>G(h[v],1,1,()=>{h[v]=null});return{c(){t=k("p"),l=k("button"),n=O(e[5]),i=E(),s=k("div"),r=k("div"),u=k("p");for(let v=0;vfe(l,"selectedOpts",s)),{c(){t=k("p"),ie(l.$$.fragment),y(t,"class","ml-6")},m(u,o){g(u,t,o),le(l,t,null),i=!0},p(u,o){const c={};o&8&&(c.patch=u[12]),!n&&o&2&&(n=!0,c.selectedOpts=u[1],ce(()=>n=!1)),l.$set(c)},i(u){i||(D(l.$$.fragment,u),i=!0)},o(u){G(l.$$.fragment,u),i=!1},d(u){u&&b(t),ne(l)}}}function xe(e){let t,l,n,i=!1,s,r,u=e[12].name+"",o,c,a,_,h,N,v,p=e[12].description+"",f,C,A,T,B,P,w,R,L,S=e[12].warn!==void 0&&e[12].warn&&Ze();function H(V,K){return V[12].pkg_versions.length>0?Ft:It}let m=H(e),j=m(e),F=e[12].patchOptions.length>0&&$e(e);return w=kt(e[9][0]),{c(){t=k("label"),l=k("input"),s=E(),r=k("span"),o=O(u),c=E(),S&&S.c(),a=E(),_=k("p"),j.c(),h=E(),N=k("p"),v=O("- "),f=O(p),C=E(),F&&F.c(),A=E(),T=k("div"),B=E(),y(l,"type","checkbox"),l.__value=n=e[12],l.value=l.__value,y(_,"class","ml-6"),y(N,"class","font-bold font-mono ml-6"),y(T,"class","pb-2"),y(t,"class","items-center"),w.p(l)},m(V,K){g(V,t,K),d(t,l),l.checked=~(e[0]||[]).indexOf(l.__value),d(t,s),d(t,r),d(r,o),d(r,c),S&&S.m(r,null),d(r,a),d(r,_),j.m(_,null),d(t,h),d(t,N),d(N,v),d(N,f),d(t,C),F&&F.m(t,null),d(t,A),d(t,T),d(t,B),P=!0,R||(L=Y(l,"change",e[8]),R=!0)},p(V,K){(!P||K&8&&n!==(n=V[12]))&&(l.__value=n,l.value=l.__value,i=!0),(i||K&9)&&(l.checked=~(V[0]||[]).indexOf(l.__value)),(!P||K&8)&&u!==(u=V[12].name+"")&&I(o,u),V[12].warn!==void 0&&V[12].warn?S||(S=Ze(),S.c(),S.m(r,a)):S&&(S.d(1),S=null),m===(m=H(V))&&j?j.p(V,K):(j.d(1),j=m(V),j&&(j.c(),j.m(_,null))),(!P||K&8)&&p!==(p=V[12].description+"")&&I(f,p),V[12].patchOptions.length>0?F?(F.p(V,K),K&8&&D(F,1)):(F=$e(V),F.c(),D(F,1),F.m(t,A)):F&&(he(),G(F,1,1,()=>{F=null}),be())},i(V){P||(D(F),P=!0)},o(V){G(F),P=!1},d(V){V&&b(t),S&&S.d(),j.d(),F&&F.d(),w.r(),R=!1,L()}}}function Ht(e){let t,l,n,i,s,r,u,o,c=e[4]&&Xe(e);return{c(){t=k("div"),l=k("button"),n=k("span"),i=O(e[2]),s=E(),c&&c.c(),y(l,"class","inline-flex justify-center items-center space-x-2 border border-gray-300 rounded-md py-2 px-4 bg-white text-sm leading-5 font-medium text-gray-900 hover:text-gray-600 focus:outline-none focus:border-gray-300 focus:ring-blue active:bg-gray-50 active:text-gray-800"),y(t,"class","relative inline-block text-left")},m(a,_){g(a,t,_),d(t,l),d(l,n),d(n,i),d(t,s),c&&c.m(t,null),r=!0,u||(o=Y(l,"click",e[7]),u=!0)},p(a,[_]){(!r||_&4)&&I(i,a[2]),a[4]?c?(c.p(a,_),_&16&&D(c,1)):(c=Xe(a),c.c(),D(c,1),c.m(t,null)):c&&(he(),G(c,1,1,()=>{c=null}),be())},i(a){r||(D(c),r=!0)},o(a){G(c),r=!1},d(a){a&&b(t),c&&c.d(),u=!1,o()}}}function Kt(e,t,l){let{optionName:n}=t,{options:i}=t,s=!1,{selected:r=[]}=t;const u=p=>{for(const f of p)f.use&&r.push(f)},o=()=>{c==="Deselect All"?(l(0,r.length=0,r),l(5,c="Select Default")):(l(0,r.length=0,r),u(i),l(5,c="Deselect All"))};let c="Deselect All",{selectedOpts:a}=t;const _=[[]],h=()=>l(4,s=!s);function N(){r=jt(_[0],this.__value,this.checked),l(0,r)}function v(p){a=p,l(1,a)}return e.$$set=p=>{"optionName"in p&&l(2,n=p.optionName),"options"in p&&l(3,i=p.options),"selected"in p&&l(0,r=p.selected),"selectedOpts"in p&&l(1,a=p.selectedOpts)},e.$$.update=()=>{e.$$.dirty&8&&u(i)},[r,a,n,i,s,c,o,h,N,_,v]}class Gt extends ke{constructor(t){super(),ge(this,t,Kt,Ht,me,{optionName:2,options:3,selected:0,selectedOpts:1})}}function et(e,t,l){const n=e.slice();return n[7]=t[l],n}function tt(e){let t,l,n,i=e[2],s=[];for(let r=0;rl(3,r=!r);function c(){s=this.__value,l(0,s)}return e.$$set=a=>{"optionName"in a&&l(1,n=a.optionName),"options"in a&&l(2,i=a.options),"selected"in a&&l(0,s=a.selected)},[s,n,i,r,o,c,u]}class Te extends ke{constructor(t){super(),ge(this,t,Jt,qt,me,{optionName:1,options:2,selected:0})}}function Wt(e){let t,l,n;return{c(){t=k("div"),l=O("Could not fetch patches from "),n=O(e[12]),y(t,"class","border border-t-0 border-red-200 rounded-b bg-red-100 text-red-400")},m(i,s){g(i,t,s),d(t,l),d(t,n)},p(i,s){s[0]&4096&&I(n,i[12])},i:z,o:z,d(i){i&&b(t)}}}function Yt(e){let t,l,n,i,s,r;function u(a){e[27](a)}function o(a){e[28](a)}let c={optionName:"patches",options:e[10]};return e[5]!==void 0&&(c.selected=e[5]),e[9]!==void 0&&(c.selectedOpts=e[9]),n=new Gt({props:c}),x.push(()=>fe(n,"selected",u)),x.push(()=>fe(n,"selectedOpts",o)),{c(){t=k("hr"),l=E(),ie(n.$$.fragment),y(t,"class","my-3 border-t border-gray-300")},m(a,_){g(a,t,_),g(a,l,_),le(n,a,_),r=!0},p(a,_){const h={};_[0]&1024&&(h.options=a[10]),!i&&_[0]&32&&(i=!0,h.selected=a[5],ce(()=>i=!1)),!s&&_[0]&512&&(s=!0,h.selectedOpts=a[9],ce(()=>s=!1)),n.$set(h)},i(a){r||(D(n.$$.fragment,a),r=!0)},o(a){G(n.$$.fragment,a),r=!1},d(a){a&&b(t),a&&b(l),ne(n,a)}}}function Qt(e){return{c:z,m:z,p:z,i:z,o:z,d:z}}function Ut(e){let t,l,n=(e[6]?e[6]:e[3])+"",i,s,r,u,o,c,a,_,h,N,v,p,f,C,A,T,B,P,w,R,L,S,H,m,j,F,V,K,ve,je,M,W,Z,oe,Pe,ye,we,Q,ee,U,Oe,se,$,Ae,Ve;function yt(q){e[22](q)}let Ie={optionName:"version",options:["auto","latest","beta"]};e[7]!==void 0&&(Ie.selected=e[7]),w=new Te({props:Ie}),x.push(()=>fe(w,"selected",yt));function wt(q){e[24](q)}let Fe={optionName:"build-mode",options:["apk","both","module"]};e[4]!==void 0&&(Fe.selected=e[4]),K=new Te({props:Fe}),x.push(()=>fe(K,"selected",wt));function Ot(q){e[25](q)}let He={optionName:"apkmirror arch",options:["universal","arm64-v8a","arm-v7a","both"]};e[1]!==void 0&&(He.selected=e[1]),Z=new Te({props:He}),x.push(()=>fe(Z,"selected",Ot));let X={ctx:e,current:null,token:null,hasCatch:!0,pending:Qt,then:Yt,catch:Wt,value:10,error:31,blocks:[,,,]};return ze(se=e[10],X),{c(){t=k("details"),l=k("summary"),i=O(n),s=E(),r=k("button"),r.textContent="-",u=E(),o=k("div"),c=k("label"),a=O(`app-name: +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const r of s.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&n(r)}).observe(document,{childList:!0,subtree:!0});function l(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=l(i);fetch(i.href,s)}})();function z(){}function Nt(e){return!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}function ht(e){return e()}function qe(){return Object.create(null)}function ae(e){e.forEach(ht)}function bt(e){return typeof e=="function"}function me(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function Ct(e){return Object.keys(e).length===0}function d(e,t){e.appendChild(t)}function g(e,t,l){e.insertBefore(t,l||null)}function b(e){e.parentNode&&e.parentNode.removeChild(e)}function Ce(e,t){for(let l=0;le.removeEventListener(t,l,n)}function y(e,t,l){l==null?e.removeAttribute(t):e.getAttribute(t)!==l&&e.setAttribute(t,l)}function jt(e,t,l){const n=new Set;for(let i=0;ie.push(n))},r(){t.forEach(l=>e.splice(e.indexOf(l),1))}}}function Pt(e){return Array.from(e.childNodes)}function I(e,t){t=""+t,e.data!==t&&(e.data=t)}function re(e,t){e.value=t??""}let Ne;function te(e){Ne=e}function Et(){if(!Ne)throw new Error("Function called outside component initialization");return Ne}const pe=[],x=[];let _e=[];const Se=[],Mt=Promise.resolve();let Be=!1;function At(){Be||(Be=!0,Mt.then(De))}function Re(e){_e.push(e)}function ce(e){Se.push(e)}const Te=new Set;let de=0;function De(){if(de!==0)return;const e=Ne;do{try{for(;dee.indexOf(n)===-1?t.push(n):l.push(n)),l.forEach(n=>n()),_e=t}const Me=new Set;let ue;function he(){ue={r:0,c:[],p:ue}}function be(){ue.r||ae(ue.c),ue=ue.p}function D(e,t){e&&e.i&&(Me.delete(e),e.i(t))}function K(e,t,l,n){if(e&&e.o){if(Me.has(e))return;Me.add(e),ue.c.push(()=>{Me.delete(e),n&&(l&&e.d(1),n())}),e.o(t)}else n&&n()}function ze(e,t){const l=t.token={};function n(i,s,r,u){if(t.token!==l)return;t.resolved=u;let o=t.ctx;r!==void 0&&(o=o.slice(),o[r]=u);const c=i&&(t.current=i)(o);let a=!1;t.block&&(t.blocks?t.blocks.forEach((_,h)=>{h!==s&&_&&(he(),K(_,1,1,()=>{t.blocks[h]===_&&(t.blocks[h]=null)}),be())}):t.block.d(1),c.c(),D(c,1),c.m(t.mount(),t.anchor),a=!0),t.block=c,t.blocks&&(t.blocks[s]=c),a&&De()}if(Nt(e)){const i=Et();if(e.then(s=>{te(i),n(t.then,1,t.value,s),te(null)},s=>{if(te(i),n(t.catch,2,t.error,s),te(null),!t.hasCatch)throw s}),t.current!==t.pending)return n(t.pending,0),!0}else{if(t.current!==t.then)return n(t.then,1,t.value,e),!0;t.resolved=e}}function vt(e,t,l){const n=t.slice(),{resolved:i}=e;e.current===e.then&&(n[e.value]=i),e.current===e.catch&&(n[e.error]=i),e.block.p(n,l)}function fe(e,t,l){const n=e.$$.props[t];n!==void 0&&(e.$$.bound[n]=l,l(e.$$.ctx[n]))}function ie(e){e&&e.c()}function le(e,t,l,n){const{fragment:i,after_update:s}=e.$$;i&&i.m(t,l),n||Re(()=>{const r=e.$$.on_mount.map(ht).filter(bt);e.$$.on_destroy?e.$$.on_destroy.push(...r):ae(r),e.$$.on_mount=[]}),s.forEach(Re)}function ne(e,t){const l=e.$$;l.fragment!==null&&(Lt(l.after_update),ae(l.on_destroy),l.fragment&&l.fragment.d(t),l.on_destroy=l.fragment=null,l.ctx=[])}function St(e,t){e.$$.dirty[0]===-1&&(pe.push(e),At(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const v=N.length?N[0]:h;return c.ctx&&i(c.ctx[_],c.ctx[_]=v)&&(!c.skip_bound&&c.bound[_]&&c.bound[_](v),a&&St(e,_)),h}):[],c.update(),a=!0,ae(c.before_update),c.fragment=n?n(c.ctx):!1,t.target){if(t.hydrate){const _=Pt(t.target);c.fragment&&c.fragment.l(_),_.forEach(b)}else c.fragment&&c.fragment.c();t.intro&&D(e.$$.fragment),le(e,t.target,t.anchor,t.customElement),De()}te(o)}class ke{$destroy(){ne(this,1),this.$destroy=z}$on(t,l){if(!bt(l))return z;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(l),()=>{const i=n.indexOf(l);i!==-1&&n.splice(i,1)}}$set(t){this.$$set&&!Ct(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function Bt(e){let t,l,n;return{c(){t=k("button"),t.textContent="Copy",y(t,"id","cbut"),y(t,"class","transition ease-in-out hover:-translate-y-0.5 rounded-lg border w-full p-3 mb-3 items-stretch bg-gray-300 border-gray-400 text-sm leading-5 font-medium text-gray-900 hover:text-gray-600 focus:outline-none")},m(i,s){g(i,t,s),e[2](t),l||(n=[Y(t,"mouseleave",e[3]),Y(t,"click",e[4])],l=!0)},p:z,i:z,o:z,d(i){i&&b(t),e[2](null),l=!1,ae(n)}}}function Rt(e,t,l){let n,{id:i}=t;function s(o){x[o?"unshift":"push"](()=>{n=o,l(1,n)})}const r=()=>{n.textContent!=="Copy"&&l(1,n.textContent="Copy",n)},u=()=>{navigator.clipboard.writeText(document.getElementById(i).innerText),n.textContent!=="Copied ✔"&&l(1,n.textContent="Copied ✔",n)};return e.$$set=o=>{"id"in o&&l(0,i=o.id)},[i,n,s,r,u]}class Je extends ke{constructor(t){super(),ge(this,t,Rt,Bt,me,{id:0})}}function We(e,t,l){const n=e.slice();return n[6]=t[l],n[7]=t,n[8]=l,n}function Ye(e){let t,l,n,i=e[0].patchOptions,s=[];for(let r=0;rl(3,r=!r),o=(c,a,_,h)=>{l(0,a[_].value=h.target.value,n),l(0,a[_].is_selected=!0,n),s[n.name]===void 0&&l(1,s[n.name]={},s),s[n.name][c.key]===void 0&&l(1,s[n.name][c.key]=[],s),l(1,s[n.name][c.key]=c.value,s)};return e.$$set=c=>{"patch"in c&&l(0,n=c.patch),"optionName"in c&&l(2,i=c.optionName),"selectedOpts"in c&&l(1,s=c.selectedOpts)},[n,s,i,r,u,o]}class Vt extends ke{constructor(t){super(),ge(this,t,Dt,zt,me,{patch:0,optionName:2,selectedOpts:1})}}function Ue(e,t,l){const n=e.slice();return n[12]=t[l],n}function Xe(e){let t,l,n,i,s,r,u,o,c,a,_=e[3],h=[];for(let v=0;v<_.length;v+=1)h[v]=xe(Ue(e,_,v));const N=v=>K(h[v],1,1,()=>{h[v]=null});return{c(){t=k("p"),l=k("button"),n=O(e[5]),i=E(),s=k("div"),r=k("div"),u=k("p");for(let v=0;vfe(l,"selectedOpts",s)),{c(){t=k("p"),ie(l.$$.fragment),y(t,"class","ml-6")},m(u,o){g(u,t,o),le(l,t,null),i=!0},p(u,o){const c={};o&8&&(c.patch=u[12]),!n&&o&2&&(n=!0,c.selectedOpts=u[1],ce(()=>n=!1)),l.$set(c)},i(u){i||(D(l.$$.fragment,u),i=!0)},o(u){K(l.$$.fragment,u),i=!1},d(u){u&&b(t),ne(l)}}}function xe(e){let t,l,n,i=!1,s,r,u=e[12].name+"",o,c,a,_,h,N,v,p=e[12].description+"",f,C,A,L,B,P,w,R,T,S=e[12].warn!==void 0&&e[12].warn&&Ze();function G(V,H){return V[12].pkg_versions.length>0?Ft:It}let m=G(e),j=m(e),F=e[12].patchOptions.length>0&&$e(e);return w=kt(e[9][0]),{c(){t=k("label"),l=k("input"),s=E(),r=k("span"),o=O(u),c=E(),S&&S.c(),a=E(),_=k("p"),j.c(),h=E(),N=k("p"),v=O("- "),f=O(p),C=E(),F&&F.c(),A=E(),L=k("div"),B=E(),y(l,"type","checkbox"),l.__value=n=e[12],l.value=l.__value,y(_,"class","ml-6"),y(N,"class","font-bold font-mono ml-6"),y(L,"class","pb-2"),y(t,"class","items-center"),w.p(l)},m(V,H){g(V,t,H),d(t,l),l.checked=~(e[0]||[]).indexOf(l.__value),d(t,s),d(t,r),d(r,o),d(r,c),S&&S.m(r,null),d(r,a),d(r,_),j.m(_,null),d(t,h),d(t,N),d(N,v),d(N,f),d(t,C),F&&F.m(t,null),d(t,A),d(t,L),d(t,B),P=!0,R||(T=Y(l,"change",e[8]),R=!0)},p(V,H){(!P||H&8&&n!==(n=V[12]))&&(l.__value=n,l.value=l.__value,i=!0),(i||H&9)&&(l.checked=~(V[0]||[]).indexOf(l.__value)),(!P||H&8)&&u!==(u=V[12].name+"")&&I(o,u),V[12].warn!==void 0&&V[12].warn?S||(S=Ze(),S.c(),S.m(r,a)):S&&(S.d(1),S=null),m===(m=G(V))&&j?j.p(V,H):(j.d(1),j=m(V),j&&(j.c(),j.m(_,null))),(!P||H&8)&&p!==(p=V[12].description+"")&&I(f,p),V[12].patchOptions.length>0?F?(F.p(V,H),H&8&&D(F,1)):(F=$e(V),F.c(),D(F,1),F.m(t,A)):F&&(he(),K(F,1,1,()=>{F=null}),be())},i(V){P||(D(F),P=!0)},o(V){K(F),P=!1},d(V){V&&b(t),S&&S.d(),j.d(),F&&F.d(),w.r(),R=!1,T()}}}function Gt(e){let t,l,n,i,s,r,u,o,c=e[4]&&Xe(e);return{c(){t=k("div"),l=k("button"),n=k("span"),i=O(e[2]),s=E(),c&&c.c(),y(l,"class","inline-flex justify-center items-center space-x-2 border border-gray-300 rounded-md py-2 px-4 bg-white text-sm leading-5 font-medium text-gray-900 hover:text-gray-600 focus:outline-none focus:border-gray-300 focus:ring-blue active:bg-gray-50 active:text-gray-800"),y(t,"class","relative inline-block text-left")},m(a,_){g(a,t,_),d(t,l),d(l,n),d(n,i),d(t,s),c&&c.m(t,null),r=!0,u||(o=Y(l,"click",e[7]),u=!0)},p(a,[_]){(!r||_&4)&&I(i,a[2]),a[4]?c?(c.p(a,_),_&16&&D(c,1)):(c=Xe(a),c.c(),D(c,1),c.m(t,null)):c&&(he(),K(c,1,1,()=>{c=null}),be())},i(a){r||(D(c),r=!0)},o(a){K(c),r=!1},d(a){a&&b(t),c&&c.d(),u=!1,o()}}}function Ht(e,t,l){let{optionName:n}=t,{options:i}=t,s=!1,{selected:r=[]}=t;const u=p=>{for(const f of p)f.use&&r.push(f)},o=()=>{c==="Deselect All"?(l(0,r.length=0,r),l(5,c="Select Default")):(l(0,r.length=0,r),u(i),l(5,c="Deselect All"))};let c="Deselect All",{selectedOpts:a}=t;const _=[[]],h=()=>l(4,s=!s);function N(){r=jt(_[0],this.__value,this.checked),l(0,r)}function v(p){a=p,l(1,a)}return e.$$set=p=>{"optionName"in p&&l(2,n=p.optionName),"options"in p&&l(3,i=p.options),"selected"in p&&l(0,r=p.selected),"selectedOpts"in p&&l(1,a=p.selectedOpts)},e.$$.update=()=>{e.$$.dirty&8&&u(i)},[r,a,n,i,s,c,o,h,N,_,v]}class Kt extends ke{constructor(t){super(),ge(this,t,Ht,Gt,me,{optionName:2,options:3,selected:0,selectedOpts:1})}}function et(e,t,l){const n=e.slice();return n[7]=t[l],n}function tt(e){let t,l,n,i=e[2],s=[];for(let r=0;rl(3,r=!r);function c(){s=this.__value,l(0,s)}return e.$$set=a=>{"optionName"in a&&l(1,n=a.optionName),"options"in a&&l(2,i=a.options),"selected"in a&&l(0,s=a.selected)},[s,n,i,r,o,c,u]}class Le extends ke{constructor(t){super(),ge(this,t,Jt,qt,me,{optionName:1,options:2,selected:0})}}function Wt(e){let t,l,n;return{c(){t=k("div"),l=O("Could not fetch patches from "),n=O(e[12]),y(t,"class","border border-t-0 border-red-200 rounded-b bg-red-100 text-red-400")},m(i,s){g(i,t,s),d(t,l),d(t,n)},p(i,s){s[0]&4096&&I(n,i[12])},i:z,o:z,d(i){i&&b(t)}}}function Yt(e){let t,l,n,i,s,r;function u(a){e[27](a)}function o(a){e[28](a)}let c={optionName:"patches",options:e[10]};return e[5]!==void 0&&(c.selected=e[5]),e[9]!==void 0&&(c.selectedOpts=e[9]),n=new Kt({props:c}),x.push(()=>fe(n,"selected",u)),x.push(()=>fe(n,"selectedOpts",o)),{c(){t=k("hr"),l=E(),ie(n.$$.fragment),y(t,"class","my-3 border-t border-gray-300")},m(a,_){g(a,t,_),g(a,l,_),le(n,a,_),r=!0},p(a,_){const h={};_[0]&1024&&(h.options=a[10]),!i&&_[0]&32&&(i=!0,h.selected=a[5],ce(()=>i=!1)),!s&&_[0]&512&&(s=!0,h.selectedOpts=a[9],ce(()=>s=!1)),n.$set(h)},i(a){r||(D(n.$$.fragment,a),r=!0)},o(a){K(n.$$.fragment,a),r=!1},d(a){a&&b(t),a&&b(l),ne(n,a)}}}function Qt(e){return{c:z,m:z,p:z,i:z,o:z,d:z}}function Ut(e){let t,l,n=(e[6]?e[6]:e[3])+"",i,s,r,u,o,c,a,_,h,N,v,p,f,C,A,L,B,P,w,R,T,S,G,m,j,F,V,H,ve,je,M,W,Z,oe,Pe,ye,we,Q,ee,U,Oe,se,$,Ae,Ve;function yt(q){e[22](q)}let Ie={optionName:"version",options:["auto","latest","beta"]};e[7]!==void 0&&(Ie.selected=e[7]),w=new Le({props:Ie}),x.push(()=>fe(w,"selected",yt));function wt(q){e[24](q)}let Fe={optionName:"build-mode",options:["apk","both","module"]};e[4]!==void 0&&(Fe.selected=e[4]),H=new Le({props:Fe}),x.push(()=>fe(H,"selected",wt));function Ot(q){e[25](q)}let Ge={optionName:"apkmirror arch",options:["universal","arm64-v8a","arm-v7a","both"]};e[1]!==void 0&&(Ge.selected=e[1]),Z=new Le({props:Ge}),x.push(()=>fe(Z,"selected",Ot));let X={ctx:e,current:null,token:null,hasCatch:!0,pending:Qt,then:Yt,catch:Wt,value:10,error:31,blocks:[,,,]};return ze(se=e[10],X),{c(){t=k("details"),l=k("summary"),i=O(n),s=E(),r=k("button"),r.textContent="-",u=E(),o=k("div"),c=k("label"),a=O(`app-name: `),_=k("input"),N=E(),v=k("hr"),p=E(),f=k("label"),C=O(`apkmirror-dlurl: - `),A=k("input"),T=E(),B=k("hr"),P=E(),ie(w.$$.fragment),L=E(),S=k("label"),H=O(`custom: - `),m=k("input"),j=E(),F=k("hr"),V=E(),ie(K.$$.fragment),je=E(),M=k("hr"),W=E(),ie(Z.$$.fragment),Pe=E(),ye=k("hr"),we=E(),Q=k("label"),ee=O(`patches source: - `),U=k("input"),Oe=E(),X.block.c(),y(r,"class","float-right w-7 h-7 rounded-full border-2 border-gray-400 text-gray-400 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-50"),y(_,"id","app-name"),y(_,"type","text"),y(_,"class","border-2 rounded border-gray-300 p-0.5 w-full"),y(_,"placeholder",h=e[3]===e[2]?"Fill in app-name and apkmirror-dlurl":e[3]),y(v,"class","my-3 border-t border-gray-300"),y(A,"type","text"),y(A,"class","border-2 rounded border-gray-300 p-0.5 pl-1 w-full"),y(A,"size","60"),y(B,"class","my-3 border-t border-gray-300"),y(m,"type","text"),y(m,"class","border-2 rounded border-gray-300 p-0.5 w-20"),y(m,"placeholder","18.19.35"),y(F,"class","my-3 border-t border-gray-300"),y(M,"class","my-3 border-t border-gray-300"),y(ye,"class","my-3 border-t border-gray-300"),y(U,"id","patches-source"),y(U,"type","text"),y(U,"class","border-2 rounded border-gray-300 p-0.5 pl-1 w-full"),y(U,"size","60"),y(o,"class","select-none text-xs my-3 py-1 cursor-pointer hover:bg-gray-50 hover:border-gray-300"),y(t,"class","select-none m-3 group p-4 border-2 cursor-pointer rounded-md hover:bg-gray-50 hover:border-gray-300")},m(q,J){g(q,t,J),d(t,l),d(l,i),d(l,s),d(l,r),d(t,u),d(t,o),d(o,c),d(c,a),d(c,_),re(_,e[6]),d(o,N),d(o,v),d(o,p),d(o,f),d(f,C),d(f,A),re(A,e[0]),d(o,T),d(o,B),d(o,P),le(w,o,null),d(o,L),d(o,S),d(S,H),d(S,m),re(m,e[7]),d(o,j),d(o,F),d(o,V),le(K,o,null),d(o,je),d(o,M),d(o,W),le(Z,o,null),d(o,Pe),d(o,ye),d(o,we),d(o,Q),d(Q,ee),d(Q,U),re(U,e[11]),d(o,Oe),X.block.m(o,X.anchor=null),X.mount=()=>o,X.anchor=null,e[29](t),$=!0,Ae||(Ve=[Y(r,"click",e[19]),Y(_,"input",e[20]),Y(A,"input",e[21]),Y(m,"input",e[23]),Y(U,"input",e[26]),Y(U,"blur",e[14])],Ae=!0)},p(q,J){e=q,(!$||J[0]&72)&&n!==(n=(e[6]?e[6]:e[3])+"")&&I(i,n),(!$||J[0]&12&&h!==(h=e[3]===e[2]?"Fill in app-name and apkmirror-dlurl":e[3]))&&y(_,"placeholder",h),J[0]&64&&_.value!==e[6]&&re(_,e[6]),J[0]&1&&A.value!==e[0]&&re(A,e[0]);const Ee={};!R&&J[0]&128&&(R=!0,Ee.selected=e[7],ce(()=>R=!1)),w.$set(Ee),J[0]&128&&m.value!==e[7]&&re(m,e[7]);const Ke={};!ve&&J[0]&16&&(ve=!0,Ke.selected=e[4],ce(()=>ve=!1)),K.$set(Ke);const Ge={};!oe&&J[0]&2&&(oe=!0,Ge.selected=e[1],ce(()=>oe=!1)),Z.$set(Ge),J[0]&2048&&U.value!==e[11]&&re(U,e[11]),X.ctx=e,J[0]&1024&&se!==(se=e[10])&&ze(se,X)||vt(X,e,J)},i(q){$||(D(w.$$.fragment,q),D(K.$$.fragment,q),D(Z.$$.fragment,q),D(X.block),$=!0)},o(q){G(w.$$.fragment,q),G(K.$$.fragment,q),G(Z.$$.fragment,q);for(let J=0;J<3;J+=1){const Ee=X.blocks[J];G(Ee)}$=!1},d(q){q&&b(t),ne(w),ne(K),ne(Z),X.block.d(),X.token=null,X=null,e[29](null),Ae=!1,ae(Ve)}}}async function Xt(e,t){const l=[];for(const n of await t)for(const i of n.compatiblePackages||[])if(i.name===e){const s=new Set;i.versions!==null&&i.versions.forEach(o=>{s.add(o)});const r=[...s],u={name:n.name,description:n.description,pkg_versions:r,use:n.use,patchOptions:n.options};l.push(u)}return l}function Zt(e,t,l){let{pkgName:n}=t,{reprName:i}=t,{apkmirror_dlurl:s="https://apkmirror.com/apk/"}=t,{revancedPatches:r}=t,{TOML:u}=t,o,c=[],a,_="auto",h="revanced/revanced-patches",N="revanced/revanced-patches",v,p=r;function f(){if(h==="revanced/revanced-patches")l(10,p=r);else{l(17,N=h);let M;const W=h.split("/").filter(Boolean);W.length===2?M=`${h}/HEAD`:W.length===3&&(M=h,l(17,N=`${W[0]}/${W[1]}`)),l(12,v=`https://raw.githubusercontent.com/${M}/patches.json`),fetch(v).then(Z=>l(10,p=Xt(n,Z.json())))}}async function C(M){for(const W of await p)M==="auto"||M==="latest"||M==="beta"?W.warn=!1:W.warn=W.pkg_versions.length!==0&&!W.pkg_versions.includes(M)}let A="",T,B=!1,P=[],{arch:w="universal"}=t;const R=()=>{T.parentNode.removeChild(T),l(8,B=!0)};function L(){a=this.value,l(6,a)}function S(){s=this.value,l(0,s)}function H(M){_=M,l(7,_)}function m(){_=this.value,l(7,_)}function j(M){o=M,l(4,o)}function F(M){w=M,l(1,w)}function V(){h=this.value,l(11,h)}function K(M){c=M,l(5,c)}function ve(M){P=M,l(9,P)}function je(M){x[M?"unshift":"push"](()=>{T=M,l(13,T)})}return e.$$set=M=>{"pkgName"in M&&l(2,n=M.pkgName),"reprName"in M&&l(3,i=M.reprName),"apkmirror_dlurl"in M&&l(0,s=M.apkmirror_dlurl),"revancedPatches"in M&&l(16,r=M.revancedPatches),"TOML"in M&&l(15,u=M.TOML),"arch"in M&&l(1,w=M.arch)},e.$$.update=()=>{e.$$.dirty[0]&1&&l(0,s=(M=>M.startsWith("https://apkmirror.com/apk/")||M.startsWith("https://www.apkmirror.com/apk/")||M.length===0?M:"https://apkmirror.com/apk/")(s)),e.$$.dirty[0]&128&&C(_),e.$$.dirty[0]&395259&&p.then(M=>{const W=[],Z=[];let oe;if(c.length>M.length/2){oe=!1;for(const Q of M){const ee=`'${Q.name}'`;!Q.use&&c.includes(Q)?W.push(ee):Q.use&&!c.includes(Q)&&Z.push(ee)}}else oe=!0,c.forEach(Q=>{const ee=`'${Q.name}'`;W.push(ee)});const Pe=W.join(" "),ye=Z.join(" ");a?l(18,A=a):l(18,A=i);const we=[];for(const[Q,ee]of Object.entries(P)){let U=!0;for(const[se,$]of Object.entries(ee))$.length>0&&(U=!1);if(U)break;const Oe=[];for(const[se,$]of Object.entries(ee))$.length>0&&Oe.push({key:se,value:$});we.push({patchName:Q,options:Oe})}l(15,u={app_name:A,apkmirror_dlurl:s,patches_source:N,version:_,build_mode:o,arch:w,included_patches:Pe,excluded_patches:ye,exclusive_patches:oe,deleted:B,opts:we})})},[s,w,n,i,o,c,a,_,B,P,p,h,v,T,f,u,r,N,A,R,L,S,H,m,j,F,V,K,ve,je]}class $t extends ke{constructor(t){super(),ge(this,t,Zt,Ut,me,{pkgName:2,reprName:3,apkmirror_dlurl:0,revancedPatches:16,TOML:15,arch:1},null,[-1,-1])}}function nt(e,t,l){const n=e.slice();return n[13]=t[l],n[14]=t,n[15]=l,n}function rt(e,t,l){const n=e.slice();return n[16]=t[l],n}function it(e){let t,l,n,i,s,r,u,o,c,a,_,h,N,v,p,f=e[7]()+"",C,A,T;l=new Je({props:{id:"config-toml-text"}});let B=e[0],P=[];for(let w=0;wo,X.anchor=null,e[29](t),$=!0,Ae||(Ve=[Y(r,"click",e[19]),Y(_,"input",e[20]),Y(A,"input",e[21]),Y(m,"input",e[23]),Y(U,"input",e[26]),Y(U,"blur",e[14])],Ae=!0)},p(q,J){e=q,(!$||J[0]&72)&&n!==(n=(e[6]?e[6]:e[3])+"")&&I(i,n),(!$||J[0]&12&&h!==(h=e[3]===e[2]?"Fill in app-name and apkmirror-dlurl":e[3]))&&y(_,"placeholder",h),J[0]&64&&_.value!==e[6]&&re(_,e[6]),J[0]&1&&A.value!==e[0]&&re(A,e[0]);const Ee={};!R&&J[0]&128&&(R=!0,Ee.selected=e[7],ce(()=>R=!1)),w.$set(Ee),J[0]&128&&m.value!==e[7]&&re(m,e[7]);const He={};!ve&&J[0]&16&&(ve=!0,He.selected=e[4],ce(()=>ve=!1)),H.$set(He);const Ke={};!oe&&J[0]&2&&(oe=!0,Ke.selected=e[1],ce(()=>oe=!1)),Z.$set(Ke),J[0]&2048&&U.value!==e[11]&&re(U,e[11]),X.ctx=e,J[0]&1024&&se!==(se=e[10])&&ze(se,X)||vt(X,e,J)},i(q){$||(D(w.$$.fragment,q),D(H.$$.fragment,q),D(Z.$$.fragment,q),D(X.block),$=!0)},o(q){K(w.$$.fragment,q),K(H.$$.fragment,q),K(Z.$$.fragment,q);for(let J=0;J<3;J+=1){const Ee=X.blocks[J];K(Ee)}$=!1},d(q){q&&b(t),ne(w),ne(H),ne(Z),X.block.d(),X.token=null,X=null,e[29](null),Ae=!1,ae(Ve)}}}async function Xt(e,t){const l=[];for(const n of await t)for(const i of n.compatiblePackages||[])if(i.name===e){const s=new Set;i.versions!==null&&i.versions.forEach(o=>{s.add(o)});const r=[...s],u={name:n.name,description:n.description,pkg_versions:r,use:n.use,patchOptions:n.options};l.push(u)}return l}function Zt(e,t,l){let{pkgName:n}=t,{reprName:i}=t,{apkmirror_dlurl:s="https://apkmirror.com/apk/"}=t,{revancedPatches:r}=t,{TOML:u}=t,o,c=[],a,_="auto",h="revanced/revanced-patches",N="revanced/revanced-patches",v,p=r;function f(){if(h==="revanced/revanced-patches")l(10,p=r);else{l(17,N=h);let M;const W=h.split("/").filter(Boolean);W.length===2?M=`${h}/HEAD`:W.length===3&&(M=h,l(17,N=`${W[0]}/${W[1]}`)),l(12,v=`https://raw.githubusercontent.com/${M}/patches.json`),fetch(v).then(Z=>l(10,p=Xt(n,Z.json())))}}async function C(M){for(const W of await p)M==="auto"||M==="latest"||M==="beta"?W.warn=!1:W.warn=W.pkg_versions.length!==0&&!W.pkg_versions.includes(M)}let A="",L,B=!1,P=[],{arch:w="universal"}=t;const R=()=>{L.parentNode.removeChild(L),l(8,B=!0)};function T(){a=this.value,l(6,a)}function S(){s=this.value,l(0,s)}function G(M){_=M,l(7,_)}function m(){_=this.value,l(7,_)}function j(M){o=M,l(4,o)}function F(M){w=M,l(1,w)}function V(){h=this.value,l(11,h)}function H(M){c=M,l(5,c)}function ve(M){P=M,l(9,P)}function je(M){x[M?"unshift":"push"](()=>{L=M,l(13,L)})}return e.$$set=M=>{"pkgName"in M&&l(2,n=M.pkgName),"reprName"in M&&l(3,i=M.reprName),"apkmirror_dlurl"in M&&l(0,s=M.apkmirror_dlurl),"revancedPatches"in M&&l(16,r=M.revancedPatches),"TOML"in M&&l(15,u=M.TOML),"arch"in M&&l(1,w=M.arch)},e.$$.update=()=>{e.$$.dirty[0]&1&&l(0,s=(M=>M.startsWith("https://apkmirror.com/apk/")||M.startsWith("https://www.apkmirror.com/apk/")||M.length===0?M:"https://apkmirror.com/apk/")(s)),e.$$.dirty[0]&128&&C(_),e.$$.dirty[0]&395259&&p.then(M=>{const W=[],Z=[];let oe;if(c.length>M.length/2){oe=!1;for(const Q of M){const ee=`'${Q.name}'`;!Q.use&&c.includes(Q)?W.push(ee):Q.use&&!c.includes(Q)&&Z.push(ee)}}else oe=!0,c.forEach(Q=>{const ee=`'${Q.name}'`;W.push(ee)});const Pe=W.join(" "),ye=Z.join(" ");a?l(18,A=a):l(18,A=i);const we=[];for(const[Q,ee]of Object.entries(P)){let U=!0;for(const[se,$]of Object.entries(ee))$.length>0&&(U=!1);if(U)break;const Oe=[];for(const[se,$]of Object.entries(ee))$.length>0&&Oe.push({key:se,value:$});we.push({patchName:Q,options:Oe})}l(15,u={app_name:A,apkmirror_dlurl:s,patches_source:N,version:_,build_mode:o,arch:w,included_patches:Pe,excluded_patches:ye,exclusive_patches:oe,deleted:B,opts:we})})},[s,w,n,i,o,c,a,_,B,P,p,h,v,L,f,u,r,N,A,R,T,S,G,m,j,F,V,H,ve,je]}class $t extends ke{constructor(t){super(),ge(this,t,Zt,Ut,me,{pkgName:2,reprName:3,apkmirror_dlurl:0,revancedPatches:16,TOML:15,arch:1},null,[-1,-1])}}function nt(e,t,l){const n=e.slice();return n[13]=t[l],n[14]=t,n[15]=l,n}function rt(e,t,l){const n=e.slice();return n[16]=t[l],n}function it(e){let t,l,n,i,s,r,u,o,c,a,_,h,N,v,p,f=e[7]()+"",C,A,L;l=new Je({props:{id:"config-toml-text"}});let B=e[0],P=[];for(let w=0;wG(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;rfe(t,"TOML",i)),{c(){ie(t.$$.fragment)},m(r,u){le(t,r,u),n=!0},p(r,u){e=r;const o={};!l&&u&1&&(l=!0,o.TOML=e[0][e[15]],ce(()=>l=!1)),t.$set(o)},i(r){n||(D(t.$$.fragment,r),n=!0)},o(r){G(t.$$.fragment,r),n=!1},d(r){ne(t,r)}}}function tl(e){return{c:z,m:z,p:z,i:z,o:z,d:z}}function ll(e){let t,l,n,i,s,r,u,o,c=e[1]?"Hide Config":"Create Config",a,_,h,N,v,p,f=e[1]&&it(e),C={ctx:e,current:null,token:null,hasCatch:!1,pending:tl,then:el,catch:xt,value:12,blocks:[,,,]};return ze(e[5].then(e[8]),C),{c(){t=k("main"),l=k("p"),l.textContent="RVMM Config Generator",n=E(),i=k("div"),i.innerHTML=` + rv-brand = "`),N=O(h),v=O(' ReVanced"'),p=k("br")},m(f,C){g(f,t,C),g(f,n,C),g(f,i,C),g(f,s,C),g(f,r,C),g(f,o,C),g(f,c,C),g(f,a,C),g(f,_,C),g(f,N,C),g(f,v,C),g(f,p,C)},p(f,C){C&1&&l!==(l=f[16].patches_source+"")&&I(n,l),C&1&&u!==(u=f[16].patches_source.split("/")[0]+"")&&I(o,u),C&1&&h!==(h=f[16].patches_source.split("/")[0]+"")&&I(N,h)},d(f){f&&b(t),f&&b(n),f&&b(i),f&&b(s),f&&b(r),f&&b(o),f&&b(c),f&&b(a),f&&b(_),f&&b(N),f&&b(v),f&&b(p)}}}function ut(e){let t,l=e[16].arch+"",n,i,s;return{c(){t=O('arch = "'),n=O(l),i=O('"'),s=k("br")},m(r,u){g(r,t,u),g(r,n,u),g(r,i,u),g(r,s,u)},p(r,u){u&1&&l!==(l=r[16].arch+"")&&I(n,l)},d(r){r&&b(t),r&&b(n),r&&b(i),r&&b(s)}}}function ct(e){let t,l=e[16].build_mode+"",n,i,s;return{c(){t=O('build-mode = "'),n=O(l),i=O('"'),s=k("br")},m(r,u){g(r,t,u),g(r,n,u),g(r,i,u),g(r,s,u)},p(r,u){u&1&&l!==(l=r[16].build_mode+"")&&I(n,l)},d(r){r&&b(t),r&&b(n),r&&b(i),r&&b(s)}}}function ft(e){let t,l=e[16].version+"",n,i,s;return{c(){t=O('version = "'),n=O(l),i=O('"'),s=k("br")},m(r,u){g(r,t,u),g(r,n,u),g(r,i,u),g(r,s,u)},p(r,u){u&1&&l!==(l=r[16].version+"")&&I(n,l)},d(r){r&&b(t),r&&b(n),r&&b(i),r&&b(s)}}}function at(e){let t,l=e[16].included_patches+"",n,i,s;return{c(){t=O('included-patches = "'),n=O(l),i=O('"'),s=k("br")},m(r,u){g(r,t,u),g(r,n,u),g(r,i,u),g(r,s,u)},p(r,u){u&1&&l!==(l=r[16].included_patches+"")&&I(n,l)},d(r){r&&b(t),r&&b(n),r&&b(i),r&&b(s)}}}function dt(e){let t,l=e[16].excluded_patches+"",n,i,s;return{c(){t=O('excluded-patches = "'),n=O(l),i=O('"'),s=k("br")},m(r,u){g(r,t,u),g(r,n,u),g(r,i,u),g(r,s,u)},p(r,u){u&1&&l!==(l=r[16].excluded_patches+"")&&I(n,l)},d(r){r&&b(t),r&&b(n),r&&b(i),r&&b(s)}}}function pt(e){let t,l=e[16].exclusive_patches+"",n,i;return{c(){t=O("exclusive-patches = "),n=O(l),i=k("br")},m(s,r){g(s,t,r),g(s,n,r),g(s,i,r)},p(s,r){r&1&&l!==(l=s[16].exclusive_patches+"")&&I(n,l)},d(s){s&&b(t),s&&b(n),s&&b(i)}}}function _t(e){let t,l=!e[16].deleted&&e[16].apkmirror_dlurl!=="https://apkmirror.com/apk/"&&e[16].apkmirror_dlurl.length!==0&&ot(e);return{c(){l&&l.c(),t=gt()},m(n,i){l&&l.m(n,i),g(n,t,i)},p(n,i){!n[16].deleted&&n[16].apkmirror_dlurl!=="https://apkmirror.com/apk/"&&n[16].apkmirror_dlurl.length!==0?l?l.p(n,i):(l=ot(n),l.c(),l.m(t.parentNode,t)):l&&(l.d(1),l=null)},d(n){l&&l.d(n),n&&b(t)}}}function xt(e){return{c:z,m:z,p:z,i:z,o:z,d:z}}function el(e){let t,l,n=e[12],i=[];for(let r=0;rK(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;rfe(t,"TOML",i)),{c(){ie(t.$$.fragment)},m(r,u){le(t,r,u),n=!0},p(r,u){e=r;const o={};!l&&u&1&&(l=!0,o.TOML=e[0][e[15]],ce(()=>l=!1)),t.$set(o)},i(r){n||(D(t.$$.fragment,r),n=!0)},o(r){K(t.$$.fragment,r),n=!1},d(r){ne(t,r)}}}function tl(e){return{c:z,m:z,p:z,i:z,o:z,d:z}}function ll(e){let t,l,n,i,s,r,u,o,c=e[1]?"Hide Config":"Create Config",a,_,h,N,v,p,f=e[1]&&it(e),C={ctx:e,current:null,token:null,hasCatch:!1,pending:tl,then:el,catch:xt,value:12,blocks:[,,,]};return ze(e[5].then(e[8]),C),{c(){t=k("main"),l=k("p"),l.textContent="RVMM Config Generator",n=E(),i=k("div"),i.innerHTML=` - `,s=E(),r=k("br"),u=E(),o=k("button"),a=O(c),_=E(),f&&f.c(),h=E(),C.block.c(),y(l,"class","m-4"),y(i,"class","inline-flex"),y(o,"class","m-3 mb-5 justify-center items-center space-x-2 border border-gray-300 rounded-md py-2 px-4 bg-white text-sm leading-5 font-medium text-gray-900 hover:text-gray-600 focus:outline-none focus:border-gray-300 focus:ring-blue active:bg-gray-50 active:text-gray-800")},m(A,T){g(A,t,T),d(t,l),d(t,n),d(t,i),d(t,s),d(t,r),d(t,u),d(t,o),d(o,a),d(t,_),f&&f.m(t,null),d(t,h),C.block.m(t,C.anchor=null),C.mount=()=>t,C.anchor=null,N=!0,v||(p=Y(o,"click",e[6]),v=!0)},p(A,[T]){e=A,(!N||T&2)&&c!==(c=e[1]?"Hide Config":"Create Config")&&I(a,c),e[1]?f?(f.p(e,T),T&2&&D(f,1)):(f=it(e),f.c(),D(f,1),f.m(t,h)):f&&(he(),G(f,1,1,()=>{f=null}),be()),vt(C,e,T)},i(A){N||(D(f),D(C.block),N=!0)},o(A){G(f);for(let T=0;T<3;T+=1){const B=C.blocks[T];G(B)}N=!1},d(A){A&&b(t),f&&f.d(),C.block.d(),C.token=null,C=null,v=!1,p()}}}async function nl(e,t){const l=[];for(const n of await t)for(const i of n.compatiblePackages||[])if(i.name===e){const s=new Set;i.versions!==null&&i.versions.forEach(o=>{s.add(o)});const r=[...s],u={name:n.name,description:n.description,pkg_versions:r,use:n.use,patchOptions:n.options};l.push(u)}return l}function rl(e,t,l){function n(p){const f=new Set;for(const A of p)A.compatiblePackages!==null&&A.compatiblePackages.map(T=>T.name).forEach(T=>{f.add(T)});const C=[...f];return C.sort((A,T)=>{const B=i[A]!==void 0,P=i[T]!==void 0;if(B&&P)return 0;if(B)return-1;if(P)return 1}),C}const i={"com.google.android.youtube":"YouTube","tv.twitch.android.app":"Twitch","com.twitter.android":"Twitter","com.laurencedawson.reddit_sync":"Sync","com.laurencedawson.reddit_sync.pro":"Sync Pro","com.google.android.apps.youtube.music":"Music","com.rubenmayayo.reddit":"Boost","com.zhiliaoapp.musically":"Tiktok","com.reddit.frontpage":"Reddit","com.facebook.orca":"Messenger","com.instagram.android":"Instagram"};function s(p){return i[p]!==void 0?i[p]:p}const r={"com.google.android.youtube":"https://apkmirror.com/apk/google-inc/youtube/","tv.twitch.android.app":"https://apkmirror.com/apk/twitch-interactive-inc/twitch/","com.twitter.android":"https://apkmirror.com/apk/twitter-inc/twitter/","com.google.android.apps.youtube.music":"https://apkmirror.com/apk/google-inc/youtube-music/","com.zhiliaoapp.musically":"https://apkmirror.com/apk/tiktok-pte-ltd/tik-tok-including-musical-ly/","com.reddit.frontpage":"https://apkmirror.com/apk/redditinc/reddit/","com.facebook.orca":"https://apkmirror.com/apk/facebook-2/messenger/","com.instagram.android":"https://apkmirror.com/apk/instagram/instagram-instagram/"};function u(p){if(r[p]!==void 0)return r[p]}let o=[],c=!1,a=fetch("https://raw.githubusercontent.com/revanced/revanced-patches/main/patches.json").then(p=>p.json());const _=()=>{l(1,c=!c)},h=()=>{let p=[];return o.forEach(f=>{p=[...p,...f.opts]}),` + `,s=E(),r=k("br"),u=E(),o=k("button"),a=O(c),_=E(),f&&f.c(),h=E(),C.block.c(),y(l,"class","m-4"),y(i,"class","inline-flex"),y(o,"class","m-3 mb-5 justify-center items-center space-x-2 border border-gray-300 rounded-md py-2 px-4 bg-white text-sm leading-5 font-medium text-gray-900 hover:text-gray-600 focus:outline-none focus:border-gray-300 focus:ring-blue active:bg-gray-50 active:text-gray-800")},m(A,L){g(A,t,L),d(t,l),d(t,n),d(t,i),d(t,s),d(t,r),d(t,u),d(t,o),d(o,a),d(t,_),f&&f.m(t,null),d(t,h),C.block.m(t,C.anchor=null),C.mount=()=>t,C.anchor=null,N=!0,v||(p=Y(o,"click",e[6]),v=!0)},p(A,[L]){e=A,(!N||L&2)&&c!==(c=e[1]?"Hide Config":"Create Config")&&I(a,c),e[1]?f?(f.p(e,L),L&2&&D(f,1)):(f=it(e),f.c(),D(f,1),f.m(t,h)):f&&(he(),K(f,1,1,()=>{f=null}),be()),vt(C,e,L)},i(A){N||(D(f),D(C.block),N=!0)},o(A){K(f);for(let L=0;L<3;L+=1){const B=C.blocks[L];K(B)}N=!1},d(A){A&&b(t),f&&f.d(),C.block.d(),C.token=null,C=null,v=!1,p()}}}async function nl(e,t){const l=[];for(const n of await t)for(const i of n.compatiblePackages||[])if(i.name===e){const s=new Set;i.versions!==null&&i.versions.forEach(o=>{s.add(o)});const r=[...s],u={name:n.name,description:n.description,pkg_versions:r,use:n.use,patchOptions:n.options};l.push(u)}return l}function rl(e,t,l){function n(p){const f=new Set;for(const A of p)A.compatiblePackages!==null&&A.compatiblePackages.map(L=>L.name).forEach(L=>{f.add(L)});const C=[...f];return C.sort((A,L)=>{const B=i[A]!==void 0,P=i[L]!==void 0;if(B&&P)return 0;if(B)return-1;if(P)return 1}),C}const i={"com.google.android.youtube":"YouTube","tv.twitch.android.app":"Twitch","com.twitter.android":"Twitter","com.laurencedawson.reddit_sync":"Sync","com.laurencedawson.reddit_sync.pro":"Sync Pro","com.google.android.apps.youtube.music":"Music","com.rubenmayayo.reddit":"Boost","com.zhiliaoapp.musically":"Tiktok","com.reddit.frontpage":"Reddit","com.facebook.orca":"Messenger","com.instagram.android":"Instagram"};function s(p){return i[p]!==void 0?i[p]:p}const r={"com.google.android.youtube":"https://apkmirror.com/apk/google-inc/youtube/","tv.twitch.android.app":"https://apkmirror.com/apk/twitch-interactive-inc/twitch/","com.twitter.android":"https://apkmirror.com/apk/twitter-inc/twitter/","com.google.android.apps.youtube.music":"https://apkmirror.com/apk/google-inc/youtube-music/","com.zhiliaoapp.musically":"https://apkmirror.com/apk/tiktok-pte-ltd/tik-tok-including-musical-ly/","com.reddit.frontpage":"https://apkmirror.com/apk/redditinc/reddit/","com.facebook.orca":"https://apkmirror.com/apk/facebook-2/messenger/","com.instagram.android":"https://apkmirror.com/apk/instagram/instagram-instagram/"};function u(p){if(r[p]!==void 0)return r[p]}let o=[],c=!1,a=fetch("https://github.com/ReVanced/revanced-patches/releases/latest/download/patches.json",{redirect:"follow",method:"GET"}).then(p=>p.json());const _=()=>{l(1,c=!c)},h=()=>{let p=[];return o.forEach(f=>{p=[...p,...f.opts]}),` `+JSON.stringify(p,void 0,2)},N=p=>n(p);function v(p,f){e.$$.not_equal(o[f],p)&&(o[f]=p,l(0,o))}return[o,c,n,s,u,a,_,h,N,v]}class il extends ke{constructor(t){super(),ge(this,t,rl,ll,me,{})}}new il({target:document.getElementById("app")}); diff --git a/docs/index.html b/docs/index.html index 33dfdab..60624e4 100644 --- a/docs/index.html +++ b/docs/index.html @@ -5,7 +5,7 @@ RVMM Config Generator - + diff --git a/src/App.svelte b/src/App.svelte index dd1ca3c..d92d735 100755 --- a/src/App.svelte +++ b/src/App.svelte @@ -94,9 +94,12 @@ let TOML = []; let configTOMLVisible = false; - let patchesJson = fetch( - "https://raw.githubusercontent.com/revanced/revanced-patches/main/patches.json" + "https://github.com/ReVanced/revanced-patches/releases/latest/download/patches.json", + { + redirect: "follow", + method: "GET", + }, ).then((r) => r.json()); @@ -147,7 +150,7 @@ {#if t.patches_source !== "revanced/revanced-patches"} patches-source = "{t.patches_source}"
integrations-source = "{t.patches_source.split( - "/" + "/", )[0]}/revanced-integrations"
rv-brand = "{t.patches_source.split("/")[0]} ReVanced"
{/if}