1
|
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8dce808c-0875-4ae0-b589-d21a5bf0a9b0",e._sentryDebugIdIdentifier="sentry-dbid-8dce808c-0875-4ae0-b589-d21a5bf0a9b0")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"30b1ba65cc8722be7e184f4a401fb43e6b21634d"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[86],{60086:(e,n,t)=>{t.r(n),t.d(n,{default:()=>U});var a=t(58168),r=(t(62953),t(96540)),o=t(83199),l=t(16074),d=t(84929),i=t(63933),s=t(82526),c=t(29176),p=t(87991),u=t(5396),b=t(29217),f=t(87659),g=t(92155),m=t(25624),E=t(99904),w=t(35454),y=t(24864),x=t(93476),I=t(28061);const h=new Date("12/31/2023 23:59:59 +2"),A=new Date,S=(k=(0,g.A)(y.PL),e=>{let{canUpgrade:n,...t}=e;return n?r.createElement(k,t):r.createElement(b.A,{content:"You don't have permissions to upgrade the plan"},r.createElement(o.Flex,null,r.createElement(k,(0,a.A)({disabled:!0},t))))});var k;const U=e=>{let{flavour:n="banner"}=e;const{onTrial:t,sidebarWarningVisible:a,bannerVisible:b,dismissBanner:g,type:k,canUpgrade:U,planIsFreeOrEarlyBird:D}=(0,m.A)(),{coupon:_}=(0,E.A)(),v=parseFloat((h-A)/1e3/60/60/24),B=_||(v>0?"50SURPRISE":""),C=(0,I.A)(B),P=!t&&D,[R,T]=(0,f.A)();return(0,r.useEffect)((()=>{const e=localStorage.getItem("dismissSidebarBanner");e&&(0,l.f)((0,d.H)(e))&&!(0,i.R)((0,d.H)(e))||T(!0)}),[]),"sidebar"==n&&(a||P)?R?r.createElement(y.bg,{type:t?k:"default",column:!0,gap:2,margin:[2],padding:[2]},r.createElement(o.Box,{"data-testid":"close-button",as:o.Icon,color:"text",cursor:"pointer",name:"x",position:"absolute",right:"2px",top:"2px",width:"12px",height:"12px",onClick:()=>{T(),localStorage.setItem("dismissSidebarBanner",(0,s.W)(new Date,{days:3}).toISOString())}}),r.createElement(x.A,{flavour:t?n:"freePlanUpgrade",couponRemainingDays:v,expDate:h,onUpdateClick:C}),r.createElement(S,{feature:"UpgradeToBusiness",isStart:!0,small:!0,"data-testid":"upgradeToBusiness-sidebar",label:v>0?"Upgrade now!":"Upgrade",canUpgrade:U,onClick:C}),v>0&&(0,l.f)(h)&&r.createElement(o.TextNano,{strong:!0,textAlign:"center",lineHeight:.8},"Expires"," ",v<1?"".concat((0,c.m)(h,{addSuffix:!0})," ").concat((0,p.GP)(h,"'at' p")):"on ".concat((0,p.GP)(h,"do 'of' MMM', at' p")))):null:b?r.createElement(u.A,{testId:"trial-banner",width:"100%",background:w.ue[k],onClose:g,tooltipProps:{align:"top"},zIndex:20},r.createElement(x.A,{flavour:n,onUpdateClick:C})):null}}}]);
|