trilium/libraries/force-graph.min.js

6 lines
194 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Version 1.42.11 force-graph - https://github.com/vasturiano/force-graph
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).ForceGraph=e()}(this,(function(){"use strict";function e(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function n(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?e(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function o(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function f(t,e,n){return f=o()?Reflect.construct.bind():function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&a(i,n.prototype),i},f.apply(null,arguments)}function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,a=[],o=!0,f=!1;try{for(n=n.call(t);!(o=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);o=!0);}catch(t){f=!0,i=t}finally{try{o||null==n.return||n.return()}finally{if(f)throw i}}return a}(t,e)||s(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||s(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){if(t){if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}!function(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}}(".force-graph-container canvas {\n display: block;\n user-select: none;\n outline: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.force-graph-container .graph-tooltip {\n position: absolute;\n top: 0;\n transform: translate(-50%, 25px);\n font-family: sans-serif;\n font-size: 16px;\n padding: 4px;\n border-radius: 3px;\n color: #eee;\n background: rgba(0,0,0,0.65);\n visibility: hidden; /* by default */\n}\n\n.force-graph-container .clickable {\n cursor: pointer;\n}\n\n.force-graph-container .grabbable {\n cursor: move;\n cursor: grab;\n cursor: -moz-grab;\n cursor: -webkit-grab;\n}\n\n.force-graph-container .grabbable:active {\n cursor: grabbing;\n cursor: -moz-grabbing;\n cursor: -webkit-grabbing;\n}\n");var h="http://www.w3.org/1999/xhtml",d={svg:"http://www.w3.org/2000/svg",xhtml:h,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function p(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),d.hasOwnProperty(e)?{space:d[e],local:t}:t}function g(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===h&&e.documentElement.namespaceURI===h?e.createElement(t):e.createElementNS(n,t)}}function b(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function y(t){var e=p(t);return(e.local?b:g)(e)}function v(){}function m(t){return null==t?v:function(){return this.querySelector(t)}}function _(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function x(){return[]}function w(t){return null==t?x:function(){return this.querySelectorAll(t)}}function k(t){return function(){return this.matches(t)}}function M(t){return function(e){return e.matches(t)}}var A=Array.prototype.find;function C(){return this.firstElementChild}var z=Array.prototype.filter;function S(){return Array.from(this.children)}function T(t){return new Array(t.length)}function N(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function E(t){return function(){return t}}function P(t,e,n,r,i,a){for(var o,f=0,c=e.length,u=a.length;f<u;++f)(o=e[f])?(o.__data__=a[f],r[f]=o):n[f]=new N(t,a[f]);for(;f<c;++f)(o=e[f])&&(i[f]=o)}function O(t,e,n,r,i,a,o){var f,c,u,s=new Map,l=e.length,h=a.length,d=new Array(l);for(f=0;f<l;++f)(c=e[f])&&(d[f]=u=o.call(c,c.__data__,f,e)+"",s.has(u)?i[f]=c:s.set(u,c));for(f=0;f<h;++f)u=o.call(t,a[f],f,a)+"",(c=s.get(u))?(r[f]=c,c.__data__=a[f],s.delete(u)):n[f]=new N(t,a[f]);for(f=0;f<l;++f)(c=e[f])&&s.get(d[f])===c&&(i[f]=c)}function D(t){return t.__data__}function U(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function j(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function R(t){return function(){this.removeAttribute(t)}}function F(t){return function(){this.removeAttributeNS(t.space,t.local)}}function I(t,e){return function(){this.setAttribute(t,e)}}function L(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function H(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function q(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function B(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function $(t){return function(){this.style.removeProperty(t)}}function Y(t,e,n){return function(){this.style.setProperty(t,e,n)}}function V(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function X(t,e){return t.style.getPropertyValue(e)||B(t).getComputedStyle(t,null).getPropertyValue(e)}function G(t){return function(){delete this[t]}}function Z(t,e){return function(){this[t]=e}}function W(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Q(t){return t.trim().split(/^|\s+/)}function J(t){return t.classList||new K(t)}function K(t){this._node=t,this._names=Q(t.getAttribute("class")||"")}function tt(t,e){for(var n=J(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function et(t,e){for(var n=J(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function nt(t){return function(){tt(this,t)}}function rt(t){return function(){et(this,t)}}function it(t,e){return function(){(e.apply(this,arguments)?tt:et)(this,t)}}function at(){this.textContent=""}function ot(t){return function(){this.textContent=t}}function ft(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function ct(){this.innerHTML=""}function ut(t){return function(){this.innerHTML=t}}function st(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function lt(){this.nextSibling&&this.parentNode.appendChild(this)}function ht(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function dt(){return null}function pt(){var t=this.parentNode;t&&t.removeChild(this)}function gt(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function bt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function yt(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function vt(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function mt(t,e,n){return function(){var r,i=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var o=0,f=i.length;o<f;++o)if((r=i[o]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=e);this.addEventListener(t.type,a,n),r={type:t.type,name:t.name,value:e,listener:a,options:n},i?i.push(r):this.__on=[r]}}function _t(t,e,n){var r=B(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function xt(t,e){return function(){return _t(this,t,e)}}function wt(t,e){return function(){return _t(this,t,e.apply(this,arguments))}}N.prototype={constructor:N,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},K.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var kt=[null];function Mt(t,e){this._groups=t,this._parents=e}function At(){return new Mt([[document.documentElement]],kt)}function Ct(t){return"string"==typeof t?new Mt([[document.querySelector(t)]],[document.documentElement]):new Mt([[t]],kt)}Mt.prototype=At.prototype={constructor:Mt,select:function(t){"function"!=typeof t&&(t=m(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,f=e[i],c=f.length,u=r[i]=new Array(c),s=0;s<c;++s)(a=f[s])&&(o=t.call(a,a.__data__,s,f))&&("__data__"in a&&(o.__data__=a.__data__),u[s]=o);return new Mt(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return _(t.apply(this,arguments))}}(t):w(t);for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,f=e[a],c=f.length,u=0;u<c;++u)(o=f[u])&&(r.push(t.call(o,o.__data__,u,f)),i.push(o));return new Mt(r,i)},selectChild:function(t){return this.select(null==t?C:function(t){return function(){return A.call(this.children,t)}}("function"==typeof t?t:M(t)))},selectChildren:function(t){return this.selectAll(null==t?S:function(t){return function(){return z.call(this.children,t)}}("function"==typeof t?t:M(t)))},filter:function(t){"function"!=typeof t&&(t=k(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],f=o.length,c=r[i]=[],u=0;u<f;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new Mt(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,D);var n=e?O:P,r=this._parents,i=this._groups;"function"!=typeof t&&(t=E(t));for(var a=i.length,o=new Array(a),f=new Array(a),c=new Array(a),u=0;u<a;++u){var s=r[u],l=i[u],h=l.length,d=U(t.call(s,s&&s.__data__,u,r)),p=d.length,g=f[u]=new Array(p),b=o[u]=new Array(p),y=c[u]=new Array(h);n(s,l,g,b,y,d,e);for(var v,m,_=0,x=0;_<p;++_)if(v=g[_]){for(_>=x&&(x=_+1);!(m=b[x])&&++x<p;);v._next=m||null}}return(o=new Mt(o,r))._enter=f,o._exit=c,o},enter:function(){return new Mt(this._enter||this._groups.map(T),this._parents)},exit:function(){return new Mt(this._exit||this._groups.map(T),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,a=r.length,o=Math.min(i,a),f=new Array(i),c=0;c<o;++c)for(var u,s=n[c],l=r[c],h=s.length,d=f[c]=new Array(h),p=0;p<h;++p)(u=s[p]||l[p])&&(d[p]=u);for(;c<i;++c)f[c]=n[c];return new Mt(f,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=j);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,f=n[a],c=f.length,u=i[a]=new Array(c),s=0;s<c;++s)(o=f[s])&&(u[s]=o);u.sort(e)}return new Mt(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,f=a.length;o<f;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=p(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?F:R:"function"==typeof e?n.local?q:H:n.local?L:I)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?$:"function"==typeof e?V:Y)(t,e,null==n?"":n)):X(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?G:"function"==typeof e?W:Z)(t,e)):this.node()[t]},classed:function(t,e){var n=Q(t+"");if(arguments.length<2){for(var r=J(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?it:e?nt:rt)(n,e))},text:function(t){return arguments.length?this.each(null==t?at:("function"==typeof t?ft:ot)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?ct:("function"==typeof t?st:ut)(t)):this.node().innerHTML},raise:function(){return this.each(lt)},lower:function(){return this.each(ht)},append:function(t){var e="function"==typeof t?t:y(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:y(t),r=null==e?dt:"function"==typeof e?e:m(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(pt)},clone:function(t){return this.select(t?bt:gt)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=yt(t+""),o=a.length;if(!(arguments.length<2)){for(f=e?mt:vt,r=0;r<o;++r)this.each(f(a[r],e,n));return this}var f=this.node().__on;if(f)for(var c,u=0,s=f.length;u<s;++u)for(r=0,c=f[u];r<o;++r)if((i=a[r]).type===c.type&&i.name===c.name)return c.value},dispatch:function(t,e){return this.each(("function"==typeof e?wt:xt)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],a=0,o=i.length;a<o;++a)(r=i[a])&&(yield r)}};var zt=0;function St(){this._="@"+(++zt).toString(36)}function Tt(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}St.prototype={constructor:St,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var Nt={value:()=>{}};function Et(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Pt(r)}function Pt(t){this._=t}function Ot(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function Dt(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Ut(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Nt,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Pt.prototype=Et.prototype={constructor:Pt,on:function(t,e){var n,r=this._,i=Ot(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=Ut(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Ut(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=Dt(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Pt(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};const jt={passive:!1},Rt={capture:!0,passive:!1};function Ft(t){t.stopImmediatePropagation()}function It(t){t.preventDefault(),t.stopImmediatePropagation()}function Lt(t){var e=t.document.documentElement,n=Ct(t).on("dragstart.drag",It,Rt);"onselectstart"in e?n.on("selectstart.drag",It,Rt):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Ht(t,e){var n=t.document.documentElement,r=Ct(t).on("dragstart.drag",null);e&&(r.on("click.drag",It,Rt),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 qt=t=>()=>t;function Bt(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:a,x:o,y:f,dx:c,dy:u,dispatch:s}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,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:f,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:s}})}function $t(t){return!t.ctrlKey&&!t.button}function Yt(){return this.parentNode}function Vt(t,e){return null==e?{x:t.x,y:t.y}:e}function Xt(){return navigator.maxTouchPoints||"ontouchstart"in this}function Gt(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Zt(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Wt(){}Bt.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Qt=.7,Jt=1/Qt,Kt="\\s*([+-]?\\d+)\\s*",te="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ee="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ne=/^#([0-9a-f]{3,8})$/,re=new RegExp(`^rgb\\(${Kt},${Kt},${Kt}\\)$`),ie=new RegExp(`^rgb\\(${ee},${ee},${ee}\\)$`),ae=new RegExp(`^rgba\\(${Kt},${Kt},${Kt},${te}\\)$`),oe=new RegExp(`^rgba\\(${ee},${ee},${ee},${te}\\)$`),fe=new RegExp(`^hsl\\(${te},${ee},${ee}\\)$`),ce=new RegExp(`^hsla\\(${te},${ee},${ee},${te}\\)$`),ue={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function se(){return this.rgb().formatHex()}function le(){return this.rgb().formatRgb()}function he(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=ne.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?de(e):3===n?new ye(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?pe(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?pe(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=re.exec(t))?new ye(e[1],e[2],e[3],1):(e=ie.exec(t))?new ye(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ae.exec(t))?pe(e[1],e[2],e[3],e[4]):(e=oe.exec(t))?pe(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=fe.exec(t))?ke(e[1],e[2]/100,e[3]/100,1):(e=ce.exec(t))?ke(e[1],e[2]/100,e[3]/100,e[4]):ue.hasOwnProperty(t)?de(ue[t]):"transparent"===t?new ye(NaN,NaN,NaN,0):null}function de(t){return new ye(t>>16&255,t>>8&255,255&t,1)}function pe(t,e,n,r){return r<=0&&(t=e=n=NaN),new ye(t,e,n,r)}function ge(t){return t instanceof Wt||(t=he(t)),t?new ye((t=t.rgb()).r,t.g,t.b,t.opacity):new ye}function be(t,e,n,r){return 1===arguments.length?ge(t):new ye(t,e,n,null==r?1:r)}function ye(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function ve(){return`#${we(this.r)}${we(this.g)}${we(this.b)}`}function me(){const t=_e(this.opacity);return`${1===t?"rgb(":"rgba("}${xe(this.r)}, ${xe(this.g)}, ${xe(this.b)}${1===t?")":`, ${t})`}`}function _e(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function xe(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function we(t){return((t=xe(t))<16?"0":"")+t.toString(16)}function ke(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ae(t,e,n,r)}function Me(t){if(t instanceof Ae)return new Ae(t.h,t.s,t.l,t.opacity);if(t instanceof Wt||(t=he(t)),!t)return new Ae;if(t instanceof Ae)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,f=a-i,c=(a+i)/2;return f?(o=e===a?(n-r)/f+6*(n<r):n===a?(r-e)/f+2:(e-n)/f+4,f/=c<.5?a+i:2-a-i,o*=60):f=c>0&&c<1?0:o,new Ae(o,f,c,t.opacity)}function Ae(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ce(t){return(t=(t||0)%360)<0?t+360:t}function ze(t){return Math.max(0,Math.min(1,t||0))}function Se(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Gt(Wt,he,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:se,formatHex:se,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Me(this).formatHsl()},formatRgb:le,toString:le}),Gt(ye,be,Zt(Wt,{brighter(t){return t=null==t?Jt:Math.pow(Jt,t),new ye(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?Qt:Math.pow(Qt,t),new ye(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ye(xe(this.r),xe(this.g),xe(this.b),_e(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:ve,formatHex:ve,formatHex8:function(){return`#${we(this.r)}${we(this.g)}${we(this.b)}${we(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:me,toString:me})),Gt(Ae,(function(t,e,n,r){return 1===arguments.length?Me(t):new Ae(t,e,n,null==r?1:r)}),Zt(Wt,{brighter(t){return t=null==t?Jt:Math.pow(Jt,t),new Ae(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Qt:Math.pow(Qt,t),new Ae(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ye(Se(t>=240?t-240:t+120,i,r),Se(t,i,r),Se(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ae(Ce(this.h),ze(this.s),ze(this.l),_e(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=_e(this.opacity);return`${1===t?"hsl(":"hsla("}${Ce(this.h)}, ${100*ze(this.s)}%, ${100*ze(this.l)}%${1===t?")":`, ${t})`}`}}));const Te=Math.PI/180,Ne=180/Math.PI,Ee=.96422,Pe=.82521,Oe=4/29,De=6/29,Ue=3*De*De;function je(t){if(t instanceof Re)return new Re(t.l,t.a,t.b,t.opacity);if(t instanceof Be)return $e(t);t instanceof ye||(t=ge(t));var e,n,r=He(t.r),i=He(t.g),a=He(t.b),o=Fe((.2225045*r+.7168786*i+.0606169*a)/1);return r===i&&i===a?e=n=o:(e=Fe((.4360747*r+.3850649*i+.1430804*a)/Ee),n=Fe((.0139322*r+.0971045*i+.7141733*a)/Pe)),new Re(116*o-16,500*(e-o),200*(o-n),t.opacity)}function Re(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Fe(t){return t>.008856451679035631?Math.pow(t,1/3):t/Ue+Oe}function Ie(t){return t>De?t*t*t:Ue*(t-Oe)}function Le(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function He(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function qe(t){if(t instanceof Be)return new Be(t.h,t.c,t.l,t.opacity);if(t instanceof Re||(t=je(t)),0===t.a&&0===t.b)return new Be(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Ne;return new Be(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Be(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function $e(t){if(isNaN(t.h))return new Re(t.l,0,0,t.opacity);var e=t.h*Te;return new Re(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Gt(Re,(function(t,e,n,r){return 1===arguments.length?je(t):new Re(t,e,n,null==r?1:r)}),Zt(Wt,{brighter(t){return new Re(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new Re(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new ye(Le(3.1338561*(e=Ee*Ie(e))-1.6168667*(t=1*Ie(t))-.4906146*(n=Pe*Ie(n))),Le(-.9787684*e+1.9161415*t+.033454*n),Le(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Gt(Be,(function(t,e,n,r){return 1===arguments.length?qe(t):new Be(t,e,n,null==r?1:r)}),Zt(Wt,{brighter(t){return new Be(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new Be(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return $e(this).rgb()}}));var Ye=-.14861,Ve=1.78277,Xe=-.29227,Ge=-.90649,Ze=1.97294,We=Ze*Ge,Qe=Ze*Ve,Je=Ve*Xe-Ge*Ye;function Ke(t){if(t instanceof en)return new en(t.h,t.s,t.l,t.opacity);t instanceof ye||(t=ge(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(Je*r+We*e-Qe*n)/(Je+We-Qe),a=r-i,o=(Ze*(n-i)-Xe*a)/Ge,f=Math.sqrt(o*o+a*a)/(Ze*i*(1-i)),c=f?Math.atan2(o,a)*Ne-120:NaN;return new en(c<0?c+360:c,f,i,t.opacity)}function tn(t,e,n,r){return 1===arguments.length?Ke(t):new en(t,e,n,null==r?1:r)}function en(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Gt(en,tn,Zt(Wt,{brighter(t){return t=null==t?Jt:Math.pow(Jt,t),new en(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Qt:Math.pow(Qt,t),new en(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*Te,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new ye(255*(e+n*(Ye*r+Ve*i)),255*(e+n*(Xe*r+Ge*i)),255*(e+n*(Ze*r)),this.opacity)}}));var nn=t=>()=>t;function rn(t,e){return function(n){return t+n*e}}function an(t){return 1==(t=+t)?on:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):nn(isNaN(e)?n:e)}}function on(t,e){var n=e-t;return n?rn(t,n):nn(isNaN(t)?e:t)}var fn=function t(e){var n=an(e);function r(t,e){var r=n((t=be(t)).r,(e=be(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=on(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);var cn,un=(cn=function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,f=r<e-1?t[r+2]:2*a-i;return function(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}((n-r/e)*e,o,i,a,f)}},function(t){var e,n,r=t.length,i=new Array(r),a=new Array(r),o=new Array(r);for(e=0;e<r;++e)n=be(t[e]),i[e]=n.r||0,a[e]=n.g||0,o[e]=n.b||0;return i=cn(i),a=cn(a),o=cn(o),n.opacity=1,function(t){return n.r=i(t),n.g=a(t),n.b=o(t),n+""}});function sn(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var ln=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,hn=new RegExp(ln.source,"g");function dn(t,e){var n,r,i,a=ln.lastIndex=hn.lastIndex=0,o=-1,f=[],c=[];for(t+="",e+="";(n=ln.exec(t))&&(r=hn.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),f[o]?f[o]+=i:f[++o]=i),(n=n[0])===(r=r[0])?f[o]?f[o]+=r:f[++o]=r:(f[++o]=null,c.push({i:o,x:sn(n,r)})),a=hn.lastIndex;return a<e.length&&(i=e.slice(a),f[o]?f[o]+=i:f[++o]=i),f.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,r=0;r<e;++r)f[(n=c[r]).i]=n.x(t);return f.join("")})}var pn,gn=180/Math.PI,bn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function yn(t,e,n,r,i,a){var o,f,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(f=Math.sqrt(n*n+r*r))&&(n/=f,r/=f,c/=f),t*r<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*gn,skewX:Math.atan(c)*gn,scaleX:o,scaleY:f}}function vn(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var f=[],c=[];return a=t(a),o=t(o),function(t,r,i,a,o,f){if(t!==i||r!==a){var c=o.push("translate(",null,e,null,n);f.push({i:c-4,x:sn(t,i)},{i:c-2,x:sn(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,f,c),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:sn(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,f,c),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:sn(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,f,c),function(t,e,n,r,a,o){if(t!==n||e!==r){var f=a.push(i(a)+"scale(",null,",",null,")");o.push({i:f-4,x:sn(t,n)},{i:f-2,x:sn(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,f,c),a=o=null,function(t){for(var e,n=-1,r=c.length;++n<r;)f[(e=c[n]).i]=e.x(t);return f.join("")}}}var mn=vn((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?bn:yn(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),_n=vn((function(t){return null==t?bn:(pn||(pn=document.createElementNS("http://www.w3.org/2000/svg","g")),pn.setAttribute("transform",t),(t=pn.transform.baseVal.consolidate())?yn((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):bn)}),", ",")",")");function xn(t){return((t=Math.exp(t))+1/t)/2}var wn=function t(e,n,r){function i(t,i){var a,o,f=t[0],c=t[1],u=t[2],s=i[0],l=i[1],h=i[2],d=s-f,p=l-c,g=d*d+p*p;if(g<1e-12)o=Math.log(h/u)/e,a=function(t){return[f+t*d,c+t*p,u*Math.exp(e*t*o)]};else{var b=Math.sqrt(g),y=(h*h-u*u+r*g)/(2*u*n*b),v=(h*h-u*u-r*g)/(2*h*n*b),m=Math.log(Math.sqrt(y*y+1)-y),_=Math.log(Math.sqrt(v*v+1)-v);o=(_-m)/e,a=function(t){var r=t*o,i=xn(m),a=u/(n*b)*(i*function(t){return((t=Math.exp(2*t))-1)/(t+1)}(e*r+m)-function(t){return((t=Math.exp(t))-1/t)/2}(m));return[f+a*d,c+a*p,u*i/xn(e*r+m)]}}return a.duration=1e3*o*e/Math.SQRT2,a}return i.rho=function(e){var n=Math.max(.001,+e),r=n*n;return t(n,r,r*r)},i}(Math.SQRT2,2,4);function kn(t){return function e(n){function r(e,r){var i=t((e=tn(e)).h,(r=tn(r)).h),a=on(e.s,r.s),o=on(e.l,r.l),f=on(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=a(t),e.l=o(Math.pow(t,n)),e.opacity=f(t),e+""}}return n=+n,r.gamma=e,r}(1)}kn((function(t,e){var n=e-t;return n?rn(t,n>180||n<-180?n-360*Math.round(n/360):n):nn(isNaN(t)?e:t)}));var Mn,An,Cn=kn(on),zn=0,Sn=0,Tn=0,Nn=0,En=0,Pn=0,On="object"==typeof performance&&performance.now?performance:Date,Dn="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Un(){return En||(Dn(jn),En=On.now()+Pn)}function jn(){En=0}function Rn(){this._call=this._time=this._next=null}function Fn(t,e,n){var r=new Rn;return r.restart(t,e,n),r}function In(){En=(Nn=On.now())+Pn,zn=Sn=0;try{!function(){Un(),++zn;for(var t,e=Mn;e;)(t=En-e._time)>=0&&e._call.call(void 0,t),e=e._next;--zn}()}finally{zn=0,function(){var t,e,n=Mn,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Mn=e);An=t,Hn(r)}(),En=0}}function Ln(){var t=On.now(),e=t-Nn;e>1e3&&(Pn-=e,Nn=t)}function Hn(t){zn||(Sn&&(Sn=clearTimeout(Sn)),t-En>24?(t<1/0&&(Sn=setTimeout(In,t-On.now()-Pn)),Tn&&(Tn=clearInterval(Tn))):(Tn||(Nn=On.now(),Tn=setInterval(Ln,1e3)),zn=1,Dn(In)))}function qn(t,e,n){var r=new Rn;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}Rn.prototype=Fn.prototype={constructor:Rn,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Un():+n)+(null==e?0:+e),this._next||An===this||(An?An._next=this:Mn=this,An=this),this._call=t,this._time=n,Hn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Hn())}};var Bn=Et("start","end","cancel","interrupt"),$n=[];function Yn(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}function o(a){var u,s,l,h;if(1!==n.state)return c();for(u in i)if((h=i[u]).name===n.name){if(3===h.state)return qn(o);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[u]):+u<e&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[u])}if(qn((function(){3===n.state&&(n.state=4,n.timer.restart(f,n.delay,n.time),f(a))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(l=n.tween.length),u=0,s=-1;u<l;++u)(h=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++s]=h);r.length=s+1}}function f(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(c),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),c())}function c(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Fn(a,0,n.time)}(t,n,{name:e,index:r,group:i,on:Bn,tween:$n,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Vn(t,e){var n=Gn(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Xn(t,e){var n=Gn(t,e);if(n.state>3)throw new Error("too late; already running");return n}function Gn(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Zn(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}function Wn(t,e){var n,r;return function(){var i=Xn(this,t),a=i.tween;if(a!==n)for(var o=0,f=(r=n=a).length;o<f;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function Qn(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=Xn(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var f={name:e,value:n},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=f;break}c===u&&i.push(f)}a.tween=i}}function Jn(t,e,n){var r=t._id;return t.each((function(){var t=Xn(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return Gn(t,r).value[e]}}function Kn(t,e){var n;return("number"==typeof e?sn:e instanceof he?fn:(n=he(e))?(e=n,fn):dn)(t,e)}function tr(t){return function(){this.removeAttribute(t)}}function er(t){return function(){this.removeAttributeNS(t.space,t.local)}}function nr(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function rr(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function ir(t,e,n){var r,i,a;return function(){var o,f,c=n(this);if(null!=c)return(o=this.getAttribute(t))===(f=c+"")?null:o===r&&f===i?a:(i=f,a=e(r=o,c));this.removeAttribute(t)}}function ar(t,e,n){var r,i,a;return function(){var o,f,c=n(this);if(null!=c)return(o=this.getAttributeNS(t.space,t.local))===(f=c+"")?null:o===r&&f===i?a:(i=f,a=e(r=o,c));this.removeAttributeNS(t.space,t.local)}}function or(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function fr(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function cr(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&fr(t,i)),n}return i._value=e,i}function ur(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&or(t,i)),n}return i._value=e,i}function sr(t,e){return function(){Vn(this,t).delay=+e.apply(this,arguments)}}function lr(t,e){return e=+e,function(){Vn(this,t).delay=e}}function hr(t,e){return function(){Xn(this,t).duration=+e.apply(this,arguments)}}function dr(t,e){return e=+e,function(){Xn(this,t).duration=e}}function pr(t,e){if("function"!=typeof e)throw new Error;return function(){Xn(this,t).ease=e}}function gr(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?Vn:Xn;return function(){var o=a(this,t),f=o.on;f!==r&&(i=(r=f).copy()).on(e,n),o.on=i}}var br=At.prototype.constructor;function yr(t){return function(){this.style.removeProperty(t)}}function vr(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function mr(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&vr(t,a,n)),r}return a._value=e,a}function _r(t){return function(e){this.textContent=t.call(this,e)}}function xr(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&_r(r)),e}return r._value=t,r}var wr=0;function kr(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Mr(){return++wr}var Ar=At.prototype;kr.prototype={constructor:kr,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=m(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var f,c,u=r[o],s=u.length,l=a[o]=new Array(s),h=0;h<s;++h)(f=u[h])&&(c=t.call(f,f.__data__,h,u))&&("__data__"in f&&(c.__data__=f.__data__),l[h]=c,Yn(l[h],e,n,h,l,Gn(f,n)));return new kr(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=w(t));for(var r=this._groups,i=r.length,a=[],o=[],f=0;f<i;++f)for(var c,u=r[f],s=u.length,l=0;l<s;++l)if(c=u[l]){for(var h,d=t.call(c,c.__data__,l,u),p=Gn(c,n),g=0,b=d.length;g<b;++g)(h=d[g])&&Yn(h,e,n,g,d,p);a.push(d),o.push(c)}return new kr(a,o,e,n)},selectChild:Ar.selectChild,selectChildren:Ar.selectChildren,filter:function(t){"function"!=typeof t&&(t=k(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],f=o.length,c=r[i]=[],u=0;u<f;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new kr(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),f=0;f<a;++f)for(var c,u=e[f],s=n[f],l=u.length,h=o[f]=new Array(l),d=0;d<l;++d)(c=u[d]||s[d])&&(h[d]=c);for(;f<r;++f)o[f]=e[f];return new kr(o,this._parents,this._name,this._id)},selection:function(){return new br(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Mr(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,f=r[a],c=f.length,u=0;u<c;++u)if(o=f[u]){var s=Gn(o,e);Yn(o,t,n,u,f,{time:s.time+s.delay+s.duration,delay:0,duration:s.duration,ease:s.ease})}return new kr(r,this._parents,t,n)},call:Ar.call,nodes:Ar.nodes,node:Ar.node,size:Ar.size,empty:Ar.empty,each:Ar.each,on:function(t,e){var n=this._id;return arguments.length<2?Gn(this.node(),n).on.on(t):this.each(gr(n,t,e))},attr:function(t,e){var n=p(t),r="transform"===n?_n:Kn;return this.attrTween(t,"function"==typeof e?(n.local?ar:ir)(n,r,Jn(this,"attr."+t,e)):null==e?(n.local?er:tr)(n):(n.local?rr:nr)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=p(t);return this.tween(n,(r.local?cr:ur)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?mn:Kn;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=X(this,t),o=(this.style.removeProperty(t),X(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,yr(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=X(this,t),f=n(this),c=f+"";return null==f&&(this.style.removeProperty(t),c=f=X(this,t)),o===c?null:o===r&&c===i?a:(i=c,a=e(r=o,f))}}(t,r,Jn(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,f="end."+o;return function(){var c=Xn(this,t),u=c.on,s=null==c.value[o]?a||(a=yr(e)):void 0;u===n&&i===s||(r=(n=u).copy()).on(f,i=s),c.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=X(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,mr(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Jn(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,xr(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=Gn(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?Wn:Qn)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?sr:lr)(e,t)):Gn(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?hr:dr)(e,t)):Gn(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(pr(e,t)):Gn(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;Xn(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var f={value:o},c={value:function(){0==--i&&a()}};n.each((function(){var n=Xn(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(f),e._.interrupt.push(f),e._.end.push(c)),n.on=e})),0===i&&a()}))},[Symbol.iterator]:Ar[Symbol.iterator]};function Cr(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}!function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3);var zr=1.70158;!function t(e){function n(t){return(t=+t)*t*(e*(t-1)+t)}return e=+e,n.overshoot=t,n}(zr),function t(e){function n(t){return--t*t*((t+1)*e+t)+1}return e=+e,n.overshoot=t,n}(zr),function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(zr);var Sr=2*Math.PI;!function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Sr);function i(t){return e*Cr(- --t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*Sr)},i.period=function(n){return t(e,n)},i}(1,.3),function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Sr);function i(t){return 1-e*Cr(t=+t)*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*Sr)},i.period=function(n){return t(e,n)},i}(1,.3),function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Sr);function i(t){return((t=2*t-1)<0?e*Cr(-t)*Math.sin((r-t)/n):2-e*Cr(t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*Sr)},i.period=function(n){return t(e,n)},i}(1,.3);var Tr={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Nr(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}At.prototype.interrupt=function(t){return this.each((function(){Zn(this,t)}))},At.prototype.transition=function(t){var e,n;t instanceof kr?(e=t._id,t=t._name):(e=Mr(),(n=Tr).time=Un(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,f=r[a],c=f.length,u=0;u<c;++u)(o=f[u])&&Yn(o,t,e,u,f,n||Nr(o,e));return new kr(r,this._parents,t,e)};var Er=t=>()=>t;function Pr(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Or(t,e,n){this.k=t,this.x=e,this.y=n}Or.prototype={constructor:Or,scale:function(t){return 1===t?this:new Or(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Or(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Dr=new Or(1,0,0);function Ur(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Dr;return t.__zoom}function jr(t){t.stopImmediatePropagation()}function Rr(t){t.preventDefault(),t.stopImmediatePropagation()}function Fr(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function Ir(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function Lr(){return this.__zoom||Dr}function Hr(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function qr(){return navigator.maxTouchPoints||"ontouchstart"in this}function Br(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],a=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function $r(){var t,e,n,r=Fr,i=Ir,a=Br,o=Hr,f=qr,c=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],s=250,l=wn,h=Et("start","zoom","end"),d=500,p=0,g=10;function b(t){t.property("__zoom",Lr).on("wheel.zoom",k,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",A).filter(f).on("touchstart.zoom",C).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",S).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(t,e){return(e=Math.max(c[0],Math.min(c[1],e)))===t.k?t:new Or(e,t.x,t.y)}function v(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new Or(t.k,r,i)}function m(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function _(t,e,n,r){t.on("start.zoom",(function(){x(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){x(this,arguments).event(r).end()})).tween("zoom",(function(){var t=this,a=arguments,o=x(t,a).event(r),f=i.apply(t,a),c=null==n?m(f):"function"==typeof n?n.apply(t,a):n,u=Math.max(f[1][0]-f[0][0],f[1][1]-f[0][1]),s=t.__zoom,h="function"==typeof e?e.apply(t,a):e,d=l(s.invert(c).concat(u/s.k),h.invert(c).concat(u/h.k));return function(t){if(1===t)t=h;else{var e=d(t),n=u/e[2];t=new Or(n,c[0]-e[0]*n,c[1]-e[1]*n)}o.zoom(null,t)}}))}function x(t,e,n){return!n&&t.__zooming||new w(t,e)}function w(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=i.apply(t,e),this.taps=0}function k(t,...e){if(r.apply(this,arguments)){var n=x(this,e).event(t),i=this.__zoom,f=Math.max(c[0],Math.min(c[1],i.k*Math.pow(2,o.apply(this,arguments)))),s=Tt(t);if(n.wheel)n.mouse[0][0]===s[0]&&n.mouse[0][1]===s[1]||(n.mouse[1]=i.invert(n.mouse[0]=s)),clearTimeout(n.wheel);else{if(i.k===f)return;n.mouse=[s,i.invert(s)],Zn(this),n.start()}Rr(t),n.wheel=setTimeout(l,150),n.zoom("mouse",a(v(y(i,f),n.mouse[0],n.mouse[1]),n.extent,u))}function l(){n.wheel=null,n.end()}}function M(t,...e){if(!n&&r.apply(this,arguments)){var i=t.currentTarget,o=x(this,e,!0).event(t),f=Ct(t.view).on("mousemove.zoom",h,!0).on("mouseup.zoom",d,!0),c=Tt(t,i),s=t.clientX,l=t.clientY;Lt(t.view),jr(t),o.mouse=[c,this.__zoom.invert(c)],Zn(this),o.start()}function h(t){if(Rr(t),!o.moved){var e=t.clientX-s,n=t.clientY-l;o.moved=e*e+n*n>p}o.event(t).zoom("mouse",a(v(o.that.__zoom,o.mouse[0]=Tt(t,i),o.mouse[1]),o.extent,u))}function d(t){f.on("mousemove.zoom mouseup.zoom",null),Ht(t.view,o.moved),Rr(t),o.event(t).end()}}function A(t,...e){if(r.apply(this,arguments)){var n=this.__zoom,o=Tt(t.changedTouches?t.changedTouches[0]:t,this),f=n.invert(o),c=n.k*(t.shiftKey?.5:2),l=a(v(y(n,c),o,f),i.apply(this,e),u);Rr(t),s>0?Ct(this).transition().duration(s).call(_,l,o,t):Ct(this).call(b.transform,l,o,t)}}function C(n,...i){if(r.apply(this,arguments)){var a,o,f,c,u=n.touches,s=u.length,l=x(this,i,n.changedTouches.length===s).event(n);for(jr(n),o=0;o<s;++o)c=[c=Tt(f=u[o],this),this.__zoom.invert(c),f.identifier],l.touch0?l.touch1||l.touch0[2]===c[2]||(l.touch1=c,l.taps=0):(l.touch0=c,a=!0,l.taps=1+!!t);t&&(t=clearTimeout(t)),a&&(l.taps<2&&(e=c[0],t=setTimeout((function(){t=null}),d)),Zn(this),l.start())}}function z(t,...e){if(this.__zooming){var n,r,i,o,f=x(this,e).event(t),c=t.changedTouches,s=c.length;for(Rr(t),n=0;n<s;++n)i=Tt(r=c[n],this),f.touch0&&f.touch0[2]===r.identifier?f.touch0[0]=i:f.touch1&&f.touch1[2]===r.identifier&&(f.touch1[0]=i);if(r=f.that.__zoom,f.touch1){var l=f.touch0[0],h=f.touch0[1],d=f.touch1[0],p=f.touch1[1],g=(g=d[0]-l[0])*g+(g=d[1]-l[1])*g,b=(b=p[0]-h[0])*b+(b=p[1]-h[1])*b;r=y(r,Math.sqrt(g/b)),i=[(l[0]+d[0])/2,(l[1]+d[1])/2],o=[(h[0]+p[0])/2,(h[1]+p[1])/2]}else{if(!f.touch0)return;i=f.touch0[0],o=f.touch0[1]}f.zoom("touch",a(v(r,i,o),f.extent,u))}}function S(t,...r){if(this.__zooming){var i,a,o=x(this,r).event(t),f=t.changedTouches,c=f.length;for(jr(t),n&&clearTimeout(n),n=setTimeout((function(){n=null}),d),i=0;i<c;++i)a=f[i],o.touch0&&o.touch0[2]===a.identifier?delete o.touch0:o.touch1&&o.touch1[2]===a.identifier&&delete o.touch1;if(o.touch1&&!o.touch0&&(o.touch0=o.touch1,delete o.touch1),o.touch0)o.touch0[1]=this.__zoom.invert(o.touch0[0]);else if(o.end(),2===o.taps&&(a=Tt(a,this),Math.hypot(e[0]-a[0],e[1]-a[1])<g)){var u=Ct(this).on("dblclick.zoom");u&&u.apply(this,arguments)}}}return b.transform=function(t,e,n,r){var i=t.selection?t.selection():t;i.property("__zoom",Lr),t!==i?_(t,e,n,r):i.interrupt().each((function(){x(this,arguments).event(r).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},b.scaleBy=function(t,e,n,r){b.scaleTo(t,(function(){var t=this.__zoom.k,n="function"==typeof e?e.apply(this,arguments):e;return t*n}),n,r)},b.scaleTo=function(t,e,n,r){b.transform(t,(function(){var t=i.apply(this,arguments),r=this.__zoom,o=null==n?m(t):"function"==typeof n?n.apply(this,arguments):n,f=r.invert(o),c="function"==typeof e?e.apply(this,arguments):e;return a(v(y(r,c),o,f),t,u)}),n,r)},b.translateBy=function(t,e,n,r){b.transform(t,(function(){return a(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),i.apply(this,arguments),u)}),null,r)},b.translateTo=function(t,e,n,r,o){b.transform(t,(function(){var t=i.apply(this,arguments),o=this.__zoom,f=null==r?m(t):"function"==typeof r?r.apply(this,arguments):r;return a(Dr.translate(f[0],f[1]).scale(o.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,u)}),r,o)},w.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var e=Ct(this.that).datum();h.call(t,this.that,new Pr(t,{sourceEvent:this.sourceEvent,target:b,type:t,transform:this.that.__zoom,dispatch:h}),e)}},b.wheelDelta=function(t){return arguments.length?(o="function"==typeof t?t:Er(+t),b):o},b.filter=function(t){return arguments.length?(r="function"==typeof t?t:Er(!!t),b):r},b.touchable=function(t){return arguments.length?(f="function"==typeof t?t:Er(!!t),b):f},b.extent=function(t){return arguments.length?(i="function"==typeof t?t:Er([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),b):i},b.scaleExtent=function(t){return arguments.length?(c[0]=+t[0],c[1]=+t[1],b):[c[0],c[1]]},b.translateExtent=function(t){return arguments.length?(u[0][0]=+t[0][0],u[1][0]=+t[1][0],u[0][1]=+t[0][1],u[1][1]=+t[1][1],b):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},b.constrain=function(t){return arguments.length?(a=t,b):a},b.duration=function(t){return arguments.length?(s=+t,b):s},b.interpolate=function(t){return arguments.length?(l=t,b):l},b.on=function(){var t=h.on.apply(h,arguments);return t===h?b:t},b.clickDistance=function(t){return arguments.length?(p=(t=+t)*t,b):Math.sqrt(p)},b.tapDistance=function(t){return arguments.length?(g=+t,b):g},b}function Yr(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Vr(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Xr(t){let e,n,r;function i(t,r,i=0,a=t.length){if(i<a){if(0!==e(r,r))return a;do{const e=i+a>>>1;n(t[e],r)<0?i=e+1:a=e}while(i<a)}return i}return 2!==t.length?(e=Yr,n=(e,n)=>Yr(t(e),n),r=(e,n)=>t(e)-n):(e=t===Yr||t===Vr?t:Gr,n=t,r=t),{left:i,center:function(t,e,n=0,a=t.length){const o=i(t,e,n,a-1);return o>n&&r(t[o-1],e)>-r(t[o],e)?o-1:o},right:function(t,r,i=0,a=t.length){if(i<a){if(0!==e(r,r))return a;do{const e=i+a>>>1;n(t[e],r)<=0?i=e+1:a=e}while(i<a)}return i}}}function Gr(){return 0}Ur.prototype=Or.prototype,Xr(Yr),Xr((function(t){return null===t?NaN:+t})).center;class Zr extends Map{constructor(t,e=Qr){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(Wr(this,t))}has(t){return super.has(Wr(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){const r=e(n);t.has(r)&&(n=t.get(r),t.delete(r));return n}(this,t))}}function Wr({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function Qr(t){return null!==t&&"object"==typeof t?t.valueOf():t}function Jr(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function Kr(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}var ti="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ei="Expected a function",ni=/^\s+|\s+$/g,ri=/^[-+]0x[0-9a-f]+$/i,ii=/^0b[01]+$/i,ai=/^0o[0-7]+$/i,oi=parseInt,fi="object"==typeof ti&&ti&&ti.Object===Object&&ti,ci="object"==typeof self&&self&&self.Object===Object&&self,ui=fi||ci||Function("return this")(),si=Object.prototype.toString,li=Math.max,hi=Math.min,di=function(){return ui.Date.now()};function pi(t,e,n){var r,i,a,o,f,c,u=0,s=!1,l=!1,h=!0;if("function"!=typeof t)throw new TypeError(ei);function d(e){var n=r,a=i;return r=i=void 0,u=e,o=t.apply(a,n)}function p(t){return u=t,f=setTimeout(b,e),s?d(t):o}function g(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-u>=a}function b(){var t=di();if(g(t))return y(t);f=setTimeout(b,function(t){var n=e-(t-c);return l?hi(n,a-(t-u)):n}(t))}function y(t){return f=void 0,h&&r?d(t):(r=i=void 0,o)}function v(){var t=di(),n=g(t);if(r=arguments,i=this,c=t,n){if(void 0===f)return p(c);if(l)return f=setTimeout(b,e),d(c)}return void 0===f&&(f=setTimeout(b,e)),o}return e=bi(e)||0,gi(n)&&(s=!!n.leading,a=(l="maxWait"in n)?li(bi(n.maxWait)||0,e):a,h="trailing"in n?!!n.trailing:h),v.cancel=function(){void 0!==f&&clearTimeout(f),u=0,r=c=i=f=void 0},v.flush=function(){return void 0===f?o:y(di())},v}function gi(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function bi(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==si.call(t)}(t))return NaN;if(gi(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=gi(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(ni,"");var n=ii.test(t);return n||ai.test(t)?oi(t.slice(2),n?2:8):ri.test(t)?NaN:+t}var yi=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new TypeError(ei);return gi(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),pi(t,e,{leading:r,maxWait:e,trailing:i})},vi={Linear:{None:function(t){return t}},Quadratic:{In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},Cubic:{In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},Quartic:{In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},Quintic:{In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},Sinusoidal:{In:function(t){return 1-Math.cos(t*Math.PI/2)},Out:function(t){return Math.sin(t*Math.PI/2)},InOut:function(t){return.5*(1-Math.cos(Math.PI*t))}},Exponential:{In:function(t){return 0===t?0:Math.pow(1024,t-1)},Out:function(t){return 1===t?1:1-Math.pow(2,-10*t)},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))}},Circular:{In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},Elastic:{In:function(t){return 0===t?0:1===t?1:-Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)},Out:function(t){return 0===t?0:1===t?1:Math.pow(2,-10*t)*Math.sin(5*(t-.1)*Math.PI)+1},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?-.5*Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI):.5*Math.pow(2,-10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)+1}},Back:{In:function(t){var e=1.70158;return t*t*((e+1)*t-e)},Out:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},InOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)}},Bounce:{In:function(t){return 1-vi.Bounce.Out(1-t)},Out:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},InOut:function(t){return t<.5?.5*vi.Bounce.In(2*t):.5*vi.Bounce.Out(2*t-1)+.5}}},mi="undefined"==typeof self&&"undefined"!=typeof process&&process.hrtime?function(){var t=process.hrtime();return 1e3*t[0]+t[1]/1e6}:"undefined"!=typeof self&&void 0!==self.performance&&void 0!==self.performance.now?self.performance.now.bind(self.performance):void 0!==Date.now?Date.now:function(){return(new Date).getTime()},_i=function(){function t(){this._tweens={},this._tweensAddedDuringUpdate={}}return t.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map((function(e){return t._tweens[e]}))},t.prototype.removeAll=function(){this._tweens={}},t.prototype.add=function(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t},t.prototype.remove=function(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]},t.prototype.update=function(t,e){void 0===t&&(t=mi()),void 0===e&&(e=!1);var n=Object.keys(this._tweens);if(0===n.length)return!1;for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var r=0;r<n.length;r++){var i=this._tweens[n[r]],a=!e;i&&!1===i.update(t,a)&&!e&&delete this._tweens[n[r]]}n=Object.keys(this._tweensAddedDuringUpdate)}return!0},t}(),xi={Linear:function(t,e){var n=t.length-1,r=n*e,i=Math.floor(r),a=xi.Utils.Linear;return e<0?a(t[0],t[1],r):e>1?a(t[n],t[n-1],n-r):a(t[i],t[i+1>n?n:i+1],r-i)},Bezier:function(t,e){for(var n=0,r=t.length-1,i=Math.pow,a=xi.Utils.Bernstein,o=0;o<=r;o++)n+=i(1-e,r-o)*i(e,o)*t[o]*a(r,o);return n},CatmullRom:function(t,e){var n=t.length-1,r=n*e,i=Math.floor(r),a=xi.Utils.CatmullRom;return t[0]===t[n]?(e<0&&(i=Math.floor(r=n*(1+e))),a(t[(i-1+n)%n],t[i],t[(i+1)%n],t[(i+2)%n],r-i)):e<0?t[0]-(a(t[0],t[0],t[1],t[1],-r)-t[0]):e>1?t[n]-(a(t[n],t[n],t[n-1],t[n-1],r-n)-t[n]):a(t[i?i-1:0],t[i],t[n<i+1?n:i+1],t[n<i+2?n:i+2],r-i)},Utils:{Linear:function(t,e,n){return(e-t)*n+t},Bernstein:function(t,e){var n=xi.Utils.Factorial;return n(t)/n(e)/n(t-e)},Factorial:function(){var t=[1];return function(e){var n=1;if(t[e])return t[e];for(var r=e;r>1;r--)n*=r;return t[e]=n,n}}(),CatmullRom:function(t,e,n,r,i){var a=.5*(n-t),o=.5*(r-e),f=i*i;return(2*e-2*n+a+o)*(i*f)+(-3*e+3*n-2*a-o)*f+a*i+e}}},wi=function(){function t(){}return t.nextId=function(){return t._nextId++},t._nextId=0,t}(),ki=new _i,Mi=function(){function t(t,e){void 0===e&&(e=ki),this._object=t,this._group=e,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=vi.Linear.None,this._interpolationFunction=xi.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._id=wi.nextId(),this._isChainStopped=!1,this._goToEnd=!1}return t.prototype.getId=function(){return this._id},t.prototype.isPlaying=function(){return this._isPlaying},t.prototype.isPaused=function(){return this._isPaused},t.prototype.to=function(t,e){return this._valuesEnd=Object.create(t),void 0!==e&&(this._duration=e),this},t.prototype.duration=function(t){return this._duration=t,this},t.prototype.start=function(t){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed)for(var e in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(e),this._valuesStart[e]=this._valuesStartRepeat[e];return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=void 0!==t?"string"==typeof t?mi()+parseFloat(t):t:mi(),this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this},t.prototype._setupProperties=function(t,e,n,r){for(var i in n){var a=t[i],o=Array.isArray(a),f=o?"array":typeof a,c=!o&&Array.isArray(n[i]);if("undefined"!==f&&"function"!==f){if(c){var u=n[i];if(0===u.length)continue;u=u.map(this._handleRelativeValue.bind(this,a)),n[i]=[a].concat(u)}if("object"!==f&&!o||!a||c)void 0===e[i]&&(e[i]=a),o||(e[i]*=1),r[i]=c?n[i].slice().reverse():e[i]||0;else{for(var s in e[i]=o?[]:{},a)e[i][s]=a[s];r[i]=o?[]:{},this._setupProperties(a,e[i],n[i],r[i])}}}},t.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},t.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},t.prototype.pause=function(t){return void 0===t&&(t=mi()),this._isPaused||!this._isPlaying||(this._isPaused=!0,this._pauseStart=t,this._group&&this._group.remove(this)),this},t.prototype.resume=function(t){return void 0===t&&(t=mi()),this._isPaused&&this._isPlaying?(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this):this},t.prototype.stopChainedTweens=function(){for(var t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this},t.prototype.group=function(t){return this._group=t,this},t.prototype.delay=function(t){return this._delayTime=t,this},t.prototype.repeat=function(t){return this._initialRepeat=t,this._repeat=t,this},t.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},t.prototype.yoyo=function(t){return this._yoyo=t,this},t.prototype.easing=function(t){return this._easingFunction=t,this},t.prototype.interpolation=function(t){return this._interpolationFunction=t,this},t.prototype.chain=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._chainedTweens=t,this},t.prototype.onStart=function(t){return this._onStartCallback=t,this},t.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},t.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},t.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},t.prototype.onStop=function(t){return this._onStopCallback=t,this},t.prototype.update=function(t,e){if(void 0===t&&(t=mi()),void 0===e&&(e=!0),this._isPaused)return!0;var n,r,i=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(t>i)return!1;e&&this.start(t)}if(this._goToEnd=!1,t<this._startTime)return!0;!1===this._onStartCallbackFired&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),r=(t-this._startTime)/this._duration,r=0===this._duration||r>1?1:r;var a=this._easingFunction(r);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,a),this._onUpdateCallback&&this._onUpdateCallback(this._object,r),1===r){if(this._repeat>0){for(n in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat)this._yoyo||"string"!=typeof this._valuesEnd[n]||(this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(this._valuesEnd[n])),this._yoyo&&this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),!0}this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var o=0,f=this._chainedTweens.length;o<f;o++)this._chainedTweens[o].start(this._startTime+this._duration);return this._isPlaying=!1,!1}return!0},t.prototype._updateProperties=function(t,e,n,r){for(var i in n)if(void 0!==e[i]){var a=e[i]||0,o=n[i],f=Array.isArray(t[i]),c=Array.isArray(o);!f&&c?t[i]=this._interpolationFunction(o,r):"object"==typeof o&&o?this._updateProperties(t[i],a,o,r):"number"==typeof(o=this._handleRelativeValue(a,o))&&(t[i]=a+(o-a)*r)}},t.prototype._handleRelativeValue=function(t,e){return"string"!=typeof e?e:"+"===e.charAt(0)||"-"===e.charAt(0)?t+parseFloat(e):parseFloat(e)},t.prototype._swapEndStartRepeatValues=function(t){var e=this._valuesStartRepeat[t],n=this._valuesEnd[t];this._valuesStartRepeat[t]="string"==typeof n?this._valuesStartRepeat[t]+parseFloat(n):this._valuesEnd[t],this._valuesEnd[t]=e},t}(),Ai=wi.nextId,Ci=ki,zi=Ci.getAll.bind(Ci),Si=Ci.removeAll.bind(Ci),Ti=Ci.add.bind(Ci),Ni=Ci.remove.bind(Ci),Ei=Ci.update.bind(Ci),Pi={Easing:vi,Group:_i,Interpolation:xi,now:mi,Sequence:wi,nextId:Ai,Tween:Mi,VERSION:"18.6.4",getAll:zi,removeAll:Si,add:Ti,remove:Ni,update:Ei};function Oi(t,e,n){var r,i,a,o,f;function c(){var u=Date.now()-o;u<e&&u>=0?r=setTimeout(c,e-u):(r=null,n||(f=t.apply(a,i),a=i=null))}null==e&&(e=100);var u=function(){a=this,i=arguments,o=Date.now();var u=n&&!r;return r||(r=setTimeout(c,e)),u&&(f=t.apply(a,i),a=i=null),f};return u.clear=function(){r&&(clearTimeout(r),r=null)},u.flush=function(){r&&(f=t.apply(a,i),a=i=null,clearTimeout(r),r=null)},u}Oi.debounce=Oi;var Di=Oi;function Ui(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ji(t,e,n){return e&&Ui(t.prototype,e),n&&Ui(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ri(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,a=[],o=!0,f=!1;try{for(n=n.call(t);!(o=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);o=!0);}catch(t){f=!0,i=t}finally{try{o||null==n.return||n.return()}finally{if(f)throw i}}return a}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Fi(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fi(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fi(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Ii=ji((function t(e,n){var r=n.default,i=void 0===r?null:r,a=n.triggerUpdate,o=void 0===a||a,f=n.onChange,c=void 0===f?function(t,e){}:f;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.name=e,this.defaultVal=i,this.triggerUpdate=o,this.onChange=c}));function Li(t){var e=t.stateInit,n=void 0===e?function(){return{}}:e,r=t.props,i=void 0===r?{}:r,a=t.methods,o=void 0===a?{}:a,f=t.aliases,c=void 0===f?{}:f,u=t.init,s=void 0===u?function(){}:u,l=t.update,h=void 0===l?function(){}:l,d=Object.keys(i).map((function(t){return new Ii(t,i[t])}));return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Object.assign({},n instanceof Function?n(t):n,{initialised:!1}),r={};function i(e){return a(e,t),f(),i}var a=function(t,n){s.call(i,t,e,n),e.initialised=!0},f=Di((function(){e.initialised&&(h.call(i,e,r),r={})}),1);return d.forEach((function(t){i[t.name]=function(t){var n=t.name,a=t.triggerUpdate,o=void 0!==a&&a,c=t.onChange,u=void 0===c?function(t,e){}:c,s=t.defaultVal,l=void 0===s?null:s;return function(t){var a=e[n];if(!arguments.length)return a;var c=void 0===t?l:t;return e[n]=c,u.call(i,c,e,a),!r.hasOwnProperty(n)&&(r[n]=a),o&&f(),i}}(t)})),Object.keys(o).forEach((function(t){i[t]=function(){for(var n,r=arguments.length,a=new Array(r),f=0;f<r;f++)a[f]=arguments[f];return(n=o[t]).call.apply(n,[i,e].concat(a))}})),Object.entries(c).forEach((function(t){var e=Ri(t,2),n=e[0],r=e[1];return i[n]=i[r]})),i.resetProps=function(){return d.forEach((function(t){i[t.name](t.defaultVal)})),i},i.resetProps(),e._rerender=f,i}}var Hi=function(t){return t instanceof Function?t:"string"==typeof t?function(e){return e[t]}:function(e){return t}},qi={exports:{}};!function(t){!function(e){var n=/^\s+/,r=/\s+$/,i=0,a=e.round,o=e.min,f=e.max,c=e.random;function u(t,c){if(c=c||{},(t=t||"")instanceof u)return t;if(!(this instanceof u))return new u(t,c);var s=function(t){var i={r:0,g:0,b:0},a=1,c=null,u=null,s=null,l=!1,h=!1;"string"==typeof t&&(t=function(t){t=t.replace(n,"").replace(r,"").toLowerCase();var e,i=!1;if(z[t])t=z[t],i=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(e=L.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=L.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=L.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=L.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=L.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=L.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=L.hex8.exec(t))return{r:P(e[1]),g:P(e[2]),b:P(e[3]),a:j(e[4]),format:i?"name":"hex8"};if(e=L.hex6.exec(t))return{r:P(e[1]),g:P(e[2]),b:P(e[3]),format:i?"name":"hex"};if(e=L.hex4.exec(t))return{r:P(e[1]+""+e[1]),g:P(e[2]+""+e[2]),b:P(e[3]+""+e[3]),a:j(e[4]+""+e[4]),format:i?"name":"hex8"};if(e=L.hex3.exec(t))return{r:P(e[1]+""+e[1]),g:P(e[2]+""+e[2]),b:P(e[3]+""+e[3]),format:i?"name":"hex"};return!1}(t));"object"==typeof t&&(H(t.r)&&H(t.g)&&H(t.b)?(d=t.r,p=t.g,g=t.b,i={r:255*N(d,255),g:255*N(p,255),b:255*N(g,255)},l=!0,h="%"===String(t.r).substr(-1)?"prgb":"rgb"):H(t.h)&&H(t.s)&&H(t.v)?(c=D(t.s),u=D(t.v),i=function(t,n,r){t=6*N(t,360),n=N(n,100),r=N(r,100);var i=e.floor(t),a=t-i,o=r*(1-n),f=r*(1-a*n),c=r*(1-(1-a)*n),u=i%6;return{r:255*[r,f,o,o,c,r][u],g:255*[c,r,r,f,o,o][u],b:255*[o,o,c,r,r,f][u]}}(t.h,c,u),l=!0,h="hsv"):H(t.h)&&H(t.s)&&H(t.l)&&(c=D(t.s),s=D(t.l),i=function(t,e,n){var r,i,a;function o(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}if(t=N(t,360),e=N(e,100),n=N(n,100),0===e)r=i=a=n;else{var f=n<.5?n*(1+e):n+e-n*e,c=2*n-f;r=o(c,f,t+1/3),i=o(c,f,t),a=o(c,f,t-1/3)}return{r:255*r,g:255*i,b:255*a}}(t.h,c,s),l=!0,h="hsl"),t.hasOwnProperty("a")&&(a=t.a));var d,p,g;return a=T(a),{ok:l,format:t.format||h,r:o(255,f(i.r,0)),g:o(255,f(i.g,0)),b:o(255,f(i.b,0)),a:a}}(t);this._originalInput=t,this._r=s.r,this._g=s.g,this._b=s.b,this._a=s.a,this._roundA=a(100*this._a)/100,this._format=c.format||s.format,this._gradientType=c.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=s.ok,this._tc_id=i++}function s(t,e,n){t=N(t,255),e=N(e,255),n=N(n,255);var r,i,a=f(t,e,n),c=o(t,e,n),u=(a+c)/2;if(a==c)r=i=0;else{var s=a-c;switch(i=u>.5?s/(2-a-c):s/(a+c),a){case t:r=(e-n)/s+(e<n?6:0);break;case e:r=(n-t)/s+2;break;case n:r=(t-e)/s+4}r/=6}return{h:r,s:i,l:u}}function l(t,e,n){t=N(t,255),e=N(e,255),n=N(n,255);var r,i,a=f(t,e,n),c=o(t,e,n),u=a,s=a-c;if(i=0===a?0:s/a,a==c)r=0;else{switch(a){case t:r=(e-n)/s+(e<n?6:0);break;case e:r=(n-t)/s+2;break;case n:r=(t-e)/s+4}r/=6}return{h:r,s:i,v:u}}function h(t,e,n,r){var i=[O(a(t).toString(16)),O(a(e).toString(16)),O(a(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function d(t,e,n,r){return[O(U(r)),O(a(t).toString(16)),O(a(e).toString(16)),O(a(n).toString(16))].join("")}function p(t,e){e=0===e?0:e||10;var n=u(t).toHsl();return n.s-=e/100,n.s=E(n.s),u(n)}function g(t,e){e=0===e?0:e||10;var n=u(t).toHsl();return n.s+=e/100,n.s=E(n.s),u(n)}function b(t){return u(t).desaturate(100)}function y(t,e){e=0===e?0:e||10;var n=u(t).toHsl();return n.l+=e/100,n.l=E(n.l),u(n)}function v(t,e){e=0===e?0:e||10;var n=u(t).toRgb();return n.r=f(0,o(255,n.r-a(-e/100*255))),n.g=f(0,o(255,n.g-a(-e/100*255))),n.b=f(0,o(255,n.b-a(-e/100*255))),u(n)}function m(t,e){e=0===e?0:e||10;var n=u(t).toHsl();return n.l-=e/100,n.l=E(n.l),u(n)}function _(t,e){var n=u(t).toHsl(),r=(n.h+e)%360;return n.h=r<0?360+r:r,u(n)}function x(t){var e=u(t).toHsl();return e.h=(e.h+180)%360,u(e)}function w(t){var e=u(t).toHsl(),n=e.h;return[u(t),u({h:(n+120)%360,s:e.s,l:e.l}),u({h:(n+240)%360,s:e.s,l:e.l})]}function k(t){var e=u(t).toHsl(),n=e.h;return[u(t),u({h:(n+90)%360,s:e.s,l:e.l}),u({h:(n+180)%360,s:e.s,l:e.l}),u({h:(n+270)%360,s:e.s,l:e.l})]}function M(t){var e=u(t).toHsl(),n=e.h;return[u(t),u({h:(n+72)%360,s:e.s,l:e.l}),u({h:(n+216)%360,s:e.s,l:e.l})]}function A(t,e,n){e=e||6,n=n||30;var r=u(t).toHsl(),i=360/n,a=[u(t)];for(r.h=(r.h-(i*e>>1)+720)%360;--e;)r.h=(r.h+i)%360,a.push(u(r));return a}function C(t,e){e=e||6;for(var n=u(t).toHsv(),r=n.h,i=n.s,a=n.v,o=[],f=1/e;e--;)o.push(u({h:r,s:i,v:a})),a=(a+f)%1;return o}u.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,n,r,i=this.toRgb();return t=i.r/255,n=i.g/255,r=i.b/255,.2126*(t<=.03928?t/12.92:e.pow((t+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:e.pow((n+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:e.pow((r+.055)/1.055,2.4))},setAlpha:function(t){return this._a=T(t),this._roundA=a(100*this._a)/100,this},toHsv:function(){var t=l(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=l(this._r,this._g,this._b),e=a(360*t.h),n=a(100*t.s),r=a(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+r+"%)":"hsva("+e+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var t=s(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=s(this._r,this._g,this._b),e=a(360*t.h),n=a(100*t.s),r=a(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+r+"%)":"hsla("+e+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(t){return h(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,n,r,i){var o=[O(a(t).toString(16)),O(a(e).toString(16)),O(a(n).toString(16)),O(U(r))];if(i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(100*N(this._r,255))+"%",g:a(100*N(this._g,255))+"%",b:a(100*N(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+a(100*N(this._r,255))+"%, "+a(100*N(this._g,255))+"%, "+a(100*N(this._b,255))+"%)":"rgba("+a(100*N(this._r,255))+"%, "+a(100*N(this._g,255))+"%, "+a(100*N(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(S[h(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+d(this._r,this._g,this._b,this._a),n=e,r=this._gradientType?"GradientType = 1, ":"";if(t){var i=u(t);n="#"+d(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+e+",endColorstr="+n+")"},toString:function(t){var e=!!t;t=t||this._format;var n=!1,r=this._a<1&&this._a>=0;return e||!r||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(n=this.toRgbString()),"prgb"===t&&(n=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(n=this.toHexString()),"hex3"===t&&(n=this.toHexString(!0)),"hex4"===t&&(n=this.toHex8String(!0)),"hex8"===t&&(n=this.toHex8String()),"name"===t&&(n=this.toName()),"hsl"===t&&(n=this.toHslString()),"hsv"===t&&(n=this.toHsvString()),n||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return u(this.toString())},_applyModification:function(t,e){var n=t.apply(null,[this].concat([].slice.call(e)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(y,arguments)},brighten:function(){return this._applyModification(v,arguments)},darken:function(){return this._applyModification(m,arguments)},desaturate:function(){return this._applyModification(p,arguments)},saturate:function(){return this._applyModification(g,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(_,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(x,arguments)},monochromatic:function(){return this._applyCombination(C,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},u.fromRatio=function(t,e){if("object"==typeof t){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]="a"===r?t[r]:D(t[r]));t=n}return u(t,e)},u.equals=function(t,e){return!(!t||!e)&&u(t).toRgbString()==u(e).toRgbString()},u.random=function(){return u.fromRatio({r:c(),g:c(),b:c()})},u.mix=function(t,e,n){n=0===n?0:n||50;var r=u(t).toRgb(),i=u(e).toRgb(),a=n/100;return u({r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a})},
// <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)
// Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)
u.readability=function(t,n){var r=u(t),i=u(n);return(e.max(r.getLuminance(),i.getLuminance())+.05)/(e.min(r.getLuminance(),i.getLuminance())+.05)},u.isReadable=function(t,e,n){var r,i,a=u.readability(t,e);switch(i=!1,(r=function(t){var e,n;e=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA");"small"!==n&&"large"!==n&&(n="small");return{level:e,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":i=a>=4.5;break;case"AAlarge":i=a>=3;break;case"AAAsmall":i=a>=7}return i},u.mostReadable=function(t,e,n){var r,i,a,o,f=null,c=0;i=(n=n||{}).includeFallbackColors,a=n.level,o=n.size;for(var s=0;s<e.length;s++)(r=u.readability(t,e[s]))>c&&(c=r,f=u(e[s]));return u.isReadable(t,f,{level:a,size:o})||!i?f:(n.includeFallbackColors=!1,u.mostReadable(t,["#fff","#000"],n))};var z=u.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},S=u.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(z);function T(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function N(t,n){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var r=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=o(n,f(0,parseFloat(t))),r&&(t=parseInt(t*n,10)/100),e.abs(t-n)<1e-6?1:t%n/parseFloat(n)}function E(t){return o(1,f(0,t))}function P(t){return parseInt(t,16)}function O(t){return 1==t.length?"0"+t:""+t}function D(t){return t<=1&&(t=100*t+"%"),t}function U(t){return e.round(255*parseFloat(t)).toString(16)}function j(t){return P(t)/255}var R,F,I,L=(F="[\\s|\\(]+("+(R="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+R+")[,|\\s]+("+R+")\\s*\\)?",I="[\\s|\\(]+("+R+")[,|\\s]+("+R+")[,|\\s]+("+R+")[,|\\s]+("+R+")\\s*\\)?",{CSS_UNIT:new RegExp(R),rgb:new RegExp("rgb"+F),rgba:new RegExp("rgba"+I),hsl:new RegExp("hsl"+F),hsla:new RegExp("hsla"+I),hsv:new RegExp("hsv"+F),hsva:new RegExp("hsva"+I),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function H(t){return!!L.CSS_UNIT.exec(t)}t.exports?t.exports=u:window.tinycolor=u}(Math)}(qi);var Bi=qi.exports;function $i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Vi(t){return function(t){if(Array.isArray(t))return Xi(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Xi(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xi(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xi(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Gi=function(t,e,n){return(t<<16)+(e<<8)+n},Zi=function(t,e){return 123*t%Math.pow(2,e)},Wi=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6;$i(this,t),this.csBits=e,this.registry=["__reserved for background__"]}var e,n,r;return e=t,n=[{key:"register",value:function(t){if(this.registry.length>=Math.pow(2,24-this.csBits))return null;var e,n=this.registry.length,r=Zi(n,this.csBits),i=(e=n+(r<<24-this.csBits),"#".concat(Math.min(e,Math.pow(2,24)).toString(16).padStart(6,"0")));return this.registry.push(t),i}},{key:"lookup",value:function(t){var e,n,r,i,a="string"==typeof t?(e=Bi(t).toRgb(),n=e.r,r=e.g,i=e.b,Gi(n,r,i)):Gi.apply(void 0,Vi(t));if(!a)return null;var o=a&Math.pow(2,24-this.csBits)-1,f=a>>24-this.csBits&Math.pow(2,this.csBits)-1;return Zi(o,this.csBits)!==f||o>=this.registry.length?null:this.registry[o]}}],n&&Yi(e.prototype,n),r&&Yi(e,r),t}();function Qi(t,e,n){var r,i=1;function a(){var a,o,f=r.length,c=0,u=0,s=0;for(a=0;a<f;++a)c+=(o=r[a]).x||0,u+=o.y||0,s+=o.z||0;for(c=(c/f-t)*i,u=(u/f-e)*i,s=(s/f-n)*i,a=0;a<f;++a)o=r[a],c&&(o.x-=c),u&&(o.y-=u),s&&(o.z-=s)}return null==t&&(t=0),null==e&&(e=0),null==n&&(n=0),a.initialize=function(t){r=t},a.x=function(e){return arguments.length?(t=+e,a):t},a.y=function(t){return arguments.length?(e=+t,a):e},a.z=function(t){return arguments.length?(n=+t,a):n},a.strength=function(t){return arguments.length?(i=+t,a):i},a}function Ji(t,e,n){if(isNaN(e))return t;var r,i,a,o,f,c,u=t._root,s={data:n},l=t._x0,h=t._x1;if(!u)return t._root=s,t;for(;u.length;)if((o=e>=(i=(l+h)/2))?l=i:h=i,r=u,!(u=u[f=+o]))return r[f]=s,t;if(e===(a=+t._x.call(null,u.data)))return s.next=u,r?r[f]=s:t._root=s,t;do{r=r?r[f]=new Array(2):t._root=new Array(2),(o=e>=(i=(l+h)/2))?l=i:h=i}while((f=+o)==(c=+(a>=i)));return r[c]=u,r[f]=s,t}function Ki(t,e,n){this.node=t,this.x0=e,this.x1=n}function ta(t){return t[0]}function ea(t,e){var n=new na(null==e?ta:e,NaN,NaN);return null==t?n:n.addAll(t)}function na(t,e,n){this._x=t,this._x0=e,this._x1=n,this._root=void 0}function ra(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var ia=ea.prototype=na.prototype;function aa(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a,o,f,c,u,s,l,h,d=t._root,p={data:r},g=t._x0,b=t._y0,y=t._x1,v=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((u=e>=(a=(g+y)/2))?g=a:y=a,(s=n>=(o=(b+v)/2))?b=o:v=o,i=d,!(d=d[l=s<<1|u]))return i[l]=p,t;if(f=+t._x.call(null,d.data),c=+t._y.call(null,d.data),e===f&&n===c)return p.next=d,i?i[l]=p:t._root=p,t;do{i=i?i[l]=new Array(4):t._root=new Array(4),(u=e>=(a=(g+y)/2))?g=a:y=a,(s=n>=(o=(b+v)/2))?b=o:v=o}while((l=s<<1|u)==(h=(c>=o)<<1|f>=a));return i[h]=d,i[l]=p,t}function oa(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function fa(t){return t[0]}function ca(t){return t[1]}function ua(t,e,n){var r=new sa(null==e?fa:e,null==n?ca:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function sa(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function la(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}ia.copy=function(){var t,e,n=new na(this._x,this._x0,this._x1),r=this._root;if(!r)return n;if(!r.length)return n._root=ra(r),n;for(t=[{source:r,target:n._root=new Array(2)}];r=t.pop();)for(var i=0;i<2;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(2)}):r.target[i]=ra(e));return n},ia.add=function(t){var e=+this._x.call(null,t);return Ji(this.cover(e),e,t)},ia.addAll=function(t){var e,n,r=t.length,i=new Array(r),a=1/0,o=-1/0;for(e=0;e<r;++e)isNaN(n=+this._x.call(null,t[e]))||(i[e]=n,n<a&&(a=n),n>o&&(o=n));if(a>o)return this;for(this.cover(a).cover(o),e=0;e<r;++e)Ji(this,i[e],t[e]);return this},ia.cover=function(t){if(isNaN(t=+t))return this;var e=this._x0,n=this._x1;if(isNaN(e))n=(e=Math.floor(t))+1;else{for(var r,i,a=n-e||1,o=this._root;e>t||t>=n;)switch(i=+(t<e),(r=new Array(2))[i]=o,o=r,a*=2,i){case 0:n=e+a;break;case 1:e=n-a}this._root&&this._root.length&&(this._root=o)}return this._x0=e,this._x1=n,this},ia.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},ia.extent=function(t){return arguments.length?this.cover(+t[0][0]).cover(+t[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]},ia.find=function(t,e){var n,r,i,a,o,f=this._x0,c=this._x1,u=[],s=this._root;for(s&&u.push(new Ki(s,f,c)),null==e?e=1/0:(f=t-e,c=t+e);a=u.pop();)if(!(!(s=a.node)||(r=a.x0)>c||(i=a.x1)<f))if(s.length){var l=(r+i)/2;u.push(new Ki(s[1],l,i),new Ki(s[0],r,l)),(o=+(t>=l))&&(a=u[u.length-1],u[u.length-1]=u[u.length-1-o],u[u.length-1-o]=a)}else{var h=Math.abs(t-+this._x.call(null,s.data));h<e&&(e=h,f=t-h,c=t+h,n=s.data)}return n},ia.remove=function(t){if(isNaN(a=+this._x.call(null,t)))return this;var e,n,r,i,a,o,f,c,u,s=this._root,l=this._x0,h=this._x1;if(!s)return this;if(s.length)for(;;){if((f=a>=(o=(l+h)/2))?l=o:h=o,e=s,!(s=s[c=+f]))return this;if(!s.length)break;e[c+1&1]&&(n=e,u=c)}for(;s.data!==t;)if(r=s,!(s=s.next))return this;return(i=s.next)&&delete s.next,r?(i?r.next=i:delete r.next,this):e?(i?e[c]=i:delete e[c],(s=e[0]||e[1])&&s===(e[1]||e[0])&&!s.length&&(n?n[u]=s:this._root=s),this):(this._root=i,this)},ia.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},ia.root=function(){return this._root},ia.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},ia.visit=function(t){var e,n,r,i,a=[],o=this._root;for(o&&a.push(new Ki(o,this._x0,this._x1));e=a.pop();)if(!t(o=e.node,r=e.x0,i=e.x1)&&o.length){var f=(r+i)/2;(n=o[1])&&a.push(new Ki(n,f,i)),(n=o[0])&&a.push(new Ki(n,r,f))}return this},ia.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new Ki(this._root,this._x0,this._x1));e=n.pop();){var i=e.node;if(i.length){var a,o=e.x0,f=e.x1,c=(o+f)/2;(a=i[0])&&n.push(new Ki(a,o,c)),(a=i[1])&&n.push(new Ki(a,c,f))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.x1);return this},ia.x=function(t){return arguments.length?(this._x=t,this):this._x};var ha=ua.prototype=sa.prototype;function da(t,e,n,r,i){if(isNaN(e)||isNaN(n)||isNaN(r))return t;var a,o,f,c,u,s,l,h,d,p,g,b,y=t._root,v={data:i},m=t._x0,_=t._y0,x=t._z0,w=t._x1,k=t._y1,M=t._z1;if(!y)return t._root=v,t;for(;y.length;)if((h=e>=(o=(m+w)/2))?m=o:w=o,(d=n>=(f=(_+k)/2))?_=f:k=f,(p=r>=(c=(x+M)/2))?x=c:M=c,a=y,!(y=y[g=p<<2|d<<1|h]))return a[g]=v,t;if(u=+t._x.call(null,y.data),s=+t._y.call(null,y.data),l=+t._z.call(null,y.data),e===u&&n===s&&r===l)return v.next=y,a?a[g]=v:t._root=v,t;do{a=a?a[g]=new Array(8):t._root=new Array(8),(h=e>=(o=(m+w)/2))?m=o:w=o,(d=n>=(f=(_+k)/2))?_=f:k=f,(p=r>=(c=(x+M)/2))?x=c:M=c}while((g=p<<2|d<<1|h)==(b=(l>=c)<<2|(s>=f)<<1|u>=o));return a[b]=y,a[g]=v,t}function pa(t,e,n,r,i,a,o){this.node=t,this.x0=e,this.y0=n,this.z0=r,this.x1=i,this.y1=a,this.z1=o}function ga(t){return t[0]}function ba(t){return t[1]}function ya(t){return t[2]}function va(t,e,n,r){var i=new ma(null==e?ga:e,null==n?ba:n,null==r?ya:r,NaN,NaN,NaN,NaN,NaN,NaN);return null==t?i:i.addAll(t)}function ma(t,e,n,r,i,a,o,f,c){this._x=t,this._y=e,this._z=n,this._x0=r,this._y0=i,this._z0=a,this._x1=o,this._y1=f,this._z1=c,this._root=void 0}function _a(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}ha.copy=function(){var t,e,n=new sa(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=la(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=la(e));return n},ha.add=function(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return aa(this.cover(e,n),e,n,t)},ha.addAll=function(t){var e,n,r,i,a=t.length,o=new Array(a),f=new Array(a),c=1/0,u=1/0,s=-1/0,l=-1/0;for(n=0;n<a;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(o[n]=r,f[n]=i,r<c&&(c=r),r>s&&(s=r),i<u&&(u=i),i>l&&(l=i));if(c>s||u>l)return this;for(this.cover(c,u).cover(s,l),n=0;n<a;++n)aa(this,o[n],f[n],t[n]);return this},ha.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,f,c=i-n||1,u=this._root;n>t||t>=i||r>e||e>=a;)switch(f=(e<r)<<1|t<n,(o=new Array(4))[f]=u,u=o,c*=2,f){case 0:i=n+c,a=r+c;break;case 1:n=i-c,a=r+c;break;case 2:i=n+c,r=a-c;break;case 3:n=i-c,r=a-c}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this},ha.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},ha.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},ha.find=function(t,e,n){var r,i,a,o,f,c,u,s=this._x0,l=this._y0,h=this._x1,d=this._y1,p=[],g=this._root;for(g&&p.push(new oa(g,s,l,h,d)),null==n?n=1/0:(s=t-n,l=e-n,h=t+n,d=e+n,n*=n);c=p.pop();)if(!(!(g=c.node)||(i=c.x0)>h||(a=c.y0)>d||(o=c.x1)<s||(f=c.y1)<l))if(g.length){var b=(i+o)/2,y=(a+f)/2;p.push(new oa(g[3],b,y,o,f),new oa(g[2],i,y,b,f),new oa(g[1],b,a,o,y),new oa(g[0],i,a,b,y)),(u=(e>=y)<<1|t>=b)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-u],p[p.length-1-u]=c)}else{var v=t-+this._x.call(null,g.data),m=e-+this._y.call(null,g.data),_=v*v+m*m;if(_<n){var x=Math.sqrt(n=_);s=t-x,l=e-x,h=t+x,d=e+x,r=g.data}}return r},ha.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,n,r,i,a,o,f,c,u,s,l,h,d=this._root,p=this._x0,g=this._y0,b=this._x1,y=this._y1;if(!d)return this;if(d.length)for(;;){if((u=a>=(f=(p+b)/2))?p=f:b=f,(s=o>=(c=(g+y)/2))?g=c:y=c,e=d,!(d=d[l=s<<1|u]))return this;if(!d.length)break;(e[l+1&3]||e[l+2&3]||e[l+3&3])&&(n=e,h=l)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):e?(i?e[l]=i:delete e[l],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[h]=d:this._root=d),this):(this._root=i,this)},ha.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},ha.root=function(){return this._root},ha.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},ha.visit=function(t){var e,n,r,i,a,o,f=[],c=this._root;for(c&&f.push(new oa(c,this._x0,this._y0,this._x1,this._y1));e=f.pop();)if(!t(c=e.node,r=e.x0,i=e.y0,a=e.x1,o=e.y1)&&c.length){var u=(r+a)/2,s=(i+o)/2;(n=c[3])&&f.push(new oa(n,u,s,a,o)),(n=c[2])&&f.push(new oa(n,r,s,u,o)),(n=c[1])&&f.push(new oa(n,u,i,a,s)),(n=c[0])&&f.push(new oa(n,r,i,u,s))}return this},ha.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new oa(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var a,o=e.x0,f=e.y0,c=e.x1,u=e.y1,s=(o+c)/2,l=(f+u)/2;(a=i[0])&&n.push(new oa(a,o,f,s,l)),(a=i[1])&&n.push(new oa(a,s,f,c,l)),(a=i[2])&&n.push(new oa(a,o,l,s,u)),(a=i[3])&&n.push(new oa(a,s,l,c,u))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},ha.x=function(t){return arguments.length?(this._x=t,this):this._x},ha.y=function(t){return arguments.length?(this._y=t,this):this._y};var xa=va.prototype=ma.prototype;function wa(t){return function(){return t}}function ka(t){return 1e-6*(t()-.5)}function Ma(t){return t.index}function Aa(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function Ca(t){var e,n,r,i,a,o,f,c=Ma,u=function(t){return 1/Math.min(a[t.source.index],a[t.target.index])},s=wa(30),l=1;function h(r){for(var a=0,c=t.length;a<l;++a)for(var u,s,h,d,p,g=0,b=0,y=0,v=0;g<c;++g)s=(u=t[g]).source,b=(h=u.target).x+h.vx-s.x-s.vx||ka(f),i>1&&(y=h.y+h.vy-s.y-s.vy||ka(f)),i>2&&(v=h.z+h.vz-s.z-s.vz||ka(f)),b*=d=((d=Math.sqrt(b*b+y*y+v*v))-n[g])/d*r*e[g],y*=d,v*=d,h.vx-=b*(p=o[g]),i>1&&(h.vy-=y*p),i>2&&(h.vz-=v*p),s.vx+=b*(p=1-p),i>1&&(s.vy+=y*p),i>2&&(s.vz+=v*p)}function d(){if(r){var i,f,u=r.length,s=t.length,l=new Map(r.map(((t,e)=>[c(t,e,r),t])));for(i=0,a=new Array(u);i<s;++i)(f=t[i]).index=i,"object"!=typeof f.source&&(f.source=Aa(l,f.source)),"object"!=typeof f.target&&(f.target=Aa(l,f.target)),a[f.source.index]=(a[f.source.index]||0)+1,a[f.target.index]=(a[f.target.index]||0)+1;for(i=0,o=new Array(s);i<s;++i)f=t[i],o[i]=a[f.source.index]/(a[f.source.index]+a[f.target.index]);e=new Array(s),p(),n=new Array(s),g()}}function p(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+u(t[n],n,t)}function g(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+s(t[e],e,t)}return null==t&&(t=[]),h.initialize=function(t,...e){r=t,f=e.find((t=>"function"==typeof t))||Math.random,i=e.find((t=>[1,2,3].includes(t)))||2,d()},h.links=function(e){return arguments.length?(t=e,d(),h):t},h.id=function(t){return arguments.length?(c=t,h):c},h.iterations=function(t){return arguments.length?(l=+t,h):l},h.strength=function(t){return arguments.length?(u="function"==typeof t?t:wa(+t),p(),h):u},h.distance=function(t){return arguments.length?(s="function"==typeof t?t:wa(+t),g(),h):s},h}xa.copy=function(){var t,e,n=new ma(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),r=this._root;if(!r)return n;if(!r.length)return n._root=_a(r),n;for(t=[{source:r,target:n._root=new Array(8)}];r=t.pop();)for(var i=0;i<8;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(8)}):r.target[i]=_a(e));return n},xa.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t),r=+this._z.call(null,t);return da(this.cover(e,n,r),e,n,r,t)},xa.addAll=function(t){var e,n,r,i,a,o=t.length,f=new Array(o),c=new Array(o),u=new Array(o),s=1/0,l=1/0,h=1/0,d=-1/0,p=-1/0,g=-1/0;for(n=0;n<o;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||isNaN(a=+this._z.call(null,e))||(f[n]=r,c[n]=i,u[n]=a,r<s&&(s=r),r>d&&(d=r),i<l&&(l=i),i>p&&(p=i),a<h&&(h=a),a>g&&(g=a));if(s>d||l>p||h>g)return this;for(this.cover(s,l,h).cover(d,p,g),n=0;n<o;++n)da(this,f[n],c[n],u[n],t[n]);return this},xa.cover=function(t,e,n){if(isNaN(t=+t)||isNaN(e=+e)||isNaN(n=+n))return this;var r=this._x0,i=this._y0,a=this._z0,o=this._x1,f=this._y1,c=this._z1;if(isNaN(r))o=(r=Math.floor(t))+1,f=(i=Math.floor(e))+1,c=(a=Math.floor(n))+1;else{for(var u,s,l=o-r||1,h=this._root;r>t||t>=o||i>e||e>=f||a>n||n>=c;)switch(s=(n<a)<<2|(e<i)<<1|t<r,(u=new Array(8))[s]=h,h=u,l*=2,s){case 0:o=r+l,f=i+l,c=a+l;break;case 1:r=o-l,f=i+l,c=a+l;break;case 2:o=r+l,i=f-l,c=a+l;break;case 3:r=o-l,i=f-l,c=a+l;break;case 4:o=r+l,f=i+l,a=c-l;break;case 5:r=o-l,f=i+l,a=c-l;break;case 6:o=r+l,i=f-l,a=c-l;break;case 7:r=o-l,i=f-l,a=c-l}this._root&&this._root.length&&(this._root=h)}return this._x0=r,this._y0=i,this._z0=a,this._x1=o,this._y1=f,this._z1=c,this},xa.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},xa.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1],+t[0][2]).cover(+t[1][0],+t[1][1],+t[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]},xa.find=function(t,e,n,r){var i,a,o,f,c,u,s,l,h,d=this._x0,p=this._y0,g=this._z0,b=this._x1,y=this._y1,v=this._z1,m=[],_=this._root;for(_&&m.push(new pa(_,d,p,g,b,y,v)),null==r?r=1/0:(d=t-r,p=e-r,g=n-r,b=t+r,y=e+r,v=n+r,r*=r);l=m.pop();)if(!(!(_=l.node)||(a=l.x0)>b||(o=l.y0)>y||(f=l.z0)>v||(c=l.x1)<d||(u=l.y1)<p||(s=l.z1)<g))if(_.length){var x=(a+c)/2,w=(o+u)/2,k=(f+s)/2;m.push(new pa(_[7],x,w,k,c,u,s),new pa(_[6],a,w,k,x,u,s),new pa(_[5],x,o,k,c,w,s),new pa(_[4],a,o,k,x,w,s),new pa(_[3],x,w,f,c,u,k),new pa(_[2],a,w,f,x,u,k),new pa(_[1],x,o,f,c,w,k),new pa(_[0],a,o,f,x,w,k)),(h=(n>=k)<<2|(e>=w)<<1|t>=x)&&(l=m[m.length-1],m[m.length-1]=m[m.length-1-h],m[m.length-1-h]=l)}else{var M=t-+this._x.call(null,_.data),A=e-+this._y.call(null,_.data),C=n-+this._z.call(null,_.data),z=M*M+A*A+C*C;if(z<r){var S=Math.sqrt(r=z);d=t-S,p=e-S,g=n-S,b=t+S,y=e+S,v=n+S,i=_.data}}return i},xa.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t))||isNaN(f=+this._z.call(null,t)))return this;var e,n,r,i,a,o,f,c,u,s,l,h,d,p,g,b=this._root,y=this._x0,v=this._y0,m=this._z0,_=this._x1,x=this._y1,w=this._z1;if(!b)return this;if(b.length)for(;;){if((l=a>=(c=(y+_)/2))?y=c:_=c,(h=o>=(u=(v+x)/2))?v=u:x=u,(d=f>=(s=(m+w)/2))?m=s:w=s,e=b,!(b=b[p=d<<2|h<<1|l]))return this;if(!b.length)break;(e[p+1&7]||e[p+2&7]||e[p+3&7]||e[p+4&7]||e[p+5&7]||e[p+6&7]||e[p+7&7])&&(n=e,g=p)}for(;b.data!==t;)if(r=b,!(b=b.next))return this;return(i=b.next)&&delete b.next,r?(i?r.next=i:delete r.next,this):e?(i?e[p]=i:delete e[p],(b=e[0]||e[1]||e[2]||e[3]||e[4]||e[5]||e[6]||e[7])&&b===(e[7]||e[6]||e[5]||e[4]||e[3]||e[2]||e[1]||e[0])&&!b.length&&(n?n[g]=b:this._root=b),this):(this._root=i,this)},xa.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},xa.root=function(){return this._root},xa.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},xa.visit=function(t){var e,n,r,i,a,o,f,c,u=[],s=this._root;for(s&&u.push(new pa(s,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));e=u.pop();)if(!t(s=e.node,r=e.x0,i=e.y0,a=e.z0,o=e.x1,f=e.y1,c=e.z1)&&s.length){var l=(r+o)/2,h=(i+f)/2,d=(a+c)/2;(n=s[7])&&u.push(new pa(n,l,h,d,o,f,c)),(n=s[6])&&u.push(new pa(n,r,h,d,l,f,c)),(n=s[5])&&u.push(new pa(n,l,i,d,o,h,c)),(n=s[4])&&u.push(new pa(n,r,i,d,l,h,c)),(n=s[3])&&u.push(new pa(n,l,h,a,o,f,d)),(n=s[2])&&u.push(new pa(n,r,h,a,l,f,d)),(n=s[1])&&u.push(new pa(n,l,i,a,o,h,d)),(n=s[0])&&u.push(new pa(n,r,i,a,l,h,d))}return this},xa.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new pa(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));e=n.pop();){var i=e.node;if(i.length){var a,o=e.x0,f=e.y0,c=e.z0,u=e.x1,s=e.y1,l=e.z1,h=(o+u)/2,d=(f+s)/2,p=(c+l)/2;(a=i[0])&&n.push(new pa(a,o,f,c,h,d,p)),(a=i[1])&&n.push(new pa(a,h,f,c,u,d,p)),(a=i[2])&&n.push(new pa(a,o,d,c,h,s,p)),(a=i[3])&&n.push(new pa(a,h,d,c,u,s,p)),(a=i[4])&&n.push(new pa(a,o,f,p,h,d,l)),(a=i[5])&&n.push(new pa(a,h,f,p,u,d,l)),(a=i[6])&&n.push(new pa(a,o,d,p,h,s,l)),(a=i[7])&&n.push(new pa(a,h,d,p,u,s,l))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.z0,e.x1,e.y1,e.z1);return this},xa.x=function(t){return arguments.length?(this._x=t,this):this._x},xa.y=function(t){return arguments.length?(this._y=t,this):this._y},xa.z=function(t){return arguments.length?(this._z=t,this):this._z};const za=4294967296;function Sa(t){return t.x}function Ta(t){return t.y}function Na(t){return t.z}var Ea=Math.PI*(3-Math.sqrt(5)),Pa=20*Math.PI/(9+Math.sqrt(221));function Oa(t,e){e=e||2;var n,r=Math.min(3,Math.max(1,Math.round(e))),i=1,a=.001,o=1-Math.pow(a,1/300),f=0,c=.6,u=new Map,s=Fn(d),l=Et("tick","end"),h=function(){let t=1;return()=>(t=(1664525*t+1013904223)%za)/za}();function d(){p(),l.call("tick",n),i<a&&(s.stop(),l.call("end",n))}function p(e){var a,s,l=t.length;void 0===e&&(e=1);for(var h=0;h<e;++h)for(i+=(f-i)*o,u.forEach((function(t){t(i)})),a=0;a<l;++a)null==(s=t[a]).fx?s.x+=s.vx*=c:(s.x=s.fx,s.vx=0),r>1&&(null==s.fy?s.y+=s.vy*=c:(s.y=s.fy,s.vy=0)),r>2&&(null==s.fz?s.z+=s.vz*=c:(s.z=s.fz,s.vz=0));return n}function g(){for(var e,n=0,i=t.length;n<i;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),null!=e.fz&&(e.z=e.fz),isNaN(e.x)||r>1&&isNaN(e.y)||r>2&&isNaN(e.z)){var a=10*(r>2?Math.cbrt(.5+n):r>1?Math.sqrt(.5+n):n),o=n*Ea,f=n*Pa;1===r?e.x=a:2===r?(e.x=a*Math.cos(o),e.y=a*Math.sin(o)):(e.x=a*Math.sin(o)*Math.cos(f),e.y=a*Math.cos(o),e.z=a*Math.sin(o)*Math.sin(f))}(isNaN(e.vx)||r>1&&isNaN(e.vy)||r>2&&isNaN(e.vz))&&(e.vx=0,r>1&&(e.vy=0),r>2&&(e.vz=0))}}function b(e){return e.initialize&&e.initialize(t,h,r),e}return null==t&&(t=[]),g(),n={tick:p,restart:function(){return s.restart(d),n},stop:function(){return s.stop(),n},numDimensions:function(t){return arguments.length?(r=Math.min(3,Math.max(1,Math.round(t))),u.forEach(b),n):r},nodes:function(e){return arguments.length?(t=e,g(),u.forEach(b),n):t},alpha:function(t){return arguments.length?(i=+t,n):i},alphaMin:function(t){return arguments.length?(a=+t,n):a},alphaDecay:function(t){return arguments.length?(o=+t,n):+o},alphaTarget:function(t){return arguments.length?(f=+t,n):f},velocityDecay:function(t){return arguments.length?(c=1-t,n):1-c},randomSource:function(t){return arguments.length?(h=t,u.forEach(b),n):h},force:function(t,e){return arguments.length>1?(null==e?u.delete(t):u.set(t,b(e)),n):u.get(t)},find:function(){var e,n,i,a,o,f,c=Array.prototype.slice.call(arguments),u=c.shift()||0,s=(r>1?c.shift():null)||0,l=(r>2?c.shift():null)||0,h=c.shift()||1/0,d=0,p=t.length;for(h*=h,d=0;d<p;++d)(a=(e=u-(o=t[d]).x)*e+(n=s-(o.y||0))*n+(i=l-(o.z||0))*i)<h&&(f=o,h=a);return f},on:function(t,e){return arguments.length>1?(l.on(t,e),n):l.on(t)}}}function Da(){var t,e,n,r,i,a,o=wa(-30),f=1,c=1/0,u=.81;function s(r){var a,o=t.length,f=(1===e?ea(t,Sa):2===e?ua(t,Sa,Ta):3===e?va(t,Sa,Ta,Na):null).visitAfter(h);for(i=r,a=0;a<o;++a)n=t[a],f.visit(d)}function l(){if(t){var e,n,r=t.length;for(a=new Array(r),e=0;e<r;++e)n=t[e],a[n.index]=+o(n,e,t)}}function h(t){var n,r,i,o,f,c,u=0,s=0,l=t.length;if(l){for(i=o=f=c=0;c<l;++c)(n=t[c])&&(r=Math.abs(n.value))&&(u+=n.value,s+=r,i+=r*(n.x||0),o+=r*(n.y||0),f+=r*(n.z||0));u*=Math.sqrt(4/l),t.x=i/s,e>1&&(t.y=o/s),e>2&&(t.z=f/s)}else{(n=t).x=n.data.x,e>1&&(n.y=n.data.y),e>2&&(n.z=n.data.z);do{u+=a[n.data.index]}while(n=n.next)}t.value=u}function d(t,o,s,l,h){if(!t.value)return!0;var d=[s,l,h][e-1],p=t.x-n.x,g=e>1?t.y-n.y:0,b=e>2?t.z-n.z:0,y=d-o,v=p*p+g*g+b*b;if(y*y/u<v)return v<c&&(0===p&&(v+=(p=ka(r))*p),e>1&&0===g&&(v+=(g=ka(r))*g),e>2&&0===b&&(v+=(b=ka(r))*b),v<f&&(v=Math.sqrt(f*v)),n.vx+=p*t.value*i/v,e>1&&(n.vy+=g*t.value*i/v),e>2&&(n.vz+=b*t.value*i/v)),!0;if(!(t.length||v>=c)){(t.data!==n||t.next)&&(0===p&&(v+=(p=ka(r))*p),e>1&&0===g&&(v+=(g=ka(r))*g),e>2&&0===b&&(v+=(b=ka(r))*b),v<f&&(v=Math.sqrt(f*v)));do{t.data!==n&&(y=a[t.data.index]*i/v,n.vx+=p*y,e>1&&(n.vy+=g*y),e>2&&(n.vz+=b*y))}while(t=t.next)}}return s.initialize=function(n,...i){t=n,r=i.find((t=>"function"==typeof t))||Math.random,e=i.find((t=>[1,2,3].includes(t)))||2,l()},s.strength=function(t){return arguments.length?(o="function"==typeof t?t:wa(+t),l(),s):o},s.distanceMin=function(t){return arguments.length?(f=t*t,s):Math.sqrt(f)},s.distanceMax=function(t){return arguments.length?(c=t*t,s):Math.sqrt(c)},s.theta=function(t){return arguments.length?(u=t*t,s):Math.sqrt(u)},s}const{abs:Ua,cos:ja,sin:Ra,acos:Fa,atan2:Ia,sqrt:La,pow:Ha}=Math;function qa(t){return t<0?-Ha(-t,1/3):Ha(t,1/3)}const Ba=Math.PI,$a=2*Ba,Ya=Ba/2,Va=Number.MAX_SAFE_INTEGER||9007199254740991,Xa=Number.MIN_SAFE_INTEGER||-9007199254740991,Ga={x:0,y:0,z:0},Za={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(t,e){const n=e(t);let r=n.x*n.x+n.y*n.y;return void 0!==n.z&&(r+=n.z*n.z),La(r)},compute:function(t,e,n){if(0===t)return e[0].t=0,e[0];const r=e.length-1;if(1===t)return e[r].t=1,e[r];const i=1-t;let a=e;if(0===r)return e[0].t=t,e[0];if(1===r){const e={x:i*a[0].x+t*a[1].x,y:i*a[0].y+t*a[1].y,t:t};return n&&(e.z=i*a[0].z+t*a[1].z),e}if(r<4){let e,o,f,c=i*i,u=t*t,s=0;2===r?(a=[a[0],a[1],a[2],Ga],e=c,o=i*t*2,f=u):3===r&&(e=c*i,o=c*t*3,f=i*u*3,s=t*u);const l={x:e*a[0].x+o*a[1].x+f*a[2].x+s*a[3].x,y:e*a[0].y+o*a[1].y+f*a[2].y+s*a[3].y,t:t};return n&&(l.z=e*a[0].z+o*a[1].z+f*a[2].z+s*a[3].z),l}const o=JSON.parse(JSON.stringify(e));for(;o.length>1;){for(let e=0;e<o.length-1;e++)o[e]={x:o[e].x+(o[e+1].x-o[e].x)*t,y:o[e].y+(o[e+1].y-o[e].y)*t},void 0!==o[e].z&&(o[e]=o[e].z+(o[e+1].z-o[e].z)*t);o.splice(o.length-1,1)}return o[0].t=t,o[0]},computeWithRatios:function(t,e,n,r){const i=1-t,a=n,o=e;let f,c=a[0],u=a[1],s=a[2],l=a[3];return c*=i,u*=t,2===o.length?(f=c+u,{x:(c*o[0].x+u*o[1].x)/f,y:(c*o[0].y+u*o[1].y)/f,z:!!r&&(c*o[0].z+u*o[1].z)/f,t:t}):(c*=i,u*=2*i,s*=t*t,3===o.length?(f=c+u+s,{x:(c*o[0].x+u*o[1].x+s*o[2].x)/f,y:(c*o[0].y+u*o[1].y+s*o[2].y)/f,z:!!r&&(c*o[0].z+u*o[1].z+s*o[2].z)/f,t:t}):(c*=i,u*=1.5*i,s*=3*i,l*=t*t*t,4===o.length?(f=c+u+s+l,{x:(c*o[0].x+u*o[1].x+s*o[2].x+l*o[3].x)/f,y:(c*o[0].y+u*o[1].y+s*o[2].y+l*o[3].y)/f,z:!!r&&(c*o[0].z+u*o[1].z+s*o[2].z+l*o[3].z)/f,t:t}):void 0))},derive:function(t,e){const n=[];for(let r=t,i=r.length,a=i-1;i>1;i--,a--){const t=[];for(let n,i=0;i<a;i++)n={x:a*(r[i+1].x-r[i].x),y:a*(r[i+1].y-r[i].y)},e&&(n.z=a*(r[i+1].z-r[i].z)),t.push(n);n.push(t),r=t}return n},between:function(t,e,n){return e<=t&&t<=n||Za.approximately(t,e)||Za.approximately(t,n)},approximately:function(t,e,n){return Ua(t-e)<=(n||1e-6)},length:function(t){const e=Za.Tvalues.length;let n=0;for(let r,i=0;i<e;i++)r=.5*Za.Tvalues[i]+.5,n+=Za.Cvalues[i]*Za.arcfn(r,t);return.5*n},map:function(t,e,n,r,i){return r+(i-r)*((t-e)/(n-e))},lerp:function(t,e,n){const r={x:e.x+t*(n.x-e.x),y:e.y+t*(n.y-e.y)};return void 0!==e.z&&void 0!==n.z&&(r.z=e.z+t*(n.z-e.z)),r},pointToString:function(t){let e=t.x+"/"+t.y;return void 0!==t.z&&(e+="/"+t.z),e},pointsToString:function(t){return"["+t.map(Za.pointToString).join(", ")+"]"},copy:function(t){return JSON.parse(JSON.stringify(t))},angle:function(t,e,n){const r=e.x-t.x,i=e.y-t.y,a=n.x-t.x,o=n.y-t.y;return Ia(r*o-i*a,r*a+i*o)},round:function(t,e){const n=""+t,r=n.indexOf(".");return parseFloat(n.substring(0,r+1+e))},dist:function(t,e){const n=t.x-e.x,r=t.y-e.y;return La(n*n+r*r)},closest:function(t,e){let n,r,i=Ha(2,63);return t.forEach((function(t,a){r=Za.dist(e,t),r<i&&(i=r,n=a)})),{mdist:i,mpos:n}},abcratio:function(t,e){if(2!==e&&3!==e)return!1;if(void 0===t)t=.5;else if(0===t||1===t)return t;const n=Ha(t,e)+Ha(1-t,e);return Ua((n-1)/n)},projectionratio:function(t,e){if(2!==e&&3!==e)return!1;if(void 0===t)t=.5;else if(0===t||1===t)return t;const n=Ha(1-t,e);return n/(Ha(t,e)+n)},lli8:function(t,e,n,r,i,a,o,f){const c=(t-n)*(a-f)-(e-r)*(i-o);return 0!=c&&{x:((t*r-e*n)*(i-o)-(t-n)*(i*f-a*o))/c,y:((t*r-e*n)*(a-f)-(e-r)*(i*f-a*o))/c}},lli4:function(t,e,n,r){const i=t.x,a=t.y,o=e.x,f=e.y,c=n.x,u=n.y,s=r.x,l=r.y;return Za.lli8(i,a,o,f,c,u,s,l)},lli:function(t,e){return Za.lli4(t,t.c,e,e.c)},makeline:function(t,e){return new ao(t.x,t.y,(t.x+e.x)/2,(t.y+e.y)/2,e.x,e.y)},findbbox:function(t){let e=Va,n=Va,r=Xa,i=Xa;return t.forEach((function(t){const a=t.bbox();e>a.x.min&&(e=a.x.min),n>a.y.min&&(n=a.y.min),r<a.x.max&&(r=a.x.max),i<a.y.max&&(i=a.y.max)})),{x:{min:e,mid:(e+r)/2,max:r,size:r-e},y:{min:n,mid:(n+i)/2,max:i,size:i-n}}},shapeintersections:function(t,e,n,r,i){if(!Za.bboxoverlap(e,r))return[];const a=[],o=[t.startcap,t.forward,t.back,t.endcap],f=[n.startcap,n.forward,n.back,n.endcap];return o.forEach((function(e){e.virtual||f.forEach((function(r){if(r.virtual)return;const o=e.intersects(r,i);o.length>0&&(o.c1=e,o.c2=r,o.s1=t,o.s2=n,a.push(o))}))})),a},makeshape:function(t,e,n){const r=e.points.length,i=t.points.length,a=Za.makeline(e.points[r-1],t.points[0]),o=Za.makeline(t.points[i-1],e.points[0]),f={startcap:a,forward:t,back:e,endcap:o,bbox:Za.findbbox([a,t,e,o]),intersections:function(t){return Za.shapeintersections(f,f.bbox,t,t.bbox,n)}};return f},getminmax:function(t,e,n){if(!n)return{min:0,max:0};let r,i,a=Va,o=Xa;-1===n.indexOf(0)&&(n=[0].concat(n)),-1===n.indexOf(1)&&n.push(1);for(let f=0,c=n.length;f<c;f++)r=n[f],i=t.get(r),i[e]<a&&(a=i[e]),i[e]>o&&(o=i[e]);return{min:a,mid:(a+o)/2,max:o,size:o-a}},align:function(t,e){const n=e.p1.x,r=e.p1.y,i=-Ia(e.p2.y-r,e.p2.x-n);return t.map((function(t){return{x:(t.x-n)*ja(i)-(t.y-r)*Ra(i),y:(t.x-n)*Ra(i)+(t.y-r)*ja(i)}}))},roots:function(t,e){e=e||{p1:{x:0,y:0},p2:{x:1,y:0}};const n=t.length-1,r=Za.align(t,e),i=function(t){return 0<=t&&t<=1};if(2===n){const t=r[0].y,e=r[1].y,n=r[2].y,a=t-2*e+n;if(0!==a){const r=-La(e*e-t*n),o=-t+e;return[-(r+o)/a,-(-r+o)/a].filter(i)}return e!==n&&0===a?[(2*e-n)/(2*e-2*n)].filter(i):[]}const a=r[0].y,o=r[1].y,f=r[2].y;let c=3*o-a-3*f+r[3].y,u=3*a-6*o+3*f,s=-3*a+3*o,l=a;if(Za.approximately(c,0)){if(Za.approximately(u,0))return Za.approximately(s,0)?[]:[-l/s].filter(i);const t=La(s*s-4*u*l),e=2*u;return[(t-s)/e,(-s-t)/e].filter(i)}u/=c,s/=c,l/=c;const h=(3*s-u*u)/3,d=h/3,p=(2*u*u*u-9*u*s+27*l)/27,g=p/2,b=g*g+d*d*d;let y,v,m,_,x;if(b<0){const t=-h/3,e=La(t*t*t),n=-p/(2*e),r=Fa(n<-1?-1:n>1?1:n),a=2*qa(e);return m=a*ja(r/3)-u/3,_=a*ja((r+$a)/3)-u/3,x=a*ja((r+2*$a)/3)-u/3,[m,_,x].filter(i)}if(0===b)return y=g<0?qa(-g):-qa(g),m=2*y-u/3,_=-y-u/3,[m,_].filter(i);{const t=La(b);return y=qa(-g+t),v=qa(g+t),[y-v-u/3].filter(i)}},droots:function(t){if(3===t.length){const e=t[0],n=t[1],r=t[2],i=e-2*n+r;if(0!==i){const t=-La(n*n-e*r),a=-e+n;return[-(t+a)/i,-(-t+a)/i]}return n!==r&&0===i?[(2*n-r)/(2*(n-r))]:[]}if(2===t.length){const e=t[0],n=t[1];return e!==n?[e/(e-n)]:[]}return[]},curvature:function(t,e,n,r,i){let a,o,f,c,u=0,s=0;const l=Za.compute(t,e),h=Za.compute(t,n),d=l.x*l.x+l.y*l.y;if(r?(a=La(Ha(l.y*h.z-h.y*l.z,2)+Ha(l.z*h.x-h.z*l.x,2)+Ha(l.x*h.y-h.x*l.y,2)),o=Ha(d+l.z*l.z,1.5)):(a=l.x*h.y-l.y*h.x,o=Ha(d,1.5)),0===a||0===o)return{k:0,r:0};if(u=a/o,s=o/a,!i){const i=Za.curvature(t-.001,e,n,r,!0).k,a=Za.curvature(t+.001,e,n,r,!0).k;c=(a-u+(u-i))/2,f=(Ua(a-u)+Ua(u-i))/2}return{k:u,r:s,dk:c,adk:f}},inflections:function(t){if(t.length<4)return[];const e=Za.align(t,{p1:t[0],p2:t.slice(-1)[0]}),n=e[2].x*e[1].y,r=e[3].x*e[1].y,i=e[1].x*e[2].y,a=18*(-3*n+2*r+3*i-e[3].x*e[2].y),o=18*(3*n-r-3*i),f=18*(i-n);if(Za.approximately(a,0)){if(!Za.approximately(o,0)){let t=-f/o;if(0<=t&&t<=1)return[t]}return[]}const c=2*a;if(Za.approximately(c,0))return[];const u=o*o-4*a*f;if(u<0)return[];const s=Math.sqrt(u);return[(s-o)/c,-(o+s)/c].filter((function(t){return 0<=t&&t<=1}))},bboxoverlap:function(t,e){const n=["x","y"],r=n.length;for(let i,a,o,f,c=0;c<r;c++)if(i=n[c],a=t[i].mid,o=e[i].mid,f=(t[i].size+e[i].size)/2,Ua(a-o)>=f)return!1;return!0},expandbox:function(t,e){e.x.min<t.x.min&&(t.x.min=e.x.min),e.y.min<t.y.min&&(t.y.min=e.y.min),e.z&&e.z.min<t.z.min&&(t.z.min=e.z.min),e.x.max>t.x.max&&(t.x.max=e.x.max),e.y.max>t.y.max&&(t.y.max=e.y.max),e.z&&e.z.max>t.z.max&&(t.z.max=e.z.max),t.x.mid=(t.x.min+t.x.max)/2,t.y.mid=(t.y.min+t.y.max)/2,t.z&&(t.z.mid=(t.z.min+t.z.max)/2),t.x.size=t.x.max-t.x.min,t.y.size=t.y.max-t.y.min,t.z&&(t.z.size=t.z.max-t.z.min)},pairiteration:function(t,e,n){const r=t.bbox(),i=e.bbox(),a=1e5,o=n||.5;if(r.x.size+r.y.size<o&&i.x.size+i.y.size<o)return[(a*(t._t1+t._t2)/2|0)/a+"/"+(a*(e._t1+e._t2)/2|0)/a];let f=t.split(.5),c=e.split(.5),u=[{left:f.left,right:c.left},{left:f.left,right:c.right},{left:f.right,right:c.right},{left:f.right,right:c.left}];u=u.filter((function(t){return Za.bboxoverlap(t.left.bbox(),t.right.bbox())}));let s=[];return 0===u.length||(u.forEach((function(t){s=s.concat(Za.pairiteration(t.left,t.right,o))})),s=s.filter((function(t,e){return s.indexOf(t)===e}))),s},getccenter:function(t,e,n){const r=e.x-t.x,i=e.y-t.y,a=n.x-e.x,o=n.y-e.y,f=r*ja(Ya)-i*Ra(Ya),c=r*Ra(Ya)+i*ja(Ya),u=a*ja(Ya)-o*Ra(Ya),s=a*Ra(Ya)+o*ja(Ya),l=(t.x+e.x)/2,h=(t.y+e.y)/2,d=(e.x+n.x)/2,p=(e.y+n.y)/2,g=l+f,b=h+c,y=d+u,v=p+s,m=Za.lli8(l,h,g,b,d,p,y,v),_=Za.dist(m,t);let x,w=Ia(t.y-m.y,t.x-m.x),k=Ia(e.y-m.y,e.x-m.x),M=Ia(n.y-m.y,n.x-m.x);return w<M?((w>k||k>M)&&(w+=$a),w>M&&(x=M,M=w,w=x)):M<k&&k<w?(x=M,M=w,w=x):M+=$a,m.s=w,m.e=M,m.r=_,m},numberSort:function(t,e){return t-e}};class Wa{constructor(t){this.curves=[],this._3d=!1,t&&(this.curves=t,this._3d=this.curves[0]._3d)}valueOf(){return this.toString()}toString(){return"["+this.curves.map((function(t){return Za.pointsToString(t.points)})).join(", ")+"]"}addCurve(t){this.curves.push(t),this._3d=this._3d||t._3d}length(){return this.curves.map((function(t){return t.length()})).reduce((function(t,e){return t+e}))}curve(t){return this.curves[t]}bbox(){const t=this.curves;for(var e=t[0].bbox(),n=1;n<t.length;n++)Za.expandbox(e,t[n].bbox());return e}offset(t){const e=[];return this.curves.forEach((function(n){e.push(...n.offset(t))})),new Wa(e)}}const{abs:Qa,min:Ja,max:Ka,cos:to,sin:eo,acos:no,sqrt:ro}=Math,io=Math.PI;class ao{constructor(t){let e=t&&t.forEach?t:Array.from(arguments).slice(),n=!1;if("object"==typeof e[0]){n=e.length;const t=[];e.forEach((function(e){["x","y","z"].forEach((function(n){void 0!==e[n]&&t.push(e[n])}))})),e=t}let r=!1;const i=e.length;if(n){if(n>4){if(1!==arguments.length)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");r=!0}}else if(6!==i&&8!==i&&9!==i&&12!==i&&1!==arguments.length)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const a=this._3d=!r&&(9===i||12===i)||t&&t[0]&&void 0!==t[0].z,o=this.points=[];for(let t=0,n=a?3:2;t<i;t+=n){var f={x:e[t],y:e[t+1]};a&&(f.z=e[t+2]),o.push(f)}const c=this.order=o.length-1,u=this.dims=["x","y"];a&&u.push("z"),this.dimlen=u.length;const s=Za.align(o,{p1:o[0],p2:o[c]}),l=Za.dist(o[0],o[c]);this._linear=s.reduce(((t,e)=>t+Qa(e.y)),0)<l/50,this._lut=[],this._t1=0,this._t2=1,this.update()}static quadraticFromPoints(t,e,n,r){if(void 0===r&&(r=.5),0===r)return new ao(e,e,n);if(1===r)return new ao(t,e,e);const i=ao.getABC(2,t,e,n,r);return new ao(t,i.A,n)}static cubicFromPoints(t,e,n,r,i){void 0===r&&(r=.5);const a=ao.getABC(3,t,e,n,r);void 0===i&&(i=Za.dist(e,a.C));const o=i*(1-r)/r,f=Za.dist(t,n),c=(n.x-t.x)/f,u=(n.y-t.y)/f,s=i*c,l=i*u,h=o*c,d=o*u,p=e.x-s,g=e.y-l,b=e.x+h,y=e.y+d,v=a.A,m=v.x+(p-v.x)/(1-r),_=v.y+(g-v.y)/(1-r),x=v.x+(b-v.x)/r,w=v.y+(y-v.y)/r,k={x:t.x+(m-t.x)/r,y:t.y+(_-t.y)/r},M={x:n.x+(x-n.x)/(1-r),y:n.y+(w-n.y)/(1-r)};return new ao(t,k,M,n)}static getUtils(){return Za}getUtils(){return ao.getUtils()}static get PolyBezier(){return Wa}valueOf(){return this.toString()}toString(){return Za.pointsToString(this.points)}toSVG(){if(this._3d)return!1;const t=this.points,e=["M",t[0].x,t[0].y,2===this.order?"Q":"C"];for(let n=1,r=t.length;n<r;n++)e.push(t[n].x),e.push(t[n].y);return e.join(" ")}setRatios(t){if(t.length!==this.points.length)throw new Error("incorrect number of ratio values");this.ratios=t,this._lut=[]}verify(){const t=this.coordDigest();t!==this._print&&(this._print=t,this.update())}coordDigest(){return this.points.map((function(t,e){return""+e+t.x+t.y+(t.z?t.z:0)})).join("")}update(){this._lut=[],this.dpoints=Za.derive(this.points,this._3d),this.computedirection()}computedirection(){const t=this.points,e=Za.angle(t[0],t[this.order],t[1]);this.clockwise=e>0}length(){return Za.length(this.derivative.bind(this))}static getABC(t=2,e,n,r,i=.5){const a=Za.projectionratio(i,t),o=1-a,f={x:a*e.x+o*r.x,y:a*e.y+o*r.y},c=Za.abcratio(i,t);return{A:{x:n.x+(n.x-f.x)/c,y:n.y+(n.y-f.y)/c},B:n,C:f,S:e,E:r}}getABC(t,e){e=e||this.get(t);let n=this.points[0],r=this.points[this.order];return ao.getABC(this.order,n,e,r,t)}getLUT(t){if(this.verify(),t=t||100,this._lut.length===t)return this._lut;this._lut=[],t++,this._lut=[];for(let e,n,r=0;r<t;r++)n=r/(t-1),e=this.compute(n),e.t=n,this._lut.push(e);return this._lut}on(e,n){n=n||5;const r=this.getLUT(),i=[];for(let t,a=0,o=0;a<r.length;a++)t=r[a],Za.dist(t,e)<n&&(i.push(t),o+=a/r.length);return!!i.length&&(t/=i.length)}project(t){const e=this.getLUT(),n=e.length-1,r=Za.closest(e,t),i=r.mpos,a=(i-1)/n,o=(i+1)/n,f=.1/n;let c,u,s=r.mdist,l=a,h=l;for(s+=1;l<o+f;l+=f)c=this.compute(l),u=Za.dist(t,c),u<s&&(s=u,h=l);return h=h<0?0:h>1?1:h,c=this.compute(h),c.t=h,c.d=s,c}get(t){return this.compute(t)}point(t){return this.points[t]}compute(t){return this.ratios?Za.computeWithRatios(t,this.points,this.ratios,this._3d):Za.compute(t,this.points,this._3d,this.ratios)}raise(){const t=this.points,e=[t[0]],n=t.length;for(let r,i,a=1;a<n;a++)r=t[a],i=t[a-1],e[a]={x:(n-a)/n*r.x+a/n*i.x,y:(n-a)/n*r.y+a/n*i.y};return e[n]=t[n-1],new ao(e)}derivative(t){return Za.compute(t,this.dpoints[0],this._3d)}dderivative(t){return Za.compute(t,this.dpoints[1],this._3d)}align(){let t=this.points;return new ao(Za.align(t,{p1:t[0],p2:t[t.length-1]}))}curvature(t){return Za.curvature(t,this.dpoints[0],this.dpoints[1],this._3d)}inflections(){return Za.inflections(this.points)}normal(t){return this._3d?this.__normal3(t):this.__normal2(t)}__normal2(t){const e=this.derivative(t),n=ro(e.x*e.x+e.y*e.y);return{t:t,x:-e.y/n,y:e.x/n}}__normal3(t){const e=this.derivative(t),n=this.derivative(t+.01),r=ro(e.x*e.x+e.y*e.y+e.z*e.z),i=ro(n.x*n.x+n.y*n.y+n.z*n.z);e.x/=r,e.y/=r,e.z/=r,n.x/=i,n.y/=i,n.z/=i;const a={x:n.y*e.z-n.z*e.y,y:n.z*e.x-n.x*e.z,z:n.x*e.y-n.y*e.x},o=ro(a.x*a.x+a.y*a.y+a.z*a.z);a.x/=o,a.y/=o,a.z/=o;const f=[a.x*a.x,a.x*a.y-a.z,a.x*a.z+a.y,a.x*a.y+a.z,a.y*a.y,a.y*a.z-a.x,a.x*a.z-a.y,a.y*a.z+a.x,a.z*a.z];return{t:t,x:f[0]*e.x+f[1]*e.y+f[2]*e.z,y:f[3]*e.x+f[4]*e.y+f[5]*e.z,z:f[6]*e.x+f[7]*e.y+f[8]*e.z}}hull(t){let e=this.points,n=[],r=[],i=0;for(r[i++]=e[0],r[i++]=e[1],r[i++]=e[2],3===this.order&&(r[i++]=e[3]);e.length>1;){n=[];for(let a,o=0,f=e.length-1;o<f;o++)a=Za.lerp(t,e[o],e[o+1]),r[i++]=a,n.push(a);e=n}return r}split(t,e){if(0===t&&e)return this.split(e).left;if(1===e)return this.split(t).right;const n=this.hull(t),r={left:2===this.order?new ao([n[0],n[3],n[5]]):new ao([n[0],n[4],n[7],n[9]]),right:2===this.order?new ao([n[5],n[4],n[2]]):new ao([n[9],n[8],n[6],n[3]]),span:n};return r.left._t1=Za.map(0,0,1,this._t1,this._t2),r.left._t2=Za.map(t,0,1,this._t1,this._t2),r.right._t1=Za.map(t,0,1,this._t1,this._t2),r.right._t2=Za.map(1,0,1,this._t1,this._t2),e?(e=Za.map(e,t,1,0,1),r.right.split(e).left):r}extrema(){const t={};let e=[];return this.dims.forEach(function(n){let r=function(t){return t[n]},i=this.dpoints[0].map(r);t[n]=Za.droots(i),3===this.order&&(i=this.dpoints[1].map(r),t[n]=t[n].concat(Za.droots(i))),t[n]=t[n].filter((function(t){return t>=0&&t<=1})),e=e.concat(t[n].sort(Za.numberSort))}.bind(this)),t.values=e.sort(Za.numberSort).filter((function(t,n){return e.indexOf(t)===n})),t}bbox(){const t=this.extrema(),e={};return this.dims.forEach(function(n){e[n]=Za.getminmax(this,n,t[n])}.bind(this)),e}overlaps(t){const e=this.bbox(),n=t.bbox();return Za.bboxoverlap(e,n)}offset(t,e){if(void 0!==e){const n=this.get(t),r=this.normal(t),i={c:n,n:r,x:n.x+r.x*e,y:n.y+r.y*e};return this._3d&&(i.z=n.z+r.z*e),i}if(this._linear){const e=this.normal(0),n=this.points.map((function(n){const r={x:n.x+t*e.x,y:n.y+t*e.y};return n.z&&e.z&&(r.z=n.z+t*e.z),r}));return[new ao(n)]}return this.reduce().map((function(e){return e._linear?e.offset(t)[0]:e.scale(t)}))}simple(){if(3===this.order){const t=Za.angle(this.points[0],this.points[3],this.points[1]),e=Za.angle(this.points[0],this.points[3],this.points[2]);if(t>0&&e<0||t<0&&e>0)return!1}const t=this.normal(0),e=this.normal(1);let n=t.x*e.x+t.y*e.y;return this._3d&&(n+=t.z*e.z),Qa(no(n))<io/3}reduce(){let t,e,n=0,r=0,i=.01,a=[],o=[],f=this.extrema().values;for(-1===f.indexOf(0)&&(f=[0].concat(f)),-1===f.indexOf(1)&&f.push(1),n=f[0],t=1;t<f.length;t++)r=f[t],e=this.split(n,r),e._t1=n,e._t2=r,a.push(e),n=r;return a.forEach((function(t){for(n=0,r=0;r<=1;)for(r=n+i;r<=1.01;r+=i)if(e=t.split(n,r),!e.simple()){if(r-=i,Qa(n-r)<i)return[];e=t.split(n,r),e._t1=Za.map(n,0,1,t._t1,t._t2),e._t2=Za.map(r,0,1,t._t1,t._t2),o.push(e),n=r;break}n<1&&(e=t.split(n,1),e._t1=Za.map(n,0,1,t._t1,t._t2),e._t2=t._t2,o.push(e))})),o}translate(t,e,n){n="number"==typeof n?n:e;const r=this.order;let i=this.points.map(((t,i)=>(1-i/r)*e+i/r*n));return new ao(this.points.map(((e,n)=>({x:e.x+t.x*i[n],y:e.y+t.y*i[n]}))))}scale(t){const e=this.order;let n=!1;if("function"==typeof t&&(n=t),n&&2===e)return this.raise().scale(n);const r=this.clockwise,i=this.points;if(this._linear)return this.translate(this.normal(0),n?n(0):t,n?n(1):t);const a=n?n(0):t,o=n?n(1):t,f=[this.offset(0,10),this.offset(1,10)],c=[],u=Za.lli4(f[0],f[0].c,f[1],f[1].c);if(!u)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach((function(t){const n=c[t*e]=Za.copy(i[t*e]);n.x+=(t?o:a)*f[t].n.x,n.y+=(t?o:a)*f[t].n.y})),n?([0,1].forEach((function(a){if(2!==e||!a){var o=i[a+1],f={x:o.x-u.x,y:o.y-u.y},s=n?n((a+1)/e):t;n&&!r&&(s=-s);var l=ro(f.x*f.x+f.y*f.y);f.x/=l,f.y/=l,c[a+1]={x:o.x+s*f.x,y:o.y+s*f.y}}})),new ao(c)):([0,1].forEach((t=>{if(2===e&&t)return;const n=c[t*e],r=this.derivative(t),a={x:n.x+r.x,y:n.y+r.y};c[t+1]=Za.lli4(n,a,u,i[t+1])})),new ao(c))}outline(t,e,n,r){if(e=void 0===e?t:e,this._linear){const i=this.normal(0),a=this.points[0],o=this.points[this.points.length-1];let f,c,u;void 0===n&&(n=t,r=e),f={x:a.x+i.x*t,y:a.y+i.y*t},u={x:o.x+i.x*n,y:o.y+i.y*n},c={x:(f.x+u.x)/2,y:(f.y+u.y)/2};const s=[f,c,u];f={x:a.x-i.x*e,y:a.y-i.y*e},u={x:o.x-i.x*r,y:o.y-i.y*r},c={x:(f.x+u.x)/2,y:(f.y+u.y)/2};const l=[u,c,f],h=Za.makeline(l[2],s[0]),d=Za.makeline(s[2],l[0]),p=[h,new ao(s),d,new ao(l)];return new Wa(p)}const i=this.reduce(),a=i.length,o=[];let f,c=[],u=0,s=this.length();const l=void 0!==n&&void 0!==r;function h(t,e,n,r,i){return function(a){const o=r/n,f=(r+i)/n,c=e-t;return Za.map(a,0,1,t+o*c,t+f*c)}}i.forEach((function(i){const a=i.length();l?(o.push(i.scale(h(t,n,s,u,a))),c.push(i.scale(h(-e,-r,s,u,a)))):(o.push(i.scale(t)),c.push(i.scale(-e))),u+=a})),c=c.map((function(t){return f=t.points,f[3]?t.points=[f[3],f[2],f[1],f[0]]:t.points=[f[2],f[1],f[0]],t})).reverse();const d=o[0].points[0],p=o[a-1].points[o[a-1].points.length-1],g=c[a-1].points[c[a-1].points.length-1],b=c[0].points[0],y=Za.makeline(g,d),v=Za.makeline(p,b),m=[y].concat(o).concat([v]).concat(c);return new Wa(m)}outlineshapes(t,e,n){e=e||t;const r=this.outline(t,e).curves,i=[];for(let t=1,e=r.length;t<e/2;t++){const a=Za.makeshape(r[t],r[e-t],n);a.startcap.virtual=t>1,a.endcap.virtual=t<e/2-1,i.push(a)}return i}intersects(t,e){return t?t.p1&&t.p2?this.lineIntersects(t):(t instanceof ao&&(t=t.reduce()),this.curveintersects(this.reduce(),t,e)):this.selfintersects(e)}lineIntersects(t){const e=Ja(t.p1.x,t.p2.x),n=Ja(t.p1.y,t.p2.y),r=Ka(t.p1.x,t.p2.x),i=Ka(t.p1.y,t.p2.y);return Za.roots(this.points,t).filter((t=>{var a=this.get(t);return Za.between(a.x,e,r)&&Za.between(a.y,n,i)}))}selfintersects(t){const e=this.reduce(),n=e.length-2,r=[];for(let i,a,o,f=0;f<n;f++)a=e.slice(f,f+1),o=e.slice(f+2),i=this.curveintersects(a,o,t),r.push(...i);return r}curveintersects(t,e,n){const r=[];t.forEach((function(t){e.forEach((function(e){t.overlaps(e)&&r.push({left:t,right:e})}))}));let i=[];return r.forEach((function(t){const e=Za.pairiteration(t.left,t.right,n);e.length>0&&(i=i.concat(e))})),i}arcs(t){return t=t||.5,this._iterate(t,[])}_error(t,e,n,r){const i=(r-n)/4,a=this.get(n+i),o=this.get(r-i),f=Za.dist(t,e),c=Za.dist(t,a),u=Za.dist(t,o);return Qa(c-f)+Qa(u-f)}_iterate(t,e){let n,r=0,i=1;do{n=0,i=1;let a,o,f,c,u,s=this.get(r),l=!1,h=!1,d=i,p=1;do{if(h=l,c=f,d=(r+i)/2,a=this.get(d),o=this.get(i),f=Za.getccenter(s,a,o),f.interval={start:r,end:i},l=this._error(f,s,r,i)<=t,u=h&&!l,u||(p=i),l){if(i>=1){if(f.interval.end=p=1,c=f,i>1){let t={x:f.x+f.r*to(f.e),y:f.y+f.r*eo(f.e)};f.e+=Za.angle({x:f.x,y:f.y},t,this.get(1))}break}i+=(i-r)/2}else i=d}while(!u&&n++<100);if(n>=100)break;c=c||f,e.push(c),r=p}while(i<1);return e}}function oo(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},a=Object.keys(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function fo(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var r,i,a=[],o=!0,f=!1;try{for(n=n.call(t);!(o=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);o=!0);}catch(t){f=!0,i=t}finally{try{o||null==n.return||n.return()}finally{if(f)throw i}}return a}(t,e)||uo(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function co(t){return function(t){if(Array.isArray(t))return so(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||uo(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function uo(t,e){if(t){if("string"==typeof t)return so(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?so(t,e):void 0}}function so(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function lo(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}function ho(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}const po=Symbol("implicit");function go(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}var bo,yo=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function vo(t){if(!(e=yo.exec(t)))throw new Error("invalid format: "+t);var e;return new mo({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function mo(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function _o(t,e){var n=go(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}vo.prototype=mo.prototype,mo.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var xo={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>_o(100*t,e),r:_o,s:function(t,e){var n=go(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(bo=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+go(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function wo(t){return t}var ko,Mo=Array.prototype.map,Ao=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Co(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?wo:(e=Mo.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,f=e[0],c=0;i>0&&f>0&&(c+f+1>r&&(f=Math.max(1,r-c)),a.push(t.substring(i-=f,i+f)),!((c+=f+1)>r));)f=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",f=void 0===t.numerals?wo:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Mo.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"":t.minus+"",s=void 0===t.nan?"NaN":t.nan+"";function l(t){var e=(t=vo(t)).fill,n=t.align,l=t.sign,h=t.symbol,d=t.zero,p=t.width,g=t.comma,b=t.precision,y=t.trim,v=t.type;"n"===v?(g=!0,v="g"):xo[v]||(void 0===b&&(b=12),y=!0,v="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var m="$"===h?i:"#"===h&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",_="$"===h?a:/[%p]/.test(v)?c:"",x=xo[v],w=/[defgprs%]/.test(v);function k(t){var i,a,c,h=m,k=_;if("c"===v)k=x(t)+k,t="";else{var M=(t=+t)<0||1/t<0;if(t=isNaN(t)?s:x(Math.abs(t),b),y&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),M&&0==+t&&"+"!==l&&(M=!1),h=(M?"("===l?l:u:"-"===l||"("===l?"":l)+h,k=("s"===v?Ao[8+bo/3]:"")+k+(M&&"("===l?")":""),w)for(i=-1,a=t.length;++i<a;)if(48>(c=t.charCodeAt(i))||c>57){k=(46===c?o+t.slice(i+1):t.slice(i))+k,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var A=h.length+t.length+k.length,C=A<p?new Array(p-A+1).join(e):"";switch(g&&d&&(t=r(C+t,C.length?p-k.length:1/0),C=""),n){case"<":t=h+t+k+C;break;case"=":t=h+C+t+k;break;case"^":t=C.slice(0,A=C.length>>1)+h+t+k+C.slice(A);break;default:t=C+h+t+k}return f(t)}return b=void 0===b?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),k.toString=function(){return t+""},k}return{format:l,formatPrefix:function(t,e){var n=l(((t=vo(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(function(t){return(t=go(Math.abs(t)))?t[1]:NaN}(e)/3))),i=Math.pow(10,-r),a=Ao[8+r/3];return function(t){return n(i*t)+a}}}}(ko=Co({thousands:",",grouping:[3],currency:["$",""]})).format,ko.formatPrefix;var zo=new Date,So=new Date;function To(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,a){var o,f=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return f;do{f.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return f},i.filter=function(n){return To((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return zo.setTime(+e),So.setTime(+r),t(zo),t(So),Math.floor(n(zo,So))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var No=To((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));No.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?To((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):No:null},No.range;const Eo=1e3,Po=6e4,Oo=36e5,Do=864e5,Uo=6048e5;var jo=To((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+e*Eo)}),(function(t,e){return(e-t)/Eo}),(function(t){return t.getUTCSeconds()}));jo.range;var Ro=To((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Eo)}),(function(t,e){t.setTime(+t+e*Po)}),(function(t,e){return(e-t)/Po}),(function(t){return t.getMinutes()}));Ro.range;var Fo=To((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Eo-t.getMinutes()*Po)}),(function(t,e){t.setTime(+t+e*Oo)}),(function(t,e){return(e-t)/Oo}),(function(t){return t.getHours()}));Fo.range;var Io=To((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Po)/Do),(t=>t.getDate()-1));function Lo(t){return To((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Po)/Uo}))}Io.range;var Ho=Lo(0),qo=Lo(1),Bo=Lo(2),$o=Lo(3),Yo=Lo(4),Vo=Lo(5),Xo=Lo(6);Ho.range,qo.range,Bo.range,$o.range,Yo.range,Vo.range,Xo.range;var Go=To((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}));Go.range;var Zo=To((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));Zo.every=function(t){return isFinite(t=Math.floor(t))&&t>0?To((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null},Zo.range;var Wo=To((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*Po)}),(function(t,e){return(e-t)/Po}),(function(t){return t.getUTCMinutes()}));Wo.range;var Qo=To((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*Oo)}),(function(t,e){return(e-t)/Oo}),(function(t){return t.getUTCHours()}));Qo.range;var Jo=To((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/Do}),(function(t){return t.getUTCDate()-1}));function Ko(t){return To((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/Uo}))}Jo.range;var tf=Ko(0),ef=Ko(1),nf=Ko(2),rf=Ko(3),af=Ko(4),of=Ko(5),ff=Ko(6);tf.range,ef.range,nf.range,rf.range,af.range,of.range,ff.range;var cf=To((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()}));cf.range;var uf=To((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));function sf(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function lf(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function hf(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}uf.every=function(t){return isFinite(t=Math.floor(t))&&t>0?To((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null},uf.range;var df,pf,gf,bf={"-":"",_:" ",0:"0"},yf=/^\s*\d+/,vf=/^%/,mf=/[\\^$*+?|[\]().{}]/g;function _f(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function xf(t){return t.replace(mf,"\\$&")}function wf(t){return new RegExp("^(?:"+t.map(xf).join("|")+")","i")}function kf(t){return new Map(t.map(((t,e)=>[t.toLowerCase(),e])))}function Mf(t,e,n){var r=yf.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Af(t,e,n){var r=yf.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Cf(t,e,n){var r=yf.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function zf(t,e,n){var r=yf.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Sf(t,e,n){var r=yf.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Tf(t,e,n){var r=yf.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Nf(t,e,n){var r=yf.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Ef(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Pf(t,e,n){var r=yf.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Of(t,e,n){var r=yf.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Df(t,e,n){var r=yf.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Uf(t,e,n){var r=yf.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function jf(t,e,n){var r=yf.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Rf(t,e,n){var r=yf.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Ff(t,e,n){var r=yf.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function If(t,e,n){var r=yf.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Lf(t,e,n){var r=yf.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Hf(t,e,n){var r=vf.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function qf(t,e,n){var r=yf.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Bf(t,e,n){var r=yf.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function $f(t,e){return _f(t.getDate(),e,2)}function Yf(t,e){return _f(t.getHours(),e,2)}function Vf(t,e){return _f(t.getHours()%12||12,e,2)}function Xf(t,e){return _f(1+Io.count(Zo(t),t),e,3)}function Gf(t,e){return _f(t.getMilliseconds(),e,3)}function Zf(t,e){return Gf(t,e)+"000"}function Wf(t,e){return _f(t.getMonth()+1,e,2)}function Qf(t,e){return _f(t.getMinutes(),e,2)}function Jf(t,e){return _f(t.getSeconds(),e,2)}function Kf(t){var e=t.getDay();return 0===e?7:e}function tc(t,e){return _f(Ho.count(Zo(t)-1,t),e,2)}function ec(t){var e=t.getDay();return e>=4||0===e?Yo(t):Yo.ceil(t)}function nc(t,e){return t=ec(t),_f(Yo.count(Zo(t),t)+(4===Zo(t).getDay()),e,2)}function rc(t){return t.getDay()}function ic(t,e){return _f(qo.count(Zo(t)-1,t),e,2)}function ac(t,e){return _f(t.getFullYear()%100,e,2)}function oc(t,e){return _f((t=ec(t)).getFullYear()%100,e,2)}function fc(t,e){return _f(t.getFullYear()%1e4,e,4)}function cc(t,e){var n=t.getDay();return _f((t=n>=4||0===n?Yo(t):Yo.ceil(t)).getFullYear()%1e4,e,4)}function uc(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+_f(e/60|0,"0",2)+_f(e%60,"0",2)}function sc(t,e){return _f(t.getUTCDate(),e,2)}function lc(t,e){return _f(t.getUTCHours(),e,2)}function hc(t,e){return _f(t.getUTCHours()%12||12,e,2)}function dc(t,e){return _f(1+Jo.count(uf(t),t),e,3)}function pc(t,e){return _f(t.getUTCMilliseconds(),e,3)}function gc(t,e){return pc(t,e)+"000"}function bc(t,e){return _f(t.getUTCMonth()+1,e,2)}function yc(t,e){return _f(t.getUTCMinutes(),e,2)}function vc(t,e){return _f(t.getUTCSeconds(),e,2)}function mc(t){var e=t.getUTCDay();return 0===e?7:e}function _c(t,e){return _f(tf.count(uf(t)-1,t),e,2)}function xc(t){var e=t.getUTCDay();return e>=4||0===e?af(t):af.ceil(t)}function wc(t,e){return t=xc(t),_f(af.count(uf(t),t)+(4===uf(t).getUTCDay()),e,2)}function kc(t){return t.getUTCDay()}function Mc(t,e){return _f(ef.count(uf(t)-1,t),e,2)}function Ac(t,e){return _f(t.getUTCFullYear()%100,e,2)}function Cc(t,e){return _f((t=xc(t)).getUTCFullYear()%100,e,2)}function zc(t,e){return _f(t.getUTCFullYear()%1e4,e,4)}function Sc(t,e){var n=t.getUTCDay();return _f((t=n>=4||0===n?af(t):af.ceil(t)).getUTCFullYear()%1e4,e,4)}function Tc(){return"+0000"}function Nc(){return"%"}function Ec(t){return+t}function Pc(t){return Math.floor(+t/1e3)}!function(t){df=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,f=t.months,c=t.shortMonths,u=wf(i),s=kf(i),l=wf(a),h=kf(a),d=wf(o),p=kf(o),g=wf(f),b=kf(f),y=wf(c),v=kf(c),m={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return f[t.getMonth()]},c:null,d:$f,e:$f,f:Zf,g:oc,G:cc,H:Yf,I:Vf,j:Xf,L:Gf,m:Wf,M:Qf,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Ec,s:Pc,S:Jf,u:Kf,U:tc,V:nc,w:rc,W:ic,x:null,X:null,y:ac,Y:fc,Z:uc,"%":Nc},_={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return f[t.getUTCMonth()]},c:null,d:sc,e:sc,f:gc,g:Cc,G:Sc,H:lc,I:hc,j:dc,L:pc,m:bc,M:yc,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Ec,s:Pc,S:vc,u:mc,U:_c,V:wc,w:kc,W:Mc,x:null,X:null,y:Ac,Y:zc,Z:Tc,"%":Nc},x={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=l.exec(e.slice(n));return r?(t.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=y.exec(e.slice(n));return r?(t.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=b.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return M(t,e,n,r)},d:Df,e:Df,f:Lf,g:Nf,G:Tf,H:jf,I:jf,j:Uf,L:If,m:Of,M:Rf,p:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.p=s.get(r[0].toLowerCase()),n+r[0].length):-1},q:Pf,Q:qf,s:Bf,S:Ff,u:Af,U:Cf,V:zf,w:Mf,W:Sf,x:function(t,e,r){return M(t,n,e,r)},X:function(t,e,n){return M(t,r,e,n)},y:Nf,Y:Tf,Z:Ef,"%":Hf};function w(t,e){return function(n){var r,i,a,o=[],f=-1,c=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++f<u;)37===t.charCodeAt(f)&&(o.push(t.slice(c,f)),null!=(i=bf[r=t.charAt(++f)])?r=t.charAt(++f):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),c=f+1);return o.push(t.slice(c,f)),o.join("")}}function k(t,e){return function(n){var r,i,a=hf(1900,void 0,1);if(M(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(e&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=lf(hf(a.y,0,1))).getUTCDay(),r=i>4||0===i?ef.ceil(r):ef(r),r=Jo.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=sf(hf(a.y,0,1))).getDay(),r=i>4||0===i?qo.ceil(r):qo(r),r=Io.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?lf(hf(a.y,0,1)).getUTCDay():sf(hf(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,lf(a)):sf(a)}}function M(t,e,n,r){for(var i,a,o=0,f=e.length,c=n.length;o<f;){if(r>=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=x[i in bf?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return m.x=w(n,m),m.X=w(r,m),m.c=w(e,m),_.x=w(n,_),_.X=w(r,_),_.c=w(e,_),{format:function(t){var e=w(t+="",m);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}(t),df.format,df.parse,pf=df.utcFormat,gf=df.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var Oc="%Y-%m-%dT%H:%M:%S.%LZ";function Dc(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}Date.prototype.toISOString||pf(Oc),+new Date("2000-01-01T00:00:00.000Z")||gf(Oc),Dc("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Dc("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Dc("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666");var Uc=Dc("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");Dc("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Dc("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),Dc("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Dc("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),Dc("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Dc("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");var jc=t=>un(t[t.length-1]);function Rc(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}jc(new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(Dc)),jc(new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(Dc)),jc(new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(Dc)),jc(new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(Dc)),jc(new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(Dc)),jc(new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(Dc)),jc(new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(Dc)),jc(new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(Dc)),jc(new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(Dc)),jc(new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(Dc)),jc(new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(Dc)),jc(new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(Dc)),jc(new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(Dc)),jc(new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(Dc)),jc(new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(Dc)),jc(new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(Dc)),jc(new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(Dc)),jc(new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(Dc)),jc(new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(Dc)),jc(new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(Dc)),jc(new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(Dc)),jc(new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(Dc)),jc(new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(Dc)),jc(new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(Dc)),jc(new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(Dc)),jc(new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(Dc)),jc(new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(Dc)),Cn(tn(300,.5,0),tn(-240,.5,1)),Cn(tn(-100,.75,.35),tn(80,1.5,.8)),Cn(tn(260,.75,.35),tn(80,1.5,.8)),tn(),be(),Rc(Dc("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),Rc(Dc("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),Rc(Dc("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Rc(Dc("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));var Fc=function t(){var e=new Zr,n=[],r=[],i=po;function a(t){let a=e.get(t);if(void 0===a){if(i!==po)return i;e.set(t,a=n.push(t)-1)}return r[a%r.length]}return a.domain=function(t){if(!arguments.length)return n.slice();n=[],e=new Zr;for(const r of t)e.has(r)||e.set(r,n.push(r)-1);return a},a.range=function(t){return arguments.length?(r=Array.from(t),a):r.slice()},a.unknown=function(t){return arguments.length?(i=t,a):i},a.copy=function(){return t(n,r).unknown(i)},ho.apply(a,arguments),a}(Uc);function Ic(t,e,n){e&&"string"==typeof n&&t.filter((function(t){return!t[n]})).forEach((function(t){t[n]=Fc(e(t))}))}var Lc=function(t,e){return e.onNeedsRedraw&&e.onNeedsRedraw()},Hc=Li({props:{graphData:{default:{nodes:[],links:[]},onChange:function(t,e){e.engineRunning=!1}},dagMode:{onChange:function(t,e){!t&&(e.graphData.nodes||[]).forEach((function(t){return t.fx=t.fy=void 0}))}},dagLevelDistance:{},dagNodeFilter:{default:function(t){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4,triggerUpdate:!1,onChange:Lc},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1,onChange:Lc},nodeColor:{default:"color",triggerUpdate:!1,onChange:Lc},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:Lc},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:Lc},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:Lc},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1,onChange:Lc},linkColor:{default:"color",triggerUpdate:!1,onChange:Lc},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:Lc},linkWidth:{default:1,triggerUpdate:!1,onChange:Lc},linkCurvature:{default:0,triggerUpdate:!1,onChange:Lc},linkCanvasObject:{triggerUpdate:!1,onChange:Lc},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:Lc},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:Lc},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:Lc},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:Lc},linkDirectionalParticles:{default:0},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleWidth:{default:4,triggerUpdate:!1},linkDirectionalParticleColor:{triggerUpdate:!1},globalScale:{default:1,triggerUpdate:!1},d3AlphaMin:{default:0,triggerUpdate:!1},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(t,e){e.forceLayout.alphaDecay(t)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(t,e){e.forceLayout.alphaTarget(t)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(t,e){e.forceLayout.velocityDecay(t)}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1},onNeedsRedraw:{triggerUpdate:!1},isShadow:{default:!1,triggerUpdate:!1}},methods:{d3Force:function(t,e,n){return void 0===n?t.forceLayout.force(e):(t.forceLayout.force(e,n),this)},d3ReheatSimulation:function(t){return t.forceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(t){return t.cntTicks=0,t.startTickTime=new Date,t.engineRunning=!0,this},isEngineRunning:function(t){return!!t.engineRunning},tickFrame:function(t){var e,n,r,i,a,o;return!t.isShadow&&t.engineRunning&&(++t.cntTicks>t.cooldownTicks||new Date-t.startTickTime>t.cooldownTime||t.d3AlphaMin>0&&t.forceLayout.alpha()<t.d3AlphaMin?(t.engineRunning=!1,t.onEngineStop()):(t.forceLayout.tick(),t.onEngineTick())),function(){var e=Hi(t.linkVisibility),n=Hi(t.linkColor),r=Hi(t.linkWidth),i=Hi(t.linkLineDash),a=Hi(t.linkCurvature),o=Hi(t.linkCanvasObjectMode),f=t.ctx,s=2*t.isShadow,l=t.graphData.links.filter(e);l.forEach((function(t){var e=a(t);if(!e)return void(t.__controlPoints=null);var n=t.source,r=t.target;if(!(n&&r&&n.hasOwnProperty("x")&&r.hasOwnProperty("x")))return;var i=Math.sqrt(Math.pow(r.x-n.x,2)+Math.pow(r.y-n.y,2));if(i>0){var o=Math.atan2(r.y-n.y,r.x-n.x),f=i*e,c={x:(n.x+r.x)/2+f*Math.cos(o-Math.PI/2),y:(n.y+r.y)/2+f*Math.sin(o-Math.PI/2)};t.__controlPoints=[c.x,c.y]}else{var u=70*e;t.__controlPoints=[r.x,r.y-u,r.x+u,r.y]}}));var h=[],d=[],p=l;if(t.linkCanvasObject){var g=[],b=[];l.forEach((function(t){return({before:h,after:d,replace:g}[o(t)]||b).push(t)})),p=[].concat(u(h),d,b),h=h.concat(g)}f.save(),h.forEach((function(e){return t.linkCanvasObject(e,f,t.globalScale)})),f.restore();var y=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=(e instanceof Array?e.length?e:[void 0]:[e]).map((function(t){return{keyAccessor:t,isProp:!(t instanceof Function)}})),a=t.reduce((function(t,e){var r=t,a=e;return i.forEach((function(t,e){var o,f=t.keyAccessor;if(t.isProp){var c=a,u=c[f],s=oo(c,[f].map(lo));o=u,a=s}else o=f(a,e);e+1<i.length?(r.hasOwnProperty(o)||(r[o]={}),r=r[o]):n?(r.hasOwnProperty(o)||(r[o]=[]),r[o].push(a)):r[o]=a})),t}),{});n instanceof Function&&function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;r===i.length?Object.keys(e).forEach((function(t){return e[t]=n(e[t])})):Object.values(e).forEach((function(e){return t(e,r+1)}))}(a);var o=a;return r&&(o=[],function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];n.length===i.length?o.push({keys:n,vals:e}):Object.entries(e).forEach((function(e){var r=fo(e,2),i=r[0],a=r[1];return t(a,[].concat(co(n),[i]))}))}(a),e instanceof Array&&0===e.length&&1===o.length&&(o[0].keys=[])),o}(p,[n,r,i]);f.save(),Object.entries(y).forEach((function(e){var n=c(e,2),r=n[0],a=n[1],o=r&&"undefined"!==r?r:"rgba(0,0,0,0.15)";Object.entries(a).forEach((function(e){var n=c(e,2),r=n[0],a=n[1],l=(r||1)/t.globalScale+s;Object.entries(a).forEach((function(t){var e=c(t,2);e[0];var n=e[1],r=i(n[0]);f.beginPath(),n.forEach((function(t){var e=t.source,n=t.target;if(e&&n&&e.hasOwnProperty("x")&&n.hasOwnProperty("x")){f.moveTo(e.x,e.y);var r=t.__controlPoints;r?f[2===r.length?"quadraticCurveTo":"bezierCurveTo"].apply(f,u(r).concat([n.x,n.y])):f.lineTo(n.x,n.y)}})),f.strokeStyle=o,f.lineWidth=l,f.setLineDash(r||[]),f.stroke()}))}))})),f.restore(),f.save(),d.forEach((function(e){return t.linkCanvasObject(e,f,t.globalScale)})),f.restore()}(),!t.isShadow&&(e=Hi(t.linkDirectionalArrowLength),n=Hi(t.linkDirectionalArrowRelPos),r=Hi(t.linkVisibility),i=Hi(t.linkDirectionalArrowColor||t.linkColor),a=Hi(t.nodeVal),(o=t.ctx).save(),t.graphData.links.filter(r).forEach((function(r){var c=e(r);if(c&&!(c<0)){var s=r.source,l=r.target;if(s&&l&&s.hasOwnProperty("x")&&l.hasOwnProperty("x")){var h=Math.sqrt(Math.max(0,a(s)||1))*t.nodeRelSize,d=Math.sqrt(Math.max(0,a(l)||1))*t.nodeRelSize,p=Math.min(1,Math.max(0,n(r))),g=i(r)||"rgba(0,0,0,0.28)",b=c/1.6/2,y=r.__controlPoints&&f(ao,[s.x,s.y].concat(u(r.__controlPoints),[l.x,l.y])),v=y?function(t){return y.get(t)}:function(t){return{x:s.x+(l.x-s.x)*t||0,y:s.y+(l.y-s.y)*t||0}},m=y?y.length():Math.sqrt(Math.pow(l.x-s.x,2)+Math.pow(l.y-s.y,2)),_=h+c+(m-h-d-c)*p,x=v(_/m),w=v((_-c)/m),k=v((_-.8*c)/m),M=Math.atan2(x.y-w.y,x.x-w.x)-Math.PI/2;o.beginPath(),o.moveTo(x.x,x.y),o.lineTo(w.x+b*Math.cos(M),w.y+b*Math.sin(M)),o.lineTo(k.x,k.y),o.lineTo(w.x-b*Math.cos(M),w.y-b*Math.sin(M)),o.fillStyle=g,o.fill()}}})),o.restore()),!t.isShadow&&function(){var e=Hi(t.linkDirectionalParticles),n=Hi(t.linkDirectionalParticleSpeed),r=Hi(t.linkDirectionalParticleWidth),i=Hi(t.linkVisibility),a=Hi(t.linkDirectionalParticleColor||t.linkColor),o=t.ctx;o.save(),t.graphData.links.filter(i).forEach((function(i){var c=e(i);if(i.hasOwnProperty("__photons")&&i.__photons.length){var s=i.source,l=i.target;if(s&&l&&s.hasOwnProperty("x")&&l.hasOwnProperty("x")){var h=n(i),d=i.__photons||[],p=Math.max(0,r(i)/2)/Math.sqrt(t.globalScale),g=a(i)||"rgba(0,0,0,0.28)";o.fillStyle=g;var b=i.__controlPoints?f(ao,[s.x,s.y].concat(u(i.__controlPoints),[l.x,l.y])):null,y=0,v=!1;d.forEach((function(t){var e=!!t.__singleHop;if(t.hasOwnProperty("__progressRatio")||(t.__progressRatio=e?0:y/c),!e&&y++,t.__progressRatio+=h,t.__progressRatio>=1){if(e)return void(v=!0);t.__progressRatio=t.__progressRatio%1}var n=t.__progressRatio,r=b?b.get(n):{x:s.x+(l.x-s.x)*n||0,y:s.y+(l.y-s.y)*n||0};o.beginPath(),o.arc(r.x,r.y,p,0,2*Math.PI,!1),o.fill()})),v&&(i.__photons=i.__photons.filter((function(t){return!t.__singleHop||t.__progressRatio<=1})))}}})),o.restore()}(),function(){var e=Hi(t.nodeVisibility),n=Hi(t.nodeVal),r=Hi(t.nodeColor),i=Hi(t.nodeCanvasObjectMode),a=t.ctx,o=t.isShadow/t.globalScale,f=t.graphData.nodes.filter(e);a.save(),f.forEach((function(e){var f=i(e);if(!t.nodeCanvasObject||"before"!==f&&"replace"!==f||(t.nodeCanvasObject(e,a,t.globalScale),"replace"!==f)){var c=Math.sqrt(Math.max(0,n(e)||1))*t.nodeRelSize+o;a.beginPath(),a.arc(e.x,e.y,c,0,2*Math.PI,!1),a.fillStyle=r(e)||"rgba(31, 120, 180, 0.92)",a.fill(),t.nodeCanvasObject&&"after"===f&&t.nodeCanvasObject(e,t.ctx,t.globalScale)}else a.restore()})),a.restore()}(),this},emitParticle:function(t,e){return e&&(!e.__photons&&(e.__photons=[]),e.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:Oa().force("link",Ca()).force("charge",Da()).force("center",Qi()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(t,e){e.ctx=t},update:function(t){if(t.engineRunning=!1,t.onUpdate(),null!==t.nodeAutoColorBy&&Ic(t.graphData.nodes,Hi(t.nodeAutoColorBy),t.nodeColor),null!==t.linkAutoColorBy&&Ic(t.graphData.links,Hi(t.linkAutoColorBy),t.linkColor),t.graphData.links.forEach((function(e){e.source=e[t.linkSource],e.target=e[t.linkTarget]})),!t.isShadow){var e=Hi(t.linkDirectionalParticles);t.graphData.links.forEach((function(t){var n=Math.round(Math.abs(e(t)));n?t.__photons=u(Array(n)).map((function(){return{}})):delete t.__photons}))}t.forceLayout.stop().alpha(1).nodes(t.graphData.nodes);var n=t.forceLayout.force("link");n&&n.id((function(e){return e[t.nodeId]})).links(t.graphData.links);var a=t.dagMode&&function(t,e){var n=t.nodes,a=t.links,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},f=o.nodeFilter,s=void 0===f?function(){return!0}:f,l=o.onLoopError,h=void 0===l?function(t){throw"Invalid DAG structure! Found cycle in node path: ".concat(t.join(" -> "),".")}:l,d={};n.forEach((function(t){return d[e(t)]={data:t,out:[],depth:-1,skip:!s(t)}})),a.forEach((function(t){var n=t.source,i=t.target,a=u(n),o=u(i);if(!d.hasOwnProperty(a))throw"Missing source node with id: ".concat(a);if(!d.hasOwnProperty(o))throw"Missing target node with id: ".concat(o);var f=d[a],c=d[o];function u(t){return"object"===r(t)?e(t):t}f.out.push(c)}));var p=[];return g(Object.values(d)),Object.assign.apply(Object,[{}].concat(u(Object.entries(d).filter((function(t){return!c(t,2)[1].skip})).map((function(t){var e=c(t,2);return i({},e[0],e[1].depth)})))));function g(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=0,a=t.length;i<a;i++){var o=t[i];if(-1!==n.indexOf(o)){var f=function(){var t=[].concat(u(n.slice(n.indexOf(o))),[o]).map((function(t){return e(t.data)}));return p.some((function(e){return e.length===t.length&&e.every((function(e,n){return e===t[n]}))}))||(p.push(t),h(t)),"continue"}();if("continue"===f)continue}r>o.depth&&(o.depth=r,g(o.out,[].concat(u(n),[o]),r+(o.skip?0:1)))}}}(t.graphData,(function(e){return e[t.nodeId]}),{nodeFilter:t.dagNodeFilter,onLoopError:t.onDagError||void 0}),o=Math.max.apply(Math,u(Object.values(a||[]))),f=t.dagLevelDistance||t.graphData.nodes.length/(o||1)*2*(-1!==["radialin","radialout"].indexOf(t.dagMode)?.7:1);if(t.dagMode){var s=function(e,n){return function(r){return e?(a[r[t.nodeId]]-o/2)*f*(n?-1:1):void 0}},l=s(-1!==["lr","rl"].indexOf(t.dagMode),"rl"===t.dagMode),h=s(-1!==["td","bu"].indexOf(t.dagMode),"bu"===t.dagMode);t.graphData.nodes.filter(t.dagNodeFilter).forEach((function(t){t.fx=l(t),t.fy=h(t)}))}t.forceLayout.force("dagRadial",-1!==["radialin","radialout"].indexOf(t.dagMode)?function(t,e,n,r){var i,a,o,f,c=wa(.1);function u(t){for(var c=0,u=i.length;c<u;++c){var s=i[c],l=s.x-e||1e-6,h=(s.y||0)-n||1e-6,d=(s.z||0)-r||1e-6,p=Math.sqrt(l*l+h*h+d*d),g=(f[c]-p)*o[c]*t/p;s.vx+=l*g,a>1&&(s.vy+=h*g),a>2&&(s.vz+=d*g)}}function s(){if(i){var e,n=i.length;for(o=new Array(n),f=new Array(n),e=0;e<n;++e)f[e]=+t(i[e],e,i),o[e]=isNaN(f[e])?0:+c(i[e],e,i)}}return"function"!=typeof t&&(t=wa(+t)),null==e&&(e=0),null==n&&(n=0),null==r&&(r=0),u.initialize=function(t,...e){i=t,a=e.find((t=>[1,2,3].includes(t)))||2,s()},u.strength=function(t){return arguments.length?(c="function"==typeof t?t:wa(+t),s(),u):c},u.radius=function(e){return arguments.length?(t="function"==typeof e?e:wa(+e),s(),u):t},u.x=function(t){return arguments.length?(e=+t,u):e},u.y=function(t){return arguments.length?(n=+t,u):n},u.z=function(t){return arguments.length?(r=+t,u):r},u}((function(e){var n=a[e[t.nodeId]]||-1;return("radialin"===t.dagMode?o-n:n)*f})).strength((function(e){return t.dagNodeFilter(e)?1:0})):null);for(var d=0;d<t.warmupTicks&&!(t.d3AlphaMin>0&&t.forceLayout.alpha()<t.d3AlphaMin);d++)t.forceLayout.tick();this.resetCountdown(),t.onFinishUpdate()}});function qc(t,e){var n=t instanceof Array?t:[t],r=new e;return{linkProp:function(t){return{default:r[t](),onChange:function(e,r){n.forEach((function(n){return r[n][t](e)}))},triggerUpdate:!1}},linkMethod:function(t){return function(e){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];var o=[];return n.forEach((function(n){var r=e[n],a=r[t].apply(r,i);a!==r&&o.push(a)})),o.length?o[0]:this}}}}var Bc=qc("forceGraph",Hc),$c=qc(["forceGraph","shadowGraph"],Hc),Yc=Object.assign.apply(Object,u(["nodeColor","nodeAutoColorBy","nodeCanvasObject","nodeCanvasObjectMode","linkColor","linkAutoColorBy","linkLineDash","linkWidth","linkCanvasObject","linkCanvasObjectMode","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleWidth","linkDirectionalParticleColor","dagMode","dagLevelDistance","dagNodeFilter","onDagError","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].map((function(t){return i({},t,Bc.linkProp(t))}))).concat(u(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map((function(t){return i({},t,$c.linkProp(t))}))))),Vc=Object.assign.apply(Object,u(["d3Force","d3ReheatSimulation","emitParticle"].map((function(t){return i({},t,Bc.linkMethod(t))}))));function Xc(t){if(t.canvas){var e=t.canvas.width,n=t.canvas.height;300===e&&150===n&&(e=n=0);var r=window.devicePixelRatio;e/=r,n/=r,[t.canvas,t.shadowCanvas].forEach((function(i){i.style.width="".concat(t.width,"px"),i.style.height="".concat(t.height,"px"),i.width=t.width*r,i.height=t.height*r,e||n||i.getContext("2d").scale(r,r)}));var i=Ur(t.canvas).k;t.zoom.translateBy(t.zoom.__baseElem,(t.width-e)/2/i,(t.height-n)/2/i),t.needsRedraw=!0}}function Gc(t){var e=window.devicePixelRatio;t.setTransform(e,0,0,e,0,0)}function Zc(t,e,n){t.save(),Gc(t),t.clearRect(0,0,e,n),t.restore()}var Wc=Li({props:n({width:{default:window.innerWidth,onChange:function(t,e){return Xc(e)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(t,e){return Xc(e)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(t,e){[{type:"Node",objs:t.nodes},{type:"Link",objs:t.links}].forEach((function(t){var n=t.type;t.objs.filter((function(t){if(!t.hasOwnProperty("__indexColor"))return!0;var n=e.colorTracker.lookup(t.__indexColor);return!n||!n.hasOwnProperty("d")||n.d!==t})).forEach((function(t){t.__indexColor=e.colorTracker.register({type:n,d:t})}))})),e.forceGraph.graphData(t),e.shadowGraph.graphData(t)},triggerUpdate:!1},backgroundColor:{onChange:function(t,e){e.canvas&&t&&(e.canvas.style.background=t)},triggerUpdate:!1},nodeLabel:{default:"name",triggerUpdate:!1},nodePointerAreaPaint:{onChange:function(t,e){e.shadowGraph.nodeCanvasObject(t?function(e,n,r){return t(e,e.__indexColor,n,r)}:null),e.flushShadowCanvas&&e.flushShadowCanvas()},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(t,e){e.shadowGraph.linkCanvasObject(t?function(e,n,r){return t(e,e.__indexColor,n,r)}:null),e.flushShadowCanvas&&e.flushShadowCanvas()},triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},minZoom:{default:.01,onChange:function(t,e){e.zoom.scaleExtent([t,e.zoom.scaleExtent()[1]])},triggerUpdate:!1},maxZoom:{default:1e3,onChange:function(t,e){e.zoom.scaleExtent([e.zoom.scaleExtent()[0],t])},triggerUpdate:!1},enableNodeDrag:{default:!0,triggerUpdate:!1},enableZoomInteraction:{default:!0,triggerUpdate:!1},enablePanInteraction:{default:!0,triggerUpdate:!1},enableZoomPanInteraction:{default:!0,triggerUpdate:!1},enablePointerInteraction:{default:!0,onChange:function(t,e){e.hoverObj=null},triggerUpdate:!1},autoPauseRedraw:{default:!0,triggerUpdate:!1},onNodeDrag:{default:function(){},triggerUpdate:!1},onNodeDragEnd:{default:function(){},triggerUpdate:!1},onNodeClick:{triggerUpdate:!1},onNodeRightClick:{triggerUpdate:!1},onNodeHover:{triggerUpdate:!1},onLinkClick:{triggerUpdate:!1},onLinkRightClick:{triggerUpdate:!1},onLinkHover:{triggerUpdate:!1},onBackgroundClick:{triggerUpdate:!1},onBackgroundRightClick:{triggerUpdate:!1},onZoom:{triggerUpdate:!1},onZoomEnd:{triggerUpdate:!1},onRenderFramePre:{triggerUpdate:!1},onRenderFramePost:{triggerUpdate:!1}},Yc),aliases:{stopAnimation:"pauseAnimation"},methods:n({graph2ScreenCoords:function(t,e,n){var r=Ur(t.canvas);return{x:e*r.k+r.x,y:n*r.k+r.y}},screen2GraphCoords:function(t,e,n){var r=Ur(t.canvas);return{x:(e-r.x)/r.k,y:(n-r.y)/r.k}},centerAt:function(t,e,n,r){if(!t.canvas)return null;if(void 0!==e||void 0!==n){var i=Object.assign({},void 0!==e?{x:e}:{},void 0!==n?{y:n}:{});return r?new Pi.Tween(a()).to(i,r).easing(Pi.Easing.Quadratic.Out).onUpdate(o).start():o(i),this}return a();function a(){var e=Ur(t.canvas);return{x:(t.width/2-e.x)/e.k,y:(t.height/2-e.y)/e.k}}function o(e){var n=e.x,r=e.y;t.zoom.translateTo(t.zoom.__baseElem,void 0===n?a().x:n,void 0===r?a().y:r),t.needsRedraw=!0}},zoom:function(t,e,n){return t.canvas?void 0!==e?(n?new Pi.Tween({k:r()}).to({k:e},n).easing(Pi.Easing.Quadratic.Out).onUpdate((function(t){return i(t.k)})).start():i(e),this):r():null;function r(){return Ur(t.canvas).k}function i(e){t.zoom.scaleTo(t.zoom.__baseElem,e),t.needsRedraw=!0}},zoomToFit:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=arguments.length,i=new Array(r>3?r-3:0),a=3;a<r;a++)i[a-3]=arguments[a];var o=this.getGraphBbox.apply(this,i);if(o){var f={x:(o.x[0]+o.x[1])/2,y:(o.y[0]+o.y[1])/2},c=Math.max(1e-12,Math.min(1e12,(t.width-2*n)/(o.x[1]-o.x[0]),(t.height-2*n)/(o.y[1]-o.y[0])));this.centerAt(f.x,f.y,e),this.zoom(c,e)}return this},getGraphBbox:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0},n=Hi(t.nodeVal),r=function(e){return Math.sqrt(Math.max(0,n(e)||1))*t.nodeRelSize},i=t.graphData.nodes.filter(e).map((function(t){return{x:t.x,y:t.y,r:r(t)}}));return i.length?{x:[Kr(i,(function(t){return t.x-t.r})),Jr(i,(function(t){return t.x+t.r}))],y:[Kr(i,(function(t){return t.y-t.r})),Jr(i,(function(t){return t.y+t.r}))]}:null},pauseAnimation:function(t){return t.animationFrameRequestId&&(cancelAnimationFrame(t.animationFrameRequestId),t.animationFrameRequestId=null),this},resumeAnimation:function(t){return t.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},Vc),stateInit:function(){return{lastSetZoom:1,zoom:$r(),forceGraph:new Hc,shadowGraph:(new Hc).cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new Wi}},init:function(t,e){var r=this;t.innerHTML="";var i=document.createElement("div");i.classList.add("force-graph-container"),i.style.position="relative",t.appendChild(i),e.canvas=document.createElement("canvas"),e.backgroundColor&&(e.canvas.style.background=e.backgroundColor),i.appendChild(e.canvas),e.shadowCanvas=document.createElement("canvas");var a=e.canvas.getContext("2d"),o=e.shadowCanvas.getContext("2d"),f={x:-1e12,y:-1e12},c=function(){var t=null,n=window.devicePixelRatio,r=f.x>0&&f.y>0?o.getImageData(f.x*n,f.y*n,1,1):null;return r&&(t=e.colorTracker.lookup(r.data)),t};Ct(e.canvas).call(function(){var t,e,n,r,i=$t,a=Yt,o=Vt,f=Xt,c={},u=Et("start","drag","end"),s=0,l=0;function h(t){t.on("mousedown.drag",d).filter(f).on("touchstart.drag",b).on("touchmove.drag",y,jt).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(o,f){if(!r&&i.call(this,o,f)){var c=m(this,a.call(this,o,f),o,f,"mouse");c&&(Ct(o.view).on("mousemove.drag",p,Rt).on("mouseup.drag",g,Rt),Lt(o.view),Ft(o),n=!1,t=o.clientX,e=o.clientY,c("start",o))}}function p(r){if(It(r),!n){var i=r.clientX-t,a=r.clientY-e;n=i*i+a*a>l}c.mouse("drag",r)}function g(t){Ct(t.view).on("mousemove.drag mouseup.drag",null),Ht(t.view,n),It(t),c.mouse("end",t)}function b(t,e){if(i.call(this,t,e)){var n,r,o=t.changedTouches,f=a.call(this,t,e),c=o.length;for(n=0;n<c;++n)(r=m(this,f,t,e,o[n].identifier,o[n]))&&(Ft(t),r("start",t,o[n]))}}function y(t){var e,n,r=t.changedTouches,i=r.length;for(e=0;e<i;++e)(n=c[r[e].identifier])&&(It(t),n("drag",t,r[e]))}function v(t){var e,n,i=t.changedTouches,a=i.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),e=0;e<a;++e)(n=c[i[e].identifier])&&(Ft(t),n("end",t,i[e]))}function m(t,e,n,r,i,a){var f,l,d,p=u.copy(),g=Tt(a||n,e);if(null!=(d=o.call(t,new Bt("beforestart",{sourceEvent:n,target:h,identifier:i,active:s,x:g[0],y:g[1],dx:0,dy:0,dispatch:p}),r)))return f=d.x-g[0]||0,l=d.y-g[1]||0,function n(a,o,u){var b,y=g;switch(a){case"start":c[i]=n,b=s++;break;case"end":delete c[i],--s;case"drag":g=Tt(u||o,e),b=s}p.call(a,t,new Bt(a,{sourceEvent:o,subject:d,target:h,identifier:i,active:b,x:g[0]+f,y:g[1]+l,dx:g[0]-y[0],dy:g[1]-y[1],dispatch:p}),r)}}return h.filter=function(t){return arguments.length?(i="function"==typeof t?t:qt(!!t),h):i},h.container=function(t){return arguments.length?(a="function"==typeof t?t:qt(t),h):a},h.subject=function(t){return arguments.length?(o="function"==typeof t?t:qt(t),h):o},h.touchable=function(t){return arguments.length?(f="function"==typeof t?t:qt(!!t),h):f},h.on=function(){var t=u.on.apply(u,arguments);return t===u?h:t},h.clickDistance=function(t){return arguments.length?(l=(t=+t)*t,h):Math.sqrt(l)},h}().subject((function(){if(!e.enableNodeDrag)return null;var t=c();return t&&"Node"===t.type?t.d:null})).on("start",(function(t){var n=t.subject;n.__initialDragPos={x:n.x,y:n.y,fx:n.fx,fy:n.fy},t.active||(n.fx=n.x,n.fy=n.y),e.canvas.classList.add("grabbable")})).on("drag",(function(t){var n=t.subject,r=n.__initialDragPos,i=t,a=Ur(e.canvas).k,o={x:r.x+(i.x-r.x)/a-n.x,y:r.y+(i.y-r.y)/a-n.y};["x","y"].forEach((function(t){return n["f".concat(t)]=n[t]=r[t]+(i[t]-r[t])/a})),e.forceGraph.d3AlphaTarget(.3).resetCountdown(),e.isPointerDragging=!0,n.__dragged=!0,e.onNodeDrag(n,o)})).on("end",(function(t){var n=t.subject,r=n.__initialDragPos,i={x:n.x-r.x,y:n.y-r.y};void 0===r.fx&&(n.fx=void 0),void 0===r.fy&&(n.fy=void 0),delete n.__initialDragPos,e.forceGraph.d3AlphaTarget()&&e.forceGraph.d3AlphaTarget(0).resetCountdown(),e.canvas.classList.remove("grabbable"),e.isPointerDragging=!1,n.__dragged&&(delete n.__dragged,e.onNodeDragEnd(n,i))}))),e.zoom(e.zoom.__baseElem=Ct(e.canvas)),e.zoom.__baseElem.on("dblclick.zoom",null),e.zoom.filter((function(t){return!t.button&&e.enableZoomPanInteraction&&(e.enableZoomInteraction||"wheel"!==t.type)&&(e.enablePanInteraction||"wheel"===t.type)})).on("zoom",(function(t){var i=t.transform;[a,o].forEach((function(t){Gc(t),t.translate(i.x,i.y),t.scale(i.k,i.k)})),e.onZoom&&e.onZoom(n(n({},i),r.centerAt())),e.needsRedraw=!0})).on("end",(function(t){return e.onZoomEnd&&e.onZoomEnd(n(n({},t.transform),r.centerAt()))})),Xc(e),e.forceGraph.onNeedsRedraw((function(){return e.needsRedraw=!0})).onFinishUpdate((function(){Ur(e.canvas).k===e.lastSetZoom&&e.graphData.nodes.length&&(e.zoom.scaleTo(e.zoom.__baseElem,e.lastSetZoom=4/Math.cbrt(e.graphData.nodes.length)),e.needsRedraw=!0)}));var u=document.createElement("div");u.classList.add("graph-tooltip"),i.appendChild(u),["pointermove","pointerdown"].forEach((function(t){return i.addEventListener(t,(function(n){"pointerdown"===t&&(e.isPointerPressed=!0,e.pointerDownEvent=n),!e.isPointerDragging&&"pointermove"===n.type&&e.onBackgroundClick&&(n.pressure>0||e.isPointerPressed)&&("touch"!==n.pointerType||void 0===n.movementX||[n.movementX,n.movementY].some((function(t){return Math.abs(t)>1})))&&(e.isPointerDragging=!0);var r,a,o,c=(r=i.getBoundingClientRect(),a=window.pageXOffset||document.documentElement.scrollLeft,o=window.pageYOffset||document.documentElement.scrollTop,{top:r.top+o,left:r.left+a});f.x=n.pageX-c.left,f.y=n.pageY-c.top,u.style.top="".concat(f.y,"px"),u.style.left="".concat(f.x,"px")}),{passive:!0})})),i.addEventListener("pointerup",(function(t){if(e.isPointerPressed=!1,e.isPointerDragging)e.isPointerDragging=!1;else{var n=[t,e.pointerDownEvent];requestAnimationFrame((function(){if(0===t.button)if(e.hoverObj){var r=e["on".concat(e.hoverObj.type,"Click")];r&&r.apply(void 0,[e.hoverObj.d].concat(n))}else e.onBackgroundClick&&e.onBackgroundClick.apply(e,n);if(2===t.button)if(e.hoverObj){var i=e["on".concat(e.hoverObj.type,"RightClick")];i&&i.apply(void 0,[e.hoverObj.d].concat(n))}else e.onBackgroundRightClick&&e.onBackgroundRightClick.apply(e,n)}))}}),{passive:!0}),i.addEventListener("contextmenu",(function(t){return!(e.onBackgroundRightClick||e.onNodeRightClick||e.onLinkRightClick)||(t.preventDefault(),!1)})),e.forceGraph(a),e.shadowGraph(o);var s=yi((function(){Zc(o,e.width,e.height),e.shadowGraph.linkWidth((function(t){return Hi(e.linkWidth)(t)+e.linkHoverPrecision}));var t=Ur(e.canvas);e.shadowGraph.globalScale(t.k).tickFrame()}),800);e.flushShadowCanvas=s.flush,(this._animationCycle=function t(){var n=!e.autoPauseRedraw||!!e.needsRedraw||e.forceGraph.isEngineRunning()||e.graphData.links.some((function(t){return t.__photons&&t.__photons.length}));if(e.needsRedraw=!1,e.enablePointerInteraction){var r=e.isPointerDragging?null:c();if(r!==e.hoverObj){var i=e.hoverObj,o=i?i.type:null,f=r?r.type:null;if(o&&o!==f){var l=e["on".concat(o,"Hover")];l&&l(null,i.d)}if(f){var h=e["on".concat(f,"Hover")];h&&h(r.d,o===f?i.d:null)}var d=r&&Hi(e["".concat(r.type.toLowerCase(),"Label")])(r.d)||"";u.style.visibility=d?"visible":"hidden",u.innerHTML=d,e.canvas.classList[r&&e["on".concat(f,"Click")]||!r&&e.onBackgroundClick?"add":"remove"]("clickable"),e.hoverObj=r}n&&s()}if(n){Zc(a,e.width,e.height);var p=Ur(e.canvas).k;e.onRenderFramePre&&e.onRenderFramePre(a,p),e.forceGraph.globalScale(p).tickFrame(),e.onRenderFramePost&&e.onRenderFramePost(a,p)}Pi.update(),e.animationFrameRequestId=requestAnimationFrame(t)})()},update:function(t){}});return Wc}));