Resources/chartjs/plugins/chartjs-chart-graph.js
2023-10-06 12:31:19 +00:00

2 lines
35 KiB
JavaScript

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("chart.js"),require("chart.js/helpers")):"function"==typeof define&&define.amd?define(["exports","chart.js","chart.js/helpers"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).ChartGraphs={},t.Chart,t.Chart.helpers)}(this,(function(t,e,n){"use strict";function r(t,e,n){return{fx:(e.x-t.x)*n.tension,fy:0,tx:(t.x-e.x)*n.tension,ty:0}}function i(t,e,n){return{fx:0,fy:(e.y-t.y)*n.tension,tx:0,ty:(t.y-e.y)*n.tension}}function a(t,e,n){const r=Math.hypot(e.x-t.x,e.y-t.y)*n.tension;return{fx:Number.isNaN(t.angle)?0:Math.cos(t.angle||0)*r,fy:Number.isNaN(t.angle)?0:Math.sin(t.angle||0)*-r,tx:Number.isNaN(e.angle)?0:Math.cos(e.angle||0)*-r,ty:Number.isNaN(e.angle)?0:Math.sin(e.angle||0)*r}}class s extends e.LineElement{draw(t){const{options:e}=this;t.save(),t.lineCap=e.borderCapStyle,t.setLineDash(e.borderDash||[]),t.lineDashOffset=e.borderDashOffset,t.lineJoin=e.borderJoinStyle,t.lineWidth=e.borderWidth,t.strokeStyle=e.borderColor;const n={horizontal:r,vertical:i,radial:a},s=n[this._orientation]||n.horizontal,o=(n,r)=>{const i=s(n,r,e),a={cpx:n.x+i.fx,cpy:n.y+i.fy},o={cpx:r.x+i.tx,cpy:r.y+i.ty};if("middle"===e.stepped){const e=(n.x+r.x)/2;t.lineTo(e,n.y),t.lineTo(e,r.y),t.lineTo(r.x,r.y)}else"after"===e.stepped?(t.lineTo(n.x,r.y),t.lineTo(r.x,r.y)):e.stepped?(t.lineTo(r.x,n.y),t.lineTo(r.x,r.y)):e.tension?t.bezierCurveTo(a.cpx,a.cpy,o.cpx,o.cpy,r.x,r.y):t.lineTo(r.x,r.y);return r},l=this.source.getProps(["x","y","angle"]),u=this.target.getProps(["x","y","angle"]),h=this.getProps(["points"]).points;t.beginPath();let c=l;if(t.moveTo(c.x,c.y),h&&h.length>0&&(c=h.reduce(o,c)),o(c,u),t.stroke(),e.directed){const n=u,r=s(c,n,e),i=e.arrowHeadSize,a=e.arrowHeadOffset;if(t.save(),t.translate(n.x,u.y),"middle"===e.stepped){const e=(c.x+n.x)/2;t.rotate(Math.atan2(n.y-n.y,n.x-e))}else if("after"===e.stepped)t.rotate(Math.atan2(n.y-n.y,n.x-c.x));else if(e.stepped)t.rotate(Math.atan2(n.y-c.y,n.x-n.x));else if(e.tension){const e={x:n.x+r.tx,y:n.y+r.ty},i=.1;t.rotate(Math.atan2(n.y-e.y*(1-i)-c.y*i,n.x-e.x*(1-i)-c.x*i))}else t.rotate(Math.atan2(n.y-c.y,n.x-c.x));t.translate(-a,0),t.beginPath(),t.moveTo(0,0),t.lineTo(-i,-i/2),t.lineTo(.9*-i,0),t.lineTo(-i,i/2),t.closePath(),t.fillStyle=t.strokeStyle,t.fill(),t.restore()}t.restore()}}function o(t,e,n){return t===e?e:t+(e-t)*n}function l(t,n,r,i=[],a=[]){e.registry.addControllers(r),Array.isArray(i)?e.registry.addElements(...i):e.registry.addElements(i),Array.isArray(a)?e.registry.addScales(...a):e.registry.addScales(a);const s=n;return s.type=t,s}s.id="edgeLine",s.defaults={...e.LineElement.defaults,tension:0,directed:!1,arrowHeadSize:15,arrowHeadOffset:5},s.defaultRoutes=e.LineElement.defaultRoutes,s.descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t};class u extends e.ScatterController{constructor(){super(...arguments),this._scheduleResyncLayoutId=-1,this._edgeListener={_onDataPush:(...t)=>{const e=t.length,n=this.getDataset().edges.length-e,r=this._cachedMeta._parsedEdges;t.forEach((t=>{r.push(this._parseDefinedEdge(t))})),this._insertEdgeElements(n,e)},_onDataPop:()=>{this._cachedMeta.edges.pop(),this._cachedMeta._parsedEdges.pop(),this._scheduleResyncLayout()},_onDataShift:()=>{this._cachedMeta.edges.shift(),this._cachedMeta._parsedEdges.shift(),this._scheduleResyncLayout()},_onDataSplice:(t,e,...n)=>{if(this._cachedMeta.edges.splice(t,e),this._cachedMeta._parsedEdges.splice(t,e),n.length>0){this._cachedMeta._parsedEdges.splice(t,0,...n.map((t=>this._parseDefinedEdge(t)))),this._insertEdgeElements(t,n.length)}else this._scheduleResyncLayout()},_onDataUnshift:(...t)=>{this._cachedMeta._parsedEdges.unshift(...t.map((t=>this._parseDefinedEdge(t)))),this._insertEdgeElements(0,t.length)}}}initialize(){const t=this._type,n=e.defaults.datasets[t];this.edgeElementType=e.registry.getElement(n.edgeElementType),super.initialize(),this.enableOptionSharing=!0,this._scheduleResyncLayout()}parse(t,e){const n=this._cachedMeta,r=this._data,{iScale:i,vScale:a}=n;for(let i=0;i<e;i+=1){const e=i+t,a=r[e],s=n._parsed[e]||{};a&&"number"==typeof a.x&&(s.x=a.x),a&&"number"==typeof a.y&&(s.y=a.y),n._parsed[e]=s}n._parsed.length>r.length&&n._parsed.splice(r.length,n._parsed.length-r.length),this._cachedMeta._sorted=!1,i._dataLimitsCached=!1,a._dataLimitsCached=!1,this._parseEdges()}reset(){this.resetLayout(),super.reset()}update(t){super.update(t);const e=this._cachedMeta.edges||[];this.updateEdgeElements(e,0,t)}destroy(){e.ScatterController.prototype.destroy.call(this),this._edges&&n.unlistenArrayEvents(this._edges,this._edgeListener),this.stopLayout()}updateEdgeElements(t,e,n){var r,i,a;const s={_cachedDataOpts:this._cachedDataOpts,dataElementType:this.dataElementType,_sharedOptions:this._sharedOptions};this._cachedDataOpts={},this.dataElementType=this.edgeElementType,this._sharedOptions=this._edgeSharedOptions;const o=this.getDataset(),l=this._cachedMeta,u=l.data,h=this._cachedMeta._parsedEdges;this.getContext(-1,!1,n),this.getDataset=()=>new Proxy(o,{get(t,e){var n;return"data"===e?null!==(n=t.edges)&&void 0!==n?n:[]:t[e]}}),this.getParsed=t=>h[t],l.data=l.edges;const c="reset"===n,d=this.resolveDataElementOptions(e,n),f={},p=null!==(r=this.getSharedOptions(d))&&void 0!==r?r:f,y=this.includeOptions(n,p),{xScale:g,yScale:x}=l,_={x:null!==(i=null==g?void 0:g.getBasePixel())&&void 0!==i?i:0,y:null!==(a=null==x?void 0:x.getBasePixel())&&void 0!==a?a:0};function v(t){var e,n;return{x:c?_.x:null!==(e=null==g?void 0:g.getPixelForValue(t.x,0))&&void 0!==e?e:0,y:c?_.y:null!==(n=null==x?void 0:x.getPixelForValue(t.y,0))&&void 0!==n?n:0,angle:t.angle}}for(let r=0;r<t.length;r+=1){const i=t[r],a=e+r,s=h[a],o={source:u[s.source],target:u[s.target],points:Array.isArray(s.points)?s.points.map((t=>v(t))):[]};o.points._source=u[s.source],y&&(o.options=p!==f?p:this.resolveDataElementOptions(a,n)),this.updateEdgeElement(i,a,o,n)}this.updateSharedOptions(p,n,d),this._edgeSharedOptions=this._sharedOptions,Object.assign(this,s),delete this.getDataset,delete this.getParsed,l.data=u}updateEdgeElement(t,e,n,r){super.updateElement(t,e,n,r)}updateElement(t,e,n,r){var i;if("reset"===r){const{xScale:t}=this._cachedMeta;n.x=null!==(i=null==t?void 0:t.getBasePixel())&&void 0!==i?i:0}super.updateElement(t,e,n,r)}resolveNodeIndex(t,e){if("number"==typeof e)return e;if("string"==typeof e){return this.chart.data.labels.indexOf(e)}const n=t.indexOf(e);if(n>=0)return n;const r=this.getDataset().data.indexOf(e);return r>=0?r:(console.warn("cannot resolve edge ref",e),-1)}buildOrUpdateElements(){const t=this.getDataset().edges||[];this._edges!==t&&(this._edges&&n.unlistenArrayEvents(this._edges,this._edgeListener),t&&Object.isExtensible(t)&&n.listenArrayEvents(t,this._edgeListener),this._edges=t),super.buildOrUpdateElements()}draw(){const t=this._cachedMeta,e=this._cachedMeta.edges||[],r=t.data||[],i=this.chart.chartArea,a=this._ctx;e.length>0&&(n.clipArea(a,i),e.forEach((t=>t.draw.call(t,a,i))),n.unclipArea(a)),r.forEach((t=>t.draw.call(t,a,i)))}_resyncElements(){e.ScatterController.prototype._resyncElements.call(this);const t=this._cachedMeta,n=t._parsedEdges,r=t.edges||(t.edges=[]),i=r.length,a=n.length;a<i?(r.splice(a,i-a),this._scheduleResyncLayout()):a>i&&this._insertEdgeElements(i,a-i)}getTreeRootIndex(){const t=this.getDataset(),e=t.data;if(t.derivedEdges)return e.findIndex((t=>null==t.parent));const n=this._cachedMeta._parsedEdges||[],r=new Set(e.map(((t,e)=>e)));return n.forEach((t=>{r.delete(t.target)})),Array.from(r)[0]}getTreeRoot(){const t=this.getTreeRootIndex(),e=this.getParsed(t);return e.index=t,e}getTreeChildren(t){var e;const n=this._cachedMeta._parsedEdges,r=null!==(e=t.index)&&void 0!==e?e:0;return n.filter((t=>t.source===r)).map((t=>{const e=this.getParsed(t.target);return e.index=t.target,e}))}_parseDefinedEdge(t){const e=this.getDataset(),{data:n}=e;return{source:this.resolveNodeIndex(n,t.source),target:this.resolveNodeIndex(n,t.target),points:[]}}_parseEdges(){const t=this.getDataset(),e=t.data,n=this._cachedMeta;if(t.edges){const e=t.edges.map((t=>this._parseDefinedEdge(t)));return n._parsedEdges=e,e}const r=[];return n._parsedEdges=r,e.forEach(((t,n)=>{if(null!=t.parent){const i=this.resolveNodeIndex(e,t.parent);r.push({source:i,target:n,points:[]})}})),r}addElements(){super.addElements();const t=this._cachedMeta,e=this._parseEdges(),n=new Array(e.length);t.edges=n;for(let t=0;t<e.length;t+=1)n[t]=new this.edgeElementType}_resyncEdgeElements(){const t=this._cachedMeta,e=this._parseEdges(),n=t.edges||(t.edges=[]);for(let t=0;t<e.length;t+=1)n[t]=n[t]||new this.edgeElementType;e.length<n.length&&n.splice(e.length,n.length)}_insertElements(t,n){e.ScatterController.prototype._insertElements.call(this,t,n),n>0&&this._resyncEdgeElements()}_removeElements(t,n){e.ScatterController.prototype._removeElements.call(this,t,n),n>0&&this._resyncEdgeElements()}_insertEdgeElements(t,e){const n=[];for(let t=0;t<e;t+=1)n.push(new this.edgeElementType);this._cachedMeta.edges.splice(t,0,...n),this.updateEdgeElements(n,t,"reset"),this._scheduleResyncLayout()}reLayout(){}resetLayout(){}stopLayout(){}_scheduleResyncLayout(){null!=this._scheduleResyncLayoutId&&this._scheduleResyncLayoutId>=0||(this._scheduleResyncLayoutId=requestAnimationFrame((()=>{this._scheduleResyncLayoutId=-1,this.resyncLayout()})))}resyncLayout(){}}u.id="graph",u.defaults=n.merge({},[e.ScatterController.defaults,{clip:10,animations:{points:{fn:function(t,e,n){return Array.isArray(t)&&Array.isArray(e)&&e.length>0?e.map(((e,r)=>function(t,e,n,r){const i=t[e]||t[e-1]||t._source;return i?{x:o(i.x,n.x,r),y:o(i.y,n.y,r),angle:Number.isNaN(i.angle)?o(i.angle,n.angle,r):void 0}:n}(t,r,e,n))):e},properties:["points"]}},edgeElementType:s.id}]),u.overrides=n.merge({},[e.ScatterController.overrides,{layout:{padding:10},scales:{x:{display:!1,ticks:{maxTicksLimit:2,precision:100,minRotation:0,maxRotation:0}},y:{display:!1,ticks:{maxTicksLimit:2,precision:100,minRotation:0,maxRotation:0}}},plugins:{tooltip:{callbacks:{label(t){var e,n;return null===(n=null===(e=t.chart.data)||void 0===e?void 0:e.labels)||void 0===n?void 0:n[t.dataIndex]}}}}}]);class h extends e.Chart{constructor(t,n){super(t,l("graph",n,u,[s,e.PointElement],e.LinearScale))}}function c(t,e){var n,r=1;function i(){var i,a,s=n.length,o=0,l=0;for(i=0;i<s;++i)o+=(a=n[i]).x,l+=a.y;for(o=(o/s-t)*r,l=(l/s-e)*r,i=0;i<s;++i)(a=n[i]).x-=o,a.y-=l}return null==t&&(t=0),null==e&&(e=0),i.initialize=function(t){n=t},i.x=function(e){return arguments.length?(t=+e,i):t},i.y=function(t){return arguments.length?(e=+t,i):e},i.strength=function(t){return arguments.length?(r=+t,i):r},i}function d(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a,s,o,l,u,h,c,d,f=t._root,p={data:r},y=t._x0,g=t._y0,x=t._x1,_=t._y1;if(!f)return t._root=p,t;for(;f.length;)if((u=e>=(a=(y+x)/2))?y=a:x=a,(h=n>=(s=(g+_)/2))?g=s:_=s,i=f,!(f=f[c=h<<1|u]))return i[c]=p,t;if(o=+t._x.call(null,f.data),l=+t._y.call(null,f.data),e===o&&n===l)return p.next=f,i?i[c]=p:t._root=p,t;do{i=i?i[c]=new Array(4):t._root=new Array(4),(u=e>=(a=(y+x)/2))?y=a:x=a,(h=n>=(s=(g+_)/2))?g=s:_=s}while((c=h<<1|u)==(d=(l>=s)<<1|o>=a));return i[d]=f,i[c]=p,t}function f(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function p(t){return t[0]}function y(t){return t[1]}function g(t,e,n){var r=new x(null==e?p:e,null==n?y:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function x(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function _(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}h.id=u.id;var v=g.prototype=x.prototype;function m(t){return function(){return t}}function E(t){return 1e-6*(t()-.5)}function w(t){return t.x+t.vx}function N(t){return t.y+t.vy}function M(t){var e,n,r,i=1,a=1;function s(){for(var t,s,l,u,h,c,d,f=e.length,p=0;p<a;++p)for(s=g(e,w,N).visitAfter(o),t=0;t<f;++t)l=e[t],c=n[l.index],d=c*c,u=l.x+l.vx,h=l.y+l.vy,s.visit(y);function y(t,e,n,a,s){var o=t.data,f=t.r,p=c+f;if(!o)return e>u+p||a<u-p||n>h+p||s<h-p;if(o.index>l.index){var y=u-o.x-o.vx,g=h-o.y-o.vy,x=y*y+g*g;x<p*p&&(0===y&&(x+=(y=E(r))*y),0===g&&(x+=(g=E(r))*g),x=(p-(x=Math.sqrt(x)))/x*i,l.vx+=(y*=x)*(p=(f*=f)/(d+f)),l.vy+=(g*=x)*p,o.vx-=y*(p=1-p),o.vy-=g*p)}}}function o(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function l(){if(e){var r,i,a=e.length;for(n=new Array(a),r=0;r<a;++r)i=e[r],n[i.index]=+t(i,r,e)}}return"function"!=typeof t&&(t=m(null==t?1:+t)),s.initialize=function(t,n){e=t,r=n,l()},s.iterations=function(t){return arguments.length?(a=+t,s):a},s.strength=function(t){return arguments.length?(i=+t,s):i},s.radius=function(e){return arguments.length?(t="function"==typeof e?e:m(+e),l(),s):t},s}function A(t){return t.index}function b(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function L(t){var e,n,r,i,a,s,o=A,l=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},u=m(30),h=1;function c(r){for(var i=0,o=t.length;i<h;++i)for(var l,u,c,d,f,p,y,g=0;g<o;++g)u=(l=t[g]).source,d=(c=l.target).x+c.vx-u.x-u.vx||E(s),f=c.y+c.vy-u.y-u.vy||E(s),d*=p=((p=Math.sqrt(d*d+f*f))-n[g])/p*r*e[g],f*=p,c.vx-=d*(y=a[g]),c.vy-=f*y,u.vx+=d*(y=1-y),u.vy+=f*y}function d(){if(r){var s,l,u=r.length,h=t.length,c=new Map(r.map(((t,e)=>[o(t,e,r),t])));for(s=0,i=new Array(u);s<h;++s)(l=t[s]).index=s,"object"!=typeof l.source&&(l.source=b(c,l.source)),"object"!=typeof l.target&&(l.target=b(c,l.target)),i[l.source.index]=(i[l.source.index]||0)+1,i[l.target.index]=(i[l.target.index]||0)+1;for(s=0,a=new Array(h);s<h;++s)l=t[s],a[s]=i[l.source.index]/(i[l.source.index]+i[l.target.index]);e=new Array(h),f(),n=new Array(h),p()}}function f(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+l(t[n],n,t)}function p(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+u(t[e],e,t)}return null==t&&(t=[]),c.initialize=function(t,e){r=t,s=e,d()},c.links=function(e){return arguments.length?(t=e,d(),c):t},c.id=function(t){return arguments.length?(o=t,c):o},c.iterations=function(t){return arguments.length?(h=+t,c):h},c.strength=function(t){return arguments.length?(l="function"==typeof t?t:m(+t),f(),c):l},c.distance=function(t){return arguments.length?(u="function"==typeof t?t:m(+t),p(),c):u},c}v.copy=function(){var t,e,n=new x(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=_(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=_(e));return n},v.add=function(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return d(this.cover(e,n),e,n,t)},v.addAll=function(t){var e,n,r,i,a=t.length,s=new Array(a),o=new Array(a),l=1/0,u=1/0,h=-1/0,c=-1/0;for(n=0;n<a;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(s[n]=r,o[n]=i,r<l&&(l=r),r>h&&(h=r),i<u&&(u=i),i>c&&(c=i));if(l>h||u>c)return this;for(this.cover(l,u).cover(h,c),n=0;n<a;++n)d(this,s[n],o[n],t[n]);return this},v.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var s,o,l=i-n||1,u=this._root;n>t||t>=i||r>e||e>=a;)switch(o=(e<r)<<1|t<n,(s=new Array(4))[o]=u,u=s,l*=2,o){case 0:i=n+l,a=r+l;break;case 1:n=i-l,a=r+l;break;case 2:i=n+l,r=a-l;break;case 3:n=i-l,r=a-l}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this},v.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},v.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},v.find=function(t,e,n){var r,i,a,s,o,l,u,h=this._x0,c=this._y0,d=this._x1,p=this._y1,y=[],g=this._root;for(g&&y.push(new f(g,h,c,d,p)),null==n?n=1/0:(h=t-n,c=e-n,d=t+n,p=e+n,n*=n);l=y.pop();)if(!(!(g=l.node)||(i=l.x0)>d||(a=l.y0)>p||(s=l.x1)<h||(o=l.y1)<c))if(g.length){var x=(i+s)/2,_=(a+o)/2;y.push(new f(g[3],x,_,s,o),new f(g[2],i,_,x,o),new f(g[1],x,a,s,_),new f(g[0],i,a,x,_)),(u=(e>=_)<<1|t>=x)&&(l=y[y.length-1],y[y.length-1]=y[y.length-1-u],y[y.length-1-u]=l)}else{var v=t-+this._x.call(null,g.data),m=e-+this._y.call(null,g.data),E=v*v+m*m;if(E<n){var w=Math.sqrt(n=E);h=t-w,c=e-w,d=t+w,p=e+w,r=g.data}}return r},v.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(s=+this._y.call(null,t)))return this;var e,n,r,i,a,s,o,l,u,h,c,d,f=this._root,p=this._x0,y=this._y0,g=this._x1,x=this._y1;if(!f)return this;if(f.length)for(;;){if((u=a>=(o=(p+g)/2))?p=o:g=o,(h=s>=(l=(y+x)/2))?y=l:x=l,e=f,!(f=f[c=h<<1|u]))return this;if(!f.length)break;(e[c+1&3]||e[c+2&3]||e[c+3&3])&&(n=e,d=c)}for(;f.data!==t;)if(r=f,!(f=f.next))return this;return(i=f.next)&&delete f.next,r?(i?r.next=i:delete r.next,this):e?(i?e[c]=i:delete e[c],(f=e[0]||e[1]||e[2]||e[3])&&f===(e[3]||e[2]||e[1]||e[0])&&!f.length&&(n?n[d]=f:this._root=f),this):(this._root=i,this)},v.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},v.root=function(){return this._root},v.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},v.visit=function(t){var e,n,r,i,a,s,o=[],l=this._root;for(l&&o.push(new f(l,this._x0,this._y0,this._x1,this._y1));e=o.pop();)if(!t(l=e.node,r=e.x0,i=e.y0,a=e.x1,s=e.y1)&&l.length){var u=(r+a)/2,h=(i+s)/2;(n=l[3])&&o.push(new f(n,u,h,a,s)),(n=l[2])&&o.push(new f(n,r,h,u,s)),(n=l[1])&&o.push(new f(n,u,i,a,h)),(n=l[0])&&o.push(new f(n,r,i,u,h))}return this},v.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new f(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var a,s=e.x0,o=e.y0,l=e.x1,u=e.y1,h=(s+l)/2,c=(o+u)/2;(a=i[0])&&n.push(new f(a,s,o,h,c)),(a=i[1])&&n.push(new f(a,h,o,l,c)),(a=i[2])&&n.push(new f(a,s,c,h,u)),(a=i[3])&&n.push(new f(a,h,c,l,u))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},v.x=function(t){return arguments.length?(this._x=t,this):this._x},v.y=function(t){return arguments.length?(this._y=t,this):this._y};var T={value:()=>{}};function z(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new D(r)}function D(t){this._=t}function S(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function I(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=T,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}D.prototype=z.prototype={constructor:D,on:function(t,e){var n,r,i=this._,a=(r=i,(t+"").trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),s=-1,o=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++s<o;)if(n=(t=a[s]).type)i[n]=I(i[n],t.name,e);else if(null==e)for(n in i)i[n]=I(i[n],t.name,null);return this}for(;++s<o;)if((n=(t=a[s]).type)&&(n=S(i[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new D(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var O,P,C=0,k=0,R=0,q=1e3,j=0,F=0,B=0,Y="object"==typeof performance&&performance.now?performance:Date,G="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function X(){return F||(G(V),F=Y.now()+B)}function V(){F=0}function H(){this._call=this._time=this._next=null}function U(t,e,n){var r=new H;return r.restart(t,e,n),r}function W(){F=(j=Y.now())+B,C=k=0;try{!function(){X(),++C;for(var t,e=O;e;)(t=F-e._time)>=0&&e._call.call(void 0,t),e=e._next;--C}()}finally{C=0,function(){var t,e,n=O,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:O=e);P=t,K(r)}(),F=0}}function J(){var t=Y.now(),e=t-j;e>q&&(B-=e,j=t)}function K(t){C||(k&&(k=clearTimeout(k)),t-F>24?(t<1/0&&(k=setTimeout(W,t-Y.now()-B)),R&&(R=clearInterval(R))):(R||(j=Y.now(),R=setInterval(J,q)),C=1,G(W)))}H.prototype=U.prototype={constructor:H,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?X():+n)+(null==e?0:+e),this._next||P===this||(P?P._next=this:O=this,P=this),this._call=t,this._time=n,K()},stop:function(){this._call&&(this._call=null,this._time=1/0,K())}};const Q=1664525,Z=1013904223,$=4294967296;function tt(t){return t.x}function et(t){return t.y}var nt=Math.PI*(3-Math.sqrt(5));function rt(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,s=.6,o=new Map,l=U(c),u=z("tick","end"),h=function(){let t=1;return()=>(t=(Q*t+Z)%$)/$}();function c(){d(),u.call("tick",e),n<r&&(l.stop(),u.call("end",e))}function d(r){var l,u,h=t.length;void 0===r&&(r=1);for(var c=0;c<r;++c)for(n+=(a-n)*i,o.forEach((function(t){t(n)})),l=0;l<h;++l)null==(u=t[l]).fx?u.x+=u.vx*=s:(u.x=u.fx,u.vx=0),null==u.fy?u.y+=u.vy*=s:(u.y=u.fy,u.vy=0);return e}function f(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var i=10*Math.sqrt(.5+n),a=n*nt;e.x=i*Math.cos(a),e.y=i*Math.sin(a)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function p(e){return e.initialize&&e.initialize(t,h),e}return null==t&&(t=[]),f(),e={tick:d,restart:function(){return l.restart(c),e},stop:function(){return l.stop(),e},nodes:function(n){return arguments.length?(t=n,f(),o.forEach(p),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(r=+t,e):r},alphaDecay:function(t){return arguments.length?(i=+t,e):+i},alphaTarget:function(t){return arguments.length?(a=+t,e):a},velocityDecay:function(t){return arguments.length?(s=1-t,e):1-s},randomSource:function(t){return arguments.length?(h=t,o.forEach(p),e):h},force:function(t,n){return arguments.length>1?(null==n?o.delete(t):o.set(t,p(n)),e):o.get(t)},find:function(e,n,r){var i,a,s,o,l,u=0,h=t.length;for(null==r?r=1/0:r*=r,u=0;u<h;++u)(s=(i=e-(o=t[u]).x)*i+(a=n-o.y)*a)<r&&(l=o,r=s);return l},on:function(t,n){return arguments.length>1?(u.on(t,n),e):u.on(t)}}}function it(){var t,e,n,r,i,a=m(-30),s=1,o=1/0,l=.81;function u(n){var i,a=t.length,s=g(t,tt,et).visitAfter(c);for(r=n,i=0;i<a;++i)e=t[i],s.visit(d)}function h(){if(t){var e,n,r=t.length;for(i=new Array(r),e=0;e<r;++e)n=t[e],i[n.index]=+a(n,e,t)}}function c(t){var e,n,r,a,s,o=0,l=0;if(t.length){for(r=a=s=0;s<4;++s)(e=t[s])&&(n=Math.abs(e.value))&&(o+=e.value,l+=n,r+=n*e.x,a+=n*e.y);t.x=r/l,t.y=a/l}else{(e=t).x=e.data.x,e.y=e.data.y;do{o+=i[e.data.index]}while(e=e.next)}t.value=o}function d(t,a,u,h){if(!t.value)return!0;var c=t.x-e.x,d=t.y-e.y,f=h-a,p=c*c+d*d;if(f*f/l<p)return p<o&&(0===c&&(p+=(c=E(n))*c),0===d&&(p+=(d=E(n))*d),p<s&&(p=Math.sqrt(s*p)),e.vx+=c*t.value*r/p,e.vy+=d*t.value*r/p),!0;if(!(t.length||p>=o)){(t.data!==e||t.next)&&(0===c&&(p+=(c=E(n))*c),0===d&&(p+=(d=E(n))*d),p<s&&(p=Math.sqrt(s*p)));do{t.data!==e&&(f=i[t.data.index]*r/p,e.vx+=c*f,e.vy+=d*f)}while(t=t.next)}}return u.initialize=function(e,r){t=e,n=r,h()},u.strength=function(t){return arguments.length?(a="function"==typeof t?t:m(+t),h(),u):a},u.distanceMin=function(t){return arguments.length?(s=t*t,u):Math.sqrt(s)},u.distanceMax=function(t){return arguments.length?(o=t*t,u):Math.sqrt(o)},u.theta=function(t){return arguments.length?(l=t*t,u):Math.sqrt(l)},u}function at(t,e,n){var r,i,a,s=m(.1);function o(t){for(var s=0,o=r.length;s<o;++s){var l=r[s],u=l.x-e||1e-6,h=l.y-n||1e-6,c=Math.sqrt(u*u+h*h),d=(a[s]-c)*i[s]*t/c;l.vx+=u*d,l.vy+=h*d}}function l(){if(r){var e,n=r.length;for(i=new Array(n),a=new Array(n),e=0;e<n;++e)a[e]=+t(r[e],e,r),i[e]=isNaN(a[e])?0:+s(r[e],e,r)}}return"function"!=typeof t&&(t=m(+t)),null==e&&(e=0),null==n&&(n=0),o.initialize=function(t){r=t,l()},o.strength=function(t){return arguments.length?(s="function"==typeof t?t:m(+t),l(),o):s},o.radius=function(e){return arguments.length?(t="function"==typeof e?e:m(+e),l(),o):t},o.x=function(t){return arguments.length?(e=+t,o):e},o.y=function(t){return arguments.length?(n=+t,o):n},o}function st(t){var e,n,r,i=m(.1);function a(t){for(var i,a=0,s=e.length;a<s;++a)(i=e[a]).vx+=(r[a]-i.x)*n[a]*t}function s(){if(e){var a,s=e.length;for(n=new Array(s),r=new Array(s),a=0;a<s;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return"function"!=typeof t&&(t=m(null==t?0:+t)),a.initialize=function(t){e=t,s()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:m(+t),s(),a):i},a.x=function(e){return arguments.length?(t="function"==typeof e?e:m(+e),s(),a):t},a}function ot(t){var e,n,r,i=m(.1);function a(t){for(var i,a=0,s=e.length;a<s;++a)(i=e[a]).vy+=(r[a]-i.y)*n[a]*t}function s(){if(e){var a,s=e.length;for(n=new Array(s),r=new Array(s),a=0;a<s;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return"function"!=typeof t&&(t=m(null==t?0:+t)),a.initialize=function(t){e=t,s()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:m(+t),s(),a):i},a.y=function(e){return arguments.length?(t="function"==typeof e?e:m(+e),s(),a):t},a}class lt extends u{constructor(t,e){super(t,e),this._simulation=rt().on("tick",(()=>{this._copyPosition(),this.chart.render()})).on("end",(()=>{this._copyPosition(),this.chart.render(),this.chart.update("default")}));const n=this.options.simulation,r={center:c,collide:M,link:L,manyBody:it,x:st,y:ot,radial:at};Object.keys(r).forEach((t=>{const e=n.forces[t];if(!e)return;const i=r[t]();"boolean"!=typeof e&&Object.keys(e).forEach((t=>{i[t](e[t])})),this._simulation.force(t,i)})),this._simulation.stop()}_copyPosition(){const t=this._cachedMeta._parsed,e=t.reduce(((t,e)=>{const n=e._sim;return n&&null!=n.x&&null!=n.y?(n.x<t.minX&&(t.minX=n.x),n.x>t.maxX&&(t.maxX=n.x),n.y<t.minY&&(t.minY=n.y),n.y>t.maxY&&(t.maxY=n.y),t):t}),{minX:Number.POSITIVE_INFINITY,maxX:Number.NEGATIVE_INFINITY,minY:Number.POSITIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY});t.forEach((t=>{var n,r;t._sim&&(t.x=((null!==(n=t._sim.x)&&void 0!==n?n:0)-e.minX)/(e.maxX-e.minX)*2-1,t.y=(t=>(t-e.minY)/(e.maxY-e.minY)*2-1)(null!==(r=t._sim.y)&&void 0!==r?r:0))}));const{xScale:n,yScale:r}=this._cachedMeta;this._cachedMeta.data.forEach(((e,i)=>{var a,s;const o=t[i];Object.assign(e,{x:null!==(a=null==n?void 0:n.getPixelForValue(o.x,i))&&void 0!==a?a:0,y:null!==(s=null==r?void 0:r.getPixelForValue(o.y,i))&&void 0!==s?s:0,skip:!1})}))}resetLayout(){super.resetLayout(),this._simulation.stop();const t=this._cachedMeta._parsed.map(((t,e)=>{const n={...t};return n.index=e,t._sim=n,t.reset?(delete n.x,delete n.y,delete n.vx,delete n.vy,n):n}));this._simulation.nodes(t),this._simulation.alpha(1).restart()}resyncLayout(){super.resyncLayout(),this._simulation.stop();const t=this._cachedMeta,e=t._parsed.map(((t,e)=>{const n={...t};return n.index=e,t._sim=n,null===n.x&&delete n.x,null===n.y&&delete n.y,null==n.x&&null==n.y&&(t.reset=!0),n})),n=this._simulation.force("link");n&&n.links([]),this._simulation.nodes(e),n&&n.links((t._parsedEdges||[]).map((t=>({...t})))),this.options.simulation.initialIterations>0?(this._simulation.alpha(1),this._simulation.tick(this.options.simulation.initialIterations),this._copyPosition(),this.options.simulation.autoRestart?this._simulation.restart():requestAnimationFrame((()=>this.chart.update()))):this.options.simulation.autoRestart&&this._simulation.alpha(1).restart()}reLayout(){this._simulation.alpha(1).restart()}stopLayout(){super.stopLayout(),this._simulation.stop()}}lt.id="forceDirectedGraph",lt.defaults=n.merge({},[u.defaults,{animation:!1,simulation:{initialIterations:0,autoRestart:!0,forces:{center:!0,collide:!1,link:!0,manyBody:!0,x:!1,y:!1,radial:!1}}}]),lt.overrides=n.merge({},[u.overrides,{scales:{x:{min:-1,max:1},y:{min:-1,max:1}}}]);class ut extends e.Chart{constructor(t,n){super(t,l("forceDirectedGraph",n,lt,[s,e.PointElement],e.LinearScale))}}function ht(t,e){return t.parent===e.parent?1:2}function ct(t,e){return t+e.x}function dt(t,e){return Math.max(t,e.y)}function ft(){var t=ht,e=1,n=1,r=!1;function i(i){var a,s=0;i.eachAfter((function(e){var n=e.children;n?(e.x=function(t){return t.reduce(ct,0)/t.length}(n),e.y=function(t){return 1+t.reduce(dt,0)}(n)):(e.x=a?s+=t(e,a):0,e.y=0,a=e)}));var o=function(t){for(var e;e=t.children;)t=e[0];return t}(i),l=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),u=o.x-t(o,l)/2,h=l.x+t(l,o)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-u)/(h-u)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function pt(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function yt(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=xt)):void 0===e&&(e=gt);for(var n,r,i,a,s,o=new mt(t),l=[o];n=l.pop();)if((i=e(n.data))&&(s=(i=Array.from(i)).length))for(n.children=i,a=s-1;a>=0;--a)l.push(r=i[a]=new mt(i[a])),r.parent=n,r.depth=n.depth+1;return o.eachBefore(vt)}function gt(t){return t.children}function xt(t){return Array.isArray(t)?t[1]:null}function _t(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function vt(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function mt(t){this.data=t,this.depth=this.height=0,this.parent=null}function Et(t,e){return t.parent===e.parent?1:2}function wt(t){var e=t.children;return e?e[0]:t.t}function Nt(t){var e=t.children;return e?e[e.length-1]:t.t}function Mt(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function At(t,e,n){return t.a.parent===e.parent?t.a:n}function bt(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function Lt(){var t=Et,e=1,n=1,r=null;function i(i){var l=function(t){for(var e,n,r,i,a,s=new bt(t,0),o=[s];e=o.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;i>=0;--i)o.push(n=e.children[i]=new bt(r[i],i)),n.parent=e;return(s.parent=new bt(null,0)).children=[s],s}(i);if(l.eachAfter(a),l.parent.m=-l.z,l.eachBefore(s),r)i.eachBefore(o);else{var u=i,h=i,c=i;i.eachBefore((function(t){t.x<u.x&&(u=t),t.x>h.x&&(h=t),t.depth>c.depth&&(c=t)}));var d=u===h?1:t(u,h)/2,f=d-u.x,p=e/(h.x+d+f),y=n/(c.depth||1);i.eachBefore((function(t){t.x=(t.x+f)*p,t.y=t.depth*y}))}return i}function a(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var a=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,a=e,s=e,o=n,l=a.parent.children[0],u=a.m,h=s.m,c=o.m,d=l.m;o=Nt(o),a=wt(a),o&&a;)l=wt(l),(s=Nt(s)).a=e,(i=o.z+c-a.z-u+t(o._,a._))>0&&(Mt(At(o,e,r),e,i),u+=i,h+=i),c+=o.m,u+=a.m,d+=l.m,h+=s.m;o&&!Nt(s)&&(s.t=o,s.m+=c-h),a&&!wt(l)&&(l.t=a,l.m+=u-d,r=e)}return r}(e,i,e.parent.A||r[0])}function s(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function o(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}ut.id=lt.id,mt.prototype=yt.prototype={constructor:mt,count:function(){return this.eachAfter(pt)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,a=this,s=[a],o=[],l=-1;a=s.pop();)if(o.push(a),n=a.children)for(r=0,i=n.length;r<i;++r)s.push(n[r]);for(;a=o.pop();)t.call(e,a,++l,this);return this},eachBefore:function(t,e){for(var n,r,i=this,a=[i],s=-1;i=a.pop();)if(t.call(e,i,++s,this),n=i.children)for(r=n.length-1;r>=0;--r)a.push(n[r]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return yt(this).eachBefore(_t)},[Symbol.iterator]:function*(){var t,e,n,r,i=this,a=[i];do{for(t=a.reverse(),a=[];i=t.pop();)if(yield i,e=i.children)for(n=0,r=e.length;n<r;++n)a.push(e[n])}while(a.length)}},bt.prototype=Object.create(mt.prototype);class Tt extends u{updateEdgeElement(t,e,n,r){n._orientation=this.options.tree.orientation,super.updateEdgeElement(t,e,n,r)}updateElement(t,e,n,r){null!=e&&(n.angle=this.getParsed(e).angle),super.updateElement(t,e,n,r)}resyncLayout(){const t=this._cachedMeta;t.root=yt(this.getTreeRoot(),(t=>this.getTreeChildren(t))).count().sort(((t,e)=>{var n,r;return e.height-t.height||(null!==(n=e.data.index)&&void 0!==n?n:0)-(null!==(r=t.data.index)&&void 0!==r?r:0)})),this.doLayout(t.root),super.resyncLayout()}reLayout(t={}){if(t){Object.assign(this.options.tree,t);const e=this.getDataset();e.tree?Object.assign(e.tree,t):e.tree=t}this.doLayout(this._cachedMeta.root)}doLayout(t){const e=this.options.tree,n="tree"===e.mode?Lt():ft();"radial"===e.orientation?n.size([2*Math.PI,1]):n.size([2,2]);const r={horizontal:t=>{t.data.x=t.y-1,t.data.y=1-t.x},vertical:t=>{t.data.x=t.x-1,t.data.y=1-t.y},radial:t=>{t.data.x=Math.cos(t.x)*t.y,t.data.y=Math.sin(t.x)*t.y,t.data.angle=0===t.y?Number.NaN:t.x}};n(t).each(r[e.orientation]||r.horizontal),requestAnimationFrame((()=>this.chart.update()))}}Tt.id="dendrogram",Tt.defaults=n.merge({},[u.defaults,{tree:{mode:"dendrogram",orientation:"horizontal"},animations:{numbers:{type:"number",properties:["x","y","angle","radius","rotation","borderWidth"]}},tension:.4}]),Tt.overrides=n.merge({},[u.overrides,{scales:{x:{min:-1,max:1},y:{min:-1,max:1}}}]);class zt extends e.Chart{constructor(t,n){super(t,l("dendrogram",n,Tt,[s,e.PointElement],e.LinearScale))}}zt.id=Tt.id;class Dt extends Tt{}Dt.id="dendogram",Dt.defaults=n.merge({},[Tt.defaults,{tree:{mode:"dendrogram"}}]);const St=zt;class It extends Tt{}It.id="tree",It.defaults=n.merge({},[Tt.defaults,{tree:{mode:"tree"}}]),It.overrides=Tt.overrides;class Ot extends e.Chart{constructor(t,n){super(t,l("tree",n,It,[s,e.PointElement],e.LinearScale))}}Ot.id=It.id,e.registry.addControllers(Tt,Dt,lt,u,It),e.registry.addElements(s),t.DendogramChart=St,t.DendogramController=Dt,t.DendrogramChart=zt,t.DendrogramController=Tt,t.EdgeLine=s,t.ForceDirectedGraphChart=ut,t.ForceDirectedGraphController=lt,t.GraphChart=h,t.GraphController=u,t.TreeChart=Ot,t.TreeController=It}));