/*! For license information please see 5.8d493428.chunk.js.LICENSE */ (this["webpackJsonp@netdata/dashboard"]=this["webpackJsonp@netdata/dashboard"]||[]).push([[5],{520:function(t,e,i){"use strict";var s,o,n,a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h="object"===("undefined"===typeof window?"undefined":a(window));o=[i(155)],void 0===(n="function"===typeof(s=function(t){var e;return h&&!window.console&&(window.console={}),h&&!window.console.log&&(window.console.log=function(){}),h&&!window.console.warn&&(window.console.warn=function(){}),function(t){var e=Array.prototype.slice;function i(){}!function(t){if(t){var s="undefined"===typeof console?i:function(t){console.error(t)};t.bridget=function(i,o){!function(e){e.prototype.option||(e.prototype.option=function(e){t.isPlainObject(e)&&(this.options=t.extend(!0,this.options,e))})}(o),function(i,o){t.fn[i]=function(n){if("string"===typeof n){for(var a=e.call(arguments,1),h=0,l=this.length;he.max?e.max:t},toValue:function(t){var e=t/100*(this.options.max-this.options.min),i=!0;if(this.options.ticks_positions.length>0){for(var s,n,a,h=0,l=1;l0){for(var e,i,s,o=0,n=0;n0?this.options.ticks[n-1]:0,s=n>0?this.options.ticks_positions[n-1]:0,i=this.options.ticks[n],o=this.options.ticks_positions[n];break}if(n>0)return s+(t-e)/(i-e)*(o-s)}return 100*(t-this.options.min)/(this.options.max-this.options.min)}},logarithmic:{toValue:function(t){var e=1-this.options.min,i=Math.log(this.options.min+e),s=Math.log(this.options.max+e),n=Math.exp(i+(s-i)*t/100)-e;return Math.round(n)===s?s:(n=this.options.min+Math.round((n-this.options.min)/this.options.step)*this.options.step,o.linear.getValue(n,this.options))},toPercentage:function(t){if(this.options.max===this.options.min)return 0;var e=1-this.options.min,i=Math.log(this.options.max+e),s=Math.log(this.options.min+e);return 100*(Math.log(t+e)-s)/(i-s)}}};function n(e,i){this._state={value:null,enabled:null,offset:null,size:null,percentage:null,inDrag:!1,over:!1,tickIndex:null},this.ticksCallbackMap={},this.handleCallbackMap={},"string"===typeof e?this.element=document.querySelector(e):e instanceof HTMLElement&&(this.element=e),i=i||{};for(var s=Object.keys(this.defaultOptions),n=i.hasOwnProperty("min"),a=i.hasOwnProperty("max"),h=0;h0,this.ticksAreValid||(this.options.lock_to_ticks=!1),"auto"===this.options.rtl){var d=window.getComputedStyle(this.element);this.options.rtl=null!=d?"rtl"===d.direction:"rtl"===this.element.style.direction}function p(t,e){var i="data-slider-"+e.replace(/_/g,"-"),s=t.getAttribute(i);try{return JSON.parse(s)}catch(o){return s}}"vertical"!==this.options.orientation||"top"!==this.options.tooltip_position&&"bottom"!==this.options.tooltip_position?"horizontal"!==this.options.orientation||"left"!==this.options.tooltip_position&&"right"!==this.options.tooltip_position||(this.options.tooltip_position="top"):this.options.rtl?this.options.tooltip_position="left":this.options.tooltip_position="right";var c,u,m,v,_,g=this.element.style.width,f=!1,b=this.element.parentNode;if(this.sliderElem)f=!0;else{this.sliderElem=document.createElement("div"),this.sliderElem.className="slider";var y=document.createElement("div");y.className="slider-track",(u=document.createElement("div")).className="slider-track-low",(c=document.createElement("div")).className="slider-selection",(m=document.createElement("div")).className="slider-track-high",(v=document.createElement("div")).className="slider-handle min-slider-handle",v.setAttribute("role","slider"),v.setAttribute("aria-valuemin",this.options.min),v.setAttribute("aria-valuemax",this.options.max),(_=document.createElement("div")).className="slider-handle max-slider-handle",_.setAttribute("role","slider"),_.setAttribute("aria-valuemin",this.options.min),_.setAttribute("aria-valuemax",this.options.max),y.appendChild(u),y.appendChild(c),y.appendChild(m),this.rangeHighlightElements=[];var k=this.options.rangeHighlights;if(Array.isArray(k)&&k.length>0)for(var E=0;E0){for(this.ticksContainer=document.createElement("div"),this.ticksContainer.className="slider-tick-container",h=0;h0)for(this.tickLabelContainer=document.createElement("div"),this.tickLabelContainer.className="slider-tick-label-container",h=0;h0&&(a||(this.options.max=Math.max.apply(Math,this.options.ticks)),n||(this.options.min=Math.min.apply(Math,this.options.ticks))),Array.isArray(this.options.value)?(this.options.range=!0,this._state.value=this.options.value):this.options.range?this._state.value=[this.options.value,this.options.max]:this._state.value=this.options.value,this.trackLow=u||this.trackLow,this.trackSelection=c||this.trackSelection,this.trackHigh=m||this.trackHigh,"none"===this.options.selection?(this._addClass(this.trackLow,"hide"),this._addClass(this.trackSelection,"hide"),this._addClass(this.trackHigh,"hide")):"after"!==this.options.selection&&"before"!==this.options.selection||(this._removeClass(this.trackLow,"hide"),this._removeClass(this.trackSelection,"hide"),this._removeClass(this.trackHigh,"hide")),this.handle1=v||this.handle1,this.handle2=_||this.handle2,!0===f)for(this._removeClass(this.handle1,"round triangle"),this._removeClass(this.handle2,"round triangle hide"),h=0;hthis.options.min?this._state.percentage=[this._toPercentage(this._state.value[0]),this._toPercentage(this._state.value[1]),100*this.options.step/(this.options.max-this.options.min)]:this._state.percentage=[0,0,100],this._layout();var n=this.options.range?this._state.value:this._state.value[0];return this._setDataVal(n),!0===e&&this._trigger("slide",n),(Array.isArray(n)?s[0]!==n[0]||s[1]!==n[1]:s!==n)&&!0===i&&this._trigger("change",{oldValue:s,newValue:n}),this},destroy:function(){this._removeSliderEventHandlers(),this.sliderElem.parentNode.removeChild(this.sliderElem),this.element.style.display="",this._cleanUpEventCallbacksMap(),this.element.removeAttribute("data"),t&&(this._unbindJQueryEventHandlers(),"slider"===i&&this.$element.removeData(i),this.$element.removeData("bootstrapSlider"))},disable:function(){return this._state.enabled=!1,this.handle1.removeAttribute("tabindex"),this.handle2.removeAttribute("tabindex"),this._addClass(this.sliderElem,"slider-disabled"),this._trigger("slideDisabled"),this},enable:function(){return this._state.enabled=!0,this.handle1.setAttribute("tabindex",0),this.handle2.setAttribute("tabindex",0),this._removeClass(this.sliderElem,"slider-disabled"),this._trigger("slideEnabled"),this},toggle:function(){return this._state.enabled?this.disable():this.enable(),this},isEnabled:function(){return this._state.enabled},on:function(t,e){return this._bindNonQueryEventHandler(t,e),this},off:function(e,i){t?(this.$element.off(e,i),this.$sliderElem.off(e,i)):this._unbindNonQueryEventHandler(e,i)},getAttribute:function(t){return t?this.options[t]:this.options},setAttribute:function(t,e){return this.options[t]=e,this},refresh:function(e){var s=this.getValue();return this._removeSliderEventHandlers(),n.call(this,this.element,this.options),e&&!0===e.useCurrentValue&&this.setValue(s),t&&("slider"===i?(t.data(this.element,"slider",this),t.data(this.element,"bootstrapSlider",this)):t.data(this.element,"bootstrapSlider",this)),this},relayout:function(){return this._resize(),this},_removeTooltipListener:function(t,e){this.handle1.removeEventListener(t,e,!1),this.handle2.removeEventListener(t,e,!1)},_removeSliderEventHandlers:function(){if(this.handle1.removeEventListener("keydown",this.handle1Keydown,!1),this.handle2.removeEventListener("keydown",this.handle2Keydown,!1),this.options.ticks_tooltip){for(var t=this.ticksContainer.getElementsByClassName("slider-tick"),e=0;e0&&t.options.ticks_positions[i]||t._toPercentage(t.options.ticks[i])):n=t._toPercentage(o),s.value[0]=o,s.percentage[0]=n,t._setToolTipOnMouseOver(s),t._showTooltip()};return e.addEventListener("mouseenter",s,!1),s},addMouseLeave:function(t,e){var i=function(){t._hideTooltip()};return e.addEventListener("mouseleave",i,!1),i}}},_layout:function(){var t,e,i;if(t=this.options.reversed?[100-this._state.percentage[0],this.options.range?100-this._state.percentage[1]:this._state.percentage[1]]:[this._state.percentage[0],this._state.percentage[1]],this.handle1.style[this.stylePos]=t[0]+"%",this.handle1.setAttribute("aria-valuenow",this._state.value[0]),e=this.options.formatter(this._state.value[0]),isNaN(e)?this.handle1.setAttribute("aria-valuetext",e):this.handle1.removeAttribute("aria-valuetext"),this.handle2.style[this.stylePos]=t[1]+"%",this.handle2.setAttribute("aria-valuenow",this._state.value[1]),e=this.options.formatter(this._state.value[1]),isNaN(e)?this.handle2.setAttribute("aria-valuetext",e):this.handle2.removeAttribute("aria-valuetext"),this.rangeHighlightElements.length>0&&Array.isArray(this.options.rangeHighlights)&&this.options.rangeHighlights.length>0)for(var s=0;s0){var l,r="vertical"===this.options.orientation?"height":"width";l="vertical"===this.options.orientation?"marginTop":this.options.rtl?"marginRight":"marginLeft";var d=this._state.size/(this.options.ticks.length-1);if(this.tickLabelContainer){var p=0;if(0===this.options.ticks_positions.length)"vertical"!==this.options.orientation&&(this.tickLabelContainer.style[l]=-d/2+"px"),p=this.tickLabelContainer.offsetHeight;else for(c=0;cp&&(p=this.tickLabelContainer.childNodes[c].offsetHeight);"horizontal"===this.options.orientation&&(this.sliderElem.style.marginBottom=p+"px")}for(var c=0;c=t[0]&&u<=t[1]&&this._addClass(this.ticks[c],"in-selection"):"after"===this.options.selection&&u>=t[0]?this._addClass(this.ticks[c],"in-selection"):"before"===this.options.selection&&u<=t[0]&&this._addClass(this.ticks[c],"in-selection"),this.tickLabels[c]&&(this.tickLabels[c].style[r]=d+"px","vertical"!==this.options.orientation&&void 0!==this.options.ticks_positions[c]?(this.tickLabels[c].style.position="absolute",this.tickLabels[c].style[this.stylePos]=u+"%",this.tickLabels[c].style[l]=-d/2+"px"):"vertical"===this.options.orientation&&(this.options.rtl?this.tickLabels[c].style.marginRight=this.sliderElem.offsetWidth+"px":this.tickLabels[c].style.marginLeft=this.sliderElem.offsetWidth+"px",this.tickLabelContainer.style[l]=this.sliderElem.offsetWidth/2*-1+"px"),this._removeClass(this.tickLabels[c],"label-in-selection label-is-selection"),this.options.range?u>=t[0]&&u<=t[1]&&(this._addClass(this.tickLabels[c],"label-in-selection"),(u===t[0]||t[1])&&this._addClass(this.tickLabels[c],"label-is-selection")):("after"===this.options.selection&&u>=t[0]?this._addClass(this.tickLabels[c],"label-in-selection"):"before"===this.options.selection&&u<=t[0]&&this._addClass(this.tickLabels[c],"label-in-selection"),u===t[0]&&this._addClass(this.tickLabels[c],"label-is-selection")))}}if(this.options.range){i=this.options.formatter(this._state.value),this._setText(this.tooltipInner,i),this.tooltip.style[this.stylePos]=(t[1]+t[0])/2+"%";var m=this.options.formatter(this._state.value[0]);this._setText(this.tooltipInner_min,m);var v=this.options.formatter(this._state.value[1]);this._setText(this.tooltipInner_max,v),this.tooltip_min.style[this.stylePos]=t[0]+"%",this.tooltip_max.style[this.stylePos]=t[1]+"%"}else i=this.options.formatter(this._state.value[0]),this._setText(this.tooltipInner,i),this.tooltip.style[this.stylePos]=t[0]+"%";if("vertical"===this.options.orientation)this.trackLow.style.top="0",this.trackLow.style.height=Math.min(t[0],t[1])+"%",this.trackSelection.style.top=Math.min(t[0],t[1])+"%",this.trackSelection.style.height=Math.abs(t[0]-t[1])+"%",this.trackHigh.style.bottom="0",this.trackHigh.style.height=100-Math.min(t[0],t[1])-Math.abs(t[0]-t[1])+"%";else{"right"===this.stylePos?this.trackLow.style.right="0":this.trackLow.style.left="0",this.trackLow.style.width=Math.min(t[0],t[1])+"%","right"===this.stylePos?this.trackSelection.style.right=Math.min(t[0],t[1])+"%":this.trackSelection.style.left=Math.min(t[0],t[1])+"%",this.trackSelection.style.width=Math.abs(t[0]-t[1])+"%","right"===this.stylePos?this.trackHigh.style.left="0":this.trackHigh.style.right="0",this.trackHigh.style.width=100-Math.min(t[0],t[1])-Math.abs(t[0]-t[1])+"%";var _=this.tooltip_min.getBoundingClientRect(),g=this.tooltip_max.getBoundingClientRect();"bottom"===this.options.tooltip_position?_.right>g.left?(this._removeClass(this.tooltip_max,"bottom"),this._addClass(this.tooltip_max,"top"),this.tooltip_max.style.top="",this.tooltip_max.style.bottom="22px"):(this._removeClass(this.tooltip_max,"top"),this._addClass(this.tooltip_max,"bottom"),this.tooltip_max.style.top=this.tooltip_min.style.top,this.tooltip_max.style.bottom=""):_.right>g.left?(this._removeClass(this.tooltip_max,"top"),this._addClass(this.tooltip_max,"bottom"),this.tooltip_max.style.top="18px"):(this._removeClass(this.tooltip_max,"bottom"),this._addClass(this.tooltip_max,"top"),this.tooltip_max.style.top=this.tooltip_min.style.top)}},_createHighlightRange:function(t,e){return this._isHighlightRange(t,e)?t>e?{start:e,size:t-e}:{start:t,size:e-t}:null},_isHighlightRange:function(t,e){return 0<=t&&t<=100&&0<=e&&e<=100},_resize:function(t){this._state.offset=this._offset(this.sliderElem),this._state.size=this.sliderElem[this.sizePos],this._layout()},_removeProperty:function(t,e){t.style.removeProperty?t.style.removeProperty(e):t.style.removeAttribute(e)},_mousedown:function(t){if(!this._state.enabled)return!1;t.preventDefault&&t.preventDefault(),this._state.offset=this._offset(this.sliderElem),this._state.size=this.sliderElem[this.sizePos];var e=this._getPercentage(t);if(this.options.range){var i=Math.abs(this._state.percentage[0]-e),s=Math.abs(this._state.percentage[1]-e);this._state.dragged=ii?(this._state.percentage[1]=this._state.percentage[0],this._state.dragged=0):0===this._state.keyCtrl&&this._toPercentage(this._state.value[1])t&&(this._state.percentage[1]=this._state.percentage[0],this._state.keyCtrl=0,this.handle1.focus())}},_mouseup:function(t){if(!this._state.enabled)return!1;var e=this._getPercentage(t);this._adjustPercentageForRangeSliders(e),this._state.percentage[this._state.dragged]=e,this.touchCapable&&(document.removeEventListener("touchmove",this.mousemove,!1),document.removeEventListener("touchend",this.mouseup,!1)),document.removeEventListener("mousemove",this.mousemove,!1),document.removeEventListener("mouseup",this.mouseup,!1),this._state.inDrag=!1,!1===this._state.over&&this._hideTooltip();var i=this._calculateValue(!0);return this.setValue(i,!1,!0),this._trigger("slideStop",i),this._state.dragged=null,!1},_setValues:function(t,e){var i=0===t?0:100;this._state.percentage[t]!==i&&(e.data[t]=this._toValue(this._state.percentage[t]),e.data[t]=this._applyPrecision(e.data[t]))},_calculateValue:function(t){var e={};return this.options.range?(e.data=[this.options.min,this.options.max],this._setValues(0,e),this._setValues(1,e),t&&(e.data[0]=this._snapToClosestTick(e.data[0]),e.data[1]=this._snapToClosestTick(e.data[1]))):(e.data=this._toValue(this._state.percentage[0]),e.data=parseFloat(e.data),e.data=this._applyPrecision(e.data),t&&(e.data=this._snapToClosestTick(e.data))),e.data},_snapToClosestTick:function(t){for(var e=[t,1/0],i=0;i