| Server IP : 182.53.201.61 / Your IP : 216.73.217.175 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/KPI monitor/node_modules/highcharts/esm/modules/ |
Upload File : |
/**
* Highcharts JS v12.5.0 (2026-01-12)
* Treegraph chart series type
* @module highcharts/modules/treegraph
* @requires highcharts
* @requires highcharts/modules/treemap
*
* (c) 2010-2026 Highsoft AS
* Author: Pawel Lysy Grzegorz Blachlinski
*
* A commercial license may be required depending on use.
* See www.highcharts.com/license
*/import*as t from"../highcharts.js";var e={};e.n=t=>{var i=t&&t.__esModule?()=>t.default:()=>t;return e.d(i,{a:i}),i},e.d=(t,i)=>{for(var o in i)e.o(i,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:i[o]})},e.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);let i=t.default;var o=e.n(i);function s(t){let{x1:e,y1:i,x2:o,y2:s,bendAt:n,width:r=0,inverted:a=!1,radius:h,parentVisible:d}=t;if(d){let t=n??r/2;return l([["M",e,i],["L",e+t*(a?-1:1),i],["L",e+t*(a?-1:1),s],["L",o,s]],h)}return[["M",e,i],["L",e,i],["C",e,i,e,s,e,s],["L",e,s],["C",e,i,e,s,e,s],["L",e,s]]}function l(t,e){let i=[];for(let o=0;o<t.length;o++){let s=t[o][1],l=t[o][2];if("number"==typeof s&&"number"==typeof l)if(0===o)i.push(["M",s,l]);else if(o===t.length-1)i.push(["L",s,l]);else if(e){let n=t[o-1],r=t[o+1];if(n&&r){let t=n[1],o=n[2],a=r[1],h=r[2];if("number"==typeof t&&"number"==typeof a&&"number"==typeof o&&"number"==typeof h&&t!==a&&o!==h){let n=t<a?1:-1,r=o<h?1:-1;i.push(["L",s-n*Math.min(Math.abs(s-t),e),l-r*Math.min(Math.abs(l-o),e)],["C",s,l,s,l,s+n*Math.min(Math.abs(s-a),e),l+r*Math.min(Math.abs(l-h),e)])}}}else i.push(["L",s,l])}return i}let n=t.default.SeriesRegistry;var r=e.n(n);let a=t.default.SVGRenderer;var h=e.n(a);let{seriesTypes:{treemap:{prototype:{NodeClass:d}}}}=r(),p=class extends d{constructor(){super(...arguments),this.mod=0,this.shift=0,this.change=0,this.children=[],this.preX=0,this.hidden=!1,this.wasVisited=!1,this.collapsed=!1}nextLeft(){return this.getLeftMostChild()||this.thread}nextRight(){return this.getRightMostChild()||this.thread}getAncestor(t,e){return t.ancestor.children[0]===this.children[0]?t.ancestor:e}getLeftMostSibling(){let t=this.getParent();if(t){for(let e of t.children)if(e&&e.point.visible)return e}}hasChildren(){let t=this.children;for(let e=0;e<t.length;e++)if(t[e].point.visible)return!0;return!1}getLeftSibling(){let t=this.getParent();if(t){let e=t.children;for(let t=this.relativeXPosition-1;t>=0;t--)if(e[t]&&e[t].point.visible)return e[t]}}getLeftMostChild(){let t=this.children;for(let e=0;e<t.length;e++)if(t[e].point.visible)return t[e]}getRightMostChild(){let t=this.children;for(let e=t.length-1;e>=0;e--)if(t[e].point.visible)return t[e]}getParent(){return this.parentNode}getFirstChild(){let t=this.children;for(let e=0;e<t.length;e++)if(t[e].point.visible)return t[e]}},c=t.default.Point;var f=e.n(c);let{seriesTypes:{treemap:{prototype:{pointClass:u}}}}=r(),{addEvent:g,fireEvent:v,merge:b}=o();class m extends u{constructor(){super(...arguments),this.dataLabelOnHidden=!0,this.isLink=!1,this.setState=f().prototype.setState}draw(){super.draw.apply(this,arguments);let t=this.graphic;t&&t.animate({visibility:this.visible?"inherit":"hidden"}),this.renderCollapseButton()}renderCollapseButton(){let t=this.series,e=this.graphic&&this.graphic.parentGroup,i=t.mapOptionsToLevel[this.node.level||0]||{},o=b(t.options.collapseButton,i.collapseButton,this.options.collapseButton),{width:s,height:l,shape:n,style:r}=o,a=this.series.chart,h=this.visible&&(this.collapsed||!o.onlyOnHover||"hover"===this.state)?1:0;if(this.shapeArgs)if(this.collapseButtonOptions=o,this.collapseButton)if(this.node.children.length&&o.enabled){let{x:t,y:e}=this.getCollapseBtnPosition(o);this.collapseButton.attr({text:this.collapsed?"+":"-",rotation:90*!!a.inverted,rotationOriginX:s/2,rotationOriginY:l/2,visibility:this.visible?"inherit":"hidden"}).animate({x:t,y:e,opacity:h})}else this.collapseButton.destroy(),delete this.collapseButton;else{if(!this.node.children.length||!o.enabled)return;let{x:t,y:i}=this.getCollapseBtnPosition(o),d=o.fillColor||this.color||"#cccccc";this.collapseButton=a.renderer.label(this.collapsed?"+":"-",t,i,n).attr({height:l-4,width:s-4,padding:2,fill:d,rotation:90*!!a.inverted,rotationOriginX:s/2,rotationOriginY:l/2,stroke:o.lineColor||"#ffffff","stroke-width":o.lineWidth,"text-align":"center",align:"center",zIndex:1,opacity:h,visibility:this.visible?"inherit":"hidden"}).addClass("highcharts-tracker").addClass("highcharts-collapse-button").removeClass("highcharts-no-tooltip").css(b({color:"string"==typeof d?a.renderer.getContrast(d):"#333333"},r)).add(e),this.collapseButton.element.point=this}}toggleCollapse(t){let e=this.series;this.update({collapsed:t??!this.collapsed},!1,void 0,!1),v(e,"toggleCollapse"),e.redraw()}destroy(){this.collapseButton&&(this.collapseButton.destroy(),delete this.collapseButton,this.collapseButton=void 0),this.linkToParent&&(this.linkToParent.destroy(),delete this.linkToParent),super.destroy.apply(this,arguments)}getCollapseBtnPosition(t){let e=this.series.chart.inverted,i=t.width,o=t.height,{x:s=0,y:l=0,width:n=0,height:r=0}=this.shapeArgs||{};return{x:s+t.x+(e?-(.3*o):n+-.3*i),y:l+r/2-o/2+t.y}}}g(m,"mouseOut",function(){let t=this.collapseButton,e=this.collapseButtonOptions;t&&e?.onlyOnHover&&!this.collapsed&&t.animate({opacity:0})}),g(m,"mouseOver",function(){this.collapseButton&&this.visible&&this.collapseButton.animate({opacity:1},this.series.options.states?.hover?.animation)}),g(m,"click",function(){this.toggleCollapse()});let y=t.default.Color;var x=e.n(y);let{extend:k,isArray:L,isNumber:P,isObject:C,merge:T,pick:M,relativeLength:O}=o(),X={getColor:function(t,e){let i,o,s,l,n,r,a=e.index,h=e.mapOptionsToLevel,d=e.parentColor,p=e.parentColorIndex,c=e.series,f=e.colors,u=e.siblings,g=c.points,v=c.chart.options.chart;if(t){let b;i=g[t.i],o=h[t.level]||{},i&&o.colorByPoint&&(l=i.index%(f?f.length:v.colorCount),s=f&&f[l]),c.chart.styledMode||(n=M(i&&i.options.color,o&&o.color,s,d&&((b=o&&o.colorVariation)&&"brightness"===b.key&&a&&u?x().parse(d).brighten(b.to*(a/u)).get():d),c.color)),r=M(i&&i.options.colorIndex,o&&o.colorIndex,l,p,e.colorIndex)}return{color:n,colorIndex:r}},getLevelOptions:function(t){let e,i,o,s,l,n,r={};if(C(t))for(s=P(t.from)?t.from:1,n=t.levels,i={},e=C(t.defaults)?t.defaults:{},L(n)&&(i=n.reduce((t,i)=>{let o,l,n;return C(i)&&P(i.level)&&(l=M((n=T({},i)).levelIsConstant,e.levelIsConstant),delete n.levelIsConstant,delete n.level,C(t[o=i.level+(l?0:s-1)])?T(!0,t[o],n):t[o]=n),t},{})),l=P(t.to)?t.to:1,o=0;o<=l;o++)r[o]=T({},e,C(i[o])?i[o]:{});return r},getNodeWidth:function(t,e){let{chart:i,options:o}=t,{nodeDistance:s=0,nodeWidth:l=0}=o,{plotSizeX:n=1}=i;if("auto"===l){if("string"==typeof s&&/%$/.test(s))return n/(e+parseFloat(s)/100*(e-1));let t=Number(s);return(n+t)/(e||1)-t}return O(l,n)},setTreeValues:function t(e,i){let o=i.before,s=i.idRoot,l=i.mapIdToNode[s],n=!1!==i.levelIsConstant,r=i.points[e.i],a=r&&r.options||{},h=[],d=0;e.levelDynamic=e.level-(n?0:l.level),e.name=M(r&&r.name,""),e.visible=s===e.id||!0===i.visible,"function"==typeof o&&(e=o(e,i)),e.children.forEach((o,s)=>{let l=k({},i);k(l,{index:s,siblings:e.children.length,visible:e.visible}),o=t(o,l),h.push(o),o.visible&&(d+=o.val)});let p=M(a.value,d);return e.visible=p>=0&&(d>0||e.visible),e.children=h,e.childrenTotal=d,e.isLeaf=e.visible&&!d,e.val=p,e},updateRootId:function(t){let e,i;return C(t)&&(i=C(t.options)?t.options:{},e=M(t.rootNode,i.rootId,""),C(t.userOptions)&&(t.userOptions.rootId=e),t.rootNode=e),e}},{pick:N,extend:B}=o(),{seriesTypes:{column:{prototype:{pointClass:A}}}}=r(),S=class extends A{constructor(t,e,i,o){super(t,e,i),this.dataLabelOnNull=!0,this.formatPrefix="link",this.isLink=!0,this.node={},this.formatPrefix="link",this.dataLabelOnNull=!0,o&&(this.fromNode=o.node.parentNode.point,this.visible=o.visible,this.toNode=o,this.id=this.toNode.id+"-"+this.fromNode.id)}update(t,e,i,o){let s={id:this.id,formatPrefix:this.formatPrefix};f().prototype.update.call(this,t,!this.isLink&&e,i,o),this.visible=this.toNode.visible,B(this,s),N(e,!0)&&this.series.chart.redraw(i)}};class w{static createDummyNode(t,e,i){let o=new p;return o.id=t.id+"-"+i,o.ancestor=t,o.children.push(e),o.parent=t.id,o.parentNode=t,o.point=e.point,o.level=e.level-i,o.relativeXPosition=e.relativeXPosition,o.visible=e.visible,t.children[e.relativeXPosition]=o,e.oldParentNode=t,e.relativeXPosition=0,e.parentNode=o,e.parent=o.id,o}calculatePositions(t){let e=t.nodeList;this.resetValues(e);let i=t.tree;i&&(this.calculateRelativeX(i,0),this.beforeLayout(e),this.firstWalk(i),this.secondWalk(i,-i.preX),this.afterLayout(e))}beforeLayout(t){for(let e of t)for(let t of e.children)if(t&&t.level-e.level>1){let i=t.level-e.level-1;for(;i>0;)t=w.createDummyNode(e,t,i),i--}}resetValues(t){for(let e of t)e.mod=0,e.ancestor=e,e.shift=0,e.thread=void 0,e.change=0,e.preX=0}calculateRelativeX(t,e){let i=t.children;for(let t=0,e=i.length;t<e;++t)this.calculateRelativeX(i[t],t);t.relativeXPosition=e}firstWalk(t){let e;if(t.hasChildren()){let i=t.getLeftMostChild();for(let e of t.children)this.firstWalk(e),i=this.apportion(e,i);this.executeShifts(t);let o=t.getLeftMostChild(),s=t.getRightMostChild(),l=(o.preX+s.preX)/2;(e=t.getLeftSibling())?(t.preX=e.preX+1,t.mod=t.preX-l):t.preX=l}else(e=t.getLeftSibling())?(t.preX=e.preX+1,t.mod=t.preX):t.preX=0}secondWalk(t,e){for(let i of(t.yPosition=t.preX+e,t.xPosition=t.point?.x??t.level,t.children))this.secondWalk(i,e+t.mod)}executeShifts(t){let e=0,i=0;for(let o=t.children.length-1;o>=0;o--){let s=t.children[o];s.preX+=e,s.mod+=e,i+=s.change,e+=s.shift+i}}apportion(t,e){let i=t.getLeftSibling();if(i){let o=t,s=t,l=i,n=o.getLeftMostSibling(),r=o.mod,a=s.mod,h=l.mod,d=n.mod;for(;l&&l.nextRight()&&o&&o.nextLeft();){l=l.nextRight(),n=n.nextLeft(),o=o.nextLeft(),(s=s.nextRight()).ancestor=t;let i=l.preX+h-(o.preX+r)+1;i>0&&(this.moveSubtree(t.getAncestor(l,e),t,i),r+=i,a+=i),h+=l.mod,r+=o.mod,d+=n.mod,a+=s.mod}l&&l.nextRight()&&!s.nextRight()&&(s.thread=l.nextRight(),s.mod+=h-a),o&&o.nextLeft()&&!n.nextLeft()&&(n.thread=o.nextLeft(),n.mod+=r-d),e=t}return e}moveSubtree(t,e,i){let o=e.relativeXPosition-t.relativeXPosition;e.change-=i/o,e.shift+=i,e.preX+=i,e.mod+=i,t.change+=i/o}afterLayout(t){for(let e of t)e.oldParentNode&&(e.relativeXPosition=e.parentNode.relativeXPosition,e.parent=e.oldParentNode.parent,e.parentNode=e.oldParentNode,e.oldParentNode.children.splice(e.relativeXPosition,1,e),e.oldParentNode=void 0)}}let R=t.default.SVGElement;var W=e.n(R);let{deg2rad:I}=o(),{addEvent:D,merge:z,uniqueKey:Y,defined:E,extend:V}=o();function F(t,e){e=z(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},e);let i=this.renderer.url,o=this.text||this,s=o.textPath,{attributes:l,enabled:n}=e;if(t=t||s&&s.path,s&&s.undo(),t&&n){let e=D(o,"afterModifyTree",e=>{if(t&&n){let s=t.attr("id");s||t.attr("id",s=Y());let n={x:0,y:0};E(l.dx)&&(n.dx=l.dx,delete l.dx),E(l.dy)&&(n.dy=l.dy,delete l.dy),o.attr(n),this.attr({transform:""}),this.box&&(this.box=this.box.destroy());let r=e.nodes.slice(0);e.nodes.length=0,e.nodes[0]={tagName:"textPath",attributes:V(l,{"text-anchor":l.textAnchor,href:`${i}#${s}`}),children:r}}});o.textPath={path:t,undo:e}}else o.attr({dx:0,dy:0}),delete o.textPath;return this.added&&(o.textCache="",this.renderer.buildText(o)),this}function H(t){let e=t.bBox,i=this.element?.querySelector("textPath");if(i){let t=[],{b:o,h:s}=this.renderer.fontMetrics(this.element),l=s-o,n=RegExp('(<tspan>|<tspan(?!\\sclass="highcharts-br")[^>]*>|<\\/tspan>)',"g"),r=i.innerHTML.replace(n,"").split(/<tspan class="highcharts-br"[^>]*>/),a=r.length,h=(t,e)=>{let{x:s,y:n}=e,r=(i.getRotationOfChar(t)-90)*I,a=Math.cos(r),h=Math.sin(r);return[[s-l*a,n-l*h],[s+o*a,n+o*h]]};for(let e=0,o=0;o<a;o++){let s=r[o].length;for(let l=0;l<s;l+=5)try{let s=e+l+o,[n,r]=h(s,i.getStartPositionOfChar(s));0===l?(t.push(r),t.push(n)):(0===o&&t.unshift(r),o===a-1&&t.push(n))}catch{break}e+=s-1;try{let s=e+o,l=i.getEndPositionOfChar(s),[n,r]=h(s,l);t.unshift(r),t.unshift(n)}catch{break}}t.length&&t.push(t[0].slice()),e.polygon=t}return e}function $(t){let e=t.labelOptions,i=t.point,o=e[i.formatPrefix+"TextPath"]||e.textPath;o&&!e.useHTML&&(this.setTextPath(i.getDataLabelPath?.(this)||i.graphic,o),i.dataLabelPath&&!o.enabled&&(i.dataLabelPath=i.dataLabelPath.destroy()))}let{getLinkPath:G}={applyRadius:l,getLinkPath:{default:s,orthogonal:s,straight:function(t){let{x1:e,y1:i,x2:o,y2:s,width:l=0,inverted:n=!1,parentVisible:r}=t;return r?[["M",e,i],["L",e+l*(n?-1:1),s],["L",o,s]]:[["M",e,i],["L",e,s],["L",e,s]]},curved:function(t){let{x1:e,y1:i,x2:o,y2:s,offset:l=0,width:n=0,inverted:r=!1,parentVisible:a}=t;return a?[["M",e,i],["C",e+l,i,e-l+n*(r?-1:1),s,e+n*(r?-1:1),s],["L",o,s]]:[["M",e,i],["C",e,i,e,s,e,s],["L",o,s]]}}},{series:{prototype:j},seriesTypes:{treemap:_,column:q}}=r(),{prototype:{symbols:U}}=h(),{getLevelOptions:J,getNodeWidth:K}=X,{arrayMax:Q,crisp:Z,extend:tt,merge:te,pick:ti,relativeLength:to,splat:ts}=o();({compose:function(t){D(t,"afterGetBBox",H),D(t,"beforeAddingDataLabel",$);let e=t.prototype;e.setTextPath||(e.setTextPath=F)}}).compose(W());class tl extends _{constructor(){super(...arguments),this.nodeList=[],this.links=[]}init(){super.init.apply(this,arguments),this.layoutAlgorythm=new w;let t=this,e=this.chart.labelCollectors;e.some(t=>"collectorFunc"===t.name)||e.push(function(){let e=[];if(t.options.dataLabels&&!ts(t.options.dataLabels)[0].allowOverlap)for(let i of t.links||[])i.dataLabel&&e.push(i.dataLabel);return e})}getLayoutModifiers(){let t=this.chart,e=this,i=t.plotSizeX,o=t.plotSizeY,s=e.options.link?.lineWidth||0,l=Q(this.points.map(t=>t.node.xPosition)),n=1/0,r=-1/0,a=1/0,h=-1/0,d=0,p=0,c=0,f=0;this.points.forEach(t=>{if(this.options.fillSpace&&!t.visible)return;let u=t.node,g=e.mapOptionsToLevel[t.node.level]||{},v=te(this.options.marker,g.marker,t.options.marker),b=v.width??K(this,l),m=to(v.radius||0,Math.min(i,o)),y=Math.max(v.lineWidth||0,s),x=v.symbol,k="circle"!==x&&v.height?to(v.height,o):2*m,L="circle"!==x&&b?to(b,i):2*m;u.nodeSizeX=L,u.nodeSizeY=k,u.xPosition<=n&&(n=u.xPosition,p=Math.max(L+y,p)),u.xPosition>=r&&(r=u.xPosition,d=Math.max(L+y,d)),u.yPosition<=a&&(a=u.yPosition,f=Math.max(k+y,f)),u.yPosition>=h&&(h=u.yPosition,c=Math.max(k+y,c))});let u=h===a?1:(o-(f+c)/2)/(h-a),g=h===a?o/2:-u*a+f/2,v=r===n?1:(i-(d+d)/2)/(r-n),b=r===n?i/2:-v*n+p/2;return{ax:v,bx:b,ay:u,by:g}}getLinks(){let t=this,e=[];return this.data.forEach(i=>{let o=t.mapOptionsToLevel[i.node.level??0]||{};if(i.node.parent){let s=te(o,i.options);if(!i.linkToParent||i.linkToParent.destroyed){let e=new t.LinkClass(t,s,void 0,i);i.linkToParent=e}else i.collapsed=ti(i.collapsed,(this.mapOptionsToLevel[i.node.level]||{}).collapsed),i.linkToParent.visible=i.linkToParent.toNode.visible;i.linkToParent.index=e.push(i.linkToParent)-1}else i.linkToParent&&(t.links.splice(i.linkToParent.index),i.linkToParent.destroy(),delete i.linkToParent)}),e}buildTree(t,e,i,o,s){let l=this.points[e];return i=l?.level??i,super.buildTree.call(this,t,e,i,o,s)}markerAttribs(){return{}}setCollapsedStatus(t,e){let i=t.point;i&&(i.collapsed=ti(i.collapsed,(this.mapOptionsToLevel[t.level]||{}).collapsed),i.visible=e,e=!1!==e&&!i.collapsed),t.children.forEach(t=>{this.setCollapsedStatus(t,e)})}drawTracker(){q.prototype.drawTracker.apply(this,arguments),q.prototype.drawTracker.call(this,this.links)}translate(){let t=this.options,e=X.updateRootId(this),i;j.translate.call(this);let o=this.tree=this.getTree();i=this.nodeMap[e],""===e||i&&i.children.length||(this.setRootNode("",!1),e=this.rootNode,i=this.nodeMap[e]),this.mapOptionsToLevel=J({from:i.level+1,levels:t.levels,to:o.height,defaults:{levelIsConstant:this.options.levelIsConstant,colorByPoint:t.colorByPoint}}),this.setCollapsedStatus(o,!0),this.links=this.getLinks(),this.setTreeValues(o),this.layoutAlgorythm.calculatePositions(this),this.layoutModifier=this.getLayoutModifiers(),this.points.forEach(t=>{this.translateNode(t)}),this.points.forEach(t=>{t.linkToParent&&this.translateLink(t.linkToParent)}),t.colorByPoint||this.setColorRecursive(this.tree)}translateLink(t){let e=t.fromNode,i=t.toNode,o=this.options.link?.lineWidth||0,s=ti(this.options.link?.curveFactor,.5),l=i.x!==i.node.level||e.x!==e.node.level,n=ti(t.options.link?.type,this.options.link?.type,"default");if(e.shapeArgs&&i.shapeArgs){let r=e.shapeArgs.width||0,a=this.chart.inverted,h=Z((e.shapeArgs.y||0)+(e.shapeArgs.height||0)/2,o),d=Z((i.shapeArgs.y||0)+(i.shapeArgs.height||0)/2,o),p=Z((e.shapeArgs.x||0)+r,o),c=Z(i.shapeArgs.x||0,o);a&&(p-=Math.round(r),c+=Math.round(i.shapeArgs.width||0));let f=i.node.xPosition-e.node.xPosition,u=Math.abs(c-p)+r,g=(l?u:u/f)-r,v=Z((c+p)/2,o),b=to(t.options.link?.bendAt??this.options.link?.bendAt??"50%",u-r);t.shapeType="path",t.plotX=v,t.plotY=d,t.shapeArgs={d:G[n]({x1:p,y1:h,x2:c,y2:d,width:g,offset:g*s*(a?-1:1),inverted:a,parentVisible:i.visible,radius:this.options.link?.radius,bendAt:b})},t.dlBox={x:(p+c)/2,y:(h+d)/2,height:o,width:0},t.tooltipPos=a?[(this.chart.plotSizeY||0)-t.dlBox.y,(this.chart.plotSizeX||0)-t.dlBox.x]:[t.dlBox.x,t.dlBox.y]}}drawNodeLabels(t){let e,i,o=this.mapOptionsToLevel;for(let s of t){if(i=o[s.node.level],e={style:{}},i&&i.dataLabels&&(e=te(e,i.dataLabels),this.hasDataLabels=()=>!0),s.shapeArgs&&this.options.dataLabels){let t={},{width:i=0,height:o=0}=s.shapeArgs;this.chart.inverted&&([i,o]=[o,i]),ts(this.options.dataLabels)[0].style?.width||(t.width=`${i}px`),ts(this.options.dataLabels)[0].style?.lineClamp||(t.lineClamp=Math.floor(o/16)),tt(e.style,t),s.dataLabel?.css(t)}s.dlOptions=te(e,s.options.dataLabels)}j.drawDataLabels.call(this,t)}alignDataLabel(t,e){let i=t.visible;t.visible=!0,super.alignDataLabel.apply(this,arguments),e.animate({opacity:+(!1!==i)},void 0,function(){i||e.hide()}),t.visible=i}drawDataLabels(){this.options.dataLabels&&(this.options.dataLabels=ts(this.options.dataLabels),this.drawNodeLabels(this.points),j.drawDataLabels.call(this,this.links))}destroy(){if(this.links){for(let t of this.links)t.destroy();this.links.length=0}return j.destroy.apply(this,arguments)}pointAttribs(t,e){let i=t&&this.mapOptionsToLevel[t.node.level??0]||{},o=t&&t.options,s=i.states&&i.states[e]||{};t&&(t.options.marker=te(this.options.marker,i.marker,t.options.marker));let l=ti(s&&s.link&&s.link.color,o&&o.link&&o.link.color,i&&i.link&&i.link.color,this.options.link&&this.options.link.color),n=ti(s&&s.link&&s.link.lineWidth,o&&o.link&&o.link.lineWidth,i&&i.link&&i.link.lineWidth,this.options.link&&this.options.link.lineWidth),r=j.pointAttribs.call(this,t,e);return t&&(t.isLink&&(r.stroke=l,r["stroke-width"]=n,delete r.fill),t.visible||(r.opacity=0)),r}drawPoints(){_.prototype.drawPoints.apply(this,arguments),q.prototype.drawPoints.call(this,this.links)}translateNode(t){let e=this.chart,{node:i,plotX:o=0}=t,s=e.plotSizeY,l=e.plotSizeX,{ax:n,bx:r,ay:a,by:h}=this.layoutModifier,d=this.isCartesian?e.inverted?l-o:o:n*i.xPosition+r,p=a*i.yPosition+h,c=this.mapOptionsToLevel[i.level]||{},f=te(this.options.marker,c.marker,t.options.marker).symbol,u=i.nodeSizeY,g=i.nodeSizeX,v=this.options.reversed,b=i.x=e.inverted?l-g/2-d:d-g/2,m=i.y=v?p-u/2:s-p-u/2,y=ti(t.options.borderRadius,c.borderRadius,this.options.borderRadius),x=U[f||"circle"];if(void 0===x?(t.hasImage=!0,t.shapeType="image",t.imageUrl=f.match(/^url\((.*?)\)$/)[1]):t.shapeType="path",!t.visible&&t.linkToParent){let e=t.linkToParent.fromNode;if(e){let{x:i=0,y:o=0,width:s=0,height:l=0}=e.shapeArgs||{};t.shapeArgs||(t.shapeArgs={}),t.hasImage||tt(t.shapeArgs,{d:x(i,o,s,l,y?{r:y}:void 0)}),tt(t.shapeArgs,{x:i,y:o}),t.plotX=e.plotX,t.plotY=e.plotY}}else t.plotX=b,t.plotY=m,t.shapeArgs={x:b,y:m,width:g,height:u,cursor:t.node.isLeaf?"default":"pointer"},t.hasImage||(t.shapeArgs.d=x(b,m,g,u,y?{r:y}:void 0));t.tooltipPos=e.inverted?[s-m-u/2,l-b-g/2]:[b+g/2,m]}}tl.defaultOptions=te(_.defaultOptions,{reversed:!1,marker:{radius:10,lineWidth:0,symbol:"circle",fillOpacity:1,states:{}},link:{color:"#666666",lineWidth:1,radius:10,cursor:"default",type:"curved"},collapseButton:{onlyOnHover:!0,enabled:!0,lineWidth:1,x:0,y:0,height:18,width:18,shape:"circle",style:{cursor:"pointer",fontWeight:"bold",fontSize:"1em"}},fillSpace:!1,tooltip:{linkFormat:"{point.fromNode.id} → {point.toNode.id}",pointFormat:"{point.id}"},dataLabels:{defer:!0,linkTextPath:{attributes:{startOffset:"50%"}},enabled:!0,linkFormatter:()=>"",pointFormat:void 0,padding:5,style:{textOverflow:"none"}},nodeDistance:30,nodeWidth:void 0}),tt(tl.prototype,{forceDL:!0,pointClass:m,NodeClass:p,LinkClass:S,isCartesian:!1}),r().registerSeriesType("treegraph",tl);let tn=o();export{tn as default};