File: //opt/netdata/usr/local/share/netdata/web/v3/3439.08beb1cd7d6ccf2ad991.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:"0b2b41ad76fac2d30743e79c4ef362ca62714b16"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5b0551b7-b5d0-48c8-aaa8-776528a06aaa",e._sentryDebugIdIdentifier="sentry-dbid-5b0551b7-b5d0-48c8-aaa8-776528a06aaa")}catch(e){}}(),(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[3439],{80590(e,t,r){r.d(t,{A:()=>u});r(98992),r(54520),r(3949);var n=r(64467),a=r(80045),o=r(96540),i=r(3319),c=r(74848);const s=["callback","feature","isStart","isSuccess","isFailure","eventReason","payload"];function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){(0,n.A)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const u=e=>t=>{let{callback:r,feature:n,isStart:l,isSuccess:u,isFailure:p,eventReason:b,payload:f={}}=t,y=(0,a.A)(t,s);const{sendLog:h,isReady:g}=(0,i.A)(),j=(0,o.useCallback)((e=>{const t=y[r],a=d(d(d(d(d(d(d(d(d(d({},n?{feature:n}:{}),void 0!==l?{isStart:l}:{}),void 0!==u?{isSuccess:u}:{}),void 0!==p?{isFailure:p}:{}),b?{eventReason:b}:{}),f),y["data-ga"]?{dataGa:y["data-ga"]}:{}),y.dataGa?{dataGa:y.dataGa}:{}),y["data-track"]?{dataTrack:y["data-track"]}:{}),y.label?{label:y.label}:{});"function"===typeof t&&t(e),h(a,!0)}),[r,h,g,f,y]),O=(0,o.useMemo)((()=>d(d({},y),{},{[r]:j})),[y,r,j]);return(0,c.jsx)(e,d({},O))}},94404(e,t,r){r.d(t,{A:()=>u});r(98992),r(54520),r(3949);var n=r(64467),a=r(80045),o=r(80590),i=r(81691),c=r(74848);const s=["payload"];function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){(0,n.A)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const u=e=>t=>{let{payload:r={}}=t,n=(0,a.A)(t,s);const l=(0,o.A)(e);return(0,c.jsx)(l,d(d({},n),{},{callback:"onClick",payload:d(d({},r),{},{action:i.o1.buttonClicked})}))}},72060(e,t,r){r.d(t,{A:()=>n});r(27495),r(62953),r(3296),r(27208),r(48408);const n=e=>{try{if(!e)return null;const t=document.createElement("a");return t.href=e,/https?/.test(t.protocol)?new URL(t.protocol+"//"+t.host+t.pathname+t.search+t.hash).toString():null}catch(t){return null}}},55093(e,t,r){r.d(t,{A:()=>y,m:()=>f});r(98992),r(54520),r(3949);var n=r(64467),a=r(80045),o=r(51510),i=r(42358),c=r(74848);const s=["title","width","height"],l=["title","body","iconProps","animate","testId"];function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){(0,n.A)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const p=(0,o.keyframes)(["from{opacity:0.4;}to{opacity:1;}"]),b=(0,o.default)(i.Icon).withConfig({displayName:"loader__StyledIcon",componentId:"sc-a76ek6-0"})(["width:",";height:",";animation:",";"],(e=>e.width),(e=>e.height),(e=>{let{animate:t}=e;return t?(0,o.css)([""," 1.6s ease-in infinite"],p):""})),f=e=>{let{title:t="Loading",width:r="208px",height:n="177px"}=e,o=(0,a.A)(e,s);return(0,c.jsx)(b,u({name:"netdata",color:"primary",title:t,"data-testid":"loading-logo",width:r,height:n},o))},y=e=>{let{title:t,body:r,iconProps:n,animate:o=!0,testId:s=""}=e,d=(0,a.A)(e,l);return(0,c.jsxs)(i.Flex,u(u({column:!0,height:"100vh",background:"mainBackground",width:"100%",justifyContent:"center",alignItems:"center","data-testid":"loader-container-".concat(s)},d),{},{children:[(0,c.jsx)(f,u(u({},n),{},{animate:o})),t&&(0,c.jsx)(i.H3,{color:"text",margin:[1,0,0],children:t}),r&&(0,c.jsx)(i.Text,{color:"text",margin:[4.5,0,0],children:r})]}))}},33439(e,t,r){r.r(t),r.d(t,{Trust:()=>y,default:()=>h});r(9391),r(27495),r(25440),r(98992),r(72577),r(62953);var n=r(96540),a=r(43276),o=r(42358),i=r(72060),c=r(46587),s=r(23947),l=r(55093),d=r(60908),u=r(94404),p=r(3319),b=r(74848);const f=(0,u.A)(o.Button),y=()=>{const e=(()=>{const e=(0,c.uW)("id"),t=(0,c.uW)("email");return(0,n.useCallback)((()=>{var r;e&&t&&(null!==(r=window.posthog)&&void 0!==r&&r.__loaded&&(window.posthog.identify(e),window.posthog.people.set({email:t})),window.Reo&&window.Reo.identify({username:t,type:"email"}))}),[e,t])})(),[t,r]=(0,n.useMemo)((()=>{const{search:e}=window.location,{redirect_uri:t,agent_uri:r}=a.A.parse(e);return[(0,i.A)(t),r]})),[u,y]=(0,n.useState)(),[h,g,j]=(0,s.LC)(),[O,w]=(0,s.Yr)({},[h]),{sendLog:m,isReady:x}=(0,p.A)();return(0,n.useEffect)((()=>{let n=!0,a=null;const o=O.find((e=>e.url===r));return o?m({feature:"TrustUrl",description:"Redirect due to trusted url"}).finally((()=>{e(),location.replace("/api/v1/auth/account/origins/".concat(o.id,"/redirect?redirect_uri=").concat(encodeURIComponent(t),"&agent_uri=").concat(encodeURIComponent(r)))})):a=setTimeout((()=>{n&&y(!0)}),1e3),()=>{n=!1,a&&(clearTimeout(a),a=null)}}),[t,r,O,x]),u?(0,b.jsx)(d.Ay,{feature:"TrustUrl",children:(0,b.jsx)(o.Layer,{full:!0,children:(0,b.jsxs)(o.Flex,{"data-testid":"trust",alignItems:"center",justifyContent:"center",column:!0,width:"100%",height:"100%",background:"mainBackground",gap:4,children:[(0,b.jsx)(l.m,{animate:j}),(0,b.jsxs)(o.Text,{textAlign:"center",children:["Do you trust ",(0,b.jsx)(o.Text,{strong:!0,children:r}),"?"]}),(0,b.jsxs)(o.Flex,{column:!0,gap:2,alignItems:"center",children:[(0,b.jsx)(o.TextBig,{children:"Authorizing this URL will allow it to request your Netdata data."}),(0,b.jsxs)(o.Flex,{gap:2,children:[(0,b.jsx)(f,{flavour:"borderless",onClick:()=>window.location.replace(decodeURIComponent(t)),disabled:w||j,"data-ga":"url-authorization::click-cancel-button",feature:"TrustUrl",payload:{label:"Cancel"},children:"Cancel"}),(0,b.jsx)(f,{onClick:()=>g(r),disabled:w||j,isLoading:w||j,"data-ga":"url-authorization::click-yes-button",feature:"TrustUrl",payload:{label:"Yes"},children:"Yes"})]})]})]})})}):(0,b.jsx)(l.A,{})},h=y}}]);