gitopo 0.0.1
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/LICENSE +21 -0
- package/README.md +110 -0
- package/bin/gitopo.js +20 -0
- package/dist/renderer/assets/index-B-xnAFkZ.css +1 -0
- package/dist/renderer/assets/index-B4NR76vm.css +1 -0
- package/dist/renderer/assets/index-B8-bMEZL.js +3 -0
- package/dist/renderer/assets/index-BSM6CD5c.js +3 -0
- package/dist/renderer/assets/index-Biwf0g5L.js +3 -0
- package/dist/renderer/assets/index-BkSteF7v.js +3 -0
- package/dist/renderer/assets/index-Bu2Is4Gi.js +3 -0
- package/dist/renderer/assets/index-BuunUFeT.js +3 -0
- package/dist/renderer/assets/index-BztqQcTT.js +3 -0
- package/dist/renderer/assets/index-C5GvfFhL.js +3 -0
- package/dist/renderer/assets/index-C5pqhkpE.css +1 -0
- package/dist/renderer/assets/index-CAjBcm7_.js +3 -0
- package/dist/renderer/assets/index-CPhqr81-.css +1 -0
- package/dist/renderer/assets/index-CRBk_3U9.js +4 -0
- package/dist/renderer/assets/index-CV77y4NX.js +3 -0
- package/dist/renderer/assets/index-CX4EqujF.js +3 -0
- package/dist/renderer/assets/index-Caevx9so.js +3 -0
- package/dist/renderer/assets/index-CbVNESqC.js +3 -0
- package/dist/renderer/assets/index-CgV3hEXF.js +3 -0
- package/dist/renderer/assets/index-Cgxb7yXH.js +3 -0
- package/dist/renderer/assets/index-Cu7Bdfdp.js +3 -0
- package/dist/renderer/assets/index-D-4eDZ-q.css +1 -0
- package/dist/renderer/assets/index-D3WoIbyB.js +3 -0
- package/dist/renderer/assets/index-DATWWeXq.js +3 -0
- package/dist/renderer/assets/index-DGVlk6ue.css +1 -0
- package/dist/renderer/assets/index-DKxk7KCa.js +3 -0
- package/dist/renderer/assets/index-DPD27o55.js +3 -0
- package/dist/renderer/assets/index-DaP2KGsB.js +3 -0
- package/dist/renderer/assets/index-DeuGEmKM.js +3 -0
- package/dist/renderer/assets/index-Dg_WVb0M.js +3 -0
- package/dist/renderer/assets/index-Dhbf0Fci.js +3 -0
- package/dist/renderer/assets/index-DnUHDinm.css +1 -0
- package/dist/renderer/assets/index-DuNCgxuJ.js +3 -0
- package/dist/renderer/assets/index-HYzjpgUI.js +3 -0
- package/dist/renderer/assets/index-Mn_-m7Tt.js +3 -0
- package/dist/renderer/assets/index-N_FqOAes.js +3 -0
- package/dist/renderer/assets/index-TVFDuiMT.js +3 -0
- package/dist/renderer/assets/index-UF9gobFY.css +1 -0
- package/dist/renderer/assets/index-V7JII7CO.js +3 -0
- package/dist/renderer/assets/index-jDaMuPPI.css +1 -0
- package/dist/renderer/assets/index-kUku5Va6.js +3 -0
- package/dist/renderer/index.html +38 -0
- package/docs/screenshot.png +0 -0
- package/package.json +57 -0
- package/src/main/index.js +85 -0
- package/src/main/preload.js +16 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function e(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=e(i);fetch(i.href,o)}})();var Vn={value:()=>{}};function _n(){for(var t=0,n=arguments.length,e={},r;t<n;++t){if(!(r=arguments[t]+"")||r in e||/[\s.]/.test(r))throw new Error("illegal type: "+r);e[r]=[]}return new ht(e)}function ht(t){this._=t}function zn(t,n){return t.trim().split(/^|\s+/).map(function(e){var r="",i=e.indexOf(".");if(i>=0&&(r=e.slice(i+1),e=e.slice(0,i)),e&&!n.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:r}})}ht.prototype=_n.prototype={constructor:ht,on:function(t,n){var e=this._,r=zn(t+"",e),i,o=-1,s=r.length;if(arguments.length<2){for(;++o<s;)if((i=(t=r[o]).type)&&(i=Un(e[i],t.name)))return i;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++o<s;)if(i=(t=r[o]).type)e[i]=jt(e[i],t.name,n);else if(n==null)for(i in e)e[i]=jt(e[i],t.name,null);return this},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new ht(t)},call:function(t,n){if((i=arguments.length-2)>0)for(var e=new Array(i),r=0,i,o;r<i;++r)e[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(n,e)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(n,e)}};function Un(t,n){for(var e=0,r=t.length,i;e<r;++e)if((i=t[e]).name===n)return i.value}function jt(t,n,e){for(var r=0,i=t.length;r<i;++r)if(t[r].name===n){t[r]=Vn,t=t.slice(0,r).concat(t.slice(r+1));break}return e!=null&&t.push({name:n,value:e}),t}var Bt="http://www.w3.org/1999/xhtml";const tn={svg:"http://www.w3.org/2000/svg",xhtml:Bt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function vt(t){var n=t+="",e=n.indexOf(":");return e>=0&&(n=t.slice(0,e))!=="xmlns"&&(t=t.slice(e+1)),tn.hasOwnProperty(n)?{space:tn[n],local:t}:t}function Gn(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===Bt&&n.documentElement.namespaceURI===Bt?n.createElement(t):n.createElementNS(e,t)}}function Kn(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function wn(t){var n=vt(t);return(n.local?Kn:Gn)(n)}function Wn(){}function Lt(t){return t==null?Wn:function(){return this.querySelector(t)}}function Jn(t){typeof t!="function"&&(t=Lt(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o=n[i],s=o.length,a=r[i]=new Array(s),c,u,f=0;f<s;++f)(c=o[f])&&(u=t.call(c,c.__data__,f,o))&&("__data__"in c&&(u.__data__=c.__data__),a[f]=u);return new S(r,this._parents)}function Qn(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Zn(){return[]}function yn(t){return t==null?Zn:function(){return this.querySelectorAll(t)}}function jn(t){return function(){return Qn(t.apply(this,arguments))}}function te(t){typeof t=="function"?t=jn(t):t=yn(t);for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var s=n[o],a=s.length,c,u=0;u<a;++u)(c=s[u])&&(r.push(t.call(c,c.__data__,u,s)),i.push(c));return new S(r,i)}function xn(t){return function(){return this.matches(t)}}function vn(t){return function(n){return n.matches(t)}}var ne=Array.prototype.find;function ee(t){return function(){return ne.call(this.children,t)}}function re(){return this.firstElementChild}function ie(t){return this.select(t==null?re:ee(typeof t=="function"?t:vn(t)))}var oe=Array.prototype.filter;function se(){return Array.from(this.children)}function ae(t){return function(){return oe.call(this.children,t)}}function ce(t){return this.selectAll(t==null?se:ae(typeof t=="function"?t:vn(t)))}function ue(t){typeof t!="function"&&(t=xn(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o=n[i],s=o.length,a=r[i]=[],c,u=0;u<s;++u)(c=o[u])&&t.call(c,c.__data__,u,o)&&a.push(c);return new S(r,this._parents)}function bn(t){return new Array(t.length)}function fe(){return new S(this._enter||this._groups.map(bn),this._parents)}function gt(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}gt.prototype={constructor:gt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function le(t){return function(){return t}}function he(t,n,e,r,i,o){for(var s=0,a,c=n.length,u=o.length;s<u;++s)(a=n[s])?(a.__data__=o[s],r[s]=a):e[s]=new gt(t,o[s]);for(;s<c;++s)(a=n[s])&&(i[s]=a)}function pe(t,n,e,r,i,o,s){var a,c,u=new Map,f=n.length,l=o.length,p=new Array(f),d;for(a=0;a<f;++a)(c=n[a])&&(p[a]=d=s.call(c,c.__data__,a,n)+"",u.has(d)?i[a]=c:u.set(d,c));for(a=0;a<l;++a)d=s.call(t,o[a],a,o)+"",(c=u.get(d))?(r[a]=c,c.__data__=o[a],u.delete(d)):e[a]=new gt(t,o[a]);for(a=0;a<f;++a)(c=n[a])&&u.get(p[a])===c&&(i[a]=c)}function de(t){return t.__data__}function ge(t,n){if(!arguments.length)return Array.from(this,de);var e=n?pe:he,r=this._parents,i=this._groups;typeof t!="function"&&(t=le(t));for(var o=i.length,s=new Array(o),a=new Array(o),c=new Array(o),u=0;u<o;++u){var f=r[u],l=i[u],p=l.length,d=me(t.call(f,f&&f.__data__,u,r)),m=d.length,w=a[u]=new Array(m),x=s[u]=new Array(m),St=c[u]=new Array(p);e(f,l,w,x,St,d,n);for(var C=0,L=0,k,at;C<m;++C)if(k=w[C]){for(C>=L&&(L=C+1);!(at=x[L])&&++L<m;);k._next=at||null}}return s=new S(s,r),s._enter=a,s._exit=c,s}function me(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function _e(){return new S(this._exit||this._groups.map(bn),this._parents)}function we(t,n,e){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),n!=null&&(i=n(i),i&&(i=i.selection())),e==null?o.remove():e(o),r&&i?r.merge(i).order():i}function ye(t){for(var n=t.selection?t.selection():t,e=this._groups,r=n._groups,i=e.length,o=r.length,s=Math.min(i,o),a=new Array(i),c=0;c<s;++c)for(var u=e[c],f=r[c],l=u.length,p=a[c]=new Array(l),d,m=0;m<l;++m)(d=u[m]||f[m])&&(p[m]=d);for(;c<i;++c)a[c]=e[c];return new S(a,this._parents)}function xe(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r=t[n],i=r.length-1,o=r[i],s;--i>=0;)(s=r[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function ve(t){t||(t=be);function n(l,p){return l&&p?t(l.__data__,p.__data__):!l-!p}for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var s=e[o],a=s.length,c=i[o]=new Array(a),u,f=0;f<a;++f)(u=s[f])&&(c[f]=u);c.sort(n)}return new S(i,this._parents).order()}function be(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function $e(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Se(){return Array.from(this)}function Ee(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var s=r[i];if(s)return s}return null}function Ne(){let t=0;for(const n of this)++t;return t}function Ae(){return!this.node()}function Ce(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i=n[e],o=0,s=i.length,a;o<s;++o)(a=i[o])&&t.call(a,a.__data__,o,i);return this}function ke(t){return function(){this.removeAttribute(t)}}function Be(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Me(t,n){return function(){this.setAttribute(t,n)}}function Te(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function Ie(t,n){return function(){var e=n.apply(this,arguments);e==null?this.removeAttribute(t):this.setAttribute(t,e)}}function Re(t,n){return function(){var e=n.apply(this,arguments);e==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function Oe(t,n){var e=vt(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((n==null?e.local?Be:ke:typeof n=="function"?e.local?Re:Ie:e.local?Te:Me)(e,n))}function $n(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Xe(t){return function(){this.style.removeProperty(t)}}function He(t,n,e){return function(){this.style.setProperty(t,n,e)}}function Le(t,n,e){return function(){var r=n.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function Fe(t,n,e){return arguments.length>1?this.each((n==null?Xe:typeof n=="function"?Le:He)(t,n,e??"")):K(this.node(),t)}function K(t,n){return t.style.getPropertyValue(n)||$n(t).getComputedStyle(t,null).getPropertyValue(n)}function Pe(t){return function(){delete this[t]}}function De(t,n){return function(){this[t]=n}}function Ye(t,n){return function(){var e=n.apply(this,arguments);e==null?delete this[t]:this[t]=e}}function qe(t,n){return arguments.length>1?this.each((n==null?Pe:typeof n=="function"?Ye:De)(t,n)):this.node()[t]}function Sn(t){return t.trim().split(/^|\s+/)}function Ft(t){return t.classList||new En(t)}function En(t){this._node=t,this._names=Sn(t.getAttribute("class")||"")}En.prototype={add:function(t){var n=this._names.indexOf(t);n<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Nn(t,n){for(var e=Ft(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function An(t,n){for(var e=Ft(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function Ve(t){return function(){Nn(this,t)}}function ze(t){return function(){An(this,t)}}function Ue(t,n){return function(){(n.apply(this,arguments)?Nn:An)(this,t)}}function Ge(t,n){var e=Sn(t+"");if(arguments.length<2){for(var r=Ft(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each((typeof n=="function"?Ue:n?Ve:ze)(e,n))}function Ke(){this.textContent=""}function We(t){return function(){this.textContent=t}}function Je(t){return function(){var n=t.apply(this,arguments);this.textContent=n??""}}function Qe(t){return arguments.length?this.each(t==null?Ke:(typeof t=="function"?Je:We)(t)):this.node().textContent}function Ze(){this.innerHTML=""}function je(t){return function(){this.innerHTML=t}}function tr(t){return function(){var n=t.apply(this,arguments);this.innerHTML=n??""}}function nr(t){return arguments.length?this.each(t==null?Ze:(typeof t=="function"?tr:je)(t)):this.node().innerHTML}function er(){this.nextSibling&&this.parentNode.appendChild(this)}function rr(){return this.each(er)}function ir(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function or(){return this.each(ir)}function sr(t){var n=typeof t=="function"?t:wn(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function ar(){return null}function cr(t,n){var e=typeof t=="function"?t:wn(t),r=n==null?ar:typeof n=="function"?n:Lt(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})}function ur(){var t=this.parentNode;t&&t.removeChild(this)}function fr(){return this.each(ur)}function lr(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function hr(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function pr(t){return this.select(t?hr:lr)}function dr(t){return arguments.length?this.property("__data__",t):this.node().__data__}function gr(t){return function(n){t.call(this,n,this.__data__)}}function mr(t){return t.trim().split(/^|\s+/).map(function(n){var e="",r=n.indexOf(".");return r>=0&&(e=n.slice(r+1),n=n.slice(0,r)),{type:n,name:e}})}function _r(t){return function(){var n=this.__on;if(n){for(var e=0,r=-1,i=n.length,o;e<i;++e)o=n[e],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):n[++r]=o;++r?n.length=r:delete this.__on}}}function wr(t,n,e){return function(){var r=this.__on,i,o=gr(n);if(r){for(var s=0,a=r.length;s<a;++s)if((i=r[s]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=e),i.value=n;return}}this.addEventListener(t.type,o,e),i={type:t.type,name:t.name,value:n,listener:o,options:e},r?r.push(i):this.__on=[i]}}function yr(t,n,e){var r=mr(t+""),i,o=r.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var c=0,u=a.length,f;c<u;++c)for(i=0,f=a[c];i<o;++i)if((s=r[i]).type===f.type&&s.name===f.name)return f.value}return}for(a=n?wr:_r,i=0;i<o;++i)this.each(a(r[i],n,e));return this}function Cn(t,n,e){var r=$n(t),i=r.CustomEvent;typeof i=="function"?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function xr(t,n){return function(){return Cn(this,t,n)}}function vr(t,n){return function(){return Cn(this,t,n.apply(this,arguments))}}function br(t,n){return this.each((typeof n=="function"?vr:xr)(t,n))}function*$r(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length,s;i<o;++i)(s=r[i])&&(yield s)}var kn=[null];function S(t,n){this._groups=t,this._parents=n}function ot(){return new S([[document.documentElement]],kn)}function Sr(){return this}S.prototype=ot.prototype={constructor:S,select:Jn,selectAll:te,selectChild:ie,selectChildren:ce,filter:ue,data:ge,enter:fe,exit:_e,join:we,merge:ye,selection:Sr,order:xe,sort:ve,call:$e,nodes:Se,node:Ee,size:Ne,empty:Ae,each:Ce,attr:Oe,style:Fe,property:qe,classed:Ge,text:Qe,html:nr,raise:rr,lower:or,append:sr,insert:cr,remove:fr,clone:pr,datum:dr,on:yr,dispatch:br,[Symbol.iterator]:$r};function nn(t){return typeof t=="string"?new S([[document.querySelector(t)]],[document.documentElement]):new S([[t]],kn)}function Pt(t,n,e){t.prototype=n.prototype=e,e.constructor=t}function Bn(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function st(){}var nt=.7,mt=1/nt,U="\\s*([+-]?\\d+)\\s*",et="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",B="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Er=/^#([0-9a-f]{3,8})$/,Nr=new RegExp(`^rgb\\(${U},${U},${U}\\)$`),Ar=new RegExp(`^rgb\\(${B},${B},${B}\\)$`),Cr=new RegExp(`^rgba\\(${U},${U},${U},${et}\\)$`),kr=new RegExp(`^rgba\\(${B},${B},${B},${et}\\)$`),Br=new RegExp(`^hsl\\(${et},${B},${B}\\)$`),Mr=new RegExp(`^hsla\\(${et},${B},${B},${et}\\)$`),en={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Pt(st,rt,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:rn,formatHex:rn,formatHex8:Tr,formatHsl:Ir,formatRgb:on,toString:on});function rn(){return this.rgb().formatHex()}function Tr(){return this.rgb().formatHex8()}function Ir(){return Mn(this).formatHsl()}function on(){return this.rgb().formatRgb()}function rt(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=Er.exec(t))?(e=n[1].length,n=parseInt(n[1],16),e===6?sn(n):e===3?new v(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):e===8?ut(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):e===4?ut(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=Nr.exec(t))?new v(n[1],n[2],n[3],1):(n=Ar.exec(t))?new v(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=Cr.exec(t))?ut(n[1],n[2],n[3],n[4]):(n=kr.exec(t))?ut(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=Br.exec(t))?un(n[1],n[2]/100,n[3]/100,1):(n=Mr.exec(t))?un(n[1],n[2]/100,n[3]/100,n[4]):en.hasOwnProperty(t)?sn(en[t]):t==="transparent"?new v(NaN,NaN,NaN,0):null}function sn(t){return new v(t>>16&255,t>>8&255,t&255,1)}function ut(t,n,e,r){return r<=0&&(t=n=e=NaN),new v(t,n,e,r)}function Rr(t){return t instanceof st||(t=rt(t)),t?(t=t.rgb(),new v(t.r,t.g,t.b,t.opacity)):new v}function Mt(t,n,e,r){return arguments.length===1?Rr(t):new v(t,n,e,r??1)}function v(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}Pt(v,Mt,Bn(st,{brighter(t){return t=t==null?mt:Math.pow(mt,t),new v(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?nt:Math.pow(nt,t),new v(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new v(Y(this.r),Y(this.g),Y(this.b),_t(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:an,formatHex:an,formatHex8:Or,formatRgb:cn,toString:cn}));function an(){return`#${D(this.r)}${D(this.g)}${D(this.b)}`}function Or(){return`#${D(this.r)}${D(this.g)}${D(this.b)}${D((isNaN(this.opacity)?1:this.opacity)*255)}`}function cn(){const t=_t(this.opacity);return`${t===1?"rgb(":"rgba("}${Y(this.r)}, ${Y(this.g)}, ${Y(this.b)}${t===1?")":`, ${t})`}`}function _t(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Y(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function D(t){return t=Y(t),(t<16?"0":"")+t.toString(16)}function un(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new N(t,n,e,r)}function Mn(t){if(t instanceof N)return new N(t.h,t.s,t.l,t.opacity);if(t instanceof st||(t=rt(t)),!t)return new N;if(t instanceof N)return t;t=t.rgb();var n=t.r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),s=NaN,a=o-i,c=(o+i)/2;return a?(n===o?s=(e-r)/a+(e<r)*6:e===o?s=(r-n)/a+2:s=(n-e)/a+4,a/=c<.5?o+i:2-o-i,s*=60):a=c>0&&c<1?0:s,new N(s,a,c,t.opacity)}function Xr(t,n,e,r){return arguments.length===1?Mn(t):new N(t,n,e,r??1)}function N(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}Pt(N,Xr,Bn(st,{brighter(t){return t=t==null?mt:Math.pow(mt,t),new N(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?nt:Math.pow(nt,t),new N(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new v(Ct(t>=240?t-240:t+120,i,r),Ct(t,i,r),Ct(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new N(fn(this.h),ft(this.s),ft(this.l),_t(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=_t(this.opacity);return`${t===1?"hsl(":"hsla("}${fn(this.h)}, ${ft(this.s)*100}%, ${ft(this.l)*100}%${t===1?")":`, ${t})`}`}}));function fn(t){return t=(t||0)%360,t<0?t+360:t}function ft(t){return Math.max(0,Math.min(1,t||0))}function Ct(t,n,e){return(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)*255}const Tn=t=>()=>t;function Hr(t,n){return function(e){return t+e*n}}function Lr(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}function Fr(t){return(t=+t)==1?In:function(n,e){return e-n?Lr(n,e,t):Tn(isNaN(n)?e:n)}}function In(t,n){var e=n-t;return e?Hr(t,e):Tn(isNaN(t)?n:t)}const ln=(function t(n){var e=Fr(n);function r(i,o){var s=e((i=Mt(i)).r,(o=Mt(o)).r),a=e(i.g,o.g),c=e(i.b,o.b),u=In(i.opacity,o.opacity);return function(f){return i.r=s(f),i.g=a(f),i.b=c(f),i.opacity=u(f),i+""}}return r.gamma=t,r})(1);function H(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}}var Tt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,kt=new RegExp(Tt.source,"g");function Pr(t){return function(){return t}}function Dr(t){return function(n){return t(n)+""}}function Yr(t,n){var e=Tt.lastIndex=kt.lastIndex=0,r,i,o,s=-1,a=[],c=[];for(t=t+"",n=n+"";(r=Tt.exec(t))&&(i=kt.exec(n));)(o=i.index)>e&&(o=n.slice(e,o),a[s]?a[s]+=o:a[++s]=o),(r=r[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,c.push({i:s,x:H(r,i)})),e=kt.lastIndex;return e<n.length&&(o=n.slice(e),a[s]?a[s]+=o:a[++s]=o),a.length<2?c[0]?Dr(c[0].x):Pr(n):(n=c.length,function(u){for(var f=0,l;f<n;++f)a[(l=c[f]).i]=l.x(u);return a.join("")})}var hn=180/Math.PI,It={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Rn(t,n,e,r,i,o){var s,a,c;return(s=Math.sqrt(t*t+n*n))&&(t/=s,n/=s),(c=t*e+n*r)&&(e-=t*c,r-=n*c),(a=Math.sqrt(e*e+r*r))&&(e/=a,r/=a,c/=a),t*r<n*e&&(t=-t,n=-n,c=-c,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(n,t)*hn,skewX:Math.atan(c)*hn,scaleX:s,scaleY:a}}var lt;function qr(t){const n=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return n.isIdentity?It:Rn(n.a,n.b,n.c,n.d,n.e,n.f)}function Vr(t){return t==null||(lt||(lt=document.createElementNS("http://www.w3.org/2000/svg","g")),lt.setAttribute("transform",t),!(t=lt.transform.baseVal.consolidate()))?It:(t=t.matrix,Rn(t.a,t.b,t.c,t.d,t.e,t.f))}function On(t,n,e,r){function i(u){return u.length?u.pop()+" ":""}function o(u,f,l,p,d,m){if(u!==l||f!==p){var w=d.push("translate(",null,n,null,e);m.push({i:w-4,x:H(u,l)},{i:w-2,x:H(f,p)})}else(l||p)&&d.push("translate("+l+n+p+e)}function s(u,f,l,p){u!==f?(u-f>180?f+=360:f-u>180&&(u+=360),p.push({i:l.push(i(l)+"rotate(",null,r)-2,x:H(u,f)})):f&&l.push(i(l)+"rotate("+f+r)}function a(u,f,l,p){u!==f?p.push({i:l.push(i(l)+"skewX(",null,r)-2,x:H(u,f)}):f&&l.push(i(l)+"skewX("+f+r)}function c(u,f,l,p,d,m){if(u!==l||f!==p){var w=d.push(i(d)+"scale(",null,",",null,")");m.push({i:w-4,x:H(u,l)},{i:w-2,x:H(f,p)})}else(l!==1||p!==1)&&d.push(i(d)+"scale("+l+","+p+")")}return function(u,f){var l=[],p=[];return u=t(u),f=t(f),o(u.translateX,u.translateY,f.translateX,f.translateY,l,p),s(u.rotate,f.rotate,l,p),a(u.skewX,f.skewX,l,p),c(u.scaleX,u.scaleY,f.scaleX,f.scaleY,l,p),u=f=null,function(d){for(var m=-1,w=p.length,x;++m<w;)l[(x=p[m]).i]=x.x(d);return l.join("")}}}var zr=On(qr,"px, ","px)","deg)"),Ur=On(Vr,", ",")",")"),W=0,Q=0,J=0,Xn=1e3,wt,Z,yt=0,q=0,bt=0,it=typeof performance=="object"&&performance.now?performance:Date,Hn=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Dt(){return q||(Hn(Gr),q=it.now()+bt)}function Gr(){q=0}function xt(){this._call=this._time=this._next=null}xt.prototype=Ln.prototype={constructor:xt,restart:function(t,n,e){if(typeof t!="function")throw new TypeError("callback is not a function");e=(e==null?Dt():+e)+(n==null?0:+n),!this._next&&Z!==this&&(Z?Z._next=this:wt=this,Z=this),this._call=t,this._time=e,Rt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Rt())}};function Ln(t,n,e){var r=new xt;return r.restart(t,n,e),r}function Kr(){Dt(),++W;for(var t=wt,n;t;)(n=q-t._time)>=0&&t._call.call(void 0,n),t=t._next;--W}function pn(){q=(yt=it.now())+bt,W=Q=0;try{Kr()}finally{W=0,Jr(),q=0}}function Wr(){var t=it.now(),n=t-yt;n>Xn&&(bt-=n,yt=t)}function Jr(){for(var t,n=wt,e,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:wt=e);Z=t,Rt(r)}function Rt(t){if(!W){Q&&(Q=clearTimeout(Q));var n=t-q;n>24?(t<1/0&&(Q=setTimeout(pn,t-it.now()-bt)),J&&(J=clearInterval(J))):(J||(yt=it.now(),J=setInterval(Wr,Xn)),W=1,Hn(pn))}}function dn(t,n,e){var r=new xt;return n=n==null?0:+n,r.restart(i=>{r.stop(),t(i+n)},n,e),r}var Qr=_n("start","end","cancel","interrupt"),Zr=[],Fn=0,gn=1,Ot=2,pt=3,mn=4,Xt=5,dt=6;function $t(t,n,e,r,i,o){var s=t.__transition;if(!s)t.__transition={};else if(e in s)return;jr(t,e,{name:n,index:r,group:i,on:Qr,tween:Zr,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Fn})}function Yt(t,n){var e=A(t,n);if(e.state>Fn)throw new Error("too late; already scheduled");return e}function M(t,n){var e=A(t,n);if(e.state>pt)throw new Error("too late; already running");return e}function A(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function jr(t,n,e){var r=t.__transition,i;r[n]=e,e.timer=Ln(o,0,e.time);function o(u){e.state=gn,e.timer.restart(s,e.delay,e.time),e.delay<=u&&s(u-e.delay)}function s(u){var f,l,p,d;if(e.state!==gn)return c();for(f in r)if(d=r[f],d.name===e.name){if(d.state===pt)return dn(s);d.state===mn?(d.state=dt,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[f]):+f<n&&(d.state=dt,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[f])}if(dn(function(){e.state===pt&&(e.state=mn,e.timer.restart(a,e.delay,e.time),a(u))}),e.state=Ot,e.on.call("start",t,t.__data__,e.index,e.group),e.state===Ot){for(e.state=pt,i=new Array(p=e.tween.length),f=0,l=-1;f<p;++f)(d=e.tween[f].value.call(t,t.__data__,e.index,e.group))&&(i[++l]=d);i.length=l+1}}function a(u){for(var f=u<e.duration?e.ease.call(null,u/e.duration):(e.timer.restart(c),e.state=Xt,1),l=-1,p=i.length;++l<p;)i[l].call(t,f);e.state===Xt&&(e.on.call("end",t,t.__data__,e.index,e.group),c())}function c(){e.state=dt,e.timer.stop(),delete r[n];for(var u in r)return;delete t.__transition}}function ti(t,n){var e=t.__transition,r,i,o=!0,s;if(e){n=n==null?null:n+"";for(s in e){if((r=e[s]).name!==n){o=!1;continue}i=r.state>Ot&&r.state<Xt,r.state=dt,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete e[s]}o&&delete t.__transition}}function ni(t){return this.each(function(){ti(this,t)})}function ei(t,n){var e,r;return function(){var i=M(this,t),o=i.tween;if(o!==e){r=e=o;for(var s=0,a=r.length;s<a;++s)if(r[s].name===n){r=r.slice(),r.splice(s,1);break}}i.tween=r}}function ri(t,n,e){var r,i;if(typeof e!="function")throw new Error;return function(){var o=M(this,t),s=o.tween;if(s!==r){i=(r=s).slice();for(var a={name:n,value:e},c=0,u=i.length;c<u;++c)if(i[c].name===n){i[c]=a;break}c===u&&i.push(a)}o.tween=i}}function ii(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r=A(this.node(),e).tween,i=0,o=r.length,s;i<o;++i)if((s=r[i]).name===t)return s.value;return null}return this.each((n==null?ei:ri)(e,t,n))}function qt(t,n,e){var r=t._id;return t.each(function(){var i=M(this,r);(i.value||(i.value={}))[n]=e.apply(this,arguments)}),function(i){return A(i,r).value[n]}}function Pn(t,n){var e;return(typeof n=="number"?H:n instanceof rt?ln:(e=rt(n))?(n=e,ln):Yr)(t,n)}function oi(t){return function(){this.removeAttribute(t)}}function si(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ai(t,n,e){var r,i=e+"",o;return function(){var s=this.getAttribute(t);return s===i?null:s===r?o:o=n(r=s,e)}}function ci(t,n,e){var r,i=e+"",o;return function(){var s=this.getAttributeNS(t.space,t.local);return s===i?null:s===r?o:o=n(r=s,e)}}function ui(t,n,e){var r,i,o;return function(){var s,a=e(this),c;return a==null?void this.removeAttribute(t):(s=this.getAttribute(t),c=a+"",s===c?null:s===r&&c===i?o:(i=c,o=n(r=s,a)))}}function fi(t,n,e){var r,i,o;return function(){var s,a=e(this),c;return a==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),c=a+"",s===c?null:s===r&&c===i?o:(i=c,o=n(r=s,a)))}}function li(t,n){var e=vt(t),r=e==="transform"?Ur:Pn;return this.attrTween(t,typeof n=="function"?(e.local?fi:ui)(e,r,qt(this,"attr."+t,n)):n==null?(e.local?si:oi)(e):(e.local?ci:ai)(e,r,n))}function hi(t,n){return function(e){this.setAttribute(t,n.call(this,e))}}function pi(t,n){return function(e){this.setAttributeNS(t.space,t.local,n.call(this,e))}}function di(t,n){var e,r;function i(){var o=n.apply(this,arguments);return o!==r&&(e=(r=o)&&pi(t,o)),e}return i._value=n,i}function gi(t,n){var e,r;function i(){var o=n.apply(this,arguments);return o!==r&&(e=(r=o)&&hi(t,o)),e}return i._value=n,i}function mi(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(n==null)return this.tween(e,null);if(typeof n!="function")throw new Error;var r=vt(t);return this.tween(e,(r.local?di:gi)(r,n))}function _i(t,n){return function(){Yt(this,t).delay=+n.apply(this,arguments)}}function wi(t,n){return n=+n,function(){Yt(this,t).delay=n}}function yi(t){var n=this._id;return arguments.length?this.each((typeof t=="function"?_i:wi)(n,t)):A(this.node(),n).delay}function xi(t,n){return function(){M(this,t).duration=+n.apply(this,arguments)}}function vi(t,n){return n=+n,function(){M(this,t).duration=n}}function bi(t){var n=this._id;return arguments.length?this.each((typeof t=="function"?xi:vi)(n,t)):A(this.node(),n).duration}function $i(t,n){if(typeof n!="function")throw new Error;return function(){M(this,t).ease=n}}function Si(t){var n=this._id;return arguments.length?this.each($i(n,t)):A(this.node(),n).ease}function Ei(t,n){return function(){var e=n.apply(this,arguments);if(typeof e!="function")throw new Error;M(this,t).ease=e}}function Ni(t){if(typeof t!="function")throw new Error;return this.each(Ei(this._id,t))}function Ai(t){typeof t!="function"&&(t=xn(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o=n[i],s=o.length,a=r[i]=[],c,u=0;u<s;++u)(c=o[u])&&t.call(c,c.__data__,u,o)&&a.push(c);return new X(r,this._parents,this._name,this._id)}function Ci(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),s=new Array(r),a=0;a<o;++a)for(var c=n[a],u=e[a],f=c.length,l=s[a]=new Array(f),p,d=0;d<f;++d)(p=c[d]||u[d])&&(l[d]=p);for(;a<r;++a)s[a]=n[a];return new X(s,this._parents,this._name,this._id)}function ki(t){return(t+"").trim().split(/^|\s+/).every(function(n){var e=n.indexOf(".");return e>=0&&(n=n.slice(0,e)),!n||n==="start"})}function Bi(t,n,e){var r,i,o=ki(n)?Yt:M;return function(){var s=o(this,t),a=s.on;a!==r&&(i=(r=a).copy()).on(n,e),s.on=i}}function Mi(t,n){var e=this._id;return arguments.length<2?A(this.node(),e).on.on(t):this.each(Bi(e,t,n))}function Ti(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}function Ii(){return this.on("end.remove",Ti(this._id))}function Ri(t){var n=this._name,e=this._id;typeof t!="function"&&(t=Lt(t));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s)for(var a=r[s],c=a.length,u=o[s]=new Array(c),f,l,p=0;p<c;++p)(f=a[p])&&(l=t.call(f,f.__data__,p,a))&&("__data__"in f&&(l.__data__=f.__data__),u[p]=l,$t(u[p],n,e,p,u,A(f,e)));return new X(o,this._parents,n,e)}function Oi(t){var n=this._name,e=this._id;typeof t!="function"&&(t=yn(t));for(var r=this._groups,i=r.length,o=[],s=[],a=0;a<i;++a)for(var c=r[a],u=c.length,f,l=0;l<u;++l)if(f=c[l]){for(var p=t.call(f,f.__data__,l,c),d,m=A(f,e),w=0,x=p.length;w<x;++w)(d=p[w])&&$t(d,n,e,w,p,m);o.push(p),s.push(f)}return new X(o,s,n,e)}var Xi=ot.prototype.constructor;function Hi(){return new Xi(this._groups,this._parents)}function Li(t,n){var e,r,i;return function(){var o=K(this,t),s=(this.style.removeProperty(t),K(this,t));return o===s?null:o===e&&s===r?i:i=n(e=o,r=s)}}function Dn(t){return function(){this.style.removeProperty(t)}}function Fi(t,n,e){var r,i=e+"",o;return function(){var s=K(this,t);return s===i?null:s===r?o:o=n(r=s,e)}}function Pi(t,n,e){var r,i,o;return function(){var s=K(this,t),a=e(this),c=a+"";return a==null&&(c=a=(this.style.removeProperty(t),K(this,t))),s===c?null:s===r&&c===i?o:(i=c,o=n(r=s,a))}}function Di(t,n){var e,r,i,o="style."+n,s="end."+o,a;return function(){var c=M(this,t),u=c.on,f=c.value[o]==null?a||(a=Dn(n)):void 0;(u!==e||i!==f)&&(r=(e=u).copy()).on(s,i=f),c.on=r}}function Yi(t,n,e){var r=(t+="")=="transform"?zr:Pn;return n==null?this.styleTween(t,Li(t,r)).on("end.style."+t,Dn(t)):typeof n=="function"?this.styleTween(t,Pi(t,r,qt(this,"style."+t,n))).each(Di(this._id,t)):this.styleTween(t,Fi(t,r,n),e).on("end.style."+t,null)}function qi(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}function Vi(t,n,e){var r,i;function o(){var s=n.apply(this,arguments);return s!==i&&(r=(i=s)&&qi(t,s,e)),r}return o._value=n,o}function zi(t,n,e){var r="style."+(t+="");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;return this.tween(r,Vi(t,n,e??""))}function Ui(t){return function(){this.textContent=t}}function Gi(t){return function(){var n=t(this);this.textContent=n??""}}function Ki(t){return this.tween("text",typeof t=="function"?Gi(qt(this,"text",t)):Ui(t==null?"":t+""))}function Wi(t){return function(n){this.textContent=t.call(this,n)}}function Ji(t){var n,e;function r(){var i=t.apply(this,arguments);return i!==e&&(n=(e=i)&&Wi(i)),n}return r._value=t,r}function Qi(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,Ji(t))}function Zi(){for(var t=this._name,n=this._id,e=Yn(),r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],a=s.length,c,u=0;u<a;++u)if(c=s[u]){var f=A(c,n);$t(c,t,e,u,s,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new X(r,this._parents,t,e)}function ji(){var t,n,e=this,r=e._id,i=e.size();return new Promise(function(o,s){var a={value:s},c={value:function(){--i===0&&o()}};e.each(function(){var u=M(this,r),f=u.on;f!==t&&(n=(t=f).copy(),n._.cancel.push(a),n._.interrupt.push(a),n._.end.push(c)),u.on=n}),i===0&&o()})}var to=0;function X(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function Yn(){return++to}var O=ot.prototype;X.prototype={constructor:X,select:Ri,selectAll:Oi,selectChild:O.selectChild,selectChildren:O.selectChildren,filter:Ai,merge:Ci,selection:Hi,transition:Zi,call:O.call,nodes:O.nodes,node:O.node,size:O.size,empty:O.empty,each:O.each,on:Mi,attr:li,attrTween:mi,style:Yi,styleTween:zi,text:Ki,textTween:Qi,remove:Ii,tween:ii,delay:yi,duration:bi,ease:Si,easeVarying:Ni,end:ji,[Symbol.iterator]:O[Symbol.iterator]};function no(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var eo={time:null,delay:0,duration:250,ease:no};function ro(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))throw new Error(`transition ${n} not found`);return e}function io(t){var n,e;t instanceof X?(n=t._id,t=t._name):(n=Yn(),(e=eo).time=Dt(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],a=s.length,c,u=0;u<a;++u)(c=s[u])&&$t(c,t,n,u,s,e||ro(c,n));return new X(r,this._parents,t,n)}ot.prototype.interrupt=ni;ot.prototype.transition=io;function j(t,n,e){this.k=t,this.x=n,this.y=e}j.prototype={constructor:j,scale:function(t){return t===1?this:new j(this.k*t,this.x,this.y)},translate:function(t,n){return t===0&n===0?this:new j(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};j.prototype;let E=[],tt=[],G=new Map;async function oo(){const t=await window.gitopo.git.exec('log --all --format="%H|%P|%ct|%s" --date-order -1000');if(!t.success)return console.error("Failed to fetch commits:",t.error),[];const n=[],e=t.output.trim().split(`
|
|
2
|
+
`);for(const r of e){const i=r.split("|");if(i.length>=4){const o=i[0],s=i[1],a=parseInt(i[2],10),c=i.slice(3).join("|"),u=s.trim()?s.trim().split(" "):[];n.push({hash:o,parents:u,timestamp:a,message:c})}}return n.sort((r,i)=>i.timestamp-r.timestamp),n}async function so(){const t=await window.gitopo.git.exec('branch -a --format="%(refname:short) %(objectname)"');if(!t.success)return console.error("Failed to fetch branches:",t.error),[];const n=[],e=t.output.trim().split(`
|
|
3
|
+
`);for(const r of e){const i=r.trim().split(" ");if(i.length>=2){const o=i[0],s=i[1];n.push({name:o,hash:s})}}return n}function ao(t){const n=["branch1","branch2","branch3"],e=t.find(r=>r.name==="main"||r.name==="master");n.forEach((r,i)=>{const o=document.getElementById(r);o.innerHTML="";const s=document.createElement("option");s.value="",s.textContent="----",o.appendChild(s),t.forEach(a=>{const c=document.createElement("option");c.value=a.name,c.textContent=a.name,o.appendChild(c)}),i===0&&e&&(o.value=e.name),o.addEventListener("change",()=>Ht())})}function co(t){const n=tt.find(i=>i.name===t);if(!n)return new Set;const e=new Set;let r=n.hash;for(;r;){e.add(r);const i=G.get(r);if(i&&i.parents.length>0)r=i.parents[0];else break}return e}function uo(t,n=new Set){const e=[],r=new Set,i=new Map;for(const c of E)for(const u of c.parents)i.has(u)||i.set(u,[]),i.get(u).push(c.hash);function o(c){const u=new Set,f=[c];for(;f.length>0;){const l=f.pop();if(u.has(l)||t.has(l)||n.has(l)||r.has(l))continue;const p=G.get(l);if(!p)continue;u.add(l);for(const m of p.parents)!t.has(m)&&!n.has(m)&&!u.has(m)&&f.push(m);const d=i.get(l)||[];for(const m of d)!t.has(m)&&!n.has(m)&&!u.has(m)&&f.push(m)}return u}function s(c){for(const u of c){const f=G.get(u);if(f){for(const l of f.parents)if(!t.has(l)&&!c.has(l))return!1}}return!0}function a(c){for(const u of t){const f=G.get(u);if(!(!f||f.parents.length<2)){for(let l=1;l<f.parents.length;l++)if(c.has(f.parents[l]))return u}}return null}for(const c of E){if(t.has(c.hash)||n.has(c.hash)||r.has(c.hash))continue;const u=o(c.hash);u.size>0&&s(u)&&(u.forEach(f=>r.add(f)),e.push({mergeCommit:a(u),commits:u}))}return e}function fo(){const t=[];return["branch1","branch2","branch3"].forEach(n=>{const e=document.getElementById(n);e&&e.value&&t.push(e.value)}),t}function Ht(){const t=nn("#graph");t.selectAll("*").remove();const n=nn("#app");n.selectAll(".tooltip").remove();const e=document.getElementById("controls").offsetHeight,r=window.innerWidth,i=window.innerHeight-e;t.attr("width",r).attr("height",i);const o=6,s=30,a=150,c=30,u=50,f=50,p=fo().map(h=>({name:h,lineage:co(h)})),d=new Set;p.forEach(({lineage:h})=>{h.forEach(g=>d.add(g))});const m=p.map(({name:h,lineage:g})=>{const _=new Set;p.forEach(b=>{b.name!==h&&b.lineage.forEach(T=>_.add(T))});const y=uo(g,_);return{name:h,lineage:g,subBranches:y}}),w=new Map;tt.forEach(h=>{w.has(h.hash)||w.set(h.hash,[]),w.get(h.hash).push(h.name)});const x=new Map;E.forEach(h=>{x.set(h.hash,{mainCol:m.length,subOffset:0,isSubBranch:!1})}),m.forEach((h,g)=>{for(const _ of h.lineage)x.set(_,{mainCol:g,subOffset:0,isSubBranch:!1})});let St=0;m.forEach((h,g)=>{const _=new Map;h.subBranches.forEach(y=>{const b=`sb-${St++}`,T=[];y.commits.forEach($=>{const R=E.findIndex(At=>At.hash===$);R>=0&&T.push(R)});let I=1,P=!0;for(;P;){P=!1;for(const $ of T)if((_.get($)||new Set).has(I)){P=!0,I++;break}}for(const $ of T)_.has($)||_.set($,new Set),_.get($).add(I);y.commits.forEach($=>{x.set($,{mainCol:g,subOffset:I,isSubBranch:!0,subBranchId:b})})})});const C=new Map;let L=f;for(let h=0;h<=m.length;h++)if(C.set(h,L),h<m.length){let g=0;E.forEach(_=>{const y=x.get(_.hash);y.mainCol===h&&y.subOffset>g&&(g=y.subOffset)}),L+=a+g*c}const k=new Map;E.forEach((h,g)=>{const _=x.get(h.hash),b=C.get(_.mainCol)+_.subOffset*c;k.set(h.hash,{col:_.mainCol,subOffset:_.subOffset,row:g,x:b,y:u+g*s,isSubBranch:_.isSubBranch,subBranchId:_.subBranchId||null})});const at=Array.from(x.values()).some(h=>h.mainCol===m.length),F=t.append("g").attr("class","main-group"),Et=n.append("div").attr("class","tooltip").style("opacity",0);m.forEach((h,g)=>{F.append("text").attr("x",C.get(g)).attr("y",25).attr("fill","#4fc3f7").attr("font-size","14px").attr("font-weight","bold").text(h.name)}),at&&F.append("text").attr("x",C.get(m.length)).attr("y",25).attr("fill","#888").attr("font-size","14px").text("Other"),E.forEach(h=>{const g=k.get(h.hash);g&&h.parents.forEach(_=>{const y=k.get(_);if(y){if(g.col===m.length||y.col===m.length)return;const b=g.x,T=g.y,I=y.x,P=y.y;let $;if(b===I)$=`M ${b} ${T} L ${I} ${P}`;else{const Zt=(T+P)/2;$=`M ${b} ${T} C ${b} ${Zt}, ${I} ${Zt}, ${I} ${P}`}const R=g.subBranchId||y.subBranchId||null,At=g.isSubBranch||y.isSubBranch,qn=F.append("path").attr("d",$).attr("fill","none").attr("stroke",At?"#555":"#666").attr("stroke-width",g.isSubBranch&&y.isSubBranch?1:1.5).attr("stroke-opacity",.6).attr("class",R?`edge edge-${R}`:"edge");R&&qn.style("cursor","pointer").on("mouseenter",()=>{F.selectAll(`.edge-${R}`).attr("stroke","#4fc3f7").attr("stroke-width",2.5).attr("stroke-opacity",1)}).on("mouseleave",()=>{F.selectAll(`.edge-${R}`).attr("stroke","#555").attr("stroke-width",1).attr("stroke-opacity",.6)})}})}),F.selectAll("g.node").data(E).enter().append("g").attr("class","node").attr("transform",h=>{const g=k.get(h.hash);return g?`translate(${g.x}, ${g.y})`:"translate(-100, -100)"}).append("circle").attr("r",h=>{const g=k.get(h.hash);return g.isSubBranch?o*.6:g.col<m.length?o:o*.7}).attr("fill",h=>{const g=k.get(h.hash);return g.isSubBranch?"#a0a0a0":g.col<m.length?w.has(h.hash)?"#4fc3f7":"#fff":"#888"}).attr("stroke","#333").attr("stroke-width",h=>{const g=k.get(h.hash);return g.isSubBranch?1:g.col<m.length?2:1}).style("cursor","pointer").on("mouseenter",(h,g)=>{const _=w.get(g.hash),y=_?`[${_.join(", ")}]<br/>`:"",b=new Date(g.timestamp*1e3).toLocaleString();Et.html(`<strong>${g.hash.substring(0,7)}</strong><br/>${y}${g.message}<br/><span class="date">${b}</span>`).style("left",h.pageX+15+"px").style("top",h.pageY-10+"px").style("opacity",1)}).on("mousemove",h=>{Et.style("left",h.pageX+15+"px").style("top",h.pageY-10+"px")}).on("mouseleave",()=>{Et.style("opacity",0)});let V=0,z=0,ct=!1,Vt=0,zt=0,Ut=0,Gt=0;function Nt(){F.attr("transform",`translate(${V}, ${z})`)}t.on("wheel",h=>{h.preventDefault(),V-=h.deltaX,z-=h.deltaY,Nt()}),t.on("mousedown",h=>{h.button===0&&(ct=!0,Vt=h.clientX,zt=h.clientY,Ut=V,Gt=z,h.preventDefault())}),t.on("mousemove",h=>{ct&&(V=Ut+(h.clientX-Vt),z=Gt+(h.clientY-zt),Nt())}),t.on("mouseup",h=>{h.button===0&&(ct=!1)}),t.on("mouseleave",()=>{ct=!1});let Kt=0,Wt=0,Jt=0,Qt=0;t.on("touchstart",h=>{if(h.touches.length===1){const g=h.touches[0];Kt=g.clientX,Wt=g.clientY,Jt=V,Qt=z}}),t.on("touchmove",h=>{if(h.touches.length===1){h.preventDefault();const g=h.touches[0];V=Jt+(g.clientX-Kt),z=Qt+(g.clientY-Wt),Nt()}}),t.on("contextmenu",h=>{h.preventDefault()})}async function lo(){[E,tt]=await Promise.all([oo(),so()]),G.clear(),E.forEach(t=>G.set(t.hash,t)),console.log("Commits:",E.length),console.log("Branches:",tt.length),ao(tt),Ht(),window.addEventListener("resize",()=>{Ht()})}lo();
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var nn={value:()=>{}};function Ae(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new _t(n)}function _t(t){this._=t}function rn(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}_t.prototype=Ae.prototype={constructor:_t,on:function(t,e){var n=this._,r=rn(t+"",n),i,o=-1,s=r.length;if(arguments.length<2){for(;++o<s;)if((i=(t=r[o]).type)&&(i=on(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<s;)if(i=(t=r[o]).type)n[i]=fe(n[i],t.name,e);else if(e==null)for(i in n)n[i]=fe(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new _t(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function on(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function fe(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=nn,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Yt="http://www.w3.org/1999/xhtml";const he={svg:"http://www.w3.org/2000/svg",xhtml:Yt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ct(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),he.hasOwnProperty(e)?{space:he[e],local:t}:t}function sn(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Yt&&e.documentElement.namespaceURI===Yt?e.createElement(t):e.createElementNS(n,t)}}function an(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ce(t){var e=Ct(t);return(e.local?an:sn)(e)}function cn(){}function Jt(t){return t==null?cn:function(){return this.querySelector(t)}}function ln(t){typeof t!="function"&&(t=Jt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,a=r[i]=new Array(s),c,l,u=0;u<s;++u)(c=o[u])&&(l=t.call(c,c.__data__,u,o))&&("__data__"in c&&(l.__data__=c.__data__),a[u]=l);return new C(r,this._parents)}function un(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function fn(){return[]}function ke(t){return t==null?fn:function(){return this.querySelectorAll(t)}}function hn(t){return function(){return un(t.apply(this,arguments))}}function pn(t){typeof t=="function"?t=hn(t):t=ke(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var s=e[o],a=s.length,c,l=0;l<a;++l)(c=s[l])&&(r.push(t.call(c,c.__data__,l,s)),i.push(c));return new C(r,i)}function Re(t){return function(){return this.matches(t)}}function Me(t){return function(e){return e.matches(t)}}var dn=Array.prototype.find;function gn(t){return function(){return dn.call(this.children,t)}}function mn(){return this.firstElementChild}function yn(t){return this.select(t==null?mn:gn(typeof t=="function"?t:Me(t)))}var wn=Array.prototype.filter;function _n(){return Array.from(this.children)}function xn(t){return function(){return wn.call(this.children,t)}}function vn(t){return this.selectAll(t==null?_n:xn(typeof t=="function"?t:Me(t)))}function bn(t){typeof t!="function"&&(t=Re(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,a=r[i]=[],c,l=0;l<s;++l)(c=o[l])&&t.call(c,c.__data__,l,o)&&a.push(c);return new C(r,this._parents)}function Be(t){return new Array(t.length)}function $n(){return new C(this._enter||this._groups.map(Be),this._parents)}function bt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}bt.prototype={constructor:bt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function En(t){return function(){return t}}function Sn(t,e,n,r,i,o){for(var s=0,a,c=e.length,l=o.length;s<l;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new bt(t,o[s]);for(;s<c;++s)(a=e[s])&&(i[s]=a)}function Nn(t,e,n,r,i,o,s){var a,c,l=new Map,u=e.length,h=o.length,d=new Array(u),g;for(a=0;a<u;++a)(c=e[a])&&(d[a]=g=s.call(c,c.__data__,a,e)+"",l.has(g)?i[a]=c:l.set(g,c));for(a=0;a<h;++a)g=s.call(t,o[a],a,o)+"",(c=l.get(g))?(r[a]=c,c.__data__=o[a],l.delete(g)):n[a]=new bt(t,o[a]);for(a=0;a<u;++a)(c=e[a])&&l.get(d[a])===c&&(i[a]=c)}function An(t){return t.__data__}function Cn(t,e){if(!arguments.length)return Array.from(this,An);var n=e?Nn:Sn,r=this._parents,i=this._groups;typeof t!="function"&&(t=En(t));for(var o=i.length,s=new Array(o),a=new Array(o),c=new Array(o),l=0;l<o;++l){var u=r[l],h=i[l],d=h.length,g=kn(t.call(u,u&&u.__data__,l,r)),m=g.length,x=a[l]=new Array(m),S=s[l]=new Array(m),Mt=c[l]=new Array(d);n(u,h,x,S,Mt,g,e);for(var B=0,Y=0,N,ft;B<m;++B)if(N=x[B]){for(B>=Y&&(Y=B+1);!(ft=S[Y])&&++Y<m;);N._next=ft||null}}return s=new C(s,r),s._enter=a,s._exit=c,s}function kn(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Rn(){return new C(this._exit||this._groups.map(Be),this._parents)}function Mn(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function Bn(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,s=Math.min(i,o),a=new Array(i),c=0;c<s;++c)for(var l=n[c],u=r[c],h=l.length,d=a[c]=new Array(h),g,m=0;m<h;++m)(g=l[m]||u[m])&&(d[m]=g);for(;c<i;++c)a[c]=n[c];return new C(a,this._parents)}function Tn(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],s;--i>=0;)(s=r[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function In(t){t||(t=On);function e(h,d){return h&&d?t(h.__data__,d.__data__):!h-!d}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,c=i[o]=new Array(a),l,u=0;u<a;++u)(l=s[u])&&(c[u]=l);c.sort(e)}return new C(i,this._parents).order()}function On(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Pn(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Fn(){return Array.from(this)}function Xn(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var s=r[i];if(s)return s}return null}function Hn(){let t=0;for(const e of this)++t;return t}function Ln(){return!this.node()}function Yn(t){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])&&t.call(a,a.__data__,o,i);return this}function Dn(t){return function(){this.removeAttribute(t)}}function qn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Vn(t,e){return function(){this.setAttribute(t,e)}}function zn(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Un(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Zn(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Kn(t,e){var n=Ct(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?qn:Dn:typeof e=="function"?n.local?Zn:Un:n.local?zn:Vn)(n,e))}function Te(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Wn(t){return function(){this.style.removeProperty(t)}}function Gn(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Jn(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Qn(t,e,n){return arguments.length>1?this.each((e==null?Wn:typeof e=="function"?Jn:Gn)(t,e,n??"")):G(this.node(),t)}function G(t,e){return t.style.getPropertyValue(e)||Te(t).getComputedStyle(t,null).getPropertyValue(e)}function jn(t){return function(){delete this[t]}}function tr(t,e){return function(){this[t]=e}}function er(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function nr(t,e){return arguments.length>1?this.each((e==null?jn:typeof e=="function"?er:tr)(t,e)):this.node()[t]}function Ie(t){return t.trim().split(/^|\s+/)}function Qt(t){return t.classList||new Oe(t)}function Oe(t){this._node=t,this._names=Ie(t.getAttribute("class")||"")}Oe.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Pe(t,e){for(var n=Qt(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Fe(t,e){for(var n=Qt(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function rr(t){return function(){Pe(this,t)}}function ir(t){return function(){Fe(this,t)}}function or(t,e){return function(){(e.apply(this,arguments)?Pe:Fe)(this,t)}}function sr(t,e){var n=Ie(t+"");if(arguments.length<2){for(var r=Qt(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?or:e?rr:ir)(n,e))}function ar(){this.textContent=""}function cr(t){return function(){this.textContent=t}}function lr(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function ur(t){return arguments.length?this.each(t==null?ar:(typeof t=="function"?lr:cr)(t)):this.node().textContent}function fr(){this.innerHTML=""}function hr(t){return function(){this.innerHTML=t}}function pr(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function dr(t){return arguments.length?this.each(t==null?fr:(typeof t=="function"?pr:hr)(t)):this.node().innerHTML}function gr(){this.nextSibling&&this.parentNode.appendChild(this)}function mr(){return this.each(gr)}function yr(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function wr(){return this.each(yr)}function _r(t){var e=typeof t=="function"?t:Ce(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function xr(){return null}function vr(t,e){var n=typeof t=="function"?t:Ce(t),r=e==null?xr:typeof e=="function"?e:Jt(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function br(){var t=this.parentNode;t&&t.removeChild(this)}function $r(){return this.each(br)}function Er(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Sr(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Nr(t){return this.select(t?Sr:Er)}function Ar(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Cr(t){return function(e){t.call(this,e,this.__data__)}}function kr(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function Rr(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function Mr(t,e,n){return function(){var r=this.__on,i,o=Cr(e);if(r){for(var s=0,a=r.length;s<a;++s)if((i=r[s]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function Br(t,e,n){var r=kr(t+""),i,o=r.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var c=0,l=a.length,u;c<l;++c)for(i=0,u=a[c];i<o;++i)if((s=r[i]).type===u.type&&s.name===u.name)return u.value}return}for(a=e?Mr:Rr,i=0;i<o;++i)this.each(a(r[i],e,n));return this}function Xe(t,e,n){var r=Te(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Tr(t,e){return function(){return Xe(this,t,e)}}function Ir(t,e){return function(){return Xe(this,t,e.apply(this,arguments))}}function Or(t,e){return this.each((typeof e=="function"?Ir:Tr)(t,e))}function*Pr(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,s;i<o;++i)(s=r[i])&&(yield s)}var He=[null];function C(t,e){this._groups=t,this._parents=e}function lt(){return new C([[document.documentElement]],He)}function Fr(){return this}C.prototype=lt.prototype={constructor:C,select:ln,selectAll:pn,selectChild:yn,selectChildren:vn,filter:bn,data:Cn,enter:$n,exit:Rn,join:Mn,merge:Bn,selection:Fr,order:Tn,sort:In,call:Pn,nodes:Fn,node:Xn,size:Hn,empty:Ln,each:Yn,attr:Kn,style:Qn,property:nr,classed:sr,text:ur,html:dr,raise:mr,lower:wr,append:_r,insert:vr,remove:$r,clone:Nr,datum:Ar,on:Br,dispatch:Or,[Symbol.iterator]:Pr};function Ft(t){return typeof t=="string"?new C([[document.querySelector(t)]],[document.documentElement]):new C([[t]],He)}function jt(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Le(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ut(){}var ot=.7,$t=1/ot,K="\\s*([+-]?\\d+)\\s*",st="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",I="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Xr=/^#([0-9a-f]{3,8})$/,Hr=new RegExp(`^rgb\\(${K},${K},${K}\\)$`),Lr=new RegExp(`^rgb\\(${I},${I},${I}\\)$`),Yr=new RegExp(`^rgba\\(${K},${K},${K},${st}\\)$`),Dr=new RegExp(`^rgba\\(${I},${I},${I},${st}\\)$`),qr=new RegExp(`^hsl\\(${st},${I},${I}\\)$`),Vr=new RegExp(`^hsla\\(${st},${I},${I},${st}\\)$`),pe={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};jt(ut,at,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:de,formatHex:de,formatHex8:zr,formatHsl:Ur,formatRgb:ge,toString:ge});function de(){return this.rgb().formatHex()}function zr(){return this.rgb().formatHex8()}function Ur(){return Ye(this).formatHsl()}function ge(){return this.rgb().formatRgb()}function at(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Xr.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?me(e):n===3?new A(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?mt(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?mt(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Hr.exec(t))?new A(e[1],e[2],e[3],1):(e=Lr.exec(t))?new A(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Yr.exec(t))?mt(e[1],e[2],e[3],e[4]):(e=Dr.exec(t))?mt(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=qr.exec(t))?_e(e[1],e[2]/100,e[3]/100,1):(e=Vr.exec(t))?_e(e[1],e[2]/100,e[3]/100,e[4]):pe.hasOwnProperty(t)?me(pe[t]):t==="transparent"?new A(NaN,NaN,NaN,0):null}function me(t){return new A(t>>16&255,t>>8&255,t&255,1)}function mt(t,e,n,r){return r<=0&&(t=e=n=NaN),new A(t,e,n,r)}function Zr(t){return t instanceof ut||(t=at(t)),t?(t=t.rgb(),new A(t.r,t.g,t.b,t.opacity)):new A}function Dt(t,e,n,r){return arguments.length===1?Zr(t):new A(t,e,n,r??1)}function A(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}jt(A,Dt,Le(ut,{brighter(t){return t=t==null?$t:Math.pow($t,t),new A(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?ot:Math.pow(ot,t),new A(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new A(z(this.r),z(this.g),z(this.b),Et(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ye,formatHex:ye,formatHex8:Kr,formatRgb:we,toString:we}));function ye(){return`#${V(this.r)}${V(this.g)}${V(this.b)}`}function Kr(){return`#${V(this.r)}${V(this.g)}${V(this.b)}${V((isNaN(this.opacity)?1:this.opacity)*255)}`}function we(){const t=Et(this.opacity);return`${t===1?"rgb(":"rgba("}${z(this.r)}, ${z(this.g)}, ${z(this.b)}${t===1?")":`, ${t})`}`}function Et(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function z(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function V(t){return t=z(t),(t<16?"0":"")+t.toString(16)}function _e(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new R(t,e,n,r)}function Ye(t){if(t instanceof R)return new R(t.h,t.s,t.l,t.opacity);if(t instanceof ut||(t=at(t)),!t)return new R;if(t instanceof R)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),s=NaN,a=o-i,c=(o+i)/2;return a?(e===o?s=(n-r)/a+(n<r)*6:n===o?s=(r-e)/a+2:s=(e-n)/a+4,a/=c<.5?o+i:2-o-i,s*=60):a=c>0&&c<1?0:s,new R(s,a,c,t.opacity)}function Wr(t,e,n,r){return arguments.length===1?Ye(t):new R(t,e,n,r??1)}function R(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}jt(R,Wr,Le(ut,{brighter(t){return t=t==null?$t:Math.pow($t,t),new R(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?ot:Math.pow(ot,t),new R(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new A(Xt(t>=240?t-240:t+120,i,r),Xt(t,i,r),Xt(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new R(xe(this.h),yt(this.s),yt(this.l),Et(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Et(this.opacity);return`${t===1?"hsl(":"hsla("}${xe(this.h)}, ${yt(this.s)*100}%, ${yt(this.l)*100}%${t===1?")":`, ${t})`}`}}));function xe(t){return t=(t||0)%360,t<0?t+360:t}function yt(t){return Math.max(0,Math.min(1,t||0))}function Xt(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const De=t=>()=>t;function Gr(t,e){return function(n){return t+n*e}}function Jr(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function Qr(t){return(t=+t)==1?qe:function(e,n){return n-e?Jr(e,n,t):De(isNaN(e)?n:e)}}function qe(t,e){var n=e-t;return n?Gr(t,n):De(isNaN(t)?e:t)}const ve=(function t(e){var n=Qr(e);function r(i,o){var s=n((i=Dt(i)).r,(o=Dt(o)).r),a=n(i.g,o.g),c=n(i.b,o.b),l=qe(i.opacity,o.opacity);return function(u){return i.r=s(u),i.g=a(u),i.b=c(u),i.opacity=l(u),i+""}}return r.gamma=t,r})(1);function L(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var qt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ht=new RegExp(qt.source,"g");function jr(t){return function(){return t}}function ti(t){return function(e){return t(e)+""}}function ei(t,e){var n=qt.lastIndex=Ht.lastIndex=0,r,i,o,s=-1,a=[],c=[];for(t=t+"",e=e+"";(r=qt.exec(t))&&(i=Ht.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(r=r[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,c.push({i:s,x:L(r,i)})),n=Ht.lastIndex;return n<e.length&&(o=e.slice(n),a[s]?a[s]+=o:a[++s]=o),a.length<2?c[0]?ti(c[0].x):jr(e):(e=c.length,function(l){for(var u=0,h;u<e;++u)a[(h=c[u]).i]=h.x(l);return a.join("")})}var be=180/Math.PI,Vt={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ve(t,e,n,r,i,o){var s,a,c;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,c/=a),t*r<e*n&&(t=-t,e=-e,c=-c,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*be,skewX:Math.atan(c)*be,scaleX:s,scaleY:a}}var wt;function ni(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Vt:Ve(e.a,e.b,e.c,e.d,e.e,e.f)}function ri(t){return t==null||(wt||(wt=document.createElementNS("http://www.w3.org/2000/svg","g")),wt.setAttribute("transform",t),!(t=wt.transform.baseVal.consolidate()))?Vt:(t=t.matrix,Ve(t.a,t.b,t.c,t.d,t.e,t.f))}function ze(t,e,n,r){function i(l){return l.length?l.pop()+" ":""}function o(l,u,h,d,g,m){if(l!==h||u!==d){var x=g.push("translate(",null,e,null,n);m.push({i:x-4,x:L(l,h)},{i:x-2,x:L(u,d)})}else(h||d)&&g.push("translate("+h+e+d+n)}function s(l,u,h,d){l!==u?(l-u>180?u+=360:u-l>180&&(l+=360),d.push({i:h.push(i(h)+"rotate(",null,r)-2,x:L(l,u)})):u&&h.push(i(h)+"rotate("+u+r)}function a(l,u,h,d){l!==u?d.push({i:h.push(i(h)+"skewX(",null,r)-2,x:L(l,u)}):u&&h.push(i(h)+"skewX("+u+r)}function c(l,u,h,d,g,m){if(l!==h||u!==d){var x=g.push(i(g)+"scale(",null,",",null,")");m.push({i:x-4,x:L(l,h)},{i:x-2,x:L(u,d)})}else(h!==1||d!==1)&&g.push(i(g)+"scale("+h+","+d+")")}return function(l,u){var h=[],d=[];return l=t(l),u=t(u),o(l.translateX,l.translateY,u.translateX,u.translateY,h,d),s(l.rotate,u.rotate,h,d),a(l.skewX,u.skewX,h,d),c(l.scaleX,l.scaleY,u.scaleX,u.scaleY,h,d),l=u=null,function(g){for(var m=-1,x=d.length,S;++m<x;)h[(S=d[m]).i]=S.x(g);return h.join("")}}}var ii=ze(ni,"px, ","px)","deg)"),oi=ze(ri,", ",")",")"),J=0,et=0,tt=0,Ue=1e3,St,nt,Nt=0,U=0,kt=0,ct=typeof performance=="object"&&performance.now?performance:Date,Ze=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function te(){return U||(Ze(si),U=ct.now()+kt)}function si(){U=0}function At(){this._call=this._time=this._next=null}At.prototype=Ke.prototype={constructor:At,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?te():+n)+(e==null?0:+e),!this._next&&nt!==this&&(nt?nt._next=this:St=this,nt=this),this._call=t,this._time=n,zt()},stop:function(){this._call&&(this._call=null,this._time=1/0,zt())}};function Ke(t,e,n){var r=new At;return r.restart(t,e,n),r}function ai(){te(),++J;for(var t=St,e;t;)(e=U-t._time)>=0&&t._call.call(void 0,e),t=t._next;--J}function $e(){U=(Nt=ct.now())+kt,J=et=0;try{ai()}finally{J=0,li(),U=0}}function ci(){var t=ct.now(),e=t-Nt;e>Ue&&(kt-=e,Nt=t)}function li(){for(var t,e=St,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:St=n);nt=t,zt(r)}function zt(t){if(!J){et&&(et=clearTimeout(et));var e=t-U;e>24?(t<1/0&&(et=setTimeout($e,t-ct.now()-kt)),tt&&(tt=clearInterval(tt))):(tt||(Nt=ct.now(),tt=setInterval(ci,Ue)),J=1,Ze($e))}}function Ee(t,e,n){var r=new At;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var ui=Ae("start","end","cancel","interrupt"),fi=[],We=0,Se=1,Ut=2,xt=3,Ne=4,Zt=5,vt=6;function Rt(t,e,n,r,i,o){var s=t.__transition;if(!s)t.__transition={};else if(n in s)return;hi(t,n,{name:e,index:r,group:i,on:ui,tween:fi,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:We})}function ee(t,e){var n=M(t,e);if(n.state>We)throw new Error("too late; already scheduled");return n}function O(t,e){var n=M(t,e);if(n.state>xt)throw new Error("too late; already running");return n}function M(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function hi(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Ke(o,0,n.time);function o(l){n.state=Se,n.timer.restart(s,n.delay,n.time),n.delay<=l&&s(l-n.delay)}function s(l){var u,h,d,g;if(n.state!==Se)return c();for(u in r)if(g=r[u],g.name===n.name){if(g.state===xt)return Ee(s);g.state===Ne?(g.state=vt,g.timer.stop(),g.on.call("interrupt",t,t.__data__,g.index,g.group),delete r[u]):+u<e&&(g.state=vt,g.timer.stop(),g.on.call("cancel",t,t.__data__,g.index,g.group),delete r[u])}if(Ee(function(){n.state===xt&&(n.state=Ne,n.timer.restart(a,n.delay,n.time),a(l))}),n.state=Ut,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Ut){for(n.state=xt,i=new Array(d=n.tween.length),u=0,h=-1;u<d;++u)(g=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=g);i.length=h+1}}function a(l){for(var u=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(c),n.state=Zt,1),h=-1,d=i.length;++h<d;)i[h].call(t,u);n.state===Zt&&(n.on.call("end",t,t.__data__,n.index,n.group),c())}function c(){n.state=vt,n.timer.stop(),delete r[e];for(var l in r)return;delete t.__transition}}function pi(t,e){var n=t.__transition,r,i,o=!0,s;if(n){e=e==null?null:e+"";for(s in n){if((r=n[s]).name!==e){o=!1;continue}i=r.state>Ut&&r.state<Zt,r.state=vt,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[s]}o&&delete t.__transition}}function di(t){return this.each(function(){pi(this,t)})}function gi(t,e){var n,r;return function(){var i=O(this,t),o=i.tween;if(o!==n){r=n=o;for(var s=0,a=r.length;s<a;++s)if(r[s].name===e){r=r.slice(),r.splice(s,1);break}}i.tween=r}}function mi(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=O(this,t),s=o.tween;if(s!==r){i=(r=s).slice();for(var a={name:e,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===e){i[c]=a;break}c===l&&i.push(a)}o.tween=i}}function yi(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=M(this.node(),n).tween,i=0,o=r.length,s;i<o;++i)if((s=r[i]).name===t)return s.value;return null}return this.each((e==null?gi:mi)(n,t,e))}function ne(t,e,n){var r=t._id;return t.each(function(){var i=O(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return M(i,r).value[e]}}function Ge(t,e){var n;return(typeof e=="number"?L:e instanceof at?ve:(n=at(e))?(e=n,ve):ei)(t,e)}function wi(t){return function(){this.removeAttribute(t)}}function _i(t){return function(){this.removeAttributeNS(t.space,t.local)}}function xi(t,e,n){var r,i=n+"",o;return function(){var s=this.getAttribute(t);return s===i?null:s===r?o:o=e(r=s,n)}}function vi(t,e,n){var r,i=n+"",o;return function(){var s=this.getAttributeNS(t.space,t.local);return s===i?null:s===r?o:o=e(r=s,n)}}function bi(t,e,n){var r,i,o;return function(){var s,a=n(this),c;return a==null?void this.removeAttribute(t):(s=this.getAttribute(t),c=a+"",s===c?null:s===r&&c===i?o:(i=c,o=e(r=s,a)))}}function $i(t,e,n){var r,i,o;return function(){var s,a=n(this),c;return a==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),c=a+"",s===c?null:s===r&&c===i?o:(i=c,o=e(r=s,a)))}}function Ei(t,e){var n=Ct(t),r=n==="transform"?oi:Ge;return this.attrTween(t,typeof e=="function"?(n.local?$i:bi)(n,r,ne(this,"attr."+t,e)):e==null?(n.local?_i:wi)(n):(n.local?vi:xi)(n,r,e))}function Si(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Ni(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Ai(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&Ni(t,o)),n}return i._value=e,i}function Ci(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&Si(t,o)),n}return i._value=e,i}function ki(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=Ct(t);return this.tween(n,(r.local?Ai:Ci)(r,e))}function Ri(t,e){return function(){ee(this,t).delay=+e.apply(this,arguments)}}function Mi(t,e){return e=+e,function(){ee(this,t).delay=e}}function Bi(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Ri:Mi)(e,t)):M(this.node(),e).delay}function Ti(t,e){return function(){O(this,t).duration=+e.apply(this,arguments)}}function Ii(t,e){return e=+e,function(){O(this,t).duration=e}}function Oi(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Ti:Ii)(e,t)):M(this.node(),e).duration}function Pi(t,e){if(typeof e!="function")throw new Error;return function(){O(this,t).ease=e}}function Fi(t){var e=this._id;return arguments.length?this.each(Pi(e,t)):M(this.node(),e).ease}function Xi(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;O(this,t).ease=n}}function Hi(t){if(typeof t!="function")throw new Error;return this.each(Xi(this._id,t))}function Li(t){typeof t!="function"&&(t=Re(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,a=r[i]=[],c,l=0;l<s;++l)(c=o[l])&&t.call(c,c.__data__,l,o)&&a.push(c);return new X(r,this._parents,this._name,this._id)}function Yi(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),s=new Array(r),a=0;a<o;++a)for(var c=e[a],l=n[a],u=c.length,h=s[a]=new Array(u),d,g=0;g<u;++g)(d=c[g]||l[g])&&(h[g]=d);for(;a<r;++a)s[a]=e[a];return new X(s,this._parents,this._name,this._id)}function Di(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function qi(t,e,n){var r,i,o=Di(e)?ee:O;return function(){var s=o(this,t),a=s.on;a!==r&&(i=(r=a).copy()).on(e,n),s.on=i}}function Vi(t,e){var n=this._id;return arguments.length<2?M(this.node(),n).on.on(t):this.each(qi(n,t,e))}function zi(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Ui(){return this.on("end.remove",zi(this._id))}function Zi(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Jt(t));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s)for(var a=r[s],c=a.length,l=o[s]=new Array(c),u,h,d=0;d<c;++d)(u=a[d])&&(h=t.call(u,u.__data__,d,a))&&("__data__"in u&&(h.__data__=u.__data__),l[d]=h,Rt(l[d],e,n,d,l,M(u,n)));return new X(o,this._parents,e,n)}function Ki(t){var e=this._name,n=this._id;typeof t!="function"&&(t=ke(t));for(var r=this._groups,i=r.length,o=[],s=[],a=0;a<i;++a)for(var c=r[a],l=c.length,u,h=0;h<l;++h)if(u=c[h]){for(var d=t.call(u,u.__data__,h,c),g,m=M(u,n),x=0,S=d.length;x<S;++x)(g=d[x])&&Rt(g,e,n,x,d,m);o.push(d),s.push(u)}return new X(o,s,e,n)}var Wi=lt.prototype.constructor;function Gi(){return new Wi(this._groups,this._parents)}function Ji(t,e){var n,r,i;return function(){var o=G(this,t),s=(this.style.removeProperty(t),G(this,t));return o===s?null:o===n&&s===r?i:i=e(n=o,r=s)}}function Je(t){return function(){this.style.removeProperty(t)}}function Qi(t,e,n){var r,i=n+"",o;return function(){var s=G(this,t);return s===i?null:s===r?o:o=e(r=s,n)}}function ji(t,e,n){var r,i,o;return function(){var s=G(this,t),a=n(this),c=a+"";return a==null&&(c=a=(this.style.removeProperty(t),G(this,t))),s===c?null:s===r&&c===i?o:(i=c,o=e(r=s,a))}}function to(t,e){var n,r,i,o="style."+e,s="end."+o,a;return function(){var c=O(this,t),l=c.on,u=c.value[o]==null?a||(a=Je(e)):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(s,i=u),c.on=r}}function eo(t,e,n){var r=(t+="")=="transform"?ii:Ge;return e==null?this.styleTween(t,Ji(t,r)).on("end.style."+t,Je(t)):typeof e=="function"?this.styleTween(t,ji(t,r,ne(this,"style."+t,e))).each(to(this._id,t)):this.styleTween(t,Qi(t,r,e),n).on("end.style."+t,null)}function no(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function ro(t,e,n){var r,i;function o(){var s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&no(t,s,n)),r}return o._value=e,o}function io(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,ro(t,e,n??""))}function oo(t){return function(){this.textContent=t}}function so(t){return function(){var e=t(this);this.textContent=e??""}}function ao(t){return this.tween("text",typeof t=="function"?so(ne(this,"text",t)):oo(t==null?"":t+""))}function co(t){return function(e){this.textContent=t.call(this,e)}}function lo(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&co(i)),e}return r._value=t,r}function uo(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,lo(t))}function fo(){for(var t=this._name,e=this._id,n=Qe(),r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],a=s.length,c,l=0;l<a;++l)if(c=s[l]){var u=M(c,e);Rt(c,t,n,l,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new X(r,this._parents,t,n)}function ho(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,s){var a={value:s},c={value:function(){--i===0&&o()}};n.each(function(){var l=O(this,r),u=l.on;u!==t&&(e=(t=u).copy(),e._.cancel.push(a),e._.interrupt.push(a),e._.end.push(c)),l.on=e}),i===0&&o()})}var po=0;function X(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Qe(){return++po}var F=lt.prototype;X.prototype={constructor:X,select:Zi,selectAll:Ki,selectChild:F.selectChild,selectChildren:F.selectChildren,filter:Li,merge:Yi,selection:Gi,transition:fo,call:F.call,nodes:F.nodes,node:F.node,size:F.size,empty:F.empty,each:F.each,on:Vi,attr:Ei,attrTween:ki,style:eo,styleTween:io,text:ao,textTween:uo,remove:Ui,tween:yi,delay:Bi,duration:Oi,ease:Fi,easeVarying:Hi,end:ho,[Symbol.iterator]:F[Symbol.iterator]};function go(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var mo={time:null,delay:0,duration:250,ease:go};function yo(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function wo(t){var e,n;t instanceof X?(e=t._id,t=t._name):(e=Qe(),(n=mo).time=te(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],a=s.length,c,l=0;l<a;++l)(c=s[l])&&Rt(c,t,e,l,s,n||yo(c,e));return new X(r,this._parents,t,e)}lt.prototype.interrupt=di;lt.prototype.transition=wo;function rt(t,e,n){this.k=t,this.x=e,this.y=n}rt.prototype={constructor:rt,scale:function(t){return t===1?this:new rt(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new rt(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};rt.prototype;let k=[],it=[],Kt=[],W=new Map,Lt="",q=1,Wt={};async function _o(){const t=await window.gitopo.git.exec("rev-parse --show-toplevel");if(t.success){const e=t.output.trim();return e.split("/").pop()||e}return"Unknown Repository"}async function xo(){const t=await window.gitopo.config.get();return t.success?t.config:(console.error("Failed to fetch config:",t.error),{})}async function vo(){const t=await window.gitopo.gh.exec("pr list --state open --json number,title,headRefName,headRefOid");if(!t.success)return console.error("Failed to fetch pull requests:",t.error),[];try{return JSON.parse(t.output).map(n=>({number:n.number,title:n.title,branch:n.headRefName,headCommit:n.headRefOid}))}catch(e){return console.error("Failed to parse PR data:",e),[]}}async function bo(){const t=await window.gitopo.git.exec('log --all --format="%H|%P|%ct|%s" --date-order -1000');if(!t.success)return console.error("Failed to fetch commits:",t.error),[];const e=[],n=t.output.trim().split(`
|
|
2
|
+
`);for(const r of n){const i=r.split("|");if(i.length>=4){const o=i[0],s=i[1],a=parseInt(i[2],10),c=i.slice(3).join("|"),l=s.trim()?s.trim().split(" "):[];e.push({hash:o,parents:l,timestamp:a,message:c})}}return e.sort((r,i)=>i.timestamp-r.timestamp),e}async function $o(){const t=await window.gitopo.git.exec('branch -a --format="%(refname:short) %(objectname)"');if(!t.success)return console.error("Failed to fetch branches:",t.error),[];const e=[],n=t.output.trim().split(`
|
|
3
|
+
`);for(const r of n){const i=r.trim().split(" ");if(i.length>=2){const o=i[0],s=i[1];e.push({name:o,hash:s})}}return e}function Eo(t){const e=["branch1","branch2","branch3"],n=Wt.keyBranches||[],r=t.find(i=>i.name==="main"||i.name==="master");e.forEach((i,o)=>{const s=document.getElementById(i);s.innerHTML="";const a=document.createElement("option");if(a.value="",a.textContent="----",s.appendChild(a),t.forEach(c=>{const l=document.createElement("option");l.value=c.name,l.textContent=c.name,s.appendChild(l)}),n[o]){const c=t.find(l=>l.name===n[o]);c&&(s.value=c.name)}else o===0&&r&&(s.value=r.name);s.addEventListener("change",()=>Gt())})}function So(t){const e=it.find(i=>i.name===t);if(!e)return new Set;const n=new Set;let r=e.hash;for(;r;){n.add(r);const i=W.get(r);if(i&&i.parents.length>0)r=i.parents[0];else break}return n}function No(t,e=new Set){const n=[],r=new Set,i=new Map;for(const c of k)for(const l of c.parents)i.has(l)||i.set(l,[]),i.get(l).push(c.hash);function o(c){const l=new Set,u=[c];for(;u.length>0;){const h=u.pop();if(l.has(h)||t.has(h)||e.has(h)||r.has(h))continue;const d=W.get(h);if(!d)continue;l.add(h);for(const m of d.parents)!t.has(m)&&!e.has(m)&&!l.has(m)&&u.push(m);const g=i.get(h)||[];for(const m of g)!t.has(m)&&!e.has(m)&&!l.has(m)&&u.push(m)}return l}function s(c){for(const l of c){const u=W.get(l);if(u){for(const h of u.parents)if(!t.has(h)&&!c.has(h))return!1}}return!0}function a(c){for(const l of t){const u=W.get(l);if(!(!u||u.parents.length<2)){for(let h=1;h<u.parents.length;h++)if(c.has(u.parents[h]))return l}}return null}for(const c of k){if(t.has(c.hash)||e.has(c.hash)||r.has(c.hash))continue;const l=o(c.hash);l.size>0&&s(l)&&(l.forEach(u=>r.add(u)),n.push({mergeCommit:a(l),commits:l}))}return n}function Ao(){const t=[];return["branch1","branch2","branch3"].forEach(e=>{const n=document.getElementById(e);n&&n.value&&t.push(n.value)}),t}function Gt(){const t=Ft("#graph");t.selectAll("*").remove();const e=Ft("#app");e.selectAll(".tooltip").remove();const n=document.getElementById("controls").offsetHeight,r=window.innerWidth,i=window.innerHeight-n;t.attr("width",r).attr("height",i);const o=6,s=30,a=150,c=30,l=50,u=50,d=Ao().map(f=>({name:f,lineage:So(f)})),g=new Set;d.forEach(({lineage:f})=>{f.forEach(p=>g.add(p))});const m=d.map(({name:f,lineage:p})=>{const y=new Set;d.forEach(_=>{_.name!==f&&_.lineage.forEach(v=>y.add(v))});const w=No(p,y);return{name:f,lineage:p,subBranches:w}}),x=new Map;it.forEach(f=>{x.has(f.hash)||x.set(f.hash,[]),x.get(f.hash).push(f.name)});const S=new Map;k.forEach(f=>{S.set(f.hash,{mainCol:m.length,subOffset:0,isSubBranch:!1})}),m.forEach((f,p)=>{for(const y of f.lineage)S.set(y,{mainCol:p,subOffset:0,isSubBranch:!1})});let Mt=0;m.forEach((f,p)=>{const y=new Map;f.subBranches.forEach(w=>{const _=`sb-${Mt++}`,v=[];w.commits.forEach($=>{const T=k.findIndex(D=>D.hash===$);T>=0&&v.push(T)});let b=1,E=!0;for(;E;){E=!1;for(const $ of v)if((y.get($)||new Set).has(b)){E=!0,b++;break}}for(const $ of v)y.has($)||y.set($,new Set),y.get($).add(b);w.commits.forEach($=>{S.set($,{mainCol:p,subOffset:b,isSubBranch:!0,subBranchId:_})})})});const B=new Map;let Y=u;for(let f=0;f<=m.length;f++)if(B.set(f,Y),f<m.length){let p=0;k.forEach(y=>{const w=S.get(y.hash);w.mainCol===f&&w.subOffset>p&&(p=w.subOffset)}),Y+=a+p*c}const N=new Map;k.forEach((f,p)=>{const y=S.get(f.hash),_=B.get(y.mainCol)+y.subOffset*c;N.set(f.hash,{col:y.mainCol,subOffset:y.subOffset,row:p,x:_,y:l+p*s,isSubBranch:y.isSubBranch,subBranchId:y.subBranchId||null})});const ft=Array.from(S.values()).some(f=>f.mainCol===m.length),P=t.append("g").attr("class","main-group"),Bt=e.append("div").attr("class","tooltip").style("opacity",0),ht=["#4CAF50","#2196F3","#FF9800"];m.forEach((f,p)=>{P.append("text").attr("x",B.get(p)).attr("y",25).attr("fill",ht[p]||"#888").attr("font-size","14px").attr("font-weight","bold").text(f.name)}),ft&&P.append("text").attr("x",B.get(m.length)).attr("y",25).attr("fill","#888").attr("font-size","14px").text("Other"),k.forEach(f=>{const p=N.get(f.hash);p&&f.parents.forEach(y=>{const w=N.get(y);if(w){const _=p.col===m.length||w.col===m.length,v=p.x,b=p.y*q,E=w.x,$=w.y*q;let T;if(v===E)T=`M ${v} ${b} L ${E} ${$}`;else{const gt=(b+$)/2;T=`M ${v} ${b} C ${v} ${gt}, ${E} ${gt}, ${E} ${$}`}const D=p.subBranchId||w.subBranchId||null,Ot=p.isSubBranch||w.isSubBranch,tn=!Ot&&!_&&p.col<m.length;let Pt="#666";_?Pt="#444":p.col<m.length&&(Pt=ht[p.col]||"#666");let j=1.5;_?j=1:tn?j=3:Ot&&(j=1.5);const en=P.append("path").attr("d",T).attr("fill","none").attr("stroke",Pt).attr("stroke-width",j).attr("stroke-opacity",_?.4:Ot?.5:.8).attr("stroke-dasharray",_?"4,4":"none").attr("class",D?`edge edge-${D}`:"edge").attr("data-source",f.hash).attr("data-target",y);if(D){const gt=j;en.style("cursor","pointer").on("mouseenter",()=>{P.selectAll(`.edge-${D}`).attr("stroke-width",3).attr("stroke-opacity",.9)}).on("mouseleave",()=>{P.selectAll(`.edge-${D}`).attr("stroke-width",gt).attr("stroke-opacity",.5)})}}})});const Q=new Map;Kt.forEach(f=>{Q.set(f.headCommit,f)});const Tt=P.selectAll("g.node").data(k).enter().append("g").attr("class","node").attr("transform",f=>{const p=N.get(f.hash);return p?`translate(${p.x}, ${p.y*q})`:"translate(-100, -100)"});Tt.filter(f=>Q.has(f.hash)).append("circle").attr("r",o+6).attr("fill","none").attr("stroke","#888").attr("stroke-width",2).attr("stroke-dasharray","3,2"),Tt.append("circle").attr("r",f=>{const p=N.get(f.hash);return p.isSubBranch?o*.6:p.col<m.length?o:o*.7}).attr("fill",f=>{const p=N.get(f.hash);return p.col<m.length?ht[p.col]||"#fff":p.isSubBranch?"#a0a0a0":"#888"}).attr("stroke",f=>{const p=N.get(f.hash);return p.col<m.length&&ht[p.col]||"#333"}).attr("stroke-width",f=>{const p=N.get(f.hash);return p.isSubBranch?1:p.col<m.length?2:1}).style("cursor","pointer").on("mouseenter",(f,p)=>{const y=x.get(p.hash),w=y?`[${y.join(", ")}]<br/>`:"",_=Q.get(p.hash),v=_?`<span class="pr-info">PR #${_.number}: ${_.title}</span><br/>`:"",b=new Date(p.timestamp*1e3).toLocaleString();Bt.html(`<strong>${p.hash.substring(0,7)}</strong><br/>${v}${w}${p.message}<br/><span class="date">${b}</span>`).style("left",f.pageX+15+"px").style("top",f.pageY-10+"px").style("opacity",1)}).on("mousemove",f=>{Bt.style("left",f.pageX+15+"px").style("top",f.pageY-10+"px")}).on("mouseleave",()=>{Bt.style("opacity",0)}),Tt.filter(f=>Q.has(f.hash)).append("text").attr("x",o+10).attr("y",4).attr("fill","#ccc").attr("font-size","11px").text(f=>{const p=Q.get(f.hash);return`PR #${p.number}: ${p.title.substring(0,30)}${p.title.length>30?"...":""}`});let Z=0,H=0,pt=!1,re=0,ie=0,oe=0,se=0;function It(f){return f*q}function dt(){P.attr("transform",`translate(${Z}, ${H})`)}function je(){P.selectAll("g.node").attr("transform",f=>{const p=N.get(f.hash);return p?`translate(${p.x}, ${It(p.y)})`:"translate(-100, -100)"}),P.selectAll("path.edge").attr("d",function(){const f=Ft(this),p=f.attr("data-source"),y=f.attr("data-target"),w=N.get(p),_=N.get(y);if(!w||!_)return"";const v=w.x,b=It(w.y),E=_.x,$=It(_.y);if(v===E)return`M ${v} ${b} L ${E} ${$}`;{const T=(b+$)/2;return`M ${v} ${b} C ${v} ${T}, ${E} ${T}, ${E} ${$}`}})}t.on("wheel",f=>{if(f.preventDefault(),f.ctrlKey||f.metaKey){const p=f.deltaY>0?.9:1.1,_=Math.max(.1,Math.min(5,q*p)),v=t.node().getBoundingClientRect(),b=f.clientY-v.top,E=b-H;H=b-E*(_/q),q=_,je(),dt()}else Z-=f.deltaX,H-=f.deltaY,dt()}),t.on("mousedown",f=>{f.button===0&&(pt=!0,re=f.clientX,ie=f.clientY,oe=Z,se=H,f.preventDefault())}),t.on("mousemove",f=>{pt&&(Z=oe+(f.clientX-re),H=se+(f.clientY-ie),dt())}),t.on("mouseup",f=>{f.button===0&&(pt=!1)}),t.on("mouseleave",()=>{pt=!1});let ae=0,ce=0,le=0,ue=0;t.on("touchstart",f=>{if(f.touches.length===1){const p=f.touches[0];ae=p.clientX,ce=p.clientY,le=Z,ue=H}}),t.on("touchmove",f=>{if(f.touches.length===1){f.preventDefault();const p=f.touches[0];Z=le+(p.clientX-ae),H=ue+(p.clientY-ce),dt()}}),t.on("contextmenu",f=>{f.preventDefault()})}async function Co(){[k,it,Lt,Kt,Wt]=await Promise.all([bo(),$o(),_o(),vo(),xo()]),document.getElementById("repo-name").textContent=Lt,W.clear(),k.forEach(t=>W.set(t.hash,t)),console.log("Repository:",Lt),console.log("Commits:",k.length),console.log("Branches:",it.length),console.log("Open PRs:",Kt.length),console.log("Config:",Wt),Eo(it),Gt(),window.addEventListener("resize",()=>{Gt()})}Co();
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Ke={value:()=>{}};function ve(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new mt(n)}function mt(t){this._=t}function Je(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}mt.prototype=ve.prototype={constructor:mt,on:function(t,e){var n=this._,r=Je(t+"",n),i,o=-1,s=r.length;if(arguments.length<2){for(;++o<s;)if((i=(t=r[o]).type)&&(i=Qe(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<s;)if(i=(t=r[o]).type)n[i]=ie(n[i],t.name,e);else if(e==null)for(i in n)n[i]=ie(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new mt(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function Qe(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function ie(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Ke,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Xt="http://www.w3.org/1999/xhtml";const oe={svg:"http://www.w3.org/2000/svg",xhtml:Xt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function St(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),oe.hasOwnProperty(e)?{space:oe[e],local:t}:t}function Ze(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Xt&&e.documentElement.namespaceURI===Xt?e.createElement(t):e.createElementNS(n,t)}}function je(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function be(t){var e=St(t);return(e.local?je:Ze)(e)}function tn(){}function Vt(t){return t==null?tn:function(){return this.querySelector(t)}}function en(t){typeof t!="function"&&(t=Vt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,a=r[i]=new Array(s),c,u,l=0;l<s;++l)(c=o[l])&&(u=t.call(c,c.__data__,l,o))&&("__data__"in c&&(u.__data__=c.__data__),a[l]=u);return new E(r,this._parents)}function nn(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function rn(){return[]}function $e(t){return t==null?rn:function(){return this.querySelectorAll(t)}}function on(t){return function(){return nn(t.apply(this,arguments))}}function sn(t){typeof t=="function"?t=on(t):t=$e(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var s=e[o],a=s.length,c,u=0;u<a;++u)(c=s[u])&&(r.push(t.call(c,c.__data__,u,s)),i.push(c));return new E(r,i)}function Ee(t){return function(){return this.matches(t)}}function Se(t){return function(e){return e.matches(t)}}var an=Array.prototype.find;function cn(t){return function(){return an.call(this.children,t)}}function un(){return this.firstElementChild}function ln(t){return this.select(t==null?un:cn(typeof t=="function"?t:Se(t)))}var fn=Array.prototype.filter;function hn(){return Array.from(this.children)}function pn(t){return function(){return fn.call(this.children,t)}}function dn(t){return this.selectAll(t==null?hn:pn(typeof t=="function"?t:Se(t)))}function gn(t){typeof t!="function"&&(t=Ee(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,a=r[i]=[],c,u=0;u<s;++u)(c=o[u])&&t.call(c,c.__data__,u,o)&&a.push(c);return new E(r,this._parents)}function Ne(t){return new Array(t.length)}function mn(){return new E(this._enter||this._groups.map(Ne),this._parents)}function yt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}yt.prototype={constructor:yt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function _n(t){return function(){return t}}function wn(t,e,n,r,i,o){for(var s=0,a,c=e.length,u=o.length;s<u;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new yt(t,o[s]);for(;s<c;++s)(a=e[s])&&(i[s]=a)}function yn(t,e,n,r,i,o,s){var a,c,u=new Map,l=e.length,f=o.length,p=new Array(l),g;for(a=0;a<l;++a)(c=e[a])&&(p[a]=g=s.call(c,c.__data__,a,e)+"",u.has(g)?i[a]=c:u.set(g,c));for(a=0;a<f;++a)g=s.call(t,o[a],a,o)+"",(c=u.get(g))?(r[a]=c,c.__data__=o[a],u.delete(g)):n[a]=new yt(t,o[a]);for(a=0;a<l;++a)(c=e[a])&&u.get(p[a])===c&&(i[a]=c)}function xn(t){return t.__data__}function vn(t,e){if(!arguments.length)return Array.from(this,xn);var n=e?yn:wn,r=this._parents,i=this._groups;typeof t!="function"&&(t=_n(t));for(var o=i.length,s=new Array(o),a=new Array(o),c=new Array(o),u=0;u<o;++u){var l=r[u],f=i[u],p=f.length,g=bn(t.call(l,l&&l.__data__,u,r)),m=g.length,w=a[u]=new Array(m),x=s[u]=new Array(m),Ct=c[u]=new Array(p);n(l,f,w,x,Ct,g,e);for(var k=0,F=0,S,ut;k<m;++k)if(S=w[k]){for(k>=F&&(F=k+1);!(ut=x[F])&&++F<m;);S._next=ut||null}}return s=new E(s,r),s._enter=a,s._exit=c,s}function bn(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function $n(){return new E(this._exit||this._groups.map(Ne),this._parents)}function En(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function Sn(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,s=Math.min(i,o),a=new Array(i),c=0;c<s;++c)for(var u=n[c],l=r[c],f=u.length,p=a[c]=new Array(f),g,m=0;m<f;++m)(g=u[m]||l[m])&&(p[m]=g);for(;c<i;++c)a[c]=n[c];return new E(a,this._parents)}function Nn(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],s;--i>=0;)(s=r[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function An(t){t||(t=Cn);function e(f,p){return f&&p?t(f.__data__,p.__data__):!f-!p}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,c=i[o]=new Array(a),u,l=0;l<a;++l)(u=s[l])&&(c[l]=u);c.sort(e)}return new E(i,this._parents).order()}function Cn(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function kn(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Bn(){return Array.from(this)}function Mn(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var s=r[i];if(s)return s}return null}function Tn(){let t=0;for(const e of this)++t;return t}function In(){return!this.node()}function Rn(t){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])&&t.call(a,a.__data__,o,i);return this}function On(t){return function(){this.removeAttribute(t)}}function Xn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Hn(t,e){return function(){this.setAttribute(t,e)}}function Fn(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Ln(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Pn(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Dn(t,e){var n=St(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?Xn:On:typeof e=="function"?n.local?Pn:Ln:n.local?Fn:Hn)(n,e))}function Ae(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Yn(t){return function(){this.style.removeProperty(t)}}function qn(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Vn(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function zn(t,e,n){return arguments.length>1?this.each((e==null?Yn:typeof e=="function"?Vn:qn)(t,e,n??"")):K(this.node(),t)}function K(t,e){return t.style.getPropertyValue(e)||Ae(t).getComputedStyle(t,null).getPropertyValue(e)}function Un(t){return function(){delete this[t]}}function Wn(t,e){return function(){this[t]=e}}function Gn(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Kn(t,e){return arguments.length>1?this.each((e==null?Un:typeof e=="function"?Gn:Wn)(t,e)):this.node()[t]}function Ce(t){return t.trim().split(/^|\s+/)}function zt(t){return t.classList||new ke(t)}function ke(t){this._node=t,this._names=Ce(t.getAttribute("class")||"")}ke.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Be(t,e){for(var n=zt(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Me(t,e){for(var n=zt(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Jn(t){return function(){Be(this,t)}}function Qn(t){return function(){Me(this,t)}}function Zn(t,e){return function(){(e.apply(this,arguments)?Be:Me)(this,t)}}function jn(t,e){var n=Ce(t+"");if(arguments.length<2){for(var r=zt(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?Zn:e?Jn:Qn)(n,e))}function tr(){this.textContent=""}function er(t){return function(){this.textContent=t}}function nr(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function rr(t){return arguments.length?this.each(t==null?tr:(typeof t=="function"?nr:er)(t)):this.node().textContent}function ir(){this.innerHTML=""}function or(t){return function(){this.innerHTML=t}}function sr(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function ar(t){return arguments.length?this.each(t==null?ir:(typeof t=="function"?sr:or)(t)):this.node().innerHTML}function cr(){this.nextSibling&&this.parentNode.appendChild(this)}function ur(){return this.each(cr)}function lr(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function fr(){return this.each(lr)}function hr(t){var e=typeof t=="function"?t:be(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function pr(){return null}function dr(t,e){var n=typeof t=="function"?t:be(t),r=e==null?pr:typeof e=="function"?e:Vt(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function gr(){var t=this.parentNode;t&&t.removeChild(this)}function mr(){return this.each(gr)}function _r(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function wr(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function yr(t){return this.select(t?wr:_r)}function xr(t){return arguments.length?this.property("__data__",t):this.node().__data__}function vr(t){return function(e){t.call(this,e,this.__data__)}}function br(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function $r(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function Er(t,e,n){return function(){var r=this.__on,i,o=vr(e);if(r){for(var s=0,a=r.length;s<a;++s)if((i=r[s]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function Sr(t,e,n){var r=br(t+""),i,o=r.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var c=0,u=a.length,l;c<u;++c)for(i=0,l=a[c];i<o;++i)if((s=r[i]).type===l.type&&s.name===l.name)return l.value}return}for(a=e?Er:$r,i=0;i<o;++i)this.each(a(r[i],e,n));return this}function Te(t,e,n){var r=Ae(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Nr(t,e){return function(){return Te(this,t,e)}}function Ar(t,e){return function(){return Te(this,t,e.apply(this,arguments))}}function Cr(t,e){return this.each((typeof e=="function"?Ar:Nr)(t,e))}function*kr(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,s;i<o;++i)(s=r[i])&&(yield s)}var Ie=[null];function E(t,e){this._groups=t,this._parents=e}function at(){return new E([[document.documentElement]],Ie)}function Br(){return this}E.prototype=at.prototype={constructor:E,select:en,selectAll:sn,selectChild:ln,selectChildren:dn,filter:gn,data:vn,enter:mn,exit:$n,join:En,merge:Sn,selection:Br,order:Nn,sort:An,call:kn,nodes:Bn,node:Mn,size:Tn,empty:In,each:Rn,attr:Dn,style:zn,property:Kn,classed:jn,text:rr,html:ar,raise:ur,lower:fr,append:hr,insert:dr,remove:mr,clone:yr,datum:xr,on:Sr,dispatch:Cr,[Symbol.iterator]:kr};function se(t){return typeof t=="string"?new E([[document.querySelector(t)]],[document.documentElement]):new E([[t]],Ie)}function Ut(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Re(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ct(){}var rt=.7,xt=1/rt,W="\\s*([+-]?\\d+)\\s*",it="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",M="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Mr=/^#([0-9a-f]{3,8})$/,Tr=new RegExp(`^rgb\\(${W},${W},${W}\\)$`),Ir=new RegExp(`^rgb\\(${M},${M},${M}\\)$`),Rr=new RegExp(`^rgba\\(${W},${W},${W},${it}\\)$`),Or=new RegExp(`^rgba\\(${M},${M},${M},${it}\\)$`),Xr=new RegExp(`^hsl\\(${it},${M},${M}\\)$`),Hr=new RegExp(`^hsla\\(${it},${M},${M},${it}\\)$`),ae={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Ut(ct,ot,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:ce,formatHex:ce,formatHex8:Fr,formatHsl:Lr,formatRgb:ue,toString:ue});function ce(){return this.rgb().formatHex()}function Fr(){return this.rgb().formatHex8()}function Lr(){return Oe(this).formatHsl()}function ue(){return this.rgb().formatRgb()}function ot(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Mr.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?le(e):n===3?new b(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?pt(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?pt(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Tr.exec(t))?new b(e[1],e[2],e[3],1):(e=Ir.exec(t))?new b(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Rr.exec(t))?pt(e[1],e[2],e[3],e[4]):(e=Or.exec(t))?pt(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Xr.exec(t))?pe(e[1],e[2]/100,e[3]/100,1):(e=Hr.exec(t))?pe(e[1],e[2]/100,e[3]/100,e[4]):ae.hasOwnProperty(t)?le(ae[t]):t==="transparent"?new b(NaN,NaN,NaN,0):null}function le(t){return new b(t>>16&255,t>>8&255,t&255,1)}function pt(t,e,n,r){return r<=0&&(t=e=n=NaN),new b(t,e,n,r)}function Pr(t){return t instanceof ct||(t=ot(t)),t?(t=t.rgb(),new b(t.r,t.g,t.b,t.opacity)):new b}function Ht(t,e,n,r){return arguments.length===1?Pr(t):new b(t,e,n,r??1)}function b(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Ut(b,Ht,Re(ct,{brighter(t){return t=t==null?xt:Math.pow(xt,t),new b(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?rt:Math.pow(rt,t),new b(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new b(q(this.r),q(this.g),q(this.b),vt(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:fe,formatHex:fe,formatHex8:Dr,formatRgb:he,toString:he}));function fe(){return`#${Y(this.r)}${Y(this.g)}${Y(this.b)}`}function Dr(){return`#${Y(this.r)}${Y(this.g)}${Y(this.b)}${Y((isNaN(this.opacity)?1:this.opacity)*255)}`}function he(){const t=vt(this.opacity);return`${t===1?"rgb(":"rgba("}${q(this.r)}, ${q(this.g)}, ${q(this.b)}${t===1?")":`, ${t})`}`}function vt(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function q(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Y(t){return t=q(t),(t<16?"0":"")+t.toString(16)}function pe(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new A(t,e,n,r)}function Oe(t){if(t instanceof A)return new A(t.h,t.s,t.l,t.opacity);if(t instanceof ct||(t=ot(t)),!t)return new A;if(t instanceof A)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),s=NaN,a=o-i,c=(o+i)/2;return a?(e===o?s=(n-r)/a+(n<r)*6:n===o?s=(r-e)/a+2:s=(e-n)/a+4,a/=c<.5?o+i:2-o-i,s*=60):a=c>0&&c<1?0:s,new A(s,a,c,t.opacity)}function Yr(t,e,n,r){return arguments.length===1?Oe(t):new A(t,e,n,r??1)}function A(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Ut(A,Yr,Re(ct,{brighter(t){return t=t==null?xt:Math.pow(xt,t),new A(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?rt:Math.pow(rt,t),new A(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new b(It(t>=240?t-240:t+120,i,r),It(t,i,r),It(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new A(de(this.h),dt(this.s),dt(this.l),vt(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=vt(this.opacity);return`${t===1?"hsl(":"hsla("}${de(this.h)}, ${dt(this.s)*100}%, ${dt(this.l)*100}%${t===1?")":`, ${t})`}`}}));function de(t){return t=(t||0)%360,t<0?t+360:t}function dt(t){return Math.max(0,Math.min(1,t||0))}function It(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Xe=t=>()=>t;function qr(t,e){return function(n){return t+n*e}}function Vr(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function zr(t){return(t=+t)==1?He:function(e,n){return n-e?Vr(e,n,t):Xe(isNaN(e)?n:e)}}function He(t,e){var n=e-t;return n?qr(t,n):Xe(isNaN(t)?e:t)}const ge=(function t(e){var n=zr(e);function r(i,o){var s=n((i=Ht(i)).r,(o=Ht(o)).r),a=n(i.g,o.g),c=n(i.b,o.b),u=He(i.opacity,o.opacity);return function(l){return i.r=s(l),i.g=a(l),i.b=c(l),i.opacity=u(l),i+""}}return r.gamma=t,r})(1);function H(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var Ft=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Rt=new RegExp(Ft.source,"g");function Ur(t){return function(){return t}}function Wr(t){return function(e){return t(e)+""}}function Gr(t,e){var n=Ft.lastIndex=Rt.lastIndex=0,r,i,o,s=-1,a=[],c=[];for(t=t+"",e=e+"";(r=Ft.exec(t))&&(i=Rt.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(r=r[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,c.push({i:s,x:H(r,i)})),n=Rt.lastIndex;return n<e.length&&(o=e.slice(n),a[s]?a[s]+=o:a[++s]=o),a.length<2?c[0]?Wr(c[0].x):Ur(e):(e=c.length,function(u){for(var l=0,f;l<e;++l)a[(f=c[l]).i]=f.x(u);return a.join("")})}var me=180/Math.PI,Lt={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Fe(t,e,n,r,i,o){var s,a,c;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,c/=a),t*r<e*n&&(t=-t,e=-e,c=-c,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*me,skewX:Math.atan(c)*me,scaleX:s,scaleY:a}}var gt;function Kr(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Lt:Fe(e.a,e.b,e.c,e.d,e.e,e.f)}function Jr(t){return t==null||(gt||(gt=document.createElementNS("http://www.w3.org/2000/svg","g")),gt.setAttribute("transform",t),!(t=gt.transform.baseVal.consolidate()))?Lt:(t=t.matrix,Fe(t.a,t.b,t.c,t.d,t.e,t.f))}function Le(t,e,n,r){function i(u){return u.length?u.pop()+" ":""}function o(u,l,f,p,g,m){if(u!==f||l!==p){var w=g.push("translate(",null,e,null,n);m.push({i:w-4,x:H(u,f)},{i:w-2,x:H(l,p)})}else(f||p)&&g.push("translate("+f+e+p+n)}function s(u,l,f,p){u!==l?(u-l>180?l+=360:l-u>180&&(u+=360),p.push({i:f.push(i(f)+"rotate(",null,r)-2,x:H(u,l)})):l&&f.push(i(f)+"rotate("+l+r)}function a(u,l,f,p){u!==l?p.push({i:f.push(i(f)+"skewX(",null,r)-2,x:H(u,l)}):l&&f.push(i(f)+"skewX("+l+r)}function c(u,l,f,p,g,m){if(u!==f||l!==p){var w=g.push(i(g)+"scale(",null,",",null,")");m.push({i:w-4,x:H(u,f)},{i:w-2,x:H(l,p)})}else(f!==1||p!==1)&&g.push(i(g)+"scale("+f+","+p+")")}return function(u,l){var f=[],p=[];return u=t(u),l=t(l),o(u.translateX,u.translateY,l.translateX,l.translateY,f,p),s(u.rotate,l.rotate,f,p),a(u.skewX,l.skewX,f,p),c(u.scaleX,u.scaleY,l.scaleX,l.scaleY,f,p),u=l=null,function(g){for(var m=-1,w=p.length,x;++m<w;)f[(x=p[m]).i]=x.x(g);return f.join("")}}}var Qr=Le(Kr,"px, ","px)","deg)"),Zr=Le(Jr,", ",")",")"),J=0,j=0,Z=0,Pe=1e3,bt,tt,$t=0,V=0,Nt=0,st=typeof performance=="object"&&performance.now?performance:Date,De=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Wt(){return V||(De(jr),V=st.now()+Nt)}function jr(){V=0}function Et(){this._call=this._time=this._next=null}Et.prototype=Ye.prototype={constructor:Et,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Wt():+n)+(e==null?0:+e),!this._next&&tt!==this&&(tt?tt._next=this:bt=this,tt=this),this._call=t,this._time=n,Pt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Pt())}};function Ye(t,e,n){var r=new Et;return r.restart(t,e,n),r}function ti(){Wt(),++J;for(var t=bt,e;t;)(e=V-t._time)>=0&&t._call.call(void 0,e),t=t._next;--J}function _e(){V=($t=st.now())+Nt,J=j=0;try{ti()}finally{J=0,ni(),V=0}}function ei(){var t=st.now(),e=t-$t;e>Pe&&(Nt-=e,$t=t)}function ni(){for(var t,e=bt,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:bt=n);tt=t,Pt(r)}function Pt(t){if(!J){j&&(j=clearTimeout(j));var e=t-V;e>24?(t<1/0&&(j=setTimeout(_e,t-st.now()-Nt)),Z&&(Z=clearInterval(Z))):(Z||($t=st.now(),Z=setInterval(ei,Pe)),J=1,De(_e))}}function we(t,e,n){var r=new Et;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var ri=ve("start","end","cancel","interrupt"),ii=[],qe=0,ye=1,Dt=2,_t=3,xe=4,Yt=5,wt=6;function At(t,e,n,r,i,o){var s=t.__transition;if(!s)t.__transition={};else if(n in s)return;oi(t,n,{name:e,index:r,group:i,on:ri,tween:ii,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:qe})}function Gt(t,e){var n=C(t,e);if(n.state>qe)throw new Error("too late; already scheduled");return n}function T(t,e){var n=C(t,e);if(n.state>_t)throw new Error("too late; already running");return n}function C(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function oi(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Ye(o,0,n.time);function o(u){n.state=ye,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var l,f,p,g;if(n.state!==ye)return c();for(l in r)if(g=r[l],g.name===n.name){if(g.state===_t)return we(s);g.state===xe?(g.state=wt,g.timer.stop(),g.on.call("interrupt",t,t.__data__,g.index,g.group),delete r[l]):+l<e&&(g.state=wt,g.timer.stop(),g.on.call("cancel",t,t.__data__,g.index,g.group),delete r[l])}if(we(function(){n.state===_t&&(n.state=xe,n.timer.restart(a,n.delay,n.time),a(u))}),n.state=Dt,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Dt){for(n.state=_t,i=new Array(p=n.tween.length),l=0,f=-1;l<p;++l)(g=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(i[++f]=g);i.length=f+1}}function a(u){for(var l=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(c),n.state=Yt,1),f=-1,p=i.length;++f<p;)i[f].call(t,l);n.state===Yt&&(n.on.call("end",t,t.__data__,n.index,n.group),c())}function c(){n.state=wt,n.timer.stop(),delete r[e];for(var u in r)return;delete t.__transition}}function si(t,e){var n=t.__transition,r,i,o=!0,s;if(n){e=e==null?null:e+"";for(s in n){if((r=n[s]).name!==e){o=!1;continue}i=r.state>Dt&&r.state<Yt,r.state=wt,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[s]}o&&delete t.__transition}}function ai(t){return this.each(function(){si(this,t)})}function ci(t,e){var n,r;return function(){var i=T(this,t),o=i.tween;if(o!==n){r=n=o;for(var s=0,a=r.length;s<a;++s)if(r[s].name===e){r=r.slice(),r.splice(s,1);break}}i.tween=r}}function ui(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=T(this,t),s=o.tween;if(s!==r){i=(r=s).slice();for(var a={name:e,value:n},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=a;break}c===u&&i.push(a)}o.tween=i}}function li(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=C(this.node(),n).tween,i=0,o=r.length,s;i<o;++i)if((s=r[i]).name===t)return s.value;return null}return this.each((e==null?ci:ui)(n,t,e))}function Kt(t,e,n){var r=t._id;return t.each(function(){var i=T(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return C(i,r).value[e]}}function Ve(t,e){var n;return(typeof e=="number"?H:e instanceof ot?ge:(n=ot(e))?(e=n,ge):Gr)(t,e)}function fi(t){return function(){this.removeAttribute(t)}}function hi(t){return function(){this.removeAttributeNS(t.space,t.local)}}function pi(t,e,n){var r,i=n+"",o;return function(){var s=this.getAttribute(t);return s===i?null:s===r?o:o=e(r=s,n)}}function di(t,e,n){var r,i=n+"",o;return function(){var s=this.getAttributeNS(t.space,t.local);return s===i?null:s===r?o:o=e(r=s,n)}}function gi(t,e,n){var r,i,o;return function(){var s,a=n(this),c;return a==null?void this.removeAttribute(t):(s=this.getAttribute(t),c=a+"",s===c?null:s===r&&c===i?o:(i=c,o=e(r=s,a)))}}function mi(t,e,n){var r,i,o;return function(){var s,a=n(this),c;return a==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),c=a+"",s===c?null:s===r&&c===i?o:(i=c,o=e(r=s,a)))}}function _i(t,e){var n=St(t),r=n==="transform"?Zr:Ve;return this.attrTween(t,typeof e=="function"?(n.local?mi:gi)(n,r,Kt(this,"attr."+t,e)):e==null?(n.local?hi:fi)(n):(n.local?di:pi)(n,r,e))}function wi(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function yi(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function xi(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&yi(t,o)),n}return i._value=e,i}function vi(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&wi(t,o)),n}return i._value=e,i}function bi(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=St(t);return this.tween(n,(r.local?xi:vi)(r,e))}function $i(t,e){return function(){Gt(this,t).delay=+e.apply(this,arguments)}}function Ei(t,e){return e=+e,function(){Gt(this,t).delay=e}}function Si(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?$i:Ei)(e,t)):C(this.node(),e).delay}function Ni(t,e){return function(){T(this,t).duration=+e.apply(this,arguments)}}function Ai(t,e){return e=+e,function(){T(this,t).duration=e}}function Ci(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Ni:Ai)(e,t)):C(this.node(),e).duration}function ki(t,e){if(typeof e!="function")throw new Error;return function(){T(this,t).ease=e}}function Bi(t){var e=this._id;return arguments.length?this.each(ki(e,t)):C(this.node(),e).ease}function Mi(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;T(this,t).ease=n}}function Ti(t){if(typeof t!="function")throw new Error;return this.each(Mi(this._id,t))}function Ii(t){typeof t!="function"&&(t=Ee(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,a=r[i]=[],c,u=0;u<s;++u)(c=o[u])&&t.call(c,c.__data__,u,o)&&a.push(c);return new R(r,this._parents,this._name,this._id)}function Ri(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),s=new Array(r),a=0;a<o;++a)for(var c=e[a],u=n[a],l=c.length,f=s[a]=new Array(l),p,g=0;g<l;++g)(p=c[g]||u[g])&&(f[g]=p);for(;a<r;++a)s[a]=e[a];return new R(s,this._parents,this._name,this._id)}function Oi(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function Xi(t,e,n){var r,i,o=Oi(e)?Gt:T;return function(){var s=o(this,t),a=s.on;a!==r&&(i=(r=a).copy()).on(e,n),s.on=i}}function Hi(t,e){var n=this._id;return arguments.length<2?C(this.node(),n).on.on(t):this.each(Xi(n,t,e))}function Fi(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Li(){return this.on("end.remove",Fi(this._id))}function Pi(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Vt(t));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s)for(var a=r[s],c=a.length,u=o[s]=new Array(c),l,f,p=0;p<c;++p)(l=a[p])&&(f=t.call(l,l.__data__,p,a))&&("__data__"in l&&(f.__data__=l.__data__),u[p]=f,At(u[p],e,n,p,u,C(l,n)));return new R(o,this._parents,e,n)}function Di(t){var e=this._name,n=this._id;typeof t!="function"&&(t=$e(t));for(var r=this._groups,i=r.length,o=[],s=[],a=0;a<i;++a)for(var c=r[a],u=c.length,l,f=0;f<u;++f)if(l=c[f]){for(var p=t.call(l,l.__data__,f,c),g,m=C(l,n),w=0,x=p.length;w<x;++w)(g=p[w])&&At(g,e,n,w,p,m);o.push(p),s.push(l)}return new R(o,s,e,n)}var Yi=at.prototype.constructor;function qi(){return new Yi(this._groups,this._parents)}function Vi(t,e){var n,r,i;return function(){var o=K(this,t),s=(this.style.removeProperty(t),K(this,t));return o===s?null:o===n&&s===r?i:i=e(n=o,r=s)}}function ze(t){return function(){this.style.removeProperty(t)}}function zi(t,e,n){var r,i=n+"",o;return function(){var s=K(this,t);return s===i?null:s===r?o:o=e(r=s,n)}}function Ui(t,e,n){var r,i,o;return function(){var s=K(this,t),a=n(this),c=a+"";return a==null&&(c=a=(this.style.removeProperty(t),K(this,t))),s===c?null:s===r&&c===i?o:(i=c,o=e(r=s,a))}}function Wi(t,e){var n,r,i,o="style."+e,s="end."+o,a;return function(){var c=T(this,t),u=c.on,l=c.value[o]==null?a||(a=ze(e)):void 0;(u!==n||i!==l)&&(r=(n=u).copy()).on(s,i=l),c.on=r}}function Gi(t,e,n){var r=(t+="")=="transform"?Qr:Ve;return e==null?this.styleTween(t,Vi(t,r)).on("end.style."+t,ze(t)):typeof e=="function"?this.styleTween(t,Ui(t,r,Kt(this,"style."+t,e))).each(Wi(this._id,t)):this.styleTween(t,zi(t,r,e),n).on("end.style."+t,null)}function Ki(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Ji(t,e,n){var r,i;function o(){var s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&Ki(t,s,n)),r}return o._value=e,o}function Qi(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,Ji(t,e,n??""))}function Zi(t){return function(){this.textContent=t}}function ji(t){return function(){var e=t(this);this.textContent=e??""}}function to(t){return this.tween("text",typeof t=="function"?ji(Kt(this,"text",t)):Zi(t==null?"":t+""))}function eo(t){return function(e){this.textContent=t.call(this,e)}}function no(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&eo(i)),e}return r._value=t,r}function ro(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,no(t))}function io(){for(var t=this._name,e=this._id,n=Ue(),r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],a=s.length,c,u=0;u<a;++u)if(c=s[u]){var l=C(c,e);At(c,t,n,u,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new R(r,this._parents,t,n)}function oo(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,s){var a={value:s},c={value:function(){--i===0&&o()}};n.each(function(){var u=T(this,r),l=u.on;l!==t&&(e=(t=l).copy(),e._.cancel.push(a),e._.interrupt.push(a),e._.end.push(c)),u.on=e}),i===0&&o()})}var so=0;function R(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Ue(){return++so}var I=at.prototype;R.prototype={constructor:R,select:Pi,selectAll:Di,selectChild:I.selectChild,selectChildren:I.selectChildren,filter:Ii,merge:Ri,selection:qi,transition:io,call:I.call,nodes:I.nodes,node:I.node,size:I.size,empty:I.empty,each:I.each,on:Hi,attr:_i,attrTween:bi,style:Gi,styleTween:Qi,text:to,textTween:ro,remove:Li,tween:li,delay:Si,duration:Ci,ease:Bi,easeVarying:Ti,end:oo,[Symbol.iterator]:I[Symbol.iterator]};function ao(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var co={time:null,delay:0,duration:250,ease:ao};function uo(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function lo(t){var e,n;t instanceof R?(e=t._id,t=t._name):(e=Ue(),(n=co).time=Wt(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],a=s.length,c,u=0;u<a;++u)(c=s[u])&&At(c,t,e,u,s,n||uo(c,e));return new R(r,this._parents,t,e)}at.prototype.interrupt=ai;at.prototype.transition=lo;function et(t,e,n){this.k=t,this.x=e,this.y=n}et.prototype={constructor:et,scale:function(t){return t===1?this:new et(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new et(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};et.prototype;let N=[],nt=[],G=new Map,Ot="";async function fo(){const t=await window.gitopo.git.exec("rev-parse --show-toplevel");if(t.success){const e=t.output.trim();return e.split("/").pop()||e}return"Unknown Repository"}async function ho(){const t=await window.gitopo.git.exec('log --all --format="%H|%P|%ct|%s" --date-order -1000');if(!t.success)return console.error("Failed to fetch commits:",t.error),[];const e=[],n=t.output.trim().split(`
|
|
2
|
+
`);for(const r of n){const i=r.split("|");if(i.length>=4){const o=i[0],s=i[1],a=parseInt(i[2],10),c=i.slice(3).join("|"),u=s.trim()?s.trim().split(" "):[];e.push({hash:o,parents:u,timestamp:a,message:c})}}return e.sort((r,i)=>i.timestamp-r.timestamp),e}async function po(){const t=await window.gitopo.git.exec('branch -a --format="%(refname:short) %(objectname)"');if(!t.success)return console.error("Failed to fetch branches:",t.error),[];const e=[],n=t.output.trim().split(`
|
|
3
|
+
`);for(const r of n){const i=r.trim().split(" ");if(i.length>=2){const o=i[0],s=i[1];e.push({name:o,hash:s})}}return e}function go(t){const e=["branch1","branch2","branch3"],n=t.find(r=>r.name==="main"||r.name==="master");e.forEach((r,i)=>{const o=document.getElementById(r);o.innerHTML="";const s=document.createElement("option");s.value="",s.textContent="----",o.appendChild(s),t.forEach(a=>{const c=document.createElement("option");c.value=a.name,c.textContent=a.name,o.appendChild(c)}),i===0&&n&&(o.value=n.name),o.addEventListener("change",()=>qt())})}function mo(t){const e=nt.find(i=>i.name===t);if(!e)return new Set;const n=new Set;let r=e.hash;for(;r;){n.add(r);const i=G.get(r);if(i&&i.parents.length>0)r=i.parents[0];else break}return n}function _o(t,e=new Set){const n=[],r=new Set,i=new Map;for(const c of N)for(const u of c.parents)i.has(u)||i.set(u,[]),i.get(u).push(c.hash);function o(c){const u=new Set,l=[c];for(;l.length>0;){const f=l.pop();if(u.has(f)||t.has(f)||e.has(f)||r.has(f))continue;const p=G.get(f);if(!p)continue;u.add(f);for(const m of p.parents)!t.has(m)&&!e.has(m)&&!u.has(m)&&l.push(m);const g=i.get(f)||[];for(const m of g)!t.has(m)&&!e.has(m)&&!u.has(m)&&l.push(m)}return u}function s(c){for(const u of c){const l=G.get(u);if(l){for(const f of l.parents)if(!t.has(f)&&!c.has(f))return!1}}return!0}function a(c){for(const u of t){const l=G.get(u);if(!(!l||l.parents.length<2)){for(let f=1;f<l.parents.length;f++)if(c.has(l.parents[f]))return u}}return null}for(const c of N){if(t.has(c.hash)||e.has(c.hash)||r.has(c.hash))continue;const u=o(c.hash);u.size>0&&s(u)&&(u.forEach(l=>r.add(l)),n.push({mergeCommit:a(u),commits:u}))}return n}function wo(){const t=[];return["branch1","branch2","branch3"].forEach(e=>{const n=document.getElementById(e);n&&n.value&&t.push(n.value)}),t}function qt(){const t=se("#graph");t.selectAll("*").remove();const e=se("#app");e.selectAll(".tooltip").remove();const n=document.getElementById("controls").offsetHeight,r=window.innerWidth,i=window.innerHeight-n;t.attr("width",r).attr("height",i);const o=6,s=30,a=150,c=30,u=50,l=50,p=wo().map(h=>({name:h,lineage:mo(h)})),g=new Set;p.forEach(({lineage:h})=>{h.forEach(d=>g.add(d))});const m=p.map(({name:h,lineage:d})=>{const _=new Set;p.forEach(v=>{v.name!==h&&v.lineage.forEach(B=>_.add(B))});const y=_o(d,_);return{name:h,lineage:d,subBranches:y}}),w=new Map;nt.forEach(h=>{w.has(h.hash)||w.set(h.hash,[]),w.get(h.hash).push(h.name)});const x=new Map;N.forEach(h=>{x.set(h.hash,{mainCol:m.length,subOffset:0,isSubBranch:!1})}),m.forEach((h,d)=>{for(const _ of h.lineage)x.set(_,{mainCol:d,subOffset:0,isSubBranch:!1})});let Ct=0;m.forEach((h,d)=>{const _=new Map;h.subBranches.forEach(y=>{const v=`sb-${Ct++}`,B=[];y.commits.forEach($=>{const P=N.findIndex(D=>D.hash===$);P>=0&&B.push(P)});let O=1,X=!0;for(;X;){X=!1;for(const $ of B)if((_.get($)||new Set).has(O)){X=!0,O++;break}}for(const $ of B)_.has($)||_.set($,new Set),_.get($).add(O);y.commits.forEach($=>{x.set($,{mainCol:d,subOffset:O,isSubBranch:!0,subBranchId:v})})})});const k=new Map;let F=l;for(let h=0;h<=m.length;h++)if(k.set(h,F),h<m.length){let d=0;N.forEach(_=>{const y=x.get(_.hash);y.mainCol===h&&y.subOffset>d&&(d=y.subOffset)}),F+=a+d*c}const S=new Map;N.forEach((h,d)=>{const _=x.get(h.hash),v=k.get(_.mainCol)+_.subOffset*c;S.set(h.hash,{col:_.mainCol,subOffset:_.subOffset,row:d,x:v,y:u+d*s,isSubBranch:_.isSubBranch,subBranchId:_.subBranchId||null})});const ut=Array.from(x.values()).some(h=>h.mainCol===m.length),L=t.append("g").attr("class","main-group"),kt=e.append("div").attr("class","tooltip").style("opacity",0),lt=["#4CAF50","#2196F3","#FF9800"];m.forEach((h,d)=>{L.append("text").attr("x",k.get(d)).attr("y",25).attr("fill",lt[d]||"#888").attr("font-size","14px").attr("font-weight","bold").text(h.name)}),ut&&L.append("text").attr("x",k.get(m.length)).attr("y",25).attr("fill","#888").attr("font-size","14px").text("Other"),N.forEach(h=>{const d=S.get(h.hash);d&&h.parents.forEach(_=>{const y=S.get(_);if(y){const v=d.col===m.length||y.col===m.length,B=d.x,O=d.y,X=y.x,$=y.y;let P;if(B===X)P=`M ${B} ${O} L ${X} ${$}`;else{const ht=(O+$)/2;P=`M ${B} ${O} C ${B} ${ht}, ${X} ${ht}, ${X} ${$}`}const D=d.subBranchId||y.subBranchId||null,Mt=d.isSubBranch||y.isSubBranch,We=!Mt&&!v&&d.col<m.length;let Tt="#666";v?Tt="#444":d.col<m.length&&(Tt=lt[d.col]||"#666");let Q=1.5;v?Q=1:We?Q=3:Mt&&(Q=1.5);const Ge=L.append("path").attr("d",P).attr("fill","none").attr("stroke",Tt).attr("stroke-width",Q).attr("stroke-opacity",v?.4:Mt?.5:.8).attr("stroke-dasharray",v?"4,4":"none").attr("class",D?`edge edge-${D}`:"edge");if(D){const ht=Q;Ge.style("cursor","pointer").on("mouseenter",()=>{L.selectAll(`.edge-${D}`).attr("stroke-width",3).attr("stroke-opacity",.9)}).on("mouseleave",()=>{L.selectAll(`.edge-${D}`).attr("stroke-width",ht).attr("stroke-opacity",.5)})}}})}),L.selectAll("g.node").data(N).enter().append("g").attr("class","node").attr("transform",h=>{const d=S.get(h.hash);return d?`translate(${d.x}, ${d.y})`:"translate(-100, -100)"}).append("circle").attr("r",h=>{const d=S.get(h.hash);return d.isSubBranch?o*.6:d.col<m.length?o:o*.7}).attr("fill",h=>{const d=S.get(h.hash);return d.col<m.length?lt[d.col]||"#fff":d.isSubBranch?"#a0a0a0":"#888"}).attr("stroke",h=>{const d=S.get(h.hash);return d.col<m.length&<[d.col]||"#333"}).attr("stroke-width",h=>{const d=S.get(h.hash);return d.isSubBranch?1:d.col<m.length?2:1}).style("cursor","pointer").on("mouseenter",(h,d)=>{const _=w.get(d.hash),y=_?`[${_.join(", ")}]<br/>`:"",v=new Date(d.timestamp*1e3).toLocaleString();kt.html(`<strong>${d.hash.substring(0,7)}</strong><br/>${y}${d.message}<br/><span class="date">${v}</span>`).style("left",h.pageX+15+"px").style("top",h.pageY-10+"px").style("opacity",1)}).on("mousemove",h=>{kt.style("left",h.pageX+15+"px").style("top",h.pageY-10+"px")}).on("mouseleave",()=>{kt.style("opacity",0)});let z=0,U=0,ft=!1,Jt=0,Qt=0,Zt=0,jt=0;function Bt(){L.attr("transform",`translate(${z}, ${U})`)}t.on("wheel",h=>{h.preventDefault(),z-=h.deltaX,U-=h.deltaY,Bt()}),t.on("mousedown",h=>{h.button===0&&(ft=!0,Jt=h.clientX,Qt=h.clientY,Zt=z,jt=U,h.preventDefault())}),t.on("mousemove",h=>{ft&&(z=Zt+(h.clientX-Jt),U=jt+(h.clientY-Qt),Bt())}),t.on("mouseup",h=>{h.button===0&&(ft=!1)}),t.on("mouseleave",()=>{ft=!1});let te=0,ee=0,ne=0,re=0;t.on("touchstart",h=>{if(h.touches.length===1){const d=h.touches[0];te=d.clientX,ee=d.clientY,ne=z,re=U}}),t.on("touchmove",h=>{if(h.touches.length===1){h.preventDefault();const d=h.touches[0];z=ne+(d.clientX-te),U=re+(d.clientY-ee),Bt()}}),t.on("contextmenu",h=>{h.preventDefault()})}async function yo(){[N,nt,Ot]=await Promise.all([ho(),po(),fo()]),document.getElementById("repo-name").textContent=Ot,G.clear(),N.forEach(t=>G.set(t.hash,t)),console.log("Repository:",Ot),console.log("Commits:",N.length),console.log("Branches:",nt.length),go(nt),qt(),window.addEventListener("resize",()=>{qt()})}yo();
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function e(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=e(i);fetch(i.href,o)}})();var Yn={value:()=>{}};function gn(){for(var t=0,n=arguments.length,e={},r;t<n;++t){if(!(r=arguments[t]+"")||r in e||/[\s.]/.test(r))throw new Error("illegal type: "+r);e[r]=[]}return new ht(e)}function ht(t){this._=t}function qn(t,n){return t.trim().split(/^|\s+/).map(function(e){var r="",i=e.indexOf(".");if(i>=0&&(r=e.slice(i+1),e=e.slice(0,i)),e&&!n.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:r}})}ht.prototype=gn.prototype={constructor:ht,on:function(t,n){var e=this._,r=qn(t+"",e),i,o=-1,s=r.length;if(arguments.length<2){for(;++o<s;)if((i=(t=r[o]).type)&&(i=Vn(e[i],t.name)))return i;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++o<s;)if(i=(t=r[o]).type)e[i]=Qt(e[i],t.name,n);else if(n==null)for(i in e)e[i]=Qt(e[i],t.name,null);return this},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new ht(t)},call:function(t,n){if((i=arguments.length-2)>0)for(var e=new Array(i),r=0,i,o;r<i;++r)e[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(n,e)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(n,e)}};function Vn(t,n){for(var e=0,r=t.length,i;e<r;++e)if((i=t[e]).name===n)return i.value}function Qt(t,n,e){for(var r=0,i=t.length;r<i;++r)if(t[r].name===n){t[r]=Yn,t=t.slice(0,r).concat(t.slice(r+1));break}return e!=null&&t.push({name:n,value:e}),t}var Ct="http://www.w3.org/1999/xhtml";const Zt={svg:"http://www.w3.org/2000/svg",xhtml:Ct,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function vt(t){var n=t+="",e=n.indexOf(":");return e>=0&&(n=t.slice(0,e))!=="xmlns"&&(t=t.slice(e+1)),Zt.hasOwnProperty(n)?{space:Zt[n],local:t}:t}function zn(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===Ct&&n.documentElement.namespaceURI===Ct?n.createElement(t):n.createElementNS(e,t)}}function Un(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function mn(t){var n=vt(t);return(n.local?Un:zn)(n)}function Gn(){}function Xt(t){return t==null?Gn:function(){return this.querySelector(t)}}function Kn(t){typeof t!="function"&&(t=Xt(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o=n[i],s=o.length,a=r[i]=new Array(s),c,u,f=0;f<s;++f)(c=o[f])&&(u=t.call(c,c.__data__,f,o))&&("__data__"in c&&(u.__data__=c.__data__),a[f]=u);return new $(r,this._parents)}function Wn(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Jn(){return[]}function _n(t){return t==null?Jn:function(){return this.querySelectorAll(t)}}function Qn(t){return function(){return Wn(t.apply(this,arguments))}}function Zn(t){typeof t=="function"?t=Qn(t):t=_n(t);for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var s=n[o],a=s.length,c,u=0;u<a;++u)(c=s[u])&&(r.push(t.call(c,c.__data__,u,s)),i.push(c));return new $(r,i)}function wn(t){return function(){return this.matches(t)}}function yn(t){return function(n){return n.matches(t)}}var jn=Array.prototype.find;function te(t){return function(){return jn.call(this.children,t)}}function ne(){return this.firstElementChild}function ee(t){return this.select(t==null?ne:te(typeof t=="function"?t:yn(t)))}var re=Array.prototype.filter;function ie(){return Array.from(this.children)}function oe(t){return function(){return re.call(this.children,t)}}function se(t){return this.selectAll(t==null?ie:oe(typeof t=="function"?t:yn(t)))}function ae(t){typeof t!="function"&&(t=wn(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o=n[i],s=o.length,a=r[i]=[],c,u=0;u<s;++u)(c=o[u])&&t.call(c,c.__data__,u,o)&&a.push(c);return new $(r,this._parents)}function xn(t){return new Array(t.length)}function ce(){return new $(this._enter||this._groups.map(xn),this._parents)}function gt(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}gt.prototype={constructor:gt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function ue(t){return function(){return t}}function fe(t,n,e,r,i,o){for(var s=0,a,c=n.length,u=o.length;s<u;++s)(a=n[s])?(a.__data__=o[s],r[s]=a):e[s]=new gt(t,o[s]);for(;s<c;++s)(a=n[s])&&(i[s]=a)}function le(t,n,e,r,i,o,s){var a,c,u=new Map,f=n.length,p=o.length,l=new Array(f),d;for(a=0;a<f;++a)(c=n[a])&&(l[a]=d=s.call(c,c.__data__,a,n)+"",u.has(d)?i[a]=c:u.set(d,c));for(a=0;a<p;++a)d=s.call(t,o[a],a,o)+"",(c=u.get(d))?(r[a]=c,c.__data__=o[a],u.delete(d)):e[a]=new gt(t,o[a]);for(a=0;a<f;++a)(c=n[a])&&u.get(l[a])===c&&(i[a]=c)}function he(t){return t.__data__}function pe(t,n){if(!arguments.length)return Array.from(this,he);var e=n?le:fe,r=this._parents,i=this._groups;typeof t!="function"&&(t=ue(t));for(var o=i.length,s=new Array(o),a=new Array(o),c=new Array(o),u=0;u<o;++u){var f=r[u],p=i[u],l=p.length,d=de(t.call(f,f&&f.__data__,u,r)),m=d.length,w=a[u]=new Array(m),S=s[u]=new Array(m),at=c[u]=new Array(l);e(f,p,w,S,at,d,n);for(var v=0,Y=0,C,q;v<m;++v)if(C=w[v]){for(v>=Y&&(Y=v+1);!(q=S[Y])&&++Y<m;);C._next=q||null}}return s=new $(s,r),s._enter=a,s._exit=c,s}function de(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function ge(){return new $(this._exit||this._groups.map(xn),this._parents)}function me(t,n,e){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),n!=null&&(i=n(i),i&&(i=i.selection())),e==null?o.remove():e(o),r&&i?r.merge(i).order():i}function _e(t){for(var n=t.selection?t.selection():t,e=this._groups,r=n._groups,i=e.length,o=r.length,s=Math.min(i,o),a=new Array(i),c=0;c<s;++c)for(var u=e[c],f=r[c],p=u.length,l=a[c]=new Array(p),d,m=0;m<p;++m)(d=u[m]||f[m])&&(l[m]=d);for(;c<i;++c)a[c]=e[c];return new $(a,this._parents)}function we(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r=t[n],i=r.length-1,o=r[i],s;--i>=0;)(s=r[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function ye(t){t||(t=xe);function n(p,l){return p&&l?t(p.__data__,l.__data__):!p-!l}for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var s=e[o],a=s.length,c=i[o]=new Array(a),u,f=0;f<a;++f)(u=s[f])&&(c[f]=u);c.sort(n)}return new $(i,this._parents).order()}function xe(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function ve(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function be(){return Array.from(this)}function $e(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var s=r[i];if(s)return s}return null}function Se(){let t=0;for(const n of this)++t;return t}function Ne(){return!this.node()}function Ee(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i=n[e],o=0,s=i.length,a;o<s;++o)(a=i[o])&&t.call(a,a.__data__,o,i);return this}function Ae(t){return function(){this.removeAttribute(t)}}function Ce(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ke(t,n){return function(){this.setAttribute(t,n)}}function Be(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function Me(t,n){return function(){var e=n.apply(this,arguments);e==null?this.removeAttribute(t):this.setAttribute(t,e)}}function Te(t,n){return function(){var e=n.apply(this,arguments);e==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function Ie(t,n){var e=vt(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((n==null?e.local?Ce:Ae:typeof n=="function"?e.local?Te:Me:e.local?Be:ke)(e,n))}function vn(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Re(t){return function(){this.style.removeProperty(t)}}function Oe(t,n,e){return function(){this.style.setProperty(t,n,e)}}function Xe(t,n,e){return function(){var r=n.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function He(t,n,e){return arguments.length>1?this.each((n==null?Re:typeof n=="function"?Xe:Oe)(t,n,e??"")):K(this.node(),t)}function K(t,n){return t.style.getPropertyValue(n)||vn(t).getComputedStyle(t,null).getPropertyValue(n)}function Fe(t){return function(){delete this[t]}}function Le(t,n){return function(){this[t]=n}}function Pe(t,n){return function(){var e=n.apply(this,arguments);e==null?delete this[t]:this[t]=e}}function De(t,n){return arguments.length>1?this.each((n==null?Fe:typeof n=="function"?Pe:Le)(t,n)):this.node()[t]}function bn(t){return t.trim().split(/^|\s+/)}function Ht(t){return t.classList||new $n(t)}function $n(t){this._node=t,this._names=bn(t.getAttribute("class")||"")}$n.prototype={add:function(t){var n=this._names.indexOf(t);n<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Sn(t,n){for(var e=Ht(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function Nn(t,n){for(var e=Ht(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function Ye(t){return function(){Sn(this,t)}}function qe(t){return function(){Nn(this,t)}}function Ve(t,n){return function(){(n.apply(this,arguments)?Sn:Nn)(this,t)}}function ze(t,n){var e=bn(t+"");if(arguments.length<2){for(var r=Ht(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each((typeof n=="function"?Ve:n?Ye:qe)(e,n))}function Ue(){this.textContent=""}function Ge(t){return function(){this.textContent=t}}function Ke(t){return function(){var n=t.apply(this,arguments);this.textContent=n??""}}function We(t){return arguments.length?this.each(t==null?Ue:(typeof t=="function"?Ke:Ge)(t)):this.node().textContent}function Je(){this.innerHTML=""}function Qe(t){return function(){this.innerHTML=t}}function Ze(t){return function(){var n=t.apply(this,arguments);this.innerHTML=n??""}}function je(t){return arguments.length?this.each(t==null?Je:(typeof t=="function"?Ze:Qe)(t)):this.node().innerHTML}function tr(){this.nextSibling&&this.parentNode.appendChild(this)}function nr(){return this.each(tr)}function er(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function rr(){return this.each(er)}function ir(t){var n=typeof t=="function"?t:mn(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function or(){return null}function sr(t,n){var e=typeof t=="function"?t:mn(t),r=n==null?or:typeof n=="function"?n:Xt(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})}function ar(){var t=this.parentNode;t&&t.removeChild(this)}function cr(){return this.each(ar)}function ur(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function fr(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function lr(t){return this.select(t?fr:ur)}function hr(t){return arguments.length?this.property("__data__",t):this.node().__data__}function pr(t){return function(n){t.call(this,n,this.__data__)}}function dr(t){return t.trim().split(/^|\s+/).map(function(n){var e="",r=n.indexOf(".");return r>=0&&(e=n.slice(r+1),n=n.slice(0,r)),{type:n,name:e}})}function gr(t){return function(){var n=this.__on;if(n){for(var e=0,r=-1,i=n.length,o;e<i;++e)o=n[e],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):n[++r]=o;++r?n.length=r:delete this.__on}}}function mr(t,n,e){return function(){var r=this.__on,i,o=pr(n);if(r){for(var s=0,a=r.length;s<a;++s)if((i=r[s]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=e),i.value=n;return}}this.addEventListener(t.type,o,e),i={type:t.type,name:t.name,value:n,listener:o,options:e},r?r.push(i):this.__on=[i]}}function _r(t,n,e){var r=dr(t+""),i,o=r.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var c=0,u=a.length,f;c<u;++c)for(i=0,f=a[c];i<o;++i)if((s=r[i]).type===f.type&&s.name===f.name)return f.value}return}for(a=n?mr:gr,i=0;i<o;++i)this.each(a(r[i],n,e));return this}function En(t,n,e){var r=vn(t),i=r.CustomEvent;typeof i=="function"?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function wr(t,n){return function(){return En(this,t,n)}}function yr(t,n){return function(){return En(this,t,n.apply(this,arguments))}}function xr(t,n){return this.each((typeof n=="function"?yr:wr)(t,n))}function*vr(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length,s;i<o;++i)(s=r[i])&&(yield s)}var An=[null];function $(t,n){this._groups=t,this._parents=n}function ot(){return new $([[document.documentElement]],An)}function br(){return this}$.prototype=ot.prototype={constructor:$,select:Kn,selectAll:Zn,selectChild:ee,selectChildren:se,filter:ae,data:pe,enter:ce,exit:ge,join:me,merge:_e,selection:br,order:we,sort:ye,call:ve,nodes:be,node:$e,size:Se,empty:Ne,each:Ee,attr:Ie,style:He,property:De,classed:ze,text:We,html:je,raise:nr,lower:rr,append:ir,insert:sr,remove:cr,clone:lr,datum:hr,on:_r,dispatch:xr,[Symbol.iterator]:vr};function jt(t){return typeof t=="string"?new $([[document.querySelector(t)]],[document.documentElement]):new $([[t]],An)}function Ft(t,n,e){t.prototype=n.prototype=e,e.constructor=t}function Cn(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function st(){}var nt=.7,mt=1/nt,U="\\s*([+-]?\\d+)\\s*",et="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",B="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",$r=/^#([0-9a-f]{3,8})$/,Sr=new RegExp(`^rgb\\(${U},${U},${U}\\)$`),Nr=new RegExp(`^rgb\\(${B},${B},${B}\\)$`),Er=new RegExp(`^rgba\\(${U},${U},${U},${et}\\)$`),Ar=new RegExp(`^rgba\\(${B},${B},${B},${et}\\)$`),Cr=new RegExp(`^hsl\\(${et},${B},${B}\\)$`),kr=new RegExp(`^hsla\\(${et},${B},${B},${et}\\)$`),tn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Ft(st,rt,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:nn,formatHex:nn,formatHex8:Br,formatHsl:Mr,formatRgb:en,toString:en});function nn(){return this.rgb().formatHex()}function Br(){return this.rgb().formatHex8()}function Mr(){return kn(this).formatHsl()}function en(){return this.rgb().formatRgb()}function rt(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=$r.exec(t))?(e=n[1].length,n=parseInt(n[1],16),e===6?rn(n):e===3?new x(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):e===8?ut(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):e===4?ut(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=Sr.exec(t))?new x(n[1],n[2],n[3],1):(n=Nr.exec(t))?new x(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=Er.exec(t))?ut(n[1],n[2],n[3],n[4]):(n=Ar.exec(t))?ut(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=Cr.exec(t))?an(n[1],n[2]/100,n[3]/100,1):(n=kr.exec(t))?an(n[1],n[2]/100,n[3]/100,n[4]):tn.hasOwnProperty(t)?rn(tn[t]):t==="transparent"?new x(NaN,NaN,NaN,0):null}function rn(t){return new x(t>>16&255,t>>8&255,t&255,1)}function ut(t,n,e,r){return r<=0&&(t=n=e=NaN),new x(t,n,e,r)}function Tr(t){return t instanceof st||(t=rt(t)),t?(t=t.rgb(),new x(t.r,t.g,t.b,t.opacity)):new x}function kt(t,n,e,r){return arguments.length===1?Tr(t):new x(t,n,e,r??1)}function x(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}Ft(x,kt,Cn(st,{brighter(t){return t=t==null?mt:Math.pow(mt,t),new x(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?nt:Math.pow(nt,t),new x(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new x(P(this.r),P(this.g),P(this.b),_t(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:on,formatHex:on,formatHex8:Ir,formatRgb:sn,toString:sn}));function on(){return`#${L(this.r)}${L(this.g)}${L(this.b)}`}function Ir(){return`#${L(this.r)}${L(this.g)}${L(this.b)}${L((isNaN(this.opacity)?1:this.opacity)*255)}`}function sn(){const t=_t(this.opacity);return`${t===1?"rgb(":"rgba("}${P(this.r)}, ${P(this.g)}, ${P(this.b)}${t===1?")":`, ${t})`}`}function _t(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function P(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function L(t){return t=P(t),(t<16?"0":"")+t.toString(16)}function an(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new E(t,n,e,r)}function kn(t){if(t instanceof E)return new E(t.h,t.s,t.l,t.opacity);if(t instanceof st||(t=rt(t)),!t)return new E;if(t instanceof E)return t;t=t.rgb();var n=t.r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),s=NaN,a=o-i,c=(o+i)/2;return a?(n===o?s=(e-r)/a+(e<r)*6:e===o?s=(r-n)/a+2:s=(n-e)/a+4,a/=c<.5?o+i:2-o-i,s*=60):a=c>0&&c<1?0:s,new E(s,a,c,t.opacity)}function Rr(t,n,e,r){return arguments.length===1?kn(t):new E(t,n,e,r??1)}function E(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}Ft(E,Rr,Cn(st,{brighter(t){return t=t==null?mt:Math.pow(mt,t),new E(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?nt:Math.pow(nt,t),new E(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new x(Et(t>=240?t-240:t+120,i,r),Et(t,i,r),Et(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new E(cn(this.h),ft(this.s),ft(this.l),_t(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=_t(this.opacity);return`${t===1?"hsl(":"hsla("}${cn(this.h)}, ${ft(this.s)*100}%, ${ft(this.l)*100}%${t===1?")":`, ${t})`}`}}));function cn(t){return t=(t||0)%360,t<0?t+360:t}function ft(t){return Math.max(0,Math.min(1,t||0))}function Et(t,n,e){return(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)*255}const Bn=t=>()=>t;function Or(t,n){return function(e){return t+e*n}}function Xr(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}function Hr(t){return(t=+t)==1?Mn:function(n,e){return e-n?Xr(n,e,t):Bn(isNaN(n)?e:n)}}function Mn(t,n){var e=n-t;return e?Or(t,e):Bn(isNaN(t)?n:t)}const un=(function t(n){var e=Hr(n);function r(i,o){var s=e((i=kt(i)).r,(o=kt(o)).r),a=e(i.g,o.g),c=e(i.b,o.b),u=Mn(i.opacity,o.opacity);return function(f){return i.r=s(f),i.g=a(f),i.b=c(f),i.opacity=u(f),i+""}}return r.gamma=t,r})(1);function X(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}}var Bt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,At=new RegExp(Bt.source,"g");function Fr(t){return function(){return t}}function Lr(t){return function(n){return t(n)+""}}function Pr(t,n){var e=Bt.lastIndex=At.lastIndex=0,r,i,o,s=-1,a=[],c=[];for(t=t+"",n=n+"";(r=Bt.exec(t))&&(i=At.exec(n));)(o=i.index)>e&&(o=n.slice(e,o),a[s]?a[s]+=o:a[++s]=o),(r=r[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,c.push({i:s,x:X(r,i)})),e=At.lastIndex;return e<n.length&&(o=n.slice(e),a[s]?a[s]+=o:a[++s]=o),a.length<2?c[0]?Lr(c[0].x):Fr(n):(n=c.length,function(u){for(var f=0,p;f<n;++f)a[(p=c[f]).i]=p.x(u);return a.join("")})}var fn=180/Math.PI,Mt={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Tn(t,n,e,r,i,o){var s,a,c;return(s=Math.sqrt(t*t+n*n))&&(t/=s,n/=s),(c=t*e+n*r)&&(e-=t*c,r-=n*c),(a=Math.sqrt(e*e+r*r))&&(e/=a,r/=a,c/=a),t*r<n*e&&(t=-t,n=-n,c=-c,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(n,t)*fn,skewX:Math.atan(c)*fn,scaleX:s,scaleY:a}}var lt;function Dr(t){const n=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return n.isIdentity?Mt:Tn(n.a,n.b,n.c,n.d,n.e,n.f)}function Yr(t){return t==null||(lt||(lt=document.createElementNS("http://www.w3.org/2000/svg","g")),lt.setAttribute("transform",t),!(t=lt.transform.baseVal.consolidate()))?Mt:(t=t.matrix,Tn(t.a,t.b,t.c,t.d,t.e,t.f))}function In(t,n,e,r){function i(u){return u.length?u.pop()+" ":""}function o(u,f,p,l,d,m){if(u!==p||f!==l){var w=d.push("translate(",null,n,null,e);m.push({i:w-4,x:X(u,p)},{i:w-2,x:X(f,l)})}else(p||l)&&d.push("translate("+p+n+l+e)}function s(u,f,p,l){u!==f?(u-f>180?f+=360:f-u>180&&(u+=360),l.push({i:p.push(i(p)+"rotate(",null,r)-2,x:X(u,f)})):f&&p.push(i(p)+"rotate("+f+r)}function a(u,f,p,l){u!==f?l.push({i:p.push(i(p)+"skewX(",null,r)-2,x:X(u,f)}):f&&p.push(i(p)+"skewX("+f+r)}function c(u,f,p,l,d,m){if(u!==p||f!==l){var w=d.push(i(d)+"scale(",null,",",null,")");m.push({i:w-4,x:X(u,p)},{i:w-2,x:X(f,l)})}else(p!==1||l!==1)&&d.push(i(d)+"scale("+p+","+l+")")}return function(u,f){var p=[],l=[];return u=t(u),f=t(f),o(u.translateX,u.translateY,f.translateX,f.translateY,p,l),s(u.rotate,f.rotate,p,l),a(u.skewX,f.skewX,p,l),c(u.scaleX,u.scaleY,f.scaleX,f.scaleY,p,l),u=f=null,function(d){for(var m=-1,w=l.length,S;++m<w;)p[(S=l[m]).i]=S.x(d);return p.join("")}}}var qr=In(Dr,"px, ","px)","deg)"),Vr=In(Yr,", ",")",")"),W=0,Q=0,J=0,Rn=1e3,wt,Z,yt=0,D=0,bt=0,it=typeof performance=="object"&&performance.now?performance:Date,On=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Lt(){return D||(On(zr),D=it.now()+bt)}function zr(){D=0}function xt(){this._call=this._time=this._next=null}xt.prototype=Xn.prototype={constructor:xt,restart:function(t,n,e){if(typeof t!="function")throw new TypeError("callback is not a function");e=(e==null?Lt():+e)+(n==null?0:+n),!this._next&&Z!==this&&(Z?Z._next=this:wt=this,Z=this),this._call=t,this._time=e,Tt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Tt())}};function Xn(t,n,e){var r=new xt;return r.restart(t,n,e),r}function Ur(){Lt(),++W;for(var t=wt,n;t;)(n=D-t._time)>=0&&t._call.call(void 0,n),t=t._next;--W}function ln(){D=(yt=it.now())+bt,W=Q=0;try{Ur()}finally{W=0,Kr(),D=0}}function Gr(){var t=it.now(),n=t-yt;n>Rn&&(bt-=n,yt=t)}function Kr(){for(var t,n=wt,e,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:wt=e);Z=t,Tt(r)}function Tt(t){if(!W){Q&&(Q=clearTimeout(Q));var n=t-D;n>24?(t<1/0&&(Q=setTimeout(ln,t-it.now()-bt)),J&&(J=clearInterval(J))):(J||(yt=it.now(),J=setInterval(Gr,Rn)),W=1,On(ln))}}function hn(t,n,e){var r=new xt;return n=n==null?0:+n,r.restart(i=>{r.stop(),t(i+n)},n,e),r}var Wr=gn("start","end","cancel","interrupt"),Jr=[],Hn=0,pn=1,It=2,pt=3,dn=4,Rt=5,dt=6;function $t(t,n,e,r,i,o){var s=t.__transition;if(!s)t.__transition={};else if(e in s)return;Qr(t,e,{name:n,index:r,group:i,on:Wr,tween:Jr,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Hn})}function Pt(t,n){var e=A(t,n);if(e.state>Hn)throw new Error("too late; already scheduled");return e}function M(t,n){var e=A(t,n);if(e.state>pt)throw new Error("too late; already running");return e}function A(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function Qr(t,n,e){var r=t.__transition,i;r[n]=e,e.timer=Xn(o,0,e.time);function o(u){e.state=pn,e.timer.restart(s,e.delay,e.time),e.delay<=u&&s(u-e.delay)}function s(u){var f,p,l,d;if(e.state!==pn)return c();for(f in r)if(d=r[f],d.name===e.name){if(d.state===pt)return hn(s);d.state===dn?(d.state=dt,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[f]):+f<n&&(d.state=dt,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[f])}if(hn(function(){e.state===pt&&(e.state=dn,e.timer.restart(a,e.delay,e.time),a(u))}),e.state=It,e.on.call("start",t,t.__data__,e.index,e.group),e.state===It){for(e.state=pt,i=new Array(l=e.tween.length),f=0,p=-1;f<l;++f)(d=e.tween[f].value.call(t,t.__data__,e.index,e.group))&&(i[++p]=d);i.length=p+1}}function a(u){for(var f=u<e.duration?e.ease.call(null,u/e.duration):(e.timer.restart(c),e.state=Rt,1),p=-1,l=i.length;++p<l;)i[p].call(t,f);e.state===Rt&&(e.on.call("end",t,t.__data__,e.index,e.group),c())}function c(){e.state=dt,e.timer.stop(),delete r[n];for(var u in r)return;delete t.__transition}}function Zr(t,n){var e=t.__transition,r,i,o=!0,s;if(e){n=n==null?null:n+"";for(s in e){if((r=e[s]).name!==n){o=!1;continue}i=r.state>It&&r.state<Rt,r.state=dt,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete e[s]}o&&delete t.__transition}}function jr(t){return this.each(function(){Zr(this,t)})}function ti(t,n){var e,r;return function(){var i=M(this,t),o=i.tween;if(o!==e){r=e=o;for(var s=0,a=r.length;s<a;++s)if(r[s].name===n){r=r.slice(),r.splice(s,1);break}}i.tween=r}}function ni(t,n,e){var r,i;if(typeof e!="function")throw new Error;return function(){var o=M(this,t),s=o.tween;if(s!==r){i=(r=s).slice();for(var a={name:n,value:e},c=0,u=i.length;c<u;++c)if(i[c].name===n){i[c]=a;break}c===u&&i.push(a)}o.tween=i}}function ei(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r=A(this.node(),e).tween,i=0,o=r.length,s;i<o;++i)if((s=r[i]).name===t)return s.value;return null}return this.each((n==null?ti:ni)(e,t,n))}function Dt(t,n,e){var r=t._id;return t.each(function(){var i=M(this,r);(i.value||(i.value={}))[n]=e.apply(this,arguments)}),function(i){return A(i,r).value[n]}}function Fn(t,n){var e;return(typeof n=="number"?X:n instanceof rt?un:(e=rt(n))?(n=e,un):Pr)(t,n)}function ri(t){return function(){this.removeAttribute(t)}}function ii(t){return function(){this.removeAttributeNS(t.space,t.local)}}function oi(t,n,e){var r,i=e+"",o;return function(){var s=this.getAttribute(t);return s===i?null:s===r?o:o=n(r=s,e)}}function si(t,n,e){var r,i=e+"",o;return function(){var s=this.getAttributeNS(t.space,t.local);return s===i?null:s===r?o:o=n(r=s,e)}}function ai(t,n,e){var r,i,o;return function(){var s,a=e(this),c;return a==null?void this.removeAttribute(t):(s=this.getAttribute(t),c=a+"",s===c?null:s===r&&c===i?o:(i=c,o=n(r=s,a)))}}function ci(t,n,e){var r,i,o;return function(){var s,a=e(this),c;return a==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),c=a+"",s===c?null:s===r&&c===i?o:(i=c,o=n(r=s,a)))}}function ui(t,n){var e=vt(t),r=e==="transform"?Vr:Fn;return this.attrTween(t,typeof n=="function"?(e.local?ci:ai)(e,r,Dt(this,"attr."+t,n)):n==null?(e.local?ii:ri)(e):(e.local?si:oi)(e,r,n))}function fi(t,n){return function(e){this.setAttribute(t,n.call(this,e))}}function li(t,n){return function(e){this.setAttributeNS(t.space,t.local,n.call(this,e))}}function hi(t,n){var e,r;function i(){var o=n.apply(this,arguments);return o!==r&&(e=(r=o)&&li(t,o)),e}return i._value=n,i}function pi(t,n){var e,r;function i(){var o=n.apply(this,arguments);return o!==r&&(e=(r=o)&&fi(t,o)),e}return i._value=n,i}function di(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(n==null)return this.tween(e,null);if(typeof n!="function")throw new Error;var r=vt(t);return this.tween(e,(r.local?hi:pi)(r,n))}function gi(t,n){return function(){Pt(this,t).delay=+n.apply(this,arguments)}}function mi(t,n){return n=+n,function(){Pt(this,t).delay=n}}function _i(t){var n=this._id;return arguments.length?this.each((typeof t=="function"?gi:mi)(n,t)):A(this.node(),n).delay}function wi(t,n){return function(){M(this,t).duration=+n.apply(this,arguments)}}function yi(t,n){return n=+n,function(){M(this,t).duration=n}}function xi(t){var n=this._id;return arguments.length?this.each((typeof t=="function"?wi:yi)(n,t)):A(this.node(),n).duration}function vi(t,n){if(typeof n!="function")throw new Error;return function(){M(this,t).ease=n}}function bi(t){var n=this._id;return arguments.length?this.each(vi(n,t)):A(this.node(),n).ease}function $i(t,n){return function(){var e=n.apply(this,arguments);if(typeof e!="function")throw new Error;M(this,t).ease=e}}function Si(t){if(typeof t!="function")throw new Error;return this.each($i(this._id,t))}function Ni(t){typeof t!="function"&&(t=wn(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o=n[i],s=o.length,a=r[i]=[],c,u=0;u<s;++u)(c=o[u])&&t.call(c,c.__data__,u,o)&&a.push(c);return new O(r,this._parents,this._name,this._id)}function Ei(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),s=new Array(r),a=0;a<o;++a)for(var c=n[a],u=e[a],f=c.length,p=s[a]=new Array(f),l,d=0;d<f;++d)(l=c[d]||u[d])&&(p[d]=l);for(;a<r;++a)s[a]=n[a];return new O(s,this._parents,this._name,this._id)}function Ai(t){return(t+"").trim().split(/^|\s+/).every(function(n){var e=n.indexOf(".");return e>=0&&(n=n.slice(0,e)),!n||n==="start"})}function Ci(t,n,e){var r,i,o=Ai(n)?Pt:M;return function(){var s=o(this,t),a=s.on;a!==r&&(i=(r=a).copy()).on(n,e),s.on=i}}function ki(t,n){var e=this._id;return arguments.length<2?A(this.node(),e).on.on(t):this.each(Ci(e,t,n))}function Bi(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}function Mi(){return this.on("end.remove",Bi(this._id))}function Ti(t){var n=this._name,e=this._id;typeof t!="function"&&(t=Xt(t));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s)for(var a=r[s],c=a.length,u=o[s]=new Array(c),f,p,l=0;l<c;++l)(f=a[l])&&(p=t.call(f,f.__data__,l,a))&&("__data__"in f&&(p.__data__=f.__data__),u[l]=p,$t(u[l],n,e,l,u,A(f,e)));return new O(o,this._parents,n,e)}function Ii(t){var n=this._name,e=this._id;typeof t!="function"&&(t=_n(t));for(var r=this._groups,i=r.length,o=[],s=[],a=0;a<i;++a)for(var c=r[a],u=c.length,f,p=0;p<u;++p)if(f=c[p]){for(var l=t.call(f,f.__data__,p,c),d,m=A(f,e),w=0,S=l.length;w<S;++w)(d=l[w])&&$t(d,n,e,w,l,m);o.push(l),s.push(f)}return new O(o,s,n,e)}var Ri=ot.prototype.constructor;function Oi(){return new Ri(this._groups,this._parents)}function Xi(t,n){var e,r,i;return function(){var o=K(this,t),s=(this.style.removeProperty(t),K(this,t));return o===s?null:o===e&&s===r?i:i=n(e=o,r=s)}}function Ln(t){return function(){this.style.removeProperty(t)}}function Hi(t,n,e){var r,i=e+"",o;return function(){var s=K(this,t);return s===i?null:s===r?o:o=n(r=s,e)}}function Fi(t,n,e){var r,i,o;return function(){var s=K(this,t),a=e(this),c=a+"";return a==null&&(c=a=(this.style.removeProperty(t),K(this,t))),s===c?null:s===r&&c===i?o:(i=c,o=n(r=s,a))}}function Li(t,n){var e,r,i,o="style."+n,s="end."+o,a;return function(){var c=M(this,t),u=c.on,f=c.value[o]==null?a||(a=Ln(n)):void 0;(u!==e||i!==f)&&(r=(e=u).copy()).on(s,i=f),c.on=r}}function Pi(t,n,e){var r=(t+="")=="transform"?qr:Fn;return n==null?this.styleTween(t,Xi(t,r)).on("end.style."+t,Ln(t)):typeof n=="function"?this.styleTween(t,Fi(t,r,Dt(this,"style."+t,n))).each(Li(this._id,t)):this.styleTween(t,Hi(t,r,n),e).on("end.style."+t,null)}function Di(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}function Yi(t,n,e){var r,i;function o(){var s=n.apply(this,arguments);return s!==i&&(r=(i=s)&&Di(t,s,e)),r}return o._value=n,o}function qi(t,n,e){var r="style."+(t+="");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;return this.tween(r,Yi(t,n,e??""))}function Vi(t){return function(){this.textContent=t}}function zi(t){return function(){var n=t(this);this.textContent=n??""}}function Ui(t){return this.tween("text",typeof t=="function"?zi(Dt(this,"text",t)):Vi(t==null?"":t+""))}function Gi(t){return function(n){this.textContent=t.call(this,n)}}function Ki(t){var n,e;function r(){var i=t.apply(this,arguments);return i!==e&&(n=(e=i)&&Gi(i)),n}return r._value=t,r}function Wi(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,Ki(t))}function Ji(){for(var t=this._name,n=this._id,e=Pn(),r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],a=s.length,c,u=0;u<a;++u)if(c=s[u]){var f=A(c,n);$t(c,t,e,u,s,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new O(r,this._parents,t,e)}function Qi(){var t,n,e=this,r=e._id,i=e.size();return new Promise(function(o,s){var a={value:s},c={value:function(){--i===0&&o()}};e.each(function(){var u=M(this,r),f=u.on;f!==t&&(n=(t=f).copy(),n._.cancel.push(a),n._.interrupt.push(a),n._.end.push(c)),u.on=n}),i===0&&o()})}var Zi=0;function O(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function Pn(){return++Zi}var R=ot.prototype;O.prototype={constructor:O,select:Ti,selectAll:Ii,selectChild:R.selectChild,selectChildren:R.selectChildren,filter:Ni,merge:Ei,selection:Oi,transition:Ji,call:R.call,nodes:R.nodes,node:R.node,size:R.size,empty:R.empty,each:R.each,on:ki,attr:ui,attrTween:di,style:Pi,styleTween:qi,text:Ui,textTween:Wi,remove:Mi,tween:ei,delay:_i,duration:xi,ease:bi,easeVarying:Si,end:Qi,[Symbol.iterator]:R[Symbol.iterator]};function ji(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var to={time:null,delay:0,duration:250,ease:ji};function no(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))throw new Error(`transition ${n} not found`);return e}function eo(t){var n,e;t instanceof O?(n=t._id,t=t._name):(n=Pn(),(e=to).time=Lt(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],a=s.length,c,u=0;u<a;++u)(c=s[u])&&$t(c,t,n,u,s,e||no(c,n));return new O(r,this._parents,t,n)}ot.prototype.interrupt=jr;ot.prototype.transition=eo;function j(t,n,e){this.k=t,this.x=n,this.y=e}j.prototype={constructor:j,scale:function(t){return t===1?this:new j(this.k*t,this.x,this.y)},translate:function(t,n){return t===0&n===0?this:new j(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};j.prototype;let N=[],tt=[],G=new Map;async function ro(){const t=await window.gitopo.git.exec('log --all --format="%H|%P|%ct|%s" --date-order -1000');if(!t.success)return console.error("Failed to fetch commits:",t.error),[];const n=[],e=t.output.trim().split(`
|
|
2
|
+
`);for(const r of e){const i=r.split("|");if(i.length>=4){const o=i[0],s=i[1],a=parseInt(i[2],10),c=i.slice(3).join("|"),u=s.trim()?s.trim().split(" "):[];n.push({hash:o,parents:u,timestamp:a,message:c})}}return n.sort((r,i)=>i.timestamp-r.timestamp),n}async function io(){const t=await window.gitopo.git.exec('branch -a --format="%(refname:short) %(objectname)"');if(!t.success)return console.error("Failed to fetch branches:",t.error),[];const n=[],e=t.output.trim().split(`
|
|
3
|
+
`);for(const r of e){const i=r.trim().split(" ");if(i.length>=2){const o=i[0],s=i[1];n.push({name:o,hash:s})}}return n}function oo(t){const n=["branch1","branch2","branch3"],e=t.find(r=>r.name==="main"||r.name==="master");n.forEach((r,i)=>{const o=document.getElementById(r);o.innerHTML="";const s=document.createElement("option");s.value="",s.textContent="----",o.appendChild(s),t.forEach(a=>{const c=document.createElement("option");c.value=a.name,c.textContent=a.name,o.appendChild(c)}),i===0&&e&&(o.value=e.name),o.addEventListener("change",()=>Ot())})}function so(t){const n=tt.find(i=>i.name===t);if(!n)return new Set;const e=new Set;let r=n.hash;for(;r;){e.add(r);const i=G.get(r);if(i&&i.parents.length>0)r=i.parents[0];else break}return e}function ao(t){const n=[],e=new Set,r=new Map;for(const a of N)for(const c of a.parents)r.has(c)||r.set(c,[]),r.get(c).push(a.hash);function i(a){const c=new Set,u=[a];for(;u.length>0;){const f=u.pop();if(c.has(f)||t.has(f)||e.has(f))continue;const p=G.get(f);if(!p)continue;c.add(f);for(const d of p.parents)!t.has(d)&&!c.has(d)&&u.push(d);const l=r.get(f)||[];for(const d of l)!t.has(d)&&!c.has(d)&&u.push(d)}return c}function o(a){for(const c of a){const u=G.get(c);if(u){for(const f of u.parents)if(!t.has(f)&&!a.has(f))return!1}}return!0}function s(a){for(const c of t){const u=G.get(c);if(!(!u||u.parents.length<2)){for(let f=1;f<u.parents.length;f++)if(a.has(u.parents[f]))return c}}return null}for(const a of N){if(t.has(a.hash)||e.has(a.hash))continue;const c=i(a.hash);c.size>0&&o(c)&&(c.forEach(u=>e.add(u)),n.push({mergeCommit:s(c),commits:c}))}return n}function co(){const t=[];return["branch1","branch2","branch3"].forEach(n=>{const e=document.getElementById(n);e&&e.value&&t.push(e.value)}),t}function Ot(){const t=jt("#graph");t.selectAll("*").remove();const n=jt("#app");n.selectAll(".tooltip").remove();const e=document.getElementById("controls").offsetHeight,r=window.innerWidth,i=window.innerHeight-e;t.attr("width",r).attr("height",i);const o=6,s=30,a=150,c=30,u=50,f=50,l=co().map(h=>{const g=so(h),_=ao(g);return{name:h,lineage:g,subBranches:_}}),d=new Map;tt.forEach(h=>{d.has(h.hash)||d.set(h.hash,[]),d.get(h.hash).push(h.name)});const m=new Map;N.forEach(h=>{m.set(h.hash,{mainCol:l.length,subOffset:0,isSubBranch:!1})}),l.forEach((h,g)=>{for(const _ of h.lineage)m.set(_,{mainCol:g,subOffset:0,isSubBranch:!1})});let w=0;l.forEach((h,g)=>{const _=new Map;h.subBranches.forEach(y=>{const k=`sb-${w++}`,H=[];y.commits.forEach(b=>{const I=N.findIndex(Nt=>Nt.hash===b);I>=0&&H.push(I)});let T=1,F=!0;for(;F;){F=!1;for(const b of H)if((_.get(b)||new Set).has(T)){F=!0,T++;break}}for(const b of H)_.has(b)||_.set(b,new Set),_.get(b).add(T);y.commits.forEach(b=>{m.set(b,{mainCol:g,subOffset:T,isSubBranch:!0,subBranchId:k})})})});const S=new Map;let at=f;for(let h=0;h<=l.length;h++)if(S.set(h,at),h<l.length){let g=0;N.forEach(_=>{const y=m.get(_.hash);y.mainCol===h&&y.subOffset>g&&(g=y.subOffset)}),at+=a+g*c}const v=new Map;N.forEach((h,g)=>{const _=m.get(h.hash),k=S.get(_.mainCol)+_.subOffset*c;v.set(h.hash,{col:_.mainCol,subOffset:_.subOffset,row:g,x:k,y:u+g*s,isSubBranch:_.isSubBranch,subBranchId:_.subBranchId||null})});const Y=Array.from(m.values()).some(h=>h.mainCol===l.length),C=t.append("g").attr("class","main-group"),q=n.append("div").attr("class","tooltip").style("opacity",0);l.forEach((h,g)=>{C.append("text").attr("x",S.get(g)).attr("y",25).attr("fill","#4fc3f7").attr("font-size","14px").attr("font-weight","bold").text(h.name)}),Y&&C.append("text").attr("x",S.get(l.length)).attr("y",25).attr("fill","#888").attr("font-size","14px").text("Other"),N.forEach(h=>{const g=v.get(h.hash);g&&h.parents.forEach(_=>{const y=v.get(_);if(y){if(g.col===l.length||y.col===l.length)return;const k=g.x,H=g.y,T=y.x,F=y.y;let b;if(k===T)b=`M ${k} ${H} L ${T} ${F}`;else{const Jt=(H+F)/2;b=`M ${k} ${H} C ${k} ${Jt}, ${T} ${Jt}, ${T} ${F}`}const I=g.subBranchId||y.subBranchId||null,Nt=g.isSubBranch||y.isSubBranch,Dn=C.append("path").attr("d",b).attr("fill","none").attr("stroke",Nt?"#555":"#666").attr("stroke-width",g.isSubBranch&&y.isSubBranch?1:1.5).attr("stroke-opacity",.6).attr("class",I?`edge edge-${I}`:"edge");I&&Dn.style("cursor","pointer").on("mouseenter",()=>{C.selectAll(`.edge-${I}`).attr("stroke","#4fc3f7").attr("stroke-width",2.5).attr("stroke-opacity",1)}).on("mouseleave",()=>{C.selectAll(`.edge-${I}`).attr("stroke","#555").attr("stroke-width",1).attr("stroke-opacity",.6)})}})}),C.selectAll("g.node").data(N).enter().append("g").attr("class","node").attr("transform",h=>{const g=v.get(h.hash);return g?`translate(${g.x}, ${g.y})`:"translate(-100, -100)"}).append("circle").attr("r",h=>{const g=v.get(h.hash);return g.isSubBranch?o*.6:g.col<l.length?o:o*.7}).attr("fill",h=>{const g=v.get(h.hash);return g.isSubBranch?"#a0a0a0":g.col<l.length?d.has(h.hash)?"#4fc3f7":"#fff":"#888"}).attr("stroke","#333").attr("stroke-width",h=>{const g=v.get(h.hash);return g.isSubBranch?1:g.col<l.length?2:1}).style("cursor","pointer").on("mouseenter",(h,g)=>{const _=d.get(g.hash),y=_?`[${_.join(", ")}]<br/>`:"",k=new Date(g.timestamp*1e3).toLocaleString();q.html(`<strong>${g.hash.substring(0,7)}</strong><br/>${y}${g.message}<br/><span class="date">${k}</span>`).style("left",h.pageX+15+"px").style("top",h.pageY-10+"px").style("opacity",1)}).on("mousemove",h=>{q.style("left",h.pageX+15+"px").style("top",h.pageY-10+"px")}).on("mouseleave",()=>{q.style("opacity",0)});let V=0,z=0,ct=!1,Yt=0,qt=0,Vt=0,zt=0;function St(){C.attr("transform",`translate(${V}, ${z})`)}t.on("wheel",h=>{h.preventDefault(),V-=h.deltaX,z-=h.deltaY,St()}),t.on("mousedown",h=>{h.button===0&&(ct=!0,Yt=h.clientX,qt=h.clientY,Vt=V,zt=z,h.preventDefault())}),t.on("mousemove",h=>{ct&&(V=Vt+(h.clientX-Yt),z=zt+(h.clientY-qt),St())}),t.on("mouseup",h=>{h.button===0&&(ct=!1)}),t.on("mouseleave",()=>{ct=!1});let Ut=0,Gt=0,Kt=0,Wt=0;t.on("touchstart",h=>{if(h.touches.length===1){const g=h.touches[0];Ut=g.clientX,Gt=g.clientY,Kt=V,Wt=z}}),t.on("touchmove",h=>{if(h.touches.length===1){h.preventDefault();const g=h.touches[0];V=Kt+(g.clientX-Ut),z=Wt+(g.clientY-Gt),St()}}),t.on("contextmenu",h=>{h.preventDefault()})}async function uo(){[N,tt]=await Promise.all([ro(),io()]),G.clear(),N.forEach(t=>G.set(t.hash,t)),console.log("Commits:",N.length),console.log("Branches:",tt.length),oo(tt),Ot(),window.addEventListener("resize",()=>{Ot()})}uo();
|