@moderneinc/react-charts 1.5.0 → 1.5.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/dist/index.cjs CHANGED
@@ -12,7 +12,7 @@
12
12
  * Copyright 2008-2025, GreenSock. All rights reserved.
13
13
  * Subject to the terms at https://gsap.com/standard-license
14
14
  * @author: Jack Doyle, jack@greensock.com
15
- */var kh,Zn,Kr,uf,yr,Ch,cf,bS=function(){return typeof window<"u"},jn={},gr=180/Math.PI,Vr=Math.PI/180,Ir=Math.atan2,Rh=1e8,ff=/([A-Z])/g,wS=/(left|right|width|margin|padding|x)/i,SS=/[\s,\(]\S/,Tn={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},xc=function(t,n){return n.set(n.t,n.p,Math.round((n.s+n.c*t)*1e4)/1e4+n.u,n)},TS=function(t,n){return n.set(n.t,n.p,t===1?n.e:Math.round((n.s+n.c*t)*1e4)/1e4+n.u,n)},MS=function(t,n){return n.set(n.t,n.p,t?Math.round((n.s+n.c*t)*1e4)/1e4+n.u:n.b,n)},AS=function(t,n){return n.set(n.t,n.p,t===1?n.e:t?Math.round((n.s+n.c*t)*1e4)/1e4+n.u:n.b,n)},kS=function(t,n){var r=n.s+n.c*t;n.set(n.t,n.p,~~(r+(r<0?-.5:.5))+n.u,n)},D0=function(t,n){return n.set(n.t,n.p,t?n.e:n.b,n)},O0=function(t,n){return n.set(n.t,n.p,t!==1?n.b:n.e,n)},CS=function(t,n,r){return t.style[n]=r},RS=function(t,n,r){return t.style.setProperty(n,r)},ES=function(t,n,r){return t._gsap[n]=r},DS=function(t,n,r){return t._gsap.scaleX=t._gsap.scaleY=r},OS=function(t,n,r,i,a){var s=t._gsap;s.scaleX=s.scaleY=r,s.renderTransform(a,s)},PS=function(t,n,r,i,a){var s=t._gsap;s[n]=r,s.renderTransform(a,s)},Gt="transform",Ue=Gt+"Origin",FS=function e(t,n){var r=this,i=this.target,a=i.style,s=i._gsap;if(t in jn&&a){if(this.tfm=this.tfm||{},t!=="transform")t=Tn[t]||t,~t.indexOf(",")?t.split(",").forEach(function(o){return r.tfm[o]=$n(i,o)}):this.tfm[t]=s.x?s[t]:$n(i,t),t===Ue&&(this.tfm.zOrigin=s.zOrigin);else return Tn.transform.split(",").forEach(function(o){return e.call(r,o,n)});if(this.props.indexOf(Gt)>=0)return;s.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(Ue,n,"")),t=Gt}(a||n)&&this.props.push(t,n,a[t])},P0=function(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))},$S=function(){var t=this.props,n=this.target,r=n.style,i=n._gsap,a,s;for(a=0;a<t.length;a+=3)t[a+1]?t[a+1]===2?n[t[a]](t[a+2]):n[t[a]]=t[a+2]:t[a+2]?r[t[a]]=t[a+2]:r.removeProperty(t[a].substr(0,2)==="--"?t[a]:t[a].replace(ff,"-$1").toLowerCase());if(this.tfm){for(s in this.tfm)i[s]=this.tfm[s];i.svg&&(i.renderTransform(),n.setAttribute("data-svg-origin",this.svgo||"")),a=cf(),(!a||!a.isStart)&&!r[Gt]&&(P0(r),i.zOrigin&&r[Ue]&&(r[Ue]+=" "+i.zOrigin+"px",i.zOrigin=0,i.renderTransform()),i.uncache=1)}},F0=function(t,n){var r={target:t,props:[],revert:$S,save:FS};return t._gsap||He.core.getCache(t),n&&t.style&&t.nodeType&&n.split(",").forEach(function(i){return r.save(i)}),r},$0,vc=function(t,n){var r=Zn.createElementNS?Zn.createElementNS((n||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Zn.createElement(t);return r&&r.style?r:Zn.createElement(t)},tn=function e(t,n,r){var i=getComputedStyle(t);return i[n]||i.getPropertyValue(n.replace(ff,"-$1").toLowerCase())||i.getPropertyValue(n)||!r&&e(t,fi(n)||n,1)||""},Eh="O,Moz,ms,Ms,Webkit".split(","),fi=function(t,n,r){var i=n||yr,a=i.style,s=5;if(t in a&&!r)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);s--&&!(Eh[s]+t in a););return s<0?null:(s===3?"ms":s>=0?Eh[s]:"")+t},bc=function(){bS()&&window.document&&(kh=window,Zn=kh.document,Kr=Zn.documentElement,yr=vc("div")||{style:{}},vc("div"),Gt=fi(Gt),Ue=Gt+"Origin",yr.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",$0=!!fi("perspective"),cf=He.core.reverting,uf=1)},Dh=function(t){var n=t.ownerSVGElement,r=vc("svg",n&&n.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=t.cloneNode(!0),a;i.style.display="block",r.appendChild(i),Kr.appendChild(r);try{a=i.getBBox()}catch{}return r.removeChild(i),Kr.removeChild(r),a},Oh=function(t,n){for(var r=n.length;r--;)if(t.hasAttribute(n[r]))return t.getAttribute(n[r])},L0=function(t){var n,r;try{n=t.getBBox()}catch{n=Dh(t),r=1}return n&&(n.width||n.height)||r||(n=Dh(t)),n&&!n.width&&!n.x&&!n.y?{x:+Oh(t,["x","cx","x1"])||0,y:+Oh(t,["y","cy","y1"])||0,width:0,height:0}:n},N0=function(t){return!!(t.getCTM&&(!t.parentNode||t.ownerSVGElement)&&L0(t))},rr=function(t,n){if(n){var r=t.style,i;n in jn&&n!==Ue&&(n=Gt),r.removeProperty?(i=n.substr(0,2),(i==="ms"||n.substr(0,6)==="webkit")&&(n="-"+n),r.removeProperty(i==="--"?n:n.replace(ff,"-$1").toLowerCase())):r.removeAttribute(n)}},Qn=function(t,n,r,i,a,s){var o=new Be(t._pt,n,r,0,1,s?O0:D0);return t._pt=o,o.b=i,o.e=a,t._props.push(r),o},Ph={deg:1,rad:1,turn:1},LS={grid:1,flex:1},ir=function e(t,n,r,i){var a=parseFloat(r)||0,s=(r+"").trim().substr((a+"").length)||"px",o=yr.style,l=wS.test(n),u=t.tagName.toLowerCase()==="svg",c=(u?"client":"offset")+(l?"Width":"Height"),f=100,h=i==="px",p=i==="%",g,d,m,x;if(i===s||!a||Ph[i]||Ph[s])return a;if(s!=="px"&&!h&&(a=e(t,n,r,"px")),x=t.getCTM&&N0(t),(p||s==="%")&&(jn[n]||~n.indexOf("adius")))return g=x?t.getBBox()[l?"width":"height"]:t[c],te(p?a/g*f:a/100*g);if(o[l?"width":"height"]=f+(h?s:i),d=i!=="rem"&&~n.indexOf("adius")||i==="em"&&t.appendChild&&!u?t:t.parentNode,x&&(d=(t.ownerSVGElement||{}).parentNode),(!d||d===Zn||!d.appendChild)&&(d=Zn.body),m=d._gsap,m&&p&&m.width&&l&&m.time===Qe.time&&!m.uncache)return te(a/m.width*f);if(p&&(n==="height"||n==="width")){var y=t.style[n];t.style[n]=f+i,g=t[c],y?t.style[n]=y:rr(t,n)}else(p||s==="%")&&!LS[tn(d,"display")]&&(o.position=tn(t,"position")),d===t&&(o.position="static"),d.appendChild(yr),g=yr[c],d.removeChild(yr),o.position="absolute";return l&&p&&(m=vr(d),m.time=Qe.time,m.width=d[c]),te(h?g*a/f:g&&a?f/g*a:0)},$n=function(t,n,r,i){var a;return uf||bc(),n in Tn&&n!=="transform"&&(n=Tn[n],~n.indexOf(",")&&(n=n.split(",")[0])),jn[n]&&n!=="transform"?(a=Ji(t,i),a=n!=="transformOrigin"?a[n]:a.svg?a.origin:Za(tn(t,Ue))+" "+a.zOrigin+"px"):(a=t.style[n],(!a||a==="auto"||i||~(a+"").indexOf("calc("))&&(a=Va[n]&&Va[n](t,n,r)||tn(t,n)||Jm(t,n)||(n==="opacity"?1:0))),r&&!~(a+"").trim().indexOf(" ")?ir(t,n,a,r)+r:a},NS=function(t,n,r,i){if(!r||r==="none"){var a=fi(n,t,1),s=a&&tn(t,a,1);s&&s!==r?(n=a,r=s):n==="borderColor"&&(r=tn(t,"borderTopColor"))}var o=new Be(this._pt,t.style,n,0,1,C0),l=0,u=0,c,f,h,p,g,d,m,x,y,v,_,S;if(o.b=r,o.e=i,r+="",i+="",i.substring(0,6)==="var(--"&&(i=tn(t,i.substring(4,i.indexOf(")")))),i==="auto"&&(d=t.style[n],t.style[n]=i,i=tn(t,n)||i,d?t.style[n]=d:rr(t,n)),c=[r,i],_0(c),r=c[0],i=c[1],h=r.match(jr)||[],S=i.match(jr)||[],S.length){for(;f=jr.exec(i);)m=f[0],y=i.substring(l,f.index),g?g=(g+1)%5:(y.substr(-5)==="rgba("||y.substr(-5)==="hsla(")&&(g=1),m!==(d=h[u++]||"")&&(p=parseFloat(d)||0,_=d.substr((p+"").length),m.charAt(1)==="="&&(m=Xr(p,m)+_),x=parseFloat(m),v=m.substr((x+"").length),l=jr.lastIndex-v.length,v||(v=v||en.units[n]||_,l===i.length&&(i+=v,o.e+=v)),_!==v&&(p=ir(t,n,d,v)||0),o._pt={_next:o._pt,p:y||u===1?y:",",s:p,c:x-p,m:g&&g<4||n==="zIndex"?Math.round:0});o.c=l<i.length?i.substring(l,i.length):""}else o.r=n==="display"&&i==="none"?O0:D0;return Xm.test(i)&&(o.e=0),this._pt=o,o},Fh={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},qS=function(t){var n=t.split(" "),r=n[0],i=n[1]||"50%";return(r==="top"||r==="bottom"||i==="left"||i==="right")&&(t=r,r=i,i=t),n[0]=Fh[r]||r,n[1]=Fh[i]||i,n.join(" ")},IS=function(t,n){if(n.tween&&n.tween._time===n.tween._dur){var r=n.t,i=r.style,a=n.u,s=r._gsap,o,l,u;if(a==="all"||a===!0)i.cssText="",l=1;else for(a=a.split(","),u=a.length;--u>-1;)o=a[u],jn[o]&&(l=1,o=o==="transformOrigin"?Ue:Gt),rr(r,o);l&&(rr(r,Gt),s&&(s.svg&&r.removeAttribute("transform"),i.scale=i.rotate=i.translate="none",Ji(r,1),s.uncache=1,P0(i)))}},Va={clearProps:function(t,n,r,i,a){if(a.data!=="isFromStart"){var s=t._pt=new Be(t._pt,n,r,0,0,IS);return s.u=i,s.pr=-10,s.tween=a,t._props.push(r),1}}},Qi=[1,0,0,1,0,0],q0={},I0=function(t){return t==="matrix(1, 0, 0, 1, 0, 0)"||t==="none"||!t},$h=function(t){var n=tn(t,Gt);return I0(n)?Qi:n.substr(7).match(Wm).map(te)},hf=function(t,n){var r=t._gsap||vr(t),i=t.style,a=$h(t),s,o,l,u;return r.svg&&t.getAttribute("transform")?(l=t.transform.baseVal.consolidate().matrix,a=[l.a,l.b,l.c,l.d,l.e,l.f],a.join(",")==="1,0,0,1,0,0"?Qi:a):(a===Qi&&!t.offsetParent&&t!==Kr&&!r.svg&&(l=i.display,i.display="block",s=t.parentNode,(!s||!t.offsetParent&&!t.getBoundingClientRect().width)&&(u=1,o=t.nextElementSibling,Kr.appendChild(t)),a=$h(t),l?i.display=l:rr(t,"display"),u&&(o?s.insertBefore(t,o):s?s.appendChild(t):Kr.removeChild(t))),n&&a.length>6?[a[0],a[1],a[4],a[5],a[12],a[13]]:a)},wc=function(t,n,r,i,a,s){var o=t._gsap,l=a||hf(t,!0),u=o.xOrigin||0,c=o.yOrigin||0,f=o.xOffset||0,h=o.yOffset||0,p=l[0],g=l[1],d=l[2],m=l[3],x=l[4],y=l[5],v=n.split(" "),_=parseFloat(v[0])||0,S=parseFloat(v[1])||0,w,b,M,A;r?l!==Qi&&(b=p*m-g*d)&&(M=_*(m/b)+S*(-d/b)+(d*y-m*x)/b,A=_*(-g/b)+S*(p/b)-(p*y-g*x)/b,_=M,S=A):(w=L0(t),_=w.x+(~v[0].indexOf("%")?_/100*w.width:_),S=w.y+(~(v[1]||v[0]).indexOf("%")?S/100*w.height:S)),i||i!==!1&&o.smooth?(x=_-u,y=S-c,o.xOffset=f+(x*p+y*d)-x,o.yOffset=h+(x*g+y*m)-y):o.xOffset=o.yOffset=0,o.xOrigin=_,o.yOrigin=S,o.smooth=!!i,o.origin=n,o.originIsAbsolute=!!r,t.style[Ue]="0px 0px",s&&(Qn(s,o,"xOrigin",u,_),Qn(s,o,"yOrigin",c,S),Qn(s,o,"xOffset",f,o.xOffset),Qn(s,o,"yOffset",h,o.yOffset)),t.setAttribute("data-svg-origin",_+" "+S)},Ji=function(t,n){var r=t._gsap||new w0(t);if("x"in r&&!n&&!r.uncache)return r;var i=t.style,a=r.scaleX<0,s="px",o="deg",l=getComputedStyle(t),u=tn(t,Ue)||"0",c,f,h,p,g,d,m,x,y,v,_,S,w,b,M,A,k,C,O,P,F,B,L,$,Y,I,et,K,J,st,lt,N;return c=f=h=d=m=x=y=v=_=0,p=g=1,r.svg=!!(t.getCTM&&N0(t)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(i[Gt]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[Gt]!=="none"?l[Gt]:"")),i.scale=i.rotate=i.translate="none"),b=hf(t,r.svg),r.svg&&(r.uncache?(Y=t.getBBox(),u=r.xOrigin-Y.x+"px "+(r.yOrigin-Y.y)+"px",$=""):$=!n&&t.getAttribute("data-svg-origin"),wc(t,$||u,!!$||r.originIsAbsolute,r.smooth!==!1,b)),S=r.xOrigin||0,w=r.yOrigin||0,b!==Qi&&(C=b[0],O=b[1],P=b[2],F=b[3],c=B=b[4],f=L=b[5],b.length===6?(p=Math.sqrt(C*C+O*O),g=Math.sqrt(F*F+P*P),d=C||O?Ir(O,C)*gr:0,y=P||F?Ir(P,F)*gr+d:0,y&&(g*=Math.abs(Math.cos(y*Vr))),r.svg&&(c-=S-(S*C+w*P),f-=w-(S*O+w*F))):(N=b[6],st=b[7],et=b[8],K=b[9],J=b[10],lt=b[11],c=b[12],f=b[13],h=b[14],M=Ir(N,J),m=M*gr,M&&(A=Math.cos(-M),k=Math.sin(-M),$=B*A+et*k,Y=L*A+K*k,I=N*A+J*k,et=B*-k+et*A,K=L*-k+K*A,J=N*-k+J*A,lt=st*-k+lt*A,B=$,L=Y,N=I),M=Ir(-P,J),x=M*gr,M&&(A=Math.cos(-M),k=Math.sin(-M),$=C*A-et*k,Y=O*A-K*k,I=P*A-J*k,lt=F*k+lt*A,C=$,O=Y,P=I),M=Ir(O,C),d=M*gr,M&&(A=Math.cos(M),k=Math.sin(M),$=C*A+O*k,Y=B*A+L*k,O=O*A-C*k,L=L*A-B*k,C=$,B=Y),m&&Math.abs(m)+Math.abs(d)>359.9&&(m=d=0,x=180-x),p=te(Math.sqrt(C*C+O*O+P*P)),g=te(Math.sqrt(L*L+N*N)),M=Ir(B,L),y=Math.abs(M)>2e-4?M*gr:0,_=lt?1/(lt<0?-lt:lt):0),r.svg&&($=t.getAttribute("transform"),r.forceCSS=t.setAttribute("transform","")||!I0(tn(t,Gt)),$&&t.setAttribute("transform",$))),Math.abs(y)>90&&Math.abs(y)<270&&(a?(p*=-1,y+=d<=0?180:-180,d+=d<=0?180:-180):(g*=-1,y+=y<=0?180:-180)),n=n||r.uncache,r.x=c-((r.xPercent=c&&(!n&&r.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-c)?-50:0)))?t.offsetWidth*r.xPercent/100:0)+s,r.y=f-((r.yPercent=f&&(!n&&r.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-f)?-50:0)))?t.offsetHeight*r.yPercent/100:0)+s,r.z=h+s,r.scaleX=te(p),r.scaleY=te(g),r.rotation=te(d)+o,r.rotationX=te(m)+o,r.rotationY=te(x)+o,r.skewX=y+o,r.skewY=v+o,r.transformPerspective=_+s,(r.zOrigin=parseFloat(u.split(" ")[2])||!n&&r.zOrigin||0)&&(i[Ue]=Za(u)),r.xOffset=r.yOffset=0,r.force3D=en.force3D,r.renderTransform=r.svg?BS:$0?z0:zS,r.uncache=0,r},Za=function(t){return(t=t.split(" "))[0]+" "+t[1]},js=function(t,n,r){var i=ke(n);return te(parseFloat(n)+parseFloat(ir(t,"x",r+"px",i)))+i},zS=function(t,n){n.z="0px",n.rotationY=n.rotationX="0deg",n.force3D=0,z0(t,n)},hr="0deg",wi="0px",pr=") ",z0=function(t,n){var r=n||this,i=r.xPercent,a=r.yPercent,s=r.x,o=r.y,l=r.z,u=r.rotation,c=r.rotationY,f=r.rotationX,h=r.skewX,p=r.skewY,g=r.scaleX,d=r.scaleY,m=r.transformPerspective,x=r.force3D,y=r.target,v=r.zOrigin,_="",S=x==="auto"&&t&&t!==1||x===!0;if(v&&(f!==hr||c!==hr)){var w=parseFloat(c)*Vr,b=Math.sin(w),M=Math.cos(w),A;w=parseFloat(f)*Vr,A=Math.cos(w),s=js(y,s,b*A*-v),o=js(y,o,-Math.sin(w)*-v),l=js(y,l,M*A*-v+v)}m!==wi&&(_+="perspective("+m+pr),(i||a)&&(_+="translate("+i+"%, "+a+"%) "),(S||s!==wi||o!==wi||l!==wi)&&(_+=l!==wi||S?"translate3d("+s+", "+o+", "+l+") ":"translate("+s+", "+o+pr),u!==hr&&(_+="rotate("+u+pr),c!==hr&&(_+="rotateY("+c+pr),f!==hr&&(_+="rotateX("+f+pr),(h!==hr||p!==hr)&&(_+="skew("+h+", "+p+pr),(g!==1||d!==1)&&(_+="scale("+g+", "+d+pr),y.style[Gt]=_||"translate(0, 0)"},BS=function(t,n){var r=n||this,i=r.xPercent,a=r.yPercent,s=r.x,o=r.y,l=r.rotation,u=r.skewX,c=r.skewY,f=r.scaleX,h=r.scaleY,p=r.target,g=r.xOrigin,d=r.yOrigin,m=r.xOffset,x=r.yOffset,y=r.forceCSS,v=parseFloat(s),_=parseFloat(o),S,w,b,M,A;l=parseFloat(l),u=parseFloat(u),c=parseFloat(c),c&&(c=parseFloat(c),u+=c,l+=c),l||u?(l*=Vr,u*=Vr,S=Math.cos(l)*f,w=Math.sin(l)*f,b=Math.sin(l-u)*-h,M=Math.cos(l-u)*h,u&&(c*=Vr,A=Math.tan(u-c),A=Math.sqrt(1+A*A),b*=A,M*=A,c&&(A=Math.tan(c),A=Math.sqrt(1+A*A),S*=A,w*=A)),S=te(S),w=te(w),b=te(b),M=te(M)):(S=f,M=h,w=b=0),(v&&!~(s+"").indexOf("px")||_&&!~(o+"").indexOf("px"))&&(v=ir(p,"x",s,"px"),_=ir(p,"y",o,"px")),(g||d||m||x)&&(v=te(v+g-(g*S+d*b)+m),_=te(_+d-(g*w+d*M)+x)),(i||a)&&(A=p.getBBox(),v=te(v+i/100*A.width),_=te(_+a/100*A.height)),A="matrix("+S+","+w+","+b+","+M+","+v+","+_+")",p.setAttribute("transform",A),y&&(p.style[Gt]=A)},US=function(t,n,r,i,a){var s=360,o=pe(a),l=parseFloat(a)*(o&&~a.indexOf("rad")?gr:1),u=l-i,c=i+u+"deg",f,h;return o&&(f=a.split("_")[1],f==="short"&&(u%=s,u!==u%(s/2)&&(u+=u<0?s:-s)),f==="cw"&&u<0?u=(u+s*Rh)%s-~~(u/s)*s:f==="ccw"&&u>0&&(u=(u-s*Rh)%s-~~(u/s)*s)),t._pt=h=new Be(t._pt,n,r,i,u,TS),h.e=c,h.u="deg",t._props.push(r),h},Lh=function(t,n){for(var r in n)t[r]=n[r];return t},HS=function(t,n,r){var i=Lh({},r._gsap),a="perspective,force3D,transformOrigin,svgOrigin",s=r.style,o,l,u,c,f,h,p,g;i.svg?(u=r.getAttribute("transform"),r.setAttribute("transform",""),s[Gt]=n,o=Ji(r,1),rr(r,Gt),r.setAttribute("transform",u)):(u=getComputedStyle(r)[Gt],s[Gt]=n,o=Ji(r,1),s[Gt]=u);for(l in jn)u=i[l],c=o[l],u!==c&&a.indexOf(l)<0&&(p=ke(u),g=ke(c),f=p!==g?ir(r,l,u,g):parseFloat(u),h=parseFloat(c),t._pt=new Be(t._pt,o,l,f,h-f,xc),t._pt.u=g||0,t._props.push(l));Lh(o,i)};ze("padding,margin,Width,Radius",function(e,t){var n="Top",r="Right",i="Bottom",a="Left",s=(t<3?[n,r,i,a]:[n+a,n+r,i+r,i+a]).map(function(o){return t<2?e+o:"border"+o+e});Va[t>1?"border"+e:e]=function(o,l,u,c,f){var h,p;if(arguments.length<4)return h=s.map(function(g){return $n(o,g,u)}),p=h.join(" "),p.split(h[0]).length===5?h[0]:p;h=(c+"").split(" "),p={},s.forEach(function(g,d){return p[g]=h[d]=h[d]||h[(d-1)/2|0]}),o.init(l,p,f)}});var B0={name:"css",register:bc,targetTest:function(t){return t.style&&t.nodeType},init:function(t,n,r,i,a){var s=this._props,o=t.style,l=r.vars.startAt,u,c,f,h,p,g,d,m,x,y,v,_,S,w,b,M,A;uf||bc(),this.styles=this.styles||F0(t),M=this.styles.props,this.tween=r;for(d in n)if(d!=="autoRound"&&(c=n[d],!(Ze[d]&&S0(d,n,r,i,t,a)))){if(p=typeof c,g=Va[d],p==="function"&&(c=c.call(r,i,t,a),p=typeof c),p==="string"&&~c.indexOf("random(")&&(c=Ki(c)),g)g(this,t,d,c,r)&&(b=1);else if(d.substr(0,2)==="--")u=(getComputedStyle(t).getPropertyValue(d)+"").trim(),c+="",tr.lastIndex=0,tr.test(u)||(m=ke(u),x=ke(c),x?m!==x&&(u=ir(t,d,u,x)+x):m&&(c+=m)),this.add(o,"setProperty",u,c,i,a,0,0,d),s.push(d),M.push(d,0,o[d]);else if(p!=="undefined"){if(l&&d in l?(u=typeof l[d]=="function"?l[d].call(r,i,t,a):l[d],pe(u)&&~u.indexOf("random(")&&(u=Ki(u)),ke(u+"")||u==="auto"||(u+=en.units[d]||ke($n(t,d))||""),(u+"").charAt(1)==="="&&(u=$n(t,d))):u=$n(t,d),h=parseFloat(u),y=p==="string"&&c.charAt(1)==="="&&c.substr(0,2),y&&(c=c.substr(2)),f=parseFloat(c),d in Tn&&(d==="autoAlpha"&&(h===1&&$n(t,"visibility")==="hidden"&&f&&(h=0),M.push("visibility",0,o.visibility),Qn(this,o,"visibility",h?"inherit":"hidden",f?"inherit":"hidden",!f)),d!=="scale"&&d!=="transform"&&(d=Tn[d],~d.indexOf(",")&&(d=d.split(",")[0]))),v=d in jn,v){if(this.styles.save(d),A=c,p==="string"&&c.substring(0,6)==="var(--"){if(c=tn(t,c.substring(4,c.indexOf(")"))),c.substring(0,5)==="calc("){var k=t.style.perspective;t.style.perspective=c,c=tn(t,"perspective"),k?t.style.perspective=k:rr(t,"perspective")}f=parseFloat(c)}if(_||(S=t._gsap,S.renderTransform&&!n.parseTransform||Ji(t,n.parseTransform),w=n.smoothOrigin!==!1&&S.smooth,_=this._pt=new Be(this._pt,o,Gt,0,1,S.renderTransform,S,0,-1),_.dep=1),d==="scale")this._pt=new Be(this._pt,S,"scaleY",S.scaleY,(y?Xr(S.scaleY,y+f):f)-S.scaleY||0,xc),this._pt.u=0,s.push("scaleY",d),d+="X";else if(d==="transformOrigin"){M.push(Ue,0,o[Ue]),c=qS(c),S.svg?wc(t,c,0,w,0,this):(x=parseFloat(c.split(" ")[2])||0,x!==S.zOrigin&&Qn(this,S,"zOrigin",S.zOrigin,x),Qn(this,o,d,Za(u),Za(c)));continue}else if(d==="svgOrigin"){wc(t,c,1,w,0,this);continue}else if(d in q0){US(this,S,d,h,y?Xr(h,y+c):c);continue}else if(d==="smoothOrigin"){Qn(this,S,"smooth",S.smooth,c);continue}else if(d==="force3D"){S[d]=c;continue}else if(d==="transform"){HS(this,c,t);continue}}else d in o||(d=fi(d)||d);if(v||(f||f===0)&&(h||h===0)&&!SS.test(c)&&d in o)m=(u+"").substr((h+"").length),f||(f=0),x=ke(c)||(d in en.units?en.units[d]:m),m!==x&&(h=ir(t,d,u,x)),this._pt=new Be(this._pt,v?S:o,d,h,(y?Xr(h,y+f):f)-h,!v&&(x==="px"||d==="zIndex")&&n.autoRound!==!1?kS:xc),this._pt.u=x||0,v&&A!==c?(this._pt.b=u,this._pt.e=A,this._pt.r=AS):m!==x&&x!=="%"&&(this._pt.b=u,this._pt.r=MS);else if(d in o)NS.call(this,t,d,u,y?y+c:c);else if(d in t)this.add(t,d,u||t[d],y?y+c:c,i,a);else if(d!=="parseTransform"){Qc(d,c);continue}v||(d in o?M.push(d,0,o[d]):typeof t[d]=="function"?M.push(d,2,t[d]()):M.push(d,1,u||t[d])),s.push(d)}}b&&R0(this)},render:function(t,n){if(n.tween._time||!cf())for(var r=n._pt;r;)r.r(t,r.d),r=r._next;else n.styles.revert()},get:$n,aliases:Tn,getSetter:function(t,n,r){var i=Tn[n];return i&&i.indexOf(",")<0&&(n=i),n in jn&&n!==Ue&&(t._gsap.x||$n(t,"x"))?r&&Ch===r?n==="scale"?DS:ES:(Ch=r||{})&&(n==="scale"?OS:PS):t.style&&!Kc(t.style[n])?CS:~n.indexOf("-")?RS:of(t,n)},core:{_removeProperty:rr,_getMatrix:hf}};He.utils.checkPrefix=fi;He.core.getStyleSaver=F0;(function(e,t,n,r){var i=ze(e+","+t+","+n,function(a){jn[a]=1});ze(t,function(a){en.units[a]="deg",q0[a]=1}),Tn[i[13]]=e+","+t,ze(r,function(a){var s=a.split(":");Tn[s[1]]=i[s[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");ze("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(e){en.units[e]="px"});He.registerPlugin(B0);var Sc=He.registerPlugin(B0)||He;Sc.core.Tween;const zr={IN_OUT:"power2.inOut",OUT:"power2.out"},Si={NO_STAGGER:0,RIPPLE_STAGGER_DELAY:.05};class U0{constructor(t,n={}){yi(this,"timeline");yi(this,"currentStage","");yi(this,"callbacks");yi(this,"durations");this.durations=t,this.callbacks=n,this.timeline=Sc.timeline({paused:!0,onUpdate:()=>this.handleProgress(),onComplete:()=>{var i,a,s,o;(a=(i=this.callbacks).onComplete)==null||a.call(i),(o=(s=this.callbacks).onStageComplete)==null||o.call(s,"complete")}});let r=0;this.timeline.addLabel("seatsToRings",r),r+=t.seatsToRings/1e3,this.timeline.addLabel("ringsToBar",r),r+=t.ringsToBar/1e3,this.timeline.addLabel("axesReveal",r),r+=t.axesReveal/1e3,this.timeline.addLabel("barSlide",r),r+=t.barSlide/1e3,this.timeline.addLabel("barsGrow",r),r+=t.barsGrow/1e3,this.timeline.addLabel("barsToArea",r)}animateSeatsToRings(t,n){const r=this.durations.seatsToRings/1e3;return t.each(function(){const i=this;if(!i.getAttribute("data-orig-x")){const a=i.getAttribute("x"),s=i.getAttribute("y"),o=i.getAttribute("width"),l=i.getAttribute("height");i.setAttribute("data-orig-x",a||"0"),i.setAttribute("data-orig-y",s||"0"),i.setAttribute("data-orig-width",o||"0"),i.setAttribute("data-orig-height",l||"0")}}),this.timeline.to(t.nodes(),{width:2,y:(i,a)=>parseFloat(a.getAttribute("y")||"0"),height:(i,a)=>{const s=parseFloat(a.getAttribute("y")||"0");return n-s},duration:r,ease:zr.IN_OUT,stagger:Si.NO_STAGGER,onStart:()=>{var i,a;this.currentStage="seatsToRings",(a=(i=this.callbacks).onStageComplete)==null||a.call(i,"seatsToRings")}},"seatsToRings"),this}animateRingsToBar(t,n){const r=this.durations.ringsToBar/1e3;return t.each(function(i,a){const s=this;if(!n[a])return;const l=s.getAttribute("x"),u=s.getAttribute("y"),c=s.getAttribute("width"),f=s.getAttribute("height");s.setAttribute("data-orig-x",l||"0"),s.setAttribute("data-orig-y",u||"0"),s.setAttribute("data-orig-width",c||"0"),s.setAttribute("data-orig-height",f||"0")}),this.timeline.to(t.nodes(),{x:i=>{var a;return((a=n[i])==null?void 0:a.x)??0},y:i=>{var a;return((a=n[i])==null?void 0:a.y)??0},width:i=>{var a;return((a=n[i])==null?void 0:a.width)??0},height:i=>{var a;return((a=n[i])==null?void 0:a.height)??0},duration:r,ease:zr.IN_OUT,stagger:Si.NO_STAGGER,onStart:()=>{var i,a;this.currentStage="ringsToBar",(a=(i=this.callbacks).onStageComplete)==null||a.call(i,"ringsToBar")}},"ringsToBar"),this}animateAxesReveal(t,n){const r=this.durations.axesReveal/1e3;return this.timeline.to([t.node(),n.node()],{opacity:1,duration:r,ease:zr.IN_OUT,stagger:Si.NO_STAGGER,onStart:()=>{var i,a;this.currentStage="axesReveal",(a=(i=this.callbacks).onStageComplete)==null||a.call(i,"axesReveal")}},"axesReveal"),this}animateBarSlide(t,n){const r=this.durations.barSlide/1e3;return this.timeline.to(t.nodes(),{x:n,duration:r,ease:zr.OUT,stagger:Si.NO_STAGGER,onStart:()=>{var i,a;this.currentStage="barSlide",(a=(i=this.callbacks).onStageComplete)==null||a.call(i,"barSlide")}},"barSlide"),this}animateBarsGrow(t,n,r=Si.RIPPLE_STAGGER_DELAY){const i=this.durations.barsGrow/1e3;return t.nodes().forEach((s,o)=>{const l=s,u=l.getAttribute("data-final-y")||"0",c=l.getAttribute("data-final-height")||"0",f=parseInt(l.getAttribute("data-timestamp-index")||"0"),p=Math.abs(f-n)*r;this.timeline.fromTo(l,{height:0,y:parseFloat(l.getAttribute("data-chart-baseline")||"400")},{y:parseFloat(u),height:parseFloat(c),duration:i,delay:p,ease:zr.OUT},"barsGrow")}),this.timeline.call(()=>{var s,o;this.currentStage="barsGrow",(o=(s=this.callbacks).onStageComplete)==null||o.call(s,"barsGrow")},[],"barsGrow"),this}animateBarsToArea(t,n,r,i){const a=this.durations.barsToArea/1e3,s=new Map;return t.each(function(){var c;const o=this,l=o.getAttribute("class");if(!l)return;const u=l.match(/category-([\w-]+)/);if(u&&u[1]){const f=u[1];s.has(f)||s.set(f,[]),(c=s.get(f))==null||c.push(o)}}),this.timeline.set(t.nodes(),{opacity:0},"barsToArea"),this.timeline.set(n.nodes(),{opacity:1},"barsToArea"),n.each(function(){const o=this,l=o.getAttribute("data-category");if(!l)return;const u=r.get(l);u&&Sc.to(o,{attr:{d:u},duration:a,ease:zr.IN_OUT})}),this.timeline.call(()=>{var o,l;this.currentStage="barsToArea",(l=(o=this.callbacks).onStageComplete)==null||l.call(o,"barsToArea")},[],"barsToArea"),this}handleProgress(){var n,r;const t=this.timeline.progress();(r=(n=this.callbacks).onProgress)==null||r.call(n,t)}getControls(){return{play:()=>this.timeline.play(),pause:()=>this.timeline.pause(),reverse:()=>this.timeline.reverse(),restart:()=>this.timeline.restart(),seek:t=>this.timeline.progress(t),seekToStage:t=>{const n=this.timeline.labels[t];n!==void 0&&this.timeline.seek(n)},kill:()=>this.timeline.kill(),getProgress:()=>this.timeline.progress(),getCurrentStage:()=>this.currentStage,getTimeline:()=>this.timeline}}play(){this.timeline.play()}destroy(){this.timeline.kill()}}function jS(e,t){const{arcAngle:n,arcAngleFlexibility:r=5,radius:i,seatSize:a,minSeatSize:s,maxSeatSize:o,spacing:l,innerRadiusRatio:u}=t,c=i*u,f=e.reduce((O,P)=>O+P.seats,0);let h={seatSize:a,arcAngle:n,score:-1};const p=n-r,g=n+r;for(let O=p;O<=g;O+=2.5){const P=O*Math.PI/180;for(let F=o;F>=s;F-=.1){const B=F*2,L=B*l,$=Math.floor((i-c)/L);for(let Y=1;Y<=Math.min($,10);Y++){let I=0;for(let et=0;et<Y;et++){const K=c+(et+.5)*L,J=B*l/K,st=Math.floor(P/J);I+=st}if(I>=f){const et=f/I,K=(F-s)/(o-s),J=(I-f)/f,st=J<.15?1:J<.3?.7:J<.5?.4:.1,lt=1-Math.abs(O-n)/r,N=st*.5+K*.3+et*.15+lt*.05;N>h.score&&(h={seatSize:F,arcAngle:O,rings:Y,score:N})}}}}const d=h.seatSize,m=h.arcAngle,x=m*Math.PI/180,y=d*2,v=y*l,_=Math.floor((i-c)/v),S=[],w=-x/2-Math.PI/2,b=[];let M=0,A=[];for(let O=1;O<=_;O++){let P=0;const F=[];for(let B=0;B<O;B++){const L=c+(B+.5)*v,$=y*l/L,Y=Math.floor(x/$);F.push(Y),P+=Y}if(P>=f){M=O,A=F;break}}if(M>0)b.push(...A);else for(let O=0;O<_;O++){const P=c+(O+.5)*v,F=y*l/P,B=Math.floor(x/F);b.push(B)}for(let O=0;O<b.length;O++){const P=c+(O+.5)*v,F=b[O]??0;if(F>0){const B=x/F;for(let L=0;L<F;L++){const $=w+(L+.5)*B,Y=Math.cos($)*P,I=Math.sin($)*P;S.push({ring:O,index:L,angle:$,x:Y,y:I})}}}S.sort((O,P)=>{const F=O.angle-P.angle;return Math.abs(F)>.001?F:O.ring-P.ring});const k=[];let C=0;return e.forEach((O,P)=>{const F=Math.min(O.seats,S.length-C);for(let B=0;B<F&&C<S.length;B++){const L=S[C++];L&&k.push({x:L.x,y:L.y,category:O.name,categoryIndex:P,seatIndex:B,ring:L.ring,angle:L.angle,radius:d})}}),{arcAngle:m,radius:i,innerRadius:c,centerX:i,centerY:i,seatSize:d,seats:k,totalSeats:f}}function GS(e,t,n){const r=t<=n?1:n/t;return e.filter(i=>i.value>0).map(i=>{const a=t<=n?i.value:Math.max(1,Math.floor(i.value*r));return{id:i.dataKey,name:i.label,seats:a,colour:i.color}})}function Qa({svg:e,events:t,xScale:n,chartHeight:r,chartWidth:i,timelineHeight:a,timelineOffset:s,instanceId:o,setHoveredTimelineEvent:l,enableBrush:u=!1,onTimeRangeChange:c,minAllowedTime:f,maxAllowedTime:h,brushColor:p="#69b3a2",mainGroupSelector:g}){const d=r+s,m=o?`.main-chart-group-${o}`:".main-chart-group",x=e.select(g??m),y=o?`timeline-track timeline-track-${o}`:"timeline-track",v=x.append("g").attr("class",y),_=6,S=o?`timeline-clip-${o}`:`timeline-clip-${Math.random().toString(36).substr(2,9)}`;e.append("defs").append("clipPath").attr("id",S).append("rect").attr("x",0).attr("y",d).attr("width",i+_).attr("height",a),v.append("rect").attr("class","timeline-background").attr("x",0).attr("y",d).attr("width",i).attr("height",a).attr("fill","#FFFFFF").attr("stroke","#9CA3AF").attr("stroke-width",1);const w=v.append("g").attr("clip-path",`url(#${S})`),b=3,M=w.selectAll(".timeline-event").data(t).enter().append("rect").attr("class","timeline-event").attr("x",k=>n(new Date(k.timestamp))-b/2).attr("y",d).attr("width",b).attr("height",a).attr("fill",k=>k.color||"#2F42FF").attr("stroke","none").attr("cursor","pointer").attr("data-timestamp",k=>k.timestamp).attr("data-event-name",k=>k.eventName),A=6;if(M.on("mouseenter",function(k,C){const O=Ot(this),P=n(new Date(C.timestamp));O.transition().duration(150).attr("x",P-A/2).attr("width",A),l&&l({timestamp:C.timestamp,eventName:C.eventName,x:P})}).on("mouseleave",function(k,C){const O=Ot(this),P=n(new Date(C.timestamp));O.transition().duration(150).attr("x",P-b/2).attr("width",b),l&&l(null)}),u&&c){const k=f,C=h,O=pi().extent([[0,d],[i,d+a]]).on("start",B=>{if(!B.selection&&k!==void 0&&C!==void 0){const L=B.sourceEvent;if(L){const $=L.offsetX,Y=+n.invert($);if(Y<k||Y>C){const I=o?`.timeline-brush-${o}`:".timeline-brush";e.select(I).call(O.move,null);return}}}}).on("brush",B=>{if(!B.selection)return;const[L,$]=B.selection;let Y=+n.invert(L),I=+n.invert($);k!==void 0&&(Y=Math.max(Y,k),I=Math.max(I,k)),C!==void 0&&(Y=Math.min(Y,C),I=Math.min(I,C));const et=n(new Date(Y)),K=n(new Date(I));if(et!==L||K!==$){const J=o?`.timeline-brush-${o}`:".timeline-brush";e.select(J).call(O.move,[et,K])}}).on("end",B=>{if(!B.selection)return;const[L,$]=B.selection,Y=[+n.invert(L),+n.invert($)];k!==void 0&&(Y[0]=Math.max(Y[0],k)),C!==void 0&&(Y[1]=Math.min(Y[1],C)),c(Y);const I=o?`.timeline-brush-${o}`:".timeline-brush";e.select(I).call(O.move,null)}),P=o?`timeline-brush timeline-brush-${o}`:"timeline-brush",F=x.append("g").attr("class",P).call(O);F.selectAll(".selection").attr("fill",p).attr("fill-opacity",.2).attr("stroke",p).attr("stroke-width",1),F.selectAll(".handle").attr("fill",p).attr("fill-opacity",.8),F.select(".overlay").style("cursor","default"),F.on("dblclick",()=>{const B=n.domain(),L=[+B[0],+B[1]];c(L)})}}const pn={neoGrey:{200:"#EDEFEF",400:"#ADB5BD"},neoDigitalGreen:{600:"#40c048"}},Li=["#4CA75A","#FDDA04","#FFC008","#FF9800","#F9A91B","#FF5C24","#ED4134","#CB3446"],qe={greyHatch:{background:pn.neoGrey[200],lines:pn.neoGrey[400]},dataMissingHatch:{background:"#FFF3CC",lines:"#FFB800"},noLstHatch:{background:"#FFE5E5",lines:"#ED4134"}};function YS(e,t){const n=e.append("pattern").attr("id",`${t}-greyHatchPattern`).attr("x",0).attr("y",0).attr("width",8).attr("height",8).attr("patternUnits","userSpaceOnUse");n.append("rect").attr("x",0).attr("y",0).attr("width",8).attr("height",8).attr("fill",qe.greyHatch.background),n.append("path").attr("d","M0,2 L8,2").attr("stroke",qe.greyHatch.lines).attr("stroke-width",.5),n.append("path").attr("d","M0,6 L8,6").attr("stroke",qe.greyHatch.lines).attr("stroke-width",.5)}function WS(e,t){const n=e.append("pattern").attr("id",`${t}-dataMissingHatchPattern`).attr("x",0).attr("y",0).attr("width",8).attr("height",8).attr("patternUnits","userSpaceOnUse");n.append("rect").attr("x",0).attr("y",0).attr("width",8).attr("height",8).attr("fill",qe.dataMissingHatch.background),n.append("path").attr("d","M0,8 L8,0").attr("stroke",qe.dataMissingHatch.lines).attr("stroke-width",.5),n.append("path").attr("d","M-2,2 L2,-2").attr("stroke",qe.dataMissingHatch.lines).attr("stroke-width",.5),n.append("path").attr("d","M6,10 L10,6").attr("stroke",qe.dataMissingHatch.lines).attr("stroke-width",.5)}function XS(e,t){const n=e.append("pattern").attr("id",`${t}-noLstHatchPattern`).attr("x",0).attr("y",0).attr("width",8).attr("height",8).attr("patternUnits","userSpaceOnUse");n.append("rect").attr("x",0).attr("y",0).attr("width",8).attr("height",8).attr("fill",qe.noLstHatch.background),n.append("path").attr("d","M0,0 L8,8").attr("stroke",qe.noLstHatch.lines).attr("stroke-width",.5),n.append("path").attr("d","M-2,6 L2,10").attr("stroke",qe.noLstHatch.lines).attr("stroke-width",.5),n.append("path").attr("d","M6,-2 L10,2").attr("stroke",qe.noLstHatch.lines).attr("stroke-width",.5)}function va(e,t){let n=e.select("defs");n.empty()&&(n=e.append("defs")),YS(n,t),WS(n,t),XS(n,t)}function Nh(e,t){if(e.startsWith("url(#")&&e.endsWith(")")){const n=e.slice(5,-1);return`url(#${t}-${n})`}return e}function pf(e){return e.includes("greyHatchPattern")?qe.greyHatch.lines:e.includes("dataMissingHatchPattern")?qe.dataMissingHatch.lines:e.includes("noLstHatchPattern")?qe.noLstHatch.lines:e}function Tc(e,t,n,r){const{xScale:i,yScale:a,addClasses:s=!0,instanceId:o}=r,l=as().x(h=>i(new Date(h.data.timestamp))).y0(h=>a(h[0])).y1(h=>a(h[1])).curve(kr),u=Hm().x(h=>i(new Date(h.data.timestamp))).y(h=>a(h[1])).curve(kr),c=o?`areas areas-${o}`:"areas";let f=e.select(o?`.areas-${o}`:".areas");f.empty()&&(f=e.append("g").attr("class",c)),t.forEach((h,p)=>{var x;const g=n[p];if(!g)return;const d=((x=g.parliamentMapping)==null?void 0:x.isSpecialCategory)??!1,m=pf(g.color);if(d){const y=f.append("path").datum(h).attr("fill","none").attr("stroke",m).attr("stroke-width",3).attr("stroke-dasharray","15 8").attr("d",u).style("pointer-events","none");if(s){const v=o?`area area-${o} area-${g.dataKey}`:`area area-${g.dataKey}`;y.attr("class",v)}}else{const y=f.append("path").datum(h).attr("fill",g.color).attr("fill-opacity",g.fillOpacity??.7).attr("stroke",m).attr("stroke-width",g.strokeWidth??1.5).attr("d",l).style("pointer-events","none");if(s){const v=o?`area area-${o} area-${g.dataKey}`:`area area-${g.dataKey}`;y.attr("class",v)}}})}function KS(e,t){var r;const n=[];for(const i of e){let a=0;for(const s of t){const o=i[s.dataKey]||0,l=a,u=a+o;n.push({timestamp:i.timestamp,category:s.label,dataKey:s.dataKey,y0:l,y1:u,value:o,color:s.color,isSpecialCategory:((r=s.parliamentMapping)==null?void 0:r.isSpecialCategory)??!1}),a+=o}}return n}function Ae(e){return e.replace(/[^a-zA-Z0-9-_]/g,"-")}function H0(e,t,n,r){const{centerX:i,centerY:a,addClasses:s=!0,instanceId:o,parliamentRadius:l=200}=r,u=o?`parliament parliament-${o}`:"parliament";let c=e.select(o?`.parliament-${o}`:".parliament");c.empty()&&(c=e.append("g").attr("class",u)),t.seats.forEach(p=>{const g=n.find(x=>x.label===p.category);if(!g)return;const d=c.append("circle").attr("cx",i+p.x).attr("cy",a+p.y).attr("r",p.radius).attr("fill",g.color).attr("stroke",g.color).attr("stroke-width",.5),m=c.append("circle").attr("cx",i+p.x).attr("cy",a+p.y).attr("r",p.radius*2.5).attr("fill","transparent").attr("stroke","none").attr("pointer-events","all");if(s){const x=o?`seat seat-${o} seat-${Ae(p.category)}`:`seat seat-${Ae(p.category)}`;d.attr("class",x),m.attr("class",x)}});const f=o?`parliament-label parliament-label-${o}`:"parliament-label";if(e.select(`.${f.split(" ")[0]}`).empty()){const p=e.append("g").attr("class",f).attr("transform",`translate(${i},${a-l*.15})`).style("opacity","0").style("pointer-events","none");p.append("text").attr("class","label-category").attr("text-anchor","middle").attr("dy","-15").style("font-size","22px").style("fill","#666").style("font-family","system-ui, -apple-system, sans-serif"),p.append("text").attr("class","label-value").attr("text-anchor","middle").attr("dy","35").style("font-size","48px").style("font-weight","bold").style("font-family","system-ui, -apple-system, sans-serif");const g=p.append("g").attr("class","scale-indicator").attr("transform","translate(0, 65)").style("opacity","0");g.append("circle").attr("r",4).attr("cx",-30).attr("cy",0).style("fill","#888"),g.append("text").attr("x",-20).attr("y",0).attr("dy","0.35em").attr("text-anchor","start").style("font-size","18px").style("fill","#666").style("font-style","italic").style("font-family","system-ui, -apple-system, sans-serif")}}function VS(e,t,n,r,i,a,s=!1){var f;const o=new Map;let l=i;if(t.length>0&&((f=t[0])==null?void 0:f.timestamp)!==void 0){const h=t[0].timestamp;l=n(new Date(h))}const u=new Map;for(const h of e.seats)u.has(h.category)||u.set(h.category,[]),u.get(h.category).push(h);const c=new Map;for(const h of t)c.set(h.dataKey,{y0:h.y0,y1:h.y1,isSpecialCategory:h.isSpecialCategory}),h.label&&h.label!==h.dataKey&&c.set(h.label,{y0:h.y0,y1:h.y1,isSpecialCategory:h.isSpecialCategory});for(const h of e.seats){const p=c.get(h.category);if(!p){o.set(h,{x:l,y:a/2});continue}const g=r(p.y0),d=r(p.y1);let m;if(s){const x=u.get(h.category)??[],y=h.seatIndex,v=x.length;if(v===1)m=(g+d)/2;else{const _=y/(v-1);m=g+(d-g)*_}}else m=d;o.set(h,{x:l,y:m})}return o}function ZS(e,t,n){var s;if(e.length===0)return[];const r=e[e.length-1],i=[];let a=0;for(const o of t){const l=r[o.dataKey]||0,u=a,c=a+l;i.push({dataKey:o.dataKey,label:o.label,y0:u,y1:c,value:l,timestamp:r.timestamp,isSpecialCategory:((s=o.parliamentMapping)==null?void 0:s.isSpecialCategory)??!1}),a+=l}return i}function QS(e){const t=e;return{seatsToLines:t*.2,seatsToBar:t*.07,crossFadePause:t*.003,barSlideToTimeline:t*.22,axesAndBarsGrow:t*.22,barsToArea:t*.287}}const _r=new Map;Ot.prototype.transition=Ic;const JS=({containerRef:e,data:t,categories:n,mode:r,width:i,height:a,margin:s,timeRange:o,showGrid:l=!0,showAxes:u=!0,axisLabelColor:c,axisLabelSize:f=14,formatDate:h,formatValue:p,markers:g=[],arcAngle:d=200,parliamentRadius:m=200,seatSize:x=4.5,animationDuration:y=900,onMorphComplete:v,onAnimationStateChange:_,onTimelineReady:S,onAnimationProgress:w,onHoveredDataChange:b,hoveredCategory:M,maxSeats:A=2e3,parliamentTimestamp:k,enableBrush:C=!1,onTimeRangeChange:O,minAllowedTime:P,maxAllowedTime:F,showScaleIndicator:B=!1,reposPerSeat:L=1,timelineEvents:$=[],showTimeline:Y=!1,timelineHeight:I=40,timelineOffset:et=35,brushColor:K="#69b3a2",showCrosshair:J=!1,onCrosshairMove:st})=>{const[lt,N]=G.useState("area"),[j,nt]=G.useState(!1),[Z,R]=G.useState(null),[z,D]=G.useState(0),[T,X]=G.useState(null),[Q,W]=G.useState(null),[ut,H]=G.useState([]),ot=G.useRef(null),gt=G.useRef(r),yt=G.useRef(!0),vt=G.useRef(!1),rt=G.useRef(`morph-${Math.random().toString(36).substr(2,9)}`),at=G.useRef(void 0),_t=G.useRef(o),dt=G.useRef(g),xt=G.useRef($),Et=G.useRef(v),At=G.useRef(_),ee=G.useRef(S),ne=G.useRef(w),Pt=G.useRef(b),ge=G.useRef(st);G.useEffect(()=>{Et.current=v,At.current=_,ee.current=S,ne.current=w,Pt.current=b,ge.current=st},[v,_,S,w,b,st]),G.useEffect(()=>{if(e.current&&lt==="parliament")if(M){const Rt=n.find(It=>It.dataKey===M);if(Rt){const It=Rt.label;if(R(It),Ii(e.current,It),t.length>0){const Re=t[t.length-1],Qt=Math.round(Re.values[Rt.dataKey]||0),oe={label:Rt.label,value:Qt,color:pf(Rt.color)};qi(e.current,oe,B,L,rt.current)}}}else R(null),Ii(e.current,null),qi(e.current,null,B,L,rt.current)},[M,lt,n,t,B,L]);const Vt=i-s.left-s.right,Zt=a-s.top-s.bottom;return G.useEffect(()=>{var le;if(!e.current||t.length===0||n.length===0||(at.current&&(at.current(),at.current=void 0),vt.current))return;const Rt=Ot(e.current),It=r!==gt.current;yt.current?(Rt.selectAll("*").remove(),va(Rt,rt.current),yt.current=!1):It||(Rt.selectAll("*").remove(),va(Rt,rt.current));const Re=t[t.length-1],Qt=n.reduce((ht,Nt)=>ht+(Re.values[Nt.dataKey]||0),0),oe=t.map(ht=>{const Nt={timestamp:ht.timestamp};for(const ue of n)Nt[ue.dataKey]=ht.values[ue.dataKey]||0;return Nt}),we=n.map(ht=>ht.dataKey),me=Yi().keys(we),Ge=me(oe),sn=t.map(ht=>ht.timestamp),Ye=It||!o?Math.min(...sn):o[0],Fe=It||!o?Math.max(...sn):o[1],on=[...sn].sort((ht,Nt)=>ht-Nt),ye=[];for(let ht=0;ht<on.length-1;ht++)ye.push(on[ht+1]-on[ht]);const kt=ye.length>0?ye.reduce((ht,Nt)=>ht+Nt,0)/ye.length:0,Lt=Fe+kt*1.15,Mt=Wr().domain([new Date(Ye),new Date(Lt)]).range([0,Vt]),Yt=oe.filter(ht=>ht.timestamp>=Ye&&ht.timestamp<=Fe),_e=me(Yt),Wt=_e.length>0?Math.max(..._e[_e.length-1].map(ht=>ht[1]??0)):0,U=ri().domain([0,Wt*1.15]).range([Zt,0]),ct=n.map(ht=>({...ht,color:Nh(ht.color,rt.current)})),ft=ct.map(ht=>({dataKey:ht.dataKey,label:ht.label,color:ht.color,value:Re.values[ht.dataKey]||0})),wt=GS(ft,Qt,A).reverse(),St=jS(wt,{arcAngle:d,radius:m,seatSize:x,minSeatSize:4,maxSeatSize:30,spacing:1.1,innerRadiusRatio:.4});ot.current=St;const zt=ZS(oe,n),re=VS(St,zt,Mt,U,Vt,Zt);if(It&&!vt.current){vt.current=!0,nt(!0),(le=At.current)==null||le.call(At,!0),X(null),H([]),D(0);let ht=Rt.select("g[transform]");if(ht.empty()&&(ht=Rt.select("g")),ht.empty()){Rt.selectAll("*").remove(),va(Rt,rt.current),Gs(Rt,r==="parliament"?"parliament":"area",Ge,ct,St,Mt,U,Vt,Zt,s,l,u,c,f,h,p,C,O,rt.current,g,o,H,X,$,Y,I,et,W,P,F,K,J,st),nt(!1),N(r==="parliament"?"parliament":"area"),D(r==="parliament"?1:0),gt.current=r;return}const Nt=setTimeout(()=>{vt.current=!1,nt(!1),gt.current=r},y*3);eT(Rt,r,Ge,ct,St,re,Mt,U,Vt,Zt,s,y,()=>{var ue,Ee,De;if(clearTimeout(Nt),vt.current=!1,nt(!1),N(r==="parliament"?"parliament":"area"),r==="parliament"&&D(1),(ue=At.current)==null||ue.call(At,!1),(Ee=Et.current)==null||Ee.call(Et),gt.current=r,r==="parliament"&&e.current&&Pt.current&&(at.current=Ys(e.current,ct,t,Z,R,Pt.current,B,L,rt.current)),r!=="parliament"&&e.current){R(null),(De=Pt.current)==null||De.call(Pt,null),qi(e.current,null,B,L,rt.current);const We=Ot(e.current),$e=We.select(rt.current?`.main-chart-group-${rt.current}`:".main-chart-group");if(Y){const Rn=rt.current?`.timeline-track-${rt.current}`:".timeline-track",Xe=rt.current?`.timeline-brush-${rt.current}`:".timeline-brush";$e.select(Rn).remove(),$e.select(Xe).remove(),Qa({svg:We,events:$,xScale:Mt,chartHeight:Zt,chartWidth:Vt,timelineHeight:I,timelineOffset:et,instanceId:rt.current,setHoveredTimelineEvent:W,enableBrush:C,onTimeRangeChange:O,minAllowedTime:P,maxAllowedTime:F,brushColor:K})}if(C&&O){const Rn=$e.select(rt.current?`.chart-content-group-${rt.current}`:".chart-content-group");tT(Rn,Vt,Zt,Mt,O,rt.current,We,P,F,K)}if(g.length>0&&H&&X&&o){const Xe=g.filter(ln=>ln.timestamp>=(o[0]??0)-1&&ln.timestamp<=(o[1]??1/0)+1).map(ln=>({...ln,x:Mt(new Date(ln.timestamp))}));if(H(Xe),Xe.length>0){qh($e,Xe,Zt,Vt,C,X,rt.current);const ln=$e.select(rt.current?`.markers-${rt.current}`:".markers");if(!ln.empty()){$e.selectAll(".marker-hover-overlay").remove();const sr=$e.select(rt.current?`.chart-content-group-${rt.current}`:".chart-content-group");j0(sr.empty()?$e:sr,ln,Xe,Vt,Zt,C,X,s,J,st)}}}}},u,f,h,p,ee.current,(ue,Ee)=>{var De;if(r==="parliament"&&ue>=.95){const We=(ue-.95)/.05;D(Math.min(We,1))}(De=ne.current)==null||De.call(ne,ue,Ee)},k,rt.current)}else gt.current=r,r==="parliament"&&(X(null),H([])),Gs(Rt,r==="parliament"?"parliament":"area",Ge,ct,St,Mt,U,Vt,Zt,s,l,u,c,f,h,p,C,O,rt.current,g,o,H,X,$,Y,I,et,W,P,F,K,J,st),N(r==="parliament"?"parliament":"area"),D(r==="parliament"?1:0),r==="parliament"&&e.current&&Pt.current&&(at.current=Ys(e.current,ct,t,Z,R,Pt.current,B,L,rt.current));return()=>{at.current&&(at.current(),at.current=void 0)}},[r]),G.useEffect(()=>{var Yt,_e;if(!e.current||t.length===0||vt.current)return;if(yt.current){_t.current=o;return}if(!(o!==_t.current&&((o==null?void 0:o[0])!==((Yt=_t.current)==null?void 0:Yt[0])||(o==null?void 0:o[1])!==((_e=_t.current)==null?void 0:_e[1]))))return;_t.current=o;const It=Ot(e.current),Re=t.map(Wt=>{const U={timestamp:Wt.timestamp};for(const ct of n)U[ct.dataKey]=Wt.values[ct.dataKey]||0;return U}),Qt=n.map(Wt=>Wt.dataKey),we=Yi().keys(Qt)(Re),me=t.map(Wt=>Wt.timestamp),Ge=o?o[0]:Math.min(...me),sn=o?o[1]:Math.max(...me),Fe=(me.length>1?(me[me.length-1]-me[0])/(me.length-1):0)*.5,on=Wr().domain([new Date(Ge-Fe),new Date(sn+Fe)]).range([0,i-s.left-s.right]),ye=Math.max(...we[we.length-1].map(Wt=>Wt[1])),kt=ri().domain([0,ye*1.1]).range([a-s.top-s.bottom,0]);if(!ot.current)return;const Lt=ot.current,Mt=n.map(Wt=>({...Wt,color:Nh(Wt.color,rt.current)}));It.selectAll("*").remove(),va(It,rt.current),Gs(It,lt==="parliament"?"parliament":"area",we,Mt,Lt,on,kt,i-s.left-s.right,a-s.top-s.bottom,s,l,u,c,f,h,p,C,O,rt.current,g,o,H,X,$,Y,I,et,W,P,F,K,J,st),lt==="parliament"&&e.current&&Pt.current&&(at.current=Ys(e.current,Mt,t,Z,R,Pt.current,B,L,rt.current))},[o]),G.useEffect(()=>{if(!e.current||t.length===0||vt.current)return;if(yt.current){dt.current=g,xt.current=$;return}if(lt==="parliament"){dt.current=g,xt.current=$;return}const Rt=g.length!==dt.current.length||g.some((kt,Lt)=>{var Mt,Yt;return kt.timestamp!==((Mt=dt.current[Lt])==null?void 0:Mt.timestamp)||kt.label!==((Yt=dt.current[Lt])==null?void 0:Yt.label)}),It=$.length!==xt.current.length||$.some((kt,Lt)=>{var Mt,Yt;return kt.timestamp!==((Mt=xt.current[Lt])==null?void 0:Mt.timestamp)||kt.eventName!==((Yt=xt.current[Lt])==null?void 0:Yt.eventName)});if(!Rt&&!It)return;dt.current=g,xt.current=$;const Re=Ot(e.current),Qt=Re.select(rt.current?`.main-chart-group-${rt.current}`:".main-chart-group");if(Qt.empty())return;const oe=t.map(kt=>kt.timestamp),we=o?o[0]:Math.min(...oe),me=o?o[1]:Math.max(...oe),sn=(oe.length>1?(oe[oe.length-1]-oe[0])/(oe.length-1):0)*.5,Ye=i-s.left-s.right,Fe=a-s.top-s.bottom,on=Wr().domain([new Date(we-sn),new Date(me+sn)]).range([0,Ye]);if(It&&Y){const kt=rt.current?`.timeline-track-${rt.current}`:".timeline-track",Lt=rt.current?`.timeline-brush-${rt.current}`:".timeline-brush";Qt.select(kt).remove(),Qt.select(Lt).remove(),Qa({svg:Re,events:$,xScale:on,chartHeight:Fe,chartWidth:Ye,timelineHeight:I,timelineOffset:et,instanceId:rt.current,setHoveredTimelineEvent:W,enableBrush:C,onTimeRangeChange:O,minAllowedTime:P,maxAllowedTime:F,brushColor:K})}let ye=[];if(Rt&&g.length>0&&o){const kt=rt.current?`.markers-${rt.current}`:".markers";Qt.select(kt).remove();const Lt=1;ye=g.filter(Mt=>Mt.timestamp>=(o[0]??0)-Lt&&Mt.timestamp<=(o[1]??1/0)+Lt).map(Mt=>({...Mt,x:on(new Date(Mt.timestamp))})),H(ye),ye.length>0&&qh(Qt,ye,Fe,Ye,C,X,rt.current)}if(ye.length>0){const kt=Qt.select(rt.current?`.markers-${rt.current}`:".markers");if(!kt.empty()){Qt.selectAll(".marker-hover-overlay").remove();const Lt=Qt.append("rect").attr("class","marker-hover-overlay").attr("x",0).attr("y",0).attr("width",Ye).attr("height",Fe).attr("fill","none").attr("pointer-events","all");let Mt=null;Lt.on("mousemove",function(Yt){const[_e]=er(Yt,this);let Wt=null,U=1/0;if(ye.forEach(wt=>{const St=Math.abs(_e-wt.x);St<U&&(U=St,Wt=wt)}),!Wt||U>50){Mt!==null&&(Mt=null,kt.selectAll(".marker-line").attr("opacity",0),kt.selectAll(".marker-label").attr("opacity",0),X(null));return}const ft=Wt;Mt!==ft.timestamp&&(Mt=ft.timestamp,kt.selectAll(".marker-line").attr("opacity",0),kt.selectAll(".marker-label").attr("opacity",0),kt.selectAll(".marker-line").filter(function(){return Ot(this).attr("data-timestamp")===String(ft.timestamp)}).attr("opacity",.6),kt.selectAll(".marker-label").filter(function(){return Ot(this).attr("data-timestamp")===String(ft.timestamp)}).attr("opacity",1),X(ft))}),Lt.on("mouseleave",function(){Mt=null,kt.selectAll(".marker-line").attr("opacity",0),kt.selectAll(".marker-label").attr("opacity",0),X(null)})}}},[g,$,j]),{isMorphing:j,currentMode:lt,hoveredCategory:Z,scaleIndicatorOpacity:z,visibleMarkers:ut,hoveredMarker:T,setHoveredMarker:X,hoveredTimelineEvent:Q,setHoveredTimelineEvent:W}};function tT(e,t,n,r,i,a,s,o,l,u){const c=o,f=l,h=pi().extent([[0,0],[t,n]]).on("start",g=>{if(!g.selection&&c!==void 0&&f!==void 0){const d=g.sourceEvent;if(d){const m=d.offsetX,x=+r.invert(m);if(x<c||x>f){s.select(".brush").call(h.move,null);return}}}}).on("brush",g=>{if(!g.selection)return;const[d,m]=g.selection;let x=+r.invert(d),y=+r.invert(m);c!==void 0&&(x=Math.max(x,c),y=Math.max(y,c)),f!==void 0&&(x=Math.min(x,f),y=Math.min(y,f));const v=r(new Date(x)),_=r(new Date(y));(v!==d||_!==m)&&s.select(".brush").call(h.move,[v,_])}).on("end",g=>{if(!g.selection)return;const[d,m]=g.selection,x=[+r.invert(d),+r.invert(m)];c!==void 0&&(x[0]=Math.max(x[0],c)),f!==void 0&&(x[1]=Math.min(x[1],f)),i(x),s.select(".brush").call(h.move,null)}),p=e.append("g").attr("class","brush").call(h);p.selectAll(".selection").attr("fill",u).attr("fill-opacity",.2).attr("stroke",u).attr("stroke-width",1),p.selectAll(".handle").attr("fill",u).attr("fill-opacity",.8),p.select(".overlay").style("cursor","default"),p.on("dblclick",()=>{const g=r.domain(),d=[+g[0],+g[1]];o!==void 0&&(d[0]=Math.max(d[0],o)),l!==void 0&&(d[1]=Math.min(d[1],l)),i(d)})}function qh(e,t,n,r,i,a,s){const o=s?`markers markers-${s}`:"markers",l=e.append("g").attr("class",o);t.forEach(u=>{l.append("line").attr("class","marker-line").attr("data-timestamp",u.timestamp).attr("x1",u.x).attr("x2",u.x).attr("y1",0).attr("y2",n).attr("stroke",u.color??"#2F42FF").attr("stroke-width",2).attr("opacity",0),u.label&&l.append("text").attr("class","marker-label").attr("data-timestamp",u.timestamp).attr("x",u.x).attr("y",-5).attr("text-anchor","middle").attr("font-size",10).attr("fill",u.color??"#2F42FF").attr("opacity",0)})}function j0(e,t,n,r,i,a,s,o,l=!1,u){let c=null,f;a?f=e.select(".brush .overlay"):f=e.append("rect").attr("class","marker-hover-overlay").attr("width",r).attr("height",i).attr("fill","none").attr("pointer-events","all");const h=p=>{let g=null,d=1/0;if(n.forEach(y=>{const v=Math.abs(p-y.x);v<d&&(d=v,g=y)}),!g||d>50)return c!==null&&(c=null,t.selectAll(".marker-line").attr("opacity",0),t.selectAll(".marker-label").attr("opacity",0),s(null)),!1;const x=g;return c===x.timestamp||(c=x.timestamp,t.selectAll(".marker-line").attr("opacity",0),t.selectAll(".marker-label").attr("opacity",0),t.selectAll(".marker-line").filter(function(){return Ot(this).attr("data-timestamp")===String(x.timestamp)}).attr("opacity",.6),t.selectAll(".marker-label").filter(function(){return Ot(this).attr("data-timestamp")===String(x.timestamp)}).attr("opacity",1),s(x)),!0};f.on("mousemove",function(p){const[g,d]=er(p,this);h(g),l&&u&&u({x:g+o.left,y:d+o.top})}),f.on("mouseleave",function(){c=null,t.selectAll(".marker-line").attr("opacity",0),t.selectAll(".marker-label").attr("opacity",0),s(null),u&&u(null)})}function Gs(e,t,n,r,i,a,s,o,l,u,c,f,h,p,g,d,m=!1,x,y,v=[],_=[0,0],S,w,b=[],M=!1,A=40,k=15,C,O,P,F="#69b3a2",B=!1,L){const $=O,Y=P;let I=null;const et=y?`main-chart-group main-chart-group-${y}`:"main-chart-group",K=e.append("g").attr("class",et).attr("transform",`translate(${u.left},${u.top})`),J=y?`chart-clip-${y}`:`chart-clip-${Math.random().toString(36).substr(2,9)}`;e.select("defs").append("clipPath").attr("id",J).append("rect").attr("x",0).attr("y",0).attr("width",o).attr("height",l);const st=y?`chart-content-group chart-content-group-${y}`:"chart-content-group",lt=K.append("g").attr("class",st).attr("clip-path",`url(#${J})`);if(c&&t!=="parliament"&&(lt.append("g").attr("class","grid grid-vertical").attr("opacity",.1).call(qn(a).ticks(6).tickSize(l).tickFormat(()=>"")),lt.append("g").attr("class","grid grid-horizontal").attr("opacity",.1).call(In(s).ticks(5).tickSize(-o).tickFormat(()=>""))),t==="area"&&(Tc(lt,n,r,{xScale:a,yScale:s,addClasses:!0,instanceId:y}),v.length>0)){const j=v.filter(nt=>nt.timestamp>=_[0]-1&&nt.timestamp<=_[1]+1).map(nt=>({...nt,x:a(new Date(nt.timestamp))}));I={markersGroup:null,visibleMarkers:j},S&&S(j)}if(t==="parliament"){const N=o/2,j=i.radius+10,nt=l-i.radius*.3,Z=Math.max(j,nt);H0(lt,i,r,{centerX:N,centerY:Z,addClasses:!0,instanceId:y,parliamentRadius:i.radius})}if(f&&t!=="parliament"){const j=qn(a).ticks(6).tickPadding(12);g&&j.tickFormat(T=>g(+T));const Z=K.append("g").attr("class","axis axis-x").attr("transform",`translate(0,${l})`).call(j).selectAll("text").attr("font-size",p).attr("font-weight",500);h&&Z.attr("fill",h);const R=In(s).ticks(5);R.tickFormat(T=>+T==0?"":d?d(+T):String(T));const D=K.append("g").attr("class","axis axis-y").call(R).selectAll("text").attr("font-size",p).attr("font-weight",500);h&&D.attr("fill",h)}if(m&&x&&t==="area"){const N=$,j=Y,nt=pi().extent([[0,0],[o,l]]).on("start",R=>{if(!R.selection&&N!==void 0&&j!==void 0){const z=R.sourceEvent;if(z){const D=z.offsetX-((u==null?void 0:u.left)||0),T=+a.invert(D);if(T<N||T>j){e.select(".brush").call(nt.move,null);return}}}}).on("brush",R=>{if(!R.selection)return;const[z,D]=R.selection;let T=+a.invert(z),X=+a.invert(D);N!==void 0&&(T=Math.max(T,N),X=Math.max(X,N)),j!==void 0&&(T=Math.min(T,j),X=Math.min(X,j));const Q=a(new Date(T)),W=a(new Date(X));(Q!==z||W!==D)&&e.select(".brush").call(nt.move,[Q,W])}).on("end",R=>{if(!R.selection)return;const[z,D]=R.selection,T=[+a.invert(z),+a.invert(D)];N!==void 0&&(T[0]=Math.max(T[0],N)),j!==void 0&&(T[1]=Math.min(T[1],j)),x(T),e.select(".brush").call(nt.move,null)}),Z=lt.append("g").attr("class","brush").call(nt);Z.selectAll(".selection").attr("fill",F).attr("fill-opacity",.2).attr("stroke",F).attr("stroke-width",1),Z.selectAll(".handle").attr("fill",F).attr("fill-opacity",.8),Z.select(".overlay").style("cursor","default"),Z.on("dblclick",()=>{const R=a.domain(),z=[+R[0],+R[1]];x(z)})}if(t==="area"&&I&&I.visibleMarkers.length>0){const N=K.append("g").attr("class","markers").attr("clip-path",`url(#${J})`);I.visibleMarkers.forEach(j=>{N.append("line").attr("class","marker-line").attr("data-timestamp",j.timestamp).attr("x1",j.x).attr("x2",j.x).attr("y1",0).attr("y2",l).attr("stroke",j.color??"#2F42FF").attr("stroke-width",2).attr("opacity",0),j.label&&N.append("text").attr("class","marker-label").attr("data-timestamp",j.timestamp).attr("x",j.x).attr("y",-5).attr("text-anchor","middle").attr("font-size",10).attr("fill",j.color??"#2F42FF").attr("opacity",0)}),I.markersGroup=N}if(t==="area"&&M&&C&&Qa({svg:e,events:b,xScale:a,chartHeight:l,chartWidth:o,timelineHeight:A,timelineOffset:k,instanceId:y,setHoveredTimelineEvent:C,enableBrush:m,onTimeRangeChange:x,minAllowedTime:$,maxAllowedTime:Y,brushColor:F}),t==="area"){const N=(I==null?void 0:I.markersGroup)??lt.append("g").attr("class","empty-markers-group"),j=(I==null?void 0:I.visibleMarkers)??[];j0(lt,N,j,o,l,m,w??(()=>{}),u,B,L)}}function eT(e,t,n,r,i,a,s,o,l,u,c,f,h,p=!0,g=14,d,m,x,y,v,_){const S=e.select(_?`.main-chart-group-${_}`:".main-chart-group");S.selectAll(".markers").remove(),S.selectAll(".marker-hover-overlay").remove(),S.selectAll(".brush").remove(),t==="stacked-area"||t==="area"?nT(S,n,r,i,a,s,o,l,u,f,h,p,g,d,m,x,y,v,_):rT(S,n,r,i,a,s,o,l,u,f,h,p,g,d,m,x,y,v,_)}function Ni(e,t,n,r,i,a,s,o){const l=e[a];if(!l)return"";const u=l.find(w=>w.data.timestamp===s);if(!u)return"";const c=u.data,f=t[a];if(!f)return"";const h=f.dataKey,p=c[h];if(!p||p<=0)return"";const g=n.get(s);if(!g)return"";const d=g.x,m=g.width,x=u[0],y=u[1],v=o?i:r(x),_=o?i:r(y),S=[];return S.push(`M ${d} ${v}`),S.push(`L ${d} ${_}`),S.push(`L ${d+m} ${_}`),S.push(`L ${d+m} ${v}`),S.push("Z"),S.join(" ")}function nT(e,t,n,r,i,a,s,o,l,u,c,f=!0,h=14,p,g,d,m,x,y){var ha;const v=y?`.seat-${y}`:".seat",_=e.selectAll(v),S=y?`.chart-content-group-${y}`:".chart-content-group";let w=e.select(S);if(w.empty()){const V=e.attr("clip-path"),it=V?((ha=V.match(/url\(#(.+)\)/))==null?void 0:ha[1])||`chart-clip-${Math.random().toString(36).substr(2,9)}`:`chart-clip-${Math.random().toString(36).substr(2,9)}`,pt=y?`chart-content-group chart-content-group-${y}`:"chart-content-group";w=e.append("g").attr("class",pt).attr("clip-path",`url(#${it})`)}if(_.size()===0){Tc(e,t,n,{xScale:a,yScale:s,addClasses:!0,instanceId:y}),c();return}const b=QS(u),M=y?_r.get(y):void 0;M&&(M.destroy(),y&&_r.delete(y));const A=V=>V<.2?"seatsToRings":V<.35?"ringsToBar":V<.464?"axesReveal":V<.6?"barSlide":V<.82?"barsGrow":"barsToArea",k=new U0({seatsToRings:b.seatsToLines,ringsToBar:b.seatsToBar,axesReveal:b.barSlideToTimeline*.3,barSlide:b.barSlideToTimeline*.7,barsGrow:b.axesAndBarsGrow,barsToArea:b.barsToArea},{onStageComplete:V=>{},onProgress:V=>{if(m){const it=A(V);m(V,it)}},onComplete:()=>{c()}});y&&_r.set(y,k),d&&d(k.getControls().getTimeline());const C=t[0].map(V=>V.data),O=KS(C,n),P=o/2,F=r.radius+10,B=l-r.radius*.3,L=Math.max(F,B),$=C.map(V=>V.timestamp),Y=x??Math.max(...$),I=new Map,et=[];$.forEach((V,it)=>{const pt=a(new Date(V)),bt=$[it+1];if(bt){const Bt=a(new Date(bt))-pt;et.push(Bt)}});const K=et.length>0?et.reduce((V,it)=>V+it,0)/et.length:30;$.forEach((V,it)=>{const pt=a(new Date(V)),bt=$[it+1],Bt=it===$.length-1?K:a(new Date(bt))-pt;I.set(V,{x:pt,width:Bt})});const J=O.filter(V=>V.timestamp===Y),st=I.get(Y),lt=666,N=y?`parliament-bar-path parliament-bar-path-${y}`:"parliament-bar-path",j=w.append("g").attr("class",N);J.sort((V,it)=>it.y0-V.y0),new Map().set(Y,{x:lt-st.width/2,width:st.width});const Z=[],R=(r.radius-r.innerRadius)*.6,D=l*.8,T=L,X=J.reduce((V,it)=>V+(it.y1-it.y0),0);let Q=0;n.forEach(V=>{const it=J.find(ve=>ve.dataKey===V.dataKey);if(!it)return;const Jt=(it.y1-it.y0)/X*D,Bt=T-Q,Se=T-Q-Jt,xe=lt-R/2,Le=`M ${xe} ${Bt} L ${xe} ${Se} L ${xe+R} ${Se} L ${xe+R} ${Bt} Z`;Q+=Jt;const Ke=j.append("path").attr("class",`parliament-bar-segment category-${Ae(it.dataKey)}`).attr("d",Le).attr("fill",it.color).style("opacity",0).node();Ke&&Z.push(Ke)}),y&&(window.orchestratorMap=_r);const W=k.getControls().getTimeline(),ut=b.seatsToLines/1e3,H=b.seatsToBar/1e3;W.call(()=>{m==null||m(W.progress(),"seatsToRings")},[],"seatsToRings");const ot=_.nodes(),gt=P,yt=L,vt=Math.max(...r.seats.map(V=>V.ring)),rt=r.seats.filter(V=>V.ring===vt),at=e.append("g").attr("class",`seat-lines-${y||"default"}`),_t=n.map(V=>{const it=_.filter(`.seat-${Ae(V.dataKey)}`).size();return it>0?{name:V.dataKey,seatCount:it,color:V.color}:null}).filter(V=>V!==null).reverse(),dt=_t.reduce((V,it)=>V+it.seatCount,0),xt=rt.length,Et=r.radius-r.innerRadius,At=Et*.6,ee=At/2,ne=Et*.6,Pt=[];let ge=0;_t.forEach(V=>{const it=Math.max(1,Math.round(V.seatCount/dt*xt));for(let pt=0;pt<it;pt++){const bt=(ge+pt)/xt,Jt=r.arcAngle*Math.PI/180,Se=-Jt/2-Math.PI/2+bt*Jt,xe=(r.innerRadius+r.radius)/2,Le=gt+Math.cos(Se)*xe,Ke=yt+Math.sin(Se)*xe,ve=Math.cos(Se),Gn=Math.sin(Se),lr=Le-ee*ve,Fr=Ke-ee*Gn,ce=Le+ee*ve,Yn=Ke+ee*Gn,Wn=at.append("line").attr("class","seat-line").attr("x1",lr).attr("y1",Fr).attr("x2",ce).attr("y2",Yn).attr("stroke",V.color).attr("stroke-width",r.seatSize*2).attr("stroke-linecap","butt").style("opacity",0).attr("data-angle",Se*180/Math.PI).attr("data-center-x",Le).attr("data-center-y",Ke).attr("data-initial-length",At).node();Pt.push({element:Wn,angle:Se})}ge+=it});const Vt=()=>{at.remove()},Zt=ut*.5,Rt=0,It=[];if(It.push(...ot),It.sort((V,it)=>{const pt=parseInt(V.getAttribute("data-layout-index")||"-1",10),bt=parseInt(it.getAttribute("data-layout-index")||"-1",10);return pt-bt}),It.length>0&&Pt.length>0){const V=Pt.map(it=>it.element);W.to(It,{attr:{r:1.5},duration:Zt*.3,ease:"power2.in"},`seatsToRings+=${Rt}`),V.forEach(it=>{const pt=it.getAttribute("x1")||"0",bt=it.getAttribute("y1")||"0",Jt=it.getAttribute("x2")||"0",Bt=it.getAttribute("y2")||"0";it.setAttribute("data-final-x1",pt),it.setAttribute("data-final-y1",bt),it.setAttribute("data-final-x2",Jt),it.setAttribute("data-final-y2",Bt),it.setAttribute("x1",pt),it.setAttribute("y1",bt),it.setAttribute("x2",pt),it.setAttribute("y2",bt)}),W.to(V,{attr:{x2:(it,pt)=>parseFloat(pt.getAttribute("data-final-x2")||"0"),y2:(it,pt)=>parseFloat(pt.getAttribute("data-final-y2")||"0")},opacity:.9,duration:Zt*.6,ease:"power2.out"},`seatsToRings+=${Rt+Zt*.2}`),W.to(It,{opacity:0,duration:Zt*.3,ease:"power2.out"},`seatsToRings+=${Rt+Zt*.3}`)}const Re=ut*.05,Qt=ut*.7,oe=Rt+Zt+Re;if(Pt.length>0){const V=lt,it=L,bt=l*.8/Pt.length,Jt=it,Bt=[...Pt].sort((Le,Ke)=>Ke.angle-Le.angle),xe=.6/Bt.length;Bt.forEach((Le,Ke)=>{const ve=V,lr=Jt-Ke*bt,Fr=xe*Ke*Qt,ce=Le.element,Yn=parseFloat(ce.getAttribute("data-final-x1")||"0"),Wn=parseFloat(ce.getAttribute("data-final-y1")||"0"),mi=parseFloat(ce.getAttribute("data-final-x2")||"0"),$r=parseFloat(ce.getAttribute("data-final-y2")||"0"),pa=(Yn+mi)/2,xn=(Wn+$r)/2,Xn=Math.atan2($r-Wn,mi-Yn),ur=Math.sqrt(Math.pow(mi-Yn,2)+Math.pow($r-Wn,2));W.to({progress:0},{progress:1,duration:Qt*.5,ease:"power2.inOut",delay:Fr,onUpdate:function(){const ie=this.progress(),xs=pa+(ve-pa)*ie,vs=xn+(lr-xn)*ie,vn=40*4*ie*(1-ie),cr=xs,fr=vs-vn,ws=0-Xn,En=Xn+ws*ie*ie,da=(ur+(ne-ur)*ie)/2,Iy=cr-da*Math.cos(En),zy=fr-da*Math.sin(En),By=cr+da*Math.cos(En),Uy=fr+da*Math.sin(En);ce.setAttribute("x1",Iy.toString()),ce.setAttribute("y1",zy.toString()),ce.setAttribute("x2",By.toString()),ce.setAttribute("y2",Uy.toString())},onComplete:function(){const ie=ne/2;ce.setAttribute("x1",(ve-ie).toString()),ce.setAttribute("y1",lr.toString()),ce.setAttribute("x2",(ve+ie).toString()),ce.setAttribute("y2",lr.toString())}},`seatsToRings+=${oe}`),W.to(Le.element,{opacity:.95,duration:Qt*.3,ease:"power2.out",delay:Fr},`seatsToRings+=${oe}`)})}const we=at,me=[];J.forEach((V,it)=>{const pt=_.filter(`.seat-${Ae(V.category)}`),bt=pt.size();if(bt===0)return;const Jt=s(V.y1),Bt=s(V.y0)-s(V.y1),Se=pt.nodes().sort((xn,Xn)=>{const ur=parseInt(xn.getAttribute("data-layout-index")||"-1",10),ie=parseInt(Xn.getAttribute("data-layout-index")||"-1",10);return ur-ie}),xe=Math.max(st.width,100),Le=Bt,Ke=xe/Math.max(Le,1),ve=Math.max(2,Math.ceil(Math.sqrt(bt*Ke))),Gn=Math.ceil(bt/ve),lr=xe*.8,Fr=Le*.8,ce=ve>1?lr/(ve-1):0,Yn=Gn>1?Fr/(Gn-1):0,Wn=ve>1?(ve-1)*ce:0,mi=Gn>1?(Gn-1)*Yn:0,$r=lt-xe/2+(xe-Wn)/2,pa=Jt+(Le-mi)/2;Se.forEach((xn,Xn)=>{const ur=parseInt(xn.getAttribute("data-layout-index")||"-1",10),ie=ur>=0?r.seats[ur]:void 0,xs=ie?P+ie.x:parseFloat(xn.getAttribute("cx")||"0"),vs=ie?L+ie.y:parseFloat(xn.getAttribute("cy")||"0"),Ef=(ie==null?void 0:ie.radius)||parseFloat(xn.getAttribute("r")||"4"),vn=bt%ve;let cr,fr;if(vn>0&&Xn<vn)fr=0,cr=Xn;else{const En=Xn-(vn>0?vn:0);cr=En%ve,fr=Math.floor(En/ve)+(vn>0?1:0)}let bs=$r+cr*ce;if(vn>0&&fr===0){const En=vn>1?(vn-1)*ce:0,Df=(Wn-En)/2;bs=$r+Df+cr*ce}const ws=pa+fr*Yn;me.push({element:xn,startX:xs,startY:vs,startRadius:Ef,category:V.dataKey,segmentIndex:it,endY:ws,endX:bs})})});const Ge=me.map(V=>{const it=V.startX-P,pt=V.startY-L,bt=Math.atan2(pt,it);return{...V,angle:bt}});Ge.sort((V,it)=>it.angle-V.angle);const sn=H*.8,Ye=.6,Fe=Ge.length,ye=sn/Math.max(Fe,1)*(Fe-1)+Ye,kt=H*.3,Lt=ye;W.to(Z,{opacity:1,duration:kt,ease:"power2.inOut"},`seatsToBar+=${Lt}`),we&&(W.to(we.selectAll(".seat-line").nodes(),{opacity:0,duration:kt,ease:"power2.inOut"},`seatsToBar+=${Lt}`),W.call(()=>{Vt()},[],`seatsToBar+=${Lt+kt}`));const Mt=b.barSlideToTimeline/1e3;let Yt=null,_e=null;if(f){const it=qn(a).ticks(6).tickPadding(12);p&&it.tickFormat(bt=>p(bt.getTime())),Yt=e.append("g").attr("class","axis axis-x").attr("transform",`translate(0,${l})`).attr("opacity",0),Yt.call(it).selectAll("text").attr("font-size",h).attr("font-weight",500);const pt=In(s).ticks(5);pt.tickFormat(bt=>+bt==0?"":g?g(bt):String(bt)),_e=e.append("g").attr("class","axis axis-y").attr("opacity",0),_e.call(pt).selectAll("text").attr("font-size",h).attr("font-weight",500)}const Wt=b.crossFadePause/1e3,U=Lt+kt+Wt;Z.forEach(V=>{const it=Array.from(V.classList).find(Bt=>Bt.startsWith("category-"));if(!it||!J.find(Bt=>Ae(Bt.dataKey)===it.replace("category-","")))return;const bt=n.findIndex(Bt=>Ae(Bt.dataKey)===it.replace("category-",""));if(bt===-1)return;const Jt=Ni(t,n,I,s,l,bt,Y,!1);Jt&&W.to(V,{attr:{d:Jt},duration:Mt,ease:"power2.out"},`seatsToBar+=${U}`)});const ct=as().x(V=>a(V.data.timestamp)).y0(V=>s(V[0])).y1(V=>s(V[1])).curve(kr),ft=new Map;t.forEach((V,it)=>{const pt=n[it];if(pt){const bt=ct(V)||"";ft.set(pt.dataKey,bt)}});const wt=U+Mt;f&&Yt&&_e&&W.to([Yt.node(),_e.node()],{opacity:1,duration:.6,ease:"power2.inOut"},`seatsToBar+=${U}`);const St=w.select(".grid-vertical"),zt=w.select(".grid-horizontal");if(!St.empty()||!zt.empty()){const it=[];St.empty()||it.push(St.node()),zt.empty()||it.push(zt.node()),W.to(it,{opacity:.1,duration:.6,ease:"power2.inOut"},`seatsToBar+=${U}`)}const re=b.axesAndBarsGrow/1e3,le=b.barsToArea/1e3,ht=y?`histogram-paths histogram-paths-${y}`:"histogram-paths",Nt=w.append("g").attr("class",ht);$.forEach(V=>{if(V===Y)return;const it=I.get(V);it&&n.forEach((pt,bt)=>{const Jt=Ni(t,n,I,s,l,bt,V,!0),Bt=Ni(t,n,I,s,l,bt,V,!1);if(!Jt||!Bt)return;const Se=y?`histogram-path histogram-path-${y} category-${Ae(pt.dataKey)}`:`histogram-path category-${Ae(pt.dataKey)}`;Nt.append("path").attr("class",Se).attr("d",Jt).attr("fill",pt.color).attr("stroke",pt.color).attr("stroke-width",.5).attr("shape-rendering","crispEdges").attr("opacity",0).attr("data-category",pt.dataKey).attr("data-timestamp",V).attr("data-x-position",it.x).attr("data-full-height-path",Bt)})});const ue=y?`.histogram-path-${y}`:".histogram-path",Ee=Nt.selectAll(ue);W.to(Ee.nodes(),{opacity:1,duration:.3,ease:"power2.inOut"},`seatsToBar+=${wt}`);const De=st.x+st.width/2;Ee.each(function(){var xe;const V=this.getAttribute("data-full-height-path");if(!V)return;const it=parseFloat(this.getAttribute("data-x-position")||"0"),pt=parseFloat(this.getAttribute("data-timestamp")||"0"),bt=((xe=I.get(pt))==null?void 0:xe.width)||0,Jt=it+bt/2,Se=Math.abs(Jt-De)*8e-4;W.to(this,{attr:{d:V},duration:re,ease:"power2.out"},`seatsToBar+=${wt+Se}`)});const We=wt+re,$e=$[$.length-1],Xe=a(new Date($e))+K,sr=a.invert(Xe).getTime(),Pr=t.map(V=>{const it=V[V.length-1],pt={...it,data:{...it.data,timestamp:sr}};return[...V,pt]});Tc(e,Pr,n,{xScale:a,yScale:s,addClasses:!0,instanceId:y});const Rf=y?`.area-${y}`:".area",or=e.selectAll(Rf);or.attr("opacity",0),W.to(Ee.nodes(),{opacity:0,duration:le,ease:"power2.inOut"},`seatsToBar+=${We}`);const fa=j.selectAll("path").nodes();fa.length>0&&W.to(fa,{opacity:0,duration:le,ease:"power2.inOut"},`seatsToBar+=${We}`),W.to(or.nodes(),{opacity:1,duration:le,ease:"power2.inOut"},`seatsToBar+=${We}`);const _s=c;k.getControls().getTimeline().eventCallback("onComplete",()=>{const V=y?`.morph-bar-${y}`:".morph-bar";e.selectAll(V).remove();const it=y?`.histogram-paths-${y}`:".histogram-paths";e.selectAll(it).remove();const pt=y?`.seat-${y}`:".seat";e.selectAll(pt).style("pointer-events","none"),f&&(Yt&&Yt.attr("opacity",1),_e&&_e.attr("opacity",1)),_s()}),k.play()}function rT(e,t,n,r,i,a,s,o,l,u,c,f=!0,h=14,p,g,d,m,x,y){var Wt;const v=y?`.chart-content-group-${y}`:".chart-content-group";let _=e.select(v);if(_.empty()){const U=e.attr("clip-path"),ct=U?((Wt=U.match(/url\(#(.+)\)/))==null?void 0:Wt[1])||`chart-clip-${Math.random().toString(36).substr(2,9)}`:`chart-clip-${Math.random().toString(36).substr(2,9)}`,ft=y?`chart-content-group chart-content-group-${y}`:"chart-content-group";_=e.append("g").attr("class",ft).attr("clip-path",`url(#${ct})`)}const S=y?`.area-${y}`:".area",w=e.selectAll(S);if(w.size()===0){iT(e,n,r,o,l,y),c();return}const b={areaToBar:u*.18,barsShrink:u*.22,barSlide:u*.22,axesHide:u*.03,barToRings:u*.07,ringsExpand:u*.18,ringsHold:u*.05,ringsToSeats:u*.07},M=y?_r.get(y):void 0;M&&(M.destroy(),y&&_r.delete(y));const A=U=>U<.18?"areaToBar":U<.4?"barsShrink":U<.62?"barSlide":U<.65?"axesHide":U<.72?"barToRings":U<.9?"ringsExpand":U<.95?"ringsHold":"ringsToSeats",k=new U0({seatsToRings:b.ringsToSeats,ringsHold:b.ringsHold,ringsToBar:b.barToRings,axesReveal:b.axesHide,barSlide:b.barSlide,barsGrow:b.barsShrink,barsToArea:b.areaToBar},{onStageComplete:U=>{},onProgress:U=>{if(m){const ct=A(U);m(U,ct)}},onComplete:()=>{c()}});y&&_r.set(y,k),d&&d(k.getControls().getTimeline());const O=t[0].map(U=>U.data).map(U=>U.timestamp),P=x??Math.max(...O),F=new Map,B=[];O.forEach((U,ct)=>{const ft=a(new Date(U)),wt=O[ct+1];if(wt){const zt=a(new Date(wt))-ft;B.push(zt)}});const L=B.length>0?B.reduce((U,ct)=>U+ct,0)/B.length:30;O.forEach((U,ct)=>{const ft=a(new Date(U)),wt=O[ct+1],zt=ct===O.length-1?L:a(new Date(wt))-ft;F.set(U,{x:ft,width:zt})});const $=k.getControls().getTimeline(),Y=b.areaToBar/1e3,I=y?`histogram-paths histogram-paths-${y}`:"histogram-paths",et=_.append("g").attr("class",I);O.forEach(U=>{const ct=F.get(U);ct&&n.forEach((ft,wt)=>{const St=Ni(t,n,F,s,l,wt,U,!1);if(!St)return;const zt=y?`histogram-path histogram-path-${y} category-${Ae(ft.dataKey)}`:`histogram-path category-${Ae(ft.dataKey)}`;et.append("path").attr("class",zt).attr("d",St).attr("fill",ft.color).attr("stroke",ft.color).attr("stroke-width",.5).attr("shape-rendering","crispEdges").attr("opacity",0).attr("data-category",ft.dataKey).attr("data-timestamp",U).attr("data-x-position",ct.x)})});const K=y?`.histogram-path-${y}`:".histogram-path",J=et.selectAll(K);$.to(w.nodes(),{opacity:0,duration:Y,ease:"power2.inOut"},"areaToBar"),$.to(J.nodes(),{opacity:1,duration:Y,ease:"power2.inOut"},"areaToBar");const st=b.barsShrink/1e3,lt=Y;J.each(function(){const U=parseFloat(this.getAttribute("data-timestamp")||"0");if(U===P)return;const ct=n.find(St=>this.classList.contains(`category-${Ae(St.dataKey)}`));if(!ct)return;const ft=n.indexOf(ct),wt=Ni(t,n,F,s,l,ft,U,!0);wt&&$.to(this,{attr:{d:wt},duration:st,ease:"power2.in"},lt)});const N=b.axesHide/1e3,j=lt+st;if(f){const U=e.select(".axis-x"),ct=e.select(".axis-y");U.empty()||$.to(U.node(),{opacity:0,duration:N,ease:"power2.inOut"},j),ct.empty()||$.to(ct.node(),{opacity:0,duration:N,ease:"power2.inOut"},j)}const nt=_.select(".grid-vertical"),Z=_.select(".grid-horizontal");nt.empty()||$.to(nt.node(),{opacity:0,duration:N,ease:"power2.inOut"},j),Z.empty()||$.to(Z.node(),{opacity:0,duration:N,ease:"power2.inOut"},j);const R=[];t.forEach((U,ct)=>{const ft=U.find(St=>St.data.timestamp===P);if(!ft)return;const wt=n[ct];wt&&R.push({category:wt.label,dataKey:wt.dataKey,color:wt.color,y0:ft[0],y1:ft[1]})}),R.sort((U,ct)=>ct.y0-U.y0);const z=R.reduce((U,ct)=>U+(ct.y1-ct.y0),0),D=r.radius-r.innerRadius,T=o/2,X=r.radius+10,Q=l-r.radius*.3,W=Math.max(X,Q),ut=D*.6,ot=l*.8,gt=W,yt=b.barSlide/1e3,vt=j+N,rt=666,at=J.nodes().filter(U=>parseFloat(U.getAttribute("data-timestamp")||"0")!==P);$.to(at,{opacity:0,duration:yt*.2,ease:"power2.out"},vt);const _t=J.nodes().filter(U=>parseFloat(U.getAttribute("data-timestamp")||"0")===P);_t.forEach(U=>{const ct=U.getAttribute("data-category");if(!ct)return;const ft=R.find(Ee=>Ee.dataKey===ct);if(!ft)return;const zt=(ft.y1-ft.y0)/z*ot;let re=0;for(const Ee of n){const De=R.find(Rn=>Rn.dataKey===Ee.dataKey);if(!De)continue;if(De.dataKey===ft.dataKey)break;const $e=(De.y1-De.y0)/z;re+=$e*ot}const le=gt-re,ht=gt-re-zt,Nt=rt-ut/2,ue=`M ${Nt} ${le} L ${Nt} ${ht} L ${Nt+ut} ${ht} L ${Nt+ut} ${le} Z`;$.to(U,{attr:{d:ue},duration:yt,ease:"power2.inOut"},vt)});const dt=b.barToRings/1e3,xt=vt+yt,Et=b.ringsExpand/1e3,At=xt+dt,ee=b.ringsHold/1e3,ne=At+Et,Pt=b.ringsToSeats/1e3,ge=ne+ee,Vt=Math.max(...r.seats.map(U=>U.ring)),Zt=r.seats.filter(U=>U.ring===Vt),Rt=_.append("g").attr("class",`slinky-${y||"h2p-default"}`),It=()=>{Rt.remove()};Zt.forEach((U,ct)=>{const ft=n.find(wt=>wt.label===U.category);ft&&Rt.append("line").attr("class","slinky-ring").attr("x1",0).attr("y1",0).attr("x2",0).attr("y2",0).attr("stroke",ft.color).attr("stroke-width",r.seatSize*2).attr("stroke-linecap","butt").attr("data-category",U.category).attr("data-category-index",U.categoryIndex).attr("data-ring-index",ct).attr("data-seat-x",T+U.x).attr("data-seat-y",W+U.y).attr("data-seat-angle",Math.atan2(U.y,U.x)).style("opacity",0)});const Re=Rt.selectAll(".slinky-ring").nodes(),Qt=rt,oe=ot/Re.length,we=[...Re].sort((U,ct)=>{const ft=parseFloat(U.getAttribute("data-seat-angle")||"0");return parseFloat(ct.getAttribute("data-seat-angle")||"0")-ft}),me=gt;we.forEach((U,ct)=>{const ft=me-ct*oe,St=ut/2,zt=Qt-St,re=Qt+St;U.setAttribute("x1",zt.toString()),U.setAttribute("y1",ft.toString()),U.setAttribute("x2",re.toString()),U.setAttribute("y2",ft.toString()),U.style.opacity="0"}),$.to(_t,{opacity:0,duration:dt*.7,ease:"power2.out"},xt+dt*.3),$.to(we,{opacity:1,duration:dt,ease:"power2.in",stagger:.005},xt);const Ge=D*.8;we.forEach((U,ct)=>{const ft=parseFloat(U.getAttribute("data-seat-x")||"0"),wt=parseFloat(U.getAttribute("data-seat-y")||"0"),St=parseFloat(U.getAttribute("data-seat-angle")||"0"),zt=(we.length-1-ct)/we.length*(Et*.4),re=parseFloat(U.getAttribute("x1")||"0"),le=parseFloat(U.getAttribute("y1")||"0"),ht=parseFloat(U.getAttribute("x2")||"0"),Nt=parseFloat(U.getAttribute("y2")||"0"),ue=(re+ht)/2,Ee=(le+Nt)/2,De=Math.atan2(Nt-le,ht-re),We=Math.sqrt(Math.pow(ht-re,2)+Math.pow(Nt-le,2)),$e=ft-Ge/2*Math.cos(St),Rn=wt-Ge/2*Math.sin(St);$.to({progress:0},{progress:1,duration:Et*.7,ease:"power2.out",onUpdate:function(){const Xe=this.progress(),ln=ue+($e-ue)*Xe,sr=Ee+(Rn-Ee)*Xe,Pr=De+(St-De)*Xe,or=(We+(Ge-We)*Xe)/2,fa=ln-or*Math.cos(Pr),_s=sr-or*Math.sin(Pr),ha=ln+or*Math.cos(Pr),V=sr+or*Math.sin(Pr);U.setAttribute("x1",fa.toString()),U.setAttribute("y1",_s.toString()),U.setAttribute("x2",ha.toString()),U.setAttribute("y2",V.toString())}},At+zt),$.to(U,{opacity:.9,duration:Et*.3,ease:"power2.in"},At+zt)}),$.call(()=>{m&&m($.progress(),"ringsHold")},[],ne);const sn=y?`parliament parliament-${y}`:"parliament",Ye=_.append("g").attr("class",sn);r.seats.forEach((U,ct)=>{const ft=n.find(ht=>ht.label===U.category);if(!ft)return;const wt=T+U.x,St=W+U.y;let zt,re,le;U.ring===Vt?(zt=wt,re=St,le=2):(zt=wt,re=St,le=U.radius),Ye.append("circle").attr("cx",zt).attr("cy",re).attr("r",le).attr("fill",ft.color).attr("stroke",ft.color).attr("stroke-width",.5).attr("opacity",0).attr("class",()=>y?`seat seat-${y} seat-${Ae(U.category)}`:`seat seat-${Ae(U.category)}`).attr("data-layout-index",ct).attr("data-ring",U.ring).attr("data-final-x",wt).attr("data-final-y",St).attr("data-final-r",U.radius)});const Fe=y?`.seat-${y}`:".seat",on=Ye.selectAll(Fe);$.to(Re,{opacity:0,duration:Pt*.2,ease:"power3.out"},ge),$.to(on.nodes(),{opacity:.8,duration:Pt*.3,ease:"power2.in"},ge+Pt*.25);const ye=on.nodes(),kt=[],Lt=[];ye.forEach(U=>{parseInt(U.getAttribute("data-ring")||"0")===Vt?kt.push(U):Lt.push(U)});const Mt=Pt*.2,Yt=Pt*.7;kt.forEach(U=>{const ct=parseFloat(U.getAttribute("data-final-r")||"4");$.to(U,{attr:{r:ct},opacity:1,duration:Yt*.6,ease:"power2.out"},ge+Mt)}),Lt.length>0&&$.to(Lt,{opacity:1,duration:Yt*.5,ease:"power2.in"},ge+Mt+Pt*.15);const _e=c;k.getControls().getTimeline().eventCallback("onComplete",()=>{const U=y?`.areas-${y}`:".areas",ct=y?`.histogram-paths-${y}`:".histogram-paths";e.selectAll(U).remove(),e.selectAll(ct).remove(),It(),e.selectAll(".axis-x").remove(),e.selectAll(".axis-y").remove(),_.selectAll(".grid-vertical").remove(),_.selectAll(".grid-horizontal").remove();const ft=y?`.parliament-label-${y}`:".parliament-label";if(e.select(ft).empty()){const St=o/2,zt=r.radius+10,re=l-r.radius*.3,le=Math.max(zt,re),ht=y?`parliament-label parliament-label-${y}`:"parliament-label",Nt=e.append("g").attr("class",ht).attr("transform",`translate(${St},${le-r.radius*.15})`).style("opacity","0").style("pointer-events","none");Nt.append("text").attr("class","label-category").attr("text-anchor","middle").attr("dy","-15").style("font-size","22px").style("fill","#666").style("font-family","system-ui, -apple-system, sans-serif"),Nt.append("text").attr("class","label-value").attr("text-anchor","middle").attr("dy","35").style("font-size","48px").style("font-weight","bold").style("font-family","system-ui, -apple-system, sans-serif");const ue=Nt.append("g").attr("class","scale-indicator").attr("transform","translate(0, 65)").style("opacity","0");ue.append("circle").attr("r",4).attr("cx",-30).attr("cy",0).style("fill","#888"),ue.append("text").attr("x",-20).attr("y",0).attr("dy","0.35em").attr("text-anchor","start").style("font-size","18px").style("fill","#666").style("font-style","italic").style("font-family","system-ui, -apple-system, sans-serif")}_e()}),k.play()}function iT(e,t,n,r,i,a){const s=r/2,o=n.radius+10,l=i-n.radius*.3,u=Math.max(o,l);H0(e,n,t,{centerX:s,centerY:u,addClasses:!0,instanceId:a,parliamentRadius:n.radius})}function qi(e,t,n,r,i){const a=i?`.parliament-label-${i}`:".parliament-label",s=Ot(e).select(a);if(!s.empty())if(t){s.style("opacity","1"),s.select(".label-category").text(t.label).style("fill","#666");const o=t.value>1?"repos":"repo";s.select(".label-value").text(`${t.value} ${o}`).style("fill",t.color);const l=s.select(".scale-indicator");n?l.style("opacity","1").select("text").text(`= ~${r} repos`):l.style("opacity","0")}else s.style("opacity","0")}function Ys(e,t,n,r,i,a,s,o,l){const u=e.querySelectorAll(".seat");if(!u||u.length===0)return;const c=n[n.length-1];if(!c)return;const f=[];u.forEach(p=>{const g=p;g.style.cursor="pointer",g.style.transition="fill-opacity 150ms ease, stroke-opacity 150ms ease"}),u.forEach(p=>{const m=(p.getAttribute("class")||"").split(/\s+/).filter(S=>S.startsWith("seat-")),x=m[m.length-1];if(!x)return;const y=x.substring(5),v=t.find(S=>Ae(S.label)===y);if(!v)return;const _=()=>{i(v.label);const S=Math.round(c.values[v.dataKey]||0),w=pf(v.color),b={label:v.label,value:S,color:w};a&&a(b),qi(e,b,s??!1,o??1,l),Ii(e,v.label)};p.addEventListener("mouseenter",_),f.push({element:p,handler:_})});const h=()=>{i(null),a&&a(null),qi(e,null,!1,1,l),Ii(e,null)};return e.addEventListener("mouseleave",h),r&&Ii(e,r),()=>{f.forEach(({element:p,handler:g})=>{p.removeEventListener("mouseenter",g)}),e.removeEventListener("mouseleave",h),u.forEach(p=>{const g=p;g.style.cursor="",g.style.transition=""})}}function Ii(e,t){const n=e.querySelectorAll(".seat"),r=t?Ae(t):null;n.forEach(i=>{const a=i,l=(i.getAttribute("class")||"").split(/\s+/).filter(f=>f.startsWith("seat-")),u=l[l.length-1];if(!u)return;const c=u.substring(5);r?c===r?(a.setAttribute("fill-opacity","1"),a.setAttribute("stroke-opacity","1")):(a.setAttribute("fill-opacity","0.3"),a.setAttribute("stroke-opacity","0.2")):(a.setAttribute("fill-opacity","1"),a.setAttribute("stroke-opacity","1"))})}const G0=({data:e,categories:t,mode:n,width:r=900,height:i=400,margin:a={top:10,right:30,bottom:40,left:60},timeRange:s,showGrid:o=!0,showAxes:l=!0,axisLabelColor:u,axisLabelSize:c=14,formatDate:f,formatValue:h,markers:p=[],arcAngle:g=200,parliamentRadius:d=200,seatSize:m=4.5,animationDuration:x=900,onMorphComplete:y,onAnimationStateChange:v,onTimelineReady:_,onAnimationProgress:S,onHoveredDataChange:w,hoveredCategory:b,maxSeats:M=500,showTooltip:A=!0,showTable:k=!1,showScaledIndicator:C=!0,parliamentTimestamp:O,enableBrush:P=!1,onTimeRangeChange:F,minAllowedTime:B,maxAllowedTime:L,timelineEvents:$=[],showTimeline:Y=!1,timelineHeight:I=40,timelineOffset:et,brushColor:K="#69b3a2",showCrosshair:J=!1,crosshairColor:st="#666",crosshairDashArray:lt="4,4"})=>{const N=G.useRef(null),[j,nt]=G.useState(null),Z=G.useCallback(rt=>{w&&w(rt)},[w]),R=12,D=et??6+R+c+R,T=e[e.length-1],X=T?t.reduce((rt,at)=>rt+(T.values[at.dataKey]||0),0):0,Q=X>M,W=Q?Math.round(X/M):1,ut=Y&&n==="stacked-area"?i+I+D:i,{isMorphing:H,currentMode:ot,visibleMarkers:gt,hoveredMarker:yt,hoveredTimelineEvent:vt}=JS({containerRef:N,data:e,categories:t,mode:n,width:r,height:i,margin:a,timeRange:s,showGrid:o,showAxes:l,axisLabelColor:u,axisLabelSize:c,formatDate:f,formatValue:h,markers:p,arcAngle:g,parliamentRadius:d,seatSize:m,animationDuration:x,onMorphComplete:y,onAnimationStateChange:v,onTimelineReady:_,onAnimationProgress:S,onHoveredDataChange:Z,hoveredCategory:b,maxSeats:M,parliamentTimestamp:O,enableBrush:P,onTimeRangeChange:F,minAllowedTime:B,maxAllowedTime:L,showScaleIndicator:C&&Q,reposPerSeat:W,timelineEvents:$,showTimeline:Y,timelineHeight:I,timelineOffset:D,brushColor:K,showCrosshair:J,onCrosshairMove:J?nt:void 0});return E.jsxs(q.Box,{sx:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:[E.jsx("svg",{ref:N,viewBox:`0 0 ${r} ${ut}`,preserveAspectRatio:"xMidYMid meet",style:{width:"100%",height:"auto",display:"block"}}),J&&j&&ot==="area"&&!H&&E.jsxs("svg",{viewBox:`0 0 ${r} ${ut}`,preserveAspectRatio:"xMidYMid meet",style:{position:"absolute",top:0,left:0,width:"100%",height:"auto",pointerEvents:"none"},children:[E.jsx("line",{x1:j.x,y1:a.top,x2:j.x,y2:i-a.bottom,stroke:st,strokeDasharray:lt,strokeWidth:1}),E.jsx("line",{x1:a.left,y1:j.y,x2:r-a.right,y2:j.y,stroke:st,strokeDasharray:lt,strokeWidth:1})]}),ot==="area"&&gt.map(rt=>{const at=(rt.x+a.left)/r*100,_t=a.top/i*100,dt=new Date(rt.timestamp),xt=f?f(rt.timestamp):dt.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0}),Et=E.jsxs(q.Box,{children:[E.jsx(q.Box,{sx:{color:"#B6BFFF",fontFamily:"monospace",fontSize:"0.8125rem",mb:rt.label?.5:0},children:xt}),rt.label&&E.jsx(q.Box,{sx:{color:"white",fontWeight:500},children:rt.label})]});return E.jsx(q.Tooltip,{title:Et,open:(yt==null?void 0:yt.timestamp)===rt.timestamp,placement:"top",arrow:!0,slotProps:{tooltip:{sx:{bgcolor:"#131E7A",fontSize:"0.875rem",px:2,py:1,borderRadius:1,boxShadow:"0px 2px 8px rgba(0,0,0,0.15)","& .MuiTooltip-arrow":{color:"#131E7A"}}},popper:{sx:{pointerEvents:"none"}}},children:E.jsx(q.Box,{sx:{position:"absolute",left:`${at}%`,top:`${_t}%`,width:"1px",height:`${(i-a.top-a.bottom)/i*100}%`,pointerEvents:"none"}})},rt.timestamp)}),vt&&ot==="area"&&E.jsx(q.Tooltip,{title:E.jsxs(q.Box,{children:[E.jsx(q.Box,{sx:{color:"#B6BFFF",fontFamily:"monospace",fontSize:"0.8125rem",mb:.5},children:f?f(vt.timestamp):new Date(vt.timestamp).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0})}),E.jsx(q.Box,{sx:{color:"white",fontWeight:500},children:vt.eventName})]}),open:!0,placement:"top",arrow:!0,slotProps:{tooltip:{sx:{bgcolor:"#131E7A",fontSize:"0.875rem",px:2,py:1,borderRadius:1,boxShadow:"0px 2px 8px rgba(0,0,0,0.15)","& .MuiTooltip-arrow":{color:"#131E7A"}}},popper:{sx:{pointerEvents:"none"}}},children:E.jsx(q.Box,{sx:{position:"absolute",left:`${(vt.x+a.left)/r*100}%`,top:`${(i+D+I/2)/ut*100}%`,width:"1px",height:"1px",pointerEvents:"none"}})}),H&&E.jsxs(q.Box,{sx:{position:"absolute",top:8,right:8,padding:"4px 8px",backgroundColor:"rgba(0,0,0,0.7)",color:"white",borderRadius:"4px",fontSize:"12px",pointerEvents:"none",display:"none"},children:["Morphing: ",ot," → ",n]})]})},Y0=[{minRepos:0,maxRepos:10,minArc:90,maxArc:90,minSeatSize:28,maxSeatSize:28},{minRepos:10,maxRepos:25,minArc:90,maxArc:110,minSeatSize:24,maxSeatSize:24},{minRepos:25,maxRepos:50,minArc:110,maxArc:120,minSeatSize:20,maxSeatSize:20},{minRepos:50,maxRepos:100,minArc:120,maxArc:150,minSeatSize:16.5,maxSeatSize:16.5},{minRepos:100,maxRepos:200,minArc:150,maxArc:180,minSeatSize:15,maxSeatSize:15},{minRepos:200,maxRepos:1/0,minArc:180,maxArc:180,minSeatSize:14.5,maxSeatSize:14.5}],df=({repositoryCount:e})=>{const t=Y0.find(o=>e>=o.minRepos&&e<o.maxRepos);if(!t)return 180;if(t.minArc===t.maxArc)return t.minArc;const n=t.maxRepos-t.minRepos,i=(e-t.minRepos)/n,a=t.maxArc-t.minArc,s=t.minArc+a*i;return Math.round(s)},gf=({repositoryCount:e})=>{const t=Y0.find(o=>e>=o.minRepos&&e<o.maxRepos);if(!t)return 6.5;if(t.minSeatSize===t.maxSeatSize)return t.minSeatSize;const n=t.maxRepos-t.minRepos,i=(e-t.minRepos)/n,a=t.maxSeatSize-t.minSeatSize,s=t.minSeatSize+a*i;return Math.round(s*10)/10};class ia{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ia.prototype.normal={};ia.prototype.property={};ia.prototype.space=void 0;function W0(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ia(n,r,t)}function ta(e){return e.toLowerCase()}class je{constructor(t,n){this.attribute=n,this.property=t}}je.prototype.attribute="";je.prototype.booleanish=!1;je.prototype.boolean=!1;je.prototype.commaOrSpaceSeparated=!1;je.prototype.commaSeparated=!1;je.prototype.defined=!1;je.prototype.mustUseProperty=!1;je.prototype.number=!1;je.prototype.overloadedBoolean=!1;je.prototype.property="";je.prototype.spaceSeparated=!1;je.prototype.space=void 0;let aT=0;const mt=Dr(),ae=Dr(),Mc=Dr(),tt=Dr(),qt=Dr(),Zr=Dr(),Ve=Dr();function Dr(){return 2**++aT}const Ac=Object.freeze(Object.defineProperty({__proto__:null,boolean:mt,booleanish:ae,commaOrSpaceSeparated:Ve,commaSeparated:Zr,number:tt,overloadedBoolean:Mc,spaceSeparated:qt},Symbol.toStringTag,{value:"Module"})),Ws=Object.keys(Ac);class mf extends je{constructor(t,n,r,i){let a=-1;if(super(t,n),Ih(this,"space",i),typeof r=="number")for(;++a<Ws.length;){const s=Ws[a];Ih(this,Ws[a],(r&Ac[s])===Ac[s])}}}mf.prototype.defined=!0;function Ih(e,t,n){n&&(e[t]=n)}function di(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new mf(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ta(r)]=r,n[ta(a.attribute)]=r}return new ia(t,n,e.space)}const X0=di({properties:{ariaActiveDescendant:null,ariaAtomic:ae,ariaAutoComplete:null,ariaBusy:ae,ariaChecked:ae,ariaColCount:tt,ariaColIndex:tt,ariaColSpan:tt,ariaControls:qt,ariaCurrent:null,ariaDescribedBy:qt,ariaDetails:null,ariaDisabled:ae,ariaDropEffect:qt,ariaErrorMessage:null,ariaExpanded:ae,ariaFlowTo:qt,ariaGrabbed:ae,ariaHasPopup:null,ariaHidden:ae,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:qt,ariaLevel:tt,ariaLive:null,ariaModal:ae,ariaMultiLine:ae,ariaMultiSelectable:ae,ariaOrientation:null,ariaOwns:qt,ariaPlaceholder:null,ariaPosInSet:tt,ariaPressed:ae,ariaReadOnly:ae,ariaRelevant:null,ariaRequired:ae,ariaRoleDescription:qt,ariaRowCount:tt,ariaRowIndex:tt,ariaRowSpan:tt,ariaSelected:ae,ariaSetSize:tt,ariaSort:null,ariaValueMax:tt,ariaValueMin:tt,ariaValueNow:tt,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function K0(e,t){return t in e?e[t]:t}function V0(e,t){return K0(e,t.toLowerCase())}const sT=di({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Zr,acceptCharset:qt,accessKey:qt,action:null,allow:null,allowFullScreen:mt,allowPaymentRequest:mt,allowUserMedia:mt,alt:null,as:null,async:mt,autoCapitalize:null,autoComplete:qt,autoFocus:mt,autoPlay:mt,blocking:qt,capture:null,charSet:null,checked:mt,cite:null,className:qt,cols:tt,colSpan:null,content:null,contentEditable:ae,controls:mt,controlsList:qt,coords:tt|Zr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:mt,defer:mt,dir:null,dirName:null,disabled:mt,download:Mc,draggable:ae,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:mt,formTarget:null,headers:qt,height:tt,hidden:Mc,high:tt,href:null,hrefLang:null,htmlFor:qt,httpEquiv:qt,id:null,imageSizes:null,imageSrcSet:null,inert:mt,inputMode:null,integrity:null,is:null,isMap:mt,itemId:null,itemProp:qt,itemRef:qt,itemScope:mt,itemType:qt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:mt,low:tt,manifest:null,max:null,maxLength:tt,media:null,method:null,min:null,minLength:tt,multiple:mt,muted:mt,name:null,nonce:null,noModule:mt,noValidate:mt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:mt,optimum:tt,pattern:null,ping:qt,placeholder:null,playsInline:mt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:mt,referrerPolicy:null,rel:qt,required:mt,reversed:mt,rows:tt,rowSpan:tt,sandbox:qt,scope:null,scoped:mt,seamless:mt,selected:mt,shadowRootClonable:mt,shadowRootDelegatesFocus:mt,shadowRootMode:null,shape:null,size:tt,sizes:null,slot:null,span:tt,spellCheck:ae,src:null,srcDoc:null,srcLang:null,srcSet:null,start:tt,step:null,style:null,tabIndex:tt,target:null,title:null,translate:null,type:null,typeMustMatch:mt,useMap:null,value:ae,width:tt,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:qt,axis:null,background:null,bgColor:null,border:tt,borderColor:null,bottomMargin:tt,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:mt,declare:mt,event:null,face:null,frame:null,frameBorder:null,hSpace:tt,leftMargin:tt,link:null,longDesc:null,lowSrc:null,marginHeight:tt,marginWidth:tt,noResize:mt,noHref:mt,noShade:mt,noWrap:mt,object:null,profile:null,prompt:null,rev:null,rightMargin:tt,rules:null,scheme:null,scrolling:ae,standby:null,summary:null,text:null,topMargin:tt,valueType:null,version:null,vAlign:null,vLink:null,vSpace:tt,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:mt,disableRemotePlayback:mt,prefix:null,property:null,results:tt,security:null,unselectable:null},space:"html",transform:V0}),oT=di({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ve,accentHeight:tt,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:tt,amplitude:tt,arabicForm:null,ascent:tt,attributeName:null,attributeType:null,azimuth:tt,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:tt,by:null,calcMode:null,capHeight:tt,className:qt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:tt,diffuseConstant:tt,direction:null,display:null,dur:null,divisor:tt,dominantBaseline:null,download:mt,dx:null,dy:null,edgeMode:null,editable:null,elevation:tt,enableBackground:null,end:null,event:null,exponent:tt,externalResourcesRequired:null,fill:null,fillOpacity:tt,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Zr,g2:Zr,glyphName:Zr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:tt,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:tt,horizOriginX:tt,horizOriginY:tt,id:null,ideographic:tt,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:tt,k:tt,k1:tt,k2:tt,k3:tt,k4:tt,kernelMatrix:Ve,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:tt,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:tt,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:tt,overlineThickness:tt,paintOrder:null,panose1:null,path:null,pathLength:tt,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:qt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:tt,pointsAtY:tt,pointsAtZ:tt,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ve,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ve,rev:Ve,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ve,requiredFeatures:Ve,requiredFonts:Ve,requiredFormats:Ve,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:tt,specularExponent:tt,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:tt,strikethroughThickness:tt,string:null,stroke:null,strokeDashArray:Ve,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:tt,strokeOpacity:tt,strokeWidth:null,style:null,surfaceScale:tt,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ve,tabIndex:tt,tableValues:null,target:null,targetX:tt,targetY:tt,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ve,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:tt,underlineThickness:tt,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:tt,values:null,vAlphabetic:tt,vMathematical:tt,vectorEffect:null,vHanging:tt,vIdeographic:tt,version:null,vertAdvY:tt,vertOriginX:tt,vertOriginY:tt,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:tt,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:K0}),Z0=di({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Q0=di({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:V0}),J0=di({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),lT=/[A-Z]/g,zh=/-[a-z]/g,uT=/^data[-\w.:]+$/i;function ty(e,t){const n=ta(t);let r=t,i=je;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&uT.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(zh,fT);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!zh.test(a)){let s=a.replace(lT,cT);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=mf}return new i(r,t)}function cT(e){return"-"+e.toLowerCase()}function fT(e){return e.charAt(1).toUpperCase()}const ey=W0([X0,sT,Z0,Q0,J0],"html"),yf=W0([X0,oT,Z0,Q0,J0],"svg");function Bh(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const s=n.slice(i,r).trim();(s||!a)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function hT(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Uh=/[#.]/g;function pT(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){Uh.lastIndex=i;const o=Uh.exec(n),l=n.slice(i,o?o.index:n.length);l&&(a?a==="#"?r.id=l:Array.isArray(r.className)?r.className.push(l):r.className=[l]:s=l,i+=l.length),o&&(a=o[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function Hh(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function dT(e){return e.join(" ").trim()}function ny(e,t,n){const r=n?_T(n):void 0;function i(a,s,...o){let l;if(a==null){l={type:"root",children:[]};const u=s;o.unshift(u)}else{l=pT(a,t);const u=l.tagName.toLowerCase(),c=r?r.get(u):void 0;if(l.tagName=c||u,gT(s))o.unshift(s);else for(const[f,h]of Object.entries(s))mT(e,l.properties,f,h)}for(const u of o)kc(l.children,u);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return i}function gT(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const s of a)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function mT(e,t,n,r){const i=ty(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?i.spaceSeparated?a=Hh(r):i.commaSeparated?a=Bh(r):i.commaOrSpaceSeparated?a=Hh(Bh(r).join(" ")):a=jh(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?yT(r):String(r);if(Array.isArray(a)){const s=[];for(const o of a)s.push(jh(i,i.property,o));a=s}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function kc(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)kc(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?kc(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function jh(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||ta(n)===ta(t)))return!0}return n}function yT(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function _T(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const xT=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"];ny(ey,"div");const aa=ny(yf,"g",xT),ry=(e=aa)=>e("pattern",{id:"greyHatchPattern",x:0,y:0,width:8,height:8,patternUnits:"userSpaceOnUse"},[e("rect",{x:0,y:0,width:8,height:8,fill:pn.neoGrey[200]}),e("path",{d:"M0,2 L8,2",stroke:pn.neoGrey[400],"stroke-width":.5}),e("path",{d:"M0,6 L8,6",stroke:pn.neoGrey[400],"stroke-width":.5})]),iy=(e=aa)=>e("pattern",{id:"dataMissingHatchPattern",x:0,y:0,width:8,height:8,patternUnits:"userSpaceOnUse"},[e("rect",{x:0,y:0,width:8,height:8,fill:"#FFF3CC"}),e("path",{d:"M0,8 L8,0",stroke:"#FFB800","stroke-width":.5}),e("path",{d:"M-2,2 L2,-2",stroke:"#FFB800","stroke-width":.5}),e("path",{d:"M6,10 L10,6",stroke:"#FFB800","stroke-width":.5})]),ay=(e=aa)=>e("pattern",{id:"noLstHatchPattern",x:0,y:0,width:8,height:8,patternUnits:"userSpaceOnUse"},[e("rect",{x:0,y:0,width:8,height:8,fill:"#FFE5E5"}),e("path",{d:"M0,0 L8,8",stroke:"#ED4134","stroke-width":.5}),e("path",{d:"M-2,6 L2,10",stroke:"#ED4134","stroke-width":.5}),e("path",{d:"M6,-2 L10,2",stroke:"#ED4134","stroke-width":.5})]),Dt={greyHatch:{background:pn.neoGrey[200],lines:pn.neoGrey[400]},dataMissingHatch:{background:"#FFF3CC",lines:"#FFB800"},noLstHatch:{background:"#FFE5E5",lines:"#ED4134"}},vT=({categories:e,activeCategory:t,onCategoryHover:n,mode:r,visible:i=!0})=>E.jsx(q.Box,{className:"category-table",sx:{width:"100%",display:"flex",justifyContent:"center",opacity:i?1:0,transition:"opacity 0.3s ease-in-out","@media (min-width: 1024px) and (max-width: 1225px)":{overflowX:"auto",maxWidth:"100%"}},onMouseLeave:()=>n(null),children:E.jsxs(q.Table,{"aria-label":"Categories summary",className:"category-summary-table",size:"small",sx:{maxWidth:{xs:"clamp(360px, 90%, 400px)",sm:"clamp(360px, 90%, 400px)",md:"clamp(360px, 85%, 420px)",lg:"clamp(360px, 90%, 400px)"},"@media (min-width: 1024px) and (max-width: 1225px)":{maxWidth:"360px","& .MuiTableCell-root":{padding:"1px 4px",fontSize:"9.5px"}},"& .MuiTableCell-root":{padding:"2px 8px",borderBottom:"none",fontSize:"clamp(10px, 1.8vw, 11.5px)"}},children:[E.jsx("thead",{children:E.jsxs(q.TableRow,{children:[E.jsx(q.TableCell,{}),E.jsx(q.TableCell,{sx:{fontWeight:"bold"},children:"Category"}),r==="point-in-time"?E.jsxs(E.Fragment,{children:[E.jsx(q.TableCell,{align:"right",sx:{fontWeight:"bold"},children:"#"}),E.jsx(q.TableCell,{align:"right",sx:{fontWeight:"bold"},children:"%"})]}):E.jsxs(E.Fragment,{children:[E.jsx(q.TableCell,{align:"right",sx:{fontWeight:"bold"},children:"Last"}),E.jsx(q.TableCell,{align:"right",sx:{fontWeight:"bold"},children:"Max"}),E.jsx(q.TableCell,{align:"right",sx:{fontWeight:"bold"},children:"Min"})]})]})}),E.jsx("tbody",{children:e.map(a=>{const s=a.color==="url(#greyHatchPattern)"?Dt.greyHatch.lines:a.color==="url(#dataMissingHatchPattern)"?Dt.dataMissingHatch.lines:a.color==="url(#noLstHatchPattern)"?Dt.noLstHatch.lines:a.color;return E.jsxs(q.TableRow,{onMouseEnter:()=>n(a.id),sx:{cursor:"pointer",transition:"background-color 0.15s ease",backgroundColor:t===a.id?`${s}15`:"transparent","&:hover":{backgroundColor:`${s}15`}},children:[E.jsx(q.TableCell,{align:"center",sx:{width:20},children:E.jsx(q.Box,{sx:{width:r==="historical"?4:12,height:12,backgroundColor:a.color==="url(#greyHatchPattern)"?Dt.greyHatch.background:a.color==="url(#dataMissingHatchPattern)"?Dt.dataMissingHatch.background:a.color==="url(#noLstHatchPattern)"?Dt.noLstHatch.background:a.color,borderRadius:r==="historical"?2:"50%",position:"relative",overflow:"hidden",transition:"transform 0.15s ease",transform:t===a.id?"scale(1.2)":"scale(1)",...a.label==="N/A"&&{"&::after":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`repeating-linear-gradient(
15
+ */var kh,Zn,Kr,uf,yr,Ch,cf,bS=function(){return typeof window<"u"},jn={},gr=180/Math.PI,Vr=Math.PI/180,Ir=Math.atan2,Rh=1e8,ff=/([A-Z])/g,wS=/(left|right|width|margin|padding|x)/i,SS=/[\s,\(]\S/,Tn={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},xc=function(t,n){return n.set(n.t,n.p,Math.round((n.s+n.c*t)*1e4)/1e4+n.u,n)},TS=function(t,n){return n.set(n.t,n.p,t===1?n.e:Math.round((n.s+n.c*t)*1e4)/1e4+n.u,n)},MS=function(t,n){return n.set(n.t,n.p,t?Math.round((n.s+n.c*t)*1e4)/1e4+n.u:n.b,n)},AS=function(t,n){return n.set(n.t,n.p,t===1?n.e:t?Math.round((n.s+n.c*t)*1e4)/1e4+n.u:n.b,n)},kS=function(t,n){var r=n.s+n.c*t;n.set(n.t,n.p,~~(r+(r<0?-.5:.5))+n.u,n)},D0=function(t,n){return n.set(n.t,n.p,t?n.e:n.b,n)},O0=function(t,n){return n.set(n.t,n.p,t!==1?n.b:n.e,n)},CS=function(t,n,r){return t.style[n]=r},RS=function(t,n,r){return t.style.setProperty(n,r)},ES=function(t,n,r){return t._gsap[n]=r},DS=function(t,n,r){return t._gsap.scaleX=t._gsap.scaleY=r},OS=function(t,n,r,i,a){var s=t._gsap;s.scaleX=s.scaleY=r,s.renderTransform(a,s)},PS=function(t,n,r,i,a){var s=t._gsap;s[n]=r,s.renderTransform(a,s)},Gt="transform",Ue=Gt+"Origin",FS=function e(t,n){var r=this,i=this.target,a=i.style,s=i._gsap;if(t in jn&&a){if(this.tfm=this.tfm||{},t!=="transform")t=Tn[t]||t,~t.indexOf(",")?t.split(",").forEach(function(o){return r.tfm[o]=$n(i,o)}):this.tfm[t]=s.x?s[t]:$n(i,t),t===Ue&&(this.tfm.zOrigin=s.zOrigin);else return Tn.transform.split(",").forEach(function(o){return e.call(r,o,n)});if(this.props.indexOf(Gt)>=0)return;s.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(Ue,n,"")),t=Gt}(a||n)&&this.props.push(t,n,a[t])},P0=function(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))},$S=function(){var t=this.props,n=this.target,r=n.style,i=n._gsap,a,s;for(a=0;a<t.length;a+=3)t[a+1]?t[a+1]===2?n[t[a]](t[a+2]):n[t[a]]=t[a+2]:t[a+2]?r[t[a]]=t[a+2]:r.removeProperty(t[a].substr(0,2)==="--"?t[a]:t[a].replace(ff,"-$1").toLowerCase());if(this.tfm){for(s in this.tfm)i[s]=this.tfm[s];i.svg&&(i.renderTransform(),n.setAttribute("data-svg-origin",this.svgo||"")),a=cf(),(!a||!a.isStart)&&!r[Gt]&&(P0(r),i.zOrigin&&r[Ue]&&(r[Ue]+=" "+i.zOrigin+"px",i.zOrigin=0,i.renderTransform()),i.uncache=1)}},F0=function(t,n){var r={target:t,props:[],revert:$S,save:FS};return t._gsap||He.core.getCache(t),n&&t.style&&t.nodeType&&n.split(",").forEach(function(i){return r.save(i)}),r},$0,vc=function(t,n){var r=Zn.createElementNS?Zn.createElementNS((n||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Zn.createElement(t);return r&&r.style?r:Zn.createElement(t)},tn=function e(t,n,r){var i=getComputedStyle(t);return i[n]||i.getPropertyValue(n.replace(ff,"-$1").toLowerCase())||i.getPropertyValue(n)||!r&&e(t,fi(n)||n,1)||""},Eh="O,Moz,ms,Ms,Webkit".split(","),fi=function(t,n,r){var i=n||yr,a=i.style,s=5;if(t in a&&!r)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);s--&&!(Eh[s]+t in a););return s<0?null:(s===3?"ms":s>=0?Eh[s]:"")+t},bc=function(){bS()&&window.document&&(kh=window,Zn=kh.document,Kr=Zn.documentElement,yr=vc("div")||{style:{}},vc("div"),Gt=fi(Gt),Ue=Gt+"Origin",yr.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",$0=!!fi("perspective"),cf=He.core.reverting,uf=1)},Dh=function(t){var n=t.ownerSVGElement,r=vc("svg",n&&n.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=t.cloneNode(!0),a;i.style.display="block",r.appendChild(i),Kr.appendChild(r);try{a=i.getBBox()}catch{}return r.removeChild(i),Kr.removeChild(r),a},Oh=function(t,n){for(var r=n.length;r--;)if(t.hasAttribute(n[r]))return t.getAttribute(n[r])},L0=function(t){var n,r;try{n=t.getBBox()}catch{n=Dh(t),r=1}return n&&(n.width||n.height)||r||(n=Dh(t)),n&&!n.width&&!n.x&&!n.y?{x:+Oh(t,["x","cx","x1"])||0,y:+Oh(t,["y","cy","y1"])||0,width:0,height:0}:n},N0=function(t){return!!(t.getCTM&&(!t.parentNode||t.ownerSVGElement)&&L0(t))},rr=function(t,n){if(n){var r=t.style,i;n in jn&&n!==Ue&&(n=Gt),r.removeProperty?(i=n.substr(0,2),(i==="ms"||n.substr(0,6)==="webkit")&&(n="-"+n),r.removeProperty(i==="--"?n:n.replace(ff,"-$1").toLowerCase())):r.removeAttribute(n)}},Qn=function(t,n,r,i,a,s){var o=new Be(t._pt,n,r,0,1,s?O0:D0);return t._pt=o,o.b=i,o.e=a,t._props.push(r),o},Ph={deg:1,rad:1,turn:1},LS={grid:1,flex:1},ir=function e(t,n,r,i){var a=parseFloat(r)||0,s=(r+"").trim().substr((a+"").length)||"px",o=yr.style,l=wS.test(n),u=t.tagName.toLowerCase()==="svg",c=(u?"client":"offset")+(l?"Width":"Height"),f=100,h=i==="px",p=i==="%",g,d,m,x;if(i===s||!a||Ph[i]||Ph[s])return a;if(s!=="px"&&!h&&(a=e(t,n,r,"px")),x=t.getCTM&&N0(t),(p||s==="%")&&(jn[n]||~n.indexOf("adius")))return g=x?t.getBBox()[l?"width":"height"]:t[c],te(p?a/g*f:a/100*g);if(o[l?"width":"height"]=f+(h?s:i),d=i!=="rem"&&~n.indexOf("adius")||i==="em"&&t.appendChild&&!u?t:t.parentNode,x&&(d=(t.ownerSVGElement||{}).parentNode),(!d||d===Zn||!d.appendChild)&&(d=Zn.body),m=d._gsap,m&&p&&m.width&&l&&m.time===Qe.time&&!m.uncache)return te(a/m.width*f);if(p&&(n==="height"||n==="width")){var y=t.style[n];t.style[n]=f+i,g=t[c],y?t.style[n]=y:rr(t,n)}else(p||s==="%")&&!LS[tn(d,"display")]&&(o.position=tn(t,"position")),d===t&&(o.position="static"),d.appendChild(yr),g=yr[c],d.removeChild(yr),o.position="absolute";return l&&p&&(m=vr(d),m.time=Qe.time,m.width=d[c]),te(h?g*a/f:g&&a?f/g*a:0)},$n=function(t,n,r,i){var a;return uf||bc(),n in Tn&&n!=="transform"&&(n=Tn[n],~n.indexOf(",")&&(n=n.split(",")[0])),jn[n]&&n!=="transform"?(a=Ji(t,i),a=n!=="transformOrigin"?a[n]:a.svg?a.origin:Za(tn(t,Ue))+" "+a.zOrigin+"px"):(a=t.style[n],(!a||a==="auto"||i||~(a+"").indexOf("calc("))&&(a=Va[n]&&Va[n](t,n,r)||tn(t,n)||Jm(t,n)||(n==="opacity"?1:0))),r&&!~(a+"").trim().indexOf(" ")?ir(t,n,a,r)+r:a},NS=function(t,n,r,i){if(!r||r==="none"){var a=fi(n,t,1),s=a&&tn(t,a,1);s&&s!==r?(n=a,r=s):n==="borderColor"&&(r=tn(t,"borderTopColor"))}var o=new Be(this._pt,t.style,n,0,1,C0),l=0,u=0,c,f,h,p,g,d,m,x,y,v,_,S;if(o.b=r,o.e=i,r+="",i+="",i.substring(0,6)==="var(--"&&(i=tn(t,i.substring(4,i.indexOf(")")))),i==="auto"&&(d=t.style[n],t.style[n]=i,i=tn(t,n)||i,d?t.style[n]=d:rr(t,n)),c=[r,i],_0(c),r=c[0],i=c[1],h=r.match(jr)||[],S=i.match(jr)||[],S.length){for(;f=jr.exec(i);)m=f[0],y=i.substring(l,f.index),g?g=(g+1)%5:(y.substr(-5)==="rgba("||y.substr(-5)==="hsla(")&&(g=1),m!==(d=h[u++]||"")&&(p=parseFloat(d)||0,_=d.substr((p+"").length),m.charAt(1)==="="&&(m=Xr(p,m)+_),x=parseFloat(m),v=m.substr((x+"").length),l=jr.lastIndex-v.length,v||(v=v||en.units[n]||_,l===i.length&&(i+=v,o.e+=v)),_!==v&&(p=ir(t,n,d,v)||0),o._pt={_next:o._pt,p:y||u===1?y:",",s:p,c:x-p,m:g&&g<4||n==="zIndex"?Math.round:0});o.c=l<i.length?i.substring(l,i.length):""}else o.r=n==="display"&&i==="none"?O0:D0;return Xm.test(i)&&(o.e=0),this._pt=o,o},Fh={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},qS=function(t){var n=t.split(" "),r=n[0],i=n[1]||"50%";return(r==="top"||r==="bottom"||i==="left"||i==="right")&&(t=r,r=i,i=t),n[0]=Fh[r]||r,n[1]=Fh[i]||i,n.join(" ")},IS=function(t,n){if(n.tween&&n.tween._time===n.tween._dur){var r=n.t,i=r.style,a=n.u,s=r._gsap,o,l,u;if(a==="all"||a===!0)i.cssText="",l=1;else for(a=a.split(","),u=a.length;--u>-1;)o=a[u],jn[o]&&(l=1,o=o==="transformOrigin"?Ue:Gt),rr(r,o);l&&(rr(r,Gt),s&&(s.svg&&r.removeAttribute("transform"),i.scale=i.rotate=i.translate="none",Ji(r,1),s.uncache=1,P0(i)))}},Va={clearProps:function(t,n,r,i,a){if(a.data!=="isFromStart"){var s=t._pt=new Be(t._pt,n,r,0,0,IS);return s.u=i,s.pr=-10,s.tween=a,t._props.push(r),1}}},Qi=[1,0,0,1,0,0],q0={},I0=function(t){return t==="matrix(1, 0, 0, 1, 0, 0)"||t==="none"||!t},$h=function(t){var n=tn(t,Gt);return I0(n)?Qi:n.substr(7).match(Wm).map(te)},hf=function(t,n){var r=t._gsap||vr(t),i=t.style,a=$h(t),s,o,l,u;return r.svg&&t.getAttribute("transform")?(l=t.transform.baseVal.consolidate().matrix,a=[l.a,l.b,l.c,l.d,l.e,l.f],a.join(",")==="1,0,0,1,0,0"?Qi:a):(a===Qi&&!t.offsetParent&&t!==Kr&&!r.svg&&(l=i.display,i.display="block",s=t.parentNode,(!s||!t.offsetParent&&!t.getBoundingClientRect().width)&&(u=1,o=t.nextElementSibling,Kr.appendChild(t)),a=$h(t),l?i.display=l:rr(t,"display"),u&&(o?s.insertBefore(t,o):s?s.appendChild(t):Kr.removeChild(t))),n&&a.length>6?[a[0],a[1],a[4],a[5],a[12],a[13]]:a)},wc=function(t,n,r,i,a,s){var o=t._gsap,l=a||hf(t,!0),u=o.xOrigin||0,c=o.yOrigin||0,f=o.xOffset||0,h=o.yOffset||0,p=l[0],g=l[1],d=l[2],m=l[3],x=l[4],y=l[5],v=n.split(" "),_=parseFloat(v[0])||0,S=parseFloat(v[1])||0,w,b,M,A;r?l!==Qi&&(b=p*m-g*d)&&(M=_*(m/b)+S*(-d/b)+(d*y-m*x)/b,A=_*(-g/b)+S*(p/b)-(p*y-g*x)/b,_=M,S=A):(w=L0(t),_=w.x+(~v[0].indexOf("%")?_/100*w.width:_),S=w.y+(~(v[1]||v[0]).indexOf("%")?S/100*w.height:S)),i||i!==!1&&o.smooth?(x=_-u,y=S-c,o.xOffset=f+(x*p+y*d)-x,o.yOffset=h+(x*g+y*m)-y):o.xOffset=o.yOffset=0,o.xOrigin=_,o.yOrigin=S,o.smooth=!!i,o.origin=n,o.originIsAbsolute=!!r,t.style[Ue]="0px 0px",s&&(Qn(s,o,"xOrigin",u,_),Qn(s,o,"yOrigin",c,S),Qn(s,o,"xOffset",f,o.xOffset),Qn(s,o,"yOffset",h,o.yOffset)),t.setAttribute("data-svg-origin",_+" "+S)},Ji=function(t,n){var r=t._gsap||new w0(t);if("x"in r&&!n&&!r.uncache)return r;var i=t.style,a=r.scaleX<0,s="px",o="deg",l=getComputedStyle(t),u=tn(t,Ue)||"0",c,f,h,p,g,d,m,x,y,v,_,S,w,b,M,A,k,C,O,P,F,B,L,$,Y,I,et,K,J,st,lt,N;return c=f=h=d=m=x=y=v=_=0,p=g=1,r.svg=!!(t.getCTM&&N0(t)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(i[Gt]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[Gt]!=="none"?l[Gt]:"")),i.scale=i.rotate=i.translate="none"),b=hf(t,r.svg),r.svg&&(r.uncache?(Y=t.getBBox(),u=r.xOrigin-Y.x+"px "+(r.yOrigin-Y.y)+"px",$=""):$=!n&&t.getAttribute("data-svg-origin"),wc(t,$||u,!!$||r.originIsAbsolute,r.smooth!==!1,b)),S=r.xOrigin||0,w=r.yOrigin||0,b!==Qi&&(C=b[0],O=b[1],P=b[2],F=b[3],c=B=b[4],f=L=b[5],b.length===6?(p=Math.sqrt(C*C+O*O),g=Math.sqrt(F*F+P*P),d=C||O?Ir(O,C)*gr:0,y=P||F?Ir(P,F)*gr+d:0,y&&(g*=Math.abs(Math.cos(y*Vr))),r.svg&&(c-=S-(S*C+w*P),f-=w-(S*O+w*F))):(N=b[6],st=b[7],et=b[8],K=b[9],J=b[10],lt=b[11],c=b[12],f=b[13],h=b[14],M=Ir(N,J),m=M*gr,M&&(A=Math.cos(-M),k=Math.sin(-M),$=B*A+et*k,Y=L*A+K*k,I=N*A+J*k,et=B*-k+et*A,K=L*-k+K*A,J=N*-k+J*A,lt=st*-k+lt*A,B=$,L=Y,N=I),M=Ir(-P,J),x=M*gr,M&&(A=Math.cos(-M),k=Math.sin(-M),$=C*A-et*k,Y=O*A-K*k,I=P*A-J*k,lt=F*k+lt*A,C=$,O=Y,P=I),M=Ir(O,C),d=M*gr,M&&(A=Math.cos(M),k=Math.sin(M),$=C*A+O*k,Y=B*A+L*k,O=O*A-C*k,L=L*A-B*k,C=$,B=Y),m&&Math.abs(m)+Math.abs(d)>359.9&&(m=d=0,x=180-x),p=te(Math.sqrt(C*C+O*O+P*P)),g=te(Math.sqrt(L*L+N*N)),M=Ir(B,L),y=Math.abs(M)>2e-4?M*gr:0,_=lt?1/(lt<0?-lt:lt):0),r.svg&&($=t.getAttribute("transform"),r.forceCSS=t.setAttribute("transform","")||!I0(tn(t,Gt)),$&&t.setAttribute("transform",$))),Math.abs(y)>90&&Math.abs(y)<270&&(a?(p*=-1,y+=d<=0?180:-180,d+=d<=0?180:-180):(g*=-1,y+=y<=0?180:-180)),n=n||r.uncache,r.x=c-((r.xPercent=c&&(!n&&r.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-c)?-50:0)))?t.offsetWidth*r.xPercent/100:0)+s,r.y=f-((r.yPercent=f&&(!n&&r.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-f)?-50:0)))?t.offsetHeight*r.yPercent/100:0)+s,r.z=h+s,r.scaleX=te(p),r.scaleY=te(g),r.rotation=te(d)+o,r.rotationX=te(m)+o,r.rotationY=te(x)+o,r.skewX=y+o,r.skewY=v+o,r.transformPerspective=_+s,(r.zOrigin=parseFloat(u.split(" ")[2])||!n&&r.zOrigin||0)&&(i[Ue]=Za(u)),r.xOffset=r.yOffset=0,r.force3D=en.force3D,r.renderTransform=r.svg?BS:$0?z0:zS,r.uncache=0,r},Za=function(t){return(t=t.split(" "))[0]+" "+t[1]},js=function(t,n,r){var i=ke(n);return te(parseFloat(n)+parseFloat(ir(t,"x",r+"px",i)))+i},zS=function(t,n){n.z="0px",n.rotationY=n.rotationX="0deg",n.force3D=0,z0(t,n)},hr="0deg",wi="0px",pr=") ",z0=function(t,n){var r=n||this,i=r.xPercent,a=r.yPercent,s=r.x,o=r.y,l=r.z,u=r.rotation,c=r.rotationY,f=r.rotationX,h=r.skewX,p=r.skewY,g=r.scaleX,d=r.scaleY,m=r.transformPerspective,x=r.force3D,y=r.target,v=r.zOrigin,_="",S=x==="auto"&&t&&t!==1||x===!0;if(v&&(f!==hr||c!==hr)){var w=parseFloat(c)*Vr,b=Math.sin(w),M=Math.cos(w),A;w=parseFloat(f)*Vr,A=Math.cos(w),s=js(y,s,b*A*-v),o=js(y,o,-Math.sin(w)*-v),l=js(y,l,M*A*-v+v)}m!==wi&&(_+="perspective("+m+pr),(i||a)&&(_+="translate("+i+"%, "+a+"%) "),(S||s!==wi||o!==wi||l!==wi)&&(_+=l!==wi||S?"translate3d("+s+", "+o+", "+l+") ":"translate("+s+", "+o+pr),u!==hr&&(_+="rotate("+u+pr),c!==hr&&(_+="rotateY("+c+pr),f!==hr&&(_+="rotateX("+f+pr),(h!==hr||p!==hr)&&(_+="skew("+h+", "+p+pr),(g!==1||d!==1)&&(_+="scale("+g+", "+d+pr),y.style[Gt]=_||"translate(0, 0)"},BS=function(t,n){var r=n||this,i=r.xPercent,a=r.yPercent,s=r.x,o=r.y,l=r.rotation,u=r.skewX,c=r.skewY,f=r.scaleX,h=r.scaleY,p=r.target,g=r.xOrigin,d=r.yOrigin,m=r.xOffset,x=r.yOffset,y=r.forceCSS,v=parseFloat(s),_=parseFloat(o),S,w,b,M,A;l=parseFloat(l),u=parseFloat(u),c=parseFloat(c),c&&(c=parseFloat(c),u+=c,l+=c),l||u?(l*=Vr,u*=Vr,S=Math.cos(l)*f,w=Math.sin(l)*f,b=Math.sin(l-u)*-h,M=Math.cos(l-u)*h,u&&(c*=Vr,A=Math.tan(u-c),A=Math.sqrt(1+A*A),b*=A,M*=A,c&&(A=Math.tan(c),A=Math.sqrt(1+A*A),S*=A,w*=A)),S=te(S),w=te(w),b=te(b),M=te(M)):(S=f,M=h,w=b=0),(v&&!~(s+"").indexOf("px")||_&&!~(o+"").indexOf("px"))&&(v=ir(p,"x",s,"px"),_=ir(p,"y",o,"px")),(g||d||m||x)&&(v=te(v+g-(g*S+d*b)+m),_=te(_+d-(g*w+d*M)+x)),(i||a)&&(A=p.getBBox(),v=te(v+i/100*A.width),_=te(_+a/100*A.height)),A="matrix("+S+","+w+","+b+","+M+","+v+","+_+")",p.setAttribute("transform",A),y&&(p.style[Gt]=A)},US=function(t,n,r,i,a){var s=360,o=pe(a),l=parseFloat(a)*(o&&~a.indexOf("rad")?gr:1),u=l-i,c=i+u+"deg",f,h;return o&&(f=a.split("_")[1],f==="short"&&(u%=s,u!==u%(s/2)&&(u+=u<0?s:-s)),f==="cw"&&u<0?u=(u+s*Rh)%s-~~(u/s)*s:f==="ccw"&&u>0&&(u=(u-s*Rh)%s-~~(u/s)*s)),t._pt=h=new Be(t._pt,n,r,i,u,TS),h.e=c,h.u="deg",t._props.push(r),h},Lh=function(t,n){for(var r in n)t[r]=n[r];return t},HS=function(t,n,r){var i=Lh({},r._gsap),a="perspective,force3D,transformOrigin,svgOrigin",s=r.style,o,l,u,c,f,h,p,g;i.svg?(u=r.getAttribute("transform"),r.setAttribute("transform",""),s[Gt]=n,o=Ji(r,1),rr(r,Gt),r.setAttribute("transform",u)):(u=getComputedStyle(r)[Gt],s[Gt]=n,o=Ji(r,1),s[Gt]=u);for(l in jn)u=i[l],c=o[l],u!==c&&a.indexOf(l)<0&&(p=ke(u),g=ke(c),f=p!==g?ir(r,l,u,g):parseFloat(u),h=parseFloat(c),t._pt=new Be(t._pt,o,l,f,h-f,xc),t._pt.u=g||0,t._props.push(l));Lh(o,i)};ze("padding,margin,Width,Radius",function(e,t){var n="Top",r="Right",i="Bottom",a="Left",s=(t<3?[n,r,i,a]:[n+a,n+r,i+r,i+a]).map(function(o){return t<2?e+o:"border"+o+e});Va[t>1?"border"+e:e]=function(o,l,u,c,f){var h,p;if(arguments.length<4)return h=s.map(function(g){return $n(o,g,u)}),p=h.join(" "),p.split(h[0]).length===5?h[0]:p;h=(c+"").split(" "),p={},s.forEach(function(g,d){return p[g]=h[d]=h[d]||h[(d-1)/2|0]}),o.init(l,p,f)}});var B0={name:"css",register:bc,targetTest:function(t){return t.style&&t.nodeType},init:function(t,n,r,i,a){var s=this._props,o=t.style,l=r.vars.startAt,u,c,f,h,p,g,d,m,x,y,v,_,S,w,b,M,A;uf||bc(),this.styles=this.styles||F0(t),M=this.styles.props,this.tween=r;for(d in n)if(d!=="autoRound"&&(c=n[d],!(Ze[d]&&S0(d,n,r,i,t,a)))){if(p=typeof c,g=Va[d],p==="function"&&(c=c.call(r,i,t,a),p=typeof c),p==="string"&&~c.indexOf("random(")&&(c=Ki(c)),g)g(this,t,d,c,r)&&(b=1);else if(d.substr(0,2)==="--")u=(getComputedStyle(t).getPropertyValue(d)+"").trim(),c+="",tr.lastIndex=0,tr.test(u)||(m=ke(u),x=ke(c),x?m!==x&&(u=ir(t,d,u,x)+x):m&&(c+=m)),this.add(o,"setProperty",u,c,i,a,0,0,d),s.push(d),M.push(d,0,o[d]);else if(p!=="undefined"){if(l&&d in l?(u=typeof l[d]=="function"?l[d].call(r,i,t,a):l[d],pe(u)&&~u.indexOf("random(")&&(u=Ki(u)),ke(u+"")||u==="auto"||(u+=en.units[d]||ke($n(t,d))||""),(u+"").charAt(1)==="="&&(u=$n(t,d))):u=$n(t,d),h=parseFloat(u),y=p==="string"&&c.charAt(1)==="="&&c.substr(0,2),y&&(c=c.substr(2)),f=parseFloat(c),d in Tn&&(d==="autoAlpha"&&(h===1&&$n(t,"visibility")==="hidden"&&f&&(h=0),M.push("visibility",0,o.visibility),Qn(this,o,"visibility",h?"inherit":"hidden",f?"inherit":"hidden",!f)),d!=="scale"&&d!=="transform"&&(d=Tn[d],~d.indexOf(",")&&(d=d.split(",")[0]))),v=d in jn,v){if(this.styles.save(d),A=c,p==="string"&&c.substring(0,6)==="var(--"){if(c=tn(t,c.substring(4,c.indexOf(")"))),c.substring(0,5)==="calc("){var k=t.style.perspective;t.style.perspective=c,c=tn(t,"perspective"),k?t.style.perspective=k:rr(t,"perspective")}f=parseFloat(c)}if(_||(S=t._gsap,S.renderTransform&&!n.parseTransform||Ji(t,n.parseTransform),w=n.smoothOrigin!==!1&&S.smooth,_=this._pt=new Be(this._pt,o,Gt,0,1,S.renderTransform,S,0,-1),_.dep=1),d==="scale")this._pt=new Be(this._pt,S,"scaleY",S.scaleY,(y?Xr(S.scaleY,y+f):f)-S.scaleY||0,xc),this._pt.u=0,s.push("scaleY",d),d+="X";else if(d==="transformOrigin"){M.push(Ue,0,o[Ue]),c=qS(c),S.svg?wc(t,c,0,w,0,this):(x=parseFloat(c.split(" ")[2])||0,x!==S.zOrigin&&Qn(this,S,"zOrigin",S.zOrigin,x),Qn(this,o,d,Za(u),Za(c)));continue}else if(d==="svgOrigin"){wc(t,c,1,w,0,this);continue}else if(d in q0){US(this,S,d,h,y?Xr(h,y+c):c);continue}else if(d==="smoothOrigin"){Qn(this,S,"smooth",S.smooth,c);continue}else if(d==="force3D"){S[d]=c;continue}else if(d==="transform"){HS(this,c,t);continue}}else d in o||(d=fi(d)||d);if(v||(f||f===0)&&(h||h===0)&&!SS.test(c)&&d in o)m=(u+"").substr((h+"").length),f||(f=0),x=ke(c)||(d in en.units?en.units[d]:m),m!==x&&(h=ir(t,d,u,x)),this._pt=new Be(this._pt,v?S:o,d,h,(y?Xr(h,y+f):f)-h,!v&&(x==="px"||d==="zIndex")&&n.autoRound!==!1?kS:xc),this._pt.u=x||0,v&&A!==c?(this._pt.b=u,this._pt.e=A,this._pt.r=AS):m!==x&&x!=="%"&&(this._pt.b=u,this._pt.r=MS);else if(d in o)NS.call(this,t,d,u,y?y+c:c);else if(d in t)this.add(t,d,u||t[d],y?y+c:c,i,a);else if(d!=="parseTransform"){Qc(d,c);continue}v||(d in o?M.push(d,0,o[d]):typeof t[d]=="function"?M.push(d,2,t[d]()):M.push(d,1,u||t[d])),s.push(d)}}b&&R0(this)},render:function(t,n){if(n.tween._time||!cf())for(var r=n._pt;r;)r.r(t,r.d),r=r._next;else n.styles.revert()},get:$n,aliases:Tn,getSetter:function(t,n,r){var i=Tn[n];return i&&i.indexOf(",")<0&&(n=i),n in jn&&n!==Ue&&(t._gsap.x||$n(t,"x"))?r&&Ch===r?n==="scale"?DS:ES:(Ch=r||{})&&(n==="scale"?OS:PS):t.style&&!Kc(t.style[n])?CS:~n.indexOf("-")?RS:of(t,n)},core:{_removeProperty:rr,_getMatrix:hf}};He.utils.checkPrefix=fi;He.core.getStyleSaver=F0;(function(e,t,n,r){var i=ze(e+","+t+","+n,function(a){jn[a]=1});ze(t,function(a){en.units[a]="deg",q0[a]=1}),Tn[i[13]]=e+","+t,ze(r,function(a){var s=a.split(":");Tn[s[1]]=i[s[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");ze("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(e){en.units[e]="px"});He.registerPlugin(B0);var Sc=He.registerPlugin(B0)||He;Sc.core.Tween;const zr={IN_OUT:"power2.inOut",OUT:"power2.out"},Si={NO_STAGGER:0,RIPPLE_STAGGER_DELAY:.05};class U0{constructor(t,n={}){yi(this,"timeline");yi(this,"currentStage","");yi(this,"callbacks");yi(this,"durations");this.durations=t,this.callbacks=n,this.timeline=Sc.timeline({paused:!0,onUpdate:()=>this.handleProgress(),onComplete:()=>{var i,a,s,o;(a=(i=this.callbacks).onComplete)==null||a.call(i),(o=(s=this.callbacks).onStageComplete)==null||o.call(s,"complete")}});let r=0;this.timeline.addLabel("seatsToRings",r),r+=t.seatsToRings/1e3,this.timeline.addLabel("ringsToBar",r),r+=t.ringsToBar/1e3,this.timeline.addLabel("axesReveal",r),r+=t.axesReveal/1e3,this.timeline.addLabel("barSlide",r),r+=t.barSlide/1e3,this.timeline.addLabel("barsGrow",r),r+=t.barsGrow/1e3,this.timeline.addLabel("barsToArea",r)}animateSeatsToRings(t,n){const r=this.durations.seatsToRings/1e3;return t.each(function(){const i=this;if(!i.getAttribute("data-orig-x")){const a=i.getAttribute("x"),s=i.getAttribute("y"),o=i.getAttribute("width"),l=i.getAttribute("height");i.setAttribute("data-orig-x",a||"0"),i.setAttribute("data-orig-y",s||"0"),i.setAttribute("data-orig-width",o||"0"),i.setAttribute("data-orig-height",l||"0")}}),this.timeline.to(t.nodes(),{width:2,y:(i,a)=>parseFloat(a.getAttribute("y")||"0"),height:(i,a)=>{const s=parseFloat(a.getAttribute("y")||"0");return n-s},duration:r,ease:zr.IN_OUT,stagger:Si.NO_STAGGER,onStart:()=>{var i,a;this.currentStage="seatsToRings",(a=(i=this.callbacks).onStageComplete)==null||a.call(i,"seatsToRings")}},"seatsToRings"),this}animateRingsToBar(t,n){const r=this.durations.ringsToBar/1e3;return t.each(function(i,a){const s=this;if(!n[a])return;const l=s.getAttribute("x"),u=s.getAttribute("y"),c=s.getAttribute("width"),f=s.getAttribute("height");s.setAttribute("data-orig-x",l||"0"),s.setAttribute("data-orig-y",u||"0"),s.setAttribute("data-orig-width",c||"0"),s.setAttribute("data-orig-height",f||"0")}),this.timeline.to(t.nodes(),{x:i=>{var a;return((a=n[i])==null?void 0:a.x)??0},y:i=>{var a;return((a=n[i])==null?void 0:a.y)??0},width:i=>{var a;return((a=n[i])==null?void 0:a.width)??0},height:i=>{var a;return((a=n[i])==null?void 0:a.height)??0},duration:r,ease:zr.IN_OUT,stagger:Si.NO_STAGGER,onStart:()=>{var i,a;this.currentStage="ringsToBar",(a=(i=this.callbacks).onStageComplete)==null||a.call(i,"ringsToBar")}},"ringsToBar"),this}animateAxesReveal(t,n){const r=this.durations.axesReveal/1e3;return this.timeline.to([t.node(),n.node()],{opacity:1,duration:r,ease:zr.IN_OUT,stagger:Si.NO_STAGGER,onStart:()=>{var i,a;this.currentStage="axesReveal",(a=(i=this.callbacks).onStageComplete)==null||a.call(i,"axesReveal")}},"axesReveal"),this}animateBarSlide(t,n){const r=this.durations.barSlide/1e3;return this.timeline.to(t.nodes(),{x:n,duration:r,ease:zr.OUT,stagger:Si.NO_STAGGER,onStart:()=>{var i,a;this.currentStage="barSlide",(a=(i=this.callbacks).onStageComplete)==null||a.call(i,"barSlide")}},"barSlide"),this}animateBarsGrow(t,n,r=Si.RIPPLE_STAGGER_DELAY){const i=this.durations.barsGrow/1e3;return t.nodes().forEach((s,o)=>{const l=s,u=l.getAttribute("data-final-y")||"0",c=l.getAttribute("data-final-height")||"0",f=parseInt(l.getAttribute("data-timestamp-index")||"0"),p=Math.abs(f-n)*r;this.timeline.fromTo(l,{height:0,y:parseFloat(l.getAttribute("data-chart-baseline")||"400")},{y:parseFloat(u),height:parseFloat(c),duration:i,delay:p,ease:zr.OUT},"barsGrow")}),this.timeline.call(()=>{var s,o;this.currentStage="barsGrow",(o=(s=this.callbacks).onStageComplete)==null||o.call(s,"barsGrow")},[],"barsGrow"),this}animateBarsToArea(t,n,r,i){const a=this.durations.barsToArea/1e3,s=new Map;return t.each(function(){var c;const o=this,l=o.getAttribute("class");if(!l)return;const u=l.match(/category-([\w-]+)/);if(u&&u[1]){const f=u[1];s.has(f)||s.set(f,[]),(c=s.get(f))==null||c.push(o)}}),this.timeline.set(t.nodes(),{opacity:0},"barsToArea"),this.timeline.set(n.nodes(),{opacity:1},"barsToArea"),n.each(function(){const o=this,l=o.getAttribute("data-category");if(!l)return;const u=r.get(l);u&&Sc.to(o,{attr:{d:u},duration:a,ease:zr.IN_OUT})}),this.timeline.call(()=>{var o,l;this.currentStage="barsToArea",(l=(o=this.callbacks).onStageComplete)==null||l.call(o,"barsToArea")},[],"barsToArea"),this}handleProgress(){var n,r;const t=this.timeline.progress();(r=(n=this.callbacks).onProgress)==null||r.call(n,t)}getControls(){return{play:()=>this.timeline.play(),pause:()=>this.timeline.pause(),reverse:()=>this.timeline.reverse(),restart:()=>this.timeline.restart(),seek:t=>this.timeline.progress(t),seekToStage:t=>{const n=this.timeline.labels[t];n!==void 0&&this.timeline.seek(n)},kill:()=>this.timeline.kill(),getProgress:()=>this.timeline.progress(),getCurrentStage:()=>this.currentStage,getTimeline:()=>this.timeline}}play(){this.timeline.play()}destroy(){this.timeline.kill()}}function jS(e,t){const{arcAngle:n,arcAngleFlexibility:r=5,radius:i,seatSize:a,minSeatSize:s,maxSeatSize:o,spacing:l,innerRadiusRatio:u}=t,c=i*u,f=e.reduce((O,P)=>O+P.seats,0);let h={seatSize:a,arcAngle:n,score:-1};const p=n-r,g=n+r;for(let O=p;O<=g;O+=2.5){const P=O*Math.PI/180;for(let F=o;F>=s;F-=.1){const B=F*2,L=B*l,$=Math.floor((i-c)/L);for(let Y=1;Y<=Math.min($,10);Y++){let I=0;for(let et=0;et<Y;et++){const K=c+(et+.5)*L,J=B*l/K,st=Math.floor(P/J);I+=st}if(I>=f){const et=f/I,K=(F-s)/(o-s),J=(I-f)/f,st=J<.15?1:J<.3?.7:J<.5?.4:.1,lt=1-Math.abs(O-n)/r,N=st*.5+K*.3+et*.15+lt*.05;N>h.score&&(h={seatSize:F,arcAngle:O,rings:Y,score:N})}}}}const d=h.seatSize,m=h.arcAngle,x=m*Math.PI/180,y=d*2,v=y*l,_=Math.floor((i-c)/v),S=[],w=-x/2-Math.PI/2,b=[];let M=0,A=[];for(let O=1;O<=_;O++){let P=0;const F=[];for(let B=0;B<O;B++){const L=c+(B+.5)*v,$=y*l/L,Y=Math.floor(x/$);F.push(Y),P+=Y}if(P>=f){M=O,A=F;break}}if(M>0)b.push(...A);else for(let O=0;O<_;O++){const P=c+(O+.5)*v,F=y*l/P,B=Math.floor(x/F);b.push(B)}for(let O=0;O<b.length;O++){const P=c+(O+.5)*v,F=b[O]??0;if(F>0){const B=x/F;for(let L=0;L<F;L++){const $=w+(L+.5)*B,Y=Math.cos($)*P,I=Math.sin($)*P;S.push({ring:O,index:L,angle:$,x:Y,y:I})}}}S.sort((O,P)=>{const F=O.angle-P.angle;return Math.abs(F)>.001?F:O.ring-P.ring});const k=[];let C=0;return e.forEach((O,P)=>{const F=Math.min(O.seats,S.length-C);for(let B=0;B<F&&C<S.length;B++){const L=S[C++];L&&k.push({x:L.x,y:L.y,category:O.name,categoryIndex:P,seatIndex:B,ring:L.ring,angle:L.angle,radius:d})}}),{arcAngle:m,radius:i,innerRadius:c,centerX:i,centerY:i,seatSize:d,seats:k,totalSeats:f}}function GS(e,t,n){const r=t<=n?1:n/t;return e.filter(i=>i.value>0).map(i=>{const a=t<=n?i.value:Math.max(1,Math.floor(i.value*r));return{id:i.dataKey,name:i.label,seats:a,colour:i.color}})}function Qa({svg:e,events:t,xScale:n,chartHeight:r,chartWidth:i,timelineHeight:a,timelineOffset:s,instanceId:o,setHoveredTimelineEvent:l,enableBrush:u=!1,onTimeRangeChange:c,minAllowedTime:f,maxAllowedTime:h,brushColor:p="#69b3a2",mainGroupSelector:g}){const d=r+s,m=o?`.main-chart-group-${o}`:".main-chart-group",x=e.select(g??m),y=o?`timeline-track timeline-track-${o}`:"timeline-track",v=x.append("g").attr("class",y),_=6,S=o?`timeline-clip-${o}`:`timeline-clip-${Math.random().toString(36).substr(2,9)}`;e.append("defs").append("clipPath").attr("id",S).append("rect").attr("x",0).attr("y",d).attr("width",i+_).attr("height",a),v.append("rect").attr("class","timeline-background").attr("x",0).attr("y",d).attr("width",i).attr("height",a).attr("fill","#FFFFFF").attr("stroke","#9CA3AF").attr("stroke-width",1);const w=v.append("g").attr("clip-path",`url(#${S})`),b=3,M=w.selectAll(".timeline-event").data(t).enter().append("rect").attr("class","timeline-event").attr("x",k=>n(new Date(k.timestamp))-b/2).attr("y",d).attr("width",b).attr("height",a).attr("fill",k=>k.color||"#2F42FF").attr("stroke","none").attr("cursor","pointer").attr("data-timestamp",k=>k.timestamp).attr("data-event-name",k=>k.eventName),A=6;if(M.on("mouseenter",function(k,C){const O=Ot(this),P=n(new Date(C.timestamp));O.transition().duration(150).attr("x",P-A/2).attr("width",A),l&&l({timestamp:C.timestamp,eventName:C.eventName,x:P})}).on("mouseleave",function(k,C){const O=Ot(this),P=n(new Date(C.timestamp));O.transition().duration(150).attr("x",P-b/2).attr("width",b),l&&l(null)}),u&&c){const k=f,C=h,O=pi().extent([[0,d],[i,d+a]]).on("start",B=>{if(!B.selection&&k!==void 0&&C!==void 0){const L=B.sourceEvent;if(L){const $=L.offsetX,Y=+n.invert($);if(Y<k||Y>C){const I=o?`.timeline-brush-${o}`:".timeline-brush";e.select(I).call(O.move,null);return}}}}).on("brush",B=>{if(!B.selection)return;const[L,$]=B.selection;let Y=+n.invert(L),I=+n.invert($);k!==void 0&&(Y=Math.max(Y,k),I=Math.max(I,k)),C!==void 0&&(Y=Math.min(Y,C),I=Math.min(I,C));const et=n(new Date(Y)),K=n(new Date(I));if(et!==L||K!==$){const J=o?`.timeline-brush-${o}`:".timeline-brush";e.select(J).call(O.move,[et,K])}}).on("end",B=>{if(!B.selection)return;const[L,$]=B.selection,Y=[+n.invert(L),+n.invert($)];k!==void 0&&(Y[0]=Math.max(Y[0],k)),C!==void 0&&(Y[1]=Math.min(Y[1],C)),c(Y);const I=o?`.timeline-brush-${o}`:".timeline-brush";e.select(I).call(O.move,null)}),P=o?`timeline-brush timeline-brush-${o}`:"timeline-brush",F=x.append("g").attr("class",P).call(O);F.selectAll(".selection").attr("fill",p).attr("fill-opacity",.2).attr("stroke",p).attr("stroke-width",1),F.selectAll(".handle").attr("fill",p).attr("fill-opacity",.8),F.select(".overlay").style("cursor","default"),F.on("dblclick",()=>{const B=n.domain(),L=[+B[0],+B[1]];c(L)})}}const pn={neoGrey:{200:"#EDEFEF",400:"#ADB5BD"},neoDigitalGreen:{600:"#40c048"}},Li=["#4CA75A","#FDDA04","#FFC008","#FF9800","#F9A91B","#FF5C24","#ED4134","#CB3446"],qe={greyHatch:{background:pn.neoGrey[200],lines:pn.neoGrey[400]},dataMissingHatch:{background:"#FFF3CC",lines:"#FFB800"},noLstHatch:{background:"#FFE5E5",lines:"#ED4134"}};function YS(e,t){const n=e.append("pattern").attr("id",`${t}-greyHatchPattern`).attr("x",0).attr("y",0).attr("width",8).attr("height",8).attr("patternUnits","userSpaceOnUse");n.append("rect").attr("x",0).attr("y",0).attr("width",8).attr("height",8).attr("fill",qe.greyHatch.background),n.append("path").attr("d","M0,2 L8,2").attr("stroke",qe.greyHatch.lines).attr("stroke-width",.5),n.append("path").attr("d","M0,6 L8,6").attr("stroke",qe.greyHatch.lines).attr("stroke-width",.5)}function WS(e,t){const n=e.append("pattern").attr("id",`${t}-dataMissingHatchPattern`).attr("x",0).attr("y",0).attr("width",8).attr("height",8).attr("patternUnits","userSpaceOnUse");n.append("rect").attr("x",0).attr("y",0).attr("width",8).attr("height",8).attr("fill",qe.dataMissingHatch.background),n.append("path").attr("d","M0,8 L8,0").attr("stroke",qe.dataMissingHatch.lines).attr("stroke-width",.5),n.append("path").attr("d","M-2,2 L2,-2").attr("stroke",qe.dataMissingHatch.lines).attr("stroke-width",.5),n.append("path").attr("d","M6,10 L10,6").attr("stroke",qe.dataMissingHatch.lines).attr("stroke-width",.5)}function XS(e,t){const n=e.append("pattern").attr("id",`${t}-noLstHatchPattern`).attr("x",0).attr("y",0).attr("width",8).attr("height",8).attr("patternUnits","userSpaceOnUse");n.append("rect").attr("x",0).attr("y",0).attr("width",8).attr("height",8).attr("fill",qe.noLstHatch.background),n.append("path").attr("d","M0,0 L8,8").attr("stroke",qe.noLstHatch.lines).attr("stroke-width",.5),n.append("path").attr("d","M-2,6 L2,10").attr("stroke",qe.noLstHatch.lines).attr("stroke-width",.5),n.append("path").attr("d","M6,-2 L10,2").attr("stroke",qe.noLstHatch.lines).attr("stroke-width",.5)}function va(e,t){let n=e.select("defs");n.empty()&&(n=e.append("defs")),YS(n,t),WS(n,t),XS(n,t)}function Nh(e,t){if(e.startsWith("url(#")&&e.endsWith(")")){const n=e.slice(5,-1);return`url(#${t}-${n})`}return e}function pf(e){return e.includes("greyHatchPattern")?qe.greyHatch.lines:e.includes("dataMissingHatchPattern")?qe.dataMissingHatch.lines:e.includes("noLstHatchPattern")?qe.noLstHatch.lines:e}function Tc(e,t,n,r){const{xScale:i,yScale:a,addClasses:s=!0,instanceId:o}=r,l=as().x(h=>i(new Date(h.data.timestamp))).y0(h=>a(h[0])).y1(h=>a(h[1])).curve(kr),u=Hm().x(h=>i(new Date(h.data.timestamp))).y(h=>a(h[1])).curve(kr),c=o?`areas areas-${o}`:"areas";let f=e.select(o?`.areas-${o}`:".areas");f.empty()&&(f=e.append("g").attr("class",c)),t.forEach((h,p)=>{var x;const g=n[p];if(!g)return;const d=((x=g.parliamentMapping)==null?void 0:x.isSpecialCategory)??!1,m=pf(g.color);if(d){const y=f.append("path").datum(h).attr("fill","none").attr("stroke",m).attr("stroke-width",3).attr("stroke-dasharray","15 8").attr("d",u).style("pointer-events","none");if(s){const v=o?`area area-${o} area-${g.dataKey}`:`area area-${g.dataKey}`;y.attr("class",v)}}else{const y=f.append("path").datum(h).attr("fill",g.color).attr("fill-opacity",g.fillOpacity??.7).attr("stroke",m).attr("stroke-width",g.strokeWidth??1.5).attr("d",l).style("pointer-events","none");if(s){const v=o?`area area-${o} area-${g.dataKey}`:`area area-${g.dataKey}`;y.attr("class",v)}}})}function KS(e,t){var r;const n=[];for(const i of e){let a=0;for(const s of t){const o=i[s.dataKey]||0,l=a,u=a+o;n.push({timestamp:i.timestamp,category:s.label,dataKey:s.dataKey,y0:l,y1:u,value:o,color:s.color,isSpecialCategory:((r=s.parliamentMapping)==null?void 0:r.isSpecialCategory)??!1}),a+=o}}return n}function Ae(e){return e.replace(/[^a-zA-Z0-9-_]/g,"-")}function H0(e,t,n,r){const{centerX:i,centerY:a,addClasses:s=!0,instanceId:o,parliamentRadius:l=200}=r,u=o?`parliament parliament-${o}`:"parliament";let c=e.select(o?`.parliament-${o}`:".parliament");c.empty()&&(c=e.append("g").attr("class",u)),t.seats.forEach(p=>{const g=n.find(x=>x.label===p.category);if(!g)return;const d=c.append("circle").attr("cx",i+p.x).attr("cy",a+p.y).attr("r",p.radius).attr("fill",g.color).attr("stroke",g.color).attr("stroke-width",.5),m=c.append("circle").attr("cx",i+p.x).attr("cy",a+p.y).attr("r",p.radius*2.5).attr("fill","transparent").attr("stroke","none").attr("pointer-events","all");if(s){const x=o?`seat seat-${o} seat-${Ae(p.category)}`:`seat seat-${Ae(p.category)}`;d.attr("class",x),m.attr("class",x)}});const f=o?`parliament-label parliament-label-${o}`:"parliament-label";if(e.select(`.${f.split(" ")[0]}`).empty()){const p=e.append("g").attr("class",f).attr("transform",`translate(${i},${a-l*.15})`).style("opacity","0").style("pointer-events","none");p.append("text").attr("class","label-category").attr("text-anchor","middle").attr("dy","-15").style("font-size","22px").style("fill","#666").style("font-family","system-ui, -apple-system, sans-serif"),p.append("text").attr("class","label-value").attr("text-anchor","middle").attr("dy","35").style("font-size","48px").style("font-weight","bold").style("font-family","system-ui, -apple-system, sans-serif");const g=p.append("g").attr("class","scale-indicator").attr("transform","translate(0, 65)").style("opacity","0");g.append("circle").attr("r",4).attr("cx",-30).attr("cy",0).style("fill","#888"),g.append("text").attr("x",-20).attr("y",0).attr("dy","0.35em").attr("text-anchor","start").style("font-size","18px").style("fill","#666").style("font-style","italic").style("font-family","system-ui, -apple-system, sans-serif")}}function VS(e,t,n,r,i,a,s=!1){var f;const o=new Map;let l=i;if(t.length>0&&((f=t[0])==null?void 0:f.timestamp)!==void 0){const h=t[0].timestamp;l=n(new Date(h))}const u=new Map;for(const h of e.seats)u.has(h.category)||u.set(h.category,[]),u.get(h.category).push(h);const c=new Map;for(const h of t)c.set(h.dataKey,{y0:h.y0,y1:h.y1,isSpecialCategory:h.isSpecialCategory}),h.label&&h.label!==h.dataKey&&c.set(h.label,{y0:h.y0,y1:h.y1,isSpecialCategory:h.isSpecialCategory});for(const h of e.seats){const p=c.get(h.category);if(!p){o.set(h,{x:l,y:a/2});continue}const g=r(p.y0),d=r(p.y1);let m;if(s){const x=u.get(h.category)??[],y=h.seatIndex,v=x.length;if(v===1)m=(g+d)/2;else{const _=y/(v-1);m=g+(d-g)*_}}else m=d;o.set(h,{x:l,y:m})}return o}function ZS(e,t,n){var s;if(e.length===0)return[];const r=e[e.length-1],i=[];let a=0;for(const o of t){const l=r[o.dataKey]||0,u=a,c=a+l;i.push({dataKey:o.dataKey,label:o.label,y0:u,y1:c,value:l,timestamp:r.timestamp,isSpecialCategory:((s=o.parliamentMapping)==null?void 0:s.isSpecialCategory)??!1}),a+=l}return i}function QS(e){const t=e;return{seatsToLines:t*.2,seatsToBar:t*.07,crossFadePause:t*.003,barSlideToTimeline:t*.22,axesAndBarsGrow:t*.22,barsToArea:t*.287}}const _r=new Map;Ot.prototype.transition=Ic;const JS=({containerRef:e,data:t,categories:n,mode:r,width:i,height:a,margin:s,timeRange:o,showGrid:l=!0,showAxes:u=!0,axisLabelColor:c,axisLabelSize:f=14,formatDate:h,formatValue:p,markers:g=[],arcAngle:d=200,parliamentRadius:m=200,seatSize:x=4.5,animationDuration:y=900,onMorphComplete:v,onAnimationStateChange:_,onTimelineReady:S,onAnimationProgress:w,onHoveredDataChange:b,hoveredCategory:M,maxSeats:A=2e3,parliamentTimestamp:k,enableBrush:C=!1,onTimeRangeChange:O,minAllowedTime:P,maxAllowedTime:F,showScaleIndicator:B=!1,reposPerSeat:L=1,timelineEvents:$=[],showTimeline:Y=!1,timelineHeight:I=40,timelineOffset:et=35,brushColor:K="#69b3a2",showCrosshair:J=!1,onCrosshairMove:st})=>{const[lt,N]=G.useState("area"),[j,nt]=G.useState(!1),[Z,R]=G.useState(null),[z,D]=G.useState(0),[T,X]=G.useState(null),[Q,W]=G.useState(null),[ut,H]=G.useState([]),ot=G.useRef(null),gt=G.useRef(r),yt=G.useRef(!0),vt=G.useRef(!1),rt=G.useRef(`morph-${Math.random().toString(36).substr(2,9)}`),at=G.useRef(void 0),_t=G.useRef(o),dt=G.useRef(g),xt=G.useRef($),Et=G.useRef(v),At=G.useRef(_),ee=G.useRef(S),ne=G.useRef(w),Pt=G.useRef(b),ge=G.useRef(st);G.useEffect(()=>{Et.current=v,At.current=_,ee.current=S,ne.current=w,Pt.current=b,ge.current=st},[v,_,S,w,b,st]),G.useEffect(()=>{if(e.current&&lt==="parliament")if(M){const Rt=n.find(It=>It.dataKey===M);if(Rt){const It=Rt.label;if(R(It),Ii(e.current,It),t.length>0){const Re=t[t.length-1],Qt=Math.round(Re.values[Rt.dataKey]||0),oe={label:Rt.label,value:Qt,color:pf(Rt.color)};qi(e.current,oe,B,L,rt.current)}}}else R(null),Ii(e.current,null),qi(e.current,null,B,L,rt.current)},[M,lt,n,t,B,L]);const Vt=i-s.left-s.right,Zt=a-s.top-s.bottom;return G.useEffect(()=>{var le;if(!e.current||t.length===0||n.length===0||(at.current&&(at.current(),at.current=void 0),vt.current))return;const Rt=Ot(e.current),It=r!==gt.current;yt.current?(Rt.selectAll("*").remove(),va(Rt,rt.current),yt.current=!1):It||(Rt.selectAll("*").remove(),va(Rt,rt.current));const Re=t[t.length-1],Qt=n.reduce((ht,Nt)=>ht+(Re.values[Nt.dataKey]||0),0),oe=t.map(ht=>{const Nt={timestamp:ht.timestamp};for(const ue of n)Nt[ue.dataKey]=ht.values[ue.dataKey]||0;return Nt}),we=n.map(ht=>ht.dataKey),me=Yi().keys(we),Ge=me(oe),sn=t.map(ht=>ht.timestamp),Ye=It||!o?Math.min(...sn):o[0],Fe=It||!o?Math.max(...sn):o[1],on=[...sn].sort((ht,Nt)=>ht-Nt),ye=[];for(let ht=0;ht<on.length-1;ht++)ye.push(on[ht+1]-on[ht]);const kt=ye.length>0?ye.reduce((ht,Nt)=>ht+Nt,0)/ye.length:0,Lt=Fe+kt*1.15,Mt=Wr().domain([new Date(Ye),new Date(Lt)]).range([0,Vt]),Yt=oe.filter(ht=>ht.timestamp>=Ye&&ht.timestamp<=Fe),_e=me(Yt),Wt=_e.length>0?Math.max(..._e[_e.length-1].map(ht=>ht[1]??0)):0,U=ri().domain([0,Wt*1.15]).range([Zt,0]),ct=n.map(ht=>({...ht,color:Nh(ht.color,rt.current)})),ft=ct.map(ht=>({dataKey:ht.dataKey,label:ht.label,color:ht.color,value:Re.values[ht.dataKey]||0})),wt=GS(ft,Qt,A).reverse(),St=jS(wt,{arcAngle:d,radius:m,seatSize:x,minSeatSize:4,maxSeatSize:30,spacing:1.1,innerRadiusRatio:.4});ot.current=St;const zt=ZS(oe,n),re=VS(St,zt,Mt,U,Vt,Zt);if(It&&!vt.current){vt.current=!0,nt(!0),(le=At.current)==null||le.call(At,!0),X(null),H([]),D(0);let ht=Rt.select("g[transform]");if(ht.empty()&&(ht=Rt.select("g")),ht.empty()){Rt.selectAll("*").remove(),va(Rt,rt.current),Gs(Rt,r==="parliament"?"parliament":"area",Ge,ct,St,Mt,U,Vt,Zt,s,l,u,c,f,h,p,C,O,rt.current,g,o,H,X,$,Y,I,et,W,P,F,K,J,st),nt(!1),N(r==="parliament"?"parliament":"area"),D(r==="parliament"?1:0),gt.current=r;return}const Nt=setTimeout(()=>{vt.current=!1,nt(!1),gt.current=r},y*3);eT(Rt,r,Ge,ct,St,re,Mt,U,Vt,Zt,s,y,()=>{var ue,Ee,De;if(clearTimeout(Nt),vt.current=!1,nt(!1),N(r==="parliament"?"parliament":"area"),r==="parliament"&&D(1),(ue=At.current)==null||ue.call(At,!1),(Ee=Et.current)==null||Ee.call(Et),gt.current=r,r==="parliament"&&e.current&&Pt.current&&(at.current=Ys(e.current,ct,t,Z,R,Pt.current,B,L,rt.current)),r!=="parliament"&&e.current){R(null),(De=Pt.current)==null||De.call(Pt,null),qi(e.current,null,B,L,rt.current);const We=Ot(e.current),$e=We.select(rt.current?`.main-chart-group-${rt.current}`:".main-chart-group");if(Y){const Rn=rt.current?`.timeline-track-${rt.current}`:".timeline-track",Xe=rt.current?`.timeline-brush-${rt.current}`:".timeline-brush";$e.select(Rn).remove(),$e.select(Xe).remove(),Qa({svg:We,events:$,xScale:Mt,chartHeight:Zt,chartWidth:Vt,timelineHeight:I,timelineOffset:et,instanceId:rt.current,setHoveredTimelineEvent:W,enableBrush:C,onTimeRangeChange:O,minAllowedTime:P,maxAllowedTime:F,brushColor:K})}if(C&&O){const Rn=$e.select(rt.current?`.chart-content-group-${rt.current}`:".chart-content-group");tT(Rn,Vt,Zt,Mt,O,rt.current,We,P,F,K)}if(g.length>0&&H&&X&&o){const Xe=g.filter(ln=>ln.timestamp>=(o[0]??0)-1&&ln.timestamp<=(o[1]??1/0)+1).map(ln=>({...ln,x:Mt(new Date(ln.timestamp))}));if(H(Xe),Xe.length>0){qh($e,Xe,Zt,Vt,C,X,rt.current);const ln=$e.select(rt.current?`.markers-${rt.current}`:".markers");if(!ln.empty()){$e.selectAll(".marker-hover-overlay").remove();const sr=$e.select(rt.current?`.chart-content-group-${rt.current}`:".chart-content-group");j0(sr.empty()?$e:sr,ln,Xe,Vt,Zt,C,X,s,J,st)}}}}},u,f,h,p,ee.current,(ue,Ee)=>{var De;if(r==="parliament"&&ue>=.95){const We=(ue-.95)/.05;D(Math.min(We,1))}(De=ne.current)==null||De.call(ne,ue,Ee)},k,rt.current)}else gt.current=r,r==="parliament"&&(X(null),H([])),Gs(Rt,r==="parliament"?"parliament":"area",Ge,ct,St,Mt,U,Vt,Zt,s,l,u,c,f,h,p,C,O,rt.current,g,o,H,X,$,Y,I,et,W,P,F,K,J,st),N(r==="parliament"?"parliament":"area"),D(r==="parliament"?1:0),r==="parliament"&&e.current&&Pt.current&&(at.current=Ys(e.current,ct,t,Z,R,Pt.current,B,L,rt.current));return()=>{at.current&&(at.current(),at.current=void 0)}},[r]),G.useEffect(()=>{var Yt,_e;if(!e.current||t.length===0||vt.current)return;if(yt.current){_t.current=o;return}if(!(o!==_t.current&&((o==null?void 0:o[0])!==((Yt=_t.current)==null?void 0:Yt[0])||(o==null?void 0:o[1])!==((_e=_t.current)==null?void 0:_e[1]))))return;_t.current=o;const It=Ot(e.current),Re=t.map(Wt=>{const U={timestamp:Wt.timestamp};for(const ct of n)U[ct.dataKey]=Wt.values[ct.dataKey]||0;return U}),Qt=n.map(Wt=>Wt.dataKey),we=Yi().keys(Qt)(Re),me=t.map(Wt=>Wt.timestamp),Ge=o?o[0]:Math.min(...me),sn=o?o[1]:Math.max(...me),Fe=(me.length>1?(me[me.length-1]-me[0])/(me.length-1):0)*.5,on=Wr().domain([new Date(Ge-Fe),new Date(sn+Fe)]).range([0,i-s.left-s.right]),ye=Math.max(...we[we.length-1].map(Wt=>Wt[1])),kt=ri().domain([0,ye*1.1]).range([a-s.top-s.bottom,0]);if(!ot.current)return;const Lt=ot.current,Mt=n.map(Wt=>({...Wt,color:Nh(Wt.color,rt.current)}));It.selectAll("*").remove(),va(It,rt.current),Gs(It,lt==="parliament"?"parliament":"area",we,Mt,Lt,on,kt,i-s.left-s.right,a-s.top-s.bottom,s,l,u,c,f,h,p,C,O,rt.current,g,o,H,X,$,Y,I,et,W,P,F,K,J,st),lt==="parliament"&&e.current&&Pt.current&&(at.current=Ys(e.current,Mt,t,Z,R,Pt.current,B,L,rt.current))},[o]),G.useEffect(()=>{if(!e.current||t.length===0||vt.current)return;if(yt.current){dt.current=g,xt.current=$;return}if(lt==="parliament"){dt.current=g,xt.current=$;return}const Rt=g.length!==dt.current.length||g.some((kt,Lt)=>{var Mt,Yt;return kt.timestamp!==((Mt=dt.current[Lt])==null?void 0:Mt.timestamp)||kt.label!==((Yt=dt.current[Lt])==null?void 0:Yt.label)}),It=$.length!==xt.current.length||$.some((kt,Lt)=>{var Mt,Yt;return kt.timestamp!==((Mt=xt.current[Lt])==null?void 0:Mt.timestamp)||kt.eventName!==((Yt=xt.current[Lt])==null?void 0:Yt.eventName)});if(!Rt&&!It)return;dt.current=g,xt.current=$;const Re=Ot(e.current),Qt=Re.select(rt.current?`.main-chart-group-${rt.current}`:".main-chart-group");if(Qt.empty())return;const oe=t.map(kt=>kt.timestamp),we=o?o[0]:Math.min(...oe),me=o?o[1]:Math.max(...oe),sn=(oe.length>1?(oe[oe.length-1]-oe[0])/(oe.length-1):0)*.5,Ye=i-s.left-s.right,Fe=a-s.top-s.bottom,on=Wr().domain([new Date(we-sn),new Date(me+sn)]).range([0,Ye]);if(It&&Y){const kt=rt.current?`.timeline-track-${rt.current}`:".timeline-track",Lt=rt.current?`.timeline-brush-${rt.current}`:".timeline-brush";Qt.select(kt).remove(),Qt.select(Lt).remove(),Qa({svg:Re,events:$,xScale:on,chartHeight:Fe,chartWidth:Ye,timelineHeight:I,timelineOffset:et,instanceId:rt.current,setHoveredTimelineEvent:W,enableBrush:C,onTimeRangeChange:O,minAllowedTime:P,maxAllowedTime:F,brushColor:K})}let ye=[];if(Rt&&g.length>0&&o){const kt=rt.current?`.markers-${rt.current}`:".markers";Qt.select(kt).remove();const Lt=1;ye=g.filter(Mt=>Mt.timestamp>=(o[0]??0)-Lt&&Mt.timestamp<=(o[1]??1/0)+Lt).map(Mt=>({...Mt,x:on(new Date(Mt.timestamp))})),H(ye),ye.length>0&&qh(Qt,ye,Fe,Ye,C,X,rt.current)}if(ye.length>0){const kt=Qt.select(rt.current?`.markers-${rt.current}`:".markers");if(!kt.empty()){Qt.selectAll(".marker-hover-overlay").remove();const Lt=Qt.append("rect").attr("class","marker-hover-overlay").attr("x",0).attr("y",0).attr("width",Ye).attr("height",Fe).attr("fill","none").attr("pointer-events","all");let Mt=null;Lt.on("mousemove",function(Yt){const[_e]=er(Yt,this);let Wt=null,U=1/0;if(ye.forEach(wt=>{const St=Math.abs(_e-wt.x);St<U&&(U=St,Wt=wt)}),!Wt||U>50){Mt!==null&&(Mt=null,kt.selectAll(".marker-line").attr("opacity",0),kt.selectAll(".marker-label").attr("opacity",0),X(null));return}const ft=Wt;Mt!==ft.timestamp&&(Mt=ft.timestamp,kt.selectAll(".marker-line").attr("opacity",0),kt.selectAll(".marker-label").attr("opacity",0),kt.selectAll(".marker-line").filter(function(){return Ot(this).attr("data-timestamp")===String(ft.timestamp)}).attr("opacity",.6),kt.selectAll(".marker-label").filter(function(){return Ot(this).attr("data-timestamp")===String(ft.timestamp)}).attr("opacity",1),X(ft))}),Lt.on("mouseleave",function(){Mt=null,kt.selectAll(".marker-line").attr("opacity",0),kt.selectAll(".marker-label").attr("opacity",0),X(null)})}}},[g,$,j]),{isMorphing:j,currentMode:lt,hoveredCategory:Z,scaleIndicatorOpacity:z,visibleMarkers:ut,hoveredMarker:T,setHoveredMarker:X,hoveredTimelineEvent:Q,setHoveredTimelineEvent:W}};function tT(e,t,n,r,i,a,s,o,l,u){const c=o,f=l,h=pi().extent([[0,0],[t,n]]).on("start",g=>{if(!g.selection&&c!==void 0&&f!==void 0){const d=g.sourceEvent;if(d){const m=d.offsetX,x=+r.invert(m);if(x<c||x>f){s.select(".brush").call(h.move,null);return}}}}).on("brush",g=>{if(!g.selection)return;const[d,m]=g.selection;let x=+r.invert(d),y=+r.invert(m);c!==void 0&&(x=Math.max(x,c),y=Math.max(y,c)),f!==void 0&&(x=Math.min(x,f),y=Math.min(y,f));const v=r(new Date(x)),_=r(new Date(y));(v!==d||_!==m)&&s.select(".brush").call(h.move,[v,_])}).on("end",g=>{if(!g.selection)return;const[d,m]=g.selection,x=[+r.invert(d),+r.invert(m)];c!==void 0&&(x[0]=Math.max(x[0],c)),f!==void 0&&(x[1]=Math.min(x[1],f)),i(x),s.select(".brush").call(h.move,null)}),p=e.append("g").attr("class","brush").call(h);p.selectAll(".selection").attr("fill",u).attr("fill-opacity",.2).attr("stroke",u).attr("stroke-width",1),p.selectAll(".handle").attr("fill",u).attr("fill-opacity",.8),p.select(".overlay").style("cursor","default"),p.on("dblclick",()=>{const g=r.domain(),d=[+g[0],+g[1]];o!==void 0&&(d[0]=Math.max(d[0],o)),l!==void 0&&(d[1]=Math.min(d[1],l)),i(d)})}function qh(e,t,n,r,i,a,s){const o=s?`markers markers-${s}`:"markers",l=e.append("g").attr("class",o);t.forEach(u=>{l.append("line").attr("class","marker-line").attr("data-timestamp",u.timestamp).attr("x1",u.x).attr("x2",u.x).attr("y1",0).attr("y2",n).attr("stroke",u.color??"#2F42FF").attr("stroke-width",2).attr("opacity",0),u.label&&l.append("text").attr("class","marker-label").attr("data-timestamp",u.timestamp).attr("x",u.x).attr("y",-5).attr("text-anchor","middle").attr("font-size",10).attr("fill",u.color??"#2F42FF").attr("opacity",0)})}function j0(e,t,n,r,i,a,s,o,l=!1,u){let c=null,f;a?f=e.select(".brush .overlay"):f=e.append("rect").attr("class","marker-hover-overlay").attr("width",r).attr("height",i).attr("fill","none").attr("pointer-events","all");const h=p=>{let g=null,d=1/0;if(n.forEach(y=>{const v=Math.abs(p-y.x);v<d&&(d=v,g=y)}),!g||d>50)return c!==null&&(c=null,t.selectAll(".marker-line").attr("opacity",0),t.selectAll(".marker-label").attr("opacity",0),s(null)),!1;const x=g;return c===x.timestamp||(c=x.timestamp,t.selectAll(".marker-line").attr("opacity",0),t.selectAll(".marker-label").attr("opacity",0),t.selectAll(".marker-line").filter(function(){return Ot(this).attr("data-timestamp")===String(x.timestamp)}).attr("opacity",.6),t.selectAll(".marker-label").filter(function(){return Ot(this).attr("data-timestamp")===String(x.timestamp)}).attr("opacity",1),s(x)),!0};f.on("mousemove",function(p){const[g,d]=er(p,this);h(g),l&&u&&u({x:g+o.left,y:d+o.top})}),f.on("mouseleave",function(){c=null,t.selectAll(".marker-line").attr("opacity",0),t.selectAll(".marker-label").attr("opacity",0),s(null),u&&u(null)})}function Gs(e,t,n,r,i,a,s,o,l,u,c,f,h,p,g,d,m=!1,x,y,v=[],_=[0,0],S,w,b=[],M=!1,A=40,k=15,C,O,P,F="#69b3a2",B=!1,L){const $=O,Y=P;let I=null;const et=y?`main-chart-group main-chart-group-${y}`:"main-chart-group",K=e.append("g").attr("class",et).attr("transform",`translate(${u.left},${u.top})`),J=y?`chart-clip-${y}`:`chart-clip-${Math.random().toString(36).substr(2,9)}`;e.select("defs").append("clipPath").attr("id",J).append("rect").attr("x",0).attr("y",0).attr("width",o).attr("height",l);const st=y?`chart-content-group chart-content-group-${y}`:"chart-content-group",lt=K.append("g").attr("class",st).attr("clip-path",`url(#${J})`);if(c&&t!=="parliament"&&(lt.append("g").attr("class","grid grid-vertical").attr("opacity",.1).call(qn(a).ticks(6).tickSize(l).tickFormat(()=>"")),lt.append("g").attr("class","grid grid-horizontal").attr("opacity",.1).call(In(s).ticks(5).tickSize(-o).tickFormat(()=>""))),t==="area"&&(Tc(lt,n,r,{xScale:a,yScale:s,addClasses:!0,instanceId:y}),v.length>0)){const j=v.filter(nt=>nt.timestamp>=_[0]-1&&nt.timestamp<=_[1]+1).map(nt=>({...nt,x:a(new Date(nt.timestamp))}));I={markersGroup:null,visibleMarkers:j},S&&S(j)}if(t==="parliament"){const N=o/2,j=i.radius+10,nt=l-i.radius*.3,Z=Math.max(j,nt);H0(lt,i,r,{centerX:N,centerY:Z,addClasses:!0,instanceId:y,parliamentRadius:i.radius})}if(f&&t!=="parliament"){const j=qn(a).ticks(6).tickPadding(12);g&&j.tickFormat(T=>g(+T));const Z=K.append("g").attr("class","axis axis-x").attr("transform",`translate(0,${l})`).call(j).selectAll("text").attr("font-size",p).attr("font-weight",500);h&&Z.attr("fill",h);const R=In(s).ticks(5);R.tickFormat(T=>+T==0?"":d?d(+T):String(T));const D=K.append("g").attr("class","axis axis-y").call(R).selectAll("text").attr("font-size",p).attr("font-weight",500);h&&D.attr("fill",h)}if(m&&x&&t==="area"){const N=$,j=Y,nt=pi().extent([[0,0],[o,l]]).on("start",R=>{if(!R.selection&&N!==void 0&&j!==void 0){const z=R.sourceEvent;if(z){const D=z.offsetX-((u==null?void 0:u.left)||0),T=+a.invert(D);if(T<N||T>j){e.select(".brush").call(nt.move,null);return}}}}).on("brush",R=>{if(!R.selection)return;const[z,D]=R.selection;let T=+a.invert(z),X=+a.invert(D);N!==void 0&&(T=Math.max(T,N),X=Math.max(X,N)),j!==void 0&&(T=Math.min(T,j),X=Math.min(X,j));const Q=a(new Date(T)),W=a(new Date(X));(Q!==z||W!==D)&&e.select(".brush").call(nt.move,[Q,W])}).on("end",R=>{if(!R.selection)return;const[z,D]=R.selection,T=[+a.invert(z),+a.invert(D)];N!==void 0&&(T[0]=Math.max(T[0],N)),j!==void 0&&(T[1]=Math.min(T[1],j)),x(T),e.select(".brush").call(nt.move,null)}),Z=lt.append("g").attr("class","brush").call(nt);Z.selectAll(".selection").attr("fill",F).attr("fill-opacity",.2).attr("stroke",F).attr("stroke-width",1),Z.selectAll(".handle").attr("fill",F).attr("fill-opacity",.8),Z.select(".overlay").style("cursor","default"),Z.on("dblclick",()=>{const R=a.domain(),z=[+R[0],+R[1]];x(z)})}if(t==="area"&&I&&I.visibleMarkers.length>0){const N=K.append("g").attr("class","markers").attr("clip-path",`url(#${J})`);I.visibleMarkers.forEach(j=>{N.append("line").attr("class","marker-line").attr("data-timestamp",j.timestamp).attr("x1",j.x).attr("x2",j.x).attr("y1",0).attr("y2",l).attr("stroke",j.color??"#2F42FF").attr("stroke-width",2).attr("opacity",0),j.label&&N.append("text").attr("class","marker-label").attr("data-timestamp",j.timestamp).attr("x",j.x).attr("y",-5).attr("text-anchor","middle").attr("font-size",10).attr("fill",j.color??"#2F42FF").attr("opacity",0)}),I.markersGroup=N}if(t==="area"&&M&&C&&Qa({svg:e,events:b,xScale:a,chartHeight:l,chartWidth:o,timelineHeight:A,timelineOffset:k,instanceId:y,setHoveredTimelineEvent:C,enableBrush:m,onTimeRangeChange:x,minAllowedTime:$,maxAllowedTime:Y,brushColor:F}),t==="area"){const N=(I==null?void 0:I.markersGroup)??lt.append("g").attr("class","empty-markers-group"),j=(I==null?void 0:I.visibleMarkers)??[];j0(lt,N,j,o,l,m,w??(()=>{}),u,B,L)}}function eT(e,t,n,r,i,a,s,o,l,u,c,f,h,p=!0,g=14,d,m,x,y,v,_){const S=e.select(_?`.main-chart-group-${_}`:".main-chart-group");S.selectAll(".markers").remove(),S.selectAll(".marker-hover-overlay").remove(),S.selectAll(".brush").remove(),t==="stacked-area"||t==="area"?nT(S,n,r,i,a,s,o,l,u,f,h,p,g,d,m,x,y,v,_):rT(S,n,r,i,a,s,o,l,u,f,h,p,g,d,m,x,y,v,_)}function Ni(e,t,n,r,i,a,s,o){const l=e[a];if(!l)return"";const u=l.find(w=>w.data.timestamp===s);if(!u)return"";const c=u.data,f=t[a];if(!f)return"";const h=f.dataKey,p=c[h];if(!p||p<=0)return"";const g=n.get(s);if(!g)return"";const d=g.x,m=g.width,x=u[0],y=u[1],v=o?i:r(x),_=o?i:r(y),S=[];return S.push(`M ${d} ${v}`),S.push(`L ${d} ${_}`),S.push(`L ${d+m} ${_}`),S.push(`L ${d+m} ${v}`),S.push("Z"),S.join(" ")}function nT(e,t,n,r,i,a,s,o,l,u,c,f=!0,h=14,p,g,d,m,x,y){var ha;const v=y?`.seat-${y}`:".seat",_=e.selectAll(v),S=y?`.chart-content-group-${y}`:".chart-content-group";let w=e.select(S);if(w.empty()){const V=e.attr("clip-path"),it=V?((ha=V.match(/url\(#(.+)\)/))==null?void 0:ha[1])||`chart-clip-${Math.random().toString(36).substr(2,9)}`:`chart-clip-${Math.random().toString(36).substr(2,9)}`,pt=y?`chart-content-group chart-content-group-${y}`:"chart-content-group";w=e.append("g").attr("class",pt).attr("clip-path",`url(#${it})`)}if(_.size()===0){Tc(e,t,n,{xScale:a,yScale:s,addClasses:!0,instanceId:y}),c();return}const b=QS(u),M=y?_r.get(y):void 0;M&&(M.destroy(),y&&_r.delete(y));const A=V=>V<.2?"seatsToRings":V<.35?"ringsToBar":V<.464?"axesReveal":V<.6?"barSlide":V<.82?"barsGrow":"barsToArea",k=new U0({seatsToRings:b.seatsToLines,ringsToBar:b.seatsToBar,axesReveal:b.barSlideToTimeline*.3,barSlide:b.barSlideToTimeline*.7,barsGrow:b.axesAndBarsGrow,barsToArea:b.barsToArea},{onStageComplete:V=>{},onProgress:V=>{if(m){const it=A(V);m(V,it)}},onComplete:()=>{c()}});y&&_r.set(y,k),d&&d(k.getControls().getTimeline());const C=t[0].map(V=>V.data),O=KS(C,n),P=o/2,F=r.radius+10,B=l-r.radius*.3,L=Math.max(F,B),$=C.map(V=>V.timestamp),Y=x??Math.max(...$),I=new Map,et=[];$.forEach((V,it)=>{const pt=a(new Date(V)),bt=$[it+1];if(bt){const Bt=a(new Date(bt))-pt;et.push(Bt)}});const K=et.length>0?et.reduce((V,it)=>V+it,0)/et.length:30;$.forEach((V,it)=>{const pt=a(new Date(V)),bt=$[it+1],Bt=it===$.length-1?K:a(new Date(bt))-pt;I.set(V,{x:pt,width:Bt})});const J=O.filter(V=>V.timestamp===Y),st=I.get(Y),lt=666,N=y?`parliament-bar-path parliament-bar-path-${y}`:"parliament-bar-path",j=w.append("g").attr("class",N);J.sort((V,it)=>it.y0-V.y0),new Map().set(Y,{x:lt-st.width/2,width:st.width});const Z=[],R=(r.radius-r.innerRadius)*.6,D=l*.8,T=L,X=J.reduce((V,it)=>V+(it.y1-it.y0),0);let Q=0;n.forEach(V=>{const it=J.find(ve=>ve.dataKey===V.dataKey);if(!it)return;const Jt=(it.y1-it.y0)/X*D,Bt=T-Q,Se=T-Q-Jt,xe=lt-R/2,Le=`M ${xe} ${Bt} L ${xe} ${Se} L ${xe+R} ${Se} L ${xe+R} ${Bt} Z`;Q+=Jt;const Ke=j.append("path").attr("class",`parliament-bar-segment category-${Ae(it.dataKey)}`).attr("d",Le).attr("fill",it.color).style("opacity",0).node();Ke&&Z.push(Ke)}),y&&(window.orchestratorMap=_r);const W=k.getControls().getTimeline(),ut=b.seatsToLines/1e3,H=b.seatsToBar/1e3;W.call(()=>{m==null||m(W.progress(),"seatsToRings")},[],"seatsToRings");const ot=_.nodes(),gt=P,yt=L,vt=Math.max(...r.seats.map(V=>V.ring)),rt=r.seats.filter(V=>V.ring===vt),at=e.append("g").attr("class",`seat-lines-${y||"default"}`),_t=n.map(V=>{const it=_.filter(`.seat-${Ae(V.dataKey)}`).size();return it>0?{name:V.dataKey,seatCount:it,color:V.color}:null}).filter(V=>V!==null).reverse(),dt=_t.reduce((V,it)=>V+it.seatCount,0),xt=rt.length,Et=r.radius-r.innerRadius,At=Et*.6,ee=At/2,ne=Et*.6,Pt=[];let ge=0;_t.forEach(V=>{const it=Math.max(1,Math.round(V.seatCount/dt*xt));for(let pt=0;pt<it;pt++){const bt=(ge+pt)/xt,Jt=r.arcAngle*Math.PI/180,Se=-Jt/2-Math.PI/2+bt*Jt,xe=(r.innerRadius+r.radius)/2,Le=gt+Math.cos(Se)*xe,Ke=yt+Math.sin(Se)*xe,ve=Math.cos(Se),Gn=Math.sin(Se),lr=Le-ee*ve,Fr=Ke-ee*Gn,ce=Le+ee*ve,Yn=Ke+ee*Gn,Wn=at.append("line").attr("class","seat-line").attr("x1",lr).attr("y1",Fr).attr("x2",ce).attr("y2",Yn).attr("stroke",V.color).attr("stroke-width",r.seatSize*2).attr("stroke-linecap","butt").style("opacity",0).attr("data-angle",Se*180/Math.PI).attr("data-center-x",Le).attr("data-center-y",Ke).attr("data-initial-length",At).node();Pt.push({element:Wn,angle:Se})}ge+=it});const Vt=()=>{at.remove()},Zt=ut*.5,Rt=0,It=[];if(It.push(...ot),It.sort((V,it)=>{const pt=parseInt(V.getAttribute("data-layout-index")||"-1",10),bt=parseInt(it.getAttribute("data-layout-index")||"-1",10);return pt-bt}),It.length>0&&Pt.length>0){const V=Pt.map(it=>it.element);W.to(It,{attr:{r:1.5},duration:Zt*.3,ease:"power2.in"},`seatsToRings+=${Rt}`),V.forEach(it=>{const pt=it.getAttribute("x1")||"0",bt=it.getAttribute("y1")||"0",Jt=it.getAttribute("x2")||"0",Bt=it.getAttribute("y2")||"0";it.setAttribute("data-final-x1",pt),it.setAttribute("data-final-y1",bt),it.setAttribute("data-final-x2",Jt),it.setAttribute("data-final-y2",Bt),it.setAttribute("x1",pt),it.setAttribute("y1",bt),it.setAttribute("x2",pt),it.setAttribute("y2",bt)}),W.to(V,{attr:{x2:(it,pt)=>parseFloat(pt.getAttribute("data-final-x2")||"0"),y2:(it,pt)=>parseFloat(pt.getAttribute("data-final-y2")||"0")},opacity:.9,duration:Zt*.6,ease:"power2.out"},`seatsToRings+=${Rt+Zt*.2}`),W.to(It,{opacity:0,duration:Zt*.3,ease:"power2.out"},`seatsToRings+=${Rt+Zt*.3}`)}const Re=ut*.05,Qt=ut*.7,oe=Rt+Zt+Re;if(Pt.length>0){const V=lt,it=L,bt=l*.8/Pt.length,Jt=it,Bt=[...Pt].sort((Le,Ke)=>Ke.angle-Le.angle),xe=.6/Bt.length;Bt.forEach((Le,Ke)=>{const ve=V,lr=Jt-Ke*bt,Fr=xe*Ke*Qt,ce=Le.element,Yn=parseFloat(ce.getAttribute("data-final-x1")||"0"),Wn=parseFloat(ce.getAttribute("data-final-y1")||"0"),mi=parseFloat(ce.getAttribute("data-final-x2")||"0"),$r=parseFloat(ce.getAttribute("data-final-y2")||"0"),pa=(Yn+mi)/2,xn=(Wn+$r)/2,Xn=Math.atan2($r-Wn,mi-Yn),ur=Math.sqrt(Math.pow(mi-Yn,2)+Math.pow($r-Wn,2));W.to({progress:0},{progress:1,duration:Qt*.5,ease:"power2.inOut",delay:Fr,onUpdate:function(){const ie=this.progress(),xs=pa+(ve-pa)*ie,vs=xn+(lr-xn)*ie,vn=40*4*ie*(1-ie),cr=xs,fr=vs-vn,ws=0-Xn,En=Xn+ws*ie*ie,da=(ur+(ne-ur)*ie)/2,Iy=cr-da*Math.cos(En),zy=fr-da*Math.sin(En),By=cr+da*Math.cos(En),Uy=fr+da*Math.sin(En);ce.setAttribute("x1",Iy.toString()),ce.setAttribute("y1",zy.toString()),ce.setAttribute("x2",By.toString()),ce.setAttribute("y2",Uy.toString())},onComplete:function(){const ie=ne/2;ce.setAttribute("x1",(ve-ie).toString()),ce.setAttribute("y1",lr.toString()),ce.setAttribute("x2",(ve+ie).toString()),ce.setAttribute("y2",lr.toString())}},`seatsToRings+=${oe}`),W.to(Le.element,{opacity:.95,duration:Qt*.3,ease:"power2.out",delay:Fr},`seatsToRings+=${oe}`)})}const we=at,me=[];J.forEach((V,it)=>{const pt=_.filter(`.seat-${Ae(V.category)}`),bt=pt.size();if(bt===0)return;const Jt=s(V.y1),Bt=s(V.y0)-s(V.y1),Se=pt.nodes().sort((xn,Xn)=>{const ur=parseInt(xn.getAttribute("data-layout-index")||"-1",10),ie=parseInt(Xn.getAttribute("data-layout-index")||"-1",10);return ur-ie}),xe=Math.max(st.width,100),Le=Bt,Ke=xe/Math.max(Le,1),ve=Math.max(2,Math.ceil(Math.sqrt(bt*Ke))),Gn=Math.ceil(bt/ve),lr=xe*.8,Fr=Le*.8,ce=ve>1?lr/(ve-1):0,Yn=Gn>1?Fr/(Gn-1):0,Wn=ve>1?(ve-1)*ce:0,mi=Gn>1?(Gn-1)*Yn:0,$r=lt-xe/2+(xe-Wn)/2,pa=Jt+(Le-mi)/2;Se.forEach((xn,Xn)=>{const ur=parseInt(xn.getAttribute("data-layout-index")||"-1",10),ie=ur>=0?r.seats[ur]:void 0,xs=ie?P+ie.x:parseFloat(xn.getAttribute("cx")||"0"),vs=ie?L+ie.y:parseFloat(xn.getAttribute("cy")||"0"),Ef=(ie==null?void 0:ie.radius)||parseFloat(xn.getAttribute("r")||"4"),vn=bt%ve;let cr,fr;if(vn>0&&Xn<vn)fr=0,cr=Xn;else{const En=Xn-(vn>0?vn:0);cr=En%ve,fr=Math.floor(En/ve)+(vn>0?1:0)}let bs=$r+cr*ce;if(vn>0&&fr===0){const En=vn>1?(vn-1)*ce:0,Df=(Wn-En)/2;bs=$r+Df+cr*ce}const ws=pa+fr*Yn;me.push({element:xn,startX:xs,startY:vs,startRadius:Ef,category:V.dataKey,segmentIndex:it,endY:ws,endX:bs})})});const Ge=me.map(V=>{const it=V.startX-P,pt=V.startY-L,bt=Math.atan2(pt,it);return{...V,angle:bt}});Ge.sort((V,it)=>it.angle-V.angle);const sn=H*.8,Ye=.6,Fe=Ge.length,ye=sn/Math.max(Fe,1)*(Fe-1)+Ye,kt=H*.3,Lt=ye;W.to(Z,{opacity:1,duration:kt,ease:"power2.inOut"},`seatsToBar+=${Lt}`),we&&(W.to(we.selectAll(".seat-line").nodes(),{opacity:0,duration:kt,ease:"power2.inOut"},`seatsToBar+=${Lt}`),W.call(()=>{Vt()},[],`seatsToBar+=${Lt+kt}`));const Mt=b.barSlideToTimeline/1e3;let Yt=null,_e=null;if(f){const it=qn(a).ticks(6).tickPadding(12);p&&it.tickFormat(bt=>p(bt.getTime())),Yt=e.append("g").attr("class","axis axis-x").attr("transform",`translate(0,${l})`).attr("opacity",0),Yt.call(it).selectAll("text").attr("font-size",h).attr("font-weight",500);const pt=In(s).ticks(5);pt.tickFormat(bt=>+bt==0?"":g?g(bt):String(bt)),_e=e.append("g").attr("class","axis axis-y").attr("opacity",0),_e.call(pt).selectAll("text").attr("font-size",h).attr("font-weight",500)}const Wt=b.crossFadePause/1e3,U=Lt+kt+Wt;Z.forEach(V=>{const it=Array.from(V.classList).find(Bt=>Bt.startsWith("category-"));if(!it||!J.find(Bt=>Ae(Bt.dataKey)===it.replace("category-","")))return;const bt=n.findIndex(Bt=>Ae(Bt.dataKey)===it.replace("category-",""));if(bt===-1)return;const Jt=Ni(t,n,I,s,l,bt,Y,!1);Jt&&W.to(V,{attr:{d:Jt},duration:Mt,ease:"power2.out"},`seatsToBar+=${U}`)});const ct=as().x(V=>a(V.data.timestamp)).y0(V=>s(V[0])).y1(V=>s(V[1])).curve(kr),ft=new Map;t.forEach((V,it)=>{const pt=n[it];if(pt){const bt=ct(V)||"";ft.set(pt.dataKey,bt)}});const wt=U+Mt;f&&Yt&&_e&&W.to([Yt.node(),_e.node()],{opacity:1,duration:.6,ease:"power2.inOut"},`seatsToBar+=${U}`);const St=w.select(".grid-vertical"),zt=w.select(".grid-horizontal");if(!St.empty()||!zt.empty()){const it=[];St.empty()||it.push(St.node()),zt.empty()||it.push(zt.node()),W.to(it,{opacity:.1,duration:.6,ease:"power2.inOut"},`seatsToBar+=${U}`)}const re=b.axesAndBarsGrow/1e3,le=b.barsToArea/1e3,ht=y?`histogram-paths histogram-paths-${y}`:"histogram-paths",Nt=w.append("g").attr("class",ht);$.forEach(V=>{if(V===Y)return;const it=I.get(V);it&&n.forEach((pt,bt)=>{const Jt=Ni(t,n,I,s,l,bt,V,!0),Bt=Ni(t,n,I,s,l,bt,V,!1);if(!Jt||!Bt)return;const Se=y?`histogram-path histogram-path-${y} category-${Ae(pt.dataKey)}`:`histogram-path category-${Ae(pt.dataKey)}`;Nt.append("path").attr("class",Se).attr("d",Jt).attr("fill",pt.color).attr("stroke",pt.color).attr("stroke-width",.5).attr("shape-rendering","crispEdges").attr("opacity",0).attr("data-category",pt.dataKey).attr("data-timestamp",V).attr("data-x-position",it.x).attr("data-full-height-path",Bt)})});const ue=y?`.histogram-path-${y}`:".histogram-path",Ee=Nt.selectAll(ue);W.to(Ee.nodes(),{opacity:1,duration:.3,ease:"power2.inOut"},`seatsToBar+=${wt}`);const De=st.x+st.width/2;Ee.each(function(){var xe;const V=this.getAttribute("data-full-height-path");if(!V)return;const it=parseFloat(this.getAttribute("data-x-position")||"0"),pt=parseFloat(this.getAttribute("data-timestamp")||"0"),bt=((xe=I.get(pt))==null?void 0:xe.width)||0,Jt=it+bt/2,Se=Math.abs(Jt-De)*8e-4;W.to(this,{attr:{d:V},duration:re,ease:"power2.out"},`seatsToBar+=${wt+Se}`)});const We=wt+re,$e=$[$.length-1],Xe=a(new Date($e))+K,sr=a.invert(Xe).getTime(),Pr=t.map(V=>{const it=V[V.length-1],pt={...it,data:{...it.data,timestamp:sr}};return[...V,pt]});Tc(e,Pr,n,{xScale:a,yScale:s,addClasses:!0,instanceId:y});const Rf=y?`.area-${y}`:".area",or=e.selectAll(Rf);or.attr("opacity",0),W.to(Ee.nodes(),{opacity:0,duration:le,ease:"power2.inOut"},`seatsToBar+=${We}`);const fa=j.selectAll("path").nodes();fa.length>0&&W.to(fa,{opacity:0,duration:le,ease:"power2.inOut"},`seatsToBar+=${We}`),W.to(or.nodes(),{opacity:1,duration:le,ease:"power2.inOut"},`seatsToBar+=${We}`);const _s=c;k.getControls().getTimeline().eventCallback("onComplete",()=>{const V=y?`.morph-bar-${y}`:".morph-bar";e.selectAll(V).remove();const it=y?`.histogram-paths-${y}`:".histogram-paths";e.selectAll(it).remove();const pt=y?`.seat-${y}`:".seat";e.selectAll(pt).style("pointer-events","none"),f&&(Yt&&Yt.attr("opacity",1),_e&&_e.attr("opacity",1)),_s()}),k.play()}function rT(e,t,n,r,i,a,s,o,l,u,c,f=!0,h=14,p,g,d,m,x,y){var Wt;const v=y?`.chart-content-group-${y}`:".chart-content-group";let _=e.select(v);if(_.empty()){const U=e.attr("clip-path"),ct=U?((Wt=U.match(/url\(#(.+)\)/))==null?void 0:Wt[1])||`chart-clip-${Math.random().toString(36).substr(2,9)}`:`chart-clip-${Math.random().toString(36).substr(2,9)}`,ft=y?`chart-content-group chart-content-group-${y}`:"chart-content-group";_=e.append("g").attr("class",ft).attr("clip-path",`url(#${ct})`)}const S=y?`.area-${y}`:".area",w=e.selectAll(S);if(w.size()===0){iT(e,n,r,o,l,y),c();return}const b={areaToBar:u*.18,barsShrink:u*.22,barSlide:u*.22,axesHide:u*.03,barToRings:u*.07,ringsExpand:u*.18,ringsHold:u*.05,ringsToSeats:u*.07},M=y?_r.get(y):void 0;M&&(M.destroy(),y&&_r.delete(y));const A=U=>U<.18?"areaToBar":U<.4?"barsShrink":U<.62?"barSlide":U<.65?"axesHide":U<.72?"barToRings":U<.9?"ringsExpand":U<.95?"ringsHold":"ringsToSeats",k=new U0({seatsToRings:b.ringsToSeats,ringsHold:b.ringsHold,ringsToBar:b.barToRings,axesReveal:b.axesHide,barSlide:b.barSlide,barsGrow:b.barsShrink,barsToArea:b.areaToBar},{onStageComplete:U=>{},onProgress:U=>{if(m){const ct=A(U);m(U,ct)}},onComplete:()=>{c()}});y&&_r.set(y,k),d&&d(k.getControls().getTimeline());const O=t[0].map(U=>U.data).map(U=>U.timestamp),P=x??Math.max(...O),F=new Map,B=[];O.forEach((U,ct)=>{const ft=a(new Date(U)),wt=O[ct+1];if(wt){const zt=a(new Date(wt))-ft;B.push(zt)}});const L=B.length>0?B.reduce((U,ct)=>U+ct,0)/B.length:30;O.forEach((U,ct)=>{const ft=a(new Date(U)),wt=O[ct+1],zt=ct===O.length-1?L:a(new Date(wt))-ft;F.set(U,{x:ft,width:zt})});const $=k.getControls().getTimeline(),Y=b.areaToBar/1e3,I=y?`histogram-paths histogram-paths-${y}`:"histogram-paths",et=_.append("g").attr("class",I);O.forEach(U=>{const ct=F.get(U);ct&&n.forEach((ft,wt)=>{const St=Ni(t,n,F,s,l,wt,U,!1);if(!St)return;const zt=y?`histogram-path histogram-path-${y} category-${Ae(ft.dataKey)}`:`histogram-path category-${Ae(ft.dataKey)}`;et.append("path").attr("class",zt).attr("d",St).attr("fill",ft.color).attr("stroke",ft.color).attr("stroke-width",.5).attr("shape-rendering","crispEdges").attr("opacity",0).attr("data-category",ft.dataKey).attr("data-timestamp",U).attr("data-x-position",ct.x)})});const K=y?`.histogram-path-${y}`:".histogram-path",J=et.selectAll(K);$.to(w.nodes(),{opacity:0,duration:Y,ease:"power2.inOut"},"areaToBar"),$.to(J.nodes(),{opacity:1,duration:Y,ease:"power2.inOut"},"areaToBar");const st=b.barsShrink/1e3,lt=Y;J.each(function(){const U=parseFloat(this.getAttribute("data-timestamp")||"0");if(U===P)return;const ct=n.find(St=>this.classList.contains(`category-${Ae(St.dataKey)}`));if(!ct)return;const ft=n.indexOf(ct),wt=Ni(t,n,F,s,l,ft,U,!0);wt&&$.to(this,{attr:{d:wt},duration:st,ease:"power2.in"},lt)});const N=b.axesHide/1e3,j=lt+st;if(f){const U=e.select(".axis-x"),ct=e.select(".axis-y");U.empty()||$.to(U.node(),{opacity:0,duration:N,ease:"power2.inOut"},j),ct.empty()||$.to(ct.node(),{opacity:0,duration:N,ease:"power2.inOut"},j)}const nt=_.select(".grid-vertical"),Z=_.select(".grid-horizontal");nt.empty()||$.to(nt.node(),{opacity:0,duration:N,ease:"power2.inOut"},j),Z.empty()||$.to(Z.node(),{opacity:0,duration:N,ease:"power2.inOut"},j);const R=[];t.forEach((U,ct)=>{const ft=U.find(St=>St.data.timestamp===P);if(!ft)return;const wt=n[ct];wt&&R.push({category:wt.label,dataKey:wt.dataKey,color:wt.color,y0:ft[0],y1:ft[1]})}),R.sort((U,ct)=>ct.y0-U.y0);const z=R.reduce((U,ct)=>U+(ct.y1-ct.y0),0),D=r.radius-r.innerRadius,T=o/2,X=r.radius+10,Q=l-r.radius*.3,W=Math.max(X,Q),ut=D*.6,ot=l*.8,gt=W,yt=b.barSlide/1e3,vt=j+N,rt=666,at=J.nodes().filter(U=>parseFloat(U.getAttribute("data-timestamp")||"0")!==P);$.to(at,{opacity:0,duration:yt*.2,ease:"power2.out"},vt);const _t=J.nodes().filter(U=>parseFloat(U.getAttribute("data-timestamp")||"0")===P);_t.forEach(U=>{const ct=U.getAttribute("data-category");if(!ct)return;const ft=R.find(Ee=>Ee.dataKey===ct);if(!ft)return;const zt=(ft.y1-ft.y0)/z*ot;let re=0;for(const Ee of n){const De=R.find(Rn=>Rn.dataKey===Ee.dataKey);if(!De)continue;if(De.dataKey===ft.dataKey)break;const $e=(De.y1-De.y0)/z;re+=$e*ot}const le=gt-re,ht=gt-re-zt,Nt=rt-ut/2,ue=`M ${Nt} ${le} L ${Nt} ${ht} L ${Nt+ut} ${ht} L ${Nt+ut} ${le} Z`;$.to(U,{attr:{d:ue},duration:yt,ease:"power2.inOut"},vt)});const dt=b.barToRings/1e3,xt=vt+yt,Et=b.ringsExpand/1e3,At=xt+dt,ee=b.ringsHold/1e3,ne=At+Et,Pt=b.ringsToSeats/1e3,ge=ne+ee,Vt=Math.max(...r.seats.map(U=>U.ring)),Zt=r.seats.filter(U=>U.ring===Vt),Rt=_.append("g").attr("class",`slinky-${y||"h2p-default"}`),It=()=>{Rt.remove()};Zt.forEach((U,ct)=>{const ft=n.find(wt=>wt.label===U.category);ft&&Rt.append("line").attr("class","slinky-ring").attr("x1",0).attr("y1",0).attr("x2",0).attr("y2",0).attr("stroke",ft.color).attr("stroke-width",r.seatSize*2).attr("stroke-linecap","butt").attr("data-category",U.category).attr("data-category-index",U.categoryIndex).attr("data-ring-index",ct).attr("data-seat-x",T+U.x).attr("data-seat-y",W+U.y).attr("data-seat-angle",Math.atan2(U.y,U.x)).style("opacity",0)});const Re=Rt.selectAll(".slinky-ring").nodes(),Qt=rt,oe=ot/Re.length,we=[...Re].sort((U,ct)=>{const ft=parseFloat(U.getAttribute("data-seat-angle")||"0");return parseFloat(ct.getAttribute("data-seat-angle")||"0")-ft}),me=gt;we.forEach((U,ct)=>{const ft=me-ct*oe,St=ut/2,zt=Qt-St,re=Qt+St;U.setAttribute("x1",zt.toString()),U.setAttribute("y1",ft.toString()),U.setAttribute("x2",re.toString()),U.setAttribute("y2",ft.toString()),U.style.opacity="0"}),$.to(_t,{opacity:0,duration:dt*.7,ease:"power2.out"},xt+dt*.3),$.to(we,{opacity:1,duration:dt,ease:"power2.in",stagger:.005},xt);const Ge=D*.8;we.forEach((U,ct)=>{const ft=parseFloat(U.getAttribute("data-seat-x")||"0"),wt=parseFloat(U.getAttribute("data-seat-y")||"0"),St=parseFloat(U.getAttribute("data-seat-angle")||"0"),zt=(we.length-1-ct)/we.length*(Et*.4),re=parseFloat(U.getAttribute("x1")||"0"),le=parseFloat(U.getAttribute("y1")||"0"),ht=parseFloat(U.getAttribute("x2")||"0"),Nt=parseFloat(U.getAttribute("y2")||"0"),ue=(re+ht)/2,Ee=(le+Nt)/2,De=Math.atan2(Nt-le,ht-re),We=Math.sqrt(Math.pow(ht-re,2)+Math.pow(Nt-le,2)),$e=ft-Ge/2*Math.cos(St),Rn=wt-Ge/2*Math.sin(St);$.to({progress:0},{progress:1,duration:Et*.7,ease:"power2.out",onUpdate:function(){const Xe=this.progress(),ln=ue+($e-ue)*Xe,sr=Ee+(Rn-Ee)*Xe,Pr=De+(St-De)*Xe,or=(We+(Ge-We)*Xe)/2,fa=ln-or*Math.cos(Pr),_s=sr-or*Math.sin(Pr),ha=ln+or*Math.cos(Pr),V=sr+or*Math.sin(Pr);U.setAttribute("x1",fa.toString()),U.setAttribute("y1",_s.toString()),U.setAttribute("x2",ha.toString()),U.setAttribute("y2",V.toString())}},At+zt),$.to(U,{opacity:.9,duration:Et*.3,ease:"power2.in"},At+zt)}),$.call(()=>{m&&m($.progress(),"ringsHold")},[],ne);const sn=y?`parliament parliament-${y}`:"parliament",Ye=_.append("g").attr("class",sn);r.seats.forEach((U,ct)=>{const ft=n.find(ht=>ht.label===U.category);if(!ft)return;const wt=T+U.x,St=W+U.y;let zt,re,le;U.ring===Vt?(zt=wt,re=St,le=2):(zt=wt,re=St,le=U.radius),Ye.append("circle").attr("cx",zt).attr("cy",re).attr("r",le).attr("fill",ft.color).attr("stroke",ft.color).attr("stroke-width",.5).attr("opacity",0).attr("class",()=>y?`seat seat-${y} seat-${Ae(U.category)}`:`seat seat-${Ae(U.category)}`).attr("data-layout-index",ct).attr("data-ring",U.ring).attr("data-final-x",wt).attr("data-final-y",St).attr("data-final-r",U.radius)});const Fe=y?`.seat-${y}`:".seat",on=Ye.selectAll(Fe);$.to(Re,{opacity:0,duration:Pt*.2,ease:"power3.out"},ge),$.to(on.nodes(),{opacity:.8,duration:Pt*.3,ease:"power2.in"},ge+Pt*.25);const ye=on.nodes(),kt=[],Lt=[];ye.forEach(U=>{parseInt(U.getAttribute("data-ring")||"0")===Vt?kt.push(U):Lt.push(U)});const Mt=Pt*.2,Yt=Pt*.7;kt.forEach(U=>{const ct=parseFloat(U.getAttribute("data-final-r")||"4");$.to(U,{attr:{r:ct},opacity:1,duration:Yt*.6,ease:"power2.out"},ge+Mt)}),Lt.length>0&&$.to(Lt,{opacity:1,duration:Yt*.5,ease:"power2.in"},ge+Mt+Pt*.15);const _e=c;k.getControls().getTimeline().eventCallback("onComplete",()=>{const U=y?`.areas-${y}`:".areas",ct=y?`.histogram-paths-${y}`:".histogram-paths";e.selectAll(U).remove(),e.selectAll(ct).remove(),It(),e.selectAll(".axis-x").remove(),e.selectAll(".axis-y").remove(),_.selectAll(".grid-vertical").remove(),_.selectAll(".grid-horizontal").remove();const ft=y?`.parliament-label-${y}`:".parliament-label";if(e.select(ft).empty()){const St=o/2,zt=r.radius+10,re=l-r.radius*.3,le=Math.max(zt,re),ht=y?`parliament-label parliament-label-${y}`:"parliament-label",Nt=e.append("g").attr("class",ht).attr("transform",`translate(${St},${le-r.radius*.15})`).style("opacity","0").style("pointer-events","none");Nt.append("text").attr("class","label-category").attr("text-anchor","middle").attr("dy","-15").style("font-size","22px").style("fill","#666").style("font-family","system-ui, -apple-system, sans-serif"),Nt.append("text").attr("class","label-value").attr("text-anchor","middle").attr("dy","35").style("font-size","48px").style("font-weight","bold").style("font-family","system-ui, -apple-system, sans-serif");const ue=Nt.append("g").attr("class","scale-indicator").attr("transform","translate(0, 65)").style("opacity","0");ue.append("circle").attr("r",4).attr("cx",-30).attr("cy",0).style("fill","#888"),ue.append("text").attr("x",-20).attr("y",0).attr("dy","0.35em").attr("text-anchor","start").style("font-size","18px").style("fill","#666").style("font-style","italic").style("font-family","system-ui, -apple-system, sans-serif")}_e()}),k.play()}function iT(e,t,n,r,i,a){const s=r/2,o=n.radius+10,l=i-n.radius*.3,u=Math.max(o,l);H0(e,n,t,{centerX:s,centerY:u,addClasses:!0,instanceId:a,parliamentRadius:n.radius})}function qi(e,t,n,r,i){const a=i?`.parliament-label-${i}`:".parliament-label",s=Ot(e).select(a);if(!s.empty())if(t){s.style("opacity","1"),s.select(".label-category").text(t.label).style("fill","#666");const o=t.value>1?"repos":"repo";s.select(".label-value").text(`${t.value} ${o}`).style("fill",t.color);const l=s.select(".scale-indicator");n?l.style("opacity","1").select("text").text(`= ~${r} repos`):l.style("opacity","0")}else s.style("opacity","0")}function Ys(e,t,n,r,i,a,s,o,l){const u=e.querySelectorAll(".seat");if(!u||u.length===0)return;const c=n[n.length-1];if(!c)return;const f=[];u.forEach(p=>{const g=p;g.style.cursor="pointer",g.style.transition="fill-opacity 150ms ease, stroke-opacity 150ms ease"}),u.forEach(p=>{const m=(p.getAttribute("class")||"").split(/\s+/).filter(S=>S.startsWith("seat-")),x=m[m.length-1];if(!x)return;const y=x.substring(5),v=t.find(S=>Ae(S.label)===y);if(!v)return;const _=()=>{i(v.label);const S=Math.round(c.values[v.dataKey]||0),w=pf(v.color),b={label:v.label,value:S,color:w};a&&a(b),qi(e,b,s??!1,o??1,l),Ii(e,v.label)};p.addEventListener("mouseenter",_),f.push({element:p,handler:_})});const h=()=>{i(null),a&&a(null),qi(e,null,!1,1,l),Ii(e,null)};return e.addEventListener("mouseleave",h),r&&Ii(e,r),()=>{f.forEach(({element:p,handler:g})=>{p.removeEventListener("mouseenter",g)}),e.removeEventListener("mouseleave",h),u.forEach(p=>{const g=p;g.style.cursor="",g.style.transition=""})}}function Ii(e,t){const n=e.querySelectorAll(".seat"),r=t?Ae(t):null;n.forEach(i=>{const a=i,l=(i.getAttribute("class")||"").split(/\s+/).filter(f=>f.startsWith("seat-")),u=l[l.length-1];if(!u)return;const c=u.substring(5);r?c===r?(a.setAttribute("fill-opacity","1"),a.setAttribute("stroke-opacity","1")):(a.setAttribute("fill-opacity","0.3"),a.setAttribute("stroke-opacity","0.2")):(a.setAttribute("fill-opacity","1"),a.setAttribute("stroke-opacity","1"))})}const G0=({data:e,categories:t,mode:n,width:r=900,height:i=400,margin:a={top:10,right:30,bottom:40,left:60},timeRange:s,showGrid:o=!0,showAxes:l=!0,axisLabelColor:u,axisLabelSize:c=14,formatDate:f,formatValue:h,markers:p=[],arcAngle:g=200,parliamentRadius:d=200,seatSize:m=4.5,animationDuration:x=900,onMorphComplete:y,onAnimationStateChange:v,onTimelineReady:_,onAnimationProgress:S,onHoveredDataChange:w,hoveredCategory:b,maxSeats:M=500,showTooltip:A=!0,showTable:k=!1,showScaledIndicator:C=!0,parliamentTimestamp:O,enableBrush:P=!1,onTimeRangeChange:F,minAllowedTime:B,maxAllowedTime:L,timelineEvents:$=[],showTimeline:Y=!1,timelineHeight:I=40,timelineOffset:et,brushColor:K="#69b3a2",showCrosshair:J=!1,crosshairColor:st="#666",crosshairDashArray:lt="4,4"})=>{const N=G.useRef(null),[j,nt]=G.useState(null),Z=G.useCallback(rt=>{w&&w(rt)},[w]),R=12,D=et??6+R+c+R,T=e[e.length-1],X=T?t.reduce((rt,at)=>rt+(T.values[at.dataKey]||0),0):0,Q=X>M,W=Q?Math.round(X/M):1,ut=Y&&n==="stacked-area"?i+I+D:i,{isMorphing:H,currentMode:ot,visibleMarkers:gt,hoveredMarker:yt,hoveredTimelineEvent:vt}=JS({containerRef:N,data:e,categories:t,mode:n,width:r,height:i,margin:a,timeRange:s,showGrid:o,showAxes:l,axisLabelColor:u,axisLabelSize:c,formatDate:f,formatValue:h,markers:p,arcAngle:g,parliamentRadius:d,seatSize:m,animationDuration:x,onMorphComplete:y,onAnimationStateChange:v,onTimelineReady:_,onAnimationProgress:S,onHoveredDataChange:Z,hoveredCategory:b,maxSeats:M,parliamentTimestamp:O,enableBrush:P,onTimeRangeChange:F,minAllowedTime:B,maxAllowedTime:L,showScaleIndicator:C&&Q,reposPerSeat:W,timelineEvents:$,showTimeline:Y,timelineHeight:I,timelineOffset:D,brushColor:K,showCrosshair:J,onCrosshairMove:J?nt:void 0});return E.jsxs(q.Box,{sx:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:[E.jsx("svg",{ref:N,viewBox:`0 0 ${r} ${ut}`,preserveAspectRatio:"xMidYMid meet",style:{width:"100%",height:"auto",display:"block"}}),J&&j&&ot==="area"&&!H&&E.jsxs("svg",{viewBox:`0 0 ${r} ${ut}`,preserveAspectRatio:"xMidYMid meet",style:{position:"absolute",top:0,left:0,width:"100%",height:"auto",pointerEvents:"none"},children:[E.jsx("line",{x1:j.x,y1:a.top,x2:j.x,y2:i-a.bottom,stroke:st,strokeDasharray:lt,strokeWidth:1}),E.jsx("line",{x1:a.left,y1:j.y,x2:r-a.right,y2:j.y,stroke:st,strokeDasharray:lt,strokeWidth:1})]}),ot==="area"&&gt.map(rt=>{const at=(rt.x+a.left)/r*100,_t=a.top/i*100,dt=new Date(rt.timestamp),xt=f?f(rt.timestamp):dt.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0}),Et=E.jsxs(q.Box,{children:[E.jsx(q.Box,{sx:{color:"#B6BFFF",fontFamily:"monospace",fontSize:"0.8125rem",mb:rt.label?.5:0},children:xt}),rt.label&&E.jsx(q.Box,{sx:{color:"white",fontWeight:500},children:rt.label})]});return E.jsx(q.Tooltip,{title:Et,open:(yt==null?void 0:yt.timestamp)===rt.timestamp,placement:"top",arrow:!0,slotProps:{tooltip:{sx:{bgcolor:"#131E7A",fontSize:"0.875rem",px:2,py:1,borderRadius:1,boxShadow:"0px 2px 8px rgba(0,0,0,0.15)","& .MuiTooltip-arrow":{color:"#131E7A"}}},popper:{sx:{pointerEvents:"none"}}},children:E.jsx(q.Box,{sx:{position:"absolute",left:`${at}%`,top:`${_t}%`,width:"1px",height:`${(i-a.top-a.bottom)/i*100}%`,pointerEvents:"none"}})},rt.timestamp)}),vt&&ot==="area"&&E.jsx(q.Tooltip,{title:E.jsxs(q.Box,{children:[E.jsx(q.Box,{sx:{color:"#B6BFFF",fontFamily:"monospace",fontSize:"0.8125rem",mb:.5},children:f?f(vt.timestamp):new Date(vt.timestamp).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0})}),E.jsx(q.Box,{sx:{color:"white",fontWeight:500},children:vt.eventName})]}),open:!0,placement:"top",arrow:!0,slotProps:{tooltip:{sx:{bgcolor:"#131E7A",fontSize:"0.875rem",px:2,py:1,borderRadius:1,boxShadow:"0px 2px 8px rgba(0,0,0,0.15)","& .MuiTooltip-arrow":{color:"#131E7A"}}},popper:{sx:{pointerEvents:"none"}}},children:E.jsx(q.Box,{sx:{position:"absolute",left:`${(vt.x+a.left)/r*100}%`,top:`${(i+D+I/2)/ut*100}%`,width:"1px",height:"1px",pointerEvents:"none"}})}),H&&E.jsxs(q.Box,{sx:{position:"absolute",top:8,right:8,padding:"4px 8px",backgroundColor:"rgba(0,0,0,0.7)",color:"white",borderRadius:"4px",fontSize:"12px",pointerEvents:"none",display:"none"},children:["Morphing: ",ot," → ",n]})]})},Y0=[{minRepos:0,maxRepos:10,minArc:90,maxArc:90,minSeatSize:28,maxSeatSize:28},{minRepos:10,maxRepos:25,minArc:90,maxArc:110,minSeatSize:24,maxSeatSize:24},{minRepos:25,maxRepos:50,minArc:110,maxArc:120,minSeatSize:20,maxSeatSize:20},{minRepos:50,maxRepos:100,minArc:120,maxArc:150,minSeatSize:16.5,maxSeatSize:16.5},{minRepos:100,maxRepos:200,minArc:150,maxArc:180,minSeatSize:15,maxSeatSize:15},{minRepos:200,maxRepos:1/0,minArc:180,maxArc:180,minSeatSize:14.5,maxSeatSize:14.5}],df=({repositoryCount:e})=>{const t=Y0.find(o=>e>=o.minRepos&&e<o.maxRepos);if(!t)return 180;if(t.minArc===t.maxArc)return t.minArc;const n=t.maxRepos-t.minRepos,i=(e-t.minRepos)/n,a=t.maxArc-t.minArc,s=t.minArc+a*i;return Math.round(s)},gf=({repositoryCount:e})=>{const t=Y0.find(o=>e>=o.minRepos&&e<o.maxRepos);if(!t)return 6.5;if(t.minSeatSize===t.maxSeatSize)return t.minSeatSize;const n=t.maxRepos-t.minRepos,i=(e-t.minRepos)/n,a=t.maxSeatSize-t.minSeatSize,s=t.minSeatSize+a*i;return Math.round(s*10)/10};class ia{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ia.prototype.normal={};ia.prototype.property={};ia.prototype.space=void 0;function W0(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ia(n,r,t)}function ta(e){return e.toLowerCase()}class je{constructor(t,n){this.attribute=n,this.property=t}}je.prototype.attribute="";je.prototype.booleanish=!1;je.prototype.boolean=!1;je.prototype.commaOrSpaceSeparated=!1;je.prototype.commaSeparated=!1;je.prototype.defined=!1;je.prototype.mustUseProperty=!1;je.prototype.number=!1;je.prototype.overloadedBoolean=!1;je.prototype.property="";je.prototype.spaceSeparated=!1;je.prototype.space=void 0;let aT=0;const mt=Dr(),ae=Dr(),Mc=Dr(),tt=Dr(),qt=Dr(),Zr=Dr(),Ve=Dr();function Dr(){return 2**++aT}const Ac=Object.freeze(Object.defineProperty({__proto__:null,boolean:mt,booleanish:ae,commaOrSpaceSeparated:Ve,commaSeparated:Zr,number:tt,overloadedBoolean:Mc,spaceSeparated:qt},Symbol.toStringTag,{value:"Module"})),Ws=Object.keys(Ac);class mf extends je{constructor(t,n,r,i){let a=-1;if(super(t,n),Ih(this,"space",i),typeof r=="number")for(;++a<Ws.length;){const s=Ws[a];Ih(this,Ws[a],(r&Ac[s])===Ac[s])}}}mf.prototype.defined=!0;function Ih(e,t,n){n&&(e[t]=n)}function di(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new mf(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ta(r)]=r,n[ta(a.attribute)]=r}return new ia(t,n,e.space)}const X0=di({properties:{ariaActiveDescendant:null,ariaAtomic:ae,ariaAutoComplete:null,ariaBusy:ae,ariaChecked:ae,ariaColCount:tt,ariaColIndex:tt,ariaColSpan:tt,ariaControls:qt,ariaCurrent:null,ariaDescribedBy:qt,ariaDetails:null,ariaDisabled:ae,ariaDropEffect:qt,ariaErrorMessage:null,ariaExpanded:ae,ariaFlowTo:qt,ariaGrabbed:ae,ariaHasPopup:null,ariaHidden:ae,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:qt,ariaLevel:tt,ariaLive:null,ariaModal:ae,ariaMultiLine:ae,ariaMultiSelectable:ae,ariaOrientation:null,ariaOwns:qt,ariaPlaceholder:null,ariaPosInSet:tt,ariaPressed:ae,ariaReadOnly:ae,ariaRelevant:null,ariaRequired:ae,ariaRoleDescription:qt,ariaRowCount:tt,ariaRowIndex:tt,ariaRowSpan:tt,ariaSelected:ae,ariaSetSize:tt,ariaSort:null,ariaValueMax:tt,ariaValueMin:tt,ariaValueNow:tt,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function K0(e,t){return t in e?e[t]:t}function V0(e,t){return K0(e,t.toLowerCase())}const sT=di({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Zr,acceptCharset:qt,accessKey:qt,action:null,allow:null,allowFullScreen:mt,allowPaymentRequest:mt,allowUserMedia:mt,alt:null,as:null,async:mt,autoCapitalize:null,autoComplete:qt,autoFocus:mt,autoPlay:mt,blocking:qt,capture:null,charSet:null,checked:mt,cite:null,className:qt,cols:tt,colSpan:null,content:null,contentEditable:ae,controls:mt,controlsList:qt,coords:tt|Zr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:mt,defer:mt,dir:null,dirName:null,disabled:mt,download:Mc,draggable:ae,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:mt,formTarget:null,headers:qt,height:tt,hidden:Mc,high:tt,href:null,hrefLang:null,htmlFor:qt,httpEquiv:qt,id:null,imageSizes:null,imageSrcSet:null,inert:mt,inputMode:null,integrity:null,is:null,isMap:mt,itemId:null,itemProp:qt,itemRef:qt,itemScope:mt,itemType:qt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:mt,low:tt,manifest:null,max:null,maxLength:tt,media:null,method:null,min:null,minLength:tt,multiple:mt,muted:mt,name:null,nonce:null,noModule:mt,noValidate:mt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:mt,optimum:tt,pattern:null,ping:qt,placeholder:null,playsInline:mt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:mt,referrerPolicy:null,rel:qt,required:mt,reversed:mt,rows:tt,rowSpan:tt,sandbox:qt,scope:null,scoped:mt,seamless:mt,selected:mt,shadowRootClonable:mt,shadowRootDelegatesFocus:mt,shadowRootMode:null,shape:null,size:tt,sizes:null,slot:null,span:tt,spellCheck:ae,src:null,srcDoc:null,srcLang:null,srcSet:null,start:tt,step:null,style:null,tabIndex:tt,target:null,title:null,translate:null,type:null,typeMustMatch:mt,useMap:null,value:ae,width:tt,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:qt,axis:null,background:null,bgColor:null,border:tt,borderColor:null,bottomMargin:tt,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:mt,declare:mt,event:null,face:null,frame:null,frameBorder:null,hSpace:tt,leftMargin:tt,link:null,longDesc:null,lowSrc:null,marginHeight:tt,marginWidth:tt,noResize:mt,noHref:mt,noShade:mt,noWrap:mt,object:null,profile:null,prompt:null,rev:null,rightMargin:tt,rules:null,scheme:null,scrolling:ae,standby:null,summary:null,text:null,topMargin:tt,valueType:null,version:null,vAlign:null,vLink:null,vSpace:tt,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:mt,disableRemotePlayback:mt,prefix:null,property:null,results:tt,security:null,unselectable:null},space:"html",transform:V0}),oT=di({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ve,accentHeight:tt,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:tt,amplitude:tt,arabicForm:null,ascent:tt,attributeName:null,attributeType:null,azimuth:tt,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:tt,by:null,calcMode:null,capHeight:tt,className:qt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:tt,diffuseConstant:tt,direction:null,display:null,dur:null,divisor:tt,dominantBaseline:null,download:mt,dx:null,dy:null,edgeMode:null,editable:null,elevation:tt,enableBackground:null,end:null,event:null,exponent:tt,externalResourcesRequired:null,fill:null,fillOpacity:tt,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Zr,g2:Zr,glyphName:Zr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:tt,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:tt,horizOriginX:tt,horizOriginY:tt,id:null,ideographic:tt,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:tt,k:tt,k1:tt,k2:tt,k3:tt,k4:tt,kernelMatrix:Ve,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:tt,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:tt,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:tt,overlineThickness:tt,paintOrder:null,panose1:null,path:null,pathLength:tt,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:qt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:tt,pointsAtY:tt,pointsAtZ:tt,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ve,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ve,rev:Ve,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ve,requiredFeatures:Ve,requiredFonts:Ve,requiredFormats:Ve,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:tt,specularExponent:tt,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:tt,strikethroughThickness:tt,string:null,stroke:null,strokeDashArray:Ve,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:tt,strokeOpacity:tt,strokeWidth:null,style:null,surfaceScale:tt,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ve,tabIndex:tt,tableValues:null,target:null,targetX:tt,targetY:tt,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ve,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:tt,underlineThickness:tt,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:tt,values:null,vAlphabetic:tt,vMathematical:tt,vectorEffect:null,vHanging:tt,vIdeographic:tt,version:null,vertAdvY:tt,vertOriginX:tt,vertOriginY:tt,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:tt,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:K0}),Z0=di({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Q0=di({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:V0}),J0=di({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),lT=/[A-Z]/g,zh=/-[a-z]/g,uT=/^data[-\w.:]+$/i;function ty(e,t){const n=ta(t);let r=t,i=je;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&uT.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(zh,fT);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!zh.test(a)){let s=a.replace(lT,cT);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=mf}return new i(r,t)}function cT(e){return"-"+e.toLowerCase()}function fT(e){return e.charAt(1).toUpperCase()}const ey=W0([X0,sT,Z0,Q0,J0],"html"),yf=W0([X0,oT,Z0,Q0,J0],"svg");function Bh(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const s=n.slice(i,r).trim();(s||!a)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function hT(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Uh=/[#.]/g;function pT(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){Uh.lastIndex=i;const o=Uh.exec(n),l=n.slice(i,o?o.index:n.length);l&&(a?a==="#"?r.id=l:Array.isArray(r.className)?r.className.push(l):r.className=[l]:s=l,i+=l.length),o&&(a=o[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function Hh(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function dT(e){return e.join(" ").trim()}function ny(e,t,n){const r=n?_T(n):void 0;function i(a,s,...o){let l;if(a==null){l={type:"root",children:[]};const u=s;o.unshift(u)}else{l=pT(a,t);const u=l.tagName.toLowerCase(),c=r?r.get(u):void 0;if(l.tagName=c||u,gT(s))o.unshift(s);else for(const[f,h]of Object.entries(s))mT(e,l.properties,f,h)}for(const u of o)kc(l.children,u);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return i}function gT(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const s of a)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function mT(e,t,n,r){const i=ty(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?i.spaceSeparated?a=Hh(r):i.commaSeparated?a=Bh(r):i.commaOrSpaceSeparated?a=Hh(Bh(r).join(" ")):a=jh(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?yT(r):String(r);if(Array.isArray(a)){const s=[];for(const o of a)s.push(jh(i,i.property,o));a=s}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function kc(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)kc(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?kc(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function jh(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||ta(n)===ta(t)))return!0}return n}function yT(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function _T(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const xT=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"];ny(ey,"div");const aa=ny(yf,"g",xT),ry=(e=aa)=>e("pattern",{id:"greyHatchPattern",x:0,y:0,width:8,height:8,patternUnits:"userSpaceOnUse"},[e("rect",{x:0,y:0,width:8,height:8,fill:pn.neoGrey[200]}),e("path",{d:"M0,2 L8,2",stroke:pn.neoGrey[400],"stroke-width":.5}),e("path",{d:"M0,6 L8,6",stroke:pn.neoGrey[400],"stroke-width":.5})]),iy=(e=aa)=>e("pattern",{id:"dataMissingHatchPattern",x:0,y:0,width:8,height:8,patternUnits:"userSpaceOnUse"},[e("rect",{x:0,y:0,width:8,height:8,fill:"#FFF3CC"}),e("path",{d:"M0,8 L8,0",stroke:"#FFB800","stroke-width":.5}),e("path",{d:"M-2,2 L2,-2",stroke:"#FFB800","stroke-width":.5}),e("path",{d:"M6,10 L10,6",stroke:"#FFB800","stroke-width":.5})]),ay=(e=aa)=>e("pattern",{id:"noLstHatchPattern",x:0,y:0,width:8,height:8,patternUnits:"userSpaceOnUse"},[e("rect",{x:0,y:0,width:8,height:8,fill:"#FFE5E5"}),e("path",{d:"M0,0 L8,8",stroke:"#ED4134","stroke-width":.5}),e("path",{d:"M-2,6 L2,10",stroke:"#ED4134","stroke-width":.5}),e("path",{d:"M6,-2 L10,2",stroke:"#ED4134","stroke-width":.5})]),Dt={greyHatch:{background:pn.neoGrey[200],lines:pn.neoGrey[400]},dataMissingHatch:{background:"#FFF3CC",lines:"#FFB800"},noLstHatch:{background:"#FFE5E5",lines:"#ED4134"}},vT=({categories:e,activeCategory:t,onCategoryHover:n,mode:r,visible:i=!0})=>E.jsx(q.Box,{className:"category-table",sx:{width:"100%",display:"flex",justifyContent:"center",opacity:i?1:0,transition:"opacity 0.3s ease-in-out","@media (min-width: 1024px) and (max-width: 1225px)":{overflowX:"auto",maxWidth:"100%"}},onMouseLeave:()=>n(null),children:E.jsxs(q.Table,{"aria-label":"Categories summary",className:"category-summary-table",size:"small",sx:{maxWidth:{xs:"clamp(360px, 90%, 400px)",sm:"clamp(360px, 90%, 400px)",md:"clamp(360px, 85%, 420px)",lg:"clamp(360px, 90%, 400px)"},"@media (min-width: 1024px) and (max-width: 1225px)":{maxWidth:"360px","& .MuiTableCell-root":{padding:"1px 4px",fontSize:"9.5px"}},"& .MuiTableCell-root":{paddingTop:"1px",paddingBottom:"1px",paddingLeft:0,paddingRight:"4px",borderBottom:"none",fontSize:"clamp(10px, 1.8vw, 12px)"}},children:[E.jsx("thead",{children:E.jsxs(q.TableRow,{sx:{"& .MuiTableCell-root":{borderBottom:"1px solid",borderColor:"grey.300",pb:"2px"}},children:[E.jsx(q.TableCell,{colSpan:2,sx:{fontWeight:500},children:"Category"}),r==="point-in-time"?E.jsxs(E.Fragment,{children:[E.jsx(q.TableCell,{align:"right",sx:{fontWeight:500},children:"# of repositories"}),E.jsx(q.TableCell,{align:"right",sx:{fontWeight:500},children:"Percentage"})]}):E.jsxs(E.Fragment,{children:[E.jsx(q.TableCell,{align:"right",sx:{fontWeight:500},children:"Last"}),E.jsx(q.TableCell,{align:"right",sx:{fontWeight:500},children:"Max"}),E.jsx(q.TableCell,{align:"right",sx:{fontWeight:500},children:"Min"})]})]})}),E.jsx("tbody",{children:e.map(a=>{const s=a.color==="url(#greyHatchPattern)"?Dt.greyHatch.lines:a.color==="url(#dataMissingHatchPattern)"?Dt.dataMissingHatch.lines:a.color==="url(#noLstHatchPattern)"?Dt.noLstHatch.lines:a.color;return E.jsxs(q.TableRow,{onMouseEnter:()=>n(a.id),sx:{cursor:"pointer",transition:"background-color 0.15s ease",backgroundColor:t===a.id?`${s}15`:"transparent","&:hover":{backgroundColor:`${s}15`}},children:[E.jsx(q.TableCell,{align:"center",sx:{width:20},children:E.jsx(q.Box,{sx:{width:r==="historical"?4:12,height:12,backgroundColor:a.color==="url(#greyHatchPattern)"?Dt.greyHatch.background:a.color==="url(#dataMissingHatchPattern)"?Dt.dataMissingHatch.background:a.color==="url(#noLstHatchPattern)"?Dt.noLstHatch.background:a.color,borderRadius:r==="historical"?2:"50%",position:"relative",overflow:"hidden",transition:"transform 0.15s ease",transform:t===a.id?"scale(1.2)":"scale(1)",...a.label==="N/A"&&{"&::after":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`repeating-linear-gradient(
16
16
  0deg,
17
17
  transparent,
18
18
  transparent 3px,
@@ -44,7 +44,7 @@
44
44
  \f\r &>`.split(""),`\0
45
45
  \f\r "&'<=>\``.split("")],[`\0
46
46
  \f\r "&'<=>\``.split(""),`\0
47
- \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function _M(e,t,n,r){const i=r.schema,a=i.space==="svg"?!1:r.settings.omitOptionalTags;let s=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const o=[];let l;i.space==="html"&&e.tagName==="svg"&&(r.schema=yf);const u=xM(r,e.properties),c=r.all(i.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=i,c&&(s=!1),(u||!a||!hM(e,t,n))&&(o.push("<",e.tagName,u?" "+u:""),s&&(i.space==="svg"||r.settings.closeSelfClosing)&&(l=u.charAt(u.length-1),(!r.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&o.push(" "),o.push("/")),o.push(">")),o.push(c),!s&&(!a||!xf(e,t,n))&&o.push("</"+e.tagName+">"),o.join("")}function xM(e,t){const n=[];let r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){const a=vM(e,i,t[i]);a&&n.push(a)}}for(;++r<n.length;){const a=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&a!=='"'&&a!=="'"&&(n[r]+=" ")}return n.join("")}function vM(e,t,n){const r=ty(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,a=e.settings.allowDangerousCharacters?0:1;let s=e.quote,o;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const l=Qr(r.attribute,Object.assign({},e.settings.characterReferences,{subset:wa.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?hT:dT)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?l:(e.settings.preferUnquoted&&(o=Qr(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:wa.unquoted[i][a]}))),o!==n&&(e.settings.quoteSmart&&Xh(n,s)>Xh(n,e.alternative)&&(s=e.alternative),o=s+Qr(n,Object.assign({},e.settings.characterReferences,{subset:(s==="'"?wa.single:wa.double)[i][a],attribute:!0}))+s),l+(o&&"="+o))}const bM=["<","&"];function hy(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Qr(e.value,Object.assign({},r.settings.characterReferences,{subset:bM}))}function wM(e,t,n,r){return r.settings.allowDangerousHtml?e.value:hy(e,t,n,r)}function SM(e,t,n,r){return r.all(e)}const TM=RT("type",{invalid:MM,unknown:AM,handlers:{comment:KT,doctype:VT,element:_M,raw:wM,root:SM,text:hy}});function MM(e){throw new Error("Expected node, not `"+e+"`")}function AM(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const kM={},CM={},RM=[];function EM(e,t){const n=kM,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:DM,all:OM,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||CT,characterReferences:n.characterReferences||CM,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?yf:ey,quote:r,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function DM(e,t,n){return TM(e,t,n,this)}function OM(e){const t=[],n=e&&e.children||RM;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}const Pe={arcAngle:180,maxSeats:200,useEnhanced:!0,chartConfig:{radius:220,seatSize:5,minSeatSize:4,maxSeatSize:18,spacing:1.1,innerRadiusRatio:.4,arcAngleFlexibility:5},colors:{emptySeats:"#f8f8f8",emptySeatsBorder:"#d8d8d8",seatBorder:"#fff"},animation:{transitionDuration:"0.2s",hoverOpacity:{active:"1",dimmed:"0.2",empty:"0.3"}},scaling:{enableScaling:!0,scaleThreshold:200}},Jr={COMPLETED:pn.neoDigitalGreen[600],NOT_APPLICABLE:"url(#greyHatchPattern)",NO_LST:"url(#noLstHatchPattern)",DATA_MISSING:"url(#dataMissingHatchPattern)"},zi="N/A",Bi="No LST",Ui="Data Missing";function PM(e,t,n,r="left-to-right",i=900,a){Ot.prototype.transition=Ic;const s=t*Math.PI/180,o=-s/2-Math.PI/2,l=s/2-Math.PI/2;let u=e.querySelector("defs");u||(u=document.createElementNS("http://www.w3.org/2000/svg","defs"),e.appendChild(u));const c="arc-sweep-clip";let f=u.querySelector(`#${c}`);f||(f=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),f.setAttribute("id",c),u.appendChild(f));const h=document.createElementNS("http://www.w3.org/2000/svg","path");f.innerHTML="",f.appendChild(h);const p=e.querySelector(".arc-container"),g=e.querySelector(".points-container");if(g&&p)if(g.setAttribute("clip-path",`url(#${c})`),r==="left-to-right"){const m=y=>{const v=n*1.5,_=Math.cos(y)*v,S=Math.sin(y)*v,w=Math.cos(l)*v,b=Math.sin(l)*v,M=l-y>Math.PI?1:0;return`M 0,0 L ${_},${S} A ${v},${v} 0 ${M},1 ${w},${b} Z`};h.setAttribute("d",m(o)),Ot(h).transition().duration(i).ease(y=>1-Math.pow(1-y,3)).tween("arc-sweep",()=>y=>{const v=o+(l-o)*y;h.setAttribute("d",m(v))}).on("end",()=>{a&&a(),setTimeout(()=>{g.removeAttribute("clip-path")},50)})}else{const m=y=>{const v=n*1.5,_=Math.cos(y)*v,S=Math.sin(y)*v,w=Math.cos(l)*v,b=Math.sin(l)*v,M=l-y>Math.PI?1:0;return`M 0,0 L ${_},${S} A ${v},${v} 0 ${M},1 ${w},${b} Z`};h.setAttribute("d",m(l)),Ot(h).transition().duration(i).ease(y=>1-Math.pow(1-y,3)).tween("arc-sweep",()=>y=>{const v=l-(l-o)*y;h.setAttribute("d",m(v))}).on("end",()=>{g.removeAttribute("clip-path"),a&&a()})}}var Sa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vs,Qh;function py(){if(Qh)return Vs;Qh=1;var e=typeof Sa=="object"&&Sa&&Sa.Object===Object&&Sa;return Vs=e,Vs}var Zs,Jh;function Cn(){if(Jh)return Zs;Jh=1;var e=py(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return Zs=n,Zs}var Qs,tp;function FM(){if(tp)return Qs;tp=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return Qs=t,Qs}var Js,ep;function $M(){if(ep)return Js;ep=1;var e=FM(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return Js=n,Js}var to,np;function sa(){if(np)return to;np=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return to=e,to}var eo,rp;function oa(){if(rp)return eo;rp=1;var e=Cn(),t=e.Symbol;return eo=t,eo}var no,ip;function LM(){if(ip)return no;ip=1;var e=oa(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function a(s){var o=n.call(s,i),l=s[i];try{s[i]=void 0;var u=!0}catch{}var c=r.call(s);return u&&(o?s[i]=l:delete s[i]),c}return no=a,no}var ro,ap;function NM(){if(ap)return ro;ap=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return ro=n,ro}var io,sp;function la(){if(sp)return io;sp=1;var e=oa(),t=LM(),n=NM(),r="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function s(o){return o==null?o===void 0?i:r:a&&a in Object(o)?t(o):n(o)}return io=s,io}var ao,op;function ua(){if(op)return ao;op=1;function e(t){return t!=null&&typeof t=="object"}return ao=e,ao}var so,lp;function ca(){if(lp)return so;lp=1;var e=la(),t=ua(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return so=r,so}var oo,up;function dy(){if(up)return oo;up=1;var e=$M(),t=sa(),n=ca(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,o=parseInt;function l(u){if(typeof u=="number")return u;if(n(u))return r;if(t(u)){var c=typeof u.valueOf=="function"?u.valueOf():u;u=t(c)?c+"":c}if(typeof u!="string")return u===0?u:+u;u=e(u);var f=a.test(u);return f||s.test(u)?o(u.slice(2),f?2:8):i.test(u)?r:+u}return oo=l,oo}var lo,cp;function gy(){if(cp)return lo;cp=1;var e=dy(),t=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var a=i<0?-1:1;return a*n}return i===i?i:0}return lo=r,lo}var uo,fp;function my(){if(fp)return uo;fp=1;var e=gy();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return uo=t,uo}var co,hp;function us(){if(hp)return co;hp=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,a=Array(i);++r<i;)a[r]=n(t[r],r,t);return a}return co=e,co}var fo,pp;function dn(){if(pp)return fo;pp=1;var e=Array.isArray;return fo=e,fo}var ho,dp;function qM(){if(dp)return ho;dp=1;var e=oa(),t=us(),n=dn(),r=ca(),i=e?e.prototype:void 0,a=i?i.toString:void 0;function s(o){if(typeof o=="string")return o;if(n(o))return t(o,s)+"";if(r(o))return a?a.call(o):"";var l=o+"";return l=="0"&&1/o==-1/0?"-0":l}return ho=s,ho}var po,gp;function yy(){if(gp)return po;gp=1;var e=qM();function t(n){return n==null?"":e(n)}return po=t,po}var go,mp;function IM(){if(mp)return go;mp=1;var e=Cn(),t=my(),n=dy(),r=yy(),i=e.isFinite,a=Math.min;function s(o){var l=Math[o];return function(u,c){if(u=n(u),c=c==null?0:a(t(c),292),c&&i(u)){var f=(r(u)+"e").split("e"),h=l(f[0]+"e"+(+f[1]+c));return f=(r(h)+"e").split("e"),+(f[0]+"e"+(+f[1]-c))}return l(u)}}return go=s,go}var mo,yp;function zM(){if(yp)return mo;yp=1;var e=IM(),t=e("round");return mo=t,mo}var BM=zM();const UM=gi(BM);var yo,_p;function _y(){if(_p)return yo;_p=1;function e(t,n){for(var r=-1,i=n.length,a=t.length;++r<i;)t[a+r]=n[r];return t}return yo=e,yo}var _o,xp;function HM(){if(xp)return _o;xp=1;var e=la(),t=ua(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return _o=r,_o}var xo,vp;function vf(){if(vp)return xo;vp=1;var e=HM(),t=ua(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,a=e((function(){return arguments})())?e:function(s){return t(s)&&r.call(s,"callee")&&!i.call(s,"callee")};return xo=a,xo}var vo,bp;function jM(){if(bp)return vo;bp=1;var e=oa(),t=vf(),n=dn(),r=e?e.isConcatSpreadable:void 0;function i(a){return n(a)||t(a)||!!(r&&a&&a[r])}return vo=i,vo}var bo,wp;function xy(){if(wp)return bo;wp=1;var e=_y(),t=jM();function n(r,i,a,s,o){var l=-1,u=r.length;for(a||(a=t),o||(o=[]);++l<u;){var c=r[l];i>0&&a(c)?i>1?n(c,i-1,a,s,o):e(o,c):s||(o[o.length]=c)}return o}return bo=n,bo}var wo,Sp;function bf(){if(Sp)return wo;Sp=1;var e=dn(),t=ca(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(a,s){if(e(a))return!1;var o=typeof a;return o=="number"||o=="symbol"||o=="boolean"||a==null||t(a)?!0:r.test(a)||!n.test(a)||s!=null&&a in Object(s)}return wo=i,wo}var So,Tp;function vy(){if(Tp)return So;Tp=1;var e=la(),t=sa(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function s(o){if(!t(o))return!1;var l=e(o);return l==r||l==i||l==n||l==a}return So=s,So}var To,Mp;function GM(){if(Mp)return To;Mp=1;var e=Cn(),t=e["__core-js_shared__"];return To=t,To}var Mo,Ap;function YM(){if(Ap)return Mo;Ap=1;var e=GM(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return Mo=n,Mo}var Ao,kp;function by(){if(kp)return Ao;kp=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return Ao=n,Ao}var ko,Cp;function WM(){if(Cp)return ko;Cp=1;var e=vy(),t=YM(),n=sa(),r=by(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,s=Function.prototype,o=Object.prototype,l=s.toString,u=o.hasOwnProperty,c=RegExp("^"+l.call(u).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(h){if(!n(h)||t(h))return!1;var p=e(h)?c:a;return p.test(r(h))}return ko=f,ko}var Co,Rp;function XM(){if(Rp)return Co;Rp=1;function e(t,n){return t==null?void 0:t[n]}return Co=e,Co}var Ro,Ep;function Or(){if(Ep)return Ro;Ep=1;var e=WM(),t=XM();function n(r,i){var a=t(r,i);return e(a)?a:void 0}return Ro=n,Ro}var Eo,Dp;function cs(){if(Dp)return Eo;Dp=1;var e=Or(),t=e(Object,"create");return Eo=t,Eo}var Do,Op;function KM(){if(Op)return Do;Op=1;var e=cs();function t(){this.__data__=e?e(null):{},this.size=0}return Do=t,Do}var Oo,Pp;function VM(){if(Pp)return Oo;Pp=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return Oo=e,Oo}var Po,Fp;function ZM(){if(Fp)return Po;Fp=1;var e=cs(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(a){var s=this.__data__;if(e){var o=s[a];return o===t?void 0:o}return r.call(s,a)?s[a]:void 0}return Po=i,Po}var Fo,$p;function QM(){if($p)return Fo;$p=1;var e=cs(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var a=this.__data__;return e?a[i]!==void 0:n.call(a,i)}return Fo=r,Fo}var $o,Lp;function JM(){if(Lp)return $o;Lp=1;var e=cs(),t="__lodash_hash_undefined__";function n(r,i){var a=this.__data__;return this.size+=this.has(r)?0:1,a[r]=e&&i===void 0?t:i,this}return $o=n,$o}var Lo,Np;function tA(){if(Np)return Lo;Np=1;var e=KM(),t=VM(),n=ZM(),r=QM(),i=JM();function a(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o<l;){var u=s[o];this.set(u[0],u[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,Lo=a,Lo}var No,qp;function eA(){if(qp)return No;qp=1;function e(){this.__data__=[],this.size=0}return No=e,No}var qo,Ip;function wf(){if(Ip)return qo;Ip=1;function e(t,n){return t===n||t!==t&&n!==n}return qo=e,qo}var Io,zp;function fs(){if(zp)return Io;zp=1;var e=wf();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return Io=t,Io}var zo,Bp;function nA(){if(Bp)return zo;Bp=1;var e=fs(),t=Array.prototype,n=t.splice;function r(i){var a=this.__data__,s=e(a,i);if(s<0)return!1;var o=a.length-1;return s==o?a.pop():n.call(a,s,1),--this.size,!0}return zo=r,zo}var Bo,Up;function rA(){if(Up)return Bo;Up=1;var e=fs();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return Bo=t,Bo}var Uo,Hp;function iA(){if(Hp)return Uo;Hp=1;var e=fs();function t(n){return e(this.__data__,n)>-1}return Uo=t,Uo}var Ho,jp;function aA(){if(jp)return Ho;jp=1;var e=fs();function t(n,r){var i=this.__data__,a=e(i,n);return a<0?(++this.size,i.push([n,r])):i[a][1]=r,this}return Ho=t,Ho}var jo,Gp;function hs(){if(Gp)return jo;Gp=1;var e=eA(),t=nA(),n=rA(),r=iA(),i=aA();function a(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o<l;){var u=s[o];this.set(u[0],u[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,jo=a,jo}var Go,Yp;function Sf(){if(Yp)return Go;Yp=1;var e=Or(),t=Cn(),n=e(t,"Map");return Go=n,Go}var Yo,Wp;function sA(){if(Wp)return Yo;Wp=1;var e=tA(),t=hs(),n=Sf();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return Yo=r,Yo}var Wo,Xp;function oA(){if(Xp)return Wo;Xp=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return Wo=e,Wo}var Xo,Kp;function ps(){if(Kp)return Xo;Kp=1;var e=oA();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return Xo=t,Xo}var Ko,Vp;function lA(){if(Vp)return Ko;Vp=1;var e=ps();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return Ko=t,Ko}var Vo,Zp;function uA(){if(Zp)return Vo;Zp=1;var e=ps();function t(n){return e(this,n).get(n)}return Vo=t,Vo}var Zo,Qp;function cA(){if(Qp)return Zo;Qp=1;var e=ps();function t(n){return e(this,n).has(n)}return Zo=t,Zo}var Qo,Jp;function fA(){if(Jp)return Qo;Jp=1;var e=ps();function t(n,r){var i=e(this,n),a=i.size;return i.set(n,r),this.size+=i.size==a?0:1,this}return Qo=t,Qo}var Jo,td;function Tf(){if(td)return Jo;td=1;var e=sA(),t=lA(),n=uA(),r=cA(),i=fA();function a(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o<l;){var u=s[o];this.set(u[0],u[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,Jo=a,Jo}var tl,ed;function hA(){if(ed)return tl;ed=1;var e=Tf(),t="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var a=function(){var s=arguments,o=i?i.apply(this,s):s[0],l=a.cache;if(l.has(o))return l.get(o);var u=r.apply(this,s);return a.cache=l.set(o,u)||l,u};return a.cache=new(n.Cache||e),a}return n.Cache=e,tl=n,tl}var el,nd;function pA(){if(nd)return el;nd=1;var e=hA(),t=500;function n(r){var i=e(r,function(s){return a.size===t&&a.clear(),s}),a=i.cache;return i}return el=n,el}var nl,rd;function dA(){if(rd)return nl;rd=1;var e=pA(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(t,function(s,o,l,u){a.push(l?u.replace(n,"$1"):o||s)}),a});return nl=r,nl}var rl,id;function wy(){if(id)return rl;id=1;var e=dn(),t=bf(),n=dA(),r=yy();function i(a,s){return e(a)?a:t(a,s)?[a]:n(r(a))}return rl=i,rl}var il,ad;function ds(){if(ad)return il;ad=1;var e=ca();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return il=t,il}var al,sd;function Mf(){if(sd)return al;sd=1;var e=wy(),t=ds();function n(r,i){i=e(i,r);for(var a=0,s=i.length;r!=null&&a<s;)r=r[t(i[a++])];return a&&a==s?r:void 0}return al=n,al}var sl,od;function gA(){if(od)return sl;od=1;var e=hs();function t(){this.__data__=new e,this.size=0}return sl=t,sl}var ol,ld;function mA(){if(ld)return ol;ld=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return ol=e,ol}var ll,ud;function yA(){if(ud)return ll;ud=1;function e(t){return this.__data__.get(t)}return ll=e,ll}var ul,cd;function _A(){if(cd)return ul;cd=1;function e(t){return this.__data__.has(t)}return ul=e,ul}var cl,fd;function xA(){if(fd)return cl;fd=1;var e=hs(),t=Sf(),n=Tf(),r=200;function i(a,s){var o=this.__data__;if(o instanceof e){var l=o.__data__;if(!t||l.length<r-1)return l.push([a,s]),this.size=++o.size,this;o=this.__data__=new n(l)}return o.set(a,s),this.size=o.size,this}return cl=i,cl}var fl,hd;function Sy(){if(hd)return fl;hd=1;var e=hs(),t=gA(),n=mA(),r=yA(),i=_A(),a=xA();function s(o){var l=this.__data__=new e(o);this.size=l.size}return s.prototype.clear=t,s.prototype.delete=n,s.prototype.get=r,s.prototype.has=i,s.prototype.set=a,fl=s,fl}var hl,pd;function vA(){if(pd)return hl;pd=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return hl=t,hl}var pl,dd;function bA(){if(dd)return pl;dd=1;function e(t){return this.__data__.has(t)}return pl=e,pl}var dl,gd;function wA(){if(gd)return dl;gd=1;var e=Tf(),t=vA(),n=bA();function r(i){var a=-1,s=i==null?0:i.length;for(this.__data__=new e;++a<s;)this.add(i[a])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,dl=r,dl}var gl,md;function SA(){if(md)return gl;md=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}return gl=e,gl}var ml,yd;function TA(){if(yd)return ml;yd=1;function e(t,n){return t.has(n)}return ml=e,ml}var yl,_d;function Ty(){if(_d)return yl;_d=1;var e=wA(),t=SA(),n=TA(),r=1,i=2;function a(s,o,l,u,c,f){var h=l&r,p=s.length,g=o.length;if(p!=g&&!(h&&g>p))return!1;var d=f.get(s),m=f.get(o);if(d&&m)return d==o&&m==s;var x=-1,y=!0,v=l&i?new e:void 0;for(f.set(s,o),f.set(o,s);++x<p;){var _=s[x],S=o[x];if(u)var w=h?u(S,_,x,o,s,f):u(_,S,x,s,o,f);if(w!==void 0){if(w)continue;y=!1;break}if(v){if(!t(o,function(b,M){if(!n(v,M)&&(_===b||c(_,b,l,u,f)))return v.push(M)})){y=!1;break}}else if(!(_===S||c(_,S,l,u,f))){y=!1;break}}return f.delete(s),f.delete(o),y}return yl=a,yl}var _l,xd;function MA(){if(xd)return _l;xd=1;var e=Cn(),t=e.Uint8Array;return _l=t,_l}var xl,vd;function AA(){if(vd)return xl;vd=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,a){r[++n]=[a,i]}),r}return xl=e,xl}var vl,bd;function kA(){if(bd)return vl;bd=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return vl=e,vl}var bl,wd;function CA(){if(wd)return bl;wd=1;var e=oa(),t=MA(),n=wf(),r=Ty(),i=AA(),a=kA(),s=1,o=2,l="[object Boolean]",u="[object Date]",c="[object Error]",f="[object Map]",h="[object Number]",p="[object RegExp]",g="[object Set]",d="[object String]",m="[object Symbol]",x="[object ArrayBuffer]",y="[object DataView]",v=e?e.prototype:void 0,_=v?v.valueOf:void 0;function S(w,b,M,A,k,C,O){switch(M){case y:if(w.byteLength!=b.byteLength||w.byteOffset!=b.byteOffset)return!1;w=w.buffer,b=b.buffer;case x:return!(w.byteLength!=b.byteLength||!C(new t(w),new t(b)));case l:case u:case h:return n(+w,+b);case c:return w.name==b.name&&w.message==b.message;case p:case d:return w==b+"";case f:var P=i;case g:var F=A&s;if(P||(P=a),w.size!=b.size&&!F)return!1;var B=O.get(w);if(B)return B==b;A|=o,O.set(w,b);var L=r(P(w),P(b),A,k,C,O);return O.delete(w),L;case m:if(_)return _.call(w)==_.call(b)}return!1}return bl=S,bl}var wl,Sd;function RA(){if(Sd)return wl;Sd=1;var e=_y(),t=dn();function n(r,i,a){var s=i(r);return t(r)?s:e(s,a(r))}return wl=n,wl}var Sl,Td;function EA(){if(Td)return Sl;Td=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,a=0,s=[];++r<i;){var o=t[r];n(o,r,t)&&(s[a++]=o)}return s}return Sl=e,Sl}var Tl,Md;function DA(){if(Md)return Tl;Md=1;function e(){return[]}return Tl=e,Tl}var Ml,Ad;function OA(){if(Ad)return Ml;Ad=1;var e=EA(),t=DA(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(s){return s==null?[]:(s=Object(s),e(i(s),function(o){return r.call(s,o)}))}:t;return Ml=a,Ml}var Al,kd;function PA(){if(kd)return Al;kd=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return Al=e,Al}var Di={exports:{}},kl,Cd;function FA(){if(Cd)return kl;Cd=1;function e(){return!1}return kl=e,kl}Di.exports;var Rd;function My(){return Rd||(Rd=1,(function(e,t){var n=Cn(),r=FA(),i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,s=a&&a.exports===i,o=s?n.Buffer:void 0,l=o?o.isBuffer:void 0,u=l||r;e.exports=u})(Di,Di.exports)),Di.exports}var Cl,Ed;function Af(){if(Ed)return Cl;Ed=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,i){var a=typeof r;return i=i??e,!!i&&(a=="number"||a!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<i}return Cl=n,Cl}var Rl,Dd;function kf(){if(Dd)return Rl;Dd=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return Rl=t,Rl}var El,Od;function $A(){if(Od)return El;Od=1;var e=la(),t=kf(),n=ua(),r="[object Arguments]",i="[object Array]",a="[object Boolean]",s="[object Date]",o="[object Error]",l="[object Function]",u="[object Map]",c="[object Number]",f="[object Object]",h="[object RegExp]",p="[object Set]",g="[object String]",d="[object WeakMap]",m="[object ArrayBuffer]",x="[object DataView]",y="[object Float32Array]",v="[object Float64Array]",_="[object Int8Array]",S="[object Int16Array]",w="[object Int32Array]",b="[object Uint8Array]",M="[object Uint8ClampedArray]",A="[object Uint16Array]",k="[object Uint32Array]",C={};C[y]=C[v]=C[_]=C[S]=C[w]=C[b]=C[M]=C[A]=C[k]=!0,C[r]=C[i]=C[m]=C[a]=C[x]=C[s]=C[o]=C[l]=C[u]=C[c]=C[f]=C[h]=C[p]=C[g]=C[d]=!1;function O(P){return n(P)&&t(P.length)&&!!C[e(P)]}return El=O,El}var Dl,Pd;function Ay(){if(Pd)return Dl;Pd=1;function e(t){return function(n){return t(n)}}return Dl=e,Dl}var Oi={exports:{}};Oi.exports;var Fd;function LA(){return Fd||(Fd=1,(function(e,t){var n=py(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,s=a&&n.process,o=(function(){try{var l=i&&i.require&&i.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}})();e.exports=o})(Oi,Oi.exports)),Oi.exports}var Ol,$d;function ky(){if($d)return Ol;$d=1;var e=$A(),t=Ay(),n=LA(),r=n&&n.isTypedArray,i=r?t(r):e;return Ol=i,Ol}var Pl,Ld;function NA(){if(Ld)return Pl;Ld=1;var e=PA(),t=vf(),n=dn(),r=My(),i=Af(),a=ky(),s=Object.prototype,o=s.hasOwnProperty;function l(u,c){var f=n(u),h=!f&&t(u),p=!f&&!h&&r(u),g=!f&&!h&&!p&&a(u),d=f||h||p||g,m=d?e(u.length,String):[],x=m.length;for(var y in u)(c||o.call(u,y))&&!(d&&(y=="length"||p&&(y=="offset"||y=="parent")||g&&(y=="buffer"||y=="byteLength"||y=="byteOffset")||i(y,x)))&&m.push(y);return m}return Pl=l,Pl}var Fl,Nd;function qA(){if(Nd)return Fl;Nd=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return Fl=t,Fl}var $l,qd;function IA(){if(qd)return $l;qd=1;function e(t,n){return function(r){return t(n(r))}}return $l=e,$l}var Ll,Id;function zA(){if(Id)return Ll;Id=1;var e=IA(),t=e(Object.keys,Object);return Ll=t,Ll}var Nl,zd;function BA(){if(zd)return Nl;zd=1;var e=qA(),t=zA(),n=Object.prototype,r=n.hasOwnProperty;function i(a){if(!e(a))return t(a);var s=[];for(var o in Object(a))r.call(a,o)&&o!="constructor"&&s.push(o);return s}return Nl=i,Nl}var ql,Bd;function gs(){if(Bd)return ql;Bd=1;var e=vy(),t=kf();function n(r){return r!=null&&t(r.length)&&!e(r)}return ql=n,ql}var Il,Ud;function ms(){if(Ud)return Il;Ud=1;var e=NA(),t=BA(),n=gs();function r(i){return n(i)?e(i):t(i)}return Il=r,Il}var zl,Hd;function UA(){if(Hd)return zl;Hd=1;var e=RA(),t=OA(),n=ms();function r(i){return e(i,n,t)}return zl=r,zl}var Bl,jd;function HA(){if(jd)return Bl;jd=1;var e=UA(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(a,s,o,l,u,c){var f=o&t,h=e(a),p=h.length,g=e(s),d=g.length;if(p!=d&&!f)return!1;for(var m=p;m--;){var x=h[m];if(!(f?x in s:r.call(s,x)))return!1}var y=c.get(a),v=c.get(s);if(y&&v)return y==s&&v==a;var _=!0;c.set(a,s),c.set(s,a);for(var S=f;++m<p;){x=h[m];var w=a[x],b=s[x];if(l)var M=f?l(b,w,x,s,a,c):l(w,b,x,a,s,c);if(!(M===void 0?w===b||u(w,b,o,l,c):M)){_=!1;break}S||(S=x=="constructor")}if(_&&!S){var A=a.constructor,k=s.constructor;A!=k&&"constructor"in a&&"constructor"in s&&!(typeof A=="function"&&A instanceof A&&typeof k=="function"&&k instanceof k)&&(_=!1)}return c.delete(a),c.delete(s),_}return Bl=i,Bl}var Ul,Gd;function jA(){if(Gd)return Ul;Gd=1;var e=Or(),t=Cn(),n=e(t,"DataView");return Ul=n,Ul}var Hl,Yd;function GA(){if(Yd)return Hl;Yd=1;var e=Or(),t=Cn(),n=e(t,"Promise");return Hl=n,Hl}var jl,Wd;function YA(){if(Wd)return jl;Wd=1;var e=Or(),t=Cn(),n=e(t,"Set");return jl=n,jl}var Gl,Xd;function WA(){if(Xd)return Gl;Xd=1;var e=Or(),t=Cn(),n=e(t,"WeakMap");return Gl=n,Gl}var Yl,Kd;function XA(){if(Kd)return Yl;Kd=1;var e=jA(),t=Sf(),n=GA(),r=YA(),i=WA(),a=la(),s=by(),o="[object Map]",l="[object Object]",u="[object Promise]",c="[object Set]",f="[object WeakMap]",h="[object DataView]",p=s(e),g=s(t),d=s(n),m=s(r),x=s(i),y=a;return(e&&y(new e(new ArrayBuffer(1)))!=h||t&&y(new t)!=o||n&&y(n.resolve())!=u||r&&y(new r)!=c||i&&y(new i)!=f)&&(y=function(v){var _=a(v),S=_==l?v.constructor:void 0,w=S?s(S):"";if(w)switch(w){case p:return h;case g:return o;case d:return u;case m:return c;case x:return f}return _}),Yl=y,Yl}var Wl,Vd;function KA(){if(Vd)return Wl;Vd=1;var e=Sy(),t=Ty(),n=CA(),r=HA(),i=XA(),a=dn(),s=My(),o=ky(),l=1,u="[object Arguments]",c="[object Array]",f="[object Object]",h=Object.prototype,p=h.hasOwnProperty;function g(d,m,x,y,v,_){var S=a(d),w=a(m),b=S?c:i(d),M=w?c:i(m);b=b==u?f:b,M=M==u?f:M;var A=b==f,k=M==f,C=b==M;if(C&&s(d)){if(!s(m))return!1;S=!0,A=!1}if(C&&!A)return _||(_=new e),S||o(d)?t(d,m,x,y,v,_):n(d,m,b,x,y,v,_);if(!(x&l)){var O=A&&p.call(d,"__wrapped__"),P=k&&p.call(m,"__wrapped__");if(O||P){var F=O?d.value():d,B=P?m.value():m;return _||(_=new e),v(F,B,x,y,_)}}return C?(_||(_=new e),r(d,m,x,y,v,_)):!1}return Wl=g,Wl}var Xl,Zd;function Cy(){if(Zd)return Xl;Zd=1;var e=KA(),t=ua();function n(r,i,a,s,o){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,a,s,n,o)}return Xl=n,Xl}var Kl,Qd;function VA(){if(Qd)return Kl;Qd=1;var e=Sy(),t=Cy(),n=1,r=2;function i(a,s,o,l){var u=o.length,c=u,f=!l;if(a==null)return!c;for(a=Object(a);u--;){var h=o[u];if(f&&h[2]?h[1]!==a[h[0]]:!(h[0]in a))return!1}for(;++u<c;){h=o[u];var p=h[0],g=a[p],d=h[1];if(f&&h[2]){if(g===void 0&&!(p in a))return!1}else{var m=new e;if(l)var x=l(g,d,p,a,s,m);if(!(x===void 0?t(d,g,n|r,l,m):x))return!1}}return!0}return Kl=i,Kl}var Vl,Jd;function Ry(){if(Jd)return Vl;Jd=1;var e=sa();function t(n){return n===n&&!e(n)}return Vl=t,Vl}var Zl,tg;function ZA(){if(tg)return Zl;tg=1;var e=Ry(),t=ms();function n(r){for(var i=t(r),a=i.length;a--;){var s=i[a],o=r[s];i[a]=[s,o,e(o)]}return i}return Zl=n,Zl}var Ql,eg;function Ey(){if(eg)return Ql;eg=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return Ql=e,Ql}var Jl,ng;function QA(){if(ng)return Jl;ng=1;var e=VA(),t=ZA(),n=Ey();function r(i){var a=t(i);return a.length==1&&a[0][2]?n(a[0][0],a[0][1]):function(s){return s===i||e(s,i,a)}}return Jl=r,Jl}var tu,rg;function JA(){if(rg)return tu;rg=1;var e=Mf();function t(n,r,i){var a=n==null?void 0:e(n,r);return a===void 0?i:a}return tu=t,tu}var eu,ig;function tk(){if(ig)return eu;ig=1;function e(t,n){return t!=null&&n in Object(t)}return eu=e,eu}var nu,ag;function ek(){if(ag)return nu;ag=1;var e=wy(),t=vf(),n=dn(),r=Af(),i=kf(),a=ds();function s(o,l,u){l=e(l,o);for(var c=-1,f=l.length,h=!1;++c<f;){var p=a(l[c]);if(!(h=o!=null&&u(o,p)))break;o=o[p]}return h||++c!=f?h:(f=o==null?0:o.length,!!f&&i(f)&&r(p,f)&&(n(o)||t(o)))}return nu=s,nu}var ru,sg;function nk(){if(sg)return ru;sg=1;var e=tk(),t=ek();function n(r,i){return r!=null&&t(r,i,e)}return ru=n,ru}var iu,og;function rk(){if(og)return iu;og=1;var e=Cy(),t=JA(),n=nk(),r=bf(),i=Ry(),a=Ey(),s=ds(),o=1,l=2;function u(c,f){return r(c)&&i(f)?a(s(c),f):function(h){var p=t(h,c);return p===void 0&&p===f?n(h,c):e(f,p,o|l)}}return iu=u,iu}var au,lg;function ys(){if(lg)return au;lg=1;function e(t){return t}return au=e,au}var su,ug;function ik(){if(ug)return su;ug=1;function e(t){return function(n){return n==null?void 0:n[t]}}return su=e,su}var ou,cg;function ak(){if(cg)return ou;cg=1;var e=Mf();function t(n){return function(r){return e(r,n)}}return ou=t,ou}var lu,fg;function sk(){if(fg)return lu;fg=1;var e=ik(),t=ak(),n=bf(),r=ds();function i(a){return n(a)?e(r(a)):t(a)}return lu=i,lu}var uu,hg;function Dy(){if(hg)return uu;hg=1;var e=QA(),t=rk(),n=ys(),r=dn(),i=sk();function a(s){return typeof s=="function"?s:s==null?n:typeof s=="object"?r(s)?t(s[0],s[1]):e(s):i(s)}return uu=a,uu}var cu,pg;function ok(){if(pg)return cu;pg=1;function e(t){return function(n,r,i){for(var a=-1,s=Object(n),o=i(n),l=o.length;l--;){var u=o[t?l:++a];if(r(s[u],u,s)===!1)break}return n}}return cu=e,cu}var fu,dg;function lk(){if(dg)return fu;dg=1;var e=ok(),t=e();return fu=t,fu}var hu,gg;function uk(){if(gg)return hu;gg=1;var e=lk(),t=ms();function n(r,i){return r&&e(r,i,t)}return hu=n,hu}var pu,mg;function ck(){if(mg)return pu;mg=1;var e=gs();function t(n,r){return function(i,a){if(i==null)return i;if(!e(i))return n(i,a);for(var s=i.length,o=r?s:-1,l=Object(i);(r?o--:++o<s)&&a(l[o],o,l)!==!1;);return i}}return pu=t,pu}var du,yg;function fk(){if(yg)return du;yg=1;var e=uk(),t=ck(),n=t(e);return du=n,du}var gu,_g;function Oy(){if(_g)return gu;_g=1;var e=fk(),t=gs();function n(r,i){var a=-1,s=t(r)?Array(r.length):[];return e(r,function(o,l,u){s[++a]=i(o,l,u)}),s}return gu=n,gu}var mu,xg;function hk(){if(xg)return mu;xg=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return mu=e,mu}var yu,vg;function pk(){if(vg)return yu;vg=1;var e=ca();function t(n,r){if(n!==r){var i=n!==void 0,a=n===null,s=n===n,o=e(n),l=r!==void 0,u=r===null,c=r===r,f=e(r);if(!u&&!f&&!o&&n>r||o&&l&&c&&!u&&!f||a&&l&&c||!i&&c||!s)return 1;if(!a&&!o&&!f&&n<r||f&&i&&s&&!a&&!o||u&&i&&s||!l&&s||!c)return-1}return 0}return yu=t,yu}var _u,bg;function dk(){if(bg)return _u;bg=1;var e=pk();function t(n,r,i){for(var a=-1,s=n.criteria,o=r.criteria,l=s.length,u=i.length;++a<l;){var c=e(s[a],o[a]);if(c){if(a>=u)return c;var f=i[a];return c*(f=="desc"?-1:1)}}return n.index-r.index}return _u=t,_u}var xu,wg;function gk(){if(wg)return xu;wg=1;var e=us(),t=Mf(),n=Dy(),r=Oy(),i=hk(),a=Ay(),s=dk(),o=ys(),l=dn();function u(c,f,h){f.length?f=e(f,function(d){return l(d)?function(m){return t(m,d.length===1?d[0]:d)}:d}):f=[o];var p=-1;f=e(f,a(n));var g=r(c,function(d,m,x){var y=e(f,function(v){return v(d)});return{criteria:y,index:++p,value:d}});return i(g,function(d,m){return s(d,m,h)})}return xu=u,xu}var vu,Sg;function mk(){if(Sg)return vu;Sg=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return vu=e,vu}var bu,Tg;function yk(){if(Tg)return bu;Tg=1;var e=mk(),t=Math.max;function n(r,i,a){return i=t(i===void 0?r.length-1:i,0),function(){for(var s=arguments,o=-1,l=t(s.length-i,0),u=Array(l);++o<l;)u[o]=s[i+o];o=-1;for(var c=Array(i+1);++o<i;)c[o]=s[o];return c[i]=a(u),e(r,this,c)}}return bu=n,bu}var wu,Mg;function _k(){if(Mg)return wu;Mg=1;function e(t){return function(){return t}}return wu=e,wu}var Su,Ag;function xk(){if(Ag)return Su;Ag=1;var e=Or(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return Su=t,Su}var Tu,kg;function vk(){if(kg)return Tu;kg=1;var e=_k(),t=xk(),n=ys(),r=t?function(i,a){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(a),writable:!0})}:n;return Tu=r,Tu}var Mu,Cg;function bk(){if(Cg)return Mu;Cg=1;var e=800,t=16,n=Date.now;function r(i){var a=0,s=0;return function(){var o=n(),l=t-(o-s);if(s=o,l>0){if(++a>=e)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return Mu=r,Mu}var Au,Rg;function wk(){if(Rg)return Au;Rg=1;var e=vk(),t=bk(),n=t(e);return Au=n,Au}var ku,Eg;function Sk(){if(Eg)return ku;Eg=1;var e=ys(),t=yk(),n=wk();function r(i,a){return n(t(i,a,e),i+"")}return ku=r,ku}var Cu,Dg;function Cf(){if(Dg)return Cu;Dg=1;var e=wf(),t=gs(),n=Af(),r=sa();function i(a,s,o){if(!r(o))return!1;var l=typeof s;return(l=="number"?t(o)&&n(s,o.length):l=="string"&&s in o)?e(o[s],a):!1}return Cu=i,Cu}var Ru,Og;function Tk(){if(Og)return Ru;Og=1;var e=xy(),t=gk(),n=Sk(),r=Cf(),i=n(function(a,s){if(a==null)return[];var o=s.length;return o>1&&r(a,s[0],s[1])?s=[]:o>2&&r(s[0],s[1],s[2])&&(s=[s[0]]),t(a,e(s,1),[])});return Ru=i,Ru}var Mk=Tk();const Ak=gi(Mk);var Eu,Pg;function kk(){if(Pg)return Eu;Pg=1;function e(t){for(var n=-1,r=t==null?0:t.length,i={};++n<r;){var a=t[n];i[a[0]]=a[1]}return i}return Eu=e,Eu}var Ck=kk();const Fg=gi(Ck);var Du,$g;function Rk(){if($g)return Du;$g=1;var e=Math.ceil,t=Math.max;function n(r,i,a,s){for(var o=-1,l=t(e((i-r)/(a||1)),0),u=Array(l);l--;)u[s?l:++o]=r,r+=a;return u}return Du=n,Du}var Ou,Lg;function Ek(){if(Lg)return Ou;Lg=1;var e=Rk(),t=Cf(),n=gy();function r(i){return function(a,s,o){return o&&typeof o!="number"&&t(a,s,o)&&(s=o=void 0),a=n(a),s===void 0?(s=a,a=0):s=n(s),o=o===void 0?a<s?1:-1:n(o),e(a,s,o,i)}}return Ou=r,Ou}var Pu,Ng;function Dk(){if(Ng)return Pu;Ng=1;var e=Ek(),t=e();return Pu=t,Pu}var Ok=Dk();const Pk=gi(Ok);var Fu,qg;function Fk(){if(qg)return Fu;qg=1;var e=us(),t=Dy(),n=Oy(),r=dn();function i(a,s){var o=r(a)?e:n;return o(a,t(s,3))}return Fu=i,Fu}var $u,Ig;function $k(){if(Ig)return $u;Ig=1;var e=xy(),t=Fk();function n(r,i){return e(t(r,i),1)}return $u=n,$u}var Lk=$k();const Nk=gi(Lk);var Lu,zg;function Py(){if(zg)return Lu;zg=1;function e(t,n,r){return t===t&&(r!==void 0&&(t=t<=r?t:r),n!==void 0&&(t=t>=n?t:n)),t}return Lu=e,Lu}var Nu,Bg;function qk(){if(Bg)return Nu;Bg=1;function e(t,n){var r=-1,i=t.length;for(n||(n=Array(i));++r<i;)n[r]=t[r];return n}return Nu=e,Nu}var qu,Ug;function Ik(){if(Ug)return qu;Ug=1;var e=Math.floor,t=Math.random;function n(r,i){return r+e(t()*(i-r+1))}return qu=n,qu}var Iu,Hg;function Fy(){if(Hg)return Iu;Hg=1;var e=Ik();function t(n,r){var i=-1,a=n.length,s=a-1;for(r=r===void 0?a:r;++i<r;){var o=e(i,s),l=n[o];n[o]=n[i],n[i]=l}return n.length=r,n}return Iu=t,Iu}var zu,jg;function zk(){if(jg)return zu;jg=1;var e=Py(),t=qk(),n=Fy();function r(i,a){return n(t(i),e(a,0,i.length))}return zu=r,zu}var Bu,Gg;function Bk(){if(Gg)return Bu;Gg=1;var e=us();function t(n,r){return e(r,function(i){return n[i]})}return Bu=t,Bu}var Uu,Yg;function Uk(){if(Yg)return Uu;Yg=1;var e=Bk(),t=ms();function n(r){return r==null?[]:e(r,t(r))}return Uu=n,Uu}var Hu,Wg;function Hk(){if(Wg)return Hu;Wg=1;var e=Py(),t=Fy(),n=Uk();function r(i,a){var s=n(i);return t(s,e(a,0,s.length))}return Hu=r,Hu}var ju,Xg;function jk(){if(Xg)return ju;Xg=1;var e=zk(),t=Hk(),n=dn(),r=Cf(),i=my();function a(s,o,l){(l?r(s,o,l):o===void 0)?o=1:o=i(o);var u=n(s)?e:t;return u(s,o)}return ju=a,ju}var Gk=jk();const Yk=gi(Gk),Wk=e=>UM(e,14),Kg=e=>Object.values(e).reduce((t,n)=>t+n,0),Xk=(e,t,n={})=>{const r=Object.assign({draw:!1},n);if(Object.values(e).length<1)throw new Error("vote distribution must contain at least one party");if(!Object.values(e).every(g=>typeof g=="number"&&g>=0))throw new Error("party vote counts must be non-negative integers");if(!Number.isInteger(t)||t<=0)throw new Error("seats must be a positive integer");if(typeof r.draw!="boolean")throw new Error("opt.draw must be a boolean");const i=Kg(e),a=Fg(Object.entries(e).map(([g,d])=>{const m=Math.max(t-Object.keys(e).length,0),x=Math.round(m*d/i);return[g,x]})),s=Fg(Object.entries(e).map(([g,d])=>{const m=t+Object.keys(e).length,x=Math.min(Math.round(m*d/i),t);return[g,x]})),o=Nk(Object.entries(e).map(([g,d])=>{const m=a[g],x=s[g];return Pk(m,x).map(y=>{const v=Wk(d/(y+.5));return{party:g,quotient:v}})})),l=Kg(a),u=t-l,c=Ak(o,({quotient:g})=>-g),f=c[u-1].quotient,h=c.filter(({quotient:g})=>g>f),p=c.filter(({quotient:g})=>g===f);if(h.length+p.length===u)h.push(...p);else{if(!r.draw)throw new Error("result is ambiguous, a draw would need to be made, but opt.draw is disabled");h.push(...Yk(p,u-h.length))}return h.reduce((g,{party:d})=>(g[d]+=1,g),a)},Ja=e=>Math.round(e*1e10)/1e10,Kk=e=>e.reduce((t,n)=>t+n.seats,0),Vk=e=>e.flat(),Zk=(e,t,n)=>{const r=(Math.PI-n)/2,i=t/e+r-Math.PI;return{x:Ja(e*Math.cos(i)),y:Ja(e*Math.sin(i))}},$y=(e,t,n,r)=>{const i=r*t*n/(e-t),a=1+r*(t-1)*t/2/(e-t);return i/a},Ti=(e,t,n,r)=>{const i=r/Math.PI*.7142857142857143;return Math.abs($y(e,t,n,r)*t/n-i)},Qk=(e,t,n)=>{let r=Math.floor(Math.log(e)/Math.log(2))||1,i=Ti(e,r,t,n),a=0;for(Ti(e,r+1,t,n)<i&&(a=1),Ti(e,r-1,t,n)<i&&r>1&&(a=-1);Ti(e,r+a,t,n)<i&&r>0;)i=Ti(e,r+a,t,n),r+=a;return r},Jk=(e,t)=>{var i,a;let n,r;for(let s=0;s<e.length;s++)r=Ja((t[s]||0)/(((i=e[s])==null?void 0:i.length)??1)),(!n||r<n)&&(n=r);for(let s=0;s<e.length;s++)if(r=Ja((t[s]||0)/(((a=e[s])==null?void 0:a.length)??1)),r===n)return s;return 0},t2=(e,t,n)=>{const r=Kk(e),i=Qk(r,t,n),a=$y(r,i,t,n);let s={};for(let h=1;h<=i;h++)s[h]=t-(h-1)*a;s=Xk(s,r);const o=[];let l,u,c;for(let h=1;h<=i;h++){const p=[];l=t-(h-1)*a,u=n*l/((s[h]??1)-1||1);for(let g=0;g<=(s[h]??1)-1;g++)c={...Zk(l,g*u,n),r:.4*a},p.push(c);o.push(p)}const f=Array(o.length).fill(0);for(const h of e)for(let p=0;p<h.seats;p++){const g=Jk(o,f),d=o[g],m=f[g]??0,x=d==null?void 0:d[m];x&&(x.fill=h.colour,x.party=String(h.id)),f[g]=m+1}return Vk(o)},e2=e=>t=>e("circle",{cx:t.x,cy:t.y,r:t.r,fill:t.fill,class:t.party}),n2={seatCount:!1,arcAngle:180,hFunction:aa},r2=(e,t={})=>{var m;const{seatCount:n,arcAngle:r,hFunction:i}=Object.assign({},n2,t);if(typeof n!="boolean")throw new Error("`seatCount` option must be a boolean");if(typeof i!="function")throw new Error("`hFunction` option must be a function");if(typeof r!="number"||r<=0||r>360)throw new Error("`arcAngle` option must be a number between 0 and 360");const a=r*Math.PI/180,s=20,o=t2(e,s,a),l=(((m=o[0])==null?void 0:m.r)??0)/.4||0,u=o.map(e2(i));n&&u.push(i("text",{x:0,y:0,"text-anchor":"middle",style:{"font-family":"Helvetica","font-size":.25*s+"px"},class:"seatNumber"},String(u.length)));const c=r<=180?s+l:s*(1+Math.sin((a-Math.PI)/2))+l,f=s+l,h=Math.max(c,f),p=r<=180?-s-l/2:-s*(1+Math.sin((a-Math.PI)/2))-l/2,g=i("defs",[ry(i),iy(i),ay(i)]);return i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:[-s-l/2,p,2*s+l,h].join(",")},[g,...u])},i2={seatCount:!1,arcAngle:200,arcAngleFlexibility:5,radius:380,seatSize:4.5,minSeatSize:1.8,maxSeatSize:3,spacing:1.8,innerRadiusRatio:.6,showLabels:!0,hFunction:aa},a2=(e,t={})=>{const n={...i2,...t},{arcAngle:r,arcAngleFlexibility:i,radius:a,seatSize:s,minSeatSize:o,maxSeatSize:l,spacing:u,innerRadiusRatio:c,showLabels:f,hFunction:h}=n,p=a*c,g=e.reduce((Z,R)=>Z+R.seats,0);let d={seatSize:s,arcAngle:r,score:-1};const m=r-i,x=r+i;for(let Z=m;Z<=x;Z+=2.5){const R=Z*Math.PI/180;for(let z=l;z>=o;z-=.1){const D=z*2,T=D*u,X=Math.floor((a-p)/T);for(let Q=1;Q<=Math.min(X,10);Q++){let W=0;for(let ut=0;ut<Q;ut++){const H=p+(ut+.5)*T,ot=D*u/H,gt=Math.floor(R/ot);W+=gt}if(W>=g){const ut=g/W,H=(z-o)/(l-o),ot=(W-g)/g,gt=ot<.15?1:ot<.3?.7:ot<.5?.4:.1,yt=1-Math.abs(Z-r)/i,vt=gt*.5+H*.3+ut*.15+yt*.05;vt>d.score&&(d={seatSize:z,arcAngle:Z,rings:Q,score:vt})}}}}const y=d.seatSize,v=d.arcAngle,_=v*Math.PI/180,S=y*2,w=S*u,b=Math.floor((a-p)/w),M=[],A=-_/2-Math.PI/2,k=[];let C=0,O=[];for(let Z=1;Z<=b;Z++){let R=0;const z=[];for(let D=0;D<Z;D++){const T=p+(D+.5)*w,X=S*u/T,Q=Math.floor(_/X);z.push(Q),R+=Q}if(R>=g){C=Z,O=z;break}}if(C>0)k.push(...O);else for(let Z=0;Z<b;Z++){const R=p+(Z+.5)*w,z=S*u/R,D=Math.floor(_/z);k.push(D)}for(let Z=0;Z<k.length;Z++){const R=p+(Z+.5)*w,z=k[Z]??0;if(z>0){const D=_/z;for(let T=0;T<z;T++){const X=A+(T+.5)*D,Q=Math.cos(X)*R,W=Math.sin(X)*R;M.push({ring:Z,index:T,angle:X,x:Q,y:W})}}}M.sort((Z,R)=>{const z=Z.angle-R.angle;return Math.abs(z)>.001?z:Z.ring-R.ring});const P=[];let F=0;e.forEach(Z=>{const R=[],z=Math.min(Z.seats,M.length-F);let D=1/0,T=-1/0;for(let Q=0;Q<z&&F<M.length;Q++){const W=M[F++];W&&(D=Math.min(D,W.angle),T=Math.max(T,W.angle),Math.sqrt(W.x*W.x+W.y*W.y),R.push(h("circle",{fill:Z.colour,stroke:Z.colour,className:"circle seat-visual seat-hover-zone",transform:`translate(${W.x}, ${W.y})`,r:y,"data-party":Z.name,"data-party-id":String(Z.id),style:"pointer-events: all; cursor: pointer;"})))}const X=R;P.push(h("g",{className:"party-group","data-party":Z.name,style:"opacity: 1; outline: none;"},X))});const B=h("g",{className:"arc-bg"},[h("circle",{className:"outer",cx:0,cy:0,fill:"#ffffff",r:a}),h("circle",{className:"inner",cx:0,cy:0,fill:"#ffffff",r:p})]),L=h("g",{className:"points-container"},P),$=f?h("g",{className:"label-container",mask:"url(#label-clip)",style:"pointer-events: none;"},[h("text",{className:"party_count",dy:"-0.05em",style:"font-size: 24vw; font-weight: bold; text-anchor: middle; display: none; opacity: 0; fill: rgb(19, 90, 225); transform: scale(1);"}),h("text",{className:"party_name",y:0,dy:"1em",style:"font-size: 6vw; font-weight: normal; text-anchor: middle; display: none; opacity: 0; fill: rgb(19, 90, 225); transform: scale(1);"})]):null,Y=h("defs",[h("radialGradient",{id:"label-gradient"},[h("stop",{offset:"0%",style:"stop-color: rgb(255, 255, 255); stop-opacity: 1;"}),h("stop",{offset:"80%",style:"stop-color: rgb(255, 255, 255); stop-opacity: 1;"}),h("stop",{offset:"90%",style:"stop-color: rgb(255, 255, 255); stop-opacity: 0.1;"}),h("stop",{offset:"100%",style:"stop-color: rgb(255, 255, 255); stop-opacity: 0;"})]),h("mask",{id:"label-clip"},[h("circle",{fill:"url(#label-gradient)",r:p})]),ry(h),iy(h),ay(h)]),K=h("g",{className:"arc-container",transform:`translate(${a}, ${a})`},[B,L,$].filter(Boolean)),J=_/2;let st;if(v<=180)st=a*Math.sin(J)+y;else{const Z=J-Math.PI/2;st=a*(1+Math.sin(Z))+y}const lt=a+y,N=a*2,j=Math.max(st,lt);return h("svg",{id:"chart-container","font-family":"Canva Sans Variable",viewBox:`0 0 ${N} ${j}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg"},[K,Y])};function Ly(e){return!e||!e.color?"#cccccc":e.color==="url(#hatchPattern)"?Jr.COMPLETED:e.color==="url(#greyHatchPattern)"?Dt.greyHatch.lines:e.color}function Rc(e,t){if(!e)return;const n=e.querySelectorAll(".party-group");n&&n.length>0&&n.forEach(r=>{if(!r)return;const i=r,a=i.getAttribute("data-party");t?a===t?i.style.opacity=Pe.animation.hoverOpacity.active:i.style.opacity=Pe.animation.hoverOpacity.dimmed:i.style.opacity="1"})}function Ec(e,t){e.forEach(n=>{const r=n,i=n.getAttribute("class")||"";t?i===t?(r.setAttribute("fill-opacity","1"),r.setAttribute("stroke-opacity","1")):(r.setAttribute("fill-opacity",Pe.animation.hoverOpacity.dimmed),r.setAttribute("stroke-opacity","0.2")):(r.setAttribute("fill-opacity","1"),r.setAttribute("stroke-opacity","1"))})}const s2=({containerRef:e,processedData:t,totalRepositories:n,arcAngle:r,useEnhanced:i,maxSeats:a,setHoveredData:s,activePartyName:o,setActivePartyName:l,chartConfig:u,seatSize:c,shouldAnimate:f=!1,animationDirection:h="left-to-right",onAnimationComplete:p})=>{G.useEffect(()=>{if(!e.current||t.length===0)return;for(;e.current.firstChild;)e.current.removeChild(e.current.firstChild);const g=n<=a?1:a/n,d=t.filter(w=>w.value>0).map(w=>{const b=n<=a?w.value:Math.max(1,Math.floor(w.value*g));return{id:String(w.id),name:w.label,seats:b,colour:w.color==="url(#hatchPattern)"?Jr.COMPLETED:w.color}}),m=i?a2(d,{arcAngle:r,arcAngleFlexibility:u.arcAngleFlexibility,radius:u.radius,seatSize:c,minSeatSize:u.minSeatSize,maxSeatSize:u.maxSeatSize,spacing:u.spacing,innerRadiusRatio:u.innerRadiusRatio,showLabels:!0}):r2(d,{arcAngle:r});m.properties&&(m.properties.width="100%",m.properties.height="100%",m.properties.style="display: block; width: 100%; max-width: 100%; height: auto;",m.properties.preserveAspectRatio="xMidYMid meet");const x=EM(m),_=new DOMParser().parseFromString(x,"image/svg+xml").documentElement;if(!_)return;_.setAttribute("width","100%"),_.setAttribute("height","100%"),_.style.width="100%",_.style.height="auto",_.style.display="block",i?o2(_,d,t,s,o,l):l2(_,d,t,s,o,l);const S=()=>{if(s(null),l(null),i)Rc(_,null);else{const w=_.querySelectorAll("circle");Ec(w,null)}};return _&&_.addEventListener("mouseleave",S),e.current.appendChild(_),f&&_&&PM(_,r,u.radius,h,900,p),()=>{if(_&&_.removeEventListener("mouseleave",S),e.current)for(;e.current.firstChild;)e.current.removeChild(e.current.firstChild)}},[t,n,r,i,a,s,o,l,e,u,c,f,h,p])};function o2(e,t,n,r,i,a){if(!e)return;const s=e.querySelectorAll(".seat-hover-zone"),o=e.querySelectorAll(".party-group circle.seat-visual");o&&o.length>0&&o.forEach(l=>{if(l){const u=l;u.style.stroke=Pe.colors.seatBorder,u.style.strokeWidth="0.5",u.setAttribute("fill-opacity","1"),u.style.transition=`fill-opacity ${Pe.animation.transitionDuration} ease, stroke-opacity ${Pe.animation.transitionDuration} ease`}}),s&&s.length>0&&s.forEach(l=>{if(!l)return;const u=l.getAttribute("data-party"),c=l.getAttribute("data-party-id"),f=()=>{if(u&&u!==i){const h=t.find(p=>p.name===u||String(p.id)===c);if(h){const p=n.find(g=>g.label===h.name||String(g.id)===h.id);if(p){const g=Ly(p);r({label:p.label||"Unknown",value:p.value||0,color:g}),a(h.name),Rc(e,h.name)}}}};l.addEventListener("mouseenter",f)}),i&&Rc(e,i)}function l2(e,t,n,r,i,a){if(!e)return;const s=e.querySelectorAll("circle");if(s&&s.length>0&&(s.forEach(o=>{if(o){const l=o;l.style.cursor="pointer",l.style.stroke=Pe.colors.seatBorder,l.style.strokeWidth="0.5",l.setAttribute("fill-opacity","1"),l.style.transition=`fill-opacity ${Pe.animation.transitionDuration} ease, stroke-opacity ${Pe.animation.transitionDuration} ease`}}),s.forEach(o=>{if(!o)return;const l=o.getAttribute("class")||"",u=parseInt(l,10),c=t[u],f=()=>{if(c){const h=c.name;if(h&&h!==i){const p=n.find(g=>g.label===c.name||String(g.id)===c.id);if(p){const g=Ly(p);r({label:p.label||"Unknown",value:p.value||0,color:g}),a(h),Ec(s,l)}}}};o.addEventListener("mouseenter",f)})),i){const o=t.find(l=>l.name===i);if(o){const l=t.indexOf(o);Ec(s,String(l))}}}const Gu=Li,Vg={[zi]:Jr.NOT_APPLICABLE,[Bi]:Jr.NO_LST,[Ui]:Jr.DATA_MISSING},Mi=(e,t,n)=>{if(e in Vg)return Vg[e];const r=n-1-t,i=Gu.length,a=Math.floor(r/Math.max(1,n-1)*(i-1)),s=Math.min(Math.max(0,a),i-1);return Gu[s]??Gu[0]??"#000000"},Ny=({dataSeries:e,notApplicableRepositories:t,noLstRepositories:n,unavailableRepositories:r})=>{const{special:i,regular:a}=e.reduce((p,g,d)=>([zi,Bi,Ui].includes(g.label)?p.special.push({...g,originalIndex:d}):p.regular.push({...g,originalIndex:d}),p),{special:[],regular:[]}),s=a.reverse().map((p,g)=>({id:`measure-${g}`,label:p.label,value:p.value,color:Mi(p.label,a.length-1-g,a.length)})),o=i.map((p,g)=>({id:p.label.toLowerCase().replace(" ","-"),label:p.label,value:p.value,color:Mi(p.label,g,i.length)})),l=r,u={id:"no-lst",label:Bi,value:n,color:Mi(Bi,0,1)},c={id:"data-missing",label:Ui,value:l,color:Mi(Ui,0,1)},f={id:"n/a",label:zi,value:t,color:Mi(zi,0,1)},h=[];return f.value>0&&h.push(f),u.value>0&&h.push(u),c.value>0&&h.push(c),h.push(...o),h.push(...s),h},Zg={"N/A":"Repos that aren't applicable to this migration.","No LST":"There are no LSTs for these repos.","Data Missing":"There is data missing in the LSTs."},u2=({dataSeries:e,totalRepositories:t,notApplicableRepositories:n,noLstRepositories:r,unavailableRepositories:i,arcAngle:a,useEnhanced:s=Pe.useEnhanced,showTable:o=!0,shouldAnimate:l=!1,animationDirection:u="left-to-right",onAnimationComplete:c})=>{const f=G.useRef(null),[h,p]=G.useState(null),[g,d]=G.useState(null),x=Ny({dataSeries:e,notApplicableRepositories:n,noLstRepositories:r,unavailableRepositories:i}).map(b=>{const M=typeof b.color=="function"?b.color("arc"):b.color,A=typeof b.label=="function"?b.label("arc"):b.label;return{...b,color:M,label:A}}),y=a??df({repositoryCount:t}),v=gf({repositoryCount:t});s2({containerRef:f,processedData:x,totalRepositories:t,arcAngle:y,useEnhanced:s,maxSeats:Pe.maxSeats,setHoveredData:p,activePartyName:g,setActivePartyName:d,chartConfig:Pe.chartConfig,seatSize:v,shouldAnimate:l,animationDirection:u,onAnimationComplete:c});const _=x.map(b=>{const M=b.value/t*100,A=M>0&&M<1?"< 1":M.toFixed(0);return{id:String(b.id),label:b.label,value:b.value,percentage:A,color:b.color}}),S=t>Pe.maxSeats,w=S?Math.round(t/Pe.maxSeats):1;return E.jsxs(q.Stack,{sx:{width:"100%",alignItems:"center",gap:{xs:.5,sm:.75,md:1,lg:1},py:0,"@media (min-width: 1024px) and (max-width: 1225px)":{gap:.25}},children:[E.jsxs(q.Box,{className:"parliament-chart-container",sx:{position:"relative",width:"100%",minHeight:"200px",mb:{xs:.5,sm:.75,md:1},"@media (min-width: 1024px) and (max-width: 1225px)":{maxHeight:"250px",mb:.25}},children:[E.jsx(q.Box,{className:"parliament-chart-svg-container",ref:f,sx:{width:"100%",height:"100%",position:"relative",display:"flex",justifyContent:"center",alignItems:"center","& svg":{width:"100%",height:"100%",maxWidth:"100%","@media (min-width: 1024px) and (max-width: 1225px)":{maxHeight:"230px"}}}}),E.jsxs(q.Box,{className:"parliament-chart-tooltip",sx:{position:"absolute",bottom:"0%",left:"50%",transform:"translate(-50%, 0%)",pointerEvents:"none",textAlign:"center",zIndex:10,"@media (min-width: 1024px) and (max-width: 1225px)":{bottom:"5%"}},children:[h&&E.jsxs(G.Fragment,{children:[E.jsx(q.Typography,{sx:{color:"text.secondary",mb:.3,fontSize:"clamp(0.75rem, 1.5vw, 0.85rem)",display:"block","@media (min-width: 1024px) and (max-width: 1225px)":{fontSize:"0.7rem",mb:.2}},children:h.label}),E.jsxs(q.Typography,{sx:{fontWeight:"bold",color:h.color,lineHeight:1,fontSize:"clamp(1.1rem, 2.2vw, 1.3rem)","@media (min-width: 1024px) and (max-width: 1225px)":{fontSize:"1rem"}},children:[h.value," ",h.value>1?"repos":"repo"]})]}),S&&E.jsxs(q.Box,{className:"parliament-chart-scaled-indicator",sx:{display:"flex",alignItems:"center",justifyContent:"center",gap:.5,mt:h?.5:0,color:"text.secondary",fontSize:"clamp(0.65rem, 1.2vw, 0.72rem)"},children:[E.jsx(q.Box,{className:"parliament-chart-scaled-indicator-dot",sx:{width:8,height:8,borderRadius:"50%",backgroundColor:"#888888",flexShrink:0}}),E.jsxs(q.Typography,{variant:"caption",sx:{fontSize:"inherit",fontStyle:"italic"},children:["= ~",w," repos"]})]})]})]}),o&&E.jsx(q.Box,{className:"parliament-chart-data-table",sx:{width:"100%",display:"flex",justifyContent:"center","@media (min-width: 1024px) and (max-width: 1225px)":{overflowX:"auto",maxWidth:"100%"}},onMouseLeave:()=>{p(null),d(null)},children:E.jsxs(q.Table,{"aria-label":"Repository categories summary",className:"parliament-chart-table",size:"small",sx:{maxWidth:{xs:"clamp(360px, 90%, 400px)",sm:"clamp(360px, 90%, 400px)",md:"clamp(360px, 85%, 420px)",lg:"clamp(360px, 90%, 400px)"},"@media (min-width: 1024px) and (max-width: 1225px)":{maxWidth:"360px","& .MuiTableCell-root":{padding:"1px 4px",fontSize:"9.5px"}},"& .MuiTableCell-root":{padding:"2px 8px",borderBottom:"none",fontSize:"clamp(10px, 1.8vw, 11.5px)"}},children:[E.jsx("thead",{children:E.jsxs(q.TableRow,{children:[E.jsx(q.TableCell,{}),E.jsx(q.TableCell,{sx:{fontWeight:"bold"},children:"Category"}),E.jsx(q.TableCell,{align:"right",sx:{fontWeight:"bold"},children:"# of repos"}),E.jsx(q.TableCell,{align:"right",sx:{fontWeight:"bold"},children:"% of org"})]})}),E.jsx("tbody",{children:_.map(b=>{const M=b.color==="url(#greyHatchPattern)"?Dt.greyHatch.lines:b.color==="url(#dataMissingHatchPattern)"?Dt.dataMissingHatch.lines:b.color==="url(#noLstHatchPattern)"?Dt.noLstHatch.lines:b.color;return E.jsxs(q.TableRow,{onMouseEnter:()=>{d(b.label),p({label:b.label,value:b.value,color:b.color==="url(#greyHatchPattern)"?Dt.greyHatch.lines:b.color==="url(#dataMissingHatchPattern)"?Dt.dataMissingHatch.lines:b.color==="url(#noLstHatchPattern)"?Dt.noLstHatch.lines:b.color})},sx:{cursor:"pointer",transition:"background-color 0.15s ease",backgroundColor:g===b.label?`${M}15`:"transparent","&:hover":{backgroundColor:`${M}15`}},children:[E.jsx(q.TableCell,{align:"center",sx:{width:20},children:E.jsx(q.Box,{sx:{width:12,height:12,backgroundColor:b.color==="url(#greyHatchPattern)"?Dt.greyHatch.background:b.color==="url(#dataMissingHatchPattern)"?Dt.dataMissingHatch.background:b.color==="url(#noLstHatchPattern)"?Dt.noLstHatch.background:b.color,borderRadius:"50%",position:"relative",overflow:"hidden",transition:"transform 0.15s ease",transform:g===b.label?"scale(1.2)":"scale(1)",...b.label==="N/A"&&{"&::after":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`repeating-linear-gradient(
47
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function _M(e,t,n,r){const i=r.schema,a=i.space==="svg"?!1:r.settings.omitOptionalTags;let s=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const o=[];let l;i.space==="html"&&e.tagName==="svg"&&(r.schema=yf);const u=xM(r,e.properties),c=r.all(i.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=i,c&&(s=!1),(u||!a||!hM(e,t,n))&&(o.push("<",e.tagName,u?" "+u:""),s&&(i.space==="svg"||r.settings.closeSelfClosing)&&(l=u.charAt(u.length-1),(!r.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&o.push(" "),o.push("/")),o.push(">")),o.push(c),!s&&(!a||!xf(e,t,n))&&o.push("</"+e.tagName+">"),o.join("")}function xM(e,t){const n=[];let r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){const a=vM(e,i,t[i]);a&&n.push(a)}}for(;++r<n.length;){const a=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&a!=='"'&&a!=="'"&&(n[r]+=" ")}return n.join("")}function vM(e,t,n){const r=ty(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,a=e.settings.allowDangerousCharacters?0:1;let s=e.quote,o;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const l=Qr(r.attribute,Object.assign({},e.settings.characterReferences,{subset:wa.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?hT:dT)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?l:(e.settings.preferUnquoted&&(o=Qr(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:wa.unquoted[i][a]}))),o!==n&&(e.settings.quoteSmart&&Xh(n,s)>Xh(n,e.alternative)&&(s=e.alternative),o=s+Qr(n,Object.assign({},e.settings.characterReferences,{subset:(s==="'"?wa.single:wa.double)[i][a],attribute:!0}))+s),l+(o&&"="+o))}const bM=["<","&"];function hy(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Qr(e.value,Object.assign({},r.settings.characterReferences,{subset:bM}))}function wM(e,t,n,r){return r.settings.allowDangerousHtml?e.value:hy(e,t,n,r)}function SM(e,t,n,r){return r.all(e)}const TM=RT("type",{invalid:MM,unknown:AM,handlers:{comment:KT,doctype:VT,element:_M,raw:wM,root:SM,text:hy}});function MM(e){throw new Error("Expected node, not `"+e+"`")}function AM(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const kM={},CM={},RM=[];function EM(e,t){const n=kM,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:DM,all:OM,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||CT,characterReferences:n.characterReferences||CM,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?yf:ey,quote:r,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function DM(e,t,n){return TM(e,t,n,this)}function OM(e){const t=[],n=e&&e.children||RM;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}const Pe={arcAngle:180,maxSeats:200,useEnhanced:!0,chartConfig:{radius:220,seatSize:5,minSeatSize:4,maxSeatSize:18,spacing:1.1,innerRadiusRatio:.4,arcAngleFlexibility:5},colors:{emptySeats:"#f8f8f8",emptySeatsBorder:"#d8d8d8",seatBorder:"#fff"},animation:{transitionDuration:"0.2s",hoverOpacity:{active:"1",dimmed:"0.2",empty:"0.3"}},scaling:{enableScaling:!0,scaleThreshold:200}},Jr={COMPLETED:pn.neoDigitalGreen[600],NOT_APPLICABLE:"url(#greyHatchPattern)",NO_LST:"url(#noLstHatchPattern)",DATA_MISSING:"url(#dataMissingHatchPattern)"},zi="N/A",Bi="No LST",Ui="Data Missing";function PM(e,t,n,r="left-to-right",i=900,a){Ot.prototype.transition=Ic;const s=t*Math.PI/180,o=-s/2-Math.PI/2,l=s/2-Math.PI/2;let u=e.querySelector("defs");u||(u=document.createElementNS("http://www.w3.org/2000/svg","defs"),e.appendChild(u));const c="arc-sweep-clip";let f=u.querySelector(`#${c}`);f||(f=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),f.setAttribute("id",c),u.appendChild(f));const h=document.createElementNS("http://www.w3.org/2000/svg","path");f.innerHTML="",f.appendChild(h);const p=e.querySelector(".arc-container"),g=e.querySelector(".points-container");if(g&&p)if(g.setAttribute("clip-path",`url(#${c})`),r==="left-to-right"){const m=y=>{const v=n*1.5,_=Math.cos(y)*v,S=Math.sin(y)*v,w=Math.cos(l)*v,b=Math.sin(l)*v,M=l-y>Math.PI?1:0;return`M 0,0 L ${_},${S} A ${v},${v} 0 ${M},1 ${w},${b} Z`};h.setAttribute("d",m(o)),Ot(h).transition().duration(i).ease(y=>1-Math.pow(1-y,3)).tween("arc-sweep",()=>y=>{const v=o+(l-o)*y;h.setAttribute("d",m(v))}).on("end",()=>{a&&a(),setTimeout(()=>{g.removeAttribute("clip-path")},50)})}else{const m=y=>{const v=n*1.5,_=Math.cos(y)*v,S=Math.sin(y)*v,w=Math.cos(l)*v,b=Math.sin(l)*v,M=l-y>Math.PI?1:0;return`M 0,0 L ${_},${S} A ${v},${v} 0 ${M},1 ${w},${b} Z`};h.setAttribute("d",m(l)),Ot(h).transition().duration(i).ease(y=>1-Math.pow(1-y,3)).tween("arc-sweep",()=>y=>{const v=l-(l-o)*y;h.setAttribute("d",m(v))}).on("end",()=>{g.removeAttribute("clip-path"),a&&a()})}}var Sa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vs,Qh;function py(){if(Qh)return Vs;Qh=1;var e=typeof Sa=="object"&&Sa&&Sa.Object===Object&&Sa;return Vs=e,Vs}var Zs,Jh;function Cn(){if(Jh)return Zs;Jh=1;var e=py(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return Zs=n,Zs}var Qs,tp;function FM(){if(tp)return Qs;tp=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return Qs=t,Qs}var Js,ep;function $M(){if(ep)return Js;ep=1;var e=FM(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return Js=n,Js}var to,np;function sa(){if(np)return to;np=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return to=e,to}var eo,rp;function oa(){if(rp)return eo;rp=1;var e=Cn(),t=e.Symbol;return eo=t,eo}var no,ip;function LM(){if(ip)return no;ip=1;var e=oa(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function a(s){var o=n.call(s,i),l=s[i];try{s[i]=void 0;var u=!0}catch{}var c=r.call(s);return u&&(o?s[i]=l:delete s[i]),c}return no=a,no}var ro,ap;function NM(){if(ap)return ro;ap=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return ro=n,ro}var io,sp;function la(){if(sp)return io;sp=1;var e=oa(),t=LM(),n=NM(),r="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function s(o){return o==null?o===void 0?i:r:a&&a in Object(o)?t(o):n(o)}return io=s,io}var ao,op;function ua(){if(op)return ao;op=1;function e(t){return t!=null&&typeof t=="object"}return ao=e,ao}var so,lp;function ca(){if(lp)return so;lp=1;var e=la(),t=ua(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return so=r,so}var oo,up;function dy(){if(up)return oo;up=1;var e=$M(),t=sa(),n=ca(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,o=parseInt;function l(u){if(typeof u=="number")return u;if(n(u))return r;if(t(u)){var c=typeof u.valueOf=="function"?u.valueOf():u;u=t(c)?c+"":c}if(typeof u!="string")return u===0?u:+u;u=e(u);var f=a.test(u);return f||s.test(u)?o(u.slice(2),f?2:8):i.test(u)?r:+u}return oo=l,oo}var lo,cp;function gy(){if(cp)return lo;cp=1;var e=dy(),t=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var a=i<0?-1:1;return a*n}return i===i?i:0}return lo=r,lo}var uo,fp;function my(){if(fp)return uo;fp=1;var e=gy();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return uo=t,uo}var co,hp;function us(){if(hp)return co;hp=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,a=Array(i);++r<i;)a[r]=n(t[r],r,t);return a}return co=e,co}var fo,pp;function dn(){if(pp)return fo;pp=1;var e=Array.isArray;return fo=e,fo}var ho,dp;function qM(){if(dp)return ho;dp=1;var e=oa(),t=us(),n=dn(),r=ca(),i=e?e.prototype:void 0,a=i?i.toString:void 0;function s(o){if(typeof o=="string")return o;if(n(o))return t(o,s)+"";if(r(o))return a?a.call(o):"";var l=o+"";return l=="0"&&1/o==-1/0?"-0":l}return ho=s,ho}var po,gp;function yy(){if(gp)return po;gp=1;var e=qM();function t(n){return n==null?"":e(n)}return po=t,po}var go,mp;function IM(){if(mp)return go;mp=1;var e=Cn(),t=my(),n=dy(),r=yy(),i=e.isFinite,a=Math.min;function s(o){var l=Math[o];return function(u,c){if(u=n(u),c=c==null?0:a(t(c),292),c&&i(u)){var f=(r(u)+"e").split("e"),h=l(f[0]+"e"+(+f[1]+c));return f=(r(h)+"e").split("e"),+(f[0]+"e"+(+f[1]-c))}return l(u)}}return go=s,go}var mo,yp;function zM(){if(yp)return mo;yp=1;var e=IM(),t=e("round");return mo=t,mo}var BM=zM();const UM=gi(BM);var yo,_p;function _y(){if(_p)return yo;_p=1;function e(t,n){for(var r=-1,i=n.length,a=t.length;++r<i;)t[a+r]=n[r];return t}return yo=e,yo}var _o,xp;function HM(){if(xp)return _o;xp=1;var e=la(),t=ua(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return _o=r,_o}var xo,vp;function vf(){if(vp)return xo;vp=1;var e=HM(),t=ua(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,a=e((function(){return arguments})())?e:function(s){return t(s)&&r.call(s,"callee")&&!i.call(s,"callee")};return xo=a,xo}var vo,bp;function jM(){if(bp)return vo;bp=1;var e=oa(),t=vf(),n=dn(),r=e?e.isConcatSpreadable:void 0;function i(a){return n(a)||t(a)||!!(r&&a&&a[r])}return vo=i,vo}var bo,wp;function xy(){if(wp)return bo;wp=1;var e=_y(),t=jM();function n(r,i,a,s,o){var l=-1,u=r.length;for(a||(a=t),o||(o=[]);++l<u;){var c=r[l];i>0&&a(c)?i>1?n(c,i-1,a,s,o):e(o,c):s||(o[o.length]=c)}return o}return bo=n,bo}var wo,Sp;function bf(){if(Sp)return wo;Sp=1;var e=dn(),t=ca(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(a,s){if(e(a))return!1;var o=typeof a;return o=="number"||o=="symbol"||o=="boolean"||a==null||t(a)?!0:r.test(a)||!n.test(a)||s!=null&&a in Object(s)}return wo=i,wo}var So,Tp;function vy(){if(Tp)return So;Tp=1;var e=la(),t=sa(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function s(o){if(!t(o))return!1;var l=e(o);return l==r||l==i||l==n||l==a}return So=s,So}var To,Mp;function GM(){if(Mp)return To;Mp=1;var e=Cn(),t=e["__core-js_shared__"];return To=t,To}var Mo,Ap;function YM(){if(Ap)return Mo;Ap=1;var e=GM(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return Mo=n,Mo}var Ao,kp;function by(){if(kp)return Ao;kp=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return Ao=n,Ao}var ko,Cp;function WM(){if(Cp)return ko;Cp=1;var e=vy(),t=YM(),n=sa(),r=by(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,s=Function.prototype,o=Object.prototype,l=s.toString,u=o.hasOwnProperty,c=RegExp("^"+l.call(u).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(h){if(!n(h)||t(h))return!1;var p=e(h)?c:a;return p.test(r(h))}return ko=f,ko}var Co,Rp;function XM(){if(Rp)return Co;Rp=1;function e(t,n){return t==null?void 0:t[n]}return Co=e,Co}var Ro,Ep;function Or(){if(Ep)return Ro;Ep=1;var e=WM(),t=XM();function n(r,i){var a=t(r,i);return e(a)?a:void 0}return Ro=n,Ro}var Eo,Dp;function cs(){if(Dp)return Eo;Dp=1;var e=Or(),t=e(Object,"create");return Eo=t,Eo}var Do,Op;function KM(){if(Op)return Do;Op=1;var e=cs();function t(){this.__data__=e?e(null):{},this.size=0}return Do=t,Do}var Oo,Pp;function VM(){if(Pp)return Oo;Pp=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return Oo=e,Oo}var Po,Fp;function ZM(){if(Fp)return Po;Fp=1;var e=cs(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(a){var s=this.__data__;if(e){var o=s[a];return o===t?void 0:o}return r.call(s,a)?s[a]:void 0}return Po=i,Po}var Fo,$p;function QM(){if($p)return Fo;$p=1;var e=cs(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var a=this.__data__;return e?a[i]!==void 0:n.call(a,i)}return Fo=r,Fo}var $o,Lp;function JM(){if(Lp)return $o;Lp=1;var e=cs(),t="__lodash_hash_undefined__";function n(r,i){var a=this.__data__;return this.size+=this.has(r)?0:1,a[r]=e&&i===void 0?t:i,this}return $o=n,$o}var Lo,Np;function tA(){if(Np)return Lo;Np=1;var e=KM(),t=VM(),n=ZM(),r=QM(),i=JM();function a(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o<l;){var u=s[o];this.set(u[0],u[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,Lo=a,Lo}var No,qp;function eA(){if(qp)return No;qp=1;function e(){this.__data__=[],this.size=0}return No=e,No}var qo,Ip;function wf(){if(Ip)return qo;Ip=1;function e(t,n){return t===n||t!==t&&n!==n}return qo=e,qo}var Io,zp;function fs(){if(zp)return Io;zp=1;var e=wf();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return Io=t,Io}var zo,Bp;function nA(){if(Bp)return zo;Bp=1;var e=fs(),t=Array.prototype,n=t.splice;function r(i){var a=this.__data__,s=e(a,i);if(s<0)return!1;var o=a.length-1;return s==o?a.pop():n.call(a,s,1),--this.size,!0}return zo=r,zo}var Bo,Up;function rA(){if(Up)return Bo;Up=1;var e=fs();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return Bo=t,Bo}var Uo,Hp;function iA(){if(Hp)return Uo;Hp=1;var e=fs();function t(n){return e(this.__data__,n)>-1}return Uo=t,Uo}var Ho,jp;function aA(){if(jp)return Ho;jp=1;var e=fs();function t(n,r){var i=this.__data__,a=e(i,n);return a<0?(++this.size,i.push([n,r])):i[a][1]=r,this}return Ho=t,Ho}var jo,Gp;function hs(){if(Gp)return jo;Gp=1;var e=eA(),t=nA(),n=rA(),r=iA(),i=aA();function a(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o<l;){var u=s[o];this.set(u[0],u[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,jo=a,jo}var Go,Yp;function Sf(){if(Yp)return Go;Yp=1;var e=Or(),t=Cn(),n=e(t,"Map");return Go=n,Go}var Yo,Wp;function sA(){if(Wp)return Yo;Wp=1;var e=tA(),t=hs(),n=Sf();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return Yo=r,Yo}var Wo,Xp;function oA(){if(Xp)return Wo;Xp=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return Wo=e,Wo}var Xo,Kp;function ps(){if(Kp)return Xo;Kp=1;var e=oA();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return Xo=t,Xo}var Ko,Vp;function lA(){if(Vp)return Ko;Vp=1;var e=ps();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return Ko=t,Ko}var Vo,Zp;function uA(){if(Zp)return Vo;Zp=1;var e=ps();function t(n){return e(this,n).get(n)}return Vo=t,Vo}var Zo,Qp;function cA(){if(Qp)return Zo;Qp=1;var e=ps();function t(n){return e(this,n).has(n)}return Zo=t,Zo}var Qo,Jp;function fA(){if(Jp)return Qo;Jp=1;var e=ps();function t(n,r){var i=e(this,n),a=i.size;return i.set(n,r),this.size+=i.size==a?0:1,this}return Qo=t,Qo}var Jo,td;function Tf(){if(td)return Jo;td=1;var e=sA(),t=lA(),n=uA(),r=cA(),i=fA();function a(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o<l;){var u=s[o];this.set(u[0],u[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,Jo=a,Jo}var tl,ed;function hA(){if(ed)return tl;ed=1;var e=Tf(),t="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var a=function(){var s=arguments,o=i?i.apply(this,s):s[0],l=a.cache;if(l.has(o))return l.get(o);var u=r.apply(this,s);return a.cache=l.set(o,u)||l,u};return a.cache=new(n.Cache||e),a}return n.Cache=e,tl=n,tl}var el,nd;function pA(){if(nd)return el;nd=1;var e=hA(),t=500;function n(r){var i=e(r,function(s){return a.size===t&&a.clear(),s}),a=i.cache;return i}return el=n,el}var nl,rd;function dA(){if(rd)return nl;rd=1;var e=pA(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(t,function(s,o,l,u){a.push(l?u.replace(n,"$1"):o||s)}),a});return nl=r,nl}var rl,id;function wy(){if(id)return rl;id=1;var e=dn(),t=bf(),n=dA(),r=yy();function i(a,s){return e(a)?a:t(a,s)?[a]:n(r(a))}return rl=i,rl}var il,ad;function ds(){if(ad)return il;ad=1;var e=ca();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return il=t,il}var al,sd;function Mf(){if(sd)return al;sd=1;var e=wy(),t=ds();function n(r,i){i=e(i,r);for(var a=0,s=i.length;r!=null&&a<s;)r=r[t(i[a++])];return a&&a==s?r:void 0}return al=n,al}var sl,od;function gA(){if(od)return sl;od=1;var e=hs();function t(){this.__data__=new e,this.size=0}return sl=t,sl}var ol,ld;function mA(){if(ld)return ol;ld=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return ol=e,ol}var ll,ud;function yA(){if(ud)return ll;ud=1;function e(t){return this.__data__.get(t)}return ll=e,ll}var ul,cd;function _A(){if(cd)return ul;cd=1;function e(t){return this.__data__.has(t)}return ul=e,ul}var cl,fd;function xA(){if(fd)return cl;fd=1;var e=hs(),t=Sf(),n=Tf(),r=200;function i(a,s){var o=this.__data__;if(o instanceof e){var l=o.__data__;if(!t||l.length<r-1)return l.push([a,s]),this.size=++o.size,this;o=this.__data__=new n(l)}return o.set(a,s),this.size=o.size,this}return cl=i,cl}var fl,hd;function Sy(){if(hd)return fl;hd=1;var e=hs(),t=gA(),n=mA(),r=yA(),i=_A(),a=xA();function s(o){var l=this.__data__=new e(o);this.size=l.size}return s.prototype.clear=t,s.prototype.delete=n,s.prototype.get=r,s.prototype.has=i,s.prototype.set=a,fl=s,fl}var hl,pd;function vA(){if(pd)return hl;pd=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return hl=t,hl}var pl,dd;function bA(){if(dd)return pl;dd=1;function e(t){return this.__data__.has(t)}return pl=e,pl}var dl,gd;function wA(){if(gd)return dl;gd=1;var e=Tf(),t=vA(),n=bA();function r(i){var a=-1,s=i==null?0:i.length;for(this.__data__=new e;++a<s;)this.add(i[a])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,dl=r,dl}var gl,md;function SA(){if(md)return gl;md=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}return gl=e,gl}var ml,yd;function TA(){if(yd)return ml;yd=1;function e(t,n){return t.has(n)}return ml=e,ml}var yl,_d;function Ty(){if(_d)return yl;_d=1;var e=wA(),t=SA(),n=TA(),r=1,i=2;function a(s,o,l,u,c,f){var h=l&r,p=s.length,g=o.length;if(p!=g&&!(h&&g>p))return!1;var d=f.get(s),m=f.get(o);if(d&&m)return d==o&&m==s;var x=-1,y=!0,v=l&i?new e:void 0;for(f.set(s,o),f.set(o,s);++x<p;){var _=s[x],S=o[x];if(u)var w=h?u(S,_,x,o,s,f):u(_,S,x,s,o,f);if(w!==void 0){if(w)continue;y=!1;break}if(v){if(!t(o,function(b,M){if(!n(v,M)&&(_===b||c(_,b,l,u,f)))return v.push(M)})){y=!1;break}}else if(!(_===S||c(_,S,l,u,f))){y=!1;break}}return f.delete(s),f.delete(o),y}return yl=a,yl}var _l,xd;function MA(){if(xd)return _l;xd=1;var e=Cn(),t=e.Uint8Array;return _l=t,_l}var xl,vd;function AA(){if(vd)return xl;vd=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,a){r[++n]=[a,i]}),r}return xl=e,xl}var vl,bd;function kA(){if(bd)return vl;bd=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return vl=e,vl}var bl,wd;function CA(){if(wd)return bl;wd=1;var e=oa(),t=MA(),n=wf(),r=Ty(),i=AA(),a=kA(),s=1,o=2,l="[object Boolean]",u="[object Date]",c="[object Error]",f="[object Map]",h="[object Number]",p="[object RegExp]",g="[object Set]",d="[object String]",m="[object Symbol]",x="[object ArrayBuffer]",y="[object DataView]",v=e?e.prototype:void 0,_=v?v.valueOf:void 0;function S(w,b,M,A,k,C,O){switch(M){case y:if(w.byteLength!=b.byteLength||w.byteOffset!=b.byteOffset)return!1;w=w.buffer,b=b.buffer;case x:return!(w.byteLength!=b.byteLength||!C(new t(w),new t(b)));case l:case u:case h:return n(+w,+b);case c:return w.name==b.name&&w.message==b.message;case p:case d:return w==b+"";case f:var P=i;case g:var F=A&s;if(P||(P=a),w.size!=b.size&&!F)return!1;var B=O.get(w);if(B)return B==b;A|=o,O.set(w,b);var L=r(P(w),P(b),A,k,C,O);return O.delete(w),L;case m:if(_)return _.call(w)==_.call(b)}return!1}return bl=S,bl}var wl,Sd;function RA(){if(Sd)return wl;Sd=1;var e=_y(),t=dn();function n(r,i,a){var s=i(r);return t(r)?s:e(s,a(r))}return wl=n,wl}var Sl,Td;function EA(){if(Td)return Sl;Td=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,a=0,s=[];++r<i;){var o=t[r];n(o,r,t)&&(s[a++]=o)}return s}return Sl=e,Sl}var Tl,Md;function DA(){if(Md)return Tl;Md=1;function e(){return[]}return Tl=e,Tl}var Ml,Ad;function OA(){if(Ad)return Ml;Ad=1;var e=EA(),t=DA(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(s){return s==null?[]:(s=Object(s),e(i(s),function(o){return r.call(s,o)}))}:t;return Ml=a,Ml}var Al,kd;function PA(){if(kd)return Al;kd=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return Al=e,Al}var Di={exports:{}},kl,Cd;function FA(){if(Cd)return kl;Cd=1;function e(){return!1}return kl=e,kl}Di.exports;var Rd;function My(){return Rd||(Rd=1,(function(e,t){var n=Cn(),r=FA(),i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,s=a&&a.exports===i,o=s?n.Buffer:void 0,l=o?o.isBuffer:void 0,u=l||r;e.exports=u})(Di,Di.exports)),Di.exports}var Cl,Ed;function Af(){if(Ed)return Cl;Ed=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,i){var a=typeof r;return i=i??e,!!i&&(a=="number"||a!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<i}return Cl=n,Cl}var Rl,Dd;function kf(){if(Dd)return Rl;Dd=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return Rl=t,Rl}var El,Od;function $A(){if(Od)return El;Od=1;var e=la(),t=kf(),n=ua(),r="[object Arguments]",i="[object Array]",a="[object Boolean]",s="[object Date]",o="[object Error]",l="[object Function]",u="[object Map]",c="[object Number]",f="[object Object]",h="[object RegExp]",p="[object Set]",g="[object String]",d="[object WeakMap]",m="[object ArrayBuffer]",x="[object DataView]",y="[object Float32Array]",v="[object Float64Array]",_="[object Int8Array]",S="[object Int16Array]",w="[object Int32Array]",b="[object Uint8Array]",M="[object Uint8ClampedArray]",A="[object Uint16Array]",k="[object Uint32Array]",C={};C[y]=C[v]=C[_]=C[S]=C[w]=C[b]=C[M]=C[A]=C[k]=!0,C[r]=C[i]=C[m]=C[a]=C[x]=C[s]=C[o]=C[l]=C[u]=C[c]=C[f]=C[h]=C[p]=C[g]=C[d]=!1;function O(P){return n(P)&&t(P.length)&&!!C[e(P)]}return El=O,El}var Dl,Pd;function Ay(){if(Pd)return Dl;Pd=1;function e(t){return function(n){return t(n)}}return Dl=e,Dl}var Oi={exports:{}};Oi.exports;var Fd;function LA(){return Fd||(Fd=1,(function(e,t){var n=py(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,s=a&&n.process,o=(function(){try{var l=i&&i.require&&i.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}})();e.exports=o})(Oi,Oi.exports)),Oi.exports}var Ol,$d;function ky(){if($d)return Ol;$d=1;var e=$A(),t=Ay(),n=LA(),r=n&&n.isTypedArray,i=r?t(r):e;return Ol=i,Ol}var Pl,Ld;function NA(){if(Ld)return Pl;Ld=1;var e=PA(),t=vf(),n=dn(),r=My(),i=Af(),a=ky(),s=Object.prototype,o=s.hasOwnProperty;function l(u,c){var f=n(u),h=!f&&t(u),p=!f&&!h&&r(u),g=!f&&!h&&!p&&a(u),d=f||h||p||g,m=d?e(u.length,String):[],x=m.length;for(var y in u)(c||o.call(u,y))&&!(d&&(y=="length"||p&&(y=="offset"||y=="parent")||g&&(y=="buffer"||y=="byteLength"||y=="byteOffset")||i(y,x)))&&m.push(y);return m}return Pl=l,Pl}var Fl,Nd;function qA(){if(Nd)return Fl;Nd=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return Fl=t,Fl}var $l,qd;function IA(){if(qd)return $l;qd=1;function e(t,n){return function(r){return t(n(r))}}return $l=e,$l}var Ll,Id;function zA(){if(Id)return Ll;Id=1;var e=IA(),t=e(Object.keys,Object);return Ll=t,Ll}var Nl,zd;function BA(){if(zd)return Nl;zd=1;var e=qA(),t=zA(),n=Object.prototype,r=n.hasOwnProperty;function i(a){if(!e(a))return t(a);var s=[];for(var o in Object(a))r.call(a,o)&&o!="constructor"&&s.push(o);return s}return Nl=i,Nl}var ql,Bd;function gs(){if(Bd)return ql;Bd=1;var e=vy(),t=kf();function n(r){return r!=null&&t(r.length)&&!e(r)}return ql=n,ql}var Il,Ud;function ms(){if(Ud)return Il;Ud=1;var e=NA(),t=BA(),n=gs();function r(i){return n(i)?e(i):t(i)}return Il=r,Il}var zl,Hd;function UA(){if(Hd)return zl;Hd=1;var e=RA(),t=OA(),n=ms();function r(i){return e(i,n,t)}return zl=r,zl}var Bl,jd;function HA(){if(jd)return Bl;jd=1;var e=UA(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(a,s,o,l,u,c){var f=o&t,h=e(a),p=h.length,g=e(s),d=g.length;if(p!=d&&!f)return!1;for(var m=p;m--;){var x=h[m];if(!(f?x in s:r.call(s,x)))return!1}var y=c.get(a),v=c.get(s);if(y&&v)return y==s&&v==a;var _=!0;c.set(a,s),c.set(s,a);for(var S=f;++m<p;){x=h[m];var w=a[x],b=s[x];if(l)var M=f?l(b,w,x,s,a,c):l(w,b,x,a,s,c);if(!(M===void 0?w===b||u(w,b,o,l,c):M)){_=!1;break}S||(S=x=="constructor")}if(_&&!S){var A=a.constructor,k=s.constructor;A!=k&&"constructor"in a&&"constructor"in s&&!(typeof A=="function"&&A instanceof A&&typeof k=="function"&&k instanceof k)&&(_=!1)}return c.delete(a),c.delete(s),_}return Bl=i,Bl}var Ul,Gd;function jA(){if(Gd)return Ul;Gd=1;var e=Or(),t=Cn(),n=e(t,"DataView");return Ul=n,Ul}var Hl,Yd;function GA(){if(Yd)return Hl;Yd=1;var e=Or(),t=Cn(),n=e(t,"Promise");return Hl=n,Hl}var jl,Wd;function YA(){if(Wd)return jl;Wd=1;var e=Or(),t=Cn(),n=e(t,"Set");return jl=n,jl}var Gl,Xd;function WA(){if(Xd)return Gl;Xd=1;var e=Or(),t=Cn(),n=e(t,"WeakMap");return Gl=n,Gl}var Yl,Kd;function XA(){if(Kd)return Yl;Kd=1;var e=jA(),t=Sf(),n=GA(),r=YA(),i=WA(),a=la(),s=by(),o="[object Map]",l="[object Object]",u="[object Promise]",c="[object Set]",f="[object WeakMap]",h="[object DataView]",p=s(e),g=s(t),d=s(n),m=s(r),x=s(i),y=a;return(e&&y(new e(new ArrayBuffer(1)))!=h||t&&y(new t)!=o||n&&y(n.resolve())!=u||r&&y(new r)!=c||i&&y(new i)!=f)&&(y=function(v){var _=a(v),S=_==l?v.constructor:void 0,w=S?s(S):"";if(w)switch(w){case p:return h;case g:return o;case d:return u;case m:return c;case x:return f}return _}),Yl=y,Yl}var Wl,Vd;function KA(){if(Vd)return Wl;Vd=1;var e=Sy(),t=Ty(),n=CA(),r=HA(),i=XA(),a=dn(),s=My(),o=ky(),l=1,u="[object Arguments]",c="[object Array]",f="[object Object]",h=Object.prototype,p=h.hasOwnProperty;function g(d,m,x,y,v,_){var S=a(d),w=a(m),b=S?c:i(d),M=w?c:i(m);b=b==u?f:b,M=M==u?f:M;var A=b==f,k=M==f,C=b==M;if(C&&s(d)){if(!s(m))return!1;S=!0,A=!1}if(C&&!A)return _||(_=new e),S||o(d)?t(d,m,x,y,v,_):n(d,m,b,x,y,v,_);if(!(x&l)){var O=A&&p.call(d,"__wrapped__"),P=k&&p.call(m,"__wrapped__");if(O||P){var F=O?d.value():d,B=P?m.value():m;return _||(_=new e),v(F,B,x,y,_)}}return C?(_||(_=new e),r(d,m,x,y,v,_)):!1}return Wl=g,Wl}var Xl,Zd;function Cy(){if(Zd)return Xl;Zd=1;var e=KA(),t=ua();function n(r,i,a,s,o){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,a,s,n,o)}return Xl=n,Xl}var Kl,Qd;function VA(){if(Qd)return Kl;Qd=1;var e=Sy(),t=Cy(),n=1,r=2;function i(a,s,o,l){var u=o.length,c=u,f=!l;if(a==null)return!c;for(a=Object(a);u--;){var h=o[u];if(f&&h[2]?h[1]!==a[h[0]]:!(h[0]in a))return!1}for(;++u<c;){h=o[u];var p=h[0],g=a[p],d=h[1];if(f&&h[2]){if(g===void 0&&!(p in a))return!1}else{var m=new e;if(l)var x=l(g,d,p,a,s,m);if(!(x===void 0?t(d,g,n|r,l,m):x))return!1}}return!0}return Kl=i,Kl}var Vl,Jd;function Ry(){if(Jd)return Vl;Jd=1;var e=sa();function t(n){return n===n&&!e(n)}return Vl=t,Vl}var Zl,tg;function ZA(){if(tg)return Zl;tg=1;var e=Ry(),t=ms();function n(r){for(var i=t(r),a=i.length;a--;){var s=i[a],o=r[s];i[a]=[s,o,e(o)]}return i}return Zl=n,Zl}var Ql,eg;function Ey(){if(eg)return Ql;eg=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return Ql=e,Ql}var Jl,ng;function QA(){if(ng)return Jl;ng=1;var e=VA(),t=ZA(),n=Ey();function r(i){var a=t(i);return a.length==1&&a[0][2]?n(a[0][0],a[0][1]):function(s){return s===i||e(s,i,a)}}return Jl=r,Jl}var tu,rg;function JA(){if(rg)return tu;rg=1;var e=Mf();function t(n,r,i){var a=n==null?void 0:e(n,r);return a===void 0?i:a}return tu=t,tu}var eu,ig;function tk(){if(ig)return eu;ig=1;function e(t,n){return t!=null&&n in Object(t)}return eu=e,eu}var nu,ag;function ek(){if(ag)return nu;ag=1;var e=wy(),t=vf(),n=dn(),r=Af(),i=kf(),a=ds();function s(o,l,u){l=e(l,o);for(var c=-1,f=l.length,h=!1;++c<f;){var p=a(l[c]);if(!(h=o!=null&&u(o,p)))break;o=o[p]}return h||++c!=f?h:(f=o==null?0:o.length,!!f&&i(f)&&r(p,f)&&(n(o)||t(o)))}return nu=s,nu}var ru,sg;function nk(){if(sg)return ru;sg=1;var e=tk(),t=ek();function n(r,i){return r!=null&&t(r,i,e)}return ru=n,ru}var iu,og;function rk(){if(og)return iu;og=1;var e=Cy(),t=JA(),n=nk(),r=bf(),i=Ry(),a=Ey(),s=ds(),o=1,l=2;function u(c,f){return r(c)&&i(f)?a(s(c),f):function(h){var p=t(h,c);return p===void 0&&p===f?n(h,c):e(f,p,o|l)}}return iu=u,iu}var au,lg;function ys(){if(lg)return au;lg=1;function e(t){return t}return au=e,au}var su,ug;function ik(){if(ug)return su;ug=1;function e(t){return function(n){return n==null?void 0:n[t]}}return su=e,su}var ou,cg;function ak(){if(cg)return ou;cg=1;var e=Mf();function t(n){return function(r){return e(r,n)}}return ou=t,ou}var lu,fg;function sk(){if(fg)return lu;fg=1;var e=ik(),t=ak(),n=bf(),r=ds();function i(a){return n(a)?e(r(a)):t(a)}return lu=i,lu}var uu,hg;function Dy(){if(hg)return uu;hg=1;var e=QA(),t=rk(),n=ys(),r=dn(),i=sk();function a(s){return typeof s=="function"?s:s==null?n:typeof s=="object"?r(s)?t(s[0],s[1]):e(s):i(s)}return uu=a,uu}var cu,pg;function ok(){if(pg)return cu;pg=1;function e(t){return function(n,r,i){for(var a=-1,s=Object(n),o=i(n),l=o.length;l--;){var u=o[t?l:++a];if(r(s[u],u,s)===!1)break}return n}}return cu=e,cu}var fu,dg;function lk(){if(dg)return fu;dg=1;var e=ok(),t=e();return fu=t,fu}var hu,gg;function uk(){if(gg)return hu;gg=1;var e=lk(),t=ms();function n(r,i){return r&&e(r,i,t)}return hu=n,hu}var pu,mg;function ck(){if(mg)return pu;mg=1;var e=gs();function t(n,r){return function(i,a){if(i==null)return i;if(!e(i))return n(i,a);for(var s=i.length,o=r?s:-1,l=Object(i);(r?o--:++o<s)&&a(l[o],o,l)!==!1;);return i}}return pu=t,pu}var du,yg;function fk(){if(yg)return du;yg=1;var e=uk(),t=ck(),n=t(e);return du=n,du}var gu,_g;function Oy(){if(_g)return gu;_g=1;var e=fk(),t=gs();function n(r,i){var a=-1,s=t(r)?Array(r.length):[];return e(r,function(o,l,u){s[++a]=i(o,l,u)}),s}return gu=n,gu}var mu,xg;function hk(){if(xg)return mu;xg=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return mu=e,mu}var yu,vg;function pk(){if(vg)return yu;vg=1;var e=ca();function t(n,r){if(n!==r){var i=n!==void 0,a=n===null,s=n===n,o=e(n),l=r!==void 0,u=r===null,c=r===r,f=e(r);if(!u&&!f&&!o&&n>r||o&&l&&c&&!u&&!f||a&&l&&c||!i&&c||!s)return 1;if(!a&&!o&&!f&&n<r||f&&i&&s&&!a&&!o||u&&i&&s||!l&&s||!c)return-1}return 0}return yu=t,yu}var _u,bg;function dk(){if(bg)return _u;bg=1;var e=pk();function t(n,r,i){for(var a=-1,s=n.criteria,o=r.criteria,l=s.length,u=i.length;++a<l;){var c=e(s[a],o[a]);if(c){if(a>=u)return c;var f=i[a];return c*(f=="desc"?-1:1)}}return n.index-r.index}return _u=t,_u}var xu,wg;function gk(){if(wg)return xu;wg=1;var e=us(),t=Mf(),n=Dy(),r=Oy(),i=hk(),a=Ay(),s=dk(),o=ys(),l=dn();function u(c,f,h){f.length?f=e(f,function(d){return l(d)?function(m){return t(m,d.length===1?d[0]:d)}:d}):f=[o];var p=-1;f=e(f,a(n));var g=r(c,function(d,m,x){var y=e(f,function(v){return v(d)});return{criteria:y,index:++p,value:d}});return i(g,function(d,m){return s(d,m,h)})}return xu=u,xu}var vu,Sg;function mk(){if(Sg)return vu;Sg=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return vu=e,vu}var bu,Tg;function yk(){if(Tg)return bu;Tg=1;var e=mk(),t=Math.max;function n(r,i,a){return i=t(i===void 0?r.length-1:i,0),function(){for(var s=arguments,o=-1,l=t(s.length-i,0),u=Array(l);++o<l;)u[o]=s[i+o];o=-1;for(var c=Array(i+1);++o<i;)c[o]=s[o];return c[i]=a(u),e(r,this,c)}}return bu=n,bu}var wu,Mg;function _k(){if(Mg)return wu;Mg=1;function e(t){return function(){return t}}return wu=e,wu}var Su,Ag;function xk(){if(Ag)return Su;Ag=1;var e=Or(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return Su=t,Su}var Tu,kg;function vk(){if(kg)return Tu;kg=1;var e=_k(),t=xk(),n=ys(),r=t?function(i,a){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(a),writable:!0})}:n;return Tu=r,Tu}var Mu,Cg;function bk(){if(Cg)return Mu;Cg=1;var e=800,t=16,n=Date.now;function r(i){var a=0,s=0;return function(){var o=n(),l=t-(o-s);if(s=o,l>0){if(++a>=e)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return Mu=r,Mu}var Au,Rg;function wk(){if(Rg)return Au;Rg=1;var e=vk(),t=bk(),n=t(e);return Au=n,Au}var ku,Eg;function Sk(){if(Eg)return ku;Eg=1;var e=ys(),t=yk(),n=wk();function r(i,a){return n(t(i,a,e),i+"")}return ku=r,ku}var Cu,Dg;function Cf(){if(Dg)return Cu;Dg=1;var e=wf(),t=gs(),n=Af(),r=sa();function i(a,s,o){if(!r(o))return!1;var l=typeof s;return(l=="number"?t(o)&&n(s,o.length):l=="string"&&s in o)?e(o[s],a):!1}return Cu=i,Cu}var Ru,Og;function Tk(){if(Og)return Ru;Og=1;var e=xy(),t=gk(),n=Sk(),r=Cf(),i=n(function(a,s){if(a==null)return[];var o=s.length;return o>1&&r(a,s[0],s[1])?s=[]:o>2&&r(s[0],s[1],s[2])&&(s=[s[0]]),t(a,e(s,1),[])});return Ru=i,Ru}var Mk=Tk();const Ak=gi(Mk);var Eu,Pg;function kk(){if(Pg)return Eu;Pg=1;function e(t){for(var n=-1,r=t==null?0:t.length,i={};++n<r;){var a=t[n];i[a[0]]=a[1]}return i}return Eu=e,Eu}var Ck=kk();const Fg=gi(Ck);var Du,$g;function Rk(){if($g)return Du;$g=1;var e=Math.ceil,t=Math.max;function n(r,i,a,s){for(var o=-1,l=t(e((i-r)/(a||1)),0),u=Array(l);l--;)u[s?l:++o]=r,r+=a;return u}return Du=n,Du}var Ou,Lg;function Ek(){if(Lg)return Ou;Lg=1;var e=Rk(),t=Cf(),n=gy();function r(i){return function(a,s,o){return o&&typeof o!="number"&&t(a,s,o)&&(s=o=void 0),a=n(a),s===void 0?(s=a,a=0):s=n(s),o=o===void 0?a<s?1:-1:n(o),e(a,s,o,i)}}return Ou=r,Ou}var Pu,Ng;function Dk(){if(Ng)return Pu;Ng=1;var e=Ek(),t=e();return Pu=t,Pu}var Ok=Dk();const Pk=gi(Ok);var Fu,qg;function Fk(){if(qg)return Fu;qg=1;var e=us(),t=Dy(),n=Oy(),r=dn();function i(a,s){var o=r(a)?e:n;return o(a,t(s,3))}return Fu=i,Fu}var $u,Ig;function $k(){if(Ig)return $u;Ig=1;var e=xy(),t=Fk();function n(r,i){return e(t(r,i),1)}return $u=n,$u}var Lk=$k();const Nk=gi(Lk);var Lu,zg;function Py(){if(zg)return Lu;zg=1;function e(t,n,r){return t===t&&(r!==void 0&&(t=t<=r?t:r),n!==void 0&&(t=t>=n?t:n)),t}return Lu=e,Lu}var Nu,Bg;function qk(){if(Bg)return Nu;Bg=1;function e(t,n){var r=-1,i=t.length;for(n||(n=Array(i));++r<i;)n[r]=t[r];return n}return Nu=e,Nu}var qu,Ug;function Ik(){if(Ug)return qu;Ug=1;var e=Math.floor,t=Math.random;function n(r,i){return r+e(t()*(i-r+1))}return qu=n,qu}var Iu,Hg;function Fy(){if(Hg)return Iu;Hg=1;var e=Ik();function t(n,r){var i=-1,a=n.length,s=a-1;for(r=r===void 0?a:r;++i<r;){var o=e(i,s),l=n[o];n[o]=n[i],n[i]=l}return n.length=r,n}return Iu=t,Iu}var zu,jg;function zk(){if(jg)return zu;jg=1;var e=Py(),t=qk(),n=Fy();function r(i,a){return n(t(i),e(a,0,i.length))}return zu=r,zu}var Bu,Gg;function Bk(){if(Gg)return Bu;Gg=1;var e=us();function t(n,r){return e(r,function(i){return n[i]})}return Bu=t,Bu}var Uu,Yg;function Uk(){if(Yg)return Uu;Yg=1;var e=Bk(),t=ms();function n(r){return r==null?[]:e(r,t(r))}return Uu=n,Uu}var Hu,Wg;function Hk(){if(Wg)return Hu;Wg=1;var e=Py(),t=Fy(),n=Uk();function r(i,a){var s=n(i);return t(s,e(a,0,s.length))}return Hu=r,Hu}var ju,Xg;function jk(){if(Xg)return ju;Xg=1;var e=zk(),t=Hk(),n=dn(),r=Cf(),i=my();function a(s,o,l){(l?r(s,o,l):o===void 0)?o=1:o=i(o);var u=n(s)?e:t;return u(s,o)}return ju=a,ju}var Gk=jk();const Yk=gi(Gk),Wk=e=>UM(e,14),Kg=e=>Object.values(e).reduce((t,n)=>t+n,0),Xk=(e,t,n={})=>{const r=Object.assign({draw:!1},n);if(Object.values(e).length<1)throw new Error("vote distribution must contain at least one party");if(!Object.values(e).every(g=>typeof g=="number"&&g>=0))throw new Error("party vote counts must be non-negative integers");if(!Number.isInteger(t)||t<=0)throw new Error("seats must be a positive integer");if(typeof r.draw!="boolean")throw new Error("opt.draw must be a boolean");const i=Kg(e),a=Fg(Object.entries(e).map(([g,d])=>{const m=Math.max(t-Object.keys(e).length,0),x=Math.round(m*d/i);return[g,x]})),s=Fg(Object.entries(e).map(([g,d])=>{const m=t+Object.keys(e).length,x=Math.min(Math.round(m*d/i),t);return[g,x]})),o=Nk(Object.entries(e).map(([g,d])=>{const m=a[g],x=s[g];return Pk(m,x).map(y=>{const v=Wk(d/(y+.5));return{party:g,quotient:v}})})),l=Kg(a),u=t-l,c=Ak(o,({quotient:g})=>-g),f=c[u-1].quotient,h=c.filter(({quotient:g})=>g>f),p=c.filter(({quotient:g})=>g===f);if(h.length+p.length===u)h.push(...p);else{if(!r.draw)throw new Error("result is ambiguous, a draw would need to be made, but opt.draw is disabled");h.push(...Yk(p,u-h.length))}return h.reduce((g,{party:d})=>(g[d]+=1,g),a)},Ja=e=>Math.round(e*1e10)/1e10,Kk=e=>e.reduce((t,n)=>t+n.seats,0),Vk=e=>e.flat(),Zk=(e,t,n)=>{const r=(Math.PI-n)/2,i=t/e+r-Math.PI;return{x:Ja(e*Math.cos(i)),y:Ja(e*Math.sin(i))}},$y=(e,t,n,r)=>{const i=r*t*n/(e-t),a=1+r*(t-1)*t/2/(e-t);return i/a},Ti=(e,t,n,r)=>{const i=r/Math.PI*.7142857142857143;return Math.abs($y(e,t,n,r)*t/n-i)},Qk=(e,t,n)=>{let r=Math.floor(Math.log(e)/Math.log(2))||1,i=Ti(e,r,t,n),a=0;for(Ti(e,r+1,t,n)<i&&(a=1),Ti(e,r-1,t,n)<i&&r>1&&(a=-1);Ti(e,r+a,t,n)<i&&r>0;)i=Ti(e,r+a,t,n),r+=a;return r},Jk=(e,t)=>{var i,a;let n,r;for(let s=0;s<e.length;s++)r=Ja((t[s]||0)/(((i=e[s])==null?void 0:i.length)??1)),(!n||r<n)&&(n=r);for(let s=0;s<e.length;s++)if(r=Ja((t[s]||0)/(((a=e[s])==null?void 0:a.length)??1)),r===n)return s;return 0},t2=(e,t,n)=>{const r=Kk(e),i=Qk(r,t,n),a=$y(r,i,t,n);let s={};for(let h=1;h<=i;h++)s[h]=t-(h-1)*a;s=Xk(s,r);const o=[];let l,u,c;for(let h=1;h<=i;h++){const p=[];l=t-(h-1)*a,u=n*l/((s[h]??1)-1||1);for(let g=0;g<=(s[h]??1)-1;g++)c={...Zk(l,g*u,n),r:.4*a},p.push(c);o.push(p)}const f=Array(o.length).fill(0);for(const h of e)for(let p=0;p<h.seats;p++){const g=Jk(o,f),d=o[g],m=f[g]??0,x=d==null?void 0:d[m];x&&(x.fill=h.colour,x.party=String(h.id)),f[g]=m+1}return Vk(o)},e2=e=>t=>e("circle",{cx:t.x,cy:t.y,r:t.r,fill:t.fill,class:t.party}),n2={seatCount:!1,arcAngle:180,hFunction:aa},r2=(e,t={})=>{var m;const{seatCount:n,arcAngle:r,hFunction:i}=Object.assign({},n2,t);if(typeof n!="boolean")throw new Error("`seatCount` option must be a boolean");if(typeof i!="function")throw new Error("`hFunction` option must be a function");if(typeof r!="number"||r<=0||r>360)throw new Error("`arcAngle` option must be a number between 0 and 360");const a=r*Math.PI/180,s=20,o=t2(e,s,a),l=(((m=o[0])==null?void 0:m.r)??0)/.4||0,u=o.map(e2(i));n&&u.push(i("text",{x:0,y:0,"text-anchor":"middle",style:{"font-family":"Helvetica","font-size":.25*s+"px"},class:"seatNumber"},String(u.length)));const c=r<=180?s+l:s*(1+Math.sin((a-Math.PI)/2))+l,f=s+l,h=Math.max(c,f),p=r<=180?-s-l/2:-s*(1+Math.sin((a-Math.PI)/2))-l/2,g=i("defs",[ry(i),iy(i),ay(i)]);return i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:[-s-l/2,p,2*s+l,h].join(",")},[g,...u])},i2={seatCount:!1,arcAngle:200,arcAngleFlexibility:5,radius:380,seatSize:4.5,minSeatSize:1.8,maxSeatSize:3,spacing:1.8,innerRadiusRatio:.6,showLabels:!0,hFunction:aa},a2=(e,t={})=>{const n={...i2,...t},{arcAngle:r,arcAngleFlexibility:i,radius:a,seatSize:s,minSeatSize:o,maxSeatSize:l,spacing:u,innerRadiusRatio:c,showLabels:f,hFunction:h}=n,p=a*c,g=e.reduce((Z,R)=>Z+R.seats,0);let d={seatSize:s,arcAngle:r,score:-1};const m=r-i,x=r+i;for(let Z=m;Z<=x;Z+=2.5){const R=Z*Math.PI/180;for(let z=l;z>=o;z-=.1){const D=z*2,T=D*u,X=Math.floor((a-p)/T);for(let Q=1;Q<=Math.min(X,10);Q++){let W=0;for(let ut=0;ut<Q;ut++){const H=p+(ut+.5)*T,ot=D*u/H,gt=Math.floor(R/ot);W+=gt}if(W>=g){const ut=g/W,H=(z-o)/(l-o),ot=(W-g)/g,gt=ot<.15?1:ot<.3?.7:ot<.5?.4:.1,yt=1-Math.abs(Z-r)/i,vt=gt*.5+H*.3+ut*.15+yt*.05;vt>d.score&&(d={seatSize:z,arcAngle:Z,rings:Q,score:vt})}}}}const y=d.seatSize,v=d.arcAngle,_=v*Math.PI/180,S=y*2,w=S*u,b=Math.floor((a-p)/w),M=[],A=-_/2-Math.PI/2,k=[];let C=0,O=[];for(let Z=1;Z<=b;Z++){let R=0;const z=[];for(let D=0;D<Z;D++){const T=p+(D+.5)*w,X=S*u/T,Q=Math.floor(_/X);z.push(Q),R+=Q}if(R>=g){C=Z,O=z;break}}if(C>0)k.push(...O);else for(let Z=0;Z<b;Z++){const R=p+(Z+.5)*w,z=S*u/R,D=Math.floor(_/z);k.push(D)}for(let Z=0;Z<k.length;Z++){const R=p+(Z+.5)*w,z=k[Z]??0;if(z>0){const D=_/z;for(let T=0;T<z;T++){const X=A+(T+.5)*D,Q=Math.cos(X)*R,W=Math.sin(X)*R;M.push({ring:Z,index:T,angle:X,x:Q,y:W})}}}M.sort((Z,R)=>{const z=Z.angle-R.angle;return Math.abs(z)>.001?z:Z.ring-R.ring});const P=[];let F=0;e.forEach(Z=>{const R=[],z=Math.min(Z.seats,M.length-F);let D=1/0,T=-1/0;for(let Q=0;Q<z&&F<M.length;Q++){const W=M[F++];W&&(D=Math.min(D,W.angle),T=Math.max(T,W.angle),Math.sqrt(W.x*W.x+W.y*W.y),R.push(h("circle",{fill:Z.colour,stroke:Z.colour,className:"circle seat-visual seat-hover-zone",transform:`translate(${W.x}, ${W.y})`,r:y,"data-party":Z.name,"data-party-id":String(Z.id),style:"pointer-events: all; cursor: pointer;"})))}const X=R;P.push(h("g",{className:"party-group","data-party":Z.name,style:"opacity: 1; outline: none;"},X))});const B=h("g",{className:"arc-bg"},[h("circle",{className:"outer",cx:0,cy:0,fill:"#ffffff",r:a}),h("circle",{className:"inner",cx:0,cy:0,fill:"#ffffff",r:p})]),L=h("g",{className:"points-container"},P),$=f?h("g",{className:"label-container",mask:"url(#label-clip)",style:"pointer-events: none;"},[h("text",{className:"party_count",dy:"-0.05em",style:"font-size: 24vw; font-weight: bold; text-anchor: middle; display: none; opacity: 0; fill: rgb(19, 90, 225); transform: scale(1);"}),h("text",{className:"party_name",y:0,dy:"1em",style:"font-size: 6vw; font-weight: normal; text-anchor: middle; display: none; opacity: 0; fill: rgb(19, 90, 225); transform: scale(1);"})]):null,Y=h("defs",[h("radialGradient",{id:"label-gradient"},[h("stop",{offset:"0%",style:"stop-color: rgb(255, 255, 255); stop-opacity: 1;"}),h("stop",{offset:"80%",style:"stop-color: rgb(255, 255, 255); stop-opacity: 1;"}),h("stop",{offset:"90%",style:"stop-color: rgb(255, 255, 255); stop-opacity: 0.1;"}),h("stop",{offset:"100%",style:"stop-color: rgb(255, 255, 255); stop-opacity: 0;"})]),h("mask",{id:"label-clip"},[h("circle",{fill:"url(#label-gradient)",r:p})]),ry(h),iy(h),ay(h)]),K=h("g",{className:"arc-container",transform:`translate(${a}, ${a})`},[B,L,$].filter(Boolean)),J=_/2;let st;if(v<=180)st=a*Math.sin(J)+y;else{const Z=J-Math.PI/2;st=a*(1+Math.sin(Z))+y}const lt=a+y,N=a*2,j=Math.max(st,lt);return h("svg",{id:"chart-container","font-family":"Canva Sans Variable",viewBox:`0 0 ${N} ${j}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg"},[K,Y])};function Ly(e){return!e||!e.color?"#cccccc":e.color==="url(#hatchPattern)"?Jr.COMPLETED:e.color==="url(#greyHatchPattern)"?Dt.greyHatch.lines:e.color}function Rc(e,t){if(!e)return;const n=e.querySelectorAll(".party-group");n&&n.length>0&&n.forEach(r=>{if(!r)return;const i=r,a=i.getAttribute("data-party");t?a===t?i.style.opacity=Pe.animation.hoverOpacity.active:i.style.opacity=Pe.animation.hoverOpacity.dimmed:i.style.opacity="1"})}function Ec(e,t){e.forEach(n=>{const r=n,i=n.getAttribute("class")||"";t?i===t?(r.setAttribute("fill-opacity","1"),r.setAttribute("stroke-opacity","1")):(r.setAttribute("fill-opacity",Pe.animation.hoverOpacity.dimmed),r.setAttribute("stroke-opacity","0.2")):(r.setAttribute("fill-opacity","1"),r.setAttribute("stroke-opacity","1"))})}const s2=({containerRef:e,processedData:t,totalRepositories:n,arcAngle:r,useEnhanced:i,maxSeats:a,setHoveredData:s,activePartyName:o,setActivePartyName:l,chartConfig:u,seatSize:c,shouldAnimate:f=!1,animationDirection:h="left-to-right",onAnimationComplete:p})=>{G.useEffect(()=>{if(!e.current||t.length===0)return;for(;e.current.firstChild;)e.current.removeChild(e.current.firstChild);const g=n<=a?1:a/n,d=t.filter(w=>w.value>0).map(w=>{const b=n<=a?w.value:Math.max(1,Math.floor(w.value*g));return{id:String(w.id),name:w.label,seats:b,colour:w.color==="url(#hatchPattern)"?Jr.COMPLETED:w.color}}),m=i?a2(d,{arcAngle:r,arcAngleFlexibility:u.arcAngleFlexibility,radius:u.radius,seatSize:c,minSeatSize:u.minSeatSize,maxSeatSize:u.maxSeatSize,spacing:u.spacing,innerRadiusRatio:u.innerRadiusRatio,showLabels:!0}):r2(d,{arcAngle:r});m.properties&&(m.properties.width="100%",m.properties.height="100%",m.properties.style="display: block; width: 100%; max-width: 100%; height: auto;",m.properties.preserveAspectRatio="xMidYMid meet");const x=EM(m),_=new DOMParser().parseFromString(x,"image/svg+xml").documentElement;if(!_)return;_.setAttribute("width","100%"),_.setAttribute("height","100%"),_.style.width="100%",_.style.height="auto",_.style.display="block",i?o2(_,d,t,s,o,l):l2(_,d,t,s,o,l);const S=()=>{if(s(null),l(null),i)Rc(_,null);else{const w=_.querySelectorAll("circle");Ec(w,null)}};return _&&_.addEventListener("mouseleave",S),e.current.appendChild(_),f&&_&&PM(_,r,u.radius,h,900,p),()=>{if(_&&_.removeEventListener("mouseleave",S),e.current)for(;e.current.firstChild;)e.current.removeChild(e.current.firstChild)}},[t,n,r,i,a,s,o,l,e,u,c,f,h,p])};function o2(e,t,n,r,i,a){if(!e)return;const s=e.querySelectorAll(".seat-hover-zone"),o=e.querySelectorAll(".party-group circle.seat-visual");o&&o.length>0&&o.forEach(l=>{if(l){const u=l;u.style.stroke=Pe.colors.seatBorder,u.style.strokeWidth="0.5",u.setAttribute("fill-opacity","1"),u.style.transition=`fill-opacity ${Pe.animation.transitionDuration} ease, stroke-opacity ${Pe.animation.transitionDuration} ease`}}),s&&s.length>0&&s.forEach(l=>{if(!l)return;const u=l.getAttribute("data-party"),c=l.getAttribute("data-party-id"),f=()=>{if(u&&u!==i){const h=t.find(p=>p.name===u||String(p.id)===c);if(h){const p=n.find(g=>g.label===h.name||String(g.id)===h.id);if(p){const g=Ly(p);r({label:p.label||"Unknown",value:p.value||0,color:g}),a(h.name),Rc(e,h.name)}}}};l.addEventListener("mouseenter",f)}),i&&Rc(e,i)}function l2(e,t,n,r,i,a){if(!e)return;const s=e.querySelectorAll("circle");if(s&&s.length>0&&(s.forEach(o=>{if(o){const l=o;l.style.cursor="pointer",l.style.stroke=Pe.colors.seatBorder,l.style.strokeWidth="0.5",l.setAttribute("fill-opacity","1"),l.style.transition=`fill-opacity ${Pe.animation.transitionDuration} ease, stroke-opacity ${Pe.animation.transitionDuration} ease`}}),s.forEach(o=>{if(!o)return;const l=o.getAttribute("class")||"",u=parseInt(l,10),c=t[u],f=()=>{if(c){const h=c.name;if(h&&h!==i){const p=n.find(g=>g.label===c.name||String(g.id)===c.id);if(p){const g=Ly(p);r({label:p.label||"Unknown",value:p.value||0,color:g}),a(h),Ec(s,l)}}}};o.addEventListener("mouseenter",f)})),i){const o=t.find(l=>l.name===i);if(o){const l=t.indexOf(o);Ec(s,String(l))}}}const Gu=Li,Vg={[zi]:Jr.NOT_APPLICABLE,[Bi]:Jr.NO_LST,[Ui]:Jr.DATA_MISSING},Mi=(e,t,n)=>{if(e in Vg)return Vg[e];const r=n-1-t,i=Gu.length,a=Math.floor(r/Math.max(1,n-1)*(i-1)),s=Math.min(Math.max(0,a),i-1);return Gu[s]??Gu[0]??"#000000"},Ny=({dataSeries:e,notApplicableRepositories:t,noLstRepositories:n,unavailableRepositories:r})=>{const{special:i,regular:a}=e.reduce((p,g,d)=>([zi,Bi,Ui].includes(g.label)?p.special.push({...g,originalIndex:d}):p.regular.push({...g,originalIndex:d}),p),{special:[],regular:[]}),s=a.reverse().map((p,g)=>({id:`measure-${g}`,label:p.label,value:p.value,color:Mi(p.label,a.length-1-g,a.length)})),o=i.map((p,g)=>({id:p.label.toLowerCase().replace(" ","-"),label:p.label,value:p.value,color:Mi(p.label,g,i.length)})),l=r,u={id:"no-lst",label:Bi,value:n,color:Mi(Bi,0,1)},c={id:"data-missing",label:Ui,value:l,color:Mi(Ui,0,1)},f={id:"n/a",label:zi,value:t,color:Mi(zi,0,1)},h=[];return f.value>0&&h.push(f),u.value>0&&h.push(u),c.value>0&&h.push(c),h.push(...o),h.push(...s),h},Zg={"N/A":"Repos that aren't applicable to this migration.","No LST":"There are no LSTs for these repos.","Data Missing":"There is data missing in the LSTs."},u2=({dataSeries:e,totalRepositories:t,notApplicableRepositories:n,noLstRepositories:r,unavailableRepositories:i,arcAngle:a,useEnhanced:s=Pe.useEnhanced,showTable:o=!0,shouldAnimate:l=!1,animationDirection:u="left-to-right",onAnimationComplete:c})=>{const f=G.useRef(null),[h,p]=G.useState(null),[g,d]=G.useState(null),x=Ny({dataSeries:e,notApplicableRepositories:n,noLstRepositories:r,unavailableRepositories:i}).map(b=>{const M=typeof b.color=="function"?b.color("arc"):b.color,A=typeof b.label=="function"?b.label("arc"):b.label;return{...b,color:M,label:A}}),y=a??df({repositoryCount:t}),v=gf({repositoryCount:t});s2({containerRef:f,processedData:x,totalRepositories:t,arcAngle:y,useEnhanced:s,maxSeats:Pe.maxSeats,setHoveredData:p,activePartyName:g,setActivePartyName:d,chartConfig:Pe.chartConfig,seatSize:v,shouldAnimate:l,animationDirection:u,onAnimationComplete:c});const _=x.map(b=>{const M=b.value/t*100,A=M>0&&M<1?"< 1":M.toFixed(0);return{id:String(b.id),label:b.label,value:b.value,percentage:A,color:b.color}}),S=t>Pe.maxSeats,w=S?Math.round(t/Pe.maxSeats):1;return E.jsxs(q.Stack,{sx:{width:"100%",alignItems:"center",gap:{xs:.5,sm:.75,md:1,lg:1},py:0,"@media (min-width: 1024px) and (max-width: 1225px)":{gap:.25}},children:[E.jsxs(q.Box,{className:"parliament-chart-container",sx:{position:"relative",width:"100%",minHeight:"200px",mb:{xs:.5,sm:.75,md:1},"@media (min-width: 1024px) and (max-width: 1225px)":{maxHeight:"250px",mb:.25}},children:[E.jsx(q.Box,{className:"parliament-chart-svg-container",ref:f,sx:{width:"100%",height:"100%",position:"relative",display:"flex",justifyContent:"center",alignItems:"center","& svg":{width:"100%",height:"100%",maxWidth:"100%","@media (min-width: 1024px) and (max-width: 1225px)":{maxHeight:"230px"}}}}),E.jsxs(q.Box,{className:"parliament-chart-tooltip",sx:{position:"absolute",bottom:"0%",left:"50%",transform:"translate(-50%, 0%)",pointerEvents:"none",textAlign:"center",zIndex:10,"@media (min-width: 1024px) and (max-width: 1225px)":{bottom:"5%"}},children:[h&&E.jsxs(G.Fragment,{children:[E.jsx(q.Typography,{sx:{color:"text.secondary",mb:.3,fontSize:"clamp(0.75rem, 1.5vw, 0.85rem)",display:"block","@media (min-width: 1024px) and (max-width: 1225px)":{fontSize:"0.7rem",mb:.2}},children:h.label}),E.jsxs(q.Typography,{sx:{fontWeight:"bold",color:h.color,lineHeight:1,fontSize:"clamp(1.1rem, 2.2vw, 1.3rem)","@media (min-width: 1024px) and (max-width: 1225px)":{fontSize:"1rem"}},children:[h.value," ",h.value>1?"repos":"repo"]})]}),S&&E.jsxs(q.Box,{className:"parliament-chart-scaled-indicator",sx:{display:"flex",alignItems:"center",justifyContent:"center",gap:.5,mt:h?.5:0,color:"text.secondary",fontSize:"clamp(0.65rem, 1.2vw, 0.72rem)"},children:[E.jsx(q.Box,{className:"parliament-chart-scaled-indicator-dot",sx:{width:8,height:8,borderRadius:"50%",backgroundColor:"#888888",flexShrink:0}}),E.jsxs(q.Typography,{variant:"caption",sx:{fontSize:"inherit",fontStyle:"italic"},children:["= ~",w," repos"]})]})]})]}),o&&E.jsx(q.Box,{className:"parliament-chart-data-table",sx:{width:"100%",display:"flex",justifyContent:"center","@media (min-width: 1024px) and (max-width: 1225px)":{overflowX:"auto",maxWidth:"100%"}},onMouseLeave:()=>{p(null),d(null)},children:E.jsxs(q.Table,{"aria-label":"Repository categories summary",className:"parliament-chart-table",size:"small",sx:{maxWidth:{xs:"clamp(360px, 90%, 400px)",sm:"clamp(360px, 90%, 400px)",md:"clamp(360px, 85%, 420px)",lg:"clamp(360px, 90%, 400px)"},"@media (min-width: 1024px) and (max-width: 1225px)":{maxWidth:"360px","& .MuiTableCell-root":{padding:"1px 4px",fontSize:"9.5px"}},"& .MuiTableCell-root":{paddingTop:"1px",paddingBottom:"1px",paddingLeft:0,paddingRight:"4px",borderBottom:"none",fontSize:"clamp(10px, 1.8vw, 12px)"},"& tbody .MuiTableRow-root:first-of-type .MuiTableCell-root":{paddingTop:"2px"}},children:[E.jsx("thead",{children:E.jsxs(q.TableRow,{sx:{"& .MuiTableCell-root":{borderBottom:"1px solid",borderColor:"grey.300",pb:"2px"}},children:[E.jsx(q.TableCell,{colSpan:2,sx:{fontWeight:500},children:"Category"}),E.jsx(q.TableCell,{align:"right",sx:{fontWeight:500},children:"# of repositories"}),E.jsx(q.TableCell,{align:"right",sx:{fontWeight:500},children:"Percentage"})]})}),E.jsx("tbody",{children:_.map(b=>{const M=b.color==="url(#greyHatchPattern)"?Dt.greyHatch.lines:b.color==="url(#dataMissingHatchPattern)"?Dt.dataMissingHatch.lines:b.color==="url(#noLstHatchPattern)"?Dt.noLstHatch.lines:b.color;return E.jsxs(q.TableRow,{onMouseEnter:()=>{d(b.label),p({label:b.label,value:b.value,color:b.color==="url(#greyHatchPattern)"?Dt.greyHatch.lines:b.color==="url(#dataMissingHatchPattern)"?Dt.dataMissingHatch.lines:b.color==="url(#noLstHatchPattern)"?Dt.noLstHatch.lines:b.color})},sx:{cursor:"pointer",transition:"background-color 0.15s ease",backgroundColor:g===b.label?`${M}15`:"transparent","&:hover":{backgroundColor:`${M}15`}},children:[E.jsx(q.TableCell,{align:"center",sx:{width:20},children:E.jsx(q.Box,{sx:{width:12,height:12,backgroundColor:b.color==="url(#greyHatchPattern)"?Dt.greyHatch.background:b.color==="url(#dataMissingHatchPattern)"?Dt.dataMissingHatch.background:b.color==="url(#noLstHatchPattern)"?Dt.noLstHatch.background:b.color,borderRadius:"50%",position:"relative",overflow:"hidden",transition:"transform 0.15s ease",transform:g===b.label?"scale(1.2)":"scale(1)",...b.label==="N/A"&&{"&::after":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`repeating-linear-gradient(
48
48
  0deg,
49
49
  transparent,
50
50
  transparent 3px,