// Code generated by esbuild. DO NOT EDIT. "use strict";(()=>{function bt(t,e){return t==null||e==null?NaN:te?1:t>=e?0:NaN}function xe(t,e){return t==null||e==null?NaN:et?1:e>=t?0:NaN}function qe(t){let e,n,r;t.length!==2?(e=bt,n=(f,u)=>bt(t(f),u),r=(f,u)=>t(f)-u):(e=t===bt||t===xe?t:qy,n=t,r=t);function o(f,u,c=0,s=f.length){if(c>>1;n(f[d],u)<0?c=d+1:s=d}while(c>>1;n(f[d],u)<=0?c=d+1:s=d}while(cc&&r(f[d-1],u)>-r(f[d],u)?d-1:d}return{left:o,center:a,right:i}}function qy(){return 0}function Ho(t){return t===null?NaN:+t}function*Fp(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}var qp=qe(bt),zp=qp.right,zy=qp.left,Yy=qe(Ho).center,un=zp;function Jn(t,e){let n=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let o of t)(o=e(o,++r,t))!=null&&(o=+o)>=o&&++n}return n}function By(t){return t.length|0}function Uy(t){return!(t>0)}function Xy(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function Hy(t){return e=>t(...e)}function Fa(...t){let e=typeof t[t.length-1]=="function"&&Hy(t.pop());t=t.map(Xy);let n=t.map(By),r=t.length-1,o=new Array(r+1).fill(0),i=[];if(r<0||n.some(Uy))return i;for(;;){i.push(o.map((f,u)=>t[u][f]));let a=r;for(;++o[a]===n[a];){if(a===0)return e?i.map(e):i;o[a--]=0}}}function qa(t,e){var n=0,r=0;return Float64Array.from(t,e===void 0?o=>n+=+o||0:o=>n+=+e(o,r++,t)||0)}function Rr(t,e){let n=0,r,o=0,i=0;if(e===void 0)for(let a of t)a!=null&&(a=+a)>=a&&(r=a-o,o+=r/++n,i+=r*(a-o));else{let a=-1;for(let f of t)(f=e(f,++a,t))!=null&&(f=+f)>=f&&(r=f-o,o+=r/++n,i+=r*(f-o))}if(n>1)return i/(n-1)}function Lr(t,e){let n=Rr(t,e);return n&&Math.sqrt(n)}function Ct(t,e){let n,r;if(e===void 0)for(let o of t)o!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r=i&&(n=r=i):(n>i&&(n=i),r0){for(a=e[--n];n>0&&(r=a,o=e[--n],a=r+o,i=o-(a-r),!i););n>0&&(i<0&&e[n-1]<0||i>0&&e[n-1]>0)&&(o=i*2,r=a+o,o==r-a&&(a=r))}return a}};var Qt=class extends Map{constructor(e,n=Up){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(let[r,o]of e)this.set(r,o)}get(e){return super.get(us(this,e))}has(e){return super.has(us(this,e))}set(e,n){return super.set(Yp(this,e),n)}delete(e){return super.delete(Bp(this,e))}},Ce=class extends Set{constructor(e,n=Up){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(let r of e)this.add(r)}has(e){return super.has(us(this,e))}add(e){return super.add(Yp(this,e))}delete(e){return super.delete(Bp(this,e))}};function us({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):n}function Yp({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function Bp({_intern:t,_key:e},n){let r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function Up(t){return t!==null&&typeof t=="object"?t.valueOf():t}function Wo(t){return t}function cn(t,...e){return ss(t,Wo,Wo,e)}function Ae(t,e,...n){return ss(t,Wo,e,n)}function cs(t,e,...n){return ss(t,Array.from,e,n)}function ss(t,e,n,r){return function o(i,a){if(a>=r.length)return n(i);let f=new Qt,u=r[a++],c=-1;for(let s of i){let d=u(s,++c,i),l=f.get(d);l?l.push(s):f.set(d,[s])}for(let[s,d]of f)f.set(s,o(d,a));return e(f)}(t,0)}function ls(t,e){return Array.from(e,n=>t[n])}function ze(t,...e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&n.length!==2||e.length>1){let r=Uint32Array.from(t,(o,i)=>i);return e.length>1?(e=e.map(o=>t.map(o)),r.sort((o,i)=>{for(let a of e){let f=Go(a[o],a[i]);if(f)return f}})):(n=t.map(n),r.sort((o,i)=>Go(n[o],n[i]))),ls(t,r)}return t.sort(ds(n))}function ds(t=bt){if(t===bt)return Go;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{let r=t(e,n);return r||r===0?r:(t(n,n)===0)-(t(e,e)===0)}}function Go(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(te?1:0)}function Pr(t,e,n){return(e.length!==2?ze(Ae(t,e,n),([r,o],[i,a])=>bt(o,a)||bt(r,i)):ze(cn(t,n),([r,o],[i,a])=>e(o,a)||bt(r,i))).map(([r])=>r)}var Wy=Math.sqrt(50),Gy=Math.sqrt(10),Vy=Math.sqrt(2);function za(t,e,n){let r=(e-t)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=Wy?10:i>=Gy?5:i>=Vy?2:1,f,u,c;return o<0?(c=Math.pow(10,-o)/a,f=Math.round(t*c),u=Math.round(e*c),f/ce&&--u,c=-c):(c=Math.pow(10,o)*a,f=Math.round(t/c),u=Math.round(e/c),f*ce&&--u),u0))return[];if(t===e)return[t];let r=e=o))return[];let f=i-o+1,u=new Array(f);if(r)if(a<0)for(let c=0;c=r)&&(n=r);else{let r=-1;for(let o of t)(o=e(o,++r,t))!=null&&(n=o)&&(n=o)}return n}function Ba(t,e){let n,r=-1,o=-1;if(e===void 0)for(let i of t)++o,i!=null&&(n=i)&&(n=i,r=o);else for(let i of t)(i=e(i,++o,t))!=null&&(n=i)&&(n=i,r=o);return r}function Jt(t,e){let n;if(e===void 0)for(let r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let o of t)(o=e(o,++r,t))!=null&&(n>o||n===void 0&&o>=o)&&(n=o)}return n}function Ua(t,e){let n,r=-1,o=-1;if(e===void 0)for(let i of t)++o,i!=null&&(n>i||n===void 0&&i>=i)&&(n=i,r=o);else for(let i of t)(i=e(i,++o,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i,r=o);return r}function Xa(t,e,n=0,r=1/0,o){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(o=o===void 0?Go:ds(o);r>n;){if(r-n>600){let u=r-n+1,c=e-n+1,s=Math.log(u),d=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*d*(u-d)/u)*(c-u/2<0?-1:1),p=Math.max(n,Math.floor(e-c*d/u+l)),m=Math.min(r,Math.floor(e+(u-c)*d/u+l));Xa(t,e,p,m,o)}let i=t[e],a=n,f=r;for(Vo(t,n,e),o(t[r],i)>0&&Vo(t,n,r);a0;)--f}o(t[n],i)===0?Vo(t,n,f):(++f,Vo(t,f,r)),f<=e&&(n=f+1),e<=f&&(r=f-1)}return t}function Vo(t,e,n){let r=t[e];t[e]=t[n],t[n]=r}function jo(t,e=bt){let n,r=!1;if(e.length===1){let o;for(let i of t){let a=e(i);(r?bt(a,o)>0:bt(a,a)===0)&&(n=i,o=a,r=!0)}}else for(let o of t)(r?e(o,n)>0:e(o,o)===0)&&(n=o,r=!0);return n}function ye(t,e,n){if(t=Float64Array.from(Fp(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return Jt(t);if(e>=1)return Ht(t);var r,o=(r-1)*e,i=Math.floor(o),a=Ht(Xa(t,i).subarray(0,i+1)),f=Jt(t.subarray(i+1));return a+(f-a)*(o-i)}}function ps(t,e,n=Ho){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,o=(r-1)*e,i=Math.floor(o),a=+n(t[i],i,t),f=+n(t[i+1],i+1,t);return a+(f-a)*(o-i)}}function Ha(t,e,n){let r=Jn(t),o=ye(t,.75)-ye(t,.25);return r&&o?Math.ceil((n-e)/(2*o*Math.pow(r,-1/3))):1}function Zo(t,e,n){let r=Jn(t),o=Lr(t);return r&&o?Math.ceil((n-e)*Math.cbrt(r)/(3.49*o)):1}function Wa(t,e){let n=0,r=0;if(e===void 0)for(let o of t)o!=null&&(o=+o)>=o&&(++n,r+=o);else{let o=-1;for(let i of t)(i=e(i,++o,t))!=null&&(i=+i)>=i&&(++n,r+=i)}if(n)return r/n}function sn(t,e){return ye(t,.5,e)}function*Zy(t){for(let e of t)yield*e}function Fr(t){return Array.from(Zy(t))}function Ga(t,e){let n=new Qt;if(e===void 0)for(let i of t)i!=null&&i>=i&&n.set(i,(n.get(i)||0)+1);else{let i=-1;for(let a of t)(a=e(a,++i,t))!=null&&a>=a&&n.set(a,(n.get(a)||0)+1)}let r,o=0;for(let[i,a]of n)a>o&&(o=a,r=i);return r}function Va(t,e=Ky){let n=[],r,o=!1;for(let i of t)o&&n.push(e(r,i)),r=i,o=!0;return n}function Ky(t,e){return[t,e]}function er(t,e,n){t=+t,e=+e,n=(o=arguments.length)<2?(e=t,t=0,1):o<3?1:+n;for(var r=-1,o=Math.max(0,Math.ceil((e-t)/n))|0,i=new Array(o);++r+t(e)}function eb(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function nb(){return!this.__axis}function rb(t,e){var n=[],r=null,o=null,i=6,a=6,f=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=t===ms||t===Za?-1:1,s=t===Za||t===hs?"x":"y",d=t===ms||t===gs?Qy:Jy;function l(p){var m=r??(e.ticks?e.ticks.apply(e,n):e.domain()),h=o??(e.tickFormat?e.tickFormat.apply(e,n):Xp),g=Math.max(i,0)+f,b=e.range(),x=+b[0]+u,M=+b[b.length-1]+u,y=(e.bandwidth?eb:tb)(e.copy(),u),w=p.selection?p.selection():p,v=w.selectAll(".domain").data([null]),T=w.selectAll(".tick").data(m,e).order(),E=T.exit(),I=T.enter().append("g").attr("class","tick"),F=T.select("line"),_=T.select("text");v=v.merge(v.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),T=T.merge(I),F=F.merge(I.append("line").attr("stroke","currentColor").attr(s+"2",c*i)),_=_.merge(I.append("text").attr("fill","currentColor").attr(s,c*g).attr("dy",t===ms?"0em":t===gs?"0.71em":"0.32em")),p!==w&&(v=v.transition(p),T=T.transition(p),F=F.transition(p),_=_.transition(p),E=E.transition(p).attr("opacity",Hp).attr("transform",function(R){return isFinite(R=y(R))?d(R+u):this.getAttribute("transform")}),I.attr("opacity",Hp).attr("transform",function(R){var O=this.parentNode.__axis;return d((O&&isFinite(O=O(R))?O:y(R))+u)})),E.remove(),v.attr("d",t===Za||t===hs?a?"M"+c*a+","+x+"H"+u+"V"+M+"H"+c*a:"M"+u+","+x+"V"+M:a?"M"+x+","+c*a+"V"+u+"H"+M+"V"+c*a:"M"+x+","+u+"H"+M),T.attr("opacity",1).attr("transform",function(R){return d(y(R)+u)}),F.attr(s+"2",c*i),_.attr(s,c*g).text(h),w.filter(nb).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===hs?"start":t===Za?"end":"middle"),w.each(function(){this.__axis=y})}return l.scale=function(p){return arguments.length?(e=p,l):e},l.ticks=function(){return n=Array.from(arguments),l},l.tickArguments=function(p){return arguments.length?(n=p==null?[]:Array.from(p),l):n.slice()},l.tickValues=function(p){return arguments.length?(r=p==null?null:Array.from(p),l):r&&r.slice()},l.tickFormat=function(p){return arguments.length?(o=p,l):o},l.tickSize=function(p){return arguments.length?(i=a=+p,l):i},l.tickSizeInner=function(p){return arguments.length?(i=+p,l):i},l.tickSizeOuter=function(p){return arguments.length?(a=+p,l):a},l.tickPadding=function(p){return arguments.length?(f=+p,l):f},l.offset=function(p){return arguments.length?(u=+p,l):u},l}function xs(t){return rb(gs,t)}var ob={value:()=>{}};function Gp(){for(var t=0,e=arguments.length,n={},r;t=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Ka.prototype=Gp.prototype={constructor:Ka,on:function(t,e){var n=this._,r=ib(t+"",n),o,i=-1,a=r.length;if(arguments.length<2){for(;++i0)for(var n=new Array(o),r=0,o,i;r=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Ye.hasOwnProperty(e)?{space:Ye[e],local:t}:t}function fb(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Qa&&e.documentElement.namespaceURI===Qa?e.createElement(t):e.createElementNS(n,t)}}function ub(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function dn(t){var e=ln(t);return(e.local?ub:fb)(e)}function cb(){}function nr(t){return t==null?cb:function(){return this.querySelector(t)}}function Vp(t){typeof t!="function"&&(t=nr(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o=M&&(M=x+1);!(w=g[M])&&++M=0;)(a=r[o])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function am(t){t||(t=Mb);function e(d,l){return d&&l?t(d.__data__,l.__data__):!d-!l}for(var n=this._groups,r=n.length,o=new Array(r),i=0;ie?1:t>=e?0:NaN}function fm(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function um(){return Array.from(this)}function cm(){for(var t=this._groups,e=0,n=t.length;e1?this.each((e==null?Eb:typeof e=="function"?kb:Ib)(t,e,n??"")):$n(this.node(),t)}function $n(t,e){return t.style.getPropertyValue(e)||ef(t).getComputedStyle(t,null).getPropertyValue(e)}function Nb(t){return function(){delete this[t]}}function Db(t,e){return function(){this[t]=e}}function Rb(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function hm(t,e){return arguments.length>1?this.each((e==null?Nb:typeof e=="function"?Rb:Db)(t,e)):this.node()[t]}function gm(t){return t.trim().split(/^|\s+/)}function ws(t){return t.classList||new xm(t)}function xm(t){this._node=t,this._names=gm(t.getAttribute("class")||"")}xm.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function ym(t,e){for(var n=ws(t),r=-1,o=e.length;++r=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function Qb(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,o=e.length,i;n>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?nf(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?nf(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=o2.exec(t))?new Tt(e[1],e[2],e[3],1):(e=i2.exec(t))?new Tt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=a2.exec(t))?nf(e[1],e[2],e[3],e[4]):(e=f2.exec(t))?nf(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=u2.exec(t))?Bm(e[1],e[2]/100,e[3]/100,1):(e=c2.exec(t))?Bm(e[1],e[2]/100,e[3]/100,e[4]):Pm.hasOwnProperty(t)?qm(Pm[t]):t==="transparent"?new Tt(NaN,NaN,NaN,0):null}function qm(t){return new Tt(t>>16&255,t>>8&255,t&255,1)}function nf(t,e,n,r){return r<=0&&(t=e=n=NaN),new Tt(t,e,n,r)}function ei(t){return t instanceof Ue||(t=ue(t)),t?(t=t.rgb(),new Tt(t.r,t.g,t.b,t.opacity)):new Tt}function be(t,e,n,r){return arguments.length===1?ei(t):new Tt(t,e,n,r??1)}function Tt(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}hn(Tt,be,En(Ue,{brighter(t){return t=t==null?ir:Math.pow(ir,t),new Tt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?In:Math.pow(In,t),new Tt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Tt(or(this.r),or(this.g),or(this.b),of(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:zm,formatHex:zm,formatHex8:d2,formatRgb:Ym,toString:Ym}));function zm(){return`#${rr(this.r)}${rr(this.g)}${rr(this.b)}`}function d2(){return`#${rr(this.r)}${rr(this.g)}${rr(this.b)}${rr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ym(){let t=of(this.opacity);return`${t===1?"rgb(":"rgba("}${or(this.r)}, ${or(this.g)}, ${or(this.b)}${t===1?")":`, ${t})`}`}function of(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function or(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function rr(t){return t=or(t),(t<16?"0":"")+t.toString(16)}function Bm(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ee(t,e,n,r)}function Xm(t){if(t instanceof Ee)return new Ee(t.h,t.s,t.l,t.opacity);if(t instanceof Ue||(t=ue(t)),!t)return new Ee;if(t instanceof Ee)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,o=Math.min(e,n,r),i=Math.max(e,n,r),a=NaN,f=i-o,u=(i+o)/2;return f?(e===i?a=(n-r)/f+(n0&&u<1?0:a,new Ee(a,f,u,t.opacity)}function ni(t,e,n,r){return arguments.length===1?Xm(t):new Ee(t,e,n,r??1)}function Ee(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}hn(Ee,ni,En(Ue,{brighter(t){return t=t==null?ir:Math.pow(ir,t),new Ee(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?In:Math.pow(In,t),new Ee(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,o=2*n-r;return new Tt(Ss(t>=240?t-240:t+120,o,r),Ss(t,o,r),Ss(t<120?t+240:t-120,o,r),this.opacity)},clamp(){return new Ee(Um(this.h),rf(this.s),rf(this.l),of(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let t=of(this.opacity);return`${t===1?"hsl(":"hsla("}${Um(this.h)}, ${rf(this.s)*100}%, ${rf(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Um(t){return t=(t||0)%360,t<0?t+360:t}function rf(t){return Math.max(0,Math.min(1,t||0))}function Ss(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}var af=Math.PI/180,ff=180/Math.PI;var uf=18,Hm=.96422,Wm=1,Gm=.82521,Vm=4/29,zr=6/29,jm=3*zr*zr,p2=zr*zr*zr;function Zm(t){if(t instanceof Xe)return new Xe(t.l,t.a,t.b,t.opacity);if(t instanceof gn)return Km(t);t instanceof Tt||(t=ei(t));var e=As(t.r),n=As(t.g),r=As(t.b),o=Ts((.2225045*e+.7168786*n+.0606169*r)/Wm),i,a;return e===n&&n===r?i=a=o:(i=Ts((.4360747*e+.3850649*n+.1430804*r)/Hm),a=Ts((.0139322*e+.0971045*n+.7141733*r)/Gm)),new Xe(116*o-16,500*(i-o),200*(o-a),t.opacity)}function Yr(t,e,n,r){return arguments.length===1?Zm(t):new Xe(t,e,n,r??1)}function Xe(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}hn(Xe,Yr,En(Ue,{brighter(t){return new Xe(this.l+uf*(t??1),this.a,this.b,this.opacity)},darker(t){return new Xe(this.l-uf*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=Hm*_s(e),t=Wm*_s(t),n=Gm*_s(n),new Tt(Cs(3.1338561*e-1.6168667*t-.4906146*n),Cs(-.9787684*e+1.9161415*t+.033454*n),Cs(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function Ts(t){return t>p2?Math.pow(t,1/3):t/jm+Vm}function _s(t){return t>zr?t*t*t:jm*(t-Vm)}function Cs(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function As(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function m2(t){if(t instanceof gn)return new gn(t.h,t.c,t.l,t.opacity);if(t instanceof Xe||(t=Zm(t)),t.a===0&&t.b===0)return new gn(NaN,0=1?(n=1,e-1):Math.floor(n*e),o=t[r],i=t[r+1],a=r>0?t[r-1]:2*o-i,f=r()=>t;function oh(t,e){return function(n){return t+n*e}}function g2(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function Ur(t,e){var n=e-t;return n?oh(t,n>180||n<-180?n-360*Math.round(n/360):n):Br(isNaN(t)?e:t)}function ih(t){return(t=+t)==1?xt:function(e,n){return n-e?g2(e,n,t):Br(isNaN(e)?n:e)}}function xt(t,e){var n=e-t;return n?oh(t,n):Br(isNaN(t)?e:t)}var we=function t(e){var n=ih(e);function r(o,i){var a=n((o=be(o)).r,(i=be(i)).r),f=n(o.g,i.g),u=n(o.b,i.b),c=xt(o.opacity,i.opacity);return function(s){return o.r=a(s),o.g=f(s),o.b=u(s),o.opacity=c(s),o+""}}return r.gamma=t,r}(1);function ah(t){return function(e){var n=e.length,r=new Array(n),o=new Array(n),i=new Array(n),a,f;for(a=0;an&&(i=e.slice(n,i),f[a]?f[a]+=i:f[++a]=i),(r=r[0])===(o=o[0])?f[a]?f[a]+=o:f[++a]=o:(f[++a]=null,u.push({i:a,x:ht(r,o)})),n=Ns.lastIndex;return n180?s+=360:s-c>180&&(c+=360),l.push({i:d.push(o(d)+"rotate(",null,r)-2,x:ht(c,s)})):s&&d.push(o(d)+"rotate("+s+r)}function f(c,s,d,l){c!==s?l.push({i:d.push(o(d)+"skewX(",null,r)-2,x:ht(c,s)}):s&&d.push(o(d)+"skewX("+s+r)}function u(c,s,d,l,p,m){if(c!==d||s!==l){var h=p.push(o(p)+"scale(",null,",",null,")");m.push({i:h-4,x:ht(c,d)},{i:h-2,x:ht(s,l)})}else(d!==1||l!==1)&&p.push(o(p)+"scale("+d+","+l+")")}return function(c,s){var d=[],l=[];return c=t(c),s=t(s),i(c.translateX,c.translateY,s.translateX,s.translateY,d,l),a(c.rotate,s.rotate,d,l),f(c.skewX,s.skewX,d,l),u(c.scaleX,c.scaleY,s.scaleX,s.scaleY,d,l),c=s=null,function(p){for(var m=-1,h=l.length,g;++m=0&&t._call.call(void 0,e),t=t._next;--Hr}function bh(){ur=(mf=ci.now())+hf,Hr=fi=0;try{Mh()}finally{Hr=0,_2(),ur=0}}function T2(){var t=ci.now(),e=t-mf;e>wh&&(hf-=e,mf=t)}function _2(){for(var t,e=pf,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:pf=n);ui=t,qs(r)}function qs(t){if(!Hr){fi&&(fi=clearTimeout(fi));var e=t-ur;e>24?(t<1/0&&(fi=setTimeout(bh,t-ci.now()-hf)),ai&&(ai=clearInterval(ai))):(ai||(mf=ci.now(),ai=setInterval(T2,wh)),Hr=1,vh(bh))}}function xf(t,e,n){var r=new si;return e=e==null?0:+e,r.restart(o=>{r.stop(),t(o+e)},e,n),r}var C2=ys("start","end","cancel","interrupt"),A2=[],_h=0,Sh=1,bf=2,yf=3,Th=4,wf=5,di=6;function kn(t,e,n,r,o,i){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;$2(t,n,{name:e,index:r,group:o,on:C2,tween:A2,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:_h})}function pi(t,e){var n=At(t,e);if(n.state>_h)throw new Error("too late; already scheduled");return n}function Ft(t,e){var n=At(t,e);if(n.state>yf)throw new Error("too late; already running");return n}function At(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function $2(t,e,n){var r=t.__transition,o;r[e]=n,n.timer=gf(i,0,n.time);function i(c){n.state=Sh,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var s,d,l,p;if(n.state!==Sh)return u();for(s in r)if(p=r[s],p.name===n.name){if(p.state===yf)return xf(a);p.state===Th?(p.state=di,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[s]):+sbf&&r.state=0&&(e=e.slice(0,n)),!e||e==="start"})}function V2(t,e,n){var r,o,i=G2(e)?pi:Ft;return function(){var a=i(this,t),f=a.on;f!==r&&(o=(r=f).copy()).on(e,n),a.on=o}}function Ph(t,e){var n=this._id;return arguments.length<2?At(this.node(),n).on.on(t):this.each(V2(n,t,e))}function j2(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Oh(){return this.on("end.remove",j2(this._id))}function Fh(t){var e=this._name,n=this._id;typeof t!="function"&&(t=nr(t));for(var r=this._groups,o=r.length,i=new Array(o),a=0;a=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Kh;let n=10**e;return function(r){this._+=r[0];for(let o=1,i=r.length;ocr)if(!(Math.abs(d*u-c*s)>cr)||!i)this._append`L${this._x1=e},${this._y1=n}`;else{let p=r-a,m=o-f,h=u*u+c*c,g=p*p+m*m,b=Math.sqrt(h),x=Math.sqrt(l),M=i*Math.tan((Ys-Math.acos((h+l-g)/(2*b*x)))/2),y=M/x,w=M/b;Math.abs(y-1)>cr&&this._append`L${e+y*s},${n+y*d}`,this._append`A${i},${i},0,0,${+(d*p>s*m)},${this._x1=e+w*u},${this._y1=n+w*c}`}}arc(e,n,r,o,i,a){if(e=+e,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let f=r*Math.cos(o),u=r*Math.sin(o),c=e+f,s=n+u,d=1^a,l=a?o-i:i-o;this._x1===null?this._append`M${c},${s}`:(Math.abs(this._x1-c)>cr||Math.abs(this._y1-s)>cr)&&this._append`L${c},${s}`,r&&(l<0&&(l=l%Bs+Bs),l>lw?this._append`A${r},${r},0,1,${d},${e-f},${n-u}A${r},${r},0,1,${d},${this._x1=c},${this._y1=s}`:l>cr&&this._append`A${r},${r},0,${+(l>=Ys)},${d},${this._x1=e+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(e,n,r,o){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+o}h${-r}Z`}toString(){return this._}};function Qh(){return new Gr}Qh.prototype=Gr.prototype;function Vr(t=3){return new Gr(+t)}function Jh(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function sr(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function We(t){return t=sr(Math.abs(t)),t?t[1]:NaN}function t0(t,e){return function(n,r){for(var o=n.length,i=[],a=0,f=t[0],u=0;o>0&&f>0&&(u+f+1>r&&(f=Math.max(1,r-u)),i.push(n.substring(o-=f,o+f)),!((u+=f+1)>r));)f=t[a=(a+1)%t.length];return i.reverse().join(e)}}function e0(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var pw=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ge(t){if(!(e=pw.exec(t)))throw new Error("invalid format: "+t);var e;return new _f({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Ge.prototype=_f.prototype;function _f(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}_f.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function n0(t){t:for(var e=t.length,n=1,r=-1,o;n0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(o+1):t}var Us;function r0(t,e){var n=sr(t,e);if(!n)return t+"";var r=n[0],o=n[1],i=o-(Us=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+sr(t,Math.max(0,e+i-1))[0]}function Xs(t,e){var n=sr(t,e);if(!n)return t+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}var Hs={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Jh,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Xs(t*100,e),r:Xs,s:r0,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Ws(t){return t}var o0=Array.prototype.map,i0=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function a0(t){var e=t.grouping===void 0||t.thousands===void 0?Ws:t0(o0.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",o=t.decimal===void 0?".":t.decimal+"",i=t.numerals===void 0?Ws:e0(o0.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",f=t.minus===void 0?"\u2212":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function c(d){d=Ge(d);var l=d.fill,p=d.align,m=d.sign,h=d.symbol,g=d.zero,b=d.width,x=d.comma,M=d.precision,y=d.trim,w=d.type;w==="n"?(x=!0,w="g"):Hs[w]||(M===void 0&&(M=12),y=!0,w="g"),(g||l==="0"&&p==="=")&&(g=!0,l="0",p="=");var v=h==="$"?n:h==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",T=h==="$"?r:/[%p]/.test(w)?a:"",E=Hs[w],I=/[defgprs%]/.test(w);M=M===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,M)):Math.max(0,Math.min(20,M));function F(_){var R=v,O=T,L,S,A;if(w==="c")O=E(_)+O,_="";else{_=+_;var N=_<0||1/_<0;if(_=isNaN(_)?u:E(Math.abs(_),M),y&&(_=n0(_)),N&&+_==0&&m!=="+"&&(N=!1),R=(N?m==="("?m:f:m==="-"||m==="("?"":m)+R,O=(w==="s"?i0[8+Us/3]:"")+O+(N&&m==="("?")":""),I){for(L=-1,S=_.length;++LA||A>57){O=(A===46?o+_.slice(L+1):_.slice(L))+O,_=_.slice(0,L);break}}}x&&!g&&(_=e(_,1/0));var P=R.length+_.length+O.length,D=P>1)+R+_+O+D.slice(P);break;default:_=D+R+_+O;break}return i(_)}return F.toString=function(){return d+""},F}function s(d,l){var p=c((d=Ge(d),d.type="f",d)),m=Math.max(-8,Math.min(8,Math.floor(We(l)/3)))*3,h=Math.pow(10,-m),g=i0[8+m/3];return function(b){return p(h*b)+g}}return{format:c,formatPrefix:s}}var Cf,Ve,Af;Gs({thousands:",",grouping:[3],currency:["$",""]});function Gs(t){return Cf=a0(t),Ve=Cf.format,Af=Cf.formatPrefix,Cf}function Vs(t){return Math.max(0,-We(Math.abs(t)))}function js(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(We(e)/3)))*3-We(Math.abs(t)))}function Zs(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,We(e)-We(t))+1}var U=1e-6,$f=1e-12,V=Math.PI,ft=V/2,Ks=V/4,Dt=V*2,$t=180/V,ut=V/180,K=Math.abs,ve=Math.atan,qt=Math.atan2,B=Math.cos;var Ef=Math.exp;var lr=Math.log,If=Math.pow,Y=Math.sin,Gt=Math.sign||function(t){return t>0?1:t<0?-1:0},mt=Math.sqrt,jr=Math.tan;function kf(t){return t>1?0:t<-1?V:Math.acos(t)}function Mt(t){return t>1?ft:t<-1?-ft:Math.asin(t)}function Rt(){}function Nf(t,e){t&&u0.hasOwnProperty(t.type)&&u0[t.type](t,e)}var f0={Feature:function(t,e){Nf(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,o=n.length;++rV&&(t-=Math.round(t/Dt)*Dt),[t,e]}Js.invert=Js;function tl(t,e,n){return(t%=Dt)?e||n?yi(l0(t),d0(e,n)):l0(t):e||n?d0(e,n):Js}function s0(t){return function(e,n){return e+=t,K(e)>V&&(e-=Math.round(e/Dt)*Dt),[e,n]}}function l0(t){var e=s0(t);return e.invert=s0(-t),e}function d0(t,e){var n=B(t),r=Y(t),o=B(e),i=Y(e);function a(f,u){var c=B(u),s=B(f)*c,d=Y(f)*c,l=Y(u),p=l*n+s*r;return[qt(d*o-p*i,s*n-l*r),Mt(p*o+d*i)]}return a.invert=function(f,u){var c=B(u),s=B(f)*c,d=Y(f)*c,l=Y(u),p=l*o-d*i;return[qt(d*o+l*i,s*n+p*r),Mt(p*n-s*r)]},a}function p0(t){t=tl(t[0]*ut,t[1]*ut,t.length>2?t[2]*ut:0);function e(n){return n=t(n[0]*ut,n[1]*ut),n[0]*=$t,n[1]*=$t,n}return e.invert=function(n){return n=t.invert(n[0]*ut,n[1]*ut),n[0]*=$t,n[1]*=$t,n},e}function h0(t,e,n,r,o,i){if(n){var a=B(e),f=Y(e),u=r*n;o==null?(o=e+r*Dt,i=e-u/2):(o=m0(a,o),i=m0(a,i),(r>0?oi)&&(o+=r*Dt));for(var c,s=o;r>0?s>i:s1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function Kr(t,e){return K(t[0]-e[0])=0;--f)o.point((d=s[f])[0],d[1]);else r(l.x,l.p.x,-1,o);l=l.p}l=l.o,s=l.z,p=!p}while(!l.v);o.lineEnd()}}}function g0(t){if(e=t.length){for(var e,n=0,r=t[0],o;++n=0?1:-1,F=I*E,_=F>V,R=g*v;if(u.add(qt(R*I*Y(F),b*T+R*B(F))),a+=_?E+I*Dt:E,_^m>=n^y>=n){var O=Zr(je(p),je(M));xi(O);var L=Zr(i,O);xi(L);var S=(_^E>=0?-1:1)*Mt(L[2]);(r>S||r===S&&(O[0]||O[1]))&&(f+=_^E>=0?1:-1)}}return(a<-U||a0){for(u||(o.polygonStart(),u=!0),o.lineStart(),v=0;v1&&y&2&&w.push(w.pop().concat(w.shift())),s.push(w.filter(mw))}}return l}}function mw(t){return t.length>1}function hw(t,e){return((t=t.x)[0]<0?t[1]-ft-U:ft-t[1])-((e=e.x)[0]<0?e[1]-ft-U:ft-e[1])}var nl=Of(function(){return!0},gw,yw,[-V,-ft]);function gw(t){var e=NaN,n=NaN,r=NaN,o;return{lineStart:function(){t.lineStart(),o=1},point:function(i,a){var f=i>0?V:-V,u=K(i-e);K(u-V)0?ft:-ft),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(f,n),t.point(i,n),o=0):r!==f&&u>=V&&(K(e-r)U?ve((Y(e)*(i=B(r))*Y(n)-Y(r)*(o=B(e))*Y(t))/(o*i*a)):(e+r)/2}function yw(t,e,n,r){var o;if(t==null)o=n*ft,r.point(-V,o),r.point(0,o),r.point(V,o),r.point(V,0),r.point(V,-o),r.point(0,-o),r.point(-V,-o),r.point(-V,0),r.point(-V,o);else if(K(t[0]-e[0])>U){var i=t[0]0,o=K(e)>U;function i(s,d,l,p){h0(p,t,n,l,s,d)}function a(s,d){return B(s)*B(d)>e}function f(s){var d,l,p,m,h;return{lineStart:function(){m=p=!1,h=1},point:function(g,b){var x=[g,b],M,y=a(g,b),w=r?y?0:c(g,b):y?c(g+(g<0?V:-V),b):0;if(!d&&(m=p=y)&&s.lineStart(),y!==p&&(M=u(d,x),(!M||Kr(d,M)||Kr(x,M))&&(x[2]=1)),y!==p)h=0,y?(s.lineStart(),M=u(x,d),s.point(M[0],M[1])):(M=u(d,x),s.point(M[0],M[1],2),s.lineEnd()),d=M;else if(o&&d&&r^y){var v;!(w&l)&&(v=u(x,d,!0))&&(h=0,r?(s.lineStart(),s.point(v[0][0],v[0][1]),s.point(v[1][0],v[1][1]),s.lineEnd()):(s.point(v[1][0],v[1][1]),s.lineEnd(),s.lineStart(),s.point(v[0][0],v[0][1],3)))}y&&(!d||!Kr(d,x))&&s.point(x[0],x[1]),d=x,p=y,l=w},lineEnd:function(){p&&s.lineEnd(),d=null},clean:function(){return h|(m&&p)<<1}}}function u(s,d,l){var p=je(s),m=je(d),h=[1,0,0],g=Zr(p,m),b=hi(g,g),x=g[0],M=b-x*x;if(!M)return!l&&s;var y=e*b/M,w=-e*x/M,v=Zr(h,g),T=gi(h,y),E=gi(g,w);Df(T,E);var I=v,F=hi(T,I),_=hi(I,I),R=F*F-_*(hi(T,T)-1);if(!(R<0)){var O=mt(R),L=gi(I,(-F-O)/_);if(Df(L,T),L=mi(L),!l)return L;var S=s[0],A=d[0],N=s[1],P=d[1],D;A0^L[1]<(K(L[0]-S)V^(S<=L[0]&&L[0]<=A)){var Q=gi(I,(-F+O)/_);return Df(Q,T),[L,mi(Q)]}}}function c(s,d){var l=r?t:V-t,p=0;return s<-l?p|=1:s>l&&(p|=2),d<-l?p|=4:d>l&&(p|=8),p}return Of(a,f,i,r?[0,-t]:[-V,t-V])}function b0(t,e,n,r,o,i){var a=t[0],f=t[1],u=e[0],c=e[1],s=0,d=1,l=u-a,p=c-f,m;if(m=n-a,!(!l&&m>0)){if(m/=l,l<0){if(m0){if(m>d)return;m>s&&(s=m)}if(m=o-a,!(!l&&m<0)){if(m/=l,l<0){if(m>d)return;m>s&&(s=m)}else if(l>0){if(m0)){if(m/=p,p<0){if(m0){if(m>d)return;m>s&&(s=m)}if(m=i-f,!(!p&&m<0)){if(m/=p,p<0){if(m>d)return;m>s&&(s=m)}else if(p>0){if(m0&&(t[0]=a+s*l,t[1]=f+s*p),d<1&&(e[0]=a+d*l,e[1]=f+d*p),!0}}}}}var bi=1e9,Ff=-bi;function Qr(t,e,n,r){function o(c,s){return t<=c&&c<=n&&e<=s&&s<=r}function i(c,s,d,l){var p=0,m=0;if(c==null||(p=a(c,d))!==(m=a(s,d))||u(c,s)<0^d>0)do l.point(p===0||p===3?t:n,p>1?r:e);while((p=(p+d+4)%4)!==m);else l.point(s[0],s[1])}function a(c,s){return K(c[0]-t)0?0:3:K(c[0]-n)0?2:1:K(c[1]-e)0?1:0:s>0?3:2}function f(c,s){return u(c.x,s.x)}function u(c,s){var d=a(c,1),l=a(s,1);return d!==l?d-l:d===0?s[1]-c[1]:d===1?c[0]-s[0]:d===2?c[1]-s[1]:s[0]-c[0]}return function(c){var s=c,d=Rf(),l,p,m,h,g,b,x,M,y,w,v,T={point:E,lineStart:R,lineEnd:O,polygonStart:F,polygonEnd:_};function E(S,A){o(S,A)&&s.point(S,A)}function I(){for(var S=0,A=0,N=p.length;Ar&&(at-W)*(r-Q)>(Ut-Q)*(t-W)&&++S:Ut<=r&&(at-W)*(r-Q)<(Ut-Q)*(t-W)&&--S;return S}function F(){s=d,l=[],p=[],v=!0}function _(){var S=I(),A=v&&S,N=(l=Fr(l)).length;(A||N)&&(c.polygonStart(),A&&(c.lineStart(),i(null,null,1,c),c.lineEnd()),N&&Pf(l,f,S,i,c),c.polygonEnd()),s=c,l=p=m=null}function R(){T.point=L,p&&p.push(m=[]),w=!0,y=!1,x=M=NaN}function O(){l&&(L(h,g),b&&y&&d.rejoin(),l.push(d.result())),T.point=E,y&&s.lineEnd()}function L(S,A){var N=o(S,A);if(p&&m.push([S,A]),w)h=S,g=A,b=N,w=!1,N&&(s.lineStart(),s.point(S,A));else if(N&&y)s.point(S,A);else{var P=[x=Math.max(Ff,Math.min(bi,x)),M=Math.max(Ff,Math.min(bi,M))],D=[S=Math.max(Ff,Math.min(bi,S)),A=Math.max(Ff,Math.min(bi,A))];b0(P,D,t,e,n,r)?(y||(s.lineStart(),s.point(P[0],P[1])),s.point(D[0],D[1]),N||s.lineEnd(),v=!1):N&&(s.lineStart(),s.point(S,A),v=!1)}x=S,M=A,y=N}return T}}var wi=t=>t;var rl=new ae,ol=new ae,w0,v0,il,al,Nn={point:Rt,lineStart:Rt,lineEnd:Rt,polygonStart:function(){Nn.lineStart=bw,Nn.lineEnd=vw},polygonEnd:function(){Nn.lineStart=Nn.lineEnd=Nn.point=Rt,rl.add(K(ol)),ol=new ae},result:function(){var t=rl/2;return rl=new ae,t}};function bw(){Nn.point=ww}function ww(t,e){Nn.point=M0,w0=il=t,v0=al=e}function M0(t,e){ol.add(al*t-il*e),il=t,al=e}function vw(){M0(w0,v0)}var fl=Nn;var Jr=1/0,qf=Jr,vi=-Jr,zf=vi,Mw={point:Sw,lineStart:Rt,lineEnd:Rt,polygonStart:Rt,polygonEnd:Rt,result:function(){var t=[[Jr,qf],[vi,zf]];return vi=zf=-(qf=Jr=1/0),t}};function Sw(t,e){tvi&&(vi=t),ezf&&(zf=e)}var to=Mw;var ul=0,cl=0,Mi=0,Yf=0,Bf=0,eo=0,sl=0,ll=0,Si=0,_0,C0,Ze,Ke,Ne={point:dr,lineStart:S0,lineEnd:T0,polygonStart:function(){Ne.lineStart=Cw,Ne.lineEnd=Aw},polygonEnd:function(){Ne.point=dr,Ne.lineStart=S0,Ne.lineEnd=T0},result:function(){var t=Si?[sl/Si,ll/Si]:eo?[Yf/eo,Bf/eo]:Mi?[ul/Mi,cl/Mi]:[NaN,NaN];return ul=cl=Mi=Yf=Bf=eo=sl=ll=Si=0,t}};function dr(t,e){ul+=t,cl+=e,++Mi}function S0(){Ne.point=Tw}function Tw(t,e){Ne.point=_w,dr(Ze=t,Ke=e)}function _w(t,e){var n=t-Ze,r=e-Ke,o=mt(n*n+r*r);Yf+=o*(Ze+t)/2,Bf+=o*(Ke+e)/2,eo+=o,dr(Ze=t,Ke=e)}function T0(){Ne.point=dr}function Cw(){Ne.point=$w}function Aw(){A0(_0,C0)}function $w(t,e){Ne.point=A0,dr(_0=Ze=t,C0=Ke=e)}function A0(t,e){var n=t-Ze,r=e-Ke,o=mt(n*n+r*r);Yf+=o*(Ze+t)/2,Bf+=o*(Ke+e)/2,eo+=o,o=Ke*t-Ze*e,sl+=o*(Ze+t),ll+=o*(Ke+e),Si+=o*3,dr(Ze=t,Ke=e)}var dl=Ne;function Uf(t){this._context=t}Uf.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:{this._context.moveTo(t,e),this._point=1;break}case 1:{this._context.lineTo(t,e);break}default:{this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Dt);break}}},result:Rt};var ml=new ae,pl,$0,E0,Ti,_i,Xf={point:Rt,lineStart:function(){Xf.point=Ew},lineEnd:function(){pl&&I0($0,E0),Xf.point=Rt},polygonStart:function(){pl=!0},polygonEnd:function(){pl=null},result:function(){var t=+ml;return ml=new ae,t}};function Ew(t,e){Xf.point=I0,$0=Ti=t,E0=_i=e}function I0(t,e){Ti-=t,_i-=e,ml.add(mt(Ti*Ti+_i*_i)),Ti=t,_i=e}var hl=Xf;var k0,Hf,N0,D0,no=class{constructor(e){this._append=e==null?R0:Iw(e),this._radius=4.5,this._=""}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(e,n){switch(this._point){case 0:{this._append`M${e},${n}`,this._point=1;break}case 1:{this._append`L${e},${n}`;break}default:{if(this._append`M${e},${n}`,this._radius!==N0||this._append!==Hf){let r=this._radius,o=this._;this._="",this._append`m0,${r}a${r},${r} 0 1,1 0,${-2*r}a${r},${r} 0 1,1 0,${2*r}z`,N0=r,Hf=this._append,D0=this._,this._=o}this._+=D0;break}}}result(){let e=this._;return this._="",e.length?e:null}};function R0(t){let e=1;this._+=t[0];for(let n=t.length;e=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return R0;if(e!==k0){let n=10**e;k0=e,Hf=function(o){let i=1;this._+=o[0];for(let a=o.length;i=0))throw new RangeError(`invalid digits: ${f}`);n=u}return e===null&&(i=new no(n)),a},a.projection(t).digits(n).context(e)}function Ai(t){return{stream:ro(t)}}function ro(t){return function(e){var n=new gl;for(var r in t)n[r]=t[r];return n.stream=e,n}}function gl(){}gl.prototype={constructor:gl,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function xl(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),r!=null&&t.clipExtent(null),ke(n,t.stream(to)),e(to.result()),r!=null&&t.clipExtent(r),t}function $i(t,e,n){return xl(t,function(r){var o=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(o/(r[1][0]-r[0][0]),i/(r[1][1]-r[0][1])),f=+e[0][0]+(o-a*(r[1][0]+r[0][0]))/2,u=+e[0][1]+(i-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([f,u])},n)}function Wf(t,e,n){return $i(t,[[0,0],e],n)}function Gf(t,e,n){return xl(t,function(r){var o=+e,i=o/(r[1][0]-r[0][0]),a=(o-i*(r[1][0]+r[0][0]))/2,f=-i*r[0][1];t.scale(150*i).translate([a,f])},n)}function Vf(t,e,n){return xl(t,function(r){var o=+e,i=o/(r[1][1]-r[0][1]),a=-i*r[0][0],f=(o-i*(r[1][1]+r[0][1]))/2;t.scale(150*i).translate([a,f])},n)}var L0=16,kw=B(30*ut);function yl(t,e){return+e?Dw(t,e):Nw(t)}function Nw(t){return ro({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function Dw(t,e){function n(r,o,i,a,f,u,c,s,d,l,p,m,h,g){var b=c-r,x=s-o,M=b*b+x*x;if(M>4*e&&h--){var y=a+l,w=f+p,v=u+m,T=mt(y*y+w*w+v*v),E=Mt(v/=T),I=K(K(v)-1)e||K((b*O+x*L)/M-.5)>.3||a*l+f*p+u*m2?S[2]%360*ut:0,O()):[f*$t,u*$t,c*$t]},_.angle=function(S){return arguments.length?(d=S%360*ut,O()):d*$t},_.reflectX=function(S){return arguments.length?(l=S?-1:1,O()):l<0},_.reflectY=function(S){return arguments.length?(p=S?-1:1,O()):p<0},_.precision=function(S){return arguments.length?(v=yl(T,w=S*S),L()):mt(w)},_.fitExtent=function(S,A){return $i(_,S,A)},_.fitSize=function(S,A){return Wf(_,S,A)},_.fitWidth=function(S,A){return Gf(_,S,A)},_.fitHeight=function(S,A){return Vf(_,S,A)};function O(){var S=P0(n,0,0,l,p,d).apply(null,e(i,a)),A=P0(n,r-S[0],o-S[1],l,p,d);return s=tl(f,u,c),T=yi(e,A),E=yi(s,T),v=yl(T,w),L()}function L(){return I=F=null,_}return function(){return e=t.apply(this,arguments),_.invert=e.invert&&R,O()}}function oo(t){var e=0,n=V/3,r=bl(t),o=r(e,n);return o.parallels=function(i){return arguments.length?r(e=i[0]*ut,n=i[1]*ut):[e*$t,n*$t]},o}function O0(t){var e=B(t);function n(r,o){return[r*e,Y(o)/e]}return n.invert=function(r,o){return[r/e,Mt(o*e)]},n}function F0(t,e){var n=Y(t),r=(n+Y(e))/2;if(K(r)=.12&&g<.234&&h>=-.425&&h<-.214?o:g>=.166&&g<.234&&h>=-.214&&h<-.115?a:n).invert(l)},s.stream=function(l){return t&&e===l?t:t=Ow([n.stream(e=l),o.stream(l),a.stream(l)])},s.precision=function(l){return arguments.length?(n.precision(l),o.precision(l),a.precision(l),d()):n.precision()},s.scale=function(l){return arguments.length?(n.scale(l),o.scale(l*.35),a.scale(l),s.translate(n.translate())):n.scale()},s.translate=function(l){if(!arguments.length)return n.translate();var p=n.scale(),m=+l[0],h=+l[1];return r=n.translate(l).clipExtent([[m-.455*p,h-.238*p],[m+.455*p,h+.238*p]]).stream(c),i=o.translate([m-.307*p,h+.201*p]).clipExtent([[m-.425*p+U,h+.12*p+U],[m-.214*p-U,h+.234*p-U]]).stream(c),f=a.translate([m-.205*p,h+.212*p]).clipExtent([[m-.214*p+U,h+.166*p+U],[m-.115*p-U,h+.234*p-U]]).stream(c),d()},s.fitExtent=function(l,p){return $i(s,l,p)},s.fitSize=function(l,p){return Wf(s,l,p)},s.fitWidth=function(l,p){return Gf(s,l,p)},s.fitHeight=function(l,p){return Vf(s,l,p)};function d(){return t=e=null,s}return s.scale(1070)}function jf(t){return function(e,n){var r=B(e),o=B(n),i=t(r*o);return i===1/0?[2,0]:[i*o*Y(e),i*Y(n)]}}function Qe(t){return function(e,n){var r=mt(e*e+n*n),o=t(r),i=Y(o),a=B(o);return[qt(e*i,r*a),Mt(r&&n*i/r)]}}var vl=jf(function(t){return mt(2/(1+t))});vl.invert=Qe(function(t){return 2*Mt(t/2)});function Ml(){return zt(vl).scale(124.75).clipAngle(180-.001)}var Sl=jf(function(t){return(t=kf(t))&&t/Y(t)});Sl.invert=Qe(function(t){return t});function Tl(){return zt(Sl).scale(79.4188).clipAngle(180-.001)}function io(t,e){return[t,lr(jr((ft+e)/2))]}io.invert=function(t,e){return[t,2*ve(Ef(e))-ft]};function _l(){return Cl(io).scale(961/Dt)}function Cl(t){var e=zt(t),n=e.center,r=e.scale,o=e.translate,i=e.clipExtent,a=null,f,u,c;e.scale=function(d){return arguments.length?(r(d),s()):r()},e.translate=function(d){return arguments.length?(o(d),s()):o()},e.center=function(d){return arguments.length?(n(d),s()):n()},e.clipExtent=function(d){return arguments.length?(d==null?a=f=u=c=null:(a=+d[0][0],f=+d[0][1],u=+d[1][0],c=+d[1][1]),s()):a==null?null:[[a,f],[u,c]]};function s(){var d=V*r(),l=e(p0(e.rotate()).invert([0,0]));return i(a==null?[[l[0]-d,l[1]-d],[l[0]+d,l[1]+d]]:t===io?[[Math.max(l[0]-d,a),f],[Math.min(l[0]+d,u),c]]:[[a,Math.max(l[1]-d,f)],[u,Math.min(l[1]+d,c)]])}return s()}function Zf(t){return jr((ft+t)/2)}function q0(t,e){var n=B(t),r=t===e?Y(t):lr(n/B(e))/lr(Zf(e)/Zf(t)),o=n*If(Zf(t),r)/r;if(!r)return io;function i(a,f){o>0?f<-ft+U&&(f=-ft+U):f>ft-U&&(f=ft-U);var u=o/If(Zf(f),r);return[u*Y(r*a),o-u*B(r*a)]}return i.invert=function(a,f){var u=o-f,c=Gt(r)*mt(a*a+u*u),s=qt(a,K(u))*Gt(u);return u*r<0&&(s-=V*Gt(a)*Gt(u)),[s/r,2*ve(If(o/c,1/r))-ft]},i}function Al(){return oo(q0).scale(109.5).parallels([30,30])}function ao(t,e){return[t,e]}ao.invert=ao;function $l(){return zt(ao).scale(152.63)}function z0(t,e){var n=B(t),r=t===e?Y(t):(n-B(e))/(e-t),o=n/r+t;if(K(r)2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}function _t(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function Ri(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}var Li=Symbol("implicit");function pr(){var t=new Qt,e=[],n=[],r=Li;function o(i){let a=t.get(i);if(a===void 0){if(r!==Li)return r;t.set(i,a=e.push(i)-1)}return n[a%n.length]}return o.domain=function(i){if(!arguments.length)return e.slice();e=[],t=new Qt;for(let a of i)t.has(a)||t.set(a,e.push(a)-1);return o},o.range=function(i){return arguments.length?(n=Array.from(i),o):n.slice()},o.unknown=function(i){return arguments.length?(r=i,o):r},o.copy=function(){return pr(e,n).unknown(r)},_t.apply(o,arguments),o}function Rn(){var t=pr().unknown(void 0),e=t.domain,n=t.range,r=0,o=1,i,a,f=!1,u=0,c=0,s=.5;delete t.unknown;function d(){var l=e().length,p=oe&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function zw(t,e,n){var r=t[0],o=t[1],i=e[0],a=e[1];return o2?Yw:zw,u=c=null,d}function d(l){return l==null||isNaN(l=+l)?i:(u||(u=f(t.map(r),e,n)))(r(a(l)))}return d.invert=function(l){return a(o((c||(c=f(e,t.map(r),ht)))(l)))},d.domain=function(l){return arguments.length?(t=Array.from(l,fo),s()):t.slice()},d.range=function(l){return arguments.length?(e=Array.from(l),s()):e.slice()},d.rangeRound=function(l){return e=Array.from(l),n=fr,s()},d.clamp=function(l){return arguments.length?(a=l?!0:oe,s()):a!==oe},d.interpolate=function(l){return arguments.length?(n=l,s()):n},d.unknown=function(l){return arguments.length?(i=l,d):i},function(l,p){return r=l,o=p,s()}}function Pi(){return mr()(oe,oe)}function Ul(t,e,n,r){var o=Or(t,e,n),i;switch(r=Ge(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(i=js(o,a))&&(r.precision=i),Af(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=Zs(o,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=Vs(o))&&(r.precision=i-(r.type==="%")*2);break}}return Ve(r)}function yn(t){var e=t.domain;return t.ticks=function(n){var r=e();return $e(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var o=e();return Ul(o[0],o[o.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),o=0,i=r.length-1,a=r[o],f=r[i],u,c,s=10;for(f0;){if(c=tr(a,f,n),c===u)return r[o]=a,r[i]=f,e(r);if(c>0)a=Math.floor(a/c)*c,f=Math.ceil(f/c)*c;else if(c<0)a=Math.ceil(a*c)/c,f=Math.floor(f*c)/c;else break;u=c}return t},t}function hr(){var t=Pi();return t.copy=function(){return Je(t,hr())},_t.apply(t,arguments),yn(t)}function Oi(t){var e;function n(r){return r==null||isNaN(r=+r)?e:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(t=Array.from(r,fo),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return Oi(t).unknown(e)},t=arguments.length?Array.from(t,fo):[0,1],yn(n)}function Fi(t,e){t=t.slice();var n=0,r=t.length-1,o=t[n],i=t[r],a;return iMath.pow(t,e)}function Ww(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function H0(t){return(e,n)=>-t(-e,n)}function Xl(t){let e=t(U0,X0),n=e.domain,r=10,o,i;function a(){return o=Ww(r),i=Hw(r),n()[0]<0?(o=H0(o),i=H0(i),t(Bw,Uw)):t(U0,X0),e}return e.base=function(f){return arguments.length?(r=+f,a()):r},e.domain=function(f){return arguments.length?(n(f),a()):n()},e.ticks=f=>{let u=n(),c=u[0],s=u[u.length-1],d=s0){for(;l<=p;++l)for(m=1;ms)break;b.push(h)}}else for(;l<=p;++l)for(m=r-1;m>=1;--m)if(h=l>0?m/i(-l):m*i(l),!(hs)break;b.push(h)}b.length*2{if(f==null&&(f=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=Ge(u)).precision==null&&(u.trim=!0),u=Ve(u)),f===1/0)return u;let c=Math.max(1,r*f/e.ticks().length);return s=>{let d=s/i(Math.round(o(s)));return d*rn(Fi(n(),{floor:f=>i(Math.floor(o(f))),ceil:f=>i(Math.ceil(o(f)))})),e}function qi(){let t=Xl(mr()).domain([1,10]);return t.copy=()=>Je(t,qi()).base(t.base()),_t.apply(t,arguments),t}function W0(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function G0(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Hl(t){var e=1,n=t(W0(e),G0(e));return n.constant=function(r){return arguments.length?t(W0(e=+r),G0(e)):e},yn(n)}function zi(){var t=Hl(mr());return t.copy=function(){return Je(t,zi()).constant(t.constant())},_t.apply(t,arguments)}function V0(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function Gw(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Vw(t){return t<0?-t*t:t*t}function Wl(t){var e=t(oe,oe),n=1;function r(){return n===1?t(oe,oe):n===.5?t(Gw,Vw):t(V0(n),V0(1/n))}return e.exponent=function(o){return arguments.length?(n=+o,r()):n},yn(e)}function Yi(){var t=Wl(mr());return t.copy=function(){return Je(t,Yi()).exponent(t.exponent())},_t.apply(t,arguments),t}function Bi(){var t=[],e=[],n=[],r;function o(){var a=0,f=Math.max(1,e.length);for(n=new Array(f-1);++a0?n[f-1]:t[0],f(t(i=new Date(+i)),i),o.ceil=i=>(t(i=new Date(i-1)),e(i,1),t(i),i),o.round=i=>{let a=o(i),f=o.ceil(i);return i-a(e(i=new Date(+i),a==null?1:Math.floor(a)),i),o.range=(i,a,f)=>{let u=[];if(i=o.ceil(i),f=f==null?1:Math.floor(f),!(i0))return u;let c;do u.push(c=new Date(+i)),e(i,f),t(i);while(cdt(a=>{if(a>=a)for(;t(a),!i(a);)a.setTime(a-1)},(a,f)=>{if(a>=a)if(f<0)for(;++f<=0;)for(;e(a,-1),!i(a););else for(;--f>=0;)for(;e(a,1),!i(a););}),n&&(o.count=(i,a)=>(Gl.setTime(+i),Vl.setTime(+a),t(Gl),t(Vl),Math.floor(n(Gl,Vl))),o.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?o.filter(r?a=>r(a)%i===0:a=>o.count(0,a)%i===0):o)),o}var Xi=dt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Xi.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?dt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Xi);var Pk=Xi.range;var Vt=dt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*1e3)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds()),j0=Vt.range;var Ln=dt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getMinutes()),jw=Ln.range,Pn=dt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes()),Zw=Pn.range;var On=dt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3-t.getMinutes()*6e4)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getHours()),Kw=On.range,Fn=dt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours()),Qw=Fn.range;var De=dt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5,t=>t.getDate()-1),Jw=De.range,yr=dt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1),t6=yr.range,uo=dt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5)),e6=uo.range;function br(t){return dt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5)}var ce=br(0),qn=br(1),Qf=br(2),Jf=br(3),en=br(4),tu=br(5),eu=br(6),K0=ce.range,n6=qn.range,r6=Qf.range,o6=Jf.range,i6=en.range,a6=tu.range,f6=eu.range;function wr(t){return dt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/6048e5)}var se=wr(0),zn=wr(1),nu=wr(2),ru=wr(3),nn=wr(4),ou=wr(5),iu=wr(6),Q0=se.range,u6=zn.range,c6=nu.range,s6=ru.range,l6=nn.range,d6=ou.range,p6=iu.range;var Yn=dt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),m6=Yn.range,Bn=dt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),h6=Bn.range;var jt=dt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());jt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:dt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});var g6=jt.range,Zt=dt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Zt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:dt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});var x6=Zt.range;function tg(t,e,n,r,o,i){let a=[[Vt,1,1e3],[Vt,5,5*1e3],[Vt,15,15*1e3],[Vt,30,30*1e3],[i,1,6e4],[i,5,5*6e4],[i,15,15*6e4],[i,30,30*6e4],[o,1,36e5],[o,3,3*36e5],[o,6,6*36e5],[o,12,12*36e5],[r,1,864e5],[r,2,2*864e5],[n,1,6048e5],[e,1,2592e6],[e,3,3*2592e6],[t,1,31536e6]];function f(c,s,d){let l=sg).right(a,l);if(p===a.length)return t.every(Or(c/31536e6,s/31536e6,d));if(p===0)return Xi.every(Math.max(Or(c,s,d),1));let[m,h]=a[l/a[p-1][2]53)return null;"w"in C||(C.w=1),"Z"in C?(J=Jl(Gi(C.y,0,1)),ot=J.getUTCDay(),J=ot>4||ot===0?zn.ceil(J):zn(J),J=yr.offset(J,(C.V-1)*7),C.y=J.getUTCFullYear(),C.m=J.getUTCMonth(),C.d=J.getUTCDate()+(C.w+6)%7):(J=Ql(Gi(C.y,0,1)),ot=J.getDay(),J=ot>4||ot===0?qn.ceil(J):qn(J),J=De.offset(J,(C.V-1)*7),C.y=J.getFullYear(),C.m=J.getMonth(),C.d=J.getDate()+(C.w+6)%7)}else("W"in C||"U"in C)&&("w"in C||(C.w="u"in C?C.u%7:"W"in C?1:0),ot="Z"in C?Jl(Gi(C.y,0,1)).getUTCDay():Ql(Gi(C.y,0,1)).getDay(),C.m=0,C.d="W"in C?(C.w+6)%7+C.W*7-(ot+5)%7:C.w+C.U*7-(ot+6)%7);return"Z"in C?(C.H+=C.Z/100|0,C.M+=C.Z%100,Jl(C)):Ql(C)}}function E($,q,z,C){for(var j=0,J=q.length,ot=z.length,lt,Xt;j=ot)return-1;if(lt=q.charCodeAt(j++),lt===37){if(lt=q.charAt(j++),Xt=w[lt in eg?q.charAt(j++):lt],!Xt||(C=Xt($,z,C))<0)return-1}else if(lt!=z.charCodeAt(C++))return-1}return C}function I($,q,z){var C=c.exec(q.slice(z));return C?($.p=s.get(C[0].toLowerCase()),z+C[0].length):-1}function F($,q,z){var C=p.exec(q.slice(z));return C?($.w=m.get(C[0].toLowerCase()),z+C[0].length):-1}function _($,q,z){var C=d.exec(q.slice(z));return C?($.w=l.get(C[0].toLowerCase()),z+C[0].length):-1}function R($,q,z){var C=b.exec(q.slice(z));return C?($.m=x.get(C[0].toLowerCase()),z+C[0].length):-1}function O($,q,z){var C=h.exec(q.slice(z));return C?($.m=g.get(C[0].toLowerCase()),z+C[0].length):-1}function L($,q,z){return E($,e,q,z)}function S($,q,z){return E($,n,q,z)}function A($,q,z){return E($,r,q,z)}function N($){return a[$.getDay()]}function P($){return i[$.getDay()]}function D($){return u[$.getMonth()]}function tt($){return f[$.getMonth()]}function Z($){return o[+($.getHours()>=12)]}function W($){return 1+~~($.getMonth()/3)}function Q($){return a[$.getUTCDay()]}function at($){return i[$.getUTCDay()]}function Ut($){return u[$.getUTCMonth()]}function Fe($){return f[$.getUTCMonth()]}function G($){return o[+($.getUTCHours()>=12)]}function X($){return 1+~~($.getUTCMonth()/3)}return{format:function($){var q=v($+="",M);return q.toString=function(){return $},q},parse:function($){var q=T($+="",!1);return q.toString=function(){return $},q},utcFormat:function($){var q=v($+="",y);return q.toString=function(){return $},q},utcParse:function($){var q=T($+="",!0);return q.toString=function(){return $},q}}}var eg={"-":"",_:" ",0:"0"},Lt=/^\s*\d+/,b6=/^%/,w6=/[\\^$*+?|[\]().{}]/g;function nt(t,e,n){var r=t<0?"-":"",o=(r?-t:t)+"",i=o.length;return r+(i[e.toLowerCase(),n]))}function M6(t,e,n){var r=Lt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function S6(t,e,n){var r=Lt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function T6(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function _6(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function C6(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ng(t,e,n){var r=Lt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function rg(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function A6(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function $6(t,e,n){var r=Lt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function E6(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function og(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function I6(t,e,n){var r=Lt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function ig(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function k6(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function N6(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function D6(t,e,n){var r=Lt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function R6(t,e,n){var r=Lt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function L6(t,e,n){var r=b6.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function P6(t,e,n){var r=Lt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function O6(t,e,n){var r=Lt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function ag(t,e){return nt(t.getDate(),e,2)}function F6(t,e){return nt(t.getHours(),e,2)}function q6(t,e){return nt(t.getHours()%12||12,e,2)}function z6(t,e){return nt(1+De.count(jt(t),t),e,3)}function lg(t,e){return nt(t.getMilliseconds(),e,3)}function Y6(t,e){return lg(t,e)+"000"}function B6(t,e){return nt(t.getMonth()+1,e,2)}function U6(t,e){return nt(t.getMinutes(),e,2)}function X6(t,e){return nt(t.getSeconds(),e,2)}function H6(t){var e=t.getDay();return e===0?7:e}function W6(t,e){return nt(ce.count(jt(t)-1,t),e,2)}function dg(t){var e=t.getDay();return e>=4||e===0?en(t):en.ceil(t)}function G6(t,e){return t=dg(t),nt(en.count(jt(t),t)+(jt(t).getDay()===4),e,2)}function V6(t){return t.getDay()}function j6(t,e){return nt(qn.count(jt(t)-1,t),e,2)}function Z6(t,e){return nt(t.getFullYear()%100,e,2)}function K6(t,e){return t=dg(t),nt(t.getFullYear()%100,e,2)}function Q6(t,e){return nt(t.getFullYear()%1e4,e,4)}function J6(t,e){var n=t.getDay();return t=n>=4||n===0?en(t):en.ceil(t),nt(t.getFullYear()%1e4,e,4)}function tv(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+nt(e/60|0,"0",2)+nt(e%60,"0",2)}function fg(t,e){return nt(t.getUTCDate(),e,2)}function ev(t,e){return nt(t.getUTCHours(),e,2)}function nv(t,e){return nt(t.getUTCHours()%12||12,e,2)}function rv(t,e){return nt(1+yr.count(Zt(t),t),e,3)}function pg(t,e){return nt(t.getUTCMilliseconds(),e,3)}function ov(t,e){return pg(t,e)+"000"}function iv(t,e){return nt(t.getUTCMonth()+1,e,2)}function av(t,e){return nt(t.getUTCMinutes(),e,2)}function fv(t,e){return nt(t.getUTCSeconds(),e,2)}function uv(t){var e=t.getUTCDay();return e===0?7:e}function cv(t,e){return nt(se.count(Zt(t)-1,t),e,2)}function mg(t){var e=t.getUTCDay();return e>=4||e===0?nn(t):nn.ceil(t)}function sv(t,e){return t=mg(t),nt(nn.count(Zt(t),t)+(Zt(t).getUTCDay()===4),e,2)}function lv(t){return t.getUTCDay()}function dv(t,e){return nt(zn.count(Zt(t)-1,t),e,2)}function pv(t,e){return nt(t.getUTCFullYear()%100,e,2)}function mv(t,e){return t=mg(t),nt(t.getUTCFullYear()%100,e,2)}function hv(t,e){return nt(t.getUTCFullYear()%1e4,e,4)}function gv(t,e){var n=t.getUTCDay();return t=n>=4||n===0?nn(t):nn.ceil(t),nt(t.getUTCFullYear()%1e4,e,4)}function xv(){return"+0000"}function ug(){return"%"}function cg(t){return+t}function sg(t){return Math.floor(+t/1e3)}var co,Un,hg,bn,gg;ed({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function ed(t){return co=td(t),Un=co.format,hg=co.parse,bn=co.utcFormat,gg=co.utcParse,co}function yv(t){return new Date(t)}function bv(t){return t instanceof Date?+t:+new Date(+t)}function au(t,e,n,r,o,i,a,f,u,c){var s=Pi(),d=s.invert,l=s.domain,p=c(".%L"),m=c(":%S"),h=c("%I:%M"),g=c("%I %p"),b=c("%a %d"),x=c("%b %d"),M=c("%B"),y=c("%Y");function w(v){return(u(v)ks(t[t.length-1]);var pu=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(k),mu=H(pu);var hu=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(k),gu=H(hu);var xu=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(k),yu=H(xu);var bu=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(k),wu=H(bu);var Qi=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(k),so=H(Qi);var vu=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(k),Mu=H(vu);var Ji=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(k),lo=H(Ji);var Su=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(k),Tu=H(Su);var _u=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(k),Cu=H(_u);var Au=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(k),$u=H(Au);var Eu=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(k),Iu=H(Eu);var ku=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(k),Nu=H(ku);var Du=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(k),Ru=H(Du);var Lu=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(k),Pu=H(Lu);var Ou=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(k),Fu=H(Ou);var qu=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(k),zu=H(qu);var Yu=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(k),Bu=H(Yu);var Uu=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(k),Xu=H(Uu);var Hu=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(k),Wu=H(Hu);var Gu=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(k),Vu=H(Gu);var ju=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(k),Zu=H(ju);var Ku=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(k),Qu=H(Ku);var Ju=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(k),tc=H(Ju);var ec=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(k),nc=H(ec);var rc=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(k),oc=H(rc);var ic=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(k),ac=H(ic);var fc=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(k),uc=H(fc);function cc(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-t*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-t*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-t*2475.67)))))))+")"}var sc=Xr(te(300,.5,0),te(-240,.5,1));var dc=Xr(te(-100,.75,.35),te(80,1.5,.8)),pc=Xr(te(260,.75,.35),te(80,1.5,.8)),lc=te();function mc(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return lc.h=360*t-100,lc.s=1.5-1.5*e,lc.l=.8-.9*e,lc+""}var hc=be(),wv=Math.PI/3,vv=Math.PI*2/3;function gc(t){var e;return t=(.5-t)*Math.PI,hc.r=255*(e=Math.sin(t))*e,hc.g=255*(e=Math.sin(t+wv))*e,hc.b=255*(e=Math.sin(t+vv))*e,hc+""}function xc(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function yc(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var bc=yc(k("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),wc=yc(k("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),vc=yc(k("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Mc=yc(k("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));var dd=Math.cos;var po=Math.min,ta=Math.sin,rt=Math.sqrt;var vr=Math.PI,rP=vr/2,mo=2*vr;var Mv=rt(3),ea={draw(t,e){let n=rt(e+po(e/28,.75))*.59436,r=n/2,o=r*Mv;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-o,-r),t.lineTo(o,r),t.moveTo(-o,r),t.lineTo(o,-r)}};var ho={draw(t,e){let n=rt(e/vr);t.moveTo(n,0),t.arc(0,0,n,0,mo)}};var na={draw(t,e){let n=rt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}};var xg=rt(1/3),Sv=xg*2,ra={draw(t,e){let n=rt(e/Sv),r=n*xg;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}};var oa={draw(t,e){let n=rt(e)*.62625;t.moveTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.lineTo(-n,0),t.closePath()}};var ia={draw(t,e){let n=rt(e-po(e/7,2))*.87559;t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}};var aa={draw(t,e){let n=rt(e),r=-n/2;t.rect(r,r,n,n)}};var fa={draw(t,e){let n=rt(e)*.4431;t.moveTo(n,n),t.lineTo(n,-n),t.lineTo(-n,-n),t.lineTo(-n,n),t.closePath()}};var Tv=.8908130915292852,yg=ta(vr/10)/ta(7*vr/10),_v=ta(mo/10)*yg,Cv=-dd(mo/10)*yg,ua={draw(t,e){let n=rt(e*Tv),r=_v*n,o=Cv*n;t.moveTo(0,-n),t.lineTo(r,o);for(let i=1;i<5;++i){let a=mo*i/5,f=dd(a),u=ta(a);t.lineTo(u*n,-f*n),t.lineTo(f*r-u*o,u*r+f*o)}t.closePath()}};var pd=rt(3),ca={draw(t,e){let n=-rt(e/(pd*3));t.moveTo(0,n*2),t.lineTo(-pd*n,-n),t.lineTo(pd*n,-n),t.closePath()}};var Av=rt(3),sa={draw(t,e){let n=rt(e)*.6824,r=n/2,o=n*Av/2;t.moveTo(0,-n),t.lineTo(o,r),t.lineTo(-o,r),t.closePath()}};var Me=-.5,Se=rt(3)/2,md=1/rt(12),$v=(md/2+1)*3,la={draw(t,e){let n=rt(e/$v),r=n/2,o=n*md,i=r,a=n*md+n,f=-i,u=a;t.moveTo(r,o),t.lineTo(i,a),t.lineTo(f,u),t.lineTo(Me*r-Se*o,Se*r+Me*o),t.lineTo(Me*i-Se*a,Se*i+Me*a),t.lineTo(Me*f-Se*u,Se*f+Me*u),t.lineTo(Me*r+Se*o,Me*o-Se*r),t.lineTo(Me*i+Se*a,Me*a-Se*i),t.lineTo(Me*f+Se*u,Me*u-Se*f),t.closePath()}};var go={draw(t,e){let n=rt(e-po(e/6,1.7))*.6189;t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}};var Sc=[ho,na,ra,aa,ua,ca,la],hd=[ho,ia,go,sa,ea,fa,oa];function Xn(t,e,n){this.k=t,this.x=e,this.y=n}Xn.prototype={constructor:Xn,scale:function(t){return t===1?this:new Xn(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Xn(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var gd=new Xn(1,0,0);xd.prototype=Xn.prototype;function xd(t){for(;!t.__zoom;)if(!(t=t.parentNode))return gd;return t.__zoom}function Re(t){return t!=null&&!Number.isNaN(t)}function Kt(t,e){return+Re(e)-+Re(t)||bt(t,e)}function Mr(t,e){return+Re(e)-+Re(t)||xe(t,e)}function Tc(t){return t!=null&&`${t}`!=""}function yd(t){return isFinite(t)?t:NaN}function da(t){return t>0&&isFinite(t)?t:NaN}function _c(t){return t<0&&isFinite(t)?t:NaN}function Cc(t,e){if(t instanceof Date||(t=new Date(+t)),isNaN(t))return typeof e=="function"?e(t):e;let n=t.getUTCHours(),r=t.getUTCMinutes(),o=t.getUTCSeconds(),i=t.getUTCMilliseconds();return`${Iv(t.getUTCFullYear(),4)}-${wn(t.getUTCMonth()+1,2)}-${wn(t.getUTCDate(),2)}${n||r||o||i?`T${wn(n,2)}:${wn(r,2)}${o||i?`:${wn(o,2)}${i?`.${wn(i,3)}`:""}`:""}Z`:""}`}function Iv(t){return t<0?`-${wn(-t,6)}`:t>9999?`+${wn(t,6)}`:wn(t,4)}function wn(t,e){return`${t}`.padStart(e,"0")}var kv=/^(?:[-+]\d{2})?\d{4}(?:-\d{2}(?:-\d{2})?)?(?:T\d{2}:\d{2}(?::\d{2}(?:\.\d{3})?)?(?:Z|[-+]\d{2}:?\d{2})?)?$/;function pa(t,e){return kv.test(t+="")?new Date(t):typeof e=="function"?e(t):e}var Ac=1e3,bd=Ac*60,wd=bd*60,ha=wd*24,Nv=ha*7,bg=ha*30,Dv=ha*365,ma=[["millisecond",.5*Ac],["second",Ac],["second",30*Ac],["minute",bd],["minute",30*bd],["hour",wd],["hour",12*wd],["day",ha],["day",2*ha],["week",Nv],["month",bg],["month",3*bg],["year",Dv]],Rv=new Map([["second",Vt],["minute",Ln],["hour",On],["day",De],["week",ce],["month",Yn],["year",jt],["monday",qn],["tuesday",Qf],["wednesday",Jf],["thursday",en],["friday",tu],["saturday",eu],["sunday",ce]]),Lv=new Map([["second",Vt],["minute",Pn],["hour",Fn],["day",uo],["week",se],["month",Bn],["year",Zt],["monday",zn],["tuesday",nu],["wednesday",ru],["thursday",nn],["friday",ou],["saturday",iu],["sunday",se]]);function wg(t,e){let n=`${t}`.toLowerCase();n.endsWith("s")&&(n=n.slice(0,-1));let r=1,o=/^(?:(\d+)\s+)/.exec(n);switch(o&&(n=n.slice(o[0].length),r=+o[1]),n){case"quarter":n="month",r*=3;break;case"half":n="month",r*=6;break}let i=e.get(n);if(!i)throw new Error(`unknown interval: ${t}`);if(!(r>1))return i;if(!i.every)throw new Error(`non-periodic interval: ${n}`);return i.every(r)}function vg(t){return wg(t,Rv)}function $c(t){return wg(t,Lv)}function Mg(t){if(!t)return!1;let e=t.floor(new Date(Date.UTC(2e3,11,31)));return Zt(e)>=e}function Sg(t){if(!t)return!1;let e=t.floor(new Date(2e3,11,31));return jt(e)>=e}function Tg(t,e,n,r){let o=t.type==="time"?Un:bn,i=r==="left"||r==="right"?(a,f)=>` ${a} ${f}`:r==="top"?(a,f)=>`${f} ${a}`:(a,f)=>`${a} ${f}`;switch(Pv(t,e,n)){case"millisecond":return Sr(o(".%L"),o(":%M:%S"),i);case"second":return Sr(o(":%S"),o("%-I:%M"),i);case"minute":return Sr(o("%-I:%M"),o("%p"),i);case"hour":return Sr(o("%-I %p"),o("%b %-d"),i);case"day":return Sr(o("%-d"),o("%b"),i);case"week":return Sr(o("%-d"),o("%b"),i);case"month":return Sr(o("%b"),o("%Y"),i);case"year":return o("%Y")}throw new Error("unable to format time ticks")}function Pv(t,e,n){let r=sn(Va(e,(u,c)=>Math.abs(c-u)||NaN));if(r>0)return ma[qe(([,u])=>u).right(ma,r,1,ma.length)-1][0];let[o,i]=Ct(t.domain()),a=typeof n=="number"?n:10,f=Math.abs(i-o)/a;return ma[qe(([,u])=>Math.log(u)).center(ma,Math.log(f))][0]}function Sr(t,e,n){return(r,o,i)=>{let a=t(r,o),f=e(r,o),u=o-vn(i);return o!==u&&i[u]!==void 0&&f===e(i[u],u)?a:n(a,f)}}var ga=Object.getPrototypeOf(Uint8Array),Ov=Object.prototype.toString;function gt(t,e,n){let r=typeof e;return r==="string"?_g(t,vd(e),n):r==="function"?_g(t,e,n):r==="number"||e instanceof Date||r==="boolean"?pt(t,Hn(e),n):typeof e?.transform=="function"?Cg(e.transform(t),n):Cg(e,n)}function _g(t,e,n){return pt(t,n?.prototype instanceof ga?Fv(e):e,n)}function Cg(t,e){return e===void 0?kt(t):t instanceof e?t:e.prototype instanceof ga&&!(t instanceof ga)?e.from(t,Md):e.from(t)}function Fv(t){return(e,n)=>Md(t(e,n))}var xo=[null],vd=t=>e=>e[t],Ec={transform:ne},wt={transform:t=>t};var Ag=()=>1,$g=()=>!0,Et=t=>t==null?t:`${t}`,ct=t=>t==null?t:+t;var xa=t=>t?t[0]:void 0,Ic=t=>t?t[1]:void 0;var Hn=t=>()=>t;function Eg(t){let e=+`${t}`.slice(1)/100;return(n,r)=>ye(n,e,r)}function Tr(t){return t instanceof ga?t:pt(t,Md,Float64Array)}function Md(t){return t==null?NaN:Number(t)}function Ig(t){return pt(t,Sd)}function Sd(t){return t instanceof Date&&!isNaN(t)?t:typeof t=="string"?pa(t):t==null||isNaN(t=+t)?void 0:new Date(t)}function ie(t,e){return t===void 0&&(t=e),t===null?[void 0,"none"]:vo(t)?[void 0,t]:[t,void 0]}function It(t,e){return t===void 0&&(t=e),t===null||typeof t=="number"?[void 0,t]:[t,void 0]}function _r(t,e,n){if(t!=null)return le(t,e,n)}function le(t,e,n){let r=`${t}`.toLowerCase();if(!n.includes(r))throw new Error(`invalid ${e}: ${t}`);return r}function kt(t){return t==null||t instanceof Array||t instanceof ga?t:Array.from(t)}function pt(t,e,n=Array){return t==null?t:t instanceof n?t.map(e):n.from(t,e)}function ya(t,e=Array){return t instanceof e?t.slice():e.from(t)}function kg({x:t,x1:e,x2:n}){return t!==void 0||e!==void 0||n!==void 0}function Td({y:t,y1:e,y2:n}){return t!==void 0||e!==void 0||n!==void 0}function Ng(t){return kg(t)||Td(t)||t.interval!==void 0}function Mn(t){return t?.toString===Ov}function yo(t){return Mn(t)&&(t.type!==void 0||t.domain!==void 0)}function ba(t){return Mn(t)&&typeof t.transform!="function"}function Cr(t){return ba(t)&&t.value===void 0&&t.channel===void 0}function Dg(t,e,n,r=wt){return e===void 0&&n===void 0?(e=0,n=t===void 0?r:t):e===void 0?e=t===void 0?0:t:n===void 0&&(n=t===void 0?0:t),[e,n]}function Ar(t,e){return t===void 0&&e===void 0?[xa,Ic]:[t,e]}function Rg({z:t,fill:e,stroke:n}={}){return t===void 0&&([t]=ie(e)),t===void 0&&([t]=ie(n)),t}function ne(t){let e=t.length,n=new Uint32Array(e);for(let r=0;rt[n])}function Lg(t,e,n){return t.subarray?t.subarray(e,n):t.slice(e,n)}function bo(t){return t!==null&&typeof t=="object"?t.valueOf():t}function Pg(t,e){if(e[t]!==void 0)return e[t];switch(t){case"x1":case"x2":t="x";break;case"y1":case"y2":t="y";break}return e[t]}function wo(t){let e;return[{transform:()=>e,label:Le(t)},n=>e=n]}function Te(t){return t==null?[t]:wo(t)}function Le(t,e){return typeof t=="string"?t:t&&t.label!==void 0?t.label:e}function wa(t,e){return{transform(n){let r=t.transform(n),o=e.transform(n);return Yt(r)||Yt(o)?pt(r,(i,a)=>new Date((+r[a]+ +o[a])/2)):pt(r,(i,a)=>(+r[a]+ +o[a])/2,Float64Array)},label:t.label}}function va(t,e){let n=Cd(e?.interval,e?.type);return n?pt(t,n):t}function Cd(t,e){let n=kc(t,e);return n&&(r=>Re(r)?n.floor(r):r)}function kc(t,e){if(t!=null){if(typeof t=="number"){0Math.floor(r*n)/n,offset:r=>(r*n+1)/n,range:(r,o)=>er(Math.ceil(r*n),o*n).map(i=>i/n)}:{floor:r=>Math.floor(r/n)*n,offset:r=>r+n,range:(r,o)=>er(Math.ceil(r/n),o/n).map(i=>i*n)}}if(typeof t=="string")return(e==="time"?vg:$c)(t);if(typeof t.floor!="function")throw new Error("invalid interval; missing floor method");if(typeof t.offset!="function")throw new Error("invalid interval; missing offset method");return t}}function rn(t,e){if(t=kc(t,e),t&&typeof t.range!="function")throw new Error("invalid interval: missing range method");return t}function Og(t,e){if(t=rn(t,e),t&&typeof t.ceil!="function")throw new Error("invalid interval: missing ceil method");return t}function on(t){return t===void 0||ba(t)?t:{value:t}}function Fg(t){return t==null?null:{transform:e=>gt(e,t,Float64Array),label:Le(t)}}function re(t){return t&&typeof t[Symbol.iterator]=="function"}function Nc(t){for(let e of t)if(e!=null)return typeof e!="object"||e instanceof Date}function Ad(t){for(let e of t){if(e==null)continue;let n=typeof e;return n==="string"||n==="boolean"}}function Yt(t){for(let e of t)if(e!=null)return e instanceof Date}function qg(t){for(let e of t)if(e!=null)return typeof e=="string"&&isNaN(e)&&pa(e)}function zg(t){for(let e of t)if(e!=null){if(typeof e!="string")return!1;if(e.trim())return!isNaN(e)}}function Yg(t){for(let e of t)if(e!=null)return typeof e=="number"}function Dc(t,e){let n;for(let r of t)if(r!=null){if(!e(r))return!1;n=!0}return n}function vo(t){return typeof t!="string"?!1:(t=t.toLowerCase().trim(),t==="none"||t==="currentcolor"||t.startsWith("url(")&&t.endsWith(")")||t.startsWith("var(")&&t.endsWith(")")||ue(t)!==null)}function Bg(t){return typeof t=="number"&&(0<=t&&t<=1||isNaN(t))}function Pt(t){return t==null||$r(t)}function $r(t){return/^\s*none\s*$/i.test(t)}function Ug(t){return/^\s*round\s*$/i.test(t)}function $d(t,e){return _r(t,e,["middle","top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"])}function Mo(t="middle"){return $d(t,"frameAnchor")}function vn(t){if(t==null)return;let e=t[0],n=t[t.length-1];return xe(e,n)}function Xg(t={},...e){let n=t;for(let r of e)for(let o in r)if(n[o]===void 0){let i=r[o];n===t?n={...n,[o]:i}:n[o]=i}return n}function qv(t){console.warn("named iterables are deprecated; please use an object instead");let e=new Set;return Object.fromEntries(Array.from(t,n=>{let{name:r}=n;if(r==null)throw new Error("missing name");let o=`${r}`;if(o==="__proto__")throw new Error(`illegal name: ${o}`);if(e.has(o))throw new Error(`duplicate name: ${o}`);return e.add(o),[r,n]}))}function Ed(t){return re(t)?qv(t):t}var de=Symbol("position"),pe=Symbol("color"),So=Symbol("radius"),To=Symbol("length"),_o=Symbol("opacity"),Co=Symbol("symbol"),zv=Symbol("projection"),st=new Map([["x",de],["y",de],["fx",de],["fy",de],["r",So],["color",pe],["opacity",_o],["symbol",Co],["length",To],["projection",zv]]);var Yv=Math.sqrt(3),Bv=2/Yv,Uv={draw(t,e){let n=Math.sqrt(e/Math.PI),r=n*Bv,o=r/2;t.moveTo(0,r),t.lineTo(n,o),t.lineTo(n,-o),t.lineTo(0,-r),t.lineTo(-n,-o),t.lineTo(-n,o),t.closePath()}},Hg=new Map([["asterisk",ea],["circle",ho],["cross",na],["diamond",ra],["diamond2",oa],["hexagon",Uv],["plus",ia],["square",aa],["square2",fa],["star",ua],["times",go],["triangle",ca],["triangle2",sa],["wye",la]]);function Wg(t){return t&&typeof t.draw=="function"}function Gg(t){return Wg(t)?!0:typeof t!="string"?!1:Hg.has(t.toLowerCase())}function Ao(t){if(t==null||Wg(t))return t;let e=Hg.get(`${t}`.toLowerCase());if(e)return e;throw new Error(`invalid symbol: ${t}`)}function $o({filter:t,sort:e,reverse:n,transform:r,initializer:o,...i}={},a){if(r===void 0&&(t!=null&&(r=Vg(t)),e!=null&&!Cr(e)&&(r=Id(r,Zg(e))),n&&(r=Id(r,jg))),a!=null&&o!=null)throw new Error("transforms cannot be applied after initializers");return{...i,...(e===null||Cr(e))&&{sort:e},transform:Id(r,a)}}function Er({filter:t,sort:e,reverse:n,initializer:r,...o}={},i){return r===void 0&&(t!=null&&(r=Vg(t)),e!=null&&!Cr(e)&&(r=kd(r,Zg(e))),n&&(r=kd(r,jg))),{...o,...(e===null||Cr(e))&&{sort:e},initializer:kd(r,i)}}function Id(t,e){return t==null?e===null?void 0:e:e==null?t===null?void 0:t:function(n,r,o){return{data:n,facets:r}=t.call(this,n,r,o),e.call(this,kt(n),r,o)}}function kd(t,e){return t==null?e===null?void 0:e:e==null?t===null?void 0:t:function(n,r,o,...i){let a,f,u,c,s,d;return{data:f=n,facets:u=r,channels:a}=t.call(this,n,r,o,...i),{data:s=f,facets:d=u,channels:c}=e.call(this,f,u,{...o,...a},...i),{data:s,facets:d,channels:{...a,...c}}}}function Vg(t){return(e,n)=>{let r=gt(e,t);return{data:e,facets:n.map(o=>o.filter(i=>r[i]))}}}function jg(t,e){return{data:t,facets:e.map(n=>n.slice().reverse())}}function Zg(t){return(typeof t=="function"&&t.length!==1?Xv:Hv)(t)}function Xv(t){return(e,n)=>{let r=(o,i)=>t(e[o],e[i]);return{data:e,facets:n.map(o=>o.slice().sort(r))}}}function Hv(t){let e,n;({channel:e,value:t,order:n}={...on(t)});let r=e?.startsWith("-");if(r&&(e=e.slice(1)),n===void 0&&(n=r?Mr:Kt),typeof n!="function")switch(`${n}`.toLowerCase()){case"ascending":n=Kt;break;case"descending":n=Mr;break;default:throw new Error(`invalid order: ${n}`)}return(o,i,a)=>{let f;if(e===void 0)f=gt(o,t);else{if(a===void 0)throw new Error("channel sort requires an initializer");if(f=a[e],!f)return{};f=f.value}let u=(c,s)=>n(f[c],f[s]);return{data:o,facets:i.map(c=>c.slice().sort(u))}}}function Sa(t,...e){for(let{name:n}of t)if(e.includes(n))return!0;return!1}function Jg(t,e,n=Nd){let r=Object.entries(t);return e.title!=null&&t.title===void 0&&r.push(["title",Zv]),e.href!=null&&t.href===void 0&&r.push(["href",Pd]),r.filter(([,o])=>o!==void 0).map(([o,i])=>i===null?Wv(o):n(o,i,e))}function Nd(t,e,n,r=Dd){let o;Mn(e)&&"reduce"in e&&(o=e.scale,e=e.reduce);let i=r(t,e,n),[a,f]=wo(i.label),u;return{name:t,output:o===void 0?a:{value:a,scale:o},initialize(c){i.initialize(c),u=f([])},scope(c,s){i.scope(c,s)},reduce(c,s){u.push(i.reduce(c,s))}}}function Wv(t){return{name:t,initialize(){},scope(){},reduce(){}}}function Dd(t,e,n,r=Ta){let o=Pg(t,n),i=r(e,o),a,f;return{label:Le(i===Ma?null:o,i.label),initialize(u){a=o===void 0?u:gt(u,o),i.scope==="data"&&(f=i.reduceIndex(ne(u),a))},scope(u,c){i.scope===u&&(f=i.reduceIndex(c,a))},reduce(u,c){return i.scope==null?i.reduceIndex(u,a,c):i.reduceIndex(u,a,f,c)}}}function Rd(t,e){return e?ze(cn(t,n=>e[n]),xa):[[,t]]}function Ta(t,e,n=Gv){if(t==null)return n(t);if(typeof t.reduceIndex=="function")return t;if(typeof t.reduce=="function"&&Mn(t))return Vv(t);if(typeof t=="function")return jv(t);if(/^p\d{2}$/i.test(t))return Sn(Eg(t));switch(`${t}`.toLowerCase()){case"first":return Pd;case"last":return Kv;case"identity":return Ld;case"count":return Ma;case"distinct":return Qv;case"sum":return e==null?Ma:Jv;case"proportion":return Qg(e,"data");case"proportion-facet":return Qg(e,"facet");case"deviation":return Sn(Lr);case"min":return Sn(Jt);case"min-index":return Sn(Ua);case"max":return Sn(Ht);case"max-index":return Sn(Ba);case"mean":return Kg(Wa);case"median":return Kg(sn);case"variance":return Sn(Rr);case"mode":return Sn(Ga)}return n(t)}function Gv(t){throw new Error(`invalid reduce: ${t}`)}function t1(t,e){for(let n in e){let r=e[n];if(r!==void 0&&!t.some(o=>o.name===n))return r}}function e1(t,e,n){if(e){let r=e.output.transform(),o=(i,a)=>Kt(r[i],r[a]);t.forEach(i=>i.sort(o))}n&&t.forEach(r=>r.reverse())}function Vv(t){return console.warn("deprecated reduce interface; implement reduceIndex instead."),{...t,reduceIndex:t.reduce.bind(t)}}function jv(t){return{reduceIndex(e,n,r){return t(_d(n,e),r)}}}function Sn(t){return{reduceIndex(e,n){return t(e,r=>n[r])}}}function Kg(t){return{reduceIndex(e,n){let r=t(e,o=>n[o]);return Yt(n)?new Date(r):r}}}var Ld={reduceIndex(t,e){return _d(e,t)}},Pd={reduceIndex(t,e){return e[t[0]]}},Zv={reduceIndex(t,e){let r=ze(Ae(t,i=>i.length,i=>e[i]),Ic),o=r.slice(-5).reverse();if(o.length`${i} (${a.toLocaleString("en-US")})`).join(` `)}},Kv={reduceIndex(t,e){return e[t[t.length-1]]}},Ma={label:"Frequency",reduceIndex(t){return t.length}},Qv={label:"Distinct",reduceIndex(t,e){let n=new Ce;for(let r of t)n.add(e[r]);return n.size}},Jv=Sn(fe);function Qg(t,e){return t==null?{scope:e,label:"Frequency",reduceIndex:(n,r,o=1)=>n.length/o}:{scope:e,reduceIndex:(n,r,o=1)=>fe(n,i=>r[i])/o}}function Eo(t,{scale:e,type:n,value:r,filter:o,hint:i},a){return i===void 0&&typeof r?.transform=="function"&&(i=r.hint),Fd(a,{scale:e,type:n,value:gt(t,r),label:Le(r),filter:o,hint:i})}function r1(t,e){return Object.fromEntries(Object.entries(t).map(([n,r])=>[n,Eo(e,r,n)]))}function o1(t,e){let n=Object.fromEntries(Object.entries(t).map(([r,{scale:o,value:i}])=>{let a=o==null?null:e[o];return[r,a==null?i:pt(i,a)]}));return n.channels=t,n}function Fd(t,e){let{scale:n,value:r}=e;if(n===!0||n==="auto")switch(t){case"fill":case"stroke":case"color":e.scale=n!==!0&&Dc(r,vo)?null:"color";break;case"fillOpacity":case"strokeOpacity":case"opacity":e.scale=n!==!0&&Dc(r,Bg)?null:"opacity";break;case"symbol":n!==!0&&Dc(r,Gg)?(e.scale=null,e.value=pt(r,Ao)):e.scale="symbol";break;default:e.scale=st.has(t)?t:null;break}else if(n===!1)e.scale=null;else if(n!=null&&!st.has(n))throw new Error(`unknown scale: ${n}`);return e}function i1(t,e,n,r,o){let{order:i,reverse:a,reduce:f=!0,limit:u}=o;for(let c in o){if(!st.has(c))continue;let{value:s,order:d=i,reverse:l=a,reduce:p=f,limit:m=u}=on(o[c]),h=s?.startsWith("-");if(h&&(s=s.slice(1)),d=d===void 0?h!==(s==="width"||s==="height")?f1:a1:n8(d),p==null||p===!1)continue;let g=c==="fx"||c==="fy"?e8(e,r[c]):t8(n,c);if(!g)throw new Error(`missing channel for scale: ${c}`);let b=g.value,[x=0,M=1/0]=re(m)?m:m<0?[m]:[0,m];if(s==null)g.domain=()=>{let y=Array.from(new Ce(b));return l&&(y=y.reverse()),(x!==0||M!==1/0)&&(y=y.slice(x,M)),y};else{let y=s==="data"?t:s==="height"?n1(n,"y1","y2"):s==="width"?n1(n,"x1","x2"):Od(n,s,s==="y"?"y2":s==="x"?"x2":void 0),w=Ta(p===!0?"max":p,y);g.domain=()=>{let v=cs(ne(b),T=>w.reduceIndex(T,y),T=>b[T]);return d&&v.sort(d),l&&v.reverse(),(x!==0||M!==1/0)&&(v=v.slice(x,M)),v.map(xa)}}}}function t8(t,e){for(let n in t){let r=t[n];if(r.scale===e)return r}}function e8(t,e){let n=t.original;if(n===t)return e;let r=e.value,o=e.value=[];for(let i=0;iMath.abs(i-r[a]),Float64Array)}function Od(t,e,n){let r=t[e];if(!r&&n!==void 0&&(r=t[n]),r)return r.value;throw new Error(`missing channel: ${e}`)}function n8(t){if(t==null||typeof t=="function")return t;switch(`${t}`.toLowerCase()){case"ascending":return a1;case"descending":return f1}throw new Error(`invalid order: ${t}`)}function a1([t,e],[n,r]){return Kt(e,r)||Kt(t,n)}function f1([t,e],[n,r]){return Mr(e,r)||Kt(t,n)}function u1(t,e){let n=t[e];if(n){for(;n.source;)n=n.source;return n.source===null?null:n}}function Io(t={}){let{document:e=typeof window<"u"?window.document:void 0}=t;return{document:e}}function yt(t,{document:e}){return mn(dn(t).call(e.documentElement))}var qd=0;function c1(){let t=qd;return qd=0,t}function an(t){console.warn(t),++qd}var l1=Math.PI,Tn=2*l1,s1=.618;function d1({projection:t,inset:e=0,insetTop:n=e,insetRight:r=e,insetBottom:o=e,insetLeft:i=e}={},a){if(t==null)return;if(typeof t.stream=="function")return t;let f,u,c="frame";if(Mn(t)){let w;if({type:t,domain:u,inset:w,insetTop:n=w!==void 0?w:n,insetRight:r=w!==void 0?w:r,insetBottom:o=w!==void 0?w:o,insetLeft:i=w!==void 0?w:i,clip:c=c,...f}=t,t==null)return}typeof t!="function"&&({type:t}=p1(t));let{width:s,height:d,marginLeft:l,marginRight:p,marginTop:m,marginBottom:h}=a,g=s-l-p-i-r,b=d-m-h-n-o;if(t=t?.({width:g,height:b,clip:c,...f}),t==null)return;c=r8(c,l,m,s-p,d-h);let x=l+i,M=m+n,y;if(u!=null){let[[w,v],[T,E]]=Ci(t).bounds(u),I=Math.min(g/(T-w),b/(E-v));I>0?(x-=(I*(w+T)-g)/2,M-=(I*(v+E)-b)/2,y=Ai({point(F,_){this.stream.point(F*I+x,_*I+M)}})):an("Warning: the projection could not be fit to the specified domain; using the default scale.")}return y??=x===0&&M===0?m1():Ai({point(w,v){this.stream.point(w+x,v+M)}}),{stream:w=>t.stream(y.stream(c(w)))}}function p1(t){switch(`${t}`.toLowerCase()){case"albers-usa":return Pe(wl,.7463,.4673);case"albers":return Rc(Ei,.7463,.4673);case"azimuthal-equal-area":return Pe(Ml,4,4);case"azimuthal-equidistant":return Pe(Tl,Tn,Tn);case"conic-conformal":return Rc(Al,Tn,Tn);case"conic-equal-area":return Rc(Dn,6.1702,2.9781);case"conic-equidistant":return Rc(El,7.312,3.6282);case"equal-earth":return Pe(kl,5.4133,2.6347);case"equirectangular":return Pe($l,Tn,l1);case"gnomonic":return Pe(Dl,3.4641,3.4641);case"identity":return{type:m1};case"reflect-y":return{type:o8};case"mercator":return Pe(_l,Tn,Tn);case"orthographic":return Pe(Ll,2,2);case"stereographic":return Pe(Ol,2,2);case"transverse-mercator":return Pe(ql,Tn,Tn);default:throw new Error(`unknown projection type: ${t}`)}}function r8(t,e,n,r,o){if(t===!1||t==null||typeof t=="number")return i=>i;switch(t===!0&&(t="frame"),`${t}`.toLowerCase()){case"frame":return Qr(e,n,r,o);default:throw new Error(`unknown projection clip type: ${t}`)}}function Pe(t,e,n){return{type:({width:r,height:o,rotate:i,precision:a=.15,clip:f})=>{let u=t();return a!=null&&u.precision?.(a),i!=null&&u.rotate?.(i),typeof f=="number"&&u.clipAngle?.(f),u.scale(Math.min(r/e,o/n)),u.translate([r/2,o/2]),u},aspectRatio:n/e}}function Rc(t,e,n){let{type:r,aspectRatio:o}=Pe(t,e,n);return{type:i=>{let{parallels:a,domain:f,width:u,height:c}=i,s=r(i);return a!=null&&(s.parallels(a),f===void 0&&s.fitSize([u,c],{type:"Sphere"})),s},aspectRatio:o}}var m1=Hn({stream:t=>t}),o8=Hn(Ai({point(t,e){this.stream.point(t,-e)}}));function h1(t,e,n,r){let o=n[t],i=n[e],a=o.length,f=n[t]=new Float64Array(a).fill(NaN),u=n[e]=new Float64Array(a).fill(NaN),c,s=r.stream({point(d,l){f[c]=d,u[c]=l}});for(c=0;cn===1?[t[3][1]]:n===2?[t[3][1],t[3][2]]:(n=Math.max(3,Math.floor(n)),n>9?Wt(e,n):t[n])}function _n(t,e){return({length:n})=>n===2?[t[3][0],t[3][2]]:(n=Math.max(3,Math.floor(n)),n>11?Wt(e,n):t[n])}function w1(t,e){return({length:n})=>n===2?[t[3][2],t[3][0]]:(n=Math.max(3,Math.floor(n)),n>11?Wt(r=>e(1-r),n):t[n].slice().reverse())}function Cn(t){return({length:e})=>Wt(t,Math.max(2,Math.floor(e)))}function v1(t){return({length:e})=>Wt(t,Math.floor(e)+1).slice(0,-1)}function zd(t){let e=`${t}`.toLowerCase();if(!b1.has(e))throw new Error(`unknown ordinal scheme: ${e}`);return b1.get(e)}function _a(t,e){let n=zd(t),r=typeof n=="function"?n({length:e}):n;return r.length!==e?r.slice(0,e):r}function _1(t,e="greys"){let n=new Set,[r,o]=_a(e,2);for(let i of t)if(i!=null)if(i===!0)n.add(o);else if(i===!1)n.add(r);else return;return[...n]}var M1=new Map([["brbg",mu],["prgn",gu],["piyg",yu],["puor",wu],["rdbu",so],["rdgy",Mu],["rdylbu",lo],["rdylgn",Tu],["spectral",Cu],["burd",t=>so(1-t)],["buylrd",t=>lo(1-t)],["blues",Qu],["greens",tc],["greys",nc],["purples",oc],["reds",ac],["oranges",uc],["turbo",xc],["viridis",bc],["magma",wc],["inferno",vc],["plasma",Mc],["cividis",cc],["cubehelix",sc],["warm",dc],["cool",pc],["bugn",$u],["bupu",Iu],["gnbu",Nu],["orrd",Ru],["pubugn",Pu],["pubu",Fu],["purd",zu],["rdpu",Bu],["ylgnbu",Xu],["ylgn",Wu],["ylorbr",Vu],["ylorrd",Zu],["rainbow",mc],["sinebow",gc]]);function ko(t){let e=`${t}`.toLowerCase();if(!M1.has(e))throw new Error(`unknown quantitative scheme: ${e}`);return M1.get(e)}var i8=new Set(["brbg","prgn","piyg","puor","rdbu","rdgy","rdylbu","rdylgn","spectral","burd","buylrd"]);function C1(t){return t!=null&&i8.has(`${t}`.toLowerCase())}var Bd=t=>e=>t(1-e),Yd=[0,1],A1=new Map([["number",ht],["rgb",we],["hsl",Os],["hcl",Fs],["lab",df]]);function Ud(t){let e=`${t}`.toLowerCase();if(!A1.has(e))throw new Error(`unknown interpolator: ${e}`);return A1.get(e)}function Do(t,e,n,{type:r,nice:o,clamp:i,zero:a,domain:f=L1(t,n),unknown:u,round:c,scheme:s,interval:d,range:l=st.get(t)===So?c8(n,f):st.get(t)===To?s8(n,f):st.get(t)===_o?Yd:void 0,interpolate:p=st.get(t)===pe?s==null&&l!==void 0?we:ko(s!==void 0?s:r==="cyclical"?"rainbow":"turbo"):c?fr:ht,reverse:m}){if(d=rn(d,r),(r==="cyclical"||r==="sequential")&&(r="linear"),typeof p!="function"&&(p=Ud(p)),m=!!m,l!==void 0){let h=(f=kt(f)).length,g=(l=kt(l)).length;if(h!==g){if(p.length===1)throw new Error("invalid piecewise interpolator");p=He(p,l),l=void 0}}if(p.length===1?(m&&(p=Bd(p),m=!1),l===void 0&&(l=Float64Array.from(f,(h,g)=>g/(f.length-1)),l.length===2&&(l=Yd)),e.interpolate((l===Yd?Hn:Ca)(p))):e.interpolate(p),a){let[h,g]=Ct(f);(h>0||g<0)&&(f=ya(f),vn(f)!==Math.sign(h)?f[f.length-1]=0:f[0]=0)}return m&&(f=An(f)),e.domain(f).unknown(u),o&&(e.nice(a8(o,r)),f=e.domain()),l!==void 0&&e.range(l),i&&e.clamp(i),{type:r,domain:f,range:l,scale:e,interpolate:p,interval:d}}function a8(t,e){return t===!0?void 0:typeof t=="number"?t:Og(t,e)}function $1(t,e,n){return Do(t,hr(),e,n)}function E1(t,e,n){return Xd(t,e,{...n,exponent:.5})}function Xd(t,e,{exponent:n=1,...r}){return Do(t,Yi().exponent(n),e,{...r,type:"pow"})}function I1(t,e,{base:n=10,domain:r=l8(e),...o}){return Do(t,qi().base(n),e,{...o,domain:r})}function k1(t,e,{constant:n=1,...r}){return Do(t,zi().constant(n),e,r)}function N1(t,e,{range:n,quantiles:r=n===void 0?5:(n=[...n]).length,n:o=r,scheme:i="rdylbu",domain:a=d8(e),unknown:f,interpolate:u,reverse:c}){return n===void 0&&(n=u!==void 0?Wt(u,o):st.get(t)===pe?_a(i,o):void 0),a.length>0&&(a=Bi(a,n===void 0?{length:o}:n).quantiles()),Lc(t,e,{domain:a,range:n,reverse:c,unknown:f})}function D1(t,e,{range:n,n:r=n===void 0?5:(n=[...n]).length,scheme:o="rdylbu",domain:i=L1(t,e),unknown:a,interpolate:f,reverse:u}){let[c,s]=Ct(i),d;return n===void 0?(d=$e(c,s,r),d[0]<=c&&d.splice(0,1),d[d.length-1]>=s&&d.pop(),r=d.length+1,n=f!==void 0?Wt(f,r):st.get(t)===pe?_a(o,r):void 0):(d=Wt(ht(c,s),r+1).slice(1,-1),c instanceof Date&&(d=d.map(l=>new Date(l)))),vn(kt(i))<0&&d.reverse(),Lc(t,e,{domain:d,range:n,reverse:u,unknown:a})}function Lc(t,e,{domain:n=[0],unknown:r,scheme:o="rdylbu",interpolate:i,range:a=i!==void 0?Wt(i,n.length+1):st.get(t)===pe?_a(o,n.length+1):void 0,reverse:f}){n=kt(n);let u=vn(n);if(!isNaN(u)&&!f8(n,u))throw new Error(`the ${t} scale has a non-monotonic domain`);return f&&(a=An(a)),{type:"threshold",scale:Ui(u<0?An(n):n,a===void 0?[]:a).unknown(r),domain:n,range:a}}function f8(t,e){for(let n=1,r=t.length,o=t[0];nn===void 0?n:Jt(n,e)),Ht(t,({value:n})=>n===void 0?n:Ht(n,e))]:[0,1]}function L1(t,e){let n=st.get(t);return(n===So||n===_o||n===To?u8:No)(e)}function u8(t){return[0,t.length?Ht(t,({value:e})=>e===void 0?e:Ht(e,yd)):1]}function c8(t,e){let n=t.find(({radius:a})=>a!==void 0);if(n!==void 0)return[0,n.radius];let r=ye(t,.5,({value:a})=>a===void 0?NaN:ye(a,.25,da)),o=e.map(a=>3*Math.sqrt(a/r)),i=30/Ht(o);return i<1?o.map(a=>a*i):o}function s8(t,e){let n=sn(t,({value:i})=>i===void 0?NaN:sn(i,Math.abs)),r=e.map(i=>12*i/n),o=60/Ht(r);return o<1?r.map(i=>i*o):r}function l8(t){for(let{value:e}of t)if(e!==void 0)for(let n of e){if(n>0)return No(t,da);if(n<0)return No(t,_c)}return[1,10]}function d8(t){let e=[];for(let{value:n}of t)if(n!==void 0)for(let r of n)e.push(r);return e}function Ca(t){return(e,n)=>r=>t(e+r*(n-e))}function Pc(t,e,n,r,{type:o,nice:i,clamp:a,domain:f=No(r),unknown:u,pivot:c=0,scheme:s,range:d,symmetric:l=!0,interpolate:p=st.get(t)===pe?s==null&&d!==void 0?we:ko(s!==void 0?s:"rdbu"):ht,reverse:m}){c=+c,f=kt(f);let[h,g]=f;if(f.length>2&&an(`Warning: the diverging ${t} scale domain contains extra elements.`),xe(h,g)<0&&([h,g]=[g,h],m=!m),h=Math.min(h,c),g=Math.max(g,c),typeof p!="function"&&(p=Ud(p)),d!==void 0&&(p=p.length===1?Ca(p)(...d):He(p,d)),m&&(p=Bd(p)),l){let b=n.apply(c),x=b-n.apply(h),M=n.apply(g)-b;xM&&(g=n.invert(b+x))}return e.domain([h,c,g]).unknown(u).interpolator(p),a&&e.clamp(a),i&&e.nice(i),{type:o,domain:[h,g],pivot:c,interpolate:p,scale:e}}function P1(t,e,n){return Pc(t,Ki(),p8,e,n)}function O1(t,e,n){return Hd(t,e,{...n,exponent:.5})}function Hd(t,e,{exponent:n=1,...r}){return Pc(t,du().exponent(n=+n),g8(n),e,{...r,type:"diverging-pow"})}function F1(t,e,{base:n=10,pivot:r=1,domain:o=No(e,r<0?_c:da),...i}){return Pc(t,su().base(n=+n),m8,e,{domain:o,pivot:r,...i})}function q1(t,e,{constant:n=1,...r}){return Pc(t,lu().constant(n=+n),x8(n),e,r)}var p8={apply(t){return t},invert(t){return t}},m8={apply:Math.log,invert:Math.exp},h8={apply(t){return Math.sign(t)*Math.sqrt(Math.abs(t))},invert(t){return Math.sign(t)*(t*t)}};function g8(t){return t===.5?h8:{apply(e){return Math.sign(e)*Math.pow(Math.abs(e),t)},invert(e){return Math.sign(e)*Math.pow(Math.abs(e),1/t)}}}function x8(t){return{apply(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))},invert(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}}function z1(t,e,n,r){return Do(t,e,n,r)}function Y1(t,e,n){return z1(t,fu(),e,n)}function B1(t,e,n){return z1(t,uu(),e,n)}var Ro=Symbol("ordinal");function X1(t,e,n,{type:r,interval:o,domain:i,range:a,reverse:f,hint:u}){return o=rn(o,r),i===void 0&&(i=j1(n,o,t)),(r==="categorical"||r===Ro)&&(r="ordinal"),f&&(i=An(i)),e.domain(i),a!==void 0&&(typeof a=="function"&&(a=a(i)),e.range(a)),{type:r,domain:i,range:a,scale:e,hint:u,interval:o}}function H1(t,e,{type:n,interval:r,domain:o,range:i,scheme:a,unknown:f,...u}){r=rn(r,n),o===void 0&&(o=j1(e,r,t));let c;if(st.get(t)===Co)c=y8(e),i=i===void 0?b8(c):pt(i,Ao);else if(st.get(t)===pe&&(i===void 0&&(n==="ordinal"||n===Ro)&&(i=_1(o,a),i!==void 0&&(a=void 0)),a===void 0&&i===void 0&&(a=n==="ordinal"?"turbo":"tableau10"),a!==void 0))if(i!==void 0){let s=ko(a),d=i[0],l=i[1]-i[0];i=({length:p})=>Wt(m=>s(d+l*m),p)}else i=zd(a);if(f===Li)throw new Error(`implicit unknown on ${t} scale is not supported`);return X1(t,pr().unknown(f),e,{...u,type:n,domain:o,range:i,hint:c})}function W1(t,e,{align:n=.5,padding:r=.5,...o}){return V1(zl().align(n).padding(r),e,o,t)}function G1(t,e,{align:n=.5,padding:r=.1,paddingInner:o=r,paddingOuter:i=t==="fx"||t==="fy"?0:r,...a}){return V1(Rn().align(n).paddingInner(o).paddingOuter(i),e,a,t)}function V1(t,e,n,r){let{round:o}=n;return o!==void 0&&t.round(o=!!o),t=X1(r,t,e,n),t.round=o,t}function j1(t,e,n){let r=new Ce;for(let{value:o,domain:i}of t){if(i!==void 0)return i();if(o!==void 0)for(let a of o)r.add(a)}if(e!==void 0){let[o,i]=Ct(r).map(e.floor,e);return e.range(o,e.offset(i))}if(r.size>1e4&&st.get(n)===de)throw new Error(`implicit ordinal domain of ${n} scale has more than 10,000 values`);return ze(r,Kt)}function U1(t,e){let n;for(let{hint:r}of t){let o=r?.[e];if(o!==void 0){if(n===void 0)n=o;else if(n!==o)return}}return n}function y8(t){return{fill:U1(t,"fill"),stroke:U1(t,"stroke")}}function b8(t){return Pt(t.fill)?hd:Sc}function Aa(t,{label:e,inset:n=0,insetTop:r=n,insetRight:o=n,insetBottom:i=n,insetLeft:a=n,round:f,nice:u,clamp:c,zero:s,align:d,padding:l,projection:p,facet:{label:m=e}={},...h}={}){let g={};for(let[b,x]of t){let M=h[b],y=M8(b,x,{round:st.get(b)===de?f:void 0,nice:u,clamp:c,zero:s,align:d,padding:l,projection:p,...M});if(y){let{label:w=b==="fx"||b==="fy"?m:e,percent:v,transform:T,inset:E,insetTop:I=E!==void 0?E:b==="y"?r:0,insetRight:F=E!==void 0?E:b==="x"?o:0,insetBottom:_=E!==void 0?E:b==="y"?i:0,insetLeft:R=E!==void 0?E:b==="x"?a:0}=M||{};if(T==null)T=void 0;else if(typeof T!="function")throw new Error("invalid scale transform; not a function");y.percent=!!v,y.label=w===void 0?w8(x,y):w,y.transform=T,b==="x"||b==="fx"?(y.insetLeft=+R,y.insetRight=+F):(b==="y"||b==="fy")&&(y.insetTop=+I,y.insetBottom=+_),g[b]=y}}return g}function Gd(t){return Object.fromEntries(Object.entries(t).filter(([,{scale:e}])=>e).map(([e,{scale:n,type:r,interval:o,label:i}])=>(n.type=r,o!=null&&(n.interval=o),i!=null&&(n.label=i),[e,n])))}function J1(t,e){let{x:n,y:r,fx:o,fy:i}=t,a=o||i?Fc(e):e;o&&Z1(o,a),i&&K1(i,a);let f=o||i?Vd(t,e):e;n&&Z1(n,f),r&&K1(r,f)}function w8(t=[],e){let n;for(let{label:r}of t)if(r!==void 0){if(n===void 0)n=r;else if(n!==r)return}if(n!==void 0)return!fn(e)&&e.percent&&(n=`${n} (%)`),{inferred:!0,toString:()=>n}}function Fc(t){let{marginTop:e,marginRight:n,marginBottom:r,marginLeft:o,width:i,height:a,facet:{marginTop:f,marginRight:u,marginBottom:c,marginLeft:s}}=t;return{marginTop:Math.max(e,f),marginRight:Math.max(n,u),marginBottom:Math.max(r,c),marginLeft:Math.max(o,s),width:i,height:a}}function Vd({fx:t,fy:e},n){let{marginTop:r,marginRight:o,marginBottom:i,marginLeft:a,width:f,height:u}=Fc(n);return{marginTop:r,marginRight:o,marginBottom:i,marginLeft:a,width:t?t.scale.bandwidth()+a+o:f,height:e?e.scale.bandwidth()+r+i:u,facet:{width:f,height:u}}}function Z1(t,e){if(t.range===void 0){let{insetLeft:n,insetRight:r}=t,{width:o,marginLeft:i=0,marginRight:a=0}=e,f=i+n,u=o-a-r;t.range=[f,Math.max(f,u)],fn(t)||(t.range=ex(t)),t.scale.range(t.range)}tx(t)}function K1(t,e){if(t.range===void 0){let{insetTop:n,insetBottom:r}=t,{height:o,marginTop:i=0,marginBottom:a=0}=e,f=i+n,u=o-a-r;t.range=[Math.max(f,u),f],fn(t)?t.range.reverse():t.range=ex(t),t.scale.range(t.range)}tx(t)}function tx(t){t.round===void 0&&T8(t)&&v8(t)<=30&&t.scale.round(!0)}function v8({scale:t}){let e=t.domain().length,[n,r]=t.range(),o=t.paddingInner?t.paddingInner():1,i=t.paddingOuter?t.paddingOuter():t.padding(),a=e-o,f=Math.abs(r-n)/Math.max(1,a+i*2);return(f-Math.floor(f))*a}function ex(t){let e=t.scale.domain().length+jd(t);if(!(e>2))return t.range;let[n,r]=t.range;return Array.from({length:e},(o,i)=>n+i/(e-1)*(r-n))}function M8(t,e=[],n={}){let r=S8(t,e,n);if(n.type===void 0&&n.domain===void 0&&n.range===void 0&&n.interval==null&&t!=="fx"&&t!=="fy"&&fn({type:r})){let o=e.map(({value:i})=>i).filter(i=>i!==void 0);o.some(Yt)?an(`Warning: some data associated with the ${t} scale are dates. Dates are typically associated with a "utc" or "time" scale rather than a "${Lo(r)}" scale. If you are using a bar mark, you probably want a rect mark with the interval option instead; if you are using a group transform, you probably want a bin transform instead. If you want to treat this data as ordinal, you can specify the interval of the ${t} scale (e.g., d3.utcDay), or you can suppress this warning by setting the type of the ${t} scale to "${Lo(r)}".`):o.some(qg)?an(`Warning: some data associated with the ${t} scale are strings that appear to be dates (e.g., YYYY-MM-DD). If these strings represent dates, you should parse them to Date objects. Dates are typically associated with a "utc" or "time" scale rather than a "${Lo(r)}" scale. If you are using a bar mark, you probably want a rect mark with the interval option instead; if you are using a group transform, you probably want a bin transform instead. If you want to treat this data as ordinal, you can suppress this warning by setting the type of the ${t} scale to "${Lo(r)}".`):o.some(zg)&&an(`Warning: some data associated with the ${t} scale are strings that appear to be numbers. If these strings represent numbers, you should parse or coerce them to numbers. Numbers are typically associated with a "linear" scale rather than a "${Lo(r)}" scale. If you want to treat this data as ordinal, you can specify the interval of the ${t} scale (e.g., 1 for integers), or you can suppress this warning by setting the type of the ${t} scale to "${Lo(r)}".`)}switch(n.type=r,r){case"diverging":case"diverging-sqrt":case"diverging-pow":case"diverging-log":case"diverging-symlog":case"cyclical":case"sequential":case"linear":case"sqrt":case"threshold":case"quantile":case"pow":case"log":case"symlog":n=Oc(e,n,Tr);break;case"identity":switch(st.get(t)){case de:n=Oc(e,n,Tr);break;case Co:n=Oc(e,n,_8);break}break;case"utc":case"time":n=Oc(e,n,Ig);break}switch(r){case"diverging":return P1(t,e,n);case"diverging-sqrt":return O1(t,e,n);case"diverging-pow":return Hd(t,e,n);case"diverging-log":return F1(t,e,n);case"diverging-symlog":return q1(t,e,n);case"categorical":case"ordinal":case Ro:return H1(t,e,n);case"cyclical":case"sequential":case"linear":return $1(t,e,n);case"sqrt":return E1(t,e,n);case"threshold":return Lc(t,e,n);case"quantile":return N1(t,e,n);case"quantize":return D1(t,e,n);case"pow":return Xd(t,e,n);case"log":return I1(t,e,n);case"symlog":return k1(t,e,n);case"utc":return B1(t,e,n);case"time":return Y1(t,e,n);case"point":return W1(t,e,n);case"band":return G1(t,e,n);case"identity":return st.get(t)===de?R1():{type:"identity"};case void 0:return;default:throw new Error(`unknown scale type: ${r}`)}}function Lo(t){return typeof t=="symbol"?t.description:t}var Q1={toString:()=>"projection"};function S8(t,e,{type:n,domain:r,range:o,scheme:i,pivot:a,projection:f}){if(t==="fx"||t==="fy")return"band";(t==="x"||t==="y")&&f!=null&&(n=Q1);for(let{type:c}of e)if(c!==void 0){if(n===void 0)n=c;else if(n!==c)throw new Error(`scale incompatible with channel: ${n} !== ${c}`)}if(n===Q1)return;if(n!==void 0)return n;if(r===void 0&&!e.some(({value:c})=>c!==void 0))return;let u=st.get(t);if(u===So)return"sqrt";if(u===_o||u===To)return"linear";if(u===Co)return"ordinal";if((r||o||[]).length>2)return Wd(u);if(r!==void 0){if(Ad(r))return Wd(u);if(Yt(r))return"utc"}else{let c=e.map(({value:s})=>s).filter(s=>s!==void 0);if(c.some(Ad))return Wd(u);if(c.some(Yt))return"utc"}if(u===pe){if(a!=null||C1(i))return"diverging";if(T1(i))return"categorical"}return"linear"}function Wd(t){switch(t){case de:return"point";case pe:return Ro;default:return"ordinal"}}function qc({type:t}){return t==="time"||t==="utc"}function fn({type:t}){return t==="ordinal"||t==="point"||t==="band"||t===Ro}function jd({type:t}){return t==="threshold"}function T8({type:t}){return t==="point"||t==="band"}function Wn(t){if(t===void 0)return!0;let e=t.domain(),n=t(e[0]);for(let r=1,o=e.length;r{if(!st.has(e=`${e}`))throw new Error(`unknown scale: ${e}`);return e in t?C8(t[e]):void 0}}function C8({scale:t,type:e,domain:n,range:r,interpolate:o,interval:i,transform:a,percent:f,pivot:u}){if(e==="identity")return{type:"identity",apply:s=>s,invert:s=>s};let c=t.unknown?t.unknown():void 0;return{type:e,domain:ya(n),...r!==void 0&&{range:ya(r)},...a!==void 0&&{transform:a},...f&&{percent:f},...c!==void 0&&{unknown:c},...i!==void 0&&{interval:i},...o!==void 0&&{interpolate:o},...t.clamp&&{clamp:t.clamp()},...u!==void 0&&{pivot:u,symmetric:!1},...t.base&&{base:t.base()},...t.exponent&&{exponent:t.exponent()},...t.constant&&{constant:t.constant()},...t.align&&{align:t.align(),round:t.round()},...t.padding&&(t.paddingInner?{paddingInner:t.paddingInner(),paddingOuter:t.paddingOuter()}:{padding:t.padding()}),...t.bandwidth&&{bandwidth:t.bandwidth(),step:t.step()},apply:s=>t(s),...t.invert&&{invert:s=>t.invert(s)}}}function zc(t){let e,n;return(...r)=>((n?.length!==r.length||n.some((o,i)=>o!==r[i]))&&(n=r,e=t(...r)),e)}var A8=zc(t=>new Intl.NumberFormat(t)),Rq=zc((t,e)=>new Intl.DateTimeFormat(t,{timeZone:"UTC",...e&&{month:e}})),Lq=zc((t,e)=>new Intl.DateTimeFormat(t,{timeZone:"UTC",...e&&{weekday:e}}));function $8(t="en-US"){let e=A8(t);return n=>n!=null&&!isNaN(n)?e.format(n):void 0}function E8(t){return Cc(t,"Invalid Date")}function I8(t="en-US"){let e=$8(t);return n=>(n instanceof Date?E8:typeof n=="number"?e:Et)(n)}var _e=I8();var Bt=(typeof window<"u"?window.devicePixelRatio>1:typeof it>"u")?0:.5,k8=0;function rx(){return`plot-clip-${++k8}`}function ox(t,{title:e,href:n,ariaLabel:r,ariaDescription:o,ariaHidden:i,target:a,fill:f,fillOpacity:u,stroke:c,strokeWidth:s,strokeOpacity:d,strokeLinejoin:l,strokeLinecap:p,strokeMiterlimit:m,strokeDasharray:h,strokeDashoffset:g,opacity:b,mixBlendMode:x,imageFilter:M,paintOrder:y,pointerEvents:w,shapeRendering:v,channels:T},{ariaLabel:E,fill:I="currentColor",fillOpacity:F,stroke:_="none",strokeOpacity:R,strokeWidth:O,strokeLinecap:L,strokeLinejoin:S,strokeMiterlimit:A,paintOrder:N}){I===null&&(f=null,u=null),_===null&&(c=null,d=null),Pt(I)?!Pt(_)&&(!Pt(f)||T?.fill)&&(_="none"):Pt(_)&&(!Pt(c)||T?.stroke)&&(I="none");let[P,D]=ie(f,I),[tt,Z]=It(u,F),[W,Q]=ie(c,_),[at,Ut]=It(d,R),[Fe,G]=It(b);$r(Q)||(s===void 0&&(s=O),p===void 0&&(p=L),l===void 0&&(l=S),m===void 0&&!Ug(l)&&(m=A),!$r(D)&&y===void 0&&(y=N));let[X,$]=It(s);return I!==null&&(t.fill=St(D,"currentColor"),t.fillOpacity=$a(Z,1)),_!==null&&(t.stroke=St(Q,"none"),t.strokeWidth=$a($,1),t.strokeOpacity=$a(Ut,1),t.strokeLinejoin=St(l,"miter"),t.strokeLinecap=St(p,"butt"),t.strokeMiterlimit=$a(m,4),t.strokeDasharray=St(h,"none"),t.strokeDashoffset=St(g,"0")),t.target=Et(a),t.ariaLabel=Et(E),t.ariaDescription=Et(o),t.ariaHidden=Et(i),t.opacity=$a(G,1),t.mixBlendMode=St(x,"normal"),t.imageFilter=St(M,"none"),t.paintOrder=St(y,"normal"),t.pointerEvents=St(w,"auto"),t.shapeRendering=St(v,"auto"),{title:{value:e,optional:!0,filter:null},href:{value:n,optional:!0,filter:null},ariaLabel:{value:r,optional:!0,filter:null},fill:{value:P,scale:"auto",optional:!0},fillOpacity:{value:tt,scale:"auto",optional:!0},stroke:{value:W,scale:"auto",optional:!0},strokeOpacity:{value:at,scale:"auto",optional:!0},strokeWidth:{value:X,optional:!0},opacity:{value:Fe,scale:"auto",optional:!0}}}function N8(t,e){e&&t.filter(n=>Tc(e[n])).append("title").call(D8,e)}function D8(t,e){e&&t.text(n=>_e(e[n]))}function Oe(t,{target:e,tip:n},{ariaLabel:r,title:o,fill:i,fillOpacity:a,stroke:f,strokeOpacity:u,strokeWidth:c,opacity:s,href:d}){r&&et(t,"aria-label",l=>r[l]),i&&et(t,"fill",l=>i[l]),a&&et(t,"fill-opacity",l=>a[l]),f&&et(t,"stroke",l=>f[l]),u&&et(t,"stroke-opacity",l=>u[l]),c&&et(t,"stroke-width",l=>c[l]),s&&et(t,"opacity",l=>s[l]),d&&L8(t,l=>d[l],e),n||N8(t,o)}function ix(t){return t===!0?t="frame":t===!1&&(t=null),_r(t,"clip",["frame","sphere"])}function R8(t,e,n,r){let o;switch(e.clip){case"frame":{let{width:i,height:a,marginLeft:f,marginRight:u,marginTop:c,marginBottom:s}=n,d=rx();o=`url(#${d})`,t=yt("svg:g",r).call(l=>l.append("svg:clipPath").attr("id",d).append("rect").attr("x",f).attr("y",c).attr("width",i-u-f).attr("height",a-c-s)).each(function(){this.appendChild(t.node()),t.node=()=>this});break}case"sphere":{let{projection:i}=r;if(!i)throw new Error('the "sphere" clip option requires a projection');let a=rx();o=`url(#${a})`,t.append("clipPath").attr("id",a).append("path").attr("d",Ci(i)({type:"Sphere"}));break}}et(t,"aria-label",e.ariaLabel),et(t,"aria-description",e.ariaDescription),et(t,"aria-hidden",e.ariaHidden),et(t,"clip-path",o)}function me(t,e,n,r){R8(t,e,n,r),et(t,"fill",e.fill),et(t,"fill-opacity",e.fillOpacity),et(t,"stroke",e.stroke),et(t,"stroke-width",e.strokeWidth),et(t,"stroke-opacity",e.strokeOpacity),et(t,"stroke-linejoin",e.strokeLinejoin),et(t,"stroke-linecap",e.strokeLinecap),et(t,"stroke-miterlimit",e.strokeMiterlimit),et(t,"stroke-dasharray",e.strokeDasharray),et(t,"stroke-dashoffset",e.strokeDashoffset),et(t,"shape-rendering",e.shapeRendering),et(t,"filter",e.imageFilter),et(t,"paint-order",e.paintOrder);let{pointerEvents:o=r.pointerSticky===!1?"none":void 0}=e;et(t,"pointer-events",o)}function he(t,e){P8(t,"mix-blend-mode",e.mixBlendMode),et(t,"opacity",e.opacity)}function L8(t,e,n){t.each(function(r){let o=e(r);if(o!=null){let i=this.ownerDocument.createElementNS(Ye.svg,"a");i.setAttribute("fill","inherit"),i.setAttributeNS(Ye.xlink,"href",o),n!=null&&i.setAttribute("target",n),this.parentNode.insertBefore(i,this).appendChild(this)}})}function et(t,e,n){n!=null&&t.attr(e,n)}function P8(t,e,n){n!=null&&t.style(e,n)}function ge(t,e,{x:n,y:r},o=Bt,i=Bt){o+=e.dx,i+=e.dy,n?.bandwidth&&(o+=n.bandwidth()/2),r?.bandwidth&&(i+=r.bandwidth()/2),(o||i)&&t.attr("transform",`translate(${o},${i})`)}function St(t,e){if((t=Et(t))!==e)return t}function $a(t,e){if((t=ct(t))!==e)return t}var O8=/^-?([_a-z]|[\240-\377]|\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?|\\[^\r\n\f0-9a-f])([_a-z0-9-]|[\240-\377]|\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?|\\[^\r\n\f0-9a-f])*$/i;function Po(t){if(t===void 0)return"plot-d6a7b5";if(t=`${t}`,!O8.test(t))throw new Error(`invalid class name: ${t}`);return t}function Oo(t,e){if(typeof e=="string")t.property("style",e);else if(e!=null)for(let n of t)Object.assign(n.style,e)}function Gn({frameAnchor:t},{width:e,height:n,marginTop:r,marginRight:o,marginBottom:i,marginLeft:a}){return[/left$/.test(t)?a:/right$/.test(t)?e-o:(a+e-o)/2,/^top/.test(t)?r:/^bottom/.test(t)?n-i:(r+n-i)/2]}function fx(t,e,n={}){let r=.5-Bt,o=.5+Bt,i=.5+Bt,a=.5-Bt;for(let{marginTop:h,marginRight:g,marginBottom:b,marginLeft:x}of e)h>r&&(r=h),g>o&&(o=g),b>i&&(i=b),x>a&&(a=x);let{margin:f,marginTop:u=f!==void 0?f:r,marginRight:c=f!==void 0?f:o,marginBottom:s=f!==void 0?f:i,marginLeft:d=f!==void 0?f:a}=n;u=+u,c=+c,s=+s,d=+d;let{width:l=640,height:p=F8(t,n,{width:l,marginTopDefault:r,marginRightDefault:o,marginBottomDefault:i,marginLeftDefault:a})+Math.max(0,u-r+s-i)}=n;l=+l,p=+p;let m={width:l,height:p,marginTop:u,marginRight:c,marginBottom:s,marginLeft:d};if(t.fx||t.fy){let{margin:h,marginTop:g=h!==void 0?h:u,marginRight:b=h!==void 0?h:c,marginBottom:x=h!==void 0?h:s,marginLeft:M=h!==void 0?h:d}=n.facet??{};g=+g,b=+b,x=+x,M=+M,m.facet={marginTop:g,marginRight:b,marginBottom:x,marginLeft:M}}return m}function F8({x:t,y:e,fy:n,fx:r},{projection:o,aspectRatio:i},{width:a,marginTopDefault:f,marginRightDefault:u,marginBottomDefault:c,marginLeftDefault:s}){let d=n?n.scale.domain().length:1,l=x1(o);if(l){let m=r?r.scale.domain().length:1,h=(1.1*d-.1)/(1.1*m-.1)*l,g=Math.max(.1,Math.min(10,h));return Math.round((a-s-u)*g+f+c)}let p=e?fn(e)?e.scale.domain().length:Math.max(7,17/d):1;if(i!=null){if(i=+i,!(isFinite(i)&&i>0))throw new Error(`invalid aspectRatio: ${i}`);let m=ax("y",e)/(ax("x",t)*i),h=r?r.scale.bandwidth():1,g=n?n.scale.bandwidth():1,b=h*(a-s-u)-t.insetLeft-t.insetRight;return(m*b+e.insetTop+e.insetBottom)/g+f+c}return!!(e||n)*Math.max(1,Math.min(60,p*d))*20+!!r*30+60}function ax(t,e){if(!e)throw new Error(`aspectRatio requires ${t} scale`);let{type:n,domain:r}=e,o;switch(n){case"linear":case"utc":case"time":o=Number;break;case"pow":{let f=e.scale.exponent();o=u=>Math.pow(u,f);break}case"log":o=Math.log;break;case"point":case"band":return r.length;default:throw new Error(`unsupported ${t} scale for aspectRatio: ${n}`)}let[i,a]=Ct(r);return Math.abs(o(a)-o(i))}function cx(t,e){let{fx:n,fy:r}=Aa(t,e),o=n?.scale.domain(),i=r?.scale.domain();return o&&i?Fa(o,i).map(([a,f],u)=>({x:a,y:f,i:u})):o?o.map((a,f)=>({x:a,i:f})):i?i.map((a,f)=>({y:a,i:f})):void 0}function sx(t,{x:e,y:n}){return e&&=tp(e),n&&=tp(n),t.filter(e&&n?r=>e.has(r.x)&&n.has(r.y):e?r=>e.has(r.x):r=>n.has(r.y)).sort(e&&n?(r,o)=>e.get(r.x)-e.get(o.x)||n.get(r.y)-n.get(o.y):e?(r,o)=>e.get(r.x)-e.get(o.x):(r,o)=>n.get(r.y)-n.get(o.y))}function Bc(t,{fx:e,fy:n}){let r=ne(t),o=e?.value,i=n?.value;return e&&n?Ae(r,a=>(a.fx=o[a[0]],a.fy=i[a[0]],a),a=>o[a],a=>i[a]):e?Ae(r,a=>(a.fx=o[a[0]],a),a=>o[a]):Ae(r,a=>(a.fy=i[a[0]],a),a=>i[a])}function lx(t,e,{marginTop:n,marginLeft:r}){return t&&e?({x:o,y:i})=>`translate(${t(o)-r},${e(i)-n})`:t?({x:o})=>`translate(${t(o)-r},0)`:({y:o})=>`translate(0,${e(o)-n})`}function dx(t){let e=[],n=new Uint32Array(fe(t,r=>r.length));for(let r of t){let o=0;for(let i of t)r!==i&&(n.set(i,o),o+=i.length);e.push(n.slice(0,o))}return e}var q8=new Map([["top",Zd],["right",Jd],["bottom",Kd],["left",Qd],["top-left",Yc(Zd,Qd)],["top-right",Yc(Zd,Jd)],["bottom-left",Yc(Kd,Qd)],["bottom-right",Yc(Kd,Jd)],["top-empty",Y8],["right-empty",X8],["bottom-empty",B8],["left-empty",U8],["empty",H8]]);function px(t){if(t==null)return null;let e=q8.get(`${t}`.toLowerCase());if(e)return e;throw new Error(`invalid facet anchor: ${t}`)}var ux=new WeakMap;function tp(t){let e=ux.get(t);return e||ux.set(t,e=new Qt(pt(t,(n,r)=>[n,r]))),e}function Vn(t,e){return tp(t).get(e)}function z8(t,e,n){return e=bo(e),n=bo(n),t.find(r=>Object.is(bo(r.x),e)&&Object.is(bo(r.y),n))}function Uc(t,e,n){return z8(t,e,n)?.empty}function Zd(t,{y:e},{y:n}){return e?Vn(e,n)===0:!0}function Kd(t,{y:e},{y:n}){return e?Vn(e,n)===e.length-1:!0}function Qd(t,{x:e},{x:n}){return e?Vn(e,n)===0:!0}function Jd(t,{x:e},{x:n}){return e?Vn(e,n)===e.length-1:!0}function Y8(t,{y:e},{x:n,y:r,empty:o}){if(o)return!1;if(!e)return;let i=Vn(e,r);if(i>0)return Uc(t,n,e[i-1])}function B8(t,{y:e},{x:n,y:r,empty:o}){if(o)return!1;if(!e)return;let i=Vn(e,r);if(i0)return Uc(t,e[i-1],r)}function X8(t,{x:e},{x:n,y:r,empty:o}){if(o)return!1;if(!e)return;let i=Vn(e,n);if(ir.get(o)?.get(i)??[]):e?t.map(({x:o})=>r.get(o)??[]):t.map(({y:o})=>r.get(o)??[])}var Nt=class{constructor(e,n={},r={},o){let{facet:i="auto",facetAnchor:a,fx:f,fy:u,sort:c,dx:s=0,dy:d=0,margin:l=0,marginTop:p=l,marginRight:m=l,marginBottom:h=l,marginLeft:g=l,clip:b,channels:x,tip:M,render:y}=r;if(this.data=e,this.sort=Cr(c)?c:null,this.initializer=Er(r).initializer,this.transform=this.initializer?r.transform:$o(r).transform,i===null||i===!1?this.facet=null:(this.facet=le(i===!0?"include":i,"facet",["auto","include","exclude","super"]),this.fx=e===xo&&typeof f=="string"?[f]:f,this.fy=e===xo&&typeof u=="string"?[u]:u),this.facetAnchor=px(a),n=Ed(n),x!==void 0&&(n={...W8(x),...n}),o!==void 0&&(n={...ox(this,r,o),...n}),this.channels=Object.fromEntries(Object.entries(n).map(([w,v])=>{if(ba(v.value)){let{value:T,scale:E=v.scale}=v.value;v={...v,scale:E,value:T}}if(e===xo&&typeof v.value=="string"){let{value:T}=v;v={...v,value:[T]}}return[w,v]}).filter(([w,{value:v,optional:T}])=>{if(v!=null)return!0;if(T)return!1;throw new Error(`missing channel value: ${w}`)})),this.dx=+s,this.dy=+d,this.marginTop=+p,this.marginRight=+m,this.marginBottom=+h,this.marginLeft=+g,this.clip=ix(b),this.tip=G8(M),this.facet==="super"){if(f||u)throw new Error("super-faceting cannot use fx or fy");for(let w in this.channels){let{scale:v}=n[w];if(!(v!=="x"&&v!=="y"))throw new Error("super-faceting cannot use x or y")}}y!=null&&(this.render=np(y,this.render))}initialize(e,n,r){let o=kt(this.data);e===void 0&&o!=null&&(e=[ne(o)]);let i=e;this.transform!=null&&({facets:e,data:o}=this.transform(o,e,r),o=kt(o)),e!==void 0&&(e.original=i);let a=r1(this.channels,o);return this.sort!=null&&i1(o,e,a,n,this.sort),{data:o,facets:e,channels:a}}filter(e,n,r){for(let o in n){let{filter:i=Re}=n[o];if(i!==null){let a=r[o];e=e.filter(f=>i(a[f]))}}return e}project(e,n,r){for(let o in e)if(e[o].scale==="x"&&/^x|x$/.test(o)){let i=o.replace(/^x|x$/,"y");i in e&&e[i].scale==="y"&&h1(o,i,n,r.projection)}}scale(e,n,r){let o=o1(e,n);return r.projection&&this.project(e,o,r),o}};function ep(...t){return t.plot=Nt.prototype.plot,t}function np(t,e){if(t==null)return e===null?void 0:e;if(e==null)return t===null?void 0:t;if(typeof t!="function")throw new TypeError(`invalid render transform: ${t}`);if(typeof e!="function")throw new TypeError(`invalid render transform: ${e}`);return function(n,r,o,i,a,f){return t.call(this,n,r,o,i,a,(u,c,s,d,l)=>e.call(this,u,c,s,d,l,f))}}function W8(t){return Object.fromEntries(Object.entries(Ed(t)).map(([e,n])=>(n=on(n),n.filter===void 0&&n.scale==null&&(n={...n,filter:null}),[e,n])))}function G8(t){return t===!0?"xy":t===!1?null:_r(t,"tip",["x","y","xy"])}function Ea(t,e){return t?.tip===!0?{...t,tip:e}:t}var mx=new WeakMap;function rp(t,e,{x:n,y:r,px:o,py:i,maxRadius:a=40,channels:f,render:u,...c}={}){return a=+a,o!=null&&(n??=null,f={...f,px:{value:o,scale:"x"}}),i!=null&&(r??=null,f={...f,py:{value:i,scale:"y"}}),{x:n,y:r,channels:f,...c,render:np(function(s,d,l,p,m,h){m={...m,pointerSticky:!1};let g=m.ownerSVGElement,{data:b}=m.getMarkState(this),x=mx.get(g);x||mx.set(g,x={sticky:!1,roots:[],renders:[]});let M=x.renders.push(Q)-1,{x:y,y:w,fx:v,fy:T}=d,E=v?v(s.fx)-p.marginLeft:0,I=T?T(s.fy)-p.marginTop:0;y?.bandwidth&&(E+=y.bandwidth()/2),w?.bandwidth&&(I+=w.bandwidth()/2);let F=s.fi!=null,_;if(F){let G=x.facetStates;G||(x.facetStates=G=new Map),_=G.get(this),_||G.set(this,_=new Map)}let[R,O]=Gn(this,p),{px:L,py:S}=l,A=L?G=>L[G]:op(l,R),N=S?G=>S[G]:ip(l,O),P,D,tt,Z;function W(G,X){if(F)if(Z&&(Z=cancelAnimationFrame(Z)),G==null)_.delete(s.fi);else{_.set(s.fi,X),Z=requestAnimationFrame(()=>{Z=null;for(let $ of _.values())if($X?.contains(G.target))||(x.sticky?(x.sticky=!1,x.renders.forEach(X=>X(null))):(x.sticky=!0,Q(P)),G.stopImmediatePropagation()))}function Fe(G){G.pointerType==="mouse"&&(x.sticky||W(null))}return g.addEventListener("pointerenter",at),g.addEventListener("pointermove",at),g.addEventListener("pointerdown",Ut),g.addEventListener("pointerleave",Fe),Q(null)},u)}}function hx(t){return rp(1,1,t)}function gx(t){return rp(1,.01,t)}function xx(t){return rp(.01,1,t)}function op({x1:t,x2:e,x:n=t},r){return t&&e?o=>(t[o]+e[o])/2:n?o=>n[o]:()=>r}function ip({y1:t,y2:e,y:n=t},r){return t&&e?o=>(t[o]+e[o])/2:n?o=>n[o]:()=>r}function Hc(t){return fn(t)&&t.interval===void 0?void 0:"tabular-nums"}function yx(t,e){let{label:n=t.label,tickSize:r=6,width:o=240,height:i=44+r,marginTop:a=18,marginRight:f=0,marginBottom:u=16+r,marginLeft:c=0,style:s,ticks:d=(o-c-f)/64,tickFormat:l,fontVariant:p=Hc(t),round:m=!0,opacity:h,className:g}=e,b=Io(e);g=Po(g),h=It(h)[1],l===null&&(l=()=>null);let x=yt("svg",b).attr("class",`${g}-ramp`).attr("font-family","system-ui, sans-serif").attr("font-size",10).attr("width",o).attr("height",i).attr("viewBox",`0 0 ${o} ${i}`).call(R=>R.append("style").text(`.${g}-ramp { display: block; background: white; height: auto; height: intrinsic; max-width: 100%; overflow: visible; } .${g}-ramp text { white-space: pre; }`)).call(Oo,s),M=R=>R.selectAll(".tick line").attr("y1",a+u-i),y,w=m?(R,O)=>R.rangeRound(O):(R,O)=>R.range(O),{type:v,domain:T,range:E,interpolate:I,scale:F,pivot:_}=t;if(I){let R=E===void 0?I:He(I.length===1?Ca(I):I,E);y=w(F.copy(),Wt(ht(c,o-f),Math.min(T.length+(_!==void 0),E===void 0?1/0:E.length)));let O=256,L=b.document.createElement("canvas");L.width=O,L.height=1;let S=L.getContext("2d");for(let A=0,N=O-1;AL:typeof l=="string"?Ve(l):l;y=w(hr().domain([-1,E.length-1]),[c,o-f]),x.append("g").attr("fill-opacity",h).selectAll().data(E).enter().append("rect").attr("x",(L,S)=>y(S-1)).attr("y",a).attr("width",(L,S)=>y(S)-y(S-1)).attr("height",i-a-u).attr("fill",L=>L),d=pt(R,(L,S)=>S),l=L=>O(R[L],L)}else y=w(Rn().domain(T),[c,o-f]),x.append("g").attr("fill-opacity",h).selectAll().data(T).enter().append("rect").attr("x",y).attr("y",a).attr("width",Math.max(0,y.bandwidth()-1)).attr("height",i-a-u).attr("fill",F),M=()=>{};return x.append("g").attr("transform",`translate(0,${i-u})`).call(xs(y).ticks(Array.isArray(d)?null:d,typeof l=="string"?l:void 0).tickFormat(typeof l=="function"?l:void 0).tickSize(r).tickValues(Array.isArray(d)?d:null)).attr("font-size",null).attr("font-family",null).attr("font-variant",St(p,"normal")).call(M).call(R=>R.select(".domain").remove()),n!==void 0&&x.append("text").attr("x",c).attr("y",a-6).attr("fill","currentColor").attr("font-weight","bold").text(n),x.node()}var ap=Math.PI/180;function up(t,{marker:e,markerStart:n=e,markerMid:r=e,markerEnd:o=e}={}){t.markerStart=fp(n),t.markerMid=fp(r),t.markerEnd=fp(o)}function fp(t){if(t==null||t===!1)return null;if(t===!0)return wx;if(typeof t=="function")return t;switch(`${t}`.toLowerCase()){case"none":return null;case"arrow":return bx("auto");case"arrow-reverse":return bx("auto-start-reverse");case"dot":return V8;case"circle":case"circle-fill":return wx;case"circle-stroke":return j8}throw new Error(`invalid marker: ${t}`)}function bx(t){return(e,n)=>yt("svg:marker",n).attr("viewBox","-5 -5 10 10").attr("markerWidth",6.67).attr("markerHeight",6.67).attr("orient",t).attr("fill","none").attr("stroke",e).attr("stroke-width",1.5).attr("stroke-linecap","round").attr("stroke-linejoin","round").call(r=>r.append("path").attr("d","M-1.5,-3l3,3l-3,3")).node()}function V8(t,e){return yt("svg:marker",e).attr("viewBox","-5 -5 10 10").attr("markerWidth",6.67).attr("markerHeight",6.67).attr("fill",t).attr("stroke","none").call(n=>n.append("circle").attr("r",2.5)).node()}function wx(t,e){return yt("svg:marker",e).attr("viewBox","-5 -5 10 10").attr("markerWidth",6.67).attr("markerHeight",6.67).attr("fill",t).attr("stroke","white").attr("stroke-width",1.5).call(n=>n.append("circle").attr("r",3)).node()}function j8(t,e){return yt("svg:marker",e).attr("viewBox","-5 -5 10 10").attr("markerWidth",6.67).attr("markerHeight",6.67).attr("fill","white").attr("stroke",t).attr("stroke-width",1.5).call(n=>n.append("circle").attr("r",3)).node()}var Z8=0;function cp(t,e,{stroke:n},r){return K8(t,e,n&&(o=>n[o]),r)}function K8(t,{markerStart:e,markerMid:n,markerEnd:r,stroke:o},i=()=>o,a){let f=new Map;function u(c){return function(s){let d=i(s),l=f.get(c);l||f.set(c,l=new Map);let p=l.get(d);if(!p){let m=this.parentNode.insertBefore(c(d,a),this),h=`plot-marker-${++Z8}`;m.setAttribute("id",h),l.set(d,p=`url(#${h})`)}return p}}e&&t.attr("marker-start",u(e)),n&&t.attr("marker-mid",u(n)),r&&t.attr("marker-end",u(r))}function Ia({inset:t,insetLeft:e,insetRight:n,...r}={}){return[e,n]=vx(t,e,n),{inset:t,insetLeft:e,insetRight:n,...r}}function Wc({inset:t,insetTop:e,insetBottom:n,...r}={}){return[e,n]=vx(t,e,n),{inset:t,insetTop:e,insetBottom:n,...r}}function vx(t,e,n){return t===void 0&&e===void 0&&n===void 0?Bt?[1,0]:[.5,.5]:[e,n]}function Mx(t,{interval:e}){return t={...on(t)},t.interval=kc(t.interval===void 0?e:t.interval),t}function Sx(t,e,n,r){let{[t]:o,[`${t}1`]:i,[`${t}2`]:a}=n,{value:f,interval:u}=Mx(o,n);if(f==null||u==null&&!r)return n;let c=Le(o);if(u==null){let p,m={transform:h=>p||(p=gt(h,f)),label:c};return{...n,[t]:void 0,[`${t}1`]:i===void 0?m:i,[`${t}2`]:a===void 0?m:a}}let s,d;function l(p){return d!==void 0&&p===s?d:d=pt(gt(s=p,f),m=>u.floor(m))}return e({...n,[t]:void 0,[`${t}1`]:i===void 0?{transform:l,label:c}:i,[`${t}2`]:a===void 0?{transform:p=>l(p).map(m=>u.offset(m)),label:c}:a})}function Tx(t,e,n){let{[t]:r}=n,{value:o,interval:i}=Mx(r,n);return o==null||i==null?n:e({...n,[t]:{label:Le(r),transform:a=>{let f=pt(gt(a,o),c=>i.floor(c)),u=f.map(c=>i.offset(c));return f.map(Yt(f)?(c,s)=>c==null||isNaN(c=+c)||(s=u[s],s==null)||isNaN(s=+s)?void 0:new Date((c+s)/2):(c,s)=>c==null||(s=u[s],s==null)?NaN:(+c+ +s)/2)}}})}function sp(t={}){return Sx("x",Ia,t)}function Gc(t={}){return Sx("y",Wc,t)}function _x(t={}){return Tx("x",Ia,t)}function Cx(t={}){return Tx("y",Wc,t)}var Ax={ariaLabel:"rule",fill:null,stroke:"currentColor"},lp=class extends Nt{constructor(e,n={}){let{x:r,y1:o,y2:i,inset:a=0,insetTop:f=a,insetBottom:u=a}=n;super(e,{x:{value:r,scale:"x",optional:!0},y1:{value:o,scale:"y",optional:!0},y2:{value:i,scale:"y",optional:!0}},Ea(n,"x"),Ax),this.insetTop=ct(f),this.insetBottom=ct(u),up(this,n)}render(e,n,r,o,i){let{x:a,y:f}=n,{x:u,y1:c,y2:s}=r,{width:d,height:l,marginTop:p,marginRight:m,marginLeft:h,marginBottom:g}=o,{insetTop:b,insetBottom:x}=this;return yt("svg:g",i).call(me,this,o,i).call(ge,this,{x:u&&a},Bt,0).call(M=>M.selectAll().data(e).enter().append("line").call(he,this).attr("x1",u?y=>u[y]:(h+d-m)/2).attr("x2",u?y=>u[y]:(h+d-m)/2).attr("y1",c&&!Wn(f)?y=>c[y]+b:p+b).attr("y2",s&&!Wn(f)?f.bandwidth?y=>s[y]+f.bandwidth()-x:y=>s[y]-x:l-g-x).call(Oe,this,r).call(cp,this,r,i)).node()}},dp=class extends Nt{constructor(e,n={}){let{x1:r,x2:o,y:i,inset:a=0,insetRight:f=a,insetLeft:u=a}=n;super(e,{y:{value:i,scale:"y",optional:!0},x1:{value:r,scale:"x",optional:!0},x2:{value:o,scale:"x",optional:!0}},Ea(n,"y"),Ax),this.insetRight=ct(f),this.insetLeft=ct(u),up(this,n)}render(e,n,r,o,i){let{x:a,y:f}=n,{y:u,x1:c,x2:s}=r,{width:d,height:l,marginTop:p,marginRight:m,marginLeft:h,marginBottom:g}=o,{insetLeft:b,insetRight:x}=this;return yt("svg:g",i).call(me,this,o,i).call(ge,this,{y:u&&f},0,Bt).call(M=>M.selectAll().data(e).enter().append("line").call(he,this).attr("x1",c&&!Wn(a)?y=>c[y]+b:h+b).attr("x2",s&&!Wn(a)?a.bandwidth?y=>s[y]+a.bandwidth()-x:y=>s[y]-x:d-m-x).attr("y1",u?y=>u[y]:(p+l-g)/2).attr("y2",u?y=>u[y]:(p+l-g)/2).call(Oe,this,r).call(cp,this,r,i)).node()}};function $x(t,e){let{x:n=wt,y:r,y1:o,y2:i,...a}=Gc(e);return[o,i]=Ix(r,o,i),new lp(t,{...a,x:n,y1:o,y2:i})}function Ex(t,e){let{y:n=wt,x:r,x1:o,x2:i,...a}=sp(e);return[o,i]=Ix(r,o,i),new dp(t,{...a,y:n,x1:o,x2:i})}function Ix(t,e,n){if(t==null){if(e===void 0){if(n!==void 0)return[0,n]}else if(n===void 0)return[0,e]}else{if(e===void 0)return n===void 0?[0,t]:[t,n];if(n===void 0)return[t,e]}return[e,n]}function Vc(t,...e){let n=e.length;for(let r=0,o=!0;r{let o=t[0];for(let i=0;i=0))throw new Error(`invalid lineWidth: ${s}`);this.splitLines=yp(this),this.clipLine=bp(this)}render(e,n,r,o,i){let{x:a,y:f}=n,{x:u,y:c,rotate:s,text:d,title:l,fontSize:p}=r,{rotate:m}=this,[h,g]=Gn(this,o);return yt("svg:g",i).call(me,this,o,i).call(xp,this,d,o).call(ge,this,{x:u&&a,y:c&&f}).call(b=>b.selectAll().data(e).enter().append("text").call(he,this).call(J8,this,d,l).attr("transform",Vc`translate(${u?x=>u[x]:h},${c?x=>c[x]:g})${s?x=>` rotate(${s[x]})`:m?` rotate(${m})`:""}`).call(et,"font-size",p&&(x=>p[x])).call(Oe,this,r)).node()}};function mp(t){return t==null?null:le(t,"textOverflow",["clip","ellipsis","clip-start","clip-end","ellipsis-start","ellipsis-middle","ellipsis-end"]).replace(/^(clip|ellipsis)$/,"$1-end")}function J8(t,e,n,r){if(!n)return;let{lineAnchor:o,lineHeight:i,textOverflow:a,splitLines:f,clipLine:u}=e;t.each(function(c){let s=f(_e(n[c])??"").map(u),d=s.length,l=o==="top"?.71:o==="bottom"?1-d:(164-d*100)/200;if(d>1){let p=0;for(let m=0;mo&&n(t,o,f)>e&&(r.push(t.slice(o,i)+(t[i-1]===Lx?"-":"")),o=a),u){r.push(t.slice(o,f)),o=void 0;continue}i=f}return r}function*o5(t){let e=0,n=0,r=t.length;for(;ni.split(/\r\n?|\n/g);let r=t?Zc:jc,o=e*100;return i=>r5(i,o,r)}function bp({monospace:t,lineWidth:e,textOverflow:n}){if(n==null||e==1/0)return i=>i;let r=t?Zc:jc,o=e*100;switch(n){case"clip-start":return i=>Dx(i,o,r,"");case"clip-end":return i=>Nx(i,o,r,"");case"ellipsis-start":return i=>Dx(i,o,r,Ir);case"ellipsis-middle":return i=>i5(i,o,r,Ir);case"ellipsis-end":return i=>Nx(i,o,r,Ir)}}var Ir="\u2026";function kr(t,e,n,r){let o=[],i=0;for(let a=0,f=0,u=t.length;ae){for(i+=r;i>e&&a>0;)f=a,a=o.pop(),i-=n(t,a,f);return[a,e-i]}i+=c,o.push(a)}return[-1,0]}function Nx(t,e,n,r){t=t.trim();let o=n(r),[i]=kr(t,e,n,o);return i<0?t:t.slice(0,i).trimEnd()+r}function i5(t,e,n,r){t=t.trim();let o=n(t);if(o<=e)return t;let i=n(r)/2,[a,f]=kr(t,e/2,n,i),[u]=kr(t,o-e/2-f+i,n,-i);return u<0?r:t.slice(0,a).trimEnd()+r+t.slice(zo(t,u)).trimStart()}function Dx(t,e,n,r){t=t.trim();let o=n(t);if(o<=e)return t;let i=n(r),[a]=kr(t,o-e+i,n,-i);return a<0?r:r+t.slice(zo(t,a)).trimStart()}var pp=/[\p{Combining_Mark}\p{Emoji_Modifier}]+/uy,Rx=/\p{Extended_Pictographic}/uy;function zo(t,e){return e+=a5(t,e)?2:1,u5(t,e)&&(e=pp.lastIndex),f5(t,e)?zo(t,e+1):e}function Px(t,e){return t.charCodeAt(e)<128}function a5(t,e){let n=t.charCodeAt(e);if(n>=55296&&n<56320){let r=t.charCodeAt(e+1);return r>=56320&&r<57344}return!1}function f5(t,e){return t.charCodeAt(e)===8205}function u5(t,e){return Px(t,e)?!1:(pp.lastIndex=e,pp.test(t))}function Ox(t,e){return Px(t,e)?!1:(Rx.lastIndex=e,Rx.test(t))}var c5={ariaLabel:"vector",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinejoin:"round",strokeLinecap:"round"},Fx=3.5,s5=Fx*5,qx={draw(t,e,n){let r=e*n/s5;t.moveTo(0,0),t.lineTo(0,-e),t.moveTo(-r,r-e),t.lineTo(0,-e),t.lineTo(r,r-e)}},l5={draw(t,e,n){t.moveTo(-n,0),t.lineTo(0,-e),t.lineTo(n,0)}},d5=new Map([["arrow",qx],["spike",l5]]);function p5(t){return t&&typeof t.draw=="function"}function m5(t){if(p5(t))return t;let e=d5.get(`${t}`.toLowerCase());if(e)return e;throw new Error(`invalid shape: ${t}`)}var Kc=class extends Nt{constructor(e,n={}){let{x:r,y:o,r:i=Fx,length:a,rotate:f,shape:u=qx,anchor:c="middle",frameAnchor:s}=n,[d,l]=It(a,12),[p,m]=It(f,0);super(e,{x:{value:r,scale:"x",optional:!0},y:{value:o,scale:"y",optional:!0},length:{value:d,scale:"length",optional:!0},rotate:{value:p,optional:!0}},n,c5),this.r=+i,this.length=l,this.rotate=m,this.shape=m5(u),this.anchor=le(c,"anchor",["start","middle","end"]),this.frameAnchor=Mo(s)}render(e,n,r,o,i){let{x:a,y:f}=n,{x:u,y:c,length:s,rotate:d}=r,{length:l,rotate:p,anchor:m,shape:h,r:g}=this,[b,x]=Gn(this,o);return yt("svg:g",i).call(me,this,o,i).call(ge,this,{x:u&&a,y:c&&f}).call(M=>M.selectAll().data(e).enter().append("path").call(he,this).attr("transform",Vc`translate(${u?y=>u[y]:b},${c?y=>c[y]:x})${d?y=>` rotate(${d[y]})`:p?` rotate(${p})`:""}${m==="start"?"":m==="end"?s?y=>` translate(0,${s[y]})`:` translate(0,${l})`:s?y=>` translate(0,${s[y]/2})`:` translate(0,${l/2})`}`).attr("d",s?y=>{let w=Vr();return h.draw(w,s[y],g),w}:(()=>{let y=Vr();return h.draw(y,l,g),y})()).call(Oe,this,r)).node()}};function zx(t,e={}){let{x:n=wt,...r}=e;return new Kc(t,{...r,x:n})}function Yx(t,e={}){let{y:n=wt,...r}=e;return new Kc(t,{...r,y:n})}function jn(t,e){return arguments.length<2&&!re(t)&&(e=t,t=null),e===void 0&&(e={}),[t,e]}function Qc({anchor:t}={},e){return t===void 0?e[0]:le(t,"anchor",e)}function Bx(t){return Qc(t,["left","right"])}function Ux(t){return Qc(t,["right","left"])}function Xx(t){return Qc(t,["bottom","top"])}function Hx(t){return Qc(t,["top","bottom"])}function Jc(){let[t,e]=jn(...arguments);return Wx("y",Bx(e),t,e)}function wp(){let[t,e]=jn(...arguments);return Wx("fy",Ux(e),t,e)}function Nr(){let[t,e]=jn(...arguments);return Gx("x",Xx(e),t,e)}function vp(){let[t,e]=jn(...arguments);return Gx("fx",Hx(e),t,e)}function Wx(t,e,n,{color:r="currentColor",opacity:o=1,stroke:i=r,strokeOpacity:a=o,strokeWidth:f=1,fill:u=r,fillOpacity:c=o,textAnchor:s,textStroke:d,textStrokeOpacity:l,textStrokeWidth:p,tickSize:m=t==="y"?6:0,tickPadding:h,tickRotate:g,x:b,margin:x,marginTop:M=x===void 0?20:x,marginRight:y=x===void 0?e==="right"?40:0:x,marginBottom:w=x===void 0?20:x,marginLeft:v=x===void 0?e==="left"?40:0:x,label:T,labelAnchor:E,labelArrow:I,labelOffset:F,..._}){return m=ct(m),h=ct(h),g=ct(g),E!==void 0&&(E=le(E,"labelAnchor",["center","top","bottom"])),I=ey(I),ep(m&&!Pt(i)?h5(t,e,n,{stroke:i,strokeOpacity:a,strokeWidth:f,tickSize:m,tickPadding:h,tickRotate:g,x:b,..._}):null,Pt(u)?null:x5(t,e,n,{fill:u,fillOpacity:c,stroke:d,strokeOpacity:l,strokeWidth:p,textAnchor:s,tickSize:m,tickPadding:h,tickRotate:g,x:b,marginTop:M,marginRight:y,marginBottom:w,marginLeft:v,..._}),!Pt(u)&&T!==null?qo([],Kx({fill:u,fillOpacity:c,..._},function(R,O,L,S,A){let N=S[t],{marginTop:P,marginRight:D,marginBottom:tt,marginLeft:Z}=t==="y"&&A.inset||A,W=E??(N.bandwidth?"center":"top"),Q=F??(e==="right"?D:Z)-3;return W==="center"?(this.textAnchor=void 0,this.lineAnchor=e==="right"?"bottom":"top",this.frameAnchor=e,this.rotate=-90):(this.textAnchor=e==="right"?"end":"start",this.lineAnchor=W,this.frameAnchor=`${W}-${e}`,this.rotate=0),this.dy=W==="top"?3-P:W==="bottom"?tt-3:0,this.dx=e==="right"?Q:-Q,this.ariaLabel=`${t}-axis label`,{facets:[[0]],channels:{text:{value:[ty(t,N,{anchor:e,label:T,labelAnchor:W,labelArrow:I})]}}}})):null)}function Gx(t,e,n,{color:r="currentColor",opacity:o=1,stroke:i=r,strokeOpacity:a=o,strokeWidth:f=1,fill:u=r,fillOpacity:c=o,textAnchor:s,textStroke:d,textStrokeOpacity:l,textStrokeWidth:p,tickSize:m=t==="x"?6:0,tickPadding:h,tickRotate:g,y:b,margin:x,marginTop:M=x===void 0?e==="top"?30:0:x,marginRight:y=x===void 0?20:x,marginBottom:w=x===void 0?e==="bottom"?30:0:x,marginLeft:v=x===void 0?20:x,label:T,labelAnchor:E,labelArrow:I,labelOffset:F,..._}){return m=ct(m),h=ct(h),g=ct(g),E!==void 0&&(E=le(E,"labelAnchor",["center","left","right"])),I=ey(I),ep(m&&!Pt(i)?g5(t,e,n,{stroke:i,strokeOpacity:a,strokeWidth:f,tickSize:m,tickPadding:h,tickRotate:g,y:b,..._}):null,Pt(u)?null:y5(t,e,n,{fill:u,fillOpacity:c,stroke:d,strokeOpacity:l,strokeWidth:p,textAnchor:s,tickSize:m,tickPadding:h,tickRotate:g,y:b,marginTop:M,marginRight:y,marginBottom:w,marginLeft:v,..._}),!Pt(u)&&T!==null?qo([],Kx({fill:u,fillOpacity:c,..._},function(R,O,L,S,A){let N=S[t],{marginTop:P,marginRight:D,marginBottom:tt,marginLeft:Z}=t==="x"&&A.inset||A,W=E??(N.bandwidth?"center":"right"),Q=F??(e==="top"?P:tt)-3;return W==="center"?(this.frameAnchor=e,this.textAnchor=void 0):(this.frameAnchor=`${e}-${W}`,this.textAnchor=W==="right"?"end":"start"),this.lineAnchor=e,this.dy=e==="top"?-Q:Q,this.dx=W==="right"?D-3:W==="left"?3-Z:0,this.ariaLabel=`${t}-axis label`,{facets:[[0]],channels:{text:{value:[ty(t,N,{anchor:e,label:T,labelAnchor:W,labelArrow:I})]}}}})):null)}function h5(t,e,n,{strokeWidth:r=1,strokeLinecap:o=null,strokeLinejoin:i=null,facetAnchor:a=e+(t==="y"?"-empty":""),frameAnchor:f=e,tickSize:u,inset:c=0,insetLeft:s=c,insetRight:d=c,dx:l=0,y:p=t==="y"?void 0:null,...m}){return Yo(Yx,t,`${t}-axis tick`,n,{strokeWidth:r,strokeLinecap:o,strokeLinejoin:i,facetAnchor:a,frameAnchor:f,y:p,...m,dx:e==="left"?+l-Bt+ +s:+l+Bt-d,anchor:"start",length:u,shape:e==="left"?v5:M5})}function g5(t,e,n,{strokeWidth:r=1,strokeLinecap:o=null,strokeLinejoin:i=null,facetAnchor:a=e+(t==="x"?"-empty":""),frameAnchor:f=e,tickSize:u,inset:c=0,insetTop:s=c,insetBottom:d=c,dy:l=0,x:p=t==="x"?void 0:null,...m}){return Yo(zx,t,`${t}-axis tick`,n,{strokeWidth:r,strokeLinejoin:i,strokeLinecap:o,facetAnchor:a,frameAnchor:f,x:p,...m,dy:e==="bottom"?+l-Bt-d:+l+Bt+ +s,anchor:"start",length:u,shape:e==="bottom"?b5:w5})}function x5(t,e,n,{facetAnchor:r=e+(t==="y"?"-empty":""),frameAnchor:o=e,tickSize:i,tickRotate:a=0,tickPadding:f=Math.max(3,9-i)+(Math.abs(a)>60?4*Math.cos(a*ap):0),tickFormat:u,text:c=typeof u=="function"?u:void 0,textAnchor:s=Math.abs(a)>60?"middle":e==="left"?"end":"start",lineAnchor:d=a>60?"top":a<-60?"bottom":"middle",fontVariant:l,inset:p=0,insetLeft:m=p,insetRight:h=p,dx:g=0,y:b=t==="y"?void 0:null,...x}){return Yo(gp,t,`${t}-axis tick label`,n,{facetAnchor:r,frameAnchor:o,text:c===void 0?null:c,textAnchor:s,lineAnchor:d,fontVariant:l,rotate:a,y:b,...x,dx:e==="left"?+g-i-f+ +m:+g+ +i+ +f-h},function(M,y,w,v){l===void 0&&(this.fontVariant=Jx(M)),c===void 0&&(v.text=Qx(M,y,w,u,e))})}function y5(t,e,n,{facetAnchor:r=e+(t==="x"?"-empty":""),frameAnchor:o=e,tickSize:i,tickRotate:a=0,tickPadding:f=Math.max(3,9-i)+(Math.abs(a)>=10?4*Math.cos(a*ap):0),tickFormat:u,text:c=typeof u=="function"?u:void 0,textAnchor:s=Math.abs(a)>=10?a<0^e==="bottom"?"start":"end":"middle",lineAnchor:d=Math.abs(a)>=10?"middle":e==="bottom"?"top":"bottom",fontVariant:l,inset:p=0,insetTop:m=p,insetBottom:h=p,dy:g=0,x:b=t==="x"?void 0:null,...x}){return Yo(hp,t,`${t}-axis tick label`,n,{facetAnchor:r,frameAnchor:o,text:c===void 0?null:c,textAnchor:s,lineAnchor:d,fontVariant:l,rotate:a,x:b,...x,dy:e==="bottom"?+g+ +i+ +f-h:+g-i-f+ +m},function(M,y,w,v){l===void 0&&(this.fontVariant=Jx(M)),c===void 0&&(v.text=Qx(M,y,w,u,e))})}function Mp(){let[t,e]=jn(...arguments);return Vx("y",Bx(e),t,e)}function Sp(){let[t,e]=jn(...arguments);return Vx("fy",Ux(e),t,e)}function Tp(){let[t,e]=jn(...arguments);return jx("x",Xx(e),t,e)}function _p(){let[t,e]=jn(...arguments);return jx("fx",Hx(e),t,e)}function Vx(t,e,n,{y:r=t==="y"?void 0:null,x:o=null,x1:i=e==="left"?o:null,x2:a=e==="right"?o:null,...f}){return Yo(Ex,t,`${t}-grid`,n,{y:r,x1:i,x2:a,...Zx(f)})}function jx(t,e,n,{x:r=t==="x"?void 0:null,y:o=null,y1:i=e==="top"?o:null,y2:a=e==="bottom"?o:null,...f}){return Yo($x,t,`${t}-grid`,n,{x:r,y1:i,y2:a,...Zx(f)})}function Zx({color:t="currentColor",opacity:e=.1,stroke:n=t,strokeOpacity:r=e,strokeWidth:o=1,...i}){return{stroke:n,strokeOpacity:r,strokeWidth:o,...i}}function Kx({fill:t,fillOpacity:e,fontFamily:n,fontSize:r,fontStyle:o,fontWeight:i,monospace:a,pointerEvents:f,shapeRendering:u},c){return[,t]=ie(t),[,e]=It(e),{facet:"super",x:null,y:null,fill:t,fillOpacity:e,fontFamily:n,fontSize:r,fontStyle:o,fontWeight:i,monospace:a,pointerEvents:f,shapeRendering:u,initializer:c}}function Yo(t,e,n,r,o,i){let a;function f(s,d,l,p,m,h){let g=s==null&&(e==="fx"||e==="fy"),{[e]:b}=p;if(!b)throw new Error(`missing scale: ${e}`);let{ticks:x,tickSpacing:M,interval:y}=o;if(qc(b)&&typeof x=="string"&&(y=x,x=void 0),s==null){if(re(x))s=kt(x);else if(b.ticks)if(x!==void 0)s=b.ticks(x);else if(y=rn(y===void 0?b.interval:y,b.type),y!==void 0){let[v,T]=Ct(b.domain());s=y.range(v,y.offset(y.floor(T)))}else{let[v,T]=Ct(b.range());x=(T-v)/(M===void 0?e==="x"?80:35:M),s=b.ticks(x)}else s=b.domain();e==="y"||e==="x"?d=[ne(s)]:a[e]={scale:e,value:wt}}i?.call(this,b,s,x,a);let w=Object.fromEntries(Object.entries(a).map(([v,T])=>[v,{...T,value:gt(s,T.value)}]));return g&&(d=h.filterFacets(s,w)),{data:s,facets:d,channels:w}}let u=Er(o).initializer,c=t(r,Er({...o,initializer:f},u));return r==null?(a=c.channels,c.channels={}):a={},c.ariaLabel=n,c}function Qx(t,e,n,r,o){return{value:Bo(t,e,n,r,o)}}function Bo(t,e,n,r,o){return r===void 0&&qc(t)?Tg(t,e,n,o):t.tickFormat?t.tickFormat(re(n)?null:n,r):r===void 0?Mg(t.interval)?bn("%Y"):Sg(t.interval)?Un("%Y"):_e:typeof r=="string"?(Yt(t.domain())?bn:Ve)(r):Hn(r)}var b5={draw(t,e){t.moveTo(0,0),t.lineTo(0,e)}},w5={draw(t,e){t.moveTo(0,0),t.lineTo(0,-e)}},v5={draw(t,e){t.moveTo(0,0),t.lineTo(-e,0)}},M5={draw(t,e){t.moveTo(0,0),t.lineTo(e,0)}};function Jx(t){return t.bandwidth&&!t.interval?void 0:"tabular-nums"}function S5(t){return Math.sign(vn(t.domain()))*Math.sign(vn(t.range()))}function ty(t,e,{anchor:n,label:r=e.label,labelAnchor:o,labelArrow:i}={}){if(!(r==null||r.inferred&&T5(e)&&/^(date|time|year)$/i.test(r))){if(r=String(r),i==="auto"&&(i=(!e.bandwidth||e.interval)&&!/[↑↓→←]/.test(r)),!i)return r;if(i===!0){let a=S5(e);a&&(i=/x$/.test(t)||o==="center"?/x$/.test(t)===a<0?"left":"right":a<0?"up":"down")}switch(i){case"left":return`\u2190 ${r}`;case"right":return`${r} \u2192`;case"up":return n==="right"?`${r} \u2191`:`\u2191 ${r}`;case"down":return n==="right"?`${r} \u2193`:`\u2193 ${r}`}return r}}function ey(t="auto"){return Pt(t)?!1:typeof t=="boolean"?t:le(t,"labelArrow",["auto","up","right","down","left"])}function T5(t){return qc(t)||t.interval!=null}function ny(t,e){if(e==null)return e;let n=t(e);if(!n)throw new Error(`scale not found: ${e}`);return n}function ry(t,{opacity:e,...n}={}){if(!fn(t)&&!jd(t))throw new Error(`swatches legend requires ordinal or threshold color scale (not ${t.type})`);return iy(t,n,(r,o,i,a)=>r.append("svg").attr("width",i).attr("height",a).attr("fill",o.scale).attr("fill-opacity",It(e)[1]).append("rect").attr("width","100%").attr("height","100%"))}function oy(t,{fill:e=t.hint?.fill!==void 0?t.hint.fill:"none",fillOpacity:n=1,stroke:r=t.hint?.stroke!==void 0?t.hint.stroke:Pt(e)?"currentColor":"none",strokeOpacity:o=1,strokeWidth:i=1.5,r:a=4.5,...f}={},u){let[c,s]=ie(e),[d,l]=ie(r),p=ny(u,c),m=ny(u,d),h=a*a*Math.PI;return n=It(n)[1],o=It(o)[1],i=It(i)[1],iy(t,f,(g,b,x,M)=>g.append("svg").attr("viewBox","-8 -8 16 16").attr("width",x).attr("height",M).attr("fill",c==="color"?y=>p.scale(y):s).attr("fill-opacity",n).attr("stroke",d==="color"?y=>m.scale(y):l).attr("stroke-opacity",o).attr("stroke-width",i).append("path").attr("d",y=>{let w=Vr();return t.scale(y).draw(w,h),w}))}function iy(t,e={},n){let{columns:r,tickFormat:o,fontVariant:i=Hc(t),swatchSize:a=15,swatchWidth:f=a,swatchHeight:u=a,marginLeft:c=0,className:s,style:d,width:l}=e,p=Io(e);s=Po(s),typeof o!="function"&&(o=Bo(t.scale,t.domain,void 0,o));let m=yt("div",p).attr("class",`${s}-swatches ${s}-swatches-${r!=null?"columns":"wrap"}`),h;return r!=null?(h=`.${s}-swatches-columns .${s}-swatch { display: flex; align-items: center; break-inside: avoid; padding-bottom: 1px; } .${s}-swatches-columns .${s}-swatch::before { flex-shrink: 0; } .${s}-swatches-columns .${s}-swatch-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }`,m.style("columns",r).selectAll().data(t.domain).enter().append("div").attr("class",`${s}-swatch`).call(n,t,f,u).call(g=>g.append("div").attr("class",`${s}-swatch-label`).attr("title",o).text(o))):(h=`.${s}-swatches-wrap { display: flex; align-items: center; min-height: 33px; flex-wrap: wrap; } .${s}-swatches-wrap .${s}-swatch { display: inline-flex; align-items: center; margin-right: 1em; }`,m.selectAll().data(t.domain).enter().append("span").attr("class",`${s}-swatch`).call(n,t,f,u).append(function(){return this.ownerDocument.createTextNode(o.apply(this,arguments))})),m.call(g=>g.insert("style","*").text(`.${s}-swatches { font-family: system-ui, sans-serif; font-size: 10px; margin-bottom: 0.5em; } .${s}-swatch > svg { margin-right: 0.5em; overflow: visible; } ${h}`)).style("margin-left",c?`${+c}px`:null).style("width",l===void 0?null:`${+l}px`).style("font-variant",St(i,"normal")).call(Oo,d).node()}var Cp=new Map([["symbol",oy],["color",uy],["opacity",_5]]);function ay(t,e,n={}){return(r,o)=>{if(!Cp.has(r))throw new Error(`unknown legend type: ${r}`);if(r in t)return Cp.get(r)(t[r],fy(e,n[r],o),i=>t[i])}}function fy({className:t,...e},{label:n,ticks:r,tickFormat:o}={},i){return Xg(i,{className:t,...e},{label:n,ticks:r,tickFormat:o})}function uy(t,{legend:e=!0,...n}){if(e===!0&&(e=t.type==="ordinal"?"swatches":"ramp"),t.domain!==void 0)switch(`${e}`.toLowerCase()){case"swatches":return ry(t,n);case"ramp":return yx(t,n);default:throw new Error(`unknown legend type: ${e}`)}}function _5({type:t,interpolate:e,...n},{legend:r=!0,color:o=be(0,0,0),...i}){if(!e)throw new Error(`${t} opacity scales are not supported`);if(r===!0&&(r="ramp"),`${r}`.toLowerCase()!=="ramp")throw new Error(`${r} opacity legends are not supported`);return uy({type:t,...n,interpolate:C5(o)},{legend:r,...i})}function C5(t){let{r:e,g:n,b:r}=be(t)||be(0,0,0);return o=>`rgba(${e},${n},${r},${o})`}function cy(t,e,n){let r=[];for(let[o,i]of Cp){let a=n[o];if(a?.legend&&o in t){let f=i(t[o],fy(e,t[o],a),u=>t[u]);f!=null&&r.push(f)}}return r}var A5={ariaLabel:"frame",fill:"none",stroke:"currentColor"},$5={ariaLabel:"frame",fill:null,stroke:"currentColor",strokeLinecap:"square"},ts=class extends Nt{constructor(e={}){let{anchor:n=null,inset:r=0,insetTop:o=r,insetRight:i=r,insetBottom:a=r,insetLeft:f=r,rx:u,ry:c}=e;super(xo,void 0,e,n==null?A5:$5),this.anchor=_r(n,"anchor",["top","right","bottom","left"]),this.insetTop=ct(o),this.insetRight=ct(i),this.insetBottom=ct(a),this.insetLeft=ct(f),this.rx=ct(u),this.ry=ct(c)}render(e,n,r,o,i){let{marginTop:a,marginRight:f,marginBottom:u,marginLeft:c,width:s,height:d}=o,{anchor:l,insetTop:p,insetRight:m,insetBottom:h,insetLeft:g,rx:b,ry:x}=this,M=c+g,y=s-f-m,w=a+p,v=d-u-h;return yt(l?"svg:line":"svg:rect",i).datum(0).call(me,this,o,i).call(he,this).call(Oe,this,r).call(ge,this,{}).call(l==="left"?T=>T.attr("x1",M).attr("x2",M).attr("y1",w).attr("y2",v):l==="right"?T=>T.attr("x1",y).attr("x2",y).attr("y1",w).attr("y2",v):l==="top"?T=>T.attr("x1",M).attr("x2",y).attr("y1",w).attr("y2",w):l==="bottom"?T=>T.attr("x1",M).attr("x2",y).attr("y1",v).attr("y2",v):T=>T.attr("x",M).attr("y",w).attr("width",y-M).attr("height",v-w).attr("rx",b).attr("ry",x)).node()}};function Uo(t){return new ts(t)}var Ap={ariaLabel:"tip",fill:"white",stroke:"currentColor"},E5=new Set(["geometry","href","src","ariaLabel"]),Ep=class extends Nt{constructor(e,n={}){n.tip&&(n={...n,tip:!1}),n.title===void 0&&re(e)&&Nc(e)&&(n={...n,title:wt});let{x:r,y:o,x1:i,x2:a,y1:f,y2:u,anchor:c,monospace:s,fontFamily:d=s?"ui-monospace, monospace":void 0,fontSize:l,fontStyle:p,fontVariant:m,fontWeight:h,lineHeight:g=1,lineWidth:b=20,frameAnchor:x,textAnchor:M="start",textOverflow:y,textPadding:w=8,title:v,pointerSize:T=12,pathFilter:E="drop-shadow(0 3px 4px rgba(0,0,0,0.2))"}=n;super(e,{x:{value:i!=null&&a!=null?null:r,scale:"x",optional:!0},y:{value:f!=null&&u!=null?null:o,scale:"y",optional:!0},x1:{value:i,scale:"x",optional:a==null},y1:{value:f,scale:"y",optional:u==null},x2:{value:a,scale:"x",optional:i==null},y2:{value:u,scale:"y",optional:f==null},title:{value:v,optional:!0}},n,Ap),this.anchor=$d(c,"anchor"),this.previousAnchor=this.anchor??"top-left",this.frameAnchor=Mo(x),this.textAnchor=St(M,"middle"),this.textPadding=+w,this.pointerSize=+T,this.pathFilter=Et(E),this.lineHeight=+g,this.lineWidth=+b,this.textOverflow=mp(y),this.monospace=!!s,this.fontFamily=Et(d),this.fontSize=ct(l),this.fontStyle=Et(p),this.fontVariant=Et(m),this.fontWeight=Et(h);for(let I in Ap)I in this.channels&&(this[I]=Ap[I]);this.splitLines=yp(this),this.clipLine=bp(this)}render(e,n,r,o,i){let a=this,{x:f,y:u,fx:c,fy:s}=n,{ownerSVGElement:d,document:l}=i,{anchor:p,monospace:m,lineHeight:h,lineWidth:g}=this,{textPadding:b,pointerSize:x,pathFilter:M}=this,{marginTop:y,marginLeft:w}=o,v=D5(r),{x1:T,y1:E,x2:I,y2:F,x:_=T??I,y:R=E??F}=r,O=c?c(e.fx)-w:0,L=s?s(e.fy)-y:0,[S,A]=Gn(this,o),N=op(r,S),P=ip(r,A),D=m?Zc:jc,tt=D(Ir),Z=c&&Bo(c),W=s&&Bo(s);function*Q(G,X){if("title"in G){let $=G.title.value[X];for(let q of a.splitLines(_e($)))yield{name:"",value:a.clipLine(q)};return}for(let $ in G){if($==="x1"&&"x2"in G||$==="y1"&&"y2"in G)continue;let q=G[$],z=q.value[X];if(!(!Re(z)&&q.scale==null))if($==="x2"&&"x1"in G)yield{name:$p(n,q,"x"),value:sy(G.x1,q,X)};else if($==="y2"&&"y1"in G)yield{name:$p(n,q,"y"),value:sy(G.y1,q,X)};else{let C=q.scale,j={name:$p(n,q,$),value:_e(z)};(C==="color"||C==="opacity")&&(j[C]=r[$][X]),yield j}}e.fi!=null&&c&&(yield{name:String(c.label??"fx"),value:Z(e.fx)}),e.fi!=null&&s&&(yield{name:String(s.label??"fy"),value:W(e.fy)})}let at=yt("svg:g",i).call(me,this,o,i).call(xp,this).call(ge,this,{x:_&&f,y:R&&u}).call(G=>G.selectAll().data(e).enter().append("g").attr("transform",X=>`translate(${Math.round(N(X))},${Math.round(P(X))})`).call(he,this).call(X=>X.append("path").attr("filter",M)).call(X=>X.append("text").each(function($){let q=mn(this);this.setAttribute("fill","currentColor"),this.setAttribute("fill-opacity",1),this.setAttribute("stroke","none");let z=new Set;for(let C of Q(v,$)){let j=C.name;j&&z.has(j)||(z.add(j),Ut(q,C))}})));function Ut(G,{name:X,value:$,color:q,opacity:z}){let C=q!=null||z!=null,j,J=g*100,[ot]=kr(X,J,D,tt);if(ot>=0)X=X.slice(0,ot).trimEnd()+Ir,j=$.trim(),$="";else{(X||!$&&!C)&&($=" "+$);let[Xt]=kr($,J-D(X),D,tt);Xt>=0&&($=$.slice(0,Xt).trimEnd()+Ir,j=$.trim())}let lt=G.append("tspan").attr("x",0).attr("dy",`${h}em`).text("\u200B");X&<.append("tspan").attr("font-weight","bold").text(X),$&<.append(()=>l.createTextNode($)),C&<.append("tspan").text(" \u25A0").attr("fill",q).attr("fill-opacity",z).style("user-select","none"),j&<.append("title").text(j)}function Fe(){let{width:G,height:X}=o.facet??o;at.selectChildren().each(function($){let{x:q,width:z,height:C}=this.getBBox();z=Math.round(z),C=Math.round(C);let j=p;if(j===void 0){j=a.previousAnchor;let lt=N($)+O,Xt=P($)+L,Zn=lt+z+b*20,La=Xt+C+x+b*2+70,Oa=(/-left$/.test(j)?Zn||!Ra:Zn&&!Ra)?"left":"right",fs=(/^top-/.test(j)?La||!Pa:La&&!Pa)?"top":"bottom";j=a.previousAnchor=`${fs}-${Oa}`}let J=this.firstChild,ot=this.lastChild;if(J.setAttribute("d",N5(j,x,b,z,C)),q)for(let lt of ot.childNodes)lt.setAttribute("x",-q);ot.setAttribute("y",`${+I5(j,ot.childNodes.length,h).toFixed(6)}em`),ot.setAttribute("transform",`translate(${k5(j,x,b,z,C)})`)})}return d.isConnected?Promise.resolve().then(Fe):typeof requestAnimationFrame<"u"&&requestAnimationFrame(Fe),at.node()}};function ly(t,{x:e,y:n,...r}={}){return r.frameAnchor===void 0&&([e,n]=Ar(e,n)),new Ep(t,{...r,x:e,y:n})}function I5(t,e,n){return/^top(?:-|$)/.test(t)?.94-n:-.29-e*n}function k5(t,e,n,r,o){switch(t){case"middle":return[-r/2,o/2];case"top-left":return[n,e+n];case"top":return[-r/2,e/2+n];case"top-right":return[-r-n,e+n];case"right":return[-e/2-r-n,o/2];case"bottom-left":return[n,-e-n];case"bottom":return[-r/2,-e/2-n];case"bottom-right":return[-r-n,-e-n];case"left":return[n+e/2,o/2]}}function N5(t,e,n,r,o){let i=r+n*2,a=o+n*2;switch(t){case"middle":return`M${-i/2},${-a/2}h${i}v${a}h${-i}z`;case"top-left":return`M0,0l${e},${e}h${i-e}v${a}h${-i}z`;case"top":return`M0,0l${e/2},${e/2}h${(i-e)/2}v${a}h${-i}v${-a}h${(i-e)/2}z`;case"top-right":return`M0,0l${-e},${e}h${e-i}v${a}h${i}z`;case"right":return`M0,0l${-e/2},${-e/2}v${e/2-a/2}h${-i}v${a}h${i}v${e/2-a/2}z`;case"bottom-left":return`M0,0l${e},${-e}h${i-e}v${-a}h${-i}z`;case"bottom":return`M0,0l${e/2},${-e/2}h${(i-e)/2}v${-a}h${-i}v${a}h${(i-e)/2}z`;case"bottom-right":return`M0,0l${-e},${-e}h${e-i}v${-a}h${i}z`;case"left":return`M0,0l${e/2},${-e/2}v${e/2-a/2}h${i}v${a}h${-i}v${e/2-a/2}z`}}function D5({channels:t}){let e={};for(let n in t){if(E5.has(n))continue;let r=u1(t,n);r&&(e[n]=r)}return e}function sy(t,e,n){return e.hint?.length?`${_e(e.value[n]-t.value[n])}`:`${_e(t.value[n])}\u2013${_e(e.value[n])}`}function $p(t,e,n){return String(t[e.scale]?.label??e?.label??n)}function Na(t={}){let{facet:e,style:n,caption:r,ariaLabel:o,ariaDescription:i}=t,a=Po(t.className),f=t.marks===void 0?[]:dy(t.marks);f.push(...q5(f));let u=O5(e,t),c=new Map;for(let A of f){let N=py(A,u,t);N&&c.set(A,N)}let s=new Map;u&&ka(s,[u],t),ka(s,c,t);let d=dy(z5(f,s,t));for(let A of d){let N=py(A,u,t);N&&c.set(A,N)}f.unshift(...d);let l=cx(s,t);if(l!==void 0){let A=u?Xc(l,u):void 0;for(let P of f){if(P.facet===null||P.facet==="super")continue;let D=c.get(P);D!==void 0&&(D.facetsIndex=P.fx!=null||P.fy!=null?Xc(l,D):A)}let N=new Set;for(let{facetsIndex:P}of c.values())P?.forEach((D,tt)=>{D?.length>0&&N.add(tt)});l.forEach(0P.empty=!N.has(D):P=>P.empty=!1);for(let P of f)if(P.facet==="exclude"){let D=c.get(P);D!==void 0&&(D.facetsIndex=dx(D.facetsIndex))}}for(let A of st.keys())yo(t[A])&&A!=="fx"&&A!=="fy"&&s.set(A,[]);let p=new Map;for(let A of f){if(p.has(A))throw new Error("duplicate mark; each mark must be unique");let{facetsIndex:N,channels:P}=c.get(A)??{},{data:D,facets:tt,channels:Z}=A.initialize(N,P,t);Np(Z,t),p.set(A,{data:D,facets:tt,channels:Z})}let m=Aa(ka(s,p,t),t),h=Gd(m),g=fx(m,f,t);J1(m,g);let{fx:b,fy:x}=h,M=b||x?Vd(m,g):g,y=b||x?G5(h,g):g,w=Io(t),v=w.document,T=dn("svg").call(v.documentElement),E=T;w.ownerSVGElement=T,w.className=a,w.projection=d1(t,M),w.filterFacets=(A,N)=>Xc(l,{channels:N,groups:Bc(A,N)}),w.getMarkState=A=>{let N=p.get(A),P=c.get(A);return{...N,channels:{...N.channels,...P?.channels}}},w.dispatchValue=A=>{E.value!==A&&(E.value=A,E.dispatchEvent(new Event("input",{bubbles:!0})))};let I=new Set;for(let[A,N]of p)if(A.initializer!=null){let P=A.facet==="super"?y:M,D=A.initializer(N.data,N.facets,N.channels,h,P,w);if(D.data!==void 0&&(N.data=D.data),D.facets!==void 0&&(N.facets=D.facets),D.channels!==void 0){let{fx:tt,fy:Z,...W}=D.channels;P5(W),Object.assign(N.channels,W);for(let Q of Object.values(W)){let{scale:at}=Q;at!=null&&st.get(at)!==de&&(gy(Q,t),I.add(at))}(tt!=null||Z!=null)&&c.set(A,!0)}}if(I.size){let A=new Map;ka(A,p,t,D=>I.has(D)),ka(s,p,t,D=>I.has(D));let N=W5(Aa(A,t),m),P=Gd(N);Object.assign(m,N),Object.assign(h,P)}let F,_;l!==void 0&&(F={x:b?.domain(),y:x?.domain()},l=sx(l,F),_=lx(b,x,g));for(let[A,N]of p)N.values=A.scale(N.channels,h,w);let{width:R,height:O}=g;mn(T).attr("class",a).attr("fill","currentColor").attr("font-family","system-ui, sans-serif").attr("font-size",10).attr("text-anchor","middle").attr("width",R).attr("height",O).attr("viewBox",`0 0 ${R} ${O}`).attr("aria-label",o).attr("aria-description",i).call(A=>A.append("style").text(`.${a} { display: block; background: white; height: auto; height: intrinsic; max-width: 100%; } .${a} text, .${a} tspan { white-space: pre; }`)).call(Oo,n);for(let A of f){let{channels:N,values:P,facets:D}=p.get(A);if(l===void 0||A.facet==="super"){let tt=null;if(D&&(tt=D[0],tt=A.filter(tt,N,P),tt.length===0))continue;let Z=A.render(tt,h,P,y,w);if(Z==null)continue;T.appendChild(Z)}else{let tt;for(let Z of l){if(!(A.facetAnchor?.(l,F,Z)??!Z.empty))continue;let W=null;if(D){let at=c.has(A);if(W=D[at?Z.i:0],W=A.filter(W,N,P),W.length===0)continue;!at&&W===D[0]&&(W=Lg(W)),W.fx=Z.x,W.fy=Z.y,W.fi=Z.i}let Q=A.render(W,h,P,M,w);if(Q!=null){(tt??=mn(T).append("g")).append(()=>Q).datum(Z);for(let at of["aria-label","aria-description","aria-hidden","transform"])Q.hasAttribute(at)&&(tt.attr(at,Q.getAttribute(at)),Q.removeAttribute(at))}}tt?.selectChildren().attr("transform",_)}}let L=cy(m,w,t);if(r!=null||L.length>0){E=v.createElement("figure"),E.style.maxWidth="initial";for(let A of L)E.appendChild(A);if(E.appendChild(T),r!=null){let A=v.createElement("figcaption");A.appendChild(r?.ownerDocument?r:v.createTextNode(r)),E.appendChild(A)}}E.scale=nx(m),E.legend=ay(m,w,t);let S=c1();return S>0&&mn(T).append("text").attr("x",R).attr("y",20).attr("dy","-1em").attr("text-anchor","end").attr("font-family","initial").text("\u26A0\uFE0F").append("title").text(`${S.toLocaleString("en-US")} warning${S===1?"":"s"}. Please check the console.`),E}function R5({marks:t=[],...e}={}){return Na({...e,marks:[...t,this]})}Nt.prototype.plot=R5;function dy(t){return t.flat(1/0).filter(e=>e!=null).map(L5)}function L5(t){return typeof t.render=="function"?t:new kp(t)}var kp=class extends Nt{constructor(e){if(typeof e!="function")throw new TypeError("invalid mark; missing render function");super(),this.render=e}render(){}};function Np(t,e){for(let n in t)gy(t[n],e);return t}function gy(t,e){let{scale:n,transform:r=!0}=t;if(n==null||!r)return;let{type:o,percent:i,interval:a,transform:f=i?u=>u*100:Cd(a,o)}=e[n]??{};f!=null&&(t.value=pt(t.value,f),t.transform=!1)}function P5(t){for(let e in t)Fd(e,t[e])}function ka(t,e,n,r=$g){for(let{channels:o}of e.values())for(let i in o){let a=o[i],{scale:f}=a;if(f!=null&&r(f))if(f==="projection"){if(!g1(n)){let u=n.x?.domain===void 0,c=n.y?.domain===void 0;if(u||c){let[s,d]=y1(a);u&&Ip(t,"x",s),c&&Ip(t,"y",d)}}}else Ip(t,f,a)}return t}function Ip(t,e,n){let r=t.get(e);r!==void 0?r.push(n):t.set(e,[n])}function O5(t,e){if(t==null)return;let{x:n,y:r}=t;if(n==null&&r==null)return;let o=kt(t.data);if(o==null)throw new Error("missing facet data");let i={};n!=null&&(i.fx=Eo(o,{value:n,scale:"fx"})),r!=null&&(i.fy=Eo(o,{value:r,scale:"fy"})),Np(i,e);let a=Bc(o,i);return{channels:i,groups:a,data:t.data}}function py(t,e,n){if(t.facet===null||t.facet==="super")return;let{fx:r,fy:o}=t;if(r!=null||o!=null){let u=kt(t.data??r??o);if(u===void 0)throw new Error(`missing facet data in ${t.ariaLabel}`);if(u===null)return;let c={};return r!=null&&(c.fx=Eo(u,{value:r,scale:"fx"})),o!=null&&(c.fy=Eo(u,{value:o,scale:"fy"})),Np(c,n),{channels:c,groups:Bc(u,c)}}if(e===void 0)return;let{channels:i,groups:a,data:f}=e;if(t.facet!=="auto"||t.data===f)return{channels:i,groups:a};f.length>0&&(a.size>1||a.size===1&&i.fx&&i.fy&&[...a][0][1].size>1)&&kt(t.data)?.length===f.length&&an(`Warning: the ${t.ariaLabel} mark appears to use faceted data, but isn\u2019t faceted. The mark data has the same length as the facet data and the mark facet option is "auto", but the mark data and facet data are distinct. If this mark should be faceted, set the mark facet option to true; otherwise, suppress this warning by setting the mark facet option to false.`)}function F5(t,e={}){return Er({...e,x:null,y:null},(n,r,o,i,a,f)=>f.getMarkState(t))}function q5(t){let e=[];for(let n of t){let r=n.tip;if(r){let i=(r==="x"?gx:r==="y"?xx:hx)(F5(n));i.title=null,e.push(ly(n.data,i))}}return e}function z5(t,e,n){let{projection:r,x:o={},y:i={},fx:a={},fy:f={},axis:u,grid:c,facet:s={},facet:{axis:d=u,grid:l}=s,x:{axis:p=u,grid:m=p===null?null:c}=o,y:{axis:h=u,grid:g=h===null?null:c}=i,fx:{axis:b=d,grid:x=b===null?null:l}=a,fy:{axis:M=d,grid:y=M===null?null:l}=f}=n;(r||!yo(o)&&!my("x",t))&&(p=m=null),(r||!yo(i)&&!my("y",t))&&(h=g=null),e.has("fx")||(b=x=null),e.has("fy")||(M=y=null),p===void 0&&(p=!rs(t,"x")),h===void 0&&(h=!rs(t,"y")),b===void 0&&(b=!rs(t,"fx")),M===void 0&&(M=!rs(t,"fy")),p===!0&&(p="bottom"),h===!0&&(h="left"),b===!0&&(b=p==="top"||p===null?"bottom":"top"),M===!0&&(M=h==="right"||h===null?"left":"right");let w=[];return ns(w,y,Sp,f),es(w,M,wp,"right","left",s,f),ns(w,x,_p,a),es(w,b,vp,"top","bottom",s,a),ns(w,g,Mp,i),es(w,h,Jc,"left","right",n,i),ns(w,m,Tp,o),es(w,p,Nr,"bottom","top",n,o),w}function es(t,e,n,r,o,i,a){if(!e)return;let f=Y5(e);a=B5(f?r:e,i,a);let{line:u}=a;(n===Jc||n===Nr)&&u&&!$r(u)&&t.push(Uo(U5(a))),t.push(n(a)),f&&t.push(n({...a,anchor:o,label:null}))}function ns(t,e,n,r){!e||$r(e)||t.push(n(X5(e,r)))}function Y5(t){return/^\s*both\s*$/i.test(t)}function B5(t,e,{line:n=e.line,ticks:r,tickSize:o,tickSpacing:i,tickPadding:a,tickFormat:f,tickRotate:u,fontVariant:c,ariaLabel:s,ariaDescription:d,label:l=e.label,labelAnchor:p,labelArrow:m=e.labelArrow,labelOffset:h}){return{anchor:t,line:n,ticks:r,tickSize:o,tickSpacing:i,tickPadding:a,tickFormat:f,tickRotate:u,fontVariant:c,ariaLabel:s,ariaDescription:d,label:l,labelAnchor:p,labelArrow:m,labelOffset:h}}function U5(t){let{anchor:e,line:n}=t;return{anchor:e,facetAnchor:e+"-empty",stroke:n===!0?void 0:n}}function X5(t,{stroke:e=vo(t)?t:void 0,ticks:n=H5(t)?t:void 0,tickSpacing:r,ariaLabel:o,ariaDescription:i}){return{stroke:e,ticks:n,tickSpacing:r,ariaLabel:o,ariaDescription:i}}function H5(t){switch(typeof t){case"number":return!0;case"string":return!vo(t)}return re(t)||typeof t?.range=="function"}function rs(t,e){let n=`${e}-axis `;return t.some(r=>r.ariaLabel?.startsWith(n))}function my(t,e){for(let n of e)for(let r in n.channels){let{scale:o}=n.channels[r];if(o===t||o==="projection")return!0}return!1}function W5(t,e){for(let n in t){let r=t[n],o=e[n];r.label===void 0&&o&&(r.label=o.label)}return t}function G5({fx:t,fy:e},n){let{marginTop:r,marginRight:o,marginBottom:i,marginLeft:a,width:f,height:u}=Fc(n),c=t&&hy(t),s=e&&hy(e);return{marginTop:e?s[0]:r,marginRight:t?f-c[1]:o,marginBottom:e?u-s[1]:i,marginLeft:t?c[0]:a,inset:{marginTop:n.marginTop,marginRight:n.marginRight,marginBottom:n.marginBottom,marginLeft:n.marginLeft},width:f,height:u}}function hy(t){let e=t.domain(),n=t(e[0]),r=t(e[e.length-1]);return r{let z=va(gt(X,x),q?.[M]),C=gt(X,E),j=gt(X,W),J=gt(X,Q),ot=t1(u,{z:C,fill:j,stroke:J}),lt=[],Xt=[],Zn=z&&w([]),Ra=C&&Z([]),La=j&&Ut([]),Pa=J&&G([]),Oa=t&&d([]),fs=t&&p([]),Pp=e&&h([]),Ny=e&&b([]),Dy=n3(t?.(X),e?.(X)),Ry=0;for(let Dr of u)Dr.initialize(X);a&&a.initialize(X),i&&i.initialize(X);for(let Dr of $){let Op=[];for(let Xo of u)Xo.scope("facet",Dr);a&&a.scope("facet",Dr),i&&i.scope("facet",Dr);for(let[Xo,Ly]of Rd(Dr,ot))for(let[Py,Oy]of Rd(Ly,z))for(let[Kn,Qn]of Dy(Oy))if(!(i&&!i.reduce(Kn,Qn))){Op.push(Ry++),Xt.push(o.reduceIndex(Kn,X,Qn)),z&&Zn.push(Py),C&&Ra.push(ot===C?Xo:C[Kn[0]]),j&&La.push(ot===j?Xo:j[Kn[0]]),J&&Pa.push(ot===J?Xo:J[Kn[0]]),Oa&&(Oa.push(Qn.x1),fs.push(Qn.x2)),Pp&&(Pp.push(Qn.y1),Ny.push(Qn.y2));for(let Fy of u)Fy.reduce(Kn,Qn);a&&a.reduce(Kn)}lt.push(Op)}return e1(lt,a,f),{data:Xt,facets:lt}}),...!Sa(u,"x")&&(s?{x1:s,x2:l,x:wa(s,l)}:{x:v,x1:_,x2:R}),...!Sa(u,"y")&&(m?{y1:m,y2:g,y:wa(m,g)}:{y:T,y1:O,y2:L}),...y&&{[M]:y},...Object.fromEntries(u.map(({name:X,output:$})=>[X,$]))}}function j5({cumulative:t,domain:e,thresholds:n,interval:r,...o},i){return[o,{cumulative:t,domain:e,thresholds:n,interval:r,...i}]}function Z5(t,{cumulative:e,domain:n,thresholds:r,interval:o},i){return t={...on(t)},t.domain===void 0&&(t.domain=n),t.cumulative===void 0&&(t.cumulative=e),t.thresholds===void 0&&(t.thresholds=r),t.interval===void 0&&(t.interval=o),t.value===void 0&&(t.value=i),t.thresholds=K5(t.thresholds,t.interval),t}function xy(t){if(t==null)return;let{value:e,cumulative:n,domain:r=Ct,thresholds:o}=t,i=a=>{let f=gt(a,e),u;if(Yt(f)||t3(o)){f=pt(f,Sd,Float64Array);let[s,d]=typeof r=="function"?r(f):r,l=typeof o=="function"&&!Da(o)?o(f,s,d):o;typeof l=="number"&&(l=Wi(s,d,l)),Da(l)&&(r===Ct&&(s=l.floor(s),d=l.offset(l.floor(d))),l=l.range(s,l.offset(d))),u=l}else{f=Tr(f);let[s,d]=typeof r=="function"?r(f):r,l=typeof o=="function"&&!Da(o)?o(f,s,d):o;if(typeof l=="number")if(r===Ct){let p=tr(s,d,l);if(isFinite(p))if(p>0){let m=Math.round(s/p),h=Math.round(d/p);m*p<=s||--m,h*p>d||++h;let g=h-m+1;l=new Float64Array(g);for(let b=0;bd||++h;let g=h-m+1;l=new Float64Array(g);for(let b=0;b0?r3:Rp)(c,u,f),c};return i.label=Le(e),i}function K5(t,e,n=yy){if(t===void 0)return e===void 0?n:rn(e);if(typeof t=="string"){switch(t.toLowerCase()){case"freedman-diaconis":return Ha;case"scott":return Zo;case"sturges":return Ya;case"auto":return yy}return $c(t)}return t}function Q5(t,e){return Jg(t,e,by)}function by(t,e,n){return Nd(t,e,n,wy)}function wy(t,e,n){return Dd(t,e,n,vy)}function vy(t,e){return Ta(t,e,J5)}function J5(t){switch(`${t}`.toLowerCase()){case"x":return i3;case"x1":return f3;case"x2":return u3;case"y":return a3;case"y1":return c3;case"y2":return s3}throw new Error(`invalid bin reduce: ${t}`)}function yy(t,e,n){return Math.min(200,Zo(t,e,n))}function t3(t){return e3(t)||re(t)&&Yt(t)}function e3(t){return Da(t)&&typeof t=="function"&&t()instanceof Date}function Da(t){return typeof t?.range=="function"}function n3(t,e){return t&&e?function*(n){let r=t.bin(n);for(let[o,[i,a]]of t.entries()){let f=e.bin(r[o]);for(let[u,[c,s]]of e.entries())yield[f[u],{x1:i,y1:c,x2:a,y2:s}]}}:t?function*(n){let r=t.bin(n);for(let[o,[i,a]]of t.entries())yield[r[o],{x1:i,x2:a}]}:function*(n){let r=e.bin(n);for(let[o,[i,a]]of e.entries())yield[r[o],{y1:i,y2:a}]}}function Rp(t,e,n){return e=Tr(e),r=>{let o=t.map(()=>[]);for(let i of r)o[un(e,n[i])-1]?.push(i);return o}}function r3(t,e,n){let r=Rp(t,e,n);return o=>{let i=r(o);for(let a=1,f=i.length;a{let i=r(o);for(let a=i.length-2;a>=0;--a){let f=i[a+1],u=i[a];for(let c of f)u.push(c)}return i}}function My(t,e){let n=(+t+ +e)/2;return t instanceof Date?new Date(n):n}var i3={reduceIndex(t,e,{x1:n,x2:r}){return My(n,r)}},a3={reduceIndex(t,e,{y1:n,y2:r}){return My(n,r)}},f3={reduceIndex(t,e,{x1:n}){return n}},u3={reduceIndex(t,e,{x2:n}){return n}},c3={reduceIndex(t,e,{y1:n}){return n}},s3={reduceIndex(t,e,{y2:n}){return n}};function Sy(t={}){return Td(t)?t:{...t,y:wt}}function l3(t={},e={}){arguments.length===1&&([t,e]=d3(t));let{x1:n,x:r=n,y:o,...i}=e,[a,f,u,c]=m3(r,o,"x","y",t,i);return{...a,x1:n,x:f,y1:u,y2:c,y:wa(u,c)}}function Cy({y:t,y1:e,y2:n,...r}={}){return r=Ea(r,"x"),e===void 0&&n===void 0?l3({y:t,...r}):([e,n]=Dg(t,e,n),{...r,y1:e,y2:n})}function d3(t){let{offset:e,order:n,reverse:r,...o}=t;return[{offset:e,order:n,reverse:r},o]}var p3={length:!0};function m3(t,e=Ag,n,r,{offset:o,order:i,reverse:a},f){let u=Rg(f),[c,s]=Te(t),[d,l]=wo(e),[p,m]=wo(e);return d.hint=p.hint=p3,o=h3(o),i=y3(i,o,r),[$o(f,(h,g,b)=>{let x=t==null?void 0:s(va(gt(h,t),b?.[n])),M=gt(h,e,Float64Array),y=gt(h,u),w=i&&i(h,x,M,y),v=h.length,T=l(new Float64Array(v)),E=m(new Float64Array(v)),I=[];for(let F of g){let _=x?Array.from(cn(F,R=>x[R]).values()):[F];if(w)for(let R of _)R.sort(w);for(let R of _){let O=0,L=0;a&&R.reverse();for(let S of R){let A=M[S];A<0?O=E[S]=(T[S]=O)+A:A>0?L=E[S]=(T[S]=L)+A:E[S]=T[S]=L}}I.push(_)}return o&&o(I,T,E,y),{data:h,facets:g}}),c,d,p]}function h3(t){if(t!=null){if(typeof t=="function")return t;switch(`${t}`.toLowerCase()){case"expand":case"normalize":return g3;case"center":case"silhouette":return x3;case"wiggle":return $y}throw new Error(`unknown offset: ${t}`)}}function Ay(t,e){let n=0,r=0;for(let o of t){let i=e[o];ir&&(r=i)}return[n,r]}function g3(t,e,n){for(let r of t)for(let o of r){let[i,a]=Ay(o,n);for(let f of o){let u=1/(a-i||1);e[f]=u*(e[f]-i),n[f]=u*(n[f]-i)}}}function x3(t,e,n){for(let r of t){for(let o of r){let[i,a]=Ay(o,n);for(let f of o){let u=(a+i)/2;e[f]-=u,n[f]-=u}}Ey(r,e,n)}Iy(t,e,n)}function $y(t,e,n,r){for(let o of t){let i=new Qt,a=0;for(let f of o){let u=-1,c=f.map(p=>Math.abs(n[p]-e[p])),s=f.map(p=>{u=r?r[p]:++u;let m=n[p]-e[p],h=i.has(u)?m-i.get(u):0;return i.set(u,m),h}),d=[0,...qa(s)];for(let p of f)e[p]+=a,n[p]+=a;let l=fe(c);l&&(a-=fe(c,(p,m)=>(s[m]/2+d[m])*p)/l)}Ey(o,e,n)}Iy(t,e,n)}function Ey(t,e,n){let r=Jt(t,o=>Jt(o,i=>e[i]));for(let o of t)for(let i of o)e[i]-=r,n[i]-=r}function Iy(t,e,n){let r=t.length;if(r===1)return;let o=t.map(f=>f.flat()),i=o.map(f=>(Jt(f,u=>e[u])+Ht(f,u=>n[u]))/2),a=Jt(i);for(let f=0;f(o,i)=>t(r[o],r[i])}function w3(t){return(e,n,r,o)=>(i,a)=>t(o[i],o[a])}function v3(t){return os(t,(e,n,r,o)=>Pr(ne(e),i=>fe(i,a=>r[a]),i=>o[i]))}function M3(t){return os(t,(e,n,r,o)=>Pr(ne(e),i=>n[jo(i,a=>r[a])],i=>o[i]))}function Ty(t){return os(t,(e,n,r,o)=>{let i=ne(e),a=Pr(i,d=>n[jo(d,l=>r[l])],d=>o[d]),f=Ae(i,d=>fe(d,l=>r[l]),d=>o[d]),u=[],c=[],s=0;for(let d of a)s<0?(s+=f.get(d),u.push(d)):(s-=f.get(d),c.push(d));return c.reverse().concat(u)})}function _y(t){return e=>{let n=gt(e,t);return(r,o)=>Kt(n[r],n[o])}}function S3(t){return e=>(n,r)=>t(e[n],e[r])}function T3(t){return os(Kt,()=>t)}function os(t,e){return(n,r,o,i)=>{if(!i)throw new Error("missing channel: z");let a=new Qt(e(n,r,o,i).map((f,u)=>[f,u]));return(f,u)=>t(a.get(i[f]),a.get(i[u]))}}var Lp=class extends Nt{constructor(e,n,r={},o){super(e,n,r,o);let{inset:i=0,insetTop:a=i,insetRight:f=i,insetBottom:u=i,insetLeft:c=i,rx:s,ry:d}=r;this.insetTop=ct(a),this.insetRight=ct(f),this.insetBottom=ct(u),this.insetLeft=ct(c),this.rx=St(s,"auto"),this.ry=St(d,"auto")}render(e,n,r,o,i){let{rx:a,ry:f}=this;return yt("svg:g",i).call(me,this,o,i).call(this._transform,this,n).call(u=>u.selectAll().data(e).enter().append("rect").call(he,this).attr("x",this._x(n,r,o)).attr("width",this._width(n,r,o)).attr("y",this._y(n,r,o)).attr("height",this._height(n,r,o)).call(et,"rx",a).call(et,"ry",f).call(Oe,this,r)).node()}_x(e,{x:n},{marginLeft:r}){let{insetLeft:o}=this;return n?i=>n[i]+o:r+o}_y(e,{y:n},{marginTop:r}){let{insetTop:o}=this;return n?i=>n[i]+o:r+o}_width({x:e},{x:n},{marginRight:r,marginLeft:o,width:i}){let{insetLeft:a,insetRight:f}=this,u=n&&e?e.bandwidth():i-r-o;return Math.max(0,u-a-f)}_height({y:e},{y:n},{marginTop:r,marginBottom:o,height:i}){let{insetTop:a,insetBottom:f}=this,u=n&&e?e.bandwidth():i-r-o;return Math.max(0,u-a-f)}},_3={ariaLabel:"bar"};var is=class extends Lp{constructor(e,n={}){let{x:r,y1:o,y2:i}=n;super(e,{y1:{value:o,scale:"y"},y2:{value:i,scale:"y"},x:{value:r,scale:"x",type:"band",optional:!0}},n,_3)}_transform(e,n,{y:r}){e.call(ge,n,{y:r},0,0)}_y({y:e},{y1:n,y2:r},{marginTop:o}){let{insetTop:i}=this;return Wn(e)?o+i:a=>Math.min(n[a],r[a])+i}_height({y:e},{y1:n,y2:r},{marginTop:o,marginBottom:i,height:a}){let{insetTop:f,insetBottom:u}=this;return Wn(e)?a-o-i-f-u:c=>Math.max(0,Math.abs(r[c]-n[c])-f-u)}};function as(t,e={}){return Ng(e)||(e={...e,x:Ec,y2:wt}),new is(t,Cy(Gc(Sy(e))))}function ky(t){let e=t.querySelectorAll(".js-Tree-heading"),n=()=>{let o=[];for(let u of e){let c=u.getBoundingClientRect();c.height&&c.top<80&&o.unshift(u)}o.length==0&&e[0]instanceof HTMLHeadingElement&&(o=[e[0]]);let i=1/0,a=[];for(let u of o){let c=Number(u.tagName[1]);c{clearTimeout(n),n=setTimeout(()=>t(...r),e)}}for(let t of Page.Charts?.Programs||[])for(let e of t?.Charts||[])switch(e.Type){case"partition":document.querySelector(`[data-chart-id="${e.ID}"]`)?.append($3(e));break;case"histogram":document.querySelector(`[data-chart-id="${e.ID}"]`)?.append(E3(e));break;default:console.error("unknown chart type");break}for(let t of document.querySelectorAll(".js-Tree"))ky(t);function $3({Data:t,Name:e}){t??=[];let n=t.map(r=>r.Value).reduce((r,o)=>Math.max(r,o),0);return Na({color:{type:"categorical",scheme:"set2"},nice:!0,x:{label:e,labelOffset:Number.MAX_SAFE_INTEGER,tickRotate:45,domain:t.map(r=>r.Key)},y:{label:"Reports",domain:[0,n+1]},width:1024,style:{overflow:"visible",background:"transparent",marginBottom:"3rem",fontSize:"0.8rem",marginTop:"1rem"},insetTop:20,marks:[as(t,{tip:!0,fill:r=>isNaN(Number(r.Key))?r.Key:Number(r.Key),x:r=>r.Key,y:r=>r.Value}),Uo()]})}function E3({Data:t}){t??=[];let e=3,n=f=>isNaN(Number(f))?f:Number(f),r=Array.from(ja(t.map(f=>n(f.Key)))),o=new Map(r.map((f,u)=>[f,u])),i=f=>(o.get(f)??0)%e,a=f=>Math.floor((o.get(f)??0)/e);return Na({marginLeft:60,width:1024,grid:!0,nice:!0,x:{label:"Distribution"},color:{type:"ordinal",legend:!0,scheme:"Spectral",label:"Counter"},y:{insetTop:16,domain:[0,1]},fx:{ticks:[]},fy:{ticks:[]},style:"background:transparent;",marks:[as(t,Dp({y:"proportion-facet",x:"x1",interval:.1,cumulative:1},{tip:!0,fill:f=>n(f.Key),x:f=>f.Value,fx:f=>i(n(f.Key)),fy:f=>a(n(f.Key))})),qo(r,{frameAnchor:"top",dy:3,fx:i,fy:a}),Nr({anchor:"bottom",tickSpacing:35}),Nr({anchor:"top",tickSpacing:35}),Uo()]})}})(); /** * @license * Copyright 2024 The Go Authors. All rights reserved. * Use of this source code is governed by a BSD-style * license that can be found in the LICENSE file. */ /** * @license * Copyright 2023 The Go Authors. All rights reserved. * Use of this source code is governed by a BSD-style * license that can be found in the LICENSE file. */ //# sourceMappingURL=charts.min.js.map