File: //opt/netdata/usr/local/local/share/netdata/web/v3/2201.e5a3a1aea207d6c1e99b.chunk.js
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"3c253701267e9b7af50090f7cc5ae44ccccdde3d"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="464edd75-5479-4063-9ffd-315668cf4a8c",e._sentryDebugIdIdentifier="sentry-dbid-464edd75-5479-4063-9ffd-315668cf4a8c")}catch(e){}}(),(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[2201,4582],{52201(e,t,n){n.r(t),n.d(t,{OptOut:()=>v.A,OptOutModal:()=>A.A,TrialMessage:()=>k.A,TrialWarning:()=>w,default:()=>T,useBusinessPlan:()=>C.A,useTrial:()=>a.A});var r=n(46587),o=(n(62953),n(96540)),l=n(7960),s=n(24285),a=n(10853),i=n(60266),c=n(19707),d=n(10444),u=n(34495),p=n(74848);const f=(0,l.A)((()=>Promise.resolve().then(n.bind(n,34495))),"PostSignup"),h=(0,l.A)((()=>n.e(4484).then(n.bind(n,14484))),"TrialWelcome"),b=(0,l.A)((()=>n.e(3718).then(n.bind(n,11337))),"BumpedWarning"),g=(0,l.A)((()=>n.e(2108).then(n.bind(n,62108))),"OnboardingForm"),y=()=>{const{isEarlybirdAndCommunitySunset:e}=(0,i.A)(),{trialWelcomeVisible:t,paymentProvider:n}=(0,a.A)(),{email:l,isAnonymous:y}=(0,r.uW)(),[j]=(0,s.tF)("signupSurveySubmitted"),x=(0,c.I)(),[O]=(0,u.usePostSignup)(),m=(0,d.J)();if(!e&&!x&&"AWS"!==n&&!y&&!j)return(0,p.jsx)(o.Suspense,{fallback:"",children:(0,p.jsx)(g,{email:l})});if(m&&!O)return(0,p.jsx)(o.Suspense,{fallback:"",children:(0,p.jsx)(f,{})});const w=e?b:t?h:null;return w?(0,p.jsx)(o.Suspense,{fallback:"",children:(0,p.jsx)(w,{})}):null};var j=n(64467);n(98992),n(54520),n(3949);function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){(0,j.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const m=(0,l.A)((()=>Promise.resolve().then(n.bind(n,44913))),"Warnings"),w=e=>(0,r.uW)("isAnonymous")?null:(0,p.jsx)(o.Suspense,{fallback:"",children:(0,p.jsx)(m,O({},e))});var v=n(42711),A=n(71282),k=n(54677),C=n(2652);const T=()=>{const e=(0,r.uW)("isAnonymous");return window.envSettings.onprem||e?null:(0,p.jsx)(y,{})}},34495(e,t,n){n.r(t),n.d(t,{default:()=>u,usePostSignup:()=>d});n(62953);var r=n(96540),o=n(41344),l=n(42358),s=n(46587),a=n(10444),i=n(79748),c=n(74848);const d=()=>{const e=(0,s.NJ)(),t="postsignup-disnissed-".concat(e);return[localStorage.getItem(t),(0,r.useCallback)((()=>{localStorage.setItem(t,!0)}),[t])]},u=()=>{const e=(0,o.Zp)(),{pathname:t}=(0,o.zy)(),[,n]=d(),s=(0,a.J)(),u=(0,r.useCallback)((()=>{n(),e(t,{replace:!0})}),[t,n]);return(0,c.jsx)(l.Modal,{backdropProps:{backdropBlur:!0},children:(0,c.jsxs)(l.ModalContent,{width:s?{base:"95vw"}:{},children:[(0,c.jsx)(l.ModalHeader,{children:(0,c.jsxs)(l.Flex,{gap:2,alignItems:"center",children:["Tip",(0,c.jsx)(l.ModalCloseButton,{testId:"close-button",onClose:u})]})}),(0,c.jsx)(l.ModalBody,{children:(0,c.jsxs)(l.Flex,{column:!0,gap:3,width:{max:120},padding:[0,0,4,0],children:[(0,c.jsx)(l.TextBigger,{lineHeight:1.5,children:"Netdata works best on larger screens. Try logging in from a laptop, desktop or tablet for the ultimate dashboard adventure."}),(0,c.jsxs)(l.TextBigger,{lineHeight:1.5,children:["Installing the Netdata agent takes less than a minute, check out the"," ",(0,c.jsx)(i.A,{Component:l.TextBigger,href:"https://www.youtube.com/watch?v=z5m8JdwMOn8",target:"_blank",rel:"noopener noreferrer",children:"video"})," ","and try it out yourself!"]})]})}),(0,c.jsx)(l.ModalFooter,{children:(0,c.jsx)(l.Flex,{gap:4,justifyContent:"end",padding:[1,2],children:(0,c.jsx)(l.Button,{label:"Dismiss",flavour:"hollow",onClick:u})})})]})})}},71282(e,t,n){n.d(t,{A:()=>g});n(9391),n(62953);var r=n(96540),o=n(63950),l=n.n(o),s=n(42358),a=n(18739),i=n(63872),c=n(60908),d=n(94404),u=n(3319),p=n(6304),f=n(37785),h=n(74848);const b=(0,d.A)(s.Button),g=e=>{let{onConfirm:t,onDecline:n=l(),onCancellingEnd:o=l()}=e;const d=(0,a.M4)(),[g,y]=(0,i.A)(),{id:j}=(0,f.A)(),{sendLog:x,isReady:O}=(0,u.A)(),[m,,w,v]=(0,p.A)(),A=(0,r.useCallback)((()=>{w(),d({productId:j}).then((()=>{g({header:"Successfully canceled subscription",text:"You are now on Community plan"}),x({feature:"TrialOptOut",isSuccess:!0})})).catch((()=>{y({header:"Failed to cancel the subscription",text:"Remained on Business plan"}),x({feature:"TrialOptOut",isFailure:!0,error:"Failed to cancel the subscription"})})).finally((()=>{o(),v()}))}),[j,O]),k=(0,r.useCallback)((()=>{t?t():A()}),[t,A]);return(0,h.jsx)(s.Modal,{backdropProps:{backdropBlur:!0},children:(0,h.jsx)(c.Ay,{feature:"TrialOptOut",children:(0,h.jsxs)(s.ModalContent,{width:{base:140},children:[(0,h.jsx)(s.ModalHeader,{children:(0,h.jsx)(s.Flex,{gap:2,alignItems:"center",children:(0,h.jsx)(s.H4,{children:"Opt out of Free Trial"})})}),(0,h.jsx)(s.ModalBody,{children:m?(0,h.jsx)(s.Flex,{height:"100px",children:(0,h.jsx)(s.TextBig,{children:"Changing billing plan..."})}):(0,h.jsxs)(s.Flex,{gap:2,column:!0,children:[(0,h.jsx)(s.H3,{children:"Are You Sure?"}),(0,h.jsx)(s.TextBig,{children:"It looks like you have chosen to opt-out of your free 14-day business trial. Are you sure you do not want to experience all the features Netdata has to offer?"}),(0,h.jsx)(s.TextBig,{children:"By opting out, you will be downgraded to the community plan immediately."})]})}),(0,h.jsx)(s.ModalFooter,{children:(0,h.jsxs)(s.Flex,{justifyContent:"end",gap:4,padding:[1,2],children:[(0,h.jsx)(b,{feature:"TrialOptOut",label:"Yes, I am sure!",flavour:"hollow",small:!0,onClick:k,disabled:!j||m,textTransform:""}),(0,h.jsx)(b,{feature:"TrialOptOut",label:"No, I want the trial!",small:!0,onClick:n,disabled:m,textTransform:""})]})})]})})})}},42711(e,t,n){n.d(t,{A:()=>b});n(98992),n(54520),n(3949);var r=n(64467),o=n(80045),l=n(96540),s=n(63950),a=n.n(s),i=n(42358),c=n(3319),d=n(74848);const u=["flavour","onOptOutClick"];function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){(0,r.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const h={default:"Or you can opt to downgrade immediately",billing:"Or you can opt to downgrade immediately"},b=e=>{let{flavour:t="default",onOptOutClick:n=a()}=e,r=(0,o.A)(e,u);const{sendLog:s,isReady:p}=(0,c.A)(),b=(0,l.useCallback)((()=>{n(),s({feature:"TrialOptOut",isStart:!0})}),[p]);return(0,d.jsxs)(i.Text,f(f({},r),{},{children:["After the trial, you'll automatically switch to the free Community plan."," ",(0,d.jsx)(i.Box,{"data-testid":"upgrade-to-business-banner",onClick:b,as:i.Text,cursor:"pointer",textDecoration:"underline",color:"primary",children:h[t]}),"."]}))}},37785(e,t,n){n.d(t,{A:()=>i,s:()=>a});n(26910);var r=n(18739),o=n(18387),l=n(50979);const s=e=>{var t;const{value:n}=(0,r.lU)();if(null===n||void 0===n||!n[e])return{};const l=Object.keys(n[e]).sort(o.M7)[0];return{id:n[e][l]?null===(t=n[e][l][0])||void 0===t?void 0:t.id:null,version:l}},a=()=>s(l.VH.homelab),i=()=>s(l.VH.free)}}]);