Icard/angular-clarity-master(work.../node_modules/highcharts/modules/treegrid.js

9 lines
28 KiB
JavaScript
Raw Normal View History

2024-07-16 14:55:36 +00:00
!/**
* Highcharts Gantt JS v11.4.1 (2024-04-04)
*
* Tree Grid
*
* (c) 2016-2024 Jon Arild Nygard
*
* License: www.highcharts.com/license
*/function(e){"object"==typeof module&&module.exports?(e.default=e,module.exports=e):"function"==typeof define&&define.amd?define("highcharts/modules/treegrid",["highcharts"],function(t){return e(t),e.Highcharts=t,e}):e("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(e){"use strict";var t=e?e._modules:{};function i(e,t,i,s){e.hasOwnProperty(t)||(e[t]=s.apply(null,i),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:t,module:e[t]}})))}i(t,"Core/Axis/BrokenAxis.js",[t["Core/Axis/Stacking/StackItem.js"],t["Core/Utilities.js"]],function(e,t){var i;let{addEvent:s,find:o,fireEvent:r,isArray:n,isNumber:l,pick:a}=t;return function(t){function i(){void 0!==this.brokenAxis&&this.brokenAxis.setBreaks(this.options.breaks,!1)}function d(){this.brokenAxis?.hasBreaks&&(this.options.ordinal=!1)}function h(){let e=this.brokenAxis;if(e?.hasBreaks){let t=this.tickPositions,i=this.tickPositions.info,s=[];for(let i=0;i<t.length;i++)e.isInAnyBreak(t[i])||s.push(t[i]);this.tickPositions=s,this.tickPositions.info=i}}function c(){this.brokenAxis||(this.brokenAxis=new k(this))}function p(){let{isDirty:e,options:{connectNulls:t},points:i,xAxis:s,yAxis:o}=this;if(e){let e=i.length;for(;e--;){let r=i[e],n=!(null===r.y&&!1===t)&&(s?.brokenAxis?.isInAnyBreak(r.x,!0)||o?.brokenAxis?.isInAnyBreak(r.y,!0));r.visible=!n&&!1!==r.options.visible}}}function f(){this.drawBreaks(this.xAxis,["x"]),this.drawBreaks(this.yAxis,a(this.pointArrayMap,["y"]))}function u(e,t){let i,s,o;let n=this,d=n.points;if(e?.brokenAxis?.hasBreaks){let h=e.brokenAxis;t.forEach(function(t){i=h?.breakArray||[],s=e.isXAxis?e.min:a(n.options.threshold,e.min);let c=e?.options?.breaks?.filter(function(e){let t=!0;for(let s=0;s<i.length;s++){let o=i[s];if(o.from===e.from&&o.to===e.to){t=!1;break}}return t});d.forEach(function(n){o=a(n["stack"+t.toUpperCase()],n[t]),i.forEach(function(t){if(l(s)&&l(o)){let i="";s<t.from&&o>t.to||s>t.from&&o<t.from?i="pointBreak":(s<t.from&&o>t.from&&o<t.to||s>t.from&&o>t.to&&o<t.from)&&(i="pointInBreak"),i&&r(e,i,{point:n,brk:t})}}),c?.forEach(function(t){r(e,"pointOutsideOfBreak",{point:n,brk:t})})})})}}function g(){let t=this.currentDataGrouping,i=t?.gapSize,s=this.points.slice(),o=this.yAxis,r=this.options.gapSize,n=s.length-1;if(r&&n>0){let t,l;for("value"!==this.options.gapUnit&&(r*=this.basePointRange),i&&i>r&&i>=this.basePointRange&&(r=i);n--;)if(l&&!1!==l.visible||(l=s[n+1]),t=s[n],!1!==l.visible&&!1!==t.visible){if(l.x-t.x>r){let i=(t.x+l.x)/2;s.splice(n+1,0,{isNull:!0,x:i}),o.stacking&&this.options.stacking&&((o.stacking.stacks[this.stackKey][i]=new e(o,o.options.stackLabels,!1,i,this.stack)).total=0)}l=t}}return this.getGraphPath(s)}t.compose=function(e,t){if(!e.keepProps.includes("brokenAxis")){e.keepProps.push("brokenAxis"),s(e,"init",c),s(e,"afterInit",i),s(e,"afterSetTickPositions",h),s(e,"afterSetOptions",d);let o=t.prototype;o.drawBreaks=u,o.gappedPath=g,s(t,"afterGeneratePoints",p),s(t,"afterRender",f)}return e};class k{static isInBreak(e,t){let i=e.repeat||1/0,s=e.from,o=e.to-e.from,r=t>=s?(t-s)%i:i-(s-t)%i;return e.inclusive?r<=o:r<o&&0!==r}static lin2Val(e){let t=this.brokenAxis,i=t&&t.breakArray;if(!i||!l(e))return e;let s=e,o,r;for(r=0;r<i.length&&!((o=i[r]).from>=s);r++)o.to<s?s+=o.len:k.isInBreak(o,s)&&(s+=o.len);return s}static val2Lin(e){let t=this.brokenAxis,i=t&&t.breakArray;if(!i||!l(e))return e;let s=e,o,r;for(r=0;r<i.length;r++)if((o=i[r]).to<=e)s-=o.len;else if(o.from>=e)break;else if(k.isInBreak(o,e)){s-=e-o.from;break}return s}constructor(e){this.hasBreaks=!1,this.axis=e}findBreakAt(e,t){return o(t,function(t){return t.from<e&&e<t.to})}isInAnyBreak(e,t){let i=this.axis,s=i.options.breaks||[],o=s.length,r,n,d;if(o&&l(e)){for(;o--;)k.isInBreak(s[o],e)&&(r=!0,n||(n=a(s[o].showPoints,!i.isXAxis)));d=r&&t?r&&!n:r}return d}setBreaks(e,t){let i=this,s=i.axis,o=n(e)&&!!e.length&&!!Object.keys(e[0]).length;s.isDirty=i.hasBreaks!==o,i.hasBreaks=o,e!==s.options.breaks&&(s.options.breaks=s.userOptions.breaks=e),s.forceRedraw=!0,s.series.forEach(function(e){e.isDi