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]="b948aa60-03c9-4448-b2a7-7c2561258cb6",e._sentryDebugIdIdentifier="sentry-dbid-b948aa60-03c9-4448-b2a7-7c2561258cb6")}catch(e){}("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:{}).SENTRY_RELEASE={id:"5d40e988866bc1ced9436c4523b12b814ae5cda9"};(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[1878],{12296:(e,n,t)=>{t.d(n,{m:()=>h});var a=t(52365),r=t(75156),o=t(92516),i=t(1108),s=t(5305),c=t(96054),d=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,h=(0,c.z)(e,n);if(isNaN(h))throw new RangeError("Invalid time value");const p=Object.assign({},t,{addSuffix:t?.addSuffix,comparison:h}),[b,m]=(0,s.x)(t?.in,...h>0?[n,e]:[e,n]),g=(0,u.O)(m,b),w=((0,i.G)(m)-(0,i.G)(b))/1e3,x=Math.round((g-w)/60);let D;if(x<2)return t?.includeSeconds?g<5?f.formatDistance("lessThanXSeconds",5,p):g<10?f.formatDistance("lessThanXSeconds",10,p):g<20?f.formatDistance("lessThanXSeconds",20,p):g<40?f.formatDistance("halfAMinute",0,p):g<60?f.formatDistance("lessThanXMinutes",1,p):f.formatDistance("xMinutes",1,p):0===x?f.formatDistance("lessThanXMinutes",1,p):f.formatDistance("xMinutes",x,p);if(x<45)return f.formatDistance("xMinutes",x,p);if(x<90)return f.formatDistance("aboutXHours",1,p);if(x<d.F6){const e=Math.round(x/60);return f.formatDistance("aboutXHours",e,p)}if(x<2520)return f.formatDistance("xDays",1,p);if(x<d.Nw){const e=Math.round(x/d.F6);return f.formatDistance("xDays",e,p)}if(x<2*d.Nw)return D=Math.round(x/d.Nw),f.formatDistance("aboutXMonths",D,p);if(D=(0,l.W)(m,b),D<12){const e=Math.round(x/d.Nw);return f.formatDistance("xMonths",e,p)}{const e=D%12,n=Math.trunc(D/12);return e<3?f.formatDistance("aboutXYears",n,p):e<9?f.formatDistance("overXYears",n,p):f.formatDistance("almostXYears",n+1,p)}}function h(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),c=t(32370),d=t(45710),l=t(42539),u=t(12296),f=t(85577),h=t(91130),p=t(99275),b=t(56171),m=t(79748),g=t(6304),w=t(74848);const x=(0,r.eU)((()=>h.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,h]=(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(h(a),!(0,c.f)(a))return;const r=parseInt((a-new Date)/1e3/60/60/24);if(r>30)return;const o=localStorage.getItem("dismissLicenceWarning");o&&(0,c.f)((0,s.H)(o))&&!(0,d.R)((0,s.H)(o))&&r>0||(t(!0),r<0&&y(!0))}),[e]),window.envSettings.onprem&&n?D?(0,w.jsx)(p.Layer,{full:!0,backdropProps:{backdropBlur:"3px"},children:(0,w.jsx)(b.A,{testId:"onprem-banner",width:"100%",background:"errorBackground",position:"absolute",top:"0",tooltipProps:{align:"top"},zIndex:20,children:(0,w.jsx)(p.Flex,{justifyContent:"center",alignItems:"center",width:"100%",gap:2,children:(0,w.jsxs)(p.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)(b.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)(p.Flex,{justifyContent:"center",alignItems:"center",width:"100%",gap:2,children:(0,w.jsxs)(p.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}}}]);