@weapp-vite/dashboard 7.4.0 → 7.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +74 -7
- package/dist/assets/AppEmptyState.js +1 -1
- package/dist/assets/AppMetricTile.js +1 -1
- package/dist/assets/AppRuntimeBadge.js +1 -1
- package/dist/assets/ChunkGraphPanel.js +1 -1
- package/dist/assets/activity.js +4 -4
- package/dist/assets/analyze.css +1 -1
- package/dist/assets/analyze.js +28 -32
- package/dist/assets/{css.worker-gLj4_ykt.js → css.worker-C6lDtRpF.js} +6 -6
- package/dist/assets/d3.js +1 -1
- package/dist/assets/echarts.js +6 -6
- package/dist/assets/editor.worker-BmdWdrHZ.js +33 -0
- package/dist/assets/{html.worker-DBhNYEPj.js → html.worker-C5yZDBHz.js} +4 -4
- package/dist/assets/index.css +1 -2
- package/dist/assets/index.js +1 -1
- package/dist/assets/{json.worker-CrsoSj5O.js → json.worker-DdeUAmHa.js} +6 -6
- package/dist/assets/monaco.js +209 -209
- package/dist/assets/pages.js +1 -1
- package/dist/assets/tokens.js +1 -1
- package/dist/assets/{ts.worker-D0RfN2Tp.js → ts.worker-DGGa2mF8.js} +28 -28
- package/dist/assets/vendor.js +3 -3
- package/dist/assets/vue.js +2 -2
- package/package.json +7 -6
- package/dist/assets/editor.worker-DWPaKKV_.js +0 -33
package/dist/assets/d3.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={value:()=>{}};function t(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+``)||i in r||/[\s.]/.test(i))throw Error(`illegal type: `+i);r[i]=[]}return new n(r)}function n(e){this._=e}function r(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}n.prototype=t.prototype={constructor:n,on:function(e,t){var n=this._,o=r(e+``,n),s,c=-1,l=o.length;if(arguments.length<2){for(;++c<l;)if((s=(e=o[c]).type)&&(s=i(n[s],e.name)))return s;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++c<l;)if(s=(e=o[c]).type)n[s]=a(n[s],e.name,t);else if(t==null)for(s in n)n[s]=a(n[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new n(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function i(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function a(t,n,r){for(var i=0,a=t.length;i<a;++i)if(t[i].name===n){t[i]=e,t=t.slice(0,i).concat(t.slice(i+1));break}return r!=null&&t.push({name:n,value:r}),t}var o={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function s(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),o.hasOwnProperty(t)?{space:o[t],local:e}:e}function c(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function l(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function u(e){var t=s(e);return(t.local?l:c)(t)}function d(){}function f(e){return e==null?d:function(){return this.querySelector(e)}}function p(e){typeof e!=`function`&&(e=f(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new w(r,this._parents)}function m(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function h(){return[]}function g(e){return e==null?h:function(){return this.querySelectorAll(e)}}function _(e){return function(){return m(e.apply(this,arguments))}}function v(e){e=typeof e==`function`?_(e):g(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new w(r,i)}function y(e){return function(){return this.matches(e)}}function b(e){return function(t){return t.matches(e)}}var x=Array.prototype.find;function ee(e){return function(){return x.call(this.children,e)}}function S(){return this.firstElementChild}function te(e){return this.select(e==null?S:ee(typeof e==`function`?e:b(e)))}var ne=Array.prototype.filter;function re(){return Array.from(this.children)}function ie(e){return function(){return ne.call(this.children,e)}}function ae(e){return this.selectAll(e==null?re:ie(typeof e==`function`?e:b(e)))}function oe(e){typeof e!=`function`&&(e=y(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new w(r,this._parents)}function se(e){return Array(e.length)}function ce(){return new w(this._enter||this._groups.map(se),this._parents)}function le(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}le.prototype={constructor:le,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function ue(e){return function(){return e}}function de(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new le(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function fe(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new le(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function pe(e){return e.__data__}function me(e,t){if(!arguments.length)return Array.from(this,pe);var n=t?fe:de,r=this._parents,i=this._groups;typeof e!=`function`&&(e=ue(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=he(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new w(o,r),o._enter=s,o._exit=c,o}function he(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function ge(){return new w(this._exit||this._groups.map(se),this._parents)}function _e(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function ve(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new w(s,this._parents)}function ye(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function be(e){e||=xe;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new w(i,this._parents).order()}function xe(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Se(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Ce(){return Array.from(this)}function we(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function Te(){let e=0;for(let t of this)++e;return e}function Ee(){return!this.node()}function De(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function Oe(e){return function(){this.removeAttribute(e)}}function ke(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ae(e,t){return function(){this.setAttribute(e,t)}}function je(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Me(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Ne(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Pe(e,t){var n=s(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?ke:Oe:typeof t==`function`?n.local?Ne:Me:n.local?je:Ae)(n,t))}function Fe(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Ie(e){return function(){this.style.removeProperty(e)}}function Le(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Re(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function ze(e,t,n){return arguments.length>1?this.each((t==null?Ie:typeof t==`function`?Re:Le)(e,t,n??``)):C(this.node(),e)}function C(e,t){return e.style.getPropertyValue(t)||Fe(e).getComputedStyle(e,null).getPropertyValue(t)}function Be(e){return function(){delete this[e]}}function Ve(e,t){return function(){this[e]=t}}function He(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Ue(e,t){return arguments.length>1?this.each((t==null?Be:typeof t==`function`?He:Ve)(e,t)):this.node()[e]}function We(e){return e.trim().split(/^|\s+/)}function Ge(e){return e.classList||new Ke(e)}function Ke(e){this._node=e,this._names=We(e.getAttribute(`class`)||``)}Ke.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function qe(e,t){for(var n=Ge(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function Je(e,t){for(var n=Ge(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Ye(e){return function(){qe(this,e)}}function Xe(e){return function(){Je(this,e)}}function Ze(e,t){return function(){(t.apply(this,arguments)?qe:Je)(this,e)}}function Qe(e,t){var n=We(e+``);if(arguments.length<2){for(var r=Ge(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?Ze:t?Ye:Xe)(n,t))}function $e(){this.textContent=``}function et(e){return function(){this.textContent=e}}function tt(e){return function(){var t=e.apply(this,arguments);this.textContent=t??``}}function nt(e){return arguments.length?this.each(e==null?$e:(typeof e==`function`?tt:et)(e)):this.node().textContent}function rt(){this.innerHTML=``}function it(e){return function(){this.innerHTML=e}}function at(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??``}}function ot(e){return arguments.length?this.each(e==null?rt:(typeof e==`function`?at:it)(e)):this.node().innerHTML}function st(){this.nextSibling&&this.parentNode.appendChild(this)}function ct(){return this.each(st)}function lt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ut(){return this.each(lt)}function dt(e){var t=typeof e==`function`?e:u(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function ft(){return null}function pt(e,t){var n=typeof e==`function`?e:u(e),r=t==null?ft:typeof t==`function`?t:f(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function mt(){var e=this.parentNode;e&&e.removeChild(this)}function ht(){return this.each(mt)}function gt(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function _t(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function vt(e){return this.select(e?_t:gt)}function yt(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function bt(e){return function(t){e.call(this,t,this.__data__)}}function xt(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function St(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function Ct(e,t,n){return function(){var r=this.__on,i,a=bt(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function wt(e,t,n){var r=xt(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?Ct:St,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function Tt(e,t,n){var r=Fe(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Et(e,t){return function(){return Tt(this,e,t)}}function Dt(e,t){return function(){return Tt(this,e,t.apply(this,arguments))}}function Ot(e,t){return this.each((typeof t==`function`?Dt:Et)(e,t))}function*kt(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var At=[null];function w(e,t){this._groups=e,this._parents=t}function T(){return new w([[document.documentElement]],At)}function jt(){return this}w.prototype=T.prototype={constructor:w,select:p,selectAll:v,selectChild:te,selectChildren:ae,filter:oe,data:me,enter:ce,exit:ge,join:_e,merge:ve,selection:jt,order:ye,sort:be,call:Se,nodes:Ce,node:we,size:Te,empty:Ee,each:De,attr:Pe,style:ze,property:Ue,classed:Qe,text:nt,html:ot,raise:ct,lower:ut,append:dt,insert:pt,remove:ht,clone:vt,datum:yt,on:wt,dispatch:Ot,[Symbol.iterator]:kt};function E(e){return typeof e==`string`?new w([[document.querySelector(e)]],[document.documentElement]):new w([[e]],At)}function Mt(e){let t;for(;t=e.sourceEvent;)e=t;return e}function D(e,t){if(e=Mt(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}var Nt={passive:!1},O={capture:!0,passive:!1};function Pt(e){e.stopImmediatePropagation()}function k(e){e.preventDefault(),e.stopImmediatePropagation()}function Ft(e){var t=e.document.documentElement,n=E(e).on(`dragstart.drag`,k,O);`onselectstart`in t?n.on(`selectstart.drag`,k,O):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect=`none`)}function It(e,t){var n=e.document.documentElement,r=E(e).on(`dragstart.drag`,null);t&&(r.on(`click.drag`,k,O),setTimeout(function(){r.on(`click.drag`,null)},0)),`onselectstart`in n?r.on(`selectstart.drag`,null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Lt=e=>()=>e;function Rt(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:a,x:o,y:s,dx:c,dy:l,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:u}})}Rt.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function zt(e){return!e.ctrlKey&&!e.button}function Bt(){return this.parentNode}function Vt(e,t){return t??{x:e.x,y:e.y}}function Ht(){return navigator.maxTouchPoints||`ontouchstart`in this}function Ut(){var e=zt,n=Bt,r=Vt,i=Ht,a={},o=t(`start`,`drag`,`end`),s=0,c,l,u,d,f=0;function p(e){e.on(`mousedown.drag`,m).filter(i).on(`touchstart.drag`,_).on(`touchmove.drag`,v,Nt).on(`touchend.drag touchcancel.drag`,y).style(`touch-action`,`none`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}function m(t,r){if(!d&&e.call(this,t,r)){var i=b(this,n.call(this,t,r),t,r,`mouse`);i&&(E(t.view).on(`mousemove.drag`,h,O).on(`mouseup.drag`,g,O),Ft(t.view),Pt(t),u=!1,c=t.clientX,l=t.clientY,i(`start`,t))}}function h(e){if(k(e),!u){var t=e.clientX-c,n=e.clientY-l;u=t*t+n*n>f}a.mouse(`drag`,e)}function g(e){E(e.view).on(`mousemove.drag mouseup.drag`,null),It(e.view,u),k(e),a.mouse(`end`,e)}function _(t,r){if(e.call(this,t,r))for(var i=t.changedTouches,a=n.call(this,t,r),o=i.length,s=0,c;s<o;++s)(c=b(this,a,t,r,i[s].identifier,i[s]))&&(Pt(t),c(`start`,t,i[s]))}function v(e){for(var t=e.changedTouches,n=t.length,r=0,i;r<n;++r)(i=a[t[r].identifier])&&(k(e),i(`drag`,e,t[r]))}function y(e){var t=e.changedTouches,n=t.length,r,i;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),r=0;r<n;++r)(i=a[t[r].identifier])&&(Pt(e),i(`end`,e,t[r]))}function b(e,t,n,i,c,l){var u=o.copy(),d=D(l||n,t),f,m,h;if((h=r.call(e,new Rt(`beforestart`,{sourceEvent:n,target:p,identifier:c,active:s,x:d[0],y:d[1],dx:0,dy:0,dispatch:u}),i))!=null)return f=h.x-d[0]||0,m=h.y-d[1]||0,function n(r,o,l){var g=d,_;switch(r){case`start`:a[c]=n,_=s++;break;case`end`:delete a[c],--s;case`drag`:d=D(l||o,t),_=s}u.call(r,e,new Rt(r,{sourceEvent:o,subject:h,target:p,identifier:c,active:_,x:d[0]+f,y:d[1]+m,dx:d[0]-g[0],dy:d[1]-g[1],dispatch:u}),i)}}return p.filter=function(t){return arguments.length?(e=typeof t==`function`?t:Lt(!!t),p):e},p.container=function(e){return arguments.length?(n=typeof e==`function`?e:Lt(e),p):n},p.subject=function(e){return arguments.length?(r=typeof e==`function`?e:Lt(e),p):r},p.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:Lt(!!e),p):i},p.on=function(){var e=o.on.apply(o,arguments);return e===o?p:e},p.clickDistance=function(e){return arguments.length?(f=(e=+e)*e,p):Math.sqrt(f)},p}function Wt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Gt(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function A(){}var j=.7,Kt=1/j,M=`\\s*([+-]?\\d+)\\s*`,N=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,P=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,qt=/^#([0-9a-f]{3,8})$/,Jt=RegExp(`^rgb\\(${M},${M},${M}\\)$`),Yt=RegExp(`^rgb\\(${P},${P},${P}\\)$`),Xt=RegExp(`^rgba\\(${M},${M},${M},${N}\\)$`),Zt=RegExp(`^rgba\\(${P},${P},${P},${N}\\)$`),Qt=RegExp(`^hsl\\(${N},${P},${P}\\)$`),$t=RegExp(`^hsla\\(${N},${P},${P},${N}\\)$`),en={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};Wt(A,F,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:tn,formatHex:tn,formatHex8:nn,formatHsl:rn,formatRgb:an,toString:an});function tn(){return this.rgb().formatHex()}function nn(){return this.rgb().formatHex8()}function rn(){return hn(this).formatHsl()}function an(){return this.rgb().formatRgb()}function F(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=qt.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?on(t):n===3?new I(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?sn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?sn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Jt.exec(e))?new I(t[1],t[2],t[3],1):(t=Yt.exec(e))?new I(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Xt.exec(e))?sn(t[1],t[2],t[3],t[4]):(t=Zt.exec(e))?sn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Qt.exec(e))?mn(t[1],t[2]/100,t[3]/100,1):(t=$t.exec(e))?mn(t[1],t[2]/100,t[3]/100,t[4]):en.hasOwnProperty(e)?on(en[e]):e===`transparent`?new I(NaN,NaN,NaN,0):null}function on(e){return new I(e>>16&255,e>>8&255,e&255,1)}function sn(e,t,n,r){return r<=0&&(e=t=n=NaN),new I(e,t,n,r)}function cn(e){return e instanceof A||(e=F(e)),e?(e=e.rgb(),new I(e.r,e.g,e.b,e.opacity)):new I}function ln(e,t,n,r){return arguments.length===1?cn(e):new I(e,t,n,r??1)}function I(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Wt(I,ln,Gt(A,{brighter(e){return e=e==null?Kt:Kt**+e,new I(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?j:j**+e,new I(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new I(L(this.r),L(this.g),L(this.b),pn(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:un,formatHex:un,formatHex8:dn,formatRgb:fn,toString:fn}));function un(){return`#${R(this.r)}${R(this.g)}${R(this.b)}`}function dn(){return`#${R(this.r)}${R(this.g)}${R(this.b)}${R((isNaN(this.opacity)?1:this.opacity)*255)}`}function fn(){let e=pn(this.opacity);return`${e===1?`rgb(`:`rgba(`}${L(this.r)}, ${L(this.g)}, ${L(this.b)}${e===1?`)`:`, ${e})`}`}function pn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function L(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function R(e){return e=L(e),(e<16?`0`:``)+e.toString(16)}function mn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new z(e,t,n,r)}function hn(e){if(e instanceof z)return new z(e.h,e.s,e.l,e.opacity);if(e instanceof A||(e=F(e)),!e)return new z;if(e instanceof z)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new z(o,s,c,e.opacity)}function gn(e,t,n,r){return arguments.length===1?hn(e):new z(e,t,n,r??1)}function z(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Wt(z,gn,Gt(A,{brighter(e){return e=e==null?Kt:Kt**+e,new z(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?j:j**+e,new z(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new I(yn(e>=240?e-240:e+120,i,r),yn(e,i,r),yn(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new z(_n(this.h),vn(this.s),vn(this.l),pn(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(){let e=pn(this.opacity);return`${e===1?`hsl(`:`hsla(`}${_n(this.h)}, ${vn(this.s)*100}%, ${vn(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function _n(e){return e=(e||0)%360,e<0?e+360:e}function vn(e){return Math.max(0,Math.min(1,e||0))}function yn(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var bn=e=>()=>e;function xn(e,t){return function(n){return e+n*t}}function Sn(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function Cn(e){return(e=+e)==1?wn:function(t,n){return n-t?Sn(t,n,e):bn(isNaN(t)?n:t)}}function wn(e,t){var n=t-e;return n?xn(e,n):bn(isNaN(e)?t:e)}var Tn=(function e(t){var n=Cn(t);function r(e,t){var r=n((e=ln(e)).r,(t=ln(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=wn(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function B(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var En=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Dn=new RegExp(En.source,`g`);function On(e){return function(){return e}}function kn(e){return function(t){return e(t)+``}}function An(e,t){var n=En.lastIndex=Dn.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=En.exec(e))&&(i=Dn.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:B(r,i)})),n=Dn.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?kn(c[0].x):On(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}var jn=180/Math.PI,Mn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Nn(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*jn,skewX:Math.atan(c)*jn,scaleX:o,scaleY:s}}var Pn;function Fn(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?Mn:Nn(t.a,t.b,t.c,t.d,t.e,t.f)}function In(e){return e==null||(Pn||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),Pn.setAttribute(`transform`,e),!(e=Pn.transform.baseVal.consolidate()))?Mn:(e=e.matrix,Nn(e.a,e.b,e.c,e.d,e.e,e.f))}function Ln(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:B(e,i)},{i:c-2,x:B(r,a)})}else(i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:B(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:B(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:B(e,n)},{i:s-2,x:B(t,r)})}else(n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var Rn=Ln(Fn,`px, `,`px)`,`deg)`),zn=Ln(In,`, `,`)`,`)`),Bn=1e-12;function Vn(e){return((e=Math.exp(e))+1/e)/2}function Hn(e){return((e=Math.exp(e))-1/e)/2}function Un(e){return((e=Math.exp(2*e))-1)/(e+1)}var Wn=(function e(t,n,r){function i(e,i){var a=e[0],o=e[1],s=e[2],c=i[0],l=i[1],u=i[2],d=c-a,f=l-o,p=d*d+f*f,m,h;if(p<Bn)h=Math.log(u/s)/t,m=function(e){return[a+e*d,o+e*f,s*Math.exp(t*e*h)]};else{var g=Math.sqrt(p),_=(u*u-s*s+r*p)/(2*s*n*g),v=(u*u-s*s-r*p)/(2*u*n*g),y=Math.log(Math.sqrt(_*_+1)-_);h=(Math.log(Math.sqrt(v*v+1)-v)-y)/t,m=function(e){var r=e*h,i=Vn(y),c=s/(n*g)*(i*Un(t*r+y)-Hn(y));return[a+c*d,o+c*f,s*i/Vn(t*r+y)]}}return m.duration=h*1e3*t/Math.SQRT2,m}return i.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},i})(Math.SQRT2,2,4),V=0,Gn=0,Kn=0,qn=1e3,Jn,H,Yn=0,U=0,Xn=0,W=typeof performance==`object`&&performance.now?performance:Date,Zn=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Qn(){return U||=(Zn($n),W.now()+Xn)}function $n(){U=0}function er(){this._call=this._time=this._next=null}er.prototype=tr.prototype={constructor:er,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?Qn():+n)+(t==null?0:+t),!this._next&&H!==this&&(H?H._next=this:Jn=this,H=this),this._call=e,this._time=n,or()},stop:function(){this._call&&(this._call=null,this._time=1/0,or())}};function tr(e,t,n){var r=new er;return r.restart(e,t,n),r}function nr(){Qn(),++V;for(var e=Jn,t;e;)(t=U-e._time)>=0&&e._call.call(void 0,t),e=e._next;--V}function rr(){U=(Yn=W.now())+Xn,V=Gn=0;try{nr()}finally{V=0,ar(),U=0}}function ir(){var e=W.now(),t=e-Yn;t>qn&&(Xn-=t,Yn=e)}function ar(){for(var e,t=Jn,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Jn=n);H=e,or(r)}function or(e){V||(Gn&&=clearTimeout(Gn),e-U>24?(e<1/0&&(Gn=setTimeout(rr,e-W.now()-Xn)),Kn&&=clearInterval(Kn)):(Kn||=(Yn=W.now(),setInterval(ir,qn)),V=1,Zn(rr)))}function sr(e,t,n){var r=new er;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var cr=t(`start`,`end`,`cancel`,`interrupt`),lr=[];function ur(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;fr(e,n,{name:t,index:r,group:i,on:cr,tween:lr,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function dr(e,t){var n=K(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function G(e,t){var n=K(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function K(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function fr(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=tr(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==1)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===3)return sr(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=6,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(sr(function(){n.state===3&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===2){for(n.state=3,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===5&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function pr(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function mr(e){return this.each(function(){pr(this,e)})}function hr(e,t){var n,r;return function(){var i=G(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function gr(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=G(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function _r(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=K(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?hr:gr)(n,e,t))}function vr(e,t,n){var r=e._id;return e.each(function(){var e=G(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return K(e,r).value[t]}}function yr(e,t){var n;return(typeof t==`number`?B:t instanceof F?Tn:(n=F(t))?(t=n,Tn):An)(e,t)}function br(e){return function(){this.removeAttribute(e)}}function xr(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Sr(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function Cr(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function wr(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Tr(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Er(e,t){var n=s(e),r=n===`transform`?zn:yr;return this.attrTween(e,typeof t==`function`?(n.local?Tr:wr)(n,r,vr(this,`attr.`+e,t)):t==null?(n.local?xr:br)(n):(n.local?Cr:Sr)(n,r,t))}function Dr(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Or(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function kr(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Or(e,i)),n}return i._value=t,i}function Ar(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Dr(e,i)),n}return i._value=t,i}function jr(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=s(e);return this.tween(n,(r.local?kr:Ar)(r,t))}function Mr(e,t){return function(){dr(this,e).delay=+t.apply(this,arguments)}}function Nr(e,t){return t=+t,function(){dr(this,e).delay=t}}function Pr(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Mr:Nr)(t,e)):K(this.node(),t).delay}function Fr(e,t){return function(){G(this,e).duration=+t.apply(this,arguments)}}function Ir(e,t){return t=+t,function(){G(this,e).duration=t}}function Lr(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Fr:Ir)(t,e)):K(this.node(),t).duration}function Rr(e,t){if(typeof t!=`function`)throw Error();return function(){G(this,e).ease=t}}function zr(e){var t=this._id;return arguments.length?this.each(Rr(t,e)):K(this.node(),t).ease}function Br(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();G(this,e).ease=n}}function Vr(e){if(typeof e!=`function`)throw Error();return this.each(Br(this._id,e))}function Hr(e){typeof e!=`function`&&(e=y(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new q(r,this._parents,this._name,this._id)}function Ur(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new q(o,this._parents,this._name,this._id)}function Wr(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function Gr(e,t,n){var r,i,a=Wr(t)?dr:G;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function Kr(e,t){var n=this._id;return arguments.length<2?K(this.node(),n).on.on(e):this.each(Gr(n,e,t))}function qr(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Jr(){return this.on(`end.remove`,qr(this._id))}function Yr(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=f(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,p=0;p<c;++p)(u=s[p])&&(d=e.call(u,u.__data__,p,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[p]=d,ur(l[p],t,n,p,l,K(u,n)));return new q(a,this._parents,t,n)}function Xr(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=g(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=K(u,n),h=0,_=f.length;h<_;++h)(p=f[h])&&ur(p,t,n,h,f,m);a.push(f),o.push(u)}return new q(a,o,t,n)}var Zr=T.prototype.constructor;function Qr(){return new Zr(this._groups,this._parents)}function $r(e,t){var n,r,i;return function(){var a=C(this,e),o=(this.style.removeProperty(e),C(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function ei(e){return function(){this.style.removeProperty(e)}}function ti(e,t,n){var r,i=n+``,a;return function(){var o=C(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function ni(e,t,n){var r,i,a;return function(){var o=C(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),C(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function ri(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=G(this,e),l=c.on,u=c.value[a]==null?s||=ei(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function ii(e,t,n){var r=(e+=``)==`transform`?Rn:yr;return t==null?this.styleTween(e,$r(e,r)).on(`end.style.`+e,ei(e)):typeof t==`function`?this.styleTween(e,ni(e,r,vr(this,`style.`+e,t))).each(ri(this._id,e)):this.styleTween(e,ti(e,r,t),n).on(`end.style.`+e,null)}function ai(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function oi(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&ai(e,a,n)),r}return a._value=t,a}function si(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,oi(e,t,n??``))}function ci(e){return function(){this.textContent=e}}function li(e){return function(){var t=e(this);this.textContent=t??``}}function ui(e){return this.tween(`text`,typeof e==`function`?li(vr(this,`text`,e)):ci(e==null?``:e+``))}function di(e){return function(t){this.textContent=e.call(this,t)}}function fi(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&di(r)),t}return r._value=e,r}function pi(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,fi(e))}function mi(){for(var e=this._name,t=this._id,n=_i(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=K(c,t);ur(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new q(r,this._parents,e,n)}function hi(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=G(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var gi=0;function q(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function _i(){return++gi}var J=T.prototype;q.prototype={constructor:q,select:Yr,selectAll:Xr,selectChild:J.selectChild,selectChildren:J.selectChildren,filter:Hr,merge:Ur,selection:Qr,transition:mi,call:J.call,nodes:J.nodes,node:J.node,size:J.size,empty:J.empty,each:J.each,on:Kr,attr:Er,attrTween:jr,style:ii,styleTween:si,text:ui,textTween:pi,remove:Jr,tween:_r,delay:Pr,duration:Lr,ease:zr,easeVarying:Vr,end:hi,[Symbol.iterator]:J[Symbol.iterator]};function vi(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var yi={time:null,delay:0,duration:250,ease:vi};function bi(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function xi(e){var t,n;e instanceof q?(t=e._id,e=e._name):(t=_i(),(n=yi).time=Qn(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&ur(c,e,t,l,o,n||bi(c,t));return new q(r,this._parents,e,t)}T.prototype.interrupt=mr,T.prototype.transition=xi;var{abs:Si,max:Ci,min:wi}=Math;[`w`,`e`].map(Ti),[`n`,`s`].map(Ti),[`n`,`w`,`e`,`s`,`nw`,`ne`,`sw`,`se`].map(Ti);function Ti(e){return{type:e}}function Ei(e,t){var n,r=1;e??=0,t??=0;function i(){var i,a=n.length,o,s=0,c=0;for(i=0;i<a;++i)o=n[i],s+=o.x,c+=o.y;for(s=(s/a-e)*r,c=(c/a-t)*r,i=0;i<a;++i)o=n[i],o.x-=s,o.y-=c}return i.initialize=function(e){n=e},i.x=function(t){return arguments.length?(e=+t,i):e},i.y=function(e){return arguments.length?(t=+e,i):t},i.strength=function(e){return arguments.length?(r=+e,i):r},i}function Di(e){let t=+this._x.call(null,e),n=+this._y.call(null,e);return Oi(this.cover(t,n),t,n,e)}function Oi(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,a=e._root,o={data:r},s=e._x0,c=e._y0,l=e._x1,u=e._y1,d,f,p,m,h,g,_,v;if(!a)return e._root=o,e;for(;a.length;)if((h=t>=(d=(s+l)/2))?s=d:l=d,(g=n>=(f=(c+u)/2))?c=f:u=f,i=a,!(a=a[_=g<<1|h]))return i[_]=o,e;if(p=+e._x.call(null,a.data),m=+e._y.call(null,a.data),t===p&&n===m)return o.next=a,i?i[_]=o:e._root=o,e;do i=i?i[_]=[,,,,]:e._root=[,,,,],(h=t>=(d=(s+l)/2))?s=d:l=d,(g=n>=(f=(c+u)/2))?c=f:u=f;while((_=g<<1|h)==(v=(m>=f)<<1|p>=d));return i[v]=a,i[_]=o,e}function ki(e){var t,n,r=e.length,i,a,o=Array(r),s=Array(r),c=1/0,l=1/0,u=-1/0,d=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,t=e[n]))||isNaN(a=+this._y.call(null,t))||(o[n]=i,s[n]=a,i<c&&(c=i),i>u&&(u=i),a<l&&(l=a),a>d&&(d=a));if(c>u||l>d)return this;for(this.cover(c,l).cover(u,d),n=0;n<r;++n)Oi(this,o[n],s[n],e[n]);return this}function Ai(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,a=(r=Math.floor(t))+1;else{for(var o=i-n||1,s=this._root,c,l;n>e||e>=i||r>t||t>=a;)switch(l=(t<r)<<1|e<n,c=[,,,,],c[l]=s,s=c,o*=2,l){case 0:i=n+o,a=r+o;break;case 1:n=i-o,a=r+o;break;case 2:i=n+o,r=a-o;break;case 3:n=i-o,r=a-o}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this}function ji(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function Mi(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Y(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function Ni(e,t,n){var r,i=this._x0,a=this._y0,o,s,c,l,u=this._x1,d=this._y1,f=[],p=this._root,m,h;for(p&&f.push(new Y(p,i,a,u,d)),n==null?n=1/0:(i=e-n,a=t-n,u=e+n,d=t+n,n*=n);m=f.pop();)if(!(!(p=m.node)||(o=m.x0)>u||(s=m.y0)>d||(c=m.x1)<i||(l=m.y1)<a)){if(p.length){var g=(o+c)/2,_=(s+l)/2;f.push(new Y(p[3],g,_,c,l),new Y(p[2],o,_,g,l),new Y(p[1],g,s,c,_),new Y(p[0],o,s,g,_)),(h=(t>=_)<<1|e>=g)&&(m=f[f.length-1],f[f.length-1]=f[f.length-1-h],f[f.length-1-h]=m)}else{var v=e-+this._x.call(null,p.data),y=t-+this._y.call(null,p.data),b=v*v+y*y;if(b<n){var x=Math.sqrt(n=b);i=e-x,a=t-x,u=e+x,d=t+x,r=p.data}}}return r}function Pi(e){if(isNaN(u=+this._x.call(null,e))||isNaN(d=+this._y.call(null,e)))return this;var t,n=this._root,r,i,a,o=this._x0,s=this._y0,c=this._x1,l=this._y1,u,d,f,p,m,h,g,_;if(!n)return this;if(n.length)for(;;){if((m=u>=(f=(o+c)/2))?o=f:c=f,(h=d>=(p=(s+l)/2))?s=p:l=p,t=n,!(n=n[g=h<<1|m]))return this;if(!n.length)break;(t[g+1&3]||t[g+2&3]||t[g+3&3])&&(r=t,_=g)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(a=n.next)&&delete n.next,i?(a?i.next=a:delete i.next,this):t?(a?t[g]=a:delete t[g],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[_]=n:this._root=n),this):(this._root=a,this)}function Fi(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function Ii(){return this._root}function Li(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function Ri(e){var t=[],n,r=this._root,i,a,o,s,c;for(r&&t.push(new Y(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(r=n.node,a=n.x0,o=n.y0,s=n.x1,c=n.y1)&&r.length){var l=(a+s)/2,u=(o+c)/2;(i=r[3])&&t.push(new Y(i,l,u,s,c)),(i=r[2])&&t.push(new Y(i,a,u,l,c)),(i=r[1])&&t.push(new Y(i,l,o,s,u)),(i=r[0])&&t.push(new Y(i,a,o,l,u))}return this}function zi(e){var t=[],n=[],r;for(this._root&&t.push(new Y(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var i=r.node;if(i.length){var a,o=r.x0,s=r.y0,c=r.x1,l=r.y1,u=(o+c)/2,d=(s+l)/2;(a=i[0])&&t.push(new Y(a,o,s,u,d)),(a=i[1])&&t.push(new Y(a,u,s,c,d)),(a=i[2])&&t.push(new Y(a,o,d,u,l)),(a=i[3])&&t.push(new Y(a,u,d,c,l))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this}function Bi(e){return e[0]}function Vi(e){return arguments.length?(this._x=e,this):this._x}function Hi(e){return e[1]}function Ui(e){return arguments.length?(this._y=e,this):this._y}function Wi(e,t,n){var r=new Gi(t??Bi,n??Hi,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function Gi(e,t,n,r,i,a){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function Ki(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var X=Wi.prototype=Gi.prototype;X.copy=function(){var e=new Gi(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,r;if(!t)return e;if(!t.length)return e._root=Ki(t),e;for(n=[{source:t,target:e._root=[,,,,]}];t=n.pop();)for(var i=0;i<4;++i)(r=t.source[i])&&(r.length?n.push({source:r,target:t.target[i]=[,,,,]}):t.target[i]=Ki(r));return e},X.add=Di,X.addAll=ki,X.cover=Ai,X.data=ji,X.extent=Mi,X.find=Ni,X.remove=Pi,X.removeAll=Fi,X.root=Ii,X.size=Li,X.visit=Ri,X.visitAfter=zi,X.x=Vi,X.y=Ui;function Z(e){return function(){return e}}function Q(e){return(e()-.5)*1e-6}function qi(e){return e.x+e.vx}function Ji(e){return e.y+e.vy}function Yi(e){var t,n,r,i=1,a=1;typeof e!=`function`&&(e=Z(e==null?1:+e));function o(){for(var e,o=t.length,c,l,u,d,f,p,m=0;m<a;++m)for(c=Wi(t,qi,Ji).visitAfter(s),e=0;e<o;++e)l=t[e],f=n[l.index],p=f*f,u=l.x+l.vx,d=l.y+l.vy,c.visit(h);function h(e,t,n,a,o){var s=e.data,c=e.r,m=f+c;if(s){if(s.index>l.index){var h=u-s.x-s.vx,g=d-s.y-s.vy,_=h*h+g*g;_<m*m&&(h===0&&(h=Q(r),_+=h*h),g===0&&(g=Q(r),_+=g*g),_=(m-(_=Math.sqrt(_)))/_*i,l.vx+=(h*=_)*(m=(c*=c)/(p+c)),l.vy+=(g*=_)*m,s.vx-=h*(m=1-m),s.vy-=g*m)}return}return t>u+m||a<u-m||n>d+m||o<d-m}}function s(e){if(e.data)return e.r=n[e.data.index];for(var t=e.r=0;t<4;++t)e[t]&&e[t].r>e.r&&(e.r=e[t].r)}function c(){if(t){var r,i=t.length,a;for(n=Array(i),r=0;r<i;++r)a=t[r],n[a.index]=+e(a,r,t)}}return o.initialize=function(e,n){t=e,r=n,c()},o.iterations=function(e){return arguments.length?(a=+e,o):a},o.strength=function(e){return arguments.length?(i=+e,o):i},o.radius=function(t){return arguments.length?(e=typeof t==`function`?t:Z(+t),c(),o):e},o}function Xi(e){return e.index}function Zi(e,t){var n=e.get(t);if(!n)throw Error(`node not found: `+t);return n}function Qi(e){var t=Xi,n=d,r,i=Z(30),a,o,s,c,l,u=1;e??=[];function d(e){return 1/Math.min(s[e.source.index],s[e.target.index])}function f(t){for(var n=0,i=e.length;n<u;++n)for(var o=0,s,d,f,p,m,h,g;o<i;++o)s=e[o],d=s.source,f=s.target,p=f.x+f.vx-d.x-d.vx||Q(l),m=f.y+f.vy-d.y-d.vy||Q(l),h=Math.sqrt(p*p+m*m),h=(h-a[o])/h*t*r[o],p*=h,m*=h,f.vx-=p*(g=c[o]),f.vy-=m*g,d.vx+=p*(g=1-g),d.vy+=m*g}function p(){if(o){var n,i=o.length,l=e.length,u=new Map(o.map((e,n)=>[t(e,n,o),e])),d;for(n=0,s=Array(i);n<l;++n)d=e[n],d.index=n,typeof d.source!=`object`&&(d.source=Zi(u,d.source)),typeof d.target!=`object`&&(d.target=Zi(u,d.target)),s[d.source.index]=(s[d.source.index]||0)+1,s[d.target.index]=(s[d.target.index]||0)+1;for(n=0,c=Array(l);n<l;++n)d=e[n],c[n]=s[d.source.index]/(s[d.source.index]+s[d.target.index]);r=Array(l),m(),a=Array(l),h()}}function m(){if(o)for(var t=0,i=e.length;t<i;++t)r[t]=+n(e[t],t,e)}function h(){if(o)for(var t=0,n=e.length;t<n;++t)a[t]=+i(e[t],t,e)}return f.initialize=function(e,t){o=e,l=t,p()},f.links=function(t){return arguments.length?(e=t,p(),f):e},f.id=function(e){return arguments.length?(t=e,f):t},f.iterations=function(e){return arguments.length?(u=+e,f):u},f.strength=function(e){return arguments.length?(n=typeof e==`function`?e:Z(+e),m(),f):n},f.distance=function(e){return arguments.length?(i=typeof e==`function`?e:Z(+e),h(),f):i},f}var $i=1664525,ea=1013904223,ta=4294967296;function na(){let e=1;return()=>(e=($i*e+ea)%ta)/ta}function ra(e){return e.x}function ia(e){return e.y}var aa=10,oa=Math.PI*(3-Math.sqrt(5));function sa(e){var n,r=1,i=.001,a=1-i**(1/300),o=0,s=.6,c=new Map,l=tr(f),u=t(`tick`,`end`),d=na();e??=[];function f(){p(),u.call(`tick`,n),r<i&&(l.stop(),u.call(`end`,n))}function p(t){var i,l=e.length,u;t===void 0&&(t=1);for(var d=0;d<t;++d)for(r+=(o-r)*a,c.forEach(function(e){e(r)}),i=0;i<l;++i)u=e[i],u.fx==null?u.x+=u.vx*=s:(u.x=u.fx,u.vx=0),u.fy==null?u.y+=u.vy*=s:(u.y=u.fy,u.vy=0);return n}function m(){for(var t=0,n=e.length,r;t<n;++t){if(r=e[t],r.index=t,r.fx!=null&&(r.x=r.fx),r.fy!=null&&(r.y=r.fy),isNaN(r.x)||isNaN(r.y)){var i=aa*Math.sqrt(.5+t),a=t*oa;r.x=i*Math.cos(a),r.y=i*Math.sin(a)}(isNaN(r.vx)||isNaN(r.vy))&&(r.vx=r.vy=0)}}function h(t){return t.initialize&&t.initialize(e,d),t}return m(),n={tick:p,restart:function(){return l.restart(f),n},stop:function(){return l.stop(),n},nodes:function(t){return arguments.length?(e=t,m(),c.forEach(h),n):e},alpha:function(e){return arguments.length?(r=+e,n):r},alphaMin:function(e){return arguments.length?(i=+e,n):i},alphaDecay:function(e){return arguments.length?(a=+e,n):+a},alphaTarget:function(e){return arguments.length?(o=+e,n):o},velocityDecay:function(e){return arguments.length?(s=1-e,n):1-s},randomSource:function(e){return arguments.length?(d=e,c.forEach(h),n):d},force:function(e,t){return arguments.length>1?(t==null?c.delete(e):c.set(e,h(t)),n):c.get(e)},find:function(t,n,r){var i=0,a=e.length,o,s,c,l,u;for(r==null?r=1/0:r*=r,i=0;i<a;++i)l=e[i],o=t-l.x,s=n-l.y,c=o*o+s*s,c<r&&(u=l,r=c);return u},on:function(e,t){return arguments.length>1?(u.on(e,t),n):u.on(e)}}}function ca(){var e,t,n,r,i=Z(-30),a,o=1,s=1/0,c=.81;function l(n){var i,a=e.length,o=Wi(e,ra,ia).visitAfter(d);for(r=n,i=0;i<a;++i)t=e[i],o.visit(f)}function u(){if(e){var t,n=e.length,r;for(a=Array(n),t=0;t<n;++t)r=e[t],a[r.index]=+i(r,t,e)}}function d(e){var t=0,n,r,i=0,o,s,c;if(e.length){for(o=s=c=0;c<4;++c)(n=e[c])&&(r=Math.abs(n.value))&&(t+=n.value,i+=r,o+=r*n.x,s+=r*n.y);e.x=o/i,e.y=s/i}else{n=e,n.x=n.data.x,n.y=n.data.y;do t+=a[n.data.index];while(n=n.next)}e.value=t}function f(e,i,l,u){if(!e.value)return!0;var d=e.x-t.x,f=e.y-t.y,p=u-i,m=d*d+f*f;if(p*p/c<m)return m<s&&(d===0&&(d=Q(n),m+=d*d),f===0&&(f=Q(n),m+=f*f),m<o&&(m=Math.sqrt(o*m)),t.vx+=d*e.value*r/m,t.vy+=f*e.value*r/m),!0;if(!(e.length||m>=s)){(e.data!==t||e.next)&&(d===0&&(d=Q(n),m+=d*d),f===0&&(f=Q(n),m+=f*f),m<o&&(m=Math.sqrt(o*m)));do e.data!==t&&(p=a[e.data.index]*r/m,t.vx+=d*p,t.vy+=f*p);while(e=e.next)}}return l.initialize=function(t,r){e=t,n=r,u()},l.strength=function(e){return arguments.length?(i=typeof e==`function`?e:Z(+e),u(),l):i},l.distanceMin=function(e){return arguments.length?(o=e*e,l):Math.sqrt(o)},l.distanceMax=function(e){return arguments.length?(s=e*e,l):Math.sqrt(s)},l.theta=function(e){return arguments.length?(c=e*e,l):Math.sqrt(c)},l}var la=e=>()=>e;function ua(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function $(e,t,n){this.k=e,this.x=t,this.y=n}$.prototype={constructor:$,scale:function(e){return e===1?this:new $(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new $(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}};var da=new $(1,0,0);fa.prototype=$.prototype;function fa(e){for(;!e.__zoom;)if(!(e=e.parentNode))return da;return e.__zoom}function pa(e){e.stopImmediatePropagation()}function ma(e){e.preventDefault(),e.stopImmediatePropagation()}function ha(e){return(!e.ctrlKey||e.type===`wheel`)&&!e.button}function ga(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute(`viewBox`)?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function _a(){return this.__zoom||da}function va(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function ya(){return navigator.maxTouchPoints||`ontouchstart`in this}function ba(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function xa(){var e=ha,n=ga,r=ba,i=va,a=ya,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],c=250,l=Wn,u=t(`start`,`zoom`,`end`),d,f,p,m=500,h=150,g=0,_=10;function v(e){e.property(`__zoom`,_a).on(`wheel.zoom`,ne,{passive:!1}).on(`mousedown.zoom`,re).on(`dblclick.zoom`,ie).filter(a).on(`touchstart.zoom`,ae).on(`touchmove.zoom`,oe).on(`touchend.zoom touchcancel.zoom`,se).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}v.transform=function(e,t,n,r){var i=e.selection?e.selection():e;i.property(`__zoom`,_a),e===i?i.interrupt().each(function(){S(this,arguments).event(r).start().zoom(null,typeof t==`function`?t.apply(this,arguments):t).end()}):ee(e,t,n,r)},v.scaleBy=function(e,t,n,r){v.scaleTo(e,function(){return this.__zoom.k*(typeof t==`function`?t.apply(this,arguments):t)},n,r)},v.scaleTo=function(e,t,i,a){v.transform(e,function(){var e=n.apply(this,arguments),a=this.__zoom,o=i==null?x(e):typeof i==`function`?i.apply(this,arguments):i,c=a.invert(o),l=typeof t==`function`?t.apply(this,arguments):t;return r(b(y(a,l),o,c),e,s)},i,a)},v.translateBy=function(e,t,i,a){v.transform(e,function(){return r(this.__zoom.translate(typeof t==`function`?t.apply(this,arguments):t,typeof i==`function`?i.apply(this,arguments):i),n.apply(this,arguments),s)},null,a)},v.translateTo=function(e,t,i,a,o){v.transform(e,function(){var e=n.apply(this,arguments),o=this.__zoom,c=a==null?x(e):typeof a==`function`?a.apply(this,arguments):a;return r(da.translate(c[0],c[1]).scale(o.k).translate(typeof t==`function`?-t.apply(this,arguments):-t,typeof i==`function`?-i.apply(this,arguments):-i),e,s)},a,o)};function y(e,t){return t=Math.max(o[0],Math.min(o[1],t)),t===e.k?e:new $(t,e.x,e.y)}function b(e,t,n){var r=t[0]-n[0]*e.k,i=t[1]-n[1]*e.k;return r===e.x&&i===e.y?e:new $(e.k,r,i)}function x(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function ee(e,t,r,i){e.on(`start.zoom`,function(){S(this,arguments).event(i).start()}).on(`interrupt.zoom end.zoom`,function(){S(this,arguments).event(i).end()}).tween(`zoom`,function(){var e=this,a=arguments,o=S(e,a).event(i),s=n.apply(e,a),c=r==null?x(s):typeof r==`function`?r.apply(e,a):r,u=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),d=e.__zoom,f=typeof t==`function`?t.apply(e,a):t,p=l(d.invert(c).concat(u/d.k),f.invert(c).concat(u/f.k));return function(e){if(e===1)e=f;else{var t=p(e),n=u/t[2];e=new $(n,c[0]-t[0]*n,c[1]-t[1]*n)}o.zoom(null,e)}})}function S(e,t,n){return!n&&e.__zooming||new te(e,t)}function te(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=n.apply(e,t),this.taps=0}te.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit(`start`)),this},zoom:function(e,t){return this.mouse&&e!==`mouse`&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&e!==`touch`&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&e!==`touch`&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit(`zoom`),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit(`end`)),this},emit:function(e){var t=E(this.that).datum();u.call(e,this.that,new ua(e,{sourceEvent:this.sourceEvent,target:v,type:e,transform:this.that.__zoom,dispatch:u}),t)}};function ne(t,...n){if(!e.apply(this,arguments))return;var a=S(this,n).event(t),c=this.__zoom,l=Math.max(o[0],Math.min(o[1],c.k*2**i.apply(this,arguments))),u=D(t);if(a.wheel)(a.mouse[0][0]!==u[0]||a.mouse[0][1]!==u[1])&&(a.mouse[1]=c.invert(a.mouse[0]=u)),clearTimeout(a.wheel);else if(c.k===l)return;else a.mouse=[u,c.invert(u)],pr(this),a.start();ma(t),a.wheel=setTimeout(d,h),a.zoom(`mouse`,r(b(y(c,l),a.mouse[0],a.mouse[1]),a.extent,s));function d(){a.wheel=null,a.end()}}function re(t,...n){if(p||!e.apply(this,arguments))return;var i=t.currentTarget,a=S(this,n,!0).event(t),o=E(t.view).on(`mousemove.zoom`,d,!0).on(`mouseup.zoom`,f,!0),c=D(t,i),l=t.clientX,u=t.clientY;Ft(t.view),pa(t),a.mouse=[c,this.__zoom.invert(c)],pr(this),a.start();function d(e){if(ma(e),!a.moved){var t=e.clientX-l,n=e.clientY-u;a.moved=t*t+n*n>g}a.event(e).zoom(`mouse`,r(b(a.that.__zoom,a.mouse[0]=D(e,i),a.mouse[1]),a.extent,s))}function f(e){o.on(`mousemove.zoom mouseup.zoom`,null),It(e.view,a.moved),ma(e),a.event(e).end()}}function ie(t,...i){if(e.apply(this,arguments)){var a=this.__zoom,o=D(t.changedTouches?t.changedTouches[0]:t,this),l=a.invert(o),u=a.k*(t.shiftKey?.5:2),d=r(b(y(a,u),o,l),n.apply(this,i),s);ma(t),c>0?E(this).transition().duration(c).call(ee,d,o,t):E(this).call(v.transform,d,o,t)}}function ae(t,...n){if(e.apply(this,arguments)){var r=t.touches,i=r.length,a=S(this,n,t.changedTouches.length===i).event(t),o,s,c,l;for(pa(t),s=0;s<i;++s)c=r[s],l=D(c,this),l=[l,this.__zoom.invert(l),c.identifier],a.touch0?!a.touch1&&a.touch0[2]!==l[2]&&(a.touch1=l,a.taps=0):(a.touch0=l,o=!0,a.taps=1+!!d);d&&=clearTimeout(d),o&&(a.taps<2&&(f=l[0],d=setTimeout(function(){d=null},m)),pr(this),a.start())}}function oe(e,...t){if(this.__zooming){var n=S(this,t).event(e),i=e.changedTouches,a=i.length,o,c,l,u;for(ma(e),o=0;o<a;++o)c=i[o],l=D(c,this),n.touch0&&n.touch0[2]===c.identifier?n.touch0[0]=l:n.touch1&&n.touch1[2]===c.identifier&&(n.touch1[0]=l);if(c=n.that.__zoom,n.touch1){var d=n.touch0[0],f=n.touch0[1],p=n.touch1[0],m=n.touch1[1],h=(h=p[0]-d[0])*h+(h=p[1]-d[1])*h,g=(g=m[0]-f[0])*g+(g=m[1]-f[1])*g;c=y(c,Math.sqrt(h/g)),l=[(d[0]+p[0])/2,(d[1]+p[1])/2],u=[(f[0]+m[0])/2,(f[1]+m[1])/2]}else if(n.touch0)l=n.touch0[0],u=n.touch0[1];else return;n.zoom(`touch`,r(b(c,l,u),n.extent,s))}}function se(e,...t){if(this.__zooming){var n=S(this,t).event(e),r=e.changedTouches,i=r.length,a,o;for(pa(e),p&&clearTimeout(p),p=setTimeout(function(){p=null},m),a=0;a<i;++a)o=r[a],n.touch0&&n.touch0[2]===o.identifier?delete n.touch0:n.touch1&&n.touch1[2]===o.identifier&&delete n.touch1;if(n.touch1&&!n.touch0&&(n.touch0=n.touch1,delete n.touch1),n.touch0)n.touch0[1]=this.__zoom.invert(n.touch0[0]);else if(n.end(),n.taps===2&&(o=D(o,this),Math.hypot(f[0]-o[0],f[1]-o[1])<_)){var s=E(this).on(`dblclick.zoom`);s&&s.apply(this,arguments)}}}return v.wheelDelta=function(e){return arguments.length?(i=typeof e==`function`?e:la(+e),v):i},v.filter=function(t){return arguments.length?(e=typeof t==`function`?t:la(!!t),v):e},v.touchable=function(e){return arguments.length?(a=typeof e==`function`?e:la(!!e),v):a},v.extent=function(e){return arguments.length?(n=typeof e==`function`?e:la([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),v):n},v.scaleExtent=function(e){return arguments.length?(o[0]=+e[0],o[1]=+e[1],v):[o[0],o[1]]},v.translateExtent=function(e){return arguments.length?(s[0][0]=+e[0][0],s[1][0]=+e[1][0],s[0][1]=+e[0][1],s[1][1]=+e[1][1],v):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},v.constrain=function(e){return arguments.length?(r=e,v):r},v.duration=function(e){return arguments.length?(c=+e,v):c},v.interpolate=function(e){return arguments.length?(l=e,v):l},v.on=function(){var e=u.on.apply(u,arguments);return e===u?v:e},v.clickDistance=function(e){return arguments.length?(g=(e=+e)*e,v):Math.sqrt(g)},v.tapDistance=function(e){return arguments.length?(_=+e,v):_},v}export{sa as a,Ei as c,ca as i,Ut as l,da as n,Qi as o,fa as r,Yi as s,xa as t,E as u};
|
|
1
|
+
var e={value:()=>{}};function t(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+``)||i in r||/[\s.]/.test(i))throw Error(`illegal type: `+i);r[i]=[]}return new n(r)}function n(e){this._=e}function r(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}n.prototype=t.prototype={constructor:n,on:function(e,t){var n=this._,o=r(e+``,n),s,c=-1,l=o.length;if(arguments.length<2){for(;++c<l;)if((s=(e=o[c]).type)&&(s=i(n[s],e.name)))return s}else{if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++c<l;)if(s=(e=o[c]).type)n[s]=a(n[s],e.name,t);else if(t==null)for(s in n)n[s]=a(n[s],e.name,null);return this}},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new n(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function i(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function a(t,n,r){for(var i=0,a=t.length;i<a;++i)if(t[i].name===n){t[i]=e,t=t.slice(0,i).concat(t.slice(i+1));break}return r!=null&&t.push({name:n,value:r}),t}var o={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function s(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),o.hasOwnProperty(t)?{space:o[t],local:e}:e}function c(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function l(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function u(e){var t=s(e);return(t.local?l:c)(t)}function d(){}function f(e){return e==null?d:function(){return this.querySelector(e)}}function p(e){typeof e!=`function`&&(e=f(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new w(r,this._parents)}function m(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function h(){return[]}function g(e){return e==null?h:function(){return this.querySelectorAll(e)}}function _(e){return function(){return m(e.apply(this,arguments))}}function v(e){e=typeof e==`function`?_(e):g(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new w(r,i)}function y(e){return function(){return this.matches(e)}}function b(e){return function(t){return t.matches(e)}}var x=Array.prototype.find;function ee(e){return function(){return x.call(this.children,e)}}function S(){return this.firstElementChild}function te(e){return this.select(e==null?S:ee(typeof e==`function`?e:b(e)))}var ne=Array.prototype.filter;function re(){return Array.from(this.children)}function ie(e){return function(){return ne.call(this.children,e)}}function ae(e){return this.selectAll(e==null?re:ie(typeof e==`function`?e:b(e)))}function oe(e){typeof e!=`function`&&(e=y(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new w(r,this._parents)}function se(e){return Array(e.length)}function ce(){return new w(this._enter||this._groups.map(se),this._parents)}function le(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}le.prototype={constructor:le,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function ue(e){return function(){return e}}function de(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new le(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function fe(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new le(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function pe(e){return e.__data__}function me(e,t){if(!arguments.length)return Array.from(this,pe);var n=t?fe:de,r=this._parents,i=this._groups;typeof e!=`function`&&(e=ue(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=he(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new w(o,r),o._enter=s,o._exit=c,o}function he(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function ge(){return new w(this._exit||this._groups.map(se),this._parents)}function _e(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function ve(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new w(s,this._parents)}function ye(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function be(e){e||=xe;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new w(i,this._parents).order()}function xe(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Se(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Ce(){return Array.from(this)}function we(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function Te(){let e=0;for(let t of this)++e;return e}function Ee(){return!this.node()}function De(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function Oe(e){return function(){this.removeAttribute(e)}}function ke(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ae(e,t){return function(){this.setAttribute(e,t)}}function je(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Me(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Ne(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Pe(e,t){var n=s(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?ke:Oe:typeof t==`function`?n.local?Ne:Me:n.local?je:Ae)(n,t))}function Fe(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Ie(e){return function(){this.style.removeProperty(e)}}function Le(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Re(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function ze(e,t,n){return arguments.length>1?this.each((t==null?Ie:typeof t==`function`?Re:Le)(e,t,n??``)):C(this.node(),e)}function C(e,t){return e.style.getPropertyValue(t)||Fe(e).getComputedStyle(e,null).getPropertyValue(t)}function Be(e){return function(){delete this[e]}}function Ve(e,t){return function(){this[e]=t}}function He(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Ue(e,t){return arguments.length>1?this.each((t==null?Be:typeof t==`function`?He:Ve)(e,t)):this.node()[e]}function We(e){return e.trim().split(/^|\s+/)}function Ge(e){return e.classList||new Ke(e)}function Ke(e){this._node=e,this._names=We(e.getAttribute(`class`)||``)}Ke.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function qe(e,t){for(var n=Ge(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function Je(e,t){for(var n=Ge(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Ye(e){return function(){qe(this,e)}}function Xe(e){return function(){Je(this,e)}}function Ze(e,t){return function(){(t.apply(this,arguments)?qe:Je)(this,e)}}function Qe(e,t){var n=We(e+``);if(arguments.length<2){for(var r=Ge(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?Ze:t?Ye:Xe)(n,t))}function $e(){this.textContent=``}function et(e){return function(){this.textContent=e}}function tt(e){return function(){var t=e.apply(this,arguments);this.textContent=t??``}}function nt(e){return arguments.length?this.each(e==null?$e:(typeof e==`function`?tt:et)(e)):this.node().textContent}function rt(){this.innerHTML=``}function it(e){return function(){this.innerHTML=e}}function at(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??``}}function ot(e){return arguments.length?this.each(e==null?rt:(typeof e==`function`?at:it)(e)):this.node().innerHTML}function st(){this.nextSibling&&this.parentNode.appendChild(this)}function ct(){return this.each(st)}function lt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ut(){return this.each(lt)}function dt(e){var t=typeof e==`function`?e:u(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function ft(){return null}function pt(e,t){var n=typeof e==`function`?e:u(e),r=t==null?ft:typeof t==`function`?t:f(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function mt(){var e=this.parentNode;e&&e.removeChild(this)}function ht(){return this.each(mt)}function gt(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function _t(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function vt(e){return this.select(e?_t:gt)}function yt(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function bt(e){return function(t){e.call(this,t,this.__data__)}}function xt(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function St(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function Ct(e,t,n){return function(){var r=this.__on,i,a=bt(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function wt(e,t,n){var r=xt(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}}else{for(s=t?Ct:St,i=0;i<a;++i)this.each(s(r[i],t,n));return this}}function Tt(e,t,n){var r=Fe(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Et(e,t){return function(){return Tt(this,e,t)}}function Dt(e,t){return function(){return Tt(this,e,t.apply(this,arguments))}}function Ot(e,t){return this.each((typeof t==`function`?Dt:Et)(e,t))}function*kt(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var At=[null];function w(e,t){this._groups=e,this._parents=t}function T(){return new w([[document.documentElement]],At)}function jt(){return this}w.prototype=T.prototype={constructor:w,select:p,selectAll:v,selectChild:te,selectChildren:ae,filter:oe,data:me,enter:ce,exit:ge,join:_e,merge:ve,selection:jt,order:ye,sort:be,call:Se,nodes:Ce,node:we,size:Te,empty:Ee,each:De,attr:Pe,style:ze,property:Ue,classed:Qe,text:nt,html:ot,raise:ct,lower:ut,append:dt,insert:pt,remove:ht,clone:vt,datum:yt,on:wt,dispatch:Ot,[Symbol.iterator]:kt};function E(e){return typeof e==`string`?new w([[document.querySelector(e)]],[document.documentElement]):new w([[e]],At)}function Mt(e){let t;for(;t=e.sourceEvent;)e=t;return e}function D(e,t){if(e=Mt(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}var Nt={passive:!1},O={capture:!0,passive:!1};function Pt(e){e.stopImmediatePropagation()}function k(e){e.preventDefault(),e.stopImmediatePropagation()}function Ft(e){var t=e.document.documentElement,n=E(e).on(`dragstart.drag`,k,O);`onselectstart`in t?n.on(`selectstart.drag`,k,O):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect=`none`)}function It(e,t){var n=e.document.documentElement,r=E(e).on(`dragstart.drag`,null);t&&(r.on(`click.drag`,k,O),setTimeout(function(){r.on(`click.drag`,null)},0)),`onselectstart`in n?r.on(`selectstart.drag`,null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Lt=e=>()=>e;function Rt(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:a,x:o,y:s,dx:c,dy:l,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:u}})}Rt.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function zt(e){return!e.ctrlKey&&!e.button}function Bt(){return this.parentNode}function Vt(e,t){return t??{x:e.x,y:e.y}}function Ht(){return navigator.maxTouchPoints||`ontouchstart`in this}function Ut(){var e=zt,n=Bt,r=Vt,i=Ht,a={},o=t(`start`,`drag`,`end`),s=0,c,l,u,d,f=0;function p(e){e.on(`mousedown.drag`,m).filter(i).on(`touchstart.drag`,_).on(`touchmove.drag`,v,Nt).on(`touchend.drag touchcancel.drag`,y).style(`touch-action`,`none`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}function m(t,r){if(!d&&e.call(this,t,r)){var i=b(this,n.call(this,t,r),t,r,`mouse`);i&&(E(t.view).on(`mousemove.drag`,h,O).on(`mouseup.drag`,g,O),Ft(t.view),Pt(t),u=!1,c=t.clientX,l=t.clientY,i(`start`,t))}}function h(e){if(k(e),!u){var t=e.clientX-c,n=e.clientY-l;u=t*t+n*n>f}a.mouse(`drag`,e)}function g(e){E(e.view).on(`mousemove.drag mouseup.drag`,null),It(e.view,u),k(e),a.mouse(`end`,e)}function _(t,r){if(e.call(this,t,r))for(var i=t.changedTouches,a=n.call(this,t,r),o=i.length,s=0,c;s<o;++s)(c=b(this,a,t,r,i[s].identifier,i[s]))&&(Pt(t),c(`start`,t,i[s]))}function v(e){for(var t=e.changedTouches,n=t.length,r=0,i;r<n;++r)(i=a[t[r].identifier])&&(k(e),i(`drag`,e,t[r]))}function y(e){var t=e.changedTouches,n=t.length,r,i;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),r=0;r<n;++r)(i=a[t[r].identifier])&&(Pt(e),i(`end`,e,t[r]))}function b(e,t,n,i,c,l){var u=o.copy(),d=D(l||n,t),f,m,h;if((h=r.call(e,new Rt(`beforestart`,{sourceEvent:n,target:p,identifier:c,active:s,x:d[0],y:d[1],dx:0,dy:0,dispatch:u}),i))!=null)return f=h.x-d[0]||0,m=h.y-d[1]||0,function n(r,o,l){var g=d,_;switch(r){case`start`:a[c]=n,_=s++;break;case`end`:delete a[c],--s;case`drag`:d=D(l||o,t),_=s}u.call(r,e,new Rt(r,{sourceEvent:o,subject:h,target:p,identifier:c,active:_,x:d[0]+f,y:d[1]+m,dx:d[0]-g[0],dy:d[1]-g[1],dispatch:u}),i)}}return p.filter=function(t){return arguments.length?(e=typeof t==`function`?t:Lt(!!t),p):e},p.container=function(e){return arguments.length?(n=typeof e==`function`?e:Lt(e),p):n},p.subject=function(e){return arguments.length?(r=typeof e==`function`?e:Lt(e),p):r},p.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:Lt(!!e),p):i},p.on=function(){var e=o.on.apply(o,arguments);return e===o?p:e},p.clickDistance=function(e){return arguments.length?(f=(e=+e)*e,p):Math.sqrt(f)},p}function Wt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Gt(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function A(){}var j=.7,Kt=1/j,M=`\\s*([+-]?\\d+)\\s*`,N=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,P=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,qt=/^#([0-9a-f]{3,8})$/,Jt=RegExp(`^rgb\\(${M},${M},${M}\\)$`),Yt=RegExp(`^rgb\\(${P},${P},${P}\\)$`),Xt=RegExp(`^rgba\\(${M},${M},${M},${N}\\)$`),Zt=RegExp(`^rgba\\(${P},${P},${P},${N}\\)$`),Qt=RegExp(`^hsl\\(${N},${P},${P}\\)$`),$t=RegExp(`^hsla\\(${N},${P},${P},${N}\\)$`),en={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};Wt(A,F,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:tn,formatHex:tn,formatHex8:nn,formatHsl:rn,formatRgb:an,toString:an});function tn(){return this.rgb().formatHex()}function nn(){return this.rgb().formatHex8()}function rn(){return hn(this).formatHsl()}function an(){return this.rgb().formatRgb()}function F(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=qt.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?on(t):n===3?new I(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?sn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?sn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Jt.exec(e))?new I(t[1],t[2],t[3],1):(t=Yt.exec(e))?new I(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Xt.exec(e))?sn(t[1],t[2],t[3],t[4]):(t=Zt.exec(e))?sn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Qt.exec(e))?mn(t[1],t[2]/100,t[3]/100,1):(t=$t.exec(e))?mn(t[1],t[2]/100,t[3]/100,t[4]):en.hasOwnProperty(e)?on(en[e]):e===`transparent`?new I(NaN,NaN,NaN,0):null}function on(e){return new I(e>>16&255,e>>8&255,e&255,1)}function sn(e,t,n,r){return r<=0&&(e=t=n=NaN),new I(e,t,n,r)}function cn(e){return e instanceof A||(e=F(e)),e?(e=e.rgb(),new I(e.r,e.g,e.b,e.opacity)):new I}function ln(e,t,n,r){return arguments.length===1?cn(e):new I(e,t,n,r??1)}function I(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Wt(I,ln,Gt(A,{brighter(e){return e=e==null?Kt:Kt**+e,new I(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?j:j**+e,new I(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new I(L(this.r),L(this.g),L(this.b),pn(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:un,formatHex:un,formatHex8:dn,formatRgb:fn,toString:fn}));function un(){return`#${R(this.r)}${R(this.g)}${R(this.b)}`}function dn(){return`#${R(this.r)}${R(this.g)}${R(this.b)}${R((isNaN(this.opacity)?1:this.opacity)*255)}`}function fn(){let e=pn(this.opacity);return`${e===1?`rgb(`:`rgba(`}${L(this.r)}, ${L(this.g)}, ${L(this.b)}${e===1?`)`:`, ${e})`}`}function pn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function L(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function R(e){return e=L(e),(e<16?`0`:``)+e.toString(16)}function mn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new z(e,t,n,r)}function hn(e){if(e instanceof z)return new z(e.h,e.s,e.l,e.opacity);if(e instanceof A||(e=F(e)),!e)return new z;if(e instanceof z)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new z(o,s,c,e.opacity)}function gn(e,t,n,r){return arguments.length===1?hn(e):new z(e,t,n,r??1)}function z(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Wt(z,gn,Gt(A,{brighter(e){return e=e==null?Kt:Kt**+e,new z(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?j:j**+e,new z(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new I(yn(e>=240?e-240:e+120,i,r),yn(e,i,r),yn(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new z(_n(this.h),vn(this.s),vn(this.l),pn(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(){let e=pn(this.opacity);return`${e===1?`hsl(`:`hsla(`}${_n(this.h)}, ${vn(this.s)*100}%, ${vn(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function _n(e){return e=(e||0)%360,e<0?e+360:e}function vn(e){return Math.max(0,Math.min(1,e||0))}function yn(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var bn=e=>()=>e;function xn(e,t){return function(n){return e+n*t}}function Sn(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function Cn(e){return(e=+e)==1?wn:function(t,n){return n-t?Sn(t,n,e):bn(isNaN(t)?n:t)}}function wn(e,t){var n=t-e;return n?xn(e,n):bn(isNaN(e)?t:e)}var Tn=(function e(t){var n=Cn(t);function r(e,t){var r=n((e=ln(e)).r,(t=ln(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=wn(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function B(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var En=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Dn=new RegExp(En.source,`g`);function On(e){return function(){return e}}function kn(e){return function(t){return e(t)+``}}function An(e,t){var n=En.lastIndex=Dn.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=En.exec(e))&&(i=Dn.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:B(r,i)})),n=Dn.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?kn(c[0].x):On(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}var jn=180/Math.PI,Mn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Nn(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*jn,skewX:Math.atan(c)*jn,scaleX:o,scaleY:s}}var Pn;function Fn(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?Mn:Nn(t.a,t.b,t.c,t.d,t.e,t.f)}function In(e){return e==null||(Pn||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),Pn.setAttribute(`transform`,e),!(e=Pn.transform.baseVal.consolidate()))?Mn:(e=e.matrix,Nn(e.a,e.b,e.c,e.d,e.e,e.f))}function Ln(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:B(e,i)},{i:c-2,x:B(r,a)})}else(i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:B(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:B(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:B(e,n)},{i:s-2,x:B(t,r)})}else(n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var Rn=Ln(Fn,`px, `,`px)`,`deg)`),zn=Ln(In,`, `,`)`,`)`),Bn=1e-12;function Vn(e){return((e=Math.exp(e))+1/e)/2}function Hn(e){return((e=Math.exp(e))-1/e)/2}function Un(e){return((e=Math.exp(2*e))-1)/(e+1)}var Wn=(function e(t,n,r){function i(e,i){var a=e[0],o=e[1],s=e[2],c=i[0],l=i[1],u=i[2],d=c-a,f=l-o,p=d*d+f*f,m,h;if(p<Bn)h=Math.log(u/s)/t,m=function(e){return[a+e*d,o+e*f,s*Math.exp(t*e*h)]};else{var g=Math.sqrt(p),_=(u*u-s*s+r*p)/(2*s*n*g),v=(u*u-s*s-r*p)/(2*u*n*g),y=Math.log(Math.sqrt(_*_+1)-_);h=(Math.log(Math.sqrt(v*v+1)-v)-y)/t,m=function(e){var r=e*h,i=Vn(y),c=s/(n*g)*(i*Un(t*r+y)-Hn(y));return[a+c*d,o+c*f,s*i/Vn(t*r+y)]}}return m.duration=h*1e3*t/Math.SQRT2,m}return i.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},i})(Math.SQRT2,2,4),V=0,Gn=0,Kn=0,qn=1e3,Jn,H,Yn=0,U=0,Xn=0,W=typeof performance==`object`&&performance.now?performance:Date,Zn=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Qn(){return U||=(Zn($n),W.now()+Xn)}function $n(){U=0}function er(){this._call=this._time=this._next=null}er.prototype=tr.prototype={constructor:er,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?Qn():+n)+(t==null?0:+t),!this._next&&H!==this&&(H?H._next=this:Jn=this,H=this),this._call=e,this._time=n,or()},stop:function(){this._call&&(this._call=null,this._time=1/0,or())}};function tr(e,t,n){var r=new er;return r.restart(e,t,n),r}function nr(){Qn(),++V;for(var e=Jn,t;e;)(t=U-e._time)>=0&&e._call.call(void 0,t),e=e._next;--V}function rr(){U=(Yn=W.now())+Xn,V=Gn=0;try{nr()}finally{V=0,ar(),U=0}}function ir(){var e=W.now(),t=e-Yn;t>qn&&(Xn-=t,Yn=e)}function ar(){for(var e,t=Jn,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Jn=n);H=e,or(r)}function or(e){V||(Gn&&=clearTimeout(Gn),e-U>24?(e<1/0&&(Gn=setTimeout(rr,e-W.now()-Xn)),Kn&&=clearInterval(Kn)):(Kn||=(Yn=W.now(),setInterval(ir,qn)),V=1,Zn(rr)))}function sr(e,t,n){var r=new er;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var cr=t(`start`,`end`,`cancel`,`interrupt`),lr=[];function ur(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;fr(e,n,{name:t,index:r,group:i,on:cr,tween:lr,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function dr(e,t){var n=K(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function G(e,t){var n=K(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function K(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function fr(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=tr(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==1)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===3)return sr(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=6,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(sr(function(){n.state===3&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===2){for(n.state=3,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===5&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function pr(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n)(r=n[o]).name===t?(i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]):a=!1;a&&delete e.__transition}}function mr(e){return this.each(function(){pr(this,e)})}function hr(e,t){var n,r;return function(){var i=G(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function gr(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=G(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function _r(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=K(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?hr:gr)(n,e,t))}function vr(e,t,n){var r=e._id;return e.each(function(){var e=G(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return K(e,r).value[t]}}function yr(e,t){var n;return(typeof t==`number`?B:t instanceof F?Tn:(n=F(t))?(t=n,Tn):An)(e,t)}function br(e){return function(){this.removeAttribute(e)}}function xr(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Sr(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function Cr(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function wr(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Tr(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Er(e,t){var n=s(e),r=n===`transform`?zn:yr;return this.attrTween(e,typeof t==`function`?(n.local?Tr:wr)(n,r,vr(this,`attr.`+e,t)):t==null?(n.local?xr:br)(n):(n.local?Cr:Sr)(n,r,t))}function Dr(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Or(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function kr(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Or(e,i)),n}return i._value=t,i}function Ar(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Dr(e,i)),n}return i._value=t,i}function jr(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=s(e);return this.tween(n,(r.local?kr:Ar)(r,t))}function Mr(e,t){return function(){dr(this,e).delay=+t.apply(this,arguments)}}function Nr(e,t){return t=+t,function(){dr(this,e).delay=t}}function Pr(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Mr:Nr)(t,e)):K(this.node(),t).delay}function Fr(e,t){return function(){G(this,e).duration=+t.apply(this,arguments)}}function Ir(e,t){return t=+t,function(){G(this,e).duration=t}}function Lr(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Fr:Ir)(t,e)):K(this.node(),t).duration}function Rr(e,t){if(typeof t!=`function`)throw Error();return function(){G(this,e).ease=t}}function zr(e){var t=this._id;return arguments.length?this.each(Rr(t,e)):K(this.node(),t).ease}function Br(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();G(this,e).ease=n}}function Vr(e){if(typeof e!=`function`)throw Error();return this.each(Br(this._id,e))}function Hr(e){typeof e!=`function`&&(e=y(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new q(r,this._parents,this._name,this._id)}function Ur(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new q(o,this._parents,this._name,this._id)}function Wr(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function Gr(e,t,n){var r,i,a=Wr(t)?dr:G;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function Kr(e,t){var n=this._id;return arguments.length<2?K(this.node(),n).on.on(e):this.each(Gr(n,e,t))}function qr(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Jr(){return this.on(`end.remove`,qr(this._id))}function Yr(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=f(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,p=0;p<c;++p)(u=s[p])&&(d=e.call(u,u.__data__,p,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[p]=d,ur(l[p],t,n,p,l,K(u,n)));return new q(a,this._parents,t,n)}function Xr(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=g(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=K(u,n),h=0,_=f.length;h<_;++h)(p=f[h])&&ur(p,t,n,h,f,m);a.push(f),o.push(u)}return new q(a,o,t,n)}var Zr=T.prototype.constructor;function Qr(){return new Zr(this._groups,this._parents)}function $r(e,t){var n,r,i;return function(){var a=C(this,e),o=(this.style.removeProperty(e),C(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function ei(e){return function(){this.style.removeProperty(e)}}function ti(e,t,n){var r,i=n+``,a;return function(){var o=C(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function ni(e,t,n){var r,i,a;return function(){var o=C(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),C(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function ri(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=G(this,e),l=c.on,u=c.value[a]==null?s||=ei(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function ii(e,t,n){var r=(e+=``)==`transform`?Rn:yr;return t==null?this.styleTween(e,$r(e,r)).on(`end.style.`+e,ei(e)):typeof t==`function`?this.styleTween(e,ni(e,r,vr(this,`style.`+e,t))).each(ri(this._id,e)):this.styleTween(e,ti(e,r,t),n).on(`end.style.`+e,null)}function ai(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function oi(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&ai(e,a,n)),r}return a._value=t,a}function si(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,oi(e,t,n??``))}function ci(e){return function(){this.textContent=e}}function li(e){return function(){var t=e(this);this.textContent=t??``}}function ui(e){return this.tween(`text`,typeof e==`function`?li(vr(this,`text`,e)):ci(e==null?``:e+``))}function di(e){return function(t){this.textContent=e.call(this,t)}}function fi(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&di(r)),t}return r._value=e,r}function pi(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,fi(e))}function mi(){for(var e=this._name,t=this._id,n=_i(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=K(c,t);ur(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new q(r,this._parents,e,n)}function hi(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=G(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var gi=0;function q(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function _i(){return++gi}var J=T.prototype;q.prototype={constructor:q,select:Yr,selectAll:Xr,selectChild:J.selectChild,selectChildren:J.selectChildren,filter:Hr,merge:Ur,selection:Qr,transition:mi,call:J.call,nodes:J.nodes,node:J.node,size:J.size,empty:J.empty,each:J.each,on:Kr,attr:Er,attrTween:jr,style:ii,styleTween:si,text:ui,textTween:pi,remove:Jr,tween:_r,delay:Pr,duration:Lr,ease:zr,easeVarying:Vr,end:hi,[Symbol.iterator]:J[Symbol.iterator]};function vi(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var yi={time:null,delay:0,duration:250,ease:vi};function bi(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function xi(e){var t,n;e instanceof q?(t=e._id,e=e._name):(t=_i(),(n=yi).time=Qn(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&ur(c,e,t,l,o,n||bi(c,t));return new q(r,this._parents,e,t)}T.prototype.interrupt=mr,T.prototype.transition=xi;var{abs:Si,max:Ci,min:wi}=Math;[`w`,`e`].map(Ti),[`n`,`s`].map(Ti),[`n`,`w`,`e`,`s`,`nw`,`ne`,`sw`,`se`].map(Ti);function Ti(e){return{type:e}}function Ei(e,t){var n,r=1;e??=0,t??=0;function i(){var i,a=n.length,o,s=0,c=0;for(i=0;i<a;++i)o=n[i],s+=o.x,c+=o.y;for(s=(s/a-e)*r,c=(c/a-t)*r,i=0;i<a;++i)o=n[i],o.x-=s,o.y-=c}return i.initialize=function(e){n=e},i.x=function(t){return arguments.length?(e=+t,i):e},i.y=function(e){return arguments.length?(t=+e,i):t},i.strength=function(e){return arguments.length?(r=+e,i):r},i}function Di(e){let t=+this._x.call(null,e),n=+this._y.call(null,e);return Oi(this.cover(t,n),t,n,e)}function Oi(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,a=e._root,o={data:r},s=e._x0,c=e._y0,l=e._x1,u=e._y1,d,f,p,m,h,g,_,v;if(!a)return e._root=o,e;for(;a.length;)if((h=t>=(d=(s+l)/2))?s=d:l=d,(g=n>=(f=(c+u)/2))?c=f:u=f,i=a,!(a=a[_=g<<1|h]))return i[_]=o,e;if(p=+e._x.call(null,a.data),m=+e._y.call(null,a.data),t===p&&n===m)return o.next=a,i?i[_]=o:e._root=o,e;do i=i?i[_]=[,,,,]:e._root=[,,,,],(h=t>=(d=(s+l)/2))?s=d:l=d,(g=n>=(f=(c+u)/2))?c=f:u=f;while((_=g<<1|h)==(v=(m>=f)<<1|p>=d));return i[v]=a,i[_]=o,e}function ki(e){var t,n,r=e.length,i,a,o=Array(r),s=Array(r),c=1/0,l=1/0,u=-1/0,d=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,t=e[n]))||isNaN(a=+this._y.call(null,t))||(o[n]=i,s[n]=a,i<c&&(c=i),i>u&&(u=i),a<l&&(l=a),a>d&&(d=a));if(c>u||l>d)return this;for(this.cover(c,l).cover(u,d),n=0;n<r;++n)Oi(this,o[n],s[n],e[n]);return this}function Ai(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,a=(r=Math.floor(t))+1;else{for(var o=i-n||1,s=this._root,c,l;n>e||e>=i||r>t||t>=a;)switch(l=(t<r)<<1|e<n,c=[,,,,],c[l]=s,s=c,o*=2,l){case 0:i=n+o,a=r+o;break;case 1:n=i-o,a=r+o;break;case 2:i=n+o,r=a-o;break;case 3:n=i-o,r=a-o}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this}function ji(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function Mi(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Y(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function Ni(e,t,n){var r,i=this._x0,a=this._y0,o,s,c,l,u=this._x1,d=this._y1,f=[],p=this._root,m,h;for(p&&f.push(new Y(p,i,a,u,d)),n==null?n=1/0:(i=e-n,a=t-n,u=e+n,d=t+n,n*=n);m=f.pop();)if(!(!(p=m.node)||(o=m.x0)>u||(s=m.y0)>d||(c=m.x1)<i||(l=m.y1)<a)){if(p.length){var g=(o+c)/2,_=(s+l)/2;f.push(new Y(p[3],g,_,c,l),new Y(p[2],o,_,g,l),new Y(p[1],g,s,c,_),new Y(p[0],o,s,g,_)),(h=(t>=_)<<1|e>=g)&&(m=f[f.length-1],f[f.length-1]=f[f.length-1-h],f[f.length-1-h]=m)}else{var v=e-+this._x.call(null,p.data),y=t-+this._y.call(null,p.data),b=v*v+y*y;if(b<n){var x=Math.sqrt(n=b);i=e-x,a=t-x,u=e+x,d=t+x,r=p.data}}}return r}function Pi(e){if(isNaN(u=+this._x.call(null,e))||isNaN(d=+this._y.call(null,e)))return this;var t,n=this._root,r,i,a,o=this._x0,s=this._y0,c=this._x1,l=this._y1,u,d,f,p,m,h,g,_;if(!n)return this;if(n.length)for(;;){if((m=u>=(f=(o+c)/2))?o=f:c=f,(h=d>=(p=(s+l)/2))?s=p:l=p,t=n,!(n=n[g=h<<1|m]))return this;if(!n.length)break;(t[g+1&3]||t[g+2&3]||t[g+3&3])&&(r=t,_=g)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(a=n.next)&&delete n.next,i?(a?i.next=a:delete i.next,this):t?(a?t[g]=a:delete t[g],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[_]=n:this._root=n),this):(this._root=a,this)}function Fi(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function Ii(){return this._root}function Li(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function Ri(e){var t=[],n,r=this._root,i,a,o,s,c;for(r&&t.push(new Y(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(r=n.node,a=n.x0,o=n.y0,s=n.x1,c=n.y1)&&r.length){var l=(a+s)/2,u=(o+c)/2;(i=r[3])&&t.push(new Y(i,l,u,s,c)),(i=r[2])&&t.push(new Y(i,a,u,l,c)),(i=r[1])&&t.push(new Y(i,l,o,s,u)),(i=r[0])&&t.push(new Y(i,a,o,l,u))}return this}function zi(e){var t=[],n=[],r;for(this._root&&t.push(new Y(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var i=r.node;if(i.length){var a,o=r.x0,s=r.y0,c=r.x1,l=r.y1,u=(o+c)/2,d=(s+l)/2;(a=i[0])&&t.push(new Y(a,o,s,u,d)),(a=i[1])&&t.push(new Y(a,u,s,c,d)),(a=i[2])&&t.push(new Y(a,o,d,u,l)),(a=i[3])&&t.push(new Y(a,u,d,c,l))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this}function Bi(e){return e[0]}function Vi(e){return arguments.length?(this._x=e,this):this._x}function Hi(e){return e[1]}function Ui(e){return arguments.length?(this._y=e,this):this._y}function Wi(e,t,n){var r=new Gi(t??Bi,n??Hi,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function Gi(e,t,n,r,i,a){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function Ki(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var X=Wi.prototype=Gi.prototype;X.copy=function(){var e=new Gi(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,r;if(!t)return e;if(!t.length)return e._root=Ki(t),e;for(n=[{source:t,target:e._root=[,,,,]}];t=n.pop();)for(var i=0;i<4;++i)(r=t.source[i])&&(r.length?n.push({source:r,target:t.target[i]=[,,,,]}):t.target[i]=Ki(r));return e},X.add=Di,X.addAll=ki,X.cover=Ai,X.data=ji,X.extent=Mi,X.find=Ni,X.remove=Pi,X.removeAll=Fi,X.root=Ii,X.size=Li,X.visit=Ri,X.visitAfter=zi,X.x=Vi,X.y=Ui;function Z(e){return function(){return e}}function Q(e){return(e()-.5)*1e-6}function qi(e){return e.x+e.vx}function Ji(e){return e.y+e.vy}function Yi(e){var t,n,r,i=1,a=1;typeof e!=`function`&&(e=Z(e==null?1:+e));function o(){for(var e,o=t.length,c,l,u,d,f,p,m=0;m<a;++m)for(c=Wi(t,qi,Ji).visitAfter(s),e=0;e<o;++e)l=t[e],f=n[l.index],p=f*f,u=l.x+l.vx,d=l.y+l.vy,c.visit(h);function h(e,t,n,a,o){var s=e.data,c=e.r,m=f+c;if(s){if(s.index>l.index){var h=u-s.x-s.vx,g=d-s.y-s.vy,_=h*h+g*g;_<m*m&&(h===0&&(h=Q(r),_+=h*h),g===0&&(g=Q(r),_+=g*g),_=(m-(_=Math.sqrt(_)))/_*i,l.vx+=(h*=_)*(m=(c*=c)/(p+c)),l.vy+=(g*=_)*m,s.vx-=h*(m=1-m),s.vy-=g*m)}}else return t>u+m||a<u-m||n>d+m||o<d-m}}function s(e){if(e.data)return e.r=n[e.data.index];for(var t=e.r=0;t<4;++t)e[t]&&e[t].r>e.r&&(e.r=e[t].r)}function c(){if(t){var r,i=t.length,a;for(n=Array(i),r=0;r<i;++r)a=t[r],n[a.index]=+e(a,r,t)}}return o.initialize=function(e,n){t=e,r=n,c()},o.iterations=function(e){return arguments.length?(a=+e,o):a},o.strength=function(e){return arguments.length?(i=+e,o):i},o.radius=function(t){return arguments.length?(e=typeof t==`function`?t:Z(+t),c(),o):e},o}function Xi(e){return e.index}function Zi(e,t){var n=e.get(t);if(!n)throw Error(`node not found: `+t);return n}function Qi(e){var t=Xi,n=d,r,i=Z(30),a,o,s,c,l,u=1;e??=[];function d(e){return 1/Math.min(s[e.source.index],s[e.target.index])}function f(t){for(var n=0,i=e.length;n<u;++n)for(var o=0,s,d,f,p,m,h,g;o<i;++o)s=e[o],d=s.source,f=s.target,p=f.x+f.vx-d.x-d.vx||Q(l),m=f.y+f.vy-d.y-d.vy||Q(l),h=Math.sqrt(p*p+m*m),h=(h-a[o])/h*t*r[o],p*=h,m*=h,f.vx-=p*(g=c[o]),f.vy-=m*g,d.vx+=p*(g=1-g),d.vy+=m*g}function p(){if(o){var n,i=o.length,l=e.length,u=new Map(o.map((e,n)=>[t(e,n,o),e])),d;for(n=0,s=Array(i);n<l;++n)d=e[n],d.index=n,typeof d.source!=`object`&&(d.source=Zi(u,d.source)),typeof d.target!=`object`&&(d.target=Zi(u,d.target)),s[d.source.index]=(s[d.source.index]||0)+1,s[d.target.index]=(s[d.target.index]||0)+1;for(n=0,c=Array(l);n<l;++n)d=e[n],c[n]=s[d.source.index]/(s[d.source.index]+s[d.target.index]);r=Array(l),m(),a=Array(l),h()}}function m(){if(o)for(var t=0,i=e.length;t<i;++t)r[t]=+n(e[t],t,e)}function h(){if(o)for(var t=0,n=e.length;t<n;++t)a[t]=+i(e[t],t,e)}return f.initialize=function(e,t){o=e,l=t,p()},f.links=function(t){return arguments.length?(e=t,p(),f):e},f.id=function(e){return arguments.length?(t=e,f):t},f.iterations=function(e){return arguments.length?(u=+e,f):u},f.strength=function(e){return arguments.length?(n=typeof e==`function`?e:Z(+e),m(),f):n},f.distance=function(e){return arguments.length?(i=typeof e==`function`?e:Z(+e),h(),f):i},f}var $i=1664525,ea=1013904223,ta=4294967296;function na(){let e=1;return()=>(e=($i*e+ea)%ta)/ta}function ra(e){return e.x}function ia(e){return e.y}var aa=10,oa=Math.PI*(3-Math.sqrt(5));function sa(e){var n,r=1,i=.001,a=1-i**(1/300),o=0,s=.6,c=new Map,l=tr(f),u=t(`tick`,`end`),d=na();e??=[];function f(){p(),u.call(`tick`,n),r<i&&(l.stop(),u.call(`end`,n))}function p(t){var i,l=e.length,u;t===void 0&&(t=1);for(var d=0;d<t;++d)for(r+=(o-r)*a,c.forEach(function(e){e(r)}),i=0;i<l;++i)u=e[i],u.fx==null?u.x+=u.vx*=s:(u.x=u.fx,u.vx=0),u.fy==null?u.y+=u.vy*=s:(u.y=u.fy,u.vy=0);return n}function m(){for(var t=0,n=e.length,r;t<n;++t){if(r=e[t],r.index=t,r.fx!=null&&(r.x=r.fx),r.fy!=null&&(r.y=r.fy),isNaN(r.x)||isNaN(r.y)){var i=aa*Math.sqrt(.5+t),a=t*oa;r.x=i*Math.cos(a),r.y=i*Math.sin(a)}(isNaN(r.vx)||isNaN(r.vy))&&(r.vx=r.vy=0)}}function h(t){return t.initialize&&t.initialize(e,d),t}return m(),n={tick:p,restart:function(){return l.restart(f),n},stop:function(){return l.stop(),n},nodes:function(t){return arguments.length?(e=t,m(),c.forEach(h),n):e},alpha:function(e){return arguments.length?(r=+e,n):r},alphaMin:function(e){return arguments.length?(i=+e,n):i},alphaDecay:function(e){return arguments.length?(a=+e,n):+a},alphaTarget:function(e){return arguments.length?(o=+e,n):o},velocityDecay:function(e){return arguments.length?(s=1-e,n):1-s},randomSource:function(e){return arguments.length?(d=e,c.forEach(h),n):d},force:function(e,t){return arguments.length>1?(t==null?c.delete(e):c.set(e,h(t)),n):c.get(e)},find:function(t,n,r){var i=0,a=e.length,o,s,c,l,u;for(r==null?r=1/0:r*=r,i=0;i<a;++i)l=e[i],o=t-l.x,s=n-l.y,c=o*o+s*s,c<r&&(u=l,r=c);return u},on:function(e,t){return arguments.length>1?(u.on(e,t),n):u.on(e)}}}function ca(){var e,t,n,r,i=Z(-30),a,o=1,s=1/0,c=.81;function l(n){var i,a=e.length,o=Wi(e,ra,ia).visitAfter(d);for(r=n,i=0;i<a;++i)t=e[i],o.visit(f)}function u(){if(e){var t,n=e.length,r;for(a=Array(n),t=0;t<n;++t)r=e[t],a[r.index]=+i(r,t,e)}}function d(e){var t=0,n,r,i=0,o,s,c;if(e.length){for(o=s=c=0;c<4;++c)(n=e[c])&&(r=Math.abs(n.value))&&(t+=n.value,i+=r,o+=r*n.x,s+=r*n.y);e.x=o/i,e.y=s/i}else{n=e,n.x=n.data.x,n.y=n.data.y;do t+=a[n.data.index];while(n=n.next)}e.value=t}function f(e,i,l,u){if(!e.value)return!0;var d=e.x-t.x,f=e.y-t.y,p=u-i,m=d*d+f*f;if(p*p/c<m)return m<s&&(d===0&&(d=Q(n),m+=d*d),f===0&&(f=Q(n),m+=f*f),m<o&&(m=Math.sqrt(o*m)),t.vx+=d*e.value*r/m,t.vy+=f*e.value*r/m),!0;if(!(e.length||m>=s)){(e.data!==t||e.next)&&(d===0&&(d=Q(n),m+=d*d),f===0&&(f=Q(n),m+=f*f),m<o&&(m=Math.sqrt(o*m)));do e.data!==t&&(p=a[e.data.index]*r/m,t.vx+=d*p,t.vy+=f*p);while(e=e.next)}}return l.initialize=function(t,r){e=t,n=r,u()},l.strength=function(e){return arguments.length?(i=typeof e==`function`?e:Z(+e),u(),l):i},l.distanceMin=function(e){return arguments.length?(o=e*e,l):Math.sqrt(o)},l.distanceMax=function(e){return arguments.length?(s=e*e,l):Math.sqrt(s)},l.theta=function(e){return arguments.length?(c=e*e,l):Math.sqrt(c)},l}var la=e=>()=>e;function ua(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function $(e,t,n){this.k=e,this.x=t,this.y=n}$.prototype={constructor:$,scale:function(e){return e===1?this:new $(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new $(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}};var da=new $(1,0,0);fa.prototype=$.prototype;function fa(e){for(;!e.__zoom;)if(!(e=e.parentNode))return da;return e.__zoom}function pa(e){e.stopImmediatePropagation()}function ma(e){e.preventDefault(),e.stopImmediatePropagation()}function ha(e){return(!e.ctrlKey||e.type===`wheel`)&&!e.button}function ga(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute(`viewBox`)?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function _a(){return this.__zoom||da}function va(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function ya(){return navigator.maxTouchPoints||`ontouchstart`in this}function ba(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function xa(){var e=ha,n=ga,r=ba,i=va,a=ya,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],c=250,l=Wn,u=t(`start`,`zoom`,`end`),d,f,p,m=500,h=150,g=0,_=10;function v(e){e.property(`__zoom`,_a).on(`wheel.zoom`,ne,{passive:!1}).on(`mousedown.zoom`,re).on(`dblclick.zoom`,ie).filter(a).on(`touchstart.zoom`,ae).on(`touchmove.zoom`,oe).on(`touchend.zoom touchcancel.zoom`,se).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}v.transform=function(e,t,n,r){var i=e.selection?e.selection():e;i.property(`__zoom`,_a),e===i?i.interrupt().each(function(){S(this,arguments).event(r).start().zoom(null,typeof t==`function`?t.apply(this,arguments):t).end()}):ee(e,t,n,r)},v.scaleBy=function(e,t,n,r){v.scaleTo(e,function(){return this.__zoom.k*(typeof t==`function`?t.apply(this,arguments):t)},n,r)},v.scaleTo=function(e,t,i,a){v.transform(e,function(){var e=n.apply(this,arguments),a=this.__zoom,o=i==null?x(e):typeof i==`function`?i.apply(this,arguments):i,c=a.invert(o),l=typeof t==`function`?t.apply(this,arguments):t;return r(b(y(a,l),o,c),e,s)},i,a)},v.translateBy=function(e,t,i,a){v.transform(e,function(){return r(this.__zoom.translate(typeof t==`function`?t.apply(this,arguments):t,typeof i==`function`?i.apply(this,arguments):i),n.apply(this,arguments),s)},null,a)},v.translateTo=function(e,t,i,a,o){v.transform(e,function(){var e=n.apply(this,arguments),o=this.__zoom,c=a==null?x(e):typeof a==`function`?a.apply(this,arguments):a;return r(da.translate(c[0],c[1]).scale(o.k).translate(typeof t==`function`?-t.apply(this,arguments):-t,typeof i==`function`?-i.apply(this,arguments):-i),e,s)},a,o)};function y(e,t){return t=Math.max(o[0],Math.min(o[1],t)),t===e.k?e:new $(t,e.x,e.y)}function b(e,t,n){var r=t[0]-n[0]*e.k,i=t[1]-n[1]*e.k;return r===e.x&&i===e.y?e:new $(e.k,r,i)}function x(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function ee(e,t,r,i){e.on(`start.zoom`,function(){S(this,arguments).event(i).start()}).on(`interrupt.zoom end.zoom`,function(){S(this,arguments).event(i).end()}).tween(`zoom`,function(){var e=this,a=arguments,o=S(e,a).event(i),s=n.apply(e,a),c=r==null?x(s):typeof r==`function`?r.apply(e,a):r,u=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),d=e.__zoom,f=typeof t==`function`?t.apply(e,a):t,p=l(d.invert(c).concat(u/d.k),f.invert(c).concat(u/f.k));return function(e){if(e===1)e=f;else{var t=p(e),n=u/t[2];e=new $(n,c[0]-t[0]*n,c[1]-t[1]*n)}o.zoom(null,e)}})}function S(e,t,n){return!n&&e.__zooming||new te(e,t)}function te(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=n.apply(e,t),this.taps=0}te.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit(`start`)),this},zoom:function(e,t){return this.mouse&&e!==`mouse`&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&e!==`touch`&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&e!==`touch`&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit(`zoom`),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit(`end`)),this},emit:function(e){var t=E(this.that).datum();u.call(e,this.that,new ua(e,{sourceEvent:this.sourceEvent,target:v,type:e,transform:this.that.__zoom,dispatch:u}),t)}};function ne(t,...n){if(!e.apply(this,arguments))return;var a=S(this,n).event(t),c=this.__zoom,l=Math.max(o[0],Math.min(o[1],c.k*2**i.apply(this,arguments))),u=D(t);if(a.wheel)(a.mouse[0][0]!==u[0]||a.mouse[0][1]!==u[1])&&(a.mouse[1]=c.invert(a.mouse[0]=u)),clearTimeout(a.wheel);else if(c.k===l)return;else a.mouse=[u,c.invert(u)],pr(this),a.start();ma(t),a.wheel=setTimeout(d,h),a.zoom(`mouse`,r(b(y(c,l),a.mouse[0],a.mouse[1]),a.extent,s));function d(){a.wheel=null,a.end()}}function re(t,...n){if(p||!e.apply(this,arguments))return;var i=t.currentTarget,a=S(this,n,!0).event(t),o=E(t.view).on(`mousemove.zoom`,d,!0).on(`mouseup.zoom`,f,!0),c=D(t,i),l=t.clientX,u=t.clientY;Ft(t.view),pa(t),a.mouse=[c,this.__zoom.invert(c)],pr(this),a.start();function d(e){if(ma(e),!a.moved){var t=e.clientX-l,n=e.clientY-u;a.moved=t*t+n*n>g}a.event(e).zoom(`mouse`,r(b(a.that.__zoom,a.mouse[0]=D(e,i),a.mouse[1]),a.extent,s))}function f(e){o.on(`mousemove.zoom mouseup.zoom`,null),It(e.view,a.moved),ma(e),a.event(e).end()}}function ie(t,...i){if(e.apply(this,arguments)){var a=this.__zoom,o=D(t.changedTouches?t.changedTouches[0]:t,this),l=a.invert(o),u=a.k*(t.shiftKey?.5:2),d=r(b(y(a,u),o,l),n.apply(this,i),s);ma(t),c>0?E(this).transition().duration(c).call(ee,d,o,t):E(this).call(v.transform,d,o,t)}}function ae(t,...n){if(e.apply(this,arguments)){var r=t.touches,i=r.length,a=S(this,n,t.changedTouches.length===i).event(t),o,s,c,l;for(pa(t),s=0;s<i;++s)c=r[s],l=D(c,this),l=[l,this.__zoom.invert(l),c.identifier],a.touch0?!a.touch1&&a.touch0[2]!==l[2]&&(a.touch1=l,a.taps=0):(a.touch0=l,o=!0,a.taps=1+!!d);d&&=clearTimeout(d),o&&(a.taps<2&&(f=l[0],d=setTimeout(function(){d=null},m)),pr(this),a.start())}}function oe(e,...t){if(this.__zooming){var n=S(this,t).event(e),i=e.changedTouches,a=i.length,o,c,l,u;for(ma(e),o=0;o<a;++o)c=i[o],l=D(c,this),n.touch0&&n.touch0[2]===c.identifier?n.touch0[0]=l:n.touch1&&n.touch1[2]===c.identifier&&(n.touch1[0]=l);if(c=n.that.__zoom,n.touch1){var d=n.touch0[0],f=n.touch0[1],p=n.touch1[0],m=n.touch1[1],h=(h=p[0]-d[0])*h+(h=p[1]-d[1])*h,g=(g=m[0]-f[0])*g+(g=m[1]-f[1])*g;c=y(c,Math.sqrt(h/g)),l=[(d[0]+p[0])/2,(d[1]+p[1])/2],u=[(f[0]+m[0])/2,(f[1]+m[1])/2]}else if(n.touch0)l=n.touch0[0],u=n.touch0[1];else return;n.zoom(`touch`,r(b(c,l,u),n.extent,s))}}function se(e,...t){if(this.__zooming){var n=S(this,t).event(e),r=e.changedTouches,i=r.length,a,o;for(pa(e),p&&clearTimeout(p),p=setTimeout(function(){p=null},m),a=0;a<i;++a)o=r[a],n.touch0&&n.touch0[2]===o.identifier?delete n.touch0:n.touch1&&n.touch1[2]===o.identifier&&delete n.touch1;if(n.touch1&&!n.touch0&&(n.touch0=n.touch1,delete n.touch1),n.touch0)n.touch0[1]=this.__zoom.invert(n.touch0[0]);else if(n.end(),n.taps===2&&(o=D(o,this),Math.hypot(f[0]-o[0],f[1]-o[1])<_)){var s=E(this).on(`dblclick.zoom`);s&&s.apply(this,arguments)}}}return v.wheelDelta=function(e){return arguments.length?(i=typeof e==`function`?e:la(+e),v):i},v.filter=function(t){return arguments.length?(e=typeof t==`function`?t:la(!!t),v):e},v.touchable=function(e){return arguments.length?(a=typeof e==`function`?e:la(!!e),v):a},v.extent=function(e){return arguments.length?(n=typeof e==`function`?e:la([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),v):n},v.scaleExtent=function(e){return arguments.length?(o[0]=+e[0],o[1]=+e[1],v):[o[0],o[1]]},v.translateExtent=function(e){return arguments.length?(s[0][0]=+e[0][0],s[1][0]=+e[1][0],s[0][1]=+e[0][1],s[1][1]=+e[1][1],v):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},v.constrain=function(e){return arguments.length?(r=e,v):r},v.duration=function(e){return arguments.length?(c=+e,v):c},v.interpolate=function(e){return arguments.length?(l=e,v):l},v.on=function(){var e=u.on.apply(u,arguments);return e===u?v:e},v.clickDistance=function(e){return arguments.length?(g=(e=+e)*e,v):Math.sqrt(g)},v.tapDistance=function(e){return arguments.length?(_=+e,v):_},v}export{sa as a,Ei as c,ca as i,Ut as l,da as n,Qi as o,fa as r,Yi as s,xa as t,E as u};
|