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