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/usr/local/local/share/netdata/web/v3/5269.c696db0bd9f590dff653.chunk.js
!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};t.SENTRY_RELEASE={id:"9f9973293dea885c0484e86d9a5d6e44ba9e045b"};var e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="b3596331-038b-45f0-9cb8-05b8797ff575",t._sentryDebugIdIdentifier="sentry-dbid-b3596331-038b-45f0-9cb8-05b8797ff575")}catch(t){}}(),(globalThis.webpackChunkcloud_frontend=globalThis.webpackChunkcloud_frontend||[]).push([[5269],{25269(t,e,r){r.r(e),r.d(e,{default:()=>S});r(98992),r(54520),r(3949),r(81454),r(71517),r(11379),r(93777),r(14190),r(12359),r(86097),r(17273),r(27415),r(19929),r(37583),r(55122),r(20230),r(57268),r(79733),r(25509),r(65223),r(60321),r(41927),r(11632),r(64377),r(66771),r(12516),r(68931),r(52514),r(35694),r(52774),r(49536),r(21926),r(94483),r(16215);var n=r(96540),a=r(40961),o=r(38429),s=r(93331),c=r(22007),l=r(44862),i=r(882),u=r(43905),d=r(51796),f=r(17218),g=r(85660),h=r(57591),p=r(71103),m=r(74848);const y=(0,i.default)(o.Flex).attrs({position:"relative",overflow:"hidden",width:"100%",height:{min:0}}).withConfig({displayName:"countryMapTab__MapContainer",componentId:"sc-13rmpkf-0"})(["height:",";"],t=>{let{containerHeight:e}=t;return e||"100%"}),b={AF:"004",AL:"008",DZ:"012",AS:"016",AD:"020",AO:"024",AG:"028",AR:"032",AM:"051",AU:"036",AT:"040",AZ:"031",BS:"044",BH:"048",BD:"050",BB:"052",BY:"112",BE:"056",BZ:"084",BJ:"204",BT:"064",BO:"068",BA:"070",BW:"072",BR:"076",BN:"096",BG:"100",BF:"854",BI:"108",KH:"116",CM:"120",CA:"124",CV:"132",CF:"140",TD:"148",CL:"152",CN:"156",CO:"170",KM:"174",CG:"178",CD:"180",CR:"188",CI:"384",HR:"191",CU:"192",CY:"196",CZ:"203",DK:"208",DJ:"262",DM:"212",DO:"214",EC:"218",EG:"818",SV:"222",GQ:"226",ER:"232",EE:"233",ET:"231",FJ:"242",FI:"246",FR:"250",GA:"266",GM:"270",GE:"268",DE:"276",GH:"288",GR:"300",GD:"308",GT:"320",GN:"324",GW:"624",GY:"328",HT:"332",HN:"340",HU:"348",IS:"352",IN:"356",ID:"360",IR:"364",IQ:"368",IE:"372",IL:"376",IT:"380",JM:"388",JP:"392",JO:"400",KZ:"398",KE:"404",KI:"296",KP:"408",KR:"410",KW:"414",KG:"417",LA:"418",LV:"428",LB:"422",LS:"426",LR:"430",LY:"434",LI:"438",LT:"440",LU:"442",MK:"807",MG:"450",MW:"454",MY:"458",MV:"462",ML:"466",MT:"470",MH:"584",MR:"478",MU:"480",MX:"484",FM:"583",MD:"498",MC:"492",MN:"496",ME:"499",MA:"504",MZ:"508",MM:"104",NA:"516",NR:"520",NP:"524",NL:"528",NZ:"554",NI:"558",NE:"562",NG:"566",NO:"578",OM:"512",PK:"586",PW:"585",PA:"591",PG:"598",PY:"600",PE:"604",PH:"608",PL:"616",PT:"620",QA:"634",RO:"642",RU:"643",RW:"646",KN:"659",LC:"662",VC:"670",WS:"882",SM:"674",ST:"678",SA:"682",SN:"686",RS:"688",SC:"690",SL:"694",SG:"702",SK:"703",SI:"705",SB:"090",SO:"706",ZA:"710",SS:"728",ES:"724",LK:"144",SD:"729",SR:"740",SZ:"748",SE:"752",CH:"756",SY:"760",TW:"158",TJ:"762",TZ:"834",TH:"764",TL:"626",TG:"768",TO:"776",TT:"780",TN:"788",TR:"792",TM:"795",TV:"798",UG:"800",UA:"804",AE:"784",GB:"826",US:"840",UY:"858",UZ:"860",VU:"548",VE:"862",VN:"704",YE:"887",ZM:"894",ZW:"716",XK:"0",PS:"275",HK:"344",PR:"630"},x={right:"left",bottom:"top"},k={right:"left",top:"bottom"},M={left:"right",bottom:"top"},L={left:"right",top:"bottom"},S=(0,n.memo)(t=>{let{flows:e,height:r="100%"}=t;const S=(0,i.useTheme)(),[A,{width:w,height:E}]=(0,g.A)(),T=(0,n.useRef)(),B=(0,n.useRef)(),[R,C]=(0,n.useState)(),N=(0,n.useRef)(),j=(0,n.useRef)(),v=(0,n.useRef)(null),P=(0,n.useRef)(L),I=(0,n.useRef)(null),G=(0,n.useRef)(null),[D,F]=(0,n.useState)(null),[U,K]=(0,n.useState)(L);N.current=R,j.current=(0,c.default)(R,B,U,"width");const H=(0,l.default)(),O=(0,n.useCallback)(t=>{let{x:e,y:r}=t;if(v.current={x:e,y:r},!N.current)return;if(N.current.style.left=`${e}px`,N.current.style.top=`${r}px`,!B.current||!T.current)return void j.current?.();const n=T.current.getBoundingClientRect(),{width:a,height:o}=B.current.getBoundingClientRect(),s=n.left+e,c=n.top+r,l=(i=s+a>n.right,u=c+o>n.bottom,i&&u?x:i?k:u?M:L);var i,u;if(l!==P.current)return P.current=l,K(l),void requestAnimationFrame(()=>j.current?.());j.current?.()},[]),Z="number"===typeof r?r:0,Y=Math.max(E||Z||0,Z||400),V=(0,n.useMemo)(()=>(0,h.aT)(e),[e]);(0,n.useLayoutEffect)(()=>{D&&v.current&&O(v.current)},[D]),(0,n.useEffect)(()=>{if(!w||!T.current||!V.countries.length)return;const t=u.select(T.current);t.selectAll("*").remove();const e=(0,d.A)(f,f.objects.countries),r=u.geoNaturalEarth1().fitSize([w,Y],e),n=u.geoPath().projection(r),a=t.append("g");let o=G.current?.k||1;const s=[],c=[],l=u.zoom().scaleExtent([1,12]);let i=!1;l.on("zoom",e=>{if(i)return;const r=e.transform;if(r.k<=1&&(0!==r.x||0!==r.y||r.k<1))return i=!0,t.call(l.transform,u.zoomIdentity),void(i=!1);G.current=r.k>1?r:null,a.attr("transform",r),o=r.k,s.forEach(t=>t.attr("r",3.8/o)),c.forEach(t=>t.attr("r",1.8/o))}),t.call(l),t.on("dblclick.zoom",null),G.current&&t.call(l.transform,G.current);const g=V.maxCountryBytes||1,h=u.scaleSequentialLog(t=>u.interpolateRgb("#2a3838","#3a9aaa")(t)).domain([1,g]),p=new Map;Object.entries(b).forEach(t=>{let[e,r]=t;p.set(r,e),p.set(String(parseInt(r,10)),e)});const m=t=>{if(!T.current)return;const[e,r]=u.pointer(t,T.current);O({x:e,y:r})},y=(t,e)=>{if(!T.current)return;const[r,n]=u.pointer(t,T.current);O({x:r,y:n}),F(e)},x=()=>{F(null)},k=new Map,M=new Map;e.features.forEach(t=>{const e=p.get(t.id)||p.get(String(t.id));if(!e)return;const r=n.centroid(t);Number.isFinite(r?.[0])&&Number.isFinite(r?.[1])&&(k.set(e,t.properties?.name||e),M.set(e,{x:r[0],y:r[1]}))});const L=u.scaleLinear().domain([0,V.maxLinkBytes||1]).range([.002,.012]),A=u.scaleLinear().domain([0,V.maxLinkBytes||1]).range([2,8]).clamp(!0),E=t=>{let{sourcePoint:e,targetPoint:r}=t;const n=r.x-e.x,a=r.y-e.y,o=Math.sqrt(n*n+a*a);if(!o)return null;const s=(e.x+r.x)/2,c=(e.y+r.y)/2,l=-a/o,i=n/o,u=Math.min(80,Math.max(18,.18*o)),d=s+l*u,f=c+i*u;return`M${e.x},${e.y} Q${d},${f} ${r.x},${r.y}`},B=V.links.map(t=>{const e=M.get(t.source),r=M.get(t.target);return e&&r?{...t,sourcePoint:e,targetPoint:r,sourceName:k.get(t.source)||t.source,targetName:k.get(t.target)||t.target}:null}).filter(Boolean);a.append("g").selectAll("path").data(e.features).join("path").attr("d",n).attr("fill",t=>{const e=p.get(t.id)||p.get(String(t.id)),r=e?V.countryByCode.get(e):null;return r?.totalBytes?h(r.totalBytes):"#1e2c2c"}).attr("stroke",S.colors.borderSecondary).attr("stroke-width",.5).on("mouseover",(t,e)=>{const r=p.get(e.id)||p.get(String(e.id)),n=r?V.countryByCode.get(r):null,a=e.properties?.name||r||"Unknown";y(t,{type:"country",code:r||"",name:a,country:n})}).on("mousemove",m).on("mouseout",x);const R=a.append("g");R.append("g").attr("fill","none").selectAll("path").data(B).join("path").attr("d",E).attr("stroke",S.colors.primary).attr("stroke-opacity",.35).attr("stroke-width",1.8).attr("stroke-linecap","round").attr("vector-effect","non-scaling-stroke"),R.append("g").attr("fill","none").selectAll("path").data(B).join("path").attr("d",E).attr("stroke","transparent").attr("stroke-width",14).attr("vector-effect","non-scaling-stroke").attr("pointer-events","stroke").on("mouseenter",(t,e)=>{y(t,{type:"arc",sourceCode:e.source,targetCode:e.target,sourceName:e.sourceName,targetName:e.targetName,bytes:e.bytes,packets:e.packets})}).on("mousemove",m).on("mouseleave",x);const C=new Set;B.forEach(t=>{C.add(t.source),C.add(t.target)});const N=R.append("g");C.forEach(t=>{const e=M.get(t);e&&(s.push(N.append("circle").attr("cx",e.x).attr("cy",e.y).attr("r",3.8/o).attr("fill","#00ab44").attr("opacity",.6)),c.push(N.append("circle").attr("cx",e.x).attr("cy",e.y).attr("r",1.8/o).attr("fill","#43ea7f").attr("opacity",.9)))});const j=R.append("g"),v=[];if(B.forEach(t=>{const e=E(t);if(!e)return;const r=document.createElementNS("http://www.w3.org/2000/svg","path");r.setAttribute("d",e);const n=r.getTotalLength();if(!n)return;const a=Math.round(A(t.bytes)),o=L(t.bytes),s=Math.min(.12*n,30);for(let c=0;c<a;c++){const t=2+1.2*Math.random(),e=j.append("circle").attr("r",t).attr("fill","#5cffa0").attr("opacity",0),l=j.append("line").attr("stroke","#43ea7f").attr("stroke-width",.8*t).attr("stroke-linecap","round").attr("vector-effect","non-scaling-stroke").attr("opacity",0);v.push({head:e,tail:l,path:r,totalLength:n,offset:c/a,speed:o,tailLength:s,r:t})}}),v.length){const t=()=>{const e=performance.now();v.forEach(t=>{const r=(e*t.speed+t.offset*t.totalLength)%t.totalLength,n=r/t.totalLength,a=n<.08?n/.08:n>.92?(1-n)/.08:1,s=t.path.getPointAtLength(r);t.head.attr("cx",s.x).attr("cy",s.y).attr("r",t.r/o).attr("opacity",.95*a);const c=Math.max(0,r-t.tailLength),l=t.path.getPointAtLength(c);t.tail.attr("x1",s.x).attr("y1",s.y).attr("x2",l.x).attr("y2",l.y).attr("opacity",.45*a)}),I.current=requestAnimationFrame(t)};I.current=requestAnimationFrame(t)}return()=>{I.current&&cancelAnimationFrame(I.current)}},[V,w,Y,S]);const W=(()=>{if(!D)return null;if("arc"===D.type)return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(o.Text,{strong:!0,children:[D.sourceName," \u2192 ",D.targetName]}),(0,m.jsxs)(p.PA,{children:[D.sourceCode," \u2192 ",D.targetCode]}),(0,m.jsxs)(o.Flex,{column:!0,width:"100%",children:[(0,m.jsx)(p.tL,{label:"Bytes",value:(0,p.RU)(D.bytes)}),(0,m.jsx)(p.tL,{label:"Packets",value:(0,p.jw)(D.packets)})]})]});const t=D.country;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(o.Text,{strong:!0,children:D.name}),(0,m.jsx)(p.PA,{children:D.code||"Unknown country"}),(0,m.jsxs)(o.Flex,{column:!0,width:"100%",children:[(0,m.jsx)(p.tL,{label:"Inbound bytes",value:(0,p.RU)(t?.inboundBytes||0)}),(0,m.jsx)(p.tL,{label:"Outbound bytes",value:(0,p.RU)(t?.outboundBytes||0)}),(0,m.jsx)(p.tL,{label:"Total bytes",value:(0,p.RU)(t?.totalBytes||0)}),(0,m.jsx)(p.tL,{label:"Inbound packets",value:(0,p.jw)(t?.inboundPackets||0)}),(0,m.jsx)(p.tL,{label:"Outbound packets",value:(0,p.jw)(t?.outboundPackets||0)}),(0,m.jsx)(p.tL,{label:"Total packets",value:(0,p.jw)(t?.totalPackets||0)})]})]})})();return e?.length&&V.countries.length?(0,m.jsxs)(y,{ref:A,containerHeight:r,children:[w>0&&(0,m.jsx)("svg",{ref:T,width:w,height:Y}),(0,m.jsx)(o.Flex,{ref:t=>C(t),position:"absolute"}),D&&a.createPortal((0,m.jsx)(s.default,{ref:B,column:!0,margin:[U.top?2:-2,U.right?-2:2],background:"mainBackground",padding:[1],round:.5,width:{max:"360px"},overflow:{vertical:"auto"},sx:{pointerEvents:"none"},zIndex:101,children:W}),H)]}):(0,m.jsx)(y,{ref:A,containerHeight:r,justifyContent:"center",alignItems:"center",children:(0,m.jsx)(o.TextSmall,{color:"textDescription",children:"No country data available."})})})}}]);