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

8 lines
8.5 KiB
JavaScript
Raw Permalink Normal View History

2024-07-16 14:55:36 +00:00
!/**
* Highcharts JS v11.4.1 (2024-04-04)
* Organization chart series type
*
* (c) 2019-2024 Torstein Honsi
*
* License: www.highcharts.com/license
*/function(t){"object"==typeof module&&module.exports?(t.default=t,module.exports=t):"function"==typeof define&&define.amd?define("highcharts/modules/organization",["highcharts","highcharts/modules/sankey"],function(e){return t(e),t.Highcharts=e,t}):t("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(t){"use strict";var e=t?t._modules:{};function i(t,e,i,n){t.hasOwnProperty(e)||(t[e]=n.apply(null,i),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:t[e]}})))}i(e,"Series/Organization/OrganizationPoint.js",[e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e){let{sankey:{prototype:{pointClass:i}}}=t.seriesTypes,{defined:n,find:s,pick:o}=e;return class extends i{constructor(t,e,i){super(t,e,i),this.isNode||(this.dataLabelOnNull=!0,this.formatPrefix="link")}getSum(){return 1}setNodeColumn(){super.setNodeColumn();let t=this,e=t.getFromNode().fromNode;if(!n(t.options.column)&&0!==t.linksTo.length&&e&&"hanging"===e.options.layout){let i=-1,n;t.options.layout=o(t.options.layout,"hanging"),t.hangsFrom=e,s(e.linksFrom,(e,n)=>{let s=e.toNode===t;return s&&(i=n),s});for(let s=0;s<e.linksFrom.length;++s)(n=e.linksFrom[s]).toNode.id===t.id?s=e.linksFrom.length:i+=function t(e){let i=e.linksFrom.length;return e.linksFrom.forEach(e=>{e.id===e.toNode.linksTo[0].id?i+=t(e.toNode):i--}),i}(n.toNode);t.column=(t.column||0)+i}}}}),i(e,"Series/Organization/OrganizationSeriesDefaults.js",[],function(){return{borderColor:"#666666",borderRadius:3,link:{color:"#666666",lineWidth:1,radius:10,type:"default"},borderWidth:1,dataLabels:{nodeFormatter:function(){let t={width:"100%",height:"100%",display:"flex","flex-direction":"row","align-items":"center","justify-content":"center"},e={"max-height":"100%","border-radius":"50%"},i={width:"100%",padding:0,"text-align":"center","white-space":"normal"};function n(t){return Object.keys(t).reduce(function(e,i){return e+i+":"+t[i]+";"},'style="')+'"'}let{description:s,image:o,title:r}=this.point;o&&(e["max-width"]="30%",i.width="70%"),this.series.chart.renderer.forExport&&(t.display="block",i.position="absolute",i.left=o?"30%":0,i.top=0);let a="<div "+n(t)+">";return o&&(a+='<img src="'+o+'" '+n(e)+">"),a+="<div "+n(i)+">",this.point.name&&(a+="<h4 "+n({margin:0})+">"+this.point.name+"</h4>"),r&&(a+="<p "+n({margin:0})+">"+(r||"")+"</p>"),s&&(a+="<p "+n({opacity:.75,margin:"5px"})+">"+s+"</p>"),a+="</div></div>"},style:{fontWeight:"normal",fontSize:"0.9em"},useHTML:!0,linkTextPath:{attributes:{startOffset:"95%",textAnchor:"end"}}},hangingIndent:20,hangingIndentTranslation:"inherit",hangingSide:"left",minNodeLength:10,nodeWidth:50,tooltip:{nodeFormat:"{point.name}<br>{point.title}<br>{point.description}"}}}),i(e,"Series/PathUtilities.js",[],function(){function t(t,e){let i=[];for(let n=0;n<t.length;n++){let s=t[n][1],o=t[n][2];if("number"==typeof s&&"number"==typeof o){if(0===n)i.push(["M",s,o]);else if(n===t.length-1)i.push(["L",s,o]);else if(e){let r=t[n-1],a=t[n+1];if(r&&a){let t=r[1],n=r[2],h=a[1],l=a[2];if("number"==typeof t&&"number"==typeof h&&"number"==typeof n&&"number"==typeof l&&t!==h&&n!==l){let r=t<h?1:-1,a=n<l?1:-1;i.push(["L",s-r*Math.min(Math.abs(s-t),e),o-a*Math.min(Math.abs(o-n),e)],["C",s,o,s,o,s+r*Math.min(Math.abs(s-h),e),o+a*Math.min(Math.abs(o-l),e)])}}}else i.push(["L",s,o])}}return i}return{applyRadius:t,getLinkPath:{default:function(e){let{x1:i,y1:n,x2:s,y2:o,width:r=0,inverted:a=!1,radius:h,parentVisible:l}=e,d=[["M",i,n],["L",i,n],["C",i,n,i,o,i,o],["L",i,o],["C",i,n,i,o,i,o],["L",i,o]];return l?t([["M",i,n],["L",i+r*(a?-.5:.5),n],["L",i+r*(a?-.5:.5),o],["L",s,o]],h):d},straight:function(t){let{x1:e,y1:i,x2:n,y2:s,width:o=0,inverted:r=!1,parentVisible:a}=t;return a?[["M",e,i],["L",e+o*(r?-1:1),s],["L",n,s]]:[["M",e,i],["L",e,s],["L",e,s]]},curved:function(t){let{x1:e,y1:i,x2:n,y2:s,offset:o=0,width:r=0,inverted:a=!1,parentVisible:h}=t;return h?[["M",e,i],["C",e+o,i,e-o+r*(a?-1:1),s,e+r*(a?-1:1),s],["L",n,s]]:[["M",e,i],["C",e,i,e,s,e,s],["L",n,s]]}}}}),i(e,"Series/Organization/Organiza