/*
 Highcharts JS v7.1.3 (2019-08-14)

 (c) 2009-2019 Torstein Honsi

 License: www.highcharts.com/license
*/
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/modules/broken-axis",["highcharts"],function(f){a(f);a.Highcharts=f;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function f(a,h,f,n){a.hasOwnProperty(h)||(a[h]=n.apply(null,f))}a=a?a._modules:{};f(a,"modules/broken-axis.src.js",[a["parts/Globals.js"],a["parts/Utilities.js"]],function(a,h){var f=h.isArray;h=a.addEvent;var n=
a.pick,v=a.extend,w=a.find,r=a.fireEvent,p=a.Axis,t=a.Series,u=function(d,c){return w(c,function(c){return c.from<d&&d<c.to})};v(p.prototype,{isInBreak:function(d,c){var a=d.repeat||Infinity,e=d.from,b=d.to-d.from;c=c>=e?(c-e)%a:a-(e-c)%a;return d.inclusive?c<=b:c<b&&0!==c},isInAnyBreak:function(d,c){var a=this.options.breaks,e=a&&a.length,b;if(e){for(;e--;)if(this.isInBreak(a[e],d)){var g=!0;b||(b=n(a[e].showPoints,!this.isXAxis))}var q=g&&c?g&&!b:g}return q}});h(p,"afterInit",function(){"function"===
typeof this.setBreaks&&this.setBreaks(this.options.breaks,!1)});h(p,"afterSetTickPositions",function(){if(this.isBroken){var a=this.tickPositions,c=this.tickPositions.info,l=[],e;for(e=0;e<a.length;e++)this.isInAnyBreak(a[e])||l.push(a[e]);this.tickPositions=l;this.tickPositions.info=c}});h(p,"afterSetOptions",function(){this.isBroken&&(this.options.ordinal=!1)});p.prototype.setBreaks=function(a,c){function d(a){var c=a,d;for(d=0;d<b.breakArray.length;d++){var e=b.breakArray[d];if(e.to<=a)c-=e.len;
else if(e.from>=a)break;else if(b.isInBreak(e,a)){c-=a-e.from;break}}return c}function e(a){var c;for(c=0;c<b.breakArray.length;c++){var d=b.breakArray[c];if(d.from>=a)break;else d.to<a?a+=d.len:b.isInBreak(d,a)&&(a+=d.len)}return a}var b=this,g=f(a)&&!!a.length;b.isDirty=b.isBroken!==g;b.isBroken=g;b.options.breaks=b.userOptions.breaks=a;b.forceRedraw=!0;g||b.val2lin!==d||(delete b.val2lin,delete b.lin2val);g&&(b.userOptions.ordinal=!1,b.val2lin=d,b.lin2val=e,b.setExtremes=function(b,a,d,c,e){if(this.isBroken){for(var k,
g=this.options.breaks;k=u(b,g);)b=k.to;for(;k=u(a,g);)a=k.from;a<b&&(a=b)}p.prototype.setExtremes.call(this,b,a,d,c,e)},b.setAxisTranslation=function(a){p.prototype.setAxisTranslation.call(this,a);this.unitLength=null;if(this.isBroken){a=b.options.breaks;var d=[],c=[],e=0,k,g=b.userMin||b.min,l=b.userMax||b.max,h=n(b.pointRangePadding,0),f;a.forEach(function(a){k=a.repeat||Infinity;b.isInBreak(a,g)&&(g+=a.to%k-g%k);b.isInBreak(a,l)&&(l-=l%k-a.from%k)});a.forEach(function(a){m=a.from;for(k=a.repeat||
Infinity;m-k>g;)m-=k;for(;m<g;)m+=k;for(f=m;f<l;f+=k)d.push({value:f,move:"in"}),d.push({value:f+(a.to-a.from),move:"out",size:a.breakSize})});d.sort(function(a,b){return a.value===b.value?("in"===a.move?0:1)-("in"===b.move?0:1):a.value-b.value});var q=0;var m=g;d.forEach(function(a){q+="in"===a.move?1:-1;1===q&&"in"===a.move&&(m=a.value);0===q&&(c.push({from:m,to:a.value,len:a.value-m-(a.size||0)}),e+=a.value-m-(a.size||0))});b.breakArray=c;b.unitLength=l-g-e+h;r(b,"afterBreaks");b.staticScale?b.transA=
b.staticScale:b.unitLength&&(b.transA*=(l-b.min+h)/b.unitLength);h&&(b.minPixelPadding=b.transA*b.minPointOffset);b.min=g;b.max=l}});n(c,!0)&&this.chart.redraw()};h(t,"afterGeneratePoints",function(){var a=this.xAxis,c=this.yAxis,l=this.points,e=l.length,b=this.options.connectNulls;if(a&&c&&(a.options.breaks||c.options.breaks))for(;e--;){var g=l[e];var f=null===g.y&&!1===b;f||!a.isInAnyBreak(g.x,!0)&&!c.isInAnyBreak(g.y,!0)||(l.splice(e,1),this.data[e]&&this.data[e].destroyElements())}});h(t,"afterRender",
function(){this.drawBreaks(this.xAxis,["x"]);this.drawBreaks(this.yAxis,n(this.pointArrayMap,["y"]))});a.Series.prototype.drawBreaks=function(a,c){var d=this,e=d.points,b,g,f,h;a&&c.forEach(function(c){b=a.breakArray||[];g=a.isXAxis?a.min:n(d.options.threshold,a.min);e.forEach(function(d){h=n(d["stack"+c.toUpperCase()],d[c]);b.forEach(function(b){f=!1;if(g<b.from&&h>b.to||g>b.from&&h<b.from)f="pointBreak";else if(g<b.from&&h>b.from&&h<b.to||g>b.from&&h>b.to&&h<b.from)f="pointInBreak";f&&r(a,f,{point:d,
brk:b})})})})};a.Series.prototype.gappedPath=function(){var d=this.currentDataGrouping,c=d&&d.gapSize;d=this.options.gapSize;var f=this.points.slice(),e=f.length-1,b=this.yAxis;if(d&&0<e)for("value"!==this.options.gapUnit&&(d*=this.basePointRange),c&&c>d&&c>=this.basePointRange&&(d=c);e--;)f[e+1].x-f[e].x>d&&(c=(f[e].x+f[e+1].x)/2,f.splice(e+1,0,{isNull:!0,x:c}),this.options.stacking&&(c=b.stacks[this.stackKey][c]=new a.StackItem(b,b.options.stackLabels,!1,c,this.stack),c.total=0));return this.getGraphPath(f)}});
f(a,"masters/modules/broken-axis.src.js",[],function(){})});
//# sourceMappingURL=broken-axis.js.map