MOON
Server: Apache
System: Linux server1.studioinfinity.com.br 2.6.32-954.3.5.lve1.4.90.el6.x86_64 #1 SMP Tue Feb 21 12:26:30 UTC 2023 x86_64
User: artinside (517)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/netdata/netdata-web-files/v3/586.eb10a4f650e0d5adb5ab.chunk.js
try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="76fb1743-4589-4943-8c39-60e98f4f6103",e._sentryDebugIdIdentifier="sentry-dbid-76fb1743-4589-4943-8c39-60e98f4f6103")}()}catch(e){}!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"0d597b660e680dc5bde02dc0a1a30ba3e59b2b5c"}}catch(e){}}(),(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[586],{4719:(e,t,n)=>{n.d(t,{BV:()=>d,Dv:()=>f,Qb:()=>m,aV:()=>h,b:()=>u,tu:()=>l,yy:()=>c});var r=n(83488),o=n.n(r),i=n(66814),a=n(27250),s=n(74848);const l=(0,i.q6)({}),d=e=>{let{menuById:t,children:n}=e;return(0,s.jsx)(l.Provider,{value:t,children:n})},c=e=>(0,a.A)(l,e),u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o();return c((n=>t(n?.[e]||{})))},h=(e,t)=>n=>{let{id:r,...o}=n;const i=u(r,t);return(0,s.jsx)(e,{_id:r,...i,...o})},g=(0,i.q6)([]),f=e=>{let{ids:t,children:n}=e;return(0,s.jsx)(g.Provider,{value:t,children:n})},m=e=>t=>{const n=(0,a.A)(g,r);var r;return(0,s.jsx)(e,{menuIds:n,...t})}},14512:(e,t,n)=>{n.d(t,{A:()=>A,g:()=>x});var r=n(96540),o=n(33185),i=n(86177),a=n(45087),s=n(24013),l=n(87083),d=n(19186),c=n(24609),u=n(24200),h=n(64463),g=n(74891),f=n(3319),m=n(74848);const y=(0,o.default)(i.IconComponents.LoaderIcon).withConfig({displayName:"anomalyRates__StyledLoaderIcon",componentId:"sc-1b01y04-0"})(["flex:0 0 auto;height:16px;width:16px;"]),b=(0,g.A)(i.Flex),p=()=>(0,m.jsxs)(b,{height:"20px",alignItems:"center",gap:1,tooltip:"Loading weights. This might take some time.",children:[(0,m.jsx)(y,{}),(0,m.jsx)(i.TextSmall,{children:"Loading..."})]}),v=(0,g.A)(i.Button),x=()=>{const e=(0,s.nl)(),t=(0,l.w7)();return e?[e]:t},A=()=>{const[e,t]=(0,r.useState)(),n=(0,c.vt)(),o=(0,d.ID)(),s=x(),{pause:l}=(0,h.A)(),{sendLog:g}=(0,f.A)(),[y,b,,A]=(0,u.f_)(n,o,s),w=(0,r.useCallback)((()=>{l(),y(),g({feature:"AnomalyRates-TOC",label:"Anomaly%",isStart:!0},!0)}),[l,y,g]),C=(0,r.useCallback)((e=>{let{target:n}=e;const r=n.checked;t(r),r?w():A()}),[t,w,A]);return(0,m.jsx)(i.Flex,{alignItems:"center",justifyContent:"between",width:"100%",margin:[2,0,0,0],padding:[2,0,0,0],children:b?(0,m.jsx)(p,{}):(0,m.jsxs)(i.Flex,{alignItems:"center",justifyContent:"between",width:"100%",children:[(0,m.jsx)(a.A,{content:"Overlay the maximum chart anomaly rate on each menu section.",align:"bottom",activateOn:"hover",isBasic:!0,children:(0,m.jsx)(i.Box,{children:(0,m.jsx)(i.Toggle,{colored:!0,disabled:b,checked:e,labelRight:"Anomaly Rate %",onChange:C,toggleProps:{uncheckedColor:["neutral","grey130"],checkedColor:"primary"}})})}),e?(0,m.jsx)(v,{flavour:"borderless",icon:"refresh",iconColor:"text",onClick:w,tooltip:"Refresh weights"}):null]})})}},23226:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(67012),o=n(6304),i=n(19371);const a=()=>{const[e,t]=(0,o.A)(!1),n=(0,i.eg)();return(0,r.A)((()=>{if(n&&n.getRoot())return n.getRoot().updateAttribute("paused",!n.getRoot().getAttribute("autofetchOnWindowBlur")&&n.getRoot().getAttribute("blurred")||e),()=>n.getRoot().updateAttribute("paused",!n.getRoot().getAttribute("autofetchOnWindowBlur")&&n.getRoot().getAttribute("blurred"))}),[n,e]),[e,t]}},24200:(e,t,n)=>{n.d(t,{Ay:()=>g,yD:()=>u,f_:()=>h});n(98992),n(54520),n(81454);var r=n(96540),o=n(42790),i=n(77611);const a=function(e){let{after:t,before:n}=e,{offset:r,limit:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{offset:6e4,limit:Date.now()};const i=((e,t)=>{let{offset:n,limit:r}=t;const o=n/2;return e+o<=r?o:r<e?0:r-e})(n,{offset:r,limit:o});return[t-(r-i),n+i]};var s=n(3319),l=n(81691);const d=(e,t)=>e||t?a({after:parseInt(e),before:parseInt(t)},(e=>{const t=Date.now();return{limit:t,offset:t-e<6e4?3e4:15e3}})(t)):c,c=[null,null],u=()=>{const{after:e,before:t,highlight:n}=(0,o.rW)();if(!n.after||!n.before)return c;if(e<0){const t=Date.now();if(n.before<t+e)return c;if(n.after>t)return c}else{if(n.before<e)return c;if(n.after>t)return c}return[n.after,n.before]},h=(e,t,n)=>{const[a,c]=(0,r.useState)(),[h,g]=(0,r.useState)(!1),{sendLog:f}=(0,s.A)();let[m,y]=(()=>{const e=u();return(0,r.useMemo)((()=>d(...e)),[...e])})();const{after:b,before:p}=(0,o.rW)(),[v,x]=(0,i.er)({nodeIds:n,flavour:"rhs"},e,t);return[async()=>{const e=((e,t)=>{if(e<0){const n=Date.now();e=1e3*Math.floor(n/1e3+e),t=1e3*Math.floor(n/1e3)}return{after:e,before:t}})(b,p);g(!0);try{await v({flavour:"rhs",highlightAfter:m||e.after,highlightBefore:y||e.before,baselineAfter:m?e.after:null,baselineBefore:y?e.before:null,method:"anomaly-rate",aggregation:"avg",group:"average",nodeIds:n,options:["raw","null2zero"],groupBy:["context"]}),g(!1),f({action:l.o1.elementViewed,feature:"AnomalyRates-TOC",isSuccess:!0},!0)}catch(t){if(t.isCancel)return;c(t),g(!1),f({action:l.o1.elementViewed,feature:"AnomalyRates-TOC",isFailure:!0},!0)}},h,a,x]},g=(e,t,n)=>{const[a,l]=(()=>{const[e,t]=(0,r.useState)(0);return[e,(0,r.useCallback)((()=>t((e=>e+1))),[])]})(),[d,c]=(0,r.useState)(),[h,g]=u(),{after:f,before:m}=(0,o.rW)(),{contexts:y,metadata:b,getWeights:p,loading:v}=(0,i.Yy)({nodeIds:n,flavour:"anomaly"},e,t),{sendLog:x,isReady:A}=(0,s.A)();(0,r.useEffect)((()=>{if(h&&g&&g&&h)try{x({feature:"AnomalyAdvisor",isStart:!0}),p({highlightAfter:h,highlightBefore:g,baselineAfter:f,baselineBefore:m,method:"anomaly-rate",aggregation:"avg",group:"average",nodeIds:n,options:["null2zero","raw"],groupBy:["dimension","instance","context"]})}catch(e){if(x({feature:"AnomalyAdvisor",isFailure:!0}),e.isCancel)return;c(e)}}),[n.length,g,h,a,A]);return[(0,r.useMemo)((()=>y.filter((e=>(b[e]?.weight||0)>0)).sort(((e,t)=>{const n=b[e].weight||0,r=b[t].weight||0;return n!==r?n>r?-1:1:0})).map((e=>{const t=e.split(",");return t.length>1?`${t[2]}::${t[1]}::${t[0]}`:e}))),[y,b]),y,b,v,d,l]}},24582:(e,t,n)=>{n.d(t,{Zr:()=>h,b0:()=>C,YP:()=>w,Uo:()=>x,Bu:()=>R,yO:()=>j,bD:()=>B,OL:()=>p,aZ:()=>v,rx:()=>m,bo:()=>f,_0:()=>g,R7:()=>k,jI:()=>y,w1:()=>I,DQ:()=>b});n(98992),n(8872),n(37550),n(25509),n(65223),n(60321),n(41927),n(11632),n(64377),n(66771),n(12516),n(68931),n(52514),n(35694),n(52774),n(49536),n(21926),n(94483),n(16215);var r=n(96540),o=n(52035),i=n(34843),a=n(84929),s=n(30569),l=n(20538),d=n(19186),c=n(57377);const u={ids:(0,a.Iz)((()=>(0,o.eU)([]))),updatedAt:(0,a.Iz)((()=>(0,o.eU)(""))),loaded:(0,a.Iz)((()=>(0,o.eU)(!1))),error:(0,a.Iz)((()=>(0,o.eU)(null))),versions:(0,a.Iz)((()=>(0,o.eU)({}))),fetchedFor:(0,a.Iz)((()=>(0,o.eU)([])))},h=(0,a.Iz)((e=>{let{id:t,key:n}=e;return(0,o.eU)((e=>e(u[n](t))),((e,r,o)=>r(u[n](t),o)))}),c.Ay),g=e=>!!(0,i.md)(h({id:e,key:"loaded"})),f=e=>(0,i.md)(h({id:e,key:"fetchedFor"})),m=e=>(0,i.md)(h({id:e,key:"error"})),y=e=>(0,i.md)(h({id:e,key:"versions"})),b=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=(0,i.Xr)(h({id:e,key:"versions"}));return(0,r.useCallback)((e=>n((n=>(e="function"===typeof e?e(n):e,t?e:(0,c.Ay)(n,e,{omit:["contextsSoftHash"]})?n:n.contextsHardHash&&"invalidating"!==n.contextsHardHash?e:n)))),[])},p=e=>(0,i.md)(h({id:e,key:"ids"})),v=(e,t)=>(0,i.md)(h({id:e,key:t})),x=(0,a.Iz)((e=>{let{roomId:t,merge:n=!0}=e;return(0,o.eU)((e=>e(u.ids(t))),((e,r,o)=>{r(u.ids(t),(e=>{const t=n?[...new Set([...o(e),...e])]:o(e);return n&&(0,c.Ay)(t,e)?e:t}))}))}),c.Ay),A=(0,a.Iz)((()=>(0,o.eU)({}))),w=(0,a.Iz)((e=>{let{id:t,key:n}=e;return(0,o.eU)((e=>{const r=e(A(t))||l.nO;return n?r[n]:r}),((e,r,o)=>{"function"!==typeof o?Object.keys(o).length<1||r(A(t),(e=>({...e,[n]:o}))):r(A(t),(e=>({...e,[n]:o(e[n])})))}))}),((e,t)=>e.key===t.key&&e.id===t.id)),C=(0,a.Iz)((function(){let{id:e,merge:t=!0,nodeIds:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,o.eU)(null,((r,o,i)=>{let{values:a,merge:s}=i;o(h({id:e,key:"fetchedFor"}),n),o(A(e),(e=>{const n=Object.keys(a).reduce(((n,r)=>{const{id:o}=a[r];return n[o]={...l.nO,...(t||s)&&e[o],...a[r],loaded:!0},n}),t?{...e}:{});return t&&(0,c.Ay)(n,e,{omit:["lastEntry","firstEntry","family"]})?e:n}))}))}),c.Ay),k=(e,t)=>(0,i.md)(w({id:e,key:t})),I=e=>(0,s.yF)((0,r.useCallback)(((t,n,r)=>{n(A(e),r)}),[e])),j=(e,t)=>(0,s.yF)((0,r.useCallback)(((n,r,o)=>({...n(A(e))[o],...t?.[o]||{}})),[e,t])),R=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=(0,d.ID)(),n=(0,i.md)(A(t));return e.some((e=>n[e]?.visible&&!n[e]?.filteredOut&&!n[e]?.hidden))},B=()=>{const e=(0,d.ID)(),t=(0,i.md)(A(e));return(0,r.useCallback)((function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).some((e=>t[e]?.visible&&!t[e]?.filteredOut&&!t[e]?.hidden))}),[e,t])},O=(0,a.Iz)((()=>(0,o.eU)({}))),S=(0,a.Iz)((e=>{let{id:t,context:n}=e;return(0,o.eU)((e=>{const r=e(O(t));return n?r[n]:r}),((e,r,o)=>{"function"!==typeof o?Object.keys(o).length<1||r(O(t),(e=>({...e,[n]:o}))):r(O(t),(e=>({...e,[n]:o(e[n])})))}))}),c.Ay);(0,a.Iz)((e=>(0,o.eU)(null,((t,n,r)=>{n(O(e),(e=>({...e,...r})))})))),(0,a.Iz)((e=>{let{id:t,contexts:n=[]}=e;return(0,o.eU)((e=>{const r=e(S({id:t}));return n.reduce(((e,t)=>(r[t]&&(e[t]=r[t]),e)),{})}))}),c.Ay)},25291:(e,t,n)=>{n.d(t,{A:()=>d});var r=n(64867),o=n(42790),i=n(24582),a=n(97940),s=n(96540),l=n(258);const d=function(e,t){let{spaceId:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const[d,c]=(0,s.useState)(null),{after:u,before:h}=(0,o.rW)(),g=(0,s.useRef)();g.current={after:u<0?u:Math.floor(u/1e3),before:u<0?0:Math.ceil(h/1e3)};const f=(0,s.useRef)(!0),m=e=>{if(e&&e?.response){const{data:t}=e.response,{errorMsgKey:n}=t;c(n)}else p((e=>({...e,contextsHardHash:"invalid"}))),c(e)},y=(0,s.useMemo)((()=>(0,r.O)(d)?5e3:65e3),[d]),b=(0,s.useRef)(),p=(0,i.DQ)(e,!0),v=e=>{let{results:t,versions:n}=e;p((e=>({...e,contextsHardHash:"invalid",...n}))),c((!t||!Object.keys(t).length)&&"No data for this period")};return(0,a.A)((()=>({cache:!1,key:`spaces.${n}.rooms.${e}.charts`,polling:!0,autorun:!!n&&!!e,fetch:()=>(f.current=!1,(0,l.a9)(n,e,t,{...g.current})),association:{getIds:()=>(0,i.Uo)({roomId:e,merge:b.current===t}),getError:()=>(0,i.Zr)({id:e,key:"error"}),getLoaded:()=>(0,i.Zr)({id:e,key:"loaded"}),getUpdatedAt:()=>(0,i.Zr)({id:e,key:"updatedAt"})},getResource:t=>(0,i.YP)({id:e,key:t}),getResourcesInitializer:()=>{const n=(0,i.b0)({id:e,merge:b.current===t,nodeIds:t});return b.current=t,n},getResourceInitialState:e=>({fullyLoaded:!0,...e}),onFail:m,pollingOptions:{pollingInterval:y},onReceive:v,after:u,nodeIds:t,force:!0,throwAllErrors:!0})),[n,e,y,t,u,h]),d}},27250:(e,t,n)=>{n.d(t,{A:()=>d});var r=n(96540),o=n(83488),i=n.n(o),a=n(2404),s=n.n(a),l=n(66814);const d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i();const n=(0,r.useRef)();return(0,l.i7)(e,(e=>{const r=t(e);return s()(n.current,r)||(n.current=r),n.current}))}},28657:(e,t,n)=>{n.d(t,{A:()=>A});var r=n(96540),o=n(22332),i=n(10534),a=n(89380),s=n(25369),l=n(39360),d=n(95662),c=n(99891),u=n(49096),h=n(74487),g=n(45123),f=n(64131),m=(n(98992),n(8872),n(49163));const y=e=>{const t=e.getAttribute("contextScope"),n=e.getAttribute("isHead")?e.getAttribute("id"):t.join(","),o=(0,m._)({params:{type:["annotation"],entity:[n,"global"]}});(0,r.useEffect)((()=>{if(!e||!o?.length)return;const t=e.getAttribute("overlays"),n=o.reduce(((e,t)=>{const n={...t.value,settingId:t.id,type:"annotation"};return e[n.id]=n,e}),{});e.updateAttribute("overlays",{...t,...n})}),[o,e])};var b=n(74848);const p=(0,i.default)((e=>{let{width:t,height:n,...r}=e;return(0,b.jsx)(a.ChartWrapper,{width:t,height:n,children:(0,b.jsx)(f.Line,{hasHeader:!1,hasFilters:!1,hasFooter:!1,width:t,height:n,...r})})}),{tile:!0}),v={dygraph:f.default,easypiechart:c.Ay,gauge:l.Ay,number:u.Ay,groupBoxes:s.Ay,d3pie:d.Ay,bars:h.Ay,table:e=>(0,b.jsx)(g.Ay,{hasFilters:!1,...e})},x=e=>{const t=(0,o.useChart)(),n=(0,o.useAttributeValue)("sparkline"),i=(0,o.useAttributeValue)("chartLibrary");y(t);const a=(0,r.useMemo)((()=>t?n?p:v[i]:null),[t,i,n]);return a?(0,b.jsx)(a,{...e,chart:t}):null},A=(0,o.withChartProvider)((0,r.memo)(x))},31141:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(96540),o=n(42790);const i={},a=(e,t,n,a)=>{const[s,l]=(0,o.N9)("modal"),[d,c]=(0,o.N9)("modalTab"),[u,h]=(0,o.N9)("modalParams"),g=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;"string"===typeof t&&c(t),l(e),n&&h(n)};return(0,r.useEffect)((()=>{t&&g(n,a)}),[]),{isModalOpen:e===s,currentModalTab:d,handleChangeModalTab:c,handleOpenModal:g,handleCloseModal:()=>{c(""),l(""),h()},params:u||i}}},33962:(e,t,n)=>{n.d(t,{Js:()=>h,Ny:()=>d,Ud:()=>c,W2:()=>u});var r=n(96540),o=n(66814),i=n(27250),a=n(74848);const s=(0,o.q6)(""),l=(0,o.q6)(""),d=e=>{let{menuId:t="",children:n}=e;const[o,i]=(0,r.useState)(t);return(0,a.jsx)(s.Provider,{value:i,children:(0,a.jsx)(l.Provider,{value:o,children:n})})},c=()=>(0,i.A)(s),u=e=>(0,i.A)(l,e),h=e=>u((t=>e===t))},35184:(e,t,n)=>{n.d(t,{Ay:()=>s,I1:()=>a});var r=n(33185),o=n(86177),i=n(74848);const a=(0,r.default)(o.Box).withConfig({displayName:"blur__BlurredBox",componentId:"sc-12emg8l-0"})(["position:absolute;top:0;bottom:0;left:0;right:0;backdrop-filter:blur(",");z-index:30;"],(e=>{let{value:t}=e;return t||"7px"})),s=e=>{let{children:t,...n}=e;return(0,i.jsxs)(o.Box,{position:"relative",children:[t,(0,i.jsx)(a,{...n})]})}},38773:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(88934),o=n(79748),i=n(24609),a=n(74848);const s=e=>{let{children:t,...n}=e;const s=`/spaces/${(0,i.bq)()}/settings/nodes`;return(0,a.jsx)(o.A,{as:r.N_,to:s,...n,children:t})}},50239:(e,t,n)=>{n.d(t,{Cs:()=>s,Gr:()=>d,UH:()=>l});var r=n(96540),o=n(74848);const i=(0,r.createContext)(),a=(0,r.createContext)(),s=e=>{let{children:t}=e;const[n,s]=(0,r.useState)();return(0,o.jsx)(i.Provider,{value:n,children:(0,o.jsx)(a.Provider,{value:s,children:t})})},l=()=>(0,r.useContext)(i),d=()=>(0,r.useContext)(a)},61710:(e,t,n)=>{n.d(t,{Oq:()=>l,sd:()=>i,tr:()=>c,zA:()=>d});var r=n(78659),o=n.n(r);const i=e=>Math.round(10*e)/10,a=e=>{const{gutter:t,containerWidth:n,gridTracks:r}=e;return(n-t*(r-1))/r};function s(e,t,n){return Number.isFinite(e)?i(t*e+Math.max(0,e-1)*n):e}function l(e,t,n,r,o,l){const{gutter:d,rowHeight:c}=e,u=a(e),h={};return l?(h.width=s(l.width,u,d),h.height=s(l.height,c,d),h.top=i((c+d)*l.top),h.left=i((u+d)*l.left)):(h.width=s(r,u,d),h.height=s(o,c,d),h.top=i((c+d)*n),h.left=i((u+d)*t)),h}function d(e,t,n,r){const{gutter:s,gridTracks:l,rowHeight:d,maxRows:c}=e,u=a(e);let h=i((n-s)/(u+s)),g=i((t-s)/(d+s));return h=o()(h,0,l-r.width),g=o()(g,0,c-r.height),{left:h,top:g}}const c=(e,t,n,r)=>{const{gutter:s,maxRows:l,gridTracks:d,rowHeight:c}=e,u=a(e);let h=i((t+s)/(u+s)),g=i((n+s)/(c+s));return h=o()(o()(h,r.minWidth||3,d-r.left),0,d),g=o()(o()(g,r.minHeight||2,l-r.top),0,l),{width:h,height:g}}},64463:(e,t,n)=>{n.d(t,{A:()=>a});n(98992),n(3949);var r=n(96540),o=n(22332),i=n(42790);const a=()=>{const e=(0,o.useChart)(),[{after:t,before:n,forcePlay:a},s]=(0,i.N9)(),l=function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{autofetchOnWindowBlur:!1};return()=>{e.getNodes().forEach((e=>e.updateAttributes(r)));const o=t<0?t:-Math.floor((n-t)/1e3);s((e=>({...e,after:o,before:0,forcePlay:!!r.autofetchOnWindowBlur})))}},d=()=>{if(t>0)return;const e=Date.now();s((n=>({...n,after:1e3*Math.floor(e/1e3+t),before:1e3*Math.floor(e/1e3),forcePlay:!1})))},c=(0,r.useRef)();return c.current=d,{play:(0,r.useCallback)(l(),[n,t,a]),forcePlay:(0,r.useCallback)(l({autofetchOnWindowBlur:!0}),[n,t,a]),pause:(0,r.useCallback)(d,[t,n,a]),pauseRef:c}}},64867:(e,t,n)=>{n.d(t,{O:()=>o});const r={ErrNoChartExist:"ErrNoChartExist"},o=function(e){return!!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:r)[e]}},69457:(e,t,n)=>{n.d(t,{BK:()=>w,NF:()=>p,Tg:()=>x,Vt:()=>C,aA:()=>y,dd:()=>b,i8:()=>u,qR:()=>v,uy:()=>A,vN:()=>f});n(98992),n(81454);var r=n(96540),o=n(83488),i=n.n(o),a=n(66814),s=n(27250),l=n(74848);const d=r.createContext({}),c=(0,a.q6)({}),u=(0,a.q6)({}),h=(0,a.q6)([]),g=(0,a.q6)({}),f=e=>{let{container:t,menuItemAttributesById:n,getObject:o,allElements:i,stickyIds:a,children:s}=e;return(0,l.jsx)(d.Provider,{value:t,children:(0,l.jsx)(c.Provider,{value:(0,r.useCallback)((e=>({...o(e),...n[e]})),[n,o]),children:(0,l.jsx)(u.Provider,{value:n,children:(0,l.jsx)(h.Provider,{value:i,children:(0,l.jsx)(g.Provider,{value:a,children:s})})})})})},m={},y=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i();return(0,s.A)(u,(n=>t(n[e]||m)))},b=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i();return(0,s.A)(u,(n=>Array.isArray(e)?e.map(((e,r)=>t(n[e]||m,e,r))):[]))},p=()=>r.useContext(d),v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i();return(0,s.A)(h,e)},x=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i();return(0,s.A)(g,e)},A=function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:i())(C()(e))},w=e=>t=>{let{id:n,...r}=t;const o=y(n),{chartId:i,contextScope:a}=o,s=A(i||n||a?.[0]);return(0,l.jsx)(e,{id:n,chart:s,menuChartAttributes:o,...r})},C=()=>(0,s.A)(c)},74518:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(96540),o=n(86177),i=n(41395),a=n(45087),s=n(74848);const l=e=>{let{text:t,TextComponent:n=o.Text,ellipsisEnd:l,...d}=e;const[c,u]=(0,r.useState)(""),[h,g]=(0,r.useState)(),f=l?i.RR:i.P3;return(0,r.useEffect)((()=>{if(!h)return;const e=h.offsetWidth;let n=0;for(;h.scrollWidth>e;)h.textContent=f(h.textContent,n),n+=1;h.textContent!==t&&u(t)}),[t,h]),(0,s.jsx)(a.A,{content:c?t:"",align:"bottom",isBasic:!0,children:(0,s.jsx)(n,{truncate:!0,ref:g,...d,children:t})})}},74891:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(86177),o=n(45087),i=n(74848);const a={align:"top"},s=e=>function(){let{tooltip:t,tooltipProps:n=a,noWrapper:s,WrapperComponent:l=r.Box,...d}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t?(0,i.jsx)(o.A,{plain:!0,content:t,...n,children:s?(0,i.jsx)(e,{...d}):(0,i.jsx)(l,{"data-testid":"tooltip-box",children:(0,i.jsx)(e,{...d})})}):(0,i.jsx)(e,{...d})}},77611:(e,t,n)=>{n.d(t,{UG:()=>C,Ip:()=>w,er:()=>x,Yy:()=>k,G9:()=>A});n(98992),n(3949),n(8872);var r=n(96540),o=n(34843),i=n(30569),a=n(84929),s=n(42790),l=n(16015),d=n(57377);const c={byContext:{},loaded:!1,loading:!1,method:null,options:null,group:"average",totalDimensionsCount:0},u=(0,a.Iz)((()=>(0,a.tx)(c)),d.Ay),h={ci:"context",ni:"node",ii:"instance",di:"dimension"},g=(e,t)=>n=>({[h[e.name]]:t[e.dictionary][n]}),f={ni:g,ii:(e,t)=>(n,r,o)=>({[h[e.name]]:t[e.dictionary][n]?`${t[e.dictionary][n]}@${t.nodes[r[o.ni]]}`:null}),ci:g,di:g,row_type:e=>t=>({type:e.value[t]}),weight:()=>e=>({weight:e}),timeframe:e=>t=>({highlight:e.labels.reduce(((e,n,r)=>({...e,[n]:t[r]})),{})}),"baseline timeframe":e=>t=>({baseline:e.labels.reduce(((e,n,r)=>({...e,[n]:t[r]})),{})})},m={contexts:"ci",nodes:"ni",instances:"ii",dimensions:"di"},y={contexts:"id",nodes:"nodeId",instances:"id",dimensions:"id"},b=(e,t)=>null===e||e>t?t:e,p=(e,t)=>null===e||e<t?t:e,v=e=>{let{data:t,aggregation:n,options:r}=e,o={},i=0;if(t.v_schema){const e=t.v_schema?.items||[];o=t.result.reduce(((t,r)=>{let{id:o,v:i}=r;return t[o]=e.reduce(((e,t,r)=>{let{name:o,labels:a}=t;const s=a.indexOf(n);return e[o]=i[r][s],e}),{}),t}),{})}else{const e=(e=>{const t=Object.keys(e.dictionaries).reduce(((t,n)=>{t[n]||(t[n]={});const r=y[n];return e.dictionaries[n].forEach((e=>t[n][e[m[n]]]="nodeId"===r?e.nd||e.mg:e[r])),t}),{}),n={},r=e.schema.items.reduce(((e,r,o)=>{const i=(f[r.name]||f.default)(r,t);return e.push(i),n[r.name]=o,e}),[]);return e=>e.reduce(((t,o,i)=>({...t,...r[i](o,e,n)})),{})})(t);o=t.result.reduce(((t,n)=>{const{dimension:o,node:a,context:s,instance:l,type:d,weight:c,highlight:u,baseline:h}=e(n);if("node"===d)return t;const g=(f=t,m=s,function(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:b;n&&(n&&"undefined"===typeof f[m][t][n]&&(f[m][t][n]={}),"undefined"===typeof f[m][t][n][e]&&(f[m][t][n][e]=null),r&&(f[m][t][n][e]=i(f[m][t][n][e],o)))});var f,m;t[s]||(t[s]={dimensions:{},instances:{},nodes:{},weight:null});const y=!!r&&r.includes("anomaly-bit");g("weight","dimensions",o,"dimension"===d,c,y?p:b),g("weight","instances",l,"instance"===d,c,y?p:b),g("weight","nodes",a,"node"===d,c,y?p:b);const v=u?100*u.anomaly_count/u.count:0;g("arHighlight","dimensions",o,"dimension"===d,v,p),g("arHighlight","instances",l,"instance"===d,v,p),g("arHighlight","nodes",a,"node"===d,v,p);const x=h?100*(h.anomaly_count-u.anomaly_count)/(h.count-u.count)===0?1:h.count-u.count:0;g("arBaseline","dimensions",o,"dimension"===d,x,p),g("arBaseline","instances",l,"instance"===d,x,p),g("arBaseline","nodes",a,"node"===d,x,p);const A=x?v/x:0;return g("score","dimensions",o,"dimension"===d,A,p),g("score","instances",l,"instance"===d,A,p),g("score","nodes",a,"node"===d,A,p),"context"===d?t[s].weight=null===t[s].weight||t[s].weight>c?c:t[s].weight:"dimension"===d&&(i+=1),t}),{})}return{byContext:o,totalDimensionsCount:i}},x=(e,t,n)=>{const o=(0,r.useRef)();return[(0,i.yF)((0,r.useCallback)(((r,i,a)=>{let{flavour:s,highlightAfter:d,highlightBefore:h,baselineAfter:g,baselineBefore:f,method:m,options:y,group:b,context:p,nodeIds:x,aggregation:A,groupBy:w}=a;return i(u(e),{...c,loading:!0}),o.current&&o.current.cancel(),o.current=(0,l.e0)(t,n,{highlightAfter:d,highlightBefore:h,baselineAfter:g,baselineBefore:f,method:m,options:y,group:b,context:p,nodeIds:x,aggregation:A,groupBy:w}),o.current.then((t=>{let{data:n}=t;const{byContext:r,totalDimensionsCount:o}=v({flavour:s,data:n,aggregation:A,options:y});i(u(e),{loading:!1,loaded:!0,byContext:r,options:y,totalDimensionsCount:o,method:m,group:b,groupBy:w,error:null})})).catch((t=>{if(!t.isCancel)throw i(u(e),{...c,error:t?.response?.data||t}),t}))}),[e])),(0,i.yF)((0,r.useCallback)(((t,n)=>{o.current&&o.current.cancel(),n(u(e),a.Ut)}),[e]))]},A=e=>(0,o.md)(u(e)),w=e=>(0,i.AY)(u(e)),C=.01,k=(e,t,n)=>{const[o,i]=x(e,t,n),{loaded:a,loading:l,byContext:d,totalDimensionsCount:c,options:u,groupBy:h}=A(e),g=(()=>{const e=(0,s.rW)("threshold");return e?Number.parseFloat(e):C})(),[f,m,y]=(0,r.useMemo)((()=>{let e=0;const t=u?.includes("raw"),n=(h||[]).length?d:Object.keys(d).reduce(((n,r)=>{const o=Object.keys(d[r].dimensions).reduce(((e,n)=>(!t&&d[r].dimensions[n].weight>g||(e[n]=d[r].dimensions[n]),e)),{}),i=Object.keys(o).length;return e+=i,i?(n[r]={...d[r],dimensions:o},n):n}),{});return[n,Object.keys(n),e]}),[a,g]);return{threshold:g,metadata:f,contexts:m,dimensionsCount:y,totalDimensionsCount:c,loaded:a,loading:l,getWeights:o,resetWeights:i}}},80590:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(96540),o=n(3319),i=n(74848);const a=e=>t=>{let{callback:n,feature:a,isStart:s,isSuccess:l,isFailure:d,eventReason:c,payload:u={},...h}=t;const{sendLog:g,isReady:f}=(0,o.A)(),m=(0,r.useCallback)((e=>{const t=h[n],r={...a?{feature:a}:{},...void 0!==s?{isStart:s}:{},...void 0!==l?{isSuccess:l}:{},...void 0!==d?{isFailure:d}:{},...c?{eventReason:c}:{},...u,...h["data-ga"]?{dataGa:h["data-ga"]}:{},...h.dataGa?{dataGa:h.dataGa}:{},...h["data-track"]?{dataTrack:h["data-track"]}:{},...h.label?{label:h.label}:{}};"function"===typeof t&&t(e),g(r,!0)}),[n,g,f,u,h]),y=(0,r.useMemo)((()=>({...h,[n]:m})),[h,n,m]);return(0,i.jsx)(e,{...y})}},81214:(e,t,n)=>{n.d(t,{A:()=>r});const r=async e=>{if("string"!==typeof e)return console.error("Pass a string to copyToClipboard"),!1;const t=document.createElement("textarea"),n=document.activeElement;t.value=e,t.setAttribute("readonly",""),t.style.contain="strict",t.style.position="absolute",t.style.left="-9999px",t.style.fontSize="12pt";const r=document.getSelection(),o=r.rangeCount>0&&r.getRangeAt(0);document.body.append(t),t.select(),t.selectionStart=0,t.selectionEnd=e.length;let i=!1;try{navigator.clipboard?(await navigator.clipboard.writeText(t.value),i=!0):i=document.execCommand("copy")}catch{}return t.remove(),o&&(r.removeAllRanges(),r.addRange(o)),n&&n.focus(),i}},88255:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(86177),o=n(35184),i=n(74848);const a=e=>{let{children:t,containerProps:n,sidebar:a=null,blurred:s,blurProps:l,BlurredContent:d,widthAuto:c=!1,ref:u,...h}=e;return(0,i.jsxs)(r.Flex,{id:"main",height:"100%",width:c?"auto":"100%",position:"relative",overflow:"hidden",flex:"1",...n,children:[(0,i.jsx)(r.Flex,{column:!0,overflow:"hidden",width:c?"auto":"100%",...h,ref:u,children:t}),a,s&&(0,i.jsx)(o.I1,{...l,children:d?(0,i.jsx)(d,{}):null})]})}},88325:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(96540),o=n(18739),i=n(24609);const a=e=>{const{loaded:t,value:n,hasError:a}=(0,o.JN)(),s=(0,i.bq)(),l=t&&n?n.billingEmail?"update":"checkout":"",d=`/spaces/${s}/settings/billing/all-plans`,c=(0,r.useCallback)((e=>t&&n?`${d}#billingModalType=${l}&billingModalSlug=${e}`:null),[e,s,l]),u=e?c(e):d;return{loaded:t,getUrl:c,url:u,hasError:a}}},94404:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(80590),o=n(81691),i=n(74848);const a=e=>t=>{let{payload:n={},...a}=t;const s=(0,r.A)(e);return(0,i.jsx)(s,{...a,callback:"onClick",payload:{...n,action:o.o1.buttonClicked}})}},95565:(e,t,n)=>{n.d(t,{A:()=>d});var r=n(88934),o=n(79748),i=n(88325),a=n(80590),s=n(74848);const l=(0,a.A)(o.A),d=e=>{let{children:t,...n}=e;const{url:o}=(0,i.A)("business");return(0,s.jsx)(l,{as:r.N_,to:o,disabled:!o,feature:"UpgradeToBusiness",callback:"onClick",...n,children:t})}},98591:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(31141);const o=(e,t)=>{const{isModalOpen:n,handleOpenModal:o,handleCloseModal:i,params:a}=(0,r.A)(e,t);return[n,n?i:o,o,i,a]}}}]);