try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},l=(new e.Error).stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="ce4415d3-9ab8-430b-894b-25c35242ab7b",e._sentryDebugIdIdentifier="sentry-dbid-ce4415d3-9ab8-430b-894b-25c35242ab7b")}catch(e){}("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:{}).SENTRY_RELEASE={id:"1bb8aa54b6deb0d4e541ef02c3c43ba128927d94"};(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[4484],{14484:(e,l,n)=>{n.r(l),n.d(l,{default:()=>w});var t=n(96540),o=n(46093),i=n(46587),s=n(43891),a=n(71282),d=n(42711),r=n(74848);const c=e=>{let{daysRemaining:l,onOptOutClick:n,isFailure:t}=e;return(0,r.jsx)(o.Flex,{column:!0,gap:4,width:{max:120},padding:[0,0,4,0],children:t?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.TextBigger,{children:"Enrolment to 14-day free Business trial failed."}),(0,r.jsx)(o.TextBigger,{lineHeight:1.5,children:"Something unexpected happened when trying to enrol you to the free Business trial."})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o.TextBigger,{lineHeight:1.5,children:["We are happy to upgrade your account to Netdata Business, for free, for"," ",(0,r.jsxs)(o.TextBigger,{strong:!0,children:[l," days"]}),"."]}),(0,r.jsx)(o.TextBigger,{children:"Enjoy the best of Netdata!"}),"function"===typeof n&&(0,r.jsx)(d.A,{onOptOutClick:n})]})})};var u=n(6304),f=n(3203),g=n(60908),h=n(10444),b=n(10853),p=n(68399),x=n(53142),y=n(18739),m=n(24285);const j=(0,f.A)(o.Button),w=(0,t.memo)((()=>{const{trialWelcomeVisible:e,daysRemaining:l}=(0,b.A)(),n=(0,h.J)(),d=(0,i.uW)("email"),[f,,,w]=(0,u.A)(!0),[T,,_]=(0,u.A)(),{isFailure:C,reset:B}=(0,x.A)(),[k,,A,E]=(0,u.A)(),{refreshPlan:I}=(0,b.A)(),[,M]=(0,m.ng)("trialModalDismissed"),F=(0,y.i5)(),P=(0,t.useCallback)((()=>{A(),F({email:d}).then((()=>{setTimeout((()=>{I(),B(),E()}),2e3)})).catch((()=>{E()}))}),[d]),R=(0,t.useMemo)((()=>C?{feature:"CloseTrialEnrolmentErrorModal",label:"Close",flavour:"hollow"}:{feature:"TrialAccept",label:"OK",textTransform:"uppercase",flavour:"hollow",icon:"thumb_up"}),[C]);return e?T?(0,r.jsx)(a.A,{onDecline:_,onCancellingEnd:()=>{localStorage.setItem(p.$B,!0),_(),w()}}):f?(0,r.jsx)(o.Modal,{backdropProps:{backdropBlur:!0},children:(0,r.jsx)(g.Ay,{feature:"TrialWelcome",children:(0,r.jsxs)(s.P,{isMobile:n,children:[(0,r.jsx)(o.ModalHeader,{children:(0,r.jsxs)(o.Flex,{gap:2,alignItems:"center",children:[(0,r.jsx)(o.Icon,{name:"netdataPress",color:"text"}),(0,r.jsx)(o.H4,{children:"Welcome to Netdata!"})]})}),(0,r.jsx)(o.ModalBody,{children:(0,r.jsx)(c,{daysRemaining:l,isFailure:C})}),(0,r.jsx)(o.ModalFooter,{children:(0,r.jsxs)(o.Flex,{gap:4,justifyContent:"end",padding:[1,2],children:[C&&(0,r.jsx)(j,{feature:"RetryTrialEnrolment",label:"Retry",onClick:P,disabled:k,isLoading:k}),(0,r.jsx)(j,{onClick:()=>{w(),B(),localStorage.setItem(p.$B,!0),!C&&window.posthog?.setPersonProperties&&window.posthog?.setPersonProperties({netdata_cloud_trial_modal_seen:!0}),M(!0)},disabled:k,...R})]})})]})})}):null:null}))},43891:(e,l,n)=>{n.d(l,{K:()=>i,P:()=>s});var t=n(33185),o=n(46093);const i=t.default.ul.withConfig({displayName:"styled__StyledList",componentId:"sc-z791f1-0"})(["list-style:disc outside none;margin-left:16px;"]),s=(0,t.default)(o.ModalContent).attrs((e=>{let{isMobile:l}=e;return{width:l?{base:"95vw"}:{}}})).withConfig({displayName:"styled__TrialWelcomeModalContent",componentId:"sc-z791f1-1"})([""])}}]);