@origintrail-official/dkg-node-ui 10.0.24 → 10.0.25
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-ui/assets/ActivityFeed-vyl2XdLo.js +99 -0
- package/dist-ui/assets/{AgentHub-BO9jGbJl.js → AgentHub-CYfAoOWF.js} +1 -1
- package/dist-ui/assets/AgentProfilePage-BjQm0je4.js +1 -0
- package/dist-ui/assets/{ApproveWalletsModal-C2Tu29tB.js → ApproveWalletsModal-CzWJ4KyU.js} +3 -3
- package/dist-ui/assets/{ContextGraphPrimitives-BqlTIZHy.js → ContextGraphPrimitives-ecppTns4.js} +1 -1
- package/dist-ui/assets/{ConvictionDetailView-J-DAKHtP.js → ConvictionDetailView-CuLUhbzR.js} +2 -2
- package/dist-ui/assets/MemoryLayerView-Dymg_Zf_.js +2 -0
- package/dist-ui/assets/MemoryReadStatus-D4HXCImC.js +1 -0
- package/dist-ui/assets/MemoryStackView-Bq8Fbh5W.js +1 -0
- package/dist-ui/assets/{Network-DV9K48MH.js → Network-F76S9_1V.js} +1 -1
- package/dist-ui/assets/{OnChainProvenanceCard-jxk66g53.js → OnChainProvenanceCard-CCwK3sRG.js} +1 -1
- package/dist-ui/assets/{Operations-CNB1BMYg.js → Operations-aVCBUh8u.js} +1 -1
- package/dist-ui/assets/ProjectView-Cb1PQ-jm.js +290 -0
- package/dist-ui/assets/{PublishingConviction-DbP1i3v0.js → PublishingConviction-BnAJjHL8.js} +2 -2
- package/dist-ui/assets/{Settings-I6g3MQCV.js → Settings-rEyPw1oS.js} +1 -1
- package/dist-ui/assets/{browserWalletTransaction-CXv612Pn.js → browserWalletTransaction-BJBFRjXx.js} +3 -3
- package/dist-ui/assets/{ccip-DY93ay8e.js → ccip-DYOqJfs7.js} +1 -1
- package/dist-ui/assets/{index-CIt7zWgM.css → index-CAdbSAQK.css} +1 -1
- package/dist-ui/assets/index-HEpqHVfE.js +1143 -0
- package/dist-ui/assets/index-_vQ99L0s.js +192 -0
- package/dist-ui/assets/{jsonld-32FQRO67-DKLfQ_nD.js → jsonld-32FQRO67-DVqZhSL_.js} +2 -2
- package/dist-ui/assets/{jsonld-BgpgXlDQ.js → jsonld-Dpm03cay.js} +1 -1
- package/dist-ui/assets/renderer-3d-IRPVRQWX-DjW_h88e.js +5126 -0
- package/dist-ui/assets/{shikiHighlighter-BXl6qMQO.js → shikiHighlighter-DL7LOds2.js} +4 -4
- package/dist-ui/assets/truncate-BWdqLeqV.js +22 -0
- package/dist-ui/assets/{useEntityOnChainReceipt-CUGQNIsP.js → useEntityOnChainReceipt-B_uLyqZc.js} +5 -5
- package/dist-ui/index.html +2 -2
- package/package.json +4 -4
- package/dist-ui/assets/3d-force-graph-DvzZZzFn.js +0 -1015
- package/dist-ui/assets/ActivityFeed-B5QxV1dk.js +0 -99
- package/dist-ui/assets/AgentProfilePage-DJJTn1WD.js +0 -1
- package/dist-ui/assets/MemoryLayerView-BOxI-_TF.js +0 -2
- package/dist-ui/assets/MemoryStackView-BTyZZKNm.js +0 -1
- package/dist-ui/assets/ProjectView-BP4vNSXI.js +0 -290
- package/dist-ui/assets/index-CumB6j2m.js +0 -192
- package/dist-ui/assets/index-DW3dBcQk.js +0 -1175
- package/dist-ui/assets/renderer-3d-2EVDZII7-BCmzI8Ii.js +0 -2
- package/dist-ui/assets/three.module-BXIk8GZS.js +0 -4112
- package/dist-ui/assets/truncate-BaiMkAOo.js +0 -1
- package/dist-ui/assets/useProjectActivity-BOgGdtS7.js +0 -1
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/renderer-3d-2EVDZII7-BCmzI8Ii.js","assets/index-DW3dBcQk.js","assets/index-CIt7zWgM.css","assets/ntriples-ZWBY2WET-DH7OofPp.js","assets/N3Parser-CI_4owEm.js","assets/turtle-JJPK7LJ5-BzTu0283.js","assets/jsonld-32FQRO67-DKLfQ_nD.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var qi=Object.defineProperty;var Vi=(e,n,r)=>n in e?qi(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r;var P=(e,n,r)=>Vi(e,typeof n!="symbol"?n+"":n,r);import{aP as K,be as et,_ as qt}from"./index-DW3dBcQk.js";import{e as Rt,c as $n,f as Ln,g as Gi,o as Xi,h as Un,m as Hn}from"./string-DtUow4KV.js";function Yi(e,n){let r=0;for(let i of e)(i=+i)&&(r+=i);return r}var Bn=180/Math.PI,on={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Br(e,n,r,i,o,a){var s,l,u;return(s=Math.sqrt(e*e+n*n))&&(e/=s,n/=s),(u=e*r+n*i)&&(r-=e*u,i-=n*u),(l=Math.sqrt(r*r+i*i))&&(r/=l,i/=l,u/=l),e*i<n*r&&(e=-e,n=-n,u=-u,s=-s),{translateX:o,translateY:a,rotate:Math.atan2(n,e)*Bn,skewX:Math.atan(u)*Bn,scaleX:s,scaleY:l}}var ge;function Ki(e){const n=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return n.isIdentity?on:Br(n.a,n.b,n.c,n.d,n.e,n.f)}function Zi(e){return e==null||(ge||(ge=document.createElementNS("http://www.w3.org/2000/svg","g")),ge.setAttribute("transform",e),!(e=ge.transform.baseVal.consolidate()))?on:(e=e.matrix,Br(e.a,e.b,e.c,e.d,e.e,e.f))}function Wr(e,n,r,i){function o(c){return c.length?c.pop()+" ":""}function a(c,h,f,d,p,_){if(c!==f||h!==d){var b=p.push("translate(",null,n,null,r);_.push({i:b-4,x:Rt(c,f)},{i:b-2,x:Rt(h,d)})}else(f||d)&&p.push("translate("+f+n+d+r)}function s(c,h,f,d){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),d.push({i:f.push(o(f)+"rotate(",null,i)-2,x:Rt(c,h)})):h&&f.push(o(f)+"rotate("+h+i)}function l(c,h,f,d){c!==h?d.push({i:f.push(o(f)+"skewX(",null,i)-2,x:Rt(c,h)}):h&&f.push(o(f)+"skewX("+h+i)}function u(c,h,f,d,p,_){if(c!==f||h!==d){var b=p.push(o(p)+"scale(",null,",",null,")");_.push({i:b-4,x:Rt(c,f)},{i:b-2,x:Rt(h,d)})}else(f!==1||d!==1)&&p.push(o(p)+"scale("+f+","+d+")")}return function(c,h){var f=[],d=[];return c=e(c),h=e(h),a(c.translateX,c.translateY,h.translateX,h.translateY,f,d),s(c.rotate,h.rotate,f,d),l(c.skewX,h.skewX,f,d),u(c.scaleX,c.scaleY,h.scaleX,h.scaleY,f,d),c=h=null,function(p){for(var _=-1,b=d.length,y;++_<b;)f[(y=d[_]).i]=y.x(p);return f.join("")}}}var Qi=Wr(Ki,"px, ","px)","deg)"),Ji=Wr(Zi,", ",")",")"),to=1e-12;function Wn(e){return((e=Math.exp(e))+1/e)/2}function eo(e){return((e=Math.exp(e))-1/e)/2}function no(e){return((e=Math.exp(2*e))-1)/(e+1)}const ro=(function e(n,r,i){function o(a,s){var l=a[0],u=a[1],c=a[2],h=s[0],f=s[1],d=s[2],p=h-l,_=f-u,b=p*p+_*_,y,g;if(b<to)g=Math.log(d/c)/n,y=function(k){return[l+k*p,u+k*_,c*Math.exp(n*k*g)]};else{var w=Math.sqrt(b),x=(d*d-c*c+i*b)/(2*c*r*w),m=(d*d-c*c-i*b)/(2*d*r*w),v=Math.log(Math.sqrt(x*x+1)-x),S=Math.log(Math.sqrt(m*m+1)-m);g=(S-v)/n,y=function(k){var M=k*g,N=Wn(v),E=c/(r*w)*(N*no(n*M+v)-eo(v));return[l+E*p,u+E*_,c*N/Wn(n*M+v)]}}return y.duration=g*1e3*n/Math.SQRT2,y}return o.rho=function(a){var s=Math.max(.001,+a),l=s*s,u=l*l;return e(s,l,u)},o})(Math.SQRT2,2,4);var an="http://www.w3.org/1999/xhtml";const qn={svg:"http://www.w3.org/2000/svg",xhtml:an,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Le(e){var n=e+="",r=n.indexOf(":");return r>=0&&(n=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),qn.hasOwnProperty(n)?{space:qn[n],local:e}:e}function io(e){return function(){var n=this.ownerDocument,r=this.namespaceURI;return r===an&&n.documentElement.namespaceURI===an?n.createElement(e):n.createElementNS(r,e)}}function oo(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function qr(e){var n=Le(e);return(n.local?oo:io)(n)}function ao(){}function xn(e){return e==null?ao:function(){return this.querySelector(e)}}function so(e){typeof e!="function"&&(e=xn(e));for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o)for(var a=n[o],s=a.length,l=i[o]=new Array(s),u,c,h=0;h<s;++h)(u=a[h])&&(c=e.call(u,u.__data__,h,a))&&("__data__"in u&&(c.__data__=u.__data__),l[h]=c);return new it(i,this._parents)}function lo(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function uo(){return[]}function Vr(e){return e==null?uo:function(){return this.querySelectorAll(e)}}function co(e){return function(){return lo(e.apply(this,arguments))}}function fo(e){typeof e=="function"?e=co(e):e=Vr(e);for(var n=this._groups,r=n.length,i=[],o=[],a=0;a<r;++a)for(var s=n[a],l=s.length,u,c=0;c<l;++c)(u=s[c])&&(i.push(e.call(u,u.__data__,c,s)),o.push(u));return new it(i,o)}function Gr(e){return function(){return this.matches(e)}}function Xr(e){return function(n){return n.matches(e)}}var ho=Array.prototype.find;function po(e){return function(){return ho.call(this.children,e)}}function go(){return this.firstElementChild}function _o(e){return this.select(e==null?go:po(typeof e=="function"?e:Xr(e)))}var vo=Array.prototype.filter;function yo(){return Array.from(this.children)}function mo(e){return function(){return vo.call(this.children,e)}}function bo(e){return this.selectAll(e==null?yo:mo(typeof e=="function"?e:Xr(e)))}function wo(e){typeof e!="function"&&(e=Gr(e));for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o)for(var a=n[o],s=a.length,l=i[o]=[],u,c=0;c<s;++c)(u=a[c])&&e.call(u,u.__data__,c,a)&&l.push(u);return new it(i,this._parents)}function Yr(e){return new Array(e.length)}function xo(){return new it(this._enter||this._groups.map(Yr),this._parents)}function Ae(e,n){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=n}Ae.prototype={constructor:Ae,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 ko(e){return function(){return e}}function So(e,n,r,i,o,a){for(var s=0,l,u=n.length,c=a.length;s<c;++s)(l=n[s])?(l.__data__=a[s],i[s]=l):r[s]=new Ae(e,a[s]);for(;s<u;++s)(l=n[s])&&(o[s]=l)}function Co(e,n,r,i,o,a,s){var l,u,c=new Map,h=n.length,f=a.length,d=new Array(h),p;for(l=0;l<h;++l)(u=n[l])&&(d[l]=p=s.call(u,u.__data__,l,n)+"",c.has(p)?o[l]=u:c.set(p,u));for(l=0;l<f;++l)p=s.call(e,a[l],l,a)+"",(u=c.get(p))?(i[l]=u,u.__data__=a[l],c.delete(p)):r[l]=new Ae(e,a[l]);for(l=0;l<h;++l)(u=n[l])&&c.get(d[l])===u&&(o[l]=u)}function Mo(e){return e.__data__}function Ao(e,n){if(!arguments.length)return Array.from(this,Mo);var r=n?Co:So,i=this._parents,o=this._groups;typeof e!="function"&&(e=ko(e));for(var a=o.length,s=new Array(a),l=new Array(a),u=new Array(a),c=0;c<a;++c){var h=i[c],f=o[c],d=f.length,p=Po(e.call(h,h&&h.__data__,c,i)),_=p.length,b=l[c]=new Array(_),y=s[c]=new Array(_),g=u[c]=new Array(d);r(h,f,b,y,g,p,n);for(var w=0,x=0,m,v;w<_;++w)if(m=b[w]){for(w>=x&&(x=w+1);!(v=y[x])&&++x<_;);m._next=v||null}}return s=new it(s,i),s._enter=l,s._exit=u,s}function Po(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function To(){return new it(this._exit||this._groups.map(Yr),this._parents)}function Eo(e,n,r){var i=this.enter(),o=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),n!=null&&(o=n(o),o&&(o=o.selection())),r==null?a.remove():r(a),i&&o?i.merge(o).order():o}function No(e){for(var n=e.selection?e.selection():e,r=this._groups,i=n._groups,o=r.length,a=i.length,s=Math.min(o,a),l=new Array(o),u=0;u<s;++u)for(var c=r[u],h=i[u],f=c.length,d=l[u]=new Array(f),p,_=0;_<f;++_)(p=c[_]||h[_])&&(d[_]=p);for(;u<o;++u)l[u]=r[u];return new it(l,this._parents)}function zo(){for(var e=this._groups,n=-1,r=e.length;++n<r;)for(var i=e[n],o=i.length-1,a=i[o],s;--o>=0;)(s=i[o])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function Io(e){e||(e=Ro);function n(f,d){return f&&d?e(f.__data__,d.__data__):!f-!d}for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a){for(var s=r[a],l=s.length,u=o[a]=new Array(l),c,h=0;h<l;++h)(c=s[h])&&(u[h]=c);u.sort(n)}return new it(o,this._parents).order()}function Ro(e,n){return e<n?-1:e>n?1:e>=n?0:NaN}function Oo(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Do(){return Array.from(this)}function Fo(){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length;o<a;++o){var s=i[o];if(s)return s}return null}function jo(){let e=0;for(const n of this)++e;return e}function $o(){return!this.node()}function Lo(e){for(var n=this._groups,r=0,i=n.length;r<i;++r)for(var o=n[r],a=0,s=o.length,l;a<s;++a)(l=o[a])&&e.call(l,l.__data__,a,o);return this}function Uo(e){return function(){this.removeAttribute(e)}}function Ho(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Bo(e,n){return function(){this.setAttribute(e,n)}}function Wo(e,n){return function(){this.setAttributeNS(e.space,e.local,n)}}function qo(e,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Vo(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 Go(e,n){var r=Le(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?Ho:Uo:typeof n=="function"?r.local?Vo:qo:r.local?Wo:Bo)(r,n))}function Kr(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Xo(e){return function(){this.style.removeProperty(e)}}function Yo(e,n,r){return function(){this.style.setProperty(e,n,r)}}function Ko(e,n,r){return function(){var i=n.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function Zo(e,n,r){return arguments.length>1?this.each((n==null?Xo:typeof n=="function"?Ko:Yo)(e,n,r??"")):Ht(this.node(),e)}function Ht(e,n){return e.style.getPropertyValue(n)||Kr(e).getComputedStyle(e,null).getPropertyValue(n)}function Qo(e){return function(){delete this[e]}}function Jo(e,n){return function(){this[e]=n}}function ta(e,n){return function(){var r=n.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function ea(e,n){return arguments.length>1?this.each((n==null?Qo:typeof n=="function"?ta:Jo)(e,n)):this.node()[e]}function Zr(e){return e.trim().split(/^|\s+/)}function kn(e){return e.classList||new Qr(e)}function Qr(e){this._node=e,this._names=Zr(e.getAttribute("class")||"")}Qr.prototype={add:function(e){var n=this._names.indexOf(e);n<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 Jr(e,n){for(var r=kn(e),i=-1,o=n.length;++i<o;)r.add(n[i])}function ti(e,n){for(var r=kn(e),i=-1,o=n.length;++i<o;)r.remove(n[i])}function na(e){return function(){Jr(this,e)}}function ra(e){return function(){ti(this,e)}}function ia(e,n){return function(){(n.apply(this,arguments)?Jr:ti)(this,e)}}function oa(e,n){var r=Zr(e+"");if(arguments.length<2){for(var i=kn(this.node()),o=-1,a=r.length;++o<a;)if(!i.contains(r[o]))return!1;return!0}return this.each((typeof n=="function"?ia:n?na:ra)(r,n))}function aa(){this.textContent=""}function sa(e){return function(){this.textContent=e}}function la(e){return function(){var n=e.apply(this,arguments);this.textContent=n??""}}function ua(e){return arguments.length?this.each(e==null?aa:(typeof e=="function"?la:sa)(e)):this.node().textContent}function ca(){this.innerHTML=""}function fa(e){return function(){this.innerHTML=e}}function ha(e){return function(){var n=e.apply(this,arguments);this.innerHTML=n??""}}function da(e){return arguments.length?this.each(e==null?ca:(typeof e=="function"?ha:fa)(e)):this.node().innerHTML}function pa(){this.nextSibling&&this.parentNode.appendChild(this)}function ga(){return this.each(pa)}function _a(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function va(){return this.each(_a)}function ya(e){var n=typeof e=="function"?e:qr(e);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function ma(){return null}function ba(e,n){var r=typeof e=="function"?e:qr(e),i=n==null?ma:typeof n=="function"?n:xn(n);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function wa(){var e=this.parentNode;e&&e.removeChild(this)}function xa(){return this.each(wa)}function ka(){var e=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function Sa(){var e=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function Ca(e){return this.select(e?Sa:ka)}function Ma(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Aa(e){return function(n){e.call(this,n,this.__data__)}}function Pa(e){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");return i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),{type:n,name:r}})}function Ta(e){return function(){var n=this.__on;if(n){for(var r=0,i=-1,o=n.length,a;r<o;++r)a=n[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):n[++i]=a;++i?n.length=i:delete this.__on}}}function Ea(e,n,r){return function(){var i=this.__on,o,a=Aa(n);if(i){for(var s=0,l=i.length;s<l;++s)if((o=i[s]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=a,o.options=r),o.value=n;return}}this.addEventListener(e.type,a,r),o={type:e.type,name:e.name,value:n,listener:a,options:r},i?i.push(o):this.__on=[o]}}function Na(e,n,r){var i=Pa(e+""),o,a=i.length,s;if(arguments.length<2){var l=this.node().__on;if(l){for(var u=0,c=l.length,h;u<c;++u)for(o=0,h=l[u];o<a;++o)if((s=i[o]).type===h.type&&s.name===h.name)return h.value}return}for(l=n?Ea:Ta,o=0;o<a;++o)this.each(l(i[o],n,r));return this}function ei(e,n,r){var i=Kr(e),o=i.CustomEvent;typeof o=="function"?o=new o(n,r):(o=i.document.createEvent("Event"),r?(o.initEvent(n,r.bubbles,r.cancelable),o.detail=r.detail):o.initEvent(n,!1,!1)),e.dispatchEvent(o)}function za(e,n){return function(){return ei(this,e,n)}}function Ia(e,n){return function(){return ei(this,e,n.apply(this,arguments))}}function Ra(e,n){return this.each((typeof n=="function"?Ia:za)(e,n))}function*Oa(){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&(yield s)}var ni=[null];function it(e,n){this._groups=e,this._parents=n}function he(){return new it([[document.documentElement]],ni)}function Da(){return this}it.prototype=he.prototype={constructor:it,select:so,selectAll:fo,selectChild:_o,selectChildren:bo,filter:wo,data:Ao,enter:xo,exit:To,join:Eo,merge:No,selection:Da,order:zo,sort:Io,call:Oo,nodes:Do,node:Fo,size:jo,empty:$o,each:Lo,attr:Go,style:Zo,property:ea,classed:oa,text:ua,html:da,raise:ga,lower:va,append:ya,insert:ba,remove:xa,clone:Ca,datum:Ma,on:Na,dispatch:Ra,[Symbol.iterator]:Oa};function st(e){return typeof e=="string"?new it([[document.querySelector(e)]],[document.documentElement]):new it([[e]],ni)}function Fa(e){let n;for(;n=e.sourceEvent;)e=n;return e}function gt(e,n){if(e=Fa(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 o=n.getBoundingClientRect();return[e.clientX-o.left-n.clientLeft,e.clientY-o.top-n.clientTop]}}return[e.pageX,e.pageY]}var ja={value:()=>{}};function de(){for(var e=0,n=arguments.length,r={},i;e<n;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new we(r)}function we(e){this._=e}function $a(e,n){return e.trim().split(/^|\s+/).map(function(r){var i="",o=r.indexOf(".");if(o>=0&&(i=r.slice(o+1),r=r.slice(0,o)),r&&!n.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}we.prototype=de.prototype={constructor:we,on:function(e,n){var r=this._,i=$a(e+"",r),o,a=-1,s=i.length;if(arguments.length<2){for(;++a<s;)if((o=(e=i[a]).type)&&(o=La(r[o],e.name)))return o;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++a<s;)if(o=(e=i[a]).type)r[o]=Vn(r[o],e.name,n);else if(n==null)for(o in r)r[o]=Vn(r[o],e.name,null);return this},copy:function(){var e={},n=this._;for(var r in n)e[r]=n[r].slice();return new we(e)},call:function(e,n){if((o=arguments.length-2)>0)for(var r=new Array(o),i=0,o,a;i<o;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,o=a.length;i<o;++i)a[i].value.apply(n,r)},apply:function(e,n,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],o=0,a=i.length;o<a;++o)i[o].value.apply(n,r)}};function La(e,n){for(var r=0,i=e.length,o;r<i;++r)if((o=e[r]).name===n)return o.value}function Vn(e,n,r){for(var i=0,o=e.length;i<o;++i)if(e[i].name===n){e[i]=ja,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:n,value:r}),e}const Ua={passive:!1},ue={capture:!0,passive:!1};function Ge(e){e.stopImmediatePropagation()}function Ut(e){e.preventDefault(),e.stopImmediatePropagation()}function ri(e){var n=e.document.documentElement,r=st(e).on("dragstart.drag",Ut,ue);"onselectstart"in n?r.on("selectstart.drag",Ut,ue):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function ii(e,n){var r=e.document.documentElement,i=st(e).on("dragstart.drag",null);n&&(i.on("click.drag",Ut,ue),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in r?i.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const _e=e=>()=>e;function sn(e,{sourceEvent:n,subject:r,target:i,identifier:o,active:a,x:s,y:l,dx:u,dy:c,dispatch:h}){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:o,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:h}})}sn.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Ha(e){return!e.ctrlKey&&!e.button}function Ba(){return this.parentNode}function Wa(e,n){return n??{x:e.x,y:e.y}}function qa(){return navigator.maxTouchPoints||"ontouchstart"in this}function Va(){var e=Ha,n=Ba,r=Wa,i=qa,o={},a=de("start","drag","end"),s=0,l,u,c,h,f=0;function d(m){m.on("mousedown.drag",p).filter(i).on("touchstart.drag",y).on("touchmove.drag",g,Ua).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(m,v){if(!(h||!e.call(this,m,v))){var S=x(this,n.call(this,m,v),m,v,"mouse");S&&(st(m.view).on("mousemove.drag",_,ue).on("mouseup.drag",b,ue),ri(m.view),Ge(m),c=!1,l=m.clientX,u=m.clientY,S("start",m))}}function _(m){if(Ut(m),!c){var v=m.clientX-l,S=m.clientY-u;c=v*v+S*S>f}o.mouse("drag",m)}function b(m){st(m.view).on("mousemove.drag mouseup.drag",null),ii(m.view,c),Ut(m),o.mouse("end",m)}function y(m,v){if(e.call(this,m,v)){var S=m.changedTouches,k=n.call(this,m,v),M=S.length,N,E;for(N=0;N<M;++N)(E=x(this,k,m,v,S[N].identifier,S[N]))&&(Ge(m),E("start",m,S[N]))}}function g(m){var v=m.changedTouches,S=v.length,k,M;for(k=0;k<S;++k)(M=o[v[k].identifier])&&(Ut(m),M("drag",m,v[k]))}function w(m){var v=m.changedTouches,S=v.length,k,M;for(h&&clearTimeout(h),h=setTimeout(function(){h=null},500),k=0;k<S;++k)(M=o[v[k].identifier])&&(Ge(m),M("end",m,v[k]))}function x(m,v,S,k,M,N){var E=a.copy(),I=gt(N||S,v),R,j,C;if((C=r.call(m,new sn("beforestart",{sourceEvent:S,target:d,identifier:M,active:s,x:I[0],y:I[1],dx:0,dy:0,dispatch:E}),k))!=null)return R=C.x-I[0]||0,j=C.y-I[1]||0,function z(A,O,F){var $=I,L;switch(A){case"start":o[M]=z,L=s++;break;case"end":delete o[M],--s;case"drag":I=gt(F||O,v),L=s;break}E.call(A,m,new sn(A,{sourceEvent:O,subject:C,target:d,identifier:M,active:L,x:I[0]+R,y:I[1]+j,dx:I[0]-$[0],dy:I[1]-$[1],dispatch:E}),k)}}return d.filter=function(m){return arguments.length?(e=typeof m=="function"?m:_e(!!m),d):e},d.container=function(m){return arguments.length?(n=typeof m=="function"?m:_e(m),d):n},d.subject=function(m){return arguments.length?(r=typeof m=="function"?m:_e(m),d):r},d.touchable=function(m){return arguments.length?(i=typeof m=="function"?m:_e(!!m),d):i},d.on=function(){var m=a.on.apply(a,arguments);return m===a?d:m},d.clickDistance=function(m){return arguments.length?(f=(m=+m)*m,d):Math.sqrt(f)},d}var Bt=0,te=0,Vt=0,oi=1e3,Pe,ee,Te=0,Dt=0,Ue=0,ce=typeof performance=="object"&&performance.now?performance:Date,ai=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Sn(){return Dt||(ai(Ga),Dt=ce.now()+Ue)}function Ga(){Dt=0}function Ee(){this._call=this._time=this._next=null}Ee.prototype=Cn.prototype={constructor:Ee,restart:function(e,n,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Sn():+r)+(n==null?0:+n),!this._next&&ee!==this&&(ee?ee._next=this:Pe=this,ee=this),this._call=e,this._time=r,ln()},stop:function(){this._call&&(this._call=null,this._time=1/0,ln())}};function Cn(e,n,r){var i=new Ee;return i.restart(e,n,r),i}function Xa(){Sn(),++Bt;for(var e=Pe,n;e;)(n=Dt-e._time)>=0&&e._call.call(void 0,n),e=e._next;--Bt}function Gn(){Dt=(Te=ce.now())+Ue,Bt=te=0;try{Xa()}finally{Bt=0,Ka(),Dt=0}}function Ya(){var e=ce.now(),n=e-Te;n>oi&&(Ue-=n,Te=e)}function Ka(){for(var e,n=Pe,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:Pe=r);ee=e,ln(i)}function ln(e){if(!Bt){te&&(te=clearTimeout(te));var n=e-Dt;n>24?(e<1/0&&(te=setTimeout(Gn,e-ce.now()-Ue)),Vt&&(Vt=clearInterval(Vt))):(Vt||(Te=ce.now(),Vt=setInterval(Ya,oi)),Bt=1,ai(Gn))}}function Xn(e,n,r){var i=new Ee;return n=n==null?0:+n,i.restart(o=>{i.stop(),e(o+n)},n,r),i}var Za=de("start","end","cancel","interrupt"),Qa=[],si=0,Yn=1,un=2,xe=3,Kn=4,cn=5,ke=6;function He(e,n,r,i,o,a){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;Ja(e,r,{name:n,index:i,group:o,on:Za,tween:Qa,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:si})}function Mn(e,n){var r=dt(e,n);if(r.state>si)throw new Error("too late; already scheduled");return r}function yt(e,n){var r=dt(e,n);if(r.state>xe)throw new Error("too late; already running");return r}function dt(e,n){var r=e.__transition;if(!r||!(r=r[n]))throw new Error("transition not found");return r}function Ja(e,n,r){var i=e.__transition,o;i[n]=r,r.timer=Cn(a,0,r.time);function a(c){r.state=Yn,r.timer.restart(s,r.delay,r.time),r.delay<=c&&s(c-r.delay)}function s(c){var h,f,d,p;if(r.state!==Yn)return u();for(h in i)if(p=i[h],p.name===r.name){if(p.state===xe)return Xn(s);p.state===Kn?(p.state=ke,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete i[h]):+h<n&&(p.state=ke,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete i[h])}if(Xn(function(){r.state===xe&&(r.state=Kn,r.timer.restart(l,r.delay,r.time),l(c))}),r.state=un,r.on.call("start",e,e.__data__,r.index,r.group),r.state===un){for(r.state=xe,o=new Array(d=r.tween.length),h=0,f=-1;h<d;++h)(p=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(o[++f]=p);o.length=f+1}}function l(c){for(var h=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(u),r.state=cn,1),f=-1,d=o.length;++f<d;)o[f].call(e,h);r.state===cn&&(r.on.call("end",e,e.__data__,r.index,r.group),u())}function u(){r.state=ke,r.timer.stop(),delete i[n];for(var c in i)return;delete e.__transition}}function Se(e,n){var r=e.__transition,i,o,a=!0,s;if(r){n=n==null?null:n+"";for(s in r){if((i=r[s]).name!==n){a=!1;continue}o=i.state>un&&i.state<cn,i.state=ke,i.timer.stop(),i.on.call(o?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[s]}a&&delete e.__transition}}function ts(e){return this.each(function(){Se(this,e)})}function es(e,n){var r,i;return function(){var o=yt(this,e),a=o.tween;if(a!==r){i=r=a;for(var s=0,l=i.length;s<l;++s)if(i[s].name===n){i=i.slice(),i.splice(s,1);break}}o.tween=i}}function ns(e,n,r){var i,o;if(typeof r!="function")throw new Error;return function(){var a=yt(this,e),s=a.tween;if(s!==i){o=(i=s).slice();for(var l={name:n,value:r},u=0,c=o.length;u<c;++u)if(o[u].name===n){o[u]=l;break}u===c&&o.push(l)}a.tween=o}}function rs(e,n){var r=this._id;if(e+="",arguments.length<2){for(var i=dt(this.node(),r).tween,o=0,a=i.length,s;o<a;++o)if((s=i[o]).name===e)return s.value;return null}return this.each((n==null?es:ns)(r,e,n))}function An(e,n,r){var i=e._id;return e.each(function(){var o=yt(this,i);(o.value||(o.value={}))[n]=r.apply(this,arguments)}),function(o){return dt(o,i).value[n]}}function li(e,n){var r;return(typeof n=="number"?Rt:n instanceof $n?Ln:(r=$n(n))?(n=r,Ln):Gi)(e,n)}function is(e){return function(){this.removeAttribute(e)}}function os(e){return function(){this.removeAttributeNS(e.space,e.local)}}function as(e,n,r){var i,o=r+"",a;return function(){var s=this.getAttribute(e);return s===o?null:s===i?a:a=n(i=s,r)}}function ss(e,n,r){var i,o=r+"",a;return function(){var s=this.getAttributeNS(e.space,e.local);return s===o?null:s===i?a:a=n(i=s,r)}}function ls(e,n,r){var i,o,a;return function(){var s,l=r(this),u;return l==null?void this.removeAttribute(e):(s=this.getAttribute(e),u=l+"",s===u?null:s===i&&u===o?a:(o=u,a=n(i=s,l)))}}function us(e,n,r){var i,o,a;return function(){var s,l=r(this),u;return l==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),u=l+"",s===u?null:s===i&&u===o?a:(o=u,a=n(i=s,l)))}}function cs(e,n){var r=Le(e),i=r==="transform"?Ji:li;return this.attrTween(e,typeof n=="function"?(r.local?us:ls)(r,i,An(this,"attr."+e,n)):n==null?(r.local?os:is)(r):(r.local?ss:as)(r,i,n))}function fs(e,n){return function(r){this.setAttribute(e,n.call(this,r))}}function hs(e,n){return function(r){this.setAttributeNS(e.space,e.local,n.call(this,r))}}function ds(e,n){var r,i;function o(){var a=n.apply(this,arguments);return a!==i&&(r=(i=a)&&hs(e,a)),r}return o._value=n,o}function ps(e,n){var r,i;function o(){var a=n.apply(this,arguments);return a!==i&&(r=(i=a)&&fs(e,a)),r}return o._value=n,o}function gs(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 new Error;var i=Le(e);return this.tween(r,(i.local?ds:ps)(i,n))}function _s(e,n){return function(){Mn(this,e).delay=+n.apply(this,arguments)}}function vs(e,n){return n=+n,function(){Mn(this,e).delay=n}}function ys(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?_s:vs)(n,e)):dt(this.node(),n).delay}function ms(e,n){return function(){yt(this,e).duration=+n.apply(this,arguments)}}function bs(e,n){return n=+n,function(){yt(this,e).duration=n}}function ws(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?ms:bs)(n,e)):dt(this.node(),n).duration}function xs(e,n){if(typeof n!="function")throw new Error;return function(){yt(this,e).ease=n}}function ks(e){var n=this._id;return arguments.length?this.each(xs(n,e)):dt(this.node(),n).ease}function Ss(e,n){return function(){var r=n.apply(this,arguments);if(typeof r!="function")throw new Error;yt(this,e).ease=r}}function Cs(e){if(typeof e!="function")throw new Error;return this.each(Ss(this._id,e))}function Ms(e){typeof e!="function"&&(e=Gr(e));for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o)for(var a=n[o],s=a.length,l=i[o]=[],u,c=0;c<s;++c)(u=a[c])&&e.call(u,u.__data__,c,a)&&l.push(u);return new Tt(i,this._parents,this._name,this._id)}function As(e){if(e._id!==this._id)throw new Error;for(var n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),l=0;l<a;++l)for(var u=n[l],c=r[l],h=u.length,f=s[l]=new Array(h),d,p=0;p<h;++p)(d=u[p]||c[p])&&(f[p]=d);for(;l<i;++l)s[l]=n[l];return new Tt(s,this._parents,this._name,this._id)}function Ps(e){return(e+"").trim().split(/^|\s+/).every(function(n){var r=n.indexOf(".");return r>=0&&(n=n.slice(0,r)),!n||n==="start"})}function Ts(e,n,r){var i,o,a=Ps(n)?Mn:yt;return function(){var s=a(this,e),l=s.on;l!==i&&(o=(i=l).copy()).on(n,r),s.on=o}}function Es(e,n){var r=this._id;return arguments.length<2?dt(this.node(),r).on.on(e):this.each(Ts(r,e,n))}function Ns(e){return function(){var n=this.parentNode;for(var r in this.__transition)if(+r!==e)return;n&&n.removeChild(this)}}function zs(){return this.on("end.remove",Ns(this._id))}function Is(e){var n=this._name,r=this._id;typeof e!="function"&&(e=xn(e));for(var i=this._groups,o=i.length,a=new Array(o),s=0;s<o;++s)for(var l=i[s],u=l.length,c=a[s]=new Array(u),h,f,d=0;d<u;++d)(h=l[d])&&(f=e.call(h,h.__data__,d,l))&&("__data__"in h&&(f.__data__=h.__data__),c[d]=f,He(c[d],n,r,d,c,dt(h,r)));return new Tt(a,this._parents,n,r)}function Rs(e){var n=this._name,r=this._id;typeof e!="function"&&(e=Vr(e));for(var i=this._groups,o=i.length,a=[],s=[],l=0;l<o;++l)for(var u=i[l],c=u.length,h,f=0;f<c;++f)if(h=u[f]){for(var d=e.call(h,h.__data__,f,u),p,_=dt(h,r),b=0,y=d.length;b<y;++b)(p=d[b])&&He(p,n,r,b,d,_);a.push(d),s.push(h)}return new Tt(a,s,n,r)}var Os=he.prototype.constructor;function Ds(){return new Os(this._groups,this._parents)}function Fs(e,n){var r,i,o;return function(){var a=Ht(this,e),s=(this.style.removeProperty(e),Ht(this,e));return a===s?null:a===r&&s===i?o:o=n(r=a,i=s)}}function ui(e){return function(){this.style.removeProperty(e)}}function js(e,n,r){var i,o=r+"",a;return function(){var s=Ht(this,e);return s===o?null:s===i?a:a=n(i=s,r)}}function $s(e,n,r){var i,o,a;return function(){var s=Ht(this,e),l=r(this),u=l+"";return l==null&&(u=l=(this.style.removeProperty(e),Ht(this,e))),s===u?null:s===i&&u===o?a:(o=u,a=n(i=s,l))}}function Ls(e,n){var r,i,o,a="style."+n,s="end."+a,l;return function(){var u=yt(this,e),c=u.on,h=u.value[a]==null?l||(l=ui(n)):void 0;(c!==r||o!==h)&&(i=(r=c).copy()).on(s,o=h),u.on=i}}function Us(e,n,r){var i=(e+="")=="transform"?Qi:li;return n==null?this.styleTween(e,Fs(e,i)).on("end.style."+e,ui(e)):typeof n=="function"?this.styleTween(e,$s(e,i,An(this,"style."+e,n))).each(Ls(this._id,e)):this.styleTween(e,js(e,i,n),r).on("end.style."+e,null)}function Hs(e,n,r){return function(i){this.style.setProperty(e,n.call(this,i),r)}}function Bs(e,n,r){var i,o;function a(){var s=n.apply(this,arguments);return s!==o&&(i=(o=s)&&Hs(e,s,r)),i}return a._value=n,a}function Ws(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 new Error;return this.tween(i,Bs(e,n,r??""))}function qs(e){return function(){this.textContent=e}}function Vs(e){return function(){var n=e(this);this.textContent=n??""}}function Gs(e){return this.tween("text",typeof e=="function"?Vs(An(this,"text",e)):qs(e==null?"":e+""))}function Xs(e){return function(n){this.textContent=e.call(this,n)}}function Ys(e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&Xs(o)),n}return i._value=e,i}function Ks(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 new Error;return this.tween(n,Ys(e))}function Zs(){for(var e=this._name,n=this._id,r=ci(),i=this._groups,o=i.length,a=0;a<o;++a)for(var s=i[a],l=s.length,u,c=0;c<l;++c)if(u=s[c]){var h=dt(u,n);He(u,e,r,c,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Tt(i,this._parents,e,r)}function Qs(){var e,n,r=this,i=r._id,o=r.size();return new Promise(function(a,s){var l={value:s},u={value:function(){--o===0&&a()}};r.each(function(){var c=yt(this,i),h=c.on;h!==e&&(n=(e=h).copy(),n._.cancel.push(l),n._.interrupt.push(l),n._.end.push(u)),c.on=n}),o===0&&a()})}var Js=0;function Tt(e,n,r,i){this._groups=e,this._parents=n,this._name=r,this._id=i}function ci(){return++Js}var wt=he.prototype;Tt.prototype={constructor:Tt,select:Is,selectAll:Rs,selectChild:wt.selectChild,selectChildren:wt.selectChildren,filter:Ms,merge:As,selection:Ds,transition:Zs,call:wt.call,nodes:wt.nodes,node:wt.node,size:wt.size,empty:wt.empty,each:wt.each,on:Es,attr:cs,attrTween:gs,style:Us,styleTween:Ws,text:Gs,textTween:Ks,remove:zs,tween:rs,delay:ys,duration:ws,ease:ks,easeVarying:Cs,end:Qs,[Symbol.iterator]:wt[Symbol.iterator]};function tl(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var el={time:null,delay:0,duration:250,ease:tl};function nl(e,n){for(var r;!(r=e.__transition)||!(r=r[n]);)if(!(e=e.parentNode))throw new Error(`transition ${n} not found`);return r}function rl(e){var n,r;e instanceof Tt?(n=e._id,e=e._name):(n=ci(),(r=el).time=Sn(),e=e==null?null:e+"");for(var i=this._groups,o=i.length,a=0;a<o;++a)for(var s=i[a],l=s.length,u,c=0;c<l;++c)(u=s[c])&&He(u,e,n,c,s,r||nl(u,n));return new Tt(i,this._parents,e,n)}he.prototype.interrupt=ts;he.prototype.transition=rl;const ve=e=>()=>e;function il(e,{sourceEvent:n,target:r,transform:i,dispatch:o}){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:o}})}function Mt(e,n,r){this.k=e,this.x=n,this.y=r}Mt.prototype={constructor:Mt,scale:function(e){return e===1?this:new Mt(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new Mt(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 Pn=new Mt(1,0,0);pt.prototype=Mt.prototype;function pt(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Pn;return e.__zoom}function Xe(e){e.stopImmediatePropagation()}function Gt(e){e.preventDefault(),e.stopImmediatePropagation()}function ol(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function al(){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 Zn(){return this.__zoom||Pn}function sl(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function ll(){return navigator.maxTouchPoints||"ontouchstart"in this}function ul(e,n,r){var i=e.invertX(n[0][0])-r[0][0],o=e.invertX(n[1][0])-r[1][0],a=e.invertY(n[0][1])-r[0][1],s=e.invertY(n[1][1])-r[1][1];return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),s>a?(a+s)/2:Math.min(0,a)||Math.max(0,s))}function cl(){var e=ol,n=al,r=ul,i=sl,o=ll,a=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,u=ro,c=de("start","zoom","end"),h,f,d,p=500,_=150,b=0,y=10;function g(C){C.property("__zoom",Zn).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",N).on("dblclick.zoom",E).filter(o).on("touchstart.zoom",I).on("touchmove.zoom",R).on("touchend.zoom touchcancel.zoom",j).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}g.transform=function(C,z,A,O){var F=C.selection?C.selection():C;F.property("__zoom",Zn),C!==F?v(C,z,A,O):F.interrupt().each(function(){S(this,arguments).event(O).start().zoom(null,typeof z=="function"?z.apply(this,arguments):z).end()})},g.scaleBy=function(C,z,A,O){g.scaleTo(C,function(){var F=this.__zoom.k,$=typeof z=="function"?z.apply(this,arguments):z;return F*$},A,O)},g.scaleTo=function(C,z,A,O){g.transform(C,function(){var F=n.apply(this,arguments),$=this.__zoom,L=A==null?m(F):typeof A=="function"?A.apply(this,arguments):A,U=$.invert(L),H=typeof z=="function"?z.apply(this,arguments):z;return r(x(w($,H),L,U),F,s)},A,O)},g.translateBy=function(C,z,A,O){g.transform(C,function(){return r(this.__zoom.translate(typeof z=="function"?z.apply(this,arguments):z,typeof A=="function"?A.apply(this,arguments):A),n.apply(this,arguments),s)},null,O)},g.translateTo=function(C,z,A,O,F){g.transform(C,function(){var $=n.apply(this,arguments),L=this.__zoom,U=O==null?m($):typeof O=="function"?O.apply(this,arguments):O;return r(Pn.translate(U[0],U[1]).scale(L.k).translate(typeof z=="function"?-z.apply(this,arguments):-z,typeof A=="function"?-A.apply(this,arguments):-A),$,s)},O,F)};function w(C,z){return z=Math.max(a[0],Math.min(a[1],z)),z===C.k?C:new Mt(z,C.x,C.y)}function x(C,z,A){var O=z[0]-A[0]*C.k,F=z[1]-A[1]*C.k;return O===C.x&&F===C.y?C:new Mt(C.k,O,F)}function m(C){return[(+C[0][0]+ +C[1][0])/2,(+C[0][1]+ +C[1][1])/2]}function v(C,z,A,O){C.on("start.zoom",function(){S(this,arguments).event(O).start()}).on("interrupt.zoom end.zoom",function(){S(this,arguments).event(O).end()}).tween("zoom",function(){var F=this,$=arguments,L=S(F,$).event(O),U=n.apply(F,$),H=A==null?m(U):typeof A=="function"?A.apply(F,$):A,Y=Math.max(U[1][0]-U[0][0],U[1][1]-U[0][1]),X=F.__zoom,ut=typeof z=="function"?z.apply(F,$):z,mt=u(X.invert(H).concat(Y/X.k),ut.invert(H).concat(Y/ut.k));return function(ct){if(ct===1)ct=ut;else{var bt=mt(ct),Ve=Y/bt[2];ct=new Mt(Ve,H[0]-bt[0]*Ve,H[1]-bt[1]*Ve)}L.zoom(null,ct)}})}function S(C,z,A){return!A&&C.__zooming||new k(C,z)}function k(C,z){this.that=C,this.args=z,this.active=0,this.sourceEvent=null,this.extent=n.apply(C,z),this.taps=0}k.prototype={event:function(C){return C&&(this.sourceEvent=C),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(C,z){return this.mouse&&C!=="mouse"&&(this.mouse[1]=z.invert(this.mouse[0])),this.touch0&&C!=="touch"&&(this.touch0[1]=z.invert(this.touch0[0])),this.touch1&&C!=="touch"&&(this.touch1[1]=z.invert(this.touch1[0])),this.that.__zoom=z,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(C){var z=st(this.that).datum();c.call(C,this.that,new il(C,{sourceEvent:this.sourceEvent,target:g,transform:this.that.__zoom,dispatch:c}),z)}};function M(C,...z){if(!e.apply(this,arguments))return;var A=S(this,z).event(C),O=this.__zoom,F=Math.max(a[0],Math.min(a[1],O.k*Math.pow(2,i.apply(this,arguments)))),$=gt(C);if(A.wheel)(A.mouse[0][0]!==$[0]||A.mouse[0][1]!==$[1])&&(A.mouse[1]=O.invert(A.mouse[0]=$)),clearTimeout(A.wheel);else{if(O.k===F)return;A.mouse=[$,O.invert($)],Se(this),A.start()}Gt(C),A.wheel=setTimeout(L,_),A.zoom("mouse",r(x(w(O,F),A.mouse[0],A.mouse[1]),A.extent,s));function L(){A.wheel=null,A.end()}}function N(C,...z){if(d||!e.apply(this,arguments))return;var A=C.currentTarget,O=S(this,z,!0).event(C),F=st(C.view).on("mousemove.zoom",H,!0).on("mouseup.zoom",Y,!0),$=gt(C,A),L=C.clientX,U=C.clientY;ri(C.view),Xe(C),O.mouse=[$,this.__zoom.invert($)],Se(this),O.start();function H(X){if(Gt(X),!O.moved){var ut=X.clientX-L,mt=X.clientY-U;O.moved=ut*ut+mt*mt>b}O.event(X).zoom("mouse",r(x(O.that.__zoom,O.mouse[0]=gt(X,A),O.mouse[1]),O.extent,s))}function Y(X){F.on("mousemove.zoom mouseup.zoom",null),ii(X.view,O.moved),Gt(X),O.event(X).end()}}function E(C,...z){if(e.apply(this,arguments)){var A=this.__zoom,O=gt(C.changedTouches?C.changedTouches[0]:C,this),F=A.invert(O),$=A.k*(C.shiftKey?.5:2),L=r(x(w(A,$),O,F),n.apply(this,z),s);Gt(C),l>0?st(this).transition().duration(l).call(v,L,O,C):st(this).call(g.transform,L,O,C)}}function I(C,...z){if(e.apply(this,arguments)){var A=C.touches,O=A.length,F=S(this,z,C.changedTouches.length===O).event(C),$,L,U,H;for(Xe(C),L=0;L<O;++L)U=A[L],H=gt(U,this),H=[H,this.__zoom.invert(H),U.identifier],F.touch0?!F.touch1&&F.touch0[2]!==H[2]&&(F.touch1=H,F.taps=0):(F.touch0=H,$=!0,F.taps=1+!!h);h&&(h=clearTimeout(h)),$&&(F.taps<2&&(f=H[0],h=setTimeout(function(){h=null},p)),Se(this),F.start())}}function R(C,...z){if(this.__zooming){var A=S(this,z).event(C),O=C.changedTouches,F=O.length,$,L,U,H;for(Gt(C),$=0;$<F;++$)L=O[$],U=gt(L,this),A.touch0&&A.touch0[2]===L.identifier?A.touch0[0]=U:A.touch1&&A.touch1[2]===L.identifier&&(A.touch1[0]=U);if(L=A.that.__zoom,A.touch1){var Y=A.touch0[0],X=A.touch0[1],ut=A.touch1[0],mt=A.touch1[1],ct=(ct=ut[0]-Y[0])*ct+(ct=ut[1]-Y[1])*ct,bt=(bt=mt[0]-X[0])*bt+(bt=mt[1]-X[1])*bt;L=w(L,Math.sqrt(ct/bt)),U=[(Y[0]+ut[0])/2,(Y[1]+ut[1])/2],H=[(X[0]+mt[0])/2,(X[1]+mt[1])/2]}else if(A.touch0)U=A.touch0[0],H=A.touch0[1];else return;A.zoom("touch",r(x(L,U,H),A.extent,s))}}function j(C,...z){if(this.__zooming){var A=S(this,z).event(C),O=C.changedTouches,F=O.length,$,L;for(Xe(C),d&&clearTimeout(d),d=setTimeout(function(){d=null},p),$=0;$<F;++$)L=O[$],A.touch0&&A.touch0[2]===L.identifier?delete A.touch0:A.touch1&&A.touch1[2]===L.identifier&&delete A.touch1;if(A.touch1&&!A.touch0&&(A.touch0=A.touch1,delete A.touch1),A.touch0)A.touch0[1]=this.__zoom.invert(A.touch0[0]);else if(A.end(),A.taps===2&&(L=gt(L,this),Math.hypot(f[0]-L[0],f[1]-L[1])<y)){var U=st(this).on("dblclick.zoom");U&&U.apply(this,arguments)}}}return g.wheelDelta=function(C){return arguments.length?(i=typeof C=="function"?C:ve(+C),g):i},g.filter=function(C){return arguments.length?(e=typeof C=="function"?C:ve(!!C),g):e},g.touchable=function(C){return arguments.length?(o=typeof C=="function"?C:ve(!!C),g):o},g.extent=function(C){return arguments.length?(n=typeof C=="function"?C:ve([[+C[0][0],+C[0][1]],[+C[1][0],+C[1][1]]]),g):n},g.scaleExtent=function(C){return arguments.length?(a[0]=+C[0],a[1]=+C[1],g):[a[0],a[1]]},g.translateExtent=function(C){return arguments.length?(s[0][0]=+C[0][0],s[1][0]=+C[1][0],s[0][1]=+C[0][1],s[1][1]=+C[1][1],g):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},g.constrain=function(C){return arguments.length?(r=C,g):r},g.duration=function(C){return arguments.length?(l=+C,g):l},g.interpolate=function(C){return arguments.length?(u=C,g):u},g.on=function(){var C=c.on.apply(c,arguments);return C===c?g:C},g.clickDistance=function(C){return arguments.length?(b=(C=+C)*C,g):Math.sqrt(b)},g.tapDistance=function(C){return arguments.length?(y=+C,g):y},g}var fl=typeof global=="object"&&global&&global.Object===Object&&global,hl=typeof self=="object"&&self&&self.Object===Object&&self,fi=fl||hl||Function("return this")(),Ne=fi.Symbol,hi=Object.prototype,dl=hi.hasOwnProperty,pl=hi.toString,Xt=Ne?Ne.toStringTag:void 0;function gl(e){var n=dl.call(e,Xt),r=e[Xt];try{e[Xt]=void 0;var i=!0}catch{}var o=pl.call(e);return i&&(n?e[Xt]=r:delete e[Xt]),o}var _l=Object.prototype,vl=_l.toString;function yl(e){return vl.call(e)}var ml="[object Null]",bl="[object Undefined]",Qn=Ne?Ne.toStringTag:void 0;function wl(e){return e==null?e===void 0?bl:ml:Qn&&Qn in Object(e)?gl(e):yl(e)}function xl(e){return e!=null&&typeof e=="object"}var kl="[object Symbol]";function Sl(e){return typeof e=="symbol"||xl(e)&&wl(e)==kl}var Cl=/\s/;function Ml(e){for(var n=e.length;n--&&Cl.test(e.charAt(n)););return n}var Al=/^\s+/;function Pl(e){return e&&e.slice(0,Ml(e)+1).replace(Al,"")}function ze(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var Jn=NaN,Tl=/^[-+]0x[0-9a-f]+$/i,El=/^0b[01]+$/i,Nl=/^0o[0-7]+$/i,zl=parseInt;function tr(e){if(typeof e=="number")return e;if(Sl(e))return Jn;if(ze(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=ze(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=Pl(e);var r=El.test(e);return r||Nl.test(e)?zl(e.slice(2),r?2:8):Tl.test(e)?Jn:+e}var Ye=function(){return fi.Date.now()},Il="Expected a function",Rl=Math.max,Ol=Math.min;function di(e,n,r){var i,o,a,s,l,u,c=0,h=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(Il);n=tr(n)||0,ze(r)&&(h=!!r.leading,f="maxWait"in r,a=f?Rl(tr(r.maxWait)||0,n):a,d="trailing"in r?!!r.trailing:d);function p(S){var k=i,M=o;return i=o=void 0,c=S,s=e.apply(M,k),s}function _(S){return c=S,l=setTimeout(g,n),h?p(S):s}function b(S){var k=S-u,M=S-c,N=n-k;return f?Ol(N,a-M):N}function y(S){var k=S-u,M=S-c;return u===void 0||k>=n||k<0||f&&M>=a}function g(){var S=Ye();if(y(S))return w(S);l=setTimeout(g,b(S))}function w(S){return l=void 0,d&&i?p(S):(i=o=void 0,s)}function x(){l!==void 0&&clearTimeout(l),c=0,i=u=o=l=void 0}function m(){return l===void 0?s:w(Ye())}function v(){var S=Ye(),k=y(S);if(i=arguments,o=this,u=S,k){if(l===void 0)return _(u);if(f)return clearTimeout(l),l=setTimeout(g,n),p(u)}return l===void 0&&(l=setTimeout(g,n)),s}return v.cancel=x,v.flush=m,v}var Dl="Expected a function";function Fl(e,n,r){var i=!0,o=!0;if(typeof e!="function")throw new TypeError(Dl);return ze(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),di(e,n,{leading:i,maxWait:n,trailing:o})}var Ot=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:Math.pow(1024,e-1)},Out:function(e){return e===1?1:1-Math.pow(2,-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(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:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:Math.pow(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*Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*Math.pow(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=2.5949095;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-Ot.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?Ot.Bounce.In(e*2)*.5:Ot.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e<Number.EPSILON?Number.EPSILON:e,e=e>1e4?1e4:e,{In:function(n){return Math.pow(n,e)},Out:function(n){return 1-Math.pow(1-n,e)},InOut:function(n){return n<.5?Math.pow(n*2,e)/2:(1-Math.pow(2-n*2,e))/2+.5}}}}),ne=function(){return performance.now()},pi=(function(){function e(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,n)}return e.prototype.getAll=function(){var n=this;return Object.keys(this._tweens).map(function(r){return n._tweens[r]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];for(var o=0,a=r;o<a.length;o++){var s=a[o];(n=s._group)===null||n===void 0||n.remove(s),s._group=this,this._tweens[s.getId()]=s,this._tweensAddedDuringUpdate[s.getId()]=s}},e.prototype.remove=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(var i=0,o=n;i<o.length;i++){var a=o[i];a._group=void 0,delete this._tweens[a.getId()],delete this._tweensAddedDuringUpdate[a.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(n){return!n.isPlaying()})},e.prototype.update=function(n,r){n===void 0&&(n=ne()),r===void 0&&(r=!0);var i=Object.keys(this._tweens);if(i.length!==0)for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var o=0;o<i.length;o++){var a=this._tweens[i[o]],s=!r;a&&a.update(n,s)===!1&&!r&&this.remove(a)}i=Object.keys(this._tweensAddedDuringUpdate)}},e})(),fn={Linear:function(e,n){var r=e.length-1,i=r*n,o=Math.floor(i),a=fn.Utils.Linear;return n<0?a(e[0],e[1],i):n>1?a(e[r],e[r-1],r-i):a(e[o],e[o+1>r?r:o+1],i-o)},Utils:{Linear:function(e,n,r){return(n-e)*r+e}}},gi=(function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e})(),hn=new pi,er=(function(){function e(n,r){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=Ot.Linear.None,this._interpolationFunction=fn.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=gi.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=n,typeof r=="object"?(this._group=r,r.add(this)):r===!0&&(this._group=hn,hn.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(n,r){if(r===void 0&&(r=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=n,this._propertiesAreSetUp=!1,this._duration=r<0?0:r,this},e.prototype.duration=function(n){return n===void 0&&(n=1e3),this._duration=n<0?0:n,this},e.prototype.dynamic=function(n){return n===void 0&&(n=!1),this._isDynamic=n,this},e.prototype.start=function(n,r){if(n===void 0&&(n=ne()),r===void 0&&(r=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var i in this._valuesStartRepeat)this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=n,this._startTime+=this._delayTime,!this._propertiesAreSetUp||r){if(this._propertiesAreSetUp=!0,!this._isDynamic){var o={};for(var a in this._valuesEnd)o[a]=this._valuesEnd[a];this._valuesEnd=o}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,r)}return this},e.prototype.startFromCurrentValues=function(n){return this.start(n,!0)},e.prototype._setupProperties=function(n,r,i,o,a){for(var s in i){var l=n[s],u=Array.isArray(l),c=u?"array":typeof l,h=!u&&Array.isArray(i[s]);if(!(c==="undefined"||c==="function")){if(h){var f=i[s];if(f.length===0)continue;for(var d=[l],p=0,_=f.length;p<_;p+=1){var b=this._handleRelativeValue(l,f[p]);if(isNaN(b)){h=!1,console.warn("Found invalid interpolation list. Skipping.");break}d.push(b)}h&&(i[s]=d)}if((c==="object"||u)&&l&&!h){r[s]=u?[]:{};var y=l;for(var g in y)r[s][g]=y[g];o[s]=u?[]:{};var f=i[s];if(!this._isDynamic){var w={};for(var g in f)w[g]=f[g];i[s]=f=w}this._setupProperties(y,r[s],f,o[s],a)}else(typeof r[s]>"u"||a)&&(r[s]=l),u||(r[s]*=1),h?o[s]=i[s].slice().reverse():o[s]=r[s]||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(n){return n===void 0&&(n=ne()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=n,this)},e.prototype.resume=function(n){return n===void 0&&(n=ne()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=n-this._pauseStart,this._pauseStart=0,this)},e.prototype.stopChainedTweens=function(){for(var n=0,r=this._chainedTweens.length;n<r;n++)this._chainedTweens[n].stop();return this},e.prototype.group=function(n){return n?(n.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},e.prototype.remove=function(){var n;return(n=this._group)===null||n===void 0||n.remove(this),this},e.prototype.delay=function(n){return n===void 0&&(n=0),this._delayTime=n,this},e.prototype.repeat=function(n){return n===void 0&&(n=0),this._initialRepeat=n,this._repeat=n,this},e.prototype.repeatDelay=function(n){return this._repeatDelayTime=n,this},e.prototype.yoyo=function(n){return n===void 0&&(n=!1),this._yoyo=n,this},e.prototype.easing=function(n){return n===void 0&&(n=Ot.Linear.None),this._easingFunction=n,this},e.prototype.interpolation=function(n){return n===void 0&&(n=fn.Linear),this._interpolationFunction=n,this},e.prototype.chain=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return this._chainedTweens=n,this},e.prototype.onStart=function(n){return this._onStartCallback=n,this},e.prototype.onEveryStart=function(n){return this._onEveryStartCallback=n,this},e.prototype.onUpdate=function(n){return this._onUpdateCallback=n,this},e.prototype.onRepeat=function(n){return this._onRepeatCallback=n,this},e.prototype.onComplete=function(n){return this._onCompleteCallback=n,this},e.prototype.onStop=function(n){return this._onStopCallback=n,this},e.prototype.update=function(n,r){var i=this,o;if(n===void 0&&(n=ne()),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 s=n-this._startTime,l=this._duration+((o=this._repeatDelayTime)!==null&&o!==void 0?o:this._delayTime),u=this._duration+this._repeat*l,c=function(){if(i._duration===0||s>u)return 1;var b=Math.trunc(s/l),y=s-b*l,g=Math.min(y/i._duration,1);return g===0&&s===i._duration?1:g},h=c(),f=this._easingFunction(h);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,f),this._onUpdateCallback&&this._onUpdateCallback(this._object,h),this._duration===0||s>=this._duration)if(this._repeat>0){var d=Math.min(Math.trunc((s-this._duration)/l)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=d);for(a in 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+=l*d,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var p=0,_=this._chainedTweens.length;p<_;p++)this._chainedTweens[p].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(n,r,i,o){for(var a in i)if(r[a]!==void 0){var s=r[a]||0,l=i[a],u=Array.isArray(n[a]),c=Array.isArray(l),h=!u&&c;h?n[a]=this._interpolationFunction(l,o):typeof l=="object"&&l?this._updateProperties(n[a],s,l,o):(l=this._handleRelativeValue(s,l),typeof l=="number"&&(n[a]=s+(l-s)*o))}},e.prototype._handleRelativeValue=function(n,r){return typeof r!="string"?r:r.charAt(0)==="+"||r.charAt(0)==="-"?n+parseFloat(r):parseFloat(r)},e.prototype._swapEndStartRepeatValues=function(n){var r=this._valuesStartRepeat[n],i=this._valuesEnd[n];typeof i=="string"?this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(i):this._valuesStartRepeat[n]=this._valuesEnd[n],this._valuesEnd[n]=r},e.autoStartOnUpdate=!1,e})();gi.nextId;var vt=hn;vt.getAll.bind(vt);vt.removeAll.bind(vt);vt.add.bind(vt);vt.remove.bind(vt);vt.update.bind(vt);function nr(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 jl(e){if(Array.isArray(e))return e}function $l(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Ll(e,n,r){return Object.defineProperty(e,"prototype",{writable:!1}),e}function Ul(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,l=[],u=!0,c=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(u=(i=a.call(r)).done)&&(l.push(i.value),l.length!==n);u=!0);}catch(h){c=!0,o=h}finally{try{if(!u&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw o}}return l}}function Hl(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bl(e,n){return jl(e)||Ul(e,n)||Wl(e,n)||Hl()}function Wl(e,n){if(e){if(typeof e=="string")return nr(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)?nr(e,n):void 0}}var ql=Ll(function e(n,r){var i=r.default,o=i===void 0?null:i,a=r.triggerUpdate,s=a===void 0?!0:a,l=r.onChange,u=l===void 0?function(c,h){}:l;$l(this,e),this.name=n,this.defaultVal=o,this.triggerUpdate=s,this.onChange=u});function Tn(e){var n=e.stateInit,r=n===void 0?function(){return{}}:n,i=e.props,o=i===void 0?{}:i,a=e.methods,s=a===void 0?{}:a,l=e.aliases,u=l===void 0?{}:l,c=e.init,h=c===void 0?function(){}:c,f=e.update,d=f===void 0?function(){}:f,p=Object.keys(o).map(function(_){return new ql(_,o[_])});return function _(){for(var b=arguments.length,y=new Array(b),g=0;g<b;g++)y[g]=arguments[g];var w=!!(this instanceof _&&this.constructor),x=w?y.shift():void 0,m=y[0],v=m===void 0?{}:m,S=Object.assign({},r instanceof Function?r(v):r,{initialised:!1}),k={};function M(I){return N(I,v),E(),M}var N=function(R,j){h.call(M,R,S,j),S.initialised=!0},E=di(function(){S.initialised&&(d.call(M,S,k),k={})},1);return p.forEach(function(I){M[I.name]=R(I);function R(j){var C=j.name,z=j.triggerUpdate,A=z===void 0?!1:z,O=j.onChange,F=O===void 0?function(U,H){}:O,$=j.defaultVal,L=$===void 0?null:$;return function(U){var H=S[C];if(!arguments.length)return H;var Y=U===void 0?L:U;return S[C]=Y,F.call(M,Y,S,H),!k.hasOwnProperty(C)&&(k[C]=H),A&&E(),M}}}),Object.keys(s).forEach(function(I){M[I]=function(){for(var R,j=arguments.length,C=new Array(j),z=0;z<j;z++)C[z]=arguments[z];return(R=s[I]).call.apply(R,[M,S].concat(C))}}),Object.entries(u).forEach(function(I){var R=Bl(I,2),j=R[0],C=R[1];return M[j]=M[C]}),M.resetProps=function(){return p.forEach(function(I){M[I.name](I.defaultVal)}),M},M.resetProps(),S._rerender=E,w&&x&&M(x),M}}var B=(function(e){return typeof e=="function"?e:typeof e=="string"?function(n){return n[e]}:function(n){return e}});function Ie(e){"@babel/helpers - typeof";return Ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ie(e)}var Vl=/^\s+/,Gl=/\s+$/;function D(e,n){if(e=e||"",n=n||{},e instanceof D)return e;if(!(this instanceof D))return new D(e,n);var r=Xl(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}D.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 n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},getLuminance:function(){var n=this.toRgb(),r,i,o,a,s,l;return r=n.r/255,i=n.g/255,o=n.b/255,r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),i<=.03928?s=i/12.92:s=Math.pow((i+.055)/1.055,2.4),o<=.03928?l=o/12.92:l=Math.pow((o+.055)/1.055,2.4),.2126*a+.7152*s+.0722*l},setAlpha:function(n){return this._a=_i(n),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var n=ir(this._r,this._g,this._b);return{h:n.h*360,s:n.s,v:n.v,a:this._a}},toHsvString:function(){var n=ir(this._r,this._g,this._b),r=Math.round(n.h*360),i=Math.round(n.s*100),o=Math.round(n.v*100);return this._a==1?"hsv("+r+", "+i+"%, "+o+"%)":"hsva("+r+", "+i+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var n=rr(this._r,this._g,this._b);return{h:n.h*360,s:n.s,l:n.l,a:this._a}},toHslString:function(){var n=rr(this._r,this._g,this._b),r=Math.round(n.h*360),i=Math.round(n.s*100),o=Math.round(n.l*100);return this._a==1?"hsl("+r+", "+i+"%, "+o+"%)":"hsla("+r+", "+i+"%, "+o+"%, "+this._roundA+")"},toHex:function(n){return or(this._r,this._g,this._b,n)},toHexString:function(n){return"#"+this.toHex(n)},toHex8:function(n){return Ql(this._r,this._g,this._b,this._a,n)},toHex8String:function(n){return"#"+this.toHex8(n)},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(V(this._r,255)*100)+"%",g:Math.round(V(this._g,255)*100)+"%",b:Math.round(V(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(V(this._r,255)*100)+"%, "+Math.round(V(this._g,255)*100)+"%, "+Math.round(V(this._b,255)*100)+"%)":"rgba("+Math.round(V(this._r,255)*100)+"%, "+Math.round(V(this._g,255)*100)+"%, "+Math.round(V(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:cu[or(this._r,this._g,this._b,!0)]||!1},toFilter:function(n){var r="#"+ar(this._r,this._g,this._b,this._a),i=r,o=this._gradientType?"GradientType = 1, ":"";if(n){var a=D(n);i="#"+ar(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+r+",endColorstr="+i+")"},toString:function(n){var r=!!n;n=n||this._format;var i=!1,o=this._a<1&&this._a>=0,a=!r&&o&&(n==="hex"||n==="hex6"||n==="hex3"||n==="hex4"||n==="hex8"||n==="name");return a?n==="name"&&this._a===0?this.toName():this.toRgbString():(n==="rgb"&&(i=this.toRgbString()),n==="prgb"&&(i=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(i=this.toHexString()),n==="hex3"&&(i=this.toHexString(!0)),n==="hex4"&&(i=this.toHex8String(!0)),n==="hex8"&&(i=this.toHex8String()),n==="name"&&(i=this.toName()),n==="hsl"&&(i=this.toHslString()),n==="hsv"&&(i=this.toHsvString()),i||this.toHexString())},clone:function(){return D(this.toString())},_applyModification:function(n,r){var i=n.apply(null,[this].concat([].slice.call(r)));return this._r=i._r,this._g=i._g,this._b=i._b,this.setAlpha(i._a),this},lighten:function(){return this._applyModification(nu,arguments)},brighten:function(){return this._applyModification(ru,arguments)},darken:function(){return this._applyModification(iu,arguments)},desaturate:function(){return this._applyModification(Jl,arguments)},saturate:function(){return this._applyModification(tu,arguments)},greyscale:function(){return this._applyModification(eu,arguments)},spin:function(){return this._applyModification(ou,arguments)},_applyCombination:function(n,r){return n.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(lu,arguments)},complement:function(){return this._applyCombination(au,arguments)},monochromatic:function(){return this._applyCombination(uu,arguments)},splitcomplement:function(){return this._applyCombination(su,arguments)},triad:function(){return this._applyCombination(sr,[3])},tetrad:function(){return this._applyCombination(sr,[4])}};D.fromRatio=function(e,n){if(Ie(e)=="object"){var r={};for(var i in e)e.hasOwnProperty(i)&&(i==="a"?r[i]=e[i]:r[i]=re(e[i]));e=r}return D(e,n)};function Xl(e){var n={r:0,g:0,b:0},r=1,i=null,o=null,a=null,s=!1,l=!1;return typeof e=="string"&&(e=pu(e)),Ie(e)=="object"&&(xt(e.r)&&xt(e.g)&&xt(e.b)?(n=Yl(e.r,e.g,e.b),s=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):xt(e.h)&&xt(e.s)&&xt(e.v)?(i=re(e.s),o=re(e.v),n=Zl(e.h,i,o),s=!0,l="hsv"):xt(e.h)&&xt(e.s)&&xt(e.l)&&(i=re(e.s),a=re(e.l),n=Kl(e.h,i,a),s=!0,l="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=_i(r),{ok:s,format:e.format||l,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 Yl(e,n,r){return{r:V(e,255)*255,g:V(n,255)*255,b:V(r,255)*255}}function rr(e,n,r){e=V(e,255),n=V(n,255),r=V(r,255);var i=Math.max(e,n,r),o=Math.min(e,n,r),a,s,l=(i+o)/2;if(i==o)a=s=0;else{var u=i-o;switch(s=l>.5?u/(2-i-o):u/(i+o),i){case e:a=(n-r)/u+(n<r?6:0);break;case n:a=(r-e)/u+2;break;case r:a=(e-n)/u+4;break}a/=6}return{h:a,s,l}}function Kl(e,n,r){var i,o,a;e=V(e,360),n=V(n,100),r=V(r,100);function s(c,h,f){return f<0&&(f+=1),f>1&&(f-=1),f<1/6?c+(h-c)*6*f:f<1/2?h:f<2/3?c+(h-c)*(2/3-f)*6:c}if(n===0)i=o=a=r;else{var l=r<.5?r*(1+n):r+n-r*n,u=2*r-l;i=s(u,l,e+1/3),o=s(u,l,e),a=s(u,l,e-1/3)}return{r:i*255,g:o*255,b:a*255}}function ir(e,n,r){e=V(e,255),n=V(n,255),r=V(r,255);var i=Math.max(e,n,r),o=Math.min(e,n,r),a,s,l=i,u=i-o;if(s=i===0?0:u/i,i==o)a=0;else{switch(i){case e:a=(n-r)/u+(n<r?6:0);break;case n:a=(r-e)/u+2;break;case r:a=(e-n)/u+4;break}a/=6}return{h:a,s,v:l}}function Zl(e,n,r){e=V(e,360)*6,n=V(n,100),r=V(r,100);var i=Math.floor(e),o=e-i,a=r*(1-n),s=r*(1-o*n),l=r*(1-(1-o)*n),u=i%6,c=[r,s,a,a,l,r][u],h=[l,r,r,s,a,a][u],f=[a,a,l,r,r,s][u];return{r:c*255,g:h*255,b:f*255}}function or(e,n,r,i){var o=[ht(Math.round(e).toString(16)),ht(Math.round(n).toString(16)),ht(Math.round(r).toString(16))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function Ql(e,n,r,i,o){var a=[ht(Math.round(e).toString(16)),ht(Math.round(n).toString(16)),ht(Math.round(r).toString(16)),ht(vi(i))];return o&&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[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function ar(e,n,r,i){var o=[ht(vi(i)),ht(Math.round(e).toString(16)),ht(Math.round(n).toString(16)),ht(Math.round(r).toString(16))];return o.join("")}D.equals=function(e,n){return!e||!n?!1:D(e).toRgbString()==D(n).toRgbString()};D.random=function(){return D.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function Jl(e,n){n=n===0?0:n||10;var r=D(e).toHsl();return r.s-=n/100,r.s=Be(r.s),D(r)}function tu(e,n){n=n===0?0:n||10;var r=D(e).toHsl();return r.s+=n/100,r.s=Be(r.s),D(r)}function eu(e){return D(e).desaturate(100)}function nu(e,n){n=n===0?0:n||10;var r=D(e).toHsl();return r.l+=n/100,r.l=Be(r.l),D(r)}function ru(e,n){n=n===0?0:n||10;var r=D(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)))),D(r)}function iu(e,n){n=n===0?0:n||10;var r=D(e).toHsl();return r.l-=n/100,r.l=Be(r.l),D(r)}function ou(e,n){var r=D(e).toHsl(),i=(r.h+n)%360;return r.h=i<0?360+i:i,D(r)}function au(e){var n=D(e).toHsl();return n.h=(n.h+180)%360,D(n)}function sr(e,n){if(isNaN(n)||n<=0)throw new Error("Argument to polyad must be a positive number");for(var r=D(e).toHsl(),i=[D(e)],o=360/n,a=1;a<n;a++)i.push(D({h:(r.h+a*o)%360,s:r.s,l:r.l}));return i}function su(e){var n=D(e).toHsl(),r=n.h;return[D(e),D({h:(r+72)%360,s:n.s,l:n.l}),D({h:(r+216)%360,s:n.s,l:n.l})]}function lu(e,n,r){n=n||6,r=r||30;var i=D(e).toHsl(),o=360/r,a=[D(e)];for(i.h=(i.h-(o*n>>1)+720)%360;--n;)i.h=(i.h+o)%360,a.push(D(i));return a}function uu(e,n){n=n||6;for(var r=D(e).toHsv(),i=r.h,o=r.s,a=r.v,s=[],l=1/n;n--;)s.push(D({h:i,s:o,v:a})),a=(a+l)%1;return s}D.mix=function(e,n,r){r=r===0?0:r||50;var i=D(e).toRgb(),o=D(n).toRgb(),a=r/100,s={r:(o.r-i.r)*a+i.r,g:(o.g-i.g)*a+i.g,b:(o.b-i.b)*a+i.b,a:(o.a-i.a)*a+i.a};return D(s)};D.readability=function(e,n){var r=D(e),i=D(n);return(Math.max(r.getLuminance(),i.getLuminance())+.05)/(Math.min(r.getLuminance(),i.getLuminance())+.05)};D.isReadable=function(e,n,r){var i=D.readability(e,n),o,a;switch(a=!1,o=gu(r),o.level+o.size){case"AAsmall":case"AAAlarge":a=i>=4.5;break;case"AAlarge":a=i>=3;break;case"AAAsmall":a=i>=7;break}return a};D.mostReadable=function(e,n,r){var i=null,o=0,a,s,l,u;r=r||{},s=r.includeFallbackColors,l=r.level,u=r.size;for(var c=0;c<n.length;c++)a=D.readability(e,n[c]),a>o&&(o=a,i=D(n[c]));return D.isReadable(e,i,{level:l,size:u})||!s?i:(r.includeFallbackColors=!1,D.mostReadable(e,["#fff","#000"],r))};var dn=D.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"},cu=D.hexNames=fu(dn);function fu(e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);return n}function _i(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function V(e,n){hu(e)&&(e="100%");var r=du(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 Be(e){return Math.min(1,Math.max(0,e))}function rt(e){return parseInt(e,16)}function hu(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function du(e){return typeof e=="string"&&e.indexOf("%")!=-1}function ht(e){return e.length==1?"0"+e:""+e}function re(e){return e<=1&&(e=e*100+"%"),e}function vi(e){return Math.round(parseFloat(e)*255).toString(16)}function lr(e){return rt(e)/255}var ft=(function(){var e="[-\\+]?\\d+%?",n="[-\\+]?\\d*\\.\\d+%?",r="(?:"+n+")|(?:"+e+")",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",o="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+i),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+i),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+i),hsva:new RegExp("hsva"+o),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 xt(e){return!!ft.CSS_UNIT.exec(e)}function pu(e){e=e.replace(Vl,"").replace(Gl,"").toLowerCase();var n=!1;if(dn[e])e=dn[e],n=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=ft.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=ft.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=ft.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=ft.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=ft.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=ft.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=ft.hex8.exec(e))?{r:rt(r[1]),g:rt(r[2]),b:rt(r[3]),a:lr(r[4]),format:n?"name":"hex8"}:(r=ft.hex6.exec(e))?{r:rt(r[1]),g:rt(r[2]),b:rt(r[3]),format:n?"name":"hex"}:(r=ft.hex4.exec(e))?{r:rt(r[1]+""+r[1]),g:rt(r[2]+""+r[2]),b:rt(r[3]+""+r[3]),a:lr(r[4]+""+r[4]),format:n?"name":"hex8"}:(r=ft.hex3.exec(e))?{r:rt(r[1]+""+r[1]),g:rt(r[2]+""+r[2]),b:rt(r[3]+""+r[3]),format:n?"name":"hex"}:!1}function gu(e){var n,r;return e=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 pn(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 _u(e){if(Array.isArray(e))return pn(e)}function yi(e,n,r){if(typeof e=="function"?e===n:e.has(n))return arguments.length<3?n:r;throw new TypeError("Private element is not present on this object")}function vu(e,n){if(n.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function yu(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function ot(e,n){return e.get(yi(e,n))}function ur(e,n,r){vu(e,n),n.set(e,r)}function cr(e,n,r){return e.set(yi(e,n),r),r}function mu(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,Cu(i.key),i)}}function bu(e,n,r){return n&&mu(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function wu(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function xu(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
4
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ku(e){return _u(e)||wu(e)||Mu(e)||xu()}function Su(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 new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Cu(e){var n=Su(e,"string");return typeof n=="symbol"?n:n+""}function Mu(e,n){if(e){if(typeof e=="string")return pn(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)?pn(e,n):void 0}}var Au=123,Pu=function(n){return"#".concat(Math.min(n,Math.pow(2,24)).toString(16).padStart(6,"0"))},mi=function(n,r,i){return(n<<16)+(r<<8)+i},Tu=function(n){var r=D(n).toRgb(),i=r.r,o=r.g,a=r.b;return mi(i,o,a)},fr=function(n,r){return n*Au%Math.pow(2,r)},It=new WeakMap,kt=new WeakMap,Eu=(function(){function e(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;yu(this,e),ur(this,It,void 0),ur(this,kt,void 0),cr(kt,this,n),this.reset()}return bu(e,[{key:"reset",value:function(){cr(It,this,["__reserved for background__"])}},{key:"register",value:function(r){if(ot(It,this).length>=Math.pow(2,24-ot(kt,this)))return null;var i=ot(It,this).length,o=fr(i,ot(kt,this)),a=Pu(i+(o<<24-ot(kt,this)));return ot(It,this).push(r),a}},{key:"lookup",value:function(r){if(!r)return null;var i=typeof r=="string"?Tu(r):mi.apply(void 0,ku(r));if(!i)return null;var o=i&Math.pow(2,24-ot(kt,this))-1,a=i>>24-ot(kt,this)&Math.pow(2,ot(kt,this))-1;return fr(o,ot(kt,this))!==a||o>=ot(It,this).length?null:ot(It,this)[o]}}])})(),pe,G,bi,wi,zt,hr,xi,ki,Ke,Ce,oe,Si,En,gn,_n,Re={},Oe=[],Nu=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,We=Array.isArray;function _t(e,n){for(var r in n)e[r]=n[r];return e}function Nn(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function zu(e,n,r){var i,o,a,s={};for(a in n)a=="key"?i=n[a]:a=="ref"?o=n[a]:s[a]=n[a];if(arguments.length>2&&(s.children=arguments.length>3?pe.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)s[a]===void 0&&(s[a]=e.defaultProps[a]);return ae(e,s,i,o,null)}function ae(e,n,r,i,o){var a={type:e,props:n,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++bi,__i:-1,__u:0};return o==null&&G.vnode!=null&&G.vnode(a),a}function qe(e){return e.children}function Me(e,n){this.props=e,this.context=n}function Wt(e,n){if(n==null)return e.__?Wt(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"?Wt(e):null}function Iu(e){if(e.__P&&e.__d){var n=e.__v,r=n.__e,i=[],o=[],a=_t({},n);a.__v=n.__v+1,G.vnode&&G.vnode(a),zn(e.__P,a,n,e.__n,e.__P.namespaceURI,32&n.__u?[r]:null,i,r??Wt(n),!!(32&n.__u),o),a.__v=n.__v,a.__.__k[a.__i]=a,Pi(i,a,o),n.__e=n.__=null,a.__e!=r&&Ci(a)}}function Ci(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}),Ci(e)}function dr(e){(!e.__d&&(e.__d=!0)&&zt.push(e)&&!De.__r++||hr!=G.debounceRendering)&&((hr=G.debounceRendering)||xi)(De)}function De(){try{for(var e,n=1;zt.length;)zt.length>n&&zt.sort(ki),e=zt.shift(),n=zt.length,Iu(e)}finally{zt.length=De.__r=0}}function Mi(e,n,r,i,o,a,s,l,u,c,h){var f,d,p,_,b,y,g,w=i&&i.__k||Oe,x=n.length;for(u=Ru(r,n,w,u,x),f=0;f<x;f++)(p=r.__k[f])!=null&&(d=p.__i!=-1&&w[p.__i]||Re,p.__i=f,y=zn(e,p,d,o,a,s,l,u,c,h),_=p.__e,p.ref&&d.ref!=p.ref&&(d.ref&&In(d.ref,null,p),h.push(p.ref,p.__c||_,p)),b==null&&_!=null&&(b=_),(g=!!(4&p.__u))||d.__k===p.__k?(u=Ai(p,u,e,g),g&&d.__e&&(d.__e=null)):typeof p.type=="function"&&y!==void 0?u=y:_&&(u=_.nextSibling),p.__u&=-7);return r.__e=b,u}function Ru(e,n,r,i,o){var a,s,l,u,c,h=r.length,f=h,d=0;for(e.__k=new Array(o),a=0;a<o;a++)(s=n[a])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=e.__k[a]=ae(null,s,null,null,null):We(s)?s=e.__k[a]=ae(qe,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[a]=ae(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[a]=s,u=a+d,s.__=e,s.__b=e.__b+1,l=null,(c=s.__i=Ou(s,r,u,f))!=-1&&(f--,(l=r[c])&&(l.__u|=2)),l==null||l.__v==null?(c==-1&&(o>h?d--:o<h&&d++),typeof s.type!="function"&&(s.__u|=4)):c!=u&&(c==u-1?d--:c==u+1?d++:(c>u?d--:d++,s.__u|=4))):e.__k[a]=null;if(f)for(a=0;a<h;a++)(l=r[a])!=null&&(2&l.__u)==0&&(l.__e==i&&(i=Wt(l)),Ei(l,l));return i}function Ai(e,n,r,i){var o,a;if(typeof e.type=="function"){for(o=e.__k,a=0;o&&a<o.length;a++)o[a]&&(o[a].__=e,n=Ai(o[a],n,r,i));return n}e.__e!=n&&(i&&(n&&e.type&&!n.parentNode&&(n=Wt(e)),r.insertBefore(e.__e,n||null)),n=e.__e);do n=n&&n.nextSibling;while(n!=null&&n.nodeType==8);return n}function Ou(e,n,r,i){var o,a,s,l=e.key,u=e.type,c=n[r],h=c!=null&&(2&c.__u)==0;if(c===null&&l==null||h&&l==c.key&&u==c.type)return r;if(i>(h?1:0)){for(o=r-1,a=r+1;o>=0||a<n.length;)if((c=n[s=o>=0?o--:a++])!=null&&(2&c.__u)==0&&l==c.key&&u==c.type)return s}return-1}function pr(e,n,r){n[0]=="-"?e.setProperty(n,r??""):e[n]=r==null?"":typeof r!="number"||Nu.test(n)?r:r+"px"}function ye(e,n,r,i,o){var a,s;t: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||pr(e.style,n,"");if(r)for(n in r)i&&r[n]==i[n]||pr(e.style,n,r[n])}else if(n[0]=="o"&&n[1]=="n")a=n!=(n=n.replace(Si,"$1")),s=n.toLowerCase(),n=s in e||n=="onFocusOut"||n=="onFocusIn"?s.slice(2):n.slice(2),e.l||(e.l={}),e.l[n+a]=r,r?i?r[oe]=i[oe]:(r[oe]=En,e.addEventListener(n,a?_n:gn,a)):e.removeEventListener(n,a?_n:gn,a);else{if(o=="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 t}catch{}typeof r=="function"||(r==null||r===!1&&n[4]!="-"?e.removeAttribute(n):e.setAttribute(n,n=="popover"&&r==1?"":r))}}function gr(e){return function(n){if(this.l){var r=this.l[n.type+e];if(n[Ce]==null)n[Ce]=En++;else if(n[Ce]<r[oe])return;return r(G.event?G.event(n):n)}}}function zn(e,n,r,i,o,a,s,l,u,c){var h,f,d,p,_,b,y,g,w,x,m,v,S,k,M,N=n.type;if(n.constructor!==void 0)return null;128&r.__u&&(u=!!(32&r.__u),a=[l=n.__e=r.__e]),(h=G.__b)&&h(n);t:if(typeof N=="function")try{if(g=n.props,w=N.prototype&&N.prototype.render,x=(h=N.contextType)&&i[h.__c],m=h?x?x.props.value:h.__:i,r.__c?y=(f=n.__c=r.__c).__=f.__E:(w?n.__c=f=new N(g,m):(n.__c=f=new Me(g,m),f.constructor=N,f.render=Fu),x&&x.sub(f),f.state||(f.state={}),f.__n=i,d=f.__d=!0,f.__h=[],f._sb=[]),w&&f.__s==null&&(f.__s=f.state),w&&N.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=_t({},f.__s)),_t(f.__s,N.getDerivedStateFromProps(g,f.__s))),p=f.props,_=f.state,f.__v=n,d)w&&N.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),w&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(w&&N.getDerivedStateFromProps==null&&g!==p&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(g,m),n.__v==r.__v||!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(g,f.__s,m)===!1){n.__v!=r.__v&&(f.props=g,f.state=f.__s,f.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function(E){E&&(E.__=n)}),Oe.push.apply(f.__h,f._sb),f._sb=[],f.__h.length&&s.push(f);break t}f.componentWillUpdate!=null&&f.componentWillUpdate(g,f.__s,m),w&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(p,_,b)})}if(f.context=m,f.props=g,f.__P=e,f.__e=!1,v=G.__r,S=0,w)f.state=f.__s,f.__d=!1,v&&v(n),h=f.render(f.props,f.state,f.context),Oe.push.apply(f.__h,f._sb),f._sb=[];else do f.__d=!1,v&&v(n),h=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++S<25);f.state=f.__s,f.getChildContext!=null&&(i=_t(_t({},i),f.getChildContext())),w&&!d&&f.getSnapshotBeforeUpdate!=null&&(b=f.getSnapshotBeforeUpdate(p,_)),k=h!=null&&h.type===qe&&h.key==null?Ti(h.props.children):h,l=Mi(e,We(k)?k:[k],n,r,i,o,a,s,l,u,c),f.base=n.__e,n.__u&=-161,f.__h.length&&s.push(f),y&&(f.__E=f.__=null)}catch(E){if(n.__v=null,u||a!=null)if(E.then){for(n.__u|=u?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;a[a.indexOf(l)]=null,n.__e=l}else{for(M=a.length;M--;)Nn(a[M]);vn(n)}else n.__e=r.__e,n.__k=r.__k,E.then||vn(n);G.__e(E,n,r)}else a==null&&n.__v==r.__v?(n.__k=r.__k,n.__e=r.__e):l=n.__e=Du(r.__e,n,r,i,o,a,s,u,c);return(h=G.diffed)&&h(n),128&n.__u?void 0:l}function vn(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(vn))}function Pi(e,n,r){for(var i=0;i<r.length;i++)In(r[i],r[++i],r[++i]);G.__c&&G.__c(n,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(a){a.call(o)})}catch(a){G.__e(a,o.__v)}})}function Ti(e){return typeof e!="object"||e==null||e.__b>0?e:We(e)?e.map(Ti):e.constructor!==void 0?null:_t({},e)}function Du(e,n,r,i,o,a,s,l,u){var c,h,f,d,p,_,b,y=r.props||Re,g=n.props,w=n.type;if(w=="svg"?o="http://www.w3.org/2000/svg":w=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),a!=null){for(c=0;c<a.length;c++)if((p=a[c])&&"setAttribute"in p==!!w&&(w?p.localName==w:p.nodeType==3)){e=p,a[c]=null;break}}if(e==null){if(w==null)return document.createTextNode(g);e=document.createElementNS(o,w,g.is&&g),l&&(G.__m&&G.__m(n,a),l=!1),a=null}if(w==null)y===g||l&&e.data==g||(e.data=g);else{if(a=w=="textarea"&&g.defaultValue!=null?null:a&&pe.call(e.childNodes),!l&&a!=null)for(y={},c=0;c<e.attributes.length;c++)y[(p=e.attributes[c]).name]=p.value;for(c in y)p=y[c],c=="dangerouslySetInnerHTML"?f=p:c=="children"||c in g||c=="value"&&"defaultValue"in g||c=="checked"&&"defaultChecked"in g||ye(e,c,null,p,o);for(c in g)p=g[c],c=="children"?d=p:c=="dangerouslySetInnerHTML"?h=p:c=="value"?_=p:c=="checked"?b=p:l&&typeof p!="function"||y[c]===p||ye(e,c,p,y[c],o);if(h)l||f&&(h.__html==f.__html||h.__html==e.innerHTML)||(e.innerHTML=h.__html),n.__k=[];else if(f&&(e.innerHTML=""),Mi(n.type=="template"?e.content:e,We(d)?d:[d],n,r,i,w=="foreignObject"?"http://www.w3.org/1999/xhtml":o,a,s,a?a[0]:r.__k&&Wt(r,0),l,u),a!=null)for(c=a.length;c--;)Nn(a[c]);l&&w!="textarea"||(c="value",w=="progress"&&_==null?e.removeAttribute("value"):_!=null&&(_!==e[c]||w=="progress"&&!_||w=="option"&&_!=y[c])&&ye(e,c,_,y[c],o),c="checked",b!=null&&b!=e[c]&&ye(e,c,b,y[c],o))}return e}function In(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(o){G.__e(o,r)}}function Ei(e,n,r){var i,o;if(G.unmount&&G.unmount(e),(i=e.ref)&&(i.current&&i.current!=e.__e||In(i,null,n)),(i=e.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(a){G.__e(a,n)}i.base=i.__P=null}if(i=e.__k)for(o=0;o<i.length;o++)i[o]&&Ei(i[o],n,r||typeof e.type!="function");r||Nn(e.__e),e.__c=e.__=e.__e=void 0}function Fu(e,n,r){return this.constructor(e,r)}function ju(e,n,r){var i,o,a,s;n==document&&(n=document.documentElement),G.__&&G.__(e,n),o=(i=!1)?null:n.__k,a=[],s=[],zn(n,e=n.__k=zu(qe,null,[e]),o||Re,Re,n.namespaceURI,o?null:n.firstChild?pe.call(n.childNodes):null,a,o?o.__e:n.firstChild,i,s),Pi(a,e,s)}function Ni(e,n,r){var i,o,a,s,l=_t({},e.props);for(a in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),n)a=="key"?i=n[a]:a=="ref"?o=n[a]:l[a]=n[a]===void 0&&s!=null?s[a]:n[a];return arguments.length>2&&(l.children=arguments.length>3?pe.call(arguments,2):r),ae(e.type,l,i||e.key,o||e.ref,null)}pe=Oe.slice,G={__e:function(e,n,r,i){for(var o,a,s;n=n.__;)if((o=n.__c)&&!o.__)try{if((a=o.constructor)&&a.getDerivedStateFromError!=null&&(o.setState(a.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,i||{}),s=o.__d),s)return o.__E=o}catch(l){e=l}throw e}},bi=0,wi=function(e){return e!=null&&e.constructor===void 0},Me.prototype.setState=function(e,n){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=_t({},this.state),typeof e=="function"&&(e=e(_t({},r),this.props)),e&&_t(r,e),e!=null&&this.__v&&(n&&this._sb.push(n),dr(this))},Me.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),dr(this))},Me.prototype.render=qe,zt=[],xi=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ki=function(e,n){return e.__v.__b-n.__v.__b},De.__r=0,Ke=Math.random().toString(8),Ce="__d"+Ke,oe="__a"+Ke,Si=/(PointerCapture)$|Capture$/i,En=0,gn=gr(!1),_n=gr(!0);function _r(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 $u(e){if(Array.isArray(e))return e}function Lu(e,n,r){return(n=Vu(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Uu(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,l=[],u=!0,c=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(u=(i=a.call(r)).done)&&(l.push(i.value),l.length!==n);u=!0);}catch(h){c=!0,o=h}finally{try{if(!u&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw o}}return l}}function Hu(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
5
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vr(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Bu(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?vr(Object(r),!0).forEach(function(i){Lu(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vr(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function Wu(e,n){return $u(e)||Uu(e,n)||Gu(e,n)||Hu()}function qu(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 new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function Vu(e){var n=qu(e,"string");return typeof n=="symbol"?n:n+""}function Fe(e){"@babel/helpers - typeof";return Fe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Fe(e)}function Gu(e,n){if(e){if(typeof e=="string")return _r(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)?_r(e,n):void 0}}var yn=function(n){if(Fe(n)!=="object")return n;var r=Ni(n);if(r.props){var i;r.props=Bu({},r.props),r!=null&&(i=r.props)!==null&&i!==void 0&&i.children&&(r.props.children=Array.isArray(r.props.children)?r.props.children.map(yn):yn(r.props.children))}return r},Xu=function(n){return wi(Ni(n))},Yu=function(n,r){delete r.__k,ju(yn(n),r)};function Ku(e,n){n===void 0&&(n={});var r=n.insertAt;if(!(typeof document>"u")){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",r==="top"&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var Zu=`.float-tooltip-kap {
|
|
6
|
-
position: absolute;
|
|
7
|
-
width: max-content; /* prevent shrinking near right edge */
|
|
8
|
-
max-width: max(50%, 150px);
|
|
9
|
-
padding: 3px 5px;
|
|
10
|
-
border-radius: 3px;
|
|
11
|
-
font: 12px sans-serif;
|
|
12
|
-
color: #eee;
|
|
13
|
-
background: rgba(0,0,0,0.6);
|
|
14
|
-
pointer-events: none;
|
|
15
|
-
}
|
|
16
|
-
`;Ku(Zu);var Qu=Tn({props:{content:{default:!1},offsetX:{triggerUpdate:!1},offsetY:{triggerUpdate:!1}},init:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.style,a=o===void 0?{}:o,s=!!n&&Fe(n)==="object"&&!!n.node&&typeof n.node=="function",l=st(s?n.node():n);l.style("position")==="static"&&l.style("position","relative"),r.tooltipEl=l.append("div").attr("class","float-tooltip-kap"),Object.entries(a).forEach(function(c){var h=Wu(c,2),f=h[0],d=h[1];return r.tooltipEl.style(f,d)}),r.tooltipEl.style("left","-10000px").style("display","none");var u="tooltip-".concat(Math.round(Math.random()*1e12));r.mouseInside=!1,l.on("mousemove.".concat(u),function(c){r.mouseInside=!0;var h=gt(c),f=l.node(),d=f.offsetWidth,p=f.offsetHeight,_=[r.offsetX===null||r.offsetX===void 0?"-".concat(h[0]/d*100,"%"):typeof r.offsetX=="number"?"calc(-50% + ".concat(r.offsetX,"px)"):r.offsetX,r.offsetY===null||r.offsetY===void 0?p>130&&p-h[1]<100?"calc(-100% - 6px)":"21px":typeof r.offsetY=="number"?r.offsetY<0?"calc(-100% - ".concat(Math.abs(r.offsetY),"px)"):"".concat(r.offsetY,"px"):r.offsetY];r.tooltipEl.style("left",h[0]+"px").style("top",h[1]+"px").style("transform","translate(".concat(_.join(","),")")),r.content&&r.tooltipEl.style("display","inline")}),l.on("mouseover.".concat(u),function(){r.mouseInside=!0,r.content&&r.tooltipEl.style("display","inline")}),l.on("mouseout.".concat(u),function(){r.mouseInside=!1,r.tooltipEl.style("display","none")})},update:function(n){n.tooltipEl.style("display",n.content&&n.mouseInside?"inline":"none"),n.content?n.content instanceof HTMLElement?(n.tooltipEl.text(""),n.tooltipEl.append(function(){return n.content})):typeof n.content=="string"?n.tooltipEl.html(n.content):Xu(n.content)?(n.tooltipEl.text(""),Yu(n.content,n.tooltipEl.node())):(n.tooltipEl.style("display","none"),console.warn("Tooltip content is invalid, skipping.",n.content,n.content.toString())):n.tooltipEl.text("")}});function Ju(e,n,r){var i,o=1;e==null&&(e=0),n==null&&(n=0),r==null&&(r=0);function a(){var s,l=i.length,u,c=0,h=0,f=0;for(s=0;s<l;++s)u=i[s],c+=u.x||0,h+=u.y||0,f+=u.z||0;for(c=(c/l-e)*o,h=(h/l-n)*o,f=(f/l-r)*o,s=0;s<l;++s)u=i[s],c&&(u.x-=c),h&&(u.y-=h),f&&(u.z-=f)}return a.initialize=function(s){i=s},a.x=function(s){return arguments.length?(e=+s,a):e},a.y=function(s){return arguments.length?(n=+s,a):n},a.z=function(s){return arguments.length?(r=+s,a):r},a.strength=function(s){return arguments.length?(o=+s,a):o},a}function tc(e){const n=+this._x.call(null,e);return zi(this.cover(n),n,e)}function zi(e,n,r){if(isNaN(n))return e;var i,o=e._root,a={data:r},s=e._x0,l=e._x1,u,c,h,f,d;if(!o)return e._root=a,e;for(;o.length;)if((h=n>=(u=(s+l)/2))?s=u:l=u,i=o,!(o=o[f=+h]))return i[f]=a,e;if(c=+e._x.call(null,o.data),n===c)return a.next=o,i?i[f]=a:e._root=a,e;do i=i?i[f]=new Array(2):e._root=new Array(2),(h=n>=(u=(s+l)/2))?s=u:l=u;while((f=+h)==(d=+(c>=u)));return i[d]=o,i[f]=a,e}function ec(e){Array.isArray(e)||(e=Array.from(e));const n=e.length,r=new Float64Array(n);let i=1/0,o=-1/0;for(let a=0,s;a<n;++a)isNaN(s=+this._x.call(null,e[a]))||(r[a]=s,s<i&&(i=s),s>o&&(o=s));if(i>o)return this;this.cover(i).cover(o);for(let a=0;a<n;++a)zi(this,r[a],e[a]);return this}function nc(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,o=this._root,a,s;n>e||e>=r;)switch(s=+(e<n),a=new Array(2),a[s]=o,o=a,i*=2,s){case 0:r=n+i;break;case 1:n=r-i;break}this._root&&this._root.length&&(this._root=o)}return this._x0=n,this._x1=r,this}function rc(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function ic(e){return arguments.length?this.cover(+e[0][0]).cover(+e[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function Pt(e,n,r){this.node=e,this.x0=n,this.x1=r}function oc(e,n){var r,i=this._x0,o,a,s=this._x1,l=[],u=this._root,c,h;for(u&&l.push(new Pt(u,i,s)),n==null?n=1/0:(i=e-n,s=e+n);c=l.pop();)if(!(!(u=c.node)||(o=c.x0)>s||(a=c.x1)<i))if(u.length){var f=(o+a)/2;l.push(new Pt(u[1],f,a),new Pt(u[0],o,f)),(h=+(e>=f))&&(c=l[l.length-1],l[l.length-1]=l[l.length-1-h],l[l.length-1-h]=c)}else{var d=Math.abs(e-+this._x.call(null,u.data));d<n&&(n=d,i=e-d,s=e+d,r=u.data)}return r}function ac(e){if(isNaN(u=+this._x.call(null,e)))return this;var n,r=this._root,i,o,a,s=this._x0,l=this._x1,u,c,h,f,d;if(!r)return this;if(r.length)for(;;){if((h=u>=(c=(s+l)/2))?s=c:l=c,n=r,!(r=r[f=+h]))return this;if(!r.length)break;n[f+1&1]&&(i=n,d=f)}for(;r.data!==e;)if(o=r,!(r=r.next))return this;return(a=r.next)&&delete r.next,o?(a?o.next=a:delete o.next,this):n?(a?n[f]=a:delete n[f],(r=n[0]||n[1])&&r===(n[1]||n[0])&&!r.length&&(i?i[d]=r:this._root=r),this):(this._root=a,this)}function sc(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function lc(){return this._root}function uc(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function cc(e){var n=[],r,i=this._root,o,a,s;for(i&&n.push(new Pt(i,this._x0,this._x1));r=n.pop();)if(!e(i=r.node,a=r.x0,s=r.x1)&&i.length){var l=(a+s)/2;(o=i[1])&&n.push(new Pt(o,l,s)),(o=i[0])&&n.push(new Pt(o,a,l))}return this}function fc(e){var n=[],r=[],i;for(this._root&&n.push(new Pt(this._root,this._x0,this._x1));i=n.pop();){var o=i.node;if(o.length){var a,s=i.x0,l=i.x1,u=(s+l)/2;(a=o[0])&&n.push(new Pt(a,s,u)),(a=o[1])&&n.push(new Pt(a,u,l))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.x1);return this}function hc(e){return e[0]}function dc(e){return arguments.length?(this._x=e,this):this._x}function Ii(e,n){var r=new Rn(n??hc,NaN,NaN);return e==null?r:r.addAll(e)}function Rn(e,n,r){this._x=e,this._x0=n,this._x1=r,this._root=void 0}function yr(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var nt=Ii.prototype=Rn.prototype;nt.copy=function(){var e=new Rn(this._x,this._x0,this._x1),n=this._root,r,i;if(!n)return e;if(!n.length)return e._root=yr(n),e;for(r=[{source:n,target:e._root=new Array(2)}];n=r.pop();)for(var o=0;o<2;++o)(i=n.source[o])&&(i.length?r.push({source:i,target:n.target[o]=new Array(2)}):n.target[o]=yr(i));return e};nt.add=tc;nt.addAll=ec;nt.cover=nc;nt.data=rc;nt.extent=ic;nt.find=oc;nt.remove=ac;nt.removeAll=sc;nt.root=lc;nt.size=uc;nt.visit=cc;nt.visitAfter=fc;nt.x=dc;function pc(e){const n=+this._x.call(null,e),r=+this._y.call(null,e);return Ri(this.cover(n,r),n,r,e)}function Ri(e,n,r,i){if(isNaN(n)||isNaN(r))return e;var o,a=e._root,s={data:i},l=e._x0,u=e._y0,c=e._x1,h=e._y1,f,d,p,_,b,y,g,w;if(!a)return e._root=s,e;for(;a.length;)if((b=n>=(f=(l+c)/2))?l=f:c=f,(y=r>=(d=(u+h)/2))?u=d:h=d,o=a,!(a=a[g=y<<1|b]))return o[g]=s,e;if(p=+e._x.call(null,a.data),_=+e._y.call(null,a.data),n===p&&r===_)return s.next=a,o?o[g]=s:e._root=s,e;do o=o?o[g]=new Array(4):e._root=new Array(4),(b=n>=(f=(l+c)/2))?l=f:c=f,(y=r>=(d=(u+h)/2))?u=d:h=d;while((g=y<<1|b)===(w=(_>=d)<<1|p>=f));return o[w]=a,o[g]=s,e}function gc(e){var n,r,i=e.length,o,a,s=new Array(i),l=new Array(i),u=1/0,c=1/0,h=-1/0,f=-1/0;for(r=0;r<i;++r)isNaN(o=+this._x.call(null,n=e[r]))||isNaN(a=+this._y.call(null,n))||(s[r]=o,l[r]=a,o<u&&(u=o),o>h&&(h=o),a<c&&(c=a),a>f&&(f=a));if(u>h||c>f)return this;for(this.cover(u,c).cover(h,f),r=0;r<i;++r)Ri(this,s[r],l[r],e[r]);return this}function _c(e,n){if(isNaN(e=+e)||isNaN(n=+n))return this;var r=this._x0,i=this._y0,o=this._x1,a=this._y1;if(isNaN(r))o=(r=Math.floor(e))+1,a=(i=Math.floor(n))+1;else{for(var s=o-r||1,l=this._root,u,c;r>e||e>=o||i>n||n>=a;)switch(c=(n<i)<<1|e<r,u=new Array(4),u[c]=l,l=u,s*=2,c){case 0:o=r+s,a=i+s;break;case 1:r=o-s,a=i+s;break;case 2:o=r+s,i=a-s;break;case 3:r=o-s,i=a-s;break}this._root&&this._root.length&&(this._root=l)}return this._x0=r,this._y0=i,this._x1=o,this._y1=a,this}function vc(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function yc(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 J(e,n,r,i,o){this.node=e,this.x0=n,this.y0=r,this.x1=i,this.y1=o}function mc(e,n,r){var i,o=this._x0,a=this._y0,s,l,u,c,h=this._x1,f=this._y1,d=[],p=this._root,_,b;for(p&&d.push(new J(p,o,a,h,f)),r==null?r=1/0:(o=e-r,a=n-r,h=e+r,f=n+r,r*=r);_=d.pop();)if(!(!(p=_.node)||(s=_.x0)>h||(l=_.y0)>f||(u=_.x1)<o||(c=_.y1)<a))if(p.length){var y=(s+u)/2,g=(l+c)/2;d.push(new J(p[3],y,g,u,c),new J(p[2],s,g,y,c),new J(p[1],y,l,u,g),new J(p[0],s,l,y,g)),(b=(n>=g)<<1|e>=y)&&(_=d[d.length-1],d[d.length-1]=d[d.length-1-b],d[d.length-1-b]=_)}else{var w=e-+this._x.call(null,p.data),x=n-+this._y.call(null,p.data),m=w*w+x*x;if(m<r){var v=Math.sqrt(r=m);o=e-v,a=n-v,h=e+v,f=n+v,i=p.data}}return i}function bc(e){if(isNaN(h=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var n,r=this._root,i,o,a,s=this._x0,l=this._y0,u=this._x1,c=this._y1,h,f,d,p,_,b,y,g;if(!r)return this;if(r.length)for(;;){if((_=h>=(d=(s+u)/2))?s=d:u=d,(b=f>=(p=(l+c)/2))?l=p:c=p,n=r,!(r=r[y=b<<1|_]))return this;if(!r.length)break;(n[y+1&3]||n[y+2&3]||n[y+3&3])&&(i=n,g=y)}for(;r.data!==e;)if(o=r,!(r=r.next))return this;return(a=r.next)&&delete r.next,o?(a?o.next=a:delete o.next,this):n?(a?n[y]=a:delete n[y],(r=n[0]||n[1]||n[2]||n[3])&&r===(n[3]||n[2]||n[1]||n[0])&&!r.length&&(i?i[g]=r:this._root=r),this):(this._root=a,this)}function wc(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function xc(){return this._root}function kc(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function Sc(e){var n=[],r,i=this._root,o,a,s,l,u;for(i&&n.push(new J(i,this._x0,this._y0,this._x1,this._y1));r=n.pop();)if(!e(i=r.node,a=r.x0,s=r.y0,l=r.x1,u=r.y1)&&i.length){var c=(a+l)/2,h=(s+u)/2;(o=i[3])&&n.push(new J(o,c,h,l,u)),(o=i[2])&&n.push(new J(o,a,h,c,u)),(o=i[1])&&n.push(new J(o,c,s,l,h)),(o=i[0])&&n.push(new J(o,a,s,c,h))}return this}function Cc(e){var n=[],r=[],i;for(this._root&&n.push(new J(this._root,this._x0,this._y0,this._x1,this._y1));i=n.pop();){var o=i.node;if(o.length){var a,s=i.x0,l=i.y0,u=i.x1,c=i.y1,h=(s+u)/2,f=(l+c)/2;(a=o[0])&&n.push(new J(a,s,l,h,f)),(a=o[1])&&n.push(new J(a,h,l,u,f)),(a=o[2])&&n.push(new J(a,s,f,h,c)),(a=o[3])&&n.push(new J(a,h,f,u,c))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.y0,i.x1,i.y1);return this}function Mc(e){return e[0]}function Ac(e){return arguments.length?(this._x=e,this):this._x}function Pc(e){return e[1]}function Tc(e){return arguments.length?(this._y=e,this):this._y}function Oi(e,n,r){var i=new On(n??Mc,r??Pc,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function On(e,n,r,i,o,a){this._x=e,this._y=n,this._x0=r,this._y0=i,this._x1=o,this._y1=a,this._root=void 0}function mr(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var tt=Oi.prototype=On.prototype;tt.copy=function(){var e=new On(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=mr(n),e;for(r=[{source:n,target:e._root=new Array(4)}];n=r.pop();)for(var o=0;o<4;++o)(i=n.source[o])&&(i.length?r.push({source:i,target:n.target[o]=new Array(4)}):n.target[o]=mr(i));return e};tt.add=pc;tt.addAll=gc;tt.cover=_c;tt.data=vc;tt.extent=yc;tt.find=mc;tt.remove=bc;tt.removeAll=wc;tt.root=xc;tt.size=kc;tt.visit=Sc;tt.visitAfter=Cc;tt.x=Ac;tt.y=Tc;function Ec(e){const n=+this._x.call(null,e),r=+this._y.call(null,e),i=+this._z.call(null,e);return Di(this.cover(n,r,i),n,r,i,e)}function Di(e,n,r,i,o){if(isNaN(n)||isNaN(r)||isNaN(i))return e;var a,s=e._root,l={data:o},u=e._x0,c=e._y0,h=e._z0,f=e._x1,d=e._y1,p=e._z1,_,b,y,g,w,x,m,v,S,k,M;if(!s)return e._root=l,e;for(;s.length;)if((m=n>=(_=(u+f)/2))?u=_:f=_,(v=r>=(b=(c+d)/2))?c=b:d=b,(S=i>=(y=(h+p)/2))?h=y:p=y,a=s,!(s=s[k=S<<2|v<<1|m]))return a[k]=l,e;if(g=+e._x.call(null,s.data),w=+e._y.call(null,s.data),x=+e._z.call(null,s.data),n===g&&r===w&&i===x)return l.next=s,a?a[k]=l:e._root=l,e;do a=a?a[k]=new Array(8):e._root=new Array(8),(m=n>=(_=(u+f)/2))?u=_:f=_,(v=r>=(b=(c+d)/2))?c=b:d=b,(S=i>=(y=(h+p)/2))?h=y:p=y;while((k=S<<2|v<<1|m)===(M=(x>=y)<<2|(w>=b)<<1|g>=_));return a[M]=s,a[k]=l,e}function Nc(e){Array.isArray(e)||(e=Array.from(e));const n=e.length,r=new Float64Array(n),i=new Float64Array(n),o=new Float64Array(n);let a=1/0,s=1/0,l=1/0,u=-1/0,c=-1/0,h=-1/0;for(let f=0,d,p,_,b;f<n;++f)isNaN(p=+this._x.call(null,d=e[f]))||isNaN(_=+this._y.call(null,d))||isNaN(b=+this._z.call(null,d))||(r[f]=p,i[f]=_,o[f]=b,p<a&&(a=p),p>u&&(u=p),_<s&&(s=_),_>c&&(c=_),b<l&&(l=b),b>h&&(h=b));if(a>u||s>c||l>h)return this;this.cover(a,s,l).cover(u,c,h);for(let f=0;f<n;++f)Di(this,r[f],i[f],o[f],e[f]);return this}function zc(e,n,r){if(isNaN(e=+e)||isNaN(n=+n)||isNaN(r=+r))return this;var i=this._x0,o=this._y0,a=this._z0,s=this._x1,l=this._y1,u=this._z1;if(isNaN(i))s=(i=Math.floor(e))+1,l=(o=Math.floor(n))+1,u=(a=Math.floor(r))+1;else{for(var c=s-i||1,h=this._root,f,d;i>e||e>=s||o>n||n>=l||a>r||r>=u;)switch(d=(r<a)<<2|(n<o)<<1|e<i,f=new Array(8),f[d]=h,h=f,c*=2,d){case 0:s=i+c,l=o+c,u=a+c;break;case 1:i=s-c,l=o+c,u=a+c;break;case 2:s=i+c,o=l-c,u=a+c;break;case 3:i=s-c,o=l-c,u=a+c;break;case 4:s=i+c,l=o+c,a=u-c;break;case 5:i=s-c,l=o+c,a=u-c;break;case 6:s=i+c,o=l-c,a=u-c;break;case 7:i=s-c,o=l-c,a=u-c;break}this._root&&this._root.length&&(this._root=h)}return this._x0=i,this._y0=o,this._z0=a,this._x1=s,this._y1=l,this._z1=u,this}function Ic(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function Rc(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 W(e,n,r,i,o,a,s){this.node=e,this.x0=n,this.y0=r,this.z0=i,this.x1=o,this.y1=a,this.z1=s}function Oc(e,n,r,i){var o,a=this._x0,s=this._y0,l=this._z0,u,c,h,f,d,p,_=this._x1,b=this._y1,y=this._z1,g=[],w=this._root,x,m;for(w&&g.push(new W(w,a,s,l,_,b,y)),i==null?i=1/0:(a=e-i,s=n-i,l=r-i,_=e+i,b=n+i,y=r+i,i*=i);x=g.pop();)if(!(!(w=x.node)||(u=x.x0)>_||(c=x.y0)>b||(h=x.z0)>y||(f=x.x1)<a||(d=x.y1)<s||(p=x.z1)<l))if(w.length){var v=(u+f)/2,S=(c+d)/2,k=(h+p)/2;g.push(new W(w[7],v,S,k,f,d,p),new W(w[6],u,S,k,v,d,p),new W(w[5],v,c,k,f,S,p),new W(w[4],u,c,k,v,S,p),new W(w[3],v,S,h,f,d,k),new W(w[2],u,S,h,v,d,k),new W(w[1],v,c,h,f,S,k),new W(w[0],u,c,h,v,S,k)),(m=(r>=k)<<2|(n>=S)<<1|e>=v)&&(x=g[g.length-1],g[g.length-1]=g[g.length-1-m],g[g.length-1-m]=x)}else{var M=e-+this._x.call(null,w.data),N=n-+this._y.call(null,w.data),E=r-+this._z.call(null,w.data),I=M*M+N*N+E*E;if(I<i){var R=Math.sqrt(i=I);a=e-R,s=n-R,l=r-R,_=e+R,b=n+R,y=r+R,o=w.data}}return o}const Dc=(e,n,r,i,o,a)=>Math.sqrt((e-i)**2+(n-o)**2+(r-a)**2);function Fc(e,n,r,i){const o=[],a=e-i,s=n-i,l=r-i,u=e+i,c=n+i,h=r+i;return this.visit((f,d,p,_,b,y,g)=>{if(!f.length)do{const w=f.data;Dc(e,n,r,this._x(w),this._y(w),this._z(w))<=i&&o.push(w)}while(f=f.next);return d>u||p>c||_>h||b<a||y<s||g<l}),o}function jc(e){if(isNaN(d=+this._x.call(null,e))||isNaN(p=+this._y.call(null,e))||isNaN(_=+this._z.call(null,e)))return this;var n,r=this._root,i,o,a,s=this._x0,l=this._y0,u=this._z0,c=this._x1,h=this._y1,f=this._z1,d,p,_,b,y,g,w,x,m,v,S;if(!r)return this;if(r.length)for(;;){if((w=d>=(b=(s+c)/2))?s=b:c=b,(x=p>=(y=(l+h)/2))?l=y:h=y,(m=_>=(g=(u+f)/2))?u=g:f=g,n=r,!(r=r[v=m<<2|x<<1|w]))return this;if(!r.length)break;(n[v+1&7]||n[v+2&7]||n[v+3&7]||n[v+4&7]||n[v+5&7]||n[v+6&7]||n[v+7&7])&&(i=n,S=v)}for(;r.data!==e;)if(o=r,!(r=r.next))return this;return(a=r.next)&&delete r.next,o?(a?o.next=a:delete o.next,this):n?(a?n[v]=a:delete n[v],(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[S]=r:this._root=r),this):(this._root=a,this)}function $c(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function Lc(){return this._root}function Uc(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function Hc(e){var n=[],r,i=this._root,o,a,s,l,u,c,h;for(i&&n.push(new W(i,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));r=n.pop();)if(!e(i=r.node,a=r.x0,s=r.y0,l=r.z0,u=r.x1,c=r.y1,h=r.z1)&&i.length){var f=(a+u)/2,d=(s+c)/2,p=(l+h)/2;(o=i[7])&&n.push(new W(o,f,d,p,u,c,h)),(o=i[6])&&n.push(new W(o,a,d,p,f,c,h)),(o=i[5])&&n.push(new W(o,f,s,p,u,d,h)),(o=i[4])&&n.push(new W(o,a,s,p,f,d,h)),(o=i[3])&&n.push(new W(o,f,d,l,u,c,p)),(o=i[2])&&n.push(new W(o,a,d,l,f,c,p)),(o=i[1])&&n.push(new W(o,f,s,l,u,d,p)),(o=i[0])&&n.push(new W(o,a,s,l,f,d,p))}return this}function Bc(e){var n=[],r=[],i;for(this._root&&n.push(new W(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));i=n.pop();){var o=i.node;if(o.length){var a,s=i.x0,l=i.y0,u=i.z0,c=i.x1,h=i.y1,f=i.z1,d=(s+c)/2,p=(l+h)/2,_=(u+f)/2;(a=o[0])&&n.push(new W(a,s,l,u,d,p,_)),(a=o[1])&&n.push(new W(a,d,l,u,c,p,_)),(a=o[2])&&n.push(new W(a,s,p,u,d,h,_)),(a=o[3])&&n.push(new W(a,d,p,u,c,h,_)),(a=o[4])&&n.push(new W(a,s,l,_,d,p,f)),(a=o[5])&&n.push(new W(a,d,l,_,c,p,f)),(a=o[6])&&n.push(new W(a,s,p,_,d,h,f)),(a=o[7])&&n.push(new W(a,d,p,_,c,h,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 Wc(e){return e[0]}function qc(e){return arguments.length?(this._x=e,this):this._x}function Vc(e){return e[1]}function Gc(e){return arguments.length?(this._y=e,this):this._y}function Xc(e){return e[2]}function Yc(e){return arguments.length?(this._z=e,this):this._z}function Fi(e,n,r,i){var o=new Dn(n??Wc,r??Vc,i??Xc,NaN,NaN,NaN,NaN,NaN,NaN);return e==null?o:o.addAll(e)}function Dn(e,n,r,i,o,a,s,l,u){this._x=e,this._y=n,this._z=r,this._x0=i,this._y0=o,this._z0=a,this._x1=s,this._y1=l,this._z1=u,this._root=void 0}function br(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var Z=Fi.prototype=Dn.prototype;Z.copy=function(){var e=new Dn(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=br(n),e;for(r=[{source:n,target:e._root=new Array(8)}];n=r.pop();)for(var o=0;o<8;++o)(i=n.source[o])&&(i.length?r.push({source:i,target:n.target[o]=new Array(8)}):n.target[o]=br(i));return e};Z.add=Ec;Z.addAll=Nc;Z.cover=zc;Z.data=Ic;Z.extent=Rc;Z.find=Oc;Z.findAllWithinRadius=Fc;Z.remove=jc;Z.removeAll=$c;Z.root=Lc;Z.size=Uc;Z.visit=Hc;Z.visitAfter=Bc;Z.x=qc;Z.y=Gc;Z.z=Yc;function At(e){return function(){return e}}function Ct(e){return(e()-.5)*1e-6}function Kc(e){return e.index}function wr(e,n){var r=e.get(n);if(!r)throw new Error("node not found: "+n);return r}function Zc(e){var n=Kc,r=d,i,o=At(30),a,s,l,u,c,h,f=1;e==null&&(e=[]);function d(g){return 1/Math.min(u[g.source.index],u[g.target.index])}function p(g){for(var w=0,x=e.length;w<f;++w)for(var m=0,v,S,k,M=0,N=0,E=0,I,R;m<x;++m)v=e[m],S=v.source,k=v.target,M=k.x+k.vx-S.x-S.vx||Ct(h),l>1&&(N=k.y+k.vy-S.y-S.vy||Ct(h)),l>2&&(E=k.z+k.vz-S.z-S.vz||Ct(h)),I=Math.sqrt(M*M+N*N+E*E),I=(I-a[m])/I*g*i[m],M*=I,N*=I,E*=I,k.vx-=M*(R=c[m]),l>1&&(k.vy-=N*R),l>2&&(k.vz-=E*R),S.vx+=M*(R=1-R),l>1&&(S.vy+=N*R),l>2&&(S.vz+=E*R)}function _(){if(s){var g,w=s.length,x=e.length,m=new Map(s.map((S,k)=>[n(S,k,s),S])),v;for(g=0,u=new Array(w);g<x;++g)v=e[g],v.index=g,typeof v.source!="object"&&(v.source=wr(m,v.source)),typeof v.target!="object"&&(v.target=wr(m,v.target)),u[v.source.index]=(u[v.source.index]||0)+1,u[v.target.index]=(u[v.target.index]||0)+1;for(g=0,c=new Array(x);g<x;++g)v=e[g],c[g]=u[v.source.index]/(u[v.source.index]+u[v.target.index]);i=new Array(x),b(),a=new Array(x),y()}}function b(){if(s)for(var g=0,w=e.length;g<w;++g)i[g]=+r(e[g],g,e)}function y(){if(s)for(var g=0,w=e.length;g<w;++g)a[g]=+o(e[g],g,e)}return p.initialize=function(g,...w){s=g,h=w.find(x=>typeof x=="function")||Math.random,l=w.find(x=>[1,2,3].includes(x))||2,_()},p.links=function(g){return arguments.length?(e=g,_(),p):e},p.id=function(g){return arguments.length?(n=g,p):n},p.iterations=function(g){return arguments.length?(f=+g,p):f},p.strength=function(g){return arguments.length?(r=typeof g=="function"?g:At(+g),b(),p):r},p.distance=function(g){return arguments.length?(o=typeof g=="function"?g:At(+g),y(),p):o},p}const Qc=1664525,Jc=1013904223,xr=4294967296;function tf(){let e=1;return()=>(e=(Qc*e+Jc)%xr)/xr}var kr=3;function Ze(e){return e.x}function Sr(e){return e.y}function ef(e){return e.z}var nf=10,rf=Math.PI*(3-Math.sqrt(5)),of=Math.PI*20/(9+Math.sqrt(221));function af(e,n){n=n||2;var r=Math.min(kr,Math.max(1,Math.round(n))),i,o=1,a=.001,s=1-Math.pow(a,1/300),l=0,u=.6,c=new Map,h=Cn(p),f=de("tick","end"),d=tf();e==null&&(e=[]);function p(){_(),f.call("tick",i),o<a&&(h.stop(),f.call("end",i))}function _(g){var w,x=e.length,m;g===void 0&&(g=1);for(var v=0;v<g;++v)for(o+=(l-o)*s,c.forEach(function(S){S(o)}),w=0;w<x;++w)m=e[w],m.fx==null?m.x+=m.vx*=u:(m.x=m.fx,m.vx=0),r>1&&(m.fy==null?m.y+=m.vy*=u:(m.y=m.fy,m.vy=0)),r>2&&(m.fz==null?m.z+=m.vz*=u:(m.z=m.fz,m.vz=0));return i}function b(){for(var g=0,w=e.length,x;g<w;++g){if(x=e[g],x.index=g,x.fx!=null&&(x.x=x.fx),x.fy!=null&&(x.y=x.fy),x.fz!=null&&(x.z=x.fz),isNaN(x.x)||r>1&&isNaN(x.y)||r>2&&isNaN(x.z)){var m=nf*(r>2?Math.cbrt(.5+g):r>1?Math.sqrt(.5+g):g),v=g*rf,S=g*of;r===1?x.x=m:r===2?(x.x=m*Math.cos(v),x.y=m*Math.sin(v)):(x.x=m*Math.sin(v)*Math.cos(S),x.y=m*Math.cos(v),x.z=m*Math.sin(v)*Math.sin(S))}(isNaN(x.vx)||r>1&&isNaN(x.vy)||r>2&&isNaN(x.vz))&&(x.vx=0,r>1&&(x.vy=0),r>2&&(x.vz=0))}}function y(g){return g.initialize&&g.initialize(e,d,r),g}return b(),i={tick:_,restart:function(){return h.restart(p),i},stop:function(){return h.stop(),i},numDimensions:function(g){return arguments.length?(r=Math.min(kr,Math.max(1,Math.round(g))),c.forEach(y),i):r},nodes:function(g){return arguments.length?(e=g,b(),c.forEach(y),i):e},alpha:function(g){return arguments.length?(o=+g,i):o},alphaMin:function(g){return arguments.length?(a=+g,i):a},alphaDecay:function(g){return arguments.length?(s=+g,i):+s},alphaTarget:function(g){return arguments.length?(l=+g,i):l},velocityDecay:function(g){return arguments.length?(u=1-g,i):1-u},randomSource:function(g){return arguments.length?(d=g,c.forEach(y),i):d},force:function(g,w){return arguments.length>1?(w==null?c.delete(g):c.set(g,y(w)),i):c.get(g)},find:function(){var g=Array.prototype.slice.call(arguments),w=g.shift()||0,x=(r>1?g.shift():null)||0,m=(r>2?g.shift():null)||0,v=g.shift()||1/0,S=0,k=e.length,M,N,E,I,R,j;for(v*=v,S=0;S<k;++S)R=e[S],M=w-R.x,N=x-(R.y||0),E=m-(R.z||0),I=M*M+N*N+E*E,I<v&&(j=R,v=I);return j},on:function(g,w){return arguments.length>1?(f.on(g,w),i):f.on(g)}}}function sf(){var e,n,r,i,o,a=At(-30),s,l=1,u=1/0,c=.81;function h(_){var b,y=e.length,g=(n===1?Ii(e,Ze):n===2?Oi(e,Ze,Sr):n===3?Fi(e,Ze,Sr,ef):null).visitAfter(d);for(o=_,b=0;b<y;++b)r=e[b],g.visit(p)}function f(){if(e){var _,b=e.length,y;for(s=new Array(b),_=0;_<b;++_)y=e[_],s[y.index]=+a(y,_,e)}}function d(_){var b=0,y,g,w=0,x,m,v,S,k=_.length;if(k){for(x=m=v=S=0;S<k;++S)(y=_[S])&&(g=Math.abs(y.value))&&(b+=y.value,w+=g,x+=g*(y.x||0),m+=g*(y.y||0),v+=g*(y.z||0));b*=Math.sqrt(4/k),_.x=x/w,n>1&&(_.y=m/w),n>2&&(_.z=v/w)}else{y=_,y.x=y.data.x,n>1&&(y.y=y.data.y),n>2&&(y.z=y.data.z);do b+=s[y.data.index];while(y=y.next)}_.value=b}function p(_,b,y,g,w){if(!_.value)return!0;var x=[y,g,w][n-1],m=_.x-r.x,v=n>1?_.y-r.y:0,S=n>2?_.z-r.z:0,k=x-b,M=m*m+v*v+S*S;if(k*k/c<M)return M<u&&(m===0&&(m=Ct(i),M+=m*m),n>1&&v===0&&(v=Ct(i),M+=v*v),n>2&&S===0&&(S=Ct(i),M+=S*S),M<l&&(M=Math.sqrt(l*M)),r.vx+=m*_.value*o/M,n>1&&(r.vy+=v*_.value*o/M),n>2&&(r.vz+=S*_.value*o/M)),!0;if(_.length||M>=u)return;(_.data!==r||_.next)&&(m===0&&(m=Ct(i),M+=m*m),n>1&&v===0&&(v=Ct(i),M+=v*v),n>2&&S===0&&(S=Ct(i),M+=S*S),M<l&&(M=Math.sqrt(l*M)));do _.data!==r&&(k=s[_.data.index]*o/M,r.vx+=m*k,n>1&&(r.vy+=v*k),n>2&&(r.vz+=S*k));while(_=_.next)}return h.initialize=function(_,...b){e=_,i=b.find(y=>typeof y=="function")||Math.random,n=b.find(y=>[1,2,3].includes(y))||2,f()},h.strength=function(_){return arguments.length?(a=typeof _=="function"?_:At(+_),f(),h):a},h.distanceMin=function(_){return arguments.length?(l=_*_,h):Math.sqrt(l)},h.distanceMax=function(_){return arguments.length?(u=_*_,h):Math.sqrt(u)},h.theta=function(_){return arguments.length?(c=_*_,h):Math.sqrt(c)},h}function lf(e,n,r,i){var o,a,s=At(.1),l,u;typeof e!="function"&&(e=At(+e)),n==null&&(n=0),r==null&&(r=0),i==null&&(i=0);function c(f){for(var d=0,p=o.length;d<p;++d){var _=o[d],b=_.x-n||1e-6,y=(_.y||0)-r||1e-6,g=(_.z||0)-i||1e-6,w=Math.sqrt(b*b+y*y+g*g),x=(u[d]-w)*l[d]*f/w;_.vx+=b*x,a>1&&(_.vy+=y*x),a>2&&(_.vz+=g*x)}}function h(){if(o){var f,d=o.length;for(l=new Array(d),u=new Array(d),f=0;f<d;++f)u[f]=+e(o[f],f,o),l[f]=isNaN(u[f])?0:+s(o[f],f,o)}}return c.initialize=function(f,...d){o=f,a=d.find(p=>[1,2,3].includes(p))||2,h()},c.strength=function(f){return arguments.length?(s=typeof f=="function"?f:At(+f),h(),c):s},c.radius=function(f){return arguments.length?(e=typeof f=="function"?f:At(+f),h(),c):e},c.x=function(f){return arguments.length?(n=+f,c):n},c.y=function(f){return arguments.length?(r=+f,c):r},c.z=function(f){return arguments.length?(i=+f,c):i},c}const{abs:Yt,cos:St,sin:Ft,acos:uf,atan2:Kt,sqrt:Et,pow:at}=Math;function Zt(e){return e<0?-at(-e,1/3):at(e,1/3)}const ji=Math.PI,me=2*ji,Nt=ji/2,cf=1e-6,Qe=Number.MAX_SAFE_INTEGER||9007199254740991,Je=Number.MIN_SAFE_INTEGER||-9007199254740991,ff={x:0,y:0,z:0},T={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){const r=n(e);let i=r.x*r.x+r.y*r.y;return typeof r.z<"u"&&(i+=r.z*r.z),Et(i)},compute:function(e,n,r){if(e===0)return n[0].t=0,n[0];const i=n.length-1;if(e===1)return n[i].t=1,n[i];const o=1-e;let a=n;if(i===0)return n[0].t=e,n[0];if(i===1){const l={x:o*a[0].x+e*a[1].x,y:o*a[0].y+e*a[1].y,t:e};return r&&(l.z=o*a[0].z+e*a[1].z),l}if(i<4){let l=o*o,u=e*e,c,h,f,d=0;i===2?(a=[a[0],a[1],a[2],ff],c=l,h=o*e*2,f=u):i===3&&(c=l*o,h=l*e*3,f=o*u*3,d=e*u);const p={x:c*a[0].x+h*a[1].x+f*a[2].x+d*a[3].x,y:c*a[0].y+h*a[1].y+f*a[2].y+d*a[3].y,t:e};return r&&(p.z=c*a[0].z+h*a[1].z+f*a[2].z+d*a[3].z),p}const s=JSON.parse(JSON.stringify(n));for(;s.length>1;){for(let l=0;l<s.length-1;l++)s[l]={x:s[l].x+(s[l+1].x-s[l].x)*e,y:s[l].y+(s[l+1].y-s[l].y)*e},typeof s[l].z<"u"&&(s[l].z=s[l].z+(s[l+1].z-s[l].z)*e);s.splice(s.length-1,1)}return s[0].t=e,s[0]},computeWithRatios:function(e,n,r,i){const o=1-e,a=r,s=n;let l=a[0],u=a[1],c=a[2],h=a[3],f;if(l*=o,u*=e,s.length===2)return f=l+u,{x:(l*s[0].x+u*s[1].x)/f,y:(l*s[0].y+u*s[1].y)/f,z:i?(l*s[0].z+u*s[1].z)/f:!1,t:e};if(l*=o,u*=2*o,c*=e*e,s.length===3)return f=l+u+c,{x:(l*s[0].x+u*s[1].x+c*s[2].x)/f,y:(l*s[0].y+u*s[1].y+c*s[2].y)/f,z:i?(l*s[0].z+u*s[1].z+c*s[2].z)/f:!1,t:e};if(l*=o,u*=1.5*o,c*=3*o,h*=e*e*e,s.length===4)return f=l+u+c+h,{x:(l*s[0].x+u*s[1].x+c*s[2].x+h*s[3].x)/f,y:(l*s[0].y+u*s[1].y+c*s[2].y+h*s[3].y)/f,z:i?(l*s[0].z+u*s[1].z+c*s[2].z+h*s[3].z)/f:!1,t:e}},derive:function(e,n){const r=[];for(let i=e,o=i.length,a=o-1;o>1;o--,a--){const s=[];for(let l=0,u;l<a;l++)u={x:a*(i[l+1].x-i[l].x),y:a*(i[l+1].y-i[l].y)},n&&(u.z=a*(i[l+1].z-i[l].z)),s.push(u);r.push(s),i=s}return r},between:function(e,n,r){return n<=e&&e<=r||T.approximately(e,n)||T.approximately(e,r)},approximately:function(e,n,r){return Yt(e-n)<=(r||cf)},length:function(e){const r=T.Tvalues.length;let i=0;for(let o=0,a;o<r;o++)a=.5*T.Tvalues[o]+.5,i+=T.Cvalues[o]*T.arcfn(a,e);return .5*i},map:function(e,n,r,i,o){const a=r-n,s=o-i,l=e-n,u=l/a;return i+s*u},lerp:function(e,n,r){const 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 typeof e.z<"u"&&(n+="/"+e.z),n},pointsToString:function(e){return"["+e.map(T.pointToString).join(", ")+"]"},copy:function(e){return JSON.parse(JSON.stringify(e))},angle:function(e,n,r){const i=n.x-e.x,o=n.y-e.y,a=r.x-e.x,s=r.y-e.y,l=i*s-o*a,u=i*a+o*s;return Kt(l,u)},round:function(e,n){const r=""+e,i=r.indexOf(".");return parseFloat(r.substring(0,i+1+n))},dist:function(e,n){const r=e.x-n.x,i=e.y-n.y;return Et(r*r+i*i)},closest:function(e,n){let r=at(2,63),i,o;return e.forEach(function(a,s){o=T.dist(n,a),o<r&&(r=o,i=s)}),{mdist:r,mpos:i}},abcratio:function(e,n){if(n!==2&&n!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const r=at(e,n)+at(1-e,n),i=r-1;return Yt(i/r)},projectionratio:function(e,n){if(n!==2&&n!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const r=at(1-e,n),i=at(e,n)+r;return r/i},lli8:function(e,n,r,i,o,a,s,l){const u=(e*i-n*r)*(o-s)-(e-r)*(o*l-a*s),c=(e*i-n*r)*(a-l)-(n-i)*(o*l-a*s),h=(e-r)*(a-l)-(n-i)*(o-s);return h==0?!1:{x:u/h,y:c/h}},lli4:function(e,n,r,i){const o=e.x,a=e.y,s=n.x,l=n.y,u=r.x,c=r.y,h=i.x,f=i.y;return T.lli8(o,a,s,l,u,c,h,f)},lli:function(e,n){return T.lli4(e,e.c,n,n.c)},makeline:function(e,n){return new q(e.x,e.y,(e.x+n.x)/2,(e.y+n.y)/2,n.x,n.y)},findbbox:function(e){let n=Qe,r=Qe,i=Je,o=Je;return e.forEach(function(a){const s=a.bbox();n>s.x.min&&(n=s.x.min),r>s.y.min&&(r=s.y.min),i<s.x.max&&(i=s.x.max),o<s.y.max&&(o=s.y.max)}),{x:{min:n,mid:(n+i)/2,max:i,size:i-n},y:{min:r,mid:(r+o)/2,max:o,size:o-r}}},shapeintersections:function(e,n,r,i,o){if(!T.bboxoverlap(n,i))return[];const a=[],s=[e.startcap,e.forward,e.back,e.endcap],l=[r.startcap,r.forward,r.back,r.endcap];return s.forEach(function(u){u.virtual||l.forEach(function(c){if(c.virtual)return;const h=u.intersects(c,o);h.length>0&&(h.c1=u,h.c2=c,h.s1=e,h.s2=r,a.push(h))})}),a},makeshape:function(e,n,r){const i=n.points.length,o=e.points.length,a=T.makeline(n.points[i-1],e.points[0]),s=T.makeline(e.points[o-1],n.points[0]),l={startcap:a,forward:e,back:n,endcap:s,bbox:T.findbbox([a,e,n,s])};return l.intersections=function(u){return T.shapeintersections(l,l.bbox,u,u.bbox,r)},l},getminmax:function(e,n,r){if(!r)return{min:0,max:0};let i=Qe,o=Je,a,s;r.indexOf(0)===-1&&(r=[0].concat(r)),r.indexOf(1)===-1&&r.push(1);for(let l=0,u=r.length;l<u;l++)a=r[l],s=e.get(a),s[n]<i&&(i=s[n]),s[n]>o&&(o=s[n]);return{min:i,mid:(i+o)/2,max:o,size:o-i}},align:function(e,n){const r=n.p1.x,i=n.p1.y,o=-Kt(n.p2.y-i,n.p2.x-r),a=function(s){return{x:(s.x-r)*St(o)-(s.y-i)*Ft(o),y:(s.x-r)*Ft(o)+(s.y-i)*St(o)}};return e.map(a)},roots:function(e,n){n=n||{p1:{x:0,y:0},p2:{x:1,y:0}};const r=e.length-1,i=T.align(e,n),o=function(k){return 0<=k&&k<=1};if(r===2){const k=i[0].y,M=i[1].y,N=i[2].y,E=k-2*M+N;if(E!==0){const I=-Et(M*M-k*N),R=-k+M,j=-(I+R)/E,C=-(-I+R)/E;return[j,C].filter(o)}else if(M!==N&&E===0)return[(2*M-N)/(2*M-2*N)].filter(o);return[]}const a=i[0].y,s=i[1].y,l=i[2].y,u=i[3].y;let c=-a+3*s-3*l+u,h=3*a-6*s+3*l,f=-3*a+3*s,d=a;if(T.approximately(c,0)){if(T.approximately(h,0))return T.approximately(f,0)?[]:[-d/f].filter(o);const k=Et(f*f-4*h*d),M=2*h;return[(k-f)/M,(-f-k)/M].filter(o)}h/=c,f/=c,d/=c;const p=(3*f-h*h)/3,_=p/3,b=(2*h*h*h-9*h*f+27*d)/27,y=b/2,g=y*y+_*_*_;let w,x,m,v,S;if(g<0){const k=-p/3,M=k*k*k,N=Et(M),E=-b/(2*N),I=E<-1?-1:E>1?1:E,R=uf(I),j=Zt(N),C=2*j;return m=C*St(R/3)-h/3,v=C*St((R+me)/3)-h/3,S=C*St((R+2*me)/3)-h/3,[m,v,S].filter(o)}else{if(g===0)return w=y<0?Zt(-y):-Zt(y),m=2*w-h/3,v=-w-h/3,[m,v].filter(o);{const k=Et(g);return w=Zt(-y+k),x=Zt(y+k),[w-x-h/3].filter(o)}}},droots:function(e){if(e.length===3){const n=e[0],r=e[1],i=e[2],o=n-2*r+i;if(o!==0){const a=-Et(r*r-n*i),s=-n+r,l=-(a+s)/o,u=-(-a+s)/o;return[l,u]}else if(r!==i&&o===0)return[(2*r-i)/(2*(r-i))];return[]}if(e.length===2){const n=e[0],r=e[1];return n!==r?[n/(n-r)]:[]}return[]},curvature:function(e,n,r,i,o){let a,s,l,u,c=0,h=0;const f=T.compute(e,n),d=T.compute(e,r),p=f.x*f.x+f.y*f.y;if(i?(a=Et(at(f.y*d.z-d.y*f.z,2)+at(f.z*d.x-d.z*f.x,2)+at(f.x*d.y-d.x*f.y,2)),s=at(p+f.z*f.z,3/2)):(a=f.x*d.y-f.y*d.x,s=at(p,3/2)),a===0||s===0)return{k:0,r:0};if(c=a/s,h=s/a,!o){const _=T.curvature(e-.001,n,r,i,!0).k,b=T.curvature(e+.001,n,r,i,!0).k;u=(b-c+(c-_))/2,l=(Yt(b-c)+Yt(c-_))/2}return{k:c,r:h,dk:u,adk:l}},inflections:function(e){if(e.length<4)return[];const n=T.align(e,{p1:e[0],p2:e.slice(-1)[0]}),r=n[2].x*n[1].y,i=n[3].x*n[1].y,o=n[1].x*n[2].y,a=n[3].x*n[2].y,s=18*(-3*r+2*i+3*o-a),l=18*(3*r-i-3*o),u=18*(o-r);if(T.approximately(s,0)){if(!T.approximately(l,0)){let d=-u/l;if(0<=d&&d<=1)return[d]}return[]}const c=2*s;if(T.approximately(c,0))return[];const h=l*l-4*s*u;if(h<0)return[];const f=Math.sqrt(h);return[(f-l)/c,-(l+f)/c].filter(function(d){return 0<=d&&d<=1})},bboxoverlap:function(e,n){const r=["x","y"],i=r.length;for(let o=0,a,s,l,u;o<i;o++)if(a=r[o],s=e[a].mid,l=n[a].mid,u=(e[a].size+n[a].size)/2,Yt(s-l)>=u)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){const i=e.bbox(),o=n.bbox(),a=1e5,s=r||.5;if(i.x.size+i.y.size<s&&o.x.size+o.y.size<s)return[(a*(e._t1+e._t2)/2|0)/a+"/"+(a*(n._t1+n._t2)/2|0)/a];let l=e.split(.5),u=n.split(.5),c=[{left:l.left,right:u.left},{left:l.left,right:u.right},{left:l.right,right:u.right},{left:l.right,right:u.left}];c=c.filter(function(f){return T.bboxoverlap(f.left.bbox(),f.right.bbox())});let h=[];return c.length===0||(c.forEach(function(f){h=h.concat(T.pairiteration(f.left,f.right,s))}),h=h.filter(function(f,d){return h.indexOf(f)===d})),h},getccenter:function(e,n,r){const i=n.x-e.x,o=n.y-e.y,a=r.x-n.x,s=r.y-n.y,l=i*St(Nt)-o*Ft(Nt),u=i*Ft(Nt)+o*St(Nt),c=a*St(Nt)-s*Ft(Nt),h=a*Ft(Nt)+s*St(Nt),f=(e.x+n.x)/2,d=(e.y+n.y)/2,p=(n.x+r.x)/2,_=(n.y+r.y)/2,b=f+l,y=d+u,g=p+c,w=_+h,x=T.lli8(f,d,b,y,p,_,g,w),m=T.dist(x,e);let v=Kt(e.y-x.y,e.x-x.x),S=Kt(n.y-x.y,n.x-x.x),k=Kt(r.y-x.y,r.x-x.x),M;return v<k?((v>S||S>k)&&(v+=me),v>k&&(M=k,k=v,v=M)):k<S&&S<v?(M=k,k=v,v=M):k+=me,x.s=v,x.e=k,x.r=m,x},numberSort:function(e,n){return e-n}};class se{constructor(n){this.curves=[],this._3d=!1,n&&(this.curves=n,this._3d=this.curves[0]._3d)}valueOf(){return this.toString()}toString(){return"["+this.curves.map(function(n){return T.pointsToString(n.points)}).join(", ")+"]"}addCurve(n){this.curves.push(n),this._3d=this._3d||n._3d}length(){return this.curves.map(function(n){return n.length()}).reduce(function(n,r){return n+r})}curve(n){return this.curves[n]}bbox(){const n=this.curves;for(var r=n[0].bbox(),i=1;i<n.length;i++)T.expandbox(r,n[i].bbox());return r}offset(n){const r=[];return this.curves.forEach(function(i){r.push(...i.offset(n))}),new se(r)}}const{abs:Qt,min:Cr,max:Mr,cos:hf,sin:df,acos:pf,sqrt:Jt}=Math,gf=Math.PI;class q{constructor(n){let r=n&&n.forEach?n:Array.from(arguments).slice(),i=!1;if(typeof r[0]=="object"){i=r.length;const p=[];r.forEach(function(_){["x","y","z"].forEach(function(b){typeof _[b]<"u"&&p.push(_[b])})}),r=p}let o=!1;const a=r.length;if(i){if(i>4){if(arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");o=!0}}else if(a!==6&&a!==8&&a!==9&&a!==12&&arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const s=this._3d=!o&&(a===9||a===12)||n&&n[0]&&typeof n[0].z<"u",l=this.points=[];for(let p=0,_=s?3:2;p<a;p+=_){var u={x:r[p],y:r[p+1]};s&&(u.z=r[p+2]),l.push(u)}const c=this.order=l.length-1,h=this.dims=["x","y"];s&&h.push("z"),this.dimlen=h.length;const f=T.align(l,{p1:l[0],p2:l[c]}),d=T.dist(l[0],l[c]);this._linear=f.reduce((p,_)=>p+Qt(_.y),0)<d/50,this._lut=[],this._t1=0,this._t2=1,this.update()}static quadraticFromPoints(n,r,i,o){if(typeof o>"u"&&(o=.5),o===0)return new q(r,r,i);if(o===1)return new q(n,r,r);const a=q.getABC(2,n,r,i,o);return new q(n,a.A,i)}static cubicFromPoints(n,r,i,o,a){typeof o>"u"&&(o=.5);const s=q.getABC(3,n,r,i,o);typeof a>"u"&&(a=T.dist(r,s.C));const l=a*(1-o)/o,u=T.dist(n,i),c=(i.x-n.x)/u,h=(i.y-n.y)/u,f=a*c,d=a*h,p=l*c,_=l*h,b={x:r.x-f,y:r.y-d},y={x:r.x+p,y:r.y+_},g=s.A,w={x:g.x+(b.x-g.x)/(1-o),y:g.y+(b.y-g.y)/(1-o)},x={x:g.x+(y.x-g.x)/o,y:g.y+(y.y-g.y)/o},m={x:n.x+(w.x-n.x)/o,y:n.y+(w.y-n.y)/o},v={x:i.x+(x.x-i.x)/(1-o),y:i.y+(x.y-i.y)/(1-o)};return new q(n,m,v,i)}static getUtils(){return T}getUtils(){return q.getUtils()}static get PolyBezier(){return se}valueOf(){return this.toString()}toString(){return T.pointsToString(this.points)}toSVG(){if(this._3d)return!1;const n=this.points,r=n[0].x,i=n[0].y,o=["M",r,i,this.order===2?"Q":"C"];for(let a=1,s=n.length;a<s;a++)o.push(n[a].x),o.push(n[a].y);return o.join(" ")}setRatios(n){if(n.length!==this.points.length)throw new Error("incorrect number of ratio values");this.ratios=n,this._lut=[]}verify(){const n=this.coordDigest();n!==this._print&&(this._print=n,this.update())}coordDigest(){return this.points.map(function(n,r){return""+r+n.x+n.y+(n.z?n.z:0)}).join("")}update(){this._lut=[],this.dpoints=T.derive(this.points,this._3d),this.computedirection()}computedirection(){const n=this.points,r=T.angle(n[0],n[this.order],n[1]);this.clockwise=r>0}length(){return T.length(this.derivative.bind(this))}static getABC(n=2,r,i,o,a=.5){const s=T.projectionratio(a,n),l=1-s,u={x:s*r.x+l*o.x,y:s*r.y+l*o.y},c=T.abcratio(a,n);return{A:{x:i.x+(i.x-u.x)/c,y:i.y+(i.y-u.y)/c},B:i,C:u,S:r,E:o}}getABC(n,r){r=r||this.get(n);let i=this.points[0],o=this.points[this.order];return q.getABC(this.order,i,r,o,n)}getLUT(n){if(this.verify(),n=n||100,this._lut.length===n+1)return this._lut;this._lut=[],n++,this._lut=[];for(let r=0,i,o;r<n;r++)o=r/(n-1),i=this.compute(o),i.t=o,this._lut.push(i);return this._lut}on(n,r){r=r||5;const i=this.getLUT(),o=[];for(let a=0,s,l=0;a<i.length;a++)s=i[a],T.dist(s,n)<r&&(o.push(s),l+=a/i.length);return o.length?t/=o.length:!1}project(n){const r=this.getLUT(),i=r.length-1,o=T.closest(r,n),a=o.mpos,s=(a-1)/i,l=(a+1)/i,u=.1/i;let c=o.mdist,h=s,f=h,d;c+=1;for(let p;h<l+u;h+=u)d=this.compute(h),p=T.dist(n,d),p<c&&(c=p,f=h);return f=f<0?0:f>1?1:f,d=this.compute(f),d.t=f,d.d=c,d}get(n){return this.compute(n)}point(n){return this.points[n]}compute(n){return this.ratios?T.computeWithRatios(n,this.points,this.ratios,this._3d):T.compute(n,this.points,this._3d,this.ratios)}raise(){const n=this.points,r=[n[0]],i=n.length;for(let o=1,a,s;o<i;o++)a=n[o],s=n[o-1],r[o]={x:(i-o)/i*a.x+o/i*s.x,y:(i-o)/i*a.y+o/i*s.y};return r[i]=n[i-1],new q(r)}derivative(n){return T.compute(n,this.dpoints[0],this._3d)}dderivative(n){return T.compute(n,this.dpoints[1],this._3d)}align(){let n=this.points;return new q(T.align(n,{p1:n[0],p2:n[n.length-1]}))}curvature(n){return T.curvature(n,this.dpoints[0],this.dpoints[1],this._3d)}inflections(){return T.inflections(this.points)}normal(n){return this._3d?this.__normal3(n):this.__normal2(n)}__normal2(n){const r=this.derivative(n),i=Jt(r.x*r.x+r.y*r.y);return{t:n,x:-r.y/i,y:r.x/i}}__normal3(n){const r=this.derivative(n),i=this.derivative(n+.01),o=Jt(r.x*r.x+r.y*r.y+r.z*r.z),a=Jt(i.x*i.x+i.y*i.y+i.z*i.z);r.x/=o,r.y/=o,r.z/=o,i.x/=a,i.y/=a,i.z/=a;const s={x:i.y*r.z-i.z*r.y,y:i.z*r.x-i.x*r.z,z:i.x*r.y-i.y*r.x},l=Jt(s.x*s.x+s.y*s.y+s.z*s.z);s.x/=l,s.y/=l,s.z/=l;const u=[s.x*s.x,s.x*s.y-s.z,s.x*s.z+s.y,s.x*s.y+s.z,s.y*s.y,s.y*s.z-s.x,s.x*s.z-s.y,s.y*s.z+s.x,s.z*s.z];return{t:n,x:u[0]*r.x+u[1]*r.y+u[2]*r.z,y:u[3]*r.x+u[4]*r.y+u[5]*r.z,z:u[6]*r.x+u[7]*r.y+u[8]*r.z}}hull(n){let r=this.points,i=[],o=[],a=0;for(o[a++]=r[0],o[a++]=r[1],o[a++]=r[2],this.order===3&&(o[a++]=r[3]);r.length>1;){i=[];for(let s=0,l,u=r.length-1;s<u;s++)l=T.lerp(n,r[s],r[s+1]),o[a++]=l,i.push(l);r=i}return o}split(n,r){if(n===0&&r)return this.split(r).left;if(r===1)return this.split(n).right;const i=this.hull(n),o={left:this.order===2?new q([i[0],i[3],i[5]]):new q([i[0],i[4],i[7],i[9]]),right:this.order===2?new q([i[5],i[4],i[2]]):new q([i[9],i[8],i[6],i[3]]),span:i};return o.left._t1=T.map(0,0,1,this._t1,this._t2),o.left._t2=T.map(n,0,1,this._t1,this._t2),o.right._t1=T.map(n,0,1,this._t1,this._t2),o.right._t2=T.map(1,0,1,this._t1,this._t2),r?(r=T.map(r,n,1,0,1),o.right.split(r).left):o}extrema(){const n={};let r=[];return this.dims.forEach((function(i){let o=function(s){return s[i]},a=this.dpoints[0].map(o);n[i]=T.droots(a),this.order===3&&(a=this.dpoints[1].map(o),n[i]=n[i].concat(T.droots(a))),n[i]=n[i].filter(function(s){return s>=0&&s<=1}),r=r.concat(n[i].sort(T.numberSort))}).bind(this)),n.values=r.sort(T.numberSort).filter(function(i,o){return r.indexOf(i)===o}),n}bbox(){const n=this.extrema(),r={};return this.dims.forEach((function(i){r[i]=T.getminmax(this,i,n[i])}).bind(this)),r}overlaps(n){const r=this.bbox(),i=n.bbox();return T.bboxoverlap(r,i)}offset(n,r){if(typeof r<"u"){const i=this.get(n),o=this.normal(n),a={c:i,n:o,x:i.x+o.x*r,y:i.y+o.y*r};return this._3d&&(a.z=i.z+o.z*r),a}if(this._linear){const i=this.normal(0),o=this.points.map(function(a){const s={x:a.x+n*i.x,y:a.y+n*i.y};return a.z&&i.z&&(s.z=a.z+n*i.z),s});return[new q(o)]}return this.reduce().map(function(i){return i._linear?i.offset(n)[0]:i.scale(n)})}simple(){if(this.order===3){const o=T.angle(this.points[0],this.points[3],this.points[1]),a=T.angle(this.points[0],this.points[3],this.points[2]);if(o>0&&a<0||o<0&&a>0)return!1}const n=this.normal(0),r=this.normal(1);let i=n.x*r.x+n.y*r.y;return this._3d&&(i+=n.z*r.z),Qt(pf(i))<gf/3}reduce(){let n,r=0,i=0,o=.01,a,s=[],l=[],u=this.extrema().values;for(u.indexOf(0)===-1&&(u=[0].concat(u)),u.indexOf(1)===-1&&u.push(1),r=u[0],n=1;n<u.length;n++)i=u[n],a=this.split(r,i),a._t1=r,a._t2=i,s.push(a),r=i;return s.forEach(function(c){for(r=0,i=0;i<=1;)for(i=r+o;i<=1+o;i+=o)if(a=c.split(r,i),!a.simple()){if(i-=o,Qt(r-i)<o)return[];a=c.split(r,i),a._t1=T.map(r,0,1,c._t1,c._t2),a._t2=T.map(i,0,1,c._t1,c._t2),l.push(a),r=i;break}r<1&&(a=c.split(r,1),a._t1=T.map(r,0,1,c._t1,c._t2),a._t2=c._t2,l.push(a))}),l}translate(n,r,i){i=typeof i=="number"?i:r;const o=this.order;let a=this.points.map((s,l)=>(1-l/o)*r+l/o*i);return new q(this.points.map((s,l)=>({x:s.x+n.x*a[l],y:s.y+n.y*a[l]})))}scale(n){const r=this.order;let i=!1;if(typeof n=="function"&&(i=n),i&&r===2)return this.raise().scale(i);const o=this.clockwise,a=this.points;if(this._linear)return this.translate(this.normal(0),i?i(0):n,i?i(1):n);const s=i?i(0):n,l=i?i(1):n,u=[this.offset(0,10),this.offset(1,10)],c=[],h=T.lli4(u[0],u[0].c,u[1],u[1].c);if(!h)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach(function(f){const d=c[f*r]=T.copy(a[f*r]);d.x+=(f?l:s)*u[f].n.x,d.y+=(f?l:s)*u[f].n.y}),i?([0,1].forEach(function(f){if(!(r===2&&f)){var d=a[f+1],p={x:d.x-h.x,y:d.y-h.y},_=i?i((f+1)/r):n;i&&!o&&(_=-_);var b=Jt(p.x*p.x+p.y*p.y);p.x/=b,p.y/=b,c[f+1]={x:d.x+_*p.x,y:d.y+_*p.y}}}),new q(c)):([0,1].forEach(f=>{if(r===2&&f)return;const d=c[f*r],p=this.derivative(f),_={x:d.x+p.x,y:d.y+p.y};c[f+1]=T.lli4(d,_,h,a[f+1])}),new q(c))}outline(n,r,i,o){if(r=r===void 0?n:r,this._linear){const v=this.normal(0),S=this.points[0],k=this.points[this.points.length-1];let M,N,E;i===void 0&&(i=n,o=r),M={x:S.x+v.x*n,y:S.y+v.y*n},E={x:k.x+v.x*i,y:k.y+v.y*i},N={x:(M.x+E.x)/2,y:(M.y+E.y)/2};const I=[M,N,E];M={x:S.x-v.x*r,y:S.y-v.y*r},E={x:k.x-v.x*o,y:k.y-v.y*o},N={x:(M.x+E.x)/2,y:(M.y+E.y)/2};const R=[E,N,M],j=T.makeline(R[2],I[0]),C=T.makeline(I[2],R[0]),z=[j,new q(I),C,new q(R)];return new se(z)}const a=this.reduce(),s=a.length,l=[];let u=[],c,h=0,f=this.length();const d=typeof i<"u"&&typeof o<"u";function p(v,S,k,M,N){return function(E){const I=M/k,R=(M+N)/k,j=S-v;return T.map(E,0,1,v+I*j,v+R*j)}}a.forEach(function(v){const S=v.length();d?(l.push(v.scale(p(n,i,f,h,S))),u.push(v.scale(p(-r,-o,f,h,S)))):(l.push(v.scale(n)),u.push(v.scale(-r))),h+=S}),u=u.map(function(v){return c=v.points,c[3]?v.points=[c[3],c[2],c[1],c[0]]:v.points=[c[2],c[1],c[0]],v}).reverse();const _=l[0].points[0],b=l[s-1].points[l[s-1].points.length-1],y=u[s-1].points[u[s-1].points.length-1],g=u[0].points[0],w=T.makeline(y,_),x=T.makeline(b,g),m=[w].concat(l).concat([x]).concat(u);return new se(m)}outlineshapes(n,r,i){r=r||n;const o=this.outline(n,r).curves,a=[];for(let s=1,l=o.length;s<l/2;s++){const u=T.makeshape(o[s],o[l-s],i);u.startcap.virtual=s>1,u.endcap.virtual=s<l/2-1,a.push(u)}return a}intersects(n,r){return n?n.p1&&n.p2?this.lineIntersects(n):(n instanceof q&&(n=n.reduce()),this.curveintersects(this.reduce(),n,r)):this.selfintersects(r)}lineIntersects(n){const r=Cr(n.p1.x,n.p2.x),i=Cr(n.p1.y,n.p2.y),o=Mr(n.p1.x,n.p2.x),a=Mr(n.p1.y,n.p2.y);return T.roots(this.points,n).filter(s=>{var l=this.get(s);return T.between(l.x,r,o)&&T.between(l.y,i,a)})}selfintersects(n){const r=this.reduce(),i=r.length-2,o=[];for(let a=0,s,l,u;a<i;a++)l=r.slice(a,a+1),u=r.slice(a+2),s=this.curveintersects(l,u,n),o.push(...s);return o}curveintersects(n,r,i){const o=[];n.forEach(function(s){r.forEach(function(l){s.overlaps(l)&&o.push({left:s,right:l})})});let a=[];return o.forEach(function(s){const l=T.pairiteration(s.left,s.right,i);l.length>0&&(a=a.concat(l))}),a}arcs(n){return n=n||.5,this._iterate(n,[])}_error(n,r,i,o){const a=(o-i)/4,s=this.get(i+a),l=this.get(o-a),u=T.dist(n,r),c=T.dist(n,s),h=T.dist(n,l);return Qt(c-u)+Qt(h-u)}_iterate(n,r){let i=0,o=1,a;do{a=0,o=1;let s=this.get(i),l,u,c,h,f=!1,d=!1,p,_=o,b=1;do if(d=f,h=c,_=(i+o)/2,l=this.get(_),u=this.get(o),c=T.getccenter(s,l,u),c.interval={start:i,end:o},f=this._error(c,s,i,o)<=n,p=d&&!f,p||(b=o),f){if(o>=1){if(c.interval.end=b=1,h=c,o>1){let g={x:c.x+c.r*hf(c.e),y:c.y+c.r*df(c.e)};c.e+=T.angle({x:c.x,y:c.y},g,this.get(1))}break}o=o+(o-i)/2}else o=_;while(!p&&a++<100);if(a>=100)break;h=h||c,r.push(h),i=b}while(o<1);return r}}function mn(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 _f(e){if(Array.isArray(e))return e}function vf(e){if(Array.isArray(e))return mn(e)}function yf(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function mf(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,l=[],u=!0,c=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(u=(i=a.call(r)).done)&&(l.push(i.value),l.length!==n);u=!0);}catch(h){c=!0,o=h}finally{try{if(!u&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw o}}return l}}function bf(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
17
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wf(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
18
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xf(e,n){if(e==null)return{};var r,i,o=kf(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],n.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function kf(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 Sf(e,n){return _f(e)||mf(e,n)||$i(e,n)||bf()}function Cf(e){return vf(e)||yf(e)||$i(e)||wf()}function Mf(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 new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Af(e){var n=Mf(e,"string");return typeof n=="symbol"?n:n+""}function $i(e,n){if(e){if(typeof e=="string")return mn(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)?mn(e,n):void 0}}var Pf=(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,o=(n instanceof Array?n.length?n:[void 0]:[n]).map(function(l){return{keyAccessor:l,isProp:!(l instanceof Function)}}),a=e.reduce(function(l,u){var c=l,h=u;return o.forEach(function(f,d){var p=f.keyAccessor,_=f.isProp,b;if(_){var y=h,g=y[p],w=xf(y,[p].map(Af));b=g,h=w}else b=p(h,d);d+1<o.length?(c.hasOwnProperty(b)||(c[b]={}),c=c[b]):r?(c.hasOwnProperty(b)||(c[b]=[]),c[b].push(h)):c[b]=h}),l},{});r instanceof Function&&(function l(u){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;c===o.length?Object.keys(u).forEach(function(h){return u[h]=r(u[h])}):Object.values(u).forEach(function(h){return l(h,c+1)})})(a);var s=a;return i&&(s=[],(function l(u){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];c.length===o.length?s.push({keys:c,vals:u}):Object.entries(u).forEach(function(h){var f=Sf(h,2),d=f[0],p=f[1];return l(p,[].concat(Cf(c),[d]))})})(a),n instanceof Array&&n.length===0&&s.length===1&&(s[0].keys=[])),s});function Tf(e){for(var n=e.length/6|0,r=new Array(n),i=0;i<n;)r[i]="#"+e.slice(i*6,++i*6);return r}const Ef=Tf("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function Nf(e,n){n===void 0&&(n={});var r=n.insertAt;if(!(typeof document>"u")){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",r==="top"&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var zf=`.force-graph-container canvas {
|
|
19
|
-
display: block;
|
|
20
|
-
user-select: none;
|
|
21
|
-
outline: none;
|
|
22
|
-
-webkit-tap-highlight-color: transparent;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.force-graph-container .clickable {
|
|
26
|
-
cursor: pointer;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.force-graph-container .grabbable {
|
|
30
|
-
cursor: move;
|
|
31
|
-
cursor: grab;
|
|
32
|
-
cursor: -moz-grab;
|
|
33
|
-
cursor: -webkit-grab;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.force-graph-container .grabbable:active {
|
|
37
|
-
cursor: grabbing;
|
|
38
|
-
cursor: -moz-grabbing;
|
|
39
|
-
cursor: -webkit-grabbing;
|
|
40
|
-
}
|
|
41
|
-
`;Nf(zf);function bn(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 If(e){if(Array.isArray(e))return e}function Rf(e){if(Array.isArray(e))return bn(e)}function Ar(e,n,r){if(Li())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,n);var o=new(e.bind.apply(e,i));return o}function fe(e,n,r){return(n=Lf(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Li(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Li=function(){return!!e})()}function Of(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Df(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,l=[],u=!0,c=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(u=(i=a.call(r)).done)&&(l.push(i.value),l.length!==n);u=!0);}catch(h){c=!0,o=h}finally{try{if(!u&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw o}}return l}}function Ff(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
42
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jf(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
43
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pr(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function jt(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?Pr(Object(r),!0).forEach(function(i){fe(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pr(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function le(e,n){return If(e)||Df(e,n)||Ui(e,n)||Ff()}function lt(e){return Rf(e)||Of(e)||Ui(e)||jf()}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 new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function Lf(e){var n=$f(e,"string");return typeof n=="symbol"?n:n+""}function wn(e){"@babel/helpers - typeof";return wn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},wn(e)}function Ui(e,n){if(e){if(typeof e=="string")return bn(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)?bn(e,n):void 0}}var Uf=Xi(Ef);function Tr(e,n,r){!n||typeof r!="string"||e.filter(function(i){return!i[r]}).forEach(function(i){i[r]=Uf(n(i))})}function Hf(e,n){var r=e.nodes,i=e.links,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=o.nodeFilter,s=a===void 0?function(){return!0}:a,l=o.onLoopError,u=l===void 0?function(p){throw"Invalid DAG structure! Found cycle in node path: ".concat(p.join(" -> "),".")}:l,c={};r.forEach(function(p){return c[n(p)]={data:p,out:[],depth:-1,skip:!s(p)}}),i.forEach(function(p){var _=p.source,b=p.target,y=m(_),g=m(b);if(!c.hasOwnProperty(y))throw"Missing source node with id: ".concat(y);if(!c.hasOwnProperty(g))throw"Missing target node with id: ".concat(g);var w=c[y],x=c[g];w.out.push(x);function m(v){return wn(v)==="object"?n(v):v}});var h=[];d(Object.values(c));var f=Object.assign.apply(Object,[{}].concat(lt(Object.entries(c).filter(function(p){var _=le(p,2),b=_[1];return!b.skip}).map(function(p){var _=le(p,2),b=_[0],y=_[1];return fe({},b,y.depth)}))));return f;function d(p){for(var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,y=function(){var m=p[g];if(_.indexOf(m)!==-1){var v=[].concat(lt(_.slice(_.indexOf(m))),[m]).map(function(S){return n(S.data)});return h.some(function(S){return S.length===v.length&&S.every(function(k,M){return k===v[M]})})||(h.push(v),u(v)),1}b>m.depth&&(m.depth=b,d(m.out,[].concat(lt(_),[m]),b+(m.skip?0:1)))},g=0,w=p.length;g<w;g++)y()}}var Bf=2,Q=function(n,r){return r.onNeedsRedraw&&r.onNeedsRedraw()},Er=function(n,r){if(!r.isShadow){var i=B(r.linkDirectionalParticles);r.graphData.links.forEach(function(o){var a=Math.round(Math.abs(i(o)));a?o.__photons=lt(Array(a)).map(function(){return{}}):delete o.__photons})}},je=Tn({props:{graphData:{default:{nodes:[],links:[]},onChange:function(n,r){r.engineRunning=!1,Er(n,r)}},dagMode:{onChange:function(n,r){!n&&(r.graphData.nodes||[]).forEach(function(i){return i.fx=i.fy=void 0})}},dagLevelDistance:{},dagNodeFilter:{default:function(n){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:Er},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(n,r){r.forceLayout.alphaDecay(n)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.alphaTarget(n)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.velocityDecay(n)}},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(n,r,i){return i===void 0?n.forceLayout.force(r):(n.forceLayout.force(r,i),this)},d3ReheatSimulation:function(n){return n.forceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(n){return n.cntTicks=0,n.startTickTime=new Date,n.engineRunning=!0,this},isEngineRunning:function(n){return!!n.engineRunning},tickFrame:function(n){return!n.isShadow&&r(),o(),!n.isShadow&&a(),!n.isShadow&&s(),i(),this;function r(){n.engineRunning&&(++n.cntTicks>n.cooldownTicks||new Date-n.startTickTime>n.cooldownTime||n.d3AlphaMin>0&&n.forceLayout.alpha()<n.d3AlphaMin?(n.engineRunning=!1,n.onEngineStop()):(n.forceLayout.tick(),n.onEngineTick()))}function i(){var l=B(n.nodeVisibility),u=B(n.nodeVal),c=B(n.nodeColor),h=B(n.nodeCanvasObjectMode),f=n.ctx,d=n.isShadow/n.globalScale,p=n.graphData.nodes.filter(l);f.save(),p.forEach(function(_){var b=h(_);if(n.nodeCanvasObject&&(b==="before"||b==="replace")&&(n.nodeCanvasObject(_,f,n.globalScale),b==="replace")){f.restore();return}var y=Math.sqrt(Math.max(0,u(_)||1))*n.nodeRelSize+d;f.beginPath(),f.arc(_.x,_.y,y,0,2*Math.PI,!1),f.fillStyle=c(_)||"rgba(31, 120, 180, 0.92)",f.fill(),n.nodeCanvasObject&&b==="after"&&n.nodeCanvasObject(_,n.ctx,n.globalScale)}),f.restore()}function o(){var l=B(n.linkVisibility),u=B(n.linkColor),c=B(n.linkWidth),h=B(n.linkLineDash),f=B(n.linkCurvature),d=B(n.linkCanvasObjectMode),p=n.ctx,_=n.isShadow*2,b=n.graphData.links.filter(l);b.forEach(S);var y=[],g=[],w=b;if(n.linkCanvasObject){var x=[],m=[];b.forEach(function(k){return({before:y,after:g,replace:x}[d(k)]||m).push(k)}),w=[].concat(lt(y),g,m),y=y.concat(x)}p.save(),y.forEach(function(k){return n.linkCanvasObject(k,p,n.globalScale)}),p.restore();var v=Pf(w,[u,c,h]);p.save(),Object.entries(v).forEach(function(k){var M=le(k,2),N=M[0],E=M[1],I=!N||N==="undefined"?"rgba(0,0,0,0.15)":N;Object.entries(E).forEach(function(R){var j=le(R,2),C=j[0],z=j[1],A=(C||1)/n.globalScale+_;Object.entries(z).forEach(function(O){var F=le(O,2);F[0];var $=F[1],L=h($[0]);p.beginPath(),$.forEach(function(U){var H=U.source,Y=U.target;if(!(!H||!Y||!H.hasOwnProperty("x")||!Y.hasOwnProperty("x"))){p.moveTo(H.x,H.y);var X=U.__controlPoints;X?p[X.length===2?"quadraticCurveTo":"bezierCurveTo"].apply(p,lt(X).concat([Y.x,Y.y])):p.lineTo(Y.x,Y.y)}}),p.strokeStyle=I,p.lineWidth=A,p.setLineDash(L||[]),p.stroke()})})}),p.restore(),p.save(),g.forEach(function(k){return n.linkCanvasObject(k,p,n.globalScale)}),p.restore();function S(k){var M=f(k);if(!M){k.__controlPoints=null;return}var N=k.source,E=k.target;if(!(!N||!E||!N.hasOwnProperty("x")||!E.hasOwnProperty("x"))){var I=Math.sqrt(Math.pow(E.x-N.x,2)+Math.pow(E.y-N.y,2));if(I>0){var R=Math.atan2(E.y-N.y,E.x-N.x),j=I*M,C={x:(N.x+E.x)/2+j*Math.cos(R-Math.PI/2),y:(N.y+E.y)/2+j*Math.sin(R-Math.PI/2)};k.__controlPoints=[C.x,C.y]}else{var z=M*70;k.__controlPoints=[E.x,E.y-z,E.x+z,E.y]}}}}function a(){var l=1.6,u=.2,c=B(n.linkDirectionalArrowLength),h=B(n.linkDirectionalArrowRelPos),f=B(n.linkVisibility),d=B(n.linkDirectionalArrowColor||n.linkColor),p=B(n.nodeVal),_=n.ctx;_.save(),n.graphData.links.filter(f).forEach(function(b){var y=c(b);if(!(!y||y<0)){var g=b.source,w=b.target;if(!(!g||!w||!g.hasOwnProperty("x")||!w.hasOwnProperty("x"))){var x=Math.sqrt(Math.max(0,p(g)||1))*n.nodeRelSize,m=Math.sqrt(Math.max(0,p(w)||1))*n.nodeRelSize,v=Math.min(1,Math.max(0,h(b))),S=d(b)||"rgba(0,0,0,0.28)",k=y/l/2,M=b.__controlPoints&&Ar(q,[g.x,g.y].concat(lt(b.__controlPoints),[w.x,w.y])),N=M?function(A){return M.get(A)}:function(A){return{x:g.x+(w.x-g.x)*A||0,y:g.y+(w.y-g.y)*A||0}},E=M?M.length():Math.sqrt(Math.pow(w.x-g.x,2)+Math.pow(w.y-g.y,2)),I=x+y+(E-x-m-y)*v,R=N(I/E),j=N((I-y)/E),C=N((I-y*(1-u))/E),z=Math.atan2(R.y-j.y,R.x-j.x)-Math.PI/2;_.beginPath(),_.moveTo(R.x,R.y),_.lineTo(j.x+k*Math.cos(z),j.y+k*Math.sin(z)),_.lineTo(C.x,C.y),_.lineTo(j.x-k*Math.cos(z),j.y-k*Math.sin(z)),_.fillStyle=S,_.fill()}}}),_.restore()}function s(){var l=B(n.linkDirectionalParticles),u=B(n.linkDirectionalParticleSpeed),c=B(n.linkDirectionalParticleOffset),h=B(n.linkDirectionalParticleWidth),f=B(n.linkVisibility),d=B(n.linkDirectionalParticleColor||n.linkColor),p=n.ctx;p.save(),n.graphData.links.filter(f).forEach(function(_){var b=l(_);if(!(!_.hasOwnProperty("__photons")||!_.__photons.length)){var y=_.source,g=_.target;if(!(!y||!g||!y.hasOwnProperty("x")||!g.hasOwnProperty("x"))){var w=u(_),x=Math.abs(c(_)),m=_.__photons||[],v=Math.max(0,h(_)/2)/Math.sqrt(n.globalScale),S=d(_)||"rgba(0,0,0,0.28)";p.fillStyle=S;var k=_.__controlPoints?Ar(q,[y.x,y.y].concat(lt(_.__controlPoints),[g.x,g.y])):null,M=0,N=!1;m.forEach(function(E){var I=!!E.__singleHop;if(E.hasOwnProperty("__progressRatio")||(E.__progressRatio=I?0:(M+x)/b),!I&&M++,E.__progressRatio+=w,E.__progressRatio>=1)if(!I)E.__progressRatio=E.__progressRatio%1;else{N=!0;return}var R=E.__progressRatio,j=k?k.get(R):{x:y.x+(g.x-y.x)*R||0,y:y.y+(g.y-y.y)*R||0};n.linkDirectionalParticleCanvasObject?n.linkDirectionalParticleCanvasObject(j.x,j.y,_,p,n.globalScale):(p.beginPath(),p.arc(j.x,j.y,v,0,2*Math.PI,!1),p.fill())}),N&&(_.__photons=_.__photons.filter(function(E){return!E.__singleHop||E.__progressRatio<=1}))}}}),p.restore()}},emitParticle:function(n,r){return r&&(!r.__photons&&(r.__photons=[]),r.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:af().force("link",Zc()).force("charge",sf()).force("center",Ju()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(n,r){r.ctx=n},update:function(n,r){n.engineRunning=!1,n.onUpdate(),n.nodeAutoColorBy!==null&&Tr(n.graphData.nodes,B(n.nodeAutoColorBy),n.nodeColor),n.linkAutoColorBy!==null&&Tr(n.graphData.links,B(n.linkAutoColorBy),n.linkColor),n.graphData.links.forEach(function(d){d.source=d[n.linkSource],d.target=d[n.linkTarget]}),n.forceLayout.stop().alpha(1).nodes(n.graphData.nodes);var i=n.forceLayout.force("link");i&&i.id(function(d){return d[n.nodeId]}).links(n.graphData.links);var o=n.dagMode&&Hf(n.graphData,function(d){return d[n.nodeId]},{nodeFilter:n.dagNodeFilter,onLoopError:n.onDagError||void 0}),a=Math.max.apply(Math,lt(Object.values(o||[]))),s=n.dagLevelDistance||n.graphData.nodes.length/(a||1)*Bf*(["radialin","radialout"].indexOf(n.dagMode)!==-1?.7:1);if(["lr","rl","td","bu"].includes(r.dagMode)){var l=["lr","rl"].includes(r.dagMode)?"fx":"fy";n.graphData.nodes.filter(n.dagNodeFilter).forEach(function(d){return delete d[l]})}if(["lr","rl","td","bu"].includes(n.dagMode)){var u=["rl","bu"].includes(n.dagMode),c=function(p){return(o[p[n.nodeId]]-a/2)*s*(u?-1:1)},h=["lr","rl"].includes(n.dagMode)?"fx":"fy";n.graphData.nodes.filter(n.dagNodeFilter).forEach(function(d){return d[h]=c(d)})}n.forceLayout.force("dagRadial",["radialin","radialout"].indexOf(n.dagMode)!==-1?lf(function(d){var p=o[d[n.nodeId]]||-1;return(n.dagMode==="radialin"?a-p:p)*s}).strength(function(d){return n.dagNodeFilter(d)?1:0}):null);for(var f=0;f<n.warmupTicks&&!(n.d3AlphaMin>0&&n.forceLayout.alpha()<n.d3AlphaMin);f++)n.forceLayout.tick();this.resetCountdown(),n.onFinishUpdate()}});function Hi(e,n){var r=e instanceof Array?e:[e],i=new n;return i._destructor&&i._destructor(),{linkProp:function(a){return{default:i[a](),onChange:function(l,u){r.forEach(function(c){return u[c][a](l)})},triggerUpdate:!1}},linkMethod:function(a){return function(s){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c<l;c++)u[c-1]=arguments[c];var h=[];return r.forEach(function(f){var d=s[f],p=d[a].apply(d,u);p!==d&&h.push(p)}),h.length?h[0]:this}}}}var Wf=800,qf=4,Vf=5,Bi=Hi("forceGraph",je),Gf=Hi(["forceGraph","shadowGraph"],je),Xf=Object.assign.apply(Object,lt(["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"].map(function(e){return fe({},e,Bi.linkProp(e))})).concat(lt(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map(function(e){return fe({},e,Gf.linkProp(e))})))),Yf=Object.assign.apply(Object,lt(["d3Force","d3ReheatSimulation","emitParticle"].map(function(e){return fe({},e,Bi.linkMethod(e))})));function tn(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="".concat(e.width,"px"),a.style.height="".concat(e.height,"px"),a.width=e.width*i,a.height=e.height*i,!n&&!r&&a.getContext("2d").scale(i,i)});var o=pt(e.canvas).k;e.zoom.translateBy(e.zoom.__baseElem,(e.width-n)/2/o,(e.height-r)/2/o),e.needsRedraw=!0}}function Wi(e){var n=window.devicePixelRatio;e.setTransform(n,0,0,n,0,0)}function Nr(e,n,r){e.save(),Wi(e),e.clearRect(0,0,n,r),e.restore()}var Kf=Tn({props:jt({width:{default:window.innerWidth,onChange:function(n,r){return tn(r)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(n,r){return tn(r)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(n,r){[n.nodes,n.links].every(function(o){return(o||[]).every(function(a){return!a.hasOwnProperty("__indexColor")})})&&r.colorTracker.reset(),[{type:"Node",objs:n.nodes},{type:"Link",objs:n.links}].forEach(i),r.forceGraph.graphData(n),r.shadowGraph.graphData(n);function i(o){var a=o.type,s=o.objs;s.filter(function(l){if(!l.hasOwnProperty("__indexColor"))return!0;var u=r.colorTracker.lookup(l.__indexColor);return!u||!u.hasOwnProperty("d")||u.d!==l}).forEach(function(l){l.__indexColor=r.colorTracker.register({type:a,d:l})})}},triggerUpdate:!1},backgroundColor:{onChange:function(n,r){r.canvas&&n&&(r.canvas.style.background=n)},triggerUpdate:!1},nodeLabel:{default:"name",triggerUpdate:!1},nodePointerAreaPaint:{onChange:function(n,r){r.shadowGraph.nodeCanvasObject(n?function(i,o,a){return n(i,i.__indexColor,o,a)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(n,r){r.shadowGraph.linkCanvasObject(n?function(i,o,a){return n(i,i.__indexColor,o,a)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},minZoom:{default:.01,onChange:function(n,r){r.zoom.scaleExtent([n,r.zoom.scaleExtent()[1]])},triggerUpdate:!1},maxZoom:{default:1e3,onChange:function(n,r){r.zoom.scaleExtent([r.zoom.scaleExtent()[0],n])},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(n,r){r.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}},Xf),aliases:{stopAnimation:"pauseAnimation"},methods:jt({graph2ScreenCoords:function(n,r,i){var o=pt(n.canvas);return{x:r*o.k+o.x,y:i*o.k+o.y}},screen2GraphCoords:function(n,r,i){var o=pt(n.canvas);return{x:(r-o.x)/o.k,y:(i-o.y)/o.k}},centerAt:function(n,r,i,o){if(!n.canvas)return null;if(r!==void 0||i!==void 0){var a=Object.assign({},r!==void 0?{x:r}:{},i!==void 0?{y:i}:{});return o?n.tweenGroup.add(new er(s()).to(a,o).easing(Ot.Quadratic.Out).onUpdate(l).start()):l(a),this}return s();function s(){var u=pt(n.canvas);return{x:(n.width/2-u.x)/u.k,y:(n.height/2-u.y)/u.k}}function l(u){var c=u.x,h=u.y;n.zoom.translateTo(n.zoom.__baseElem,c===void 0?s().x:c,h===void 0?s().y:h),n.needsRedraw=!0}},zoom:function(n,r,i){if(!n.canvas)return null;if(r!==void 0)return i?n.tweenGroup.add(new er({k:o()}).to({k:r},i).easing(Ot.Quadratic.Out).onUpdate(function(s){var l=s.k;return a(l)}).start()):a(r),this;return o();function o(){return pt(n.canvas).k}function a(s){n.zoom.scaleTo(n.zoom.__baseElem,s),n.needsRedraw=!0}},zoomToFit:function(n){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,o=arguments.length,a=new Array(o>3?o-3:0),s=3;s<o;s++)a[s-3]=arguments[s];var l=this.getGraphBbox.apply(this,a);if(l){var u={x:(l.x[0]+l.x[1])/2,y:(l.y[0]+l.y[1])/2},c=Math.max(1e-12,Math.min(1e12,(n.width-i*2)/(l.x[1]-l.x[0]),(n.height-i*2)/(l.y[1]-l.y[0])));this.centerAt(u.x,u.y,r),this.zoom(c,r)}return this},getGraphBbox:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0},i=B(n.nodeVal),o=function(l){return Math.sqrt(Math.max(0,i(l)||1))*n.nodeRelSize},a=n.graphData.nodes.filter(r).map(function(s){return{x:s.x,y:s.y,r:o(s)}});return a.length?{x:[Un(a,function(s){return s.x-s.r}),Hn(a,function(s){return s.x+s.r})],y:[Un(a,function(s){return s.y-s.r}),Hn(a,function(s){return s.y+s.r})]}:null},pauseAnimation:function(n){return n.animationFrameRequestId&&(cancelAnimationFrame(n.animationFrameRequestId),n.animationFrameRequestId=null),this},resumeAnimation:function(n){return n.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},Yf),stateInit:function(){return{lastSetZoom:1,zoom:cl(),forceGraph:new je,shadowGraph:new je().cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new Eu,tweenGroup:new pi}},init:function(n,r){var i=this;n.innerHTML="";var o=document.createElement("div");o.classList.add("force-graph-container"),o.style.position="relative",n.appendChild(o),r.canvas=document.createElement("canvas"),r.backgroundColor&&(r.canvas.style.background=r.backgroundColor),o.appendChild(r.canvas),r.shadowCanvas=document.createElement("canvas");var a=r.canvas.getContext("2d"),s=r.shadowCanvas.getContext("2d",{willReadFrequently:!0}),l={x:-1e12,y:-1e12},u=function(){var f=null,d=window.devicePixelRatio,p=l.x>0&&l.y>0?s.getImageData(l.x*d,l.y*d,1,1):null;return p&&(f=r.colorTracker.lookup(p.data)),f};st(r.canvas).call(Va().subject(function(){if(!r.enableNodeDrag)return null;var h=u();return h&&h.type==="Node"?h.d:null}).on("start",function(h){var f=h.subject;f.__initialDragPos={x:f.x,y:f.y,fx:f.fx,fy:f.fy},h.active||(f.fx=f.x,f.fy=f.y),r.canvas.classList.add("grabbable")}).on("drag",function(h){var f=h.subject,d=f.__initialDragPos,p=h,_=pt(r.canvas).k,b={x:d.x+(p.x-d.x)/_-f.x,y:d.y+(p.y-d.y)/_-f.y};["x","y"].forEach(function(y){return f["f".concat(y)]=f[y]=d[y]+(p[y]-d[y])/_}),!(!f.__dragged&&Vf>=Math.sqrt(Yi(["x","y"].map(function(y){return Math.pow(h[y]-d[y],2)}))))&&(r.forceGraph.d3AlphaTarget(.3).resetCountdown(),r.isPointerDragging=!0,f.__dragged=!0,r.onNodeDrag(f,b))}).on("end",function(h){var f=h.subject,d=f.__initialDragPos,p={x:f.x-d.x,y:f.y-d.y};d.fx===void 0&&(f.fx=void 0),d.fy===void 0&&(f.fy=void 0),delete f.__initialDragPos,r.forceGraph.d3AlphaTarget()&&r.forceGraph.d3AlphaTarget(0).resetCountdown(),r.canvas.classList.remove("grabbable"),r.isPointerDragging=!1,f.__dragged&&(delete f.__dragged,r.onNodeDragEnd(f,p))})),r.zoom(r.zoom.__baseElem=st(r.canvas)),r.zoom.__baseElem.on("dblclick.zoom",null),r.zoom.filter(function(h){return!h.button&&r.enableZoomPanInteraction&&(h.type!=="wheel"||B(r.enableZoomInteraction)(h))&&(h.type==="wheel"||B(r.enablePanInteraction)(h))}).on("zoom",function(h){var f=h.transform;[a,s].forEach(function(d){Wi(d),d.translate(f.x,f.y),d.scale(f.k,f.k)}),r.isPointerDragging=!0,r.onZoom&&r.onZoom(jt(jt({},f),i.centerAt())),r.needsRedraw=!0}).on("end",function(h){r.isPointerDragging=!1,r.onZoomEnd&&r.onZoomEnd(jt(jt({},h.transform),i.centerAt()))}),tn(r),r.forceGraph.onNeedsRedraw(function(){return r.needsRedraw=!0}).onFinishUpdate(function(){pt(r.canvas).k===r.lastSetZoom&&r.graphData.nodes.length&&(r.zoom.scaleTo(r.zoom.__baseElem,r.lastSetZoom=qf/Math.cbrt(r.graphData.nodes.length)),r.needsRedraw=!0)}),r.tooltip=new Qu(o),["pointermove","pointerdown"].forEach(function(h){return o.addEventListener(h,function(f){h==="pointerdown"&&(r.isPointerPressed=!0,r.pointerDownEvent=f),!r.isPointerDragging&&f.type==="pointermove"&&r.onBackgroundClick&&(f.pressure>0||r.isPointerPressed)&&(f.pointerType==="mouse"||f.movementX===void 0||[f.movementX,f.movementY].some(function(_){return Math.abs(_)>1}))&&(r.isPointerDragging=!0);var d=p(o);l.x=f.pageX-d.left,l.y=f.pageY-d.top;function p(_){var b=_.getBoundingClientRect(),y=window.pageXOffset||document.documentElement.scrollLeft,g=window.pageYOffset||document.documentElement.scrollTop;return{top:b.top+g,left:b.left+y}}},{passive:!0})}),o.addEventListener("pointerup",function(h){if(r.isPointerPressed){if(r.isPointerPressed=!1,r.isPointerDragging){r.isPointerDragging=!1;return}var f=[h,r.pointerDownEvent];requestAnimationFrame(function(){if(h.button===0)if(r.hoverObj){var d=r["on".concat(r.hoverObj.type,"Click")];d&&d.apply(void 0,[r.hoverObj.d].concat(f))}else r.onBackgroundClick&&r.onBackgroundClick.apply(r,f);if(h.button===2)if(r.hoverObj){var p=r["on".concat(r.hoverObj.type,"RightClick")];p&&p.apply(void 0,[r.hoverObj.d].concat(f))}else r.onBackgroundRightClick&&r.onBackgroundRightClick.apply(r,f)})}},{passive:!0}),o.addEventListener("contextmenu",function(h){return!r.onBackgroundRightClick&&!r.onNodeRightClick&&!r.onLinkRightClick?!0:(h.preventDefault(),!1)}),r.forceGraph(a),r.shadowGraph(s);var c=Fl(function(){Nr(s,r.width,r.height),r.shadowGraph.linkWidth(function(f){return B(r.linkWidth)(f)+r.linkHoverPrecision});var h=pt(r.canvas);r.shadowGraph.globalScale(h.k).tickFrame()},Wf);r.flushShadowCanvas=c.flush,(this._animationCycle=function h(){var f=!r.autoPauseRedraw||!!r.needsRedraw||r.forceGraph.isEngineRunning()||r.graphData.links.some(function(x){return x.__photons&&x.__photons.length});if(r.needsRedraw=!1,r.enablePointerInteraction){var d=r.isPointerDragging?null:u();if(d!==r.hoverObj){var p=r.hoverObj,_=p?p.type:null,b=d?d.type:null;if(_&&_!==b){var y=r["on".concat(_,"Hover")];y&&y(null,p.d)}if(b){var g=r["on".concat(b,"Hover")];g&&g(d.d,_===b?p.d:null)}r.tooltip.content(d&&B(r["".concat(d.type.toLowerCase(),"Label")])(d.d)||null),r.canvas.classList[(d&&r["on".concat(b,"Click")]||!d&&r.onBackgroundClick)&&B(r.showPointerCursor)(d==null?void 0:d.d)?"add":"remove"]("clickable"),r.hoverObj=d}f&&c()}if(f){Nr(a,r.width,r.height);var w=pt(r.canvas).k;r.onRenderFramePre&&r.onRenderFramePre(a,w),r.forceGraph.globalScale(w).tickFrame(),r.onRenderFramePost&&r.onRenderFramePost(a,w)}r.tweenGroup.update(),r.animationFrameRequestId=requestAnimationFrame(h)})()},update:function(n){}}),Zf=["https://guardiankg.org/vocab/","https://umanitek.ai/dkg/vocab/","http://umanitek.ai/dkg/vocab/","https://schema.org/","http://schema.org/"];function en(e,n){var r;for(const i of Zf){const o=(r=e.properties)==null?void 0:r.get(i+n);if(o&&o.length>0)return o[0].value}return null}function Qf(e,n){var r;if(e.focal){const i=Jf(n,e.focal.uri);i&&(i.sizeMultiplier=e.focal.sizeMultiplier??1.5,e.focal.image&&(i.imageUrl=e.focal.image))}if(e.platformIcons)for(const i of n.nodes.values()){if(i.imageUrl||!i.types.some(a=>a.includes("SocialMediaPosting")))continue;const o=n.getEdgesFrom(i.id).filter(a=>a.predicate.includes("platform"));for(const a of o){const s=a.target.split("/").pop()??"";if(e.platformIcons.icons[s]){i.imageUrl=e.platformIcons.icons[s];break}}if(!i.imageUrl&&e.platformIcons.urlFallbacks){for(const[a,s]of Object.entries(e.platformIcons.urlFallbacks))if(i.id.includes(a)&&e.platformIcons.icons[s]){i.imageUrl=e.platformIcons.icons[s];break}}}if(e.highlight){const i=e.highlight,o=[],a=i.invert===!0;for(const[u,c]of n.nodes){let h=null;if(i.source==="linked"&&i.linkedVia){const f=n.getEdgesFrom(u).filter(d=>d.predicate.includes(i.linkedVia));if(f.length>0){const d=n.nodes.get(f[0].target);if(d){const p=en(d,i.property);p!==null&&(h=parseFloat(p))}}}else{const f=en(c,i.property);f!==null&&(h=parseFloat(f))}if(h!==null&&!isNaN(h)){const f=i.threshold;let d,p=!1;if(h<0){const _=Math.abs(h);c.riskScore=_,d=_,p=a?_<=f&&_>0:_>=f}else c.riskScore=h,a?(p=h<=f,d=p?f-h:0):(p=h>=f,d=h);p&&o.push({id:u,score:d})}}const s=i.topN??100;o.sort((u,c)=>c.score-u.score);const l=o.slice(0,s);if(l.length>0){const u=i.sizeMin??1,c=i.sizeMax??i.sizeMultiplier??3,h=l[0].score,f=l[l.length-1].score;for(const{id:d,score:p}of l){const _=n.nodes.get(d);if(!_||(_.isHighRisk=!0,_.sizeMultiplier))continue;let b;if(Math.abs(h-f)>0){const g=Math.log1p(Math.min(h,f)),x=Math.log1p(Math.max(h,f))-g,m=Math.log1p(p);b=x>0?(m-g)/x:.5}else b=1;_.sizeMultiplier=u+b*(c-u)}}}if(e.sizeBy){const i=e.sizeBy,o=[];for(const[a,s]of n.nodes){if(s.sizeMultiplier)continue;const l=en(s,i.property);if(l!==null){const u=parseFloat(l);!isNaN(u)&&u>0&&o.push({id:a,value:u})}}if(o.length>0){const a=Math.max(...o.map(l=>l.value)),s=Math.min(...o.map(l=>l.value));for(const{id:l,value:u}of o){const c=n.nodes.get(l);if(!c||c.sizeMultiplier)continue;let h;if(i.scale==="log"){const f=Math.log1p(s),p=Math.log1p(a)-f;h=p>0?(Math.log1p(u)-f)/p:.5}else{const f=a-s;h=f>0?(u-s)/f:.5}c.sizeMultiplier=.5+h*2.5}}}if(e.nodeTypes){for(const i of n.nodes.values())if(!i.imageUrl)for(const o of i.types){const a=((r=o.split("/").pop())==null?void 0:r.split("#").pop())??"",s=e.nodeTypes[o]||e.nodeTypes[`schema:${a}`]||e.nodeTypes[`vocab:${a}`]||e.nodeTypes[a];if(s!=null&&s.icon){i.imageUrl=s.icon;break}}}}function Jf(e,n){const r=e.nodes.get(n);if(r)return r;const i=n.replace(/^https?:\/\/[^\/]+\//,""),o=["https://guardiankg.org/","https://umanitek.ai/dkg/","http://umanitek.ai/dkg/"];for(const a of o){const s=e.nodes.get(a+i);if(s)return s}return null}var $e={name:"dark",background:"#0a0a0f",surface:"rgba(20, 20, 30, 0.95)",surfaceBorder:"rgba(100, 100, 140, 0.3)",textPrimary:"#e2e8f0",textSecondary:"#94a3b8",textMuted:"#64748b",primary:"#6366f1",primaryMuted:"rgba(120, 120, 220, 0.5)",danger:"#e04040",warning:"#f59e0b",safe:"#10b981",info:"#3b82f6",edgeColor:"#1a1a3a",edgeLabel:"#94a3b8",particleColor:"rgba(100, 160, 255, 0.5)",focalGlow:"rgba(99, 102, 241, 0.3)",nodeColors:["#6366f1","#8b5cf6","#a855f7","#3b82f6","#06b6d4","#10b981","#f59e0b","#ef4444","#ec4899","#14b8a6","#f97316","#8b5cf6"]},th={name:"midnight",background:"#050510",surface:"rgba(10, 10, 25, 0.95)",surfaceBorder:"rgba(60, 80, 160, 0.3)",textPrimary:"#c8d6e5",textSecondary:"#7f8fa6",textMuted:"#4a5568",primary:"#3b82f6",primaryMuted:"rgba(59, 130, 246, 0.4)",danger:"#dc2626",warning:"#d97706",safe:"#059669",info:"#2563eb",edgeColor:"#0f1a3a",edgeLabel:"#7f8fa6",particleColor:"rgba(59, 130, 246, 0.5)",focalGlow:"rgba(59, 130, 246, 0.3)",nodeColors:["#3b82f6","#2563eb","#1d4ed8","#06b6d4","#0891b2","#0e7490","#8b5cf6","#7c3aed","#6366f1","#4f46e5","#14b8a6","#0d9488"]},eh={name:"cyberpunk",background:"#0a0a0a",surface:"rgba(15, 15, 15, 0.95)",surfaceBorder:"rgba(0, 255, 136, 0.2)",textPrimary:"#e0ffe0",textSecondary:"#80c080",textMuted:"#407040",primary:"#00ff88",primaryMuted:"rgba(0, 255, 136, 0.3)",danger:"#ff2d6a",warning:"#ffaa00",safe:"#00ff88",info:"#00d4ff",edgeColor:"#0a1a0a",edgeLabel:"#80c080",particleColor:"rgba(0, 255, 136, 0.5)",focalGlow:"rgba(0, 255, 136, 0.3)",nodeColors:["#00ff88","#ff2d6a","#00d4ff","#ffaa00","#ff6b35","#a855f7","#06ffd0","#ff1493","#39ff14","#ff6ec7","#00bfff","#ffd700"]},nh={name:"light",background:"#f8fafc",surface:"rgba(255, 255, 255, 0.95)",surfaceBorder:"rgba(148, 163, 184, 0.3)",textPrimary:"#1e293b",textSecondary:"#475569",textMuted:"#94a3b8",primary:"#4f46e5",primaryMuted:"rgba(79, 70, 229, 0.3)",danger:"#dc2626",warning:"#d97706",safe:"#059669",info:"#2563eb",edgeColor:"#cbd5e1",edgeLabel:"#475569",particleColor:"rgba(79, 70, 229, 0.4)",focalGlow:"rgba(79, 70, 229, 0.2)",nodeColors:["#4f46e5","#7c3aed","#9333ea","#2563eb","#0891b2","#059669","#d97706","#dc2626","#db2777","#0d9488","#ea580c","#7c3aed"]},rh={dark:$e,midnight:th,cyberpunk:eh,light:nh};function ih(e,n){let r;return e?typeof e=="string"?r=rh[e]??$e:r=e:r=$e,n?{...r,...n,name:n.name??r.name}:r}function oh(e,n){const r={"--gv-bg":n.background,"--gv-surface":n.surface,"--gv-surface-border":n.surfaceBorder,"--gv-text":n.textPrimary,"--gv-text-secondary":n.textSecondary,"--gv-text-muted":n.textMuted,"--gv-primary":n.primary,"--gv-primary-muted":n.primaryMuted,"--gv-danger":n.danger,"--gv-warning":n.warning,"--gv-safe":n.safe,"--gv-info":n.info,"--gv-edge":n.edgeColor,"--gv-particle":n.particleColor,"--gv-focal-glow":n.focalGlow};for(const[i,o]of Object.entries(r))e.style.setProperty(i,o)}var $t={wasDerivedFrom:["http://www.w3.org/ns/prov#wasDerivedFrom"],wasGeneratedBy:["http://www.w3.org/ns/prov#wasGeneratedBy"],generatedAtTime:["http://www.w3.org/ns/prov#generatedAtTime"],contentHash:["https://umanitek.ai/dkg/vocab/contentHash","https://guardiankg.org/vocab/contentHash","http://umanitek.ai/dkg/vocab/contentHash"],dataSource:["https://umanitek.ai/dkg/vocab/dataSource","https://guardiankg.org/vocab/dataSource","http://umanitek.ai/dkg/vocab/dataSource"]},ah=["https://schema.org/name","http://schema.org/name","http://xmlns.com/foaf/0.1/name","http://www.w3.org/2000/01/rdf-schema#label"],zr=["https://umanitek.ai/dkg/vocab/DataSource","http://umanitek.ai/dkg/vocab/DataSource","https://guardiankg.org/vocab/DataSource","http://www.w3.org/ns/prov#Agent"],sh=class{resolve(e){for(const n of e.nodes.values())n.provenance=this._resolveNodeProvenance(n,e)}_resolveNodeProvenance(e,n){var l,u,c;const r={sources:[],sourceNames:[]};r.contentHash=this._findValue(e,$t.contentHash),r.generatedAt=this._findMetadataValue(e,$t.generatedAtTime);const i=this._findMetadataValue(e,$t.wasGeneratedBy);if(i){r.generatedBy=i;const h=n.nodes.get(i);h?r.generatedByName=this._resolveName(h)??void 0:r.generatedByName=i.split("/").pop()??i}const o=new Set,a=[],s=n.getEdgesFrom(e.id);for(const h of s)if($t.wasDerivedFrom.some(f=>h.predicate===f)){const f=n.nodes.get(h.target);if(f&&f.types.some(p=>zr.includes(p))&&!o.has(h.target)){o.add(h.target);const p=this._resolveName(f)??h.target.split("/").pop()??h.target;a.push(p)}}for(const h of $t.wasDerivedFrom){const f=(l=e.metadata)==null?void 0:l.get(h);if(f)for(const d of f){const p=d.value;if(o.has(p))continue;const _=n.nodes.get(p);if(_&&_.types.some(y=>zr.includes(y))){o.add(p);const y=this._resolveName(_)??p.split("/").pop()??p;a.push(y)}}}for(const h of $t.dataSource){const f=((u=e.properties)==null?void 0:u.get(h))??((c=e.metadata)==null?void 0:c.get(h));if(f)for(const d of f){const p=d.value;if(o.has(p))continue;o.add(p);const _=n.nodes.get(p),b=_?this._resolveName(_)??p.split("/").pop()??p:p.split("/").pop()??p;a.push(b)}}return r.sources=[...o],r.sourceNames=a,r}_findValue(e,n){var r;for(const i of n){const o=(r=e.properties)==null?void 0:r.get(i);if(o&&o.length>0)return o[0].value}}_findMetadataValue(e,n){var r;for(const i of n){const o=(r=e.metadata)==null?void 0:r.get(i);if(o&&o.length>0)return o[0].value}return this._findValue(e,n)}_resolveName(e){var n;for(const r of ah){const i=(n=e.properties)==null?void 0:n.get(r);if(i&&i.length>0)return i[0].value}return null}},lh=["https://schema.org/","http://schema.org/","https://guardiankg.org/vocab/","https://umanitek.ai/dkg/vocab/","http://umanitek.ai/dkg/vocab/","http://www.w3.org/ns/prov#"],Ir=class{constructor(e){P(this,"_nodeDates",new Map);P(this,"_dateRange",null);P(this,"_cursor",null);P(this,"_dateProperties");P(this,"_showUndated");this._dateProperties=(e==null?void 0:e.dateProperties)??["dateCreated"],this._showUndated=(e==null?void 0:e.showUndated)??!0}scan(e){this._nodeDates.clear();let n=null,r=null;for(const[i,o]of e.nodes){const a=this._extractDate(o);a&&(this._nodeDates.set(i,a),(!n||a<n)&&(n=a),(!r||a>r)&&(r=a))}n&&r?(this._dateRange=[n,r],this._cursor=r):(this._dateRange=null,this._cursor=null)}get dateRange(){return this._dateRange}get cursor(){return this._cursor}get datedNodeCount(){return this._nodeDates.size}get showUndated(){return this._showUndated}set showUndated(e){this._showUndated=e}setCursor(e){this._cursor=e}getNodeDate(e){return this._nodeDates.get(e)??null}getVisibleNodeIds(e){if(!this._dateRange||!this._cursor)return null;const n=new Set,r=this._cursor.getTime();for(const i of e){const o=this._nodeDates.get(i);o?o.getTime()<=r&&n.add(i):this._showUndated&&n.add(i)}return n}computeHistogram(e=50){if(!this._dateRange)return[];const[n,r]=this._dateRange,i=r.getTime()-n.getTime();if(i<=0)return[{date:n,count:this._nodeDates.size}];const o=i/e,a=[];for(let s=0;s<e;s++)a.push({date:new Date(n.getTime()+s*o),count:0});for(const s of this._nodeDates.values()){const l=Math.min(Math.floor((s.getTime()-n.getTime())/o),e-1);a[l].count++}return a}_extractDate(e){var r;let n=null;for(const i of this._dateProperties)for(const o of lh){const a=(r=e.properties)==null?void 0:r.get(o+i);if(a&&a.length>0){const s=new Date(a[0].value);isNaN(s.getTime())||(!n||s<n)&&(n=s)}}return n}},uh=class{constructor(e,n,r){P(this,"_container");P(this,"_filter");P(this,"_config");P(this,"_root",null);P(this,"_slider",null);P(this,"_dateLabel",null);P(this,"_countLabel",null);P(this,"_playBtn",null);P(this,"_histCanvas",null);P(this,"_startLabel",null);P(this,"_endLabel",null);P(this,"_playInterval",null);P(this,"_isPlaying",!1);P(this,"_onChange",null);P(this,"_styleId","gv-timeline-styles");this._container=e,this._filter=n,this._config=r}onChange(e){this._onChange=e}mount(){var n;this._root||!this._filter.dateRange||(this._root=document.createElement("div"),this._root.className="gv-timeline-overlay",this._root.innerHTML=this._buildHTML(),this._injectStyles(),this._container.appendChild(this._root),this._slider=this._root.querySelector(".gv-tl-slider"),this._dateLabel=this._root.querySelector(".gv-tl-date"),this._countLabel=this._root.querySelector(".gv-tl-count"),this._playBtn=this._root.querySelector(".gv-tl-play"),this._histCanvas=this._root.querySelector(".gv-tl-hist"),this._startLabel=this._root.querySelector(".gv-tl-start"),this._endLabel=this._root.querySelector(".gv-tl-end"),this._drawHistogram(),this._slider.value=this._slider.max,this._updateDateLabel(),this._slider.addEventListener("input",()=>this._onSliderInput()),(n=this._playBtn)==null||n.addEventListener("click",()=>this._togglePlay()))}unmount(){this.pause(),this._root&&(this._root.remove(),this._root=null)}get mounted(){return this._root!==null}refresh(){if(!this._root)return;const e=this._filter.dateRange;if(!e){this.unmount();return}this._slider&&(this._slider.min=String(e[0].getTime()),this._slider.max=String(e[1].getTime())),this._drawHistogram(),this._startLabel&&(this._startLabel.textContent=this._formatDateShort(e[0])),this._endLabel&&(this._endLabel.textContent=this._formatDateShort(e[1])),this._updateDateLabel()}play(){if(this._isPlaying)return;this._isPlaying=!0,this._playBtn&&(this._playBtn.textContent="⏸");const e=this._filter.dateRange;if(!e||!this._slider)return;e[1].getTime()-e[0].getTime();const n=this._getStepMs(),r=this._config.playSpeed??200;this._playInterval=setInterval(()=>{const o=parseInt(this._slider.value,10)+n;if(o>=e[1].getTime()){this._slider.value=String(e[1].getTime()),this._onSliderInput(),this.pause();return}this._slider.value=String(o),this._onSliderInput()},r)}pause(){this._isPlaying=!1,this._playBtn&&(this._playBtn.textContent="▶"),this._playInterval&&(clearInterval(this._playInterval),this._playInterval=null)}setCursor(e){this._slider&&(this._slider.value=String(e.getTime()),this._onSliderInput())}_buildHTML(){const e=this._filter.dateRange,n=e[0].getTime(),r=e[1].getTime();return`
|
|
44
|
-
<div class="gv-tl-bar">
|
|
45
|
-
<button class="gv-tl-play" title="Play/Pause timeline">▶</button>
|
|
46
|
-
<div class="gv-tl-track">
|
|
47
|
-
<div class="gv-tl-labels">
|
|
48
|
-
<span class="gv-tl-start">${this._formatDateShort(e[0])}</span>
|
|
49
|
-
<span class="gv-tl-date"></span>
|
|
50
|
-
<span class="gv-tl-end">${this._formatDateShort(e[1])}</span>
|
|
51
|
-
</div>
|
|
52
|
-
<div class="gv-tl-slider-wrap">
|
|
53
|
-
<canvas class="gv-tl-hist" width="600" height="32"></canvas>
|
|
54
|
-
<input type="range" class="gv-tl-slider" min="${n}" max="${r}" value="${r}" step="1" />
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
<div class="gv-tl-count" title="Visible nodes">—</div>
|
|
58
|
-
</div>
|
|
59
|
-
`}_onSliderInput(){var r;if(!this._slider)return;const e=parseInt(this._slider.value,10),n=new Date(e);this._filter.setCursor(n),this._updateDateLabel(),(r=this._onChange)==null||r.call(this,n,0)}_updateDateLabel(){if(!this._dateLabel||!this._slider)return;const e=parseInt(this._slider.value,10),n=new Date(e);this._dateLabel.textContent=this._formatDateFull(n)}updateCount(e){this._countLabel&&(this._countLabel.textContent=e.toLocaleString())}_togglePlay(){this._isPlaying?this.pause():(this._slider&&this._filter.dateRange&&parseInt(this._slider.value,10)>=this._filter.dateRange[1].getTime()-this._getStepMs()&&(this._slider.value=String(this._filter.dateRange[0].getTime()),this._onSliderInput()),this.play())}_getStepMs(){const e=this._config.stepSize??"day",n=this._filter.dateRange;if(!n)return 864e5;const i=(n[1].getTime()-n[0].getTime())/200;switch(e){case"hour":return Math.max(36e5,i);case"day":return Math.max(864e5,i);case"week":return Math.max(6048e5,i);case"month":return Math.max(2592e6,i);default:return i}}_drawHistogram(){const e=this._histCanvas;if(!e)return;const n=e.getContext("2d");if(!n)return;const r=this._filter.computeHistogram(e.width/4);if(r.length===0)return;const i=Math.max(...r.map(l=>l.count));if(i===0)return;const o=e.width,a=e.height,s=o/r.length;n.clearRect(0,0,o,a);for(let l=0;l<r.length;l++){const c=r[l].count/i*(a-2);n.fillStyle="rgba(99, 102, 241, 0.25)",n.fillRect(l*s,a-c,s-1,c)}}_formatDateShort(e){return e.toLocaleDateString("en-US",{month:"short",year:"numeric"})}_formatDateFull(e){return e.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}_injectStyles(){if(document.getElementById(this._styleId))return;const e=document.createElement("style");e.id=this._styleId,e.textContent=`
|
|
60
|
-
.gv-timeline-overlay {
|
|
61
|
-
position: absolute;
|
|
62
|
-
bottom: 0;
|
|
63
|
-
left: 0;
|
|
64
|
-
right: 0;
|
|
65
|
-
z-index: 90;
|
|
66
|
-
pointer-events: none;
|
|
67
|
-
}
|
|
68
|
-
.gv-tl-bar {
|
|
69
|
-
display: flex;
|
|
70
|
-
align-items: center;
|
|
71
|
-
gap: 10px;
|
|
72
|
-
padding: 10px 16px 12px;
|
|
73
|
-
background: linear-gradient(to top,
|
|
74
|
-
var(--gv-bg, rgba(10, 10, 15, 0.95)) 0%,
|
|
75
|
-
var(--gv-bg, rgba(10, 10, 15, 0.85)) 60%,
|
|
76
|
-
transparent 100%);
|
|
77
|
-
pointer-events: auto;
|
|
78
|
-
}
|
|
79
|
-
.gv-tl-play {
|
|
80
|
-
width: 32px;
|
|
81
|
-
height: 32px;
|
|
82
|
-
border-radius: 50%;
|
|
83
|
-
border: 1px solid var(--gv-surface-border, rgba(100, 100, 140, 0.3));
|
|
84
|
-
background: var(--gv-surface, rgba(20, 20, 30, 0.9));
|
|
85
|
-
color: var(--gv-text, #e0e0e0);
|
|
86
|
-
cursor: pointer;
|
|
87
|
-
font-size: 14px;
|
|
88
|
-
display: flex;
|
|
89
|
-
align-items: center;
|
|
90
|
-
justify-content: center;
|
|
91
|
-
flex-shrink: 0;
|
|
92
|
-
transition: background 0.2s, border-color 0.2s;
|
|
93
|
-
padding: 0;
|
|
94
|
-
line-height: 1;
|
|
95
|
-
}
|
|
96
|
-
.gv-tl-play:hover {
|
|
97
|
-
background: var(--gv-primary-muted, rgba(99, 102, 241, 0.3));
|
|
98
|
-
border-color: var(--gv-primary, rgba(99, 102, 241, 0.5));
|
|
99
|
-
}
|
|
100
|
-
.gv-tl-track {
|
|
101
|
-
flex: 1;
|
|
102
|
-
min-width: 0;
|
|
103
|
-
position: relative;
|
|
104
|
-
}
|
|
105
|
-
.gv-tl-labels {
|
|
106
|
-
display: flex;
|
|
107
|
-
justify-content: space-between;
|
|
108
|
-
font-size: 10px;
|
|
109
|
-
color: var(--gv-text-muted, #666);
|
|
110
|
-
margin-bottom: 2px;
|
|
111
|
-
padding: 0 2px;
|
|
112
|
-
}
|
|
113
|
-
.gv-tl-date {
|
|
114
|
-
font-weight: 600;
|
|
115
|
-
color: var(--gv-text-secondary, #aaa);
|
|
116
|
-
font-size: 11px;
|
|
117
|
-
}
|
|
118
|
-
.gv-tl-slider-wrap {
|
|
119
|
-
position: relative;
|
|
120
|
-
height: 32px;
|
|
121
|
-
}
|
|
122
|
-
.gv-tl-hist {
|
|
123
|
-
position: absolute;
|
|
124
|
-
top: 0;
|
|
125
|
-
left: 0;
|
|
126
|
-
width: 100%;
|
|
127
|
-
height: 100%;
|
|
128
|
-
pointer-events: none;
|
|
129
|
-
opacity: 0.7;
|
|
130
|
-
}
|
|
131
|
-
.gv-tl-slider {
|
|
132
|
-
position: absolute;
|
|
133
|
-
top: 0;
|
|
134
|
-
left: 0;
|
|
135
|
-
width: 100%;
|
|
136
|
-
height: 100%;
|
|
137
|
-
margin: 0;
|
|
138
|
-
-webkit-appearance: none;
|
|
139
|
-
appearance: none;
|
|
140
|
-
background: transparent;
|
|
141
|
-
cursor: pointer;
|
|
142
|
-
z-index: 2;
|
|
143
|
-
}
|
|
144
|
-
.gv-tl-slider::-webkit-slider-runnable-track {
|
|
145
|
-
height: 4px;
|
|
146
|
-
border-radius: 2px;
|
|
147
|
-
background: var(--gv-surface-border, rgba(100, 100, 140, 0.3));
|
|
148
|
-
margin-top: 14px;
|
|
149
|
-
}
|
|
150
|
-
.gv-tl-slider::-webkit-slider-thumb {
|
|
151
|
-
-webkit-appearance: none;
|
|
152
|
-
width: 16px;
|
|
153
|
-
height: 16px;
|
|
154
|
-
border-radius: 50%;
|
|
155
|
-
background: var(--gv-primary, #6366f1);
|
|
156
|
-
border: 2px solid var(--gv-bg, #0a0a0f);
|
|
157
|
-
margin-top: -6px;
|
|
158
|
-
box-shadow: 0 0 8px var(--gv-primary-muted, rgba(99, 102, 241, 0.4));
|
|
159
|
-
transition: transform 0.15s ease;
|
|
160
|
-
}
|
|
161
|
-
.gv-tl-slider::-webkit-slider-thumb:hover {
|
|
162
|
-
transform: scale(1.2);
|
|
163
|
-
}
|
|
164
|
-
.gv-tl-slider::-moz-range-track {
|
|
165
|
-
height: 4px;
|
|
166
|
-
border-radius: 2px;
|
|
167
|
-
background: var(--gv-surface-border, rgba(100, 100, 140, 0.3));
|
|
168
|
-
border: none;
|
|
169
|
-
}
|
|
170
|
-
.gv-tl-slider::-moz-range-thumb {
|
|
171
|
-
width: 16px;
|
|
172
|
-
height: 16px;
|
|
173
|
-
border-radius: 50%;
|
|
174
|
-
background: var(--gv-primary, #6366f1);
|
|
175
|
-
border: 2px solid var(--gv-bg, #0a0a0f);
|
|
176
|
-
box-shadow: 0 0 8px var(--gv-primary-muted, rgba(99, 102, 241, 0.4));
|
|
177
|
-
}
|
|
178
|
-
.gv-tl-count {
|
|
179
|
-
min-width: 40px;
|
|
180
|
-
padding: 4px 8px;
|
|
181
|
-
border-radius: 12px;
|
|
182
|
-
background: var(--gv-surface, rgba(20, 20, 30, 0.9));
|
|
183
|
-
border: 1px solid var(--gv-surface-border, rgba(100, 100, 140, 0.3));
|
|
184
|
-
color: var(--gv-primary, #6366f1);
|
|
185
|
-
font-size: 12px;
|
|
186
|
-
font-weight: 600;
|
|
187
|
-
text-align: center;
|
|
188
|
-
flex-shrink: 0;
|
|
189
|
-
white-space: nowrap;
|
|
190
|
-
}
|
|
191
|
-
`,document.head.appendChild(e)}},Rr="http://www.w3.org/1999/02/22-rdf-syntax-ns#type";function Or(e){const n=e.trim();return!n||n.startsWith('"')?!1:n.startsWith("_:")||n.startsWith("<")&&n.endsWith(">")?!0:/\s/.test(n)?!1:/^[A-Za-z][A-Za-z0-9+.-]*:/.test(n)}function Lt(e){const n=e.trim();return n.startsWith("<")&&n.endsWith(">")?n.slice(1,-1):n}function Dr(e,n,r){return`${e}\0${n}\0${r}`}var ch=class{constructor(e){P(this,"nodes",new Map);P(this,"edges",new Map);P(this,"prefixes",{});P(this,"_triples",[]);P(this,"_metadataPredicates",new Set);P(this,"_outEdges",new Map);P(this,"_inEdges",new Map);P(this,"kaGroups",new Map);P(this,"_kaMembershipPredicate",null);if(e)for(const n of e)this._metadataPredicates.add(n)}get triples(){return this._triples}setKaMembershipPredicate(e){this._kaMembershipPredicate=e}ensureNode(e){let n=this.nodes.get(e);return n||(n={id:e,types:[],label:e,properties:new Map,imageUrl:null,metadata:new Map,degree:0,isBoundary:!1},this.nodes.set(e,n)),n}ensureAdjacency(e){this._outEdges.has(e)||this._outEdges.set(e,new Set),this._inEdges.has(e)||this._inEdges.set(e,new Set)}addTriple(e){const n=Lt(e.subject),r=Lt(e.predicate),i=Or(e.object),o=i?Lt(e.object):e.object;this._triples.push({...e,subject:n,predicate:r,object:o});const a=this.ensureNode(n);if(r===Rr){a.types.includes(o)||a.types.push(o);return}if(i){if(this._metadataPredicates.has(r)){const u={value:o,datatype:e.datatype,language:e.language},c=a.metadata.get(r);c?c.push(u):a.metadata.set(r,[u]);return}const s=this.ensureNode(o),l=Dr(n,r,o);if(this.edges.has(l)||(this.edges.set(l,{id:l,source:n,target:o,predicate:r,label:r}),a.degree++,s.degree++,this.ensureAdjacency(n),this.ensureAdjacency(o),this._outEdges.get(n).add(l),this._inEdges.get(o).add(l)),this._kaMembershipPredicate&&r===this._kaMembershipPredicate){let u=this.kaGroups.get(o);u||(u=new Set,this.kaGroups.set(o,u)),u.add(n)}}else{const s={value:e.object,datatype:e.datatype,language:e.language};if(this._metadataPredicates.has(r)){const l=a.metadata.get(r);l?l.push(s):a.metadata.set(r,[s])}else{const l=a.properties.get(r);l?l.push(s):a.properties.set(r,[s])}}}addTriples(e){const n=new Set(this.nodes.keys()),r=new Set(this.edges.keys());for(const s of e)this.addTriple(s);const i=[],o=[],a=new Set;for(const s of this.nodes.keys())n.has(s)?a.add(s):i.push(s);for(const s of this.edges.keys())r.has(s)||o.push(s);return{addedNodes:i,removedNodes:[],addedEdges:o,removedEdges:[],modifiedNodes:[...a]}}removeTriples(e){var o,a;const n=[],r=new Set;for(const s of e){const l=Lt(s.subject),u=Lt(s.predicate),c=Or(s.object),h=c?Lt(s.object):s.object,f=this._triples.findIndex(d=>d.subject===l&&d.predicate===u&&d.object===h);if(f!==-1&&this._triples.splice(f,1),u===Rr){const d=this.nodes.get(l);d&&(d.types=d.types.filter(p=>p!==h),r.add(l));continue}if(c&&!this._metadataPredicates.has(u)){const d=Dr(l,u,h);if(this.edges.has(d)){this.edges.delete(d),n.push(d),(o=this._outEdges.get(l))==null||o.delete(d),(a=this._inEdges.get(h))==null||a.delete(d);const p=this.nodes.get(l),_=this.nodes.get(h);p&&p.degree--,_&&_.degree--,r.add(l),r.add(h)}}else{const d=this.nodes.get(l);if(d){const p=this._metadataPredicates.has(u)?d.metadata:d.properties,_=p.get(u);if(_){const b=_.filter(y=>y.value!==h);b.length===0?p.delete(u):p.set(u,b),r.add(l)}}}}const i=[];for(const[s,l]of this.nodes)l.degree===0&&l.types.length===0&&l.properties.size===0&&l.metadata.size===0&&(this.nodes.delete(s),this._outEdges.delete(s),this._inEdges.delete(s),i.push(s));return{addedNodes:[],removedNodes:i,addedEdges:[],removedEdges:n,modifiedNodes:[...r]}}getNode(e){return this.nodes.get(e)}getEdgesFrom(e){const n=this._outEdges.get(e);if(!n)return[];const r=[];for(const i of n){const o=this.edges.get(i);o&&r.push(o)}return r}getEdgesTo(e){const n=this._inEdges.get(e);if(!n)return[];const r=[];for(const i of n){const o=this.edges.get(i);o&&r.push(o)}return r}getNeighborIds(e){const n=new Set,r=this._outEdges.get(e);if(r)for(const o of r){const a=this.edges.get(o);a&&n.add(a.target)}const i=this._inEdges.get(e);if(i)for(const o of i){const a=this.edges.get(o);a&&n.add(a.source)}return n}getHighestDegreeNode(){let e=null;for(const n of this.nodes.values())(!e||n.degree>e.degree)&&(e=n);return e}clear(){this.nodes.clear(),this.edges.clear(),this._triples=[],this._outEdges.clear(),this._inEdges.clear()}get tripleCount(){return this._triples.length}},fh={rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",owl:"http://www.w3.org/2002/07/owl#",xsd:"http://www.w3.org/2001/XMLSchema#",schema:"https://schema.org/",foaf:"http://xmlns.com/foaf/0.1/",dcterms:"http://purl.org/dc/terms/",dc:"http://purl.org/dc/elements/1.1/",prov:"http://www.w3.org/ns/prov#",skos:"http://www.w3.org/2004/02/skos/core#"},ie=class{constructor(e){P(this,"_prefixes");P(this,"_reverse");this._prefixes=new Map,this._reverse=new Map;for(const[n,r]of Object.entries(fh))this._prefixes.set(n,r),this._reverse.set(r,n);if(e)for(const[n,r]of Object.entries(e))this._prefixes.set(n,r),this._reverse.set(r,n)}addPrefix(e,n){this._prefixes.set(e,n),this._reverse.set(n,e)}addPrefixes(e){for(const[n,r]of Object.entries(e))this.addPrefix(n,r)}getNamespace(e){return this._prefixes.get(e)}getPrefix(e){return this._reverse.get(e)}compact(e){for(const[n,r]of this._reverse)if(e.startsWith(n)){const i=e.slice(n.length);if(i.length>0)return`${r}:${i}`}return null}expand(e){const n=e.indexOf(":");if(n===-1||e.startsWith("http://")||e.startsWith("https://")||e.startsWith("urn:"))return e;const r=e.slice(0,n),i=e.slice(n+1),o=this._prefixes.get(r);return o?o+i:e}static localName(e){const n=e.lastIndexOf("#");if(n!==-1)return e.slice(n+1);const r=e.lastIndexOf("/");if(r!==-1)return e.slice(r+1);if(e.includes("%2F")||e.includes("%2f"))try{const o=decodeURIComponent(e),a=o.lastIndexOf("/");if(a!==-1)return o.slice(a+1)}catch{}const i=e.lastIndexOf(":");return i!==-1&&i<e.length-1?e.slice(i+1):e}get prefixes(){const e={};for(const[n,r]of this._prefixes)e[n]=r;return e}},hh=["http://www.w3.org/2000/01/rdf-schema#label","https://schema.org/name","http://xmlns.com/foaf/0.1/name","http://purl.org/dc/terms/title","http://purl.org/dc/elements/1.1/title","https://schema.org/alternateName"],dh=class{constructor(e,n,r){P(this,"_mode");P(this,"_prefixManager");P(this,"_labelPredicates");this._mode=e,this._prefixManager=n,this._labelPredicates=(r==null?void 0:r.predicates)??hh}get mode(){return this._mode}set mode(e){this._mode=e}resolveNodeLabel(e){for(const n of this._labelPredicates){const r=e.properties.get(n);if(r&&r.length>0)return r[0].value}return this.resolveUri(e.id)}resolveEdgeLabel(e){return this.resolveUri(e.predicate)}resolveUri(e){return this._mode==="strict"?this._prefixManager.compact(e)??ie.localName(e):Fr(ie.localName(e))}resolveTypeLabel(e){return this._mode==="strict"?this._prefixManager.compact(e)??ie.localName(e):Fr(ie.localName(e))}resolvePredicateLabel(e){return this.resolveUri(e)}updateLabels(e,n){for(const r of e.values())r.label=this.resolveNodeLabel(r);for(const r of n.values())r.label=this.resolveEdgeLabel(r)}};function Fr(e){if(!e)return"";let n=e.replace(/_/g," ");return n=n.replace(/([a-z])([A-Z])/g,"$1 $2"),n=n.replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2"),n.length>4&&(n=n.toLowerCase()),n.trim()}var ph={"https://schema.org/":"#8b5cf6","http://www.w3.org/ns/prov#":"#3b82f6","http://xmlns.com/foaf/0.1/":"#10b981","http://purl.org/dc/terms/":"#f59e0b"},gh=class{constructor(e,n,r){P(this,"_config");P(this,"_prefixManager");P(this,"_palette");P(this,"_hasExplicitDefaultNodeColor");P(this,"_hasExplicitDefaultEdgeColor");this._prefixManager=n,this._palette=r??$e,this._hasExplicitDefaultNodeColor=(e==null?void 0:e.defaultNodeColor)!==void 0,this._hasExplicitDefaultEdgeColor=(e==null?void 0:e.defaultEdgeColor)!==void 0,this._config={nodeColors:(e==null?void 0:e.nodeColors)??{},classColors:(e==null?void 0:e.classColors)??{},namespaceColors:(e==null?void 0:e.namespaceColors)??{},predicateColors:(e==null?void 0:e.predicateColors)??{},gradient:(e==null?void 0:e.gradient)??!0,gradientIntensity:(e==null?void 0:e.gradientIntensity)??.3,defaultNodeColor:(e==null?void 0:e.defaultNodeColor)??this._palette.primary,defaultEdgeColor:(e==null?void 0:e.defaultEdgeColor)??this._palette.edgeColor,edgeWidth:(e==null?void 0:e.edgeWidth)??1.5,edgeArrowSize:(e==null?void 0:e.edgeArrowSize)??4,borderWidth:(e==null?void 0:e.borderWidth)??1.5,fontFamily:(e==null?void 0:e.fontFamily)??"system-ui, -apple-system, sans-serif",fontSize:(e==null?void 0:e.fontSize)??11}}get palette(){return this._palette}setPalette(e){this._palette=e,this._config={...this._config},this._hasExplicitDefaultNodeColor||(this._config.defaultNodeColor=e.primary),this._hasExplicitDefaultEdgeColor||(this._config.defaultEdgeColor=e.edgeColor)}get config(){return this._config}setNodeColors(e){this._config={...this._config,nodeColors:{...this._config.nodeColors,...e}}}getNodeColor(e){const n=this._config.nodeColors[e.id];if(n)return n;for(const r of e.types){const i=this._prefixManager.compact(r);if(i&&this._config.classColors[i])return this._config.classColors[i];if(this._config.classColors[r])return this._config.classColors[r]}for(const r of e.types){for(const[i,o]of Object.entries(this._config.namespaceColors)){const a=this._prefixManager.getNamespace(i)??i;if(r.startsWith(a))return o}for(const[i,o]of Object.entries(ph))if(r.startsWith(i))return o}return this._config.defaultNodeColor}getEdgeColor(e){const n=this._prefixManager.compact(e.predicate);return n&&this._config.predicateColors[n]?this._config.predicateColors[n]:this._config.predicateColors[e.predicate]?this._config.predicateColors[e.predicate]:this._config.defaultEdgeColor}getBorderColor(e){return jr(e,.3)}getGradientCenter(e){return jr(e,this._config.gradientIntensity)}};function jr(e,n){const r=_h(e);if(!r)return e;const i=Math.round(r.r+(255-r.r)*n),o=Math.round(r.g+(255-r.g)*n),a=Math.round(r.b+(255-r.b)*n);return`#${((1<<24)+(i<<16)+(o<<8)+a).toString(16).slice(1)}`}function _h(e){const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return n?{r:parseInt(n[1],16),g:parseInt(n[2],16),b:parseInt(n[3],16)}:null}var vh={baseSize:36,minSize:24,maxSize:72,scaleWithDegree:!0,imagePredicates:["https://schema.org/image","http://xmlns.com/foaf/0.1/img","http://xmlns.com/foaf/0.1/depiction"],imageUrlPredicate:"https://schema.org/url",circleTypes:[]},be=new Map,yh=class{constructor(e,n,r){P(this,"_config");P(this,"_styleEngine");P(this,"_maxDegree",1);P(this,"_circleTypeSet");P(this,"_onImageLoad",null);P(this,"_trustStyle","none");P(this,"_showBadges",!0);this._config={...vh,...e},this._styleEngine=n,this._circleTypeSet=new Set;for(const i of this._config.circleTypes)this._circleTypeSet.add(i),r&&this._circleTypeSet.add(r.expand(i))}isCircleNode(e){return this._circleTypeSet.size===0?!1:e.types.some(n=>this._circleTypeSet.has(n))}setImageLoadCallback(e){this._onImageLoad=e}setMaxDegree(e){this._maxDegree=Math.max(1,e)}setTrustStyle(e){this._trustStyle=e}setShowBadges(e){this._showBadges=e}getRadius(e){if(this.isCircleNode(e)){if(!this._config.scaleWithDegree)return this._config.minSize*.7;const s=e.degree/this._maxDegree,l=this._config.maxSize*.6-this._config.minSize*.7;return this._config.minSize*.7+s*l}const n=e.sizeMultiplier??(e.isHighRisk?2:1),r=e.imageUrl?Math.max(this._config.maxSize*.6,8):0;if(!this._config.scaleWithDegree)return Math.max(this._config.baseSize,r)*n;const i=e.degree/this._maxDegree,o=this._config.maxSize-this._config.minSize,a=this._config.minSize+i*o;return Math.max(a,r)*n}paint(e,n,r,i,o,a=1){var _,b;if(this.isCircleNode(n))return this.paintCircle(e,n,r,i,o);const l=this.getRadius(n)*a,u=this._styleEngine.getNodeColor(n),c=this._styleEngine.palette,h=this._styleEngine.config;if(e.save(),a>1.03&&n.isHighRisk){const y=l*1.25,g=(a-1)*2.5;e.beginPath();for(let w=0;w<6;w++){const x=Math.PI/3*w,m=r+y*Math.cos(x),v=i+y*Math.sin(x);w===0?e.moveTo(m,v):e.lineTo(m,v)}e.closePath(),e.fillStyle=`rgba(220, 50, 50, ${Math.min(.4,g)})`,e.fill()}e.beginPath();for(let y=0;y<6;y++){const g=Math.PI/3*y,w=r+l*Math.cos(g),x=i+l*Math.sin(g);y===0?e.moveTo(w,x):e.lineTo(w,x)}if(e.closePath(),h.gradient){const y=e.createRadialGradient(r,i,0,r,i,l);y.addColorStop(0,this._styleEngine.getGradientCenter(u)),y.addColorStop(1,u),e.fillStyle=y}else e.fillStyle=u;e.fill();const f=((b=(_=n.provenance)==null?void 0:_.sources)==null?void 0:b.length)??0;if(f>=2&&this._trustStyle==="glow"&&(e.shadowColor=c.info,e.shadowBlur=Math.min(12,f*3)/o,e.fill(),e.shadowBlur=0,e.shadowColor="transparent"),n.riskScore&&n.riskScore>0){const y=Math.min(1,n.riskScore);e.strokeStyle=`rgba(220, 50, 50, ${.5+y*.5})`,e.lineWidth=(h.borderWidth+(n.isHighRisk?1.5:.5))/o}else f>=2&&this._trustStyle==="border"?(e.strokeStyle=c.info,e.lineWidth=(h.borderWidth+Math.min(3,f))/o):(e.strokeStyle=this._styleEngine.getBorderColor(u),e.lineWidth=h.borderWidth/o);n.isBoundary&&!(n.riskScore&&n.riskScore>0)&&(e.strokeStyle=bh(u,.5),e.lineWidth=(h.borderWidth+1)/o),e.stroke(),e.setLineDash([]),f<2&&this._trustStyle==="opacity"&&(e.globalAlpha=.7),n.imageUrl&&this.paintAvatar(e,n.imageUrl,r,i,l),e.globalAlpha=1,o>3&&this._paintBadges(e,n,r,i,l,o);const d=.3,p=.8;if(o>d){const y=Math.min(1,(o-d)/(p-d)),g=h.fontSize/o;e.font=`${g}px ${h.fontFamily}`,e.textAlign="center",e.textBaseline="top",e.globalAlpha=y,e.fillStyle=c.textPrimary,e.fillText(mh(n.label,24),r,i+l+2/o),e.globalAlpha=1}return e.restore(),l}_paintBadges(e,n,r,i,o,a){if(!this._showBadges)return;const s=n.provenance;if(!s)return;const l=this._styleEngine.palette,u=Math.max(4,8/a);if(s.sources.length>0){const c=r+o*.7,h=i+o*.6,f=s.sources.length;e.beginPath(),e.arc(c,h,u,0,2*Math.PI);const d=Math.min(1,f/3);e.fillStyle=f>=2?l.info:l.textMuted,e.globalAlpha=.4+d*.6,e.fill(),u>3&&(e.fillStyle="#fff",e.globalAlpha=1,e.font=`bold ${u*1.2}px system-ui`,e.textAlign="center",e.textBaseline="middle",e.fillText(String(f),c,h))}if(s.contentHash||s.blockchainAnchor){const c=r+o*.7,h=i-o*.6;e.beginPath(),e.arc(c,h,u,0,2*Math.PI),e.fillStyle=s.blockchainAnchor?l.safe:l.info,e.globalAlpha=.85,e.fill(),e.globalAlpha=1,e.strokeStyle="#fff",e.lineWidth=u*.3,e.lineCap="round",e.lineJoin="round",e.beginPath();const f=u*.5;e.moveTo(c-f*.5,h),e.lineTo(c-f*.1,h+f*.4),e.lineTo(c+f*.5,h-f*.3),e.stroke()}e.globalAlpha=1}paintCircle(e,n,r,i,o){const a=this.getRadius(n),s=this._styleEngine.getNodeColor(n);return e.beginPath(),e.arc(r,i,a,0,2*Math.PI),e.fillStyle=s,e.fill(),a}paintAvatar(e,n,r,i,o){let a=be.get(n);if(a===void 0){const d=new Image;n.startsWith("data:")||(d.crossOrigin="anonymous"),be.set(n,null),d.src=n,d.onload=()=>{var p;be.set(n,d),(p=this._onImageLoad)==null||p.call(this)},d.onerror=()=>{be.delete(n)};return}if(!a)return;e.save(),e.beginPath();for(let d=0;d<6;d++){const p=Math.PI/3*d,_=r+o*Math.cos(p),b=i+o*Math.sin(p);d===0?e.moveTo(_,b):e.lineTo(_,b)}e.closePath(),e.clip();const s=a.naturalWidth/a.naturalHeight,u=n.startsWith("data:")?.5:1;let c,h;const f=o*2*u;s>1?(h=f,c=f*s):(c=f,h=f/s),e.globalAlpha=.95,e.drawImage(a,r-c/2,i-h/2,c,h),e.globalAlpha=1,e.restore()}resolveImageUrl(e,n,r){for(const i of this._config.imagePredicates){const o=e.properties.get(i);if(o&&o.length>0){const a=o[0].value;if(a.startsWith("http://")||a.startsWith("https://"))return a}}if(r){const i=r(e.id);for(const o of this._config.imagePredicates)for(const a of i){if(a.predicate!==o)continue;const s=n(a.target);if(!s)continue;const l=s.properties.get(this._config.imageUrlPredicate);if(l&&l.length>0){const u=l[0].value;if(u.startsWith("http://")||u.startsWith("https://"))return u}for(const u of this._config.imagePredicates){const c=s.properties.get(u);if(c&&c.length>0){const h=c[0].value;if(h.startsWith("http://")||h.startsWith("https://"))return h}}}}return null}};function mh(e,n){if(e.length<=n)return e;if(e.includes("/")){const i=e.split("/"),o=i[0],a=i[i.length-1],s=`${o}/…/${a}`;if(i.length>=3&&s.length<=n)return s;if(a.length<=n-2)return`…/${a}`}const r=/^(#\d+)\s+(.+)$/.exec(e);if(r){const i=r[1],o=r[2],a=n-i.length-2;if(a>4)return`${i} ${o.slice(0,a)}…`}return e.slice(0,n-1)+"…"}function bh(e,n){const r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(!r)return e;const i=Math.round(parseInt(r[1],16)+(255-parseInt(r[1],16))*n),o=Math.round(parseInt(r[2],16)+(255-parseInt(r[2],16))*n),a=Math.round(parseInt(r[3],16)+(255-parseInt(r[3],16))*n);return`#${((1<<24)+(i<<16)+(o<<8)+a).toString(16).slice(1)}`}var wh={focalNode:null,hops:2,maxNodes:200,expandOnClick:!0},$r=class{constructor(e){P(this,"_config");P(this,"_visibleNodes",new Set);P(this,"_focalNode",null);P(this,"_enabled",!1);this._config={...wh,...e},this._focalNode=this._config.focalNode??null}get focalNode(){return this._focalNode}get enabled(){return this._enabled}get visibleNodeIds(){return this._visibleNodes}compute(e){if(e.nodes.size<=this._config.maxNodes){this._enabled=!1;for(const o of e.nodes.values())o.isBoundary=!1;return{nodes:e.nodes,edges:e.edges}}if(this._enabled=!0,!this._focalNode){const o=e.getHighestDegreeNode();this._focalNode=(o==null?void 0:o.id)??null}if(!this._focalNode)return{nodes:new Map,edges:new Map};this._visibleNodes.clear();const n=[{id:this._focalNode,depth:0}];for(this._visibleNodes.add(this._focalNode);n.length>0&&this._visibleNodes.size<this._config.maxNodes;){const o=n.shift();if(o.depth>=this._config.hops)continue;const a=e.getNeighborIds(o.id);for(const s of a){if(this._visibleNodes.size>=this._config.maxNodes)break;this._visibleNodes.has(s)||(this._visibleNodes.add(s),n.push({id:s,depth:o.depth+1}))}}const r=new Map,i=new Map;for(const o of this._visibleNodes){const a=e.getNode(o);if(a){const s=e.getNeighborIds(o);a.isBoundary=!1;for(const l of s)if(!this._visibleNodes.has(l)){a.isBoundary=!0;break}r.set(o,a)}}for(const o of e.edges.values())this._visibleNodes.has(o.source)&&this._visibleNodes.has(o.target)&&i.set(o.id,o);return{nodes:r,edges:i}}setFocus(e){this._focalNode=e}expandNode(e,n){const r=n.getNeighborIds(e);for(const i of r)this._visibleNodes.add(i)}disable(){this._enabled=!1,this._visibleNodes.clear()}enable(e){this._enabled=!0,e&&(this._focalNode=e)}},xh={statementType:"http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement",subjectPredicate:"http://www.w3.org/1999/02/22-rdf-syntax-ns#subject",predicatePredicate:"http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate",objectPredicate:"http://www.w3.org/1999/02/22-rdf-syntax-ns#object"},Lr={enabled:!1,patterns:[xh]},kh=class{constructor(e){P(this,"_config");this._config={enabled:(e==null?void 0:e.enabled)??Lr.enabled,patterns:(e==null?void 0:e.patterns)??Lr.patterns}}get enabled(){return this._config.enabled}collapse(e){if(!this._config.enabled)return new Set;const n=new Set,r=this.detectStatements(e);for(const i of r){if(!i.reifiedSubject)continue;const o=e.getNode(i.reifiedSubject);if(o){if(i.reifiedPredicate&&i.annotations.length>0){const a=i.annotations.map(u=>({predicate:u.predicate,value:u.value,datatype:u.datatype})),s=o.properties.get(i.reifiedPredicate);if(s){for(const u of s)if(i.reifiedObject&&u.value===i.reifiedObject){u.annotations=[...u.annotations??[],...a];break}s.length>0&&!s.some(u=>{var c;return(c=u.annotations)==null?void 0:c.length})&&(s[0].annotations=[...s[0].annotations??[],...a])}const l=o.metadata.get(i.reifiedPredicate);l&&l.length>0&&(l[0].annotations=[...l[0].annotations??[],...a])}n.add(i.statementNodeId)}}return n}detectStatements(e){const n=[];for(const r of this._config.patterns)for(const i of e.nodes.values()){if(!i.types.includes(r.statementType))continue;const o={statementNodeId:i.id,reifiedSubject:null,reifiedPredicate:null,reifiedObject:null,annotations:[]},a=e.getEdgesFrom(i.id);for(const l of a)l.predicate===r.subjectPredicate?o.reifiedSubject=l.target:l.predicate===r.predicatePredicate?o.reifiedPredicate=l.target:l.predicate===r.objectPredicate&&(o.reifiedObject=l.target);for(const[l,u]of i.properties)l===r.objectPredicate&&u.length>0&&(o.reifiedObject=u[0].value);for(const[l,u]of i.metadata)u.length!==0&&(!o.reifiedSubject&&l===r.subjectPredicate?o.reifiedSubject=u[0].value:!o.reifiedPredicate&&l===r.predicatePredicate?o.reifiedPredicate=u[0].value:!o.reifiedObject&&l===r.objectPredicate&&(o.reifiedObject=u[0].value));const s=new Set([r.subjectPredicate,r.predicatePredicate,r.objectPredicate]);for(const[l,u]of i.properties)if(!s.has(l))for(const c of u)o.annotations.push({predicate:l,value:c.value,datatype:c.datatype});for(const[l,u]of i.metadata)for(const c of u)o.annotations.push({predicate:l,value:c.value,datatype:c.datatype});n.push(o)}return n}},Sh=["http://www.w3.org/ns/prov#wasGeneratedBy","http://www.w3.org/ns/prov#wasAttributedTo","http://www.w3.org/ns/prov#wasDerivedFrom","http://www.w3.org/ns/prov#startedAtTime","http://www.w3.org/ns/prov#endedAtTime","http://www.w3.org/ns/prov#generatedAtTime","http://www.w3.org/ns/prov#wasStartedBy","http://www.w3.org/ns/prov#wasEndedBy","http://purl.org/dc/terms/created","http://purl.org/dc/terms/modified","http://purl.org/dc/terms/source","http://purl.org/dc/terms/creator","http://purl.org/dc/terms/publisher","http://www.w3.org/2002/07/owl#versionInfo"],Ch=class{constructor(e){P(this,"_predicates");this._predicates=new Set([...Sh,...(e==null?void 0:e.predicates)??[]])}get predicates(){return[...this._predicates]}isMetadata(e){return this._predicates.has(e)}addPredicates(e){for(const n of e)this._predicates.add(n)}},Mh=class{constructor(){P(this,"_handlers",new Map)}on(e,n){let r=this._handlers.get(e);return r||(r=new Set,this._handlers.set(e,r)),r.add(n),()=>{r.delete(n)}}off(e,n){const r=this._handlers.get(e);r&&r.delete(n)}emit(e,n){const r=this._handlers.get(e);if(r)for(const i of r)try{i(n)}catch(o){console.error(`[dkg-graph-viz] Error in ${e} handler:`,o)}}removeAll(e){e?this._handlers.delete(e):this._handlers.clear()}},Ur=class{constructor(e){P(this,"_container");P(this,"_graph",null);P(this,"_hexPainter");P(this,"_styleEngine");P(this,"_events");P(this,"_currentNodes",new Map);P(this,"_positionCache",new Map);P(this,"_currentLinks",[]);P(this,"_repaintPending",!1);P(this,"_riskPulseEnabled",!1);P(this,"_hoverTraceEnabled",!1);P(this,"_hoveredNodeId",null);P(this,"_fadeInEnabled",!1);P(this,"_loadTime",0);P(this,"_fadeInDuration",1500);P(this,"_animFrameId",null);P(this,"_initialFitDone",!1);P(this,"_autoFitDisabled",!1);P(this,"_lastTopologyKey","");P(this,"_continuousSimulation",!1);P(this,"_fitTimeoutId",null);P(this,"_kaGroups",new Map);P(this,"_kaEnabled",!1);P(this,"_kaBoundaryOpacity",.06);this._container=e.container,this._hexPainter=e.hexPainter,this._styleEngine=e.styleEngine,this._events=e.events}_setAlphaTarget(e){var r;const n=(r=this._graph)==null?void 0:r.d3AlphaTarget;typeof n=="function"&&n.call(this._graph,e)}init(){var s;if(this._graph)return;const e=this._styleEngine.config,n=this._container.clientWidth||this._container.offsetWidth||800,r=this._container.clientHeight||this._container.offsetHeight||600;this._hexPainter.setImageLoadCallback(()=>{this._scheduleRepaint()}),this._graph=Kf()(this._container).width(n).height(r).backgroundColor("transparent").nodeCanvasObjectMode(l=>{var c;const u=l;return(c=u._graphNode)!=null&&c.sizeMultiplier&&u._graphNode.sizeMultiplier>1?"after":"replace"}).nodeCanvasObject((l,u,c)=>{const h=l;if(!h._graphNode)return;const f=h.x??0,d=h.y??0;if(this._fadeInEnabled&&this._loadTime>0){const _=performance.now()-this._loadTime;if(_<this._fadeInDuration){const b=_/this._fadeInDuration,y=1-Math.pow(1-b,3);u.globalAlpha=y}}let p=1;if(this._riskPulseEnabled&&h._graphNode.isHighRisk){const _=performance.now()/1e3,b=nn(h._graphNode.id);p=1+.15*Math.sin(_*1.25+b)}this._hexPainter.paint(u,h._graphNode,f,d,c,p),u.globalAlpha=1}).nodePointerAreaPaint((l,u,c)=>{const h=l;if(!h._graphNode)return;const d=this._hexPainter.getRadius(h._graphNode)+6,p=h.x??0,_=h.y??0;c.beginPath(),c.arc(p,_,d,0,Math.PI*2),c.fillStyle=u,c.fill()}).linkColor(l=>{const u=l;return u._graphEdge?this._styleEngine.getEdgeColor(u._graphEdge):e.defaultEdgeColor}).linkWidth(e.edgeWidth).linkDirectionalArrowLength(e.edgeArrowSize).linkDirectionalArrowRelPos(1).linkCanvasObjectMode(()=>"after").linkCanvasObject((l,u,c)=>{if(c<.3)return;const h=l;if(!h._graphEdge)return;const f=h._graphEdge.label;if(!f)return;const d=.3,_=Math.min(1,(c-d)/(.8-d)),b=12/c,y=h.source,g=h.target;if(!y.x||!g.x)return;const w=(y.x+g.x)/2,x=(y.y+g.y)/2;u.save(),u.globalAlpha=_,u.font=`${b}px ${e.fontFamily}`,u.textAlign="center",u.textBaseline="middle";const m=u.measureText(f).width,v=2/c;u.fillStyle="rgba(15, 23, 42, 0.75)",u.beginPath(),u.roundRect(w-m/2-v,x-b/2-v,m+v*2,b+v*2,2/c),u.fill(),u.fillStyle="#94a3b8",u.fillText(f,w,x),u.restore()}).onRenderFramePre((l,u)=>{this._drawKaBoundaries(l)}).onNodeClick(l=>{const u=l;u._graphNode&&this._events.emit("node:click",u._graphNode)}).onNodeDrag(l=>{try{this._graph.d3ReheatSimulation()}catch{}}).onNodeDragEnd(l=>{try{this._graph.d3ReheatSimulation()}catch{}}).onNodeHover(l=>{const u=l;u!=null&&u._graphNode?(this._hoveredNodeId=u._graphNode.id,this._events.emit("node:hover",u._graphNode),this._container.style.cursor="pointer"):(this._hoveredNodeId=null,this._events.emit("node:unhover",null),this._container.style.cursor="default")}).onLinkClick(l=>{const u=l;u._graphEdge&&this._events.emit("edge:click",u._graphEdge)}).onBackgroundClick(l=>{this._events.emit("background:click",{x:0,y:0})}).cooldownTicks(200).d3AlphaDecay(.02).d3VelocityDecay(.3).warmupTicks(60).onEngineStop(()=>{!this._autoFitDisabled&&!this._initialFitDone&&this._graph&&(this._initialFitDone=!0,this._graph.zoomToFit(400,40))});const i=this._graph.d3Force("charge");i!=null&&i.strength&&(i.strength(-150),(s=i.distanceMax)==null||s.call(i,1e3));const o=this._graph.d3Force("link");o!=null&&o.distance&&o.distance(80).strength(.2);const a=this._graph.d3Force("center");a!=null&&a.strength&&a.strength(.03)}render(e,n,r){var y;this._graph||this.init();let i=0;const o=[...e.keys()].sort();for(const g of o)i=i*31+nn(g)|0;const a=[];for(const g of n.values())a.push(`${g.source}\0${g.target}`);a.sort();for(const g of a)i=i*31+nn(g)|0;const s=String(i);s!==this._lastTopologyKey&&(this._lastTopologyKey=s,this._initialFitDone=!1),this._loadTime===0&&(this._loadTime=performance.now());let l=1;for(const g of e.values())g.degree>l&&(l=g.degree);this._hexPainter.setMaxDegree(l);const u=["http://schema.org/dateCreated","https://schema.org/dateCreated"],c=new Map;for(const[g,w]of e)for(const x of u){const m=(y=w.properties)==null?void 0:y.get(x);if(m&&m.length>0){const v=new Date(m[0].value);if(!isNaN(v.getTime())){c.set(g,v.getTime());break}}}let h=null;if(c.size>=2){const g=[...c.values()],w=Math.min(...g),m=Math.max(...g)-w||1,v=Math.max(400,c.size*120);h=new Map;for(const[S,k]of c)h.set(S,((k-w)/m-.5)*v)}const f=new Map;for(const[g,w]of e){if(r!=null&&r.has(g))continue;const x=this._currentNodes.get(g),m=this._positionCache.get(g),v=h==null?void 0:h.get(g);f.set(g,{id:g,x:(x==null?void 0:x.x)??(m==null?void 0:m.x)??v??(Math.random()-.5)*800,y:(x==null?void 0:x.y)??(m==null?void 0:m.y)??(Math.random()-.5)*400,vx:(x==null?void 0:x.vx)??(m==null?void 0:m.vx),vy:(x==null?void 0:x.vy)??(m==null?void 0:m.vy),fx:typeof(x==null?void 0:x.fx)=="number"?x.fx:typeof(m==null?void 0:m.fx)=="number"?m.fx:void 0,fy:typeof(x==null?void 0:x.fy)=="number"?x.fy:typeof(m==null?void 0:m.fy)=="number"?m.fy:void 0,_graphNode:w})}const d=new Set(f.keys()),p=[];for(const g of n.values())r!=null&&r.has(g.source)||r!=null&&r.has(g.target)||!d.has(g.source)||!d.has(g.target)||p.push({source:g.source,target:g.target,_graphEdge:g});this._currentNodes=f,this._currentLinks=p;const _=new Map;for(const[g,w]of f)_.set(g,{x:w.x,y:w.y,vx:w.vx,vy:w.vy,fx:typeof w.fx=="number"?w.fx:void 0,fy:typeof w.fy=="number"?w.fy:void 0});this._positionCache=_;const b=[...f.values()].sort((g,w)=>{var v,S,k,M;const x=(v=g._graphNode)!=null&&v.sizeMultiplier&&g._graphNode.sizeMultiplier>1?100:(S=g._graphNode)!=null&&S.isHighRisk?10:0,m=(k=w._graphNode)!=null&&k.sizeMultiplier&&w._graphNode.sizeMultiplier>1?100:(M=w._graphNode)!=null&&M.isHighRisk?10:0;return x-m});this._graph.graphData({nodes:b,links:p}),!this._autoFitDisabled&&!this._initialFitDone&&(this._fitTimeoutId!==null&&clearTimeout(this._fitTimeoutId),this._fitTimeoutId=setTimeout(()=>{this._graph&&!this._autoFitDisabled&&!this._initialFitDone&&(this._initialFitDone=!0,this._graph.zoomToFit(400,40)),this._fitTimeoutId=null},300)),h&&h.size>=2?this._graph.d3Force("chronoX",g=>{for(const w of b){const x=h.get(w.id);x!==void 0&&w.fx==null&&(w.vx=(w.vx??0)+(x-(w.x??0))*.05*g)}}):this._graph.d3Force("chronoX",null)}centerOnNode(e,n=350,r){const i=this._currentNodes.get(e);i&&this._graph&&(this._graph.centerAt(i.x,i.y,n),r!=null&&this._graph.zoom(r,n))}zoomToFit(e=40,n=500){var r;(r=this._graph)==null||r.zoomToFit(n,e)}set autoFitDisabled(e){this._autoFitDisabled=e}getCanvas(){return this._graph?this._container.querySelector("canvas")??null:null}refresh(){if(!this._graph)return;const e=this._graph.refresh;if(typeof e=="function"){e.call(this._graph);return}this._scheduleRepaint()}_scheduleRepaint(){this._repaintPending||(this._repaintPending=!0,requestAnimationFrame(()=>{if(this._repaintPending=!1,!!this._graph)if(this._continuousSimulation||this._riskPulseEnabled)try{this._graph.d3ReheatSimulation()}catch{}else{this._graph.cooldownTicks(3);try{this._graph.d3ReheatSimulation()}catch{}this._setAlphaTarget(0),setTimeout(()=>{this._graph&&!this._continuousSimulation&&!this._riskPulseEnabled&&(this._graph.cooldownTicks(0),this._setAlphaTarget(0))},60)}}))}_stopAnimLoop(){this._animFrameId!==null&&(cancelAnimationFrame(this._animFrameId),this._animFrameId=null)}setKaGroups(e,n,r=.06){this._kaGroups=e,this._kaEnabled=n,this._kaBoundaryOpacity=r}_drawKaBoundaries(e){if(!this._kaEnabled||this._kaGroups.size===0)return;const n=this._styleEngine.palette;let r=0;for(const[i,o]of this._kaGroups){const a=[];for(const h of o){const f=this._currentNodes.get(h);f&&f.x!==void 0&&f.y!==void 0&&a.push([f.x,f.y])}if(a.length<3)continue;const s=Ah(a);if(s.length<3)continue;const l=n.nodeColors[r%n.nodeColors.length];r++,e.save(),e.beginPath();const u=s.reduce((h,f)=>h+f[0],0)/s.length,c=s.reduce((h,f)=>h+f[1],0)/s.length;for(let h=0;h<s.length;h++){const f=s[h][0]-u,d=s[h][1]-c,p=Math.sqrt(f*f+d*d),_=30,b=s[h][0]+(p>0?f/p*_:0),y=s[h][1]+(p>0?d/p*_:0);h===0?e.moveTo(b,y):e.lineTo(b,y)}e.closePath(),e.fillStyle=l,e.globalAlpha=this._kaBoundaryOpacity,e.fill(),e.strokeStyle=l,e.globalAlpha=this._kaBoundaryOpacity*2.5,e.lineWidth=1,e.stroke(),e.restore()}}resize(){this._graph&&(this._graph.width(this._container.clientWidth),this._graph.height(this._container.clientHeight))}destroy(){this._stopAnimLoop(),this._fitTimeoutId!==null&&(clearTimeout(this._fitTimeoutId),this._fitTimeoutId=null),this._graph&&(this._graph._destructor(),this._graph=null),this._currentNodes.clear(),this._positionCache.clear(),this._currentLinks=[]}applyAnimation(e){if(!this._graph)return;this._riskPulseEnabled=e.riskPulse??!1,this._fadeInEnabled=e.fadeIn??!1,this._hoverTraceEnabled=e.hoverTrace??!1;const n=e.linkParticleSpeed??.005,r=e.linkParticleColor??"rgba(100,150,255,0.6)",i=e.linkParticleWidth??1.5;if(e.linkParticles||e.hoverTrace){const a=e.linkParticleCount??1;this._hoverTraceEnabled?this._graph.linkDirectionalParticles(s=>{if(!this._hoveredNodeId)return e.linkParticles?a:0;const l=s,u=typeof l.source=="object"?l.source.id:l.source,c=typeof l.target=="object"?l.target.id:l.target;return u===this._hoveredNodeId||c===this._hoveredNodeId?4:e.linkParticles?a:0}).linkDirectionalParticleSpeed(s=>{if(!this._hoveredNodeId)return n;const l=s,u=typeof l.source=="object"?l.source.id:l.source,c=typeof l.target=="object"?l.target.id:l.target;return u===this._hoveredNodeId||c===this._hoveredNodeId?.02:n}).linkDirectionalParticleWidth(s=>{if(!this._hoveredNodeId)return i;const l=s,u=typeof l.source=="object"?l.source.id:l.source,c=typeof l.target=="object"?l.target.id:l.target;return u===this._hoveredNodeId||c===this._hoveredNodeId?3:i}).linkDirectionalParticleColor(s=>{if(!this._hoveredNodeId)return r;const l=s,u=typeof l.source=="object"?l.source.id:l.source,c=typeof l.target=="object"?l.target.id:l.target;return u===this._hoveredNodeId||c===this._hoveredNodeId?"#60a0ff":r}):this._graph.linkDirectionalParticles(a).linkDirectionalParticleSpeed(n).linkDirectionalParticleWidth(i).linkDirectionalParticleColor(()=>r)}else this._graph.linkDirectionalParticles(0);const o=e.drift||this._riskPulseEnabled;if(this._continuousSimulation=o,o?(this._graph.cooldownTicks(1/0),this._setAlphaTarget(e.driftAlpha??.008),!this._autoFitDisabled&&!this._initialFitDone&&(this._fitTimeoutId!==null&&clearTimeout(this._fitTimeoutId),this._fitTimeoutId=setTimeout(()=>{this._graph&&!this._autoFitDisabled&&!this._initialFitDone&&(this._initialFitDone=!0,this._graph.zoomToFit(400,40)),this._fitTimeoutId=null},300))):(this._graph.cooldownTicks(120),this._setAlphaTarget(0)),this._stopAnimLoop(),this._riskPulseEnabled&&!e.drift){const a=()=>{if(!this._riskPulseEnabled||!this._graph){this._animFrameId=null;return}try{this._graph.d3ReheatSimulation()}catch{}this._animFrameId=requestAnimationFrame(a)};this._animFrameId=requestAnimationFrame(a)}}applyPalette(e){this._graph&&this._graph.backgroundColor(e.background==="#0a0a0f"?"transparent":e.background)}};function nn(e){let n=0;for(let r=0;r<e.length;r++)n=(n<<5)-n+e.charCodeAt(r)|0;return n}function Ah(e){if(e.length<3)return e;const n=[...e].sort((a,s)=>a[0]-s[0]||a[1]-s[1]),r=(a,s,l)=>(s[0]-a[0])*(l[1]-a[1])-(s[1]-a[1])*(l[0]-a[0]),i=[];for(const a of n){for(;i.length>=2&&r(i[i.length-2],i[i.length-1],a)<=0;)i.pop();i.push(a)}const o=[];for(let a=n.length-1;a>=0;a--){const s=n[a];for(;o.length>=2&&r(o[o.length-2],o[o.length-1],s)<=0;)o.pop();o.push(s)}return i.pop(),o.pop(),i.concat(o)}var Ph=class{constructor(e,n={}){P(this,"_model");P(this,"_prefixManager");P(this,"_labelResolver");P(this,"_styleEngine");P(this,"_hexPainter");P(this,"_focusFilter");P(this,"_reificationCollapser");P(this,"_metadataExtractor");P(this,"_events");P(this,"_renderer");P(this,"_config");P(this,"_collapsedNodeIds",new Set);P(this,"_rendererReady");P(this,"_container");P(this,"_temporalFilter");P(this,"_timelineOverlay",null);P(this,"_renderQueued",!1);P(this,"_autoFitDisabled",!1);P(this,"_highlightState",new Map);this._config=n,this._container=e,this._metadataExtractor=new Ch(n.metadata),this._model=new ch(this._metadataExtractor.predicates),this._prefixManager=new ie(n.prefixes),this._labelResolver=new dh(n.labelMode??"humanized",this._prefixManager,n.labels),this._styleEngine=new gh(n.style,this._prefixManager),this._hexPainter=new yh(n.hexagon,this._styleEngine,this._prefixManager),this._focusFilter=new $r(n.focus),this._reificationCollapser=new kh(n.reification),this._temporalFilter=new Ir,this._events=new Mh;const r={container:e,hexPainter:this._hexPainter,styleEngine:this._styleEngine,events:this._events};if(n.renderer==="3d"){let i;this._rendererReady=new Promise(o=>{i=o}),this._renderer=null,qt(async()=>{const{WebGL3DRenderer:o}=await import("./renderer-3d-2EVDZII7-BCmzI8Ii.js");return{WebGL3DRenderer:o}},__vite__mapDeps([0,1,2])).then(({WebGL3DRenderer:o})=>{this._renderer=new o(r),i()}).catch(o=>{console.warn("[dkg-graph-viz] 3D renderer not available, falling back to 2D:",o.message),this._renderer=new Ur(r),i()})}else this._renderer=new Ur(r),this._rendererReady=Promise.resolve();n.autoFitDisabled&&(this._autoFitDisabled=!0,this._renderer?this._renderer.autoFitDisabled=!0:this._rendererReady.then(()=>{this._renderer&&(this._renderer.autoFitDisabled=!0)})),typeof ResizeObserver<"u"&&new ResizeObserver(()=>{var o;return(o=this._renderer)==null?void 0:o.resize()}).observe(e)}async loadNTriples(e){const{parseNTriples:n}=await qt(async()=>{const{parseNTriples:i}=await import("./ntriples-ZWBY2WET-DH7OofPp.js");return{parseNTriples:i}},__vite__mapDeps([3,4])),r=n(e);this._ingest(r)}async loadNQuads(e){const{parseNQuads:n}=await qt(async()=>{const{parseNQuads:i}=await import("./ntriples-ZWBY2WET-DH7OofPp.js");return{parseNQuads:i}},__vite__mapDeps([3,4])),r=n(e);this._ingest(r)}async loadTurtle(e){const{parseTurtle:n}=await qt(async()=>{const{parseTurtle:o}=await import("./turtle-JJPK7LJ5-BzTu0283.js");return{parseTurtle:o}},__vite__mapDeps([5,4])),{triples:r,prefixes:i}=n(e);this._prefixManager.addPrefixes(i),this._ingest(r)}async loadJsonLd(e){const{parseJsonLd:n}=await qt(async()=>{const{parseJsonLd:i}=await import("./jsonld-32FQRO67-DKLfQ_nD.js");return{parseJsonLd:i}},__vite__mapDeps([6,1,2])),r=await n(e);this._ingest(r)}loadTriples(e){const n=e.map(r=>{if(Array.isArray(r))return{subject:r[0],predicate:r[1],object:r[2]};if("s"in r&&"p"in r&&"o"in r){const i=r;return{subject:i.s,predicate:i.p,object:i.o}}return r});this._ingest(n)}async loadFromSource(e,n){const r=await e.construct(n);this._ingest(r.triples)}async querySource(e,n){return e.select(n)}addTriples(e){const n=this._model.addTriples(e);return this._postIngest(),this._events.emit("data:change",n),n}removeTriples(e){const n=this._model.removeTriples(e);return this._postIngest(),this._events.emit("data:change",n),n}focus(e,n){var r;this._focusFilter.setFocus(e),n!==void 0&&(this._focusFilter=new $r({...this._config.focus,focalNode:e,hops:n})),this._renderCurrent(),(r=this._renderer)==null||r.centerOnNode(e,500,2),this._events.emit("focus:change",{focalNode:e,visibleNodes:this._focusFilter.visibleNodeIds.size})}centerOnNode(e,n){var r;(r=this._renderer)==null||r.centerOnNode(e,n==null?void 0:n.durationMs,n==null?void 0:n.zoomLevel)}expandNode(e){this._focusFilter.expandNode(e,this._model),this._renderCurrent()}showAll(){this._focusFilter.disable(),this._renderCurrent()}get temporalFilter(){return this._temporalFilter}get timelineOverlay(){return this._timelineOverlay}setTimeCursor(e){this._temporalFilter.setCursor(e),this._renderCurrent(),this._events.emit("temporal:change",{cursor:e,visibleCount:this._lastVisibleCount(),totalDated:this._temporalFilter.datedNodeCount})}getDateRange(){return this._temporalFilter.dateRange}playTimeline(){var e;(e=this._timelineOverlay)==null||e.play()}pauseTimeline(){var e;(e=this._timelineOverlay)==null||e.pause()}_lastVisibleCount(){const{nodes:e}=this._focusFilter.compute(this._model),n=this._temporalFilter.getVisibleNodeIds(e.keys());return n?n.size:e.size}zoomToFit(e){var n;(n=this._renderer)==null||n.zoomToFit(e)}set autoFitDisabled(e){this._autoFitDisabled=e,this._renderer?this._renderer.autoFitDisabled=e:this._rendererReady.then(()=>{this._renderer&&(this._renderer.autoFitDisabled=e)})}get labelMode(){return this._labelResolver.mode}setLabelMode(e){this._labelResolver.mode=e,this._labelResolver.updateLabels(this._model.nodes,this._model.edges),this._renderCurrent()}on(e,n){return this._events.on(e,n)}off(e,n){this._events.off(e,n)}getNode(e){return this._model.getNode(e)}getEdgesFrom(e){return this._model.getEdgesFrom(e)}getEdgesTo(e){return this._model.getEdgesTo(e)}get model(){return this._model}get styleEngine(){return this._styleEngine}get prefixes(){return this._prefixManager}highlightNodes(e){var r;this.clearHighlight();const n=new Set(e);for(const[i,o]of this._model.nodes)n.has(i)&&(this._highlightState.set(i,{riskScore:o.riskScore,isHighRisk:o.isHighRisk,sizeMultiplier:o.sizeMultiplier}),o.isHighRisk=!0,(!o.sizeMultiplier||o.sizeMultiplier<2)&&(o.sizeMultiplier=2));(r=this._renderer)!=null&&r.refresh?this._renderer.refresh():this._renderCurrent()}clearHighlight(){var e;if(this._highlightState.size!==0){for(const[n,r]of this._highlightState){const i=this._model.nodes.get(n);i&&(i.riskScore=r.riskScore,i.isHighRisk=r.isHighRisk,i.sizeMultiplier=r.sizeMultiplier)}this._highlightState.clear(),(e=this._renderer)!=null&&e.refresh?this._renderer.refresh():this._renderCurrent()}}async exportImage(){const e=this._renderer.getCanvas();if(!e)throw new Error("Cannot export: renderer not initialized or no canvas available");return new Promise((n,r)=>{e.toBlob(i=>{i?n(i):r(new Error("Canvas toBlob returned null"))},"image/png")})}exportTriples(){const e=[];for(const n of this._model.triples){const r=rn(n.subject),i=rn(n.predicate);if(n.datatype||n.language||!Th(n.object)){let o=`"${Eh(n.object)}"`;n.language?o+=`@${n.language}`:n.datatype&&(o+=`^^<${n.datatype}>`),e.push(`${r} ${i} ${o} .`)}else e.push(`${r} ${i} ${rn(n.object)} .`)}return e.join(`
|
|
192
|
-
`)}applyView(e){var i,o,a,s,l;const n=ih(e.palette,e.paletteOverrides);if(this._styleEngine.setPalette(n),oh(this._container,n),(i=e.trust)!=null&&i.enabled?(this._hexPainter.setTrustStyle(e.trust.style??"border"),this._hexPainter.setShowBadges(e.trust.showBadge!==!1)):this._hexPainter.setTrustStyle("none"),Qf(e,this._model),new sh().resolve(this._model),(o=e.temporal)!=null&&o.enabled?(this._temporalFilter=new Ir(e.temporal),this._temporalFilter.scan(this._model),this._temporalFilter.dateRange&&((a=this._timelineOverlay)==null||a.unmount(),this._timelineOverlay=new uh(this._container,this._temporalFilter,e.temporal),this._timelineOverlay.onChange(u=>{this._renderCurrent(),this._events.emit("temporal:change",{cursor:u,visibleCount:this._lastVisibleCount(),totalDated:this._temporalFilter.datedNodeCount})}),this._timelineOverlay.mount())):((s=this._timelineOverlay)==null||s.unmount(),this._timelineOverlay=null),this._renderCurrent(),(l=e.knowledgeAssets)!=null&&l.enabled){const u=e.knowledgeAssets.membershipPredicate??"dkg:partOfAsset";this._model.setKaMembershipPredicate(u)}this._rendererReady.then(()=>{var u,c,h,f;e.animation&&((u=this._renderer)!=null&&u.applyAnimation)&&this._renderer.applyAnimation(e.animation),(c=this._renderer)!=null&&c.applyPalette&&this._renderer.applyPalette(n),(h=e.knowledgeAssets)!=null&&h.enabled&&((f=this._renderer)!=null&&f.setKaGroups)&&this._renderer.setKaGroups(this._model.kaGroups,e.knowledgeAssets.showBoundaries!==!1,e.knowledgeAssets.boundaryOpacity??.06)})}refresh(){this._renderCurrent()}destroy(){var e,n;(e=this._timelineOverlay)==null||e.unmount(),this._timelineOverlay=null,(n=this._renderer)==null||n.destroy(),this._events.removeAll(),this._model.clear(),this._highlightState.clear()}_ingest(e){this._model.addTriples(e),this._postIngest()}_postIngest(){for(const e of this._model.nodes.values())e.imageUrl||(e.imageUrl=this._hexPainter.resolveImageUrl(e,n=>this._model.getNode(n),n=>this._model.getEdgesFrom(n)));this._labelResolver.updateLabels(this._model.nodes,this._model.edges),this._collapsedNodeIds=this._reificationCollapser.collapse(this._model),this._renderCurrent()}_renderCurrent(){var i;if(!this._renderer){this._renderQueued||(this._renderQueued=!0,this._rendererReady.then(()=>{this._renderQueued=!1,this._renderCurrent()}));return}let{nodes:e,edges:n}=this._focusFilter.compute(this._model);const r=this._temporalFilter.getVisibleNodeIds(e.keys());if(r){const o=new Map,a=new Map;for(const[s,l]of e)r.has(s)&&o.set(s,l);for(const[s,l]of n)o.has(l.source)&&o.has(l.target)&&a.set(s,l);e=o,n=a}this._renderer.render(e,n,this._collapsedNodeIds),(i=this._timelineOverlay)!=null&&i.mounted&&this._timelineOverlay.updateCount(e.size)}};function Th(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("urn:")||e.startsWith("_:")}function rn(e){return e.startsWith("_:")?e:`<${e}>`}function Eh(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}var Fn=et.createContext({viz:null,selectedNode:null,hoveredNode:null});function jn(){return et.useContext(Fn)}function Nh({data:e,format:n="ntriples",options:r={},viewConfig:i,initialFit:o,initialFocus:a,onNodeClick:s,onNodeHover:l,onNodeUnhover:u,className:c,style:h,children:f}){const d=et.useRef(null),p=et.useRef(null),_=et.useRef(!1),[b,y]=et.useState(null),[g,w]=et.useState(null);et.useEffect(()=>{if(!d.current)return;const v=new Ph(d.current,r);p.current=v;const S=[];return S.push(v.on("node:click",k=>{y(k),s==null||s(k)})),S.push(v.on("node:hover",k=>{w(k),l==null||l(k)})),S.push(v.on("node:unhover",k=>{w(null),u==null||u(k)})),S.push(v.on("background:click",()=>{y(null)})),()=>{S.forEach(k=>k()),v.destroy(),p.current=null}},[]),et.useEffect(()=>{const v=p.current;if(!v||!e)return;v.model.clear();const S=async()=>{var N;if(typeof e=="string")switch(n){case"ntriples":await v.loadNTriples(e);break;case"nquads":await v.loadNQuads(e);break;case"turtle":await v.loadTurtle(e);break;case"jsonld":await v.loadJsonLd(e);break;default:await v.loadNTriples(e)}else Array.isArray(e)&&v.loadTriples(e);(N=r.style)!=null&&N.nodeColors&&v.styleEngine.setNodeColors(r.style.nodeColors),i&&v.applyView(i)};let k=!1,M;return S().then(()=>{k||v&&o&&!_.current&&(M=setTimeout(()=>{k||(_.current=!0,v.zoomToFit())},300))}).catch(N=>{k||console.error("[RdfGraph] Error loading data:",N)}),()=>{k=!0,M&&clearTimeout(M)}},[e,n,i]);const x=et.useRef(i);et.useEffect(()=>{const v=p.current;!v||!i||i===x.current||(x.current=i,v.applyView(i),v.refresh())},[i]),et.useEffect(()=>{if(!a)return;const v=p.current;if(!v)return;const S=setTimeout(()=>{try{v.centerOnNode(a,{durationMs:600,zoomLevel:2})}catch{}},550);return()=>clearTimeout(S)},[a,e]);const m=et.useCallback(()=>({viz:p.current,selectedNode:b,hoveredNode:g}),[b,g]);return K.jsxs(Fn.Provider,{value:m(),children:[K.jsx("div",{ref:d,className:c,style:{width:"100%",height:"100%",...h}}),f]})}function zh({renderNode:e,className:n,style:r,showUri:i=!0,showTypes:o=!0,showProperties:a=!0,showMetadata:s=!1,maxValueLength:l=200}){const{selectedNode:u}=jn();return e?K.jsx(K.Fragment,{children:e(u)}):u?K.jsxs("div",{className:n,style:r,children:[K.jsx(Ih,{node:u,showUri:i,showTypes:o}),a&&u.properties.size>0&&K.jsx(Hr,{title:"Properties",entries:u.properties,maxValueLength:l}),s&&u.metadata.size>0&&K.jsx(Hr,{title:"Metadata",entries:u.metadata,maxValueLength:l})]}):null}function Ih({node:e,showUri:n,showTypes:r}){const i=et.useMemo(()=>e.types.map(o=>{var a;return((a=o.split("/").pop())==null?void 0:a.split("#").pop())??o}),[e.types]);return K.jsxs("div",{children:[K.jsx("h3",{style:{margin:"0 0 4px 0",wordBreak:"break-word"},children:e.label}),n&&K.jsx("div",{style:{fontSize:"0.8em",opacity:.6,wordBreak:"break-all",marginBottom:4},children:e.id}),r&&i.length>0&&K.jsx("div",{style:{fontSize:"0.85em",marginBottom:8},children:i.join(", ")}),K.jsxs("div",{style:{fontSize:"0.85em",opacity:.7},children:["Connections: ",e.degree]})]})}function Hr({title:e,entries:n,maxValueLength:r}){return K.jsxs("div",{style:{marginTop:12},children:[K.jsx("h4",{style:{margin:"0 0 4px 0",fontSize:"0.8em",textTransform:"uppercase",opacity:.5},children:e}),[...n].map(([i,o])=>{var s;const a=((s=i.split("/").pop())==null?void 0:s.split("#").pop())??i;return K.jsxs("div",{style:{fontSize:"0.85em",marginBottom:2,lineHeight:1.5},children:[K.jsxs("span",{style:{opacity:.6},children:[Rh(a),": "]}),K.jsx("span",{style:{wordBreak:"break-word"},children:o.map(l=>Oh(l.value,r)).join(", ")})]},i)})]})}function Rh(e){return e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/_/g," ").replace(/^\w/,n=>n.toUpperCase())}function Oh(e,n){return e.length>n?e.slice(0,n-1)+"…":e}function Dh(){const e=jn();return{viz:e.viz,selectedNode:e.selectedNode,hoveredNode:e.hoveredNode}}const Lh=Object.freeze(Object.defineProperty({__proto__:null,NodePanel:zh,RdfGraph:Nh,RdfGraphContext:Fn,useRdfGraph:Dh,useRdfGraphContext:jn},Symbol.toStringTag,{value:"Module"}));export{Ot as E,pi as G,er as T,Zc as a,sf as b,lf as c,af as d,Tn as e,Ju as f,Qu as g,Lh as h,B as i,Ef as s,D as t,Dh as u};
|