/*! For license information please see main.485cc284.chunk.js.LICENSE */ (this["webpackJsonp@netdata/dashboard"]=this["webpackJsonp@netdata/dashboard"]||[]).push([[0],{100:function(e,t,a){"use strict";a.d(t,"b",(function(){return o})),a.d(t,"a",(function(){return c}));var n,r,o=function(e){return e>-10&&e<10?"0".concat(e.toString()):e.toString()},i={"packets/s":{pps:1,Kpps:1e3,Mpps:1e6},pps:{pps:1,Kpps:1e3,Mpps:1e6},"kilobits/s":{"bits/s":.001,"kilobits/s":1,"megabits/s":1e3,"gigabits/s":1e6,"terabits/s":1e9},"bytes/s":{"bytes/s":1,"kilobytes/s":1024,"megabytes/s":1048576,"gigabytes/s":1073741824,"terabytes/s":1099511627776},"kilobytes/s":{"bytes/s":1/1024,"kilobytes/s":1,"megabytes/s":1024,"gigabytes/s":1048576,"terabytes/s":1073741824},"B/s":{"B/s":1,"KiB/s":1024,"MiB/s":1048576,"GiB/s":1073741824,"TiB/s":1099511627776},"KB/s":{"B/s":1/1024,"KB/s":1,"MB/s":1024,"GB/s":1048576,"TB/s":1073741824},"KiB/s":{"B/s":1/1024,"KiB/s":1,"MiB/s":1024,"GiB/s":1048576,"TiB/s":1073741824},bytes:{bytes:1,kilobytes:1024,megabytes:1048576,gigabytes:1073741824,terabytes:1099511627776},Hz:{Hz:1,kHz:Math.pow(10,3),MHz:Math.pow(10,6),GHz:Math.pow(10,9),THz:Math.pow(10,12),PHz:Math.pow(10,15),EHz:Math.pow(10,18),ZHz:Math.pow(10,21)},B:{B:1,KiB:1024,MiB:1048576,GiB:1073741824,TiB:1099511627776,PiB:0x4000000000000},KB:{B:1/1024,KB:1,MB:1024,GB:1048576,TB:1073741824},KiB:{B:1/1024,KiB:1,MiB:1024,GiB:1048576,TiB:1073741824},MB:{B:1/1048576,KB:1/1024,MB:1,GB:1024,TB:1048576,PB:1073741824},MiB:{B:1/1048576,KiB:1/1024,MiB:1,GiB:1024,TiB:1048576,PiB:1073741824},GB:{B:1/1073741824,KB:1/1048576,MB:1/1024,GB:1,TB:1024,PB:1048576,EB:1073741824},GiB:{B:1/1073741824,KiB:1/1048576,MiB:1/1024,GiB:1,TiB:1024,PiB:1048576,EiB:1073741824}},s={Celsius:{Fahrenheit:{check:function(){return"fahrenheit"===n},convert:function(e){return 9*e/5+32}}},celsius:{fahrenheit:{check:function(){return"fahrenheit"===n},convert:function(e){return 9*e/5+32}}},seconds:{time:{check:function(){return r},convert:function(e){return c.seconds2time(e)}}},milliseconds:{milliseconds:{check:function(e){return r&&e<1e3},convert:function(e){var t=Math.round(10*e),a=Math.floor(t/10);return t-=10*a,"".concat(a.toString(),".").concat(t.toString())}},seconds:{check:function(e){return r&&e>=1e3&&e<6e4},convert:function(e){var t=Math.round(e),a=Math.floor(t/1e3);return t-=1e3*a,t=Math.round(t/10),"".concat(a.toString(),".").concat(o(t))}},"M:SS.ms":{check:function(e){return r&&e>=6e4},convert:function(e){var t=Math.round(e),a=Math.floor(t/6e4);t-=6e4*a;var n=Math.floor(t/1e3);return t-=1e3*n,t=Math.round(t/10),"".concat(a.toString(),":").concat(o(n),".").concat(o(t))}}}},l=function(e){return e},c={keys:{},latest:{},globalReset:function(){this.keys={},this.latest={}},seconds2time:function(e){var t=Math.abs(e),a=Math.floor(t/86400);t-=86400*a;var n=Math.floor(t/3600);t-=3600*n;var r=Math.floor(t/60);t-=60*r,t=Math.round(t);return"".concat((a>0?"".concat(a.toString(),"d:"):"").toString()+o(n),":").concat(o(r),":").concat(o(t)).concat("")},get:function(e,t,a,o,c,u,d,h,p){if("undefined"===typeof o&&(o="undefined"),n=h,r=p,"undefined"===typeof i[o]&&"undefined"===typeof s[o])return function(e){return e};if(void 0===c||null===c||"original"===c||c===o)return d(o),l;var f,g=null,m=0;if("undefined"!==typeof i[o]){if("auto"===c){(t=Math.abs(t))>(a=Math.abs(a))&&(a=t);var b=i[o];if(Object.keys(b).forEach((function(e){var t=b[e];t<=a&&t>m&&(g=e,m=t)})),null===g||m<=0)return d(o),l;if("string"===typeof u){var v="".concat(u,"-").concat(o),_=this.keys[v];"undefined"===typeof _&&(this.keys[v]={},_=this.keys[v]),_[e]={units:g,divider:m};var y=_[e];Object.keys(_).forEach((function(e){_[e].divider>y.divider&&(y=_[e])}));var O={units:y.units,divider:y.divider};return this.latest[v]=O,m=O.divider,d(g=O.units),function(e){return m!==O.divider&&(m=O.divider,d(g=O.units)),e/m}}return d(g),function(e){return e/m}}return"undefined"!==typeof i[o][c]?(m=i[o][c],d(c),function(e){return e/m}):(console.log("Units conversion from ".concat(o.toString()," to ").concat(c.toString(),"\n is not supported.")),d(o),l)}return"undefined"!==typeof s[o]?"auto"===c?(Object.keys(s[o]).forEach((function(e){f||s[o][e].check(a)&&(d(e),f=s[o][e].convert)})),f||(d(o),l)):"undefined"!==typeof s[o][c]?(d(c),s[o][c].convert):(console.log("Units conversion from ".concat(o.toString()," to ").concat(c.toString(),"\n is not supported.")),d(o),l):(console.log("Unmatched unit conversion method for units ".concat(o.toString())),d(o),l)}}},104:function(e,t,a){"use strict";a.d(t,"b",(function(){return u})),a.d(t,"a",(function(){return d})),a.d(t,"c",(function(){return h}));var n=a(5),r=a(0),o=a.n(r),i=a(110),s=a(18),l=a(55),c=a(8),u="chart_heights.",d="chart_height.",h=function(e){var t=e.chartContainerElement,a=e.chartUuid,u=e.heightId,h=e.isLegendOnBottom,p=Object(r.useState)((function(){return t.clientHeight})),f=Object(n.a)(p,2),g=f[0],m=f[1],b=Object(c.a)();Object(r.useEffect)((function(){g>=70&&b(Object(s.i)({id:a,resizeHeight:g}))}),[g,a,u,b]);var v=Object(r.useCallback)((function(e){e.preventDefault();var a=t.clientHeight,n="touchstart"===e.type?e.touches[0].clientY:e.clientY,r=function(e){var r=a+e-n;if(t.style.height="".concat(r.toString(),"px"),m(r),u){var o=h?r-l.a:r;localStorage.setItem("".concat(d).concat(u),"".concat(o))}},o=function(e){return r(e.clientY)},i=function(e){return r(e.touches[0].clientY)};"touchstart"===e.type?(document.addEventListener("touchmove",i),document.addEventListener("touchend",(function e(){document.removeEventListener("touchmove",i),document.removeEventListener("touchend",e)}))):(document.addEventListener("mousemove",o),document.addEventListener("mouseup",(function e(){document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",e)})))}),[t.clientHeight,t.style.height,u,h]);return o.a.createElement(i.a,{className:"netdata-legend-resize-handler",onDoubleClick:function(e){e.preventDefault(),e.stopPropagation()},onMouseDown:v,onTouchStart:v,iconType:"resize",popoverTitle:"Chart Resize",popoverContent:"Drag this point with your mouse or your finger (on touch devices), to resize the chart vertically. You can also double click it or double tap it to reset between 2 states: the default and the one that fits all the values.
Help can be disabled from the settings."})}},110:function(e,t,a){"use strict";var n=a(0),r=a.n(n),o=a(34),i=a.n(o),s=a(8),l=a(9),c=a(161),u=a(37),d=(a(316),n.forwardRef((function(e,t){var a=e.children,r=e.className,o=Object(u.a)(e,["children","className"]);return n.createElement("button",Object.assign({},o,{type:"button",className:i()("netdata-reset-button",r),ref:t}),a)})));a.d(t,"a",(function(){return h}));var h=function(e){var t=e.className,a=e.iconType,o=e.onClick,u=e.onDoubleClick,h=e.onMouseDown,p=e.onTouchStart,f=e.popoverContent,g=e.popoverTitle,m=Object(n.useRef)(null),b=Object(s.b)(l.B);return Object(n.useEffect)((function(){m.current&&b&&window.$(m.current).popover({container:"body",animation:!1,html:!0,trigger:"hover",placement:"bottom",delay:{show:window.NETDATA.options.current.show_help_delay_show_ms,hide:window.NETDATA.options.current.show_help_delay_hide_ms},title:g,content:f})}),[]),r.a.createElement(d,{className:i()(t),onClick:o,onDoubleClick:u,onMouseDown:h,onTouchStart:p,ref:m},r.a.createElement(c.a,{iconType:a}))}},12:function(e,t,a){"use strict";a.d(t,"h",(function(){return i})),a.d(t,"p",(function(){return s})),a.d(t,"o",(function(){return l})),a.d(t,"u",(function(){return c})),a.d(t,"s",(function(){return u})),a.d(t,"j",(function(){return d})),a.d(t,"q",(function(){return h})),a.d(t,"i",(function(){return p})),a.d(t,"r",(function(){return f})),a.d(t,"b",(function(){return g})),a.d(t,"d",(function(){return m})),a.d(t,"D",(function(){return b})),a.d(t,"f",(function(){return v})),a.d(t,"C",(function(){return _})),a.d(t,"a",(function(){return y})),a.d(t,"A",(function(){return O})),a.d(t,"e",(function(){return x})),a.d(t,"B",(function(){return w})),a.d(t,"v",(function(){return E})),a.d(t,"l",(function(){return S})),a.d(t,"g",(function(){return C})),a.d(t,"c",(function(){return A})),a.d(t,"w",(function(){return k})),a.d(t,"x",(function(){return j})),a.d(t,"n",(function(){return T})),a.d(t,"m",(function(){return D})),a.d(t,"t",(function(){return P})),a.d(t,"k",(function(){return M})),a.d(t,"y",(function(){return L})),a.d(t,"z",(function(){return I}));var n=a(22),r=a(89),o=a(26),i=Object(n.createAction)("".concat(o.e,"/globalRequestCommonColors")),s=Object(n.createAction)("".concat(o.e,"/setCommonMin")),l=Object(n.createAction)("".concat(o.e,"/setCommonMax")),c=Object(n.createAction)("".concat(o.e,"/setGlobalSelection")),u=Object(n.createAction)("".concat(o.e,"/setGlobalPanAndZoom")),d=Object(n.createAction)("".concat(o.e,"/resetGlobalPanAndZoomAction")),h=Object(n.createAction)("".concat(o.e,"/setDefaultAfterAction")),p=Object(n.createAction)("".concat(o.e,"/resetDefaultAfterAction")),f=Object(n.createAction)("".concat(o.e,"/setGlobalChartUnderlay")),g=Object(n.createAction)("".concat(o.e,"/centerAroundHighlightAction")),m=Object(n.createAction)("".concat(o.e,"/clearHighlightAction")),b=Object(n.createAction)("".concat(o.e,"/windowFocusChangeAction")),v=Object(r.a)("".concat(o.e,"/fetchHelloAction")),_=Object(n.createAction)("".concat(o.e,"/updatePersonUrlsAction")),y=Object(n.createAction)("".concat(o.e,"/accessRegistrySuccessAction")),O=Object(n.createAction)("".concat(o.e,"/startAlarmsAction")),x=Object(r.a)("".concat(o.e,"/fetchAllAlarmsAction")),w=Object(n.createAction)("".concat(o.e,"/updateActiveAlarmsAction")),E=Object(n.createAction)("".concat(o.e,"/setOptionAction")),S=Object(n.createAction)("".concat(o.e,"/resetOptions")),C=Object(n.createAction)("".concat(o.e,"/loadSnapshotAction")),A=Object(n.createAction)("".concat(o.e,"/chartsMetadataRequestSuccess")),k=Object(n.createAction)("".concat(o.e,"/setSpacePanelStatusAction")),j=Object(n.createAction)("".concat(o.e,"/setSpacePanelStatusAction")),T=Object(n.createAction)("".concat(o.e,"/setAlarmAction")),D=Object(n.createAction)("".concat(o.e,"/resetRegistry")),P=Object(n.createAction)("".concat(o.e,"/setGlobalPauseAction")),M=Object(n.createAction)("".concat(o.e,"/resetGlobalPauseAction")),L=Object(n.createAction)("".concat(o.e,"/setUTCOffset")),I=Object(n.createAction)("".concat(o.e,"/setUserNodeAccess"))},124:function(e,t,a){"use strict";a.d(t,"b",(function(){return l}));var n=a(0),r=a(27),o=a(73),i=a(12),s=a(182),l=function(){return Object(n.useCallback)((function(){Object(o.a)(s.a,{type:"request-refresh-access",payload:!0})}),[])};t.a=function(){var e=Object(r.d)();Object(o.b)("user-node-access",(function(t){e(Object(i.z)({message:t}))}))}},132:function(e,t,a){"use strict";var n=a(37),r=a(0),o=a.n(r),i=a(4),s=a(3),l=Object(i.d)("a").withConfig({displayName:"anchor__BaseAnchor",componentId:"sc-1eq5dgj-0"})(["&&{color:",";:hover{color:",";}:visited{color:",";}}"],Object(s.F)("primary"),Object(s.F)("primary"),Object(s.F)("accent"));t.a=function(e){var t=e.Component,a=void 0===t?s.z:t,r=Object(n.a)(e,["Component"]);return o.a.createElement(a,Object.assign({as:l},r))}},140:function(e,t,a){"use strict";var n=a(28);a.d(t,"a",(function(){return n.c}))},142:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));var n=function(e){return e.replace(/ /g,"_").replace(/:/g,"_").replace(/\(/g,"_").replace(/\)/g,"_").replace(/\./g,"_").replace(/\//g,"_")}},155:function(e,t,a){"use strict";a.d(t,"b",(function(){return b})),a.d(t,"a",(function(){return v}));var n=a(7),r=a(14),o=a(35),i=a(219),s=a(496),l=a(218),c=a(22),u=a(28),d=a(74),h=a(18),p=a(12),f=a(97),g=a(26),m={commonColorsKeys:{},commonMin:{},commonMax:{},currentSelectionMasterId:null,globalPanAndZoom:null,defaultAfter:d.b?Object(u.d)():-900,globalChartUnderlay:null,hoveredX:null,hasWindowFocus:document.hasFocus(),globalPause:!1,spacePanelIsActive:!1,spacePanelTransitionEndIsActive:!1,registry:{cloudBaseURL:null,hasFetchedInfo:!1,hasFetchedHello:!1,isHelloCallError:null,hostname:"unknown",isCloudEnabled:null,isCloudAvailable:null,isAgentClaimed:null,isACLKAvailable:null,hasStartedInfo:!1,isFetchingHello:!1,fullInfoPayload:null,machineGuid:null,personGuid:null,registryMachines:null,registryMachinesArray:null,registryServer:null},snapshot:null,alarms:{activeAlarms:null,hasStartedAlarms:!1},alarm:null,chartsMetadata:{isFetching:!1,isFetchingError:!1,data:null},options:f.e,userNodeAccess:null},b=Object(c.createReducer)({},m),v=function(e){var t=e.colorsAttribute,a=e.commonColorsAttribute,n=e.chartUuid,r=e.chartContext,o="string"===typeof t&&t.length>0;return a||(o?n:r)},_=function(e){return"ONLY"===Object(i.a)(e)},y=function(e,t){var a,n=t?(a=e.split(" "),_(a)?Object(s.a)(a):a):[],r=!t||!_(e.split(" "));return{assigned:{},available:[].concat(Object(o.a)(n),Object(o.a)(r||0===n.length?window.NETDATA.themes.current.colors:[])),custom:n}};b.on(p.h,(function(e,t){var a=t.chartContext,o=t.chartUuid,i=t.colorsAttribute,s=t.commonColorsAttribute,c=t.dimensionNames,u=v({colorsAttribute:i,commonColorsAttribute:s,chartUuid:o,chartContext:a}),d="string"===typeof i&&i.length>0,h=e.commonColorsKeys[u]||y(i,d),p=Object.keys(h.assigned).length,f=Object(l.a)(c.filter((function(e){return!h.assigned[e]})).map((function(e,t){return Object(r.a)({},e,h.available[(t+p)%h.available.length])}))),g=Object(n.a)({},h.assigned,{},f);return Object(n.a)({},e,{commonColorsKeys:Object(n.a)({},e.commonColorsKeys,Object(r.a)({},u,Object(n.a)({},h,{assigned:g})))})})),b.on(p.p,(function(e,t){var a,i=t.chartUuid,s=t.commonMinKey,l=t.value,c=Object(n.a)({},null===(a=e.commonMin[s])||void 0===a?void 0:a.charts,Object(r.a)({},i,l)),u=Math.min.apply(Math,Object(o.a)(Object.values(c)));return Object(n.a)({},e,{commonMin:Object(n.a)({},e.commonMin,Object(r.a)({},s,{charts:c,currentExtreme:u}))})})),b.on(p.o,(function(e,t){var a,i=t.chartUuid,s=t.commonMaxKey,l=t.value,c=Object(n.a)({},null===(a=e.commonMax[s])||void 0===a?void 0:a.charts,Object(r.a)({},i,l)),u=Math.max.apply(Math,Object(o.a)(Object.values(c)));return Object(n.a)({},e,{commonMax:Object(n.a)({},e.commonMax,Object(r.a)({},s,{charts:c,currentExtreme:u}))})})),b.on(p.w,(function(e,t){var a=t.isActive;return Object(n.a)({},e,{spacePanelIsActive:a})})),b.on(p.x,(function(e,t){var a=t.isActive;return Object(n.a)({},e,{spacePanelTransitionEndIsActive:a})})),b.on(p.u,(function(e,t){var a=t.chartUuid,r=t.hoveredX;return Object(n.a)({},e,{hoveredX:r,currentSelectionMasterId:a})})),b.on(p.s,(function(e,t){return Object(n.a)({},e,{globalPanAndZoom:t})})),b.on(p.j,(function(e){return Object(n.a)({},e,{globalPanAndZoom:m.globalPanAndZoom,hoveredX:m.hoveredX})})),b.on(p.q,(function(e,t){var a=t.after;return Object(n.a)({},e,{defaultAfter:a})})),b.on(p.i,(function(e){return Object(n.a)({},e,{defaultAfter:m.defaultAfter})})),b.on(p.r,(function(e,t){var a=t.after,r=t.before,o=t.masterID;return Object(n.a)({},e,{globalChartUnderlay:{after:a,before:r,masterID:o}})})),b.on(p.b,(function(e){if(!e.globalChartUnderlay)return console.warn("Cannot center around empty selection"),e;var t=e.globalChartUnderlay,a=t.after,r=t.before,o=(r-a)/2;return Object(n.a)({},e,{globalPanAndZoom:{after:a-o,before:r+o}})})),b.on(p.d,(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.resetPanAndZoom,r=void 0===a||a;return Object(n.a)({},e,{globalChartUnderlay:m.globalChartUnderlay},r?{globalPanAndZoom:m.globalPanAndZoom}:{})})),b.on(p.D,(function(e,t){var a=t.hasWindowFocus,r=document.hasFocus();return Object(n.a)({},e,{hasWindowFocus:r||a})})),b.on(p.t,(function(e){return Object(n.a)({},e,{globalPause:!0})})),b.on(p.k,(function(e,t){var a=t.forcePlay;return Object(n.a)({},e,{globalPause:m.globalPause,globalPanAndZoom:m.globalPanAndZoom,hoveredX:m.hoveredX,options:Object(n.a)({},e.options,{stop_updates_when_focus_is_lost:!a})})})),b.on(p.y,(function(e,t){var a=t.utcOffset;return Object(n.a)({},e,{options:Object(n.a)({},e.options,{utcOffset:a})})})),b.on(p.f.request,(function(e){return Object(n.a)({},e,{registry:Object(n.a)({},e.registry,{isFetchingHello:!0})})})),b.on(p.f.success,(function(e,t){var a=t.cloudBaseURL,r=t.hostname,o=t.machineGuid;return Object(n.a)({},e,{registry:Object(n.a)({},e.registry,{cloudBaseURL:a,isFetchingHello:!1,hasFetchedHello:!0,hostname:r,machineGuid:o})})})),b.on(p.f.failure,(function(e){return Object(n.a)({},e,{registry:Object(n.a)({},e.registry,{cloudBaseURL:g.a,isFetchingHello:!1,isHelloCallError:!0})})})),b.on(p.a,(function(e,t){var a=t.registryServer;return Object(n.a)({},e,{registry:Object(n.a)({},e.registry,{registryServer:a})})})),b.on(p.m,(function(e){return Object(n.a)({},e,{registry:Object(n.a)({},e.registry,{hasFetchedHello:m.registry.hasFetchedHello})})})),b.on(h.f,(function(e){return Object(n.a)({},e,{registry:Object(n.a)({},e.registry,{hasStartedInfo:!0})})})),b.on(h.f.success,(function(e,t){var a=t.isCloudAvailable,r=t.isCloudEnabled,o=t.isAgentClaimed,i=t.isACLKAvailable,s=t.fullInfoPayload;return Object(n.a)({},e,{registry:Object(n.a)({},e.registry,{hasFetchedInfo:!0,isCloudAvailable:a,isCloudEnabled:r,isAgentClaimed:o,isACLKAvailable:i,fullInfoPayload:s})})})),b.on(h.f.failure,(function(e){return Object(n.a)({},e,{registry:Object(n.a)({},e.registry,{isCloudAvailable:!1,isCloudEnabled:!1,isAgentClaimed:!1,isACLKAvailable:!1})})})),b.on(p.C,(function(e,t){var a=t.personGuid,r=t.registryMachines,o=t.registryMachinesArray;return Object(n.a)({},e,{registry:Object(n.a)({},e.registry,{personGuid:a,registryMachines:r,registryMachinesArray:o})})})),b.on(p.A,(function(e){return Object(n.a)({},e,{alarms:Object(n.a)({},e.alarms,{hasStartedAlarms:!0})})})),b.on(p.B,(function(e,t){var a=t.activeAlarms;return Object(n.a)({},e,{alarms:Object(n.a)({},e.alarms,{activeAlarms:a})})})),b.on(p.v,(function(e,t){var a=t.key,o=t.value;return Object(n.a)({},e,{options:Object(n.a)({},e.options,Object(r.a)({},a,o))})})),b.on(p.l,(function(e){return Object(f.b)(),Object(n.a)({},e,{options:Object(f.c)()})})),b.on(p.g,(function(e,t){var a=t.snapshot,o=Object.keys(a.data).map((function(e){var t,n;try{if(null===(t=a.uncompress(a.data[e])))return console.warn("uncompressed snapshot data for key ".concat(e," is null")),null;if("undefined"===typeof t)return console.warn("uncompressed snapshot data for key ".concat(e," is undefined")),null}catch(o){console.warn("decompression of snapshot data for key ".concat(e," failed"),o),t=null}if("string"!==typeof t)return console.warn("uncompressed snapshot data for key ".concat(e," is not string")),{};try{n=JSON.parse(t)}catch(o){return console.warn("parsing snapshot data for key ".concat(e," failed")),{}}return Object(r.a)({},e,n)})).reduce((function(e,t){return Object(n.a)({},e,{},t)}),{});return Object(n.a)({},e,{snapshot:Object(n.a)({},a,{data:o})})})),b.on(p.n,(function(e,t){var a=t.alarm;return Object(n.a)({},e,{alarm:a})})),b.on(p.c,(function(e,t){var a=t.data;return Object(n.a)({},e,{chartsMetadata:Object(n.a)({},e.chartsMetadata,{data:a})})})),b.on(p.z,(function(e,t){var a=t.message;return Object(n.a)({},e,{userNodeAccess:a})}))},161:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),o=a(34),i=a.n(o),s=function(e){return{left:"fa-backward",reset:"fa-play",right:"fa-forward",zoomIn:"fa-plus",zoomOut:"fa-minus",resize:"fa-sort",lineChart:"fa-chart-line",areaChart:"fa-chart-area",noChart:"fa-chart-area",loading:"fa-sync-alt",noData:"fa-exclamation-triangle"}[e]},l=function(e){var t=e.iconType;return r.a.createElement("i",{className:i()("fas",s(t))})}},163:function(e,t,a){"use strict";a.d(t,"b",(function(){return f})),a.d(t,"a",(function(){return g}));var n=a(14),r=a(7),o=a(193),i=a(497),s=a(498),l=a(286),c=a(22),u=a(12),d=a(97),h=a(28),p=a(18),f={chartData:null,chartId:null,chartMetadata:null,chartPanAndZoom:null,fetchDataParams:{isRemotelyControlled:!1,viewRange:null},isFetchingData:!1,isFetchDataFailure:!1,isFetchDetailsFailure:!1,isFetchingDetails:!1,resizeHeight:null,snapshotDataIsFetching:!1,snapshotDataIsError:!1,snapshotData:null,viewRange:null},g=Object(c.createReducer)({},{}),m=function(e,t){return e[t]||f};g.on(p.c.request,(function(e,t){var a=t.chart,o=t.fetchDataParams,i=t.id;return Object(r.a)({},e,Object(n.a)({},i,Object(r.a)({},m(e,i),{chartId:a,isFetchingData:!0,viewRange:o.viewRange})))})),g.on(p.d,(function(e,t){var a=t.id;return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},m(e,a),{isFetchingData:!1})))})),g.on(p.c.failure,(function(e,t){var a=t.id;return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},m(e,a),{isFetchingData:!1,isFetchDataFailure:!0})))})),g.on(p.c.success,(function(e,t){var a=t.id,o=t.chartData,i=t.fetchDataParams,s=m(e,a);return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},s,{chartData:Object(h.f)(["dimension_names"],s.chartData,o),fetchDataParams:i,isFetchingData:!1,isFetchDataFailure:!1,viewRange:i.viewRange})))})),g.on(p.e.request,(function(e,t){var a=t.id;return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},m(e,a),{snapshotDataIsFetching:!0})))})),g.on(p.e.failure,(function(e,t){var a=t.id;return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},m(e,a),{snapshotDataIsFetching:!1,snapshotDataIsError:!0})))})),g.on(p.e.success,(function(e,t){var a=t.id,o=t.snapshotData;return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},m(e,a),{snapshotDataIsFetching:!1,snapshotDataIsError:!1,snapshotData:o})))})),g.on(p.j,(function(e){return Object(o.a)((function(e){return Object(r.a)({},e,{},Object(i.a)(["snapshotDataIsFetching","snapshotDataIsError","snapshotData"],f))}),e)})),g.on(p.b.request,(function(e,t){var a=t.id;return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},m(e,a),{isFetchingDetails:!0})))})),g.on(p.b.failure,(function(e,t){var a=t.id;return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},m(e,a),{isFetchDetailsFailure:!0})))})),g.on(p.b.success,(function(e,t){var a=t.id,o=t.chartMetadata;return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},m(e,a),{chartMetadata:o,isFetchingDetails:!1,isFetchDetailsFailure:!1})))})),g.on(p.i,(function(e,t){var a=t.id,o=t.resizeHeight;return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},m(e,a),{resizeHeight:o})))})),g.on(p.h,(function(e,t){var a=t.after,o=t.before,i=t.id,s=t.shouldForceTimeRange;return Object(r.a)({},e,Object(n.a)({},i,Object(r.a)({},m(e,i),{chartPanAndZoom:{after:a,before:o,shouldForceTimeRange:s}})))})),g.on(p.g,(function(e,t){var a=t.id;return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},m(e,a),{chartPanAndZoom:f.chartPanAndZoom})))})),g.on(u.v,(function(e,t){var a=t.key,n=t.value;return a===d.a&&!0===n?Object(o.a)(Object(s.a)("chartPanAndZoom",f.chartPanAndZoom),e):e})),g.on(p.a,(function(e,t){var a=t.id;return Object(l.a)([a],e)}))},170:function(e,t,a){"use strict";a.d(t,"b",(function(){return d})),a.d(t,"a",(function(){return h}));var n=a(7),r=a(14),o=a(499),i=a(218),s=a(503),l=a(97),c=function(e,t,a){var n="data-".concat(t);if(e.hasAttribute(n)){var r=e.getAttribute(n);return"true"===r||"false"!==r&&("null"===r?null:r==="".concat(+r)?+r:/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/.test(r)?JSON.parse(r):r)}return a},u=function(e){return Object(o.a)((function(t){return"boolean"===t.type?function(e,t,a){var n=c(e,t,a);return!0===n||!1===n?n:"string"===typeof n?"yes"===n||"on"===n||""!==n&&"no"!==n&&"off"!==n&&"null"!==n&&a:"number"===typeof n?0!==n:a}(e,t.key,t.defaultValue):c(e,t.key,t.defaultValue)}),{id:{key:"netdata"},host:{key:"host"},httpMethod:{key:"http-method"},title:{key:"title"},chartLibrary:{key:"chart-library",defaultValue:window.NETDATA.chartDefaults.library},width:{key:"width",defaultValue:window.NETDATA.chartDefaults.width},height:{key:"height",defaultValue:window.NETDATA.chartDefaults.height},after:{key:"after"},before:{key:"before",defaultValue:window.NETDATA.chartDefaults.before},legend:{key:"legend",type:"boolean",defaultValue:!0},legendPosition:{key:"legend-position"},units:{key:"units"},unitsCommon:{key:"common-units"},unitsDesired:{key:"desired-units"},aggrMethod:{key:"aggr-method"},labels:{key:"labels"},postGroupBy:{key:"post-group-by"},postAggregationMethod:{key:"post-aggregation-method"},dimensionsAggrMethod:{key:"dimensions-aggr-method"},aggrGroups:{key:"aggrGroups"},selectedChart:{key:"selected-chart"},filteredRows:{key:"filtered-rows"},groupBy:{key:"group-by"},nodeIDs:{key:"node-ids"},colors:{key:"colors"},commonColors:{key:"common-colors"},decimalDigits:{key:"decimal-digits"},dimensions:{key:"dimensions"},selectedDimensions:{key:"selected-dimensions"},forceTimeWindow:{key:"force-time-window"},appendOptions:{key:"append-options"},gtime:{key:"gtime"},method:{key:"method"},overrideOptions:{key:"override-options"},pixelsPerPoint:{key:"pixels-per-point"},points:{key:"points"},heightId:{key:"id"},hideResizeHandler:{key:"hide-resize-handler"},detectResize:{key:"detect-resize"},commonMin:{key:"common-min"},commonMax:{key:"common-max"},dygraphType:{key:"dygraph-type"},dygraphValueRange:{key:"dygraph-valuerange"},dygraphTheme:{key:"dygraph-theme"},dygraphSmooth:{key:"dygraph-smooth",type:"boolean"},dygraphColors:{key:"dygraph-colors"},dygraphRightGap:{key:"dygraph-rightgap"},dygraphShowRangeSelector:{key:"dygraph-showrangeselector",type:"boolean"},dygraphShowRoller:{key:"dygraph-showroller",type:"boolean"},dygraphTitle:{key:"dygraph-title"},dygraphTitleHeight:{key:"dygraph-titleheight"},dygraphLegend:{key:"dygraph-legend"},dygraphLabelsDiv:{key:"dygraph-labelsdiv"},dygraphLabelsSeparateLine:{key:"dygraph-labelsseparatelines",type:"boolean"},dygraphIncludeZero:{key:"dygraph-includezero",type:"boolean"},dygraphShowZeroValues:{key:"dygraph-labelsshowzerovalues",type:"boolean"},dygraphShowLabelsOnHighLight:{key:"dygraph-showlabelsonhighlight",type:"boolean"},dygraphHideOverlayOnMouseOut:{key:"dygraph-hideoverlayonmouseout",type:"boolean"},dygraphXRangePad:{key:"dygraph-xrangepad"},dygraphYRangePad:{key:"dygraph-yrangepad"},dygraphYLabelWidth:{key:"dygraph-ylabelwidth"},dygraphStrokeWidth:{key:"dygraph-strokewidth"},dygraphStrokePattern:{key:"dygraph-strokepattern"},dygraphDrawPoints:{key:"dygraph-drawpoints",type:"boolean"},dygraphDrawGapEdgePoints:{key:"dygraph-drawgapedgepoints",type:"boolean"},dygraphConnectSeparatedPoints:{key:"dygraph-connectseparatedpoints",type:"boolean"},dygraphPointSize:{key:"dygraph-pointsize"},dygraphStepPlot:{key:"dygraph-stepplot",type:"boolean"},dygraphStrokeBorderColor:{key:"dygraph-strokebordercolor"},dygraphStrokeBorderWidth:{key:"dygraph-strokeborderwidth"},dygraphFillGraph:{key:"dygraph-fillgraph",type:"boolean"},dygraphFillAlpha:{key:"dygraph-fillalpha"},dygraphStackedGraph:{key:"dygraph-stackedgraph",type:"boolean"},dygraphStackedGraphNanFill:{key:"dygraph-stackedgraphnanfill"},dygraphAxisLabelFontSize:{key:"dygraph-axislabelfontsize"},dygraphAxisLineColor:{key:"dygraph-axislinecolor"},dygraphAxisLineWidth:{key:"dygraph-axislinewidth"},dygraphDrawGrid:{key:"dygraph-drawgrid",type:"boolean"},dygraphGridLinePattern:{key:"dygraph-gridlinepattern"},dygraphGridLineWidth:{key:"dygraph-gridlinewidth"},dygraphGridLineColor:{key:"dygraph-gridlinecolor"},dygraphMaxNumberWidth:{key:"dygraph-maxnumberwidth"},dygraphSigFigs:{key:"dygraph-sigfigs"},dygraphDigitsAfterDecimal:{key:"dygraph-digitsafterdecimal"},dygraphHighlighCircleSize:{key:"dygraph-highlightcirclesize"},dygraphHighlightSeriesOpts:{key:"dygraph-highlightseriesopts"},dygraphHighlightSeriesBackgroundAlpha:{key:"dygraph-highlightseriesbackgroundalpha"},dygraphXPixelsPerLabel:{key:"dygraph-xpixelsperlabel"},dygraphXAxisLabelWidth:{key:"dygraph-xaxislabelwidth"},dygraphDrawXAxis:{key:"dygraph-drawxaxis",type:"boolean"},dygraphYPixelsPerLabel:{key:"dygraph-ypixelsperlabel"},dygraphYAxisLabelWidth:{key:"dygraph-yaxislabelwidth"},dygraphDrawYAxis:{key:"dygraph-drawyaxis",type:"boolean"},dygraphDrawAxis:{key:"dygraph-drawaxis",type:"boolean"},easyPieChartMinValue:{key:"easypiechart-min-value"},easyPieChartMaxValue:{key:"easypiechart-max-value"},easyPieChartBarColor:{key:"easypiechart-barcolor"},easyPieChartTrackColor:{key:"easypiechart-trackcolor"},easyPieChartScaleColor:{key:"easypiechart-scalecolor"},easyPieChartScaleLength:{key:"easypiechart-scalelength"},easyPieChartLineCap:{key:"easypiechart-linecap"},easyPieChartLineWidth:{key:"easypiechart-linewidth"},easyPieChartTrackWidth:{key:"easypiechart-trackwidth"},easyPieChartSize:{key:"easypiechart-size"},easyPieChartRotate:{key:"easypiechart-rotate"},easyPieChartAnimate:{key:"easypiechart-animate"},easyPieChartEasing:{key:"easypiechart-easing"},gaugeMinValue:{key:"gauge-min-value"},gaugeMaxValue:{key:"gauge-max-value"},gaugePointerColor:{key:"gauge-pointer-color"},gaugeStrokeColor:{key:"gauge-stroke-color"},gaugeStartColor:{key:"gauge-start-color"},gaugeStopColor:{key:"gauge-stop-color"},gaugeGenerateGradient:{key:"gauge-generate-gradient"},sparklineType:{key:"sparkline-type"},sparklineLineColor:{key:"sparkline-linecolor"},sparklineFillColor:{key:"sparkline-fillcolor"},sparklineChartRangeMin:{key:"sparkline-chartrangemin"},sparklineChartRangeMax:{key:"sparkline-chartrangemax"},sparklineComposite:{key:"sparkline-composite"},sparklineEnableTagOptions:{key:"sparkline-enabletagoptions"},sparklineTagOptionPrefix:{key:"sparkline-tagoptionprefix"},sparklineTagValuesAttribute:{key:"sparkline-tagvaluesattribute"},sparklineDisableHiddenCheck:{key:"sparkline-disablehiddencheck"},sparklineDefaultPixelsPerValue:{key:"sparkline-defaultpixelspervalue"},sparklineSpotColor:{key:"sparkline-spotcolor"},sparklineMinSpotColor:{key:"sparkline-minspotcolor"},sparklineMaxSpotColor:{key:"sparkline-maxspotcolor"},sparklineSpotRadius:{key:"sparkline-spotradius"},sparklineValueSpots:{key:"sparkline-valuespots"},sparklineHighlightSpotColor:{key:"sparkline-highlightspotcolor"},sparklineHighlightLineColor:{key:"sparkline-highlightlinecolor"},sparklineLineWidth:{key:"sparkline-linewidth"},sparklineNormalRangeMin:{key:"sparkline-normalrangemin"},sparklineNormalRangeMax:{key:"sparkline-normalrangemax"},sparklineDrawNormalOnTop:{key:"sparkline-drawnormalontop"},sparklineXvalues:{key:"sparkline-xvalues"},sparklineChartRangeClip:{key:"sparkline-chartrangeclip"},sparklineChartRangeMinX:{key:"sparkline-chartrangeminx"},sparklineChartRangeMaxX:{key:"sparkline-chartrangemaxx"},sparklineDisableInteraction:{key:"sparkline-disableinteraction",type:"boolean"},sparklineDisableTooltips:{key:"sparkline-disabletooltips",type:"boolean"},sparklineOnHover:{key:"sparkline-on-hover"},sparklineDisableHighlight:{key:"sparkline-disablehighlight",type:"boolean"},sparklineHighlightLighten:{key:"sparkline-highlightlighten"},sparklineHighlightColor:{key:"sparkline-highlightcolor"},sparklineTooltipContainer:{key:"sparkline-tooltipcontainer"},sparklineTooltipClassname:{key:"sparkline-tooltipclassname"},sparklineTooltipFormat:{key:"sparkline-tooltipformat"},sparklineTooltipPrefix:{key:"sparkline-tooltipprefix"},sparklineTooltipSuffix:{key:"sparkline-tooltipsuffix"},sparklineTooltipSkipNull:{key:"sparkline-tooltipskipnull",type:"boolean"},sparklineTooltipValueLookups:{key:"sparkline-tooltipvaluelookups"},sparklineTooltipFormatFieldlist:{key:"sparkline-tooltipformatfieldlist"},sparklineTooltipFormatFieldlistKey:{key:"sparkline-tooltipformatfieldlistkey"},sparklineNumberFormatter:{key:"sparkline-numberformatter"},sparklineNumberDigitGroupSep:{key:"sparkline-numberdigitgroupsep"},sparklineNumberDecimalMark:{key:"sparkline-numberdecimalmark"},sparklineNumberDigitGroupCount:{key:"sparkline-numberdigitgroupcount"},sparklineAnimatedZooms:{key:"sparkline-animatedzooms",type:"boolean"},d3pieTitle:{key:"d3pie-title"},d3pieSubtitle:{key:"d3pie-subtitle"},d3pieFooter:{key:"d3pie-footer"},d3pieTitleColor:{key:"d3pie-title-color"},d3pieTitleFontsize:{key:"d3pie-title-fontsize"},d3pieTitleFontweight:{key:"d3pie-title-fontweight"},d3pieTitleFont:{key:"d3pie-title-font"},d3PieSubtitleColor:{key:"d3pie-subtitle-color"},d3PieSubtitleFontsize:{key:"d3pie-subtitle-fontsize"},d3PieSubtitleFontweight:{key:"d3pie-subtitle-fontweight"},d3PieSubtitleFont:{key:"d3pie-subtitle-font"},d3PieFooterColor:{key:"d3pie-footer-color"},d3PieFooterFontsize:{key:"d3pie-footer-fontsize"},d3PieFooterFontweight:{key:"d3pie-footer-fontweight"},d3PieFooterFont:{key:"d3pie-footer-font"},d3PieFooterLocation:{key:"d3pie-footer-location"},d3PiePieinnerradius:{key:"d3pie-pieinnerradius"},d3PiePieouterradius:{key:"d3pie-pieouterradius"},d3PieSortorder:{key:"d3pie-sortorder"},d3PieSmallsegmentgroupingEnabled:{key:"d3pie-smallsegmentgrouping-enabled",type:"boolean"},d3PieSmallsegmentgroupingValue:{key:"d3pie-smallsegmentgrouping-value"},d3PieSmallsegmentgroupingValuetype:{key:"d3pie-smallsegmentgrouping-valuetype"},d3PieSmallsegmentgroupingLabel:{key:"d3pie-smallsegmentgrouping-label"},d3PieSmallsegmentgroupingColor:{key:"d3pie-smallsegmentgrouping-color"},d3PieLabelsOuterFormat:{key:"d3pie-labels-outer-format"},d3PieLabelsOuterHidewhenlessthanpercentage:{key:"d3pie-labels-outer-hidewhenlessthanpercentage"},d3PieLabelsOuterPiedistance:{key:"d3pie-labels-outer-piedistance"},d3PieLabelsInnerFormat:{key:"d3pie-labels-inner-format"},d3PieLabelsInnerHidewhenlessthanpercentage:{key:"d3pie-labels-inner-hidewhenlessthanpercentage"},d3PieLabelsMainLabelColor:{key:"d3pie-labels-mainLabel-color"},d3PieLabelsMainLabelFont:{key:"d3pie-labels-mainLabel-font"},d3PieLabelsMainLabelFontsize:{key:"d3pie-labels-mainLabel-fontsize"},d3PieLabelsMainLabelFontweight:{key:"d3pie-labels-mainLabel-fontweight"},d3PieLabelsPercentageColor:{key:"d3pie-labels-percentage-color"},d3PieLabelsPercentageFont:{key:"d3pie-labels-percentage-font"},d3PieLabelsPercentageFontsize:{key:"d3pie-labels-percentage-fontsize"},d3PieLabelsPercentageFontweight:{key:"d3pie-labels-percentage-fontweight"},d3PieLabelsValueColor:{key:"d3pie-labels-value-color"},d3PieLabelsValueFont:{key:"d3pie-labels-value-font"},d3PieLabelsValueFontsize:{key:"d3pie-labels-value-fontsize"},d3PieLabelsValueFontweight:{key:"d3pie-labels-value-fontweight"},d3PieLabelsLinesEnabled:{key:"d3pie-labels-lines-enabled",type:"boolean"},d3PieLabelsLinesStyle:{key:"d3pie-labels-lines-style"},d3PieLabelsLinesColor:{key:"d3pie-labels-lines-color"},d3PieLabelsTruncationEnabled:{key:"d3pie-labels-truncation-enabled",type:"boolean"},d3PieLabelsTruncationTruncatelength:{key:"d3pie-labels-truncation-truncatelength"},d3PieMiscColorsSegmentstroke:{key:"d3pie-misc-colors-segmentstroke"},d3PieMiscGradientEnabled:{key:"d3pie-misc-gradient-enabled",type:"boolean"},d3PieMiscColorsPercentage:{key:"d3pie-misc-colors-percentage"},d3PieMiscGradientColor:{key:"d3pie-misc-gradient-color"},d3PieCssprefix:{key:"d3pie-cssprefix"},peityStrokeWidth:{key:"peity-strokewidth"},textOnlyDecimalPlaces:{key:"textonly-decimal-places"},textOnlyPrefix:{key:"textonly-prefix"},textOnlySuffix:{key:"textonly-suffix"}})},d=function(e){var t=u(e),a=function(e){var t=Array.from(e.attributes).filter((function(e){return e.name.startsWith("data-show-value-of")})).map((function(e){return Object(r.a)({},e.name.replace("data-",""),e.value)})),a=Object(i.a)(t);return Object(s.a)(a)?void 0:a}(e);return Object(n.a)({},t,{showValueOf:a})},h={legendPosition:l.d?"right":"bottom"}},18:function(e,t,a){"use strict";a.d(t,"c",(function(){return i})),a.d(t,"d",(function(){return s})),a.d(t,"e",(function(){return l})),a.d(t,"j",(function(){return c})),a.d(t,"b",(function(){return u})),a.d(t,"i",(function(){return d})),a.d(t,"h",(function(){return h})),a.d(t,"g",(function(){return p})),a.d(t,"a",(function(){return f})),a.d(t,"f",(function(){return g}));var n=a(22),r=a(89),o=a(45),i=(Object(n.createAction)("".concat(o.c,"/updateChartData")),Object(n.createAction)("".concat(o.c,"/updateChartMetadata")),Object(r.a)("".concat(o.c,"/fetchDataAction"))),s=Object(n.createAction)("".concat(o.c,"/fetchDataCancelAction")),l=Object(r.a)("".concat(o.c,"/fetchDataForSnapshotAction")),c=Object(r.a)("".concat(o.c,"/snapshotExportResetAction")),u=Object(r.a)("".concat(o.c,"/fetchChartAction")),d=Object(n.createAction)("".concat(o.c,"/setResizeHeight")),h=Object(n.createAction)("".concat(o.c,"/setChartPanAndZoom")),p=Object(n.createAction)("".concat(o.c,"/resetChartPanAndZoomAction")),f=Object(n.createAction)("".concat(o.c,"/clearChartStateAction")),g=Object(r.a)("".concat(o.c,"/fetchInfoAction"))},182:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));var n="sign_in_iframe"},216:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"b",(function(){return updateLocaleFunctions})),__webpack_require__.d(__webpack_exports__,"a",(function(){return netdataCallback}));var ramda__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(500),ramda__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(146),_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(12),_domains_global_selectors__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(9),_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(46),_utils_units_conversion__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(100),_domains_dashboard_actions__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(44),_domains_chart_actions__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(18),_domains_chart_selectors__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(39),_utils_server_detection__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(36),_utils_name_2_id__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(142),_utils_date_time__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(42),_utils__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(140),utils_hash_utils__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(56),_utils_is_demo__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(98),_domains_chart_utils_legend_utils__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(55),_domains_chart_utils_transformDataAttributes__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(170),_getHashParam,_getHashParam2,localeDateString,localeTimeString,updateLocaleFunctions=function(e){var t=e.localeDateString,a=e.localeTimeString;localeDateString=t,localeTimeString=a},netdataShowAlarms=!0,netdataRegistry=!0,netdataServer=void 0,netdataServerStatic=void 0,netdataCheckXSS=void 0,reduxStore;function escapeUserInputHTML(e){return e.toString().replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/#/g,"#").replace(/'/g,"'").replace(/\(/g,"(").replace(/\)/g,")").replace(/\//g,"/")}var setOption=function(e,t){reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.v)({key:e,value:t}))},getFromRegistry=function(e){var t=Object(_domains_global_selectors__WEBPACK_IMPORTED_MODULE_3__.y)(reduxStore.getState());return null===t||void 0===t?void 0:t[e]};function verifyURL(e){return"string"===typeof e&&(e.startsWith("http://")||e.startsWith("https://"))?e.replace(/'/g,"%22").replace(/"/g,"%27").replace(/\)/g,"%28").replace(/\(/g,"%29"):(console.log("invalid URL detected:"),console.log(e),'javascript:alert("invalid url");')}window.urlOptions={hash:"#",theme:null,help:null,mode:"live",update_always:!1,pan_and_zoom:!1,server:null,after:null!==(_getHashParam=Object(utils_hash_utils__WEBPACK_IMPORTED_MODULE_13__.a)("after"))&&void 0!==_getHashParam?_getHashParam:0,before:null!==(_getHashParam2=Object(utils_hash_utils__WEBPACK_IMPORTED_MODULE_13__.a)("before"))&&void 0!==_getHashParam2?_getHashParam2:0,highlight:!1,highlight_after:0,highlight_before:0,nowelcome:!1,show_alarms:!1,chart:null,family:null,alarm:null,utc:null,hasProperty:function(e){return"undefined"!==typeof this[e]},genHash:function(e){var t=urlOptions.hash;return t+=";after="+urlOptions.after.toString()+";before="+urlOptions.before.toString(),!0===urlOptions.highlight&&(t+=";highlight_after="+urlOptions.highlight_after.toString()+";highlight_before="+urlOptions.highlight_before.toString()),null!==urlOptions.theme&&(t+=";theme="+urlOptions.theme.toString()),null!==urlOptions.help&&(t+=";help="+urlOptions.help.toString()),!0===urlOptions.update_always&&(t+=";update_always=true"),!0===e&&null!==urlOptions.server&&(t+=";server="+urlOptions.server.toString()),"live"!==urlOptions.mode&&(t+=";mode="+urlOptions.mode),null!==urlOptions.utc&&(t+=";utc="+urlOptions.utc),t},parseHash:function(){for(var e=document.location.hash.split(";"),t=e.length;t--;)if(0!==t){var a=e[t].split("=");urlOptions.hasProperty(a[0])&&"undefined"!==typeof a[1]&&(urlOptions[a[0]]=decodeURIComponent(a[1]))}else e[t].length>0&&(urlOptions.hash=e[t]);var n=["nowelcome","show_alarms","update_always"];for(t=n.length;t--;)"true"===urlOptions[n[t]]||!0===urlOptions[n[t]]||"1"===urlOptions[n[t]]||1===urlOptions[n[t]]?urlOptions[n[t]]=!0:urlOptions[n[t]]=!1;var r=["after","before","highlight_after","highlight_before"];for(t=r.length;t--;)if("string"===typeof urlOptions[r[t]])try{urlOptions[r[t]]=parseInt(urlOptions[r[t]])}catch(o){console.log("failed to parse URL hash parameter "+r[t]),urlOptions[r[t]]=0}switch(null!==urlOptions.server&&""!==urlOptions.server?(netdataServerStatic=document.location.origin.toString()+document.location.pathname.toString(),netdataServer=urlOptions.server,netdataCheckXSS=!0):urlOptions.server=null,urlOptions.before>0&&urlOptions.after>0?(urlOptions.pan_and_zoom=!0,urlOptions.nowelcome=!0):urlOptions.pan_and_zoom=!1,urlOptions.highlight_before>0&&urlOptions.highlight_after>0?urlOptions.highlight=!0:urlOptions.highlight=!1,urlOptions.mode){case"print":urlOptions.theme="white",urlOptions.welcome=!1,urlOptions.help=!1,urlOptions.show_alarms=!1,!1===urlOptions.pan_and_zoom&&(urlOptions.pan_and_zoom=!0,urlOptions.before=Date.now(),urlOptions.after=urlOptions.before-6e5),netdataShowAlarms=!1,netdataRegistry=!1;break;case"live":default:urlOptions.mode="live"}},hashUpdate:function(){history.replaceState(null,"",urlOptions.genHash(!0))},netdataPanAndZoomCallback:function(e,t,a){null===netdataSnapshotData&&(urlOptions.pan_and_zoom=e,urlOptions.after=t,urlOptions.before=a,urlOptions.hashUpdate())},updateUtcParam:function(e){e&&(urlOptions.utc=e,urlOptions.hashUpdate())},netdataHighlightCallback:function(e,t,a){if(!0===e&&(null===t||null===a||t<=0||a<=0||t>=a)&&(e=!1,t=0,a=0),null===window.netdataSnapshotData?urlOptions.highlight=e:urlOptions.highlight=!1,urlOptions.highlight_after=Math.round(t),urlOptions.highlight_before=Math.round(a),urlOptions.hashUpdate(),!0===e&&t>0&&a>0&&thighlighted time-frame '+n+" "+localeTimeString(t)+" to "+r+" "+localeTimeString(a)+", duration "+Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(Math.round((a-t)/1e3))+'',$(".navbar-highlight").show(),$(".navbar-highlight").width("80%"),$(".highlight-tooltip").tooltip({html:!0,delay:{show:500,hide:0},container:"body"})}else $(".navbar-highlight").hide(),$(".navbar-highlight").width("100%")},clearHighlight:function(){reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.d)())},showHighlight:function(){reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.b)())}},urlOptions.parseHash();var localStorageTested=-1;function localStorageTest(){if(-1!==localStorageTested)return localStorageTested;if("undefined"!==typeof Storage&&"object"===typeof localStorage){try{localStorage.setItem("test","test"),localStorage.removeItem("test"),localStorageTested=!0}catch(e){console.log(e),localStorageTested=!1}}else localStorageTested=!1;return localStorageTested}function loadLocalStorage(e){var t=null;try{!0===localStorageTest()?t=localStorage.getItem(e):console.log("localStorage is not available")}catch(a){return console.log(a),null}return"undefined"===typeof t||null===t?null:t}function saveLocalStorage(e,t){try{if(!0===localStorageTest())return localStorage.setItem(e,t.toString()),!0}catch(a){console.log(a)}return!1}function getTheme(e){if("print"===urlOptions.mode)return"white";var t=loadLocalStorage("netdataTheme");return"undefined"===typeof t||null===t||"undefined"===t?e:t}function setTheme(e){return"print"!==urlOptions.mode&&(e!==netdataTheme&&saveLocalStorage("netdataTheme",e))}window.netdataTheme=getTheme("slate"),NETDATA.updateTheme();var netdataShowHelp=!0;function naturalSortChunkify(e){for(var t,a,n=[],r=0,o=-1,i=0;t=(a=e.charAt(r++)).charCodeAt(0);){var s=t>=48&&t<=57;s!==i&&(n[++o]="",i=s),n[o]+=a}return n}function naturalSortCompare(e,t){for(var a=naturalSortChunkify(e.toLowerCase()),n=naturalSortChunkify(t.toLowerCase()),r=0;a[r]&&n[r];r++)if(a[r]!==n[r]){var o=Number(a[r]),i=Number(n[r]);return o.toString()===a[r]&&i.toString()===n[r]?o-i:a[r]>n[r]?1:-1}return a.length-n.length}function saveTextToClient(e,t){var a=new Blob([e],{type:"application/octet-stream"}),n=URL.createObjectURL(a),r=document.createElement("a");r.setAttribute("href",n),r.setAttribute("download",t);var o=document.getElementById("hiddenDownloadLinks");o.innerHTML="",o.appendChild(r),setTimeout((function(){o.removeChild(r),URL.revokeObjectURL(n)}),60),r.click()}function saveObjectToClient(e,t){saveTextToClient(JSON.stringify(e),t)}function netdataURL(e,t){return"undefined"===typeof e&&(e=""),-1!==e.indexOf("#")&&(e=e.substring(0,e.indexOf("#"))),e+urlOptions.genHash(t)}function netdataReload(e){document.location=verifyURL(netdataURL(e,!0)),location.reload()}null!==urlOptions.theme?(setTheme(urlOptions.theme),netdataTheme=urlOptions.theme,window.NETDATA.updateTheme()):urlOptions.theme=netdataTheme,null!==urlOptions.help?(saveLocalStorage("options.show_help",urlOptions.help),netdataShowHelp=urlOptions.help):urlOptions.help=loadLocalStorage("options.show_help"),window.gotoHostedModalHandler=function(e){return document.location=verifyURL(e+urlOptions.genHash()),!1};var gotoServerValidateRemaining=0,gotoServerMiddleClick=!1,gotoServerStop=!1;function gotoServerValidateUrl(e,t,a){var n=0,r="failed";document.location.toString().startsWith("http://")&&a.toString().startsWith("https://")?n=500:document.location.toString().startsWith("https://")&&a.toString().startsWith("http://")&&(r="can't check");var o=netdataURL(a);setTimeout((function(){document.getElementById("gotoServerList").innerHTML+=''+escapeUserInputHTML(a)+'checking...',NETDATA.registryHello(a,(function(n){if("undefined"!==typeof n&&null!==n&&"string"===typeof n.machine_guid&&n.machine_guid===t){if(document.getElementById(t+"-"+e+"-status").innerHTML="OK",!gotoServerStop)if(gotoServerStop=!0,gotoServerMiddleClick){window.open(verifyURL(o),"_blank"),gotoServerMiddleClick=!1;var i=getFromRegistry("registryMachines");document.getElementById("gotoServerResponse").innerHTML="Opening new window to "+i[t].name+'
'+escapeUserInputHTML(a)+"

(check your pop-up blocker if it fails)"}else document.getElementById("gotoServerResponse").innerHTML+="found it! It is at:
"+escapeUserInputHTML(a)+"",document.location=verifyURL(o),$("#gotoServerModal").modal("hide")}else"undefined"!==typeof n&&null!==n&&"string"===typeof n.machine_guid&&n.machine_guid!==t&&(r="wrong machine"),document.getElementById(t+"-"+e+"-status").innerHTML=r,--gotoServerValidateRemaining<=0&&(gotoServerMiddleClick=!1,document.getElementById("gotoServerResponse").innerHTML="Sorry! I cannot find any operational URL for this server")}))}),50*e+n)}window.gotoServerModalHandler=function(e){gotoServerStop=!1;var t={},a=getFromRegistry("registryMachines"),n=a[e].alternateUrls.length,r=0;for(document.getElementById("gotoServerResponse").innerHTML="",document.getElementById("gotoServerList").innerHTML="",document.getElementById("gotoServerName").innerHTML=a[e].name,$("#gotoServerModal").modal("show"),gotoServerValidateRemaining=n;n--;){var o=a[e].alternateUrls[n];t[o]=!0,gotoServerValidateUrl(r++,e,o)}return setTimeout((function(){!1===gotoServerStop&&(document.getElementById("gotoServerResponse").innerHTML="Added all the known URLs for this machine.",NETDATA.registrySearch(e,getFromRegistry,(function(a){for(n=a.urls.length;n--;){var o=a.urls[n][1];"undefined"===typeof t[o]&&(gotoServerValidateRemaining++,t[o]=!0,gotoServerValidateUrl(r++,e,o))}})))}),2e3),!1},window.switchRegistryModalHandler=function(){document.getElementById("switchRegistryPersonGUID").value=getFromRegistry("personGuid"),document.getElementById("switchRegistryURL").innerHTML=getFromRegistry("registryServer"),document.getElementById("switchRegistryResponse").innerHTML="",$("#switchRegistryModal").modal("show")},window.notifyForSwitchRegistry=function(){var e=document.getElementById("switchRegistryPersonGUID").value;""!==e&&36===e.length?$.ajax({url:getFromRegistry("registryServer")+"/api/v1/registry?action=switch&machine="+getFromRegistry("machineGuid")+"&name="+encodeURIComponent(getFromRegistry("hostname"))+"&url="+encodeURIComponent(_utils_server_detection__WEBPACK_IMPORTED_MODULE_9__.b)+"&to="+e,async:!0,cache:!1,headers:{"Cache-Control":"no-cache, no-store",Pragma:"no-cache"},xhrFields:{withCredentials:!0}}).done((function(e){"string"===typeof(e=NETDATA.xss.checkAlways("/api/v1/registry?action=switch",e)).status&&"ok"===e.status||(console.warn("Netdata registry server send invalid response to SWITCH",e),e=null),$("#switchRegistryModal").modal("hide")})).fail((function(){console.warn("Netdata registry SWITCH failed"),document.getElementById("switchRegistryResponse").innerHTML="Sorry! The registry rejected your request."})):document.getElementById("switchRegistryResponse").innerHTML="The ID you have entered is not a GUID."};var deleteRegistryGuid=null,deleteRegistryUrl=null;window.deleteRegistryModalHandler=function(e,t,a){deleteRegistryGuid=e,deleteRegistryUrl=a,document.getElementById("deleteRegistryServerName").innerHTML=t,document.getElementById("deleteRegistryServerName2").innerHTML=t,document.getElementById("deleteRegistryServerURL").innerHTML=a,document.getElementById("deleteRegistryResponse").innerHTML="",$("#deleteRegistryModal").modal("show")},window.notifyForDeleteRegistry=function(){var e=document.getElementById("deleteRegistryResponse");deleteRegistryUrl&&NETDATA.registryDelete(getFromRegistry,_utils_server_detection__WEBPACK_IMPORTED_MODULE_9__.b,deleteRegistryUrl,(function(t){null!==t?(deleteRegistryUrl=null,$("#deleteRegistryModal").modal("hide"),reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.m)())):e.innerHTML="Sorry, this command was rejected by the registry server!"}))};var options={menus:{},submenu_names:{},data:null,hostname:"netdata_server",version:"unknown",release_channel:"unknown",hosts:[],duration:0,update_every:1,chartsPerRow:0,chartsHeight:180};function chartsPerRow(e){return 0===options.chartsPerRow?1:options.chartsPerRow}function prioritySort(e,t){return e.priorityt.priority?1:naturalSortCompare(e.name,t.name)}function sortObjectByPriority(e){var t={},a=[];for(var n in e)e.hasOwnProperty(n)&&"undefined"===typeof t[n]&&(t[n]=e[n],a.push(n));return a.sort((function(e,a){return t[e].priorityt[a].priority?1:naturalSortCompare(e,a)})),a}window.scrollToId=function(e){if(e&&""!==e&&null!==document.getElementById(e)){var t=$("#"+e).offset();"undefined"!==typeof t&&$("html, body").animate({scrollTop:t.top-30},0)}return!1},window.customDashboard={menu:{},submenu:{},context:{}};var netdataDashboard={sparklines_registry:{},os:"unknown",menu:{},submenu:{},context:{},sparkline:function(e,t,a,n,r){if(null===options.data||"undefined"===typeof options.data.charts)return"";if("undefined"===typeof options.data.charts[t])return"";if("undefined"===typeof options.data.charts[t].dimensions)return"";if("undefined"===typeof options.data.charts[t].dimensions[a])return"";var o=t+"."+a;return"undefined"===typeof n&&(n=""),"undefined"===typeof this.sparklines_registry[o]?this.sparklines_registry[o]={count:1}:this.sparklines_registry[o].count++,e+'
(X'+n+")"+r},gaugeChart:function(e,t,a,n){return"undefined"===typeof n&&(n=""),"undefined"===typeof a&&(a=""),'
'},anyAttribute:function(e,t,a,n){if("undefined"!==typeof e[a]){var r=e[a][t];return"undefined"===typeof r?n:"function"===typeof r?r(netdataDashboard.os):r}return n},menuTitle:function(e){return"undefined"!==typeof e.menu_pattern?(this.anyAttribute(this.menu,"title",e.menu_pattern,e.menu_pattern).toString()+" "+e.type.slice(-(e.type.length-e.menu_pattern.length-1)).toString()).replace(/_/g," "):this.anyAttribute(this.menu,"title",e.menu,e.menu).toString().replace(/_/g," ")},menuIcon:function(e){return"undefined"!==typeof e.menu_pattern?this.anyAttribute(this.menu,"icon",e.menu_pattern,'').toString():this.anyAttribute(this.menu,"icon",e.menu,'')},menuInfo:function(e){return"undefined"!==typeof e.menu_pattern?this.anyAttribute(this.menu,"info",e.menu_pattern,null):this.anyAttribute(this.menu,"info",e.menu,null)},menuHeight:function(e){return"undefined"!==typeof e.menu_pattern?this.anyAttribute(this.menu,"height",e.menu_pattern,1):this.anyAttribute(this.menu,"height",e.menu,1)},submenuTitle:function(e,t){var a=e+"."+t,n=this.anyAttribute(this.submenu,"title",a,t).toString().replace(/_/g," ");return n.length>28?n.substring(0,13)+"..."+n.substring(n.length-12,n.length):n},submenuInfo:function(e,t){var a=e+"."+t;return this.anyAttribute(this.submenu,"info",a,null)},submenuHeight:function(e,t,a){var n=e+"."+t;return this.anyAttribute(this.submenu,"height",n,1)*a},contextInfo:function(e){var t=this.anyAttribute(this.context,"info",e,null);return null!==t?'
'+t+"
":""},contextValueRange:function(e){return"undefined"!==typeof this.context[e]&&"undefined"!==typeof this.context[e].valueRange?this.context[e].valueRange:"[null, null]"},contextHeight:function(e,t){return"undefined"!==typeof this.context[e]&&"undefined"!==typeof this.context[e].height?t*this.context[e].height:t},contextDecimalDigits:function(e,t){return"undefined"!==typeof this.context[e]&&"undefined"!==typeof this.context[e].decimalDigits?this.context[e].decimalDigits:t}};function enrichChartData(e){var t=e.type.split("_"),a=t[0];switch(a){case"ap":case"net":case"disk":case"powersupply":case"statsd":e.menu=a;break;case"apache":e.menu=e.type,t.length>2&&"cache"===t[1]?e.menu_pattern=a+"_"+t[1]:t.length>1&&(e.menu_pattern=a);break;case"bind":e.menu=e.type,t.length>2&&"rndc"===t[1]?e.menu_pattern=a+"_"+t[1]:t.length>1&&(e.menu_pattern=a);break;case"cgroup":e.menu=e.type,e.id.match(/.*[\._\/-:]qemu[\._\/-:]*/)||e.id.match(/.*[\._\/-:]kvm[\._\/-:]*/)?e.menu_pattern="cgqemu":e.menu_pattern="cgroup";break;case"go":e.menu=e.type,t.length>2&&"expvar"===t[1]?e.menu_pattern=a+"_"+t[1]:t.length>1&&(e.menu_pattern=a);break;case"mount":t.length>2?e.menu=a+"_"+t[1]:e.menu=a;break;case"isc":e.menu=e.type,t.length>2&&"dhcpd"===t[1]?e.menu_pattern=a+"_"+t[1]:t.length>1&&(e.menu_pattern=a);break;case"ovpn":e.menu=e.type,t.length>3&&"status"===t[1]&&"log"===t[2]?e.menu_pattern=a+"_"+t[1]:t.length>1&&(e.menu_pattern=a);break;case"smartd":case"web":e.menu=e.type,t.length>2&&"log"===t[1]?e.menu_pattern=a+"_"+t[1]:t.length>1&&(e.menu_pattern=a);break;case"anomaly":t.length>=2&&t[1].startsWith("detection")&&(e.menu=a+"_detection");break;case"tc":if(e.menu=a,"tc.qos"===e.context&&("undefined"===typeof options.submenu_names[e.family]||options.submenu_names[e.family]===e.family)){var n=e.name.split(".")[1];n.endsWith("_in")?options.submenu_names[e.family]=n.slice(0,n.lastIndexOf("_in")):n.endsWith("_out")?options.submenu_names[e.family]=n.slice(0,n.lastIndexOf("_out")):n.startsWith("in_")?options.submenu_names[e.family]=n.slice(3,n.length):n.startsWith("out_")?options.submenu_names[e.family]=n.slice(4,n.length):options.submenu_names[e.family]=n}e.id.match(/.*-ifb$/)&&e.priority--;break;default:e.menu=e.type,t.length>1&&(e.menu_pattern=a)}e.submenu=e.family}function headMain(e,t,a){if("print"===urlOptions.mode)return"";var n="";return"undefined"!==typeof t["system.swap"]&&(n+='
'),"undefined"!==typeof t["system.io"]?(n+='
',n+='
'):"undefined"!==typeof t["system.pgpgio"]&&(n+='
',n+='
'),"undefined"!==typeof t["system.cpu"]&&(n+='
'),"undefined"!==typeof t["system.net"]?(n+='
',n+='
'):"undefined"!==typeof t["system.ip"]?(n+='
',n+='
'):"undefined"!==typeof t["system.ipv4"]?(n+='
',n+='
'):"undefined"!==typeof t["system.ipv6"]&&(n+='
',n+='
'),"undefined"!==typeof t["system.ram"]&&(n+='
'),n}function generateHeadCharts(e,t,a){if("print"===urlOptions.mode)return"";var n="",r=netdataDashboard.anyAttribute(netdataDashboard.context,e,t.context,[]);if(r.length>0)for(var o=0,i=r.length;o"+e[m].icon+" "+e[m].title+'",l+=(_+="")+v+'
'}var D="dbengine"===t.memory_mode;c+='
  • Add more charts
  • ',c+='
  • Add more alarms
  • ',c+='
  • Every '+(1===t.update_every?"second":t.update_every.toString()+" seconds")+", Netdata collects "+t.dimensions_count.toLocaleString()+" metrics on "+t.hostname.toString()+", presents them in "+t.charts_count.toLocaleString()+" charts"+(D?"":",")+" and monitors them with "+t.alarms_count.toLocaleString()+" alarms.",D||(c+='
     
    Get more history by configuring Netdata\'s history or switching to the database engine.'),c+="
     
    netdata
    "+t.version.toString()+"
    ",c+="
  • ",c+='',c+="",a.innerHTML=l,document.getElementById("sidebar").innerHTML=c,!0===urlOptions.highlight&&reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.r)({after:urlOptions.highlight_after,before:urlOptions.highlight_before})),"print"===urlOptions.mode?printPage():finalizePage()}function renderChartsAndMenu(e){options.menus={},options.submenu_names={};var t,a=options.menus,n=e.charts;for(var r in n)if(n.hasOwnProperty(r)){var o=n[r];enrichChartData(o),"undefined"===typeof a[i=o.menu]?a[i]={menu_pattern:o.menu_pattern,priority:o.priority,submenus:{},title:netdataDashboard.menuTitle(o),icon:netdataDashboard.menuIcon(o),info:netdataDashboard.menuInfo(o),height:netdataDashboard.menuHeight(o)*options.chartsHeight}:("undefined"===typeof a[i].menu_pattern&&(a[i].menu_pattern=o.menu_pattern),o.priorityt.priority?1:naturalSortCompare(e.name,t.name)})),p=0,f=0,g=h.length;g--;){o=h[p++].name;var m=!1;0!==f&&(t+=""),t+='
    ',options.alarm_families[f]=c[o],f++;for(var b=c[o].arr,v=b.length;v--;)"WARNING"!==(i=b[v]).status&&"CRITICAL"!==i.status||(m||(m=!0,e+='

    '+o+"

    "),s++,e+=x(i,!0)),l++}e+="",h.length>0&&(t+="
    "),t+="",e+=s?a:'

    Everything is normal. No raised alarms.
    ',t+=l?a:"

    No alarms are running in this system.

    ",document.getElementById("alarms_active").innerHTML=e,document.getElementById("alarms_all").innerHTML=t,enableTooltipsAndPopovers(),h.length>0&&w(0);var _=$("#alarms_all_accordion");_.on("show.bs.collapse",(function(e){var t=$(e.target);w($(t).data("alarm-id"))})),_.on("hidden.bs.collapse",(function(e){var t=$(e.target),a=$(t).data("alarm-id");$("#alarm_all_"+a.toString()).html("")})),document.getElementById("alarms_log").innerHTML='

    Alarm Log

    ',loadBootstrapTable((function(){$("#alarms_log_table").bootstrapTable({url:"".concat(_utils_server_detection__WEBPACK_IMPORTED_MODULE_9__.b,"/api/v1/alarm_log?all"),cache:!1,pagination:!0,pageSize:10,showPaginationSwitch:!1,search:!0,searchTimeOut:300,searchAlign:"left",showColumns:!0,showExport:!0,exportDataType:"all",exportOptions:{fileName:"netdata_alarm_log"},onClickRow:function(e){return scrollToChartAfterHidingModal(e.chart,1e3*e.when,e.status),$("#alarmsModal").modal("hide"),!1},rowStyle:function(e){switch(e.status){case"CRITICAL":return{classes:"danger"};case"WARNING":return{classes:"warning"};case"UNDEFINED":return{classes:"info"};case"CLEAR":return{classes:"success"}}return{}},showFooter:!1,showHeader:!0,showRefresh:!0,showToggle:!1,sortable:!0,silentSort:!1,columns:[{field:"when",title:"Event Date",valign:"middle",titleTooltip:"The date and time the even took place",formatter:function(e,t,a){return O(e," ")},align:"center",switchable:!1,sortable:!0},{field:"hostname",title:"Host",valign:"middle",titleTooltip:"The host that generated this event",align:"center",visible:!1,sortable:!0},{field:"unique_id",title:"Unique ID",titleTooltip:"The host unique ID for this event",formatter:function(e,t,a){return y(e)},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"alarm_id",title:"Alarm ID",titleTooltip:"The ID of the alarm that generated this event",formatter:function(e,t,a){return y(e)},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"alarm_event_id",title:"Alarm Event ID",titleTooltip:"The incremental ID of this event for the given alarm",formatter:function(e,t,a){return y(e)},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"chart",title:"Chart",titleTooltip:"The chart the alarm is attached to",align:"center",valign:"middle",switchable:!1,sortable:!0},{field:"family",title:"Family",titleTooltip:"The family of the chart the alarm is attached to",align:"center",valign:"middle",visible:!1,sortable:!0},{field:"name",title:"Alarm",titleTooltip:"The alarm name that generated this event",formatter:function(e,t,a){return e.toString().replace(/_/g," ")},align:"center",valign:"middle",switchable:!1,sortable:!0},{field:"value_string",title:"Friendly Value",titleTooltip:"The value of the alarm, that triggered this event",align:"right",valign:"middle",sortable:!0},{field:"old_value_string",title:"Friendly Old Value",titleTooltip:"The value of the alarm, just before this event",align:"right",valign:"middle",visible:!1,sortable:!0},{field:"old_value",title:"Old Value",titleTooltip:"The value of the alarm, just before this event",formatter:function(e,t,a){return(null!==e?Math.round(100*e)/100:"NaN").toString()},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"value",title:"Value",titleTooltip:"The value of the alarm, that triggered this event",formatter:function(e,t,a){return(null!==e?Math.round(100*e)/100:"NaN").toString()},align:"right",valign:"middle",visible:!1,sortable:!0},{field:"units",title:"Units",titleTooltip:"The units of the value of the alarm",align:"left",valign:"middle",visible:!1,sortable:!0},{field:"old_status",title:"Old Status",titleTooltip:"The status of the alarm, just before this event",align:"center",valign:"middle",visible:!1,sortable:!0},{field:"status",title:"Status",titleTooltip:"The status of the alarm, that was set due to this event",align:"center",valign:"middle",switchable:!1,sortable:!0},{field:"duration",title:"Last Duration",titleTooltip:"The duration the alarm was at its previous state, just before this event",formatter:function(e,t,a){return Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e,{negative_suffix:"",space:" ",now:"no time"})},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"non_clear_duration",title:"Raised Duration",titleTooltip:"The duration the alarm was raised, just before this event",formatter:function(e,t,a){return Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e,{negative_suffix:"",space:" ",now:"no time"})},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"recipient",title:"Recipient",titleTooltip:"The recipient of this event",align:"center",valign:"middle",visible:!1,sortable:!0},{field:"processed",title:"Processed Status",titleTooltip:"True when this event is processed",formatter:function(e,t,a){return!0===e?"DONE":"PENDING"},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"updated",title:"Updated Status",titleTooltip:"True when this event has been updated by another event",formatter:function(e,t,a){return!0===e?"UPDATED":"CURRENT"},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"updated_by_id",title:"Updated By ID",titleTooltip:"The unique ID of the event that obsoleted this one",formatter:function(e,t,a){return y(e)},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"updates_id",title:"Updates ID",titleTooltip:"The unique ID of the event obsoleted because of this event",formatter:function(e,t,a){return y(e)},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"exec",title:"Script",titleTooltip:"The script to handle the event notification",align:"center",valign:"middle",visible:!1,sortable:!0},{field:"exec_run",title:"Script Run At",titleTooltip:"The date and time the script has been ran",formatter:function(e,t,a){return O(e," ")},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"exec_code",title:"Script Return Value",titleTooltip:"The return code of the script",formatter:function(e,t,a){return 0===e?"OK (returned 0)":"FAILED (with code "+e.toString()+")"},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"delay",title:"Script Delay",titleTooltip:"The hysteresis of the notification",formatter:function(e,t,a){return Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e,{negative_suffix:"",space:" ",now:"no time"})},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"delay_up_to_timestamp",title:"Script Delay Run At",titleTooltip:"The date and time the script should be run, after hysteresis",formatter:function(e,t,a){return O(e," ")},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"info",title:"Description",titleTooltip:"A short description of the alarm",align:"center",valign:"middle",visible:!1,sortable:!0},{field:"source",title:"Alarm Source",titleTooltip:"The source of configuration of the alarm",align:"center",valign:"middle",visible:!1,sortable:!0}]})}))}else document.getElementById("alarms_active").innerHTML=document.getElementById("alarms_all").innerHTML=document.getElementById("alarms_log").innerHTML="failed to load alarm data!";function y(e){return 0===e?"-":e.toString()}function O(e,t){if(0===e)return"-";"undefined"===typeof t&&(t=" ");var a=new Date(1e3*e);return a.toLocaleDateString()+t+a.toLocaleTimeString()}function x(e,t){var a=options.data.charts[e.chart];if("undefined"===typeof a&&"undefined"===typeof(a=options.data.charts_by_name[e.chart]))return console.log("Cannot find chart "+e.chart+", you probably need to refresh the page."),"";var n="undefined"!==typeof e.warn||"undefined"!==typeof e.crit,r="".concat(_utils_server_detection__WEBPACK_IMPORTED_MODULE_9__.b,"/api/v1/badge.svg?chart=").concat(e.chart,"&alarm=").concat(e.name,"&refresh=auto"),o="
     
    role: "+e.recipient+'
     
    ',i=''+e.chart+'
     

     
    '+e.info+""+o+''+("undefined"!==typeof e.warn?'":"")+("undefined"!==typeof e.crit?'":"");if(!0===t){var s=a.units;"%"===s&&(s="%"),i+=("undefined"!==typeof e.lookup_after?'":"")+("undefined"!==typeof e.calc?'":"")+(null!==a.green?'":"")+(null!==a.red?'":"")}e.warn_repeat_every>0&&(i+='"),e.crit_repeat_every>0&&(i+='");var l="";return(e.delay_up_duration>0||e.delay_down_duration>0)&&0!==e.delay_multiplier&&e.delay_max_duration>0&&(e.delay_up_duration===e.delay_down_duration?l+="
    hysteresis "+Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e.delay_up_duration,{space:" ",negative_suffix:""}):(l="
    hysteresis ",e.delay_up_duration>0&&(l+="on escalation "+Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e.delay_up_duration,{space:" ",negative_suffix:""})+", "),e.delay_down_duration>0&&(l+="on recovery "+Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e.delay_down_duration,{space:" ",negative_suffix:""})+", ")),1!==e.delay_multiplier&&(l+="multiplied by "+e.delay_multiplier.toString()+"",l+=", up to "+Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e.delay_max_duration,{space:" ",negative_suffix:""})+""),l+="
    "),i+='
    "+(!0===n?'":"")+'
    warning when'+e.warn+"
    critical when'+e.crit+"
    db lookup'+function(e,t){var a=" of all values ";return t.dimensions.length>1&&(a=" of the sum of all dimensions "),"undefined"!==typeof e.lookup_dimensions&&(a=e.lookup_dimensions.replace(/|/g,",").split(",").length>1?"of the sum of dimensions "+e.lookup_dimensions+" ":"of all values of dimension "+e.lookup_dimensions+" "),""+e.lookup_method+" "+a+", of chart "+e.chart+", starting "+Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e.lookup_after+e.lookup_before,{space:" "})+" and up to "+Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e.lookup_before,{space:" "})+""+(e.lookup_options?", with options "+e.lookup_options.replace(/ /g,", ")+"":"")+"."}(e,a)+"
    calculation'+e.calc+"
    green threshold'+a.green+" "+s+"
    red threshold'+a.red+" "+s+"
    repeat warning'+Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e.warn_repeat_every)+"
    repeat critical'+Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e.crit_repeat_every)+"
    check every'+Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e.update_every,{space:" ",negative_suffix:""})+"
    execute'+e.exec+""+l+"
    source'+e.source+"
    "}function w(e){for(var t='',a=options.alarm_families[e],n=a.arr.length;n--;){t+=x(a.arr[n],!0)}t+="
    ",$("#alarm_all_"+e.toString()).html(t),enableTooltipsAndPopovers()}},serverDefault:_utils_server_detection__WEBPACK_IMPORTED_MODULE_9__.b}))}function initializeDynamicDashboardWithData(e){if(null!==e){options.hostname=e.hostname,options.data=e,options.version=e.version,options.release_channel=e.release_channel,options.timezone=e.timezone,netdataDashboard.os=e.os,"undefined"!==typeof e.hosts&&(options.hosts=e.hosts),document.getElementById("netdataVersion").innerHTML=options.version,document.title=options.hostname+" netdata dashboard",e.charts_by_name={};var t,a=e.charts;for(t in a)if(a.hasOwnProperty(t)){var n=a[t];e.charts_by_name[n.name]=n}renderChartsAndMenu(e)}}window.clipboardCopy=function(e){clipboard.writeText(e)},window.clipboardCopyBadgeEmbed=function(e){clipboard.writeText('')};var initializeConfig={url:null,custom_info:!0},loadDashboardInfo=Object(ramda__WEBPACK_IMPORTED_MODULE_0__.a)(ramda__WEBPACK_IMPORTED_MODULE_1__.a,(function(){return $.ajax({url:"".concat(_utils_server_detection__WEBPACK_IMPORTED_MODULE_9__.b,"dashboard_info.js"),cache:!0,dataType:"script",xhrFields:{withCredentials:!0}}).fail((function(){alert("Cannot load required JS library: dashboard_info.js")}))}));function loadCustomDashboardInfo(e,t){$.ajax({url:e,cache:!0,dataType:"script",xhrFields:{withCredentials:!0}}).fail((function(){alert("Cannot load required JS library: ".concat(e))})).always((function(){$.extend(!0,netdataDashboard,customDashboard),t()}))}function initializeChartsAndCustomInfo(){loadDashboardInfo().then((function(){NETDATA.chartRegistry.downloadAll(initializeConfig.url,(function(e){null!==e&&(reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.c)({data:e})),!0===initializeConfig.custom_info&&"undefined"!==typeof e.custom_info&&""!==e.custom_info&&null===window.netdataSnapshotData?loadCustomDashboardInfo(_utils_server_detection__WEBPACK_IMPORTED_MODULE_9__.b+e.custom_info,(function(){initializeDynamicDashboardWithData(e)})):initializeDynamicDashboardWithData(e))}))}))}function initializeDynamicDashboard(e){e&&(reduxStore=e,netdataPrepCallback(),initializeConfig.url=_utils_server_detection__WEBPACK_IMPORTED_MODULE_9__.b),"undefined"!==typeof netdataCheckXSS&&!0===netdataCheckXSS?(document.getElementById("netdataXssModalServer").innerText=initializeConfig.url,$("#xssModal").modal("show")):initializeChartsAndCustomInfo()}function versionLog(e){document.getElementById("versionCheckLog").innerHTML=e}function versionsMatch(e,t){if(e==t)return!0;var a=e.split("."),n=t.split("."),r=parseInt(a[0].substring(1,2),10),o=parseInt(n[0].substring(1,2),10);return!(ro||!((r=parseInt(a[1],10))<(o=parseInt(n[1],10)))&&(r>o||(a=a[2].split("-"),n=n[2].split("-"),!((r=parseInt(a[0],10))<(o=parseInt(n[0],10)))&&(r>o||!((r=a.length>1?parseInt(a[1],10):0)<(o=n.length>1?parseInt(n[1],10):0))))))}function getGithubLatestVersion(e){versionLog("Downloading latest version id from github..."),$.ajax({url:"https://api.github.com/repos/netdata/netdata/releases/latest",async:!0,cache:!1}).done((function(t){versionLog("Latest stable version from github is "+(t=t.tag_name.replace(/(\r\n|\n|\r| |\t)/gm,""))),e(t)})).fail((function(){versionLog("Failed to download the latest stable version id from github!"),e(null)}))}function getGCSLatestVersion(e){versionLog("Downloading latest version id from GCS..."),$.ajax({url:"https://www.googleapis.com/storage/v1/b/netdata-nightlies/o/latest-version.txt",async:!0,cache:!1}).done((function(t){$.ajax({url:t.mediaLink,async:!0,cache:!1}).done((function(t){versionLog("Latest nightly version from GCS is "+(t=t.replace(/(\r\n|\n|\r| |\t)/gm,""))),e(t)})).fail((function(t,a,n){versionLog("Failed to download the latest nightly version id from GCS!"),e(null)}))})).fail((function(t,a,n){versionLog("Failed to download the latest nightly version from GCS!"),e(null)}))}function checkForUpdateByVersion(e,t){return"stable"===options.release_channel?getGithubLatestVersion((function(e){t(options.version,e)})):getGCSLatestVersion((function(e){t(options.version,e)})),null}function showPageFooter(){document.getElementById("footer").style.display="block"}function printPage(){window.NETDATA.parseDom(),!0===urlOptions.pan_and_zoom&&reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.s)({after:urlOptions.after,before:urlOptions.before})),showPageFooter()}function jsonStringifyFn(e){return JSON.stringify(e,(function(e,t){return"function"===typeof t?t.toString():t}))}function jsonParseFn(str){return JSON.parse(str,(function(key,value){return"string"!=typeof value?value:"function"==value.substring(0,8)?eval("("+value+")"):value}))}window.xssModalDisableXss=function(){return NETDATA.xss.enabled=!1,NETDATA.xss.enabled_for_data=!1,initializeConfig.custom_info=!0,initializeChartsAndCustomInfo(),!1},window.xssModalKeepXss=function(){return NETDATA.xss.enabled=!0,NETDATA.xss.enabled_for_data=!0,initializeConfig.custom_info=!1,initializeChartsAndCustomInfo(),!1},window.notifyForUpdate=function(e){versionLog("

    checking for updates...

    ");var t=Date.now();if("undefined"===typeof e||!0!==e){var a=loadLocalStorage("last_update_check");if(a="string"===typeof a?parseInt(a):0,t-a<288e5)return}checkForUpdateByVersion(e,(function(e,a){var n=!1;if(null===e)n=!1,versionLog('

    Failed to get your netdata version!

    You can always get the latest netdata from its github page.

    ');else if(null===a)n=!1,versionLog('

    Failed to get the latest netdata version.

    You can always get the latest netdata from its github page.

    ');else if(versionsMatch(e,a))n=!0,versionLog('

    You already have the latest netdata!

    No update yet?
    We probably need some motivation to keep going on!

    If you haven\'t already, give netdata a at its github page.

    ');else{n=!0;versionLog("

    New version of netdata available!

    Latest version: "+a+'

    Click here for the changes log and
    click here for directions on updating your netdata installation.

    We suggest to review the changes log for new features you may be interested, or important bug fixes you may need.
    Keeping your netdata updated is generally a good idea.

    ')}n&&saveLocalStorage("last_update_check",t.toString())}))},window.printPreflight=function(){var e=document.location.origin.toString()+document.location.pathname.toString()+document.location.search.toString()+urlOptions.genHash()+";mode=print",t=90*screen.height/100;window.open(e,"","width="+990..toString()+",height="+t.toString()+",menubar=no,toolbar=no,personalbar=no,location=no,resizable=no,scrollbars=yes,status=no,chrome=yes,centerscreen=yes,attention=yes,dialog=yes"),$("#printPreflightModal").modal("hide")};var snapshotOptions={bytes_per_chart:2048,compressionDefault:"pako.deflate.base64",compressions:{none:{bytes_per_point_memory:5.2,bytes_per_point_disk:5.6,compress:function(e){return e},compressed_length:function(e){return e.length},uncompress:function(e){return e}},"pako.deflate.base64":{bytes_per_point_memory:1.8,bytes_per_point_disk:1.9,compress:function(e){return btoa(pako.deflate(e,{to:"string"}))},compressed_length:function(e){return e.length},uncompress:function(e){return pako.inflate(atob(e),{to:"string"})}},"pako.deflate":{bytes_per_point_memory:1.4,bytes_per_point_disk:3.2,compress:function(e){return pako.deflate(e,{to:"string"})},compressed_length:function(e){return e.length},uncompress:function(e){return pako.inflate(e,{to:"string"})}},"lzstring.utf16":{bytes_per_point_memory:1.7,bytes_per_point_disk:2.6,compress:function(e){return LZString.compressToUTF16(e)},compressed_length:function(e){return 2*e.length},uncompress:function(e){return LZString.decompressFromUTF16(e)}},"lzstring.base64":{bytes_per_point_memory:2.1,bytes_per_point_disk:2.3,compress:function(e){return LZString.compressToBase64(e)},compressed_length:function(e){return e.length},uncompress:function(e){return LZString.decompressFromBase64(e)}},"lzstring.uri":{bytes_per_point_memory:2.1,bytes_per_point_disk:2.3,compress:function(e){return LZString.compressToEncodedURIComponent(e)},compressed_length:function(e){return e.length},uncompress:function(e){return LZString.decompressFromEncodedURIComponent(e)}}}};function loadSnapshotModalLog(e,t){document.getElementById("loadSnapshotStatus").className="alert alert-"+e,document.getElementById("loadSnapshotStatus").innerHTML=t}var tmpSnapshotData=null;function loadSnapshotPreflightFile(e){var t=NETDATA.xss.string(e.name),a=new FileReader;a.onload=function(e){document.getElementById("loadSnapshotFilename").innerHTML=t;var a=null;try{a=NETDATA.xss.checkAlways("snapshot",JSON.parse(e.target.result),/^(snapshot\.info|snapshot\.data)$/);var n=new Date(a.after_ms),r=new Date(a.before_ms);"undefined"===typeof a.charts_ok&&(a.charts_ok="unknown"),"undefined"===typeof a.charts_failed&&(a.charts_failed=0),"undefined"===typeof a.compression&&(a.compression="none"),"undefined"===typeof a.data_size&&(a.data_size=0),document.getElementById("loadSnapshotFilename").innerHTML=""+t+"",document.getElementById("loadSnapshotHostname").innerHTML=""+a.hostname+", netdata version: "+a.netdata_version.toString()+"",document.getElementById("loadSnapshotURL").innerHTML=a.url,document.getElementById("loadSnapshotCharts").innerHTML=a.charts.charts_count.toString()+" charts, "+a.charts.dimensions_count.toString()+" dimensions, "+a.data_points.toString()+" points per dimension, "+Math.round(a.duration_ms/a.data_points).toString()+" ms per point",document.getElementById("loadSnapshotInfo").innerHTML="version: "+a.snapshot_version.toString()+", includes "+a.charts_ok.toString()+" unique chart data queries "+(a.charts_failed>0?""+a.charts_failed.toString()+" failed":"").toString()+", compressed with "+a.compression.toString()+", data size "+(Math.round(100*a.data_size/1024/1024)/100).toString()+" MB",document.getElementById("loadSnapshotTimeRange").innerHTML=""+localeDateString(n)+" "+localeTimeString(n)+" to "+localeDateString(r)+" "+localeTimeString(r)+"",document.getElementById("loadSnapshotComments").innerHTML=(a.comments?a.comments:"").toString(),loadSnapshotModalLog("success","File loaded, click Import to render it!"),$("#loadSnapshotImport").removeClass("disabled"),tmpSnapshotData=a}catch(e){console.log(e),document.getElementById("loadSnapshotStatus").className="alert alert-danger",document.getElementById("loadSnapshotStatus").innerHTML="Failed to parse this file!",$("#loadSnapshotImport").addClass("disabled")}},a.readAsText(e)}function loadSnapshotPreflightEmpty(){document.getElementById("loadSnapshotFilename").innerHTML="",document.getElementById("loadSnapshotHostname").innerHTML="",document.getElementById("loadSnapshotURL").innerHTML="",document.getElementById("loadSnapshotCharts").innerHTML="",document.getElementById("loadSnapshotInfo").innerHTML="",document.getElementById("loadSnapshotTimeRange").innerHTML="",document.getElementById("loadSnapshotComments").innerHTML="",loadSnapshotModalLog("success","Browse for a snapshot file (or drag it and drop it here), then click Import to render it."),$("#loadSnapshotImport").addClass("disabled")}window.loadSnapshot=function(){if($("#loadSnapshotImport").addClass("disabled"),null===tmpSnapshotData)return loadSnapshotPreflightEmpty(),void loadSnapshotModalLog("danger","no data have been loaded");loadPako((function(){loadLzString((function(){if(loadSnapshotModalLog("info","Please wait, activating snapshot..."),$("#loadSnapshotModal").modal("hide"),netdataShowAlarms=!1,netdataRegistry=!1,netdataServer=tmpSnapshotData.server,document.getElementById("charts_div").innerHTML="",document.getElementById("sidebar").innerHTML="","undefined"!==typeof tmpSnapshotData.hash?urlOptions.hash=tmpSnapshotData.hash:urlOptions.hash="#","undefined"!==typeof tmpSnapshotData.info){var e=jsonParseFn(tmpSnapshotData.info);"undefined"!==typeof e.menu&&(netdataDashboard.menu=e.menu),"undefined"!==typeof e.submenu&&(netdataDashboard.submenu=e.submenu),"undefined"!==typeof e.context&&(netdataDashboard.context=e.context)}"string"!==typeof tmpSnapshotData.compression&&(tmpSnapshotData.compression="none"),"undefined"===typeof snapshotOptions.compressions[tmpSnapshotData.compression]&&(alert("unknown compression method: "+tmpSnapshotData.compression),tmpSnapshotData.compression="none"),tmpSnapshotData.uncompress=snapshotOptions.compressions[tmpSnapshotData.compression].uncompress,window.NETDATA.parseDom(),reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.g)({snapshot:tmpSnapshotData})),window.netdataSnapshotData=tmpSnapshotData,urlOptions.after=tmpSnapshotData.after_ms,urlOptions.before=tmpSnapshotData.before_ms,"undefined"!==typeof tmpSnapshotData.highlight_after_ms&&null!==tmpSnapshotData.highlight_after_ms&&tmpSnapshotData.highlight_after_ms>0&&"undefined"!==typeof tmpSnapshotData.highlight_before_ms&&null!==tmpSnapshotData.highlight_before_ms&&tmpSnapshotData.highlight_before_ms>0?(urlOptions.highlight_after=tmpSnapshotData.highlight_after_ms,urlOptions.highlight_before=tmpSnapshotData.highlight_before_ms,urlOptions.highlight=!0):(urlOptions.highlight_after=0,urlOptions.highlight_before=0,urlOptions.highlight=!1),netdataCheckXSS=!1,NETDATA.xss.enabled=!0,NETDATA.xss.enabled_for_data=!0,loadSnapshotPreflightEmpty(),initializeDynamicDashboard()}))}))};var loadSnapshotDragAndDropInitialized=!1;function loadSnapshotDragAndDropSetup(){!1===loadSnapshotDragAndDropInitialized&&(loadSnapshotDragAndDropInitialized=!0,$("#loadSnapshotDragAndDrop").on("drag dragstart dragend dragover dragenter dragleave drop",(function(e){e.preventDefault(),e.stopPropagation()})).on("drop",(function(e){e.originalEvent.dataTransfer.files.length?loadSnapshotPreflightFile(e.originalEvent.dataTransfer.files.item(0)):(loadSnapshotPreflightEmpty(),loadSnapshotModalLog("danger","No file selected"))})))}window.loadSnapshotPreflight=function(){var e=document.getElementById("loadSnapshotSelectFiles").files;if(!e.length)return loadSnapshotPreflightEmpty(),void loadSnapshotModalLog("danger","No file selected");loadSnapshotModalLog("info","Loading file..."),loadSnapshotPreflightFile(e.item(0))};var saveSnapshotStop=!1;function saveSnapshotCancel(){reduxStore.dispatch(Object(_domains_dashboard_actions__WEBPACK_IMPORTED_MODULE_6__.f)()),saveSnapshotStop=!0}var saveSnapshotModalInitialized=!1;function saveSnapshotModalSetup(){!1===saveSnapshotModalInitialized&&(saveSnapshotModalInitialized=!0,$("#saveSnapshotModal").on("hide.bs.modal",saveSnapshotCancel).on("show.bs.modal",saveSnapshotModalInit).on("shown.bs.modal",(function(){$("#saveSnapshotResolutionSlider").find(".slider-handle:first").attr("tabindex",1),document.getElementById("saveSnapshotComments").focus()})))}function saveSnapshotModalLog(e,t){document.getElementById("saveSnapshotStatus").className="alert alert-"+e,document.getElementById("saveSnapshotStatus").innerHTML=t}function saveSnapshotModalShowExpectedSize(){var e=Math.round(saveSnapshotViewDuration/saveSnapshotSelectedSecondsPerPoint),t="info",a="A moderate snapshot.",n=Math.round(10*(options.data.charts_count*snapshotOptions.bytes_per_chart+options.data.dimensions_count*e*snapshotOptions.compressions[saveSnapshotCompression].bytes_per_point_disk)/1024/1024)/10,r=Math.round(10*(options.data.charts_count*snapshotOptions.bytes_per_chart+options.data.dimensions_count*e*snapshotOptions.compressions[saveSnapshotCompression].bytes_per_point_memory)/1024/1024)/10;n<10&&(t="success",a="A nice small snapshot!"),n>50&&(t="warning",a="Will stress your browser..."),n>100&&(t="danger",a="Hm... good luck..."),saveSnapshotModalLog(t,"The snapshot will have "+e.toString()+" points per dimension. Expected size on disk "+n+" MB, at browser memory "+r+" MB.
    "+a)}var saveSnapshotCompression=snapshotOptions.compressionDefault;function saveSnapshotSetCompression(e){saveSnapshotCompression=e,document.getElementById("saveSnapshotCompressionName").innerHTML=saveSnapshotCompression,saveSnapshotModalShowExpectedSize()}var saveSnapshotSlider=null,saveSnapshotSelectedSecondsPerPoint=1,saveSnapshotViewDuration=1,browser_timezone;function saveSnapshotModalInit(){$("#saveSnapshotModalProgressSection").hide(),$("#saveSnapshotResolutionRadio").show(),saveSnapshotModalLog("info","Select resolution and click Save"),$("#saveSnapshotExport").removeClass("disabled"),loadBootstrapSlider((function(){var e=reduxStore.getState();saveSnapshotViewDuration=-Object(_domains_global_selectors__WEBPACK_IMPORTED_MODULE_3__.i)(e);var t=Math.round(Date.now()-1e3*saveSnapshotViewDuration),a=Object(_domains_global_selectors__WEBPACK_IMPORTED_MODULE_3__.m)(e);Boolean(a)&&(saveSnapshotViewDuration=Math.round((a.before-a.after)/1e3),t=a.after);var n=new Date(t),r=n.getFullYear()+Object(_utils_units_conversion__WEBPACK_IMPORTED_MODULE_5__.b)(n.getMonth()+1)+Object(_utils_units_conversion__WEBPACK_IMPORTED_MODULE_5__.b)(n.getDate())+"-"+Object(_utils_units_conversion__WEBPACK_IMPORTED_MODULE_5__.b)(n.getHours())+Object(_utils_units_conversion__WEBPACK_IMPORTED_MODULE_5__.b)(n.getMinutes())+Object(_utils_units_conversion__WEBPACK_IMPORTED_MODULE_5__.b)(n.getSeconds());document.getElementById("saveSnapshotFilename").value="netdata-"+options.hostname.toString()+"-"+r.toString()+"-"+saveSnapshotViewDuration.toString()+".snapshot",saveSnapshotSetCompression(saveSnapshotCompression);var o=options.update_every,i=Math.round(saveSnapshotViewDuration/100);Boolean(a)&&(i=Math.round(saveSnapshotViewDuration/50));var s=Math.round(saveSnapshotViewDuration/Math.round($(document.getElementById("charts_div")).width()/2));i<10&&(i=10),ii&&(s=i),null!==saveSnapshotSlider&&saveSnapshotSlider.destroy(),saveSnapshotSlider=new Slider("#saveSnapshotResolutionSlider",{ticks:[o,s,i],min:o,max:i,step:options.update_every,value:s,scale:i>100?"logarithmic":"linear",tooltip:"always",formatter:function(e){e<1&&(e=1),e"+e.toString()+"");var t=document.getElementById("saveSnapshotModalProgressBar"),a=document.getElementById("saveSnapshotModalProgressBarText");options.data.charts_by_name=null;var n=reduxStore.getState(),r=Object(_domains_global_selectors__WEBPACK_IMPORTED_MODULE_3__.i)(n),o={hostname:options.hostname,server:_utils_server_detection__WEBPACK_IMPORTED_MODULE_9__.b,netdata_version:options.data.version,snapshot_version:1,after_ms:Date.now()+1e3*r,before_ms:Date.now(),highlight_after_ms:urlOptions.highlight_after,highlight_before_ms:urlOptions.highlight_before,duration_ms:1e3*options.duration,update_every_ms:1e3*options.update_every,data_points:0,url:(null!==urlOptions.server?urlOptions.server:document.location.origin.toString()+document.location.pathname.toString()+document.location.search.toString()).toString(),comments:document.getElementById("saveSnapshotComments").value.toString(),hash:urlOptions.hash,charts:options.data,info:jsonStringifyFn({menu:netdataDashboard.menu,submenu:netdataDashboard.submenu,context:netdataDashboard.context}),charts_ok:0,charts_failed:0,compression:saveSnapshotCompression,data_size:0,data:{}};"undefined"===typeof snapshotOptions.compressions[o.compression]&&(alert("unknown compression method: "+o.compression),o.compression="none");var i=snapshotOptions.compressions[o.compression].compress,s=snapshotOptions.compressions[o.compression].compressed_length;function l(e){var t=e.data,a=e.chartDataUniqueID;if(null===t)return 0;var n=JSON.stringify(t),r=i(n);return o.data[a]=r,s(r)}var c=Object(_domains_global_selectors__WEBPACK_IMPORTED_MODULE_3__.m)(n),u=!1;c?(o.after_ms=c.after,o.before_ms=c.before):(reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.s)({after:o.after_ms,before:o.before_ms})),u=!0),o.duration_ms=o.before_ms-o.after_ms,o.data_points=Math.round((o.before_ms-o.after_ms)/(1e3*saveSnapshotSelectedSecondsPerPoint)),saveSnapshotModalLog("info","Generating snapshot with "+o.data_points.toString()+" data points per dimension..."),reduxStore.dispatch(Object(_domains_dashboard_actions__WEBPACK_IMPORTED_MODULE_6__.e)({charts:o.charts,dataPoints:o.data_points})),window.saveSnapshotRestore=function(){$("#saveSnapshotModal").modal("hide"),$(t).css("width","0%").attr("aria-valuenow",0),a.innerText="0%",reduxStore.dispatch(Object(_domains_dashboard_actions__WEBPACK_IMPORTED_MODULE_6__.f)()),reduxStore.dispatch(Object(_domains_chart_actions__WEBPACK_IMPORTED_MODULE_7__.j)()),u&&reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.j)()),$("#saveSnapshotExport").removeClass("disabled")};var d=0,h=" Resolution: "+saveSnapshotSelectedSecondsPerPoint.toString()+(1===saveSnapshotSelectedSecondsPerPoint?" second ":" seconds ").toString()+"per point.";window.chartUpdated=function(n){var r=n.chart,i=n.chartDataUniqueID,s=n.data;!0===saveSnapshotStop&&(saveSnapshotModalLog("info","Cancelled!"),saveSnapshotRestore());var c=reduxStore.getState(),u=Object(_domains_chart_selectors__WEBPACK_IMPORTED_MODULE_8__.b)(c),p=Object(_domains_chart_selectors__WEBPACK_IMPORTED_MODULE_8__.e)(c),f=Object(_domains_chart_selectors__WEBPACK_IMPORTED_MODULE_8__.d)(c),g=(p+f)/u*100;$(t).css("width",g+"%").attr("aria-valuenow",g),a.innerText=Math.round(g).toString()+"%, "+(r||s.id),d+=l({data:s,chartDataUniqueID:i}),saveSnapshotModalLog(f?"danger":"info","Generated snapshot data size "+(Math.round(100*d/1024/1024)/100).toString()+" MB. "+(f?f.toString()+" charts have failed to be downloaded":"").toString()+h),window.saveData=o,p+f===u&&(o.charts_ok=p,o.charts_failed=f,o.data_size=d,saveObjectToClient(o,e),f>0&&alert("".concat(f," failed to be downloaded")),saveSnapshotRestore(),o=null)}}))}))};try{browser_timezone=Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){console.log("failed to detect browser timezone: "+e.toString()),browser_timezone="cannot-detect-it"}var getOption=function(e){var t=reduxStore.getState();return Object(_domains_global_selectors__WEBPACK_IMPORTED_MODULE_3__.b)(e)(t)};function dashboardSettingsSetup(){var e=function(){var e=function(e){var t=$("#"+e);t.prop("checked")!==getOption(e)&&t.bootstrapToggle(getOption(e)?"on":"off")};e("stop_updates_when_focus_is_lost"),e("eliminate_zero_dimensions"),e("destroy_on_hide"),e("async_on_scroll"),e("parallel_refresher"),e("concurrent_refreshes"),e("sync_selection"),e("legend_right"),$("#"+"netdata_theme_control").bootstrapToggle("slate"===netdataTheme?"on":"off"),e("show_help"),e("pan_and_zoom_data_padding"),e("smooth_plot"),function(e){var t=$("#"+e);t.prop("checked")!==("auto"===getOption("units"))&&t.bootstrapToggle("auto"===getOption("units")?"on":"off"),!0===t.prop("checked")?($("#settingsLocaleTempRow").show(),$("#settingsLocaleTimeRow").show()):($("#settingsLocaleTempRow").hide(),$("#settingsLocaleTimeRow").hide())}("units_conversion"),function(e){var t=$("#"+e);t.prop("checked")!==("celsius"===getOption("temperature"))&&t.bootstrapToggle("celsius"===getOption("temperature")?"on":"off")}("units_temp"),e("seconds_as_time"),!1===getOption("parallel_refresher")?$("#concurrent_refreshes_row").hide():$("#concurrent_refreshes_row").show()};e(),$("#eliminate_zero_dimensions").change((function(){setOption("eliminate_zero_dimensions",$(this).prop("checked"))})),$("#destroy_on_hide").change((function(){setOption("destroy_on_hide",$(this).prop("checked"))})),$("#async_on_scroll").change((function(){setOption("async_on_scroll",$(this).prop("checked"))})),$("#parallel_refresher").change((function(){setOption("parallel_refresher",$(this).prop("checked"))})),$("#concurrent_refreshes").change((function(){setOption("concurrent_refreshes",$(this).prop("checked"))})),$("#sync_selection").change((function(){setOption("sync_selection",$(this).prop("checked")),netdataReload()})),$("#stop_updates_when_focus_is_lost").change((function(){urlOptions.update_always=!$(this).prop("checked"),urlOptions.hashUpdate(),setOption("stop_updates_when_focus_is_lost",!urlOptions.update_always)})),$("#smooth_plot").change((function(){setOption("smooth_plot",$(this).prop("checked"))})),$("#pan_and_zoom_data_padding").change((function(){setOption("pan_and_zoom_data_padding",$(this).prop("checked"))})),$("#seconds_as_time").change((function(){setOption("seconds_as_time",$(this).prop("checked"))})),$("#units_conversion").change((function(){setOption("units",$(this).prop("checked")?"auto":"original"),e()})),$("#units_temp").change((function(){setOption("temperature",$(this).prop("checked")?"celsius":"fahrenheit")})),$("#legend_right").change((function(){setOption("legend_right",$(this).prop("checked")),netdataReload()})),$("#show_help").change((function(){urlOptions.help=$(this).prop("checked"),urlOptions.hashUpdate(),setOption("show_help",urlOptions.help),netdataReload()})),$("#netdata_theme_control").change((function(){urlOptions.theme=$(this).prop("checked")?"slate":"white",urlOptions.hashUpdate(),setTheme(urlOptions.theme)&&netdataReload()}))}var CHART_DIV_ID_PREFIX="chart_",CHART_DIV_OFFSET=-50;function scrollDashboardTo(){if(null!==window.netdataSnapshotData&&"undefined"!==typeof window.netdataSnapshotData.hash)scrollToId(window.netdataSnapshotData.hash.replace("#",""));else if(scrollToId(urlOptions.hash.replace("#","")),null!==urlOptions.chart){var e=document.getElementById("".concat(CHART_DIV_ID_PREFIX).concat(Object(_utils_name_2_id__WEBPACK_IMPORTED_MODULE_10__.a)(urlOptions.chart)));if(e){var t=e.offsetTop+CHART_DIV_OFFSET;document.querySelector("html").scrollTop=t}}}var modalHiddenCallback=null;function enableTooltipsAndPopovers(){$('[data-toggle="tooltip"]').tooltip({animated:"fade",trigger:"hover",html:!0,delay:{show:500,hide:0},container:"body"}),$('[data-toggle="popover"]').popover()}window.scrollToChartAfterHidingModal=function(e,t,a){modalHiddenCallback=function(){if("string"===typeof e){var n=document.getElementById("".concat(CHART_DIV_ID_PREFIX).concat(Object(_utils_name_2_id__WEBPACK_IMPORTED_MODULE_10__.a)(e)));if(n){var r=n.offsetTop+CHART_DIV_OFFSET;document.querySelector("html").scrollTop=r}}if(["WARNING","CRITICAL"].includes(a)){reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.s)({after:t-12e4,before:t+12e4}))}}};var runOnceOnDashboardLastRun=0;function runOnceOnDashboardWithjQuery(){if(0!==runOnceOnDashboardLastRun)return scrollDashboardTo(),$(document.body).scrollspy("refresh"),void $(document.body).scrollspy("process");runOnceOnDashboardLastRun=Date.now();var e=0,t=0,a=!1,n=!1,r=$(window).height()/3;$(".modal").on("show.bs.modal",(function(){0===t&&(e=window.scrollY,$("body").css({overflow:"hidden",position:"fixed",top:-e}),a=!0,null===NETDATA.options.pauseCallback?(NETDATA.pause((function(){})),n=!0):n=!1),t++})).on("hide.bs.modal",(function(){--t<=0&&(t=0,$("body").css({overflow:"",position:"",top:""}),$("html, body").animate({scrollTop:e},0),!0===n&&(NETDATA.unpause(),n=!1),$(document.body).scrollspy("process"))})).on("hidden.bs.modal",(function(){0===t&&(a=!1),"function"===typeof modalHiddenCallback&&modalHiddenCallback(),modalHiddenCallback=null})),$("#sidebar").affix({offset:{top:0,bottom:0}}).on("affixed.bs.affix",(function(){$(this).removeAttr("style")})).on("affix-top.bs.affix",(function(){if(a)return!1})).on("activate.bs.scrollspy",(function(e){if(!1===a){var t=$(e.target).find("a").attr("href");"string"===typeof t&&"#"===t.substring(0,1)&&!1===urlOptions.hash.startsWith(t+"_submenu_")&&(urlOptions.hash=t,urlOptions.hashUpdate())}})),Ps.initialize(document.getElementById("sidebar"),{wheelSpeed:.5,wheelPropagation:!0,swipePropagation:!0,minScrollbarLength:null,maxScrollbarLength:null,useBothWheelAxes:!1,suppressScrollX:!0,suppressScrollY:!1,scrollXMarginOffset:0,scrollYMarginOffset:0,theme:"default"}),r>250&&(r=250),r<75&&(r=75),document.body.setAttribute("data-offset",r),scrollDashboardTo(),$(document.body).scrollspy({target:"#sidebar",offset:r}),$("#deleteRegistryModal").on("hidden.bs.modal",(function(){deleteRegistryGuid=null})),$("#updateModal").on("show.bs.modal",(function(){versionLog("checking, please wait...")})).on("shown.bs.modal",(function(){notifyForUpdate(!0)})),$("#alarmsModal").on("shown.bs.modal",(function(){alarmsUpdateModal()})).on("hidden.bs.modal",(function(){document.getElementById("alarms_active").innerHTML=document.getElementById("alarms_all").innerHTML=document.getElementById("alarms_log").innerHTML="loading..."})),dashboardSettingsSetup(),loadSnapshotDragAndDropSetup(),saveSnapshotModalSetup(),showPageFooter(),$.fn.shorten=function(e){var t={showChars:750,minHideChars:10,ellipsesText:"...",moreText:' show more information',lessText:' show less information',onLess:function(){NETDATA.onscroll()},onMore:function(){NETDATA.onscroll()},errMsg:null,force:!1};return e&&$.extend(t,e),!($(this).data("jquery.shorten")&&!t.force)&&($(this).data("jquery.shorten",!0),$(document).off("click",".morelink"),$(document).on({click:function(){var e=$(this);return e.hasClass("less")?(e.removeClass("less"),e.html(t.moreText),e.parent().prev().animate({height:"0%"},0,(function(){e.parent().prev().prev().show()})).hide(0,(function(){t.onLess()}))):(e.addClass("less"),e.html(t.lessText),e.parent().prev().animate({height:"100%"},0,(function(){e.parent().prev().prev().hide()})).show(0,(function(){t.onMore()}))),!1}},".morelink"),this.each((function(){var e=$(this),a=e.html();if(e.text().length>t.showChars+t.minHideChars){var n=a.substr(0,t.showChars);if(n.indexOf("<")>=0){for(var r=!1,o="",i=0,s=[],l=null,c=0,u=0;u<=t.showChars;c++)if("<"!==a[c]||r||(r=!0,"/"===(l=a.substring(c+1,a.indexOf(">",c)))[0]?l!=="/"+s[0]?t.errMsg="ERROR en HTML: the top of the stack should be the tag that closes":s.shift():"br"!==l.toLowerCase()&&s.unshift(l)),r&&">"===a[c]&&(r=!1),r)o+=a.charAt(c);else if(u++,i<=t.showChars)o+=a.charAt(c),i++;else if(s.length>0){for(var d=0;d";break}n=$("
    ").html(o+''+t.ellipsesText+"").html()}else n+=t.ellipsesText;var h='
    '+n+'
    '+a+'
    '+t.moreText+"";e.html(h),e.find(".allcontent").hide(),$(".shortcontent p:last",e).css("margin-bottom",0)}})))}}function finalizePage(){urlOptions.after<0?reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.q)({after:urlOptions.after})):!0===urlOptions.pan_and_zoom&&reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.s)({after:urlOptions.after,before:urlOptions.before})),NETDATA.parseDom(),NETDATA.unpause(),runOnceOnDashboardWithjQuery(),$(".shorten").shorten(),enableTooltipsAndPopovers(),_utils_is_demo__WEBPACK_IMPORTED_MODULE_14__.a?(NETDATA.options.current.retries_on_data_failures=60,setTimeout((function(){var e,t,a,n,r,o;e=window,t=document,a="script",n="ga",e.GoogleAnalyticsObject=n,e.ga=e.ga||function(){(e.ga.q=e.ga.q||[]).push(arguments)},e.ga.l=1*new Date,r=t.createElement(a),o=t.getElementsByTagName(a)[0],r.async=1,r.src="https://www.google-analytics.com/analytics.js",o.parentNode.insertBefore(r,o),ga("create","UA-64295674-3","auto"),ga("send","pageview","/demosite/"+window.location.host)}),2e3)):notifyForUpdate(),!0===urlOptions.show_alarms&&setTimeout((function(){$("#alarmsModal").modal("show")}),1e3),NETDATA.onresizeCallback=function(){Ps.update(document.getElementById("sidebar"))},NETDATA.onresizeCallback(),null!==window.netdataSnapshotData&&reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.s)({after:window.netdataSnapshotData.after_ms,before:window.netdataSnapshotData.before_ms}))}window.resetDashboardOptions=function(){reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.l)()),urlOptions.update_always=!1,urlOptions.help=!1,urlOptions.theme="slate",urlOptions.hashUpdate(),netdataReload()};var netdataPrepCallback=function(){_utils_is_demo__WEBPACK_IMPORTED_MODULE_14__.a?document.getElementById("masthead").style.display="block":!0===urlOptions.update_always&&setOption("stop_updates_when_focus_is_lost",!urlOptions.update_always)};window.selected_server_timezone=function(e,t){if(document.getElementById("timezone_error_message").innerHTML="","undefined"===typeof t)setOption("user_set_server_timezone",e),Object(_utils_date_time__WEBPACK_IMPORTED_MODULE_11__.a)(e)?($("#local_timezone").prop("checked")&&$("#local_timezone").bootstrapToggle("off"),setOption("timezone",e)):(setOption("timezone","default"),$("#local_timezone").prop("checked")||$("#local_timezone").bootstrapToggle("on"),document.getElementById("timezone_error_message").innerHTML="Ooops! That timezone was not accepted by your browser. Please open a github issue to help us fix it.",setOption("user_set_server_timezone",options.timezone));else if(!0===t)setOption("timezone","default");else{var a=getOption("user_set_server_timezone");"default"===a&&(setOption("user_set_server_timezone",options.timezone),a=options.timezone),Object(_utils_date_time__WEBPACK_IMPORTED_MODULE_11__.a)(a)?setOption("timezone",a):(setOption("timezone","default"),$("#local_timezone").prop("checked")||$("#local_timezone").bootstrapToggle("on"),document.getElementById("timezone_error_message").innerHTML='Sorry. The timezone "'+e.toString()+'" is not accepted by your browser. Please select one from the list.',setOption("user_set_server_timezone",options.timezone))}var n=getOption("timezone");return document.getElementById("current_timezone").innerText="default"===n?"unset, using browser default":n,!1};var netdataCallback=initializeDynamicDashboard;window.showSignInModal=function(){document.getElementById("sim-registry").innerHTML=getFromRegistry("registryServer"),$("#signInModal").modal("show")},window.explicitlySignIn=function(){$("#signInModal").modal("hide"),reduxStore.dispatch(Object(_domains_dashboard_actions__WEBPACK_IMPORTED_MODULE_6__.a)())}},256:function(e,t){},257:function(e,t,a){"use strict";var n=a(5),r=a(0),o=a.n(r),i=a(132),s=a(3),l=function(e){var t=e.userStatus,a=e.nodeStatus,n=e.date;return Object(r.useMemo)((function(){return function(e){var t=e.nodeStatus,a=e.userStatus;e.date;return{title:"Netdata Cloud connection status",text:{header:function(){return o.a.createElement(s.z,null,"This node is currently"," ",o.a.createElement(s.z,{strong:!0},"LIVE"===t?"Connected":"Not Connected")," to Netdata Cloud")},bullets:"NOT_LIVE"===t?[function(){return o.a.createElement(s.z,null,"To troubleshoot Netdata Cloud connection issues, please follow"," ",o.a.createElement(i.a,{target:"_blank",rel:"noopener noreferrer",href:"https://learn.netdata.cloud/docs/agent/claim#troubleshooting"},"this guide"),".")}]:[],footer:function(){return o.a.createElement(s.z,null,"You are"," ",o.a.createElement(s.z,{strong:!0},"LOGGED_IN"===a?"Logged In":"EXPIRED_LOGIN"===a?"Logged out":"Not signed-up")," ","to Netdata Cloud")}},CTA1:{text:"Take me to Netdata Cloud"}}}({userStatus:t,nodeStatus:a,date:n})}),[t,a,n])},c=a(78),u=function(e){var t=e.title,a=e.text,n=e.CTA1,i=e.closeModal,l=e.onRefresh,u=e.isCTA1Disabled,d=Object(r.useCallback)((function(e){var t=e.link;i(),window.open(t,"_blank")}),[i]);return o.a.createElement(s.q,null,o.a.createElement(s.t,{width:180,background:"modalBackground"},o.a.createElement(s.v,null,o.a.createElement(s.k,{margin:[0]},t),o.a.createElement(s.s,{onClose:i})),o.a.createElement(s.r,null,o.a.createElement(s.j,{padding:[0,0,4,0],column:!0,gap:3},a.header({}),a.bullets.length>0&&o.a.createElement(s.j,{column:!0,gap:3},o.a.createElement(s.j,{column:!0,gap:1,as:"ul"},a.bullets.map((function(e,t){return"function"===typeof e?o.a.createElement("li",{key:t}," ",e()):o.a.createElement("li",{key:e},o.a.createElement(s.z,null,e))})))),a.footer())),o.a.createElement(s.u,null,o.a.createElement(s.a,{"data-testid":"cta1",margin:[0,2,0,0],width:{min:40}},o.a.createElement(c.a,{utmParameters:{content:"connection_to_cloud",campaign:"agent_nudge_to_cloud"}},(function(e){var t=e.link;return o.a.createElement(s.b,{"data-ga":"connection-to-cloud::click-ct1::ad",disabled:u,textTransform:"none","data-testid":"cta1-button",onClick:function(){return d({link:t})},width:"100%",label:n.text})}))),o.a.createElement(s.a,{"data-ga":"connection-to-cloud::click-check-now::ad",onClick:l,height:10,className:"btn btn-default","data-testid":"cta2-button",width:{min:40}},o.a.createElement(s.a,{as:s.z,sx:{fontWeight:"500",lineHeight:"25px"}},"Check Now")))))},d=a(27),h=a(124),p=a(9);t.a=function(){var e=Object(d.e)(p.P),t=Object(d.e)(p.u),a=Object(r.useState)(!1),i=Object(n.a)(a,2),c=i[0],f=i[1],g=l({userStatus:(null===e||void 0===e?void 0:e.userStatus)||"UNKNOWN",nodeStatus:(null===e||void 0===e?void 0:e.nodeLiveness)||"NOT_LIVE",date:""});Object(r.useEffect)((function(){document.documentElement.style.overflow=c?"hidden":"auto"}),[c]);var m=Object(r.useCallback)((function(){f(!0)}),[]),b=Object(r.useCallback)((function(){f(!1)}),[]),v=Object(h.b)();return t?o.a.createElement(s.j,{column:!0},o.a.createElement(s.x,{"data-ga":"connection-to-cloud::click-pill::ad","data-testid":"header-connection-to-cloud-button",onClick:m,flavour:"neutral"},"Connection to Cloud"),c&&o.a.createElement(u,Object.assign({},g,{isCTA1Disabled:"LIVE"!==(null===e||void 0===e?void 0:e.nodeLiveness),closeModal:b,onRefresh:v}))):null}},26:function(e,t,a){"use strict";a.d(t,"e",(function(){return n})),a.d(t,"c",(function(){return r})),a.d(t,"b",(function(){return o})),a.d(t,"a",(function(){return i})),a.d(t,"d",(function(){return s}));var n="global",r="***",o=5e3,i="CLOUD_BASE_URL_DISABLED",s=["WARNING","ERROR","REMOVED","UNDEFINED","UNINITIALIZED","CLEAR","CRITICAL"]},276:function(e,t,a){var n,r,o;r=[],void 0===(o="function"===typeof(n=function(){var e=0,t={header:{title:{text:"",color:"#333333",fontSize:18,fontWeight:"bold",font:"arial"},subtitle:{text:"",color:"#666666",fontSize:14,fontWeight:"bold",font:"arial"},location:"top-center",titleSubtitlePadding:8},footer:{text:"",color:"#666666",fontSize:14,fontWeight:"bold",font:"arial",location:"left"},size:{canvasHeight:500,canvasWidth:500,pieInnerRadius:"0%",pieOuterRadius:null},data:{sortOrder:"none",ignoreSmallSegments:{enabled:!1,valueType:"percentage",value:null},smallSegmentGrouping:{enabled:!1,value:1,valueType:"percentage",label:"Other",color:"#cccccc"},content:[]},labels:{outer:{format:"label",hideWhenLessThanPercentage:null,pieDistance:30},inner:{format:"percentage",hideWhenLessThanPercentage:null},mainLabel:{color:"#333333",font:"arial",fontWeight:"normal",fontSize:10},percentage:{color:"#dddddd",font:"arial",fontWeight:"bold",fontSize:10,decimalPlaces:0},value:{color:"#cccc44",fontWeight:"bold",font:"arial",fontSize:10},lines:{enabled:!0,style:"curved",color:"segment"},truncation:{enabled:!1,truncateLength:30},formatter:null},effects:{load:{effect:"none",speed:1e3},pullOutSegmentOnClick:{effect:"none",speed:300,size:10},highlightSegmentOnMouseover:!1,highlightLuminosity:-.2},tooltips:{enabled:!1,type:"placeholder",string:"",placeholderParser:null,styles:{fadeInSpeed:250,backgroundColor:"#000000",backgroundOpacity:.5,color:"#efefef",borderRadius:2,font:"arial",fontWeight:"bold",fontSize:10,padding:4}},misc:{colors:{background:null,segments:["#2484c1","#65a620","#7b6888","#a05d56","#961a1a","#d8d23a","#e98125","#d0743c","#635222","#6ada6a","#0c6197","#7d9058","#207f33","#44b9b0","#bca44a","#e4a14b","#a3acb2","#8cc3e9","#69a6f9","#5b388f","#546e91","#8bde95","#d2ab58","#273c71","#98bf6e","#4daa4b","#98abc5","#cc1010","#31383b","#006391","#c2643f","#b0a474","#a5a39c","#a9c2bc","#22af8c","#7fcecf","#987ac6","#3d3b87","#b77b1c","#c9c2b6","#807ece","#8db27c","#be66a2","#9ed3c6","#00644b","#005064","#77979f","#77e079","#9c73ab","#1f79a7"],segmentStroke:"#ffffff"},gradient:{enabled:!1,percentage:95,color:"#000000"},canvasPadding:{top:5,right:5,bottom:5,left:5},pieCenterOffset:{x:0,y:0},cssPrefix:null},callbacks:{onload:null,onMouseoverSegment:null,onMouseoutSegment:null,onClickSegment:null}},a=function(e){var t=e.cssPrefix,a=e.element,r=e.options;if(!window.d3||!window.d3.hasOwnProperty("version"))return console.error("d3pie error: d3 is not available"),!1;if(!(a instanceof HTMLElement||a instanceof SVGElement))return console.error("d3pie error: the first d3pie() param must be a valid DOM element (not jQuery) or a ID string."),!1;if(!/[a-zA-Z][a-zA-Z0-9_-]*$/.test(t))return console.error("d3pie error: invalid options.misc.cssPrefix"),!1;if(!n.isArray(r.data.content))return console.error("d3pie error: invalid config structure: missing data.content property."),!1;if(0===r.data.content.length)return console.error("d3pie error: no data supplied."),!1;for(var o=[],i=0;ie.x+e.w||t.x+t.we.y+e.h)},getColorShade:function(e,t){(e=String(e).replace(/[^0-9a-f]/gi,"")).length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),t=t||0;for(var a="#",n=0;n<3;n++){var r=parseInt(e.substr(2*n,2),16);a+=("00"+(r=Math.round(Math.min(Math.max(0,r+r*t),255)).toString(16))).substr(r.length)}return a},initSegmentColors:function(e){for(var t=e.options.data.content,a=e.options.misc.colors.segments,n=[],r=0;r99?99:i)<0?0:i;var l=n0&&(l-=c)}s=Math.floor(l/100*i)/2}else s=parseInt(t.pieOuterRadius,10);/%/.test(t.pieInnerRadius)?(i=(i=(i=parseInt(t.pieInnerRadius.replace(/[\D]/,""),10))>99?99:i)<0?0:i,o=Math.floor(s/100*i)):o=parseInt(t.pieInnerRadius,10),e.innerRadius=o,e.outerRadius=s},getTotalPieSize:function(e){for(var t=0,a=0;at.label.toLowerCase()?1:-1}));break;case"label-desc":t.sort((function(e,t){return e.label.toLowerCase()r.truncation.truncateLength&&(a=e.label.substring(0,r.truncation.truncateLength)+"..."),a})).style("font-size",r.mainLabel.fontSize+"px").style("font-family",r.mainLabel.font).style("font-weight",r.mainLabel.fontWeight).style("fill",(function(t,a){return"segment"===r.mainLabel.color?e.options.colors[a]:r.mainLabel.color})),n.percentage&&s.append("text").attr("id",(function(a,n){return e.cssPrefix+"segmentPercentage"+n+"-"+t})).attr("class",e.cssPrefix+"segmentPercentage-"+t).text((function(e,t){var a=e.percentage;return r.formatter?(l.index=t,l.part="percentage",l.value=e.value,l.label=e.percentage,a=r.formatter(l)):a+="%",a})).style("font-size",r.percentage.fontSize+"px").style("font-family",r.percentage.font).style("font-weight",r.percentage.fontWeight).style("fill",r.percentage.color),n.value&&s.append("text").attr("id",(function(a,n){return e.cssPrefix+"segmentValue"+n+"-"+t})).attr("class",e.cssPrefix+"segmentValue-"+t).text((function(e,t){return l.index=t,l.part="value",l.value=e.value,l.label=e.value,r.formatter?r.formatter(l,e.value):e.value})).style("font-size",r.value.fontSize+"px").style("font-family",r.value.font).style("font-weight",r.value.fontWeight).style("fill",r.value.color)},positionLabelElements:function(e,t,a){i["dimensions-"+t]=[],e.__labels[t].each((function(a,n){var r=d3.select(this).selectAll("."+e.cssPrefix+"segmentMainLabel-"+t),o=d3.select(this).selectAll("."+e.cssPrefix+"segmentPercentage-"+t),s=d3.select(this).selectAll("."+e.cssPrefix+"segmentValue-"+t);i["dimensions-"+t].push({mainLabel:null!==r.node()?r.node().getBBox():null,percentage:null!==o.node()?o.node().getBBox():null,value:null!==s.node()?s.node().getBBox():null})}));var n=i["dimensions-"+t];switch(a){case"label-value1":e.svg.selectAll("."+e.cssPrefix+"segmentValue-"+t).attr("dx",(function(e,t){return n[t].mainLabel.width+5}));break;case"label-value2":e.svg.selectAll("."+e.cssPrefix+"segmentValue-"+t).attr("dy",(function(e,t){return n[t].mainLabel.height}));break;case"label-percentage1":e.svg.selectAll("."+e.cssPrefix+"segmentPercentage-"+t).attr("dx",(function(e,t){return n[t].mainLabel.width+5}));break;case"label-percentage2":e.svg.selectAll("."+e.cssPrefix+"segmentPercentage-"+t).attr("dx",(function(e,t){return n[t].mainLabel.width/2-n[t].percentage.width/2})).attr("dy",(function(e,t){return n[t].mainLabel.height}))}},computeLabelLinePositions:function(e){e.lineCoordGroups=[],e.__labels.outer.each((function(t,a){return i.computeLinePosition(e,a)}))},computeLinePosition:function(e,t){var a,n,r,i,l=s.getSegmentAngle(t,e.options.data.content,e.totalSize,{midpoint:!0}),c=o.rotate(e.pieCenter.x,e.pieCenter.y-e.outerRadius,e.pieCenter.x,e.pieCenter.y,l),u=e.outerLabelGroupData[t].h/5,d=Math.floor(l/90);switch(2===d&&180===l&&(d=1),d){case 0:a=e.outerLabelGroupData[t].x-6-(e.outerLabelGroupData[t].x-6-c.x)/2,n=e.outerLabelGroupData[t].y+(c.y-e.outerLabelGroupData[t].y)/4,r=e.outerLabelGroupData[t].x-6,i=e.outerLabelGroupData[t].y-u;break;case 1:a=c.x+(e.outerLabelGroupData[t].x-c.x)/4,n=c.y+(e.outerLabelGroupData[t].y-c.y)/4,r=e.outerLabelGroupData[t].x-6,i=e.outerLabelGroupData[t].y-u;break;case 2:var h=e.outerLabelGroupData[t].x+e.outerLabelGroupData[t].w+6;a=c.x-(c.x-h)/4,n=c.y+(e.outerLabelGroupData[t].y-c.y)/4,r=e.outerLabelGroupData[t].x+e.outerLabelGroupData[t].w+6,i=e.outerLabelGroupData[t].y-u;break;case 3:var p=e.outerLabelGroupData[t].x+e.outerLabelGroupData[t].w+6;a=p+(c.x-p)/4,n=e.outerLabelGroupData[t].y+(c.y-e.outerLabelGroupData[t].y)/4,r=e.outerLabelGroupData[t].x+e.outerLabelGroupData[t].w+6,i=e.outerLabelGroupData[t].y-u}"straight"===e.options.labels.lines.style?e.lineCoordGroups[t]=[{x:c.x,y:c.y},{x:r,y:i}]:e.lineCoordGroups[t]=[{x:c.x,y:c.y},{x:a,y:n},{x:r,y:i}]},addLabelLines:function(e){var t=e.svg.insert("g","."+e.cssPrefix+"pieChart").attr("class",e.cssPrefix+"lineGroups").style("opacity",1).selectAll("."+e.cssPrefix+"lineGroup").data(e.lineCoordGroups).enter().append("g").attr("class",e.cssPrefix+"lineGroup"),a=d3.line().curve(d3.curveBasis).x((function(e){return e.x})).y((function(e){return e.y}));t.append("path").attr("d",a).attr("stroke",(function(t,a){return"segment"===e.options.labels.lines.color?e.options.colors[a]:e.options.labels.lines.color})).attr("stroke-width",1).attr("fill","none").style("opacity",(function(t,a){var n=e.options.labels.outer.hideWhenLessThanPercentage;return null!==n&&t.percentage0){var d=s.getSegmentAngle(i,e.options.data.content,e.totalSize,{midpoint:!0}),h=o.translate(e.pieCenter.x,e.pieCenter.y,e.innerRadius,d);u.x=h.x,u.y=h.y}var p=n.getDimensions(e.cssPrefix+"labelGroup"+i+"-inner"),f=p.w/2,g=p.h/4;l=u.x+(e.lineCoordGroups[i][0].x-u.x)/1.8,c=u.y+(e.lineCoordGroups[i][0].y-u.y)/1.8,l-=f,c+=g}return"translate("+l+","+c+")"}))},getIncludes:function(e){var t=!1,a=!1,n=!1;switch(e){case"label":t=!0;break;case"value":a=!0;break;case"percentage":n=!0;break;case"label-value1":case"label-value2":t=!0,a=!0;break;case"label-percentage1":case"label-percentage2":t=!0,n=!0}return{mainLabel:t,value:a,percentage:n}},computeOuterLabelCoords:function(e){e.__labels.outer.each((function(t,a){return i.getIdealOuterLabelPositions(e,a)})),i.resolveOuterLabelCollisions(e)},resolveOuterLabelCollisions:function(e){if("none"!==e.options.labels.outer.format){var t=e.options.data.content.length;i.checkConflict(e,0,"clockwise",t),i.checkConflict(e,t-1,"anticlockwise",t)}},checkConflict:function(e,t,a,r){var o,s;if(!(r<=1)){var l=e.outerLabelGroupData[t].hs;if(("clockwise"!==a||"right"===l)&&("anticlockwise"!==a||"left"===l)){var c="clockwise"===a?t+1:t-1,u=e.outerLabelGroupData[t],d=e.outerLabelGroupData[c],h={labelHeights:e.outerLabelGroupData[0].h,center:e.pieCenter,lineLength:e.outerRadius+e.options.labels.outer.pieDistance,heightChange:e.outerLabelGroupData[0].h+1};if("clockwise"===a){for(o=0;o<=t;o++)if(s=e.outerLabelGroupData[o],!i.isLabelHidden(e,o)&&n.rectIntersect(s,d)){i.adjustLabelPos(e,c,u,h);break}}else for(o=r-1;o>=t;o--)if(s=e.outerLabelGroupData[o],!i.isLabelHidden(e,o)&&n.rectIntersect(s,d)){i.adjustLabelPos(e,c,u,h);break}i.checkConflict(e,c,a,r)}}},isLabelHidden:function(e,t){var a=e.options.labels.outer.hideWhenLessThanPercentage;return null!==a&&d.percentageMath.abs(o)?Math.sqrt(n.lineLength*n.lineLength-o*o):Math.sqrt(o*o-n.lineLength*n.lineLength),i="right"===a.hs?n.center.x+r:n.center.x-r-e.outerLabelGroupData[t].w,e.outerLabelGroupData[t].x=i,e.outerLabelGroupData[t].y=s},getIdealOuterLabelPositions:function(e,t){var a=e.svg.select("#"+e.cssPrefix+"labelGroup"+t+"-outer").node();if(a){var n=a.getBBox(),r=s.getSegmentAngle(t,e.options.data.content,e.totalSize,{midpoint:!0}),i=e.pieCenter.x,l=e.pieCenter.y-(e.outerRadius+e.options.labels.outer.pieDistance),c=o.rotate(i,l,e.pieCenter.x,e.pieCenter.y,r),u="right";r>180?(c.x-=n.width+8,u="left"):c.x+=8,e.outerLabelGroupData[t]={x:c.x,y:c.y,w:n.width,h:n.height,hs:u}}}},s={effectMap:{none:d3.easeLinear,bounce:d3.easeBounce,linear:d3.easeLinear,sin:d3.easeSin,elastic:d3.easeElastic,back:d3.easeBack,quad:d3.easeQuad,circle:d3.easeCircle,exp:d3.easeExp},create:function(e){var t=e.pieCenter,a=e.options.colors,n=(e.options.effects.load,e.options.misc.colors.segmentStroke),r=e.svg.insert("g","#"+e.cssPrefix+"title").attr("transform",(function(){return o.getPieTranslateCenter(t)})).attr("class",e.cssPrefix+"pieChart"),i=d3.arc().innerRadius(e.innerRadius).outerRadius(e.outerRadius).startAngle(0).endAngle((function(t){return t.value/e.totalSize*2*Math.PI}));r.selectAll("."+e.cssPrefix+"arc").data(e.options.data.content).enter().append("g").attr("class",e.cssPrefix+"arc").append("path").attr("id",(function(t,a){return e.cssPrefix+"segment"+a})).attr("fill",(function(t,n){var r=a[n];return e.options.misc.gradient.enabled&&(r="url(#"+e.cssPrefix+"grad"+n+")"),r})).style("stroke",n).style("stroke-width",1).attr("data-index",(function(e,t){return t})).attr("d",i),e.svg.selectAll("g."+e.cssPrefix+"arc").attr("transform",(function(t,a){var n=0;return a>0&&(n=s.getSegmentAngle(a-1,e.options.data.content,e.totalSize)),"rotate("+n+")"})),e.arc=i},addGradients:function(e){var t=e.svg.append("defs").selectAll("radialGradient").data(e.options.data.content).enter().append("radialGradient").attr("gradientUnits","userSpaceOnUse").attr("cx",0).attr("cy",0).attr("r","120%").attr("id",(function(t,a){return e.cssPrefix+"grad"+a}));t.append("stop").attr("offset","0%").style("stop-color",(function(t,a){return e.options.colors[a]})),t.append("stop").attr("offset",e.options.misc.gradient.percentage+"%").style("stop-color",e.options.misc.gradient.color)},addSegmentEventHandlers:function(e){var t=e.svg.selectAll("."+e.cssPrefix+"arc");(t=t.merge(e.__labels.inner.merge(e.__labels.outer))).on("click",(function(){var t,a=d3.select(this);if(a.attr("class")===e.cssPrefix+"arc")t=a.select("path");else{var n=a.attr("data-index");t=d3.select("#"+e.cssPrefix+"segment"+n)}var r=t.attr("class")===e.cssPrefix+"expanded";s.onSegmentEvent(e,e.options.callbacks.onClickSegment,t,r),"none"!==e.options.effects.pullOutSegmentOnClick.effect&&(r?s.closeSegment(e,t.node()):s.openSegment(e,t.node()))})),t.on("mouseover",(function(){var t,a,r=d3.select(this);if(r.attr("class")===e.cssPrefix+"arc"?t=r.select("path"):(a=r.attr("data-index"),t=d3.select("#"+e.cssPrefix+"segment"+a)),e.options.effects.highlightSegmentOnMouseover){a=t.attr("data-index");var o=e.options.colors[a];t.style("fill",n.getColorShade(o,e.options.effects.highlightLuminosity))}e.options.tooltips.enabled&&(a=t.attr("data-index"),c.showTooltip(e,a));var i=t.attr("class")===e.cssPrefix+"expanded";s.onSegmentEvent(e,e.options.callbacks.onMouseoverSegment,t,i)})),t.on("mousemove",(function(){c.moveTooltip(e)})),t.on("mouseout",(function(){var t,a,n=d3.select(this);if(n.attr("class")===e.cssPrefix+"arc"?t=n.select("path"):(a=n.attr("data-index"),t=d3.select("#"+e.cssPrefix+"segment"+a)),e.options.effects.highlightSegmentOnMouseover){a=t.attr("data-index");var r=e.options.colors[a];e.options.misc.gradient.enabled&&(r="url(#"+e.cssPrefix+"grad"+a+")"),t.style("fill",r)}e.options.tooltips.enabled&&(a=t.attr("data-index"),c.hideTooltip(e,a));var o=t.attr("class")===e.cssPrefix+"expanded";s.onSegmentEvent(e,e.options.callbacks.onMouseoutSegment,t,o)}))},onSegmentEvent:function(e,t,a,r){if(n.isFunction(t)){var o=parseInt(a.attr("data-index"),10);t({segment:a.node(),index:o,expanded:r,data:e.options.data.content[o]})}},openSegment:function(e,t){e.isOpeningSegment||(e.isOpeningSegment=!0,s.maybeCloseOpenSegment(e),d3.select(t).transition().ease(s.effectMap[e.options.effects.pullOutSegmentOnClick.effect]).duration(e.options.effects.pullOutSegmentOnClick.speed).attr("transform",(function(t,a){var n=e.arc.centroid(t),r=n[0],o=n[1],i=Math.sqrt(r*r+o*o),s=parseInt(e.options.effects.pullOutSegmentOnClick.size,10);return"translate("+r/i*s+","+o/i*s+")"})).on("end",(function(a,n){e.currentlyOpenSegment=t,e.isOpeningSegment=!1,d3.select(t).attr("class",e.cssPrefix+"expanded")})))},maybeCloseOpenSegment:function(e){"undefined"!==typeof e&&e.svg.selectAll("."+e.cssPrefix+"expanded").size()>0&&s.closeSegment(e,e.svg.select("."+e.cssPrefix+"expanded").node())},closeSegment:function(e,t){d3.select(t).transition().duration(400).attr("transform","translate(0,0)").on("end",(function(a,n){d3.select(t).attr("class",""),e.currentlyOpenSegment=null}))},getCentroid:function(e){var t=e.getBBox();return{x:t.x+t.width/2,y:t.y+t.height/2}},getSegmentAngle:function(e,t,a,n){var o,i=r({compounded:!0,midpoint:!1},n),s=t[e].value;if(i.compounded){o=0;for(var l=0;l<=e;l++)o+=t[l].value}"undefined"===typeof o&&(o=s);var c=o/a*360;return i.midpoint&&(c-=s/a*360/2),c}},l={offscreenCoord:-1e4,addTitle:function(e){e.__title=e.svg.selectAll("."+e.cssPrefix+"title").data([e.options.header.title]).enter().append("text").text((function(e){return e.text})).attr("id",e.cssPrefix+"title").attr("class",e.cssPrefix+"title").attr("x",l.offscreenCoord).attr("y",l.offscreenCoord).attr("text-anchor",(function(){return"top-center"===e.options.header.location||"pie-center"===e.options.header.location?"middle":"left"})).attr("fill",(function(e){return e.color})).style("font-size",(function(e){return e.fontSize+"px"})).style("font-weight",(function(e){return e.fontWeight})).style("font-family",(function(e){return e.font}))},positionTitle:function(e){var t,a=e.textComponents,n=e.options.header.location,r=e.options.misc.canvasPadding,o=e.options.size.canvasWidth,i=e.options.header.titleSubtitlePadding;t="top-left"===n?r.left:(o-r.right)/2+r.left,t+=e.options.misc.pieCenterOffset.x;var s=r.top+a.title.h;"pie-center"===n&&(s=e.pieCenter.y,a.subtitle.exists?s=s-(a.title.h+i+a.subtitle.h)/2+a.title.h:s+=a.title.h/4),e.__title.attr("x",t).attr("y",s)},addSubtitle:function(e){var t=e.options.header.location;e.__subtitle=e.svg.selectAll("."+e.cssPrefix+"subtitle").data([e.options.header.subtitle]).enter().append("text").text((function(e){return e.text})).attr("x",l.offscreenCoord).attr("y",l.offscreenCoord).attr("id",e.cssPrefix+"subtitle").attr("class",e.cssPrefix+"subtitle").attr("text-anchor",(function(){return"top-center"===t||"pie-center"===t?"middle":"left"})).attr("fill",(function(e){return e.color})).style("font-size",(function(e){return e.fontSize+"px"})).style("font-weight",(function(e){return e.fontWeight})).style("font-family",(function(e){return e.font}))},positionSubtitle:function(e){var t,a=e.options.misc.canvasPadding,n=e.options.size.canvasWidth;t="top-left"===e.options.header.location?a.left:(n-a.right)/2+a.left,t+=e.options.misc.pieCenterOffset.x;var r=l.getHeaderHeight(e);e.__subtitle.attr("x",t).attr("y",r)},addFooter:function(e){e.__footer=e.svg.selectAll("."+e.cssPrefix+"footer").data([e.options.footer]).enter().append("text").text((function(e){return e.text})).attr("x",l.offscreenCoord).attr("y",l.offscreenCoord).attr("id",e.cssPrefix+"footer").attr("class",e.cssPrefix+"footer").attr("text-anchor",(function(){var t="left";return"bottom-center"===e.options.footer.location?t="middle":"bottom-right"===e.options.footer.location&&(t="left"),t})).attr("fill",(function(e){return e.color})).style("font-size",(function(e){return e.fontSize+"px"})).style("font-weight",(function(e){return e.fontWeight})).style("font-family",(function(e){return e.font}))},positionFooter:function(e){var t,a=e.options.footer.location,n=e.textComponents.footer.w,r=e.options.size.canvasWidth,o=e.options.size.canvasHeight,i=e.options.misc.canvasPadding;t="bottom-left"===a?i.left:"bottom-right"===a?r-n-i.right:r/2,e.__footer.attr("x",t).attr("y",o-i.bottom)},getHeaderHeight:function(e){var t;if(e.textComponents.title.exists){var a=e.textComponents.title.h+e.options.header.titleSubtitlePadding+e.textComponents.subtitle.h;t="pie-center"===e.options.header.location?e.pieCenter.y-a/2+a:a+e.options.misc.canvasPadding.top}else if("pie-center"===e.options.header.location){var n=e.options.misc.canvasPadding.bottom+e.textComponents.footer.h;t=(e.options.size.canvasHeight-n)/2+e.options.misc.canvasPadding.top+e.textComponents.subtitle.h/2}else t=e.options.misc.canvasPadding.top+e.textComponents.subtitle.h;return t}},c={addTooltips:function(e){var t=e.svg.insert("g").attr("class",e.cssPrefix+"tooltips");t.selectAll("."+e.cssPrefix+"tooltip").data(e.options.data.content).enter().append("g").attr("class",e.cssPrefix+"tooltip").attr("id",(function(t,a){return e.cssPrefix+"tooltip"+a})).style("opacity",0).append("rect").attr("rx",e.options.tooltips.styles.borderRadius).attr("ry",e.options.tooltips.styles.borderRadius).attr("x",-e.options.tooltips.styles.padding).attr("opacity",e.options.tooltips.styles.backgroundOpacity).style("fill",e.options.tooltips.styles.backgroundColor),t.selectAll("."+e.cssPrefix+"tooltip").data(e.options.data.content).append("text").attr("fill",(function(t){return e.options.tooltips.styles.color})).style("font-size",(function(t){return e.options.tooltips.styles.fontSize})).style("font-weight",(function(t){return e.options.tooltips.styles.fontWeight})).style("font-family",(function(t){return e.options.tooltips.styles.font})).text((function(t,a){var n=e.options.tooltips.string;return"caption"===e.options.tooltips.type&&(n=t.caption),c.replacePlaceholders(e,n,a,{label:t.label,value:t.value,percentage:t.percentage})})),t.selectAll("."+e.cssPrefix+"tooltip rect").attr("width",(function(t,a){return n.getDimensions(e.cssPrefix+"tooltip"+a).w+2*e.options.tooltips.styles.padding})).attr("height",(function(t,a){return n.getDimensions(e.cssPrefix+"tooltip"+a).h+2*e.options.tooltips.styles.padding})).attr("y",(function(t,a){return-n.getDimensions(e.cssPrefix+"tooltip"+a).h/2+1}))},showTooltip:function(e,t){var a=e.options.tooltips.styles.fadeInSpeed;c.currentTooltip===t&&(a=1),c.currentTooltip=t,d3.select("#"+e.cssPrefix+"tooltip"+t).transition().duration(a).style("opacity",(function(){return 1})),c.moveTooltip(e)},moveTooltip:function(e){d3.selectAll("#"+e.cssPrefix+"tooltip"+c.currentTooltip).attr("transform",(function(t){var a=d3.mouse(this.parentNode);return"translate("+(a[0]+e.options.tooltips.styles.padding+2)+","+(a[1]-2*e.options.tooltips.styles.padding-2)+")"}))},hideTooltip:function(e,t){d3.select("#"+e.cssPrefix+"tooltip"+t).style("opacity",(function(){return 0})),d3.select("#"+e.cssPrefix+"tooltip"+c.currentTooltip).attr("transform",(function(t,a){return"translate("+(e.options.size.canvasWidth+1e3)+","+(e.options.size.canvasHeight+1e3)+")"}))},replacePlaceholders:function(e,t,a,r){return n.isFunction(e.options.tooltips.placeholderParser)&&e.options.tooltips.placeholderParser(a,r),t.replace(/\{(\w+)\}/g,(function(e){var t=arguments[1];return r.hasOwnProperty(t)?r[arguments[1]]:arguments[0]}))}},u=function(n,o){if(this.element=n,"string"===typeof n){var i=n.replace(/^#/,"");this.element=document.getElementById(i)}var s={};r(!0,s,t,o),this.options=s,null!==this.options.misc.cssPrefix?this.cssPrefix=this.options.misc.cssPrefix:(this.cssPrefix="p"+e+"_",e++),a(this)&&(d3.select(this.element).attr("d3pie","0.2.1"),h.call(this),p.call(this))};u.prototype.recreate=function(){a(this)&&(h.call(this),p.call(this))},u.prototype.redraw=function(){this.element.innerHTML="",p.call(this)},u.prototype.destroy=function(){this.element.innerHTML="",d3.select(this.element).attr("d3pie",null)},u.prototype.getOpenSegment=function(){var e=this.currentlyOpenSegment;if(null!==e&&"undefined"!==typeof e){var t=parseInt(d3.select(e).attr("data-index"),10);return{element:e,index:t,data:this.options.data.content[t]}}return null},u.prototype.openSegment=function(e){(e=parseInt(e,10))<0||e>this.options.data.content.length-1||s.openSegment(this,d3.select("#"+this.cssPrefix+"segment"+e).node())},u.prototype.closeSegment=function(){s.maybeCloseOpenSegment(this)},u.prototype.updateProp=function(e,t){switch(e){case"header.title.text":var a=n.processObj(this.options,e);n.processObj(this.options,e,t),d3.select("#"+this.cssPrefix+"title").html(t),(""===a&&""!==t||""!==a&&""===t)&&this.redraw();break;case"header.subtitle.text":var r=n.processObj(this.options,e);n.processObj(this.options,e,t),d3.select("#"+this.cssPrefix+"subtitle").html(t),(""===r&&""!==t||""!==r&&""===t)&&this.redraw();break;case"callbacks.onload":case"callbacks.onMouseoverSegment":case"callbacks.onMouseoutSegment":case"callbacks.onClickSegment":case"effects.pullOutSegmentOnClick.effect":case"effects.pullOutSegmentOnClick.speed":case"effects.pullOutSegmentOnClick.size":case"effects.highlightSegmentOnMouseover":case"effects.highlightLuminosity":n.processObj(this.options,e,t);break;default:n.processObj(this.options,e,t),this.destroy(),this.recreate()}};var h=function(){this.options.data.content=o.sortPieData(this),this.options.data.smallSegmentGrouping.enabled&&(this.options.data.content=n.applySmallSegmentGrouping(this.options.data.content,this.options.data.smallSegmentGrouping)),this.options.colors=n.initSegmentColors(this),this.totalSize=o.getTotalPieSize(this.options.data.content);for(var e=this.options.labels.percentage.decimalPlaces,t=0;t0},s="https://registry.my-netdata.io",l=1e3,c=function(e,t){return"".concat(e,"/sso/v2/").concat(t)},u="&utm_source=agent&utm_medium=web",d=function(){var e=document.getElementById("charts_div");return e?60*-Math.round(e.getBoundingClientRect().width/3/60):(console.error("Couldn't find '.charts_div' element to calculate width"),-900)},h=function(e,t,a){return t?e.reduce((function(e,i){return Object(r.a)({},e,Object(n.a)({},i,Object(o.a)(t[i],a[i])?t[i]:a[i]))}),a):a}},282:function(e,t,a){"use strict";a(256);var n=a(257);a.d(t,"CloudConnectionStatus",(function(){return n.a}))},300:function(e,t,a){e.exports=a(489)},316:function(e,t,a){},355:function(e,t){},36:function(e,t,a){"use strict";a.d(t,"a",(function(){return p})),a.d(t,"b",(function(){return f})),a.d(t,"c",(function(){return g}));var n=a(287),r=a(146),o=a(285),i=a(219),s=a(288),l=a(133),c=a(494),u=a(74),d=u.c?{src:"http://localhost:3000/some-script.js"}:document.currentScript,h=function(){if(u.a)return"http://localhost:19999";if(u.b){var e=window.location.pathname.replace("index.html","").replace("default.html","");return window.location.origin+e}return function(e){return e.replace(new RegExp("[^\\/]*\\.js(\\/?.*)?$"),"").replace("/static/js","")}(Object(n.a)([[Boolean,r.a],[o.a,function(){return Object(i.a)(document.getElementsByTagName("script"))}]])(d).src)},p=Object(n.a)([[Object(s.a)(i.a,Object(l.a)("/")),r.a],[o.a,function(e){return Object(c.a)(e,"/")}]]),f=p(window.netdataServer||h()),g=u.a?"/":p(h())},39:function(e,t,a){"use strict";a.d(t,"f",(function(){return u})),a.d(t,"a",(function(){return f})),a.d(t,"j",(function(){return g})),a.d(t,"h",(function(){return m})),a.d(t,"g",(function(){return b})),a.d(t,"l",(function(){return v})),a.d(t,"i",(function(){return _})),a.d(t,"c",(function(){return y})),a.d(t,"b",(function(){return O})),a.d(t,"k",(function(){return x})),a.d(t,"e",(function(){return w})),a.d(t,"d",(function(){return E}));var n=a(49),r=a(17),o=a(9),i=a(163),s=a(45),l=function(e){return e[s.c]},c=Object(r.a)(l,(function(e,t){return t.id}),(function(e,t){return e[t]||i.b})),u=Object(r.a)(c,(function(e){return e.chartData})),d=Object(r.a)(c,Object(n.a)("chartMetadata")),h=Object(r.a)(o.e,d,(function(e,t){return e||t})),p=Object(r.a)(c,Object(n.a)("isFetchingDetails")),f=function(){return Object(r.a)(h,p,(function(e,t){return{chartMetadata:e,isFetchingDetails:t}}))},g=Object(r.a)(c,(function(e){return e.viewRange})),m=Object(r.a)(c,(function(e){return e.isFetchingData})),b=Object(r.a)(c,(function(e){return e.fetchDataParams})),v=Object(r.a)(c,(function(e){return e.resizeHeight})),_=Object(r.a)(c,Object(n.a)("chartPanAndZoom")),y=(Object(r.a)(l,(function(e){return Object.values(e).some((function(e){return e.isFetchingData}))})),Object(r.a)(l,(function(e){return Object.values(e).reduce((function(e,t){return e+(function(e){return e.isFetchDataFailure||Boolean(e.chartData)||e.isFetchDetailsFailure}(t)?1:0)}),0)}))),O=Object(r.a)(l,(function(e){return Object.keys(e).length})),x=Object(r.a)(l,(function(e){var t;return null===(t=Object.values(e).find((function(e){return e.isFetchingData})))||void 0===t?void 0:t.chartId})),w=Object(r.a)(l,(function(e){return Object.values(e).reduce((function(e,t){return e+(t.snapshotData?1:0)}),0)})),E=Object(r.a)(l,(function(e){return Object.values(e).reduce((function(e,t){return e+(t.snapshotDataIsError?1:0)}),0)}))},396:function(e,t,a){},416:function(e,t,a){},42:function(e,t,a){"use strict";a.d(t,"a",(function(){return f})),a.d(t,"b",(function(){return b}));var n=a(37),r=a(7),o=a(0),i=(a(99),a(8)),s=a(9),l=function(e){return e>-10&&e<10?"0".concat(e.toString()):e.toString()},c=!!(Intl&&Intl.DateTimeFormat&&navigator.language),u=function(e){return"number"===typeof e?new Date(e):e},d=function(e){return u(e).toLocaleDateString()},h=function(e){return u(e).toLocaleTimeString()},p=function(e){var t=u(e);return"".concat(l(t.getHours()),":").concat(l(t.getMinutes()),":").concat(l(t.getSeconds()))},f=function(e){try{Intl.DateTimeFormat(navigator.language,{localeMatcher:"best fit",formatMatcher:"best fit",weekday:"short",year:"numeric",month:"short",day:"2-digit",timeZone:e})}catch(t){return!1}return!0},g=function(e,t){var a=t.locale,o=Object(n.a)(t,["locale"]);return new Intl.DateTimeFormat(null!==a&&void 0!==a?a:navigator.language,function(e){var t=e.long,a=e.isTime,n=e.secs,o=e.timezone;return Object(r.a)({hourCycle:"h23"},a?{}:t?{weekday:"short",year:"numeric",month:"short",day:"2-digit"}:{dateStyle:"short"},{},a&&{timeStyle:n?"medium":"short"},{timeZone:o})}(o)).format(e)},m=function(e){return""!==e&&"default"!==e?e:void 0},b=function(){var e=Object(i.b)(s.M),t=Object(i.b)(s.N),a=Object(o.useMemo)((function(){return c?function(t,a){return g(t,Object(r.a)({long:!0,timezone:m(e)},a))}:d}),[e]),n=Object(o.useMemo)((function(){return c?function(t,a){return g(t,Object(r.a)({secs:!0,isTime:!0,timezone:m(e)},a))}:h}),[e]),l=Object(o.useMemo)((function(){return c?function(t){return g(t,{secs:!0,isTime:!0,timezone:m(e)})}:p}),[e]);return{localeDateString:a,localeTimeString:n,xAxisDateString:Object(o.useMemo)((function(){return c?function(t){return g(t,{long:!0,timezone:m(e)})}:p}),[e]),xAxisTimeString:l,utcOffset:t}}},436:function(e,t,a){},44:function(e,t,a){"use strict";a.d(t,"e",(function(){return o})),a.d(t,"f",(function(){return i})),a.d(t,"d",(function(){return s})),a.d(t,"a",(function(){return l})),a.d(t,"b",(function(){return c})),a.d(t,"c",(function(){return u}));var n=a(22),r=a(75),o=Object(n.createAction)("".concat(r.a,"/isSnapshotModeAction")),i=Object(n.createAction)("".concat(r.a,"/stopSnapshotModeAction")),s=Object(n.createAction)("".concat(r.a,"/showSignInModal")),l=Object(n.createAction)("".concat(r.a,"/explicitlySignIn")),c=Object(n.createAction)("".concat(r.a,"/isSignedInAction")),u=Object(n.createAction)("".concat(r.a,"/setOfflineAction"))},440:function(e,t,a){},441:function(e,t,a){},45:function(e,t,a){"use strict";a.d(t,"c",(function(){return n})),a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return o}));var n="chart",r=2e3,o=300},46:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(7),r=function(e,t){var a={now:"now",space:" ",negative_suffix:"ago",day:"day",days:"days",hour:"hour",hours:"hours",minute:"min",minutes:"mins",second:"sec",seconds:"secs",and:"and"},r="object"===typeof t?Object(n.a)({},a,{},t):a,o="string"===typeof e?parseInt(e,10):e;if(0===o)return r.now;var i="";o<0&&(o=-o,""!==r.negative_suffix&&(i=r.space+r.negative_suffix));var s=Math.floor(o/86400);o-=86400*s;var l=Math.floor(o/3600);o-=3600*l;var c=Math.floor(o/60);o-=60*c;var u=[];if(s>1?u.push(s.toString()+r.space+r.days):1===s&&u.push(s.toString()+r.space+r.day),l>1?u.push(l.toString()+r.space+r.hours):1===l&&u.push(l.toString()+r.space+r.hour),c>1?u.push(c.toString()+r.space+r.minutes):1===c&&u.push(c.toString()+r.space+r.minute),o>1?u.push(Math.floor(o).toString()+r.space+r.seconds):1===o&&u.push(Math.floor(o).toString()+r.space+r.second),1===u.length)return u.pop()+i;var d=u.pop();return"".concat(u.join(", ")," ").concat(r.and," ").concat(d).concat(i)}},487:function(e,t){},488:function(e,t,a){},489:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),o=a(32),i=a.n(o),s=a(27),l=a(48),c=a(126),u=a(14),d=a(155),h=a(26),p=a(163),f=a(45),g=a(7),m=a(22),b=a(44),v={isSnapshotMode:!1,snapshotCharts:null,snapshotDataPoints:null,isSignedIn:!1,offline:!1},_=Object(m.createReducer)({},v);_.on(b.e,(function(e,t){var a=t.charts,n=t.dataPoints;return Object(g.a)({},e,{snapshotCharts:a,snapshotDataPoints:n,isSnapshotMode:!0})})),_.on(b.f,(function(e){return Object(g.a)({},e,{isSnapshotMode:v.isSnapshotMode,snapshotCharts:v.snapshotCharts,snapshotDataPoints:v.snapshotDataPoints})})),_.on(b.b,(function(e,t){var a=t.isSignedIn;return Object(g.a)({},e,{isSignedIn:a})})),_.on(b.c,(function(e,t){var a=t.offline;return Object(g.a)({},e,{offline:a})}));var y,O=a(75),x=Object(l.c)((y={},Object(u.a)(y,h.e,d.b),Object(u.a)(y,f.c,p.a),Object(u.a)(y,O.a,_),y)),w=a(21),E=a.n(w),S=a(16),C=a(35),A=a(5),k=a(92),j=a.n(k),T=j.a.create({headers:{"Cache-Control":"no-cache, no-store",Pragma:"no-cache"},withCredentials:!0}),D=a(36),P=a(554),M=a(184),L=a(529),I=a(261),N=a(527),R=a(528),F=a(549),B=a(530),H=j.a.create({headers:{"Cache-Control":"no-cache, no-store",Pragma:"no-cache"},withCredentials:!0}),z=function(e){var t=new P.a,a=new P.a,n=Object(I.a)((function(e){var t=e.url,a=e.method,n=void 0===a?"GET":a,r=e.params,o=void 0===r?{}:r,i=e.data,s=e.onErrorCallback,l=e.onSuccessCallback,c=e.cancelTokenSource;return Object(M.a)(H.request({url:t,method:n,params:o,data:i,timeout:15e3,cancelToken:null===c||void 0===c?void 0:c.token})).pipe(Object(N.a)((function(e){var t=e.data;l(t)})),Object(R.a)((function(e){return"Chart scrolled out of view"!==(null===e||void 0===e?void 0:e.message)&&console.warn("fetch error",t),s(e),Object(L.a)()})))}),e);return a.pipe(Object(F.a)(null),Object(B.a)((function(){return t.pipe(n)}))).subscribe(),[t,a]},U=a(74),G=a(260),W=a(531),V=a(558),Y=function(e,t){return"json"===e.format?function(e,t){var a=e.view_update_every;if(!e.result.data.length)return e;var n=e.result.data[0][0]-t*a,r=Object(G.a)(e.result.labels).map((function(){return null})),o=new Array(t).fill(null).map((function(e,t){return[n+t*a].concat(Object(C.a)(r))}));return Object(g.a)({},e,{after:e.after-a*t,result:Object(g.a)({},e.result,{data:o.concat(e.result.data)})})}(e,t):e},X=[],K=function(e,t,a){if("array"===t&&"json"===e.format){if(Array.isArray(e.result))return e;var n=a?Object(W.a)(e.result.data):e.result.data;return Object(g.a)({},e,{format:"array",result:n.reduce((function(e,t){return t.shift(),[].concat(Object(C.a)(e),[Object(V.a)(t)])}),X)})}return e},Z=a(3),q=a(135),$=a(4),J=$.d.div.withConfig({displayName:"styled__Container",componentId:"qqn9iy-0"})(["width:100%;height:100%;min-height:",";display:flex;flex-flow:row nowrap;padding:"," "," "," ",";"],Object(Z.H)(10),Object(Z.H)(2),Object(Z.H)(2),Object(Z.H)(2),Object(Z.H)(2)),Q=$.d.div.withConfig({displayName:"styled__SideContent",componentId:"qqn9iy-1"})(["flex-grow:0;flex-shrink:0;height:100%;align-self:stretch;"]),ee=$.d.div.withConfig({displayName:"styled__ContentContainer",componentId:"qqn9iy-2"})([""]),te=Object($.d)(Z.z).withConfig({displayName:"styled__HeaderText",componentId:"qqn9iy-3"})(["color:",";font-weight:bold;display:block;margin-bottom:",";"],(function(e){var t=e.error;return e.success&&Object(Z.F)("success")||t&&Object(Z.F)("error")}),Object(Z.H)()),ae=Object($.d)(Z.D).withConfig({displayName:"styled__ContentText",componentId:"qqn9iy-4"})(["display:block;color:",";"],(function(e){return e.error&&Object(Z.F)("error")||Object(Z.F)("border")})),ne=function(e){var t=e.header,a=e.text,n=e.leftContent,o=e.rightContent,i=e.renderContent,s=e.success,l=e.error;return r.a.createElement(J,null,n&&r.a.createElement(Q,null,n),r.a.createElement(ee,null,t&&r.a.createElement(te,{success:s,error:l},t),a&&r.a.createElement(ae,{success:s,error:l},a),i&&i(e)),o&&r.a.createElement(Q,{right:!0},o))},re=function(e){return r.a.createElement(ne,e)},oe=$.d.div.withConfig({displayName:"styled__NodeIconContainer",componentId:"fe9uuu-0"})(["width:",";height:",";margin-right:",";display:flex;justify-content:center;align-items:center;"],Object(Z.H)(5),Object(Z.H)(5),Object(Z.H)(2)),ie=$.d.a.withConfig({displayName:"styled__NotificationLink",componentId:"fe9uuu-1"})(["&,&:hover{text-decoration:underline;color:inherit;}"]),se={position:q.b.POSITION.BOTTOM_RIGHT,autoClose:1e4,pauseOnFocusLoss:!1},le=function(){var e=re(Object(g.a)({},{header:"Installation error",text:"The installer could not prepare the required dependencies to enable Netdata Cloud functionality"},{error:!0,leftContent:r.a.createElement(oe,null,r.a.createElement(Z.o,{name:"gear",size:"large",color:"error"}))}));q.b.error(e,se)},ce=function(){var e={header:"Connection Problem",text:r.a.createElement(ie,{href:"https://learn.netdata.cloud/docs/agent/packaging/installer#automatic-one-line-installation-script",target:"_blank"},"To access Cloud install again your agent via the kickstart script")},t=re(Object(g.a)({},e,{error:!0,leftContent:r.a.createElement(oe,null,r.a.createElement(Z.o,{name:"gear",size:"large",color:"error"}))}));q.b.error(t,se)},ue=a(9),de=a(288),he=a(559),pe=a(218),fe=a(495),ge=a(552),me={hash:"#",theme:null,help:null,mode:"live",update_always:!1,pan_and_zoom:!1,server:null,after:0,before:0,highlight:!1,highlight_after:0,highlight_before:0,nowelcome:!1,show_alarms:!1,chart:null,family:null,alarm:null,alarm_unique_id:0,alarm_id:0,alarm_event_id:0,alarm_when:0},be=function(e){var t=Object(A.a)(e,2),a=t[0],n=t[1];return function(e){var t=Object(A.a)(e,2),a=t[0],n=t[1];return void 0===me[a]||void 0===n}([a,n])?{}:Object(u.a)({},a,decodeURIComponent(n))},ve="print"===Object(de.a)(Object(he.a)(";"),Object(ge.a)((function(e,t){return 0===t?{hash:e}:be(e.split("="))})),pe.a,Object(fe.a)(me))(document.location.hash).mode,_e=a(18),ye=E.a.mark(Ae),Oe=E.a.mark(Me),xe=E.a.mark(He),we=E.a.mark(ze),Ee=E.a.mark(Ue),Se=U.b?30:60,Ce=Object(c.a)();function Ae(){var e,t,a,n,r,o;return E.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=3,Object(S.f)(Ce);case 3:if((e=i.sent).type!==_e.c.success.toString()){i.next=15;break}return t=e.payload,a=t.fetchDataParams.viewRange,n=Object(A.a)(a,2),r=n[0],o=n[1],i.next=10,Object(S.d)(ue.m);case 10:if(!i.sent||!(r<=0||o<=0)){i.next=15;break}return i.next=14,Object(S.c)(Object(_e.d)({id:t.id}));case 14:return i.abrupt("continue",0);case 15:return i.next=17,Object(S.c)(e);case 17:i.next=0;break;case 19:case"end":return i.stop()}}),ye)}var ke=function(e,t){return"".concat(void 0===e?"null":encodeURIComponent(e),",").concat(encodeURIComponent(t))},je=!1,Te=function(e){return"chart"===e?"node":"node"===e||"dimension"===e?e:"label=".concat(e)},De=z(ve?2:Se),Pe=Object(A.a)(De,1)[0];function Me(e){var t,a,n,r,o,i,s,l,c,u,d,h,p,f,m,b,v,_,y,O,x,w,A,k,j,T,P,M,L,I,N,R,F,B,H,z,G,W,V;return E.a.wrap((function(E){for(;;)switch(E.prev=E.next){case 0:return t=e.payload,a=t.host,n=t.context,r=t.chart,o=t.format,i=t.points,s=t.group,l=t.gtime,c=t.options,u=t.after,d=t.before,h=t.dimensions,p=t.labels,f=t.postGroupBy,m=t.postAggregationMethod,b=t.aggrMethod,v=t.dimensionsAggrMethod,_=t.nodeIDs,y=t.httpMethod,O=t.groupBy,x=void 0===O?"dimension":O,w=t.aggrGroups,A=void 0===w?[]:w,k=t.fetchDataParams,j=t.id,T=t.cancelTokenSource,E.next=4,Object(S.d)(ue.E);case 4:if(!(P=E.sent)){E.next=15;break}if(M=ke(h,c),L=Object.keys(P.data).find((function(e){return e.startsWith(r)&&e.includes(M)}))){E.next=11;break}return console.warn("Could not find snapshot key for chart: ".concat(r," and id ").concat(j)),E.abrupt("return");case 11:return I=P.data[L],E.next=14,Object(S.c)(_e.c.success({chartData:I,fetchDataParams:k,id:j}));case 14:return E.abrupt("return");case 15:N=U.b?"".concat(Object(D.a)(a),"api/v1/data"):a,R=c.split("|"),F=R.includes("flip"),H=(B=!je&&!F)?R.concat("flip"):R,z=[Te(x),f&&"label=".concat(f)].filter(Boolean),G="POST"===y?{data:Object(g.a)({filter:{nodeIDs:_,context:n,dimensions:h?h.split(/['|]/):void 0,labels:p},after:u,before:d,points:i,group:s,gtime:l,agent_options:H},m&&{post_aggregation_methods:[m]},{aggregations:["dimension"!==x&&{method:v||"sum",groupBy:["chart"].concat(Object(C.a)(z))},"chart"!==x&&Object(g.a)({method:b,groupBy:z},A.length&&{labels:A})].filter(Boolean)})}:{params:{chart:r,_:(new Date).valueOf(),format:o,points:i,group:s,gtime:l,options:c,after:u,before:d,dimensions:h}},W=function(e){if(null===e||void 0===e?void 0:e.result){var t=k.fillMissingPoints,a=K(e,o,B),n=Object(g.a)({},a,{},"post_aggregated_data"in e.result&&{postAggregationMethod:m,groupBy:x,postGroupBy:f,aggrGroups:A,postAggregated:e.result.post_aggregated_data[m]});Ce.put(_e.c.success({chartData:t?Y(n,t):n,fetchDataParams:k,id:j}))}else Ce.put(_e.c.failure({id:j}))},V=function(e){console.warn("fetch chart data failure",e),Ce.put(_e.c.failure({id:j}))},Pe.next(Object(g.a)({},G,{method:y||"GET",url:N,onErrorCallback:V,onSuccessCallback:W,cancelTokenSource:T}));case 25:case"end":return E.stop()}}),Oe)}var Le=z(1),Ie=Object(A.a)(Le,2),Ne=Ie[0],Re=Ie[1];function Fe(e){var t=e.payload,a=t.host,n=t.chart,r=t.format,o=t.points,i=t.group,s=t.gtime,l=t.options,c=t.after,u=t.before,d=t.dimensions,h=t.aggrMethod,p=t.groupBy,f=t.nodeIDs,m=t.chartLibrary,b=t.id,v="".concat(n,",").concat(m,",").concat(ke(d,l)),_="".concat(Object(D.a)(a),"api/v1/data"),y=Object(g.a)({chart:n,_:(new Date).valueOf(),format:r,points:o,group:i,gtime:s,options:l,after:c,before:u,dimensions:d},h&&{aggr_method:h},{},f&&{node_ids:f.join(",")},{},p&&{groupBy:p});Ne.next({url:_,params:y,onErrorCallback:function(){Ce.put(_e.e.failure({id:b})),window.chartUpdated({chartDataUniqueID:v,chart:n,data:null})},onSuccessCallback:function(e){Ce.put(_e.e.success({snapshotData:e,id:b})),window.chartUpdated({chartDataUniqueID:v,data:e})}})}function Be(){Re.next()}function He(e){var t,a,n,r,o,i,s;return E.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return t=e.payload,a=t.chart,n=t.id,r=t.host,l.next=4,Object(S.d)(ue.E);case 4:if(!(o=l.sent)){l.next=9;break}return l.next=8,Object(S.c)(_e.b.success({chartMetadata:o.charts.charts[a],id:n}));case 8:return l.abrupt("return");case 9:return s=U.b?"".concat(Object(D.a)(r),"api/v1/chart"):r.replace("/data","/chart"),l.prev=10,l.next=13,Object(S.a)(T.get,s,{params:{chart:a}});case 13:i=l.sent,l.next=22;break;case 16:return l.prev=16,l.t0=l.catch(10),console.warn("fetch chart details failure"),l.next=21,Object(S.c)(_e.b.failure({id:n}));case 21:return l.abrupt("return");case 22:return l.next=24,Object(S.c)(_e.b.success({chartMetadata:i.data,id:n}));case 24:case"end":return l.stop()}}),xe,null,[[10,16]])}function ze(e){var t,a,n,r,o,i,s,l,c,u,d;return E.a.wrap((function(p){for(;;)switch(p.prev=p.next){case 0:return t=e.payload,a=t.poll,n=!1,r=!1,o=!1,i=!1,p.prev=6,p.next=9,Object(S.d)(ue.y);case 9:return s=p.sent,l=null===s||void 0===s?void 0:s.isCloudAvailable,c=null===s||void 0===s?void 0:s.isACLKAvailable,p.next=14,Object(S.a)(T.get,"".concat(D.b,"/api/v1/info"));case 14:return u=p.sent,d=u.data,o=(null===d||void 0===d?void 0:d["cloud-available"])||!1,n=(null===d||void 0===d?void 0:d["cloud-enabled"])||!1,r=(null===d||void 0===d?void 0:d["agent-claimed"])||!1,i=(null===d||void 0===d?void 0:d["aclk-available"])||!1,p.next=22,Object(S.c)(_e.f.success({isCloudAvailable:o,isCloudEnabled:n,isAgentClaimed:r,isACLKAvailable:i,fullInfoPayload:d}));case 22:n&&null===l&&!o&&le(),o&&r&&!1!==c&&!i&&ce(),p.next=31;break;case 26:return p.prev=26,p.t0=p.catch(6),console.warn("fetch agent info failure"),p.next=31,Object(S.c)(_e.f.failure());case 31:if(!(a&&n&&r)){p.next=36;break}return p.next=34,Object(S.b)(h.b);case 34:return p.next=36,Object(S.c)(Object(_e.f)({poll:!0}));case 36:case"end":return p.stop()}}),we,null,[[6,26]])}function Ue(){return E.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(S.g)(_e.c.request,Me);case 2:return e.next=4,Object(S.g)(_e.b.request,He);case 4:return e.next=6,Object(S.g)(_e.e.request,Fe);case 6:return e.next=8,Object(S.g)(b.f,Be);case 8:return e.next=10,Object(S.g)(_e.f.request,ze);case 10:return e.next=12,Object(S.e)(Ae);case 12:case"end":return e.stop()}}),Ee)}var Ge=a(284),We=a(553),Ve=a(28),Ye=a(98),Xe=.2,Ke=a(12),Ze=a(532),qe=a(49),$e=a(219),Je=a(142),Qe=E.a.mark(mt),et=E.a.mark(vt),tt=E.a.mark(_t),at=E.a.mark(yt),nt=E.a.mark(Ot),rt=E.a.mark(xt),ot=E.a.mark(wt),it=1e3,st=1e4,lt=500,ct="Notification"in window,ut=window.netdataAlarmsNotifCallback,dt=0,ht=0,pt=function(e){"object"===typeof e&&(function(e){if("string"===typeof e){var t=document.querySelector("#chart_".concat(Object(Je.a)(e)));if(t){var a=t.offsetTop+-50;return document.querySelector("html").scrollTop=a,!0}}return!1}(e.chart)&&window.focus())},ft=function(){ct&&"default"===Notification.permission&&Notification.requestPermission()},gt=function(){return ct&&"granted"===Notification.permission};function mt(e,t){var a,n;return E.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,Object(S.a)(T.get,"".concat(t,"/api/v1/alarm_log?after=").concat(e));case 3:return a=r.sent,n=a.data,r.abrupt("return",n);case 8:return r.prev=8,r.t0=r.catch(0),console.warn("Error fetching alarms log",r.t0),r.abrupt("return",null);case 12:case"end":return r.stop()}}),Qe,null,[[0,8]])}var bt=function(e,t,a){if(!e.updated){var n=e.value_string,r=t.alarms["".concat(e.chart,".").concat(e.name)];"undefined"!==typeof r&&e.status===r.status&&"undefined"!==typeof r.value_string&&(n=r.value_string);var o=e.name.replace(/_/g," "),i=e.status.toLowerCase(),s="".concat(o," = ").concat(n),l=e.alarm_id,c="images/banner-icon-144x144.png",u=!1,d=!0;switch(e.status){case"REMOVED":d=!1;break;case"UNDEFINED":case"UNINITIALIZED":return;case"CLEAR":if(e.unique_idht})),o=r.map((function(e){return bt(e,t,dt)})).filter((function(e){return void 0!==e})),i=0;case 13:if(!(iht)){a.next=12;break}return a.next=10,Object(S.a)(vt,e,t);case 10:if(!1!==t.status){a.next=12;break}return a.abrupt("break",16);case 12:return a.next=14,Object(S.b)(st);case 14:a.next=0;break;case 16:case"end":return a.stop()}}),at)}function Ot(){var e,t,a;return E.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Object(S.f)(Ke.A);case 2:return e=n.sent,t=e.payload,a=t.serverDefault,n.next=7,Object(S.b)(it);case 7:return ht=+(localStorage.getItem("last_notification_id")||ht),ft(),n.next=11,Object(S.a)(yt,a);case 11:case"end":return n.stop()}}),nt)}function xt(e){var t,a,n,r;return E.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.payload,a=t.callback,n=t.serverDefault,o.next=4,Object(S.a)(_t,"all",n);case 4:r=o.sent,a(r);case 6:case"end":return o.stop()}}),rt)}function wt(){return E.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(S.e)(Ot);case 2:return e.next=4,Object(S.g)(Ke.e.request,xt);case 4:case"end":return e.stop()}}),ot)}var Et=["","https://www.google.com/","https://duckduckgo.com/","https://www.reddit.com/"],St=function(e){return Et.includes(e)||e.endsWith(".my-netdata.io/")||e.startsWith("https://github.com/")||e.endsWith("netdata.cloud/")||e.startsWith("https://app.netdata.cloud/")},Ct=E.a.mark(Lt),At=E.a.mark(It),kt=E.a.mark(Nt),jt=E.a.mark(Bt),Tt=E.a.mark(Ut),Dt=E.a.mark(Gt),Pt=Object(c.a)();function Mt(){window.addEventListener("focus",(function(){Pt.put(Object(Ke.D)({hasWindowFocus:!0}))})),window.addEventListener("blur",(function(){Pt.put(Object(Ke.D)({hasWindowFocus:!1}))}))}function Lt(){var e;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,Object(S.f)(Pt);case 3:return e=t.sent,t.next=6,Object(S.c)(e);case 6:t.next=0;break;case 8:case"end":return t.stop()}}),Ct)}function It(){return E.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(S.f)(_e.f.success);case 2:return e.abrupt("return",e.sent.payload.fullInfoPayload);case 3:case"end":return e.stop()}}),At)}function Nt(e,t){var a,n,r,o,i,s;return E.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if(!window.posthog){l.next=2;break}return l.abrupt("return");case 2:return l.next=4,Object(S.d)(ue.k);case 4:if(l.t1=l.sent,l.t1){l.next=9;break}return l.next=8,Object(S.a)(It);case 8:l.t1=l.sent;case 9:if(l.t0=l.t1,l.t0){l.next=12;break}l.t0={};case 12:i=l.t0,function(e,t){var a,n,r,o;t.__SV||(window.posthog=t,t._i=[],t.init=function(i,s,l){function c(e,t){var a=t.split(".");2==a.length&&(e=e[a[0]],t=a[1]),e[t]=function(){e.push([t].concat(Array.prototype.slice.call(arguments,0)))}}(r=e.createElement("script")).type="text/javascript",r.async=!0,r.src=s.api_host+"/static/array.js",(o=e.getElementsByTagName("script")[0]).parentNode.insertBefore(r,o);var u=t;for(void 0!==l?u=t[l]=[]:l="posthog",u.people=u.people||[],u.toString=function(e){var t="posthog";return"posthog"!==l&&(t+="."+l),e||(t+=" (stub)"),t},u.people.toString=function(){return u.toString(1)+".people (stub)"},a="capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags".split(" "),n=0;n0?e({maxRedirects:n-1,machineGuid:a,name:r,registryServer:s.registry,url:i}):{registryServer:o};var u=s.urls.filter((function(e){return e[1]!==h.c}));return{personGuid:s.person_guid||null,registryServer:o,urls:u}})).catch((function(){return console.warn("error calling registry:",o),null}))},Ft=function(e){var t={};e.slice().reverse().forEach((function(e){var a=Object(A.a)(e,5),n=a[0],r=a[1],o=a[2],i=a[3],s=a[4],l=t[n]||{lastTimestamp:0,accesses:0,alternateUrls:[],guid:"",url:"",name:""},c=l.lastTimestampl&&(s+=(o-l)/2,o=l),o>n/20&&(s+=(o-n/20)/2,o=n/20);var c=a?" empty":" netdata",u=a?"noData":"loading";return r.a.createElement("div",{className:"netdata-message icon",style:{fontSize:o,paddingTop:s}},r.a.createElement(Sa.a,{iconType:u}),c)},Aa=a(541),ka=a(540),ja=function(e){return e.ctrlKey?window.NETDATA.options.current.pan_and_zoom_factor*window.NETDATA.options.current.pan_and_zoom_factor_multiplier_control:e.shiftKey?window.NETDATA.options.current.pan_and_zoom_factor*window.NETDATA.options.current.pan_and_zoom_factor_multiplier_shift:e.altKey?window.NETDATA.options.current.pan_and_zoom_factor*window.NETDATA.options.current.pan_and_zoom_factor_multiplier_alt:window.NETDATA.options.current.pan_and_zoom_factor},Ta=a(146),Da=a(100),Pa=function(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)},Ma=[],La=[],Ia=function(e,t){var a=t;return e===t?("undefined"===typeof Ma[a]&&(Ma[a]=new Intl.NumberFormat(void 0,{useGrouping:!0,minimumFractionDigits:e,maximumFractionDigits:t})),Ma[a]):0===e?("undefined"===typeof La[a]&&(La[a]=new Intl.NumberFormat(void 0,{useGrouping:!0,minimumFractionDigits:e,maximumFractionDigits:t})),La[a]):new Intl.NumberFormat(void 0,{useGrouping:!0,minimumFractionDigits:e,maximumFractionDigits:t})},Na=function(e,t,a){return function(n){if("number"!==typeof n)return"-";var r,o,i=e(n);if("number"!==typeof i)return i;if(null!==t)return t.format(i);if(-1!==a)r=a,o=a;else{r=0;var s=i<0?-i:i;o=s>1e3?0:s>10?1:s>1?2:s>.1?2:s>.01?4:s>.001?5:s>1e-4?6:7}return Ia(r,o).format(i)}},Ra=function(e){var t=e.attributes,a=e.data,r=e.units,o=e.unitsCommon,i=e.unitsDesired,s=e.uuid,l=Object(la.b)(ue.K),c=Object(la.b)(ue.z),u=Object(n.useState)((function(){return Ta.a})),d=Object(A.a)(u,2),h=d[0],p=d[1],f=Object(n.useState)(),g=Object(A.a)(f,2),m=g[0],b=g[1],v=Object(n.useState)(),_=Object(A.a)(v,2),y=_[0],O=_[1],x=Object(n.useState)(r),w=Object(A.a)(x,2),E=w[0],S=w[1],C=Object(n.useState)(-1),k=Object(A.a)(C,2),j=k[0],T=k[1],D=Object(n.useState)(null),P=Object(A.a)(D,2),M=P[0],L=P[1],I=t.decimalDigits,N=void 0===I?-1:I,R=Object(n.useMemo)((function(){return Na(h,M,N)}),[h,N,M]),F=Object(n.useRef)(R),B=function(e,t,a){F.current=Na(e,t,a)};return{legendFormatValue:R,legendFormatValueDecimalsFromMinMax:Object(n.useCallback)((function(e,t){if(Pa(m,e)&&Pa(y,t))return F.current;b(e),O(t);var n=Da.a.get(s,e,t,r,i,o,(function(e){S(e)}),l,c);p((function(){return n}));var u,d=n(e),h=n(t);if("number"!==typeof d||"number"!==typeof h)return B(n,M,N),F.current;if(a.min===a.max)u=-1;else if(-1!==N)u=N;else{var f;u=(f=d===h?Math.abs(d):Math.abs(h-d))>1e3?0:f>10?1:f>1?2:f>.1?2:f>.01?4:f>.001?5:f>1e-4?6:7}var g=M;return u!==j&&(g=u<0?null:Ia(u,u),L((function(){return g})),T(u)),B(n,g,u),F.current}),[j,N,m,y,s,l,r,i,o,c,a.min,a.max,M]),unitsCurrent:E}},Fa=a(55),Ba={r:255,g:0,b:0},Ha=a(17),za=$.d.div.withConfig({displayName:"chart-legend-bottomstyled__LegendContainer",componentId:"ltgk2z-0"})(["margin-bottom:",";padding-left:35px;"],Object(Z.H)(3)),Ua=$.d.div.withConfig({displayName:"chart-legend-bottomstyled__LegendFirstRow",componentId:"ltgk2z-1"})(["margin-top:4px;display:flex;justify-content:space-between;"]),Ga=$.d.div.withConfig({displayName:"chart-legend-bottomstyled__LegendSecondRow",componentId:"ltgk2z-2"})(["margin-top:4px;display:flex;justify-content:space-between;"]),Wa=$.d.div.withConfig({displayName:"chart-legend-bottomstyled__LegendUnit",componentId:"ltgk2z-3"})([""]),Va=$.d.span.withConfig({displayName:"chart-legend-bottomstyled__DateTimeSeparator",componentId:"ltgk2z-4"})(["margin:0 3px;"]),Ya=$.d.div.withConfig({displayName:"chart-legend-bottomstyled__LegendItems",componentId:"ltgk2z-5"})(["display:flex;flex-wrap:wrap;overflow:auto;max-height:80px;"]),Xa=$.d.div.withConfig({displayName:"chart-legend-bottomstyled__DimensionItem",componentId:"ltgk2z-6"})(["display:flex;align-items:center;color:",";margin-right:12px;cursor:pointer;opacity:",";user-select:none;font-size:11px;&:focus{outline:none;}"],(function(e){return e.color}),(function(e){return e.isDisabled?.3:null})),Ka=$.d.div.withConfig({displayName:"chart-legend-bottomstyled__DimensionItemToolboxPlaceholder",componentId:"ltgk2z-7"})(["width:140px;height:20px;"]),Za=$.d.div.withConfig({displayName:"chart-legend-bottomstyled__DimensionIcon",componentId:"ltgk2z-8"})(["width:14px;height:7px;border-radius:4px;overflow:hidden;background-color:",";"],(function(e){return e.color})),qa=$.d.span.withConfig({displayName:"chart-legend-bottomstyled__DimensionLabel",componentId:"ltgk2z-9"})(["margin-left:3px;"]),$a=$.d.span.withConfig({displayName:"chart-legend-bottomstyled__DimensionValue",componentId:"ltgk2z-10"})(["margin-left:5px;min-width:30px;"]),Ja=$.d.div.withConfig({displayName:"chart-legend-bottomstyled__ToolboxContainer",componentId:"ltgk2z-11"})(["position:relative;touch-action:none;"]),Qa={},en=Object(Ha.a)(Ea.f,(function(e){var t=e.dimension_names,a=e.keys;return{dimensionNames:t,keys:void 0===a?Qa:a}})),tn=function(e){var t=e.id,a=e.index,o=Object(la.b)(Object(n.useCallback)((function(e){return en(e,{id:t})}),[t])),i=o.dimensionNames,s=o.keys,l=s.chart,c=s.node;if(l&&c&&2===Object.keys(s).length)return r.a.createElement(qa,null,l[a],"@",c[a]);var u=i[a];return r.a.createElement(qa,null,u)},an=function(e){var t=e.chartUuid,a=e.chartMetadata,o=e.chartLibrary,i=e.colors,s=e.hoveredRow,l=e.hoveredX,c=e.legendFormatValue,u=e.onDimensionClick,d=e.selectedDimensions,h=e.showLatestOnBlur,p=e.unitsCurrent,f=e.viewBefore,g=Object(la.b)(Object(n.useCallback)((function(e){return Object(Ea.f)(e,{id:t})}),[t])),m=g.dimension_names,b=g.dimension_ids,v=-1===s&&!h,_=new Date(l||f),y=window.NETDATA.options.current["color_fill_opacity_".concat(a.chart_type)],O=Object(sa.b)(),x=O.localeDateString,w=O.localeTimeString,E=Object(n.useRef)(null);return Object(n.useEffect)((function(){E.current&&window.Ps.initialize(E.current,{wheelSpeed:.2,wheelPropagation:!0,swipePropagation:!0,minScrollbarLength:null,maxScrollbarLength:null,useBothWheelAxes:!1,suppressScrollX:!0,suppressScrollY:!1,scrollXMarginOffset:0,scrollYMarginOffset:0,theme:"default"})}),[E]),r.a.createElement("div",{className:va()("netdata-chart-legend","netdata-".concat(o,"-legend"))},r.a.createElement("span",{className:"netdata-legend-title-date",title:Object(Fa.c)(!0,a)},v?Object(Fa.c)(!1,a):x(_)),r.a.createElement("br",null),r.a.createElement("span",{className:"netdata-legend-title-time",title:Object(Fa.d)(g,a)},v?a.context.toString():w(_)),r.a.createElement("br",null),r.a.createElement("span",{className:"netdata-legend-title-units"},p),r.a.createElement("br",null),r.a.createElement("div",{className:"netdata-legend-series",ref:E},r.a.createElement("div",{className:"netdata-legend-series-content"},b.map((function(e,o){var l,h=m[o],p=i[h],f=function(e){if(!e)return Ba;var t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,a,n){return t+t+a+a+n+n})),a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return a||console.warn("wrong color format:",e),a?{r:parseInt(a[1],16),g:parseInt(a[2],16),b:parseInt(a[3],16)}:Ba}(p),b=0===d.length||d.includes(h);if(v)l=null;else if(-1!==s){var _=g.result.data[s];l=_?_[o+1]:null}else l=g.view_latest_values[o];return r.a.createElement(n.Fragment,{key:e},0!==o&&r.a.createElement("br",null),r.a.createElement("span",{title:h,className:va()("netdata-legend-name",b?"selected":"not-selected"),onClick:function(e){u(h,e)},role:"button",style:{color:p},tabIndex:0},r.a.createElement("table",{className:"netdata-legend-name-table-".concat(a.chart_type),style:{backgroundColor:"rgba(".concat(f.r,",").concat(f.g,",").concat(f.b,",").concat(y,")")}},r.a.createElement("tbody",null,r.a.createElement("tr",{className:"netdata-legend-name-tr"},r.a.createElement("td",{className:"netdata-legend-name-td"}))))," ",r.a.createElement(tn,{id:t,index:o})),r.a.createElement("span",{title:h,className:va()("netdata-legend-value",!b&&"hidden"),onClick:function(e){u(h,e)},role:"button",style:{color:p},tabIndex:0},c(l)))})))))},nn=function(e){var t=e.chartMetadata,a=e.showUndefined,n=e.hoveredX,o=e.viewBefore,i=e.chartData,s=Object(sa.b)(),l=s.localeDateString,c=s.localeTimeString,u=new Date(n||o);return r.a.createElement("div",null,r.a.createElement("span",{title:Object(Fa.c)(!0,t)},a?Object(Fa.c)(!1,t):l(u)),r.a.createElement(Va,null,"|"),r.a.createElement("span",{title:Object(Fa.d)(i,t)},a?t.context.toString():c(u)))},rn=function(e){var t=e.chartUuid,a=e.chartMetadata,o=e.colors,i=e.hoveredRow,s=e.hoveredX,l=e.legendFormatValue,c=e.onDimensionClick,u=e.selectedDimensions,d=e.showLatestOnBlur,h=e.unitsCurrent,p=e.viewBefore,f=e.legendToolbox,g=e.resizeHandler,m=-1===i&&!d,b=Object(la.b)(Object(n.useCallback)((function(e){return Object(Ea.f)(e,{id:t})}),[t])),v=b.dimension_names,_=b.dimension_ids;return r.a.createElement(za,null,r.a.createElement(Ua,null,r.a.createElement(Wa,null,h),r.a.createElement(nn,{chartMetadata:a,showUndefined:m,hoveredX:s,viewBefore:p,chartData:b})),r.a.createElement(Ga,null,r.a.createElement(Ya,null,_.map((function(e,a){var n,s=v[a],d=o[s],h=0===u.length||u.includes(s);if(m)n=null;else if(-1!==i){var p=b.result.data[i];n=p?p[a+1]:null}else n=b.view_latest_values[a];return r.a.createElement(Xa,{color:d,onClick:function(e){c(s,e)},role:"button",tabIndex:0,isDisabled:!h,key:e},r.a.createElement(Za,{title:s,color:d}),r.a.createElement(tn,{id:t,index:a}),r.a.createElement($a,null,h&&l(n)))})),r.a.createElement(Ka,null)),r.a.createElement(Ja,null,f,g)))},on=function(e){var t=e.attributes,a=e.chartUuid,o=e.chartMetadata,i=e.chartLibrary,s=e.colors,l=e.hoveredRow,c=e.hoveredX,u=e.legendFormatValue,d=e.selectedDimensions,h=e.setSelectedDimensions,p=e.showLatestOnBlur,f=e.unitsCurrent,g=e.viewBefore,m=e.legendToolbox,b=e.resizeHandler,v=Object(la.b)(Object(n.useCallback)((function(e){return Object(Ea.f)(e,{id:a}).dimension_names}),[a])),_=function(e,t){t.preventDefault();var a=t.shiftKey||t.ctrlKey,n=Object(Fa.b)({allDimensions:v,selectedDimensions:d,clickedDimensionName:e,isModifierKeyPressed:a});h(n)};return"bottom"===t.legendPosition?r.a.createElement(rn,{chartUuid:a,chartLibrary:i,chartMetadata:o,colors:s,hoveredRow:l,hoveredX:c,legendFormatValue:u,onDimensionClick:_,selectedDimensions:d,showLatestOnBlur:p,unitsCurrent:f,viewBefore:g,legendToolbox:m,resizeHandler:b}):r.a.createElement(an,{chartUuid:a,chartLibrary:i,chartMetadata:o,colors:s,hoveredRow:l,hoveredX:c,legendFormatValue:u,onDimensionClick:_,selectedDimensions:d,showLatestOnBlur:p,unitsCurrent:f,viewBefore:g})},sn=a(110),ln=function(e){var t=e.onToolboxLeftClick,a=e.onToolboxRightClick,n=e.onToolboxZoomInClick,o=e.onToolboxZoomOutClick;return r.a.createElement("div",{className:"netdata-legend-toolbox"},r.a.createElement(sn.a,{className:"netdata-legend-toolbox-button",onClick:t,iconType:"left",popoverTitle:"Pan Left",popoverContent:"Pan the chart to the left. You can also drag it with your mouse or your finger (on touch devices).
    Help can be disabled from the settings."}),r.a.createElement(sn.a,{className:"netdata-legend-toolbox-button",onClick:a,iconType:"right",popoverTitle:"Pan Right",popoverContent:"Pan the chart to the right. You can also drag it with your mouse or your finger (on touch devices).
    Help can be disabled from the settings."}),r.a.createElement(sn.a,{className:"netdata-legend-toolbox-button",onClick:n,iconType:"zoomIn",popoverTitle:"Chart Zoom In",popoverContent:"Zoom in the chart. You can also press SHIFT and select an area of the chart, or press SHIFT or ALT and use the mouse wheel or 2-finger touchpad scroll to zoom in or out.
    Help can be disabled from the settings."}),r.a.createElement(sn.a,{className:"netdata-legend-toolbox-button",onClick:o,iconType:"zoomOut",popoverTitle:"Chart Zoom Out",popoverContent:"Zoom out the chart. You can also press SHIFT or ALT and use the mouse wheel, or 2-finger touchpad scroll to zoom in or out.
    Help can be disabled from the settings."}))},cn=a(104),un=a(503),dn=a(534),hn=a(51),pn=a.n(hn),fn=(a(418),a(271)),gn=a(272),mn=a(500),bn=a(215),vn=a.n(bn),_n=function(e,t){return e.map((function(e){var a=Object(gn.a)(e),n=a[0],r=a.slice(1),o=[],i=0,s=0;return r.map((function(e,a){return{isVisible:t[a],value:e}})).slice().reverse().forEach((function(e){var t=e.isVisible,a=e.value;t?a>=0?(s+=a,o.push(s)):(i+=a,o.push(i)):o.push(0)})),[n].concat(o)}))},yn=function(e,t,a,n){var r,o=n.isLogScale(e),i=e.dygraphType,s=void 0===i?a.chart_type:i,l=e.groupBy;if(l&&"dimension"!==l&&("percentage"===(r=a.units)||"percent"===r||-1!==r.indexOf("%")))return"line";var c=s;return"stacked"===c&&1===t.dimensions&&(c="area"),"stacked"===c&&o&&(c="area"),c},On=Object(mn.a)(Object(da.a)("true"),(function(){return vn()(window.NETDATA.themes.current.background)})),xn=function(e){return e.map((function(e){return vn()(e).mix(On(),.2).hex()}))},wn=function(e,t){return e?window.NETDATA.options.current.color_fill_opacity_fake_stacked:"stacked"===t?window.NETDATA.options.current.color_fill_opacity_stacked:window.NETDATA.options.current.color_fill_opacity_area},En=(a(436),a(536)),Sn=function(e,t){var a=Object(En.a)(!1),r=Object(A.a)(a,2),o=r[0],i=r[1],s=Object(n.useRef)(null),l=Object(n.useCallback)((function(a){var n=a.getArea().x,r=a.toDomXCoord(1e3*t.current.chartData.first_entry),o=r>n;if(i(o),o&&s.current){var l=e.current.getBoundingClientRect().height;s.current.style.left="".concat(n,"px"),s.current.style.right="calc(100% - ".concat(r,"px)"),s.current.style.top="".concat(l/2,"px")}}),[]);return[o,s,l]},Cn=function(e,t,a,n){e.current.style.left="".concat(t,"px"),e.current.style.right="calc(100% - ".concat(a,"px)"),e.current.style.top=n},An=function(){var e=Object(En.a)(!1),t=Object(A.a)(e,2),a=t[0],r=t[1],o=Object(n.useRef)(null);return[a,o,function(e,t,a){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Cn;if(e){if(o.current){r(!0);var i=t.getArea(),s=i.x;n(o,s,a,"40px")}}else r(!1)}]},kn=$.d.div.withConfig({displayName:"proceeded-chart-disclaimer__Container",componentId:"sc-5o8wdv-0"})(["display:block;"]),jn=Object(n.forwardRef)((function(e,t){return r.a.createElement(kn,{ref:t,className:"dygraph__history-tip","data-testid":"proceededChartDisclaimer"},r.a.createElement("span",{className:"dygraph__history-tip-content"},"Want to extend your history of real-time metrics?",r.a.createElement("br",null),r.a.createElement("a",{href:"https://learn.netdata.cloud/guides/longer-metrics-storage/",target:"_blank",rel:"noopener noreferrer","data-testid":"proceededChartDisclaimer-configure"},"Configure Netdata's\xa0",r.a.createElement("b",null,"history")),"\xa0or use the\xa0",r.a.createElement("a",{href:"https://learn.netdata.cloud/docs/agent/database/engine/",target:"_blank",rel:"noopener noreferrer","data-testid":"proceededChartDisclaimer-engine"},"DB engine"),"."))})),Tn={WARNING:"#FFF8E1",CRITICAL:"#FFEBEF",CLEAR:"#E5F5E8"},Dn=function(e){return Tn[e]||null},Pn={WARNING:"#FFC300",CRITICAL:"#F59B9B",CLEAR:"#68C47D"},Mn=function(e){return Pn[e]||null},Ln={WARNING:"#536775",CRITICAL:"#FF4136",CLEAR:"#00AB44"},In=function(e){return Ln[e]||null},Nn=$.d.div.withConfig({displayName:"alarmBadge__Container",componentId:"tz967u-0"})(["position:absolute;margin-right:10px;overflow:hidden;pointer-events:none;direction:rtl;z-index:10;"]),Rn=$.d.div.withConfig({displayName:"alarmBadge__Badge",componentId:"tz967u-1"})(["display:inline-block;border-radius:36px;padding:2px 12px;background:",";border:1px solid ",";color:",";font-size:12px;font-weight:700;direction:ltr;white-space:nowrap;"],(function(e){return e.background}),(function(e){return e.border}),(function(e){return e.color})),Fn=Object(n.forwardRef)((function(e,t){var a=e.isVisible,n=e.status,o=e.label;return r.a.createElement(Nn,{ref:t},a&&r.a.createElement(Rn,{background:Dn(n),border:Mn(n),color:In(n)},o))})),Bn=$.d.div.withConfig({displayName:"neutralPill__Container",componentId:"gtu76-0"})(["position:absolute;margin-right:10px;overflow:hidden;pointer-events:none;direction:rtl;z-index:10;"]),Hn=$.d.div.withConfig({displayName:"neutralPill__Badge",componentId:"gtu76-1"})(["display:inline-block;border-radius:36px;padding:2px 12px;background:",";border:1px solid ",";color:",";font-size:12px;font-weight:700;direction:ltr;white-space:nowrap;"],Object(Z.F)("mainBackground"),Object(Z.F)("border"),Object(Z.F)("text")),zn=Object(n.forwardRef)((function(e,t){var a=e.isVisible,n=(e.before-e.after)/1e3;return r.a.createElement(Bn,{ref:t},a&&r.a.createElement(Hn,null,Math.round(n)," sec.",function(e){return e<15?" (Select at least 15 sec)":e>180?" (Select up to 180 sec)":""}(n)))})),Un=function(e){var t=e.attributes,a=e.chartData,n=e.chartMetadata,r=e.chartSettings,o=e.dimensionsVisibility,i=e.hiddenLabelsElementId,s=e.isFakeStacked,l=e.orderedColors,c=e.setMinMax,u=e.shouldSmoothPlot,d=e.unitsCurrent,h=e.xAxisDateString,p=e.xAxisTimeString,f="sparkline"===t.dygraphTheme,g=f?3:4,m=r.isLogScale(t),b=yn(t,a,n,r),v=t.dygraphSmooth,_=void 0===v?"line"===b&&!f:v,y=t.dygraphDrawAxis,O=void 0===y||y,x="bottom"===t.legendPosition,w=t.dygraphColors,E=void 0===w?l:w,S=t.dygraphRightGap,C=void 0===S?5:S,A=t.dygraphShowRangeSelector,k=void 0!==A&&A,j=t.dygraphShowRoller,T=void 0!==j&&j,D=t.dygraphTitle,P=void 0===D?t.title||n.title:D,M=t.dygraphTitleHeight,L=void 0===M?19:M,I=t.dygraphLegend,N=void 0===I?"always":I,R=t.dygraphLabelsDiv,F=void 0===R?i:R,B=t.dygraphLabelsSeparateLine,H=void 0===B||B,z=t.dygraphIncludeZero,U=void 0===z?"stacked"===b:z,G=t.dygraphShowZeroValues,V=void 0===G||G,Y=t.dygraphShowLabelsOnHighLight,X=void 0===Y||Y,K=t.dygraphHideOverlayOnMouseOut,Z=void 0===K||K,q=t.dygraphXRangePad,$=void 0===q?0:q,J=t.dygraphYRangePad,Q=void 0===J?1:J,ee=t.dygraphValueRange,te=void 0===ee?[null,null]:ee,ae=t.dygraphYLabelWidth,ne=void 0===ae?12:ae,re=t.dygraphStrokeWidth,oe=void 0===re?"stacked"===b?.1:!0===_?1.5:.7:re,ie=t.dygraphStrokePattern,se=t.dygraphDrawPoints,le=void 0!==se&&se,ce=t.dygraphDrawGapEdgePoints,ue=void 0===ce||ce,de=t.dygraphConnectSeparatedPoints,he=void 0!==de&&de,pe=t.dygraphPointSize,fe=void 0===pe?1:pe,ge=t.dygraphStepPlot,me=void 0!==ge&&ge,be=t.dygraphStrokeBorderColor,ve=void 0===be?window.NETDATA.themes.current.background:be,_e=t.dygraphStrokeBorderWidth,ye=void 0===_e?0:_e,Oe=t.dygraphFillGraph,xe=void 0===Oe?"area"===b||"stacked"===b:Oe,we=t.dygraphFillAlpha,Ee=void 0===we?wn(s,b):we,Se=t.dygraphStackedGraph,Ce=void 0===Se?"stacked"===b&&!s:Se,Ae=t.dygraphStackedGraphNanFill,ke=void 0===Ae?"none":Ae,je=t.dygraphAxisLabelFontSize,Te=void 0===je?10:je,De=t.dygraphAxisLineColor,Pe=void 0===De?window.NETDATA.themes.current.axis:De,Me=t.dygraphAxisLineWidth,Le=void 0===Me?1:Me,Ie=t.dygraphDrawGrid,Ne=void 0===Ie||Ie,Re=t.dygraphGridLinePattern,Fe=t.dygraphGridLineWidth,Be=void 0===Fe?1:Fe,He=t.dygraphGridLineColor,ze=void 0===He?window.NETDATA.themes.current.grid:He,Ue=t.dygraphMaxNumberWidth,Ge=void 0===Ue?8:Ue,We=t.dygraphSigFigs,Ve=t.dygraphDigitsAfterDecimal,Ye=void 0===Ve?2:Ve,Xe=t.dygraphHighlighCircleSize,Ke=void 0===Xe?g:Xe,Ze=t.dygraphHighlightSeriesOpts,qe=t.dygraphHighlightSeriesBackgroundAlpha,$e=t.dygraphXPixelsPerLabel,Je=void 0===$e?50:$e,Qe=t.dygraphXAxisLabelWidth,et=void 0===Qe?60:Qe,tt=t.dygraphDrawXAxis,at=void 0===tt?O:tt,nt=t.dygraphYPixelsPerLabel,rt=void 0===nt?15:nt,ot=t.dygraphYAxisLabelWidth,it=void 0===ot?x?30:50:ot,st=t.dygraphDrawYAxis,lt=void 0===st?O:st;return{colors:s?xn(Object(W.a)(E)):E,rightGap:f?0:C,showRangeSelector:k,showRoller:T,title:f?void 0:P,titleHeight:L,legend:N,labels:a.result.labels,labelsDiv:F,labelsSeparateLines:!!f||H,labelsShowZeroValues:!m&&V,labelsKMB:!1,labelsKMG2:!1,showLabelsOnHighlight:X,hideOverlayOnMouseOut:Z,includeZero:U,xRangePad:$,yRangePad:f?1:Q,valueRange:te,ylabel:f||x?void 0:d,yLabelWidth:f||x?0:ne,plotter:_&&u?window.smoothPlotter:null,strokeWidth:oe,strokePattern:ie,drawPoints:le,drawGapEdgePoints:ue,connectSeparatedPoints:!m&&he,pointSize:fe,stepPlot:me,strokeBorderColor:ve,strokeBorderWidth:ye,fillGraph:xe,fillAlpha:Ee,stackedGraph:Ce,stackedGraphNaNFill:ke,drawAxis:!f&&O,axisLabelFontSize:Te,axisLineColor:Pe,axisLineWidth:Le,drawGrid:!f&&Ne,gridLinePattern:Re,gridLineWidth:Be,gridLineColor:ze,maxNumberWidth:Ge,sigFigs:We,digitsAfterDecimal:Ye,highlightCircleSize:Ke,highlightSeriesOpts:Ze,highlightSeriesBackgroundAlpha:qe,visibility:o,logscale:m,axes:{x:{pixelsPerLabel:Je,ticker:pn.a.dateTicker,axisLabelWidth:et,drawAxis:!f&&at,axisLabelFormatter:function(e){return e.toTimeString().startsWith("00:00:00")?h(e):p(e)}},y:{logscale:m,pixelsPerLabel:rt,axisLabelWidth:it,drawAxis:!f&<,axisLabelFormatter:function(e){return c([this.axes_[0].extremeRange[0],this.axes_[0].extremeRange[1]])(e)}}}}},Gn=function(e){var t=e.attributes,a=e.chartData,o=e.chartMetadata,i=e.chartElementClassName,s=e.chartElementId,l=e.chartLibrary,c=e.chartUuid,u=e.dimensionsVisibility,d=e.hasEmptyData,h=e.hasLegend,p=e.isRemotelyControlled,f=e.onUpdateChartPanAndZoom,m=e.orderedColors,b=e.immediatelyDispatchPanAndZoom,v=e.hoveredRow,_=e.hoveredX,y=e.setGlobalChartUnderlay,O=e.setHoveredX,x=e.setMinMax,w=e.unitsCurrent,E=e.viewAfter,S=e.viewBefore,k=Object(la.b)(ue.l),j=Object(la.b)(ue.d),T=(null===j||void 0===j?void 0:j.chartId)===a.id?j:null,D=Object(la.b)(ue.M),P=Object(sa.b)(),M=P.xAxisDateString,L=P.xAxisTimeString,I=ya[l],N="".concat(c,"-hidden-labels-id"),R=yn(t,a,o,I),F=a.min<0&&"stacked"===R,B=wn(F,R),H=Object(n.useRef)(null),z=Object(n.useCallback)((function(e){var t=e.after,a=e.before,n=e.callback,r=e.shouldNotExceedAvailableRange;f({after:t,before:a,callback:n,masterID:c,shouldNotExceedAvailableRange:r})}),[c,f]),U=Object(n.useRef)(),G=Object(n.useRef)(!1),V=Object(n.useRef)(!1),Y=Object(n.useRef)(null),X=Object(n.useRef)(0),K=Object(n.useRef)(0),Z=Object(n.useRef)(),q=Object(la.a)(),$=Object(la.b)(ue.I),J=Object(n.useCallback)((function(){G.current=!1,U.current&&U.current.updateOptions({dateWindow:null}),q($?Object(Ke.j)():Object(_e.g)({id:c}))}),[c,q,$]),Q=An(),ee=Object(A.a)(Q,3),te=ee[0],ae=ee[1],ne=ee[2],re=An(),oe=Object(A.a)(re,3),ie=oe[0],se=oe[1],le=oe[2],ce=Object(n.useRef)({alarm:T,chartData:a,globalChartUnderlay:k,hoveredX:_,immediatelyDispatchPanAndZoom:b,resetGlobalPanAndZoom:J,setGlobalChartUnderlay:y,updateAlarmBadge:ne,updateHighlightBadge:le,updateChartPanOrZoom:z,viewAfter:E,viewBefore:S}),de=Sn(H,ce),he=Object(A.a)(de,3),pe=he[0],fe=he[1],ge=he[2];Object(n.useLayoutEffect)((function(){ce.current.alarm=T,ce.current.chartData=a,ce.current.hoveredX=_,ce.current.immediatelyDispatchPanAndZoom=b,ce.current.globalChartUnderlay=k,ce.current.resetGlobalPanAndZoom=J,ce.current.setGlobalChartUnderlay=y,ce.current.updateAlarmBadge=ne,ce.current.updateHighlightBadge=le,ce.current.updateChartPanOrZoom=z,ce.current.viewAfter=E,ce.current.viewBefore=S}),[T,a,k,_,b,J,y,ne,le,z,E,S]);var me=Object(n.useState)(null),be=Object(A.a)(me,2),ve=be[0],ye=be[1],Oe=Object(la.b)(ue.D);Object(n.useLayoutEffect)((function(){if(H&&H.current&&!U.current&&!d){var e=Un({attributes:t,chartData:a,chartMetadata:o,chartSettings:I,dimensionsVisibility:u,hiddenLabelsElementId:N,isFakeStacked:F,orderedColors:m,setMinMax:x,shouldSmoothPlot:Oe,unitsCurrent:w,xAxisDateString:M,xAxisTimeString:L});G.current=!1;var n=Object(g.a)({},e,{dateWindow:[ce.current.viewAfter,ce.current.viewBefore],highlightCallback:function(e,t){var a=V.current?null:t;a!==ce.current.hoveredX&&O(a)},unhighlightCallback:function(){null!==ce.current.hoveredX&&O(null)},drawCallback:function(e){if(G.current){G.current=!1;var t=e.xAxisRange(),a=Math.round(t[0]),n=Math.round(t[1]);(function(e){var t=e.after,a=e.before,n=e.chartData;return t>=1e3*n.first_entry&&a<=1e3*n.last_entry})({after:a,before:n,chartData:ce.current.chartData})&&ce.current.updateChartPanOrZoom({after:a,before:n})}},zoomCallback:function(e,t){G.current=!0,ce.current.updateChartPanOrZoom({after:e,before:t})},underlayCallback:function(e,t,a){if(ge(a),ce.current.alarm){var n=ce.current.alarm,r=a.toDomXCoord(1e3*n.when),o=Mn(n.status);requestAnimationFrame((function(){e.fillStyle=o;var a=e.globalAlpha;e.globalAlpha=.7,e.fillRect(r-3,t.y,6,t.h),e.globalAlpha=a})),ce.current.updateAlarmBadge(ce.current.alarm,a,r-3)}if(Object(Wt.c)("metrics_correlation")&&ce.current.globalChartUnderlay){var i=ce.current.globalChartUnderlay,s=i.before,l=i.masterID;if(l&&l!==ce.current.chartData.id)ce.current.updateHighlightBadge(!1);else{ce.current.updateHighlightBadge(!0,a,a.toDomXCoord(s),(function(e,t,a,n){e.current.style.left="".concat(a+3,"px"),e.current.style.top=n}))}}else ce.current.updateHighlightBadge(!1);if(ce.current.globalChartUnderlay){var c=ce.current.globalChartUnderlay,u=c.after,d=c.before;if(u1e4;return t&&e.parentNode.removeChild(e),!t})),q(Object(Ke.t)()),e.button&&1===e.button?e.shiftKey?(Y.current=null,pn.a.startPan(e,t,a)):e.altKey||e.ctrlKey||e.metaKey?(Y.current=t.toDataXCoord(e.offsetX),pn.a.startZoom(e,t,a)):(Y.current=null,pn.a.startZoom(e,t,a)):e.shiftKey?(Y.current=null,pn.a.startZoom(e,t,a)):e.altKey||e.ctrlKey||e.metaKey?(Y.current=t.toDataXCoord(e.offsetX),pn.a.startZoom(e,t,a)):(Y.current=null,pn.a.startPan(e,t,a)))},mousemove:function(e,t,a){if(null!==Y.current){if(G.current=!0,pn.a.moveZoom(e,t,a),Object(Wt.c)("metrics_correlation")){var n=t.toDataXCoord(e.offsetX),r=Y.current;n-r>1e3&&(ye({after:r,before:n}),ce.current.updateHighlightBadge(!0,t,t.toDomXCoord(n),(function(e,t,a,n){e.current.style.left="".concat(a,"px"),e.current.style.top=n})))}e.preventDefault()}else a.isPanning?(G.current=!0,a.is2DPan=!1,pn.a.movePan(e,t,a)):a.isZooming&&pn.a.moveZoom(e,t,a)},mouseup:function(e,t,n){if(V.current=!1,null!==Y.current){var r=Object(Ze.a)((function(e){return+e}),[Y.current,t.toDataXCoord(e.offsetX)]);ce.current.setGlobalChartUnderlay({after:r[0],before:r[1],masterID:a.id}),Y.current=null,ye(null),n.isZooming=!1,t.clearZoomRect_(),t.drawGraph_(!1)}else n.isPanning?(G.current=!0,pn.a.endPan(e,t,n),ce.current.immediatelyDispatchPanAndZoom()):n.isZooming&&(G.current=!0,pn.a.endZoom(e,t,n),ce.current.immediatelyDispatchPanAndZoom())},wheel:function(e,t){function a(e,t,a){var n=(e[1]-e[0])*t,r=[n*a,n*(1-a)];return[e[0]+r[0],e[1]-r[1]]}if(e.altKey||e.shiftKey){var n;G.current=!0,n="number"!==typeof e.wheelDelta||Number.isNaN(e.wheelDelta)?-1.2*e.deltaY:e.wheelDelta/40;var r=(e.detail?-1*e.detail:n)/50,o=function(e,t,a){var n=e.toDomXCoord(e.xAxisRange()[0]),r=e.yAxisRange(0),o=e.toDomYCoord(r[1]),i=t-n,s=a-o,l=e.toDomXCoord(e.xAxisRange()[1])-n,c=e.toDomYCoord(r[0])-o;return[0===l?0:i/l,1-(0===c?0:s/c)]}(t,e.offsetX,e.offsetY),i=o[0],s=o[1],l=function(e,t,n,r){for(var o=e.yAxisRanges(),i=[],s=0;s5e3,o=S<=0&&n[1]>S&&n[0]>E&&!r,i=p&&!o?{dateWindow:e}:{},s=t.dygraphColors,l=void 0===s?m:s,c=F?_n(a.result.data,u):a.result.data,h=1===u.length||u.filter((function(e){return!0===e})).length>1;U.current.updateOptions(Object(g.a)({},i,{colors:F?xn(Object(W.a)(l)):l,file:c,labels:a.result.labels,fillAlpha:B},"stacked"===R?{includeZero:h}:{},{stackedGraph:"stacked"===R&&!F,visibility:F?Object(W.a)(u):u}))}}),[t,a.result,c,u,R,B,d,F,p,m,E,S]),Object(fa.a)((function(){if(U.current){var e=Un({attributes:t,chartData:a,chartMetadata:o,chartSettings:I,dimensionsVisibility:u,hiddenLabelsElementId:N,isFakeStacked:F,orderedColors:m,setMinMax:x,shouldSmoothPlot:Oe,unitsCurrent:w,xAxisDateString:M,xAxisTimeString:L});d||U.current.updateOptions(e)}}),[R,D]);var we=Object(la.b)(ue.p);Object(n.useLayoutEffect)((function(){if(U.current&&we!==c){if(-1===v)return void(-1!==U.current.getSelection()&&U.current.clearSelection());U.current.setSelection(v)}}),[a,c,we,v,E,S]);var Ee=Object(la.b)((function(e){return Object(Ea.l)(e,{id:c})}));Object(n.useLayoutEffect)((function(){U.current&&U.current.resize()}),[Ee,a.dimension_names.length]);var Se=Object(la.b)((function(e){return t.commonMin?Object(ue.h)(e,t.commonMin):void 0})),Ce=Object(la.b)((function(e){return t.commonMax?Object(ue.g)(e,t.commonMax):void 0}));Object(n.useLayoutEffect)((function(){var e=t.commonMin,a=t.commonMax;if(U.current&&(e||a)){var n=U.current.yAxisExtremes()[0],r=Object(A.a)(n,2),o=r[0],i=r[1],s=t.dygraphValueRange,l=void 0===s?[null,null]:s,u=null===l[0],d=null===l[1],h=!1,p=Object(C.a)(n);if(e&&u&&Se&&Se.currentExtremei&&(p[1]=Ce.currentExtreme,h=!0),h){U.current.updateOptions({valueRange:p});var f=U.current.yAxisExtremes()[0];p=Object(C.a)(f)}e&&u&&p[0]!==(null===Se||void 0===Se?void 0:Se.charts[c])&&q(Object(Ke.p)({chartUuid:c,commonMinKey:e,value:p[0]})),a&&d&&p[1]!==(null===Ce||void 0===Ce?void 0:Ce.charts[c])&&q(Object(Ke.o)({chartUuid:c,commonMaxKey:a,value:p[1]}))}}),[t,a.result,c,Se,Ce,q]),Object(n.useLayoutEffect)((function(){pe&&U.current&&ge(U.current)}),[pe]),Object(ga.a)((function(){U.current&&U.current.destroy()}));var Ae=Object(n.useRef)();Object(dn.a)((function(){if(t.detectResize){var e=!1,a=function(e,t){var a=null;return function(){for(var n=arguments.length,r=new Array(n),o=0;o0&&(o=0),!e.isMaxOverride&&s<0&&(s=0),o<0&&s>0?(s=-o>s?-o:s,t=Math.round(100*n/s)):n>=0&&o>=0&&s>=0?0===(t=Math.round(100*(n-o)/(s-o)))&&(t=.1):0===(t=Math.round(100*(n-s)/(s-o)))&&(t=-.1),t}({value:p?0:O,min:C[0],max:C[1],isMinOverride:void 0!==t.easyPieChartMinValue,isMaxOverride:void 0!==t.easyPieChartMaxValue});Object(n.useEffect)((function(){if(g.current&&!v){var e=Object(ua.a)([[function(e){return e<3},Object(da.a)(2)],[ha.a,Ta.a]])(Math.floor(l/22)),a=t.easyPieChartTrackColor,n=void 0===a?window.NETDATA.themes.current.easypiechart_track:a,r=t.easyPieChartScaleColor,o=void 0===r?window.NETDATA.themes.current.easypiechart_scale:r,i=t.easyPieChartScaleLength,s=void 0===i?5:i,c=t.easyPieChartLineCap,u=void 0===c?"round":c,h=t.easyPieChartLineWidth,p=void 0===h?e:h,f=t.easyPieChartTrackWidth,m=t.easyPieChartSize,b=void 0===m?l:m,y=t.easyPieChartRotate,O=void 0===y?0:y,x=t.easyPieChartAnimate,w=void 0===x?{duration:500,enabled:!0}:x,E=t.easyPieChartEasing,S=new Vn.a(g.current,{barColor:d[0],trackColor:n,scaleColor:o,scaleLength:s,lineCap:u,lineWidth:p,trackWidth:f,size:b,rotate:O,animate:w,easing:E});_(S)}}),[t,a,v,l,d]),Object(n.useEffect)((function(){if(v){var e=-1===c&&!p;e&&!v.options.animate.enabled?v.enableAnimation():!e&&v.options.animate.enabled&&v.disableAnimation(),setTimeout((function(){v.update(k)}),0)}}),[v,c,k,p]);var j=2*l/3/5,T=Math.round((l-j-l/40)/2),D=Math.round(1.6*j/3),P=Math.round(T-2*D-l/40),M=Math.round(.9*D),L=Math.round(T+(j+M)+l/40);return r.a.createElement("div",{ref:g,id:s,className:i},r.a.createElement("span",{className:"easyPieChartLabel",style:{fontSize:j,top:T}},u(O)),r.a.createElement("span",{className:"easyPieChartTitle",style:{fontSize:D,top:P}},t.title||o.title),r.a.createElement("span",{className:"easyPieChartUnits",style:{fontSize:M,top:L}},f))},Kn=a(275),Zn=function(e){return"number"===typeof e},qn=function(e){var t=e.attributes,a=e.chartData,o=e.chartMetadata,i=e.chartElementClassName,s=e.chartElementId,l=e.chartUuid,c=e.chartHeight,u=e.chartWidth,d=e.hoveredRow,h=e.legendFormatValue,p=e.orderedColors,f=e.setMinMax,g=e.showUndefined,m=e.unitsCurrent,b=Object(n.useRef)(null),v=Object(n.useState)(),_=Object(A.a)(v,2),y=_[0],O=_[1],x=-1===d?0:a.result.length-1-d,w=a.result[x],E=t.gaugeMinValue,S=t.gaugeMaxValue,C=Zn(E)?E:a.min,k=Zn(S)?S:a.max,j=Object(de.a)(Object(Yn.a)((function(e){return+e})),(function(e){var t=Object(A.a)(e,2),a=t[0],n=t[1];return[!Zn(E)&&a>0?0:a,!Zn(S)&&n<0?0:n]}),Object(Ze.a)(Ta.a),(function(e){var t=Object(A.a)(e,2),a=t[0],n=t[1];return[Math.min(a,w),Math.max(n,w)]}))([C,k]),T=Object(A.a)(j,2),D=T[0],P=T[1];Object(n.useEffect)((function(){f([D,P])}),[D,P]);var M=Object(de.a)(Object(da.a)(100*(w-D)/(P-D)),(function(e){return Math.max(.001,e)}),(function(e){return Math.min(99.999,e)}))();Object(n.useEffect)((function(){if(b.current&&!y){var e=t.gaugePointerColor,a=void 0===e?window.NETDATA.themes.current.gauge_pointer:e,n=t.gaugeStrokeColor,r=void 0===n?window.NETDATA.themes.current.gauge_stroke:n,o=t.gaugeStartColor,i=void 0===o?p[0]:o,s=t.gaugeStopColor,l=t.gaugeGenerateGradient,c={lines:12,angle:.14,lineWidth:.57,radiusScale:1,pointer:{length:.85,strokeWidth:.045,color:a},limitMax:!0,limitMin:!0,colorStart:i,colorStop:s,strokeColor:r,generateGradient:!0===(void 0!==l&&l),gradientType:0,highDpiSupport:!0},u=new Kn.Gauge(b.current).setOptions(c);u.minValue=0,u.maxValue=100,O(u)}}),[t,a,y,u,p]),Object(n.useEffect)((function(){if(y){var e=-1===d&&!g?32:1e9;y.animationSpeed=e,setTimeout((function(){y.set(g?0:M)}),0)}}),[y,c,u,d,M,g]);var L=Math.floor(c/5),I=Math.round((c-L)/3.2),N=Math.round(L/2.1),R=Math.round(.9*N),F=Math.round(.75*L);return r.a.createElement("div",{id:s,className:i},r.a.createElement("canvas",{ref:b,className:"gaugeChart",id:"gauge-".concat(l,"-canvas"),style:{width:u,height:c}}),r.a.createElement("span",{className:"gaugeChartLabel",style:{fontSize:L,top:I}},h(g?null:w)),r.a.createElement("span",{className:"gaugeChartTitle",style:{fontSize:N,top:0}},t.title||o.title),r.a.createElement("span",{className:"gaugeChartUnits",style:{fontSize:R}},m),r.a.createElement("span",{className:"gaugeChartMin",style:{fontSize:F}},h(g?null:D)),r.a.createElement("span",{className:"gaugeChartMax",style:{fontSize:F}},h(g?null:P)))},$n=(a(254),a(134)),Jn=a(537),Qn=a(538),er=Object(de.a)($n.a,Object(Jn.a)(/[^0-9a-f]/gi,""),Object(ua.a)([[function(e){return e.length<6},function(e){return e[0]+e[0]+e[1]+e[1]+e[2]+e[2]}],[ha.a,Ta.a]])),tr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=er(e),n=Object(de.a)((function(e){return Object(Qn.a)(2,e)}),Object(Yn.a)(Object(de.a)((function(e){return parseInt(e,16)}),(function(e){return Math.round(Math.min(Math.max(0,e+e*t),255)).toString(16)}),(function(e){return"00".concat(e).substr(e.length)}))),(function(e){return e.join("")}))(a);return"#".concat(n)},ar=function(e){return e>0?e:(new Date).valueOf()+e},nr=function(e){var t=e.attributes,a=e.chartContainerElement,o=e.chartData,i=e.chartMetadata,s=e.chartElementClassName,l=e.chartElementId,c=e.orderedColors,u=e.unitsCurrent,d=e.viewAfterForCurrentData,h=e.viewBeforeForCurrentData,p=Object(n.useRef)(null),f=Object(n.useState)(),m=Object(A.a)(f,2),b=m[0],v=m[1],_=Object(n.useRef)(),y=t.forceTimeWindow?function(e,t){var a=ar(t[0]),n=ar(t[1]),r=e.after*Ve.a,o=e.before*Ve.a-r,i=n-a;if(o>i/1.03)return{};var s=o/i;return{paddingLeftPercentage:"".concat((r-a)/(n-a)*100,"%"),widthRatio:s}}(o,[d,h]):{},O=y.paddingLeftPercentage,x=void 0===O?void 0:O,w=y.widthRatio,E=void 0===w?1:w;Object(n.useEffect)((function(){var e=t.sparklineLineColor,a=void 0===e?c[0]:e,n="line"===i.chart_type?window.NETDATA.themes.current.background:tr(a,window.NETDATA.chartDefaults.fill_luminance),r=t.title||i.title,o=function(e){return"disable"===e?"":e},s=t.sparklineType,l=void 0===s?"line":s,d=t.sparklineFillColor,h=void 0===d?n:d,f=t.sparklineDisableInteraction,g=void 0!==f&&f,m=t.sparklineDisableTooltips,y=void 0!==m&&m,O=t.sparklineDisableHighlight,x=void 0!==O&&O,w=t.sparklineHighlightLighten,E=void 0===w?1.4:w,S=t.sparklineTooltipSuffix,C=void 0===S?" ".concat(u):S,A=t.sparklineNumberFormatter,k=void 0===A?function(e){return e.toFixed(2)}:A,j={type:l,lineColor:a,fillColor:h,chartRangeMin:t.sparklineChartRangeMin,chartRangeMax:t.sparklineChartRangeMax,composite:t.sparklineComposite,enableTagOptions:t.sparklineEnableTagOptions,tagOptionPrefix:t.sparklineTagOptionPrefix,tagValuesAttribute:t.sparklineTagValuesAttribute,disableHiddenCheck:t.sparklineDisableHiddenCheck,defaultPixelsPerValue:t.sparklineDefaultPixelsPerValue,spotColor:o(t.sparklineSpotColor),minSpotColor:o(t.sparklineMinSpotColor),maxSpotColor:o(t.sparklineMaxSpotColor),spotRadius:t.sparklineSpotRadius,valueSpots:t.sparklineValueSpots,highlightSpotColor:t.sparklineHighlightSpotColor,highlightLineColor:t.sparklineHighlightLineColor,lineWidth:t.sparklineLineWidth,normalRangeMin:t.sparklineNormalRangeMin,normalRangeMax:t.sparklineNormalRangeMax,drawNormalOnTop:t.sparklineDrawNormalOnTop,xvalues:t.sparklineXvalues,chartRangeClip:t.sparklineChartRangeClip,chartRangeMinX:t.sparklineChartRangeMinX,chartRangeMaxX:t.sparklineChartRangeMaxX,disableInteraction:g,disableTooltips:y,disableHighlight:x,highlightLighten:E,highlightColor:t.sparklineHighlightColor,tooltipContainer:t.sparklineTooltipContainer,tooltipClassname:t.sparklineTooltipClassname,tooltipChartTitle:r,tooltipFormat:t.sparklineTooltipFormat,tooltipPrefix:t.sparklineTooltipPrefix,tooltipSuffix:C,tooltipSkipNull:t.sparklineTooltipSkipNull,tooltipValueLookups:t.sparklineTooltipValueLookups,tooltipFormatFieldlist:t.sparklineTooltipFormatFieldlist,tooltipFormatFieldlistKey:t.sparklineTooltipFormatFieldlistKey,numberFormatter:k,numberDigitGroupSep:t.sparklineNumberDigitGroupSep,numberDecimalMark:t.sparklineNumberDecimalMark,numberDigitGroupCount:t.sparklineNumberDigitGroupCount,animatedZooms:t.sparklineAnimatedZooms};_.current=j,p.current&&!b&&v((function(){return window.$(p.current)}))}),[b,t,a,o.result,i,c,u,E]);var S=t.sparklineOnHover;Object(n.useEffect)((function(){if(b&&S){var e=function(){return S(null)},t=function(e){var t=Object(A.a)(e.sparklines,1)[0].getCurrentRegionFields(),a=t.x,n=t.y;S({x:a,y:n})};return b.bind("sparklineRegionChange",t).bind("mouseleave",e),function(){b.unbind("sparklineRegionChange",t).unbind("mouseleave",e)}}}),[b,S]),Object(n.useEffect)((function(){if(b){var e=a.getBoundingClientRect(),t=e.width,n=e.height;b.sparkline(o.result,Object(g.a)({},_.current,{width:Math.floor(t*E),height:Math.floor(n)}))}}),[b,o.result]);var C=x?{textAlign:"initial",paddingLeft:x}:void 0;return r.a.createElement("div",{ref:p,id:l,className:s,style:C})},rr=a(144);window.d3=rr;var or,ir=a(276),sr=a.n(ir),lr=a(46),cr={label:"no data",value:100,color:"#666666"},ur=function(e){var t=e.chartData,a=e.index,n=e.localeDateString,r=e.localeTimeString,o=Math.round((t.before-t.after+1)/t.points),i=Object(lr.a)(o),s=t.result.data[a].time,l=s-1e3*o,c=n(l),u=r(l),d=n(s),h=r(s);return c===d?"".concat(c," ").concat(u," to ").concat(h,", ").concat(i):"".concat(c," ").concat(u," to ").concat(d," ").concat(h,", ").concat(i)},dr=function(e){var t=e.attributes,a=e.chartContainerElement,o=e.chartData,i=e.chartMetadata,s=e.chartElementClassName,l=e.chartElementId,c=e.hoveredRow,u=e.hoveredX,d=e.legendFormatValue,h=e.orderedColors,p=e.setMinMax,f=e.unitsCurrent,g=Object(n.useRef)(null),m=Object(n.useRef)(d);m.current=d;var b=Object(n.useState)(),v=Object(A.a)(b,2),_=v[0],y=v[1],O=Object(n.useRef)(),x=Object(sa.b)(),w=x.localeDateString,E=x.localeTimeString;return Object(n.useEffect)((function(){if(g.current&&!_){p([o.min,o.max]);var e=Object(G.a)(o.result.labels).map((function(e,t){return{label:e,value:o.result.data[0][e],color:h[t]}})).filter((function(e){return null!==e.value&&e.value>0})),n=e.length>0?e:cr,r=t.title||i.title,s=ur({chartData:o,index:0,localeDateString:w,localeTimeString:E}),l=t.d3pieTitle,c=void 0===l?r:l,u=t.d3pieSubtitle,d=void 0===u?f:u,b=t.d3pieFooter,v=void 0===b?s:b,x=t.d3pieTitleColor,S=void 0===x?window.NETDATA.themes.current.d3pie.title:x,C=t.d3pieTitleFontsize,A=void 0===C?12:C,k=t.d3pieTitleFontweight,j=void 0===k?"bold":k,T=t.d3pieTitleFont,D=void 0===T?"arial":T,P=t.d3PieSubtitleColor,M=void 0===P?window.NETDATA.themes.current.d3pie.subtitle:P,L=t.d3PieSubtitleFontsize,I=void 0===L?10:L,N=t.d3PieSubtitleFontweight,R=void 0===N?"normal":N,F=t.d3PieSubtitleFont,B=void 0===F?"arial":F,H=t.d3PieFooterColor,z=void 0===H?window.NETDATA.themes.current.d3pie.footer:H,U=t.d3PieFooterFontsize,W=void 0===U?9:U,V=t.d3PieFooterFontweight,Y=void 0===V?"bold":V,X=t.d3PieFooterFont,K=void 0===X?"arial":X,Z=t.d3PieFooterLocation,q=void 0===Z?"bottom-center":Z,$=t.d3PiePieinnerradius,J=void 0===$?"45%":$,Q=t.d3PiePieouterradius,ee=void 0===Q?"80%":Q,te=t.d3PieSortorder,ae=void 0===te?"value-desc":te,ne=t.d3PieSmallsegmentgroupingEnabled,re=void 0!==ne&&ne,oe=t.d3PieSmallsegmentgroupingValue,ie=void 0===oe?1:oe,se=t.d3PieSmallsegmentgroupingValuetype,le=void 0===se?"percentage":se,ce=t.d3PieSmallsegmentgroupingLabel,ue=void 0===ce?"other":ce,de=t.d3PieSmallsegmentgroupingColor,he=void 0===de?window.NETDATA.themes.current.d3pie.other:de,pe=t.d3PieLabelsOuterFormat,fe=void 0===pe?"label-value1":pe,ge=t.d3PieLabelsOuterHidewhenlessthanpercentage,me=void 0===ge?null:ge,be=t.d3PieLabelsOuterPiedistance,ve=void 0===be?15:be,_e=t.d3PieLabelsInnerFormat,ye=void 0===_e?"percentage":_e,Oe=t.d3PieLabelsInnerHidewhenlessthanpercentage,xe=void 0===Oe?2:Oe,we=t.d3PieLabelsMainLabelColor,Ee=void 0===we?window.NETDATA.themes.current.d3pie.mainlabel:we,Se=t.d3PieLabelsMainLabelFont,Ce=void 0===Se?"arial":Se,Ae=t.d3PieLabelsMainLabelFontsize,ke=void 0===Ae?10:Ae,je=t.d3PieLabelsMainLabelFontweight,Te=void 0===je?"normal":je,De=t.d3PieLabelsPercentageColor,Pe=void 0===De?window.NETDATA.themes.current.d3pie.percentage:De,Me=t.d3PieLabelsPercentageFont,Le=void 0===Me?"arial":Me,Ie=t.d3PieLabelsPercentageFontsize,Ne=void 0===Ie?10:Ie,Re=t.d3PieLabelsPercentageFontweight,Fe=void 0===Re?"bold":Re,Be=t.d3PieLabelsValueColor,He=void 0===Be?window.NETDATA.themes.current.d3pie.value:Be,ze=t.d3PieLabelsValueFont,Ue=void 0===ze?"arial":ze,Ge=t.d3PieLabelsValueFontsize,We=void 0===Ge?10:Ge,Ve=t.d3PieLabelsValueFontweight,Ye=void 0===Ve?"bold":Ve,Xe=t.d3PieLabelsLinesEnabled,Ke=void 0===Xe||Xe,Ze=t.d3PieLabelsLinesStyle,qe=void 0===Ze?"curved":Ze,$e=t.d3PieLabelsLinesColor,Je=void 0===$e?"segment":$e,Qe=t.d3PieLabelsTruncationEnabled,et=void 0!==Qe&&Qe,tt=t.d3PieLabelsTruncationTruncatelength,at=void 0===tt?30:tt,nt=t.d3PieMiscColorsSegmentstroke,rt=void 0===nt?window.NETDATA.themes.current.d3pie.segment_stroke:nt,ot=t.d3PieMiscGradientEnabled,it=void 0!==ot&&ot,st=t.d3PieMiscColorsPercentage,lt=void 0===st?95:st,ct=t.d3PieMiscGradientColor,ut=void 0===ct?window.NETDATA.themes.current.d3pie.gradient_color:ct,dt=t.d3PieCssprefix,ht=void 0===dt?null:dt,pt=a.getBoundingClientRect(),ft=pt.width,gt=pt.height,mt={header:{title:{text:c,color:S,fontSize:A,fontWeight:j,font:D},subtitle:{text:d,color:M,fontSize:I,fontWeight:R,font:B},titleSubtitlePadding:1},footer:{text:v,color:z,fontSize:W,fontWeight:Y,font:K,location:q},size:{canvasHeight:Math.floor(gt),canvasWidth:Math.floor(ft),pieInnerRadius:J,pieOuterRadius:ee},data:{sortOrder:ae,smallSegmentGrouping:{enabled:re,value:ie,valueType:le,label:ue,color:he},content:n},labels:{outer:{format:fe,hideWhenLessThanPercentage:me,pieDistance:ve},inner:{format:ye,hideWhenLessThanPercentage:xe},mainLabel:{color:Ee,font:Ce,fontSize:ke,fontWeight:Te},percentage:{color:Pe,font:Le,fontSize:Ne,fontWeight:Fe,decimalPlaces:0},value:{color:He,font:Ue,fontSize:We,fontWeight:Ye},lines:{enabled:Ke,style:qe,color:Je},truncation:{enabled:et,truncateLength:at},formatter:function(e){return"value"===e.part?m.current(e.value):"percentage"===e.part?"".concat(e.label,"%"):e.label}},effects:{load:{effect:"none",speed:0},pullOutSegmentOnClick:{effect:"bounce",speed:400,size:5},highlightSegmentOnMouseover:!0,highlightLuminosity:-.2},tooltips:{enabled:!1,type:"placeholder",string:"",placeholderParser:null,styles:{fadeInSpeed:250,backgroundColor:window.NETDATA.themes.current.d3pie.tooltip_bg,backgroundOpacity:.5,color:window.NETDATA.themes.current.d3pie.tooltip_fg,borderRadius:2,font:"arial",fontSize:12,padding:4}},misc:{colors:{background:"transparent",segmentStroke:rt},gradient:{enabled:it,percentage:lt,color:ut},canvasPadding:{top:5,right:5,bottom:5,left:5},pieCenterOffset:{x:0,y:0},cssPrefix:ht},callbacks:{onload:null,onMouseoverSegment:null,onMouseoutSegment:null,onClickSegment:null}},bt=new sr.a(g.current,mt);O.current=mt,y((function(){return bt}))}}),[t,a,o,i,_,d,w,E,h,p,f]),Object(n.useEffect)((function(){if(_&&O.current){var e=ur({chartData:o,index:0,localeDateString:w,localeTimeString:E}),a=t.d3pieSubtitle,n=void 0===a?f:a,r=t.d3pieFooter,i=void 0===r?e:r,s=!!u&&-1===c,l=o.result.data.length-c-1,d=l<0||l>=o.result.data.length?0:l,p=Object(G.a)(o.result.labels).map((function(e,t){return{label:e,value:o.result.data[d][e],color:h[t]}})).filter((function(e){return null!==e.value&&e.value>0})),g=p.length>0&&!s?p:[cr];_.options.header.subtitle.text=n,_.options.footer.text=i,_.options.data.content=g,_.destroy(),_.recreate()}}),[t,o,_,c,u,w,E,h,f]),r.a.createElement("div",{ref:g,id:l,className:s})},hr=(a(437),function(e){var t=e.attributes,a=e.chartContainerElement,o=e.chartData,i=e.chartMetadata,s=e.chartElementClassName,l=e.chartElementId,c=e.orderedColors,u=Object(n.useRef)(null),d=Object(n.useState)(),h=Object(A.a)(d,2),p=h[0],f=h[1],m=Object(n.useRef)();return Object(n.useLayoutEffect)((function(){if(u.current&&!p){var e=window.$(u.current),n=a.getBoundingClientRect(),r=n.width,o=n.height,i=t.peityStrokeWidth,s=void 0===i?1:i,l={stroke:window.NETDATA.themes.current.foreground,strokeWidth:s,width:Math.floor(r),height:Math.floor(o),fill:window.NETDATA.themes.current.foreground};f((function(){return e})),m.current=l}}),[t,p,a]),Object(n.useLayoutEffect)((function(){if(p&&m.current){var e=Object(g.a)({},m.current,{stroke:c[0],fill:c[0]===m.current.stroke?m.current.fill:"line"===i.chart_type?window.NETDATA.themes.current.background:tr(c[0],window.NETDATA.chartDefaults.fill_luminance)});p.peity("line",e),m.current=e}}),[p,o,i,c]),r.a.createElement("div",{ref:u,id:l,className:s},o.result)}),pr=function(e){var t=e.attributes,a=e.chartData,o=e.chartMetadata,i=e.chartElementClassName,s=e.chartElementId,l=e.orderedColors,c=e.unitsCurrent,u=Object(n.useRef)(null),d=Object(n.useRef)(),h=Object(n.useState)(!1),p=Object(A.a)(h,2),f=p[0],g=p[1];(or||(or=new Promise((function(e,t){setTimeout((function(){var a=document.createElement("script");a.type="text/javascript",a.async=!0,a.src="https://www.google.com/jsapi",a.onerror=function(){t(Error("error loading google.js api"))},a.onload=function(){e("ok")};var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(a,n)}),1e3)})).then((function(){return new Promise((function(e){window.google.load("visualization","1.1",{packages:["corechart","controls"],callback:e})}))})))).then((function(){g(!0)}));var m=Object(n.useRef)();return Object(n.useLayoutEffect)((function(){if(d.current&&m.current){var e=new window.google.visualization.DataTable(a.result);d.current.draw(e,m.current)}}),[a]),Object(n.useLayoutEffect)((function(){if(u.current&&!m.current&&f){var e=new window.google.visualization.DataTable(a.result),n=t.title,r=void 0===n?o.title:n,i=o.chart_type,s=new Map([["area",window.NETDATA.options.current.color_fill_opacity_area],["stacked",window.NETDATA.options.current.color_fill_opacity_stacked]]).get(i)||.3,h={colors:l,lineWidth:"line"===i?2:1,title:r,fontSize:11,hAxis:{viewWindowMode:"maximized",slantedText:!1,format:"HH:mm:ss",textStyle:{fontSize:9},gridlines:{color:"#EEE"}},vAxis:{title:c,viewWindowMode:"area"===i||"stacked"===i?"maximized":"pretty",minValue:"stacked"===i?void 0:-.1,maxValue:"stacked"===i?void 0:.1,direction:1,textStyle:{fontSize:9},gridlines:{color:"#EEE"}},chartArea:{width:"65%",height:"80%"},focusTarget:"category",annotation:{1:{style:"line"}},pointsVisible:!1,titlePosition:"out",titleTextStyle:{fontSize:11},tooltip:{isHtml:!1,ignoreBounds:!0,textStyle:{fontSize:9}},curveType:"function",areaOpacity:s,isStacked:"stacked"===i},p=["area","stacked"].includes(o.chart_type)?new window.google.visualization.AreaChart(u.current):new window.google.visualization.LineChart(u.current);p.draw(e,h),m.current=h,d.current=p}}),[t,a.result,o,u,f,l,c]),r.a.createElement("div",{ref:u,id:s,className:i})},fr=function(e){var t=e.attributes,a=e.chartData,n=e.chartElementClassName,o=e.chartElementId,i=t.textOnlyDecimalPlaces,s=void 0===i?1:i,l=t.textOnlyPrefix,c=void 0===l?"":l,u=t.textOnlySuffix,d=void 0===u?"":u,h=Math.pow(10,s),p=Math.round(a.result[0]*h)/h,f=0===a.result.length?"":c+p+d;return r.a.createElement("div",{id:o,className:n},f)},gr=a(37),mr=Math.round(16/9),br=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:11,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e-t},vr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mr;return Math.sqrt(e.length/t)},_r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mr;return e*t},yr=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:11;return Math.floor(t%e)*a},Or=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:11;return Math.floor(t/e)*a},xr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:11;return Math.ceil(e)*t},wr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:11,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:11;return Math.ceil(e)*t+a},Er=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:11;return Math.floor(e/t)},Sr=function(e,t,a,n){var r=n.onMouseenter,o=n.onMouseout,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=i.cellSize,l=i.cellPadding,c=-1,u=function(a){var n=e.getBoundingClientRect(),r=yr(t,a,s),o=Or(t,a,s),i=n.left+r,c=n.top+o,u=br(s,l);return{index:a,left:i,top:c,right:i+u,bottom:c+u,width:u,height:u,offsetX:r,offsetY:o}},d=function(){o(u(c)),c=-1},h=function(e){var n=e.offsetX,o=e.offsetY,i=Er(n,s),l=Er(o,s)*t+i;l!==c&&(-1!==c&&d(),l>=a||(r(u(l)),c=l))};return e.addEventListener("mousemove",h),e.addEventListener("mouseout",d),function(){e.removeEventListener("mousemove",h),e.removeEventListener("mouseout",d)}},Cr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.aspectRatio,n=t.cellSize,r=vr(e,a),o=_r(r,a);return xr(o,n)},Ar=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.aspectRatio,n=t.cellSize,r=t.padding,o=vr(e,a),i=_r(o,a),s=xr(i,n),l=wr(o,n,r);return{width:s,height:l,columns:Math.ceil(i)}},kr=["rgba(198, 227, 246, 0.9)","rgba(14, 154, 255, 0.9)"],jr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:kr;return Object(rr.scaleLinear)().domain(Object(rr.extent)(e,(function(e){return e}))).range(t)},Tr=function(e){return e.getBoundingClientRect().top/window.innerHeight>.5?"top":"bottom"},Dr={top:{bottom:"top"},bottom:{top:"bottom"}},Pr=function(e){var t=e.data,a=e.renderTooltip,o=Object(gr.a)(e,["data","renderTooltip"]),i=Object(n.useRef)(),s=Object(n.useRef)(),l=Object(n.useRef)(),c=Object(n.useState)(null),u=Object(A.a)(c,2),d=u[0],h=u[1],p=Object(n.useRef)(!1),f=Object(n.useRef)(-1),g=Object(n.useRef)(),m=function(){l.current.deactivateBox(),h(null),p.current=!1,f.current=-1},b=function(){return requestAnimationFrame((function(){h((function(e){return p.current||-1!==f.current&&f.current===(null===e||void 0===e?void 0:e.index)||m(),e}))}))};Object(n.useLayoutEffect)((function(){return l.current=function(e,t){var a=t.onMouseenter,n=t.onMouseout,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.cellSize,i=r.cellPadding,s=r.cellStroke,l=void 0===s?2:s,c=r.lineWidth,u=void 0===c?1:c,d=r.colorRange,h=e.getContext("2d"),p=-1,f=function(){},g={},m=function(){},b=function(){f(),m(),h.clearRect(0,0,e.width,e.height),h.beginPath()},v=function(t){var s=t.data,c=Ar(s,r),v=c.width,_=c.height,y=c.columns;e.width=parseInt(v),e.height=parseInt(_),b(),m();var O=jr(s,d),x=function(e,t){h.fillStyle=O(e);var a=yr(y,t,o),n=Or(y,t,o);u&&l&&h.clearRect(a-u,n-u,br(o,i)+l,br(o,i)+l),h.fillRect(a,n,br(o,i),br(o,i))};s.forEach(x),m=Sr(e,y,s.length,{onMouseenter:a,onMouseout:n},r),f=function(){-1!==p&&x(s[p],p)},g=function(e){f(),p=e;var t=yr(y,e,o),a=Or(y,e,o);u&&l&&(h.lineWidth=u,h.strokeStyle="#fff",h.strokeRect(t+u,a+u,br(o,i)-l,br(o,i)-l))}};return{clear:b,update:v,activateBox:function(e){return g(e)},deactivateBox:function(){return f()}}}(s.current,{onMouseenter:function(e){var t=e.index,a=Object(gr.a)(e,["index"]);f.current=t,l.current.activateBox(t),g.current=setTimeout((function(){h({target:{getBoundingClientRect:function(){return a}},index:t,rect:a})}),600)},onMouseout:function(){f.current=-1,clearTimeout(g.current),b()}},o),function(){return l.current.clear()}}),[]),Object(n.useLayoutEffect)((function(){d&&i.current&&i.current.labels[d.index]!==t.labels[d.index]&&m(),i.current=t,l.current.update(t)}),[t]);var v=Object(n.useCallback)((function(){p.current=!0}),[]),_=Object(n.useCallback)((function(){p.current=!1,b()}),[]),y=d&&Tr(d.target);return r.a.createElement(n.Fragment,null,r.a.createElement("canvas",{"data-testid":"groupBox",ref:s}),d&&a&&r.a.createElement(Z.h,{align:Dr[y],target:d.target,onMouseEnter:v,onMouseLeave:_},a(d.index,y)))},Mr=$.d.span.withConfig({displayName:"groupBoxes__Title",componentId:"sc-11qnspu-0"})(["white-space:nowrap;text-overflow:ellipsis;overflow-x:hidden;"]),Lr=Object($.d)(Z.j).attrs({as:Z.B,gap:1}).withConfig({displayName:"groupBoxes__Label",componentId:"sc-11qnspu-1"})(["cursor:default;&:hover{font-weight:bold;}"]),Ir=function(e){var t=e.data,a=e.label,o=e.groupIndex,i=e.renderGroupPopover,s=e.renderBoxPopover,l=Object(n.useRef)(),c=l.current&&Tr(l.current),u=Object(n.useMemo)((function(){return{maxWidth:"".concat(Cr(t.data),"px")}}),[t]),d=s&&function(e,t){return s({group:a,groupIndex:o,align:t,index:e})},h=i&&function(){return i({group:a,groupIndex:o,align:c})};return r.a.createElement(Z.j,{"data-testid":"groupBoxWrapper",column:!0,alignItems:"start",gap:1,margin:[0,4,0,0]},r.a.createElement(Z.y,{content:h,align:c,plain:!0},(function(e){var n=e.isOpen,o=e.ref,i=Object(gr.a)(e,["isOpen","ref"]);return r.a.createElement(Lr,Object.assign({"data-testid":"groupBoxWrapper-title",ref:function(e){l.current=e,o(e)},strong:n,style:u},i),r.a.createElement(Mr,null,a),t.data.length>3&&r.a.createElement("span",null,"(",t.data.length,")"))})),r.a.createElement(Pr,{data:t,renderTooltip:d}))},Nr=function(e){var t=e.data,a=e.labels,n=e.renderBoxPopover,o=e.renderGroupPopover;return r.a.createElement(Z.j,{"data-testid":"groupBoxes",flexWrap:!0,overflow:{vertical:"auto"},flex:!0},a.map((function(e,a){return t[a].data.length?r.a.createElement(Ir,{key:e,label:e,groupIndex:a,data:t[a],renderGroupPopover:o,renderBoxPopover:n}):null})))},Rr=Object($.d)(Z.j).attrs({width:"120px",height:"12px",round:!0}).withConfig({displayName:"legend__LinearColorScaleBar",componentId:"sc-7zc5gz-0"})(["background:linear-gradient(to right,#c6e3f6,#0e9aff);"]),Fr=function(e){var t=e.children;return r.a.createElement(Z.j,{"data-testid":"groupBox-legend",gap:4,alignItems:"center"},r.a.createElement(Z.C,{strong:!0},t),r.a.createElement(Z.j,{gap:2,alignItems:"center"},r.a.createElement(Z.C,null,"0%"),r.a.createElement(Rr,null),r.a.createElement(Z.C,null,"100%")))},Br={k8s_cluster_id:{icon:"cluster",title:"Cluster Id"},k8s_node_name:{icon:"nodes_hollow",title:"Node"},k8s_namespace:{icon:"cluster_spaces",title:"Namespace"},k8s_controller_kind:{icon:"controller_kind",title:"Controller Kind"},k8s_controller_name:{icon:"controller_name",title:"Controller Name"},k8s_pod_name:{icon:"pod",title:"Pod Name"},k8s_container_name:{icon:"container",title:"Container"}},Hr=Object.keys(Br),zr=function(e){return e in Br?Br[e]:{title:e.replace(/_./g,(function(e){return" ".concat(e[1].toUpperCase())})).replace(/^k8s /,""),icon:"node"}},Ur=function(){return r.a.createElement(Z.j,{height:"1px",width:"100%",background:"separator"})},Gr=function(e){return r.a.createElement(Z.m,Object.assign({color:"bright",wordBreak:"break-all","data-testid":"k8sPopover-header"},e))},Wr=Object($.d)(Z.b).attrs((function(e){return{flavour:"borderless",neutral:!0,themeType:"dark",className:"btn",disabled:e.active,"data-testid":"k8sPopoverChart-tab"}})).withConfig({displayName:"tabs__TabButton",componentId:"sc-18vk2nn-0"})(["&&&{height:initial;width:initial;padding:2px 20px;"," color:","}"],(function(e){var t=e.active,a=e.theme;return t&&"border-bottom: 3px solid ".concat(Object(Z.F)("bright")({theme:a}),";")}),(function(e){var t=e.active,a=e.theme;return Object(Z.F)(t?"bright":"separator")({theme:a})})),Vr=function(e){var t=e.value,a=e.onChange,n=Object(gr.a)(e,["value","onChange"]);return r.a.createElement(Z.j,Object.assign({"data-testid":"k8sPopoverChart-tabs"},n),r.a.createElement(Wr,{label:"Context",active:"context"===t,onClick:function(){return a("context")}}),r.a.createElement(Wr,{label:"Metrics",active:"metrics"===t,onClick:function(){return a("metrics")}}))},Yr=Object($.d)(Object(Z.I)(Z.b)).attrs({icon:"chevron_right_s",label:"More",flavour:"borderless",neutral:!0,themeType:"dark",className:"btn",alignItems:"baseline",gap:1,direction:"rowReverse"}).withConfig({displayName:"section__ExpandButton",componentId:"z6mskd-0"})(["&&&{padding:0;margin:0;font-weight:normal;height:initial;width:initial;svg{height:6px;width:6px;position:initial;}}"]),Xr=function(e){var t=e.title,a=e.onExpand,n=e.children,o=e.noBorder;return r.a.createElement(Z.j,{gap:3,padding:[0,0,3],border:!o&&{side:"bottom",color:"separator"},column:!0,"data-testid":"k8sPopoverSection"},r.a.createElement(Z.j,{justifyContent:"between","data-testid":"k8sPopoverSection-header"},r.a.createElement(Z.n,{color:"border",wordBreak:"break-all"},t),a&&r.a.createElement(Yr,{onClick:a})),r.a.createElement(Z.j,{gap:4,column:!0,"data-testid":"k8sPopoverSection-content"},n))},Kr=a(169),Zr=a(539),qr=["180px","90px"],$r=function(e,t,a){var n,r;"string"===typeof e.width?n=e.width:"number"===typeof e.width&&(n="".concat(e.width.toString(),"px")),void 0===t.aspectRatio&&("string"===typeof e.height?r=e.height:"number"===typeof e.height&&(r="".concat(e.height.toString(),"px")));var o="bottom"===e.legendPosition,i=e.heightId?function(e,t){var a=localStorage.getItem("".concat(cn.a).concat(e));if(a)return Number.isNaN(Number(a))?null:"".concat(t?Number(a)+Fa.a:a,"px");var n=localStorage.getItem("".concat(cn.b).concat(e));return n?qr.includes(n)?null:n:null}(e.heightId,o):null;if(i&&(r=i.replace(/"/g,"")),a){var s=o?.5*window.innerHeight:.4*window.innerHeight;r="".concat(s,"px")}var l=window.NETDATA.chartDefaults.min_width;return{height:r,width:n,minWidth:null===l?void 0:l}},Jr={root:null,rootMargin:"0px",threshold:void 0},Qr=function(){var e=[],t=new IntersectionObserver((function(t){t.forEach((function(t){var a,n=t.isIntersecting,r=t.target,o=null===(a=e.find((function(e){return e.element===r})))||void 0===a?void 0:a.callback;o&&o(n)}))}),Jr);return{subscribe:function(a,n){t.observe(a),e=e.concat({element:a,callback:n})},unsubscribe:function(t){e=e.filter((function(e){return e.element!==t}))}}}(),eo=function(e){var t=e.attributes;return r.a.createElement("span",{style:{position:"absolute",opacity:0,width:0}},t.id)},to=localStorage.getItem("wipe-chart-state"),ao=function(e){var t,a=e.attributes,o=e.chartUuid,i=e.children,s=e.portalNode,l=Object(la.a)();Object(n.useEffect)((function(){return function(){l(Object(_e.a)({id:o}))}}),[]);var c=ya[a.chartLibrary],u=Object(n.useState)(!1),d=Object(A.a)(u,2),h=d[0],p=d[1],f=(null===(t=Object(la.b)(ue.d))||void 0===t?void 0:t.chartId)===a.id;Object(n.useLayoutEffect)((function(){if(!h){var e=f&&"dygraph"===a.chartLibrary&&c.hasLegend(a),t=$r(a,c,e);Object(Zr.a)((function(e,t){e&&s.style.setProperty(t,e)}),t),s.className=c.containerClass(a),p(!0)}}),[a,c,h,f,s,p]);var g=Object(la.b)(ue.j),m=Object(n.useRef)(),b=function(e,t){var a=Object(n.useState)(!1),r=Object(A.a)(a,2),o=r[0],i=r[1],s=Object(n.useRef)(o);return Object(n.useEffect)((function(){return"function"===typeof IntersectionObserver&&Qr.subscribe(e,(function(e){s.current!==e&&(t.current&&(t.current.style.visibility=e?"visible":"hidden"),s.current=e,i(e))})),function(){Qr.unsubscribe(e)}}),[t,e]),o}(s,m),v=Object(la.b)(ue.t)?750:100,_=Object(n.useState)(!b),y=Object(A.a)(_,2),O=y[0],x=y[1];Object(ma.a)((function(){x(!b)}),v,[b]);var w=!b||O,E=Object(n.useRef)(b);if(m.current&&E.current!==b&&(E.current=b),Object(n.useEffect)((function(){!ve&&w&&to&&l(Object(_e.a)({id:o}))}),[o,l,w]),ve)return i;if(w){if(g)return r.a.createElement(eo,{attributes:a});if(!m.current){var S=Array.from(s.children).map((function(e){return function(e){var t=e.cloneNode(!0),a=t.querySelectorAll("canvas");return e.querySelectorAll("canvas").forEach((function(e,t){var n=a[t],r=n.getContext("2d");n.width=e.width,n.height=e.height,r&&r.drawImage(e,0,0)})),t}(e)})),C=document.createElement("div");C.style.visibility="hidden",S.forEach((function(e){C.appendChild(e)})),m.current=C}return r.a.createElement(r.a.Fragment,null,r.a.createElement(eo,{attributes:a}),r.a.createElement("div",{ref:function(e){e&&m.current&&e.appendChild(m.current)}}))}return!g&&m.current&&(m.current=void 0),i},no=function(e){var t=e.attributes,a=e.chartMetadata,n=e.chartUuid,o=e.dropdownMenu,i=e.portalNode,s=e.renderCustomElementForDygraph,l=e.onAttributesChange,c=e.uuid;return r.a.createElement(ao,{attributes:t,portalNode:i,chartUuid:n},r.a.createElement(Xo,{attributes:t,chartUuid:n,renderCustomElementForDygraph:s,onAttributesChange:l,dropdownMenu:o,externalChartMetadata:a,portalNode:i,uuid:c}))},ro=null,oo={sparklines_registry:{},os:"unknown",menu:{},submenu:{},context:{},sparkline:function(e,t,a){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=arguments.length>4?arguments[4]:void 0;if(null===ro||"undefined"===typeof ro.charts)return"";if("undefined"===typeof ro.charts[t])return"";if("undefined"===typeof ro.charts[t].dimensions)return"";if("undefined"===typeof ro.charts[t].dimensions[a])return"";var o="".concat(t,".").concat(a);return"undefined"===typeof this.sparklines_registry[o]?this.sparklines_registry[o]={count:1}:this.sparklines_registry[o].count+=1,o="".concat(o,".").concat(this.sparklines_registry[o].count),"".concat(e,'
    \n (\n X').concat(n,")").concat(r)},gaugeChart:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return"".concat('
    '},anyAttribute:function(e,t,a,n){if("undefined"!==typeof e[a]){var r=e[a][t];return"undefined"===typeof r?n:"function"===typeof r?r(oo.os):r}return n},menuTitle:function(e){if(e.sectionTitle)return e.sectionTitle;if("undefined"!==typeof e.menu_pattern){var t=e.type||e.id.split(".")[0];return"".concat(this.anyAttribute(this.menu,"title",e.menu_pattern,e.menu_pattern).toString()," ").concat(t.slice(-(t.length-e.menu_pattern.length-1)).toString()).replace(/_/g," ")}return this.anyAttribute(this.menu,"title",e.menu,e.menu).toString().replace(/_/g," ")},menuIcon:function(e){return"undefined"!==typeof e.menu_pattern?this.anyAttribute(this.menu,"icon",e.menu_pattern,'').toString():this.anyAttribute(this.menu,"icon",e.menu,'')},menuInfo:function(e){return"undefined"!==typeof e.menu_pattern?this.anyAttribute(this.menu,"info",e.menu_pattern,null):this.anyAttribute(this.menu,"info",e.menu,null)},menuHeight:function(e){return"undefined"!==typeof e.menu_pattern?this.anyAttribute(this.menu,"height",e.menu_pattern,1):this.anyAttribute(this.menu,"height",e.menu,1)},submenuTitle:function(e,t){var a="".concat(e,".").concat(t),n=this.anyAttribute(this.submenu,"title",a,t).toString().replace(/_/g," ");if(n.length>28){var r=n.substring(0,13),o=n.substring(n.length-12,n.length);return"".concat(r,"...").concat(o)}return n},submenuInfo:function(e,t){var a="".concat(e,".").concat(t);return this.anyAttribute(this.submenu,"info",a,null)},submenuHeight:function(e,t,a){var n="".concat(e,".").concat(t);return this.anyAttribute(this.submenu,"height",n,1)*a},contextInfo:function(e){var t=this.anyAttribute(this.context,"info",e,null);return null!==t?'
    '.concat(t,"
    "):""},contextValueRange:function(e){if("undefined"!==typeof this.context[e]&&"undefined"!==typeof this.context[e].valueRange)try{return JSON.parse(this.context[e].valueRange)}catch(t){return[null,null]}return[null,null]},contextHeight:function(e,t){return"undefined"!==typeof this.context[e]&&"undefined"!==typeof this.context[e].height?t*this.context[e].height:t},contextDecimalDigits:function(e,t){return"undefined"!==typeof this.context[e]&&"undefined"!==typeof this.context[e].decimalDigits?this.context[e].decimalDigits:t}};window.netdataDashboard=oo;var io,so,lo,co=Object($.d)(Z.z).withConfig({displayName:"chartOverview__Title",componentId:"sc-1ga681p-0"})(["text-overflow:ellipsis;max-width:120px;overflow-x:hidden;"]),uo={avg:"Average",sum:"Sum",min:"Min",max:"Max"},ho=Object(n.memo)((function(e){var t,a=e.id,n=e.units,o=e.aggrMethod,i=e.displayedIndex,s=Object(la.b)((function(e){return Object(Ea.f)(e,{id:a})})),l="number"===typeof i?s.result[i]:s.view_latest_values[0],c=Ra({attributes:{},data:s,units:n,unitsCommon:null,unitsDesired:null,uuid:a}),u=c.legendFormatValue,d=c.unitsCurrent,h=function(e){return"".concat(uo[e])||""}(o);return r.a.createElement(Z.z,{wordBreak:"keep-all",color:"bright",margin:[0,0,0,"auto"],"data-testid":"k8sPopoverChart-chartValue"},h&&r.a.createElement(Z.z,{margin:[0,1,0,0],color:"separator","data-testid":"k8sPopoverChart-chartValue-aggr"},h),u(l),"percentage"===(t=d)?"%":" ".concat(t.replace(/milliseconds/,"ms")))})),po=function(e){var t=e.id,a=Object(gr.a)(e,["id"]),n=Object(la.b)((function(e){return Object(Ea.f)(e,{id:t})}));return n&&0!==n.result.length?r.a.createElement(ho,Object.assign({id:t},a)):null},fo=Object(n.memo)((function(e){var t=e.id,a=e.chartMetadata,n=e.aggrMethod,o=e.displayedIndex,i=a.units,s=a.context.replace(/cgroup\./,""),l=oo.menuIcon(a);return r.a.createElement(Z.j,{gap:2,"data-testid":"k8sPopoverChart-overview"},r.a.createElement(Z.z,{color:"bright",dangerouslySetInnerHTML:{__html:l}}),r.a.createElement(co,{color:"bright","data-testid":"k8sPopoverChart-title"},s),r.a.createElement(po,{id:t,units:i,aggrMethod:n,displayedIndex:o}))})),go=Object(n.memo)((function(e){var t=e.groupLabel,a=e.postGroupLabel,o=e.id,i=e.attributes,s=e.relatedIndex,l=Object(n.useContext)($.a),c=Object(n.useRef)(),d=Object(n.useState)(),h=Object(A.a)(d,2),p=h[0],f=h[1],m=Object(n.useMemo)((function(){return Object(Kr.b)(400,f)}),[]),b=Object(n.useState)(),v=Object(A.a)(b,2)[1];Object(n.useLayoutEffect)((function(){v(!0)}),[]);var _=i.relatedCharts[s],y=_.chartMetadata,O=_.attributes,x=Object(n.useMemo)((function(){return{id:y.id,width:"100%",height:"60px",chartLibrary:"sparkline",sparklineLineWidth:"2px",sparklineLineColor:Object(Z.F)("border")({theme:l}),sparklineFillColor:Object(Z.F)("disabled")({theme:l}),sparklineSpotRadius:0,sparklineDisableTooltips:!0,sparklineOnHover:function(e){return m(null===e||void 0===e?void 0:e.x)},httpMethod:"POST",host:i.host,nodeIDs:i.nodeIDs,dimensions:O.dimensions,aggrMethod:O.aggrMethod,labels:Object(g.a)(Object(u.a)({k8s_cluster_id:[y.chartLabels.k8s_cluster_id[0]]},i.groupBy,[t]),a&&Object(u.a)({},i.postGroupBy,[a]))}}),[y,i]);return r.a.createElement(Z.j,{gap:2,column:!0,"data-testid":"k8sPopoverChart"},r.a.createElement("div",{ref:c,style:{height:"60px",width:"100%"},"data-testid":"k8sPopoverChart-container"},c.current&&r.a.createElement(no,{chartUuid:o,attributes:x,chartMetadata:y,portalNode:c.current})),r.a.createElement(fo,{id:o,aggrMethod:x.aggrMethod,chartMetadata:y,displayedIndex:p}))})),mo=Object($.d)(Z.o).attrs({margin:[0,0,0,"auto"],color:"bright",width:"10px",height:"10px",alignSelf:"center",name:"nav_arrow_goto",role:"button",title:"Go to node","data-testid":"k8sPopoverItem-externalButton"}).withConfig({displayName:"item__ExternalButton",componentId:"sc-351vj-0"})(["cursor:pointer;"]),bo=function(e){var t=e.icon,a=e.title,n=e.secondary,o=e.onClick;return r.a.createElement(Z.j,{gap:1,alignItems:"start","data-testid":"k8sPopoverItem"},r.a.createElement(Z.j,{width:"22px",height:"22px","data-testid":"k8sPopoverItem-icon"},r.a.createElement(Z.o,{name:t,color:"bright",margin:[0,1,0,0],width:"22px",height:"22px"})),r.a.createElement(Z.z,{color:"bright","data-testid":"k8sPopoverItem-title"},a),n&&r.a.createElement(Z.z,{color:"border",wordBreak:"break-all","data-testid":"k8sPopoverItem-detail"},n),o&&r.a.createElement(mo,{onClick:o}))},vo=function(e){var t=e.date,a=e.title,n=Object(sa.b)(),o=n.localeDateString,i=n.localeTimeString;return r.a.createElement(bo,{icon:"around_clock",title:a,secondary:"".concat(o(t)," | ").concat(i(t))})},_o=function(e){var t=e.before,a=e.after;return r.a.createElement(Xr,{title:"Time"},r.a.createElement(vo,{title:"From",date:a}),r.a.createElement(vo,{title:"To",date:t}))},yo=function(e){var t=e.groupLabel,a=e.postGroupLabel,n=e.attributes,o=e.viewAfter,i=e.viewBefore;return r.a.createElement(Z.j,{gap:3,column:!0,width:"100%","data-testid":"k8sPopoverMetrics"},r.a.createElement(_o,{after:o,before:i}),r.a.createElement(Xr,{title:"Metrics",noBorder:!0},r.a.createElement(Z.j,{gap:3,column:!0,"data-testid":"k8sPopoverMetrics-container"},n.relatedCharts.map((function(e,o){var i=e.chartMetadata;return r.a.createElement(go,{key:i.id,id:[t,a,n.id,i.id].join("|"),attributes:n,relatedIndex:o,groupLabel:t,postGroupLabel:a})})))))},Oo=function(e){var t=e.labelId,a=e.items,n=e.onExpand,o=e.onItemClick,i=Object(gr.a)(e,["labelId","items","onExpand","onItemClick"]),s=zr(t),l=s.title,c=s.icon,u=a.slice(0,3),d=a.length>3,h=d?"".concat(l," (").concat(a.length,")"):l;return r.a.createElement(Xr,Object.assign({title:h,onExpand:d&&n},i),u.map((function(e){return r.a.createElement(bo,{key:e,icon:c,title:e,onClick:o&&function(){return o(e)}})})))},xo=Object(n.memo)((function(e){var t=e.chartLabels,a=e.onExpand,n=e.onNodeClick,o=function(e){e=Object(g.a)({},e);var t=Hr.reduce((function(t,a){return a in e?(delete e[a],[].concat(Object(C.a)(t),[a])):t}),[]);return[].concat(Object(C.a)(t),Object(C.a)(Object.keys(e)))}(t);return r.a.createElement(Z.j,{gap:3,column:!0,width:"100%","data-testid":"k8sPopoverContext"},o.map((function(e,i){return r.a.createElement(Oo,{key:e,labelId:e,items:t[e],onExpand:function(){return a(e)},noBorder:i===o.length-1,onItemClick:"k8s_node_name"===e&&n})})))})),wo=Object($.d)(Object(Z.I)(Z.b)).attrs({flavour:"borderless",neutral:!0,themeType:"dark",className:"btn",alignItems:"start",gap:1}).withConfig({displayName:"list__StyledButton",componentId:"sc-11aix5x-0"})(["&&&{padding:0;margin:0;height:initial;width:initial;svg{height:18px;width:18px;position:initial;}}"]),Eo=function(e){var t=e.labelId,a=e.items,n=e.onBack,o=e.onItemClick,i=zr(t),s=i.title,l=i.icon;return r.a.createElement(Z.j,{height:"100%",gap:3,"data-testid":"k8sPopoverList",column:!0},r.a.createElement(Gr,null,r.a.createElement(wo,{label:"".concat(s," (").concat(a.length,")"),icon:"chevron_left",onClick:n,"data-testid":"k8sPopoverList-back"})),r.a.createElement(Ur,null),r.a.createElement(Z.j,{gap:3,overflow:{vertical:"auto",horizontal:"hidden"},column:!0,"data-testid":"k8sPopoverList-container"},a.map((function(e){return r.a.createElement(bo,{key:e,icon:l,title:e,onClick:o&&function(){return o(e)}})}))))},So=function(e){return r.a.createElement(Z.i,Object.assign({background:["transparent","popover"],padding:[2,4],width:"322px",height:"422px"},e))},Co=function(e){var t=e.label,a=e.value,n=e.onChange,o=e.children;return r.a.createElement(Z.j,{height:"100%",column:!0},r.a.createElement(Gr,null,t),r.a.createElement(Vr,{value:a,onChange:n,margin:[4,0,0,0]}),r.a.createElement(Ur,null),r.a.createElement(Z.j,{gap:3,overflow:{vertical:"auto",horizontal:"hidden"},margin:[4,0,0,0]},o))},Ao=function(e){var t=e.title,a=e.groupLabel,o=e.postGroupLabel,i=e.chartLabels,s=e.attributes,l=e.viewBefore,c=e.viewAfter,u=Object(gr.a)(e,["title","groupLabel","postGroupLabel","chartLabels","attributes","viewBefore","viewAfter"]),d=Object(n.useState)("context"),h=Object(A.a)(d,2),p=h[0],f=h[1],g="context"!==p&&"metrics"!==p,m=s.onNodeClick;return r.a.createElement(So,Object.assign({"data-testid":"k8sPopover"},u),g&&r.a.createElement(Eo,{labelId:p,items:i[p],attributes:s,onBack:function(){return f("context")},onItemClick:"k8s_node_name"===p&&m}),!g&&r.a.createElement(Co,{label:t,value:p,onChange:f},"context"===p&&r.a.createElement(xo,{chartLabels:i,onExpand:f,onNodeClick:m}),"metrics"===p&&r.a.createElement(yo,{groupLabel:a,postGroupLabel:o,attributes:s,viewAfter:c,viewBefore:l})))},ko=function(e){var t=e.chartData,a=e.chartMetadata,o=e.attributes,i=e.viewAfter,s=e.viewBefore,l=e.hoveredRow,c=e.hoveredX,d=e.showUndefined,h=o.filteredRows,p=Object(n.useMemo)((function(){return function(e,t){var a=e.keys,n=e.labels,r=e.groupBy,o=e.postGroupBy,i=e.aggrGroups,s=e.postAggregated,l=a[r],c=a[o],d=(t||Object(C.a)(Array(l.length)).map((function(e,t){return t}))).reduce((function(e,t){var a=l[t];a in e||(e[a]={labels:[],indexes:[],chartLabels:[],postAggregated:[]});var r=e[a];r.indexes.push(t),r.labels.push(c[t]),r.postAggregated.push(s[t]);var o=i.reduce((function(e,a){return n[a][t]?Object(g.a)({},e,Object(u.a)({},a,n[a][t])):e}),{});return r.chartLabels.push(o),e}),{}),h=Object.keys(d).sort((function(e,t){return d[t].indexes.length-d[e].indexes.length})),p=h.map((function(e){return d[e]})),f=p.map((function(e){return i.reduce((function(t,a){var n=new Set(e.chartLabels.reduce((function(e,t){return t[a]?[].concat(Object(C.a)(e),Object(C.a)(t[a])):e}),[]));return 0===n.size?t:Object(g.a)({},t,Object(u.a)({},a,Array.from(n)))}),{})}));return{labels:h,data:p,chartLabels:f}}(t,h)}),[h,t]),f=p.data,m=p.labels,b=p.chartLabels,v=t.id,_=t.result.data,y=t.groupBy,O=t.postGroupBy,x=Object(n.useMemo)((function(){return f.map((function(e){return{labels:e.labels,data:-1===l||l>_.length||!(l in _)?e.postAggregated:e.indexes.map((function(e){return _[l][e+1]}))||[]}}))}),[_,f,l]);return r.a.createElement(Z.j,{column:!0,width:"100%",height:"100%",gap:4,padding:[4,2]},r.a.createElement(Nr,{data:x,labels:m,renderBoxPopover:function(e){var t=e.groupIndex,a=e.index,n=e.align,l=f[t].labels[a],c=zr(O).title;return r.a.createElement(Ao,{align:n,title:"".concat(c,": ").concat(l),groupLabel:m[t],postGroupLabel:l,chartLabels:f[t].chartLabels[a],attributes:o,viewBefore:s,viewAfter:i})},renderGroupPopover:function(e){var t=e.groupIndex,a=e.align,n=m[t],l=zr(y).title;return r.a.createElement(Ao,{align:a,title:"".concat(l,": ").concat(n),groupLabel:n,chartLabels:b[t],attributes:o,viewBefore:s,viewAfter:i})}}),r.a.createElement(Z.j,{"data-testid":"legend-container",justifyContent:"between"},r.a.createElement(Fr,null,v),r.a.createElement(nn,{chartMetadata:a,showUndefined:d,hoveredX:c,viewBefore:s,chartData:t})))},jo=function(e){var t=e.attributes,a=e.chartContainerElement,o=e.chartData,i=e.chartMetadata,s=e.chartLibrary,l=e.colors,c=e.chartUuid,u=e.chartHeight,d=e.chartWidth,h=e.dimensionsVisibility,p=e.hasEmptyData,f=e.isRemotelyControlled,g=e.legendFormatValue,m=e.orderedColors,b=e.hoveredRow,v=e.hoveredX,_=e.onUpdateChartPanAndZoom,y=e.immediatelyDispatchPanAndZoom,O=e.setHoveredX,x=e.setMinMax,w=e.showLatestOnBlur,E=e.unitsCurrent,S=e.viewAfterForCurrentData,C=e.viewBeforeForCurrentData,A=Object(la.a)(),k=Object(la.b)(ue.I),j=Object(n.useCallback)((function(e){var t=e.after,a=e.before,n=e.masterID;A(Object(Ke.r)({after:t,before:a,masterID:n})),A(k?Object(Ke.s)({after:S,before:C}):Object(_e.h)({after:S,before:C,id:c}))}),[c,A,k,S,C]),T=ya[s],D=T.hasLegend,P=D(t)?va()("netdata-chart-with-legend-".concat(t.legendPosition||"right"),"netdata-".concat(s,"-chart-with-legend-right")):va()("netdata-chart","netdata-".concat(s,"-chart")),M="".concat(s,"-").concat(c,"-chart"),L=-1===b&&!w;return function(e){var t=e.attributes,a=e.chartData,r=e.chartSettings,o=e.hoveredRow,i=e.legendFormatValue,s=e.showUndefined,l=Object(n.useRef)([]);Object(dn.a)((function(){var e=t.showValueOf;if(e&&!Object(un.a)(e)){var n=a.dimension_names,r=a.dimension_ids;n.forEach((function(t,a){var n=e["show-value-of-".concat(t.toLowerCase())]||e["show-value-of-".concat(r[a].toLowerCase(),"-at")];l.current=l.current.concat(document.getElementById(n))}))}})),Object(n.useEffect)((function(){if(l.current.length){var e=r.options(t),n=e.includes("flip");if("json"===a.format&&!e.includes("objectrows")){var c=a.result.data,u=-1===o?c.length-1:o,d=c[n?u:c.length-u-1];a.dimension_names.forEach((function(e,t){var a=s||!d?"":i(d[t+1]),n=l.current[t];n&&(n.innerText="".concat(a))}))}}}),[t,a,r,o,i,s])}({attributes:t,chartData:o,chartSettings:T,hoveredRow:b,legendFormatValue:g,showUndefined:L}),"easypiechart"===s?r.a.createElement(Xn,{attributes:t,chartData:o,chartMetadata:i,chartElementClassName:P,chartElementId:M,chartLibrary:s,chartWidth:d,colors:l,chartUuid:c,dimensionsVisibility:h,isRemotelyControlled:f,key:d,legendFormatValue:g,orderedColors:m,hoveredRow:b,onUpdateChartPanAndZoom:_,setGlobalChartUnderlay:j,setMinMax:x,showUndefined:L,unitsCurrent:E,viewAfter:S,viewBefore:C}):"gauge"===s?r.a.createElement(qn,{attributes:t,chartData:o,chartMetadata:i,chartElementClassName:P,chartElementId:M,chartLibrary:s,chartHeight:u,chartWidth:d,colors:l,chartUuid:c,dimensionsVisibility:h,isRemotelyControlled:f,legendFormatValue:g,orderedColors:m,hoveredRow:b,hoveredX:v,onUpdateChartPanAndZoom:_,setGlobalChartUnderlay:j,setHoveredX:O,setMinMax:x,showUndefined:L,unitsCurrent:E,viewAfter:S,viewBefore:C}):"sparkline"===s?r.a.createElement(nr,{attributes:t,chartContainerElement:a,chartData:o,chartMetadata:i,chartElementClassName:P,chartElementId:M,dimensionsVisibility:h,isRemotelyControlled:f,orderedColors:m,unitsCurrent:E,viewAfterForCurrentData:S,viewBeforeForCurrentData:C}):"d3pie"===s?r.a.createElement(dr,{attributes:t,chartContainerElement:a,chartData:o,chartMetadata:i,chartElementClassName:P,chartElementId:M,dimensionsVisibility:h,hoveredRow:b,hoveredX:v,isRemotelyControlled:f,legendFormatValue:g,orderedColors:m,setMinMax:x,showUndefined:L,unitsCurrent:E}):"peity"===s?r.a.createElement(hr,{attributes:t,chartContainerElement:a,chartData:o,chartMetadata:i,chartElementClassName:P,chartElementId:M,orderedColors:m}):"google"===s?r.a.createElement(pr,{attributes:t,chartData:o,chartMetadata:i,chartElementClassName:P,chartElementId:M,orderedColors:m,unitsCurrent:E}):"textonly"===s?r.a.createElement(fr,{attributes:t,chartData:o,chartElementClassName:P,chartElementId:M}):"groupbox"===s?r.a.createElement(ko,{chartData:o,chartMetadata:i,attributes:t,viewAfter:S,viewBefore:C,hoveredRow:b,hoveredX:v,showUndefined:L}):r.a.createElement(Gn,{attributes:t,chartData:o,chartMetadata:i,chartElementClassName:P,chartElementId:M,chartLibrary:s,colors:l,chartUuid:c,dimensionsVisibility:h,hasEmptyData:p,hasLegend:D(t),isRemotelyControlled:f,orderedColors:m,immediatelyDispatchPanAndZoom:y,hoveredRow:b,hoveredX:v,onUpdateChartPanAndZoom:_,setGlobalChartUnderlay:j,setHoveredX:O,setMinMax:x,unitsCurrent:E,viewAfter:S,viewBefore:C})},To=Object(n.memo)((function(e){var t=e.attributes,a=e.attributes.chartLibrary,o=e.chartContainerElement,i=e.chartData,s=e.chartMetadata,l=e.chartHeight,c=e.chartUuid,u=e.chartWidth,d=e.defaultAfter,h=e.globalPanAndZoom,p=e.hasEmptyData,f=e.isRemotelyControlled,g=e.viewRangeForCurrentData,m=e.viewRange,b=e.selectedDimensions,v=e.setSelectedDimensions,_=e.showLatestOnBlur,y=Object(n.useContext)($.a),O=Object(la.b)(ue.O),x=ya[a].hasLegend,w=t.units,E=void 0===w?s.units:w,S=t.unitsCommon,C=t.unitsDesired,k=void 0===C?O:C,j=Object(n.useMemo)((function(){return i.dimension_names.map((function(e){return 0===b.length||b.includes(e)}))}),[i.dimension_names,b]),T=x(t)&&window.NETDATA.options.current.legend_toolbox,D=T&&window.NETDATA.options.current.resize_charts&&!t.hideResizeHandler,P=Object(la.a)(),M=Object(n.useMemo)((function(){var e=Object.values(s.dimensions).map((function(e){return e.name})),t=i.dimension_names.filter((function(t){return!e.includes(t)}));return e.concat(t)}),[i.dimension_names,s.dimensions]);Object(n.useEffect)((function(){P(Object(Ke.h)({chartContext:s.context,chartUuid:c,colorsAttribute:t.colors,commonColorsAttribute:t.commonColors,dimensionNames:M}))}),[M,t.colors,t.commonColors,s.context,c,P]);var L=Ra({attributes:t,data:i,units:E,unitsCommon:S,unitsDesired:k,uuid:c}),I=L.legendFormatValue,N=L.legendFormatValueDecimalsFromMinMax,R=L.unitsCurrent,F=Object(n.useState)(null),B=Object(A.a)(F,2),H=B[0],z=B[1],U=Object(la.b)(ue.J),G=Object(n.useCallback)((function(e,t){if(U){var a=t?{chartUuid:null,hoveredX:e}:{chartUuid:c,hoveredX:e};P(Object(Ke.u)(a))}else z(e)}),[c,P,U]),W=Object(la.b)(ue.o),V=U?W:H,Y=Object(Ve.e)(m[0])?m[0]:i.after*Ve.a,X=Object(Ve.e)(m[1])?m[1]:i.before*Ve.a,K=Object(Ve.e)(g[0])?g[0]:i.after*Ve.a,Z=Object(Ve.e)(g[1])?g[1]:i.before*Ve.a,q=i.first_entry*Ve.a,J=i.last_entry*Ve.a,Q=Object(n.useMemo)((function(){return Math.round(u/30*s.update_every*Ve.a)}),[s.update_every,u]),ee=Object(la.b)(ue.I),te=Object(ka.a)((function(e){P(Object(Ke.s)(e))}),400),ae=Object(n.useCallback)((function(){te.flush()}),[te]),ne=Object(n.useCallback)((function(e){var t=e.after,a=e.before,n=e.callback,r=e.shouldFlushImmediately,o=void 0!==r&&r,s=e.shouldForceTimeRange,l=e.shouldNotExceedAvailableRange;if(!(am&&(h-=a-m,p=m),h=q&&re(a,X-t)}),[re,q,Y,X]),ie=Object(n.useCallback)((function(e){var t=X-Y,a=t*ja(e),n=Math.min(X+a,J);re(n-t,n)}),[re,J,Y,X]),se=Object(n.useCallback)((function(e){var t=.8*ja(e);if(h)if(X-Y>1.2*(J-q))re(q,J);else{var a=(X-Y)*t/2;re(Y+a,X-a)}else P(Object(Ke.q)({after:Math.round(d/(t+1))}))}),[d,P,h,re,q,J,Y,X]),le=Object(n.useCallback)((function(e){var t=.8*ja(e);if(h){var a=((X-Y)/(1-.8*t)-(X-Y))/2;re(Y-a,X+a)}else P(Object(Ke.q)({after:Math.round(d*(t+1))}))}),[d,P,h,re,Y,X]),ce=Object(n.useMemo)((function(){return Object(ue.a)({chartContext:s.context,chartUuid:c,colorsAttribute:t.colors,commonColorsAttribute:t.commonColors})}),[t.colors,t.commonColors,s,c]),de=Object(la.b)(ce),he=Object(n.useMemo)((function(){return i.dimension_names.map(Object(qe.a)(Aa.a,de))}),[i,de]);if(!de)return r.a.createElement("span",null);var pe=V&&V>=Y&&V<=X,fe=i.view_update_every*Ve.a,ge=pe?Math.floor((V-i.after*Ve.a)/fe):-1,me="bottom"===t.legendPosition,be=r.a.createElement(ln,{onToolboxLeftClick:oe,onToolboxRightClick:ie,onToolboxZoomInClick:se,onToolboxZoomOutClick:le}),ve=D&&r.a.createElement(cn.c,{chartContainerElement:o,chartUuid:c,heightId:t.heightId,isLegendOnBottom:me});return r.a.createElement(r.a.Fragment,null,r.a.createElement(jo,{key:y.name,attributes:t,chartContainerElement:o,chartData:i,chartMetadata:s,chartLibrary:a,colors:de,chartUuid:c,chartHeight:l,chartWidth:u,dimensionsVisibility:j,hasEmptyData:p,onUpdateChartPanAndZoom:ne,immediatelyDispatchPanAndZoom:ae,isRemotelyControlled:f,legendFormatValue:I,orderedColors:he,hoveredX:V,hoveredRow:ge,setHoveredX:G,setMinMax:function(e){var t=Object(A.a)(e,2),a=t[0],n=t[1];return N(a,n)},showLatestOnBlur:_,unitsCurrent:R,viewAfterForCurrentData:K,viewBeforeForCurrentData:Z}),x(t)&&r.a.createElement(on,{attributes:t,chartUuid:c,chartMetadata:s,chartLibrary:a,colors:de,hoveredX:V,hoveredRow:ge,legendFormatValue:I,selectedDimensions:b,setSelectedDimensions:v,showLatestOnBlur:_,unitsCurrent:R,viewBefore:X,legendToolbox:be,resizeHandler:ve}),T&&!me&&be,!me&&ve)})),Do=a(555),Po=a(548),Mo=a(192),Lo=$.d.div.withConfig({displayName:"styled__DropdownItem",componentId:"sc-1pvwpze-0"})(["display:flex;flex-direction:start;align-items:center;color:",";white-space:nowrap;& > svg use{fill:",";}"],Object(Z.F)(["neutral","limedSpruce"]),Object(Z.F)(["neutral","limedSpruce"])),Io=$.d.span.withConfig({displayName:"styled__DropdownItemLabel",componentId:"sc-1pvwpze-1"})(["margin-left:12px;"]),No=Object($.d)(Z.o).withConfig({displayName:"styled__DotsBtn",componentId:"sc-1pvwpze-2"})(["width:6px;height:10px;cursor:pointer;& use{fill:",";&:hover{fill:",";}}"],Object(Z.F)(["neutral","limedSpruce"]),Object(Z.F)(["neutral","regentgrey"])),Ro=function(e){var t=e.attributes,a=e.chartID,o=e.chartMetadata,i=e.dropdownMenu,s=Object(n.useState)(!1),l=Object(A.a)(s,2),c=l[0],u=l[1],d=function(){u(!1)};return r.a.createElement(r.a.Fragment,null,r.a.createElement(No,{name:"dots_2x3",onClick:function(){u(!0)}}),r.a.createElement(Mo.b,null,r.a.createElement(Mo.a,{open:c,onClose:d},r.a.createElement(Do.a,null,i.map((function(e){var n=e.icon,i=e.label,s=e.onClick;return r.a.createElement(Po.b,{key:i,text:r.a.createElement(Lo,null,n,r.a.createElement(Io,null,i)),onClick:function(){s({attributes:t,chartMetadata:o,chartID:a}),d()}})}))))))},Fo=Object($.e)(["0%{opacity:.1;}50%{opacity:.5;}100%{opacity:.1;}"]),Bo=$.d.div.withConfig({displayName:"styled__SpinnerContainer",componentId:"sc-1foc7xt-0"})(["position:absolute;top:","px;right:","px;display:flex;"],Object(qe.a)("top"),Object(qe.a)("right")),Ho=$.d.div.withConfig({displayName:"styled__Circle",componentId:"sc-1foc7xt-1"})(["width:","px;height:","px;background:",";border-radius:50%;animation:1s linear infinite both ",";"],Object(qe.a)("size"),Object(qe.a)("size"),Object(Z.F)("border"),Fo),zo=Object($.d)(Ho).withConfig({displayName:"styled__Circle2",componentId:"sc-1foc7xt-2"})(["animation-delay:.3s;margin-left:","px;"],Object(qe.a)("spaceBetween")),Uo=Object($.d)(Ho).withConfig({displayName:"styled__Circle3",componentId:"sc-1foc7xt-3"})(["animation-delay:.6s;margin-left:","px;"],Object(qe.a)("spaceBetween")),Go=function(e){var t=e.chartLibrary,a="dygraph"===t?33:0,n="dygraph"===t?8:0,o="dygraph"===t?10:7,i="dygraph"===t?4:2;return r.a.createElement(Bo,{top:a,right:n},r.a.createElement(Ho,{size:o}),r.a.createElement(zo,{size:o,spaceBetween:i}),r.a.createElement(Uo,{size:o,spaceBetween:i}))},Wo=$.d.div.withConfig({displayName:"styled__ChartDropdownContainer",componentId:"sc-177ahzb-0"})(["position:absolute;top:0;left:40px;width:20px;height:20px;z-index:",";"],10),Vo=(a(440),{"sum-of-abs":"sum"}),Yo=[],Xo=function(e){var t,a,o,i,s,l=e.attributes,c=e.chartUuid,u=e.uuid,d=e.dropdownMenu,h=e.externalChartMetadata,p=e.portalNode,g=e.renderCustomElementForDygraph,m=e.onAttributesChange,b=l.host,v=void 0===b?D.b:b,_=l.id,y=l.nodeIDs,O=Object(la.a)(),x=Object(n.useMemo)(Ea.a,[]),w=Object(la.b)((function(e){return x(e,{chartId:_,id:c})})),E=w.chartMetadata,S=w.isFetchingDetails,k=h||E;Object(n.useEffect)((function(){E||S||h||O(_e.b.request({chart:_,id:c,host:v,nodeIDs:y}))}),[_,c,O,v,S,E,h,y,u]);var T=Object(la.b)(ue.m),P=Object(la.b)((function(e){return Object(Ea.i)(e,{id:c})})),M=P||T,L=!!T&&T.masterID===c||Boolean(P),I=(null===M||void 0===M?void 0:M.shouldForceTimeRange)||!1,N=!M||!L||I,R=Object(la.b)((function(e){return Object(Ea.g)(e,{id:c})})),F=Object(la.b)((function(e){return Object(Ea.j)(e,{id:c})})),B=Object(la.b)((function(e){return Object(Ea.f)(e,{id:c})})),H=Object(la.b)((function(e){return Object(Ea.h)(e,{id:c})})),z=Object(la.b)(ue.o),U=Object(ua.a)([[Object(da.a)(!!B),function(){return 1e3*B.view_update_every}],[Object(da.a)(!!k),function(){return 1e3*k.update_every}],[ha.a,Object(da.a)(f.a)]])(),G=function(e){var t=e.areCriteriaMet,a=e.preferedIntervalTime,r=Object(la.b)(ue.s),o=Object(la.b)(ue.H),i=Object(la.b)(ue.n),s=!(!r&&o)&&!i,l=Object(n.useState)(!0),c=Object(A.a)(l,2),u=c[0],d=c[1],h=Object(n.useState)(!1),p=Object(A.a)(h,2),f=p[0],g=p[1];Object(n.useEffect)((function(){f&&s&&(g(!1),d(!0))}),[f,g,s]);var m=!s&&f||ve?wa:a;return Object(xa.a)((function(){if(t){if(!s)return void g(!0);d(!0)}}),m),[u,d]}({areCriteriaMet:!M&&!z,preferedIntervalTime:U}),W=Object(A.a)(G,2),V=W[0],Y=W[1],X=Object(pa.a)(M,f.b);Object(n.useEffect)((function(){Y(!0)}),[X,Y]);var K=Object(la.b)(ue.i);Object(fa.a)((function(){Y(!0)}),[l.after,l.before,K,l.dimensions,l.aggrMethod,l.groupBy]);var Z=l.before,q=void 0===Z?window.NETDATA.chartDefaults.before:Z,$=l.after||K,J=ya[l.chartLibrary],Q=J.hasLegend,ee=p.getBoundingClientRect(),te=ee.width-(Q(l)?140:0),ae=ee.height,ne=Boolean(Object(la.b)(ue.E)),re=Object(la.b)(ue.A)||ne,oe=Object(la.b)(ue.x),ie=j.a.CancelToken,se=Object(n.useMemo)((function(){return ie.source()}),[]);Object(ga.a)((function(){se.cancel("Chart scrolled out of view")}));var le=Object(n.useState)(!1),ce=Object(A.a)(le,2),de=ce[0],he=ce[1],pe=de&&H;Object(ma.a)((function(){H&&he(!0)}),2e3,[H]),Object(n.useEffect)((function(){!H&&de&&he(!1)}),[H,de]),Object(n.useEffect)((function(){if(V&&k&&!H){var e,t,a,n=window.NETDATA.options.force_data_points,r=1;if(M)if(L){if(a=[e=Math.round(M.after/1e3),t=Math.round(M.before/1e3)],oe){var o=Math.round((t-e)/2);e-=o,t+=o,r=2}}else e=Math.round(M.after/1e3),t=Math.round(M.before/1e3),r=1;else t=q,e=$,r=1;a=(a||[e,t]).map((function(e){return 1e3*e}));var i=l.points||Math.round(te/function(e){var t=e.attributes,a=e.chartSettings,n=t.pixelsPerPoint;if("number"===typeof n)return n;var r=a.pixelsPerPoint(t);return Math.max.apply(Math,Object(C.a)([r,window.NETDATA.options.current.pixels_per_point].filter((function(e){return"number"===typeof e}))))}({attributes:l,chartSettings:J})),s=n||i*r,u=l.forceTimeWindow||Boolean(K)?function(e){var t=e.after,a=e.before,n=e.firstEntry,r=e.points,o=Math.round((new Date).valueOf()/1e3),i=t>0?t:o+t,s=a>0?a:o+a;if(i0&&r.a.createElement(Wo,null,r.a.createElement(Ro,{dropdownMenu:d,chartID:_,attributes:l,chartMetadata:k})),Oe):r.a.createElement(r.a.Fragment,null,r.a.createElement(Ca,{key:"".concat(xe),hasEmptyData:xe,containerNode:p}),pe&&r.a.createElement(Go,{chartLibrary:l.chartLibrary}))},Ko=a(497),Zo=function(e){return e[O.a]},qo=Object(Ha.a)(Zo,Object(qe.a)("isSnapshotMode")),$o=Object(Ha.a)(Zo,Object(Ko.a)(["snapshotCharts","snapshotDataPoints"])),Jo=function(e){var t=e.attributes,a=e.chartUuid,r=t.host||D.b,o=Object(la.b)($o).snapshotDataPoints,i=t.method||window.NETDATA.chartDefaults.method,s=t.chartLibrary,l=ya[s],c=Object(la.b)(ue.m),u=c.after/Ve.a,d=c.before/Ve.a,h=Object(la.a)();return Object(n.useEffect)((function(){h(_e.e.request({host:r,context:t.id,chart:t.id,format:l.format,points:o,group:i,gtime:t.gtime||0,options:Oa(t,!0),after:u||null,before:d||null,dimensions:t.dimensions,aggrMethod:t.aggrMethod,nodeIDs:t.nodeIDs,chartLibrary:s,id:a,groupBy:t.groupBy}))})),null},Qo=function(e){var t=e.attributes,a=e.chartUuid;return Object(la.b)(qo)?r.a.createElement(Jo,{attributes:t,chartUuid:a}):null},ei=Object(n.memo)((function(){var e=Array.from(document.querySelectorAll("[data-netdata]"));return r.a.createElement(r.a.Fragment,null,e.map((function(e,t){var a=Object(ca.b)(e),n="".concat(a.id,"-").concat(t);return Object(o.createPortal)(r.a.createElement(r.a.Fragment,null,r.a.createElement(ao,{attributes:a,chartUuid:n,portalNode:e},r.a.createElement(Xo,{attributes:a,chartUuid:n,portalNode:e})),r.a.createElement(Qo,{attributes:a,chartUuid:n})),e)})))})),ti=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=arguments.length>2?arguments[2]:void 0,r=Object(n.useState)(!1),o=Object(A.a)(r,2),i=o[0],s=o[1],l=Object(n.useState)(!1),c=Object(A.a)(l,2),u=c[0],d=c[1],h=Object(n.useState)(null),p=Object(A.a)(h,2),f=p[0],g=p[1];return Object(n.useEffect)((function(){if(t&&e){var n=a?{headers:null,withCredentials:!1}:{};s(!0),T.get(e,n).then((function(e){e.data&&(g(e.data),d(!1),s(!1))})).catch((function(t){console.warn("error fetching ".concat(e),t),d(!0),s(!1)}))}}),[a,t,e]),[f,i,u]},ai=document.getElementById("modal-root"),ni=function(e){var t=e.children,a=Object(n.useRef)(document.createElement("div"));return Object(n.useEffect)((function(){return ai.appendChild(a.current),function(){ai.removeChild(a.current)}}),[]),Object(o.createPortal)(t,a.current)},ri=(a(441),function(){var e=Object(n.useRef)(null);Object(n.useEffect)((function(){e.current&&window.$(e.current).modal("show")}));var t=Object(la.b)(Ea.b),a=Object(la.b)(Ea.c),o=Object(la.b)(Ea.k),i=0===t?0:a/t*100;Object(n.useEffect)((function(){100===i&&setTimeout((function(){window.$(e.current).modal("hide"),window.print(),window.close()}),1e3)}),[i]);var s=o&&"".concat(Math.round(i),"%, ").concat(o);return r.a.createElement(ni,null,r.a.createElement("div",{ref:e,className:"modal fade",id:"printModal",tabIndex:-1,role:"dialog","aria-labelledby":"printModalLabel","data-keyboard":"false","data-backdrop":"static"},r.a.createElement("div",{className:"modal-dialog modal-lg",role:"document"},r.a.createElement("div",{className:"modal-content"},r.a.createElement("div",{className:"modal-header"},r.a.createElement("button",{type:"button",className:va()("close",{"print-modal__close-button--disabled":!0}),"data-dismiss":"modal","aria-label":"Close"},r.a.createElement("span",{"aria-hidden":"true"},"\xd7")),r.a.createElement("h4",{className:"modal-title",id:"printModalLabel"},"Preparing dashboard for printing...")),r.a.createElement("div",{className:"modal-body"},"Please wait while we initialize and render all the charts on the dashboard.",r.a.createElement("div",{className:"progress progress-striped active",style:{height:"2em"}},r.a.createElement("div",{id:"printModalProgressBar",className:"progress-bar progress-bar-info",role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,style:{minWidth:"2em",width:"".concat(i,"%")}},r.a.createElement("span",{id:"printModalProgressBarText",style:{paddingLeft:10,paddingTop:4,fontSize:"1.2em",textAlign:"left",width:"100%",position:"absolute",display:"block",color:"black"}},s))),"The print dialog will appear as soon as we finish rendering the page."),r.a.createElement("div",{className:"modal-footer"})))))}),oi=$.d.div.withConfig({displayName:"styled__SocialMediaContainer",componentId:"sc-3gu94j-0"})(["width:185px;padding:",";background:",";font-size:12px;margin-bottom:",";"],Object(Z.H)(2),Object(Z.F)("borderSecondary"),Object(Z.H)(3)),ii=$.d.div.withConfig({displayName:"styled__FirstRow",componentId:"sc-3gu94j-1"})(["display:flex;justify-content:space-between;"]),si=$.d.div.withConfig({displayName:"styled__GithubCopy",componentId:"sc-3gu94j-2"})([""]),li=$.d.div.withConfig({displayName:"styled__GithubCopyLine",componentId:"sc-3gu94j-3"})([""]),ci=$.d.a.withConfig({displayName:"styled__SocialMediaLink",componentId:"sc-3gu94j-4"})(["&,&:hover{color:",";}"],Object(Z.F)("main")),ui=Object($.d)(ci).withConfig({displayName:"styled__GithubStarQuestion",componentId:"sc-3gu94j-5"})([""]),di=Object($.d)(ci).withConfig({displayName:"styled__GithubIcon",componentId:"sc-3gu94j-6"})(["font-size:24px;"]),hi=Object($.d)(ci).withConfig({displayName:"styled__TwitterIcon",componentId:"sc-3gu94j-7"})(["font-size:17px;"]),pi=Object($.d)(ci).withConfig({displayName:"styled__FacebookIcon",componentId:"sc-3gu94j-8"})(["font-size:23px;"]),fi=$.d.div.withConfig({displayName:"styled__Separator",componentId:"sc-3gu94j-9"})(["margin-top:",";border-top:1px solid ",";"],Object(Z.H)(2),Object(Z.F)("separator")),gi=$.d.div.withConfig({displayName:"styled__SecondRow",componentId:"sc-3gu94j-10"})(["margin-top:",";display:flex;align-items:center;justify-content:space-between;"],Object(Z.H)(2)),mi=$.d.span.withConfig({displayName:"styled__SecondRowText",componentId:"sc-3gu94j-11"})(["font-size:10px;"]),bi=function(){return r.a.createElement(oi,null,r.a.createElement(ii,null,r.a.createElement(si,null,r.a.createElement(li,null,"Do you like Netdata?"),r.a.createElement(ui,{href:"https://github.com/netdata/netdata/",target:"_blank"},"Give us a star!")),r.a.createElement(di,{href:"https://github.com/netdata/netdata/",target:"_blank"},r.a.createElement("i",{className:"fab fa-github"}))),r.a.createElement(fi,null),r.a.createElement(gi,null,r.a.createElement(mi,null,"And share the word!"),r.a.createElement(hi,{href:"https://twitter.com/linuxnetdata/",target:"_blank"},r.a.createElement("i",{className:"fab fa-twitter"})),r.a.createElement(pi,{href:"https://www.facebook.com/linuxnetdata/",target:"_blank"},r.a.createElement("i",{className:"fab fa-facebook"}))))},vi=function(e){var t=e.children,a=Object(n.useRef)(document.querySelector("#sidebar-end-portal-container"));return Object(o.createPortal)(t,a.current)},_i=(a(442),Object($.d)((function(e){var t=e.className,a=Object(gr.a)(e,["className"]);return r.a.createElement("div",{className:t},r.a.createElement(q.a,Object.assign({},a,{closeButton:!1})))})).withConfig({displayName:"notifications-container__NotificationsContainer",componentId:"n0kffi-0"})([".Toastify__toast-container{position:fixed;width:unset;min-width:400px;max-width:500px;",";color:",";}.Toastify__toast{padding:0;padding-top:5px;}.Toastify__toast--error{background:",";border:1px solid ",";}.Toastify__toast--warning{}.Toastify__toast--success{background:",";border:1px solid ",";}.Toastify__toast-body{}.Toastify__progress-bar{bottom:unset;top:0;}.Toastify__progress-bar--success{background-color:",";}.Toastify__progress-bar--error{background-color:",";}"],"z-index: 50;",Object(Z.F)(["neutral","limedSpruce"]),Object(Z.F)(["red","lavender"]),Object(Z.F)("error"),Object(Z.F)(["green","frostee"]),Object(Z.F)("success"),Object(Z.F)("success"),Object(Z.F)("error"))),yi=function(e){var t=e.icon,a=e.children,n=e.hasBorder;return r.a.createElement(Z.j,{gap:2,border:n&&{side:"right",color:"separator"},alignItems:"center",padding:[0,3,0,0],height:"100%"},!!t&&r.a.createElement(Z.o,{name:t,color:"bright",height:"15px"}),a)},Oi=function(e){var t=e.global.snapshot,a=e.global.chartsMetadata.data;return t||a?t?t.hostname:a.hostname:""},xi=function(){var e=Object(la.b)(Oi);return r.a.createElement(yi,{icon:"node_hollow"},r.a.createElement(Z.z,{"data-testid":"header-nodename-".concat(e),color:"bright",strong:!0,truncate:!0},e))},wi=["neutral","black"],Ei=function(e){var t=e.children,a=e.isBasic;return r.a.createElement(Z.j,Object.assign({padding:[1.5,2],margin:[2],background:wi,round:1},!a&&{width:{max:"300px"}}),r.a.createElement(Z.D,{color:"bright"},t))},Si=function(e,t){var a=t.isBasic,n="function"===typeof e?e():e;return"string"===typeof e||a?r.a.createElement(Ei,{isBasic:a},n):n},Ci=function(e){var t=e.children,a=e.content,o=e.isBasic,i=Object(gr.a)(e,["children","content","isBasic"]),s=Object(n.useCallback)((function(){return Si(a,{isBasic:o})}),[a,o]);return r.a.createElement(Z.E,Object.assign({plain:!0,animation:!0,content:s},i),t)},Ai=function(){var e=Object(la.a)(),t=Object(n.useCallback)((function(){return e(Object(Ke.t)())}),[e]);return r.a.createElement(Z.j,{gap:2,"data-testid":"header-options-button"},r.a.createElement(Ci,{content:"Import a Netdata snapshot",align:"bottom",plain:!0},r.a.createElement(Z.b,{flavour:"borderless",neutral:!0,themeType:"dark","data-toggle":"modal","data-target":"#loadSnapshotModal",icon:"download"})),r.a.createElement(Ci,{content:"Export a Netdata snapshot",align:"bottom",plain:!0},r.a.createElement(Z.b,{onClick:t,flavour:"borderless",neutral:!0,themeType:"dark","data-toggle":"modal","data-target":"#saveSnapshotModal",icon:"upload"})),r.a.createElement(Ci,{content:"Print the dashboard",align:"bottom",plain:!0},r.a.createElement(Z.b,{flavour:"borderless",neutral:!0,themeType:"dark","data-toggle":"modal","data-target":"#printPreflightModal",icon:"print"})))},ki=a(544),ji=Object($.d)(Z.j).attrs({padding:[4],background:"dropdown",round:1,overflow:{vertical:"auto"},margin:[4,0,0],width:110}).withConfig({displayName:"dropdown__Dropdown",componentId:"sc-1pb06sp-0"})(["box-shadow:0px 4px 4px rgba(0,0,0,0.25);"]),Ti=ji,Di=Object($.d)(Z.j).withConfig({displayName:"protoBuf__PillContainer",componentId:"sc-15abcpz-0"})(["white-space:nowrap;"]),Pi=Object($.d)(Z.z).attrs({as:"a",color:"success",target:"_blank"}).withConfig({displayName:"protoBuf__Link",componentId:"sc-15abcpz-1"})([""]),Mi=function(){var e=Object(En.a)(),t=Object(A.a)(e,2),a=t[0],o=t[1],i=Object(la.b)(ue.w),s=Object(n.useRef)(),l=Object(ki.a)("(min-width: 1400px)"),c=function(){o(!1)};return i?r.a.createElement(Z.j,{flex:!1},r.a.createElement(Di,{ref:s},r.a.createElement(Z.x,{"data-testid":"header-options-button",onClick:o,flavour:"warning",icon:"warning_triangle_hollow"},l?"NOT MONITORED IN CLOUD":"")),s.current&&a&&r.a.createElement(Z.h,{target:s.current,align:{top:"bottom",left:"left"},onEsc:c,onClickOutside:c,animation:!0},r.a.createElement(Ti,null,r.a.createElement(Z.j,{background:"modalTabsBackground",padding:[4]},r.a.createElement(Z.j,{width:14,flex:!1,alignItems:"start"},r.a.createElement(Z.j,{padding:[2.5],round:"50%",background:"warningText"},r.a.createElement(Z.o,{color:"warningBackground",name:"informationPress"}))),r.a.createElement(Z.j,null,r.a.createElement(Z.z,null,"It will not be possible to monitor this node from Netdata Cloud after 1st of March. ",r.a.createElement("br",null)," ",r.a.createElement("br",null),"This node does not have proto-buf support. In order to learn how to apply proto-buf support to your nodes"," ",r.a.createElement(Pi,{href:"https://www.netdata.cloud/blog/netdata-clouds-new-architecture"},"read our documentation."),r.a.createElement("br",null),r.a.createElement("br",null)," If you are not interested in monitoring this node from Netdata Cloud, you can"," ",r.a.createElement(Pi,{href:"https://learn.netdata.cloud/docs/agent/claim#remove-and-reconnect-a-node"},"unclaim it."))))))):null},Li=function(e){var t,a=e.currentVersion,n="stable"===e.releaseChannel,o=ti("https://api.github.com/repos/netdata/netdata/releases/latest",n,!0),i=Object(A.a)(o,1)[0],s=ti("https://www.googleapis.com/storage/v1/b/netdata-nightlies/o/latest-version.txt",!n),l=Object(A.a)(s,1)[0],c=ti(null===l||void 0===l?void 0:l.mediaLink,Boolean(l)),u=Object(A.a)(c,1)[0],d=n?null===(t=i)||void 0===t?void 0:t.tag_name.replace(/(\r\n|\n|\r| |\t)/gm,""):u?function(e){return e.replace(/(\r\n|\n|\r| |\t)/gm,"")}(u):null;if(!d)return null;var h=!function(e,t){if(e===t)return!0;var a=e.split("."),n=t.split("."),r=parseInt(a[0].substring(1,2),10),o=parseInt(n[0].substring(1,2),10);return!(ro||!((r=parseInt(a[1],10))<(o=parseInt(n[1],10)))&&(r>o||(a=a[2].split("-"),n=n[2].split("-"),!((r=parseInt(a[0],10))<(o=parseInt(n[0],10)))&&(r>o||!((r=a.length>1?parseInt(a[1],10):0)<(o=n.length>1?parseInt(n[1],10):0))))))}(a,d);return r.a.createElement(Ci,{content:h?"Need help?":"Check Version",align:"bottom",plain:!0},r.a.createElement(Z.b,{"data-testid":"header-version-control-button",flavour:"borderless",themeType:"dark",small:!0,neutral:!h,warning:h,name:h?"update_pending":"update",icon:h?"update_pending":"update","data-toggle":"modal","data-target":"#updateModal"}))},Ii=function(e){var t=e.global.chartsMetadata.data;return t?{version:t.version,releaseChannel:t.release_channel}:null},Ni=function(){var e=Object(la.b)(Ii);return e&&r.a.createElement(Li,{currentVersion:e.version,releaseChannel:e.releaseChannel})},Ri=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Object(n.useState)(!!e),a=Object(A.a)(t,2),r=a[0],o=a[1],i=Object(n.useCallback)((function(){return o((function(e){return!e}))}),[]),s=Object(n.useCallback)((function(){return o(!0)}),[]),l=Object(n.useCallback)((function(){return o(!1)}),[]);return[r,i,s,l]},Fi=function(e){var t,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=JSON.parse(localStorage.getItem(e)))&&void 0!==t?t:a},Bi=function(e,t){var a=Object(n.useState)((function(){return Fi(e,t)})),r=Object(A.a)(a,2),o=r[0],i=r[1];return Object(n.useEffect)((function(){return localStorage.setItem(e,JSON.stringify(o))}),[e,o]),[o,i]},Hi=a(551),zi=$.d.div.withConfig({displayName:"styled__RootContainer",componentId:"sc-1al6duq-0"})(["width:100%;height:100%;display:flex;flex-flow:row nowrap;align-items:center;"]),Ui=(Object($.d)(Hi.a).withConfig({displayName:"styled__StyledMenu",componentId:"sc-1al6duq-1"})([""]),$.d.div.withConfig({displayName:"styled__DropdownContainer",componentId:"sc-1al6duq-2"})(["cursor:pointer;color:",";.mdc-menu-surface{border-radius:0;.mdc-list{padding:0;}.mdc-list-item{padding:0 "," 0 ",";font-size:14px;height:",";}}"],Object(Z.F)("bright"),Object(Z.H)(5),Object(Z.H)(5),Object(Z.H)(6))),Gi=$.d.div.withConfig({displayName:"styled__ListContainer",componentId:"sc-1al6duq-3"})(["padding:"," 0;"],Object(Z.H)(3)),Wi=Object($.d)(Z.o).withConfig({displayName:"styled__OpenerIcon",componentId:"sc-1al6duq-4"})(["flex-shrink:0;flex-grow:0;margin-left:",";fill:",";width:10px;height:5px;"],(function(e){return e.noMargin?"unset":"16px"}),Object(Z.F)("bright")),Vi=$.d.div.withConfig({displayName:"styled__PickerBox",componentId:"y9nggg-0"})(["display:flex;position:relative;min-width:",";min-height:",";flex-direction:column;align-items:flex-end;background-color:",";color:",";z-index:",";border-radius:8px;"],Object(Z.H)(102),Object(Z.H)(43),Object(Z.F)("mainBackground"),Object(Z.F)("text"),60),Yi=$.d.span.withConfig({displayName:"styled__StyledTimePeriod",componentId:"y9nggg-1"})(["margin-top:",";cursor:pointer;width:187px;height:",";&:first-of-type{margin-top:",";}&:last-of-type{margin-bottom:",";}& > span:hover{color:",";}"],Object(Z.H)(3),Object(Z.H)(2),Object(Z.H)(1),Object(Z.H)(1),Object(Z.F)("textLite")),Xi=$.d.span.withConfig({displayName:"styled__StyledCustomTimePeriod",componentId:"y9nggg-2"})(["margin:"," "," 0;color:",";cursor:pointer;&:first-of-type{margin-top:0;}&:hover{color:",";}"],Object(Z.H)(1),Object(Z.H)(3),(function(e){var t=e.isSelected,a=e.theme;return Object(Z.F)(t?"primary":"text")({theme:a})}),Object(Z.F)("textLite")),Ki=Object($.d)((function(e){var t,a=e.title,o=e.children,i=e.className,s=e.renderTitle,l=e.isOpen,c=void 0!==l&&l,u=e.onMenuToggle,d=e.anchorCorner,h=void 0===d?"bottomStart":d,p=e.renderOpener,f=Object(n.useRef)();return r.a.createElement(Ui,{className:i},r.a.createElement(Mo.b,null,r.a.createElement(Mo.a,{ref:f,open:c,onClose:function(){u(!1)},anchorCorner:h},"function"===typeof o?c&&r.a.createElement(Gi,null,r.a.createElement(Do.a,null,o({maxHeight:null===(t=f.current)||void 0===t?void 0:t.root.ref.style.maxHeight}))):r.a.createElement(Gi,null,r.a.createElement(Do.a,null,o))),r.a.createElement(zi,{onClick:function(){u(!c)}},a||s&&s(),p?p():r.a.createElement(Wi,{name:"triangle_down",noMargin:Boolean(s)}))))})).withConfig({displayName:"styled__StyledDropdown",componentId:"y9nggg-3"})(["width:88px;height:32px;padding-top:8px;padding-bottom:8px;padding-left:8px;padding-right:7px;border:1px solid ",";box-sizing:border-box;border-radius:4px;display:flex;justify-content:center;align-items:center;color:",";.mdc-menu-surface--anchor{.mdc-menu-surface--open{"," margin-top:",";background:",";border-radius:4px;}}.mdc-list{display:flex;flex-direction:column;justify-content:center;align-items:center;}"],Object(Z.F)("border"),Object(Z.F)("text"),"z-index: 45;",Object(Z.H)(2),Object(Z.F)("mainBackground")),Zi=Object($.d)(Z.o).withConfig({displayName:"styled__DropdownIcon",componentId:"y9nggg-4"})(["fill:",";width:12px;height:12px;"],Object(Z.F)("text")),qi=$.d.input.withConfig({displayName:"styled__CustomInput",componentId:"y9nggg-5"})(["border:1px solid ",";color:inherit;background:",";box-sizing:border-box;border-radius:4px;padding:4px;width:32px;height:32px;margin-left:10px;margin-right:10px;outline:none;&:focus{border:1px solid ",";}"],Object(Z.F)("border"),Object(Z.F)("mainBackground"),Object(Z.F)("primary")),$i=Object($.d)(Z.h).attrs({background:"mainBackground",round:2,margin:[4,0,0],border:{side:"all",color:"elementBackground"},animation:!0}).withConfig({displayName:"styled__StyledDrop",componentId:"y9nggg-6"})(["box-shadow:0px 4px 4px rgba(0,0,0,0.25);"]),Ji=$.d.hr.withConfig({displayName:"styled__StyledHR",componentId:"y9nggg-7"})(["border:none;margin:0;border-left:1px solid ",";height:284px;"],Object(Z.F)("borderSecondary")),Qi=Object(n.memo)((function(e){var t=e.value,a=e.period,o=e.resolution,i=e.isSelected,s=e.setTimeRange,l=e.tagging,c=Object(n.useCallback)((function(){return s(t,o)}),[t,o,s]);return r.a.createElement(Yi,{key:t,onClick:c,"data-ga":"date-picker::click-quick-selector::".concat(l,"::").concat(-t),"data-testid":"timePeriod-value"},r.a.createElement(Z.z,{color:i?"primary":"text"},a))})),es=a(556),ts=a(545),as=a(550),ns=a(546),rs=a(283),os=a(557),is=a(278),ss=["minutes","hours","days","months"],ls={minutes:60,hours:3600,days:86400,months:2592e3},cs=function(e,t){return Math.round(e/ls[t])},us=function(e,t){var a=Object(es.a)(new Date(0),Object(u.a)({},t,e));return-Object(ts.a)(a)},ds={startDate:"start",endDate:"finish"},hs=[{period:"Last 5 minutes",value:-300,resolution:"minutes"},{period:"Last 15 minutes",value:-900,resolution:"minutes"},{period:"Last 30 minutes",value:-1800,resolution:"minutes"},{period:"Last 2 hours",value:-7200,resolution:"hours"},{period:"Last 6 hours",value:-21600,resolution:"hours"},{period:"Last 12 hours",value:-43200,resolution:"hours"},{period:"Last Day",value:-86400,resolution:"days"},{period:"Last 2 Days",value:-172800,resolution:"days"},{period:"Last 7 Days",value:-604800,resolution:"days"}],ps=function(e,t){var a=Object(ns.a)(e,"MMMM d yyyy, H:mm")?e:Object(rs.a)(e,"MMMM d yyyy, H:mm",Date.now());return Object(rs.a)("".concat(a," ").concat(function(e){if(!e)return"+00:00";var t=e.toString().split("."),a=t[0]>0?"+":"-",n=Math.abs(t[0]).toString(),r="".concat(a).concat(n.padStart(2,0));return t.length>1?"".concat(r,":").concat(String(.6*t[1]).padEnd(2,0)):"".concat(r,":00")}(t)),"MMMM d yyyy, H:mm xxx",Date.now())},fs=function(e){var t=e.handleTimePeriodChange,a=e.selectedDate,n=e.tagging;return r.a.createElement(Z.j,{column:!0,justifyContent:"start",alignItems:"start",height:{max:"240px"},overflow:{vertical:"scroll"},"data-testid":"timePeriods"},hs.map((function(e){var o=e.period,i=e.value,s=e.resolution;return r.a.createElement(Qi,{key:i,value:i,period:o,resolution:s,setTimeRange:t,isSelected:a===i,tagging:n})})))},gs=a(174),ms=function(e){var t=e.handleTimePeriodChange,a=e.value,o=e.resolution,i=e.tagging,s=function(){return a<=0?cs(-a,o):0},l=Object(n.useState)(s),c=Object(A.a)(l,2),d=c[0],h=c[1],p=Object(n.useState)(!1),f=Object(A.a)(p,2),g=f[0],m=f[1];Object(n.useEffect)((function(){return h(s())}),[a]);var b=Object(n.useCallback)((function(e){return h(e.target.value)}),[]),v=Object(n.useCallback)((function(e){var n=Number(e.currentTarget.value),r=!Number.isNaN(n)&&Number.isInteger(n)&&n>0,i=Object(es.a)(new Date(0),Object(u.a)({},o,n));return r&&Object(gs.a)(i)&&Object(ts.a)(i)<=94694400?t(us(n,o),o):h(a<=0?cs(-a,o):0)}),[o,a,t]),_=Object(n.useCallback)((function(e){return function(){t(us(d,e),e),m(!1)}}),[d,t]);return r.a.createElement(Z.j,{justifyContent:"start",alignItems:"center",height:8,"data-ga":"date-picker::click-last-integer::".concat(i),"data-testid":"customTimePeriod"},r.a.createElement(Z.z,null,"Last"),r.a.createElement(qi,{value:d,onChange:b,onBlur:v,"data-ga":"date-picker::click-last-integer::".concat(i,"::").concat(d),"data-testid":"timePeriod-timeInput"}),r.a.createElement(Ki,{isOpen:g,onMenuToggle:m,renderTitle:function(){return r.a.createElement(Z.j,{alignItems:"center",flexWrap:!1,width:"100%"},r.a.createElement(Z.z,{padding:[0,4,0,0]},o),r.a.createElement(Zi,{name:"triangle_down"}))},renderOpener:function(){return null}},(function(){return ss.map((function(e){return r.a.createElement(Xi,{key:e,onClick:_(e),"data-ga":"date-picker::click-last-time-".concat(e,"::").concat(i),"data-testid":"timePeriod-option"},e)}))})))},bs=a(547),vs=a(279),_s=a.n(vs),ys=(a(444),function(e){var t=e.selected,a=e.selectsStart,n=void 0!==a&&a,o=e.selectsEnd,i=void 0!==o&&o,s=e.startDate,l=e.endDate,c=e.onChange,u=e.minDate,d=e.maxDate,h=e.dateFormat,p=void 0===h?"MM/dd/yyyy":h,f=e.open,g=void 0!==f&&f,m=e.startOpen,b=void 0!==m&&m,v=e.inline,_=void 0!==v&&v,y=e.selectsRange,O=void 0!==y&&y,x=e.monthsShown,w=void 0===x?1:x,E=e.showPopperArrow,S=void 0===E||E,C=e.calendarContainer,A=void 0===C?null:C;return r.a.createElement(_s.a,{selected:t,onChange:c,selectsStart:n,selectsEnd:i,startDate:s,endDate:l,minDate:u,maxDate:d,dateFormat:p,open:g,startOpen:b,inline:_,selectsRange:O,monthsShown:w,showPopperArrow:S,calendarContainer:A})}),Os=$.d.input.withConfig({displayName:"styled__StyledDateInput",componentId:"sc-1tun1nl-0"})(["width:100%;text-align:center;border:1px solid ",";color:inherit;background:",";box-sizing:border-box;border-radius:4px;padding:4px;height:32px;margin-left:20px;margin-right:20px;outline:none;&:focus{border:1px solid ",";}"],Object(Z.F)("border"),Object(Z.F)("mainBackground"),Object(Z.F)("primary")),xs=$.d.div.withConfig({displayName:"styled__StyledCalendar",componentId:"sc-1tun1nl-1"})(["background:",";border:0;.react-datepicker{&__navigation{top:8px;&-icon::before{border-color:",";}}&__header{background:",";border:0;.react-datepicker__current-month{color:",";font-weight:normal;}.react-datepicker__day-name{color:",";}}&__day{color:",";&:hover{background:",";}&--disabled{color:",";&:hover{background:inherit;}}&--keyboard-selected,&--keyboard-selected:hover{color:",";background:inherit;border-radius:inherit;}&--selected,&--selected:hover{color:",";background:",";border-radius:8px;}&--in-selecting-range,&--in-range{color:",";background:",";border-radius:0;}&--selecting-range-start,&--range-start{color:",";background:",";border-top-left-radius:8px;border-bottom-left-radius:8px;&:hover{color:",";background:",";border-radius:0;border-top-left-radius:8px;border-bottom-left-radius:8px;}}&--selecting-range-end,&--range-end{color:",";background:",";border-top-right-radius:8px;border-bottom-right-radius:8px;&:hover{color:",";background:",";border-top-right-radius:8px;border-bottom-right-radius:8px;}}}}"],Object(Z.F)("mainBackground"),Object(Z.F)("text"),Object(Z.F)("mainBackground"),Object(Z.F)("main"),Object(Z.F)("textLite"),Object(Z.F)("main"),Object(Z.F)("elementBackground"),Object(Z.F)("textLite"),Object(Z.F)("main"),Object(Z.F)("bright"),Object(Z.F)("primary"),Object(Z.F)("primary"),Object(Z.F)("elementBackground"),Object(Z.F)("bright"),Object(Z.F)("primary"),Object(Z.F)("bright"),Object(Z.G)(["green","netdata"],.8),Object(Z.F)("bright"),Object(Z.F)("primary"),Object(Z.F)("bright"),Object(Z.G)(["green","netdata"],.8)),ws=function(e){var t=e.name,a=void 0===t?"":t,o=e.value,i=void 0===o?"":o,s=e.onDatesChange,l=e.onFocus,c=e.placeholderText,u=void 0===c?"":c,d=Object(sa.b)().utcOffset,h=Object(n.useState)(""),p=Object(A.a)(h,2),f=p[0],g=p[1],m=Object(n.useCallback)((function(e){var t=e.target.value;g(t)}),[]),b=Object(n.useCallback)((function(e){if(Object(gs.a)(e)){var t=Object(as.a)(e,"MMMM d yyyy, H:mm");g(t)}}),[]),v=Object(n.useCallback)((function(e){var t=ps(e.target.value,d);if(Object(gs.a)(t)&&Object(is.a)(t)>0){var a=Object(is.a)(t);s(a,(function(){return b(i)}))}else b(i)}),[i,d,s,b]);return Object(n.useEffect)((function(){return b(i)}),[i,b]),r.a.createElement(Os,{type:"text",name:a,value:i?f:u,onChange:m,onBlur:v,onFocus:l,placeholder:u,"data-testid":"datePicker-input"})},Es=a(24),Ss=function(){var e=Object(sa.b)(),t=e.localeTimeString,a=e.localeDateString;return Object(n.useCallback)((function(e){return"".concat(a(e,{locale:"en-us",long:!1})," ").concat(t(e,{secs:!1}))}),[t,a])},Cs=function(e,t){return e>0?Object(Es.a)(new Date(t(e))):e||0===e?Object(Es.a)(new Date(t((new Date).valueOf()+1e3*e))):null},As=function(e,t){var a=Ss();return Object(n.useMemo)((function(){return[Cs(e,a),Cs(t,a)]}),[e,t,a])},ks=function(e){var t=e.startDate,a=e.setStartDate,o=e.endDate,i=e.setEndDate,s=e.onDatesChange,l=e.onInputFocus,c=Ss(),u=As(t,o),d=Object(A.a)(u,2),h=d[0],p=d[1],f=Object(sa.b)().utcOffset,g=Object(n.useCallback)((function(e,t){return Object(bs.a)(Cs(e,c),p)?a(e):t()}),[p,c,a]),m=Object(n.useCallback)((function(e,t){return Object(bs.a)(h,Cs(e,c))?i(e):t()}),[h,c,i]),b=Object(n.useCallback)((function(e){var t=Object(A.a)(e,2),a=t[0],n=t[1],r=a?ps(Object(as.a)(a,"MMMM d yyyy, H:mm"),f):a,o=n?ps(Object(as.a)(n,"MMMM d yyyy, H:mm"),f):n,i=Object(is.a)(r)||null,l=Object(is.a)(o)||null;s(i,l)}),[f,s]);return r.a.createElement(Z.j,{column:!0,justifyContent:"center",alignItems:"center",flex:{grow:1},gap:3,margin:[0,0,0,7],"data-testid":"datePicker-wrapper"},r.a.createElement(ys,{selected:h,onChange:b,startDate:h,endDate:p,maxDate:new Date,minDate:new Date("1/1/2018"),inline:!0,selectsRange:!0,monthsShown:2,dateFormat:"MMMM d yyyy, H:mm",showPopperArrow:!1,calendarContainer:xs}),r.a.createElement(Z.j,{justifyContent:"around",alignItems:"center",width:"100%"},r.a.createElement(ws,{name:"startDate",value:h,onDatesChange:g,onFocus:l,placeholderText:"Select a start date"}),r.a.createElement(ws,{name:"endDate",value:p,onDatesChange:m,onFocus:l,placeholderText:"Select an end date"})))},js=function(e){var t=e.startDate,a=e.endDate,o=As(t,a),i=Object(A.a)(o,2),s=i[0],l=i[1],c=Object(n.useMemo)((function(){return function(e,t){return{formattedStartDate:Object(as.a)(e,"MMMM d yyyy, H:mm:ss"),formattedEndDate:Object(as.a)(t,"MMMM d yyyy, H:mm:ss")}}(s,l)}),[s,l]),u=c.formattedStartDate,d=c.formattedEndDate,h=Object(n.useMemo)((function(){return function(e,t){return Object(os.a)(Object(is.a)(e),Object(is.a)(t))}(s,l)}),[s,l]);return r.a.createElement(Z.j,{alignItems:"center",justifyContent:"between",gap:2},r.a.createElement(Z.j,{alignItems:"center",justifyContent:"center",gap:1.5},r.a.createElement(Z.D,{strong:!0,whiteSpace:"nowrap"},"From"),r.a.createElement(Z.D,{whiteSpace:"nowrap","data-testid":"periodIndication-from"},u)),r.a.createElement(Z.o,{name:"arrow_left",size:"small",color:"textLite",rotate:2}),r.a.createElement(Z.j,{alignItems:"center",justifyContent:"center",gap:1.5},r.a.createElement(Z.D,{strong:!0,whiteSpace:"nowrap"},"To"),r.a.createElement(Z.D,{whiteSpace:"nowrap","data-testid":"periodIndication-to"},d)),r.a.createElement(Z.j,{alignItems:"center",justifyContent:"center",gap:2},r.a.createElement(Z.D,{whiteSpace:"nowrap"},"/"),r.a.createElement(Z.D,{color:"textLite",whiteSpace:"nowrap","data-testid":"periodIndication-period"},h)))},Ts=a(99),Ds=a.n(Ts),Ps=[{value:864e5,unit:"d"},{value:36e5,unit:"h"},{value:6e4,unit:"min"},{value:6e4,unit:"min"},{value:1e3,unit:"s"}],Ms=function(e,t){return Ds.a.duration(e.diff(t))},Ls=function(e){var t=Math.abs(e),a=t<6e4;return Ps.reduce((function(e,n){var r=n.value,o=n.unit;return 1e3!==r||a?(e+=function(e,t){return e>1?"".concat(Math.floor(e)).concat(t):""}(t/r,o),t%=r,e):e}),"")},Is=Object($.d)(Z.j).withConfig({displayName:"container__Container",componentId:"sc-1oifnqd-0"})(["cursor:pointer;&:hover *{color:",";fill:",";}"],Object(Z.F)("textLite"),Object(Z.F)("textLite")),Ns=function(e){var t=e.isPlaying,a=e.startDate,n=e.endDate,o=e.isSameDate,i=Object(sa.b)(),s=i.localeTimeString,l=i.localeDateString;return r.a.createElement(Z.j,{gap:2},r.a.createElement(Z.D,{color:"text",whiteSpace:"nowrap"},l(a,{long:!1})," \u2022"," ",r.a.createElement(Z.D,{color:t?"accent":"textFocus",whiteSpace:"nowrap"},s(a,{secs:!1}))),r.a.createElement(Z.o,{name:"arrow_left",color:t?"accent":"textFocus",size:"small",rotate:2}),r.a.createElement(Z.D,{color:"text",whiteSpace:"nowrap"},!o&&"".concat(l(n,{long:!1})," \u2022 "),r.a.createElement(Z.D,{color:t?"accent":"textFocus",whiteSpace:"nowrap"},s(n,{secs:!1}))))},Rs=function(e){var t=e.isPlaying,a=e.duration;return r.a.createElement(Z.j,{gap:1},r.a.createElement(Z.j,{width:"24px",justifyContent:"center"},t&&r.a.createElement(Z.D,{color:"text",whiteSpace:"nowrap"},"\u2022 last")),r.a.createElement(Z.D,{color:"text",whiteSpace:"nowrap"},a))},Fs=Object(n.forwardRef)((function(e,t){var a=e.onClick,o=e.start,i=void 0===o?9e5:o,s=e.end,l=e.isPlaying,c=e.isPickerOpen,u=e.setRangeValues,d=e.tagging,h=Object(n.useState)(),p=Object(A.a)(h,2),f=p[0],g=p[1],m=function(e){return e<0?Ds()(new Date).add(e,"seconds"):Ds()(e)}(i),b=function(e){return e?Ds()(e):Ds()(new Date)}(s),v=Object(la.b)(ue.m);Object(n.useEffect)((function(){var e=Ms(m,b).as("seconds");l||f===e||g(Math.round(e)),l&&f&&v&&(u({start:Math.round(f)}),g(null))}),[m,b,f,l]);var _=Object(n.useMemo)((function(){return function(e,t){return e.isSame(t,"day")}(m,b)}),[m,b]),y=Object(n.useMemo)((function(){return Ls(Ms(m,b).as("milliseconds"))}),[l,m,b]);return r.a.createElement(Ci,{content:c?function(){}:"Select a predefined or a custom timeframe",align:"bottom",plain:!0},r.a.createElement(Is,{alignItems:"center",justifyContent:"center",gap:1,height:"100%",width:{min:"380px"},onMouseDown:a,padding:[0,1],ref:t,"data-ga":"date-picker::click-time::".concat(d),"data-testid":"datePicker-accessorElement"},r.a.createElement(Ns,{isPlaying:l,endDate:b,startDate:m,isSameDate:_}),r.a.createElement(Rs,{isPlaying:l,duration:y})))})),Bs=function(e){var t=e.onChange,a=e.values,o=(a=void 0===a?{}:a).start,i=a.end,s=e.defaultValue,l=void 0===s?-900:s,c=e.tagging,u=void 0===c?"":c,d=e.isPlaying,h=Object(n.useState)(o),p=Object(A.a)(h,2),f=p[0],g=p[1],m=Object(n.useState)(o),b=Object(A.a)(m,2),v=b[0],_=b[1],y=Bi("resolution","minutes"),O=Object(A.a)(y,2),x=O[0],w=O[1],E=Object(n.useState)("startDate"),S=Object(A.a)(E,2),C=S[0],k=S[1],j=Ri(),T=Object(A.a)(j,4),D=T[0],P=T[1],M=T[3],L=Object(n.useRef)(),I=Object(n.useCallback)((function(e){var t=e.startDate,a=e.endDate;g(t),_(a)}),[]);Object(n.useEffect)((function(){I({startDate:o,endDate:i})}),[o,i,I]);var N=Object(n.useCallback)((function(){return I({startDate:l,endDate:0})}),[]),R=Object(n.useCallback)((function(e){e.target.name&&k(e.target.name)}),[]),F=Object(n.useCallback)((function(e){e.stopPropagation(),P()}),[P]),B=Object(n.useMemo)((function(){return function(e){return ds[e]}(C)}),[C]),H=null!==f&&null!==v&&f!==v,z=f===o&&v===i,U=Object(n.useMemo)((function(){return l}),[]),G=f===U,W=Object(n.useCallback)((function(e,t){w(t),I({startDate:e,endDate:0})}),[I,w]),V=L.current&&D?r.a.createElement($i,{target:L.current,canHideTarget:!1,align:{top:"bottom",left:"left"},onEsc:M,onClickOutside:M},r.a.createElement(Vi,{"data-testid":"datePicker"},r.a.createElement(Z.j,{justifyContent:"between",alignItems:"center",width:"100%",padding:[6,6,0,6]},r.a.createElement(Z.j,{column:!0,gap:3,margin:[0,7,0,0]},r.a.createElement(fs,{handleTimePeriodChange:W,selectedDate:f,tagging:u}),r.a.createElement(ms,{handleTimePeriodChange:W,value:f,resolution:x,tagging:u})),r.a.createElement(Ji,null),r.a.createElement(ks,{startDate:f,endDate:v,setStartDate:g,setEndDate:_,onDatesChange:function(e,t){I({startDate:e,endDate:t}),function(e,t,a,n){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"gaCustomEvent";if(window.dataLayer){var o={event:r,eventCategory:e,eventAction:t,eventLabel:a,eventValue:n};window.dataLayer.push(o)}}("date-picker","click-date-picker",u,String("finish"===B?t||e:e||t))},onInputFocus:R})),r.a.createElement(Z.j,{alignItems:"center",justifyContent:H?"between":"end",width:"100%",padding:[5,6],gap:2},H&&r.a.createElement(js,{startDate:f,endDate:v}),r.a.createElement(Z.j,{alignItems:"center",justifyContent:"center",gap:4},r.a.createElement(Z.b,{label:"Clear",flavour:"hollow",onClick:N,disabled:G,"data-ga":"date-picker::click-clear::".concat(u,"-").concat(B),"data-testid":"datePicker-clear"}),r.a.createElement(Z.b,{label:"Apply",onClick:function(){t({start:f,end:v}),M()},disabled:!H||z,"data-ga":"date-picker::click-apply::".concat(u,"-").concat(B),"data-testid":"datePicker-apply"}))))):null;return r.a.createElement(r.a.Fragment,null,r.a.createElement(Fs,{onClick:F,tagging:u,isPickerOpen:D,isPlaying:d,setRangeValues:t,start:o,end:i,ref:L}),V)},Hs=Object(n.memo)((function(e){var t=e.tagging,a=e.isPlaying,o=Object(la.a)(),i=Object(la.b)(ue.m),s=Boolean(i),l=Object(la.b)(ue.i),c=Object(n.useMemo)((function(){return s?{start:i.after,end:i.before}:{start:l,end:0}}),[s,i,l]);return Object(n.useEffect)((function(){var e=c.start,t=c.end;Object(Wt.e)({after:e.toString(),before:t.toString()})}),[c]),r.a.createElement(Bs,{values:c,defaultValue:l,onChange:function(e){var t=e.start,a=e.end;t<0?(o(Object(Ke.q)({after:t})),s&&o(Object(Ke.j)())):o(Object(Ke.s)({after:t,before:a}))},tagging:t,isPlaying:a})})),zs=Object($.d)(Z.j).withConfig({displayName:"container__Container",componentId:"sc-1y4i7z8-0"})(["background:",";"],(function(e){var t=e.theme,a=e.isPlaying;return("Dark"===t.name?Object(Z.G)(a?["green","netdata"]:["neutral","tuna"],a?.3:1):Object(Z.G)(a?["green","frostee"]:["neutral","blackhaze"]))({theme:t})})),Us=function(e){var t=e.isPlaying;return Object(Z.F)(t?["green","chateau"]:["neutral","iron"])},Gs=Object($.d)(Z.x).attrs((function(e){return{flavour:e.isPlaying?"success":"neutral"}})).withConfig({displayName:"styledPill__StyledPill",componentId:"sc-151yrns-0"})(["&:hover{background:",";border-color:",";}"],Us,Us),Ws=function(e){var t=e.isPlaying,a=e.isForcePlaying,o=Object(la.a)(),i=Object(n.useMemo)((function(){return function(e,t){return e?t?"forcePlay":"playSolid":"pauseSolid"}(t,a)}),[t,a]);return r.a.createElement(Ci,{content:t?"Click to pause":"Click to play",align:"bottom",plain:!0},r.a.createElement(Gs,{icon:i,onClick:t?function(){return o(Object(Ke.t)())}:function(){return o(Object(Ke.k)({forcePlay:!1}))},isPlaying:t},t?"Playing":"Paused"))},Vs=Object($.d)(Z.j).withConfig({displayName:"item__PanelRowContainer",componentId:"sc-1qh9192-0"})(["cursor:pointer;&:hover{background:",";}",""],Object(Z.F)("selected"),(function(e){return e.selected&&"background: ".concat(Object(Z.F)("selected")(e),";")})),Ys=Object(n.forwardRef)((function(e,t){var a=e.disabled,o=e.children,i=e.Wrapper,s=void 0===i?Z.z:i,l=e.onClick,c=e.testid,u=e.icon,d=e.padding,h=void 0===d?[2,3]:d,p=e.margin,f=void 0===p?[0]:p,g=e.round,m=void 0===g?0:g,b=e.actions,v=e.selected,_=e.width,y=void 0===_?"100%":_,O=Object(n.useCallback)((function(){a||l&&l()}),[l,a]);return r.a.createElement(Vs,{ref:t,flexWrap:!1,justifyContent:"between",alignItems:"center",padding:h,margin:f,round:m,onClick:O,"data-testid":c,width:y,selected:v,disabled:a},r.a.createElement(Z.j,{alignItems:"center",gap:3,flex:!0,basis:""},"string"===typeof u?r.a.createElement(Z.o,{name:u,disabled:a,color:"text",height:"16px",width:"16px"}):u,r.a.createElement(s,{opacity:a?"medium":void 0,width:"150px"},o)),b)})),Xs=Object($.d)(Z.l).attrs({padding:[0],margin:[0]}).withConfig({displayName:"list__DefaultListHeader",componentId:"cb73mo-0"})(["cursor:pointer;"]),Ks=function(e){var t=e.toggleOpen,a=e.label,n=e.testid,o=e.Header,i=void 0===o?Xs:o;return r.a.createElement(i,{"data-testid":n,onClick:t},a)},Zs=function(e){var t=e.isOpen,a=void 0!==t&&t,n=e.toggleOpen,o=e.label,i=e.children,s=e.testid,l=e.Header;return r.a.createElement(Z.j,{column:!0},r.a.createElement(Ks,{Header:l,toggleOpen:n,label:o,testid:s}),r.a.createElement(Z.d,{open:a},i))},qs=(Object($.d)(Z.j).attrs({bacgkround:"disabled",height:"1px",margin:[2,6]}).withConfig({displayName:"styled__Divider",componentId:"sc-1gb5vnf-0"})([""]),function(){return r.a.createElement(Z.j,{padding:[1,2],margin:[1],background:["neutral","black"],round:1,justifyContent:"center",width:{max:"320px"}},r.a.createElement(Z.D,{color:"bright"},"Play to refresh and have live content, pause to see historical, or force play to keep refreshing even when the tab loses focus at the expense of some system performance."))}),$s=Object($.d)(Z.j).attrs({padding:[1],role:"button"}).withConfig({displayName:"playOptions__MenuButton",componentId:"cm1181-0"})(["cursor:pointer;"]),Js=Object($.d)(Z.j).attrs({column:!0,padding:[2],background:"dropdown",round:1,overflow:{vertical:"auto"},margin:[2,0,0],width:40}).withConfig({displayName:"playOptions__Dropdown",componentId:"cm1181-1"})(["box-shadow:0px 4px 4px rgba(0,0,0,0.25);"]),Qs=Object(n.memo)((function(e){var t=e.target,a=Object(la.a)(),o=Object(En.a)(),i=Object(A.a)(o,2),s=i[0],l=i[1],c=function(){return l(!1)};return r.a.createElement(n.Fragment,null,s?r.a.createElement($s,{onClick:l,width:"auto"},r.a.createElement(Z.o,{name:"chevron_down",color:"text",width:"12px",height:"12px"})):r.a.createElement(Ci,{content:r.a.createElement(qs,null),align:"bottom",plain:!0},r.a.createElement($s,{onClick:l,width:"auto"},r.a.createElement(Z.o,{name:"chevron_down",color:"text",width:"12px",height:"12px"}))),t.current&&s&&r.a.createElement(Z.h,{target:t.current,align:{top:"bottom",left:"left"},onEsc:c,onClickOutside:c,animation:!0},r.a.createElement(Js,null,r.a.createElement(Ys,{round:1,icon:"playOutline",onClick:function(){a(Object(Ke.k)({forcePlay:!1})),c()}},"Play"),r.a.createElement(Ys,{round:1,icon:"pauseOutline",onClick:function(){a(Object(Ke.t)()),c()}},"Pause"),r.a.createElement(Ys,{round:1,icon:"forcePlayOutline",onClick:function(){a(Object(Ke.k)({forcePlay:!0})),c()}},"Force Play"))))})),el=function(){var e=Object(n.useRef)(),t=Object(la.b)(ue.s),a=Object(la.b)(ue.H),o=Object(la.b)(ue.m),i=Object(la.b)(ue.o),s=Object(la.b)(ue.n),l=Object(n.useMemo)((function(){return Boolean((t||!a)&&!o&&!i&&!s)}),[t,a,o,i,s]);return r.a.createElement(yi,{hasBorder:!0},r.a.createElement(zs,{isPlaying:l,padding:[2,2],round:!0,height:"100%",alignItems:"center",gap:1,ref:e},r.a.createElement(Ws,{isPlaying:l,isForcePlaying:!a}),r.a.createElement(Qs,{target:e}),r.a.createElement(Hs,{isPlaying:l,tagging:"global-view"})))},tl={warning:"#FFF8E1",error:"#FFEBEF"},al=Object($.d)(Z.j).attrs((function(e){var t=e.round,a=void 0===t?999:t,n=e.hollow,r=e.background;return{padding:[.5,2],round:a,border:!!n&&{side:"all",color:r,size:"1px"}}})).withConfig({displayName:"styled__StyledPill",componentId:"sc-1rgk900-0"})(["background:",";cursor:pointer;"],(function(e){var t=e.background;return e.hollow?tl[t]:t})),nl=Object(n.forwardRef)((function(e,t){var a=e.children,n=e.background,o=e.color,i=e.hollow,s=Object(gr.a)(e,["children","background","color","hollow"]);return r.a.createElement(al,Object.assign({background:n,hollow:i,ref:t},s),r.a.createElement(Z.B,{color:i?n:o,strong:!0},a))})),rl={"data-toggle":"modal","data-target":"#alarmsModal"},ol=function(){var e=Object(la.b)(ue.c),t=Object(n.useMemo)((function(){return e?Object.values(e.alarms):[]}),[e]),a=Object(n.useMemo)((function(){return t.reduce((function(e,t){var a=t.status;return"CRITICAL"===a&&(e.critical=e.critical+1),"WARNING"===a&&(e.warning=e.warning+1),e}),{critical:0,warning:0})}),[t]),o=a.critical,i=a.warning;return r.a.createElement(yi,{icon:"alarm"},r.a.createElement(Ci,{content:o?"".concat(o," critical alert").concat(o.length>1?"s":""):"No critical alerts",align:"bottom",plain:!0},r.a.createElement(nl,Object.assign({background:"error",hollow:!0},rl),o)),r.a.createElement(Ci,{content:i?"".concat(i," warning alert").concat(i.length>1?"s":""):"No warning alerts",align:"bottom",plain:!0},r.a.createElement(nl,Object.assign({background:"warning",hollow:!0},rl),i)))},il=function(){return r.a.createElement(Z.w,{app:"agent"},(function(e){var t=e.toggle,a=e.upToDate;return r.a.createElement(Ci,{content:"News",align:"bottom",plain:!0},r.a.createElement(Z.b,{"data-testid":"header-news-button",themeType:"dark",name:"news",icon:"insights",flavour:"borderless",neutral:a,warning:!a,onClick:t}))}))},sl=Object($.d)(Z.j).attrs({column:!0,padding:[2],background:"dropdown",round:1,overflow:{vertical:"auto"},margin:[2,0,0],width:80}).withConfig({displayName:"dropdown__Dropdown",componentId:"i5fe1c-0"})(["box-shadow:0px 4px 4px rgba(0,0,0,0.25);"]),ll=Object($.d)(Z.A).withConfig({displayName:"searchInput__SearchInput",componentId:"sc-1j08rwh-0"})(["& input{background:transparent;}& > label{margin-bottom:0;}"]),cl=Object(n.forwardRef)((function(e,t){var a=e.value,n=e.onChange;return r.a.createElement(ll,{inputRef:t,value:a,onChange:n,placeholder:"Search",metaShrinked:!0})})),ul=Object($.d)(Z.j).attrs({column:!0,padding:[2,0,0],overflow:{vertical:"auto"},height:{max:"320px"}}).withConfig({displayName:"container__Container",componentId:"qngq57-0"})([""]),dl=Object($.d)(Z.j).attrs({justifyContent:"between",alignItems:"center",width:"100%",gap:2}).withConfig({displayName:"wrapper__Wrapper",componentId:"sc-1m1od8q-0"})([""]),hl=function(e){var t=e.name,a=e.offset,o=e.utc,i=e.onSelect,s=Object(n.useCallback)((function(){return i(o)}),[o,i]);return r.a.createElement(Ys,{round:1,onClick:s,Wrapper:dl},r.a.createElement(Z.z,{color:"text"},t),r.a.createElement(Z.z,{color:"textLite",whiteSpace:"nowrap"},"UTC ",a))},pl=[{value:"Dateline Standard Time",abbr:"DST",text:"International Date Line West",utc:["Etc/GMT+12"]},{value:"UTC-11",abbr:"U",text:"Coordinated Universal Time-11",utc:["Etc/GMT+11","Pacific/Midway","Pacific/Niue","Pacific/Pago_Pago"]},{value:"Hawaiian Standard Time",abbr:"HST",text:"Hawaii",utc:["Etc/GMT+10","Pacific/Honolulu","Pacific/Johnston","Pacific/Rarotonga","Pacific/Tahiti"]},{value:"Alaskan Standard Time",abbr:"AKDT",text:"Alaska",utc:["America/Anchorage","America/Juneau","America/Nome","America/Sitka","America/Yakutat"]},{value:"Pacific Standard Time (Mexico)",abbr:"PDT",text:"Baja California",utc:["America/Santa_Isabel"]},{value:"Pacific Standard Time",abbr:"PST",text:"Pacific Time (US & Canada)",utc:["America/Dawson","America/Los_Angeles","America/Tijuana","America/Vancouver","America/Whitehorse","PST8PDT"]},{value:"US Mountain Standard Time",abbr:"UMST",text:"Arizona",utc:["America/Creston","America/Dawson_Creek","America/Hermosillo","America/Phoenix","Etc/GMT+7"]},{value:"Mountain Standard Time (Mexico)",abbr:"MDT",text:"Chihuahua, La Paz, Mazatlan",utc:["America/Chihuahua","America/Mazatlan"]},{value:"Mountain Standard Time",abbr:"MDT",text:"Mountain Time (US & Canada)",utc:["America/Boise","America/Cambridge_Bay","America/Denver","America/Edmonton","America/Inuvik","America/Ojinaga","America/Yellowknife","MST7MDT"]},{value:"Central America Standard Time",abbr:"CAST",text:"Central America",utc:["America/Belize","America/Costa_Rica","America/El_Salvador","America/Guatemala","America/Managua","America/Tegucigalpa","Etc/GMT+6","Pacific/Galapagos"]},{value:"Central Standard Time",abbr:"CDT",text:"Central Time (US & Canada)",utc:["America/Chicago","America/Indiana/Knox","America/Indiana/Tell_City","America/Matamoros","America/Menominee","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Rainy_River","America/Rankin_Inlet","America/Resolute","America/Winnipeg","CST6CDT"]},{value:"Central Standard Time (Mexico)",abbr:"CDT",text:"Guadalajara, Mexico City, Monterrey",utc:["America/Bahia_Banderas","America/Cancun","America/Merida","America/Mexico_City","America/Monterrey"]},{value:"Canada Central Standard Time",abbr:"CCST",text:"Saskatchewan",utc:["America/Regina","America/Swift_Current"]},{value:"SA Pacific Standard Time",abbr:"SPST",text:"Bogota, Lima, Quito",utc:["America/Bogota","America/Cayman","America/Coral_Harbour","America/Eirunepe","America/Guayaquil","America/Jamaica","America/Lima","America/Panama","America/Rio_Branco","Etc/GMT+5"]},{value:"Eastern Standard Time",abbr:"EDT",text:"Eastern Time (US & Canada)",utc:["America/Detroit","America/Havana","America/Indiana/Petersburg","America/Indiana/Vincennes","America/Indiana/Winamac","America/Iqaluit","America/Kentucky/Monticello","America/Louisville","America/Montreal","America/Nassau","America/New_York","America/Nipigon","America/Pangnirtung","America/Port-au-Prince","America/Thunder_Bay","America/Toronto","EST5EDT"]},{value:"US Eastern Standard Time",abbr:"UEDT",text:"Indiana (East)",utc:["America/Indiana/Marengo","America/Indiana/Vevay","America/Indianapolis"]},{value:"Venezuela Standard Time",abbr:"VST",text:"Caracas",utc:["America/Caracas"]},{value:"Paraguay Standard Time",abbr:"PYT",text:"Asuncion",utc:["America/Asuncion"]},{value:"Atlantic Standard Time",abbr:"ADT",text:"Atlantic Time (Canada)",utc:["America/Glace_Bay","America/Goose_Bay","America/Halifax","America/Moncton","America/Thule","Atlantic/Bermuda"]},{value:"Central Brazilian Standard Time",abbr:"CBST",text:"Cuiaba",utc:["America/Campo_Grande","America/Cuiaba"]},{value:"SA Western Standard Time",abbr:"SWST",text:"Georgetown, La Paz, Manaus, San Juan",utc:["America/Anguilla","America/Antigua","America/Aruba","America/Barbados","America/Blanc-Sablon","America/Boa_Vista","America/Curacao","America/Dominica","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guyana","America/Kralendijk","America/La_Paz","America/Lower_Princes","America/Manaus","America/Marigot","America/Martinique","America/Montserrat","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Santo_Domingo","America/St_Barthelemy","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Tortola","Etc/GMT+4"]},{value:"Pacific SA Standard Time",abbr:"PSST",text:"Santiago",utc:["America/Santiago","Antarctica/Palmer"]},{value:"Newfoundland Standard Time",abbr:"NDT",text:"Newfoundland",utc:["America/St_Johns"]},{value:"E. South America Standard Time",abbr:"ESAST",text:"Brasilia",utc:["America/Sao_Paulo"]},{value:"Argentina Standard Time",abbr:"AST",text:"Buenos Aires",utc:["America/Argentina/La_Rioja","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Buenos_Aires","America/Catamarca","America/Cordoba","America/Jujuy","America/Mendoza"]},{value:"SA Eastern Standard Time",abbr:"SEST",text:"Cayenne, Fortaleza",utc:["America/Araguaina","America/Belem","America/Cayenne","America/Fortaleza","America/Maceio","America/Paramaribo","America/Recife","America/Santarem","Antarctica/Rothera","Atlantic/Stanley","Etc/GMT+3"]},{value:"Greenland Standard Time",abbr:"GDT",text:"Greenland",utc:["America/Godthab"]},{value:"Montevideo Standard Time",abbr:"MST",text:"Montevideo",utc:["America/Montevideo"]},{value:"Bahia Standard Time",abbr:"BST",text:"Salvador",utc:["America/Bahia"]},{value:"UTC-02",abbr:"U",text:"Coordinated Universal Time-02",utc:["America/Noronha","Atlantic/South_Georgia","Etc/GMT+2"]},{value:"Mid-Atlantic Standard Time",abbr:"MDT",text:"Mid-Atlantic - Old",utc:[]},{value:"Azores Standard Time",abbr:"ADT",text:"Azores",utc:["America/Scoresbysund","Atlantic/Azores"]},{value:"Cape Verde Standard Time",abbr:"CVST",text:"Cape Verde Is.",utc:["Atlantic/Cape_Verde","Etc/GMT+1"]},{value:"Morocco Standard Time",abbr:"MDT",text:"Casablanca",utc:["Africa/Casablanca","Africa/El_Aaiun"]},{value:"UTC",abbr:"UTC",text:"Coordinated Universal Time",utc:["America/Danmarkshavn","Etc/GMT"]},{value:"GMT Standard Time",abbr:"GMT",text:"Edinburgh, London",utc:["Europe/Isle_of_Man","Europe/Guernsey","Europe/Jersey","Europe/London"]},{value:"GMT Standard Time",abbr:"GDT",text:"Dublin, Lisbon",utc:["Atlantic/Canary","Atlantic/Faeroe","Atlantic/Madeira","Europe/Dublin","Europe/Lisbon"]},{value:"Greenwich Standard Time",abbr:"GST",text:"Monrovia, Reykjavik",utc:["Africa/Abidjan","Africa/Accra","Africa/Bamako","Africa/Banjul","Africa/Bissau","Africa/Conakry","Africa/Dakar","Africa/Freetown","Africa/Lome","Africa/Monrovia","Africa/Nouakchott","Africa/Ouagadougou","Africa/Sao_Tome","Atlantic/Reykjavik","Atlantic/St_Helena"]},{value:"W. Europe Standard Time",abbr:"WEDT",text:"Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna",utc:["Arctic/Longyearbyen","Europe/Amsterdam","Europe/Andorra","Europe/Berlin","Europe/Busingen","Europe/Gibraltar","Europe/Luxembourg","Europe/Malta","Europe/Monaco","Europe/Oslo","Europe/Rome","Europe/San_Marino","Europe/Stockholm","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Zurich"]},{value:"Central Europe Standard Time",abbr:"CEDT",text:"Belgrade, Bratislava, Budapest, Ljubljana, Prague",utc:["Europe/Belgrade","Europe/Bratislava","Europe/Budapest","Europe/Ljubljana","Europe/Podgorica","Europe/Prague","Europe/Tirane"]},{value:"Romance Standard Time",abbr:"RDT",text:"Brussels, Copenhagen, Madrid, Paris",utc:["Africa/Ceuta","Europe/Brussels","Europe/Copenhagen","Europe/Madrid","Europe/Paris"]},{value:"Central European Standard Time",abbr:"CEDT",text:"Sarajevo, Skopje, Warsaw, Zagreb",utc:["Europe/Sarajevo","Europe/Skopje","Europe/Warsaw","Europe/Zagreb"]},{value:"W. Central Africa Standard Time",abbr:"WCAST",text:"West Central Africa",utc:["Africa/Algiers","Africa/Bangui","Africa/Brazzaville","Africa/Douala","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Luanda","Africa/Malabo","Africa/Ndjamena","Africa/Niamey","Africa/Porto-Novo","Africa/Tunis","Etc/GMT-1"]},{value:"Namibia Standard Time",abbr:"NST",text:"Windhoek",utc:["Africa/Windhoek"]},{value:"GTB Standard Time",abbr:"GDT",text:"Athens, Bucharest",utc:["Asia/Nicosia","Europe/Athens","Europe/Bucharest","Europe/Chisinau"]},{value:"Middle East Standard Time",abbr:"MEDT",text:"Beirut",utc:["Asia/Beirut"]},{value:"Egypt Standard Time",abbr:"EST",text:"Cairo",utc:["Africa/Cairo"]},{value:"Syria Standard Time",abbr:"SDT",text:"Damascus",utc:["Asia/Damascus"]},{value:"E. Europe Standard Time",abbr:"EEDT",text:"E. Europe",utc:["Asia/Nicosia","Europe/Athens","Europe/Bucharest","Europe/Chisinau","Europe/Helsinki","Europe/Kiev","Europe/Mariehamn","Europe/Nicosia","Europe/Riga","Europe/Sofia","Europe/Tallinn","Europe/Uzhgorod","Europe/Vilnius","Europe/Zaporozhye"]},{value:"South Africa Standard Time",abbr:"SAST",text:"Harare, Pretoria",utc:["Africa/Blantyre","Africa/Bujumbura","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Kigali","Africa/Lubumbashi","Africa/Lusaka","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Etc/GMT-2"]},{value:"FLE Standard Time",abbr:"FDT",text:"Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius",utc:["Europe/Helsinki","Europe/Kiev","Europe/Mariehamn","Europe/Riga","Europe/Sofia","Europe/Tallinn","Europe/Uzhgorod","Europe/Vilnius","Europe/Zaporozhye"]},{value:"Turkey Standard Time",abbr:"TDT",text:"Istanbul",utc:["Europe/Istanbul"]},{value:"Israel Standard Time",abbr:"JDT",text:"Jerusalem",utc:["Asia/Jerusalem"]},{value:"Libya Standard Time",abbr:"LST",text:"Tripoli",utc:["Africa/Tripoli"]},{value:"Jordan Standard Time",abbr:"JST",text:"Amman",utc:["Asia/Amman"]},{value:"Arabic Standard Time",abbr:"AST",text:"Baghdad",utc:["Asia/Baghdad"]},{value:"Kaliningrad Standard Time",abbr:"KST",text:"Kaliningrad",utc:["Europe/Kaliningrad"]},{value:"Arab Standard Time",abbr:"AST",text:"Kuwait, Riyadh",utc:["Asia/Aden","Asia/Bahrain","Asia/Kuwait","Asia/Qatar","Asia/Riyadh"]},{value:"E. Africa Standard Time",abbr:"EAST",text:"Nairobi",utc:["Africa/Addis_Ababa","Africa/Asmera","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Mogadishu","Africa/Nairobi","Antarctica/Syowa","Etc/GMT-3","Indian/Antananarivo","Indian/Comoro","Indian/Mayotte"]},{value:"Moscow Standard Time",abbr:"MSK",text:"Moscow, St. Petersburg, Volgograd, Minsk",utc:["Europe/Kirov","Europe/Moscow","Europe/Simferopol","Europe/Volgograd","Europe/Minsk"]},{value:"Samara Time",abbr:"SAMT",text:"Samara, Ulyanovsk, Saratov",utc:["Europe/Astrakhan","Europe/Samara","Europe/Ulyanovsk"]},{value:"Iran Standard Time",abbr:"IDT",text:"Tehran",utc:["Asia/Tehran"]},{value:"Arabian Standard Time",abbr:"AST",text:"Abu Dhabi, Muscat",utc:["Asia/Dubai","Asia/Muscat","Etc/GMT-4"]},{value:"Azerbaijan Standard Time",abbr:"ADT",text:"Baku",utc:["Asia/Baku"]},{value:"Mauritius Standard Time",abbr:"MST",text:"Port Louis",utc:["Indian/Mahe","Indian/Mauritius","Indian/Reunion"]},{value:"Georgian Standard Time",abbr:"GET",text:"Tbilisi",utc:["Asia/Tbilisi"]},{value:"Caucasus Standard Time",abbr:"CST",text:"Yerevan",utc:["Asia/Yerevan"]},{value:"Afghanistan Standard Time",abbr:"AST",text:"Kabul",utc:["Asia/Kabul"]},{value:"West Asia Standard Time",abbr:"WAST",text:"Ashgabat, Tashkent",utc:["Antarctica/Mawson","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Dushanbe","Asia/Oral","Asia/Samarkand","Asia/Tashkent","Etc/GMT-5","Indian/Kerguelen","Indian/Maldives"]},{value:"Yekaterinburg Time",abbr:"YEKT",text:"Yekaterinburg",utc:["Asia/Yekaterinburg"]},{value:"Pakistan Standard Time",abbr:"PKT",text:"Islamabad, Karachi",utc:["Asia/Karachi"]},{value:"India Standard Time",abbr:"IST",text:"Chennai, Kolkata, Mumbai, New Delhi",utc:["Asia/Kolkata"]},{value:"Sri Lanka Standard Time",abbr:"SLST",text:"Sri Jayawardenepura",utc:["Asia/Colombo"]},{value:"Nepal Standard Time",abbr:"NST",text:"Kathmandu",utc:["Asia/Kathmandu"]},{value:"Central Asia Standard Time",abbr:"CAST",text:"Nur-Sultan (Astana)",utc:["Antarctica/Vostok","Asia/Almaty","Asia/Bishkek","Asia/Qyzylorda","Asia/Urumqi","Etc/GMT-6","Indian/Chagos"]},{value:"Bangladesh Standard Time",abbr:"BST",text:"Dhaka",utc:["Asia/Dhaka","Asia/Thimphu"]},{value:"Myanmar Standard Time",abbr:"MST",text:"Yangon (Rangoon)",utc:["Asia/Rangoon","Indian/Cocos"]},{value:"SE Asia Standard Time",abbr:"SAST",text:"Bangkok, Hanoi, Jakarta",utc:["Antarctica/Davis","Asia/Bangkok","Asia/Hovd","Asia/Jakarta","Asia/Phnom_Penh","Asia/Pontianak","Asia/Saigon","Asia/Vientiane","Etc/GMT-7","Indian/Christmas"]},{value:"N. Central Asia Standard Time",abbr:"NCAST",text:"Novosibirsk",utc:["Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk"]},{value:"China Standard Time",abbr:"CST",text:"Beijing, Chongqing, Hong Kong, Urumqi",utc:["Asia/Hong_Kong","Asia/Macau","Asia/Shanghai"]},{value:"North Asia Standard Time",abbr:"NAST",text:"Krasnoyarsk",utc:["Asia/Krasnoyarsk"]},{value:"Singapore Standard Time",abbr:"MPST",text:"Kuala Lumpur, Singapore",utc:["Asia/Brunei","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Makassar","Asia/Manila","Asia/Singapore","Etc/GMT-8"]},{value:"W. Australia Standard Time",abbr:"WAST",text:"Perth",utc:["Antarctica/Casey","Australia/Perth"]},{value:"Taipei Standard Time",abbr:"TST",text:"Taipei",utc:["Asia/Taipei"]},{value:"Ulaanbaatar Standard Time",abbr:"UST",text:"Ulaanbaatar",utc:["Asia/Choibalsan","Asia/Ulaanbaatar"]},{value:"North Asia East Standard Time",abbr:"NAEST",text:"Irkutsk",utc:["Asia/Irkutsk"]},{value:"Japan Standard Time",abbr:"JST",text:"Osaka, Sapporo, Tokyo",utc:["Asia/Dili","Asia/Jayapura","Asia/Tokyo","Etc/GMT-9","Pacific/Palau"]},{value:"Korea Standard Time",abbr:"KST",text:"Seoul",utc:["Asia/Pyongyang","Asia/Seoul"]},{value:"Cen. Australia Standard Time",abbr:"CAST",text:"Adelaide",utc:["Australia/Adelaide","Australia/Broken_Hill"]},{value:"AUS Central Standard Time",abbr:"ACST",text:"Darwin",utc:["Australia/Darwin"]},{value:"E. Australia Standard Time",abbr:"EAST",text:"Brisbane",utc:["Australia/Brisbane","Australia/Lindeman"]},{value:"AUS Eastern Standard Time",abbr:"AEST",text:"Canberra, Melbourne, Sydney",utc:["Australia/Melbourne","Australia/Sydney"]},{value:"West Pacific Standard Time",abbr:"WPST",text:"Guam, Port Moresby",utc:["Antarctica/DumontDUrville","Etc/GMT-10","Pacific/Guam","Pacific/Port_Moresby","Pacific/Saipan","Pacific/Truk"]},{value:"Tasmania Standard Time",abbr:"TST",text:"Hobart",utc:["Australia/Currie","Australia/Hobart"]},{value:"Yakutsk Standard Time",abbr:"YST",text:"Yakutsk",utc:["Asia/Chita","Asia/Khandyga","Asia/Yakutsk"]},{value:"Central Pacific Standard Time",abbr:"CPST",text:"Solomon Is., New Caledonia",utc:["Antarctica/Macquarie","Etc/GMT-11","Pacific/Efate","Pacific/Guadalcanal","Pacific/Kosrae","Pacific/Noumea","Pacific/Ponape"]},{value:"Vladivostok Standard Time",abbr:"VST",text:"Vladivostok",utc:["Asia/Sakhalin","Asia/Ust-Nera","Asia/Vladivostok"]},{value:"New Zealand Standard Time",abbr:"NZST",text:"Auckland, Wellington",utc:["Antarctica/McMurdo","Pacific/Auckland"]},{value:"UTC+12",abbr:"U",text:"Coordinated Universal Time+12",utc:["Etc/GMT-12","Pacific/Funafuti","Pacific/Kwajalein","Pacific/Majuro","Pacific/Nauru","Pacific/Tarawa","Pacific/Wake","Pacific/Wallis"]},{value:"Fiji Standard Time",abbr:"FST",text:"Fiji",utc:["Pacific/Fiji"]},{value:"Magadan Standard Time",abbr:"MST",text:"Magadan",utc:["Asia/Anadyr","Asia/Kamchatka","Asia/Magadan","Asia/Srednekolymsk"]},{value:"Kamchatka Standard Time",abbr:"KDT",text:"Petropavlovsk-Kamchatsky - Old",utc:["Asia/Kamchatka"]},{value:"Tonga Standard Time",abbr:"TST",text:"Nuku'alofa",utc:["Etc/GMT-13","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Tongatapu"]},{value:"Samoa Standard Time",abbr:"SST",text:"Samoa",utc:["Pacific/Apia"]}],fl=new Date,gl=function(){return new Intl.DateTimeFormat("default",{}).resolvedOptions()},ml=function(){var e={};return pl.reduce((function(t,a){var n=a.utc;try{var r=new Intl.DateTimeFormat("fr",{timeZone:n[0],timeZoneName:"short"}).format(fl).match(/[\u2212+].+/)||[],o=function(e){return e?e.replace("\u2212","-"):""}(Object(A.a)(r,1)[0]);if(e[o])return t.concat(Object(g.a)({},a,{offset:e[o]}));var i=function(e){if(!e)return"+0";var t=e.split(":");return t.length>1?"".concat(t[0]).concat((t[1]/60).toString().substr(1)):t[0]}(o);return e[o]=i,t.concat(Object(g.a)({},a,{offset:i}))}catch(s){return t}}),[])}().sort((function(e,t){return e.offset-t.offset})),bl=ml.reduce((function(e,t){var a=t.utc,n=Object(gr.a)(t,["utc"]);return a.forEach((function(t){return e[t]=Object(g.a)({},n,{utc:t})})),e}),{}),vl=function(){var e=Object(n.useState)(""),t=Object(A.a)(e,2),a=t[0],o=t[1],i=Object(En.a)(),s=Object(A.a)(i,2),l=s[0],c=s[1],u=Object(n.useRef)(),d=Object(n.useRef)(),h=window.urlOptions.updateUtcParam;Object(n.useEffect)((function(){d.current&&l&&d.current.focus()}),[l]);var p=Object(la.a)(),f=Object(la.b)(ue.M),g=Object(n.useMemo)((function(){var e=Object(Wt.b)().utc,t=void 0===e?"":e,a=function(e,t){var a=t||("default"===e?gl().timeZone:e);return bl[a in bl?a:gl().timeZone]||{}}(f,t),n=a.offset,r=void 0===n?"":n,o=a.utc,i=void 0===o?"":o;return t!==i&&h(i),f!==i&&p(Object(Ke.v)({key:"timezone",value:i})),p(Object(Ke.v)({key:"utcOffset",value:parseFloat(r)})),r}),[f]),m=Object(n.useMemo)((function(){return a?ml.filter((function(e){var t=e.text,n=e.offset;return t.toUpperCase().includes(a.toUpperCase())||n.includes(a)})):ml}),[a]),b=function(){c(!1),o("")},v=Object(n.useCallback)((function(e){h(e),p(Object(Ke.v)({key:"timezone",value:e})),b()}),[]),_=Object(n.useCallback)((function(e){return o(e.target.value)}),[]);return r.a.createElement(yi,{hasBorder:!0},r.a.createElement(Ys,{round:1,onClick:c,ref:u,Wrapper:dl},r.a.createElement(Z.j,{gap:1},r.a.createElement(Z.z,{color:"textLite",whiteSpace:"nowrap"},"UTC ",g)),r.a.createElement(Z.o,{name:"chevron_down",color:"text",width:"12px",height:"12px"})),u.current&&l&&r.a.createElement(Z.h,{target:u.current,align:{top:"bottom",left:"left"},onEsc:b,onClickOutside:b,animation:!0},r.a.createElement(sl,null,r.a.createElement(cl,{value:a,onChange:_,ref:d}),r.a.createElement(ul,null,m.map((function(e){var t=e.text,a=e.offset,n=e.utc;return r.a.createElement(hl,{key:t,name:t,offset:a,utc:n[0],onSelect:v})}))))))},_l=a(78),yl=a(501),Ol=a(73),xl=a(124),wl=a(182),El=Object($.d)(Z.j).attrs({position:"absolute"}).withConfig({displayName:"iframe__IframeContainer",componentId:"sc-1tybwh7-0"})(["display:none;"]),Sl=function(e){var t=e.signedIn,a=Object(n.useState)(!1),o=Object(A.a)(a,2),i=o[0],s=o[1],l=Object(n.useRef)(),c=Object(n.useRef)(),u=Object(yl.a)(Xt),d=Object(A.a)(u,3),h=d[0],p=d[2],f=Object(la.b)(ue.f),g=Object(la.b)(ue.y),m=Object(la.a)(),v=window.location,_=v.origin,y=v.pathname,O=encodeURIComponent(g.hostname),x=encodeURIComponent(_+y),w=Object(Ve.c)(f,"sign-in?id=".concat(g.machineGuid,"&name=").concat(O,"&origin=").concat(x));Object(Ol.b)("hello-from-sign-in",(function(e){l.current=e})),Object(xl.a)();var E=Object(n.useCallback)((function(){s(!0),setTimeout((function(){return m(Object(b.c)({offline:void 0===l.current}))}),500)}),[]);return Object(n.useEffect)((function(){var e=function(e){(null===e||void 0===e?void 0:e.target)&&(e.target.src!==w||i||E())};return window.addEventListener("DOMFrameContentLoaded",e),function(){return window.removeEventListener("DOMFrameContentLoaded",e)}}),[w,i,E]),Object(n.useEffect)((function(){if(t&&c.current&&g.registryServer&&g.registryServer!==Ve.b&&h){p();var e=g.registryMachinesArray;e&&e.length>0&&Object(Ol.a)(c.current,{type:"synced-private-registry",payload:e})}}),[t,g,h]),r.a.createElement(El,{as:"iframe",id:wl.a,src:w,onLoad:E})},Cl=function(){var e=Object(s.d)(),t=Object(yl.a)("has-sign-in-history"),a=Object(A.a)(t,2),r=a[0],o=a[1],i=Object(n.useState)(r),l=Object(A.a)(i,2),c=l[0],u=l[1],d=Object(n.useCallback)((function(t){t&&(u(t),o(t)),e(Object(b.b)({isSignedIn:t}))}),[]),h=Object(Ol.b)("is-signed-in",d);return[Object(A.a)(h,1)[0],c]},Al=function(){var e=Cl(),t=Object(A.a)(e,1)[0];return Object(s.e)(ue.u)&&r.a.createElement(Ci,{content:"Sign in to Netdata to monitor all your nodes at once, have composite charts, custom dashboards, use intelligent features and more",align:"bottom",plain:!0},r.a.createElement("div",null,r.a.createElement(Sl,{signedIn:t}),!t&&r.a.createElement(_l.a,{utmParameters:{content:"topbar"}},(function(e){var t=e.isRegistry,a=e.link,n=e.offline,o=e.onSignIn;return r.a.createElement(Z.b,Object.assign({"data-testid":"header-signin",label:"Sign in",disabled:n},t?{as:"a",href:a}:{onClick:o}))}))))},kl=a(282),jl=Object($.d)(Z.j).attrs({as:"header",position:"relative",justifyContent:"between",background:"panel",zIndex:20,width:"100%",padding:[2,4,2,4]}).withConfig({displayName:"header__Wrapper",componentId:"c0wsrq-0"})(["pointer-events:all;"]),Tl=function(){return r.a.createElement(jl,null,r.a.createElement(Z.j,{alignItems:"center",gap:3},r.a.createElement(xi,null)),r.a.createElement(Z.j,{justifyContent:"end",alignItems:"center",gap:3},r.a.createElement(kl.CloudConnectionStatus,null),r.a.createElement(Ni,null),r.a.createElement(il,null),r.a.createElement(Ai,null),r.a.createElement(Mi,null),r.a.createElement(vl,null),r.a.createElement(el,null),r.a.createElement(ol,null),r.a.createElement(Al,null)))},Dl=Object($.d)(Z.b).withConfig({displayName:"expandButton__ExpandButton",componentId:"ebkdno-0"})(["&&{> .button-icon{width:6px;height:9px;}"]),Pl=a(140),Ml=function(e){var t=e.flavour,a=void 0===t?"default":t,n=Object(gr.a)(e,["flavour"]),o=Object(s.e)(ue.f);return r.a.createElement(Z.j,Object.assign({alignItems:"center",as:"iframe",src:"".concat(Object(Pl.a)(o,"sign-out"),"?type=").concat(a),border:{side:"all",size:"0px"},width:{max:"128px"},height:{max:"40px"}},n))},Ll=function(){return r.a.createElement(_l.a,{utmParameters:{content:"userSettings"}},(function(e){var t=e.isRegistry,a=e.link,n=e.onSignIn;return r.a.createElement(Z.z,{onClick:t?function(e){return function(e,t){e.stopPropagation(),window.open(t,"_blank","noopener,noreferrer")}(e,a)}:n},"Sign in")}))},Il=Object(Ha.a)((function(e){return e.dashboard}),(function(e){return e.isSignedIn})),Nl=function(){var e=Object(En.a)(),t=Object(A.a)(e,2),a=t[0],o=t[1],i=Object(la.b)(Il),s=Object(n.useMemo)((function(){return[].concat(Object(C.a)(i?[{children:"Operational Status",onClick:function(){return window.open("https://status.netdata.cloud","_blank","noopener,noreferrer")}}]:[]),Object(C.a)(i?[{separator:!0}]:[]),Object(C.a)(i?[{children:r.a.createElement(Ml,{"data-testid":"signout-button-sidebar",flavour:"borderless",height:{max:"18px"}})}]:[{children:r.a.createElement(Ll,null)}]))}),[i]);return r.a.createElement($.b,{theme:Z.e},r.a.createElement(Z.b,{"data-testid":"avatar-button-sidebar",flavour:"borderless",neutral:!0,icon:"user",title:"User settings",name:"userSettings",onClick:o}),a&&r.a.createElement(Z.p,{position:"bottom-left",onClickOutside:o,onEsc:o,backdrop:!1,margin:[5,18]},r.a.createElement(Z.j,{column:!0,width:52,background:"mainBackground",padding:[3],round:!0},s.map((function(e,t){return e.separator?r.a.createElement(Z.j,{height:"1px",background:"disabled",key:t}):r.a.createElement(Ys,Object.assign({key:t,padding:[2,4],round:1},e.onClick&&{onClick:e.onClick}),e.children)})))))},Rl=function(){return r.a.createElement(r.a.Fragment,null,r.a.createElement(Z.j,{width:"40px",height:"40px",round:2,border:{side:"all",color:"border",size:"2px",type:"dotted"}}),r.a.createElement(Z.j,{height:"1px",background:"separator",width:"20px"}),r.a.createElement(Z.b,{icon:"plus",disabled:!0}))},Fl=function(){var e=Object(la.b)(ue.f);return r.a.createElement(Z.j,{as:"iframe",src:Object(Ve.c)(e,"space-bar"),title:"Space Bar",height:"100%",width:"100%",border:{side:"all",size:"0px"},overflow:"hidden"})},Bl=function(e){var t=e.isOpen,a=e.toggle,n=e.isSignedIn,o=Object(s.e)(ue.u);return r.a.createElement(Z.j,{column:!0,justifyContent:"between",background:"panel",padding:[3,0],width:"64px",alignItems:"center",gap:6,position:"relative",overflow:"hidden"},r.a.createElement(Z.j,{column:!0,gap:4,alignItems:"center",height:"100%",overflow:"hidden"},r.a.createElement(Z.o,{color:"success",name:"netdataPress",height:"32px",width:"32px"}),!t&&r.a.createElement(Dl,{icon:"chevron_right_s",onClick:a,small:!0,neutral:!0,flavour:"borderless",themeType:"dark"}),o&&n&&r.a.createElement(Fl,null),o&&!n&&r.a.createElement(Rl,null)),r.a.createElement(Z.j,{column:!0,gap:4,alignItems:"center"},r.a.createElement(Z.g,{app:"agent"},(function(e){return r.a.createElement(Z.b,{flavour:"borderless",neutral:!0,themeType:"dark",className:"btn",icon:"question",onClick:e,title:"Need help?"})})),r.a.createElement(Z.b,{flavour:"borderless",neutral:!0,themeType:"dark",className:"btn","data-toggle":"modal","data-target":"#optionsModal",icon:"gear",title:"Settings"}),o&&r.a.createElement(Nl,null)))},Hl=function(e){for(var t,a,n=[],r=0,o=-1,i=0;t=(a=e.charAt(r++)).charCodeAt(0);){var s=t>=48&&t<=57;s!==i&&(n[++o]="",i=s),n[o]+=a}return n},zl=function(e,t){for(var a=Hl(e.toLowerCase()),n=Hl(t.toLowerCase()),r=0;a[r]&&n[r];r++)if(a[r]!==n[r]){var o=Number(a[r]),i=Number(n[r]);return o.toString()===a[r]&&i.toString()===n[r]?o-i:a[r]>n[r]?1:-1}return a.length-n.length},Ul=function(e,t){return"".concat(e,"/host/").concat(t,"/")},Gl=function(e,t,a){if(!e||!t)return{};var n=function(e){var t=document.location.origin.toString()+decodeURI(document.location.pathname.toString());return t.endsWith("/host/".concat(e,"/"))&&(t=t.substring(0,t.length-"/host/".concat(e,"/").toString().length)),t.endsWith("/")&&(t=t.substring(0,t.length-1)),t}(t);return{parentNode:{hostname:Object(A.a)(e,1)[0].hostname,url:"".concat(n,"/")},replicatedNodes:e.slice(1).map((function(e,t){var r=e.hostname;return{hostname:r,url:Ul(n,r),status:a[t+1].reachable}})).sort((function(e,t){return zl(e.hostname,t.hostname)}))}},Wl=Object($.d)(Z.j).attrs({as:"a",gap:2,alignItems:"center"}).withConfig({displayName:"anchor__Anchor",componentId:"sc-8wivg4-0"})(["&:hover{text-decoration:none;}"]),Vl=function(e){var t=e.hostname,a=e.url,n=e.status;return r.a.createElement(Wl,{href:a,justifyContent:"between",padding:[0,0,0,2]},r.a.createElement(Z.j,{alignItems:"center",gap:2},r.a.createElement(Z.o,{name:"node",color:"bright"}),r.a.createElement(Z.z,{color:"bright",truncate:!0},t)),r.a.createElement(nl,{background:n?"success":"border",color:"bright",round:10},n?"Live":"Off"))},Yl=Object($.d)(Z.A).withConfig({displayName:"replicatedNodes__Search",componentId:"sc-1bn9jso-0"})(["& > label{margin-bottom:0;}"]),Xl=Object($.d)(Z.o).withConfig({displayName:"replicatedNodes__StyledIcon",componentId:"sc-1bn9jso-1"})(["transform:",";"],(function(e){return e.right?"rotate(270deg)":"none"})),Kl=function(e){var t=e.parentNode,a=e.replicatedNodes,o=Object(n.useState)(!0),i=Object(A.a)(o,2),s=i[0],l=i[1],c=Object(n.useState)(""),u=Object(A.a)(c,2),d=u[0],h=u[1],p=Object(n.useCallback)((function(){return l((function(e){return!e}))}),[]),f=Object(n.useCallback)((function(e){return h(e.target.value)}),[]),g=Object(n.useMemo)((function(){return d?a.filter((function(e){return e.hostname.toLowerCase().includes(d.toLowerCase())})):a}),[a,d]);return r.a.createElement(Zs,{isOpen:s,toggleOpen:p,label:r.a.createElement(Z.j,{alignItems:"center",justifyContent:"between"},r.a.createElement(Z.z,{strong:!0,color:"border"},"Replicated nodes"),r.a.createElement(Xl,{right:!s,name:"chevron_down",size:"small",color:"text"}))},r.a.createElement(Z.j,{column:!0,gap:4,padding:[4,0,0]},r.a.createElement(Wl,{as:"a",href:t.url,justifyContent:"start"},r.a.createElement(Z.o,{name:"nodes",size:"small",color:"bright"}),r.a.createElement(Z.z,{color:"bright"},t.hostname)),g.length>=5&&r.a.createElement(Z.j,{padding:[0,0,0,2]},r.a.createElement(Yl,{value:d,onChange:f,iconLeft:r.a.createElement(Z.o,{name:"search_s",size:"small",color:"text"}),metaShrinked:!0})),r.a.createElement(Z.j,{column:!0,gap:2},g.map((function(e){var t=e.hostname,a=e.url,n=e.status;return r.a.createElement(Vl,{key:t,hostname:t,url:a,status:n})})))))},Zl=function(e){var t=e.parentNode,a=e.replicatedNodes,o=Object(la.b)(ue.f),i=Object(n.useRef)(),s=Object(Ol.b)("hello-from-space-panel"),l=Object(A.a)(s,1)[0];return Object(n.useEffect)((function(){l&&i.current&&Object(Ol.a)(i.current,{type:"streamed-hosts-data",payload:{parentNode:t,replicatedNodes:a}})}),[a,t,l]),r.a.createElement(Z.j,{ref:i,as:"iframe",src:Object(Pl.a)(o,"space-panel"),title:"space panel",width:"100%",height:"100%",border:{side:"all",size:"0px"}})},ql={signIn:{title:"Welcome back!",content:[r.a.createElement(Z.D,{key:"1",color:"bright"},"Sign in again to enjoy the benefits of Netdata Cloud"," ")]},signUp:{title:"Welcome to Netdata Cloud!",content:[r.a.createElement(Z.D,{key:"1",color:"bright"},r.a.createElement(Z.D,{strong:!0,color:"bright"},"A single place")," ","for all your nodes."),r.a.createElement(Z.D,{key:"2",color:"bright"},r.a.createElement(Z.D,{strong:!0,color:"bright"},"Multi-node dashboards")," ","out of the box."),r.a.createElement(Z.D,{key:"3",color:"bright"},r.a.createElement(Z.D,{strong:!0,color:"bright"},"Custom dashboards")," ","for you to create, edit and share online."),r.a.createElement(Z.D,{key:"4",color:"bright"},r.a.createElement(Z.D,{strong:!0,color:"bright"},"Metric Correlations")," ","to find the root cause of anything."),r.a.createElement(Z.D,{key:"5",color:"bright"},r.a.createElement(Z.D,{strong:!0,color:"bright"},"Centrally dispatched notifications")," ","for all alarms of all your nodes."),r.a.createElement(Z.D,{key:"6",color:"bright"},"And... It is"," ",r.a.createElement(Z.D,{as:"a",href:"https://www.netdata.cloud/get-netdata/",target:"_blank",rel:"noopener noreferrer",strong:!0,color:"bright"},"free, forever!"))]}},$l=function(){return r.a.createElement(_l.a,{utmParameters:{content:"sidebar"}},(function(e){var t=e.isRegistry,a=e.link,n=e.onSignIn,o=e.offline,i=ql.signIn,s=i.title,l=i.content;return r.a.createElement(Z.j,{background:["neutral","regentgrey"],column:!0,gap:4,padding:[10],border:{side:"right",color:"panel"}},r.a.createElement(Z.z,{color:"bright",strong:!0},s),l.map((function(e){return e})),r.a.createElement(Z.b,Object.assign({width:"100%",label:"Sign in",disabled:o},t?{as:"a",href:a}:{onClick:n})))}))},Jl=function(){return r.a.createElement("svg",{width:"68",height:"68",viewBox:"0 0 68 68",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.a.createElement("path",{d:"M48.875 6.375H19.125C16.7778 6.375 14.875 8.27779 14.875 10.625V40.375C14.875 42.7222 16.7778 44.625 19.125 44.625H48.875C51.2222 44.625 53.125 42.7222 53.125 40.375V10.625C53.125 8.27779 51.2222 6.375 48.875 6.375Z",fill:"white",stroke:"#AEB3B7"}),r.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M41.0834 38.25C41.8658 38.25 42.5 38.8843 42.5 39.6667V41.0833C44.0648 41.0833 45.3334 42.3519 45.3334 43.9167V58.0833C45.3334 59.6481 44.0648 60.9167 42.5 60.9167H38.25V65.1667H31.8278V60.9167H26.9167C25.3519 60.9167 24.0834 59.6481 24.0834 58.0833V43.9167C24.0834 42.3519 25.3519 41.0833 26.9167 41.0833V39.6667C26.9167 38.8843 27.551 38.25 28.3334 38.25H41.0834Z",fill:"#35414A"}),r.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.7954 12.75C40.5778 12.75 41.2121 13.3843 41.2121 14.1667L41.2108 16.7294L43.9166 16.7296C44.699 16.7296 45.3333 17.3639 45.3333 18.1463V34C45.3333 34.7824 44.699 35.4167 43.9166 35.4167L43.272 35.4152L43.2727 33.3403H41.2121L41.2108 35.4152H39.151L39.1515 33.3403H37.0909L37.0897 35.4152H35.0299L35.0303 33.3403H32.9697L32.9686 35.4152H30.9088L30.909 33.3403H28.8484L28.8475 35.4152H26.7877L26.7878 33.3403H24.7272L24.7265 35.4152L24.0833 35.4167C23.3009 35.4167 22.6666 34.7824 22.6666 34V18.1463C22.6666 17.3639 23.3009 16.7296 24.0833 16.7296L26.7877 16.7294L26.7878 14.1667C26.7878 13.3843 27.4221 12.75 28.2045 12.75H39.7954Z",fill:"#35414A"}))},Ql=function(){return r.a.createElement(Z.j,{alignItems:"center",background:["neutral","regentgrey"],column:!0,gap:1,padding:[10]},r.a.createElement(Z.D,{color:"bright",strong:!0,textAlign:"center"},"Can't connect to Netdata Cloud"),r.a.createElement(Jl,null),r.a.createElement(Z.C,{color:"bright",textAlign:"center",margin:[2,0,0]},"Maybe you are behind a firewall or you don\u2019t have connection to the internet"))},ec=Object(Ha.a)((function(e){return e.global.chartsMetadata.data||{}}),(function(e){return e.global.registry.fullInfoPayload.mirrored_hosts_status||{}}),(function(e,t){var a=e.hosts,n=e.hostname;return Gl(a,n,t)})),tc=Object(Ha.a)((function(e){return e.global.registry}),(function(e){return e.registryMachinesArray||[]})),ac=Object(Ha.a)((function(e){return e.dashboard}),(function(e){return{isSignedIn:e.isSignedIn,offline:e.offline}})),nc=r.a.memo((function(e){var t=e.isOpen,a=e.toggle,o=Object(s.e)(ec),i=o.parentNode,l=void 0===i?{}:i,c=o.replicatedNodes,u=void 0===c?[]:c,d=Object(s.e)(tc),h=Object(s.e)(ue.v),p=Object(s.e)(ac),f=p.isSignedIn,g=p.offline,m=Object(s.e)(ue.u),b=Object(n.useCallback)((function(){return window.switchRegistryModalHandler()}),[]);return r.a.createElement(Z.d,{width:74,background:"panel",open:t,direction:"horizontal",persist:!0},r.a.createElement(Z.j,{flex:!0,column:!0,overflow:{vertical:"hidden"},margin:[3,0,0],border:{side:"left",color:"separator"},style:{pointerEvents:"all"}},r.a.createElement(Z.j,{overflow:{vertical:"auto"},flex:!0,column:!0,gap:4,padding:[4]},r.a.createElement(Z.j,{alignSelf:"end"},r.a.createElement(Z.b,{neutral:!0,flavour:"borderless",themeType:"dark",small:!0,icon:"chevron_left",onClick:a})),!f&&r.a.createElement(r.a.Fragment,null,!!u.length&&r.a.createElement(Kl,{parentNode:l,replicatedNodes:u}),!!d.length&&r.a.createElement(Z.z,{strong:!0,color:"border"},"VisitedNodes")),f&&r.a.createElement(Zl,{parentNode:l,replicatedNodes:u})),h&&r.a.createElement(Z.j,{border:{side:"top"},justifyContent:"center",alignItems:"center",padding:[6]},r.a.createElement(Z.D,{onClick:b},"Switch Identity")),!f&&m&&r.a.createElement($l,null),g&&m&&r.a.createElement(Ql,null)))})),rc=Object($.d)(Z.j).attrs({height:"100vh",zIndex:10}).withConfig({displayName:"sidebar__Wrapper",componentId:"v4d3v5-0"})(["pointer-events:all;"]),oc=Object(Ha.a)((function(e){return e.dashboard}),(function(e){return e.isSignedIn})),ic=r.a.memo((function(){var e=Object(yl.a)("space-panel-state"),t=Object(A.a)(e,2),a=t[0],o=t[1],i=Object(s.e)(ue.F),l=Object(s.e)(oc),c=Object(s.d)(),u=Object(n.useCallback)((function(){c(Object(Ke.w)({isActive:!i})),o(!i)}),[i]);return Object(n.useEffect)((function(){c(Object(Ke.w)({isActive:!!a&&l}))}),[l]),r.a.createElement(rc,null,r.a.createElement(Bl,{isOpen:i,toggle:u,isSignedIn:l}),r.a.createElement(nc,{isOpen:i,toggle:u,offline:!0}))})),sc=Object($.d)(Z.j).attrs({position:"fixed",justifyContent:"start",alignItems:"start",width:"100%",zIndex:10}).withConfig({displayName:"layout__Wrapper",componentId:"sc-1d05imu-0"})(["top:0;left:0;pointer-events:none;"]),lc=function(e){var t=e.children;return e.printMode?t:r.a.createElement(sc,null,r.a.createElement(ic,null),r.a.createElement(Tl,null),t)},cc=(a(487),function(e){return{slate:Z.e,white:Z.f}[e]||Z.e}),uc=a(216),dc=function(e){var t=e.migrationModalPromoInfo,a=e.setUserPrefrence,o=e.closeModal,i=e.savePromoRemindMeSelection,s=e.migrationModalPromo,l=e.requestRefreshOfAccess,c=Object(n.useState)(!1),u=Object(A.a)(c,2),d=u[0],h=u[1],p=Object(n.useCallback)((function(e){var n=e.link,r=e.toPath,s=t.CTA1;"NAVIGATE"===s.action?(d&&(a(s.userPreference),i(d)),"agent"!==r&&window.open(n,"_blank"),o()):"REFRESH"===s.action&&l()}),[t,a,d,l,i,o]),f=Object(n.useCallback)((function(){var e=t.CTA2;d&&(a(e.userPreference),i(d)),"NAVIGATE"===e.action||"REFRESH"===e.action&&l(),o()}),[t,a,d,l,i,o]);return t?r.a.createElement(Z.q,null,r.a.createElement(Z.t,{width:180,background:"modalBackground"},r.a.createElement(Z.v,null,r.a.createElement(Z.k,{margin:[0]},t.title)),r.a.createElement(Z.r,null,r.a.createElement(Z.j,{padding:[0,0,4,0],column:!0,gap:3},"function"===typeof t.text.header?t.text.header({}):r.a.createElement(Z.z,null,t.text.header),t.text.bullets.length>0&&r.a.createElement(Z.j,{column:!0,gap:3},r.a.createElement(Z.j,{column:!0,gap:1,as:"ul"},t.text.bullets.map((function(e){return"function"===typeof e?r.a.createElement("li",{key:e},e()):r.a.createElement("li",{key:e},r.a.createElement(Z.z,null,e))})))),t.text.footer&&r.a.createElement(Z.z,{"data-testid":"body-footer"},t.text.footer))),r.a.createElement(Z.u,null,r.a.createElement(Z.a,{margin:[0,"auto",0,0]},r.a.createElement(Z.c,{"data-ga":"".concat(s,"::click-remind-me::ad"),"data-testid":"remind-me-checkbox",checked:d,onChange:function(e){h(e.currentTarget.checked)},label:t.tickBoxOption.text})),r.a.createElement(Z.a,{"data-testid":"cta1",margin:[0,2,0,0],width:{min:40}},r.a.createElement(_l.a,{utmParameters:{content:s,campaign:"agent_nudge_to_cloud"}},(function(e){var a=e.link;return r.a.createElement(Z.b,{"data-ga":"".concat(s,"::click-ct1::ad"),textTransform:"none","data-testid":"cta1-button",onClick:function(){return p({link:a,toPath:t.CTA1.toPath})},width:"100%",label:t.CTA1.text})}))),t.CTA2&&r.a.createElement(Z.a,{"data-ga":"".concat(s,"::click-ct2::ad"),onClick:f,height:10,className:"btn btn-default","data-testid":"cta2",width:{min:40}},r.a.createElement(Z.a,{as:Z.z,sx:{fontWeight:"500",lineHeight:"25px"}},t.CTA2.text))))):null},hc=a(132);!function(e){e.PROMO_SIGN_IN_CLOUD="PROMO_SIGN_IN_CLOUD",e.PROMO_SIGN_UP_CLOUD="PROMO_SIGN_UP_CLOUD",e.PROMO_IVNITED_TO_SPACE="PROMO_IVNITED_TO_SPACE",e.PROMO_CLAIM_NODE="PROMO_CLAIM_NODE",e.PROMO_TO_USE_NEW_DASHBAORD="PROMO_TO_USE_NEW_DASHBAORD",e.FALLBACK_TO_AGENT="FALLBACK_TO_AGENT",e.NO_INFO_FALLBACK_TO_AGENT="NO_INFO_FALLBACK_TO_AGENT"}(lo||(lo={}));var pc=function(e){return"".concat(Ve.g).concat(Object(ue.Q)({content:e,campaign:"agent_nudge_to_cloud"}))},fc=(io={},Object(u.a)(io,lo.PROMO_SIGN_UP_CLOUD,{title:"Learn about Netdata Cloud!",text:{header:function(){return r.a.createElement(Z.z,{strong:!0},"Netdata Cloud is a FREE service that complements the Netdata Agent, to provide:")},bullets:["Infrastructure level dashboards (each chart aggregates data from multiple nodes)","Central dispatch of alert notifications","Custom dashboards editor","Intelligence assisted troubleshooting, to help surface the root cause of issues"],footer:"Have a look, you will be surprised!"},tickBoxOption:{text:"Remember my choice",prefrenceID:lo.PROMO_SIGN_UP_CLOUD},CTA1:{text:"Wow! Let\u2019s go to Netdata Cloud",toPath:"path/signup/cloud",action:"NAVIGATE",userPreference:"CLOUD"},CTA2:{text:"Later, stay at the agent dashboard",action:"NAVIGATE",toPath:"path/agent-dashboard",userPreference:"AGENT"}}),Object(u.a)(io,lo.PROMO_SIGN_IN_CLOUD,{title:"Sign-in to Netdata Cloud or get an invitation!",text:{header:function(){return r.a.createElement(r.a.Fragment,null,r.a.createElement(Z.z,{strong:!0},"This node is connected to Netdata Cloud but you are not. If you have a Netdata Cloud account sign-in, if not ask for an invitation to it."),r.a.createElement(Z.z,null,"Netdata Cloud is a FREE service that complements the Netdata Agent, to provide:"))},bullets:["Infrastructure level dashboards (each chart aggregates data from multiple nodes)","Central dispatch of alert notifications","Custom dashboards editor","Intelligence assisted troubleshooting, to help surface the root cause of issues"],footer:"Have a look, you will be surprised!"},tickBoxOption:{text:"Remember my choice",prefrenceID:lo.PROMO_SIGN_IN_CLOUD},CTA1:{text:"Sign-in or get a Netdata Cloud account",action:"NAVIGATE",toPath:"path/signin/cloud",userPreference:"CLOUD"},CTA2:{text:"Later, stay at the Agent dashboard",toPath:"path/agent-dashboard",action:"NAVIGATE",userPreference:"AGENT"}}),Object(u.a)(io,lo.PROMO_IVNITED_TO_SPACE,{title:"Get an invitation to this Node\u2019s Space!",text:{header:function(){return r.a.createElement(Z.z,{strong:!0},"This node is connected to Netdata Cloud but it isnt available on one of your Spaces.")},bullets:[],footer:"Ask for an invitation to this Space!"},tickBoxOption:{text:"Don't remind me of this again",prefrenceID:lo.PROMO_IVNITED_TO_SPACE},CTA1:{text:"Thanks, stay at Agent dashboard for now",toPath:"agent",action:"NAVIGATE",userPreference:"AGENT"}}),Object(u.a)(io,lo.PROMO_CLAIM_NODE,{title:"This node isn\u2019t connected to Netdata Cloud",text:{header:function(){return r.a.createElement(Z.z,{strong:!0},"For you to be able to see this node on Netdata Cloud you will either need to:")},footer:"Have a look, you will be surprised!",bullets:[function(){return r.a.createElement(Z.z,null," ","Connect this node directly (documentation on"," ",r.a.createElement(hc.a,{target:"_blank",rel:"noopener noreferrer",href:"https://learn.netdata.cloud/docs/agent/claim?".concat(pc(lo.PROMO_CLAIM_NODE).substring(1),"#how-to-connect-a-node")},"how to connect a node"),") , or")},function(){return r.a.createElement(Z.z,null,"\u0391ctivate streaming to a parent node that is already connected (documentation on"," ",r.a.createElement(hc.a,{target:"_blank",rel:"noopener noreferrer",href:"https://learn.netdata.cloud/docs/metrics-storage-management/enable-streaming?".concat(pc(lo.PROMO_CLAIM_NODE).substring(1))},"how to configure streaming"),")")}]},tickBoxOption:{text:"Remember my choice.",prefrenceID:lo.PROMO_CLAIM_NODE},CTA1:{text:"Wow! Let\u2019s go to Netdata Cloud",action:"NAVIGATE",toPath:"path/node/cloud",userPreference:"CLOUD"},CTA2:{text:"Later, stay at the Agent dashboard",action:"NAVIGATE",toPath:"path/agent-dashboard",userPreference:"AGENT"}}),Object(u.a)(io,lo.PROMO_TO_USE_NEW_DASHBAORD,{title:"Use the Old or the New dashboard?",text:{header:function(){return r.a.createElement(Z.z,{strong:!0},"This node is available in your Netdata Cloud account. So, you have full access to the NEW dashboards, charts, intelligence-assisted troubleshooting and many more!")},bullets:[]},tickBoxOption:{text:"Remember my choice",prefrenceID:lo.PROMO_TO_USE_NEW_DASHBAORD},CTA1:{text:"Wow! Let\u2019s go to Netdata Cloud ",action:"NAVIGATE",toPath:"path/dashboard/cloud",userPreference:"CLOUD"},CTA2:{text:"Later, stay at the Agent dashboard",action:"NAVIGATE",toPath:"path/agent-dashboard",userPreference:"AGENT"}}),Object(u.a)(io,lo.FALLBACK_TO_AGENT,{title:"Oops! This node has lost connection to Netdata Cloud!",text:{header:function(e){e.date;return r.a.createElement(r.a.Fragment,null,r.a.createElement(Z.z,{strong:!0},"Unfortunately, it seems that this node is not currently connected to Netdata Cloud. So, the old agent dashboard is the only option available."),r.a.createElement(Z.z,null,"To troubleshoot Netdata Cloud connection issues, please follow this"," ",r.a.createElement(hc.a,{target:"_blank",rel:"noopener noreferrer",href:"https://learn.netdata.cloud/docs/agent/claim?".concat(pc(lo.FALLBACK_TO_AGENT).substring(1),"#troubleshooting")},"this guide.")))},bullets:[]},tickBoxOption:{text:"Don't show this again",prefrenceID:lo.FALLBACK_TO_AGENT},CTA1:{text:"Check again please",action:"REFRESH",userPreference:void 0},CTA2:{text:"Thanks, stay at Agent dashboard",toPath:"path/agent",action:"NAVIGATE",userPreference:"AGENT"}}),Object(u.a)(io,lo.NO_INFO_FALLBACK_TO_AGENT,{title:"Oops! We aren't able to get information of this node in regards to Netdata Cloud!",text:{header:function(){return r.a.createElement(r.a.Fragment,null,r.a.createElement(Z.z,{strong:!0},"Unfortunately, it seems we aren't able to get information on this node in regards to Netdata Cloud."),r.a.createElement(Z.z,null,"This could be from internet connectivity issues from your end or some temporary issue with our services. So, the old agent dashboard is the only option available."))},bullets:[]},tickBoxOption:{text:"Don't show this again",prefrenceID:lo.NO_INFO_FALLBACK_TO_AGENT},CTA1:{text:"Check again please",action:"REFRESH",userPreference:void 0},CTA2:{text:"Thanks, stay at Agent dashboard",toPath:"path/agent-dashboard",action:"NAVIGATE",userPreference:"AGENT"}}),io),gc=(so={},Object(u.a)(so,lo.FALLBACK_TO_AGENT,(function(e){var t=e.userSavedPreference,a=e.userStatus,n=e.nodeClaimedStatus,r=e.nodeLiveness,o=e.userNodeAccess;return"AGENT"!==t&&("LOGGED_IN"===a||"EXPIRED_LOGIN"===a)&&"CLAIMED"===n&&"NOT_LIVE"===r&&"ACCESS_OK"===o})),Object(u.a)(so,lo.NO_INFO_FALLBACK_TO_AGENT,(function(e){var t=e.userSavedPreference,a=e.userStatus,n=e.nodeClaimedStatus,r=e.nodeLiveness,o=e.userNodeAccess;return"CLOUD"===t&&!a&&!n&&!r&&!o})),Object(u.a)(so,lo.PROMO_TO_USE_NEW_DASHBAORD,(function(e){var t=e.userSavedPreference,a=e.userStatus,n=e.nodeLiveness,r=e.userNodeAccess;return!t&&("LOGGED_IN"===a||"EXPIRED_LOGIN"===a)&&"LIVE"===n&&"ACCESS_OK"===r})),Object(u.a)(so,lo.PROMO_CLAIM_NODE,(function(e){var t=e.userSavedPreference,a=e.userStatus,n=e.nodeClaimedStatus;return"AGENT"!==t&&("LOGGED_IN"===a||"EXPIRED_LOGIN"===a)&&"NOT_CLAIMED"===n})),Object(u.a)(so,lo.PROMO_IVNITED_TO_SPACE,(function(e){var t=e.userSavedPreference,a=e.userStatus,n=e.nodeClaimedStatus,r=e.userNodeAccess;return"AGENT"!==t&&("LOGGED_IN"===a||"EXPIRED_LOGIN"===a)&&"CLAIMED"===n&&"NO_ACCESS"===r})),Object(u.a)(so,lo.PROMO_SIGN_IN_CLOUD,(function(e){var t=e.userSavedPreference,a=e.userStatus,n=e.nodeClaimedStatus;return"AGENT"!==t&&"UNKNOWN"===a&&"CLAIMED"===n})),Object(u.a)(so,lo.PROMO_SIGN_UP_CLOUD,(function(e){var t=e.userSavedPreference,a=e.userStatus,n=e.nodeClaimedStatus;return"AGENT"!==t&&"UNKNOWN"===a&&"NOT_CLAIMED"===n})),so),mc=function(e){var t=e.userStatus,a=e.nodeClaimedStatus,r=e.userNodeAccess,o=e.nodeLiveness,i=Object(yl.a)("USER_SAVED_PREFERENCE"),s=Object(A.a)(i,2),l=s[0],c=s[1],u=Object(n.useMemo)((function(){return Object.keys(gc).find((function(e){return gc[e]({userStatus:t,nodeClaimedStatus:a,userNodeAccess:r,userSavedPreference:l,nodeLiveness:o})}))}),[t,a,r,o,l]);return{migrationModalPromoInfo:fc[u],migrationModalPromo:u,setUserPrefrence:c,userSavedPreference:l}},bc=function(){var e=Object(s.e)(ue.u),t=Object(s.e)(ue.y),a=Object(s.e)((function(e){return Object(ue.C)({content:"agent-auto-redirect",term:t.machineGuid})(e)})),o=Object(n.useMemo)((function(){var e=window.location.href,t=encodeURIComponent(e);return"".concat(a,"&redirect_uri=").concat(t)}),[a]),i=Object(s.e)(ue.P),l=Object(n.useState)(!1),c=Object(A.a)(l,2),u=c[0],d=c[1],h=mc(Object(g.a)({},i)),p=h.migrationModalPromoInfo,f=h.setUserPrefrence,m=h.userSavedPreference,b=h.migrationModalPromo,v=(null===p||void 0===p?void 0:p.tickBoxOption.prefrenceID)||"",_=Object(yl.a)(v),y=Object(A.a)(_,2)[1],O=localStorage.getItem(v),x=e&&p&&u&&(!O||"undefined"===O),w=Object(xl.b)();return Object(n.useEffect)((function(){var e=setTimeout((function(){return d(!0)}),4e3);return function(){clearTimeout(e)}}),[]),Object(n.useEffect)((function(){(function(e){var t=e.userSavedPreference,a=e.userStatus,n=e.nodeLiveness,r=e.userNodeAccess;return"CLOUD"===t&&("LOGGED_IN"===a||"EXPIRED_LOGIN"===a)&&"LIVE"===n&&"ACCESS_OK"===r})(Object(g.a)({userSavedPreference:m},i))&&(window.location.href=o)}),[o,i,m]),Object(n.useEffect)((function(){"AGENT"==={userSavedPreference:m}.userSavedPreference&&console.log("Lets go to Agent")}),[m]),Object(n.useEffect)((function(){document.documentElement.style.overflow=x?"hidden":"auto"}),[u,x]),x?r.a.createElement(dc,{savePromoRemindMeSelection:y,migrationModalPromoInfo:p,setUserPrefrence:f,closeModal:function(){d(!1)},migrationModalPromo:b,requestRefreshOfAccess:w}):null};window.Ps=na.a;var vc=function(){var e=Object(s.f)();Object(n.useEffect)((function(){window.NETDATA.alarms={},window.NETDATA.pause=function(e){e()},Object(uc.a)(e)}),[]);var t=Object(n.useState)(),a=Object(A.a)(t,2),o=a[0],i=a[1],l=void 0!==o,c=Object(n.useRef)((function(){i(Math.random())}));Object(n.useEffect)((function(){if(l){var e=document.getElementById("loadOverlay");e&&(e.style.display="none")}}),[l]);var u=Object(sa.b)(),d=u.localeDateString,p=u.localeTimeString;Object(n.useEffect)((function(){Object(uc.b)({localeDateString:d,localeTimeString:p})}),[d,p]),function(e){var t=Object(la.b)(ue.y),a=Object(la.a)();Object(n.useEffect)((function(){!e||t.isFetchingHello||t.hasFetchedHello||t.isHelloCallError||a(Ke.f.request({serverDefault:D.b}))}),[a,t,e])}(!0),function(e){var t=Object(la.b)(ue.r),a=Object(la.a)();Object(n.useEffect)((function(){e&&!t&&a(Object(Ke.A)({serverDefault:D.b}))}),[a,t,e])}(!0),function(e){var t=Object(la.b)(ue.y),a=(null===t||void 0===t?void 0:t.hasStartedInfo)||!1,r=Object(la.a)();Object(n.useEffect)((function(){e&&!a&&r(_e.f.request({poll:!1}))}),[r,a,e])}(!0);var f=Object(n.useState)(!1),g=Object(A.a)(f,2),m=g[0],b=g[1];Object(n.useLayoutEffect)((function(){Promise.all([ia(D.c+window.NETDATA.themes.current.bootstrap_css),ia(D.c+window.NETDATA.themes.current.dashboard_css)]).then((function(){b(!0)}))}),[]);var v=function(){var e=ti("".concat(D.b,"api/v1/charts"));return Object(A.a)(e,1)[0]}(),_=Object(la.b)(ue.f);window.NETDATA.parseDom=c.current;var y=Object(la.b)(ue.q),O=Object(la.b)(ue.L);return function(){var e=Object(la.a)();Object(dn.a)((function(){var t=Object(Wt.b)(),a=t.alarm_when;if(a){var n=Number(a),r=t.alarm_status,o=t.alarm_chart,i=t.alarm_value;if(!h.d.includes(r)||!o||!i)return;e(Object(Ke.n)({alarm:{chartId:o,status:r,value:i,when:n}}));e(Object(Ke.s)({after:1e3*n-3e5,before:1e3*n+3e5}))}}))}(),r.a.createElement($.b,{theme:cc(O)},m&&r.a.createElement(_i,null),v&&_&&y&&l&&r.a.createElement(lc,{printMode:ve},r.a.createElement(bc,null),m&&r.a.createElement(r.a.Fragment,null,r.a.createElement(ei,{key:o}),r.a.createElement(vi,null,r.a.createElement(bi,null)),ve&&r.a.createElement(ri,null))))};a(488);i.a.render(r.a.createElement(s.a,{store:ta},r.a.createElement(vc,null)),document.getElementById("root"))},51:function(e,t,a){var n;e.exports=function e(t,a,r){function o(s,l){if(!a[s]){if(!t[s]){if(!l&&"function"==typeof n&&n)return n(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=a[s]={exports:{}};t[s][0].call(u.exports,(function(e){return o(t[s][1][e]||e)}),u,u.exports,e,t,a,r)}return a[s].exports}for(var i="function"==typeof n&&n,s=0;s1)for(var a=1;a=0){var d=e[l-t];null===d[1]||isNaN(d[1])||(r-=d[2][0],i-=d[1],o-=d[2][1],s-=1)}u[l]=s?[e[l][0],1*i/s,[1*r/s,1*o/s]]:[e[l][0],null,[null,null]]}return u},a.default=r,t.exports=a.default},{"./bars":5}],3:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(e("./bars")),r=function(){};(r.prototype=new n.default).extractSeries=function(e,t,a){for(var n,r,o,i,s=[],l=a.get("sigma"),c=a.get("logscale"),u=0;u=0&&(u-=e[o-t][2][2],d-=e[o-t][2][3]);var h=e[o][0],p=d?u/d:0;if(c)if(d){var f=p<0?0:p,g=d,m=l*Math.sqrt(f*(1-f)/g+l*l/(4*g*g)),b=1+l*l/d;n=(f+l*l/(2*d)-m)/b,r=(f+l*l/(2*d)+m)/b,s[o]=[h,100*f,[100*n,100*r]]}else s[o]=[h,0,[0,0]];else i=d?l*Math.sqrt(p*(1-p)/d):1,s[o]=[h,100*p,[100*(p-i),100*(p+i)]]}return s},a.default=r,t.exports=a.default},{"./bars":5}],5:[function(e,t,a){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(a,"__esModule",{value:!0});var r=n(e("./datahandler")),o=n(e("../dygraph-layout")),i=function(){r.default.call(this)};(i.prototype=new r.default).extractSeries=function(e,t,a){},i.prototype.rollingAverage=function(e,t,a){},i.prototype.onPointsCreated_=function(e,t){for(var a=0;an&&(l=n),co)&&(o=c),(null===r||l=0&&(o-=e[n-t][2][0],i-=e[n-t][2][1]);var s=e[n][0],l=i?o/i:0;r[n]=[s,100*l]}return r},a.default=i,t.exports=a.default},{"./datahandler":6,"./default":8}],8:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(e("./datahandler")),r=function(){};(r.prototype=new n.default).extractSeries=function(e,t,a){for(var n=[],r=a.get("logscale"),o=0;oo)&&(o=n),(null===r||n=2,m=e.drawingContext;m.save(),g&&m.setLineDash&&m.setLineDash(r);var b=o._drawSeries(e,f,a,l,i,d,u,t);o._drawPointsOnLine(e,b,s,t,l),g&&m.setLineDash&&m.setLineDash([]),m.restore()},o._drawSeries=function(e,t,a,n,r,o,i,s){var l,c,u=null,d=null,h=null,p=[],f=!0,g=e.drawingContext;g.beginPath(),g.strokeStyle=s,g.lineWidth=a;for(var m=t.array_,b=t.end_,v=t.predicate_,_=t.start_;_0;a--)if(2==(s=t[a])[0]){var n=t[a-1];n[1]==s[1]&&n[2]==s[2]&&t.splice(a,1)}for(a=0;a2&&!e){var r=0;2==t[0][0]&&r++;var o=null,i=null;for(a=r;at[i][2]&&(i=a)}}var c=t[o],u=t[i];t.splice(r,t.length-r),oi?(t.push(u),t.push(c)):t.push(c)}}}(a);for(var o=0,i=t.length;o1||s-a>1),a=s),t.push([e,r,i])};return{moveTo:function(e,t){i(2,e,t)},lineTo:function(e,t){i(1,e,t)},stroke:function(){o(!0),e.stroke()},fill:function(){o(!0),e.fill()},beginPath:function(){o(!0),e.beginPath()},closePath:function(){o(!0),e.closePath()},_count:function(){return r}}},o._fillPlotter=function(e){if(!e.singleSeriesName&&0===e.seriesIndex){for(var t=e.dygraph,a=t.getLabels().slice(1),i=a.length;i>=0;i--)t.visibility()[i]||a.splice(i,1);if(function(){for(var e=0;e=0;r--){var o=n[r];e.lineTo(o[0],o[1])}},m=d-1;m>=0;m--){var b=e.drawingContext,v=a[m];if(t.getBooleanOption("fillGraph",v)){var _=t.getNumericOption("fillAlpha",v),y=t.getBooleanOption("stepPlot",v),O=p[m],x=t.axisPropertiesForSeries(v),w=1+x.minyval*x.yscale;w<0?w=0:w>1&&(w=1),w=c.h*w+c.y;var E,S=u[m],C=n.createIterator(S,0,S.length,o._getIteratorPredicate(t.getBooleanOption("connectSeparatedPoints",v))),A=NaN,k=[-1,-1],j=n.toRGB_(O),T="rgba("+j.r+","+j.g+","+j.b+","+_+")";b.fillStyle=T,b.beginPath();var D,P=!0;(S.length>2*t.width_||r.default.FORCE_FAST_PROXY)&&(b=o._fastCanvasProxy(b));for(var M,L=[];C.hasNext;)if(M=C.next(),n.isOK(M.y)||y){if(h){if(!P&&D==M.xval)continue;var I;P=!1,D=M.xval,I=void 0===(s=f[M.canvasx])?w:l?s[0]:s,E=[M.canvasy,I],y?-1===k[0]?f[M.canvasx]=[M.canvasy,w]:f[M.canvasx]=[M.canvasy,k[0]]:f[M.canvasx]=M.canvasy}else E=isNaN(M.canvasy)&&y?[c.y+c.h,w]:[M.canvasy,w];isNaN(A)?(b.moveTo(M.canvasx,E[1]),b.lineTo(M.canvasx,E[0])):(y?(b.lineTo(M.canvasx,k[0]),b.lineTo(M.canvasx,E[0])):b.lineTo(M.canvasx,E[0]),h&&(L.push([A,k[1]]),l&&s?L.push([M.canvasx,s[1]]):L.push([M.canvasx,E[1]]))),k=E,A=M.canvasx}else g(b,A,k[1],L),L=[],A=NaN,null===M.y_stacked||isNaN(M.y_stacked)||(f[M.canvasx]=c.h*M.y_stacked+c.y);l=y,E&&M&&(g(b,M.canvasx,E[1],L),L=[]),b.fill()}}}},a.default=o,t.exports=a.default},{"./dygraph":18,"./dygraph-utils":17}],10:[function(e,t,a){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}Object.defineProperty(a,"__esModule",{value:!0});var o=r(e("./dygraph-tickers")),i=n(e("./dygraph-interaction-model")),s=n(e("./dygraph-canvas")),l=r(e("./dygraph-utils")),c={highlightCircleSize:3,highlightSeriesOpts:null,highlightSeriesBackgroundAlpha:.5,highlightSeriesBackgroundColor:"rgb(255, 255, 255)",labelsSeparateLines:!1,labelsShowZeroValues:!0,labelsKMB:!1,labelsKMG2:!1,showLabelsOnHighlight:!0,digitsAfterDecimal:2,maxNumberWidth:6,sigFigs:null,strokeWidth:1,strokeBorderWidth:0,strokeBorderColor:"white",axisTickSize:3,axisLabelFontSize:14,rightGap:5,showRoller:!1,xValueParser:void 0,delimiter:",",sigma:2,errorBars:!1,fractions:!1,wilsonInterval:!0,customBars:!1,fillGraph:!1,fillAlpha:.15,connectSeparatedPoints:!1,stackedGraph:!1,stackedGraphNaNFill:"all",hideOverlayOnMouseOut:!0,legend:"onmouseover",stepPlot:!1,xRangePad:0,yRangePad:null,drawAxesAtZero:!1,titleHeight:28,xLabelHeight:18,yLabelWidth:18,axisLineColor:"black",axisLineWidth:.3,gridLineWidth:.3,axisLabelWidth:50,gridLineColor:"rgb(128,128,128)",interactionModel:i.default.defaultModel,animatedZooms:!1,showRangeSelector:!1,rangeSelectorHeight:40,rangeSelectorPlotStrokeColor:"#808FAB",rangeSelectorPlotFillGradientColor:"white",rangeSelectorPlotFillColor:"#A7B1C4",rangeSelectorBackgroundStrokeColor:"gray",rangeSelectorBackgroundLineWidth:1,rangeSelectorPlotLineWidth:1.5,rangeSelectorForegroundStrokeColor:"black",rangeSelectorForegroundLineWidth:1,rangeSelectorAlpha:.6,showInRangeSelector:null,plotter:[s.default._fillPlotter,s.default._errorPlotter,s.default._linePlotter],plugins:[],axes:{x:{pixelsPerLabel:70,axisLabelWidth:60,axisLabelFormatter:l.dateAxisLabelFormatter,valueFormatter:l.dateValueFormatter,drawGrid:!0,drawAxis:!0,independentTicks:!0,ticker:o.dateTicker},y:{axisLabelWidth:50,pixelsPerLabel:30,valueFormatter:l.numberValueFormatter,axisLabelFormatter:l.numberAxisLabelFormatter,drawGrid:!0,drawAxis:!0,independentTicks:!0,ticker:o.numericTicks},y2:{axisLabelWidth:50,pixelsPerLabel:30,valueFormatter:l.numberValueFormatter,axisLabelFormatter:l.numberAxisLabelFormatter,drawAxis:!0,drawGrid:!1,independentTicks:!1,ticker:o.numericTicks}}};a.default=c,t.exports=a.default},{"./dygraph-canvas":9,"./dygraph-interaction-model":12,"./dygraph-tickers":16,"./dygraph-utils":17}],11:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(e("./dygraph")),r=function(e){this.container=e};r.prototype.draw=function(e,t){this.container.innerHTML="",void 0!==this.date_graph&&this.date_graph.destroy(),this.date_graph=new n.default(this.container,e,t)},r.prototype.setSelection=function(e){var t=!1;e.length&&(t=e[0].row),this.date_graph.setSelection(t)},r.prototype.getSelection=function(){var e=[],t=this.date_graph.getSelection();if(t<0)return e;for(var a=this.date_graph.layout_.points,n=0;na.boundedDates[1]&&(o=(r-=o-a.boundedDates[1])+a.dateRange),t.getOptionForAxis("logscale","x")?t.dateWindow_=[Math.pow(n.LOG_SCALE,r),Math.pow(n.LOG_SCALE,o)]:t.dateWindow_=[r,o],a.is2DPan)for(var i=a.dragEndY-a.dragStartY,s=0;s=10&&a.dragDirection==n.HORIZONTAL){var i=Math.min(a.dragStartX,a.dragEndX),s=Math.max(a.dragStartX,a.dragEndX);(i=Math.max(i,o.x))<(s=Math.min(s,o.x+o.w))&&t.doZoomX_(i,s),a.cancelNextDblclick=!0}else if(a.regionHeight>=10&&a.dragDirection==n.VERTICAL){var l=Math.min(a.dragStartY,a.dragEndY),c=Math.max(a.dragStartY,a.dragEndY);(l=Math.max(l,o.y))<(c=Math.min(c,o.y+o.h))&&t.doZoomY_(l,c),a.cancelNextDblclick=!0}a.dragStartX=null,a.dragStartY=null},r.startTouch=function(e,t,a){e.preventDefault(),e.touches.length>1&&(a.startTimeForDoubleTapMs=null);for(var n=[],r=0;r=2){a.initialPinchCenter={pageX:.5*(n[0].pageX+n[1].pageX),pageY:.5*(n[0].pageY+n[1].pageY),dataX:.5*(n[0].dataX+n[1].dataX),dataY:.5*(n[0].dataY+n[1].dataY)};var i=180/Math.PI*Math.atan2(a.initialPinchCenter.pageY-n[0].pageY,n[0].pageX-a.initialPinchCenter.pageX);(i=Math.abs(i))>90&&(i=90-i),a.touchDirections={x:i<67.5,y:i>22.5}}a.initialRange={x:t.xAxisRange(),y:t.yAxisRange()}},r.moveTouch=function(e,t,a){a.startTimeForDoubleTapMs=null;var n,r=[];for(n=0;n=2){var f=c[1].pageX-u.pageX;s=(r[1].pageX-i.pageX)/f;var g=c[1].pageY-u.pageY;l=(r[1].pageY-i.pageY)/g}s=Math.min(8,Math.max(.125,s)),l=Math.min(8,Math.max(.125,l));var m=!1;if(a.touchDirections.x&&(t.dateWindow_=[u.dataX-d.dataX+(a.initialRange.x[0]-u.dataX)/s,u.dataX-d.dataX+(a.initialRange.x[1]-u.dataX)/s],m=!0),a.touchDirections.y)for(n=0;n<1;n++){var b=t.axes_[n];t.attributes_.getForAxis("logscale",n)||(b.valueRange=[u.dataY-d.dataY+(a.initialRange.y[0]-u.dataY)/l,u.dataY-d.dataY+(a.initialRange.y[1]-u.dataY)/l],m=!0)}if(t.drawGraph_(!1),m&&r.length>1&&t.getFunctionOption("zoomCallback")){var v=t.xAxisRange();t.getFunctionOption("zoomCallback").call(t,v[0],v[1],t.yAxisRanges())}},r.endTouch=function(e,t,a){if(0!==e.touches.length)r.startTouch(e,t,a);else if(1==e.changedTouches.length){var n=(new Date).getTime(),o=e.changedTouches[0];a.startTimeForDoubleTapMs&&n-a.startTimeForDoubleTapMs<500&&a.doubleTapX&&Math.abs(a.doubleTapX-o.screenX)<50&&a.doubleTapY&&Math.abs(a.doubleTapY-o.screenY)<50?t.resetZoom():(a.startTimeForDoubleTapMs=n,a.doubleTapX=o.screenX,a.doubleTapY=o.screenY)}};var o=function(e,t,a){return ea?e-a:0},i=function(e,t){var a=n.findPos(t.canvas_),r={left:a.x,right:a.x+t.canvas_.offsetWidth,top:a.y,bottom:a.y+t.canvas_.offsetHeight},i={x:n.pageX(e),y:n.pageY(e)},s=o(i.x,r.left,r.right),l=o(i.y,r.top,r.bottom);return Math.max(s,l)};r.defaultModel={mousedown:function(e,t,a){if(!e.button||2!=e.button){a.initializeMouseDown(e,t,a),e.altKey||e.shiftKey?r.startPan(e,t,a):r.startZoom(e,t,a);var o=function(e){a.isZooming?i(e,t)<100?r.moveZoom(e,t,a):null!==a.dragEndX&&(a.dragEndX=null,a.dragEndY=null,t.clearZoomRect_()):a.isPanning&&r.movePan(e,t,a)};t.addAndTrackEvent(document,"mousemove",o),t.addAndTrackEvent(document,"mouseup",(function e(i){a.isZooming?null!==a.dragEndX?r.endZoom(i,t,a):r.maybeTreatMouseOpAsClick(i,t,a):a.isPanning&&r.endPan(i,t,a),n.removeEvent(document,"mousemove",o),n.removeEvent(document,"mouseup",e),a.destroy()}))}},willDestroyContextMyself:!0,touchstart:function(e,t,a){r.startTouch(e,t,a)},touchmove:function(e,t,a){r.moveTouch(e,t,a)},touchend:function(e,t,a){r.endTouch(e,t,a)},dblclick:function(e,t,a){if(a.cancelNextDblclick)a.cancelNextDblclick=!1;else{var n={canvasx:a.dragEndX,canvasy:a.dragEndY,cancelable:!0};t.cascadeEvents_("dblclick",n)||e.altKey||e.shiftKey||t.resetZoom()}}},r.nonInteractiveModel_={mousedown:function(e,t,a){a.initializeMouseDown(e,t,a)},mouseup:r.maybeTreatMouseOpAsClick},r.dragIsPanInteractionModel={mousedown:function(e,t,a){a.initializeMouseDown(e,t,a),r.startPan(e,t,a)},mousemove:function(e,t,a){a.isPanning&&r.movePan(e,t,a)},mouseup:function(e,t,a){a.isPanning&&r.endPan(e,t,a)}},a.default=r,t.exports=a.default},{"./dygraph-utils":17}],13:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}(e("./dygraph-utils")),r=function(e){this.dygraph_=e,this.points=[],this.setNames=[],this.annotations=[],this.yAxes_=null,this.xTicks_=null,this.yTicks_=null};r.prototype.addDataset=function(e,t){this.points.push(t),this.setNames.push(e)},r.prototype.getPlotArea=function(){return this.area_},r.prototype.computePlotArea=function(){var e={x:0,y:0};e.w=this.dygraph_.width_-e.x-this.dygraph_.getOption("rightGap"),e.h=this.dygraph_.height_;var t={chart_div:this.dygraph_.graphDiv,reserveSpaceLeft:function(t){var a={x:e.x,y:e.y,w:t,h:e.h};return e.x+=t,e.w-=t,a},reserveSpaceRight:function(t){var a={x:e.x+e.w-t,y:e.y,w:t,h:e.h};return e.w-=t,a},reserveSpaceTop:function(t){var a={x:e.x,y:e.y,w:e.w,h:t};return e.y+=t,e.h-=t,a},reserveSpaceBottom:function(t){var a={x:e.x,y:e.y+e.h-t,w:e.w,h:t};return e.h-=t,a},chartRect:function(){return{x:e.x,y:e.y,w:e.w,h:e.h}}};this.dygraph_.cascadeEvents_("layout",t),this.area_=e},r.prototype.setAnnotations=function(e){this.annotations=[];for(var t=this.dygraph_.getOption("xValueParser")||function(e){return e},a=0;a=0&&n<1&&this.xticks.push({pos:n,label:a,has_tick:o});for(this.yticks=[],e=0;e0&&n<=1&&this.yticks.push({axis:e,pos:n,label:a,has_tick:o})},r.prototype._evaluateAnnotations=function(){var e,t={};for(e=0;e1&&o.update(this.yAxes_[1].options,l.y2||{}),o.update(this.xAxis_.options,l.x||{})}},s.prototype.get=function(e){var t=this.getGlobalUser_(e);return null!==t?t:this.getGlobalDefault_(e)},s.prototype.getGlobalUser_=function(e){return this.user_.hasOwnProperty(e)?this.user_[e]:null},s.prototype.getGlobalDefault_=function(e){return this.global_.hasOwnProperty(e)?this.global_[e]:i.default.hasOwnProperty(e)?i.default[e]:null},s.prototype.getForAxis=function(e,t){var a,n;if("number"==typeof t)n=0===(a=t)?"y":"y2";else{if("y1"==t&&(t="y"),"y"==t)a=0;else if("y2"==t)a=1;else{if("x"!=t)throw"Unknown axis "+t;a=-1}n=t}var r=-1==a?this.xAxis_:this.yAxes_[a];if(r){var o=r.options;if(o.hasOwnProperty(e))return o[e]}if("x"!==t||"logscale"!==e){var s=this.getGlobalUser_(e);if(null!==s)return s}var l=i.default.axes[n];return l.hasOwnProperty(e)?l[e]:this.getGlobalDefault_(e)},s.prototype.getForSeries=function(e,t){if(t===this.dygraph_.getHighlightSeries()&&this.highlightSeries_.hasOwnProperty(e))return this.highlightSeries_[e];if(!this.series_.hasOwnProperty(t))throw"Unknown series: "+t;var a=this.series_[t],n=a.options;return n.hasOwnProperty(e)?n[e]:this.getForAxis(e,a.yAxis)},s.prototype.numAxes=function(){return this.yAxes_.length},s.prototype.axisForSeries=function(e){return this.series_[e].yAxis},s.prototype.axisOptions=function(e){return this.yAxes_[e].options},s.prototype.seriesForAxis=function(e){return this.yAxes_[e].series},s.prototype.seriesNames=function(){return this.labels_},a.default=s,t.exports=a.default}).call(this,e("_process"))},{"./dygraph-default-attrs":10,"./dygraph-options-reference":14,"./dygraph-utils":17,_process:1}],16:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}(e("./dygraph-utils"));a.numericLinearTicks=function(e,t,a,n,o,i){return r(e,t,a,(function(e){return"logscale"!==e&&n(e)}),o,i)};var r=function(e,t,a,r,o,i){var s,l,c,u,d=r("pixelsPerLabel"),h=[];if(i)for(s=0;s=u/4){for(var b=f;b>=p;b--){var v=g[b],_=Math.log(v/e)/Math.log(t/e)*a,y={v:v};null===m?m={tickValue:v,pixel_coord:_}:Math.abs(_-m.pixel_coord)>=d?m={tickValue:v,pixel_coord:_}:y.label="",h.push(y)}h.reverse()}}if(0===h.length){var O,x;r("labelsKMG2")?(O=[1,2,4,8,16,32,64,128,256],x=16):(O=[1,2,5,10,20,50,100],x=10);var w,E,S,C=Math.ceil(a/d),A=Math.abs(t-e)/C,k=Math.floor(Math.log(A)/Math.log(x)),j=Math.pow(x,k);for(l=0;ld));l++);for(E>S&&(w*=-1),s=0;s<=u;s++)c=E+s*w,h.push({v:c})}}var T=r("axisLabelFormatter");for(s=0;s=0?v(e,t,i,n,r):[]};var o={MILLISECONDLY:0,TWO_MILLISECONDLY:1,FIVE_MILLISECONDLY:2,TEN_MILLISECONDLY:3,FIFTY_MILLISECONDLY:4,HUNDRED_MILLISECONDLY:5,FIVE_HUNDRED_MILLISECONDLY:6,SECONDLY:7,TWO_SECONDLY:8,FIVE_SECONDLY:9,TEN_SECONDLY:10,THIRTY_SECONDLY:11,MINUTELY:12,TWO_MINUTELY:13,FIVE_MINUTELY:14,TEN_MINUTELY:15,THIRTY_MINUTELY:16,HOURLY:17,TWO_HOURLY:18,SIX_HOURLY:19,DAILY:20,TWO_DAILY:21,WEEKLY:22,MONTHLY:23,QUARTERLY:24,BIANNUAL:25,ANNUAL:26,DECADAL:27,CENTENNIAL:28,NUM_GRANULARITIES:29};a.Granularity=o;var i=0,s=1,l=2,c=3,u=4,d=5,h=6,p=7,f=[];f[o.MILLISECONDLY]={datefield:h,step:1,spacing:1},f[o.TWO_MILLISECONDLY]={datefield:h,step:2,spacing:2},f[o.FIVE_MILLISECONDLY]={datefield:h,step:5,spacing:5},f[o.TEN_MILLISECONDLY]={datefield:h,step:10,spacing:10},f[o.FIFTY_MILLISECONDLY]={datefield:h,step:50,spacing:50},f[o.HUNDRED_MILLISECONDLY]={datefield:h,step:100,spacing:100},f[o.FIVE_HUNDRED_MILLISECONDLY]={datefield:h,step:500,spacing:500},f[o.SECONDLY]={datefield:d,step:1,spacing:1e3},f[o.TWO_SECONDLY]={datefield:d,step:2,spacing:2e3},f[o.FIVE_SECONDLY]={datefield:d,step:5,spacing:5e3},f[o.TEN_SECONDLY]={datefield:d,step:10,spacing:1e4},f[o.THIRTY_SECONDLY]={datefield:d,step:30,spacing:3e4},f[o.MINUTELY]={datefield:u,step:1,spacing:6e4},f[o.TWO_MINUTELY]={datefield:u,step:2,spacing:12e4},f[o.FIVE_MINUTELY]={datefield:u,step:5,spacing:3e5},f[o.TEN_MINUTELY]={datefield:u,step:10,spacing:6e5},f[o.THIRTY_MINUTELY]={datefield:u,step:30,spacing:18e5},f[o.HOURLY]={datefield:c,step:1,spacing:36e5},f[o.TWO_HOURLY]={datefield:c,step:2,spacing:72e5},f[o.SIX_HOURLY]={datefield:c,step:6,spacing:216e5},f[o.DAILY]={datefield:l,step:1,spacing:864e5},f[o.TWO_DAILY]={datefield:l,step:2,spacing:1728e5},f[o.WEEKLY]={datefield:l,step:7,spacing:6048e5},f[o.MONTHLY]={datefield:s,step:1,spacing:2629817280},f[o.QUARTERLY]={datefield:s,step:3,spacing:216e5*365.2524},f[o.BIANNUAL]={datefield:s,step:6,spacing:432e5*365.2524},f[o.ANNUAL]={datefield:i,step:1,spacing:864e5*365.2524},f[o.DECADAL]={datefield:i,step:10,spacing:315578073600},f[o.CENTENNIAL]={datefield:i,step:100,spacing:3155780736e3};var g=function(){for(var e=[],t=-39;t<=39;t++)for(var a=Math.pow(10,t),n=1;n<=9;n++){var r=a*n;e.push(r)}return e}(),m=function(e,t,a,n){for(var r=n("pixelsPerLabel"),i=0;i=r)return i;return-1},b=function(e,t,a){var n=f[a].spacing;return Math.round(1*(t-e)/n)},v=function(e,t,a,r,g){var m=r("axisLabelFormatter"),b=r("labelsUTC")?n.DateAccessorsUTC:n.DateAccessorsLocal,v=f[a].datefield,_=f[a].step,y=f[a].spacing,O=new Date(e),x=[];x[i]=b.getFullYear(O),x[s]=b.getMonth(O),x[l]=b.getDate(O),x[c]=b.getHours(O),x[u]=b.getMinutes(O),x[d]=b.getSeconds(O),x[h]=b.getMilliseconds(O);var w=x[v]%_;a==o.WEEKLY&&(w=b.getDay(O)),x[v]-=w;for(var E=v+1;E=o.DAILY||b.getHours(C)%_==0)&&S.push({v:A,label:m.call(g,C,a,r,g)}),x[v]+=_,A=(C=b.makeDate.apply(null,x)).getTime();return S};a.getDateAxis=v},{"./dygraph-utils":17}],17:[function(e,t,a){"use strict";function n(e){return!e.pageX||e.pageX<0?0:e.pageX}function r(e){return!e.pageY||e.pageY<0?0:e.pageY}function o(e,t){var a=Math.min(Math.max(1,t||2),21);return Math.abs(e)<.001&&0!==e?e.toExponential(a-1):e.toPrecision(a)}function i(e){return e<10?"0"+e:""+e}function s(e,t,a,n){var r=i(e)+":"+i(t);if(a&&(r+=":"+i(a),n)){var o=""+n;r+="."+("000"+o).substring(o.length)}return r}function l(e,t){var a=t?y:_,n=new Date(e),r=a.getFullYear(n),o=a.getMonth(n),l=a.getDate(n),c=a.getHours(n),u=a.getMinutes(n),d=a.getSeconds(n),h=a.getMilliseconds(n),p=r+"/"+i(o+1)+"/"+i(l);return 3600*c+60*u+d+.001*h&&(p+=" "+s(c,u,d,h)),p}function c(e,t){var a=Math.pow(10,t);return Math.round(e*a)/a}function u(e){return new Date(e).getTime()}function d(e){var t=typeof e;return("object"==t||"function"==t&&"function"==typeof e.item)&&null!==e&&"number"==typeof e.length&&3!==e.nodeType}function h(e,t,a,n){t=t||0,a=a||e.length,this.hasNext=!0,this.peek=null,this.start_=t,this.array_=e,this.predicate_=n,this.end_=Math.min(e.length,t+a),this.nextIdx_=t-1,this.next()}function p(e,t){return t<0?1/Math.pow(e,-t):Math.pow(e,t)}function f(e){var t=E.exec(e);if(!t)return null;var a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[3],10);return t[4]?{r:a,g:n,b:r,a:parseFloat(t[4])}:{r:a,g:n,b:r}}function g(e,t){var a=t("sigFigs");if(null!==a)return o(e,a);var n,r=t("digitsAfterDecimal"),i=t("maxNumberWidth"),s=t("labelsKMB"),l=t("labelsKMG2");if(n=0!==e&&(Math.abs(e)>=Math.pow(10,i)||Math.abs(e)=0;m--,g/=u)if(f>=g){n=c(e/g,r)+d[m];break}if(l){var b=String(e.toExponential()).split("e-");2===b.length&&b[1]>=3&&b[1]<=24&&(n=b[1]%3>0?c(b[0]/p(10,b[1]%3),r):Number(b[0]).toFixed(2),n+=h[Math.floor(b[1]/3)-1])}}return n}Object.defineProperty(a,"__esModule",{value:!0}),a.removeEvent=function(e,t,a){e.removeEventListener(t,a,!1)},a.cancelEvent=function(e){return(e=e||window.event).stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.cancelBubble=!0,e.cancel=!0,e.returnValue=!1,!1},a.hsvToRGB=function(e,t,a){var n,r,o;if(0===t)n=a,r=a,o=a;else{var i=Math.floor(6*e),s=6*e-i,l=a*(1-t),c=a*(1-t*s),u=a*(1-t*(1-s));switch(i){case 1:n=c,r=a,o=l;break;case 2:n=l,r=a,o=u;break;case 3:n=l,r=c,o=a;break;case 4:n=u,r=l,o=a;break;case 5:n=a,r=l,o=c;break;case 6:case 0:n=a,r=u,o=l}}return"rgb("+(n=Math.floor(255*n+.5))+","+(r=Math.floor(255*r+.5))+","+(o=Math.floor(255*o+.5))+")"},a.findPos=function(e){var t=e.getBoundingClientRect(),a=window,n=document.documentElement;return{x:t.left+(a.pageXOffset||n.scrollLeft),y:t.top+(a.pageYOffset||n.scrollTop)}},a.pageX=n,a.pageY=r,a.dragGetX_=function(e,t){return n(e)-t.px},a.dragGetY_=function(e,t){return r(e)-t.py},a.isOK=function(e){return!!e&&!isNaN(e)},a.isValidPoint=function(e,t){return!!e&&null!==e.yval&&null!==e.x&&void 0!==e.x&&null!==e.y&&void 0!==e.y&&!(isNaN(e.x)||!t&&isNaN(e.y))},a.floatFormat=o,a.zeropad=i,a.hmsString_=s,a.dateString_=l,a.round_=c,a.binarySearch=function(e,t,a,n,r){for(var o=!0;o;){var i=e,s=t,l=a,c=n,u=r;if(o=!1,null!==c&&void 0!==c&&null!==u&&void 0!==u||(c=0,u=s.length-1),c>u)return-1;null!==l&&void 0!==l||(l=0);var d,h=function(e){return e>=0&&ei){if(l>0&&h(d=p-1)&&s[d]i)return p;e=i,t=s,a=l,n=p+1,r=u,o=!0,h=p=f=d=void 0}}},a.dateParser=function(e){var t,a;if((-1==e.search("-")||-1!=e.search("T")||-1!=e.search("Z"))&&(a=u(e))&&!isNaN(a))return a;if(-1!=e.search("-")){for(t=e.replace("-","/","g");-1!=t.search("-");)t=t.replace("-","/");a=u(t)}else a=8==e.length?u(t=e.substr(0,4)+"/"+e.substr(4,2)+"/"+e.substr(6,2)):u(e);return a&&!isNaN(a)||console.error("Couldn't parse "+e+" as a date"),a},a.dateStrToMillis=u,a.update=function(e,t){if(void 0!==t&&null!==t)for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a]);return e},a.updateDeep=function e(t,a){if(void 0!==a&&null!==a)for(var n in a)a.hasOwnProperty(n)&&(null===a[n]?t[n]=null:d(a[n])?t[n]=a[n].slice():function(e){return"object"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName}(a[n])||"object"!=typeof a[n]?t[n]=a[n]:("object"==typeof t[n]&&null!==t[n]||(t[n]={}),e(t[n],a[n])));return t},a.isArrayLike=d,a.isDateLike=function(e){return"object"==typeof e&&null!==e&&"function"==typeof e.getTime},a.clone=function e(t){for(var a=[],n=0;n=t||O.call(window,(function(){var t=(new Date).getTime()-i;r=o;var c=(o=Math.floor(t/a))-r;o+c>s||o>=s?(e(s),n()):(0!==c&&e(o),l())}))}()}else n()},a.isPixelChangingOptionList=function(e,t){var a={};if(e)for(var n=1;n=m.Granularity.DECADAL)return""+r;if(t>=m.Granularity.MONTHLY)return k[o]+" "+r;if(0===3600*c+60*u+d+.001*h||t>=m.Granularity.DAILY)return i(l)+" "+k[o];if(tm.Granularity.MINUTELY?s(c,u,d,0):s(c,u,d,h)},a.dateValueFormatter=function(e,t){return l(e,t("labelsUTC"))};var m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}(e("./dygraph-tickers"));a.LOG_SCALE=10;var b=Math.log(10);a.LN_TEN=b;var v=function(e){return Math.log(e)/b};a.log10=v,a.logRangeFraction=function(e,t,a){var n=v(e),r=n+a*(v(t)-n);return Math.pow(10,r)},a.DOTTED_LINE=[2,2],a.DASHED_LINE=[7,3],a.DOT_DASH_LINE=[7,2,2,2],a.HORIZONTAL=1,a.VERTICAL=2,a.getContext=function(e){return e.getContext("2d")},a.addEvent=function(e,t,a){e.addEventListener(t,a,!1)};var _={getFullYear:function(e){return e.getFullYear()},getMonth:function(e){return e.getMonth()},getDate:function(e){return e.getDate()},getHours:function(e){return e.getHours()},getMinutes:function(e){return e.getMinutes()},getSeconds:function(e){return e.getSeconds()},getMilliseconds:function(e){return e.getMilliseconds()},getDay:function(e){return e.getDay()},makeDate:function(e,t,a,n,r,o,i){return new Date(e,t,a,n,r,o,i)}};a.DateAccessorsLocal=_;var y={getFullYear:function(e){return e.getUTCFullYear()},getMonth:function(e){return e.getUTCMonth()},getDate:function(e){return e.getUTCDate()},getHours:function(e){return e.getUTCHours()},getMinutes:function(e){return e.getUTCMinutes()},getSeconds:function(e){return e.getUTCSeconds()},getMilliseconds:function(e){return e.getUTCMilliseconds()},getDay:function(e){return e.getUTCDay()},makeDate:function(e,t,a,n,r,o,i){return new Date(Date.UTC(e,t,a,n,r,o,i))}};a.DateAccessorsUTC=y,h.prototype.next=function(){if(!this.hasNext)return null;for(var e=this.peek,t=this.nextIdx_+1,a=!1;t=0;r--){var o=n[r][0];if(n[r][1].call(o,a),a.propagationStopped)break}return a.defaultPrevented},j.prototype.getPluginInstance_=function(e){for(var t=0;t=0;if(null===e||void 0===e)return t||a;if("y"===e)return a;throw new Error("axis parameter is ["+e+"] must be null, 'x' or 'y'.")},j.prototype.toString=function(){var e=this.maindiv_;return"[Dygraph "+(e&&e.id?e.id:e)+"]"},j.prototype.attr_=function(e,t){return t?this.attributes_.getForSeries(e,t):this.attributes_.get(e)},j.prototype.getOption=function(e,t){return this.attr_(e,t)},j.prototype.getNumericOption=function(e,t){return this.getOption(e,t)},j.prototype.getStringOption=function(e,t){return this.getOption(e,t)},j.prototype.getBooleanOption=function(e,t){return this.getOption(e,t)},j.prototype.getFunctionOption=function(e,t){return this.getOption(e,t)},j.prototype.getOptionForAxis=function(e,t){return this.attributes_.getForAxis(e,t)},j.prototype.optionsViewForAxis_=function(e){var t=this;return function(a){var n=t.user_attrs_.axes;return n&&n[e]&&n[e].hasOwnProperty(a)?n[e][a]:("x"!==e||"logscale"!==a)&&(void 0!==t.user_attrs_[a]?t.user_attrs_[a]:(n=t.attrs_.axes)&&n[e]&&n[e].hasOwnProperty(a)?n[e][a]:"y"==e&&t.axes_[0].hasOwnProperty(a)?t.axes_[0][a]:"y2"==e&&t.axes_[1].hasOwnProperty(a)?t.axes_[1][a]:t.attr_(a))}},j.prototype.rollPeriod=function(){return this.rollPeriod_},j.prototype.xAxisRange=function(){return this.dateWindow_?this.dateWindow_:this.xAxisExtremes()},j.prototype.xAxisExtremes=function(){var e=this.getNumericOption("xRangePad")/this.plotter_.area.w;if(0===this.numRows())return[0-e,1+e];var t=this.rawData_[0][0],a=this.rawData_[this.rawData_.length-1][0];if(e){var n=a-t;t-=n*e,a+=n*e}return[t,a]},j.prototype.yAxisExtremes=function(){var e=this.gatherDatasets_(this.rolledSeries_,null).extremes,t=this.axes_;this.computeYAxisRanges_(e);var a=this.axes_;return this.axes_=t,a.map((function(e){return e.extremeRange}))},j.prototype.yAxisRange=function(e){if(void 0===e&&(e=0),e<0||e>=this.axes_.length)return null;var t=this.axes_[e];return[t.computedValueRange[0],t.computedValueRange[1]]},j.prototype.yAxisRanges=function(){for(var e=[],t=0;tthis.rawData_.length?null:t<0||t>this.rawData_[e].length?null:this.rawData_[e][t]},j.prototype.createInterface_=function(){var e=this.maindiv_;this.graphDiv=document.createElement("div"),this.graphDiv.style.textAlign="left",this.graphDiv.style.position="relative",e.appendChild(this.graphDiv),this.canvas_=h.createCanvas(),this.canvas_.style.position="absolute",this.hidden_=this.createPlotKitCanvas_(this.canvas_),this.canvas_ctx_=h.getContext(this.canvas_),this.hidden_ctx_=h.getContext(this.hidden_),this.resizeElements_(),this.graphDiv.appendChild(this.hidden_),this.graphDiv.appendChild(this.canvas_),this.mouseEventElement_=this.createMouseEventElement_(),this.layout_=new s.default(this);var t=this;this.mouseMoveHandler_=function(e){t.mouseMove_(e)},this.mouseOutHandler_=function(e){var a=e.target||e.fromElement,n=e.relatedTarget||e.toElement;h.isNodeContainedBy(a,t.graphDiv)&&!h.isNodeContainedBy(n,t.graphDiv)&&t.mouseOut_(e)},this.addAndTrackEvent(window,"mouseout",this.mouseOutHandler_),this.addAndTrackEvent(this.mouseEventElement_,"mousemove",this.mouseMoveHandler_),this.resizeHandler_||(this.resizeHandler_=function(e){t.resize()},this.addAndTrackEvent(window,"resize",this.resizeHandler_))},j.prototype.resizeElements_=function(){this.graphDiv.style.width=this.width_+"px",this.graphDiv.style.height=this.height_+"px";var e=this.getNumericOption("pixelRatio"),t=e||h.getContextPixelRatio(this.canvas_ctx_);this.canvas_.width=this.width_*t,this.canvas_.height=this.height_*t,this.canvas_.style.width=this.width_+"px",this.canvas_.style.height=this.height_+"px",1!==t&&this.canvas_ctx_.scale(t,t);var a=e||h.getContextPixelRatio(this.hidden_ctx_);this.hidden_.width=this.width_*a,this.hidden_.height=this.height_*a,this.hidden_.style.width=this.width_+"px",this.hidden_.style.height=this.height_+"px",1!==a&&this.hidden_ctx_.scale(a,a)},j.prototype.destroy=function(){this.canvas_ctx_.restore(),this.hidden_ctx_.restore();for(var e=this.plugins_.length-1;e>=0;e--){var t=this.plugins_.pop();t.plugin.destroy&&t.plugin.destroy()}this.removeTrackedEvents_(),h.removeEvent(window,"mouseout",this.mouseOutHandler_),h.removeEvent(this.mouseEventElement_,"mousemove",this.mouseMoveHandler_),h.removeEvent(window,"resize",this.resizeHandler_),this.resizeHandler_=null,function e(t){for(;t.hasChildNodes();)e(t.firstChild),t.removeChild(t.firstChild)}(this.maindiv_);var a=function(e){for(var t in e)"object"==typeof e[t]&&(e[t]=null)};a(this.layout_),a(this.plotter_),a(this)},j.prototype.createPlotKitCanvas_=function(e){var t=h.createCanvas();return t.style.position="absolute",t.style.top=e.style.top,t.style.left=e.style.left,t.width=this.width_,t.height=this.height_,t.style.width=this.width_+"px",t.style.height=this.height_+"px",t},j.prototype.createMouseEventElement_=function(){return this.canvas_},j.prototype.setColors_=function(){var e=this.getLabels(),t=e.length-1;this.colors_=[],this.colorsMap_={};for(var a=this.getNumericOption("colorSaturation")||1,n=this.getNumericOption("colorValue")||.5,r=Math.ceil(t/2),o=this.getOption("colors"),i=this.visibility(),s=0;s=0;--u)for(var d=this.layout_.points[u],p=0;p=s.length)){var l=s[i];if(h.isValidPoint(l)){var c=l.canvasy;if(e>l.canvasx&&i+10&&(c+=(e-l.canvasx)/d*(u.canvasy-l.canvasy))}else if(e0){var d,p=s[i-1];h.isValidPoint(p)&&(d=l.canvasx-p.canvasx)>0&&(c+=(l.canvasx-e)/d*(p.canvasy-l.canvasy))}(0===o||c=0){var o=0,i=this.attr_("labels");for(t=1;to&&(o=s)}var l=this.previousVerticalX_;a.clearRect(l-o-1,0,2*o+2,this.height_)}if(this.selPoints_.length>0){var c=this.selPoints_[0].canvasx;for(a.save(),t=0;t=0){e!=this.lastRow_&&(n=!0),this.lastRow_=e;for(var r=0;r=0&&i=0&&(n=!0),this.lastRow_=-1;return this.selPoints_.length?this.lastx_=this.selPoints_[0].xval:this.lastx_=-1,void 0!==t&&(this.highlightSet_!==t&&(n=!0),this.highlightSet_=t),void 0!==a&&(this.lockedSet_=a),n&&this.updateSelection_(void 0),n},j.prototype.mouseOut_=function(e){this.getFunctionOption("unhighlightCallback")&&this.getFunctionOption("unhighlightCallback").call(this,e),this.getBooleanOption("hideOverlayOnMouseOut")&&!this.lockedSet_&&this.clearSelection()},j.prototype.clearSelection=function(){this.cascadeEvents_("deselect",{}),this.lockedSet_=!1,this.fadeLevel?this.animateSelection_(-1):(this.canvas_ctx_.clearRect(0,0,this.width_,this.height_),this.fadeLevel=0,this.selPoints_=[],this.lastx_=-1,this.lastRow_=-1,this.highlightSet_=null)},j.prototype.getSelection=function(){if(!this.selPoints_||this.selPoints_.length<1)return-1;for(var e=0;e1&&(a=this.dataHandler_.rollingAverage(a,this.rollPeriod_,this.attributes_)),this.rolledSeries_.push(a)}this.drawGraph_();var n=new Date;this.drawingTimeMs_=n-e},j.PointType=void 0,j.stackPoints_=function(e,t,a,n){for(var r=null,o=null,i=null,s=-1,l=0;l=t))for(var a=t;aa[1]&&(a[1]=h),h=1;a--)if(this.visibility()[a-1]){if(t){s=e[a];var h=t[0],p=t[1];for(r=null,o=null,n=0;n=h&&null===r&&(r=n),s[n][0]<=p&&(o=n);null===r&&(r=0);for(var f=r,g=!0;g&&f>0;)g=null===s[--f][1];null===o&&(o=s.length-1);var m=o;for(g=!0;g&&m0;)this.readyFns_.pop()(this)},j.prototype.computeYAxes_=function(){var e,t,a;for(this.axes_=[],e=0;e0&&(b=0),v<0&&(v=0)),b==1/0&&(b=0),v==-1/0&&(v=1),0===(a=v-b)&&(0!==v?a=Math.abs(v):(v=1,a=1));var y=v,O=b;t&&(u?(y=v+r*a,O=b):((O=b-r*a)<0&&b>=0&&(O=0),(y=v+r*a)>0&&v<=0&&(y=0))),c.extremeRange=[O,y]}if(c.valueRange){var x=i(c.valueRange[0])?c.extremeRange[0]:c.valueRange[0],w=i(c.valueRange[1])?c.extremeRange[1]:c.valueRange[1];c.computedValueRange=[x,w]}else c.computedValueRange=c.extremeRange;if(!t)if((x=c.computedValueRange[0])===(w=c.computedValueRange[1])&&(x-=.5,w+=.5),u){var E=r/(2*r-1),S=(r-1)/(2*r-1);c.computedValueRange[0]=h.logRangeFraction(x,w,E),c.computedValueRange[1]=h.logRangeFraction(x,w,S)}else a=w-x,c.computedValueRange[0]=x-a*r,c.computedValueRange[1]=w+a*r;if(p){c.independentTicks=p;var C=(A=this.optionsViewForAxis_("y"+(l?"2":"")))("ticker");c.ticks=C(c.computedValueRange[0],c.computedValueRange[1],this.plotter_.area.h,A,this),o||(o=c)}}if(void 0===o)throw'Configuration Error: At least one axis has to have the "independentTicks" option activated.';for(l=0;l0&&"e"!=e[a-1]&&"E"!=e[a-1]||e.indexOf("/")>=0||isNaN(parseFloat(e))?t=!0:8==e.length&&e>"19700101"&&e<"20371231"&&(t=!0),this.setXAxisOptions_(t)},j.prototype.setXAxisOptions_=function(e){e?(this.attrs_.xValueParser=h.dateParser,this.attrs_.axes.x.valueFormatter=h.dateValueFormatter,this.attrs_.axes.x.ticker=d.dateTicker,this.attrs_.axes.x.axisLabelFormatter=h.dateAxisLabelFormatter):(this.attrs_.xValueParser=function(e){return parseFloat(e)},this.attrs_.axes.x.valueFormatter=function(e){return e},this.attrs_.axes.x.ticker=d.numericTicks,this.attrs_.axes.x.axisLabelFormatter=this.attrs_.axes.x.valueFormatter)},j.prototype.parseCSV_=function(e){var t,a,n=[],r=h.detectLineDelimiter(e),o=e.split(r||"\n"),i=this.getStringOption("delimiter");-1==o[0].indexOf(i)&&o[0].indexOf("\t")>=0&&(i="\t");var s=0;"labels"in this.user_attrs_||(s=1,this.attrs_.labels=o[0].split(i),this.attributes_.reparseSeries());for(var l,c=!1,u=this.attr_("labels").length,d=!1,p=s;p0&&m[0]0;)t=String.fromCharCode(65+(e-1)%26)+t.toLowerCase(),e=Math.floor((e-1)/26);return t}(m.length),_.text="";for(var y=0;y0&&b[0]0&&this.setAnnotations(m,!0),this.attributes_.reparseSeries()},j.prototype.cascadeDataDidUpdateEvent_=function(){this.cascadeEvents_("dataDidUpdate",{})},j.prototype.start_=function(){var e=this.file_;if("function"==typeof e&&(e=e()),h.isArrayLike(e))this.rawData_=this.parseArray_(e),this.cascadeDataDidUpdateEvent_(),this.predraw_();else if("object"==typeof e&&"function"==typeof e.getColumnRange)this.parseDataTable_(e),this.cascadeDataDidUpdateEvent_(),this.predraw_();else if("string"==typeof e)if(h.detectLineDelimiter(e))this.loadedEvent_(e);else{var t;t=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");var a=this;t.onreadystatechange=function(){4==t.readyState&&(200!==t.status&&0!==t.status||a.loadedEvent_(t.responseText))},t.open("GET",e,!0),t.send(null)}else console.error("Unknown data format: "+typeof e)},j.prototype.updateOptions=function(e,t){void 0===t&&(t=!1);var a=e.file,n=j.copyUserAttrs_(e);"rollPeriod"in n&&(this.rollPeriod_=n.rollPeriod),"dateWindow"in n&&(this.dateWindow_=n.dateWindow);var r=h.isPixelChangingOptionList(this.attr_("labels"),n);h.updateDeep(this.user_attrs_,n),this.attributes_.reparseSeries(),a?(this.cascadeEvents_("dataWillUpdate",{}),this.file_=a,t||this.start_()):t||(r?this.predraw_():this.renderGraph_(!1))},j.copyUserAttrs_=function(e){var t={};for(var a in e)e.hasOwnProperty(a)&&"file"!=a&&e.hasOwnProperty(a)&&(t[a]=e[a]);return t},j.prototype.resize=function(e,t){if(!this.resize_lock){this.resize_lock=!0,null===e!=(null===t)&&(console.warn("Dygraph.resize() should be called with zero parameters or two non-NULL parameters. Pretending it was zero."),e=t=null);var a=this.width_,n=this.height_;e?(this.maindiv_.style.width=e+"px",this.maindiv_.style.height=t+"px",this.width_=e,this.height_=t):(this.width_=this.maindiv_.clientWidth,this.height_=this.maindiv_.clientHeight),a==this.width_&&n==this.height_||(this.resizeElements_(),this.predraw_()),this.resize_lock=!1}},j.prototype.adjustRoll=function(e){this.rollPeriod_=e,this.predraw_()},j.prototype.visibility=function(){for(this.getOption("visibility")||(this.attrs_.visibility=[]);this.getOption("visibility").length=a.length?console.warn("Invalid series number in setVisibility: "+r):a[r]=e[r]);else for(r=0;r=a.length?console.warn("Invalid series number in setVisibility: "+r):a[r]=e[r]:e[r]<0||e[r]>=a.length?console.warn("Invalid series number in setVisibility: "+e[r]):a[e[r]]=t;this.predraw_()},j.prototype.size=function(){return{width:this.width_,height:this.height_}},j.prototype.setAnnotations=function(e,t){this.annotations_=e,this.layout_?(this.layout_.setAnnotations(this.annotations_),t||this.predraw_()):console.warn("Tried to setAnnotations before dygraph was ready. Try setting them in a ready() block. See dygraphs.com/tests/annotation.html")},j.prototype.annotations=function(){return this.annotations_},j.prototype.getLabels=function(){var e=this.attr_("labels");return e?e.slice():null},j.prototype.indexFromSetName=function(e){return this.setIndexByName_[e]},j.prototype.getRowForX=function(e){for(var t=0,a=this.numRows()-1;t<=a;){var n=a+t>>1,r=this.getValue(n,0);if(re)a=n-1;else{if(t==n)return n;a=n}}return null},j.prototype.ready=function(e){this.is_initial_draw_?this.readyFns_.push(e):e.call(this,this)},j.prototype.addAndTrackEvent=function(e,t,a){h.addEvent(e,t,a),this.registeredEvents_.push({elem:e,type:t,fn:a})},j.prototype.removeTrackedEvents_=function(){if(this.registeredEvents_)for(var e=0;eo.x+o.w||l.canvasyo.y+o.h)){var c=l.annotation,u=6;c.hasOwnProperty("tickHeight")&&(u=c.tickHeight);var d=document.createElement("div");d.style.fontSize=t.getOption("axisLabelFontSize")+"px";var h="dygraph-annotation";c.hasOwnProperty("icon")||(h+=" dygraphDefaultAnnotation dygraph-default-annotation"),c.hasOwnProperty("cssClass")&&(h+=" "+c.cssClass),d.className=h;var p=c.hasOwnProperty("width")?c.width:16,f=c.hasOwnProperty("height")?c.height:16;if(c.hasOwnProperty("icon")){var g=document.createElement("img");g.src=c.icon,g.width=p,g.height=f,d.appendChild(g)}else l.annotation.hasOwnProperty("shortText")&&d.appendChild(document.createTextNode(l.annotation.shortText));var m=l.canvasx-p/2;d.style.left=m+"px";var b=0;if(c.attachAtBottom){var v=o.y+o.h-f-u;i[m]?v-=i[m]:i[m]=0,i[m]+=u+f,b=v}else b=l.canvasy-f-u;d.style.top=b+"px",d.style.width=p+"px",d.style.height=f+"px",d.title=l.annotation.text,d.style.color=t.colorsMap_[l.name],d.style.borderColor=t.colorsMap_[l.name],c.div=d,t.addAndTrackEvent(d,"click",r("clickHandler","annotationClickHandler",l)),t.addAndTrackEvent(d,"mouseover",r("mouseOverHandler","annotationMouseOverHandler",l)),t.addAndTrackEvent(d,"mouseout",r("mouseOutHandler","annotationMouseOutHandler",l)),t.addAndTrackEvent(d,"dblclick",r("dblClickHandler","annotationDblClickHandler",l)),n.appendChild(d),this.annotations_.push(d);var _=e.drawingContext;_.save(),_.strokeStyle=c.hasOwnProperty("tickColor")?c.tickColor:t.colorsMap_[l.name],_.lineWidth=c.hasOwnProperty("tickWidth")?c.tickWidth:t.getOption("strokeWidth"),_.beginPath(),c.attachAtBottom?(v=b+f,_.moveTo(l.canvasx,v),_.lineTo(l.canvasx,v+u)):(_.moveTo(l.canvasx,l.canvasy),_.lineTo(l.canvasx,l.canvasy-2-u)),_.closePath(),_.stroke(),_.restore()}}},n.prototype.destroy=function(){this.detachLabels()},a.default=n,t.exports=a.default},{}],21:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}(e("../dygraph-utils")),r=function(){this.xlabels_=[],this.ylabels_=[]};r.prototype.toString=function(){return"Axes Plugin"},r.prototype.activate=function(e){return{layout:this.layout,clearChart:this.clearChart,willDrawChart:this.willDrawChart}},r.prototype.layout=function(e){var t,a=e.dygraph;if(a.getOptionForAxis("drawAxis","y")){var n=a.getOptionForAxis("axisLabelWidth","y")+2*a.getOptionForAxis("axisTickSize","y");e.reserveSpaceLeft(n)}a.getOptionForAxis("drawAxis","x")&&(t=a.getOption("xAxisHeight")?a.getOption("xAxisHeight"):a.getOptionForAxis("axisLabelFontSize","x")+2*a.getOptionForAxis("axisTickSize","x"),e.reserveSpaceBottom(t)),2==a.numAxes()?a.getOptionForAxis("drawAxis","y2")&&(n=a.getOptionForAxis("axisLabelWidth","y2")+2*a.getOptionForAxis("axisTickSize","y2"),e.reserveSpaceRight(n)):a.numAxes()>2&&a.error("Only two y-axes are supported at this time. (Trying to use "+a.numAxes()+")")},r.prototype.detachLabels=function(){function e(e){for(var t=0;t0){var _=o.numAxes(),y=[v("y"),v("y2")];m.yticks.forEach((function(e){if(void 0!==e.label){s=b.x;var t="y1",a=y[0];1==e.axis&&(s=b.x+b.w,t="y2",a=y[1]);var n=a("axisLabelFontSize");l=b.y+e.pos*b.h,i=g(e.label,"y",2==_?t:null);var o=l-n/2;o<0&&(o=0),o+n+3>h?i.style.bottom="0":i.style.top=o+"px",0===e.axis?(i.style.left=b.x-a("axisLabelWidth")-a("axisTickSize")+"px",i.style.textAlign="right"):1==e.axis&&(i.style.left=b.x+b.w+a("axisTickSize")+"px",i.style.textAlign="left"),i.style.width=a("axisLabelWidth")+"px",u.appendChild(i),r.ylabels_.push(i)}}));var O=this.ylabels_[0],x=o.getOptionForAxis("axisLabelFontSize","y");parseInt(O.style.top,10)+x>h-x&&(O.style.top=parseInt(O.style.top,10)-x/2+"px")}var w;o.getOption("drawAxesAtZero")?(((C=o.toPercentXCoord(0))>1||C<0||isNaN(C))&&(C=0),w=t(b.x+C*b.w)):w=t(b.x),c.strokeStyle=o.getOptionForAxis("axisLineColor","y"),c.lineWidth=o.getOptionForAxis("axisLineWidth","y"),c.beginPath(),c.moveTo(w,a(b.y)),c.lineTo(w,a(b.y+b.h)),c.closePath(),c.stroke(),2==o.numAxes()&&(c.strokeStyle=o.getOptionForAxis("axisLineColor","y2"),c.lineWidth=o.getOptionForAxis("axisLineWidth","y2"),c.beginPath(),c.moveTo(a(b.x+b.w),a(b.y)),c.lineTo(a(b.x+b.w),a(b.y+b.h)),c.closePath(),c.stroke())}if(o.getOptionForAxis("drawAxis","x")){if(m.xticks){var E=v("x");m.xticks.forEach((function(e){if(void 0!==e.label){s=b.x+e.pos*b.w,l=b.y+b.h,(i=g(e.label,"x")).style.textAlign="center",i.style.top=l+E("axisTickSize")+"px";var t=s-E("axisLabelWidth")/2;t+E("axisLabelWidth")>d&&(t=d-E("axisLabelWidth"),i.style.textAlign="right"),t<0&&(t=0,i.style.textAlign="left"),i.style.left=t+"px",i.style.width=E("axisLabelWidth")+"px",u.appendChild(i),r.xlabels_.push(i)}}))}var S,C;c.strokeStyle=o.getOptionForAxis("axisLineColor","x"),c.lineWidth=o.getOptionForAxis("axisLineWidth","x"),c.beginPath(),o.getOption("drawAxesAtZero")?(((C=o.toPercentYCoord(0,0))>1||C<0)&&(C=1),S=a(b.y+C*b.h)):S=a(b.y+b.h),c.moveTo(t(b.x),S),c.lineTo(t(b.x+b.w),S),c.closePath(),c.stroke()}c.restore()}},a.default=r,t.exports=a.default},{"../dygraph-utils":17}],22:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){this.title_div_=null,this.xlabel_div_=null,this.ylabel_div_=null,this.y2label_div_=null};n.prototype.toString=function(){return"ChartLabels Plugin"},n.prototype.activate=function(e){return{layout:this.layout,didDrawChart:this.didDrawChart}};var r=function(e){var t=document.createElement("div");return t.style.position="absolute",t.style.left=e.x+"px",t.style.top=e.y+"px",t.style.width=e.w+"px",t.style.height=e.h+"px",t};n.prototype.detachLabels_=function(){for(var e=[this.title_div_,this.xlabel_div_,this.ylabel_div_,this.y2label_div_],t=0;t=2);o=l.yticks,s.save(),o.forEach((function(e){if(e.has_tick){var o=e.axis;p[o]&&(s.save(),f[o]&&s.setLineDash&&s.setLineDash(g[o]),s.strokeStyle=d[o],s.lineWidth=h[o],n=t(c.x),r=a(c.y+e.pos*c.h),s.beginPath(),s.moveTo(n,r),s.lineTo(n+c.w,r),s.stroke(),s.restore())}})),s.restore()}i.getOptionForAxis("drawGrid","x")&&(o=l.xticks,s.save(),g=i.getOptionForAxis("gridLinePattern","x"),(f=g&&g.length>=2)&&s.setLineDash&&s.setLineDash(g),s.strokeStyle=i.getOptionForAxis("gridLineColor","x"),s.lineWidth=i.getOptionForAxis("gridLineWidth","x"),o.forEach((function(e){e.has_tick&&(n=t(c.x+e.pos*c.w),r=a(c.y+c.h),s.beginPath(),s.moveTo(n,r),s.lineTo(n,c.y),s.closePath(),s.stroke())})),f&&s.setLineDash&&s.setLineDash([]),s.restore())},n.prototype.destroy=function(){},a.default=n,t.exports=a.default},{}],24:[function(e,t,a){"use strict";function n(e,t,a){if(!e||e.length<=1)return'
    ';var n,r,o,i,s=0,l=0,c=[];for(n=0;n<=e.length;n++)s+=e[n%e.length];if((i=Math.floor(a/(s-e[0])))>1){for(n=0;n
    ';return u}Object.defineProperty(a,"__esModule",{value:!0});var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}(e("../dygraph-utils")),o=function(){this.legend_div_=null,this.is_generated_div_=!1};o.prototype.toString=function(){return"Legend Plugin"},o.prototype.activate=function(e){var t,a=e.getOption("labelsDiv");return a&&null!==a?t="string"==typeof a||a instanceof String?document.getElementById(a):a:((t=document.createElement("div")).className="dygraph-legend",e.graphDiv.appendChild(t),this.is_generated_div_=!0),this.legend_div_=t,this.one_em_width_=10,{select:this.select,deselect:this.deselect,predraw:this.predraw,didDrawChart:this.didDrawChart}};var i=function(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(//g,">")};o.prototype.select=function(e){var t=e.selectedX,a=e.selectedPoints,n=e.selectedRow,r=e.dygraph.getOption("legend");if("never"!==r){if("follow"===r){var i=e.dygraph.plotter_.area,s=this.legend_div_.offsetWidth,l=e.dygraph.getOptionForAxis("axisLabelWidth","y"),c=a[0].x*i.w+50,u=a[0].y*i.h-50;c+s+1>i.w&&(c=c-100-s-(l-i.x)),e.dygraph.graphDiv.appendChild(this.legend_div_),this.legend_div_.style.left=l+c+"px",this.legend_div_.style.top=u+"px"}var d=o.generateLegendHTML(e.dygraph,t,a,this.one_em_width_,n);this.legend_div_.innerHTML=d,this.legend_div_.style.display=""}else this.legend_div_.style.display="none"},o.prototype.deselect=function(e){"always"!==e.dygraph.getOption("legend")&&(this.legend_div_.style.display="none");var t=function(e){var t=document.createElement("span");t.setAttribute("style","margin: 0; padding: 0 0 0 1em; border: 0;"),e.appendChild(t);var a=t.offsetWidth;return e.removeChild(t),a}(this.legend_div_);this.one_em_width_=t;var a=o.generateLegendHTML(e.dygraph,void 0,void 0,t,null);this.legend_div_.innerHTML=a},o.prototype.didDrawChart=function(e){this.deselect(e)},o.prototype.predraw=function(e){if(this.is_generated_div_){e.dygraph.graphDiv.appendChild(this.legend_div_);var t=e.dygraph.getArea(),a=this.legend_div_.offsetWidth;this.legend_div_.style.left=t.x+t.w-a-1+"px",this.legend_div_.style.top=t.y+"px"}},o.prototype.destroy=function(){this.legend_div_=null},o.generateLegendHTML=function(e,t,a,s,l){var c={dygraph:e,x:t,series:[]},u={},d=e.getLabels();if(d)for(var h=1;h":" "),a+=""+o.dashHTML+" "+o.labelHTML+"");return a}for(a=e.xHTML+":",r=0;r"),a+=" "+o.labelHTML+": "+o.yHTML+"")}return a},a.default=o,t.exports=a.default},{"../dygraph-utils":17}],25:[function(e,t,a){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(a,"__esModule",{value:!0});var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}(e("../dygraph-utils")),o=n(e("../dygraph-interaction-model")),i=n(e("../iframe-tarp")),s=function(){this.hasTouchInterface_="undefined"!=typeof TouchEvent,this.isMobileDevice_=/mobile|android/gi.test(navigator.appVersion),this.interfaceCreated_=!1};s.prototype.toString=function(){return"RangeSelector Plugin"},s.prototype.activate=function(e){return this.dygraph_=e,this.getOption_("showRangeSelector")&&this.createInterface_(),{layout:this.reserveSpace_,predraw:this.renderStaticLayer_,didDrawChart:this.renderInteractiveLayer_}},s.prototype.destroy=function(){this.bgcanvas_=null,this.fgcanvas_=null,this.leftZoomHandle_=null,this.rightZoomHandle_=null},s.prototype.getOption_=function(e,t){return this.dygraph_.getOption(e,t)},s.prototype.setDefaultOption_=function(e,t){this.dygraph_.attrs_[e]=t},s.prototype.createInterface_=function(){this.createCanvases_(),this.createZoomHandles_(),this.initInteraction_(),this.getOption_("animatedZooms")&&(console.warn("Animated zooms and range selector are not compatible; disabling animatedZooms."),this.dygraph_.updateOptions({animatedZooms:!1},!0)),this.interfaceCreated_=!0,this.addToGraph_()},s.prototype.addToGraph_=function(){var e=this.graphDiv_=this.dygraph_.graphDiv;e.appendChild(this.bgcanvas_),e.appendChild(this.fgcanvas_),e.appendChild(this.leftZoomHandle_),e.appendChild(this.rightZoomHandle_)},s.prototype.removeFromGraph_=function(){var e=this.graphDiv_;e.removeChild(this.bgcanvas_),e.removeChild(this.fgcanvas_),e.removeChild(this.leftZoomHandle_),e.removeChild(this.rightZoomHandle_),this.graphDiv_=null},s.prototype.reserveSpace_=function(e){this.getOption_("showRangeSelector")&&e.reserveSpaceBottom(this.getOption_("rangeSelectorHeight")+4)},s.prototype.renderStaticLayer_=function(){this.updateVisibility_()&&(this.resize_(),this.drawStaticLayer_())},s.prototype.renderInteractiveLayer_=function(){this.updateVisibility_()&&!this.isChangingRange_&&(this.placeZoomHandles_(),this.drawInteractiveLayer_())},s.prototype.updateVisibility_=function(){var e=this.getOption_("showRangeSelector");if(e)this.interfaceCreated_?this.graphDiv_&&this.graphDiv_.parentNode||this.addToGraph_():this.createInterface_();else if(this.graphDiv_){this.removeFromGraph_();var t=this.dygraph_;setTimeout((function(){t.width_=0,t.resize()}),1)}return e},s.prototype.resize_=function(){function e(e,t,a,n){var o=n||r.getContextPixelRatio(t);e.style.top=a.y+"px",e.style.left=a.x+"px",e.width=a.w*o,e.height=a.h*o,e.style.width=a.w+"px",e.style.height=a.h+"px",1!=o&&t.scale(o,o)}var t=this.dygraph_.layout_.getPlotArea(),a=0;this.dygraph_.getOptionForAxis("drawAxis","x")&&(a=this.getOption_("xAxisHeight")||this.getOption_("axisLabelFontSize")+2*this.getOption_("axisTickSize")),this.canvasRect_={x:t.x,y:t.y+t.h+a+4,w:t.w,h:this.getOption_("rangeSelectorHeight")};var n=this.dygraph_.getNumericOption("pixelRatio");e(this.bgcanvas_,this.bgcanvas_ctx_,this.canvasRect_,n),e(this.fgcanvas_,this.fgcanvas_ctx_,this.canvasRect_,n)},s.prototype.createCanvases_=function(){this.bgcanvas_=r.createCanvas(),this.bgcanvas_.className="dygraph-rangesel-bgcanvas",this.bgcanvas_.style.position="absolute",this.bgcanvas_.style.zIndex=9,this.bgcanvas_ctx_=r.getContext(this.bgcanvas_),this.fgcanvas_=r.createCanvas(),this.fgcanvas_.className="dygraph-rangesel-fgcanvas",this.fgcanvas_.style.position="absolute",this.fgcanvas_.style.zIndex=9,this.fgcanvas_.style.cursor="default",this.fgcanvas_ctx_=r.getContext(this.fgcanvas_)},s.prototype.createZoomHandles_=function(){var e=new Image;e.className="dygraph-rangesel-zoomhandle",e.style.position="absolute",e.style.zIndex=10,e.style.visibility="hidden",e.style.cursor="col-resize",e.width=9,e.height=16,e.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAQCAYAAADESFVDAAAAAXNSR0IArs4c6QAAAAZiS0dEANAAzwDP4Z7KegAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAAd0SU1FB9sHGw0cMqdt1UwAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAaElEQVQoz+3SsRFAQBCF4Z9WJM8KCDVwownl6YXsTmCUsyKGkZzcl7zkz3YLkypgAnreFmDEpHkIwVOMfpdi9CEEN2nGpFdwD03yEqDtOgCaun7sqSTDH32I1pQA2Pb9sZecAxc5r3IAb21d6878xsAAAAAASUVORK5CYII=",this.isMobileDevice_&&(e.width*=2,e.height*=2),this.leftZoomHandle_=e,this.rightZoomHandle_=e.cloneNode(!1)},s.prototype.initInteraction_=function(){var e,t,a,n,s,l,c,u,d,h,p,f,g,m,b=this,v=document,_=0,y=null,O=!1,x=!1,w=!this.isMobileDevice_,E=new i.default;e=function(e){var t=b.dygraph_.xAxisExtremes(),a=(t[1]-t[0])/b.canvasRect_.w;return[t[0]+(e.leftHandlePos-b.canvasRect_.x)*a,t[0]+(e.rightHandlePos-b.canvasRect_.x)*a]},t=function(e){return r.cancelEvent(e),O=!0,_=e.clientX,y=e.target?e.target:e.srcElement,"mousedown"!==e.type&&"dragstart"!==e.type||(r.addEvent(v,"mousemove",a),r.addEvent(v,"mouseup",n)),b.fgcanvas_.style.cursor="col-resize",E.cover(),!0},a=function(e){if(!O)return!1;r.cancelEvent(e);var t=e.clientX-_;if(Math.abs(t)<4)return!0;_=e.clientX;var a,n=b.getZoomHandleStatus_();y==b.leftZoomHandle_?(a=n.leftHandlePos+t,a=Math.min(a,n.rightHandlePos-y.width-3),a=Math.max(a,b.canvasRect_.x)):(a=n.rightHandlePos+t,a=Math.min(a,b.canvasRect_.x+b.canvasRect_.w),a=Math.max(a,n.leftHandlePos+y.width+3));var o=y.width/2;return y.style.left=a-o+"px",b.drawInteractiveLayer_(),w&&s(),!0},n=function(e){return!!O&&(O=!1,E.uncover(),r.removeEvent(v,"mousemove",a),r.removeEvent(v,"mouseup",n),b.fgcanvas_.style.cursor="default",w||s(),!0)},s=function(){try{var t=b.getZoomHandleStatus_();if(b.isChangingRange_=!0,t.isZoomed){var a=e(t);b.dygraph_.doZoomXDates_(a[0],a[1])}else b.dygraph_.resetZoom()}finally{b.isChangingRange_=!1}},l=function(e){var t=b.leftZoomHandle_.getBoundingClientRect(),a=t.left+t.width/2,n=(t=b.rightZoomHandle_.getBoundingClientRect()).left+t.width/2;return e.clientX>a&&e.clientX=b.canvasRect_.x+b.canvasRect_.w?n=(o=b.canvasRect_.x+b.canvasRect_.w)-i:(n+=t,o+=t);var s=b.leftZoomHandle_.width/2;return b.leftZoomHandle_.style.left=n-s+"px",b.rightZoomHandle_.style.left=o-s+"px",b.drawInteractiveLayer_(),w&&h(),!0},d=function(e){return!!x&&(x=!1,r.removeEvent(v,"mousemove",u),r.removeEvent(v,"mouseup",d),w||h(),!0)},h=function(){try{b.isChangingRange_=!0,b.dygraph_.dateWindow_=e(b.getZoomHandleStatus_()),b.dygraph_.drawGraph_(!1)}finally{b.isChangingRange_=!1}},p=function(e){if(!O&&!x){var t=l(e)?"move":"default";t!=b.fgcanvas_.style.cursor&&(b.fgcanvas_.style.cursor=t)}},f=function(e){"touchstart"==e.type&&1==e.targetTouches.length?t(e.targetTouches[0])&&r.cancelEvent(e):"touchmove"==e.type&&1==e.targetTouches.length?a(e.targetTouches[0])&&r.cancelEvent(e):n(e)},g=function(e){"touchstart"==e.type&&1==e.targetTouches.length?c(e.targetTouches[0])&&r.cancelEvent(e):"touchmove"==e.type&&1==e.targetTouches.length?u(e.targetTouches[0])&&r.cancelEvent(e):d(e)},m=function(e,t){for(var a=["touchstart","touchend","touchmove","touchcancel"],n=0;n1&&(f=h.rollingAverage(f,t.rollPeriod(),p)),d.push(f)}var g=[];for(e=0;e0)&&(y=Math.min(y,x),O=Math.max(O,x))}if(a)for(O=r.log10(O),O+=.25*O,y=r.log10(y),e=0;ethis.canvasRect_.x||a+11)&&s?s?i.filter((function(e){return e!==r})):i.concat(r):[r]).length===a.length?[]:t}},56:function(e,t,a){"use strict";a.d(t,"b",(function(){return l})),a.d(t,"e",(function(){return u})),a.d(t,"a",(function(){return d})),a.d(t,"c",(function(){return h})),a.d(t,"d",(function(){return p}));var n=a(5),r=a(286),o=a(288),i=a(502),s=/[&;]/,l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:decodeURIComponent(window.location.hash.substr(1));if(0===e.length)return{};var t=e.split(s),a=t.reduce((function(e,t){var a=t.split("="),r=Object(n.a)(a,2),o=r[0],i=r[1];return e[o]=i,e}),{});return a},c=function(e){var t=Object.entries(e);return 0===t.length?"":t.map((function(e){var t=Object(n.a)(e,2),a=t[0],r=t[1];return"".concat(a,"=").concat(encodeURIComponent(r))})).join(";")},u=(Object(o.a)(l,c),function(e){var t=l(),a=Object(i.a)(e,t);window.history.replaceState(window.history.state,"","#".concat(c(a)))}),d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:decodeURIComponent(window.location.hash.substr(1));return l(t)[e]},h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:decodeURIComponent(window.location.hash.substr(1));return void 0!==l(t)[e]},p=function(e){window.history.replaceState(window.history.state,"","#".concat(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:decodeURIComponent(window.location.hash.substr(1)),a=Object(r.a)(e,l(t));return c(a)}(e)))}},73:function(e,t,a){"use strict";a.d(t,"a",(function(){return o})),a.d(t,"b",(function(){return i}));var n=a(5),r=a(0),o=function(e,t){var a="string"===typeof e?document.getElementById(e):e;a.contentWindow&&a.contentWindow.postMessage(t,"*")},i=function(e,t,a){var o=Object(r.useState)(a),i=Object(n.a)(o,2),s=i[0],l=i[1],c=Object(r.useCallback)((function(a){var n=a.data;n.type===e&&(l(n.payload),t&&t(n.payload))}),[t,e]),u=Object(r.useCallback)((function(){l(a)}),[a]);return Object(r.useEffect)((function(){return window.addEventListener("message",c),function(){window.removeEventListener("message",c)}}),[c,e]),[s,u]}},74:function(e,t,a){"use strict";a.d(t,"b",(function(){return n})),a.d(t,"c",(function(){return r})),a.d(t,"a",(function(){return o}));var n="true",r=!1,o=!1},75:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));var n="dashboard"},78:function(e,t,a){"use strict";var n=a(5),r=a(0),o=a(27),i=a(17),s=a(501),l=a(44),c=a(9),u=a(28),d=Object(i.a)(c.y,(function(e){return e.registryServer===u.b})),h=Object(i.a)((function(e){return e.dashboard}),(function(e){return e.offline}));t.a=function(e){var t=e.children,a=e.utmParameters,i=Object(s.a)("has-sign-in-history"),u=Object(n.a)(i,1)[0],p=Object(o.e)((function(e){return Object(c.C)(a)(e)})),f=Object(o.e)(d),g=Object(o.e)(h),m=Object(o.d)(),b=Object(r.useMemo)((function(){var e=window.location.href,t=encodeURIComponent(e);return"".concat(p,"&redirect_uri=").concat(t)}),[p]),v=Object(r.useCallback)((function(){return m(Object(l.d)({signInLinkHref:b}))}),[b]);return Object(r.useMemo)((function(){return"function"===typeof t?t({isRegistry:f,link:b,onSignIn:v,offline:g,hasSignedInBefore:u}):t}),[t,f,b,v,g,u])}},8:function(e,t,a){"use strict";a.d(t,"b",(function(){return r})),a.d(t,"a",(function(){return o}));a(0);var n=a(27),r=n.e,o=n.d},89:function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(7),r=a(22),o=function(e){var t=Object(r.createAction)(e.toUpperCase());return Object.assign(t,{request:t,success:Object(r.createAction)("".concat(e.toUpperCase(),"_SUCCESS"),(function(e){return e}),(function(e){return e})),failure:Object(r.createAction)("".concat(e.toUpperCase(),"_FAILURE"),(function(e){return e}),(function(e){return Object(n.a)({},e,{error:!0})}))})}},9:function(e,t,a){"use strict";a.d(t,"a",(function(){return u})),a.d(t,"h",(function(){return h})),a.d(t,"g",(function(){return p})),a.d(t,"o",(function(){return f})),a.d(t,"p",(function(){return g})),a.d(t,"m",(function(){return m})),a.d(t,"i",(function(){return b})),a.d(t,"l",(function(){return v})),a.d(t,"s",(function(){return _})),a.d(t,"n",(function(){return y})),a.d(t,"E",(function(){return O})),a.d(t,"y",(function(){return x})),a.d(t,"f",(function(){return w})),a.d(t,"Q",(function(){return E})),a.d(t,"C",(function(){return S})),a.d(t,"v",(function(){return C})),a.d(t,"u",(function(){return A})),a.d(t,"q",(function(){return k})),a.d(t,"k",(function(){return j})),a.d(t,"w",(function(){return T})),a.d(t,"r",(function(){return D})),a.d(t,"c",(function(){return P})),a.d(t,"d",(function(){return M})),a.d(t,"F",(function(){return L})),a.d(t,"G",(function(){return I})),a.d(t,"b",(function(){return R})),a.d(t,"j",(function(){return F})),a.d(t,"H",(function(){return B})),a.d(t,"A",(function(){return H})),a.d(t,"t",(function(){return z})),a.d(t,"J",(function(){return U})),a.d(t,"I",(function(){return G})),a.d(t,"L",(function(){return W})),a.d(t,"B",(function(){return V})),a.d(t,"x",(function(){return Y})),a.d(t,"D",(function(){return X})),a.d(t,"O",(function(){return K})),a.d(t,"K",(function(){return Z})),a.d(t,"z",(function(){return q})),a.d(t,"M",(function(){return $})),a.d(t,"N",(function(){return J})),a.d(t,"e",(function(){return ee})),a.d(t,"P",(function(){return te}));var n=a(49),r=a(212),o=a(17),i=a(28),s=a(36),l=a(155),c=a(26),u=function(e){return function(t){var a=Object(l.a)(e),n=t[c.e].commonColorsKeys[a];return n&&n.assigned}},d=function(e){return e.global},h=Object(o.a)(d,(function(e,t){return t}),(function(e,t){return e.commonMin[t]})),p=Object(o.a)(d,(function(e,t){return t}),(function(e,t){return e.commonMax[t]})),f=Object(o.a)(d,Object(n.a)("hoveredX")),g=Object(o.a)(d,Object(n.a)("currentSelectionMasterId")),m=Object(o.a)(d,Object(n.a)("globalPanAndZoom")),b=Object(o.a)(d,Object(n.a)("defaultAfter")),v=Object(o.a)(d,Object(n.a)("globalChartUnderlay")),_=Object(o.a)(d,Object(n.a)("hasWindowFocus")),y=Object(o.a)(d,Object(n.a)("globalPause")),O=Object(o.a)(d,Object(n.a)("snapshot")),x=Object(o.a)(d,Object(n.a)("registry")),w=Object(o.a)(x,Object(n.a)("cloudBaseURL")),E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,a){return t+"&utm_".concat(a,"=").concat(e[a])}),"")},S=function(e){return Object(o.a)(x,w,(function(t,a){var n=encodeURIComponent(t.hostname),r=encodeURIComponent(Object(s.a)(window.location.origin+window.location.pathname));return"".concat(a,"/sign-in?id=").concat(t.machineGuid,"&name=").concat(n,"&origin=").concat(r).concat(i.g).concat(E(e))}))},C=(Object(o.a)(x,Object(n.a)("isFetchingHello")),Object(o.a)(x,(function(e){var t=e.registryServer;return t&&"https://registry.my-netdata.io"!==t}))),A=Object(o.a)(x,(function(e){return e.isCloudEnabled&&!e.isHelloCallError})),k=Object(o.a)(x,Object(n.a)("hasFetchedInfo")),j=Object(o.a)(x,Object(n.a)("fullInfoPayload")),T=Object(o.a)(j,(function(e){return e["agent-claimed"]&&!e["aclk-ng-new-cloud-protocol"]})),D=Object(o.a)(d,Object(r.a)(["alarms","hasStartedAlarms"])),P=Object(o.a)(d,(function(e){return e.alarms.activeAlarms})),M=Object(o.a)(d,(function(e){return e.alarm})),L=Object(o.a)(d,Object(n.a)("spacePanelIsActive")),I=Object(o.a)(d,Object(n.a)("spacePanelTransitionEndIsActive")),N=Object(o.a)(d,(function(e){return e.options})),R=function(e){return Object(o.a)(N,(function(t){return t[e]}))},F=R("destroy_on_hide"),B=R("stop_updates_when_focus_is_lost"),H=R("eliminate_zero_dimensions"),z=R("async_on_scroll"),U=(R("parallel_refresher"),R("concurrent_refreshes"),R("sync_selection")),G=R("sync_pan_and_zoom"),W=R("theme"),V=R("show_help"),Y=R("pan_and_zoom_data_padding"),X=R("smooth_plot"),K=R("units"),Z=R("temperature"),q=R("seconds_as_time"),$=R("timezone"),J=R("utcOffset"),Q=(R("user_set_server_timezone"),Object(o.a)(d,(function(e){return e.chartsMetadata.data}))),ee=Object(o.a)(Q,(function(e,t){return t.chartId}),(function(e,t){return null===e||void 0===e?void 0:e.charts[t]})),te=Object(o.a)(d,(function(e){return e.userNodeAccess}))},97:function(e,t,a){"use strict";a.d(t,"a",(function(){return l})),a.d(t,"c",(function(){return u})),a.d(t,"e",(function(){return d})),a.d(t,"d",(function(){return h})),a.d(t,"b",(function(){return p}));var n,r=a(14),o=a(218),i=a(495),s=a(104),l="sync_pan_and_zoom",c=(n={},Object(r.a)(n,"stop_updates_when_focus_is_lost",!0),Object(r.a)(n,"eliminate_zero_dimensions",!0),Object(r.a)(n,"destroy_on_hide",!1),Object(r.a)(n,"async_on_scroll",!1),Object(r.a)(n,"parallel_refresher",!0),Object(r.a)(n,"concurrent_refreshes",!0),Object(r.a)(n,"sync_selection",!0),Object(r.a)(n,l,!0),Object(r.a)(n,"legend_right",!1),Object(r.a)(n,"theme","slate"),Object(r.a)(n,"show_help",Boolean(window.netdataShowHelp)&&!window.netdataNoBootstrap),Object(r.a)(n,"pan_and_zoom_data_padding",!0),Object(r.a)(n,"smooth_plot",!0),Object(r.a)(n,"units","auto"),Object(r.a)(n,"temperature","celsius"),Object(r.a)(n,"seconds_as_time",!0),Object(r.a)(n,"timezone","default"),Object(r.a)(n,"user_set_server_timezone","default"),Object(r.a)(n,"utcOffset",0),n),u=function(){var e=Object.keys(localStorage).filter((function(e){return e.startsWith("options.")||"netdataTheme"===e})).map((function(e){return Object(r.a)({},function(e){return e.replace(/^options\./,"").replace("netdataTheme","theme")}(e),function(e){var t,a=localStorage.getItem(e);if(null===a||"undefined"===a)return localStorage.removeItem(e),null;try{t=JSON.parse(a)}catch(n){return"netdataTheme"===e&&a?a:(console.log('localStorage: failed to read "'.concat(e,'", using default')),localStorage.removeItem(e),null)}return t}(e))})).filter((function(e){return null!==Object.values(e)[0]})),t=Object(o.a)(e);return Object(i.a)(c,t)},d=u(),h=d.legend_right,p=function(){Object.keys(localStorage).forEach((function(e){(e.startsWith(s.a)||e.startsWith("options."))&&localStorage.removeItem(e)}))}},98:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=window.location.hash.split(";").includes("help=true"),r=function(){if(n)return!1;var e=document.location.hostname;return e.endsWith(".my-netdata.io")||e.endsWith(".mynetdata.io")||e.endsWith(".netdata.rocks")||e.endsWith(".netdata.ai")||e.endsWith(".netdata.live")||e.endsWith(".firehol.org")||e.endsWith(".netdata.online")||e.endsWith(".netdata.cloud")}()}},[[300,1,2]]]); //# sourceMappingURL=main.485cc284.chunk.js.map