@origintrail-official/dkg-node-ui 10.0.23 → 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/README.md +4 -0
- package/dist-ui/assets/ActivityFeed-vyl2XdLo.js +99 -0
- package/dist-ui/assets/{AgentHub-DyF5Pa70.js → AgentHub-CYfAoOWF.js} +1 -1
- package/dist-ui/assets/AgentProfilePage-BjQm0je4.js +1 -0
- package/dist-ui/assets/{ApproveWalletsModal-Dd_tHLRP.js → ApproveWalletsModal-CzWJ4KyU.js} +1 -1
- package/dist-ui/assets/{ContextGraphPrimitives-BXormriD.js → ContextGraphPrimitives-ecppTns4.js} +1 -1
- package/dist-ui/assets/{ConvictionDetailView-BsPTd17P.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-BKvJttOu.js → Network-F76S9_1V.js} +1 -1
- package/dist-ui/assets/{OnChainProvenanceCard-BV9-G1cT.js → OnChainProvenanceCard-CCwK3sRG.js} +1 -1
- package/dist-ui/assets/{Operations-LAhUQsnj.js → Operations-aVCBUh8u.js} +1 -1
- package/dist-ui/assets/ProjectView-Cb1PQ-jm.js +290 -0
- package/dist-ui/assets/{PublishingConviction-CF6352oT.js → PublishingConviction-BnAJjHL8.js} +2 -2
- package/dist-ui/assets/{Settings-runaZqPv.js → Settings-rEyPw1oS.js} +1 -1
- package/dist-ui/assets/{browserWalletTransaction-CBgx0i4w.js → browserWalletTransaction-BJBFRjXx.js} +3 -3
- package/dist-ui/assets/{ccip-BM07w5uU.js → ccip-DYOqJfs7.js} +1 -1
- package/dist-ui/assets/index-CAdbSAQK.css +1 -0
- package/dist-ui/assets/index-HEpqHVfE.js +1143 -0
- package/dist-ui/assets/index-_vQ99L0s.js +192 -0
- package/dist-ui/assets/{jsonld-32FQRO67-DBZOBQji.js → jsonld-32FQRO67-DVqZhSL_.js} +2 -2
- package/dist-ui/assets/{jsonld-DOX7dKpf.js → jsonld-Dpm03cay.js} +1 -1
- package/dist-ui/assets/renderer-3d-IRPVRQWX-DjW_h88e.js +5126 -0
- package/dist-ui/assets/{shikiHighlighter-CzU2U2Tx.js → shikiHighlighter-DL7LOds2.js} +1 -1
- package/dist-ui/assets/truncate-BWdqLeqV.js +22 -0
- package/dist-ui/assets/{useEntityOnChainReceipt-BvWQ6qdT.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-DbVwxMKf.js +0 -1015
- package/dist-ui/assets/ActivityFeed-Bfg6fmQQ.js +0 -99
- package/dist-ui/assets/AgentProfilePage-BPrSuKjV.js +0 -1
- package/dist-ui/assets/MemoryLayerView-CloJeM33.js +0 -2
- package/dist-ui/assets/MemoryStackView-BbUJ2uiM.js +0 -1
- package/dist-ui/assets/ProjectView-0zCSblAV.js +0 -290
- package/dist-ui/assets/index-CfVUpsfM.js +0 -192
- package/dist-ui/assets/index-MQh8C4aJ.js +0 -1175
- package/dist-ui/assets/index-xKO-U_eV.css +0 -1
- package/dist-ui/assets/renderer-3d-2EVDZII7-CVCpAmwB.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-Cxr4QGX1.js +0 -1
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/renderer-3d-IRPVRQWX-DjW_h88e.js","assets/index-HEpqHVfE.js","assets/index-CAdbSAQK.css","assets/string-DtUow4KV.js","assets/ntriples-ZWBY2WET-DH7OofPp.js","assets/N3Parser-CI_4owEm.js","assets/turtle-JJPK7LJ5-BzTu0283.js","assets/jsonld-32FQRO67-DVqZhSL_.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var eo=Object.defineProperty;var qn=e=>{throw TypeError(e)};var no=(e,n,r)=>n in e?eo(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r;var P=(e,n,r)=>no(e,typeof n!="symbol"?n+"":n,r),Gn=(e,n,r)=>n.has(e)||qn("Cannot "+r);var ht=(e,n,r)=>(Gn(e,n,"read from private field"),r?r.call(e):n.get(e)),Yt=(e,n,r)=>n.has(e)?qn("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,r),we=(e,n,r,i)=>(Gn(e,n,"write to private field"),i?i.call(e,r):n.set(e,r),r);import{aU as K,bj as Z,_ as Kt}from"./index-HEpqHVfE.js";import{e as Ot,c as Xn,f as Yn,g as ro,o as io,h as Kn,m as Zn}from"./string-DtUow4KV.js";function oo(e,n){let r=0;for(let i of e)(i=+i)&&(r+=i);return r}var Qn=180/Math.PI,fn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Jr(e,n,r,i,o,s){var a,l,u;return(a=Math.sqrt(e*e+n*n))&&(e/=a,n/=a),(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,a=-a),{translateX:o,translateY:s,rotate:Math.atan2(n,e)*Qn,skewX:Math.atan(u)*Qn,scaleX:a,scaleY:l}}var xe;function so(e){const n=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return n.isIdentity?fn:Jr(n.a,n.b,n.c,n.d,n.e,n.f)}function ao(e){return e==null||(xe||(xe=document.createElementNS("http://www.w3.org/2000/svg","g")),xe.setAttribute("transform",e),!(e=xe.transform.baseVal.consolidate()))?fn:(e=e.matrix,Jr(e.a,e.b,e.c,e.d,e.e,e.f))}function ti(e,n,r,i){function o(c){return c.length?c.pop()+" ":""}function s(c,f,h,d,p,_){if(c!==h||f!==d){var m=p.push("translate(",null,n,null,r);_.push({i:m-4,x:Ot(c,h)},{i:m-2,x:Ot(f,d)})}else(h||d)&&p.push("translate("+h+n+d+r)}function a(c,f,h,d){c!==f?(c-f>180?f+=360:f-c>180&&(c+=360),d.push({i:h.push(o(h)+"rotate(",null,i)-2,x:Ot(c,f)})):f&&h.push(o(h)+"rotate("+f+i)}function l(c,f,h,d){c!==f?d.push({i:h.push(o(h)+"skewX(",null,i)-2,x:Ot(c,f)}):f&&h.push(o(h)+"skewX("+f+i)}function u(c,f,h,d,p,_){if(c!==h||f!==d){var m=p.push(o(p)+"scale(",null,",",null,")");_.push({i:m-4,x:Ot(c,h)},{i:m-2,x:Ot(f,d)})}else(h!==1||d!==1)&&p.push(o(p)+"scale("+h+","+d+")")}return function(c,f){var h=[],d=[];return c=e(c),f=e(f),s(c.translateX,c.translateY,f.translateX,f.translateY,h,d),a(c.rotate,f.rotate,h,d),l(c.skewX,f.skewX,h,d),u(c.scaleX,c.scaleY,f.scaleX,f.scaleY,h,d),c=f=null,function(p){for(var _=-1,m=d.length,v;++_<m;)h[(v=d[_]).i]=v.x(p);return h.join("")}}}var lo=ti(so,"px, ","px)","deg)"),uo=ti(ao,", ",")",")"),co=1e-12;function Jn(e){return((e=Math.exp(e))+1/e)/2}function ho(e){return((e=Math.exp(e))-1/e)/2}function fo(e){return((e=Math.exp(2*e))-1)/(e+1)}const po=(function e(n,r,i){function o(s,a){var l=s[0],u=s[1],c=s[2],f=a[0],h=a[1],d=a[2],p=f-l,_=h-u,m=p*p+_*_,v,g;if(m<co)g=Math.log(d/c)/n,v=function(C){return[l+C*p,u+C*_,c*Math.exp(n*C*g)]};else{var w=Math.sqrt(m),x=(d*d-c*c+i*m)/(2*c*r*w),y=(d*d-c*c-i*m)/(2*d*r*w),b=Math.log(Math.sqrt(x*x+1)-x),S=Math.log(Math.sqrt(y*y+1)-y);g=(S-b)/n,v=function(C){var M=C*g,z=Jn(b),A=c/(r*w)*(z*fo(n*M+b)-ho(b));return[l+A*p,u+A*_,c*z/Jn(n*M+b)]}}return v.duration=g*1e3*n/Math.SQRT2,v}return o.rho=function(s){var a=Math.max(.001,+s),l=a*a,u=l*l;return e(a,l,u)},o})(Math.SQRT2,2,4);var dn="http://www.w3.org/1999/xhtml";const tr={svg:"http://www.w3.org/2000/svg",xhtml:dn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ge(e){var n=e+="",r=n.indexOf(":");return r>=0&&(n=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),tr.hasOwnProperty(n)?{space:tr[n],local:e}:e}function go(e){return function(){var n=this.ownerDocument,r=this.namespaceURI;return r===dn&&n.documentElement.namespaceURI===dn?n.createElement(e):n.createElementNS(r,e)}}function _o(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function ei(e){var n=Ge(e);return(n.local?_o:go)(n)}function vo(){}function Tn(e){return e==null?vo:function(){return this.querySelector(e)}}function yo(e){typeof e!="function"&&(e=Tn(e));for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o)for(var s=n[o],a=s.length,l=i[o]=new Array(a),u,c,f=0;f<a;++f)(u=s[f])&&(c=e.call(u,u.__data__,f,s))&&("__data__"in u&&(c.__data__=u.__data__),l[f]=c);return new it(i,this._parents)}function mo(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function bo(){return[]}function ni(e){return e==null?bo:function(){return this.querySelectorAll(e)}}function wo(e){return function(){return mo(e.apply(this,arguments))}}function xo(e){typeof e=="function"?e=wo(e):e=ni(e);for(var n=this._groups,r=n.length,i=[],o=[],s=0;s<r;++s)for(var a=n[s],l=a.length,u,c=0;c<l;++c)(u=a[c])&&(i.push(e.call(u,u.__data__,c,a)),o.push(u));return new it(i,o)}function ri(e){return function(){return this.matches(e)}}function ii(e){return function(n){return n.matches(e)}}var ko=Array.prototype.find;function So(e){return function(){return ko.call(this.children,e)}}function Co(){return this.firstElementChild}function Mo(e){return this.select(e==null?Co:So(typeof e=="function"?e:ii(e)))}var Ao=Array.prototype.filter;function Po(){return Array.from(this.children)}function To(e){return function(){return Ao.call(this.children,e)}}function Eo(e){return this.selectAll(e==null?Po:To(typeof e=="function"?e:ii(e)))}function No(e){typeof e!="function"&&(e=ri(e));for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o)for(var s=n[o],a=s.length,l=i[o]=[],u,c=0;c<a;++c)(u=s[c])&&e.call(u,u.__data__,c,s)&&l.push(u);return new it(i,this._parents)}function oi(e){return new Array(e.length)}function zo(){return new it(this._enter||this._groups.map(oi),this._parents)}function Re(e,n){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=n}Re.prototype={constructor:Re,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 Io(e){return function(){return e}}function Ro(e,n,r,i,o,s){for(var a=0,l,u=n.length,c=s.length;a<c;++a)(l=n[a])?(l.__data__=s[a],i[a]=l):r[a]=new Re(e,s[a]);for(;a<u;++a)(l=n[a])&&(o[a]=l)}function Do(e,n,r,i,o,s,a){var l,u,c=new Map,f=n.length,h=s.length,d=new Array(f),p;for(l=0;l<f;++l)(u=n[l])&&(d[l]=p=a.call(u,u.__data__,l,n)+"",c.has(p)?o[l]=u:c.set(p,u));for(l=0;l<h;++l)p=a.call(e,s[l],l,s)+"",(u=c.get(p))?(i[l]=u,u.__data__=s[l],c.delete(p)):r[l]=new Re(e,s[l]);for(l=0;l<f;++l)(u=n[l])&&c.get(d[l])===u&&(o[l]=u)}function Oo(e){return e.__data__}function Fo(e,n){if(!arguments.length)return Array.from(this,Oo);var r=n?Do:Ro,i=this._parents,o=this._groups;typeof e!="function"&&(e=Io(e));for(var s=o.length,a=new Array(s),l=new Array(s),u=new Array(s),c=0;c<s;++c){var f=i[c],h=o[c],d=h.length,p=jo(e.call(f,f&&f.__data__,c,i)),_=p.length,m=l[c]=new Array(_),v=a[c]=new Array(_),g=u[c]=new Array(d);r(f,h,m,v,g,p,n);for(var w=0,x=0,y,b;w<_;++w)if(y=m[w]){for(w>=x&&(x=w+1);!(b=v[x])&&++x<_;);y._next=b||null}}return a=new it(a,i),a._enter=l,a._exit=u,a}function jo(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function $o(){return new it(this._exit||this._groups.map(oi),this._parents)}function Lo(e,n,r){var i=this.enter(),o=this,s=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?s.remove():r(s),i&&o?i.merge(o).order():o}function Uo(e){for(var n=e.selection?e.selection():e,r=this._groups,i=n._groups,o=r.length,s=i.length,a=Math.min(o,s),l=new Array(o),u=0;u<a;++u)for(var c=r[u],f=i[u],h=c.length,d=l[u]=new Array(h),p,_=0;_<h;++_)(p=c[_]||f[_])&&(d[_]=p);for(;u<o;++u)l[u]=r[u];return new it(l,this._parents)}function Ho(){for(var e=this._groups,n=-1,r=e.length;++n<r;)for(var i=e[n],o=i.length-1,s=i[o],a;--o>=0;)(a=i[o])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function Bo(e){e||(e=Vo);function n(h,d){return h&&d?e(h.__data__,d.__data__):!h-!d}for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s){for(var a=r[s],l=a.length,u=o[s]=new Array(l),c,f=0;f<l;++f)(c=a[f])&&(u[f]=c);u.sort(n)}return new it(o,this._parents).order()}function Vo(e,n){return e<n?-1:e>n?1:e>=n?0:NaN}function Wo(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function qo(){return Array.from(this)}function Go(){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,s=i.length;o<s;++o){var a=i[o];if(a)return a}return null}function Xo(){let e=0;for(const n of this)++e;return e}function Yo(){return!this.node()}function Ko(e){for(var n=this._groups,r=0,i=n.length;r<i;++r)for(var o=n[r],s=0,a=o.length,l;s<a;++s)(l=o[s])&&e.call(l,l.__data__,s,o);return this}function Zo(e){return function(){this.removeAttribute(e)}}function Qo(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Jo(e,n){return function(){this.setAttribute(e,n)}}function ts(e,n){return function(){this.setAttributeNS(e.space,e.local,n)}}function es(e,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function ns(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 rs(e,n){var r=Ge(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?Qo:Zo:typeof n=="function"?r.local?ns:es:r.local?ts:Jo)(r,n))}function si(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function is(e){return function(){this.style.removeProperty(e)}}function os(e,n,r){return function(){this.style.setProperty(e,n,r)}}function ss(e,n,r){return function(){var i=n.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function as(e,n,r){return arguments.length>1?this.each((n==null?is:typeof n=="function"?ss:os)(e,n,r??"")):qt(this.node(),e)}function qt(e,n){return e.style.getPropertyValue(n)||si(e).getComputedStyle(e,null).getPropertyValue(n)}function ls(e){return function(){delete this[e]}}function us(e,n){return function(){this[e]=n}}function cs(e,n){return function(){var r=n.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function hs(e,n){return arguments.length>1?this.each((n==null?ls:typeof n=="function"?cs:us)(e,n)):this.node()[e]}function ai(e){return e.trim().split(/^|\s+/)}function En(e){return e.classList||new li(e)}function li(e){this._node=e,this._names=ai(e.getAttribute("class")||"")}li.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 ui(e,n){for(var r=En(e),i=-1,o=n.length;++i<o;)r.add(n[i])}function ci(e,n){for(var r=En(e),i=-1,o=n.length;++i<o;)r.remove(n[i])}function fs(e){return function(){ui(this,e)}}function ds(e){return function(){ci(this,e)}}function ps(e,n){return function(){(n.apply(this,arguments)?ui:ci)(this,e)}}function gs(e,n){var r=ai(e+"");if(arguments.length<2){for(var i=En(this.node()),o=-1,s=r.length;++o<s;)if(!i.contains(r[o]))return!1;return!0}return this.each((typeof n=="function"?ps:n?fs:ds)(r,n))}function _s(){this.textContent=""}function vs(e){return function(){this.textContent=e}}function ys(e){return function(){var n=e.apply(this,arguments);this.textContent=n??""}}function ms(e){return arguments.length?this.each(e==null?_s:(typeof e=="function"?ys:vs)(e)):this.node().textContent}function bs(){this.innerHTML=""}function ws(e){return function(){this.innerHTML=e}}function xs(e){return function(){var n=e.apply(this,arguments);this.innerHTML=n??""}}function ks(e){return arguments.length?this.each(e==null?bs:(typeof e=="function"?xs:ws)(e)):this.node().innerHTML}function Ss(){this.nextSibling&&this.parentNode.appendChild(this)}function Cs(){return this.each(Ss)}function Ms(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function As(){return this.each(Ms)}function Ps(e){var n=typeof e=="function"?e:ei(e);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function Ts(){return null}function Es(e,n){var r=typeof e=="function"?e:ei(e),i=n==null?Ts:typeof n=="function"?n:Tn(n);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Ns(){var e=this.parentNode;e&&e.removeChild(this)}function zs(){return this.each(Ns)}function Is(){var e=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function Rs(){var e=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function Ds(e){return this.select(e?Rs:Is)}function Os(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Fs(e){return function(n){e.call(this,n,this.__data__)}}function js(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 $s(e){return function(){var n=this.__on;if(n){for(var r=0,i=-1,o=n.length,s;r<o;++r)s=n[r],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):n[++i]=s;++i?n.length=i:delete this.__on}}}function Ls(e,n,r){return function(){var i=this.__on,o,s=Fs(n);if(i){for(var a=0,l=i.length;a<l;++a)if((o=i[a]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=s,o.options=r),o.value=n;return}}this.addEventListener(e.type,s,r),o={type:e.type,name:e.name,value:n,listener:s,options:r},i?i.push(o):this.__on=[o]}}function Us(e,n,r){var i=js(e+""),o,s=i.length,a;if(arguments.length<2){var l=this.node().__on;if(l){for(var u=0,c=l.length,f;u<c;++u)for(o=0,f=l[u];o<s;++o)if((a=i[o]).type===f.type&&a.name===f.name)return f.value}return}for(l=n?Ls:$s,o=0;o<s;++o)this.each(l(i[o],n,r));return this}function hi(e,n,r){var i=si(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 Hs(e,n){return function(){return hi(this,e,n)}}function Bs(e,n){return function(){return hi(this,e,n.apply(this,arguments))}}function Vs(e,n){return this.each((typeof n=="function"?Bs:Hs)(e,n))}function*Ws(){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,s=i.length,a;o<s;++o)(a=i[o])&&(yield a)}var fi=[null];function it(e,n){this._groups=e,this._parents=n}function ye(){return new it([[document.documentElement]],fi)}function qs(){return this}it.prototype=ye.prototype={constructor:it,select:yo,selectAll:xo,selectChild:Mo,selectChildren:Eo,filter:No,data:Fo,enter:zo,exit:$o,join:Lo,merge:Uo,selection:qs,order:Ho,sort:Bo,call:Wo,nodes:qo,node:Go,size:Xo,empty:Yo,each:Ko,attr:rs,style:as,property:hs,classed:gs,text:ms,html:ks,raise:Cs,lower:As,append:Ps,insert:Es,remove:zs,clone:Ds,datum:Os,on:Us,dispatch:Vs,[Symbol.iterator]:Ws};function at(e){return typeof e=="string"?new it([[document.querySelector(e)]],[document.documentElement]):new it([[e]],fi)}function Gs(e){let n;for(;n=e.sourceEvent;)e=n;return e}function _t(e,n){if(e=Gs(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 Xs={value:()=>{}};function me(){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 Pe(r)}function Pe(e){this._=e}function Ys(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}})}Pe.prototype=me.prototype={constructor:Pe,on:function(e,n){var r=this._,i=Ys(e+"",r),o,s=-1,a=i.length;if(arguments.length<2){for(;++s<a;)if((o=(e=i[s]).type)&&(o=Ks(r[o],e.name)))return o;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++s<a;)if(o=(e=i[s]).type)r[o]=er(r[o],e.name,n);else if(n==null)for(o in r)r[o]=er(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 Pe(e)},call:function(e,n){if((o=arguments.length-2)>0)for(var r=new Array(o),i=0,o,s;i<o;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],i=0,o=s.length;i<o;++i)s[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,s=i.length;o<s;++o)i[o].value.apply(n,r)}};function Ks(e,n){for(var r=0,i=e.length,o;r<i;++r)if((o=e[r]).name===n)return o.value}function er(e,n,r){for(var i=0,o=e.length;i<o;++i)if(e[i].name===n){e[i]=Xs,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:n,value:r}),e}const Zs={passive:!1},pe={capture:!0,passive:!1};function tn(e){e.stopImmediatePropagation()}function Bt(e){e.preventDefault(),e.stopImmediatePropagation()}function di(e){var n=e.document.documentElement,r=at(e).on("dragstart.drag",Bt,pe);"onselectstart"in n?r.on("selectstart.drag",Bt,pe):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function pi(e,n){var r=e.document.documentElement,i=at(e).on("dragstart.drag",null);n&&(i.on("click.drag",Bt,pe),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 ke=e=>()=>e;function pn(e,{sourceEvent:n,subject:r,target:i,identifier:o,active:s,x:a,y:l,dx:u,dy:c,dispatch:f}){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:s,enumerable:!0,configurable:!0},x:{value:a,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:f}})}pn.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Qs(e){return!e.ctrlKey&&!e.button}function Js(){return this.parentNode}function ta(e,n){return n??{x:e.x,y:e.y}}function ea(){return navigator.maxTouchPoints||"ontouchstart"in this}function na(){var e=Qs,n=Js,r=ta,i=ea,o={},s=me("start","drag","end"),a=0,l,u,c,f,h=0;function d(y){y.on("mousedown.drag",p).filter(i).on("touchstart.drag",v).on("touchmove.drag",g,Zs).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(y,b){if(!(f||!e.call(this,y,b))){var S=x(this,n.call(this,y,b),y,b,"mouse");S&&(at(y.view).on("mousemove.drag",_,pe).on("mouseup.drag",m,pe),di(y.view),tn(y),c=!1,l=y.clientX,u=y.clientY,S("start",y))}}function _(y){if(Bt(y),!c){var b=y.clientX-l,S=y.clientY-u;c=b*b+S*S>h}o.mouse("drag",y)}function m(y){at(y.view).on("mousemove.drag mouseup.drag",null),pi(y.view,c),Bt(y),o.mouse("end",y)}function v(y,b){if(e.call(this,y,b)){var S=y.changedTouches,C=n.call(this,y,b),M=S.length,z,A;for(z=0;z<M;++z)(A=x(this,C,y,b,S[z].identifier,S[z]))&&(tn(y),A("start",y,S[z]))}}function g(y){var b=y.changedTouches,S=b.length,C,M;for(C=0;C<S;++C)(M=o[b[C].identifier])&&(Bt(y),M("drag",y,b[C]))}function w(y){var b=y.changedTouches,S=b.length,C,M;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),C=0;C<S;++C)(M=o[b[C].identifier])&&(tn(y),M("end",y,b[C]))}function x(y,b,S,C,M,z){var A=s.copy(),N=_t(z||S,b),R,O,k;if((k=r.call(y,new pn("beforestart",{sourceEvent:S,target:d,identifier:M,active:a,x:N[0],y:N[1],dx:0,dy:0,dispatch:A}),C))!=null)return R=k.x-N[0]||0,O=k.y-N[1]||0,function I(T,D,j){var $=N,L;switch(T){case"start":o[M]=I,L=a++;break;case"end":delete o[M],--a;case"drag":N=_t(j||D,b),L=a;break}A.call(T,y,new pn(T,{sourceEvent:D,subject:k,target:d,identifier:M,active:L,x:N[0]+R,y:N[1]+O,dx:N[0]-$[0],dy:N[1]-$[1],dispatch:A}),C)}}return d.filter=function(y){return arguments.length?(e=typeof y=="function"?y:ke(!!y),d):e},d.container=function(y){return arguments.length?(n=typeof y=="function"?y:ke(y),d):n},d.subject=function(y){return arguments.length?(r=typeof y=="function"?y:ke(y),d):r},d.touchable=function(y){return arguments.length?(i=typeof y=="function"?y:ke(!!y),d):i},d.on=function(){var y=s.on.apply(s,arguments);return y===s?d:y},d.clickDistance=function(y){return arguments.length?(h=(y=+y)*y,d):Math.sqrt(h)},d}var Gt=0,oe=0,Zt=0,gi=1e3,De,se,Oe=0,jt=0,Xe=0,ge=typeof performance=="object"&&performance.now?performance:Date,_i=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Nn(){return jt||(_i(ra),jt=ge.now()+Xe)}function ra(){jt=0}function Fe(){this._call=this._time=this._next=null}Fe.prototype=zn.prototype={constructor:Fe,restart:function(e,n,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Nn():+r)+(n==null?0:+n),!this._next&&se!==this&&(se?se._next=this:De=this,se=this),this._call=e,this._time=r,gn()},stop:function(){this._call&&(this._call=null,this._time=1/0,gn())}};function zn(e,n,r){var i=new Fe;return i.restart(e,n,r),i}function ia(){Nn(),++Gt;for(var e=De,n;e;)(n=jt-e._time)>=0&&e._call.call(void 0,n),e=e._next;--Gt}function nr(){jt=(Oe=ge.now())+Xe,Gt=oe=0;try{ia()}finally{Gt=0,sa(),jt=0}}function oa(){var e=ge.now(),n=e-Oe;n>gi&&(Xe-=n,Oe=e)}function sa(){for(var e,n=De,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:De=r);se=e,gn(i)}function gn(e){if(!Gt){oe&&(oe=clearTimeout(oe));var n=e-jt;n>24?(e<1/0&&(oe=setTimeout(nr,e-ge.now()-Xe)),Zt&&(Zt=clearInterval(Zt))):(Zt||(Oe=ge.now(),Zt=setInterval(oa,gi)),Gt=1,_i(nr))}}function rr(e,n,r){var i=new Fe;return n=n==null?0:+n,i.restart(o=>{i.stop(),e(o+n)},n,r),i}var aa=me("start","end","cancel","interrupt"),la=[],vi=0,ir=1,_n=2,Te=3,or=4,vn=5,Ee=6;function Ye(e,n,r,i,o,s){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;ua(e,r,{name:n,index:i,group:o,on:aa,tween:la,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:vi})}function In(e,n){var r=pt(e,n);if(r.state>vi)throw new Error("too late; already scheduled");return r}function mt(e,n){var r=pt(e,n);if(r.state>Te)throw new Error("too late; already running");return r}function pt(e,n){var r=e.__transition;if(!r||!(r=r[n]))throw new Error("transition not found");return r}function ua(e,n,r){var i=e.__transition,o;i[n]=r,r.timer=zn(s,0,r.time);function s(c){r.state=ir,r.timer.restart(a,r.delay,r.time),r.delay<=c&&a(c-r.delay)}function a(c){var f,h,d,p;if(r.state!==ir)return u();for(f in i)if(p=i[f],p.name===r.name){if(p.state===Te)return rr(a);p.state===or?(p.state=Ee,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete i[f]):+f<n&&(p.state=Ee,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete i[f])}if(rr(function(){r.state===Te&&(r.state=or,r.timer.restart(l,r.delay,r.time),l(c))}),r.state=_n,r.on.call("start",e,e.__data__,r.index,r.group),r.state===_n){for(r.state=Te,o=new Array(d=r.tween.length),f=0,h=-1;f<d;++f)(p=r.tween[f].value.call(e,e.__data__,r.index,r.group))&&(o[++h]=p);o.length=h+1}}function l(c){for(var f=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(u),r.state=vn,1),h=-1,d=o.length;++h<d;)o[h].call(e,f);r.state===vn&&(r.on.call("end",e,e.__data__,r.index,r.group),u())}function u(){r.state=Ee,r.timer.stop(),delete i[n];for(var c in i)return;delete e.__transition}}function Ne(e,n){var r=e.__transition,i,o,s=!0,a;if(r){n=n==null?null:n+"";for(a in r){if((i=r[a]).name!==n){s=!1;continue}o=i.state>_n&&i.state<vn,i.state=Ee,i.timer.stop(),i.on.call(o?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[a]}s&&delete e.__transition}}function ca(e){return this.each(function(){Ne(this,e)})}function ha(e,n){var r,i;return function(){var o=mt(this,e),s=o.tween;if(s!==r){i=r=s;for(var a=0,l=i.length;a<l;++a)if(i[a].name===n){i=i.slice(),i.splice(a,1);break}}o.tween=i}}function fa(e,n,r){var i,o;if(typeof r!="function")throw new Error;return function(){var s=mt(this,e),a=s.tween;if(a!==i){o=(i=a).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)}s.tween=o}}function da(e,n){var r=this._id;if(e+="",arguments.length<2){for(var i=pt(this.node(),r).tween,o=0,s=i.length,a;o<s;++o)if((a=i[o]).name===e)return a.value;return null}return this.each((n==null?ha:fa)(r,e,n))}function Rn(e,n,r){var i=e._id;return e.each(function(){var o=mt(this,i);(o.value||(o.value={}))[n]=r.apply(this,arguments)}),function(o){return pt(o,i).value[n]}}function yi(e,n){var r;return(typeof n=="number"?Ot:n instanceof Xn?Yn:(r=Xn(n))?(n=r,Yn):ro)(e,n)}function pa(e){return function(){this.removeAttribute(e)}}function ga(e){return function(){this.removeAttributeNS(e.space,e.local)}}function _a(e,n,r){var i,o=r+"",s;return function(){var a=this.getAttribute(e);return a===o?null:a===i?s:s=n(i=a,r)}}function va(e,n,r){var i,o=r+"",s;return function(){var a=this.getAttributeNS(e.space,e.local);return a===o?null:a===i?s:s=n(i=a,r)}}function ya(e,n,r){var i,o,s;return function(){var a,l=r(this),u;return l==null?void this.removeAttribute(e):(a=this.getAttribute(e),u=l+"",a===u?null:a===i&&u===o?s:(o=u,s=n(i=a,l)))}}function ma(e,n,r){var i,o,s;return function(){var a,l=r(this),u;return l==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),u=l+"",a===u?null:a===i&&u===o?s:(o=u,s=n(i=a,l)))}}function ba(e,n){var r=Ge(e),i=r==="transform"?uo:yi;return this.attrTween(e,typeof n=="function"?(r.local?ma:ya)(r,i,Rn(this,"attr."+e,n)):n==null?(r.local?ga:pa)(r):(r.local?va:_a)(r,i,n))}function wa(e,n){return function(r){this.setAttribute(e,n.call(this,r))}}function xa(e,n){return function(r){this.setAttributeNS(e.space,e.local,n.call(this,r))}}function ka(e,n){var r,i;function o(){var s=n.apply(this,arguments);return s!==i&&(r=(i=s)&&xa(e,s)),r}return o._value=n,o}function Sa(e,n){var r,i;function o(){var s=n.apply(this,arguments);return s!==i&&(r=(i=s)&&wa(e,s)),r}return o._value=n,o}function Ca(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=Ge(e);return this.tween(r,(i.local?ka:Sa)(i,n))}function Ma(e,n){return function(){In(this,e).delay=+n.apply(this,arguments)}}function Aa(e,n){return n=+n,function(){In(this,e).delay=n}}function Pa(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?Ma:Aa)(n,e)):pt(this.node(),n).delay}function Ta(e,n){return function(){mt(this,e).duration=+n.apply(this,arguments)}}function Ea(e,n){return n=+n,function(){mt(this,e).duration=n}}function Na(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?Ta:Ea)(n,e)):pt(this.node(),n).duration}function za(e,n){if(typeof n!="function")throw new Error;return function(){mt(this,e).ease=n}}function Ia(e){var n=this._id;return arguments.length?this.each(za(n,e)):pt(this.node(),n).ease}function Ra(e,n){return function(){var r=n.apply(this,arguments);if(typeof r!="function")throw new Error;mt(this,e).ease=r}}function Da(e){if(typeof e!="function")throw new Error;return this.each(Ra(this._id,e))}function Oa(e){typeof e!="function"&&(e=ri(e));for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o)for(var s=n[o],a=s.length,l=i[o]=[],u,c=0;c<a;++c)(u=s[c])&&e.call(u,u.__data__,c,s)&&l.push(u);return new Et(i,this._parents,this._name,this._id)}function Fa(e){if(e._id!==this._id)throw new Error;for(var n=this._groups,r=e._groups,i=n.length,o=r.length,s=Math.min(i,o),a=new Array(i),l=0;l<s;++l)for(var u=n[l],c=r[l],f=u.length,h=a[l]=new Array(f),d,p=0;p<f;++p)(d=u[p]||c[p])&&(h[p]=d);for(;l<i;++l)a[l]=n[l];return new Et(a,this._parents,this._name,this._id)}function ja(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 $a(e,n,r){var i,o,s=ja(n)?In:mt;return function(){var a=s(this,e),l=a.on;l!==i&&(o=(i=l).copy()).on(n,r),a.on=o}}function La(e,n){var r=this._id;return arguments.length<2?pt(this.node(),r).on.on(e):this.each($a(r,e,n))}function Ua(e){return function(){var n=this.parentNode;for(var r in this.__transition)if(+r!==e)return;n&&n.removeChild(this)}}function Ha(){return this.on("end.remove",Ua(this._id))}function Ba(e){var n=this._name,r=this._id;typeof e!="function"&&(e=Tn(e));for(var i=this._groups,o=i.length,s=new Array(o),a=0;a<o;++a)for(var l=i[a],u=l.length,c=s[a]=new Array(u),f,h,d=0;d<u;++d)(f=l[d])&&(h=e.call(f,f.__data__,d,l))&&("__data__"in f&&(h.__data__=f.__data__),c[d]=h,Ye(c[d],n,r,d,c,pt(f,r)));return new Et(s,this._parents,n,r)}function Va(e){var n=this._name,r=this._id;typeof e!="function"&&(e=ni(e));for(var i=this._groups,o=i.length,s=[],a=[],l=0;l<o;++l)for(var u=i[l],c=u.length,f,h=0;h<c;++h)if(f=u[h]){for(var d=e.call(f,f.__data__,h,u),p,_=pt(f,r),m=0,v=d.length;m<v;++m)(p=d[m])&&Ye(p,n,r,m,d,_);s.push(d),a.push(f)}return new Et(s,a,n,r)}var Wa=ye.prototype.constructor;function qa(){return new Wa(this._groups,this._parents)}function Ga(e,n){var r,i,o;return function(){var s=qt(this,e),a=(this.style.removeProperty(e),qt(this,e));return s===a?null:s===r&&a===i?o:o=n(r=s,i=a)}}function mi(e){return function(){this.style.removeProperty(e)}}function Xa(e,n,r){var i,o=r+"",s;return function(){var a=qt(this,e);return a===o?null:a===i?s:s=n(i=a,r)}}function Ya(e,n,r){var i,o,s;return function(){var a=qt(this,e),l=r(this),u=l+"";return l==null&&(u=l=(this.style.removeProperty(e),qt(this,e))),a===u?null:a===i&&u===o?s:(o=u,s=n(i=a,l))}}function Ka(e,n){var r,i,o,s="style."+n,a="end."+s,l;return function(){var u=mt(this,e),c=u.on,f=u.value[s]==null?l||(l=mi(n)):void 0;(c!==r||o!==f)&&(i=(r=c).copy()).on(a,o=f),u.on=i}}function Za(e,n,r){var i=(e+="")=="transform"?lo:yi;return n==null?this.styleTween(e,Ga(e,i)).on("end.style."+e,mi(e)):typeof n=="function"?this.styleTween(e,Ya(e,i,Rn(this,"style."+e,n))).each(Ka(this._id,e)):this.styleTween(e,Xa(e,i,n),r).on("end.style."+e,null)}function Qa(e,n,r){return function(i){this.style.setProperty(e,n.call(this,i),r)}}function Ja(e,n,r){var i,o;function s(){var a=n.apply(this,arguments);return a!==o&&(i=(o=a)&&Qa(e,a,r)),i}return s._value=n,s}function tl(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,Ja(e,n,r??""))}function el(e){return function(){this.textContent=e}}function nl(e){return function(){var n=e(this);this.textContent=n??""}}function rl(e){return this.tween("text",typeof e=="function"?nl(Rn(this,"text",e)):el(e==null?"":e+""))}function il(e){return function(n){this.textContent=e.call(this,n)}}function ol(e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&il(o)),n}return i._value=e,i}function sl(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,ol(e))}function al(){for(var e=this._name,n=this._id,r=bi(),i=this._groups,o=i.length,s=0;s<o;++s)for(var a=i[s],l=a.length,u,c=0;c<l;++c)if(u=a[c]){var f=pt(u,n);Ye(u,e,r,c,a,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Et(i,this._parents,e,r)}function ll(){var e,n,r=this,i=r._id,o=r.size();return new Promise(function(s,a){var l={value:a},u={value:function(){--o===0&&s()}};r.each(function(){var c=mt(this,i),f=c.on;f!==e&&(n=(e=f).copy(),n._.cancel.push(l),n._.interrupt.push(l),n._.end.push(u)),c.on=n}),o===0&&s()})}var ul=0;function Et(e,n,r,i){this._groups=e,this._parents=n,this._name=r,this._id=i}function bi(){return++ul}var xt=ye.prototype;Et.prototype={constructor:Et,select:Ba,selectAll:Va,selectChild:xt.selectChild,selectChildren:xt.selectChildren,filter:Oa,merge:Fa,selection:qa,transition:al,call:xt.call,nodes:xt.nodes,node:xt.node,size:xt.size,empty:xt.empty,each:xt.each,on:La,attr:ba,attrTween:Ca,style:Za,styleTween:tl,text:rl,textTween:sl,remove:Ha,tween:da,delay:Pa,duration:Na,ease:Ia,easeVarying:Da,end:ll,[Symbol.iterator]:xt[Symbol.iterator]};function cl(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var hl={time:null,delay:0,duration:250,ease:cl};function fl(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 dl(e){var n,r;e instanceof Et?(n=e._id,e=e._name):(n=bi(),(r=hl).time=Nn(),e=e==null?null:e+"");for(var i=this._groups,o=i.length,s=0;s<o;++s)for(var a=i[s],l=a.length,u,c=0;c<l;++c)(u=a[c])&&Ye(u,e,n,c,a,r||fl(u,n));return new Et(i,this._parents,e,n)}ye.prototype.interrupt=ca;ye.prototype.transition=dl;const Se=e=>()=>e;function pl(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 At(e,n,r){this.k=e,this.x=n,this.y=r}At.prototype={constructor:At,scale:function(e){return e===1?this:new At(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new At(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 Dn=new At(1,0,0);gt.prototype=At.prototype;function gt(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Dn;return e.__zoom}function en(e){e.stopImmediatePropagation()}function Qt(e){e.preventDefault(),e.stopImmediatePropagation()}function gl(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function _l(){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 sr(){return this.__zoom||Dn}function vl(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function yl(){return navigator.maxTouchPoints||"ontouchstart"in this}function ml(e,n,r){var i=e.invertX(n[0][0])-r[0][0],o=e.invertX(n[1][0])-r[1][0],s=e.invertY(n[0][1])-r[0][1],a=e.invertY(n[1][1])-r[1][1];return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),a>s?(s+a)/2:Math.min(0,s)||Math.max(0,a))}function bl(){var e=gl,n=_l,r=ml,i=vl,o=yl,s=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],l=250,u=po,c=me("start","zoom","end"),f,h,d,p=500,_=150,m=0,v=10;function g(k){k.property("__zoom",sr).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",z).on("dblclick.zoom",A).filter(o).on("touchstart.zoom",N).on("touchmove.zoom",R).on("touchend.zoom touchcancel.zoom",O).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}g.transform=function(k,I,T,D){var j=k.selection?k.selection():k;j.property("__zoom",sr),k!==j?b(k,I,T,D):j.interrupt().each(function(){S(this,arguments).event(D).start().zoom(null,typeof I=="function"?I.apply(this,arguments):I).end()})},g.scaleBy=function(k,I,T,D){g.scaleTo(k,function(){var j=this.__zoom.k,$=typeof I=="function"?I.apply(this,arguments):I;return j*$},T,D)},g.scaleTo=function(k,I,T,D){g.transform(k,function(){var j=n.apply(this,arguments),$=this.__zoom,L=T==null?y(j):typeof T=="function"?T.apply(this,arguments):T,U=$.invert(L),H=typeof I=="function"?I.apply(this,arguments):I;return r(x(w($,H),L,U),j,a)},T,D)},g.translateBy=function(k,I,T,D){g.transform(k,function(){return r(this.__zoom.translate(typeof I=="function"?I.apply(this,arguments):I,typeof T=="function"?T.apply(this,arguments):T),n.apply(this,arguments),a)},null,D)},g.translateTo=function(k,I,T,D,j){g.transform(k,function(){var $=n.apply(this,arguments),L=this.__zoom,U=D==null?y($):typeof D=="function"?D.apply(this,arguments):D;return r(Dn.translate(U[0],U[1]).scale(L.k).translate(typeof I=="function"?-I.apply(this,arguments):-I,typeof T=="function"?-T.apply(this,arguments):-T),$,a)},D,j)};function w(k,I){return I=Math.max(s[0],Math.min(s[1],I)),I===k.k?k:new At(I,k.x,k.y)}function x(k,I,T){var D=I[0]-T[0]*k.k,j=I[1]-T[1]*k.k;return D===k.x&&j===k.y?k:new At(k.k,D,j)}function y(k){return[(+k[0][0]+ +k[1][0])/2,(+k[0][1]+ +k[1][1])/2]}function b(k,I,T,D){k.on("start.zoom",function(){S(this,arguments).event(D).start()}).on("interrupt.zoom end.zoom",function(){S(this,arguments).event(D).end()}).tween("zoom",function(){var j=this,$=arguments,L=S(j,$).event(D),U=n.apply(j,$),H=T==null?y(U):typeof T=="function"?T.apply(j,$):T,Y=Math.max(U[1][0]-U[0][0],U[1][1]-U[0][1]),X=j.__zoom,ut=typeof I=="function"?I.apply(j,$):I,bt=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 wt=bt(ct),Je=Y/wt[2];ct=new At(Je,H[0]-wt[0]*Je,H[1]-wt[1]*Je)}L.zoom(null,ct)}})}function S(k,I,T){return!T&&k.__zooming||new C(k,I)}function C(k,I){this.that=k,this.args=I,this.active=0,this.sourceEvent=null,this.extent=n.apply(k,I),this.taps=0}C.prototype={event:function(k){return k&&(this.sourceEvent=k),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(k,I){return this.mouse&&k!=="mouse"&&(this.mouse[1]=I.invert(this.mouse[0])),this.touch0&&k!=="touch"&&(this.touch0[1]=I.invert(this.touch0[0])),this.touch1&&k!=="touch"&&(this.touch1[1]=I.invert(this.touch1[0])),this.that.__zoom=I,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(k){var I=at(this.that).datum();c.call(k,this.that,new pl(k,{sourceEvent:this.sourceEvent,target:g,transform:this.that.__zoom,dispatch:c}),I)}};function M(k,...I){if(!e.apply(this,arguments))return;var T=S(this,I).event(k),D=this.__zoom,j=Math.max(s[0],Math.min(s[1],D.k*Math.pow(2,i.apply(this,arguments)))),$=_t(k);if(T.wheel)(T.mouse[0][0]!==$[0]||T.mouse[0][1]!==$[1])&&(T.mouse[1]=D.invert(T.mouse[0]=$)),clearTimeout(T.wheel);else{if(D.k===j)return;T.mouse=[$,D.invert($)],Ne(this),T.start()}Qt(k),T.wheel=setTimeout(L,_),T.zoom("mouse",r(x(w(D,j),T.mouse[0],T.mouse[1]),T.extent,a));function L(){T.wheel=null,T.end()}}function z(k,...I){if(d||!e.apply(this,arguments))return;var T=k.currentTarget,D=S(this,I,!0).event(k),j=at(k.view).on("mousemove.zoom",H,!0).on("mouseup.zoom",Y,!0),$=_t(k,T),L=k.clientX,U=k.clientY;di(k.view),en(k),D.mouse=[$,this.__zoom.invert($)],Ne(this),D.start();function H(X){if(Qt(X),!D.moved){var ut=X.clientX-L,bt=X.clientY-U;D.moved=ut*ut+bt*bt>m}D.event(X).zoom("mouse",r(x(D.that.__zoom,D.mouse[0]=_t(X,T),D.mouse[1]),D.extent,a))}function Y(X){j.on("mousemove.zoom mouseup.zoom",null),pi(X.view,D.moved),Qt(X),D.event(X).end()}}function A(k,...I){if(e.apply(this,arguments)){var T=this.__zoom,D=_t(k.changedTouches?k.changedTouches[0]:k,this),j=T.invert(D),$=T.k*(k.shiftKey?.5:2),L=r(x(w(T,$),D,j),n.apply(this,I),a);Qt(k),l>0?at(this).transition().duration(l).call(b,L,D,k):at(this).call(g.transform,L,D,k)}}function N(k,...I){if(e.apply(this,arguments)){var T=k.touches,D=T.length,j=S(this,I,k.changedTouches.length===D).event(k),$,L,U,H;for(en(k),L=0;L<D;++L)U=T[L],H=_t(U,this),H=[H,this.__zoom.invert(H),U.identifier],j.touch0?!j.touch1&&j.touch0[2]!==H[2]&&(j.touch1=H,j.taps=0):(j.touch0=H,$=!0,j.taps=1+!!f);f&&(f=clearTimeout(f)),$&&(j.taps<2&&(h=H[0],f=setTimeout(function(){f=null},p)),Ne(this),j.start())}}function R(k,...I){if(this.__zooming){var T=S(this,I).event(k),D=k.changedTouches,j=D.length,$,L,U,H;for(Qt(k),$=0;$<j;++$)L=D[$],U=_t(L,this),T.touch0&&T.touch0[2]===L.identifier?T.touch0[0]=U:T.touch1&&T.touch1[2]===L.identifier&&(T.touch1[0]=U);if(L=T.that.__zoom,T.touch1){var Y=T.touch0[0],X=T.touch0[1],ut=T.touch1[0],bt=T.touch1[1],ct=(ct=ut[0]-Y[0])*ct+(ct=ut[1]-Y[1])*ct,wt=(wt=bt[0]-X[0])*wt+(wt=bt[1]-X[1])*wt;L=w(L,Math.sqrt(ct/wt)),U=[(Y[0]+ut[0])/2,(Y[1]+ut[1])/2],H=[(X[0]+bt[0])/2,(X[1]+bt[1])/2]}else if(T.touch0)U=T.touch0[0],H=T.touch0[1];else return;T.zoom("touch",r(x(L,U,H),T.extent,a))}}function O(k,...I){if(this.__zooming){var T=S(this,I).event(k),D=k.changedTouches,j=D.length,$,L;for(en(k),d&&clearTimeout(d),d=setTimeout(function(){d=null},p),$=0;$<j;++$)L=D[$],T.touch0&&T.touch0[2]===L.identifier?delete T.touch0:T.touch1&&T.touch1[2]===L.identifier&&delete T.touch1;if(T.touch1&&!T.touch0&&(T.touch0=T.touch1,delete T.touch1),T.touch0)T.touch0[1]=this.__zoom.invert(T.touch0[0]);else if(T.end(),T.taps===2&&(L=_t(L,this),Math.hypot(h[0]-L[0],h[1]-L[1])<v)){var U=at(this).on("dblclick.zoom");U&&U.apply(this,arguments)}}}return g.wheelDelta=function(k){return arguments.length?(i=typeof k=="function"?k:Se(+k),g):i},g.filter=function(k){return arguments.length?(e=typeof k=="function"?k:Se(!!k),g):e},g.touchable=function(k){return arguments.length?(o=typeof k=="function"?k:Se(!!k),g):o},g.extent=function(k){return arguments.length?(n=typeof k=="function"?k:Se([[+k[0][0],+k[0][1]],[+k[1][0],+k[1][1]]]),g):n},g.scaleExtent=function(k){return arguments.length?(s[0]=+k[0],s[1]=+k[1],g):[s[0],s[1]]},g.translateExtent=function(k){return arguments.length?(a[0][0]=+k[0][0],a[1][0]=+k[1][0],a[0][1]=+k[0][1],a[1][1]=+k[1][1],g):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},g.constrain=function(k){return arguments.length?(r=k,g):r},g.duration=function(k){return arguments.length?(l=+k,g):l},g.interpolate=function(k){return arguments.length?(u=k,g):u},g.on=function(){var k=c.on.apply(c,arguments);return k===c?g:k},g.clickDistance=function(k){return arguments.length?(m=(k=+k)*k,g):Math.sqrt(m)},g.tapDistance=function(k){return arguments.length?(v=+k,g):v},g}var wl=typeof global=="object"&&global&&global.Object===Object&&global,xl=typeof self=="object"&&self&&self.Object===Object&&self,wi=wl||xl||Function("return this")(),je=wi.Symbol,xi=Object.prototype,kl=xi.hasOwnProperty,Sl=xi.toString,Jt=je?je.toStringTag:void 0;function Cl(e){var n=kl.call(e,Jt),r=e[Jt];try{e[Jt]=void 0;var i=!0}catch{}var o=Sl.call(e);return i&&(n?e[Jt]=r:delete e[Jt]),o}var Ml=Object.prototype,Al=Ml.toString;function Pl(e){return Al.call(e)}var Tl="[object Null]",El="[object Undefined]",ar=je?je.toStringTag:void 0;function Nl(e){return e==null?e===void 0?El:Tl:ar&&ar in Object(e)?Cl(e):Pl(e)}function zl(e){return e!=null&&typeof e=="object"}var Il="[object Symbol]";function Rl(e){return typeof e=="symbol"||zl(e)&&Nl(e)==Il}var Dl=/\s/;function Ol(e){for(var n=e.length;n--&&Dl.test(e.charAt(n)););return n}var Fl=/^\s+/;function jl(e){return e&&e.slice(0,Ol(e)+1).replace(Fl,"")}function $e(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var lr=NaN,$l=/^[-+]0x[0-9a-f]+$/i,Ll=/^0b[01]+$/i,Ul=/^0o[0-7]+$/i,Hl=parseInt;function ur(e){if(typeof e=="number")return e;if(Rl(e))return lr;if($e(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=$e(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=jl(e);var r=Ll.test(e);return r||Ul.test(e)?Hl(e.slice(2),r?2:8):$l.test(e)?lr:+e}var nn=function(){return wi.Date.now()},Bl="Expected a function",Vl=Math.max,Wl=Math.min;function ki(e,n,r){var i,o,s,a,l,u,c=0,f=!1,h=!1,d=!0;if(typeof e!="function")throw new TypeError(Bl);n=ur(n)||0,$e(r)&&(f=!!r.leading,h="maxWait"in r,s=h?Vl(ur(r.maxWait)||0,n):s,d="trailing"in r?!!r.trailing:d);function p(S){var C=i,M=o;return i=o=void 0,c=S,a=e.apply(M,C),a}function _(S){return c=S,l=setTimeout(g,n),f?p(S):a}function m(S){var C=S-u,M=S-c,z=n-C;return h?Wl(z,s-M):z}function v(S){var C=S-u,M=S-c;return u===void 0||C>=n||C<0||h&&M>=s}function g(){var S=nn();if(v(S))return w(S);l=setTimeout(g,m(S))}function w(S){return l=void 0,d&&i?p(S):(i=o=void 0,a)}function x(){l!==void 0&&clearTimeout(l),c=0,i=u=o=l=void 0}function y(){return l===void 0?a:w(nn())}function b(){var S=nn(),C=v(S);if(i=arguments,o=this,u=S,C){if(l===void 0)return _(u);if(h)return clearTimeout(l),l=setTimeout(g,n),p(u)}return l===void 0&&(l=setTimeout(g,n)),a}return b.cancel=x,b.flush=y,b}var ql="Expected a function";function Gl(e,n,r){var i=!0,o=!0;if(typeof e!="function")throw new TypeError(ql);return $e(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),ki(e,n,{leading:i,maxWait:n,trailing:o})}var Ft=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-Ft.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?Ft.Bounce.In(e*2)*.5:Ft.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}}}}),ae=function(){return performance.now()},Si=(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,s=r;o<s.length;o++){var a=s[o];(n=a._group)===null||n===void 0||n.remove(a),a._group=this,this._tweens[a.getId()]=a,this._tweensAddedDuringUpdate[a.getId()]=a}},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 s=o[i];s._group=void 0,delete this._tweens[s.getId()],delete this._tweensAddedDuringUpdate[s.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(n){return!n.isPlaying()})},e.prototype.update=function(n,r){n===void 0&&(n=ae()),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 s=this._tweens[i[o]],a=!r;s&&s.update(n,a)===!1&&!r&&this.remove(s)}i=Object.keys(this._tweensAddedDuringUpdate)}},e})(),yn={Linear:function(e,n){var r=e.length-1,i=r*n,o=Math.floor(i),s=yn.Utils.Linear;return n<0?s(e[0],e[1],i):n>1?s(e[r],e[r-1],r-i):s(e[o],e[o+1>r?r:o+1],i-o)},Utils:{Linear:function(e,n,r){return(n-e)*r+e}}},Ci=(function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e})(),mn=new Si,cr=(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=Ft.Linear.None,this._interpolationFunction=yn.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=Ci.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=mn,mn.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=ae()),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 s in this._valuesEnd)o[s]=this._valuesEnd[s];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,s){for(var a in i){var l=n[a],u=Array.isArray(l),c=u?"array":typeof l,f=!u&&Array.isArray(i[a]);if(!(c==="undefined"||c==="function")){if(f){var h=i[a];if(h.length===0)continue;for(var d=[l],p=0,_=h.length;p<_;p+=1){var m=this._handleRelativeValue(l,h[p]);if(isNaN(m)){f=!1,console.warn("Found invalid interpolation list. Skipping.");break}d.push(m)}f&&(i[a]=d)}if((c==="object"||u)&&l&&!f){r[a]=u?[]:{};var v=l;for(var g in v)r[a][g]=v[g];o[a]=u?[]:{};var h=i[a];if(!this._isDynamic){var w={};for(var g in h)w[g]=h[g];i[a]=h=w}this._setupProperties(v,r[a],h,o[a],s)}else(typeof r[a]>"u"||s)&&(r[a]=l),u||(r[a]*=1),f?o[a]=i[a].slice().reverse():o[a]=r[a]||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=ae()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=n,this)},e.prototype.resume=function(n){return n===void 0&&(n=ae()),!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=Ft.Linear.None),this._easingFunction=n,this},e.prototype.interpolation=function(n){return n===void 0&&(n=yn.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=ae()),r===void 0&&(r=e.autoStartOnUpdate),this._isPaused)return!0;var s;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 a=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||a>u)return 1;var m=Math.trunc(a/l),v=a-m*l,g=Math.min(v/i._duration,1);return g===0&&a===i._duration?1:g},f=c(),h=this._easingFunction(f);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,h),this._onUpdateCallback&&this._onUpdateCallback(this._object,f),this._duration===0||a>=this._duration)if(this._repeat>0){var d=Math.min(Math.trunc((a-this._duration)/l)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=d);for(s in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[s]=="string"&&(this._valuesStartRepeat[s]=this._valuesStartRepeat[s]+parseFloat(this._valuesEnd[s])),this._yoyo&&this._swapEndStartRepeatValues(s),this._valuesStart[s]=this._valuesStartRepeat[s];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 s in i)if(r[s]!==void 0){var a=r[s]||0,l=i[s],u=Array.isArray(n[s]),c=Array.isArray(l),f=!u&&c;f?n[s]=this._interpolationFunction(l,o):typeof l=="object"&&l?this._updateProperties(n[s],a,l,o):(l=this._handleRelativeValue(a,l),typeof l=="number"&&(n[s]=a+(l-a)*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})();Ci.nextId;var yt=mn;yt.getAll.bind(yt);yt.removeAll.bind(yt);yt.add.bind(yt);yt.remove.bind(yt);yt.update.bind(yt);function hr(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 Xl(e){if(Array.isArray(e))return e}function Yl(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Kl(e,n,r){return Object.defineProperty(e,"prototype",{writable:!1}),e}function Zl(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,s,a,l=[],u=!0,c=!1;try{if(s=(r=r.call(e)).next,n!==0)for(;!(u=(i=s.call(r)).done)&&(l.push(i.value),l.length!==n);u=!0);}catch(f){c=!0,o=f}finally{try{if(!u&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}function Ql(){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 Jl(e,n){return Xl(e)||Zl(e,n)||tu(e,n)||Ql()}function tu(e,n){if(e){if(typeof e=="string")return hr(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)?hr(e,n):void 0}}var eu=Kl(function e(n,r){var i=r.default,o=i===void 0?null:i,s=r.triggerUpdate,a=s===void 0?!0:s,l=r.onChange,u=l===void 0?function(c,f){}:l;Yl(this,e),this.name=n,this.defaultVal=o,this.triggerUpdate=a,this.onChange=u});function On(e){var n=e.stateInit,r=n===void 0?function(){return{}}:n,i=e.props,o=i===void 0?{}:i,s=e.methods,a=s===void 0?{}:s,l=e.aliases,u=l===void 0?{}:l,c=e.init,f=c===void 0?function(){}:c,h=e.update,d=h===void 0?function(){}:h,p=Object.keys(o).map(function(_){return new eu(_,o[_])});return function _(){for(var m=arguments.length,v=new Array(m),g=0;g<m;g++)v[g]=arguments[g];var w=!!(this instanceof _&&this.constructor),x=w?v.shift():void 0,y=v[0],b=y===void 0?{}:y,S=Object.assign({},r instanceof Function?r(b):r,{initialised:!1}),C={};function M(N){return z(N,b),A(),M}var z=function(R,O){f.call(M,R,S,O),S.initialised=!0},A=ki(function(){S.initialised&&(d.call(M,S,C),C={})},1);return p.forEach(function(N){M[N.name]=R(N);function R(O){var k=O.name,I=O.triggerUpdate,T=I===void 0?!1:I,D=O.onChange,j=D===void 0?function(U,H){}:D,$=O.defaultVal,L=$===void 0?null:$;return function(U){var H=S[k];if(!arguments.length)return H;var Y=U===void 0?L:U;return S[k]=Y,j.call(M,Y,S,H),!C.hasOwnProperty(k)&&(C[k]=H),T&&A(),M}}}),Object.keys(a).forEach(function(N){M[N]=function(){for(var R,O=arguments.length,k=new Array(O),I=0;I<O;I++)k[I]=arguments[I];return(R=a[N]).call.apply(R,[M,S].concat(k))}}),Object.entries(u).forEach(function(N){var R=Jl(N,2),O=R[0],k=R[1];return M[O]=M[k]}),M.resetProps=function(){return p.forEach(function(N){M[N.name](N.defaultVal)}),M},M.resetProps(),S._rerender=A,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 Le(e){"@babel/helpers - typeof";return Le=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},Le(e)}var nu=/^\s+/,ru=/\s+$/;function F(e,n){if(e=e||"",n=n||{},e instanceof F)return e;if(!(this instanceof F))return new F(e,n);var r=iu(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}F.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,s,a,l;return r=n.r/255,i=n.g/255,o=n.b/255,r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),i<=.03928?a=i/12.92:a=Math.pow((i+.055)/1.055,2.4),o<=.03928?l=o/12.92:l=Math.pow((o+.055)/1.055,2.4),.2126*s+.7152*a+.0722*l},setAlpha:function(n){return this._a=Mi(n),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var n=dr(this._r,this._g,this._b);return{h:n.h*360,s:n.s,v:n.v,a:this._a}},toHsvString:function(){var n=dr(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=fr(this._r,this._g,this._b);return{h:n.h*360,s:n.s,l:n.l,a:this._a}},toHslString:function(){var n=fr(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 pr(this._r,this._g,this._b,n)},toHexString:function(n){return"#"+this.toHex(n)},toHex8:function(n){return lu(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(q(this._r,255)*100)+"%",g:Math.round(q(this._g,255)*100)+"%",b:Math.round(q(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(q(this._r,255)*100)+"%, "+Math.round(q(this._g,255)*100)+"%, "+Math.round(q(this._b,255)*100)+"%)":"rgba("+Math.round(q(this._r,255)*100)+"%, "+Math.round(q(this._g,255)*100)+"%, "+Math.round(q(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:bu[pr(this._r,this._g,this._b,!0)]||!1},toFilter:function(n){var r="#"+gr(this._r,this._g,this._b,this._a),i=r,o=this._gradientType?"GradientType = 1, ":"";if(n){var s=F(n);i="#"+gr(s._r,s._g,s._b,s._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,s=!r&&o&&(n==="hex"||n==="hex6"||n==="hex3"||n==="hex4"||n==="hex8"||n==="name");return s?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 F(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(fu,arguments)},brighten:function(){return this._applyModification(du,arguments)},darken:function(){return this._applyModification(pu,arguments)},desaturate:function(){return this._applyModification(uu,arguments)},saturate:function(){return this._applyModification(cu,arguments)},greyscale:function(){return this._applyModification(hu,arguments)},spin:function(){return this._applyModification(gu,arguments)},_applyCombination:function(n,r){return n.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(yu,arguments)},complement:function(){return this._applyCombination(_u,arguments)},monochromatic:function(){return this._applyCombination(mu,arguments)},splitcomplement:function(){return this._applyCombination(vu,arguments)},triad:function(){return this._applyCombination(_r,[3])},tetrad:function(){return this._applyCombination(_r,[4])}};F.fromRatio=function(e,n){if(Le(e)=="object"){var r={};for(var i in e)e.hasOwnProperty(i)&&(i==="a"?r[i]=e[i]:r[i]=le(e[i]));e=r}return F(e,n)};function iu(e){var n={r:0,g:0,b:0},r=1,i=null,o=null,s=null,a=!1,l=!1;return typeof e=="string"&&(e=Su(e)),Le(e)=="object"&&(kt(e.r)&&kt(e.g)&&kt(e.b)?(n=ou(e.r,e.g,e.b),a=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):kt(e.h)&&kt(e.s)&&kt(e.v)?(i=le(e.s),o=le(e.v),n=au(e.h,i,o),a=!0,l="hsv"):kt(e.h)&&kt(e.s)&&kt(e.l)&&(i=le(e.s),s=le(e.l),n=su(e.h,i,s),a=!0,l="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=Mi(r),{ok:a,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 ou(e,n,r){return{r:q(e,255)*255,g:q(n,255)*255,b:q(r,255)*255}}function fr(e,n,r){e=q(e,255),n=q(n,255),r=q(r,255);var i=Math.max(e,n,r),o=Math.min(e,n,r),s,a,l=(i+o)/2;if(i==o)s=a=0;else{var u=i-o;switch(a=l>.5?u/(2-i-o):u/(i+o),i){case e:s=(n-r)/u+(n<r?6:0);break;case n:s=(r-e)/u+2;break;case r:s=(e-n)/u+4;break}s/=6}return{h:s,s:a,l}}function su(e,n,r){var i,o,s;e=q(e,360),n=q(n,100),r=q(r,100);function a(c,f,h){return h<0&&(h+=1),h>1&&(h-=1),h<1/6?c+(f-c)*6*h:h<1/2?f:h<2/3?c+(f-c)*(2/3-h)*6:c}if(n===0)i=o=s=r;else{var l=r<.5?r*(1+n):r+n-r*n,u=2*r-l;i=a(u,l,e+1/3),o=a(u,l,e),s=a(u,l,e-1/3)}return{r:i*255,g:o*255,b:s*255}}function dr(e,n,r){e=q(e,255),n=q(n,255),r=q(r,255);var i=Math.max(e,n,r),o=Math.min(e,n,r),s,a,l=i,u=i-o;if(a=i===0?0:u/i,i==o)s=0;else{switch(i){case e:s=(n-r)/u+(n<r?6:0);break;case n:s=(r-e)/u+2;break;case r:s=(e-n)/u+4;break}s/=6}return{h:s,s:a,v:l}}function au(e,n,r){e=q(e,360)*6,n=q(n,100),r=q(r,100);var i=Math.floor(e),o=e-i,s=r*(1-n),a=r*(1-o*n),l=r*(1-(1-o)*n),u=i%6,c=[r,a,s,s,l,r][u],f=[l,r,r,a,s,s][u],h=[s,s,l,r,r,a][u];return{r:c*255,g:f*255,b:h*255}}function pr(e,n,r,i){var o=[dt(Math.round(e).toString(16)),dt(Math.round(n).toString(16)),dt(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 lu(e,n,r,i,o){var s=[dt(Math.round(e).toString(16)),dt(Math.round(n).toString(16)),dt(Math.round(r).toString(16)),dt(Ai(i))];return o&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function gr(e,n,r,i){var o=[dt(Ai(i)),dt(Math.round(e).toString(16)),dt(Math.round(n).toString(16)),dt(Math.round(r).toString(16))];return o.join("")}F.equals=function(e,n){return!e||!n?!1:F(e).toRgbString()==F(n).toRgbString()};F.random=function(){return F.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function uu(e,n){n=n===0?0:n||10;var r=F(e).toHsl();return r.s-=n/100,r.s=Ke(r.s),F(r)}function cu(e,n){n=n===0?0:n||10;var r=F(e).toHsl();return r.s+=n/100,r.s=Ke(r.s),F(r)}function hu(e){return F(e).desaturate(100)}function fu(e,n){n=n===0?0:n||10;var r=F(e).toHsl();return r.l+=n/100,r.l=Ke(r.l),F(r)}function du(e,n){n=n===0?0:n||10;var r=F(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)))),F(r)}function pu(e,n){n=n===0?0:n||10;var r=F(e).toHsl();return r.l-=n/100,r.l=Ke(r.l),F(r)}function gu(e,n){var r=F(e).toHsl(),i=(r.h+n)%360;return r.h=i<0?360+i:i,F(r)}function _u(e){var n=F(e).toHsl();return n.h=(n.h+180)%360,F(n)}function _r(e,n){if(isNaN(n)||n<=0)throw new Error("Argument to polyad must be a positive number");for(var r=F(e).toHsl(),i=[F(e)],o=360/n,s=1;s<n;s++)i.push(F({h:(r.h+s*o)%360,s:r.s,l:r.l}));return i}function vu(e){var n=F(e).toHsl(),r=n.h;return[F(e),F({h:(r+72)%360,s:n.s,l:n.l}),F({h:(r+216)%360,s:n.s,l:n.l})]}function yu(e,n,r){n=n||6,r=r||30;var i=F(e).toHsl(),o=360/r,s=[F(e)];for(i.h=(i.h-(o*n>>1)+720)%360;--n;)i.h=(i.h+o)%360,s.push(F(i));return s}function mu(e,n){n=n||6;for(var r=F(e).toHsv(),i=r.h,o=r.s,s=r.v,a=[],l=1/n;n--;)a.push(F({h:i,s:o,v:s})),s=(s+l)%1;return a}F.mix=function(e,n,r){r=r===0?0:r||50;var i=F(e).toRgb(),o=F(n).toRgb(),s=r/100,a={r:(o.r-i.r)*s+i.r,g:(o.g-i.g)*s+i.g,b:(o.b-i.b)*s+i.b,a:(o.a-i.a)*s+i.a};return F(a)};F.readability=function(e,n){var r=F(e),i=F(n);return(Math.max(r.getLuminance(),i.getLuminance())+.05)/(Math.min(r.getLuminance(),i.getLuminance())+.05)};F.isReadable=function(e,n,r){var i=F.readability(e,n),o,s;switch(s=!1,o=Cu(r),o.level+o.size){case"AAsmall":case"AAAlarge":s=i>=4.5;break;case"AAlarge":s=i>=3;break;case"AAAsmall":s=i>=7;break}return s};F.mostReadable=function(e,n,r){var i=null,o=0,s,a,l,u;r=r||{},a=r.includeFallbackColors,l=r.level,u=r.size;for(var c=0;c<n.length;c++)s=F.readability(e,n[c]),s>o&&(o=s,i=F(n[c]));return F.isReadable(e,i,{level:l,size:u})||!a?i:(r.includeFallbackColors=!1,F.mostReadable(e,["#fff","#000"],r))};var bn=F.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"},bu=F.hexNames=wu(bn);function wu(e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);return n}function Mi(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function q(e,n){xu(e)&&(e="100%");var r=ku(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 Ke(e){return Math.min(1,Math.max(0,e))}function rt(e){return parseInt(e,16)}function xu(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function ku(e){return typeof e=="string"&&e.indexOf("%")!=-1}function dt(e){return e.length==1?"0"+e:""+e}function le(e){return e<=1&&(e=e*100+"%"),e}function Ai(e){return Math.round(parseFloat(e)*255).toString(16)}function vr(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 kt(e){return!!ft.CSS_UNIT.exec(e)}function Su(e){e=e.replace(nu,"").replace(ru,"").toLowerCase();var n=!1;if(bn[e])e=bn[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:vr(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:vr(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 Cu(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 wn(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 Mu(e){if(Array.isArray(e))return wn(e)}function Pi(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 Au(e,n){if(n.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Pu(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function ot(e,n){return e.get(Pi(e,n))}function yr(e,n,r){Au(e,n),n.set(e,r)}function mr(e,n,r){return e.set(Pi(e,n),r),r}function Tu(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,Du(i.key),i)}}function Eu(e,n,r){return n&&Tu(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Nu(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zu(){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 Iu(e){return Mu(e)||Nu(e)||Ou(e)||zu()}function Ru(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 Du(e){var n=Ru(e,"string");return typeof n=="symbol"?n:n+""}function Ou(e,n){if(e){if(typeof e=="string")return wn(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)?wn(e,n):void 0}}var Fu=123,ju=function(n){return"#".concat(Math.min(n,Math.pow(2,24)).toString(16).padStart(6,"0"))},Ti=function(n,r,i){return(n<<16)+(r<<8)+i},$u=function(n){var r=F(n).toRgb(),i=r.r,o=r.g,s=r.b;return Ti(i,o,s)},br=function(n,r){return n*Fu%Math.pow(2,r)},Dt=new WeakMap,St=new WeakMap,Lu=(function(){function e(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;Pu(this,e),yr(this,Dt,void 0),yr(this,St,void 0),mr(St,this,n),this.reset()}return Eu(e,[{key:"reset",value:function(){mr(Dt,this,["__reserved for background__"])}},{key:"register",value:function(r){if(ot(Dt,this).length>=Math.pow(2,24-ot(St,this)))return null;var i=ot(Dt,this).length,o=br(i,ot(St,this)),s=ju(i+(o<<24-ot(St,this)));return ot(Dt,this).push(r),s}},{key:"lookup",value:function(r){if(!r)return null;var i=typeof r=="string"?$u(r):Ti.apply(void 0,Iu(r));if(!i)return null;var o=i&Math.pow(2,24-ot(St,this))-1,s=i>>24-ot(St,this)&Math.pow(2,ot(St,this))-1;return br(o,ot(St,this))!==s||o>=ot(Dt,this).length?null:ot(Dt,this)[o]}}])})(),be,G,Ei,Ni,It,wr,zi,Ii,rn,ze,ce,Ri,Fn,xn,kn,Ue={},He=[],Uu=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ze=Array.isArray;function vt(e,n){for(var r in n)e[r]=n[r];return e}function jn(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Hu(e,n,r){var i,o,s,a={};for(s in n)s=="key"?i=n[s]:s=="ref"?o=n[s]:a[s]=n[s];if(arguments.length>2&&(a.children=arguments.length>3?be.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)a[s]===void 0&&(a[s]=e.defaultProps[s]);return he(e,a,i,o,null)}function he(e,n,r,i,o){var s={type:e,props:n,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++Ei,__i:-1,__u:0};return o==null&&G.vnode!=null&&G.vnode(s),s}function Qe(e){return e.children}function Ie(e,n){this.props=e,this.context=n}function Xt(e,n){if(n==null)return e.__?Xt(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"?Xt(e):null}function Bu(e){if(e.__P&&e.__d){var n=e.__v,r=n.__e,i=[],o=[],s=vt({},n);s.__v=n.__v+1,G.vnode&&G.vnode(s),$n(e.__P,s,n,e.__n,e.__P.namespaceURI,32&n.__u?[r]:null,i,r??Xt(n),!!(32&n.__u),o),s.__v=n.__v,s.__.__k[s.__i]=s,ji(i,s,o),n.__e=n.__=null,s.__e!=r&&Di(s)}}function Di(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}),Di(e)}function xr(e){(!e.__d&&(e.__d=!0)&&It.push(e)&&!Be.__r++||wr!=G.debounceRendering)&&((wr=G.debounceRendering)||zi)(Be)}function Be(){try{for(var e,n=1;It.length;)It.length>n&&It.sort(Ii),e=It.shift(),n=It.length,Bu(e)}finally{It.length=Be.__r=0}}function Oi(e,n,r,i,o,s,a,l,u,c,f){var h,d,p,_,m,v,g,w=i&&i.__k||He,x=n.length;for(u=Vu(r,n,w,u,x),h=0;h<x;h++)(p=r.__k[h])!=null&&(d=p.__i!=-1&&w[p.__i]||Ue,p.__i=h,v=$n(e,p,d,o,s,a,l,u,c,f),_=p.__e,p.ref&&d.ref!=p.ref&&(d.ref&&Ln(d.ref,null,p),f.push(p.ref,p.__c||_,p)),m==null&&_!=null&&(m=_),(g=!!(4&p.__u))||d.__k===p.__k?(u=Fi(p,u,e,g),g&&d.__e&&(d.__e=null)):typeof p.type=="function"&&v!==void 0?u=v:_&&(u=_.nextSibling),p.__u&=-7);return r.__e=m,u}function Vu(e,n,r,i,o){var s,a,l,u,c,f=r.length,h=f,d=0;for(e.__k=new Array(o),s=0;s<o;s++)(a=n[s])!=null&&typeof a!="boolean"&&typeof a!="function"?(typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?a=e.__k[s]=he(null,a,null,null,null):Ze(a)?a=e.__k[s]=he(Qe,{children:a},null,null,null):a.constructor===void 0&&a.__b>0?a=e.__k[s]=he(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):e.__k[s]=a,u=s+d,a.__=e,a.__b=e.__b+1,l=null,(c=a.__i=Wu(a,r,u,h))!=-1&&(h--,(l=r[c])&&(l.__u|=2)),l==null||l.__v==null?(c==-1&&(o>f?d--:o<f&&d++),typeof a.type!="function"&&(a.__u|=4)):c!=u&&(c==u-1?d--:c==u+1?d++:(c>u?d--:d++,a.__u|=4))):e.__k[s]=null;if(h)for(s=0;s<f;s++)(l=r[s])!=null&&(2&l.__u)==0&&(l.__e==i&&(i=Xt(l)),Li(l,l));return i}function Fi(e,n,r,i){var o,s;if(typeof e.type=="function"){for(o=e.__k,s=0;o&&s<o.length;s++)o[s]&&(o[s].__=e,n=Fi(o[s],n,r,i));return n}e.__e!=n&&(i&&(n&&e.type&&!n.parentNode&&(n=Xt(e)),r.insertBefore(e.__e,n||null)),n=e.__e);do n=n&&n.nextSibling;while(n!=null&&n.nodeType==8);return n}function Wu(e,n,r,i){var o,s,a,l=e.key,u=e.type,c=n[r],f=c!=null&&(2&c.__u)==0;if(c===null&&l==null||f&&l==c.key&&u==c.type)return r;if(i>(f?1:0)){for(o=r-1,s=r+1;o>=0||s<n.length;)if((c=n[a=o>=0?o--:s++])!=null&&(2&c.__u)==0&&l==c.key&&u==c.type)return a}return-1}function kr(e,n,r){n[0]=="-"?e.setProperty(n,r??""):e[n]=r==null?"":typeof r!="number"||Uu.test(n)?r:r+"px"}function Ce(e,n,r,i,o){var s,a;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||kr(e.style,n,"");if(r)for(n in r)i&&r[n]==i[n]||kr(e.style,n,r[n])}else if(n[0]=="o"&&n[1]=="n")s=n!=(n=n.replace(Ri,"$1")),a=n.toLowerCase(),n=a in e||n=="onFocusOut"||n=="onFocusIn"?a.slice(2):n.slice(2),e.l||(e.l={}),e.l[n+s]=r,r?i?r[ce]=i[ce]:(r[ce]=Fn,e.addEventListener(n,s?kn:xn,s)):e.removeEventListener(n,s?kn:xn,s);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 Sr(e){return function(n){if(this.l){var r=this.l[n.type+e];if(n[ze]==null)n[ze]=Fn++;else if(n[ze]<r[ce])return;return r(G.event?G.event(n):n)}}}function $n(e,n,r,i,o,s,a,l,u,c){var f,h,d,p,_,m,v,g,w,x,y,b,S,C,M,z=n.type;if(n.constructor!==void 0)return null;128&r.__u&&(u=!!(32&r.__u),s=[l=n.__e=r.__e]),(f=G.__b)&&f(n);t:if(typeof z=="function")try{if(g=n.props,w=z.prototype&&z.prototype.render,x=(f=z.contextType)&&i[f.__c],y=f?x?x.props.value:f.__:i,r.__c?v=(h=n.__c=r.__c).__=h.__E:(w?n.__c=h=new z(g,y):(n.__c=h=new Ie(g,y),h.constructor=z,h.render=Gu),x&&x.sub(h),h.state||(h.state={}),h.__n=i,d=h.__d=!0,h.__h=[],h._sb=[]),w&&h.__s==null&&(h.__s=h.state),w&&z.getDerivedStateFromProps!=null&&(h.__s==h.state&&(h.__s=vt({},h.__s)),vt(h.__s,z.getDerivedStateFromProps(g,h.__s))),p=h.props,_=h.state,h.__v=n,d)w&&z.getDerivedStateFromProps==null&&h.componentWillMount!=null&&h.componentWillMount(),w&&h.componentDidMount!=null&&h.__h.push(h.componentDidMount);else{if(w&&z.getDerivedStateFromProps==null&&g!==p&&h.componentWillReceiveProps!=null&&h.componentWillReceiveProps(g,y),n.__v==r.__v||!h.__e&&h.shouldComponentUpdate!=null&&h.shouldComponentUpdate(g,h.__s,y)===!1){n.__v!=r.__v&&(h.props=g,h.state=h.__s,h.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function(A){A&&(A.__=n)}),He.push.apply(h.__h,h._sb),h._sb=[],h.__h.length&&a.push(h);break t}h.componentWillUpdate!=null&&h.componentWillUpdate(g,h.__s,y),w&&h.componentDidUpdate!=null&&h.__h.push(function(){h.componentDidUpdate(p,_,m)})}if(h.context=y,h.props=g,h.__P=e,h.__e=!1,b=G.__r,S=0,w)h.state=h.__s,h.__d=!1,b&&b(n),f=h.render(h.props,h.state,h.context),He.push.apply(h.__h,h._sb),h._sb=[];else do h.__d=!1,b&&b(n),f=h.render(h.props,h.state,h.context),h.state=h.__s;while(h.__d&&++S<25);h.state=h.__s,h.getChildContext!=null&&(i=vt(vt({},i),h.getChildContext())),w&&!d&&h.getSnapshotBeforeUpdate!=null&&(m=h.getSnapshotBeforeUpdate(p,_)),C=f!=null&&f.type===Qe&&f.key==null?$i(f.props.children):f,l=Oi(e,Ze(C)?C:[C],n,r,i,o,s,a,l,u,c),h.base=n.__e,n.__u&=-161,h.__h.length&&a.push(h),v&&(h.__E=h.__=null)}catch(A){if(n.__v=null,u||s!=null)if(A.then){for(n.__u|=u?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;s[s.indexOf(l)]=null,n.__e=l}else{for(M=s.length;M--;)jn(s[M]);Sn(n)}else n.__e=r.__e,n.__k=r.__k,A.then||Sn(n);G.__e(A,n,r)}else s==null&&n.__v==r.__v?(n.__k=r.__k,n.__e=r.__e):l=n.__e=qu(r.__e,n,r,i,o,s,a,u,c);return(f=G.diffed)&&f(n),128&n.__u?void 0:l}function Sn(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Sn))}function ji(e,n,r){for(var i=0;i<r.length;i++)Ln(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(s){s.call(o)})}catch(s){G.__e(s,o.__v)}})}function $i(e){return typeof e!="object"||e==null||e.__b>0?e:Ze(e)?e.map($i):e.constructor!==void 0?null:vt({},e)}function qu(e,n,r,i,o,s,a,l,u){var c,f,h,d,p,_,m,v=r.props||Ue,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"),s!=null){for(c=0;c<s.length;c++)if((p=s[c])&&"setAttribute"in p==!!w&&(w?p.localName==w:p.nodeType==3)){e=p,s[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,s),l=!1),s=null}if(w==null)v===g||l&&e.data==g||(e.data=g);else{if(s=w=="textarea"&&g.defaultValue!=null?null:s&&be.call(e.childNodes),!l&&s!=null)for(v={},c=0;c<e.attributes.length;c++)v[(p=e.attributes[c]).name]=p.value;for(c in v)p=v[c],c=="dangerouslySetInnerHTML"?h=p:c=="children"||c in g||c=="value"&&"defaultValue"in g||c=="checked"&&"defaultChecked"in g||Ce(e,c,null,p,o);for(c in g)p=g[c],c=="children"?d=p:c=="dangerouslySetInnerHTML"?f=p:c=="value"?_=p:c=="checked"?m=p:l&&typeof p!="function"||v[c]===p||Ce(e,c,p,v[c],o);if(f)l||h&&(f.__html==h.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),n.__k=[];else if(h&&(e.innerHTML=""),Oi(n.type=="template"?e.content:e,Ze(d)?d:[d],n,r,i,w=="foreignObject"?"http://www.w3.org/1999/xhtml":o,s,a,s?s[0]:r.__k&&Xt(r,0),l,u),s!=null)for(c=s.length;c--;)jn(s[c]);l&&w!="textarea"||(c="value",w=="progress"&&_==null?e.removeAttribute("value"):_!=null&&(_!==e[c]||w=="progress"&&!_||w=="option"&&_!=v[c])&&Ce(e,c,_,v[c],o),c="checked",m!=null&&m!=e[c]&&Ce(e,c,m,v[c],o))}return e}function Ln(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 Li(e,n,r){var i,o;if(G.unmount&&G.unmount(e),(i=e.ref)&&(i.current&&i.current!=e.__e||Ln(i,null,n)),(i=e.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(s){G.__e(s,n)}i.base=i.__P=null}if(i=e.__k)for(o=0;o<i.length;o++)i[o]&&Li(i[o],n,r||typeof e.type!="function");r||jn(e.__e),e.__c=e.__=e.__e=void 0}function Gu(e,n,r){return this.constructor(e,r)}function Xu(e,n,r){var i,o,s,a;n==document&&(n=document.documentElement),G.__&&G.__(e,n),o=(i=!1)?null:n.__k,s=[],a=[],$n(n,e=n.__k=Hu(Qe,null,[e]),o||Ue,Ue,n.namespaceURI,o?null:n.firstChild?be.call(n.childNodes):null,s,o?o.__e:n.firstChild,i,a),ji(s,e,a)}function Ui(e,n,r){var i,o,s,a,l=vt({},e.props);for(s in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),n)s=="key"?i=n[s]:s=="ref"?o=n[s]:l[s]=n[s]===void 0&&a!=null?a[s]:n[s];return arguments.length>2&&(l.children=arguments.length>3?be.call(arguments,2):r),he(e.type,l,i||e.key,o||e.ref,null)}be=He.slice,G={__e:function(e,n,r,i){for(var o,s,a;n=n.__;)if((o=n.__c)&&!o.__)try{if((s=o.constructor)&&s.getDerivedStateFromError!=null&&(o.setState(s.getDerivedStateFromError(e)),a=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,i||{}),a=o.__d),a)return o.__E=o}catch(l){e=l}throw e}},Ei=0,Ni=function(e){return e!=null&&e.constructor===void 0},Ie.prototype.setState=function(e,n){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=vt({},this.state),typeof e=="function"&&(e=e(vt({},r),this.props)),e&&vt(r,e),e!=null&&this.__v&&(n&&this._sb.push(n),xr(this))},Ie.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),xr(this))},Ie.prototype.render=Qe,It=[],zi=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ii=function(e,n){return e.__v.__b-n.__v.__b},Be.__r=0,rn=Math.random().toString(8),ze="__d"+rn,ce="__a"+rn,Ri=/(PointerCapture)$|Capture$/i,Fn=0,xn=Sr(!1),kn=Sr(!0);function Cr(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 Yu(e){if(Array.isArray(e))return e}function Ku(e,n,r){return(n=nc(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Zu(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,s,a,l=[],u=!0,c=!1;try{if(s=(r=r.call(e)).next,n!==0)for(;!(u=(i=s.call(r)).done)&&(l.push(i.value),l.length!==n);u=!0);}catch(f){c=!0,o=f}finally{try{if(!u&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}function Qu(){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 Mr(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 Ju(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?Mr(Object(r),!0).forEach(function(i){Ku(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mr(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function tc(e,n){return Yu(e)||Zu(e,n)||rc(e,n)||Qu()}function ec(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 nc(e){var n=ec(e,"string");return typeof n=="symbol"?n:n+""}function Ve(e){"@babel/helpers - typeof";return Ve=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},Ve(e)}function rc(e,n){if(e){if(typeof e=="string")return Cr(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)?Cr(e,n):void 0}}var Cn=function(n){if(Ve(n)!=="object")return n;var r=Ui(n);if(r.props){var i;r.props=Ju({},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(Cn):Cn(r.props.children))}return r},ic=function(n){return Ni(Ui(n))},oc=function(n,r){delete r.__k,Xu(Cn(n),r)};function sc(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 ac=`.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
|
+
`;sc(ac);var lc=On({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,s=o===void 0?{}:o,a=!!n&&Ve(n)==="object"&&!!n.node&&typeof n.node=="function",l=at(a?n.node():n);l.style("position")==="static"&&l.style("position","relative"),r.tooltipEl=l.append("div").attr("class","float-tooltip-kap"),Object.entries(s).forEach(function(c){var f=tc(c,2),h=f[0],d=f[1];return r.tooltipEl.style(h,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 f=_t(c),h=l.node(),d=h.offsetWidth,p=h.offsetHeight,_=[r.offsetX===null||r.offsetX===void 0?"-".concat(f[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-f[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",f[0]+"px").style("top",f[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):ic(n.content)?(n.tooltipEl.text(""),oc(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 uc(e,n,r){var i,o=1;e==null&&(e=0),n==null&&(n=0),r==null&&(r=0);function s(){var a,l=i.length,u,c=0,f=0,h=0;for(a=0;a<l;++a)u=i[a],c+=u.x||0,f+=u.y||0,h+=u.z||0;for(c=(c/l-e)*o,f=(f/l-n)*o,h=(h/l-r)*o,a=0;a<l;++a)u=i[a],c&&(u.x-=c),f&&(u.y-=f),h&&(u.z-=h)}return s.initialize=function(a){i=a},s.x=function(a){return arguments.length?(e=+a,s):e},s.y=function(a){return arguments.length?(n=+a,s):n},s.z=function(a){return arguments.length?(r=+a,s):r},s.strength=function(a){return arguments.length?(o=+a,s):o},s}function cc(e){const n=+this._x.call(null,e);return Hi(this.cover(n),n,e)}function Hi(e,n,r){if(isNaN(n))return e;var i,o=e._root,s={data:r},a=e._x0,l=e._x1,u,c,f,h,d;if(!o)return e._root=s,e;for(;o.length;)if((f=n>=(u=(a+l)/2))?a=u:l=u,i=o,!(o=o[h=+f]))return i[h]=s,e;if(c=+e._x.call(null,o.data),n===c)return s.next=o,i?i[h]=s:e._root=s,e;do i=i?i[h]=new Array(2):e._root=new Array(2),(f=n>=(u=(a+l)/2))?a=u:l=u;while((h=+f)==(d=+(c>=u)));return i[d]=o,i[h]=s,e}function hc(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 s=0,a;s<n;++s)isNaN(a=+this._x.call(null,e[s]))||(r[s]=a,a<i&&(i=a),a>o&&(o=a));if(i>o)return this;this.cover(i).cover(o);for(let s=0;s<n;++s)Hi(this,r[s],e[s]);return this}function fc(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,s,a;n>e||e>=r;)switch(a=+(e<n),s=new Array(2),s[a]=o,o=s,i*=2,a){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 dc(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function pc(e){return arguments.length?this.cover(+e[0][0]).cover(+e[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function Tt(e,n,r){this.node=e,this.x0=n,this.x1=r}function gc(e,n){var r,i=this._x0,o,s,a=this._x1,l=[],u=this._root,c,f;for(u&&l.push(new Tt(u,i,a)),n==null?n=1/0:(i=e-n,a=e+n);c=l.pop();)if(!(!(u=c.node)||(o=c.x0)>a||(s=c.x1)<i))if(u.length){var h=(o+s)/2;l.push(new Tt(u[1],h,s),new Tt(u[0],o,h)),(f=+(e>=h))&&(c=l[l.length-1],l[l.length-1]=l[l.length-1-f],l[l.length-1-f]=c)}else{var d=Math.abs(e-+this._x.call(null,u.data));d<n&&(n=d,i=e-d,a=e+d,r=u.data)}return r}function _c(e){if(isNaN(u=+this._x.call(null,e)))return this;var n,r=this._root,i,o,s,a=this._x0,l=this._x1,u,c,f,h,d;if(!r)return this;if(r.length)for(;;){if((f=u>=(c=(a+l)/2))?a=c:l=c,n=r,!(r=r[h=+f]))return this;if(!r.length)break;n[h+1&1]&&(i=n,d=h)}for(;r.data!==e;)if(o=r,!(r=r.next))return this;return(s=r.next)&&delete r.next,o?(s?o.next=s:delete o.next,this):n?(s?n[h]=s:delete n[h],(r=n[0]||n[1])&&r===(n[1]||n[0])&&!r.length&&(i?i[d]=r:this._root=r),this):(this._root=s,this)}function vc(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function yc(){return this._root}function mc(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function bc(e){var n=[],r,i=this._root,o,s,a;for(i&&n.push(new Tt(i,this._x0,this._x1));r=n.pop();)if(!e(i=r.node,s=r.x0,a=r.x1)&&i.length){var l=(s+a)/2;(o=i[1])&&n.push(new Tt(o,l,a)),(o=i[0])&&n.push(new Tt(o,s,l))}return this}function wc(e){var n=[],r=[],i;for(this._root&&n.push(new Tt(this._root,this._x0,this._x1));i=n.pop();){var o=i.node;if(o.length){var s,a=i.x0,l=i.x1,u=(a+l)/2;(s=o[0])&&n.push(new Tt(s,a,u)),(s=o[1])&&n.push(new Tt(s,u,l))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.x1);return this}function xc(e){return e[0]}function kc(e){return arguments.length?(this._x=e,this):this._x}function Bi(e,n){var r=new Un(n??xc,NaN,NaN);return e==null?r:r.addAll(e)}function Un(e,n,r){this._x=e,this._x0=n,this._x1=r,this._root=void 0}function Ar(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var nt=Bi.prototype=Un.prototype;nt.copy=function(){var e=new Un(this._x,this._x0,this._x1),n=this._root,r,i;if(!n)return e;if(!n.length)return e._root=Ar(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]=Ar(i));return e};nt.add=cc;nt.addAll=hc;nt.cover=fc;nt.data=dc;nt.extent=pc;nt.find=gc;nt.remove=_c;nt.removeAll=vc;nt.root=yc;nt.size=mc;nt.visit=bc;nt.visitAfter=wc;nt.x=kc;function Sc(e){const n=+this._x.call(null,e),r=+this._y.call(null,e);return Vi(this.cover(n,r),n,r,e)}function Vi(e,n,r,i){if(isNaN(n)||isNaN(r))return e;var o,s=e._root,a={data:i},l=e._x0,u=e._y0,c=e._x1,f=e._y1,h,d,p,_,m,v,g,w;if(!s)return e._root=a,e;for(;s.length;)if((m=n>=(h=(l+c)/2))?l=h:c=h,(v=r>=(d=(u+f)/2))?u=d:f=d,o=s,!(s=s[g=v<<1|m]))return o[g]=a,e;if(p=+e._x.call(null,s.data),_=+e._y.call(null,s.data),n===p&&r===_)return a.next=s,o?o[g]=a:e._root=a,e;do o=o?o[g]=new Array(4):e._root=new Array(4),(m=n>=(h=(l+c)/2))?l=h:c=h,(v=r>=(d=(u+f)/2))?u=d:f=d;while((g=v<<1|m)===(w=(_>=d)<<1|p>=h));return o[w]=s,o[g]=a,e}function Cc(e){var n,r,i=e.length,o,s,a=new Array(i),l=new Array(i),u=1/0,c=1/0,f=-1/0,h=-1/0;for(r=0;r<i;++r)isNaN(o=+this._x.call(null,n=e[r]))||isNaN(s=+this._y.call(null,n))||(a[r]=o,l[r]=s,o<u&&(u=o),o>f&&(f=o),s<c&&(c=s),s>h&&(h=s));if(u>f||c>h)return this;for(this.cover(u,c).cover(f,h),r=0;r<i;++r)Vi(this,a[r],l[r],e[r]);return this}function Mc(e,n){if(isNaN(e=+e)||isNaN(n=+n))return this;var r=this._x0,i=this._y0,o=this._x1,s=this._y1;if(isNaN(r))o=(r=Math.floor(e))+1,s=(i=Math.floor(n))+1;else{for(var a=o-r||1,l=this._root,u,c;r>e||e>=o||i>n||n>=s;)switch(c=(n<i)<<1|e<r,u=new Array(4),u[c]=l,l=u,a*=2,c){case 0:o=r+a,s=i+a;break;case 1:r=o-a,s=i+a;break;case 2:o=r+a,i=s-a;break;case 3:r=o-a,i=s-a;break}this._root&&this._root.length&&(this._root=l)}return this._x0=r,this._y0=i,this._x1=o,this._y1=s,this}function Ac(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function Pc(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 tt(e,n,r,i,o){this.node=e,this.x0=n,this.y0=r,this.x1=i,this.y1=o}function Tc(e,n,r){var i,o=this._x0,s=this._y0,a,l,u,c,f=this._x1,h=this._y1,d=[],p=this._root,_,m;for(p&&d.push(new tt(p,o,s,f,h)),r==null?r=1/0:(o=e-r,s=n-r,f=e+r,h=n+r,r*=r);_=d.pop();)if(!(!(p=_.node)||(a=_.x0)>f||(l=_.y0)>h||(u=_.x1)<o||(c=_.y1)<s))if(p.length){var v=(a+u)/2,g=(l+c)/2;d.push(new tt(p[3],v,g,u,c),new tt(p[2],a,g,v,c),new tt(p[1],v,l,u,g),new tt(p[0],a,l,v,g)),(m=(n>=g)<<1|e>=v)&&(_=d[d.length-1],d[d.length-1]=d[d.length-1-m],d[d.length-1-m]=_)}else{var w=e-+this._x.call(null,p.data),x=n-+this._y.call(null,p.data),y=w*w+x*x;if(y<r){var b=Math.sqrt(r=y);o=e-b,s=n-b,f=e+b,h=n+b,i=p.data}}return i}function Ec(e){if(isNaN(f=+this._x.call(null,e))||isNaN(h=+this._y.call(null,e)))return this;var n,r=this._root,i,o,s,a=this._x0,l=this._y0,u=this._x1,c=this._y1,f,h,d,p,_,m,v,g;if(!r)return this;if(r.length)for(;;){if((_=f>=(d=(a+u)/2))?a=d:u=d,(m=h>=(p=(l+c)/2))?l=p:c=p,n=r,!(r=r[v=m<<1|_]))return this;if(!r.length)break;(n[v+1&3]||n[v+2&3]||n[v+3&3])&&(i=n,g=v)}for(;r.data!==e;)if(o=r,!(r=r.next))return this;return(s=r.next)&&delete r.next,o?(s?o.next=s:delete o.next,this):n?(s?n[v]=s:delete n[v],(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=s,this)}function Nc(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function zc(){return this._root}function Ic(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function Rc(e){var n=[],r,i=this._root,o,s,a,l,u;for(i&&n.push(new tt(i,this._x0,this._y0,this._x1,this._y1));r=n.pop();)if(!e(i=r.node,s=r.x0,a=r.y0,l=r.x1,u=r.y1)&&i.length){var c=(s+l)/2,f=(a+u)/2;(o=i[3])&&n.push(new tt(o,c,f,l,u)),(o=i[2])&&n.push(new tt(o,s,f,c,u)),(o=i[1])&&n.push(new tt(o,c,a,l,f)),(o=i[0])&&n.push(new tt(o,s,a,c,f))}return this}function Dc(e){var n=[],r=[],i;for(this._root&&n.push(new tt(this._root,this._x0,this._y0,this._x1,this._y1));i=n.pop();){var o=i.node;if(o.length){var s,a=i.x0,l=i.y0,u=i.x1,c=i.y1,f=(a+u)/2,h=(l+c)/2;(s=o[0])&&n.push(new tt(s,a,l,f,h)),(s=o[1])&&n.push(new tt(s,f,l,u,h)),(s=o[2])&&n.push(new tt(s,a,h,f,c)),(s=o[3])&&n.push(new tt(s,f,h,u,c))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.y0,i.x1,i.y1);return this}function Oc(e){return e[0]}function Fc(e){return arguments.length?(this._x=e,this):this._x}function jc(e){return e[1]}function $c(e){return arguments.length?(this._y=e,this):this._y}function Wi(e,n,r){var i=new Hn(n??Oc,r??jc,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function Hn(e,n,r,i,o,s){this._x=e,this._y=n,this._x0=r,this._y0=i,this._x1=o,this._y1=s,this._root=void 0}function Pr(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var et=Wi.prototype=Hn.prototype;et.copy=function(){var e=new Hn(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=Pr(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]=Pr(i));return e};et.add=Sc;et.addAll=Cc;et.cover=Mc;et.data=Ac;et.extent=Pc;et.find=Tc;et.remove=Ec;et.removeAll=Nc;et.root=zc;et.size=Ic;et.visit=Rc;et.visitAfter=Dc;et.x=Fc;et.y=$c;function Lc(e){const n=+this._x.call(null,e),r=+this._y.call(null,e),i=+this._z.call(null,e);return qi(this.cover(n,r,i),n,r,i,e)}function qi(e,n,r,i,o){if(isNaN(n)||isNaN(r)||isNaN(i))return e;var s,a=e._root,l={data:o},u=e._x0,c=e._y0,f=e._z0,h=e._x1,d=e._y1,p=e._z1,_,m,v,g,w,x,y,b,S,C,M;if(!a)return e._root=l,e;for(;a.length;)if((y=n>=(_=(u+h)/2))?u=_:h=_,(b=r>=(m=(c+d)/2))?c=m:d=m,(S=i>=(v=(f+p)/2))?f=v:p=v,s=a,!(a=a[C=S<<2|b<<1|y]))return s[C]=l,e;if(g=+e._x.call(null,a.data),w=+e._y.call(null,a.data),x=+e._z.call(null,a.data),n===g&&r===w&&i===x)return l.next=a,s?s[C]=l:e._root=l,e;do s=s?s[C]=new Array(8):e._root=new Array(8),(y=n>=(_=(u+h)/2))?u=_:h=_,(b=r>=(m=(c+d)/2))?c=m:d=m,(S=i>=(v=(f+p)/2))?f=v:p=v;while((C=S<<2|b<<1|y)===(M=(x>=v)<<2|(w>=m)<<1|g>=_));return s[M]=a,s[C]=l,e}function Uc(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 s=1/0,a=1/0,l=1/0,u=-1/0,c=-1/0,f=-1/0;for(let h=0,d,p,_,m;h<n;++h)isNaN(p=+this._x.call(null,d=e[h]))||isNaN(_=+this._y.call(null,d))||isNaN(m=+this._z.call(null,d))||(r[h]=p,i[h]=_,o[h]=m,p<s&&(s=p),p>u&&(u=p),_<a&&(a=_),_>c&&(c=_),m<l&&(l=m),m>f&&(f=m));if(s>u||a>c||l>f)return this;this.cover(s,a,l).cover(u,c,f);for(let h=0;h<n;++h)qi(this,r[h],i[h],o[h],e[h]);return this}function Hc(e,n,r){if(isNaN(e=+e)||isNaN(n=+n)||isNaN(r=+r))return this;var i=this._x0,o=this._y0,s=this._z0,a=this._x1,l=this._y1,u=this._z1;if(isNaN(i))a=(i=Math.floor(e))+1,l=(o=Math.floor(n))+1,u=(s=Math.floor(r))+1;else{for(var c=a-i||1,f=this._root,h,d;i>e||e>=a||o>n||n>=l||s>r||r>=u;)switch(d=(r<s)<<2|(n<o)<<1|e<i,h=new Array(8),h[d]=f,f=h,c*=2,d){case 0:a=i+c,l=o+c,u=s+c;break;case 1:i=a-c,l=o+c,u=s+c;break;case 2:a=i+c,o=l-c,u=s+c;break;case 3:i=a-c,o=l-c,u=s+c;break;case 4:a=i+c,l=o+c,s=u-c;break;case 5:i=a-c,l=o+c,s=u-c;break;case 6:a=i+c,o=l-c,s=u-c;break;case 7:i=a-c,o=l-c,s=u-c;break}this._root&&this._root.length&&(this._root=f)}return this._x0=i,this._y0=o,this._z0=s,this._x1=a,this._y1=l,this._z1=u,this}function Bc(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function Vc(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 V(e,n,r,i,o,s,a){this.node=e,this.x0=n,this.y0=r,this.z0=i,this.x1=o,this.y1=s,this.z1=a}function Wc(e,n,r,i){var o,s=this._x0,a=this._y0,l=this._z0,u,c,f,h,d,p,_=this._x1,m=this._y1,v=this._z1,g=[],w=this._root,x,y;for(w&&g.push(new V(w,s,a,l,_,m,v)),i==null?i=1/0:(s=e-i,a=n-i,l=r-i,_=e+i,m=n+i,v=r+i,i*=i);x=g.pop();)if(!(!(w=x.node)||(u=x.x0)>_||(c=x.y0)>m||(f=x.z0)>v||(h=x.x1)<s||(d=x.y1)<a||(p=x.z1)<l))if(w.length){var b=(u+h)/2,S=(c+d)/2,C=(f+p)/2;g.push(new V(w[7],b,S,C,h,d,p),new V(w[6],u,S,C,b,d,p),new V(w[5],b,c,C,h,S,p),new V(w[4],u,c,C,b,S,p),new V(w[3],b,S,f,h,d,C),new V(w[2],u,S,f,b,d,C),new V(w[1],b,c,f,h,S,C),new V(w[0],u,c,f,b,S,C)),(y=(r>=C)<<2|(n>=S)<<1|e>=b)&&(x=g[g.length-1],g[g.length-1]=g[g.length-1-y],g[g.length-1-y]=x)}else{var M=e-+this._x.call(null,w.data),z=n-+this._y.call(null,w.data),A=r-+this._z.call(null,w.data),N=M*M+z*z+A*A;if(N<i){var R=Math.sqrt(i=N);s=e-R,a=n-R,l=r-R,_=e+R,m=n+R,v=r+R,o=w.data}}return o}const qc=(e,n,r,i,o,s)=>Math.sqrt((e-i)**2+(n-o)**2+(r-s)**2);function Gc(e,n,r,i){const o=[],s=e-i,a=n-i,l=r-i,u=e+i,c=n+i,f=r+i;return this.visit((h,d,p,_,m,v,g)=>{if(!h.length)do{const w=h.data;qc(e,n,r,this._x(w),this._y(w),this._z(w))<=i&&o.push(w)}while(h=h.next);return d>u||p>c||_>f||m<s||v<a||g<l}),o}function Xc(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,s,a=this._x0,l=this._y0,u=this._z0,c=this._x1,f=this._y1,h=this._z1,d,p,_,m,v,g,w,x,y,b,S;if(!r)return this;if(r.length)for(;;){if((w=d>=(m=(a+c)/2))?a=m:c=m,(x=p>=(v=(l+f)/2))?l=v:f=v,(y=_>=(g=(u+h)/2))?u=g:h=g,n=r,!(r=r[b=y<<2|x<<1|w]))return this;if(!r.length)break;(n[b+1&7]||n[b+2&7]||n[b+3&7]||n[b+4&7]||n[b+5&7]||n[b+6&7]||n[b+7&7])&&(i=n,S=b)}for(;r.data!==e;)if(o=r,!(r=r.next))return this;return(s=r.next)&&delete r.next,o?(s?o.next=s:delete o.next,this):n?(s?n[b]=s:delete n[b],(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=s,this)}function Yc(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function Kc(){return this._root}function Zc(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function Qc(e){var n=[],r,i=this._root,o,s,a,l,u,c,f;for(i&&n.push(new V(i,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));r=n.pop();)if(!e(i=r.node,s=r.x0,a=r.y0,l=r.z0,u=r.x1,c=r.y1,f=r.z1)&&i.length){var h=(s+u)/2,d=(a+c)/2,p=(l+f)/2;(o=i[7])&&n.push(new V(o,h,d,p,u,c,f)),(o=i[6])&&n.push(new V(o,s,d,p,h,c,f)),(o=i[5])&&n.push(new V(o,h,a,p,u,d,f)),(o=i[4])&&n.push(new V(o,s,a,p,h,d,f)),(o=i[3])&&n.push(new V(o,h,d,l,u,c,p)),(o=i[2])&&n.push(new V(o,s,d,l,h,c,p)),(o=i[1])&&n.push(new V(o,h,a,l,u,d,p)),(o=i[0])&&n.push(new V(o,s,a,l,h,d,p))}return this}function Jc(e){var n=[],r=[],i;for(this._root&&n.push(new V(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 s,a=i.x0,l=i.y0,u=i.z0,c=i.x1,f=i.y1,h=i.z1,d=(a+c)/2,p=(l+f)/2,_=(u+h)/2;(s=o[0])&&n.push(new V(s,a,l,u,d,p,_)),(s=o[1])&&n.push(new V(s,d,l,u,c,p,_)),(s=o[2])&&n.push(new V(s,a,p,u,d,f,_)),(s=o[3])&&n.push(new V(s,d,p,u,c,f,_)),(s=o[4])&&n.push(new V(s,a,l,_,d,p,h)),(s=o[5])&&n.push(new V(s,d,l,_,c,p,h)),(s=o[6])&&n.push(new V(s,a,p,_,d,f,h)),(s=o[7])&&n.push(new V(s,d,p,_,c,f,h))}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 th(e){return e[0]}function eh(e){return arguments.length?(this._x=e,this):this._x}function nh(e){return e[1]}function rh(e){return arguments.length?(this._y=e,this):this._y}function ih(e){return e[2]}function oh(e){return arguments.length?(this._z=e,this):this._z}function Gi(e,n,r,i){var o=new Bn(n??th,r??nh,i??ih,NaN,NaN,NaN,NaN,NaN,NaN);return e==null?o:o.addAll(e)}function Bn(e,n,r,i,o,s,a,l,u){this._x=e,this._y=n,this._z=r,this._x0=i,this._y0=o,this._z0=s,this._x1=a,this._y1=l,this._z1=u,this._root=void 0}function Tr(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var Q=Gi.prototype=Bn.prototype;Q.copy=function(){var e=new Bn(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=Tr(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]=Tr(i));return e};Q.add=Lc;Q.addAll=Uc;Q.cover=Hc;Q.data=Bc;Q.extent=Vc;Q.find=Wc;Q.findAllWithinRadius=Gc;Q.remove=Xc;Q.removeAll=Yc;Q.root=Kc;Q.size=Zc;Q.visit=Qc;Q.visitAfter=Jc;Q.x=eh;Q.y=rh;Q.z=oh;function Pt(e){return function(){return e}}function Mt(e){return(e()-.5)*1e-6}function sh(e){return e.index}function Er(e,n){var r=e.get(n);if(!r)throw new Error("node not found: "+n);return r}function ah(e){var n=sh,r=d,i,o=Pt(30),s,a,l,u,c,f,h=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<h;++w)for(var y=0,b,S,C,M=0,z=0,A=0,N,R;y<x;++y)b=e[y],S=b.source,C=b.target,M=C.x+C.vx-S.x-S.vx||Mt(f),l>1&&(z=C.y+C.vy-S.y-S.vy||Mt(f)),l>2&&(A=C.z+C.vz-S.z-S.vz||Mt(f)),N=Math.sqrt(M*M+z*z+A*A),N=(N-s[y])/N*g*i[y],M*=N,z*=N,A*=N,C.vx-=M*(R=c[y]),l>1&&(C.vy-=z*R),l>2&&(C.vz-=A*R),S.vx+=M*(R=1-R),l>1&&(S.vy+=z*R),l>2&&(S.vz+=A*R)}function _(){if(a){var g,w=a.length,x=e.length,y=new Map(a.map((S,C)=>[n(S,C,a),S])),b;for(g=0,u=new Array(w);g<x;++g)b=e[g],b.index=g,typeof b.source!="object"&&(b.source=Er(y,b.source)),typeof b.target!="object"&&(b.target=Er(y,b.target)),u[b.source.index]=(u[b.source.index]||0)+1,u[b.target.index]=(u[b.target.index]||0)+1;for(g=0,c=new Array(x);g<x;++g)b=e[g],c[g]=u[b.source.index]/(u[b.source.index]+u[b.target.index]);i=new Array(x),m(),s=new Array(x),v()}}function m(){if(a)for(var g=0,w=e.length;g<w;++g)i[g]=+r(e[g],g,e)}function v(){if(a)for(var g=0,w=e.length;g<w;++g)s[g]=+o(e[g],g,e)}return p.initialize=function(g,...w){a=g,f=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?(h=+g,p):h},p.strength=function(g){return arguments.length?(r=typeof g=="function"?g:Pt(+g),m(),p):r},p.distance=function(g){return arguments.length?(o=typeof g=="function"?g:Pt(+g),v(),p):o},p}const lh=1664525,uh=1013904223,Nr=4294967296;function ch(){let e=1;return()=>(e=(lh*e+uh)%Nr)/Nr}var zr=3;function on(e){return e.x}function Ir(e){return e.y}function hh(e){return e.z}var fh=10,dh=Math.PI*(3-Math.sqrt(5)),ph=Math.PI*20/(9+Math.sqrt(221));function gh(e,n){n=n||2;var r=Math.min(zr,Math.max(1,Math.round(n))),i,o=1,s=.001,a=1-Math.pow(s,1/300),l=0,u=.6,c=new Map,f=zn(p),h=me("tick","end"),d=ch();e==null&&(e=[]);function p(){_(),h.call("tick",i),o<s&&(f.stop(),h.call("end",i))}function _(g){var w,x=e.length,y;g===void 0&&(g=1);for(var b=0;b<g;++b)for(o+=(l-o)*a,c.forEach(function(S){S(o)}),w=0;w<x;++w)y=e[w],y.fx==null?y.x+=y.vx*=u:(y.x=y.fx,y.vx=0),r>1&&(y.fy==null?y.y+=y.vy*=u:(y.y=y.fy,y.vy=0)),r>2&&(y.fz==null?y.z+=y.vz*=u:(y.z=y.fz,y.vz=0));return i}function m(){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 y=fh*(r>2?Math.cbrt(.5+g):r>1?Math.sqrt(.5+g):g),b=g*dh,S=g*ph;r===1?x.x=y:r===2?(x.x=y*Math.cos(b),x.y=y*Math.sin(b)):(x.x=y*Math.sin(b)*Math.cos(S),x.y=y*Math.cos(b),x.z=y*Math.sin(b)*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 v(g){return g.initialize&&g.initialize(e,d,r),g}return m(),i={tick:_,restart:function(){return f.restart(p),i},stop:function(){return f.stop(),i},numDimensions:function(g){return arguments.length?(r=Math.min(zr,Math.max(1,Math.round(g))),c.forEach(v),i):r},nodes:function(g){return arguments.length?(e=g,m(),c.forEach(v),i):e},alpha:function(g){return arguments.length?(o=+g,i):o},alphaMin:function(g){return arguments.length?(s=+g,i):s},alphaDecay:function(g){return arguments.length?(a=+g,i):+a},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(v),i):d},force:function(g,w){return arguments.length>1?(w==null?c.delete(g):c.set(g,v(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,y=(r>2?g.shift():null)||0,b=g.shift()||1/0,S=0,C=e.length,M,z,A,N,R,O;for(b*=b,S=0;S<C;++S)R=e[S],M=w-R.x,z=x-(R.y||0),A=y-(R.z||0),N=M*M+z*z+A*A,N<b&&(O=R,b=N);return O},on:function(g,w){return arguments.length>1?(h.on(g,w),i):h.on(g)}}}function _h(){var e,n,r,i,o,s=Pt(-30),a,l=1,u=1/0,c=.81;function f(_){var m,v=e.length,g=(n===1?Bi(e,on):n===2?Wi(e,on,Ir):n===3?Gi(e,on,Ir,hh):null).visitAfter(d);for(o=_,m=0;m<v;++m)r=e[m],g.visit(p)}function h(){if(e){var _,m=e.length,v;for(a=new Array(m),_=0;_<m;++_)v=e[_],a[v.index]=+s(v,_,e)}}function d(_){var m=0,v,g,w=0,x,y,b,S,C=_.length;if(C){for(x=y=b=S=0;S<C;++S)(v=_[S])&&(g=Math.abs(v.value))&&(m+=v.value,w+=g,x+=g*(v.x||0),y+=g*(v.y||0),b+=g*(v.z||0));m*=Math.sqrt(4/C),_.x=x/w,n>1&&(_.y=y/w),n>2&&(_.z=b/w)}else{v=_,v.x=v.data.x,n>1&&(v.y=v.data.y),n>2&&(v.z=v.data.z);do m+=a[v.data.index];while(v=v.next)}_.value=m}function p(_,m,v,g,w){if(!_.value)return!0;var x=[v,g,w][n-1],y=_.x-r.x,b=n>1?_.y-r.y:0,S=n>2?_.z-r.z:0,C=x-m,M=y*y+b*b+S*S;if(C*C/c<M)return M<u&&(y===0&&(y=Mt(i),M+=y*y),n>1&&b===0&&(b=Mt(i),M+=b*b),n>2&&S===0&&(S=Mt(i),M+=S*S),M<l&&(M=Math.sqrt(l*M)),r.vx+=y*_.value*o/M,n>1&&(r.vy+=b*_.value*o/M),n>2&&(r.vz+=S*_.value*o/M)),!0;if(_.length||M>=u)return;(_.data!==r||_.next)&&(y===0&&(y=Mt(i),M+=y*y),n>1&&b===0&&(b=Mt(i),M+=b*b),n>2&&S===0&&(S=Mt(i),M+=S*S),M<l&&(M=Math.sqrt(l*M)));do _.data!==r&&(C=a[_.data.index]*o/M,r.vx+=y*C,n>1&&(r.vy+=b*C),n>2&&(r.vz+=S*C));while(_=_.next)}return f.initialize=function(_,...m){e=_,i=m.find(v=>typeof v=="function")||Math.random,n=m.find(v=>[1,2,3].includes(v))||2,h()},f.strength=function(_){return arguments.length?(s=typeof _=="function"?_:Pt(+_),h(),f):s},f.distanceMin=function(_){return arguments.length?(l=_*_,f):Math.sqrt(l)},f.distanceMax=function(_){return arguments.length?(u=_*_,f):Math.sqrt(u)},f.theta=function(_){return arguments.length?(c=_*_,f):Math.sqrt(c)},f}function vh(e,n,r,i){var o,s,a=Pt(.1),l,u;typeof e!="function"&&(e=Pt(+e)),n==null&&(n=0),r==null&&(r=0),i==null&&(i=0);function c(h){for(var d=0,p=o.length;d<p;++d){var _=o[d],m=_.x-n||1e-6,v=(_.y||0)-r||1e-6,g=(_.z||0)-i||1e-6,w=Math.sqrt(m*m+v*v+g*g),x=(u[d]-w)*l[d]*h/w;_.vx+=m*x,s>1&&(_.vy+=v*x),s>2&&(_.vz+=g*x)}}function f(){if(o){var h,d=o.length;for(l=new Array(d),u=new Array(d),h=0;h<d;++h)u[h]=+e(o[h],h,o),l[h]=isNaN(u[h])?0:+a(o[h],h,o)}}return c.initialize=function(h,...d){o=h,s=d.find(p=>[1,2,3].includes(p))||2,f()},c.strength=function(h){return arguments.length?(a=typeof h=="function"?h:Pt(+h),f(),c):a},c.radius=function(h){return arguments.length?(e=typeof h=="function"?h:Pt(+h),f(),c):e},c.x=function(h){return arguments.length?(n=+h,c):n},c.y=function(h){return arguments.length?(r=+h,c):r},c.z=function(h){return arguments.length?(i=+h,c):i},c}const{abs:te,cos:Ct,sin:$t,acos:yh,atan2:ee,sqrt:Nt,pow:st}=Math;function ne(e){return e<0?-st(-e,1/3):st(e,1/3)}const Xi=Math.PI,Me=2*Xi,zt=Xi/2,mh=1e-6,sn=Number.MAX_SAFE_INTEGER||9007199254740991,an=Number.MIN_SAFE_INTEGER||-9007199254740991,bh={x:0,y:0,z:0},E={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),Nt(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 s=n;if(i===0)return n[0].t=e,n[0];if(i===1){const l={x:o*s[0].x+e*s[1].x,y:o*s[0].y+e*s[1].y,t:e};return r&&(l.z=o*s[0].z+e*s[1].z),l}if(i<4){let l=o*o,u=e*e,c,f,h,d=0;i===2?(s=[s[0],s[1],s[2],bh],c=l,f=o*e*2,h=u):i===3&&(c=l*o,f=l*e*3,h=o*u*3,d=e*u);const p={x:c*s[0].x+f*s[1].x+h*s[2].x+d*s[3].x,y:c*s[0].y+f*s[1].y+h*s[2].y+d*s[3].y,t:e};return r&&(p.z=c*s[0].z+f*s[1].z+h*s[2].z+d*s[3].z),p}const a=JSON.parse(JSON.stringify(n));for(;a.length>1;){for(let l=0;l<a.length-1;l++)a[l]={x:a[l].x+(a[l+1].x-a[l].x)*e,y:a[l].y+(a[l+1].y-a[l].y)*e},typeof a[l].z<"u"&&(a[l].z=a[l].z+(a[l+1].z-a[l].z)*e);a.splice(a.length-1,1)}return a[0].t=e,a[0]},computeWithRatios:function(e,n,r,i){const o=1-e,s=r,a=n;let l=s[0],u=s[1],c=s[2],f=s[3],h;if(l*=o,u*=e,a.length===2)return h=l+u,{x:(l*a[0].x+u*a[1].x)/h,y:(l*a[0].y+u*a[1].y)/h,z:i?(l*a[0].z+u*a[1].z)/h:!1,t:e};if(l*=o,u*=2*o,c*=e*e,a.length===3)return h=l+u+c,{x:(l*a[0].x+u*a[1].x+c*a[2].x)/h,y:(l*a[0].y+u*a[1].y+c*a[2].y)/h,z:i?(l*a[0].z+u*a[1].z+c*a[2].z)/h:!1,t:e};if(l*=o,u*=1.5*o,c*=3*o,f*=e*e*e,a.length===4)return h=l+u+c+f,{x:(l*a[0].x+u*a[1].x+c*a[2].x+f*a[3].x)/h,y:(l*a[0].y+u*a[1].y+c*a[2].y+f*a[3].y)/h,z:i?(l*a[0].z+u*a[1].z+c*a[2].z+f*a[3].z)/h:!1,t:e}},derive:function(e,n){const r=[];for(let i=e,o=i.length,s=o-1;o>1;o--,s--){const a=[];for(let l=0,u;l<s;l++)u={x:s*(i[l+1].x-i[l].x),y:s*(i[l+1].y-i[l].y)},n&&(u.z=s*(i[l+1].z-i[l].z)),a.push(u);r.push(a),i=a}return r},between:function(e,n,r){return n<=e&&e<=r||E.approximately(e,n)||E.approximately(e,r)},approximately:function(e,n,r){return te(e-n)<=(r||mh)},length:function(e){const r=E.Tvalues.length;let i=0;for(let o=0,s;o<r;o++)s=.5*E.Tvalues[o]+.5,i+=E.Cvalues[o]*E.arcfn(s,e);return .5*i},map:function(e,n,r,i,o){const s=r-n,a=o-i,l=e-n,u=l/s;return i+a*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(E.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,s=r.x-e.x,a=r.y-e.y,l=i*a-o*s,u=i*s+o*a;return ee(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 Nt(r*r+i*i)},closest:function(e,n){let r=st(2,63),i,o;return e.forEach(function(s,a){o=E.dist(n,s),o<r&&(r=o,i=a)}),{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=st(e,n)+st(1-e,n),i=r-1;return te(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=st(1-e,n),i=st(e,n)+r;return r/i},lli8:function(e,n,r,i,o,s,a,l){const u=(e*i-n*r)*(o-a)-(e-r)*(o*l-s*a),c=(e*i-n*r)*(s-l)-(n-i)*(o*l-s*a),f=(e-r)*(s-l)-(n-i)*(o-a);return f==0?!1:{x:u/f,y:c/f}},lli4:function(e,n,r,i){const o=e.x,s=e.y,a=n.x,l=n.y,u=r.x,c=r.y,f=i.x,h=i.y;return E.lli8(o,s,a,l,u,c,f,h)},lli:function(e,n){return E.lli4(e,e.c,n,n.c)},makeline:function(e,n){return new W(e.x,e.y,(e.x+n.x)/2,(e.y+n.y)/2,n.x,n.y)},findbbox:function(e){let n=sn,r=sn,i=an,o=an;return e.forEach(function(s){const a=s.bbox();n>a.x.min&&(n=a.x.min),r>a.y.min&&(r=a.y.min),i<a.x.max&&(i=a.x.max),o<a.y.max&&(o=a.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(!E.bboxoverlap(n,i))return[];const s=[],a=[e.startcap,e.forward,e.back,e.endcap],l=[r.startcap,r.forward,r.back,r.endcap];return a.forEach(function(u){u.virtual||l.forEach(function(c){if(c.virtual)return;const f=u.intersects(c,o);f.length>0&&(f.c1=u,f.c2=c,f.s1=e,f.s2=r,s.push(f))})}),s},makeshape:function(e,n,r){const i=n.points.length,o=e.points.length,s=E.makeline(n.points[i-1],e.points[0]),a=E.makeline(e.points[o-1],n.points[0]),l={startcap:s,forward:e,back:n,endcap:a,bbox:E.findbbox([s,e,n,a])};return l.intersections=function(u){return E.shapeintersections(l,l.bbox,u,u.bbox,r)},l},getminmax:function(e,n,r){if(!r)return{min:0,max:0};let i=sn,o=an,s,a;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++)s=r[l],a=e.get(s),a[n]<i&&(i=a[n]),a[n]>o&&(o=a[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=-ee(n.p2.y-i,n.p2.x-r),s=function(a){return{x:(a.x-r)*Ct(o)-(a.y-i)*$t(o),y:(a.x-r)*$t(o)+(a.y-i)*Ct(o)}};return e.map(s)},roots:function(e,n){n=n||{p1:{x:0,y:0},p2:{x:1,y:0}};const r=e.length-1,i=E.align(e,n),o=function(C){return 0<=C&&C<=1};if(r===2){const C=i[0].y,M=i[1].y,z=i[2].y,A=C-2*M+z;if(A!==0){const N=-Nt(M*M-C*z),R=-C+M,O=-(N+R)/A,k=-(-N+R)/A;return[O,k].filter(o)}else if(M!==z&&A===0)return[(2*M-z)/(2*M-2*z)].filter(o);return[]}const s=i[0].y,a=i[1].y,l=i[2].y,u=i[3].y;let c=-s+3*a-3*l+u,f=3*s-6*a+3*l,h=-3*s+3*a,d=s;if(E.approximately(c,0)){if(E.approximately(f,0))return E.approximately(h,0)?[]:[-d/h].filter(o);const C=Nt(h*h-4*f*d),M=2*f;return[(C-h)/M,(-h-C)/M].filter(o)}f/=c,h/=c,d/=c;const p=(3*h-f*f)/3,_=p/3,m=(2*f*f*f-9*f*h+27*d)/27,v=m/2,g=v*v+_*_*_;let w,x,y,b,S;if(g<0){const C=-p/3,M=C*C*C,z=Nt(M),A=-m/(2*z),N=A<-1?-1:A>1?1:A,R=yh(N),O=ne(z),k=2*O;return y=k*Ct(R/3)-f/3,b=k*Ct((R+Me)/3)-f/3,S=k*Ct((R+2*Me)/3)-f/3,[y,b,S].filter(o)}else{if(g===0)return w=v<0?ne(-v):-ne(v),y=2*w-f/3,b=-w-f/3,[y,b].filter(o);{const C=Nt(g);return w=ne(-v+C),x=ne(v+C),[w-x-f/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 s=-Nt(r*r-n*i),a=-n+r,l=-(s+a)/o,u=-(-s+a)/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 s,a,l,u,c=0,f=0;const h=E.compute(e,n),d=E.compute(e,r),p=h.x*h.x+h.y*h.y;if(i?(s=Nt(st(h.y*d.z-d.y*h.z,2)+st(h.z*d.x-d.z*h.x,2)+st(h.x*d.y-d.x*h.y,2)),a=st(p+h.z*h.z,3/2)):(s=h.x*d.y-h.y*d.x,a=st(p,3/2)),s===0||a===0)return{k:0,r:0};if(c=s/a,f=a/s,!o){const _=E.curvature(e-.001,n,r,i,!0).k,m=E.curvature(e+.001,n,r,i,!0).k;u=(m-c+(c-_))/2,l=(te(m-c)+te(c-_))/2}return{k:c,r:f,dk:u,adk:l}},inflections:function(e){if(e.length<4)return[];const n=E.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,s=n[3].x*n[2].y,a=18*(-3*r+2*i+3*o-s),l=18*(3*r-i-3*o),u=18*(o-r);if(E.approximately(a,0)){if(!E.approximately(l,0)){let d=-u/l;if(0<=d&&d<=1)return[d]}return[]}const c=2*a;if(E.approximately(c,0))return[];const f=l*l-4*a*u;if(f<0)return[];const h=Math.sqrt(f);return[(h-l)/c,-(l+h)/c].filter(function(d){return 0<=d&&d<=1})},bboxoverlap:function(e,n){const r=["x","y"],i=r.length;for(let o=0,s,a,l,u;o<i;o++)if(s=r[o],a=e[s].mid,l=n[s].mid,u=(e[s].size+n[s].size)/2,te(a-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(),s=1e5,a=r||.5;if(i.x.size+i.y.size<a&&o.x.size+o.y.size<a)return[(s*(e._t1+e._t2)/2|0)/s+"/"+(s*(n._t1+n._t2)/2|0)/s];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(h){return E.bboxoverlap(h.left.bbox(),h.right.bbox())});let f=[];return c.length===0||(c.forEach(function(h){f=f.concat(E.pairiteration(h.left,h.right,a))}),f=f.filter(function(h,d){return f.indexOf(h)===d})),f},getccenter:function(e,n,r){const i=n.x-e.x,o=n.y-e.y,s=r.x-n.x,a=r.y-n.y,l=i*Ct(zt)-o*$t(zt),u=i*$t(zt)+o*Ct(zt),c=s*Ct(zt)-a*$t(zt),f=s*$t(zt)+a*Ct(zt),h=(e.x+n.x)/2,d=(e.y+n.y)/2,p=(n.x+r.x)/2,_=(n.y+r.y)/2,m=h+l,v=d+u,g=p+c,w=_+f,x=E.lli8(h,d,m,v,p,_,g,w),y=E.dist(x,e);let b=ee(e.y-x.y,e.x-x.x),S=ee(n.y-x.y,n.x-x.x),C=ee(r.y-x.y,r.x-x.x),M;return b<C?((b>S||S>C)&&(b+=Me),b>C&&(M=C,C=b,b=M)):C<S&&S<b?(M=C,C=b,b=M):C+=Me,x.s=b,x.e=C,x.r=y,x},numberSort:function(e,n){return e-n}};class fe{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 E.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++)E.expandbox(r,n[i].bbox());return r}offset(n){const r=[];return this.curves.forEach(function(i){r.push(...i.offset(n))}),new fe(r)}}const{abs:re,min:Rr,max:Dr,cos:wh,sin:xh,acos:kh,sqrt:ie}=Math,Sh=Math.PI;class W{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(m){typeof _[m]<"u"&&p.push(_[m])})}),r=p}let o=!1;const s=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(s!==6&&s!==8&&s!==9&&s!==12&&arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const a=this._3d=!o&&(s===9||s===12)||n&&n[0]&&typeof n[0].z<"u",l=this.points=[];for(let p=0,_=a?3:2;p<s;p+=_){var u={x:r[p],y:r[p+1]};a&&(u.z=r[p+2]),l.push(u)}const c=this.order=l.length-1,f=this.dims=["x","y"];a&&f.push("z"),this.dimlen=f.length;const h=E.align(l,{p1:l[0],p2:l[c]}),d=E.dist(l[0],l[c]);this._linear=h.reduce((p,_)=>p+re(_.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 W(r,r,i);if(o===1)return new W(n,r,r);const s=W.getABC(2,n,r,i,o);return new W(n,s.A,i)}static cubicFromPoints(n,r,i,o,s){typeof o>"u"&&(o=.5);const a=W.getABC(3,n,r,i,o);typeof s>"u"&&(s=E.dist(r,a.C));const l=s*(1-o)/o,u=E.dist(n,i),c=(i.x-n.x)/u,f=(i.y-n.y)/u,h=s*c,d=s*f,p=l*c,_=l*f,m={x:r.x-h,y:r.y-d},v={x:r.x+p,y:r.y+_},g=a.A,w={x:g.x+(m.x-g.x)/(1-o),y:g.y+(m.y-g.y)/(1-o)},x={x:g.x+(v.x-g.x)/o,y:g.y+(v.y-g.y)/o},y={x:n.x+(w.x-n.x)/o,y:n.y+(w.y-n.y)/o},b={x:i.x+(x.x-i.x)/(1-o),y:i.y+(x.y-i.y)/(1-o)};return new W(n,y,b,i)}static getUtils(){return E}getUtils(){return W.getUtils()}static get PolyBezier(){return fe}valueOf(){return this.toString()}toString(){return E.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 s=1,a=n.length;s<a;s++)o.push(n[s].x),o.push(n[s].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=E.derive(this.points,this._3d),this.computedirection()}computedirection(){const n=this.points,r=E.angle(n[0],n[this.order],n[1]);this.clockwise=r>0}length(){return E.length(this.derivative.bind(this))}static getABC(n=2,r,i,o,s=.5){const a=E.projectionratio(s,n),l=1-a,u={x:a*r.x+l*o.x,y:a*r.y+l*o.y},c=E.abcratio(s,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 W.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 s=0,a,l=0;s<i.length;s++)a=i[s],E.dist(a,n)<r&&(o.push(a),l+=s/i.length);return o.length?t/=o.length:!1}project(n){const r=this.getLUT(),i=r.length-1,o=E.closest(r,n),s=o.mpos,a=(s-1)/i,l=(s+1)/i,u=.1/i;let c=o.mdist,f=a,h=f,d;c+=1;for(let p;f<l+u;f+=u)d=this.compute(f),p=E.dist(n,d),p<c&&(c=p,h=f);return h=h<0?0:h>1?1:h,d=this.compute(h),d.t=h,d.d=c,d}get(n){return this.compute(n)}point(n){return this.points[n]}compute(n){return this.ratios?E.computeWithRatios(n,this.points,this.ratios,this._3d):E.compute(n,this.points,this._3d,this.ratios)}raise(){const n=this.points,r=[n[0]],i=n.length;for(let o=1,s,a;o<i;o++)s=n[o],a=n[o-1],r[o]={x:(i-o)/i*s.x+o/i*a.x,y:(i-o)/i*s.y+o/i*a.y};return r[i]=n[i-1],new W(r)}derivative(n){return E.compute(n,this.dpoints[0],this._3d)}dderivative(n){return E.compute(n,this.dpoints[1],this._3d)}align(){let n=this.points;return new W(E.align(n,{p1:n[0],p2:n[n.length-1]}))}curvature(n){return E.curvature(n,this.dpoints[0],this.dpoints[1],this._3d)}inflections(){return E.inflections(this.points)}normal(n){return this._3d?this.__normal3(n):this.__normal2(n)}__normal2(n){const r=this.derivative(n),i=ie(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=ie(r.x*r.x+r.y*r.y+r.z*r.z),s=ie(i.x*i.x+i.y*i.y+i.z*i.z);r.x/=o,r.y/=o,r.z/=o,i.x/=s,i.y/=s,i.z/=s;const a={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=ie(a.x*a.x+a.y*a.y+a.z*a.z);a.x/=l,a.y/=l,a.z/=l;const u=[a.x*a.x,a.x*a.y-a.z,a.x*a.z+a.y,a.x*a.y+a.z,a.y*a.y,a.y*a.z-a.x,a.x*a.z-a.y,a.y*a.z+a.x,a.z*a.z];return{t: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=[],s=0;for(o[s++]=r[0],o[s++]=r[1],o[s++]=r[2],this.order===3&&(o[s++]=r[3]);r.length>1;){i=[];for(let a=0,l,u=r.length-1;a<u;a++)l=E.lerp(n,r[a],r[a+1]),o[s++]=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 W([i[0],i[3],i[5]]):new W([i[0],i[4],i[7],i[9]]),right:this.order===2?new W([i[5],i[4],i[2]]):new W([i[9],i[8],i[6],i[3]]),span:i};return o.left._t1=E.map(0,0,1,this._t1,this._t2),o.left._t2=E.map(n,0,1,this._t1,this._t2),o.right._t1=E.map(n,0,1,this._t1,this._t2),o.right._t2=E.map(1,0,1,this._t1,this._t2),r?(r=E.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(a){return a[i]},s=this.dpoints[0].map(o);n[i]=E.droots(s),this.order===3&&(s=this.dpoints[1].map(o),n[i]=n[i].concat(E.droots(s))),n[i]=n[i].filter(function(a){return a>=0&&a<=1}),r=r.concat(n[i].sort(E.numberSort))}).bind(this)),n.values=r.sort(E.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]=E.getminmax(this,i,n[i])}).bind(this)),r}overlaps(n){const r=this.bbox(),i=n.bbox();return E.bboxoverlap(r,i)}offset(n,r){if(typeof r<"u"){const i=this.get(n),o=this.normal(n),s={c:i,n:o,x:i.x+o.x*r,y:i.y+o.y*r};return this._3d&&(s.z=i.z+o.z*r),s}if(this._linear){const i=this.normal(0),o=this.points.map(function(s){const a={x:s.x+n*i.x,y:s.y+n*i.y};return s.z&&i.z&&(a.z=s.z+n*i.z),a});return[new W(o)]}return this.reduce().map(function(i){return i._linear?i.offset(n)[0]:i.scale(n)})}simple(){if(this.order===3){const o=E.angle(this.points[0],this.points[3],this.points[1]),s=E.angle(this.points[0],this.points[3],this.points[2]);if(o>0&&s<0||o<0&&s>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),re(kh(i))<Sh/3}reduce(){let n,r=0,i=0,o=.01,s,a=[],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],s=this.split(r,i),s._t1=r,s._t2=i,a.push(s),r=i;return a.forEach(function(c){for(r=0,i=0;i<=1;)for(i=r+o;i<=1+o;i+=o)if(s=c.split(r,i),!s.simple()){if(i-=o,re(r-i)<o)return[];s=c.split(r,i),s._t1=E.map(r,0,1,c._t1,c._t2),s._t2=E.map(i,0,1,c._t1,c._t2),l.push(s),r=i;break}r<1&&(s=c.split(r,1),s._t1=E.map(r,0,1,c._t1,c._t2),s._t2=c._t2,l.push(s))}),l}translate(n,r,i){i=typeof i=="number"?i:r;const o=this.order;let s=this.points.map((a,l)=>(1-l/o)*r+l/o*i);return new W(this.points.map((a,l)=>({x:a.x+n.x*s[l],y:a.y+n.y*s[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,s=this.points;if(this._linear)return this.translate(this.normal(0),i?i(0):n,i?i(1):n);const a=i?i(0):n,l=i?i(1):n,u=[this.offset(0,10),this.offset(1,10)],c=[],f=E.lli4(u[0],u[0].c,u[1],u[1].c);if(!f)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach(function(h){const d=c[h*r]=E.copy(s[h*r]);d.x+=(h?l:a)*u[h].n.x,d.y+=(h?l:a)*u[h].n.y}),i?([0,1].forEach(function(h){if(!(r===2&&h)){var d=s[h+1],p={x:d.x-f.x,y:d.y-f.y},_=i?i((h+1)/r):n;i&&!o&&(_=-_);var m=ie(p.x*p.x+p.y*p.y);p.x/=m,p.y/=m,c[h+1]={x:d.x+_*p.x,y:d.y+_*p.y}}}),new W(c)):([0,1].forEach(h=>{if(r===2&&h)return;const d=c[h*r],p=this.derivative(h),_={x:d.x+p.x,y:d.y+p.y};c[h+1]=E.lli4(d,_,f,s[h+1])}),new W(c))}outline(n,r,i,o){if(r=r===void 0?n:r,this._linear){const b=this.normal(0),S=this.points[0],C=this.points[this.points.length-1];let M,z,A;i===void 0&&(i=n,o=r),M={x:S.x+b.x*n,y:S.y+b.y*n},A={x:C.x+b.x*i,y:C.y+b.y*i},z={x:(M.x+A.x)/2,y:(M.y+A.y)/2};const N=[M,z,A];M={x:S.x-b.x*r,y:S.y-b.y*r},A={x:C.x-b.x*o,y:C.y-b.y*o},z={x:(M.x+A.x)/2,y:(M.y+A.y)/2};const R=[A,z,M],O=E.makeline(R[2],N[0]),k=E.makeline(N[2],R[0]),I=[O,new W(N),k,new W(R)];return new fe(I)}const s=this.reduce(),a=s.length,l=[];let u=[],c,f=0,h=this.length();const d=typeof i<"u"&&typeof o<"u";function p(b,S,C,M,z){return function(A){const N=M/C,R=(M+z)/C,O=S-b;return E.map(A,0,1,b+N*O,b+R*O)}}s.forEach(function(b){const S=b.length();d?(l.push(b.scale(p(n,i,h,f,S))),u.push(b.scale(p(-r,-o,h,f,S)))):(l.push(b.scale(n)),u.push(b.scale(-r))),f+=S}),u=u.map(function(b){return c=b.points,c[3]?b.points=[c[3],c[2],c[1],c[0]]:b.points=[c[2],c[1],c[0]],b}).reverse();const _=l[0].points[0],m=l[a-1].points[l[a-1].points.length-1],v=u[a-1].points[u[a-1].points.length-1],g=u[0].points[0],w=E.makeline(v,_),x=E.makeline(m,g),y=[w].concat(l).concat([x]).concat(u);return new fe(y)}outlineshapes(n,r,i){r=r||n;const o=this.outline(n,r).curves,s=[];for(let a=1,l=o.length;a<l/2;a++){const u=E.makeshape(o[a],o[l-a],i);u.startcap.virtual=a>1,u.endcap.virtual=a<l/2-1,s.push(u)}return s}intersects(n,r){return n?n.p1&&n.p2?this.lineIntersects(n):(n instanceof W&&(n=n.reduce()),this.curveintersects(this.reduce(),n,r)):this.selfintersects(r)}lineIntersects(n){const r=Rr(n.p1.x,n.p2.x),i=Rr(n.p1.y,n.p2.y),o=Dr(n.p1.x,n.p2.x),s=Dr(n.p1.y,n.p2.y);return E.roots(this.points,n).filter(a=>{var l=this.get(a);return E.between(l.x,r,o)&&E.between(l.y,i,s)})}selfintersects(n){const r=this.reduce(),i=r.length-2,o=[];for(let s=0,a,l,u;s<i;s++)l=r.slice(s,s+1),u=r.slice(s+2),a=this.curveintersects(l,u,n),o.push(...a);return o}curveintersects(n,r,i){const o=[];n.forEach(function(a){r.forEach(function(l){a.overlaps(l)&&o.push({left:a,right:l})})});let s=[];return o.forEach(function(a){const l=E.pairiteration(a.left,a.right,i);l.length>0&&(s=s.concat(l))}),s}arcs(n){return n=n||.5,this._iterate(n,[])}_error(n,r,i,o){const s=(o-i)/4,a=this.get(i+s),l=this.get(o-s),u=E.dist(n,r),c=E.dist(n,a),f=E.dist(n,l);return re(c-u)+re(f-u)}_iterate(n,r){let i=0,o=1,s;do{s=0,o=1;let a=this.get(i),l,u,c,f,h=!1,d=!1,p,_=o,m=1;do if(d=h,f=c,_=(i+o)/2,l=this.get(_),u=this.get(o),c=E.getccenter(a,l,u),c.interval={start:i,end:o},h=this._error(c,a,i,o)<=n,p=d&&!h,p||(m=o),h){if(o>=1){if(c.interval.end=m=1,f=c,o>1){let g={x:c.x+c.r*wh(c.e),y:c.y+c.r*xh(c.e)};c.e+=E.angle({x:c.x,y:c.y},g,this.get(1))}break}o=o+(o-i)/2}else o=_;while(!p&&s++<100);if(s>=100)break;f=f||c,r.push(f),i=m}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 Ch(e){if(Array.isArray(e))return e}function Mh(e){if(Array.isArray(e))return Mn(e)}function Ah(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ph(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,s,a,l=[],u=!0,c=!1;try{if(s=(r=r.call(e)).next,n!==0)for(;!(u=(i=s.call(r)).done)&&(l.push(i.value),l.length!==n);u=!0);}catch(f){c=!0,o=f}finally{try{if(!u&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}function Th(){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 Eh(){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 Nh(e,n){if(e==null)return{};var r,i,o=zh(e,n);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],n.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function zh(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 Ih(e,n){return Ch(e)||Ph(e,n)||Yi(e,n)||Th()}function Rh(e){return Mh(e)||Ah(e)||Yi(e)||Eh()}function Dh(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 Oh(e){var n=Dh(e,"string");return typeof n=="symbol"?n:n+""}function Yi(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 Fh=(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)}}),s=e.reduce(function(l,u){var c=l,f=u;return o.forEach(function(h,d){var p=h.keyAccessor,_=h.isProp,m;if(_){var v=f,g=v[p],w=Nh(v,[p].map(Oh));m=g,f=w}else m=p(f,d);d+1<o.length?(c.hasOwnProperty(m)||(c[m]={}),c=c[m]):r?(c.hasOwnProperty(m)||(c[m]=[]),c[m].push(f)):c[m]=f}),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(f){return u[f]=r(u[f])}):Object.values(u).forEach(function(f){return l(f,c+1)})})(s);var a=s;return i&&(a=[],(function l(u){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];c.length===o.length?a.push({keys:c,vals:u}):Object.entries(u).forEach(function(f){var h=Ih(f,2),d=h[0],p=h[1];return l(p,[].concat(Rh(c),[d]))})})(s),n instanceof Array&&n.length===0&&a.length===1&&(a[0].keys=[])),a});function jh(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 $h=jh("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function Lh(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 Uh=`.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
|
+
`;Lh(Uh);function An(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 Hh(e){if(Array.isArray(e))return e}function Bh(e){if(Array.isArray(e))return An(e)}function Or(e,n,r){if(Ki())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 _e(e,n,r){return(n=Yh(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Ki(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ki=function(){return!!e})()}function Vh(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Wh(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,s,a,l=[],u=!0,c=!1;try{if(s=(r=r.call(e)).next,n!==0)for(;!(u=(i=s.call(r)).done)&&(l.push(i.value),l.length!==n);u=!0);}catch(f){c=!0,o=f}finally{try{if(!u&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}function qh(){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 Gh(){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 Fr(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 Lt(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?Fr(Object(r),!0).forEach(function(i){_e(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fr(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function de(e,n){return Hh(e)||Wh(e,n)||Zi(e,n)||qh()}function lt(e){return Bh(e)||Vh(e)||Zi(e)||Gh()}function Xh(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 Yh(e){var n=Xh(e,"string");return typeof n=="symbol"?n:n+""}function Pn(e){"@babel/helpers - typeof";return Pn=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},Pn(e)}function Zi(e,n){if(e){if(typeof e=="string")return An(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)?An(e,n):void 0}}var Kh=io($h);function jr(e,n,r){!n||typeof r!="string"||e.filter(function(i){return!i[r]}).forEach(function(i){i[r]=Kh(n(i))})}function Zh(e,n){var r=e.nodes,i=e.links,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=o.nodeFilter,a=s===void 0?function(){return!0}:s,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:!a(p)}}),i.forEach(function(p){var _=p.source,m=p.target,v=y(_),g=y(m);if(!c.hasOwnProperty(v))throw"Missing source node with id: ".concat(v);if(!c.hasOwnProperty(g))throw"Missing target node with id: ".concat(g);var w=c[v],x=c[g];w.out.push(x);function y(b){return Pn(b)==="object"?n(b):b}});var f=[];d(Object.values(c));var h=Object.assign.apply(Object,[{}].concat(lt(Object.entries(c).filter(function(p){var _=de(p,2),m=_[1];return!m.skip}).map(function(p){var _=de(p,2),m=_[0],v=_[1];return _e({},m,v.depth)}))));return h;function d(p){for(var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,v=function(){var y=p[g];if(_.indexOf(y)!==-1){var b=[].concat(lt(_.slice(_.indexOf(y))),[y]).map(function(S){return n(S.data)});return f.some(function(S){return S.length===b.length&&S.every(function(C,M){return C===b[M]})})||(f.push(b),u(b)),1}m>y.depth&&(y.depth=m,d(y.out,[].concat(lt(_),[y]),m+(y.skip?0:1)))},g=0,w=p.length;g<w;g++)v()}}var Qh=2,J=function(n,r){return r.onNeedsRedraw&&r.onNeedsRedraw()},$r=function(n,r){if(!r.isShadow){var i=B(r.linkDirectionalParticles);r.graphData.links.forEach(function(o){var s=Math.round(Math.abs(i(o)));s?o.__photons=lt(Array(s)).map(function(){return{}}):delete o.__photons})}},We=On({props:{graphData:{default:{nodes:[],links:[]},onChange:function(n,r){r.engineRunning=!1,$r(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:J},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1,onChange:J},nodeColor:{default:"color",triggerUpdate:!1,onChange:J},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:J},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:J},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:J},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1,onChange:J},linkColor:{default:"color",triggerUpdate:!1,onChange:J},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:J},linkWidth:{default:1,triggerUpdate:!1,onChange:J},linkCurvature:{default:0,triggerUpdate:!1,onChange:J},linkCanvasObject:{triggerUpdate:!1,onChange:J},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:J},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:J},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:J},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:J},linkDirectionalParticles:{default:0,triggerUpdate:!1,onChange:$r},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&&s(),!n.isShadow&&a(),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),f=B(n.nodeCanvasObjectMode),h=n.ctx,d=n.isShadow/n.globalScale,p=n.graphData.nodes.filter(l);h.save(),p.forEach(function(_){var m=f(_);if(n.nodeCanvasObject&&(m==="before"||m==="replace")&&(n.nodeCanvasObject(_,h,n.globalScale),m==="replace")){h.restore();return}var v=Math.sqrt(Math.max(0,u(_)||1))*n.nodeRelSize+d;h.beginPath(),h.arc(_.x,_.y,v,0,2*Math.PI,!1),h.fillStyle=c(_)||"rgba(31, 120, 180, 0.92)",h.fill(),n.nodeCanvasObject&&m==="after"&&n.nodeCanvasObject(_,n.ctx,n.globalScale)}),h.restore()}function o(){var l=B(n.linkVisibility),u=B(n.linkColor),c=B(n.linkWidth),f=B(n.linkLineDash),h=B(n.linkCurvature),d=B(n.linkCanvasObjectMode),p=n.ctx,_=n.isShadow*2,m=n.graphData.links.filter(l);m.forEach(S);var v=[],g=[],w=m;if(n.linkCanvasObject){var x=[],y=[];m.forEach(function(C){return({before:v,after:g,replace:x}[d(C)]||y).push(C)}),w=[].concat(lt(v),g,y),v=v.concat(x)}p.save(),v.forEach(function(C){return n.linkCanvasObject(C,p,n.globalScale)}),p.restore();var b=Fh(w,[u,c,f]);p.save(),Object.entries(b).forEach(function(C){var M=de(C,2),z=M[0],A=M[1],N=!z||z==="undefined"?"rgba(0,0,0,0.15)":z;Object.entries(A).forEach(function(R){var O=de(R,2),k=O[0],I=O[1],T=(k||1)/n.globalScale+_;Object.entries(I).forEach(function(D){var j=de(D,2);j[0];var $=j[1],L=f($[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=N,p.lineWidth=T,p.setLineDash(L||[]),p.stroke()})})}),p.restore(),p.save(),g.forEach(function(C){return n.linkCanvasObject(C,p,n.globalScale)}),p.restore();function S(C){var M=h(C);if(!M){C.__controlPoints=null;return}var z=C.source,A=C.target;if(!(!z||!A||!z.hasOwnProperty("x")||!A.hasOwnProperty("x"))){var N=Math.sqrt(Math.pow(A.x-z.x,2)+Math.pow(A.y-z.y,2));if(N>0){var R=Math.atan2(A.y-z.y,A.x-z.x),O=N*M,k={x:(z.x+A.x)/2+O*Math.cos(R-Math.PI/2),y:(z.y+A.y)/2+O*Math.sin(R-Math.PI/2)};C.__controlPoints=[k.x,k.y]}else{var I=M*70;C.__controlPoints=[A.x,A.y-I,A.x+I,A.y]}}}}function s(){var l=1.6,u=.2,c=B(n.linkDirectionalArrowLength),f=B(n.linkDirectionalArrowRelPos),h=B(n.linkVisibility),d=B(n.linkDirectionalArrowColor||n.linkColor),p=B(n.nodeVal),_=n.ctx;_.save(),n.graphData.links.filter(h).forEach(function(m){var v=c(m);if(!(!v||v<0)){var g=m.source,w=m.target;if(!(!g||!w||!g.hasOwnProperty("x")||!w.hasOwnProperty("x"))){var x=Math.sqrt(Math.max(0,p(g)||1))*n.nodeRelSize,y=Math.sqrt(Math.max(0,p(w)||1))*n.nodeRelSize,b=Math.min(1,Math.max(0,f(m))),S=d(m)||"rgba(0,0,0,0.28)",C=v/l/2,M=m.__controlPoints&&Or(W,[g.x,g.y].concat(lt(m.__controlPoints),[w.x,w.y])),z=M?function(T){return M.get(T)}:function(T){return{x:g.x+(w.x-g.x)*T||0,y:g.y+(w.y-g.y)*T||0}},A=M?M.length():Math.sqrt(Math.pow(w.x-g.x,2)+Math.pow(w.y-g.y,2)),N=x+v+(A-x-y-v)*b,R=z(N/A),O=z((N-v)/A),k=z((N-v*(1-u))/A),I=Math.atan2(R.y-O.y,R.x-O.x)-Math.PI/2;_.beginPath(),_.moveTo(R.x,R.y),_.lineTo(O.x+C*Math.cos(I),O.y+C*Math.sin(I)),_.lineTo(k.x,k.y),_.lineTo(O.x-C*Math.cos(I),O.y-C*Math.sin(I)),_.fillStyle=S,_.fill()}}}),_.restore()}function a(){var l=B(n.linkDirectionalParticles),u=B(n.linkDirectionalParticleSpeed),c=B(n.linkDirectionalParticleOffset),f=B(n.linkDirectionalParticleWidth),h=B(n.linkVisibility),d=B(n.linkDirectionalParticleColor||n.linkColor),p=n.ctx;p.save(),n.graphData.links.filter(h).forEach(function(_){var m=l(_);if(!(!_.hasOwnProperty("__photons")||!_.__photons.length)){var v=_.source,g=_.target;if(!(!v||!g||!v.hasOwnProperty("x")||!g.hasOwnProperty("x"))){var w=u(_),x=Math.abs(c(_)),y=_.__photons||[],b=Math.max(0,f(_)/2)/Math.sqrt(n.globalScale),S=d(_)||"rgba(0,0,0,0.28)";p.fillStyle=S;var C=_.__controlPoints?Or(W,[v.x,v.y].concat(lt(_.__controlPoints),[g.x,g.y])):null,M=0,z=!1;y.forEach(function(A){var N=!!A.__singleHop;if(A.hasOwnProperty("__progressRatio")||(A.__progressRatio=N?0:(M+x)/m),!N&&M++,A.__progressRatio+=w,A.__progressRatio>=1)if(!N)A.__progressRatio=A.__progressRatio%1;else{z=!0;return}var R=A.__progressRatio,O=C?C.get(R):{x:v.x+(g.x-v.x)*R||0,y:v.y+(g.y-v.y)*R||0};n.linkDirectionalParticleCanvasObject?n.linkDirectionalParticleCanvasObject(O.x,O.y,_,p,n.globalScale):(p.beginPath(),p.arc(O.x,O.y,b,0,2*Math.PI,!1),p.fill())}),z&&(_.__photons=_.__photons.filter(function(A){return!A.__singleHop||A.__progressRatio<=1}))}}}),p.restore()}},emitParticle:function(n,r){return r&&(!r.__photons&&(r.__photons=[]),r.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:gh().force("link",ah()).force("charge",_h()).force("center",uc()).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&&jr(n.graphData.nodes,B(n.nodeAutoColorBy),n.nodeColor),n.linkAutoColorBy!==null&&jr(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&&Zh(n.graphData,function(d){return d[n.nodeId]},{nodeFilter:n.dagNodeFilter,onLoopError:n.onDagError||void 0}),s=Math.max.apply(Math,lt(Object.values(o||[]))),a=n.dagLevelDistance||n.graphData.nodes.length/(s||1)*Qh*(["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]]-s/2)*a*(u?-1:1)},f=["lr","rl"].includes(n.dagMode)?"fx":"fy";n.graphData.nodes.filter(n.dagNodeFilter).forEach(function(d){return d[f]=c(d)})}n.forceLayout.force("dagRadial",["radialin","radialout"].indexOf(n.dagMode)!==-1?vh(function(d){var p=o[d[n.nodeId]]||-1;return(n.dagMode==="radialin"?s-p:p)*a}).strength(function(d){return n.dagNodeFilter(d)?1:0}):null);for(var h=0;h<n.warmupTicks&&!(n.d3AlphaMin>0&&n.forceLayout.alpha()<n.d3AlphaMin);h++)n.forceLayout.tick();this.resetCountdown(),n.onFinishUpdate()}});function Qi(e,n){var r=e instanceof Array?e:[e],i=new n;return i._destructor&&i._destructor(),{linkProp:function(s){return{default:i[s](),onChange:function(l,u){r.forEach(function(c){return u[c][s](l)})},triggerUpdate:!1}},linkMethod:function(s){return function(a){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c<l;c++)u[c-1]=arguments[c];var f=[];return r.forEach(function(h){var d=a[h],p=d[s].apply(d,u);p!==d&&f.push(p)}),f.length?f[0]:this}}}}var Jh=800,tf=4,ef=5,Ji=Qi("forceGraph",We),nf=Qi(["forceGraph","shadowGraph"],We),rf=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 _e({},e,Ji.linkProp(e))})).concat(lt(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map(function(e){return _e({},e,nf.linkProp(e))})))),of=Object.assign.apply(Object,lt(["d3Force","d3ReheatSimulation","emitParticle"].map(function(e){return _e({},e,Ji.linkMethod(e))})));function ln(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(s){s.style.width="".concat(e.width,"px"),s.style.height="".concat(e.height,"px"),s.width=e.width*i,s.height=e.height*i,!n&&!r&&s.getContext("2d").scale(i,i)});var o=gt(e.canvas).k;e.zoom.translateBy(e.zoom.__baseElem,(e.width-n)/2/o,(e.height-r)/2/o),e.needsRedraw=!0}}function to(e){var n=window.devicePixelRatio;e.setTransform(n,0,0,n,0,0)}function Lr(e,n,r){e.save(),to(e),e.clearRect(0,0,n,r),e.restore()}var sf=On({props:Lt({width:{default:window.innerWidth,onChange:function(n,r){return ln(r)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(n,r){return ln(r)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(n,r){[n.nodes,n.links].every(function(o){return(o||[]).every(function(s){return!s.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 s=o.type,a=o.objs;a.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:s,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,s){return n(i,i.__indexColor,o,s)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(n,r){r.shadowGraph.linkCanvasObject(n?function(i,o,s){return n(i,i.__indexColor,o,s)}: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}},rf),aliases:{stopAnimation:"pauseAnimation"},methods:Lt({graph2ScreenCoords:function(n,r,i){var o=gt(n.canvas);return{x:r*o.k+o.x,y:i*o.k+o.y}},screen2GraphCoords:function(n,r,i){var o=gt(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 s=Object.assign({},r!==void 0?{x:r}:{},i!==void 0?{y:i}:{});return o?n.tweenGroup.add(new cr(a()).to(s,o).easing(Ft.Quadratic.Out).onUpdate(l).start()):l(s),this}return a();function a(){var u=gt(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,f=u.y;n.zoom.translateTo(n.zoom.__baseElem,c===void 0?a().x:c,f===void 0?a().y:f),n.needsRedraw=!0}},zoom:function(n,r,i){if(!n.canvas)return null;if(r!==void 0)return i?n.tweenGroup.add(new cr({k:o()}).to({k:r},i).easing(Ft.Quadratic.Out).onUpdate(function(a){var l=a.k;return s(l)}).start()):s(r),this;return o();function o(){return gt(n.canvas).k}function s(a){n.zoom.scaleTo(n.zoom.__baseElem,a),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,s=new Array(o>3?o-3:0),a=3;a<o;a++)s[a-3]=arguments[a];var l=this.getGraphBbox.apply(this,s);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},s=n.graphData.nodes.filter(r).map(function(a){return{x:a.x,y:a.y,r:o(a)}});return s.length?{x:[Kn(s,function(a){return a.x-a.r}),Zn(s,function(a){return a.x+a.r})],y:[Kn(s,function(a){return a.y-a.r}),Zn(s,function(a){return a.y+a.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:[]})}},of),stateInit:function(){return{lastSetZoom:1,zoom:bl(),forceGraph:new We,shadowGraph:new We().cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new Lu,tweenGroup:new Si}},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 s=r.canvas.getContext("2d"),a=r.shadowCanvas.getContext("2d",{willReadFrequently:!0}),l={x:-1e12,y:-1e12},u=function(){var h=null,d=window.devicePixelRatio,p=l.x>0&&l.y>0?a.getImageData(l.x*d,l.y*d,1,1):null;return p&&(h=r.colorTracker.lookup(p.data)),h};at(r.canvas).call(na().subject(function(){if(!r.enableNodeDrag)return null;var f=u();return f&&f.type==="Node"?f.d:null}).on("start",function(f){var h=f.subject;h.__initialDragPos={x:h.x,y:h.y,fx:h.fx,fy:h.fy},f.active||(h.fx=h.x,h.fy=h.y),r.canvas.classList.add("grabbable")}).on("drag",function(f){var h=f.subject,d=h.__initialDragPos,p=f,_=gt(r.canvas).k,m={x:d.x+(p.x-d.x)/_-h.x,y:d.y+(p.y-d.y)/_-h.y};["x","y"].forEach(function(v){return h["f".concat(v)]=h[v]=d[v]+(p[v]-d[v])/_}),!(!h.__dragged&&ef>=Math.sqrt(oo(["x","y"].map(function(v){return Math.pow(f[v]-d[v],2)}))))&&(r.forceGraph.d3AlphaTarget(.3).resetCountdown(),r.isPointerDragging=!0,h.__dragged=!0,r.onNodeDrag(h,m))}).on("end",function(f){var h=f.subject,d=h.__initialDragPos,p={x:h.x-d.x,y:h.y-d.y};d.fx===void 0&&(h.fx=void 0),d.fy===void 0&&(h.fy=void 0),delete h.__initialDragPos,r.forceGraph.d3AlphaTarget()&&r.forceGraph.d3AlphaTarget(0).resetCountdown(),r.canvas.classList.remove("grabbable"),r.isPointerDragging=!1,h.__dragged&&(delete h.__dragged,r.onNodeDragEnd(h,p))})),r.zoom(r.zoom.__baseElem=at(r.canvas)),r.zoom.__baseElem.on("dblclick.zoom",null),r.zoom.filter(function(f){return!f.button&&r.enableZoomPanInteraction&&(f.type!=="wheel"||B(r.enableZoomInteraction)(f))&&(f.type==="wheel"||B(r.enablePanInteraction)(f))}).on("zoom",function(f){var h=f.transform;[s,a].forEach(function(d){to(d),d.translate(h.x,h.y),d.scale(h.k,h.k)}),r.isPointerDragging=!0,r.onZoom&&r.onZoom(Lt(Lt({},h),i.centerAt())),r.needsRedraw=!0}).on("end",function(f){r.isPointerDragging=!1,r.onZoomEnd&&r.onZoomEnd(Lt(Lt({},f.transform),i.centerAt()))}),ln(r),r.forceGraph.onNeedsRedraw(function(){return r.needsRedraw=!0}).onFinishUpdate(function(){gt(r.canvas).k===r.lastSetZoom&&r.graphData.nodes.length&&(r.zoom.scaleTo(r.zoom.__baseElem,r.lastSetZoom=tf/Math.cbrt(r.graphData.nodes.length)),r.needsRedraw=!0)}),r.tooltip=new lc(o),["pointermove","pointerdown"].forEach(function(f){return o.addEventListener(f,function(h){f==="pointerdown"&&(r.isPointerPressed=!0,r.pointerDownEvent=h),!r.isPointerDragging&&h.type==="pointermove"&&r.onBackgroundClick&&(h.pressure>0||r.isPointerPressed)&&(h.pointerType==="mouse"||h.movementX===void 0||[h.movementX,h.movementY].some(function(_){return Math.abs(_)>1}))&&(r.isPointerDragging=!0);var d=p(o);l.x=h.pageX-d.left,l.y=h.pageY-d.top;function p(_){var m=_.getBoundingClientRect(),v=window.pageXOffset||document.documentElement.scrollLeft,g=window.pageYOffset||document.documentElement.scrollTop;return{top:m.top+g,left:m.left+v}}},{passive:!0})}),o.addEventListener("pointerup",function(f){if(r.isPointerPressed){if(r.isPointerPressed=!1,r.isPointerDragging){r.isPointerDragging=!1;return}var h=[f,r.pointerDownEvent];requestAnimationFrame(function(){if(f.button===0)if(r.hoverObj){var d=r["on".concat(r.hoverObj.type,"Click")];d&&d.apply(void 0,[r.hoverObj.d].concat(h))}else r.onBackgroundClick&&r.onBackgroundClick.apply(r,h);if(f.button===2)if(r.hoverObj){var p=r["on".concat(r.hoverObj.type,"RightClick")];p&&p.apply(void 0,[r.hoverObj.d].concat(h))}else r.onBackgroundRightClick&&r.onBackgroundRightClick.apply(r,h)})}},{passive:!0}),o.addEventListener("contextmenu",function(f){return!r.onBackgroundRightClick&&!r.onNodeRightClick&&!r.onLinkRightClick?!0:(f.preventDefault(),!1)}),r.forceGraph(s),r.shadowGraph(a);var c=Gl(function(){Lr(a,r.width,r.height),r.shadowGraph.linkWidth(function(h){return B(r.linkWidth)(h)+r.linkHoverPrecision});var f=gt(r.canvas);r.shadowGraph.globalScale(f.k).tickFrame()},Jh);r.flushShadowCanvas=c.flush,(this._animationCycle=function f(){var h=!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,m=d?d.type:null;if(_&&_!==m){var v=r["on".concat(_,"Hover")];v&&v(null,p.d)}if(m){var g=r["on".concat(m,"Hover")];g&&g(d.d,_===m?p.d:null)}r.tooltip.content(d&&B(r["".concat(d.type.toLowerCase(),"Label")])(d.d)||null),r.canvas.classList[(d&&r["on".concat(m,"Click")]||!d&&r.onBackgroundClick)&&B(r.showPointerCursor)(d==null?void 0:d.d)?"add":"remove"]("clickable"),r.hoverObj=d}h&&c()}if(h){Lr(s,r.width,r.height);var w=gt(r.canvas).k;r.onRenderFramePre&&r.onRenderFramePre(s,w),r.forceGraph.globalScale(w).tickFrame(),r.onRenderFramePost&&r.onRenderFramePost(s,w)}r.tweenGroup.update(),r.animationFrameRequestId=requestAnimationFrame(f)})()},update:function(n){}}),af=["https://guardiankg.org/vocab/","https://umanitek.ai/dkg/vocab/","http://umanitek.ai/dkg/vocab/","https://schema.org/","http://schema.org/"];function un(e,n){var r;for(const i of af){const o=(r=e.properties)==null?void 0:r.get(i+n);if(o&&o.length>0)return o[0].value}return null}function lf(e,n){var r;for(const i of n.nodes.values())i.clearView();if(e.focal){const i=uf(n,e.focal.uri);i&&(i.setViewDecoration("sizeMultiplier",e.focal.sizeMultiplier??1.5),e.focal.image&&i.setViewDecoration("imageUrl",e.focal.image))}if(e.platformIcons)for(const i of n.nodes.values()){if(i.imageUrl||!i.types.some(s=>s.includes("SocialMediaPosting")))continue;const o=n.getEdgesFrom(i.id).filter(s=>s.predicate.includes("platform"));for(const s of o){const a=s.target.split("/").pop()??"";if(e.platformIcons.icons[a]){i.setViewDecoration("imageUrl",e.platformIcons.icons[a]);break}}if(!i.imageUrl&&e.platformIcons.urlFallbacks){for(const[s,a]of Object.entries(e.platformIcons.urlFallbacks))if(i.id.includes(s)&&e.platformIcons.icons[a]){i.setViewDecoration("imageUrl",e.platformIcons.icons[a]);break}}}if(e.highlight){const i=e.highlight,o=[],s=i.invert===!0;for(const[u,c]of n.nodes){let f=null;if(i.source==="linked"&&i.linkedVia){const h=n.getEdgesFrom(u).filter(d=>d.predicate.includes(i.linkedVia));if(h.length>0){const d=n.nodes.get(h[0].target);if(d){const p=un(d,i.property);p!==null&&(f=parseFloat(p))}}}else{const h=un(c,i.property);h!==null&&(f=parseFloat(h))}if(f!==null&&!isNaN(f)){const h=i.threshold;let d,p=!1;if(f<0){const _=Math.abs(f);c.setViewDecoration("riskScore",_),d=_,p=s?_<=h&&_>0:_>=h}else c.setViewDecoration("riskScore",f),s?(p=f<=h,d=p?h-f:0):(p=f>=h,d=f);p&&o.push({id:u,score:d})}}const a=i.topN??100;o.sort((u,c)=>c.score-u.score);const l=o.slice(0,a);if(l.length>0){const u=i.sizeMin??1,c=i.sizeMax??i.sizeMultiplier??3,f=l[0].score,h=l[l.length-1].score;for(const{id:d,score:p}of l){const _=n.nodes.get(d);if(!_||(_.setViewDecoration("isHighRisk",!0),_.sizeMultiplier))continue;let m;if(Math.abs(f-h)>0){const g=Math.log1p(Math.min(f,h)),x=Math.log1p(Math.max(f,h))-g,y=Math.log1p(p);m=x>0?(y-g)/x:.5}else m=1;_.setViewDecoration("sizeMultiplier",u+m*(c-u))}}}if(e.sizeBy){const i=e.sizeBy,o=[];for(const[s,a]of n.nodes){if(a.sizeMultiplier)continue;const l=un(a,i.property);if(l!==null){const u=parseFloat(l);!isNaN(u)&&u>0&&o.push({id:s,value:u})}}if(o.length>0){const s=Math.max(...o.map(l=>l.value)),a=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 f;if(i.scale==="log"){const h=Math.log1p(a),p=Math.log1p(s)-h;f=p>0?(Math.log1p(u)-h)/p:.5}else{const h=s-a;f=h>0?(u-a)/h:.5}c.setViewDecoration("sizeMultiplier",.5+f*2.5)}}}if(e.nodeTypes){for(const i of n.nodes.values())if(!i.imageUrl)for(const o of i.types){const s=((r=o.split("/").pop())==null?void 0:r.split("#").pop())??"",a=e.nodeTypes[o]||e.nodeTypes[`schema:${s}`]||e.nodeTypes[`vocab:${s}`]||e.nodeTypes[s];if(a!=null&&a.icon){i.setViewDecoration("imageUrl",a.icon);break}}}}function uf(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 s of o){const a=e.nodes.get(s+i);if(a)return a}return null}var qe={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"]},cf={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"]},hf={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"]},ff={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"]},df={dark:qe,midnight:cf,cyberpunk:hf,light:ff};function pf(e,n){let r;return e?typeof e=="string"?r=df[e]??qe:r=e:r=qe,n?{...r,...n,name:n.name??r.name}:r}function gf(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 Ut={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"]},_f=["https://schema.org/name","http://schema.org/name","http://xmlns.com/foaf/0.1/name","http://www.w3.org/2000/01/rdf-schema#label"],Ur=["https://umanitek.ai/dkg/vocab/DataSource","http://umanitek.ai/dkg/vocab/DataSource","https://guardiankg.org/vocab/DataSource","http://www.w3.org/ns/prov#Agent"],vf=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,Ut.contentHash),r.generatedAt=this._findMetadataValue(e,Ut.generatedAtTime);const i=this._findMetadataValue(e,Ut.wasGeneratedBy);if(i){r.generatedBy=i;const f=n.nodes.get(i);f?r.generatedByName=this._resolveName(f)??void 0:r.generatedByName=i.split("/").pop()??i}const o=new Set,s=[],a=n.getEdgesFrom(e.id);for(const f of a)if(Ut.wasDerivedFrom.some(h=>f.predicate===h)){const h=n.nodes.get(f.target);if(h&&h.types.some(p=>Ur.includes(p))&&!o.has(f.target)){o.add(f.target);const p=this._resolveName(h)??f.target.split("/").pop()??f.target;s.push(p)}}for(const f of Ut.wasDerivedFrom){const h=(l=e.metadata)==null?void 0:l.get(f);if(h)for(const d of h){const p=d.value;if(o.has(p))continue;const _=n.nodes.get(p);if(_&&_.types.some(v=>Ur.includes(v))){o.add(p);const v=this._resolveName(_)??p.split("/").pop()??p;s.push(v)}}}for(const f of Ut.dataSource){const h=((u=e.properties)==null?void 0:u.get(f))??((c=e.metadata)==null?void 0:c.get(f));if(h)for(const d of h){const p=d.value;if(o.has(p))continue;o.add(p);const _=n.nodes.get(p),m=_?this._resolveName(_)??p.split("/").pop()??p:p.split("/").pop()??p;s.push(m)}}return r.sources=[...o],r.sourceNames=s,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 _f){const i=(n=e.properties)==null?void 0:n.get(r);if(i&&i.length>0)return i[0].value}return null}},yf=["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#"],Hr=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 s=this._extractDate(o);s&&(this._nodeDates.set(i,s),(!n||s<n)&&(n=s),(!r||s>r)&&(r=s))}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,s=[];for(let a=0;a<e;a++)s.push({date:new Date(n.getTime()+a*o),count:0});for(const a of this._nodeDates.values()){const l=Math.min(Math.floor((a.getTime()-n.getTime())/o),e-1);s[l].count++}return s}_extractDate(e){var r;let n=null;for(const i of this._dateProperties)for(const o of yf){const s=(r=e.properties)==null?void 0:r.get(o+i);if(s&&s.length>0){const a=new Date(s[0].value);isNaN(a.getTime())||(!n||a<n)&&(n=a)}}return n}},mf=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,s=e.height,a=o/r.length;n.clearRect(0,0,o,s);for(let l=0;l<r.length;l++){const c=r[l].count/i*(s-2);n.fillStyle="rgba(99, 102, 241, 0.25)",n.fillRect(l*a,s-c,a-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)}},ve,Rt,Vt,Wt,Qr,bf=(Qr=class{constructor(e){P(this,"types",[]);P(this,"label");P(this,"properties",new Map);P(this,"metadata",new Map);P(this,"degree",0);P(this,"isBoundary",!1);P(this,"provenance");Yt(this,ve,{imageUrl:null});Yt(this,Rt,{});Yt(this,Vt,{});Yt(this,Wt,{});this.id=e,this.label=e}effective(e){const n=ht(this,Wt)[e];if(n!==void 0)return n;const r=ht(this,Vt)[e];if(r!==void 0)return r;const i=ht(this,Rt)[e];return i===void 0?ht(this,ve)[e]:i}setSourceImage(e){ht(this,ve).imageUrl=e}clearView(){we(this,Vt,{})}setViewDecoration(e,n){ht(this,Vt)[e]=n}highlight(){we(this,Wt,{isHighRisk:!0,sizeMultiplier:Math.max(this.sizeMultiplier??1,2)})}clearHighlight(){we(this,Wt,{})}get imageUrl(){return this.effective("imageUrl")}set imageUrl(e){ht(this,Rt).imageUrl=e}get riskScore(){return this.effective("riskScore")}set riskScore(e){ht(this,Rt).riskScore=e}get isHighRisk(){return this.effective("isHighRisk")}set isHighRisk(e){ht(this,Rt).isHighRisk=e}get sizeMultiplier(){return this.effective("sizeMultiplier")}set sizeMultiplier(e){ht(this,Rt).sizeMultiplier=e}},ve=new WeakMap,Rt=new WeakMap,Vt=new WeakMap,Wt=new WeakMap,Qr),Br="http://www.w3.org/1999/02/22-rdf-syntax-ns#type";function Vr(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 Ht(e){const n=e.trim();return n.startsWith("<")&&n.endsWith(">")?n.slice(1,-1):n}function Wr(e,n,r){return`${e}\0${n}\0${r}`}var wf=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=new bf(e),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=Ht(e.subject),r=Ht(e.predicate),i=Vr(e.object),o=i?Ht(e.object):e.object;this._triples.push({...e,subject:n,predicate:r,object:o});const s=this.ensureNode(n);if(r===Br){s.types.includes(o)||s.types.push(o);return}if(i){if(this._metadataPredicates.has(r)){const u={value:o,datatype:e.datatype,language:e.language},c=s.metadata.get(r);c?c.push(u):s.metadata.set(r,[u]);return}const a=this.ensureNode(o),l=Wr(n,r,o);if(this.edges.has(l)||(this.edges.set(l,{id:l,source:n,target:o,predicate:r,label:r}),s.degree++,a.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 a={value:e.object,datatype:e.datatype,language:e.language};if(this._metadataPredicates.has(r)){const l=s.metadata.get(r);l?l.push(a):s.metadata.set(r,[a])}else{const l=s.properties.get(r);l?l.push(a):s.properties.set(r,[a])}}}addTriples(e){const n=new Set(this.nodes.keys()),r=new Set(this.edges.keys());for(const a of e)this.addTriple(a);const i=[],o=[],s=new Set;for(const a of this.nodes.keys())n.has(a)?s.add(a):i.push(a);for(const a of this.edges.keys())r.has(a)||o.push(a);return{addedNodes:i,removedNodes:[],addedEdges:o,removedEdges:[],modifiedNodes:[...s]}}removeTriples(e){var o,s;const n=[],r=new Set;for(const a of e){const l=Ht(a.subject),u=Ht(a.predicate),c=Vr(a.object),f=c?Ht(a.object):a.object,h=this._triples.findIndex(d=>d.subject===l&&d.predicate===u&&d.object===f);if(h!==-1&&this._triples.splice(h,1),u===Br){const d=this.nodes.get(l);d&&(d.types=d.types.filter(p=>p!==f),r.add(l));continue}if(c&&!this._metadataPredicates.has(u)){const d=Wr(l,u,f);if(this.edges.has(d)){this.edges.delete(d),n.push(d),(o=this._outEdges.get(l))==null||o.delete(d),(s=this._inEdges.get(f))==null||s.delete(d);const p=this.nodes.get(l),_=this.nodes.get(f);p&&p.degree--,_&&_.degree--,r.add(l),r.add(f)}}else{const d=this.nodes.get(l);if(d){const p=this._metadataPredicates.has(u)?d.metadata:d.properties,_=p.get(u);if(_){const m=_.filter(v=>v.value!==f);m.length===0?p.delete(u):p.set(u,m),r.add(l)}}}}const i=[];for(const[a,l]of this.nodes)l.degree===0&&l.types.length===0&&l.properties.size===0&&l.metadata.size===0&&(this.nodes.delete(a),this._outEdges.delete(a),this._inEdges.delete(a),i.push(a));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 s=this.edges.get(o);s&&n.add(s.target)}const i=this._inEdges.get(e);if(i)for(const o of i){const s=this.edges.get(o);s&&n.add(s.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}},xf={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#"},ue=class{constructor(e){P(this,"_prefixes");P(this,"_reverse");this._prefixes=new Map,this._reverse=new Map;for(const[n,r]of Object.entries(xf))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),s=o.lastIndexOf("/");if(s!==-1)return o.slice(s+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}},kf=["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"],Sf=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)??kf}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)??ue.localName(e):qr(ue.localName(e))}resolveTypeLabel(e){return this._mode==="strict"?this._prefixManager.compact(e)??ue.localName(e):qr(ue.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 qr(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 Cf={"https://schema.org/":"#8b5cf6","http://www.w3.org/ns/prov#":"#3b82f6","http://xmlns.com/foaf/0.1/":"#10b981","http://purl.org/dc/terms/":"#f59e0b"},Mf=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??qe,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 s=this._prefixManager.getNamespace(i)??i;if(r.startsWith(s))return o}for(const[i,o]of Object.entries(Cf))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 Gr(e,.3)}getGradientCenter(e){return Gr(e,this._config.gradientIntensity)}};function Gr(e,n){const r=Af(e);if(!r)return e;const i=Math.round(r.r+(255-r.r)*n),o=Math.round(r.g+(255-r.g)*n),s=Math.round(r.b+(255-r.b)*n);return`#${((1<<24)+(i<<16)+(o<<8)+s).toString(16).slice(1)}`}function Af(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 Pf={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:[]},Ae=new Map,Tf=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={...Pf,...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 a=e.degree/this._maxDegree,l=this._config.maxSize*.6-this._config.minSize*.7;return this._config.minSize*.7+a*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,s=this._config.minSize+i*o;return Math.max(s,r)*n}paint(e,n,r,i,o,s=1){var _,m;if(this.isCircleNode(n))return this.paintCircle(e,n,r,i,o);const l=this.getRadius(n)*s,u=this._styleEngine.getNodeColor(n),c=this._styleEngine.palette,f=this._styleEngine.config;if(e.save(),s>1.03&&n.isHighRisk){const v=l*1.25,g=(s-1)*2.5;e.beginPath();for(let w=0;w<6;w++){const x=Math.PI/3*w,y=r+v*Math.cos(x),b=i+v*Math.sin(x);w===0?e.moveTo(y,b):e.lineTo(y,b)}e.closePath(),e.fillStyle=`rgba(220, 50, 50, ${Math.min(.4,g)})`,e.fill()}e.beginPath();for(let v=0;v<6;v++){const g=Math.PI/3*v,w=r+l*Math.cos(g),x=i+l*Math.sin(g);v===0?e.moveTo(w,x):e.lineTo(w,x)}if(e.closePath(),f.gradient){const v=e.createRadialGradient(r,i,0,r,i,l);v.addColorStop(0,this._styleEngine.getGradientCenter(u)),v.addColorStop(1,u),e.fillStyle=v}else e.fillStyle=u;e.fill();const h=((m=(_=n.provenance)==null?void 0:_.sources)==null?void 0:m.length)??0;if(h>=2&&this._trustStyle==="glow"&&(e.shadowColor=c.info,e.shadowBlur=Math.min(12,h*3)/o,e.fill(),e.shadowBlur=0,e.shadowColor="transparent"),n.riskScore&&n.riskScore>0){const v=Math.min(1,n.riskScore);e.strokeStyle=`rgba(220, 50, 50, ${.5+v*.5})`,e.lineWidth=(f.borderWidth+(n.isHighRisk?1.5:.5))/o}else h>=2&&this._trustStyle==="border"?(e.strokeStyle=c.info,e.lineWidth=(f.borderWidth+Math.min(3,h))/o):(e.strokeStyle=this._styleEngine.getBorderColor(u),e.lineWidth=f.borderWidth/o);n.isBoundary&&!(n.riskScore&&n.riskScore>0)&&(e.strokeStyle=Nf(u,.5),e.lineWidth=(f.borderWidth+1)/o),e.stroke(),e.setLineDash([]),h<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 v=Math.min(1,(o-d)/(p-d)),g=f.fontSize/o;e.font=`${g}px ${f.fontFamily}`,e.textAlign="center",e.textBaseline="top",e.globalAlpha=v,e.fillStyle=c.textPrimary,e.fillText(Ef(n.label,24),r,i+l+2/o),e.globalAlpha=1}return e.restore(),l}_paintBadges(e,n,r,i,o,s){if(!this._showBadges)return;const a=n.provenance;if(!a)return;const l=this._styleEngine.palette,u=Math.max(4,8/s);if(a.sources.length>0){const c=r+o*.7,f=i+o*.6,h=a.sources.length;e.beginPath(),e.arc(c,f,u,0,2*Math.PI);const d=Math.min(1,h/3);e.fillStyle=h>=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(h),c,f))}if(a.contentHash||a.blockchainAnchor){const c=r+o*.7,f=i-o*.6;e.beginPath(),e.arc(c,f,u,0,2*Math.PI),e.fillStyle=a.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 h=u*.5;e.moveTo(c-h*.5,f),e.lineTo(c-h*.1,f+h*.4),e.lineTo(c+h*.5,f-h*.3),e.stroke()}e.globalAlpha=1}paintCircle(e,n,r,i,o){const s=this.getRadius(n),a=this._styleEngine.getNodeColor(n);return e.beginPath(),e.arc(r,i,s,0,2*Math.PI),e.fillStyle=a,e.fill(),s}paintAvatar(e,n,r,i,o){let s=Ae.get(n);if(s===void 0){const d=new Image;n.startsWith("data:")||(d.crossOrigin="anonymous"),Ae.set(n,null),d.src=n,d.onload=()=>{var p;Ae.set(n,d),(p=this._onImageLoad)==null||p.call(this)},d.onerror=()=>{Ae.delete(n)};return}if(!s)return;e.save(),e.beginPath();for(let d=0;d<6;d++){const p=Math.PI/3*d,_=r+o*Math.cos(p),m=i+o*Math.sin(p);d===0?e.moveTo(_,m):e.lineTo(_,m)}e.closePath(),e.clip();const a=s.naturalWidth/s.naturalHeight,u=n.startsWith("data:")?.5:1;let c,f;const h=o*2*u;a>1?(f=h,c=h*a):(c=h,f=h/a),e.globalAlpha=.95,e.drawImage(s,r-c/2,i-f/2,c,f),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 s=o[0].value;if(s.startsWith("http://")||s.startsWith("https://"))return s}}if(r){const i=r(e.id);for(const o of this._config.imagePredicates)for(const s of i){if(s.predicate!==o)continue;const a=n(s.target);if(!a)continue;const l=a.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=a.properties.get(u);if(c&&c.length>0){const f=c[0].value;if(f.startsWith("http://")||f.startsWith("https://"))return f}}}}return null}};function Ef(e,n){if(e.length<=n)return e;if(e.includes("/")){const i=e.split("/"),o=i[0],s=i[i.length-1],a=`${o}/…/${s}`;if(i.length>=3&&a.length<=n)return a;if(s.length<=n-2)return`…/${s}`}const r=/^(#\d+)\s+(.+)$/.exec(e);if(r){const i=r[1],o=r[2],s=n-i.length-2;if(s>4)return`${i} ${o.slice(0,s)}…`}return e.slice(0,n-1)+"…"}function Nf(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),s=Math.round(parseInt(r[3],16)+(255-parseInt(r[3],16))*n);return`#${((1<<24)+(i<<16)+(o<<8)+s).toString(16).slice(1)}`}var zf={focalNode:null,hops:2,maxNodes:200,expandOnClick:!0},Xr=class{constructor(e){P(this,"_config");P(this,"_visibleNodes",new Set);P(this,"_focalNode",null);P(this,"_enabled",!1);this._config={...zf,...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>0&&this._focalNode&&!e.nodes.has(this._focalNode)&&(this._focalNode=null),e.nodes.size<=this._config.maxNodes){this._enabled=!1,this._visibleNodes.clear();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 s=e.getNeighborIds(o.id);for(const a of s){if(this._visibleNodes.size>=this._config.maxNodes)break;this._visibleNodes.has(a)||(this._visibleNodes.add(a),n.push({id:a,depth:o.depth+1}))}}const r=new Map,i=new Map;for(const o of this._visibleNodes){const s=e.getNode(o);if(s){const a=e.getNeighborIds(o);s.isBoundary=!1;for(const l of a)if(!this._visibleNodes.has(l)){s.isBoundary=!0;break}r.set(o,s)}}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)}},If={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"},Yr={enabled:!1,patterns:[If]},Rf=class{constructor(e){P(this,"_config");this._config={enabled:(e==null?void 0:e.enabled)??Yr.enabled,patterns:(e==null?void 0:e.patterns)??Yr.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 s=i.annotations.map(u=>({predicate:u.predicate,value:u.value,datatype:u.datatype})),a=o.properties.get(i.reifiedPredicate);if(a){for(const u of a)if(i.reifiedObject&&u.value===i.reifiedObject){u.annotations=[...u.annotations??[],...s];break}a.length>0&&!a.some(u=>{var c;return(c=u.annotations)==null?void 0:c.length})&&(a[0].annotations=[...a[0].annotations??[],...s])}const l=o.metadata.get(i.reifiedPredicate);l&&l.length>0&&(l[0].annotations=[...l[0].annotations??[],...s])}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:[]},s=e.getEdgesFrom(i.id);for(const l of s)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 a=new Set([r.subjectPredicate,r.predicatePredicate,r.objectPredicate]);for(const[l,u]of i.properties)if(!a.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}},Df=["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"],Of=class{constructor(e){P(this,"_predicates");this._predicates=new Set([...Df,...(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)}},Ff=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()}},Kr=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 a;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=sf()(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 f=l;if(!f._graphNode)return;const h=f.x??0,d=f.y??0;if(this._fadeInEnabled&&this._loadTime>0){const _=performance.now()-this._loadTime;if(_<this._fadeInDuration){const m=_/this._fadeInDuration,v=1-Math.pow(1-m,3);u.globalAlpha=v}}let p=1;if(this._riskPulseEnabled&&f._graphNode.isHighRisk){const _=performance.now()/1e3,m=cn(f._graphNode.id);p=1+.15*Math.sin(_*1.25+m)}this._hexPainter.paint(u,f._graphNode,h,d,c,p),u.globalAlpha=1}).nodePointerAreaPaint((l,u,c)=>{const f=l;if(!f._graphNode)return;const d=this._hexPainter.getRadius(f._graphNode)+6,p=f.x??0,_=f.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 f=l;if(!f._graphEdge)return;const h=f._graphEdge.label;if(!h)return;const d=.3,_=Math.min(1,(c-d)/(.8-d)),m=12/c,v=f.source,g=f.target;if(!v.x||!g.x)return;const w=(v.x+g.x)/2,x=(v.y+g.y)/2;u.save(),u.globalAlpha=_,u.font=`${m}px ${e.fontFamily}`,u.textAlign="center",u.textBaseline="middle";const y=u.measureText(h).width,b=2/c;u.fillStyle="rgba(15, 23, 42, 0.75)",u.beginPath(),u.roundRect(w-y/2-b,x-m/2-b,y+b*2,m+b*2,2/c),u.fill(),u.fillStyle="#94a3b8",u.fillText(h,w,x),u.restore()}).onRenderFramePre((l,u)=>{this._drawKaBoundaries(l)}).onNodeClick(l=>{const u=l;u._graphNode&&this._events.emit("node:click",u._graphNode)}).nodePointerAreaPaint((l,u,c)=>{!l._graphNode||l.x===void 0||l.y===void 0||(c.fillStyle=u,c.beginPath(),c.arc(l.x,l.y,this._hexPainter.getRadius(l._graphNode),0,Math.PI*2),c.fill())}).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),(a=i.distanceMax)==null||a.call(i,1e3));const o=this._graph.d3Force("link");o!=null&&o.distance&&o.distance(80).strength(.2);const s=this._graph.d3Force("center");s!=null&&s.strength&&s.strength(.03)}render(e,n,r){var v;this._graph||this.init();let i=0;const o=[...e.keys()].sort();for(const g of o)i=i*31+cn(g)|0;const s=[];for(const g of n.values())s.push(`${g.source}\0${g.target}`);s.sort();for(const g of s)i=i*31+cn(g)|0;const a=String(i);a!==this._lastTopologyKey&&(this._lastTopologyKey=a,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 y=(v=w.properties)==null?void 0:v.get(x);if(y&&y.length>0){const b=new Date(y[0].value);if(!isNaN(b.getTime())){c.set(g,b.getTime());break}}}let f=null;if(c.size>=2){const g=[...c.values()],w=Math.min(...g),y=Math.max(...g)-w||1,b=Math.max(400,c.size*120);f=new Map;for(const[S,C]of c)f.set(S,((C-w)/y-.5)*b)}const h=new Map;for(const[g,w]of e){if(r!=null&&r.has(g))continue;const x=this._currentNodes.get(g),y=this._positionCache.get(g),b=f==null?void 0:f.get(g);h.set(g,{id:g,x:(x==null?void 0:x.x)??(y==null?void 0:y.x)??b??(Math.random()-.5)*800,y:(x==null?void 0:x.y)??(y==null?void 0:y.y)??(Math.random()-.5)*400,vx:(x==null?void 0:x.vx)??(y==null?void 0:y.vx),vy:(x==null?void 0:x.vy)??(y==null?void 0:y.vy),fx:typeof(x==null?void 0:x.fx)=="number"?x.fx:typeof(y==null?void 0:y.fx)=="number"?y.fx:void 0,fy:typeof(x==null?void 0:x.fy)=="number"?x.fy:typeof(y==null?void 0:y.fy)=="number"?y.fy:void 0,_graphNode:w})}const d=new Set(h.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=h,this._currentLinks=p;const _=new Map;for(const[g,w]of h)_.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 m=[...h.values()].sort((g,w)=>{var b,S,C,M;const x=(b=g._graphNode)!=null&&b.sizeMultiplier&&g._graphNode.sizeMultiplier>1?100:(S=g._graphNode)!=null&&S.isHighRisk?10:0,y=(C=w._graphNode)!=null&&C.sizeMultiplier&&w._graphNode.sizeMultiplier>1?100:(M=w._graphNode)!=null&&M.isHighRisk?10:0;return x-y});this._graph.graphData({nodes:m,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)),f&&f.size>=2?this._graph.d3Force("chronoX",g=>{for(const w of m){const x=f.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 s=[];for(const f of o){const h=this._currentNodes.get(f);h&&h.x!==void 0&&h.y!==void 0&&s.push([h.x,h.y])}if(s.length<3)continue;const a=jf(s);if(a.length<3)continue;const l=n.nodeColors[r%n.nodeColors.length];r++,e.save(),e.beginPath();const u=a.reduce((f,h)=>f+h[0],0)/a.length,c=a.reduce((f,h)=>f+h[1],0)/a.length;for(let f=0;f<a.length;f++){const h=a[f][0]-u,d=a[f][1]-c,p=Math.sqrt(h*h+d*d),_=30,m=a[f][0]+(p>0?h/p*_:0),v=a[f][1]+(p>0?d/p*_:0);f===0?e.moveTo(m,v):e.lineTo(m,v)}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 s=e.linkParticleCount??1;this._hoverTraceEnabled?this._graph.linkDirectionalParticles(a=>{if(!this._hoveredNodeId)return e.linkParticles?s:0;const l=a,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?s:0}).linkDirectionalParticleSpeed(a=>{if(!this._hoveredNodeId)return n;const l=a,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(a=>{if(!this._hoveredNodeId)return i;const l=a,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(a=>{if(!this._hoveredNodeId)return r;const l=a,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(s).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 s=()=>{if(!this._riskPulseEnabled||!this._graph){this._animFrameId=null;return}try{this._graph.d3ReheatSimulation()}catch{}this._animFrameId=requestAnimationFrame(s)};this._animFrameId=requestAnimationFrame(s)}}applyPalette(e){this._graph&&this._graph.backgroundColor(e.background==="#0a0a0f"?"transparent":e.background)}};function cn(e){let n=0;for(let r=0;r<e.length;r++)n=(n<<5)-n+e.charCodeAt(r)|0;return n}function jf(e){if(e.length<3)return e;const n=[...e].sort((s,a)=>s[0]-a[0]||s[1]-a[1]),r=(s,a,l)=>(a[0]-s[0])*(l[1]-s[1])-(a[1]-s[1])*(l[0]-s[0]),i=[];for(const s of n){for(;i.length>=2&&r(i[i.length-2],i[i.length-1],s)<=0;)i.pop();i.push(s)}const o=[];for(let s=n.length-1;s>=0;s--){const a=n[s];for(;o.length>=2&&r(o[o.length-2],o[o.length-1],a)<=0;)o.pop();o.push(a)}return i.pop(),o.pop(),i.concat(o)}var $f=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",null);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,"_resizeObserver",null);P(this,"_destroyed",!1);P(this,"_highlightState",new Set);this._config=n,this._container=e,this._metadataExtractor=new Of(n.metadata),this._model=new wf(this._metadataExtractor.predicates),this._prefixManager=new ue(n.prefixes),this._labelResolver=new Sf(n.labelMode??"humanized",this._prefixManager,n.labels),this._styleEngine=new Mf(n.style,this._prefixManager),this._hexPainter=new Tf(n.hexagon,this._styleEngine,this._prefixManager),this._focusFilter=new Xr(n.focus),this._reificationCollapser=new Rf(n.reification),this._temporalFilter=new Hr,this._events=new Ff;const r={container:e,hexPainter:this._hexPainter,styleEngine:this._styleEngine,events:this._events};n.renderer==="3d"?this._rendererReady=Kt(async()=>{const{createWebGL3DRenderer:i}=await import("./renderer-3d-IRPVRQWX-DjW_h88e.js");return{createWebGL3DRenderer:i}},__vite__mapDeps([0,1,2,3])).then(({createWebGL3DRenderer:i})=>{if(!this._destroyed)return i(r)}).then(i=>{if(i){if(this._destroyed){i.destroy();return}this._renderer=i}}).catch(i=>{if(this._destroyed)return;console.warn("[dkg-graph-viz] 3D renderer not available, falling back to 2D:",i.message);const o=new Kr(r);o.init(),this._renderer=o}):(this._renderer=new Kr(r),this._renderer.init(),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"&&(this._resizeObserver=new ResizeObserver(()=>{var i;return(i=this._renderer)==null?void 0:i.resize()}),this._resizeObserver.observe(e))}async loadNTriples(e,n){const{parseNTriples:r}=await Kt(async()=>{const{parseNTriples:o}=await import("./ntriples-ZWBY2WET-DH7OofPp.js");return{parseNTriples:o}},__vite__mapDeps([4,5])),i=r(e);n!=null&&n.aborted||this._ingest(i)}async loadNQuads(e,n){const{parseNQuads:r}=await Kt(async()=>{const{parseNQuads:o}=await import("./ntriples-ZWBY2WET-DH7OofPp.js");return{parseNQuads:o}},__vite__mapDeps([4,5])),i=r(e);n!=null&&n.aborted||this._ingest(i)}async loadTurtle(e,n){const{parseTurtle:r}=await Kt(async()=>{const{parseTurtle:s}=await import("./turtle-JJPK7LJ5-BzTu0283.js");return{parseTurtle:s}},__vite__mapDeps([6,5])),{triples:i,prefixes:o}=r(e);n!=null&&n.aborted||this._destroyed||(this._prefixManager.addPrefixes(o),this._ingest(i))}async loadJsonLd(e,n){const{parseJsonLd:r}=await Kt(async()=>{const{parseJsonLd:o}=await import("./jsonld-32FQRO67-DVqZhSL_.js");return{parseJsonLd:o}},__vite__mapDeps([7,1,2])),i=await r(e);n!=null&&n.aborted||this._ingest(i)}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 Xr({...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._destroyed&&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.add(i),o.highlight());(r=this._renderer)!=null&&r.refresh?this._renderer.refresh():this._renderCurrent()}clearHighlight(){var e;if(this._highlightState.size!==0){for(const n of this._highlightState){const r=this._model.nodes.get(n);r&&r.clearHighlight()}this._highlightState.clear(),(e=this._renderer)!=null&&e.refresh?this._renderer.refresh():this._renderCurrent()}}async exportImage(){var n;const e=(n=this._renderer)==null?void 0:n.getCanvas();if(!e)throw new Error("Cannot export: renderer not initialized or no canvas available");return new Promise((r,i)=>{e.toBlob(o=>{o?r(o):i(new Error("Canvas toBlob returned null"))},"image/png")})}exportTriples(){const e=[];for(const n of this._model.triples){const r=hn(n.subject),i=hn(n.predicate);if(n.datatype||n.language||!Lf(n.object)){let o=`"${Uf(n.object)}"`;n.language?o+=`@${n.language}`:n.datatype&&(o+=`^^<${n.datatype}>`),e.push(`${r} ${i} ${o} .`)}else e.push(`${r} ${i} ${hn(n.object)} .`)}return e.join(`
|
|
192
|
+
`)}applyView(e){var i,o,s,a,l;const n=pf(e.palette,e.paletteOverrides);if(this._styleEngine.setPalette(n),gf(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"),lf(e,this._model),new vf().resolve(this._model),(o=e.temporal)!=null&&o.enabled?(this._temporalFilter=new Hr(e.temporal),this._temporalFilter.scan(this._model),this._temporalFilter.dateRange&&((s=this._timelineOverlay)==null||s.unmount(),this._timelineOverlay=new mf(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())):((a=this._timelineOverlay)==null||a.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,f,h;this._destroyed||(e.animation&&((u=this._renderer)!=null&&u.applyAnimation)&&this._renderer.applyAnimation(e.animation),(c=this._renderer)!=null&&c.applyPalette&&this._renderer.applyPalette(n),(f=e.knowledgeAssets)!=null&&f.enabled&&((h=this._renderer)!=null&&h.setKaGroups)&&this._renderer.setKaGroups(this._model.kaGroups,e.knowledgeAssets.showBoundaries!==!1,e.knowledgeAssets.boundaryOpacity??.06))})}refresh(){this._renderCurrent()}destroy(){var e,n,r;this._destroyed||(this._destroyed=!0,(e=this._resizeObserver)==null||e.disconnect(),this._resizeObserver=null,(n=this._timelineOverlay)==null||n.unmount(),this._timelineOverlay=null,(r=this._renderer)==null||r.destroy(),this._events.removeAll(),this._model.clear(),this._highlightState.clear())}_ingest(e){this._destroyed||(this._model.addTriples(e),this._postIngest())}_postIngest(){for(const e of this._model.nodes.values())e.setSourceImage(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._destroyed)return;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,s=new Map;for(const[a,l]of e)r.has(a)&&o.set(a,l);for(const[a,l]of n)o.has(l.source)&&o.has(l.target)&&s.set(a,l);e=o,n=s}this._renderer.render(e,n,this._collapsedNodeIds),(i=this._timelineOverlay)!=null&&i.mounted&&this._timelineOverlay.updateCount(e.size)}};function Lf(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("urn:")||e.startsWith("_:")}function hn(e){return e.startsWith("_:")?e:`<${e}>`}function Uf(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}var Vn=Z.createContext({viz:null,selectedNode:null,hoveredNode:null});function Wn(){return Z.useContext(Vn)}function Hf({data:e,format:n="ntriples",options:r={},viewConfig:i,initialFit:o,initialFocus:s,onNodeClick:a,onNodeHover:l,onNodeUnhover:u,className:c,style:f,children:h}){var C,M,z;const d=Z.useRef(null),p=Z.useRef(null),_=Z.useRef(!1),[m,v]=Z.useState(null),[g,w]=Z.useState(null),x=Z.useRef({onNodeClick:a,onNodeHover:l,onNodeUnhover:u});x.current={onNodeClick:a,onNodeHover:l,onNodeUnhover:u};const y=Z.useRef({viewConfig:i,nodeColors:(C=r.style)==null?void 0:C.nodeColors});y.current={viewConfig:i,nodeColors:(M=r.style)==null?void 0:M.nodeColors},Z.useEffect(()=>{if(!d.current)return;const A=new $f(d.current,r);p.current=A;const N=[];return N.push(A.on("node:click",R=>{var O,k;v(R),(k=(O=x.current).onNodeClick)==null||k.call(O,R)})),N.push(A.on("node:hover",R=>{var O,k;w(R),(k=(O=x.current).onNodeHover)==null||k.call(O,R)})),N.push(A.on("node:unhover",R=>{var O,k;w(null),(k=(O=x.current).onNodeUnhover)==null||k.call(O,R)})),N.push(A.on("background:click",()=>{v(null)})),()=>{N.forEach(R=>R()),A.destroy(),p.current=null}},[]),Z.useEffect(()=>{const A=p.current;if(!A||!e)return;A.model.clear(),v(null),w(null);const N=new AbortController,R=async()=>{if(typeof e=="string")switch(n){case"ntriples":await A.loadNTriples(e,N.signal);break;case"nquads":await A.loadNQuads(e,N.signal);break;case"turtle":await A.loadTurtle(e,N.signal);break;case"jsonld":await A.loadJsonLd(e,N.signal);break;default:await A.loadNTriples(e,N.signal)}else Array.isArray(e)&&A.loadTriples(e);N.signal.aborted||(y.current.nodeColors&&A.styleEngine.setNodeColors(y.current.nodeColors),y.current.viewConfig&&A.applyView(y.current.viewConfig))};let O=!1,k;return R().then(()=>{O||A&&o&&!_.current&&(k=setTimeout(()=>{O||(_.current=!0,A.zoomToFit())},300))}).catch(I=>{O||console.error("[RdfGraph] Error loading data:",I)}),()=>{O=!0,N.abort(),k&&clearTimeout(k)}},[e,n]);const b=Z.useRef(i);Z.useEffect(()=>{const A=p.current;!A||i===b.current||(b.current=i,A.applyView(i??{name:"Default"}),A.refresh())},[i]),Z.useEffect(()=>{var N;const A=p.current;A&&(A.styleEngine.setNodeColors(((N=r.style)==null?void 0:N.nodeColors)??{}),A.refresh())},[(z=r.style)==null?void 0:z.nodeColors]),Z.useEffect(()=>{if(!s)return;const A=p.current;if(!A)return;const N=setTimeout(()=>{try{A.centerOnNode(s,{durationMs:600,zoomLevel:2})}catch{}},550);return()=>clearTimeout(N)},[s,e]);const S=Z.useCallback(()=>({viz:p.current,selectedNode:m,hoveredNode:g}),[m,g]);return K.jsxs(Vn.Provider,{value:S(),children:[K.jsx("div",{ref:d,className:c,style:{width:"100%",height:"100%",...f}}),h]})}function Bf({renderNode:e,className:n,style:r,showUri:i=!0,showTypes:o=!0,showProperties:s=!0,showMetadata:a=!1,maxValueLength:l=200}){const{selectedNode:u}=Wn();return e?K.jsx(K.Fragment,{children:e(u)}):u?K.jsxs("div",{className:n,style:r,children:[K.jsx(Vf,{node:u,showUri:i,showTypes:o}),s&&u.properties.size>0&&K.jsx(Zr,{title:"Properties",entries:u.properties,maxValueLength:l}),a&&u.metadata.size>0&&K.jsx(Zr,{title:"Metadata",entries:u.metadata,maxValueLength:l})]}):null}function Vf({node:e,showUri:n,showTypes:r}){const i=Z.useMemo(()=>e.types.map(o=>{var s;return((s=o.split("/").pop())==null?void 0:s.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 Zr({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 a;const s=((a=i.split("/").pop())==null?void 0:a.split("#").pop())??i;return K.jsxs("div",{style:{fontSize:"0.85em",marginBottom:2,lineHeight:1.5},children:[K.jsxs("span",{style:{opacity:.6},children:[Wf(s),": "]}),K.jsx("span",{style:{wordBreak:"break-word"},children:o.map(l=>qf(l.value,r)).join(", ")})]},i)})]})}function Wf(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 qf(e,n){return e.length>n?e.slice(0,n-1)+"…":e}function Gf(){const e=Wn();return{viz:e.viz,selectedNode:e.selectedNode,hoveredNode:e.hoveredNode}}const Zf=Object.freeze(Object.defineProperty({__proto__:null,NodePanel:Bf,RdfGraph:Hf,RdfGraphContext:Vn,useRdfGraph:Gf,useRdfGraphContext:Wn},Symbol.toStringTag,{value:"Module"}));export{Ft as E,Si as G,cr as T,ah as a,_h as b,vh as c,gh as d,On as e,uc as f,lc as g,Zf as h,B as i,$h as s,F as t,Gf as u};
|