summaryrefslogtreecommitdiffstats
path: root/web/gui/v2/9886.7d6c2ffca80bd567e52d.chunk.js
blob: ec07d84e66ae0e3db55a012e2d2e87aeb294f788 (plain)
1
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="9a380c62-3ba1-4bf6-b652-ab003fad57c0",e._sentryDebugIdIdentifier="sentry-dbid-9a380c62-3ba1-4bf6-b652-ab003fad57c0")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"8b7b01b6c705cf50f8050ce0fb8fc6b58fe68567"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[9886],{39886:function(e,t,n){n.r(t),n.d(t,{default:function(){return C}});var l=n(87462),a=n(29439),o=n(67294),r=n(93416),i=n(13477),c=n(71893),d=(c.default.ul.withConfig({displayName:"styled__StyledList",componentId:"sc-z791f1-0"})(["list-style:disc outside none;margin-left:16px;"]),(0,c.default)(r.ModalContent).attrs((function(e){return{width:e.isMobile?{base:"95vw"}:{}}})).withConfig({displayName:"styled__TrialWelcomeModalContent",componentId:"sc-z791f1-1"})([""])),u=n(62195),s=n(29292),f=function(e){var t=e.onOptOutClick,n=e.isFailure;return o.createElement(r.Flex,{column:!0,gap:4,width:{max:120},padding:[0,0,4,0]},n?o.createElement(o.Fragment,null,o.createElement(r.TextBigger,null,"Enrolment to 30-day free Business trial failed."),o.createElement(r.TextBigger,{lineHeight:1.5},"Something unexpected happened when trying to enrol you to the free Business trial.")):o.createElement(o.Fragment,null,o.createElement(r.TextBigger,{lineHeight:1.5},"We are happy to upgrade your account to Netdata Business, for free, for"," ",o.createElement(r.TextBigger,{strong:!0},"30 days"),"."),o.createElement(r.TextBigger,null,"Enjoy the best of Netdata!"),"function"===typeof t&&o.createElement(s.Z,{onOptOutClick:t})))},m=n(46667),g=n(39979),b=n(63346),p=n(22648),E=n(60511),y=n(96009),h=n(80699),w=n(36285),_=n(33937),k=(0,g.Z)(r.Button),C=(0,o.memo)((function(){var e=(0,E.Z)().trialWelcomeVisible,t=(0,p.m)(),n=(0,i.Iy)("email"),c=(0,m.Z)(!0),s=(0,a.Z)(c,4),g=s[0],C=s[3],Z=(0,m.Z)(),x=(0,a.Z)(Z,3),B=x[0],F=x[2],I=(0,h.Z)(),T=I.isFailure,v=I.reset,M=(0,m.Z)(),P=(0,a.Z)(M,4),D=P[0],N=P[2],S=P[3],O=(0,E.Z)().refreshPlan,W=(0,_.pI)("trialModalDismissed"),H=(0,a.Z)(W,2)[1],R=(0,w.kK)(),L=(0,o.useCallback)((function(){N(),R({email:n}).then((function(){setTimeout((function(){O(),v(),S()}),2e3)})).catch((function(){S()}))}),[n]),j=(0,o.useMemo)((function(){return T?{feature:"CloseTrialEnrolmentErrorModal",label:"Close",flavour:"hollow"}:{feature:"TrialAccept",label:"OK",textTransform:"uppercase",flavour:"hollow",icon:"thumb_up"}}),[T]);return e?B?o.createElement(u.Z,{onDecline:F,onCancellingEnd:function(){localStorage.setItem(y.Bk,!0),F(),C()}}):g?o.createElement(r.Modal,{backdropProps:{backdropBlur:!0}},o.createElement(b.ZP,{feature:"TrialWelcome"},o.createElement(d,{isMobile:t},o.createElement(r.ModalHeader,null,o.createElement(r.Flex,{gap:2,alignItems:"center"},o.createElement(r.Icon,{name:"netdataPress",color:"text"}),o.createElement(r.H4,null,"Welcome to Netdata!"))),o.createElement(r.ModalBody,null,o.createElement(f,{isFailure:T})),o.createElement(r.ModalFooter,null,o.createElement(r.Flex,{gap:4,justifyContent:"end",padding:[1,2]},T&&o.createElement(k,{feature:"RetryTrialEnrolment",label:"Retry",onClick:L,disabled:D,isLoading:D}),o.createElement(k,(0,l.Z)({onClick:function(){var e,t;(C(),v(),localStorage.setItem(y.Bk,!0),!T&&null!==(e=window.posthog)&&void 0!==e&&e.setPersonPropertiesForFlags)&&(null===(t=window.posthog)||void 0===t||t.setPersonPropertiesForFlags({netdata_cloud_trial_modal_seen:!0}));H(!0)},disabled:D},j))))))):null:null}))}}]);