try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e93a5d69-7a2a-43ba-a6b7-e78b5181dbfe",e._sentryDebugIdIdentifier="sentry-dbid-e93a5d69-7a2a-43ba-a6b7-e78b5181dbfe")}catch(e){}("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:{}).SENTRY_RELEASE={id:"73b76b0b53402b174350d469272adf0bbf58506c"};(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[1878],{12296:(e,n,t)=>{t.d(n,{m:()=>b});var a=t(52365),r=t(75156),o=t(92516),i=t(1108),s=t(5305),d=t(96054),c=t(61501),l=t(10911),u=t(91349);function f(e,n,t){const a=(0,o.q)(),f=t?.locale??a.locale??r.c,b=(0,d.z)(e,n);if(isNaN(b))throw new RangeError("Invalid time value");const h=Object.assign({},t,{addSuffix:t?.addSuffix,comparison:b}),[p,m]=(0,s.x)(t?.in,...b>0?[n,e]:[e,n]),g=(0,u.O)(m,p),w=((0,i.G)(m)-(0,i.G)(p))/1e3,x=Math.round((g-w)/60);let D;if(x<2)return t?.includeSeconds?g<5?f.formatDistance("lessThanXSeconds",5,h):g<10?f.formatDistance("lessThanXSeconds",10,h):g<20?f.formatDistance("lessThanXSeconds",20,h):g<40?f.formatDistance("halfAMinute",0,h):g<60?f.formatDistance("lessThanXMinutes",1,h):f.formatDistance("xMinutes",1,h):0===x?f.formatDistance("lessThanXMinutes",1,h):f.formatDistance("xMinutes",x,h);if(x<45)return f.formatDistance("xMinutes",x,h);if(x<90)return f.formatDistance("aboutXHours",1,h);if(x<c.F6){const e=Math.round(x/60);return f.formatDistance("aboutXHours",e,h)}if(x<2520)return f.formatDistance("xDays",1,h);if(x<c.Nw){const e=Math.round(x/c.F6);return f.formatDistance("xDays",e,h)}if(x<2*c.Nw)return D=Math.round(x/c.Nw),f.formatDistance("aboutXMonths",D,h);if(D=(0,l.W)(m,p),D<12){const e=Math.round(x/c.Nw);return f.formatDistance("xMonths",e,h)}{const e=D%12,n=Math.trunc(D/12);return e<3?f.formatDistance("aboutXYears",n,h):e<9?f.formatDistance("overXYears",n,h):f.formatDistance("almostXYears",n+1,h)}}function b(e,n){return f(e,(0,a.A)(e),n)}},45710:(e,n,t)=>{t.d(n,{R:()=>r});var a=t(29407);function r(e){return+(0,a.a)(e)<Date.now()}},52365:(e,n,t)=>{t.d(n,{A:()=>r});var a=t(43329);function r(e){return(0,a.w)(e,Date.now())}},91878:(e,n,t)=>{t.r(n),t.d(n,{default:()=>D});var a=t(96540),r=t(52035),o=t(34843),i=t(84929),s=t(41394),d=t(32370),c=t(45710),l=t(42539),u=t(12296),f=t(85577),b=t(91130),h=t(42653),p=t(56171),m=t(79748),g=t(6304),w=t(74848);const x=(0,r.eU)((()=>b.A.get("/api/v1/license").then((e=>e.data)).catch((()=>null)))),D=()=>{const e=(0,o.md)((0,i.Rq)(x)),[n,t]=(0,g.A)(),[r,b]=(0,a.useState)(),[D,y]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{if("hasValue"!==e.state)return;const n=e.data,a=(0,s.H)(n.exp);if(b(a),!(0,d.f)(a))return;const r=parseInt((a-new Date)/1e3/60/60/24);if(r>30)return;const o=localStorage.getItem("dismissLicenceWarning");o&&(0,d.f)((0,s.H)(o))&&!(0,c.R)((0,s.H)(o))&&r>0||(t(!0),r<0&&y(!0))}),[e]),window.envSettings.onprem&&n?D?(0,w.jsx)(h.Layer,{full:!0,backdropProps:{backdropBlur:"3px"},children:(0,w.jsx)(p.A,{testId:"onprem-banner",width:"100%",background:"errorBackground",position:"absolute",top:"0",tooltipProps:{align:"top"},zIndex:20,children:(0,w.jsx)(h.Flex,{justifyContent:"center",alignItems:"center",width:"100%",gap:2,children:(0,w.jsxs)(h.Text,{children:["Your Netdata Enterprise On-prem License has expired on ",(0,f.GP)(r,"PPPP"),". Please contact your admin /"," ",(0,w.jsx)(m.A,{"data-testid":"renew",href:"mailto:billing@netdata.cloud",as:"a",cursor:"pointer",textDecoration:"underline",color:"main",children:"billing@netdata.cloud"})," ","to renew your license."]})})})}):(0,w.jsx)(p.A,{testId:"onprem-banner",width:"100%",background:"warningBackground",position:"absolute",top:"0",onClose:()=>{t(),localStorage.setItem("dismissLicenceWarning",(0,l.W)(new Date,{days:1}).toISOString())},tooltipProps:{align:"top"},zIndex:20,children:(0,w.jsx)(h.Flex,{justifyContent:"center",alignItems:"center",width:"100%",gap:2,children:(0,w.jsxs)(h.Text,{children:["Your Netdata Enterprise On-prem License will expire in ",(0,u.m)(r),". Please contact your admin /"," ",(0,w.jsx)(m.A,{"data-testid":"renew",href:"mailto:billing@netdata.cloud",as:"a",cursor:"pointer",textDecoration:"underline",color:"main",children:"billing@netdata.cloud"})," ","to renew your license."]})})}):null}}}]);