diff --git a/public/build/assets/app2.js b/public/build/assets/app2.js index 8f71406..7086a8d 100644 --- a/public/build/assets/app2.js +++ b/public/build/assets/app2.js @@ -39,7 +39,7 @@ var zb=Object.defineProperty;var Wb=(t,e,n)=>e in t?zb(t,e,{enumerable:!0,config * @vue/runtime-dom v3.4.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/const hO="http://www.w3.org/2000/svg",dO="http://www.w3.org/1998/Math/MathML",Hn=typeof document<"u"?document:null,Ud=Hn&&Hn.createElement("template"),pO={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,i)=>{const r=e==="svg"?Hn.createElementNS(hO,t):e==="mathml"?Hn.createElementNS(dO,t):Hn.createElement(t,n?{is:n}:void 0);return t==="select"&&i&&i.multiple!=null&&r.setAttribute("multiple",i.multiple),r},createText:t=>Hn.createTextNode(t),createComment:t=>Hn.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>Hn.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,i,r,s){const o=n?n.previousSibling:e.lastChild;if(r&&(r===s||r.nextSibling))for(;e.insertBefore(r.cloneNode(!0),n),!(r===s||!(r=r.nextSibling)););else{Ud.innerHTML=i==="svg"?`${t}`:i==="mathml"?`${t}`:t;const a=Ud.content;if(i==="svg"||i==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,n)}return[o?o.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}},gO=Symbol("_vtc");function mO(t,e,n){const i=t[gO];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const yO=Symbol("_vod"),bO=Symbol("");function _O(t,e,n){const i=t.style,r=i.display,s=Oa(n);if(n&&!s){if(e&&!Oa(e))for(const o in e)n[o]==null&&Zc(i,o,"");for(const o in n)Zc(i,o,n[o])}else if(s){if(e!==n){const o=i[bO];o&&(n+=";"+o),i.cssText=n}}else e&&t.removeAttribute("style");yO in t&&(i.display=r)}const Vd=/\s*!important$/;function Zc(t,e,n){if(Gm(n))n.forEach(i=>Zc(t,e,i));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const i=xO(t,e);Vd.test(n)?t.setProperty(Jm(i),n.replace(Vd,""),"important"):t[i]=n}}const Kd=["Webkit","Moz","ms"],uc={};function xO(t,e){const n=uc[e];if(n)return n;let i=un(e);if(i!=="filter"&&i in t)return uc[e]=i;i=cO(i);for(let r=0;rfc||(PO.then(()=>fc=0),fc=Date.now());function TO(t,e){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;Ue(MO(i,n.value),e,5,[i])};return n.value=t,n.attached=CO(),n}function MO(t,e){if(Gm(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map(i=>r=>!r._stopped&&i&&i(r))}else return e}const Xd=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,kO=(t,e,n,i,r,s,o,a,l)=>{const c=r==="svg";e==="class"?mO(t,i,c):e==="style"?_O(t,n,i):sO(e)?oO(e)||AO(t,e,n,i,o):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):RO(t,e,i,c))?wO(t,e,i,s,o,a,l):(e==="true-value"?t._trueValue=i:e==="false-value"&&(t._falseValue=i),vO(t,e,i,c))};function RO(t,e,n,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in t&&Xd(e)&&Ym(n));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const r=t.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Xd(e)&&Oa(n)?!1:e in t}const Zm=aO({patchProp:kO},pO);let gs,Jd=!1;function IO(){return gs||(gs=j1(Zm))}function FO(){return gs=Jd?gs:H1(Zm),Jd=!0,gs}const LO=(...t)=>{const e=IO().createApp(...t),{mount:n}=e;return e.mount=i=>{const r=ey(i);if(!r)return;const s=e._component;!Ym(s)&&!s.render&&!s.template&&(s.template=r.innerHTML),r.innerHTML="";const o=n(r,!1,ty(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},e},DO=(...t)=>{const e=FO().createApp(...t),{mount:n}=e;return e.mount=i=>{const r=ey(i);if(r)return n(r,!0,ty(r))},e};function ty(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function ey(t){return Oa(t)?document.querySelector(t):t}const ny={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},NO={ariaLabel:{type:String},ariaDescribedby:{type:String}},$O={type:{type:String,required:!0},...ny,...NO},BO=qm[0]==="2"?(t,e)=>Object.assign(t,{attrs:e}):(t,e)=>Object.assign(t,e);function Gi(t){return Ga(t)?dt(t):t}function jO(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t;return Ga(e)?new Proxy(t,{}):t}function HO(t,e){const n=t.options;n&&e&&Object.assign(n,e)}function iy(t,e){t.labels=e}function ry(t,e,n){const i=[];t.datasets=e.map(r=>{const s=t.datasets.find(o=>o[n]===r[n]);return!s||!r.data||i.includes(s)?{...r}:(i.push(s),Object.assign(s,r),s)})}function zO(t,e){const n={labels:[],datasets:[]};return iy(n,t.labels),ry(n,t.datasets,e),n}const WO=hf({props:$O,setup(t,e){let{expose:n,slots:i}=e;const r=Ya(null),s=cf(null);n({chart:s});const o=()=>{if(!r.value)return;const{type:c,data:u,options:f,plugins:d,datasetIdKey:g}=t,p=zO(u,g),m=jO(p,u);s.value=new Bs(r.value,{type:c,data:m,options:{...f},plugins:d})},a=()=>{const c=dt(s.value);c&&(c.destroy(),s.value=null)},l=c=>{c.update(t.updateMode)};return Cm(o),Tm(a),fs([()=>t.options,()=>t.data],(c,u)=>{let[f,d]=c,[g,p]=u;const m=dt(s.value);if(!m)return;let b=!1;if(f){const _=Gi(f),P=Gi(g);_&&_!==P&&(HO(m,_),b=!0)}if(d){const _=Gi(d.labels),P=Gi(p.labels),x=Gi(d.datasets),S=Gi(p.datasets);_!==P&&(iy(m.config.data,_),b=!0),x&&x!==S&&(ry(m.config.data,x,t.datasetIdKey),b=!0)}b&&ym(()=>{l(m)})},{deep:!0}),()=>Xn("canvas",{role:"img",ariaLabel:t.ariaLabel,ariaDescribedby:t.ariaDescribedby,ref:r},[Xn("p",{},[i.default?i.default():""])])}});function UO(t,e){return Bs.register(e),hf({props:ny,setup(n,i){let{expose:r}=i;const s=cf(null),o=a=>{s.value=a==null?void 0:a.chart};return r({chart:s}),()=>Xn(WO,BO({ref:o},{type:t,...n}))}})}const sy=UO("line",Wo),bf=(t,e)=>{const n=t.__vccOpts||t;for(const[i,r]of e)n[i]=r;return n};Bs.register(ua,ha,cs,Zi,zg,Ug,jg);const VO={components:{Line:sy},props:{data:Array,labels:Array},created(){this.chartColor=this.getChange()>=0?"green":"red"},methods:{getChange(){return((this.data.at(-1)-this.data.at(-2))/this.data.at(-2)*100||0).toFixed(2)}}};function KO(t,e,n,i,r,s){const o=_a("Line");return ye(),Wm(o,{height:"30",data:{labels:n.labels,datasets:[{data:n.data,borderColor:t.chartColor,backgroundColor:t.chartColor}]},options:{elements:{point:{radius:0}},plugins:{legend:{display:!1}},scales:{y:{ticks:{display:!1}},x:{ticks:{display:!1}}}}},null,8,["data"])}const qO=bf(VO,[["render",KO]]);Bs.register(ua,ha,cs,Zi,zg,Ug,jg);const GO={props:{data:Array,dates:Array,color:String,label:String,total:String,subtotal:String},components:{Line:sy},created(){this.chartColor=this.color||(this.getChange()>0?"green":"red")},methods:{getChange(){return((this.data.at(-1)-this.data.at(-2))/this.data.at(-2)*100).toFixed(2)}}},YO={class:"flex flex-col col-span-full sm:col-span-12 bg-white dark:bg-slate-800 shadow-lg border border-slate-200 dark:border-slate-700"},XO={class:"px-5 py-2 border-b border-slate-100 dark:border-slate-700 flex items-center"},JO={class:"font-semibold text-slate-800 dark:text-slate-100"},QO={class:"px-5 py-3"},ZO={class:"flex flex-wrap justify-between items-end"},tA={class:"flex items-start"},eA={class:"text-right mr-2 text-slate-800 dark:text-slate-100"},nA={class:"text-3xl font-bold"},iA={class:"text-lg font-semibold h-2"};function rA(t,e,n,i,r,s){const o=_a("Line");return ye(),Ce("div",YO,[z("header",XO,[z("h2",JO,Ct(n.label),1)]),z("div",QO,[z("div",ZO,[z("div",tA,[z("div",eA,[z("div",nA,Ct(n.total),1),z("div",iA,Ct(n.subtotal??"-"),1)]),z("div",{class:Oe(["text-sm font-semibold text-white px-1.5 rounded-full",{"bg-red-700":s.getChange()<0,"bg-green-700":s.getChange()>=0}])},Ct(s.getChange())+"%",3)])])]),z("div",null,[Et(o,{height:"150",width:"875",data:{labels:n.dates,datasets:[{data:n.data}]},options:{color:"white",borderColor:t.chartColor,backgroundColor:t.chartColor,elements:{point:{radius:2}},plugins:{legend:{display:!1}},scales:{y:{ticks:{color:"white"}},x:{ticks:{color:"white"}}}}},null,8,["data","options"])])])}const sA=bf(GO,[["render",rA]]),oA={components:{TokenChart:qO,BalancesChart:sA},props:{prices:Object,tokens:Object,totals:Object,balance:Number,transactions:Object},data(){return{loading:!1}},created(){this.debt=this.totals.debts.at(-1),this.eurPrice=this.prices.eur.at(-1),this.ethPrice=this.prices.eth.at(-1),this.btcPrice=this.prices.btc.at(-1),this.total=this.totals.totals.at(-1),this.totalWithDebt=this.totals.totals_with_debts.at(-1)},methods:{getDailyChange(t){const e=this.tokens[1][t].price;return((this.tokens[0][t].price-e)/e*100).toFixed(2)},getWeeklyApy(t){const e=this.tokens[0][t].balance;return((e-(this.tokens[6][t]||{}).balance)/e*100||0).toFixed(2)},getWeeklyGain(t){const e=this.tokens[0][t];return((e.balance-(this.tokens[6][t]||{}).balance)*e.price).toFixed(2)},getYearlyApy(t){return(this.getWeeklyApy(t)/7*365).toFixed(2)},getYearlyGain(t){return(this.getWeeklyGain(t)/7*365).toFixed(2)},getMonthlyApy(t){const e=this.tokens[0][t].balance;return((e-(this.tokens.at(-1)[t]||{}).balance)/e*100||0).toFixed(2)},getMonthlyGain(t){const e=this.tokens[0][t];return((e.balance-(this.tokens.at(-1)[t]||{}).balance)*e.price||0).toFixed(2)},getBalanceHistory(t){return this.tokens.map(e=>(e[t]||{}).balance).reverse()},getPriceHistory(t){return this.tokens.map(e=>e[t]?e[t].balance*e[t].price:0).reverse()},currencyFormat(t,e="USD"){return new Intl.NumberFormat(e=="EUR"?"es-ES":"en-US",{style:"currency",currency:e}).format(t)},refreshTokens(){this.loading=!0,ta.get("get-tokens").then(({data:t})=>{this.debt=t.debt,this.btcPrice=t.btcPrice,this.ethPrice=t.ethPrice,this.eurPrice=t.eurPrice,this.total=0,t.balances.forEach(e=>{this.tokens[0][e.name]=e,this.total+=e.price*e.balance}),this.totalWithDebt=this.total-this.debt,this.loading=!1})}}},aA={class:"flex"},lA={class:"w-1/2"},cA={class:"w-1/2"},uA={class:"col-span-full xl:col-span-12 bg-white dark:bg-slate-800 shadow-lg rounded-sm border border-slate-200 dark:border-slate-700 mt-4"},fA={class:"p-4 border-b border-slate-100 dark:border-slate-700 inline-flex"},hA=z("h2",{class:"font-semibold text-slate-800 dark:text-slate-100 mr-2"},"Balances",-1),dA=["disabled"],pA={class:"table-autodark:text-slate-300 mx-auto w-full sortable"},gA=z("thead",{class:"text-xs uppercase text-slate-400 dark:text-slate-500 bg-slate-50 dark:bg-slate-700 dark:bg-opacity-50 rounded-sm cursor-pointer"},[z("tr",null,[z("th",{class:"p-2 text-left pl-5"}," Name "),z("th",{class:"p-2 text-right"}," Balance "),z("th",{class:"p-2 text-right"}," EUR Price "),z("th",{class:"p-2 text-right"}," USD Price "),z("th",{class:"p-2 text-right"}," 24h "),z("th",{class:"p-2 text-right"}," Total EUR "),z("th",{class:"p-2 text-right"}," Total USD "),z("th",{class:"p-2 text-right"}," Total ETH "),z("th",{class:"p-2 text-right"}," Weekly APY "),z("th",{class:"p-2 text-right"}," Weekly gain "),z("th",{class:"p-2 text-right"}," Yearly APY "),z("th",{class:"p-2 text-right"}," Yearly gain "),z("th",{class:"p-2 text-right"}," Monthly APY "),z("th",{class:"p-2 text-right"}," Monthly gain "),z("th",{class:"p-2 text-center"}," Monthly balance "),z("th",{class:"p-2 text-center"}," Monthly price ")])],-1),mA={class:"text-sm font-medium divide-y divide-slate-100 dark:divide-slate-700"},yA={class:"p-2 text-slate-800 dark:text-slate-100 pl-3 w-1/3"},bA={class:"p-2 text-right text-yellow-300"},_A={class:"p-2 text-right text-red-300"},xA={class:"p-2 text-right text-red-300"},vA={class:"p-2 text-right text-white"},wA={class:"p-2 text-right text-emerald-300"},SA={class:"p-2 text-right text-emerald-300"},OA={class:"p-2 text-right text-sky-300"},AA={class:"p-2 text-right text-emerald-300"},EA={class:"p-2 text-right text-emerald-300"},PA={class:"p-2 text-right text-emerald-300"},CA={class:"p-2 text-right text-emerald-300"},TA={class:"p-2 text-right text-emerald-300"},MA={class:"p-2 text-right text-emerald-300"},kA={class:"p-2 w-2/12"},RA={class:"p-2 w-2/12"},IA={class:"col-span-full xl:col-span-12 bg-white dark:bg-slate-800 shadow-lg rounded-sm border border-slate-200 dark:border-slate-700 mt-4"},FA={class:"p-4 border-b border-slate-100 dark:border-slate-700"},LA={class:"font-semibold text-slate-800 dark:text-slate-100"},DA={class:"font-normal"},NA={class:"table-autodark:text-slate-300 mx-auto w-full sortable"},$A=z("thead",{class:"text-xs uppercase text-slate-400 dark:text-slate-500 bg-slate-50 dark:bg-slate-700 dark:bg-opacity-50 rounded-sm cursor-pointer"},[z("tr",null,[z("th",{class:"p-2 text-left pl-5"}," Title "),z("th",{class:"p-2 text-left pl-5"}," Type "),z("th",{class:"p-2 text-left pl-5"}," Status "),z("th",{class:"p-2 text-left pl-5"}," Primary Amount "),z("th",{class:"p-2 text-left pl-5"}," Secondary Amount "),z("th",{class:"p-2 text-left pl-5"}," Created On ")])],-1),BA={class:"text-sm font-medium divide-y divide-slate-100 dark:divide-slate-700"},jA=["innerHTML"],HA={class:"p-2 text-slate-800 dark:text-slate-100"},zA={class:"p-2 text-slate-800 dark:text-slate-100"},WA=["innerHTML"],UA={class:"p-2 text-slate-800 dark:text-slate-100"},VA={class:"p-2 text-slate-800 dark:text-slate-100"};function KA(t,e,n,i,r,s){const o=_a("balances-chart"),a=_a("token-chart");return ye(),Ce(be,null,[z("div",aA,[z("div",lA,[Et(o,{label:`ETH (${(t.totalWithDebt/t.ethPrice).toFixed(2)})`,color:"blue",dates:n.prices.dates,data:n.prices.eth,total:s.currencyFormat(t.ethPrice),subtotal:s.currencyFormat(t.ethPrice*t.eurPrice,"EUR")},null,8,["label","dates","data","total","subtotal"]),Et(o,{label:`BTC (${(t.totalWithDebt/t.btcPrice).toFixed(3)})`,dates:n.prices.dates,data:n.prices.btc,total:s.currencyFormat(t.btcPrice),subtotal:s.currencyFormat(t.btcPrice*t.eurPrice,"EUR")},null,8,["label","dates","data","total","subtotal"]),Et(o,{label:"EUR",dates:n.prices.dates,data:n.prices.eur,total:s.currencyFormat(t.eurPrice,"EUR")},null,8,["dates","data","total"])]),z("div",cA,[Et(o,{label:"Total",dates:n.totals.dates,data:n.totals.totals,total:s.currencyFormat(t.total),subtotal:s.currencyFormat(t.total*t.eurPrice,"EUR")},null,8,["dates","data","total","subtotal"]),Et(o,{label:"Debt",dates:n.totals.dates,data:n.totals.debts,total:s.currencyFormat(t.debt),subtotal:s.currencyFormat(t.debt*t.eurPrice,"EUR")},null,8,["dates","data","total","subtotal"]),Et(o,{label:"Total",dates:n.totals.dates,data:n.totals.totals_with_debts,total:s.currencyFormat(t.totalWithDebt),subtotal:s.currencyFormat(t.totalWithDebt*t.eurPrice,"EUR")},null,8,["dates","data","total","subtotal"])])]),z("div",uA,[z("header",fA,[hA,z("button",{class:Oe(["bg-gray-500 hover:bg-gray-700 font-bold py-2 px-4 rounded inline-flex items-center h-6",{"bg-gray-700":r.loading}]),disabled:r.loading,onClick:e[0]||(e[0]=(...l)=>s.refreshTokens&&s.refreshTokens(...l))},[z("i",{class:Oe(["fa fa-refresh",{"animate-spin":r.loading}]),style:{"font-size":"15px"}},null,2)],10,dA)]),z("table",pA,[gA,z("tbody",mA,[(ye(!0),Ce(be,null,kd(n.tokens[0],(l,c)=>(ye(),Ce("tr",null,[z("td",yA,Ct(l.name),1),z("td",bA,Ct(l.balance.toFixed(3)),1),z("td",_A,Ct(s.currencyFormat(l.price*t.eurPrice,"EUR")),1),z("td",xA,Ct(s.currencyFormat(l.price)),1),z("td",vA,[z("span",{class:Oe({"text-red-500":s.getDailyChange(c,l.price)<0,"text-green-500":s.getDailyChange(c,l.price)>0})},Ct(s.getDailyChange(c,l.price))+"%",3)]),z("td",wA,Ct(s.currencyFormat(l.price*t.eurPrice*l.balance,"EUR")),1),z("td",SA,Ct(s.currencyFormat(l.price*l.balance)),1),z("td",OA,Ct((l.price*l.balance/t.ethPrice).toFixed(3)),1),z("td",AA,[s.getWeeklyApy(c)!=0?(ye(),Ce("span",{key:0,class:Oe({"text-red-500":s.getWeeklyApy(c)<0,"text-green-500":s.getWeeklyApy(c)>0})},Ct(s.getWeeklyApy(c))+"%",3)):qi("",!0)]),z("td",EA,[s.getWeeklyGain(c)!=0?(ye(),Ce("span",{key:0,class:Oe({"text-red-500":s.getWeeklyGain(c)<0,"text-green-500":s.getWeeklyGain(c)>0})},Ct(s.currencyFormat(s.getWeeklyGain(c))),3)):qi("",!0)]),z("td",PA,[s.getWeeklyApy(c)!=0?(ye(),Ce("span",{key:0,class:Oe({"text-red-500":s.getYearlyApy(c)<0,"text-green-500":s.getYearlyApy(c)>0})},Ct(s.getYearlyApy(c))+"%",3)):qi("",!0)]),z("td",CA,[s.getYearlyGain(c)!=0?(ye(),Ce("span",{key:0,class:Oe({"text-red-500":s.getYearlyGain(c)<0,"text-green-500":s.getYearlyGain(c)>0})},Ct(s.currencyFormat(s.getYearlyGain(c))),3)):qi("",!0)]),z("td",TA,[s.getMonthlyApy(c)!=0?(ye(),Ce("span",{key:0,class:Oe({"text-red-500":s.getMonthlyApy(c)<0,"text-green-500":s.getMonthlyApy(c)>0})},Ct(s.getMonthlyApy(c))+"%",3)):qi("",!0)]),z("td",MA,[s.getMonthlyGain(c)!=0?(ye(),Ce("span",{key:0,class:Oe({"text-red-500":s.getMonthlyGain(c)<0,"text-green-500":s.getMonthlyGain(c)>0})},Ct(s.currencyFormat(s.getMonthlyGain(c))),3)):qi("",!0)]),z("td",kA,[Et(a,{labels:Object.keys(n.tokens),data:s.getBalanceHistory(l.name)},null,8,["labels","data"])]),z("td",RA,[Et(a,{labels:Object.keys(n.tokens),data:s.getPriceHistory(l.name)},null,8,["labels","data"])])]))),256))])])]),z("div",IA,[z("header",FA,[z("h2",LA,[gf("Wise balance: "),z("p",DA,Ct(n.balance)+" EUR",1)])]),z("table",NA,[$A,z("tbody",BA,[(ye(!0),Ce(be,null,kd(n.transactions,l=>(ye(),Ce("tr",null,[z("td",{class:"p-2 w-1/4 text-slate-800 dark:text-slate-100 pl-3",innerHTML:l.title},null,8,jA),z("td",HA,Ct(l.type),1),z("td",zA,Ct(l.status),1),z("td",{class:"p-2 text-slate-800 dark:text-slate-100",innerHTML:l.primaryAmount},null,8,WA),z("td",UA,Ct(l.secondaryAmount),1),z("td",VA,Ct(l.createdOn),1)]))),256))])])])],64)}const qA=bf(oA,[["render",KA]]),GA=Object.freeze(Object.defineProperty({__proto__:null,default:qA},Symbol.toStringTag,{value:"Module"}));window.axios=ta;window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";var tu=!1,eu=!1,Ei=[],nu=-1;function YA(t){XA(t)}function XA(t){Ei.includes(t)||Ei.push(t),JA()}function oy(t){let e=Ei.indexOf(t);e!==-1&&e>nu&&Ei.splice(e,1)}function JA(){!eu&&!tu&&(tu=!0,queueMicrotask(QA))}function QA(){tu=!1,eu=!0;for(let t=0;tt.effect(e,{scheduler:n=>{iu?YA(n):n()}}),ay=t.raw}function Qd(t){Or=t}function eE(t){let e=()=>{};return[i=>{let r=Or(i);return t._x_effects||(t._x_effects=new Set,t._x_runEffects=()=>{t._x_effects.forEach(s=>s())}),t._x_effects.add(r),e=()=>{r!==void 0&&(t._x_effects.delete(r),Hs(r))},r},()=>{e()}]}function ms(t,e,n={}){t.dispatchEvent(new CustomEvent(e,{detail:n,bubbles:!0,composed:!0,cancelable:!0}))}function ti(t,e){if(typeof ShadowRoot=="function"&&t instanceof ShadowRoot){Array.from(t.children).forEach(r=>ti(r,e));return}let n=!1;if(e(t,()=>n=!0),n)return;let i=t.firstElementChild;for(;i;)ti(i,e),i=i.nextElementSibling}function Pn(t,...e){console.warn(`Alpine Warning: ${t}`,...e)}var Zd=!1;function nE(){Zd&&Pn("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems."),Zd=!0,document.body||Pn("Unable to initialize. Trying to load Alpine before `` is available. Did you forget to add `defer` in Alpine's `