1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6822],{56822:(e,l,t)=>{t.r(l),t.d(l,{default:()=>c});var n=t(23798),s=t(16542),i=t(40712),o=t(83933),r=t(88488);let u=new Date;function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,l=u.getMonth()+1+e;return{month:(l+11)%12+1,year:u.getFullYear()+Math.floor((l-1)/12)}}function c(e){var l,t,u,c,d;let{service:h}=e,{t:v}=(0,o.Bd)(),{widget:f}=h;f.fields?(null==(l=f.fields)?void 0:l.length)>4&&(f.fields=f.fields.slice(0,4)):f.fields=["activeSubscriptions","nextRenewingSubscription","thisMonthlyCost","nextMonthlyCost"];let p=f.fields.includes("activeSubscriptions")||f.fields.includes("nextRenewingSubscription")?"get_subscriptions":"",{data:x,error:y}=(0,r.A)(f,p,{state:0,sort:"next_payment"}),b=f.fields.includes("thisMonthlyCost")?"get_monthly_cost":"",{data:_,error:A}=(0,r.A)(f,b,a()),g=f.fields.includes("nextMonthlyCost")?"get_monthly_cost":"",{data:w,error:C}=(0,r.A)(f,g,a(1)),M=f.fields.includes("previousMonthlyCost")?"get_monthly_cost":"",{data:m,error:j}=(0,r.A)(f,M,a(-1));if(y||A||C||j){let e=null!=(d=null!=(c=null!=y?y:A)?c:C)?d:j;return(0,n.jsx)(i.A,{service:h,error:e})}return!x&&(f.fields.includes("activeSubscriptions")||f.fields.includes("nextRenewingSubscription"))||!_&&f.fields.includes("thisMonthlyCost")||!w&&f.fields.includes("nextMonthlyCost")||!m&&f.fields.includes("previousMonthlyCost")?(0,n.jsxs)(i.A,{service:h,children:[(0,n.jsx)(s.A,{label:"wallos.activeSubscriptions"}),(0,n.jsx)(s.A,{label:"wallos.nextRenewingSubscription"}),(0,n.jsx)(s.A,{label:"wallos.previousMonthlyCost"}),(0,n.jsx)(s.A,{label:"wallos.thisMonthlyCost"}),(0,n.jsx)(s.A,{label:"wallos.nextMonthlyCost"})]}):(0,n.jsxs)(i.A,{service:h,children:[(0,n.jsx)(s.A,{label:"wallos.activeSubscriptions",value:v("common.number",{value:null==x||null==(t=x.subscriptions)?void 0:t.length})}),(0,n.jsx)(s.A,{label:"wallos.nextRenewingSubscription",value:null==x||null==(u=x.subscriptions[0])?void 0:u.name}),(0,n.jsx)(s.A,{label:"wallos.previousMonthlyCost",value:null==m?void 0:m.localized_monthly_cost}),(0,n.jsx)(s.A,{label:"wallos.thisMonthlyCost",value:null==_?void 0:_.localized_monthly_cost}),(0,n.jsx)(s.A,{label:"wallos.nextMonthlyCost",value:null==w?void 0:w.localized_monthly_cost})]})}},88488:(e,l,t)=>{t.d(l,{A:()=>i});var n=t(96638),s=t(96973);function i(e){for(var l,t,i=arguments.length,o=Array(i>1?i-1:0),r=1;r<i;r++)o[r-1]=arguments[r];let u={};o&&(null==(l=o[1])?void 0:l.refreshInterval)&&(u.refreshInterval=o[1].refreshInterval);let a=(0,s.$C)(e,...o);""===o[0]&&(a=null);let{data:c,error:d,mutate:h}=(0,n.Ay)(a,u);return{data:c,error:null!=(t=null==c?void 0:c.error)?t:d,mutate:h}}},96973:(e,l,t)=>{function n(e,l){let t=new URLSearchParams({group:e.service_group,service:e.service_name,index:e.index});return l&&t.append("endpoint",l),t}function s(e,l,t){let s=n(e,l);return t&&s.append("query",JSON.stringify(t)),"/api/services/proxy?".concat(s.toString())}t.d(l,{$C:()=>s,_V:()=>n})}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.