File: //opt/netdata/usr/local/share/netdata/web/v3/2117.8aac63704bf310e0ee2f.chunk.js
try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="58e08a40-be5d-442d-8683-25534cf04941",e._sentryDebugIdIdentifier="sentry-dbid-58e08a40-be5d-442d-8683-25534cf04941")}()}catch(e){}!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"24860f4888408c3529c668460cb7600d59ef7ae7"}}catch(e){}}(),(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[2117,5187],{45187:(e,n,o)=>{o.d(n,{R:()=>s,H:()=>c});var t=o(34843),l=o(52035);const d=(0,l.eU)(!1),a=(0,l.eU)(!1);var i=o(96540);const s=()=>{const[e,n]=(0,t.fp)(d);return{isInitialized:e,init:(0,i.useCallback)((()=>n(!0)),[n])}},c=()=>{const[e,n]=(0,t.fp)(a);return{isActive:e,activate:(0,i.useCallback)((()=>n(!0)),[n]),deactivate:(0,i.useCallback)((()=>n(!1)),[n])}}},72117:(e,n,o)=>{o.r(n),o.d(n,{default:()=>r});var t=o(96540),l=o(46587),d=o(26276),a=o(45187),i=o(89942);const s=()=>{const e=(0,i.PP)(),{referralModalOpen:n}=e,{isInitialized:o}=(0,a.R)();(0,t.useEffect)((()=>{"true"==n&&o&&"function"===typeof window.Cello&&(window.Cello("open"),(0,i.Z8)({...e,referralModalOpen:"false"}))}),[o,n])};var c=o(3319),f=o(78152);const r=()=>{const e=(0,l.uW)(),{init:n}=(0,a.R)(),{sendLog:o}=(0,c.A)(),i=(0,t.useMemo)((()=>f.GW&&e&&!e.isAnonymous),[e]);return s(),(0,t.useEffect)((()=>{let e=null;return i&&(window.cello=window.cello||{cmd:[]},e=(0,d._D)(),document.head.appendChild(e)),()=>{e&&document.head.removeChild(e)}}),[i]),(0,t.useEffect)((()=>{const{token:t,productId:l}=(0,d.sA)();if(i&&t&&l&&e.name){const d=e.name?.split?.(" ")||[],a=d.length>0?d[0]:"";window.cello.cmd.push((async function(d){try{await d.boot({productId:l,token:t,language:"en",productUserDetails:{firstName:a,fullName:e.name,email:e.email}}),n()}catch(i){o({feature:"ReferralComponent",error:i.message||"Failed to boot cello referral component"})}}))}}),[i,e,n]),null}}}]);