/* Highcharts JS v7.1.1 (2019-04-09) Boost module (c) 2010-2019 Highsoft AS Author: Torstein Honsi License: www.highcharts.com/license */ (function(g){"object"===typeof module&&module.exports?(g["default"]=g,module.exports=g):"function"===typeof define&&define.amd?define("highcharts/modules/boost",["highcharts"],function(t){g(t);g.Highcharts=t;return g}):g("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(g){function t(e,g,c,y){e.hasOwnProperty(g)||(e[g]=y.apply(null,c))}g=g?g._modules:{};t(g,"modules/boost/boostables.js",[],function(){return"area arearange column columnrange bar line scatter heatmap bubble treemap".split(" ")}); t(g,"modules/boost/boostable-map.js",[g["modules/boost/boostables.js"]],function(e){var g={};e.forEach(function(c){g[c]=1});return g});t(g,"modules/boost/wgl-shader.js",[g["parts/Globals.js"]],function(e){var g=e.pick;return function(c){function u(){v.length&&e.error("[highcharts boost] shader error - "+v.join("\n"))}function h(a,f){var b=c.createShader("vertex"===f?c.VERTEX_SHADER:c.FRAGMENT_SHADER);c.shaderSource(b,a);c.compileShader(b);return c.getShaderParameter(b,c.COMPILE_STATUS)?b:(v.push("when compiling "+ f+" shader:\n"+c.getShaderInfoLog(b)),!1)}function w(){function b(b){return c.getUniformLocation(a,b)}var e=h("#version 100\n#define LN10 2.302585092994046\nprecision highp float;\nattribute vec4 aVertexPosition;\nattribute vec4 aColor;\nvarying highp vec2 position;\nvarying highp vec4 vColor;\nuniform mat4 uPMatrix;\nuniform float pSize;\nuniform float translatedThreshold;\nuniform bool hasThreshold;\nuniform bool skipTranslation;\nuniform float xAxisTrans;\nuniform float xAxisMin;\nuniform float xAxisMinPad;\nuniform float xAxisPointRange;\nuniform float xAxisLen;\nuniform bool xAxisPostTranslate;\nuniform float xAxisOrdinalSlope;\nuniform float xAxisOrdinalOffset;\nuniform float xAxisPos;\nuniform bool xAxisCVSCoord;\nuniform bool xAxisIsLog;\nuniform bool xAxisReversed;\nuniform float yAxisTrans;\nuniform float yAxisMin;\nuniform float yAxisMinPad;\nuniform float yAxisPointRange;\nuniform float yAxisLen;\nuniform bool yAxisPostTranslate;\nuniform float yAxisOrdinalSlope;\nuniform float yAxisOrdinalOffset;\nuniform float yAxisPos;\nuniform bool yAxisCVSCoord;\nuniform bool yAxisIsLog;\nuniform bool yAxisReversed;\nuniform bool isBubble;\nuniform bool bubbleSizeByArea;\nuniform float bubbleZMin;\nuniform float bubbleZMax;\nuniform float bubbleZThreshold;\nuniform float bubbleMinSize;\nuniform float bubbleMaxSize;\nuniform bool bubbleSizeAbs;\nuniform bool isInverted;\nfloat bubbleRadius(){\nfloat value \x3d aVertexPosition.w;\nfloat zMax \x3d bubbleZMax;\nfloat zMin \x3d bubbleZMin;\nfloat radius \x3d 0.0;\nfloat pos \x3d 0.0;\nfloat zRange \x3d zMax - zMin;\nif (bubbleSizeAbs){\nvalue \x3d value - bubbleZThreshold;\nzMax \x3d max(zMax - bubbleZThreshold, zMin - bubbleZThreshold);\nzMin \x3d 0.0;\n}\nif (value \x3c zMin){\nradius \x3d bubbleZMin / 2.0 - 1.0;\n} else {\npos \x3d zRange \x3e 0.0 ? (value - zMin) / zRange : 0.5;\nif (bubbleSizeByArea \x26\x26 pos \x3e 0.0){\npos \x3d sqrt(pos);\n}\nradius \x3d ceil(bubbleMinSize + pos * (bubbleMaxSize - bubbleMinSize)) / 2.0;\n}\nreturn radius * 2.0;\n}\nfloat translate(float val,\nfloat pointPlacement,\nfloat localA,\nfloat localMin,\nfloat minPixelPadding,\nfloat pointRange,\nfloat len,\nbool cvsCoord,\nbool isLog,\nbool reversed\n){\nfloat sign \x3d 1.0;\nfloat cvsOffset \x3d 0.0;\nif (cvsCoord) {\nsign *\x3d -1.0;\ncvsOffset \x3d len;\n}\nif (isLog) {\nval \x3d log(val) / LN10;\n}\nif (reversed) {\nsign *\x3d -1.0;\ncvsOffset -\x3d sign * len;\n}\nreturn sign * (val - localMin) * localA + cvsOffset + \n(sign * minPixelPadding);\n}\nfloat xToPixels(float value) {\nif (skipTranslation){\nreturn value;// + xAxisPos;\n}\nreturn translate(value, 0.0, xAxisTrans, xAxisMin, xAxisMinPad, xAxisPointRange, xAxisLen, xAxisCVSCoord, xAxisIsLog, xAxisReversed);// + xAxisPos;\n}\nfloat yToPixels(float value, float checkTreshold) {\nfloat v;\nif (skipTranslation){\nv \x3d value;// + yAxisPos;\n} else {\nv \x3d translate(value, 0.0, yAxisTrans, yAxisMin, yAxisMinPad, yAxisPointRange, yAxisLen, yAxisCVSCoord, yAxisIsLog, yAxisReversed);// + yAxisPos;\nif (v \x3e yAxisLen) {\nv \x3d yAxisLen;\n}\n}\nif (checkTreshold \x3e 0.0 \x26\x26 hasThreshold) {\nv \x3d min(v, translatedThreshold);\n}\nreturn v;\n}\nvoid main(void) {\nif (isBubble){\ngl_PointSize \x3d bubbleRadius();\n} else {\ngl_PointSize \x3d pSize;\n}\nvColor \x3d aColor;\nif (skipTranslation \x26\x26 isInverted) {\ngl_Position \x3d uPMatrix * vec4(aVertexPosition.y + yAxisPos, aVertexPosition.x + xAxisPos, 0.0, 1.0);\n} else if (isInverted) {\ngl_Position \x3d uPMatrix * vec4(yToPixels(aVertexPosition.y, aVertexPosition.z) + yAxisPos, xToPixels(aVertexPosition.x) + xAxisPos, 0.0, 1.0);\n} else {\ngl_Position \x3d uPMatrix * vec4(xToPixels(aVertexPosition.x) + xAxisPos, yToPixels(aVertexPosition.y, aVertexPosition.z) + yAxisPos, 0.0, 1.0);\n}\n}", "vertex"),k=h("precision highp float;\nuniform vec4 fillColor;\nvarying highp vec2 position;\nvarying highp vec4 vColor;\nuniform sampler2D uSampler;\nuniform bool isCircle;\nuniform bool hasColor;\nvoid main(void) {\nvec4 col \x3d fillColor;\nvec4 tcol;\nif (hasColor) {\ncol \x3d vColor;\n}\nif (isCircle) {\ntcol \x3d texture2D(uSampler, gl_PointCoord.st);\ncol *\x3d tcol;\nif (tcol.r \x3c 0.0) {\ndiscard;\n} else {\ngl_FragColor \x3d col;\n}\n} else {\ngl_FragColor \x3d col;\n}\n}","fragment"); if(!e||!k)return a=!1,u(),!1;a=c.createProgram();c.attachShader(a,e);c.attachShader(a,k);c.linkProgram(a);if(!c.getProgramParameter(a,c.LINK_STATUS))return v.push(c.getProgramInfoLog(a)),u(),a=!1;c.useProgram(a);c.bindAttribLocation(a,0,"aVertexPosition");q=b("uPMatrix");K=b("pSize");D=b("fillColor");r=b("isBubble");n=b("bubbleSizeAbs");d=b("bubbleSizeByArea");R=b("uSampler");p=b("skipTranslation");f=b("isCircle");I=b("isInverted");return!0}function l(b,f){c&&a&&(b=m[b]=m[b]||c.getUniformLocation(a, b),c.uniform1f(b,f))}var m={},a,q,K,D,r,n,d,p,f,I,v=[],R;return c&&!w()?!1:{psUniform:function(){return K},pUniform:function(){return q},fillColorUniform:function(){return D},setBubbleUniforms:function(b,p,k){var e=b.options,v=Number.MAX_VALUE,h=-Number.MAX_VALUE;c&&a&&"bubble"===b.type&&(v=g(e.zMin,Math.min(v,Math.max(p,!1===e.displayNegative?e.zThreshold:-Number.MAX_VALUE))),h=g(e.zMax,Math.max(h,k)),c.uniform1i(r,1),c.uniform1i(f,1),c.uniform1i(d,"width"!==b.options.sizeBy),c.uniform1i(n,b.options.sizeByAbsoluteValue), l("bubbleZMin",v),l("bubbleZMax",h),l("bubbleZThreshold",b.options.zThreshold),l("bubbleMinSize",b.minPxSize),l("bubbleMaxSize",b.maxPxSize))},bind:function(){c&&a&&c.useProgram(a)},program:function(){return a},create:w,setUniform:l,setPMatrix:function(b){c&&a&&c.uniformMatrix4fv(q,!1,b)},setColor:function(b){c&&a&&c.uniform4f(D,b[0]/255,b[1]/255,b[2]/255,b[3])},setPointSize:function(b){c&&a&&c.uniform1f(K,b)},setSkipTranslation:function(b){c&&a&&c.uniform1i(p,!0===b?1:0)},setTexture:function(b){c&& a&&c.uniform1i(R,b)},setDrawAsCircle:function(b){c&&a&&c.uniform1i(f,b?1:0)},reset:function(){c&&a&&(c.uniform1i(r,0),c.uniform1i(f,0))},setInverted:function(b){c&&a&&c.uniform1i(I,b)},destroy:function(){c&&a&&(c.deleteProgram(a),a=!1)}}}});t(g,"modules/boost/wgl-vbuffer.js",[],function(){return function(e,g,c){function u(){h&&(e.deleteBuffer(h),w=h=!1);a=0;l=c||2;q=[]}var h=!1,w=!1,l=c||2,m=!1,a=0,q;return{destroy:u,bind:function(){if(!h)return!1;e.vertexAttribPointer(w,l,e.FLOAT,!1,0,0)},data:q, build:function(a,c,r){var n;q=a||[];if(!(q&&0!==q.length||m))return u(),!1;l=r||l;h&&e.deleteBuffer(h);m||(n=new Float32Array(q));h=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,h);e.bufferData(e.ARRAY_BUFFER,m||n,e.STATIC_DRAW);w=e.getAttribLocation(g.program(),c);e.enableVertexAttribArray(w);return!0},render:function(a,c,r){var g=m?m.length:q.length;if(!h||!g)return!1;if(!a||a>g||0>a)a=0;if(!c||c>g)c=g;e.drawArrays(e[(r||"points").toUpperCase()],a/l,(c-a)/l);return!0},allocate:function(c){a=-1;m= new Float32Array(4*c)},push:function(c,e,r,g){m&&(m[++a]=c,m[++a]=e,m[++a]=r,m[++a]=g)}}}});t(g,"modules/boost/wgl-renderer.js",[g["modules/boost/wgl-shader.js"],g["modules/boost/wgl-vbuffer.js"],g["parts/Globals.js"]],function(e,g,c){var u=c.win.document,h=c.merge,w=c.objEach,l=c.isNumber,m=c.some,a=c.Color,q=c.pick;return function(K){function t(a){var b,f;return a.isSeriesBoosting?(b=!!a.options.stacking,f=a.xData||a.options.xData||a.processedXData,b=(b?a.data:f||a.options.data).length,"treemap"=== a.type?b*=12:"heatmap"===a.type?b*=6:Z[a.type]&&(b*=2),b):0}function r(){k.clear(k.COLOR_BUFFER_BIT|k.DEPTH_BUFFER_BIT)}function n(a,b){function f(a){a&&(b.colorData.push(a[0]),b.colorData.push(a[1]),b.colorData.push(a[2]),b.colorData.push(a[3]))}function d(a,b,d,c,k){f(k);z.usePreallocated?J.push(a,b,d?1:0,c||1):(L.push(a),L.push(b),L.push(d?1:0),L.push(c||1))}function k(){b.segments.length&&(b.segments[b.segments.length-1].to=L.length)}function p(){b.segments.length&&b.segments[b.segments.length- 1].from===L.length||(k(),b.segments.push({from:L.length}))}function e(a,b,c,k,p){f(p);d(a+c,b);f(p);d(a,b);f(p);d(a,b+k);f(p);d(a,b+k);f(p);d(a+c,b+k);f(p);d(a+c,b)}function g(a,f){z.useGPUTranslations||(b.skipTranslation=!0,a.x=y.toPixels(a.x,!0),a.y=w.toPixels(a.y,!0));f?L=[a.x,a.y,0,2].concat(L):d(a.x,a.y,0,2)}var r=a.pointArrayMap&&"low,high"===a.pointArrayMap.join(","),O=a.chart,G=a.options,v=!!G.stacking,h=G.data,n=a.xAxis.getExtremes(),l=n.min,n=n.max,I=a.yAxis.getExtremes(),u=I.min,I=I.max, q=a.xData||G.xData||a.processedXData,R=a.yData||G.yData||a.processedYData,S=a.zData||G.zData||a.processedZData,w=a.yAxis,y=a.xAxis,K=a.chart.plotWidth,t=!q||0===q.length,H=G.connectNulls,x=a.points||!1,C=!1,D=!1,B,E,Q,h=v?a.data:q||h,q={x:Number.MAX_VALUE,y:0},N={x:-Number.MAX_VALUE,y:0},X=0,Y=!1,A,P,F=-1,U=!1,V=!1,aa,ta="undefined"===typeof O.index,ia=!1,ja=!1,M=!1,wa=Z[a.type],ka=!1,qa=!0,ra=!0,ba=G.zones||!1,W=!1,sa=G.threshold;if(!(G.boostData&&0b.node.levelDynamic)return 1;if(a.node.levelDynamicb.zMax&&(b.zMax=B[2]),B[2]b.zMax&&(b.zMax=S[F]),S[F]=l&&V<=n&&(ia=!0),U&&U>=l&&U<=n&&(ja=!0),r?(t&&(A=B.slice(1,3)),aa=A[0],A=A[1]):v&&(x=B.x,A=B.stackY,aa=A-B.y),null!==u&&"undefined"!==typeof u&&null!==I&&"undefined"!==typeof I&&(qa=A>=u&&A<=I),x>n&&N.x l&&(q.x=x,q.y=A),null!==A||!H)if(null!==A&&(qa||ia||ja)){if((V>=l||x>=l)&&(U<=n||x<=n)&&(ka=!0),ka||ia||ja){ba&&(M=W.rgba,m(ba,function(a,b){b=ba[b-1];if("undefined"!==typeof a.value&&A<=a.value){if(!b||A>=b.value)M=c.color(a.color).rgba;return!0}}),M[0]/=255,M[1]/=255,M[2]/=255);if(!z.useGPUTranslations&&(b.skipTranslation=!0,x=y.toPixels(x,!0),A=w.toPixels(A,!0),x>K&&"points"===b.drawMode))continue;if(wa){B=aa;if(!1===aa||"undefined"===typeof aa)B=0>A?A:0;r||v||(B=Math.max(null===sa?u:sa,u));z.useGPUTranslations|| (B=w.toPixels(B,!0));d(x,B,0,0,M)}b.hasMarkers&&ka&&!1!==C&&(a.closestPointRangePx=Math.min(a.closestPointRangePx,Math.abs(x-C)));!z.useGPUTranslations&&!z.usePreallocated&&C&&1>Math.abs(x-C)&&D&&1>Math.abs(A-D)?z.debug.showSkipSummary&&++X:(G.step&&!ra&&d(x,D,0,2,M),d(x,A,0,"bubble"===a.type?P||1:2,M),C=x,D=A,Y=!0,ra=!1)}}else p()}else p()}z.debug.showSkipSummary&&console.log("skipped points:",X);Y||!1===H||"line_strip"!==a.drawMode||(q.x-Number.MAX_VALUE&&g(N))}k()}} function d(){C=[];X.data=L=[];Y=[];J&&J.destroy()}function p(a){b&&(b.setUniform("xAxisTrans",a.transA),b.setUniform("xAxisMin",a.min),b.setUniform("xAxisMinPad",a.minPixelPadding),b.setUniform("xAxisPointRange",a.pointRange),b.setUniform("xAxisLen",a.len),b.setUniform("xAxisPos",a.pos),b.setUniform("xAxisCVSCoord",!a.horiz),b.setUniform("xAxisIsLog",a.isLog),b.setUniform("xAxisReversed",!!a.reversed))}function f(a){b&&(b.setUniform("yAxisTrans",a.transA),b.setUniform("yAxisMin",a.min),b.setUniform("yAxisMinPad", a.minPixelPadding),b.setUniform("yAxisPointRange",a.pointRange),b.setUniform("yAxisLen",a.len),b.setUniform("yAxisPos",a.pos),b.setUniform("yAxisCVSCoord",!a.horiz),b.setUniform("yAxisIsLog",a.isLog),b.setUniform("yAxisReversed",!!a.reversed))}function I(a,f){b.setUniform("hasThreshold",a);b.setUniform("translatedThreshold",f)}function v(e){if(e)H=e.chartWidth||800,y=e.chartHeight||400;else return!1;if(!(k&&H&&y&&b))return!1;z.debug.timeRendering&&console.time("gl rendering");k.canvas.width=H;k.canvas.height= y;b.bind();k.viewport(0,0,H,y);b.setPMatrix([2/H,0,0,0,0,-(2/y),0,0,0,0,-2,0,-1,1,-1,1]);12*((h.marker?h.marker.radius: 10)||10)),n=E[n&&n.symbol||d.series.symbol]||E.circle;if(!(0===d.segments.length||d.segmentslength&&d.segments[0].from===d.segments[0].to)){n.isReady&&(k.bindTexture(k.TEXTURE_2D,n.handle),b.setTexture(n.handle));e.styledMode?n=d.series.markerGroup&&d.series.markerGroup.getStyle("fill"):(n=d.series.pointAttribs&&d.series.pointAttribs().fill||d.series.color,h.colorByPoint&&(n=d.series.chart.options.colors[r]));d.series.fillOpacity&&h.fillOpacity&&(n=(new a(n)).setOpacity(q(h.fillOpacity,1)).get()); n=c.color(n).rgba;z.useAlpha||(n[3]=1);"lines"===d.drawMode&&z.useAlpha&&1>n[3]&&(n[3]/=10);"add"===h.boostBlending?(k.blendFunc(k.SRC_ALPHA,k.ONE),k.blendEquation(k.FUNC_ADD)):"mult"===h.boostBlending||"multiply"===h.boostBlending?k.blendFunc(k.DST_COLOR,k.ZERO):"darken"===h.boostBlending?(k.blendFunc(k.ONE,k.ONE),k.blendEquation(k.FUNC_MIN)):k.blendFuncSeparate(k.SRC_ALPHA,k.ONE_MINUS_SRC_ALPHA,k.ONE,k.ONE_MINUS_SRC_ALPHA);b.reset();0=(f.options.boostThreshold||Number.MAX_VALUE)&&++c);a.boostForceChartBoost=h&&(d===a.series.length&&0=C&&f<=E), null!==f&&d>=D&&d<=K&&h))if(a=k.toPixels(d,!0),z){if(void 0===T||a===P){la||(c=f);if(void 0===da||f>ca)ca=f,da=b;if(void 0===T||c=(d.options.boostThreshold||Number.MAX_VALUE)}var d=this,e=this.options.data;h(this.chart)&&t[this.type]?(c(e)&&"heatmap"!==this.type&&"treemap"!==this.type&&!this.options.stacking&&this.hasExtremes&&this.hasExtremes(!0)||(a.apply(this, Array.prototype.slice.call(arguments,1)),e=this.processedXData),(this.isSeriesBoosting=c(e))?this.enterBoost():this.exitBoost&&this.exitBoost()):a.apply(this,Array.prototype.slice.call(arguments,1))});q(l,"hide",function(){this.canvas&&this.renderTarget&&(this.ogl&&this.ogl.clear(),this.boostClear())});l.prototype.enterBoost=function(){this.alteredByBoost=[];["allowDG","directTouch","stickyTracking"].forEach(function(a){this.alteredByBoost.push({prop:a,val:this[a],own:this.hasOwnProperty(a)})},this); this.directTouch=this.allowDG=!1;this.stickyTracking=!0;this.animate=null;this.labelBySeries&&(this.labelBySeries=this.labelBySeries.destroy())};l.prototype.exitBoost=function(){(this.alteredByBoost||[]).forEach(function(a){a.own?this[a.prop]=a.val:delete this[a.prop]},this);this.boostClear&&this.boostClear()};l.prototype.hasExtremes=function(a){var c=this.options,d=this.xAxis&&this.xAxis.options,e=this.yAxis&&this.yAxis.options;return c.data.length>(c.boostThreshold||Number.MAX_VALUE)&&y(e.min)&& y(e.max)&&(!a||y(d.min)&&y(d.max))};l.prototype.destroyGraphics=function(){var a=this,c=this.points,e,h;if(c)for(h=0;h