@inkeep/open-knowledge 0.0.0-dev-20260428211426 → 0.0.0-dev-20260429160105
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/THIRD_PARTY_NOTICES.md +15 -0
- package/dist/cli.mjs +284 -281
- package/dist/constants-DLhaxFjM.mjs +2 -0
- package/dist/{dist-CXdg7KnM.mjs → dist-CIeZOXfv.mjs} +22 -19
- package/dist/{dist-Ct-gJ7iD.mjs → dist-CNDKfHI8.mjs} +1 -1
- package/dist/{dist-0qFIeeXA.mjs → dist-DD_wEI4a.mjs} +15 -15
- package/dist/index.mjs +1 -1
- package/dist/{init-D0YdyLe_.mjs → init-2ZbpRqT6.mjs} +4 -4
- package/dist/init-Cy-4UOwQ.mjs +1 -0
- package/dist/{init-CMkePWjl.mjs → init-DWGTb8QS.mjs} +22 -7
- package/dist/init-DWvyb5i4.mjs +1 -0
- package/dist/{loader-BJU3jneI.mjs → loader-B73SzGQk.mjs} +2 -2
- package/dist/loader-Ce28eAYb.mjs +1 -0
- package/dist/paths-CcD8Nh_5.mjs +1 -0
- package/dist/paths-DqWCeGWM.mjs +2 -0
- package/dist/{preview-CXP9kBv6.mjs → preview-DRDic3pF.mjs} +2 -2
- package/dist/preview-DT0ltjSs.mjs +1 -0
- package/dist/public/assets/ActivityModeContent-spvhVGSd.js +2 -0
- package/dist/public/assets/DocumentContext-Xq_dn8Vf.js +33 -0
- package/dist/public/assets/GraphPanel-C36W-gM6.js +46 -0
- package/dist/public/assets/McpConsentDialogBody-CDOor7qb.js +1 -0
- package/dist/public/assets/SourceEditor-BeRKaESA.js +2 -0
- package/dist/public/assets/{agent-presence-BXsx4eTl.js → agent-presence-XtMgnv3n.js} +1 -1
- package/dist/public/assets/clipboard-0XbokP0-.js +5 -0
- package/dist/public/assets/{dialog-CtSN0d2b.js → dialog-B7UAZUVJ.js} +1 -1
- package/dist/public/assets/{dist-DeDgmJv2.js → dist-5Xm_mb8k.js} +1 -1
- package/dist/public/assets/{dist-GlH2KPqY.js → dist-BkmmA9Kx.js} +1 -1
- package/dist/public/assets/{dist-BqO6NfD-.js → dist-CBfh7n1S.js} +1 -1
- package/dist/public/assets/{dist-DR1MrLJC.js → dist-DUCdsXly.js} +1 -1
- package/dist/public/assets/{dist-DlS42TIP.js → dist-DxKDMu0r.js} +1 -1
- package/dist/public/assets/{dist-D2wwoXzm.js → dist-gwU6yV0l.js} +1 -1
- package/dist/public/assets/index-DmSa5KwJ.js +1843 -0
- package/dist/public/assets/index-ldPPE8aY.css +1 -0
- package/dist/public/assets/{panel-BCRdtBla.js → panel-DiSt1efw.js} +1 -1
- package/dist/public/assets/target-navigation-intent-DlP83APM.js +1 -0
- package/dist/public/assets/toggle-group-Cg6YuFV4.js +281 -0
- package/dist/public/assets/tooltip-BaQG219g.js +1 -0
- package/dist/public/index.html +14 -14
- package/dist/src-CCUnFptH.mjs +1 -0
- package/dist/start-BaIxHOku.mjs +1 -0
- package/dist/start-nj1M3dB_.mjs +2 -0
- package/package.json +1 -1
- package/dist/constants-DCJlLBSi.mjs +0 -2
- package/dist/init-D-5Gc0uq.mjs +0 -1
- package/dist/init-DUA_XKK1.mjs +0 -1
- package/dist/loader-1GTY76cQ.mjs +0 -1
- package/dist/paths-CNpYe27Q.mjs +0 -2
- package/dist/paths-fx16Ahvg.mjs +0 -1
- package/dist/preview-CHvLSbhb.mjs +0 -1
- package/dist/public/assets/ActivityModeContent-Ccu_n0bV.js +0 -2
- package/dist/public/assets/DocumentContext-C1msvcHp.js +0 -5
- package/dist/public/assets/GraphPanel-CJ_U3W3L.js +0 -46
- package/dist/public/assets/McpConsentDialogBody-Csjet19t.js +0 -1
- package/dist/public/assets/PageListContext-B5SWnlyE.js +0 -278
- package/dist/public/assets/SourceEditor-OFesfBB2.js +0 -3
- package/dist/public/assets/clipboard-DAcKCHl1.js +0 -32
- package/dist/public/assets/index-CwFTGDhe.js +0 -1843
- package/dist/public/assets/index-DjR45Lon.css +0 -1
- package/dist/public/assets/toggle-group-LDOO6zaV.js +0 -1
- package/dist/public/assets/tooltip-D0MnQ7ZX.js +0 -1
- package/dist/src-BIqAAP5m.mjs +0 -1
- package/dist/start-BOjBm-nL.mjs +0 -2
- package/dist/start-CZFHRjtT.mjs +0 -1
- /package/dist/public/assets/{button-BPXuMr5W.js → button-CXhPNzpp.js} +0 -0
- /package/dist/public/assets/{dist-CgLbXgrr.js → dist-Bgq0sPT8.js} +0 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import{r as e,t as n}from"./chunk-DECur_0Z.js";import{n as r,r as i,t as a}from"./compiler-runtime-Y11fyRVL.js";import{a as o,c as s,i as c,n as l,o as u,r as d,s as f,t as p}from"./panel-DiSt1efw.js";import{A as m,Cn as h,ft as g,i as _,n as v,o as y,t as b,u as x,xn as S}from"./toggle-group-Cg6YuFV4.js";import{n as C,t as w,x as T}from"./button-CXhPNzpp.js";import{i as E,n as ee,r as D,t as te}from"./target-navigation-intent-DlP83APM.js";import{i as ne,n as re,t as ie}from"./tooltip-BaQG219g.js";var ae=T(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),oe=T(`minimize-2`,[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]),O=e(r(),1),se=a(),ce=[`#60a5fa`,`#a78bfa`,`#34d399`,`#f472b6`,`#fb923c`,`#22d3ee`,`#c084fc`,`#4ade80`,`#f87171`,`#eab308`,`#ec4899`,`#06b67f`,`#8b5cf6`,`#f43f5e`,`#0ea5e9`,`#a855f7`],le=[`#1e40af`,`#6b21a8`,`#166534`,`#9f1239`,`#9a3412`,`#164e63`,`#581c87`,`#166534`,`#991b1b`,`#854d0e`,`#831843`,`#0f766e`,`#312e81`,`#9f1239`,`#0c4a6e`,`#6b21a8`];function ue(e){let n=2;for(let r=0;r<e.length;r++)n=Math.imul(n^e.charCodeAt(r),1540483477),n^=n>>>13,n=Math.imul(n,1540483477),n^=n>>>15;return n>>>0}function de(e,n){let r=n?ce:le;return r[ue(e)%r.length]}var k=i(),fe={fullscreen:{maxEntries:10,containerClassName:`bottom-3 left-3 gap-1 rounded-lg px-3 py-2 text-xs`,titleClassName:`mb-1.5`,rowClassName:`gap-2`,swatchClassName:`size-2.5`,labelClassName:`max-w-[140px]`,overflowClassName:`pl-[18px]`},docked:{maxEntries:6,containerClassName:`bottom-2 left-2 gap-0.5 rounded-md px-2 py-1.5 text-[11px]`,titleClassName:`mb-1`,rowClassName:`gap-1.5`,swatchClassName:`size-2`,labelClassName:`max-w-[112px]`,overflowClassName:`pl-[14px]`}};function pe(e){return fe[e]}function me(e){let n=(0,se.c)(5),{clusters:r,variant:i}=e,a=i===void 0?`fullscreen`:i,{resolvedTheme:o}=h(),s=o===`dark`,c,l;if(n[0]!==r||n[1]!==s||n[2]!==a){l=Symbol.for(`react.early_return_sentinel`);bb0:{let e=pe(a);if(r.length===0){l=null;break bb0}let n=r.slice(0,e.maxEntries),i=r.length-n.length;c=(0,k.jsxs)(`div`,{className:C(`pointer-events-none absolute z-10 flex flex-col backdrop-blur-sm`,e.containerClassName,s?`bg-black/70 text-gray-200`:`bg-white/80 text-gray-800 ring-1 ring-black/5`),children:[(0,k.jsx)(`div`,{className:C(`font-medium`,e.titleClassName,s?`text-slate-300`:`text-slate-700`),children:`Clusters`}),n.map(n=>(0,k.jsxs)(`div`,{className:C(`flex items-center`,e.rowClassName),children:[(0,k.jsx)(`span`,{className:C(`inline-block shrink-0 rounded-full`,e.swatchClassName),style:{backgroundColor:de(n,s)}}),(0,k.jsx)(`span`,{className:C(`truncate`,e.labelClassName),children:n})]},n)),i>0&&(0,k.jsxs)(`div`,{className:C(`text-muted-foreground`,e.overflowClassName),children:[`+ `,i,` more`]})]})}n[0]=r,n[1]=s,n[2]=a,n[3]=c,n[4]=l}else c=n[3],l=n[4];return l===Symbol.for(`react.early_return_sentinel`)?c:l}function he(e,n){var r=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(r!=null){var i,a,o,s,c=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,n===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(c.push(i.value),c.length!==n);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return c}}function ge(e,n,r){return n=Te(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function _e(e,n){return be(e)||he(e,n)||Se(e,n)||A()}function ve(e){return ye(e)||xe(e)||Se(e)||we()}function ye(e){if(Array.isArray(e))return Ce(e)}function be(e){if(Array.isArray(e))return e}function xe(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Se(e,n){if(e){if(typeof e==`string`)return Ce(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return Array.from(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ce(e,n)}}function Ce(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function we(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function A(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function j(e,n){if(typeof e!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(typeof i!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}function Te(e){var n=j(e,`string`);return typeof n==`symbol`?n:String(n)}var Ee=function(e,n){var r=new Set(n);return Object.assign.apply(Object,[{}].concat(ve(Object.entries(e).filter(function(e){var n=_e(e,1)[0];return!r.has(n)}).map(function(e){var n=_e(e,2),r=n[0],i=n[1];return ge({},r,i)}))))};function De(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function Oe(e){if(Array.isArray(e))return e}function M(e){if(Array.isArray(e))return De(e)}function ke(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Ae(e,n){var r=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(r!=null){var i,a,o,s,c=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,n!==0)for(;!(l=(i=o.call(r)).done)&&(c.push(i.value),c.length!==n);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return c}}function je(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
4
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Me(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
5
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ne(e,n){return Oe(e)||Ae(e,n)||Fe(e,n)||je()}function Pe(e){return M(e)||ke(e)||Fe(e)||Me()}function Fe(e,n){if(e){if(typeof e==`string`)return De(e,n);var r={}.toString.call(e).slice(8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?Array.from(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?De(e,n):void 0}}function Ie(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.wrapperElementType,i=r===void 0?`div`:r,a=n.nodeMapper,o=a===void 0?function(e){return e}:a,s=n.methodNames,c=s===void 0?[]:s,l=n.initPropNames,u=l===void 0?[]:l;return(0,O.forwardRef)(function(n,r){var a=(0,O.useRef)(),s=(0,O.useMemo)(function(){return e(Object.fromEntries(u.filter(function(e){return n.hasOwnProperty(e)}).map(function(e){return[e,n[e]]})))},[]);Le(function(){s(o(a.current))},O.useLayoutEffect),Le(function(){return s._destructor instanceof Function?s._destructor:void 0});var l=(0,O.useCallback)(function(e){var n=[...arguments].slice(1);return s[e]instanceof Function?s[e].apply(s,n):void 0},[s]),d=(0,O.useRef)({});return Object.keys(Ee(n,[].concat(Pe(c),Pe(u)))).filter(function(e){return d.current[e]!==n[e]}).forEach(function(e){return l(e,n[e])}),d.current=n,(0,O.useImperativeHandle)(r,function(){return Object.fromEntries(c.map(function(e){return[e,function(){var n=[...arguments];return l.apply(void 0,[e].concat(n))}]}))},[l]),O.createElement(i,{ref:a})})}function Le(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:O.useEffect,r=(0,O.useRef)(),i=(0,O.useRef)(!1),a=(0,O.useRef)(!1),o=Ne((0,O.useState)(0),2);o[0];var s=o[1];i.current&&(a.current=!0),n(function(){return i.current||=(r.current=e(),!0),s(function(e){return e+1}),function(){a.current&&r.current&&r.current()}},[])}var Re={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function ze(e){var n=e+=``,r=n.indexOf(`:`);return r>=0&&(n=e.slice(0,r))!==`xmlns`&&(e=e.slice(r+1)),Re.hasOwnProperty(n)?{space:Re[n],local:e}:e}function N(e){return function(){var n=this.ownerDocument,r=this.namespaceURI;return r===`http://www.w3.org/1999/xhtml`&&n.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?n.createElement(e):n.createElementNS(r,e)}}function Be(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Ve(e){var n=ze(e);return(n.local?Be:N)(n)}function He(){}function P(e){return e==null?He:function(){return this.querySelector(e)}}function Ue(e){typeof e!=`function`&&(e=P(e));for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a)for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u,d=0;d<s;++d)(l=o[d])&&(u=e.call(l,l.__data__,d,o))&&(`__data__`in l&&(u.__data__=l.__data__),c[d]=u);return new R(i,this._parents)}function We(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Ge(){return[]}function Ke(e){return e==null?Ge:function(){return this.querySelectorAll(e)}}function F(e){return function(){return We(e.apply(this,arguments))}}function qe(e){e=typeof e==`function`?F(e):Ke(e);for(var n=this._groups,r=n.length,i=[],a=[],o=0;o<r;++o)for(var s=n[o],c=s.length,l,u=0;u<c;++u)(l=s[u])&&(i.push(e.call(l,l.__data__,u,s)),a.push(l));return new R(i,a)}function I(e){return function(){return this.matches(e)}}function L(e){return function(n){return n.matches(e)}}var Je=Array.prototype.find;function Ye(e){return function(){return Je.call(this.children,e)}}function Xe(){return this.firstElementChild}function Ze(e){return this.select(e==null?Xe:Ye(typeof e==`function`?e:L(e)))}var Qe=Array.prototype.filter;function $e(){return Array.from(this.children)}function et(e){return function(){return Qe.call(this.children,e)}}function tt(e){return this.selectAll(e==null?$e:et(typeof e==`function`?e:L(e)))}function nt(e){typeof e!=`function`&&(e=I(e));for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a)for(var o=n[a],s=o.length,c=i[a]=[],l,u=0;u<s;++u)(l=o[u])&&e.call(l,l.__data__,u,o)&&c.push(l);return new R(i,this._parents)}function rt(e){return Array(e.length)}function it(){return new R(this._enter||this._groups.map(rt),this._parents)}function at(e,n){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=n}at.prototype={constructor:at,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,n){return this._parent.insertBefore(e,n)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function ot(e){return function(){return e}}function st(e,n,r,i,a,o){for(var s=0,c,l=n.length,u=o.length;s<u;++s)(c=n[s])?(c.__data__=o[s],i[s]=c):r[s]=new at(e,o[s]);for(;s<l;++s)(c=n[s])&&(a[s]=c)}function ct(e,n,r,i,a,o,s){var c,l,u=new Map,d=n.length,f=o.length,p=Array(d),m;for(c=0;c<d;++c)(l=n[c])&&(p[c]=m=s.call(l,l.__data__,c,n)+``,u.has(m)?a[c]=l:u.set(m,l));for(c=0;c<f;++c)m=s.call(e,o[c],c,o)+``,(l=u.get(m))?(i[c]=l,l.__data__=o[c],u.delete(m)):r[c]=new at(e,o[c]);for(c=0;c<d;++c)(l=n[c])&&u.get(p[c])===l&&(a[c]=l)}function lt(e){return e.__data__}function ut(e,n){if(!arguments.length)return Array.from(this,lt);var r=n?ct:st,i=this._parents,a=this._groups;typeof e!=`function`&&(e=ot(e));for(var o=a.length,s=Array(o),c=Array(o),l=Array(o),u=0;u<o;++u){var d=i[u],f=a[u],p=f.length,m=dt(e.call(d,d&&d.__data__,u,i)),h=m.length,g=c[u]=Array(h),_=s[u]=Array(h);r(d,f,g,_,l[u]=Array(p),m,n);for(var v=0,y=0,b,x;v<h;++v)if(b=g[v]){for(v>=y&&(y=v+1);!(x=_[y])&&++y<h;);b._next=x||null}}return s=new R(s,i),s._enter=c,s._exit=l,s}function dt(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function ft(){return new R(this._exit||this._groups.map(rt),this._parents)}function pt(e,n,r){var i=this.enter(),a=this,o=this.exit();return typeof e==`function`?(i=e(i),i&&=i.selection()):i=i.append(e+``),n!=null&&(a=n(a),a&&=a.selection()),r==null?o.remove():r(o),i&&a?i.merge(a).order():a}function mt(e){for(var n=e.selection?e.selection():e,r=this._groups,i=n._groups,a=r.length,o=i.length,s=Math.min(a,o),c=Array(a),l=0;l<s;++l)for(var u=r[l],d=i[l],f=u.length,p=c[l]=Array(f),m,h=0;h<f;++h)(m=u[h]||d[h])&&(p[h]=m);for(;l<a;++l)c[l]=r[l];return new R(c,this._parents)}function ht(){for(var e=this._groups,n=-1,r=e.length;++n<r;)for(var i=e[n],a=i.length-1,o=i[a],s;--a>=0;)(s=i[a])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function gt(e){e||=_t;function n(n,r){return n&&r?e(n.__data__,r.__data__):!n-!r}for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o){for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d=0;d<c;++d)(u=s[d])&&(l[d]=u);l.sort(n)}return new R(a,this._parents).order()}function _t(e,n){return e<n?-1:e>n?1:e>=n?0:NaN}function vt(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function yt(){return Array.from(this)}function bt(){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],a=0,o=i.length;a<o;++a){var s=i[a];if(s)return s}return null}function xt(){let e=0;for(let n of this)++e;return e}function St(){return!this.node()}function Ct(e){for(var n=this._groups,r=0,i=n.length;r<i;++r)for(var a=n[r],o=0,s=a.length,c;o<s;++o)(c=a[o])&&e.call(c,c.__data__,o,a);return this}function wt(e){return function(){this.removeAttribute(e)}}function Tt(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Et(e,n){return function(){this.setAttribute(e,n)}}function Dt(e,n){return function(){this.setAttributeNS(e.space,e.local,n)}}function Ot(e,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function kt(e,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function At(e,n){var r=ze(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((n==null?r.local?Tt:wt:typeof n==`function`?r.local?kt:Ot:r.local?Dt:Et)(r,n))}function jt(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Mt(e){return function(){this.style.removeProperty(e)}}function Nt(e,n,r){return function(){this.style.setProperty(e,n,r)}}function Pt(e,n,r){return function(){var i=n.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function Ft(e,n,r){return arguments.length>1?this.each((n==null?Mt:typeof n==`function`?Pt:Nt)(e,n,r??``)):It(this.node(),e)}function It(e,n){return e.style.getPropertyValue(n)||jt(e).getComputedStyle(e,null).getPropertyValue(n)}function Lt(e){return function(){delete this[e]}}function Rt(e,n){return function(){this[e]=n}}function zt(e,n){return function(){var r=n.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Bt(e,n){return arguments.length>1?this.each((n==null?Lt:typeof n==`function`?zt:Rt)(e,n)):this.node()[e]}function Vt(e){return e.trim().split(/^|\s+/)}function Ht(e){return e.classList||new Ut(e)}function Ut(e){this._node=e,this._names=Vt(e.getAttribute(`class`)||``)}Ut.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var n=this._names.indexOf(e);n>=0&&(this._names.splice(n,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function Wt(e,n){for(var r=Ht(e),i=-1,a=n.length;++i<a;)r.add(n[i])}function Gt(e,n){for(var r=Ht(e),i=-1,a=n.length;++i<a;)r.remove(n[i])}function Kt(e){return function(){Wt(this,e)}}function qt(e){return function(){Gt(this,e)}}function Jt(e,n){return function(){(n.apply(this,arguments)?Wt:Gt)(this,e)}}function Yt(e,n){var r=Vt(e+``);if(arguments.length<2){for(var i=Ht(this.node()),a=-1,o=r.length;++a<o;)if(!i.contains(r[a]))return!1;return!0}return this.each((typeof n==`function`?Jt:n?Kt:qt)(r,n))}function Xt(){this.textContent=``}function Zt(e){return function(){this.textContent=e}}function Qt(e){return function(){this.textContent=e.apply(this,arguments)??``}}function $t(e){return arguments.length?this.each(e==null?Xt:(typeof e==`function`?Qt:Zt)(e)):this.node().textContent}function en(){this.innerHTML=``}function tn(e){return function(){this.innerHTML=e}}function nn(e){return function(){this.innerHTML=e.apply(this,arguments)??``}}function rn(e){return arguments.length?this.each(e==null?en:(typeof e==`function`?nn:tn)(e)):this.node().innerHTML}function an(){this.nextSibling&&this.parentNode.appendChild(this)}function on(){return this.each(an)}function sn(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function cn(){return this.each(sn)}function ln(e){var n=typeof e==`function`?e:Ve(e);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function un(){return null}function dn(e,n){var r=typeof e==`function`?e:Ve(e),i=n==null?un:typeof n==`function`?n:P(n);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function fn(){var e=this.parentNode;e&&e.removeChild(this)}function pn(){return this.each(fn)}function mn(){var e=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function hn(){var e=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function gn(e){return this.select(e?hn:mn)}function _n(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function vn(e){return function(n){e.call(this,n,this.__data__)}}function yn(e){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function bn(e){return function(){var n=this.__on;if(n){for(var r=0,i=-1,a=n.length,o;r<a;++r)o=n[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):n[++i]=o;++i?n.length=i:delete this.__on}}}function xn(e,n,r){return function(){var i=this.__on,a,o=vn(n);if(i){for(var s=0,c=i.length;s<c;++s)if((a=i[s]).type===e.type&&a.name===e.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=o,a.options=r),a.value=n;return}}this.addEventListener(e.type,o,r),a={type:e.type,name:e.name,value:n,listener:o,options:r},i?i.push(a):this.__on=[a]}}function Sn(e,n,r){var i=yn(e+``),a,o=i.length,s;if(arguments.length<2){var c=this.node().__on;if(c){for(var l=0,u=c.length,d;l<u;++l)for(a=0,d=c[l];a<o;++a)if((s=i[a]).type===d.type&&s.name===d.name)return d.value}return}for(c=n?xn:bn,a=0;a<o;++a)this.each(c(i[a],n,r));return this}function Cn(e,n,r){var i=jt(e),a=i.CustomEvent;typeof a==`function`?a=new a(n,r):(a=i.document.createEvent(`Event`),r?(a.initEvent(n,r.bubbles,r.cancelable),a.detail=r.detail):a.initEvent(n,!1,!1)),e.dispatchEvent(a)}function wn(e,n){return function(){return Cn(this,e,n)}}function Tn(e,n){return function(){return Cn(this,e,n.apply(this,arguments))}}function En(e,n){return this.each((typeof n==`function`?Tn:wn)(e,n))}function*Dn(){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&(yield s)}var On=[null];function R(e,n){this._groups=e,this._parents=n}function kn(){return new R([[document.documentElement]],On)}function An(){return this}R.prototype=kn.prototype={constructor:R,select:Ue,selectAll:qe,selectChild:Ze,selectChildren:tt,filter:nt,data:ut,enter:it,exit:ft,join:pt,merge:mt,selection:An,order:ht,sort:gt,call:vt,nodes:yt,node:bt,size:xt,empty:St,each:Ct,attr:At,style:Ft,property:Bt,classed:Yt,text:$t,html:rn,raise:on,lower:cn,append:ln,insert:dn,remove:pn,clone:gn,datum:_n,on:Sn,dispatch:En,[Symbol.iterator]:Dn};function z(e){return typeof e==`string`?new R([[document.querySelector(e)]],[document.documentElement]):new R([[e]],On)}function jn(e){let n;for(;n=e.sourceEvent;)e=n;return e}function Mn(e,n){if(e=jn(e),n===void 0&&(n=e.currentTarget),n){var r=n.ownerSVGElement||n;if(r.createSVGPoint){var i=r.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,i=i.matrixTransform(n.getScreenCTM().inverse()),[i.x,i.y]}if(n.getBoundingClientRect){var a=n.getBoundingClientRect();return[e.clientX-a.left-n.clientLeft,e.clientY-a.top-n.clientTop]}}return[e.pageX,e.pageY]}var Nn={value:()=>{}};function Pn(){for(var e=0,n=arguments.length,r={},i;e<n;++e){if(!(i=arguments[e]+``)||i in r||/[\s.]/.test(i))throw Error(`illegal type: `+i);r[i]=[]}return new Fn(r)}function Fn(e){this._=e}function In(e,n){return e.trim().split(/^|\s+/).map(function(e){var r=``,i=e.indexOf(`.`);if(i>=0&&(r=e.slice(i+1),e=e.slice(0,i)),e&&!n.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:r}})}Fn.prototype=Pn.prototype={constructor:Fn,on:function(e,n){var r=this._,i=In(e+``,r),a,o=-1,s=i.length;if(arguments.length<2){for(;++o<s;)if((a=(e=i[o]).type)&&(a=Ln(r[a],e.name)))return a;return}if(n!=null&&typeof n!=`function`)throw Error(`invalid callback: `+n);for(;++o<s;)if(a=(e=i[o]).type)r[a]=Rn(r[a],e.name,n);else if(n==null)for(a in r)r[a]=Rn(r[a],e.name,null);return this},copy:function(){var e={},n=this._;for(var r in n)e[r]=n[r].slice();return new Fn(e)},call:function(e,n){if((a=arguments.length-2)>0)for(var r=Array(a),i=0,a,o;i<a;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(o=this._[e],i=0,a=o.length;i<a;++i)o[i].value.apply(n,r)},apply:function(e,n,r){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var i=this._[e],a=0,o=i.length;a<o;++a)i[a].value.apply(n,r)}};function Ln(e,n){for(var r=0,i=e.length,a;r<i;++r)if((a=e[r]).name===n)return a.value}function Rn(e,n,r){for(var i=0,a=e.length;i<a;++i)if(e[i].name===n){e[i]=Nn,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:n,value:r}),e}var zn={passive:!1},Bn={capture:!0,passive:!1};function Vn(e){e.stopImmediatePropagation()}function Hn(e){e.preventDefault(),e.stopImmediatePropagation()}function Un(e){var n=e.document.documentElement,r=z(e).on(`dragstart.drag`,Hn,Bn);`onselectstart`in n?r.on(`selectstart.drag`,Hn,Bn):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect=`none`)}function Wn(e,n){var r=e.document.documentElement,i=z(e).on(`dragstart.drag`,null);n&&(i.on(`click.drag`,Hn,Bn),setTimeout(function(){i.on(`click.drag`,null)},0)),`onselectstart`in r?i.on(`selectstart.drag`,null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}var Gn=e=>()=>e;function Kn(e,{sourceEvent:n,subject:r,target:i,identifier:a,active:o,x:s,y:c,dx:l,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}Kn.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function qn(e){return!e.ctrlKey&&!e.button}function Jn(){return this.parentNode}function Yn(e,n){return n??{x:e.x,y:e.y}}function Xn(){return navigator.maxTouchPoints||`ontouchstart`in this}function Zn(){var e=qn,n=Jn,r=Yn,i=Xn,a={},o=Pn(`start`,`drag`,`end`),s=0,c,l,u,d,f=0;function p(e){e.on(`mousedown.drag`,m).filter(i).on(`touchstart.drag`,_).on(`touchmove.drag`,v,zn).on(`touchend.drag touchcancel.drag`,y).style(`touch-action`,`none`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}function m(r,i){if(!(d||!e.call(this,r,i))){var a=b(this,n.call(this,r,i),r,i,`mouse`);a&&(z(r.view).on(`mousemove.drag`,h,Bn).on(`mouseup.drag`,g,Bn),Un(r.view),Vn(r),u=!1,c=r.clientX,l=r.clientY,a(`start`,r))}}function h(e){if(Hn(e),!u){var n=e.clientX-c,r=e.clientY-l;u=n*n+r*r>f}a.mouse(`drag`,e)}function g(e){z(e.view).on(`mousemove.drag mouseup.drag`,null),Wn(e.view,u),Hn(e),a.mouse(`end`,e)}function _(r,i){if(e.call(this,r,i)){var a=r.changedTouches,o=n.call(this,r,i),s=a.length,c,l;for(c=0;c<s;++c)(l=b(this,o,r,i,a[c].identifier,a[c]))&&(Vn(r),l(`start`,r,a[c]))}}function v(e){var n=e.changedTouches,r=n.length,i,o;for(i=0;i<r;++i)(o=a[n[i].identifier])&&(Hn(e),o(`drag`,e,n[i]))}function y(e){var n=e.changedTouches,r=n.length,i,o;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),i=0;i<r;++i)(o=a[n[i].identifier])&&(Vn(e),o(`end`,e,n[i]))}function b(e,n,i,c,l,u){var d=o.copy(),f=Mn(u||i,n),m,h,g;if((g=r.call(e,new Kn(`beforestart`,{sourceEvent:i,target:p,identifier:l,active:s,x:f[0],y:f[1],dx:0,dy:0,dispatch:d}),c))!=null)return m=g.x-f[0]||0,h=g.y-f[1]||0,function r(i,o,u){var _=f,v;switch(i){case`start`:a[l]=r,v=s++;break;case`end`:delete a[l],--s;case`drag`:f=Mn(u||o,n),v=s;break}d.call(i,e,new Kn(i,{sourceEvent:o,subject:g,target:p,identifier:l,active:v,x:f[0]+m,y:f[1]+h,dx:f[0]-_[0],dy:f[1]-_[1],dispatch:d}),c)}}return p.filter=function(n){return arguments.length?(e=typeof n==`function`?n:Gn(!!n),p):e},p.container=function(e){return arguments.length?(n=typeof e==`function`?e:Gn(e),p):n},p.subject=function(e){return arguments.length?(r=typeof e==`function`?e:Gn(e),p):r},p.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:Gn(!!e),p):i},p.on=function(){var e=o.on.apply(o,arguments);return e===o?p:e},p.clickDistance=function(e){return arguments.length?(f=(e=+e)*e,p):Math.sqrt(f)},p}function Qn(e,n,r){e.prototype=n.prototype=r,r.constructor=e}function $n(e,n){var r=Object.create(e.prototype);for(var i in n)r[i]=n[i];return r}function er(){}var tr=.7,nr=1/tr,rr=`\\s*([+-]?\\d+)\\s*`,ir=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,ar=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,or=/^#([0-9a-f]{3,8})$/,sr=RegExp(`^rgb\\(${rr},${rr},${rr}\\)$`),cr=RegExp(`^rgb\\(${ar},${ar},${ar}\\)$`),lr=RegExp(`^rgba\\(${rr},${rr},${rr},${ir}\\)$`),ur=RegExp(`^rgba\\(${ar},${ar},${ar},${ir}\\)$`),dr=RegExp(`^hsl\\(${ir},${ar},${ar}\\)$`),fr=RegExp(`^hsla\\(${ir},${ar},${ar},${ir}\\)$`),pr={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};Qn(er,vr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:mr,formatHex:mr,formatHex8:hr,formatHsl:gr,formatRgb:_r,toString:_r});function mr(){return this.rgb().formatHex()}function hr(){return this.rgb().formatHex8()}function gr(){return Ar(this).formatHsl()}function _r(){return this.rgb().formatRgb()}function vr(e){var n,r;return e=(e+``).trim().toLowerCase(),(n=or.exec(e))?(r=n[1].length,n=parseInt(n[1],16),r===6?yr(n):r===3?new B(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):r===8?br(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):r===4?br(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=sr.exec(e))?new B(n[1],n[2],n[3],1):(n=cr.exec(e))?new B(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=lr.exec(e))?br(n[1],n[2],n[3],n[4]):(n=ur.exec(e))?br(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=dr.exec(e))?kr(n[1],n[2]/100,n[3]/100,1):(n=fr.exec(e))?kr(n[1],n[2]/100,n[3]/100,n[4]):pr.hasOwnProperty(e)?yr(pr[e]):e===`transparent`?new B(NaN,NaN,NaN,0):null}function yr(e){return new B(e>>16&255,e>>8&255,e&255,1)}function br(e,n,r,i){return i<=0&&(e=n=r=NaN),new B(e,n,r,i)}function xr(e){return e instanceof er||(e=vr(e)),e?(e=e.rgb(),new B(e.r,e.g,e.b,e.opacity)):new B}function Sr(e,n,r,i){return arguments.length===1?xr(e):new B(e,n,r,i??1)}function B(e,n,r,i){this.r=+e,this.g=+n,this.b=+r,this.opacity=+i}Qn(B,Sr,$n(er,{brighter(e){return e=e==null?nr:nr**+e,new B(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?tr:tr**+e,new B(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new B(Dr(this.r),Dr(this.g),Dr(this.b),Er(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:Cr,formatHex:Cr,formatHex8:wr,formatRgb:Tr,toString:Tr}));function Cr(){return`#${Or(this.r)}${Or(this.g)}${Or(this.b)}`}function wr(){return`#${Or(this.r)}${Or(this.g)}${Or(this.b)}${Or((isNaN(this.opacity)?1:this.opacity)*255)}`}function Tr(){let e=Er(this.opacity);return`${e===1?`rgb(`:`rgba(`}${Dr(this.r)}, ${Dr(this.g)}, ${Dr(this.b)}${e===1?`)`:`, ${e})`}`}function Er(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Dr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Or(e){return e=Dr(e),(e<16?`0`:``)+e.toString(16)}function kr(e,n,r,i){return i<=0?e=n=r=NaN:r<=0||r>=1?e=n=NaN:n<=0&&(e=NaN),new Mr(e,n,r,i)}function Ar(e){if(e instanceof Mr)return new Mr(e.h,e.s,e.l,e.opacity);if(e instanceof er||(e=vr(e)),!e)return new Mr;if(e instanceof Mr)return e;e=e.rgb();var n=e.r/255,r=e.g/255,i=e.b/255,a=Math.min(n,r,i),o=Math.max(n,r,i),s=NaN,c=o-a,l=(o+a)/2;return c?(s=n===o?(r-i)/c+(r<i)*6:r===o?(i-n)/c+2:(n-r)/c+4,c/=l<.5?o+a:2-o-a,s*=60):c=l>0&&l<1?0:s,new Mr(s,c,l,e.opacity)}function jr(e,n,r,i){return arguments.length===1?Ar(e):new Mr(e,n,r,i??1)}function Mr(e,n,r,i){this.h=+e,this.s=+n,this.l=+r,this.opacity=+i}Qn(Mr,jr,$n(er,{brighter(e){return e=e==null?nr:nr**+e,new Mr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?tr:tr**+e,new Mr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,n=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*n,a=2*r-i;return new B(Fr(e>=240?e-240:e+120,a,i),Fr(e,a,i),Fr(e<120?e+240:e-120,a,i),this.opacity)},clamp(){return new Mr(Nr(this.h),Pr(this.s),Pr(this.l),Er(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=Er(this.opacity);return`${e===1?`hsl(`:`hsla(`}${Nr(this.h)}, ${Pr(this.s)*100}%, ${Pr(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function Nr(e){return e=(e||0)%360,e<0?e+360:e}function Pr(e){return Math.max(0,Math.min(1,e||0))}function Fr(e,n,r){return(e<60?n+(r-n)*e/60:e<180?r:e<240?n+(r-n)*(240-e)/60:n)*255}var Ir=e=>()=>e;function Lr(e,n){return function(r){return e+r*n}}function Rr(e,n,r){return e**=+r,n=n**+r-e,r=1/r,function(i){return(e+i*n)**+r}}function zr(e){return(e=+e)==1?Br:function(n,r){return r-n?Rr(n,r,e):Ir(isNaN(n)?r:n)}}function Br(e,n){var r=n-e;return r?Lr(e,r):Ir(isNaN(e)?n:e)}var Vr=(function e(n){var r=zr(n);function i(e,n){var i=r((e=Sr(e)).r,(n=Sr(n)).r),a=r(e.g,n.g),o=r(e.b,n.b),s=Br(e.opacity,n.opacity);return function(n){return e.r=i(n),e.g=a(n),e.b=o(n),e.opacity=s(n),e+``}}return i.gamma=e,i})(1);function Hr(e,n){return e=+e,n=+n,function(r){return e*(1-r)+n*r}}var Ur=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Wr=new RegExp(Ur.source,`g`);function Gr(e){return function(){return e}}function Kr(e){return function(n){return e(n)+``}}function qr(e,n){var r=Ur.lastIndex=Wr.lastIndex=0,i,a,o,s=-1,c=[],l=[];for(e+=``,n+=``;(i=Ur.exec(e))&&(a=Wr.exec(n));)(o=a.index)>r&&(o=n.slice(r,o),c[s]?c[s]+=o:c[++s]=o),(i=i[0])===(a=a[0])?c[s]?c[s]+=a:c[++s]=a:(c[++s]=null,l.push({i:s,x:Hr(i,a)})),r=Wr.lastIndex;return r<n.length&&(o=n.slice(r),c[s]?c[s]+=o:c[++s]=o),c.length<2?l[0]?Kr(l[0].x):Gr(n):(n=l.length,function(e){for(var r=0,i;r<n;++r)c[(i=l[r]).i]=i.x(e);return c.join(``)})}var Jr=180/Math.PI,Yr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Xr(e,n,r,i,a,o){var s,c,l;return(s=Math.sqrt(e*e+n*n))&&(e/=s,n/=s),(l=e*r+n*i)&&(r-=e*l,i-=n*l),(c=Math.sqrt(r*r+i*i))&&(r/=c,i/=c,l/=c),e*i<n*r&&(e=-e,n=-n,l=-l,s=-s),{translateX:a,translateY:o,rotate:Math.atan2(n,e)*Jr,skewX:Math.atan(l)*Jr,scaleX:s,scaleY:c}}var Zr;function Qr(e){let n=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return n.isIdentity?Yr:Xr(n.a,n.b,n.c,n.d,n.e,n.f)}function $r(e){return e==null||(Zr||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),Zr.setAttribute(`transform`,e),!(e=Zr.transform.baseVal.consolidate()))?Yr:(e=e.matrix,Xr(e.a,e.b,e.c,e.d,e.e,e.f))}function ei(e,n,r,i){function a(e){return e.length?e.pop()+` `:``}function o(e,i,a,o,s,c){if(e!==a||i!==o){var l=s.push(`translate(`,null,n,null,r);c.push({i:l-4,x:Hr(e,a)},{i:l-2,x:Hr(i,o)})}else (a||o)&&s.push(`translate(`+a+n+o+r)}function s(e,n,r,o){e===n?n&&r.push(a(r)+`rotate(`+n+i):(e-n>180?n+=360:n-e>180&&(e+=360),o.push({i:r.push(a(r)+`rotate(`,null,i)-2,x:Hr(e,n)}))}function c(e,n,r,o){e===n?n&&r.push(a(r)+`skewX(`+n+i):o.push({i:r.push(a(r)+`skewX(`,null,i)-2,x:Hr(e,n)})}function l(e,n,r,i,o,s){if(e!==r||n!==i){var c=o.push(a(o)+`scale(`,null,`,`,null,`)`);s.push({i:c-4,x:Hr(e,r)},{i:c-2,x:Hr(n,i)})}else (r!==1||i!==1)&&o.push(a(o)+`scale(`+r+`,`+i+`)`)}return function(n,r){var i=[],a=[];return n=e(n),r=e(r),o(n.translateX,n.translateY,r.translateX,r.translateY,i,a),s(n.rotate,r.rotate,i,a),c(n.skewX,r.skewX,i,a),l(n.scaleX,n.scaleY,r.scaleX,r.scaleY,i,a),n=r=null,function(e){for(var n=-1,r=a.length,o;++n<r;)i[(o=a[n]).i]=o.x(e);return i.join(``)}}}var ti=ei(Qr,`px, `,`px)`,`deg)`),ni=ei($r,`, `,`)`,`)`),ri=1e-12;function ii(e){return((e=Math.exp(e))+1/e)/2}function ai(e){return((e=Math.exp(e))-1/e)/2}function oi(e){return((e=Math.exp(2*e))-1)/(e+1)}var si=(function e(n,r,i){function a(e,a){var o=e[0],s=e[1],c=e[2],l=a[0],u=a[1],d=a[2],f=l-o,p=u-s,m=f*f+p*p,h,g;if(m<ri)g=Math.log(d/c)/n,h=function(e){return[o+e*f,s+e*p,c*Math.exp(n*e*g)]};else{var _=Math.sqrt(m),v=(d*d-c*c+i*m)/(2*c*r*_),y=(d*d-c*c-i*m)/(2*d*r*_),b=Math.log(Math.sqrt(v*v+1)-v);g=(Math.log(Math.sqrt(y*y+1)-y)-b)/n,h=function(e){var i=e*g,a=ii(b),l=c/(r*_)*(a*oi(n*i+b)-ai(b));return[o+l*f,s+l*p,c*a/ii(n*i+b)]}}return h.duration=g*1e3*n/Math.SQRT2,h}return a.rho=function(n){var r=Math.max(.001,+n),i=r*r;return e(r,i,i*i)},a})(Math.SQRT2,2,4),ci=0,li=0,ui=0,di=1e3,fi,pi,mi=0,hi=0,gi=0,_i=typeof performance==`object`&&performance.now?performance:Date,vi=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function yi(){return hi||=(vi(bi),_i.now()+gi)}function bi(){hi=0}function xi(){this._call=this._time=this._next=null}xi.prototype=Si.prototype={constructor:xi,restart:function(e,n,r){if(typeof e!=`function`)throw TypeError(`callback is not a function`);r=(r==null?yi():+r)+(n==null?0:+n),!this._next&&pi!==this&&(pi?pi._next=this:fi=this,pi=this),this._call=e,this._time=r,Di()},stop:function(){this._call&&(this._call=null,this._time=1/0,Di())}};function Si(e,n,r){var i=new xi;return i.restart(e,n,r),i}function Ci(){yi(),++ci;for(var e=fi,n;e;)(n=hi-e._time)>=0&&e._call.call(void 0,n),e=e._next;--ci}function wi(){hi=(mi=_i.now())+gi,ci=li=0;try{Ci()}finally{ci=0,Ei(),hi=0}}function Ti(){var e=_i.now(),n=e-mi;n>di&&(gi-=n,mi=e)}function Ei(){for(var e,n=fi,r,i=1/0;n;)n._call?(i>n._time&&(i=n._time),e=n,n=n._next):(r=n._next,n._next=null,n=e?e._next=r:fi=r);pi=e,Di(i)}function Di(e){ci||(li&&=clearTimeout(li),e-hi>24?(e<1/0&&(li=setTimeout(wi,e-_i.now()-gi)),ui&&=clearInterval(ui)):(ui||=(mi=_i.now(),setInterval(Ti,di)),ci=1,vi(wi)))}function Oi(e,n,r){var i=new xi;return n=n==null?0:+n,i.restart(r=>{i.stop(),e(r+n)},n,r),i}var ki=Pn(`start`,`end`,`cancel`,`interrupt`),Ai=[];function ji(e,n,r,i,a,o){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;Fi(e,r,{name:n,index:i,group:a,on:ki,tween:Ai,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function Mi(e,n){var r=Pi(e,n);if(r.state>0)throw Error(`too late; already scheduled`);return r}function Ni(e,n){var r=Pi(e,n);if(r.state>3)throw Error(`too late; already running`);return r}function Pi(e,n){var r=e.__transition;if(!r||!(r=r[n]))throw Error(`transition not found`);return r}function Fi(e,n,r){var i=e.__transition,a;i[n]=r,r.timer=Si(o,0,r.time);function o(e){r.state=1,r.timer.restart(s,r.delay,r.time),r.delay<=e&&s(e-r.delay)}function s(o){var u,d,f,p;if(r.state!==1)return l();for(u in i)if(p=i[u],p.name===r.name){if(p.state===3)return Oi(s);p.state===4?(p.state=6,p.timer.stop(),p.on.call(`interrupt`,e,e.__data__,p.index,p.group),delete i[u]):+u<n&&(p.state=6,p.timer.stop(),p.on.call(`cancel`,e,e.__data__,p.index,p.group),delete i[u])}if(Oi(function(){r.state===3&&(r.state=4,r.timer.restart(c,r.delay,r.time),c(o))}),r.state=2,r.on.call(`start`,e,e.__data__,r.index,r.group),r.state===2){for(r.state=3,a=Array(f=r.tween.length),u=0,d=-1;u<f;++u)(p=r.tween[u].value.call(e,e.__data__,r.index,r.group))&&(a[++d]=p);a.length=d+1}}function c(n){for(var i=n<r.duration?r.ease.call(null,n/r.duration):(r.timer.restart(l),r.state=5,1),o=-1,s=a.length;++o<s;)a[o].call(e,i);r.state===5&&(r.on.call(`end`,e,e.__data__,r.index,r.group),l())}function l(){for(var a in r.state=6,r.timer.stop(),delete i[n],i)return;delete e.__transition}}function Ii(e,n){var r=e.__transition,i,a,o=!0,s;if(r){for(s in n=n==null?null:n+``,r){if((i=r[s]).name!==n){o=!1;continue}a=i.state>2&&i.state<5,i.state=6,i.timer.stop(),i.on.call(a?`interrupt`:`cancel`,e,e.__data__,i.index,i.group),delete r[s]}o&&delete e.__transition}}function Li(e){return this.each(function(){Ii(this,e)})}function Ri(e,n){var r,i;return function(){var a=Ni(this,e),o=a.tween;if(o!==r){i=r=o;for(var s=0,c=i.length;s<c;++s)if(i[s].name===n){i=i.slice(),i.splice(s,1);break}}a.tween=i}}function zi(e,n,r){var i,a;if(typeof r!=`function`)throw Error();return function(){var o=Ni(this,e),s=o.tween;if(s!==i){a=(i=s).slice();for(var c={name:n,value:r},l=0,u=a.length;l<u;++l)if(a[l].name===n){a[l]=c;break}l===u&&a.push(c)}o.tween=a}}function Bi(e,n){var r=this._id;if(e+=``,arguments.length<2){for(var i=Pi(this.node(),r).tween,a=0,o=i.length,s;a<o;++a)if((s=i[a]).name===e)return s.value;return null}return this.each((n==null?Ri:zi)(r,e,n))}function Vi(e,n,r){var i=e._id;return e.each(function(){var e=Ni(this,i);(e.value||={})[n]=r.apply(this,arguments)}),function(e){return Pi(e,i).value[n]}}function Hi(e,n){var r;return(typeof n==`number`?Hr:n instanceof vr?Vr:(r=vr(n))?(n=r,Vr):qr)(e,n)}function Ui(e){return function(){this.removeAttribute(e)}}function Wi(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Gi(e,n,r){var i,a=r+``,o;return function(){var s=this.getAttribute(e);return s===a?null:s===i?o:o=n(i=s,r)}}function Ki(e,n,r){var i,a=r+``,o;return function(){var s=this.getAttributeNS(e.space,e.local);return s===a?null:s===i?o:o=n(i=s,r)}}function qi(e,n,r){var i,a,o;return function(){var s,c=r(this),l;return c==null?void this.removeAttribute(e):(s=this.getAttribute(e),l=c+``,s===l?null:s===i&&l===a?o:(a=l,o=n(i=s,c)))}}function Ji(e,n,r){var i,a,o;return function(){var s,c=r(this),l;return c==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),l=c+``,s===l?null:s===i&&l===a?o:(a=l,o=n(i=s,c)))}}function Yi(e,n){var r=ze(e),i=r===`transform`?ni:Hi;return this.attrTween(e,typeof n==`function`?(r.local?Ji:qi)(r,i,Vi(this,`attr.`+e,n)):n==null?(r.local?Wi:Ui)(r):(r.local?Ki:Gi)(r,i,n))}function Xi(e,n){return function(r){this.setAttribute(e,n.call(this,r))}}function Zi(e,n){return function(r){this.setAttributeNS(e.space,e.local,n.call(this,r))}}function Qi(e,n){var r,i;function a(){var a=n.apply(this,arguments);return a!==i&&(r=(i=a)&&Zi(e,a)),r}return a._value=n,a}function $i(e,n){var r,i;function a(){var a=n.apply(this,arguments);return a!==i&&(r=(i=a)&&Xi(e,a)),r}return a._value=n,a}function ea(e,n){var r=`attr.`+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(n==null)return this.tween(r,null);if(typeof n!=`function`)throw Error();var i=ze(e);return this.tween(r,(i.local?Qi:$i)(i,n))}function ta(e,n){return function(){Mi(this,e).delay=+n.apply(this,arguments)}}function na(e,n){return n=+n,function(){Mi(this,e).delay=n}}function ra(e){var n=this._id;return arguments.length?this.each((typeof e==`function`?ta:na)(n,e)):Pi(this.node(),n).delay}function ia(e,n){return function(){Ni(this,e).duration=+n.apply(this,arguments)}}function aa(e,n){return n=+n,function(){Ni(this,e).duration=n}}function oa(e){var n=this._id;return arguments.length?this.each((typeof e==`function`?ia:aa)(n,e)):Pi(this.node(),n).duration}function sa(e,n){if(typeof n!=`function`)throw Error();return function(){Ni(this,e).ease=n}}function ca(e){var n=this._id;return arguments.length?this.each(sa(n,e)):Pi(this.node(),n).ease}function la(e,n){return function(){var r=n.apply(this,arguments);if(typeof r!=`function`)throw Error();Ni(this,e).ease=r}}function ua(e){if(typeof e!=`function`)throw Error();return this.each(la(this._id,e))}function da(e){typeof e!=`function`&&(e=I(e));for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a)for(var o=n[a],s=o.length,c=i[a]=[],l,u=0;u<s;++u)(l=o[u])&&e.call(l,l.__data__,u,o)&&c.push(l);return new Ba(i,this._parents,this._name,this._id)}function fa(e){if(e._id!==this._id)throw Error();for(var n=this._groups,r=e._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new Ba(s,this._parents,this._name,this._id)}function pa(e){return(e+``).trim().split(/^|\s+/).every(function(e){var n=e.indexOf(`.`);return n>=0&&(e=e.slice(0,n)),!e||e===`start`})}function ma(e,n,r){var i,a,o=pa(n)?Mi:Ni;return function(){var s=o(this,e),c=s.on;c!==i&&(a=(i=c).copy()).on(n,r),s.on=a}}function ha(e,n){var r=this._id;return arguments.length<2?Pi(this.node(),r).on.on(e):this.each(ma(r,e,n))}function ga(e){return function(){var n=this.parentNode;for(var r in this.__transition)if(+r!==e)return;n&&n.removeChild(this)}}function _a(){return this.on(`end.remove`,ga(this._id))}function va(e){var n=this._name,r=this._id;typeof e!=`function`&&(e=P(e));for(var i=this._groups,a=i.length,o=Array(a),s=0;s<a;++s)for(var c=i[s],l=c.length,u=o[s]=Array(l),d,f,p=0;p<l;++p)(d=c[p])&&(f=e.call(d,d.__data__,p,c))&&(`__data__`in d&&(f.__data__=d.__data__),u[p]=f,ji(u[p],n,r,p,u,Pi(d,r)));return new Ba(o,this._parents,n,r)}function ya(e){var n=this._name,r=this._id;typeof e!=`function`&&(e=Ke(e));for(var i=this._groups,a=i.length,o=[],s=[],c=0;c<a;++c)for(var l=i[c],u=l.length,d,f=0;f<u;++f)if(d=l[f]){for(var p=e.call(d,d.__data__,f,l),m,h=Pi(d,r),g=0,_=p.length;g<_;++g)(m=p[g])&&ji(m,n,r,g,p,h);o.push(p),s.push(d)}return new Ba(o,s,n,r)}var ba=kn.prototype.constructor;function xa(){return new ba(this._groups,this._parents)}function Sa(e,n){var r,i,a;return function(){var o=It(this,e),s=(this.style.removeProperty(e),It(this,e));return o===s?null:o===r&&s===i?a:a=n(r=o,i=s)}}function Ca(e){return function(){this.style.removeProperty(e)}}function wa(e,n,r){var i,a=r+``,o;return function(){var s=It(this,e);return s===a?null:s===i?o:o=n(i=s,r)}}function Ta(e,n,r){var i,a,o;return function(){var s=It(this,e),c=r(this),l=c+``;return c??(l=c=(this.style.removeProperty(e),It(this,e))),s===l?null:s===i&&l===a?o:(a=l,o=n(i=s,c))}}function Ea(e,n){var r,i,a,o=`style.`+n,s=`end.`+o,c;return function(){var l=Ni(this,e),u=l.on,d=l.value[o]==null?c||=Ca(n):void 0;(u!==r||a!==d)&&(i=(r=u).copy()).on(s,a=d),l.on=i}}function Da(e,n,r){var i=(e+=``)==`transform`?ti:Hi;return n==null?this.styleTween(e,Sa(e,i)).on(`end.style.`+e,Ca(e)):typeof n==`function`?this.styleTween(e,Ta(e,i,Vi(this,`style.`+e,n))).each(Ea(this._id,e)):this.styleTween(e,wa(e,i,n),r).on(`end.style.`+e,null)}function Oa(e,n,r){return function(i){this.style.setProperty(e,n.call(this,i),r)}}function ka(e,n,r){var i,a;function o(){var o=n.apply(this,arguments);return o!==a&&(i=(a=o)&&Oa(e,o,r)),i}return o._value=n,o}function Aa(e,n,r){var i=`style.`+(e+=``);if(arguments.length<2)return(i=this.tween(i))&&i._value;if(n==null)return this.tween(i,null);if(typeof n!=`function`)throw Error();return this.tween(i,ka(e,n,r??``))}function ja(e){return function(){this.textContent=e}}function Ma(e){return function(){this.textContent=e(this)??``}}function Na(e){return this.tween(`text`,typeof e==`function`?Ma(Vi(this,`text`,e)):ja(e==null?``:e+``))}function Pa(e){return function(n){this.textContent=e.call(this,n)}}function Fa(e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Pa(i)),n}return i._value=e,i}function Ia(e){var n=`text`;if(arguments.length<1)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!=`function`)throw Error();return this.tween(n,Fa(e))}function La(){for(var e=this._name,n=this._id,r=Ha(),i=this._groups,a=i.length,o=0;o<a;++o)for(var s=i[o],c=s.length,l,u=0;u<c;++u)if(l=s[u]){var d=Pi(l,n);ji(l,e,r,u,s,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new Ba(i,this._parents,e,r)}function Ra(){var e,n,r=this,i=r._id,a=r.size();return new Promise(function(o,s){var c={value:s},l={value:function(){--a===0&&o()}};r.each(function(){var r=Ni(this,i),a=r.on;a!==e&&(n=(e=a).copy(),n._.cancel.push(c),n._.interrupt.push(c),n._.end.push(l)),r.on=n}),a===0&&o()})}var za=0;function Ba(e,n,r,i){this._groups=e,this._parents=n,this._name=r,this._id=i}function Va(e){return kn().transition(e)}function Ha(){return++za}var Ua=kn.prototype;Ba.prototype=Va.prototype={constructor:Ba,select:va,selectAll:ya,selectChild:Ua.selectChild,selectChildren:Ua.selectChildren,filter:da,merge:fa,selection:xa,transition:La,call:Ua.call,nodes:Ua.nodes,node:Ua.node,size:Ua.size,empty:Ua.empty,each:Ua.each,on:ha,attr:Yi,attrTween:ea,style:Da,styleTween:Aa,text:Na,textTween:Ia,remove:_a,tween:Bi,delay:ra,duration:oa,ease:ca,easeVarying:ua,end:Ra,[Symbol.iterator]:Ua[Symbol.iterator]};function Wa(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Ga={time:null,delay:0,duration:250,ease:Wa};function Ka(e,n){for(var r;!(r=e.__transition)||!(r=r[n]);)if(!(e=e.parentNode))throw Error(`transition ${n} not found`);return r}function qa(e){var n,r;e instanceof Ba?(n=e._id,e=e._name):(n=Ha(),(r=Ga).time=yi(),e=e==null?null:e+``);for(var i=this._groups,a=i.length,o=0;o<a;++o)for(var s=i[o],c=s.length,l,u=0;u<c;++u)(l=s[u])&&ji(l,e,n,u,s,r||Ka(l,n));return new Ba(i,this._parents,e,n)}kn.prototype.interrupt=Li,kn.prototype.transition=qa;var Ja=e=>()=>e;function Ya(e,{sourceEvent:n,target:r,transform:i,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:a}})}function Xa(e,n,r){this.k=e,this.x=n,this.y=r}Xa.prototype={constructor:Xa,scale:function(e){return e===1?this:new Xa(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new Xa(this.k,this.x+this.k*e,this.y+this.k*n)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}};var Za=new Xa(1,0,0);Qa.prototype=Xa.prototype;function Qa(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Za;return e.__zoom}function $a(e){e.stopImmediatePropagation()}function eo(e){e.preventDefault(),e.stopImmediatePropagation()}function to(e){return(!e.ctrlKey||e.type===`wheel`)&&!e.button}function no(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute(`viewBox`)?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function ro(){return this.__zoom||Za}function io(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function ao(){return navigator.maxTouchPoints||`ontouchstart`in this}function oo(e,n,r){var i=e.invertX(n[0][0])-r[0][0],a=e.invertX(n[1][0])-r[1][0],o=e.invertY(n[0][1])-r[0][1],s=e.invertY(n[1][1])-r[1][1];return e.translate(a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function so(){var e=to,n=no,r=oo,i=io,a=ao,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],c=250,l=si,u=Pn(`start`,`zoom`,`end`),d,f,p,m=500,h=150,g=0,_=10;function v(e){e.property(`__zoom`,ro).on(`wheel.zoom`,T,{passive:!1}).on(`mousedown.zoom`,E).on(`dblclick.zoom`,ee).filter(a).on(`touchstart.zoom`,D).on(`touchmove.zoom`,te).on(`touchend.zoom touchcancel.zoom`,ne).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}v.transform=function(e,n,r,i){var a=e.selection?e.selection():e;a.property(`__zoom`,ro),e===a?a.interrupt().each(function(){C(this,arguments).event(i).start().zoom(null,typeof n==`function`?n.apply(this,arguments):n).end()}):S(e,n,r,i)},v.scaleBy=function(e,n,r,i){v.scaleTo(e,function(){return this.__zoom.k*(typeof n==`function`?n.apply(this,arguments):n)},r,i)},v.scaleTo=function(e,i,a,o){v.transform(e,function(){var e=n.apply(this,arguments),o=this.__zoom,c=a==null?x(e):typeof a==`function`?a.apply(this,arguments):a,l=o.invert(c),u=typeof i==`function`?i.apply(this,arguments):i;return r(b(y(o,u),c,l),e,s)},a,o)},v.translateBy=function(e,i,a,o){v.transform(e,function(){return r(this.__zoom.translate(typeof i==`function`?i.apply(this,arguments):i,typeof a==`function`?a.apply(this,arguments):a),n.apply(this,arguments),s)},null,o)},v.translateTo=function(e,i,a,o,c){v.transform(e,function(){var e=n.apply(this,arguments),c=this.__zoom,l=o==null?x(e):typeof o==`function`?o.apply(this,arguments):o;return r(Za.translate(l[0],l[1]).scale(c.k).translate(typeof i==`function`?-i.apply(this,arguments):-i,typeof a==`function`?-a.apply(this,arguments):-a),e,s)},o,c)};function y(e,n){return n=Math.max(o[0],Math.min(o[1],n)),n===e.k?e:new Xa(n,e.x,e.y)}function b(e,n,r){var i=n[0]-r[0]*e.k,a=n[1]-r[1]*e.k;return i===e.x&&a===e.y?e:new Xa(e.k,i,a)}function x(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function S(e,r,i,a){e.on(`start.zoom`,function(){C(this,arguments).event(a).start()}).on(`interrupt.zoom end.zoom`,function(){C(this,arguments).event(a).end()}).tween(`zoom`,function(){var e=this,o=arguments,s=C(e,o).event(a),c=n.apply(e,o),u=i==null?x(c):typeof i==`function`?i.apply(e,o):i,d=Math.max(c[1][0]-c[0][0],c[1][1]-c[0][1]),f=e.__zoom,p=typeof r==`function`?r.apply(e,o):r,m=l(f.invert(u).concat(d/f.k),p.invert(u).concat(d/p.k));return function(e){if(e===1)e=p;else{var n=m(e),r=d/n[2];e=new Xa(r,u[0]-n[0]*r,u[1]-n[1]*r)}s.zoom(null,e)}})}function C(e,n,r){return!r&&e.__zooming||new w(e,n)}function w(e,r){this.that=e,this.args=r,this.active=0,this.sourceEvent=null,this.extent=n.apply(e,r),this.taps=0}w.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit(`start`)),this},zoom:function(e,n){return this.mouse&&e!==`mouse`&&(this.mouse[1]=n.invert(this.mouse[0])),this.touch0&&e!==`touch`&&(this.touch0[1]=n.invert(this.touch0[0])),this.touch1&&e!==`touch`&&(this.touch1[1]=n.invert(this.touch1[0])),this.that.__zoom=n,this.emit(`zoom`),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit(`end`)),this},emit:function(e){var n=z(this.that).datum();u.call(e,this.that,new Ya(e,{sourceEvent:this.sourceEvent,target:v,type:e,transform:this.that.__zoom,dispatch:u}),n)}};function T(n,...a){if(!e.apply(this,arguments))return;var c=C(this,a).event(n),l=this.__zoom,u=Math.max(o[0],Math.min(o[1],l.k*2**i.apply(this,arguments))),d=Mn(n);if(c.wheel)(c.mouse[0][0]!==d[0]||c.mouse[0][1]!==d[1])&&(c.mouse[1]=l.invert(c.mouse[0]=d)),clearTimeout(c.wheel);else if(l.k===u)return;else c.mouse=[d,l.invert(d)],Ii(this),c.start();eo(n),c.wheel=setTimeout(f,h),c.zoom(`mouse`,r(b(y(l,u),c.mouse[0],c.mouse[1]),c.extent,s));function f(){c.wheel=null,c.end()}}function E(n,...i){if(p||!e.apply(this,arguments))return;var a=n.currentTarget,o=C(this,i,!0).event(n),c=z(n.view).on(`mousemove.zoom`,f,!0).on(`mouseup.zoom`,m,!0),l=Mn(n,a),u=n.clientX,d=n.clientY;Un(n.view),$a(n),o.mouse=[l,this.__zoom.invert(l)],Ii(this),o.start();function f(e){if(eo(e),!o.moved){var n=e.clientX-u,i=e.clientY-d;o.moved=n*n+i*i>g}o.event(e).zoom(`mouse`,r(b(o.that.__zoom,o.mouse[0]=Mn(e,a),o.mouse[1]),o.extent,s))}function m(e){c.on(`mousemove.zoom mouseup.zoom`,null),Wn(e.view,o.moved),eo(e),o.event(e).end()}}function ee(i,...a){if(e.apply(this,arguments)){var o=this.__zoom,l=Mn(i.changedTouches?i.changedTouches[0]:i,this),u=o.invert(l),d=o.k*(i.shiftKey?.5:2),f=r(b(y(o,d),l,u),n.apply(this,a),s);eo(i),c>0?z(this).transition().duration(c).call(S,f,l,i):z(this).call(v.transform,f,l,i)}}function D(n,...r){if(e.apply(this,arguments)){var i=n.touches,a=i.length,o=C(this,r,n.changedTouches.length===a).event(n),s,c,l,u;for($a(n),c=0;c<a;++c)l=i[c],u=Mn(l,this),u=[u,this.__zoom.invert(u),l.identifier],o.touch0?!o.touch1&&o.touch0[2]!==u[2]&&(o.touch1=u,o.taps=0):(o.touch0=u,s=!0,o.taps=1+!!d);d&&=clearTimeout(d),s&&(o.taps<2&&(f=u[0],d=setTimeout(function(){d=null},m)),Ii(this),o.start())}}function te(e,...n){if(this.__zooming){var i=C(this,n).event(e),a=e.changedTouches,o=a.length,c,l,u,d;for(eo(e),c=0;c<o;++c)l=a[c],u=Mn(l,this),i.touch0&&i.touch0[2]===l.identifier?i.touch0[0]=u:i.touch1&&i.touch1[2]===l.identifier&&(i.touch1[0]=u);if(l=i.that.__zoom,i.touch1){var f=i.touch0[0],p=i.touch0[1],m=i.touch1[0],h=i.touch1[1],g=(g=m[0]-f[0])*g+(g=m[1]-f[1])*g,_=(_=h[0]-p[0])*_+(_=h[1]-p[1])*_;l=y(l,Math.sqrt(g/_)),u=[(f[0]+m[0])/2,(f[1]+m[1])/2],d=[(p[0]+h[0])/2,(p[1]+h[1])/2]}else if(i.touch0)u=i.touch0[0],d=i.touch0[1];else return;i.zoom(`touch`,r(b(l,u,d),i.extent,s))}}function ne(e,...n){if(this.__zooming){var r=C(this,n).event(e),i=e.changedTouches,a=i.length,o,s;for($a(e),p&&clearTimeout(p),p=setTimeout(function(){p=null},m),o=0;o<a;++o)s=i[o],r.touch0&&r.touch0[2]===s.identifier?delete r.touch0:r.touch1&&r.touch1[2]===s.identifier&&delete r.touch1;if(r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0)r.touch0[1]=this.__zoom.invert(r.touch0[0]);else if(r.end(),r.taps===2&&(s=Mn(s,this),Math.hypot(f[0]-s[0],f[1]-s[1])<_)){var c=z(this).on(`dblclick.zoom`);c&&c.apply(this,arguments)}}}return v.wheelDelta=function(e){return arguments.length?(i=typeof e==`function`?e:Ja(+e),v):i},v.filter=function(n){return arguments.length?(e=typeof n==`function`?n:Ja(!!n),v):e},v.touchable=function(e){return arguments.length?(a=typeof e==`function`?e:Ja(!!e),v):a},v.extent=function(e){return arguments.length?(n=typeof e==`function`?e:Ja([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),v):n},v.scaleExtent=function(e){return arguments.length?(o[0]=+e[0],o[1]=+e[1],v):[o[0],o[1]]},v.translateExtent=function(e){return arguments.length?(s[0][0]=+e[0][0],s[1][0]=+e[1][0],s[0][1]=+e[0][1],s[1][1]=+e[1][1],v):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},v.constrain=function(e){return arguments.length?(r=e,v):r},v.duration=function(e){return arguments.length?(c=+e,v):c},v.interpolate=function(e){return arguments.length?(l=e,v):l},v.on=function(){var e=u.on.apply(u,arguments);return e===u?v:e},v.clickDistance=function(e){return arguments.length?(g=(e=+e)*e,v):Math.sqrt(g)},v.tapDistance=function(e){return arguments.length?(_=+e,v):_},v}var co=class extends Map{constructor(e,n=po){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(let[n,r]of e)this.set(n,r)}get(e){return super.get(lo(this,e))}has(e){return super.has(lo(this,e))}set(e,n){return super.set(uo(this,e),n)}delete(e){return super.delete(fo(this,e))}};function lo({_intern:e,_key:n},r){let i=n(r);return e.has(i)?e.get(i):r}function uo({_intern:e,_key:n},r){let i=n(r);return e.has(i)?e.get(i):(e.set(i,r),r)}function fo({_intern:e,_key:n},r){let i=n(r);return e.has(i)&&(r=e.get(r),e.delete(i)),r}function po(e){return typeof e==`object`&&e?e.valueOf():e}function mo(e,n){let r;if(n===void 0)for(let n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);else{let i=-1;for(let a of e)(a=n(a,++i,e))!=null&&(r<a||r===void 0&&a>=a)&&(r=a)}return r}function ho(e,n){let r;if(n===void 0)for(let n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let i=-1;for(let a of e)(a=n(a,++i,e))!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}return r}function go(e,n){let r=0;if(n===void 0)for(let n of e)(n=+n)&&(r+=n);else{let i=-1;for(let a of e)(a=+n(a,++i,e))&&(r+=a)}return r}var _o=typeof global==`object`&&global&&global.Object===Object&&global,vo=typeof self==`object`&&self&&self.Object===Object&&self,yo=_o||vo||Function(`return this`)(),bo=yo.Symbol,xo=Object.prototype,So=xo.hasOwnProperty,Co=xo.toString,wo=bo?bo.toStringTag:void 0;function To(e){var n=So.call(e,wo),r=e[wo];try{e[wo]=void 0;var i=!0}catch{}var a=Co.call(e);return i&&(n?e[wo]=r:delete e[wo]),a}var Eo=Object.prototype.toString;function Do(e){return Eo.call(e)}var Oo=`[object Null]`,ko=`[object Undefined]`,Ao=bo?bo.toStringTag:void 0;function jo(e){return e==null?e===void 0?ko:Oo:Ao&&Ao in Object(e)?To(e):Do(e)}function Mo(e){return typeof e==`object`&&!!e}var No=`[object Symbol]`;function Po(e){return typeof e==`symbol`||Mo(e)&&jo(e)==No}var Fo=/\s/;function Io(e){for(var n=e.length;n--&&Fo.test(e.charAt(n)););return n}var Lo=/^\s+/;function Ro(e){return e&&e.slice(0,Io(e)+1).replace(Lo,``)}function zo(e){var n=typeof e;return e!=null&&(n==`object`||n==`function`)}var Bo=NaN,Vo=/^[-+]0x[0-9a-f]+$/i,Ho=/^0b[01]+$/i,Uo=/^0o[0-7]+$/i,Wo=parseInt;function Go(e){if(typeof e==`number`)return e;if(Po(e))return Bo;if(zo(e)){var n=typeof e.valueOf==`function`?e.valueOf():e;e=zo(n)?n+``:n}if(typeof e!=`string`)return e===0?e:+e;e=Ro(e);var r=Ho.test(e);return r||Uo.test(e)?Wo(e.slice(2),r?2:8):Vo.test(e)?Bo:+e}var Ko=function(){return yo.Date.now()},qo=`Expected a function`,Jo=Math.max,Yo=Math.min;function Xo(e,n,r){var i,a,o,s,c,l,u=0,d=!1,f=!1,p=!0;if(typeof e!=`function`)throw TypeError(qo);n=Go(n)||0,zo(r)&&(d=!!r.leading,f=`maxWait`in r,o=f?Jo(Go(r.maxWait)||0,n):o,p=`trailing`in r?!!r.trailing:p);function m(n){var r=i,o=a;return i=a=void 0,u=n,s=e.apply(o,r),s}function h(e){return u=e,c=setTimeout(v,n),d?m(e):s}function g(e){var r=e-l,i=e-u,a=n-r;return f?Yo(a,o-i):a}function _(e){var r=e-l,i=e-u;return l===void 0||r>=n||r<0||f&&i>=o}function v(){var e=Ko();if(_(e))return y(e);c=setTimeout(v,g(e))}function y(e){return c=void 0,p&&i?m(e):(i=a=void 0,s)}function b(){c!==void 0&&clearTimeout(c),u=0,i=l=a=c=void 0}function x(){return c===void 0?s:y(Ko())}function S(){var e=Ko(),r=_(e);if(i=arguments,a=this,l=e,r){if(c===void 0)return h(l);if(f)return clearTimeout(c),c=setTimeout(v,n),m(l)}return c===void 0&&(c=setTimeout(v,n)),s}return S.cancel=b,S.flush=x,S}var Zo=`Expected a function`;function Qo(e,n,r){var i=!0,a=!0;if(typeof e!=`function`)throw TypeError(Zo);return zo(r)&&(i=`leading`in r?!!r.leading:i,a=`trailing`in r?!!r.trailing:a),Xo(e,n,{leading:i,maxWait:n,trailing:a})}var $o=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return e===0?0:1024**(e-1)},Out:function(e){return e===1?1:1-2**(-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return e===0?0:e===1?1:-(2**(10*(e-1)))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:2**(-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut:function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*2**(10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*2**(-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(e){var n=1.70158;return e===1?1:e*e*((n+1)*e-n)},Out:function(e){var n=1.70158;return e===0?0:--e*e*((n+1)*e+n)+1},InOut:function(e){var n=1.70158*1.525;return(e*=2)<1?.5*(e*e*((n+1)*e-n)):.5*((e-=2)*e*((n+1)*e+n)+2)}}),Bounce:Object.freeze({In:function(e){return 1-$o.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?$o.Bounce.In(e*2)*.5:$o.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e<2**-52?2**-52:e,e=e>1e4?1e4:e,{In:function(n){return n**+e},Out:function(n){return 1-(1-n)**e},InOut:function(n){return n<.5?(n*2)**e/2:(1-(2-n*2)**e)/2+.5}}}}),es=function(){return performance.now()},ts=function(){function e(){var e=[...arguments];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,e)}return e.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(n){return e._tweens[n]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(var i=0,a=n;i<a.length;i++){var o=a[i];(e=o._group)==null||e.remove(o),o._group=this,this._tweens[o.getId()]=o,this._tweensAddedDuringUpdate[o.getId()]=o}},e.prototype.remove=function(){for(var e=[...arguments],n=0,r=e;n<r.length;n++){var i=r[n];i._group=void 0,delete this._tweens[i.getId()],delete this._tweensAddedDuringUpdate[i.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(e){return!e.isPlaying()})},e.prototype.update=function(e,n){e===void 0&&(e=es()),n===void 0&&(n=!0);var r=Object.keys(this._tweens);if(r.length!==0)for(;r.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<r.length;i++){var a=this._tweens[r[i]],o=!n;a&&a.update(e,o)===!1&&!n&&this.remove(a)}r=Object.keys(this._tweensAddedDuringUpdate)}},e}(),ns={Linear:function(e,n){var r=e.length-1,i=r*n,a=Math.floor(i),o=ns.Utils.Linear;return n<0?o(e[0],e[1],i):n>1?o(e[r],e[r-1],r-i):o(e[a],e[a+1>r?r:a+1],i-a)},Bezier:function(e,n){for(var r=0,i=e.length-1,a=Math.pow,o=ns.Utils.Bernstein,s=0;s<=i;s++)r+=a(1-n,i-s)*a(n,s)*e[s]*o(i,s);return r},CatmullRom:function(e,n){var r=e.length-1,i=r*n,a=Math.floor(i),o=ns.Utils.CatmullRom;return e[0]===e[r]?(n<0&&(a=Math.floor(i=r*(1+n))),o(e[(a-1+r)%r],e[a],e[(a+1)%r],e[(a+2)%r],i-a)):n<0?e[0]-(o(e[0],e[0],e[1],e[1],-i)-e[0]):n>1?e[r]-(o(e[r],e[r],e[r-1],e[r-1],i-r)-e[r]):o(e[a?a-1:0],e[a],e[r<a+1?r:a+1],e[r<a+2?r:a+2],i-a)},Utils:{Linear:function(e,n,r){return(n-e)*r+e},Bernstein:function(e,n){var r=ns.Utils.Factorial;return r(e)/r(n)/r(e-n)},Factorial:(function(){var e=[1];return function(n){var r=1;if(e[n])return e[n];for(var i=n;i>1;i--)r*=i;return e[n]=r,r}})(),CatmullRom:function(e,n,r,i,a){var o=(r-e)*.5,s=(i-n)*.5,c=a*a,l=a*c;return(2*n-2*r+o+s)*l+(-3*n+3*r-2*o-s)*c+o*a+n}}},rs=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),is=new ts,as=function(){function e(e,n){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=$o.Linear.None,this._interpolationFunction=ns.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=rs.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=e,typeof n==`object`?(this._group=n,n.add(this)):n===!0&&(this._group=is,is.add(this))}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(e,n){if(n===void 0&&(n=1e3),this._isPlaying)throw Error(`Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.`);return this._valuesEnd=e,this._propertiesAreSetUp=!1,this._duration=n<0?0:n,this},e.prototype.duration=function(e){return e===void 0&&(e=1e3),this._duration=e<0?0:e,this},e.prototype.dynamic=function(e){return e===void 0&&(e=!1),this._isDynamic=e,this},e.prototype.start=function(e,n){if(e===void 0&&(e=es()),n===void 0&&(n=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed)for(var r in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(r),this._valuesStart[r]=this._valuesStartRepeat[r];if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,!this._propertiesAreSetUp||n){if(this._propertiesAreSetUp=!0,!this._isDynamic){var i={};for(var a in this._valuesEnd)i[a]=this._valuesEnd[a];this._valuesEnd=i}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,n)}return this},e.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},e.prototype._setupProperties=function(e,n,r,i,a){for(var o in r){var s=e[o],c=Array.isArray(s),l=c?`array`:typeof s,u=!c&&Array.isArray(r[o]);if(!(l===`undefined`||l===`function`)){if(u){var d=r[o];if(d.length===0)continue;for(var f=[s],p=0,m=d.length;p<m;p+=1){var h=this._handleRelativeValue(s,d[p]);if(isNaN(h)){u=!1,console.warn(`Found invalid interpolation list. Skipping.`);break}f.push(h)}u&&(r[o]=f)}if((l===`object`||c)&&s&&!u){n[o]=c?[]:{};var g=s;for(var _ in g)n[o][_]=g[_];i[o]=c?[]:{};var d=r[o];if(!this._isDynamic){var v={};for(var _ in d)v[_]=d[_];r[o]=d=v}this._setupProperties(g,n[o],d,i[o],a)}else (n[o]===void 0||a)&&(n[o]=s),c||(n[o]*=1),u?i[o]=r[o].slice().reverse():i[o]=n[o]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},e.prototype.pause=function(e){return e===void 0&&(e=es()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this)},e.prototype.resume=function(e){return e===void 0&&(e=es()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this)},e.prototype.stopChainedTweens=function(){for(var e=0,n=this._chainedTweens.length;e<n;e++)this._chainedTweens[e].stop();return this},e.prototype.group=function(e){return e?(e.add(this),this):(console.warn(`tween.group() without args has been removed, use group.add(tween) instead.`),this)},e.prototype.remove=function(){var e;return(e=this._group)==null||e.remove(this),this},e.prototype.delay=function(e){return e===void 0&&(e=0),this._delayTime=e,this},e.prototype.repeat=function(e){return e===void 0&&(e=0),this._initialRepeat=e,this._repeat=e,this},e.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},e.prototype.yoyo=function(e){return e===void 0&&(e=!1),this._yoyo=e,this},e.prototype.easing=function(e){return e===void 0&&(e=$o.Linear.None),this._easingFunction=e,this},e.prototype.interpolation=function(e){return e===void 0&&(e=ns.Linear),this._interpolationFunction=e,this},e.prototype.chain=function(){return this._chainedTweens=[...arguments],this},e.prototype.onStart=function(e){return this._onStartCallback=e,this},e.prototype.onEveryStart=function(e){return this._onEveryStartCallback=e,this},e.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},e.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},e.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},e.prototype.onStop=function(e){return this._onStopCallback=e,this},e.prototype.update=function(n,r){var i=this;if(n===void 0&&(n=es()),r===void 0&&(r=e.autoStartOnUpdate),this._isPaused)return!0;var a;if(!this._goToEnd&&!this._isPlaying)if(r)this.start(n,!0);else return!1;if(this._goToEnd=!1,n<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var o=n-this._startTime,s=this._duration+(this._repeatDelayTime??this._delayTime),c=this._duration+this._repeat*s,l=function(){if(i._duration===0||o>c)return 1;var e=o-Math.trunc(o/s)*s,n=Math.min(e/i._duration,1);return n===0&&o===i._duration?1:n}(),u=this._easingFunction(l);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,u),this._onUpdateCallback&&this._onUpdateCallback(this._object,l),this._duration===0||o>=this._duration)if(this._repeat>0){var d=Math.min(Math.trunc((o-this._duration)/s)+1,this._repeat);for(a in isFinite(this._repeat)&&(this._repeat-=d),this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[a]==`string`&&(this._valuesStartRepeat[a]=this._valuesStartRepeat[a]+parseFloat(this._valuesEnd[a])),this._yoyo&&this._swapEndStartRepeatValues(a),this._valuesStart[a]=this._valuesStartRepeat[a];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=s*d,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var f=0,p=this._chainedTweens.length;f<p;f++)this._chainedTweens[f].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(e,n,r,i){for(var a in r)if(n[a]!==void 0){var o=n[a]||0,s=r[a];!Array.isArray(e[a])&&Array.isArray(s)?e[a]=this._interpolationFunction(s,i):typeof s==`object`&&s?this._updateProperties(e[a],o,s,i):(s=this._handleRelativeValue(o,s),typeof s==`number`&&(e[a]=o+(s-o)*i))}},e.prototype._handleRelativeValue=function(e,n){return typeof n==`string`?n.charAt(0)===`+`||n.charAt(0)===`-`?e+parseFloat(n):parseFloat(n):n},e.prototype._swapEndStartRepeatValues=function(e){var n=this._valuesStartRepeat[e],r=this._valuesEnd[e];typeof r==`string`?this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(r):this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=n},e.autoStartOnUpdate=!1,e}();rs.nextId;var os=is;os.getAll.bind(os),os.removeAll.bind(os),os.add.bind(os),os.remove.bind(os),os.update.bind(os);function ss(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function cs(e){if(Array.isArray(e))return e}function ls(e,n){if(!(e instanceof n))throw TypeError(`Cannot call a class as a function`)}function us(e,n,r){return Object.defineProperty(e,`prototype`,{writable:!1}),e}function ds(e,n){var r=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(r!=null){var i,a,o,s,c=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,n!==0)for(;!(l=(i=o.call(r)).done)&&(c.push(i.value),c.length!==n);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return c}}function fs(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
6
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ps(e,n){return cs(e)||ds(e,n)||ms(e,n)||fs()}function ms(e,n){if(e){if(typeof e==`string`)return ss(e,n);var r={}.toString.call(e).slice(8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?Array.from(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ss(e,n):void 0}}var hs=us(function e(n,r){var i=r.default,a=i===void 0?null:i,o=r.triggerUpdate,s=o===void 0?!0:o,c=r.onChange,l=c===void 0?function(e,n){}:c;ls(this,e),this.name=n,this.defaultVal=a,this.triggerUpdate=s,this.onChange=l});function gs(e){var n=e.stateInit,r=n===void 0?function(){return{}}:n,i=e.props,a=i===void 0?{}:i,o=e.methods,s=o===void 0?{}:o,c=e.aliases,l=c===void 0?{}:c,u=e.init,d=u===void 0?function(){}:u,f=e.update,p=f===void 0?function(){}:f,m=Object.keys(a).map(function(e){return new hs(e,a[e])});return function e(){var n=[...arguments],i=!!(this instanceof e&&this.constructor),a=i?n.shift():void 0,o=n[0],c=o===void 0?{}:o,u=Object.assign({},r instanceof Function?r(c):r,{initialised:!1}),f={};function h(e){return g(e,c),_(),h}var g=function(e,n){d.call(h,e,u,n),u.initialised=!0},_=Xo(function(){u.initialised&&(p.call(h,u,f),f={})},1);return m.forEach(function(e){h[e.name]=n(e);function n(e){var n=e.name,r=e.triggerUpdate,i=r===void 0?!1:r,a=e.onChange,o=a===void 0?function(e,n){}:a,s=e.defaultVal,c=s===void 0?null:s;return function(e){var r=u[n];if(!arguments.length)return r;var a=e===void 0?c:e;return u[n]=a,o.call(h,a,u,r),!f.hasOwnProperty(n)&&(f[n]=r),i&&_(),h}}}),Object.keys(s).forEach(function(e){h[e]=function(){var n,r=[...arguments];return(n=s[e]).call.apply(n,[h,u].concat(r))}}),Object.entries(l).forEach(function(e){var n=ps(e,2),r=n[0];return h[r]=h[n[1]]}),h.resetProps=function(){return m.forEach(function(e){h[e.name](e.defaultVal)}),h},h.resetProps(),u._rerender=_,i&&a&&h(a),h}}var V=(function(e){return typeof e==`function`?e:typeof e==`string`?function(n){return n[e]}:function(n){return e}});function _s(e){"@babel/helpers - typeof";return _s=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},_s(e)}var vs=/^\s+/,ys=/\s+$/;function H(e,n){if(e||=``,n||={},e instanceof H)return e;if(!(this instanceof H))return new H(e,n);var r=bs(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=n.format||r.format,this._gradientType=n.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}H.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 e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),n=e.r/255,r=e.g/255,i=e.b/255,a=n<=.03928?n/12.92:((n+.055)/1.055)**2.4,o=r<=.03928?r/12.92:((r+.055)/1.055)**2.4,s=i<=.03928?i/12.92:((i+.055)/1.055)**2.4;return .2126*a+.7152*o+.0722*s},setAlpha:function(e){return this._a=Ws(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=ws(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=ws(this._r,this._g,this._b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.v*100);return this._a==1?`hsv(`+n+`, `+r+`%, `+i+`%)`:`hsva(`+n+`, `+r+`%, `+i+`%, `+this._roundA+`)`},toHsl:function(){var e=Ss(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Ss(this._r,this._g,this._b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.l*100);return this._a==1?`hsl(`+n+`, `+r+`%, `+i+`%)`:`hsla(`+n+`, `+r+`%, `+i+`%, `+this._roundA+`)`},toHex:function(e){return Es(this._r,this._g,this._b,e)},toHexString:function(e){return`#`+this.toHex(e)},toHex8:function(e){return Ds(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return`#`+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?`rgb(`+Math.round(this._r)+`, `+Math.round(this._g)+`, `+Math.round(this._b)+`)`:`rgba(`+Math.round(this._r)+`, `+Math.round(this._g)+`, `+Math.round(this._b)+`, `+this._roundA+`)`},toPercentageRgb:function(){return{r:Math.round(U(this._r,255)*100)+`%`,g:Math.round(U(this._g,255)*100)+`%`,b:Math.round(U(this._b,255)*100)+`%`,a:this._a}},toPercentageRgbString:function(){return this._a==1?`rgb(`+Math.round(U(this._r,255)*100)+`%, `+Math.round(U(this._g,255)*100)+`%, `+Math.round(U(this._b,255)*100)+`%)`:`rgba(`+Math.round(U(this._r,255)*100)+`%, `+Math.round(U(this._g,255)*100)+`%, `+Math.round(U(this._b,255)*100)+`%, `+this._roundA+`)`},toName:function(){return this._a===0?`transparent`:this._a<1?!1:Hs[Es(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var n=`#`+Os(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?`GradientType = 1, `:``;if(e){var a=H(e);r=`#`+Os(a._r,a._g,a._b,a._a)}return`progid:DXImageTransform.Microsoft.gradient(`+i+`startColorstr=`+n+`,endColorstr=`+r+`)`},toString:function(e){var n=!!e;e||=this._format;var r=!1,i=this._a<1&&this._a>=0;return!n&&i&&(e===`hex`||e===`hex6`||e===`hex3`||e===`hex4`||e===`hex8`||e===`name`)?e===`name`&&this._a===0?this.toName():this.toRgbString():(e===`rgb`&&(r=this.toRgbString()),e===`prgb`&&(r=this.toPercentageRgbString()),(e===`hex`||e===`hex6`)&&(r=this.toHexString()),e===`hex3`&&(r=this.toHexString(!0)),e===`hex4`&&(r=this.toHex8String(!0)),e===`hex8`&&(r=this.toHex8String()),e===`name`&&(r=this.toName()),e===`hsl`&&(r=this.toHslString()),e===`hsv`&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return H(this.toString())},_applyModification:function(e,n){var r=e.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(Ms,arguments)},brighten:function(){return this._applyModification(Ns,arguments)},darken:function(){return this._applyModification(Ps,arguments)},desaturate:function(){return this._applyModification(ks,arguments)},saturate:function(){return this._applyModification(As,arguments)},greyscale:function(){return this._applyModification(js,arguments)},spin:function(){return this._applyModification(Fs,arguments)},_applyCombination:function(e,n){return e.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(zs,arguments)},complement:function(){return this._applyCombination(Is,arguments)},monochromatic:function(){return this._applyCombination(Bs,arguments)},splitcomplement:function(){return this._applyCombination(Rs,arguments)},triad:function(){return this._applyCombination(Ls,[3])},tetrad:function(){return this._applyCombination(Ls,[4])}},H.fromRatio=function(e,n){if(_s(e)==`object`){var r={};for(var i in e)e.hasOwnProperty(i)&&(i===`a`?r[i]=e[i]:r[i]=Ys(e[i]));e=r}return H(e,n)};function bs(e){var n={r:0,g:0,b:0},r=1,i=null,a=null,o=null,s=!1,c=!1;return typeof e==`string`&&(e=ec(e)),_s(e)==`object`&&($s(e.r)&&$s(e.g)&&$s(e.b)?(n=xs(e.r,e.g,e.b),s=!0,c=String(e.r).substr(-1)===`%`?`prgb`:`rgb`):$s(e.h)&&$s(e.s)&&$s(e.v)?(i=Ys(e.s),a=Ys(e.v),n=Ts(e.h,i,a),s=!0,c=`hsv`):$s(e.h)&&$s(e.s)&&$s(e.l)&&(i=Ys(e.s),o=Ys(e.l),n=Cs(e.h,i,o),s=!0,c=`hsl`),e.hasOwnProperty(`a`)&&(r=e.a)),r=Ws(r),{ok:s,format:e.format||c,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:r}}function xs(e,n,r){return{r:U(e,255)*255,g:U(n,255)*255,b:U(r,255)*255}}function Ss(e,n,r){e=U(e,255),n=U(n,255),r=U(r,255);var i=Math.max(e,n,r),a=Math.min(e,n,r),o,s,c=(i+a)/2;if(i==a)o=s=0;else{var l=i-a;switch(s=c>.5?l/(2-i-a):l/(i+a),i){case e:o=(n-r)/l+(n<r?6:0);break;case n:o=(r-e)/l+2;break;case r:o=(e-n)/l+4;break}o/=6}return{h:o,s,l:c}}function Cs(e,n,r){var i,a,o;e=U(e,360),n=U(n,100),r=U(r,100);function s(e,n,r){return r<0&&(r+=1),r>1&&--r,r<1/6?e+(n-e)*6*r:r<1/2?n:r<2/3?e+(n-e)*(2/3-r)*6:e}if(n===0)i=a=o=r;else{var c=r<.5?r*(1+n):r+n-r*n,l=2*r-c;i=s(l,c,e+1/3),a=s(l,c,e),o=s(l,c,e-1/3)}return{r:i*255,g:a*255,b:o*255}}function ws(e,n,r){e=U(e,255),n=U(n,255),r=U(r,255);var i=Math.max(e,n,r),a=Math.min(e,n,r),o,s,c=i,l=i-a;if(s=i===0?0:l/i,i==a)o=0;else{switch(i){case e:o=(n-r)/l+(n<r?6:0);break;case n:o=(r-e)/l+2;break;case r:o=(e-n)/l+4;break}o/=6}return{h:o,s,v:c}}function Ts(e,n,r){e=U(e,360)*6,n=U(n,100),r=U(r,100);var i=Math.floor(e),a=e-i,o=r*(1-n),s=r*(1-a*n),c=r*(1-(1-a)*n),l=i%6,u=[r,s,o,o,c,r][l],d=[c,r,r,s,o,o][l],f=[o,o,c,r,r,s][l];return{r:u*255,g:d*255,b:f*255}}function Es(e,n,r,i){var a=[Js(Math.round(e).toString(16)),Js(Math.round(n).toString(16)),Js(Math.round(r).toString(16))];return i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join(``)}function Ds(e,n,r,i,a){var o=[Js(Math.round(e).toString(16)),Js(Math.round(n).toString(16)),Js(Math.round(r).toString(16)),Js(Xs(i))];return a&&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)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join(``)}function Os(e,n,r,i){return[Js(Xs(i)),Js(Math.round(e).toString(16)),Js(Math.round(n).toString(16)),Js(Math.round(r).toString(16))].join(``)}H.equals=function(e,n){return!e||!n?!1:H(e).toRgbString()==H(n).toRgbString()},H.random=function(){return H.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function ks(e,n){n=n===0?0:n||10;var r=H(e).toHsl();return r.s-=n/100,r.s=Gs(r.s),H(r)}function As(e,n){n=n===0?0:n||10;var r=H(e).toHsl();return r.s+=n/100,r.s=Gs(r.s),H(r)}function js(e){return H(e).desaturate(100)}function Ms(e,n){n=n===0?0:n||10;var r=H(e).toHsl();return r.l+=n/100,r.l=Gs(r.l),H(r)}function Ns(e,n){n=n===0?0:n||10;var r=H(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(n/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(n/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(n/100)))),H(r)}function Ps(e,n){n=n===0?0:n||10;var r=H(e).toHsl();return r.l-=n/100,r.l=Gs(r.l),H(r)}function Fs(e,n){var r=H(e).toHsl(),i=(r.h+n)%360;return r.h=i<0?360+i:i,H(r)}function Is(e){var n=H(e).toHsl();return n.h=(n.h+180)%360,H(n)}function Ls(e,n){if(isNaN(n)||n<=0)throw Error(`Argument to polyad must be a positive number`);for(var r=H(e).toHsl(),i=[H(e)],a=360/n,o=1;o<n;o++)i.push(H({h:(r.h+o*a)%360,s:r.s,l:r.l}));return i}function Rs(e){var n=H(e).toHsl(),r=n.h;return[H(e),H({h:(r+72)%360,s:n.s,l:n.l}),H({h:(r+216)%360,s:n.s,l:n.l})]}function zs(e,n,r){n||=6,r||=30;var i=H(e).toHsl(),a=360/r,o=[H(e)];for(i.h=(i.h-(a*n>>1)+720)%360;--n;)i.h=(i.h+a)%360,o.push(H(i));return o}function Bs(e,n){n||=6;for(var r=H(e).toHsv(),i=r.h,a=r.s,o=r.v,s=[],c=1/n;n--;)s.push(H({h:i,s:a,v:o})),o=(o+c)%1;return s}H.mix=function(e,n,r){r=r===0?0:r||50;var i=H(e).toRgb(),a=H(n).toRgb(),o=r/100;return H({r:(a.r-i.r)*o+i.r,g:(a.g-i.g)*o+i.g,b:(a.b-i.b)*o+i.b,a:(a.a-i.a)*o+i.a})},H.readability=function(e,n){var r=H(e),i=H(n);return(Math.max(r.getLuminance(),i.getLuminance())+.05)/(Math.min(r.getLuminance(),i.getLuminance())+.05)},H.isReadable=function(e,n,r){var i=H.readability(e,n),a,o=!1;switch(a=tc(r),a.level+a.size){case`AAsmall`:case`AAAlarge`:o=i>=4.5;break;case`AAlarge`:o=i>=3;break;case`AAAsmall`:o=i>=7;break}return o},H.mostReadable=function(e,n,r){var i=null,a=0,o,s,c,l;r||={},s=r.includeFallbackColors,c=r.level,l=r.size;for(var u=0;u<n.length;u++)o=H.readability(e,n[u]),o>a&&(a=o,i=H(n[u]));return H.isReadable(e,i,{level:c,size:l})||!s?i:(r.includeFallbackColors=!1,H.mostReadable(e,[`#fff`,`#000`],r))};var Vs=H.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`},Hs=H.hexNames=Us(Vs);function Us(e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);return n}function Ws(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function U(e,n){Ks(e)&&(e=`100%`);var r=qs(e);return e=Math.min(n,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*n,10)/100),Math.abs(e-n)<1e-6?1:e%n/parseFloat(n)}function Gs(e){return Math.min(1,Math.max(0,e))}function W(e){return parseInt(e,16)}function Ks(e){return typeof e==`string`&&e.indexOf(`.`)!=-1&&parseFloat(e)===1}function qs(e){return typeof e==`string`&&e.indexOf(`%`)!=-1}function Js(e){return e.length==1?`0`+e:``+e}function Ys(e){return e<=1&&(e=e*100+`%`),e}function Xs(e){return Math.round(parseFloat(e)*255).toString(16)}function Zs(e){return W(e)/255}var Qs=function(){var e=`(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)`,n=`[\\s|\\(]+(`+e+`)[,|\\s]+(`+e+`)[,|\\s]+(`+e+`)\\s*\\)?`,r=`[\\s|\\(]+(`+e+`)[,|\\s]+(`+e+`)[,|\\s]+(`+e+`)[,|\\s]+(`+e+`)\\s*\\)?`;return{CSS_UNIT:new RegExp(e),rgb:RegExp(`rgb`+n),rgba:RegExp(`rgba`+r),hsl:RegExp(`hsl`+n),hsla:RegExp(`hsla`+r),hsv:RegExp(`hsv`+n),hsva:RegExp(`hsva`+r),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 $s(e){return!!Qs.CSS_UNIT.exec(e)}function ec(e){e=e.replace(vs,``).replace(ys,``).toLowerCase();var n=!1;if(Vs[e])e=Vs[e],n=!0;else if(e==`transparent`)return{r:0,g:0,b:0,a:0,format:`name`};var r;return(r=Qs.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=Qs.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Qs.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=Qs.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Qs.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=Qs.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Qs.hex8.exec(e))?{r:W(r[1]),g:W(r[2]),b:W(r[3]),a:Zs(r[4]),format:n?`name`:`hex8`}:(r=Qs.hex6.exec(e))?{r:W(r[1]),g:W(r[2]),b:W(r[3]),format:n?`name`:`hex`}:(r=Qs.hex4.exec(e))?{r:W(r[1]+``+r[1]),g:W(r[2]+``+r[2]),b:W(r[3]+``+r[3]),a:Zs(r[4]+``+r[4]),format:n?`name`:`hex8`}:(r=Qs.hex3.exec(e))?{r:W(r[1]+``+r[1]),g:W(r[2]+``+r[2]),b:W(r[3]+``+r[3]),format:n?`name`:`hex`}:!1}function tc(e){var n,r;return e||={level:`AA`,size:`small`},n=(e.level||`AA`).toUpperCase(),r=(e.size||`small`).toLowerCase(),n!==`AA`&&n!==`AAA`&&(n=`AA`),r!==`small`&&r!==`large`&&(r=`small`),{level:n,size:r}}function nc(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function rc(e){if(Array.isArray(e))return nc(e)}function ic(e,n,r){if(typeof e==`function`?e===n:e.has(n))return arguments.length<3?n:r;throw TypeError(`Private element is not present on this object`)}function ac(e,n){if(n.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function oc(e,n){if(!(e instanceof n))throw TypeError(`Cannot call a class as a function`)}function sc(e,n){return e.get(ic(e,n))}function cc(e,n,r){ac(e,n),n.set(e,r)}function lc(e,n,r){return e.set(ic(e,n),r),r}function uc(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,`value`in i&&(i.writable=!0),Object.defineProperty(e,gc(i.key),i)}}function dc(e,n,r){return n&&uc(e.prototype,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function fc(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function pc(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
7
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mc(e){return rc(e)||fc(e)||_c(e)||pc()}function hc(e,n){if(typeof e!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n);if(typeof i!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}function gc(e){var n=hc(e,`string`);return typeof n==`symbol`?n:n+``}function _c(e,n){if(e){if(typeof e==`string`)return nc(e,n);var r={}.toString.call(e).slice(8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?Array.from(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?nc(e,n):void 0}}var vc=123,yc=function(e){return`#${Math.min(e,2**24).toString(16).padStart(6,`0`)}`},bc=function(e,n,r){return(e<<16)+(n<<8)+r},xc=function(e){var n=H(e).toRgb(),r=n.r,i=n.g,a=n.b;return bc(r,i,a)},Sc=function(e,n){return e*vc%2**n},Cc=new WeakMap,wc=new WeakMap,Tc=function(){function e(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;oc(this,e),cc(this,Cc,void 0),cc(this,wc,void 0),lc(wc,this,n),this.reset()}return dc(e,[{key:`reset`,value:function(){lc(Cc,this,[`__reserved for background__`])}},{key:`register`,value:function(e){if(sc(Cc,this).length>=2**(24-sc(wc,this)))return null;var n=sc(Cc,this).length,r=yc(n+(Sc(n,sc(wc,this))<<24-sc(wc,this)));return sc(Cc,this).push(e),r}},{key:`lookup`,value:function(e){if(!e)return null;var n=typeof e==`string`?xc(e):bc.apply(void 0,mc(e));if(!n)return null;var r=n&2**(24-sc(wc,this))-1,i=n>>24-sc(wc,this)&2**sc(wc,this)-1;return Sc(r,sc(wc,this))!==i||r>=sc(Cc,this).length?null:sc(Cc,this)[r]}}])}(),Ec,G,Dc,Oc,kc,Ac,jc,Mc,Nc,Pc,Fc,Ic,Lc,Rc,zc,Bc={},Vc=[],Hc=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Uc=Array.isArray;function Wc(e,n){for(var r in n)e[r]=n[r];return e}function Gc(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Kc(e,n,r){var i,a,o,s={};for(o in n)o==`key`?i=n[o]:o==`ref`?a=n[o]:s[o]=n[o];if(arguments.length>2&&(s.children=arguments.length>3?Ec.call(arguments,2):r),typeof e==`function`&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return qc(e,s,i,a,null)}function qc(e,n,r,i,a){var o={type:e,props:n,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:a??++Dc,__i:-1,__u:0};return a==null&&G.vnode!=null&&G.vnode(o),o}function Jc(e){return e.children}function Yc(e,n){this.props=e,this.context=n}function Xc(e,n){if(n==null)return e.__?Xc(e.__,e.__i+1):null;for(var r;n<e.__k.length;n++)if((r=e.__k[n])!=null&&r.__e!=null)return r.__e;return typeof e.type==`function`?Xc(e):null}function Zc(e){if(e.__P&&e.__d){var n=e.__v,r=n.__e,i=[],a=[],o=Wc({},n);o.__v=n.__v+1,G.vnode&&G.vnode(o),cl(e.__P,o,n,e.__n,e.__P.namespaceURI,32&n.__u?[r]:null,i,r??Xc(n),!!(32&n.__u),a),o.__v=n.__v,o.__.__k[o.__i]=o,ul(i,o,a),n.__e=n.__=null,o.__e!=r&&Qc(o)}}function Qc(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(n){if(n!=null&&n.__e!=null)return e.__e=e.__c.base=n.__e}),Qc(e)}function $c(e){(!e.__d&&(e.__d=!0)&&kc.push(e)&&!el.__r++||Ac!=G.debounceRendering)&&((Ac=G.debounceRendering)||jc)(el)}function el(){try{for(var e,n=1;kc.length;)kc.length>n&&kc.sort(Mc),e=kc.shift(),n=kc.length,Zc(e)}finally{kc.length=el.__r=0}}function tl(e,n,r,i,a,o,s,c,l,u,d){var f,p,m,h,g,_,v,y=i&&i.__k||Vc,b=n.length;for(l=nl(r,n,y,l,b),f=0;f<b;f++)(m=r.__k[f])!=null&&(p=m.__i!=-1&&y[m.__i]||Bc,m.__i=f,_=cl(e,m,p,a,o,s,c,l,u,d),h=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&pl(p.ref,null,m),d.push(m.ref,m.__c||h,m)),g==null&&h!=null&&(g=h),(v=!!(4&m.__u))||p.__k===m.__k?(l=rl(m,l,e,v),v&&p.__e&&(p.__e=null)):typeof m.type==`function`&&_!==void 0?l=_:h&&(l=h.nextSibling),m.__u&=-7);return r.__e=g,l}function nl(e,n,r,i,a){var o,s,c,l,u,d=r.length,f=d,p=0;for(e.__k=Array(a),o=0;o<a;o++)(s=n[o])!=null&&typeof s!=`boolean`&&typeof s!=`function`?(typeof s==`string`||typeof s==`number`||typeof s==`bigint`||s.constructor==String?s=e.__k[o]=qc(null,s,null,null,null):Uc(s)?s=e.__k[o]=qc(Jc,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[o]=qc(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[o]=s,l=o+p,s.__=e,s.__b=e.__b+1,c=null,(u=s.__i=il(s,r,l,f))!=-1&&(f--,(c=r[u])&&(c.__u|=2)),c==null||c.__v==null?(u==-1&&(a>d?p--:a<d&&p++),typeof s.type!=`function`&&(s.__u|=4)):u!=l&&(u==l-1?p--:u==l+1?p++:(u>l?p--:p++,s.__u|=4))):e.__k[o]=null;if(f)for(o=0;o<d;o++)(c=r[o])!=null&&!(2&c.__u)&&(c.__e==i&&(i=Xc(c)),ml(c,c));return i}function rl(e,n,r,i){var a,o;if(typeof e.type==`function`){for(a=e.__k,o=0;a&&o<a.length;o++)a[o]&&(a[o].__=e,n=rl(a[o],n,r,i));return n}e.__e!=n&&(i&&(n&&e.type&&!n.parentNode&&(n=Xc(e)),r.insertBefore(e.__e,n||null)),n=e.__e);do n&&=n.nextSibling;while(n!=null&&n.nodeType==8);return n}function il(e,n,r,i){var a,o,s,c=e.key,l=e.type,u=n[r],d=u!=null&&(2&u.__u)==0;if(u===null&&c==null||d&&c==u.key&&l==u.type)return r;if(i>+!!d){for(a=r-1,o=r+1;a>=0||o<n.length;)if((u=n[s=a>=0?a--:o++])!=null&&!(2&u.__u)&&c==u.key&&l==u.type)return s}return-1}function al(e,n,r){n[0]==`-`?e.setProperty(n,r??``):e[n]=r==null?``:typeof r!=`number`||Hc.test(n)?r:r+`px`}function ol(e,n,r,i,a){var o,s;n:if(n==`style`)if(typeof r==`string`)e.style.cssText=r;else{if(typeof i==`string`&&(e.style.cssText=i=``),i)for(n in i)r&&n in r||al(e.style,n,``);if(r)for(n in r)i&&r[n]==i[n]||al(e.style,n,r[n])}else if(n[0]==`o`&&n[1]==`n`)o=n!=(n=n.replace(Ic,`$1`)),s=n.toLowerCase(),n=s in e||n==`onFocusOut`||n==`onFocusIn`?s.slice(2):n.slice(2),e.l||={},e.l[n+o]=r,r?i?r[Fc]=i[Fc]:(r[Fc]=Lc,e.addEventListener(n,o?zc:Rc,o)):e.removeEventListener(n,o?zc:Rc,o);else{if(a==`http://www.w3.org/2000/svg`)n=n.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(n!=`width`&&n!=`height`&&n!=`href`&&n!=`list`&&n!=`form`&&n!=`tabIndex`&&n!=`download`&&n!=`rowSpan`&&n!=`colSpan`&&n!=`role`&&n!=`popover`&&n in e)try{e[n]=r??``;break n}catch{}typeof r==`function`||(r==null||!1===r&&n[4]!=`-`?e.removeAttribute(n):e.setAttribute(n,n==`popover`&&r==1?``:r))}}function sl(e){return function(n){if(this.l){var r=this.l[n.type+e];if(n[Pc]==null)n[Pc]=Lc++;else if(n[Pc]<r[Fc])return;return r(G.event?G.event(n):n)}}}function cl(e,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E=n.type;if(n.constructor!==void 0)return null;128&r.__u&&(l=!!(32&r.__u),o=[c=n.__e=r.__e]),(d=G.__b)&&d(n);n:if(typeof E==`function`)try{if(v=n.props,y=E.prototype&&E.prototype.render,b=(d=E.contextType)&&i[d.__c],x=d?b?b.props.value:d.__:i,r.__c?_=(f=n.__c=r.__c).__=f.__E:(y?n.__c=f=new E(v,x):(n.__c=f=new Yc(v,x),f.constructor=E,f.render=hl),b&&b.sub(f),f.state||={},f.__n=i,p=f.__d=!0,f.__h=[],f._sb=[]),y&&f.__s==null&&(f.__s=f.state),y&&E.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=Wc({},f.__s)),Wc(f.__s,E.getDerivedStateFromProps(v,f.__s))),m=f.props,h=f.state,f.__v=n,p)y&&E.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),y&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(y&&E.getDerivedStateFromProps==null&&v!==m&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(v,x),n.__v==r.__v||!f.__e&&f.shouldComponentUpdate!=null&&!1===f.shouldComponentUpdate(v,f.__s,x)){n.__v!=r.__v&&(f.props=v,f.state=f.__s,f.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function(e){e&&(e.__=n)}),Vc.push.apply(f.__h,f._sb),f._sb=[],f.__h.length&&s.push(f);break n}f.componentWillUpdate!=null&&f.componentWillUpdate(v,f.__s,x),y&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(m,h,g)})}if(f.context=x,f.props=v,f.__P=e,f.__e=!1,S=G.__r,C=0,y)f.state=f.__s,f.__d=!1,S&&S(n),d=f.render(f.props,f.state,f.context),Vc.push.apply(f.__h,f._sb),f._sb=[];else do f.__d=!1,S&&S(n),d=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++C<25);f.state=f.__s,f.getChildContext!=null&&(i=Wc(Wc({},i),f.getChildContext())),y&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),w=d!=null&&d.type===Jc&&d.key==null?dl(d.props.children):d,c=tl(e,Uc(w)?w:[w],n,r,i,a,o,s,c,l,u),f.base=n.__e,n.__u&=-161,f.__h.length&&s.push(f),_&&(f.__E=f.__=null)}catch(e){if(n.__v=null,l||o!=null)if(e.then){for(n.__u|=l?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;o[o.indexOf(c)]=null,n.__e=c}else{for(T=o.length;T--;)Gc(o[T]);ll(n)}else n.__e=r.__e,n.__k=r.__k,e.then||ll(n);G.__e(e,n,r)}else o==null&&n.__v==r.__v?(n.__k=r.__k,n.__e=r.__e):c=n.__e=fl(r.__e,n,r,i,a,o,s,l,u);return(d=G.diffed)&&d(n),128&n.__u?void 0:c}function ll(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(ll))}function ul(e,n,r){for(var i=0;i<r.length;i++)pl(r[i],r[++i],r[++i]);G.__c&&G.__c(n,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(e){e.call(n)})}catch(e){G.__e(e,n.__v)}})}function dl(e){return typeof e!=`object`||!e||e.__b>0?e:Uc(e)?e.map(dl):Wc({},e)}function fl(e,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_=r.props||Bc,v=n.props,y=n.type;if(y==`svg`?a=`http://www.w3.org/2000/svg`:y==`math`?a=`http://www.w3.org/1998/Math/MathML`:a||=`http://www.w3.org/1999/xhtml`,o!=null){for(u=0;u<o.length;u++)if((m=o[u])&&`setAttribute`in m==!!y&&(y?m.localName==y:m.nodeType==3)){e=m,o[u]=null;break}}if(e==null){if(y==null)return document.createTextNode(v);e=document.createElementNS(a,y,v.is&&v),c&&=(G.__m&&G.__m(n,o),!1),o=null}if(y==null)_===v||c&&e.data==v||(e.data=v);else{if(o&&=Ec.call(e.childNodes),!c&&o!=null)for(_={},u=0;u<e.attributes.length;u++)_[(m=e.attributes[u]).name]=m.value;for(u in _)m=_[u],u==`dangerouslySetInnerHTML`?f=m:u==`children`||u in v||u==`value`&&`defaultValue`in v||u==`checked`&&`defaultChecked`in v||ol(e,u,null,m,a);for(u in v)m=v[u],u==`children`?p=m:u==`dangerouslySetInnerHTML`?d=m:u==`value`?h=m:u==`checked`?g=m:c&&typeof m!=`function`||_[u]===m||ol(e,u,m,_[u],a);if(d)c||f&&(d.__html==f.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),n.__k=[];else if(f&&(e.innerHTML=``),tl(n.type==`template`?e.content:e,Uc(p)?p:[p],n,r,i,y==`foreignObject`?`http://www.w3.org/1999/xhtml`:a,o,s,o?o[0]:r.__k&&Xc(r,0),c,l),o!=null)for(u=o.length;u--;)Gc(o[u]);c||(u=`value`,y==`progress`&&h==null?e.removeAttribute(`value`):h!=null&&(h!==e[u]||y==`progress`&&!h||y==`option`&&h!=_[u])&&ol(e,u,h,_[u],a),u=`checked`,g!=null&&g!=e[u]&&ol(e,u,g,_[u],a))}return e}function pl(e,n,r){try{if(typeof e==`function`){var i=typeof e.__u==`function`;i&&e.__u(),i&&n==null||(e.__u=e(n))}else e.current=n}catch(e){G.__e(e,r)}}function ml(e,n,r){var i,a;if(G.unmount&&G.unmount(e),(i=e.ref)&&(i.current&&i.current!=e.__e||pl(i,null,n)),(i=e.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){G.__e(e,n)}i.base=i.__P=null}if(i=e.__k)for(a=0;a<i.length;a++)i[a]&&ml(i[a],n,r||typeof e.type!=`function`);r||Gc(e.__e),e.__c=e.__=e.__e=void 0}function hl(e,n,r){return this.constructor(e,r)}function gl(e,n,r){var i,a,o,s;n==document&&(n=document.documentElement),G.__&&G.__(e,n),a=(i=typeof r==`function`)?null:r&&r.__k||n.__k,o=[],s=[],cl(n,e=(!i&&r||n).__k=Kc(Jc,null,[e]),a||Bc,Bc,n.namespaceURI,!i&&r?[r]:a?null:n.firstChild?Ec.call(n.childNodes):null,o,!i&&r?r:a?a.__e:n.firstChild,i,s),ul(o,e,s)}function _l(e,n,r){var i,a,o,s,c=Wc({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),n)o==`key`?i=n[o]:o==`ref`?a=n[o]:c[o]=n[o]===void 0&&s!=null?s[o]:n[o];return arguments.length>2&&(c.children=arguments.length>3?Ec.call(arguments,2):r),qc(e.type,c,i||e.key,a||e.ref,null)}Ec=Vc.slice,G={__e:function(e,n,r,i){for(var a,o,s;n=n.__;)if((a=n.__c)&&!a.__)try{if((o=a.constructor)&&o.getDerivedStateFromError!=null&&(a.setState(o.getDerivedStateFromError(e)),s=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(e,i||{}),s=a.__d),s)return a.__E=a}catch(n){e=n}throw e}},Dc=0,Oc=function(e){return e!=null&&e.constructor===void 0},Yc.prototype.setState=function(e,n){var r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Wc({},this.state);typeof e==`function`&&(e=e(Wc({},r),this.props)),e&&Wc(r,e),e!=null&&this.__v&&(n&&this._sb.push(n),$c(this))},Yc.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),$c(this))},Yc.prototype.render=Jc,kc=[],jc=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Mc=function(e,n){return e.__v.__b-n.__v.__b},el.__r=0,Nc=Math.random().toString(8),Pc=`__d`+Nc,Fc=`__a`+Nc,Ic=/(PointerCapture)$|Capture$/i,Lc=0,Rc=sl(!1),zc=sl(!0);function vl(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function yl(e){if(Array.isArray(e))return e}function bl(e,n,r){return(n=Dl(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function xl(e,n){var r=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(r!=null){var i,a,o,s,c=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,n!==0)for(;!(l=(i=o.call(r)).done)&&(c.push(i.value),c.length!==n);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return c}}function Sl(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
8
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cl(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function wl(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]==null?{}:arguments[n];n%2?Cl(Object(r),!0).forEach(function(n){bl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cl(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Tl(e,n){return yl(e)||xl(e,n)||kl(e,n)||Sl()}function El(e,n){if(typeof e!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n);if(typeof i!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}function Dl(e){var n=El(e,`string`);return typeof n==`symbol`?n:n+``}function Ol(e){"@babel/helpers - typeof";return Ol=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ol(e)}function kl(e,n){if(e){if(typeof e==`string`)return vl(e,n);var r={}.toString.call(e).slice(8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?Array.from(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?vl(e,n):void 0}}var Al=function(e){if(Ol(e)!==`object`)return e;var n=_l(e);if(n.props){var r;n.props=wl({},n.props),n!=null&&(r=n.props)!=null&&r.children&&(n.props.children=Array.isArray(n.props.children)?n.props.children.map(Al):Al(n.props.children))}return n},jl=function(e){return Oc(_l(e))},Ml=function(e,n){delete n.__k,gl(Al(e),n)};function Nl(e,n){n===void 0&&(n={});var r=n.insertAt;if(!(typeof document>`u`)){var i=document.head||document.getElementsByTagName(`head`)[0],a=document.createElement(`style`);a.type=`text/css`,r===`top`&&i.firstChild?i.insertBefore(a,i.firstChild):i.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}Nl(`.float-tooltip-kap {
|
|
9
|
+
position: absolute;
|
|
10
|
+
width: max-content; /* prevent shrinking near right edge */
|
|
11
|
+
max-width: max(50%, 150px);
|
|
12
|
+
padding: 3px 5px;
|
|
13
|
+
border-radius: 3px;
|
|
14
|
+
font: 12px sans-serif;
|
|
15
|
+
color: #eee;
|
|
16
|
+
background: rgba(0,0,0,0.6);
|
|
17
|
+
pointer-events: none;
|
|
18
|
+
}
|
|
19
|
+
`);var Pl=gs({props:{content:{default:!1},offsetX:{triggerUpdate:!1},offsetY:{triggerUpdate:!1}},init:function(e,n){var r=(arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}).style,i=r===void 0?{}:r,a=z(e&&Ol(e)===`object`&&e.node&&typeof e.node==`function`?e.node():e);a.style(`position`)===`static`&&a.style(`position`,`relative`),n.tooltipEl=a.append(`div`).attr(`class`,`float-tooltip-kap`),Object.entries(i).forEach(function(e){var r=Tl(e,2),i=r[0],a=r[1];return n.tooltipEl.style(i,a)}),n.tooltipEl.style(`left`,`-10000px`).style(`display`,`none`);var o=`tooltip-${Math.round(Math.random()*0xe8d4a51000)}`;n.mouseInside=!1,a.on(`mousemove.${o}`,function(e){n.mouseInside=!0;var r=Mn(e),i=a.node(),o=i.offsetWidth,s=i.offsetHeight,c=[n.offsetX===null||n.offsetX===void 0?`-${r[0]/o*100}%`:typeof n.offsetX==`number`?`calc(-50% + ${n.offsetX}px)`:n.offsetX,n.offsetY===null||n.offsetY===void 0?s>130&&s-r[1]<100?`calc(-100% - 6px)`:`21px`:typeof n.offsetY==`number`?n.offsetY<0?`calc(-100% - ${Math.abs(n.offsetY)}px)`:`${n.offsetY}px`:n.offsetY];n.tooltipEl.style(`left`,r[0]+`px`).style(`top`,r[1]+`px`).style(`transform`,`translate(${c.join(`,`)})`),n.content&&n.tooltipEl.style(`display`,`inline`)}),a.on(`mouseover.${o}`,function(){n.mouseInside=!0,n.content&&n.tooltipEl.style(`display`,`inline`)}),a.on(`mouseout.${o}`,function(){n.mouseInside=!1,n.tooltipEl.style(`display`,`none`)})},update:function(e){e.tooltipEl.style(`display`,e.content&&e.mouseInside?`inline`:`none`),e.content?e.content instanceof HTMLElement?(e.tooltipEl.text(``),e.tooltipEl.append(function(){return e.content})):typeof e.content==`string`?e.tooltipEl.html(e.content):jl(e.content)?(e.tooltipEl.text(``),Ml(e.content,e.tooltipEl.node())):(e.tooltipEl.style(`display`,`none`),console.warn(`Tooltip content is invalid, skipping.`,e.content,e.content.toString())):e.tooltipEl.text(``)}});function Fl(e,n,r){var i,a=1;e??=0,n??=0,r??=0;function o(){var o,s=i.length,c,l=0,u=0,d=0;for(o=0;o<s;++o)c=i[o],l+=c.x||0,u+=c.y||0,d+=c.z||0;for(l=(l/s-e)*a,u=(u/s-n)*a,d=(d/s-r)*a,o=0;o<s;++o)c=i[o],l&&(c.x-=l),u&&(c.y-=u),d&&(c.z-=d)}return o.initialize=function(e){i=e},o.x=function(n){return arguments.length?(e=+n,o):e},o.y=function(e){return arguments.length?(n=+e,o):n},o.z=function(e){return arguments.length?(r=+e,o):r},o.strength=function(e){return arguments.length?(a=+e,o):a},o}function Il(e){let n=+this._x.call(null,e);return Ll(this.cover(n),n,e)}function Ll(e,n,r){if(isNaN(n))return e;var i,a=e._root,o={data:r},s=e._x0,c=e._x1,l,u,d,f,p;if(!a)return e._root=o,e;for(;a.length;)if((d=n>=(l=(s+c)/2))?s=l:c=l,i=a,!(a=a[f=+d]))return i[f]=o,e;if(u=+e._x.call(null,a.data),n===u)return o.next=a,i?i[f]=o:e._root=o,e;do i=i?i[f]=[,,]:e._root=[,,],(d=n>=(l=(s+c)/2))?s=l:c=l;while((f=+d)==(p=+(u>=l)));return i[p]=a,i[f]=o,e}function Rl(e){Array.isArray(e)||(e=Array.from(e));let n=e.length,r=new Float64Array(n),i=1/0,a=-1/0;for(let o=0,s;o<n;++o)isNaN(s=+this._x.call(null,e[o]))||(r[o]=s,s<i&&(i=s),s>a&&(a=s));if(i>a)return this;this.cover(i).cover(a);for(let i=0;i<n;++i)Ll(this,r[i],e[i]);return this}function zl(e){if(isNaN(e=+e))return this;var n=this._x0,r=this._x1;if(isNaN(n))r=(n=Math.floor(e))+1;else{for(var i=r-n||1,a=this._root,o,s;n>e||e>=r;)switch(s=+(e<n),o=[,,],o[s]=a,a=o,i*=2,s){case 0:r=n+i;break;case 1:n=r-i;break}this._root&&this._root.length&&(this._root=a)}return this._x0=n,this._x1=r,this}function Bl(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function Vl(e){return arguments.length?this.cover(+e[0][0]).cover(+e[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function Hl(e,n,r){this.node=e,this.x0=n,this.x1=r}function Ul(e,n){var r,i=this._x0,a,o,s=this._x1,c=[],l=this._root,u,d;for(l&&c.push(new Hl(l,i,s)),n==null?n=1/0:(i=e-n,s=e+n);u=c.pop();)if(!(!(l=u.node)||(a=u.x0)>s||(o=u.x1)<i))if(l.length){var f=(a+o)/2;c.push(new Hl(l[1],f,o),new Hl(l[0],a,f)),(d=+(e>=f))&&(u=c[c.length-1],c[c.length-1]=c[c.length-1-d],c[c.length-1-d]=u)}else{var p=Math.abs(e-+this._x.call(null,l.data));p<n&&(n=p,i=e-p,s=e+p,r=l.data)}return r}function Wl(e){if(isNaN(l=+this._x.call(null,e)))return this;var n,r=this._root,i,a,o,s=this._x0,c=this._x1,l,u,d,f,p;if(!r)return this;if(r.length)for(;;){if((d=l>=(u=(s+c)/2))?s=u:c=u,n=r,!(r=r[f=+d]))return this;if(!r.length)break;n[f+1&1]&&(i=n,p=f)}for(;r.data!==e;)if(a=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,a?(o?a.next=o:delete a.next,this):n?(o?n[f]=o:delete n[f],(r=n[0]||n[1])&&r===(n[1]||n[0])&&!r.length&&(i?i[p]=r:this._root=r),this):(this._root=o,this)}function Gl(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function Kl(){return this._root}function ql(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function Jl(e){var n=[],r,i=this._root,a,o,s;for(i&&n.push(new Hl(i,this._x0,this._x1));r=n.pop();)if(!e(i=r.node,o=r.x0,s=r.x1)&&i.length){var c=(o+s)/2;(a=i[1])&&n.push(new Hl(a,c,s)),(a=i[0])&&n.push(new Hl(a,o,c))}return this}function Yl(e){var n=[],r=[],i;for(this._root&&n.push(new Hl(this._root,this._x0,this._x1));i=n.pop();){var a=i.node;if(a.length){var o,s=i.x0,c=i.x1,l=(s+c)/2;(o=a[0])&&n.push(new Hl(o,s,l)),(o=a[1])&&n.push(new Hl(o,l,c))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.x1);return this}function Xl(e){return e[0]}function Zl(e){return arguments.length?(this._x=e,this):this._x}function Ql(e,n){var r=new $l(n??Xl,NaN,NaN);return e==null?r:r.addAll(e)}function $l(e,n,r){this._x=e,this._x0=n,this._x1=r,this._root=void 0}function eu(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var K=Ql.prototype=$l.prototype;K.copy=function(){var e=new $l(this._x,this._x0,this._x1),n=this._root,r,i;if(!n)return e;if(!n.length)return e._root=eu(n),e;for(r=[{source:n,target:e._root=[,,]}];n=r.pop();)for(var a=0;a<2;++a)(i=n.source[a])&&(i.length?r.push({source:i,target:n.target[a]=[,,]}):n.target[a]=eu(i));return e},K.add=Il,K.addAll=Rl,K.cover=zl,K.data=Bl,K.extent=Vl,K.find=Ul,K.remove=Wl,K.removeAll=Gl,K.root=Kl,K.size=ql,K.visit=Jl,K.visitAfter=Yl,K.x=Zl;function tu(e){let n=+this._x.call(null,e),r=+this._y.call(null,e);return nu(this.cover(n,r),n,r,e)}function nu(e,n,r,i){if(isNaN(n)||isNaN(r))return e;var a,o=e._root,s={data:i},c=e._x0,l=e._y0,u=e._x1,d=e._y1,f,p,m,h,g,_,v,y;if(!o)return e._root=s,e;for(;o.length;)if((g=n>=(f=(c+u)/2))?c=f:u=f,(_=r>=(p=(l+d)/2))?l=p:d=p,a=o,!(o=o[v=_<<1|g]))return a[v]=s,e;if(m=+e._x.call(null,o.data),h=+e._y.call(null,o.data),n===m&&r===h)return s.next=o,a?a[v]=s:e._root=s,e;do a=a?a[v]=[,,,,]:e._root=[,,,,],(g=n>=(f=(c+u)/2))?c=f:u=f,(_=r>=(p=(l+d)/2))?l=p:d=p;while((v=_<<1|g)==(y=(h>=p)<<1|m>=f));return a[y]=o,a[v]=s,e}function ru(e){var n,r,i=e.length,a,o,s=Array(i),c=Array(i),l=1/0,u=1/0,d=-1/0,f=-1/0;for(r=0;r<i;++r)isNaN(a=+this._x.call(null,n=e[r]))||isNaN(o=+this._y.call(null,n))||(s[r]=a,c[r]=o,a<l&&(l=a),a>d&&(d=a),o<u&&(u=o),o>f&&(f=o));if(l>d||u>f)return this;for(this.cover(l,u).cover(d,f),r=0;r<i;++r)nu(this,s[r],c[r],e[r]);return this}function iu(e,n){if(isNaN(e=+e)||isNaN(n=+n))return this;var r=this._x0,i=this._y0,a=this._x1,o=this._y1;if(isNaN(r))a=(r=Math.floor(e))+1,o=(i=Math.floor(n))+1;else{for(var s=a-r||1,c=this._root,l,u;r>e||e>=a||i>n||n>=o;)switch(u=(n<i)<<1|e<r,l=[,,,,],l[u]=c,c=l,s*=2,u){case 0:a=r+s,o=i+s;break;case 1:r=a-s,o=i+s;break;case 2:a=r+s,i=o-s;break;case 3:r=a-s,i=o-s;break}this._root&&this._root.length&&(this._root=c)}return this._x0=r,this._y0=i,this._x1=a,this._y1=o,this}function au(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function ou(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function q(e,n,r,i,a){this.node=e,this.x0=n,this.y0=r,this.x1=i,this.y1=a}function su(e,n,r){var i,a=this._x0,o=this._y0,s,c,l,u,d=this._x1,f=this._y1,p=[],m=this._root,h,g;for(m&&p.push(new q(m,a,o,d,f)),r==null?r=1/0:(a=e-r,o=n-r,d=e+r,f=n+r,r*=r);h=p.pop();)if(!(!(m=h.node)||(s=h.x0)>d||(c=h.y0)>f||(l=h.x1)<a||(u=h.y1)<o))if(m.length){var _=(s+l)/2,v=(c+u)/2;p.push(new q(m[3],_,v,l,u),new q(m[2],s,v,_,u),new q(m[1],_,c,l,v),new q(m[0],s,c,_,v)),(g=(n>=v)<<1|e>=_)&&(h=p[p.length-1],p[p.length-1]=p[p.length-1-g],p[p.length-1-g]=h)}else{var y=e-+this._x.call(null,m.data),b=n-+this._y.call(null,m.data),x=y*y+b*b;if(x<r){var S=Math.sqrt(r=x);a=e-S,o=n-S,d=e+S,f=n+S,i=m.data}}return i}function cu(e){if(isNaN(d=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var n,r=this._root,i,a,o,s=this._x0,c=this._y0,l=this._x1,u=this._y1,d,f,p,m,h,g,_,v;if(!r)return this;if(r.length)for(;;){if((h=d>=(p=(s+l)/2))?s=p:l=p,(g=f>=(m=(c+u)/2))?c=m:u=m,n=r,!(r=r[_=g<<1|h]))return this;if(!r.length)break;(n[_+1&3]||n[_+2&3]||n[_+3&3])&&(i=n,v=_)}for(;r.data!==e;)if(a=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,a?(o?a.next=o:delete a.next,this):n?(o?n[_]=o:delete n[_],(r=n[0]||n[1]||n[2]||n[3])&&r===(n[3]||n[2]||n[1]||n[0])&&!r.length&&(i?i[v]=r:this._root=r),this):(this._root=o,this)}function lu(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function uu(){return this._root}function du(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function fu(e){var n=[],r,i=this._root,a,o,s,c,l;for(i&&n.push(new q(i,this._x0,this._y0,this._x1,this._y1));r=n.pop();)if(!e(i=r.node,o=r.x0,s=r.y0,c=r.x1,l=r.y1)&&i.length){var u=(o+c)/2,d=(s+l)/2;(a=i[3])&&n.push(new q(a,u,d,c,l)),(a=i[2])&&n.push(new q(a,o,d,u,l)),(a=i[1])&&n.push(new q(a,u,s,c,d)),(a=i[0])&&n.push(new q(a,o,s,u,d))}return this}function pu(e){var n=[],r=[],i;for(this._root&&n.push(new q(this._root,this._x0,this._y0,this._x1,this._y1));i=n.pop();){var a=i.node;if(a.length){var o,s=i.x0,c=i.y0,l=i.x1,u=i.y1,d=(s+l)/2,f=(c+u)/2;(o=a[0])&&n.push(new q(o,s,c,d,f)),(o=a[1])&&n.push(new q(o,d,c,l,f)),(o=a[2])&&n.push(new q(o,s,f,d,u)),(o=a[3])&&n.push(new q(o,d,f,l,u))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.y0,i.x1,i.y1);return this}function mu(e){return e[0]}function hu(e){return arguments.length?(this._x=e,this):this._x}function gu(e){return e[1]}function _u(e){return arguments.length?(this._y=e,this):this._y}function vu(e,n,r){var i=new yu(n??mu,r??gu,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function yu(e,n,r,i,a,o){this._x=e,this._y=n,this._x0=r,this._y0=i,this._x1=a,this._y1=o,this._root=void 0}function bu(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var J=vu.prototype=yu.prototype;J.copy=function(){var e=new yu(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root,r,i;if(!n)return e;if(!n.length)return e._root=bu(n),e;for(r=[{source:n,target:e._root=[,,,,]}];n=r.pop();)for(var a=0;a<4;++a)(i=n.source[a])&&(i.length?r.push({source:i,target:n.target[a]=[,,,,]}):n.target[a]=bu(i));return e},J.add=tu,J.addAll=ru,J.cover=iu,J.data=au,J.extent=ou,J.find=su,J.remove=cu,J.removeAll=lu,J.root=uu,J.size=du,J.visit=fu,J.visitAfter=pu,J.x=hu,J.y=_u;function xu(e){let n=+this._x.call(null,e),r=+this._y.call(null,e),i=+this._z.call(null,e);return Su(this.cover(n,r,i),n,r,i,e)}function Su(e,n,r,i,a){if(isNaN(n)||isNaN(r)||isNaN(i))return e;var o,s=e._root,c={data:a},l=e._x0,u=e._y0,d=e._z0,f=e._x1,p=e._y1,m=e._z1,h,g,_,v,y,b,x,S,C,w,T;if(!s)return e._root=c,e;for(;s.length;)if((x=n>=(h=(l+f)/2))?l=h:f=h,(S=r>=(g=(u+p)/2))?u=g:p=g,(C=i>=(_=(d+m)/2))?d=_:m=_,o=s,!(s=s[w=C<<2|S<<1|x]))return o[w]=c,e;if(v=+e._x.call(null,s.data),y=+e._y.call(null,s.data),b=+e._z.call(null,s.data),n===v&&r===y&&i===b)return c.next=s,o?o[w]=c:e._root=c,e;do o=o?o[w]=Array(8):e._root=Array(8),(x=n>=(h=(l+f)/2))?l=h:f=h,(S=r>=(g=(u+p)/2))?u=g:p=g,(C=i>=(_=(d+m)/2))?d=_:m=_;while((w=C<<2|S<<1|x)==(T=(b>=_)<<2|(y>=g)<<1|v>=h));return o[T]=s,o[w]=c,e}function Cu(e){Array.isArray(e)||(e=Array.from(e));let n=e.length,r=new Float64Array(n),i=new Float64Array(n),a=new Float64Array(n),o=1/0,s=1/0,c=1/0,l=-1/0,u=-1/0,d=-1/0;for(let f=0,p,m,h,g;f<n;++f)isNaN(m=+this._x.call(null,p=e[f]))||isNaN(h=+this._y.call(null,p))||isNaN(g=+this._z.call(null,p))||(r[f]=m,i[f]=h,a[f]=g,m<o&&(o=m),m>l&&(l=m),h<s&&(s=h),h>u&&(u=h),g<c&&(c=g),g>d&&(d=g));if(o>l||s>u||c>d)return this;this.cover(o,s,c).cover(l,u,d);for(let o=0;o<n;++o)Su(this,r[o],i[o],a[o],e[o]);return this}function wu(e,n,r){if(isNaN(e=+e)||isNaN(n=+n)||isNaN(r=+r))return this;var i=this._x0,a=this._y0,o=this._z0,s=this._x1,c=this._y1,l=this._z1;if(isNaN(i))s=(i=Math.floor(e))+1,c=(a=Math.floor(n))+1,l=(o=Math.floor(r))+1;else{for(var u=s-i||1,d=this._root,f,p;i>e||e>=s||a>n||n>=c||o>r||r>=l;)switch(p=(r<o)<<2|(n<a)<<1|e<i,f=Array(8),f[p]=d,d=f,u*=2,p){case 0:s=i+u,c=a+u,l=o+u;break;case 1:i=s-u,c=a+u,l=o+u;break;case 2:s=i+u,a=c-u,l=o+u;break;case 3:i=s-u,a=c-u,l=o+u;break;case 4:s=i+u,c=a+u,o=l-u;break;case 5:i=s-u,c=a+u,o=l-u;break;case 6:s=i+u,a=c-u,o=l-u;break;case 7:i=s-u,a=c-u,o=l-u;break}this._root&&this._root.length&&(this._root=d)}return this._x0=i,this._y0=a,this._z0=o,this._x1=s,this._y1=c,this._z1=l,this}function Tu(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function Eu(e){return arguments.length?this.cover(+e[0][0],+e[0][1],+e[0][2]).cover(+e[1][0],+e[1][1],+e[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}function Y(e,n,r,i,a,o,s){this.node=e,this.x0=n,this.y0=r,this.z0=i,this.x1=a,this.y1=o,this.z1=s}function Du(e,n,r,i){var a,o=this._x0,s=this._y0,c=this._z0,l,u,d,f,p,m,h=this._x1,g=this._y1,_=this._z1,v=[],y=this._root,b,x;for(y&&v.push(new Y(y,o,s,c,h,g,_)),i==null?i=1/0:(o=e-i,s=n-i,c=r-i,h=e+i,g=n+i,_=r+i,i*=i);b=v.pop();)if(!(!(y=b.node)||(l=b.x0)>h||(u=b.y0)>g||(d=b.z0)>_||(f=b.x1)<o||(p=b.y1)<s||(m=b.z1)<c))if(y.length){var S=(l+f)/2,C=(u+p)/2,w=(d+m)/2;v.push(new Y(y[7],S,C,w,f,p,m),new Y(y[6],l,C,w,S,p,m),new Y(y[5],S,u,w,f,C,m),new Y(y[4],l,u,w,S,C,m),new Y(y[3],S,C,d,f,p,w),new Y(y[2],l,C,d,S,p,w),new Y(y[1],S,u,d,f,C,w),new Y(y[0],l,u,d,S,C,w)),(x=(r>=w)<<2|(n>=C)<<1|e>=S)&&(b=v[v.length-1],v[v.length-1]=v[v.length-1-x],v[v.length-1-x]=b)}else{var T=e-+this._x.call(null,y.data),E=n-+this._y.call(null,y.data),ee=r-+this._z.call(null,y.data),D=T*T+E*E+ee*ee;if(D<i){var te=Math.sqrt(i=D);o=e-te,s=n-te,c=r-te,h=e+te,g=n+te,_=r+te,a=y.data}}return a}var Ou=(e,n,r,i,a,o)=>Math.sqrt((e-i)**2+(n-a)**2+(r-o)**2);function ku(e,n,r,i){let a=[],o=e-i,s=n-i,c=r-i,l=e+i,u=n+i,d=r+i;return this.visit((f,p,m,h,g,_,v)=>{if(!f.length)do{let o=f.data;Ou(e,n,r,this._x(o),this._y(o),this._z(o))<=i&&a.push(o)}while(f=f.next);return p>l||m>u||h>d||g<o||_<s||v<c}),a}function Au(e){if(isNaN(p=+this._x.call(null,e))||isNaN(m=+this._y.call(null,e))||isNaN(h=+this._z.call(null,e)))return this;var n,r=this._root,i,a,o,s=this._x0,c=this._y0,l=this._z0,u=this._x1,d=this._y1,f=this._z1,p,m,h,g,_,v,y,b,x,S,C;if(!r)return this;if(r.length)for(;;){if((y=p>=(g=(s+u)/2))?s=g:u=g,(b=m>=(_=(c+d)/2))?c=_:d=_,(x=h>=(v=(l+f)/2))?l=v:f=v,n=r,!(r=r[S=x<<2|b<<1|y]))return this;if(!r.length)break;(n[S+1&7]||n[S+2&7]||n[S+3&7]||n[S+4&7]||n[S+5&7]||n[S+6&7]||n[S+7&7])&&(i=n,C=S)}for(;r.data!==e;)if(a=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,a?(o?a.next=o:delete a.next,this):n?(o?n[S]=o:delete n[S],(r=n[0]||n[1]||n[2]||n[3]||n[4]||n[5]||n[6]||n[7])&&r===(n[7]||n[6]||n[5]||n[4]||n[3]||n[2]||n[1]||n[0])&&!r.length&&(i?i[C]=r:this._root=r),this):(this._root=o,this)}function ju(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function Mu(){return this._root}function Nu(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function Pu(e){var n=[],r,i=this._root,a,o,s,c,l,u,d;for(i&&n.push(new Y(i,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));r=n.pop();)if(!e(i=r.node,o=r.x0,s=r.y0,c=r.z0,l=r.x1,u=r.y1,d=r.z1)&&i.length){var f=(o+l)/2,p=(s+u)/2,m=(c+d)/2;(a=i[7])&&n.push(new Y(a,f,p,m,l,u,d)),(a=i[6])&&n.push(new Y(a,o,p,m,f,u,d)),(a=i[5])&&n.push(new Y(a,f,s,m,l,p,d)),(a=i[4])&&n.push(new Y(a,o,s,m,f,p,d)),(a=i[3])&&n.push(new Y(a,f,p,c,l,u,m)),(a=i[2])&&n.push(new Y(a,o,p,c,f,u,m)),(a=i[1])&&n.push(new Y(a,f,s,c,l,p,m)),(a=i[0])&&n.push(new Y(a,o,s,c,f,p,m))}return this}function Fu(e){var n=[],r=[],i;for(this._root&&n.push(new Y(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));i=n.pop();){var a=i.node;if(a.length){var o,s=i.x0,c=i.y0,l=i.z0,u=i.x1,d=i.y1,f=i.z1,p=(s+u)/2,m=(c+d)/2,h=(l+f)/2;(o=a[0])&&n.push(new Y(o,s,c,l,p,m,h)),(o=a[1])&&n.push(new Y(o,p,c,l,u,m,h)),(o=a[2])&&n.push(new Y(o,s,m,l,p,d,h)),(o=a[3])&&n.push(new Y(o,p,m,l,u,d,h)),(o=a[4])&&n.push(new Y(o,s,c,h,p,m,f)),(o=a[5])&&n.push(new Y(o,p,c,h,u,m,f)),(o=a[6])&&n.push(new Y(o,s,m,h,p,d,f)),(o=a[7])&&n.push(new Y(o,p,m,h,u,d,f))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.y0,i.z0,i.x1,i.y1,i.z1);return this}function Iu(e){return e[0]}function Lu(e){return arguments.length?(this._x=e,this):this._x}function Ru(e){return e[1]}function zu(e){return arguments.length?(this._y=e,this):this._y}function Bu(e){return e[2]}function Vu(e){return arguments.length?(this._z=e,this):this._z}function Hu(e,n,r,i){var a=new Uu(n??Iu,r??Ru,i??Bu,NaN,NaN,NaN,NaN,NaN,NaN);return e==null?a:a.addAll(e)}function Uu(e,n,r,i,a,o,s,c,l){this._x=e,this._y=n,this._z=r,this._x0=i,this._y0=a,this._z0=o,this._x1=s,this._y1=c,this._z1=l,this._root=void 0}function Wu(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var X=Hu.prototype=Uu.prototype;X.copy=function(){var e=new Uu(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),n=this._root,r,i;if(!n)return e;if(!n.length)return e._root=Wu(n),e;for(r=[{source:n,target:e._root=Array(8)}];n=r.pop();)for(var a=0;a<8;++a)(i=n.source[a])&&(i.length?r.push({source:i,target:n.target[a]=Array(8)}):n.target[a]=Wu(i));return e},X.add=xu,X.addAll=Cu,X.cover=wu,X.data=Tu,X.extent=Eu,X.find=Du,X.findAllWithinRadius=ku,X.remove=Au,X.removeAll=ju,X.root=Mu,X.size=Nu,X.visit=Pu,X.visitAfter=Fu,X.x=Lu,X.y=zu,X.z=Vu;function Gu(e){return function(){return e}}function Ku(e){return(e()-.5)*1e-6}function qu(e){return e.index}function Ju(e,n){var r=e.get(n);if(!r)throw Error(`node not found: `+n);return r}function Yu(e){var n=qu,r=p,i,a=Gu(30),o,s,c,l,u,d,f=1;e??=[];function p(e){return 1/Math.min(l[e.source.index],l[e.target.index])}function m(n){for(var r=0,a=e.length;r<f;++r)for(var s=0,l,p,m,h=0,g=0,_=0,v,y;s<a;++s)l=e[s],p=l.source,m=l.target,h=m.x+m.vx-p.x-p.vx||Ku(d),c>1&&(g=m.y+m.vy-p.y-p.vy||Ku(d)),c>2&&(_=m.z+m.vz-p.z-p.vz||Ku(d)),v=Math.sqrt(h*h+g*g+_*_),v=(v-o[s])/v*n*i[s],h*=v,g*=v,_*=v,m.vx-=h*(y=u[s]),c>1&&(m.vy-=g*y),c>2&&(m.vz-=_*y),p.vx+=h*(y=1-y),c>1&&(p.vy+=g*y),c>2&&(p.vz+=_*y)}function h(){if(s){var r,a=s.length,c=e.length,d=new Map(s.map((e,r)=>[n(e,r,s),e])),f;for(r=0,l=Array(a);r<c;++r)f=e[r],f.index=r,typeof f.source!=`object`&&(f.source=Ju(d,f.source)),typeof f.target!=`object`&&(f.target=Ju(d,f.target)),l[f.source.index]=(l[f.source.index]||0)+1,l[f.target.index]=(l[f.target.index]||0)+1;for(r=0,u=Array(c);r<c;++r)f=e[r],u[r]=l[f.source.index]/(l[f.source.index]+l[f.target.index]);i=Array(c),g(),o=Array(c),_()}}function g(){if(s)for(var n=0,a=e.length;n<a;++n)i[n]=+r(e[n],n,e)}function _(){if(s)for(var n=0,r=e.length;n<r;++n)o[n]=+a(e[n],n,e)}return m.initialize=function(e,...n){s=e,d=n.find(e=>typeof e==`function`)||Math.random,c=n.find(e=>[1,2,3].includes(e))||2,h()},m.links=function(n){return arguments.length?(e=n,h(),m):e},m.id=function(e){return arguments.length?(n=e,m):n},m.iterations=function(e){return arguments.length?(f=+e,m):f},m.strength=function(e){return arguments.length?(r=typeof e==`function`?e:Gu(+e),g(),m):r},m.distance=function(e){return arguments.length?(a=typeof e==`function`?e:Gu(+e),_(),m):a},m}var Xu=1664525,Zu=1013904223,Qu=4294967296;function $u(){let e=1;return()=>(e=(Xu*e+Zu)%Qu)/Qu}var ed=3;function td(e){return e.x}function nd(e){return e.y}function rd(e){return e.z}var id=10,ad=Math.PI*(3-Math.sqrt(5)),od=Math.PI*20/(9+Math.sqrt(221));function sd(e,n){n||=2;var r=Math.min(ed,Math.max(1,Math.round(n))),i,a=1,o=.001,s=1-o**(1/300),c=0,l=.6,u=new Map,d=Si(m),f=Pn(`tick`,`end`),p=$u();e??=[];function m(){h(),f.call(`tick`,i),a<o&&(d.stop(),f.call(`end`,i))}function h(n){var o,d=e.length,f;n===void 0&&(n=1);for(var p=0;p<n;++p)for(a+=(c-a)*s,u.forEach(function(e){e(a)}),o=0;o<d;++o)f=e[o],f.fx==null?f.x+=f.vx*=l:(f.x=f.fx,f.vx=0),r>1&&(f.fy==null?f.y+=f.vy*=l:(f.y=f.fy,f.vy=0)),r>2&&(f.fz==null?f.z+=f.vz*=l:(f.z=f.fz,f.vz=0));return i}function g(){for(var n=0,i=e.length,a;n<i;++n){if(a=e[n],a.index=n,a.fx!=null&&(a.x=a.fx),a.fy!=null&&(a.y=a.fy),a.fz!=null&&(a.z=a.fz),isNaN(a.x)||r>1&&isNaN(a.y)||r>2&&isNaN(a.z)){var o=id*(r>2?Math.cbrt(.5+n):r>1?Math.sqrt(.5+n):n),s=n*ad,c=n*od;r===1?a.x=o:r===2?(a.x=o*Math.cos(s),a.y=o*Math.sin(s)):(a.x=o*Math.sin(s)*Math.cos(c),a.y=o*Math.cos(s),a.z=o*Math.sin(s)*Math.sin(c))}(isNaN(a.vx)||r>1&&isNaN(a.vy)||r>2&&isNaN(a.vz))&&(a.vx=0,r>1&&(a.vy=0),r>2&&(a.vz=0))}}function _(n){return n.initialize&&n.initialize(e,p,r),n}return g(),i={tick:h,restart:function(){return d.restart(m),i},stop:function(){return d.stop(),i},numDimensions:function(e){return arguments.length?(r=Math.min(ed,Math.max(1,Math.round(e))),u.forEach(_),i):r},nodes:function(n){return arguments.length?(e=n,g(),u.forEach(_),i):e},alpha:function(e){return arguments.length?(a=+e,i):a},alphaMin:function(e){return arguments.length?(o=+e,i):o},alphaDecay:function(e){return arguments.length?(s=+e,i):+s},alphaTarget:function(e){return arguments.length?(c=+e,i):c},velocityDecay:function(e){return arguments.length?(l=1-e,i):1-l},randomSource:function(e){return arguments.length?(p=e,u.forEach(_),i):p},force:function(e,n){return arguments.length>1?(n==null?u.delete(e):u.set(e,_(n)),i):u.get(e)},find:function(){var n=Array.prototype.slice.call(arguments),i=n.shift()||0,a=(r>1?n.shift():null)||0,o=(r>2?n.shift():null)||0,s=n.shift()||1/0,c=0,l=e.length,u,d,f,p,m,h;for(s*=s,c=0;c<l;++c)m=e[c],u=i-m.x,d=a-(m.y||0),f=o-(m.z||0),p=u*u+d*d+f*f,p<s&&(h=m,s=p);return h},on:function(e,n){return arguments.length>1?(f.on(e,n),i):f.on(e)}}}function cd(){var e,n,r,i,a,o=Gu(-30),s,c=1,l=1/0,u=.81;function d(i){var o,s=e.length,c=(n===1?Ql(e,td):n===2?vu(e,td,nd):n===3?Hu(e,td,nd,rd):null).visitAfter(p);for(a=i,o=0;o<s;++o)r=e[o],c.visit(m)}function f(){if(e){var n,r=e.length,i;for(s=Array(r),n=0;n<r;++n)i=e[n],s[i.index]=+o(i,n,e)}}function p(e){var r=0,i,a,o=0,c,l,u,d,f=e.length;if(f){for(c=l=u=d=0;d<f;++d)(i=e[d])&&(a=Math.abs(i.value))&&(r+=i.value,o+=a,c+=a*(i.x||0),l+=a*(i.y||0),u+=a*(i.z||0));r*=Math.sqrt(4/f),e.x=c/o,n>1&&(e.y=l/o),n>2&&(e.z=u/o)}else{i=e,i.x=i.data.x,n>1&&(i.y=i.data.y),n>2&&(i.z=i.data.z);do r+=s[i.data.index];while(i=i.next)}e.value=r}function m(e,o,d,f,p){if(!e.value)return!0;var m=[d,f,p][n-1],h=e.x-r.x,g=n>1?e.y-r.y:0,_=n>2?e.z-r.z:0,v=m-o,y=h*h+g*g+_*_;if(v*v/u<y)return y<l&&(h===0&&(h=Ku(i),y+=h*h),n>1&&g===0&&(g=Ku(i),y+=g*g),n>2&&_===0&&(_=Ku(i),y+=_*_),y<c&&(y=Math.sqrt(c*y)),r.vx+=h*e.value*a/y,n>1&&(r.vy+=g*e.value*a/y),n>2&&(r.vz+=_*e.value*a/y)),!0;if(!(e.length||y>=l)){(e.data!==r||e.next)&&(h===0&&(h=Ku(i),y+=h*h),n>1&&g===0&&(g=Ku(i),y+=g*g),n>2&&_===0&&(_=Ku(i),y+=_*_),y<c&&(y=Math.sqrt(c*y)));do e.data!==r&&(v=s[e.data.index]*a/y,r.vx+=h*v,n>1&&(r.vy+=g*v),n>2&&(r.vz+=_*v));while(e=e.next)}}return d.initialize=function(r,...a){e=r,i=a.find(e=>typeof e==`function`)||Math.random,n=a.find(e=>[1,2,3].includes(e))||2,f()},d.strength=function(e){return arguments.length?(o=typeof e==`function`?e:Gu(+e),f(),d):o},d.distanceMin=function(e){return arguments.length?(c=e*e,d):Math.sqrt(c)},d.distanceMax=function(e){return arguments.length?(l=e*e,d):Math.sqrt(l)},d.theta=function(e){return arguments.length?(u=e*e,d):Math.sqrt(u)},d}function ld(e,n,r,i){var a,o,s=Gu(.1),c,l;typeof e!=`function`&&(e=Gu(+e)),n??=0,r??=0,i??=0;function u(e){for(var s=0,u=a.length;s<u;++s){var d=a[s],f=d.x-n||1e-6,p=(d.y||0)-r||1e-6,m=(d.z||0)-i||1e-6,h=Math.sqrt(f*f+p*p+m*m),g=(l[s]-h)*c[s]*e/h;d.vx+=f*g,o>1&&(d.vy+=p*g),o>2&&(d.vz+=m*g)}}function d(){if(a){var n,r=a.length;for(c=Array(r),l=Array(r),n=0;n<r;++n)l[n]=+e(a[n],n,a),c[n]=isNaN(l[n])?0:+s(a[n],n,a)}}return u.initialize=function(e,...n){a=e,o=n.find(e=>[1,2,3].includes(e))||2,d()},u.strength=function(e){return arguments.length?(s=typeof e==`function`?e:Gu(+e),d(),u):s},u.radius=function(n){return arguments.length?(e=typeof n==`function`?n:Gu(+n),d(),u):e},u.x=function(e){return arguments.length?(n=+e,u):n},u.y=function(e){return arguments.length?(r=+e,u):r},u.z=function(e){return arguments.length?(i=+e,u):i},u}var{abs:ud,cos:dd,sin:fd,acos:pd,atan2:md,sqrt:hd,pow:gd}=Math;function _d(e){return e<0?-gd(-e,1/3):gd(e,1/3)}var vd=Math.PI,yd=2*vd,bd=vd/2,xd=1e-6,Sd=2**53-1||9007199254740991,Cd=-(2**53-1)||-9007199254740991,wd={x:0,y:0,z:0},Z={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(e,n){let r=n(e),i=r.x*r.x+r.y*r.y;return r.z!==void 0&&(i+=r.z*r.z),hd(i)},compute:function(e,n,r){if(e===0)return n[0].t=0,n[0];let i=n.length-1;if(e===1)return n[i].t=1,n[i];let a=1-e,o=n;if(i===0)return n[0].t=e,n[0];if(i===1){let n={x:a*o[0].x+e*o[1].x,y:a*o[0].y+e*o[1].y,t:e};return r&&(n.z=a*o[0].z+e*o[1].z),n}if(i<4){let n=a*a,s=e*e,c,l,u,d=0;i===2?(o=[o[0],o[1],o[2],wd],c=n,l=a*e*2,u=s):i===3&&(c=n*a,l=n*e*3,u=a*s*3,d=e*s);let f={x:c*o[0].x+l*o[1].x+u*o[2].x+d*o[3].x,y:c*o[0].y+l*o[1].y+u*o[2].y+d*o[3].y,t:e};return r&&(f.z=c*o[0].z+l*o[1].z+u*o[2].z+d*o[3].z),f}let s=JSON.parse(JSON.stringify(n));for(;s.length>1;){for(let n=0;n<s.length-1;n++)s[n]={x:s[n].x+(s[n+1].x-s[n].x)*e,y:s[n].y+(s[n+1].y-s[n].y)*e},s[n].z!==void 0&&(s[n].z=s[n].z+(s[n+1].z-s[n].z)*e);s.splice(s.length-1,1)}return s[0].t=e,s[0]},computeWithRatios:function(e,n,r,i){let a=1-e,o=r,s=n,c=o[0],l=o[1],u=o[2],d=o[3],f;if(c*=a,l*=e,s.length===2)return f=c+l,{x:(c*s[0].x+l*s[1].x)/f,y:(c*s[0].y+l*s[1].y)/f,z:i?(c*s[0].z+l*s[1].z)/f:!1,t:e};if(c*=a,l*=2*a,u*=e*e,s.length===3)return f=c+l+u,{x:(c*s[0].x+l*s[1].x+u*s[2].x)/f,y:(c*s[0].y+l*s[1].y+u*s[2].y)/f,z:i?(c*s[0].z+l*s[1].z+u*s[2].z)/f:!1,t:e};if(c*=a,l*=1.5*a,u*=3*a,d*=e*e*e,s.length===4)return f=c+l+u+d,{x:(c*s[0].x+l*s[1].x+u*s[2].x+d*s[3].x)/f,y:(c*s[0].y+l*s[1].y+u*s[2].y+d*s[3].y)/f,z:i?(c*s[0].z+l*s[1].z+u*s[2].z+d*s[3].z)/f:!1,t:e}},derive:function(e,n){let r=[];for(let i=e,a=i.length,o=a-1;a>1;a--,o--){let e=[];for(let r=0,a;r<o;r++)a={x:o*(i[r+1].x-i[r].x),y:o*(i[r+1].y-i[r].y)},n&&(a.z=o*(i[r+1].z-i[r].z)),e.push(a);r.push(e),i=e}return r},between:function(e,n,r){return n<=e&&e<=r||Z.approximately(e,n)||Z.approximately(e,r)},approximately:function(e,n,r){return ud(e-n)<=(r||xd)},length:function(e){let n=.5,r=Z.Tvalues.length,i=0;for(let a=0,o;a<r;a++)o=n*Z.Tvalues[a]+n,i+=Z.Cvalues[a]*Z.arcfn(o,e);return n*i},map:function(e,n,r,i,a){let o=r-n;return i+(a-i)*((e-n)/o)},lerp:function(e,n,r){let i={x:n.x+e*(r.x-n.x),y:n.y+e*(r.y-n.y)};return n.z!==void 0&&r.z!==void 0&&(i.z=n.z+e*(r.z-n.z)),i},pointToString:function(e){let n=e.x+`/`+e.y;return e.z!==void 0&&(n+=`/`+e.z),n},pointsToString:function(e){return`[`+e.map(Z.pointToString).join(`, `)+`]`},copy:function(e){return JSON.parse(JSON.stringify(e))},angle:function(e,n,r){let i=n.x-e.x,a=n.y-e.y,o=r.x-e.x,s=r.y-e.y;return md(i*s-a*o,i*o+a*s)},round:function(e,n){let r=``+e,i=r.indexOf(`.`);return parseFloat(r.substring(0,i+1+n))},dist:function(e,n){let r=e.x-n.x,i=e.y-n.y;return hd(r*r+i*i)},closest:function(e,n){let r=gd(2,63),i,a;return e.forEach(function(e,o){a=Z.dist(n,e),a<r&&(r=a,i=o)}),{mdist:r,mpos:i}},abcratio:function(e,n){if(n!==2&&n!==3)return!1;if(e===void 0)e=.5;else if(e===0||e===1)return e;let r=gd(e,n)+gd(1-e,n);return ud((r-1)/r)},projectionratio:function(e,n){if(n!==2&&n!==3)return!1;if(e===void 0)e=.5;else if(e===0||e===1)return e;let r=gd(1-e,n);return r/(gd(e,n)+r)},lli8:function(e,n,r,i,a,o,s,c){let l=(e*i-n*r)*(a-s)-(e-r)*(a*c-o*s),u=(e*i-n*r)*(o-c)-(n-i)*(a*c-o*s),d=(e-r)*(o-c)-(n-i)*(a-s);return d==0?!1:{x:l/d,y:u/d}},lli4:function(e,n,r,i){let a=e.x,o=e.y,s=n.x,c=n.y,l=r.x,u=r.y,d=i.x,f=i.y;return Z.lli8(a,o,s,c,l,u,d,f)},lli:function(e,n){return Z.lli4(e,e.c,n,n.c)},makeline:function(e,n){return new Pd(e.x,e.y,(e.x+n.x)/2,(e.y+n.y)/2,n.x,n.y)},findbbox:function(e){let n=Sd,r=Sd,i=Cd,a=Cd;return e.forEach(function(e){let o=e.bbox();n>o.x.min&&(n=o.x.min),r>o.y.min&&(r=o.y.min),i<o.x.max&&(i=o.x.max),a<o.y.max&&(a=o.y.max)}),{x:{min:n,mid:(n+i)/2,max:i,size:i-n},y:{min:r,mid:(r+a)/2,max:a,size:a-r}}},shapeintersections:function(e,n,r,i,a){if(!Z.bboxoverlap(n,i))return[];let o=[],s=[e.startcap,e.forward,e.back,e.endcap],c=[r.startcap,r.forward,r.back,r.endcap];return s.forEach(function(n){n.virtual||c.forEach(function(i){if(i.virtual)return;let s=n.intersects(i,a);s.length>0&&(s.c1=n,s.c2=i,s.s1=e,s.s2=r,o.push(s))})}),o},makeshape:function(e,n,r){let i=n.points.length,a=e.points.length,o=Z.makeline(n.points[i-1],e.points[0]),s=Z.makeline(e.points[a-1],n.points[0]),c={startcap:o,forward:e,back:n,endcap:s,bbox:Z.findbbox([o,e,n,s])};return c.intersections=function(e){return Z.shapeintersections(c,c.bbox,e,e.bbox,r)},c},getminmax:function(e,n,r){if(!r)return{min:0,max:0};let i=Sd,a=Cd,o,s;r.indexOf(0)===-1&&(r=[0].concat(r)),r.indexOf(1)===-1&&r.push(1);for(let c=0,l=r.length;c<l;c++)o=r[c],s=e.get(o),s[n]<i&&(i=s[n]),s[n]>a&&(a=s[n]);return{min:i,mid:(i+a)/2,max:a,size:a-i}},align:function(e,n){let r=n.p1.x,i=n.p1.y,a=-md(n.p2.y-i,n.p2.x-r);return e.map(function(e){return{x:(e.x-r)*dd(a)-(e.y-i)*fd(a),y:(e.x-r)*fd(a)+(e.y-i)*dd(a)}})},roots:function(e,n){n||={p1:{x:0,y:0},p2:{x:1,y:0}};let r=e.length-1,i=Z.align(e,n),a=function(e){return 0<=e&&e<=1};if(r===2){let e=i[0].y,n=i[1].y,r=i[2].y,o=e-2*n+r;if(o!==0){let i=-hd(n*n-e*r),s=-e+n;return[-(i+s)/o,-(-i+s)/o].filter(a)}else if(n!==r&&o===0)return[(2*n-r)/(2*n-2*r)].filter(a);return[]}let o=i[0].y,s=i[1].y,c=i[2].y,l=i[3].y,u=-o+3*s-3*c+l,d=3*o-6*s+3*c,f=-3*o+3*s,p=o;if(Z.approximately(u,0)){if(Z.approximately(d,0))return Z.approximately(f,0)?[]:[-p/f].filter(a);let e=hd(f*f-4*d*p),n=2*d;return[(e-f)/n,(-f-e)/n].filter(a)}d/=u,f/=u,p/=u;let m=(3*f-d*d)/3,h=m/3,g=(2*d*d*d-9*d*f+27*p)/27,_=g/2,v=_*_+h*h*h,y,b,x,S,C;if(v<0){let e=-m/3,n=hd(e*e*e),r=-g/(2*n),i=pd(r<-1?-1:r>1?1:r),o=2*_d(n);return x=o*dd(i/3)-d/3,S=o*dd((i+yd)/3)-d/3,C=o*dd((i+2*yd)/3)-d/3,[x,S,C].filter(a)}else if(v===0)return y=_<0?_d(-_):-_d(_),x=2*y-d/3,S=-y-d/3,[x,S].filter(a);else{let e=hd(v);return y=_d(-_+e),b=_d(_+e),[y-b-d/3].filter(a)}},droots:function(e){if(e.length===3){let n=e[0],r=e[1],i=e[2],a=n-2*r+i;if(a!==0){let e=-hd(r*r-n*i),o=-n+r;return[-(e+o)/a,-(-e+o)/a]}else if(r!==i&&a===0)return[(2*r-i)/(2*(r-i))];return[]}if(e.length===2){let n=e[0],r=e[1];return n===r?[]:[n/(n-r)]}return[]},curvature:function(e,n,r,i,a){let o,s,c,l,u=0,d=0,f=Z.compute(e,n),p=Z.compute(e,r),m=f.x*f.x+f.y*f.y;if(i?(o=hd(gd(f.y*p.z-p.y*f.z,2)+gd(f.z*p.x-p.z*f.x,2)+gd(f.x*p.y-p.x*f.y,2)),s=gd(m+f.z*f.z,3/2)):(o=f.x*p.y-f.y*p.x,s=gd(m,3/2)),o===0||s===0)return{k:0,r:0};if(u=o/s,d=s/o,!a){let a=Z.curvature(e-.001,n,r,i,!0).k,o=Z.curvature(e+.001,n,r,i,!0).k;l=(o-u+(u-a))/2,c=(ud(o-u)+ud(u-a))/2}return{k:u,r:d,dk:l,adk:c}},inflections:function(e){if(e.length<4)return[];let n=Z.align(e,{p1:e[0],p2:e.slice(-1)[0]}),r=n[2].x*n[1].y,i=n[3].x*n[1].y,a=n[1].x*n[2].y,o=n[3].x*n[2].y,s=18*(-3*r+2*i+3*a-o),c=18*(3*r-i-3*a),l=18*(a-r);if(Z.approximately(s,0)){if(!Z.approximately(c,0)){let e=-l/c;if(0<=e&&e<=1)return[e]}return[]}let u=2*s;if(Z.approximately(u,0))return[];let d=c*c-4*s*l;if(d<0)return[];let f=Math.sqrt(d);return[(f-c)/u,-(c+f)/u].filter(function(e){return 0<=e&&e<=1})},bboxoverlap:function(e,n){let r=[`x`,`y`],i=r.length;for(let a=0,o,s,c,l;a<i;a++)if(o=r[a],s=e[o].mid,c=n[o].mid,l=(e[o].size+n[o].size)/2,ud(s-c)>=l)return!1;return!0},expandbox:function(e,n){n.x.min<e.x.min&&(e.x.min=n.x.min),n.y.min<e.y.min&&(e.y.min=n.y.min),n.z&&n.z.min<e.z.min&&(e.z.min=n.z.min),n.x.max>e.x.max&&(e.x.max=n.x.max),n.y.max>e.y.max&&(e.y.max=n.y.max),n.z&&n.z.max>e.z.max&&(e.z.max=n.z.max),e.x.mid=(e.x.min+e.x.max)/2,e.y.mid=(e.y.min+e.y.max)/2,e.z&&(e.z.mid=(e.z.min+e.z.max)/2),e.x.size=e.x.max-e.x.min,e.y.size=e.y.max-e.y.min,e.z&&(e.z.size=e.z.max-e.z.min)},pairiteration:function(e,n,r){let i=e.bbox(),a=n.bbox(),o=1e5,s=r||.5;if(i.x.size+i.y.size<s&&a.x.size+a.y.size<s)return[(o*(e._t1+e._t2)/2|0)/o+`/`+(o*(n._t1+n._t2)/2|0)/o];let c=e.split(.5),l=n.split(.5),u=[{left:c.left,right:l.left},{left:c.left,right:l.right},{left:c.right,right:l.right},{left:c.right,right:l.left}];u=u.filter(function(e){return Z.bboxoverlap(e.left.bbox(),e.right.bbox())});let d=[];return u.length===0?d:(u.forEach(function(e){d=d.concat(Z.pairiteration(e.left,e.right,s))}),d=d.filter(function(e,n){return d.indexOf(e)===n}),d)},getccenter:function(e,n,r){let i=n.x-e.x,a=n.y-e.y,o=r.x-n.x,s=r.y-n.y,c=i*dd(bd)-a*fd(bd),l=i*fd(bd)+a*dd(bd),u=o*dd(bd)-s*fd(bd),d=o*fd(bd)+s*dd(bd),f=(e.x+n.x)/2,p=(e.y+n.y)/2,m=(n.x+r.x)/2,h=(n.y+r.y)/2,g=f+c,_=p+l,v=m+u,y=h+d,b=Z.lli8(f,p,g,_,m,h,v,y),x=Z.dist(b,e),S=md(e.y-b.y,e.x-b.x),C=md(n.y-b.y,n.x-b.x),w=md(r.y-b.y,r.x-b.x),T;return S<w?((S>C||C>w)&&(S+=yd),S>w&&(T=w,w=S,S=T)):w<C&&C<S?(T=w,w=S,S=T):w+=yd,b.s=S,b.e=w,b.r=x,b},numberSort:function(e,n){return e-n}},Td=class e{constructor(e){this.curves=[],this._3d=!1,e&&(this.curves=e,this._3d=this.curves[0]._3d)}valueOf(){return this.toString()}toString(){return`[`+this.curves.map(function(e){return Z.pointsToString(e.points)}).join(`, `)+`]`}addCurve(e){this.curves.push(e),this._3d=this._3d||e._3d}length(){return this.curves.map(function(e){return e.length()}).reduce(function(e,n){return e+n})}curve(e){return this.curves[e]}bbox(){let e=this.curves;for(var n=e[0].bbox(),r=1;r<e.length;r++)Z.expandbox(n,e[r].bbox());return n}offset(n){let r=[];return this.curves.forEach(function(e){r.push(...e.offset(n))}),new e(r)}},{abs:Ed,min:Dd,max:Od,cos:kd,sin:Ad,acos:jd,sqrt:Md}=Math,Nd=Math.PI,Pd=class e{constructor(e){let n=e&&e.forEach?e:Array.from(arguments).slice(),r=!1;if(typeof n[0]==`object`){r=n.length;let e=[];n.forEach(function(n){[`x`,`y`,`z`].forEach(function(r){n[r]!==void 0&&e.push(n[r])})}),n=e}let i=!1,a=n.length;if(r){if(r>4){if(arguments.length!==1)throw Error(`Only new Bezier(point[]) is accepted for 4th and higher order curves`);i=!0}}else if(a!==6&&a!==8&&a!==9&&a!==12&&arguments.length!==1)throw Error(`Only new Bezier(point[]) is accepted for 4th and higher order curves`);let o=this._3d=!i&&(a===9||a===12)||e&&e[0]&&e[0].z!==void 0,s=this.points=[];for(let e=0,r=o?3:2;e<a;e+=r){var c={x:n[e],y:n[e+1]};o&&(c.z=n[e+2]),s.push(c)}let l=this.order=s.length-1,u=this.dims=[`x`,`y`];o&&u.push(`z`),this.dimlen=u.length;let d=Z.align(s,{p1:s[0],p2:s[l]}),f=Z.dist(s[0],s[l]);this._linear=d.reduce((e,n)=>e+Ed(n.y),0)<f/50,this._lut=[],this._t1=0,this._t2=1,this.update()}static quadraticFromPoints(n,r,i,a){return a===void 0&&(a=.5),a===0?new e(r,r,i):a===1?new e(n,r,r):new e(n,e.getABC(2,n,r,i,a).A,i)}static cubicFromPoints(n,r,i,a,o){a===void 0&&(a=.5);let s=e.getABC(3,n,r,i,a);o===void 0&&(o=Z.dist(r,s.C));let c=o*(1-a)/a,l=Z.dist(n,i),u=(i.x-n.x)/l,d=(i.y-n.y)/l,f=o*u,p=o*d,m=c*u,h=c*d,g={x:r.x-f,y:r.y-p},_={x:r.x+m,y:r.y+h},v=s.A,y={x:v.x+(g.x-v.x)/(1-a),y:v.y+(g.y-v.y)/(1-a)},b={x:v.x+(_.x-v.x)/a,y:v.y+(_.y-v.y)/a};return new e(n,{x:n.x+(y.x-n.x)/a,y:n.y+(y.y-n.y)/a},{x:i.x+(b.x-i.x)/(1-a),y:i.y+(b.y-i.y)/(1-a)},i)}static getUtils(){return Z}getUtils(){return e.getUtils()}static get PolyBezier(){return Td}valueOf(){return this.toString()}toString(){return Z.pointsToString(this.points)}toSVG(){if(this._3d)return!1;let e=this.points,n=[`M`,e[0].x,e[0].y,this.order===2?`Q`:`C`];for(let r=1,i=e.length;r<i;r++)n.push(e[r].x),n.push(e[r].y);return n.join(` `)}setRatios(e){if(e.length!==this.points.length)throw Error(`incorrect number of ratio values`);this.ratios=e,this._lut=[]}verify(){let e=this.coordDigest();e!==this._print&&(this._print=e,this.update())}coordDigest(){return this.points.map(function(e,n){return``+n+e.x+e.y+(e.z?e.z:0)}).join(``)}update(){this._lut=[],this.dpoints=Z.derive(this.points,this._3d),this.computedirection()}computedirection(){let e=this.points;this.clockwise=Z.angle(e[0],e[this.order],e[1])>0}length(){return Z.length(this.derivative.bind(this))}static getABC(e=2,n,r,i,a=.5){let o=Z.projectionratio(a,e),s=1-o,c={x:o*n.x+s*i.x,y:o*n.y+s*i.y},l=Z.abcratio(a,e);return{A:{x:r.x+(r.x-c.x)/l,y:r.y+(r.y-c.y)/l},B:r,C:c,S:n,E:i}}getABC(n,r){r||=this.get(n);let i=this.points[0],a=this.points[this.order];return e.getABC(this.order,i,r,a,n)}getLUT(e){if(this.verify(),e||=100,this._lut.length===e+1)return this._lut;this._lut=[],e++,this._lut=[];for(let n=0,r,i;n<e;n++)i=n/(e-1),r=this.compute(i),r.t=i,this._lut.push(r);return this._lut}on(e,n){n||=5;let r=this.getLUT(),i=[];for(let a=0,o,s=0;a<r.length;a++)o=r[a],Z.dist(o,e)<n&&(i.push(o),s+=a/r.length);return i.length?t/=i.length:!1}project(e){let n=this.getLUT(),r=n.length-1,i=Z.closest(n,e),a=i.mpos,o=(a-1)/r,s=(a+1)/r,c=.1/r,l=i.mdist,u=o,d=u,f;l+=1;for(let n;u<s+c;u+=c)f=this.compute(u),n=Z.dist(e,f),n<l&&(l=n,d=u);return d=d<0?0:d>1?1:d,f=this.compute(d),f.t=d,f.d=l,f}get(e){return this.compute(e)}point(e){return this.points[e]}compute(e){return this.ratios?Z.computeWithRatios(e,this.points,this.ratios,this._3d):Z.compute(e,this.points,this._3d,this.ratios)}raise(){let n=this.points,r=[n[0]],i=n.length;for(let e=1,a,o;e<i;e++)a=n[e],o=n[e-1],r[e]={x:(i-e)/i*a.x+e/i*o.x,y:(i-e)/i*a.y+e/i*o.y};return r[i]=n[i-1],new e(r)}derivative(e){return Z.compute(e,this.dpoints[0],this._3d)}dderivative(e){return Z.compute(e,this.dpoints[1],this._3d)}align(){let n=this.points;return new e(Z.align(n,{p1:n[0],p2:n[n.length-1]}))}curvature(e){return Z.curvature(e,this.dpoints[0],this.dpoints[1],this._3d)}inflections(){return Z.inflections(this.points)}normal(e){return this._3d?this.__normal3(e):this.__normal2(e)}__normal2(e){let n=this.derivative(e),r=Md(n.x*n.x+n.y*n.y);return{t:e,x:-n.y/r,y:n.x/r}}__normal3(e){let n=this.derivative(e),r=this.derivative(e+.01),i=Md(n.x*n.x+n.y*n.y+n.z*n.z),a=Md(r.x*r.x+r.y*r.y+r.z*r.z);n.x/=i,n.y/=i,n.z/=i,r.x/=a,r.y/=a,r.z/=a;let o={x:r.y*n.z-r.z*n.y,y:r.z*n.x-r.x*n.z,z:r.x*n.y-r.y*n.x},s=Md(o.x*o.x+o.y*o.y+o.z*o.z);o.x/=s,o.y/=s,o.z/=s;let c=[o.x*o.x,o.x*o.y-o.z,o.x*o.z+o.y,o.x*o.y+o.z,o.y*o.y,o.y*o.z-o.x,o.x*o.z-o.y,o.y*o.z+o.x,o.z*o.z];return{t:e,x:c[0]*n.x+c[1]*n.y+c[2]*n.z,y:c[3]*n.x+c[4]*n.y+c[5]*n.z,z:c[6]*n.x+c[7]*n.y+c[8]*n.z}}hull(e){let n=this.points,r=[],i=[],a=0;for(i[a++]=n[0],i[a++]=n[1],i[a++]=n[2],this.order===3&&(i[a++]=n[3]);n.length>1;){r=[];for(let o=0,s,c=n.length-1;o<c;o++)s=Z.lerp(e,n[o],n[o+1]),i[a++]=s,r.push(s);n=r}return i}split(n,r){if(n===0&&r)return this.split(r).left;if(r===1)return this.split(n).right;let i=this.hull(n),a={left:this.order===2?new e([i[0],i[3],i[5]]):new e([i[0],i[4],i[7],i[9]]),right:this.order===2?new e([i[5],i[4],i[2]]):new e([i[9],i[8],i[6],i[3]]),span:i};return a.left._t1=Z.map(0,0,1,this._t1,this._t2),a.left._t2=Z.map(n,0,1,this._t1,this._t2),a.right._t1=Z.map(n,0,1,this._t1,this._t2),a.right._t2=Z.map(1,0,1,this._t1,this._t2),r?(r=Z.map(r,n,1,0,1),a.right.split(r).left):a}extrema(){let e={},n=[];return this.dims.forEach(function(r){let i=function(e){return e[r]},a=this.dpoints[0].map(i);e[r]=Z.droots(a),this.order===3&&(a=this.dpoints[1].map(i),e[r]=e[r].concat(Z.droots(a))),e[r]=e[r].filter(function(e){return e>=0&&e<=1}),n=n.concat(e[r].sort(Z.numberSort))}.bind(this)),e.values=n.sort(Z.numberSort).filter(function(e,r){return n.indexOf(e)===r}),e}bbox(){let e=this.extrema(),n={};return this.dims.forEach(function(r){n[r]=Z.getminmax(this,r,e[r])}.bind(this)),n}overlaps(e){let n=this.bbox(),r=e.bbox();return Z.bboxoverlap(n,r)}offset(n,r){if(r!==void 0){let e=this.get(n),i=this.normal(n),a={c:e,n:i,x:e.x+i.x*r,y:e.y+i.y*r};return this._3d&&(a.z=e.z+i.z*r),a}if(this._linear){let r=this.normal(0);return[new e(this.points.map(function(e){let i={x:e.x+n*r.x,y:e.y+n*r.y};return e.z&&r.z&&(i.z=e.z+n*r.z),i}))]}return this.reduce().map(function(e){return e._linear?e.offset(n)[0]:e.scale(n)})}simple(){if(this.order===3){let e=Z.angle(this.points[0],this.points[3],this.points[1]),n=Z.angle(this.points[0],this.points[3],this.points[2]);if(e>0&&n<0||e<0&&n>0)return!1}let e=this.normal(0),n=this.normal(1),r=e.x*n.x+e.y*n.y;return this._3d&&(r+=e.z*n.z),Ed(jd(r))<Nd/3}reduce(){let e,n=0,r=0,i=.01,a,o=[],s=[],c=this.extrema().values;for(c.indexOf(0)===-1&&(c=[0].concat(c)),c.indexOf(1)===-1&&c.push(1),n=c[0],e=1;e<c.length;e++)r=c[e],a=this.split(n,r),a._t1=n,a._t2=r,o.push(a),n=r;return o.forEach(function(e){for(n=0,r=0;r<=1;)for(r=n+i;r<=1+i;r+=i)if(a=e.split(n,r),!a.simple()){if(r-=i,Ed(n-r)<i)return[];a=e.split(n,r),a._t1=Z.map(n,0,1,e._t1,e._t2),a._t2=Z.map(r,0,1,e._t1,e._t2),s.push(a),n=r;break}n<1&&(a=e.split(n,1),a._t1=Z.map(n,0,1,e._t1,e._t2),a._t2=e._t2,s.push(a))}),s}translate(n,r,i){i=typeof i==`number`?i:r;let a=this.order,o=this.points.map((e,n)=>(1-n/a)*r+n/a*i);return new e(this.points.map((e,r)=>({x:e.x+n.x*o[r],y:e.y+n.y*o[r]})))}scale(n){let r=this.order,i=!1;if(typeof n==`function`&&(i=n),i&&r===2)return this.raise().scale(i);let a=this.clockwise,o=this.points;if(this._linear)return this.translate(this.normal(0),i?i(0):n,i?i(1):n);let s=i?i(0):n,c=i?i(1):n,l=[this.offset(0,10),this.offset(1,10)],u=[],d=Z.lli4(l[0],l[0].c,l[1],l[1].c);if(!d)throw Error(`cannot scale this curve. Try reducing it first.`);return[0,1].forEach(function(e){let n=u[e*r]=Z.copy(o[e*r]);n.x+=(e?c:s)*l[e].n.x,n.y+=(e?c:s)*l[e].n.y}),i?([0,1].forEach(function(e){if(!(r===2&&e)){var s=o[e+1],c={x:s.x-d.x,y:s.y-d.y},l=i?i((e+1)/r):n;i&&!a&&(l=-l);var f=Md(c.x*c.x+c.y*c.y);c.x/=f,c.y/=f,u[e+1]={x:s.x+l*c.x,y:s.y+l*c.y}}}),new e(u)):([0,1].forEach(e=>{if(r===2&&e)return;let n=u[e*r],i=this.derivative(e),a={x:n.x+i.x,y:n.y+i.y};u[e+1]=Z.lli4(n,a,d,o[e+1])}),new e(u))}outline(n,r,i,a){if(r=r===void 0?n:r,this._linear){let o=this.normal(0),s=this.points[0],c=this.points[this.points.length-1],l,u,d;i===void 0&&(i=n,a=r),l={x:s.x+o.x*n,y:s.y+o.y*n},d={x:c.x+o.x*i,y:c.y+o.y*i},u={x:(l.x+d.x)/2,y:(l.y+d.y)/2};let f=[l,u,d];l={x:s.x-o.x*r,y:s.y-o.y*r},d={x:c.x-o.x*a,y:c.y-o.y*a},u={x:(l.x+d.x)/2,y:(l.y+d.y)/2};let p=[d,u,l],m=Z.makeline(p[2],f[0]),h=Z.makeline(f[2],p[0]);return new Td([m,new e(f),h,new e(p)])}let o=this.reduce(),s=o.length,c=[],l=[],u,d=0,f=this.length(),p=i!==void 0&&a!==void 0;function m(e,n,r,i,a){return function(o){let s=i/r,c=(i+a)/r,l=n-e;return Z.map(o,0,1,e+s*l,e+c*l)}}o.forEach(function(e){let o=e.length();p?(c.push(e.scale(m(n,i,f,d,o))),l.push(e.scale(m(-r,-a,f,d,o)))):(c.push(e.scale(n)),l.push(e.scale(-r))),d+=o}),l=l.map(function(e){return u=e.points,u[3]?e.points=[u[3],u[2],u[1],u[0]]:e.points=[u[2],u[1],u[0]],e}).reverse();let h=c[0].points[0],g=c[s-1].points[c[s-1].points.length-1],_=l[s-1].points[l[s-1].points.length-1],v=l[0].points[0],y=Z.makeline(_,h),b=Z.makeline(g,v);return new Td([y].concat(c,[b],l))}outlineshapes(e,n,r){n||=e;let i=this.outline(e,n).curves,a=[];for(let e=1,n=i.length;e<n/2;e++){let o=Z.makeshape(i[e],i[n-e],r);o.startcap.virtual=e>1,o.endcap.virtual=e<n/2-1,a.push(o)}return a}intersects(n,r){return n?n.p1&&n.p2?this.lineIntersects(n):(n instanceof e&&(n=n.reduce()),this.curveintersects(this.reduce(),n,r)):this.selfintersects(r)}lineIntersects(e){let n=Dd(e.p1.x,e.p2.x),r=Dd(e.p1.y,e.p2.y),i=Od(e.p1.x,e.p2.x),a=Od(e.p1.y,e.p2.y);return Z.roots(this.points,e).filter(e=>{var o=this.get(e);return Z.between(o.x,n,i)&&Z.between(o.y,r,a)})}selfintersects(e){let n=this.reduce(),r=n.length-2,i=[];for(let a=0,o,s,c;a<r;a++)s=n.slice(a,a+1),c=n.slice(a+2),o=this.curveintersects(s,c,e),i.push(...o);return i}curveintersects(e,n,r){let i=[];e.forEach(function(e){n.forEach(function(n){e.overlaps(n)&&i.push({left:e,right:n})})});let a=[];return i.forEach(function(e){let n=Z.pairiteration(e.left,e.right,r);n.length>0&&(a=a.concat(n))}),a}arcs(e){return e||=.5,this._iterate(e,[])}_error(e,n,r,i){let a=(i-r)/4,o=this.get(r+a),s=this.get(i-a),c=Z.dist(e,n),l=Z.dist(e,o),u=Z.dist(e,s);return Ed(l-c)+Ed(u-c)}_iterate(e,n){let r=0,i=1,a;do{a=0,i=1;let o=this.get(r),s,c,l,u,d=!1,f=!1,p,m=i,h=1,g=0;do if(f=d,u=l,m=(r+i)/2,g++,s=this.get(m),c=this.get(i),l=Z.getccenter(o,s,c),l.interval={start:r,end:i},d=this._error(l,o,r,i)<=e,p=f&&!d,p||(h=i),d){if(i>=1){if(l.interval.end=h=1,u=l,i>1){let e={x:l.x+l.r*kd(l.e),y:l.y+l.r*Ad(l.e)};l.e+=Z.angle({x:l.x,y:l.y},e,this.get(1))}break}i+=(i-r)/2}else i=m;while(!p&&a++<100);if(a>=100)break;u||=l,n.push(u),r=h}while(i<1);return n}};function Fd(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function Id(e){if(Array.isArray(e))return e}function Ld(e){if(Array.isArray(e))return Fd(e)}function Rd(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function zd(e,n){var r=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(r!=null){var i,a,o,s,c=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,n!==0)for(;!(l=(i=o.call(r)).done)&&(c.push(i.value),c.length!==n);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return c}}function Bd(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
20
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vd(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
21
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hd(e,n){if(e==null)return{};var r,i,a=Ud(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],n.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function Ud(e,n){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(n.includes(i))continue;r[i]=e[i]}return r}function Wd(e,n){return Id(e)||zd(e,n)||Jd(e,n)||Bd()}function Gd(e){return Ld(e)||Rd(e)||Jd(e)||Vd()}function Kd(e,n){if(typeof e!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n);if(typeof i!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}function qd(e){var n=Kd(e,`string`);return typeof n==`symbol`?n:n+``}function Jd(e,n){if(e){if(typeof e==`string`)return Fd(e,n);var r={}.toString.call(e).slice(8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?Array.from(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Fd(e,n):void 0}}var Yd=(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=(n instanceof Array?n.length?n:[void 0]:[n]).map(function(e){return{keyAccessor:e,isProp:!(e instanceof Function)}}),o=e.reduce(function(e,n){var i=e,o=n;return a.forEach(function(e,n){var s=e.keyAccessor,c=e.isProp,l;if(c){var u=o,d=u[s],f=Hd(u,[s].map(qd));l=d,o=f}else l=s(o,n);n+1<a.length?(i.hasOwnProperty(l)||(i[l]={}),i=i[l]):r?(i.hasOwnProperty(l)||(i[l]=[]),i[l].push(o)):i[l]=o}),e},{});r instanceof Function&&(function e(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;i===a.length?Object.keys(n).forEach(function(e){return n[e]=r(n[e])}):Object.values(n).forEach(function(n){return e(n,i+1)})})(o);var s=o;return i&&(s=[],(function e(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];r.length===a.length?s.push({keys:r,vals:n}):Object.entries(n).forEach(function(n){var i=Wd(n,2),a=i[0],o=i[1];return e(o,[].concat(Gd(r),[a]))})})(o),n instanceof Array&&n.length===0&&s.length===1&&(s[0].keys=[])),s});function Xd(e,n){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(n).domain(e);break}return this}var Zd=Symbol(`implicit`);function Qd(){var e=new co,n=[],r=[],i=Zd;function a(a){let o=e.get(a);if(o===void 0){if(i!==Zd)return i;e.set(a,o=n.push(a)-1)}return r[o%r.length]}return a.domain=function(r){if(!arguments.length)return n.slice();n=[],e=new co;for(let i of r)e.has(i)||e.set(i,n.push(i)-1);return a},a.range=function(e){return arguments.length?(r=Array.from(e),a):r.slice()},a.unknown=function(e){return arguments.length?(i=e,a):i},a.copy=function(){return Qd(n,r).unknown(i)},Xd.apply(a,arguments),a}function $d(e){for(var n=e.length/6|0,r=Array(n),i=0;i<n;)r[i]=`#`+e.slice(i*6,++i*6);return r}var ef=$d(`a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928`);function tf(e,n){n===void 0&&(n={});var r=n.insertAt;if(!(typeof document>`u`)){var i=document.head||document.getElementsByTagName(`head`)[0],a=document.createElement(`style`);a.type=`text/css`,r===`top`&&i.firstChild?i.insertBefore(a,i.firstChild):i.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}tf(`.force-graph-container canvas {
|
|
22
|
+
display: block;
|
|
23
|
+
user-select: none;
|
|
24
|
+
outline: none;
|
|
25
|
+
-webkit-tap-highlight-color: transparent;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.force-graph-container .clickable {
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.force-graph-container .grabbable {
|
|
33
|
+
cursor: move;
|
|
34
|
+
cursor: grab;
|
|
35
|
+
cursor: -moz-grab;
|
|
36
|
+
cursor: -webkit-grab;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.force-graph-container .grabbable:active {
|
|
40
|
+
cursor: grabbing;
|
|
41
|
+
cursor: -moz-grabbing;
|
|
42
|
+
cursor: -webkit-grabbing;
|
|
43
|
+
}
|
|
44
|
+
`);function nf(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function rf(e){if(Array.isArray(e))return e}function af(e){if(Array.isArray(e))return nf(e)}function of(e,n,r){if(cf())return Reflect.construct.apply(null,arguments);var i=[null];return i.push.apply(i,n),new(e.bind.apply(e,i))}function sf(e,n,r){return(n=vf(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function cf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cf=function(){return!!e})()}function lf(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function uf(e,n){var r=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(r!=null){var i,a,o,s,c=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,n!==0)for(;!(l=(i=o.call(r)).done)&&(c.push(i.value),c.length!==n);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return c}}function df(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
45
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ff(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
46
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pf(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function mf(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]==null?{}:arguments[n];n%2?pf(Object(r),!0).forEach(function(n){sf(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hf(e,n){return rf(e)||uf(e,n)||bf(e,n)||df()}function gf(e){return af(e)||lf(e)||bf(e)||ff()}function _f(e,n){if(typeof e!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n);if(typeof i!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}function vf(e){var n=_f(e,`string`);return typeof n==`symbol`?n:n+``}function yf(e){"@babel/helpers - typeof";return yf=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},yf(e)}function bf(e,n){if(e){if(typeof e==`string`)return nf(e,n);var r={}.toString.call(e).slice(8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?Array.from(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?nf(e,n):void 0}}var xf=Qd(ef);function Sf(e,n,r){!n||typeof r!=`string`||e.filter(function(e){return!e[r]}).forEach(function(e){e[r]=xf(n(e))})}function Cf(e,n){var r=e.nodes,i=e.links,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=a.nodeFilter,s=o===void 0?function(){return!0}:o,c=a.onLoopError,l=c===void 0?function(e){throw`Invalid DAG structure! Found cycle in node path: ${e.join(` -> `)}.`}:c,u={};r.forEach(function(e){return u[n(e)]={data:e,out:[],depth:-1,skip:!s(e)}}),i.forEach(function(e){var r=e.source,i=e.target,a=l(r),o=l(i);if(!u.hasOwnProperty(a))throw`Missing source node with id: ${a}`;if(!u.hasOwnProperty(o))throw`Missing target node with id: ${o}`;var s=u[a],c=u[o];s.out.push(c);function l(e){return yf(e)===`object`?n(e):e}});var d=[];return f(Object.values(u)),Object.assign.apply(Object,[{}].concat(gf(Object.entries(u).filter(function(e){return!hf(e,2)[1].skip}).map(function(e){var n=hf(e,2),r=n[0],i=n[1];return sf({},r,i.depth)}))));function f(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=function(){var a=e[o];if(r.indexOf(a)!==-1){var s=[].concat(gf(r.slice(r.indexOf(a))),[a]).map(function(e){return n(e.data)});return d.some(function(e){return e.length===s.length&&e.every(function(e,n){return e===s[n]})})||(d.push(s),l(s)),1}i>a.depth&&(a.depth=i,f(a.out,[].concat(gf(r),[a]),i+ +!a.skip))},o=0,s=e.length;o<s;o++)if(a())continue}}var wf=2,Q=function(e,n){return n.onNeedsRedraw&&n.onNeedsRedraw()},Tf=function(e,n){if(!n.isShadow){var r=V(n.linkDirectionalParticles);n.graphData.links.forEach(function(e){var n=Math.round(Math.abs(r(e)));n?e.__photons=gf(Array(n)).map(function(){return{}}):delete e.__photons})}},Ef=gs({props:{graphData:{default:{nodes:[],links:[]},onChange:function(e,n){n.engineRunning=!1,Tf(e,n)}},dagMode:{onChange:function(e,n){!e&&(n.graphData.nodes||[]).forEach(function(e){e.fx=e.fy=void 0})}},dagLevelDistance:{},dagNodeFilter:{default:function(e){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4,triggerUpdate:!1,onChange:Q},nodeId:{default:`id`},nodeVal:{default:`val`,triggerUpdate:!1,onChange:Q},nodeColor:{default:`color`,triggerUpdate:!1,onChange:Q},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:Q},nodeCanvasObjectMode:{default:function(){return`replace`},triggerUpdate:!1,onChange:Q},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:Q},linkSource:{default:`source`},linkTarget:{default:`target`},linkVisibility:{default:!0,triggerUpdate:!1,onChange:Q},linkColor:{default:`color`,triggerUpdate:!1,onChange:Q},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:Q},linkWidth:{default:1,triggerUpdate:!1,onChange:Q},linkCurvature:{default:0,triggerUpdate:!1,onChange:Q},linkCanvasObject:{triggerUpdate:!1,onChange:Q},linkCanvasObjectMode:{default:function(){return`replace`},triggerUpdate:!1,onChange:Q},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:Q},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:Q},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:Q},linkDirectionalParticles:{default:0,triggerUpdate:!1,onChange:Tf},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleOffset:{default:0,triggerUpdate:!1},linkDirectionalParticleWidth:{default:4,triggerUpdate:!1},linkDirectionalParticleColor:{triggerUpdate:!1},linkDirectionalParticleCanvasObject:{triggerUpdate:!1},globalScale:{default:1,triggerUpdate:!1},d3AlphaMin:{default:0,triggerUpdate:!1},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(e,n){n.forceLayout.alphaDecay(e)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(e,n){n.forceLayout.alphaTarget(e)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(e,n){n.forceLayout.velocityDecay(e)}},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(e,n,r){return r===void 0?e.forceLayout.force(n):(e.forceLayout.force(n,r),this)},d3ReheatSimulation:function(e){return e.forceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(e){return e.cntTicks=0,e.startTickTime=new Date,e.engineRunning=!0,this},isEngineRunning:function(e){return!!e.engineRunning},tickFrame:function(e){return!e.isShadow&&n(),i(),!e.isShadow&&a(),!e.isShadow&&o(),r(),this;function n(){e.engineRunning&&(++e.cntTicks>e.cooldownTicks||new Date-e.startTickTime>e.cooldownTime||e.d3AlphaMin>0&&e.forceLayout.alpha()<e.d3AlphaMin?(e.engineRunning=!1,e.onEngineStop()):(e.forceLayout.tick(),e.onEngineTick()))}function r(){var n=V(e.nodeVisibility),r=V(e.nodeVal),i=V(e.nodeColor),a=V(e.nodeCanvasObjectMode),o=e.ctx,s=e.isShadow/e.globalScale,c=e.graphData.nodes.filter(n);o.save(),c.forEach(function(n){var c=a(n);if(e.nodeCanvasObject&&(c===`before`||c===`replace`)&&(e.nodeCanvasObject(n,o,e.globalScale),c===`replace`)){o.restore();return}var l=Math.sqrt(Math.max(0,r(n)||1))*e.nodeRelSize+s;o.beginPath(),o.arc(n.x,n.y,l,0,2*Math.PI,!1),o.fillStyle=i(n)||`rgba(31, 120, 180, 0.92)`,o.fill(),e.nodeCanvasObject&&c===`after`&&e.nodeCanvasObject(n,e.ctx,e.globalScale)}),o.restore()}function i(){var n=V(e.linkVisibility),r=V(e.linkColor),i=V(e.linkWidth),a=V(e.linkLineDash),o=V(e.linkCurvature),s=V(e.linkCanvasObjectMode),c=e.ctx,l=e.isShadow*2,u=e.graphData.links.filter(n);u.forEach(_);var d=[],f=[],p=u;if(e.linkCanvasObject){var m=[],h=[];u.forEach(function(e){return({before:d,after:f,replace:m}[s(e)]||h).push(e)}),p=[].concat(gf(d),f,h),d=d.concat(m)}c.save(),d.forEach(function(n){return e.linkCanvasObject(n,c,e.globalScale)}),c.restore();var g=Yd(p,[r,i,a]);c.save(),Object.entries(g).forEach(function(n){var r=hf(n,2),i=r[0],o=r[1],s=!i||i===`undefined`?`rgba(0,0,0,0.15)`:i;Object.entries(o).forEach(function(n){var r=hf(n,2),i=r[0],o=r[1],u=(i||1)/e.globalScale+l;Object.entries(o).forEach(function(e){var n=hf(e,2);n[0];var r=n[1],i=a(r[0]);c.beginPath(),r.forEach(function(e){var n=e.source,r=e.target;if(!(!n||!r||!n.hasOwnProperty(`x`)||!r.hasOwnProperty(`x`))){c.moveTo(n.x,n.y);var i=e.__controlPoints;i?c[i.length===2?`quadraticCurveTo`:`bezierCurveTo`].apply(c,gf(i).concat([r.x,r.y])):c.lineTo(r.x,r.y)}}),c.strokeStyle=s,c.lineWidth=u,c.setLineDash(i||[]),c.stroke()})})}),c.restore(),c.save(),f.forEach(function(n){return e.linkCanvasObject(n,c,e.globalScale)}),c.restore();function _(e){var n=o(e);if(!n){e.__controlPoints=null;return}var r=e.source,i=e.target;if(!(!r||!i||!r.hasOwnProperty(`x`)||!i.hasOwnProperty(`x`))){var a=Math.sqrt((i.x-r.x)**2+(i.y-r.y)**2);if(a>0){var s=Math.atan2(i.y-r.y,i.x-r.x),c=a*n,l={x:(r.x+i.x)/2+c*Math.cos(s-Math.PI/2),y:(r.y+i.y)/2+c*Math.sin(s-Math.PI/2)};e.__controlPoints=[l.x,l.y]}else{var u=n*70;e.__controlPoints=[i.x,i.y-u,i.x+u,i.y]}}}}function a(){var n=1.6,r=.2,i=V(e.linkDirectionalArrowLength),a=V(e.linkDirectionalArrowRelPos),o=V(e.linkVisibility),s=V(e.linkDirectionalArrowColor||e.linkColor),c=V(e.nodeVal),l=e.ctx;l.save(),e.graphData.links.filter(o).forEach(function(o){var u=i(o);if(!(!u||u<0)){var d=o.source,f=o.target;if(!(!d||!f||!d.hasOwnProperty(`x`)||!f.hasOwnProperty(`x`))){var p=Math.sqrt(Math.max(0,c(d)||1))*e.nodeRelSize,m=Math.sqrt(Math.max(0,c(f)||1))*e.nodeRelSize,h=Math.min(1,Math.max(0,a(o))),g=s(o)||`rgba(0,0,0,0.28)`,_=u/n/2,v=o.__controlPoints&&of(Pd,[d.x,d.y].concat(gf(o.__controlPoints),[f.x,f.y])),y=v?function(e){return v.get(e)}:function(e){return{x:d.x+(f.x-d.x)*e||0,y:d.y+(f.y-d.y)*e||0}},b=v?v.length():Math.sqrt((f.x-d.x)**2+(f.y-d.y)**2),x=p+u+(b-p-m-u)*h,S=y(x/b),C=y((x-u)/b),w=y((x-u*(1-r))/b),T=Math.atan2(S.y-C.y,S.x-C.x)-Math.PI/2;l.beginPath(),l.moveTo(S.x,S.y),l.lineTo(C.x+_*Math.cos(T),C.y+_*Math.sin(T)),l.lineTo(w.x,w.y),l.lineTo(C.x-_*Math.cos(T),C.y-_*Math.sin(T)),l.fillStyle=g,l.fill()}}}),l.restore()}function o(){var n=V(e.linkDirectionalParticles),r=V(e.linkDirectionalParticleSpeed),i=V(e.linkDirectionalParticleOffset),a=V(e.linkDirectionalParticleWidth),o=V(e.linkVisibility),s=V(e.linkDirectionalParticleColor||e.linkColor),c=e.ctx;c.save(),e.graphData.links.filter(o).forEach(function(o){var l=n(o);if(!(!o.hasOwnProperty(`__photons`)||!o.__photons.length)){var u=o.source,d=o.target;if(!(!u||!d||!u.hasOwnProperty(`x`)||!d.hasOwnProperty(`x`))){var f=r(o),p=Math.abs(i(o)),m=o.__photons||[],h=Math.max(0,a(o)/2)/Math.sqrt(e.globalScale);c.fillStyle=s(o)||`rgba(0,0,0,0.28)`;var g=o.__controlPoints?of(Pd,[u.x,u.y].concat(gf(o.__controlPoints),[d.x,d.y])):null,_=0,v=!1;m.forEach(function(n){var r=!!n.__singleHop;if(n.hasOwnProperty(`__progressRatio`)||(n.__progressRatio=r?0:(_+p)/l),!r&&_++,n.__progressRatio+=f,n.__progressRatio>=1)if(!r)n.__progressRatio%=1;else{v=!0;return}var i=n.__progressRatio,a=g?g.get(i):{x:u.x+(d.x-u.x)*i||0,y:u.y+(d.y-u.y)*i||0};e.linkDirectionalParticleCanvasObject?e.linkDirectionalParticleCanvasObject(a.x,a.y,o,c,e.globalScale):(c.beginPath(),c.arc(a.x,a.y,h,0,2*Math.PI,!1),c.fill())}),v&&(o.__photons=o.__photons.filter(function(e){return!e.__singleHop||e.__progressRatio<=1}))}}}),c.restore()}},emitParticle:function(e,n){return n&&(!n.__photons&&(n.__photons=[]),n.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:sd().force(`link`,Yu()).force(`charge`,cd()).force(`center`,Fl()).force(`dagRadial`,null).stop(),engineRunning:!1}},init:function(e,n){n.ctx=e},update:function(e,n){e.engineRunning=!1,e.onUpdate(),e.nodeAutoColorBy!==null&&Sf(e.graphData.nodes,V(e.nodeAutoColorBy),e.nodeColor),e.linkAutoColorBy!==null&&Sf(e.graphData.links,V(e.linkAutoColorBy),e.linkColor),e.graphData.links.forEach(function(n){n.source=n[e.linkSource],n.target=n[e.linkTarget]}),e.forceLayout.stop().alpha(1).nodes(e.graphData.nodes);var r=e.forceLayout.force(`link`);r&&r.id(function(n){return n[e.nodeId]}).links(e.graphData.links);var i=e.dagMode&&Cf(e.graphData,function(n){return n[e.nodeId]},{nodeFilter:e.dagNodeFilter,onLoopError:e.onDagError||void 0}),a=Math.max.apply(Math,gf(Object.values(i||[]))),o=e.dagLevelDistance||e.graphData.nodes.length/(a||1)*wf*([`radialin`,`radialout`].indexOf(e.dagMode)===-1?1:.7);if([`lr`,`rl`,`td`,`bu`].includes(n.dagMode)){var s=[`lr`,`rl`].includes(n.dagMode)?`fx`:`fy`;e.graphData.nodes.filter(e.dagNodeFilter).forEach(function(e){return delete e[s]})}if([`lr`,`rl`,`td`,`bu`].includes(e.dagMode)){var c=[`rl`,`bu`].includes(e.dagMode),l=function(n){return(i[n[e.nodeId]]-a/2)*o*(c?-1:1)},u=[`lr`,`rl`].includes(e.dagMode)?`fx`:`fy`;e.graphData.nodes.filter(e.dagNodeFilter).forEach(function(e){return e[u]=l(e)})}e.forceLayout.force(`dagRadial`,[`radialin`,`radialout`].indexOf(e.dagMode)===-1?null:ld(function(n){var r=i[n[e.nodeId]]||-1;return(e.dagMode===`radialin`?a-r:r)*o}).strength(function(n){return+!!e.dagNodeFilter(n)}));for(var d=0;d<e.warmupTicks&&!(e.d3AlphaMin>0&&e.forceLayout.alpha()<e.d3AlphaMin);d++)e.forceLayout.tick();this.resetCountdown(),e.onFinishUpdate()}});function Df(e,n){var r=e instanceof Array?e:[e],i=new n;return i._destructor&&i._destructor(),{linkProp:function(e){return{default:i[e](),onChange:function(n,i){r.forEach(function(r){return i[r][e](n)})},triggerUpdate:!1}},linkMethod:function(e){return function(n){var i=[...arguments].slice(1),a=[];return r.forEach(function(r){var o=n[r],s=o[e].apply(o,i);s!==o&&a.push(s)}),a.length?a[0]:this}}}}var Of=800,kf=4,Af=5,jf=Df(`forceGraph`,Ef),Mf=Df([`forceGraph`,`shadowGraph`],Ef),Nf=Object.assign.apply(Object,gf(`nodeColor.nodeAutoColorBy.nodeCanvasObject.nodeCanvasObjectMode.linkColor.linkAutoColorBy.linkLineDash.linkWidth.linkCanvasObject.linkCanvasObjectMode.linkDirectionalArrowLength.linkDirectionalArrowColor.linkDirectionalArrowRelPos.linkDirectionalParticles.linkDirectionalParticleSpeed.linkDirectionalParticleOffset.linkDirectionalParticleWidth.linkDirectionalParticleColor.linkDirectionalParticleCanvasObject.dagMode.dagLevelDistance.dagNodeFilter.onDagError.d3AlphaMin.d3AlphaDecay.d3VelocityDecay.warmupTicks.cooldownTicks.cooldownTime.onEngineTick.onEngineStop`.split(`.`).map(function(e){return sf({},e,jf.linkProp(e))})).concat(gf([`nodeRelSize`,`nodeId`,`nodeVal`,`nodeVisibility`,`linkSource`,`linkTarget`,`linkVisibility`,`linkCurvature`].map(function(e){return sf({},e,Mf.linkProp(e))})))),Pf=Object.assign.apply(Object,gf([`d3Force`,`d3ReheatSimulation`,`emitParticle`].map(function(e){return sf({},e,jf.linkMethod(e))})));function Ff(e){if(e.canvas){var n=e.canvas.width,r=e.canvas.height;n===300&&r===150&&(n=r=0);var i=window.devicePixelRatio;n/=i,r/=i,[e.canvas,e.shadowCanvas].forEach(function(a){a.style.width=`${e.width}px`,a.style.height=`${e.height}px`,a.width=e.width*i,a.height=e.height*i,!n&&!r&&a.getContext(`2d`).scale(i,i)});var a=Qa(e.canvas).k;e.zoom.translateBy(e.zoom.__baseElem,(e.width-n)/2/a,(e.height-r)/2/a),e.needsRedraw=!0}}function If(e){var n=window.devicePixelRatio;e.setTransform(n,0,0,n,0,0)}function Lf(e,n,r){e.save(),If(e),e.clearRect(0,0,n,r),e.restore()}var Rf=gs({props:mf({width:{default:window.innerWidth,onChange:function(e,n){return Ff(n)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(e,n){return Ff(n)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(e,n){[e.nodes,e.links].every(function(e){return(e||[]).every(function(e){return!e.hasOwnProperty(`__indexColor`)})})&&n.colorTracker.reset(),[{type:`Node`,objs:e.nodes},{type:`Link`,objs:e.links}].forEach(r),n.forceGraph.graphData(e),n.shadowGraph.graphData(e);function r(e){var r=e.type;e.objs.filter(function(e){if(!e.hasOwnProperty(`__indexColor`))return!0;var r=n.colorTracker.lookup(e.__indexColor);return!r||!r.hasOwnProperty(`d`)||r.d!==e}).forEach(function(e){e.__indexColor=n.colorTracker.register({type:r,d:e})})}},triggerUpdate:!1},backgroundColor:{onChange:function(e,n){n.canvas&&e&&(n.canvas.style.background=e)},triggerUpdate:!1},nodeLabel:{default:`name`,triggerUpdate:!1},nodePointerAreaPaint:{onChange:function(e,n){n.shadowGraph.nodeCanvasObject(e?function(n,r,i){return e(n,n.__indexColor,r,i)}:null),n.flushShadowCanvas&&n.flushShadowCanvas()},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(e,n){n.shadowGraph.linkCanvasObject(e?function(n,r,i){return e(n,n.__indexColor,r,i)}:null),n.flushShadowCanvas&&n.flushShadowCanvas()},triggerUpdate:!1},linkLabel:{default:`name`,triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},minZoom:{default:.01,onChange:function(e,n){n.zoom.scaleExtent([e,n.zoom.scaleExtent()[1]])},triggerUpdate:!1},maxZoom:{default:1e3,onChange:function(e,n){n.zoom.scaleExtent([n.zoom.scaleExtent()[0],e])},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(e,n){n.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},showPointerCursor:{default:!0,triggerUpdate:!1},onZoom:{triggerUpdate:!1},onZoomEnd:{triggerUpdate:!1},onRenderFramePre:{triggerUpdate:!1},onRenderFramePost:{triggerUpdate:!1}},Nf),aliases:{stopAnimation:`pauseAnimation`},methods:mf({graph2ScreenCoords:function(e,n,r){var i=Qa(e.canvas);return{x:n*i.k+i.x,y:r*i.k+i.y}},screen2GraphCoords:function(e,n,r){var i=Qa(e.canvas);return{x:(n-i.x)/i.k,y:(r-i.y)/i.k}},centerAt:function(e,n,r,i){if(!e.canvas)return null;if(n!==void 0||r!==void 0){var a=Object.assign({},n===void 0?{}:{x:n},r===void 0?{}:{y:r});return i?e.tweenGroup.add(new as(o()).to(a,i).easing($o.Quadratic.Out).onUpdate(s).onComplete(function(){e.tweenGroup.remove(this)}).start()):s(a),this}return o();function o(){var n=Qa(e.canvas);return{x:(e.width/2-n.x)/n.k,y:(e.height/2-n.y)/n.k}}function s(n){var r=n.x,i=n.y;e.zoom.translateTo(e.zoom.__baseElem,r===void 0?o().x:r,i===void 0?o().y:i),e.needsRedraw=!0}},zoom:function(e,n,r){if(!e.canvas)return null;if(n!==void 0)return r?e.tweenGroup.add(new as({k:i()}).to({k:n},r).easing($o.Quadratic.Out).onUpdate(function(e){var n=e.k;return a(n)}).onComplete(function(){e.tweenGroup.remove(this)}).start()):a(n),this;return i();function i(){return Qa(e.canvas).k}function a(n){e.zoom.scaleTo(e.zoom.__baseElem,n),e.needsRedraw=!0}},zoomToFit:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,i=[...arguments].slice(3),a=this.getGraphBbox.apply(this,i);if(a){var o={x:(a.x[0]+a.x[1])/2,y:(a.y[0]+a.y[1])/2},s=Math.max(1e-12,Math.min(0xe8d4a51000,(e.width-r*2)/(a.x[1]-a.x[0]),(e.height-r*2)/(a.y[1]-a.y[0])));this.centerAt(o.x,o.y,n),this.zoom(s,n)}return this},getGraphBbox:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0},r=V(e.nodeVal),i=function(n){return Math.sqrt(Math.max(0,r(n)||1))*e.nodeRelSize},a=e.graphData.nodes.filter(n).map(function(e){return{x:e.x,y:e.y,r:i(e)}});return a.length?{x:[ho(a,function(e){return e.x-e.r}),mo(a,function(e){return e.x+e.r})],y:[ho(a,function(e){return e.y-e.r}),mo(a,function(e){return e.y+e.r})]}:null},pauseAnimation:function(e){return e.animationFrameRequestId&&=(cancelAnimationFrame(e.animationFrameRequestId),null),this},resumeAnimation:function(e){return e.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},Pf),stateInit:function(){return{lastSetZoom:1,zoom:so(),forceGraph:new Ef,shadowGraph:new Ef().cooldownTicks(0).nodeColor(`__indexColor`).linkColor(`__indexColor`).isShadow(!0),colorTracker:new Tc,tweenGroup:new ts}},init:function(e,n){var r=this;e.innerHTML=``;var i=document.createElement(`div`);i.classList.add(`force-graph-container`),i.style.position=`relative`,e.appendChild(i),n.canvas=document.createElement(`canvas`),n.backgroundColor&&(n.canvas.style.background=n.backgroundColor),i.appendChild(n.canvas),n.shadowCanvas=document.createElement(`canvas`);var a=n.canvas.getContext(`2d`),o=n.shadowCanvas.getContext(`2d`,{willReadFrequently:!0}),s={x:-0xe8d4a51000,y:-0xe8d4a51000},c=function(){var e=null,r=window.devicePixelRatio,i=s.x>0&&s.y>0?o.getImageData(s.x*r,s.y*r,1,1):null;return i&&(e=n.colorTracker.lookup(i.data)),e};z(n.canvas).call(Zn().subject(function(){if(!n.enableNodeDrag)return null;var e=c();return e&&e.type===`Node`?e.d:null}).on(`start`,function(e){var r=e.subject;r.__initialDragPos={x:r.x,y:r.y,fx:r.fx,fy:r.fy},e.active||(r.fx=r.x,r.fy=r.y),n.canvas.classList.add(`grabbable`)}).on(`drag`,function(e){var r=e.subject,i=r.__initialDragPos,a=e,o=Qa(n.canvas).k,s={x:i.x+(a.x-i.x)/o-r.x,y:i.y+(a.y-i.y)/o-r.y};[`x`,`y`].forEach(function(e){return r[`f${e}`]=r[e]=i[e]+(a[e]-i[e])/o}),!(!r.__dragged&&Af>=Math.sqrt(go([`x`,`y`].map(function(n){return(e[n]-i[n])**2}))))&&(n.forceGraph.d3AlphaTarget(.3).resetCountdown(),n.isPointerDragging=!0,r.__dragged=!0,n.onNodeDrag(r,s))}).on(`end`,function(e){var r=e.subject,i=r.__initialDragPos,a={x:r.x-i.x,y:r.y-i.y};i.fx===void 0&&(r.fx=void 0),i.fy===void 0&&(r.fy=void 0),delete r.__initialDragPos,n.forceGraph.d3AlphaTarget()&&n.forceGraph.d3AlphaTarget(0).resetCountdown(),n.canvas.classList.remove(`grabbable`),n.isPointerDragging=!1,r.__dragged&&(delete r.__dragged,n.onNodeDragEnd(r,a))})),n.zoom(n.zoom.__baseElem=z(n.canvas)),n.zoom.__baseElem.on(`dblclick.zoom`,null),n.zoom.filter(function(e){return!e.button&&n.enableZoomPanInteraction&&(e.type!==`wheel`||V(n.enableZoomInteraction)(e))&&(e.type===`wheel`||V(n.enablePanInteraction)(e))}).on(`zoom`,function(e){var i=e.transform;[a,o].forEach(function(e){If(e),e.translate(i.x,i.y),e.scale(i.k,i.k)}),n.isPointerDragging=!0,n.onZoom&&n.onZoom(mf(mf({},i),r.centerAt())),n.needsRedraw=!0}).on(`end`,function(e){n.isPointerDragging=!1,n.onZoomEnd&&n.onZoomEnd(mf(mf({},e.transform),r.centerAt()))}),Ff(n),n.forceGraph.onNeedsRedraw(function(){return n.needsRedraw=!0}).onFinishUpdate(function(){Qa(n.canvas).k===n.lastSetZoom&&n.graphData.nodes.length&&(n.zoom.scaleTo(n.zoom.__baseElem,n.lastSetZoom=kf/Math.cbrt(n.graphData.nodes.length)),n.needsRedraw=!0)}),n.tooltip=new Pl(i),[`pointermove`,`pointerdown`].forEach(function(e){return i.addEventListener(e,function(r){e===`pointerdown`&&(n.isPointerPressed=!0,n.pointerDownEvent=r),!n.isPointerDragging&&r.type===`pointermove`&&n.onBackgroundClick&&(r.pressure>0||n.isPointerPressed)&&(r.pointerType===`mouse`||r.movementX===void 0||[r.movementX,r.movementY].some(function(e){return Math.abs(e)>1}))&&(n.isPointerDragging=!0);var a=o(i);s.x=r.pageX-a.left,s.y=r.pageY-a.top;function o(e){var n=e.getBoundingClientRect(),r=window.pageXOffset||document.documentElement.scrollLeft,i=window.pageYOffset||document.documentElement.scrollTop;return{top:n.top+i,left:n.left+r}}},{passive:!0})}),i.addEventListener(`pointerup`,function(e){if(n.isPointerPressed){if(n.isPointerPressed=!1,n.isPointerDragging){n.isPointerDragging=!1;return}var r=[e,n.pointerDownEvent];requestAnimationFrame(function(){if(e.button===0)if(n.hoverObj){var i=n[`on${n.hoverObj.type}Click`];i&&i.apply(void 0,[n.hoverObj.d].concat(r))}else n.onBackgroundClick&&n.onBackgroundClick.apply(n,r);if(e.button===2)if(n.hoverObj){var a=n[`on${n.hoverObj.type}RightClick`];a&&a.apply(void 0,[n.hoverObj.d].concat(r))}else n.onBackgroundRightClick&&n.onBackgroundRightClick.apply(n,r)})}},{passive:!0}),i.addEventListener(`contextmenu`,function(e){return!n.onBackgroundRightClick&&!n.onNodeRightClick&&!n.onLinkRightClick?!0:(e.preventDefault(),!1)}),n.forceGraph(a),n.shadowGraph(o);var l=Qo(function(){Lf(o,n.width,n.height),n.shadowGraph.linkWidth(function(e){return V(n.linkWidth)(e)+n.linkHoverPrecision});var e=Qa(n.canvas);n.shadowGraph.globalScale(e.k).tickFrame()},Of);n.flushShadowCanvas=l.flush,(this._animationCycle=function e(){var r=!n.autoPauseRedraw||!!n.needsRedraw||n.forceGraph.isEngineRunning()||n.graphData.links.some(function(e){return e.__photons&&e.__photons.length});if(n.needsRedraw=!1,n.enablePointerInteraction){var i=n.isPointerDragging?null:c();if(i!==n.hoverObj){var o=n.hoverObj,s=o?o.type:null,u=i?i.type:null;if(s&&s!==u){var d=n[`on${s}Hover`];d&&d(null,o.d)}if(u){var f=n[`on${u}Hover`];f&&f(i.d,s===u?o.d:null)}n.tooltip.content(i&&V(n[`${i.type.toLowerCase()}Label`])(i.d)||null),n.canvas.classList[(i&&n[`on${u}Click`]||!i&&n.onBackgroundClick)&&V(n.showPointerCursor)(i?.d)?`add`:`remove`](`clickable`),n.hoverObj=i}r&&l()}if(r){Lf(a,n.width,n.height);var p=Qa(n.canvas).k;n.onRenderFramePre&&n.onRenderFramePre(a,p),n.forceGraph.globalScale(p).tickFrame(),n.onRenderFramePost&&n.onRenderFramePost(a,p)}n.tweenGroup.update(),n.animationFrameRequestId=requestAnimationFrame(e)})()},update:function(e){}}),zf=n(((e,n)=>{n.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),Bf=n(((e,n)=>{var r=zf();function i(){}function a(){}a.resetWarningCache=i,n.exports=function(){function e(e,n,i,a,o,s){if(s!==r){var c=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name=`Invariant Violation`,c}}e.isRequired=e;function n(){return e}var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:a,resetWarningCache:i};return o.PropTypes=o,o}})),$=e(n(((e,n)=>{n.exports=Bf()()}))(),1),Vf={width:$.default.number,height:$.default.number,graphData:$.default.shape({nodes:$.default.arrayOf($.default.object).isRequired,links:$.default.arrayOf($.default.object).isRequired}),backgroundColor:$.default.string,nodeRelSize:$.default.number,nodeId:$.default.string,nodeLabel:$.default.oneOfType([$.default.string,$.default.func]),nodeVal:$.default.oneOfType([$.default.number,$.default.string,$.default.func]),nodeVisibility:$.default.oneOfType([$.default.bool,$.default.string,$.default.func]),nodeColor:$.default.oneOfType([$.default.string,$.default.func]),nodeAutoColorBy:$.default.oneOfType([$.default.string,$.default.func]),onNodeHover:$.default.func,onNodeClick:$.default.func,linkSource:$.default.string,linkTarget:$.default.string,linkLabel:$.default.oneOfType([$.default.string,$.default.func]),linkVisibility:$.default.oneOfType([$.default.bool,$.default.string,$.default.func]),linkColor:$.default.oneOfType([$.default.string,$.default.func]),linkAutoColorBy:$.default.oneOfType([$.default.string,$.default.func]),linkWidth:$.default.oneOfType([$.default.number,$.default.string,$.default.func]),linkCurvature:$.default.oneOfType([$.default.number,$.default.string,$.default.func]),linkDirectionalArrowLength:$.default.oneOfType([$.default.number,$.default.string,$.default.func]),linkDirectionalArrowColor:$.default.oneOfType([$.default.string,$.default.func]),linkDirectionalArrowRelPos:$.default.oneOfType([$.default.number,$.default.string,$.default.func]),linkDirectionalParticles:$.default.oneOfType([$.default.number,$.default.string,$.default.func]),linkDirectionalParticleSpeed:$.default.oneOfType([$.default.number,$.default.string,$.default.func]),linkDirectionalParticleOffset:$.default.oneOfType([$.default.number,$.default.string,$.default.func]),linkDirectionalParticleWidth:$.default.oneOfType([$.default.number,$.default.string,$.default.func]),linkDirectionalParticleColor:$.default.oneOfType([$.default.string,$.default.func]),onLinkHover:$.default.func,onLinkClick:$.default.func,dagMode:$.default.oneOf([`td`,`bu`,`lr`,`rl`,`zin`,`zout`,`radialin`,`radialout`]),dagLevelDistance:$.default.number,dagNodeFilter:$.default.func,onDagError:$.default.func,d3AlphaMin:$.default.number,d3AlphaDecay:$.default.number,d3VelocityDecay:$.default.number,warmupTicks:$.default.number,cooldownTicks:$.default.number,cooldownTime:$.default.number,onEngineTick:$.default.func,onEngineStop:$.default.func,getGraphBbox:$.default.func},Hf={zoomToFit:$.default.func,onNodeRightClick:$.default.func,onNodeDrag:$.default.func,onNodeDragEnd:$.default.func,onLinkRightClick:$.default.func,linkHoverPrecision:$.default.number,onBackgroundClick:$.default.func,onBackgroundRightClick:$.default.func,showPointerCursor:$.default.oneOfType([$.default.bool,$.default.func]),enablePointerInteraction:$.default.bool,enableNodeDrag:$.default.bool},Uf={showNavInfo:$.default.bool,nodeOpacity:$.default.number,nodeResolution:$.default.number,nodeThreeObject:$.default.oneOfType([$.default.object,$.default.string,$.default.func]),nodeThreeObjectExtend:$.default.oneOfType([$.default.bool,$.default.string,$.default.func]),nodePositionUpdate:$.default.func,linkOpacity:$.default.number,linkResolution:$.default.number,linkCurveRotation:$.default.oneOfType([$.default.number,$.default.string,$.default.func]),linkMaterial:$.default.oneOfType([$.default.object,$.default.string,$.default.func]),linkThreeObject:$.default.oneOfType([$.default.object,$.default.string,$.default.func]),linkThreeObjectExtend:$.default.oneOfType([$.default.bool,$.default.string,$.default.func]),linkPositionUpdate:$.default.func,linkDirectionalArrowResolution:$.default.number,linkDirectionalParticleResolution:$.default.number,linkDirectionalParticleThreeObject:$.default.oneOfType([$.default.object,$.default.string,$.default.func]),forceEngine:$.default.oneOf([`d3`,`ngraph`]),ngraphPhysics:$.default.object,numDimensions:$.default.oneOf([1,2,3])},Wf=Object.assign({},Vf,Hf,{linkLineDash:$.default.oneOfType([$.default.arrayOf($.default.number),$.default.string,$.default.func]),nodeCanvasObjectMode:$.default.oneOfType([$.default.string,$.default.func]),nodeCanvasObject:$.default.func,nodePointerAreaPaint:$.default.func,linkCanvasObjectMode:$.default.oneOfType([$.default.string,$.default.func]),linkCanvasObject:$.default.func,linkPointerAreaPaint:$.default.func,linkDirectionalParticleCanvasObject:$.default.func,autoPauseRedraw:$.default.bool,minZoom:$.default.number,maxZoom:$.default.number,enableZoomInteraction:$.default.oneOfType([$.default.bool,$.default.func]),enablePanInteraction:$.default.oneOfType([$.default.bool,$.default.func]),onZoom:$.default.func,onZoomEnd:$.default.func,onRenderFramePre:$.default.func,onRenderFramePost:$.default.func});Object.assign({},Vf,Hf,Uf,{enableNavigationControls:$.default.bool,controlType:$.default.oneOf([`trackball`,`orbit`,`fly`]),rendererConfig:$.default.object,extraRenderers:$.default.arrayOf($.default.shape({render:$.default.func.isRequired}))}),Object.assign({},Vf,Uf,{nodeDesc:$.default.oneOfType([$.default.string,$.default.func]),linkDesc:$.default.oneOfType([$.default.string,$.default.func])}),Object.assign({},Vf,Uf,{markerAttrs:$.default.object,yOffset:$.default.number,glScale:$.default.number});var Gf=Ie(Rf,{methodNames:[`emitParticle`,`d3Force`,`d3ReheatSimulation`,`stopAnimation`,`pauseAnimation`,`resumeAnimation`,`centerAt`,`zoom`,`zoomToFit`,`getGraphBbox`,`screen2GraphCoords`,`graph2ScreenCoords`]});Gf.displayName=`ForceGraph2D`,Gf.propTypes=Wf;var Kf=/(?:\s+[—–|]\s+|:\s+)/;function qf(e){let n=new Map;for(let r of e){let e=np(r.label||r.id),i=Qf(e),a=ep(r.kind===`doc`?r.docName??r.id:r.url??r.id),o=$f(i),s=o?ep(i):i,c=o?[]:Zf(i),l=c.length>1?c[0]??null:null,u=c.length>1?c.at(-1)??null:null;n.set(r.id,{fullLabel:e,leadLabel:l&&l!==s&&l!==u?l:null,pathLabel:a,primaryLabel:s,topicLabel:u&&u!==s?u:null})}return n}function Jf(e,n,r){if(!e)return``;let i=e=>r(e)<=n;for(let n of rp([e.primaryLabel,e.topicLabel]))if(i(n))return n;for(let i of rp([e.topicLabel,e.primaryLabel])){let e=Yf(i,n,r);if(e)return e}if(e.leadLabel&&i(e.leadLabel))return e.leadLabel;if(e.leadLabel){let i=Yf(e.leadLabel,n,r);if(i)return i}return i(e.pathLabel)?e.pathLabel:Yf(e.pathLabel,n,r)||e.pathLabel}function Yf(e,n,r){if(!e)return``;if(r(e)<=n)return e;let i=e.split(/\s+/).filter(Boolean),a=rp([i.length>=3?`${i.slice(0,2).join(` `)} ... ${i.at(-1)??``}`:void 0,i.length>=2?`${i[0]} ... ${i.at(-1)??``}`:void 0]);for(let e of a)if(r(e)<=n)return e;return Xf(e,n,r)}function Xf(e,n,r){if(r(`...`)>n)return``;let i=1,a=Math.max(1,Math.floor((e.length-3)/2)),o=``;for(;i<=a;){let s=Math.floor((i+a)/2),c=`${e.slice(0,s)}...${e.slice(-s)}`;r(c)<=n?(o=c,i=s+1):a=s-1}if(o)return o;let s=`${e[0]??``}...`;return r(s)<=n?s:`...`}function Zf(e){return np(e).split(Kf).map(e=>np(e)).filter(Boolean)}function Qf(e){let n=np(e);for(;;){let e=n.replace(/\s*\([^()]*\)\s*$/,``).trim();if(!e||e===n)return n;n=e}}function $f(e){let n=(e.match(/\//g)??[]).length,r=(e.match(/\s/g)??[]).length;return n>0&&(r===0||n*3>r)}function ep(e){let n=e.split(`/`).map(e=>e.trim()).filter(Boolean);return n.length===0?e:n.length===1?tp(n[0]):n.slice(-2).map(tp).join(` / `)}function tp(e){if(e.length<=24)return e;let n=e.split(`-`).filter(Boolean);if(n.length>=4){let e=[...n];for(;e.length>2&&/^\d+$/.test(e[0]);)e.shift();if(e.length>=2)return e.slice(-3).join(`-`)}return e.length<=24?e:`${e.slice(0,10)}...${e.slice(-10)}`}function np(e){return e.replace(/\s+/g,` `).trim()}function rp(e){let n=new Set;for(let r of e)r&&n.add(r);return[...n]}var ip=8,ap=10,op=4,sp=6,cp=4,lp=ap+cp*2,up=2,dp=.001;function fp(e){let{nodes:n,links:r,activeDocName:i,viewport:a,maxLabels:o,maxLabelWidthPx:s,labelDescriptors:c,measureTextWidthPx:l,projectToScreen:u,getNodeRadiusPx:d}=e;if(o<=0||a.width<=0||a.height<=0||n.length===0)return[];let f=pp(r),p=a.width/2,m=a.height/2,h=n.flatMap(e=>{if(typeof e.x!=`number`||typeof e.y!=`number`)return[];let n=u(e.x,e.y);return[{node:e,screenX:n.x,screenY:n.y,radiusPx:d(e)}]}),g=h.map(e=>{let n=Jf(c.get(e.node.id),s,l);if(!n)return null;let r=l(n);return r<=0?null:{...e,text:n,textWidthPx:r,isActive:e.node.id===i,degree:f.get(e.node.id)??0,distanceToCenterPx:Math.hypot(e.screenX-p,e.screenY-m)}}).filter(e=>e!==null);g.sort(hp);let _=[],v=[];for(let e=0;e<g.length&&!(_.length>=o);e+=1){let n=g[e],r=gp(n,{priority:g.length-e,viewport:a,acceptedRects:v,positionedNodes:h});r&&(_.push(r),v.push(r.rect))}return _}function pp(e){let n=new Map;for(let r of e){let e=mp(r.source),i=mp(r.target);e&&n.set(e,(n.get(e)??0)+1),i&&n.set(i,(n.get(i)??0)+1)}return n}function mp(e){return typeof e==`string`?e:typeof e?.id==`string`?e.id:typeof e?.id==`number`?String(e.id):null}function hp(e,n){return e.isActive===n.isActive?Math.abs(e.distanceToCenterPx-n.distanceToCenterPx)>dp?e.distanceToCenterPx-n.distanceToCenterPx:e.degree===n.degree?e.text.length===n.text.length?e.node.id.localeCompare(n.node.id):e.text.length-n.text.length:n.degree-e.degree:e.isActive?-1:1}function gp(e,{priority:n,viewport:r,acceptedRects:i,positionedNodes:a}){for(let o of[`bottom`,`top`,`right`,`left`]){let s=_p(e,o,n);if(vp(s.rect,r)&&!i.some(e=>yp(e,s.rect))&&!a.some(n=>n.node.id!==e.node.id&&bp(s.rect,{x:n.screenX,y:n.screenY,radius:n.radiusPx+up})))return s}return null}function _p(e,n,r){let i=e.textWidthPx+sp*2,a=i/2,o=lp/2,s=e.screenX-a,c=e.screenY+e.radiusPx+op;return n===`top`?c=e.screenY-e.radiusPx-op-lp:n===`right`?(s=e.screenX+e.radiusPx+op,c=e.screenY-o):n===`left`&&(s=e.screenX-e.radiusPx-op-i,c=e.screenY-o),{nodeId:e.node.id,text:e.text,anchor:n,priority:r,isActive:e.isActive,rect:{left:s,top:c,right:s+i,bottom:c+lp},textX:s+a,textY:c+cp}}function vp(e,n){return e.left>=ip&&e.top>=ip&&e.right<=n.width-ip&&e.bottom<=n.height-ip}function yp(e,n){return!(e.right<=n.left||e.left>=n.right||e.bottom<=n.top||e.top>=n.bottom)}function bp(e,n){let r=xp(n.x,e.left,e.right),i=xp(n.y,e.top,e.bottom);return Math.hypot(n.x-r,n.y-i)<n.radius}function xp(e,n,r){return Math.min(r,Math.max(n,e))}var Sp=5,Cp=7,wp=8,Tp=[`x`,`y`,`z`,`vx`,`vy`,`vz`,`fx`,`fy`,`fz`,`index`,`__indexColor`];function Ep(e,n){for(let r of Tp){let i=n[r];i!==void 0&&(e[r]=i)}}function Dp(e){return typeof e==`string`?e:typeof e==`object`&&e&&`id`in e?String(e.id):``}function Op(e){return e.map(e=>`${e.id}:${e.label}`).join(`,`)}function kp(e){return e.map(e=>`${Dp(e.source)}>${Dp(e.target)}`).join(`,`)}function Ap(e,n){let r=new Map(e.nodes.map(e=>[e.id,e])),i=n.nodes.map(e=>{let n={...e},i=r.get(e.id);return i&&Ep(n,i),n}),a=new Map(e.links.map(e=>[`${Dp(e.source)}>${Dp(e.target)}`,e]));return{nodes:i,links:n.links.map(e=>{let n={...e},r=a.get(`${Dp(e.source)}>${Dp(e.target)}`);return r?.__indexColor&&(n.__indexColor=r.__indexColor),n})}}function jp(e,n={}){if(e.kind===`external`)return e.url;let r=e.label??e.id,i=n.displayState??`doc`,a=e.cluster||e.category||e.tags&&e.tags.length>0;if(i===`doc`&&!a)return r;let o=[...Mp(i),`<div style="font-weight:600;font-size:14px;color:#f1f5f9;margin-bottom:${a?8:0}px;padding-bottom:${a?6:0}px;border-bottom:${a?`1px solid rgba(148,163,184,0.3)`:`none`}">${Np(r)}</div>`];return e.cluster&&o.push(`<div style="font-size:12.5px;color:#f1f5f9;margin-bottom:2px"><span style="color:#cbd5e1">cluster:</span> ${Np(e.cluster)}</div>`),e.category&&o.push(`<div style="font-size:12.5px;color:#f1f5f9;margin-bottom:2px"><span style="color:#cbd5e1">category:</span> ${Np(e.category)}</div>`),e.tags&&e.tags.length>0&&o.push(`<div style="font-size:12.5px;color:#f1f5f9"><span style="color:#cbd5e1">tags:</span> ${e.tags.map(Np).join(`, `)}</div>`),o.join(``)}function Mp(e){return e===`missing`?[`<div style="font-size:11px;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;color:#fca5a5;margin-bottom:6px">Broken / uncreated link</div>`,`<div style="font-size:12px;color:#fecaca;margin-bottom:8px">This page does not exist yet. Open it to create it.</div>`]:e===`folder`?[`<div style="font-size:11px;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;color:#c4b5fd;margin-bottom:6px">Folder target</div>`,`<div style="font-size:12px;color:#ddd6fe;margin-bottom:8px">This link resolves to a folder view rather than a standalone page.</div>`]:[]}function Np(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`)}function Pp(e,{activeDocName:n,selectedNodeId:r}){let i=r!==null&&e.id===r;if(e.kind===`external`)return i?`external-selected`:`external`;let a=e.docName===n;return a&&i?`active-selected`:a?`active`:i?`selected`:`default`}function Fp(e){return e===`active`||e===`active-selected`?wp:e===`selected`||e===`external-selected`?Cp:Sp}function Ip(e,n){let r=Fp(e);return e===`active`||e===`selected`||e===`active-selected`||e===`external-selected`?r+2/Math.max(n,.01):r}function Lp(e){return x(e.docName,e.anchor)}function Rp(e,n){return e.kind===`external`?n===`select`?{kind:`select`,selection:{kind:`external`,id:e.id,label:e.label,url:e.url}}:{kind:`external`,url:e.url}:n===`select`?{kind:`select`,selection:{kind:`doc`,id:e.id,docName:e.docName,label:e.label,anchor:e.anchor??null}}:{kind:`navigate`,hash:Lp({docName:e.docName,label:e.label,anchor:e.anchor??null})}}var zp=350,Bp=120,Vp=18,Hp=28,Up=5;function Wp({node:e,navigationIntentByNodeId:n}){return e.kind===`doc`?n.get(e.id)?.displayState??`doc`:`doc`}function Gp({state:e,displayState:n,globalScale:r}){let i=Ip(e,r);return n===`missing`?Math.max(i,Fp(e)+2/Math.max(r,.01)):i}function Kp({nodes:e,activeDocName:n}){let r=e.find(e=>e.kind===`doc`&&e.docName===n);return typeof r?.x!=`number`||typeof r?.y!=`number`?null:{x:r.x,y:r.y}}function qp({fg:e,coords:n,dimensions:r}){if(!e||!n||r.width<=0||r.height<=0)return!1;let i=e.graph2ScreenCoords(n.x,n.y);return Math.hypot(i.x-r.width/2,i.y-r.height/2)>=Hp}function Jp({fg:e,nodes:n,activeDocName:r,zoom:i,focusKey:a,focusState:o,force:s=!1,durationMs:c=zp}){let l=Date.now(),u=o;if(u.key!==a)u={key:a,lastX:null,lastY:null,lastAt:0};else if(!s&&l-u.lastAt<Bp)return u;let d=Kp({nodes:n,activeDocName:r});if(!d)return u;let f=u.lastX===null||u.lastY===null?1/0:Math.hypot(d.x-u.lastX,d.y-u.lastY);return!s&&f<Vp&&u.lastAt!==0?{...u,lastAt:l}:e?(e.centerAt(d.x,d.y,c),Math.abs(e.zoom()-i)>.01&&e.zoom(i,c),{key:a,lastX:d.x,lastY:d.y,lastAt:l}):u}function Yp({ctx:e,placements:n,labelColor:r,chipColor:i,chipBorderColor:a}){e.textAlign=`center`,e.textBaseline=`top`;for(let o of n){let n=o.rect.right-o.rect.left,s=o.rect.bottom-o.rect.top;e.fillStyle=i,e.fillRect(o.rect.left,o.rect.top,n,s),e.strokeStyle=a,e.lineWidth=1,e.strokeRect(o.rect.left,o.rect.top,n,s),e.fillStyle=r,e.fillText(o.text,o.textX,o.textY)}}function Xp({node:e,fg:n,activeDocName:r,selectedNodeId:i,globalScale:a,displayState:o}){if(typeof e.x!=`number`||typeof e.y!=`number`)return null;let s=Pp(e,{activeDocName:r,selectedNodeId:i}),c=n.graph2ScreenCoords(e.x,e.y);return{x:c.x,y:c.y,radiusPx:Gp({state:s,displayState:o,globalScale:a})*a,state:s}}function Zp({clientX:e,clientY:n,container:r}){let i=r.getBoundingClientRect();return{x:e-i.left,y:n-i.top}}function Qp({point:e,fg:n,nodes:r,activeDocName:i,selectedNodeId:a,navigationIntentByNodeId:o}){let s=n.zoom(),c=null;for(let l of r){let r=Xp({node:l,fg:n,activeDocName:i,selectedNodeId:a,globalScale:s,displayState:Wp({node:l,navigationIntentByNodeId:o})});if(!r)continue;let u=Math.hypot(e.x-r.x,e.y-r.y);u>r.radiusPx||c!==null&&u>=c.distance||(c={node:l,distance:u})}return c?.node??null}function $p(e,n){return e===void 0||typeof e==`string`||typeof e==`number`||typeof e.x!=`number`||typeof e.y!=`number`?null:n.graph2ScreenCoords(e.x,e.y)}function em({point:e,start:n,end:r}){let i=r.x-n.x,a=r.y-n.y;if(i===0&&a===0)return Math.hypot(e.x-n.x,e.y-n.y);let o=Math.max(0,Math.min(1,((e.x-n.x)*i+(e.y-n.y)*a)/(i*i+a*a))),s=n.x+o*i,c=n.y+o*a;return Math.hypot(e.x-s,e.y-c)}function tm({point:e,fg:n,links:r}){return r.some(r=>{let i=$p(r.source,n),a=$p(r.target,n);return!i||!a?!1:em({point:e,start:i,end:a})<=6})}function nm({node:e,docClickBehavior:n,onSelectNode:r}){let i=Rp(e,n);if(i.kind===`external`){window.open(i.url,`_blank`,`noopener,noreferrer`);return}if(i.kind===`navigate`){window.location.assign(i.hash);return}r?.(i.selection)}function rm({target:e,docClickBehavior:n,selectedNodeId:r,onSelectNode:i,onBackgroundClick:a}){if(e.kind===`background`||e.kind===`link`){a?.();return}if(n===`select`&&r!==null&&e.node.id===r){a?.();return}nm({node:e.node,docClickBehavior:n,onSelectNode:i})}function im(e){let n=(0,se.c)(110),{activeDocName:r,selectedNodeId:i,isExpanded:a,showUrlNodes:o,className:s,docClickBehavior:c,onSelectNode:l,onBackgroundClick:u,onStatsChange:d,onClustersChange:f}=e,p=i===void 0?null:i,m=a===void 0?!1:a,g=o===void 0?!0:o,v=s===void 0?``:s,b=c===void 0?`navigate`:c,S;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(S={nodes:[],links:[]},n[0]=S):S=n[0];let[w,T]=(0,O.useState)(S),E;n[1]===Symbol.for(`react.memo_cache_sentinel`)?(E={nodes:``,links:``},n[1]=E):E=n[1];let ee=(0,O.useRef)(E),[D,ne]=(0,O.useState)(!0),[re,ie]=(0,O.useState)(null),ae=(0,O.useRef)(null),oe=(0,O.useRef)(void 0),ce;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(ce={key:``,lastX:null,lastY:null,lastAt:0},n[2]=ce):ce=n[2];let le=(0,O.useRef)(ce),ue=(0,O.useRef)(null),fe=(0,O.useRef)(w.nodes),pe=(0,O.useRef)(!1),me;n[3]===Symbol.for(`react.memo_cache_sentinel`)?(me={width:320,height:400},n[3]=me):me=n[3];let[he,ge]=(0,O.useState)(me),{resolvedTheme:_e}=h(),{folderPaths:ve,loading:ye,pages:be}=_(),xe,Se;n[4]!==r||n[5]!==m?(xe=()=>{let e=!1,n=async function(){try{let n=new URLSearchParams;!m&&r&&(n.set(`docName`,r),n.set(`degrees`,`2`));let i=n.size>0?`/api/link-graph?${n.toString()}`:`/api/link-graph`,a=await fetch(i);if(!a.ok){if(e)return;ie(`Server error: ${a.status}`),ne(!1);return}let o=await a.json();if(e)return;if(!o.ok){ie(o.error??`Failed to load graph`),ne(!1);return}let s=o.nodes??[],c=o.links??[],l=Op(s),u=kp(c);(l!==ee.current.nodes||u!==ee.current.links)&&(ee.current={nodes:l,links:u},T(e=>Ap(e,{nodes:s,links:c}))),ie(null),ne(!1)}catch(n){let r=n;if(e)return;ie(r instanceof Error?r.message:`Failed to load graph`),ne(!1)}};ne(!0),n();let i=()=>{document.visibilityState===`visible`&&n()};window.addEventListener(`focus`,i),window.addEventListener(`visibilitychange`,i);let a=y(e=>{(e.includes(`files`)||e.includes(`graph`))&&n()});return()=>{e=!0,window.removeEventListener(`focus`,i),window.removeEventListener(`visibilitychange`,i),a()}},Se=[r,m],n[4]=r,n[5]=m,n[6]=xe,n[7]=Se):(xe=n[6],Se=n[7]),(0,O.useEffect)(xe,Se);let Ce,we;n[8]===Symbol.for(`react.memo_cache_sentinel`)?(Ce=()=>{let e=ae.current;if(!e)return;let n=new ResizeObserver(e=>{let[n]=e,{width:r,height:i}=n.contentRect;r>0&&i>0&&ge({width:Math.floor(r),height:Math.floor(i)})});return n.observe(e),()=>n.disconnect()},we=[],n[8]=Ce,n[9]=we):(Ce=n[8],we=n[9]),(0,O.useEffect)(Ce,we);let A=_e===`dark`,j=A?`hsl(0 0% 4%)`:`hsl(0 0% 100%)`,Te=A?`#6b7280`:`#9ca3af`,Ee=A?`#69a3ff`:`#3784ff`,De=A?`#34d399`:`#059669`,Oe=A?`#c084fc`:`#7c3aed`,M=A?`#f59e0b`:`#c2410c`,ke=A?`#a78bfa`:`#7c3aed`,Ae=A?`#f87171`:`#dc2626`,je=A?`rgba(75,85,99,0.6)`:`rgba(209,213,219,0.8)`,Me=A?`#f3f4f6`:`#111827`,Ne=A?`rgba(105,163,255,0.45)`:`rgba(55,132,255,0.3)`,Pe=A?`rgba(167,139,250,0.38)`:`rgba(124,58,237,0.22)`,Fe=A?`rgba(248,113,113,0.58)`:`rgba(220,38,38,0.38)`,Ie=A?`rgba(52,211,153,0.5)`:`rgba(5,150,105,0.3)`,Le=A?`rgba(192,132,252,0.5)`:`rgba(124,58,237,0.35)`,Re=A?`rgba(3,7,18,0.92)`:`rgba(255,255,255,0.94)`,ze=A?`rgba(243,244,246,0.08)`:`rgba(17,24,39,0.08)`,N=m?1.6:2.35,Be=m?220:150,Ve=m?10:18,He;n[10]!==w||n[11]!==g?(He=g?w:(()=>{let e=new Set(w.nodes.filter(lm).map(cm));return{nodes:w.nodes.filter(sm),links:w.links.filter(n=>{let r=Dp(n.source),i=Dp(n.target);return!e.has(r)&&!e.has(i)})}})(),n[10]=w,n[11]=g,n[12]=He):He=n[12];let P=He,Ue=P.nodes,We=P.links,Ge;n[13]===P.nodes?Ge=n[14]:(Ge=qf(P.nodes),n[13]=P.nodes,n[14]=Ge);let Ke=Ge,F=`${r}|${N}`,qe;if(n[15]!==ve||n[16]!==w.nodes||n[17]!==ye||n[18]!==be){let e;n[20]!==ve||n[21]!==ye||n[22]!==be?(e=e=>{if(e.kind!==`doc`)return[];let n=ye?{displayState:`doc`,hashDocName:e.docName}:te(e.docName,{pages:be,folderPaths:ve});return[[e.id,n]]},n[20]=ve,n[21]=ye,n[22]=be,n[23]=e):e=n[23],qe=new Map(w.nodes.flatMap(e)),n[15]=ve,n[16]=w.nodes,n[17]=ye,n[18]=be,n[19]=qe}else qe=n[19];let I=qe,L;n[24]!==P.links||n[25]!==P.nodes||n[26]!==D||n[27]!==d?(L=()=>{d?.(P.nodes.length,P.links.length,D)},n[24]=P.links,n[25]=P.nodes,n[26]=D,n[27]=d,n[28]=L):L=n[28];let Je;n[29]!==P||n[30]!==D||n[31]!==d?(Je=[P,D,d],n[29]=P,n[30]=D,n[31]=d,n[32]=Je):Je=n[32],(0,O.useEffect)(L,Je);let Ye;n[33]!==w.nodes||n[34]!==f?(Ye=()=>{if(!f)return;let e=new Set;for(let n of w.nodes)n.kind===`doc`&&n.cluster&&e.add(n.cluster);f(Array.from(e).sort())},n[33]=w.nodes,n[34]=f,n[35]=Ye):Ye=n[35];let Xe;n[36]!==w||n[37]!==f?(Xe=[w,f],n[36]=w,n[37]=f,n[38]=Xe):Xe=n[38],(0,O.useEffect)(Ye,Xe);let Ze,Qe;n[39]===w.nodes?(Ze=n[40],Qe=n[41]):(Ze=()=>{fe.current=w.nodes},Qe=[w.nodes],n[39]=w.nodes,n[40]=Ze,n[41]=Qe),(0,O.useEffect)(Ze,Qe);let $e,et;n[42]!==r||n[43]!==F||n[44]!==N?($e=()=>{le.current={key:F,lastX:null,lastY:null,lastAt:0};let e=window.requestAnimationFrame(()=>{le.current=Jp({fg:oe.current,nodes:fe.current,activeDocName:r,zoom:N,focusKey:F,focusState:le.current,force:!0})});return()=>window.cancelAnimationFrame(e)},et=[F,r,N],n[42]=r,n[43]=F,n[44]=N,n[45]=$e,n[46]=et):($e=n[45],et=n[46]),(0,O.useEffect)($e,et);let tt,nt;n[47]!==r||n[48]!==P.links||n[49]!==P.nodes||n[50]!==b||n[51]!==I||n[52]!==u||n[53]!==l||n[54]!==p?(tt=()=>{},nt=[r,b,P.links,P.nodes,I,u,l,p],n[47]=r,n[48]=P.links,n[49]=P.nodes,n[50]=b,n[51]=I,n[52]=u,n[53]=l,n[54]=p,n[55]=tt,n[56]=nt):(tt=n[55],nt=n[56]),(0,O.useEffect)(tt,nt);let rt;n[57]===v?rt=n[58]:(rt=C(`h-full min-h-0 overflow-hidden`,v),n[57]=v,n[58]=rt);let it;n[59]===Symbol.for(`react.memo_cache_sentinel`)?(it=()=>{ue.current=null},n[59]=it):it=n[59];let at;n[60]!==r||n[61]!==P.links||n[62]!==P.nodes||n[63]!==I||n[64]!==p?(at=e=>{if(!e.isPrimary||e.button!==0){ue.current=null;return}ue.current={pointerId:e.pointerId,clientX:e.clientX,clientY:e.clientY,target:(()=>{let n=ae.current,i=oe.current;if(!n||!i)return{kind:`background`};let a=Zp({clientX:e.clientX,clientY:e.clientY,container:n}),o=Qp({point:a,fg:i,nodes:P.nodes,activeDocName:r,selectedNodeId:p,navigationIntentByNodeId:I});return o?{kind:`node`,node:o}:tm({point:a,fg:i,links:P.links})?{kind:`link`}:{kind:`background`}})()}},n[60]=r,n[61]=P.links,n[62]=P.nodes,n[63]=I,n[64]=p,n[65]=at):at=n[65];let ot;n[66]!==b||n[67]!==u||n[68]!==l||n[69]!==p?(ot=e=>{if(!e.isPrimary||e.button!==0){ue.current=null;return}let n=ue.current;ue.current=null,!(!n||n.pointerId!==e.pointerId)&&(Math.hypot(e.clientX-n.clientX,e.clientY-n.clientY)>Up||rm({target:n.target,docClickBehavior:b,selectedNodeId:p,onSelectNode:l,onBackgroundClick:u}))},n[66]=b,n[67]=u,n[68]=l,n[69]=p,n[70]=ot):ot=n[70];let st;n[71]!==r||n[72]!==Ee||n[73]!==Ne||n[74]!==Oe||n[75]!==Le||n[76]!==j||n[77]!==Te||n[78]!==he||n[79]!==P||n[80]!==je||n[81]!==re||n[82]!==M||n[83]!==F||n[84]!==N||n[85]!==ke||n[86]!==Pe||n[87]!==w.nodes||n[88]!==A||n[89]!==ze||n[90]!==Re||n[91]!==Me||n[92]!==Ke||n[93]!==We||n[94]!==Ue||n[95]!==D||n[96]!==Be||n[97]!==Ve||n[98]!==Ae||n[99]!==Fe||n[100]!==I||n[101]!==De||n[102]!==p||n[103]!==Ie?(st=re?(0,k.jsx)(`p`,{className:`p-4 text-sm text-destructive`,children:re}):P.nodes.length===0&&!D?(0,k.jsx)(`p`,{className:`p-4 text-sm text-muted-foreground`,children:`No links yet. Add wiki links or markdown links to build a graph.`}):(0,k.jsx)(`div`,{className:`h-full min-h-0`,role:`img`,"aria-label":`Graph visualization of document links`,children:(0,k.jsx)(Gf,{ref:oe,graphData:P,cooldownTicks:150,onEngineTick:()=>{pe.current=!1,le.current=Jp({fg:oe.current,nodes:w.nodes,activeDocName:r,zoom:N,focusKey:F,focusState:le.current})},onEngineStop:()=>{pe.current=!0;let e=Kp({nodes:w.nodes,activeDocName:r});qp({fg:oe.current,coords:e,dimensions:he})&&(le.current=Jp({fg:oe.current,nodes:w.nodes,activeDocName:r,zoom:N,focusKey:F,focusState:le.current,force:!0}))},width:he.width,height:he.height,backgroundColor:j,nodeId:`id`,nodeLabel:e=>jp(e,{displayState:Wp({node:e,navigationIntentByNodeId:I})}),nodeRelSize:4,nodeVal:e=>{let n=Pp(e,{activeDocName:r,selectedNodeId:p});return n===`active-selected`?20:n===`active`?18:n===`selected`||n===`external-selected`?12:6},nodeCanvasObjectMode:om,nodeCanvasObject:(e,n,i)=>{if(typeof e.x!=`number`||typeof e.y!=`number`)return;let a=Pp(e,{activeDocName:r,selectedNodeId:p}),o=Wp({node:e,navigationIntentByNodeId:I}),s=o===`folder`,c=o===`missing`,l=Fp(a),u=Gp({state:a,displayState:o,globalScale:i}),d=e.kind===`doc`?e.cluster:void 0,f=d?de(d,A):Te;n.beginPath(),n.arc(e.x,e.y,l,0,2*Math.PI,!1),n.fillStyle=a===`active`?Ee:a===`active-selected`?Oe:a===`external`||a===`external-selected`?M:c?Ae:a===`selected`?De:s?ke:f,n.fill(),u>l?(n.beginPath(),n.arc(e.x,e.y,u,0,2*Math.PI,!1),n.strokeStyle=c?Fe:a===`active`?Ne:a===`selected`||a===`external-selected`?Ie:Le,n.lineWidth=c?1.75/i:2/i,n.setLineDash(c?[3/i,2/i]:[]),n.stroke(),n.setLineDash([])):s&&(n.beginPath(),n.arc(e.x,e.y,l+2/i,0,2*Math.PI,!1),n.strokeStyle=Pe,n.lineWidth=1.5/i,n.stroke())},nodePointerAreaPaint:(e,n,i,a)=>{if(typeof e.x!=`number`||typeof e.y!=`number`)return;let o=Pp(e,{activeDocName:r,selectedNodeId:p}),s=Wp({node:e,navigationIntentByNodeId:I});i.beginPath(),i.arc(e.x,e.y,Gp({state:o,displayState:s,globalScale:a}),0,2*Math.PI,!1),i.fillStyle=n,i.fill()},onRenderFramePost:(e,n)=>{if(n<1.8)return;let i=oe.current;if(!i)return;e.save();let a=window.devicePixelRatio||1;e.setTransform(a,0,0,a,0,0),e.font=`10px system-ui, sans-serif`,Yp({ctx:e,placements:fp({nodes:Ue,links:We,activeDocName:r,viewport:he,maxLabels:Ve,maxLabelWidthPx:Be,labelDescriptors:Ke,measureTextWidthPx:n=>e.measureText(n).width,projectToScreen:(e,n)=>i.graph2ScreenCoords(e,n),getNodeRadiusPx:e=>Gp({state:Pp(e,{activeDocName:r,selectedNodeId:p}),displayState:Wp({node:e,navigationIntentByNodeId:I}),globalScale:n})*n+4}),labelColor:Me,chipColor:Re,chipBorderColor:ze}),e.restore()},linkColor:()=>je,linkDirectionalArrowLength:3,linkDirectionalArrowRelPos:1,linkWidth:1,showPointerCursor:am,onNodeClick:e=>{if(e.kind===`external`){window.open(e.url,`_blank`,`noopener,noreferrer`);return}if(e.docName){let n=I.get(e.id);window.location.assign(x(n?.hashDocName??e.docName,e.anchor??null))}}})}),n[71]=r,n[72]=Ee,n[73]=Ne,n[74]=Oe,n[75]=Le,n[76]=j,n[77]=Te,n[78]=he,n[79]=P,n[80]=je,n[81]=re,n[82]=M,n[83]=F,n[84]=N,n[85]=ke,n[86]=Pe,n[87]=w.nodes,n[88]=A,n[89]=ze,n[90]=Re,n[91]=Me,n[92]=Ke,n[93]=We,n[94]=Ue,n[95]=D,n[96]=Be,n[97]=Ve,n[98]=Ae,n[99]=Fe,n[100]=I,n[101]=De,n[102]=p,n[103]=Ie,n[104]=st):st=n[104];let ct;return n[105]!==rt||n[106]!==at||n[107]!==ot||n[108]!==st?(ct=(0,k.jsx)(`div`,{ref:ae,className:rt,onPointerCancel:it,onPointerDownCapture:at,onPointerUpCapture:ot,children:st}),n[105]=rt,n[106]=at,n[107]=ot,n[108]=st,n[109]=ct):ct=n[109],ct}function am(e){return!!(e&&`kind`in e)}function om(){return`replace`}function sm(e){return e.kind!==`external`}function cm(e){return e.id}function lm(e){return e.kind===`external`}var um=50,dm=`ok-graph-docked-url-nodes-v1`,fm=`ok-graph-fullscreen-url-nodes-v1`;function pm(e){if(typeof window>`u`)return!1;try{return window.localStorage.getItem(e)===`true`}catch{return!1}}function mm(e,n){if(!(typeof window>`u`))try{n?window.localStorage.setItem(e,`true`):window.localStorage.removeItem(e)}catch{}}var hm={explore:`Explore`,orphans:`Orphans`,hubs:`Hubs`},gm={incoming:`No Incoming`,outgoing:`No Outgoing`,both:`Both`};async function _m(e){let n=await fetch(`/api/orphans?mode=${encodeURIComponent(e)}`);if(!n.ok)throw Error(`Server error: ${n.status} ${n.statusText}`);let r=await n.json();if(!r.ok)throw Error(r.error??`Failed to load orphan pages`);return r.orphans??[]}async function vm(e){let n=await fetch(`/api/hubs?limit=${encodeURIComponent(String(e))}`);if(!n.ok)throw Error(`Server error: ${n.status} ${n.statusText}`);let r=await n.json();if(!r.ok)throw Error(r.error??`Failed to load hub pages`);return r.hubs??[]}function ym(e){window.location.assign(x(e))}function bm(e){return e===`incoming`?`Project-level pages with no incoming graph edges.`:e===`outgoing`?`Project-level pages with no outgoing graph edges.`:`Project-level pages with neither incoming nor outgoing graph edges.`}function xm(e){return e===`incoming`?`No pages are missing incoming graph links.`:e===`outgoing`?`No pages are missing outgoing graph links.`:`No disconnected pages. Pages appear here only when they have no incoming and no outgoing graph edges.`}function Sm(e){let n=(0,se.c)(29),{mode:r,onModeChange:i}=e,a;n[0]===r?a=n[1]:(a={queryKey:[`orphans`,r],queryFn:()=>_m(r)},n[0]=r,n[1]=a);let{data:u,isLoading:d,error:f}=s(a),p;n[2]===u?p=n[3]:(p=u===void 0?[]:u,n[2]=u,n[3]=p);let h=p,_;n[4]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,k.jsx)(`p`,{className:`text-sm font-medium`,children:`Project-level disconnected pages`}),n[4]=_):_=n[4];let v;n[5]===r?v=n[6]:(v=bm(r),n[5]=r,n[6]=v);let y;n[7]===v?y=n[8]:(y=(0,k.jsxs)(`div`,{className:`space-y-1`,children:[_,(0,k.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:v})]}),n[7]=v,n[8]=y);let x;n[9]===i?x=n[10]:(x=e=>{e&&g(e)&&i(e)},n[9]=i,n[10]=x);let S;n[11]===Symbol.for(`react.memo_cache_sentinel`)?(S=m.map(wm),n[11]=S):S=n[11];let C;n[12]!==r||n[13]!==x?(C=(0,k.jsx)(b,{type:`single`,size:`sm`,variant:`outline`,value:r,"aria-label":`Orphan mode`,onValueChange:x,children:S}),n[12]=r,n[13]=x,n[14]=C):C=n[14];let w;n[15]!==y||n[16]!==C?(w=(0,k.jsx)(`div`,{className:`border-b border-border/60 px-4 py-3`,children:(0,k.jsxs)(`div`,{className:`flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between`,children:[y,C]})}),n[15]=y,n[16]=C,n[17]=w):w=n[17];let T;n[18]!==f||n[19]!==d||n[20]!==r||n[21]!==h?(T=f?(0,k.jsx)(o,{children:f instanceof Error?f.message:`Failed to load orphan pages`}):h.length===0&&!d?(0,k.jsx)(c,{children:xm(r)}):(0,k.jsx)(`div`,{className:`flex flex-col gap-2`,children:h.map(Cm)}),n[18]=f,n[19]=d,n[20]=r,n[21]=h,n[22]=T):T=n[22];let E;n[23]!==d||n[24]!==T?(E=(0,k.jsx)(l,{"aria-busy":d,children:T}),n[23]=d,n[24]=T,n[25]=E):E=n[25];let ee;return n[26]!==w||n[27]!==E?(ee=(0,k.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[w,E]}),n[26]=w,n[27]=E,n[28]=ee):ee=n[28],ee}function Cm(e){return(0,k.jsxs)(`button`,{type:`button`,className:`block w-full rounded-lg border border-border bg-background/80 px-3 py-2 text-left transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,onClick:()=>ym(e.docName),children:[(0,k.jsx)(`div`,{className:`truncate text-sm font-medium`,children:e.title}),(0,k.jsx)(`div`,{className:`truncate text-xs text-muted-foreground`,children:e.docName})]},e.docName)}function wm(e){return(0,k.jsx)(v,{value:e,children:gm[e]},e)}function Tm(){let e=(0,se.c)(11),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={queryKey:[`hubs`,um],queryFn:Dm},e[0]=n):n=e[0];let{data:r,isLoading:i,error:a}=s(n),u;e[1]===r?u=e[2]:(u=r===void 0?[]:r,e[1]=r,e[2]=u);let d=u,f;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,k.jsx)(`div`,{className:`border-b border-border/60 px-4 py-3`,children:(0,k.jsxs)(`div`,{className:`space-y-1`,children:[(0,k.jsx)(`p`,{className:`text-sm font-medium`,children:`Top linked pages`}),(0,k.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Project-level pages ordered by inbound link count, up to `,um,` results.`]})]})}),e[3]=f):f=e[3];let p;e[4]!==a||e[5]!==d||e[6]!==i?(p=a?(0,k.jsx)(o,{children:a instanceof Error?a.message:`Failed to load hub pages`}):d.length===0&&!i?(0,k.jsx)(c,{children:`No hub pages yet. Hubs appear once pages accumulate inbound graph links.`}):(0,k.jsx)(`div`,{className:`flex flex-col gap-2`,children:d.map(Em)}),e[4]=a,e[5]=d,e[6]=i,e[7]=p):p=e[7];let m;return e[8]!==i||e[9]!==p?(m=(0,k.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[f,(0,k.jsx)(l,{"aria-busy":i,children:p})]}),e[8]=i,e[9]=p,e[10]=m):m=e[10],m}function Em(e){return(0,k.jsx)(`button`,{type:`button`,className:`block w-full rounded-lg border border-border bg-background/80 px-3 py-2 text-left transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,onClick:()=>ym(e.docName),children:(0,k.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,k.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,k.jsx)(`div`,{className:`truncate text-sm font-medium`,children:e.title}),(0,k.jsx)(`div`,{className:`truncate text-xs text-muted-foreground`,children:e.docName})]}),(0,k.jsx)(`span`,{className:`rounded-md bg-muted px-2 py-1 text-xs font-mono text-muted-foreground`,children:e.count})]})},e.docName)}function Dm(){return vm(um)}function Om(e){let n=(0,se.c)(93),{activeDocName:r}=e,{folderPaths:i,loading:a,pages:o}=_(),[s,c]=(0,O.useState)(!1),[l,m]=(0,O.useState)(`explore`),[h,g]=(0,O.useState)(`both`),[v,y]=(0,O.useState)(null),[x,C]=(0,O.useState)(null),T;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(T=[],n[0]=T):T=n[0];let[ce,le]=(0,O.useState)(T),[ue,de]=(0,O.useState)(Nm),[fe,pe]=(0,O.useState)(Mm),he,ge;n[1]===ue?(he=n[2],ge=n[3]):(he=()=>{mm(dm,ue)},ge=[ue],n[1]=ue,n[2]=he,n[3]=ge),(0,O.useEffect)(he,ge);let _e,ve;n[4]===fe?(_e=n[5],ve=n[6]):(_e=()=>{mm(fm,fe)},ve=[fe],n[4]=fe,n[5]=_e,n[6]=ve),(0,O.useEffect)(_e,ve);let ye,be;n[7]===s?(ye=n[8],be=n[9]):(ye=()=>{if(!s)return;let e=e=>{e.key===`Escape`&&c(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},be=[s],n[7]=s,n[8]=ye,n[9]=be),(0,O.useEffect)(ye,be);let xe,Se;n[10]!==s||n[11]!==v?(xe=()=>{!s&&v!==null&&y(null)},Se=[s,v],n[10]=s,n[11]=v,n[12]=xe,n[13]=Se):(xe=n[12],Se=n[13]),(0,O.useEffect)(xe,Se);let Ce,we;n[14]!==l||n[15]!==v?(Ce=()=>{l!==`explore`&&v!==null&&y(null)},we=[l,v],n[14]=l,n[15]=v,n[16]=Ce,n[17]=we):(Ce=n[16],we=n[17]),(0,O.useEffect)(Ce,we);let A=s?l:`explore`,j=s?fe:ue,Te=s?pe:de,Ee;n[18]!==i||n[19]!==a||n[20]!==o||n[21]!==v?(Ee=v?.kind===`doc`&&!a?te(v.docName,{pages:o,folderPaths:i}).displayState:`doc`,n[18]=i,n[19]=a,n[20]=o,n[21]=v,n[22]=Ee):Ee=n[22];let De=Ee,Oe;n[23]!==r||n[24]!==De||n[25]!==v?(Oe=v===null?null:v.kind===`doc`&&De===`missing`?{eyebrow:`Broken link`,description:`This page doesn't exist yet. Open it to create the page in the editor and collapse the graph.`,Icon:S,actionLabel:`Create page`,secondaryLabel:v.docName,onAction:()=>{let e=Lp(v);c(!1),window.location.assign(e)}}:v.kind===`doc`&&v.docName===r?{eyebrow:`Already open`,description:`This document is already active in the editor. Use Open to collapse the graph.`,Icon:D,actionLabel:`Open`,secondaryLabel:v.docName,onAction:()=>{let e=Lp(v);c(!1),window.location.assign(e)}}:v.kind===`doc`?{eyebrow:`Selected in graph`,description:`Open this document in the editor and collapse the graph.`,Icon:E,actionLabel:`Open`,secondaryLabel:v.docName,onAction:()=>{let e=Lp(v);c(!1),window.location.assign(e)}}:{eyebrow:`Selected in graph`,description:`Open this link in a new tab and collapse the graph.`,Icon:E,actionLabel:`Open link`,secondaryLabel:v.url,onAction:()=>{window.open(v.url,`_blank`,`noopener,noreferrer`),c(!1)}},n[23]=r,n[24]=De,n[25]=v,n[26]=Oe):Oe=n[26];let M=Oe,ke=s?`fixed inset-0 z-50 bg-background overflow-hidden`:void 0,Ae;n[27]===Symbol.for(`react.memo_cache_sentinel`)?(Ae=(0,k.jsx)(f,{children:`Graph`}),n[27]=Ae):Ae=n[27];let je;n[28]!==A||n[29]!==x?(je=A===`explore`&&x?(0,k.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[(0,k.jsxs)(d,{children:[x.nodes,` nodes`]}),(0,k.jsxs)(d,{children:[x.links,` links`]})]}):null,n[28]=A,n[29]=x,n[30]=je):je=n[30];let Me;n[31]===je?Me=n[32]:(Me=(0,k.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[Ae,je]}),n[31]=je,n[32]=Me);let Ne;n[33]!==l||n[34]!==s?(Ne=s?(0,k.jsx)(b,{type:`single`,size:`sm`,variant:`outline`,value:l,"aria-label":`Expanded graph mode`,onValueChange:e=>{(e===`explore`||e===`orphans`||e===`hubs`)&&m(e)},children:Object.entries(hm).map(jm)}):null,n[33]=l,n[34]=s,n[35]=Ne):Ne=n[35];let Pe=j?`Hide external URL nodes`:`Show external URL nodes`,Fe;n[36]===Te?Fe=n[37]:(Fe=()=>Te(Am),n[36]=Te,n[37]=Fe);let Ie=j?`size-4 text-sidebar-accent-foreground`:`size-4 text-muted-foreground`,Le;n[38]===Ie?Le=n[39]:(Le=(0,k.jsx)(ee,{className:Ie}),n[38]=Ie,n[39]=Le);let Re;n[40]!==j||n[41]!==Pe||n[42]!==Fe||n[43]!==Le?(Re=(0,k.jsx)(ne,{asChild:!0,children:(0,k.jsx)(w,{variant:`ghost`,size:`icon-sm`,className:`text-muted-foreground hover:text-foreground hover:bg-accent`,"aria-label":Pe,"aria-pressed":j,onClick:Fe,children:Le})}),n[40]=j,n[41]=Pe,n[42]=Fe,n[43]=Le,n[44]=Re):Re=n[44];let ze=s?`z-[9999]`:void 0,N=j?`Hide external URL nodes`:`Show external URL nodes`,Be;n[45]!==ze||n[46]!==N?(Be=(0,k.jsx)(re,{side:`bottom`,sideOffset:8,className:ze,children:N}),n[45]=ze,n[46]=N,n[47]=Be):Be=n[47];let Ve;n[48]!==Re||n[49]!==Be?(Ve=(0,k.jsxs)(ie,{delayDuration:0,children:[Re,Be]}),n[48]=Re,n[49]=Be,n[50]=Ve):Ve=n[50];let He=s?`Collapse graph`:`Expand graph`,P;n[51]===Symbol.for(`react.memo_cache_sentinel`)?(P=()=>c(km),n[51]=P):P=n[51];let Ue;n[52]===s?Ue=n[53]:(Ue=s?(0,k.jsx)(oe,{className:`size-4`}):(0,k.jsx)(ae,{className:`size-4`}),n[52]=s,n[53]=Ue);let We;n[54]!==He||n[55]!==Ue?(We=(0,k.jsx)(ne,{asChild:!0,children:(0,k.jsx)(w,{variant:`ghost`,size:`icon-sm`,className:`text-muted-foreground hover:text-foreground hover:bg-accent`,"aria-label":He,onClick:P,children:Ue})}),n[54]=He,n[55]=Ue,n[56]=We):We=n[56];let Ge=s?`z-[9999]`:void 0,Ke=s?`Collapse`:`Expand graph`,F;n[57]!==Ge||n[58]!==Ke?(F=(0,k.jsx)(re,{side:`bottom`,sideOffset:8,className:Ge,children:Ke}),n[57]=Ge,n[58]=Ke,n[59]=F):F=n[59];let qe;n[60]!==We||n[61]!==F?(qe=(0,k.jsxs)(ie,{delayDuration:0,children:[We,F]}),n[60]=We,n[61]=F,n[62]=qe):qe=n[62];let I;n[63]!==Ve||n[64]!==qe?(I=(0,k.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[Ve,qe]}),n[63]=Ve,n[64]=qe,n[65]=I):I=n[65];let L;n[66]!==Ne||n[67]!==I?(L=(0,k.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[Ne,I]}),n[66]=Ne,n[67]=I,n[68]=L):L=n[68];let Je;n[69]!==Me||n[70]!==L?(Je=(0,k.jsxs)(u,{className:`flex-wrap gap-3`,children:[Me,L]}),n[69]=Me,n[70]=L,n[71]=Je):Je=n[71];let Ye;n[72]!==r||n[73]!==A||n[74]!==ce||n[75]!==s||n[76]!==v||n[77]!==M||n[78]!==j?(Ye=A===`explore`?(0,k.jsxs)(`div`,{className:`relative flex min-h-0 flex-1 flex-col`,children:[(0,k.jsx)(im,{activeDocName:r,selectedNodeId:s?v?.id??null:null,isExpanded:s,showUrlNodes:j,className:`h-full min-h-0`,docClickBehavior:s?`select`:`navigate`,onSelectNode:s?y:void 0,onBackgroundClick:s?()=>{v!==null&&y(null)}:void 0,onStatsChange:(e,n,r)=>{if(r){C(null);return}C({nodes:e,links:n})},onClustersChange:le}),(0,k.jsx)(me,{clusters:ce,variant:s?`fullscreen`:`docked`}),s&&A===`explore`&&v!==null&&M?(0,k.jsx)(`div`,{className:`pointer-events-none absolute inset-x-4 top-4 z-10 flex justify-center`,children:(0,k.jsxs)(`div`,{role:`status`,"aria-label":`Selected graph item`,className:`pointer-events-auto flex w-full max-w-2xl items-center gap-3 rounded-xl border border-border/70 bg-background/95 px-4 py-3 text-sm shadow-lg backdrop-blur supports-[backdrop-filter]:bg-background/85`,children:[(0,k.jsx)(M.Icon,{className:`size-4 shrink-0 text-primary`}),(0,k.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,k.jsx)(`div`,{className:`text-xs font-medium uppercase tracking-wide text-muted-foreground`,children:M.eyebrow}),(0,k.jsx)(`div`,{className:`truncate font-medium text-foreground`,children:v.label}),(0,k.jsx)(`div`,{className:`truncate text-xs text-muted-foreground`,children:M.secondaryLabel}),(0,k.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:M.description})]}),(0,k.jsx)(w,{size:`sm`,className:`shrink-0`,onClick:M.onAction,children:M.actionLabel})]})}):null]}):null,n[72]=r,n[73]=A,n[74]=ce,n[75]=s,n[76]=v,n[77]=M,n[78]=j,n[79]=Ye):Ye=n[79];let Xe;n[80]!==A||n[81]!==s||n[82]!==h?(Xe=s&&A===`orphans`?(0,k.jsx)(Sm,{mode:h,onModeChange:g}):null,n[80]=A,n[81]=s,n[82]=h,n[83]=Xe):Xe=n[83];let Ze;n[84]!==A||n[85]!==s?(Ze=s&&A===`hubs`?(0,k.jsx)(Tm,{}):null,n[84]=A,n[85]=s,n[86]=Ze):Ze=n[86];let Qe;return n[87]!==ke||n[88]!==Je||n[89]!==Ye||n[90]!==Xe||n[91]!==Ze?(Qe=(0,k.jsxs)(p,{className:ke,children:[Je,Ye,Xe,Ze]}),n[87]=ke,n[88]=Je,n[89]=Ye,n[90]=Xe,n[91]=Ze,n[92]=Qe):Qe=n[92],Qe}function km(e){return!e}function Am(e){return!e}function jm(e){let[n,r]=e;return(0,k.jsx)(v,{value:n,children:r},n)}function Mm(){return pm(fm)}function Nm(){return pm(dm)}export{Om as GraphPanel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,n as t,r as n,t as r}from"./index-DmSa5KwJ.js";export{r as McpConsentDialogBody,r as default,t as computeInitialSelection,n as selectedIdsOrdered,e as toggleSelectedId};
|