@vue-flow/minimap
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -1,2 +0,2 @@ | ||
var vueFlowMiniMap=function(ut,_,U){"use strict";const To="";var Qe={value:()=>{}};function It(){for(var t=0,e=arguments.length,n={},i;t<e;++t){if(!(i=arguments[t]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new wt(n)}function wt(t){this._=t}function Je(t,e){return t.trim().split(/^|\s+/).map(function(n){var i="",r=n.indexOf(".");if(r>=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}wt.prototype=It.prototype={constructor:wt,on:function(t,e){var n=this._,i=Je(t+"",n),r,s=-1,o=i.length;if(arguments.length<2){for(;++s<o;)if((r=(t=i[s]).type)&&(r=je(n[r],t.name)))return r;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++s<o;)if(r=(t=i[s]).type)n[r]=ae(n[r],t.name,e);else if(e==null)for(r in n)n[r]=ae(n[r],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new wt(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var n=new Array(r),i=0,r,s;i<r;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],i=0,r=s.length;i<r;++i)s[i].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,s=i.length;r<s;++r)i[r].value.apply(e,n)}};function je(t,e){for(var n=0,i=t.length,r;n<i;++n)if((r=t[n]).name===e)return r.value}function ae(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=Qe,t=t.slice(0,i).concat(t.slice(i+1));break}return n!=null&&t.push({name:e,value:n}),t}var Bt="http://www.w3.org/1999/xhtml";const ue={svg:"http://www.w3.org/2000/svg",xhtml:Bt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function _t(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),ue.hasOwnProperty(e)?{space:ue[e],local:t}:t}function tn(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Bt&&e.documentElement.namespaceURI===Bt?e.createElement(t):e.createElementNS(n,t)}}function en(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function le(t){var e=_t(t);return(e.local?en:tn)(e)}function nn(){}function Ht(t){return t==null?nn:function(){return this.querySelector(t)}}function rn(t){typeof t!="function"&&(t=Ht(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var s=e[r],o=s.length,a=i[r]=new Array(o),u,l,f=0;f<o;++f)(u=s[f])&&(l=t.call(u,u.__data__,f,s))&&("__data__"in u&&(l.__data__=u.__data__),a[f]=l);return new I(i,this._parents)}function on(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function sn(){return[]}function ce(t){return t==null?sn:function(){return this.querySelectorAll(t)}}function an(t){return function(){return on(t.apply(this,arguments))}}function un(t){typeof t=="function"?t=an(t):t=ce(t);for(var e=this._groups,n=e.length,i=[],r=[],s=0;s<n;++s)for(var o=e[s],a=o.length,u,l=0;l<a;++l)(u=o[l])&&(i.push(t.call(u,u.__data__,l,o)),r.push(u));return new I(i,r)}function fe(t){return function(){return this.matches(t)}}function he(t){return function(e){return e.matches(t)}}var ln=Array.prototype.find;function cn(t){return function(){return ln.call(this.children,t)}}function fn(){return this.firstElementChild}function hn(t){return this.select(t==null?fn:cn(typeof t=="function"?t:he(t)))}var dn=Array.prototype.filter;function mn(){return Array.from(this.children)}function pn(t){return function(){return dn.call(this.children,t)}}function gn(t){return this.selectAll(t==null?mn:pn(typeof t=="function"?t:he(t)))}function yn(t){typeof t!="function"&&(t=fe(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var s=e[r],o=s.length,a=i[r]=[],u,l=0;l<o;++l)(u=s[l])&&t.call(u,u.__data__,l,s)&&a.push(u);return new I(i,this._parents)}function de(t){return new Array(t.length)}function vn(){return new I(this._enter||this._groups.map(de),this._parents)}function xt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}xt.prototype={constructor:xt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function wn(t){return function(){return t}}function _n(t,e,n,i,r,s){for(var o=0,a,u=e.length,l=s.length;o<l;++o)(a=e[o])?(a.__data__=s[o],i[o]=a):n[o]=new xt(t,s[o]);for(;o<u;++o)(a=e[o])&&(r[o]=a)}function xn(t,e,n,i,r,s,o){var a,u,l=new Map,f=e.length,p=s.length,g=new Array(f),v;for(a=0;a<f;++a)(u=e[a])&&(g[a]=v=o.call(u,u.__data__,a,e)+"",l.has(v)?r[a]=u:l.set(v,u));for(a=0;a<p;++a)v=o.call(t,s[a],a,s)+"",(u=l.get(v))?(i[a]=u,u.__data__=s[a],l.delete(v)):n[a]=new xt(t,s[a]);for(a=0;a<f;++a)(u=e[a])&&l.get(g[a])===u&&(r[a]=u)}function bn(t){return t.__data__}function kn(t,e){if(!arguments.length)return Array.from(this,bn);var n=e?xn:_n,i=this._parents,r=this._groups;typeof t!="function"&&(t=wn(t));for(var s=r.length,o=new Array(s),a=new Array(s),u=new Array(s),l=0;l<s;++l){var f=i[l],p=r[l],g=p.length,v=Mn(t.call(f,f&&f.__data__,l,i)),k=v.length,N=a[l]=new Array(k),z=o[l]=new Array(k),b=u[l]=new Array(g);n(f,p,N,z,b,v,e);for(var A=0,T=0,P,B;A<k;++A)if(P=N[A]){for(A>=T&&(T=A+1);!(B=z[T])&&++T<k;);P._next=B||null}}return o=new I(o,i),o._enter=a,o._exit=u,o}function Mn(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Nn(){return new I(this._exit||this._groups.map(de),this._parents)}function En(t,e,n){var i=this.enter(),r=this,s=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),e!=null&&(r=e(r),r&&(r=r.selection())),n==null?s.remove():n(s),i&&r?i.merge(r).order():r}function Cn(t){for(var e=t.selection?t.selection():t,n=this._groups,i=e._groups,r=n.length,s=i.length,o=Math.min(r,s),a=new Array(r),u=0;u<o;++u)for(var l=n[u],f=i[u],p=l.length,g=a[u]=new Array(p),v,k=0;k<p;++k)(v=l[k]||f[k])&&(g[k]=v);for(;u<r;++u)a[u]=n[u];return new I(a,this._parents)}function Sn(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i=t[e],r=i.length-1,s=i[r],o;--r>=0;)(o=i[r])&&(s&&o.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(o,s),s=o);return this}function zn(t){t||(t=$n);function e(p,g){return p&&g?t(p.__data__,g.__data__):!p-!g}for(var n=this._groups,i=n.length,r=new Array(i),s=0;s<i;++s){for(var o=n[s],a=o.length,u=r[s]=new Array(a),l,f=0;f<a;++f)(l=o[f])&&(u[f]=l);u.sort(e)}return new I(r,this._parents).order()}function $n(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function An(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Tn(){return Array.from(this)}function Rn(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,s=i.length;r<s;++r){var o=i[r];if(o)return o}return null}function Dn(){let t=0;for(const e of this)++t;return t}function Fn(){return!this.node()}function In(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var r=e[n],s=0,o=r.length,a;s<o;++s)(a=r[s])&&t.call(a,a.__data__,s,r);return this}function Bn(t){return function(){this.removeAttribute(t)}}function Hn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Pn(t,e){return function(){this.setAttribute(t,e)}}function Xn(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Vn(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function qn(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Ln(t,e){var n=_t(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((e==null?n.local?Hn:Bn:typeof e=="function"?n.local?qn:Vn:n.local?Xn:Pn)(n,e))}function me(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Yn(t){return function(){this.style.removeProperty(t)}}function On(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Wn(t,e,n){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function Un(t,e,n){return arguments.length>1?this.each((e==null?Yn:typeof e=="function"?Wn:On)(t,e,n??"")):rt(this.node(),t)}function rt(t,e){return t.style.getPropertyValue(e)||me(t).getComputedStyle(t,null).getPropertyValue(e)}function Gn(t){return function(){delete this[t]}}function Kn(t,e){return function(){this[t]=e}}function Zn(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Qn(t,e){return arguments.length>1?this.each((e==null?Gn:typeof e=="function"?Zn:Kn)(t,e)):this.node()[t]}function pe(t){return t.trim().split(/^|\s+/)}function Pt(t){return t.classList||new ge(t)}function ge(t){this._node=t,this._names=pe(t.getAttribute("class")||"")}ge.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function ye(t,e){for(var n=Pt(t),i=-1,r=e.length;++i<r;)n.add(e[i])}function ve(t,e){for(var n=Pt(t),i=-1,r=e.length;++i<r;)n.remove(e[i])}function Jn(t){return function(){ye(this,t)}}function jn(t){return function(){ve(this,t)}}function ti(t,e){return function(){(e.apply(this,arguments)?ye:ve)(this,t)}}function ei(t,e){var n=pe(t+"");if(arguments.length<2){for(var i=Pt(this.node()),r=-1,s=n.length;++r<s;)if(!i.contains(n[r]))return!1;return!0}return this.each((typeof e=="function"?ti:e?Jn:jn)(n,e))}function ni(){this.textContent=""}function ii(t){return function(){this.textContent=t}}function ri(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function oi(t){return arguments.length?this.each(t==null?ni:(typeof t=="function"?ri:ii)(t)):this.node().textContent}function si(){this.innerHTML=""}function ai(t){return function(){this.innerHTML=t}}function ui(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function li(t){return arguments.length?this.each(t==null?si:(typeof t=="function"?ui:ai)(t)):this.node().innerHTML}function ci(){this.nextSibling&&this.parentNode.appendChild(this)}function fi(){return this.each(ci)}function hi(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function di(){return this.each(hi)}function mi(t){var e=typeof t=="function"?t:le(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function pi(){return null}function gi(t,e){var n=typeof t=="function"?t:le(t),i=e==null?pi:typeof e=="function"?e:Ht(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function yi(){var t=this.parentNode;t&&t.removeChild(this)}function vi(){return this.each(yi)}function wi(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function _i(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function xi(t){return this.select(t?_i:wi)}function bi(t){return arguments.length?this.property("__data__",t):this.node().__data__}function ki(t){return function(e){t.call(this,e,this.__data__)}}function Mi(t){return t.trim().split(/^|\s+/).map(function(e){var n="",i=e.indexOf(".");return i>=0&&(n=e.slice(i+1),e=e.slice(0,i)),{type:e,name:n}})}function Ni(t){return function(){var e=this.__on;if(e){for(var n=0,i=-1,r=e.length,s;n<r;++n)s=e[n],(!t.type||s.type===t.type)&&s.name===t.name?this.removeEventListener(s.type,s.listener,s.options):e[++i]=s;++i?e.length=i:delete this.__on}}}function Ei(t,e,n){return function(){var i=this.__on,r,s=ki(e);if(i){for(var o=0,a=i.length;o<a;++o)if((r=i[o]).type===t.type&&r.name===t.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=s,r.options=n),r.value=e;return}}this.addEventListener(t.type,s,n),r={type:t.type,name:t.name,value:e,listener:s,options:n},i?i.push(r):this.__on=[r]}}function Ci(t,e,n){var i=Mi(t+""),r,s=i.length,o;if(arguments.length<2){var a=this.node().__on;if(a){for(var u=0,l=a.length,f;u<l;++u)for(r=0,f=a[u];r<s;++r)if((o=i[r]).type===f.type&&o.name===f.name)return f.value}return}for(a=e?Ei:Ni,r=0;r<s;++r)this.each(a(i[r],e,n));return this}function we(t,e,n){var i=me(t),r=i.CustomEvent;typeof r=="function"?r=new r(e,n):(r=i.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function Si(t,e){return function(){return we(this,t,e)}}function zi(t,e){return function(){return we(this,t,e.apply(this,arguments))}}function $i(t,e){return this.each((typeof e=="function"?zi:Si)(t,e))}function*Ai(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,s=i.length,o;r<s;++r)(o=i[r])&&(yield o)}var _e=[null];function I(t,e){this._groups=t,this._parents=e}function lt(){return new I([[document.documentElement]],_e)}function Ti(){return this}I.prototype=lt.prototype={constructor:I,select:rn,selectAll:un,selectChild:hn,selectChildren:gn,filter:yn,data:kn,enter:vn,exit:Nn,join:En,merge:Cn,selection:Ti,order:Sn,sort:zn,call:An,nodes:Tn,node:Rn,size:Dn,empty:Fn,each:In,attr:Ln,style:Un,property:Qn,classed:ei,text:oi,html:li,raise:fi,lower:di,append:mi,insert:gi,remove:vi,clone:xi,datum:bi,on:Ci,dispatch:$i,[Symbol.iterator]:Ai};function J(t){return typeof t=="string"?new I([[document.querySelector(t)]],[document.documentElement]):new I([[t]],_e)}function Ri(t){let e;for(;e=t.sourceEvent;)t=e;return t}function j(t,e){if(t=Ri(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=t.clientX,i.y=t.clientY,i=i.matrixTransform(e.getScreenCTM().inverse()),[i.x,i.y]}if(e.getBoundingClientRect){var r=e.getBoundingClientRect();return[t.clientX-r.left-e.clientLeft,t.clientY-r.top-e.clientTop]}}return[t.pageX,t.pageY]}const Xt={capture:!0,passive:!1};function Vt(t){t.preventDefault(),t.stopImmediatePropagation()}function Di(t){var e=t.document.documentElement,n=J(t).on("dragstart.drag",Vt,Xt);"onselectstart"in e?n.on("selectstart.drag",Vt,Xt):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Fi(t,e){var n=t.document.documentElement,i=J(t).on("dragstart.drag",null);e&&(i.on("click.drag",Vt,Xt),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function qt(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function xe(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function ct(){}var ft=.7,bt=1/ft,ot="\\s*([+-]?\\d+)\\s*",ht="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Y="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ii=/^#([0-9a-f]{3,8})$/,Bi=new RegExp(`^rgb\\(${ot},${ot},${ot}\\)$`),Hi=new RegExp(`^rgb\\(${Y},${Y},${Y}\\)$`),Pi=new RegExp(`^rgba\\(${ot},${ot},${ot},${ht}\\)$`),Xi=new RegExp(`^rgba\\(${Y},${Y},${Y},${ht}\\)$`),Vi=new RegExp(`^hsl\\(${ht},${Y},${Y}\\)$`),qi=new RegExp(`^hsla\\(${ht},${Y},${Y},${ht}\\)$`),be={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};qt(ct,dt,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:ke,formatHex:ke,formatHex8:Li,formatHsl:Yi,formatRgb:Me,toString:Me});function ke(){return this.rgb().formatHex()}function Li(){return this.rgb().formatHex8()}function Yi(){return ze(this).formatHsl()}function Me(){return this.rgb().formatRgb()}function dt(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Ii.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Ne(e):n===3?new F(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?kt(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?kt(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Bi.exec(t))?new F(e[1],e[2],e[3],1):(e=Hi.exec(t))?new F(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Pi.exec(t))?kt(e[1],e[2],e[3],e[4]):(e=Xi.exec(t))?kt(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Vi.exec(t))?Se(e[1],e[2]/100,e[3]/100,1):(e=qi.exec(t))?Se(e[1],e[2]/100,e[3]/100,e[4]):be.hasOwnProperty(t)?Ne(be[t]):t==="transparent"?new F(NaN,NaN,NaN,0):null}function Ne(t){return new F(t>>16&255,t>>8&255,t&255,1)}function kt(t,e,n,i){return i<=0&&(t=e=n=NaN),new F(t,e,n,i)}function Oi(t){return t instanceof ct||(t=dt(t)),t?(t=t.rgb(),new F(t.r,t.g,t.b,t.opacity)):new F}function Lt(t,e,n,i){return arguments.length===1?Oi(t):new F(t,e,n,i??1)}function F(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}qt(F,Lt,xe(ct,{brighter(t){return t=t==null?bt:Math.pow(bt,t),new F(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?ft:Math.pow(ft,t),new F(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new F(et(this.r),et(this.g),et(this.b),Mt(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ee,formatHex:Ee,formatHex8:Wi,formatRgb:Ce,toString:Ce}));function Ee(){return`#${nt(this.r)}${nt(this.g)}${nt(this.b)}`}function Wi(){return`#${nt(this.r)}${nt(this.g)}${nt(this.b)}${nt((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ce(){const t=Mt(this.opacity);return`${t===1?"rgb(":"rgba("}${et(this.r)}, ${et(this.g)}, ${et(this.b)}${t===1?")":`, ${t})`}`}function Mt(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function et(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function nt(t){return t=et(t),(t<16?"0":"")+t.toString(16)}function Se(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new X(t,e,n,i)}function ze(t){if(t instanceof X)return new X(t.h,t.s,t.l,t.opacity);if(t instanceof ct||(t=dt(t)),!t)return new X;if(t instanceof X)return t;t=t.rgb();var e=t.r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),s=Math.max(e,n,i),o=NaN,a=s-r,u=(s+r)/2;return a?(e===s?o=(n-i)/a+(n<i)*6:n===s?o=(i-e)/a+2:o=(e-n)/a+4,a/=u<.5?s+r:2-s-r,o*=60):a=u>0&&u<1?0:o,new X(o,a,u,t.opacity)}function Ui(t,e,n,i){return arguments.length===1?ze(t):new X(t,e,n,i??1)}function X(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}qt(X,Ui,xe(ct,{brighter(t){return t=t==null?bt:Math.pow(bt,t),new X(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?ft:Math.pow(ft,t),new X(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new F(Yt(t>=240?t-240:t+120,r,i),Yt(t,r,i),Yt(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new X($e(this.h),Nt(this.s),Nt(this.l),Mt(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Mt(this.opacity);return`${t===1?"hsl(":"hsla("}${$e(this.h)}, ${Nt(this.s)*100}%, ${Nt(this.l)*100}%${t===1?")":`, ${t})`}`}}));function $e(t){return t=(t||0)%360,t<0?t+360:t}function Nt(t){return Math.max(0,Math.min(1,t||0))}function Yt(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Ae=t=>()=>t;function Gi(t,e){return function(n){return t+n*e}}function Ki(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}function Zi(t){return(t=+t)==1?Te:function(e,n){return n-e?Ki(e,n,t):Ae(isNaN(e)?n:e)}}function Te(t,e){var n=e-t;return n?Gi(t,n):Ae(isNaN(t)?e:t)}const Re=function t(e){var n=Zi(e);function i(r,s){var o=n((r=Lt(r)).r,(s=Lt(s)).r),a=n(r.g,s.g),u=n(r.b,s.b),l=Te(r.opacity,s.opacity);return function(f){return r.r=o(f),r.g=a(f),r.b=u(f),r.opacity=l(f),r+""}}return i.gamma=t,i}(1);function tt(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var Ot=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Wt=new RegExp(Ot.source,"g");function Qi(t){return function(){return t}}function Ji(t){return function(e){return t(e)+""}}function ji(t,e){var n=Ot.lastIndex=Wt.lastIndex=0,i,r,s,o=-1,a=[],u=[];for(t=t+"",e=e+"";(i=Ot.exec(t))&&(r=Wt.exec(e));)(s=r.index)>n&&(s=e.slice(n,s),a[o]?a[o]+=s:a[++o]=s),(i=i[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,u.push({i:o,x:tt(i,r)})),n=Wt.lastIndex;return n<e.length&&(s=e.slice(n),a[o]?a[o]+=s:a[++o]=s),a.length<2?u[0]?Ji(u[0].x):Qi(e):(e=u.length,function(l){for(var f=0,p;f<e;++f)a[(p=u[f]).i]=p.x(l);return a.join("")})}var De=180/Math.PI,Ut={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Fe(t,e,n,i,r,s){var o,a,u;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(u=t*n+e*i)&&(n-=t*u,i-=e*u),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,u/=a),t*i<e*n&&(t=-t,e=-e,u=-u,o=-o),{translateX:r,translateY:s,rotate:Math.atan2(e,t)*De,skewX:Math.atan(u)*De,scaleX:o,scaleY:a}}var Et;function tr(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Ut:Fe(e.a,e.b,e.c,e.d,e.e,e.f)}function er(t){return t==null||(Et||(Et=document.createElementNS("http://www.w3.org/2000/svg","g")),Et.setAttribute("transform",t),!(t=Et.transform.baseVal.consolidate()))?Ut:(t=t.matrix,Fe(t.a,t.b,t.c,t.d,t.e,t.f))}function Ie(t,e,n,i){function r(l){return l.length?l.pop()+" ":""}function s(l,f,p,g,v,k){if(l!==p||f!==g){var N=v.push("translate(",null,e,null,n);k.push({i:N-4,x:tt(l,p)},{i:N-2,x:tt(f,g)})}else(p||g)&&v.push("translate("+p+e+g+n)}function o(l,f,p,g){l!==f?(l-f>180?f+=360:f-l>180&&(l+=360),g.push({i:p.push(r(p)+"rotate(",null,i)-2,x:tt(l,f)})):f&&p.push(r(p)+"rotate("+f+i)}function a(l,f,p,g){l!==f?g.push({i:p.push(r(p)+"skewX(",null,i)-2,x:tt(l,f)}):f&&p.push(r(p)+"skewX("+f+i)}function u(l,f,p,g,v,k){if(l!==p||f!==g){var N=v.push(r(v)+"scale(",null,",",null,")");k.push({i:N-4,x:tt(l,p)},{i:N-2,x:tt(f,g)})}else(p!==1||g!==1)&&v.push(r(v)+"scale("+p+","+g+")")}return function(l,f){var p=[],g=[];return l=t(l),f=t(f),s(l.translateX,l.translateY,f.translateX,f.translateY,p,g),o(l.rotate,f.rotate,p,g),a(l.skewX,f.skewX,p,g),u(l.scaleX,l.scaleY,f.scaleX,f.scaleY,p,g),l=f=null,function(v){for(var k=-1,N=g.length,z;++k<N;)p[(z=g[k]).i]=z.x(v);return p.join("")}}}var nr=Ie(tr,"px, ","px)","deg)"),ir=Ie(er,", ",")",")"),rr=1e-12;function Be(t){return((t=Math.exp(t))+1/t)/2}function or(t){return((t=Math.exp(t))-1/t)/2}function sr(t){return((t=Math.exp(2*t))-1)/(t+1)}const ar=function t(e,n,i){function r(s,o){var a=s[0],u=s[1],l=s[2],f=o[0],p=o[1],g=o[2],v=f-a,k=p-u,N=v*v+k*k,z,b;if(N<rr)b=Math.log(g/l)/e,z=function(R){return[a+R*v,u+R*k,l*Math.exp(e*R*b)]};else{var A=Math.sqrt(N),T=(g*g-l*l+i*N)/(2*l*n*A),P=(g*g-l*l-i*N)/(2*g*n*A),B=Math.log(Math.sqrt(T*T+1)-T),$=Math.log(Math.sqrt(P*P+1)-P);b=($-B)/e,z=function(R){var W=R*b,C=Be(B),at=l/(n*A)*(C*sr(e*W+B)-or(B));return[a+at*v,u+at*k,l*C/Be(e*W+B)]}}return z.duration=b*1e3*e/Math.SQRT2,z}return r.rho=function(s){var o=Math.max(.001,+s),a=o*o,u=a*a;return t(o,a,u)},r}(Math.SQRT2,2,4);var st=0,mt=0,pt=0,He=1e3,Ct,gt,St=0,it=0,zt=0,yt=typeof performance=="object"&&performance.now?performance:Date,Pe=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Gt(){return it||(Pe(ur),it=yt.now()+zt)}function ur(){it=0}function $t(){this._call=this._time=this._next=null}$t.prototype=Xe.prototype={constructor:$t,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Gt():+n)+(e==null?0:+e),!this._next&>!==this&&(gt?gt._next=this:Ct=this,gt=this),this._call=t,this._time=n,Kt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Kt())}};function Xe(t,e,n){var i=new $t;return i.restart(t,e,n),i}function lr(){Gt(),++st;for(var t=Ct,e;t;)(e=it-t._time)>=0&&t._call.call(void 0,e),t=t._next;--st}function Ve(){it=(St=yt.now())+zt,st=mt=0;try{lr()}finally{st=0,fr(),it=0}}function cr(){var t=yt.now(),e=t-St;e>He&&(zt-=e,St=t)}function fr(){for(var t,e=Ct,n,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Ct=n);gt=t,Kt(i)}function Kt(t){if(!st){mt&&(mt=clearTimeout(mt));var e=t-it;e>24?(t<1/0&&(mt=setTimeout(Ve,t-yt.now()-zt)),pt&&(pt=clearInterval(pt))):(pt||(St=yt.now(),pt=setInterval(cr,He)),st=1,Pe(Ve))}}function qe(t,e,n){var i=new $t;return e=e==null?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,n),i}var hr=It("start","end","cancel","interrupt"),dr=[],Le=0,Ye=1,Zt=2,At=3,Oe=4,Qt=5,Tt=6;function Rt(t,e,n,i,r,s){var o=t.__transition;if(!o)t.__transition={};else if(n in o)return;mr(t,n,{name:e,index:i,group:r,on:hr,tween:dr,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Le})}function Jt(t,e){var n=V(t,e);if(n.state>Le)throw new Error("too late; already scheduled");return n}function O(t,e){var n=V(t,e);if(n.state>At)throw new Error("too late; already running");return n}function V(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function mr(t,e,n){var i=t.__transition,r;i[e]=n,n.timer=Xe(s,0,n.time);function s(l){n.state=Ye,n.timer.restart(o,n.delay,n.time),n.delay<=l&&o(l-n.delay)}function o(l){var f,p,g,v;if(n.state!==Ye)return u();for(f in i)if(v=i[f],v.name===n.name){if(v.state===At)return qe(o);v.state===Oe?(v.state=Tt,v.timer.stop(),v.on.call("interrupt",t,t.__data__,v.index,v.group),delete i[f]):+f<e&&(v.state=Tt,v.timer.stop(),v.on.call("cancel",t,t.__data__,v.index,v.group),delete i[f])}if(qe(function(){n.state===At&&(n.state=Oe,n.timer.restart(a,n.delay,n.time),a(l))}),n.state=Zt,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Zt){for(n.state=At,r=new Array(g=n.tween.length),f=0,p=-1;f<g;++f)(v=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(r[++p]=v);r.length=p+1}}function a(l){for(var f=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(u),n.state=Qt,1),p=-1,g=r.length;++p<g;)r[p].call(t,f);n.state===Qt&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=Tt,n.timer.stop(),delete i[e];for(var l in i)return;delete t.__transition}}function Dt(t,e){var n=t.__transition,i,r,s=!0,o;if(n){e=e==null?null:e+"";for(o in n){if((i=n[o]).name!==e){s=!1;continue}r=i.state>Zt&&i.state<Qt,i.state=Tt,i.timer.stop(),i.on.call(r?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete n[o]}s&&delete t.__transition}}function pr(t){return this.each(function(){Dt(this,t)})}function gr(t,e){var n,i;return function(){var r=O(this,t),s=r.tween;if(s!==n){i=n=s;for(var o=0,a=i.length;o<a;++o)if(i[o].name===e){i=i.slice(),i.splice(o,1);break}}r.tween=i}}function yr(t,e,n){var i,r;if(typeof n!="function")throw new Error;return function(){var s=O(this,t),o=s.tween;if(o!==i){r=(i=o).slice();for(var a={name:e,value:n},u=0,l=r.length;u<l;++u)if(r[u].name===e){r[u]=a;break}u===l&&r.push(a)}s.tween=r}}function vr(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i=V(this.node(),n).tween,r=0,s=i.length,o;r<s;++r)if((o=i[r]).name===t)return o.value;return null}return this.each((e==null?gr:yr)(n,t,e))}function jt(t,e,n){var i=t._id;return t.each(function(){var r=O(this,i);(r.value||(r.value={}))[e]=n.apply(this,arguments)}),function(r){return V(r,i).value[e]}}function We(t,e){var n;return(typeof e=="number"?tt:e instanceof dt?Re:(n=dt(e))?(e=n,Re):ji)(t,e)}function wr(t){return function(){this.removeAttribute(t)}}function _r(t){return function(){this.removeAttributeNS(t.space,t.local)}}function xr(t,e,n){var i,r=n+"",s;return function(){var o=this.getAttribute(t);return o===r?null:o===i?s:s=e(i=o,n)}}function br(t,e,n){var i,r=n+"",s;return function(){var o=this.getAttributeNS(t.space,t.local);return o===r?null:o===i?s:s=e(i=o,n)}}function kr(t,e,n){var i,r,s;return function(){var o,a=n(this),u;return a==null?void this.removeAttribute(t):(o=this.getAttribute(t),u=a+"",o===u?null:o===i&&u===r?s:(r=u,s=e(i=o,a)))}}function Mr(t,e,n){var i,r,s;return function(){var o,a=n(this),u;return a==null?void this.removeAttributeNS(t.space,t.local):(o=this.getAttributeNS(t.space,t.local),u=a+"",o===u?null:o===i&&u===r?s:(r=u,s=e(i=o,a)))}}function Nr(t,e){var n=_t(t),i=n==="transform"?ir:We;return this.attrTween(t,typeof e=="function"?(n.local?Mr:kr)(n,i,jt(this,"attr."+t,e)):e==null?(n.local?_r:wr)(n):(n.local?br:xr)(n,i,e))}function Er(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Cr(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Sr(t,e){var n,i;function r(){var s=e.apply(this,arguments);return s!==i&&(n=(i=s)&&Cr(t,s)),n}return r._value=e,r}function zr(t,e){var n,i;function r(){var s=e.apply(this,arguments);return s!==i&&(n=(i=s)&&Er(t,s)),n}return r._value=e,r}function $r(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var i=_t(t);return this.tween(n,(i.local?Sr:zr)(i,e))}function Ar(t,e){return function(){Jt(this,t).delay=+e.apply(this,arguments)}}function Tr(t,e){return e=+e,function(){Jt(this,t).delay=e}}function Rr(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Ar:Tr)(e,t)):V(this.node(),e).delay}function Dr(t,e){return function(){O(this,t).duration=+e.apply(this,arguments)}}function Fr(t,e){return e=+e,function(){O(this,t).duration=e}}function Ir(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Dr:Fr)(e,t)):V(this.node(),e).duration}function Br(t,e){if(typeof e!="function")throw new Error;return function(){O(this,t).ease=e}}function Hr(t){var e=this._id;return arguments.length?this.each(Br(e,t)):V(this.node(),e).ease}function Pr(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;O(this,t).ease=n}}function Xr(t){if(typeof t!="function")throw new Error;return this.each(Pr(this._id,t))}function Vr(t){typeof t!="function"&&(t=fe(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var s=e[r],o=s.length,a=i[r]=[],u,l=0;l<o;++l)(u=s[l])&&t.call(u,u.__data__,l,s)&&a.push(u);return new G(i,this._parents,this._name,this._id)}function qr(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,i=e.length,r=n.length,s=Math.min(i,r),o=new Array(i),a=0;a<s;++a)for(var u=e[a],l=n[a],f=u.length,p=o[a]=new Array(f),g,v=0;v<f;++v)(g=u[v]||l[v])&&(p[v]=g);for(;a<i;++a)o[a]=e[a];return new G(o,this._parents,this._name,this._id)}function Lr(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function Yr(t,e,n){var i,r,s=Lr(e)?Jt:O;return function(){var o=s(this,t),a=o.on;a!==i&&(r=(i=a).copy()).on(e,n),o.on=r}}function Or(t,e){var n=this._id;return arguments.length<2?V(this.node(),n).on.on(t):this.each(Yr(n,t,e))}function Wr(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Ur(){return this.on("end.remove",Wr(this._id))}function Gr(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ht(t));for(var i=this._groups,r=i.length,s=new Array(r),o=0;o<r;++o)for(var a=i[o],u=a.length,l=s[o]=new Array(u),f,p,g=0;g<u;++g)(f=a[g])&&(p=t.call(f,f.__data__,g,a))&&("__data__"in f&&(p.__data__=f.__data__),l[g]=p,Rt(l[g],e,n,g,l,V(f,n)));return new G(s,this._parents,e,n)}function Kr(t){var e=this._name,n=this._id;typeof t!="function"&&(t=ce(t));for(var i=this._groups,r=i.length,s=[],o=[],a=0;a<r;++a)for(var u=i[a],l=u.length,f,p=0;p<l;++p)if(f=u[p]){for(var g=t.call(f,f.__data__,p,u),v,k=V(f,n),N=0,z=g.length;N<z;++N)(v=g[N])&&Rt(v,e,n,N,g,k);s.push(g),o.push(f)}return new G(s,o,e,n)}var Zr=lt.prototype.constructor;function Qr(){return new Zr(this._groups,this._parents)}function Jr(t,e){var n,i,r;return function(){var s=rt(this,t),o=(this.style.removeProperty(t),rt(this,t));return s===o?null:s===n&&o===i?r:r=e(n=s,i=o)}}function Ue(t){return function(){this.style.removeProperty(t)}}function jr(t,e,n){var i,r=n+"",s;return function(){var o=rt(this,t);return o===r?null:o===i?s:s=e(i=o,n)}}function to(t,e,n){var i,r,s;return function(){var o=rt(this,t),a=n(this),u=a+"";return a==null&&(u=a=(this.style.removeProperty(t),rt(this,t))),o===u?null:o===i&&u===r?s:(r=u,s=e(i=o,a))}}function eo(t,e){var n,i,r,s="style."+e,o="end."+s,a;return function(){var u=O(this,t),l=u.on,f=u.value[s]==null?a||(a=Ue(e)):void 0;(l!==n||r!==f)&&(i=(n=l).copy()).on(o,r=f),u.on=i}}function no(t,e,n){var i=(t+="")=="transform"?nr:We;return e==null?this.styleTween(t,Jr(t,i)).on("end.style."+t,Ue(t)):typeof e=="function"?this.styleTween(t,to(t,i,jt(this,"style."+t,e))).each(eo(this._id,t)):this.styleTween(t,jr(t,i,e),n).on("end.style."+t,null)}function io(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}function ro(t,e,n){var i,r;function s(){var o=e.apply(this,arguments);return o!==r&&(i=(r=o)&&io(t,o,n)),i}return s._value=e,s}function oo(t,e,n){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!="function")throw new Error;return this.tween(i,ro(t,e,n??""))}function so(t){return function(){this.textContent=t}}function ao(t){return function(){var e=t(this);this.textContent=e??""}}function uo(t){return this.tween("text",typeof t=="function"?ao(jt(this,"text",t)):so(t==null?"":t+""))}function lo(t){return function(e){this.textContent=t.call(this,e)}}function co(t){var e,n;function i(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&lo(r)),e}return i._value=t,i}function fo(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,co(t))}function ho(){for(var t=this._name,e=this._id,n=Ge(),i=this._groups,r=i.length,s=0;s<r;++s)for(var o=i[s],a=o.length,u,l=0;l<a;++l)if(u=o[l]){var f=V(u,e);Rt(u,t,n,l,o,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new G(i,this._parents,t,n)}function mo(){var t,e,n=this,i=n._id,r=n.size();return new Promise(function(s,o){var a={value:o},u={value:function(){--r===0&&s()}};n.each(function(){var l=O(this,i),f=l.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(a),e._.interrupt.push(a),e._.end.push(u)),l.on=e}),r===0&&s()})}var po=0;function G(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function Ge(){return++po}var K=lt.prototype;G.prototype={constructor:G,select:Gr,selectAll:Kr,selectChild:K.selectChild,selectChildren:K.selectChildren,filter:Vr,merge:qr,selection:Qr,transition:ho,call:K.call,nodes:K.nodes,node:K.node,size:K.size,empty:K.empty,each:K.each,on:Or,attr:Nr,attrTween:$r,style:no,styleTween:oo,text:uo,textTween:fo,remove:Ur,tween:vr,delay:Rr,duration:Ir,ease:Hr,easeVarying:Xr,end:mo,[Symbol.iterator]:K[Symbol.iterator]};function go(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var yo={time:null,delay:0,duration:250,ease:go};function vo(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function wo(t){var e,n;t instanceof G?(e=t._id,t=t._name):(e=Ge(),(n=yo).time=Gt(),t=t==null?null:t+"");for(var i=this._groups,r=i.length,s=0;s<r;++s)for(var o=i[s],a=o.length,u,l=0;l<a;++l)(u=o[l])&&Rt(u,t,e,l,o,n||vo(u,e));return new G(i,this._parents,t,e)}lt.prototype.interrupt=pr,lt.prototype.transition=wo;const Ft=t=>()=>t;function _o(t,{sourceEvent:e,target:n,transform:i,dispatch:r}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:r}})}function Z(t,e,n){this.k=t,this.x=e,this.y=n}Z.prototype={constructor:Z,scale:function(t){return t===1?this:new Z(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Z(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var te=new Z(1,0,0);Z.prototype;function ee(t){t.stopImmediatePropagation()}function vt(t){t.preventDefault(),t.stopImmediatePropagation()}function xo(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function bo(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function Ke(){return this.__zoom||te}function ko(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Mo(){return navigator.maxTouchPoints||"ontouchstart"in this}function No(t,e,n){var i=t.invertX(e[0][0])-n[0][0],r=t.invertX(e[1][0])-n[1][0],s=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(r>i?(i+r)/2:Math.min(0,i)||Math.max(0,r),o>s?(s+o)/2:Math.min(0,s)||Math.max(0,o))}function Eo(){var t=xo,e=bo,n=No,i=ko,r=Mo,s=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],a=250,u=ar,l=It("start","zoom","end"),f,p,g,v=500,k=150,N=0,z=10;function b(c){c.property("__zoom",Ke).on("wheel.zoom",W,{passive:!1}).on("mousedown.zoom",C).on("dblclick.zoom",at).filter(r).on("touchstart.zoom",ie).on("touchmove.zoom",re).on("touchend.zoom touchcancel.zoom",oe).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(c,w,h,d){var y=c.selection?c.selection():c;y.property("__zoom",Ke),c!==y?B(c,w,h,d):y.interrupt().each(function(){$(this,arguments).event(d).start().zoom(null,typeof w=="function"?w.apply(this,arguments):w).end()})},b.scaleBy=function(c,w,h,d){b.scaleTo(c,function(){var y=this.__zoom.k,m=typeof w=="function"?w.apply(this,arguments):w;return y*m},h,d)},b.scaleTo=function(c,w,h,d){b.transform(c,function(){var y=e.apply(this,arguments),m=this.__zoom,x=h==null?P(y):typeof h=="function"?h.apply(this,arguments):h,E=m.invert(x),M=typeof w=="function"?w.apply(this,arguments):w;return n(T(A(m,M),x,E),y,o)},h,d)},b.translateBy=function(c,w,h,d){b.transform(c,function(){return n(this.__zoom.translate(typeof w=="function"?w.apply(this,arguments):w,typeof h=="function"?h.apply(this,arguments):h),e.apply(this,arguments),o)},null,d)},b.translateTo=function(c,w,h,d,y){b.transform(c,function(){var m=e.apply(this,arguments),x=this.__zoom,E=d==null?P(m):typeof d=="function"?d.apply(this,arguments):d;return n(te.translate(E[0],E[1]).scale(x.k).translate(typeof w=="function"?-w.apply(this,arguments):-w,typeof h=="function"?-h.apply(this,arguments):-h),m,o)},d,y)};function A(c,w){return w=Math.max(s[0],Math.min(s[1],w)),w===c.k?c:new Z(w,c.x,c.y)}function T(c,w,h){var d=w[0]-h[0]*c.k,y=w[1]-h[1]*c.k;return d===c.x&&y===c.y?c:new Z(c.k,d,y)}function P(c){return[(+c[0][0]+ +c[1][0])/2,(+c[0][1]+ +c[1][1])/2]}function B(c,w,h,d){c.on("start.zoom",function(){$(this,arguments).event(d).start()}).on("interrupt.zoom end.zoom",function(){$(this,arguments).event(d).end()}).tween("zoom",function(){var y=this,m=arguments,x=$(y,m).event(d),E=e.apply(y,m),M=h==null?P(E):typeof h=="function"?h.apply(y,m):h,D=Math.max(E[1][0]-E[0][0],E[1][1]-E[0][1]),S=y.__zoom,H=typeof w=="function"?w.apply(y,m):w,q=u(S.invert(M).concat(D/S.k),H.invert(M).concat(D/H.k));return function(L){if(L===1)L=H;else{var Q=q(L),se=D/Q[2];L=new Z(se,M[0]-Q[0]*se,M[1]-Q[1]*se)}x.zoom(null,L)}})}function $(c,w,h){return!h&&c.__zooming||new R(c,w)}function R(c,w){this.that=c,this.args=w,this.active=0,this.sourceEvent=null,this.extent=e.apply(c,w),this.taps=0}R.prototype={event:function(c){return c&&(this.sourceEvent=c),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(c,w){return this.mouse&&c!=="mouse"&&(this.mouse[1]=w.invert(this.mouse[0])),this.touch0&&c!=="touch"&&(this.touch0[1]=w.invert(this.touch0[0])),this.touch1&&c!=="touch"&&(this.touch1[1]=w.invert(this.touch1[0])),this.that.__zoom=w,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(c){var w=J(this.that).datum();l.call(c,this.that,new _o(c,{sourceEvent:this.sourceEvent,target:b,type:c,transform:this.that.__zoom,dispatch:l}),w)}};function W(c,...w){if(!t.apply(this,arguments))return;var h=$(this,w).event(c),d=this.__zoom,y=Math.max(s[0],Math.min(s[1],d.k*Math.pow(2,i.apply(this,arguments)))),m=j(c);if(h.wheel)(h.mouse[0][0]!==m[0]||h.mouse[0][1]!==m[1])&&(h.mouse[1]=d.invert(h.mouse[0]=m)),clearTimeout(h.wheel);else{if(d.k===y)return;h.mouse=[m,d.invert(m)],Dt(this),h.start()}vt(c),h.wheel=setTimeout(x,k),h.zoom("mouse",n(T(A(d,y),h.mouse[0],h.mouse[1]),h.extent,o));function x(){h.wheel=null,h.end()}}function C(c,...w){if(g||!t.apply(this,arguments))return;var h=c.currentTarget,d=$(this,w,!0).event(c),y=J(c.view).on("mousemove.zoom",M,!0).on("mouseup.zoom",D,!0),m=j(c,h),x=c.clientX,E=c.clientY;Di(c.view),ee(c),d.mouse=[m,this.__zoom.invert(m)],Dt(this),d.start();function M(S){if(vt(S),!d.moved){var H=S.clientX-x,q=S.clientY-E;d.moved=H*H+q*q>N}d.event(S).zoom("mouse",n(T(d.that.__zoom,d.mouse[0]=j(S,h),d.mouse[1]),d.extent,o))}function D(S){y.on("mousemove.zoom mouseup.zoom",null),Fi(S.view,d.moved),vt(S),d.event(S).end()}}function at(c,...w){if(t.apply(this,arguments)){var h=this.__zoom,d=j(c.changedTouches?c.changedTouches[0]:c,this),y=h.invert(d),m=h.k*(c.shiftKey?.5:2),x=n(T(A(h,m),d,y),e.apply(this,w),o);vt(c),a>0?J(this).transition().duration(a).call(B,x,d,c):J(this).call(b.transform,x,d,c)}}function ie(c,...w){if(t.apply(this,arguments)){var h=c.touches,d=h.length,y=$(this,w,c.changedTouches.length===d).event(c),m,x,E,M;for(ee(c),x=0;x<d;++x)E=h[x],M=j(E,this),M=[M,this.__zoom.invert(M),E.identifier],y.touch0?!y.touch1&&y.touch0[2]!==M[2]&&(y.touch1=M,y.taps=0):(y.touch0=M,m=!0,y.taps=1+!!f);f&&(f=clearTimeout(f)),m&&(y.taps<2&&(p=M[0],f=setTimeout(function(){f=null},v)),Dt(this),y.start())}}function re(c,...w){if(this.__zooming){var h=$(this,w).event(c),d=c.changedTouches,y=d.length,m,x,E,M;for(vt(c),m=0;m<y;++m)x=d[m],E=j(x,this),h.touch0&&h.touch0[2]===x.identifier?h.touch0[0]=E:h.touch1&&h.touch1[2]===x.identifier&&(h.touch1[0]=E);if(x=h.that.__zoom,h.touch1){var D=h.touch0[0],S=h.touch0[1],H=h.touch1[0],q=h.touch1[1],L=(L=H[0]-D[0])*L+(L=H[1]-D[1])*L,Q=(Q=q[0]-S[0])*Q+(Q=q[1]-S[1])*Q;x=A(x,Math.sqrt(L/Q)),E=[(D[0]+H[0])/2,(D[1]+H[1])/2],M=[(S[0]+q[0])/2,(S[1]+q[1])/2]}else if(h.touch0)E=h.touch0[0],M=h.touch0[1];else return;h.zoom("touch",n(T(x,E,M),h.extent,o))}}function oe(c,...w){if(this.__zooming){var h=$(this,w).event(c),d=c.changedTouches,y=d.length,m,x;for(ee(c),g&&clearTimeout(g),g=setTimeout(function(){g=null},v),m=0;m<y;++m)x=d[m],h.touch0&&h.touch0[2]===x.identifier?delete h.touch0:h.touch1&&h.touch1[2]===x.identifier&&delete h.touch1;if(h.touch1&&!h.touch0&&(h.touch0=h.touch1,delete h.touch1),h.touch0)h.touch0[1]=this.__zoom.invert(h.touch0[0]);else if(h.end(),h.taps===2&&(x=j(x,this),Math.hypot(p[0]-x[0],p[1]-x[1])<z)){var E=J(this).on("dblclick.zoom");E&&E.apply(this,arguments)}}}return b.wheelDelta=function(c){return arguments.length?(i=typeof c=="function"?c:Ft(+c),b):i},b.filter=function(c){return arguments.length?(t=typeof c=="function"?c:Ft(!!c),b):t},b.touchable=function(c){return arguments.length?(r=typeof c=="function"?c:Ft(!!c),b):r},b.extent=function(c){return arguments.length?(e=typeof c=="function"?c:Ft([[+c[0][0],+c[0][1]],[+c[1][0],+c[1][1]]]),b):e},b.scaleExtent=function(c){return arguments.length?(s[0]=+c[0],s[1]=+c[1],b):[s[0],s[1]]},b.translateExtent=function(c){return arguments.length?(o[0][0]=+c[0][0],o[1][0]=+c[1][0],o[0][1]=+c[0][1],o[1][1]=+c[1][1],b):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},b.constrain=function(c){return arguments.length?(n=c,b):n},b.duration=function(c){return arguments.length?(a=+c,b):a},b.interpolate=function(c){return arguments.length?(u=c,b):u},b.on=function(){var c=l.on.apply(l,arguments);return c===l?b:c},b.clickDistance=function(c){return arguments.length?(N=(c=+c)*c,b):Math.sqrt(N)},b.tapDistance=function(c){return arguments.length?(z=+c,b):z},b}const ne=Symbol("MiniMapSlots"),Ze=_.defineComponent({name:"MiniMapNode",props:["id","position","dimensions","strokeWidth","strokeColor","borderRadius","color","shapeRendering","type"],emits:["click","dblclick","mouseenter","mousemove","mouseleave"],setup(t,{attrs:e,emit:n}){const i=_.inject(ne);return()=>{const r=e.style??{},s=i[`node-${t.type}`];return s?s(t):_.h("rect",{id:t.id,class:["vue-flow__minimap-node",e.class].join(" "),style:r,x:t.position.x,y:t.position.y,rx:t.borderRadius,ry:t.borderRadius,width:t.dimensions.width,height:t.dimensions.height,fill:t.color||r.background||r.backgroundColor,stroke:t.strokeColor,strokeWidth:t.strokeWidth,shapeRendering:t.shapeRendering,onClick:o=>n("click",o),onDblClick:o=>n("dblclick",o),onMouseenter:o=>n("mouseenter",o),onMousemove:o=>n("mousemove",o),onMouseleave:o=>n("mouseleave",o)})}}}),Co=["width","height","viewBox","aria-labelledby"],So=["id"],zo=["d","fill","stroke","stroke-width"],$o={name:"MiniMap"},Ao=_.defineComponent({...$o,props:{nodeColor:{type:[String,Function],default:"#e2e2e2"},nodeStrokeColor:{type:[String,Function],default:"transparent"},nodeClassName:null,nodeBorderRadius:{default:5},nodeStrokeWidth:{default:2},maskColor:{default:"rgb(240, 240, 240, 0.6)"},maskStrokeColor:{default:"none"},maskStrokeWidth:{default:1},position:{default:()=>"bottom-right"},pannable:{type:Boolean,default:!1},zoomable:{type:Boolean,default:!1},width:null,height:null,ariaLabel:{default:"Vue Flow mini map"}},emits:["click","nodeClick","nodeDblclick","nodeMouseenter","nodeMousemove","nodeMouseleave"],setup(t,{emit:e}){const n=_.useAttrs(),i=200,r=150,{id:s,edges:o,viewport:a,translateExtent:u,dimensions:l,emits:f,nodes:p,d3Selection:g,d3Zoom:v}=U.useVueFlow(),k=_.ref();_.provide(ne,_.useSlots());const N=_.computed(()=>{var d;return t.width??((d=n.style)==null?void 0:d.width)??i}),z=_.computed(()=>{var d;return t.height??((d=n.style)==null?void 0:d.height)??r}),b=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision",A=_.computed(()=>t.nodeColor instanceof Function?t.nodeColor:()=>t.nodeColor),T=_.computed(()=>t.nodeStrokeColor instanceof Function?t.nodeStrokeColor:()=>t.nodeStrokeColor),P=_.computed(()=>t.nodeClassName instanceof Function?t.nodeClassName:()=>t.nodeClassName),B=_.computed(()=>U.getRectOfNodes(p.value)),$=_.computed(()=>({x:-a.value.x/a.value.zoom,y:-a.value.y/a.value.zoom,width:l.value.width/a.value.zoom,height:l.value.height/a.value.zoom})),R=_.computed(()=>p.value&&p.value.length?U.getBoundsofRects(B.value,$.value):$.value),W=_.computed(()=>{const d=R.value.width/N.value,y=R.value.height/z.value;return Math.max(d,y)}),C=_.computed(()=>{const d=W.value*N.value,y=W.value*z.value,m=5*W.value;return{offset:m,x:R.value.x-(d-R.value.width)/2-m,y:R.value.y-(y-R.value.height)/2-m,width:d+m*2,height:y+m*2}}),at=_.computed(()=>!C.value.x||!C.value.y?"":` | ||
var vueFlowMiniMap=function(ut,_,U){"use strict";const To="";var Qe={value:()=>{}};function It(){for(var t=0,e=arguments.length,n={},i;t<e;++t){if(!(i=arguments[t]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new wt(n)}function wt(t){this._=t}function Je(t,e){return t.trim().split(/^|\s+/).map(function(n){var i="",r=n.indexOf(".");if(r>=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}wt.prototype=It.prototype={constructor:wt,on:function(t,e){var n=this._,i=Je(t+"",n),r,s=-1,o=i.length;if(arguments.length<2){for(;++s<o;)if((r=(t=i[s]).type)&&(r=je(n[r],t.name)))return r;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++s<o;)if(r=(t=i[s]).type)n[r]=ae(n[r],t.name,e);else if(e==null)for(r in n)n[r]=ae(n[r],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new wt(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var n=new Array(r),i=0,r,s;i<r;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],i=0,r=s.length;i<r;++i)s[i].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,s=i.length;r<s;++r)i[r].value.apply(e,n)}};function je(t,e){for(var n=0,i=t.length,r;n<i;++n)if((r=t[n]).name===e)return r.value}function ae(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=Qe,t=t.slice(0,i).concat(t.slice(i+1));break}return n!=null&&t.push({name:e,value:n}),t}var Bt="http://www.w3.org/1999/xhtml";const ue={svg:"http://www.w3.org/2000/svg",xhtml:Bt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function _t(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),ue.hasOwnProperty(e)?{space:ue[e],local:t}:t}function tn(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Bt&&e.documentElement.namespaceURI===Bt?e.createElement(t):e.createElementNS(n,t)}}function en(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function le(t){var e=_t(t);return(e.local?en:tn)(e)}function nn(){}function Ht(t){return t==null?nn:function(){return this.querySelector(t)}}function rn(t){typeof t!="function"&&(t=Ht(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var s=e[r],o=s.length,a=i[r]=new Array(o),u,l,f=0;f<o;++f)(u=s[f])&&(l=t.call(u,u.__data__,f,s))&&("__data__"in u&&(l.__data__=u.__data__),a[f]=l);return new I(i,this._parents)}function on(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function sn(){return[]}function ce(t){return t==null?sn:function(){return this.querySelectorAll(t)}}function an(t){return function(){return on(t.apply(this,arguments))}}function un(t){typeof t=="function"?t=an(t):t=ce(t);for(var e=this._groups,n=e.length,i=[],r=[],s=0;s<n;++s)for(var o=e[s],a=o.length,u,l=0;l<a;++l)(u=o[l])&&(i.push(t.call(u,u.__data__,l,o)),r.push(u));return new I(i,r)}function fe(t){return function(){return this.matches(t)}}function he(t){return function(e){return e.matches(t)}}var ln=Array.prototype.find;function cn(t){return function(){return ln.call(this.children,t)}}function fn(){return this.firstElementChild}function hn(t){return this.select(t==null?fn:cn(typeof t=="function"?t:he(t)))}var dn=Array.prototype.filter;function mn(){return Array.from(this.children)}function pn(t){return function(){return dn.call(this.children,t)}}function gn(t){return this.selectAll(t==null?mn:pn(typeof t=="function"?t:he(t)))}function yn(t){typeof t!="function"&&(t=fe(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var s=e[r],o=s.length,a=i[r]=[],u,l=0;l<o;++l)(u=s[l])&&t.call(u,u.__data__,l,s)&&a.push(u);return new I(i,this._parents)}function de(t){return new Array(t.length)}function vn(){return new I(this._enter||this._groups.map(de),this._parents)}function xt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}xt.prototype={constructor:xt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function wn(t){return function(){return t}}function _n(t,e,n,i,r,s){for(var o=0,a,u=e.length,l=s.length;o<l;++o)(a=e[o])?(a.__data__=s[o],i[o]=a):n[o]=new xt(t,s[o]);for(;o<u;++o)(a=e[o])&&(r[o]=a)}function xn(t,e,n,i,r,s,o){var a,u,l=new Map,f=e.length,p=s.length,g=new Array(f),v;for(a=0;a<f;++a)(u=e[a])&&(g[a]=v=o.call(u,u.__data__,a,e)+"",l.has(v)?r[a]=u:l.set(v,u));for(a=0;a<p;++a)v=o.call(t,s[a],a,s)+"",(u=l.get(v))?(i[a]=u,u.__data__=s[a],l.delete(v)):n[a]=new xt(t,s[a]);for(a=0;a<f;++a)(u=e[a])&&l.get(g[a])===u&&(r[a]=u)}function bn(t){return t.__data__}function kn(t,e){if(!arguments.length)return Array.from(this,bn);var n=e?xn:_n,i=this._parents,r=this._groups;typeof t!="function"&&(t=wn(t));for(var s=r.length,o=new Array(s),a=new Array(s),u=new Array(s),l=0;l<s;++l){var f=i[l],p=r[l],g=p.length,v=Mn(t.call(f,f&&f.__data__,l,i)),k=v.length,N=a[l]=new Array(k),z=o[l]=new Array(k),b=u[l]=new Array(g);n(f,p,N,z,b,v,e);for(var A=0,T=0,P,B;A<k;++A)if(P=N[A]){for(A>=T&&(T=A+1);!(B=z[T])&&++T<k;);P._next=B||null}}return o=new I(o,i),o._enter=a,o._exit=u,o}function Mn(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Nn(){return new I(this._exit||this._groups.map(de),this._parents)}function En(t,e,n){var i=this.enter(),r=this,s=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),e!=null&&(r=e(r),r&&(r=r.selection())),n==null?s.remove():n(s),i&&r?i.merge(r).order():r}function Cn(t){for(var e=t.selection?t.selection():t,n=this._groups,i=e._groups,r=n.length,s=i.length,o=Math.min(r,s),a=new Array(r),u=0;u<o;++u)for(var l=n[u],f=i[u],p=l.length,g=a[u]=new Array(p),v,k=0;k<p;++k)(v=l[k]||f[k])&&(g[k]=v);for(;u<r;++u)a[u]=n[u];return new I(a,this._parents)}function Sn(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i=t[e],r=i.length-1,s=i[r],o;--r>=0;)(o=i[r])&&(s&&o.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(o,s),s=o);return this}function zn(t){t||(t=$n);function e(p,g){return p&&g?t(p.__data__,g.__data__):!p-!g}for(var n=this._groups,i=n.length,r=new Array(i),s=0;s<i;++s){for(var o=n[s],a=o.length,u=r[s]=new Array(a),l,f=0;f<a;++f)(l=o[f])&&(u[f]=l);u.sort(e)}return new I(r,this._parents).order()}function $n(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function An(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Tn(){return Array.from(this)}function Rn(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,s=i.length;r<s;++r){var o=i[r];if(o)return o}return null}function Dn(){let t=0;for(const e of this)++t;return t}function Fn(){return!this.node()}function In(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var r=e[n],s=0,o=r.length,a;s<o;++s)(a=r[s])&&t.call(a,a.__data__,s,r);return this}function Bn(t){return function(){this.removeAttribute(t)}}function Hn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Pn(t,e){return function(){this.setAttribute(t,e)}}function Xn(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Vn(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function qn(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Ln(t,e){var n=_t(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((e==null?n.local?Hn:Bn:typeof e=="function"?n.local?qn:Vn:n.local?Xn:Pn)(n,e))}function me(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function On(t){return function(){this.style.removeProperty(t)}}function Yn(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Wn(t,e,n){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function Un(t,e,n){return arguments.length>1?this.each((e==null?On:typeof e=="function"?Wn:Yn)(t,e,n??"")):rt(this.node(),t)}function rt(t,e){return t.style.getPropertyValue(e)||me(t).getComputedStyle(t,null).getPropertyValue(e)}function Gn(t){return function(){delete this[t]}}function Kn(t,e){return function(){this[t]=e}}function Zn(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Qn(t,e){return arguments.length>1?this.each((e==null?Gn:typeof e=="function"?Zn:Kn)(t,e)):this.node()[t]}function pe(t){return t.trim().split(/^|\s+/)}function Pt(t){return t.classList||new ge(t)}function ge(t){this._node=t,this._names=pe(t.getAttribute("class")||"")}ge.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function ye(t,e){for(var n=Pt(t),i=-1,r=e.length;++i<r;)n.add(e[i])}function ve(t,e){for(var n=Pt(t),i=-1,r=e.length;++i<r;)n.remove(e[i])}function Jn(t){return function(){ye(this,t)}}function jn(t){return function(){ve(this,t)}}function ti(t,e){return function(){(e.apply(this,arguments)?ye:ve)(this,t)}}function ei(t,e){var n=pe(t+"");if(arguments.length<2){for(var i=Pt(this.node()),r=-1,s=n.length;++r<s;)if(!i.contains(n[r]))return!1;return!0}return this.each((typeof e=="function"?ti:e?Jn:jn)(n,e))}function ni(){this.textContent=""}function ii(t){return function(){this.textContent=t}}function ri(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function oi(t){return arguments.length?this.each(t==null?ni:(typeof t=="function"?ri:ii)(t)):this.node().textContent}function si(){this.innerHTML=""}function ai(t){return function(){this.innerHTML=t}}function ui(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function li(t){return arguments.length?this.each(t==null?si:(typeof t=="function"?ui:ai)(t)):this.node().innerHTML}function ci(){this.nextSibling&&this.parentNode.appendChild(this)}function fi(){return this.each(ci)}function hi(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function di(){return this.each(hi)}function mi(t){var e=typeof t=="function"?t:le(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function pi(){return null}function gi(t,e){var n=typeof t=="function"?t:le(t),i=e==null?pi:typeof e=="function"?e:Ht(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function yi(){var t=this.parentNode;t&&t.removeChild(this)}function vi(){return this.each(yi)}function wi(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function _i(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function xi(t){return this.select(t?_i:wi)}function bi(t){return arguments.length?this.property("__data__",t):this.node().__data__}function ki(t){return function(e){t.call(this,e,this.__data__)}}function Mi(t){return t.trim().split(/^|\s+/).map(function(e){var n="",i=e.indexOf(".");return i>=0&&(n=e.slice(i+1),e=e.slice(0,i)),{type:e,name:n}})}function Ni(t){return function(){var e=this.__on;if(e){for(var n=0,i=-1,r=e.length,s;n<r;++n)s=e[n],(!t.type||s.type===t.type)&&s.name===t.name?this.removeEventListener(s.type,s.listener,s.options):e[++i]=s;++i?e.length=i:delete this.__on}}}function Ei(t,e,n){return function(){var i=this.__on,r,s=ki(e);if(i){for(var o=0,a=i.length;o<a;++o)if((r=i[o]).type===t.type&&r.name===t.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=s,r.options=n),r.value=e;return}}this.addEventListener(t.type,s,n),r={type:t.type,name:t.name,value:e,listener:s,options:n},i?i.push(r):this.__on=[r]}}function Ci(t,e,n){var i=Mi(t+""),r,s=i.length,o;if(arguments.length<2){var a=this.node().__on;if(a){for(var u=0,l=a.length,f;u<l;++u)for(r=0,f=a[u];r<s;++r)if((o=i[r]).type===f.type&&o.name===f.name)return f.value}return}for(a=e?Ei:Ni,r=0;r<s;++r)this.each(a(i[r],e,n));return this}function we(t,e,n){var i=me(t),r=i.CustomEvent;typeof r=="function"?r=new r(e,n):(r=i.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function Si(t,e){return function(){return we(this,t,e)}}function zi(t,e){return function(){return we(this,t,e.apply(this,arguments))}}function $i(t,e){return this.each((typeof e=="function"?zi:Si)(t,e))}function*Ai(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,s=i.length,o;r<s;++r)(o=i[r])&&(yield o)}var _e=[null];function I(t,e){this._groups=t,this._parents=e}function lt(){return new I([[document.documentElement]],_e)}function Ti(){return this}I.prototype=lt.prototype={constructor:I,select:rn,selectAll:un,selectChild:hn,selectChildren:gn,filter:yn,data:kn,enter:vn,exit:Nn,join:En,merge:Cn,selection:Ti,order:Sn,sort:zn,call:An,nodes:Tn,node:Rn,size:Dn,empty:Fn,each:In,attr:Ln,style:Un,property:Qn,classed:ei,text:oi,html:li,raise:fi,lower:di,append:mi,insert:gi,remove:vi,clone:xi,datum:bi,on:Ci,dispatch:$i,[Symbol.iterator]:Ai};function J(t){return typeof t=="string"?new I([[document.querySelector(t)]],[document.documentElement]):new I([[t]],_e)}function Ri(t){let e;for(;e=t.sourceEvent;)t=e;return t}function j(t,e){if(t=Ri(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=t.clientX,i.y=t.clientY,i=i.matrixTransform(e.getScreenCTM().inverse()),[i.x,i.y]}if(e.getBoundingClientRect){var r=e.getBoundingClientRect();return[t.clientX-r.left-e.clientLeft,t.clientY-r.top-e.clientTop]}}return[t.pageX,t.pageY]}const Xt={capture:!0,passive:!1};function Vt(t){t.preventDefault(),t.stopImmediatePropagation()}function Di(t){var e=t.document.documentElement,n=J(t).on("dragstart.drag",Vt,Xt);"onselectstart"in e?n.on("selectstart.drag",Vt,Xt):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Fi(t,e){var n=t.document.documentElement,i=J(t).on("dragstart.drag",null);e&&(i.on("click.drag",Vt,Xt),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function qt(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function xe(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function ct(){}var ft=.7,bt=1/ft,ot="\\s*([+-]?\\d+)\\s*",ht="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",O="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ii=/^#([0-9a-f]{3,8})$/,Bi=new RegExp(`^rgb\\(${ot},${ot},${ot}\\)$`),Hi=new RegExp(`^rgb\\(${O},${O},${O}\\)$`),Pi=new RegExp(`^rgba\\(${ot},${ot},${ot},${ht}\\)$`),Xi=new RegExp(`^rgba\\(${O},${O},${O},${ht}\\)$`),Vi=new RegExp(`^hsl\\(${ht},${O},${O}\\)$`),qi=new RegExp(`^hsla\\(${ht},${O},${O},${ht}\\)$`),be={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};qt(ct,dt,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:ke,formatHex:ke,formatHex8:Li,formatHsl:Oi,formatRgb:Me,toString:Me});function ke(){return this.rgb().formatHex()}function Li(){return this.rgb().formatHex8()}function Oi(){return ze(this).formatHsl()}function Me(){return this.rgb().formatRgb()}function dt(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Ii.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Ne(e):n===3?new F(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?kt(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?kt(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Bi.exec(t))?new F(e[1],e[2],e[3],1):(e=Hi.exec(t))?new F(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Pi.exec(t))?kt(e[1],e[2],e[3],e[4]):(e=Xi.exec(t))?kt(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Vi.exec(t))?Se(e[1],e[2]/100,e[3]/100,1):(e=qi.exec(t))?Se(e[1],e[2]/100,e[3]/100,e[4]):be.hasOwnProperty(t)?Ne(be[t]):t==="transparent"?new F(NaN,NaN,NaN,0):null}function Ne(t){return new F(t>>16&255,t>>8&255,t&255,1)}function kt(t,e,n,i){return i<=0&&(t=e=n=NaN),new F(t,e,n,i)}function Yi(t){return t instanceof ct||(t=dt(t)),t?(t=t.rgb(),new F(t.r,t.g,t.b,t.opacity)):new F}function Lt(t,e,n,i){return arguments.length===1?Yi(t):new F(t,e,n,i??1)}function F(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}qt(F,Lt,xe(ct,{brighter(t){return t=t==null?bt:Math.pow(bt,t),new F(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?ft:Math.pow(ft,t),new F(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new F(et(this.r),et(this.g),et(this.b),Mt(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ee,formatHex:Ee,formatHex8:Wi,formatRgb:Ce,toString:Ce}));function Ee(){return`#${nt(this.r)}${nt(this.g)}${nt(this.b)}`}function Wi(){return`#${nt(this.r)}${nt(this.g)}${nt(this.b)}${nt((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ce(){const t=Mt(this.opacity);return`${t===1?"rgb(":"rgba("}${et(this.r)}, ${et(this.g)}, ${et(this.b)}${t===1?")":`, ${t})`}`}function Mt(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function et(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function nt(t){return t=et(t),(t<16?"0":"")+t.toString(16)}function Se(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new X(t,e,n,i)}function ze(t){if(t instanceof X)return new X(t.h,t.s,t.l,t.opacity);if(t instanceof ct||(t=dt(t)),!t)return new X;if(t instanceof X)return t;t=t.rgb();var e=t.r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),s=Math.max(e,n,i),o=NaN,a=s-r,u=(s+r)/2;return a?(e===s?o=(n-i)/a+(n<i)*6:n===s?o=(i-e)/a+2:o=(e-n)/a+4,a/=u<.5?s+r:2-s-r,o*=60):a=u>0&&u<1?0:o,new X(o,a,u,t.opacity)}function Ui(t,e,n,i){return arguments.length===1?ze(t):new X(t,e,n,i??1)}function X(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}qt(X,Ui,xe(ct,{brighter(t){return t=t==null?bt:Math.pow(bt,t),new X(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?ft:Math.pow(ft,t),new X(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new F(Ot(t>=240?t-240:t+120,r,i),Ot(t,r,i),Ot(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new X($e(this.h),Nt(this.s),Nt(this.l),Mt(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Mt(this.opacity);return`${t===1?"hsl(":"hsla("}${$e(this.h)}, ${Nt(this.s)*100}%, ${Nt(this.l)*100}%${t===1?")":`, ${t})`}`}}));function $e(t){return t=(t||0)%360,t<0?t+360:t}function Nt(t){return Math.max(0,Math.min(1,t||0))}function Ot(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Ae=t=>()=>t;function Gi(t,e){return function(n){return t+n*e}}function Ki(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}function Zi(t){return(t=+t)==1?Te:function(e,n){return n-e?Ki(e,n,t):Ae(isNaN(e)?n:e)}}function Te(t,e){var n=e-t;return n?Gi(t,n):Ae(isNaN(t)?e:t)}const Re=function t(e){var n=Zi(e);function i(r,s){var o=n((r=Lt(r)).r,(s=Lt(s)).r),a=n(r.g,s.g),u=n(r.b,s.b),l=Te(r.opacity,s.opacity);return function(f){return r.r=o(f),r.g=a(f),r.b=u(f),r.opacity=l(f),r+""}}return i.gamma=t,i}(1);function tt(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var Yt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Wt=new RegExp(Yt.source,"g");function Qi(t){return function(){return t}}function Ji(t){return function(e){return t(e)+""}}function ji(t,e){var n=Yt.lastIndex=Wt.lastIndex=0,i,r,s,o=-1,a=[],u=[];for(t=t+"",e=e+"";(i=Yt.exec(t))&&(r=Wt.exec(e));)(s=r.index)>n&&(s=e.slice(n,s),a[o]?a[o]+=s:a[++o]=s),(i=i[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,u.push({i:o,x:tt(i,r)})),n=Wt.lastIndex;return n<e.length&&(s=e.slice(n),a[o]?a[o]+=s:a[++o]=s),a.length<2?u[0]?Ji(u[0].x):Qi(e):(e=u.length,function(l){for(var f=0,p;f<e;++f)a[(p=u[f]).i]=p.x(l);return a.join("")})}var De=180/Math.PI,Ut={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Fe(t,e,n,i,r,s){var o,a,u;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(u=t*n+e*i)&&(n-=t*u,i-=e*u),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,u/=a),t*i<e*n&&(t=-t,e=-e,u=-u,o=-o),{translateX:r,translateY:s,rotate:Math.atan2(e,t)*De,skewX:Math.atan(u)*De,scaleX:o,scaleY:a}}var Et;function tr(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Ut:Fe(e.a,e.b,e.c,e.d,e.e,e.f)}function er(t){return t==null||(Et||(Et=document.createElementNS("http://www.w3.org/2000/svg","g")),Et.setAttribute("transform",t),!(t=Et.transform.baseVal.consolidate()))?Ut:(t=t.matrix,Fe(t.a,t.b,t.c,t.d,t.e,t.f))}function Ie(t,e,n,i){function r(l){return l.length?l.pop()+" ":""}function s(l,f,p,g,v,k){if(l!==p||f!==g){var N=v.push("translate(",null,e,null,n);k.push({i:N-4,x:tt(l,p)},{i:N-2,x:tt(f,g)})}else(p||g)&&v.push("translate("+p+e+g+n)}function o(l,f,p,g){l!==f?(l-f>180?f+=360:f-l>180&&(l+=360),g.push({i:p.push(r(p)+"rotate(",null,i)-2,x:tt(l,f)})):f&&p.push(r(p)+"rotate("+f+i)}function a(l,f,p,g){l!==f?g.push({i:p.push(r(p)+"skewX(",null,i)-2,x:tt(l,f)}):f&&p.push(r(p)+"skewX("+f+i)}function u(l,f,p,g,v,k){if(l!==p||f!==g){var N=v.push(r(v)+"scale(",null,",",null,")");k.push({i:N-4,x:tt(l,p)},{i:N-2,x:tt(f,g)})}else(p!==1||g!==1)&&v.push(r(v)+"scale("+p+","+g+")")}return function(l,f){var p=[],g=[];return l=t(l),f=t(f),s(l.translateX,l.translateY,f.translateX,f.translateY,p,g),o(l.rotate,f.rotate,p,g),a(l.skewX,f.skewX,p,g),u(l.scaleX,l.scaleY,f.scaleX,f.scaleY,p,g),l=f=null,function(v){for(var k=-1,N=g.length,z;++k<N;)p[(z=g[k]).i]=z.x(v);return p.join("")}}}var nr=Ie(tr,"px, ","px)","deg)"),ir=Ie(er,", ",")",")"),rr=1e-12;function Be(t){return((t=Math.exp(t))+1/t)/2}function or(t){return((t=Math.exp(t))-1/t)/2}function sr(t){return((t=Math.exp(2*t))-1)/(t+1)}const ar=function t(e,n,i){function r(s,o){var a=s[0],u=s[1],l=s[2],f=o[0],p=o[1],g=o[2],v=f-a,k=p-u,N=v*v+k*k,z,b;if(N<rr)b=Math.log(g/l)/e,z=function(R){return[a+R*v,u+R*k,l*Math.exp(e*R*b)]};else{var A=Math.sqrt(N),T=(g*g-l*l+i*N)/(2*l*n*A),P=(g*g-l*l-i*N)/(2*g*n*A),B=Math.log(Math.sqrt(T*T+1)-T),$=Math.log(Math.sqrt(P*P+1)-P);b=($-B)/e,z=function(R){var W=R*b,C=Be(B),at=l/(n*A)*(C*sr(e*W+B)-or(B));return[a+at*v,u+at*k,l*C/Be(e*W+B)]}}return z.duration=b*1e3*e/Math.SQRT2,z}return r.rho=function(s){var o=Math.max(.001,+s),a=o*o,u=a*a;return t(o,a,u)},r}(Math.SQRT2,2,4);var st=0,mt=0,pt=0,He=1e3,Ct,gt,St=0,it=0,zt=0,yt=typeof performance=="object"&&performance.now?performance:Date,Pe=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Gt(){return it||(Pe(ur),it=yt.now()+zt)}function ur(){it=0}function $t(){this._call=this._time=this._next=null}$t.prototype=Xe.prototype={constructor:$t,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Gt():+n)+(e==null?0:+e),!this._next&>!==this&&(gt?gt._next=this:Ct=this,gt=this),this._call=t,this._time=n,Kt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Kt())}};function Xe(t,e,n){var i=new $t;return i.restart(t,e,n),i}function lr(){Gt(),++st;for(var t=Ct,e;t;)(e=it-t._time)>=0&&t._call.call(void 0,e),t=t._next;--st}function Ve(){it=(St=yt.now())+zt,st=mt=0;try{lr()}finally{st=0,fr(),it=0}}function cr(){var t=yt.now(),e=t-St;e>He&&(zt-=e,St=t)}function fr(){for(var t,e=Ct,n,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Ct=n);gt=t,Kt(i)}function Kt(t){if(!st){mt&&(mt=clearTimeout(mt));var e=t-it;e>24?(t<1/0&&(mt=setTimeout(Ve,t-yt.now()-zt)),pt&&(pt=clearInterval(pt))):(pt||(St=yt.now(),pt=setInterval(cr,He)),st=1,Pe(Ve))}}function qe(t,e,n){var i=new $t;return e=e==null?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,n),i}var hr=It("start","end","cancel","interrupt"),dr=[],Le=0,Oe=1,Zt=2,At=3,Ye=4,Qt=5,Tt=6;function Rt(t,e,n,i,r,s){var o=t.__transition;if(!o)t.__transition={};else if(n in o)return;mr(t,n,{name:e,index:i,group:r,on:hr,tween:dr,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Le})}function Jt(t,e){var n=V(t,e);if(n.state>Le)throw new Error("too late; already scheduled");return n}function Y(t,e){var n=V(t,e);if(n.state>At)throw new Error("too late; already running");return n}function V(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function mr(t,e,n){var i=t.__transition,r;i[e]=n,n.timer=Xe(s,0,n.time);function s(l){n.state=Oe,n.timer.restart(o,n.delay,n.time),n.delay<=l&&o(l-n.delay)}function o(l){var f,p,g,v;if(n.state!==Oe)return u();for(f in i)if(v=i[f],v.name===n.name){if(v.state===At)return qe(o);v.state===Ye?(v.state=Tt,v.timer.stop(),v.on.call("interrupt",t,t.__data__,v.index,v.group),delete i[f]):+f<e&&(v.state=Tt,v.timer.stop(),v.on.call("cancel",t,t.__data__,v.index,v.group),delete i[f])}if(qe(function(){n.state===At&&(n.state=Ye,n.timer.restart(a,n.delay,n.time),a(l))}),n.state=Zt,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Zt){for(n.state=At,r=new Array(g=n.tween.length),f=0,p=-1;f<g;++f)(v=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(r[++p]=v);r.length=p+1}}function a(l){for(var f=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(u),n.state=Qt,1),p=-1,g=r.length;++p<g;)r[p].call(t,f);n.state===Qt&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=Tt,n.timer.stop(),delete i[e];for(var l in i)return;delete t.__transition}}function Dt(t,e){var n=t.__transition,i,r,s=!0,o;if(n){e=e==null?null:e+"";for(o in n){if((i=n[o]).name!==e){s=!1;continue}r=i.state>Zt&&i.state<Qt,i.state=Tt,i.timer.stop(),i.on.call(r?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete n[o]}s&&delete t.__transition}}function pr(t){return this.each(function(){Dt(this,t)})}function gr(t,e){var n,i;return function(){var r=Y(this,t),s=r.tween;if(s!==n){i=n=s;for(var o=0,a=i.length;o<a;++o)if(i[o].name===e){i=i.slice(),i.splice(o,1);break}}r.tween=i}}function yr(t,e,n){var i,r;if(typeof n!="function")throw new Error;return function(){var s=Y(this,t),o=s.tween;if(o!==i){r=(i=o).slice();for(var a={name:e,value:n},u=0,l=r.length;u<l;++u)if(r[u].name===e){r[u]=a;break}u===l&&r.push(a)}s.tween=r}}function vr(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i=V(this.node(),n).tween,r=0,s=i.length,o;r<s;++r)if((o=i[r]).name===t)return o.value;return null}return this.each((e==null?gr:yr)(n,t,e))}function jt(t,e,n){var i=t._id;return t.each(function(){var r=Y(this,i);(r.value||(r.value={}))[e]=n.apply(this,arguments)}),function(r){return V(r,i).value[e]}}function We(t,e){var n;return(typeof e=="number"?tt:e instanceof dt?Re:(n=dt(e))?(e=n,Re):ji)(t,e)}function wr(t){return function(){this.removeAttribute(t)}}function _r(t){return function(){this.removeAttributeNS(t.space,t.local)}}function xr(t,e,n){var i,r=n+"",s;return function(){var o=this.getAttribute(t);return o===r?null:o===i?s:s=e(i=o,n)}}function br(t,e,n){var i,r=n+"",s;return function(){var o=this.getAttributeNS(t.space,t.local);return o===r?null:o===i?s:s=e(i=o,n)}}function kr(t,e,n){var i,r,s;return function(){var o,a=n(this),u;return a==null?void this.removeAttribute(t):(o=this.getAttribute(t),u=a+"",o===u?null:o===i&&u===r?s:(r=u,s=e(i=o,a)))}}function Mr(t,e,n){var i,r,s;return function(){var o,a=n(this),u;return a==null?void this.removeAttributeNS(t.space,t.local):(o=this.getAttributeNS(t.space,t.local),u=a+"",o===u?null:o===i&&u===r?s:(r=u,s=e(i=o,a)))}}function Nr(t,e){var n=_t(t),i=n==="transform"?ir:We;return this.attrTween(t,typeof e=="function"?(n.local?Mr:kr)(n,i,jt(this,"attr."+t,e)):e==null?(n.local?_r:wr)(n):(n.local?br:xr)(n,i,e))}function Er(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Cr(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Sr(t,e){var n,i;function r(){var s=e.apply(this,arguments);return s!==i&&(n=(i=s)&&Cr(t,s)),n}return r._value=e,r}function zr(t,e){var n,i;function r(){var s=e.apply(this,arguments);return s!==i&&(n=(i=s)&&Er(t,s)),n}return r._value=e,r}function $r(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var i=_t(t);return this.tween(n,(i.local?Sr:zr)(i,e))}function Ar(t,e){return function(){Jt(this,t).delay=+e.apply(this,arguments)}}function Tr(t,e){return e=+e,function(){Jt(this,t).delay=e}}function Rr(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Ar:Tr)(e,t)):V(this.node(),e).delay}function Dr(t,e){return function(){Y(this,t).duration=+e.apply(this,arguments)}}function Fr(t,e){return e=+e,function(){Y(this,t).duration=e}}function Ir(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Dr:Fr)(e,t)):V(this.node(),e).duration}function Br(t,e){if(typeof e!="function")throw new Error;return function(){Y(this,t).ease=e}}function Hr(t){var e=this._id;return arguments.length?this.each(Br(e,t)):V(this.node(),e).ease}function Pr(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Y(this,t).ease=n}}function Xr(t){if(typeof t!="function")throw new Error;return this.each(Pr(this._id,t))}function Vr(t){typeof t!="function"&&(t=fe(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var s=e[r],o=s.length,a=i[r]=[],u,l=0;l<o;++l)(u=s[l])&&t.call(u,u.__data__,l,s)&&a.push(u);return new G(i,this._parents,this._name,this._id)}function qr(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,i=e.length,r=n.length,s=Math.min(i,r),o=new Array(i),a=0;a<s;++a)for(var u=e[a],l=n[a],f=u.length,p=o[a]=new Array(f),g,v=0;v<f;++v)(g=u[v]||l[v])&&(p[v]=g);for(;a<i;++a)o[a]=e[a];return new G(o,this._parents,this._name,this._id)}function Lr(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function Or(t,e,n){var i,r,s=Lr(e)?Jt:Y;return function(){var o=s(this,t),a=o.on;a!==i&&(r=(i=a).copy()).on(e,n),o.on=r}}function Yr(t,e){var n=this._id;return arguments.length<2?V(this.node(),n).on.on(t):this.each(Or(n,t,e))}function Wr(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Ur(){return this.on("end.remove",Wr(this._id))}function Gr(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ht(t));for(var i=this._groups,r=i.length,s=new Array(r),o=0;o<r;++o)for(var a=i[o],u=a.length,l=s[o]=new Array(u),f,p,g=0;g<u;++g)(f=a[g])&&(p=t.call(f,f.__data__,g,a))&&("__data__"in f&&(p.__data__=f.__data__),l[g]=p,Rt(l[g],e,n,g,l,V(f,n)));return new G(s,this._parents,e,n)}function Kr(t){var e=this._name,n=this._id;typeof t!="function"&&(t=ce(t));for(var i=this._groups,r=i.length,s=[],o=[],a=0;a<r;++a)for(var u=i[a],l=u.length,f,p=0;p<l;++p)if(f=u[p]){for(var g=t.call(f,f.__data__,p,u),v,k=V(f,n),N=0,z=g.length;N<z;++N)(v=g[N])&&Rt(v,e,n,N,g,k);s.push(g),o.push(f)}return new G(s,o,e,n)}var Zr=lt.prototype.constructor;function Qr(){return new Zr(this._groups,this._parents)}function Jr(t,e){var n,i,r;return function(){var s=rt(this,t),o=(this.style.removeProperty(t),rt(this,t));return s===o?null:s===n&&o===i?r:r=e(n=s,i=o)}}function Ue(t){return function(){this.style.removeProperty(t)}}function jr(t,e,n){var i,r=n+"",s;return function(){var o=rt(this,t);return o===r?null:o===i?s:s=e(i=o,n)}}function to(t,e,n){var i,r,s;return function(){var o=rt(this,t),a=n(this),u=a+"";return a==null&&(u=a=(this.style.removeProperty(t),rt(this,t))),o===u?null:o===i&&u===r?s:(r=u,s=e(i=o,a))}}function eo(t,e){var n,i,r,s="style."+e,o="end."+s,a;return function(){var u=Y(this,t),l=u.on,f=u.value[s]==null?a||(a=Ue(e)):void 0;(l!==n||r!==f)&&(i=(n=l).copy()).on(o,r=f),u.on=i}}function no(t,e,n){var i=(t+="")=="transform"?nr:We;return e==null?this.styleTween(t,Jr(t,i)).on("end.style."+t,Ue(t)):typeof e=="function"?this.styleTween(t,to(t,i,jt(this,"style."+t,e))).each(eo(this._id,t)):this.styleTween(t,jr(t,i,e),n).on("end.style."+t,null)}function io(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}function ro(t,e,n){var i,r;function s(){var o=e.apply(this,arguments);return o!==r&&(i=(r=o)&&io(t,o,n)),i}return s._value=e,s}function oo(t,e,n){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!="function")throw new Error;return this.tween(i,ro(t,e,n??""))}function so(t){return function(){this.textContent=t}}function ao(t){return function(){var e=t(this);this.textContent=e??""}}function uo(t){return this.tween("text",typeof t=="function"?ao(jt(this,"text",t)):so(t==null?"":t+""))}function lo(t){return function(e){this.textContent=t.call(this,e)}}function co(t){var e,n;function i(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&lo(r)),e}return i._value=t,i}function fo(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,co(t))}function ho(){for(var t=this._name,e=this._id,n=Ge(),i=this._groups,r=i.length,s=0;s<r;++s)for(var o=i[s],a=o.length,u,l=0;l<a;++l)if(u=o[l]){var f=V(u,e);Rt(u,t,n,l,o,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new G(i,this._parents,t,n)}function mo(){var t,e,n=this,i=n._id,r=n.size();return new Promise(function(s,o){var a={value:o},u={value:function(){--r===0&&s()}};n.each(function(){var l=Y(this,i),f=l.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(a),e._.interrupt.push(a),e._.end.push(u)),l.on=e}),r===0&&s()})}var po=0;function G(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function Ge(){return++po}var K=lt.prototype;G.prototype={constructor:G,select:Gr,selectAll:Kr,selectChild:K.selectChild,selectChildren:K.selectChildren,filter:Vr,merge:qr,selection:Qr,transition:ho,call:K.call,nodes:K.nodes,node:K.node,size:K.size,empty:K.empty,each:K.each,on:Yr,attr:Nr,attrTween:$r,style:no,styleTween:oo,text:uo,textTween:fo,remove:Ur,tween:vr,delay:Rr,duration:Ir,ease:Hr,easeVarying:Xr,end:mo,[Symbol.iterator]:K[Symbol.iterator]};function go(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var yo={time:null,delay:0,duration:250,ease:go};function vo(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function wo(t){var e,n;t instanceof G?(e=t._id,t=t._name):(e=Ge(),(n=yo).time=Gt(),t=t==null?null:t+"");for(var i=this._groups,r=i.length,s=0;s<r;++s)for(var o=i[s],a=o.length,u,l=0;l<a;++l)(u=o[l])&&Rt(u,t,e,l,o,n||vo(u,e));return new G(i,this._parents,t,e)}lt.prototype.interrupt=pr,lt.prototype.transition=wo;const Ft=t=>()=>t;function _o(t,{sourceEvent:e,target:n,transform:i,dispatch:r}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:r}})}function Z(t,e,n){this.k=t,this.x=e,this.y=n}Z.prototype={constructor:Z,scale:function(t){return t===1?this:new Z(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Z(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var te=new Z(1,0,0);Z.prototype;function ee(t){t.stopImmediatePropagation()}function vt(t){t.preventDefault(),t.stopImmediatePropagation()}function xo(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function bo(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function Ke(){return this.__zoom||te}function ko(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Mo(){return navigator.maxTouchPoints||"ontouchstart"in this}function No(t,e,n){var i=t.invertX(e[0][0])-n[0][0],r=t.invertX(e[1][0])-n[1][0],s=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(r>i?(i+r)/2:Math.min(0,i)||Math.max(0,r),o>s?(s+o)/2:Math.min(0,s)||Math.max(0,o))}function Eo(){var t=xo,e=bo,n=No,i=ko,r=Mo,s=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],a=250,u=ar,l=It("start","zoom","end"),f,p,g,v=500,k=150,N=0,z=10;function b(c){c.property("__zoom",Ke).on("wheel.zoom",W,{passive:!1}).on("mousedown.zoom",C).on("dblclick.zoom",at).filter(r).on("touchstart.zoom",ie).on("touchmove.zoom",re).on("touchend.zoom touchcancel.zoom",oe).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(c,w,h,d){var y=c.selection?c.selection():c;y.property("__zoom",Ke),c!==y?B(c,w,h,d):y.interrupt().each(function(){$(this,arguments).event(d).start().zoom(null,typeof w=="function"?w.apply(this,arguments):w).end()})},b.scaleBy=function(c,w,h,d){b.scaleTo(c,function(){var y=this.__zoom.k,m=typeof w=="function"?w.apply(this,arguments):w;return y*m},h,d)},b.scaleTo=function(c,w,h,d){b.transform(c,function(){var y=e.apply(this,arguments),m=this.__zoom,x=h==null?P(y):typeof h=="function"?h.apply(this,arguments):h,E=m.invert(x),M=typeof w=="function"?w.apply(this,arguments):w;return n(T(A(m,M),x,E),y,o)},h,d)},b.translateBy=function(c,w,h,d){b.transform(c,function(){return n(this.__zoom.translate(typeof w=="function"?w.apply(this,arguments):w,typeof h=="function"?h.apply(this,arguments):h),e.apply(this,arguments),o)},null,d)},b.translateTo=function(c,w,h,d,y){b.transform(c,function(){var m=e.apply(this,arguments),x=this.__zoom,E=d==null?P(m):typeof d=="function"?d.apply(this,arguments):d;return n(te.translate(E[0],E[1]).scale(x.k).translate(typeof w=="function"?-w.apply(this,arguments):-w,typeof h=="function"?-h.apply(this,arguments):-h),m,o)},d,y)};function A(c,w){return w=Math.max(s[0],Math.min(s[1],w)),w===c.k?c:new Z(w,c.x,c.y)}function T(c,w,h){var d=w[0]-h[0]*c.k,y=w[1]-h[1]*c.k;return d===c.x&&y===c.y?c:new Z(c.k,d,y)}function P(c){return[(+c[0][0]+ +c[1][0])/2,(+c[0][1]+ +c[1][1])/2]}function B(c,w,h,d){c.on("start.zoom",function(){$(this,arguments).event(d).start()}).on("interrupt.zoom end.zoom",function(){$(this,arguments).event(d).end()}).tween("zoom",function(){var y=this,m=arguments,x=$(y,m).event(d),E=e.apply(y,m),M=h==null?P(E):typeof h=="function"?h.apply(y,m):h,D=Math.max(E[1][0]-E[0][0],E[1][1]-E[0][1]),S=y.__zoom,H=typeof w=="function"?w.apply(y,m):w,q=u(S.invert(M).concat(D/S.k),H.invert(M).concat(D/H.k));return function(L){if(L===1)L=H;else{var Q=q(L),se=D/Q[2];L=new Z(se,M[0]-Q[0]*se,M[1]-Q[1]*se)}x.zoom(null,L)}})}function $(c,w,h){return!h&&c.__zooming||new R(c,w)}function R(c,w){this.that=c,this.args=w,this.active=0,this.sourceEvent=null,this.extent=e.apply(c,w),this.taps=0}R.prototype={event:function(c){return c&&(this.sourceEvent=c),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(c,w){return this.mouse&&c!=="mouse"&&(this.mouse[1]=w.invert(this.mouse[0])),this.touch0&&c!=="touch"&&(this.touch0[1]=w.invert(this.touch0[0])),this.touch1&&c!=="touch"&&(this.touch1[1]=w.invert(this.touch1[0])),this.that.__zoom=w,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(c){var w=J(this.that).datum();l.call(c,this.that,new _o(c,{sourceEvent:this.sourceEvent,target:b,type:c,transform:this.that.__zoom,dispatch:l}),w)}};function W(c,...w){if(!t.apply(this,arguments))return;var h=$(this,w).event(c),d=this.__zoom,y=Math.max(s[0],Math.min(s[1],d.k*Math.pow(2,i.apply(this,arguments)))),m=j(c);if(h.wheel)(h.mouse[0][0]!==m[0]||h.mouse[0][1]!==m[1])&&(h.mouse[1]=d.invert(h.mouse[0]=m)),clearTimeout(h.wheel);else{if(d.k===y)return;h.mouse=[m,d.invert(m)],Dt(this),h.start()}vt(c),h.wheel=setTimeout(x,k),h.zoom("mouse",n(T(A(d,y),h.mouse[0],h.mouse[1]),h.extent,o));function x(){h.wheel=null,h.end()}}function C(c,...w){if(g||!t.apply(this,arguments))return;var h=c.currentTarget,d=$(this,w,!0).event(c),y=J(c.view).on("mousemove.zoom",M,!0).on("mouseup.zoom",D,!0),m=j(c,h),x=c.clientX,E=c.clientY;Di(c.view),ee(c),d.mouse=[m,this.__zoom.invert(m)],Dt(this),d.start();function M(S){if(vt(S),!d.moved){var H=S.clientX-x,q=S.clientY-E;d.moved=H*H+q*q>N}d.event(S).zoom("mouse",n(T(d.that.__zoom,d.mouse[0]=j(S,h),d.mouse[1]),d.extent,o))}function D(S){y.on("mousemove.zoom mouseup.zoom",null),Fi(S.view,d.moved),vt(S),d.event(S).end()}}function at(c,...w){if(t.apply(this,arguments)){var h=this.__zoom,d=j(c.changedTouches?c.changedTouches[0]:c,this),y=h.invert(d),m=h.k*(c.shiftKey?.5:2),x=n(T(A(h,m),d,y),e.apply(this,w),o);vt(c),a>0?J(this).transition().duration(a).call(B,x,d,c):J(this).call(b.transform,x,d,c)}}function ie(c,...w){if(t.apply(this,arguments)){var h=c.touches,d=h.length,y=$(this,w,c.changedTouches.length===d).event(c),m,x,E,M;for(ee(c),x=0;x<d;++x)E=h[x],M=j(E,this),M=[M,this.__zoom.invert(M),E.identifier],y.touch0?!y.touch1&&y.touch0[2]!==M[2]&&(y.touch1=M,y.taps=0):(y.touch0=M,m=!0,y.taps=1+!!f);f&&(f=clearTimeout(f)),m&&(y.taps<2&&(p=M[0],f=setTimeout(function(){f=null},v)),Dt(this),y.start())}}function re(c,...w){if(this.__zooming){var h=$(this,w).event(c),d=c.changedTouches,y=d.length,m,x,E,M;for(vt(c),m=0;m<y;++m)x=d[m],E=j(x,this),h.touch0&&h.touch0[2]===x.identifier?h.touch0[0]=E:h.touch1&&h.touch1[2]===x.identifier&&(h.touch1[0]=E);if(x=h.that.__zoom,h.touch1){var D=h.touch0[0],S=h.touch0[1],H=h.touch1[0],q=h.touch1[1],L=(L=H[0]-D[0])*L+(L=H[1]-D[1])*L,Q=(Q=q[0]-S[0])*Q+(Q=q[1]-S[1])*Q;x=A(x,Math.sqrt(L/Q)),E=[(D[0]+H[0])/2,(D[1]+H[1])/2],M=[(S[0]+q[0])/2,(S[1]+q[1])/2]}else if(h.touch0)E=h.touch0[0],M=h.touch0[1];else return;h.zoom("touch",n(T(x,E,M),h.extent,o))}}function oe(c,...w){if(this.__zooming){var h=$(this,w).event(c),d=c.changedTouches,y=d.length,m,x;for(ee(c),g&&clearTimeout(g),g=setTimeout(function(){g=null},v),m=0;m<y;++m)x=d[m],h.touch0&&h.touch0[2]===x.identifier?delete h.touch0:h.touch1&&h.touch1[2]===x.identifier&&delete h.touch1;if(h.touch1&&!h.touch0&&(h.touch0=h.touch1,delete h.touch1),h.touch0)h.touch0[1]=this.__zoom.invert(h.touch0[0]);else if(h.end(),h.taps===2&&(x=j(x,this),Math.hypot(p[0]-x[0],p[1]-x[1])<z)){var E=J(this).on("dblclick.zoom");E&&E.apply(this,arguments)}}}return b.wheelDelta=function(c){return arguments.length?(i=typeof c=="function"?c:Ft(+c),b):i},b.filter=function(c){return arguments.length?(t=typeof c=="function"?c:Ft(!!c),b):t},b.touchable=function(c){return arguments.length?(r=typeof c=="function"?c:Ft(!!c),b):r},b.extent=function(c){return arguments.length?(e=typeof c=="function"?c:Ft([[+c[0][0],+c[0][1]],[+c[1][0],+c[1][1]]]),b):e},b.scaleExtent=function(c){return arguments.length?(s[0]=+c[0],s[1]=+c[1],b):[s[0],s[1]]},b.translateExtent=function(c){return arguments.length?(o[0][0]=+c[0][0],o[1][0]=+c[1][0],o[0][1]=+c[0][1],o[1][1]=+c[1][1],b):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},b.constrain=function(c){return arguments.length?(n=c,b):n},b.duration=function(c){return arguments.length?(a=+c,b):a},b.interpolate=function(c){return arguments.length?(u=c,b):u},b.on=function(){var c=l.on.apply(l,arguments);return c===l?b:c},b.clickDistance=function(c){return arguments.length?(N=(c=+c)*c,b):Math.sqrt(N)},b.tapDistance=function(c){return arguments.length?(z=+c,b):z},b}const ne=Symbol("MiniMapSlots"),Ze=_.defineComponent({name:"MiniMapNode",compatConfig:{MODE:3},props:["id","position","dimensions","strokeWidth","strokeColor","borderRadius","color","shapeRendering","type"],emits:["click","dblclick","mouseenter","mousemove","mouseleave"],setup(t,{attrs:e,emit:n}){const i=_.inject(ne);return()=>{const r=e.style??{},s=i[`node-${t.type}`];return s?s(t):_.h("rect",{id:t.id,class:["vue-flow__minimap-node",e.class].join(" "),style:r,x:t.position.x,y:t.position.y,rx:t.borderRadius,ry:t.borderRadius,width:t.dimensions.width,height:t.dimensions.height,fill:t.color||r.background||r.backgroundColor,stroke:t.strokeColor,strokeWidth:t.strokeWidth,shapeRendering:t.shapeRendering,onClick:o=>n("click",o),onDblClick:o=>n("dblclick",o),onMouseenter:o=>n("mouseenter",o),onMousemove:o=>n("mousemove",o),onMouseleave:o=>n("mouseleave",o)})}}}),Co=["width","height","viewBox","aria-labelledby"],So=["id"],zo=["d","fill","stroke","stroke-width"],$o={name:"MiniMap",compatConfig:{MODE:3}},Ao=_.defineComponent({...$o,props:{nodeColor:{type:[String,Function],default:"#e2e2e2"},nodeStrokeColor:{type:[String,Function],default:"transparent"},nodeClassName:null,nodeBorderRadius:{default:5},nodeStrokeWidth:{default:2},maskColor:{default:"rgb(240, 240, 240, 0.6)"},maskStrokeColor:{default:"none"},maskStrokeWidth:{default:1},position:{default:()=>"bottom-right"},pannable:{type:Boolean,default:!1},zoomable:{type:Boolean,default:!1},width:null,height:null,ariaLabel:{default:"Vue Flow mini map"}},emits:["click","nodeClick","nodeDblclick","nodeMouseenter","nodeMousemove","nodeMouseleave"],setup(t,{emit:e}){const n=_.useAttrs(),i=200,r=150,{id:s,edges:o,viewport:a,translateExtent:u,dimensions:l,emits:f,nodes:p,d3Selection:g,d3Zoom:v}=U.useVueFlow(),k=_.ref();_.provide(ne,_.useSlots());const N=_.computed(()=>{var d;return t.width??((d=n.style)==null?void 0:d.width)??i}),z=_.computed(()=>{var d;return t.height??((d=n.style)==null?void 0:d.height)??r}),b=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision",A=_.computed(()=>t.nodeColor instanceof Function?t.nodeColor:()=>t.nodeColor),T=_.computed(()=>t.nodeStrokeColor instanceof Function?t.nodeStrokeColor:()=>t.nodeStrokeColor),P=_.computed(()=>t.nodeClassName instanceof Function?t.nodeClassName:()=>t.nodeClassName),B=_.computed(()=>U.getRectOfNodes(p.value)),$=_.computed(()=>({x:-a.value.x/a.value.zoom,y:-a.value.y/a.value.zoom,width:l.value.width/a.value.zoom,height:l.value.height/a.value.zoom})),R=_.computed(()=>p.value&&p.value.length?U.getBoundsofRects(B.value,$.value):$.value),W=_.computed(()=>{const d=R.value.width/N.value,y=R.value.height/z.value;return Math.max(d,y)}),C=_.computed(()=>{const d=W.value*N.value,y=W.value*z.value,m=5*W.value;return{offset:m,x:R.value.x-(d-R.value.width)/2-m,y:R.value.y-(y-R.value.height)/2-m,width:d+m*2,height:y+m*2}}),at=_.computed(()=>!C.value.x||!C.value.y?"":` | ||
M${C.value.x-C.value.offset},${C.value.y-C.value.offset} | ||
@@ -3,0 +3,0 @@ h${C.value.width+C.value.offset*2} |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("vue"),G=require("@vue-flow/core");var Ze={value:()=>{}};function Qt(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new bt(n)}function bt(t){this._=t}function Qe(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}bt.prototype=Qt.prototype={constructor:bt,on:function(t,e){var n=this._,r=Qe(t+"",n),i,s=-1,o=r.length;if(arguments.length<2){for(;++s<o;)if((i=(t=r[s]).type)&&(i=Je(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++s<o;)if(i=(t=r[s]).type)n[i]=se(n[i],t.name,e);else if(e==null)for(i in n)n[i]=se(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new bt(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,s;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],r=0,i=s.length;r<i;++r)s[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,s=r.length;i<s;++i)r[i].value.apply(e,n)}};function Je(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function se(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Ze,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Vt="http://www.w3.org/1999/xhtml";const ae={svg:"http://www.w3.org/2000/svg",xhtml:Vt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Tt(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),ae.hasOwnProperty(e)?{space:ae[e],local:t}:t}function je(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Vt&&e.documentElement.namespaceURI===Vt?e.createElement(t):e.createElementNS(n,t)}}function tn(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Me(t){var e=Tt(t);return(e.local?tn:je)(e)}function en(){}function Jt(t){return t==null?en:function(){return this.querySelector(t)}}function nn(t){typeof t!="function"&&(t=Jt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var s=e[i],o=s.length,a=r[i]=new Array(o),u,l,f=0;f<o;++f)(u=s[f])&&(l=t.call(u,u.__data__,f,s))&&("__data__"in u&&(l.__data__=u.__data__),a[f]=l);return new H(r,this._parents)}function rn(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function on(){return[]}function Ne(t){return t==null?on:function(){return this.querySelectorAll(t)}}function sn(t){return function(){return rn(t.apply(this,arguments))}}function an(t){typeof t=="function"?t=sn(t):t=Ne(t);for(var e=this._groups,n=e.length,r=[],i=[],s=0;s<n;++s)for(var o=e[s],a=o.length,u,l=0;l<a;++l)(u=o[l])&&(r.push(t.call(u,u.__data__,l,o)),i.push(u));return new H(r,i)}function Ee(t){return function(){return this.matches(t)}}function Ce(t){return function(e){return e.matches(t)}}var un=Array.prototype.find;function ln(t){return function(){return un.call(this.children,t)}}function cn(){return this.firstElementChild}function fn(t){return this.select(t==null?cn:ln(typeof t=="function"?t:Ce(t)))}var hn=Array.prototype.filter;function dn(){return Array.from(this.children)}function mn(t){return function(){return hn.call(this.children,t)}}function pn(t){return this.selectAll(t==null?dn:mn(typeof t=="function"?t:Ce(t)))}function gn(t){typeof t!="function"&&(t=Ee(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var s=e[i],o=s.length,a=r[i]=[],u,l=0;l<o;++l)(u=s[l])&&t.call(u,u.__data__,l,s)&&a.push(u);return new H(r,this._parents)}function Se(t){return new Array(t.length)}function vn(){return new H(this._enter||this._groups.map(Se),this._parents)}function Et(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Et.prototype={constructor:Et,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function yn(t){return function(){return t}}function wn(t,e,n,r,i,s){for(var o=0,a,u=e.length,l=s.length;o<l;++o)(a=e[o])?(a.__data__=s[o],r[o]=a):n[o]=new Et(t,s[o]);for(;o<u;++o)(a=e[o])&&(i[o]=a)}function _n(t,e,n,r,i,s,o){var a,u,l=new Map,f=e.length,p=s.length,g=new Array(f),y;for(a=0;a<f;++a)(u=e[a])&&(g[a]=y=o.call(u,u.__data__,a,e)+"",l.has(y)?i[a]=u:l.set(y,u));for(a=0;a<p;++a)y=o.call(t,s[a],a,s)+"",(u=l.get(y))?(r[a]=u,u.__data__=s[a],l.delete(y)):n[a]=new Et(t,s[a]);for(a=0;a<f;++a)(u=e[a])&&l.get(g[a])===u&&(i[a]=u)}function xn(t){return t.__data__}function bn(t,e){if(!arguments.length)return Array.from(this,xn);var n=e?_n:wn,r=this._parents,i=this._groups;typeof t!="function"&&(t=yn(t));for(var s=i.length,o=new Array(s),a=new Array(s),u=new Array(s),l=0;l<s;++l){var f=r[l],p=i[l],g=p.length,y=kn(t.call(f,f&&f.__data__,l,r)),k=y.length,N=a[l]=new Array(k),z=o[l]=new Array(k),b=u[l]=new Array(g);n(f,p,N,z,b,y,e);for(var A=0,T=0,P,I;A<k;++A)if(P=N[A]){for(A>=T&&(T=A+1);!(I=z[T])&&++T<k;);P._next=I||null}}return o=new H(o,r),o._enter=a,o._exit=u,o}function kn(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Mn(){return new H(this._exit||this._groups.map(Se),this._parents)}function Nn(t,e,n){var r=this.enter(),i=this,s=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?s.remove():n(s),r&&i?r.merge(i).order():i}function En(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,s=r.length,o=Math.min(i,s),a=new Array(i),u=0;u<o;++u)for(var l=n[u],f=r[u],p=l.length,g=a[u]=new Array(p),y,k=0;k<p;++k)(y=l[k]||f[k])&&(g[k]=y);for(;u<i;++u)a[u]=n[u];return new H(a,this._parents)}function Cn(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,s=r[i],o;--i>=0;)(o=r[i])&&(s&&o.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(o,s),s=o);return this}function Sn(t){t||(t=zn);function e(p,g){return p&&g?t(p.__data__,g.__data__):!p-!g}for(var n=this._groups,r=n.length,i=new Array(r),s=0;s<r;++s){for(var o=n[s],a=o.length,u=i[s]=new Array(a),l,f=0;f<a;++f)(l=o[f])&&(u[f]=l);u.sort(e)}return new H(i,this._parents).order()}function zn(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function $n(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function An(){return Array.from(this)}function Tn(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,s=r.length;i<s;++i){var o=r[i];if(o)return o}return null}function Rn(){let t=0;for(const e of this)++t;return t}function Dn(){return!this.node()}function Fn(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],s=0,o=i.length,a;s<o;++s)(a=i[s])&&t.call(a,a.__data__,s,i);return this}function In(t){return function(){this.removeAttribute(t)}}function Bn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Hn(t,e){return function(){this.setAttribute(t,e)}}function Pn(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Xn(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function qn(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Vn(t,e){var n=Tt(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?Bn:In:typeof e=="function"?n.local?qn:Xn:n.local?Pn:Hn)(n,e))}function ze(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ln(t){return function(){this.style.removeProperty(t)}}function Yn(t,e,n){return function(){this.style.setProperty(t,e,n)}}function On(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Wn(t,e,n){return arguments.length>1?this.each((e==null?Ln:typeof e=="function"?On:Yn)(t,e,n??"")):st(this.node(),t)}function st(t,e){return t.style.getPropertyValue(e)||ze(t).getComputedStyle(t,null).getPropertyValue(e)}function Un(t){return function(){delete this[t]}}function Gn(t,e){return function(){this[t]=e}}function Kn(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Zn(t,e){return arguments.length>1?this.each((e==null?Un:typeof e=="function"?Kn:Gn)(t,e)):this.node()[t]}function $e(t){return t.trim().split(/^|\s+/)}function jt(t){return t.classList||new Ae(t)}function Ae(t){this._node=t,this._names=$e(t.getAttribute("class")||"")}Ae.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Te(t,e){for(var n=jt(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Re(t,e){for(var n=jt(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Qn(t){return function(){Te(this,t)}}function Jn(t){return function(){Re(this,t)}}function jn(t,e){return function(){(e.apply(this,arguments)?Te:Re)(this,t)}}function tr(t,e){var n=$e(t+"");if(arguments.length<2){for(var r=jt(this.node()),i=-1,s=n.length;++i<s;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?jn:e?Qn:Jn)(n,e))}function er(){this.textContent=""}function nr(t){return function(){this.textContent=t}}function rr(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function ir(t){return arguments.length?this.each(t==null?er:(typeof t=="function"?rr:nr)(t)):this.node().textContent}function or(){this.innerHTML=""}function sr(t){return function(){this.innerHTML=t}}function ar(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function ur(t){return arguments.length?this.each(t==null?or:(typeof t=="function"?ar:sr)(t)):this.node().innerHTML}function lr(){this.nextSibling&&this.parentNode.appendChild(this)}function cr(){return this.each(lr)}function fr(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function hr(){return this.each(fr)}function dr(t){var e=typeof t=="function"?t:Me(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function mr(){return null}function pr(t,e){var n=typeof t=="function"?t:Me(t),r=e==null?mr:typeof e=="function"?e:Jt(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function gr(){var t=this.parentNode;t&&t.removeChild(this)}function vr(){return this.each(gr)}function yr(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function wr(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function _r(t){return this.select(t?wr:yr)}function xr(t){return arguments.length?this.property("__data__",t):this.node().__data__}function br(t){return function(e){t.call(this,e,this.__data__)}}function kr(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function Mr(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,s;n<i;++n)s=e[n],(!t.type||s.type===t.type)&&s.name===t.name?this.removeEventListener(s.type,s.listener,s.options):e[++r]=s;++r?e.length=r:delete this.__on}}}function Nr(t,e,n){return function(){var r=this.__on,i,s=br(e);if(r){for(var o=0,a=r.length;o<a;++o)if((i=r[o]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=n),i.value=e;return}}this.addEventListener(t.type,s,n),i={type:t.type,name:t.name,value:e,listener:s,options:n},r?r.push(i):this.__on=[i]}}function Er(t,e,n){var r=kr(t+""),i,s=r.length,o;if(arguments.length<2){var a=this.node().__on;if(a){for(var u=0,l=a.length,f;u<l;++u)for(i=0,f=a[u];i<s;++i)if((o=r[i]).type===f.type&&o.name===f.name)return f.value}return}for(a=e?Nr:Mr,i=0;i<s;++i)this.each(a(r[i],e,n));return this}function De(t,e,n){var r=ze(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Cr(t,e){return function(){return De(this,t,e)}}function Sr(t,e){return function(){return De(this,t,e.apply(this,arguments))}}function zr(t,e){return this.each((typeof e=="function"?Sr:Cr)(t,e))}function*$r(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,s=r.length,o;i<s;++i)(o=r[i])&&(yield o)}var Fe=[null];function H(t,e){this._groups=t,this._parents=e}function gt(){return new H([[document.documentElement]],Fe)}function Ar(){return this}H.prototype=gt.prototype={constructor:H,select:nn,selectAll:an,selectChild:fn,selectChildren:pn,filter:gn,data:bn,enter:vn,exit:Mn,join:Nn,merge:En,selection:Ar,order:Cn,sort:Sn,call:$n,nodes:An,node:Tn,size:Rn,empty:Dn,each:Fn,attr:Vn,style:Wn,property:Zn,classed:tr,text:ir,html:ur,raise:cr,lower:hr,append:dr,insert:pr,remove:vr,clone:_r,datum:xr,on:Er,dispatch:zr,[Symbol.iterator]:$r};function tt(t){return typeof t=="string"?new H([[document.querySelector(t)]],[document.documentElement]):new H([[t]],Fe)}function Tr(t){let e;for(;e=t.sourceEvent;)t=e;return t}function J(t,e){if(t=Tr(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}const Lt={capture:!0,passive:!1};function Yt(t){t.preventDefault(),t.stopImmediatePropagation()}function Rr(t){var e=t.document.documentElement,n=tt(t).on("dragstart.drag",Yt,Lt);"onselectstart"in e?n.on("selectstart.drag",Yt,Lt):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Dr(t,e){var n=t.document.documentElement,r=tt(t).on("dragstart.drag",null);e&&(r.on("click.drag",Yt,Lt),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function te(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ie(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function vt(){}var ht=.7,Ct=1/ht,ot="\\s*([+-]?\\d+)\\s*",dt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",O="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Fr=/^#([0-9a-f]{3,8})$/,Ir=new RegExp(`^rgb\\(${ot},${ot},${ot}\\)$`),Br=new RegExp(`^rgb\\(${O},${O},${O}\\)$`),Hr=new RegExp(`^rgba\\(${ot},${ot},${ot},${dt}\\)$`),Pr=new RegExp(`^rgba\\(${O},${O},${O},${dt}\\)$`),Xr=new RegExp(`^hsl\\(${dt},${O},${O}\\)$`),qr=new RegExp(`^hsla\\(${dt},${O},${O},${dt}\\)$`),ue={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};te(vt,mt,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:le,formatHex:le,formatHex8:Vr,formatHsl:Lr,formatRgb:ce,toString:ce});function le(){return this.rgb().formatHex()}function Vr(){return this.rgb().formatHex8()}function Lr(){return Be(this).formatHsl()}function ce(){return this.rgb().formatRgb()}function mt(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Fr.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?fe(e):n===3?new F(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?yt(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?yt(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Ir.exec(t))?new F(e[1],e[2],e[3],1):(e=Br.exec(t))?new F(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Hr.exec(t))?yt(e[1],e[2],e[3],e[4]):(e=Pr.exec(t))?yt(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Xr.exec(t))?me(e[1],e[2]/100,e[3]/100,1):(e=qr.exec(t))?me(e[1],e[2]/100,e[3]/100,e[4]):ue.hasOwnProperty(t)?fe(ue[t]):t==="transparent"?new F(NaN,NaN,NaN,0):null}function fe(t){return new F(t>>16&255,t>>8&255,t&255,1)}function yt(t,e,n,r){return r<=0&&(t=e=n=NaN),new F(t,e,n,r)}function Yr(t){return t instanceof vt||(t=mt(t)),t?(t=t.rgb(),new F(t.r,t.g,t.b,t.opacity)):new F}function Ot(t,e,n,r){return arguments.length===1?Yr(t):new F(t,e,n,r??1)}function F(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}te(F,Ot,Ie(vt,{brighter(t){return t=t==null?Ct:Math.pow(Ct,t),new F(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?ht:Math.pow(ht,t),new F(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new F(nt(this.r),nt(this.g),nt(this.b),St(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:he,formatHex:he,formatHex8:Or,formatRgb:de,toString:de}));function he(){return`#${et(this.r)}${et(this.g)}${et(this.b)}`}function Or(){return`#${et(this.r)}${et(this.g)}${et(this.b)}${et((isNaN(this.opacity)?1:this.opacity)*255)}`}function de(){const t=St(this.opacity);return`${t===1?"rgb(":"rgba("}${nt(this.r)}, ${nt(this.g)}, ${nt(this.b)}${t===1?")":`, ${t})`}`}function St(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function nt(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function et(t){return t=nt(t),(t<16?"0":"")+t.toString(16)}function me(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new V(t,e,n,r)}function Be(t){if(t instanceof V)return new V(t.h,t.s,t.l,t.opacity);if(t instanceof vt||(t=mt(t)),!t)return new V;if(t instanceof V)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),s=Math.max(e,n,r),o=NaN,a=s-i,u=(s+i)/2;return a?(e===s?o=(n-r)/a+(n<r)*6:n===s?o=(r-e)/a+2:o=(e-n)/a+4,a/=u<.5?s+i:2-s-i,o*=60):a=u>0&&u<1?0:o,new V(o,a,u,t.opacity)}function Wr(t,e,n,r){return arguments.length===1?Be(t):new V(t,e,n,r??1)}function V(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}te(V,Wr,Ie(vt,{brighter(t){return t=t==null?Ct:Math.pow(Ct,t),new V(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?ht:Math.pow(ht,t),new V(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new F(Pt(t>=240?t-240:t+120,i,r),Pt(t,i,r),Pt(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new V(pe(this.h),wt(this.s),wt(this.l),St(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=St(this.opacity);return`${t===1?"hsl(":"hsla("}${pe(this.h)}, ${wt(this.s)*100}%, ${wt(this.l)*100}%${t===1?")":`, ${t})`}`}}));function pe(t){return t=(t||0)%360,t<0?t+360:t}function wt(t){return Math.max(0,Math.min(1,t||0))}function Pt(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const He=t=>()=>t;function Ur(t,e){return function(n){return t+n*e}}function Gr(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function Kr(t){return(t=+t)==1?Pe:function(e,n){return n-e?Gr(e,n,t):He(isNaN(e)?n:e)}}function Pe(t,e){var n=e-t;return n?Ur(t,n):He(isNaN(t)?e:t)}const ge=function t(e){var n=Kr(e);function r(i,s){var o=n((i=Ot(i)).r,(s=Ot(s)).r),a=n(i.g,s.g),u=n(i.b,s.b),l=Pe(i.opacity,s.opacity);return function(f){return i.r=o(f),i.g=a(f),i.b=u(f),i.opacity=l(f),i+""}}return r.gamma=t,r}(1);function j(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var Wt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Xt=new RegExp(Wt.source,"g");function Zr(t){return function(){return t}}function Qr(t){return function(e){return t(e)+""}}function Jr(t,e){var n=Wt.lastIndex=Xt.lastIndex=0,r,i,s,o=-1,a=[],u=[];for(t=t+"",e=e+"";(r=Wt.exec(t))&&(i=Xt.exec(e));)(s=i.index)>n&&(s=e.slice(n,s),a[o]?a[o]+=s:a[++o]=s),(r=r[0])===(i=i[0])?a[o]?a[o]+=i:a[++o]=i:(a[++o]=null,u.push({i:o,x:j(r,i)})),n=Xt.lastIndex;return n<e.length&&(s=e.slice(n),a[o]?a[o]+=s:a[++o]=s),a.length<2?u[0]?Qr(u[0].x):Zr(e):(e=u.length,function(l){for(var f=0,p;f<e;++f)a[(p=u[f]).i]=p.x(l);return a.join("")})}var ve=180/Math.PI,Ut={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Xe(t,e,n,r,i,s){var o,a,u;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,u/=a),t*r<e*n&&(t=-t,e=-e,u=-u,o=-o),{translateX:i,translateY:s,rotate:Math.atan2(e,t)*ve,skewX:Math.atan(u)*ve,scaleX:o,scaleY:a}}var _t;function jr(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Ut:Xe(e.a,e.b,e.c,e.d,e.e,e.f)}function ti(t){return t==null||(_t||(_t=document.createElementNS("http://www.w3.org/2000/svg","g")),_t.setAttribute("transform",t),!(t=_t.transform.baseVal.consolidate()))?Ut:(t=t.matrix,Xe(t.a,t.b,t.c,t.d,t.e,t.f))}function qe(t,e,n,r){function i(l){return l.length?l.pop()+" ":""}function s(l,f,p,g,y,k){if(l!==p||f!==g){var N=y.push("translate(",null,e,null,n);k.push({i:N-4,x:j(l,p)},{i:N-2,x:j(f,g)})}else(p||g)&&y.push("translate("+p+e+g+n)}function o(l,f,p,g){l!==f?(l-f>180?f+=360:f-l>180&&(l+=360),g.push({i:p.push(i(p)+"rotate(",null,r)-2,x:j(l,f)})):f&&p.push(i(p)+"rotate("+f+r)}function a(l,f,p,g){l!==f?g.push({i:p.push(i(p)+"skewX(",null,r)-2,x:j(l,f)}):f&&p.push(i(p)+"skewX("+f+r)}function u(l,f,p,g,y,k){if(l!==p||f!==g){var N=y.push(i(y)+"scale(",null,",",null,")");k.push({i:N-4,x:j(l,p)},{i:N-2,x:j(f,g)})}else(p!==1||g!==1)&&y.push(i(y)+"scale("+p+","+g+")")}return function(l,f){var p=[],g=[];return l=t(l),f=t(f),s(l.translateX,l.translateY,f.translateX,f.translateY,p,g),o(l.rotate,f.rotate,p,g),a(l.skewX,f.skewX,p,g),u(l.scaleX,l.scaleY,f.scaleX,f.scaleY,p,g),l=f=null,function(y){for(var k=-1,N=g.length,z;++k<N;)p[(z=g[k]).i]=z.x(y);return p.join("")}}}var ei=qe(jr,"px, ","px)","deg)"),ni=qe(ti,", ",")",")"),ri=1e-12;function ye(t){return((t=Math.exp(t))+1/t)/2}function ii(t){return((t=Math.exp(t))-1/t)/2}function oi(t){return((t=Math.exp(2*t))-1)/(t+1)}const si=function t(e,n,r){function i(s,o){var a=s[0],u=s[1],l=s[2],f=o[0],p=o[1],g=o[2],y=f-a,k=p-u,N=y*y+k*k,z,b;if(N<ri)b=Math.log(g/l)/e,z=function(R){return[a+R*y,u+R*k,l*Math.exp(e*R*b)]};else{var A=Math.sqrt(N),T=(g*g-l*l+r*N)/(2*l*n*A),P=(g*g-l*l-r*N)/(2*g*n*A),I=Math.log(Math.sqrt(T*T+1)-T),$=Math.log(Math.sqrt(P*P+1)-P);b=($-I)/e,z=function(R){var Y=R*b,C=ye(I),it=l/(n*A)*(C*oi(e*Y+I)-ii(I));return[a+it*y,u+it*k,l*C/ye(e*Y+I)]}}return z.duration=b*1e3*e/Math.SQRT2,z}return i.rho=function(s){var o=Math.max(.001,+s),a=o*o,u=a*a;return t(o,a,u)},i}(Math.SQRT2,2,4);var at=0,ct=0,ut=0,Ve=1e3,zt,ft,$t=0,rt=0,Rt=0,pt=typeof performance=="object"&&performance.now?performance:Date,Le=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function ee(){return rt||(Le(ai),rt=pt.now()+Rt)}function ai(){rt=0}function At(){this._call=this._time=this._next=null}At.prototype=Ye.prototype={constructor:At,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?ee():+n)+(e==null?0:+e),!this._next&&ft!==this&&(ft?ft._next=this:zt=this,ft=this),this._call=t,this._time=n,Gt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Gt())}};function Ye(t,e,n){var r=new At;return r.restart(t,e,n),r}function ui(){ee(),++at;for(var t=zt,e;t;)(e=rt-t._time)>=0&&t._call.call(void 0,e),t=t._next;--at}function we(){rt=($t=pt.now())+Rt,at=ct=0;try{ui()}finally{at=0,ci(),rt=0}}function li(){var t=pt.now(),e=t-$t;e>Ve&&(Rt-=e,$t=t)}function ci(){for(var t,e=zt,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:zt=n);ft=t,Gt(r)}function Gt(t){if(!at){ct&&(ct=clearTimeout(ct));var e=t-rt;e>24?(t<1/0&&(ct=setTimeout(we,t-pt.now()-Rt)),ut&&(ut=clearInterval(ut))):(ut||($t=pt.now(),ut=setInterval(li,Ve)),at=1,Le(we))}}function _e(t,e,n){var r=new At;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var fi=Qt("start","end","cancel","interrupt"),hi=[],Oe=0,xe=1,Kt=2,kt=3,be=4,Zt=5,Mt=6;function Dt(t,e,n,r,i,s){var o=t.__transition;if(!o)t.__transition={};else if(n in o)return;di(t,n,{name:e,index:r,group:i,on:fi,tween:hi,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Oe})}function ne(t,e){var n=L(t,e);if(n.state>Oe)throw new Error("too late; already scheduled");return n}function W(t,e){var n=L(t,e);if(n.state>kt)throw new Error("too late; already running");return n}function L(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function di(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Ye(s,0,n.time);function s(l){n.state=xe,n.timer.restart(o,n.delay,n.time),n.delay<=l&&o(l-n.delay)}function o(l){var f,p,g,y;if(n.state!==xe)return u();for(f in r)if(y=r[f],y.name===n.name){if(y.state===kt)return _e(o);y.state===be?(y.state=Mt,y.timer.stop(),y.on.call("interrupt",t,t.__data__,y.index,y.group),delete r[f]):+f<e&&(y.state=Mt,y.timer.stop(),y.on.call("cancel",t,t.__data__,y.index,y.group),delete r[f])}if(_e(function(){n.state===kt&&(n.state=be,n.timer.restart(a,n.delay,n.time),a(l))}),n.state=Kt,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Kt){for(n.state=kt,i=new Array(g=n.tween.length),f=0,p=-1;f<g;++f)(y=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(i[++p]=y);i.length=p+1}}function a(l){for(var f=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(u),n.state=Zt,1),p=-1,g=i.length;++p<g;)i[p].call(t,f);n.state===Zt&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=Mt,n.timer.stop(),delete r[e];for(var l in r)return;delete t.__transition}}function Nt(t,e){var n=t.__transition,r,i,s=!0,o;if(n){e=e==null?null:e+"";for(o in n){if((r=n[o]).name!==e){s=!1;continue}i=r.state>Kt&&r.state<Zt,r.state=Mt,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[o]}s&&delete t.__transition}}function mi(t){return this.each(function(){Nt(this,t)})}function pi(t,e){var n,r;return function(){var i=W(this,t),s=i.tween;if(s!==n){r=n=s;for(var o=0,a=r.length;o<a;++o)if(r[o].name===e){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function gi(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var s=W(this,t),o=s.tween;if(o!==r){i=(r=o).slice();for(var a={name:e,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===e){i[u]=a;break}u===l&&i.push(a)}s.tween=i}}function vi(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=L(this.node(),n).tween,i=0,s=r.length,o;i<s;++i)if((o=r[i]).name===t)return o.value;return null}return this.each((e==null?pi:gi)(n,t,e))}function re(t,e,n){var r=t._id;return t.each(function(){var i=W(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return L(i,r).value[e]}}function We(t,e){var n;return(typeof e=="number"?j:e instanceof mt?ge:(n=mt(e))?(e=n,ge):Jr)(t,e)}function yi(t){return function(){this.removeAttribute(t)}}function wi(t){return function(){this.removeAttributeNS(t.space,t.local)}}function _i(t,e,n){var r,i=n+"",s;return function(){var o=this.getAttribute(t);return o===i?null:o===r?s:s=e(r=o,n)}}function xi(t,e,n){var r,i=n+"",s;return function(){var o=this.getAttributeNS(t.space,t.local);return o===i?null:o===r?s:s=e(r=o,n)}}function bi(t,e,n){var r,i,s;return function(){var o,a=n(this),u;return a==null?void this.removeAttribute(t):(o=this.getAttribute(t),u=a+"",o===u?null:o===r&&u===i?s:(i=u,s=e(r=o,a)))}}function ki(t,e,n){var r,i,s;return function(){var o,a=n(this),u;return a==null?void this.removeAttributeNS(t.space,t.local):(o=this.getAttributeNS(t.space,t.local),u=a+"",o===u?null:o===r&&u===i?s:(i=u,s=e(r=o,a)))}}function Mi(t,e){var n=Tt(t),r=n==="transform"?ni:We;return this.attrTween(t,typeof e=="function"?(n.local?ki:bi)(n,r,re(this,"attr."+t,e)):e==null?(n.local?wi:yi)(n):(n.local?xi:_i)(n,r,e))}function Ni(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Ei(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Ci(t,e){var n,r;function i(){var s=e.apply(this,arguments);return s!==r&&(n=(r=s)&&Ei(t,s)),n}return i._value=e,i}function Si(t,e){var n,r;function i(){var s=e.apply(this,arguments);return s!==r&&(n=(r=s)&&Ni(t,s)),n}return i._value=e,i}function zi(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=Tt(t);return this.tween(n,(r.local?Ci:Si)(r,e))}function $i(t,e){return function(){ne(this,t).delay=+e.apply(this,arguments)}}function Ai(t,e){return e=+e,function(){ne(this,t).delay=e}}function Ti(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?$i:Ai)(e,t)):L(this.node(),e).delay}function Ri(t,e){return function(){W(this,t).duration=+e.apply(this,arguments)}}function Di(t,e){return e=+e,function(){W(this,t).duration=e}}function Fi(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Ri:Di)(e,t)):L(this.node(),e).duration}function Ii(t,e){if(typeof e!="function")throw new Error;return function(){W(this,t).ease=e}}function Bi(t){var e=this._id;return arguments.length?this.each(Ii(e,t)):L(this.node(),e).ease}function Hi(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;W(this,t).ease=n}}function Pi(t){if(typeof t!="function")throw new Error;return this.each(Hi(this._id,t))}function Xi(t){typeof t!="function"&&(t=Ee(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var s=e[i],o=s.length,a=r[i]=[],u,l=0;l<o;++l)(u=s[l])&&t.call(u,u.__data__,l,s)&&a.push(u);return new Q(r,this._parents,this._name,this._id)}function qi(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,s=Math.min(r,i),o=new Array(r),a=0;a<s;++a)for(var u=e[a],l=n[a],f=u.length,p=o[a]=new Array(f),g,y=0;y<f;++y)(g=u[y]||l[y])&&(p[y]=g);for(;a<r;++a)o[a]=e[a];return new Q(o,this._parents,this._name,this._id)}function Vi(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function Li(t,e,n){var r,i,s=Vi(e)?ne:W;return function(){var o=s(this,t),a=o.on;a!==r&&(i=(r=a).copy()).on(e,n),o.on=i}}function Yi(t,e){var n=this._id;return arguments.length<2?L(this.node(),n).on.on(t):this.each(Li(n,t,e))}function Oi(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Wi(){return this.on("end.remove",Oi(this._id))}function Ui(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Jt(t));for(var r=this._groups,i=r.length,s=new Array(i),o=0;o<i;++o)for(var a=r[o],u=a.length,l=s[o]=new Array(u),f,p,g=0;g<u;++g)(f=a[g])&&(p=t.call(f,f.__data__,g,a))&&("__data__"in f&&(p.__data__=f.__data__),l[g]=p,Dt(l[g],e,n,g,l,L(f,n)));return new Q(s,this._parents,e,n)}function Gi(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ne(t));for(var r=this._groups,i=r.length,s=[],o=[],a=0;a<i;++a)for(var u=r[a],l=u.length,f,p=0;p<l;++p)if(f=u[p]){for(var g=t.call(f,f.__data__,p,u),y,k=L(f,n),N=0,z=g.length;N<z;++N)(y=g[N])&&Dt(y,e,n,N,g,k);s.push(g),o.push(f)}return new Q(s,o,e,n)}var Ki=gt.prototype.constructor;function Zi(){return new Ki(this._groups,this._parents)}function Qi(t,e){var n,r,i;return function(){var s=st(this,t),o=(this.style.removeProperty(t),st(this,t));return s===o?null:s===n&&o===r?i:i=e(n=s,r=o)}}function Ue(t){return function(){this.style.removeProperty(t)}}function Ji(t,e,n){var r,i=n+"",s;return function(){var o=st(this,t);return o===i?null:o===r?s:s=e(r=o,n)}}function ji(t,e,n){var r,i,s;return function(){var o=st(this,t),a=n(this),u=a+"";return a==null&&(u=a=(this.style.removeProperty(t),st(this,t))),o===u?null:o===r&&u===i?s:(i=u,s=e(r=o,a))}}function to(t,e){var n,r,i,s="style."+e,o="end."+s,a;return function(){var u=W(this,t),l=u.on,f=u.value[s]==null?a||(a=Ue(e)):void 0;(l!==n||i!==f)&&(r=(n=l).copy()).on(o,i=f),u.on=r}}function eo(t,e,n){var r=(t+="")=="transform"?ei:We;return e==null?this.styleTween(t,Qi(t,r)).on("end.style."+t,Ue(t)):typeof e=="function"?this.styleTween(t,ji(t,r,re(this,"style."+t,e))).each(to(this._id,t)):this.styleTween(t,Ji(t,r,e),n).on("end.style."+t,null)}function no(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function ro(t,e,n){var r,i;function s(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&no(t,o,n)),r}return s._value=e,s}function io(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,ro(t,e,n??""))}function oo(t){return function(){this.textContent=t}}function so(t){return function(){var e=t(this);this.textContent=e??""}}function ao(t){return this.tween("text",typeof t=="function"?so(re(this,"text",t)):oo(t==null?"":t+""))}function uo(t){return function(e){this.textContent=t.call(this,e)}}function lo(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&uo(i)),e}return r._value=t,r}function co(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,lo(t))}function fo(){for(var t=this._name,e=this._id,n=Ge(),r=this._groups,i=r.length,s=0;s<i;++s)for(var o=r[s],a=o.length,u,l=0;l<a;++l)if(u=o[l]){var f=L(u,e);Dt(u,t,n,l,o,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Q(r,this._parents,t,n)}function ho(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(s,o){var a={value:o},u={value:function(){--i===0&&s()}};n.each(function(){var l=W(this,r),f=l.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(a),e._.interrupt.push(a),e._.end.push(u)),l.on=e}),i===0&&s()})}var mo=0;function Q(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Ge(){return++mo}var K=gt.prototype;Q.prototype={constructor:Q,select:Ui,selectAll:Gi,selectChild:K.selectChild,selectChildren:K.selectChildren,filter:Xi,merge:qi,selection:Zi,transition:fo,call:K.call,nodes:K.nodes,node:K.node,size:K.size,empty:K.empty,each:K.each,on:Yi,attr:Mi,attrTween:zi,style:eo,styleTween:io,text:ao,textTween:co,remove:Wi,tween:vi,delay:Ti,duration:Fi,ease:Bi,easeVarying:Pi,end:ho,[Symbol.iterator]:K[Symbol.iterator]};function po(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var go={time:null,delay:0,duration:250,ease:po};function vo(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function yo(t){var e,n;t instanceof Q?(e=t._id,t=t._name):(e=Ge(),(n=go).time=ee(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,s=0;s<i;++s)for(var o=r[s],a=o.length,u,l=0;l<a;++l)(u=o[l])&&Dt(u,t,e,l,o,n||vo(u,e));return new Q(r,this._parents,t,e)}gt.prototype.interrupt=mi;gt.prototype.transition=yo;const xt=t=>()=>t;function wo(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Z(t,e,n){this.k=t,this.x=e,this.y=n}Z.prototype={constructor:Z,scale:function(t){return t===1?this:new Z(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Z(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var ie=new Z(1,0,0);Z.prototype;function qt(t){t.stopImmediatePropagation()}function lt(t){t.preventDefault(),t.stopImmediatePropagation()}function _o(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function xo(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function ke(){return this.__zoom||ie}function bo(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function ko(){return navigator.maxTouchPoints||"ontouchstart"in this}function Mo(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],s=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>s?(s+o)/2:Math.min(0,s)||Math.max(0,o))}function No(){var t=_o,e=xo,n=Mo,r=bo,i=ko,s=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],a=250,u=si,l=Qt("start","zoom","end"),f,p,g,y=500,k=150,N=0,z=10;function b(c){c.property("__zoom",ke).on("wheel.zoom",Y,{passive:!1}).on("mousedown.zoom",C).on("dblclick.zoom",it).filter(i).on("touchstart.zoom",Ft).on("touchmove.zoom",It).on("touchend.zoom touchcancel.zoom",Bt).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(c,w,h,d){var v=c.selection?c.selection():c;v.property("__zoom",ke),c!==v?I(c,w,h,d):v.interrupt().each(function(){$(this,arguments).event(d).start().zoom(null,typeof w=="function"?w.apply(this,arguments):w).end()})},b.scaleBy=function(c,w,h,d){b.scaleTo(c,function(){var v=this.__zoom.k,m=typeof w=="function"?w.apply(this,arguments):w;return v*m},h,d)},b.scaleTo=function(c,w,h,d){b.transform(c,function(){var v=e.apply(this,arguments),m=this.__zoom,x=h==null?P(v):typeof h=="function"?h.apply(this,arguments):h,E=m.invert(x),M=typeof w=="function"?w.apply(this,arguments):w;return n(T(A(m,M),x,E),v,o)},h,d)},b.translateBy=function(c,w,h,d){b.transform(c,function(){return n(this.__zoom.translate(typeof w=="function"?w.apply(this,arguments):w,typeof h=="function"?h.apply(this,arguments):h),e.apply(this,arguments),o)},null,d)},b.translateTo=function(c,w,h,d,v){b.transform(c,function(){var m=e.apply(this,arguments),x=this.__zoom,E=d==null?P(m):typeof d=="function"?d.apply(this,arguments):d;return n(ie.translate(E[0],E[1]).scale(x.k).translate(typeof w=="function"?-w.apply(this,arguments):-w,typeof h=="function"?-h.apply(this,arguments):-h),m,o)},d,v)};function A(c,w){return w=Math.max(s[0],Math.min(s[1],w)),w===c.k?c:new Z(w,c.x,c.y)}function T(c,w,h){var d=w[0]-h[0]*c.k,v=w[1]-h[1]*c.k;return d===c.x&&v===c.y?c:new Z(c.k,d,v)}function P(c){return[(+c[0][0]+ +c[1][0])/2,(+c[0][1]+ +c[1][1])/2]}function I(c,w,h,d){c.on("start.zoom",function(){$(this,arguments).event(d).start()}).on("interrupt.zoom end.zoom",function(){$(this,arguments).event(d).end()}).tween("zoom",function(){var v=this,m=arguments,x=$(v,m).event(d),E=e.apply(v,m),M=h==null?P(E):typeof h=="function"?h.apply(v,m):h,D=Math.max(E[1][0]-E[0][0],E[1][1]-E[0][1]),S=v.__zoom,B=typeof w=="function"?w.apply(v,m):w,X=u(S.invert(M).concat(D/S.k),B.invert(M).concat(D/B.k));return function(q){if(q===1)q=B;else{var U=X(q),Ht=D/U[2];q=new Z(Ht,M[0]-U[0]*Ht,M[1]-U[1]*Ht)}x.zoom(null,q)}})}function $(c,w,h){return!h&&c.__zooming||new R(c,w)}function R(c,w){this.that=c,this.args=w,this.active=0,this.sourceEvent=null,this.extent=e.apply(c,w),this.taps=0}R.prototype={event:function(c){return c&&(this.sourceEvent=c),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(c,w){return this.mouse&&c!=="mouse"&&(this.mouse[1]=w.invert(this.mouse[0])),this.touch0&&c!=="touch"&&(this.touch0[1]=w.invert(this.touch0[0])),this.touch1&&c!=="touch"&&(this.touch1[1]=w.invert(this.touch1[0])),this.that.__zoom=w,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(c){var w=tt(this.that).datum();l.call(c,this.that,new wo(c,{sourceEvent:this.sourceEvent,target:b,type:c,transform:this.that.__zoom,dispatch:l}),w)}};function Y(c,...w){if(!t.apply(this,arguments))return;var h=$(this,w).event(c),d=this.__zoom,v=Math.max(s[0],Math.min(s[1],d.k*Math.pow(2,r.apply(this,arguments)))),m=J(c);if(h.wheel)(h.mouse[0][0]!==m[0]||h.mouse[0][1]!==m[1])&&(h.mouse[1]=d.invert(h.mouse[0]=m)),clearTimeout(h.wheel);else{if(d.k===v)return;h.mouse=[m,d.invert(m)],Nt(this),h.start()}lt(c),h.wheel=setTimeout(x,k),h.zoom("mouse",n(T(A(d,v),h.mouse[0],h.mouse[1]),h.extent,o));function x(){h.wheel=null,h.end()}}function C(c,...w){if(g||!t.apply(this,arguments))return;var h=c.currentTarget,d=$(this,w,!0).event(c),v=tt(c.view).on("mousemove.zoom",M,!0).on("mouseup.zoom",D,!0),m=J(c,h),x=c.clientX,E=c.clientY;Rr(c.view),qt(c),d.mouse=[m,this.__zoom.invert(m)],Nt(this),d.start();function M(S){if(lt(S),!d.moved){var B=S.clientX-x,X=S.clientY-E;d.moved=B*B+X*X>N}d.event(S).zoom("mouse",n(T(d.that.__zoom,d.mouse[0]=J(S,h),d.mouse[1]),d.extent,o))}function D(S){v.on("mousemove.zoom mouseup.zoom",null),Dr(S.view,d.moved),lt(S),d.event(S).end()}}function it(c,...w){if(t.apply(this,arguments)){var h=this.__zoom,d=J(c.changedTouches?c.changedTouches[0]:c,this),v=h.invert(d),m=h.k*(c.shiftKey?.5:2),x=n(T(A(h,m),d,v),e.apply(this,w),o);lt(c),a>0?tt(this).transition().duration(a).call(I,x,d,c):tt(this).call(b.transform,x,d,c)}}function Ft(c,...w){if(t.apply(this,arguments)){var h=c.touches,d=h.length,v=$(this,w,c.changedTouches.length===d).event(c),m,x,E,M;for(qt(c),x=0;x<d;++x)E=h[x],M=J(E,this),M=[M,this.__zoom.invert(M),E.identifier],v.touch0?!v.touch1&&v.touch0[2]!==M[2]&&(v.touch1=M,v.taps=0):(v.touch0=M,m=!0,v.taps=1+!!f);f&&(f=clearTimeout(f)),m&&(v.taps<2&&(p=M[0],f=setTimeout(function(){f=null},y)),Nt(this),v.start())}}function It(c,...w){if(this.__zooming){var h=$(this,w).event(c),d=c.changedTouches,v=d.length,m,x,E,M;for(lt(c),m=0;m<v;++m)x=d[m],E=J(x,this),h.touch0&&h.touch0[2]===x.identifier?h.touch0[0]=E:h.touch1&&h.touch1[2]===x.identifier&&(h.touch1[0]=E);if(x=h.that.__zoom,h.touch1){var D=h.touch0[0],S=h.touch0[1],B=h.touch1[0],X=h.touch1[1],q=(q=B[0]-D[0])*q+(q=B[1]-D[1])*q,U=(U=X[0]-S[0])*U+(U=X[1]-S[1])*U;x=A(x,Math.sqrt(q/U)),E=[(D[0]+B[0])/2,(D[1]+B[1])/2],M=[(S[0]+X[0])/2,(S[1]+X[1])/2]}else if(h.touch0)E=h.touch0[0],M=h.touch0[1];else return;h.zoom("touch",n(T(x,E,M),h.extent,o))}}function Bt(c,...w){if(this.__zooming){var h=$(this,w).event(c),d=c.changedTouches,v=d.length,m,x;for(qt(c),g&&clearTimeout(g),g=setTimeout(function(){g=null},y),m=0;m<v;++m)x=d[m],h.touch0&&h.touch0[2]===x.identifier?delete h.touch0:h.touch1&&h.touch1[2]===x.identifier&&delete h.touch1;if(h.touch1&&!h.touch0&&(h.touch0=h.touch1,delete h.touch1),h.touch0)h.touch0[1]=this.__zoom.invert(h.touch0[0]);else if(h.end(),h.taps===2&&(x=J(x,this),Math.hypot(p[0]-x[0],p[1]-x[1])<z)){var E=tt(this).on("dblclick.zoom");E&&E.apply(this,arguments)}}}return b.wheelDelta=function(c){return arguments.length?(r=typeof c=="function"?c:xt(+c),b):r},b.filter=function(c){return arguments.length?(t=typeof c=="function"?c:xt(!!c),b):t},b.touchable=function(c){return arguments.length?(i=typeof c=="function"?c:xt(!!c),b):i},b.extent=function(c){return arguments.length?(e=typeof c=="function"?c:xt([[+c[0][0],+c[0][1]],[+c[1][0],+c[1][1]]]),b):e},b.scaleExtent=function(c){return arguments.length?(s[0]=+c[0],s[1]=+c[1],b):[s[0],s[1]]},b.translateExtent=function(c){return arguments.length?(o[0][0]=+c[0][0],o[1][0]=+c[1][0],o[0][1]=+c[0][1],o[1][1]=+c[1][1],b):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},b.constrain=function(c){return arguments.length?(n=c,b):n},b.duration=function(c){return arguments.length?(a=+c,b):a},b.interpolate=function(c){return arguments.length?(u=c,b):u},b.on=function(){var c=l.on.apply(l,arguments);return c===l?b:c},b.clickDistance=function(c){return arguments.length?(N=(c=+c)*c,b):Math.sqrt(N)},b.tapDistance=function(c){return arguments.length?(z=+c,b):z},b}const oe=Symbol("MiniMapSlots"),Ke=_.defineComponent({name:"MiniMapNode",props:["id","position","dimensions","strokeWidth","strokeColor","borderRadius","color","shapeRendering","type"],emits:["click","dblclick","mouseenter","mousemove","mouseleave"],setup(t,{attrs:e,emit:n}){const r=_.inject(oe);return()=>{const i=e.style??{},s=r[`node-${t.type}`];return s?s(t):_.h("rect",{id:t.id,class:["vue-flow__minimap-node",e.class].join(" "),style:i,x:t.position.x,y:t.position.y,rx:t.borderRadius,ry:t.borderRadius,width:t.dimensions.width,height:t.dimensions.height,fill:t.color||i.background||i.backgroundColor,stroke:t.strokeColor,strokeWidth:t.strokeWidth,shapeRendering:t.shapeRendering,onClick:o=>n("click",o),onDblClick:o=>n("dblclick",o),onMouseenter:o=>n("mouseenter",o),onMousemove:o=>n("mousemove",o),onMouseleave:o=>n("mouseleave",o)})}}}),Eo=["width","height","viewBox","aria-labelledby"],Co=["id"],So=["d","fill","stroke","stroke-width"],zo={name:"MiniMap"},$o=_.defineComponent({...zo,props:{nodeColor:{type:[String,Function],default:"#e2e2e2"},nodeStrokeColor:{type:[String,Function],default:"transparent"},nodeClassName:null,nodeBorderRadius:{default:5},nodeStrokeWidth:{default:2},maskColor:{default:"rgb(240, 240, 240, 0.6)"},maskStrokeColor:{default:"none"},maskStrokeWidth:{default:1},position:{default:()=>"bottom-right"},pannable:{type:Boolean,default:!1},zoomable:{type:Boolean,default:!1},width:null,height:null,ariaLabel:{default:"Vue Flow mini map"}},emits:["click","nodeClick","nodeDblclick","nodeMouseenter","nodeMousemove","nodeMouseleave"],setup(t,{emit:e}){const n=_.useAttrs(),r=200,i=150,{id:s,edges:o,viewport:a,translateExtent:u,dimensions:l,emits:f,nodes:p,d3Selection:g,d3Zoom:y}=G.useVueFlow(),k=_.ref();_.provide(oe,_.useSlots());const N=_.computed(()=>{var d;return t.width??((d=n.style)==null?void 0:d.width)??r}),z=_.computed(()=>{var d;return t.height??((d=n.style)==null?void 0:d.height)??i}),b=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision",A=_.computed(()=>t.nodeColor instanceof Function?t.nodeColor:()=>t.nodeColor),T=_.computed(()=>t.nodeStrokeColor instanceof Function?t.nodeStrokeColor:()=>t.nodeStrokeColor),P=_.computed(()=>t.nodeClassName instanceof Function?t.nodeClassName:()=>t.nodeClassName),I=_.computed(()=>G.getRectOfNodes(p.value)),$=_.computed(()=>({x:-a.value.x/a.value.zoom,y:-a.value.y/a.value.zoom,width:l.value.width/a.value.zoom,height:l.value.height/a.value.zoom})),R=_.computed(()=>p.value&&p.value.length?G.getBoundsofRects(I.value,$.value):$.value),Y=_.computed(()=>{const d=R.value.width/N.value,v=R.value.height/z.value;return Math.max(d,v)}),C=_.computed(()=>{const d=Y.value*N.value,v=Y.value*z.value,m=5*Y.value;return{offset:m,x:R.value.x-(d-R.value.width)/2-m,y:R.value.y-(v-R.value.height)/2-m,width:d+m*2,height:v+m*2}}),it=_.computed(()=>!C.value.x||!C.value.y?"":` | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("vue"),G=require("@vue-flow/core");var Ze={value:()=>{}};function Qt(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new bt(n)}function bt(t){this._=t}function Qe(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}bt.prototype=Qt.prototype={constructor:bt,on:function(t,e){var n=this._,r=Qe(t+"",n),i,s=-1,o=r.length;if(arguments.length<2){for(;++s<o;)if((i=(t=r[s]).type)&&(i=Je(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++s<o;)if(i=(t=r[s]).type)n[i]=se(n[i],t.name,e);else if(e==null)for(i in n)n[i]=se(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new bt(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,s;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],r=0,i=s.length;r<i;++r)s[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,s=r.length;i<s;++i)r[i].value.apply(e,n)}};function Je(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function se(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Ze,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Vt="http://www.w3.org/1999/xhtml";const ae={svg:"http://www.w3.org/2000/svg",xhtml:Vt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Tt(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),ae.hasOwnProperty(e)?{space:ae[e],local:t}:t}function je(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Vt&&e.documentElement.namespaceURI===Vt?e.createElement(t):e.createElementNS(n,t)}}function tn(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Me(t){var e=Tt(t);return(e.local?tn:je)(e)}function en(){}function Jt(t){return t==null?en:function(){return this.querySelector(t)}}function nn(t){typeof t!="function"&&(t=Jt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var s=e[i],o=s.length,a=r[i]=new Array(o),u,l,f=0;f<o;++f)(u=s[f])&&(l=t.call(u,u.__data__,f,s))&&("__data__"in u&&(l.__data__=u.__data__),a[f]=l);return new H(r,this._parents)}function rn(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function on(){return[]}function Ne(t){return t==null?on:function(){return this.querySelectorAll(t)}}function sn(t){return function(){return rn(t.apply(this,arguments))}}function an(t){typeof t=="function"?t=sn(t):t=Ne(t);for(var e=this._groups,n=e.length,r=[],i=[],s=0;s<n;++s)for(var o=e[s],a=o.length,u,l=0;l<a;++l)(u=o[l])&&(r.push(t.call(u,u.__data__,l,o)),i.push(u));return new H(r,i)}function Ee(t){return function(){return this.matches(t)}}function Ce(t){return function(e){return e.matches(t)}}var un=Array.prototype.find;function ln(t){return function(){return un.call(this.children,t)}}function cn(){return this.firstElementChild}function fn(t){return this.select(t==null?cn:ln(typeof t=="function"?t:Ce(t)))}var hn=Array.prototype.filter;function dn(){return Array.from(this.children)}function mn(t){return function(){return hn.call(this.children,t)}}function pn(t){return this.selectAll(t==null?dn:mn(typeof t=="function"?t:Ce(t)))}function gn(t){typeof t!="function"&&(t=Ee(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var s=e[i],o=s.length,a=r[i]=[],u,l=0;l<o;++l)(u=s[l])&&t.call(u,u.__data__,l,s)&&a.push(u);return new H(r,this._parents)}function Se(t){return new Array(t.length)}function vn(){return new H(this._enter||this._groups.map(Se),this._parents)}function Et(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Et.prototype={constructor:Et,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function yn(t){return function(){return t}}function wn(t,e,n,r,i,s){for(var o=0,a,u=e.length,l=s.length;o<l;++o)(a=e[o])?(a.__data__=s[o],r[o]=a):n[o]=new Et(t,s[o]);for(;o<u;++o)(a=e[o])&&(i[o]=a)}function _n(t,e,n,r,i,s,o){var a,u,l=new Map,f=e.length,p=s.length,g=new Array(f),y;for(a=0;a<f;++a)(u=e[a])&&(g[a]=y=o.call(u,u.__data__,a,e)+"",l.has(y)?i[a]=u:l.set(y,u));for(a=0;a<p;++a)y=o.call(t,s[a],a,s)+"",(u=l.get(y))?(r[a]=u,u.__data__=s[a],l.delete(y)):n[a]=new Et(t,s[a]);for(a=0;a<f;++a)(u=e[a])&&l.get(g[a])===u&&(i[a]=u)}function xn(t){return t.__data__}function bn(t,e){if(!arguments.length)return Array.from(this,xn);var n=e?_n:wn,r=this._parents,i=this._groups;typeof t!="function"&&(t=yn(t));for(var s=i.length,o=new Array(s),a=new Array(s),u=new Array(s),l=0;l<s;++l){var f=r[l],p=i[l],g=p.length,y=kn(t.call(f,f&&f.__data__,l,r)),k=y.length,N=a[l]=new Array(k),z=o[l]=new Array(k),b=u[l]=new Array(g);n(f,p,N,z,b,y,e);for(var A=0,T=0,P,I;A<k;++A)if(P=N[A]){for(A>=T&&(T=A+1);!(I=z[T])&&++T<k;);P._next=I||null}}return o=new H(o,r),o._enter=a,o._exit=u,o}function kn(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Mn(){return new H(this._exit||this._groups.map(Se),this._parents)}function Nn(t,e,n){var r=this.enter(),i=this,s=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?s.remove():n(s),r&&i?r.merge(i).order():i}function En(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,s=r.length,o=Math.min(i,s),a=new Array(i),u=0;u<o;++u)for(var l=n[u],f=r[u],p=l.length,g=a[u]=new Array(p),y,k=0;k<p;++k)(y=l[k]||f[k])&&(g[k]=y);for(;u<i;++u)a[u]=n[u];return new H(a,this._parents)}function Cn(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,s=r[i],o;--i>=0;)(o=r[i])&&(s&&o.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(o,s),s=o);return this}function Sn(t){t||(t=zn);function e(p,g){return p&&g?t(p.__data__,g.__data__):!p-!g}for(var n=this._groups,r=n.length,i=new Array(r),s=0;s<r;++s){for(var o=n[s],a=o.length,u=i[s]=new Array(a),l,f=0;f<a;++f)(l=o[f])&&(u[f]=l);u.sort(e)}return new H(i,this._parents).order()}function zn(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function $n(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function An(){return Array.from(this)}function Tn(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,s=r.length;i<s;++i){var o=r[i];if(o)return o}return null}function Rn(){let t=0;for(const e of this)++t;return t}function Dn(){return!this.node()}function Fn(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],s=0,o=i.length,a;s<o;++s)(a=i[s])&&t.call(a,a.__data__,s,i);return this}function In(t){return function(){this.removeAttribute(t)}}function Bn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Hn(t,e){return function(){this.setAttribute(t,e)}}function Pn(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Xn(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function qn(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Vn(t,e){var n=Tt(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?Bn:In:typeof e=="function"?n.local?qn:Xn:n.local?Pn:Hn)(n,e))}function ze(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ln(t){return function(){this.style.removeProperty(t)}}function On(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Yn(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Wn(t,e,n){return arguments.length>1?this.each((e==null?Ln:typeof e=="function"?Yn:On)(t,e,n??"")):st(this.node(),t)}function st(t,e){return t.style.getPropertyValue(e)||ze(t).getComputedStyle(t,null).getPropertyValue(e)}function Un(t){return function(){delete this[t]}}function Gn(t,e){return function(){this[t]=e}}function Kn(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Zn(t,e){return arguments.length>1?this.each((e==null?Un:typeof e=="function"?Kn:Gn)(t,e)):this.node()[t]}function $e(t){return t.trim().split(/^|\s+/)}function jt(t){return t.classList||new Ae(t)}function Ae(t){this._node=t,this._names=$e(t.getAttribute("class")||"")}Ae.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Te(t,e){for(var n=jt(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Re(t,e){for(var n=jt(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Qn(t){return function(){Te(this,t)}}function Jn(t){return function(){Re(this,t)}}function jn(t,e){return function(){(e.apply(this,arguments)?Te:Re)(this,t)}}function tr(t,e){var n=$e(t+"");if(arguments.length<2){for(var r=jt(this.node()),i=-1,s=n.length;++i<s;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?jn:e?Qn:Jn)(n,e))}function er(){this.textContent=""}function nr(t){return function(){this.textContent=t}}function rr(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function ir(t){return arguments.length?this.each(t==null?er:(typeof t=="function"?rr:nr)(t)):this.node().textContent}function or(){this.innerHTML=""}function sr(t){return function(){this.innerHTML=t}}function ar(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function ur(t){return arguments.length?this.each(t==null?or:(typeof t=="function"?ar:sr)(t)):this.node().innerHTML}function lr(){this.nextSibling&&this.parentNode.appendChild(this)}function cr(){return this.each(lr)}function fr(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function hr(){return this.each(fr)}function dr(t){var e=typeof t=="function"?t:Me(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function mr(){return null}function pr(t,e){var n=typeof t=="function"?t:Me(t),r=e==null?mr:typeof e=="function"?e:Jt(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function gr(){var t=this.parentNode;t&&t.removeChild(this)}function vr(){return this.each(gr)}function yr(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function wr(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function _r(t){return this.select(t?wr:yr)}function xr(t){return arguments.length?this.property("__data__",t):this.node().__data__}function br(t){return function(e){t.call(this,e,this.__data__)}}function kr(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function Mr(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,s;n<i;++n)s=e[n],(!t.type||s.type===t.type)&&s.name===t.name?this.removeEventListener(s.type,s.listener,s.options):e[++r]=s;++r?e.length=r:delete this.__on}}}function Nr(t,e,n){return function(){var r=this.__on,i,s=br(e);if(r){for(var o=0,a=r.length;o<a;++o)if((i=r[o]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=n),i.value=e;return}}this.addEventListener(t.type,s,n),i={type:t.type,name:t.name,value:e,listener:s,options:n},r?r.push(i):this.__on=[i]}}function Er(t,e,n){var r=kr(t+""),i,s=r.length,o;if(arguments.length<2){var a=this.node().__on;if(a){for(var u=0,l=a.length,f;u<l;++u)for(i=0,f=a[u];i<s;++i)if((o=r[i]).type===f.type&&o.name===f.name)return f.value}return}for(a=e?Nr:Mr,i=0;i<s;++i)this.each(a(r[i],e,n));return this}function De(t,e,n){var r=ze(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Cr(t,e){return function(){return De(this,t,e)}}function Sr(t,e){return function(){return De(this,t,e.apply(this,arguments))}}function zr(t,e){return this.each((typeof e=="function"?Sr:Cr)(t,e))}function*$r(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,s=r.length,o;i<s;++i)(o=r[i])&&(yield o)}var Fe=[null];function H(t,e){this._groups=t,this._parents=e}function gt(){return new H([[document.documentElement]],Fe)}function Ar(){return this}H.prototype=gt.prototype={constructor:H,select:nn,selectAll:an,selectChild:fn,selectChildren:pn,filter:gn,data:bn,enter:vn,exit:Mn,join:Nn,merge:En,selection:Ar,order:Cn,sort:Sn,call:$n,nodes:An,node:Tn,size:Rn,empty:Dn,each:Fn,attr:Vn,style:Wn,property:Zn,classed:tr,text:ir,html:ur,raise:cr,lower:hr,append:dr,insert:pr,remove:vr,clone:_r,datum:xr,on:Er,dispatch:zr,[Symbol.iterator]:$r};function tt(t){return typeof t=="string"?new H([[document.querySelector(t)]],[document.documentElement]):new H([[t]],Fe)}function Tr(t){let e;for(;e=t.sourceEvent;)t=e;return t}function J(t,e){if(t=Tr(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}const Lt={capture:!0,passive:!1};function Ot(t){t.preventDefault(),t.stopImmediatePropagation()}function Rr(t){var e=t.document.documentElement,n=tt(t).on("dragstart.drag",Ot,Lt);"onselectstart"in e?n.on("selectstart.drag",Ot,Lt):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Dr(t,e){var n=t.document.documentElement,r=tt(t).on("dragstart.drag",null);e&&(r.on("click.drag",Ot,Lt),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function te(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ie(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function vt(){}var ht=.7,Ct=1/ht,ot="\\s*([+-]?\\d+)\\s*",dt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Y="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Fr=/^#([0-9a-f]{3,8})$/,Ir=new RegExp(`^rgb\\(${ot},${ot},${ot}\\)$`),Br=new RegExp(`^rgb\\(${Y},${Y},${Y}\\)$`),Hr=new RegExp(`^rgba\\(${ot},${ot},${ot},${dt}\\)$`),Pr=new RegExp(`^rgba\\(${Y},${Y},${Y},${dt}\\)$`),Xr=new RegExp(`^hsl\\(${dt},${Y},${Y}\\)$`),qr=new RegExp(`^hsla\\(${dt},${Y},${Y},${dt}\\)$`),ue={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};te(vt,mt,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:le,formatHex:le,formatHex8:Vr,formatHsl:Lr,formatRgb:ce,toString:ce});function le(){return this.rgb().formatHex()}function Vr(){return this.rgb().formatHex8()}function Lr(){return Be(this).formatHsl()}function ce(){return this.rgb().formatRgb()}function mt(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Fr.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?fe(e):n===3?new F(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?yt(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?yt(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Ir.exec(t))?new F(e[1],e[2],e[3],1):(e=Br.exec(t))?new F(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Hr.exec(t))?yt(e[1],e[2],e[3],e[4]):(e=Pr.exec(t))?yt(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Xr.exec(t))?me(e[1],e[2]/100,e[3]/100,1):(e=qr.exec(t))?me(e[1],e[2]/100,e[3]/100,e[4]):ue.hasOwnProperty(t)?fe(ue[t]):t==="transparent"?new F(NaN,NaN,NaN,0):null}function fe(t){return new F(t>>16&255,t>>8&255,t&255,1)}function yt(t,e,n,r){return r<=0&&(t=e=n=NaN),new F(t,e,n,r)}function Or(t){return t instanceof vt||(t=mt(t)),t?(t=t.rgb(),new F(t.r,t.g,t.b,t.opacity)):new F}function Yt(t,e,n,r){return arguments.length===1?Or(t):new F(t,e,n,r??1)}function F(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}te(F,Yt,Ie(vt,{brighter(t){return t=t==null?Ct:Math.pow(Ct,t),new F(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?ht:Math.pow(ht,t),new F(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new F(nt(this.r),nt(this.g),nt(this.b),St(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:he,formatHex:he,formatHex8:Yr,formatRgb:de,toString:de}));function he(){return`#${et(this.r)}${et(this.g)}${et(this.b)}`}function Yr(){return`#${et(this.r)}${et(this.g)}${et(this.b)}${et((isNaN(this.opacity)?1:this.opacity)*255)}`}function de(){const t=St(this.opacity);return`${t===1?"rgb(":"rgba("}${nt(this.r)}, ${nt(this.g)}, ${nt(this.b)}${t===1?")":`, ${t})`}`}function St(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function nt(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function et(t){return t=nt(t),(t<16?"0":"")+t.toString(16)}function me(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new V(t,e,n,r)}function Be(t){if(t instanceof V)return new V(t.h,t.s,t.l,t.opacity);if(t instanceof vt||(t=mt(t)),!t)return new V;if(t instanceof V)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),s=Math.max(e,n,r),o=NaN,a=s-i,u=(s+i)/2;return a?(e===s?o=(n-r)/a+(n<r)*6:n===s?o=(r-e)/a+2:o=(e-n)/a+4,a/=u<.5?s+i:2-s-i,o*=60):a=u>0&&u<1?0:o,new V(o,a,u,t.opacity)}function Wr(t,e,n,r){return arguments.length===1?Be(t):new V(t,e,n,r??1)}function V(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}te(V,Wr,Ie(vt,{brighter(t){return t=t==null?Ct:Math.pow(Ct,t),new V(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?ht:Math.pow(ht,t),new V(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new F(Pt(t>=240?t-240:t+120,i,r),Pt(t,i,r),Pt(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new V(pe(this.h),wt(this.s),wt(this.l),St(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=St(this.opacity);return`${t===1?"hsl(":"hsla("}${pe(this.h)}, ${wt(this.s)*100}%, ${wt(this.l)*100}%${t===1?")":`, ${t})`}`}}));function pe(t){return t=(t||0)%360,t<0?t+360:t}function wt(t){return Math.max(0,Math.min(1,t||0))}function Pt(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const He=t=>()=>t;function Ur(t,e){return function(n){return t+n*e}}function Gr(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function Kr(t){return(t=+t)==1?Pe:function(e,n){return n-e?Gr(e,n,t):He(isNaN(e)?n:e)}}function Pe(t,e){var n=e-t;return n?Ur(t,n):He(isNaN(t)?e:t)}const ge=function t(e){var n=Kr(e);function r(i,s){var o=n((i=Yt(i)).r,(s=Yt(s)).r),a=n(i.g,s.g),u=n(i.b,s.b),l=Pe(i.opacity,s.opacity);return function(f){return i.r=o(f),i.g=a(f),i.b=u(f),i.opacity=l(f),i+""}}return r.gamma=t,r}(1);function j(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var Wt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Xt=new RegExp(Wt.source,"g");function Zr(t){return function(){return t}}function Qr(t){return function(e){return t(e)+""}}function Jr(t,e){var n=Wt.lastIndex=Xt.lastIndex=0,r,i,s,o=-1,a=[],u=[];for(t=t+"",e=e+"";(r=Wt.exec(t))&&(i=Xt.exec(e));)(s=i.index)>n&&(s=e.slice(n,s),a[o]?a[o]+=s:a[++o]=s),(r=r[0])===(i=i[0])?a[o]?a[o]+=i:a[++o]=i:(a[++o]=null,u.push({i:o,x:j(r,i)})),n=Xt.lastIndex;return n<e.length&&(s=e.slice(n),a[o]?a[o]+=s:a[++o]=s),a.length<2?u[0]?Qr(u[0].x):Zr(e):(e=u.length,function(l){for(var f=0,p;f<e;++f)a[(p=u[f]).i]=p.x(l);return a.join("")})}var ve=180/Math.PI,Ut={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Xe(t,e,n,r,i,s){var o,a,u;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,u/=a),t*r<e*n&&(t=-t,e=-e,u=-u,o=-o),{translateX:i,translateY:s,rotate:Math.atan2(e,t)*ve,skewX:Math.atan(u)*ve,scaleX:o,scaleY:a}}var _t;function jr(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Ut:Xe(e.a,e.b,e.c,e.d,e.e,e.f)}function ti(t){return t==null||(_t||(_t=document.createElementNS("http://www.w3.org/2000/svg","g")),_t.setAttribute("transform",t),!(t=_t.transform.baseVal.consolidate()))?Ut:(t=t.matrix,Xe(t.a,t.b,t.c,t.d,t.e,t.f))}function qe(t,e,n,r){function i(l){return l.length?l.pop()+" ":""}function s(l,f,p,g,y,k){if(l!==p||f!==g){var N=y.push("translate(",null,e,null,n);k.push({i:N-4,x:j(l,p)},{i:N-2,x:j(f,g)})}else(p||g)&&y.push("translate("+p+e+g+n)}function o(l,f,p,g){l!==f?(l-f>180?f+=360:f-l>180&&(l+=360),g.push({i:p.push(i(p)+"rotate(",null,r)-2,x:j(l,f)})):f&&p.push(i(p)+"rotate("+f+r)}function a(l,f,p,g){l!==f?g.push({i:p.push(i(p)+"skewX(",null,r)-2,x:j(l,f)}):f&&p.push(i(p)+"skewX("+f+r)}function u(l,f,p,g,y,k){if(l!==p||f!==g){var N=y.push(i(y)+"scale(",null,",",null,")");k.push({i:N-4,x:j(l,p)},{i:N-2,x:j(f,g)})}else(p!==1||g!==1)&&y.push(i(y)+"scale("+p+","+g+")")}return function(l,f){var p=[],g=[];return l=t(l),f=t(f),s(l.translateX,l.translateY,f.translateX,f.translateY,p,g),o(l.rotate,f.rotate,p,g),a(l.skewX,f.skewX,p,g),u(l.scaleX,l.scaleY,f.scaleX,f.scaleY,p,g),l=f=null,function(y){for(var k=-1,N=g.length,z;++k<N;)p[(z=g[k]).i]=z.x(y);return p.join("")}}}var ei=qe(jr,"px, ","px)","deg)"),ni=qe(ti,", ",")",")"),ri=1e-12;function ye(t){return((t=Math.exp(t))+1/t)/2}function ii(t){return((t=Math.exp(t))-1/t)/2}function oi(t){return((t=Math.exp(2*t))-1)/(t+1)}const si=function t(e,n,r){function i(s,o){var a=s[0],u=s[1],l=s[2],f=o[0],p=o[1],g=o[2],y=f-a,k=p-u,N=y*y+k*k,z,b;if(N<ri)b=Math.log(g/l)/e,z=function(R){return[a+R*y,u+R*k,l*Math.exp(e*R*b)]};else{var A=Math.sqrt(N),T=(g*g-l*l+r*N)/(2*l*n*A),P=(g*g-l*l-r*N)/(2*g*n*A),I=Math.log(Math.sqrt(T*T+1)-T),$=Math.log(Math.sqrt(P*P+1)-P);b=($-I)/e,z=function(R){var O=R*b,C=ye(I),it=l/(n*A)*(C*oi(e*O+I)-ii(I));return[a+it*y,u+it*k,l*C/ye(e*O+I)]}}return z.duration=b*1e3*e/Math.SQRT2,z}return i.rho=function(s){var o=Math.max(.001,+s),a=o*o,u=a*a;return t(o,a,u)},i}(Math.SQRT2,2,4);var at=0,ct=0,ut=0,Ve=1e3,zt,ft,$t=0,rt=0,Rt=0,pt=typeof performance=="object"&&performance.now?performance:Date,Le=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function ee(){return rt||(Le(ai),rt=pt.now()+Rt)}function ai(){rt=0}function At(){this._call=this._time=this._next=null}At.prototype=Oe.prototype={constructor:At,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?ee():+n)+(e==null?0:+e),!this._next&&ft!==this&&(ft?ft._next=this:zt=this,ft=this),this._call=t,this._time=n,Gt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Gt())}};function Oe(t,e,n){var r=new At;return r.restart(t,e,n),r}function ui(){ee(),++at;for(var t=zt,e;t;)(e=rt-t._time)>=0&&t._call.call(void 0,e),t=t._next;--at}function we(){rt=($t=pt.now())+Rt,at=ct=0;try{ui()}finally{at=0,ci(),rt=0}}function li(){var t=pt.now(),e=t-$t;e>Ve&&(Rt-=e,$t=t)}function ci(){for(var t,e=zt,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:zt=n);ft=t,Gt(r)}function Gt(t){if(!at){ct&&(ct=clearTimeout(ct));var e=t-rt;e>24?(t<1/0&&(ct=setTimeout(we,t-pt.now()-Rt)),ut&&(ut=clearInterval(ut))):(ut||($t=pt.now(),ut=setInterval(li,Ve)),at=1,Le(we))}}function _e(t,e,n){var r=new At;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var fi=Qt("start","end","cancel","interrupt"),hi=[],Ye=0,xe=1,Kt=2,kt=3,be=4,Zt=5,Mt=6;function Dt(t,e,n,r,i,s){var o=t.__transition;if(!o)t.__transition={};else if(n in o)return;di(t,n,{name:e,index:r,group:i,on:fi,tween:hi,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Ye})}function ne(t,e){var n=L(t,e);if(n.state>Ye)throw new Error("too late; already scheduled");return n}function W(t,e){var n=L(t,e);if(n.state>kt)throw new Error("too late; already running");return n}function L(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function di(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Oe(s,0,n.time);function s(l){n.state=xe,n.timer.restart(o,n.delay,n.time),n.delay<=l&&o(l-n.delay)}function o(l){var f,p,g,y;if(n.state!==xe)return u();for(f in r)if(y=r[f],y.name===n.name){if(y.state===kt)return _e(o);y.state===be?(y.state=Mt,y.timer.stop(),y.on.call("interrupt",t,t.__data__,y.index,y.group),delete r[f]):+f<e&&(y.state=Mt,y.timer.stop(),y.on.call("cancel",t,t.__data__,y.index,y.group),delete r[f])}if(_e(function(){n.state===kt&&(n.state=be,n.timer.restart(a,n.delay,n.time),a(l))}),n.state=Kt,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Kt){for(n.state=kt,i=new Array(g=n.tween.length),f=0,p=-1;f<g;++f)(y=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(i[++p]=y);i.length=p+1}}function a(l){for(var f=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(u),n.state=Zt,1),p=-1,g=i.length;++p<g;)i[p].call(t,f);n.state===Zt&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=Mt,n.timer.stop(),delete r[e];for(var l in r)return;delete t.__transition}}function Nt(t,e){var n=t.__transition,r,i,s=!0,o;if(n){e=e==null?null:e+"";for(o in n){if((r=n[o]).name!==e){s=!1;continue}i=r.state>Kt&&r.state<Zt,r.state=Mt,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[o]}s&&delete t.__transition}}function mi(t){return this.each(function(){Nt(this,t)})}function pi(t,e){var n,r;return function(){var i=W(this,t),s=i.tween;if(s!==n){r=n=s;for(var o=0,a=r.length;o<a;++o)if(r[o].name===e){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function gi(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var s=W(this,t),o=s.tween;if(o!==r){i=(r=o).slice();for(var a={name:e,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===e){i[u]=a;break}u===l&&i.push(a)}s.tween=i}}function vi(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=L(this.node(),n).tween,i=0,s=r.length,o;i<s;++i)if((o=r[i]).name===t)return o.value;return null}return this.each((e==null?pi:gi)(n,t,e))}function re(t,e,n){var r=t._id;return t.each(function(){var i=W(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return L(i,r).value[e]}}function We(t,e){var n;return(typeof e=="number"?j:e instanceof mt?ge:(n=mt(e))?(e=n,ge):Jr)(t,e)}function yi(t){return function(){this.removeAttribute(t)}}function wi(t){return function(){this.removeAttributeNS(t.space,t.local)}}function _i(t,e,n){var r,i=n+"",s;return function(){var o=this.getAttribute(t);return o===i?null:o===r?s:s=e(r=o,n)}}function xi(t,e,n){var r,i=n+"",s;return function(){var o=this.getAttributeNS(t.space,t.local);return o===i?null:o===r?s:s=e(r=o,n)}}function bi(t,e,n){var r,i,s;return function(){var o,a=n(this),u;return a==null?void this.removeAttribute(t):(o=this.getAttribute(t),u=a+"",o===u?null:o===r&&u===i?s:(i=u,s=e(r=o,a)))}}function ki(t,e,n){var r,i,s;return function(){var o,a=n(this),u;return a==null?void this.removeAttributeNS(t.space,t.local):(o=this.getAttributeNS(t.space,t.local),u=a+"",o===u?null:o===r&&u===i?s:(i=u,s=e(r=o,a)))}}function Mi(t,e){var n=Tt(t),r=n==="transform"?ni:We;return this.attrTween(t,typeof e=="function"?(n.local?ki:bi)(n,r,re(this,"attr."+t,e)):e==null?(n.local?wi:yi)(n):(n.local?xi:_i)(n,r,e))}function Ni(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Ei(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Ci(t,e){var n,r;function i(){var s=e.apply(this,arguments);return s!==r&&(n=(r=s)&&Ei(t,s)),n}return i._value=e,i}function Si(t,e){var n,r;function i(){var s=e.apply(this,arguments);return s!==r&&(n=(r=s)&&Ni(t,s)),n}return i._value=e,i}function zi(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=Tt(t);return this.tween(n,(r.local?Ci:Si)(r,e))}function $i(t,e){return function(){ne(this,t).delay=+e.apply(this,arguments)}}function Ai(t,e){return e=+e,function(){ne(this,t).delay=e}}function Ti(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?$i:Ai)(e,t)):L(this.node(),e).delay}function Ri(t,e){return function(){W(this,t).duration=+e.apply(this,arguments)}}function Di(t,e){return e=+e,function(){W(this,t).duration=e}}function Fi(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Ri:Di)(e,t)):L(this.node(),e).duration}function Ii(t,e){if(typeof e!="function")throw new Error;return function(){W(this,t).ease=e}}function Bi(t){var e=this._id;return arguments.length?this.each(Ii(e,t)):L(this.node(),e).ease}function Hi(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;W(this,t).ease=n}}function Pi(t){if(typeof t!="function")throw new Error;return this.each(Hi(this._id,t))}function Xi(t){typeof t!="function"&&(t=Ee(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var s=e[i],o=s.length,a=r[i]=[],u,l=0;l<o;++l)(u=s[l])&&t.call(u,u.__data__,l,s)&&a.push(u);return new Q(r,this._parents,this._name,this._id)}function qi(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,s=Math.min(r,i),o=new Array(r),a=0;a<s;++a)for(var u=e[a],l=n[a],f=u.length,p=o[a]=new Array(f),g,y=0;y<f;++y)(g=u[y]||l[y])&&(p[y]=g);for(;a<r;++a)o[a]=e[a];return new Q(o,this._parents,this._name,this._id)}function Vi(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function Li(t,e,n){var r,i,s=Vi(e)?ne:W;return function(){var o=s(this,t),a=o.on;a!==r&&(i=(r=a).copy()).on(e,n),o.on=i}}function Oi(t,e){var n=this._id;return arguments.length<2?L(this.node(),n).on.on(t):this.each(Li(n,t,e))}function Yi(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Wi(){return this.on("end.remove",Yi(this._id))}function Ui(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Jt(t));for(var r=this._groups,i=r.length,s=new Array(i),o=0;o<i;++o)for(var a=r[o],u=a.length,l=s[o]=new Array(u),f,p,g=0;g<u;++g)(f=a[g])&&(p=t.call(f,f.__data__,g,a))&&("__data__"in f&&(p.__data__=f.__data__),l[g]=p,Dt(l[g],e,n,g,l,L(f,n)));return new Q(s,this._parents,e,n)}function Gi(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ne(t));for(var r=this._groups,i=r.length,s=[],o=[],a=0;a<i;++a)for(var u=r[a],l=u.length,f,p=0;p<l;++p)if(f=u[p]){for(var g=t.call(f,f.__data__,p,u),y,k=L(f,n),N=0,z=g.length;N<z;++N)(y=g[N])&&Dt(y,e,n,N,g,k);s.push(g),o.push(f)}return new Q(s,o,e,n)}var Ki=gt.prototype.constructor;function Zi(){return new Ki(this._groups,this._parents)}function Qi(t,e){var n,r,i;return function(){var s=st(this,t),o=(this.style.removeProperty(t),st(this,t));return s===o?null:s===n&&o===r?i:i=e(n=s,r=o)}}function Ue(t){return function(){this.style.removeProperty(t)}}function Ji(t,e,n){var r,i=n+"",s;return function(){var o=st(this,t);return o===i?null:o===r?s:s=e(r=o,n)}}function ji(t,e,n){var r,i,s;return function(){var o=st(this,t),a=n(this),u=a+"";return a==null&&(u=a=(this.style.removeProperty(t),st(this,t))),o===u?null:o===r&&u===i?s:(i=u,s=e(r=o,a))}}function to(t,e){var n,r,i,s="style."+e,o="end."+s,a;return function(){var u=W(this,t),l=u.on,f=u.value[s]==null?a||(a=Ue(e)):void 0;(l!==n||i!==f)&&(r=(n=l).copy()).on(o,i=f),u.on=r}}function eo(t,e,n){var r=(t+="")=="transform"?ei:We;return e==null?this.styleTween(t,Qi(t,r)).on("end.style."+t,Ue(t)):typeof e=="function"?this.styleTween(t,ji(t,r,re(this,"style."+t,e))).each(to(this._id,t)):this.styleTween(t,Ji(t,r,e),n).on("end.style."+t,null)}function no(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function ro(t,e,n){var r,i;function s(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&no(t,o,n)),r}return s._value=e,s}function io(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,ro(t,e,n??""))}function oo(t){return function(){this.textContent=t}}function so(t){return function(){var e=t(this);this.textContent=e??""}}function ao(t){return this.tween("text",typeof t=="function"?so(re(this,"text",t)):oo(t==null?"":t+""))}function uo(t){return function(e){this.textContent=t.call(this,e)}}function lo(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&uo(i)),e}return r._value=t,r}function co(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,lo(t))}function fo(){for(var t=this._name,e=this._id,n=Ge(),r=this._groups,i=r.length,s=0;s<i;++s)for(var o=r[s],a=o.length,u,l=0;l<a;++l)if(u=o[l]){var f=L(u,e);Dt(u,t,n,l,o,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Q(r,this._parents,t,n)}function ho(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(s,o){var a={value:o},u={value:function(){--i===0&&s()}};n.each(function(){var l=W(this,r),f=l.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(a),e._.interrupt.push(a),e._.end.push(u)),l.on=e}),i===0&&s()})}var mo=0;function Q(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Ge(){return++mo}var K=gt.prototype;Q.prototype={constructor:Q,select:Ui,selectAll:Gi,selectChild:K.selectChild,selectChildren:K.selectChildren,filter:Xi,merge:qi,selection:Zi,transition:fo,call:K.call,nodes:K.nodes,node:K.node,size:K.size,empty:K.empty,each:K.each,on:Oi,attr:Mi,attrTween:zi,style:eo,styleTween:io,text:ao,textTween:co,remove:Wi,tween:vi,delay:Ti,duration:Fi,ease:Bi,easeVarying:Pi,end:ho,[Symbol.iterator]:K[Symbol.iterator]};function po(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var go={time:null,delay:0,duration:250,ease:po};function vo(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function yo(t){var e,n;t instanceof Q?(e=t._id,t=t._name):(e=Ge(),(n=go).time=ee(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,s=0;s<i;++s)for(var o=r[s],a=o.length,u,l=0;l<a;++l)(u=o[l])&&Dt(u,t,e,l,o,n||vo(u,e));return new Q(r,this._parents,t,e)}gt.prototype.interrupt=mi;gt.prototype.transition=yo;const xt=t=>()=>t;function wo(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Z(t,e,n){this.k=t,this.x=e,this.y=n}Z.prototype={constructor:Z,scale:function(t){return t===1?this:new Z(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Z(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var ie=new Z(1,0,0);Z.prototype;function qt(t){t.stopImmediatePropagation()}function lt(t){t.preventDefault(),t.stopImmediatePropagation()}function _o(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function xo(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function ke(){return this.__zoom||ie}function bo(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function ko(){return navigator.maxTouchPoints||"ontouchstart"in this}function Mo(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],s=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>s?(s+o)/2:Math.min(0,s)||Math.max(0,o))}function No(){var t=_o,e=xo,n=Mo,r=bo,i=ko,s=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],a=250,u=si,l=Qt("start","zoom","end"),f,p,g,y=500,k=150,N=0,z=10;function b(c){c.property("__zoom",ke).on("wheel.zoom",O,{passive:!1}).on("mousedown.zoom",C).on("dblclick.zoom",it).filter(i).on("touchstart.zoom",Ft).on("touchmove.zoom",It).on("touchend.zoom touchcancel.zoom",Bt).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(c,w,h,d){var v=c.selection?c.selection():c;v.property("__zoom",ke),c!==v?I(c,w,h,d):v.interrupt().each(function(){$(this,arguments).event(d).start().zoom(null,typeof w=="function"?w.apply(this,arguments):w).end()})},b.scaleBy=function(c,w,h,d){b.scaleTo(c,function(){var v=this.__zoom.k,m=typeof w=="function"?w.apply(this,arguments):w;return v*m},h,d)},b.scaleTo=function(c,w,h,d){b.transform(c,function(){var v=e.apply(this,arguments),m=this.__zoom,x=h==null?P(v):typeof h=="function"?h.apply(this,arguments):h,E=m.invert(x),M=typeof w=="function"?w.apply(this,arguments):w;return n(T(A(m,M),x,E),v,o)},h,d)},b.translateBy=function(c,w,h,d){b.transform(c,function(){return n(this.__zoom.translate(typeof w=="function"?w.apply(this,arguments):w,typeof h=="function"?h.apply(this,arguments):h),e.apply(this,arguments),o)},null,d)},b.translateTo=function(c,w,h,d,v){b.transform(c,function(){var m=e.apply(this,arguments),x=this.__zoom,E=d==null?P(m):typeof d=="function"?d.apply(this,arguments):d;return n(ie.translate(E[0],E[1]).scale(x.k).translate(typeof w=="function"?-w.apply(this,arguments):-w,typeof h=="function"?-h.apply(this,arguments):-h),m,o)},d,v)};function A(c,w){return w=Math.max(s[0],Math.min(s[1],w)),w===c.k?c:new Z(w,c.x,c.y)}function T(c,w,h){var d=w[0]-h[0]*c.k,v=w[1]-h[1]*c.k;return d===c.x&&v===c.y?c:new Z(c.k,d,v)}function P(c){return[(+c[0][0]+ +c[1][0])/2,(+c[0][1]+ +c[1][1])/2]}function I(c,w,h,d){c.on("start.zoom",function(){$(this,arguments).event(d).start()}).on("interrupt.zoom end.zoom",function(){$(this,arguments).event(d).end()}).tween("zoom",function(){var v=this,m=arguments,x=$(v,m).event(d),E=e.apply(v,m),M=h==null?P(E):typeof h=="function"?h.apply(v,m):h,D=Math.max(E[1][0]-E[0][0],E[1][1]-E[0][1]),S=v.__zoom,B=typeof w=="function"?w.apply(v,m):w,X=u(S.invert(M).concat(D/S.k),B.invert(M).concat(D/B.k));return function(q){if(q===1)q=B;else{var U=X(q),Ht=D/U[2];q=new Z(Ht,M[0]-U[0]*Ht,M[1]-U[1]*Ht)}x.zoom(null,q)}})}function $(c,w,h){return!h&&c.__zooming||new R(c,w)}function R(c,w){this.that=c,this.args=w,this.active=0,this.sourceEvent=null,this.extent=e.apply(c,w),this.taps=0}R.prototype={event:function(c){return c&&(this.sourceEvent=c),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(c,w){return this.mouse&&c!=="mouse"&&(this.mouse[1]=w.invert(this.mouse[0])),this.touch0&&c!=="touch"&&(this.touch0[1]=w.invert(this.touch0[0])),this.touch1&&c!=="touch"&&(this.touch1[1]=w.invert(this.touch1[0])),this.that.__zoom=w,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(c){var w=tt(this.that).datum();l.call(c,this.that,new wo(c,{sourceEvent:this.sourceEvent,target:b,type:c,transform:this.that.__zoom,dispatch:l}),w)}};function O(c,...w){if(!t.apply(this,arguments))return;var h=$(this,w).event(c),d=this.__zoom,v=Math.max(s[0],Math.min(s[1],d.k*Math.pow(2,r.apply(this,arguments)))),m=J(c);if(h.wheel)(h.mouse[0][0]!==m[0]||h.mouse[0][1]!==m[1])&&(h.mouse[1]=d.invert(h.mouse[0]=m)),clearTimeout(h.wheel);else{if(d.k===v)return;h.mouse=[m,d.invert(m)],Nt(this),h.start()}lt(c),h.wheel=setTimeout(x,k),h.zoom("mouse",n(T(A(d,v),h.mouse[0],h.mouse[1]),h.extent,o));function x(){h.wheel=null,h.end()}}function C(c,...w){if(g||!t.apply(this,arguments))return;var h=c.currentTarget,d=$(this,w,!0).event(c),v=tt(c.view).on("mousemove.zoom",M,!0).on("mouseup.zoom",D,!0),m=J(c,h),x=c.clientX,E=c.clientY;Rr(c.view),qt(c),d.mouse=[m,this.__zoom.invert(m)],Nt(this),d.start();function M(S){if(lt(S),!d.moved){var B=S.clientX-x,X=S.clientY-E;d.moved=B*B+X*X>N}d.event(S).zoom("mouse",n(T(d.that.__zoom,d.mouse[0]=J(S,h),d.mouse[1]),d.extent,o))}function D(S){v.on("mousemove.zoom mouseup.zoom",null),Dr(S.view,d.moved),lt(S),d.event(S).end()}}function it(c,...w){if(t.apply(this,arguments)){var h=this.__zoom,d=J(c.changedTouches?c.changedTouches[0]:c,this),v=h.invert(d),m=h.k*(c.shiftKey?.5:2),x=n(T(A(h,m),d,v),e.apply(this,w),o);lt(c),a>0?tt(this).transition().duration(a).call(I,x,d,c):tt(this).call(b.transform,x,d,c)}}function Ft(c,...w){if(t.apply(this,arguments)){var h=c.touches,d=h.length,v=$(this,w,c.changedTouches.length===d).event(c),m,x,E,M;for(qt(c),x=0;x<d;++x)E=h[x],M=J(E,this),M=[M,this.__zoom.invert(M),E.identifier],v.touch0?!v.touch1&&v.touch0[2]!==M[2]&&(v.touch1=M,v.taps=0):(v.touch0=M,m=!0,v.taps=1+!!f);f&&(f=clearTimeout(f)),m&&(v.taps<2&&(p=M[0],f=setTimeout(function(){f=null},y)),Nt(this),v.start())}}function It(c,...w){if(this.__zooming){var h=$(this,w).event(c),d=c.changedTouches,v=d.length,m,x,E,M;for(lt(c),m=0;m<v;++m)x=d[m],E=J(x,this),h.touch0&&h.touch0[2]===x.identifier?h.touch0[0]=E:h.touch1&&h.touch1[2]===x.identifier&&(h.touch1[0]=E);if(x=h.that.__zoom,h.touch1){var D=h.touch0[0],S=h.touch0[1],B=h.touch1[0],X=h.touch1[1],q=(q=B[0]-D[0])*q+(q=B[1]-D[1])*q,U=(U=X[0]-S[0])*U+(U=X[1]-S[1])*U;x=A(x,Math.sqrt(q/U)),E=[(D[0]+B[0])/2,(D[1]+B[1])/2],M=[(S[0]+X[0])/2,(S[1]+X[1])/2]}else if(h.touch0)E=h.touch0[0],M=h.touch0[1];else return;h.zoom("touch",n(T(x,E,M),h.extent,o))}}function Bt(c,...w){if(this.__zooming){var h=$(this,w).event(c),d=c.changedTouches,v=d.length,m,x;for(qt(c),g&&clearTimeout(g),g=setTimeout(function(){g=null},y),m=0;m<v;++m)x=d[m],h.touch0&&h.touch0[2]===x.identifier?delete h.touch0:h.touch1&&h.touch1[2]===x.identifier&&delete h.touch1;if(h.touch1&&!h.touch0&&(h.touch0=h.touch1,delete h.touch1),h.touch0)h.touch0[1]=this.__zoom.invert(h.touch0[0]);else if(h.end(),h.taps===2&&(x=J(x,this),Math.hypot(p[0]-x[0],p[1]-x[1])<z)){var E=tt(this).on("dblclick.zoom");E&&E.apply(this,arguments)}}}return b.wheelDelta=function(c){return arguments.length?(r=typeof c=="function"?c:xt(+c),b):r},b.filter=function(c){return arguments.length?(t=typeof c=="function"?c:xt(!!c),b):t},b.touchable=function(c){return arguments.length?(i=typeof c=="function"?c:xt(!!c),b):i},b.extent=function(c){return arguments.length?(e=typeof c=="function"?c:xt([[+c[0][0],+c[0][1]],[+c[1][0],+c[1][1]]]),b):e},b.scaleExtent=function(c){return arguments.length?(s[0]=+c[0],s[1]=+c[1],b):[s[0],s[1]]},b.translateExtent=function(c){return arguments.length?(o[0][0]=+c[0][0],o[1][0]=+c[1][0],o[0][1]=+c[0][1],o[1][1]=+c[1][1],b):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},b.constrain=function(c){return arguments.length?(n=c,b):n},b.duration=function(c){return arguments.length?(a=+c,b):a},b.interpolate=function(c){return arguments.length?(u=c,b):u},b.on=function(){var c=l.on.apply(l,arguments);return c===l?b:c},b.clickDistance=function(c){return arguments.length?(N=(c=+c)*c,b):Math.sqrt(N)},b.tapDistance=function(c){return arguments.length?(z=+c,b):z},b}const oe=Symbol("MiniMapSlots"),Ke=_.defineComponent({name:"MiniMapNode",compatConfig:{MODE:3},props:["id","position","dimensions","strokeWidth","strokeColor","borderRadius","color","shapeRendering","type"],emits:["click","dblclick","mouseenter","mousemove","mouseleave"],setup(t,{attrs:e,emit:n}){const r=_.inject(oe);return()=>{const i=e.style??{},s=r[`node-${t.type}`];return s?s(t):_.h("rect",{id:t.id,class:["vue-flow__minimap-node",e.class].join(" "),style:i,x:t.position.x,y:t.position.y,rx:t.borderRadius,ry:t.borderRadius,width:t.dimensions.width,height:t.dimensions.height,fill:t.color||i.background||i.backgroundColor,stroke:t.strokeColor,strokeWidth:t.strokeWidth,shapeRendering:t.shapeRendering,onClick:o=>n("click",o),onDblClick:o=>n("dblclick",o),onMouseenter:o=>n("mouseenter",o),onMousemove:o=>n("mousemove",o),onMouseleave:o=>n("mouseleave",o)})}}}),Eo=["width","height","viewBox","aria-labelledby"],Co=["id"],So=["d","fill","stroke","stroke-width"],zo={name:"MiniMap",compatConfig:{MODE:3}},$o=_.defineComponent({...zo,props:{nodeColor:{type:[String,Function],default:"#e2e2e2"},nodeStrokeColor:{type:[String,Function],default:"transparent"},nodeClassName:null,nodeBorderRadius:{default:5},nodeStrokeWidth:{default:2},maskColor:{default:"rgb(240, 240, 240, 0.6)"},maskStrokeColor:{default:"none"},maskStrokeWidth:{default:1},position:{default:()=>"bottom-right"},pannable:{type:Boolean,default:!1},zoomable:{type:Boolean,default:!1},width:null,height:null,ariaLabel:{default:"Vue Flow mini map"}},emits:["click","nodeClick","nodeDblclick","nodeMouseenter","nodeMousemove","nodeMouseleave"],setup(t,{emit:e}){const n=_.useAttrs(),r=200,i=150,{id:s,edges:o,viewport:a,translateExtent:u,dimensions:l,emits:f,nodes:p,d3Selection:g,d3Zoom:y}=G.useVueFlow(),k=_.ref();_.provide(oe,_.useSlots());const N=_.computed(()=>{var d;return t.width??((d=n.style)==null?void 0:d.width)??r}),z=_.computed(()=>{var d;return t.height??((d=n.style)==null?void 0:d.height)??i}),b=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision",A=_.computed(()=>t.nodeColor instanceof Function?t.nodeColor:()=>t.nodeColor),T=_.computed(()=>t.nodeStrokeColor instanceof Function?t.nodeStrokeColor:()=>t.nodeStrokeColor),P=_.computed(()=>t.nodeClassName instanceof Function?t.nodeClassName:()=>t.nodeClassName),I=_.computed(()=>G.getRectOfNodes(p.value)),$=_.computed(()=>({x:-a.value.x/a.value.zoom,y:-a.value.y/a.value.zoom,width:l.value.width/a.value.zoom,height:l.value.height/a.value.zoom})),R=_.computed(()=>p.value&&p.value.length?G.getBoundsofRects(I.value,$.value):$.value),O=_.computed(()=>{const d=R.value.width/N.value,v=R.value.height/z.value;return Math.max(d,v)}),C=_.computed(()=>{const d=O.value*N.value,v=O.value*z.value,m=5*O.value;return{offset:m,x:R.value.x-(d-R.value.width)/2-m,y:R.value.y-(v-R.value.height)/2-m,width:d+m*2,height:v+m*2}}),it=_.computed(()=>!C.value.x||!C.value.y?"":` | ||
M${C.value.x-C.value.offset},${C.value.y-C.value.offset} | ||
@@ -9,2 +9,2 @@ h${C.value.width+C.value.offset*2} | ||
v${$.value.height} | ||
h${-$.value.width}z`);_.watchEffect(d=>{if(k.value){const v=tt(k.value),m=M=>{if(M.sourceEvent.type!=="wheel"||!g.value||!y.value)return;const D=-M.sourceEvent.deltaY*(M.sourceEvent.deltaMode===1?.05:M.sourceEvent.deltaMode?1:.002)*10,S=a.value.zoom*2**D;y.value.scaleTo(g.value,S)},x=M=>{if(M.sourceEvent.type!=="mousemove"||!g.value||!y.value)return;const D={x:a.value.x-M.sourceEvent.movementX*Y.value*Math.max(1,a.value.zoom),y:a.value.y-M.sourceEvent.movementY*Y.value*Math.max(1,a.value.zoom)},S=[[0,0],[l.value.width,l.value.height]],B=ie.translate(D.x,D.y).scale(a.value.zoom),X=y.value.constrain()(B,S,u.value);y.value.transform(g.value,X)},E=No().on("zoom",t.pannable?x:()=>{}).on("zoom.wheel",t.zoomable?m:()=>{});v.call(E),d(()=>{v.on("zoom",null)})}},{flush:"post"});const Ft=d=>{const[v,m]=J(d);e("click",{event:d,position:{x:v,y:m}})},It=(d,v)=>{const m={event:d,node:v,connectedEdges:G.getConnectedEdges([v],o.value)};f.miniMapNodeClick(m),e("nodeClick",m)},Bt=(d,v)=>{const m={event:d,node:v,connectedEdges:G.getConnectedEdges([v],o.value)};f.miniMapNodeDoubleClick(m),e("nodeDblclick",m)},c=(d,v)=>{const m={event:d,node:v,connectedEdges:G.getConnectedEdges([v],o.value)};f.miniMapNodeMouseEnter(m),e("nodeMouseenter",m)},w=(d,v)=>{const m={event:d,node:v,connectedEdges:G.getConnectedEdges([v],o.value)};f.miniMapNodeMouseMove(m),e("nodeMousemove",m)},h=(d,v)=>{const m={event:d,node:v,connectedEdges:G.getConnectedEdges([v],o.value)};f.miniMapNodeMouseLeave(m),e("nodeMouseleave",m)};return(d,v)=>(_.openBlock(),_.createBlock(_.unref(G.Panel),{position:t.position,class:_.normalizeClass(["vue-flow__minimap",{pannable:t.pannable,zoomable:t.zoomable}])},{default:_.withCtx(()=>[(_.openBlock(),_.createElementBlock("svg",{ref_key:"el",ref:k,width:_.unref(N),height:_.unref(z),viewBox:[_.unref(C).x,_.unref(C).y,_.unref(C).width,_.unref(C).height].join(" "),role:"img","aria-labelledby":`vue-flow__minimap-${_.unref(s)}`,onClick:Ft},[t.ariaLabel?(_.openBlock(),_.createElementBlock("title",{key:0,id:`vue-flow__minimap-${_.unref(s)}`},_.toDisplayString(t.ariaLabel),9,Co)):_.createCommentVNode("",!0),(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(_.unref(p),m=>(_.openBlock(),_.createBlock(_.unref(Ke),{id:m.id,key:m.id,position:m.computedPosition,dimensions:m.dimensions,style:_.normalizeStyle(m.style),class:_.normalizeClass(_.unref(P)(m)),color:_.unref(A)(m),"border-radius":t.nodeBorderRadius,"stroke-color":_.unref(T)(m),"stroke-width":t.nodeStrokeWidth,"shape-rendering":_.unref(b),type:m.type,onClick:x=>It(x,m),onDblclick:x=>Bt(x,m),onMouseenter:x=>c(x,m),onMousemove:x=>w(x,m),onMouseleave:x=>h(x,m)},null,8,["id","position","dimensions","style","class","color","border-radius","stroke-color","stroke-width","shape-rendering","type","onClick","onDblclick","onMouseenter","onMousemove","onMouseleave"]))),128)),_.createElementVNode("path",{class:"vue-flow__minimap-mask",d:_.unref(it),fill:t.maskColor,stroke:t.maskStrokeColor,"stroke-width":t.maskStrokeWidth,"fill-rule":"evenodd"},null,8,So)],8,Eo))]),_:1},8,["position","class"]))}});exports.MiniMap=$o;exports.MiniMapNode=Ke;exports.MiniMapSlots=oe; | ||
h${-$.value.width}z`);_.watchEffect(d=>{if(k.value){const v=tt(k.value),m=M=>{if(M.sourceEvent.type!=="wheel"||!g.value||!y.value)return;const D=-M.sourceEvent.deltaY*(M.sourceEvent.deltaMode===1?.05:M.sourceEvent.deltaMode?1:.002)*10,S=a.value.zoom*2**D;y.value.scaleTo(g.value,S)},x=M=>{if(M.sourceEvent.type!=="mousemove"||!g.value||!y.value)return;const D={x:a.value.x-M.sourceEvent.movementX*O.value*Math.max(1,a.value.zoom),y:a.value.y-M.sourceEvent.movementY*O.value*Math.max(1,a.value.zoom)},S=[[0,0],[l.value.width,l.value.height]],B=ie.translate(D.x,D.y).scale(a.value.zoom),X=y.value.constrain()(B,S,u.value);y.value.transform(g.value,X)},E=No().on("zoom",t.pannable?x:()=>{}).on("zoom.wheel",t.zoomable?m:()=>{});v.call(E),d(()=>{v.on("zoom",null)})}},{flush:"post"});const Ft=d=>{const[v,m]=J(d);e("click",{event:d,position:{x:v,y:m}})},It=(d,v)=>{const m={event:d,node:v,connectedEdges:G.getConnectedEdges([v],o.value)};f.miniMapNodeClick(m),e("nodeClick",m)},Bt=(d,v)=>{const m={event:d,node:v,connectedEdges:G.getConnectedEdges([v],o.value)};f.miniMapNodeDoubleClick(m),e("nodeDblclick",m)},c=(d,v)=>{const m={event:d,node:v,connectedEdges:G.getConnectedEdges([v],o.value)};f.miniMapNodeMouseEnter(m),e("nodeMouseenter",m)},w=(d,v)=>{const m={event:d,node:v,connectedEdges:G.getConnectedEdges([v],o.value)};f.miniMapNodeMouseMove(m),e("nodeMousemove",m)},h=(d,v)=>{const m={event:d,node:v,connectedEdges:G.getConnectedEdges([v],o.value)};f.miniMapNodeMouseLeave(m),e("nodeMouseleave",m)};return(d,v)=>(_.openBlock(),_.createBlock(_.unref(G.Panel),{position:t.position,class:_.normalizeClass(["vue-flow__minimap",{pannable:t.pannable,zoomable:t.zoomable}])},{default:_.withCtx(()=>[(_.openBlock(),_.createElementBlock("svg",{ref_key:"el",ref:k,width:_.unref(N),height:_.unref(z),viewBox:[_.unref(C).x,_.unref(C).y,_.unref(C).width,_.unref(C).height].join(" "),role:"img","aria-labelledby":`vue-flow__minimap-${_.unref(s)}`,onClick:Ft},[t.ariaLabel?(_.openBlock(),_.createElementBlock("title",{key:0,id:`vue-flow__minimap-${_.unref(s)}`},_.toDisplayString(t.ariaLabel),9,Co)):_.createCommentVNode("",!0),(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(_.unref(p),m=>(_.openBlock(),_.createBlock(_.unref(Ke),{id:m.id,key:m.id,position:m.computedPosition,dimensions:m.dimensions,style:_.normalizeStyle(m.style),class:_.normalizeClass(_.unref(P)(m)),color:_.unref(A)(m),"border-radius":t.nodeBorderRadius,"stroke-color":_.unref(T)(m),"stroke-width":t.nodeStrokeWidth,"shape-rendering":_.unref(b),type:m.type,onClick:x=>It(x,m),onDblclick:x=>Bt(x,m),onMouseenter:x=>c(x,m),onMousemove:x=>w(x,m),onMouseleave:x=>h(x,m)},null,8,["id","position","dimensions","style","class","color","border-radius","stroke-color","stroke-width","shape-rendering","type","onClick","onDblclick","onMouseenter","onMousemove","onMouseleave"]))),128)),_.createElementVNode("path",{class:"vue-flow__minimap-mask",d:_.unref(it),fill:t.maskColor,stroke:t.maskStrokeColor,"stroke-width":t.maskStrokeWidth,"fill-rule":"evenodd"},null,8,So)],8,Eo))]),_:1},8,["position","class"]))}});exports.MiniMap=$o;exports.MiniMapNode=Ke;exports.MiniMapSlots=oe; |
{ | ||
"name": "@vue-flow/minimap", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"private": false, | ||
@@ -40,3 +40,3 @@ "license": "MIT", | ||
"vue-tsc": "^1.0.24", | ||
"@vue-flow/core": "1.12.3" | ||
"@vue-flow/core": "1.14.3" | ||
}, | ||
@@ -43,0 +43,0 @@ "publishConfig": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
240964
12
3045
2