--- a/src/pyams_skin/resources/js/ext/flot/jquery.flot.min.js Wed Oct 16 18:49:11 2019 +0200
+++ b/src/pyams_skin/resources/js/ext/flot/jquery.flot.min.js Wed Oct 16 19:33:40 2019 +0200
@@ -1,1 +1,1 @@
-Invalid assignment
+!function(t){"use strict";var i=window.Flot.Canvas;function o(i){var o,n=[],e=t.plot.saturated.saturate(t.plot.saturated.floorInBase(i.min,i.tickSize)),a=0,r=Number.NaN;e===-Number.MAX_VALUE&&(n.push(e),e=t.plot.saturated.floorInBase(i.min+i.tickSize,i.tickSize));do{o=r,r=t.plot.saturated.multiplyAdd(i.tickSize,a,e),n.push(r),++a}while(r<i.max&&r!==o);return n}function n(t,i,o){var n=i.tickDecimals;if(-1!==(""+t).indexOf("e"))return e(t,i,o);o>0&&(i.tickDecimals=o);var a=i.tickDecimals?parseFloat("1e"+i.tickDecimals):1,r=""+Math.round(t*a)/a;if(null!=i.tickDecimals){var l=r.indexOf("."),s=-1===l?0:r.length-l-1;if(s<i.tickDecimals)r=(s?r:r+".")+(""+a).substr(1,i.tickDecimals-s)}return i.tickDecimals=n,r}function e(t,i,o){var n=(""+t).indexOf("e"),e=parseInt((""+t).substr(n+1)),r=-1!==n?e:t>0?Math.floor(Math.log(t)/Math.LN10):0,l=parseFloat("1e"+r),s=t/l;if(o){var c=a(t,o);return(t/l).toFixed(c)+"e"+r}return i.tickDecimals>0?s.toFixed(a(t,i.tickDecimals))+"e"+r:s.toFixed()+"e"+r}function a(t,i){var o=Math.log(Math.abs(t))*Math.LOG10E,n=Math.abs(o+i);return n<=20?Math.floor(n):20}function r(e,a,r,l){var s=[],c={colors:["#edc240","#afd8f8","#cb4b4b","#4da74d","#9440ed"],xaxis:{show:null,position:"bottom",mode:null,font:null,color:null,tickColor:null,transform:null,inverseTransform:null,min:null,max:null,autoScaleMargin:null,autoScale:"exact",windowSize:null,growOnly:null,ticks:null,tickFormatter:null,showTickLabels:"major",labelWidth:null,labelHeight:null,reserveSpace:null,tickLength:null,showMinorTicks:null,showTicks:null,gridLines:null,alignTicksWithAxis:null,tickDecimals:null,tickSize:null,minTickSize:null,offset:{below:0,above:0},boxPosition:{centerX:0,centerY:0}},yaxis:{autoScaleMargin:.02,autoScale:"loose",growOnly:null,position:"left",showTickLabels:"major",offset:{below:0,above:0},boxPosition:{centerX:0,centerY:0}},xaxes:[],yaxes:[],series:{points:{show:!1,radius:3,lineWidth:2,fill:!0,fillColor:"#ffffff",symbol:"circle"},lines:{lineWidth:1,fill:!1,fillColor:null,steps:!1},bars:{show:!1,lineWidth:2,horizontal:!1,barWidth:.8,fill:!0,fillColor:null,align:"left",zero:!0},shadowSize:3,highlightColor:null},grid:{show:!0,aboveData:!1,color:"#545454",backgroundColor:null,borderColor:null,tickColor:null,margin:0,labelMargin:5,axisMargin:8,borderWidth:1,minBorderMargin:null,markings:null,markingsColor:"#f4f4f4",markingsLineWidth:2,clickable:!1,hoverable:!1,autoHighlight:!0,mouseActiveRadius:15},interaction:{redrawOverlayInterval:1e3/60},hooks:{}},u=null,f=null,h=null,d=null,p=null,m=[],x=[],g={left:0,right:0,top:0,bottom:0},b=0,v=0,k={processOptions:[],processRawData:[],processDatapoints:[],processOffset:[],setupGrid:[],adjustSeriesDataRange:[],setRange:[],drawBackground:[],drawSeries:[],drawAxis:[],draw:[],axisReserveSpace:[],bindEvents:[],drawOverlay:[],resize:[],shutdown:[]},y=this,w={},M=null;y.setData=W,y.setupGrid=P,y.draw=G,y.getPlaceholder=function(){return e},y.getCanvas=function(){return u.element},y.getSurface=function(){return u},y.getEventHolder=function(){return h[0]},y.getPlotOffset=function(){return g},y.width=function(){return b},y.height=function(){return v},y.offset=function(){var t=h.offset();return t.left+=g.left,t.top+=g.top,t},y.getData=function(){return s},y.getAxes=function(){var i={};return t.each(m.concat(x),(function(t,o){o&&(i[o.direction+(1!==o.n?o.n:"")+"axis"]=o)})),i},y.getXAxes=function(){return m},y.getYAxes=function(){return x},y.c2p=function(t){var i,o,n={};for(i=0;i<m.length;++i)(o=m[i])&&o.used&&(n["x"+o.n]=o.c2p(t.left));for(i=0;i<x.length;++i)(o=x[i])&&o.used&&(n["y"+o.n]=o.c2p(t.top));void 0!==n.x1&&(n.x=n.x1);void 0!==n.y1&&(n.y=n.y1);return n},y.p2c=function(t){var i,o,n,e={};for(i=0;i<m.length;++i)if((o=m[i])&&o.used&&(n="x"+o.n,null==t[n]&&1===o.n&&(n="x"),null!=t[n])){e.left=o.p2c(t[n]);break}for(i=0;i<x.length;++i)if((o=x[i])&&o.used&&(n="y"+o.n,null==t[n]&&1===o.n&&(n="y"),null!=t[n])){e.top=o.p2c(t[n]);break}return e},y.getOptions=function(){return c},y.triggerRedrawOverlay=J,y.pointOffset=function(t){return{left:parseInt(m[C(t,"x")-1].p2c(+t.x)+g.left,10),top:parseInt(x[C(t,"y")-1].p2c(+t.y)+g.top,10)}},y.shutdown=L,y.destroy=function(){L(),e.removeData("plot").empty(),s=[],c=null,u=null,f=null,h=null,d=null,p=null,m=[],x=[],k=null,y=null},y.resize=function(){var t=e.width(),i=e.height();u.resize(t,i),f.resize(t,i),N(k.resize,[t,i])},y.clearTextCache=function(){u.clearCache(),f.clearCache()},y.autoScaleAxis=O,y.computeRangeForDataSeries=function(t,i,o){for(var n=t.datapoints.points,e=t.datapoints.pointsize,a=t.datapoints.format,r=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,s={xmin:r,ymin:r,xmax:l,ymax:l},c=0;c<n.length;c+=e)if(null!==n[c]&&("function"!=typeof o||o(n[c])))for(var u=0;u<e;++u){var f=n[c+u],h=a[u];null!=h&&(("function"!=typeof o||o(f))&&(i||h.computeRange)&&f!==1/0&&f!==-1/0&&(!0===h.x&&(f<s.xmin&&(s.xmin=f),f>s.xmax&&(s.xmax=f)),!0===h.y&&(f<s.ymin&&(s.ymin=f),f>s.ymax&&(s.ymax=f))))}return s},y.adjustSeriesDataRange=function(t,i){if(t.bars.show){var o,n=t.bars.barWidth[1];t.datapoints&&t.datapoints.points&&!n&&function(t){var i=[],o=t.datapoints.pointsize,n=Number.MAX_VALUE;t.datapoints.points.length<=o&&(n=1);for(var e=t.bars.horizontal?1:0;e<t.datapoints.points.length;e+=o)isFinite(t.datapoints.points[e])&&null!==t.datapoints.points[e]&&i.push(t.datapoints.points[e]);(i=i.filter((function(t,i,o){return o.indexOf(t)===i}))).sort((function(t,i){return t-i}));for(e=1;e<i.length;e++){var a=Math.abs(i[e]-i[e-1]);a<n&&isFinite(a)&&(n=a)}"number"==typeof t.bars.barWidth?t.bars.barWidth=t.bars.barWidth*n:t.bars.barWidth[0]=t.bars.barWidth[0]*n}(t);var e=t.bars.barWidth[0]||t.bars.barWidth;switch(t.bars.align){case"left":o=0;break;case"right":o=-e;break;default:o=-e/2}t.bars.horizontal?(i.ymin+=o,i.ymax+=o+e):(i.xmin+=o,i.xmax+=o+e)}if(t.bars.show&&t.bars.zero||t.lines.show&&t.lines.zero){t.datapoints.pointsize<=2&&(i.ymin=Math.min(0,i.ymin),i.ymax=Math.max(0,i.ymax))}return i},y.findNearbyItem=function(t,i,o,n,e){for(var a,r=null,l=n*n+1,c=s.length-1;c>=0;--c)if(o(c)){var u=s[c];if(!u.datapoints)return;if(u.lines.show||u.points.show){var f=Q(u,t,i,n,l,e);f&&(l=f.distance,r=[c,f.dataIndex])}if(u.bars.show&&!r){var h=$(u,t,i);h>=0&&(r=[c,h])}}if(r){c=r[0],a=r[1];var d=s[c].datapoints.pointsize;return{datapoint:s[c].datapoints.points.slice(a*d,(a+1)*d),dataIndex:a,series:s[c],seriesIndex:c}}return null},y.findNearbyInterpolationPoint=function(t,i,o){var n,e,a,r,l,c,u,f=Number.MAX_VALUE;for(n=0;n<s.length;++n){if(!o(n))continue;var h=s[n].datapoints.points;c=s[n].datapoints.pointsize;const g=h[h.length-c]<h[0]?function(t,i){return t>i}:function(t,i){return i>t};if(!g(t,h[0])){for(e=c;e<h.length&&!g(t,h[e]);e+=c);var d=h[e-c],p=h[e-c+1],m=h[e],x=h[e+1];void 0!==d&&void 0!==m&&void 0!==p&&void 0!==x&&(i=d===m?x:p+(x-p)*(t-d)/(m-d),r=Math.abs(s[n].xaxis.p2c(m)-t),l=Math.abs(s[n].yaxis.p2c(x)-i),(a=r*r+l*l)<f&&(f=a,u=[t,i,n,e]))}}if(u)return n=u[2],e=u[3],c=s[n].datapoints.pointsize,h=s[n].datapoints.points,d=h[e-c],p=h[e-c+1],m=h[e],x=h[e+1],{datapoint:[u[0],u[1]],leftPoint:[d,p],rightPoint:[m,x],seriesIndex:n};return null},y.computeValuePrecision=R,y.computeTickSize=j,y.addEventHandler=function(t,i,o,n){var e=o+t,a=w[e]||[];a.push({event:t,handler:i,eventHolder:o,priority:n}),a.sort((t,i)=>i.priority-t.priority),a.forEach(t=>{t.eventHolder.unbind(t.event,t.handler),t.eventHolder.bind(t.event,t.handler)}),w[e]=a},y.hooks=k;var S=t.plot.uiConstants.MINOR_TICKS_COUNT_CONSTANT,T=t.plot.uiConstants.TICK_LENGTH_CONSTANT;function N(t,i){i=[y].concat(i);for(var o=0;o<t.length;++o)t[o].apply(this,i)}function W(i){var o=s;s=function(i){for(var o=[],n=0;n<i.length;++n){var e=t.extend(!0,{},c.series);null!=i[n].data?(e.data=i[n].data,delete i[n].data,t.extend(!0,e,i[n]),i[n].data=e.data):e.data=i[n],o.push(e)}return o}(i),function(){var i,o=s.length,n=-1;for(i=0;i<s.length;++i){var e=s[i].color;null!=e&&(o--,"number"==typeof e&&e>n&&(n=e))}o<=n&&(o=n+1);var a,r=[],l=c.colors,u=l.length,f=0,h=Math.max(0,s.length-o);for(i=0;i<o;i++)a=t.color.parse(l[(h+i)%u]||"#666"),i%u==0&&i&&(f=f>=0?f<.5?-f-.2:0:-f),r[i]=a.scale("rgb",1+f);var d,p=0;for(i=0;i<s.length;++i){if(null==(d=s[i]).color?(d.color=r[p].toString(),++p):"number"==typeof d.color&&(d.color=r[d.color].toString()),null==d.lines.show){var g,b=!0;for(g in d)if(d[g]&&d[g].show){b=!1;break}b&&(d.lines.show=!0)}null==d.lines.zero&&(d.lines.zero=!!d.lines.fill),d.xaxis=I(m,C(d,"x")),d.yaxis=I(x,C(d,"y"))}}(),function(i){var o,n,e,a,r,l,c,u,f,h,d,p,m=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY;function g(t,i,o){i<t.datamin&&i!==-1/0&&(t.datamin=i),o>t.datamax&&o!==1/0&&(t.datamax=o)}function b(t,i){return t&&t[i]&&t[i].datapoints&&t[i].datapoints.points?t[i].datapoints.points:[]}for(t.each(z(),(function(t,i){!0!==i.options.growOnly?(i.datamin=m,i.datamax=x):(void 0===i.datamin&&(i.datamin=m),void 0===i.datamax&&(i.datamax=x)),i.used=!1})),o=0;o<s.length;++o)(r=s[o]).datapoints={points:[]},0===r.datapoints.points.length&&(r.datapoints.points=b(i,o)),N(k.processRawData,[r,r.data,r.datapoints]);for(o=0;o<s.length;++o){if(r=s[o],d=r.data,!(p=r.datapoints.format)){if((p=[]).push({x:!0,y:!1,number:!0,required:!0,computeRange:"none"!==r.xaxis.options.autoScale,defaultValue:null}),p.push({x:!1,y:!0,number:!0,required:!0,computeRange:"none"!==r.yaxis.options.autoScale,defaultValue:null}),r.stack||r.bars.show||r.lines.show&&r.lines.fill)(null!=r.datapoints.pointsize?r.datapoints.pointsize:r.data&&r.data[0]&&r.data[0].length?r.data[0].length:3)>2&&p.push({x:!1,y:!0,number:!0,required:!1,computeRange:"none"!==r.yaxis.options.autoScale,defaultValue:0});r.datapoints.format=p}if(r.xaxis.used=r.yaxis.used=!0,null==r.datapoints.pointsize){r.datapoints.pointsize=p.length,c=r.datapoints.pointsize,l=r.datapoints.points;r.lines.show&&r.lines.steps;for(n=e=0;n<d.length;++n,e+=c){var v=null==(h=d[n]);if(!v)for(a=0;a<c;++a)u=h[a],(f=p[a])&&(f.number&&null!=u&&(u=+u,isNaN(u)&&(u=null)),null==u&&(f.required&&(v=!0),null!=f.defaultValue&&(u=f.defaultValue))),l[e+a]=u;if(v)for(a=0;a<c;++a)null!=(u=l[e+a])&&(f=p[a]).computeRange&&(f.x&&g(r.xaxis,u,u),f.y&&g(r.yaxis,u,u)),l[e+a]=null}l.length=e}}for(o=0;o<s.length;++o)r=s[o],N(k.processDatapoints,[r,r.datapoints]);for(o=0;o<s.length;++o)if(r=s[o],!(p=r.datapoints.format).every((function(t){return!t.computeRange}))){var w=y.adjustSeriesDataRange(r,y.computeRangeForDataSeries(r));N(k.adjustSeriesDataRange,[r,w]),g(r.xaxis,w.xmin,w.xmax),g(r.yaxis,w.ymin,w.ymax)}t.each(z(),(function(t,i){i.datamin===m&&(i.datamin=null),i.datamax===x&&(i.datamax=null)}))}(o)}function C(t,i){var o=t[i+"axis"];return"object"==typeof o&&(o=o.n),"number"!=typeof o&&(o=1),o}function z(){return m.concat(x).filter((function(t){return t}))}function I(i,o){return i[o-1]||(i[o-1]={n:o,direction:i===m?"x":"y",options:t.extend(!0,{},i===m?c.xaxis:c.yaxis)}),i[o-1]}function L(){M&&clearTimeout(M),N(k.shutdown,[h])}function D(i){function o(t){return t}var n,e,a=i.options.transform||o,r=i.options.inverseTransform;"x"===i.direction?(n=isFinite(a(i.max)-a(i.min))?i.scale=b/Math.abs(a(i.max)-a(i.min)):i.scale=1/Math.abs(t.plot.saturated.delta(a(i.min),a(i.max),b)),e=Math.min(a(i.max),a(i.min))):(n=-(n=isFinite(a(i.max)-a(i.min))?i.scale=v/Math.abs(a(i.max)-a(i.min)):i.scale=1/Math.abs(t.plot.saturated.delta(a(i.min),a(i.max),v))),e=Math.max(a(i.max),a(i.min))),i.p2c=a===o?function(t){return isFinite(t-e)?(t-e)*n:(t/4-e/4)*n*4}:function(t){var i=a(t);return isFinite(i-e)?(i-e)*n:(i/4-e/4)*n*4},i.c2p=r?function(t){return r(e+t/n)}:function(t){return e+t/n}}function F(i){N(k.axisReserveSpace,[i]);var o=i.labelWidth,n=i.labelHeight,e=i.options.position,a="x"===i.direction,r=i.options.tickLength,l=i.options.showTicks,s=i.options.showMinorTicks,f=i.options.gridLines,h=c.grid.axisMargin,d=c.grid.labelMargin,p=!0,b=!0,v=!1;t.each(a?m:x,(function(t,o){o&&(o.show||o.reserveSpace)&&(o===i?v=!0:o.options.position===e&&(v?b=!1:p=!1))})),b&&(h=0),null==r&&(r=T),null==l&&(l=!0),null==s&&(s=!0),null==f&&(f=!!p),isNaN(+r)||(d+=l?+r:0),a?(n+=d,"bottom"===e?(g.bottom+=n+h,i.box={top:u.height-g.bottom,height:n}):(i.box={top:g.top+h,height:n},g.top+=n+h)):(o+=d,"left"===e?(i.box={left:g.left+h,width:o},g.left+=o+h):(g.right+=o+h,i.box={left:u.width-g.right,width:o})),i.position=e,i.tickLength=r,i.showMinorTicks=s,i.showTicks=l,i.gridLines=f,i.box.padding=d,i.innermost=p}function A(t,i,o){"x"===t.direction?("bottom"===t.position&&o(i.bottom)&&(t.box.top-=Math.ceil(i.bottom)),"top"===t.position&&o(i.top)&&(t.box.top+=Math.ceil(i.top))):("left"===t.position&&o(i.left)&&(t.box.left+=Math.ceil(i.left)),"right"===t.position&&o(i.right)&&(t.box.left-=Math.ceil(i.right)))}function P(i){var e,a,r=z(),l=c.grid.show;for(a in g)g[a]=0;for(a in N(k.processOffset,[g]),g)"object"==typeof c.grid.borderWidth?g[a]+=l?c.grid.borderWidth[a]:0:g[a]+=l?c.grid.borderWidth:0;if(t.each(r,(function(o,e){var a=e.options;e.show=null==a.show?e.used:a.show,e.reserveSpace=null==a.reserveSpace?e.show:a.reserveSpace,function(t){var i=t.options;t.tickFormatter||("function"==typeof i.tickFormatter?t.tickFormatter=function(){var t=Array.prototype.slice.call(arguments);return""+i.tickFormatter.apply(null,t)}:t.tickFormatter=n)}(e),N(k.setRange,[e,i]),function(i,o){var n="number"==typeof i.options.min?i.options.min:i.min,e="number"==typeof i.options.max?i.options.max:i.max,a=i.options.offset;o&&(O(i),n=i.autoScaledMin,e=i.autoScaledMax);if(n=(null!=n?n:-1)+(a.below||0),e=(null!=e?e:1)+(a.above||0),n>e){var r=n;n=e,e=r,i.options.offset={above:0,below:0}}i.min=t.plot.saturated.saturate(n),i.max=t.plot.saturated.saturate(e)}(e,i)})),l){b=u.width-g.left-g.right,v=u.height-g.bottom-g.top;var f=t.grep(r,(function(t){return t.show||t.reserveSpace}));for(t.each(f,(function(i,n){!function(i){var n,e=i.options;n=E(i.direction,u,e.ticks),i.delta=t.plot.saturated.delta(i.min,i.max,n);var a=y.computeValuePrecision(i.min,i.max,i.direction,n,e.tickDecimals);i.tickDecimals=Math.max(0,null!=e.tickDecimals?e.tickDecimals:a),i.tickSize=function(t,i,o,n,e){var a;a="number"==typeof n.ticks&&n.ticks>0?n.ticks:.3*Math.sqrt("x"===o?u.width:u.height);var r=j(t,i,a,e);null!=n.minTickSize&&r<n.minTickSize&&(r=n.minTickSize);return n.tickSize||r}(i.min,i.max,i.direction,e,e.tickDecimals),i.tickGenerator||("function"==typeof e.tickGenerator?i.tickGenerator=e.tickGenerator:i.tickGenerator=o);if(null!=e.alignTicksWithAxis){var r=("x"===i.direction?m:x)[e.alignTicksWithAxis-1];if(r&&r.used&&r!==i){var l=i.tickGenerator(i,y);if(l.length>0&&(null==e.min&&(i.min=Math.min(i.min,l[0])),null==e.max&&l.length>1&&(i.max=Math.max(i.max,l[l.length-1]))),i.tickGenerator=function(t){var i,o,n=[];for(o=0;o<r.ticks.length;++o)i=(r.ticks[o].v-r.min)/(r.max-r.min),i=t.min+i*(t.max-t.min),n.push(i);return n},!i.mode&&null==e.tickDecimals){var s=Math.max(0,1-Math.floor(Math.log(i.delta)/Math.LN10)),c=i.tickGenerator(i,y);c.length>1&&/\..*0$/.test((c[1]-c[0]).toFixed(s))||(i.tickDecimals=s)}}}}(n),function(i){var o,n,e=i.options.ticks,a=[];null==e||"number"==typeof e&&e>0?a=i.tickGenerator(i,y):e&&(a=t.isFunction(e)?e(i):e);for(i.ticks=[],o=0;o<a.length;++o){var r=null,l=a[o];"object"==typeof l?(n=+l[0],l.length>1&&(r=l[1])):n=+l,isNaN(n)||i.ticks.push(H(n,r,i,"major"))}}(n),function(t,i,o){"loose"===t.options.autoScale&&i.length>0&&function(t){return t.some(t=>t.datapoints.points.length>0)}(o)&&(t.min=Math.min(t.min,i[0].v),t.max=Math.max(t.max,i[i.length-1].v))}(n,n.ticks,s),D(n),function(t,i){(function(t,i){if("endpoints"===t.options.showTickLabels)return!0;if("all"===t.options.showTickLabels){var o=i.filter((function(i){return i.xaxis===t})),n=o.some((function(t){return!t.bars.show}));return 0===o.length||n}if("major"===t.options.showTickLabels||"none"===t.options.showTickLabels)return!1})(t,i)&&(t.ticks.unshift(H(t.min,null,t,"min")),t.ticks.push(H(t.max,null,t,"max")))}(n,s),function(t){for(var i=t.options,o="none"!==i.showTickLabels&&t.ticks?t.ticks:[],n="major"===i.showTickLabels||"all"===i.showTickLabels,e="endpoints"===i.showTickLabels||"all"===i.showTickLabels,a=i.labelWidth||0,r=i.labelHeight||0,l=t.direction+"Axis "+t.direction+t.n+"Axis",s="flot-"+t.direction+"-axis flot-"+t.direction+t.n+"-axis "+l,c=i.font||"flot-tick-label tickLabel",f=0;f<o.length;++f){var h=o[f],d=h.label;if(h.label&&!(!1===n&&f>0&&f<o.length-1)&&(!1!==e||0!==f&&f!==o.length-1)){"object"==typeof h.label&&(d=h.label.name);var p=u.getTextInfo(s,d,c);a=Math.max(a,p.width),r=Math.max(r,p.height)}}t.labelWidth=i.labelWidth||a,t.labelHeight=i.labelHeight||r}(n)})),e=f.length-1;e>=0;--e)F(f[e]);!function(){var i,o=c.grid.minBorderMargin;if(null==o)for(o=0,i=0;i<s.length;++i)o=Math.max(o,2*(s[i].points.radius+s[i].points.lineWidth/2));var n,e={},a={left:o,right:o,top:o,bottom:o};for(n in t.each(z(),(function(t,i){i.reserveSpace&&i.ticks&&i.ticks.length&&("x"===i.direction?(a.left=Math.max(a.left,i.labelWidth/2),a.right=Math.max(a.right,i.labelWidth/2)):(a.bottom=Math.max(a.bottom,i.labelHeight/2),a.top=Math.max(a.top,i.labelHeight/2)))})),a)e[n]=a[n]-g[n];t.each(m.concat(x),(function(t,i){A(i,e,(function(t){return t>0}))})),g.left=Math.ceil(Math.max(a.left,g.left)),g.right=Math.ceil(Math.max(a.right,g.right)),g.top=Math.ceil(Math.max(a.top,g.top)),g.bottom=Math.ceil(Math.max(a.bottom,g.bottom))}(),t.each(f,(function(t,i){!function(t){"x"===t.direction?(t.box.left=g.left-t.labelWidth/2,t.box.width=u.width-g.left-g.right+t.labelWidth):(t.box.top=g.top-t.labelHeight/2,t.box.height=u.height-g.bottom-g.top+t.labelHeight)}(i)}))}if(c.grid.margin){for(a in g){var h=c.grid.margin||0;g[a]+="number"==typeof h?h:h[a]||0}t.each(m.concat(x),(function(t,i){A(i,c.grid.margin,(function(t){return null!=t}))}))}b=u.width-g.left-g.right,v=u.height-g.bottom-g.top,t.each(r,(function(t,i){D(i)})),l&&t.each(z(),(function(t,i){var o,n,e,a,r,l,s,c=i.box,f=i.direction+"Axis "+i.direction+i.n+"Axis",h="flot-"+i.direction+"-axis flot-"+i.direction+i.n+"-axis "+f,d=i.options.font||"flot-tick-label tickLabel",p={x:NaN,y:NaN,width:NaN,height:NaN},m=[],x=function(t,o){return!t||!t.label||t.v<i.min||t.v>i.max?p:(l=u.getTextInfo(h,t.label,d),"x"===i.direction?(a="center",n=g.left+i.p2c(t.v),"bottom"===i.position?e=c.top+c.padding-i.boxPosition.centerY:(e=c.top+c.height-c.padding+i.boxPosition.centerY,r="bottom"),s={x:n-l.width/2-3,y:e-3,width:l.width+6,height:l.height+6}):(r="middle",e=g.top+i.p2c(t.v),"left"===i.position?(n=c.left+c.width-c.padding-i.boxPosition.centerX,a="right"):n=c.left+c.padding+i.boxPosition.centerX,s={x:n-l.width/2-3,y:e-3,width:l.width+6,height:l.height+6}),function(t,i){return i.some((function(i){return o=t.x,n=t.y,e=t.x+t.width,a=t.y+t.height,r=i.x,l=i.y,s=i.x+i.width,c=i.y+i.height,(o<=r&&r<=e||r<=o&&o<=s)&&(n<=l&&l<=a||l<=n&&n<=c);var o,n,e,a,r,l,s,c}))}(s,o)?p:(u.addText(h,n,e,t.label,d,null,null,a,r),s))};if(u.removeText(h),N(k.drawAxis,[i,u]),i.show)switch(i.options.showTickLabels){case"none":break;case"endpoints":m.push(x(i.ticks[0],m)),m.push(x(i.ticks[i.ticks.length-1],m));break;case"major":for(m.push(x(i.ticks[0],m)),m.push(x(i.ticks[i.ticks.length-1],m)),o=1;o<i.ticks.length-1;++o)m.push(x(i.ticks[o],m));break;case"all":for(m.push(x(i.ticks[0],[])),m.push(x(i.ticks[i.ticks.length-1],m)),o=1;o<i.ticks.length-1;++o)m.push(x(i.ticks[o],m))}})),N(k.setupGrid,[])}function O(i){var o,n=i.options,e=n.min,a=n.max,r=i.datamin,l=i.datamax;switch(n.autoScale){case"none":e=+(null!=n.min?n.min:r),a=+(null!=n.max?n.max:l);break;case"loose":if(null!=r&&null!=l){e=r,a=l,o=t.plot.saturated.saturate(a-e);var s="number"==typeof n.autoScaleMargin?n.autoScaleMargin:.02;e=t.plot.saturated.saturate(e-o*s),a=t.plot.saturated.saturate(a+o*s),e<0&&r>=0&&(e=0)}else e=n.min,a=n.max;break;case"exact":e=null!=r?r:n.min,a=null!=l?l:n.max;break;case"sliding-window":l>a&&(a=l,e=Math.max(l-(n.windowSize||100),e))}var c=function(t,i){var o=void 0===t?null:t,n=void 0===i?null:i;if(0===n-o){var e=0===n?1:.01,a=null;null==o&&(a-=e),null!=n&&null==o||(n+=e),null!=a&&(o=a)}return{min:o,max:n}}(e,a);e=c.min,a=c.max,!0===n.growOnly&&"none"!==n.autoScale&&"sliding-window"!==n.autoScale&&(e=e<r?e:null!==r?r:e,a=a>l?a:null!==l?l:a),i.autoScaledMin=e,i.autoScaledMax=a}function R(i,o,n,e,a){var r=E(n,u,e),l=t.plot.saturated.delta(i,o,r),s=-Math.floor(Math.log(l)/Math.LN10);a&&s>a&&(s=a);var c=l/parseFloat("1e"+-s);return c>2.25&&c<3&&s+1<=a&&++s,isFinite(s)?s:0}function j(i,o,n,e){var a=t.plot.saturated.delta(i,o,n),r=-Math.floor(Math.log(a)/Math.LN10);e&&r>e&&(r=e);var l,s=parseFloat("1e"+-r),c=a/s;return c<1.5?l=1:c<3?(l=2,c>2.25&&(null==e||r+1<=e)&&(l=2.5)):l=c<7.5?5:10,l*=s}function E(t,i,o){return"number"==typeof o&&o>0?o:.3*Math.sqrt("x"===t?i.width:i.height)}function H(t,i,o,n){if(null===i)switch(n){case"min":case"max":var e=function(t,i){var o=Math.floor(i.p2c(t)),n="x"===i.direction?o+1:o-1,e=i.c2p(o),a=i.c2p(n);return R(e,a,i.direction,1)}(t,o);isFinite(e),i=o.tickFormatter(t,o,e,y);break;case"major":i=o.tickFormatter(t,o,void 0,y)}return{v:t,label:i}}function G(){u.clear(),N(k.drawBackground,[d]);var t=c.grid;t.show&&t.backgroundColor&&(d.save(),d.translate(g.left,g.top),d.fillStyle=tt(c.grid.backgroundColor,v,0,"rgba(255, 255, 255, 0)"),d.fillRect(0,0,b,v),d.restore()),t.show&&!t.aboveData&&U();for(var i=0;i<s.length;++i)N(k.drawSeries,[d,s[i],i,tt]),K(s[i]);N(k.draw,[d]),t.show&&t.aboveData&&U(),u.render(),J()}function V(t,i){for(var o,n,e,a,r=z(),l=0;l<r.length;++l)if((o=r[l]).direction===i&&(t[a=i+o.n+"axis"]||1!==o.n||(a=i+"axis"),t[a])){n=t[a].from,e=t[a].to;break}if(t[a]||(o="x"===i?m[0]:x[0],n=t[i+"1"],e=t[i+"2"]),null!=n&&null!=e&&n>e){var s=n;n=e,e=s}return{from:n,to:e,axis:o}}function _(t){var i=t.box,o=0,n=0;return"x"===t.direction?(o=0,n=i.top-g.top+("top"===t.position?i.height:0)):(n=0,o=i.left-g.left+("left"===t.position?i.width:0)+t.boxPosition.centerX),{x:o,y:n}}function X(t,i){return t%2!=0?Math.floor(i)+.5:i}function Y(t){d.lineWidth=1;var i=_(t),o=i.x,n=i.y;if(t.show){var e=0,a=0;d.strokeStyle=t.options.color,d.beginPath(),"x"===t.direction?e=b+1:a=v+1,"x"===t.direction?n=X(d.lineWidth,n):o=X(d.lineWidth,o),d.moveTo(o,n),d.lineTo(o+e,n+a),d.stroke()}}function B(t){var i=t.tickLength,o=t.showMinorTicks,n=S,e=_(t),a=e.x,r=e.y,l=0;for(d.strokeStyle=t.options.color,d.beginPath(),l=0;l<t.ticks.length;++l){var s,c=t.ticks[l].v,u=0,f=0,h=0,p=0;if(!isNaN(c)&&c>=t.min&&c<=t.max&&("x"===t.direction?(a=t.p2c(c),f=i,"top"===t.position&&(f=-f)):(r=t.p2c(c),u=i,"left"===t.position&&(u=-u)),"x"===t.direction?a=X(d.lineWidth,a):r=X(d.lineWidth,r),d.moveTo(a,r),d.lineTo(a+u,r+f)),!0===o&&l<t.ticks.length-1){var m=t.ticks[l].v,x=(t.ticks[l+1].v-m)/(n+1);for(s=1;s<=n;s++){if("x"===t.direction){if(p=i/2,a=X(d.lineWidth,t.p2c(m+s*x)),"top"===t.position&&(p=-p),a<0||a>b)continue}else if(h=i/2,r=X(d.lineWidth,t.p2c(m+s*x)),"left"===t.position&&(h=-h),r<0||r>v)continue;d.moveTo(a,r),d.lineTo(a+h,r+p)}}}d.stroke()}function q(t){var i,o,n;for(d.strokeStyle=c.grid.tickColor,d.beginPath(),i=0;i<t.ticks.length;++i){var e=t.ticks[i].v,a=0,r=0,l=0,s=0;isNaN(e)||e<t.min||e>t.max||(o=e,n=void 0,(!("object"==typeof(n=c.grid.borderWidth)&&n[t.position]>0||n>0)||o!==t.min&&o!==t.max)&&("x"===t.direction?(l=t.p2c(e),s=v,r=-v):(l=0,s=t.p2c(e),a=b),"x"===t.direction?l=X(d.lineWidth,l):s=X(d.lineWidth,s),d.moveTo(l,s),d.lineTo(l+a,s+r)))}d.stroke()}function U(){var i,o;d.save(),d.translate(g.left,g.top),function(){var i,o,n=c.grid.markings;if(n)for(t.isFunction(n)&&((i=y.getAxes()).xmin=i.xaxis.min,i.xmax=i.xaxis.max,i.ymin=i.yaxis.min,i.ymax=i.yaxis.max,n=n(i)),o=0;o<n.length;++o){var e=n[o],a=V(e,"x"),r=V(e,"y");if(null==a.from&&(a.from=a.axis.min),null==a.to&&(a.to=a.axis.max),null==r.from&&(r.from=r.axis.min),null==r.to&&(r.to=r.axis.max),!(a.to<a.axis.min||a.from>a.axis.max||r.to<r.axis.min||r.from>r.axis.max)){a.from=Math.max(a.from,a.axis.min),a.to=Math.min(a.to,a.axis.max),r.from=Math.max(r.from,r.axis.min),r.to=Math.min(r.to,r.axis.max);var l=a.from===a.to,s=r.from===r.to;if(!l||!s)if(a.from=Math.floor(a.axis.p2c(a.from)),a.to=Math.floor(a.axis.p2c(a.to)),r.from=Math.floor(r.axis.p2c(r.from)),r.to=Math.floor(r.axis.p2c(r.to)),l||s){var u=e.lineWidth||c.grid.markingsLineWidth,f=u%2?.5:0;d.beginPath(),d.strokeStyle=e.color||c.grid.markingsColor,d.lineWidth=u,l?(d.moveTo(a.to+f,r.from),d.lineTo(a.to+f,r.to)):(d.moveTo(a.from,r.to+f),d.lineTo(a.to,r.to+f)),d.stroke()}else d.fillStyle=e.color||c.grid.markingsColor,d.fillRect(a.from,r.to,a.to-a.from,r.from-r.to)}}}(),i=z(),o=c.grid.borderWidth;for(var n=0;n<i.length;++n){var e=i[n];e.show&&(Y(e),!0===e.showTicks&&B(e),!0===e.gridLines&&q(e))}o&&function(){var t=c.grid.borderWidth,i=c.grid.borderColor;"object"==typeof t||"object"==typeof i?("object"!=typeof t&&(t={top:t,right:t,bottom:t,left:t}),"object"!=typeof i&&(i={top:i,right:i,bottom:i,left:i}),t.top>0&&(d.strokeStyle=i.top,d.lineWidth=t.top,d.beginPath(),d.moveTo(0-t.left,0-t.top/2),d.lineTo(b,0-t.top/2),d.stroke()),t.right>0&&(d.strokeStyle=i.right,d.lineWidth=t.right,d.beginPath(),d.moveTo(b+t.right/2,0-t.top),d.lineTo(b+t.right/2,v),d.stroke()),t.bottom>0&&(d.strokeStyle=i.bottom,d.lineWidth=t.bottom,d.beginPath(),d.moveTo(b+t.right,v+t.bottom/2),d.lineTo(0,v+t.bottom/2),d.stroke()),t.left>0&&(d.strokeStyle=i.left,d.lineWidth=t.left,d.beginPath(),d.moveTo(0-t.left/2,v+t.bottom),d.lineTo(0-t.left/2,0),d.stroke())):(d.lineWidth=t,d.strokeStyle=c.grid.borderColor,d.strokeRect(-t/2,-t/2,b+t,v+t))}(),d.restore()}function K(i){i.lines.show&&t.plot.drawSeries.drawSeriesLines(i,d,g,b,v,y.drawSymbol,tt),i.bars.show&&t.plot.drawSeries.drawSeriesBars(i,d,g,b,v,y.drawSymbol,tt),i.points.show&&t.plot.drawSeries.drawSeriesPoints(i,d,g,b,v,y.drawSymbol,tt)}function Q(t,i,o,n,e,a){var r=t.xaxis.c2p(i),l=t.yaxis.c2p(o),s=n/t.xaxis.scale,c=n/t.yaxis.scale,u=t.datapoints.points,f=t.datapoints.pointsize;t.xaxis.options.inverseTransform&&(s=Number.MAX_VALUE),t.yaxis.options.inverseTransform&&(c=Number.MAX_VALUE);for(var h=null,d=0;d<u.length;d+=f){var p=u[d],m=u[d+1];if(null!=p&&!(p-r>s||p-r<-s||m-l>c||m-l<-c)){var x=Math.abs(t.xaxis.p2c(p)-i),g=Math.abs(t.yaxis.p2c(m)-o),b=a?a(x,g):x*x+g*g;b<e&&(e=b,h={dataIndex:d/f,distance:b})}}return h}function $(t,i,o){var n,e,a=t.bars.barWidth[0]||t.bars.barWidth,r=t.xaxis.c2p(i),l=t.yaxis.c2p(o),s=t.datapoints.points,c=t.datapoints.pointsize;switch(t.bars.align){case"left":n=0;break;case"right":n=-a;break;default:n=-a/2}e=n+a;for(var u=t.bars.fillTowards||0,f=u>t.yaxis.min?Math.min(t.yaxis.max,u):t.yaxis.min,h=-1,d=0;d<s.length;d+=c){var p=s[d],m=s[d+1];null!=p&&((t.bars.horizontal?r<=Math.max(f,p)&&r>=Math.min(f,p)&&l>=m+n&&l<=m+e:r>=p+n&&r<=p+e&&l>=Math.min(f,m)&&l<=Math.max(f,m))&&(h=d/c))}return h}function J(){var t=c.interaction.redrawOverlayInterval;-1!==t?M||(M=setTimeout((function(){Z(y)}),t)):Z()}function Z(t){if(M=null,p){f.clear(),N(k.drawOverlay,[p,f]);var i=new CustomEvent("onDrawingDone");t.getEventHolder().dispatchEvent(i),t.getPlaceholder().trigger("drawingdone")}}function tt(i,o,n,e){if("string"==typeof i)return i;for(var a=d.createLinearGradient(0,n,0,o),r=0,l=i.colors.length;r<l;++r){var s=i.colors[r];if("string"!=typeof s){var c=t.color.parse(e);null!=s.brightness&&(c=c.scale("rgb",s.brightness)),null!=s.opacity&&(c.a*=s.opacity),s=c.toString()}a.addColorStop(r/(l-1),s)}return a}!function(){for(var o={Canvas:i},n=0;n<l.length;++n){var e=l[n];e.init(y,o),e.options&&t.extend(!0,c,e.options)}}(),function(){e.css("padding",0).children().filter((function(){return!t(this).hasClass("flot-overlay")&&!t(this).hasClass("flot-base")})).remove(),"static"===e.css("position")&&e.css("position","relative");u=new i("flot-base",e[0]),f=new i("flot-overlay",e[0]),d=u.context,p=f.context,h=t(f.element).unbind();var o=e.data("plot");o&&(o.shutdown(),f.clear());e.data("plot",y)}(),function(i){t.extend(!0,c,i),i&&i.colors&&(c.colors=i.colors);null==c.xaxis.color&&(c.xaxis.color=t.color.parse(c.grid.color).scale("a",.22).toString());null==c.yaxis.color&&(c.yaxis.color=t.color.parse(c.grid.color).scale("a",.22).toString());null==c.xaxis.tickColor&&(c.xaxis.tickColor=c.grid.tickColor||c.xaxis.color);null==c.yaxis.tickColor&&(c.yaxis.tickColor=c.grid.tickColor||c.yaxis.color);null==c.grid.borderColor&&(c.grid.borderColor=c.grid.color);null==c.grid.tickColor&&(c.grid.tickColor=t.color.parse(c.grid.color).scale("a",.22).toString());var o,n,a,r=e.css("font-size"),l=r?+r.replace("px",""):13,s={style:e.css("font-style"),size:Math.round(.8*l),variant:e.css("font-variant"),weight:e.css("font-weight"),family:e.css("font-family")};for(a=c.xaxes.length||1,o=0;o<a;++o)(n=c.xaxes[o])&&!n.tickColor&&(n.tickColor=n.color),n=t.extend(!0,{},c.xaxis,n),c.xaxes[o]=n,n.font&&(n.font=t.extend({},s,n.font),n.font.color||(n.font.color=n.color),n.font.lineHeight||(n.font.lineHeight=Math.round(1.15*n.font.size)));for(a=c.yaxes.length||1,o=0;o<a;++o)(n=c.yaxes[o])&&!n.tickColor&&(n.tickColor=n.color),n=t.extend(!0,{},c.yaxis,n),c.yaxes[o]=n,n.font&&(n.font=t.extend({},s,n.font),n.font.color||(n.font.color=n.color),n.font.lineHeight||(n.font.lineHeight=Math.round(1.15*n.font.size)));for(o=0;o<c.xaxes.length;++o)I(m,o+1).options=c.xaxes[o];for(o=0;o<c.yaxes.length;++o)I(x,o+1).options=c.yaxes[o];for(var u in t.each(z(),(function(t,i){i.boxPosition=i.options.boxPosition||{centerX:0,centerY:0}})),k)c.hooks[u]&&c.hooks[u].length&&(k[u]=k[u].concat(c.hooks[u]));N(k.processOptions,[c])}(r),W(a),P(!0),G(),N(k.bindEvents,[h])}t.plot=function(i,o,n){return new r(t(i),o,n,t.plot.plugins)},t.plot.version="3.0.0",t.plot.plugins=[],t.fn.plot=function(i,o){return this.each((function(){t.plot(this,i,o)}))},t.plot.linearTickGenerator=o,t.plot.defaultTickFormatter=n,t.plot.expRepTickFormatter=e}(jQuery);