PageSourceSearch

https://chat.lindy.ai/assets/vega-embed.module-C3fE6OkY.js

js lindy.ai collected 2026-09-24 18:03:31 UTC 789,362 bytes, 203 lines download raw bytes

1import{a2 as oF,a3 as c6,a4 as f6,a5 as d6,a6 as h6,a7 as aF,a8 as uF,a9 as p6,aa as YE,ab as kt,t as g6,c as qs,a as Oi,ac as qg,ad as KE,b as Xr,p as JE,s as ba,ae as Ft,af as QE,ag as m6,ah as y6,ai as lF,aj as Ed,ak as Ad,al as cF,am as fF,an as b6,ao as x6,ap as Vf,aq as dF,ar as ZE,as as v6,at as E6,au as A6,av as Xf,aw as hF,ax as eA,ay as w6,az as S6,aA as C6,aB as tA,aC as $6,aD as F6,aE as _6,aF as k6,aG as D6,aH as R6,aI as O6,aJ as T6,aK as M6,y as N6,A as L6,B as P6,C as I6,K as B6,L as z6,N as U6,O as j6,F as pF,G as q6,H as W6,I as G6,J as H6,m as V6,u as X6,v as Y6,w as K6,x as J6,D as Q6,E as Z6,M as e8,o as gF,P as t8,T as n8,U as i8,V as r8,W as s8,Y as o8,X as a8,_ as u8,Z as l8,a0 as c8,a1 as f8,$ as d8,R as h8,Q as mF,aL as Ny,S as p8,z as g8,r as xa,aM as m8}from"./diverging-C1SZqrmz.js";import{R as Gh,r as yF,e as Ly,f as Py,C as Iy,g as nA,h as iA,j as Hh,k as _m,n as Tt,l as y8,m as b8,i as x8,a as v8,o as E8,p as A8,b as w8,q as wd}from"./string-DIqgPFIh.js";import{a as S8,i as C8,b as $8,T as F8,n as _8,t as k8,d as D8}from"./timer-BU0aTmFO.js";const bF=Math.PI/180,xF=180/Math.PI,Sd=18,vF=.96422,EF=1,AF=.82521,wF=4/29,Fa=6/29,SF=3*Fa*Fa,R8=Fa*Fa*Fa;function CF(e){if(e instanceof Wi)return new Wi(e.l,e.a,e.b,e.opacity);if(e instanceof Cr)return $F(e);e instanceof Gh||(e=yF(e));var t=Vg(e.r),n=Vg(e.g),i=Vg(e.b),r=Wg((.2225045*t+.7168786*n+.0606169*i)/EF),s,o;return t===n&&n===i?s=o=r:(s=Wg((.4360747*t+.3850649*n+.1430804*i)/vF),o=Wg((.0139322*t+.0971045*n+.7141733*i)/AF)),new Wi(116*r-16,500*(s-r),200*(r-o),e.opacity)}function Cd(e,t,n,i){return arguments.length===1?CF(e):new Wi(e,t,n,i??1)}function Wi(e,t,n,i){this.l=+e,this.a=+t,this.b=+n,this.opacity=+i}Ly(Wi,Cd,Py(Iy,{brighter(e){return new Wi(this.l+Sd*(e??1),this.a,this.b,this.opacity)},darker(e){return new Wi(this.l-Sd*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=vF*Gg(t),e=EF*Gg(e),n=AF*Gg(n),new Gh(Hg(3.1338561*t-1.6168667*e-.4906146*n),Hg(-.9787684*t+1.9161415*e+.033454*n),Hg(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function Wg(e){return e>R8?Math.pow(e,1/3):e/SF+wF}function Gg(e){return e>Fa?e*e*e:SF*(e-wF)}function Hg(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Vg(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function O8(e){if(e instanceof Cr)return new Cr(e.h,e.c,e.l,e.opacity);if(e instanceof Wi||(e=CF(e)),e.a===0&&e.b===0)return new Cr(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*xF;return new Cr(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function $d(e,t,n,i){return arguments.length===1?O8(e):new Cr(e,t,n,i??1)}function Cr(e,t,n,i){this.h=+e,this.c=+t,this.l=+n,this.opacity=+i}function $F(e){if(isNaN(e.h))return new Wi(e.l,0,0,e.opacity);var t=e.h*bF;return new Wi(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Ly(Cr,$d,Py(Iy,{brighter(e){return new Cr(this.h,this.c,this.l+Sd*(e??1),this.opacity)},darker(e){return new Cr(this.h,this.c,this.l-Sd*(e??1),this.opacity)},rgb(){return $F(this).rgb()}}));var FF=-.14861,By=1.78277,zy=-.29227,Vh=-.90649,Bl=1.97294,rA=Bl*Vh,sA=Bl*By,oA=By*zy-Vh*FF;function T8(e){if(e instanceof lo)return new lo(e.h,e.s,e.l,e.opacity);e instanceof Gh||(e=yF(e));var t=e.r/255,n=e.g/255,i=e.b/255,r=(oA*i+rA*t-sA*n)/(oA+rA-sA),s=i-r,o=(Bl*(n-r)-zy*s)/Vh,a=Math.sqrt(o*o+s*s)/(Bl*r*(1-r)),u=a?Math.atan2(o,s)*xF-120:NaN;return new lo(u<0?u+360:u,a,r,e.opacity)}function km(e,t,n,i){return arguments.length===1?T8(e):new lo(e,t,n,i??1)}function lo(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}Ly(lo,km,Py(Iy,{brighter(e){return e=e==null?iA:Math.pow(iA,e),new lo(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?nA:Math.pow(nA,e),new lo(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*bF,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),i=Math.cos(e),r=Math.sin(e);return new Gh(255*(t+n*(FF*i+By*r)),255*(t+n*(zy*i+Vh*r)),255*(t+n*(Bl*i)),this.opacity)}}));function M8(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function N8(e,t){var n=Hh(+e,+t);return function(i){var r=n(i);return r-360*Math.floor(r/360)}}function _F(e){return function(t,n){var i=e((t=_m(t)).h,(n=_m(n)).h),r=Tt(t.s,n.s),s=Tt(t.l,n.l),o=Tt(t.opacity,n.opacity);return function(a){return t.h=i(a),t.s=r(a),t.l=s(a),t.opacity=o(a),t+""}}}const L8=_F(Hh);var P8=_F(Tt);function I8(e,t){var n=Tt((e=Cd(e)).l,(t=Cd(t)).l),i=Tt(e.a,t.a),r=Tt(e.b,t.b),s=Tt(e.opacity,t.opacity);return function(o){return e.l=n(o),e.a=i(o),e.b=r(o),e.opacity=s(o),e+""}}function kF(e){return function(t,n){var i=e((t=$d(t)).h,(n=$d(n)).h),r=Tt(t.c,n.c),s=Tt(t.l,n.l),o=Tt(t.opacity,n.opacity);return function(a){return t.h=i(a),t.c=r(a),t.l=s(a),t.opacity=o(a),t+""}}}const B8=kF(Hh);var z8=kF(Tt);function DF(e){return function t(n){n=+n;function i(r,s){var o=e((r=km(r)).h,(s=km(s)).h),a=Tt(r.s,s.s),u=Tt(r.l,s.l),l=Tt(r.opacity,s.opacity);return function(c){return r.h=o(c),r.s=a(c),r.l=u(Math.pow(c,n)),r.opacity=l(c),r+""}}return i.gamma=t,i}(1)}const U8=DF(Hh);var j8=DF(Tt);function q8(e,t){for(var n=new Array(t),i=0;i<t;++i)n[i]=e(i/(t-1));return n}const W8=Object.freeze(Object.defineProperty({__proto__:null,interpolate:oF,interpolateArray:c6,interpolateBasis:y8,interpolateBasisClosed:b8,interpolateCubehelix:U8,interpolateCubehelixLong:j8,interpolateDate:f6,interpolateDiscrete:M8,interpolateHcl:B8,interpolateHclLong:z8,interpolateHsl:L8,interpolateHslLong:P8,interpolateHue:N8,interpolateLab:I8,interpolateNumber:x8,interpolateNumberArray:d6,interpolateObject:h6,interpolateRgb:v8,interpolateRgbBasis:E8,interpolateRgbBasisClosed:A8,interpolateRound:aF,interpolateString:w8,interpolateTransformCss:S8,interpolateTransformSvg:C8,interpolateZoom:$8,piecewise:uF,quantize:q8},Symbol.toStringTag,{value:"Module"}));function G8(e,t,n){var i=new F8,r=t;return t==null?(i.restart(e,t,n),i):(i._restart=i.restart,i.restart=function(s,o,a){o=+o,a=a==null?_8():+a,i._restart(function u(l){l+=r,i._restart(u,r+=o,a),s(l)},o,a)},i.restart(e,t,n),i)}function H8(e){return e.innerRadius}function V8(e){return e.outerRadius}function X8(e){return e.startAngle}function Y8(e){return e.endAngle}function K8(e){return e&&e.padAngle}function J8(e,t,n,i,r,s,o,a){var u=n-e,l=i-t,c=o-r,f=a-s,d=f*u-c*l;if(!(d*d<kt))return d=(c*(t-s)-f*(e-r))/d,[e+d*u,t+d*l]}
vendor: 10,472 bytes, line 1
1function cf(e,t,n,i,r,s,o){var a=e-n,u=t-i,l=(o?s:-s)/ba(a*a+u*u),c=l*u,f=-l*a,d=e+c,h=t+f,p=n+c,g=i+f,m=(d+p)/2,y=(h+g)/2,b=p-d,x=g-h,v=b*b+x*x,A=r-s,w=d*g-p*h,E=(x<0?-1:1)*ba(y6(0,A*A*v-w*w)),S=(w*x-b*E)/v,C=(-w*b-x*E)/v,F=(w*x+b*E)/v,k=(-w*b+x*E)/v,L=S-m,R=C-y,_=F-m,$=k-y;return L*L+R*R>_*_+$*$&&(S=F,C=k),{cx:S,cy:C,x01:-c,y01:-f,x11:S*(r/A-1),y11:C*(r/A-1)}}function Q8(){var e=H8,t=V8,n=Xr(0),i=null,r=X8,s=Y8,o=K8,a=null,u=p6(l);function l(){var c,f,d=+e.apply(this,arguments),h=+t.apply(this,arguments),p=r.apply(this,arguments)-YE,g=s.apply(this,arguments)-YE,m=KE(g-p),y=g>p;if(a||(a=c=u()),h<d&&(f=h,h=d,d=f),!(h>kt))a.moveTo(0,0);else if(m>g6-kt)a.moveTo(h*qs(p),h*Oi(p)),a.arc(0,0,h,p,g,!y),d>kt&&(a.moveTo(d*qs(g),d*Oi(g)),a.arc(0,0,d,g,p,y));else{var b=p,x=g,v=p,A=g,w=m,E=m,S=o.apply(this,arguments)/2,C=S>kt&&(i?+i.apply(this,arguments):ba(d*d+h*h)),F=qg(KE(h-d)/2,+n.apply(this,arguments)),k=F,L=F,R,_;if(C>kt){var $=QE(C/d*Oi(S)),D=QE(C/h*Oi(S));(w-=$*2)>kt?($*=y?1:-1,v+=$,A-=$):(w=0,v=A=(p+g)/2),(E-=D*2)>kt?(D*=y?1:-1,b+=D,x-=D):(E=0,b=x=(p+g)/2)}var P=h*qs(b),z=h*Oi(b),B=d*qs(A),Q=d*Oi(A);if(F>kt){var ue=h*qs(x),oe=h*Oi(x),he=d*qs(v),Pe=d*Oi(v),pe;if(m<JE)if(pe=J8(P,z,he,Pe,ue,oe,B,Q)){var un=P-pe[0],Tu=z-pe[1],ia=ue-pe[0],af=oe-pe[1],uf=1/Oi(m6((un*ia+Tu*af)/(ba(un*un+Tu*Tu)*ba(ia*ia+af*af)))/2),Mu=ba(pe[0]*pe[0]+pe[1]*pe[1]);k=qg(F,(d-Mu)/(uf-1)),L=qg(F,(h-Mu)/(uf+1))}else k=L=0}E>kt?L>kt?(R=cf(he,Pe,P,z,h,L,y),_=cf(ue,oe,B,Q,h,L,y),a.moveTo(R.cx+R.x01,R.cy+R.y01),L<F?a.arc(R.cx,R.cy,L,Ft(R.y01,R.x01),Ft(_.y01,_.x01),!y):(a.arc(R.cx,R.cy,L,Ft(R.y01,R.x01),Ft(R.y11,R.x11),!y),a.arc(0,0,h,Ft(R.cy+R.y11,R.cx+R.x11),Ft(_.cy+_.y11,_.cx+_.x11),!y),a.arc(_.cx,_.cy,L,Ft(_.y11,_.x11),Ft(_.y01,_.x01),!y))):(a.moveTo(P,z),a.arc(0,0,h,b,x,!y)):a.moveTo(P,z),!(d>kt)||!(w>kt)?a.lineTo(B,Q):k>kt?(R=cf(B,Q,ue,oe,d,-k,y),_=cf(P,z,he,Pe,d,-k,y),a.lineTo(R.cx+R.x01,R.cy+R.y01),k<F?a.arc(R.cx,R.cy,k,Ft(R.y01,R.x01),Ft(_.y01,_.x01),!y):(a.arc(R.cx,R.cy,k,Ft(R.y01,R.x01),Ft(R.y11,R.x11),!y),a.arc(0,0,d,Ft(R.cy+R.y11,R.cx+R.x11),Ft(_.cy+_.y11,_.cx+_.x11),y),a.arc(_.cx,_.cy,k,Ft(_.y11,_.x11),Ft(_.y01,_.x01),!y))):a.arc(0,0,d,A,v,y)}if(a.closePath(),c)return a=null,c+""||null}return l.centroid=function(){var c=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,f=(+r.apply(this,arguments)+ +s.apply(this,arguments))/2-JE/2;return[qs(f)*c,Oi(f)*c]},l.innerRadius=function(c){return arguments.length?(e=typeof c=="function"?c:Xr(+c),l):e},l.outerRadius=function(c){return arguments.length?(t=typeof c=="function"?c:Xr(+c),l):t},l.cornerRadius=function(c){return arguments.length?(n=typeof c=="function"?c:Xr(+c),l):n},l.padRadius=function(c){return arguments.length?(i=c==null?null:typeof c=="function"?c:Xr(+c),l):i},l.startAngle=function(c){return arguments.length?(r=typeof c=="function"?c:Xr(+c),l):r},l.endAngle=function(c){return arguments.length?(s=typeof c=="function"?c:Xr(+c),l):s},l.padAngle=function(c){return arguments.length?(o=typeof c=="function"?c:Xr(+c),l):o},l.context=function(c){return arguments.length?(a=c??null,l):a},l}function RF(e,t){this._basis=new lF(e),this._beta=t}RF.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var i=e[0],r=t[0],s=e[n]-i,o=t[n]-r,a=-1,u;++a<=n;)u=a/n,this._basis.point(this._beta*e[a]+(1-this._beta)*(i+u*s),this._beta*t[a]+(1-this._beta)*(r+u*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Z8=function e(t){function n(i){return t===1?new lF(i):new RF(i,t)}return n.beta=function(i){return e(+i)},n}(.85);function Fd(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function Uy(e,t){this._context=e,this._k=(1-t)/6}Uy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Fd(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Fd(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const e9=function e(t){function n(i){return new Uy(i,t)}return n.tension=function(i){return e(+i)},n}(0);function jy(e,t){this._context=e,this._k=(1-t)/6}jy.prototype={areaStart:Ed,areaEnd:Ed,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Fd(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const t9=function e(t){function n(i){return new jy(i,t)}return n.tension=function(i){return e(+i)},n}(0);function qy(e,t){this._context=e,this._k=(1-t)/6}qy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Fd(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const n9=function e(t){function n(i){return new qy(i,t)}return n.tension=function(i){return e(+i)},n}(0);function Wy(e,t,n){var i=e._x1,r=e._y1,s=e._x2,o=e._y2;if(e._l01_a>kt){var a=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,u=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*a-e._x0*e._l12_2a+e._x2*e._l01_2a)/u,r=(r*a-e._y0*e._l12_2a+e._y2*e._l01_2a)/u}if(e._l23_a>kt){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*l+e._x1*e._l23_2a-t*e._l12_2a)/c,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/c}e._context.bezierCurveTo(i,r,s,o,e._x2,e._y2)}function OF(e,t){this._context=e,this._alpha=t}OF.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Wy(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const i9=function e(t){function n(i){return t?new OF(i,t):new Uy(i,0)}return n.alpha=function(i){return e(+i)},n}(.5);function TF(e,t){this._context=e,this._alpha=t}TF.prototype={areaStart:Ed,areaEnd:Ed,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Wy(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const r9=function e(t){function n(i){return t?new TF(i,t):new jy(i,0)}return n.alpha=function(i){return e(+i)},n}(.5);function MF(e,t){this._context=e,this._alpha=t}MF.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Wy(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const s9=function e(t){function n(i){return t?new MF(i,t):new qy(i,0)}
1return n.alpha=function(i){return e(+i)},n}(.5);class en{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const n=this._partials;let i=0;for(let r=0;r<this._n&&r<32;r++){const s=n[r],o=t+s,a=Math.abs(t)<Math.abs(s)?t-(o-s):s-(o-t);a&&(n[i++]=a),t=o}return n[i]=t,this._n=i+1,this}valueOf(){const t=this._partials;let n=this._n,i,r,s,o=0;if(n>0){for(o=t[--n];n>0&&(i=o,r=t[--n],o=i+r,s=r-(o-i),!s););n>0&&(s<0&&t[n-1]<0||s>0&&t[n-1]>0)&&(r=s*2,i=o+r,r==i-o&&(o=i))}return o}}function*o9(e){for(const t of e)yield*t}function NF(e){return Array.from(o9(e))}function a9(e,...t){e=new Ad(e),t=t.map(u9);e:for(const n of e)for(const i of t)if(!i.has(n)){e.delete(n);continue e}return e}function u9(e){return e instanceof Ad?e:new Ad(e)}function l9(...e){const t=new Ad;for(const n of e)for(const i of n)t.add(i);return t}const c9=/("(?:[^\\"]|\\.)*")|[:,]/g;function Xg(e,t={}){const n=JSON.stringify([1],void 0,t.indent===void 0?2:t.indent).slice(2,-3),i=n===""?1/0:t.maxLength===void 0?80:t.maxLength;let{replacer:r}=t;return function s(o,a,u){o&&typeof o.toJSON=="function"&&(o=o.toJSON());const l=JSON.stringify(o,r);if(l===void 0)return l;const c=i-a.length-u;if(l.length<=c){const f=l.replace(c9,(d,h)=>h||`${d} `);if(f.length<=c)return f}if(r!=null&&(o=JSON.parse(l),r=void 0),typeof o=="object"&&o!==null){const f=a+n,d=[];let h=0,p,g;if(Array.isArray(o)){p="[",g="]";const{length:m}=o;for(;h<m;h++)d.push(s(o[h],f,h===m-1?0:1)||"null")}else{p="{",g="}";const m=Object.keys(o),{length:y}=m;for(;h<y;h++){const b=m[h],x=`${JSON.stringify(b)}: `,v=s(o[b],f,x.length+(h===y-1?0:1));v!==void 0&&d.push(x+v)}}if(d.length>0)return[p,n+d.join(`,
2${f}`),g].join(`
3${a}`)}return l}(e,"",0)}function wn(e,t,n){return e.fields=t||[],e.fname=n,e}function Ke(e){return e==null?null:e.fname}function Lt(e){return e==null?null:e.fields}function LF(e){return e.length===1?f9(e[0]):d9(e)}const f9=e=>function(t){return t[e]},d9=e=>{const t=e.length;return function(n){for(let i=0;i<t;++i)n=n[e[i]];return n}};function T(e){throw Error(e)}function nr(e){const t=[],n=e.length;let i=null,r=0,s="",o,a,u;e=e+"";function l(){t.push(s+e.substring(o,a)),s="",o=a+1}for(o=a=0;a<n;++a)if(u=e[a],u==="\\")s+=e.substring(o,a++),o=a;else if(u===i)l(),i=null,r=-1;else{if(i)continue;o===r&&u==='"'||o===r&&u==="'"?(o=a+1,i=u):u==="."&&!r?a>o?l():o=a+1:u==="["?(a>o&&l(),r=o=a+1):u==="]"&&(r||T("Access path missing open bracket: "+e),r>0&&l(),r=0,o=a+1)}return r&&T("Access path missing closing bracket: "+e),i&&T("Access path missing closing quote: "+e),a>o&&(a++,l()),t}function Vn(e,t,n){const i=nr(e);return e=i.length===1?i[0]:e,wn((n&&n.get||LF)(i),[e],t||e)}const pc=Vn("id"),jt=wn(e=>e,[],"identity"),rs=wn(()=>0,[],"zero"),cu=wn(()=>1,[],"one"),Xn=wn(()=>!0,[],"true"),Kr=wn(()=>!1,[],"false"),Gy=new Set(Object.getOwnPropertyNames(Object.prototype));function h9(e,t,n){const i=[t].concat([].slice.call(n));console[e].apply(console,i)}const PF=0,Hy=1,Vy=2,IF=3,BF=4;function Xy(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:h9,i=e||PF;return{level(r){return arguments.length?(i=+r,this):i},error(){return i>=Hy&&n(t||"error","ERROR",arguments),this},warn(){return i>=Vy&&n(t||"warn","WARN",arguments),this},info(){return i>=IF&&n(t||"log","INFO",arguments),this},debug(){return i>=BF&&n(t||"log","DEBUG",arguments),this}}}var I=Array.isArray;function X(e){return e===Object(e)}const aA=e=>e!=="__proto__";function fu(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((i,r)=>{for(const s in r)if(s==="signals")i.signals=p9(i.signals,r.signals);else{const o=s==="legend"?{layout:1}:s==="style"?!0:null;du(i,s,r[s],o)}return i},{})}function du(e,t,n,i){if(!aA(t))return;let r,s;if(X(n)&&!I(n)){s=X(e[t])?e[t]:e[t]={};for(r in n)i&&(i===!0||i[r])?du(s,r,n[r]):aA(r)&&(s[r]=n[r])}else e[t]=n}function p9(e,t){if(e==null)return t;const n={},i=[];function r(s){n[s.name]||(n[s.name]=1,i.push(s))}return t.forEach(r),e.forEach(r),i}function ve(e){return e[e.length-1]}function Mt(e){return e==null||e===""?null:+e}const zF=e=>t=>e*Math.exp(t),UF=e=>t=>Math.log(e*t),jF=e=>t=>
3Math.sign(t)*Math.log1p(Math.abs(t/e)),qF=e=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*e,_d=e=>t=>t<0?-Math.pow(-t,e):Math.pow(t,e);function Xh(e,t,n,i){const r=n(e[0]),s=n(ve(e)),o=(s-r)*t;return[i(r-o),i(s-o)]}function WF(e,t){return Xh(e,t,Mt,jt)}function GF(e,t){var n=Math.sign(e[0]);return Xh(e,t,UF(n),zF(n))}function HF(e,t,n){return Xh(e,t,_d(n),_d(1/n))}function VF(e,t,n){return Xh(e,t,jF(n),qF(n))}function Yh(e,t,n,i,r){const s=i(e[0]),o=i(ve(e)),a=t!=null?i(t):(s+o)/2;return[r(a+(s-a)*n),r(a+(o-a)*n)]}function Yy(e,t,n){return Yh(e,t,n,Mt,jt)}function Ky(e,t,n){const i=Math.sign(e[0]);return Yh(e,t,n,UF(i),zF(i))}function kd(e,t,n,i){return Yh(e,t,n,_d(i),_d(1/i))}function Jy(e,t,n,i){return Yh(e,t,n,jF(i),qF(i))}function XF(e){return 1+~~(new Date(e).getMonth()/3)}function YF(e){return 1+~~(new Date(e).getUTCMonth()/3)}function K(e){return e!=null?I(e)?e:[e]:[]}function KF(e,t,n){let i=e[0],r=e[1],s;return r<i&&(s=r,r=i,i=s),s=r-i,s>=n-t?[t,n]:[i=Math.min(Math.max(i,t),n-s),i+s]}function de(e){return typeof e=="function"}const g9="descending";function Qy(e,t,n){n=n||{},t=K(t)||[];const i=[],r=[],s={},o=n.comparator||m9;return K(e).forEach((a,u)=>{a!=null&&(i.push(t[u]===g9?-1:1),r.push(a=de(a)?a:Vn(a,null,n)),(Lt(a)||[]).forEach(l=>s[l]=1))}),r.length===0?null:wn(o(r,i),Object.keys(s))}const hu=(e,t)=>(e<t||e==null)&&t!=null?-1:(e>t||t==null)&&e!=null?1:(t=t instanceof Date?+t:t,(e=e instanceof Date?+e:e)!==e&&t===t?-1:t!==t&&e===e?1:0),m9=(e,t)=>e.length===1?y9(e[0],t[0]):b9(e,t,e.length),y9=(e,t)=>function(n,i){return hu(e(n),e(i))*t},b9=(e,t,n)=>(t.push(0),function(i,r){let s,o=0,a=-1;for(;o===0&&++a<n;)s=e[a],o=hu(s(i),s(r));return o*t[a]});function qt(e){return de(e)?e:()=>e}function Zy(e,t){let n;return i=>{n&&clearTimeout(n),n=setTimeout(()=>(t(i),n=null),e)}}function fe(e){for(let t,n,i=1,r=arguments.length;i<r;++i){t=arguments[i];for(n in t)e[n]=t[n]}return e}function Yi(e,t){let n=0,i,r,s,o;if(e&&(i=e.length))if(t==null){for(r=e[n];n<i&&(r==null||r!==r);r=e[++n]);for(s=o=r;n<i;++n)r=e[n],r!=null&&(r<s&&(s=r),r>o&&(o=r))}else{for(r=t(e[n]);n<i&&(r==null||r!==r);r=t(e[++n]));for(s=o=r;n<i;++n)r=t(e[n]),r!=null&&(r<s&&(s=r),r>o&&(o=r))}return[s,o]}function JF(e,t){const n=e.length;let i=-1,r,s,o,a,u;if(t==null){for(;++i<n;)if(s=e[i],s!=null&&s>=s){r=o=s;break}if(i===n)return[-1,-1];for(a=u=i;++i<n;)s=e[i],s!=null&&(r>s&&(r=s,a=i),o<s&&(o=s,u=i))}else{for(;++i<n;)if(s=t(e[i],i,e),s!=null&&s>=s){r=o=s;break}if(i===n)return[-1,-1];for(a=u=i;++i<n;)s=t(e[i],i,e),s!=null&&(r>s&&(r=s,a=i),o<s&&(o=s,u=i))}return[a,u]}function J(e,t){return Object.hasOwn(e,t)}const ff={};function pu(e){let t={},n;function i(s){return J(t,s)&&t[s]!==ff}const r={size:0,empty:0,object:t,has:i,get(s){return i(s)?t[s]:void 0},set(s,o){return i(s)||(++r.size,t[s]===ff&&--r.empty),t[s]=o,this},delete(s){return i(s)&&(--r.size,++r.empty,t[s]=ff),this},clear(){r.size=r.empty=0,r.object=t={}},test(s){return arguments.length?(n=s,r):n},clean(){const s={};let o=0;for(const a in t){const u=t[a];u!==ff&&(!n||!n(u))&&(s[a]=u,++o)}r.size=o,r.empty=0,r.object=t=s}};return e&&Object.keys(e).forEach(s=>{r.set(s,e[s])}),r}function QF(e,t,n,i,r,s){if(!n&&n!==0)return s;const o=+n;let a=e[0],u=ve(e),l;u<a&&(l=a,a=u,u=l),l=Math.abs(t-a);const c=Math.abs(u-t);return l<c&&l<=o?i:c<=o?r:s}function H(e,t,n){const i=e.prototype=Object.create(t.prototype);return Object.defineProperty(i,"constructor",{value:e,writable:!0,enumerable:!0,configurable:!0}),fe(i,n)}function va(e,t,n,i){let r=t[0],s=t[t.length-1],o;return r>s&&(o=r,r=s,s=o),n=n===void 0||n,i=i===void 0||i,(n?r<=e:r<e)&&(i?e<=s:e<s)}function Rs(e){return typeof e=="boolean"}function ps(e){return Object.prototype.toString.call(e)==="[object Date]"}function ZF(e){return e&&de(e[Symbol.iterator])}function Se(e){return typeof e=="number"}function eb(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function Y(e){return typeof e=="string"}function tb(e,t,n){e&&(e=t?K(e).map(a=>a.replace(/\\(.)/g,"$1")):K(e));const i=e&&e.length,r=n&&n.get||LF,s=a=>r(t?[a]:nr(a));let o;if(!i)o=function(){return""};else if(i===1){const a=s(e[0]);o=function(u){return""+a(u)}}else{const a=e.map(s);o=function(u){let l=""+a[0](u),c=0;for(;++c<i;)l+="|"+a[c](u);return l}}return wn(o,e,"key")}function e_(e,t){const n=e[0],i=ve(e),r=+t;return r?r===1?i:n+r*(i-n):n}const x9=1e4;function t_(e){e=+e||x9;let t,n,i;const r=()=>{t={},n={},i=0},s=(o,a)=>(++i>e&&(n=t,t={},i=1),t[o]=a);
3return r(),{clear:r,has:o=>J(t,o)||J(n,o),get:o=>J(t,o)?t[o]:J(n,o)?s(o,n[o]):void 0,set:(o,a)=>J(t,o)?t[o]=a:s(o,a)}}function n_(e,t,n,i){const r=t.length,s=n.length;if(!s)return t;if(!r)return n;const o=i||new t.constructor(r+s);let a=0,u=0,l=0;for(;a<r&&u<s;++l)o[l]=e(t[a],n[u])>0?n[u++]:t[a++];for(;a<r;++a,++l)o[l]=t[a];for(;u<s;++u,++l)o[l]=n[u];return o}function nl(e,t){let n="";for(;--t>=0;)n+=e;return n}function i_(e,t,n,i){const r=n||" ",s=e+"",o=t-s.length;return o<=0?s:i==="left"?nl(r,o)+s:i==="center"?nl(r,~~(o/2))+s+nl(r,Math.ceil(o/2)):s+nl(r,o)}function gc(e){return e&&ve(e)-e[0]||0}function G(e){return I(e)?"["+e.map(G)+"]":X(e)||Y(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}function nb(e){return e==null||e===""?null:!e||e==="false"||e==="0"?!1:!!e}const v9=e=>Se(e)||ps(e)?e:Date.parse(e);function ib(e,t){return t=t||v9,e==null||e===""?null:t(e)}function rb(e){return e==null||e===""?null:e+""}function mi(e){const t={},n=e.length;for(let i=0;i<n;++i)t[e[i]]=!0;return t}function r_(e,t,n,i){const r=i??"…",s=e+"",o=s.length,a=Math.max(0,t-r.length);return o<=t?s:n==="left"?r+s.slice(o-a):n==="center"?s.slice(0,Math.ceil(a/2))+r+s.slice(o-~~(a/2)):s.slice(0,a)+r}function Zr(e,t,n){if(e)if(t){const i=e.length;for(let r=0;r<i;++r){const s=t(e[r]);s&&n(s,r,e)}}else e.forEach(n)}var uA={},Yg={},Kg=34,Nu=10,Jg=13;function s_(e){return new Function("d","return {"+e.map(function(t,n){return JSON.stringify(t)+": d["+n+'] || ""'}).join(",")+"}")}function E9(e,t){var n=s_(e);return function(i,r){return t(n(i),r,e)}}function lA(e){var t=Object.create(null),n=[];return e.forEach(function(i){for(var r in i)r in t||n.push(t[r]=r)}),n}function ln(e,t){var n=e+"",i=n.length;return i<t?new Array(t-i+1).join(0)+n:n}function A9(e){return e<0?"-"+ln(-e,6):e>9999?"+"+ln(e,6):ln(e,4)}function w9(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),i=e.getUTCSeconds(),r=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":A9(e.getUTCFullYear())+"-"+ln(e.getUTCMonth()+1,2)+"-"+ln(e.getUTCDate(),2)+(r?"T"+ln(t,2)+":"+ln(n,2)+":"+ln(i,2)+"."+ln(r,3)+"Z":i?"T"+ln(t,2)+":"+ln(n,2)+":"+ln(i,2)+"Z":n||t?"T"+ln(t,2)+":"+ln(n,2)+"Z":"")}function S9(e){var t=new RegExp('["'+e+`
4\r]`),n=e.charCodeAt(0);function i(f,d){var h,p,g=r(f,function(m,y){if(h)return h(m,y-1);p=m,h=d?E9(m,d):s_(m)});return g.columns=p||[],g}function r(f,d){var h=[],p=f.length,g=0,m=0,y,b=p<=0,x=!1;f.charCodeAt(p-1)===Nu&&--p,f.charCodeAt(p-1)===Jg&&--p;function v(){if(b)return Yg;if(x)return x=!1,uA;var w,E=g,S;if(f.charCodeAt(E)===Kg){for(;g++<p&&f.charCodeAt(g)!==Kg||f.charCodeAt(++g)===Kg;);return(w=g)>=p?b=!0:(S=f.charCodeAt(g++))===Nu?x=!0:S===Jg&&(x=!0,f.charCodeAt(g)===Nu&&++g),f.slice(E+1,w-1).replace(/""/g,'"')}for(;g<p;){if((S=f.charCodeAt(w=g++))===Nu)x=!0;else if(S===Jg)x=!0,f.charCodeAt(g)===Nu&&++g;else if(S!==n)continue;return f.slice(E,w)}return b=!0,f.slice(E,p)}for(;(y=v())!==Yg;){for(var A=[];y!==uA&&y!==Yg;)A.push(y),y=v();d&&(A=d(A,m++))==null||h.push(A)}return h}function s(f,d){return f.map(function(h){return d.map(function(p){return c(h[p])}).join(e)})}function o(f,d){return d==null&&(d=lA(f)),[d.map(c).join(e)].concat(s(f,d)).join(`
5`)}function a(f,d){return d==null&&(d=lA(f)),s(f,d).join(`
6`)}function u(f){return f.map(l).join(`
7`)}function l(f){return f.map(c).join(e)}function c(f){return f==null?"":f instanceof Date?w9(f):t.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:i,parseRows:r,format:o,formatBody:a,formatRows:u,formatRow:l,formatValue:c}}function C9(e){return e}function $9(e){if(e==null)return C9;var t,n,i=e.scale[0],r=e.scale[1],s=e.translate[0],o=e.translate[1];return function(a,u){u||(t=n=0);var l=2,c=a.length,f=new Array(c);for(f[0]=(t+=a[0])*i+s,f[1]=(n+=a[1])*r+o;l<c;)f[l]=a[l],++l;return f}}function F9(e,t){for(var n,i=e.length,r=i-t;r<--i;)n=e[r],e[r++]=e[i],e[i]=n}function _9(e,t){return typeof t=="string"&&(t=e.objects[t]),t.type==="GeometryCollection"?{type:"FeatureCollection",features:t.geometries.map(function(n){return cA(e,n)})}:cA(e,t)}function cA(e,t){var n=t.id,i=t.bbox,r=t.properties==null?{}:t.properties,s=o_(e,t);return n==null&&i==null?{type:"Feature",properties:r,geometry:s}:i==null?{type:"Feature",id:n,properties:r,geometry:s}:{type:"Feature",id:n,bbox:i,properties:r,geometry:s}}function o_(e,t){var n=$9(e.transform),i=e.arcs;function r(c,f){f.length&&f.pop();for(var d=i[c<0?~c:c],h=0,p=d.length;h<p;++h)f.push(n(d[h],h));c<0&&F9(f,p)}function s(c){return n(c)}function o(c){for(var f=[],d=0,h=c.length;d<h;++d)r(c[d],f);
7return f.length<2&&f.push(f[0]),f}function a(c){for(var f=o(c);f.length<4;)f.push(f[0]);return f}function u(c){return c.map(a)}function l(c){var f=c.type,d;switch(f){case"GeometryCollection":return{type:f,geometries:c.geometries.map(l)};case"Point":d=s(c.coordinates);break;case"MultiPoint":d=c.coordinates.map(s);break;case"LineString":d=o(c.arcs);break;case"MultiLineString":d=c.arcs.map(o);break;case"Polygon":d=u(c.arcs);break;case"MultiPolygon":d=c.arcs.map(u);break;default:return null}return{type:f,coordinates:d}}return l(t)}function k9(e,t){var n={},i={},r={},s=[],o=-1;t.forEach(function(l,c){var f=e.arcs[l<0?~l:l],d;f.length<3&&!f[1][0]&&!f[1][1]&&(d=t[++o],t[o]=l,t[c]=d)}),t.forEach(function(l){var c=a(l),f=c[0],d=c[1],h,p;if(h=r[f])if(delete r[h.end],h.push(l),h.end=d,p=i[d]){delete i[p.start];var g=p===h?h:h.concat(p);i[g.start=h.start]=r[g.end=p.end]=g}else i[h.start]=r[h.end]=h;else if(h=i[d])if(delete i[h.start],h.unshift(l),h.start=f,p=r[f]){delete r[p.end];var m=p===h?h:p.concat(h);i[m.start=p.start]=r[m.end=h.end]=m}else i[h.start]=r[h.end]=h;else h=[l],i[h.start=f]=r[h.end=d]=h});function a(l){var c=e.arcs[l<0?~l:l],f=c[0],d;return e.transform?(d=[0,0],c.forEach(function(h){d[0]+=h[0],d[1]+=h[1]})):d=c[c.length-1],l<0?[d,f]:[f,d]}function u(l,c){for(var f in l){var d=l[f];delete c[d.start],delete d.start,delete d.end,d.forEach(function(h){n[h<0?~h:h]=1}),s.push(d)}}return u(r,i),u(i,r),t.forEach(function(l){n[l<0?~l:l]||s.push([l])}),s}function D9(e){return o_(e,R9.apply(this,arguments))}function R9(e,t,n){var i,r,s;if(arguments.length>1)i=O9(e,t,n);else for(r=0,i=new Array(s=e.arcs.length);r<s;++r)i[r]=r;return{type:"MultiLineString",arcs:k9(e,i)}}function O9(e,t,n){var i=[],r=[],s;function o(f){var d=f<0?~f:f;(r[d]||(r[d]=[])).push({i:f,g:s})}function a(f){f.forEach(o)}function u(f){f.forEach(a)}function l(f){f.forEach(u)}function c(f){switch(s=f,f.type){case"GeometryCollection":f.geometries.forEach(c);break;case"LineString":a(f.arcs);break;case"MultiLineString":case"Polygon":u(f.arcs);break;case"MultiPolygon":l(f.arcs);break}}return c(t),r.forEach(n==null?function(f){i.push(f[0].i)}:function(f){n(f[0].g,f[f.length-1].g)&&i.push(f[0].i)}),i}function gs(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function T9(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Kh(e){let t,n,i;e.length!==2?(t=gs,n=(a,u)=>gs(e(a),u),i=(a,u)=>e(a)-u):(t=e===gs||e===T9?e:M9,n=e,i=e);function r(a,u,l=0,c=a.length){if(l<c){if(t(u,u)!==0)return c;do{const f=l+c>>>1;n(a[f],u)<0?l=f+1:c=f}while(l<c)}return l}function s(a,u,l=0,c=a.length){if(l<c){if(t(u,u)!==0)return c;do{const f=l+c>>>1;n(a[f],u)<=0?l=f+1:c=f}while(l<c)}return l}function o(a,u,l=0,c=a.length){const f=r(a,u,l,c-1);return f>l&&i(a[f-1],u)>-i(a[f],u)?f-1:f}return{left:r,center:o,right:s}}function M9(){return 0}function a_(e){return e===null?NaN:+e}function*N9(e,t){if(t===void 0)for(let n of e)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(i=+i)>=i&&(yield i)}}const u_=Kh(gs),Dd=u_.right,L9=u_.left;Kh(a_).center;function P9(e,t){let n=0,i,r=0,s=0;if(t===void 0)for(let o of e)o!=null&&(o=+o)>=o&&(i=o-r,r+=i/++n,s+=i*(o-r));else{let o=-1;for(let a of e)(a=t(a,++o,e))!=null&&(a=+a)>=a&&(i=a-r,r+=i/++n,s+=i*(a-r))}if(n>1)return s/(n-1)}function I9(e,t){const n=P9(e,t);return n&&Math.sqrt(n)}function B9(e,t){return Array.from(t,n=>e[n])}function z9(e=gs){if(e===gs)return l_;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const i=e(t,n);return i||i===0?i:(e(n,n)===0)-(e(t,t)===0)}}function l_(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const U9=Math.sqrt(50),j9=Math.sqrt(10),q9=Math.sqrt(2);function c_(e,t,n){const i=(t-e)/Math.max(0,n),r=Math.floor(Math.log10(i)),s=i/Math.pow(10,r),o=s>=U9?10:s>=j9?5:s>=q9?2:1;let a,u,l;return r<0?(l=Math.pow(10,-r)/o,a=Math.round(e*l),u=Math.round(t*l),a/l<e&&++a,u/l>t&&--u,l=-l):(l=Math.pow(10,r)*o,a=Math.round(e/l),u=Math.round(t/l),a*l<e&&++a,u*l>t&&--u),u<a&&.5<=n&&n<2?c_(e,t,n*2):[a,u,l]}function fA(e,t,n){return t=+t,e=+e,n=+n,c_(e,t,n)[2]}function zl(e,t,n){t=+t,e=+e,n=+n;const i=t<e,r=i?fA(t,e,n):fA(e,t,n);return(i?-1:1)*(r<0?1/-r:r)}function co(e,t){let n;if(t===void 0)for(const i of e)i!=null&&(n<i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of e)(r=t(r,++i,e))!=null&&(n<r||n===void 0&&r>=r)&&(n=r)}return n}function Dm(e,t){let n;if(t===void 0)for(const i of e)i!=null&&(n>i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of e)(r=t(r,++i,e))!=null&&(n>r||n===void 0&&r>=r)&&(n=r)}return n}function f_(e,t,n=0,i=1/0,r){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),i=Math.floor(Math.min(e.length-1,i)),!(n<=t&&t<=i))return e;for(r=r===void 0?l_:z9(r);i>n;){if(i-n>600){const u=i-n+1,l=t-n+1,c=Math.log(u),f=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*f*(u-f)/u)*(l-u/2<0?-1:1),h=Math.max(n,Math.floor(t-l*f/u+d)),p=Math.min(i,Math.floor(t+(u-l)*f/u+d));f_(e,t,h,p,r)}const s=e[t];let o=n,a=i;for(Lu(e,n,t),r(e[i],s)>0&&Lu(e,n,i);o<a;){for(Lu(e,o,a),++o,--a;r(e[o],s)<0;)++o;for(;r(e[a],s)>0;)--a}r(e[n],s)===0?Lu(e,n,a):(++a,Lu(e,a,i)),a<=t&&(n=a+1),t<=a&&(i=a-1)}return e}function Lu(e,t,n){const i=e[t];e[t]=e[n],e[n]=i}function Rm(e,t,n){if(e=Float64Array.from(N9(e,n)),!(!(i=e.length)||isNaN(t=+t))){if(t<=0||i<2)return Dm(e);if(t>=1)return co(e);var i,r=(i-1)*t,s=Math.floor(r),o=co(f_(e,s).subarray(0,s+1)),a=Dm(e.subarray(s+1));return o+(a-o)*(r-s)}}function W9(e,t,n=a_){if(!(!(i=e.length)||isNaN(t=+t))){if(t<=0||i<2)return+n(e[0],0,e);if(t>=1)return+n(e[i-1],i-1,e);var i,r=(i-1)*t,s=Math.floor(r),o=+n(e[s],s,e),a=+n(e[s+1],s+1,e);return o+(a-o)*(r-s)}}function G9(e,t){let n=0,i=0;if(t===void 0)for(let r of e)r!=null&&(r=+r)>=r&&(++n,i+=r);else{let r=-1;for(let s of e)(s=t(s,++r,e))!=null&&(s=+s)>=s&&(++n,i+=s)}if(n)return i/n}function d_(e,t){return Rm(e,.5,t)}function zo(e,t,n){e=+e,t=+t,n=(r=arguments.length)<2?(t=e,e=0,1):r<3?1:+n;for(var i=-1,r=Math.max(0,Math.ceil((t-e)/n))|0,s=new Array(r);++i<r;)s[i]=e+i*n;return s}function h_(e,t){let n=0;for(let i of e)(i=+i)&&(n+=i);return n}const wt="year",yn="quarter",Pt="month",rt="week",bn="date",Ot="day",Ki="dayofyear",Mn="hours",Nn="minutes",Yn="seconds",yi="milliseconds",sb=[wt,yn,Pt,rt,bn,Ot,Ki,Mn,Nn,Yn,yi],Qg=sb.reduce((e,t,n
7)=>(e[t]=1+n,e),{});function ob(e){const t=K(e).slice(),n={};return t.length||T("Missing time unit."),t.forEach(r=>{J(Qg,r)?n[r]=1:T(`Invalid time unit: ${r}.`)}),(n[rt]||n[Ot]?1:0)+(n[yn]||n[Pt]||n[bn]?1:0)+(n[Ki]?1:0)>1&&T(`Incompatible time units: ${e}`),t.sort((r,s)=>Qg[r]-Qg[s]),t}const H9={[wt]:"%Y ",[yn]:"Q%q ",[Pt]:"%b ",[bn]:"%d ",[rt]:"W%U ",[Ot]:"%a ",[Ki]:"%j ",[Mn]:"%H:00",[Nn]:"00:%M",[Yn]:":%S",[yi]:".%L",[`${wt}-${Pt}`]:"%Y-%m ",[`${wt}-${Pt}-${bn}`]:"%Y-%m-%d ",[`${Mn}-${Nn}`]:"%H:%M"};function p_(e,t){const n=fe({},H9,t),i=ob(e),r=i.length;let s="",o=0,a,u;for(o=0;o<r;)for(a=i.length;a>o;--a)if(u=i.slice(o,a).join("-"),n[u]!=null){s+=n[u],o=a;break}return s.trim()}const no=new Date;function ab(e){return no.setFullYear(e),no.setMonth(0),no.setDate(1),no.setHours(0,0,0,0),no}function g_(e){return y_(new Date(e))}function m_(e){return Om(new Date(e))}function y_(e){return Vf.count(ab(e.getFullYear())-1,e)}function Om(e){return dF.count(ab(e.getFullYear())-1,e)}function Tm(e){return ab(e).getDay()}function V9(e,t,n,i,r,s,o){if(0<=e&&e<100){const a=new Date(-1,t,n,i,r,s,o);return a.setFullYear(e),a}return new Date(e,t,n,i,r,s,o)}function b_(e){return v_(new Date(e))}function x_(e){return Mm(new Date(e))}function v_(e){const t=Date.UTC(e.getUTCFullYear(),0,1);return Xf.count(t-1,e)}function Mm(e){const t=Date.UTC(e.getUTCFullYear(),0,1);return hF.count(t-1,e)}function Nm(e){return no.setTime(Date.UTC(e,0,1)),no.getUTCDay()}function X9(e,t,n,i,r,s,o){if(0<=e&&e<100){const a=new Date(Date.UTC(-1,t,n,i,r,s,o));return a.setUTCFullYear(n.y),a}return new Date(Date.UTC(e,t,n,i,r,s,o))}function E_(e,t,n,i,r){const s=t||1,o=ve(e),a=(y,b,x)=>(x=x||y,Y9(n[x],i[x],y===o&&s,b)),u=new Date,l=mi(e),c=l[wt]?a(wt):qt(2012),f=l[Pt]?a(Pt):l[yn]?a(yn):rs,d=l[rt]&&l[Ot]?a(Ot,1,rt+Ot):l[rt]?a(rt,1):l[Ot]?a(Ot,1):l[bn]?a(bn,1):l[Ki]?a(Ki,1):cu,h=l[Mn]?a(Mn):rs,p=l[Nn]?a(Nn):rs,g=l[Yn]?a(Yn):rs,m=l[yi]?a(yi):rs;return function(y){u.setTime(+y);const b=c(u);return r(b,f(u),d(u,b),h(u),p(u),g(u),m(u))}}function Y9(e,t,n,i){const r=n<=1?e:i?(s,o)=>i+n*Math.floor((e(s,o)-i)/n):(s,o)=>n*Math.floor(e(s,o)/n);return t?(s,o)=>t(r(s,o),o):r}function La(e,t,n){return t+e*7-(n+6)%7}const K9={[wt]:e=>e.getFullYear(),[yn]:e=>Math.floor(e.getMonth()/3),[Pt]:e=>e.getMonth(),[bn]:e=>e.getDate(),[Mn]:e=>e.getHours(),[Nn]:e=>e.getMinutes(),[Yn]:e=>e.getSeconds(),[yi]:e=>e.getMilliseconds(),[Ki]:e=>y_(e),[rt]:e=>Om(e),[rt+Ot]:(e,t)=>La(Om(e),e.getDay(),Tm(t)),[Ot]:(e,t)=>La(1,e.getDay(),Tm(t))},J9={[yn]:e=>3*e,[rt]:(e,t)=>La(e,0,Tm(t))};function A_(e,t){return E_(e,t||1,K9,J9,V9)}const Q9={[wt]:e=>e.getUTCFullYear(),[yn]:e=>Math.floor(e.getUTCMonth()/3),[Pt]:e=>e.getUTCMonth(),[bn]:e=>e.getUTCDate(),[Mn]:e=>e.getUTCHours(),[Nn]:e=>e.getUTCMinutes(),[Yn]:e=>e.getUTCSeconds(),[yi]:e=>e.getUTCMilliseconds(),[Ki]:e=>v_(e),[rt]:e=>Mm(e),[Ot]:(e,t)=>La(1,e.getUTCDay(),Nm(t)),[rt+Ot]:(e,t)=>La(Mm(e),e.getUTCDay(),Nm(t))},Z9={[yn]:e=>3*e,[rt]:(e,t)=>La(e,0,Nm(t))};function w_(e,t){return E_(e,t||1,Q9,Z9,X9)}const e4={[wt]:v6,[yn]:ZE.every(3),[Pt]:ZE,[rt]:dF,[bn]:Vf,[Ot]:Vf,[Ki]:Vf,[Mn]:x6,[Nn]:b6,[Yn]:fF,[yi]:cF},t4={[wt]:w6,[yn]:eA.every(3),[Pt]:eA,[rt]:hF,[bn]:Xf,[Ot]:Xf,[Ki]:Xf,[Mn]:A6,[Nn]:E6,[Yn]:fF,[yi]:cF};function gu(e){return e4[e]}function mu(e){return t4[e]}function S_(e,t,n){return e?e.offset(t,n):void 0}function C_(e,t,n){return S_(gu(e),t,n)}function $_(e,t,n){return S_(mu(e),t,n)}function F_(e,t,n,i){return e?e.range(t,n,i):void 0}function __(e,t,n,i){return F_(gu(e),t,n,i)}function k_(e,t,n,i){return F_(mu(e),t,n,i)}const il=1e3,rl=il*60,sl=rl*60,Jh=sl*24,n4=Jh*7,dA=Jh*30,Lm=Jh*365,D_=[wt,Pt,bn,Mn,Nn,Yn,yi],ol=D_.slice(0,-1),al=ol.slice(0,-1),ul=al.slice(0,-1),i4=ul.slice(0,-1),r4=[wt,rt],hA=[wt,Pt],R_=[wt],Pu=[[ol,1,il],[ol,5,5*il],[ol,15,15*il],[ol,30,30*il],[al,1,rl],[al,5,5*rl],[al,15,15*rl],[al,30,30*rl],[ul,1,sl],[ul,3,3*sl],[ul,6,6*sl],[ul,12,12*sl],[i4,1,Jh],[r4,1,n4],[hA,1,dA],[hA,3,3*dA],[R_,1,Lm]];function O_(e){const t=e.extent,n=e.maxbins||40,i=Math.abs(gc(t))/n;let r=Kh(a=>a[2]).right(Pu,i),s,o;return r===Pu.length?(s=R_,o=zl(t[0]/Lm,t[1]/Lm,n)):r?(r=Pu[i/Pu[r-1][2]<Pu[r][2]/i?r-1:r],s=r[0],o=r[1]):(s=D_,o=Math.max(zl(t[0],t[1],n),1)),{units:s,step:o}}function ll(e){const t={};return n=>t[n]||(t[n]=e(n))}function s4(e,t){return n=>{const i=e(n),r=i.indexOf(t);if(r<0)return i;let s=o4(i,r);const o=s<i.length?i.slice(s):"";for(;--s>r;)if(i[s]!=="0"){++s;break}return i.slice(0,s)+o}}function o4(e,t){let n=e.lastIndexOf("e"),i;if(n>0)return n;for(n=e.length;--n>t;)if(i=e.charCodeAt(n),i>=48&&i<=57)return n+1}function T_(e){const t=ll(e.format),n=e.formatPrefix;return{format:t,formatPrefix:n,formatFloat(i){const r=tA(i||",");if(r.precision==null){switch(r.precision=12,r.type){case"%":r.precision-=2;break;case"e":r.precision-=1;break}return s4(t(r),t(".1f")(1)[1])}else return t(r)},formatSpan(i,r,s,o){o=tA(o??",f");const a=zl(i,r,s),u=Math.max(Math.abs(i),Math.abs(r));let l;if(o.precision==null)switch(o.type){case"s":return isNaN(l=_6(a,u))||(o.precision=l),n(o,u);case"":case"e":case"g":case"p":case"r":{isNaN(l=F6(a,u))||(o.precision=l-(o.type==="e"));break}case"f":case"%":{isNaN(l=$6(a))||(o.precision=l-(o.type==="%")*2);break}}return t(o)}}}let Pm;M_();function M_(){return Pm=T_({format:k6,formatPrefix:D6})}function N_(e){return T_(S6(e))}function Rd(e){return arguments.length?Pm=N_(e):Pm}function pA(e,t,n){n=n||{},X(n)||T(`Invalid time multi-format specifier: ${n}`);const i=t(Yn),r=t(Nn),s=t(Mn),o=t(bn),a=t(rt),u=t(Pt),l=t(yn),c=t(wt),f=e(n[yi]||".%L"),d=e(n[Yn]||":%S"),h=e(n[Nn]||"%I:%M"),p=e(n[Mn]||"%I %p"),g=e(n[bn]||n[Ot]||"%a %d"),m=e(n[rt]||"%b %d"),y=e(n[Pt]||"%B"),b=e(n[yn]||"%B"),x=e(n[wt]||"%Y");return v=>(i(v)<v?f:r(v)<v?d:s(v)<v?h:o(v)<v?p:u(v)<v?a(v)<v?g:m:c(v)<v?l(v)<v?y:b:x)(v)}function L_(e){const t=ll(e.format),n=ll(e.utcFormat);return{timeFormat:i=>Y(i)?t(i):pA(t,gu,i),utcFormat:i=>Y(i)?n(i):pA(n,mu,i),timeParse:ll(e.parse),utcParse:ll(e.utcParse)}}let Im;P_();function P_(){return Im=L_({format:R6,parse:M6,utcFormat:O6,utcParse:T6})}function I_(e){return L_(C6(e))}function Ul(e){return arguments.length?Im=I_(e):Im}const Bm=(e,t)=>fe({},e,t);function B_(e,t){const n=e?N_(e):Rd(),i=t?I_(t):Ul();return Bm(n,i)}function ub(e,t){const n=arguments.length;return n&&n!==2&&T("defaultLocale expects either zero or two arguments."),n?Bm(Rd(e),Ul(t)):Bm(Rd(),Ul())}function a4(){return M_(),P_(),ub()}
7const u4=/^(data:|([A-Za-z]+:)?\/\/)/,l4=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,c4=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,gA="file://";function f4(e,t){return n=>({options:n||{},sanitize:h4,load:d4,fileAccess:!1,file:p4(),http:m4(e)})}async function d4(e,t){const n=await this.sanitize(e,t),i=n.href;return n.localFile?this.file(i):this.http(i,t)}async function h4(e,t){t=fe({},this.options,t);const n=this.fileAccess,i={href:null};let r,s,o;const a=l4.test(e.replace(c4,""));(e==null||typeof e!="string"||!a)&&T("Sanitize failure, invalid URI: "+G(e));const u=u4.test(e);return(o=t.baseURL)&&!u&&(!e.startsWith("/")&&!o.endsWith("/")&&(e="/"+e),e=o+e),s=(r=e.startsWith(gA))||t.mode==="file"||t.mode!=="http"&&!u&&n,r?e=e.slice(gA.length):e.startsWith("//")&&(t.defaultProtocol==="file"?(e=e.slice(2),s=!0):e=(t.defaultProtocol||"http")+":"+e),Object.defineProperty(i,"localFile",{value:!!s}),i.href=e,t.target&&(i.target=t.target+""),t.rel&&(i.rel=t.rel+""),t.context==="image"&&t.crossOrigin&&(i.crossOrigin=t.crossOrigin+""),i}function p4(e){return g4}async function g4(){T("No file system access.")}function m4(e){return e?async function(t,n){const i=fe({},this.options.http,n),r=n&&n.response,s=await e(t,i);return s.ok?de(s[r])?s[r]():s.text():T(s.status+""+s.statusText)}:y4}async function y4(){T("No HTTP fetch method available.")}const b4=e=>e!=null&&e===e,x4=e=>e==="true"||e==="false"||e===!0||e===!1,v4=e=>!Number.isNaN(Date.parse(e)),z_=e=>!Number.isNaN(+e)&&!(e instanceof Date),E4=e=>z_(e)&&Number.isInteger(+e),zm={boolean:nb,integer:Mt,number:Mt,date:ib,string:rb,unknown:jt},df=[x4,E4,z_,v4],A4=["boolean","integer","number","date"];function U_(e,t){if(!e||!e.length)return"unknown";const n=e.length,i=df.length,r=df.map((s,o)=>o+1);for(let s=0,o=0,a,u;s<n;++s)for(u=t?e[s][t]:e[s],a=0;a<i;++a)if(r[a]&&b4(u)&&!df[a](u)&&(r[a]=0,++o,o===df.length))return"string";return A4[r.reduce((s,o)=>s===0?o:s,0)-1]}function j_(e,t){return t.reduce((n,i)=>(n[i]=U_(e,i),n),{})}function mA(e){const t=function(n,i){const r={delimiter:e};return lb(n,i?fe(i,r):r)};return t.responseType="text",t}function lb(e,t){return t.header&&(e=t.header.map(G).join(t.delimiter)+`
8`+e),S9(t.delimiter).parse(e+"")}lb.responseType="text";function w4(e){return typeof Buffer=="function"&&de(Buffer.isBuffer)?Buffer.isBuffer(e):!1}function cb(e,t){const n=t&&t.property?Vn(t.property):jt;return X(e)&&!w4(e)?S4(n(e),t):n(JSON.parse(e))}cb.responseType="json";function S4(e,t){return!I(e)&&ZF(e)&&(e=[...e]),t&&t.copy?JSON.parse(JSON.stringify(e)):e}const C4={interior:(e,t)=>e!==t,exterior:(e,t)=>e===t};function q_(e,t){let n,i,r,s;return e=cb(e,t),t&&t.feature?(n=_9,r=t.feature):t&&t.mesh?(n=D9,r=t.mesh,s=C4[t.filter]):T("Missing TopoJSON feature or mesh parameter."),i=(i=e.objects[r])?n(e,i,s):T("Invalid TopoJSON object: "+r),i&&i.features||[i]}q_.responseType="json";const Yf={dsv:lb,csv:mA(","),tsv:mA("	"),json:cb,topojson:q_};function fb(e,t){return arguments.length>1?(Yf[e]=t,this):J(Yf,e)?Yf[e]:null}function W_(e){const t=fb(e);return t&&t.responseType||"text"}function G_(e,t,n,i){t=t||{};const r=fb(t.type||"json");return r||T("Unknown data format type: "+t.type),e=r(e,t),t.parse&&$4(e,t.parse,n,i),J(e,"columns")&&delete e.columns,e}function $4(e,t,n,i){if(!e.length)return;const r=Ul();n=n||r.timeParse,i=i||r.utcParse;let s=e.columns||Object.keys(e[0]),o,a,u,l,c,f;t==="auto"&&(t=j_(e,s)),s=Object.keys(t);const d=s.map(h=>{const p=t[h];let g,m;if(p&&(p.startsWith("date:")||p.startsWith("utc:")))return g=p.split(/:(.+)?/,2),m=g[1],(m[0]==="'"&&m[m.length-1]==="'"||m[0]==='"'&&m[m.length-1]==='"')&&(m=m.slice(1,-1)),(g[0]==="utc"?i:n)(m);if(!zm[p])throw Error("Illegal format pattern: "+h+":"+p);return zm[p]});for(u=0,c=e.length,f=s.length;u<c;++u)for(o=e[u],l=0;l<f;++l)a=s[l],o[a]=d[l](o[a])}const Qh=f4(typeof fetch<"u"&&fetch);function Zh(e){const t=e||jt,n=[],i={};return n.add=r=>{const s=t(r);return i[s]||(i[s]=1,n.push(r)),n},n.remove=r=>{const s=t(r);if(i[s]){i[s]=0;const o=n.indexOf(r);o>=0&&n.splice(o,1)}return n},n}async function Kf(e,t){try{await t(e)}catch(n){e.error(n)}}const H_=Symbol("vega_id");let F4=1;function ep(e){return!!(e&&ie(e))}function ie(e){return e[H_]}function V_(e,t){return e[H_]=t,e}function $e(e){const t=e===Object(e)?e:{data:e};return ie(t)?t:V_(t,F4++)}function db(e){return tp(e,$e({}))}function tp(e,t){for(const n in e)t[n]=e[n];return t}function X_(e,t){return V_(t,ie(e))}function Uo(e,t){return e?t?(n,i)=>e(n,i)||ie(t(n))-ie(t(i)):(n,i)=>e(n,i)||ie(n)-ie(i):null}function Y_(e){return e&&e.constructor===jo}function jo(){const e=[],t=[],n=[],i=[],r=[];let s=null,o=!1;return{constructor:jo,insert(a){const u=K(a),l=u.length;for(let c=0;c<l;
8++c)e.push(u[c]);return this},remove(a){const u=de(a)?i:t,l=K(a),c=l.length;for(let f=0;f<c;++f)u.push(l[f]);return this},modify(a,u,l){const c={field:u,value:qt(l)};return de(a)?(c.filter=a,r.push(c)):(c.tuple=a,n.push(c)),this},encode(a,u){return de(a)?r.push({filter:a,field:u}):n.push({tuple:a,field:u}),this},clean(a){return s=a,this},reflow(){return o=!0,this},pulse(a,u){const l={},c={};let f,d,h,p,g,m;for(f=0,d=u.length;f<d;++f)l[ie(u[f])]=1;for(f=0,d=t.length;f<d;++f)g=t[f],l[ie(g)]=-1;for(f=0,d=i.length;f<d;++f)p=i[f],u.forEach(b=>{p(b)&&(l[ie(b)]=-1)});for(f=0,d=e.length;f<d;++f)g=e[f],m=ie(g),l[m]?l[m]=1:a.add.push($e(e[f]));for(f=0,d=u.length;f<d;++f)g=u[f],l[ie(g)]<0&&a.rem.push(g);function y(b,x,v){v?b[x]=v(b):a.encode=x,o||(c[ie(b)]=b)}for(f=0,d=n.length;f<d;++f)h=n[f],g=h.tuple,p=h.field,m=l[ie(g)],m>0&&(y(g,p,h.value),a.modifies(p));for(f=0,d=r.length;f<d;++f)h=r[f],p=h.filter,u.forEach(b=>{p(b)&&l[ie(b)]>0&&y(b,h.field,h.value)}),a.modifies(h.field);if(o)a.mod=t.length||i.length?u.filter(b=>l[ie(b)]>0):u.slice();else for(m in c)a.mod.push(c[m]);return(s||s==null&&(t.length||i.length))&&a.clean(!0),a}}}const Jf="_:mod:_";function np(){Object.defineProperty(this,Jf,{writable:!0,value:{}})}np.prototype={set(e,t,n,i){const r=this,s=r[e],o=r[Jf];return t!=null&&t>=0?(s[t]!==n||i)&&(s[t]=n,o[t+":"+e]=-1,o[e]=-1):(s!==n||i)&&(r[e]=n,o[e]=I(n)?1+n.length:-1),r},modified(e,t){const n=this[Jf];if(arguments.length){if(I(e)){for(let i=0;i<e.length;++i)if(n[e[i]])return!0;return!1}}else{for(const i in n)if(n[i])return!0;return!1}return t!=null&&t>=0?t+1<n[e]||!!n[t+":"+e]:!!n[e]},clear(){return this[Jf]={},this}};let _4=0;const k4="pulse",D4=new np,R4=1,O4=2;function Ne(e,t,n,i){this.id=++_4,this.value=e,this.stamp=-1,this.rank=-1,this.qrank=-1,this.flags=0,t&&(this._update=t),n&&this.parameters(n,i)}function yA(e){return function(t){const n=this.flags;return arguments.length===0?!!(n&e):(this.flags=t?n|e:n&~e,this)}}Ne.prototype={targets(){return this._targets||(this._targets=Zh(pc))},set(e){return this.value!==e?(this.value=e,1):0},skip:yA(R4),modified:yA(O4),parameters(e,t,n){t=t!==!1;const i=this._argval=this._argval||new np,r=this._argops=this._argops||[],s=[];let o,a,u,l;const c=(f,d,h)=>{h instanceof Ne?(h!==this&&(t&&h.targets().add(this),s.push(h)),r.push({op:h,name:f,index:d})):i.set(f,d,h)};for(o in e)if(a=e[o],o===k4)K(a).forEach(f=>{f instanceof Ne?f!==this&&(f.targets().add(this),s.push(f)):T("Pulse parameters must be operator instances.")}),this.source=a;else if(I(a))for(i.set(o,-1,Array(u=a.length)),l=0;l<u;++l)c(o,l,a[l]);else c(o,-1,a);return this.marshall().clear(),n&&(r.initonly=!0),s},marshall(e){const t=this._argval||D4,n=this._argops;let i,r,s,o;if(n){const a=n.length;for(r=0;r<a;++r)i=n[r],s=i.op,o=s.modified()&&s.stamp===e,t.set(i.name,i.index,s.value,o);if(n.initonly){for(r=0;r<a;++r)i=n[r],i.op.targets().remove(this);this._argops=null,this._update=null}}return t},detach(){const e=this._argops;let t,n,i,r;if(e)for(t=0,n=e.length;t<n;++t)i=e[t],r=i.op,r._targets&&r._targets.remove(this);this.pulse=null,this.source=null},evaluate(e){const t=this._update;if(t){const n=this.marshall(e.stamp),i=t.call(this,n,e);if(n.clear(),i!==this.value)this.value=i;else if(!this.modified())return e.StopPropagation}},run(e){if(e.stamp<this.stamp)return e.StopPropagation;let t;return this.skip()?(this.skip(!1),t=0):t=this.evaluate(e),this.pulse=t||e}};function T4(e,t,n,i){let r=1,s;return e instanceof Ne?s=e:e&&e.prototype instanceof Ne?s=new e:de(e)?s=new Ne(null,e):(r=0,s=new Ne(e,t)),this.rank(s),r&&(i=n,n=t),n&&this.connect(s,s.parameters(n,i)),this.touch(s),s}function M4(e,t){const n=e.rank,i=t.length;for(let r=0;r<i;++r)if(n<t[r].rank){this.rerank(e);return}}let N4=0;function ip(e,t,n){this.id=++N4,this.value=null,n&&(this.receive=n),e&&(this._filter=e),t&&(this._apply=t)}function Jr(e,t,n){return new ip(e,t,n)}ip.prototype={_filter:Xn,_apply:jt,targets(){return this._targets||(this._targets=Zh(pc))},consume(e){return arguments.length?(this._consume=!!e,this):!!this._consume},receive(e){if(this._filter(e)){const t=this.value=this._apply(e),n=this._targets,i=n?n.length:0;for(let r=0;r<i;++r)n[r].receive(t);this._consume&&(e.preventDefault(),e.stopPropagation())}},filter(e){const t=Jr(e);return this.targets().add(t),t},apply(e){const t=Jr(null,e);return this.targets().add(t),t}
8,merge(){const e=Jr();this.targets().add(e);for(let t=0,n=arguments.length;t<n;++t)arguments[t].targets().add(e);return e},throttle(e){let t=-1;return this.filter(()=>{const n=Date.now();return n-t>e?(t=n,1):0})},debounce(e){const t=Jr();return this.targets().add(Jr(null,null,Zy(e,n=>{const i=n.dataflow;t.receive(n),i&&i.run&&i.run()}))),t},between(e,t){let n=!1;return e.targets().add(Jr(null,null,()=>n=!0)),t.targets().add(Jr(null,null,()=>n=!1)),this.filter(()=>n)},detach(){this._filter=Xn,this._targets=null}};function L4(e,t,n,i){const r=this,s=Jr(n,i),o=function(l){l.dataflow=r;try{s.receive(l)}catch(c){r.error(c)}finally{r.run()}};let a;typeof e=="string"&&typeof document<"u"?a=document.querySelectorAll(e):a=K(e);const u=a.length;for(let l=0;l<u;++l)a[l].addEventListener(t,o);return s}function P4(e,t){const n=this.locale();return G_(e,t,n.timeParse,n.utcParse)}function I4(e,t,n){return t=this.parse(t,n),this.pulse(e,this.changeset().insert(t))}async function B4(e,t){const n=this;let i=0,r;try{r=await n.loader().load(e,{context:"dataflow",response:W_(t&&t.type)});try{r=n.parse(r,t)}catch(s){i=-2,n.warn("Data ingestion failed",e,s)}}catch(s){i=-1,n.warn("Loading failed",e,s)}return{data:r,status:i}}async function z4(e,t,n){const i=this,r=i._pending||U4(i);r.requests+=1;const s=await i.request(t,n);return i.pulse(e,i.changeset().remove(Xn).insert(s.data||[])),r.done(),s}function U4(e){let t;const n=new Promise(i=>t=i);return n.requests=0,n.done=()=>{--n.requests===0&&(e._pending=null,t(e))},e._pending=n}const j4={skip:!0};function q4(e,t,n,i,r){return(e instanceof Ne?G4:W4)(this,e,t,n,i,r),this}function W4(e,t,n,i,r,s){const o=fe({},s,j4);let a,u;de(n)||(n=qt(n)),i===void 0?a=l=>e.touch(n(l)):de(i)?(u=new Ne(null,i,r,!1),a=l=>{u.evaluate(l);const c=n(l),f=u.value;Y_(f)?e.pulse(c,f,s):e.update(c,f,o)}):a=l=>e.update(n(l),i,o),t.apply(a)}function G4(e,t,n,i,r,s){if(i===void 0)t.targets().add(n);else{const o=s||{},a=new Ne(null,H4(n,i),r,!1);a.modified(o.force),a.rank=t.rank,t.targets().add(a),n&&(a.skip(!0),a.value=n.value,a.targets().add(n),e.connect(n,[a]))}}function H4(e,t){return t=de(t)?t:qt(t),e?function(n,i){const r=t(n,i);return e.skip()||(e.skip(r!==this.value).value=r),r}:t}function V4(e){e.rank=++this._rank}function X4(e){const t=[e];let n,i,r;for(;t.length;)if(this.rank(n=t.pop()),i=n._targets)for(r=i.length;--r>=0;)t.push(n=i[r]),n===e&&T("Cycle detected in dataflow graph.")}const Od={},Li=1,es=2,xr=4,Y4=Li|es,bA=Li|xr,ra=Li|es|xr,xA=8,Iu=16,vA=32,EA=64;function ms(e,t,n){this.dataflow=e,this.stamp=t??-1,this.add=[],this.rem=[],this.mod=[],this.fields=null,this.encode=n||null}function Zg(e,t){const n=[];return Zr(e,t,i=>n.push(i)),n}function AA(e,t){const n={};return e.visit(t,i=>{n[ie(i)]=1}),i=>n[ie(i)]?null:i}function hf(e,t){return e?(n,i)=>e(n,i)&&t(n,i):t}ms.prototype={StopPropagation:Od,ADD:Li,REM:es,MOD:xr,ADD_REM:Y4,ADD_MOD:bA,ALL:ra,REFLOW:xA,SOURCE:Iu,NO_SOURCE:vA,NO_FIELDS:EA,fork(e){return new ms(this.dataflow).init(this,e)},clone(){const e=this.fork(ra);return e.add=e.add.slice(),e.rem=e.rem.slice(),e.mod=e.mod.slice(),e.source&&(e.source=e.source.slice()),e.materialize(ra|Iu)},addAll(){let e=this;return!e.source||e.add===e.rem||!e.rem.length&&e.source.length===e.add.length||(e=new ms(this.dataflow).init(this),e.add=e.source,e.rem=[]),e},init(e,t){const n=this;return n.stamp=e.stamp,n.encode=e.encode,e.fields&&!(t&EA)&&(n.fields=e.fields),t&Li?(n.addF=e.addF,n.add=e.add):(n.addF=null,n.add=[]),t&es?(n.remF=e.remF,n.rem=e.rem):(n.remF=null,n.rem=[]),t&xr?(n.modF=e.modF,n.mod=e.mod):(n.modF=null,n.mod=[]),t&vA?(n.srcF=null,n.source=null):(n.srcF=e.srcF,n.source=e.source,e.cleans&&(n.cleans=e.cleans)),n},runAfter(e){this.dataflow.runAfter(e)},changed(e){const t=e||ra;return t&Li&&this.add.length||t&es&&this.rem.length||t&xr&&this.mod.length},reflow(e){if(e)return this.fork(ra).reflow();const t=this.add.length,n=this.source&&this.source.length;return n&&n!==t&&(this.mod=this.source,t&&this.filter(xr,AA(this,Li))),this},clean(e){return arguments.length?(this.cleans=!!e,this):this.cleans},modifies(e){const t=this.fields||(this.fields={});return I(e)?e.forEach(n=>t[n]=!0):t[e]=!0,this},modified(e,t){const n=this.fields;return(t||this.mod.length)&&n?arguments.length?I(e)?e.some(i=>n[i]):n[e]:!!n:!1},filter(e,t){const n=this;return e&Li&&(n.addF=hf(n.addF,t)),e&es&&(n.remF=hf(n.remF,t)),e&xr&&(n.modF=hf(n.modF,t)),e&Iu&&(n.srcF=hf(n.srcF,t)),n},materialize(e){e=e||ra;const t=this;return e&Li&&t.addF&&(t.add=Zg(t.add,t.addF),t.addF=null),e&es&&t.remF&&(t.rem=Zg(t.rem,t.remF),t.remF=null),e&xr&&t.modF&&(t.mod=Zg(t.mod,t.modF),t.modF=null),e&Iu&&t.srcF&&(t.source=t.source.filter(t.srcF),t.srcF=null),t},visit(e,t){const n=this,i=t;if(e&Iu)return Zr(n.source,n.srcF,i),n;e&Li&&Zr(n.add,n.addF,i),e&es&&Zr(n.rem,n.remF,i),e&xr&&Zr(n.mod,n.modF,i);const r=n.source;if(e&xA&&r){const s=n.add.length+n.mod.length;s===r.length||(s?Zr(r,AA(n,bA),i):Zr(r,n.srcF,i))}return n}};function hb(e,t,n,i){const r=this;let s=0;this.dataflow=e,this.stamp=t,this.fields=null,this.encode=i||null,this.pulses=n;for(const o of n)if(o.stamp===t){if(o.fields){const a=r.fields||(r.fields={});for(const u in o.fields)a[u]=1}o.changed(r.ADD)&&(s|=r.ADD),o.changed(r.REM)&&(s|=r.REM),o.changed(r.MOD)&&(s|=r.MOD)}this.changes=s}H(hb,ms,{fork(e){const t=new ms(this.dataflow).init(this,e&this.NO_FIELDS);return e!==void 0&&(e&t.ADD&&this.visit(t.ADD,n=>t.add.push(n)),e&t.REM&&this.visit(t.REM,n=>t.rem.push(n)),e&t.MOD&&this.visit(t.MOD,n=>t.mod.push(n))),t},changed(e){return this.changes&e},modified(e){const t=this,n=t.fields;return n&&t.changes&t.MOD?I(e)?e.some(i=>n[i]):n[e]:0},filter(){T("MultiPulse does not support filtering.")},materialize(){T("MultiPulse does not support materialization.")},visit(e,t){const n=this,i=n.pulses,r=i.length;let s=0;if(e&n.SOURCE)for(;s<r;++s)i[s].visit(e,t);else for(;s<r;++s)i[s].stamp===n.stamp&&i[s].visit(e,t);return n}});async function K4(e,t,n){const i=this,r=[];if(i._pulse)return K_(i);if(i._pending&&await i._pending,t&&await Kf(i,t),!i._touched.length)return i.debug("Dataflow invoked, but nothing to do."),i;const s=++i._clock;i._pulse=new ms(i,s,e),i._touched.forEach(c=>i._enqueue(c,!0)),i._touched=Zh(pc);let o=0,a,u,l;try{for(;i._heap.size()>0;){if(a=i._heap.pop(),a.rank!==a.qrank){i._enqueue(a,!0);continue}u=a.run(i._getPulse(a,e)),u.then?u=await u:u.async&&(r.push(u.async),u=Od),u!==Od&&a._targets&&a._targets.forEac
8h(c=>i._enqueue(c)),++o}}catch(c){i._heap.clear(),l=c}if(i._input={},i._pulse=null,i.debug(`Pulse ${s}: ${o} operators`),l&&(i._postrun=[],i.error(l)),i._postrun.length){const c=i._postrun.sort((f,d)=>d.priority-f.priority);i._postrun=[];for(let f=0;f<c.length;++f)await Kf(i,c[f].callback)}return n&&await Kf(i,n),r.length&&Promise.all(r).then(c=>i.runAsync(null,()=>{c.forEach(f=>{try{f(i)}catch(d){i.error(d)}})})),i}async function J4(e,t,n){for(;this._running;)await this._running;const i=()=>this._running=null;return(this._running=this.evaluate(e,t,n)).then(i,i),this._running}function Q4(e,t,n){return this._pulse?K_(this):(this.evaluate(e,t,n),this)}function Z4(e,t,n){if(this._pulse||t)this._postrun.push({priority:n||0,callback:e});else try{e(this)}catch(i){this.error(i)}}function K_(e){return e.error("Dataflow already running. Use runAsync() to chain invocations."),e}function e7(e,t){const n=e.stamp<this._clock;n&&(e.stamp=this._clock),(n||t)&&(e.qrank=e.rank,this._heap.push(e))}function t7(e,t){const n=e.source,i=this._clock;return n&&I(n)?new hb(this,i,n.map(r=>r.pulse),t):this._input[e.id]||n7(this._pulse,n&&n.pulse)}function n7(e,t){return t&&t.stamp===e.stamp?t:(e=e.fork(),t&&t!==Od&&(e.source=t.source),e)}const pb={skip:!1,force:!1};function i7(e,t){const n=t||pb;return this._pulse?this._enqueue(e):this._touched.add(e),n.skip&&e.skip(!0),this}function r7(e,t,n){const i=n||pb;return(e.set(t)||i.force)&&this.touch(e,i),this}
8function s7(e,t,n){this.touch(e,n||pb);const i=new ms(this,this._clock+(this._pulse?0:1)),r=e.pulse&&e.pulse.source||[];return i.target=e,this._input[e.id]=t.pulse(i,r),this}function o7(e){let t=[];return{clear:()=>t=[],size:()=>t.length,peek:()=>t[0],push:n=>(t.push(n),J_(t,0,t.length-1,e)),pop:()=>{const n=t.pop();let i;return t.length?(i=t[0],t[0]=n,a7(t,0,e)):i=n,i}}}function J_(e,t,n,i){let r,s;const o=e[n];for(;n>t;){if(s=n-1>>1,r=e[s],i(o,r)<0){e[n]=r,n=s;continue}break}return e[n]=o}function a7(e,t,n){const i=t,r=e.length,s=e[t];let o=(t<<1)+1,a;for(;o<r;)a=o+1,a<r&&n(e[o],e[a])>=0&&(o=a),e[t]=e[o],t=o,o=(t<<1)+1;return e[t]=s,J_(e,i,t,n)}function _a(){this.logger(Xy()),this.logLevel(Hy),this._clock=0,this._rank=0,this._locale=ub();try{this._loader=Qh()}catch{}this._touched=Zh(pc),this._input={},this._pulse=null,this._heap=o7((e,t)=>e.qrank-t.qrank),this._postrun=[]}function Bu(e){return function(){return this._log[e].apply(this,arguments)}}_a.prototype={stamp(){return this._clock},loader(e){return arguments.length?(this._loader=e,this):this._loader},locale(e){return arguments.length?(this._locale=e,this):this._locale},logger(e){return arguments.length?(this._log=e,this):this._log},error:Bu("error"),warn:Bu("warn"),info:Bu("info"),debug:Bu("debug"),logLevel:Bu("level"),cleanThreshold:1e4,add:T4,connect:M4,rank:V4,rerank:X4,pulse:s7,touch:i7,update:r7,changeset:jo,ingest:I4,parse:P4,preload:z4,request:B4,events:L4,on:q4,evaluate:K4,run:Q4,runAsync:J4,runAfter:Z4,_enqueue:e7,_getPulse:t7};function O(e,t){Ne.call(this,e,null,t)}H(O,Ne,{run(e){if(e.stamp<this.stamp)return e.StopPropagation;let t;return this.skip()?this.skip(!1):t=this.evaluate(e),t=t||e,t.then?t=t.then(n=>this.pulse=n):t!==e.StopPropagation&&(this.pulse=t),t},evaluate(e){const t=this.marshall(e.stamp),n=this.transform(t,e);return t.clear(),n},transform(){}});const Pa={};function Q_(e){const t=Z_(e);return t&&t.Definition||null}function Z_(e){return e=e&&e.toLowerCase(),J(Pa,e)?Pa[e]:null}function*ek(e,t){if(t==null)for(let n of e)n!=null&&n!==""&&(n=+n)>=n&&(yield n);else{let n=-1;for(let i of e)i=t(i,++n,e),i!=null&&i!==""&&(i=+i)>=i&&(yield i)}}function gb(e,t,n){const i=Float64Array.from(ek(e,n));return i.sort(gs),t.map(r=>W9(i,r))}function mb(e,t){return gb(e,[.25,.5,.75],t)}function yb(e,t){const n=e.length,i=I9(e,t),r=mb(e,t),s=(r[2]-r[0])/1.34;return 1.06*(Math.min(i,s)||i||Math.abs(r[0])||1)*Math.pow(n,-.2)}function tk(e){const t=e.maxbins||20,n=e.base||10,i=Math.log(n),r=e.divide||[5,2];let s=e.extent[0],o=e.extent[1],a,u,l,c,f,d;const h=e.span||o-s||Math.abs(s)||1;if(e.step)a=e.step;else if(e.steps){for(c=h/t,f=0,d=e.steps.length;f<d&&e.steps[f]<c;++f);a=e.steps[Math.max(0,f-1)]}else{for(u=Math.ceil(Math.log(t)/i),l=e.minstep||0,a=Math.max(l,Math.pow(n,Math.round(Math.log(h)/i)-u));Math.ceil(h/a)>t;)a*=n;for(f=0,d=r.length;f<d;++f)c=a/r[f],c>=l&&h/c<=t&&(a=c)}c=Math.log(a);const p=c>=0?0:~~(-c/i)+1,g=Math.pow(n,-p-1);return(e.nice||e.nice===void 0)&&(c=Math.floor(s/a+g)*a,s=s<c?c-a:c,o=Math.ceil(o/a)*a),{start:s,stop:o===s?s+a:o,step:a}}var Kn=Math.random;function u7(e){Kn=e}function nk(e,t,n,i){if(!e.length)return[void 0,void 0];const r=Float64Array.from(ek(e,i)),s=r.length,o=t;let a,u,l,c;for(l=0,c=Array(o);l<o;++l){for(a=0,u=0;u<s;++u)a+=r[~~(Kn()*s)];c[l]=a/s}return c.sort(gs),[Rm(c,n/2),Rm(c,1-n/2)]}function ik(e,t,n,i){i=i||(d=>d);const r=e.length,s=new Float64Array(r);let o=0,a=1,u=i(e[0]),l=u,c=u+t,f;for(;a<r;++a){if(f=i(e[a]),f>=c){for(l=(u+l)/2;o<a;++o)s[o]=l;c=f+t,u=f}l=f}for(l=(u+l)/2;o<a;++o)s[o]=l;return n?l7(s,t+t/4):s}function l7(e,t){const n=e.length;let i=0,r=1,s,o;for(;e[i]===e[r];)++r;for(;r<n;){for(s=r+1;e[r]===e[s];)++s;if(e[r]-e[r-1]<t){for(o=r+(i+s-r-r>>1);o<r;)e[o++]=e[r];for(;o>r;)e[o--]=e[i]}i=r,r=s}return e}function c7(e){return function(){return e=(1103515245*e+12345)%2147483647,e/2147483647}}function f7(e,t){t==null&&(t=e,e=0);let n,i,r;const s={min(o){return arguments.length?(n=o||0,r=i-n,s):n},max(o){return arguments.length?(i=o||0,r=i-n,s):i},sample(){return n+Math.floor(r*Kn())},pdf(o){return o===Math.floor(o)&&o>=n&&o<i?1/r:0},cdf(o){const a=Math.floor(o);return a<n?0:a>=i?1:(a-n+1)/r},icdf(o){return o>=0&&o<=1?n-1+Math.floor(o*r):NaN}};return s.min(e).max(t)}const rk=Math.sqrt(2*Math.PI),d7=Math.SQRT2;let zu=NaN;function rp(e,t){e=e||0,t=t??1;let n=0,i=0,r,s;if(zu===zu)n=zu,zu=NaN;else{do n=Kn()*2-1,i=Kn()*2-1,r=n*n+i*i;while(r===0||r>1);s=Math.sqrt(-2*Math.log(r)/r),n*=s,zu=i*s}return e+n*t}function bb(e,t,n){n=n??1;const i=(e-(t||0))/n;return Math.exp(-.5*i*i)/(n*rk)}
8function sp(e,t,n){t=t||0,n=n??1;const i=(e-t)/n,r=Math.abs(i);let s;if(r>37)s=0;else{const o=Math.exp(-r*r/2);let a;r<7.07106781186547?(a=.0352624965998911*r+.700383064443688,a=a*r+6.37396220353165,a=a*r+33.912866078383,a=a*r+112.079291497871,a=a*r+221.213596169931,a=a*r+220.206867912376,s=o*a,a=.0883883476483184*r+1.75566716318264,a=a*r+16.064177579207,a=a*r+86.7807322029461,a=a*r+296.564248779674,a=a*r+637.333633378831,a=a*r+793.826512519948,a=a*r+440.413735824752,s=s/a):(a=r+.65,a=r+4/a,a=r+3/a,a=r+2/a,a=r+1/a,s=o/a/2.506628274631)}return i>0?1-s:s}function op(e,t,n){return e<0||e>1?NaN:(t||0)+(n??1)*d7*h7(2*e-1)}function h7(e){let t=-Math.log((1-e)*(1+e)),n;return t<6.25?(t-=3.125,n=-364441206401782e-35,n=-16850591381820166e-35+n*t,n=128584807152564e-32+n*t,n=11157877678025181e-33+n*t,n=-1333171662854621e-31+n*t,n=20972767875968562e-33+n*t,n=6637638134358324e-30+n*t,n=-4054566272975207e-29+n*t,n=-8151934197605472e-29+n*t,n=26335093153082323e-28+n*t,n=-12975133253453532e-27+n*t,n=-5415412054294628e-26+n*t,n=10512122733215323e-25+n*t,n=-4112633980346984e-24+n*t,n=-29070369957882005e-24+n*t,n=42347877827932404e-23+n*t,n=-13654692000834679e-22+n*t,n=-13882523362786469e-21+n*t,n=.00018673420803405714+n*t,n=-.000740702534166267+n*t,n=-.006033670871430149+n*t,n=.24015818242558962+n*t,n=1.6536545626831027+n*t):t<16?(t=Math.sqrt(t)-3.25,n=22137376921775787e-25,n=9075656193888539e-23+n*t,n=-27517406297064545e-23+n*t,n=18239629214389228e-24+n*t,n=15027403968909828e-22+n*t,n=-4013867526981546e-21+n*t,n=29234449089955446e-22+n*t,n=12475304481671779e-21+n*t,n=-47318229009055734e-21+n*t,n=6828485145957318e-20+n*t,n=24031110387097894e-21+n*t,n=-.0003550375203628475+n*t,n=.0009532893797373805+n*t,n=-.0016882755560235047+n*t,n=.002491442096107851+n*t,n=-.003751208507569241+n*t,n=.005370914553590064+n*t,n=1.0052589676941592+n*t,n=3.0838856104922208+n*t):Number.isFinite(t)?(t=Math.sqrt(t)-5,n=-27109920616438573e-27,n=-2555641816996525e-25+n*t,n=15076572693500548e-25+n*t,n=-3789465440126737e-24+n*t,n=761570120807834e-23+n*t,n=-1496002662714924e-23+n*t,n=2914795345090108e-23+n*t,n=-6771199775845234e-23+n*t,n=22900482228026655e-23+n*t,n=-99298272942317e-20+n*t,n=4526062597223154e-21+n*t,n=-1968177810553167e-20+n*t,n=7599527703001776e-20+n*t,n=-.00021503011930044477+n*t,n=-.00013871931833623122+n*t,n=1.0103004648645344+n*t,n=4.849906401408584+n*t):n=1/0,n*e}function xb(e,t){let n,i;const r={mean(s){return arguments.length?(n=s||0,r):n},stdev(s){return arguments.length?(i=s??1,r):i},sample:()=>rp(n,i),pdf:s=>bb(s,n,i),cdf:s=>sp(s,n,i),icdf:s=>op(s,n,i)};return r.mean(e).stdev(t)}function vb(e,t){const n=xb();let i=0;const r={data(s){return arguments.length?(e=s,i=s?s.length:0,r.bandwidth(t)):e},bandwidth(s){return arguments.length?(t=s,!t&&e&&(t=yb(e)),r):t},sample(){return e[~~(Kn()*i)]+t*n.sample()},pdf(s){let o=0,a=0;for(;a<i;++a)o+=n.pdf((s-e[a])/t);return o/t/i},cdf(s){let o=0,a=0;for(;a<i;++a)o+=n.cdf((s-e[a])/t);return o/i},icdf(){throw Error("KDE icdf not supported.")}};return r.data(e)}function Eb(e,t){return e=e||0,t=t??1,Math.exp(e+rp()*t)}function Ab(e,t,n){if(e<=0)return 0;t=t||0,n=n??1;const i=(Math.log(e)-t)/n;return Math.exp(-.5*i*i)/(n*rk*e)}function wb(e,t,n){return sp(Math.log(e),t,n)}function Sb(e,t,n){return Math.exp(op(e,t,n))}function sk(e,t){let n,i;const r={mean(s){return arguments.length?(n=s||0,r):n},stdev(s){return arguments.length?(i=s??1,r):i},sample:()=>Eb(n,i),pdf:s=>Ab(s,n,i),cdf:s=>wb(s,n,i),icdf:s=>Sb(s,n,i)};return r.mean(e).stdev(t)}function ok(e,t){let n=0,i;function r(o){const a=[];let u=0,l;for(l=0;l<n;++l)u+=a[l]=o[l]==null?1:+o[l];for(l=0;l<n;++l)a[l]/=u;return a}const s={weights(o){return arguments.length?(i=r(t=o||[]),s):t},distributions(o){return arguments.length?(o?(n=o.length,e=o):(n=0,e=[]),s.weights(t)):e},sample(){const o=Kn();let a=e[n-1],u=i[0],l=0;for(;l<n-1;u+=i[++l])if(o<u){a=e[l];break}return a.sample()},pdf(o){let a=0,u=0;for(;u<n;++u)a+=i[u]*e[u].pdf(o);return a},cdf(o){let a=0,u=0;for(;u<n;++u)a+=i[u]*e[u].cdf(o);return a},icdf(){throw Error("Mixture icdf not supported.")}};return s.distributions(e).weights(t)}
8function Cb(e,t){return t==null&&(t=e??1,e=0),e+(t-e)*Kn()}function $b(e,t,n){return n==null&&(n=t??1,t=0),e>=t&&e<=n?1/(n-t):0}function Fb(e,t,n){return n==null&&(n=t??1,t=0),e<t?0:e>n?1:(e-t)/(n-t)}function _b(e,t,n){return n==null&&(n=t??1,t=0),e>=0&&e<=1?t+e*(n-t):NaN}function ak(e,t){let n,i;const r={min(s){return arguments.length?(n=s||0,r):n},max(s){return arguments.length?(i=s??1,r):i},sample:()=>Cb(n,i),pdf:s=>$b(s,n,i),cdf:s=>Fb(s,n,i),icdf:s=>_b(s,n,i)};return t==null&&(t=e??1,e=0),r.min(e).max(t)}function kb(e,t,n){let i=0,r=0;for(const s of e){const o=n(s);t(s)==null||o==null||isNaN(o)||(i+=(o-i)/++r)}return{coef:[i],predict:()=>i,rSquared:0}}function mc(e,t,n,i){const r=i-e*e,s=Math.abs(r)<1e-24?0:(n-e*t)/r;return[t-s*e,s]}function ap(e,t,n,i){e=e.filter(h=>{let p=t(h),g=n(h);return p!=null&&(p=+p)>=p&&g!=null&&(g=+g)>=g}),i&&e.sort((h,p)=>t(h)-t(p));const r=e.length,s=new Float64Array(r),o=new Float64Array(r);let a=0,u=0,l=0,c,f,d;for(d of e)s[a]=c=+t(d),o[a]=f=+n(d),++a,u+=(c-u)/a,l+=(f-l)/a;for(a=0;a<r;++a)s[a]-=u,o[a]-=l;return[s,o,u,l]}function yc(e,t,n,i){let r=-1,s,o;for(const a of e)s=t(a),o=n(a),s!=null&&(s=+s)>=s&&o!=null&&(o=+o)>=o&&i(s,o,++r)}function yu(e,t,n,i,r){let s=0,o=0;return yc(e,t,n,(a,u)=>{const l=u-r(a),c=u-i;s+=l*l,o+=c*c}),1-s/o}function Db(e,t,n){let i=0,r=0,s=0,o=0,a=0;yc(e,t,n,(c,f)=>{++a,i+=(c-i)/a,r+=(f-r)/a,s+=(c*f-s)/a,o+=(c*c-o)/a});const u=mc(i,r,s,o),l=c=>u[0]+u[1]*c;return{coef:u,predict:l,rSquared:yu(e,t,n,r,l)}}function uk(e,t,n){let i=0,r=0,s=0,o=0,a=0;yc(e,t,n,(c,f)=>{++a,c=Math.log(c),i+=(c-i)/a,r+=(f-r)/a,s+=(c*f-s)/a,o+=(c*c-o)/a});const u=mc(i,r,s,o),l=c=>u[0]+u[1]*Math.log(c);return{coef:u,predict:l,rSquared:yu(e,t,n,r,l)}}function lk(e,t,n){const[i,r,s,o]=ap(e,t,n);let a=0,u=0,l=0,c=0,f=0,d,h,p;yc(e,t,n,(b,x)=>{d=i[f++],h=Math.log(x),p=d*x,a+=(x*h-a)/f,u+=(p-u)/f,l+=(p*h-l)/f,c+=(d*p-c)/f});const[g,m]=mc(u/o,a/o,l/o,c/o),y=b=>Math.exp(g+m*(b-s));return{coef:[Math.exp(g-m*s),m],predict:y,rSquared:yu(e,t,n,o,y)}}function ck(e,t,n){let i=0,r=0,s=0,o=0,a=0,u=0;yc(e,t,n,(f,d)=>{const h=Math.log(f),p=Math.log(d);++u,i+=(h-i)/u,r+=(p-r)/u,s+=(h*p-s)/u,o+=(h*h-o)/u,a+=(d-a)/u});const l=mc(i,r,s,o),c=f=>l[0]*Math.pow(f,l[1]);return l[0]=Math.exp(l[0]),{coef:l,predict:c,rSquared:yu(e,t,n,a,c)}}function Rb(e,t,n){const[i,r,s,o]=ap(e,t,n),a=i.length;let u=0,l=0,c=0,f=0,d=0,h,p,g,m;for(h=0;h<a;)p=i[h],g=r[h++],m=p*p,u+=(m-u)/h,l+=(m*p-l)/h,c+=(m*m-c)/h,f+=(p*g-f)/h,d+=(m*g-d)/h;const y=c-u*u,b=u*y-l*l,x=(d*u-f*l)/b,v=(f*y-d*l)/b,A=-x*u,w=E=>(E=E-s,x*E*E+v*E+A+o);return{coef:[A-v*s+x*s*s+o,v-2*x*s,x],predict:w,rSquared:yu(e,t,n,o,w)}}function fk(e,t,n,i){if(i===0)return kb(e,t,n);if(i===1)return Db(e,t,n);if(i===2)return Rb(e,t,n);const[r,s,o,a]=ap(e,t,n),u=r.length,l=[],c=[],f=i+1;let d,h,p,g,m;for(d=0;d<f;++d){for(p=0,g=0;p<u;++p)g+=Math.pow(r[p],d)*s[p];for(l.push(g),m=new Float64Array(f),h=0;h<f;++h){for(p=0,g=0;p<u;++p)g+=Math.pow(r[p],d+h);m[h]=g}c.push(m)}c.push(l);const y=g7(c),b=x=>{x-=o;let v=a+y[0]+y[1]*x+y[2]*x*x;for(d=3;d<f;++d)v+=y[d]*Math.pow(x,d);return v};return{coef:p7(f,y,-o,a),predict:b,rSquared:yu(e,t,n,a,b)}}function p7(e,t,n,i){const r=Array(e);let s,o,a,u;for(s=0;s<e;++s)r[s]=0;for(s=e-1;s>=0;--s)for(a=t[s],u=1,r[s]+=a,o=1;o<=s;++o)u*=(s+1-o)/o,r[s-o]+=a*Math.pow(n,o)*u;return r[0]+=i,r}function g7(e){const t=e.length-1,n=[];let i,r,s,o,a;for(i=0;i<t;++i){for(o=i,r=i+1;r<t;++r)Math.abs(e[i][r])>Math.abs(e[i][o])&&(o=r);for(s=i;s<t+1;++s)a=e[s][i],e[s][i]=e[s][o],e[s][o]=a;for(r=i+1;r<t;++r)for(s=t;s>=i;s--)e[s][r]-=e[s][i]*e[i][r]/e[i][i]}for(r=t-1;r>=0;--r){for(a=0,s=r+1;s<t;++s)a+=e[s][r]*n[s];n[r]=(e[t][r]-a)/e[r][r]}return n}const wA=2,SA=1e-12;function dk(e,t,n,i){const[r,s,o,a]=ap(e,t,n,!0),u=r.length,l=Math.max(2,~~(i*u)),c=new Float64Array(u),f=new Float64Array(u),d=new Float64Array(u).fill(1);for(let h=-1;++h<=wA;){const p=[0,l-1];for(let m=0;m<u;++m){const y=r[m],b=p[0],x=p[1],v=y-r[b]>r[x]-y?b:x;let A=0,w=0,E=0,S=0,C=0;const F=1/Math.abs(r[v]-y||1);for(let R=b;R<=x;++R){const _=r[R],$=s[R],D=m7(Math.abs(y-_)*F)*d[R],P=_*D;A+=D,w+=P,E+=$*D,S+=$*P,C+=_*P}const[k,L]=mc(w/A,E/A,S/A,C/A);c[m]=k+L*y,f[m]=Math.abs(s[m]-c[m]),y7(r,m+1,p)}if(h===wA)break;const g=d_(f);if(Math.abs(g)<SA)break;for(let m=0,y,b;m<u;++m)y=f[m]/(6*g),d[m]=y>=1?SA:(b=1-y*y)*b}return b7(r,c,o,a)}function m7(e){return(e=1-e*e*e)*e*e}
8function y7(e,t,n){const i=e[t];let r=n[0],s=n[1]+1;if(!(s>=e.length))for(;t>r&&e[s]-i<=i-e[r];)n[0]=++r,n[1]=s,++s}function b7(e,t,n,i){const r=e.length,s=[];let o=0,a=0,u=[],l;for(;o<r;++o)l=e[o]+n,u[0]===l?u[1]+=(t[o]-u[1])/++a:(a=0,u[1]+=i,u=[l,t[o]],s.push(u));return u[1]+=i,s}const x7=.5*Math.PI/180;function up(e,t,n,i){n=n||25,i=Math.max(n,i||200);const r=g=>[g,e(g)],s=t[0],o=t[1],a=o-s,u=a/i,l=[r(s)],c=[];if(n===i){for(let g=1;g<i;++g)l.push(r(s+g/n*a));return l.push(r(o)),l}else{c.push(r(o));for(let g=n;--g>0;)c.push(r(s+g/n*a))}let f=l[0],d=c[c.length-1];const h=1/a,p=v7(f[1],c);for(;d;){const g=r((f[0]+d[0])/2);g[0]-f[0]>=u&&E7(f,g,d,h,p)>x7?c.push(g):(f=d,l.push(d),c.pop()),d=c[c.length-1]}return l}function v7(e,t){let n=e,i=e;const r=t.length;for(let s=0;s<r;++s){const o=t[s][1];o<n&&(n=o),o>i&&(i=o)}return 1/(i-n)}function E7(e,t,n,i,r){const s=Math.atan2(r*(n[1]-e[1]),i*(n[0]-e[0])),o=Math.atan2(r*(t[1]-e[1]),i*(t[0]-e[0]));return Math.abs(s-o)}function A7(e){return t=>{const n=e.length;let i=1,r=String(e[0](t));for(;i<n;++i)r+="|"+e[i](t);return r}}function Um(e){return!e||!e.length?function(){return""}:e.length===1?e[0]:A7(e)}function hk(e,t,n){return n||e+(t?"_"+t:"")}const e0=()=>{},w7={init:e0,add:e0,rem:e0,idx:0},jl={values:{init:e=>e.cell.store=!0,value:e=>e.cell.data.values(),idx:-1},count:{value:e=>e.cell.num},__count__:{value:e=>e.missing+e.valid},missing:{value:e=>e.missing},valid:{value:e=>e.valid},sum:{init:e=>e.sum=0,value:e=>e.valid?e.sum:void 0,add:(e,t)=>e.sum+=+t,rem:(e,t)=>e.sum-=t},product:{init:e=>e.product=1,value:e=>e.valid?e.product:void 0,add:(e,t)=>e.product*=t,rem:(e,t)=>e.product/=t},mean:{init:e=>e.mean=0,value:e=>e.valid?e.mean:void 0,add:(e,t)=>(e.mean_d=t-e.mean,e.mean+=e.mean_d/e.valid),rem:(e,t)=>(e.mean_d=t-e.mean,e.mean-=e.valid?e.mean_d/e.valid:e.mean)},average:{value:e=>e.valid?e.mean:void 0,req:["mean"],idx:1},variance:{init:e=>e.dev=0,value:e=>e.valid>1?e.dev/(e.valid-1):void 0,add:(e,t)=>e.dev+=e.mean_d*(t-e.mean),rem:(e,t)=>e.dev-=e.mean_d*(t-e.mean),req:["mean"],idx:1},variancep:{value:e=>e.valid>1?e.dev/e.valid:void 0,req:["variance"],idx:2},stdev:{value:e=>e.valid>1?Math.sqrt(e.dev/(e.valid-1)):void 0,req:["variance"],idx:2},stdevp:{value:e=>e.valid>1?Math.sqrt(e.dev/e.valid):void 0,req:["variance"],idx:2},stderr:{value:e=>e.valid>1?Math.sqrt(e.dev/(e.valid*(e.valid-1))):void 0,req:["variance"],idx:2},distinct:{value:e=>e.cell.data.distinct(e.get),req:["values"],idx:3},ci0:{value:e=>e.cell.data.ci0(e.get),req:["values"],idx:3},ci1:{value:e=>e.cell.data.ci1(e.get),req:["values"],idx:3},median:{value:e=>e.cell.data.q2(e.get),req:["values"],idx:3},q1:{value:e=>e.cell.data.q1(e.get),req:["values"],idx:3},q3:{value:e=>e.cell.data.q3(e.get),req:["values"],idx:3},min:{init:e=>e.min=void 0,value:e=>e.min=Number.isNaN(e.min)?e.cell.data.min(e.get):e.min,add:(e,t)=>{(t<e.min||e.min===void 0)&&(e.min=t)},rem:(e,t)=>{t<=e.min&&(e.min=NaN)},req:["values"],idx:4},max:{init:e=>e.max=void 0,value:e=>e.max=Number.isNaN(e.max)?e.cell.data.max(e.get):e.max,add:(e,t)=>{(t>e.max||e.max===void 0)&&(e.max=t)},rem:(e,t)=>{t>=e.max&&(e.max=NaN)},req:["values"],idx:4},argmin:{init:e=>e.argmin=void 0,value:e=>e.argmin||e.cell.data.argmin(e.get),add:(e,t,n)=>{t<e.min&&(e.argmin=n)},rem:(e,t)=>{t<=e.min&&(e.argmin=void 0)},req:["min","values"],idx:3},argmax:{init:e=>e.argmax=void 0,value:e=>e.argmax||e.cell.data.argmax(e.get),add:(e,t,n)=>{t>e.max&&(e.argmax=n)},rem:(e,t)=>{t>=e.max&&(e.argmax=void 0)},req:["max","values"],idx:3},exponential:{init:(e,t)=>{e.exp=0,e.exp_r=t},value:e=>e.valid?e.exp*(1-e.exp_r)/(1-e.exp_r**e.valid):void 0,add:(e,t)=>e.exp=e.exp_r*e.exp+t,rem:(e,t)=>e.exp=(e.exp-t/e.exp_r**(e.valid-1))/e.exp_r},exponentialb:{value:e=>e.valid?e.exp*(1-e.exp_r):void 0,req:["exponential"],idx:1}},bc=Object.keys(jl).filter(e=>e!=="__count__");function S7(e,t){return(n,i)=>fe({name:e,aggregate_param:i,out:n||e},w7,t)}[...bc,"__count__"].forEach(e=>{jl[e]=S7(e,jl[e])});function pk(e,t,n){return jl[e](n,t)}function gk(e,t){return e.idx-t.idx}function C7(e){const t={};e.forEach(i=>t[i.name]=i);const n=i=>{i.req&&i.req.forEach(r=>{t[r]||n(t[r]=jl[r]())})};
8return e.forEach(n),Object.values(t).sort(gk)}function $7(){this.valid=0,this.missing=0,this._ops.forEach(e=>e.aggregate_param==null?e.init(this):e.init(this,e.aggregate_param))}function F7(e,t){if(e==null||e===""){++this.missing;return}e===e&&(++this.valid,this._ops.forEach(n=>n.add(this,e,t)))}function _7(e,t){if(e==null||e===""){--this.missing;return}e===e&&(--this.valid,this._ops.forEach(n=>n.rem(this,e,t)))}function k7(e){return this._out.forEach(t=>e[t.out]=t.value(this)),e}function mk(e,t){const n=t||jt,i=C7(e),r=e.slice().sort(gk);function s(o){this._ops=i,this._out=r,this.cell=o,this.init()}return s.prototype.init=$7,s.prototype.add=F7,s.prototype.rem=_7,s.prototype.set=k7,s.prototype.get=n,s.fields=e.map(o=>o.out),s}function Ob(e){this._key=e?Vn(e):ie,this.reset()}const $t=Ob.prototype;$t.reset=function(){this._add=[],this._rem=[],this._ext=null,this._get=null,this._q=null};$t.add=function(e){this._add.push(e)};$t.rem=function(e){this._rem.push(e)};$t.values=function(){if(this._get=null,this._rem.length===0)return this._add;const e=this._add,t=this._rem,n=this._key,i=e.length,r=t.length,s=Array(i-r),o={};let a,u,l;for(a=0;a<r;++a)o[n(t[a])]=1;for(a=0,u=0;a<i;++a)o[n(l=e[a])]?o[n(l)]=0:s[u++]=l;return this._rem=[],this._add=s};$t.distinct=function(e){const t=this.values(),n={};let i=t.length,r=0,s;for(;--i>=0;)s=e(t[i])+"",J(n,s)||(n[s]=1,++r);return r};$t.extent=function(e){if(this._get!==e||!this._ext){const t=this.values(),n=JF(t,e);this._ext=[t[n[0]],t[n[1]]],this._get=e}return this._ext};$t.argmin=function(e){return this.extent(e)[0]||{}};$t.argmax=function(e){return this.extent(e)[1]||{}};$t.min=function(e){const t=this.extent(e)[0];return t!=null?e(t):void 0};$t.max=function(e){const t=this.extent(e)[1];return t!=null?e(t):void 0};$t.quartile=function(e){return(this._get!==e||!this._q)&&(this._q=mb(this.values(),e),this._get=e),this._q};$t.q1=function(e){return this.quartile(e)[0]};$t.q2=function(e){return this.quartile(e)[1]};$t.q3=function(e){return this.quartile(e)[2]};$t.ci=function(e){return(this._get!==e||!this._ci)&&(this._ci=nk(this.values(),1e3,.05,e),this._get=e),this._ci};$t.ci0=function(e){return this.ci(e)[0]};$t.ci1=function(e){return this.ci(e)[1]};function vs(e){O.call(this,null,e),this._adds=[],this._mods=[],this._alen=0,this._mlen=0,this._drop=!0,this._cross=!1,this._dims=[],this._dnames=[],this._measures=[],this._countOnly=!1,this._counts=null,this._prev=null,this._inputs=null,this._outputs=null}vs.Definition={type:"Aggregate",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"ops",type:"enum",array:!0,values:bc},{name:"aggregate_params",type:"number",null:!0,array:!0},{name:"fields",type:"field",null:!0,array:!0},{name:"as",type:"string",null:!0,array:!0},{name:"drop",type:"boolean",default:!0},{name:"cross",type:"boolean",default:!1},{name:"key",type:"field"}]};H(vs,O,{transform(e,t){const n=this,i=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=e.modified();return n.stamp=i.stamp,n.value&&(r||t.modified(n._inputs,!0))?(n._prev=n.value,n.value=r?n.init(e):Object.create(null),t.visit(t.SOURCE,s=>n.add(s))):(n.value=n.value||n.init(e),t.visit(t.REM,s=>n.rem(s)),t.visit(t.ADD,s=>n.add(s))),i.modifies(n._outputs),n._drop=e.drop!==!1,e.cross&&n._dims.length>1&&(n._drop=!1,n.cross()),t.clean()&&n._drop&&i.clean(!0).runAfter(()=>this.clean()),n.changes(i)},cross(){const e=this,t=e.value,n=e._dnames,i=n.map(()=>({})),r=n.length;function s(a){let u,l,c,f;for(u in a)for(c=a[u].tuple,l=0;l<r;++l)i[l][f=c[n[l]]]=f}s(e._prev),s(t);function o(a,u,l){const c=n[l],f=i[l++];for(const d in f){const h=a?a+"|"+d:d;u[c]=f[d],l<r?o(h,u,l):t[h]||e.cell(h,u)}}o("",{},0)},init(e){const t=this._inputs=[],n=this._outputs=[],i={};function r(b){const x=K(Lt(b)),v=x.length;let A=0,w;for(;A<v;++A)i[w=x[A]]||(i[w]=1,t.push(w))}this._dims=K(e.groupby),this._dnames=this._dims.map(b=>{const x=Ke(b);return r(b),n.push(x),x}),this.cellkey=e.key?e.key:Um(this._dims),this._countOnly=!0,this._counts=[],this._measures=[];const s=e.fields||[null],o=e.ops||["count"],a=e.aggregate_params||[null],u=e.as||[],l=s.length,c={};let f,d,h,p,g,m,y;for(l!==o.length&&T("Unmatched number of fields and aggregate ops."),y=0;y<l;++y){if(f=s[y],d=o[y],h=a[y]||null,f==null&&d!=="count"&&T("Null aggregate field specified."),g=Ke(f),m=hk(d,g,u[y]),n.push(m),d==="count"){this._counts.push(m);continue}p=c[g],p||(r(f),p=c[g]=[],p.field=f,this._measures.push(p)),d!=="count"&&(this._countOnly=!1),p.push(pk(d,h,m))}return this._measures=this._measures.map(b=>mk(b,b.field)),Object.create(null)},cellkey:Um(),cell(e,t){let n=this.value[e];return n?n.num===0&&this._drop&&n.stamp<this.stamp?(n.stamp=this.stamp,this._adds[this._alen++]=n):n.stamp<this.stamp&&(n.stamp=this.stamp,this._mods[this._mlen++]=n):(n=this.value[e]=this.newcell(e,t),this._adds[this._alen++]=n),n}
8,newcell(e,t){const n={key:e,num:0,agg:null,tuple:this.newtuple(t,this._prev&&this._prev[e]),stamp:this.stamp,store:!1};if(!this._countOnly){const i=this._measures,r=i.length;n.agg=Array(r);for(let s=0;s<r;++s)n.agg[s]=new i[s](n)}return n.store&&(n.data=new Ob),n},newtuple(e,t){const n=this._dnames,i=this._dims,r=i.length,s={};for(let o=0;o<r;++o)s[n[o]]=i[o](e);return t?X_(t.tuple,s):$e(s)},clean(){const e=this.value;for(const t in e)e[t].num===0&&delete e[t]},add(e){const t=this.cellkey(e),n=this.cell(t,e);if(n.num+=1,this._countOnly)return;n.store&&n.data.add(e);const i=n.agg;for(let r=0,s=i.length;r<s;++r)i[r].add(i[r].get(e),e)},rem(e){const t=this.cellkey(e),n=this.cell(t,e);if(n.num-=1,this._countOnly)return;n.store&&n.data.rem(e);const i=n.agg;for(let r=0,s=i.length;r<s;++r)i[r].rem(i[r].get(e),e)},celltuple(e){const t=e.tuple,n=this._counts;e.store&&e.data.values();for(let i=0,r=n.length;i<r;++i)t[n[i]]=e.num;if(!this._countOnly){const i=e.agg;for(let r=0,s=i.length;r<s;++r)i[r].set(t)}return t},changes(e){const t=this._adds,n=this._mods,i=this._prev,r=this._drop,s=e.add,o=e.rem,a=e.mod;let u,l,c,f;if(i)for(l in i)u=i[l],(!r||u.num)&&o.push(u.tuple);for(c=0,f=this._alen;c<f;++c)s.push(this.celltuple(t[c])),t[c]=null;for(c=0,f=this._mlen;c<f;++c)u=n[c],(u.num===0&&r?o:a).push(this.celltuple(u)),n[c]=null;return this._alen=this._mlen=0,this._prev=null,e}});const D7=1e-14;function Tb(e){O.call(this,null,e)}Tb.Definition={type:"Bin",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"interval",type:"boolean",default:!0},{name:"anchor",type:"number"},{name:"maxbins",type:"number",default:20},{name:"base",type:"number",default:10},{name:"divide",type:"number",array:!0,default:[5,2]},{name:"extent",type:"number",array:!0,length:2,required:!0},{name:"span",type:"number"},{name:"step",type:"number"},{name:"steps",type:"number",array:!0},{name:"minstep",type:"number",default:0},{name:"nice",type:"boolean",default:!0},{name:"name",type:"string"},{name:"as",type:"string",array:!0,length:2,default:["bin0","bin1"]}]};H(Tb,O,{transform(e,t){const n=e.interval!==!1,i=this._bins(e),r=i.start,s=i.step,o=e.as||["bin0","bin1"],a=o[0],u=o[1];let l;return e.modified()?(t=t.reflow(!0),l=t.SOURCE):l=t.modified(Lt(e.field))?t.ADD_MOD:t.ADD,t.visit(l,n?c=>{const f=i(c);c[a]=f,c[u]=f==null?null:r+s*(1+(f-r)/s)}:c=>c[a]=i(c)),t.modifies(n?o:a)},_bins(e){if(this.value&&!e.modified())return this.value;const t=e.field,n=tk(e),i=n.step;let r=n.start,s=r+Math.ceil((n.stop-r)/i)*i,o,a;(o=e.anchor)!=null&&(a=o-(r+i*Math.floor((o-r)/i)),r+=a,s+=a);const u=function(l){let c=Mt(t(l));return c==null?null:c<r?-1/0:c>s?1/0:(c=Math.max(r,Math.min(c,s-i)),r+i*Math.floor(D7+(c-r)/i))};return u.start=r,u.stop=n.stop,u.step=i,this.value=wn(u,Lt(t),e.name||"bin_"+Ke(t))}});function yk(e,t,n){const i=e;let r=t||[],s=n||[],o={},a=0;return{add:u=>s.push(u),remove:u=>o[i(u)]=++a,size:()=>r.length,data:(u,l)=>(a&&(r=r.filter(c=>!o[i(c)]),o={},a=0),l&&u&&r.sort(u),s.length&&(r=u?n_(u,r,s.sort(u)):r.concat(s),s=[]),r)}}function Mb(e){O.call(this,[],e)}Mb.Definition={type:"Collect",metadata:{source:!0},params:[{name:"sort",type:"compare"}]};H(Mb,O,{transform(e,t){const n=t.fork(t.ALL),i=yk(ie,this.value,n.materialize(n.ADD).add),r=e.sort,s=t.changed()||r&&(e.modified("sort")||t.modified(r.fields));return n.visit(n.REM,i.remove),this.modified(s),this.value=n.source=i.data(Uo(r),s),t.source&&t.source.root&&(this.value.root=t.source.root),n}});function bk(e){Ne.call(this,null,R7,e)}H(bk,Ne);function R7(e){return this.value&&!e.modified()?this.value:Qy(e.fields,e.orders)}function Nb(e){O.call(this,null,e)}Nb.Definition={type:"CountPattern",metadata:{generates:!0,changes:!0},params:[{name:"field",type:"field",required:!0},{name:"case",type:"enum",values:["upper","lower","mixed"],default:"mixed"},{name:"pattern",type:"string",default:'[\\w"]+'},{name:"stopwords",type:"string",default:""},{name:"as",type:"string",array:!0,length:2,default:["text","count"]}]};function O7(e,t,n){switch(t){case"upper":e=e.toUpperCase();break;case"lower":e=e.toLowerCase();break}return e.match(n)}H(Nb,O,{transform(e,t){const n=f=>d=>{for(var h=O7(a(d),e.case,s)||[],p,g=0,m=h.length;g<m;++g)o.test(p=h[g])||f(p)},i=this._parameterCheck(e,t),r=this._counts,s=this._match,o=this._stop,a=e.field,u=e.as||["text","count"],l=n(f=>r[f]=1+(r[f]||0)),c=n(f=>r[f]-=1);return i?t.visit(t.SOURCE,l):(t.visit(t.ADD,l),t.visit(t.REM,c)),this._finish(t,u)},_parameterCheck(e,t){let n=!1;return(e.modified("stopwords")||!this._stop)&&(this._stop=new RegExp("^"+(e.stopwords||"")+"$","i"),n=!0),(e.modified("pattern")||!this._match)&&(this._match=new RegExp(e.pattern||"[\\w']+","g"),n=!0),(e.modified("field")||t.modified(e.field.fields))&&(n=!0),n&&(this._counts={}),n},_finish(e,t){const n=this._counts,i=this._tuples||(this._tuples={}),r=t[0],s=t[1],o=e.fork(e.NO_SOURCE|e.NO_FIELDS);let a,u,l;for(a in n)u=i[a],l=n[a]||0,!u&&l?(i[a]=u=$e({}),u[r]=a,u[s]=l,o.add.push(u)):l===0?(u&&o.rem.push(u),n[a]=null,i[a]=null):u[s]!==l&&(u[s]=l,o.mod.push(u));return o.modifies(t)}});
8function Lb(e){O.call(this,null,e)}Lb.Definition={type:"Cross",metadata:{generates:!0},params:[{name:"filter",type:"expr"},{name:"as",type:"string",array:!0,length:2,default:["a","b"]}]};H(Lb,O,{transform(e,t){const n=t.fork(t.NO_SOURCE),i=e.as||["a","b"],r=i[0],s=i[1],o=!this.value||t.changed(t.ADD_REM)||e.modified("as")||e.modified("filter");let a=this.value;return o?(a&&(n.rem=a),a=t.materialize(t.SOURCE).source,n.add=this.value=T7(a,r,s,e.filter||Xn)):n.mod=a,n.source=this.value,n.modifies(i)}});function T7(e,t,n,i){for(var r=[],s={},o=e.length,a=0,u,l;a<o;++a)for(s[t]=l=e[a],u=0;u<o;++u)s[n]=e[u],i(s)&&(r.push($e(s)),s={},s[t]=l);return r}const CA={kde:vb,mixture:ok,normal:xb,lognormal:sk,uniform:ak},M7="distributions",$A="function",N7="field";function xk(e,t){const n=e[$A];J(CA,n)||T("Unknown distribution function: "+n);const i=CA[n]();for(const r in e)r===N7?i.data((e.from||t()).map(e[r])):r===M7?i[r](e[r].map(s=>xk(s,t))):typeof i[r]===$A&&i[r](e[r]);return i}function Pb(e){O.call(this,null,e)}const vk=[{key:{function:"normal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"lognormal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"uniform"},params:[{name:"min",type:"number",default:0},{name:"max",type:"number",default:1}]},{key:{function:"kde"},params:[{name:"field",type:"field",required:!0},{name:"from",type:"data"},{name:"bandwidth",type:"number",default:0}]}],L7={key:{function:"mixture"},params:[{name:"distributions",type:"param",array:!0,params:vk},{name:"weights",type:"number",array:!0}]};Pb.Definition={type:"Density",metadata:{generates:!0},params:[{name:"extent",type:"number",array:!0,length:2},{name:"steps",type:"number"},{name:"minsteps",type:"number",default:25},{name:"maxsteps",type:"number",default:200},{name:"method",type:"string",default:"pdf",values:["pdf","cdf"]},{name:"distribution",type:"param",params:vk.concat(L7)},{name:"as",type:"string",array:!0,default:["value","density"]}]};H(Pb,O,{transform(e,t){const n=t.fork(t.NO_SOURCE|t.NO_FIELDS);if(!this.value||t.changed()||e.modified()){const i=xk(e.distribution,P7(t)),r=e.steps||e.minsteps||25,s=e.steps||e.maxsteps||200;let o=e.method||"pdf";o!=="pdf"&&o!=="cdf"&&T("Invalid density method: "+o),!e.extent&&!i.data&&T("Missing density extent parameter."),o=i[o];const a=e.as||["value","density"],u=e.extent||Yi(i.data()),l=up(o,u,r,s).map(c=>{const f={};return f[a[0]]=c[0],f[a[1]]=c[1],$e(f)});this.value&&(n.rem=this.value),this.value=n.add=n.source=l}return n}});function P7(e){return()=>e.materialize(e.SOURCE).source}function Ek(e,t){return e?e.map((n,i)=>t[i]||Ke(n)):null}function Ib(e,t,n){const i=[],r=f=>f(u);let s,o,a,u,l,c;if(t==null)i.push(e.map(n));else for(s={},o=0,a=e.length;o<a;++o)u=e[o],l=t.map(r),c=s[l],c||(s[l]=c=[],c.dims=l,i.push(c)),c.push(n(u));return i}const Ak="bin";function Bb(e){O.call(this,null,e)}Bb.Definition={type:"DotBin",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"step",type:"number"},{name:"smooth",type:"boolean",default:!1},{name:"as",type:"string",default:Ak}]};const I7=(e,t)=>gc(Yi(e,t))/30;H(Bb,O,{transform(e,t){if(this.value&&!(e.modified()||t.changed()))return t;const n=t.materialize(t.SOURCE).source,i=Ib(t.source,e.groupby,jt),r=e.smooth||!1,s=e.field,o=e.step||I7(n,s),a=Uo((p,g)=>s(p)-s(g)),u=e.as||Ak,l=i.length;let c=1/0,f=-1/0,d=0,h;for(;d<l;++d){const p=i[d].sort(a);h=-1;for(const g of ik(p,o,r,s))g<c&&(c=g),g>f&&(f=g),p[++h][u]=g}return this.value={start:c,stop:f,step:o},t.reflow(!0).modifies(u)}});function wk(e){Ne.call(this,null,B7,e),this.modified(!0)}H(wk,Ne);function B7(e){const t=e.expr;return this.value&&!e.modified("expr")?this.value:wn(n=>t(n,e),Lt(t),Ke(t))}function zb(e){O.call(this,[void 0,void 0],e)}zb.Definition={type:"Extent",metadata:{},params:[{name:"field",type:"field",required:!0}]};H(zb,O,{transform(e,t){const n=this.value,i=e.field,r=t.changed()||t.modified(i.fields)||e.modified("field");let s=n[0],o=n[1];if((r||s==null)&&(s=1/0,o=-1/0),t.visit(r?t.SOURCE:t.ADD,a=>{const u=Mt(i(a));u!=null&&(u<s&&(s=u),u>o&&(o=u))}),!Number.isFinite(s)||!Number.isFinite(o)){let a=Ke(i);a&&(a=` for field "${a}"`),t.dataflow.warn(`Infinite extent${a}: [${s}, ${o}]`),s=o=void 0}this.value=[s,o]}});function Ub(e,t){Ne.call(this,e),this.parent=t,this.count=0}H(Ub,Ne,{connect(e){return this.detachSubflow=e.detachSubflow,this.targets().add(e),e.source=this},add(e){this.count+=1,this.value.add.push(e)},rem(e){this.count-=1,this.value.rem.push(e)},mod(e){this.value.mod.push(e)},init(e){this.value.init(e,e.NO_SOURCE)},evaluate(){return this.value}});function lp(e){O.call(this,{},e),this._keys=pu();const t=this._targets=[];t.active=0,t.forEach=n=>{for(let i=0,r=t.active;i<r;++i)n(t[i],i,t)}}H(lp,O,{activate(e){this._targets[this._targets.active++]=e},subflow(e,t,n,i){const r=this.value;let s=J(r,e)&&r[e],o,a;return s?s.value.stamp<n.stamp&&(s.init(n),this.activate(s)):(a=i||(a=this._group[e])&&a.tuple,o=n.dataflow,s=new Ub(n.fork(n.NO_SOURCE),this),o.add(s).connect(t(o,e,a)),r[e]=s,this.activate(s)),s},clean(){const e=this.value;let t=0;for(const n in e)if(e[n].count===0){const i=e[n].detachSubflow;i&&i(),delete e[n],++t}if(t){const n=this._targets.filter(i=>i&&i.count>0);this.initTargets(n)}},initTargets(e){const t=this._targets,n=t.length,i=e?e.length:0;let r=0;for(;r<i;++r)t[r]=e[r];for(;r<n&&t[r]!=null;++r)t[r]=null;t.active=i},transform(e,t){const n=t.dataflow,i=e.key,r=e.subflow,s=this._keys,o=e.modified("key"),a=u=>this.subflow(u,r,t);return this._group=e.group||{},this.initTargets(),t.visit(t.REM,u=>{const l=ie(u),c=s.get(l);c!==void 0&&(s.delete(l),a(c).rem(u))}),t.visit(t.ADD,u=>{const l=i(u);s.set(ie(u),l),a(l).add(u)}),o||t.modified(i.fields)?t.visit(t.MOD,u=>{const l=ie(u),c=s.get(l),f=i(u);c===f?a(f).mod(u):(s.set(l,f),a(c).rem(u),a(f).add(u))}):t.changed(t.MOD)&&t.visit(t.MOD,u=>{a(s.get(ie(u))).mod(u)}),o&&t.visit(t.REFLOW,u=>{const l=ie(u),c=s.get(l),f=i(u);c!==f&&(s.set(l,f),a(c).rem(u),a(f).add(u))}),t.clean()?n.runAfter(()=>{this.clean(),s.clean()}):s.empty>n.cleanThreshold&&n.runAfter(s.clean),t}});function Sk(e){Ne.call(this,null,z7,e)}H(Sk,Ne);
8function z7(e){return this.value&&!e.modified()?this.value:I(e.name)?K(e.name).map(t=>Vn(t)):Vn(e.name,e.as)}function jb(e){O.call(this,pu(),e)}jb.Definition={type:"Filter",metadata:{changes:!0},params:[{name:"expr",type:"expr",required:!0}]};H(jb,O,{transform(e,t){const n=t.dataflow,i=this.value,r=t.fork(),s=r.add,o=r.rem,a=r.mod,u=e.expr;let l=!0;t.visit(t.REM,f=>{const d=ie(f);i.has(d)?i.delete(d):o.push(f)}),t.visit(t.ADD,f=>{u(f,e)?s.push(f):i.set(ie(f),1)});function c(f){const d=ie(f),h=u(f,e),p=i.get(d);h&&p?(i.delete(d),s.push(f)):!h&&!p?(i.set(d,1),o.push(f)):l&&h&&!p&&a.push(f)}return t.visit(t.MOD,c),e.modified()&&(l=!1,t.visit(t.REFLOW,c)),i.empty>n.cleanThreshold&&n.runAfter(i.clean),r}});function qb(e){O.call(this,[],e)}qb.Definition={type:"Flatten",metadata:{generates:!0},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"index",type:"string"},{name:"as",type:"string",array:!0}]};H(qb,O,{transform(e,t){const n=t.fork(t.NO_SOURCE),i=e.fields,r=Ek(i,e.as||[]),s=e.index||null,o=r.length;return n.rem=this.value,t.visit(t.SOURCE,a=>{const u=i.map(p=>p(a)),l=u.reduce((p,g)=>Math.max(p,g.length),0);let c=0,f,d,h;for(;c<l;++c){for(d=db(a),f=0;f<o;++f)d[r[f]]=(h=u[f][c])==null?null:h;s&&(d[s]=c),n.add.push(d)}}),this.value=n.source=n.add,s&&n.modifies(s),n.modifies(r)}});function Wb(e){O.call(this,[],e)}Wb.Definition={type:"Fold",metadata:{generates:!0},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"as",type:"string",array:!0,length:2,default:["key","value"]}]};H(Wb,O,{transform(e,t){const n=t.fork(t.NO_SOURCE),i=e.fields,r=i.map(Ke),s=e.as||["key","value"],o=s[0],a=s[1],u=i.length;return n.rem=this.value,t.visit(t.SOURCE,l=>{for(let c=0,f;c<u;++c)f=db(l),f[o]=r[c],f[a]=i[c](l),n.add.push(f)}),this.value=n.source=n.add,n.modifies(s)}});function Gb(e){O.call(this,null,e)}Gb.Definition={type:"Formula",metadata:{modifies:!0},params:[{name:"expr",type:"expr",required:!0},{name:"as",type:"string",required:!0},{name:"initonly",type:"boolean"}]};H(Gb,O,{transform(e,t){const n=e.expr,i=e.as,r=e.modified(),s=e.initonly?t.ADD:r?t.SOURCE:t.modified(n.fields)||t.modified(i)?t.ADD_MOD:t.ADD;return r&&(t=t.materialize().reflow(!0)),e.initonly||t.modifies(i),t.visit(s,o=>o[i]=n(o,e))}});function Ck(e){O.call(this,[],e)}H(Ck,O,{transform(e,t){const n=t.fork(t.ALL),i=e.generator;let r=this.value,s=e.size-r.length,o,a,u;if(s>0){for(o=[];--s>=0;)o.push(u=$e(i(e))),r.push(u);n.add=n.add.length?n.materialize(n.ADD).add.concat(o):o}else a=r.slice(0,-s),n.rem=n.rem.length?n.materialize(n.REM).rem.concat(a):a,r=r.slice(-s);return n.source=this.value=r,n}});const pf={value:"value",median:d_,mean:G9,min:Dm,max:co},U7=[];function Hb(e){O.call(this,[],e)}Hb.Definition={type:"Impute",metadata:{changes:!0},params:[{name:"field",type:"field",required:!0},{name:"key",type:"field",required:!0},{name:"keyvals",array:!0},{name:"groupby",type:"field",array:!0},{name:"method",type:"enum",default:"value",values:["value","mean","median","max","min"]},{name:"value",default:0}]};function j7(e){var t=e.method||pf.value,n;if(pf[t]==null)T("Unrecognized imputation method: "+t);else return t===pf.value?(n=e.value!==void 0?e.value:0,()=>n):pf[t]}function q7(e){const t=e.field;return n=>n?t(n):NaN}H(Hb,O,{transform(e,t){var n=t.fork(t.ALL),i=j7(e),r=q7(e),s=Ke(e.field),o=Ke(e.key),a=(e.groupby||[]).map(Ke),u=W7(t.source,e.groupby,e.key,e.keyvals),l=[],c=this.value,f=u.domain.length,d,h,p,g,m,y,b,x,v,A;for(m=0,x=u.length;m<x;++m)for(d=u[m],p=d.values,h=NaN,b=0;b<f;++b)if(d[b]==null){for(g=u.domain[b],A={_impute:!0},y=0,v=p.length;y<v;++y)A[a[y]]=p[y];A[o]=g,A[s]=Number.isNaN(h)?h=i(d,r):h,l.push($e(A))}return l.length&&(n.add=n.materialize(n.ADD).add.concat(l)),c.length&&(n.rem=n.materialize(n.REM).rem.concat(c)),this.value=l,n}});function W7(e,t,n,i){var r=y=>y(m),s=[],o=i?i.slice():[],a={},u={},l,c,f,d,h,p,g,m;for(o.forEach((y,b)=>a[y]=b+1),d=0,g=e.length;d<g;++d)m=e[d],p=n(m),h=a[p]||(a[p]=o.push(p)),c=(l=t?t.map(r):U7)+"",(f=u[c])||(f=u[c]=[],s.push(f),f.values=l),f[h-1]=m;return s.domain=o,s}function Vb(e){vs.call(this,e)}Vb.Definition={type:"JoinAggregate",metadata:{modifies:!0},params:[{name:"groupby",type:"field",array:!0},{name:"fields",type:"field",null:!0,array:!0},{name:"ops",type:"enum",array:!0,values:bc},{name:"as",type:"string",null:!0,array:!0},{name:"key",type:"field"}]};H(Vb,vs,{transform(e,t){const n=this,i=e.modified();let r;return n.value&&(i||t.modified(n._inputs,!0))?(r=n.value=i?n.init(e):{},t.visit(t.SOURCE,s=>n.add(s))):(r=n.value=n.value||this.init(e),t.visit(t.REM,s=>n.rem(s)),t.visit(t.ADD,s=>n.add(s))),n.changes(),t.visit(t.SOURCE,s=>{fe(s,r[n.cellkey(s)].tuple)}),t.reflow(i).modifies(this._outputs)},changes(){const e=this._adds,t=this._mods;let n,i;for(n=0,i=this._alen;n<i;++n)this.celltuple(e[n]),e[n]=null;for(n=0,i=this._mlen;n<i;++n)this.celltuple(t[n]),t[n]=null;this._alen=this._mlen=0}});function Xb(e){O.call(this,null,e)}Xb.Definition={type:"KDE",metadata:{generates:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"cumulative",type:"boolean",default:!1},{name:"counts",type:"boolean",default:!1},{name:"bandwidth",type:"number",default:0},{name:"extent",type:"number",array:!0,length:2},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"steps",type:"number"},{name:"minsteps",type:"number",default:25},{name:"maxsteps",type:"number",default:200},{name:"as",type:"string",array:!0,default:["value","density"]}]};H(Xb,O,{transform(e,t){const n=t.fork(t.NO_SOURCE|t.NO_FIELDS);if(!this.value||t.changed()||e.modified()){const i=t.materialize(t.SOURCE).source,r=Ib(i,e.groupby,e.field),s=(e.groupby||[]).map(Ke),o=e.bandwidth,a=e.cumulative?"cdf":"pdf",u=e.as||["value","density"],l=[];let c=e.extent,f=e.steps||e.minsteps||25,d=e.steps||e.maxsteps||200;a!=="pdf"&&a!=="cdf"&&T("Invalid density method: "+a),e.resolve==="shared"&&(c||(c=Yi(i,e.field)),f=d=e.steps||d),r.forEach(h=>{const p=vb(h,o)[a],g=e.counts?h.length:1,m=c||Yi(h);
vendor: 4,261 bytes, line 8
8up(p,m,f,d).forEach(y=>{const b={};for(let x=0;x<s.length;++x)b[s[x]]=h.dims[x];b[u[0]]=y[0],b[u[1]]=y[1]*g,l.push($e(b))})}),this.value&&(n.rem=this.value),this.value=n.add=n.source=l}return n}});function $k(e){Ne.call(this,null,G7,e)}H($k,Ne);function G7(e){return this.value&&!e.modified()?this.value:tb(e.fields,e.flat)}function Fk(e){O.call(this,[],e),this._pending=null}H(Fk,O,{transform(e,t){const n=t.dataflow;return this._pending?t0(this,t,this._pending):H7(e)?t.StopPropagation:e.values?t0(this,t,n.parse(e.values,e.format)):e.async?{async:n.request(e.url,e.format).then(r=>(this._pending=K(r.data),s=>s.touch(this)))}:n.request(e.url,e.format).then(i=>t0(this,t,K(i.data)))}});function H7(e){return e.modified("async")&&!(e.modified("values")||e.modified("url")||e.modified("format"))}function t0(e,t,n){n.forEach($e);const i=t.fork(t.NO_FIELDS&t.NO_SOURCE);return i.rem=e.value,e.value=i.source=i.add=n,e._pending=null,i.rem.length&&i.clean(!0),i}function Yb(e){O.call(this,{},e)}Yb.Definition={type:"Lookup",metadata:{modifies:!0},params:[{name:"index",type:"index",params:[{name:"from",type:"data",required:!0},{name:"key",type:"field",required:!0}]},{name:"values",type:"field",array:!0},{name:"fields",type:"field",array:!0,required:!0},{name:"as",type:"string",array:!0},{name:"default",default:null}]};H(Yb,O,{transform(e,t){const n=e.fields,i=e.index,r=e.values,s=e.default==null?null:e.default,o=e.modified(),a=n.length;let u=o?t.SOURCE:t.ADD,l=t,c=e.as,f,d,h;return r?(d=r.length,a>1&&!c&&T('Multi-field lookup requires explicit "as" parameter.'),c&&c.length!==a*d&&T('The "as" parameter has too few output field names.'),c=c||r.map(Ke),f=function(p){for(var g=0,m=0,y,b;g<a;++g)if(b=i.get(n[g](p)),b==null)for(y=0;y<d;++y,++m)p[c[m]]=s;else for(y=0;y<d;++y,++m)p[c[m]]=r[y](b)}):(c||T("Missing output field names."),f=function(p){for(var g=0,m;g<a;++g)m=i.get(n[g](p)),p[c[g]]=m??s}),o?l=t.reflow(!0):(h=n.some(p=>t.modified(p.fields)),u|=h?t.MOD:0),t.visit(u,f),l.modifies(c)}});function _k(e){Ne.call(this,null,V7,e)}H(_k,Ne);function V7(e){if(this.value&&!e.modified())return this.value;const t=e.extents,n=t.length;let i=1/0,r=-1/0,s,o;for(s=0;s<n;++s)o=t[s],o[0]<i&&(i=o[0]),o[1]>r&&(r=o[1]);return[i,r]}function kk(e){Ne.call(this,null,X7,e)}H(kk,Ne);function X7(e){return this.value&&!e.modified()?this.value:e.values.reduce((t,n)=>t.concat(n),[])}function Dk(e){O.call(this,null,e)}H(Dk,O,{transform(e,t){return this.modified(e.modified()),this.value=e,t.fork(t.NO_SOURCE|t.NO_FIELDS)}});function Kb(e){vs.call(this,e)}Kb.Definition={type:"Pivot",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"value",type:"field",required:!0},{name:"op",type:"enum",values:bc,default:"sum"},{name:"limit",type:"number",default:0},{name:"key",type:"field"}]};H(Kb,vs,{_transform:vs.prototype.transform,transform(e,t){return this._transform(Y7(e,t),t)}});function Y7(e,t){const n=e.field,i=e.value,r=(e.op==="count"?"__count__":e.op)||"sum",s=Lt(n).concat(Lt(i)),o=J7(n,e.limit||0,t);return t.changed()&&e.set("__pivot__",null,null,!0),{key:e.key,groupby:e.groupby,ops:o.map(()=>r),fields:o.map(a=>K7(a,n,i,s)),as:o.map(a=>a+""),modified:e.modified.bind(e)}}function K7(e,t,n,i){return wn(r=>t(r)===e?n(r):NaN,i,e+"")}function J7(e,t,n){const i={},r=[];return n.visit(n.SOURCE,s=>{const o=e(s);i[o]||(i[o]=1,r.push(o))}),r.sort(hu),t?r.slice(0,t):r}function Rk(e){lp.call(this,e)}H(Rk,lp,{transform(e,t){const n=e.subflow,i=e.field,r=s=>this.subflow(ie(s),n,t,s);return(e.modified("field")||i&&t.modified(Lt(i)))&&T("PreFacet does not support field modification."),this.initTargets(),i?(t.visit(t.MOD,s=>{const o=r(s);i(s).forEach(a=>o.mod(a))}),t.visit(t.ADD,s=>{const o=r(s);i(s).forEach(a=>o.add($e(a)))}),t.visit(t.REM,s=>{const o=r(s);i(s).forEach(a=>o.rem(a))})):(t.visit(t.MOD,s=>r(s).mod(s)),t.visit(t.ADD,s=>r(s).add(s)),t.visit(t.REM,s=>r(s).rem(s))),t.clean()&&t.runAfter(()=>this.clean()),t}});function Jb(e){O.call(this,null,e)}Jb.Definition={type:"Project",metadata:{generates:!0,changes:!0},params:[{name:"fields",type:"field",array:!0},{name:"as",type:"string",null:!0,array:!0}]};H(Jb,O,{transform(e,t){const n=t.fork(t.NO_SOURCE),i=e.fields,r=Ek(e.f
8ields,e.as||[]),s=i?(a,u)=>Q7(a,u,i,r):tp;let o;return this.value?o=this.value:(t=t.addAll(),o=this.value={}),t.visit(t.REM,a=>{const u=ie(a);n.rem.push(o[u]),o[u]=null}),t.visit(t.ADD,a=>{const u=s(a,$e({}));o[ie(a)]=u,n.add.push(u)}),t.visit(t.MOD,a=>{n.mod.push(s(a,o[ie(a)]))}),n}});function Q7(e,t,n,i){for(let r=0,s=n.length;r<s;++r)t[i[r]]=n[r](e);return t}function Ok(e){O.call(this,null,e)}H(Ok,O,{transform(e,t){return this.value=e.value,e.modified("value")?t.fork(t.NO_SOURCE|t.NO_FIELDS):t.StopPropagation}});function Qb(e){O.call(this,null,e)}Qb.Definition={type:"Quantile",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"probs",type:"number",array:!0},{name:"step",type:"number",default:.01},{name:"as",type:"string",array:!0,default:["prob","value"]}]};const Z7=1e-14;H(Qb,O,{transform(e,t){const n=t.fork(t.NO_SOURCE|t.NO_FIELDS),i=e.as||["prob","value"];if(this.value&&!e.modified()&&!t.changed())return n.source=this.value,n;const r=t.materialize(t.SOURCE).source,s=Ib(r,e.groupby,e.field),o=(e.groupby||[]).map(Ke),a=[],u=e.step||.01,l=e.probs||zo(u/2,1-Z7,u),c=l.length;return s.forEach(f=>{const d=gb(f,l);for(let h=0;h<c;++h){const p={};for(let g=0;g<o.length;++g)p[o[g]]=f.dims[g];p[i[0]]=l[h],p[i[1]]=d[h],a.push($e(p))}}),this.value&&(n.rem=this.value),this.value=n.add=n.source=a,n}});function Tk(e){O.call(this,null,e)}H(Tk,O,{transform(e,t){let n,i;return this.value?i=this.value:(n=t=t.addAll(),i=this.value={}),e.derive&&(n=t.fork(t.NO_SOURCE),t.visit(t.REM,r=>{const s=ie(r);n.rem.push(i[s]),i[s]=null}),t.visit(t.ADD,r=>{const s=db(r);i[ie(r)]=s,n.add.push(s)}),t.visit(t.MOD,r=>{const s=i[ie(r)];for(const o in r)s[o]=r[o],n.modifies(o);n.mod.push(s)})),n}});function Zb(e){O.call(this,[],e),this.count=0}Zb.Definition={type:"Sample",metadata:{},params:[{name:"size",type:"number",default:1e3}]};H(Zb,O,{transform(e,t){const n=t.fork(t.NO_SOURCE),i=e.modified("size"),r=e.size,s=this.value.reduce((c,f)=>(c[ie(f)]=1,c),{});let o=this.value,a=this.count,u=0;function l(c){let f,d;o.length<r?o.push(c):(d=~~((a+1)*Kn()),d<o.length&&d>=u&&(f=o[d],s[ie(f)]&&n.rem.push(f),o[d]=c)),++a}if(t.rem.length&&(t.visit(t.REM,c=>{const f=ie(c);s[f]&&(s[f]=-1,n.rem.push(c)),--a}),o=o.filter(c=>s[ie(c)]!==-1)),(t.rem.length||i)&&o.length<r&&t.source&&(u=a=o.length,t.visit(t.SOURCE,c=>{s[ie(c)]||l(c)}),u=-1),i&&o.length>r){const c=o.length-r;for(let f=0;f<c;++f)s[ie(o[f])]=-1,n.rem.push(o[f]);o=o.slice(c)}return t.mod.length&&t.visit(t.MOD,c=>{s[ie(c)]&&n.mod.push(c)}),t.add.length&&t.visit(t.ADD,l),(t.add.length||u<0)&&(n.add=o.filter(c=>!s[ie(c)])),this.count=a,this.value=n.source=o,n}});function ex(e){O.call(this,null,e)}ex.Definition={type:"Sequence",metadata:{generates:!0,changes:!0},params:[{name:"start",type:"number",required:!0},{name:"stop",type:"number",required:!0},{name:"step",type:"number",default:1},{name:"as",type:"string",default:"data"}]};H(ex,O,{transform(e,t){if(this.value&&!e.modified())return;const n=t.materialize().fork(t.MOD),i=e.as||"data";return n.rem=this.value?t.rem.concat(this.value):t.rem,this.value=zo(e.start,e.stop,e.step||1).map(r=>{const s={};return s[i]=r,$e(s)}),n.add=t.add.concat(this.value),n}});function Mk(e){O.call(this,null,e),this.modified(!0)}H(Mk,O,{transform(e,t){return this.value=t.source,t.changed()?t.fork(t.NO_SOURCE|t.NO_FIELDS):t.StopPropagation}});function tx(e){O.call(this,null,e)}const Nk=["unit0","unit1"];tx.Definition={type:"TimeUnit",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"interval",type:"boolean",default:!0},{name:"units",type:"enum",values:sb,array:!0},{name:"step",type:"number",default:1},{name:"maxbins",type:"number",default:40},{name:"extent",type:"date",array:!0},{name:"timezone",type:"enum",default:"local",values:["local","utc"]},{name:"as",type:"string",array:!0,length:2,default:Nk}]};H(tx,O,{transform(e,t){const n=e.field,i=e.interval!==!1,r=e.timezone==="utc",s=this._floor(e,t),o=(r?mu:gu)(s.unit).offset,a=e.as||Nk,u=a[0],l=a[1],c=s.step;let f=s.start||1/0,d=s.stop||-1/0,h=t.ADD;return(e.modified()||t.changed(t.REM)||t.modified(Lt(n)))&&(t=t.reflow(!0),h=t.SOURCE,f=1/0,d=-1/0),t.visit(h,p=>{const g=n(p);let m,y;g==null?(p[u]=null,i&&(p[l]=null)):(p[u]=m=y=s(g),i&&(p[l]=y=o(m,c)),m<f&&(f=m),y>d&&(d=y))}),s.start=f,s.stop=d,t.modifies(i?a:u)},_floor(e,t){const n=e.timezone==="utc",{units:i,step:r}=e.units?{units:e.units,step:e.step||1}:O_({extent:e.extent||Yi(t.materialize(t.SOURCE).source,e.field),maxbins:e.maxbins}
8),s=ob(i),o=this.value||{},a=(n?w_:A_)(s,r);return a.unit=ve(s),a.units=s,a.step=r,a.start=o.start,a.stop=o.stop,this.value=a}});function Lk(e){O.call(this,pu(),e)}H(Lk,O,{transform(e,t){const n=t.dataflow,i=e.field,r=this.value,s=a=>r.set(i(a),a);let o=!0;return e.modified("field")||t.modified(i.fields)?(r.clear(),t.visit(t.SOURCE,s)):t.changed()?(t.visit(t.REM,a=>r.delete(i(a))),t.visit(t.ADD,s)):o=!1,this.modified(o),r.empty>n.cleanThreshold&&n.runAfter(r.clean),t.fork()}});function Pk(e){O.call(this,null,e)}H(Pk,O,{transform(e,t){(!this.value||e.modified("field")||e.modified("sort")||t.changed()||e.sort&&t.modified(e.sort.fields))&&(this.value=(e.sort?t.source.slice().sort(Uo(e.sort)):t.source).map(e.field))}});function eL(e,t,n,i){const r=ql[e](t,n);return{init:r.init||rs,update:function(s,o){o[i]=r.next(s)}}}const ql={row_number:function(){return{next:e=>e.index+1}},rank:function(){let e;return{init:()=>e=1,next:t=>{const n=t.index,i=t.data;return n&&t.compare(i[n-1],i[n])?e=n+1:e}}},dense_rank:function(){let e;return{init:()=>e=1,next:t=>{const n=t.index,i=t.data;return n&&t.compare(i[n-1],i[n])?++e:e}}},percent_rank:function(){const e=ql.rank(),t=e.next;return{init:e.init,next:n=>(t(n)-1)/(n.data.length-1)}},cume_dist:function(){let e;return{init:()=>e=0,next:t=>{const n=t.data,i=t.compare;let r=t.index;if(e<r){for(;r+1<n.length&&!i(n[r],n[r+1]);)++r;e=r}return(1+e)/n.length}}},ntile:function(e,t){t=+t,t>0||T("ntile num must be greater than zero.");const n=ql.cume_dist(),i=n.next;return{init:n.init,next:r=>Math.ceil(t*i(r))}},lag:function(e,t){return t=+t||1,{next:n=>{const i=n.index-t;return i>=0?e(n.data[i]):null}}},lead:function(e,t){return t=+t||1,{next:n=>{const i=n.index+t,r=n.data;return i<r.length?e(r[i]):null}}},first_value:function(e){return{next:t=>e(t.data[t.i0])}},last_value:function(e){return{next:t=>e(t.data[t.i1-1])}},nth_value:function(e,t){return t=+t,t>0||T("nth_value nth must be greater than zero."),{next:n=>{const i=n.i0+(t-1);return i<n.i1?e(n.data[i]):null}}},prev_value:function(e){let t;return{init:()=>t=null,next:n=>{const i=e(n.data[n.index]);return i!=null?t=i:t}}},next_value:function(e){let t,n;return{init:()=>(t=null,n=-1),next:i=>{const r=i.data;return i.index<=n?t:(n=tL(e,r,i.index))<0?(n=r.length,t=null):t=e(r[n])}}}};function tL(e,t,n){for(let i=t.length;n<i;++n)if(e(t[n])!=null)return n;return-1}const nL=Object.keys(ql);function Ik(e){const t=K(e.ops),n=K(e.fields),i=K(e.params),r=K(e.aggregate_params),s=K(e.as),o=this.outputs=[],a=this.windows=[],u={},l={},c=[],f=[];let d=!0;function h(p){K(Lt(p)).forEach(g=>u[g]=1)}h(e.sort),t.forEach((p,g)=>{const m=n[g],y=i[g],b=r[g]||null,x=Ke(m),v=hk(p,x,s[g]);if(h(m),o.push(v),J(ql,p))a.push(eL(p,m,y,v));else{if(m==null&&p!=="count"&&T("Null aggregate field specified."),p==="count"){c.push(v);return}d=!1;let A=l[x];A||(A=l[x]=[],A.field=m,f.push(A)),A.push(pk(p,b,v))}}),(c.length||f.length)&&(this.cell=iL(f,c,d)),this.inputs=Object.keys(u)}const Bk=Ik.prototype;Bk.init=function(){this.windows.forEach(e=>e.init()),this.cell&&this.cell.init()};Bk.update=function(e,t){const n=this.cell,i=this.windows,r=e.data,s=i&&i.length;let o;if(n){for(o=e.p0;o<e.i0;++o)n.rem(r[o]);for(o=e.p1;o<e.i1;++o)n.add(r[o]);n.set(t)}for(o=0;o<s;++o)i[o].update(e,t)};function iL(e,t,n){e=e.map(u=>mk(u,u.field));const i={num:0,agg:null,store:!1,count:t};if(!n)for(var r=e.length,s=i.agg=Array(r),o=0;o<r;++o)s[o]=new e[o](i);if(i.store)var a=i.data=new Ob;return i.add=function(u){if(i.num+=1,!n){a&&a.add(u);for(let l=0;l<r;++l)s[l].add(s[l].get(u),u)}},i.rem=function(u){if(i.num-=1,!n){a&&a.rem(u);for(let l=0;l<r;++l)s[l].rem(s[l].get(u),u)}},i.set=function(u){let l,c;for(a&&a.values(),l=0,c=t.length;l<c;++l)u[t[l]]=i.num;if(!n)for(l=0,c=s.length;l<c;++l)s[l].set(u)},i.init=function(){i.num=0,a&&a.reset();for(let u=0;u<r;++u)s[u].init()},i}function nx(e){O.call(this,{},e),this._mlen=0,this._mods=[]}nx.Definition={type:"Window",metadata:{modifies:!0},params:[{name:"sort",type:"compare"},{name:"groupby",type:"field",array:!0},{name:"ops",type:"enum",array:!0,values:nL.concat(bc)},{name:"params",type:"number",null:!0,array:!0},{name:"aggregate_params",type:"number",null:!0,array:!0},{name:"fields",type:"field",null:!0,array:!0},{name:"as",type:"string",null:!0,array:!0},{name:"frame",type:"number",null:!0,array:!0,length:2,default:[null,0]},{name:"ignorePeers",type:"boolean",default:!1}]};H(nx,O,{transform(e,t){this.stamp=t.stamp;const n=e.modified(),i=Uo(e.sort),r=Um(e.groupby),s=a=>this.group(r(a));let o=this.state;(!o||n)&&(o=this.state=new Ik(e)),n||t.modified(o.inputs)?(this.value={},t.visit(t.SOURCE,a=>s(a).add(a))):(t.visit(t.REM,a=>s(a).remove(a)),t.visit(t.ADD,a=>s(a).add(a)));for(let a=0,u=this._mlen;a<u;++a)rL(this._mods[a],o,i,e);return this._mlen=0,this._mods=[],t.reflow(n).modifies(o.outputs)},group(e){let t=this.value[e];return t||(t=this.value[e]=yk(ie),t.stamp=-1),t.stamp<this.stamp&&(t.stamp=this.stamp,this._mods[this._mlen++]=t),t}});function rL(e,t,n,i){const r=i.sort,s=r&&!i.ignorePeers,o=i.frame||[null,0],a=e.data(n),u=a.length,l=s?Kh(r):null,c={i0:0,i1:0,p0:0,p1:0,index:0,data:a,compare:r||qt(-1)};t.init();for(let f=0;f<u;++f)sL(c,o,f,u),s&&oL(c,l),t.update(c,a[f])}function sL(e,t,n,i){e.p0=e.i0,e.p1=e.i1,e.i0=t[0]==null?0:Math.max(0,n-Math.abs(t[0])),e.i1=t[1]==null?i:Math.min(i,n+Math.abs(t[1])+1),e.index=n}function oL(e,t){const n=e.i0,i=e.i1-1,r=e.compare,s=e.data,o=s.length-1;n>0&&!r(s[n],s[n-1])&&(e.i0=t.left(s,s[n])),i<o&&!r(s[i],s[i+1])&&(e.i1=t.right(s,s[i]))}const aL=Object.freeze(Object.defineProperty({__proto__:null,aggregate:vs,bin:Tb,collect:Mb,compare:bk,countpattern:Nb,cross:Lb,density:Pb,dotbin:Bb,expression:wk,extent:zb,facet:lp,field:Sk,filter:jb,flatten:qb,fold:Wb,formula:Gb,generate:Ck,impute:Hb,joinaggregate:Vb,kde:Xb,key:$k,load:Fk,lookup:Yb,multiextent:_k,multivalues:kk,params:Dk,pivot:Kb,prefacet:Rk,project:Jb,proxy:Ok,quantile:Qb,relay:Tk,sample:Zb,sequence:ex,sieve:Mk,subflow:Ub,timeunit:tx,tupleindex:Lk,values:P
8k,window:nx},Symbol.toStringTag,{value:"Module"}));function ys(e,t){if(typeof document<"u"&&document.createElement){const n=document.createElement("canvas");if(n&&n.getContext)return n.width=e,n.height=t,n}return null}const uL=()=>typeof Image<"u"?Image:null;function ir(e){for(var t=e.length/6|0,n=new Array(t),i=0;i<t;)n[i]="#"+e.slice(i*6,++i*6);return n}const lL=ir("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),cL=ir("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),fL=ir("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),dL=ir("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),hL=ir("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),pL=ir("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),gL=ir("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),mL=ir("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),yL=ir("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),bL=ir("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");function ix(e,t,n){const i=e-t+n*2;return e?i>0?i:1:0}const xL="identity",Ia="linear",Mr="log",xc="pow",vc="sqrt",cp="symlog",xo="time",vo="utc",Gi="sequential",bu="diverging",Ba="quantile",fp="quantize",dp="threshold",rx="ordinal",jm="point",zk="band",sx="bin-ordinal",at="continuous",Ec="discrete",Ac="discretizing",ei="interpolating",ox="temporal";function vL(e){return function(t){let n=t[0],i=t[1],r;return i<n&&(r=n,n=i,i=r),[e.invert(n),e.invert(i)]}}function EL(e){return function(t){const n=e.range();let i=t[0],r=t[1],s=-1,o,a,u,l;for(r<i&&(a=i,i=r,r=a),u=0,l=n.length;u<l;++u)n[u]>=i&&n[u]<=r&&(s<0&&(s=u),o=u);if(!(s<0))return i=e.invertExtent(n[s]),r=e.invertExtent(n[o]),[i[0]===void 0?i[1]:i[0],r[1]===void 0?r[0]:r[1]]}}function ax(){const e=gF().unknown(void 0),t=e.domain,n=e.range;let i=[0,1],r,s,o=!1,a=0,u=0,l=.5;delete e.unknown;function c(){const f=t().length,d=i[1]<i[0],h=i[1-d],p=ix(f,a,u);let g=i[d-0];r=(h-g)/(p||1),o&&(r=Math.floor(r)),g+=(h-g-r*(f-a))*l,s=r*(1-a),o&&(g=Math.round(g),s=Math.round(s));const m=zo(f).map(y=>g+r*y);return n(d?m.reverse():m)}return e.domain=function(f){return arguments.length?(t(f),c()):t()},e.range=function(f){return arguments.length?(i=[+f[0],+f[1]],c()):i.slice()},e.rangeRound=function(f){return i=[+f[0],+f[1]],o=!0,c()},e.bandwidth=function(){return s},e.step=function(){return r},e.round=function(f){return arguments.length?(o=!!f,c()):o},e.padding=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),a=u,c()):a},e.paddingInner=function(f){return arguments.length?(a=Math.max(0,Math.min(1,f)),c()):a},e.paddingOuter=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),c()):u},e.align=function(f){return arguments.length?(l=Math.max(0,Math.min(1,f)),c()):l},e.invertRange=function(f){if(f[0]==null||f[1]==null)return;const d=i[1]<i[0],h=d?n().reverse():n(),p=h.length-1;let g=+f[0],m=+f[1],y,b,x;if(!(g!==g||m!==m)&&(m<g&&(x=g,g=m,m=x),!(m<h[0]||g>i[1-d])))return y=Math.max(0,Dd(h,g)-1),b=g===m?y:Dd(h,m)-1,g-h[y]>s+1e-10&&++y,d&&(x=y,y=p-b,b=p-x),y>b?void 0:t().slice(y,b+1)},e.invert=function(f){const d=e.invertRange([f,f]);return d&&d[0]},e.copy=function(){return ax().domain(t()).range(i).round(o).paddingInner(a).paddingOuter(u).align(l)},c()}function Uk(e){const t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,e.copy=function(){return Uk(t())},e}function AL(){return Uk(ax().paddingInner(1))}var wL=Array.prototype.map;function SL(e){return wL.call(e,Mt)}const CL=Array.prototype.slice;function jk(){let e=[],t=[];function n(i){return i==null||i!==i?void 0:t[(Dd(e,i)-1)%t.length]}return n.domain=function(i){return arguments.length?(e=SL(i),n):e.slice()},n.range=function(i){return arguments.length?(t=CL.call(i),n):t.slice()},n.tickFormat=function(i,r){return t8(e[0],ve(e),i??10,r)},n.copy=function(){return jk().domain(n.domain()).range(n.range())},n}const Td=new Map,qk=Symbol("vega_scale");function Wk(e){return e[qk]=!0,e}function FA(e){return e&&e[qk]===!0}function $L(e,t,n){const i=function(){const s=t();return s.invertRange||(s.invertRange=s.invert?vL(s):s.invertExtent?EL(s):void 0),s.type=e,Wk(s)};return i.metadata=mi(K(n)),i}function Ce(e,t,n){return arguments.length>1?(Td.set(e,$L(e,t,n)),this):Gk(e)?Td.get(e):void 0}Ce(xL,N6);Ce(Ia,L6,at);Ce(Mr,P6,[at,Mr]);Ce(xc,I6,at);Ce(vc,B6,at);Ce(cp,z6,at);Ce(xo,U6,[at,ox]);Ce(vo,j6,[at,ox]);Ce(Gi,pF,[at,ei]);Ce(`${Gi}-${Ia}`,pF,[at,ei]);Ce(`${Gi}-${Mr}`,q6,[at,ei,Mr]);Ce(`${Gi}-${xc}`,W6,[at,ei]);Ce(`${Gi}-${vc}`,G6,[at,ei]);Ce(`${Gi}-${cp}`,H6,[at,ei]);Ce(`${bu}-${Ia}`,V6,[at,ei]);Ce(`${bu}-${Mr}`,X6,[at,ei,Mr]);Ce(`${bu}-${xc}`,Y6,[at,ei]);Ce(`${bu}-${vc}`,K6,[at,ei]);Ce(`${bu}-${cp}`,J6,[at,ei]);Ce(Ba,Q6,[Ac,Ba]);Ce(fp,Z6,Ac);Ce(dp,e8,Ac);Ce(sx,jk,[Ec,Ac]);Ce(rx,gF,Ec);Ce(zk,ax,Ec);Ce(jm,AL,Ec);function Gk(e){return Td.has(e)}function qo(e,t){const n=Td.get(e);return n&&n.metadata[t]}function ux(e){return qo(e,at)}function za(e){return qo(e,Ec)}function qm(e){return qo(e,Ac)}function Hk(e){return qo(e,Mr)}function FL(e){return qo(e,ox)}function Vk(e){return qo(e,ei)}function Xk(e){return qo(e,Ba)}const _L=["clamp","base","constant","exponent"];function Yk(e,t){const n=t[0],i=ve(t)-n;return function(r){return e(n+r*i)}}function hp(e,t,n){return uF(lx(t||"rgb",n),e)}function Kk(e,t){const n=new Array(t),i=t+1;for(let r=0;r<t;)n[r]=e(++r/i);return n}function Jk(e,t,n){const i=n-t;let r,s,o;return!i||!Number.isFinite(i)?qt(.5):(r=(s=e.type).indexOf("-"),s=r<0?s:s.slice(r+1),o=Ce(s)().domain([t,n]).range([0,1]),_L.forEac
8h(a=>e[a]?o[a](e[a]()):0),o)}function lx(e,t){const n=W8[kL(e)];return t!=null&&n&&n.gamma?n.gamma(t):n}function kL(e){return"interpolate"+e.toLowerCase().split("-").map(t=>t[0].toUpperCase()+t.slice(1)).join("")}const DL={blues:"cfe1f2bed8eca8cee58fc1de74b2d75ba3cf4592c63181bd206fb2125ca40a4a90",greens:"d3eecdc0e6baabdda594d3917bc77d60ba6c46ab5e329a512089430e7735036429",greys:"e2e2e2d4d4d4c4c4c4b1b1b19d9d9d8888887575756262624d4d4d3535351e1e1e",oranges:"fdd8b3fdc998fdb87bfda55efc9244f87f2cf06b18e4580bd14904b93d029f3303",purples:"e2e1efd4d4e8c4c5e0b4b3d6a3a0cc928ec3827cb97566ae684ea25c3696501f8c",reds:"fdc9b4fcb49afc9e80fc8767fa7051f6573fec3f2fdc2a25c81b1db21218970b13",blueGreen:"d5efedc1e8e0a7ddd18bd2be70c6a958ba9144ad77319c5d2089460e7736036429",bluePurple:"ccddecbad0e4a8c2dd9ab0d4919cc98d85be8b6db28a55a6873c99822287730f71",greenBlue:"d3eecec5e8c3b1e1bb9bd8bb82cec269c2ca51b2cd3c9fc7288abd1675b10b60a1",orangeRed:"fddcaffdcf9bfdc18afdad77fb9562f67d53ee6545e24932d32d1ebf130da70403",purpleBlue:"dbdaebc8cee4b1c3de97b7d87bacd15b9fc93a90c01e7fb70b70ab056199045281",purpleBlueGreen:"dbd8eac8cee4b0c3de93b7d872acd1549fc83892bb1c88a3097f8702736b016353",purpleRed:"dcc9e2d3b3d7ce9eccd186c0da6bb2e14da0e23189d91e6fc61159ab07498f023a",redPurple:"fccfccfcbec0faa9b8f98faff571a5ec539ddb3695c41b8aa908808d0179700174",yellowGreen:"e4f4acd1eca0b9e2949ed68880c97c62bb6e47aa5e3297502083440e723b036034",yellowOrangeBrown:"feeaa1fedd84fecc63feb746fca031f68921eb7215db5e0bc54c05ab3d038f3204",yellowOrangeRed:"fee087fed16ffebd59fea849fd903efc7335f9522bee3423de1b20ca0b22af0225",blueOrange:"134b852f78b35da2cb9dcae1d2e5eff2f0ebfce0bafbbf74e8932fc5690d994a07",brownBlueGreen:"704108a0651ac79548e3c78af3e6c6eef1eac9e9e48ed1c74da79e187a72025147",purpleGreen:"5b1667834792a67fb6c9aed3e6d6e8eff0efd9efd5aedda971bb75368e490e5e29",purpleOrange:"4114696647968f83b7b9b4d6dadbebf3eeeafce0bafbbf74e8932fc5690d994a07",redBlue:"8c0d25bf363adf745ef4ae91fbdbc9f2efeed2e5ef9dcae15da2cb2f78b3134b85",redGrey:"8c0d25bf363adf745ef4ae91fcdccbfaf4f1e2e2e2c0c0c0969696646464343434",yellowGreenBlue:"eff9bddbf1b4bde5b594d5b969c5be45b4c22c9ec02182b82163aa23479c1c3185",redYellowBlue:"a50026d4322cf16e43fcac64fedd90faf8c1dcf1ecabd6e875abd04a74b4313695",redYellowGreen:"a50026d4322cf16e43fcac63fedd8df9f7aed7ee8ea4d86e64bc6122964f006837",pinkYellowGreen:"8e0152c0267edd72adf0b3d6faddedf5f3efe1f2cab6de8780bb474f9125276419",spectral:"9e0142d13c4bf0704afcac63fedd8dfbf8b0e0f3a1a9dda269bda94288b55e4fa2",viridis:"440154470e61481a6c482575472f7d443a834144873d4e8a39568c35608d31688e2d708e2a788e27818e23888e21918d1f988b1fa08822a8842ab07f35b77943bf7154c56866cc5d7ad1518fd744a5db36bcdf27d2e21be9e51afde725",magma:"0000040404130b0924150e3720114b2c11603b0f704a107957157e651a80721f817f24828c29819a2e80a8327db6377ac43c75d1426fde4968e95462f1605df76f5cfa7f5efc8f65fe9f6dfeaf78febf84fece91fddea0fcedaffcfdbf",inferno:"0000040403130c0826170c3b240c4f330a5f420a68500d6c5d126e6b176e781c6d86216b932667a12b62ae305cbb3755c73e4cd24644dd513ae65c30ed6925f3771af8850ffb9506fca50afcb519fac62df6d645f2e661f3f484fcffa4",plasma:"0d088723069033059742039d5002a25d01a66a00a87801a88405a7900da49c179ea72198b12a90ba3488c33d80cb4779d35171da5a69e16462e76e5bed7953f2834cf68f44fa9a3dfca636fdb32ffec029fcce25f9dc24f5ea27f0f921",cividis:"00205100235800265d002961012b65042e670831690d346b11366c16396d1c3c6e213f6e26426e2c456e31476e374a6e3c4d6e42506e47536d4c566d51586e555b6e5a5e6e5e616e62646f66676f6a6a706e6d717270717573727976737c79747f7c75827f758682768985778c8877908b78938e789691789a94789e9778a19b78a59e77a9a177aea575b2a874b6ab73bbaf71c0b26fc5b66dc9b96acebd68d3c065d8c462ddc85fe2cb5ce7cf58ebd355f0d652f3da4ff7de4cfae249fce647",rainbow:"6e40aa883eb1a43db3bf3cafd83fa4ee4395fe4b83ff576eff6659ff7847ff8c38f3a130e2b72fcfcc36bee044aff05b8ff4576ff65b52f6673af27828ea8d1ddfa319d0b81cbecb23abd82f96e03d82e14c6edb5a5dd0664dbf6e40aa",sinebow:"ff4040fc582af47218e78d0bd5a703bfbf00a7d5038de70b72f41858fc2a40ff402afc5818f4720be78d03d5a700bfbf03a7d50b8de71872f42a58fc4040ff582afc7218f48d0be7a703d5bf00bfd503a7e70b8df41872fc2a58ff4040",turbo:"23171b32204a3e2a71453493493eae4b49c54a53d7485ee44569ee4074f53c7ff8378af93295f72e9ff42ba9ef28b3e926bce125c5d925cdcf27d5c629dcbc2de3b232e9a738ee9d3ff39347f68950f9805afc7765fd6e70fe667cfd5e88fc5795fb51a1f84badf545b9f140c5ec3cd0e637dae034e4d93
81ecd12ef4c92bfac029ffb626ffad24ffa223ff9821ff8d1fff821dff771cfd6c1af76118f05616e84b14df4111d5380fcb2f0dc0260ab61f07ac1805a313029b0f00950c00910b00",browns:"eedbbdecca96e9b97ae4a865dc9856d18954c7784cc0673fb85536ad44339f3632",tealBlues:"bce4d89dd3d181c3cb65b3c245a2b9368fae347da0306a932c5985",teals:"bbdfdfa2d4d58ac9c975bcbb61b0af4da5a43799982b8b8c1e7f7f127273006667",warmGreys:"dcd4d0cec5c1c0b8b4b3aaa7a59c9998908c8b827f7e7673726866665c5a59504e",goldGreen:"f4d166d5ca60b6c35c98bb597cb25760a6564b9c533f8f4f33834a257740146c36",goldOrange:"f4d166f8be5cf8aa4cf5983bf3852aef701be2621fd65322c54923b142239e3a26",goldRed:"f4d166f6be59f9aa51fc964ef6834bee734ae56249db5247cf4244c43141b71d3e",lightGreyRed:"efe9e6e1dad7d5cbc8c8bdb9bbaea9cd967ddc7b43e15f19df4011dc000b",lightGreyTeal:"e4eaead6dcddc8ced2b7c2c7a6b4bc64b0bf22a6c32295c11f85be1876bc",lightMulti:"e0f1f2c4e9d0b0de9fd0e181f6e072f6c053f3993ef77440ef4a3c",lightOrange:"f2e7daf7d5baf9c499fab184fa9c73f68967ef7860e8645bde515bd43d5b",lightTealBlue:"e3e9e0c0dccf9aceca7abfc859afc0389fb9328dad2f7ca0276b95255988",darkBlue:"3232322d46681a5c930074af008cbf05a7ce25c0dd38daed50f3faffffff",darkGold:"3c3c3c584b37725e348c7631ae8b2bcfa424ecc31ef9de30fff184ffffff",darkGreen:"3a3a3a215748006f4d048942489e4276b340a6c63dd2d836ffeb2cffffaa",darkMulti:"3737371f5287197d8c29a86995ce3fffe800ffffff",darkRed:"3434347036339e3c38cc4037e75d1eec8620eeab29f0ce32ffeb2c"},RL={accent:cL,category10:lL,category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",dark2:fL,observable10:dL,paired:hL,pastel1:pL,pastel2:gL,set1:mL,set2:yL,set3:bL,tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5"};function Qk(e){if(I(e))return e;const t=e.length/6|0,n=new Array(t);for(let i=0;i<t;)n[i]="#"+e.slice(i*6,++i*6);return n}function Zk(e,t){for(const n in e)cx(n,t(e[n]))}const _A={};Zk(RL,Qk);Zk(DL,e=>hp(Qk(e)));function cx(e,t){return e=e&&e.toLowerCase(),arguments.length>1?(_A[e]=t,this):_A[e]}const Qf="symbol",OL="discrete",TL="gradient",ML=e=>I(e)?e.map(t=>String(t)):String(e),NL=(e,t)=>e[1]-t[1],LL=(e,t)=>t[1]-e[1];function fx(e,t,n){let i;return Se(t)&&(e.bins&&(t=Math.max(t,e.bins.length)),n!=null&&(t=Math.min(t,Math.floor(gc(e.domain())/n||1)+1))),X(t)&&(i=t.step,t=t.interval),Y(t)&&(t=e.type===xo?gu(t):e.type==vo?mu(t):T("Only time and utc scales accept interval strings."),i&&(t=t.every(i))),t}function eD(e,t,n){let i=e.range(),r=i[0],s=ve(i),o=NL;if(r>s&&(i=s,s=r,r=i,o=LL),r=Math.floor(r),s=Math.ceil(s),t=t.map(a=>[a,e(a)]).filter(a=>r<=a[1]&&a[1]<=s).sort(o).map(a=>a[0]),n>0&&t.length>1){const a=[t[0],ve(t)];for(;t.length>n&&t.length>=3;)t=t.filter((u,l)=>!(l%2));t.length<3&&(t=a)}return t}function dx(e,t){return e.bins?eD(e,e.bins,t):e.ticks?e.ticks(t):e.domain()}function tD(e,t,n,i,r,s){const o=t.type;let a=ML;if(o===xo||r===xo)a=e.timeFormat(i);else if(o===vo||r===vo)a=e.utcFormat(i);else if(Hk(o)){const u=e.formatFloat(i);if(s||t.bins)a=u;else{const l=nD(t,n,!1);a=c=>l(c)?u(c):""}}else if(t.tickFormat){const u=t.domain();a=e.formatSpan(u[0],u[u.length-1],n,i)}else i&&(a=e.format(i));return a}function nD(e,t,n){const i=dx(e,t),r=e.base(),s=Math.log(r),o=Math.max(1,r*t/i.length),a=u=>{let l=u/Math.pow(r,Math.round(Math.log(u)/s));return l*r<r-.5&&(l*=r),l<=o};return n?i.filter(a):a}const Wm={[Ba]:"quantiles",[fp]:"thresholds",[dp]:"domain"},iD={[Ba]:"quantiles",[fp]:"domain"};function rD(e,t){return e.bins?BL(e.bins):e.type===Mr?nD(e,t,!0):Wm[e.type]?IL(e[Wm[e.type]]()):dx(e,t)}function PL(e,t,n){const i=t[iD[t.type]](),r=i.length;let s=r>1?i[1]-i[0]:i[0],o;for(o=1;o<r;++o)s=Math.min(s,i[o]-i[o-1]);return e.formatSpan(0,s,3*10,n)}function IL(e){const t=[-1/0].concat(e);return t.max=1/0,t}function BL(e){const t=e.slice(0,-1);return t.max=ve(e),t}const zL=e=>Wm[e.type]||e.bins;function sD(e,t,n,i,r,s,o){const a=iD[t.type]&&s!==xo&&s!==vo?PL(e,t,r):tD(e,t,n,r,s,o);return i===Qf&&zL(t)?UL(a):i===OL?jL(a):qL(a)}const UL=e=>(t,n,i)=>{const r=kA(i[n+1],kA(i.max,1/0)),s=DA(t,e),o=DA(r,e);return s&&o?s+" – "+o:o?"< "+o:"≥ "+s},kA=(e,t)=>e??t,jL=e=>(t,n)=>n?e(t):null,qL=e=>t=>e(t),DA=(e,t)=>Number.isFinite(e)?t(e):null;function WL(e){const t=e.domain(),n=t.length-1;let i=+t[0],r=+ve(t),s=r-i;if(e.type===dp){const o=n?s/n:.1;i-=o,r+=o,s=r-i}return o=>(o-i)/s}function GL(e,t,n,i){const r=i||t.type;return Y(n)&&FL(r)&&(n=n.replace(/%a/g,"%A").replace(/%b/g,"%B")),!n&&r===xo?e.timeFormat("%A, %d %B %Y, %X"):!n&&r===vo?e.utcFormat("%A, %d %B %Y, %X UTC"):sD(e,t,5,null,
8n,i,!0)}function oD(e,t,n){n=n||{};const i=Math.max(3,n.maxlen||7),r=GL(e,t,n.format,n.formatType);if(qm(t.type)){const s=rD(t).slice(1).map(r),o=s.length;return`${o} boundar${o===1?"y":"ies"}: ${s.join(", ")}`}else if(za(t.type)){const s=t.domain(),o=s.length,a=o>i?s.slice(0,i-2).map(r).join(", ")+", ending with "+s.slice(-1).map(r):s.map(r).join(", ");return`${o} value${o===1?"":"s"}: ${a}`}else{const s=t.domain();return`values from ${r(s[0])} to ${r(ve(s))}`}}let aD=0;function HL(){aD=0}const Md="p_";function hx(e){return e&&e.gradient}function uD(e,t,n){const i=e.gradient;let r=e.id,s=i==="radial"?Md:"";return r||(r=e.id="gradient_"+aD++,i==="radial"?(e.x1=Ti(e.x1,.5),e.y1=Ti(e.y1,.5),e.r1=Ti(e.r1,0),e.x2=Ti(e.x2,.5),e.y2=Ti(e.y2,.5),e.r2=Ti(e.r2,.5),s=Md):(e.x1=Ti(e.x1,0),e.y1=Ti(e.y1,0),e.x2=Ti(e.x2,1),e.y2=Ti(e.y2,0))),t[r]=e,"url("+(n||"")+"#"+s+r+")"}function Ti(e,t){return e??t}function lD(e,t){var n=[],i;return i={gradient:"linear",x1:e?e[0]:0,y1:e?e[1]:0,x2:t?t[0]:1,y2:t?t[1]:0,stops:n,stop:function(r,s){return n.push({offset:r,color:s}),i}}}const RA={basis:{curve:d8},"basis-closed":{curve:f8},"basis-open":{curve:c8},bundle:{curve:Z8,tension:"beta",value:.85},cardinal:{curve:e9,tension:"tension",value:0},"cardinal-open":{curve:n9,tension:"tension",value:0},"cardinal-closed":{curve:t9,tension:"tension",value:0},"catmull-rom":{curve:i9,tension:"alpha",value:.5},"catmull-rom-closed":{curve:r9,tension:"alpha",value:.5},"catmull-rom-open":{curve:s9,tension:"alpha",value:.5},linear:{curve:l8},"linear-closed":{curve:u8},monotone:{horizontal:a8,vertical:o8},natural:{curve:s8},step:{curve:r8},"step-after":{curve:i8},"step-before":{curve:n8}};function px(e,t,n){var i=J(RA,e)&&RA[e],r=null;return i&&(r=i.curve||i[t||"vertical"],i.tension&&n!=null&&(r=r[i.tension](n))),r}const VL={m:2,l:2,h:1,v:1,z:0,c:6,s:4,q:4,t:2,a:7},XL=/[mlhvzcsqta]([^mlhvzcsqta]+|$)/gi,YL=/^[+-]?(([0-9]*\.[0-9]+)|([0-9]+\.)|([0-9]+))([eE][+-]?[0-9]+)?/,KL=/^((\s+,?\s*)|(,\s*))/,JL=/^[01]/;function Ua(e){const t=[];return(e.match(XL)||[]).forEach(i=>{let r=i[0];const s=r.toLowerCase(),o=VL[s],a=QL(s,o,i.slice(1).trim()),u=a.length;if(u<o||u&&u%o!==0)throw Error("Invalid SVG path, incorrect parameter count");if(t.push([r,...a.slice(0,o)]),u!==o){s==="m"&&(r=r==="M"?"L":"l");for(let l=o;l<u;l+=o)t.push([r,...a.slice(l,l+o)])}}),t}function QL(e,t,n){const i=[];for(let r=0;t&&r<n.length;)for(let s=0;s<t;++s){const o=e==="a"&&(s===3||s===4)?JL:YL,a=n.slice(r).match(o);if(a===null)throw Error("Invalid SVG path, incorrect parameter type");r+=a[0].length,i.push(+a[0]);const u=n.slice(r).match(KL);u!==null&&(r+=u[0].length)}return i}const Es=Math.PI/180,ZL=1e-14,io=Math.PI/2,Bi=Math.PI*2,sa=Math.sqrt(3)/2;var n0={},i0={},cD=[].join;function eP(e,t,n,i,r,s,o,a,u){const l=cD.call(arguments);if(n0[l])return n0[l];const c=o*Es,f=Math.sin(c),d=Math.cos(c);n=Math.abs(n),i=Math.abs(i);const h=d*(a-e)*.5+f*(u-t)*.5,p=d*(u-t)*.5-f*(a-e)*.5;let g=h*h/(n*n)+p*p/(i*i);g>1&&(g=Math.sqrt(g),n*=g,i*=g);const m=d/n,y=f/n,b=-f/i,x=d/i,v=m*a+y*u,A=b*a+x*u,w=m*e+y*t,E=b*e+x*t;let C=1/((w-v)*(w-v)+(E-A)*(E-A))-.25;C<0&&(C=0);let F=Math.sqrt(C);s==r&&(F=-F);const k=.5*(v+w)-F*(E-A),L=.5*(A+E)+F*(w-v),R=Math.atan2(A-L,v-k);let $=Math.atan2(E-L,w-k)-R;$<0&&s===1?$+=Bi:$>0&&s===0&&($-=Bi);const D=Math.ceil(Math.abs($/(io+.001))),P=[];for(let z=0;z<D;++z){const B=R+z*$/D,Q=R+(z+1)*$/D;P[z]=[k,L,B,Q,n,i,f,d]}return n0[l]=P}function tP(e){const t=cD.call(e);if(i0[t])return i0[t];var n=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],u=e[6],l=e[7];const c=l*o,f=-u*a,d=u*o,h=l*a,p=Math.cos(r),g=Math.sin(r),m=Math.cos(s),y=Math.sin(s),b=.5*(s-r),x=Math.sin(b*.5),v=8/3*x*x/Math.sin(b),A=n+p-v*g,w=i+g+v*p,E=n+m,S=i+y,C=E+v*y,F=S-v*m;return i0[t]=[c*A+f*w,d*A+h*w,c*C+f*F,d*C+h*F,c*E+f*S,d*E+h*S]}const In=["l",0,0,0,0,0,0,0];function nP(e,t,n){const i=In[0]=e[0];if(i==="a"||i==="A")In[1]=t*e[1],In[2]=n*e[2],In[3]=e[3],In[4]=e[4],In[5]=e[5],In[6]=t*e[6],In[7]=n*e[7];else if(i==="h"||i==="H")In[1]=t*e[1];else if(i==="v"||i==="V")In[1]=n*e[1];else for(var r=1,s=e.length;r<s;++r)In[r]=(r%2==1?t:n)*e[r];return In}function Wl(e,t,n,i,r,s){var o,a=null,u=0,l=0,c=0,f=0,d,h,p,g,m=0,y=0;n==null&&(n=0),i==null&&(i=0),r==null&&(r=1),s==null&&(s=r),e.beginPath&&e.beginPath();for(var b=0,x=t.length;b<x;++b){switch(o=t[b],(r!==1||s!==1)&&(o=nP(o,r,s)),o[0]){case"l":u+=o[1],l+=o[2],e.lineTo(u+n,l+i);break;case"L":u=o[1],l=o[2],e.lineTo(u+n,l+i);break;case"h":u+=o[1],e.lineTo(u+n,l+i);break;case"H":u=o[1],e.lineTo(u+n,l+i);break;case"v":l+=o[1],e.lineTo(u+n,l+i);break;case"V":l=o[1],e.lineTo(u+n,l+i);break;
vendor: 4,526 bytes, line 8
8case"m":u+=o[1],l+=o[2],m=u,y=l,e.moveTo(u+n,l+i);break;case"M":u=o[1],l=o[2],m=u,y=l,e.moveTo(u+n,l+i);break;case"c":d=u+o[5],h=l+o[6],c=u+o[3],f=l+o[4],e.bezierCurveTo(u+o[1]+n,l+o[2]+i,c+n,f+i,d+n,h+i),u=d,l=h;break;case"C":u=o[5],l=o[6],c=o[3],f=o[4],e.bezierCurveTo(o[1]+n,o[2]+i,c+n,f+i,u+n,l+i);break;case"s":d=u+o[3],h=l+o[4],c=2*u-c,f=2*l-f,e.bezierCurveTo(c+n,f+i,u+o[1]+n,l+o[2]+i,d+n,h+i),c=u+o[1],f=l+o[2],u=d,l=h;break;case"S":d=o[3],h=o[4],c=2*u-c,f=2*l-f,e.bezierCurveTo(c+n,f+i,o[1]+n,o[2]+i,d+n,h+i),u=d,l=h,c=o[1],f=o[2];break;case"q":d=u+o[3],h=l+o[4],c=u+o[1],f=l+o[2],e.quadraticCurveTo(c+n,f+i,d+n,h+i),u=d,l=h;break;case"Q":d=o[3],h=o[4],e.quadraticCurveTo(o[1]+n,o[2]+i,d+n,h+i),u=d,l=h,c=o[1],f=o[2];break;case"t":d=u+o[1],h=l+o[2],a[0].match(/[QqTt]/)===null?(c=u,f=l):a[0]==="t"?(c=2*u-p,f=2*l-g):a[0]==="q"&&(c=2*u-c,f=2*l-f),p=c,g=f,e.quadraticCurveTo(c+n,f+i,d+n,h+i),u=d,l=h,c=u+o[1],f=l+o[2];break;case"T":d=o[1],h=o[2],c=2*u-c,f=2*l-f,e.quadraticCurveTo(c+n,f+i,d+n,h+i),u=d,l=h;break;case"a":OA(e,u+n,l+i,[o[1],o[2],o[3],o[4],o[5],o[6]+u+n,o[7]+l+i]),u+=o[6],l+=o[7];break;case"A":OA(e,u+n,l+i,[o[1],o[2],o[3],o[4],o[5],o[6]+n,o[7]+i]),u=o[6],l=o[7];break;case"z":case"Z":u=m,l=y,e.closePath();break}a=o}}function OA(e,t,n,i){const r=eP(i[5],i[6],i[0],i[1],i[3],i[4],i[2],t,n);for(let s=0;s<r.length;++s){const o=tP(r[s]);e.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5])}}const TA=.5773502691896257,MA={circle:{draw:function(e,t){const n=Math.sqrt(t)/2;e.moveTo(n,0),e.arc(0,0,n,0,Bi)}},cross:{draw:function(e,t){var n=Math.sqrt(t)/2,i=n/2.5;e.moveTo(-n,-i),e.lineTo(-n,i),e.lineTo(-i,i),e.lineTo(-i,n),e.lineTo(i,n),e.lineTo(i,i),e.lineTo(n,i),e.lineTo(n,-i),e.lineTo(i,-i),e.lineTo(i,-n),e.lineTo(-i,-n),e.lineTo(-i,-i),e.closePath()}},diamond:{draw:function(e,t){const n=Math.sqrt(t)/2;e.moveTo(-n,0),e.lineTo(0,-n),e.lineTo(n,0),e.lineTo(0,n),e.closePath()}},square:{draw:function(e,t){var n=Math.sqrt(t),i=-n/2;e.rect(i,i,n,n)}},arrow:{draw:function(e,t){var n=Math.sqrt(t)/2,i=n/7,r=n/2.5,s=n/8;e.moveTo(-i,n),e.lineTo(i,n),e.lineTo(i,-s),e.lineTo(r,-s),e.lineTo(0,-n),e.lineTo(-r,-s),e.lineTo(-i,-s),e.closePath()}},wedge:{draw:function(e,t){var n=Math.sqrt(t)/2,i=sa*n,r=i-n*TA,s=n/4;e.moveTo(0,-i-r),e.lineTo(-s,i-r),e.lineTo(s,i-r),e.closePath()}},triangle:{draw:function(e,t){var n=Math.sqrt(t)/2,i=sa*n,r=i-n*TA;e.moveTo(0,-i-r),e.lineTo(-n,i-r),e.lineTo(n,i-r),e.closePath()}},"triangle-up":{draw:function(e,t){var n=Math.sqrt(t)/2,i=sa*n;e.moveTo(0,-i),e.lineTo(-n,i),e.lineTo(n,i),e.closePath()}},"triangle-down":{draw:function(e,t){var n=Math.sqrt(t)/2,i=sa*n;e.moveTo(0,i),e.lineTo(-n,-i),e.lineTo(n,-i),e.closePath()}},"triangle-right":{draw:function(e,t){var n=Math.sqrt(t)/2,i=sa*n;e.moveTo(i,0),e.lineTo(-i,-n),e.lineTo(-i,n),e.closePath()}},"triangle-left":{draw:function(e,t){var n=Math.sqrt(t)/2,i=sa*n;e.moveTo(-i,0),e.lineTo(i,-n),e.lineTo(i,n),e.closePath()}},stroke:{draw:function(e,t){const n=Math.sqrt(t)/2;e.moveTo(-n,0),e.lineTo(n,0)}}};function fD(e){return J(MA,e)?MA[e]:iP(e)}var r0={};function iP(e){if(!J(r0,e)){const t=Ua(e);r0[e]={draw:function(n,i){Wl(n,t,0,0,Math.sqrt(i)/2)}}}return r0[e]}const Yr=.448084975506;function rP(e){return e.x}function sP(e){return e.y}function oP(e){return e.width}function aP(e){return e.height}function gr(e){return typeof e=="function"?e:()=>+e}function gf(e,t,n){return Math.max(t,Math.min(e,n))}function dD(){var e=rP,t=sP,n=oP,i=aP,r=gr(0),s=r,o=r,a=r,u=null;function l(c,f,d){var h,p=f??+e.call(this,c),g=d??+t.call(this,c),m=+n.call(this,c),y=+i.call(this,c),b=Math.min(m,y)/2,x=gf(+r.call(this,c),0,b),v=gf(+s.call(this,c),0,b),A=gf(+o.call(this,c),0,b),w=gf(+a.call(this,c),0,b);if(u||(u=h=Ny()),x<=0&&v<=0&&A<=0&&w<=0)u.rect(p,g,m,y);else{var E=p+m,S=g+y;u.moveTo(p+x,g),u.lineTo(E-v,g),u.bezierCurveTo(E-Yr*v,g,E,g+Yr*v,E,g+v),u.lineTo(E,S-w),u.bezierCurveTo(E,S-Yr*w,E-Yr*w,S,E-w,S),u.lineTo(p+A,S),u.bezierCurveTo(p+Yr*A,S,p,S-Yr*A,p,S-A),u.lineTo(p,g+x),u.bezierCurveTo(p,g+Yr*x,p+Yr*x,g,p+x,g),u.closePath()}if(h)return u=null,h+""||null}return l.x=function(c){return arguments.length?(e=gr(c),l):e},l.y=function(c){return arguments.length?(t=gr(c),l):t},l.width=function(c){return arguments.length?(n=gr(c),l):n},l.height=function(c){return arguments.length?(i=gr(c),l):i},l.cornerRadius=function(c,f,d,h){return arguments.length?(r=gr(c),s=f!=null?gr(f):r,a=d!=null?gr(d):r,o=h!=null?gr(h):s,l):r},l.context=function(c){return arguments.length?(u=c??null,l):u},l}function hD(){var e,t,n,i,r=null,s,o,a,u;
8function l(f,d,h){const p=h/2;if(s){var g=a-d,m=f-o;if(g||m){var y=Math.hypot(g,m),b=(g/=y)*u,x=(m/=y)*u,v=Math.atan2(m,g);r.moveTo(o-b,a-x),r.lineTo(f-g*p,d-m*p),r.arc(f,d,p,v-Math.PI,v),r.lineTo(o+b,a+x),r.arc(o,a,u,v,v+Math.PI)}else r.arc(f,d,p,0,Bi);r.closePath()}else s=1;o=f,a=d,u=p}function c(f){var d,h=f.length,p,g=!1,m;for(r==null&&(r=m=Ny()),d=0;d<=h;++d)!(d<h&&i(p=f[d],d,f))===g&&(g=!g)&&(s=0),g&&l(+e(p,d,f),+t(p,d,f),+n(p,d,f));if(m)return r=null,m+""||null}return c.x=function(f){return arguments.length?(e=f,c):e},c.y=function(f){return arguments.length?(t=f,c):t},c.size=function(f){return arguments.length?(n=f,c):n},c.defined=function(f){return arguments.length?(i=f,c):i},c.context=function(f){return arguments.length?(f==null?r=null:r=f,c):r},c}function wc(e,t){return e??t}const Sc=e=>e.x||0,Cc=e=>e.y||0,uP=e=>e.width||0,lP=e=>e.height||0,cP=e=>(e.x||0)+(e.width||0),fP=e=>(e.y||0)+(e.height||0),dP=e=>e.startAngle||0,hP=e=>e.endAngle||0,pP=e=>e.padAngle||0,gP=e=>e.innerRadius||0,mP=e=>e.outerRadius||0,yP=e=>e.cornerRadius||0,bP=e=>wc(e.cornerRadiusTopLeft,e.cornerRadius)||0,xP=e=>wc(e.cornerRadiusTopRight,e.cornerRadius)||0,vP=e=>wc(e.cornerRadiusBottomRight,e.cornerRadius)||0,EP=e=>wc(e.cornerRadiusBottomLeft,e.cornerRadius)||0,AP=e=>wc(e.size,64),wP=e=>e.size||1,pp=e=>e.defined!==!1,SP=e=>fD(e.shape||"circle"),CP=Q8().startAngle(dP).endAngle(hP).padAngle(pP).innerRadius(gP).outerRadius(mP).cornerRadius(yP),$P=mF().x(Sc).y1(Cc).y0(fP).defined(pp),FP=mF().y(Cc).x1(Sc).x0(cP).defined(pp),_P=h8().x(Sc).y(Cc).defined(pp),kP=dD().x(Sc).y(Cc).width(uP).height(lP).cornerRadius(bP,xP,vP,EP),DP=p8().type(SP).size(AP),RP=hD().x(Sc).y(Cc).defined(pp).size(wP);function gx(e){return e.cornerRadius||e.cornerRadiusTopLeft||e.cornerRadiusTopRight||e.cornerRadiusBottomRight||e.cornerRadiusBottomLeft}function OP(e,t){return CP.context(e)(t)}function TP(e,t){const n=t[0],i=n.interpolate||"linear";return(n.orient==="horizontal"?FP:$P).curve(px(i,n.orient,n.tension)).context(e)(t)}function MP(e,t){const n=t[0],i=n.interpolate||"linear";return _P.curve(px(i,n.orient,n.tension)).context(e)(t)}function xu(e,t,n,i){return kP.context(e)(t,n,i)}function NP(e,t){return(t.mark.shape||t.shape).context(e)(t)}function LP(e,t){return DP.context(e)(t)}function PP(e,t){return RP.context(e)(t)}var pD=1;function gD(){pD=1}function mx(e,t,n){var i=t.clip,r=e._defs,s=t.clip_id||(t.clip_id="clip"+pD++),o=r.clipping[s]||(r.clipping[s]={id:s});return de(i)?o.path=i(null):gx(n)?o.path=xu(null,n,0,0):(o.width=n.width||0,o.height=n.height||0),"url(#"+s+")"}function tt(e){this.clear(),e&&this.union(e)}tt.prototype={clone(){return new tt(this)},clear(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},empty(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},equals(e){return this.x1===e.x1&&this.y1===e.y1&&this.x2===e.x2&&this.y2===e.y2},set(e,t,n,i){return n<e?(this.x2=e,this.x1=n):(this.x1=e,this.x2=n),i<t?(this.y2=t,this.y1=i):(this.y1=t,this.y2=i),this},add(e,t){return e<this.x1&&(this.x1=e),t<this.y1&&(this.y1=t),e>this.x2&&(this.x2=e),t>this.y2&&(this.y2=t),this},expand(e){return this.x1-=e,this.y1-=e,this.x2+=e,this.y2+=e,this},round(){return this.x1=Math.floor(this.x1),this.y1=Math.floor(this.y1),this.x2=Math.ceil(this.x2),this.y2=Math.ceil(this.y2),this},scale(e){return this.x1*=e,this.y1*=e,this.x2*=e,this.y2*=e,this},translate(e,t){return this.x1+=e,this.x2+=e,this.y1+=t,this.y2+=t,this},rotate(e,t,n){const i=this.rotatedPoints(e,t,n);return this.clear().add(i[0],i[1]).add(i[2],i[3]).add(i[4],i[5]).add(i[6],i[7])},rotatedPoints(e,t,n){var{x1:i,y1:r,x2:s,y2:o}=this,a=Math.cos(e),u=Math.sin(e),l=t-t*a+n*u,c=n-t*u-n*a;return[a*i-u*r+l,u*i+a*r+c,a*i-u*o+l,u*i+a*o+c,a*s-u*r+l,u*s+a*r+c,a*s-u*o+l,u*s+a*o+c]},union(e){return e.x1<this.x1&&(this.x1=e.x1),e.y1<this.y1&&(this.y1=e.y1),e.x2>this.x2&&(this.x2=e.x2),e.y2>this.y2&&(this.y2=e.y2),this},intersect(e){return e.x1>this.x1&&(this.x1=e.x1),e.y1>this.y1&&(this.y1=e.y1),e.x2<this.x2&&(this.x2=e.x2),e.y2<this.y2&&(this.y2=e.y2),this},encloses(e){return e&&this.x1<=e.x1&&this.x2>=e.x2&&this.y1<=e.y1&&this.y2>=e.y2},alignsWith(e){return e&&(this.x1==e.x1||this.x2==e.x2||this.y1==e.y1||this.y2==e.y2)},intersects(e){return e&&!(this.x2<e.x1||this.x1>e.x2||this.y2<e.y1||this.y1>e.y2)},contains(e,t){return!(e<this.x1||e>this.x2||t<this.y1||t>this.y2)},width(){return this.x2-this.x1},height(){return this.y2-this.y1}};function gp(e){this.mark=e,this.bounds=this.bounds||new tt}function mp(e){gp.call(this,e),this.items=this.items||[]}H(mp,gp);class mD{constructor(t){this._pending=0,this._loader=t||Qh()}pending(){return this._pending}sanitizeURL(t){const n=this;return NA(n),n._loader.sanitize(t,{context:"href"}).then(i=>(Uu(n),i)).catch(()=>(Uu(n),null))}loadImage(t){const n=this,i=uL();return NA(n),n._loader.sanitize(t,{context:"image"}).then(r=>{const s=r.href;if(!s||!i)throw{url:s};const o=new i,a=J(r,"crossOrigin")?r.crossOrigin:"anonymous";return a!=null&&(o.crossOrigin=a),o.onload=()=>Uu(n),o.onerror=()=>Uu(n),o.src=s,o}).catch(r=>(Uu(n),{complete:!1,width:0,height:0,src:r&&r.url||""}))}ready(){const t=this;return new Promise(n=>{function i(r){t.pending()?setTimeout(()=>{i(!0)},10):n(r)}i(!1)})}}function NA(e){e._pending+=1}function Uu(e){e._pending-=1}function Br(e,t,n){if(t.stroke&&t.opacity!==0&&t.strokeOpacity!==0){const i=t.strokeWidth!=null?+t.strokeWidth:1;e.expand(i+(n?IP(t,i):0))}return e}function IP(e,t){return e.strokeJoin&&e.strokeJoin!=="miter"?0:t}const BP=Bi-1e-8;let yp,Zf,ed,ao,Gm,td,Hm,Vm;const ss=(e,t)=>yp.add(e,t),nd=(e,t)=>ss(Zf=e,ed=t),LA=e=>ss(e,yp.y1),PA=e=>ss(yp.x1,e),ro=(e,t)=>Gm*e+Hm*t,so=(e,t)=>td*e+Vm*t,s0=(e,t)=>ss(ro(e,t),so(e,t)),o0=(e,t)=>nd(ro(e,t),so(e,t));function $c(e,t){return yp=e,t?(ao=t*Es,Gm=Vm=Math.cos(ao),td=Math.sin(ao),Hm=-td):(Gm=Vm=1,ao=td=Hm=0),zP}const zP={beginPath(){},closePath(){},moveTo:o0,lineTo:o0,rect(e,t,n,i){ao?(s0(e+n,t),s0(e+n,t+i),s0(e,t+i),o0(e,t)):(ss(e+n,t+i),nd(e,t))},quadraticCurveTo(e,t,n,i){const r=ro(e,t),s=so(e,t),o=ro(n,i),a=so(n,i);IA(Zf,r,o,LA),IA(ed,s,a,PA),nd(o,a)},bezierCurveTo(e,t,n,i,r,s){const o=ro(e,t),a=so(e,t),u=ro(n,i),l=so(n,i),c=ro(r,s),f=so(r,s);BA(Zf,o,u,c,LA),BA(ed,a,l,f,PA),nd(c,f)},arc(e,t,n,i,r,s){if(i+=ao,r+=ao,Zf=n*Math.cos(r)+e,ed=n*Math.sin(r)+t,Math.abs(r-i)>BP)ss(e-n,t-n),ss(e+n,t+n);else{const o=l=>ss(n*Math.cos(l)+e,n*Math.sin(l)+t);let a,u;if(o(i),o(r),r!==i)if(i=i%Bi,i<0&&(i+=Bi),r=r%Bi,r<0&&(r+=Bi),r<i&&(s=!s,a=i,i=r,r=a),s)for(r-=Bi,a=i-i%io,u=0;u<4&&a>r;++u,a-=io)o(a);else for(a=i-i%io+io,u=0;u<4&&a<r;++u,a=a+io)o(a)}}};function IA(e,t,n,i){const r=(e-t)/(e+n-2*t);0<r&&r<1&&i(e+(t-e)*r)}function BA(e,t,n,i,r){const s=i-e+3*t-3*n,o=e+n-2*t,a=e-t;let u=0,l=0,c;Math.abs(s)>ZL?(c=o*o+a*s,c>=0&&(c=Math.sqrt(c),u=(-o+c)/s,l=(-o-c)/s)):u=.5*a/o,0<u&&u<1&&r(zA(u,e,t,n,i)),0<l&&l<1&&r(zA(l,e,t,n,i))}function zA(e,t,n,i,r){const s=1-e,o=s*s,a=e*e;return o*s*t+3*o*e*n+3*s*a*i+a*e*r}var bs=(bs=ys(1,1))?bs.getContext("2d"):null;const Xm=new tt;function yx(e){return function(t,n){if(!bs)return!0;
8e(bs,t),Xm.clear().union(t.bounds).intersect(n).round();const{x1:i,y1:r,x2:s,y2:o}=Xm;for(let a=r;a<=o;++a)for(let u=i;u<=s;++u)if(bs.isPointInPath(u,a))return!0;return!1}}function bx(e,t){return t.contains(e.x||0,e.y||0)}function yD(e,t){const n=e.x||0,i=e.y||0,r=e.width||0,s=e.height||0;return t.intersects(Xm.set(n,i,n+r,i+s))}function bD(e,t){const n=e.x||0,i=e.y||0,r=e.x2!=null?e.x2:n,s=e.y2!=null?e.y2:i;return Ea(t,n,i,r,s)}function Ea(e,t,n,i,r){const{x1:s,y1:o,x2:a,y2:u}=e,l=i-t,c=r-n;let f=0,d=1,h,p,g,m;for(m=0;m<4;++m){if(m===0&&(h=-l,p=-(s-t)),m===1&&(h=l,p=a-t),m===2&&(h=-c,p=-(o-n)),m===3&&(h=c,p=u-n),Math.abs(h)<1e-10&&p<0)return!1;if(g=p/h,h<0){if(g>d)return!1;g>f&&(f=g)}else if(h>0){if(g<f)return!1;g<d&&(d=g)}}return!0}function ja(e,t){e.globalCompositeOperation=t.blend||"source-over"}function ri(e,t){return e??t}function UA(e,t){const n=t.length;for(let i=0;i<n;++i)e.addColorStop(t[i].offset,t[i].color);return e}function UP(e,t,n){const i=n.width(),r=n.height();let s;if(t.gradient==="radial")s=e.createRadialGradient(n.x1+ri(t.x1,.5)*i,n.y1+ri(t.y1,.5)*r,Math.max(i,r)*ri(t.r1,0),n.x1+ri(t.x2,.5)*i,n.y1+ri(t.y2,.5)*r,Math.max(i,r)*ri(t.r2,.5));else{const o=ri(t.x1,0),a=ri(t.y1,0),u=ri(t.x2,1),l=ri(t.y2,0);if(o===u||a===l||i===r)s=e.createLinearGradient(n.x1+o*i,n.y1+a*r,n.x1+u*i,n.y1+l*r);else{const c=ys(Math.ceil(i),Math.ceil(r)),f=c.getContext("2d");return f.scale(i,r),f.fillStyle=UA(f.createLinearGradient(o,a,u,l),t.stops),f.fillRect(0,0,i,r),e.createPattern(c,"no-repeat")}}return UA(s,t.stops)}function xD(e,t,n){return hx(n)?UP(e,n,t.bounds):n}function Nd(e,t,n){return n*=t.fillOpacity==null?1:t.fillOpacity,n>0?(e.globalAlpha=n,e.fillStyle=xD(e,t,t.fill),!0):!1}var jP=[];function qa(e,t,n){var i=(i=t.strokeWidth)!=null?i:1;return i<=0?!1:(n*=t.strokeOpacity==null?1:t.strokeOpacity,n>0?(e.globalAlpha=n,e.strokeStyle=xD(e,t,t.stroke),e.lineWidth=i,e.lineCap=t.strokeCap||"butt",e.lineJoin=t.strokeJoin||"miter",e.miterLimit=t.strokeMiterLimit||10,e.setLineDash&&(e.setLineDash(t.strokeDash||jP),e.lineDashOffset=t.strokeDashOffset||0),!0):!1)}function qP(e,t){return e.zindex-t.zindex||e.index-t.index}function xx(e){if(!e.zdirty)return e.zitems;var t=e.items,n=[],i,r,s;for(r=0,s=t.length;r<s;++r)i=t[r],i.index=r,i.zindex&&n.push(i);return e.zdirty=!1,e.zitems=n.sort(qP)}function bi(e,t){var n=e.items,i,r;if(!n||!n.length)return;const s=xx(e);if(s&&s.length){for(i=0,r=n.length;i<r;++i)n[i].zindex||t(n[i]);n=s}for(i=0,r=n.length;i<r;++i)t(n[i])}function Ld(e,t){var n=e.items,i,r;if(!n||!n.length)return null;const s=xx(e);for(s&&s.length&&(n=s),r=n.length;--r>=0;)if(i=t(n[r]))return i;if(n===s){for(n=e.items,r=n.length;--r>=0;)if(!n[r].zindex&&(i=t(n[r])))return i}return null}function vx(e){return function(t,n,i){bi(n,r=>{(!i||i.intersects(r.bounds))&&vD(e,t,r,r)})}}function WP(e){return function(t,n,i){n.items.length&&(!i||i.intersects(n.bounds))&&vD(e,t,n.items[0],n.items)}}function vD(e,t,n,i){var r=n.opacity==null?1:n.opacity;r!==0&&(e(t,i)||(ja(t,n),n.fill&&Nd(t,n,r)&&t.fill(),n.stroke&&qa(t,n,r)&&t.stroke()))}function bp(e){return e=e||Xn,function(t,n,i,r,s,o){return i*=t.pixelRatio,r*=t.pixelRatio,Ld(n,a=>{const u=a.bounds;if(!(u&&!u.contains(s,o)||!u)&&e(t,a,i,r,s,o))return a})}}function Fc(e,t){return function(n,i,r,s){var o=Array.isArray(i)?i[0]:i,a=t??o.fill,u=o.stroke&&n.isPointInStroke,l,c;return u&&(l=o.strokeWidth,c=o.strokeCap,n.lineWidth=l??1,n.lineCap=c??"butt"),e(n,i)?!1:a&&n.isPointInPath(r,s)||u&&n.isPointInStroke(r,s)}}function Ex(e){return bp(Fc(e))}function fo(e,t){return"translate("+e+","+t+")"}function Ax(e){return"rotate("+e+")"}function GP(e,t){return"scale("+e+","+t+")"}function ED(e){return fo(e.x||0,e.y||0)}function HP(e){return fo(e.x||0,e.y||0)+(e.angle?" "+Ax(e.angle):"")}function VP(e){return fo(e.x||0,e.y||0)+(e.angle?" "+Ax(e.angle):"")+(e.scaleX||e.scaleY?" "+GP(e.scaleX||1,e.scaleY||1):"")}function wx(e,t,n){function i(o,a){o("transform",HP(a)),o("d",t(null,a))}function r(o,a){return t($c(o,a.angle),a),Br(o,a).translate(a.x||0,a.y||0)}function s(o,a){var u=a.x||0,l=a.y||0,c=a.angle||0;o.translate(u,l),c&&o.rotate(c*=Es),o.beginPath(),t(o,a),c&&o.rotate(-c),o.translate(-u,-l)}return{type:e,tag:"path",nested:!1,attr:i,bound:r,draw:vx(s),pick:Ex(s),isect:n||yx(s)}}var XP=wx("arc",OP);function YP(e,t){for(var n=e[0].orient==="horizontal"?t[1]:t[0],i=e[0].orient==="horizontal"?"y":"x",r=e.length,s=1/0,o,a;--r>=0;)e[r].defined!==!1&&(a=Math.abs(e[r][i]-n),a<s&&(s=a,o=e[r]));return o}function KP(e,t){for(var n=Math.pow(e[0].strokeWidth||1,2),i=e.length,r,s,o;--i>=0;)if(e[i].defined!==!1&&(r=e[i].x-t[0],s=e[i].y-t[1],o=r*r+s*s,o<n))return e[i];return null}function JP(e,t){for(var n=e.length,i,r,s;--n>=0;)if(e[n].defined!==!1&&(i=e[n].x-t[0],r=e[n].y-t[1],s=i*i+r*r,i=e[n].size||1,s<i*i))return e[n];return null}function Sx(e,t,n){function i(u,l){var c=l.mark.items;c.length&&u("d",t(null,c))}function r(u,l){var c=l.items;return c.length===0?u:(t($c(u),c),Br(u,c[0]))}function s(u,l){u.beginPath(),t(u,l)}const o=Fc(s);function a(u,l,c,f,d,h){var p=l.items,g=l.bounds;return!p||!p.length||g&&!g.contains(d,h)?null:(c*=u.pixelRatio,f*=u.pixelRatio,o(u,p,c,f)?p[0]:null)}return{type:e,tag:"path",nested:!0,attr:i,bound:r,draw:WP(s),pick:a,isect:bx,tip:n}}var QP=Sx("area",TP,YP);function ZP(e,t){var n=t.clip;e.save(),de(n)?(e.beginPath(),n(e),e.clip()):AD(e,t.group)}function AD(e,t){e.beginPath(),gx(t)?xu(e,t,0,0):e.rect(0,0,t.width||0,t.height||0),e.clip()}function wD(e){const t=ri(e.strokeWidth,1);return e.strokeOffset!=null?e.strokeOffset:e.stroke&&t>.5&&t<1.5?.5-Math.abs(t-1):0}function eI(e,t){e("transform",ED(t))}function SD(e,t){const n=wD(t);e("d",xu(null,t,n,n))}function tI(e,t){e("class","background"),e("aria-hidden",!0),SD(e,t)}function nI(e,t){e("class","foreground"),e("aria-hidden",!0),t.strokeForeground?SD(e,t):e("d","")}function iI(e,t,n){const i=t.clip?mx(n,t,t):null;e("clip-path",i)}function rI(e,t){if(!t.clip&&t.items){const n=t.items,i=n.length;for(let r=0;r<i;++r)e.union(n[r].bounds)}return(t.clip||t.width||t.height)&&!t.noBound&&e.add(0,0).add(t.width||0,t.height||0),Br(e,t),e.translate(t.x||0,t.y||0)}function Gl(e,t,n,i){const r=wD(t);e.beginPath(),xu(e,t,(n||0)+r,(i||0)+r)}const sI=Fc(Gl),oI=Fc(Gl,!1),aI=Fc(Gl,!0);function uI(e,t,n,i){bi(t,r=>{const s=r.x||0,o=r.y||0,a=r.strokeForeground,u=r.opacity==null?1:r.opacity;(r.stroke||r.fill)&&u&&(Gl(e,r,s,o),ja(e,r),r.fill&&Nd(e,r,u)&&e.fill(),r.stroke&&!a&&qa(e,r,u)&&e.stroke()),e.save(),e.translate(s,o),r.clip&&AD(e,r),n&&n.translate(-s,-o),bi(r,l=>{(l.marktype==="group"||i==null||i.includes(l.marktype))&&this.draw(e,l,n,i)}
8),n&&n.translate(s,o),e.restore(),a&&r.stroke&&u&&(Gl(e,r,s,o),ja(e,r),qa(e,r,u)&&e.stroke())})}function lI(e,t,n,i,r,s){if(t.bounds&&!t.bounds.contains(r,s)||!t.items)return null;const o=n*e.pixelRatio,a=i*e.pixelRatio;return Ld(t,u=>{let l,c,f;const d=u.bounds;if(d&&!d.contains(r,s))return;c=u.x||0,f=u.y||0;const h=c+(u.width||0),p=f+(u.height||0),g=u.clip;if(g&&(r<c||r>h||s<f||s>p))return;if(e.save(),e.translate(c,f),c=r-c,f=s-f,g&&gx(u)&&!aI(e,u,o,a))return e.restore(),null;const m=u.strokeForeground,y=t.interactive!==!1;return y&&m&&u.stroke&&oI(e,u,o,a)?(e.restore(),u):(l=Ld(u,b=>cI(b,c,f)?this.pick(b,n,i,c,f):null),!l&&y&&(u.fill||!m&&u.stroke)&&sI(e,u,o,a)&&(l=u),e.restore(),l||null)})}function cI(e,t,n){return(e.interactive!==!1||e.marktype==="group")&&e.bounds&&e.bounds.contains(t,n)}var fI={type:"group",tag:"g",nested:!1,attr:eI,bound:rI,draw:uI,pick:lI,isect:yD,content:iI,background:tI,foreground:nI},Hl={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"};function Cx(e,t){var n=e.image;return(!n||e.url&&e.url!==n.url)&&(n={complete:!1,width:0,height:0},t.loadImage(e.url).then(i=>{e.image=i,e.image.url=e.url})),n}function $x(e,t){return e.width!=null?e.width:!t||!t.width?0:e.aspect!==!1&&e.height?e.height*t.width/t.height:t.width}function Fx(e,t){return e.height!=null?e.height:!t||!t.height?0:e.aspect!==!1&&e.width?e.width*t.height/t.width:t.height}function xp(e,t){return e==="center"?t/2:e==="right"?t:0}function vp(e,t){return e==="middle"?t/2:e==="bottom"?t:0}function dI(e,t,n){const i=Cx(t,n),r=$x(t,i),s=Fx(t,i),o=(t.x||0)-xp(t.align,r),a=(t.y||0)-vp(t.baseline,s),u=!i.src&&i.toDataURL?i.toDataURL():i.src||"";e("href",u,Hl["xmlns:xlink"],"xlink:href"),e("transform",fo(o,a)),e("width",r),e("height",s),e("preserveAspectRatio",t.aspect===!1?"none":"xMidYMid")}function hI(e,t){const n=t.image,i=$x(t,n),r=Fx(t,n),s=(t.x||0)-xp(t.align,i),o=(t.y||0)-vp(t.baseline,r);return e.set(s,o,s+i,o+r)}function pI(e,t,n){bi(t,i=>{if(n&&!n.intersects(i.bounds))return;const r=Cx(i,this);let s=$x(i,r),o=Fx(i,r);if(s===0||o===0)return;let a=(i.x||0)-xp(i.align,s),u=(i.y||0)-vp(i.baseline,o),l,c,f,d;i.aspect!==!1&&(c=r.width/r.height,f=i.width/i.height,c===c&&f===f&&c!==f&&(f<c?(d=s/c,u+=(o-d)/2,o=d):(d=o*c,a+=(s-d)/2,s=d))),(r.complete||r.toDataURL)&&(ja(e,i),e.globalAlpha=(l=i.opacity)!=null?l:1,e.imageSmoothingEnabled=i.smooth!==!1,e.drawImage(r,a,u,s,o))})}var gI={type:"image",tag:"image",nested:!1,attr:dI,bound:hI,draw:pI,pick:bp(),isect:Xn,get:Cx,xOffset:xp,yOffset:vp},mI=Sx("line",MP,KP);function yI(e,t){var n=t.scaleX||1,i=t.scaleY||1;(n!==1||i!==1)&&e("vector-effect","non-scaling-stroke"),e("transform",VP(t)),e("d",t.path)}function id(e,t){var n=t.path;if(n==null)return!0;var i=t.x||0,r=t.y||0,s=t.scaleX||1,o=t.scaleY||1,a=(t.angle||0)*Es,u=t.pathCache;(!u||u.path!==n)&&((t.pathCache=u=Ua(n)).path=n),a&&e.rotate&&e.translate?(e.translate(i,r),e.rotate(a),Wl(e,u,0,0,s,o),e.rotate(-a),e.translate(-i,-r)):Wl(e,u,i,r,s,o)}function bI(e,t){return id($c(e,t.angle),t)?e.set(0,0,0,0):Br(e,t,!0)}var xI={type:"path",tag:"path",nested:!1,attr:yI,bound:bI,draw:vx(id),pick:Ex(id),isect:yx(id)};function vI(e,t){e("d",xu(null,t))}function EI(e,t){var n,i;return Br(e.set(n=t.x||0,i=t.y||0,n+t.width||0,i+t.height||0),t)}function jA(e,t){e.beginPath(),xu(e,t)}var AI={type:"rect",tag:"path",nested:!1,attr:vI,bound:EI,draw:vx(jA),pick:Ex(jA),isect:yD};function wI(e,t){e("transform",ED(t)),e("x2",t.x2!=null?t.x2-(t.x||0):0),e("y2",t.y2!=null?t.y2-(t.y||0):0)}function SI(e,t){var n,i;return Br(e.set(n=t.x||0,i=t.y||0,t.x2!=null?t.x2:n,t.y2!=null?t.y2:i),t)}function CD(e,t,n){var i,r,s,o;return t.stroke&&qa(e,t,n)?(i=t.x||0,r=t.y||0,s=t.x2!=null?t.x2:i,o=t.y2!=null?t.y2:r,e.beginPath(),e.moveTo(i,r),e.lineTo(s,o),!0):!1}function CI(e,t,n){bi(t,i=>{if(!(n&&!n.intersects(i.bounds))){var r=i.opacity==null?1:i.opacity;r&&CD(e,i,r)&&(ja(e,i),e.stroke())}})}function $I(e,t,n,i){return e.isPointInStroke?CD(e,t,1)&&e.isPointInStroke(n,i):!1}var FI={type:"rule",tag:"line",nested:!1,attr:wI,bound:SI,draw:CI,pick:bp($I),isect:bD},_I=wx("shape",NP),kI=wx("symbol",LP,bx);const qA=t_();var Rn={height:rr,measureWidth:_x,estimateWidth:Pd,width:Pd,canvas:$D};$D(!0);function $D(e){Rn.width=e&&bs?_x:Pd}function Pd(e,t){return FD(ws(e,t),rr(e))}function FD(e,t){return~~(.8*e.length*t)}function _x(e,t){return rr(e)<=0||!(t=ws(e,t))?0:_D(t,Ep(e))}function _D(e,t){const n=`(${t}) ${e}`;let i=qA.get(n);return i===void 0&&(bs.font=t,i=bs.measureText(e).width,qA.set(n,i)),i}function rr(e){return e.fontSize!=null?+e.fontSize||0:11}function As(e){return e.lineHeight!=null?e.lineHeight:rr(e)+2}function DI(e){return I(e)?e.length>1?e:e[0]:e}function _c(e){return DI(e.lineBreak&&e.text&&!I(e.text)?e.text.split(e.lineBreak):e.text)}function kx(e){const t=_c(e);return(I(t)?t.length-1:0)*As(e)}function ws(e,t){const n=t==null?"":(t+"").trim();return e.limit>0&&n.length?OI(e,n):n}function RI(e){if(Rn.width===_x){const t=Ep(e);return n=>_D(n,t)}else if(Rn.width===Pd){const t=rr(e);return n=>FD(n,t)}else return t=>Rn.width(e,t)}function OI(e,t){var n=+e.limit,i=RI(e);if(i(t)<n)return t;var r=e.ellipsis||"…",s=e.dir==="rtl",o=0,a=t.length,u;if(n-=i(r),s){for(;o<a;)u=o+a>>>1,i(t.slice(u))>n?o=u+1:a=u;return r+t.slice(o)}else{for(;o<a;)u=1+(o+a>>>1),i(t.slice(0,u))<n?o=u:a=u-1;return t.slice(0,o)+r}}function kc(e,t){var n=e.font;return(t&&n?String(n).replace(/"/g,"'"):n)||"sans-serif"}function Ep(e,t){return(e.fontStyle?e.fontStyle+" ":"")+(e.fontVariant?e.fontVariant+" ":"")+(e.fontWeight?e.fontWeight+" ":"")+rr(e)+"px "+kc(e,t)}function Dx(e){var t=e.baseline,n=rr(e);return Math.round(t==="top"?.79*n:t==="middle"?.3*n:t==="bottom"?-.21
vendor: 4,479 bytes, line 8
8*n:t==="line-top"?.29*n+.5*As(e):t==="line-bottom"?.29*n-.5*As(e):0)}const TI={left:"start",center:"middle",right:"end"},Sl=new tt;function Ap(e){var t=e.x||0,n=e.y||0,i=e.radius||0,r;return i&&(r=(e.theta||0)-io,t+=i*Math.cos(r),n+=i*Math.sin(r)),Sl.x1=t,Sl.y1=n,Sl}function MI(e,t){var n=t.dx||0,i=(t.dy||0)+Dx(t),r=Ap(t),s=r.x1,o=r.y1,a=t.angle||0,u;e("text-anchor",TI[t.align]||"start"),a?(u=fo(s,o)+" "+Ax(a),(n||i)&&(u+=" "+fo(n,i))):u=fo(s+n,o+i),e("transform",u)}function Rx(e,t,n){var i=Rn.height(t),r=t.align,s=Ap(t),o=s.x1,a=s.y1,u=t.dx||0,l=(t.dy||0)+Dx(t)-Math.round(.8*i),c=_c(t),f;if(I(c)?(i+=As(t)*(c.length-1),f=c.reduce((d,h)=>Math.max(d,Rn.width(t,h)),0)):f=Rn.width(t,c),r==="center"?u-=f/2:r==="right"&&(u-=f),e.set(u+=o,l+=a,u+f,l+i),t.angle&&!n)e.rotate(t.angle*Es,o,a);else if(n===2)return e.rotatedPoints(t.angle*Es,o,a);return e}function NI(e,t,n){bi(t,i=>{var r=i.opacity==null?1:i.opacity,s,o,a,u,l,c,f;if(!(n&&!n.intersects(i.bounds)||r===0||i.fontSize<=0||i.text==null||i.text.length===0)){if(e.font=Ep(i),e.textAlign=i.align||"left",s=Ap(i),o=s.x1,a=s.y1,i.angle&&(e.save(),e.translate(o,a),e.rotate(i.angle*Es),o=a=0),o+=i.dx||0,a+=(i.dy||0)+Dx(i),c=_c(i),ja(e,i),I(c))for(l=As(i),u=0;u<c.length;++u)f=ws(i,c[u]),i.fill&&Nd(e,i,r)&&e.fillText(f,o,a),i.stroke&&qa(e,i,r)&&e.strokeText(f,o,a),a+=l;else f=ws(i,c),i.fill&&Nd(e,i,r)&&e.fillText(f,o,a),i.stroke&&qa(e,i,r)&&e.strokeText(f,o,a);i.angle&&e.restore()}})}function LI(e,t,n,i,r,s){if(t.fontSize<=0)return!1;if(!t.angle)return!0;var o=Ap(t),a=o.x1,u=o.y1,l=Rx(Sl,t,1),c=-t.angle*Es,f=Math.cos(c),d=Math.sin(c),h=f*r-d*s+(a-f*a+d*u),p=d*r+f*s+(u-d*a-f*u);return l.contains(h,p)}function PI(e,t){const n=Rx(Sl,e,2);return Ea(t,n[0],n[1],n[2],n[3])||Ea(t,n[0],n[1],n[4],n[5])||Ea(t,n[4],n[5],n[6],n[7])||Ea(t,n[2],n[3],n[6],n[7])}var II={type:"text",tag:"text",nested:!1,attr:MI,bound:Rx,draw:NI,pick:bp(LI),isect:PI},BI=Sx("trail",PP,JP),Ln={arc:XP,area:QP,group:fI,image:gI,line:mI,path:xI,rect:AI,rule:FI,shape:_I,symbol:kI,text:II,trail:BI};function Ym(e,t,n){var i=Ln[e.mark.marktype],r=t||i.bound;return i.nested&&(e=e.mark),r(e.bounds||(e.bounds=new tt),e,n)}var WA={mark:null};function kD(e,t,n){var i=Ln[e.marktype],r=i.bound,s=e.items,o=s&&s.length,a,u,l,c;if(i.nested)return o?l=s[0]:(WA.mark=e,l=WA),c=Ym(l,r,n),t=t&&t.union(c)||c,t;if(t=t||e.bounds&&e.bounds.clear()||new tt,o)for(a=0,u=s.length;a<u;++a)t.union(Ym(s[a],r,n));return e.bounds=t}const zI=["marktype","name","role","interactive","clip","items","zindex","x","y","width","height","align","baseline","fill","fillOpacity","opacity","blend","stroke","strokeOpacity","strokeWidth","strokeCap","strokeDash","strokeDashOffset","strokeForeground","strokeOffset","startAngle","endAngle","innerRadius","outerRadius","cornerRadius","padAngle","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomLeft","cornerRadiusBottomRight","interpolate","tension","orient","defined","url","aspect","smooth","path","scaleX","scaleY","x2","y2","size","shape","text","angle","theta","radius","dir","dx","dy","ellipsis","limit","lineBreak","lineHeight","font","fontSize","fontWeight","fontStyle","fontVariant","description","aria","ariaRole","ariaRoleDescription"];function DD(e,t){return JSON.stringify(e,zI,t)}function RD(e){const t=typeof e=="string"?JSON.parse(e):e;return OD(t)}function OD(e){var t=e.marktype,n=e.items,i,r,s;if(n)for(r=0,s=n.length;r<s;++r)i=t?"mark":"group",n[r][i]=e,n[r].zindex&&(n[r][i].zdirty=!0),(t||i)==="group"&&OD(n[r]);return t&&kD(e),e}class TD{constructor(t){arguments.length?this.root=RD(t):(this.root=GA({marktype:"group",name:"root",role:"frame"}),this.root.items=[new mp(this.root)])}toJSON(t){return DD(this.root,t||0)}mark(t,n,i){n=n||this.root.items[0];const r=GA(t,n);return n.items[i]=r,r.zindex&&(r.group.zdirty=!0),r}}function GA(e,t){const n={bounds:new tt,clip:!!e.clip,group:t,interactive:e.interactive!==!1,items:[],marktype:e.marktype,name:e.name||void 0,role:e.role||void 0,zindex:e.zindex||0};return e.aria!=null&&(n.aria=e.aria),e.description&&(n.description=e.description),n}function os(e,t,n){return!e&&typeof document<"u"&&document.createElement&&(e=document),e?n?e.createElementNS(n,t):e.createElement(t):null}function Ox(e,t){t=t.toLowerCase();for(var n=e.childNodes,i=0,r=n.length;i<r;++i)if(n[i].tagName.toLowerCase()===t)return n[i]}function it(e,t,n,i){var r=e.childNodes[t],s;return(!r||r.tagName.toLowerCase()!==n.toLowerCase())&&(s=r||null,r=os(e.ownerDocument,n,i),e.
8insertBefore(r,s)),r}function zn(e,t){for(var n=e.childNodes,i=n.length;i>t;)e.removeChild(n[--i]);return e}function MD(e){return"mark-"+e.marktype+(e.role?" role-"+e.role:"")+(e.name?" "+e.name:"")}function wp(e,t){const n=t.getBoundingClientRect();return[e.clientX-n.left-(t.clientLeft||0),e.clientY-n.top-(t.clientTop||0)]}function UI(e,t,n,i){var r=e&&e.mark,s,o;if(r&&(s=Ln[r.marktype]).tip){for(o=wp(t,n),o[0]-=i[0],o[1]-=i[1];e=e.mark.group;)o[0]-=e.x||0,o[1]-=e.y||0;e=s.tip(r.items,o)}return e}let Tx=class{constructor(t,n){this._active=null,this._handlers={},this._loader=t||Qh(),this._tooltip=n||jI}initialize(t,n,i){return this._el=t,this._obj=i||null,this.origin(n)}element(){return this._el}canvas(){return this._el&&this._el.firstChild}origin(t){return arguments.length?(this._origin=t||[0,0],this):this._origin.slice()}scene(t){return arguments.length?(this._scene=t,this):this._scene}on(){}off(){}_handlerIndex(t,n,i){for(let r=t?t.length:0;--r>=0;)if(t[r].type===n&&(!i||t[r].handler===i))return r;return-1}handlers(t){const n=this._handlers,i=[];if(t)i.push(...n[this.eventName(t)]);else for(const r in n)i.push(...n[r]);return i}eventName(t){const n=t.indexOf(".");return n<0?t:t.slice(0,n)}handleHref(t,n,i){this._loader.sanitize(i,{context:"href"}).then(r=>{const s=new MouseEvent(t.type,t),o=os(null,"a");for(const a in r)o.setAttribute(a,r[a]);o.dispatchEvent(s)}).catch(()=>{})}handleTooltip(t,n,i){if(n&&n.tooltip!=null){n=UI(n,t,this.canvas(),this._origin);const r=i&&n&&n.tooltip||null;this._tooltip.call(this._obj,this,t,n,r)}}getItemBoundingClientRect(t){const n=this.canvas();if(!n)return;const i=n.getBoundingClientRect(),r=this._origin,s=t.bounds,o=s.width(),a=s.height();let u=s.x1+r[0]+i.left,l=s.y1+r[1]+i.top;for(;t.mark&&(t=t.mark.group);)u+=t.x||0,l+=t.y||0;return{x:u,y:l,width:o,height:a,left:u,top:l,right:u+o,bottom:l+a}}};function jI(e,t,n,i){e.element().setAttribute("title",i||"")}class Dc{constructor(t){this._el=null,this._bgcolor=null,this._loader=new mD(t)}initialize(t,n,i,r,s){return this._el=t,this.resize(n,i,r,s)}element(){return this._el}canvas(){return this._el&&this._el.firstChild}background(t){return arguments.length===0?this._bgcolor:(this._bgcolor=t,this)}resize(t,n,i,r){return this._width=t,this._height=n,this._origin=i||[0,0],this._scale=r||1,this}dirty(){}render(t,n){const i=this;return i._call=function(){i._render(t,n)},i._call(),i._call=null,i}_render(){}renderAsync(t,n){const i=this.render(t,n);return this._ready?this._ready.then(()=>i):Promise.resolve(i)}_load(t,n){var i=this,r=i._loader[t](n);if(!i._ready){const s=i._call;i._ready=i._loader.ready().then(o=>{o&&s(),i._ready=null})}return r}sanitizeURL(t){return this._load("sanitizeURL",t)}loadImage(t){return this._load("loadImage",t)}}const qI="keydown",WI="keypress",GI="keyup",ND="dragenter",rd="dragleave",LD="dragover",Km="pointerdown",HI="pointerup",Id="pointermove",sd="pointerout",PD="pointerover",Jm="mousedown",VI="mouseup",ID="mousemove",Bd="mouseout",BD="mouseover",zd="click",XI="dblclick",YI="wheel",zD="mousewheel",Ud="touchstart",jd="touchmove",qd="touchend",KI=[qI,WI,GI,ND,rd,LD,Km,HI,Id,sd,PD,Jm,VI,ID,Bd,BD,zd,XI,YI,zD,Ud,jd,qd],Qm=Id,Cl=Bd,Zm=zd;class Rc extends Tx{constructor(t,n){super(t,n),this._down=null,this._touch=null,this._first=!0,this._events={},this.events=KI,this.pointermove=VA([Id,ID],[PD,BD],[sd,Bd]),this.dragover=VA([LD],[ND],[rd]),this.pointerout=XA([sd,Bd]),this.dragleave=XA([rd])}initialize(t,n,i){return this._canvas=t&&Ox(t,"canvas"),[zd,Jm,Km,Id,sd,rd].forEach(r=>HA(this,r)),super.initialize(t,n,i)}canvas(){return this._canvas}context(){return this._canvas.getContext("2d")}DOMMouseScroll(t){this.fire(zD,t)}pointerdown(t){this._down=this._active,this.fire(Km,t)}mousedown(t){this._down=this._active,this.fire(Jm,t)}click(t){this._down===this._active&&(this.fire(zd,t),this._down=null)}touchstart(t){this._touch=this.pickEvent(t.changedTouches[0]),this._first&&(this._active=this._touch,this._first=!1),this.fire(Ud,t,!0)}touchmove(t){this.fire(jd,t,!0)}touchend(t){this.fire(qd,t,!0),this._touch=null}fire(t,n,i){const r=i?this._touch:this._active,s=this._handlers[t];if(n.vegaType=t,t===Zm&&r&&r.href?this.handleHref(n,r,r.href):(t===Qm||t===Cl)&&this.handleTooltip(n,r,t!==Cl),s)for(let o=0,a=s.length;o<a;++o)s[o].handler.call(this._obj,n,r)}on(t,n){const i=this.eventName(t),r=this._handlers;return this._handlerIndex(r[i],t,n)<0&&(HA(this,t),(r[i]||(r[i]=[])).push({type:t,handler:n})),this}off(t,n){const i=this.eventName(t),r=this._handlers[i],s=this._handlerIndex(r,t,n);return s>=0&&r.splice(s,1),this}pickEvent(t){const n=wp(t,this._canvas),i=this._origin;return this.pick(this._scene,n[0],n[1],n[0]-i[0],n[1]-i[1])}pick(t,n,i,r,s){const o=this.context();return Ln[t.marktype].pick.call(this,o,t,n,i,r,s)}}const JI=e=>e===Ud||e===jd||e===qd?[Ud,jd,qd]:[e];function HA(e,t){JI(t).forEach(n=>QI(e,n))}function QI(e,t){const n=e.canvas();n&&!e._events[t]&&(e._events[t]=1,n.addEventListener(t,e[t]?i=>e[t](i):i=>e.fire(t,i)))}function cl(e,t,n){t.forEach(i=>
8e.fire(i,n))}function VA(e,t,n){return function(i){const r=this._active,s=this.pickEvent(i);s===r?cl(this,e,i):((!r||!r.exit)&&cl(this,n,i),this._active=s,cl(this,t,i),cl(this,e,i))}}function XA(e){return function(t){cl(this,e,t),this._active=null}}function ZI(){return typeof window<"u"&&window.devicePixelRatio||1}function eB(e,t,n,i,r,s){const o=typeof HTMLElement<"u"&&e instanceof HTMLElement&&e.parentNode!=null,a=e.getContext("2d"),u=o?ZI():r;e.width=t*u,e.height=n*u;for(const l in s)a[l]=s[l];return o&&u!==1&&(e.style.width=t+"px",e.style.height=n+"px"),a.pixelRatio=u,a.setTransform(u,0,0,u,u*i[0],u*i[1]),e}class Wd extends Dc{constructor(t){super(t),this._options={},this._redraw=!1,this._dirty=new tt,this._tempb=new tt}initialize(t,n,i,r,s,o){return this._options=o||{},this._canvas=this._options.externalContext?null:ys(1,1,this._options.type),t&&this._canvas&&(zn(t,0).appendChild(this._canvas),this._canvas.setAttribute("class","marks")),super.initialize(t,n,i,r,s)}resize(t,n,i,r){if(super.resize(t,n,i,r),this._canvas)eB(this._canvas,this._width,this._height,this._origin,this._scale,this._options.context);else{const s=this._options.externalContext;s||T("CanvasRenderer is missing a valid canvas or context"),s.scale(this._scale,this._scale),s.translate(this._origin[0],this._origin[1])}return this._redraw=!0,this}canvas(){return this._canvas}context(){return this._options.externalContext||(this._canvas?this._canvas.getContext("2d"):null)}dirty(t){const n=this._tempb.clear().union(t.bounds);let i=t.mark.group;for(;i;)n.translate(i.x||0,i.y||0),i=i.mark.group;this._dirty.union(n)}_render(t,n){const i=this.context(),r=this._origin,s=this._width,o=this._height,a=this._dirty,u=tB(r,s,o);i.save();const l=this._redraw||a.empty()?(this._redraw=!1,u.expand(1)):nB(i,u.intersect(a),r);return this.clear(-r[0],-r[1],s,o),this.draw(i,t,l,n),i.restore(),a.clear(),this}draw(t,n,i,r){if(n.marktype!=="group"&&r!=null&&!r.includes(n.marktype))return;const s=Ln[n.marktype];n.clip&&ZP(t,n),s.draw.call(this,t,n,i,r),n.clip&&t.restore()}clear(t,n,i,r){const s=this._options,o=this.context();s.type!=="pdf"&&!s.externalContext&&o.clearRect(t,n,i,r),this._bgcolor!=null&&(o.fillStyle=this._bgcolor,o.fillRect(t,n,i,r))}}const tB=(e,t,n)=>new tt().set(0,0,t,n).translate(-e[0],-e[1]);
8function nB(e,t,n){return t.expand(1).round(),e.pixelRatio%1&&t.scale(e.pixelRatio).round().scale(1/e.pixelRatio),t.translate(-(n[0]%1),-(n[1]%1)),e.beginPath(),e.rect(t.x1,t.y1,t.width(),t.height()),e.clip(),t}class UD extends Tx{constructor(t,n){super(t,n);const i=this;i._hrefHandler=a0(i,(r,s)=>{s&&s.href&&i.handleHref(r,s,s.href)}),i._tooltipHandler=a0(i,(r,s)=>{i.handleTooltip(r,s,r.type!==Cl)})}initialize(t,n,i){let r=this._svg;return r&&(r.removeEventListener(Zm,this._hrefHandler),r.removeEventListener(Qm,this._tooltipHandler),r.removeEventListener(Cl,this._tooltipHandler)),this._svg=r=t&&Ox(t,"svg"),r&&(r.addEventListener(Zm,this._hrefHandler),r.addEventListener(Qm,this._tooltipHandler),r.addEventListener(Cl,this._tooltipHandler)),super.initialize(t,n,i)}canvas(){return this._svg}on(t,n){const i=this.eventName(t),r=this._handlers;if(this._handlerIndex(r[i],t,n)<0){const o={type:t,handler:n,listener:a0(this,n)};(r[i]||(r[i]=[])).push(o),this._svg&&this._svg.addEventListener(i,o.listener)}return this}off(t,n){const i=this.eventName(t),r=this._handlers[i],s=this._handlerIndex(r,t,n);return s>=0&&(this._svg&&this._svg.removeEventListener(i,r[s].listener),r.splice(s,1)),this}}const a0=(e,t)=>n=>{let i=n.target.__data__;i=Array.isArray(i)?i[0]:i,n.vegaType=n.type,t.call(e._obj,n,i)},jD="aria-hidden",Mx="aria-label",Nx="role",Lx="aria-roledescription",qD="graphics-object",Px="graphics-symbol",WD=(e,t,n)=>({[Nx]:e,[Lx]:t,[Mx]:n||void 0}),iB=mi(["axis-domain","axis-grid","axis-label","axis-tick","axis-title","legend-band","legend-entry","legend-gradient","legend-label","legend-title","legend-symbol","title"]),YA={axis:{desc:"axis",caption:oB},legend:{desc:"legend",caption:aB},"title-text":{desc:"title",caption:e=>`Title text '${JA(e)}'`}
8,"title-subtitle":{desc:"subtitle",caption:e=>`Subtitle text '${JA(e)}'`}},KA={ariaRole:Nx,ariaRoleDescription:Lx,description:Mx};function GD(e,t){const n=t.aria===!1;if(e(jD,n||void 0),n||t.description==null)for(const i in KA)e(KA[i],void 0);else{const i=t.mark.marktype;e(Mx,t.description),e(Nx,t.ariaRole||(i==="group"?qD:Px)),e(Lx,t.ariaRoleDescription||`${i} mark`)}}function HD(e){return e.aria===!1?{[jD]:!0}:iB[e.role]?null:YA[e.role]?sB(e,YA[e.role]):rB(e)}function rB(e){const t=e.marktype,n=t==="group"||t==="text"||e.items.some(i=>i.description!=null&&i.aria!==!1);return WD(n?qD:Px,`${t} mark container`,e.description)}function sB(e,t){try{const n=e.items[0],i=t.caption||(()=>"");return WD(t.role||Px,t.desc,n.description||i(n))}catch{return null}}function JA(e){return K(e.text).join(" ")}function oB(e){const t=e.datum,n=e.orient,i=t.title?VD(e):null,r=e.context,s=r.scales[t.scale].value,o=r.dataflow.locale(),a=s.type;return`${n==="left"||n==="right"?"Y":"X"}-axis`+(i?` titled '${i}'`:"")+` for a ${za(a)?"discrete":a} scale with ${oD(o,s,e)}`}function aB(e){const t=e.datum,n=t.title?VD(e):null,i=`${t.type||""} legend`.trim(),r=t.scales,s=Object.keys(r),o=e.context,a=o.scales[r[s[0]]].value,u=o.dataflow.locale();return lB(i)+(n?` titled '${n}'`:"")+` for ${uB(s)} with ${oD(u,a,e)}`}function VD(e){try{return K(ve(e.items).items[0].text).join(" ")}catch{return null}}function uB(e){return e=e.map(t=>t+(t==="fill"||t==="stroke"?" color":"")),e.length<2?e[0]:e.slice(0,-1).join(", ")+" and "+ve(e)}function lB(e){return e.length?e[0].toUpperCase()+e.slice(1):e}const XD=e=>(e+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),cB=e=>XD(e).replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;");function Ix(){let e="",t="",n="";const i=[],r=()=>t=n="",s=u=>{t&&(e+=`${t}>${n}`,r()),i.push(u)},o=(u,l)=>(l!=null&&(t+=` ${u}="${cB(l)}"`),a),a={open(u){s(u),t="<"+u;for(var l=arguments.length,c=new Array(l>1?l-1:0),f=1;f<l;f++)c[f-1]=arguments[f];for(const d of c)for(const h in d)o(h,d[h]);return a},close(){const u=i.pop();return t?e+=t+(n?`>${n}</${u}>`:"/>"):e+=`</${u}>`,r(),a},attr:o,text:u=>(n+=XD(u),a),toString:()=>e};return a}const YD=e=>KD(Ix(),e)+"";function KD(e,t){if(e.open(t.tagName),t.hasAttributes()){const n=t.attributes,i=n.length;for(let r=0;r<i;++r)e.attr(n[r].name,n[r].value)}if(t.hasChildNodes()){const n=t.childNodes;for(const i of n)i.nodeType===3?e.text(i.nodeValue):KD(e,i)}return e.close()}const Gd={fill:"fill",fillOpacity:"fill-opacity",stroke:"stroke",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",strokeCap:"stroke-linecap",strokeJoin:"stroke-linejoin",strokeDash:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeMiterLimit:"stroke-miterlimit",opacity:"opacity"},Hd={blend:"mix-blend-mode"},JD={fill:"none","stroke-miterlimit":10},ju=0,QA="http://www.w3.org/2000/xmlns/",nt=Hl.xmlns;class Bx extends Dc{constructor(t){super(t),this._dirtyID=0,this._dirty=[],this._svg=null,this._root=null,this._defs=null}initialize(t,n,i,r,s){return this._defs={},this._clearDefs(),t&&(this._svg=it(t,0,"svg",nt),this._svg.setAttributeNS(QA,"xmlns",nt),this._svg.setAttributeNS(QA,"xmlns:xlink",Hl["xmlns:xlink"]),this._svg.setAttribute("version",Hl.version),this._svg.setAttribute("class","marks"),zn(t,1),this._root=it(this._svg,ju,"g",nt),as(this._root,JD),zn(this._svg,ju+1)),this.background(this._bgcolor),super.initialize(t,n,i,r,s)}background(t){return arguments.length&&this._svg&&this._svg.style.setProperty("background-color",t),super.background(...arguments)}resize(t,n,i,r){return super.resize(t,n,i,r),this._svg&&(as(this._svg,{width:this._width*this._scale,height:this._height*this._scale,viewBox:`0 0 ${this._width} ${this._height}`}),this._root.setAttribute("transform",`translate(${this._origin})`)),this._dirty=[],this}canvas(){return this._svg}svg(){const t=this._svg,n=this._bgcolor;if(!t)return null;let i;n&&(t.removeAttribute("style"),i=it(t,ju,"rect",nt),as(i,{width:this._width,height:this._height,fill:n}));const r=YD(t);return n&&(t.removeChild(i),this._svg.style.setProperty("background-color",n)),r}_render(t,n){return this._dirtyCheck()&&(this._dirtyAll&&this._clearDefs(),this.mark(this._root,t,void 0,n),zn(this._root,1)),this.defs(),this._dirty=[],++this._dirtyID,this}dirty(t){t.dirty!==this._dirtyID&&(t.dirty=this._dirtyID,this._dirty.push(t))}isDirty(t){return this._dirtyAll||!t._svg||!t._svg.ownerSVGElement||t.dirty===this._dirtyID}_dirtyCheck(){this._dirtyAll=!0;const t=this._dirty;if(!t.length||!this._dirtyID)return!0;const n=++this._dirtyID;let i,r,s,o,a,u,l;for(a=0,u=t.length;a<u;++a)if(i=t[a],r=i.mark,r.marktype!==s&&(s=r.marktype,o=Ln[s]),r.zdirty&&r.dirty!==n&&(this._dirtyAll=!1,ZA(i,n),r.items.forEac
8h(c=>{c.dirty=n})),!r.zdirty){if(i.exit){o.nested&&r.items.length?(l=r.items[0],l._svg&&this._update(o,l._svg,l)):i._svg&&(l=i._svg.parentNode,l&&l.removeChild(i._svg)),i._svg=null;continue}i=o.nested?r.items[0]:i,i._update!==n&&(!i._svg||!i._svg.ownerSVGElement?(this._dirtyAll=!1,ZA(i,n)):this._update(o,i._svg,i),i._update=n)}return!this._dirtyAll}mark(t,n,i,r){if(!this.isDirty(n))return n._svg;const s=this._svg,o=n.marktype,a=Ln[o],u=n.interactive===!1?"none":null,l=a.tag==="g",c=ew(n,t,i,"g",s);if(o!=="group"&&r!=null&&!r.includes(o))return zn(c,0),n._svg;c.setAttribute("class",MD(n));const f=HD(n);for(const g in f)Ht(c,g,f[g]);l||Ht(c,"pointer-events",u),Ht(c,"clip-path",n.clip?mx(this,n,n.group):null);let d=null,h=0;const p=g=>{const m=this.isDirty(g),y=ew(g,c,d,a.tag,s);m&&(this._update(a,y,g),l&&hB(this,y,g,r)),d=y,++h};return a.nested?n.items.length&&p(n.items[0]):bi(n,p),zn(c,h),c}_update(t,n,i){$r=n,Rt=n.__values__,GD($l,i),t.attr($l,i,this);const r=gB[t.type];r&&r.call(this,t,n,i),$r&&this.style($r,i)}style(t,n){if(n!=null){for(const i in Gd){let r=i==="font"?kc(n):n[i];if(r===Rt[i])continue;const s=Gd[i];r==null?t.removeAttribute(s):(hx(r)&&(r=uD(r,this._defs.gradient,QD())),t.setAttribute(s,r+"")),Rt[i]=r}for(const i in Hd)od(t,Hd[i],n[i])}}defs(){const t=this._svg,n=this._defs;let i=n.el,r=0;for(const s in n.gradient)i||(n.el=i=it(t,ju+1,"defs",nt)),r=fB(i,n.gradient[s],r);for(const s in n.clipping)i||(n.el=i=it(t,ju+1,"defs",nt)),r=dB(i,n.clipping[s],r);i&&(r===0?(t.removeChild(i),n.el=null):zn(i,r))}_clearDefs(){const t=this._defs;t.gradient={},t.clipping={}}}function ZA(e,t){for(;e&&e.dirty!==t;e=e.mark.group)if(e.dirty=t,e.mark&&e.mark.dirty!==t)e.mark.dirty=t;else return}function fB(e,t,n){let i,r,s;if(t.gradient==="radial"){let o=it(e,n++,"pattern",nt);as(o,{id:Md+t.id,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),o=it(o,0,"rect",nt),as(o,{width:1,height:1,fill:`url(${QD()}#${t.id})`}),e=it(e,n++,"radialGradient",nt),as(e,{id:t.id,fx:t.x1,fy:t.y1,fr:t.r1,cx:t.x2,cy:t.y2,r:t.r2})}else e=it(e,n++,"linearGradient",nt),as(e,{id:t.id,x1:t.x1,x2:t.x2,y1:t.y1,y2:t.y2});for(i=0,r=t.stops.length;i<r;++i)s=it(e,i,"stop",nt),s.setAttribute("offset",t.stops[i].offset),s.setAttribute("stop-color",t.stops[i].color);return zn(e,i),n}function dB(e,t,n){let i;return e=it(e,n,"clipPath",nt),e.setAttribute("id",t.id),t.path?(i=it(e,0,"path",nt),i.setAttribute("d",t.path)):(i=it(e,0,"rect",nt),as(i,{x:0,y:0,width:t.width,height:t.height})),zn(e,1),n+1}function hB(e,t,n,i){t=t.lastChild.previousSibling;let r,s=0;bi(n,o=>{r=e.mark(t,o,r,i),++s}),zn(t,1+s)}function ew(e,t,n,i,r){let s=e._svg,o;if(!s&&(o=t.ownerDocument,s=os(o,i,nt),e._svg=s,e.mark&&(s.__data__=e,s.__values__={fill:"default"},i==="g"))){const a=os(o,"path",nt);s.appendChild(a),a.__data__=e;const u=os(o,"g",nt);s.appendChild(u),u.__data__=e;const l=os(o,"path",nt);s.appendChild(l),l.__data__=e,l.__values__={fill:"default"}}return(s.ownerSVGElement!==r||pB(s,n))&&t.insertBefore(s,n?n.nextSibling:t.firstChild),s}function pB(e,t){return e.parentNode&&e.parentNode.childNodes.length>1&&e.previousSibling!=t}let $r=null,Rt=null;const gB={group(e,t,n){const i=$r=t.childNodes[2];Rt=i.__values__,e.foreground($l,n,this),Rt=t.__values__,$r=t.childNodes[1],e.content($l,n,this);const r=$r=t.childNodes[0];e.background($l,n,this);const s=n.mark.interactive===!1?"none":null;if(s!==Rt.events&&(Ht(i,"pointer-events",s),Ht(r,"pointer-events",s),Rt.events=s),n.strokeForeground&&n.stroke){const o=n.fill;Ht(i,"display",null),this.style(r,n),Ht(r,"stroke",null),o&&(n.fill=null),Rt=i.__values__,this.style(i,n),o&&(n.fill=o),$r=null}else Ht(i,"display","none")},image(e,t,n){n.smooth===!1?(od(t,"image-rendering","optimizeSpeed"),od(t,"image-rendering","pixelated")):od(t,"image-rendering",null)},text(e,t,n){const i=_c(n);let r,s,o,a;I(i)?(s=i.map(u=>ws(n,u)),r=s.join(`
9`),r!==Rt.text&&(zn(t,0),o=t.ownerDocument,a=As(n),s.forEach((u,l)=>{const c=os(o,"tspan",nt);c.__data__=n,c.textContent=u,l&&(c.setAttribute("x",0),c.setAttribute("dy",a)),t.appendChild(c)}),Rt.text=r)):(s=ws(n,i),s!==Rt.text&&(t.textContent=s,Rt.text=s)),Ht(t,"font-family",kc(n)),Ht(t,"font-size",rr(n)+"px"),Ht(t,"font-style",n.fontStyle),Ht(t,"font-variant",n.fontVariant),Ht(t,"font-weight",n.fontWeight)}};function $l(e,t,n){t!==Rt[e]&&(n?mB($r,e,t,n):Ht($r,e,t),Rt[e]=t)}function od(e,t,n){n!==Rt[t]&&(n==null?e.style.removeProperty(t):e.style.setProperty(t,n+""),Rt[t]=n)}function as(e,t){for(const n in t)Ht(e,n,t[n])}function Ht(e,t,n){n!=null?e.setAttribute(t,n):e.removeAttribute(t)}function mB(e,t,n,i){n!=null?e.setAttributeNS(i,t,n):e.removeAttributeNS(i,t)}function QD(){let e;return typeof window>"u"?"":(e=window.location).hash?e.href.slice(0,-e.hash.length):e.href}class ZD extends Dc{constructor(t){super(t),this._text=null,this._defs={gradient:{},clipping:{}}}svg(){return this._text}_render(t){const n=Ix();n.open("svg",fe({},Hl,{class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:`0 0 ${this._width} ${this._height}`}));const i=this._bgcolor;return i&&i!=="transparent"&&i!=="none"&&n.open("rect",{width:this._width,height:this._height,fill:i}).close(),n.open("g",JD,{transform:"translate("+this._origin+")"}),this.mark(n,t),n.close(),this.defs(n),this._text=n.close()+"",this}mark(t,n){const i=Ln[n.marktype],r=i.tag,s=[GD,i.attr];t.open("g",{class:MD(n),"clip-path":n.clip?mx(this,n,n.group):null},HD(n),{"pointer-events":r!=="g"&&n.interactive===!1?"none":null});const o=a=>{const u=this.href(a);if(u&&t.open("a",u),t.open(r,this.attr(n,a,s,r!=="g"?r:null)),r==="text"){const l=_c(a);if(I(l)){const c={x:0,dy:As(a)};for(let f=0;f<l.length;++f)t.open("tspan",f?c:null).text(ws(a,l[f])).close()}else t.text(ws(a,l))}else if(r==="g"){const l=a.strokeForeground,c=a.fill,f=a.stroke;l&&f&&(a.stroke=null),t.open("path",this.attr(n,a,i.background,"bgrect")).close(),t.open("g",this.attr(n,a,i.content)),bi(a,d=>this.mark(t,d)),t.close(),l&&f?(c&&(a.fill=null),a.stroke=f,t.open("path",this.attr(n,a,i.foreground,"bgrect")).close(),c&&(a.fill=c)):t.open("path",this.attr(n,a,i.foreground,"bgfore")).close()}t.close(),u&&t.close()};return i.nested?n.items&&n.items.length&&o(n.items[0]):bi(n,o),t.close()}href(t){const n=t.href;let i;if(n){if(i=this._hrefs&&this._hrefs[n])return i;this.sanitizeURL(n).then(r=>{r["xlink:href"]=r.href,r.href=null,(this._hrefs||(this._hrefs={}))[n]=r})}return null}attr(t,n,i,r){const s={},o=(a,u,l,c)=>{s[c||a]=u};return Array.isArray(i)?i.forEach(a=>a(o,n,this)):i(o,n,this),r&&yB(s,n,t,r,this._defs),s}defs(t){const n=this._defs.gradient,i=this._defs.clipping;if(Object.keys(n).length+Object.keys(i).length!==0){t.open("defs");for(const s in n){const o=n[s],a=o.stops;o.gradient==="radial"?(t.open("pattern",{id:Md+s,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),t.open("rect",{width:"1",height:"1",fill:"url(#"+s+")"}).close(),t.close(),t.open("radialGradient",{id:s,fx:o.x1,fy:o.y1,fr:o.r1,cx:o.x2,cy:o.y2,r:o.r2})):t.open("linearGradient",{id:s,x1:o.x1,x2:o.x2,y1:o.y1,y2:o.y2});for(let u=0;u<a.length;++u)t.open("stop",{offset:a[u].offset,"stop-color":a[u].color}).close();t.close()}for(const s in i){const o=i[s];t.open("clipPath",{id:s}),o.path?t.open("path",{d:o.path}).close():t.open("rect",{x:0,y:0,width:o.width,height:o.height}).close(),t.close()}t.close()}}}function yB(e,t,n,i,r){let s;if(t==null||(i==="bgrect"&&n.interactive===!1&&(e["pointer-events"]="none"),i==="bgfore"&&(n.interactive===!1&&(e["pointer-events"]="none"),e.display="none",t.fill!==null)))return e;i==="image"&&t.smooth===!1&&(s=["image-rendering: optimizeSpeed;","image-rendering: pixelated;"]),i==="text"&&(e["font-family"]=kc(t),e["font-size"]=rr(t)+"px",e["font-style"]=t.fontStyle,e["font-variant"]=t.fontVariant,e["font-weight"]=t.fontWeight);for(const o in Gd){let a=t[o];const u=Gd[o];a==="transparent"&&(u==="fill"||u==="stroke")||a!=null&&(hx(a)&&(a=uD(a,r.gradient,"")),e[u]=a)}for(const o in Hd){const a=t[o];a!=null&&(s=s||[],s.push(`${Hd[o]}: ${a};`))}return s&&(e.style=s.join(" ")),e}const oi={svgMarkTypes:["text"],svgOnTop:!0,debug:!1};function bB(e){oi.svgMarkTypes=e.svgMarkTypes??["text"],oi.svgOnTop=e.svgOnTop??!0,oi.debug=e.debug??!1}class e1 extends Dc{constructor(t){super(t),this._svgRenderer=new Bx(t),this._canvasRenderer=new Wd(t)}initialize(t,n,i,r,s){this._root_el=it(t,0,"div");const o=it(this._root_el,0,"div"),a=it(this._root_el,1,"div");return this._root_el.style.position="relative",oi.debug||(o.style.height="100%",a.style.position="absolute",a.style.top="0",a.style.left="0",a.style.height="100%",a.style.width="100%"),this._svgEl=oi.svgOnTop?a:o,this._canvasEl=oi.svgOnTop?o:a,this._svgEl.style.pointerEvents="none",this._canvasRenderer.initialize(this._canvasEl,n,i,r,s),this._svgRenderer.initialize(this._svgEl,n,i,r,s),super.initialize(t,n,i,r,s)}dirty(t){return oi.svgMarkTypes.includes(t.mark.marktype)?this._svgRenderer.dirty(t):this._canvasRenderer.dirty(t),this}_render(t,n){const r=(n??["arc","area","image","line","path","rect","rule","shape","symbol","text","trail"]).filter(s=>!oi.svgMarkTypes.includes(s));this._svgRenderer.render(t,oi.svgMarkTypes),this._canvasRenderer.render(t,r)}resize(t,n,i,r){return super.resize(t,n,i,r),this._svgRenderer.resize(t,n,i,r),this._canvasRenderer.resize(t,n,i,r),this}background(t){return oi.svgOnTop?this._canvasRenderer.background(t):this._svgRenderer.background(t),this}}class e3 extends Rc{constructor(t,n){super(t,n)}initialize(t,n,i){const r=it(it(t,0,"div"),oi.svgOnTop?0:1,"div");return super.initialize(r,n,i)}}const t3="canvas",n3="hybrid",i3="png",r3="svg",s3="none",us={Canvas:t3,PNG:i3,SVG:r3,Hybrid:n3,None:s3},Eo={};Eo[t3]=Eo[i3]={renderer:Wd,headless:Wd,handler:Rc};Eo[r3]={renderer:Bx,headless:ZD,handler:UD};Eo[n3]={renderer:e1,headless:e1,handler:e3};Eo[s3]={};function Sp(e,t){return e=String(e||"").toLowerCase(),arguments.length>1?(Eo[e]=t,this):Eo[e]}function o3(e,t,n){const i=[],r=new tt().union(t),s=e.marktype;return s?a3(e,r,n,i):s==="group"?u3(e,r,n,i):T("Intersect scene must be mark node or group item.")}function a3(e,t,n,i){if(xB(e,t,n)){const r=e.items,s=e.marktype,o=r.length;let a=0;if(s==="group")for(;a<o;++a)u3(r[a],t,n,i);else for(const u=Ln[s].isect;a<o;++a){const l=r[a];l3(l,t,u)&&i.push(l)}}return i}
vendor: 16,825 bytes, line 9
9function xB(e,t,n){return e.bounds&&t.intersects(e.bounds)&&(e.marktype==="group"||e.interactive!==!1&&(!n||n(e)))}function u3(e,t,n,i){n&&n(e.mark)&&l3(e,t,Ln.group.isect)&&i.push(e);const r=e.items,s=r&&r.length;if(s){const o=e.x||0,a=e.y||0;t.translate(-o,-a);for(let u=0;u<s;++u)a3(r[u],t,n,i);t.translate(o,a)}return i}function l3(e,t,n){const i=e.bounds;return t.encloses(i)||t.intersects(i)&&n(e,t)}const u0=new tt;function c3(e){const t=e.clip;if(de(t))t($c(u0.clear()));else if(t)u0.set(0,0,e.group.width,e.group.height);else return;e.bounds.intersect(u0)}const vB=1e-9;function zx(e,t,n){return e===t?!0:n==="path"?f3(e,t):e instanceof Date&&t instanceof Date?+e==+t:Se(e)&&Se(t)?Math.abs(e-t)<=vB:!e||!t||!X(e)&&!X(t)?e==t:EB(e,t)}function f3(e,t){return zx(Ua(e),Ua(t))}function EB(e,t){var n=Object.keys(e),i=Object.keys(t),r,s;if(n.length!==i.length)return!1;for(n.sort(),i.sort(),s=n.length-1;s>=0;s--)if(n[s]!=i[s])return!1;for(s=n.length-1;s>=0;s--)if(r=n[s],!zx(e[r],t[r],r))return!1;return typeof e==typeof t}function AB(){gD(),HL()}const Wa="top",li="left",ci="right",Ss="bottom",wB="top-left",SB="top-right",CB="bottom-left",$B="bottom-right",Ux="start",t1="middle",Vt="end",FB="x",_B="y",Cp="group",jx="axis",qx="title",kB="frame",DB="scope",Wx="legend",d3="row-header",h3="row-footer",p3="row-title",g3="column-header",m3="column-footer",y3="column-title",RB="padding",OB="symbol",b3="fit",x3="fit-x",v3="fit-y",TB="pad",Gx="none",mf="all",n1="each",Hx="flush",ls="column",cs="row";function E3(e){O.call(this,null,e)}H(E3,O,{transform(e,t){const n=t.dataflow,i=e.mark,r=i.marktype,s=Ln[r],o=s.bound;let a=i.bounds,u;if(s.nested)i.items.length&&n.dirty(i.items[0]),a=yf(i,o),i.items.forEach(l=>{l.bounds.clear().union(a)});else if(r===Cp||e.modified())switch(t.visit(t.MOD,l=>n.dirty(l)),a.clear(),i.items.forEach(l=>a.union(yf(l,o))),i.role){case jx:case Wx:case qx:t.reflow()}else u=t.changed(t.REM),t.visit(t.ADD,l=>{a.union(yf(l,o))}),t.visit(t.MOD,l=>{u=u||a.alignsWith(l.bounds),n.dirty(l),a.union(yf(l,o))}),u&&(a.clear(),i.items.forEach(l=>a.union(l.bounds)));return c3(i),t.modifies("bounds")}});function yf(e,t,n){return t(e.bounds.clear(),e,n)}const tw=":vega_identifier:";function Vx(e){O.call(this,0,e)}Vx.Definition={type:"Identifier",metadata:{modifies:!0},params:[{name:"as",type:"string",required:!0}]};H(Vx,O,{transform(e,t){const n=MB(t.dataflow),i=e.as;let r=n.value;return t.visit(t.ADD,s=>s[i]=s[i]||++r),n.set(this.value=r),t}});function MB(e){return e._signals[tw]||(e._signals[tw]=e.add(0))}function A3(e){O.call(this,null,e)}H(A3,O,{transform(e,t){let n=this.value;n||(n=t.dataflow.scenegraph().mark(e.markdef,NB(e),e.index),n.group.context=e.context,e.context.group||(e.context.group=n.group),n.source=this.source,n.clip=e.clip,n.interactive=e.interactive,this.value=n);const i=n.marktype===Cp?mp:gp;return t.visit(t.ADD,r=>i.call(r,n)),(e.modified("clip")||e.modified("interactive"))&&(n.clip=e.clip,n.interactive=!!e.interactive,n.zdirty=!0,t.reflow()),n.items=t.source,t}});function NB(e){const t=e.groups,n=e.parent;return t&&t.size===1?t.get(Object.keys(t.object)[0]):t&&n?t.lookup(n):null}function w3(e){O.call(this,null,e)}const nw={parity:e=>e.filter((t,n)=>n%2?t.opacity=0:1),greedy:(e,t)=>{let n;return e.filter((i,r)=>!r||!S3(n.bounds,i.bounds,t)?(n=i,1):i.opacity=0)}},S3=(e,t,n)=>n>Math.max(t.x1-e.x2,e.x1-t.x2,t.y1-e.y2,e.y1-t.y2),iw=(e,t)=>{for(var n=1,i=e.length,r=e[0].bounds,s;n<i;r=s,++n)if(S3(r,s=e[n].bounds,t))return!0},LB=e=>{const t=e.bounds;return t.width()>1&&t.height()>1},PB=(e,t,n)=>{var i=e.range(),r=new tt;return t===Wa||t===Ss?r.set(i[0],-1/0,i[1],1/0):r.set(-1/0,i[0],1/0,i[1]),r.expand(n||1),s=>r.encloses(s.bounds)},rw=e=>(e.forEach(t=>t.opacity=1),e),sw=(e,t)=>e.reflow(t.modified()).modifies("opacity");H(w3,O,{transform(e,t){const n=nw[e.method]||nw.parity,i=e.separation||0;let r=t.materialize(t.SOURCE).source,s,o;if(!r||!r.length)return;if(!e.method)return e.modified("method")&&(rw(r),t=sw(t,e)),t;if(r=r.filter(LB),!r.length)return;if(e.sort&&(r=r.slice().sort(e.sort)),s=rw(r),t=sw(t,e),s.length>=3&&iw(s,i)){do s=n(s,i);while(s.length>=3&&iw(s,i));s.length<3&&!ve(r).opacity&&(s.length>1&&(ve(s).opacity=0),ve(r).opacity=1)}e.boundScale&&e.boundTolerance>=0&&(o=PB(e.boundScale,e.boundOrient,+e.boundTolerance),r.forEach(u=>{o(u)||(u.opacity=0)}));const a=s[0].mark.bounds.clear();return r.forEach(u=>{u.opacity&&a.union(u.bounds)}),t}});function C3(e){O.call(this,null,e)}H(C3,O,{transform(e,t){const n=t.dataflow;if(t.visit(t.ALL,i=>n.dirty(i)),t.fields&&t.fields.zindex){const i=t.source&&t.source[0];i&&(i.mark.zdirty=!0)}}});const Dt=new tt;function Aa(e,t,n){return e[t]===n?0:(e[t]=n,1)}function IB(e){var t=e.items[0].orient;return t===li||t===ci}function BB(e){let t=+e.grid;return[e.ticks?t++:-1,e.labels?t++:-1,t+ +e.domain]}function zB(e,t,n,i){var r=t.items[0],s=r.datum,o=r.translate!=null?r.translate:.5,a=r.orient,u=BB(s),l=r.range,c=r.offset,f=r.position,d=r.minExtent,h=r.maxExtent,p=s.title&&r.items[u[2]].items[0],g=r.titlePadding,m=r.bounds,y=p&&kx(p),b=0,x=0,v,A;switch(Dt.clear().union(m),m.clear(),(v=u[0])>-1&&m.union(r.items[v].bounds),(v=u[1])>-1&&m.union(r.items[v].bounds),a){case Wa:b=f||0,x=-c,A=Math.max(d,Math.min(h,-m.y1)),m.add(0,-A).add(l,0),p&&bf(e,p,A,g,y,0,-1,m);break;case li:b=-c,x=f||0,A=Math.max(d,Math.min(h,-m.x1)),m.add(-A,0).add(0,l),p&&bf(e,p,A,g,y,1,-1,m);break;case ci:b=n+c,x=f||0,A=Math.max(d,Math.min(h,m.x2)),m.add(0,0).add(A,l),p&&bf(e,p,A,g,y,1,1,m);break;case Ss:b=f||0,x=i+c,A=Math.max(d,Math.min(h,m.y2)),m.add(0,0).add(l,A),p&&bf(e,p,A,g,0,0,1,m);break;default:b=r.x,x=r.y}return Br(m.translate(b,x),r),Aa(r,"x",b+o)|Aa(r,"y",x+o)&&(r.bounds=Dt,e.dirty(r),r.bounds=m,e.dirty(r)),r.mark.bounds.clear().union(m)}function bf(e,t,n,i,r,s,o,a){const u=t.bounds;if(t.auto){const l=o*(n+r+i);let c=0,f=0;e.dirty(t),s?c=(t.x||0)-(t.x=l):f=(t.y||0)-(t.y=l),t.mark.bounds.clear().union(u.translate(-c,-f)),e.dirty(t)}a.union(u)}const ow=(e,t)=>Math.floor(Math.min(e,t)),aw=(e,t)=>Math.ceil(Math.max(e,t));function UB(e){var t=e.items,n=t.length,i=0,r,s;const o={marks:[],rowheaders:[],rowfooters:[],colheaders:[],colfooters:[],rowtitle:null,coltitle:null};for(;i<n;++i)if(r=t[i],s=r.items,r.marktype===Cp)switch(r.role){case jx:case Wx:case qx:break;case d3:o.rowheaders.push(...s);break;case h3:o.rowfooters.push(...s);break;case g3:o.colheaders.push(...s);break;case m3:o.colfooters.push(...s);break;case p3:o.rowtitle=s[0];break;case y3:o.coltitle=s[0];break;default:o.marks.push(...s)}return o}function jB(e){return new tt().set(0,0,e.width||0,e.height||0)}function qB(e){const t=e.bounds.clone();return t.empty()?t.set(0,0,0,0):t.translate(-(e.x||0),-(e.y||0))}function Ue(e,t,n){const i=X(e)?e[t]:e;return i??(n!==void 0?n:0)}function uw(e){return e<0?Math.ceil(-e):0}function $3(e,t,n){var i=!n.nodirty,r=n.bounds===Hx?jB:qB,s=Dt.set(0,0,0,0),o=Ue(n.align,ls),a=Ue(n.align,cs),u=Ue(n.padding,ls),l=Ue(n.padding,cs),c=n.columns||t.length,f=c<=0?1:Math.ceil(t.length/c),d=t.length,h=Array(d),p=Array(c),g=0,m=Array(d),y=Array(f),b=0,x=Array(d),v=Array(d),A=Array(d),w,E,S,C,F,k,L,R,_,$,D;for(E=0;E<c;++E)p[E]=0;for(E=0;E<f;++E)y[E]=0;for(E=0;E<d;++E)k=t[E],F=A[E]=r(k),k.x=k.x||0,x[E]=0,k.y=k.y||0,v[E]=0,S=E%c,C=~~(E/c),g=Math.max(g,L=Math.ceil(F.x2)),b=Math.max(b,R=Math.ceil(F.y2)),p[S]=Math.max(p[S],L),y[C]=Math.max(y[C],R),h[E]=u+uw(F.x1),m[E]=l+uw(F.y1),i&&e.dirty(t[E]);for(E=0;E<d;++E)E%c===0&&(h[E]=0),E<c&&(m[E]=0);if(o===n1)for(S=1;S<c;++S){for(D=0,E=S;E<d;E+=c)D<h[E]&&(D=h[E]);for(E=S;E<d;E+=c)h[E]=D+p[S-1]}else if(o===mf){for(D=0,E=0;E<d;++E)E%c&&D<h[E]&&(D=h[E]);for(E=0;E<d;++E)E%c&&(h[E]=D+g)}else for(o=!1,S=1;S<c;++S)for(E=S;E<d;E+=c)h[E]+=p[S-1];if(a===n1)for(C=1;C<f;++C){for(D=0,E=C*c,w=E+c;E<w;++E)D<m[E]&&(D=m[E]);for(E=C*c;E<w;++E)m[E]=D+y[C-1]}else if(a===mf){for(D=0,E=c;E<d;++E)D<m[E]&&(D=m[E]);for(E=c;E<d;++E)m[E]=D+b}else for(a=!1,C=1;C<f;++C)for(E=C*c,w=E+c;E<w;++E)m[E]+=y[C-1];for(_=0,E=0;E<d;++E)_=h[E]+(E%c?_:0),x[E]+=_-t[E].x;for(S=0;S<c;++S)for($=0,E=S;E<d;E+=c)$+=m[E],v[E]+=$-t[E].y;if(o&&Ue(n.center,ls)&&f>1)for(E=0;E<d;++E)F=o===mf?g:p[E%c],_=F-A[E].x2-t[E].x-x[E],_>0&&(x[E]+=_/2);if(a&&Ue(n.center,cs)&&c!==1)for(E=0;E<d;++E)F=a===mf?b:y[~~(E/c)],$=F-A[E].y2-t[E].y-v[E],$>0&&(v[E]+=$/2);for(E=0;E<d;++E)s.union(A[E].translate(x[E],v[E]));switch(_=Ue(n.anchor,FB),$=Ue(n.anchor,_B),Ue(n.anchor,ls)){case Vt:_-=s.width();break;case t1:_-=s.width()/2}switch(Ue(n.anchor,cs)){case Vt:$-=s.height();break;case t1:$-=s.height()/2}for(_=Math.round(_),$=Math.round($),s.clear(),E=0;E<d;++E)t[E].mark.bounds.clear();for(E=0;E<d;++E)k=t[E],k.x+=x[E]+=_,k.y+=v[E]+=$,s.union(k.mark.bounds.union(k.bounds.translate(x[E],v[E]))),i&&e.dirty(k);return s}function WB(e,t,n){var i=UB(t),r=i.marks,s=n.bounds===Hx?GB:HB,o=n.offset,a=n.columns||r.length,u=a<=0?1:Math.ceil(r.length/a),l=u*a,c,f,d,h,p,g,m;const y=$3(e,r,n);y.empty()&&y.set(0,0,0,0),i.rowheaders&&(g=Ue(n.headerBand,cs,null),c=xf(e,i.rowheaders,r,a,u,-Ue(o,"rowHeader"),ow,0,s,"x1",0,a,1,g)),i.colheaders&&(g=Ue(n.headerBand,ls,null),f=xf(e,i.colheaders,r,a,a,-Ue(o,"columnHeader"),ow,1,s,"y1",0,1,a,g)),i.rowfooters&&(g=Ue(n.footerBand,cs,null),d=xf(e,i.rowfooters,r,a,u,Ue(o,"rowFooter"),aw,0,s,"x2",a-1,a,1,g)),i.colfooters&&(g=Ue(n.footerBand,ls,null),h=xf(e,i.colfooters,r,a,a,Ue(o,"columnFooter"),aw,1,s,"y2",l-a,1,a,g)),i.rowtitle&&(p=Ue(n.titleAnchor,cs),m=Ue(o,"rowTitle"),m=p===Vt?d+m:c-m,g=Ue(n.titleBand,cs,.5),lw(e,i.rowtitle,m,0,y,g)),i.coltitle&&(p=Ue(n.titleAnchor,ls),m=Ue(o,"columnTitle"),m=p===Vt?h+m:f-m,g=Ue(n.titleBand,ls,.5),lw(e,i.coltitle,m,1,y,g))}function GB(e,t){return t==="x1"?e.x||0:t==="y1"?e.y||0:t==="x2"?(e.x||0)+(e.width||0):t==="y2"?(e.y||0)+(e.height||0):void 0}function HB(e,t){return e.bounds[t]}function xf(e,t,n,i,r,s,o,a,u,l,c,f,d,h){var p=n.length,g=0,m=0,y,b,x,v,A,w,E,S,C;if(!p)return g;for(y=c;y<p;y+=f)n[y]&&(g=o(g,u(n[y],l)));if(!t.length)return g;for(t.length>r&&(e.warn("Grid headers exceed limit: "+r),t=t.slice(0,r)),g+=s,b=0,v=t.length;b<v;++b)e.dirty(t[b]),t[b].mark.bounds.clear();for(y=c,b=0,v=t.length;b<v;++b,y+=f){for(w=t[b],A=w.mark.bounds,x=y;x>=0&&(E=n[x])==null;x-=d);a?(S=h==null?E.x:Math.round(E.bounds.x1+h*E.bounds.width()),C=g):(S=g,C=h==null?E.y:Math.round(E.bounds.y1+h*E.bounds.height())),A.union(w.bounds.translate(S-(w.x||0),C-(w.y||0))),w.x=S,w.y=C,e.dirty(w),m=o(m,A[l])}return m}function lw(e,t,n,i,r,s){if(t){e.dirty(t);var o=n,a=n;i?o=Math.round(r.x1+s*r.width()):a=Math.round(r.y1+s*r.height()),t.bounds.translate(o-(t.x||0),a-(t.y||0)),t.mark.bounds.clear().union(t.bounds),t.x=o,t.y=a,e.dirty(t)}}function VB(e,t){const n=e[t]||{};return(i,r)=>n[i]!=null?n[i]:e[i]!=null?e[i]:r}function XB(e,t){let n=-1/0;return e.forEach(i=>{i.offset!=null&&(n=Math.max(n,i.offset))}),n>-1/0?n:t}function YB(e,t,n,i,r,s,o){const a=VB(n,t),u=XB(e,a("offset",0)),l=a("anchor",Ux),c=l===Vt?1:l===t1?.5:0,f={align:n1,bounds:a("bounds",Hx),columns:a("direction")==="vertical"?1:e.length,padding:a("margin",8),center:a("center"),nodirty:!0};switch(t){case li:f.anchor={x:Math.floor(i.x1)-u,column:Vt,y:c*(o||i.height()+2*i.y1),row:l};break;case ci:f.anchor={x:Math.ceil(i.x2)+u,y:c*(o||i.height()+2*i.y1),row:l};break;case Wa:f.anchor={y:Math.floor(r.y1)-u,row:Vt,x:c*(s||r.width()+2*r.x1),column:l};break;case Ss:f.anchor={y:Math.ceil(r.y2)+u,x:c*(s||r.width()+2*r.x1),column:l};break;case wB:f.anchor={x:u,y:u};break;case SB:f.anchor={x:s-u,y:u,column:Vt};break;case CB:f.anchor={x:u,y:o-u,row:Vt};break;case $B:f.anchor={x:s-u,y:o-u,column:Vt,row:Vt};break}return f}function KB(e,t){var n=t.items[0],i=n.datum,r=n.orient,s=n.bounds,o=n.x,a=n.y,u,l;return n._bounds?n._bounds.clear().union(s):n._bounds=s.clone(),s.clear(),QB(e,n,n.items[0].items[0]),s=JB(n,s),u=2*n.padding,l=2*n.padding,s.empty()||(u=Math.ceil(s.width()+u),l=Math.ceil(s.height()+l)),i.type===OB&&ZB(n.items[0].items[0].items[0].items),r!==Gx&&(n.x=o=0,n.y=a=0),n.width=u,n.height=l,Br(s.set(o,a,o+u,a+l),n),n.mark.bounds.clear().union(s),n}function JB(e,t){return e.items.forEach(n=>t.union(n.bounds)),t.x1=e.padding,t.y1=e.padding,t}function QB(e,t,n){var i=t.padding,r=i-n.x,s=i-n.y;if(!t.datum.title)(r||s)&&qu(e,n,r,s);else{var o=t.items[1].items[0],a=o.anchor,u=t.titlePadding||0,l=i-o.x,c=i-o.y;switch(o.orient){case li:r+=Math.ceil(o.bounds.width())+u;break;case ci:case Ss:break;default:s+=o.bounds.height()+u}switch((r||s)&&qu(e,n,r,s),o.orient){case li:c+=oa(t,n,o,a,1,1);break;case ci:l+=oa(t,n,o,Vt,0,0)+u,c+=oa(t,n,o,a,1,1);break;case Ss:l+=oa(t,n,o,a,0,0),c+=oa(t,n,o,Vt,-1,0,1)+u;break;default:l+=oa(t,n,o,a,0,0)}(l||c)&&qu(e,o,l,c),(l=Math.round(o.bounds.x1-i))<0&&(qu(e,n,-l,0),qu(e,o,-l,0))}}function oa(e,t,n,i,r,s,o){const a=e.datum.type!=="symbol",u=n.datum.vgrad,l=a&&(s||!u)&&!o?t.items[0]:t,c=l.bounds[r?"y2":"x2"]-e.padding,f=u&&s?c:0,d=u&&s?0:c,h=r<=0?0:kx(n);return Math.round(i===Ux?f:i===Vt?d-h:.5*(c-h))}function qu(e,t,n,i){t.x+=n,t.y+=i,t.bounds.translate(n,i),t.mark.bounds.translate(n,i),e.dirty(t)}function ZB(e){const t=e.reduce((n,i)=>(n[i.column]=Math.max(i.bounds.x2-i.x,n[i.column]||0),n),{});e.forEach(n=>{n.width=t[n.column],n.height=n.bounds.y2-n.y})}function ez(e,t,n,i,r){var s=t.items[0],o=s.frame,a=s.orient,u=s.anchor,l=s.offset,c=s.padding,f=s.items[0].items[0],d=s.items[1]&&s.items[1].items[0],h=a===li||a===ci?i:n,p=0,g=0,m=0,y=0,b=0,x;if(o!==Cp?a===li?(p=r.y2,h=r.y1):a===ci?(p=r.y1,h=r.y2):(p=r.x1,h=r.x2):a===li&&(p=i,h=0),x=u===Ux?p:u===Vt?h:(p+h)/2,d&&d.text){switch(a){case Wa:case Ss:b=f.bounds.height()+c;break;case li:y=f.bounds.width()+c;break;case ci:y=-f.bounds.width()-c;break}Dt.clear().union(d.bounds),Dt.translate(y-(d.x||0),b-(d.y||0)),Aa(d,"x",y)|Aa(d,"y",b)&&(e.dirty(d),d.bounds.clear().union(Dt),d.mark.bounds.clear().union(Dt),e.dirty(d)),Dt.clear().union(d.bounds)}else Dt.clear();switch(Dt.union(f.bounds),a){case Wa:g=x,m=r.y1-Dt.height()-l;break;case li:g=r.x1-Dt.width()-l,m=x;break;case ci:g=r.x2+Dt.width()+l,m=x;break;case Ss:g=x,m=r.y2+l;break;default:g=s.x,m=s.y}return Aa(s,"x",g)|Aa(s,"y",m)&&(Dt.translate(g,m),e.dirty(s),s.bounds.clear().union(Dt),t.bounds.clear().union(Dt),e.dirty(s)),s.bounds}function F3(e){O.call(this,null,e)}H(F3,O,{transform(e,t){const n=t.dataflow;return e.mark.items.forEach(i=>{e.layout&&WB(n,i,e.layout),nz(n,i,e)}),tz(e.mark.group)?t.reflow():t}});function tz(e){return e&&e.mark.role!=="legend-entry"}function nz(e,t,n){var i=t.items,r=Math.max(0,t.width||0),s=Math.max(0,t.height||0),o=new tt().set(0,0,r,s),a=o.clone(),u=o.clone(),l=[],c,f,d,h,p,g;for(p=0,g=i.length;p<g;++p)switch(f=i[p],f.role){case jx:h=IB(f)?a:u,h.union(zB(e,f,r,s));break;case qx:c=f;break;case Wx:l.push(KB(e,f));break;case kB:case DB:case d3:case h3:case p3:case g3:case m3:case y3:a.union(f.bounds),u.union(f.bounds);break;default:o.union(f.bounds)}if(l.length){const m={};l.forEach(y=>{d=y.orient||ci,d!==Gx&&(m[d]||(m[d]=[])).push(y)});for(const y in m){const b=m[y];$3(e,b,YB(b,y,n.legends,a,u,r,s))}l.forEach(y=>{const b=y.bounds;if(b.equals(y._bounds)||(y.bounds=y._bounds,e.dirty(y),y.bounds=b,e.dirty(y)),n.autosize&&(n.autosize.type===b3||n.autosize.type===x3||n.autosize.type===v3))switch(y.orient){case li:case ci:o.add(b.x1,0).add(b.x2,0);break;case Wa:case Ss:o.add(0,b.y1).add(0,b.y2)}else o.union(b)})}o.union(a).union(u),c&&o.union(ez(e,c,r,s,o)),t.clip&&o.set(0,0,t.width||0,t.height||0),iz(e,t,o,n)}function iz(e,t,n,i){const r=i.autosize||{},s=r.type;if(e._autosize<1||!s)return;let o=e._width,a=e._height,u=Math.max(0,t.width||0),l=Math.max(0,Math.ceil(-n.x1)),c=Math.max(0,t.height||0),f=Math.max(0,Math.ceil(-n.y1));const d=Math.max(0,Math.ceil(n.x2-u)),h=Math.max(0,Math.ceil(n.y2-c));if(r.contains===RB){const p=e.padding();o-=p.left+p.right,a-=p.top+p.bottom}s===Gx?(l=0,f=0,u=o,c=a):s===b3?(u=Math.max(0,o-l-d),c=Math.max(0,a-f-h)):s===x3?(u=Math.max(0,o-l-d),a=c+f+h):s===v3?(o=u+l+d,c=Math.max(0,a-f-h)):s===TB&&(o=u+l+d,a=c+f+h),e._resizeView(o,a,u,c,[l,f],r.resize)}const rz=Object.freeze(Object.defineProperty({__proto__:null,bound:E3,identifier:Vx,mark:A3,overlap:w3,render:C3,viewlayout:F3},Symbol.toStringTag,{value:"Module"}));function _3(e){O.call(this,null,e)}H(_3,O,{transform(e,t){if(this.value&&!e.modified())return t.StopPropagation;var n=t.dataflow.locale(),i=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=this.value,s=e.scale,o=e.count==null?e.values?e.values.length:10:e.count,a=fx(s,o,e.minstep),u=e.format||tD(n,s,a,e.formatSpecifier,e.formatType,!!e.values),l=e.values?eD(s,e.values,a):dx(s,a);return r&&(i.rem=r),r=l.map((c,f)=>$e({index:f/(l.length-1||1),value:c,label:u(c)})),e.extra&&r.length&&r.push($e({index:-1,extra:{value:r[0].value},label:""})),i.source=r,i.add=r,this.value=r,i}});function k3(e){O.call(this,null,e)}function sz(){return $e({})}function oz(e){const t=pu().test(n=>n.exit);return t.lookup=n=>
9t.get(e(n)),t}H(k3,O,{transform(e,t){var n=t.dataflow,i=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=e.item||sz,s=e.key||ie,o=this.value;return I(i.encode)&&(i.encode=null),o&&(e.modified("key")||t.modified(s))&&T("DataJoin does not support modified key function or fields."),o||(t=t.addAll(),this.value=o=oz(s)),t.visit(t.ADD,a=>{const u=s(a);let l=o.get(u);l?l.exit?(o.empty--,i.add.push(l)):i.mod.push(l):(l=r(a),o.set(u,l),i.add.push(l)),l.datum=a,l.exit=!1}),t.visit(t.MOD,a=>{const u=s(a),l=o.get(u);l&&(l.datum=a,i.mod.push(l))}),t.visit(t.REM,a=>{const u=s(a),l=o.get(u);a===l.datum&&!l.exit&&(i.rem.push(l),l.exit=!0,++o.empty)}),t.changed(t.ADD_MOD)&&i.modifies("datum"),(t.clean()||e.clean&&o.empty>n.cleanThreshold)&&n.runAfter(o.clean),i}});function D3(e){O.call(this,null,e)}H(D3,O,{transform(e,t){var n=t.fork(t.ADD_REM),i=e.mod||!1,r=e.encoders,s=t.encode;if(I(s))if(n.changed()||s.every(f=>r[f]))s=s[0],n.encode=null;else return t.StopPropagation;var o=s==="enter",a=r.update||Kr,u=r.enter||Kr,l=r.exit||Kr,c=(s&&!o?r[s]:a)||Kr;if(t.changed(t.ADD)&&(t.visit(t.ADD,f=>{u(f,e),a(f,e)}),n.modifies(u.output),n.modifies(a.output),c!==Kr&&c!==a&&(t.visit(t.ADD,f=>{c(f,e)}),n.modifies(c.output))),t.changed(t.REM)&&l!==Kr&&(t.visit(t.REM,f=>{l(f,e)}),n.modifies(l.output)),o||c!==Kr){const f=t.MOD|(e.modified()?t.REFLOW:0);o?(t.visit(f,d=>{const h=u(d,e)||i;(c(d,e)||h)&&n.mod.push(d)}),n.mod.length&&n.modifies(u.output)):t.visit(f,d=>{(c(d,e)||i)&&n.mod.push(d)}),n.mod.length&&n.modifies(c.output)}return n.changed()?n:t.StopPropagation}});function R3(e){O.call(this,[],e)}H(R3,O,{transform(e,t){if(this.value!=null&&!e.modified())return t.StopPropagation;var n=t.dataflow.locale(),i=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=this.value,s=e.type||Qf,o=e.scale,a=+e.limit,u=fx(o,e.count==null?5:e.count,e.minstep),l=!!e.values||s===Qf,c=e.format||sD(n,o,u,s,e.formatSpecifier,e.formatType,l),f=e.values||rD(o,u),d,h,p,g,m;return r&&(i.rem=r),s===Qf?(a&&f.length>a?(t.dataflow.warn("Symbol legend count exceeds limit, filtering items."),r=f.slice(0,a-1),m=!0):r=f,de(p=e.size)?(!e.values&&o(r[0])===0&&(r=r.slice(1)),g=r.reduce((y,b)=>Math.max(y,p(b,e)),0)):p=qt(g=p||8),r=r.map((y,b)=>$e({index:b,label:c(y,b,r),value:y,offset:g,size:p(y,e)})),m&&(m=f[r.length],r.push($e({index:r.length,label:`…${f.length-r.length} entries`,value:m,offset:g,size:p(m,e)})))):s===TL?(d=o.domain(),h=Jk(o,d[0],ve(d)),f.length<3&&!e.values&&d[0]!==ve(d)&&(f=[d[0],ve(d)]),r=f.map((y,b)=>$e({index:b,label:c(y,b,f),value:y,perc:h(y)}))):(p=f.length-1,h=WL(o),r=f.map((y,b)=>$e({index:b,label:c(y,b,f),value:y,perc:b?h(y):0,perc2:b===p?1:h(f[b+1])}))),i.source=r,i.add=r,this.value=r,i}});const az=e=>e.source.x,uz=e=>e.source.y,lz=e=>e.target.x,cz=e=>e.target.y;function Xx(e){O.call(this,{},e)}Xx.Definition={type:"LinkPath",metadata:{modifies:!0},params:[{name:"sourceX",type:"field",default:"source.x"},{name:"sourceY",type:"field",default:"source.y"},{name:"targetX",type:"field",default:"target.x"},{name:"targetY",type:"field",default:"target.y"},{name:"orient",type:"enum",default:"vertical",values:["horizontal","vertical","radial"]},{name:"shape",type:"enum",default:"line",values:["line","arc","curve","diagonal","orthogonal"]},{name:"require",type:"signal"},{name:"as",type:"string",default:"path"}]};H(Xx,O,{transform(e,t){var n=e.sourceX||az,i=e.sourceY||uz,r=e.targetX||lz,s=e.targetY||cz,o=e.as||"path",a=e.orient||"vertical",u=e.shape||"line",l=cw.get(u+"-"+a)||cw.get(u);return l||T("LinkPath unsupported type: "+e.shape+(e.orient?"-"+e.orient:"")),t.visit(t.SOURCE,c=>{c[o]=l(n(c),i(c),r(c),s(c))}),t.reflow(e.modified()).modifies(o)}});const O3=(e,t,n,i)=>"M"+e+","+t+"L"+n+","+i,fz=(e,t,n,i)=>O3(t*Math.cos(e),t*Math.sin(e),i*Math.cos(n),i*Math.sin(n)),T3=(e,t,n,i)=>{var r=n-e,s=i-t,o=Math.hypot(r,s)/2,a=180*Math.atan2(s,r)/Math.PI;return"M"+e+","+t+"A"+o+","+o+" "+a+" 0 1 "+n+","+i},dz=(e,t,n,i)=>T3(t*Math.cos(e),t*Math.sin(e),i*Math.cos(n),i*Math.sin(n)),M3=(e,t,n,i)=>{const r=n-e,s=i-t,o=.2*(r+s),a=.2*(s-r);return"M"+e+","+t+"C"+(e+o)+","+(t+a)+" "+(n+a)+","+(i-o)+" "+n+","+i},hz=(e,t,n,i)=>M3(t*Math.cos(e),t*Math.sin(e),i*Math.cos(n),i*Math.sin(n)),pz=(e,t,n,i)=>"M"+e+","+t+"V"+i+"H"+n,gz=(e,t,n,i)=>"M"+e+","+t+"H"+n+"V"+i,mz=(e,t,n,i)=>{const r=Math.cos(e),s=Math.sin(e),o=Math.cos(n),a=Math.sin(n),u=Math.abs(n-e)>Math.PI?n<=e:n>e;return"M"+t*r+","+t*s+"A"+t+","+t+" 0 0,"+(u?1:0)+" "+t*o+","+t*a+"L"+i*o+","+i*a},yz=(e,t,n,i)=>{const r=(e+n)/2;return"M"+e+","+t+"C"+r+","+t+" "+r+","+i+" "+n+","+i},bz=(e,t,n,i)=>{const r=(t+i)/2;return"M"+e+","+t+"C"+e+","+r+" "+n+","+r+" "+n+","+i},xz=(e,t,n,i)=>{const r=Math.cos(e),s=Math.sin(e),o=Math.cos(n),a=Math.sin(n),u=(t+i)/2;return"M"+t*r+","+t*s+"C"+u*r+","+u*s+" "+u*o+","+u*a+" "+i*o+","+i*a},cw=pu({line:O3,"line-radial":fz,arc:T3,"arc-radial":dz,curve:M3,"curve-radial":hz,"orthogonal-horizontal":pz,"orthogonal-vertical":gz,"orthogonal-radial":mz,"diagonal-horizontal":yz,"diagonal-vertical":bz,"diagonal-radial":xz});function Yx(e){O.call(this,null,e)}Yx.Definition={type:"Pie",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"startAngle",type:"number",default:0},{name:"endAngle",type:"number",default:6.283185307179586},{name:"sort",type:"boolean",default:!1},{name:"as",type:"string",array:!0,length:2,default:["startAngle","endAngle"]}]};H(Yx,O,{transform(e,t){var n=e.as||["startAngle","endAngle"],i=n[0],r=n[1],s=e.field||cu,o=e.startAngle||0,a=e.endAngle!=null?e.endAngle:2*Math.PI,u=t.source,l=u.map(s),c=l.length,f=o,d=(a-o)/h_(l),h=zo(c),p,g,m;for(e.sort&&h.sort((y,b)=>l[y]-l[b]),p=0;p<c;++p)m=l[h[p]],g=u[h[p]],g[i]=f,g[r]=f+=m*d;return this.value=l,t.reflow(e.modified()).modifies(n)}});const vz=5;function Ez(e){const t=e.type;return!e.bins&&(t===Ia||t===xc||t===vc)}function N3(e){return ux(e)&&e!==Gi}
9const Az=mi(["set","modified","clear","type","scheme","schemeExtent","schemeCount","domain","domainMin","domainMid","domainMax","domainRaw","domainImplicit","nice","zero","bins","range","rangeStep","round","reverse","interpolate","interpolateGamma"]);function L3(e){O.call(this,null,e),this.modified(!0)}H(L3,O,{transform(e,t){var n=t.dataflow,i=this.value,r=wz(e);(!i||r!==i.type)&&(this.value=i=Ce(r)());for(r in e)if(!Az[r]){if(r==="padding"&&N3(i.type))continue;de(i[r])?i[r](e[r]):n.warn("Unsupported scale property: "+r)}return kz(i,e,_z(i,e,Cz(i,e,n))),t.fork(t.NO_SOURCE|t.NO_FIELDS)}});function wz(e){var t=e.type,n="",i;return t===Gi?Gi+"-"+Ia:(Sz(e)&&(i=e.rawDomain?e.rawDomain.length:e.domain?e.domain.length+ +(e.domainMid!=null):0,n=i===2?Gi+"-":i===3?bu+"-":""),(n+t||Ia).toLowerCase())}function Sz(e){const t=e.type;return ux(t)&&t!==xo&&t!==vo&&(e.scheme||e.range&&e.range.length&&e.range.every(Y))}function Cz(e,t,n){const i=$z(e,t.domainRaw,n);if(i>-1)return i;var r=t.domain,s=e.type,o=t.zero||t.zero===void 0&&Ez(e),a,u;if(!r)return 0;if((o||t.domainMin!=null||t.domainMax!=null||t.domainMid!=null)&&(a=(r=r.slice()).length-1||1,o&&(r[0]>0&&(r[0]=0),r[a]<0&&(r[a]=0)),t.domainMin!=null&&(r[0]=t.domainMin),t.domainMax!=null&&(r[a]=t.domainMax),t.domainMid!=null)){u=t.domainMid;const l=u>r[a]?a+1:u<r[0]?0:a;l!==a&&n.warn("Scale domainMid exceeds domain min or max.",u),r.splice(l,0,u)}return N3(s)&&t.padding&&r[0]!==ve(r)&&(r=Fz(s,r,t.range,t.padding,t.exponent,t.constant)),e.domain(P3(s,r,n)),s===rx&&e.unknown(t.domainImplicit?g8:void 0),t.nice&&e.nice&&e.nice(t.nice!==!0&&fx(e,t.nice)||null),r.length}function $z(e,t,n){return t?(e.domain(P3(e.type,t,n)),t.length):-1}function Fz(e,t,n,i,r,s){var o=Math.abs(ve(n)-n[0]),a=o/(o-2*i),u=e===Mr?Ky(t,null,a):e===vc?kd(t,null,a,.5):e===xc?kd(t,null,a,r||1):e===cp?Jy(t,null,a,s||1):Yy(t,null,a);return t=t.slice(),t[0]=u[0],t[t.length-1]=u[1],t}function P3(e,t,n){if(Hk(e)){var i=Math.abs(t.reduce((r,s)=>r+(s<0?-1:s>0?1:0),0));i!==t.length&&n.warn("Log scale domain includes zero: "+G(t))}return t}function _z(e,t,n){let i=t.bins;if(i&&!I(i)){const r=e.domain(),s=r[0],o=ve(r),a=i.step;let u=i.start==null?s:i.start,l=i.stop==null?o:i.stop;a||T("Scale bins parameter missing step property."),u<s&&(u=a*Math.ceil(s/a)),l>o&&(l=a*Math.floor(o/a)),i=zo(u,l+a/2,a)}return i?e.bins=i:e.bins&&delete e.bins,e.type===sx&&(i?!t.domain&&!t.domainRaw&&(e.domain(i),n=i.length):e.bins=e.domain()),n}function kz(e,t,n){var i=e.type,r=t.round||!1,s=t.range;if(t.rangeStep!=null)s=Dz(i,t,n);else if(t.scheme&&(s=Rz(i,t,n),de(s))){if(e.interpolator)return e.interpolator(s);T(`Scale type ${i} does not support interpolating color schemes.`)}if(s&&Vk(i))return e.interpolator(hp(i1(s,t.reverse),t.interpolate,t.interpolateGamma));s&&t.interpolate&&e.interpolate?e.interpolate(lx(t.interpolate,t.interpolateGamma)):de(e.round)?e.round(r):de(e.rangeRound)&&e.interpolate(r?aF:oF),s&&e.range(i1(s,t.reverse))}function Dz(e,t,n){e!==zk&&e!==jm&&T("Only band and point scales support rangeStep.");var i=(t.paddingOuter!=null?t.paddingOuter:t.padding)||0,r=e===jm?1:(t.paddingInner!=null?t.paddingInner:t.padding)||0;return[0,t.rangeStep*ix(n,r,i)]}function Rz(e,t,n){var i=t.schemeExtent,r,s;return I(t.scheme)?s=hp(t.scheme,t.interpolate,t.interpolateGamma):(r=t.scheme.toLowerCase(),s=cx(r),s||T(`Unrecognized scheme name: ${t.scheme}`)),n=e===dp?n+1:e===sx?n-1:e===Ba||e===fp?+t.schemeCount||vz:n,Vk(e)?fw(s,i,t.reverse):de(s)?Kk(fw(s,i),n):e===rx?s:s.slice(0,n)}function fw(e,t,n){return de(e)&&(t||n)?Yk(e,i1(t||[0,1],n)):e}function i1(e,t){return t?e.slice().reverse():e}function I3(e){O.call(this,null,e)}H(I3,O,{transform(e,t){const n=e.modified("sort")||t.changed(t.ADD)||t.modified(e.sort.fields)||t.modified("datum");return n&&t.source.sort(Uo(e.sort)),this.modified(n),t}});const dw="zero",B3="center",z3="normalize",U3=["y0","y1"];function Kx(e){O.call(this,null,e)}Kx.Definition={type:"Stack",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"groupby",type:"field",array:!0},{name:"sort",type:"compare"},{name:"offset",type:"enum",default:dw,values:[dw,B3,z3]},{name:"as",type:"string",array:!0,length:2,default:U3}]};H(Kx,O,{transform(e,t){var n=e.as||U3,i=n[0],r=n[1],s=Uo(e.sort),o=e.field||cu,a=e.offset===B3?Oz:e.offset===z3?Tz:Mz,u,l,c,f;for(u=Nz(t.source,e.groupby,s,o),l=0,c=u.length,f=u.max;l<c;++l)a(u[l],f,o,i,r);return t.reflow(e.modified()).modifies(n)}});function Oz(e,t,n,i,r){for(var s=(t-e.sum)/2,o=e.length,a=0,u;a<o;++a)u=e[a],u[i]=s,u[r]=s+=Math.abs(n(u))}function Tz(e,t,n,i,r){for(var s=1/e.sum,o=0,a=e.length,u=0,l=0,c;u<a;++u)c=e[u],c[i]=o,c[r]=o=s*(l+=Math.abs(n(c)))}function Mz(e,t,n,i,r){for(var s=0,o=0,a=e.length,u=0,l,c;u<a;++u)c=e[u],l=+n(c),l<0?(c[i]=o,c[r]=o+=l):(c[i]=s,c[r]=s+=l)}function Nz(e,t,n,i){var r=[],s=g=>g(c),o,a,u,l,c,f,d,h,p;if(t==null)r.push(e.slice());else for(o={},a=0,u=e.length;a<u;++a)c=e[a],f=t.map(s),d=o[f],d||(o[f]=d=[],r.push(d)),d.push(c);for(f=0,p=0,l=r.length;f<l;++f){for(d=r[f],a=0,h=0,u=d.length;a<u;++a)h+=Math.abs(i(d[a]));d.sum=h,h>p&&(p=h),n&&d.sort(n)}return r.max=p,r}const Lz=Object.freeze(Object.defineProperty({__proto__:null,axisticks:_3,datajoin:k3,encode:D3,legendentries:R3,linkpath:Xx,pie:Yx,scale:L3,sortitems:I3,stack:Kx},Symbol.toStringTag,{value:"Module"}));var ae=1e-6,r1=1e-12,me=Math.PI,Ye=me/2,Vd=me/4,nn=me*2,Je=180/me,ge=me/180,xe=Math.abs,vu=
vendor: 10,352 bytes, line 9
9Math.atan,Jn=Math.atan2,se=Math.cos,vf=Math.ceil,j3=Math.exp,s1=Math.hypot,Xd=Math.log,l0=Math.pow,re=Math.sin,jn=Math.sign||function(e){return e>0?1:e<0?-1:0},rn=Math.sqrt,Jx=Math.tan;function q3(e){return e>1?0:e<-1?me:Math.acos(e)}function xn(e){return e>1?Ye:e<-1?-Ye:Math.asin(e)}function vt(){}function Yd(e,t){e&&pw.hasOwnProperty(e.type)&&pw[e.type](e,t)}var hw={Feature:function(e,t){Yd(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,i=-1,r=n.length;++i<r;)Yd(n[i].geometry,t)}},pw={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,i=-1,r=n.length;++i<r;)e=n[i],t.point(e[0],e[1],e[2])},LineString:function(e,t){o1(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,i=-1,r=n.length;++i<r;)o1(n[i],t,0)},Polygon:function(e,t){gw(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,i=-1,r=n.length;++i<r;)gw(n[i],t)},GeometryCollection:function(e,t){for(var n=e.geometries,i=-1,r=n.length;++i<r;)Yd(n[i],t)}};function o1(e,t,n){var i=-1,r=e.length-n,s;for(t.lineStart();++i<r;)s=e[i],t.point(s[0],s[1],s[2]);t.lineEnd()}function gw(e,t){var n=-1,i=e.length;for(t.polygonStart();++n<i;)o1(e[n],t,1);t.polygonEnd()}function wr(e,t){e&&hw.hasOwnProperty(e.type)?hw[e.type](e,t):Yd(e,t)}var Kd=new en,Jd=new en,W3,G3,a1,u1,l1,Ji={point:vt,lineStart:vt,lineEnd:vt,polygonStart:function(){Kd=new en,Ji.lineStart=Pz,Ji.lineEnd=Iz},polygonEnd:function(){var e=+Kd;Jd.add(e<0?nn+e:e),this.lineStart=this.lineEnd=this.point=vt},sphere:function(){Jd.add(nn)}};function Pz(){Ji.point=Bz}function Iz(){H3(W3,G3)}function Bz(e,t){Ji.point=H3,W3=e,G3=t,e*=ge,t*=ge,a1=e,u1=se(t=t/2+Vd),l1=re(t)}function H3(e,t){e*=ge,t*=ge,t=t/2+Vd;var n=e-a1,i=n>=0?1:-1,r=i*n,s=se(t),o=re(t),a=l1*o,u=u1*s+a*se(r),l=a*i*re(r);Kd.add(Jn(l,u)),a1=e,u1=s,l1=o}function zz(e){return Jd=new en,wr(e,Ji),Jd*2}function Qd(e){return[Jn(e[1],e[0]),xn(e[2])]}function Ao(e){var t=e[0],n=e[1],i=se(n);return[i*se(t),i*re(t),re(n)]}function Ef(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Ga(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function c0(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Af(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Zd(e){var t=rn(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var We,dn,Ve,Fn,eo,V3,X3,ka,Fl,ts,Nr,vr={point:c1,lineStart:mw,lineEnd:yw,polygonStart:function(){vr.point=K3,vr.lineStart=Uz,vr.lineEnd=jz,Fl=new en,Ji.polygonStart()},polygonEnd:function(){Ji.polygonEnd(),vr.point=c1,vr.lineStart=mw,vr.lineEnd=yw,Kd<0?(We=-(Ve=180),dn=-(Fn=90)):Fl>ae?Fn=90:Fl<-1e-6&&(dn=-90),Nr[0]=We,Nr[1]=Ve},sphere:function(){We=-(Ve=180),dn=-(Fn=90)}};function c1(e,t){ts.push(Nr=[We=e,Ve=e]),t<dn&&(dn=t),t>Fn&&(Fn=t)}function Y3(e,t){var n=Ao([e*ge,t*ge]);if(ka){var i=Ga(ka,n),r=[i[1],-i[0],0],s=Ga(r,i);Zd(s),s=Qd(s);var o=e-eo,a=o>0?1:-1,u=s[0]*Je*a,l,c=xe(o)>180;c^(a*eo<u&&u<a*e)?(l=s[1]*Je,l>Fn&&(Fn=l)):(u=(u+360)%360-180,c^(a*eo<u&&u<a*e)?(l=-s[1]*Je,l<dn&&(dn=l)):(t<dn&&(dn=t),t>Fn&&(Fn=t))),c?e<eo?$n(We,e)>$n(We,Ve)&&(Ve=e):$n(e,Ve)>$n(We,Ve)&&(We=e):Ve>=We?(e<We&&(We=e),e>Ve&&(Ve=e)):e>eo?$n(We,e)>$n(We,Ve)&&(Ve=e):$n(e,Ve)>$n(We,Ve)&&(We=e)}else ts.push(Nr=[We=e,Ve=e]);t<dn&&(dn=t),t>Fn&&(Fn=t),ka=n,eo=e}function mw(){vr.point=Y3}function yw(){Nr[0]=We,Nr[1]=Ve,vr.point=c1,ka=null}function K3(e,t){if(ka){var n=e-eo;Fl.add(xe(n)>180?n+(n>0?360:-360):n)}else V3=e,X3=t;Ji.point(e,t),Y3(e,t)}function Uz(){Ji.lineStart()}function jz(){K3(V3,X3),Ji.lineEnd(),xe(Fl)>ae&&(We=-(Ve=180)),Nr[0]=We,Nr[1]=Ve,ka=null}function $n(e,t){return(t-=e)<0?t+360:t}function qz(e,t){return e[0]-t[0]}function bw(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}function Wz(e){var t,n,i,r,s,o,a;if(Fn=Ve=-(We=dn=1/0),ts=[],wr(e,vr),n=ts.length){for(ts.sort(qz),t=1,i=ts[0],s=[i];t<n;++t)r=ts[t],bw(i,r[0])||bw(i,r[1])?($n(i[0],r[1])>$n(i[0],i[1])&&(i[1]=r[1]),$n(r[0],i[1])>$n(i[0],i[1])&&(i[0]=r[0])):s.push(i=r);for(o=-1/0,n=s.length-1,t=0,i=s[n];t<=n;i=r,++t)r=s[t],(a=$n(i[1],r[0]))>o&&(o=a,We=r[0],Ve=i[1])}return ts=Nr=null,We===1/0||dn===1/0?[[NaN,NaN],[NaN,NaN]]:[[We,dn],[Ve,Fn]]}var fl,eh,th,nh,ih,rh,sh,oh,f1,d1,h1,J3,Q3,Xt,Yt,Kt,fi={sphere:vt,point:Qx,lineStart:xw,lineEnd:vw,polygonStart:function(){fi.lineStart=Vz,fi.lineEnd=Xz},polygonEnd:function(){fi.lineStart=xw,fi.lineEnd=vw}};function Qx(e,t){e*=ge,t*=ge;var n=se(t);Oc(n*se(e),n*re(e),re(t))}function Oc(e,t,n){++fl,th+=(e-th)/fl,nh+=(t-nh)/fl,ih+=(n-ih)/fl}function xw(){fi.point=Gz}function Gz(e,t){e*=ge,t*=ge;var n=se(t);Xt=n*se(e),Yt=n*re(e),Kt=re(t),fi.point=Hz,Oc(Xt,Yt,Kt)}function Hz(e,t){e*=ge,t*=ge;var n=se(t),i=n*se(e),r=n*re(e),s=re(t),o=Jn(rn((o=Yt*s-Kt*r)*o+(o=Kt*i-Xt*s)*o+(o=Xt*r-Yt*i)*o),Xt*i+Yt*r+Kt*s);eh+=o,rh+=o*(Xt+(Xt=i)),sh+=o*(Yt+(Yt=r)),oh+=o*(Kt+(Kt=s)),Oc(Xt,Yt,Kt)}function vw(){fi.point=Qx}function Vz(){fi.point=Yz}function Xz(){Z3(J3,Q3),fi.point=Qx}function Yz(e,t){J3=e,Q3=t,e*=ge,t*=ge,fi.point=Z3;var n=se(t);Xt=n*se(e),Yt=n*re(e),Kt=re(t),Oc(Xt,Yt,Kt)}function Z3(e,t){e*=ge,t*=ge;var n=se(t),i=n*se(e),r=n*re(e),s=re(t),o=Yt*s-Kt*r,a=Kt*i-Xt*s,u=Xt*r-Yt*i,l=s1(o,a,u),c=xn(l),f=l&&-c/l;f1.add(f*o),d1.add(f*a),h1.add(f*u),eh+=c,rh+=c*(Xt+(Xt=i)),sh+=c*(Yt+(Yt=r)),oh+=c*(Kt+(Kt=s)),Oc(Xt,Yt,Kt)}function Kz(e){fl=eh=th=nh=ih=rh=sh=oh=0,f1=new en,d1=new en,h1=new en,wr(e,fi);var t=+f1,n=+d1,i=+h1,r=s1(t,n,i);return r<r1&&(t=rh,n=sh,i=oh,eh<ae&&(t=th,n=nh,i=ih),r=s1(t,n,i),r<r1)?[NaN,NaN]:[Jn(n,t)*Je,xn(i/r)*Je]}function p1(e,t){function n(i,r){return i=e(i,r),t(i[0],i[1])}return e.invert&&t.invert&&(n.invert=function(i,r){return i=t.invert(i,r),i&&e.invert(i[0],i[1])}),n}function g1(e,t){return xe(e)>me&&(e-=Math.round(e/nn)*nn),[e,t]}g1.invert=g1;function e5(e,t,n){return(e%=nn)?t||n?p1(Aw(e),ww(t,n)):Aw(e):t||n?ww(t,n):g1}function Ew(e){return function(t,n){return t+=e,xe(t)>me&&(t-=Math.round(t/nn)*nn),[t,n]}}function Aw(e){var t=Ew(e);return t.invert=Ew(-e),t}function ww(e,t){var n=se(e),i=re(e),r=se(t),s=re(t);function o(a,u){var l=se(u),c=se(a)*l,f=re(a)*l,d=re(u),h=d*n+c*i;return[Jn(f*r-h*s,c*n-d*i),xn(h*r+f*s)]}return o.invert=function(a,u){var l=se(u),c=se(a)*l,f=re(a)*l,d=re(u),h=d*r-f*s;return[Jn(f*r+d*s,c*n+h*i),xn(h*n-c*i)]},o}function Jz(e){e=e5(e[0]*ge,e[1]*ge,e.length>2?e[2]*ge:0);function t(n){return n=e(n[0]*ge,n[1]*ge),n[0]*=Je,n[1]*=Je,n}return t.invert=function(n){return n=e.invert(n[0]*ge,n[1]*ge),n[0]*=Je,n[1]*=Je,n},t}function Qz(e,t,n,i,r,s){if(n){var o=se(t),a=re(t),u=i*n;r==null?(r=t+i*nn,s=t-u/2):(r=Sw(o,r),s=Sw(o,s),(i>0?r<s:r>s)&&(r+=i*nn));for(var l,c=r;i>0?c>s:c<s;c-=u)l=Qd([o,-a*se(c),-a*re(c)]),e.point(l[0],l[1])}}function Sw(e,t){t=Ao(t),t[0]-=e,Zd(t);var n=q3(-t[1]);return((-t[2]<0?-n:n)+nn-ae)%nn}function t5(){var e=[],t;return{point:function(n,i,r){t.push([n,i,r])},lineStart:function(){e.push(t=[])},lineEnd:vt,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function ad(e,t){return xe(e[0]-t[0])<ae&&xe(e[1]-t[1])<ae}function wf(e,t,n,i){this.x=e,this.z=t,this.o=n,this.e=i,this.v=!1,this.n=this.p=null}function n5(e,t,n,i,r){var s=[],o=[],a,u;if(e.forEach(function(p){if(!((g=p.length-1)<=0)){var g,m=p[0],y=p[g],b;if(ad(m,y)){if(!m[2]&&!y[2]){for(r.lineStart(),a=0;a<g;++a)r.point((m=p[a])[0],m[1]);r.lineEnd();return}y[0]+=2*ae}s.push(b=new wf(m,p,null,!0)),o.push(b.o=new wf(m,null,b,!1)),s.push(b=new wf(y,p,null,!1)),o.push(b.o=new wf(y,null,b,!0))}}),!!s.length){for(o.sort(t),Cw(s),Cw(o),a=0,u=o.length;a<u;++a)o[a].e=n=!n;for(var l=s[0],c,f;;){for(var d=l,h=!0;d.v;)if((d=d.n)===l)return;c=d.z,r.lineStart();do{if(d.v=d.o.v=!0,d.e){if(h)for(a=0,u=c.length;a<u;++a)r.point((f=c[a])[0],f[1]);else i(d.x,d.n.x,1,r);d=d.n}else{if(h)for(c=d.p.z,a=c.length-1;a>=0;--a)r.point((f=c[a])[0],f[1]);else i(d.x,d.p.x,-1,r);d=d.p}d=d.o,c=d.z,h=!h}while(!d.v);r.lineEnd()}}}function Cw(e){if(t=e.length){for(var t,n=0,i=e[0],r;++n<t;)i.n=r=e[n],r.p=i,i=r;i.n=r=e[0],r.p=i}}function f0(e){return xe(e[0])<=me?e[0]:jn(e[0])*((xe(e[0])+me)%nn-me)}function Zz(e,t){var n=f0(t),i=t[1],r=re(i),s=[re(n),-se(n),0],o=0,a=0,u=new en;r===1?i=Ye+ae:r===-1&&(i=-Ye-ae);for(var l=0,c=e.length;l<c;++l)if(d=(f=e[l]).length)for(var f,d,h=f[d-1],p=f0(h),g=h[1]/2+Vd,m=re(g),y=se(g),b=0;b<d;++b,p=v,m=w,y=E,h=x){var x=f[b],v=f0(x),A=x[1]/2+Vd,w=re(A),E=se(A),S=v-p,C=S>=0?1:-1,F=C*S,k=F>me,L=m*w;if(u.add(Jn(L*C*re(F),y*E+L*se(F))),o+=k?S+C*nn:S,k^p>=n^v>=n){var R=Ga(Ao(h),Ao(x));Zd(R);var _=Ga(s,R);Zd(_);var $=(k^S>=0?-1:1)*xn(_[2]);(i>$||i===$&&(R[0]||R[1]))&&(a+=k^S>=0?1:-1)}}return(o<-1e-6||o<ae&&u<-1e-12)^a&1}function i5(e,t,n,i){return function(r){var s=t(r),o=t5(),a=t(o),u=!1,l,c,f,d={point:h,lineStart:g,lineEnd:m,polygonStart:function(){d.point=y,d.lineStart=b,d.lineEnd=x,c=[],l=[]},polygonEnd:function(){d.point=h,d.lineStart=g,d.lineEnd=m,c=NF(c);var v=Zz(l,i);c.length?(u||(r.polygonStart(),u=!0),n5(c,tU,v,n,r)):v&&(u||(r.polygonStart(),u=!0),r.lineStart(),n(null,null,1,r),r.lineEnd()),u&&(r.polygonEnd(),u=!1),c=l=null},sphere:function(){r.polygonStart(),r.lineStart(),n(null,null,1,r),r.lineEnd(),r.polygonEnd()}};function h(v,A){e(v,A)&&r.point(v,A)}function p(v,A){s.point(v,A)}function g(){d.point=p,s.lineStart()}function m(){d.point=h,s.lineEnd()}function y(v,A){f.push([v,A]),a.point(v,A)}function b(){a.lineStart(),f=[]}function x(){y(f[0][0],f[0][1]),a.lineEnd();var v=a.clean(),A=o.result(),w,E=A.length,S,C,F;if(f.pop(),l.push(f),f=null,!!E){if(v&1){if(C=A[0],(S=C.length-1)>0){for(u||(r.polygonStart(),u=!0),r.lineStart(),w=0;w<S;++w)r.point((F=C[w])[0],F[1]);r.lineEnd()}return}E>1&&v&2&&A.push(A.pop().concat(A.shift())),c.push(A.filter(eU))}}return d}}function eU(e){return e.length>1}function tU(e,t){return((e=e.x)[0]<0?e[1]-Ye-ae:Ye-e[1])-((t=t.x)[0]<0?t[1]-Ye-ae:Ye-t[1])}const $w=i5(function(){return!0},nU,rU,[-me,-Ye]);function nU(e){var t=NaN,n=NaN,i=NaN,r;return{lineStart:function(){e.lineStart(),r=1},point:function(s,o){var a=s>0?me:-me,u=xe(s-t);xe(u-me)<ae?(e.point(t,n=(n+o)/2>0?Ye:-Ye),e.point(i,n),e.lineEnd(),e.lineStart(),e.point(a,n),e.point(s,n),r=0):i!==a&&u>=me&&(xe(t-i)<ae&&(t-=i*ae),xe(s-a)<ae&&(s-=a*ae),n=iU(t,n,s,o),e.point(i,n),e.lineEnd(),e.lineStart(),e.point(a,n),r=0),e.point(t=s,n=o),i=a},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-r}}}
vendor: 4,189 bytes, line 9
9function iU(e,t,n,i){var r,s,o=re(e-n);return xe(o)>ae?vu((re(t)*(s=se(i))*re(n)-re(i)*(r=se(t))*re(e))/(r*s*o)):(t+i)/2}function rU(e,t,n,i){var r;if(e==null)r=n*Ye,i.point(-me,r),i.point(0,r),i.point(me,r),i.point(me,0),i.point(me,-r),i.point(0,-r),i.point(-me,-r),i.point(-me,0),i.point(-me,r);else if(xe(e[0]-t[0])>ae){var s=e[0]<t[0]?me:-me;r=n*s/2,i.point(-s,r),i.point(0,r),i.point(s,r)}else i.point(t[0],t[1])}function sU(e){var t=se(e),n=2*ge,i=t>0,r=xe(t)>ae;function s(c,f,d,h){Qz(h,e,n,d,c,f)}function o(c,f){return se(c)*se(f)>t}function a(c){var f,d,h,p,g;return{lineStart:function(){p=h=!1,g=1},point:function(m,y){var b=[m,y],x,v=o(m,y),A=i?v?0:l(m,y):v?l(m+(m<0?me:-me),y):0;if(!f&&(p=h=v)&&c.lineStart(),v!==h&&(x=u(f,b),(!x||ad(f,x)||ad(b,x))&&(b[2]=1)),v!==h)g=0,v?(c.lineStart(),x=u(b,f),c.point(x[0],x[1])):(x=u(f,b),c.point(x[0],x[1],2),c.lineEnd()),f=x;else if(r&&f&&i^v){var w;!(A&d)&&(w=u(b,f,!0))&&(g=0,i?(c.lineStart(),c.point(w[0][0],w[0][1]),c.point(w[1][0],w[1][1]),c.lineEnd()):(c.point(w[1][0],w[1][1]),c.lineEnd(),c.lineStart(),c.point(w[0][0],w[0][1],3)))}v&&(!f||!ad(f,b))&&c.point(b[0],b[1]),f=b,h=v,d=A},lineEnd:function(){h&&c.lineEnd(),f=null},clean:function(){return g|(p&&h)<<1}}}function u(c,f,d){var h=Ao(c),p=Ao(f),g=[1,0,0],m=Ga(h,p),y=Ef(m,m),b=m[0],x=y-b*b;if(!x)return!d&&c;var v=t*y/x,A=-t*b/x,w=Ga(g,m),E=Af(g,v),S=Af(m,A);c0(E,S);var C=w,F=Ef(E,C),k=Ef(C,C),L=F*F-k*(Ef(E,E)-1);if(!(L<0)){var R=rn(L),_=Af(C,(-F-R)/k);if(c0(_,E),_=Qd(_),!d)return _;var $=c[0],D=f[0],P=c[1],z=f[1],B;D<$&&(B=$,$=D,D=B);var Q=D-$,ue=xe(Q-me)<ae,oe=ue||Q<ae;if(!ue&&z<P&&(B=P,P=z,z=B),oe?ue?P+z>0^_[1]<(xe(_[0]-$)<ae?P:z):P<=_[1]&&_[1]<=z:Q>me^($<=_[0]&&_[0]<=D)){var he=Af(C,(-F+R)/k);return c0(he,E),[_,Qd(he)]}}}function l(c,f){var d=i?e:me-e,h=0;return c<-d?h|=1:c>d&&(h|=2),f<-d?h|=4:f>d&&(h|=8),h}return i5(o,a,s,i?[0,-e]:[-me,e-me])}function oU(e,t,n,i,r,s){var o=e[0],a=e[1],u=t[0],l=t[1],c=0,f=1,d=u-o,h=l-a,p;if(p=n-o,!(!d&&p>0)){if(p/=d,d<0){if(p<c)return;p<f&&(f=p)}else if(d>0){if(p>f)return;p>c&&(c=p)}if(p=r-o,!(!d&&p<0)){if(p/=d,d<0){if(p>f)return;p>c&&(c=p)}else if(d>0){if(p<c)return;p<f&&(f=p)}if(p=i-a,!(!h&&p>0)){if(p/=h,h<0){if(p<c)return;p<f&&(f=p)}else if(h>0){if(p>f)return;p>c&&(c=p)}if(p=s-a,!(!h&&p<0)){if(p/=h,h<0){if(p>f)return;p>c&&(c=p)}else if(h>0){if(p<c)return;p<f&&(f=p)}return c>0&&(e[0]=o+c*d,e[1]=a+c*h),f<1&&(t[0]=o+f*d,t[1]=a+f*h),!0}}}}}var Sf=1e9,Cf=-1e9;function r5(e,t,n,i){function r(l,c){return e<=l&&l<=n&&t<=c&&c<=i}function s(l,c,f,d){var h=0,p=0;if(l==null||(h=o(l,f))!==(p=o(c,f))||u(l,c)<0^f>0)do d.point(h===0||h===3?e:n,h>1?i:t);while((h=(h+f+4)%4)!==p);else d.point(c[0],c[1])}function o(l,c){return xe(l[0]-e)<ae?c>0?0:3:xe(l[0]-n)<ae?c>0?2:1:xe(l[1]-t)<ae?c>0?1:0:c>0?3:2}function a(l,c){return u(l.x,c.x)}function u(l,c){var f=o(l,1),d=o(c,1);return f!==d?f-d:f===0?c[1]-l[1]:f===1?l[0]-c[0]:f===2?l[1]-c[1]:c[0]-l[0]}return function(l){var c=l,f=t5(),d,h,p,g,m,y,b,x,v,A,w,E={point:S,lineStart:L,lineEnd:R,polygonStart:F,polygonEnd:k};function S($,D){r($,D)&&c.point($,D)}function C(){for(var $=0,D=0,P=h.length;D<P;++D)for(var z=h[D],B=1,Q=z.length,ue=z[0],oe,he,Pe=ue[0],pe=ue[1];B<Q;++B)oe=Pe,he=pe,ue=z[B],Pe=ue[0],pe=ue[1],he<=i?pe>i&&(Pe-oe)*(i-he)>(pe-he)*(e-oe)&&++$:pe<=i&&(Pe-oe)*(i-he)<(pe-he)*(e-oe)&&--$;return $}function F(){c=f,d=[],h=[],w=!0}function k(){var $=C(),D=w&&$,P=(d=NF(d)).length;(D||P)&&(l.polygonStart(),D&&(l.lineStart(),s(null,null,1,l),l.lineEnd()),P&&n5(d,a,$,s,l),l.polygonEnd()),c=l,d=h=p=null}function L(){E.point=_,h&&h.push(p=[]),A=!0,v=!1,b=x=NaN}function R(){d&&(_(g,m),y&&v&&f.rejoin(),d.push(f.result())),E.point=S,v&&c.lineEnd()}function _($,D){var P=r($,D);if(h&&p.push([$,D]),A)g=$,m=D,y=P,A=!1,P&&(c.lineStart(),c.point($,D));else if(P&&v)c.point($,D);else{var z=[b=Math.max(Cf,Math.min(Sf,b)),x=Math.max(Cf,Math.min(Sf,x))],B=[$=Math.max(Cf,Math.min(Sf,$)),D=Math.max(Cf,Math.min(Sf,D))];oU(z,B,e,t,n,i)?(v||(c.lineStart(),c.point(z[0],z[1])),c.point(B[0],B[1]),P||c.lineEnd(),w=!1):P&&(c.lineStart(),c.point($,D),w=!1)}b=$,x=D,v=P}return E}}function Fw(e,t,n){var i=xa(e,t-ae,n).concat(t);return function(r){return i.map(function(s){return[r,s]})}}
vendor: 11,774 bytes, line 9
9function _w(e,t,n){var i=xa(e,t-ae,n).concat(t);return function(r){return i.map(function(s){return[s,r]})}}function aU(){var e,t,n,i,r,s,o,a,u=10,l=u,c=90,f=360,d,h,p,g,m=2.5;function y(){return{type:"MultiLineString",coordinates:b()}}function b(){return xa(vf(i/c)*c,n,c).map(p).concat(xa(vf(a/f)*f,o,f).map(g)).concat(xa(vf(t/u)*u,e,u).filter(function(x){return xe(x%c)>ae}).map(d)).concat(xa(vf(s/l)*l,r,l).filter(function(x){return xe(x%f)>ae}).map(h))}return y.lines=function(){return b().map(function(x){return{type:"LineString",coordinates:x}})},y.outline=function(){return{type:"Polygon",coordinates:[p(i).concat(g(o).slice(1),p(n).reverse().slice(1),g(a).reverse().slice(1))]}},y.extent=function(x){return arguments.length?y.extentMajor(x).extentMinor(x):y.extentMinor()},y.extentMajor=function(x){return arguments.length?(i=+x[0][0],n=+x[1][0],a=+x[0][1],o=+x[1][1],i>n&&(x=i,i=n,n=x),a>o&&(x=a,a=o,o=x),y.precision(m)):[[i,a],[n,o]]},y.extentMinor=function(x){return arguments.length?(t=+x[0][0],e=+x[1][0],s=+x[0][1],r=+x[1][1],t>e&&(x=t,t=e,e=x),s>r&&(x=s,s=r,r=x),y.precision(m)):[[t,s],[e,r]]},y.step=function(x){return arguments.length?y.stepMajor(x).stepMinor(x):y.stepMinor()},y.stepMajor=function(x){return arguments.length?(c=+x[0],f=+x[1],y):[c,f]},y.stepMinor=function(x){return arguments.length?(u=+x[0],l=+x[1],y):[u,l]},y.precision=function(x){return arguments.length?(m=+x,d=Fw(s,r,90),h=_w(t,e,m),p=Fw(a,o,90),g=_w(i,n,m),y):m},y.extentMajor([[-180,-90+ae],[180,90-ae]]).extentMinor([[-180,-80-ae],[180,80+ae]])}const Vl=e=>e;var d0=new en,m1=new en,s5,o5,y1,b1,Sr={point:vt,lineStart:vt,lineEnd:vt,polygonStart:function(){Sr.lineStart=uU,Sr.lineEnd=cU},polygonEnd:function(){Sr.lineStart=Sr.lineEnd=Sr.point=vt,d0.add(xe(m1)),m1=new en},result:function(){var e=d0/2;return d0=new en,e}};function uU(){Sr.point=lU}function lU(e,t){Sr.point=a5,s5=y1=e,o5=b1=t}function a5(e,t){m1.add(b1*e-y1*t),y1=e,b1=t}function cU(){a5(s5,o5)}var Ha=1/0,ah=Ha,Xl=-Ha,uh=Xl,lh={point:fU,lineStart:vt,lineEnd:vt,polygonStart:vt,polygonEnd:vt,result:function(){var e=[[Ha,ah],[Xl,uh]];return Xl=uh=-(ah=Ha=1/0),e}};function fU(e,t){e<Ha&&(Ha=e),e>Xl&&(Xl=e),t<ah&&(ah=t),t>uh&&(uh=t)}var x1=0,v1=0,dl=0,ch=0,fh=0,wa=0,E1=0,A1=0,hl=0,u5,l5,zi,Ui,Un={point:wo,lineStart:kw,lineEnd:Dw,polygonStart:function(){Un.lineStart=pU,Un.lineEnd=gU},polygonEnd:function(){Un.point=wo,Un.lineStart=kw,Un.lineEnd=Dw},result:function(){var e=hl?[E1/hl,A1/hl]:wa?[ch/wa,fh/wa]:dl?[x1/dl,v1/dl]:[NaN,NaN];return x1=v1=dl=ch=fh=wa=E1=A1=hl=0,e}};function wo(e,t){x1+=e,v1+=t,++dl}function kw(){Un.point=dU}function dU(e,t){Un.point=hU,wo(zi=e,Ui=t)}function hU(e,t){var n=e-zi,i=t-Ui,r=rn(n*n+i*i);ch+=r*(zi+e)/2,fh+=r*(Ui+t)/2,wa+=r,wo(zi=e,Ui=t)}function Dw(){Un.point=wo}function pU(){Un.point=mU}function gU(){c5(u5,l5)}function mU(e,t){Un.point=c5,wo(u5=zi=e,l5=Ui=t)}function c5(e,t){var n=e-zi,i=t-Ui,r=rn(n*n+i*i);ch+=r*(zi+e)/2,fh+=r*(Ui+t)/2,wa+=r,r=Ui*e-zi*t,E1+=r*(zi+e),A1+=r*(Ui+t),hl+=r*3,wo(zi=e,Ui=t)}function f5(e){this._context=e}f5.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,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(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,nn);break}}},result:vt};var w1=new en,h0,d5,h5,pl,gl,Yl={point:vt,lineStart:function(){Yl.point=yU},lineEnd:function(){h0&&p5(d5,h5),Yl.point=vt},polygonStart:function(){h0=!0},polygonEnd:function(){h0=null},result:function(){var e=+w1;return w1=new en,e}};function yU(e,t){Yl.point=p5,d5=pl=e,h5=gl=t}function p5(e,t){pl-=e,gl-=t,w1.add(rn(pl*pl+gl*gl)),pl=e,gl=t}let Rw,dh,Ow,Tw;class Mw{constructor(t){this._append=t==null?g5:bU(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(t,n){switch(this._point){case 0:{this._append`M${t},${n}`,this._point=1;break}case 1:{this._append`L${t},${n}`;break}default:{if(this._append`M${t},${n}`,this._radius!==Ow||this._append!==dh){const i=this._radius,r=this._;this._="",this._append`m0,${i}a${i},${i} 0 1,1 0,${-2*i}a${i},${i} 0 1,1 0,${2*i}z`,Ow=i,dh=this._append,Tw=this._,this._=r}this._+=Tw;break}}}result(){const t=this._;return this._="",t.length?t:null}}function g5(e){let t=1;this._+=e[0];for(const n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function bU(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return g5;if(t!==Rw){const n=10**t;Rw=t,dh=function(r){let s=1;this._+=r[0];for(const o=r.length;s<o;++s)this._+=Math.round(arguments[s]*n)/n+r[s]}}return dh}function m5(e,t){let n=3,i=4.5,r,s;function o(a){return a&&(typeof i=="function"&&s.pointRadius(+i.apply(this,arguments)),wr(a,r(s))),s.result()}return o.area=function(a){return wr(a,r(Sr)),Sr.result()},o.measure=function(a){return wr(a,r(Yl)),Yl.result()},o.bounds=function(a){return wr(a,r(lh)),lh.result()},o.centroid=function(a){return wr(a,r(Un)),Un.result()},o.projection=function(a){return arguments.length?(r=a==null?(e=null,Vl):(e=a).stream,o):e},o.context=function(a){return arguments.length?(s=a==null?(t=null,new Mw(n)):new f5(t=a),typeof i!="function"&&s.pointRadius(i),o):t},o.pointRadius=function(a){return arguments.length?(i=typeof a=="function"?a:(s.pointRadius(+a),+a),o):i},o.digits=function(a){if(!arguments.length)return n;if(a==null)n=null;else{const u=Math.floor(a);if(!(u>=0))throw new RangeError(`invalid digits: ${a}`);n=u}return t===null&&(s=new Mw(n)),o},o.projection(e).digits(n).context(t)}function $p(e){return function(t){var n=new S1;for(var i in e)n[i]=e[i];return n.stream=t,n}}function S1(){}S1.prototype={constructor:S1,point:function(e,t){this.stream.point(e,t)},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 Zx(e,t,n){var i=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),i!=null&&e.clipExtent(null),wr(n,e.stream(lh)),t(lh.result()),i!=null&&e.clipExtent(i),e}function Fp(e,t,n){return Zx(e,function(i){var r=t[1][0]-t[0][0],s=t[1][1]-t[0][1],o=Math.min(r/(i[1][0]-i[0][0]),s/(i[1][1]-i[0][1])),a=+t[0][0]+(r-o*(i[1][0]+i[0][0]))/2,u=+t[0][1]+(s-o*(i[1][1]+i[0][1]))/2;e.scale(150*o).translate([a,u])},n)}function ev(e,t,n){return Fp(e,[[0,0],t],n)}function tv(e,t,n){return Zx(e,function(i){var r=+t,s=r/(i[1][0]-i[0][0]),o=(r-s*(i[1][0]+i[0][0]))/2,a=-s*i[0][1];e.scale(150*s).translate([o,a])},n)}function nv(e,t,n){return Zx(e,function(i){var r=+t,s=r/(i[1][1]-i[0][1]),o=-s*i[0][0],a=(r-s*(i[1][1]+i[0][1]))/2;e.scale(150*s).translate([o,a])},n)}var Nw=16,xU=se(30*ge);function Lw(e,t){return+t?EU(e,t):vU(e)}function vU(e){return $p({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function EU(e,t){function n(i,r,s,o,a,u,l,c,f,d,h,p,g,m){var y=l-i,b=c-r,x=y*y+b*b;if(x>4*t&&g--){var v=o+d,A=a+h,w=u+p,E=rn(v*v+A*A+w*w),S=xn(w/=E),C=xe(xe(w)-1)<ae||xe(s-f)<ae?(s+f)/2:Jn(A,v),F=e(C,S),k=F[0],L=F[1],R=k-i,_=L-r,$=b*R-y*_;($*$/x>t||xe((y*R+b*_)/x-.5)>.3||o*d+a*h+u*p<xU)&&(n(i,r,s,o,a,u,k,L,C,v/=E,A/=E,w,g,m),m.point(k,L),n(k,L,C,v,A,w,l,c,f,d,h,p,g,m))}}return function(i){var r,s,o,a,u,l,c,f,d,h,p,g,m={point:y,lineStart:b,lineEnd:v,polygonStart:function(){i.polygonStart(),m.lineStart=A},polygonEnd:function(){i.polygonEnd(),m.lineStart=b}};function y(S,C){S=e(S,C),i.point(S[0],S[1])}function b(){f=NaN,m.point=x,i.lineStart()}function x(S,C){var F=Ao([S,C]),k=e(S,C);n(f,d,c,h,p,g,f=k[0],d=k[1],c=S,h=F[0],p=F[1],g=F[2],Nw,i),i.point(f,d)}function v(){m.point=y,i.lineEnd()}function A(){b(),m.point=w,m.lineEnd=E}function w(S,C){x(r=S,C),s=f,o=d,a=h,u=p,l=g,m.point=x}function E(){n(f,d,c,h,p,g,s,o,r,a,u,l,Nw,i),m.lineEnd=v,v()}return m}}var AU=$p({point:function(e,t){this.stream.point(e*ge,t*ge)}});function wU(e){return $p({point:function(t,n){var i=e(t,n);return this.stream.point(i[0],i[1])}})}function SU(e,t,n,i,r){function s(o,a){return o*=i,a*=r,[t+e*o,n-e*a]}return s.invert=function(o,a){return[(o-t)/e*i,(n-a)/e*r]},s}function Pw(e,t,n,i,r,s){if(!s)return SU(e,t,n,i,r);var o=se(s),a=re(s),u=o*e,l=a*e,c=o/e,f=a/e,d=(a*n-o*t)/e,h=(a*t+o*n)/e;function p(g,m){return g*=i,m*=r,[u*g-l*m+t,n-l*g-u*m]}return p.invert=function(g,m){return[i*(c*g-f*m+d),r*(h-f*g-c*m)]},p}function sr(e){return y5(function(){return e})()}function y5(e){var t,n=150,i=480,r=250,s=0,o=0,a=0,u=0,l=0,c,f=0,d=1,h=1,p=null,g=$w,m=null,y,b,x,v=Vl,A=.5,w,E,S,C,F;function k($){return S($[0]*ge,$[1]*ge)}function L($){return $=S.invert($[0],$[1]),$&&[$[0]*Je,$[1]*Je]}k.stream=function($){return C&&F===$?C:C=AU(wU(c)(g(w(v(F=$)))))},k.preclip=function($){return arguments.length?(g=$,p=void 0,_()):g},k.postclip=function($){return arguments.length?(v=$,m=y=b=x=null,_()):v},k.clipAngle=function($){return arguments.length?(g=+$?sU(p=$*ge):(p=null,$w),_()):p*Je},k.clipExtent=function($){return arguments.length?(v=$==null?(m=y=b=x=null,Vl):r5(m=+$[0][0],y=+$[0][1],b=+$[1][0],x=+$[1][1]),_()):m==null?null:[[m,y],[b,x]]},k.scale=function($){return arguments.length?(n=+$,R()):n},k.translate=function($){return arguments.length?(i=+$[0],r=+$[1],R()):[i,r]},k.center=function($){return arguments.length?(s=$[0]%360*ge,o=$[1]%360*ge,R()):[s*Je,o*Je]},k.rotate=function($){return arguments.length?(a=$[0]%360*ge,u=$[1]%360*ge,l=$.length>2?$[2]%360*ge:0,R()):[a*Je,u*Je,l*Je]},k.angle=function($){return arguments.length?(f=$%360*ge,R()):f*Je},k.reflectX=function($){return arguments.length?(d=$?-1:1,R()):d<0},k.reflectY=function($){return arguments.length?(h=$?-1:1,R()):h<0},k.precision=function($){return arguments.length?(w=Lw(E,A=$*$),_()):rn(A)},k.fitExtent=function($,D){return Fp(k,$,D)},k.fitSize=function($,D){return ev(k,$,D)},k.fitWidth=function($,D){return tv(k,$,D)},k.fitHeight=function($,D){return nv(k,$,D)};function R(){var $=Pw(n,0,0,d,h,f).apply(null,t(s,o)),D=Pw(n,i-$[0],r-$[1],d,h,f);return c=e5(a,u,l),E=p1(t,D),S=p1(c,E),w=Lw(E,A),_()}function _(){return C=F=null,k}return function(){return t=e.apply(this,arguments),k.invert=t.invert&&L,R()}}function iv(e){var t=0,n=me/3,i=y5(e),r=i(t,n);return r.parallels=function(s){return arguments.length?i(t=s[0]*ge,n=s[1]*ge):[t*Je,n*Je]},r}function CU(e){var t=se(e);function n(i,r){return[i*t,re(r)/t]}return n.invert=function(i,r){return[i/t,xn(r*t)]},n}function $U(e,t){var n=re(e),i=(n+re(t))/2;if(xe(i)<ae)return CU(e);var r=1+n*(2*i-n),s=rn(r)/i;function o(a,u){var l=rn(r-2*i*re(u))/i;return[l*re(a*=i),s-l*se(a)]}return o.invert=function(a,u){var l=s-u,c=Jn(a,xe(l))*jn(l);return l*i<0&&(c-=me*jn(a)*jn(l)),[c/i,xn((r-(a*a+l*l)*i*i)/(2*i))]},o}function hh(){return iv($U).scale(155.424).center([0,33.6442])}function b5(){return hh().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function FU(e){var t=e.length;return{point:function(n,i){for(var r=-1;++r<t;)e[r].point(n,i)},sphere:function(){for(var n=-1;++n<t;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<t;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<t;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<t;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<t;)e[n].polygonEnd()}}}function _U(){var e,t,n=b5(),i,r=hh().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s,o=hh().rotate([157,0]).center([-3,19.9]).parallels([8,18]),a,u,l={point:function(d,h){u=[d,h
vendor: 4,269 bytes, line 9
9]}};function c(d){var h=d[0],p=d[1];return u=null,i.point(h,p),u||(s.point(h,p),u)||(a.point(h,p),u)}c.invert=function(d){var h=n.scale(),p=n.translate(),g=(d[0]-p[0])/h,m=(d[1]-p[1])/h;return(m>=.12&&m<.234&&g>=-.425&&g<-.214?r:m>=.166&&m<.234&&g>=-.214&&g<-.115?o:n).invert(d)},c.stream=function(d){return e&&t===d?e:e=FU([n.stream(t=d),r.stream(d),o.stream(d)])},c.precision=function(d){return arguments.length?(n.precision(d),r.precision(d),o.precision(d),f()):n.precision()},c.scale=function(d){return arguments.length?(n.scale(d),r.scale(d*.35),o.scale(d),c.translate(n.translate())):n.scale()},c.translate=function(d){if(!arguments.length)return n.translate();var h=n.scale(),p=+d[0],g=+d[1];return i=n.translate(d).clipExtent([[p-.455*h,g-.238*h],[p+.455*h,g+.238*h]]).stream(l),s=r.translate([p-.307*h,g+.201*h]).clipExtent([[p-.425*h+ae,g+.12*h+ae],[p-.214*h-ae,g+.234*h-ae]]).stream(l),a=o.translate([p-.205*h,g+.212*h]).clipExtent([[p-.214*h+ae,g+.166*h+ae],[p-.115*h-ae,g+.234*h-ae]]).stream(l),f()},c.fitExtent=function(d,h){return Fp(c,d,h)},c.fitSize=function(d,h){return ev(c,d,h)},c.fitWidth=function(d,h){return tv(c,d,h)},c.fitHeight=function(d,h){return nv(c,d,h)};function f(){return e=t=null,c}return c.scale(1070)}function x5(e){return function(t,n){var i=se(t),r=se(n),s=e(i*r);return s===1/0?[2,0]:[s*r*re(t),s*re(n)]}}function Tc(e){return function(t,n){var i=rn(t*t+n*n),r=e(i),s=re(r),o=se(r);return[Jn(t*s,i*o),xn(i&&n*s/i)]}}var v5=x5(function(e){return rn(2/(1+e))});v5.invert=Tc(function(e){return 2*xn(e/2)});function kU(){return sr(v5).scale(124.75).clipAngle(180-.001)}var E5=x5(function(e){return(e=q3(e))&&e/re(e)});E5.invert=Tc(function(e){return e});function DU(){return sr(E5).scale(79.4188).clipAngle(180-.001)}function _p(e,t){return[e,Xd(Jx((Ye+t)/2))]}_p.invert=function(e,t){return[e,2*vu(j3(t))-Ye]};function RU(){return A5(_p).scale(961/nn)}function A5(e){var t=sr(e),n=t.center,i=t.scale,r=t.translate,s=t.clipExtent,o=null,a,u,l;t.scale=function(f){return arguments.length?(i(f),c()):i()},t.translate=function(f){return arguments.length?(r(f),c()):r()},t.center=function(f){return arguments.length?(n(f),c()):n()},t.clipExtent=function(f){return arguments.length?(f==null?o=a=u=l=null:(o=+f[0][0],a=+f[0][1],u=+f[1][0],l=+f[1][1]),c()):o==null?null:[[o,a],[u,l]]};function c(){var f=me*i(),d=t(Jz(t.rotate()).invert([0,0]));return s(o==null?[[d[0]-f,d[1]-f],[d[0]+f,d[1]+f]]:e===_p?[[Math.max(d[0]-f,o),a],[Math.min(d[0]+f,u),l]]:[[o,Math.max(d[1]-f,a)],[u,Math.min(d[1]+f,l)]])}return c()}function $f(e){return Jx((Ye+e)/2)}function OU(e,t){var n=se(e),i=e===t?re(e):Xd(n/se(t))/Xd($f(t)/$f(e)),r=n*l0($f(e),i)/i;if(!i)return _p;function s(o,a){r>0?a<-Ye+ae&&(a=-Ye+ae):a>Ye-ae&&(a=Ye-ae);var u=r/l0($f(a),i);return[u*re(i*o),r-u*se(i*o)]}return s.invert=function(o,a){var u=r-a,l=jn(i)*rn(o*o+u*u),c=Jn(o,xe(u))*jn(u);return u*i<0&&(c-=me*jn(o)*jn(u)),[c/i,2*vu(l0(r/l,1/i))-Ye]},s}function TU(){return iv(OU).scale(109.5).parallels([30,30])}function ph(e,t){return[e,t]}ph.invert=ph;function MU(){return sr(ph).scale(152.63)}function NU(e,t){var n=se(e),i=e===t?re(e):(n-se(t))/(t-e),r=n/i+e;if(xe(i)<ae)return ph;function s(o,a){var u=r-a,l=i*o;return[u*re(l),r-u*se(l)]}return s.invert=function(o,a){var u=r-a,l=Jn(o,xe(u))*jn(u);return u*i<0&&(l-=me*jn(o)*jn(u)),[l/i,r-jn(i)*rn(o*o+u*u)]},s}function LU(){return iv(NU).scale(131.154).center([0,13.9389])}var _l=1.340264,kl=-.081106,Dl=893e-6,Rl=.003796,gh=rn(3)/2,PU=12;function w5(e,t){var n=xn(gh*re(t)),i=n*n,r=i*i*i;return[e*se(n)/(gh*(_l+3*kl*i+r*(7*Dl+9*Rl*i))),n*(_l+kl*i+r*(Dl+Rl*i))]}w5.invert=function(e,t){for(var n=t,i=n*n,r=i*i*i,s=0,o,a,u;s<PU&&(a=n*(_l+kl*i+r*(Dl+Rl*i))-t,u=_l+3*kl*i+r*(7*Dl+9*Rl*i),n-=o=a/u,i=n*n,r=i*i*i,!(xe(o)<r1));++s);return[gh*e*(_l+3*kl*i+r*(7*Dl+9*Rl*i))/se(n),xn(re(n)/gh)]};function IU(){return sr(w5).scale(177.158)}function S5(e,t){var n=se(t),i=se(e)*n;return[n*re(e)/i,re(t)/i]}S5.invert=Tc(vu);function BU(){return sr(S5).scale(144.049).clipAngle(60)}function zU(){var e=1,t=0,n=0,i=1,r=1,s=0,o,a,u=null,l,c,f,d=1,h=1,p=$p({point:function(v,A){var w=x([v,A]);this.stream.point(w[0],w[1])}}),g=Vl,m,y;function b(){return d=e*i,h=e*r,m=y=null,x}function x(v){var A=v[0]*d,w=v[1]*h;if(s){var E=w*o-A*a;A=A*o+w*a,w=E}
9return[A+t,w+n]}return x.invert=function(v){var A=v[0]-t,w=v[1]-n;if(s){var E=w*o+A*a;A=A*o-w*a,w=E}return[A/d,w/h]},x.stream=function(v){return m&&y===v?m:m=p(g(y=v))},x.postclip=function(v){return arguments.length?(g=v,u=l=c=f=null,b()):g},x.clipExtent=function(v){return arguments.length?(g=v==null?(u=l=c=f=null,Vl):r5(u=+v[0][0],l=+v[0][1],c=+v[1][0],f=+v[1][1]),b()):u==null?null:[[u,l],[c,f]]},x.scale=function(v){return arguments.length?(e=+v,b()):e},x.translate=function(v){return arguments.length?(t=+v[0],n=+v[1],b()):[t,n]},x.angle=function(v){return arguments.length?(s=v%360*ge,a=re(s),o=se(s),b()):s*Je},x.reflectX=function(v){return arguments.length?(i=v?-1:1,b()):i<0},x.reflectY=function(v){return arguments.length?(r=v?-1:1,b()):r<0},x.fitExtent=function(v,A){return Fp(x,v,A)},x.fitSize=function(v,A){return ev(x,v,A)},x.fitWidth=function(v,A){return tv(x,v,A)},x.fitHeight=function(v,A){return nv(x,v,A)},x}function C5(e,t){var n=t*t,i=n*n;return[e*(.8707-.131979*n+i*(-.013791+i*(.003971*n-.001529*i))),t*(1.007226+n*(.015085+i*(-.044475+.028874*n-.005916*i)))]}C5.invert=function(e,t){var n=t,i=25,r;do{var s=n*n,o=s*s;n-=r=(n*(1.007226+s*(.015085+o*(-.044475+.028874*s-.005916*o)))-t)/(1.007226+s*(.015085*3+o*(-.044475*7+.028874*9*s-.005916*11*o)))}while(xe(r)>ae&&--i>0);return[e/(.8707+(s=n*n)*(-.131979+s*(-.013791+s*s*s*(.003971-.001529*s)))),n]};function UU(){return sr(C5).scale(175.295)}function $5(e,t){return[se(t)*re(e),re(t)]}$5.invert=Tc(xn);function jU(){return sr($5).scale(249.5).clipAngle(90+ae)}function F5(e,t){var n=se(t),i=1+se(e)*n;return[n*re(e)/i,re(t)/i]}F5.invert=Tc(function(e){return 2*vu(e)});function qU(){return sr(F5).scale(250).clipAngle(142)}function _5(e,t){return[Xd(Jx((Ye+t)/2)),-e]}_5.invert=function(e,t){return[-t,2*vu(j3(e))-Ye]};function WU(){var e=A5(_5),t=e.center,n=e.rotate;return e.center=function(i){return arguments.length?t([-i[1],i[0]]):(i=t(),[i[1],-i[0]])},e.rotate=function(i){return arguments.length?n([i[0],i[1],i.length>2?i[2]+90:90]):(i=n(),[i[0],i[1],i[2]-90])},n([0,0,90]).scale(159.155)}var GU=Math.abs,C1=Math.cos,mh=Math.sin,HU=1e-6,k5=Math.PI,$1=k5/2,Iw=VU(2);function Bw(e){return e>1?$1:e<-1?-$1:Math.asin(e)}function VU(e){return e>0?Math.sqrt(e):0}function XU(e,t){var n=e*mh(t),i=30,r;do t-=r=(t+mh(t)-n)/(1+C1(t));while(GU(r)>HU&&--i>0);return t/2}function YU(e,t,n){function i(r,s){return[e*r*C1(s=XU(n,s)),t*mh(s)]}return i.invert=function(r,s){return s=Bw(s/t),[r/(e*C1(s)),Bw((2*s+mh(2*s))/n)]},i}var KU=YU(Iw/$1,Iw,k5);function JU(){return sr(KU).scale(169.529)}const QU=m5(),F1=["clipAngle","clipExtent","scale","translate","center","rotate","parallels","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];function ZU(e,t){return function n(){const i=t();return i.type=e,i.path=m5().projection(i),i.copy=i.copy||function(){const r=n();return F1.forEach(s=>{i[s]&&r[s](i[s]())}),r.path.pointRadius(i.path.pointRadius()),r},Wk(i)}}function rv(e,t){if(!e||typeof e!="string")throw new Error("Projection type must be a name string.");return e=e.toLowerCase(),arguments.length>1?(yh[e]=ZU(e,t),this):yh[e]||null}function D5(e){return e&&e.path||QU}const yh={albers:b5,albersusa:_U,azimuthalequalarea:kU,azimuthalequidistant:DU,conicconformal:TU,conicequalarea:hh,conicequidistant:LU,equalEarth:IU,equirectangular:MU,gnomonic:BU,identity:zU,mercator:RU,mollweide:JU,naturalEarth1:UU,orthographic:jU,stereographic:qU,transversemercator:WU};for(const e in yh)rv(e,yh[e]);function ej(){}const mr=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function R5(){var e=1,t=1,n=a;function i(u,l){return l.map(c=>r(u,c))}function r(u,l){var c=[],f=[];return s(u,l,d=>{n(d,u,l),tj(d)>0?c.push([d]):f.push(d)}),f.forEach(d=>{for(var h=0,p=c.length,g;h<p;++h)if(nj((g=c[h])[0],d)!==-1){g.push(d);return}}),{type:"MultiPolygon",value:l,coordinates:c}}function s(u,l,c){var f=[],d=[],h,p,g,m,y,b;for(h=p=-1,m=u[0]>
vendor: 4,892 bytes, line 9
9=l,mr[m<<1].forEach(x);++h<e-1;)g=m,m=u[h+1]>=l,mr[g|m<<1].forEach(x);for(mr[m<<0].forEach(x);++p<t-1;){for(h=-1,m=u[p*e+e]>=l,y=u[p*e]>=l,mr[m<<1|y<<2].forEach(x);++h<e-1;)g=m,m=u[p*e+e+h+1]>=l,b=y,y=u[p*e+h+1]>=l,mr[g|m<<1|y<<2|b<<3].forEach(x);mr[m|y<<3].forEach(x)}for(h=-1,y=u[p*e]>=l,mr[y<<2].forEach(x);++h<e-1;)b=y,y=u[p*e+h+1]>=l,mr[y<<2|b<<3].forEach(x);mr[y<<3].forEach(x);function x(v){var A=[v[0][0]+h,v[0][1]+p],w=[v[1][0]+h,v[1][1]+p],E=o(A),S=o(w),C,F;(C=d[E])?(F=f[S])?(delete d[C.end],delete f[F.start],C===F?(C.ring.push(w),c(C.ring)):f[C.start]=d[F.end]={start:C.start,end:F.end,ring:C.ring.concat(F.ring)}):(delete d[C.end],C.ring.push(w),d[C.end=S]=C):(C=f[S])?(F=d[E])?(delete f[C.start],delete d[F.end],C===F?(C.ring.push(w),c(C.ring)):f[F.start]=d[C.end]={start:F.start,end:C.end,ring:F.ring.concat(C.ring)}):(delete f[C.start],C.ring.unshift(A),f[C.start=E]=C):f[E]=d[S]={start:E,end:S,ring:[A,w]}}}function o(u){return u[0]*2+u[1]*(e+1)*4}function a(u,l,c){u.forEach(f=>{var d=f[0],h=f[1],p=d|0,g=h|0,m,y=l[g*e+p];d>0&&d<e&&p===d&&(m=l[g*e+p-1],f[0]=d+(c-m)/(y-m)-.5),h>0&&h<t&&g===h&&(m=l[(g-1)*e+p],f[1]=h+(c-m)/(y-m)-.5)})}return i.contour=r,i.size=function(u){if(!arguments.length)return[e,t];var l=Math.floor(u[0]),c=Math.floor(u[1]);return l>=0&&c>=0||T("invalid size"),e=l,t=c,i},i.smooth=function(u){return arguments.length?(n=u?a:ej,i):n===a},i}function tj(e){for(var t=0,n=e.length,i=e[n-1][1]*e[0][0]-e[n-1][0]*e[0][1];++t<n;)i+=e[t-1][1]*e[t][0]-e[t-1][0]*e[t][1];return i}function nj(e,t){for(var n=-1,i=t.length,r;++n<i;)if(r=ij(e,t[n]))return r;return 0}function ij(e,t){for(var n=t[0],i=t[1],r=-1,s=0,o=e.length,a=o-1;s<o;a=s++){var u=e[s],l=u[0],c=u[1],f=e[a],d=f[0],h=f[1];if(rj(u,f,t))return 0;c>i!=h>i&&n<(d-l)*(i-c)/(h-c)+l&&(r=-r)}return r}function rj(e,t,n){var i;return sj(e,t,n)&&oj(e[i=+(e[0]===t[0])],n[i],t[i])}function sj(e,t,n){return(t[0]-e[0])*(n[1]-e[1])===(n[0]-e[0])*(t[1]-e[1])}function oj(e,t,n){return e<=t&&t<=n||n<=t&&t<=e}function O5(e,t,n){return function(i){var r=Yi(i),s=n?Math.min(r[0],0):r[0],o=r[1],a=o-s,u=t?zl(s,o,e):a/(e+1);return zo(s+u,o,u)}}function sv(e){O.call(this,null,e)}sv.Definition={type:"Isocontour",metadata:{generates:!0},params:[{name:"field",type:"field"},{name:"thresholds",type:"number",array:!0},{name:"levels",type:"number"},{name:"nice",type:"boolean",default:!1},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"zero",type:"boolean",default:!0},{name:"smooth",type:"boolean",default:!0},{name:"scale",type:"number",expr:!0},{name:"translate",type:"number",array:!0,expr:!0},{name:"as",type:"string",null:!0,default:"contour"}]};H(sv,O,{transform(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var n=t.fork(t.NO_SOURCE|t.NO_FIELDS),i=t.materialize(t.SOURCE).source,r=e.field||jt,s=R5().smooth(e.smooth!==!1),o=e.thresholds||aj(i,r,e),a=e.as===null?null:e.as||"contour",u=[];return i.forEach(l=>{const c=r(l),f=s.size([c.width,c.height])(c.values,I(o)?o:o(c.values));uj(f,c,l,e),f.forEach(d=>{u.push(tp(l,$e(a!=null?{[a]:d}:d)))})}),this.value&&(n.rem=this.value),this.value=n.source=n.add=u,n}});function aj(e,t,n){const i=O5(n.levels||10,n.nice,n.zero!==!1);return n.resolve!=="shared"?i:i(e.map(r=>co(t(r).values)))}function uj(e,t,n,i){let r=i.scale||t.scale,s=i.translate||t.translate;if(de(r)&&(r=r(n,i)),de(s)&&(s=s(n,i)),(r===1||r==null)&&!s)return;const o=(Se(r)?r:r[0])||1,a=(Se(r)?r:r[1])||1,u=s&&s[0]||0,l=s&&s[1]||0;e.forEach(T5(t,o,a,u,l))}function T5(e,t,n,i,r){const s=e.x1||0,o=e.y1||0,a=t*n<0;function u(f){f.forEach(l)}function l(f){a&&f.reverse(),f.forEach(c)}function c(f){f[0]=(f[0]-s)*t+i,f[1]=(f[1]-o)*n+r}return function(f){return f.coordinates.forEach(u),f}}function zw(e,t,n){const i=e>=0?e:yb(t,n);return Math.round((Math.sqrt(4*i*i+1)-1)/2)}function p0(e){return de(e)?e:qt(+e)}function M5(){var e=u=>u[0],t=u=>u[1],n=cu,i=[-1,-1],r=960,s=500,o=2;function a(u,l){const c=zw(i[0],u,e)>>o,f=zw(i[1],u,t)>>o,d=c?c+2:0,h=f?f+2:0,p=2*d+(r>>o),g=2*h+(s>>o),m=new Float32Array(p*g),y=new Float32Array(p*g);let b=m;u.forEach(v=>{const A=d+(+e(v)>>o),w=h+(+t(v)>>o);A>=0&&A<p&&w>=0&&w<g&&(m[A+w*p]+=+n(v))}),c>0&&f>0?(aa(p,g,m,y,c),ua(p,g,y,m,f),aa(p,g,m,y,c),ua(p,g,y,m,f),aa(p,g,m,y,c),ua(p,g,y,m,f)):c>0?(aa(p,g,m,y,c),aa(p,g,y,m,c),aa(p,g,m,y,c),b=y):f>0&&(ua(p,g,m,y,f),ua(p,g,y,m,f),ua(p,g,m,y,f),b=y);const x=l?Math.pow(2,-2*o):1/h_(b);for(let v=0,A=p*g;v<A;++v)b[v]*=x;return{values:b,scale:1<<o,width:p,height:g,x1:d,y1:h,x2:d+(r>>o),y2:h+(s>>o)}}return a.x=function(u){return arguments.length?(e=p0(u),a):e},a.y=function(u){return arguments.length?(t=p0(u),a):t},a.weight=function(u){return arguments.length?(n=p0(u),a):n},a.size=function(u){if(!arguments.length)return[r,s];var l=+u[0],c=+u[1];return l>=0&&c>=0||T("invalid size"),r=l,s=c,a},a.cellSize=function(u){return arguments.length?((u=+u)>
9=1||T("invalid cell size"),o=Math.floor(Math.log(u)/Math.LN2),a):1<<o},a.bandwidth=function(u){return arguments.length?(u=K(u),u.length===1&&(u=[+u[0],+u[0]]),u.length!==2&&T("invalid bandwidth"),i=u,a):i},a}function aa(e,t,n,i,r){const s=(r<<1)+1;for(let o=0;o<t;++o)for(let a=0,u=0;a<e+r;++a)a<e&&(u+=n[a+o*e]),a>=r&&(a>=s&&(u-=n[a-s+o*e]),i[a-r+o*e]=u/Math.min(a+1,e-1+s-a,s))}function ua(e,t,n,i,r){const s=(r<<1)+1;for(let o=0;o<e;++o)for(let a=0,u=0;a<t+r;++a)a<t&&(u+=n[o+a*e]),a>=r&&(a>=s&&(u-=n[o+(a-s)*e]),i[o+(a-r)*e]=u/Math.min(a+1,t-1+s-a,s))}function ov(e){O.call(this,null,e)}ov.Definition={type:"KDE2D",metadata:{generates:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"weight",type:"field"},{name:"groupby",type:"field",array:!0},{name:"cellSize",type:"number"},{name:"bandwidth",type:"number",array:!0,length:2},{name:"counts",type:"boolean",default:!1},{name:"as",type:"string",default:"grid"}]};const lj=["x","y","weight","size","cellSize","bandwidth"];function N5(e,t){return lj.forEach(n=>t[n]!=null?e[n](t[n]):0),e}H(ov,O,{transform(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var n=t.fork(t.NO_SOURCE|t.NO_FIELDS),i=t.materialize(t.SOURCE).source,r=cj(i,e.groupby),s=(e.groupby||[]).map(Ke),o=N5(M5(),e),a=e.as||"grid",u=[];function l(c,f){for(let d=0;d<s.length;++d)c[s[d]]=f[d];return c}return u=r.map(c=>$e(l({[a]:o(c,e.counts)},c.dims))),this.value&&(n.rem=this.value),this.value=n.source=n.add=u,n}});function cj(e,t){var n=[],i=c=>c(a),r,s,o,a,u,l;if(t==null)n.push(e);else for(r={},s=0,o=e.length;s<o;++s)a=e[s],u=t.map(i),l=r[u],l||(r[u]=l=[],l.dims=u,n.push(l)),l.push(a);return n}function av(e){O.call(this,null,e)}av.Definition={type:"Contour",metadata:{generates:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"values",type:"number",array:!0},{name:"x",type:"field"},{name:"y",type:"field"},{name:"weight",type:"field"},{name:"cellSize",type:"number"},{name:"bandwidth",type:"number"},{name:"count",type:"number"},{name:"nice",type:"boolean",default:!1},{name:"thresholds",type:"number",array:!0},{name:"smooth",type:"boolean",default:!0}]};H(av,O,{transform(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var n=t.fork(t.NO_SOURCE|t.NO_FIELDS),i=R5().smooth(e.smooth!==!1),r=e.values,s=e.thresholds||O5(e.count||10,e.nice,!!r),o=e.size,a,u;return r||(r=t.materialize(t.SOURCE).source,a=N5(M5(),e)(r,!0),u=T5(a,a.scale||1,a.scale||1,0,0),o=[a.width,a.height],r=a.values),s=I(s)?s:s(r),r=i.size(o)(r,s),u&&r.forEach(u),this.value&&(n.rem=this.value),this.value=n.source=n.add=(r||[]).map($e),n}});const _1="Feature",uv="FeatureCollection",fj="MultiPoint";function lv(e){O.call(this,null,e)}lv.Definition={type:"GeoJSON",metadata:{},params:[{name:"fields",type:"field",array:!0,length:2},{name:"geojson",type:"field"}]};H(lv,O,{transform(e,t){var n=this._features,i=this._points,r=e.fields,s=r&&r[0],o=r&&r[1],a=e.geojson||!r&&jt,u=t.ADD,l;l=e.modified()||t.changed(t.REM)||t.modified(Lt(a))||s&&t.modified(Lt(s))||o&&t.modified(Lt(o)),(!this.value||l)&&(u=t.SOURCE,this._features=n=[],this._points=i=[]),a&&t.visit(u,c=>n.push(a(c))),s&&o&&(t.visit(u,c=>{var f=s(c),d=o(c);f!=null&&d!=null&&(f=+f)===f&&(d=+d)===d&&i.push([f,d])}),n=n.concat({type:_1,geometry:{type:fj,coordinates:i}})),this.value={type:uv,features:n}}});function cv(e){O.call(this,null,e)}cv.Definition={type:"GeoPath",metadata:{modifies:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"path"}]};H(cv,O,{transform(e,t){var n=t.fork(t.ALL),i=this.value,r=e.field||jt,s=e.as||"path",o=n.SOURCE;!i||e.modified()?(this.value=i=D5(e.projection),n.materialize().reflow()):o=r===jt||t.modified(r.fields)?n.ADD_MOD:n.ADD;const a=dj(i,e.pointRadius);return n.visit(o,u=>u[s]=i(r(u))),i.pointRadius(a),n.modifies(s)}});function dj(e,t){const n=e.pointRadius();return e.context(null),t!=null&&e.pointRadius(t),n}function fv(e){O.call(this,null,e)}fv.Definition={type:"GeoPoint",metadata:{modifies:!0},params:[{name:"projection",type:"projection",required:!0},{name:"fields",type:"field",array:!0,required:!0,length:2},{name:"as",type:"string",array:!0,length:2,default:["x","y"]}]};H(fv,O,{transform(e,t){var n=e.projection,i=e.fields[0],r=e.fields[1],s=e.as||["x","y"],o=s[0],a=s[1],u;function l(c){const f=n([i(c),r(c)]);f?(c[o]=f[0],c[a]=f[1]):(c[o]=void 0,c[a]=void 0)}return e.modified()?t=t.materialize().reflow(!0).visit(t.SOURCE,l):(u
vendor: 14,417 bytes, line 9
9=t.modified(i.fields)||t.modified(r.fields),t.visit(u?t.ADD_MOD:t.ADD,l)),t.modifies(s)}});function dv(e){O.call(this,null,e)}dv.Definition={type:"GeoShape",metadata:{modifies:!0,nomod:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field",default:"datum"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"shape"}]};H(dv,O,{transform(e,t){var n=t.fork(t.ALL),i=this.value,r=e.as||"shape",s=n.ADD;return(!i||e.modified())&&(this.value=i=hj(D5(e.projection),e.field||Vn("datum"),e.pointRadius),n.materialize().reflow(),s=n.SOURCE),n.visit(s,o=>o[r]=i),n.modifies(r)}});function hj(e,t,n){const i=n==null?r=>e(t(r)):r=>{var s=e.pointRadius(),o=e.pointRadius(n)(t(r));return e.pointRadius(s),o};return i.context=r=>(e.context(r),i),i}function hv(e){O.call(this,[],e),this.generator=aU()}hv.Definition={type:"Graticule",metadata:{changes:!0,generates:!0},params:[{name:"extent",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMajor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMinor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"step",type:"number",array:!0,length:2},{name:"stepMajor",type:"number",array:!0,length:2,default:[90,360]},{name:"stepMinor",type:"number",array:!0,length:2,default:[10,10]},{name:"precision",type:"number",default:2.5}]};H(hv,O,{transform(e,t){var n=this.value,i=this.generator,r;if(!n.length||e.modified())for(const s in e)de(i[s])&&i[s](e[s]);return r=i(),n.length?t.mod.push(X_(n[0],r)):t.add.push($e(r)),n[0]=r,t}});function pv(e){O.call(this,null,e)}pv.Definition={type:"heatmap",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"color",type:"string",expr:!0},{name:"opacity",type:"number",expr:!0},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"as",type:"string",default:"image"}]};H(pv,O,{transform(e,t){if(!t.changed()&&!e.modified())return t.StopPropagation;var n=t.materialize(t.SOURCE).source,i=e.resolve==="shared",r=e.field||jt,s=gj(e.opacity,e),o=pj(e.color,e),a=e.as||"image",u={$x:0,$y:0,$value:0,$max:i?co(n.map(l=>co(r(l).values))):0};return n.forEach(l=>{const c=r(l),f=fe({},l,u);i||(f.$max=co(c.values||[])),l[a]=mj(c,f,o.dep?o:qt(o(f)),s.dep?s:qt(s(f)))}),t.reflow(!0).modifies(a)}});function pj(e,t){let n;return de(e)?(n=i=>wd(e(i,t)),n.dep=L5(e)):n=qt(wd(e||"#888")),n}function gj(e,t){let n;return de(e)?(n=i=>e(i,t),n.dep=L5(e)):e?n=qt(e):(n=i=>i.$value/i.$max||0,n.dep=!0),n}function L5(e){if(!de(e))return!1;const t=mi(Lt(e));return t.$x||t.$y||t.$value||t.$max}function mj(e,t,n,i){const r=e.width,s=e.height,o=e.x1||0,a=e.y1||0,u=e.x2||r,l=e.y2||s,c=e.values,f=c?m=>c[m]:rs,d=ys(u-o,l-a),h=d.getContext("2d"),p=h.getImageData(0,0,u-o,l-a),g=p.data;for(let m=a,y=0;m<l;++m){t.$y=m-a;for(let b=o,x=m*r;b<u;++b,y+=4){t.$x=b-o,t.$value=f(b+x);const v=n(t);g[y+0]=v.r,g[y+1]=v.g,g[y+2]=v.b,g[y+3]=~~(255*i(t))}}return h.putImageData(p,0,0),d}function P5(e){O.call(this,null,e),this.modified(!0)}H(P5,O,{transform(e,t){let n=this.value;return!n||e.modified("type")?(this.value=n=bj(e.type),F1.forEach(i=>{e[i]!=null&&Uw(n,i,e[i])})):F1.forEach(i=>{e.modified(i)&&Uw(n,i,e[i])}),e.pointRadius!=null&&n.path.pointRadius(e.pointRadius),e.fit&&yj(n,e),t.fork(t.NO_SOURCE|t.NO_FIELDS)}});function yj(e,t){const n=xj(t.fit);t.extent?e.fitExtent(t.extent,n):t.size&&e.fitSize(t.size,n)}function bj(e){const t=rv((e||"mercator").toLowerCase());return t||T("Unrecognized projection type: "+e),t()}function Uw(e,t,n){de(e[t])&&e[t](n)}function xj(e){return e=K(e),e.length===1?e[0]:{type:uv,features:e.reduce((t,n)=>t.concat(vj(n)),[])}}function vj(e){return e.type===uv?e.features:K(e).filter(t=>t!=null).map(t=>t.type===_1?t:{type:_1,geometry:t})}const Ej=Object.freeze(Object.defineProperty({__proto__:null,contour:av,geojson:lv,geopath:cv,geopoint:fv,geoshape:dv,graticule:hv,heatmap:pv,isocontour:sv,kde2d:ov,projection:P5},Symbol.toStringTag,{value:"Module"}));function Aj(e,t){var n,i=1;e==null&&(e=0),t==null&&(t=0);function r(){var s,o=n.length,a,u=0,l=0;for(s=0;s<o;++s)a=n[s],u+=a.x,l+=a.y;for(u=(u/o-e)*i,l=(l/o-t)*i,s=0;s<o;++s)a=n[s],a.x-=u,a.y-=l}return r.initialize=function(s){n=s},r.x=function(s){return arguments.length?(e=+s,r):e},r.y=function(s){return arguments.length?(t=+s,r):t},r.strength=function(s){return arguments.length?(i=+s,r):i},r}function wj(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return I5(this.cover(t,n),t,n,e)}function I5(e,t,n,i){if(isNaN(t)||isNaN(n))return e;var r,s=e._root,o={data:i},a=e._x0,u=e._y0,l=e._x1,c=e._y1,f,d,h,p,g,m,y,b;if(!s)return e._root=o,e;for(;s.length;)if((g=t>=(f=(a+l)/2))?a=f:l=f,(m=n>=(d=(u+c)/2))?u=d:c=d,r=s,!(s=s[y=m<<1|g]))return r[y]=o,e;if(h=+e._x.call(null,s.data),p=+e._y.call(null,s.data),t===h&&n===p)return o.next=s,r?r[y]=o:e._root=o,e;do r=r?r[y]=new Array(4):e._root=new Array(4),(g=t>=(f=(a+l)/2))?a=f:l=f,(m=n>=(d=(u+c)/2))?u=d:c=d;while((y=m<<1|g)===(b=(p>=d)<<1|h>=f));return r[b]=s,r[y]=o,e}function Sj(e){var t,n,i=e.length,r,s,o=new Array(i),a=new Array(i),u=1/0,l=1/0,c=-1/0,f=-1/0;for(n=0;n<i;++n)isNaN(r=+this._x.call(null,t=e[n]))||isNaN(s=+this._y.call(null,t))||(o[n]=r,a[n]=s,r<u&&(u=r),r>c&&(c=r),s<l&&(l=s),s>f&&(f=s));if(u>c||l>f)return this;for(this.cover(u,l).cover(c,f),n=0;n<i;++n)I5(this,o[n],a[n],e[n]);return this}function Cj(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,i=this._y0,r=this._x1,s=this._y1;if(isNaN(n))r=(n=Math.floor(e))+1,s=(i=Math.floor(t))+1;else{for(var o=r-n||1,a=this._root,u,l;n>e||e>=r||i>t||t>=s;)switch(l=(t<i)<<1|e<n,u=new Array(4),u[l]=a,a=u,o*=2,l){case 0:r=n+o,s=i+o;break;case 1:n=r-o,s=i+o;break;case 2:r=n+o,i=s-o;break;case 3:n=r-o,i=s-o;break}this._root&&this._root.length&&(this._root=a)}return this._x0=n,this._y0=i,this._x1=r,this._y1=s,this}function $j(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function Fj(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Jt(e,t,n,i,r){this.node=e,this.x0=t,this.y0=n,this.x1=i,this.y1=r}function _j(e,t,n){var i,r=this._x0,s=this._y0,o,a,u,l,c=this._x1,f=this._y1,d=[],h=this._root,p,g;for(h&&d.push(new Jt(h,r,s,c,f)),n==null?n=1/0:(r=e-n,s=t-n,c=e+n,f=t+n,n*=n);p=d.pop();)if(!(!(h=p.node)||(o=p.x0)>c||(a=p.y0)>f||(u=p.x1)<r||(l=p.y1)<s))if(h.length){var m=(o+u)/2,y=(a+l)/2;d.push(new Jt(h[3],m,y,u,l),new Jt(h[2],o,y,m,l),new Jt(h[1],m,a,u,y),new Jt(h[0],o,a,m,y)),(g=(t>=y)<<1|e>=m)&&(p=d[d.length-1],d[d.length-1]=d[d.length-1-g],d[d.length-1-g]=p)}else{var b=e-+this._x.call(null,h.data),x=t-+this._y.call(null,h.data),v=b*b+x*x;if(v<n){var A=Math.sqrt(n=v);r=e-A,s=t-A,c=e+A,f=t+A,i=h.data}}return i}function kj(e){if(isNaN(c=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var t,n=this._root,i,r,s,o=this._x0,a=this._y0,u=this._x1,l=this._y1,c,f,d,h,p,g,m,y;if(!n)return this;if(n.length)for(;;){if((p=c>=(d=(o+u)/2))?o=d:u=d,(g=f>=(h=(a+l)/2))?a=h:l=h,t=n,!(n=n[m=g<<1|p]))return this;if(!n.length)break;(t[m+1&3]||t[m+2&3]||t[m+3&3])&&(i=t,y=m)}for(;n.data!==e;)if(r=n,!(n=n.next))return this;return(s=n.next)&&delete n.next,r?(s?r.next=s:delete r.next,this):t?(s?t[m]=s:delete t[m],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(i?i[y]=n:this._root=n),this):(this._root=s,this)}function Dj(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function Rj(){return this._root}function Oj(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function Tj(e){var t=[],n,i=this._root,r,s,o,a,u;for(i&&t.push(new Jt(i,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(i=n.node,s=n.x0,o=n.y0,a=n.x1,u=n.y1)&&i.length){var l=(s+a)/2,c=(o+u)/2;(r=i[3])&&t.push(new Jt(r,l,c,a,u)),(r=i[2])&&t.push(new Jt(r,s,c,l,u)),(r=i[1])&&t.push(new Jt(r,l,o,a,c)),(r=i[0])&&t.push(new Jt(r,s,o,l,c))}return this}function Mj(e){var t=[],n=[],i;for(this._root&&t.push(new Jt(this._root,this._x0,this._y0,this._x1,this._y1));i=t.pop();){var r=i.node;if(r.length){var s,o=i.x0,a=i.y0,u=i.x1,l=i.y1,c=(o+u)/2,f=(a+l)/2;(s=r[0])&&t.push(new Jt(s,o,a,c,f)),(s=r[1])&&t.push(new Jt(s,c,a,u,f)),(s=r[2])&&t.push(new Jt(s,o,f,c,l)),(s=r[3])&&t.push(new Jt(s,c,f,u,l))}n.push(i)}for(;i=n.pop();)e(i.node,i.x0,i.y0,i.x1,i.y1);return this}function Nj(e){return e[0]}function Lj(e){return arguments.length?(this._x=e,this):this._x}function Pj(e){return e[1]}function Ij(e){return arguments.length?(this._y=e,this):this._y}function gv(e,t,n){var i=new mv(t??Nj,n??Pj,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function mv(e,t,n,i,r,s){this._x=e,this._y=t,this._x0=n,this._y0=i,this._x1=r,this._y1=s,this._root=void 0}function jw(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var on=gv.prototype=mv.prototype;on.copy=function(){var e=new mv(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,i;if(!t)return e;if(!t.length)return e._root=jw(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var r=0;r<4;++r)(i=t.source[r])&&(i.length?n.push({source:i,target:t.target[r]=new Array(4)}):t.target[r]=jw(i));return e};on.add=wj;on.addAll=Sj;on.cover=Cj;on.data=$j;on.extent=Fj;on.find=_j;on.remove=kj;on.removeAll=Dj;on.root=Rj;on.size=Oj;on.visit=Tj;on.visitAfter=Mj;on.x=Lj;on.y=Ij;function Qt(e){return function(){return e}}function fs(e){return(e()-.5)*1e-6}function Bj(e){return e.x+e.vx}function zj(e){return e.y+e.vy}function Uj(e){var t,n,i,r=1,s=1;typeof e!="function"&&(e=Qt(e==null?1:+e));function o(){for(var l,c=t.length,f,d,h,p,g,m,y=0;y<s;++y)for(f=gv(t,Bj,zj).visitAfter(a),l=0;l<c;++l)d=t[l],g=n[d.index],m=g*g,h=d.x+d.vx,p=d.y+d.vy,f.visit(b);function b(x,v,A,w,E){var S=x.data,C=x.r,F=g+C;if(S){if(S.index>d.index){var k=h-S.x-S.vx,L=p-S.y-S.vy,R=k*k+L*L;R<F*F&&(k===0&&(k=fs(i),R+=k*k),L===0&&(L=fs(i),R+=L*L),R=(F-(R=Math.sqrt(R)))/R*r,d.vx+=(k*=R)*(F=(C*=C)/(m+C)),d.vy+=(L*=R)*F,S.vx-=k*(F=1-F),S.vy-=L*F)}return}return v>h+F||w<h-F||A>p+F||E<p-F}}function a(l){if(l.data)return l.r=n[l.data.index];for(var c=l.r=0;c<4;++c)l[c]&&l[c].r>l.r&&(l.r=l[c].r)}function u(){if(t){var l,c=t.length,f;for(n=new Array(c),l=0;l<c;++l)f=t[l],n[f.index]=+e(f,l,t)}}return o.initialize=function(l,c){t=l,i=c,u()},o.iterations=function(l){return arguments.length?(s=+l,o):s},o.strength=function(l){return arguments.length?(r=+l,o):r},o.radius=function(l){return arguments.length?(e=typeof l=="function"?l:Qt(+l),u(),o):e},o}function jj(e){return e.index}function qw(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function qj(e){var t=jj,n=f,i,r=Qt(30),s,o,a,u,l,c=1;e==null&&(e=[]);function f(m){return 1/Math.min(a[m.source.index],a[m.target.index])}function d(m){for(var y=0,b=e.length;y<c;++y)for(var x=0,v,A,w,E,S,C,F;x<b;++x)v=e[x],A=v.source,w=v.target,E=w.x+w.vx-A.x-A.vx||fs(l),S=w.y+w.vy-A.y-A.vy||fs(l),C=Math.sqrt(E*E+S*S),C=(C-s[x])/C*m*i[x],E*=C,S*=C,w.vx-=E*(F=u[x]),w.vy-=S*F,A.vx+=E*(F=1-F),A.vy+=S*F}function h(){if(o){var m,y=o.length,b=e.length,x=new Map(o.map((A,w)=>[t(A,w,o),A])),v;for(m=0,a=new Array(y);m<b;++m)v=e[m],v.index=m,typeof v.source!="object"&&(v.source=qw(x,v.source)),typeof v.target!="object"&&(v.target=qw(x,v.target)),a[v.source.index]=(a[v.source.index]||0)+1,a[v.target.index]=(a[v.target.index]||0)+1;for(m=0,u=new Array(b);m<b;++m)v=e[m],u[m]=a[v.source.index]/(a[v.source.index]+a[v.target.index]);i=new Array(b),p(),s=new Array(b),g()}}function p(){if(o)for(var m=0,y=e.length;m<y;++m)i[m]=+n(e[m],m,e)}function g(){if(o)for(var m=0,y=e.length;m<y;++m)s[m]=+r(e[m],m,e)}return d.initialize=function(m,y){o=m,l=y,h()},d.links=function(m){return arguments.length?(e=m,h(),d):e},d.id=function(m){return arguments.length?(t=m,d):t},d.iterations=function(m){return arguments.length?(c=+m,d):c},d.strength=function(m){return arguments.length?(n=typeof m=="function"?m:Qt(+m),p(),d):n},d.distance=function(m){return arguments.length?(r=typeof m=="function"?m:Qt(+m),g(),d):r},d}const Wj=1664525,Gj=1013904223,Ww=4294967296;function Hj(){let e=1;return()=>(e=(Wj*e+Gj)%Ww)/Ww}function Vj(e){return e.x}function Xj(e){return e.y}var Yj=10,Kj=Math.PI*(3-Math.sqrt(5));function Jj(e){var t,n=1,i=.001,r=1-Math.pow(i,1/300),s=0,o=.6,a=new Map,u=k8(f),l=D8("tick","end"),c=Hj();e==null&&(e=[]);function f(){d(),l.call("tick",t),n<i&&(u.stop(),l.call("end",t))}function d(g){var m,y=e.length,b;g===void 0&&(g=1);for(var x=0;x<g;++x)for(n+=(s-n)*r,a.forEach(function(v){v(n)}),m=0;m<y;++m)b=e[m],b.fx==null?b.x+=b.vx*=o:(b.x=b.fx,b.vx=0),b.fy==null?b.y+=b.vy*=o:(b.y=b.fy,b.vy=0);return t}function h(){for(var g=0,m=e.length,y;g<m;++g){if(y=e[g],y.index=g,y.fx!=null&&(y.x=y.fx),y.fy!=null&&(y.y=y.fy),isNaN(y.x)||isNaN(y.y)){var b=Yj*Math.sqrt(.5+g),x=g*Kj;y.x=b*Math.cos(x),y.y=b*Math.sin(x)}(isNaN(y.vx)||isNaN(y.vy))&&(y.vx=y.vy=0)}}function p(g){return g.initialize&&g.initialize(e,c),g}return h(),t={tick:d,restart:function(){return u.restart(f),t},stop:function(){return u.stop(),t},nodes:function(g){return arguments.length?(e=g,h(),a.forEach(p),t):e},alpha:function(g){return arguments.length?(n=+g,t):n},alphaMin:function(g){return arguments.length?(i=+g,t):i},alphaDecay:function(g){return arguments.length?(r=+g,t):+r},alphaTarget:function(g){return arguments.length?(s=+g,t):s},velocityDecay:function(g){return arguments.length?(o=1-g,t):1-o},randomSource:function(g){return arguments.length?(c=g,a.forEach(p),t):c},force:function(g,m){return arguments.length>1?(m==null?a.delete(g):a.set(g,p(m)),t):a.get(g)},find:function(g,m,y){var b=0,x=e.length,v,A,w,E,S;for(y==null?y=1/0:y*=y,b=0;b<x;++b)E=e[b],v=g-E.x,A=m-E.y,w=v*v+A*A,w<y&&(S=E,y=w);return S},on:function(g,m){return arguments.length>1?(l.on(g,m),t):l.on(g)}}}function Qj(){var e,t,n,i,r=Qt(-30),s,o=1,a=1/0,u=.81;function l(h){var p,g=e.length,m=gv(e,Vj,Xj).visitAfter(f);for(i=h,p=0;p<g;++p)t=e[p],m.visit(d)}function c(){if(e){var h,p=e.length,g;for(s=new Array(p),h=0;h<p;++h)g=e[h],s[g.index]=+r(g,h,e)}}function f(h){var p=0,g,m,y=0,b,x,v;if(h.length){for(b=x=v=0;v<4;++v)(g=h[v])&&(m=Math.abs(g.value))&&(p+=g.value,y+=m,b+=m*g.x,x+=m*g.y);h.x=b/y,h.y=x/y}else{g=h,g.x=g.data.x,g.y=g.data.y;do p+=s[g.data.index];while(g=g.next)}h.value=p}function d(h,p,g,m){if(!h.value)return!0;var y=h.x-t.x,b=h.y-t.y,x=m-p,v=y*y+b*b;
9if(x*x/u<v)return v<a&&(y===0&&(y=fs(n),v+=y*y),b===0&&(b=fs(n),v+=b*b),v<o&&(v=Math.sqrt(o*v)),t.vx+=y*h.value*i/v,t.vy+=b*h.value*i/v),!0;if(h.length||v>=a)return;(h.data!==t||h.next)&&(y===0&&(y=fs(n),v+=y*y),b===0&&(b=fs(n),v+=b*b),v<o&&(v=Math.sqrt(o*v)));do h.data!==t&&(x=s[h.data.index]*i/v,t.vx+=y*x,t.vy+=b*x);while(h=h.next)}return l.initialize=function(h,p){e=h,n=p,c()},l.strength=function(h){return arguments.length?(r=typeof h=="function"?h:Qt(+h),c(),l):r},l.distanceMin=function(h){return arguments.length?(o=h*h,l):Math.sqrt(o)},l.distanceMax=function(h){return arguments.length?(a=h*h,l):Math.sqrt(a)},l.theta=function(h){return arguments.length?(u=h*h,l):Math.sqrt(u)},l}function Zj(e){var t=Qt(.1),n,i,r;typeof e!="function"&&(e=Qt(e==null?0:+e));function s(a){for(var u=0,l=n.length,c;u<l;++u)c=n[u],c.vx+=(r[u]-c.x)*i[u]*a}function o(){if(n){var a,u=n.length;for(i=new Array(u),r=new Array(u),a=0;a<u;++a)i[a]=isNaN(r[a]=+e(n[a],a,n))?0:+t(n[a],a,n)}}return s.initialize=function(a){n=a,o()},s.strength=function(a){return arguments.length?(t=typeof a=="function"?a:Qt(+a),o(),s):t},s.x=function(a){return arguments.length?(e=typeof a=="function"?a:Qt(+a),o(),s):e},s}function eq(e){var t=Qt(.1),n,i,r;typeof e!="function"&&(e=Qt(e==null?0:+e));function s(a){for(var u=0,l=n.length,c;u<l;++u)c=n[u],c.vy+=(r[u]-c.y)*i[u]*a}function o(){if(n){var a,u=n.length;for(i=new Array(u),r=new Array(u),a=0;a<u;++a)i[a]=isNaN(r[a]=+e(n[a],a,n))?0:+t(n[a],a,n)}}return s.initialize=function(a){n=a,o()},s.strength=function(a){return arguments.length?(t=typeof a=="function"?a:Qt(+a),o(),s):t},s.y=function(a){return arguments.length?(e=typeof a=="function"?a:Qt(+a),o(),s):e},s}const Gw={center:Aj,collide:Uj,nbody:Qj,link:qj,x:Zj,y:eq},ml="forces",k1=["alpha","alphaMin","alphaTarget","velocityDecay","forces"],tq=["static","iterations"],B5=["x","y","vx","vy"];function yv(e){O.call(this,null,e)}yv.Definition={type:"Force",metadata:{modifies:!0},params:[{name:"static",type:"boolean",default:!1},{name:"restart",type:"boolean",default:!1},{name:"iterations",type:"number",default:300},{name:"alpha",type:"number",default:1},{name:"alphaMin",type:"number",default:.001},{name:"alphaTarget",type:"number",default:0},{name:"velocityDecay",type:"number",default:.4},{name:"forces",type:"param",array:!0,params:[{key:{force:"center"},params:[{name:"x",type:"number",default:0},{name:"y",type:"number",default:0}]},{key:{force:"collide"},params:[{name:"radius",type:"number",expr:!0},{name:"strength",type:"number",default:.7},{name:"iterations",type:"number",default:1}]},{key:{force:"nbody"},params:[{name:"strength",type:"number",default:-30,expr:!0},{name:"theta",type:"number",default:.9},{name:"distanceMin",type:"number",default:1},{name:"distanceMax",type:"number"}]},{key:{force:"link"},params:[{name:"links",type:"data"},{name:"id",type:"field"},{name:"distance",type:"number",default:30,expr:!0},{name:"strength",type:"number",expr:!0},{name:"iterations",type:"number",default:1}]},{key:{force:"x"},params:[{name:"strength",type:"number",default:.1},{name:"x",type:"field"}]},{key:{force:"y"},params:[{name:"strength",type:"number",default:.1},{name:"y",type:"field"}]}]},{name:"as",type:"string",array:!0,modify:!1,default:B5}]};H(yv,O,{transform(e,t){var n=this.value,i=t.changed(t.ADD_REM),r=e.modified(k1),s=e.iterations||300;if(n?(i&&(t.modifies("index"),n.nodes(t.source)),(r||t.changed(t.MOD))&&z5(n,e,0,t)):(this.value=n=iq(t.source,e),n.on("tick",nq(t.dataflow,this)),e.static||(i=!0,n.tick()),t.modifies("index")),r||i||e.modified(tq)||t.changed()&&e.restart){if(n.alpha(Math.max(n.alpha(),e.alpha||1)).alphaDecay(1-Math.pow(n.alphaMin(),1/s)),e.static)for(n.stop();--s>=0;)n.tick();else if(n.stopped()&&n.restart(),!i)return t.StopPropagation}return this.finish(e,t)},finish(e,t){const n=t.dataflow;for(let a=this._argops,u=0,l=a.length,c;u<l;++u)if(c=a[u],!(c.name!==ml||c.op._argval.force!=="link")){for(var i=c.op._argops,r=0,s=i.length,o;r<s;++r)if(i[r].name==="links"&&(o=i[r].op.source)){n.pulse(o,n.changeset().reflow());break}}return t.reflow(e.modified()).modifies(B5)}});function nq(e,t){return()=>e.touch(t).run()}function iq(e,t){const n=Jj(e),i=n.stop,r=n.restart;let s=!1;return n.stopped=()=>s,n.restart=()=>(s=!1,r()),n.stop=()=>(s=!0,i()),z5(n,t,!0).on("end",()=>s=!0)}function z5(e,t,n,i){var r=K(t.forces),s,o,a,u;for(s=0,o=k1.length;s<o;++s)a=k1[s],a!==ml&&t.modified(a)&&e[a](t[a]);for(s=0,o=r.length;s<o;++s)u=ml+s,a=n||t.modified(ml,s)?sq(r[s]):i&&rq(r[s],i)?e.force(u):null,a&&e.force(u,a);for(o=e.numForces||0;s<o;++s)e.force(ml+s,null);return e.numForces=r.length,e}function rq(e,t){var n,i;for(n in e)if(de(i=e[n])&&t.modified(Lt(i)))return 1;return 0}function sq(e){var t,n;J(Gw,e.force)||T("Unrecognized force: "+e.force),t=Gw[e.force]();for(n in e)de(t[n])&&oq(t[n],e[n],e);return t}function oq(e,t,n){e(de(t)?i=>t(i,n):t)}const aq=Object.freeze(Object.defineProperty({__proto__:null,force:yv},Symbol.toStringTag,{value:"Module"}));function uq(e,t){return e.parent===t.parent?1:2}function lq(e){return e.reduce(cq,0)/e.length}function cq(e,t){return e+t.x}function fq(e){return 1+e.reduce(dq,0)}function dq(e,t){return Math.max(e,t.y)}function hq(e){for(var t;t=e.children;)e=t[0];return e}function pq(e){for(var t;t=e.children;)e=t[t.length-1];return e}function gq(){var e=uq,t=1,n=1,i=!1;function r(s){var o,a=0;s.eachAfter(function(d){var h=d.children;h?(d.x=lq(h),d.y=fq(h)):(d.x=o?a+=e(d,o):0,d.y=0,o=d)});var u=hq(s),l=pq(s),c=u.x-e(u,l)/2,f=l.x+e(l,u)/2;return s.eachAfter(i?function(d){d.x=(d.x-s.x)*t,d.y=(s.y-d.y)*n}:function(d){d.x=(d.x-c)/(f-c)*t,d.y=(1-(s.y?d.y/s.y:1))*n})}return r.separation=function(s){return arguments.length?(e=s,r):e},r.size=function(s){return arguments.length?(i=!1,t=+s[0],n=+s[1],r):i?null:[t,n]},r.nodeSize=function(s){return arguments.length?(i=!0,t=+s[0],n=+s[1],r):i?[t,n]:null},r}function mq(e){var t=0,n=e.children,i=n&&n.length;if(!i)t=1;else for(;--i>=0;)t+=n[i].value;e.value=t}function yq(){return this.eachAfter(mq)}function bq(e,t){let n=-1;for(const i of this)e.call(t,i,++n,this);return this}function xq(e,t){for(var n=this,i=[n],r,s,o=-1;n=i.pop();)if(e.call(t,n,++o,this),r=n.children)for(s=r.length-1;s>=0;--s)i.push(r[s]);return this}function vq(e,t){for(var n=this,i=[n],r=[],s,o,a,u=-1;n=i.pop();)if(r.push(n),s=n.children)for(o=0,a=s.length;o<a;++o)i.push(s[o]);for(;n=r.pop();)e.call(t,n,++u,this);return this}function Eq(e,t){let n=-1;for(const i of this)if(e.call(t,i,++n,this))return i}function Aq(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,i=t.children,r=i&&i.length;--r>=0;)n+=i[r].value;t.value=n})}function wq(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function Sq(e){for(var t=this,n=Cq(t,e),i=[t];t!==n;)t=t.parent,i.push(t);for(var r=i.length;e!==n;)i.splice(r,0,e),e=e.parent;return i}function Cq(e,t){if(e===t)return e;var n=e.ancestors(),i=t.ancestors(),r=null;for(e=n.pop(),t=i.pop();e===t;)r=e,e=n.pop(),t=i.pop();return r}function $q(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function Fq(){return Array.from(this)}function _q(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function kq(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*Dq(){var e=this,t,n=[e],i,r,s;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,i=e.children)for(r=0,s=i.length;r<s;++r)n.push(i[r]);while(n.length)}function bv(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=Tq)):t===void 0&&(t=Oq);for(var n=new Va(e),i,r=[n],s,o,a,u;i=r.pop();)if((o=t(i.data))&&(u=(o=Array.from(o)).length))for(i.children=o,a=u-1;a>=0;--a)r.push(s=o[a]=new Va(o[a])),s.parent=i,s.depth=i.depth+1;return n.eachBefore(U5)}function Rq(){return bv(this).eachBefore(Mq)}function Oq(e){return e.children}function Tq(e){return Array.isArray(e)?e[1]:null}function Mq(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function U5(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Va(e){this.data=e,this.depth=this.height=0,this.parent=null}Va.prototype=bv.prototype={constructor:Va,count:yq,each:bq,eachAfter:vq,eachBefore:xq,find:Eq,sum:Aq,sort:wq,path:Sq,ancestors:$q,descendants:Fq,leaves:_q,links:kq,copy:Rq,[Symbol.iterator]:Dq};function ud(e){return e==null?null:j5(e)}function j5(e){if(typeof e!="function")throw new Error;return e}function oo(){return 0}function ga(e){return function(){return e}}const Nq=1664525,Lq=1013904223,Hw=4294967296;function Pq(){let e=1;return()=>(e=(Nq*e+Lq)%Hw)/Hw}function Iq(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Bq(e,t){let n=e.length,i,r;for(;n;)r=t()*n--|0,i=e[n],e[n]=e[r],e[r]=i;return e}function zq(e,t){for(var n=0,i=(e=Bq(Array.from(e),t)).length,r=[],s,o;n<i;)s=e[n],o&&q5(o,s)?++n:(o=jq(r=Uq(r,s)),n=0);return o}function Uq(e,t){var n,i;if(g0(t,e))return[t];for(n=0;n<e.length;++n)if(Ff(t,e[n])&&g0(yl(e[n],t),e))return[e[n],t];for(n=0;n<e.length-1;++n)for(i=n+1;i<e.length;++i)if(Ff(yl(e[n],e[i]),t)&&Ff(yl(e[n],t),e[i])&&Ff(yl(e[i],t),e[n])&&g0(W5(e[n],e[i],t),e))return[e[n],e[i],t];throw new Error}function Ff(e,t){var n=e.r-t.r,i=t.x-e.x,r=t.y-e.y;return n<0||n*n<i*i+r*r}function q5(e,t){var n=e.r-t.r+Math.max(e.r,t.r,1)*1e-9,i=t.x-e.x,r=t.y-e.y;return n>0&&n*n>i*i+r*r}function g0(e,t){for(var n=0;n<t.length;++n)if(!q5(e,t[n]))return!1;return!0}function jq(e){switch(e.length){case 1:return qq(e[0]);case 2:return yl(e[0],e[1]);case 3:return W5(e[0],e[1],e[2])}}function qq(e){return{x:e.x,y:e.y,r:e.r}}function yl(e,t){var n=e.x,i=e.y,r=e.r,s=t.x,o=t.y,a=t.r,u=s-n,l=o-i,c=a-r,f=M
vendor: 4,177 bytes, line 9
9ath.sqrt(u*u+l*l);return{x:(n+s+u/f*c)/2,y:(i+o+l/f*c)/2,r:(f+r+a)/2}}function W5(e,t,n){var i=e.x,r=e.y,s=e.r,o=t.x,a=t.y,u=t.r,l=n.x,c=n.y,f=n.r,d=i-o,h=i-l,p=r-a,g=r-c,m=u-s,y=f-s,b=i*i+r*r-s*s,x=b-o*o-a*a+u*u,v=b-l*l-c*c+f*f,A=h*p-d*g,w=(p*v-g*x)/(A*2)-i,E=(g*m-p*y)/A,S=(h*x-d*v)/(A*2)-r,C=(d*y-h*m)/A,F=E*E+C*C-1,k=2*(s+w*E+S*C),L=w*w+S*S-s*s,R=-(Math.abs(F)>1e-6?(k+Math.sqrt(k*k-4*F*L))/(2*F):L/k);return{x:i+w+E*R,y:r+S+C*R,r:R}}function Vw(e,t,n){var i=e.x-t.x,r,s,o=e.y-t.y,a,u,l=i*i+o*o;l?(s=t.r+n.r,s*=s,u=e.r+n.r,u*=u,s>u?(r=(l+u-s)/(2*l),a=Math.sqrt(Math.max(0,u/l-r*r)),n.x=e.x-r*i-a*o,n.y=e.y-r*o+a*i):(r=(l+s-u)/(2*l),a=Math.sqrt(Math.max(0,s/l-r*r)),n.x=t.x+r*i-a*o,n.y=t.y+r*o+a*i)):(n.x=t.x+n.r,n.y=t.y)}function Xw(e,t){var n=e.r+t.r-1e-6,i=t.x-e.x,r=t.y-e.y;return n>0&&n*n>i*i+r*r}function Yw(e){var t=e._,n=e.next._,i=t.r+n.r,r=(t.x*n.r+n.x*t.r)/i,s=(t.y*n.r+n.y*t.r)/i;return r*r+s*s}function _f(e){this._=e,this.next=null,this.previous=null}function Wq(e,t){if(!(s=(e=Iq(e)).length))return 0;var n,i,r,s,o,a,u,l,c,f,d;if(n=e[0],n.x=0,n.y=0,!(s>1))return n.r;if(i=e[1],n.x=-i.r,i.x=n.r,i.y=0,!(s>2))return n.r+i.r;Vw(i,n,r=e[2]),n=new _f(n),i=new _f(i),r=new _f(r),n.next=r.previous=i,i.next=n.previous=r,r.next=i.previous=n;e:for(u=3;u<s;++u){Vw(n._,i._,r=e[u]),r=new _f(r),l=i.next,c=n.previous,f=i._.r,d=n._.r;do if(f<=d){if(Xw(l._,r._)){i=l,n.next=i,i.previous=n,--u;continue e}f+=l._.r,l=l.next}else{if(Xw(c._,r._)){n=c,n.next=i,i.previous=n,--u;continue e}d+=c._.r,c=c.previous}while(l!==c.next);for(r.previous=n,r.next=i,n.next=i.previous=i=r,o=Yw(n);(r=r.next)!==i;)(a=Yw(r))<o&&(n=r,o=a);i=n.next}for(n=[i._],r=i;(r=r.next)!==i;)n.push(r._);for(r=zq(n,t),u=0;u<s;++u)n=e[u],n.x-=r.x,n.y-=r.y;return r.r}function Gq(e){return Math.sqrt(e.value)}function Hq(){var e=null,t=1,n=1,i=oo;function r(s){const o=Pq();return s.x=t/2,s.y=n/2,e?s.eachBefore(Kw(e)).eachAfter(m0(i,.5,o)).eachBefore(Jw(1)):s.eachBefore(Kw(Gq)).eachAfter(m0(oo,1,o)).eachAfter(m0(i,s.r/Math.min(t,n),o)).eachBefore(Jw(Math.min(t,n)/(2*s.r))),s}return r.radius=function(s){return arguments.length?(e=ud(s),r):e},r.size=function(s){return arguments.length?(t=+s[0],n=+s[1],r):[t,n]},r.padding=function(s){return arguments.length?(i=typeof s=="function"?s:ga(+s),r):i},r}function Kw(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function m0(e,t,n){return function(i){if(r=i.children){var r,s,o=r.length,a=e(i)*t||0,u;if(a)for(s=0;s<o;++s)r[s].r+=a;if(u=Wq(r,n),a)for(s=0;s<o;++s)r[s].r-=a;i.r=u+a}}}function Jw(e){return function(t){var n=t.parent;t.r*=e,n&&(t.x=n.x+e*t.x,t.y=n.y+e*t.y)}}function G5(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Mc(e,t,n,i,r){for(var s=e.children,o,a=-1,u=s.length,l=e.value&&(i-t)/e.value;++a<u;)o=s[a],o.y0=n,o.y1=r,o.x0=t,o.x1=t+=o.value*l}function Vq(){var e=1,t=1,n=0,i=!1;function r(o){var a=o.height+1;return o.x0=o.y0=n,o.x1=e,o.y1=t/a,o.eachBefore(s(t,a)),i&&o.eachBefore(G5),o}function s(o,a){return function(u){u.children&&Mc(u,u.x0,o*(u.depth+1)/a,u.x1,o*(u.depth+2)/a);var l=u.x0,c=u.y0,f=u.x1-n,d=u.y1-n;f<l&&(l=f=(l+f)/2),d<c&&(c=d=(c+d)/2),u.x0=l,u.y0=c,u.x1=f,u.y1=d}}return r.round=function(o){return arguments.length?(i=!!o,r):i},r.size=function(o){return arguments.length?(e=+o[0],t=+o[1],r):[e,t]},r.padding=function(o){return arguments.length?(n=+o,r):n},r}var Xq={depth:-1},Qw={},y0={};function Yq(e){return e.id}function Kq(e){return e.parentId}function Zw(){var e=Yq,t=Kq,n;function i(r){var s=Array.from(r),o=e,a=t,u,l,c,f,d,h,p,g,m=new Map;if(n!=null){const y=s.map((v,A)=>Jq(n(v,A,r))),b=y.map(eS),x=new Set(y).add("");for(const v of b)x.has(v)||(x.add(v),y.push(v),b.push(eS(v)),s.push(y0));o=(v,A)=>y[A],a=(v,A)=>b[A]}for(c=0,u=s.length;c<u;++c)l=s[c],h=s[c]=new Va(l),(p=o(l,c,r))!=null&&(p+="")&&(g=h.id=p,m.set(g,m.has(g)?Qw:h)),(p=a(l,c,r))!=null&&(p+="")&&(h.parent=p);for(c=0;c<u;++c)if(h=s[c],p=h.parent){if(d=m.get(p),!d)throw new Error("missing: "+p);if(d===Qw)throw new Error("ambiguous: "+p);d.children?d.children.push(h):d.children=[h],h.parent=d}else{if(f)throw new Error("multiple roots");f=h}if(!f)throw new Error("no root");
9if(n!=null){for(;f.data===y0&&f.children.length===1;)f=f.children[0],--u;for(let y=s.length-1;y>=0&&(h=s[y],h.data===y0);--y)h.data=null}if(f.parent=Xq,f.eachBefore(function(y){y.depth=y.parent.depth+1,--u}).eachBefore(U5),f.parent=null,u>0)throw new Error("cycle");return f}return i.id=function(r){return arguments.length?(e=ud(r),i):e},i.parentId=function(r){return arguments.length?(t=ud(r),i):t},i.path=function(r){return arguments.length?(n=ud(r),i):n},i}function Jq(e){e=`${e}`;let t=e.length;return D1(e,t-1)&&!D1(e,t-2)&&(e=e.slice(0,-1)),e[0]==="/"?e:`/${e}`}function eS(e){let t=e.length;if(t<2)return"";for(;--t>1&&!D1(e,t););return e.slice(0,t)}function D1(e,t){if(e[t]==="/"){let n=0;for(;t>0&&e[--t]==="\\";)++n;if(!(n&1))return!0}return!1}function Qq(e,t){return e.parent===t.parent?1:2}function b0(e){var t=e.children;return t?t[0]:e.t}function x0(e){var t=e.children;return t?t[t.length-1]:e.t}function Zq(e,t,n){var i=n/(t.i-e.i);t.c-=i,t.s+=n,e.c+=i,t.z+=n,t.m+=n}function eW(e){for(var t=0,n=0,i=e.children,r=i.length,s;--r>=0;)s=i[r],s.z+=t,s.m+=t,t+=s.s+(n+=s.c)}function tW(e,t,n){return e.a.parent===t.parent?e.a:n}function ld(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}ld.prototype=Object.create(Va.prototype);function nW(e){for(var t=new ld(e,0),n,i=[t],r,s,o,a;n=i.pop();)if(s=n._.children)for(n.children=new Array(a=s.length),o=a-1;o>=0;--o)i.push(r=n.children[o]=new ld(s[o],o)),r.parent=n;return(t.parent=new ld(null,0)).children=[t],t}function iW(){var e=Qq,t=1,n=1,i=null;function r(l){var c=nW(l);if(c.eachAfter(s),c.parent.m=-c.z,c.eachBefore(o),i)l.eachBefore(u);else{var f=l,d=l,h=l;l.eachBefore(function(b){b.x<f.x&&(f=b),b.x>d.x&&(d=b),b.depth>h.depth&&(h=b)});var p=f===d?1:e(f,d)/2,g=p-f.x,m=t/(d.x+p+g),y=n/(h.depth||1);l.eachBefore(function(b){b.x=(b.x+g)*m,b.y=b.depth*y})}return l}function s(l){var c=l.children,f=l.parent.children,d=l.i?f[l.i-1]:null;if(c){eW(l);var h=(c[0].z+c[c.length-1].z)/2;d?(l.z=d.z+e(l._,d._),l.m=l.z-h):l.z=h}else d&&(l.z=d.z+e(l._,d._));l.parent.A=a(l,d,l.parent.A||f[0])}function o(l){l._.x=l.z+l.parent.m,l.m+=l.parent.m}function a(l,c,f){if(c){for(var d=l,h=l,p=c,g=d.parent.children[0],m=d.m,y=h.m,b=p.m,x=g.m,v;p=x0(p),d=b0(d),p&&d;)g=b0(g),h=x0(h),h.a=l,v=p.z+b-d.z-m+e(p._,d._),v>0&&(Zq(tW(p,l,f),l,v),m+=v,y+=v),b+=p.m,m+=d.m,x+=g.m,y+=h.m;p&&!x0(h)&&(h.t=p,h.m+=b-y),d&&!b0(g)&&(g.t=d,g.m+=m-x,f=l)}return f}function u(l){l.x*=t,l.y=l.depth*n}return r.separation=function(l){return arguments.length?(e=l,r):e},r.size=function(l){return arguments.length?(i=!1,t=+l[0],n=+l[1],r):i?null:[t,n]},r.nodeSize=function(l){return arguments.length?(i=!0,t=+l[0],n=+l[1],r):i?[t,n]:null},r}function kp(e,t,n,i,r){for(var s=e.children,o,a=-1,u=s.length,l=e.value&&(r-n)/e.value;++a<u;)o=s[a],o.x0=t,o.x1=i,o.y0=n,o.y1=n+=o.value*l}var H5=(1+Math.sqrt(5))/2;function V5(e,t,n,i,r,s){for(var o=[],a=t.children,u,l,c=0,f=0,d=a.length,h,p,g=t.value,m,y,b,x,v,A,w;c<d;){h=r-n,p=s-i;do m=a[f++].value;while(!m&&f<d);for(y=b=m,A=Math.max(p/h,h/p)/(g*e),w=m*m*A,v=Math.max(b/w,w/y);f<d;++f){if(m+=l=a[f].value,l<y&&(y=l),l>b&&(b=l),w=m*m*A,x=Math.max(b/w,w/y),x>v){m-=l;break}v=x}o.push(u={value:m,dice:h<p,children:a.slice(c,f)}),u.dice?Mc(u,n,i,r,g?i+=p*m/g:s):kp(u,n,i,g?n+=h*m/g:r,s),g-=m,c=f}return o}const X5=function e(t){function n(i,r,s,o,a){V5(t,i,r,s,o,a)}return n.ratio=function(i){return e((i=+i)>1?i:1)},n}(H5);function rW(){var e=X5,t=!1,n=1,i=1,r=[0],s=oo,o=oo,a=oo,u=oo,l=oo;function c(d){return d.x0=d.y0=0,d.x1=n,d.y1=i,d.eachBefore(f),r=[0],t&&d.eachBefore(G5),d}function f(d){var h=r[d.depth],p=d.x0+h,g=d.y0+h,m=d.x1-h,y=d.y1-h;m<p&&(p=m=(p+m)/2),y<g&&(g=y=(g+y)/2),d.x0=p,d.y0=g,d.x1=m,d.y1=y,d.children&&(h=r[d.depth+1]=s(d)/2,p+=l(d)-h,g+=o(d)-h,m-=a(d)-h,y-=u(d)-h,m<p&&(p=m=(p+m)/2),y<g&&(g=y=(g+y)/2),e(d,p,g,m,y))}return c.round=function(d){return arguments.length?(t=!!d,c):t},c.size=function(d){return arguments.length?(n=+d[0],i=+d[1],c):[n,i]},c.tile=function(d){return arguments.length?(e=j5(d),c):e},c.padding=function(d){return arguments.length?c.paddingInner(d).paddingOuter(d):c.paddingInner()},c.paddingInner=function(d){return arguments.length?(s=typeof d=="function"?d:ga(+d),c):s},c.paddingOuter=function(d){return arguments.length?c.paddingTop(d).paddingRight(d).paddingBottom(d).paddingLeft(d):c.paddingTop()},c.paddingTop=function(d){return arguments.length?(o=typeof d=="function"?d:ga(+d),c):o},c.paddingRight=function(d){return arguments.length?(a=typeof d=="function"?d:ga(+d),c):a},c.paddingBottom=function(d){return arguments.length?(u=typeof d=="function"?d:ga(+d),c):u},c.paddingLeft=function(d){return arguments.length?(l=typeof d=="function"?d:ga(+d),c):l},c}function sW(e,t,n,i,r){var s=e.children,o,a=s.length,u,l=new Array(a+1);for(l[0]=u=o=0;o<a;++o)l[o+1]=u+=s[o].value;c(0,a,e.value,t,n,i,r);function c(f,d,h,p,g,m,y){if(f>=d-1){var b=s[f];b.x0=p,b.y0=g,b.x1=m,b.y1=y;return}for(var x=l[f],v=h/2+x,A=f+1,w=d-1;A<w;){var E=A+w>>>1;l[E]<v?A=E+1:w=E}v-l[A-1]<l[A]-v&&f+1<A&&--A;var S=l[A]-x,C=h-S;if(m-p>y-g){var F=h?(p*C+m*S)/h:m;c(f,A,S,p,g,F,y),c(A,d,C,F,g,m,y)}else{var k=h?(g*C+y*S)/h:y;c(f,A,S,p,g,m,k),c(A,d,C,p,k,m,y)}}}function oW(e,t,n,i,r){(e.depth&1?kp:Mc)(e,t,n,i,r)}const aW=function e(t){function n(i,r,s,o,a){if((u=i._squarify)&&u.ratio===t)for(var u,l,c,f,d=-1,h,p=u.length,g=i.value;++d<p;){for(l=u[d],c=l.children,f=l.value=0,h=c.length;f<h;++f)l.value+=c[f].value;l.dice?Mc(l,r,s,o,g?s+=(a-s)*l.value/g:a):kp(l,r,s,g?r+=(o-r)*l.value/g:o,a),g-=l.value}else i._squarify=u=V5(t,i,r,s,o,a),u.ratio=t}return n.ratio=function(i){return e((i=+i)>1?i:1)},n}(H5);function R1(e,t,n){const i={};return e.each(r=>{const s=r.data;n(s)&&(i[t(s)]=r)}),e.lookup=i,e}function xv(e){O.call(this,null,e)}xv.Definition={type:"Nest",metadata:{treesource:!0,changes:!0},params:[{name:"keys",type:"field",array:!0},{name:"generate",type:"boolean"}]};const uW=e=>e.values;
9H(xv,O,{transform(e,t){t.source||T("Nest transform requires an upstream data source.");var n=e.generate,i=e.modified(),r=t.clone(),s=this.value;return(!s||i||t.changed())&&(s&&s.each(o=>{o.children&&ep(o.data)&&r.rem.push(o.data)}),this.value=s=bv({values:K(e.keys).reduce((o,a)=>(o.key(a),o),lW()).entries(r.source)},uW),n&&s.each(o=>{o.children&&(o=$e(o.data),r.add.push(o),r.source.push(o))}),R1(s,ie,ie)),r.source.root=s,r}});function lW(){const e=[],t={entries:r=>i(n(r,0),0),key:r=>(e.push(r),t)};function n(r,s){if(s>=e.length)return r;const o=r.length,a=e[s++],u={},l={};let c=-1,f,d,h;for(;++c<o;)f=a(d=r[c])+"",(h=u[f])?h.push(d):u[f]=[d];for(f in u)l[f]=n(u[f],s);return l}function i(r,s){if(++s>e.length)return r;const o=[];for(const a in r)o.push({key:a,values:i(r[a],s)});return o}return t}function zr(e){O.call(this,null,e)}const cW=(e,t)=>e.parent===t.parent?1:2;H(zr,O,{transform(e,t){(!t.source||!t.source.root)&&T(this.constructor.name+" transform requires a backing tree data source.");const n=this.layout(e.method),i=this.fields,r=t.source.root,s=e.as||i;e.field?r.sum(e.field):r.count(),e.sort&&r.sort(Uo(e.sort,o=>o.data)),fW(n,this.params,e),n.separation&&n.separation(e.separation!==!1?cW:cu);try{this.value=n(r)}catch(o){T(o)}return r.each(o=>dW(o,i,s)),t.reflow(e.modified()).modifies(s).modifies("leaf")}});function fW(e,t,n){for(let i,r=0,s=t.length;r<s;++r)i=t[r],i in n&&e[i](n[i])}function dW(e,t,n){const i=e.data,r=t.length-1;for(let s=0;s<r;++s)i[n[s]]=e[t[s]];i[n[r]]=e.children?e.children.length:0}const O1=["x","y","r","depth","children"];function vv(e){zr.call(this,e)}vv.Definition={type:"Pack",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"padding",type:"number",default:0},{name:"radius",type:"field",default:null},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:O1.length,default:O1}]};H(vv,zr,{layout:Hq,params:["radius","size","padding"],fields:O1});const T1=["x0","y0","x1","y1","depth","children"];function Ev(e){zr.call(this,e)}Ev.Definition={type:"Partition",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"padding",type:"number",default:0},{name:"round",type:"boolean",default:!1},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:T1.length,default:T1}]};H(Ev,zr,{layout:Vq,params:["size","round","padding"],fields:T1});function Av(e){O.call(this,null,e)}Av.Definition={type:"Stratify",metadata:{treesource:!0},params:[{name:"key",type:"field",required:!0},{name:"parentKey",type:"field",required:!0}]};H(Av,O,{transform(e,t){t.source||T("Stratify transform requires an upstream data source.");let n=this.value;const i=e.modified(),r=t.fork(t.ALL).materialize(t.SOURCE),s=!n||i||t.changed(t.ADD_REM)||t.modified(e.key.fields)||t.modified(e.parentKey.fields);return r.source=r.source.slice(),s&&(n=r.source.length?R1(Zw().id(e.key).parentId(e.parentKey)(r.source),e.key,Xn):R1(Zw()([{}]),e.key,e.key)),r.source.root=this.value=n,r}});const tS={tidy:iW,cluster:gq},M1=["x","y","depth","children"];function wv(e){zr.call(this,e)}wv.Definition={type:"Tree",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"tidy",values:["tidy","cluster"]},{name:"size",type:"number",array:!0,length:2},{name:"nodeSize",type:"number",array:!0,length:2},{name:"separation",type:"boolean",default:!0},{name:"as",type:"string",array:!0,length:M1.length,default:M1}]};H(wv,zr,{layout(e){const t=e||"tidy";if(J(tS,t))return tS[t]();T("Unrecognized Tree layout method: "+t)},params:["size","nodeSize"],fields:M1});function Sv(e){O.call(this,[],e)}Sv.Definition={type:"TreeLinks",metadata:{tree:!0,generates:!0,changes:!0},params:[]};H(Sv,O,{transform(e,t){const n=this.value,i=t.source&&t.source.root,r=t.fork(t.NO_SOURCE),s={};return i||T("TreeLinks transform requires a tree data source."),t.changed(t.ADD_REM)?(r.rem=n,t.visit(t.SOURCE,o=>s[ie(o)]=1),i.each(o=>{const a=o.data,u=o.parent&&o.parent.data;u&&s[ie(a)]&&s[ie(u)]&&r.add.push($e({source:u,target:a}))}),this.value=r.add):t.changed(t.MOD)&&(t.visit(t.MOD,o=>
9s[ie(o)]=1),n.forEach(o=>{(s[ie(o.source)]||s[ie(o.target)])&&r.mod.push(o)})),r}});const nS={binary:sW,dice:Mc,slice:kp,slicedice:oW,squarify:X5,resquarify:aW},N1=["x0","y0","x1","y1","depth","children"];function Cv(e){zr.call(this,e)}Cv.Definition={type:"Treemap",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"squarify",values:["squarify","resquarify","binary","dice","slice","slicedice"]},{name:"padding",type:"number",default:0},{name:"paddingInner",type:"number",default:0},{name:"paddingOuter",type:"number",default:0},{name:"paddingTop",type:"number",default:0},{name:"paddingRight",type:"number",default:0},{name:"paddingBottom",type:"number",default:0},{name:"paddingLeft",type:"number",default:0},{name:"ratio",type:"number",default:1.618033988749895},{name:"round",type:"boolean",default:!1},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:N1.length,default:N1}]};H(Cv,zr,{layout(){const e=rW();return e.ratio=t=>{const n=e.tile();n.ratio&&e.tile(n.ratio(t))},e.method=t=>{J(nS,t)?e.tile(nS[t]):T("Unrecognized Treemap layout method: "+t)},e},params:["method","ratio","size","round","padding","paddingInner","paddingOuter","paddingTop","paddingRight","paddingBottom","paddingLeft"],fields:N1});const hW=Object.freeze(Object.defineProperty({__proto__:null,nest:xv,pack:vv,partition:Ev,stratify:Av,tree:wv,treelinks:Sv,treemap:Cv},Symbol.toStringTag,{value:"Module"})),v0=4278190080;function pW(e,t){const n=e.bitmap();return(t||[]).forEach(i=>n.set(e(i.boundary[0]),e(i.boundary[3]))),[n,void 0]}function gW(e,t,n,i,r){const s=e.width,o=e.height,a=i||r,u=ys(s,o).getContext("2d"),l=ys(s,o).getContext("2d"),c=a&&ys(s,o).getContext("2d");n.forEach(S=>cd(u,S,!1)),cd(l,t,!1),a&&cd(c,t,!0);const f=E0(u,s,o),d=E0(l,s,o),h=a&&E0(c,s,o),p=e.bitmap(),g=a&&e.bitmap();let m,y,b,x,v,A,w,E;for(y=0;y<o;++y)for(m=0;m<s;++m)v=y*s+m,A=f[v]&v0,E=d[v]&v0,w=a&&h[v]&v0,(A||w||E)&&(b=e(m),x=e(y),!r&&(A||E)&&p.set(b,x),a&&(A||w)&&g.set(b,x));return[p,g]}function E0(e,t,n){return new Uint32Array(e.getImageData(0,0,t,n).data.buffer)}function cd(e,t,n){if(!t.length)return;const i=t[0].mark.marktype;i==="group"?t.forEach(r=>{r.items.forEach(s=>cd(e,s.items,n))}):Ln[i].draw(e,{items:n?t.map(mW):t})}function mW(e){const t=tp(e,{});return t.stroke&&t.strokeOpacity!==0||t.fill&&t.fillOpacity!==0?{...t,strokeOpacity:1,stroke:"#000",fillOpacity:0}:t}const yr=5,Wt=31,Kl=32,ns=new Uint32Array(Kl+1),ui=new Uint32Array(Kl+1);ui[0]=0;ns[0]=~ui[0];for(let e=1;e<=Kl;++e)ui[e]=ui[e-1]<<1|1,ns[e]=~ui[e];function yW(e,t){const n=new Uint32Array(~~((e*t+Kl)/Kl));function i(s,o){n[s]|=o}function r(s,o){n[s]&=o}return{array:n,get:(s,o)=>{const a=o*e+s;return n[a>>>yr]&1<<(a&Wt)},set:(s,o)=>{const a=o*e+s;i(a>>>yr,1<<(a&Wt))},clear:(s,o)=>{const a=o*e+s;r(a>>>yr,~(1<<(a&Wt)))},getRange:(s,o,a,u)=>{let l=u,c,f,d,h;for(;l>=o;--l)if(c=l*e+s,f=l*e+a,d=c>>>yr,h=f>>>yr,d===h){if(n[d]&ns[c&Wt]&ui[(f&Wt)+1])return!0}else{if(n[d]&ns[c&Wt]||n[h]&ui[(f&Wt)+1])return!0;for(let p=d+1;p<h;++p)if(n[p])return!0}return!1},setRange:(s,o,a,u)=>{let l,c,f,d,h;for(;o<=u;++o)if(l=o*e+s,c=o*e+a,f=l>>>yr,d=c>>>yr,f===d)i(f,ns[l&Wt]&ui[(c&Wt)+1]);else for(i(f,ns[l&Wt]),i(d,ui[(c&Wt)+1]),h=f+1;h<d;++h)i(h,4294967295)},clearRange:(s,o,a,u)=>{let l,c,f,d,h;for(;o<=u;++o)if(l=o*e+s,c=o*e+a,f=l>>>yr,d=c>>>yr,f===d)r(f,ui[l&Wt]|ns[(c&Wt)+1]);else for(r(f,ui[l&Wt]),r(d,ns[(c&Wt)+1]),h=f+1;h<d;++h)r(h,0)},outOfBounds:(s,o,a,u)=>s<0||o<0||u>=t||a>=e}}function bW(e,t,n){const i=Math.max(1,Math.sqrt(e*t/1e6)),r=~~((e+2*n+i)/i),s=~~((t+2*n+i)/i),o=a=>~~((a+n)/i);return o.invert=a=>a*i-n,o.bitmap=()=>yW(r,s),o.ratio=i,o.padding=n,o.width=e,o.height=t,o}function xW(e,t,n,i){const r=e.width,s=e.height;return function(o){const a=o.datum.datum.items[i].items,u=a.length,l=o.datum.fontSize,c=Rn.width(o.datum,o.datum.text);let f=0,d,h,p,g,m,y,b;for(let x=0;x<u;++x)d=a[x].x,p=a[x].y,h=a[x].x2===void 0?d:a[x].x2,g=a[x].y2===void 0?p:a[x].y2,m=(d+h)/2,y=(p+g)/2,b=Math.abs(h-d+g-p),b>=f&&(f=b,o.x=m,o.y=y);return m=c/2,y=l/2,d=o.x-m,h=o.x+m,p=o.y-y,g=o.y+y,o.align="center",d<0&&h<=r?o.align="left":0<=d&&r<h&&(o.align="right"),o.baseline="middle",p<0&&g<=s?o.baseline="top":0<=p&&s<g&&(o.baseline="bottom"),!0}}function bh(e,t,n,i,r,s){let o=n/2;return e-o<0||e+o>r||t-(o=i/2)<0||t+o>s}function ds(e,t,n,i,r,s,o,a){const u=r*s/(i*2),l=e(t-u),c=e(t+u),f=e(n-(s=s/2)),d=e(n+s);return o.outOfBounds(l,f,c,d)||o.getRange(l,f,c,d)||a&&a.getRange(l,f,c,d)}
9function vW(e,t,n,i){const r=e.width,s=e.height,o=t[0],a=t[1];function u(l,c,f,d,h){const p=e.invert(l),g=e.invert(c);let m=f,y=s,b;if(!bh(p,g,d,h,r,s)&&!ds(e,p,g,h,d,m,o,a)&&!ds(e,p,g,h,d,h,o,null)){for(;y-m>=1;)b=(m+y)/2,ds(e,p,g,h,d,b,o,a)?y=b:m=b;if(m>f)return[p,g,m,!0]}}return function(l){const c=l.datum.datum.items[i].items,f=c.length,d=l.datum.fontSize,h=Rn.width(l.datum,l.datum.text);let p=n?d:0,g=!1,m=!1,y=0,b,x,v,A,w,E,S,C,F,k,L,R,_,$,D,P,z;for(let B=0;B<f;++B){for(b=c[B].x,v=c[B].y,x=c[B].x2===void 0?b:c[B].x2,A=c[B].y2===void 0?v:c[B].y2,b>x&&(z=b,b=x,x=z),v>A&&(z=v,v=A,A=z),F=e(b),L=e(x),k=~~((F+L)/2),R=e(v),$=e(A),_=~~((R+$)/2),S=k;S>=F;--S)for(C=_;C>=R;--C)P=u(S,C,p,h,d),P&&([l.x,l.y,p,g]=P);for(S=k;S<=L;++S)for(C=_;C<=$;++C)P=u(S,C,p,h,d),P&&([l.x,l.y,p,g]=P);!g&&!n&&(D=Math.abs(x-b+A-v),w=(b+x)/2,E=(v+A)/2,D>=y&&!bh(w,E,h,d,r,s)&&!ds(e,w,E,d,h,d,o,null)&&(y=D,l.x=w,l.y=E,m=!0))}return g||m?(w=h/2,E=d/2,o.setRange(e(l.x-w),e(l.y-E),e(l.x+w),e(l.y+E)),l.align="center",l.baseline="middle",!0):!1}}const EW=[-1,-1,1,1],AW=[-1,1,-1,1];function wW(e,t,n,i){const r=e.width,s=e.height,o=t[0],a=t[1],u=e.bitmap();return function(l){const c=l.datum.datum.items[i].items,f=c.length,d=l.datum.fontSize,h=Rn.width(l.datum,l.datum.text),p=[];let g=n?d:0,m=!1,y=!1,b=0,x,v,A,w,E,S,C,F,k,L,R,_;for(let $=0;$<f;++$){for(x=c[$].x,A=c[$].y,v=c[$].x2===void 0?x:c[$].x2,w=c[$].y2===void 0?A:c[$].y2,p.push([e((x+v)/2),e((A+w)/2)]);p.length;)if([C,F]=p.pop(),!(o.get(C,F)||a.get(C,F)||u.get(C,F))){u.set(C,F);for(let D=0;D<4;++D)E=C+EW[D],S=F+AW[D],u.outOfBounds(E,S,E,S)||p.push([E,S]);if(E=e.invert(C),S=e.invert(F),k=g,L=s,!bh(E,S,h,d,r,s)&&!ds(e,E,S,d,h,k,o,a)&&!ds(e,E,S,d,h,d,o,null)){for(;L-k>=1;)R=(k+L)/2,ds(e,E,S,d,h,R,o,a)?L=R:k=R;k>g&&(l.x=E,l.y=S,g=k,m=!0)}}!m&&!n&&(_=Math.abs(v-x+w-A),E=(x+v)/2,S=(A+w)/2,_>=b&&!bh(E,S,h,d,r,s)&&!ds(e,E,S,d,h,d,o,null)&&(b=_,l.x=E,l.y=S,y=!0))}return m||y?(E=h/2,S=d/2,o.setRange(e(l.x-E),e(l.y-S),e(l.x+E),e(l.y+S)),l.align="center",l.baseline="middle",!0):!1}}const SW=["right","center","left"],CW=["bottom","middle","top"];function $W(e,t,n,i){const r=e.width,s=e.height,o=t[0],a=t[1],u=i.length;return function(l){const c=l.boundary,f=l.datum.fontSize;if(c[2]<0||c[5]<0||c[0]>r||c[3]>s)return!1;let d=l.textWidth??0,h,p,g,m,y,b,x,v,A,w,E,S,C,F,k;for(let L=0;L<u;++L){if(h=(n[L]&3)-1,p=(n[L]>>>2&3)-1,g=h===0&&p===0||i[L]<0,m=h&&p?Math.SQRT1_2:1,y=i[L]<0?-1:1,b=c[1+h]+i[L]*h*m,E=c[4+p]+y*f*p/2+i[L]*p*m,v=E-f/2,A=E+f/2,S=e(b),F=e(v),k=e(A),!d)if(iS(S,S,F,k,o,a,b,b,v,A,c,g))d=Rn.width(l.datum,l.datum.text);else continue;if(w=b+y*d*h/2,b=w-d/2,x=w+d/2,S=e(b),C=e(x),iS(S,C,F,k,o,a,b,x,v,A,c,g))return l.x=h?h*y<0?x:b:w,l.y=p?p*y<0?A:v:E,l.align=SW[h*y+1],l.baseline=CW[p*y+1],o.setRange(S,F,C,k),!0}return!1}}function iS(e,t,n,i,r,s,o,a,u,l,c,f){return!(r.outOfBounds(e,n,t,i)||(f&&s||r).getRange(e,n,t,i))}const A0=0,w0=4,S0=8,C0=0,$0=1,F0=2,FW={"top-left":A0+C0,top:A0+$0,"top-right":A0+F0,left:w0+C0,middle:w0+$0,right:w0+F0,"bottom-left":S0+C0,bottom:S0+$0,"bottom-right":S0+F0},_W={naive:xW,"reduced-search":vW,floodfill:wW};function kW(e,t,n,i,r,s,o,a,u,l,c){if(!e.length)return e;const f=Math.max(i.length,r.length),d=DW(i,f),h=RW(r,f),p=OW(e[0].datum),g=p==="group"&&e[0].datum.items[u].marktype,m=g==="area",y=TW(p,g,a,u),b=l===null||l===1/0,x=m&&c==="naive";let v=-1,A=-1;const w=e.map(F=>{const k=b?Rn.width(F,F.text):void 0;return v=Math.max(v,k),A=Math.max(A,F.fontSize),{datum:F,opacity:0,x:void 0,y:void 0,align:void 0,baseline:void 0,boundary:y(F),textWidth:k}});l=l===null||l===1/0?Math.max(v,A)+Math.max(...i):l;const E=bW(t[0],t[1],l);let S;if(!x){n&&w.sort((L,R)=>n(L.datum,R.datum));let F=!1;for(let L=0;L<h.length&&!F;++L)F=h[L]===5||d[L]<0;const k=(p&&o||m)&&e.map(L=>L.datum);S=s.length||k?gW(E,k||[],s,F,m):pW(E,o&&w)}const C=m?_W[c](E,S,o,u):$W(E,S,h,d);return w.forEach(F=>F.opacity=+C(F)),w}function DW(e,t){const n=new Float64Array(t),i=e.length;for(let r=0;r<i;++r)n[r]=e[r]||0;for(let r=i;r<t;++r)n[r]=n[i-1];return n}function RW(e,t){const n=new Int8Array(t),i=e.length;for(let r=0;r<i;++r)n[r]|=FW[e[r]];for(let r=i;r<t;++r)n[r]=n[i-1];return n}function OW(e){return e&&e.mark&&e.mark.marktype}function TW(e,t,n,i){const r=s=>[s.x,s.x,s.x,s.y,s.y,s.y];return e?e==="line"||e==="area"?s=>r(s.datum):t==="line"?s=>{const o=s.datum.items[i].items;return r(o.length?o[n==="start"?0:o.length-1]:{x:NaN,y:NaN})}:s=>{const o=s.datum.bounds;
9return[o.x1,(o.x1+o.x2)/2,o.x2,o.y1,(o.y1+o.y2)/2,o.y2]}:r}const L1=["x","y","opacity","align","baseline"],Y5=["top-left","left","bottom-left","top","bottom","top-right","right","bottom-right"];function $v(e){O.call(this,null,e)}$v.Definition={type:"Label",metadata:{modifies:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"sort",type:"compare"},{name:"anchor",type:"string",array:!0,default:Y5},{name:"offset",type:"number",array:!0,default:[1]},{name:"padding",type:"number",default:0,null:!0},{name:"lineAnchor",type:"string",values:["start","end"],default:"end"},{name:"markIndex",type:"number",default:0},{name:"avoidBaseMark",type:"boolean",default:!0},{name:"avoidMarks",type:"data",array:!0},{name:"method",type:"string",default:"naive"},{name:"as",type:"string",array:!0,length:L1.length,default:L1}]};H($v,O,{transform(e,t){function n(s){const o=e[s];return de(o)&&t.modified(o.fields)}const i=e.modified();if(!(i||t.changed(t.ADD_REM)||n("sort")))return;(!e.size||e.size.length!==2)&&T("Size parameter should be specified as a [width, height] array.");const r=e.as||L1;return kW(t.materialize(t.SOURCE).source||[],e.size,e.sort,K(e.offset==null?1:e.offset),K(e.anchor||Y5),e.avoidMarks||[],e.avoidBaseMark!==!1,e.lineAnchor||"end",e.markIndex||0,e.padding===void 0?0:e.padding,e.method||"naive").forEach(s=>{const o=s.datum;o[r[0]]=s.x,o[r[1]]=s.y,o[r[2]]=s.opacity,o[r[3]]=s.align,o[r[4]]=s.baseline}),t.reflow(i).modifies(r)}});const MW=Object.freeze(Object.defineProperty({__proto__:null,label:$v},Symbol.toStringTag,{value:"Module"}));function K5(e,t){var n=[],i=function(c){return c(a)},r,s,o,a,u,l;if(t==null)n.push(e);else for(r={},s=0,o=e.length;s<o;++s)a=e[s],u=t.map(i),l=r[u],l||(r[u]=l=[],l.dims=u,n.push(l)),l.push(a);return n}function Fv(e){O.call(this,null,e)}Fv.Definition={type:"Loess",metadata:{generates:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"bandwidth",type:"number",default:.3},{name:"as",type:"string",array:!0}]};H(Fv,O,{transform(e,t){const n=t.fork(t.NO_SOURCE|t.NO_FIELDS);if(!this.value||t.changed()||e.modified()){const i=t.materialize(t.SOURCE).source,r=K5(i,e.groupby),s=(e.groupby||[]).map(Ke),o=s.length,a=e.as||[Ke(e.x),Ke(e.y)],u=[];r.forEach(l=>{dk(l,e.x,e.y,e.bandwidth||.3).forEach(c=>{const f={};for(let d=0;d<o;++d)f[s[d]]=l.dims[d];f[a[0]]=c[0],f[a[1]]=c[1],u.push($e(f))})}),this.value&&(n.rem=this.value),this.value=n.add=n.source=u}return n}});const P1={constant:kb,linear:Db,log:uk,exp:lk,pow:ck,quad:Rb,poly:fk},NW=(e,t)=>e==="poly"?t:e==="quad"?2:1;function _v(e){O.call(this,null,e)}_v.Definition={type:"Regression",metadata:{generates:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"method",type:"string",default:"linear",values:Object.keys(P1)},{name:"order",type:"number",default:3},{name:"extent",type:"number",array:!0,length:2},{name:"params",type:"boolean",default:!1},{name:"as",type:"string",array:!0}]};H(_v,O,{transform(e,t){const n=t.fork(t.NO_SOURCE|t.NO_FIELDS);if(!this.value||t.changed()||e.modified()){const i=t.materialize(t.SOURCE).source,r=K5(i,e.groupby),s=(e.groupby||[]).map(Ke),o=e.method||"linear",a=e.order==null?3:e.order,u=NW(o,a),l=e.as||[Ke(e.x),Ke(e.y)],c=P1[o],f=[];let d=e.extent;J(P1,o)||T("Invalid regression method: "+o),d!=null&&o==="log"&&d[0]<=0&&(t.dataflow.warn("Ignoring extent with values <= 0 for log regression."),d=null),r.forEach(h=>{if(h.length<=u){t.dataflow.warn("Skipping regression with more parameters than data points.");return}const g=c(h,e.x,e.y,a);if(e.params){f.push($e({keys:h.dims,coef:g.coef,rSquared:g.rSquared}));return}const m=d||Yi(h,e.x),y=b=>{const x={};for(let v=0;v<s.length;++v)x[s[v]]=h.dims[v];x[l[0]]=b[0],x[l[1]]=b[1],f.push($e(x))};o==="linear"||o==="constant"?m.forEach(b=>
9y([b,g.predict(b)])):up(g.predict,m,25,200).forEach(y)}),this.value&&(n.rem=this.value),this.value=n.add=n.source=f}return n}});const LW=Object.freeze(Object.defineProperty({__proto__:null,loess:Fv,regression:_v},Symbol.toStringTag,{value:"Module"})),_r=11102230246251565e-32,_t=134217729,PW=(3+8*_r)*_r;function _0(e,t,n,i,r){let s,o,a,u,l=t[0],c=i[0],f=0,d=0;c>l==c>-l?(s=l,l=t[++f]):(s=c,c=i[++d]);let h=0;if(f<e&&d<n)for(c>l==c>-l?(o=l+s,a=s-(o-l),l=t[++f]):(o=c+s,a=s-(o-c),c=i[++d]),s=o,a!==0&&(r[h++]=a);f<e&&d<n;)c>l==c>-l?(o=s+l,u=o-s,a=s-(o-u)+(l-u),l=t[++f]):(o=s+c,u=o-s,a=s-(o-u)+(c-u),c=i[++d]),s=o,a!==0&&(r[h++]=a);for(;f<e;)o=s+l,u=o-s,a=s-(o-u)+(l-u),l=t[++f],s=o,a!==0&&(r[h++]=a);for(;d<n;)o=s+c,u=o-s,a=s-(o-u)+(c-u),c=i[++d],s=o,a!==0&&(r[h++]=a);return(s!==0||h===0)&&(r[h++]=s),h}function IW(e,t){let n=t[0];for(let i=1;i<e;i++)n+=t[i];return n}function Nc(e){return new Float64Array(e)}const BW=(3+16*_r)*_r,zW=(2+12*_r)*_r,UW=(9+64*_r)*_r*_r,la=Nc(4),rS=Nc(8),sS=Nc(12),oS=Nc(16),Gt=Nc(4);function jW(e,t,n,i,r,s,o){let a,u,l,c,f,d,h,p,g,m,y,b,x,v,A,w,E,S;const C=e-r,F=n-r,k=t-s,L=i-s;v=C*L,d=_t*C,h=d-(d-C),p=C-h,d=_t*L,g=d-(d-L),m=L-g,A=p*m-(v-h*g-p*g-h*m),w=k*F,d=_t*k,h=d-(d-k),p=k-h,d=_t*F,g=d-(d-F),m=F-g,E=p*m-(w-h*g-p*g-h*m),y=A-E,f=A-y,la[0]=A-(y+f)+(f-E),b=v+y,f=b-v,x=v-(b-f)+(y-f),y=x-w,f=x-y,la[1]=x-(y+f)+(f-w),S=b+y,f=S-b,la[2]=b-(S-f)+(y-f),la[3]=S;let R=IW(4,la),_=zW*o;if(R>=_||-R>=_||(f=e-C,a=e-(C+f)+(f-r),f=n-F,l=n-(F+f)+(f-r),f=t-k,u=t-(k+f)+(f-s),f=i-L,c=i-(L+f)+(f-s),a===0&&u===0&&l===0&&c===0)||(_=UW*o+PW*Math.abs(R),R+=C*c+L*a-(k*l+F*u),R>=_||-R>=_))return R;v=a*L,d=_t*a,h=d-(d-a),p=a-h,d=_t*L,g=d-(d-L),m=L-g,A=p*m-(v-h*g-p*g-h*m),w=u*F,d=_t*u,h=d-(d-u),p=u-h,d=_t*F,g=d-(d-F),m=F-g,E=p*m-(w-h*g-p*g-h*m),y=A-E,f=A-y,Gt[0]=A-(y+f)+(f-E),b=v+y,f=b-v,x=v-(b-f)+(y-f),y=x-w,f=x-y,Gt[1]=x-(y+f)+(f-w),S=b+y,f=S-b,Gt[2]=b-(S-f)+(y-f),Gt[3]=S;const $=_0(4,la,4,Gt,rS);v=C*c,d=_t*C,h=d-(d-C),p=C-h,d=_t*c,g=d-(d-c),m=c-g,A=p*m-(v-h*g-p*g-h*m),w=k*l,d=_t*k,h=d-(d-k),p=k-h,d=_t*l,g=d-(d-l),m=l-g,E=p*m-(w-h*g-p*g-h*m),y=A-E,f=A-y,Gt[0]=A-(y+f)+(f-E),b=v+y,f=b-v,x=v-(b-f)+(y-f),y=x-w,f=x-y,Gt[1]=x-(y+f)+(f-w),S=b+y,f=S-b,Gt[2]=b-(S-f)+(y-f),Gt[3]=S;const D=_0($,rS,4,Gt,sS);v=a*c,d=_t*a,h=d-(d-a),p=a-h,d=_t*c,g=d-(d-c),m=c-g,A=p*m-(v-h*g-p*g-h*m),w=u*l,d=_t*u,h=d-(d-u),p=u-h,d=_t*l,g=
9d-(d-l),m=l-g,E=p*m-(w-h*g-p*g-h*m),y=A-E,f=A-y,Gt[0]=A-(y+f)+(f-E),b=v+y,f=b-v,x=v-(b-f)+(y-f),y=x-w,f=x-y,Gt[1]=x-(y+f)+(f-w),S=b+y,f=S-b,Gt[2]=b-(S-f)+(y-f),Gt[3]=S;const P=_0(D,sS,4,Gt,oS);return oS[P-1]}function kf(e,t,n,i,r,s){const o=(t-s)*(n-r),a=(e-r)*(i-s),u=o-a,l=Math.abs(o+a);return Math.abs(u)>=BW*l?u:-jW(e,t,n,i,r,s,l)}const aS=Math.pow(2,-52),Df=new Uint32Array(512);class xh{static from(t,n=VW,i=XW){const r=t.length,s=new Float64Array(r*2);for(let o=0;o<r;o++){const a=t[o];s[2*o]=n(a),s[2*o+1]=i(a)}return new xh(s)}constructor(t){const n=t.length>>1;if(n>0&&typeof t[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=t;const i=Math.max(2*n-5,0);this._triangles=new Uint32Array(i*3),this._halfedges=new Int32Array(i*3),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.trianglesLen=0,this._cx=0,this._cy=0,this._hullStart=0,this.hull=this._triangles,this.triangles=this._triangles,this.halfedges=this._halfedges,this.update()}update(){const{coords:t,_hullPrev:n,_hullNext:i,_hullTri:r,_hullHash:s}=this,o=t.length>>1;let a=1/0,u=1/0,l=-1/0,c=-1/0;for(let C=0;C<o;C++){const F=t[2*C],k=t[2*C+1];F<a&&(a=F),k<u&&(u=k),F>l&&(l=F),k>c&&(c=k),this._ids[C]=C}const f=(a+l)/2,d=(u+c)/2;let h=0,p=0,g=0;for(let C=0,F=1/0;C<o;C++){const k=k0(f,d,t[2*C],t[2*C+1]);k<F&&(h=C,F=k)}const m=t[2*h],y=t[2*h+1];for(let C=0,F=1/0;C<o;C++){if(C===h)continue;const k=k0(m,y,t[2*C],t[2*C+1]);k<F&&k>0&&(p=C,F=k)}let b=t[2*p],x=t[2*p+1],v=1/0;for(let C=0;C<o;C++){if(C===h||C===p)continue;const F=GW(m,y,b,x,t[2*C],t[2*C+1]);F<v&&(g=C,v=F)}let A=t[2*g],w=t[2*g+1];if(v===1/0){for(let k=0;k<o;k++)this._dists[k]=t[2*k]-t[0]||t[2*k+1]-t[1];Sa(this._ids,this._dists,0,o-1);const C=new Uint32Array(o);let F=0;for(let k=0,L=-1/0;k<o;k++){const R=this._ids[k],_=this._dists[R];_>L&&(C[F++]=R,L=_)}this.hull=C.subarray(0,F),this.triangles=new Uint32Array(0),this.halfedges=new Int32Array(0);return}if(kf(m,y,b,x,A,w)<0){const C=p,F=b,k=x;p=g,b=A,x=w,g=C,A=F,w=k}const E=HW(m,y,b,x,A,w);this._cx=E.x,this._cy=E.y;for(let C=0;C<o;C++)this._dists[C]=k0(t[2*C],t[2*C+1],E.x,E.y);Sa(this._ids,this._dists,0,o-1),this._hullStart=h;let S=3;i[h]=n[g]=p,i[p]=n[h]=g,i[g]=n[p]=h,r[h]=0,r[p]=1,r[g]=2,s.fill(-1),s[this._hashKey(m,y)]=h,s[this._hashKey(b,x)]=p,s[this._hashKey(A,w)]=g,this.trianglesLen=0,this._addTriangle(h,p,g,-1,-1,-1);for(let C=0,F=0,k=0;C<this._ids.length;C++){const L=this._ids[C],R=t[2*L],_=t[2*L+1];if(C>0&&Math.abs(R-F)<=aS&&Math.abs(_-k)<=aS||(F=R,k=_,L===h||L===p||L===g))continue;let $=0;for(let Q=0,ue=this._hashKey(R,_);Q<this._hashSize&&($=s[(ue+Q)%this._hashSize],!($!==-1&&$!==i[$]));Q++);$=n[$];let D=$,P;for(;P=i[D],kf(R,_,t[2*D],t[2*D+1],t[2*P],t[2*P+1])>=0;)if(D=P,D===$){D=-1;break}if(D===-1)continue;let z=this._addTriangle(D,L,i[D],-1,-1,r[D]);r[L]=this._legalize(z+2),r[D]=z,S++;let B=i[D];for(;P=i[B],kf(R,_,t[2*B],t[2*B+1],t[2*P],t[2*P+1])<0;)z=this._addTriangle(B,L,P,r[L],-1,r[B]),r[L]=this._legalize(z+2),i[B]=B,S--,B=P;if(D===$)for(;P=n[D],kf(R,_,t[2*P],t[2*P+1],t[2*D],t[2*D+1])<0;)z=this._addTriangle(P,L,D,-1,r[D],r[P]),this._legalize(z+2),r[P]=z,i[D]=D,S--,D=P;this._hullStart=n[L]=D,i[D]=n[B]=L,i[L]=B,s[this._hashKey(R,_)]=L,s[this._hashKey(t[2*D],t[2*D+1])]=D}this.hull=new Uint32Array(S);for(let C=0,F=this._hullStart;C<S;C++)this.hull[C]=F,F=i[F];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(t,n){return Math.floor(qW(t-this._cx,n-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:n,_halfedges:i,coords:r}=this;let s=0,o=0;for(;;){const a=i[t],u=t-t%3;if(o=u+(t+2)%3,a===-1){if(s===0)break;t=Df[--s];continue}const l=a-a%3,c=u+(t+1)%3,f=l+(a+2)%3,d=n[o],h=n[t],p=n[c],g=n[f];if(WW(r[2*d],r[2*d+1],r[2*h],r[2*h+1],r[2*p],r[2*p+1],r[2*g],r[2*g+1])){n[t]=g,n[a]=d;const y=i[f];if(y===-1){let x=this._hullStart;do{if(this._hullTri[x]===f){this._hullTri[x]=t;break}x=this._hullPrev[x]}while(x!==this._hullStart)}this._link(t,y),this._link(a,i[o]),this._link(o,f);const b=l+(a+1)%3;s<Df.length&&(Df[s++]=b)}else{if(s===0)break;t=Df[--s]}}return o}_link(t,n){this._halfedges[t]=n,n!==-1&&(this._halfedges[n]=t)}_addTriangle(t,n,i,r,s,o){const a=this.trianglesLen;return this._triangles[a]=t,this._triangles[a+1]=n,this._triangles[a+2]=i,this._link(a,r),this._link(a+1,s),this._link(a+2,o),this.trianglesLen+=3,a}}function qW(e,t){const n=e/(Math.abs(e)+Math.abs(t));return(t>0?3-n:1+n)/4}function k0(e,t,n,i){const r=e-n,s=t-i;return r*r+s*s}function WW(e,t,n,i,r,s,o,a){const u=e-o,l=t-a,c=n-o,f=i-a,d=r-o,h=s-a,p=u*u+l*l,g=c*c+f*f,m=d*d+h*h;return u*(f*m-g*h)-l*(c*m-g*d)+p*(c*h-f*d)<0}function GW(e,t,n,i,r,s){const o=n-e,a=i-t,u=r-e,l=s-t,c=o*o+a*a,f=u*u+l*l,d=.5/(o*l-a*u),h=(l*c-a*f)*d,p=(o*f-u*c)*d;return h*h+p*p}function HW(e,t,n,i,r,s){const o=n-e,a=i-t,u=r-e,l=s-t,c=o*o+a*a,f=u*u+l*l,d=.5/(o*l-a*u),h=e+(l*c-a*f)*d,p=t+(o*f-u*c)*d;return{x:h,y:p}}function Sa(e,t,n,i){if(i-n<=20)for(let r=n+1;r<=i;r++){const s=e[r],o=t[s];let a=r-1;for(;a>=n&&t[e[a]]>o;)e[a+1]=e[a--];e[a+1]=s}else{const r=n+i>>1;let s=n+1,o=i;Wu(e,r,s),t[e[n]]>t[e[i]]&&Wu(e,n,i),t[e[s]]>t[e[i]]&&Wu(e,s,i),t[e[n]]>t[e[s]]&&Wu(e,n,s);const a=e[s],u=t[a];for(;;){do s++;while(t[e[s]]<u);do o--;while(t[e[o]]>u);
9if(o<s)break;Wu(e,s,o)}e[n+1]=e[o],e[o]=a,i-s+1>=o-n?(Sa(e,t,s,i),Sa(e,t,n,o-1)):(Sa(e,t,n,o-1),Sa(e,t,s,i))}}function Wu(e,t,n){const i=e[t];e[t]=e[n],e[n]=i}function VW(e){return e[0]}function XW(e){return e[1]}const uS=1e-6;class uo{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(t,n){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(t,n){this._+=`L${this._x1=+t},${this._y1=+n}`}arc(t,n,i){t=+t,n=+n,i=+i;const r=t+i,s=n;if(i<0)throw new Error("negative radius");this._x1===null?this._+=`M${r},${s}`:(Math.abs(this._x1-r)>uS||Math.abs(this._y1-s)>uS)&&(this._+="L"+r+","+s),i&&(this._+=`A${i},${i},0,1,1,${t-i},${n}A${i},${i},0,1,1,${this._x1=r},${this._y1=s}`)}rect(t,n,i,r){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${+i}v${+r}h${-i}Z`}value(){return this._||null}}class I1{constructor(){this._=[]}moveTo(t,n){this._.push([t,n])}closePath(){this._.push(this._[0].slice())}lineTo(t,n){this._.push([t,n])}value(){return this._.length?this._:null}}let YW=class{constructor(t,[n,i,r,s]=[0,0,960,500]){if(!((r=+r)>=(n=+n))||!((s=+s)>=(i=+i)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(t.points.length*2),this.vectors=new Float64Array(t.points.length*2),this.xmax=r,this.xmin=n,this.ymax=s,this.ymin=i,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:t,hull:n,triangles:i},vectors:r}=this;let s,o;const a=this.circumcenters=this._circumcenters.subarray(0,i.length/3*2);for(let g=0,m=0,y=i.length,b,x;g<y;g+=3,m+=2){const v=i[g]*2,A=i[g+1]*2,w=i[g+2]*2,E=t[v],S=t[v+1],C=t[A],F=t[A+1],k=t[w],L=t[w+1],R=C-E,_=F-S,$=k-E,D=L-S,P=(R*D-_*$)*2;if(Math.abs(P)<1e-9){if(s===void 0){s=o=0;for(const B of n)s+=t[B*2],o+=t[B*2+1];s/=n.length,o/=n.length}const z=1e9*Math.sign((s-E)*D-(o-S)*$);b=(E+k)/2-z*D,x=(S+L)/2+z*$}else{const z=1/P,B=R*R+_*_,Q=$*$+D*D;b=E+(D*B-_*Q)*z,x=S+(R*Q-$*B)*z}a[m]=b,a[m+1]=x}let u=n[n.length-1],l,c=u*4,f,d=t[2*u],h,p=t[2*u+1];r.fill(0);for(let g=0;g<n.length;++g)u=n[g],l=c,f=d,h=p,c=u*4,d=t[2*u],p=t[2*u+1],r[l+2]=r[c]=h-p,r[l+3]=r[c+1]=d-f}render(t){const n=t==null?t=new uo:void 0,{delaunay:{halfedges:i,inedges:r,hull:s},circumcenters:o,vectors:a}=this;if(s.length<=1)return null;for(let c=0,f=i.length;c<f;++c){const d=i[c];if(d<c)continue;const h=Math.floor(c/3)*2,p=Math.floor(d/3)*2,g=o[h],m=o[h+1],y=o[p],b=o[p+1];this._renderSegment(g,m,y,b,t)}let u,l=s[s.length-1];for(let c=0;c<s.length;++c){u=l,l=s[c];const f=Math.floor(r[l]/3)*2,d=o[f],h=o[f+1],p=u*4,g=this._project(d,h,a[p+2],a[p+3]);g&&this._renderSegment(d,h,g[0],g[1],t)}return n&&n.value()}renderBounds(t){const n=t==null?t=new uo:void 0;return t.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),n&&n.value()}renderCell(t,n){const i=n==null?n=new uo:void 0,r=this._clip(t);if(r===null||!r.length)return;n.moveTo(r[0],r[1]);let s=r.length;for(;r[0]===r[s-2]&&r[1]===r[s-1]&&s>1;)s-=2;for(let o=2;o<s;o+=2)(r[o]!==r[o-2]||r[o+1]!==r[o-1])&&n.lineTo(r[o],r[o+1]);return n.closePath(),i&&i.value()}*cellPolygons(){const{delaunay:{points:t}}=this;for(let n=0,i=t.length/2;n<i;++n){const r=this.cellPolygon(n);r&&(r.index=n,yield r)}}cellPolygon(t){const n=new I1;return this.renderCell(t,n),n.value()}_renderSegment(t,n,i,r,s){let o;const a=this._regioncode(t,n),u=this._regioncode(i,r);a===0&&u===0?(s.moveTo(t,n),s.lineTo(i,r)):(o=this._clipSegment(t,n,i,r,a,u))&&(s.moveTo(o[0],o[1]),s.lineTo(o[2],o[3]))}contains(t,n,i){return n=+n,n!==n||(i=+i,i!==i)?!1:this.delaunay._step(t,n,i)===t}*neighbors(t){const n=this._clip(t);if(n)for(const i of this.delaunay.neighbors(t)){const r=this._clip(i);if(r){e:for(let s=0,o=n.length;s<o;s+=2)for(let a=0,u=r.length;a<u;a+=2)if(n[s]===r[a]&&n[s+1]===r[a+1]&&n[(s+2)%o]===r[(a+u-2)%u]&&n[(s+3)%o]===r[(a+u-1)%u]){yield i;break e}}}}_cell(t){const{circumcenters:n,delaunay:{inedges:i,halfedges:r,triangles:s}}=this,o=i[t];if(o===-1)return null;const a=[];let u=o;do{const l=Math.floor(u/3);if(a.push(n[l*2],n[l*2+1]),u=u%3===2?u-2:u+1,s[u]!==t)break;u=r[u]}while(u!==o&&u!==-1);return a}_clip(t){if(t===0&&this.delaunay.hull.length===1)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const n=this._cell(t);if(n===null)return null;const{vectors:i}=this,r=t*4;return this._simplify(i[r]||i[r+1]?this._clipInfinite(t,n,i[r],i[r+1],i[r+2],i[r+3]):this._clipFinite(t,n))}_clipFinite(t,n){const i=n.length;let r=null,s,o,a=n[i-2],u=n[i-1],l,c=this._regioncode(a,u),f,d=0;for(let h=0;h<i;h+=2)if(s=a,o=u,a=n[h],u=n[h+1],l=c,c=this._regioncode(a,u),l===0&&c===0)f=d,d=0,r?r.push(a,u):r=[a,u];else{let p,g,m,y,b;if(l===0){if((p=this._clipSegment(s,o,a,u,l,c))===null)continue;[g,m,y,b]=p}else{if((p=this._clipSegment(a,u,s,o,c,l))===null)continue;[y,b,g,m]=p,f=d,d=this._edgecode(g,m),f&&d&&this._edge(t,f,d,r,r.length),r?r.push(g,m):r=[g,m]}f=d,d=this._edgecode(y,b),f&&d&&this._edge(t,f,d,r,r.length),r?r.push(y,b):r=[y,b]}if(r)f=d,d=this._edgecode(r[0],r[1]),f&&d&&this._edge(t,f,d,r,r.length);else if(this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return r}_clipSegment(t,n,i,r,s,o){const a=s<o;for(a&&([t,n,i,r,s,o]=[i,r,t,n,o,s]);;){if(s===0&&o===0)return a?[i,r,t,n]:[t,n,i,r];if(s&o)return null;let u,l,c=s||o;c&8?(u=t+(i-t)*(this.ymax-n)/(r-n),l=this.ymax):c&4?(u=t+(i-t)*(this.ymin-n)/(r-n),l=this.ymin):c&2?(l=n+(r-n)*(this.xmax-t)/(i-t),u=this.xmax):(l=n+(r-n)*(this.xmin-t)/(i-t),u=this.xmin),s?(t=u,n=l,s=this._regioncode(t,n)):(i=u,r=l,o=this._regioncode(i,r))}}_clipInfinite(t,n,i,r,s,o){let a=Array.from(n),u;if((u=this._project(a[0],a[1],i,r))&&a.unshift(u[0],u[1]),(u=this._project(a[a.length-2],a[a.length-1],s,o))&&a.push(u[0],u[1]),a=this._clipFinite(t,a))for(let l=0,c=a.length,f,d=this._edgecode(a[c-2],a[c-1]);l<c;
9l+=2)f=d,d=this._edgecode(a[l],a[l+1]),f&&d&&(l=this._edge(t,f,d,a,l),c=a.length);else this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(a=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return a}_edge(t,n,i,r,s){for(;n!==i;){let o,a;switch(n){case 5:n=4;continue;case 4:n=6,o=this.xmax,a=this.ymin;break;case 6:n=2;continue;case 2:n=10,o=this.xmax,a=this.ymax;break;case 10:n=8;continue;case 8:n=9,o=this.xmin,a=this.ymax;break;case 9:n=1;continue;case 1:n=5,o=this.xmin,a=this.ymin;break}(r[s]!==o||r[s+1]!==a)&&this.contains(t,o,a)&&(r.splice(s,0,o,a),s+=2)}return s}_project(t,n,i,r){let s=1/0,o,a,u;if(r<0){if(n<=this.ymin)return null;(o=(this.ymin-n)/r)<s&&(u=this.ymin,a=t+(s=o)*i)}else if(r>0){if(n>=this.ymax)return null;(o=(this.ymax-n)/r)<s&&(u=this.ymax,a=t+(s=o)*i)}if(i>0){if(t>=this.xmax)return null;(o=(this.xmax-t)/i)<s&&(a=this.xmax,u=n+(s=o)*r)}else if(i<0){if(t<=this.xmin)return null;(o=(this.xmin-t)/i)<s&&(a=this.xmin,u=n+(s=o)*r)}return[a,u]}_edgecode(t,n){return(t===this.xmin?1:t===this.xmax?2:0)|(n===this.ymin?4:n===this.ymax?8:0)}_regioncode(t,n){return(t<this.xmin?1:t>this.xmax?2:0)|(n<this.ymin?4:n>this.ymax?8:0)}_simplify(t){if(t&&t.length>4){for(let n=0;n<t.length;n+=2){const i=(n+2)%t.length,r=(n+4)%t.length;(t[n]===t[i]&&t[i]===t[r]||t[n+1]===t[i+1]&&t[i+1]===t[r+1])&&(t.splice(i,2),n-=2)}t.length||(t=null)}return t}};const KW=2*Math.PI,ca=Math.pow;function JW(e){return e[0]}function QW(e){return e[1]}function ZW(e){const{triangles:t,coords:n}=e;for(let i=0;i<t.length;i+=3){const r=2*t[i],s=2*t[i+1],o=2*t[i+2];if((n[o]-n[r])*(n[s+1]-n[r+1])-(n[s]-n[r])*(n[o+1]-n[r+1])>1e-10)return!1}return!0}function eG(e,t,n){return[e+Math.sin(e+t)*n,t+Math.cos(e-t)*n]}class kv{static from(t,n=JW,i=QW,r){return new kv("length"in t?tG(t,n,i,r):Float64Array.from(nG(t,n,i,r)))}constructor(t){this._delaunator=new xh(t),this.inedges=new Int32Array(t.length/2),this._hullIndex=new Int32Array(t.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const t=this._delaunator,n=this.points;if(t.hull&&t.hull.length>2&&ZW(t)){this.collinear=Int32Array.from({length:n.length/2},(d,h)=>h).sort((d,h)=>n[2*d]-n[2*h]||n[2*d+1]-n[2*h+1]);const u=this.collinear[0],l=this.collinear[this.collinear.length-1],c=[n[2*u],n[2*u+1],n[2*l],n[2*l+1]],f=1e-8*Math.hypot(c[3]-c[1],c[2]-c[0]);for(let d=0,h=n.length/2;d<h;++d){const p=eG(n[2*d],n[2*d+1],f);n[2*d]=p[0],n[2*d+1]=p[1]}this._delaunator=new xh(n)}else delete this.collinear;const i=this.halfedges=this._delaunator.halfedges,r=this.hull=this._delaunator.hull,s=this.triangles=this._delaunator.triangles,o=this.inedges.fill(-1),a=this._hullIndex.fill(-1);for(let u=0,l=i.length;u<l;++u){const c=s[u%3===2?u-2:u+1];(i[u]===-1||o[c]===-1)&&(o[c]=u)}for(let u=0,l=r.length;u<l;++u)a[r[u]]=u;r.length<=2&&r.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=r[0],o[r[0]]=1,r.length===2&&(o[r[1]]=0,this.triangles[1]=r[1],this.triangles[2]=r[1]))}voronoi(t){return new YW(this,t)}*neighbors(t){const{inedges:n,hull:i,_hullIndex:r,halfedges:s,triangles:o,collinear:a}=this;if(a){const f=a.indexOf(t);f>0&&(yield a[f-1]),f<a.length-1&&(yield a[f+1]);return}const u=n[t];if(u===-1)return;let l=u,c=-1;do{if(yield c=o[l],l=l%3===2?l-2:l+1,o[l]!==t)return;if(l=s[l],l===-1){const f=i[(r[t]+1)%i.length];f!==c&&(yield f);return}}while(l!==u)}find(t,n,i=0){if(t=+t,t!==t||(n=+n,n!==n))return-1;const r=i;let s;for(;(s=this._step(i,t,n))>=0&&s!==i&&s!==r;)i=s;return s}_step(t,n,i){const{inedges:r,hull:s,_hullIndex:o,halfedges:a,triangles:u,points:l}=this;if(r[t]===-1||!l.length)return(t+1)%(l.length>>1);let c=t,f=ca(n-l[t*2],2)+ca(i-l[t*2+1],2);const d=r[t];let h=d;do{let p=u[h];const g=ca(n-l[p*2],2)+ca(i-l[p*2+1],2);if(g<f&&(f=g,c=p),h=h%3===2?h-2:h+1,u[h]!==t)break;if(h=a[h],h===-1){if(h=s[(o[t]+1)%s.length],h!==p&&ca(n-l[h*2],2)+ca(i-l[h*2+1],2)<f)return h;break}}while(h!==d);return c}render(t){const n=t==null?t=new uo:void 0,{points:i,halfedges:r,triangles:s}=this;for(let o=0,a=r.length;o<a;++o){const u=r[o];if(u<o)continue;const l=s[o]*2,c=s[u]*2;t.moveTo(i[l],i[l+1]),t.lineTo(i[c],i[c+1])}
9return this.renderHull(t),n&&n.value()}renderPoints(t,n){n===void 0&&(!t||typeof t.moveTo!="function")&&(n=t,t=null),n=n==null?2:+n;const i=t==null?t=new uo:void 0,{points:r}=this;for(let s=0,o=r.length;s<o;s+=2){const a=r[s],u=r[s+1];t.moveTo(a+n,u),t.arc(a,u,n,0,KW)}return i&&i.value()}renderHull(t){const n=t==null?t=new uo:void 0,{hull:i,points:r}=this,s=i[0]*2,o=i.length;t.moveTo(r[s],r[s+1]);for(let a=1;a<o;++a){const u=2*i[a];t.lineTo(r[u],r[u+1])}return t.closePath(),n&&n.value()}hullPolygon(){const t=new I1;return this.renderHull(t),t.value()}renderTriangle(t,n){const i=n==null?n=new uo:void 0,{points:r,triangles:s}=this,o=s[t*=3]*2,a=s[t+1]*2,u=s[t+2]*2;return n.moveTo(r[o],r[o+1]),n.lineTo(r[a],r[a+1]),n.lineTo(r[u],r[u+1]),n.closePath(),i&&i.value()}*trianglePolygons(){const{triangles:t}=this;for(let n=0,i=t.length/3;n<i;++n)yield this.trianglePolygon(n)}trianglePolygon(t){const n=new I1;return this.renderTriangle(t,n),n.value()}}function tG(e,t,n,i){const r=e.length,s=new Float64Array(r*2);for(let o=0;o<r;++o){const a=e[o];s[o*2]=t.call(i,a,o,e),s[o*2+1]=n.call(i,a,o,e)}return s}function*nG(e,t,n,i){let r=0;for(const s of e)yield t.call(i,s,r,e),yield n.call(i,s,r,e),++r}function Dv(e){O.call(this,null,e)}Dv.Definition={type:"Voronoi",metadata:{modifies:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"size",type:"number",array:!0,length:2},{name:"extent",type:"array",array:!0,length:2,default:[[-1e5,-1e5],[1e5,1e5]],content:{type:"number",array:!0,length:2}},{name:"as",type:"string",default:"path"}]};const iG=[-1e5,-1e5,1e5,1e5];H(Dv,O,{transform(e,t){const n=e.as||"path",i=t.source;if(!i||!i.length)return t;let r=e.size;r=r?[0,0,r[0],r[1]]:(r=e.extent)?[r[0][0],r[0][1],r[1][0],r[1][1]]:iG;const s=this.value=kv.from(i,e.x,e.y).voronoi(r);for(let o=0,a=i.length;o<a;++o){const u=s.cellPolygon(o);i[o][n]=u&&!sG(u)?rG(u):null}return t.reflow(e.modified()).modifies(n)}});function rG(e){const t=e[0][0],n=e[0][1];let i=e.length-1;for(;e[i][0]===t&&e[i][1]===n;--i);return"M"+e.slice(0,i+1).join("L")+"Z"}function sG(e){return e.length===2&&e[0][0]===e[1][0]&&e[0][1]===e[1][1]}const oG=Object.freeze(Object.defineProperty({__proto__:null,voronoi:Dv},Symbol.toStringTag,{value:"Module"}));var D0=Math.PI/180,bl=64,fd=2048;function aG(){var e=[256,256],t,n,i,r,s,o,a,u=J5,l=[],c=Math.random,f={};f.layout=function(){for(var p=d(ys()),g=hG((e[0]>>5)*e[1]),m=null,y=l.length,b=-1,x=[],v=l.map(w=>({text:t(w),font:n(w),style:r(w),weight:s(w),rotate:o(w),size:~~(i(w)+1e-14),padding:a(w),xoff:0,yoff:0,x1:0,y1:0,x0:0,y0:0,hasText:!1,sprite:null,datum:w})).sort((w,E)=>E.size-w.size);++b<y;){var A=v[b];A.x=e[0]*(c()+.5)>>1,A.y=e[1]*(c()+.5)>>1,uG(p,A,v,b),A.hasText&&h(g,A,m)&&(x.push(A),m?cG(m,A):m=[{x:A.x+A.x0,y:A.y+A.y0},{x:A.x+A.x1,y:A.y+A.y1}],A.x-=e[0]>>1,A.y-=e[1]>>1)}return x};function d(p){p.width=p.height=1;var g=Math.sqrt(p.getContext("2d").getImageData(0,0,1,1).data.length>>2);p.width=(bl<<5)/g,p.height=fd/g;var m=p.getContext("2d");return m.fillStyle=m.strokeStyle="red",m.textAlign="center",{context:m,ratio:g}}function h(p,g,m){for(var y=g.x,b=g.y,x=Math.hypot(e[0],e[1]),v=u(e),A=c()<.5?1:-1,w=-A,E,S,C;(E=v(w+=A))&&(S=~~E[0],C=~~E[1],!(Math.min(Math.abs(S),Math.abs(C))>=x));)if(g.x=y+S,g.y=b+C,!(g.x+g.x0<0||g.y+g.y0<0||g.x+g.x1>e[0]||g.y+g.y1>e[1])&&(!m||!lG(g,p,e[0]))&&(!m||fG(g,m))){for(var F=g.sprite,k=g.width>>5,L=e[0]>>5,R=g.x-(k<<4),_=R&127,$=32-_,D=g.y1-g.y0,P=(g.y+g.y0)*L+(R>>5),z,B=0;B<D;B++){z=0;for(var Q=0;Q<=k;Q++)p[P+Q]|=z<<$|(Q<k?(z=F[B*k+Q])>>>_:0);P+=L}return g.sprite=null,!0}return!1}return f.words=function(p){return arguments.length?(l=p,f):l},f.size=function(p){return arguments.length?(e=[+p[0],+p[1]],f):e},f.font=function(p){return arguments.length?(n=Ws(p),f):n},f.fontStyle=function(p){return arguments.length?(r=Ws(p),f):r},f.fontWeight=function(p){return arguments.length?(s=Ws(p),f):s},f.rotate=function(p){return arguments.length?(o=Ws(p),f):o},f.text=function(p){return arguments.length?(t=Ws(p),f):t},f.spiral=function(p){return arguments.length?(u=pG[p]||p,f):u},f.fontSize=function(p){return arguments.length?(i=Ws(p),f):i},f.padding=function(p){return arguments.length?(a=Ws(p),f):a},f.random=function(p){return arguments.length?(c=p,f):c},f}function uG(e,t,n,i){if(!t.sprite){var r=e.context,s=e.ratio;
vendor: 4,249 bytes, line 9
9r.clearRect(0,0,(bl<<5)/s,fd/s);var o=0,a=0,u=0,l=n.length,c,f,d,h,p;for(--i;++i<l;){if(t=n[i],r.save(),r.font=t.style+" "+t.weight+" "+~~((t.size+1)/s)+"px "+t.font,c=r.measureText(t.text+"m").width*s,d=t.size<<1,t.rotate){var g=Math.sin(t.rotate*D0),m=Math.cos(t.rotate*D0),y=c*m,b=c*g,x=d*m,v=d*g;c=Math.max(Math.abs(y+v),Math.abs(y-v))+31>>5<<5,d=~~Math.max(Math.abs(b+x),Math.abs(b-x))}else c=c+31>>5<<5;if(d>u&&(u=d),o+c>=bl<<5&&(o=0,a+=u,u=0),a+d>=fd)break;r.translate((o+(c>>1))/s,(a+(d>>1))/s),t.rotate&&r.rotate(t.rotate*D0),r.fillText(t.text,0,0),t.padding&&(r.lineWidth=2*t.padding,r.strokeText(t.text,0,0)),r.restore(),t.width=c,t.height=d,t.xoff=o,t.yoff=a,t.x1=c>>1,t.y1=d>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,o+=c}for(var A=r.getImageData(0,0,(bl<<5)/s,fd/s).data,w=[];--i>=0;)if(t=n[i],!!t.hasText){for(c=t.width,f=c>>5,d=t.y1-t.y0,h=0;h<d*f;h++)w[h]=0;if(o=t.xoff,o==null)return;a=t.yoff;var E=0,S=-1;for(p=0;p<d;p++){for(h=0;h<c;h++){var C=f*p+(h>>5),F=A[(a+p)*(bl<<5)+(o+h)<<2]?1<<31-h%32:0;w[C]|=F,E|=F}E?S=p:(t.y0++,d--,p--,a++)}t.y1=t.y0+S,t.sprite=w.slice(0,(t.y1-t.y0)*f)}}}function lG(e,t,n){n>>=5;for(var i=e.sprite,r=e.width>>5,s=e.x-(r<<4),o=s&127,a=32-o,u=e.y1-e.y0,l=(e.y+e.y0)*n+(s>>5),c,f=0;f<u;f++){c=0;for(var d=0;d<=r;d++)if((c<<a|(d<r?(c=i[f*r+d])>>>o:0))&t[l+d])return!0;l+=n}return!1}function cG(e,t){var n=e[0],i=e[1];t.x+t.x0<n.x&&(n.x=t.x+t.x0),t.y+t.y0<n.y&&(n.y=t.y+t.y0),t.x+t.x1>i.x&&(i.x=t.x+t.x1),t.y+t.y1>i.y&&(i.y=t.y+t.y1)}function fG(e,t){return e.x+e.x1>t[0].x&&e.x+e.x0<t[1].x&&e.y+e.y1>t[0].y&&e.y+e.y0<t[1].y}function J5(e){var t=e[0]/e[1];return function(n){return[t*(n*=.1)*Math.cos(n),n*Math.sin(n)]}}function dG(e){var t=4,n=t*e[0]/e[1],i=0,r=0;return function(s){var o=s<0?-1:1;switch(Math.sqrt(1+4*o*s)-o&3){case 0:i+=n;break;case 1:r+=t;break;case 2:i-=n;break;default:r-=t;break}return[i,r]}}function hG(e){for(var t=[],n=-1;++n<e;)t[n]=0;return t}function Ws(e){return typeof e=="function"?e:function(){return e}}var pG={archimedean:J5,rectangular:dG};const Q5=["x","y","font","fontSize","fontStyle","fontWeight","angle"],gG=["text","font","rotate","fontSize","fontStyle","fontWeight"];function Rv(e){O.call(this,aG(),e)}Rv.Definition={type:"Wordcloud",metadata:{modifies:!0},params:[{name:"size",type:"number",array:!0,length:2},{name:"font",type:"string",expr:!0,default:"sans-serif"},{name:"fontStyle",type:"string",expr:!0,default:"normal"},{name:"fontWeight",type:"string",expr:!0,default:"normal"},{name:"fontSize",type:"number",expr:!0,default:14},{name:"fontSizeRange",type:"number",array:"nullable",default:[10,50]},{name:"rotate",type:"number",expr:!0,default:0},{name:"text",type:"field"},{name:"spiral",type:"string",values:["archimedean","rectangular"]},{name:"padding",type:"number",expr:!0},{name:"as",type:"string",array:!0,length:7,default:Q5}]};H(Rv,O,{transform(e,t){e.size&&!(e.size[0]&&e.size[1])&&T("Wordcloud size dimensions must be non-zero.");function n(p){const g=e[p];return de(g)&&t.modified(g.fields)}const i=e.modified();if(!(i||t.changed(t.ADD_REM)||gG.some(n)))return;const r=t.materialize(t.SOURCE).source,s=this.value,o=e.as||Q5;let a=e.fontSize||14,u;if(de(a)?u=e.fontSizeRange:a=qt(a),u){const p=a,g=Ce("sqrt")().domain(Yi(r,p)).range(u);a=m=>g(p(m))}r.forEach(p=>{p[o[0]]=NaN,p[o[1]]=NaN,p[o[3]]=0});const l=s.words(r).text(e.text).size(e.size||[500,500]).padding(e.padding||1).spiral(e.spiral||"archimedean").rotate(e.rotate||0).font(e.font||"sans-serif").fontStyle(e.fontStyle||"normal").fontWeight(e.fontWeight||"normal").fontSize(a).random(Kn).layout(),c=s.size(),f=c[0]>>1,d=c[1]>>1,h=l.length;for(let p=0,g,m;p<h;++p)g=l[p],m=g.datum,m[o[0]]=g.x+f,m[o[1]]=g.y+d,m[o[2]]=g.font,m[o[3]]=g.size,m[o[4]]=g.style,m[o[5]]=g.weight,m[o[6]]=g.rotate;return t.reflow(i).modifies(o)}});const mG=Object.freeze(Object.defineProperty({__proto__:null,wordcloud:Rv},Symbol.toStringTag,{value:"Module"})),yG=e=>new Uint8Array(e),bG=e=>new Uint16Array(e),Ol=e=>new Uint32Array(e);function xG(){let e=8,t=[],n=Ol(0),i=Rf(0,e),r=Rf(0,e);return{data:()=>t,seen:()=>n=vG(n,t.length),add(s){for(let o=0,a=t.length,u=s.length,l;o<u;++o)l=s[o],l._index=a++,t.push(l)},remove(s,o){const a=t.length,u=Array(a-s),l=t;let c,f,d;for(f=0;!o[f]&&f<a;++f)u[f]=t[f],l[f]=f;
9for(d=f;f<a;++f)c=t[f],o[f]?l[f]=-1:(l[f]=d,i[d]=i[f],r[d]=r[f],u[d]=c,c._index=d++),i[f]=0;return t=u,l},size:()=>t.length,curr:()=>i,prev:()=>r,reset:s=>r[s]=i[s],all:()=>e<257?255:e<65537?65535:4294967295,set(s,o){i[s]|=o},clear(s,o){i[s]&=~o},resize(s,o){const a=i.length;(s>a||o>e)&&(e=Math.max(o,e),i=Rf(s,e,i),r=Rf(s,e))}}}function vG(e,t,n){return e.length>=t?e:(n=n||new e.constructor(t),n.set(e),n)}function Rf(e,t,n){const i=(t<257?yG:t<65537?bG:Ol)(e);return n&&i.set(n),i}function lS(e,t,n){const i=1<<t;return{one:i,zero:~i,range:n.slice(),bisect:e.bisect,index:e.index,size:e.size,onAdd(r,s){const o=this,a=o.bisect(o.range,r.value),u=r.index,l=a[0],c=a[1],f=u.length;let d;for(d=0;d<l;++d)s[u[d]]|=i;for(d=c;d<f;++d)s[u[d]]|=i;return o}}}function cS(){let e=Ol(0),t=[],n=0;function i(a,u,l){if(!u.length)return[];const c=n,f=u.length,d=Ol(f);let h=Array(f),p,g,m;for(m=0;m<f;++m)h[m]=a(u[m]),d[m]=m;if(h=EG(h,d),c)p=t,g=e,t=Array(c+f),e=Ol(c+f),AG(l,p,g,c,h,d,f,t,e);else{if(l>0)for(m=0;m<f;++m)d[m]+=l;t=h,e=d}return n=c+f,{index:d,value:h}}function r(a,u){const l=n;let c,f,d;for(f=0;!u[e[f]]&&f<l;++f);for(d=f;f<l;++f)u[c=e[f]]||(e[d]=c,t[d]=t[f],++d);n=l-a}function s(a){for(let u=0,l=n;u<l;++u)e[u]=a[e[u]]}function o(a,u){let l;return u?l=u.length:(u=t,l=n),[L9(u,a[0],0,l),Dd(u,a[1],0,l)]}return{insert:i,remove:r,bisect:o,reindex:s,index:()=>e,size:()=>n}}function EG(e,t){return e.sort.call(t,(n,i)=>{const r=e[n],s=e[i];return r<s?-1:r>s?1:0}),B9(e,t)}function AG(e,t,n,i,r,s,o,a,u){let l=0,c=0,f;for(f=0;l<i&&c<o;++f)t[l]<r[c]?(a[f]=t[l],u[f]=n[l++]):(a[f]=r[c],u[f]=s[c++]+e);for(;l<i;++l,++f)a[f]=t[l],u[f]=n[l];for(;c<o;++c,++f)a[f]=r[c],u[f]=s[c]+e}function Ov(e){O.call(this,xG(),e),this._indices=null,this._dims=null}Ov.Definition={type:"CrossFilter",metadata:{},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"query",type:"array",array:!0,required:!0,content:{type:"number",array:!0,length:2}}]};H(Ov,O,{transform(e,t){if(this._dims){var n=e.modified("fields")||e.fields.some(i=>t.modified(i.fields));return n?this.reinit(e,t):this.eval(e,t)}else return this.init(e,t)},init(e,t){const n=e.fields,i=e.query,r=this._indices={},s=this._dims=[],o=i.length;let a=0,u,l;for(;a<o;++a)u=n[a].fname,l=r[u]||(r[u]=cS()),s.push(lS(l,a,i[a]));return this.eval(e,t)},reinit(e,t){const n=t.materialize().fork(),i=e.fields,r=e.query,s=this._indices,o=this._dims,a=this.value,u=a.curr(),l=a.prev(),c=a.all(),f=n.rem=n.add,d=n.mod,h=r.length,p={};let g,m,y,b,x,v,A,w,E;if(l.set(u),t.rem.length&&(x=this.remove(e,t,n)),t.add.length&&a.add(t.add),t.mod.length)for(v={},b=t.mod,A=0,w=b.length;A<w;++A)v[b[A]._index]=1;for(A=0;A<h;++A)E=i[A],(!o[A]||e.modified("fields",A)||t.modified(E.fields))&&(y=E.fname,(g=p[y])||(s[y]=m=cS(),p[y]=g=m.insert(E,t.source,0)),o[A]=lS(m,A,r[A]).onAdd(g,u));for(A=0,w=a.data().length;A<w;++A)x[A]||(l[A]!==u[A]?f.push(A):v[A]&&u[A]!==c&&d.push(A));return a.mask=(1<<h)-1,n},eval(e,t){const n=t.materialize().fork(),i=this._dims.length;let r=0;return t.rem.length&&(this.remove(e,t,n),r|=(1<<i)-1),e.modified("query")&&!e.modified("fields")&&(r|=this.update(e,t,n)),t.add.length&&(this.insert(e,t,n),r|=(1<<i)-1),t.mod.length&&(this.modify(t,n),r|=(1<<i)-1),this.value.mask=r,n},insert(e,t,n){const i=t.add,r=this.value,s=this._dims,o=this._indices,a=e.fields,u={},l=n.add,c=r.size()+i.length,f=s.length;let d=r.size(),h,p,g;r.resize(c,f),r.add(i);const m=r.curr(),y=r.prev(),b=r.all();for(h=0;h<f;++h)p=a[h].fname,g=u[p]||(u[p]=o[p].insert(a[h],i,d)),s[h].onAdd(g,m);for(;d<c;++d)y[d]=b,m[d]!==b&&l.push(d)},modify(e,t){const n=t.mod,i=this.value,r=i.curr(),s=i.all(),o=e.mod;let a,u,l;for(a=0,u=o.length;a<u;++a)l=o[a]._index,r[l]!==s&&n.push(l)},remove(e,t,n){const i=this._indices,r=this.value,s=r.curr(),o=r.prev(),a=r.all(),u={},l=n.rem,c=t.rem;let f,d,h,p;for(f=0,d=c.length;f<d;++f)h=c[f]._index,u[h]=1,o[h]=p=s[h],s[h]=a,p!==a&&l.push(h);for(h in i)i[h].remove(d,u);return this.reindex(t,d,u),u},reindex(e,t,n){const i=this._indices,r=this.value;e.runAfter(()=>{const s=r.remove(t,n);for(const o in i)i[o].reindex(s)})},update(e,t,n){const i=this._dims,r=e.query,s=t.stamp,o=i.length;let a=0,u,l;for(n.filters=0,l=0;l<o;++l)e.modified("query",l)&&(u=l,++a);if(a===1)a=i[u].one,this.incrementOne(i[u],r[u],n.add,n.rem);else for(l=0,a=0;l<o;++l)e.modified("query",l)&&(a|=i[l].one,this.incrementAll(i[l],r[l],s,n.add),n.rem=n.add);return a},incrementAll(e,t,n,i){const r=this.value,s=r.seen(),o=r.curr(),a=r.prev(),u=e.index(),l=e.bisect(e.range),c=e.bisect(t),f=c[0],d=c[1],h=l[0],p=l[1],g=e.one;let m,y,b;if(f<h)for(m=f,y=Math.min(h,d);m<y;++m)b=u[m],s[b]!==n&&(a[b]=o[b],s[b]=n,i.push(b)),o[b]^=g;else if(f>h)for(m=h,y=Math.min(f,p);m<y;++m)b=u[m],s[b]!==n&&(a[b]=o[b],s[b]=n,i.push(b)),o[b]^=g;if(d>p)for(m=Math.max(f,p),y=d;m<y;++m)b=u[m],s[b]!==n&&(a[b]=o[b],s[b]=n,i.push(b)),o[b]^=g;else if(d<p)for(m=Math.max(h,d),y=p;m<y;++m)b=u[m],s[b]!==n&&(a[b]=o[b],s[b]=n,i.push(b)),o[b]^=g;e.range=t.slice()},incrementOne(e,t,n,i){const r=this.value,s=r.curr(),o=e.index(),a=e.bisect(e.range),u=e.bisect(t),l=u[0],c=u[1],f=a[0],d=a[1],h=e.one;let p,g,m;if(l<f)for(p=l,g=Math.min(f,c);p<g;++p)m=o[p],s[m]^=h,n.push(m);else if(l>f)for(p=f,g=Math.min(l,d);p<g;++p)m=o[p],s[m]^=h,i.push(m);if(c>d)for(p=Math.max(l,d),g=c;p<g;++p)m=o[p],s[m]^=h,n.push(m);else if(c<d)for(p=Math.max(f,c),g=d;p<g;++p)m=o[p],s[m]^=h,i.push(m);e.range=t.slice()}});function Tv(e){O.call(this,null,e)}Tv.Definition={type:"ResolveFilter",metadata:{},params:[{name:"ignore",type:"number",required:!0,description:"A bit mask indicating which filters to ignore."},{name:"filter",type:"object",required:!0,description:"Per-tuple filter bitmaps from a CrossFilter transform."}]};H(Tv,O,{transform(e,t){const n=~(e.ignore||0),i=e.filter,r=i.mask;if(!(r&n))return t.StopPropagation;const s=t.fork(t.ALL),o=i.data(),a=i.curr(),u=i.prev(),l=c=>a[c]&n?null:o[c];return s.filter(s.MOD,l),r&r-1?(s.filter(s.ADD,c=>{const f=a[c]&n;return!f&&f^u[c]&n?o[c]:null}),s.filter(s.REM,c=>{const f=a[c]&n;return f&&!(f^(f^u[c]&n))?o[c]:null})):(s.filter(s.ADD,l),s.filter(s.REM,c=>(a[c]&n)===r?o[c]:null)),s.filter(s.SOURCE,c=>l(c._index))}});const wG=Object.freeze(Object.defineProperty({__proto__:null,crossfilter:Ov,resolvefilter:Tv},Symbol.toStringTag,{value:"Module"})),SG="RawCode",So="Literal",CG="Property",$G="Identifier",FG="ArrayExpression",_G="BinaryExpression",Z5="CallExpression",kG="ConditionalExpression",DG="LogicalExpression",RG="MemberExpression",OG="ObjectExpression",TG="UnaryExpression";function wi(e){this.type=e}wi.prototype.visit=function(e){let t,n,i;if(e(this))return 1;for(t=MG(this),n=0,i=t.length;n<i;++n)if(t[n].visit(e))return 1};function MG(e){switch(e.type){case FG:return e.elements;case _G:case DG:return[e.left,e.right];case Z5:return[e.callee].concat(e.arguments);case kG:return[e.test,e.consequent,e.alternate];case RG:return[e.object,e.property];case OG:return e.properties;case CG:return[e.key,e.value];case TG:return[e.argument];case $G:case So:case SG:default:return[]}}var or,Z,M,It,_e,Dp=1,Lc=2,Co=3,Os=4,Rp=5,Wo=6,cn=7,Pc=8,NG=9;or={};or[Dp]="Boolean";or[Lc]="<end>";or[Co]="Identifier";or[Os]="Keyword";or[Rp]="Null";or[Wo]="Numeric";or[cn]="Punctuator";or[Pc]="String";or[NG]="RegularExpression";var LG="ArrayExpression",PG="BinaryExpression",IG="CallExpression",BG="ConditionalExpression",eR="Identifier",zG="Literal",UG="LogicalExpression",jG="MemberExpression",qG="ObjectExpression",WG="Property",GG="UnaryExpression",lt="Unexpected token %0",HG="Unexpected number",VG="Unexpected string",XG="Unexpected identifier",YG="Unexpected reserved word",KG="Unexpected end of input",B1="Invalid regular expression",R0="Invalid regular expression: missing /",tR="Octal literals are not allowed in strict mode.",JG="Duplicate data property in object literal not allowed in strict mode",Et="ILLEGAL",Jl="Disabled.",QG=new RegExp("
vendor: 4,916 bytes, line 9
9[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]
9"),ZG=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC
97\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");function Op(e,t){if(!e)throw new Error("ASSERT: "+t)}function Er(e){return e>=48&&e<=57}function Mv(e){return"0123456789abcdefABCDEF".includes(e)}function Tl(e){return"01234567".includes(e)}function eH(e){return e===32||e===9||e===11||e===12||e===160||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e)}function Ql(e){return e===10||e===13||e===8232||e===8233}function Ic(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e===92||e>=128&&QG.test(String.fromCharCode(e))}function vh(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===92||e>=128&&ZG.test(String.fromCharCode(e))}const tH={if:1,in:1,do:1,var:1,for:1,new:1,try:1,let:1,this:1,else:1,case:1,void:1,with:1,enum:1,while:1,break:1,catch:1,throw:1,const:1,yield:1,class:1,super:1,return:1,typeof:1,delete:1,switch:1,export:1,import:1,public:1,static:1,default:1,finally:1,extends:1,package:1,private:1,function:1,continue:1,debugger:1,interface:1,protected:1,instanceof:1,implements:1};function nR(){for(;M<It;){const e=Z.charCodeAt(M);if(eH(e)||Ql(e))++M;else break}}function z1(e){var t,n,i,r=0;for(n=e==="u"?4:2,t=0;t<n;++t)M<It&&Mv(Z[M])?(i=Z[M++],r=r*16+"0123456789abcdef".indexOf(i.toLowerCase())):Ae({},lt,Et);return String.fromCharCode(r)}function nH(){var e,t,n,i;for(e=Z[M],t=0,e==="}"&&Ae({},lt,Et);M<It&&(e=Z[M++],!!Mv(e));)t=t*16+"0123456789abcdef".indexOf(e.toLowerCase());return(t>1114111||e!=="}")&&Ae({},lt,Et),t<=65535?String.fromCharCode(t):(n=(t-65536>>10)+55296,i=(t-65536&1023)+56320,String.fromCharCode(n,i))}function iR(){var e,t;for(e=Z.charCodeAt(M++),t=String.fromCharCode(e),e===92&&(Z.charCodeAt(M)!==117&&Ae({},lt,Et),++M,e=z1("u"),(!e||e==="\\"||!Ic(e.charCodeAt(0)))&&Ae({},lt,Et),t=e);M<It&&(e=Z.charCodeAt(M),!!vh(e));)++M,t+=String.fromCharCode(e),e===92&&(t=t.substr(0,t.length-1),Z.charCodeAt(M)!==117&&Ae({},lt,Et),++M,e=z1("u"),(!e||e==="\\"||!vh(e.charCodeAt(0)))&&Ae({},lt,Et),t+=e);return t}function iH(){var e,t;for(e=M++;M<It;){if(t=Z.charCodeAt(M),t===92)return M=e,iR();if(vh(t))++M;else break}return Z.slice(e,M)}function rH(){var e,t,n;return e=M,t=Z.charCodeAt(M)===92?iR():iH(),t.length===1?n=Co:tH.hasOwnProperty(t)?n=Os:t==="null"?n=Rp:t==="true"||t==="false"?n=Dp:n=Co,{type:n,value:t,start:e,end:M}}function O0(){var e=M,t=Z.charCodeAt(M),n,i=Z[M],r,s,o;switch(t){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++M,{type:cn,value:String.fromCharCode(t),start:e,end:M};
9default:if(n=Z.charCodeAt(M+1),n===61)switch(t){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return M+=2,{type:cn,value:String.fromCharCode(t)+String.fromCharCode(n),start:e,end:M};case 33:case 61:return M+=2,Z.charCodeAt(M)===61&&++M,{type:cn,value:Z.slice(e,M),start:e,end:M}}}if(o=Z.substr(M,4),o===">>>=")return M+=4,{type:cn,value:o,start:e,end:M};if(s=o.substr(0,3),s===">>>"||s==="<<="||s===">>=")return M+=3,{type:cn,value:s,start:e,end:M};if(r=s.substr(0,2),i===r[1]&&"+-<>&|".includes(i)||r==="=>")return M+=2,{type:cn,value:r,start:e,end:M};if(r==="//"&&Ae({},lt,Et),"<>=!+-*%&|^/".includes(i))return++M,{type:cn,value:i,start:e,end:M};Ae({},lt,Et)}function sH(e){let t="";for(;M<It&&Mv(Z[M]);)t+=Z[M++];return t.length===0&&Ae({},lt,Et),Ic(Z.charCodeAt(M))&&Ae({},lt,Et),{type:Wo,value:parseInt("0x"+t,16),start:e,end:M}}function oH(e){let t="0"+Z[M++];for(;M<It&&Tl(Z[M]);)t+=Z[M++];return(Ic(Z.charCodeAt(M))||Er(Z.charCodeAt(M)))&&Ae({},lt,Et),{type:Wo,value:parseInt(t,8),octal:!0,start:e,end:M}}function fS(){var e,t,n;if(n=Z[M],Op(Er(n.charCodeAt(0))||n===".","Numeric literal must start with a decimal digit or a decimal point"),t=M,e="",n!=="."){if(e=Z[M++],n=Z[M],e==="0"){if(n==="x"||n==="X")return++M,sH(t);if(Tl(n))return oH(t);n&&Er(n.charCodeAt(0))&&Ae({},lt,Et)}for(;Er(Z.charCodeAt(M));)e+=Z[M++];n=Z[M]}if(n==="."){for(e+=Z[M++];Er(Z.charCodeAt(M));)e+=Z[M++];n=Z[M]}if(n==="e"||n==="E")if(e+=Z[M++],n=Z[M],(n==="+"||n==="-")&&(e+=Z[M++]),Er(Z.charCodeAt(M)))for(;Er(Z.charCodeAt(M));)e+=Z[M++];else Ae({},lt,Et);return Ic(Z.charCodeAt(M))&&Ae({},lt,Et),{type:Wo,value:parseFloat(e),start:t,end:M}}function aH(){var e="",t,n,i,r,s=!1;for(t=Z[M],Op(t==="'"||t==='"',"String literal must starts with a quote"),n=M,++M;M<It;)if(i=Z[M++],i===t){t="";break}else if(i==="\\")if(i=Z[M++],!i||!Ql(i.charCodeAt(0)))switch(i){case"u":case"x":Z[M]==="{"?(++M,e+=nH()):e+=z1(i);break;case"n":e+=`
10`;break;case"r":e+="\r";break;case"t":e+="	";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:Tl(i)?(r="01234567".indexOf(i),r!==0&&(s=!0),M<It&&Tl(Z[M])&&(s=!0,r=r*8+"01234567".indexOf(Z[M++]),"0123".includes(i)&&M<It&&Tl(Z[M])&&(r=r*8+"01234567".indexOf(Z[M++]))),e+=String.fromCharCode(r)):e+=i;break}else i==="\r"&&Z[M]===`
11`&&++M;else{if(Ql(i.charCodeAt(0)))break;e+=i}return t!==""&&Ae({},lt,Et),{type:Pc,value:e,octal:s,start:n,end:M}}function uH(e,t){let n=e;t.includes("u")&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}/g,(i,r)=>{if(parseInt(r,16)<=1114111)return"x";Ae({},B1)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch{Ae({},B1)}try{return new RegExp(e,t)}catch{return null}}function lH(){var e,t,n,i,r;for(e=Z[M],Op(e==="/","Regular expression literal must start with a slash"),t=Z[M++],n=!1,i=!1;M<It;)if(e=Z[M++],t+=e,e==="\\")e=Z[M++],Ql(e.charCodeAt(0))&&Ae({},R0),t+=e;else if(Ql(e.charCodeAt(0)))Ae({},R0);else if(n)e==="]"&&(n=!1);else if(e==="/"){i=!0;break}else e==="["&&(n=!0);return i||Ae({},R0),r=t.substr(1,t.length-2),{value:r,literal:t}}function cH(){var e,t,n;for(t="",n="";M<It&&(e=Z[M],!!vh(e.charCodeAt(0)));)++M,e==="\\"&&M<It?Ae({},lt,Et):(n+=e,t+=e);return n.search(/[^gimuy]/g)>=0&&Ae({},B1,n),{value:n,literal:t}}function fH(){var e,t,n,i;return _e=null,nR(),e=M,t=lH(),n=cH(),i=uH(t.value,n.value),{literal:t.literal+n.literal,value:i,regex:{pattern:t.value,flags:n.value},start:e,end:M}}function dH(e){return e.type===Co||e.type===Os||e.type===Dp||e.type===Rp}function rR(){if(nR(),M>=It)return{type:Lc,start:M,end:M};const e=Z.charCodeAt(M);return Ic(e)?rH():e===40||e===41||e===59?O0():e===39||e===34?aH():e===46?Er(Z.charCodeAt(M+1))?fS():O0():Er(e)?fS():O0()}function hn(){const e=_e;return M=e.end,_e=rR(),M=e.end,e}function sR(){const e=M;_e=rR(),M=e}function hH(e){const t=new wi(LG);return t.elements=e,t}function dS(e,t,n){const i=new wi(e==="||"||e==="&&"?UG:PG);return i.operator=e,i.left=t,i.right=n,i}function pH(e,t){const n=new wi(IG);return n.callee=e,n.arguments=t,n}function gH(e,t,n){const i=new wi(BG);return i.test=e,i.consequent=t,i.alternate=n,i}function Nv(e){const t=new wi(eR);return t.name=e,t}function xl(e){const t=new wi(zG);return t.value=e.value,t.raw=Z.slice(e.start,e.end),e.regex&&(t.raw==="//"&&(t.raw="/(?:)/"),t.regex=e.regex),t}function hS(e,t,n){const i=new wi(jG);return i.computed=e==="[",i.object=t,i.property=n,i.computed||(n.member=!0),i}function mH(e){const t=new wi(qG);return t.properties=e,t}function pS(e,t,n){const i=new wi(WG);return i.key=t,i.value=n,i.kind=e,i}function yH(e,t){const n=new wi(GG);return n.operator=e,n.argument=t,n.prefix=!0,n}function Ae(e,t){var n,i=Array.prototype.slice.call(arguments,2),r=t.replace(/%(\d)/g,(s,o)=>(Op(o<i.length,"Message reference must be in range"),i[o]));throw n=new Error(r),n.index=M,n.description=r,n}function Tp(e){e.type===Lc&&Ae(e,KG),e.type===Wo&&Ae(e,HG),e.type===Pc&&Ae(e,VG),e.type===Co&&Ae(e,XG),e.type===Os&&Ae(e,YG),Ae(e,lt,e.value)}function Bt(e){const t=hn();(t.type!==cn||t.value!==e)&&Tp(t)}function Ie(e){return _e.type===cn&&_e.value===e}function T0(e){return _e.type===Os&&_e.value===e}function bH(){const e=[];for(M=_e.start,Bt("[");!Ie("]");)Ie(",")?(hn(),e.push(null)):(e.push($o()),Ie("]")||Bt(","));return hn(),hH(e)}function gS(){M=_e.start;const e=hn();return e.type===Pc||e.type===Wo?(e.octal&&Ae(e,tR),xl(e)):Nv(e.value)}function xH(){var e,t,n,i;if(M=_e.start,e=_e,e.type===Co)return n=gS(),Bt(":"),i=$o(),pS("init",n,i);if(e.type===Lc||e.type===cn)Tp(e);else return t=gS(),Bt(":"),i=$o(),pS("init",t,i)}function vH(){var e=[],t,n,i,r={},s=String;for(M=_e.start,Bt("{");!Ie("}");)t=xH(),t.key.type===eR?n=t.key.name:n=s(t.key.value),i="$"+n,Object.prototype.hasOwnProperty.call(r,i)?Ae({},JG):r[i]=!0,e.push(t),Ie("}")||Bt(",");return Bt("}"),mH(e)}function EH(){Bt("(");const e=Lv();return Bt(")"),e}const AH={if:1};function wH(){var e,t,n;if(Ie("("))return EH();if(Ie("["))return bH();if(Ie("{"))return vH();if(e=_e.type,M=_e.start,e===Co||AH[_e.value])n=Nv(hn().value);else if(e===Pc||e===Wo)_e.octal&&Ae(_e,tR),n=xl(hn());else{if(e===Os)throw new Error(Jl);e===Dp?(t=hn(),t.value=t.value==="true",n=xl(t)):e===Rp?(t=hn(),t.value=null,n=xl(t)):Ie("/")||Ie("/=")?(n=xl(fH()),sR()):Tp(hn())}return n}function SH(){const e=[];
11if(Bt("("),!Ie(")"))for(;M<It&&(e.push($o()),!Ie(")"));)Bt(",");return Bt(")"),e}function CH(){M=_e.start;const e=hn();return dH(e)||Tp(e),Nv(e.value)}function $H(){return Bt("."),CH()}function FH(){Bt("[");const e=Lv();return Bt("]"),e}function _H(){var e,t,n;for(e=wH();;)if(Ie("."))n=$H(),e=hS(".",e,n);else if(Ie("("))t=SH(),e=pH(e,t);else if(Ie("["))n=FH(),e=hS("[",e,n);else break;return e}function mS(){const e=_H();if(_e.type===cn&&(Ie("++")||Ie("--")))throw new Error(Jl);return e}function dd(){var e,t;if(_e.type!==cn&&_e.type!==Os)t=mS();else{if(Ie("++")||Ie("--"))throw new Error(Jl);if(Ie("+")||Ie("-")||Ie("~")||Ie("!"))e=hn(),t=dd(),t=yH(e.value,t);else{if(T0("delete")||T0("void")||T0("typeof"))throw new Error(Jl);t=mS()}}return t}function yS(e){let t=0;if(e.type!==cn&&e.type!==Os)return 0;switch(e.value){case"||":t=1;break;case"&&":t=2;break;case"|":t=3;break;case"^":t=4;break;case"&":t=5;break;case"==":case"!=":case"===":case"!==":t=6;break;case"<":case">":case"<=":case">=":case"instanceof":case"in":t=7;break;case"<<":case">>":case">>>":t=8;break;case"+":case"-":t=9;break;case"*":case"/":case"%":t=11;break}return t}function kH(){var e,t,n,i,r,s,o,a,u,l;if(e=_e,u=dd(),i=_e,r=yS(i),r===0)return u;for(i.prec=r,hn(),t=[e,_e],o=dd(),s=[u,i,o];(r=yS(_e))>0;){for(;s.length>2&&r<=s[s.length-2].prec;)o=s.pop(),a=s.pop().value,u=s.pop(),t.pop(),n=dS(a,u,o),s.push(n);i=hn(),i.prec=r,s.push(i),t.push(_e),n=dd(),s.push(n)}for(l=s.length-1,n=s[l],t.pop();l>1;)t.pop(),n=dS(s[l-1].value,s[l-2],n),l-=2;return n}function $o(){var e,t,n;return e=kH(),Ie("?")&&(hn(),t=$o(),Bt(":"),n=$o(),e=gH(e,t,n)),e}function Lv(){const e=$o();if(Ie(","))throw new Error(Jl);return e}function oR(e){Z=e,M=0,It=Z.length,_e=null,sR();const t=Lv();if(_e.type!==Lc)throw new Error("Unexpect token after expression.");return t}var aR={NaN:"NaN",E:"Math.E",LN2:"Math.LN2",LN10:"Math.LN10",LOG2E:"Math.LOG2E",LOG10E:"Math.LOG10E",PI:"Math.PI",SQRT1_2:"Math.SQRT1_2",SQRT2:"Math.SQRT2",MIN_VALUE:"Number.MIN_VALUE",MAX_VALUE:"Number.MAX_VALUE"};function uR(e){function t(o,a,u,l){let c=e(a[0]);return u&&(c=u+"("+c+")",u.lastIndexOf("new ",0)===0&&(c="("+c+")")),c+"."+o+(l<0?"":l===0?"()":"("+a.slice(1).map(e).join(",")+")")}function n(o,a,u){return l=>t(o,l,a,u)}const i="new Date",r="String",s="RegExp";return{isNaN:"Number.isNaN",isFinite:"Number.isFinite",abs:"Math.abs",acos:"Math.acos",asin:"Math.asin",atan:"Math.atan",atan2:"Math.atan2",ceil:"Math.ceil",cos:"Math.cos",exp:"Math.exp",floor:"Math.floor",hypot:"Math.hypot",log:"Math.log",max:"Math.max",min:"Math.min",pow:"Math.pow",random:"Math.random",round:"Math.round",sin:"Math.sin",sqrt:"Math.sqrt",tan:"Math.tan",clamp:function(o){o.length<3&&T("Missing arguments to clamp function."),o.length>3&&T("Too many arguments to clamp function.");const a=o.map(e);return"Math.max("+a[1]+", Math.min("+a[2]+","+a[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:i,date:n("getDate",i,0),day:n("getDay",i,0),year:n("getFullYear",i,0),month:n("getMonth",i,0),hours:n("getHours",i,0),minutes:n("getMinutes",i,0),seconds:n("getSeconds",i,0),milliseconds:n("getMilliseconds",i,0),time:n("getTime",i,0),timezoneoffset:n("getTimezoneOffset",i,0),utcdate:n("getUTCDate",i,0),utcday:n("getUTCDay",i,0),utcyear:n("getUTCFullYear",i,0),utcmonth:n("getUTCMonth",i,0),utchours:n("getUTCHours",i,0),utcminutes:n("getUTCMinutes",i,0),utcseconds:n("getUTCSeconds",i,0),utcmilliseconds:n("getUTCMilliseconds",i,0),length:n("length",null,-1),parseFloat:"parseFloat",parseInt:"parseInt",upper:n("toUpperCase",r,0),lower:n("toLowerCase",r,0),substring:n("substring",r),split:n("split",r),trim:n("trim",r,0),btoa:"btoa",atob:"atob",regexp:s,test:n("test",s),if:function(o){o.length<3&&T("Missing arguments to if function."),o.length>3&&T("Too many arguments to if function.");const a=o.map(e);return"("+a[0]+"?"+a[1]+":"+a[2]+")"}}}function DH(e){const t=e&&e.length-1;return t&&(e[0]==='"'&&e[t]==='"'||e[0]==="'"&&e[t]==="'")?e.slice(1,-1):e}function lR(e){e=e||{};const t=e.allowed?mi(e.allowed):{},n=e.forbidden?mi(e.forbidden):{},i=e.constants||aR,r=(e.functions||uR)(f),s=e.globalvar,o=e.fieldvar,a=de(s)?s:p=>`${s}["${p}"]`;let u={},l={},c=0;function f(p){if(Y(p))return p;const g=d[p.type];return g==null&&T("Unsupported type: "+p.type),g(p)}const d={Literal:p=>p.raw,Identifier:p=>{const g=p.name;return c>0?g:J(n,g)?T("Illegal identifier: "+g):J(i,g)?i[g]:J(t,g)?g:(u[g]=1,a(g))},MemberExpression:p=>{const g=!p.computed,m=f(p.object);g&&(c+=1);const y=f(p.property);return m===o&&(l[DH(y)]=1),g&&(c-=1),m+(g?"."+y:"["+y+"]")}
vendor: 4,082 bytes, line 11
11,CallExpression:p=>{p.callee.type!=="Identifier"&&T("Illegal callee type: "+p.callee.type);const g=p.callee.name,m=p.arguments,y=J(r,g)&&r[g];return y||T("Unrecognized function: "+g),de(y)?y(m):y+"("+m.map(f).join(",")+")"},ArrayExpression:p=>"["+p.elements.map(f).join(",")+"]",BinaryExpression:p=>"("+f(p.left)+" "+p.operator+" "+f(p.right)+")",UnaryExpression:p=>"("+p.operator+f(p.argument)+")",ConditionalExpression:p=>"("+f(p.test)+"?"+f(p.consequent)+":"+f(p.alternate)+")",LogicalExpression:p=>"("+f(p.left)+p.operator+f(p.right)+")",ObjectExpression:p=>{for(const g of p.properties){const m=g.key.name;Gy.has(m)&&T("Illegal property: "+m)}return"{"+p.properties.map(f).join(",")+"}"},Property:p=>{c+=1;const g=f(p.key);return c-=1,g+":"+f(p.value)}};function h(p){const g={code:f(p),globals:Object.keys(u),fields:Object.keys(l)};return u={},l={},g}return h.functions=r,h.constants=i,h}const bS=Symbol("vega_selection_getter");function cR(e){return(!e.getter||!e.getter[bS])&&(e.getter=Vn(e.field),e.getter[bS]=!0),e.getter}const Pv="intersect",xS="union",RH="vlMulti",OH="vlPoint",vS="or",TH="and",Ii="_vgsid_",Zl=Vn(Ii),MH="E",NH="R",LH="R-E",PH="R-LE",IH="R-RE",BH="E-LT",zH="E-LTE",UH="E-GT",jH="E-GTE",qH="E-VALID",WH="E-ONE",Eh="index:unit";function ES(e,t){for(var n=t.fields,i=t.values,r=n.length,s=0,o,a;s<r;++s)if(a=n[s],o=cR(a)(e),ps(o)&&(o=Mt(o)),ps(i[s])&&(i[s]=Mt(i[s])),I(i[s])&&ps(i[s][0])&&(i[s]=i[s].map(Mt)),a.type===MH){if(I(i[s])?!i[s].includes(o):o!==i[s])return!1}else if(a.type===NH){if(!va(o,i[s]))return!1}else if(a.type===IH){if(!va(o,i[s],!0,!1))return!1}else if(a.type===LH){if(!va(o,i[s],!1,!1))return!1}else if(a.type===PH){if(!va(o,i[s],!1,!0))return!1}else if(a.type===BH){if(o>=i[s])return!1}else if(a.type===zH){if(o>i[s])return!1}else if(a.type===UH){if(o<=i[s])return!1}else if(a.type===jH){if(o<i[s])return!1}else if(a.type===qH){if(o===null||isNaN(o))return!1}else if(a.type===WH&&i[s].indexOf(o)===-1)return!1;return!0}function GH(e,t,n){for(var i=this.context.data[e],r=i?i.values.value:[],s=i?i[Eh]&&i[Eh].value:void 0,o=n===Pv,a=r.length,u=0,l,c,f,d,h;u<a;++u)if(l=r[u],s&&o){if(c=c||{},f=c[d=l.unit]||0,f===-1)continue;if(h=ES(t,l),c[d]=h?-1:++f,h&&s.size===1)return!0;if(!h&&f===s.get(d).count)return!1}else if(h=ES(t,l),o^h)return h;return a&&o}const fR=m8(Zl),HH=fR.left,VH=fR.right;function XH(e,t,n){const i=this.context.data[e],r=i?i.values.value:[],s=i?i[Eh]&&i[Eh].value:void 0,o=n===Pv,a=Zl(t),u=HH(r,a);if(u===r.length||Zl(r[u])!==a)return!1;if(s&&o){if(s.size===1)return!0;if(VH(r,a)-u<s.size)return!1}return!0}function YH(e,t){return I(e)||T("First argument to selectionTuples must be an array."),X(t)||T("Second argument to selectionTuples must be an object."),e.map(n=>fe(t.fields?{values:t.fields.map(i=>cR(i)(n.datum))}:{[Ii]:Zl(n.datum)},t))}function KH(e,t,n,i){for(var r=this.context.data[e],s=r?r.values.value:[],o={},a={},u={},l,c,f,d,h,p,g,m,y,b,x=s.length,v=0,A,w;v<x;++v)if(l=s[v],d=l.unit,c=l.fields,f=l.values,c&&f){for(A=0,w=c.length;A<w;++A)h=c[A],g=o[h.field]||(o[h.field]={}),m=g[d]||(g[d]=[]),u[h.field]=y=h.type.charAt(0),b=M0[`${y}_union`],g[d]=b(m,K(f[A]));n&&(m=a[d]||(a[d]=[]),m.push(K(f).reduce((E,S,C)=>(E[c[C].field]=S,E),{})))}else h=Ii,p=Zl(l),g=o[h]||(o[h]={}),m=g[d]||(g[d]=[]),m.push(p),n&&(m=a[d]||(a[d]=[]),m.push({[Ii]:p}));if(t=t||xS,o[Ii]?o[Ii]=M0[`${Ii}_${t}`](...Object.values(o[Ii])):Object.keys(o).forEach(E=>{o[E]=Object.keys(o[E]).map(S=>o[E][S]).reduce((S,C)=>S===void 0?C:M0[`${u[E]}_${t}`](S,C))}),s=Object.keys(a),n&&s.length){const E=i?OH:RH;o[E]=t===xS?{[vS]:s.reduce((S,C)=>(S.push(...a[C]),S),[])}:{[TH]:s.map(S=>({[vS]:a[S]}))}}return o}var M0={[`${Ii}_union`]:l9,[`${Ii}_intersect`]:a9,E_union:function(e,t){if(!e.length)return t;for(var n=0,i=t.length;n<i;++n)e.includes(t[n])||e.push(t[n]);return e},E_intersect:function(e,t){return e.length?e.filter(n=>t.includes(n)):t},R_union:function(e,t){var n=Mt(t[0]),i=Mt(t[1]);return n>i&&(n=t[1],i=t[0]),e.length?(e[0]>n&&(e[0]=n),e[1]<i&&(e[1]=i),e):[n,i]},R_intersect:function(e,t){var n=Mt(t[0]),i=Mt(t[1]);return n>
11i&&(n=t[1],i=t[0]),e.length?i<e[0]||e[1]<n?[]:(e[0]<n&&(e[0]=n),e[1]>i&&(e[1]=i),e):[n,i]}};const JH=":",QH="@";function Iv(e,t,n,i){t[0].type!==So&&T("First argument to selection functions must be a string literal.");const r=t[0].value,s=t.length>=2&&ve(t).value,o="unit",a=QH+o,u=JH+r;s===Pv&&!J(i,a)&&(i[a]=n.getData(r).indataRef(n,o)),J(i,u)||(i[u]=n.getData(r).tuplesRef())}function dR(e){const t=this.context.data[e];return t?t.values.value:[]}function ZH(e,t,n){const i=this.context.data[e]["index:"+t],r=i?i.value.get(n):void 0;return r&&r.count}function eV(e,t){const n=this.context.dataflow,i=this.context.data[e],r=i.input;return n.pulse(r,n.changeset().remove(Xn).insert(t)),1}function tV(e,t,n){if(e){const i=this.context.dataflow,r=e.mark.source;i.pulse(r,i.changeset().encode(e,t))}return n!==void 0?n:e}const Bc=e=>function(t,n){const i=this.context.dataflow.locale();return t===null?"null":i[e](n)(t)},nV=Bc("format"),hR=Bc("timeFormat"),iV=Bc("utcFormat"),rV=Bc("timeParse"),sV=Bc("utcParse"),Of=new Date(2e3,0,1);function Mp(e,t,n){return!Number.isInteger(e)||!Number.isInteger(t)?"":(Of.setYear(2e3),Of.setMonth(e),Of.setDate(t),hR.call(this,Of,n))}function oV(e){return Mp.call(this,e,1,"%B")}function aV(e){return Mp.call(this,e,1,"%b")}function uV(e){return Mp.call(this,0,2+e,"%A")}function lV(e){return Mp.call(this,0,2+e,"%a")}const cV=":",fV="@",U1="%",pR="$";function Bv(e,t,n,i){t[0].type!==So&&T("First argument to data functions must be a string literal.");const r=t[0].value,s=cV+r;if(!J(s,i))try{i[s]=n.getData(r).tuplesRef()}catch{}}function dV(e,t,n,i){t[0].type!==So&&T("First argument to indata must be a string literal."),t[1].type!==So&&T("Second argument to indata must be a string literal.");const r=t[0].value,s=t[1].value,o=fV+s;J(o,i)||(i[o]=n.getData(r).indataRef(n,s))}function tn(e,t,n,i){if(t[0].type===So)AS(n,i,t[0].value);else for(e in n.scales)AS(n,i,e)}function AS(e,t,n){const i=U1+n;if(!J(t,i))try{t[i]=e.scaleRef(n)}catch{}}function ar(e,t){if(Y(e)){const n=t.scales[e];return n&&FA(n.value)?n.value:void 0}else if(de(e))return FA(e)?e:void 0}function hV(e,t,n){t.__bandwidth=r=>r&&r.bandwidth?r.bandwidth():0,n._bandwidth=tn,n._range=tn,n._scale=tn;const i=r=>"_["+(r.type===So?G(U1+r.value):G(U1)+"+"+e(r))+"]";return{_bandwidth:r=>`this.__bandwidth(${i(r[0])})`,_range:r=>`${i(r[0])}.range()`,_scale:r=>`${i(r[0])}(${e(r[1])})`}}function zv(e,t){return function(n,i,r){if(n){const s=ar(n,(r||this).context);return s&&s.path[e](i)}else return t(i)}}const pV=zv("area",zz),gV=zv("bounds",Wz),mV=zv("centroid",Kz);function yV(e,t){const n=ar(e,(t||this).context);return n&&n.scale()}function bV(e){const t=this.context.group;let n=!1;if(t)for(;e;){if(e===t){n=!0;break}e=e.mark.group}return n}function Uv(e,t,n){try{e[t].apply(e,["EXPRESSION"].concat([].slice.call(n)))}catch(i){e.warn(i)}return n[n.length-1]}function xV(){return Uv(this.context.dataflow,"warn",arguments)}function vV(){return Uv(this.context.dataflow,"info",arguments)}function EV(){return Uv(this.context.dataflow,"debug",arguments)}function N0(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}function j1(e){const t=wd(e),n=N0(t.r),i=N0(t.g),r=N0(t.b);return .2126*n+.7152*i+.0722*r}function AV(e,t){const n=j1(e),i=j1(t),r=Math.max(n,i),s=Math.min(n,i);return(r+.05)/(s+.05)}function wV(){const e=[].slice.call(arguments);return e.unshift({}),fe(...e)}function gR(e,t){return e===t||e!==e&&t!==t?!0:I(e)?I(t)&&e.length===t.length?SV(e,t):!1:X(e)&&X(t)?mR(e,t):!1}function SV(e,t){for(let n=0,i=e.length;n<i;++n)if(!gR(e[n],t[n]))return!1;return!0}function mR(e,t){for(const n in e)if(!gR(e[n],t[n]))return!1;return!0}function wS(e){return t=>mR(e,t)}function CV(e,t,n,i,r,s){const o=this.context.dataflow,a=this.context.data[e],u=a.input,l=o.stamp();let c=a.changes,f,d;if(o._trigger===!1||!(u.value.length||t||i))return 0;if((!c||c.stamp<l)&&(a.changes=c=o.changeset(),c.stamp=l,o.runAfter(()=>{a.modified=!0,o.pulse(u,c).run()},!0,1)),n&&(f=n===!0?Xn:I(n)||ep(n)?n:wS(n),c.remove(f)),t&&c.insert(t),i&&(f=wS(i),u.value.some(f)?c.remove(f):c.insert(i)),r)for(d in s)c.modify(r,d,s[d]);return 1}function $V(e){const t=e.touches,n=t[0].clientX-t[1].clientX,i=t[0].clientY-t[1].clientY;return Math.hypot(n,i)}function FV(e){const t=e.touches;return Math.atan2(t[0].clientY-t[1].clientY,t[0].clientX-t[1].clientX)}const SS={};function _V(e,t){const n=SS[t]||(SS[t]=Vn(t));return I(e)?e.map(n):n(e)}function Np(e){return I(e)||ArrayBuffer.isView(e)?e:null}function jv(e){return Np(e)||(Y(e)?e:null)}function kV(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return Np(e).join(...n)}function DV(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return jv(e).indexOf(...n)}function RV(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return jv(e).lastIndexOf(...n)}function OV(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return jv(e).slice(...n)}function TV(e,t,n){return de(n)&&T("Function argument passed to replace."),!Y(t)&&!eb(t)&&T("Please pass a string or RegExp argument to replace."),String(e).replace(t,n)}function MV(e){return Np(e).slice().reverse()}function NV(e){return Np(e).slice().sort(hu)}function LV(e,t,n){return ix(e||0,t||0,n||0)}function PV(e,t){const n=ar(e,(t||this).context);return n&&n.bandwidth?n.bandwidth():0}function IV(e,t){const n=ar(e,(t||this).context);return n?n.copy():void 0}function BV(e,t){const n=ar(e,(t||this).context);return n?n.domain():[]}
11function zV(e,t,n){const i=ar(e,(n||this).context);return i?I(t)?(i.invertRange||i.invert)(t):(i.invert||i.invertExtent)(t):void 0}function UV(e,t){const n=ar(e,(t||this).context);return n&&n.range?n.range():[]}function jV(e,t,n){const i=ar(e,(n||this).context);return i?i(t):void 0}function qV(e,t,n,i,r){e=ar(e,(r||this).context);const s=lD(t,n);let o=e.domain(),a=o[0],u=ve(o),l=jt;return u-a?l=Jk(e,a,u):e=(e.interpolator?Ce("sequential")().interpolator(e.interpolator()):Ce("linear")().interpolate(e.interpolate()).range(e.range())).domain([a=0,u=1]),e.ticks&&(o=e.ticks(+i||15),a!==o[0]&&o.unshift(a),u!==ve(o)&&o.push(u)),o.forEach(c=>s.stop(l(c),e(c))),s}function WV(e,t,n){const i=ar(e,(n||this).context);return function(r){return i?i.path.context(r)(t):""}}function GV(e){let t=null;return function(n){return n?Wl(n,t=t||Ua(e)):e}}const yR=e=>e.data;function bR(e,t){const n=dR.call(t,e);return n.root&&n.root.lookup||{}}function HV(e,t,n){const i=bR(e,this),r=i[t],s=i[n];return r&&s?r.path(s).map(yR):void 0}function VV(e,t){const n=bR(e,this)[t];return n?n.ancestors().map(yR):void 0}const xR=()=>typeof window<"u"&&window||null;function XV(){const e=xR();return e?e.screen:{}}function YV(){const e=xR();return e?[e.innerWidth,e.innerHeight]:[void 0,void 0]}function KV(){const e=this.context.dataflow,t=e.container&&e.container();return t?[t.clientWidth,t.clientHeight]:[void 0,void 0]}function vR(e,t,n){if(!e)return[];const[i,r]=e,s=new tt().set(i[0],i[1],r[0],r[1]),o=n||this.context.dataflow.scenegraph().root;return o3(o,s,JV(t))}function JV(e){let t=null;if(e){const n=K(e.marktype),i=K(e.markname);t=r=>(!n.length||n.some(s=>r.marktype===s))&&(!i.length||i.some(s=>r.name===s))}return t}function QV(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:5;e=K(e);const r=e[e.length-1];return r===void 0||Math.hypot(r[0]-t,r[1]-n)>i?[...e,[t,n]]:e}function ZV(e){return K(e).reduce((t,n,i)=>{let[r,s]=n;return t+=i==0?`M ${r},${s} `:i===e.length-1?" Z":`L ${r},${s} `},"")}function eX(e,t,n){const{x:i,y:r,mark:s}=n,o=new tt().set(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,Number.MIN_SAFE_INTEGER,Number.MIN_SAFE_INTEGER);for(const[u,l]of t)u<o.x1&&(o.x1=u),u>o.x2&&(o.x2=u),l<o.y1&&(o.y1=l),l>o.y2&&(o.y2=l);return o.translate(i,r),vR([[o.x1,o.y1],[o.x2,o.y2]],e,s).filter(u=>tX(u.x,u.y,t))}function tX(e,t,n){let i=0;for(let r=0,s=n.length-1;r<n.length;s=r++){const[o,a]=n[s],[u,l]=n[r];l>t!=a>t&&e<(o-u)*(t-l)/(a-l)+u&&i++}return i&1}const ec={random(){return Kn()},cumulativeNormal:sp,cumulativeLogNormal:wb,cumulativeUniform:Fb,densityNormal:bb,densityLogNormal:Ab,densityUniform:$b,quantileNormal:op,quantileLogNormal:Sb,quantileUniform:_b,sampleNormal:rp,sampleLogNormal:Eb,sampleUniform:Cb,isArray:I,isBoolean:Rs,isDate:ps,isDefined(e){return e!==void 0},isNumber:Se,isObject:X,isRegExp:eb,isString:Y,isTuple:ep,isValid(e){return e!=null&&e===e},toBoolean:nb,toDate(e){return ib(e)},toNumber:Mt,toString:rb,indexof:DV,join:kV,lastindexof:RV,replace:TV,reverse:MV,sort:NV,slice:OV,flush:QF,lerp:e_,merge:wV,pad:i_,peek:ve,pluck:_V,span:gc,inrange:va,truncate:r_,rgb:wd,lab:Cd,hcl:$d,hsl:_m,luminance:j1,contrast:AV,sequence:zo,format:nV,utcFormat:iV,utcParse:sV,utcOffset:$_,utcSequence:k_,timeFormat:hR,timeParse:rV,timeOffset:C_,timeSequence:__,timeUnitSpecifier:p_,monthFormat:oV,monthAbbrevFormat:aV,dayFormat:uV,dayAbbrevFormat:lV,quarter:XF,utcquarter:YF,week:m_,utcweek:x_,dayofyear:g_,utcdayofyear:b_,warn:xV,info:vV,debug:EV,extent(e){return Yi(e)},inScope:bV,intersect:vR,clampRange:KF,pinchDistance:$V,pinchAngle:FV,screen:XV,containerSize:KV,windowSize:YV,bandspace:LV,setdata:eV,pathShape:GV,panLinear:WF,panLog:GF,panPow:HF,panSymlog:VF,zoomLinear:Yy,zoomLog:Ky,zoomPow:kd,zoomSymlog:Jy,encode:tV,modify:CV,lassoAppend:QV,lassoPath:ZV,intersectLasso:eX},nX=["view","item","group","xy","x","y"],iX="event.vega.",ER="this.",qv={},AR={forbidden:["_"],allowed:["datum","event","item"],fieldvar:"datum",globalvar:e=>`_[${G(pR+e)}]`,functions:rX,constants:aR,visitors:qv},q1=lR(AR);function rX(e){const t=uR(e);nX.forEach(n=>t[n]=iX+n);for(const n in ec)t[n]=ER+n;return fe(t,hV(e,ec,qv)),t}function et(e,t,n){return arguments.length===1?ec[e]:(ec[e]=t,n&&(qv[e]=n),q1&&(q1.functions[e]=ER+e),this)}et("bandwidth",PV,tn);et("copy",IV,tn);et("domain",BV,tn);et("range",UV,tn);et("invert",zV,tn);et("scale",jV,tn);et("gradient",qV,tn);et("geoArea",pV,tn);et("geoBounds",gV,tn);et("geoCentroid",mV,tn);et("geoShape",WV,tn);et("geoScale",yV,tn);et("indata",ZH,dV);et("data",dR,Bv);et("treePath",HV,Bv);et("treeAncestors",VV,Bv);et("vlSelectionTest",GH,Iv);et("vlSelectionIdTest",XH,Iv);et("vlSelectionResolve",KH,Iv);et("vlSelectionTuples",YH);function Qi(e,t){const n={};let i;try{e=Y(e)?e:G(e)+"",i=oR(e)}catch{T("Expression parse error: "+e)}i.visit(s=>{if(s.type!==Z5)return;const o=s.callee.name,a=AR.visitors[o];a&&a(o,s.arguments,t,n)});const r=q1(i);
11return r.globals.forEach(s=>{const o=pR+s;!J(n,o)&&t.getSignal(s)&&(n[o]=t.signalRef(s))}),{$expr:fe({code:r.code},t.options.ast?{ast:i}:null),$fields:r.fields,$params:n}}function sX(e){const t=this,n=e.operators||[];return e.background&&(t.background=e.background),e.eventConfig&&(t.eventConfig=e.eventConfig),e.locale&&(t.locale=e.locale),n.forEach(i=>t.parseOperator(i)),n.forEach(i=>t.parseOperatorParameters(i)),(e.streams||[]).forEach(i=>t.parseStream(i)),(e.updates||[]).forEach(i=>t.parseUpdate(i)),t.resolve()}const oX=mi(["rule"]),CS=mi(["group","image","rect"]);function aX(e,t){let n="";return oX[t]||(e.x2&&(e.x?(CS[t]&&(n+="if(o.x>o.x2)$=o.x,o.x=o.x2,o.x2=$;"),n+="o.width=o.x2-o.x;"):n+="o.x=o.x2-(o.width||0);"),e.xc&&(n+="o.x=o.xc-(o.width||0)/2;"),e.y2&&(e.y?(CS[t]&&(n+="if(o.y>o.y2)$=o.y,o.y=o.y2,o.y2=$;"),n+="o.height=o.y2-o.y;"):n+="o.y=o.y2-(o.height||0);"),e.yc&&(n+="o.y=o.yc-(o.height||0)/2;")),n}function Wv(e){return(e+"").toLowerCase()}function uX(e){return Wv(e)==="operator"}function lX(e){return Wv(e)==="collect"}function Gu(e,t,n){n.endsWith(";")||(n="return("+n+");");const i=Function(...t.concat(n));return e&&e.functions?i.bind(e.functions):i}function cX(e,t,n,i){return`((u = ${e}) < (v = ${t}) || u == null) && v != null ? ${n}
12  : (u > v || v == null) && u != null ? ${i}
13  : ((v = v instanceof Date ? +v : v), (u = u instanceof Date ? +u : u)) !== u && v === v ? ${n}
14  : v !== v && u === u ? ${i} : `}var fX={operator:(e,t)=>Gu(e,["_"],t.code),parameter:(e,t)=>Gu(e,["datum","_"],t.code),event:(e,t)=>Gu(e,["event"],t.code),handler:(e,t)=>{const n=`var datum=event.item&&event.item.datum;return ${t.code};`;return Gu(e,["_","event"],n)},encode:(e,t)=>{const{marktype:n,channels:i}=t;let r="var o=item,datum=o.datum,m=0,$;";for(const s in i){const o="o["+G(s)+"]";r+=`$=${i[s].code};if(${o}!==$)${o}=$,m=1;`}return r+=aX(i,n),r+="return m;",Gu(e,["item","_"],r)},codegen:{get(e){const t=`[${e.map(G).join("][")}]`,n=Function("_",`return _${t};`);return n.path=t,n},comparator(e,t){let n;const i=(s,o)=>{const a=t[o];let u,l;return s.path?(u=`a${s.path}`,l=`b${s.path}`):((n=n||{})["f"+o]=s,u=`this.f${o}(a)`,l=`this.f${o}(b)`),cX(u,l,-a,a)},r=Function("a","b","var u, v; return "+e.map(i).join("")+"0;");return n?r.bind(n):r}}};function dX(e){const t=this;uX(e.type)||!e.type?t.operator(e,e.update?t.operatorExpression(e.update):null):t.transform(e,e.type)}function hX(e){const t=this;if(e.params){const n=t.get(e.id);n||T("Invalid operator id: "+e.id),t.dataflow.connect(n,n.parameters(t.parseParameters(e.params),e.react,e.initonly))}}function pX(e,t){t=t||{};const n=this;for(const i in e){const r=e[i];t[i]=I(r)?r.map(s=>$S(s,n,t)):$S(r,n,t)}return t}function $S(e,t,n){if(!e||!X(e))return e;for(let i=0,r=FS.length,s;i<r;++i)if(s=FS[i],J(e,s.key))return s.parse(e,t,n);return e}var FS=[{key:"$ref",parse:gX},{key:"$key",parse:yX},{key:"$expr",parse:mX},{key:"$field",parse:bX},{key:"$encode",parse:vX},{key:"$compare",parse:xX},{key:"$context",parse:EX},{key:"$subflow",parse:AX},{key:"$tupleid",parse:wX}];function gX(e,t){return t.get(e.$ref)||T("Operator not defined: "+e.$ref)}function mX(e,t,n){e.$params&&t.parseParameters(e.$params,n);const i="e:"+e.$expr.code;return t.fn[i]||(t.fn[i]=wn(t.parameterExpression(e.$expr),e.$fields))}function yX(e,t){const n="k:"+e.$key+"_"+!!e.$flat;return t.fn[n]||(t.fn[n]=tb(e.$key,e.$flat,t.expr.codegen))}function bX(e,t){if(!e.$field)return null;const n="f:"+e.$field+"_"+e.$name;return t.fn[n]||(t.fn[n]=Vn(e.$field,e.$name,t.expr.codegen))}function xX(e,t){const n="c:"+e.$compare+"_"+e.$order,i=K(e.$compare).map(r=>r&&r.$tupleid?ie:r);return t.fn[n]||(t.fn[n]=Qy(i,e.$order,t.expr.codegen))}function vX(e,t){const n=e.$encode,i={};for(const r in n){const s=n[r];i[r]=wn(t.encodeExpression(s.$expr),s.$fields),i[r].output=s.$output}return i}function EX(e,t){return t}function AX(e,t){const n=e.$subflow;return function(i,r,s){const o=t.fork().parse(n),a=o.get(n.operators[0].id),u=o.signals.parent;return u&&u.set(s),a.detachSubflow=()=>t.detach(o),a}}function wX(){return ie}function SX(e){var t=this,n=e.filter!=null?t.eventExpression(e.filter):void 0,i=e.stream!=null?t.get(e.stream):void 0,r;e.source?i=t.events(e.source,e.type,n):e.merge&&(r=e.merge.map(s=>t.get(s)),i=r[0].merge.apply(r[0],r.slice(1))),e.between&&(r=e.between.map(s=>t.get(s)),i=i.between(r[0],r[1])),e.filter&&(i=i.filter(n)),e.throttle!=null&&(i=i.throttle(+e.throttle)),e.debounce!=null&&(i=i.debounce(+e.debounce)),i==null&&T("Invalid stream definition: "+JSON.stringify(e)),e.consume&&i.consume(!0),t.stream(e,i)}function CX(e){var t=this,n=X(n=e.source)?n.$ref:n,i=t.get(n),r=null,s=e.update,o=void 0;i||T("Source not defined: "+e.source),r=e.target&&e.target.$expr?t.eventExpression(e.target.$expr):t.get(e.target),s&&s.$expr&&(s.$params&&(o=t.parseParameters(s.$params)),s=t.handlerExpression(s.$expr)),t.update(e,i,r,s,o)}const $X={skip:!0};function FX(e){var t=this,n={};if(e.signals){var i=n.signals={};
14Object.keys(t.signals).forEach(s=>{const o=t.signals[s];e.signals(s,o)&&(i[s]=o.value)})}if(e.data){var r=n.data={};Object.keys(t.data).forEach(s=>{const o=t.data[s];e.data(s,o)&&(r[s]=o.input.value)})}return t.subcontext&&e.recurse!==!1&&(n.subcontext=t.subcontext.map(s=>s.getState(e))),n}function _X(e){var t=this,n=t.dataflow,i=e.data,r=e.signals;Object.keys(r||{}).forEach(s=>{n.update(t.signals[s],r[s],$X)}),Object.keys(i||{}).forEach(s=>{n.pulse(t.data[s].input,n.changeset().remove(Xn).insert(i[s]))}),(e.subcontext||[]).forEach((s,o)=>{const a=t.subcontext[o];a&&a.setState(s)})}function wR(e,t,n,i){return new SR(e,t,n,i)}function SR(e,t,n,i){this.dataflow=e,this.transforms=t,this.events=e.events.bind(e),this.expr=i||fX,this.signals={},this.scales={},this.nodes={},this.data={},this.fn={},n&&(this.functions=Object.create(n),this.functions.context=this)}function _S(e){this.dataflow=e.dataflow,this.transforms=e.transforms,this.events=e.events,this.expr=e.expr,this.signals=Object.create(e.signals),this.scales=Object.create(e.scales),this.nodes=Object.create(e.nodes),this.data=Object.create(e.data),this.fn=Object.create(e.fn),e.functions&&(this.functions=Object.create(e.functions),this.functions.context=this)}SR.prototype=_S.prototype={fork(){const e=new _S(this);return(this.subcontext||(this.subcontext=[])).push(e),e},detach(e){this.subcontext=this.subcontext.filter(n=>n!==e);const t=Object.keys(e.nodes);for(const n of t)e.nodes[n]._targets=null;for(const n of t)e.nodes[n].detach();e.nodes=null},get(e){return this.nodes[e]},set(e,t){return this.nodes[e]=t},add(e,t){const n=this,i=n.dataflow,r=e.value;if(n.set(e.id,t),lX(e.type)&&r&&(r.$ingest?i.ingest(t,r.$ingest,r.$format):r.$request?i.preload(t,r.$request,r.$format):i.pulse(t,i.changeset().insert(r))),e.root&&(n.root=t),e.parent){let s=n.get(e.parent.$ref);s?(i.connect(s,[t]),t.targets().add(s)):(n.unresolved=n.unresolved||[]).push(()=>{s=n.get(e.parent.$ref),i.connect(s,[t]),t.targets().add(s)})}if(e.signal&&(n.signals[e.signal]=t),e.scale&&(n.scales[e.scale]=t),e.data)for(const s in e.data){const o=n.data[s]||(n.data[s]={});e.data[s].forEach(a=>o[a]=t)}},resolve(){return(this.unresolved||[]).forEach(e=>e()),delete this.unresolved,this},operator(e,t){this.add(e,this.dataflow.add(e.value,t))},transform(e,t){this.add(e,this.dataflow.add(this.transforms[Wv(t)]))},stream(e,t){this.set(e.id,t)},update(e,t,n,i,r){this.dataflow.on(t,n,i,r,e.options)},operatorExpression(e){return this.expr.operator(this,e)},parameterExpression(e){return this.expr.parameter(this,e)},eventExpression(e){return this.expr.event(this,e)},handlerExpression(e){return this.expr.handler(this,e)},encodeExpression(e){return this.expr.encode(this,e)},parse:sX,parseOperator:dX,parseOperatorParameters:hX,parseParameters:pX,parseStream:SX,parseUpdate:CX,getState:FX,setState:_X};function kX(e){const t=e.container();t&&(t.setAttribute("role","graphics-document"),t.setAttribute("aria-roleDescription","visualization"),CR(t,e.description()))}function CR(e,t){e&&(t==null?e.removeAttribute("aria-label"):e.setAttribute("aria-label",t))}function DX(e){e.add(null,t=>(e._background=t.bg,e._resize=1,t.bg),{bg:e._signals.background})}const L0="default";function RX(e){const t=e._signals.cursor||(e._signals.cursor=e.add({user:L0,item:null}));e.on(e.events("view","pointermove"),t,(n,i)=>{const r=t.value,s=r?Y(r)?r:r.user:L0,o=i.item&&i.item.cursor||null;return r&&s===r.user&&o==r.item?r:{user:s,item:o}}),e.add(null,function(n){let i=n.cursor,r=this.value;return Y(i)||(r=i.item,i=i.user),W1(e,i&&i!==L0?i:r||i),r},{cursor:t})}function W1(e,t){const n=e.globalCursor()?typeof document<"u"&&document.body:e.container();if(n)return t==null?n.style.removeProperty("cursor"):n.style.cursor=t}function Ah(e,t){var n=e._runtime.data;return J(n,t)||T("Unrecognized data set: "+t),n[t]}function OX(e,t){return arguments.length<2?Ah(this,e).values.value:Lp.call(this,e,jo().remove(Xn).insert(t))}function Lp(e,t){Y_(t)||T("Second argument to changes must be a changeset.");const n=Ah(this,e);return n.modified=!0,this.pulse(n.input,t)}function TX(e,t){return Lp.call(this,e,jo().insert(t))}function MX(e,t){return Lp.call(this,e,jo().remove(t))}function $R(e){var t=e.padding();return Math.max(0,e._viewWidth+t.left+t.right)}function FR(e){var t=e.padding();return Math.max(0,e._viewHeight+t.top+t.bottom)}function Pp(e){var t=e.padding(),n=e._origin;return[t.left+n[0],t.top+n[1]]}function NX(e){var t=Pp(e),n=$R(e),i=FR(e);e._renderer.background(e.background()),e._renderer.resize(n,i,t),e._handler.origin(t),e._resizeListeners.forEac
14h(r=>{try{r(n,i)}catch(s){e.error(s)}})}function LX(e,t,n){var i=e._renderer,r=i&&i.canvas(),s,o,a;return r&&(a=Pp(e),o=t.changedTouches?t.changedTouches[0]:t,s=wp(o,r),s[0]-=a[0],s[1]-=a[1]),t.dataflow=e,t.item=n,t.vega=PX(e,n,s),t}function PX(e,t,n){const i=t?t.mark.marktype==="group"?t:t.mark.group:null;function r(o){var a=i,u;if(o){for(u=t;u;u=u.mark.group)if(u.mark.name===o){a=u;break}}return a&&a.mark&&a.mark.interactive?a:{}}function s(o){if(!o)return n;Y(o)&&(o=r(o));const a=n.slice();for(;o;)a[0]-=o.x||0,a[1]-=o.y||0,o=o.mark&&o.mark.group;return a}return{view:qt(e),item:qt(t||{}),group:r,xy:s,x:o=>s(o)[0],y:o=>s(o)[1]}}const kS="view",IX="timer",BX="window",zX={trap:!1};function UX(e){const t=fe({defaults:{}},e),n=(i,r)=>{r.forEach(s=>{I(i[s])&&(i[s]=mi(i[s]))})};return n(t.defaults,["prevent","allow"]),n(t,["view","window","selector"]),t}function _R(e,t,n,i){e._eventListeners.push({type:n,sources:K(t),handler:i})}function jX(e,t){var n=e._eventConfig.defaults,i=n.prevent,r=n.allow;return i===!1||r===!0?!1:i===!0||r===!1?!0:i?i[t]:r?!r[t]:e.preventDefault()}function Tf(e,t,n){const i=e._eventConfig&&e._eventConfig[t];return i===!1||X(i)&&!i[n]?(e.warn(`Blocked ${t} ${n} event listener.`),!1):!0}function qX(e,t,n){var i=this,r=new ip(n),s=function(l,c){i.runAsync(null,()=>{e===kS&&jX(i,t)&&l.preventDefault(),r.receive(LX(i,l,c))})},o;if(e===IX)Tf(i,"timer",t)&&i.timer(s,t);else if(e===kS)Tf(i,"view",t)&&i.addEventListener(t,s,zX);else if(e===BX?Tf(i,"window",t)&&typeof window<"u"&&(o=[window]):typeof document<"u"&&Tf(i,"selector",t)&&(o=Array.from(document.querySelectorAll(e))),!o)i.warn("Can not resolve event source: "+e);else{for(var a=0,u=o.length;a<u;++a)o[a].addEventListener(t,s);_R(i,o,t,s)}return r}function DS(e){return e.item}function RS(e){return e.item.mark.source}function OS(e){return function(t,n){return n.vega.view().changeset().encode(n.item,e)}}function WX(e,t){return e=[e||"hover"],t=[t||"update",e[0]],this.on(this.events("view","pointerover",DS),RS,OS(e)),this.on(this.events("view","pointerout",DS),RS,OS(t)),this}function GX(){var e=this._tooltip,t=this._timers,n=this._handler.handlers(),i=this._eventListeners,r,s,o,a,u;for(r=t.length;--r>=0;)t[r].stop();for(r=i.length;--r>=0;)for(o=i[r],s=o.sources.length;--s>=0;)o.sources[s].removeEventListener(o.type,o.handler);for(e&&e.call(this,this._handler,null,null,null),r=n.length;--r>=0;)u=n[r].type,a=n[r].handler,this._handler.off(u,a);return this}function On(e,t,n){const i=document.createElement(e);for(const r in t)i.setAttribute(r,t[r]);return n!=null&&(i.textContent=n),i}const HX="vega-bind",VX="vega-bind-name",XX="vega-bind-radio";function YX(e,t,n){if(!t)return;const i=n.param;let r=n.state;return r||(r=n.state={elements:null,active:!1,set:null,update:o=>{o!=e.signal(i.signal)&&e.runAsync(null,()=>{r.source=!0,e.signal(i.signal,o)})}},i.debounce&&(r.update=Zy(i.debounce,r.update))),(i.input==null&&i.element?KX:QX)(r,t,i,e),r.active||(e.on(e._signals[i.signal],null,()=>{r.source?r.source=!1:r.set(e.signal(i.signal))}),r.active=!0),r}function KX(e,t,n,i){const r=n.event||"input",s=()=>e.update(t.value);i.signal(n.signal,t.value),t.addEventListener(r,s),_R(i,t,r,s),e.set=o=>{t.value=o,t.dispatchEvent(JX(r))}}function JX(e){return typeof Event<"u"?new Event(e):{type:e}}function QX(e,t,n,i){const r=i.signal(n.signal),s=On("div",{class:HX}),o=n.input==="radio"?s:s.appendChild(On("label"));o.appendChild(On("span",{class:VX},n.name||n.signal)),t.appendChild(s);let a=ZX;switch(n.input){case"checkbox":a=eY;break;case"select":a=tY;break;case"radio":a=nY;break;case"range":a=iY;break}a(e,o,n,r)}function ZX(e,t,n,i){const r=On("input");for(const s in n)s!=="signal"&&s!=="element"&&r.setAttribute(s==="input"?"type":s,n[s]);r.setAttribute("name",n.signal),r.value=i,t.appendChild(r),r.addEventListener("input",()=>e.update(r.value)),e.elements=[r],e.set=s=>r.value=s}function eY(e,t,n,i){const r={type:"checkbox",name:n.signal};i&&(r.checked=!0);const s=On("input",r);t.appendChild(s),s.addEventListener("change",()=>e.update(s.checked)),e.elements=[s],e.set=o=>s.checked=!!o||null}function tY(e,t,n,i){const r=On("select",{name:n.signal}),s=n.labels||[];n.options.forEach((o,a)=>{const u={value:o};wh(o,i)&&(u.selected=!0),r.appendChild(On("option",u,(s[a]||o)+""))}),t.appendChild(r),r.addEventListener("change",()=>{e.update(n.options[r.selectedIndex])}),e.elements=[r],e.set=o=>{for(let a=0,u=n.options.length;a<u;++a)if(wh(n.options[a],o)){r.selectedIndex=a;return}}}function nY(e,t,n,i){const r=On("span",{class:XX}),s=n.labels||[];t.appendChild(r),e.elements=n.options.map((o,a)=>{const u={type:"radio",name:n.signal,value:o};wh(o,i)&&(u.checked=!0);const l=On("input",u);l.addEventListener("change",()=>e.update(o));const c=On("label",{},(s[a]||o)+"");return c.prepend(l),r.appendChild(c),l}),e.set=o=>{const a=e.elements,u=a.length;for(let l=0;l<u;++l)wh(a[l].value,o)&&(a[l].checked=!0)}}function iY(e,t,n,i){i=i!==void 0?i:(+n.max+ +n.min)/2;const r=n.max!=null?n.max:Math.max(100,+i)||100,s=n.min||Math.min(0,r,+i)||0,o=n.step||zl(s,r,100),a=On("input",{type:"range",name:n.signal,min:s,max:r,step:o});a.value=i;const u=On("span",{},+i);t.appendChild(a),t.appendChild(u);const l=()=>{u.textContent=a.value,e.update(+a.value)};a.addEventListener("input",l),a.addEventListener("change",l),e.elements=[a],e.set=c=>{a.value=c,u.textContent=c}}function wh(e,t){return e===t||e+""==t+""}function kR(e,t,n,i,r,s){return t=t||new i(e.loader()),t.initialize(n,$R(e),FR(e),Pp(e),r,s).background(e.background())}function Gv(e,t){return t?function(){try{t.apply(this,arguments)}catch(n){e.error(n)}}:null}function rY(e,t,n,i){const r=new i(e.loader(),Gv(e,e.tooltip())).scene(e.scenegraph().root).initialize(n,Pp(e),e);
vendor: 8,534 bytes, lines 14-15
14return t&&t.handlers().forEach(s=>{r.on(s.type,s.handler)}),r}function sY(e,t){const n=this,i=n._renderType,r=n._eventConfig.bind,s=Sp(i);e=n._el=e?P0(n,e,!0):null,kX(n),s||n.error("Unrecognized renderer type: "+i);const o=s.handler||Rc,a=e?s.renderer:s.headless;return n._renderer=a?kR(n,n._renderer,e,a):null,n._handler=rY(n,n._handler,e,o),n._redraw=!0,e&&r!=="none"&&(t=t?n._elBind=P0(n,t,!0):e.appendChild(On("form",{class:"vega-bindings"})),n._bind.forEach(u=>{u.param.element&&r!=="container"&&(u.element=P0(n,u.param.element,!!u.param.input))}),n._bind.forEach(u=>{YX(n,u.element||t,u)})),n}function P0(e,t,n){if(typeof t=="string")if(typeof document<"u"){if(t=document.querySelector(t),!t)return e.error("Signal bind element not found: "+t),null}else return e.error("DOM document instance not found."),null;if(t&&n)try{t.textContent=""}catch(i){t=null,e.error(i)}return t}const Hu=e=>+e||0,oY=e=>({top:e,bottom:e,left:e,right:e});function TS(e){return X(e)?{top:Hu(e.top),bottom:Hu(e.bottom),left:Hu(e.left),right:Hu(e.right)}:oY(Hu(e))}async function Hv(e,t,n,i){const r=Sp(t),s=r&&r.headless;return s||T("Unrecognized renderer type: "+t),await e.runAsync(),kR(e,null,null,s,n,i).renderAsync(e._scenegraph.root)}async function aY(e,t){e!==us.Canvas&&e!==us.SVG&&e!==us.PNG&&T("Unrecognized image type: "+e);const n=await Hv(this,e,t);return e===us.SVG?uY(n.svg(),"image/svg+xml"):n.canvas().toDataURL("image/png")}function uY(e,t){const n=new Blob([e],{type:t});return window.URL.createObjectURL(n)}async function lY(e,t){return(await Hv(this,us.Canvas,e,t)).canvas()}async function cY(e){return(await Hv(this,us.SVG,e)).svg()}function fY(e,t,n){return wR(e,Pa,ec,n).parse(t)}function dY(e){var t=this._runtime.scales;return J(t,e)||T("Unrecognized scale or projection: "+e),t[e].value}var DR="width",RR="height",Vv="padding",MS={skip:!0};function OR(e,t){var n=e.autosize(),i=e.padding();return t-(n&&n.contains===Vv?i.left+i.right:0)}function TR(e,t){var n=e.autosize(),i=e.padding();return t-(n&&n.contains===Vv?i.top+i.bottom:0)}function hY(e){var t=e._signals,n=t[DR],i=t[RR],r=t[Vv];function s(){e._autosize=e._resize=1}e._resizeWidth=e.add(null,a=>{e._width=a.size,e._viewWidth=OR(e,a.size),s()},{size:n}),e._resizeHeight=e.add(null,a=>{e._height=a.size,e._viewHeight=TR(e,a.size),s()},{size:i});const o=e.add(null,s,{pad:r});e._resizeWidth.rank=n.rank+1,e._resizeHeight.rank=i.rank+1,o.rank=r.rank+1}function pY(e,t,n,i,r,s){this.runAfter(o=>{let a=0;o._autosize=0,o.width()!==n&&(a=1,o.signal(DR,n,MS),o._resizeWidth.skip(!0)),o.height()!==i&&(a=1,o.signal(RR,i,MS),o._resizeHeight.skip(!0)),o._viewWidth!==e&&(o._resize=1,o._viewWidth=e),o._viewHeight!==t&&(o._resize=1,o._viewHeight=t),(o._origin[0]!==r[0]||o._origin[1]!==r[1])&&(o._resize=1,o._origin=r),a&&o.run("enter"),s&&o.runAfter(u=>u.resize())},!1,1)}function gY(e){return this._runtime.getState(e||{data:mY,signals:yY,recurse:!0})}function mY(e,t){return t.modified&&I(t.input.value)&&!e.startsWith("_:vega:_")}function yY(e,t){return!(e==="parent"||t instanceof Pa.proxy)}function bY(e){return this.runAsync(null,t=>{t._trigger=!1,t._runtime.setState(e)},t=>{t._trigger=!0}),this}function xY(e,t){function n(i){e({timestamp:Date.now(),elapsed:i})}this._timers.push(G8(n,t))}function vY(e,t,n,i){const r=e.element();r&&r.setAttribute("title",EY(i))}function EY(e){return e==null?"":I(e)?MR(e):X(e)&&!ps(e)?AY(e):e+""}function AY(e){return Object.keys(e).map(t=>{const n=e[t];return t+": "+(I(n)?MR(n):NR(n))}).join(`
15`)}function MR(e){return"["+e.map(NR).join(", ")+"]"}function NR(e){return I(e)?"[…]":X(e)&&!ps(e)?"{…}":e}function wY(){if(this.renderer()==="canvas"&&this._renderer._canvas){let e=null;const t=()=>{e?.();const n=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);n.addEventListener("change",t),e=()=>{n.removeEventListener("change",t)},this._renderer._canvas.getContext("2d").pixelRatio=window.devicePixelRatio||1,this._redraw=!0,this._resize=1,this.resize().runAsync()};t()}}function LR(e,t){const n=this;if(t=t||{},_a.call(n),t.loader&&n.loader(t.loader),t.logger&&n.logger(t.logger),t.logLevel!=null&&n.logLevel(t.logLevel),t.locale||e.locale){const s=fe({},e.locale,t.locale);n.locale(B_(s.number,s.time))}n._el=null,n._elBind=null,n._renderType=t.renderer||us.Canvas,n._scenegraph=new TD;const i=n._scenegraph.root;n._renderer=null,n._tooltip=t.tooltip||vY,n._redraw=!0,n._handler=new Rc().scene(i),n._globalCursor=!1,n._preventDefault=!1,n._timers=[],n._eventListeners=[],n._resizeListeners=[],n._eventConfig=UX(e.eventConfig),n.globalCursor(n._eventConfig.globalCursor);const r=fY(n,e,t.expr);n._runtime=r,n._signals=r.signals,n._bind=(e.bindings||[]).map(s=>({state:null,param:fe({},s)})),r.root&&r.root.set(i),i.source=r.data.root.input,n.pulse(r.data.root.input,n.changeset().insert(i.items)),n._width=n.width(),n._height=n.height(),n._viewWidth=OR(n,n._width),n._viewHeight=TR(n,n._height),n._origin=[0,0],n._resize=0,n._autosize=1,hY(n),DX(n),RX(n),n.description(e.description),t.hover&&n.hover(),t.container&&n.initialize(t.container,t.bind),t.watchPixelRatio&&n._watchPixelRatio()}function Mf(e,t){return J(e._signals,t)?e._signals[t]:T("Unrecognized signal name: "+G(t))}function PR(e,t){const n=(e._targets||[]).filter(i=>i._update&&i._update.handler===t);return n.length?n[0]:null}function NS(e,t,n,i){let r=PR(n,i);return r||(r=Gv(e,()=>i(t,n.value)),r.handler=i,e.on(n,null,r)),e}function LS(e,t,n){const i=PR(t,n);return i&&t._targets.remove(i),e}H(LR,_a,{async evaluate(e,t,n){if(await _a.prototype.evaluate.call(this,e,t),this._redraw||this._resize)try{this._renderer&&(this._resize&&(this._resize=0,NX(this)),await this._renderer.renderAsync(this._scenegraph.root)),this._redraw=!1}catch(i){this.error(i)}return n&&Kf(this,n),this},dirty(e){this._redraw=!0,this._renderer&&this._renderer.dirty(e)},description(e){if(arguments.length){const t=e!=null?e+"":null;return t!==this._desc&&CR(this._el,this._desc=t),this}return this._desc},container(){return this._el},scenegraph(){return this._scenegraph},origin(){return this._origin.slice()},signal(e,t,n){const i=Mf(this,e);return arguments.length===1?i.value:this.update(i,t,n)},width(e){return arguments.length?this.signal("width",e):this.signal("width")},height(e){return arguments.length?this.signal("height",e):this.signal("height")},padding(e){return arguments.length?this.signal("padding",TS(e)):TS(this.signal("padding"))},autosize(e){return arguments.length?this.signal("autosize",e):this.signal("autosize")},background(e){return arguments.length?this.signal("background",e):this.signal("background")},renderer(e){return arguments.length?(Sp(e)||T("Unrecognized renderer type: "+e),e!==this._renderType&&(this._renderType=e,this._resetRenderer()),this):this._renderType},tooltip(e){return arguments.length?(e!==this._tooltip&&(this._tooltip=e,this._resetRenderer()),this):this._tooltip},loader(e){return arguments.length?(e!==this._loader&&(_a.prototype.loader.call(this,e),this._resetRenderer()),this):this._loader},resize(){return this._autosize=1,this.touch(Mf(this,"autosize"))},_resetRenderer(){this._renderer&&(this._renderer=null,this.initialize(this._el,this._elBind))},_resizeView:pY,addEventListener(e,t,n){let i=t;return n&&n.trap===!1||(i=Gv(this,t),i.raw=t),this._handler.on(e,i),this},removeEventListener(e,t){for(var n=this._handler.handlers(e),i=n.length,r,s;--i>=0;)if(s=n[i].type,r=n[i].handler,e===s&&(t===r||t===r.raw)){this._handler.off(s,r);break}return this},addResizeListener(e){const t=this._resizeListeners;return t.includes(e)||t.push(e),this},removeResizeListener(e){var t=this._resizeListeners,n=t.indexOf(e);return n>=0&&t.splice(n,1),this},addSignalListener(e,t){return NS(this,e,Mf(this,e),t)},removeSignalListener(e,t){return LS(this,Mf(this,e),t)},addDataListener(e,t){return NS(this,e,Ah(this,e).values,t)},removeDataListener(e,t){return LS(this,Ah(this,e).values,t)},globalCursor(e){if(arguments.length){if(this._globalCursor!==!!e){const t=W1(this,null);this._globalCursor=!!e,t&&W1(this,t)}return this}else return this._globalCursor},preventDefault(e){return arguments.length?(this._preventDefault=e,this):this._preventDefault},timer:xY,events:qX,finalize:GX,hover:WX,data:OX,change:Lp,insert:TX,remove:MX,scale:dY,initialize:sY,toImageURL:aY,toCanvas:lY,toSVG:cY,getState:gY,setState:bY,_watchPixelRatio:wY});const SY="view",Sh="[",Ch="]",IR="{",BR="}",CY=":",zR=",",$Y="@",FY=">",_Y=/[[\]{}]/,kY={"*":1,arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1};let UR,jR;
15function Ts(e,t,n){return UR=t||SY,jR=n||kY,qR(e.trim()).map(G1)}function DY(e){return jR[e]}function Ml(e,t,n,i,r){const s=e.length;let o=0,a;for(;t<s;++t){if(a=e[t],!o&&a===n)return t;r&&r.indexOf(a)>=0?--o:i&&i.indexOf(a)>=0&&++o}return t}function qR(e){const t=[],n=e.length;let i=0,r=0;for(;r<n;)r=Ml(e,r,zR,Sh+IR,Ch+BR),t.push(e.substring(i,r).trim()),i=++r;if(t.length===0)throw"Empty event selector: "+e;return t}function G1(e){return e[0]==="["?RY(e):OY(e)}function RY(e){const t=e.length;let n=1,i;if(n=Ml(e,n,Ch,Sh,Ch),n===t)throw"Empty between selector: "+e;if(i=qR(e.substring(1,n)),i.length!==2)throw"Between selector must have two elements: "+e;if(e=e.slice(n+1).trim(),e[0]!==FY)throw"Expected '>' after between selector: "+e;i=i.map(G1);const r=G1(e.slice(1).trim());return r.between?{between:i,stream:r}:(r.between=i,r)}function OY(e){const t={source:UR},n=[];let i=[0,0],r=0,s=0,o=e.length,a=0,u,l;if(e[o-1]===BR){if(a=e.lastIndexOf(IR),a>=0){try{i=TY(e.substring(a+1,o-1))}catch{throw"Invalid throttle specification: "+e}e=e.slice(0,a).trim(),o=e.length}else throw"Unmatched right brace: "+e;a=0}if(!o)throw e;if(e[0]===$Y&&(r=++a),u=Ml(e,a,CY),u<o&&(n.push(e.substring(s,u).trim()),s=a=++u),a=Ml(e,a,Sh),a===o)n.push(e.substring(s,o).trim());else if(n.push(e.substring(s,a).trim()),l=[],s=++a,s===o)throw"Unmatched left bracket: "+e;for(;a<o;){if(a=Ml(e,a,Ch),a===o)throw"Unmatched left bracket: "+e;if(l.push(e.substring(s,a).trim()),a<o-1&&e[++a]!==Sh)throw"Expected left bracket: "+e;s=++a}if(!(o=n.length)||_Y.test(n[o-1]))throw"Invalid event selector: "+e;return o>1?(t.type=n[1],r?t.markname=n[0].slice(1):DY(n[0])?t.marktype=n[0]:t.source=n[0]):t.type=n[0],t.type.slice(-1)==="!"&&(t.consume=!0,t.type=t.type.slice(0,-1)),l!=null&&(t.filter=l),i[0]&&(t.throttle=i[0]),i[1]&&(t.debounce=i[1]),t}function TY(e){const t=e.split(zR);if(!e.length||t.length>2)throw e;return t.map(n=>{const i=+n;if(i!==i)throw e;return i})}function MY(e){return X(e)?e:{type:e||"pad"}}const Vu=e=>+e||0,NY=e=>({top:e,bottom:e,left:e,right:e});function LY(e){return X(e)?e.signal?e:{top:Vu(e.top),bottom:Vu(e.bottom),left:Vu(e.left),right:Vu(e.right)}:NY(Vu(e))}const ct=e=>X(e)&&!I(e)?fe({},e):{value:e};function PS(e,t,n,i){return n!=null?(X(n)&&!I(n)||I(n)&&n.length&&X(n[0])?e.update[t]=n:e[i||"enter"][t]={value:n},1):0}function Ct(e,t,n){for(const i in t)PS(e,i,t[i]);for(const i in n)PS(e,i,n[i],"update")}function Eu(e,t,n){for(const i in t)n&&J(n,i)||(e[i]=fe(e[i]||{},t[i]));return e}function ma(e,t){return t&&(t.enter&&t.enter[e]||t.update&&t.update[e])}const Xv="mark",Yv="frame",Kv="scope",PY="axis",IY="axis-domain",BY="axis-grid",zY="axis-label",UY="axis-tick",jY="axis-title",qY="legend",WY="legend-band",GY="legend-entry",HY="legend-gradient",WR="legend-label",VY="legend-symbol",XY="legend-title",YY="title",KY="title-text",JY="title-subtitle";function QY(e,t,n,i,r){const s={},o={};let a,u,l,c;u="lineBreak",t==="text"&&r[u]!=null&&!ma(u,e)&&I0(s,u,r[u]),(n=="legend"||String(n).startsWith("axis"))&&(n=null),c=n===Yv?r.group:n===Xv?fe({},r.mark,r[t]):null;for(u in c)l=ma(u,e)||(u==="fill"||u==="stroke")&&(ma("fill",e)||ma("stroke",e)),l||I0(s,u,c[u]);K(i).forEach(f=>{const d=r.style&&r.style[f];for(const h in d)ma(h,e)||I0(s,h,d[h])}),e=fe({},e);for(u in s)c=s[u],c.signal?(a=a||{})[u]=c:o[u]=c;return e.enter=fe(o,e.enter),a&&(e.update=fe(a,e.update)),e}function I0(e,t,n){e[t]=n&&n.signal?{signal:n.signal}:{value:n}}const GR=e=>Y(e)?G(e):e.signal?`(${e.signal})`:HR(e);function Ip(e){if(e.gradient!=null)return eK(e);let t=e.signal?`(${e.signal})`:e.color?ZY(e.color):e.field!=null?HR(e.field):e.value!==void 0?G(e.value):void 0;return e.scale!=null&&(t=tK(e,t)),t===void 0&&(t=null),e.exponent!=null&&(t=`pow(${t},${hd(e.exponent)})`),e.mult!=null&&(t+=`*${hd(e.mult)}`),e.offset!=null&&(t+=`+${hd(e.offset)}`),e.round&&(t=`round(${t})`),t}const Nf=(e,t,n,i)=>`(${e}(${[t,n,i].map(Ip).join(",")})+'')`;function ZY(e){return e.c?Nf("hcl",e.h,e.c,e.l):e.h||e.s?Nf("hsl",e.h,e.s,e.l):e.l||e.a?Nf("lab",e.l,e.a,e.b):e.r||e.g||e.b?Nf("rgb",e.r,e.g,e.b):null}function eK(e){const t=[e.start,e.stop,e.count].map(n=>n==null?null:G(n));for(;t.length&&ve(t)==null;)t.pop();return t.unshift(GR(e.gradient)),`gradient(${t.join(",")})`}function hd(e){return X(e)?"("+Ip(e)+")":e}function HR(e){return VR(X(e)?e:{datum:e})}function VR(e){let t,n,i;if(e.signal)t="datum",i=e.signal;else if(e.group||e.parent){for(n=Math.max(1,e.level||1),t="item";n-- >0;)t+=".mark.group";e.parent?(i=e.parent,t+=".datum"):i=e.group}else e.datum?(t="datum",i=e.datum):T("Invalid field reference: "+G(e));return e.signal||(i=Y(i)?nr(i).map(G).join("]["):VR(i)),t+"["+i+"]"}function tK(e,t){const n=GR(e.scale);return e.range!=null?t=`lerp(_range(${n}), ${+e.range})`:(t!==void 0&&(t=`_scale(${n}, ${t})`),e.band&&(t=(t?t+"+":"")+`_bandwidth(${n})`+(+e.band==1?"":"*"+hd(e.band)),e.extra&&(t=`(datum.extra ? _scale(${n}, datum.extra.value) : ${t})`)),t==null&&(t="0")),t}function nK(e){let t="";return e.forEach(n=>{const i=Ip(n);t+=n.test?`(${n.test})?${i}:`:i}),ve(t)===":"&&(t+="null"),t}function XR(e,t,n,i,r,s){const o={};s=s||{},s.encoders={$encode:o},e=QY(e,t,n,i,r.config);for(const a in e)o[a]=iK(e[a],t,s,r);return s}function iK(e,t,n,i){const r={},s={};for(const o in e)e[o]!=null&&(r[o]=sK(rK(e[o]),i,n,s));return{$expr:{marktype:t,channels:r},$fields:Object.keys(s),$output:Object.keys(e)}}function rK(e){return I(e)?nK(e):Ip(e)}function sK(e,t,n,i){const r=Qi(e,t);return r.$fields.forEach(s=>i[s]=1),fe(n,r.$params),r.$expr}const oK="outer",aK=["value","update","init","react","bind"];function IS(e,t){T(e+' for "outer" push: '+G(t))}function YR(e,t){const n=e.name;if(e.push===oK)t.signals[n]||IS("No prior signal definition",n),aK.forEach(i=>
15{e[i]!==void 0&&IS("Invalid property ",i)});else{const i=t.addSignal(n,e.value);e.react===!1&&(i.react=!1),e.bind&&t.addBinding(n,e.bind)}}function H1(e,t,n,i){this.id=-1,this.type=e,this.value=t,this.params=n,i&&(this.parent=i)}function Bp(e,t,n,i){return new H1(e,t,n,i)}function $h(e,t){return Bp("operator",e,t)}function ne(e){const t={$ref:e.id};return e.id<0&&(e.refs=e.refs||[]).push(t),t}function tc(e,t){return t?{$field:e,$name:t}:{$field:e}}const V1=tc("key");function BS(e,t){return{$compare:e,$order:t}}function uK(e,t){const n={$key:e};return t&&(n.$flat=!0),n}const lK="ascending",cK="descending";function fK(e){return X(e)?(e.order===cK?"-":"+")+zp(e.op,e.field):""}function zp(e,t){return(e&&e.signal?"$"+e.signal:e||"")+(e&&t?"_":"")+(t&&t.signal?"$"+t.signal:t||"")}const Jv="scope",X1="view";function ot(e){return e&&e.signal}function dK(e){return e&&e.expr}function pd(e){if(ot(e))return!0;if(X(e)){for(const t in e)if(pd(e[t]))return!0}return!1}function ai(e,t){return e??t}function ho(e){return e&&e.signal||e}const zS="timer";function nc(e,t){return(e.merge?pK:e.stream?gK:e.type?mK:T("Invalid stream specification: "+G(e)))(e,t)}function hK(e){return e===Jv?X1:e||X1}function pK(e,t){const n=e.merge.map(r=>nc(r,t)),i=Qv({merge:n},e,t);return t.addStream(i).id}function gK(e,t){const n=nc(e.stream,t),i=Qv({stream:n},e,t);return t.addStream(i).id}function mK(e,t){let n;e.type===zS?(n=t.event(zS,e.throttle),e={between:e.between,filter:e.filter}):n=t.event(hK(e.source),e.type);const i=Qv({stream:n},e,t);return Object.keys(i).length===1?n:t.addStream(i).id}function Qv(e,t,n){let i=t.between;return i&&(i.length!==2&&T('Stream "between" parameter must have 2 entries: '+G(t)),e.between=[nc(i[0],n),nc(i[1],n)]),i=t.filter?[].concat(t.filter):[],(t.marktype||t.markname||t.markrole)&&i.push(yK(t.marktype,t.markname,t.markrole)),t.source===Jv&&i.push("inScope(event.item)"),i.length&&(e.filter=Qi("("+i.join(")&&(")+")",n).$expr),(i=t.throttle)!=null&&(e.throttle=+i),(i=t.debounce)!=null&&(e.debounce=+i),t.consume&&(e.consume=!0),e}function yK(e,t,n){const i="event.item";return i+(e&&e!=="*"?"&&"+i+".mark.marktype==='"+e+"'":"")+(n?"&&"+i+".mark.role==='"+n+"'":"")+(t?"&&"+i+".mark.name==='"+t+"'":"")}const bK={code:"_.$value",ast:{type:"Identifier",value:"value"}};function xK(e,t,n){const i=e.encode,r={target:n};let s=e.events,o=e.update,a=[];s||T("Signal update missing events specification."),Y(s)&&(s=Ts(s,t.isSubscope()?Jv:X1)),s=K(s).filter(u=>u.signal||u.scale?(a.push(u),0):1),a.length>1&&(a=[EK(a)]),s.length&&a.push(s.length>1?{merge:s}:s[0]),i!=null&&(o&&T("Signal encode and update are mutually exclusive."),o="encode(item(),"+G(i)+")"),r.update=Y(o)?Qi(o,t):o.expr!=null?Qi(o.expr,t):o.value!=null?o.value:o.signal!=null?{$expr:bK,$params:{$value:t.signalRef(o.signal)}}:T("Invalid signal update specification."),e.force&&(r.options={force:!0}),a.forEach(u=>t.addUpdate(fe(vK(u,t),r)))}function vK(e,t){return{source:e.signal?t.signalRef(e.signal):e.scale?t.scaleRef(e.scale):nc(e,t)}}function EK(e){return{signal:"["+e.map(t=>t.scale?'scale("'+t.scale+'")':t.signal)+"]"}}function AK(e,t){const n=t.getSignal(e.name);let i=e.update;e.init&&(i?T("Signals can not include both init and update expressions."):(i=e.init,n.initonly=!0)),i&&(i=Qi(i,t),n.update=i.$expr,n.params=i.$params),e.on&&e.on.forEach(r=>xK(r,t,n.id))}const Me=e=>(t,n,i)=>Bp(e,n,t||void 0,i),KR=Me("aggregate"),wK=Me("axisticks"),JR=Me("bound"),Si=Me("collect"),US=Me("compare"),SK=Me("datajoin"),QR=Me("encode"),CK=Me("expression"),$K=Me("facet"),FK=Me("field"),_K=Me("key"),kK=Me("legendentries"),DK=Me("load"),RK=Me("mark"),OK=Me("multiextent"),TK=Me("multivalues"),MK=Me("overlap"),NK=Me("params"),ZR=Me("prefacet"),LK=Me("projection"),PK=Me("proxy"),IK=Me("relay"),eO=Me("render"),BK=Me("scale"),Go=Me("sieve"),zK=Me("sortitems"),tO=Me("viewlayout"),UK=Me("values");let jK=0;const nO={min:"min",max:"max",count:"sum"};function qK(e,t){const n=e.type||"linear";Gk(n)||T("Unrecognized scale type: "+G(n)),t.addScale(e.name,{type:n,domain:void 0})}function WK(e,t){const n=t.getScale(e.name).params;let i;n.domain=iO(e.domain,e,t),e.range!=null&&(n.range=sO(e,t,n)),e.interpolate!=null&&eJ(e.interpolate,n),e.nice!=null&&(n.nice=ZK(e.nice,t)),e.bins!=null&&(n.bins=QK(e.bins,t));for(i in e)J(n,i)||i==="name"||(n[i]=qn(e[i],t))}function qn(e,t){return X(e)?e.signal?t.signalRef(e.signal):T("Unsupported object: "+G(e)):e}function gd(e,t){return e.signal?t.signalRef(e.signal):e.map(n=>qn(n,t))}function Up(e){T("Can not find data set: "+G(e))}function iO(e,t,n){if(!e){(t.domainMin!=null||t.domainMax!=null)&&T("No scale domain defined for domainMin/d
15omainMax to override.");return}return e.signal?n.signalRef(e.signal):(I(e)?GK:e.fields?VK:HK)(e,t,n)}function GK(e,t,n){return e.map(i=>qn(i,n))}function HK(e,t,n){const i=n.getData(e.data);return i||Up(e.data),za(t.type)?i.valuesRef(n,e.field,rO(e.sort,!1)):Xk(t.type)?i.domainRef(n,e.field):i.extentRef(n,e.field)}function VK(e,t,n){const i=e.data,r=e.fields.reduce((s,o)=>(o=Y(o)?{data:i,field:o}:I(o)||o.signal?XK(o,n):o,s.push(o),s),[]);return(za(t.type)?YK:Xk(t.type)?KK:JK)(e,n,r)}function XK(e,t){const n="_:vega:_"+jK++,i=Si({});if(I(e))i.value={$ingest:e};else if(e.signal){const r="setdata("+G(n)+","+e.signal+")";i.params.input=t.signalRef(r)}return t.addDataPipeline(n,[i,Go({})]),{data:n,field:"data"}}function YK(e,t,n){const i=rO(e.sort,!0);let r,s;const o=n.map(l=>{const c=t.getData(l.data);return c||Up(l.data),c.countsRef(t,l.field,i)}),a={groupby:V1,pulse:o};i&&(r=i.op||"count",s=i.field?zp(r,i.field):"count",a.ops=[nO[r]],a.fields=[t.fieldRef(s)],a.as=[s]),r=t.add(KR(a));const u=t.add(Si({pulse:ne(r)}));return s=t.add(UK({field:V1,sort:t.sortRef(i),pulse:ne(u)})),ne(s)}function rO(e,t){return e&&(!e.field&&!e.op?X(e)?e.field="key":e={field:"key"}:!e.field&&e.op!=="count"?T("No field provided for sort aggregate op: "+e.op):t&&e.field&&e.op&&!nO[e.op]&&T("Multiple domain scales can not be sorted using "+e.op)),e}function KK(e,t,n){const i=n.map(r=>{const s=t.getData(r.data);return s||Up(r.data),s.domainRef(t,r.field)});return ne(t.add(TK({values:i})))}function JK(e,t,n){const i=n.map(r=>{const s=t.getData(r.data);return s||Up(r.data),s.extentRef(t,r.field)});return ne(t.add(OK({extents:i})))}function QK(e,t){return e.signal||I(e)?gd(e,t):t.objectProperty(e)}function ZK(e,t){return e.signal?t.signalRef(e.signal):X(e)?{interval:qn(e.interval),step:qn(e.step)}:qn(e)}function eJ(e,t){t.interpolate=qn(e.type||e),e.gamma!=null&&(t.interpolateGamma=qn(e.gamma))}function sO(e,t,n){const i=t.config.range;let r=e.range;if(r.signal)return t.signalRef(r.signal);if(Y(r)){if(i&&J(i,r))return e=fe({},e,{range:i[r]}),sO(e,t,n);r==="width"?r=[0,{signal:"width"}]:r==="height"?r=za(e.type)?[0,{signal:"height"}]:[{signal:"height"},0]:T("Unrecognized scale range value: "+G(r))}else if(r.scheme){n.scheme=I(r.scheme)?gd(r.scheme,t):qn(r.scheme,t),r.extent&&(n.schemeExtent=gd(r.extent,t)),r.count&&(n.schemeCount=qn(r.count,t));return}else if(r.step){n.rangeStep=qn(r.step,t);return}else{if(za(e.type)&&!I(r))return iO(r,e,t);I(r)||T("Unsupported range type: "+G(r))}return r.map(s=>(I(s)?gd:qn)(s,t))}function tJ(e,t){const n=t.config.projection||{},i={};for(const r in e)r!=="name"&&(i[r]=Y1(e[r],r,t));for(const r in n)i[r]==null&&(i[r]=Y1(n[r],r,t));t.addProjection(e.name,i)}function Y1(e,t,n){return I(e)?e.map(i=>Y1(i,t,n)):X(e)?e.signal?n.signalRef(e.signal):t==="fit"?e:T("Unsupported parameter object: "+G(e)):e}const Ci="top",Au="left",wu="right",Cs="bottom",oO="center",nJ="vertical",iJ="start",rJ="middle",sJ="end",K1="index",Zv="label",oJ="offset",Xa="perc",aJ="perc2",Gn="value",zc="guide-label",e2="guide-title",uJ="group-title",lJ="group-subtitle",jS="symbol",md="gradient",J1="discrete",Q1="size",cJ="shape",fJ="fill",dJ="stroke",hJ="strokeWidth",pJ="strokeDash",gJ="opacity",t2=[Q1,cJ,fJ,dJ,hJ,pJ,gJ],Uc={name:1,style:1,interactive:1},Ee={value:0},Hn={value:1},jp="group",aO="rect",n2="rule",mJ="symbol",Ho="text";function ic(e){return e.type=jp,e.interactive=e.interactive||!1,e}function Sn(e,t){const n=(i,r)=>ai(e[i],ai(t[i],r));return n.isVertical=i=>nJ===ai(e.direction,t.direction||(i?t.symbolDirection:t.gradientDirection)),n.gradientLength=()=>ai(e.gradientLength,t.gradientLength||t.gradientWidth),n.gradientThickness=()=>ai(e.gradientThickness,t.gradientThickness||t.gradientHeight),n.entryColumns=()=>ai(e.columns,ai(t.columns,+n.isVertical(!0))),n}function uO(e,t){const n=t&&(t.update&&t.update[e]||t.enter&&t.enter[e]);return n&&n.signal?n:n?n.value:null}function yJ(e,t,n){const i=t.config.style[n];return i&&i[e]}function qp(e,t,n){return`item.anchor === '${iJ}' ? ${e} : item.anchor === '${sJ}' ? ${t} : ${n}`}const i2=qp(G(Au),G(wu),G(oO));function bJ(e){const t=e("tickBand");let n=e("tickOffset"),i,r;return t?t.signal?(i={signal:`(${t.signal}) === 'extent' ? 1 : 0.5`},r={signal:`(${t.signal}) === 'extent'`},X(n)||(n={signal:`(${t.signal}) === 'extent' ? 0 : ${n}`})):t==="extent"?(i=1,r=!0,n=0):(i=.5,r=!1):(i=e("bandPosition"),r=e("tickExtra")),{extra:r,band:i,offset:n}}function lO(e,t){return t?e?X(e)?Object.assign({},e,{offset:lO(e.offset,t)}):{value:e,offset:t}:t:e}function Pn(e,t){return t?(e.name=t.name,e.style=t.style||e.style,e.interactive=!!t.interactive,e.encode=Eu(e.encode,t,Uc)):e.interactive=!1,e}function xJ(e,t,n,i){const r=Sn(e,n),s=r.isVertical(),o=r.gradientThickness(),a=r.gradientLength();let u,l,c,f,d;s?(l=[0,1],c=[0,0],f=o,d=a):(l=[0,0],c=[1,0],f=a,d=o);const h={enter:u={opacity:Ee,x:Ee,y:Ee,width:ct(f),height:ct(d)},update:fe({},u,{opacity:Hn,fill:{gradient:t,start:l,stop:c}}),exit:{opacity:Ee}};return Ct(h,{stroke:r("gradientStrokeColor"),strokeWidth:r("gradientStrokeWidth")},{opacity:r("gradientOpacity")}),Pn({type:aO,role:HY,encode:h},i)}function vJ(e,t,n,i,r){const s=Sn(e,n),o=s.isVertical(),a=s.gradientThickness(),u=s.gradientLength();let l,c,f,d,h="";o?(l="y",f="y2",c="x",d="width",h="1-"):(l="x",f="x2",c="y",d="height");const p={opacity:Ee,fill:{scale:t,field:Gn}};p[l]={signal:h+"datum."+Xa,mult:u},p[c]=Ee,p[f]={signal:h+"datum."+aJ,mult:u},p[d]=ct(a);const g={enter:p,update:fe({}
15,p,{opacity:Hn}),exit:{opacity:Ee}};return Ct(g,{stroke:s("gradientStrokeColor"),strokeWidth:s("gradientStrokeWidth")},{opacity:s("gradientOpacity")}),Pn({type:aO,role:WY,key:Gn,from:r,encode:g},i)}const EJ=`datum.${Xa}<=0?"${Au}":datum.${Xa}>=1?"${wu}":"${oO}"`,AJ=`datum.${Xa}<=0?"${Cs}":datum.${Xa}>=1?"${Ci}":"${rJ}"`;function qS(e,t,n,i){const r=Sn(e,t),s=r.isVertical(),o=ct(r.gradientThickness()),a=r.gradientLength();let u=r("labelOverlap"),l,c,f,d,h="";const p={enter:l={opacity:Ee},update:c={opacity:Hn,text:{field:Zv}},exit:{opacity:Ee}};return Ct(p,{fill:r("labelColor"),fillOpacity:r("labelOpacity"),font:r("labelFont"),fontSize:r("labelFontSize"),fontStyle:r("labelFontStyle"),fontWeight:r("labelFontWeight"),limit:ai(e.labelLimit,t.gradientLabelLimit)}),s?(l.align={value:"left"},l.baseline=c.baseline={signal:AJ},f="y",d="x",h="1-"):(l.align=c.align={signal:EJ},l.baseline={value:"top"},f="x",d="y"),l[f]=c[f]={signal:h+"datum."+Xa,mult:a},l[d]=c[d]=o,o.offset=ai(e.labelOffset,t.gradientLabelOffset)||0,u=u?{separation:r("labelSeparation"),method:u,order:"datum."+K1}:void 0,Pn({type:Ho,role:WR,style:zc,key:Gn,from:i,encode:p,overlap:u},n)}function wJ(e,t,n,i,r){const s=Sn(e,t),o=n.entries,a=!!(o&&o.interactive),u=o?o.name:void 0,l=s("clipHeight"),c=s("symbolOffset"),f={data:"value"},d=`(${r}) ? datum.${oJ} : datum.${Q1}`,h=l?ct(l):{field:Q1},p=`datum.${K1}`,g=`max(1, ${r})`;let m,y,b,x,v;h.mult=.5,m={enter:y={opacity:Ee,x:{signal:d,mult:.5,offset:c},y:h},update:b={opacity:Hn,x:y.x,y:y.y},exit:{opacity:Ee}};let A=null,w=null;e.fill||(A=t.symbolBaseFillColor,w=t.symbolBaseStrokeColor),Ct(m,{fill:s("symbolFillColor",A),shape:s("symbolType"),size:s("symbolSize"),stroke:s("symbolStrokeColor",w),strokeDash:s("symbolDash"),strokeDashOffset:s("symbolDashOffset"),strokeWidth:s("symbolStrokeWidth")},{opacity:s("symbolOpacity")}),t2.forEach(F=>{e[F]&&(b[F]=y[F]={scale:e[F],field:Gn})});const E=Pn({type:mJ,role:VY,key:Gn,from:f,clip:l?!0:void 0,encode:m},n.symbols),S=ct(c);S.offset=s("labelOffset"),m={enter:y={opacity:Ee,x:{signal:d,offset:S},y:h},update:b={opacity:Hn,text:{field:Zv},x:y.x,y:y.y},exit:{opacity:Ee}},Ct(m,{align:s("labelAlign"),baseline:s("labelBaseline"),fill:s("labelColor"),fillOpacity:s("labelOpacity"),font:s("labelFont"),fontSize:s("labelFontSize"),fontStyle:s("labelFontStyle"),fontWeight:s("labelFontWeight"),limit:s("labelLimit")});const C=Pn({type:Ho,role:WR,style:zc,key:Gn,from:f,encode:m},n.labels);return m={enter:{noBound:{value:!l},width:Ee,height:l?ct(l):Ee,opacity:Ee},exit:{opacity:Ee},update:b={opacity:Hn,row:{signal:null},column:{signal:null}}},s.isVertical(!0)?(x=`ceil(item.mark.items.length / ${g})`,b.row.signal=`${p}%${x}`,b.column.signal=`floor(${p} / ${x})`,v={field:["row",p]}):(b.row.signal=`floor(${p} / ${g})`,b.column.signal=`${p} % ${g}`,v={field:p}),b.column.signal=`(${r})?${b.column.signal}:${p}`,i={facet:{data:i,name:"value",groupby:K1}},ic({role:Kv,from:i,encode:Eu(m,o,Uc),marks:[E,C],name:u,interactive:a,sort:v})}function SJ(e,t){const n=Sn(e,t);return{align:n("gridAlign"),columns:n.entryColumns(),center:{row:!0,column:!1},padding:{row:n("rowPadding"),column:n("columnPadding")}}}const r2='item.orient === "left"',s2='item.orient === "right"',Wp=`(${r2} || ${s2})`,CJ=`datum.vgrad && ${Wp}`,$J=qp('"top"','"bottom"','"middle"'),FJ=qp('"right"','"left"','"center"'),_J=`datum.vgrad && ${s2} ? (${FJ}) : (${Wp} && !(datum.vgrad && ${r2})) ? "left" : ${i2}`,kJ=`item._anchor || (${Wp} ? "middle" : "start")`,DJ=`${CJ} ? (${r2} ? -90 : 90) : 0`,RJ=`${Wp} ? (datum.vgrad ? (${s2} ? "bottom" : "top") : ${$J}) : "top"`;function OJ(e,t,n,i){const r=Sn(e,t),s={enter:{opacity:Ee},update:{opacity:Hn,x:{field:{group:"padding"}},y:{field:{group:"padding"}}},exit:{opacity:Ee}};return Ct(s,{orient:r("titleOrient"),_anchor:r("titleAnchor"),anchor:{signal:kJ},angle:{signal:DJ},align:{signal:_J},baseline:{signal:RJ},text:e.title,fill:r("titleColor"),fillOpacity:r("titleOpacity"),font:r("titleFont"),fontSize:r("titleFontSize"),fontStyle:r("titleFontStyle"),fontWeight:r("titleFontWeight"),limit:r("titleLimit"),lineHeight:r("titleLineHeight")},{align:r("titleAlign"),baseline:r("titleBaseline")}),Pn({type:Ho,role:XY,style:e2,from:i,encode:s},n)}function TJ(e,t){let n;return X(e)&&(e.signal?n=e.signal:e.path?n="pathShape("+WS(e.path)+")":e.sphere&&(n="geoShape("+WS(e.sphere)+', {type: "Sphere"})')),n?t.signalRef(n):!!e}function WS(e){return X(e)&&e.signal?e.signal:G(e)}function cO(e){const t=e.role||"";return t.startsWith("axis")||t.startsWith("legend")||t.startsWith("title")?t:e.type===jp?Kv:t||Xv}function MJ(e){return{marktype:e.type,name:e.name||void 0,role:e.role||cO(e),zindex:+e.zindex||void 0,aria:e.aria,description:e.description}}function NJ(e,t){return e&&e.signal?t.signalRef(e.signal):e!==!1}function o2(e,t){const n=Q_(e.type);n||T("Unrecognized transform type: "+G(e.type));const i=Bp(n.type.toLowerCase(),null,fO(n,e,t));return e.signal&&t.addSignal(e.signal,t.proxy(i)),i.metadata=n.metadata||{},i}function fO(e,t,n){const i={},r=e.params.length;for(let s=0;s<r;++s){const o=e.params[s];i[o.name]=LJ(o,t,n)}return i}function LJ(e,t,n){const i=e.type,r=t[e.name];if(i==="index")return PJ(e,t,n);if(r===void 0){e.required&&T("Missing required "+G(t.type)+" parameter: "+G(e.name));return}else{if(i==="param")return IJ(e,t,n);if(i==="projection")return n.projectionRef(t[e.name])}return e.array&&!ot(r)?r.map(s=>GS(e,s,n)):GS(e,r,n)}function GS(e,t,n){const i=e.type;if(ot(t))return VS(i)?T("Expression references can not be signals."):B0(i)?n.fieldRef(t):XS(i)?n.compareRef(t):n.signalRef(t.signal);{const r=e.expr||B0(i);return r&&BJ(t)?n.exprRef(t.expr,t.as):r&&zJ(t)?tc(t.field,t.as):VS(i)?Qi(t,n):UJ(i)?ne(n.getData(t).values):B0(i)?tc(t):XS(i)?n.compareRef(t):t}}function PJ(e,t,n){return Y(t.from)||T('Lookup "from" parameter must be a string literal.'),n.getData(t.from).lookupRef(n,t.key)}function IJ(e,t,n){const i=t[e.name];return e.array?(I(i)||T("Expected an array of sub-parameters. Instead: "+G(i)),i.map(r=>HS(e,r,n))):HS(e,i,n)}function HS(e,t,n){const i=e.params.length;let r;for(let o=0;o<i;++o){r=e.params[o];for(const a in r.key)if(r.key[a]!==t[a]){r=null;break}if(r)break}r||T("Unsupported parameter: "+G(t));const s=fe(fO(r,t,n),r.key);return ne(n.add(NK(s)))}const BJ=e=>e&&e.expr,zJ=e=>e&&e.field,UJ=e=>e==="data",VS=e=>e==="expr",B0=e=>e==="field",XS=e=>e==="compare";function jJ(e,t,n){let i,r,s,o,a;return e?(i=e.facet)&&(t||T("Only group marks can be faceted."),i.field!=null?o=a=yd(i,n):(e.data?a=ne(n.getData(e.data).aggregate):(s=o2(fe({type:"aggregate",groupby:K(i.groupby)},i.aggregate),n),s.params.key=n.keyRef(i.groupby),s.params.pulse=yd(i,n),o=a=ne(n.add(s))),r=n.keyRef(i.groupby,!0))):o=ne(n.add(Si(null,[{}]))),o||(o=yd(e,n)),{key:r,pulse:o,parent:a}}function yd(e,t){return e.$ref?e:e.data&&e.data.$ref?e.data:ne(t.getData(e.data).output)}function Fo(e,t,n,i,r){this.scope=e,this.input=t,this.output=n,this.values=i,this.aggregate=r,this.index={}}Fo.fromEntries=function(e,t){const n=t.length,i=t[n-1],r=t[n-2];let s=t[0],o=null,a=1;for(s&&s.type==="load"&&(s=t[1]),e.add(t[0]);a<n;++a)t[a].params.pulse=ne(t[a-1]),e.add(t[a]),t[a].type==="aggregate"&&(o=t[a]);return new Fo(e,s,r,i,o)};function dO(e){return Y(e)?e:null}
15function YS(e,t,n){const i=zp(n.op,n.field);let r;if(t.ops){for(let s=0,o=t.as.length;s<o;++s)if(t.as[s]===i)return}else t.ops=["count"],t.fields=[null],t.as=["count"];n.op&&(t.ops.push((r=n.op.signal)?e.signalRef(r):n.op),t.fields.push(e.fieldRef(n.field)),t.as.push(i))}function Xu(e,t,n,i,r,s,o){const a=t[n]||(t[n]={}),u=fK(s);let l=dO(r),c,f;if(l!=null&&(e=t.scope,l=l+(u?"|"+u:""),c=a[l]),!c){const d=s?{field:V1,pulse:t.countsRef(e,r,s)}:{field:e.fieldRef(r),pulse:ne(t.output)};u&&(d.sort=e.sortRef(s)),f=e.add(Bp(i,void 0,d)),o&&(t.index[r]=f),c=ne(f),l!=null&&(a[l]=c)}return c}Fo.prototype={countsRef(e,t,n){const i=this,r=i.counts||(i.counts={}),s=dO(t);let o,a,u;return s!=null&&(e=i.scope,o=r[s]),o?n&&n.field&&YS(e,o.agg.params,n):(u={groupby:e.fieldRef(t,"key"),pulse:ne(i.output)},n&&n.field&&YS(e,u,n),a=e.add(KR(u)),o=e.add(Si({pulse:ne(a)})),o={agg:a,ref:ne(o)},s!=null&&(r[s]=o)),o.ref},tuplesRef(){return ne(this.values)},extentRef(e,t){return Xu(e,this,"extent","extent",t,!1)},domainRef(e,t){return Xu(e,this,"domain","values",t,!1)},valuesRef(e,t,n){return Xu(e,this,"vals","values",t,n||!0)},lookupRef(e,t){return Xu(e,this,"lookup","tupleindex",t,!1)},indataRef(e,t){return Xu(e,this,"indata","tupleindex",t,!0,!0)}};function qJ(e,t,n){const i=e.from.facet,r=i.name,s=yd(i,t);let o;i.name||T("Facet must have a name: "+G(i)),i.data||T("Facet must reference a data set: "+G(i)),i.field?o=t.add(ZR({field:t.fieldRef(i.field),pulse:s})):i.groupby?o=t.add($K({key:t.keyRef(i.groupby),group:ne(t.proxy(n.parent)),pulse:s})):T("Facet must specify groupby or field: "+G(i));const a=t.fork(),u=a.add(Si()),l=a.add(Go({pulse:ne(u)}));a.addData(r,new Fo(a,u,u,l)),a.addSignal("parent",null),o.params.subflow={$subflow:a.parse(e).toRuntime()}}function WJ(e,t,n){const i=t.add(ZR({pulse:n.pulse})),r=t.fork();r.add(Go()),r.addSignal("parent",null),i.params.subflow={$subflow:r.parse(e).toRuntime()}}function hO(e,t,n){const i=e.remove,r=e.insert,s=e.toggle,o=e.modify,a=e.values,u=t.add($h()),l="if("+e.trigger+',modify("'+n+'",'+[r,i,s,o,a].map(f=>f??"null").join(",")+"),0)",c=Qi(l,t);u.update=c.$expr,u.params=c.$params}function Gp(e,t){const n=cO(e),i=e.type===jp,r=e.from&&e.from.facet,s=e.overlap;let o=e.layout||n===Kv||n===Yv,a,u,l,c,f,d,h;const p=n===Xv||o||r,g=jJ(e.from,i,t);u=t.add(SK({key:g.key||(e.key?tc(e.key):void 0),pulse:g.pulse,clean:!i}));const m=ne(u);u=l=t.add(Si({pulse:m})),u=t.add(RK({markdef:MJ(e),interactive:NJ(e.interactive,t),clip:TJ(e.clip,t),context:{$context:!0},groups:t.lookup(),parent:t.signals.parent?t.signalRef("parent"):null,index:t.markpath(),pulse:ne(u)}));const y=ne(u);u=c=t.add(QR(XR(e.encode,e.type,n,e.style,t,{mod:!1,pulse:y}))),u.params.parent=t.encode(),e.transform&&e.transform.forEach(w=>{const E=o2(w,t),S=E.metadata;(S.generates||S.changes)&&T("Mark transforms should not generate new data."),S.nomod||(c.params.mod=!0),E.params.pulse=ne(u),t.add(u=E)}),e.sort&&(u=t.add(zK({sort:t.compareRef(e.sort),pulse:ne(u)})));const b=ne(u);(r||o)&&(o=t.add(tO({layout:t.objectProperty(e.layout),legends:t.legends,mark:y,pulse:b})),d=ne(o));const x=t.add(JR({mark:y,pulse:d||b}));h=ne(x),i&&(p&&(a=t.operators,a.pop(),o&&a.pop()),t.pushState(b,d||h,m),r?qJ(e,t,g):p?WJ(e,t,g):t.parse(e),t.popState(),p&&(o&&a.push(o),a.push(x))),s&&(h=GJ(s,h,t));const v=t.add(eO({pulse:h})),A=t.add(Go({pulse:ne(v)},void 0,t.parent()));e.name!=null&&(f=e.name,t.addData(f,new Fo(t,l,v,A)),e.on&&e.on.forEach(w=>{(w.insert||w.remove||w.toggle)&&T("Marks only support modify triggers."),hO(w,t,f)}))}function GJ(e,t,n){const i=e.method,r=e.bound,s=e.separation,o={separation:ot(s)?n.signalRef(s.signal):s,method:ot(i)?n.signalRef(i.signal):i,pulse:t};if(e.order&&(o.sort=n.compareRef({field:e.order})),r){const a=r.tolerance;o.boundTolerance=ot(a)?n.signalRef(a.signal):+a,o.boundScale=n.scaleRef(r.scale),o.boundOrient=r.orient}return ne(n.add(MK(o)))}function HJ(e,t){const n=t.config.legend,i=e.encode||{},r=Sn(e,n),s=i.legend||{},o=s.name||void 0,a=s.interactive,u=s.style,l={};let c=0,f,d,h;t2.forEach(x=>e[x]?(l[x]=e[x],c=c||e[x]):0),c||T("Missing valid scale for legend.");
15const p=VJ(e,t.scaleType(c)),g={title:e.title!=null,scales:l,type:p,vgrad:p!=="symbol"&&r.isVertical()},m=ne(t.add(Si(null,[g]))),y={enter:{x:{value:0},y:{value:0}}},b=ne(t.add(kK(d={type:p,scale:t.scaleRef(c),count:t.objectProperty(r("tickCount")),limit:t.property(r("symbolLimit")),values:t.objectProperty(e.values),minstep:t.property(e.tickMinStep),formatType:t.property(e.formatType),formatSpecifier:t.property(e.format)})));return p===md?(h=[xJ(e,c,n,i.gradient),qS(e,n,i.labels,b)],d.count=d.count||t.signalRef(`max(2,2*floor((${ho(r.gradientLength())})/100))`)):p===J1?h=[vJ(e,c,n,i.gradient,b),qS(e,n,i.labels,b)]:(f=SJ(e,n),h=[wJ(e,n,i,b,ho(f.columns))],d.size=KJ(e,t,h[0].marks)),h=[ic({role:GY,from:m,encode:y,marks:h,layout:f,interactive:a})],g.title&&h.push(OJ(e,n,i.title,m)),Gp(ic({role:qY,from:m,encode:Eu(YJ(r,e,n),s,Uc),marks:h,aria:r("aria"),description:r("description"),zindex:r("zindex"),name:o,interactive:a,style:u}),t)}function VJ(e,t){let n=e.type||jS;return!e.type&&XJ(e)===1&&(e.fill||e.stroke)&&(n=ux(t)?md:qm(t)?J1:jS),n!==md?n:qm(t)?J1:md}function XJ(e){return t2.reduce((t,n)=>t+(e[n]?1:0),0)}function YJ(e,t,n){const i={enter:{},update:{}};return Ct(i,{orient:e("orient"),offset:e("offset"),padding:e("padding"),titlePadding:e("titlePadding"),cornerRadius:e("cornerRadius"),fill:e("fillColor"),stroke:e("strokeColor"),strokeWidth:n.strokeWidth,strokeDash:n.strokeDash,x:e("legendX"),y:e("legendY"),format:t.format,formatType:t.formatType}),i}function KJ(e,t,n){const i=ho(KS("size",e,n)),r=ho(KS("strokeWidth",e,n)),s=ho(JJ(n[1].encode,t,zc));return Qi(`max(ceil(sqrt(${i})+${r}),${s})`,t)}function KS(e,t,n){return t[e]?`scale("${t[e]}",datum)`:uO(e,n[0].encode)}function JJ(e,t,n){return uO("fontSize",e)||yJ("fontSize",t,n)}const QJ=`item.orient==="${Au}"?-90:item.orient==="${wu}"?90:0`;function ZJ(e,t){e=Y(e)?{text:e}:e;const n=Sn(e,t.config.title),i=e.encode||{},r=i.group||{}
15,s=r.name||void 0,o=r.interactive,a=r.style,u=[],l={},c=ne(t.add(Si(null,[l])));return u.push(nQ(e,n,eQ(e),c)),e.subtitle&&u.push(iQ(e,n,i.subtitle,c)),Gp(ic({role:YY,from:c,encode:tQ(n,r),marks:u,aria:n("aria"),description:n("description"),zindex:n("zindex"),name:s,interactive:o,style:a}),t)}function eQ(e){const t=e.encode;return t&&t.title||fe({name:e.name,interactive:e.interactive,style:e.style},t)}function tQ(e,t){const n={enter:{},update:{}};return Ct(n,{orient:e("orient"),anchor:e("anchor"),align:{signal:i2},angle:{signal:QJ},limit:e("limit"),frame:e("frame"),offset:e("offset")||0,padding:e("subtitlePadding")}),Eu(n,t,Uc)}function nQ(e,t,n,i){const r={value:0},s=e.text,o={enter:{opacity:r},update:{opacity:{value:1}},exit:{opacity:r}};return Ct(o,{text:s,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:t("dx"),dy:t("dy"),fill:t("color"),font:t("font"),fontSize:t("fontSize"),fontStyle:t("fontStyle"),fontWeight:t("fontWeight"),lineHeight:t("lineHeight")},{align:t("align"),angle:t("angle"),baseline:t("baseline")}),Pn({type:Ho,role:KY,style:uJ,from:i,encode:o},n)}function iQ(e,t,n,i){const r={value:0}
15,s=e.subtitle,o={enter:{opacity:r},update:{opacity:{value:1}},exit:{opacity:r}};return Ct(o,{text:s,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:t("dx"),dy:t("dy"),fill:t("subtitleColor"),font:t("subtitleFont"),fontSize:t("subtitleFontSize"),fontStyle:t("subtitleFontStyle"),fontWeight:t("subtitleFontWeight"),lineHeight:t("subtitleLineHeight")},{align:t("align"),angle:t("angle"),baseline:t("baseline")}),Pn({type:Ho,role:JY,style:lJ,from:i,encode:o},n)}function rQ(e,t){const n=[];e.transform&&e.transform.forEach(i=>{n.push(o2(i,t))}),e.on&&e.on.forEach(i=>{hO(i,t,e.name)}),t.addDataPipeline(e.name,sQ(e,t,n))}function sQ(e,t,n){const i=[];let r=null,s=!1,o=!1,a,u,l,c,f;for(e.values?ot(e.values)||pd(e.format)?(i.push(JS(t,e)),i.push(r=Gs())):i.push(r=Gs({$ingest:e.values,$format:e.format})):e.url?pd(e.url)||pd(e.format)?(i.push(JS(t,e)),i.push(r=Gs())):i.push(r=Gs({$request:e.url,$format:e.format})):e.source&&(r=a=K(e.source).map(d=>ne(t.getData(d).output)),i.push(null)),u=0,l=n.length;u<l;++u)c=n[u],f=c.metadata,!r&&!f.source&&i.push(r=Gs()),i.push(c),f.generates&&(o=!0),f.modifies&&!o&&(s=!0),f.source?r=c:f.changes&&(r=null);return a&&(l=a.length-1,i[0]=IK({derive:s,pulse:l?a:a[0]}),(s||l)&&i.splice(1,0,Gs())),r||i.push(Gs()),i.push(Go({})),i}function Gs(e){const t=Si({},e);return t.metadata={source:!0},t}function JS(e,t){return DK({url:t.url?e.property(t.url):void 0,async:t.async?e.property(t.async):void 0,values:t.values?e.property(t.values):void 0,format:e.objectProperty(t.format)})}const pO=e=>e===Cs||e===Ci,Hp=(e,t,n)=>ot(e)?lQ(e.signal,t,n):e===Au||e===Ci?t:n,ft=(e,t,n)=>ot(e)?aQ(e.signal,t,n):pO(e)?t:n,pi=(e,t,n)=>ot(e)?uQ(e.signal,t,n):pO(e)?n:t,gO=(e,t,n)=>ot(e)?cQ(e.signal,t,n):e===Ci?{value:t}:{value:n},oQ=(e,t,n)=>ot(e)?fQ(e.signal,t,n):e===wu?{value:t}:{value:n},aQ=(e,t,n)=>mO(`${e} === '${Ci}' || ${e} === '${Cs}'`,t,n),uQ=(e,t,n)=>mO(`${e} !== '${Ci}' && ${e} !== '${Cs}'`,t,n),lQ=(e,t,n)=>a2(`${e} === '${Au}' || ${e} === '${Ci}'`,t,n),cQ=(e,t,n)=>a2(`${e} === '${Ci}'`,t,n),fQ=(e,t,n)=>a2(`${e} === '${wu}'`,t,n),mO=(e,t,n)=>(t=t!=null?ct(t):t,n=n!=null?ct(n):n,QS(t)&&QS(n)?(t=t?t.signal||G(t.value):null,n=n?n.signal||G(n.value):null,{signal:`${e} ? (${t}) : (${n})`}):[fe({test:e},t)].concat(n||[])),QS=e=>e==null||Object.keys(e).length===1,a2=(e,t,n)=>({signal:`${e} ? (${Ca(t)}) : (${Ca(n)})`}),dQ=(e,t,n,i,r)=>({signal:(i!=null?`${e} === '${Au}' ? (${Ca(i)}) : `:"")+(n!=null?`${e} === '${Cs}' ? (${Ca(n)}) : `:"")+(r!=null?`${e} === '${wu}' ? (${Ca(r)}) : `:"")+(t!=null?`${e} === '${Ci}' ? (${Ca(t)}) : `:"")+"(null)"}),Ca=e=>ot(e)?e.signal:e==null?null:G(e),hQ=(e,t)=>t===0?0:ot(e)?{signal:`(${e.signal}) * ${t}`}:{value:e*t},Da=(e,t)=>{const n=e.signal;return n&&n.endsWith("(null)")?{signal:n.slice(0,-6)+t.signal}:e};function fa(e,t,n,i){let r;if(t&&J(t,e))return t[e];if(J(n,e))return n[e];if(e.startsWith("title")){switch(e){case"titleColor":r="fill";break;case"titleFont":case"titleFontSize":case"titleFontWeight":r=e[5].toLowerCase()+e.slice(6)}return i[e2][r]}else if(e.startsWith("label")){switch(e){case"labelColor":r="fill";break;case"labelFont":case"labelFontSize":r=e[5].toLowerCase()+e.slice(6)}return i[zc][r]}return null}function ZS(e){const t={};for(const n of e)if(n)for(const i in n)t[i]=1;return Object.keys(t)}function pQ(e,t){var n=t.config,i=n.style,r=n.axis,s=t.scaleType(e.scale)==="band"&&n.axisBand,o=e.orient,a,u,l;if(ot(o)){const f=ZS([n.axisX,n.axisY]),d=ZS([n.axisTop,n.axisBottom,n.axisLeft,n.axisRight]);a={};for(l of f)a[l]=ft(o,fa(l,n.axisX,r,i),fa(l,n.axisY,r,i));u={};for(l of d)u[l]=dQ(o.signal,fa(l,n.axisTop,r,i),fa(l,n.axisBottom,r,i),fa(l,n.axisLeft,r,i),fa(l,n.axisRight,r,i))}else a=o===Ci||o===Cs?n.axisX:n.axisY,u=n["axis"+o[0].toUpperCase()+o.slice(1)];return a||u||s?fe({},r,a,u,s):r}function gQ(e,t,n,i){const r=Sn(e,t),s=e.orient;let o,a;const u={enter:o={opacity:Ee},update:a={opacity:Hn},exit:{opacity:Ee}};Ct(u,{stroke:r("domainColor"),strokeCap:r("domainCap"),strokeDash:r("domainDash"),strokeDashOffset:r("domainDashOffset"),strokeWidth:r("domainWidth"),strokeOpacity:r("domainOpacity")});const l=eC(e,0),c=eC(e,1);return o.x=a.x=ft(s,l,Ee),o.x2=a.x2=ft(s,c),o.y=a.y=pi(s,l,Ee),o.y2=a.y2=pi(s,c),Pn({type:n2,role:IY,from:i,encode:u},n)}function eC(e,t){return{scale:e.scale,range:t}}function mQ(e,t,n,i,r){const s=Sn(e,t),o=e.orient,a=e.gridScale,u=Hp(o,1,-1),l=yQ(e.offset,u);let c,f,d;const h={enter:c={opacity:Ee},update:d={opacity:Hn},exit:f={opacity:Ee}};Ct(h,{stroke:s("gridColor"),strokeCap:s("gridCap"),strokeDash:s("gridDash"),strokeDashOffset:s("gridDashOffset"),strokeOpacity:s("gridOpacity"),strokeWidth:s("gridWidth")});const p={scale:e.scale,field:Gn,band:r.band,extra:r.extra,offset:r.offset,round:s("tickRound")},g=ft(o,{signal:"height"},{signal:"width"}),m=a?{scale:a,range:0,mult:u,offset:l}:{value:0,offset:l},y=a?{scale:a,range:1,mult:u,offset:l}:fe(g,{mult:u,offset:l});return c.x=d.x=ft(o,p,m),c.y=d.y=pi(o,p,m),c.x2=d.x2=pi(o,y),c.y2=d.y2=ft(o,y),f.x=ft(o,p),f.y=pi(o,p),Pn({type:n2,role:BY,key:Gn,from:i,encode:h},n)}function yQ(e,t){if(t!==1)if(!X(e))e=ot(t)?{signal:`(${t.signal}) * (${e||0})`}:t*(e||0);else{let n=e=fe({},e);for(;n.mult!=null;)if(X(n.mult))n=n.mult=fe({},n.mult);else return n.mult=ot(t)?{signal:`(${n.mult}) * (${t.signal})`}:n.mult*t,e;n.mult=t}return e}function bQ(e,t,n,i,r,s){const o=Sn(e,t),a=e.orient,u=Hp(a,-1,1);let l,c,f;const d={enter:l={opacity:Ee},update:f={opacity:Hn},exit:c={opacity:Ee}};Ct(d,{stroke:o("tickColor"),strokeCap:o("tickCap"),strokeDash:o("tickDash"),strokeDashOffset:o("tickDashOffset"),strokeOpacity:o("tickOpacity"),strokeWidth:o("tickWidth")});const h=ct(r);h.mult=u;const p={scale:e.scale,field:Gn,band:s.band,extra:s.extra,offset:s.offset,round:o("tickRound")};return f.y=l.y=ft(a,Ee,p),f.y2=l.y2=ft(a,h),c.x=ft(a,p),f.x=l.x=pi(a,Ee,p),f.x2=l.x2=pi(a,h),c.y=pi(a,p),Pn({type:n2,role:UY,key:Gn,from:i,encode:d},n)}function z0(e,t,n,i,r){return{signal:'flush(range("'+e+'"), scale("'+e+'", datum.value), '+t+","+n+","+i+","+r+")"}}function xQ(e,t,n,i,r,s){const o=Sn(e,t),a=e.orient,u=e.scale,l=Hp(a,-1,1),c=ho(o("labelFlush")),f=ho(o("labelFlushOffset")),d=o("labelAlign"),h=o("labelBaseline");let p=c===0||!!c,g;const m=ct(r);m.mult=l,m.offset=ct(o("labelPadding")||0),m.offset.mult=l;const y={scale:u,field:Gn,band:.5,offset:lO(s.offset,o("labelOffset"))},b=ft(a,p?z0(u,c,'"left"','"right"','"center"'):{value:"center"},oQ(a,"left","right")),x=ft(a,gO(a,"bottom","top"),p?z0(u,c,'"top"','"bottom"','"middle"'):{value:"middle"}),v=z0(u,c,`-(${f})`,f,0);p=p&&f;const A={opacity:Ee,x:ft(a,y,m),y:pi(a,y,m)},w={enter:A,update:g={opacity:Hn,text:{field:Zv},x:A.x,y:A.y,align:b,baseline:x},exit:{opacity:Ee,x:A.x,y:A.y}};Ct(w,{dx:!d&&p?ft(a,v):null,dy:!h&&p?pi(a,v):null}),Ct(w,{angle:o("labelAngle"),fill:o("labelColor"),fillOpacity:o("labelOpacity"),font:o("labelFont"),fontSize:o("labelFontSize"),fontWeight:o("labelFontWeight"),fontStyle:o("labelFontStyle"),limit:o("labelLimit"),lineHeight:o("labelLineHeight")},{align:d,baseline:h});const E=o("labelBound");let S=o("labelOverlap");return S=S||E?{separation:o("labelSeparation"),method:S,order:"datum.index",boun
15d:E?{scale:u,orient:a,tolerance:E}:null}:void 0,g.align!==b&&(g.align=Da(g.align,b)),g.baseline!==x&&(g.baseline=Da(g.baseline,x)),Pn({type:Ho,role:zY,style:zc,key:Gn,from:i,encode:w,overlap:S},n)}function vQ(e,t,n,i){const r=Sn(e,t),s=e.orient,o=Hp(s,-1,1);let a,u;const l={enter:a={opacity:Ee,anchor:ct(r("titleAnchor",null)),align:{signal:i2}},update:u=fe({},a,{opacity:Hn,text:ct(e.title)}),exit:{opacity:Ee}},c={signal:`lerp(range("${e.scale}"), ${qp(0,1,.5)})`};return u.x=ft(s,c),u.y=pi(s,c),a.angle=ft(s,Ee,hQ(o,90)),a.baseline=ft(s,gO(s,Cs,Ci),{value:Cs}),u.angle=a.angle,u.baseline=a.baseline,Ct(l,{fill:r("titleColor"),fillOpacity:r("titleOpacity"),font:r("titleFont"),fontSize:r("titleFontSize"),fontStyle:r("titleFontStyle"),fontWeight:r("titleFontWeight"),limit:r("titleLimit"),lineHeight:r("titleLineHeight")},{align:r("titleAlign"),angle:r("titleAngle"),baseline:r("titleBaseline")}),EQ(r,s,l,n),l.update.align=Da(l.update.align,a.align),l.update.angle=Da(l.update.angle,a.angle),l.update.baseline=Da(l.update.baseline,a.baseline),Pn({type:Ho,role:jY,style:e2,from:i,encode:l},n)}function EQ(e,t,n,i){const r=(a,u)=>a!=null?(n.update[u]=Da(ct(a),n.update[u]),!1):!ma(u,i),s=r(e("titleX"),"x"),o=r
vendor: 4,204 bytes, line 15
15(e("titleY"),"y");n.enter.auto=o===s?ct(o):ft(t,ct(o),ct(s))}function AQ(e,t){const n=pQ(e,t),i=e.encode||{},r=i.axis||{},s=r.name||void 0,o=r.interactive,a=r.style,u=Sn(e,n),l=bJ(u),c={scale:e.scale,ticks:!!u("ticks"),labels:!!u("labels"),grid:!!u("grid"),domain:!!u("domain"),title:e.title!=null},f=ne(t.add(Si({},[c]))),d=ne(t.add(wK({scale:t.scaleRef(e.scale),extra:t.property(l.extra),count:t.objectProperty(e.tickCount),values:t.objectProperty(e.values),minstep:t.property(e.tickMinStep),formatType:t.property(e.formatType),formatSpecifier:t.property(e.format)}))),h=[];let p;return c.grid&&h.push(mQ(e,n,i.grid,d,l)),c.ticks&&(p=u("tickSize"),h.push(bQ(e,n,i.ticks,d,p,l))),c.labels&&(p=c.ticks?p:0,h.push(xQ(e,n,i.labels,d,p,l))),c.domain&&h.push(gQ(e,n,i.domain,f)),c.title&&h.push(vQ(e,n,i.title,f)),Gp(ic({role:PY,from:f,encode:Eu(wQ(u,e),r,Uc),marks:h,aria:u("aria"),description:u("description"),zindex:u("zindex"),name:s,interactive:o,style:a}),t)}function wQ(e,t){const n={enter:{},update:{}};return Ct(n,{orient:e("orient"),offset:e("offset")||0,position:ai(t.position,0),titlePadding:e("titlePadding"),minExtent:e("minExtent"),maxExtent:e("maxExtent"),range:{signal:`abs(span(range("${t.scale}")))`},translate:e("translate"),format:t.format,formatType:t.formatType}),n}function yO(e,t,n){const i=K(e.signals),r=K(e.scales);return n||i.forEach(s=>YR(s,t)),K(e.projections).forEach(s=>tJ(s,t)),r.forEach(s=>qK(s,t)),K(e.data).forEach(s=>rQ(s,t)),r.forEach(s=>WK(s,t)),(n||i).forEach(s=>AK(s,t)),K(e.axes).forEach(s=>AQ(s,t)),K(e.marks).forEach(s=>Gp(s,t)),K(e.legends).forEach(s=>HJ(s,t)),e.title&&ZJ(e.title,t),t.parseLambdas(),t}const SQ=e=>Eu({enter:{x:{value:0},y:{value:0}},update:{width:{signal:"width"},height:{signal:"height"}}},e);function CQ(e,t){const n=t.config,i=ne(t.root=t.add($h())),r=$Q(e,n);r.forEach(l=>YR(l,t)),t.description=e.description||n.description,t.eventConfig=n.events,t.legends=t.objectProperty(n.legend&&n.legend.layout),t.locale=n.locale;const s=t.add(Si()),o=t.add(QR(XR(SQ(e.encode),jp,Yv,e.style,t,{pulse:ne(s)}))),a=t.add(tO({layout:t.objectProperty(e.layout),legends:t.legends,autosize:t.signalRef("autosize"),mark:i,pulse:ne(o)}));t.operators.pop(),t.pushState(ne(o),ne(a),null),yO(e,t,r),t.operators.push(a);let u=t.add(JR({mark:i,pulse:ne(a)}));return u=t.add(eO({pulse:ne(u)})),u=t.add(Go({pulse:ne(u)})),t.addData("root",new Fo(t,s,s,u)),t}function Yu(e,t){return t&&t.signal?{name:e,update:t.signal}:{name:e,value:t}}function $Q(e,t){const n=o=>ai(e[o],t[o]),i=[Yu("background",n("background")),Yu("autosize",MY(n("autosize"))),Yu("padding",LY(n("padding"))),Yu("width",n("width")||0),Yu("height",n("height")||0)],r=i.reduce((o,a)=>(o[a.name]=a,o),{}),s={};return K(e.signals).forEach(o=>{J(r,o.name)?o=fe(r[o.name],o):i.push(o),s[o.name]=o}),K(t.signals).forEach(o=>{!J(s,o.name)&&!J(r,o.name)&&i.push(o)}),i}function bO(e,t){this.config=e||{},this.options=t||{},this.bindings=[],this.field={},this.signals={},this.lambdas={},this.scales={},this.events={},this.data={},this.streams=[],this.updates=[],this.operators=[],this.eventConfig=null,this.locale=null,this._id=0,this._subid=0,this._nextsub=[0],this._parent=[],this._encode=[],this._lookup=[],this._markpath=[]}function tC(e){this.config=e.config,this.options=e.options,this.legends=e.legends,this.field=Object.create(e.field),this.signals=Object.create(e.signals),this.lambdas=Object.create(e.lambdas),this.scales=Object.create(e.scales),this.events=Object.create(e.events),this.data=Object.create(e.data),this.streams=[],this.updates=[],this.operators=[],this._id=0,this._subid=++e._nextsub[0],this._nextsub=e._nextsub,this._parent=e._parent.slice(),this._encode=e._encode.slice(),this._lookup=e._lookup.slice(),this._markpath=e._markpath}bO.prototype=tC.prototype={parse(e){return yO(e,this)},fork(){return new tC(this)},isSubscope(){return this._subid>0},toRuntime(){return this.finish(),{description:this.description,operators:this.operators,streams:this.streams,updates:this.updates,bindings:this.bindings,eventConfig:this.eventConfig,locale:this.locale}},id(){return(this._subid?this._subid+":":0)+this._id++},add(e){return this.operators.push(e),e.id=this.id(),e.refs&&(e.refs.forEac
15h(t=>{t.$ref=e.id}),e.refs=null),e},proxy(e){const t=e instanceof H1?ne(e):e;return this.add(PK({value:t}))},addStream(e){return this.streams.push(e),e.id=this.id(),e},addUpdate(e){return this.updates.push(e),e},finish(){let e,t;this.root&&(this.root.root=!0);for(e in this.signals)this.signals[e].signal=e;for(e in this.scales)this.scales[e].scale=e;function n(i,r,s){let o,a;i&&(o=i.data||(i.data={}),a=o[r]||(o[r]=[]),a.push(s))}for(e in this.data){t=this.data[e],n(t.input,e,"input"),n(t.output,e,"output"),n(t.values,e,"values");for(const i in t.index)n(t.index[i],e,"index:"+i)}return this},pushState(e,t,n){this._encode.push(ne(this.add(Go({pulse:e})))),this._parent.push(t),this._lookup.push(n?ne(this.proxy(n)):null),this._markpath.push(-1)},popState(){this._encode.pop(),this._parent.pop(),this._lookup.pop(),this._markpath.pop()},parent(){return ve(this._parent)},encode(){return ve(this._encode)},lookup(){return ve(this._lookup)},markpath(){const e=this._markpath;return++e[e.length-1]},fieldRef(e,t){if(Y(e))return tc(e,t);e.signal||T("Unsupported field reference: "+G(e));const n=e.signal;let i=this.field[n];if(!i){const r={name:this.signalRef(n)};t&&(r.as=t),this.field[n]=i=ne(this.add(FK(r)))}return i},compareRef(e){let t=!1;const n=s=>ot(s)?(t=!0,this.signalRef(s.signal)):dK(s)?(t=!0,this.exprRef(s.expr)):s,i=K(e.field).map(n),r=K(e.order).map(n);return t?ne(this.add(US({fields:i,orders:r}))):BS(i,r)},keyRef(e,t){let n=!1;const i=s=>ot(s)?(n=!0,ne(r[s.signal])):s,r=this.signals;return e=K(e).map(i),n?ne(this.add(_K({fields:e,flat:t}))):uK(e,t)},sortRef(e){if(!e)return e;const t=zp(e.op,e.field),n=e.order||lK;return n.signal?ne(this.add(US({fields:t,orders:this.signalRef(n.signal)}))):BS(t,n)},event(e,t){const n=e+":"+t;if(!this.events[n]){const i=this.id();this.streams.push({id:i,source:e,type:t}),this.events[n]=i}return this.events[n]},hasOwnSignal(e){return J(this.signals,e)},addSignal(e,t){this.hasOwnSignal(e)&&T("Duplicate signal name: "+G(e));const n=t instanceof H1?t:this.add($h(t));return this.signals[e]=n},getSignal(e){return this.signals[e]||T("Unrecognized signal name: "+G(e)),this.signals[e]},signalRef(e){return this.signals[e]?ne(this.signals[e]):(J(this.lambdas,e)||(this.lambdas[e]=this.add($h(null))),ne(this.lambdas[e]))},parseLambdas(){const e=Object.keys(this.lambdas);for(let t=0,n=e.length;t<n;++t){const i=e[t],r=Qi(i,this),s=this.lambdas[i];s.params=r.$params,s.update=r.$expr}},property(e){return e&&e.signal?this.signalRef(e.signal):e},objectProperty(e){return!e||!X(e)?e:this.signalRef(e.signal||u2(e))},exprRef(e,t){const n={expr:Qi(e,this)};return t&&(n.expr.$name=t),ne(this.add(CK(n)))},addBinding(e,t){this.bindings||T("Nested signals do not support binding: "+G(e)),this.bindings.push(fe({signal:e},t))},addScaleProj(e,t){J(this.scales,e)&&T("Duplicate scale or projection name: "+G(e)),this.scales[e]=this.add(t)},addScale(e,t){this.addScaleProj(e,BK(t))},addProjection(e,t){this.addScaleProj(e,LK(t))},getScale(e){return this.scales[e]||T("Unrecognized scale name: "+G(e)),this.scales[e]},scaleRef(e){return ne(this.getScale(e))},scaleType(e){return this.getScale(e).params.type},projectionRef(e){return this.scaleRef(e)},projectionType(e){return this.scaleType(e)},addData(e,t){return J(this.data,e)&&T("Duplicate data set name: "+G(e)),this.data[e]=t},getData(e){return this.data[e]||T("Undefined data set name: "+G(e)),this.data[e]},addDataPipeline(e,t){return J(this.data,e)&&T("Duplicate data set name: "+G(e)),this.addData(e,Fo.fromEntries(this,t))}};function u2(e){return(I(e)?FQ:_Q)(e)}function FQ(e){const t=e.length;let n="[";for(let i=0;i<t;++i){const r=e[i];n+=(i>0?",":"")+(X(r)?r.signal||u2(r):G(r))}return n+"]"}function _Q(e){let t="{",n=0,i,r;for(i in e)r=e[i],t+=(++n>1?",":"")+G(i)+":"+(X(r)?r.signal||u2(r):G(r));return t+"}"}function kQ(){const e="sans-serif",i="#4c78a8",r="#000",s="#888",o="#ddd";return{description:"Vega visualization",padding:0,autosize:"pad",background:null,events:{defaults:{allow:["wheel"]}},group:null,mark:null,arc:{fill:i},area:{fill:i},image:null,line:{stroke:i,strokeWidth:2},path:{stroke:i},rect:{fill:i},rule:{stroke:r},shape:{stroke:i},symbol:{fill:i,size:64},text:{fill:r,font:e,fontSize:11},trail:{fill:i,size:2},style:{"guide-label":{fill:r,font:e,fontSize:10},"guide-title":{fill:r,font:e,fontSize:11,fontWeight:"bold"},"group-title":{fill:r,font:e,fontSize:13,fontWeight:"bold"},"group-subtitle":{fill:r,font:e,fontSize:12},point:{size:30,strokeWidth:2,shape:"circle"},circle:{size:30,strokeWidth:2},square:{size:30,strokeWidth:2,shape:"square"},cell:{fill:"transparent",stroke:o},view:{fill:"transparent"}},title:{orient:"top",anchor:"middle",offset:4,subtitlePadding:3},axis:{minExtent:0,maxExtent:200,bandPosition:.5,domain:!0,domainWidth:1,domainColor:s,grid:!1,gridWidth:1,gridColor:o,labels:!0,labelAngle:0,labelLimit:180,labelOffset:0,labelPadding:2,ticks:!0,tickColor:s,tickOffset:0,tickRound:!0,tickSize:5,tickWidth:1,titlePadding:4},axisBand:{tickOffset:-.5},projection:{type:"mercator"},legend:{orient:"right",padding:0,gridAlign:"each",columnPadding:10,rowPadding:2,symbolDirection:"vertical",gradientDirection:"vertical",gradientLength:200,gradientThickness:16,gradientStrokeColor:o,gradientStrokeWidth:0,gradientLabelOffset:2,labelAlign:"left",labelBaseline:"middle",labelLimit:160,labelOffset:4,labelOverlap:!0,symbolLimit:30,symbolType:"circle",symbolSize:100,symbolOffset:0,symbolStrokeWidth:1.5,symbolBaseFillColor:"transparent",symbolBaseStrokeColor:s,titleLimit:180,titleOrient:"top",titlePadding:5,layout:{offset:18,direction:"horizontal",left:{direction:"vertical"},right:{direction:"vertical"}}},range:{category:{scheme:"tableau10"},ordinal:{scheme:"blues"},heatmap:{scheme:"yellowgreenblue"},ramp:{scheme:"blues"},diverging:{scheme:"blueorange",extent:[1,0]},symbol:["circle","square","triangle-up","cross","diamond","triangle-right","triangle-down","triangle-left"]}}}function DQ(e,t,n){return X(e)||T("Input Vega specification must be an object."),t=fu(kQ(),t,e.config),CQ(e,new bO(t,n)).toRuntime()}var RQ="5.33.1";fe(Pa,aL,rz,Lz,Ej,aq,MW,hW,LW,oG,mG,wG);const OQ=Object.freeze(Object.defineProperty({__proto__:null,Bounds:tt,CanvasHandler:Rc,CanvasRenderer:Wd,DATE:bn,DAY:Ot,DAYOFYEAR:Ki,Dataflow:_a,Debug:BF,DisallowedObjectProperties:Gy,Error:Hy,EventStream:ip,Gradient:lD,GroupItem:mp,HOURS:Mn,Handler:Tx,HybridHandler:e3,HybridRenderer:e1,Info:IF,Item:gp,MILLISECONDS:yi,MINUTES:Nn,MONTH:Pt,Marks:Ln,MultiPulse:hb,None:PF,Operator:Ne,Parameters:np,Pulse:ms,QUARTER:yn,RenderType:us,Renderer:Dc,ResourceLoader:mD,SECONDS:Yn,SVGHandler:UD,SVGRenderer:Bx,SVGStringRenderer:ZD,Scenegraph:TD,TIME_UNITS:sb,Transform:O,View:LR,WEEK:rt,Warn:Vy,YEAR:wt,accessor:wn,accessorFields:Lt,accessorName:Ke,array:K,ascending:hu,bandwidthNRD:yb,bin:tk,bootstrapCI:nk,boundClip:c3,boundContext:$c,boundItem:Ym,boundMark:kD,boundStroke:Br,changeset:jo,clampRange:KF,codegenExpression:lR,compare:Qy,constant:qt,cumulativeLogNormal:wb,cumulativeNormal:sp,cumulativeUniform:Fb,dayofyear:g_,debounce:Zy,defaultLocale:ub,definition:Q_,densityLogNormal:Ab,densityNormal:bb,densityUniform:$b,domChild:it,domClear:zn,domCreate:os,domFind:Ox,dotbin:ik,error:T,expressionFunction:et,extend:fe,extent:Yi,extentIndex:JF,falsy:Kr,fastmap:pu,field:Vn,flush:QF,font:Ep,fontFamily:kc,fontSize:rr,format:Yf,formatLocale:Rd,formats:fb,hasOwnProperty:J,id:pc,identity:jt,inferType:U_,inferTypes:j_,ingest:$e,inherits:H,inrange:va,interpolate:lx,interpolateColors:hp,interpolateRange:Yk,intersect:o3,intersectBoxLine:Ea,intersectPath:yx,intersectPoint:bx,intersectRule:bD,isArray:I,isBoolean:Rs,isDate:ps,isFunction:de,isIterable:ZF,isNumber:Se,isObject:X,isRegExp:eb,isString:Y,isTuple:ep,key:tb,lerp:e_,lineHeight:As,loader:Qh,locale:B_,logger:Xy,lruCache:t_,markup:Ix,merge:n_,mergeConfig:fu,multiLineOffset:kx,one:cu,pad:i_,panLinear:WF,panLog:GF,panPow:HF,panSymlog:VF,parse:DQ,parseExpression:oR,parseSelector:Ts,path:Ny,pathCurves:px,pathEqual:f3,pathParse:Ua,pathRectangle:dD,pathRender:Wl,pathSymbol
15s:fD,pathTrail:hD,peek:ve,point:wp,projection:rv,quantileLogNormal:Sb,quantileNormal:op,quantileUniform:_b,quantiles:gb,quantizeInterpolator:Kk,quarter:XF,quartiles:mb,get random(){return Kn},randomInteger:f7,randomKDE:vb,randomLCG:c7,randomLogNormal:sk,randomMixture:ok,randomNormal:xb,randomUniform:ak,read:G_,regressionConstant:kb,regressionExp:lk,regressionLinear:Db,regressionLoess:dk,regressionLog:uk,regressionPoly:fk,regressionPow:ck,regressionQuad:Rb,renderModule:Sp,repeat:nl,resetDefaultLocale:a4,resetSVGClipId:gD,resetSVGDefIds:AB,responseType:W_,runtimeContext:wR,sampleCurve:up,sampleLogNormal:Eb,sampleNormal:rp,sampleUniform:Cb,scale:Ce,sceneEqual:zx,sceneFromJSON:RD,scenePickVisit:Ld,sceneToJSON:DD,sceneVisit:bi,sceneZOrder:xx,scheme:cx,serializeXML:YD,setHybridRendererOptions:bB,setRandom:u7,span:gc,splitAccessPath:nr,stringValue:G,textMetrics:Rn,timeBin:O_,timeFloor:A_,timeFormatLocale:Ul,timeInterval:gu,timeOffset:C_,timeSequence:__,timeUnitSpecifier:p_,timeUnits:ob,toBoolean:nb,toDate:ib,toNumber:Mt,toSet:mi,toString:rb,transform:Z_,transforms:Pa,truncate:r_,truthy:Xn,tupleid:ie,typeParsers:zm,utcFloor:w_,utcInterval:mu,utcOffset:$_,utcSequence:k_,utcdayofyear:b_,utcquarter:YF,utcweek:x_,version:RQ,visitArray:Zr,week:m_,writeConfig:du,zero:rs,zoomLinear:Yy,zoomLog:Ky,zoomPow:kd,zoomSymlog:Jy},Symbol.toStringTag,{value:"Module"}));function TQ(e,t,n){let i;t.x2&&(t.x?(n&&e.x>e.x2&&(i=e.x,e.x=e.x2,e.x2=i),e.width=e.x2-e.x):e.x=e.x2-(e.width||0)),t.xc&&(e.x=e.xc-(e.width||0)/2),t.y2&&(t.y?(n&&e.y>e.y2&&(i=e.y,e.y=e.y2,e.y2=i),e.height=e.y2-e.y):e.y=e.y2-(e.height||0)),t.yc&&(e.y=e.yc-(e.he
15ight||0)/2)}var MQ={NaN:NaN,E:Math.E,LN2:Math.LN2,LN10:Math.LN10,LOG2E:Math.LOG2E,LOG10E:Math.LOG10E,PI:Math.PI,SQRT1_2:Math.SQRT1_2,SQRT2:Math.SQRT2,MIN_VALUE:Number.MIN_VALUE,MAX_VALUE:Number.MAX_VALUE},NQ={"*":(e,t)=>e*t,"+":(e,t)=>e+t,"-":(e,t)=>e-t,"/":(e,t)=>e/t,"%":(e,t)=>e%t,">":(e,t)=>e>t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,">=":(e,t)=>e>=t,"==":(e,t)=>e==t,"!=":(e,t)=>e!=t,"===":(e,t)=>e===t,"!==":(e,t)=>e!==t,"&":(e,t)=>e&t,"|":(e,t)=>e|t,"^":(e,t)=>e^t,"<<":(e,t)=>e<<t,">>":(e,t)=>e>>t,">>>":(e,t)=>e>>>t},LQ={"+":e=>+e,"-":e=>-e,"~":e=>~e,"!":e=>!e};const PQ=Array.prototype.slice,Hs=(e,t,n)=>{const i=n?n(t[0]):t[0];return i[e].apply(i,PQ.call(t,1))},IQ=(e,t,n,i,r,s,o)=>new Date(e,t||0,n??1,i||0,r||0,s||0,o||0);var BQ={isNaN:Number.isNaN,isFinite:Number.isFinite,abs:Math.abs,acos:Math.acos,asin:Math.asin,atan:Math.atan,atan2:Math.atan2,ceil:Math.ceil,cos:Math.cos,exp:Math.exp,floor:Math.floor,log:Math.log,max:Math.max,min:Math.min,pow:Math.pow,random:Math.random,round:Math.round,sin:Math.sin,sqrt:Math.sqrt,tan:Math.tan,clamp:(e,t,n)=>Math.max(t,Math.min(n,e)),now:Date.now,utc:Date.UTC,datetime:IQ,date:e=>new Date(e).getDate(),day:e=>new Date(e).getDay(),year:e=>new Date(e).getFullYear(),month:e=>new Date(e).getMonth(),hours:e=>new Date(e).getHours(),minutes:e=>new Date(e).getMinutes(),seconds:e=>new Date(e).getSeconds(),milliseconds:e=>new Date(e).getMilliseconds(),time:e=>new Date(e).getTime(),timezoneoffset:e=>new Date(e).getTimezoneOffset(),utcdate:e=>new Date(e).getUTCDate(),utcday:e=>new Date(e).getUTCDay(),utcyear:e=>new Date(e).getUTCFullYear(),utcmonth:e=>new Date(e).getUTCMonth(),utchours:e=>new Date(e).getUTCHours(),utcminutes:e=>new Date(e).getUTCMinutes(),utcseconds:e=>new Date(e).getUTCSeconds(),utcmilliseconds:e=>new Date(e).getUTCMilliseconds(),length:e=>e.length,join:function(){return Hs("join",arguments)},indexof:function(){return Hs("indexOf",arguments)},lastindexof:function(){return Hs("lastIndexOf",arguments)},slice:function(){return Hs("slice",arguments)},reverse:e=>e.slice().reverse(),sort:e=>e.slice().sort(hu),parseFloat,parseInt,upper:e=>String(e).toUpperCase(),lower:e=>String(e).toLowerCase(),substring:function(){return Hs("substring",arguments,String)},split:function(){return Hs("split",arguments,String)},replace:function(){return Hs("replace",arguments,String)},trim:e=>String(e).trim(),btoa:e=>btoa(e),atob:e=>atob(e),regexp:RegExp,test:(e,t)=>RegExp(e).test(t)};const zQ=["view","item","group","xy","x","y"],Z1=new Set([Function,eval,setTimeout,setInterval]);typeof setImmediate=="function"&&Z1.add(setImmediate);const UQ={Literal:(e,t)=>t.value,Identifier:(e,t)=>{const n=t.name;return e.memberDepth>0?n:n==="datum"?e.datum:n==="event"?e.event:n==="item"?e.item:MQ[n]||e.params["$"+n]},MemberExpression:(e,t)=>{const n=!t.computed,i=e(t.object);n&&(e.memberDepth+=1);const r=e(t.property);if(n&&(e.memberDepth-=1),Z1.has(i[r])){console.error(`Prevented interpretation of member "${r}" which could lead to insecure code execution`);return}return i[r]},CallExpression:(e,t)=>{const n=t.arguments;let i=t.callee.name;return i.startsWith("_")&&(i=i.slice(1)),i==="if"?e(n[0])?e(n[1]):e(n[2]):(e.fn[i]||BQ[i]).apply(e.fn,n.map(e))},ArrayExpression:(e,t)=>t.elements.map(e),BinaryExpression:(e,t)=>NQ[t.operator](e(t.left),e(t.right)),UnaryExpression:(e,t)=>LQ[t.operator](e(t.argument)),ConditionalExpression:(e,t)=>e(t.test)?e(t.consequent):e(t.alternate),LogicalExpression:(e,t)=>t.operator==="&&"?e(t.left)&&e(t.right):e(t.left)||e(t.right),ObjectExpression:(e,t)=>t.properties.reduce((n,i)=>{e.memberDepth+=1;const r=e(i.key);e.memberDepth-=1;const s=e(i.value);return Gy.has(r)?console.error(`Prevented interpretation of property "${r}" which could lead to insecure code execution`):Z1.has(s)?console.error(`Prevented interpretation of method "${s}" which could lead to insecure code execution`):n[r]=s,n},{})};function Ku(e,t,n,i,r,s){const o=a=>UQ[a.type](o,a);return o.memberDepth=0,o.fn=Object.create(t),o.params=n,o.datum=i,o.event=r,o.item=s,zQ.forEach(a=>o.fn[a]=function(){return r.vega[a](...arguments)}),o(e)}var jQ={operator(e,t){const n=t.ast,i=e.functions;return r=>Ku(n,i,r)},parameter(e,t){const n=t.ast,i=e.functions;return(r,s)=>Ku(n,i,s,r)},event(e,t){const n=t.ast,i=e.functions;return r=>Ku(n,i,void 0,void 0,r)},handler(e,t){const n=t.ast,i=e.functions;return(r,s)=>{const o=s.item&&s.item.datum;return Ku(n,i,r,o,s)}},encode(e,t){const{marktype:n,channels:i}=t,r=e.functions,s=n==="group"||n==="image"||n==="rect";return(o,a)=>{const u=o.datum;let l=0,c;for(const f in i)c=Ku(i[f].ast,r,a,u,void 0,o),o[f]!==c&&(o[f]=c,l=1);return n!=="rule"&&TQ(o,i,s),l}}};const qQ="5.23.0",WQ={version:qQ};function l2(e){return j(e,"or")}function c2(e){return j(e,"and")}function f2(e){return j(e,"not")}function bd(e,t){if(f2(e))bd(e.not,t);else if(c2(e))for(const n of e.and)bd(n,t);else if(l2(e))for(const n of e.or)bd(n,t);else t(e)}function Ra(e,t){return f2(e)?{not:Ra(e.not,t)}:c2(e)?{and:e.and.map(n=>Ra(n,t))}:l2(e)?{or:e.or.map(n=>Ra(n,t))}:t(e)}const le=structuredClone;function xO(e){throw new Error(e)}function Ya(e,t){const n={};
15for(const i of t)J(e,i)&&(n[i]=e[i]);return n}function gn(e,t){const n={...e};for(const i of t)delete n[i];return n}Set.prototype.toJSON=function(){return`Set(${[...this].map(e=>Te(e)).join(",")})`};function be(e){if(Se(e))return e;const t=Y(e)?e:Te(e);if(t.length<250)return t;let n=0;for(let i=0;i<t.length;i++){const r=t.charCodeAt(i);n=(n<<5)-n+r,n=n&n}return n}function ey(e){return e===!1||e===null}function ye(e,t){return e.includes(t)}function Ka(e,t){let n=0;for(const[i,r]of e.entries())if(t(r,i,n++))return!0;return!1}function d2(e,t){let n=0;for(const[i,r]of e.entries())if(!t(r,i,n++))return!1;return!0}function vO(e,...t){for(const n of t)GQ(e,n??{});return e}function GQ(e,t){for(const n of U(t))du(e,n,t[n],!0)}function ji(e,t){const n=[],i={};let r;for(const s of e)r=t(s),!(r in i)&&(i[r]=1,n.push(s));return n}function HQ(e,t){const n=U(e),i=U(t);if(n.length!==i.length)return!1;for(const r of n)if(e[r]!==t[r])return!1;return!0}function EO(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function h2(e,t){for(const n of e)if(t.has(n))return!0;return!1}function ty(e){const t=new Set;for(const n of e){const r=nr(n).map((o,a)=>a===0?o:`[${o}]`),s=r.map((o,a)=>r.slice(0,a+1).join(""));for(const o of s)t.add(o)}return t}function p2(e,t){return e===void 0||t===void 0?!0:h2(ty(e),ty(t))}function Oe(e){return U(e).length===0}const U=Object.keys,St=Object.values,$s=Object.entries;function rc(e){return e===!0||e===!1}function je(e){const t=e.replace(/\W/g,"_");return(e.match(/^\d+/)?"_":"")+t}function Nl(e,t){return f2(e)?`!(${Nl(e.not,t)})`:c2(e)?`(${e.and.map(n=>Nl(n,t)).join(") && (")})`:l2(e)?`(${e.or.map(n=>Nl(n,t)).join(") || (")})`:t(e)}function Fh(e,t){if(t.length===0)return!0;const n=t.shift();return n in e&&Fh(e[n],t)&&delete e[n],Oe(e)}function jc(e){return e.charAt(0).toUpperCase()+e.substr(1)}function g2(e,t="datum"){const n=nr(e),i=[];for(let r=1;r<=n.length;r++){const s=`[${n.slice(0,r).map(G).join("][")}]`;i.push(`${t}${s}`)}return i.join(" && ")}function AO(e,t="datum"){return`${t}[${G(nr(e).join("."))}]`}function Fe(e){return`datum['${e.replaceAll("'","\\'")}']`}function VQ(e){return e.replace(/(\[|\]|\.|'|")/g,"\\$1")}function Qn(e){return`${nr(e).map(VQ).join("\\.")}`}function _o(e,t,n){return e.replace(new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"g"),n)}function Su(e){return`${nr(e).join(".")}`}function Ja(e){return e?nr(e).length:0}function Qe(...e){return e.find(t=>t!==void 0)}let wO=42;function SO(e){const t=++wO;return e?String(e)+t:t}function XQ(){wO=42}function CO(e){return $O(e)?e:`__${e}`}function $O(e){return e.startsWith("__")}function sc(e){if(e!==void 0)return(e%360+360)%360}function Vp(e){return Se(e)?!0:!isNaN(e)&&!isNaN(parseFloat(e))}const nC=Object.getPrototypeOf(structuredClone({}));function kn(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor.name!==t.constructor.name)return!1;let n,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(i=n;i--!==0;)if(!kn(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const s of e.entries())if(!t.has(s[0]))return!1;for(const s of e.entries())if(!kn(s[1],t.get(s[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const s of e.entries())if(!t.has(s[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(i=n;i--!==0;)if(e[i]!==t[i])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&e.valueOf!==nC.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&e.toString!==nC.toString)return e.toString()===t.toString();const r=Object.keys(e);if(n=r.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,r[i]))return!1;for(i=n;i--!==0;){const s=r[i];if(!kn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Te(e){const t=[];return function n(i){if(i&&i.toJSON&&typeof i.toJSON=="function"&&(i=i.toJSON()),i===void 0)return;if(typeof i=="number")return isFinite(i)?""+i:"null";if(typeof i!="object")return JSON.stringify(i);let r,s;if(Array.isArray(i)){for(s="[",r=0;r<i.length;r++)r&&(s+=","),s+=n(i[r])||"null";return s+"]"}if(i===null)return"null";if(t.includes(i))throw new TypeError("Converting circular structure to JSON");const o=t.push(i)-1,a=Object.keys(i).sort();for(s="",r=0;r<a.length;r++){const u=a[r],l=n(i[u]);l&&(s&&(s+=","),s+=JSON.stringify(u)+":"+l)}return t.splice(o,1),`{${s}}`}(e)}function j(e,t){return X(e)&&J(e,t)&&e[t]!==void 0}const kr="row",Dr="column",Xp="facet",qe="x",gt="y",$i="x2",ur="y2",Ms="xOffset",Cu="yOffset",Fi="radius",Ur="radius2",ti="theta",jr="theta2",_i="latitude",ki="longitude",Di="latitude2",Zn="longitude2",Ns="time",vn="color",lr="fill",cr="stroke",En="shape",qr="size",Vo="angle",Wr="opacity",Ls="fillOpacity",Ps="strokeOpacity",Is="strokeWidth",Bs="strokeDash",qc="text",Qa="order",Wc="detail",Yp="key",ko="tooltip",Kp="href",Jp="url",Qp="description",YQ={x:1,y:1,x2:1,y2:1},FO={theta:1,theta2:1,radius:1,radius2:1};function _O(e){return J(FO,e)}const m2={longitude:1,longitude2:1,latitude:1,latitude2:1};function kO(e){switch(e){case _i:return"y";case Di:return"y2";case ki:return"x";case Zn:return"x2"}}function DO(e){return J(m2,e)}const KQ=U(m2),y2={...YQ,...FO,...m2,xOffset:1,yOffset:1,color:1,fill:1,stroke:1,time:1,op
15acity:1,fillOpacity:1,strokeOpacity:1,strokeWidth:1,strokeDash:1,size:1,angle:1,shape:1,order:1,text:1,detail:1,key:1,tooltip:1,href:1,url:1,description:1};function Oa(e){return e===vn||e===lr||e===cr}const RO={row:1,column:1,facet:1},Wn=U(RO),b2={...y2,...RO},JQ=U(b2),{order:xce,detail:vce,tooltip:Ece,...QQ}=b2,{row:Ace,column:wce,facet:Sce,...ZQ}=QQ;function eZ(e){return J(ZQ,e)}function OO(e){return J(b2,e)}const tZ=[$i,ur,Di,Zn,jr,Ur];function TO(e){return Xo(e)!==e}function Xo(e){switch(e){case $i:return qe;case ur:return gt;case Di:return _i;case Zn:return ki;case jr:return ti;case Ur:return Fi}return e}function Fs(e){if(_O(e))switch(e){case ti:return"startAngle";case jr:return"endAngle";case Fi:return"outerRadius";case Ur:return"innerRadius"}return e}function fr(e){switch(e){case qe:return $i;case gt:return ur;case _i:return Di;case ki:return Zn;case ti:return jr;case Fi:return Ur}}function An(e){switch(e){case qe:case $i:return"width";case gt:case ur:return"height"}}function MO(e){switch(e){case qe:return"xOffset";case gt:return"yOffset";case $i:return"x2Offset";case ur:return"y2Offset";case ti:return"thetaOffset";case Fi:return"radiusOffset";case jr:return"theta2Offset";case Ur:return"radius2Offset"}}function x2(e){switch(e){case qe:return"xOffset";case gt:return"yOffset"}}function nZ(e){switch(e){case"xOffset":return"x";case"yOffset":return"y"}}const iZ=U(y2),{x:Cce,y:$ce,x2:Fce,y2:_ce,xOffset:kce,yOffset:Dce,latitude:Rce,longitude:Oce,latitude2:Tce,longitude2:Mce,theta:Nce,theta2:Lce,radius:Pce,radius2:Ice,...v2}=y2,rZ=U(v2),E2={x:1,y:1},Gr=U(E2);function Ze(e){return J(E2,e)}const A2={theta:1,radius:1},sZ=U(A2);function Zp(e){return e==="width"?qe:gt}const NO={xOffset:1,yOffset:1};function Gc(e){return J(NO,e)}const oZ={time:1};function U0(e){return e in oZ}const{text:Bce,tooltip:zce,href:Uce,url:jce,description:qce,detail:Wce,key:Gce,order:Hce,...LO}=v2,aZ=U(LO);function uZ(e){return J(v2,e)}function lZ(e){switch(e){case vn:case lr:case cr:case qr:case En:case Wr:case Is:case Bs:return!0;case Ls:case Ps:case Vo:case Ns:return!1}}const PO={...E2,...A2,...NO,...LO},w2=U(PO);function dr(e){return J(PO,e)}function cZ(e,t){return dZ(e)[t]}const IO={arc:"always",area:"always",bar:"always",circle:"always",geoshape:"always",image:"always",line:"always",rule:"always",point:"always",rect:"always",square:"always",trail:"always",text:"always",tick:"always"},{geoshape:Vce,...fZ}=IO;function dZ(e){switch(e){case vn:case lr:case cr:case Qp:case Wc:case Yp:case ko:case Kp:case Qa:case Wr:case Ls:case Ps:case Is:case Xp:case kr:case Dr:return IO;case qe:case gt:case Ms:case Cu:case _i:case ki:case Ns:return fZ;case $i:case ur:case Di:case Zn:return{area:"always",bar:"always",image:"always",rect:"always",rule:"always",circle:"binned",point:"binned",square:"binned",tick:"binned",line:"binned",trail:"binned"};case qr:return{point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",text:"always",line:"always",trail:"always"};case Bs:return{line:"always",point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",geoshape:"always"};case En:return{point:"always",geoshape:"always"};case qc:return{text:"always"};case Vo:return{point:"always",square:"always",text:"always"};case Jp:return{image:"always"};case ti:return{text:"always",arc:"always"};case Fi:return{text:"always",arc:"always"};case jr:case Ur:return{arc:"always"}}}function j0(e){switch(e){case qe:case gt:case ti:case Fi:case Ms:case Cu:case qr:case Vo:case Is:case Wr:case Ls:case Ps:case Ns:case $i:case ur:case jr:case Ur:return;case Xp:case kr:case Dr:case En:case Bs:case qc:case ko:case Kp:case Jp:case Qp:return"discrete";case vn:case lr:case cr:return"flexible";case _i:case ki:case Di:case Zn:case Wc:case Yp:case Qa:return}}const hZ={argmax:1,argmin:1,average:1,count:1,distinct:1,exponential:1,exponentialb:1,product:1,max:1,mean:1,median:1,min:1,missing:1,q1:1,q3:1,ci0:1,ci1:1,stderr:1,stdev:1,stdevp:1,sum:1,valid:1,values:1,variance:1,variancep:1},pZ={count:1,min:1,max:1};function Lr(e){return j(e,"argmin")}function zs(e){return j(e,"argmax")}function S2(e){return Y(e)&&J(hZ,e)}const gZ=new Set(["count","valid","missing","distinct"]);function eg(e){return Y(e)&&gZ.has(e)}function mZ(e){return Y(e)&&ye(["min","max"],e)}const yZ=new Set(["count","sum","distinct","valid","missing"]),bZ=new Set(["mean","average","median","q1","q3","min","max"]);function BO(e){return Rs(e)&&(e=dg(e,void 0)),"bin"+U(e).map(t=>tg(e[t])?je(`_${t}_${$s(e[t])}`):je(`_${t}_${e[t]}`)).join("")}function Le(e){return e===!0||Yo(e)&&!e.binned}function mt(e){return e==="binned"||Yo(e)&&e.binned===!0}function Yo(e){return X(e)}function tg(e){return j(e,"param")}function iC(e){switch(e){case kr:case Dr:case qr:case vn:case lr
15:case cr:case Is:case Wr:case Ls:case Ps:case En:return 6;case Bs:return 4;default:return 10}}function Hc(e){return j(e,"expr")}function yt(e,{level:t}={level:0}){const n=U(e||{}),i={};for(const r of n)i[r]=t===0?_n(e[r]):yt(e[r],{level:t-1});return i}function zO(e){const{anchor:t,frame:n,offset:i,orient:r,angle:s,limit:o,color:a,subtitleColor:u,subtitleFont:l,subtitleFontSize:c,subtitleFontStyle:f,subtitleFontWeight:d,subtitleLineHeight:h,subtitlePadding:p,...g}=e,m={...g,...a?{fill:a}:{}},y={...t?{anchor:t}:{},...n?{frame:n}:{},...i?{offset:i}:{},...r?{orient:r}:{},...s!==void 0?{angle:s}:{},...o!==void 0?{limit:o}:{}},b={...u?{subtitleColor:u}:{},...l?{subtitleFont:l}:{},...c?{subtitleFontSize:c}:{},...f?{subtitleFontStyle:f}:{},...d?{subtitleFontWeight:d}:{},...h?{subtitleLineHeight:h}:{},...p?{subtitlePadding:p}:{}},x=Ya(e,["align","baseline","dx","dy","limit"]);return{titleMarkConfig:m,subtitleMarkConfig:x,nonMarkTitleProperties:y,subtitle:b}}function is(e){return Y(e)||I(e)&&Y(e[0])}function te(e){return j(e,"signal")}function Ko(e){return j(e,"step")}function xZ(e){return I(e)?!1:j(e,"fields")&&!j(e,"data")}function vZ(e){return I(e)?!1:j(e,"fields")&&j(e,"data")}function Fr(e){return I(e)?!1:j(e,"field")&&j(e,"data")}const EZ={aria:1,description:1,ariaRole:1,ariaRoleDescription:1,blend:1,opacity:1,fill:1,fillOpacity:1,stroke:1,strokeCap:1,strokeWidth:1,strokeOpacity:1,strokeDash:1,strokeDashOffset:1,strokeJoin:1,strokeOffset:1,strokeMiterLimit:1,startAngle:1,endAngle:1,padAngle:1,innerRadius:1,outerRadius:1,size:1,shape:1,interpolate:1,tension:1,orient:1,align:1,baseline:1,text:1,dir:1,dx:1,dy:1,ellipsis:1,limit:1,radius:1,theta:1,angle:1,font:1,fontSize:1,fontWeight:1,fontStyle:1,lineBreak:1,lineHeight:1,cursor:1,href:1,tooltip:1,cornerRadius:1,cornerRadiusTopLeft:1,cornerRadiusTopRight:1,cornerRadiusBottomLeft:1,cornerRadiusBottomRight:1,aspect:1,width:1,height:1,url:1,smooth:1},AZ=U(EZ),wZ={arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1},ny=["cornerRadius","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomLeft","cornerRadiusBottomRight"];function UO(e){const t=I(e.condition)?e.condition.map(rC):rC(e.condition);return{..._n(e),condition:t}}function _n(e){if(Hc(e)){const{expr:t,...n}=e;return{signal:t,...n}}return e}function rC(e){if(Hc(e)){const{expr:t,...n}=e;return{signal:t,...n}}return e}function Be(e){if(Hc(e)){const{expr:t,...n}=e;return{signal:t,...n}}return te(e)?e:e!==void 0?{value:e}:void 0}function SZ(e){return te(e)?e.signal:G(e)}function sC(e){return te(e)?e.signal:G(e.value)}function di(e){return te(e)?e.signal:e==null?null:G(e)}function CZ(e,t,n){for(const i of n){const r=Zi(i,t.markDef,t.config);r!==void 0&&(e[i]=Be(r))}return e}function jO(e){return[].concat(e.type,e.style??[])}function Re(e,t,n,i={}){const{vgChannel:r,ignoreVgConfig:s}=i;return r&&j(t,r)?t[r]:t[e]!==void 0?t[e]:s&&(!r||r===e)?void 0:Zi(e,t,n,i)}function Zi(e,t,n,{vgChannel:i}={}){const r=iy(e,t,n.style);return Qe(i?r:void 0,r,i?n[t.type][i]:void 0,n[t.type][e],i?n.mark[i]:n.mark[e])}function iy(e,t,n){return qO(e,jO(t),n)}function qO(e,t,n){t=K(t);let i;for(const r of t){const s=n[r];j(s,e)&&(i=s[e])}return i}function WO(e,t){return K(e).reduce((n,i)=>(n.field.push(V(i,t)),n.order.push(i.sort??"ascending"),n),{field:[],order:[]})}function GO(e,t){const n=[...e];return t.forEach(i=>{for(const r of n)if(kn(r,i))return;n.push(i)}),n}function HO(e,t){return kn(e,t)||!t?e:e?[...K(e),...K(t)].join(", "):t}function VO(e,t){const n=e.value,i=t.value;if(n==null||i===null)return{explicit:e.explicit,value:null};if((is(n)||te(n))&&(is(i)||te(i)))return{explicit:e.explicit,value:HO(n,i)};if(is(n)||te(n))return{explicit:e.explicit,value:n};if(is(i)||te(i))return{explicit:e.explicit,value:i};if(!is(n)&&!te(n)&&!is(i)&&!te(i))return{explicit:e.explicit,value:GO(n,i)};throw new Error("It should never reach here")}function C2(e){return`Invalid specification ${Te(e)}. Make sure the specification includes at least one of the following properties: "mark", "layer", "facet", "hconcat", "vconcat", "concat", or "repeat".`}const $Z='Autosize "fit" only works for single views and layered views.';function oC(e){return`${e=="width"?"Width":"Height"} "container" only works for single views and layered views.`}function aC(e){const t=e=="width"?"Width":"Height",n=e=="width"?"x":"y";return`${t} "container" only works well with autosize "fit" or "fit-${n}".`}function uC(e){return e?`Dropping "fit-${e}" because spec has discrete ${An(e)}.`:'Dropping "fit" because spec has discrete size.'}function $2(e){return`Unknown field for ${e}. Cannot calculate view size.`}function lC(e){return`Cannot project a selection on encoding channel "${e}", which has no field.`}function FZ(e,t){return`Cannot project a selection on encoding channel "${e}" as it uses an aggregate function ("${t}").`}function _Z(e){return`The "nearest" transform is not supported for ${e} marks.`}function XO(e){return`Selection not supported for ${e} yet.`}function kZ(e){return`Cannot find a selection named "${e}".`}const DZ="Scale bindings are currently only supported for scales with unbinned, continuous domains.",RZ="Sequntial scales are deprecated. The available quantitative scale type values are linear, log, pow, sqrt, symlog, time and utc",OZ="Legend bindings are only supported for selections over an individual field or encoding channel.";function TZ(e){return`Lookups can only be performed on selection parameters. "${e}" is a variable parameter.`}function MZ(e){return`Cannot define and lookup the "${e}" selection in the same view. Try moving the lookup into a second, layered view?`}const NZ="The same selection must be used to override scale domains in a layered view.",LZ='Interval selections should be initialized using "x", "y", "longitude", or "latitude" keys.';function PZ(e){return`Unknown repeated value "${e}".`}function cC(e){return`The "columns" property cannot be used when "${e}" has nested row/column.`}const IZ="Multiple timer selections in one unit spec are not supported. Ignoring all but the first.",F2="Animation involving facet, layer, or concat is currently unsupported.";function BZ(e){return`A "field" or "encoding" must be specified when using a selection as a scale domain. Using "field": ${G(e)}.`}function zZ(e,t,n,i){return(e.length?"Multiple ":"No ")+`matching ${G(t)} encoding found for selection ${G(n.param)}. Using "field": ${G(i)}.`}const UZ="Axes cannot be shared in concatenated or repeated views yet (https://github.com/vega/vega-lite/issues/2415).";function jZ(e){return`Unrecognized parse "${e}".`}
15function fC(e,t,n){return`An ancestor parsed field "${e}" as ${n} but a child wants to parse the field as ${t}.`}const qZ="Attempt to add the same child twice.";function WZ(e){return`Ignoring an invalid transform: ${Te(e)}.`}const GZ='If "from.fields" is not specified, "as" has to be a string that specifies the key to be used for the data from the secondary source.';function dC(e){return`Config.customFormatTypes is not true, thus custom format type and format for channel ${e} are dropped.`}function HZ(e){const{parentProjection:t,projection:n}=e;return`Layer's shared projection ${Te(t)} is overridden by a child projection ${Te(n)}.`}const VZ="Arc marks uses theta channel rather than angle, replacing angle with theta.";function XZ(e){return`${e}Offset dropped because ${e} is continuous`}function YZ(e,t,n){return`Channel ${e} is a ${t}. Converted to {value: ${Te(n)}}.`}function YO(e){return`Invalid field type "${e}".`}function KZ(e,t){return`Invalid field type "${e}" for aggregate: "${t}", using "quantitative" instead.`}function JZ(e){return`Invalid aggregation operator "${e}".`}function KO(e,t){const{fill:n,stroke:i}=t;return`Dropping color ${e} as the plot also has ${n&&i?"fill and stroke":n?"fill":"stroke"}.`}function QZ(e){return`Position range does not support relative band size for ${e}.`}function ry(e,t){return`Dropping ${Te(e)} from channel "${t}" since it does not contain any data field, datum, value, or signal.`}const ZZ="Line marks cannot encode size with a non-groupby field. You may want to use trail marks instead.";function ng(e,t,n){return`${e} dropped as it is incompatible with "${t}".`}function eee(e){return`${e}-encoding is dropped as ${e} is not a valid encoding channel.`}function tee(e){return`${e} encoding should be discrete (ordinal / nominal / binned).`}function nee(e){return`${e} encoding should be discrete (ordinal / nominal / binned) or use a discretizing scale (e.g. threshold).`}function iee(e){return`Facet encoding dropped as ${e.join(" and ")} ${e.length>1?"are":"is"} also specified.`}function q0(e,t){return`Using discrete channel "${e}" to encode "${t}" field can be misleading as it does not encode ${t==="ordinal"?"order":"magnitude"}.`}function ree(e){return`The ${e} for range marks cannot be an expression`}function see(e,t){return`Line mark is for continuous lines and thus cannot be used with ${e&&t?"x2 and y2":e?"x2":"y2"}. We will use the rule mark (line segments) instead.`}function oee(e,t){return`Specified orient "${e}" overridden with "${t}".`}function aee(e){return`Cannot use the scale property "${e}" with non-color channel.`}function uee(e){return`Cannot use the relative band size with ${e} scale.`}function lee(e){return`Using unaggregated domain with raw field has no effect (${Te(e)}).`}function cee(e){return`Unaggregated domain not applicable for "${e}" since it produces values outside the origin domain of the source data.`}function fee(e){return`Unaggregated domain is currently unsupported for log scale (${Te(e)}).`}function dee(e){return`Cannot apply size to non-oriented mark "${e}".`}function hee(e,t,n){return`Channel "${e}" does not work with "${t}" scale. We are using "${n}" scale instead.`}function pee(e,t){return`FieldDef does not work with "${e}" scale. We are using "${t}" scale instead.`}function JO(e,t,n){return`${n}-scale's "${t}" is dropped as it does not work with ${e} scale.`}function QO(e){return`The step for "${e}" is dropped because the ${e==="width"?"x":"y"} is continuous.`}function gee(e,t,n,i){return`Conflicting ${t.toString()} property "${e.toString()}" (${Te(n)} and ${Te(i)}). Using ${Te(n)}.`}function mee(e,t,n,i){return`Conflicting ${t.toString()} property "${e.toString()}" (${Te(n)} and ${Te(i)}). Using the union of the two domains.`}function yee(e){return`Setting the scale to be independent for "${e}" means we also have to set the guide (axis or legend) to be independent.`}function bee(e){return`Dropping sort property ${Te(e)} as unioned domains only support boolean or op "count", "min", and "max".`}const hC="Domains that should be unioned has conflicting sort properties. Sort will be set to true.",xee="Detected faceted independent scales that union domain of multiple fields from different data sources. We will use the first field. The result view size may be incorrect.",vee="Detected faceted independent scales that union domain of the same fields from different source. We will assume that this is the same field from a different fork of the same data source. However, if this is not the case, the result view size may be incorrect.",Eee="Detected faceted independent scales that union domain of multiple fields from the same data source. We will use the first field. The result view size may be incorrect.";function Aee(e){return`Cannot stack "${e}" if there is already "${e}2".`}function wee(e){return`Stack is applied to a non-linear scale (${e}).`}function See(e){return`Stacking is applied even though the aggregate function is non-summative ("${e}").`}function _h(e,t){return`Invalid ${e}: ${Te(t)}
15.`}function Cee(e){return`Dropping day from datetime ${Te(e)} as day cannot be combined with other units.`}function $ee(e,t){return`${t?"extent ":""}${t&&e?"and ":""}${e?"center ":""}${t&&e?"are ":"is "}not needed when data are aggregated.`}function Fee(e,t,n){return`${e} is not usually used with ${t} for ${n}.`}function _ee(e,t){return`Continuous axis should not have customized aggregation function ${e}; ${t} already agregates the axis.`}function pC(e){return`1D error band does not support ${e}.`}function ZO(e){return`Channel ${e} is required for "binned" bin.`}function kee(e){return`Channel ${e} should not be used with "binned" bin.`}function Dee(e){return`Domain for ${e} is required for threshold scale.`}const eT=Xy(Vy);let Do=eT;function Ree(e){return Do=e,Do}function Oee(){return Do=eT,Do}function _2(...e){Do.error(...e)}function q(...e){Do.warn(...e)}function Tee(...e){Do.debug(...e)}function Jo(e){if(e&&X(e)){for(const t of D2)if(j(e,t))return!0}return!1}const tT=["january","february","march","april","may","june","july","august","september","october","november","december"],Mee=tT.map(e=>e.substr(0,3)),nT=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],Nee=nT.map(e=>e.substr(0,3));function Lee(e){if(Vp(e)&&(e=+e),Se(e))return e>4&&q(_h("quarter",e)),e-1;throw new Error(_h("quarter",e))}function Pee(e){if(Vp(e)&&(e=+e),Se(e))return e-1;{const t=e.toLowerCase(),n=tT.indexOf(t);if(n!==-1)return n;const i=t.substr(0,3),r=Mee.indexOf(i);if(r!==-1)return r;throw new Error(_h("month",e))}}function Iee(e){if(Vp(e)&&(e=+e),Se(e))return e%7;{const t=e.toLowerCase(),n=nT.indexOf(t);if(n!==-1)return n;const i=t.substr(0,3),r=Nee.indexOf(i);if(r!==-1)return r;throw new Error(_h("day",e))}}function k2(e,t){const n=[];if(t&&e.day!==void 0&&U(e).length>1&&(q(Cee(e)),e=le(e),delete e.day),e.year!==void 0?n.push(e.year):n.push(2012),e.month!==void 0){const i=t?Pee(e.month):e.month;n.push(i)}else if(e.quarter!==void 0){const i=t?Lee(e.quarter):e.quarter;n.push(Se(i)?i*3:`${i}*3`)}else n.push(0);if(e.date!==void 0)n.push(e.date);else if(e.day!==void 0){const i=t?Iee(e.day):e.day;n.push(Se(i)?i+1:`${i}+1`)}else n.push(1);for(const i of["hours","minutes","seconds","milliseconds"]){const r=e[i];n.push(typeof r>"u"?0:r)}return n}function Ro(e){const n=k2(e,!0).join(", ");return e.utc?`utc(${n})`:`datetime(${n})`}function Bee(e){const n=k2(e,!1).join(", ");return e.utc?`utc(${n})`:`datetime(${n})`}function zee(e){const t=k2(e,!0);return e.utc?+new Date(Date.UTC(...t)):+new Date(...t)}const iT={year:1,quarter:1,month:1,week:1,day:1,dayofyear:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1},D2=U(iT);function Uee(e){return J(iT,e)}function Qo(e){return X(e)?e.binned:rT(e)}function rT(e){return e&&e.startsWith("binned")}function R2(e){return e.startsWith("utc")}function jee(e){return e.substring(3)}const qee={"year-month":"%b %Y ","year-month-date":"%b %d, %Y "};function ig(e){return D2.filter(t=>oT(e,t))}function sT(e){const t=ig(e);return t[t.length-1]}function oT(e,t){const n=e.indexOf(t);return!(n<0||n>0&&t==="seconds"&&e.charAt(n-1)==="i"||e.length>n+3&&t==="day"&&e.charAt(n+3)==="o"||n>0&&t==="year"&&e.charAt(n-1)==="f")}function Wee(e,t,{end:n}={end:!1}){const i=g2(t),r=R2(e)?"utc":"";function s(u){return u==="quarter"?`(${r}quarter(${i})-1)`:`${r}${u}(${i})`}let o;const a={};for(const u of D2)oT(e,u)&&(a[u]=s(u),o=u);return n&&(a[o]+="+1"),Bee(a)}function aT(e){if(!e)return;const t=ig(e);return`timeUnitSpecifier(${Te(t)}, ${Te(qee)})`}function Gee(e,t,n){if(!e)return;const i=aT(e);return`${n||R2(e)?"utc":"time"}Format(${t}, ${i})`}function ht(e){if(!e)return;let t;return Y(e)?rT(e)?t={unit:e.substring(6),binned:!0}:t={unit:e}:X(e)&&(t={...e,...e.unit?{unit:e.unit}:{}}),R2(t.unit)&&(t.utc=!0,t.unit=jee(t.unit)),t}function Hee(e){const{utc:t,...n}=ht(e);return n.unit?(t?"utc":"")+U(n).map(i=>je(`${i==="unit"?"":`_${i}_`}${n[i]}`)).join(""):(t?"utc":"")+"timeunit"+U(n).map(i=>je(`_${i}_${n[i]}`)).join("")}function uT(e,t=n=>n){const n=ht(e),i=sT(n.unit);if(i&&i!=="day"){const r={year:2001,month:1,date:1,hours:0,minutes:0,seconds:0,milliseconds:0},{step:s,part:o}=lT(i,n.step),a={...r,[o]:+r[o]+s};return`${t(Ro(a))} - ${t(Ro(r))}`}}const Vee={year:1,month:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1};function Xee(e){return J(Vee,e)}
15function lT(e,t=1){if(Xee(e))return{part:e,step:t};switch(e){case"day":case"dayofyear":return{part:"date",step:t};case"quarter":return{part:"month",step:t*3};case"week":return{part:"date",step:t*7}}}function Yee(e){return j(e,"param")}function O2(e){return!!e?.field&&e.equal!==void 0}function T2(e){return!!e?.field&&e.lt!==void 0}function M2(e){return!!e?.field&&e.lte!==void 0}function N2(e){return!!e?.field&&e.gt!==void 0}function L2(e){return!!e?.field&&e.gte!==void 0}function P2(e){if(e?.field){if(I(e.range)&&e.range.length===2)return!0;if(te(e.range))return!0}return!1}function I2(e){return!!e?.field&&(I(e.oneOf)||I(e.in))}function Kee(e){return!!e?.field&&e.valid!==void 0}function cT(e){return I2(e)||O2(e)||P2(e)||T2(e)||N2(e)||M2(e)||L2(e)}function Mi(e,t){return hg(e,{timeUnit:t,wrapTime:!0})}function Jee(e,t){return e.map(n=>Mi(n,t))}function fT(e,t=!0){const{field:n}=e,i=ht(e.timeUnit),{unit:r,binned:s}=i||{},o=V(e,{expr:"datum"}),a=r?`time(${s?o:Wee(r,n)})`:o;if(O2(e))return`${a}===${Mi(e.equal,r)}`;if(T2(e)){const u=e.lt;return`${a}<${Mi(u,r)}`}else if(N2(e)){const u=e.gt;return`${a}>${Mi(u,r)}`}else if(M2(e)){const u=e.lte;return`${a}<=${Mi(u,r)}`}else if(L2(e)){const u=e.gte;return`${a}>=${Mi(u,r)}`}else{if(I2(e))return`indexof([${Jee(e.oneOf,r).join(",")}], ${a}) !== -1`;if(Kee(e))return rg(a,e.valid);if(P2(e)){const{range:u}=yt(e),l=te(u)?{signal:`${u.signal}[0]`}:u[0],c=te(u)?{signal:`${u.signal}[1]`}:u[1];if(l!==null&&c!==null&&t)return"inrange("+a+", ["+Mi(l,r)+", "+Mi(c,r)+"])";const f=[];return l!==null&&f.push(`${a} >= ${Mi(l,r)}`),c!==null&&f.push(`${a} <= ${Mi(c,r)}`),f.length>0?f.join(" && "):"true"}}throw new Error(`Invalid field predicate: ${Te(e)}`)}function rg(e,t=!0){return t?`isValid(${e}) && isFinite(+${e})`:`!isValid(${e}) || !isFinite(+${e})`}function Qee(e){return cT(e)&&e.timeUnit?{...e,timeUnit:ht(e.timeUnit)}:e}const Vc={quantitative:"quantitative",ordinal:"ordinal",temporal:"temporal",nominal:"nominal",geojson:"geojson"};function Zee(e){return e==="quantitative"||e==="temporal"}function dT(e){return e==="ordinal"||e==="nominal"}const Oo=Vc.quantitative,B2=Vc.ordinal,Za=Vc.temporal,z2=Vc.nominal,$u=Vc.geojson;function ete(e){if(e)switch(e=e.toLowerCase(),e){case"q":case Oo:return"quantitative";case"t":case Za:return"temporal";case"o":case B2:return"ordinal";case"n":case z2:return"nominal";case $u:return"geojson"}}const bt={LINEAR:"linear",LOG:"log",POW:"pow",SQRT:"sqrt",TIME:"time",UTC:"utc",POINT:"point",BAND:"band"},sy={linear:"numeric",log:"numeric",pow:"numeric",sqrt:"numeric",symlog:"numeric",identity:"numeric",sequential:"numeric",time:"time",utc:"time",ordinal:"ordinal","bin-ordinal":"bin-ordinal",point:"ordinal-position",band:"ordinal-position",quantile:"discretizing",quantize:"discretizing",threshold:"discretizing"};function tte(e,t){const n=sy[e],i=sy[t];return n===i||n==="ordinal-position"&&i==="time"||i==="ordinal-position"&&n==="time"}const nte={linear:0,log:1,pow:1,sqrt:1,symlog:1,identity:1,sequential:1,time:0,utc:0,point:10,band:11,ordinal:0,"bin-ordinal":0,quantile:0,quantize:0,threshold:0};function gC(e){return nte[e]}const hT=new Set(["linear","log","pow","sqrt","symlog"]),pT=new Set([...hT,"time","utc"]);function gT(e){return hT.has(e)}const mT=new Set(["quantile","quantize","threshold"]),ite=new Set([...pT,...mT,"sequential","identity"]),rte=new Set(["ordinal","bin-ordinal","point","band"]);function pt(e){return rte.has(e)}function xi(e){return ite.has(e)}function qi(e){return pT.has(e)}function eu(e){return mT.has(e)}const ste={pointPadding:.5,barBandPaddingInner:.1,rectBandPaddingInner:0,tickBandPaddingInner:.25,bandWithNestedOffsetPaddingInner:.2,bandWithNestedOffsetPaddingOuter:.2,minBandSize:2,minFontSize:8,maxFontSize:40,minOpacity:.3,maxOpacity:.8,minSize:4,minStrokeWidth:1,maxStrokeWidth:4,quantileCount:4,quantizeCount:4,zero:!0,framesPerSecond:2,animationDuration:5};function ote(e){return!Y(e)&&j(e,"name")}function yT(e){return j(e,"param")}function ate(e){return j(e,"unionWith")}function ute(e){return X(e)&&"field"in e}const lte={type:1,domain:1,domainMax:1,domainMin:1,domainMid:1,domainRaw:1,align:1,range:1,rangeMax:1,rangeMin:1,scheme:1,bins:1,reverse:1,round:1,clamp:1,nice:1,base:1,exponent:1,constant:1,interpolate:1,zero:1,padding:1,paddingInner:1,paddingOuter:1},{type:Xce,domain:Yce,range:Kce,rangeMax:Jce,rangeMin:Qce,scheme:Zce,...cte}=lte,fte=U(cte);function oy(e,t){switch(t){case"type":case"domain":case"reverse":case"range":return!0;case"scheme":case"interpolate":return!["point","band","identity"].includes(e);case"bins":return!["point","band","identity","ordinal"].includes(e);case"round":return qi(e)||e==="band"||e==="point";case"padding":case"rangeMin":case"rangeMax":return qi(e)||["point","band"].includes(e);case"paddingOuter":case"align":return["point","band"].includes(e);case"paddingInner":return e==="band";case"domainMax":case"domainMid":case"domainMin":case"domainRaw":case"clamp":return qi(e);case"nice":return qi(e)||e==="quantize"||e==="threshold";case"exponent":return e==="pow";case"base":return e==="log";case"constant":return e==="symlog";case"zero":return xi(e)&&!ye(["log","time","utc","threshold","quantile"],e)}}function bT(e,t){switch(t){case"interpolate":case"scheme":case"domainMid":return Oa(e)?void 0:aee(t);case"align":case"type":case"bins":case"domain":case"domainMax":case"domainMin":case"domainRaw":case"range":case"base":case"exponent":case"constant":case"nice":case"padding":case"paddingInner":case"paddingOuter":case"rangeMax":case"rangeMin":case"reverse":case"round":case"clamp":case"zero":return}}function dte(e,t){return ye([B2,z2],t)?e===void 0||pt(e):t===Za?ye([bt.TIME,bt.UTC,void 0],e):t===Oo?gT(e)||eu(e)||e===void 0:!0}function hte(e,t,n=!1){if(!dr(e))return!1;switch(e){case qe:case gt:case Ms:case Cu:case ti:case Fi:return qi(t)||t==="band"?!0:t==="point"?!n:!1;case Ns:return ye(["linear","band"],t);case qr:case Is:case Wr:case Ls:case Ps:case Vo:return qi(t)||eu(t)||ye(["band","point","ordinal"],t);
15case vn:case lr:case cr:return t!=="band";case Bs:case En:return t==="ordinal"||eu(t)}}function pte(e){return X(e)&&"value"in e}const an={arc:"arc",area:"area",bar:"bar",image:"image",line:"line",point:"point",rect:"rect",rule:"rule",text:"text",tick:"tick",trail:"trail",circle:"circle",square:"square",geoshape:"geoshape"},xT=an.arc,sg=an.area,og=an.bar,gte=an.image,ag=an.line,ug=an.point,mte=an.rect,kh=an.rule,vT=an.text,U2=an.tick,yte=an.trail,j2=an.circle,q2=an.square,ET=an.geoshape;function Us(e){return["line","area","trail"].includes(e)}function oc(e){return["rect","bar","image","arc","tick"].includes(e)}const bte=new Set(U(an));function er(e){return j(e,"type")}const xte=["stroke","strokeWidth","strokeDash","strokeDashOffset","strokeOpacity","strokeJoin","strokeMiterLimit"],vte=["fill","fillOpacity"],Ete=[...xte,...vte],Ate={color:1,filled:1,invalid:1,order:1,radius2:1,theta2:1,timeUnitBandSize:1,timeUnitBandPosition:1},mC=U(Ate),W0=["binSpacing","continuousBandSize","discreteBandSize","minBandSize"],wte={area:["line","point"],bar:W0,rect:W0,line:["point"],tick:["bandSize","thickness",...W0]}
15,Ste={color:"#4c78a8",invalid:"break-paths-show-path-domains",timeUnitBandSize:1},Cte={mark:1,arc:1,area:1,bar:1,circle:1,image:1,line:1,point:1,rect:1,rule:1,square:1,text:1,tick:1,trail:1,geoshape:1},AT=U(Cte);function To(e){return j(e,"band")}const $te={horizontal:["cornerRadiusTopRight","cornerRadiusBottomRight"],vertical:["cornerRadiusTopLeft","cornerRadiusTopRight"]},Fte=5,W2={binSpacing:0,continuousBandSize:Fte,minBandSize:.25,timeUnitBandPosition:.5},_te={...W2,binSpacing:1},kte={...W2,thickness:1};function Dte(e){return er(e)?e.type:e}function wT(e,{isPath:t}){return e===void 0||e==="break-paths-show-path-domains"?t?"break-paths-show-domains":"filter":e===null?"show":e}function G2({markDef:e,config:t,scaleChannel:n,scaleType:i,isCountAggregate:r}){if(!i||!xi(i)||r)return"always-valid";const s=wT(Re("invalid",e,t),{isPath:Us(e.type)});return t.scale?.invalid?.[n]!==void 0?"show":s}function Rte(e){return e==="break-paths-filter-domains"||e==="break-paths-show-domains"}function ST({scaleName:e,scale:t,mode:n}){const i=`domain('${e}')`;if(!t||!e)return;const r=`${i}[0]`,s=`peek(${i})`,o=t.domainHasZero();return o==="definitely"?{scale:e,value:0}:o==="maybe"?{signal:`scale('${e}', inrange(0, ${i}) ? 0 : ${n==="zeroOrMin"?r:s})`}:{signal:`scale('${e}', ${n==="zeroOrMin"?r:s})`}}function CT({scaleChannel:e,channelDef:t,scale:n,scaleName:i,markDef:r,config:s}){const o=n?.get("type"),a=Ei(t),u=eg(a?.aggregate),l=G2({scaleChannel:e,markDef:r,config:s,scaleType:o,isCountAggregate:u});if(a&&l==="show"){const c=s.scale.invalid?.[e]??"zero-or-min";return{test:rg(V(a,{expr:"datum"}),!1),...Ote(c,n,i)}}}function Ote(e,t,n){if(pte(e)){const{value:i}=e;return te(i)?{signal:i.signal}:{value:i}}return ST({scale:t,scaleName:n,mode:"zeroOrMin"})}function H2(e){const{channel:t,channelDef:n,markDef:i,scale:r,scaleName:s,config:o}=e,a=Xo(t),u=V2(e),l=CT({scaleChannel:a,channelDef:n,scale:r,scaleName:s,markDef:i,config:o});return l!==void 0?[l,u]:u}function Tte(e){const{datum:t}=e;return Jo(t)?Ro(t):`${Te(t)}`}function po(e,t,n,i){const r={};if(t&&(r.scale=t),hr(e)){const{datum:s}=e;Jo(s)?r.signal=Ro(s):te(s)?r.signal=s.signal:Hc(s)?r.signal=s.expr:r.value=s}else r.field=V(e,n);if(i){const{offset:s,band:o}=i;s&&(r.offset=s),o&&(r.band=o)}return r}function Dh({scaleName:e,fieldOrDatumDef:t,fieldOrDatumDef2:n,offset:i,startSuffix:r,endSuffix:s="end",bandPosition:o=.5}){const a=!te(o)&&0<o&&o<1?"datum":void 0,u=V(t,{expr:a,suffix:r}),l=n!==void 0?V(n,{expr:a}):V(t,{suffix:s,expr:a}),c={};if(o===0||o===1){c.scale=e;const f=o===0?u:l;c.field=f}else{const f=te(o)?`(1-${o.signal}) * ${u} + ${o.signal} * ${l}`:`${1-o} * ${u} + ${o} * ${l}`;c.signal=`scale("${e}", ${f})`}return i&&(c.offset=i),c}function Mte({scaleName:e,fieldDef:t}){const n=V(t,{expr:"datum"}),i=V(t,{expr:"datum",suffix:"end"});return`abs(scale("${e}", ${i}) - scale("${e}", ${n}))`}function V2({channel:e,channelDef:t,channel2Def:n,markDef:i,config:r,scaleName:s,scale:o,stack:a,offset:u,defaultRef:l,bandPosition:c}){if(t){if(ce(t)){const f=o?.get("type");if(sn(t)){c??(c=_s({fieldDef:t,fieldDef2:n,markDef:i,config:r}));const{bin:d,timeUnit:h,type:p}=t;if(Le(d)||c&&h&&p===Za)return a?.impute?po(t,s,{binSuffix:"mid"},{offset:u}):c&&!pt(f)?Dh({scaleName:s,fieldOrDatumDef:t,bandPosition:c,offset:u}):po(t,s,Qc(t,e)?{binSuffix:"range"}:{},{offset:u});if(mt(d)){if(W(n))return Dh({scaleName:s,fieldOrDatumDef:t,fieldOrDatumDef2:n,bandPosition:c,offset:u});q(ZO(e===qe?$i:ur))}}return po(t,s,pt(f)?{binSuffix:"range"}:{},{offset:u,band:f==="band"?c??t.bandPosition??.5:void 0})}else if(vi(t)){const f=t.value,d=u?{offset:u}:{};return{...Ll(e,f),...d}}}return de(l)&&(l=l()),l&&{...l,...u?{offset:u}:{}}}function Ll(e,t){return ye(["x","x2"],e)&&t==="width"?{field:{group:"width"}}:ye(["y","y2"],e)&&t==="height"?{field:{group:"height"}}:Be(t)}function Mo(e){return e&&e!=="number"&&e!=="time"}function $T(e,t,n){return`${e}(${t}${n?`, ${Te(n)}`:""})`}const Nte=" – ";function X2({fieldOrDatumDef:e,format:t,formatType:n,expr:i,normalizeStack:r,config:s}){if(Mo(n))return hi({fieldOrDatumDef:e,format:t,formatType:n,expr:i,config:s});const o=FT(e,i,r),a=tu(e);if(t===void 0&&n===void 0&&s.customFormatTypes){if(a==="quantitative"){if(r&&s.normalizedNumberFormatType)return hi({fieldOrDatumDef:e,format:s.normalizedNumberFormat,formatType:s.normalizedNumberFormatType,expr:i,config:s});if(s.numberFormatType)return hi({fieldOrDatumDef:e,format:s.numberFormat,formatType:s.numberFormatType,expr:i,config:s})}if(a==="temporal"&&s.timeFormatType&&W(e)&&e.timeUnit===void 0)return hi({fieldOrDatumDef:e,format:s.timeFormat,formatType:s.timeFormatType,expr:i,config:s})}if(iu(e)){const u=Pte({field:o,timeUnit:W(e)?ht(e.timeUnit)?.unit:void 0,format:t,formatType:s.timeFormatType,rawTimeFormat:s.timeFormat,isUTCScale:Zo(e)&&e.scale?.type===bt.
15UTC});return u?{signal:u}:void 0}if(t=ay({type:a,specifiedFormat:t,config:s,normalizeStack:r}),W(e)&&Le(e.bin)){const u=V(e,{expr:i,binSuffix:"end"});return{signal:Xc(o,u,t,n,s)}}else return t||tu(e)==="quantitative"?{signal:`${DT(o,t)}`}:{signal:`isValid(${o}) ? ${o} : ""+${o}`}}function FT(e,t,n){return W(e)?n?`${V(e,{expr:t,suffix:"end"})}-${V(e,{expr:t,suffix:"start"})}`:V(e,{expr:t}):Tte(e)}function hi({fieldOrDatumDef:e,format:t,formatType:n,expr:i,normalizeStack:r,config:s,field:o}){if(o??(o=FT(e,i,r)),o!=="datum.value"&&W(e)&&Le(e.bin)){const a=V(e,{expr:i,binSuffix:"end"});return{signal:Xc(o,a,t,n,s)}}return{signal:$T(n,o,t)}}function _T(e,t,n,i,r,s){if(!(Y(i)&&Mo(i))&&!(n===void 0&&i===void 0&&r.customFormatTypes&&tu(e)==="quantitative"&&(r.normalizedNumberFormatType&&nu(e)&&e.stack==="normalize"||r.numberFormatType))){if(nu(e)&&e.stack==="normalize"&&r.normalizedNumberFormat)return ay({type:"quantitative",config:r,normalizeStack:!0});if(iu(e)){const o=W(e)?ht(e.timeUnit)?.unit:void 0;return o===void 0&&r.customFormatTypes&&r.timeFormatType?void 0:Lte({specifiedFormat:n,timeUnit:o,config:r,omitTimeFormatConfig:s})}return ay({type:t,specifiedFormat:n,config:r})}}function kT(e,t,n){if(e&&(te(e)||e==="number"||e==="time"))return e;if(iu(t)&&n!=="time"&&n!=="utc")return W(t)&&ht(t?.timeUnit)?.utc?"utc":"time"}function ay({type:e,specifiedFormat:t,config:n,normalizeStack:i}){if(Y(t))return t;if(e===Oo)return i?n.normalizedNumberFormat:n.numberFormat}function Lte({specifiedFormat:e,timeUnit:t,config:n,omitTimeFormatConfig:i}){return e||(t?{signal:aT(t)}:i?void 0:n.timeFormat)}function DT(e,t){return`format(${e}, "${t||""}")`}function yC(e,t,n,i){return Mo(n)?$T(n,e,t):DT(e,(Y(t)?t:void 0)??i.numberFormat)}function Xc(e,t,n,i,r){if(n===void 0&&i===void 0&&r.customFormatTypes&&r.numberFormatType)return Xc(e,t,r.numberFormat,r.numberFormatType,r);const s=yC(e,n,i,r),o=yC(t,n,i,r);return`${rg(e,!1)} ? "null" : ${s} + "${Nte}" + ${o}`}function Pte({field:e,timeUnit:t,format:n,formatType:i,rawTimeFormat:r,isUTCScale:s}){return!t||n?!t&&i?`${i}(${e}, '${n}')`:(n=Y(n)?n:r,`${s?"utc":"time"}Format(${e}, '${n}')`):Gee(t,e,s)}const lg="min",Ite={x:1,y:1,color:1,fill:1,stroke:1,strokeWidth:1,size:1,shape:1,fillOpacity:1,strokeOpacity:1,opacity:1,text:1};function bC(e){return J(Ite,e)}function Bte(e){return j(e,"encoding")}function Rr(e){return e&&(e.op==="count"||j(e,"field"))}function RT(e){return e&&I(e)}function Yc(e){return j(e,"row")||j(e,"column")}function Y2(e){return j(e,"header")}function cg(e){return j(e,"facet")}function zte(e){return j(e,"param")}function Ute(e){return!Y(e)&&j(e,"repeat")}function xC(e){const{field:t,timeUnit:n,bin:i,aggregate:r}=e;return{...n?{timeUnit:n}:{},...i?{bin:i}:{},...r?{aggregate:r}:{},field:t}}function K2(e){return j(e,"sort")}function _s({fieldDef:e,fieldDef2:t,markDef:n,config:i}){if(ce(e)&&e.bandPosition!==void 0)return e.bandPosition;if(W(e)){const{timeUnit:r,bin:s}=e;if(r&&!t)return Zi("timeUnitBandPosition",n,i);if(Le(s))return .5}}function OT({channel:e,fieldDef:t,fieldDef2:n,markDef:i,config:r,scaleType:s,useVlSizeChannel:o}){const a=An(e),u=Re(o?"size":a,i,r,{vgChannel:a});if(u!==void 0)return u;if(W(t)){const{timeUnit:l,bin:c}=t;if(l&&!n)return{band:Zi("timeUnitBandSize",i,r)};if(Le(c)&&!pt(s))return{band:1}}if(oc(i.type))return s?pt(s)?r[i.type]?.discreteBandSize||{band:1}:r[i.type]?.continuousBandSize:r[i.type]?.discreteBandSize}function TT(e,t,n,i){return Le(e.bin)||e.timeUnit&&sn(e)&&e.type==="temporal"?_s({fieldDef:e,fieldDef2:t,markDef:n,config:i})!==void 0:!1}function MT(e){return j(e,"sort")&&!j(e,"field")}function Kc(e){return j(e,"condition")}function fg(e){const t=e?.condition;return!!t&&!I(t)&&W(t)}function Jc(e){const t=e?.condition;return!!t&&!I(t)&&ce(t)}function jte(e){const t=e?.condition;return!!t&&(I(t)||vi(t))}function W(e){return j(e,"field")||e?.aggregate==="count"}function tu(e){return e?.type}function hr(e){return j(e,"datum")}function hs(e){return sn(e)&&!Oh(e)||Rh(e)}function vC(e){return sn(e)&&e.type==="quantitative"&&!e.bin||Rh(e)}function Rh(e){return hr(e)&&Se(e.datum)}function ce(e){return W(e)||hr(e)}function sn(e){return e&&(j(e,"field")||e.aggregate==="count")&&j(e,"type")}function vi(e){return j(e,"value")}function Zo(e){return j(e,"scale")||j(e,"sort")}function nu(e){return j(e,"axis")||j(e,"stack")||j(e,"impute")}function NT(e){return j(e,"legend")}function LT(e){return j(e,"format")||j(e,"formatType")}function qte(e){return gn(e,["legend","axis","header","scale"])}function Wte(e){return j(e,"op")}function V(e,t={}){let n=e.field;const i=t.prefix;let r=t.suffix,s="";if(Hte(e))n=CO("count");else{let o;if(!t.nofn)if(Wte(e))o=e.op;else{const{bin:a,aggregate:u,timeUnit:l}=e;Le(a)?(o=BO(a),r=(t.binSuffix??"")+(t.suffix??"")):u?zs(u)?(s=`["${n}"]`,n=`argmax_${u.argmax}`):Lr(u)?(s=`["${n}"]`,n=`argmin_${u.argmin}`):o=String(u):l&&!Qo(l)&&(o=Hee(l),r=(!["range","mid"].includes(t.binSuffix)&&t.binSuffix||"")+(t.suffix??""))}o&&(n=n?`${o}_${n}`:o)}return r&&(n=`${n}_${r}`),i&&(n=`${i}_${n}`),t.forAs?Su(n):t.expr?AO(n,t.expr)+s:Qn(n)+s}function Oh(e){switch(e.type){case"nominal":case"ordinal":case"geojson":return!0;case"quantitative":return W(e)&&!!e.bin;case"temporal":return!1}throw new Error(YO(e.type))}function Gte(e){return Zo(e)&&eu(e.scale?.type)}function Hte(e){return e.aggregate==="count"}function Vte(e,t){const{field:n,bin:i,timeUnit:r,aggregate:s}=e;if(s==="count")return t.countTitle;if(Le(i))return`${n} (binned)`;if(r&&!Qo(r)){const o=ht(r)?.unit;if(o)return`${n} (${ig(o).join("-")})`}else if(s)return zs(s)?`${n} for max ${s.argmax}`:Lr(s)?`${n} for min ${s.argmin}`:`${jc(s)} of ${n}`;return n}function Xte(e){const{aggregate:t,bin:n,timeUnit:i,field:r}=e;if(zs(t))return`${r} for argmax(${t.argmax})`;if(Lr(t))return`${r} for argmin(${t.argmin})`;const s=i&&!Qo(i)?ht(i):void 0,o=t||s?.unit||s?.maxbins&&"timeunit"||Le(n)&&"bin";return o?`${o.toUpperCase()}(${r})`:r}const PT=(e,t)=>
15{switch(t.fieldTitle){case"plain":return e.field;case"functional":return Xte(e);default:return Vte(e,t)}};let IT=PT;function BT(e){IT=e}function Yte(){BT(PT)}function Ta(e,t,{allowDisabling:n,includeDefault:i=!0}){const r=J2(e)?.title;if(!W(e))return r??e.title;const s=e,o=i?Q2(s,t):void 0;return n?Qe(r,s.title,o):r??s.title??o}function J2(e){if(nu(e)&&e.axis)return e.axis;if(NT(e)&&e.legend)return e.legend;if(Y2(e)&&e.header)return e.header}function Q2(e,t){return IT(e,t)}function Th(e){if(LT(e)){const{format:t,formatType:n}=e;return{format:t,formatType:n}}else{const t=J2(e)??{},{format:n,formatType:i}=t;return{format:n,formatType:i}}}function Kte(e,t){switch(t){case"latitude":case"longitude":return"quantitative";case"row":case"column":case"facet":case"shape":case"strokeDash":return"nominal";case"order":return"ordinal"}if(K2(e)&&I(e.sort))return"ordinal";const{aggregate:n,bin:i,timeUnit:r}=e;if(r)return"temporal";if(i||n&&!zs(n)&&!Lr(n))return"quantitative";if(Zo(e)&&e.scale?.type)switch(sy[e.scale.type]){case"numeric":case"discretizing":return"quantitative";case"time":return"temporal"}return"nominal"}function Ei(e){if(W(e))return e;if(fg(e))return e.condition}function st(e){if(ce(e))return e;if(Jc(e))return e.condition}function zT(e,t,n,i={}){if(Y(e)||Se(e)||Rs(e)){const r=Y(e)?"string":Se(e)?"number":"boolean";return q(YZ(t,r,e)),{value:e}}return ce(e)?Mh(e,t,n,i):Jc(e)?{...e,condition:Mh(e.condition,t,n,i)}:e}function Mh(e,t,n,i){if(LT(e)){const{format:r,formatType:s,...o}=e;if(Mo(s)&&!n.customFormatTypes)return q(dC(t)),Mh(o,t,n,i)}else{const r=nu(e)?"axis":NT(e)?"legend":Y2(e)?"header":null;if(r&&e[r]){const{format:s,formatType:o,...a}=e[r];if(Mo(o)&&!n.customFormatTypes)return q(dC(t)),Mh({...e,[r]:a},t,n,i)}}return W(e)?Z2(e,t,i):Jte(e)}function Jte(e){let t=e.type;if(t)return e;const{datum:n}=e;return t=Se(n)?"quantitative":Y(n)?"nominal":Jo(n)?"temporal":void 0,{...e,type:t}}function Z2(e,t,{compositeMark:n=!1}={}){const{aggregate:i,timeUnit:r,bin:s,field:o}=e,a={...e};if(!n&&i&&!S2(i)&&!zs(i)&&!Lr(i)&&(q(JZ(i)),delete a.aggregate),r&&(a.timeUnit=ht
15(r)),o&&(a.field=`${o}`),Le(s)&&(a.bin=dg(s,t)),mt(s)&&!Ze(t)&&q(kee(t)),sn(a)){const{type:u}=a,l=ete(u);u!==l&&(a.type=l),u!=="quantitative"&&eg(i)&&(q(KZ(u,i)),a.type="quantitative")}else if(!TO(t)){const u=Kte(a,t);a.type=u}if(sn(a)){const{compatible:u,warning:l}=Qte(a,t)||{};u===!1&&q(l)}if(K2(a)&&Y(a.sort)){const{sort:u}=a;if(bC(u))return{...a,sort:{encoding:u}};const l=u.substring(1);if(u.charAt(0)==="-"&&bC(l))return{...a,sort:{encoding:l,order:"descending"}}}if(Y2(a)){const{header:u}=a;if(u){const{orient:l,...c}=u;if(l)return{...a,header:{...c,labelOrient:u.labelOrient||l,titleOrient:u.titleOrient||l}}}}return a}function dg(e,t){return Rs(e)?{maxbins:iC(t)}:e==="binned"?{binned:!0}:!e.maxbins&&!e.step?{...e,maxbins:iC(t)}:e}const da={compatible:!0};function Qte(e,t){const n=e.type;if(n==="geojson"&&t!=="shape")return{compatible:!1,warning:`Channel ${t} should not be used with a geojson data.`};switch(t){case kr:case Dr:case Xp:return Oh(e)?da:{compatible:!1,warning:tee(t)};case qe:case gt:case Ms:case Cu:case vn:case lr:case cr:case qc:case Wc:case Yp:case ko:case Kp:case Jp:case Vo:case ti:case Fi:case Qp:return da;case ki:case Zn:case _i:case Di:return n!==Oo?{compatible:!1,warning:`Channel ${t} should be used with a quantitative field only, not ${e.type} field.`}:da;case Wr:case Ls:case Ps:case Is:case qr:case jr:case Ur:case $i:case ur:case Ns:return n==="nominal"&&!e.sort?{compatible:!1,warning:`Channel ${t} should not be used with an unsorted discrete field.`}:da;case En:case Bs:return!Oh(e)&&!Gte(e)?{compatible:!1,warning:nee(t)}:da;case Qa:return e.type==="nominal"&&!("sort"in e)?{compatible:!1,warning:"Channel order is inappropriate for nominal field, which has no inherent order."}:da}}function iu(e){const{formatType:t}=Th(e);return t==="time"||!t&&Zte(e)}function Zte(e){return e&&(e.type==="temporal"||W(e)&&!!e.timeUnit)}function hg(e,{timeUnit:t,type:n,wrapTime:i,undefinedIfExprNotRequired:r}){const s=t&&ht(t)?.unit;let o=s||n==="temporal",a;return Hc(e)?a=e.expr:te(e)?a=e.signal:Jo(e)?(o=!0,a=Ro(e)):(Y(e)||Se(e))&&o&&(a=`datetime(${Te(e)})`,Uee(s)&&(Se(e)&&e<1e4||Y(e)&&isNaN(Date.parse(e)))&&(a=Ro({[s]:e}))),a?i&&o?`time(${a})`:a:r?void 0:Te(e)}function UT(e,t){const{type:n}=e;return t.map(i=>{const r=W(e)&&!Qo(e.timeUnit)?e.timeUnit:void 0,s=hg(i,{timeUnit:r,type:n,undefinedIfExprNotRequired:!0});return s!==void 0?{signal:s}:i})}function Qc(e,t){return Le(e.bin)?dr(t)&&["ordinal","nominal"].includes(e.type):(console.warn("Only call this method for binned field defs."),!1)}const EC={labelAlign:{part:"labels",vgProp:"align"},labelBaseline:{part:"labels",vgProp:"baseline"},labelColor:{part:"labels",vgProp:"fill"},labelFont:{part:"labels",vgProp:"font"},labelFontSize:{part:"labels",vgProp:"fontSize"},labelFontStyle:{part:"labels",vgProp:"fontStyle"},labelFontWeight:{part:"labels",vgProp:"fontWeight"},labelOpacity:{part:"labels",vgProp:"opacity"},labelOffset:null,labelPadding:null,gridColor:{part:"grid",vgProp:"stroke"},gridDash:{part:"grid",vgProp:"strokeDash"},gridDashOffset:{part:"grid",vgProp:"strokeDashOffset"},gridOpacity:{part:"grid",vgProp:"opacity"},gridWidth:{part:"grid",vgProp:"strokeWidth"},tickColor:{part:"ticks",vgProp:"stroke"},tickDash:{part:"ticks",vgProp:"strokeDash"},tickDashOffset:{part:"ticks",vgProp:"strokeDashOffset"},tickOpacity:{part:"ticks",vgProp:"opacity"},tickSize:null,tickWidth:{part:"ticks",vgProp:"strokeWidth"}};function Zc(e){return e?.condition}const jT=["domain","grid","labels","ticks","title"],ene={grid:"grid",gridCap:"grid",gridColor:"grid",gridDash:"grid",gridDashOffset:"grid",gridOpacity:"grid",gridScale:"grid",gridWidth:"grid",orient:"main",bandPosition:"both",aria:"main",description:"main",domain:"main",domainCap:"main",domainColor:"main",domainDash:"main",domainDashOffset:"main",domainOpacity:"main",domainWidth:"main",format:"main",formatType:"main",labelAlign:"main",labelAngle:"main",labelBaseline:"main",labelBound:"main",labelColor:"main",labelFlush:"main",labelFlushOffset:"main",labelFont:"main",labelFontSize:"main",labelFontStyle:"main",labelFontWeight:"main",labelLimit:"main",labelLineHeight:"main",labelOffset:"main",labelOpacity:"main",labelOverlap:"main",labelPadding:"main",labels:"main",labelSeparation:"main",maxExtent:"main",minExtent:"main",offset:"both",position:"main",tickCap:"main",tickColor:"main",tickDash:"main",tickDashOffset:"main",tickMinStep:"both",tickOffset:"both",tickOpacity:"main",tickRound:"both",ticks:"main",tickSize:"main",tickWidth:"both",title:"main",titleAlign:"main",titleAnchor:"main",titleAngle:"main",titleBaseline:"main",titleColor:"main",titleFont:"main",titleFontSize:"main",titleFontStyle:"main",titleFontWeight:"main",titleLimit:"main",titleLineHeight:"main",titleOpacity:"main",titlePadding:"main",titleX:"main",titleY:"main",encode:"both",scale:"both",tickBand:"both",tickCount:"both",tickExtra:"both",translate:"both",values:"both",zindex:"both"},qT={orient:1,aria:1,bandPosition:1,description:1,domain:1,domainCap:1,domainColor:1,domainDash:1,domainDashOffset:1,domainOpacity:1,domainWidth:1,format:1,formatType:1,grid:1,gridCap:1,gridColor:1,gridDash:1,gridDashOffset:1,gridOpacity:1,gridWidth:1,labelAlign:1,labelAngle:1,labelBaseline:1,labelBound:1,labelColor:1,labelFlush:1,labelFlushOffset:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelLineHeight:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labels:1,labelSeparation:1,maxExtent:1,minExtent:1,offset:1,position:1,tickBand:1,tickCap:1,tickColor:1,tickCount:1,tickDash:1,tickDashOffset:1,tickExtra:1,tickMinStep:1,tickOffset:1,tickOpacity:1,tickRound:1,ticks:1,tickSize:1,tickWidth:1,title:1,titleAlign:1,titleAnchor:1,titleAngle:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titlePadding:1,titleX:1,titleY:1,translate:1,values:1,zindex:1},tne={...qT,style:1,labelExpr:1,encoding:1};function AC(e){return J(tne,e)}const nne={axis:1,axisBand:1,axisBottom:1,axisDiscrete:1,axisLeft:1,axisPoint:1,axisQuantitative:1,axisRight:1,axisTemporal:1,axisTop:1,axisX:1,axisXBand:1,axisXDiscrete:1,axisXPoint:1,axisXQuantitative:1,axisXTemporal:1,axisY:1,axisYBand:1,axisYDiscrete:1,axisYPoint:1,axisYQuantitative:1,axisYTemporal:1},WT=U(nne);function Hr(e){return j(e,"mark")}class pg{constructor(t,n){this.name=t,this.run=n}hasMatchingType(t){return Hr(t)?Dte(t.mark)===this.name:!1}}function go(e,t){const n=e&&e[t];return n?I(n)?Ka(n,i=>!!i.field):W(n)||fg(n):!1}function GT(e,t){const n=e&&e[t];return n?I(n)?Ka(n,i=>!!i.field):W(n)||hr(n)||Jc(n):!1}function HT(e,t){if(Ze(t)){const n=e[t];if((W(n)||hr(n))&&(dT(n.type)||W(n)&&n.timeUnit)){const i=x2(t);return GT(e,i)}}return!1}function VT(e){return Ka(JQ,t=>{if(go(e,t)){const n=e[t];if(I(n))return Ka(n,i=>!!i.aggregate);{const i=Ei(n);return i&&!!i.aggregate}}return!1})}function XT(e,t){const n=[],i=[],r=[],s=[],o={};return eE(e,(a,u)=>{if(W(a)){const{field:l,aggregate:c,bin:f,timeUnit:d,...h}=a;if(c||d||f){const g=J2(a)?.title;let m=V(a,{forAs:!0});const y={...g?[]:{title:Ta(a,t,{allowDisabling:!0})},...h,field:m};if(c){let b;if(zs(c)?(b="argmax",m=V({op:"argmax",field:c.argmax},{forAs:!0}),y.field=`${m}.${l}`):Lr(c)?(b="argmin",m=V({op:"argmin",field:c.argmin},{forAs:!0}),y.field=`${m}.${l}`):c!=="boxplot"&&c!=="errorbar"&&c!=="errorband"&&(b=c),b){const x={op:b,as:m};l&&(x.field=l),s.push(x)}}else if(n.push(m),sn(a)&&Le(f)){if(i.push({bin:f,field:l,as:m}),n.push(V(a,{binSuffix:"end"})),Qc(a,u)&&n.push(V(a,{binSuffix:"range"})),Ze(u)){const b={field:`${m}_end`};o[`${u}2`]=b}y.bin="binned",TO(u)||(y.type=Oo)}else if(d&&!Qo(d)){r.push({timeUnit:d,field:l,as:m});const b=sn(a)&&a.type!==Za&&"time";b&&(u===qc||u===ko?y.formatType=b:uZ(u)?y.legend={formatType:b,...y.legend}:Ze(u)&&(y.axis={formatType:b,...y.axis}
15))}o[u]=y}else n.push(l),o[u]=e[u]}else o[u]=e[u]}),{bins:i,timeUnits:r,aggregate:s,groupby:n,encoding:o}}function ine(e,t,n){const i=cZ(t,n);if(i){if(i==="binned"){const r=e[t===$i?qe:gt];return!!(W(r)&&W(e[t])&&mt(r.bin))}}else return!1;return!0}function rne(e,t,n,i){const r={};for(const s of U(e))OO(s)||q(eee(s));for(let s of iZ){if(!e[s])continue;const o=e[s];if(Gc(s)){const a=nZ(s),u=r[a];if(W(u)&&Zee(u.type)&&W(o)&&!u.timeUnit){q(XZ(a));continue}}if(s==="angle"&&t==="arc"&&!e.theta&&(q(VZ),s=ti),!ine(e,s,t)){q(ng(s,t));continue}if(s===qr&&t==="line"&&Ei(e[s])?.aggregate){q(ZZ);continue}if(s===vn&&(n?"fill"in e:"stroke"in e)){q(KO("encoding",{fill:"fill"in e,stroke:"stroke"in e}));continue}if(s===Wc||s===Qa&&!I(o)&&!vi(o)||s===ko&&I(o)){if(o){if(s===Qa){const a=e[s];if(MT(a)){r[s]=a;continue}}r[s]=K(o).reduce((a,u)=>(W(u)?a.push(Z2(u,s)):q(ry(u,s)),a),[])}}else{if(s===ko&&o===null)r[s]=null;else if(!W(o)&&!hr(o)&&!vi(o)&&!Kc(o)&&!te(o)){q(ry(o,s));continue}r[s]=zT(o,s,i)}}return r}function gg(e,t){const n={};for(const i of U(e)){const r=zT(e[i],i,t,{compositeMark:!0});n[i]=r}return n}function sne(e){const t=[];for(const n of U(e))if(go(e,n)){const i=e[n],r=K(i);for(const s of r)W(s)?t.push(s):fg(s)&&t.push(s.condition)}return t}function eE(e,t,n){if(e)for(const i of U(e)){const r=e[i];if(I(r))for(const s of r)t.call(n,s,i);else t.call(n,r,i)}}function one(e,t,n,i){return e?U(e).reduce((r,s)=>{const o=e[s];return I(o)?o.reduce((a,u)=>t.call(i,a,u,s),r):t.call(i,r,o,s)},n):n}function YT(e,t){return U(t).reduce((n,i)=>{switch(i){case qe:case gt:case Kp:case Qp:case Jp:case $i:case ur:case Ms:case Cu:case ti:case jr:case Fi:case Ur:case Ns:case _i:case ki:case Di:case Zn:case qc:case En:case Vo:case ko:return n;case Qa:if(e==="line"||e==="trail")return n;case Wc:case Yp:{const r=t[i];if(I(r)||W(r))for(const s of K(r))s.aggregate||n.push(V(s,{}));return n}case qr:if(e==="trail")return n;case vn:case lr:case cr:case Wr:case Ls:case Ps:case Bs:case Is:{const r=Ei(t[i]);return r&&!r.aggregate&&n.push(V(r,{})),n}}},[])}function ane(e){const{tooltip:t,...n}=e;if(!t)return{filteredEncoding:n};let i,r;if(I(t)){for(const s of t)s.aggregate?(i||(i=[]),i.push(s)):(r||(r=[]),r.push(s));i&&(n.tooltip=i)}else t.aggregate?n.tooltip=t:r=t;return I(r)&&r.length===1&&(r=r[0]),{customTooltipWithoutAggregatedField:r,filteredEncoding:n}}function uy(e,t,n,i=!0){if("tooltip"in n)return{tooltip:n.tooltip};const r=e.map(({fieldPrefix:o,titlePrefix:a})=>{const u=i?` of ${tE(t)}`:"";return{field:o+t.field,type:t.type,title:te(a)?{signal:`${a}"${escape(u)}"`}:a+u}}),s=sne(n).map(qte);return{tooltip:[...r,...ji(s,be)]}}function tE(e){const{title:t,field:n}=e;return Qe(t,n)}function nE(e,t,n,i,r){const{scale:s,axis:o}=n;return({partName:a,mark:u,positionPrefix:l,endPositionPrefix:c=void 0,extraEncoding:f={}})=>{const d=tE(n);return KT(e,a,r,{mark:u,encoding:{[t]:{field:`${l}_${n.field}`,type:n.type,...d!==void 0?{title:d}:{},...s!==void 0?{scale:s}:{},...o!==void 0?{axis:o}:{}},...Y(c)?{[`${t}2`]:{field:`${c}_${n.field}`}}:{},...i,...f}})}}function KT(e,t,n,i){const{clip:r,color:s,opacity:o}=e,a=e.type;return e[t]||e[t]===void 0&&n[t]?[{...i,mark:{...n[t],...r?{clip:r}:{},...s?{color:s}:{},...o?{opacity:o}:{},...er(i.mark)?i.mark:{type:i.mark},style:`${a}-${String(t)}`,...Rs(e[t])?{}:e[t]}}]:[]}function JT(e,t,n){const{encoding:i}=e,r=t==="vertical"?"y":"x",s=i[r],o=i[`${r}2`],a=i[`${r}Error`],u=i[`${r}Error2`];return{continuousAxisChannelDef:Lf(s,n),continuousAxisChannelDef2:Lf(o,n),continuousAxisChannelDefError:Lf(a,n),continuousAxisChannelDefError2:Lf(u,n),continuousAxis:r}}function Lf(e,t){if(e?.aggregate){const{aggregate:n,...i}=e;return n!==t&&q(_ee(n,t)),i}else return e}function QT(e,t){const{mark:n,encoding:i}=e,{x:r,y:s}=i;if(er(n)&&n.orient)return n.orient;if(hs(r)){if(hs(s)){const o=W(r)&&r.aggregate,a=W(s)&&s.aggregate;if(!o&&a===t)return"vertical";if(!a&&o===t)return"horizontal";if(o===t&&a===t)throw new Error("Both x and y cannot have aggregate");return iu(s)&&!iu(r)?"horizontal":"vertical"}return"horizontal"}else{if(hs(s))return"vertical";throw new Error(`Need a valid continuous axis for ${t}s`)}}const Nh="boxplot",une=["box","median","outliers","rule","ticks"],lne=new pg(Nh,eM);function ZT(e){return Se(e)?"tukey":e}function eM(e,{config:t}){e={...e,encoding:gg(e.encoding,t)};const{mark:n,encoding:i,params:r,projection:s,...o}=e,a=er(n)?n:{type:n};r&&q(XO("boxplot"));const u=a.extent??t.boxplot.extent,l=Re("size",a,t),c=a.invalid,f=ZT(u),{bins:d,timeUnits:h,transform:p,continuousAxisChannelDef:g,continuousAxis:m,groupby:y,aggregate:b,encodingWithoutContinuousAxis:x,ticksOrient:v,boxOrient:A,customTooltipWithoutAggregatedField:w}=cne(e,u,t),E=Su(g.field),{color:S,size:C,...F}=x,k=l6=>nE(a,m,g,l6,t.boxplot),L=k(F),R=k(x),_=(X(t.boxplot.box)?t.boxplot.box.color:t.mark.color)||"#4c78a8",$=k({...F,...C?{size:C}:{},color:{condition:{test:`${Fe(`lower_box_${g.field}`)} >= ${Fe(`upper_box_${g.field}`)}`,...S||{value:_}}}}),D=uy([{fieldPrefix:f==="min-max"?"upper_whisker_":"max_",titlePrefix:"Max"},{fieldPrefix:"upper_box_",titlePrefix:"Q3"},{fieldPrefix:"mid_box_",titlePrefix:"Median"},{fieldPrefix:"lower_box_",titlePrefix:"Q1"},{fieldPrefix:f==="min-max"?"lower_whisker_":"min_",titlePrefix:"Min"}],g,x),P={type:"tick",color:"black",opacity:1,orient:v,invalid:c,aria:!1},z=f==="min-max"?D:uy([{fieldPrefix:"upper_whisker_",titlePrefix:"Upper Whisker"},{fieldPrefix:"lower_whisker_",titlePrefix:"Lower Whisker"}],g,x),B=[...L({partName:"rule",mark:{type:"rule",invalid:c,aria:!1},positionPrefix:"lower_whisker",endPositionPrefix:"lower_box",extraEncoding:z}),...L({partName:"rule",mark:{type:"rule",invalid:c,aria:!1},positionPrefix:"upper_box",endPositionPrefix:"upper_whisker",extraEncoding:z}),...L({partName:"ticks",mark:P,positionPrefix:"lower_whisker",extraEncoding:z}),...L({partName:"ticks",mark:P,positionPrefix:"upper_whisker",extraEncoding:z})],Q=[...f!=="tukey"?B:[],...R({partName:"box",mark:{type:"bar",...l?{size:l}:{},orient:A,invalid:c,ariaRoleDescription:"box"},positionPrefix:"lower_box",endPositionPrefix:"upper_box",extraEncoding:D}
15),...$({partName:"median",mark:{type:"tick",invalid:c,...X(t.boxplot.median)&&t.boxplot.median.color?{color:t.boxplot.median.color}:{},...l?{size:l}:{},orient:v,aria:!1},positionPrefix:"mid_box",extraEncoding:D})];if(f==="min-max")return{...o,transform:(o.transform??[]).concat(p),layer:Q};const ue=Fe(`lower_box_${g.field}`),oe=Fe(`upper_box_${g.field}`),he=`(${oe} - ${ue})`,Pe=`${ue} - ${u} * ${he}`,pe=`${oe} + ${u} * ${he}`,un=Fe(g.field),Tu={joinaggregate:tM(g.field),groupby:y},ia={transform:[{filter:`(${Pe} <= ${un}) && (${un} <= ${pe})`},{aggregate:[{op:"min",field:g.field,as:`lower_whisker_${E}`},{op:"max",field:g.field,as:`upper_whisker_${E}`},{op:"min",field:`lower_box_${g.field}`,as:`lower_box_${E}`},{op:"max",field:`upper_box_${g.field}`,as:`upper_box_${E}`},...b],groupby:y}],layer:B},{tooltip:af,...uf}=F,{scale:Mu,axis:u6}=g,GE=tE(g),HE=gn(u6,["title"]),VE=KT(a,"outliers",t.boxplot,{transform:[{filter:`(${un} < ${Pe}) || (${un} > ${pe})`}],mark:"point",encoding:{[m]:{field:g.field,type:g.type,...GE!==void 0?{title:GE}:{},...Mu!==void 0?{scale:Mu}:{},...Oe(HE)?{}:{axis:HE}},...uf,...S?{color:S}:{},...w?{tooltip:w}:{}}})[0];let lf;const XE=[...d,...h,Tu];return VE?lf={transform:XE,layer:[VE,ia]}:(lf=ia,lf.transform.unshift(...XE)),{...o,layer:[lf,{transform:p,layer:Q}]}}function tM(e){const t=Su(e);return[{op:"q1",field:e,as:`lower_box_${t}`},{op:"q3",field:e,as:`upper_box_${t}`}]}function cne(e,t,n){const i=QT(e,Nh),{continuousAxisChannelDef:r,continuousAxis:s}=JT(e,i,Nh),o=r.field,a=Su(o),u=ZT(t),l=[...tM(o),{op:"median",field:o,as:`mid_box_${a}`},{op:"min",field:o,as:(u==="min-max"?"lower_whisker_":"min_")+a},{op:"max",field:o,as:(u==="min-max"?"upper_whisker_":"max_")+a}],c=u==="min-max"||u==="tukey"?[]:[{calculate:`${Fe(`upper_box_${a}`)} - ${Fe(`lower_box_${a}`)}`,as:`iqr_${a}`},{calculate:`min(${Fe(`upper_box_${a}`)} + ${Fe(`iqr_${a}`)} * ${t}, ${Fe(`max_${a}`)})`,as:`upper_whisker_${a}`},{calculate:`max(${Fe(`lower_box_${a}`)} - ${Fe(`iqr_${a}`)} * ${t}, ${Fe(`min_${a}`)})`,as:`lower_whisker_${a}`}],{[s]:f,...d}=e.encoding,{customTooltipWithoutAggregatedField:h,filteredEncoding:p}=ane(d),{bins:g,timeUnits:m,aggregate:y,groupby:b,encoding:x}=XT(p,n),v=i==="vertical"?"horizontal":"vertical",A=i,w=[...g,...m,{aggregate:[...y,...l],groupby:b},...c];return{bins:g,timeUnits:m,transform:w,groupby:b,aggregate:y,continuousAxisChannelDef:r,continuousAxis:s,encodingWithoutContinuousAxis:x,ticksOrient:v,boxOrient:A,customTooltipWithoutAggregatedField:h}}const iE="errorbar",fne=["ticks","rule"],dne=new pg(iE,nM);function nM(e,{config:t}){e={...e,encoding:gg(e.encoding,t)};const{transform:n,continuousAxisChannelDef:i,continuousAxis:r,encodingWithoutContinuousAxis:s,ticksOrient:o,markDef:a,outerSpec:u,tooltipEncoding:l}=iM(e,iE,t);delete s.size;const c=nE(a,r,i,s,t.errorbar),f=a.thickness,d=a.size,h={type:"tick",orient:o,aria:!1,...f!==void 0?{thickness:f}:{},...d!==void 0?{size:d}:{}},p=[...c({partName:"ticks",mark:h,positionPrefix:"lower",extraEncoding:l}),...c({partName:"ticks",mark:h,positionPrefix:"upper",extraEncoding:l}),...c({partName:"rule",mark:{type:"rule",ariaRoleDescription:"errorbar",...f!==void 0?{size:f}:{}},positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:l})];return{...u,transform:n,...p.length>1?{layer:p}:{...p[0]}}}function hne(e,t){const{encoding:n}=e;if(pne(n))return{orient:QT(e,t),inputType:"raw"};const i=gne(n),r=mne(n),s=n.x,o=n.y;if(i){if(r)throw new Error(`${t} cannot be both type aggregated-upper-lower and aggregated-error`);const a=n.x2,u=n.y2;if(ce(a)&&ce(u))throw new Error(`${t} cannot have both x2 and y2`);if(ce(a)){if(hs(s))return{orient:"horizontal",inputType:"aggregated-upper-lower"};throw new Error(`Both x and x2 have to be quantitative in ${t}`)}else if(ce(u)){if(hs(o))return{orient:"vertical",inputType:"aggregated-upper-lower"};throw new Error(`Both y and y2 have to be quantitative in ${t}`)}throw new Error("No ranged axis")}else{const a=n.xError,u=n.xError2,l=n.yError,c=n.yError2;if(ce(u)&&!ce(a))throw new Error(`${t} cannot have xError2 without xError`);if(ce(c)&&!ce(l))throw new Error(`${t} cannot have yError2 without yError`);if(ce(a)&&ce(l))throw new Error(`${t} cannot have both xError and yError with both are quantiative`);if(ce(a)){if(hs(s))return{orient:"horizontal",inputType:"aggregated-error"};throw new Error("All x, xError, and xError2 (if exist) have to be quantitative")}else if(ce(l)){if(hs(o))return{orient:"vertical",inputType:"aggregated-error"};throw new Error("All y, yError, and yError2 (if exist) have to be quantitative")}throw new Error("No ranged axis")}}function pne(e){return(ce(e.x)||ce(e.y))&&!ce(e.x2)&&!ce(e.y2)&&!ce(e.xError)&&!ce(e.xError2)&&!ce(e.yError)&&!ce(e.yError2)}function gne(e){return ce(e.x2)||ce(e.y2)}function mne(e){return ce(e.xError)||ce(e.xError2)||ce(e.yError)||ce(e.yError2)}function iM(e,t,n){const{mark:i,encoding:r,params:s,projection:o,...a}=e,u=er(i)?i:{type:i};
15s&&q(XO(t));const{orient:l,inputType:c}=hne(e,t),{continuousAxisChannelDef:f,continuousAxisChannelDef2:d,continuousAxisChannelDefError:h,continuousAxisChannelDefError2:p,continuousAxis:g}=JT(e,l,t),{errorBarSpecificAggregate:m,postAggregateCalculates:y,tooltipSummary:b,tooltipTitleWithFieldName:x}=yne(u,f,d,h,p,c,t,n),{[g]:v,[g==="x"?"x2":"y2"]:A,[g==="x"?"xError":"yError"]:w,[g==="x"?"xError2":"yError2"]:E,...S}=r,{bins:C,timeUnits:F,aggregate:k,groupby:L,encoding:R}=XT(S,n),_=[...k,...m],$=c!=="raw"?[]:L,D=uy(b,f,R,x);return{transform:[...a.transform??[],...C,...F,..._.length===0?[]:[{aggregate:_,groupby:$}],...y],groupby:$,continuousAxisChannelDef:f,continuousAxis:g,encodingWithoutContinuousAxis:R,ticksOrient:l==="vertical"?"horizontal":"vertical",markDef:u,outerSpec:a,tooltipEncoding:D}}function yne(e,t,n,i,r,s,o,a){let u=[],l=[];const c=t.field;let f,d=!1;if(s==="raw"){const h=e.center?e.center:e.extent?e.extent==="iqr"?"median":"mean":a.errorbar.center,p=e.extent?e.extent:h==="mean"?"stderr":"iqr";if(h==="median"!=(p==="iqr")&&q(Fee(h,p,o)),p==="stderr"||p==="stdev")u=[{op:p,field:c,as:`extent_${c}`},{op:h,field:c,as:`center_${c}`}],l=[{calculate:`${Fe(`center_${c}`)} + ${Fe(`extent_${c}`)}`,as:`upper_${c}`},{calculate:`${Fe(`center_${c}`)} - ${Fe(`extent_${c}`)}`,as:`lower_${c}`}],f=[{fieldPrefix:"center_",titlePrefix:jc(h)},{fieldPrefix:"upper_",titlePrefix:wC(h,p,"+")},{fieldPrefix:"lower_",titlePrefix:wC(h,p,"-")}],d=!0;else{let g,m,y;p==="ci"?(g="mean",m="ci0",y="ci1"):(g="median",m="q1",y="q3"),u=[{op:m,field:c,as:`lower_${c}`},{op:y,field:c,as:`upper_${c}`},{op:g,field:c,as:`center_${c}`}],f=[{fieldPrefix:"upper_",titlePrefix:Ta({field:c,aggregate:y,type:"quantitative"},a,{allowDisabling:!1})},{fieldPrefix:"lower_",titlePrefix:Ta({field:c,aggregate:m,type:"quantitative"},a,{allowDisabling:!1})},{fieldPrefix:"center_",titlePrefix:Ta({field:c,aggregate:g,type:"quantitative"},a,{allowDisabling:!1})}]}}else{(e.center||e.extent)&&q($ee(e.center,e.extent)),s==="aggregated-upper-lower"?(f=[],l=[{calculate:Fe(n.field),as:`upper_${c}`},{calculate:Fe(c),as:`lower_${c}`}]):s==="aggregated-error"&&(f=[{fieldPrefix:"",titlePrefix:c}],l=[{calculate:`${Fe(c)} + ${Fe(i.field)}`,as:`upper_${c}`}],r?l.push({calculate:`${Fe(c)} + ${Fe(r.field)}`,as:`lower_${c}`}):l.push({calculate:`${Fe(c)} - ${Fe(i.field)}`,as:`lower_${c}`}));for(const h of l)f.push({fieldPrefix:h.as.substring(0,6),titlePrefix:_o(_o(h.calculate,"datum['",""),"']","")})}return{postAggregateCalculates:l,errorBarSpecificAggregate:u,tooltipSummary:f,tooltipTitleWithFieldName:d}}function wC(e,t,n){return`${jc(e)} ${n} ${t}`}const rE="errorband",bne=["band","borders"],xne=new pg(rE,rM);function rM(e,{config:t}){e={...e,encoding:gg(e.encoding,t)};const{transform:n,continuousAxisChannelDef:i,continuousAxis:r,encodingWithoutContinuousAxis:s,markDef:o,outerSpec:a,tooltipEncoding:u}=iM(e,rE,t),l=o,c=nE(l,r,i,s,t.errorband),f=e.encoding.x!==void 0&&e.encoding.y!==void 0;let d={type:f?"area":"rect"},h={type:f?"line":"rule"};const p={...l.interpolate?{interpolate:l.interpolate}:{},...l.tension&&l.interpolate?{tension:l.tension}:{}};return f?(d={...d,...p,ariaRoleDescription:"errorband"},h={...h,...p,aria:!1}):l.interpolate?q(pC("interpolate")):l.tension&&q(pC("tension")),{...a,transform:n,layer:[...c({partName:"band",mark:d,positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:u}),...c({partName:"borders",mark:h,positionPrefix:"lower",extraEncoding:u}),...c({partName:"borders",mark:h,positionPrefix:"upper",extraEncoding:u})]}}const sM={};function sE(e,t,n){const i=new pg(e,t);sM[e]={normalizer:i,parts:n}}function vne(){return U(sM)}sE(Nh,eM,une);sE(iE,nM,fne);sE(rE,rM,bne);const Ene=["gradientHorizontalMaxLength","gradientHorizontalMinLength","gradientVerticalMaxLength","gradientVerticalMinLength","unselectedOpacity"],oM={titleAlign:"align",titleAnchor:"anchor",titleAngle:"angle",titleBaseline:"baseline",titleColor:"color",titleFont:"font",titleFontSize:"fontSize",titleFontStyle:"fontStyle",titleFontWeight:"fontWeight",titleLimit:"limit",titleLineHeight:"lineHeight",titleOrient:"orient",titlePadding:"offset"},aM={labelAlign:"align",labelAnchor:"anchor",labelAngle:"angle",labelBaseline:"baseline",labelColor:"color",labelFont:"font",labelFontSize:"fontSize",labelFontStyle:"fontStyle",labelFontWeight:"fontWeight",labelLimit:"limit",labelLineHeight:"lineHeight",labelOrient:"orient",labelPadding:"offset"},Ane=U(oM),wne=U(aM),Sne={header:1,headerRow:1,headerColumn:1,headerFacet:1},uM=U(Sne),lM=["size","shape","fill","stroke","strokeDash","strokeWidth","opacity"],Cne={gradientHorizontalMaxLength:200,gradientHorizontalMinLength:100,gradientVerticalMaxLength:200,gradientVerticalMinLength:64,unselectedOpacity:.35},$ne={aria:1,clipHeight:1,columnPadding:1,columns:1,cornerRadius:1,description:1,direction:1,fillColor:1,format:1,formatType:1,gradientLength:1,gradientOpacity:1,gradientStrokeColor:1,gradientStrokeWidth:1,gradientThickness:1,gridAlign:1,labelAlign:1,labelBaseline:1,labelColor:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labelSeparation:1,legendX:1,legendY:1,offset:1,orient:1,padding:1,rowPadding:1,strokeColor:1,symbolDash:1,symbolDashOffset:1,symbolFillColor:1,symbolLimit:1,symbolOffset:1,symbolOpacity:1,symbolSize:1,symbolStrokeColor:1,symbolStrokeWidth:1,symbolType:1,tickCount:1,tickMinStep:1,title:1,titleAlign:1,titleAnchor:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titleOrient:1,titlePadding:1,type:1,values:1,zindex:1},Ai="_vgsid_",Fne={point:{on:"click",fields:[Ai],toggle:"event.shiftKey",resolve:"global",clear:"dblclick"},interval:{on:"[pointerdown, window:pointerup] > window:pointermove!",encodings:["x","y"],translate:"[pointerdown, window:pointerup] > window:pointermove!",zoom:"wheel!",mark:{fill:"#333",fillOpacity:.125,stroke:"white"},resolve:"global",clear:"dblclick"}};function oE(e){return e==="legend"||!!e?.legend}function G0(e){return oE(e)&&X(e)}
15function aE(e){return!!e?.select}function cM(e){const t=[];for(const n of e||[]){if(aE(n))continue;const{expr:i,bind:r,...s}=n;if(r&&i){const o={...s,bind:r,init:i};t.push(o)}else{const o={...s,...i?{update:i}:{},...r?{bind:r}:{}};t.push(o)}}return t}function _ne(e){return mg(e)||lE(e)||uE(e)}function uE(e){return j(e,"concat")}function mg(e){return j(e,"vconcat")}function lE(e){return j(e,"hconcat")}function fM({step:e,offsetIsDiscrete:t}){return t?e.for??"offset":"position"}function tr(e){return j(e,"step")}function SC(e){return j(e,"view")||j(e,"width")||j(e,"height")}const CC=20,kne={align:1,bounds:1,center:1,columns:1,spacing:1},Dne=U(kne);function Rne(e,t,n){const i=n[t],r={},{spacing:s,columns:o}=i;s!==void 0&&(r.spacing=s),o!==void 0&&(cg(e)&&!Yc(e.facet)||uE(e))&&(r.columns=o),mg(e)&&(r.columns=1);for(const a of Dne)if(e[a]!==void 0)if(a==="spacing"){const u=e[a];r[a]=Se(u)?u:{row:u.row??s,column:u.column??s}}else r[a]=e[a];return r}function ly(e,t){return e[t]??e[t==="width"?"continuousWidth":"continuousHeight"]}function cy(e,t){const n=Lh(e,t);return tr(n)?n.step:dM}function Lh(e,t){const n=e[t]??e[t==="width"?"discreteWidth":"discreteHeight"];return Qe(n,{step:e.step})}const dM=20,One={continuousWidth:200,continuousHeight:200,step:dM},Tne={background:"white",padding:5,timeFormat:"%b %d, %Y",countTitle:"Count of Records",view:One,mark:Ste,arc:{},area:{},bar:_te,circle:{},geoshape:{},image:{},line:{},point:{},rect:W2,rule:{color:"black"},square:{},text:{color:"black"},tick:kte,trail:{},boxplot:{size:14,extent:1.5,box:{},median:{color:"white"},outliers:{},rule:{},ticks:null},errorbar:{center:"mean",rule:!0,ticks:!1},errorband:{band:{opacity:.3},borders:!1},scale:ste,projection:{},legend:Cne,header:{titlePadding:10,labelPadding:10},headerColumn:{},headerRow:{},headerFacet:{},selection:Fne,style:{},title:{},facet:{spacing:CC},concat:{spacing:CC},normalizedNumberFormat:".0%"},br=["#4c78a8","#f58518","#e45756","#72b7b2","#54a24b","#eeca3b","#b279a2","#ff9da6","#9d755d","#bab0ac"],$C={text:11,guideLabel:10,guideTitle:11,groupTitle:13,groupSubtitle:12},FC={blue:br[0],orange:br[1],red:br[2],teal:br[3],green:br[4],yellow:br[5],purple:br[6],pink:br[7],brown:br[8],gray0:"#000",gray1:"#111",gray2:"#222",gray3:"#333",gray4:"#444",gray5:"#555",gray6:"#666",gray7:"#777",gray8:"#888",gray9:"#999",gray10:"#aaa",gray11:"#bbb",gray12:"#ccc",gray13:"#ddd",gray14:"#eee",gray15:"#fff"};function Mne(e={}){return{signals:[{name:"color",value:X(e)?{...FC,...e}:FC}],mark:{color:{signal:"color.blue"}},rule:{color:{signal:"color.gray0"}},text:{color:{signal:"color.gray0"}},style:{"guide-label":{fill:{signal:"color.gray0"}},"guide-title":{fill:{signal:"color.gray0"}},"group-title":{fill:{signal:"color.gray0"}},"group-subtitle":{fill:{signal:"color.gray0"}},cell:{stroke:{signal:"color.gray8"}}},axis:{domainColor:{signal:"color.gray13"},gridColor:{signal:"color.gray8"},tickColor:{signal:"color.gray13"}},range:{category:[{signal:"color.blue"},{signal:"color.orange"},{signal:"color.red"},{signal:"color.teal"},{signal:"color.green"},{signal:"color.yellow"},{signal:"color.purple"},{signal:"color.pink"},{signal:"color.brown"},{signal:"color.grey8"}]}}}function Nne(e){return{signals:[{name:"fontSize",value:X(e)?{...$C,...e}:$C}],text:{fontSize:{signal:"fontSize.text"}},style:{"guide-label":{fontSize:{signal:"fontSize.guideLabel"}},"guide-title":{fontSize:{signal:"fontSize.guideTitle"}},"group-title":{fontSize:{signal:"fontSize.groupTitle"}},"group-subtitle":{fontSize:{signal:"fontSize.groupSubtitle"}}}}}function Lne(e){return{text:{font:e},style:{"guide-label":{font:e},"guide-title":{font:e},"group-title":{font:e},"group-subtitle":{font:e}}}}function hM(e){const t=U(e||{}),n={};for(const i of t){const r=e[i];n[i]=Zc(r)?UO(r):_n(r)}return n}function Pne(e){const t=U(e),n={};for(const i of t)n[i]=hM(e[i]);return n}const Ine=[...AT,...WT,...uM,"background","padding","legend","lineBreak","scale","style","title","view"];function pM(e={}){const{color:t,font:n,fontSize:i,selection:r,...s}=e,o=fu({},le(Tne),n?Lne(n):{},t?Mne(t):{},i?Nne(i):{},s||{});r&&du(o,"selection",r,!0);const a=gn(o,Ine);for(const u of["background","lineBreak","padding"])o[u]&&(a[u]=_n(o[u]));for(const u of AT)o[u]&&(a[u]=yt(o[u]));for(const u of WT)o[u]&&(a[u]=hM(o[u]));for(const u of uM)o[u]&&(a[u]=yt(o[u]));if(o.legend&&(a.legend=yt(o.legend)),o.scale){const{invalid:u,...l}=o.scale,c=yt(u,{level:1});a.scale={...yt(l),...U(c).length>0?{invalid:c}:{}}}return o.style&&(a.style=Pne(o.style)),o.title&&(a.title=yt(o.title)),o.view&&(a.view=yt(o.view)),a}const Bne=new Set(["view",...bte]),zne=["color","fontSize","background","padding","facet","concat","numberFormat","numberFormatType","normalizedNumberFormat","normalizedNumberFormatType","timeFormat","countTitle","header","axisQuantitative","axisTemporal","axisDiscrete","axisPoint","axisXBand","axisXPoint","axisXDiscrete","axisXQuantitative","axisXTemporal","axisYBand","axisYPoint","axisYDiscrete","axisYQuantitative","axisYTemporal","scale","selection","overlay"],Une={view:["continuousWidth","continuousHeight","discreteWidth","discreteHeight","step"],...wte};function jne(e){e=le(e);for(const t of zne)delete e[t];if(e.axis)for(const t in e.axis)Zc(e.axis[t])&&delete e.axis[t];if(e.legend)for(const t of Ene)delete e.legend[t];
15if(e.mark){for(const t of mC)delete e.mark[t];e.mark.tooltip&&X(e.mark.tooltip)&&delete e.mark.tooltip}e.params&&(e.signals=(e.signals||[]).concat(cM(e.params)),delete e.params);for(const t of Bne){for(const i of mC)delete e[t][i];const n=Une[t];if(n)for(const i of n)delete e[t][i];Wne(e,t)}for(const t of vne())delete e[t];qne(e);for(const t in e)X(e[t])&&Oe(e[t])&&delete e[t];return Oe(e)?void 0:e}function qne(e){const{titleMarkConfig:t,subtitleMarkConfig:n,subtitle:i}=zO(e.title);Oe(t)||(e.style["group-title"]={...e.style["group-title"],...t}),Oe(n)||(e.style["group-subtitle"]={...e.style["group-subtitle"],...n}),Oe(i)?delete e.title:e.title=i}function Wne(e,t,n,i){const r=e[t];t==="view"&&(n="cell");const s={...r,...e.style[n??t]};Oe(s)||(e.style[n??t]=s),delete e[t]}function yg(e){return j(e,"layer")}function Gne(e){return j(e,"repeat")}function Hne(e){return!I(e.repeat)&&j(e.repeat,"layer")}class cE{map(t,n){return cg(t)?this.mapFacet(t,n):Gne(t)?this.mapRepeat(t,n):lE(t)?this.mapHConcat(t,n):mg(t)?this.mapVConcat(t,n):uE(t)?this.mapConcat(t,n):this.mapLayerOrUnit(t,n)}mapLayerOrUnit(t,n){if(yg(t))return this.mapLayer(t,n);if(Hr(t))return this.mapUnit(t,n);throw new Error(C2(t))}mapLayer(t,n){return{...t,layer:t.layer.map(i=>this.mapLayerOrUnit(i,n))}}mapHConcat(t,n){return{...t,hconcat:t.hconcat.map(i=>this.map(i,n))}}mapVConcat(t,n){return{...t,vconcat:t.vconcat.map(i=>this.map(i,n))}}mapConcat(t,n){const{concat:i,...r}=t;return{...r,concat:i.map(s=>this.map(s,n))}}mapFacet(t,n){return{...t,spec:this.map(t.spec,n)}}mapRepeat(t,n){return{...t,spec:this.map(t.spec,n)}}}const Vne={zero:1,center:1,normalize:1};function Xne(e){return J(Vne,e)}const Yne=new Set([xT,og,sg,kh,ug,j2,q2,ag,vT,U2]),Kne=new Set([og,sg,xT]);function ha(e){return W(e)&&tu(e)==="quantitative"&&!e.bin}function _C(e,t,{orient:n,type:i}){const r=t==="x"?"y":"radius",s=t==="x"&&["bar","area"].includes(i),o=e[t],a=e[r];if(W(o)&&W(a))if(ha(o)&&ha(a)){if(o.stack)return t;if(a.stack)return r;const u=W(o)&&!!o.aggregate,l=W(a)&&!!a.aggregate;if(u!==l)return u?t:r;if(s){if(n==="vertical")return r;if(n==="horizontal")return t}}else{if(ha(o))return t;if(ha(a))return r}else{if(ha(o))return s&&n==="vertical"?void 0:t;if(ha(a))return s&&n==="horizontal"?void 0:r}}function Jne(e){switch(e){case"x":return"y";case"y":return"x";case"theta":return"radius";case"radius":return"theta"}}function gM(e,t){const n=er(e)?e:{type:e},i=n.type;if(!Yne.has(i))return null;const r=_C(t,"x",n)||_C(t,"theta",n);if(!r)return null;const s=t[r],o=W(s)?V(s,{}):void 0,a=Jne(r),u=[],l=new Set;if(t[a]){const g=t[a],m=W(g)?V(g,{}):void 0;m&&m!==o&&(u.push(a),l.add(m))}const c=a==="x"?"xOffset":"yOffset",f=t[c],d=W(f)?V(f,{}):void 0;d&&d!==o&&(u.push(c),l.add(d));const h=rZ.reduce((g,m)=>{if(m!=="tooltip"&&go(t,m)){const y=t[m];for(const b of K(y)){const x=Ei(b);if(x.aggregate)continue;const v=V(x,{});(!v||!l.has(v))&&g.push({channel:m,fieldDef:x})}}return g},[]);let p;return s.stack!==void 0?Rs(s.stack)?p=s.stack?"zero":null:p=s.stack:Kne.has(i)&&(p="zero"),!p||!Xne(p)||VT(t)&&h.length===0?null:(s?.scale?.type&&s?.scale?.type!==bt.LINEAR&&s?.stack&&q(wee(s.scale.type)),ce(t[fr(r)]
15)?(s.stack!==void 0&&q(Aee(r)),null):(W(s)&&s.aggregate&&!yZ.has(s.aggregate)&&q(See(s.aggregate)),{groupbyChannels:u,groupbyFields:l,fieldChannel:r,impute:s.impute===null?!1:Us(i),stackBy:h,offset:p}))}function mM(e,t,n){const i=yt(e),r=Re("orient",i,n);if(i.orient=tie(i.type,t,r),r!==void 0&&r!==i.orient&&q(oee(i.orient,r)),i.type==="bar"&&i.orient){const u=Re("cornerRadiusEnd",i,n);if(u!==void 0){const l=i.orient==="horizontal"&&t.x2||i.orient==="vertical"&&t.y2?["cornerRadius"]:$te[i.orient];for(const c of l)i[c]=u;i.cornerRadiusEnd!==void 0&&delete i.cornerRadiusEnd}}const s=Re("opacity",i,n),o=Re("fillOpacity",i,n);return s===void 0&&o===void 0&&(i.opacity=Zne(i.type,t)),Re("cursor",i,n)===void 0&&(i.cursor=Qne(i,t,n)),i}function Qne(e,t,n){return t.href||e.href||Re("href",e,n)?"pointer":e.cursor}function Zne(e,t){if(ye([ug,U2,j2,q2],e)&&!VT(t))return .7}function eie(e,t,{graticule:n}){if(n)return!1;const i=Zi("filled",e,t),r=e.type;return Qe(i,r!==ug&&r!==ag&&r!==kh)}function tie(e,t,n){switch(e){case ug:case j2:case q2:case vT:case mte:case gte:return}const{x:i,y:r,x2:s,y2:o}=t;switch(e){case og:if(W(i)&&(mt(i.bin)||W(r)&&r.aggregate&&!i.aggregate))return"vertical";if(W(r)&&(mt(r.bin)||W(i)&&i.aggregate&&!r.aggregate))return"horizontal";if(o||s){if(n)return n;if(!s)return(W(i)&&i.type===Oo&&!Le(i.bin)||Rh(i))&&W(r)&&mt(r.bin)?"horizontal":"vertical";if(!o)return(W(r)&&r.type===Oo&&!Le(r.bin)||Rh(r))&&W(i)&&mt(i.bin)?"vertical":"horizontal"}case kh:if(s&&!(W(i)&&mt(i.bin))&&o&&!(W(r)&&mt(r.bin)))return;case sg:if(o)return W(r)&&mt(r.bin)?"horizontal":"vertical";if(s)return W(i)&&mt(i.bin)?"vertical":"horizontal";if(e===kh){if(i&&!r)return"vertical";if(r&&!i)return"horizontal"}case ag:case U2:{const a=vC(i),u=vC(r);if(n)return n;if(a&&!u)return e!=="tick"?"horizontal":"vertical";if(!a&&u)return e!=="tick"?"vertical":"horizontal";if(a&&u)return"vertical";{const l=sn(i)&&i.type===Za,c=sn(r)&&r.type===Za;if(l&&!c)return"vertical";if(!l&&c)return"horizontal"}return}}return"vertical"}function nie(e){const{point:t,line:n,...i}=e;return U(i).length>1?i:i.type}function iie(e){for(const t of["line","area","rule","trail"])e[t]&&(e={...e,[t]:gn(e[t],["point","line"])});return e}function H0(e,t={},n){return e.point==="transparent"?{opacity:0}:e.point?X(e.point)?e.point:{}:e.point!==void 0?null:t.point||n.shape?X(t.point)?t.point:{}:void 0}function kC(e,t={}){return e.line?e.line===!0?{}:e.line:e.line!==void 0?null:t.line?t.line===!0?{}:t.line:void 0}class rie{constructor(){this.name="path-overlay"}hasMatchingType(t,n){if(Hr(t)){const{mark:i,encoding:r}=t,s=er(i)?i:{type:i};switch(s.type){case"line":case"rule":case"trail":return!!H0(s,n[s.type],r);case"area":return!!H0(s,n[s.type],r)||!!kC(s,n[s.type])}}return!1}run(t,n,i){const{config:r}=n,{params:s,projection:o,mark:a,name:u,encoding:l,...c}=t,f=gg(l,r),d=er(a)?a:{type:a},h=H0(d,r[d.type],f),p=d.type==="area"&&kC(d,r[d.type]),g=[{name:u,...s?{params:s}:{},mark:nie({...d.type==="area"&&d.opacity===void 0&&d.fillOpacity===void 0?{opacity:.7}:{},...d}),encoding:gn(f,["shape"])}],m=gM(mM(d,f,r),f);let y=f;if(m){const{fieldChannel:b,offset:x}=m;y={...f,[b]:{...f[b],...x?{stack:x}:{}}}}return y=gn(y,["y2","x2"]),p&&g.push({...o?{projection:o}:{},mark:{type:"line",...Ya(d,["clip","interpolate","tension","tooltip"]),...p},encoding:y}),h&&g.push({...o?{projection:o}:{},mark:{type:"point",opacity:1,filled:!0,...Ya(d,["clip","tooltip"]),...h},encoding:y}),i({...c,layer:g}
15,{...n,config:iie(r)})}}function sie(e,t){return t?Yc(e)?bM(e,t):yM(e,t):e}function V0(e,t){return t?bM(e,t):e}function fy(e,t,n){const i=t[e];if(Ute(i)){if(i.repeat in n)return{...t,[e]:n[i.repeat]};q(PZ(i.repeat));return}return t}function yM(e,t){if(e=fy("field",e,t),e!==void 0){if(e===null)return null;if(K2(e)&&Rr(e.sort)){const n=fy("field",e.sort,t);e={...e,...n?{sort:n}:{}}}return e}}function DC(e,t){if(W(e))return yM(e,t);{const n=fy("datum",e,t);return n!==e&&!n.type&&(n.type="nominal"),n}}function RC(e,t){if(ce(e)){const n=DC(e,t);if(n)return n;if(Kc(e))return{condition:e.condition}}else{if(Jc(e)){const n=DC(e.condition,t);if(n)return{...e,condition:n};{const{condition:i,...r}=e;return r}}return e}}function bM(e,t){const n={};for(const i in e)if(j(e,i)){const r=e[i];if(I(r))n[i]=r.map(s=>RC(s,t)).filter(s=>s);else{const s=RC(r,t);s!==void 0&&(n[i]=s)}}return n}class oie{constructor(){this.name="RuleForRangedLine"}hasMatchingType(t){if(Hr(t)){const{encoding:n,mark:i}=t;if(i==="line"||er(i)&&i.type==="line")for(const r of tZ){const s=Xo(r),o=n[s];if(n[r]&&(W(o)&&!mt(o.bin)||hr(o)))return!0}}return!1}run(t,n,i){const{encoding:r,mark:s}=t;return q(see(!!r.x2,!!r.y2)),i({...t,mark:X(s)?{...s,type:"rule"}:"rule"},n)}}class aie extends cE{constructor(){super(...arguments),this.nonFacetUnitNormalizers=[lne,dne,xne,new rie,new oie]}map(t,n){if(Hr(t)){const i=go(t.encoding,kr),r=go(t.encoding,Dr),s=go(t.encoding,Xp);if(i||r||s)return this.mapFacetedUnit(t,n)}return super.map(t,n)}mapUnit(t,n){const{parentEncoding:i,parentProjection:r}=n,s=V0(t.encoding,n.repeater),o={...t,...t.name?{name:[n.repeaterPrefix,t.name].filter(u=>u).join("_")}:{},...s?{encoding:s}:{}};if(i||r)return this.mapUnitWithParentEncodingOrProjection(o,n);const a=this.mapLayerOrUnit.bind(this);for(const u of this.nonFacetUnitNormalizers)if(u.hasMatchingType(o,n.config))return u.run(o,n,a);return o}mapRepeat(t,n){return Hne(t)?this.mapLayerRepeat(t,n):this.mapNonLayerRepeat(t,n)}mapLayerRepeat(t,n){const{repeat:i,spec:r,...s}=t,{row:o,column:a,layer:u}=i,{repeater:l={},repeaterPrefix:c=""}=n;return o||a?this.mapRepeat({...t,repeat:{...o?{row:o}:{},...a?{column:a}:{}},spec:{repeat:{layer:u},spec:r}},n):{...s,layer:u.map(f=>{const d={...l,layer:f},h=`${(r.name?`${r.name}_`:"")+c}child__layer_${je(f)}`,p=this.mapLayerOrUnit(r,{...n,repeater:d,repeaterPrefix:h});return p.name=h,p})}}mapNonLayerRepeat(t,n){const{repeat:i,spec:r,data:s,...o}=t;!I(i)&&t.columns&&(t=gn(t,["columns"]),q(cC("repeat")));const a=[],{repeater:u={},repeaterPrefix:l=""}=n,c=!I(i)&&i.row||[u?u.row:null],f=!I(i)&&i.column||[u?u.column:null],d=I(i)&&i||[u?u.repeat:null];for(const p of d)for(const g of c)for(const m of f){const y={repeat:p,row:g,column:m,layer:u.layer},b=(r.name?`${r.name}_`:"")+l+"child__"+(I(i)?`${je(p)}`:(i.row?`row_${je(g)}`:"")+(i.column?`column_${je(m)}`:"")),x=this.map(r,{...n,repeater:y,repeaterPrefix:b});x.name=b,a.push(gn(x,["data"]))}const h=I(i)?t.columns:i.column?i.column.length:1;return{data:r.data??s,align:"all",...o,columns:h,concat:a}}mapFacet(t,n){const{facet:i}=t;return Yc(i)&&t.columns&&(t=gn(t,["columns"]),q(cC("facet"))),super.mapFacet(t,n)}mapUnitWithParentEncodingOrProjection(t,n){const{encoding:i,projection:r}=t,{parentEncoding:s,parentProjection:o,config:a}=n,u=TC({parentProjection:o,projection:r}),l=OC({parentEncoding:s,encoding:V0(i,n.repeater)});return this.mapUnit({...t,...u?{projection:u}:{},...l?{encoding:l}:{}},{config:a})}mapFacetedUnit(t,n){const{row:i,column:r,facet:s,...o}=t.encoding,{mark:a,width:u,projection:l,height:c,view:f,params:d,encoding:h,...p}=t,{facetMapping:g,layout:m}=this.getFacetMappingAndLayout({row:i,column:r,facet:s},n),y=V0(o,n.repeater);return this.mapFacet({...p,...m,facet:g,spec:{...u?{width:u}:{},...c?{height:c}:{},...f?{view:f}:{},...l?{projection:l}:{},mark:a,encoding:y,...d?{params:d}:{}}},n)}getFacetMappingAndLayout(t,n){const{row:i,column:r,facet:s}=t;if(i||r){s&&q(iee([...i?[kr]:[],...r?[Dr]:[]]));const o={},a={};for(const u of[kr,Dr]){const l=t[u];if(l){const{align:c,center:f,spacing:d,columns:h,...p}=l;
15o[u]=p;for(const g of["align","center","spacing"])l[g]!==void 0&&(a[g]??(a[g]={}),a[g][u]=l[g])}}return{facetMapping:o,layout:a}}else{const{align:o,center:a,spacing:u,columns:l,...c}=s;return{facetMapping:sie(c,n.repeater),layout:{...o?{align:o}:{},...a?{center:a}:{},...u?{spacing:u}:{},...l?{columns:l}:{}}}}}mapLayer(t,{parentEncoding:n,parentProjection:i,...r}){const{encoding:s,projection:o,...a}=t,u={...r,parentEncoding:OC({parentEncoding:n,encoding:s,layer:!0}),parentProjection:TC({parentProjection:i,projection:o})};return super.mapLayer({...a,...t.name?{name:[u.repeaterPrefix,t.name].filter(l=>l).join("_")}:{}},u)}}function OC({parentEncoding:e,encoding:t={},layer:n}){let i={};if(e){const r=new Set([...U(e),...U(t)]);for(const s of r){const o=t[s],a=e[s];if(ce(o)){const u={...a,...o};i[s]=u}else Jc(o)?i[s]={...o,condition:{...a,...o.condition}}:o||o===null?i[s]=o:(n||vi(a)||te(a)||ce(a)||I(a))&&(i[s]=a)}}else i=t;return!i||Oe(i)?void 0:i}function TC(e){const{parentProjection:t,projection:n}=e;return t&&n&&q(HZ({parentProjection:t,projection:n})),n??t}function fE(e){return j(e,"filter")}function uie(e){return j(e,"stop")}function xM(e){return j(e,"lookup")}function lie(e){return j(e,"data")}function cie(e){return j(e,"param")}function fie(e){return j(e,"pivot")}function die(e){return j(e,"density")}function hie(e){return j(e,"quantile")}function pie(e){return j(e,"regression")}function gie(e){return j(e,"loess")}function mie(e){return j(e,"sample")}function yie(e){return j(e,"window")}function bie(e){return j(e,"joinaggregate")}function xie(e){return j(e,"flatten")}function vie(e){return j(e,"calculate")}function vM(e){return j(e,"bin")}function Eie(e){return j(e,"impute")}function Aie(e){return j(e,"timeUnit")}function wie(e){return j(e,"aggregate")}function Sie(e){return j(e,"stack")}function Cie(e){return j(e,"fold")}function $ie(e){return j(e,"extent")&&!j(e,"density")&&!j(e,"regression")}function Fie(e){return e.map(t=>fE(t)?{filter:Ra(t.filter,Qee)}:t)}class _ie extends cE{map(t,n){return n.emptySelections??(n.emptySelections={}),n.selectionPredicates??(n.selectionPredicates={}),t=MC(t,n),super.map(t,n)}mapLayerOrUnit(t,n){if(t=MC(t,n),t.encoding){const i={};for(const[r,s]of $s(t.encoding))i[r]=EM(s,n);t={...t,encoding:i}}return super.mapLayerOrUnit(t,n)}mapUnit(t,n){const{selection:i,...r}=t;return i?{...r,params:$s(i).map(([s,o])=>{const{init:a,bind:u,empty:l,...c}=o;c.type==="single"?(c.type="point",c.toggle=!1):c.type==="multi"&&(c.type="point"),n.emptySelections[s]=l!=="none";for(const f of St(n.selectionPredicates[s]??{}))f.empty=l!=="none";return{name:s,value:a,select:c,bind:u}})}:t}}function MC(e,t){const{transform:n,...i}=e;if(n){const r=n.map(s=>{if(fE(s))return{filter:dy(s,t)};if(vM(s)&&Yo(s.bin))return{...s,bin:AM(s.bin)};if(xM(s)){const{selection:o,...a}=s.from;return o?{...s,from:{param:o,...a}}:s}return s});return{...i,transform:r}}return e}function EM(e,t){const n=le(e);if(W(n)&&Yo(n.bin)&&(n.bin=AM(n.bin)),Zo(n)&&n.scale?.domain?.selection){const{selection:i,...r}=n.scale.domain;n.scale.domain={...r,...i?{param:i}:{}}}if(Kc(n))if(I(n.condition))n.condition=n.condition.map(i=>{const{selection:r,param:s,test:o,...a}=i;return s?i:{...a,test:dy(i,t)}});else{const{selection:i,param:r,test:s,...o}=EM(n.condition,t);n.condition=r?n.condition:{...o,test:dy(n.condition,t)}}return n}function AM(e){const t=e.extent;if(t?.selection){const{selection:n,...i}=t;return{...e,extent:{...i,param:n}}}return e}function dy(e,t){const n=i=>Ra(i,r=>{var s;const o=t.emptySelections[r]??!0,a={param:r,empty:o};return(s=t.selectionPredicates)[r]??(s[r]=[]),t.selectionPredicates[r].push(a),a});return e.selection?n(e.selection):Ra(e.test||e.filter,i=>i.selection?n(i.selection):i)}class hy extends cE{map(t,n){const i=n.selections??[];if(t.params&&!Hr(t)){const r=[];for(const s of t.params)aE(s)?i.push(s):r.push(s);t.params=r}return n.selections=i,super.map(t,n)}mapUnit(t,n){const i=n.selections;if(!i||!i.length)return t;const r=(n.path??[]).concat(t.name),s=[];for(const o of i)if(!o.views||!o.views.length)s.push(o);else for(const a of o.views)(Y(a)&&(a===t.name||r.includes(a))||I(a)&&a.map(u=>r.indexOf(u)).every((u,l,c)=>u!==-1&&(l===0||u>c[l-1])))&&s.push(o);return s.length&&(t.params=s),t}}for(const e of["mapFacet","mapRepeat","mapHConcat","mapVConcat","mapLayer"]){const t=hy.prototype[e];hy.prototype[e]=function(n,i){return t.call(this,n,kie(n,i))}}function kie(e,t){return e.name?{...t,path:(t.path??[]).concat(e.name)}
15:t}function wM(e,t){t===void 0&&(t=pM(e.config));const n=Tie(e,t),{width:i,height:r}=e,s=Mie(n,{width:i,height:r,autosize:e.autosize},t);return{...n,...s?{autosize:s}:{}}}const Die=new aie,Rie=new _ie,Oie=new hy;function Tie(e,t={}){const n={config:t};return Oie.map(Die.map(Rie.map(e,n),n),n)}function NC(e){return Y(e)?{type:e}:e??{}}function Mie(e,t,n){let{width:i,height:r}=t;const s=Hr(e)||yg(e),o={};s?i=="container"&&r=="container"?(o.type="fit",o.contains="padding"):i=="container"?(o.type="fit-x",o.contains="padding"):r=="container"&&(o.type="fit-y",o.contains="padding"):(i=="container"&&(q(oC("width")),i=void 0),r=="container"&&(q(oC("height")),r=void 0));const a={type:"pad",...o,...n?NC(n.autosize):{},...NC(e.autosize)};if(a.type==="fit"&&!s&&(q($Z),a.type="pad"),i=="container"&&!(a.type=="fit"||a.type=="fit-x")&&q(aC("width")),r=="container"&&!(a.type=="fit"||a.type=="fit-y")&&q(aC("height")),!kn(a,{type:"pad"}))return a}function Nie(e){return["fit","fit-x","fit-y"].includes(e)}function Lie(e){return e?`fit-${Zp(e)}`:"fit"}const Pie=["background","padding"];function LC(e,t){const n={};for(const i of Pie)e&&e[i]!==void 0&&(n[i]=_n(e[i]));return t&&(n.params=e.params),n}class Vr{constructor(t={},n={}){this.explicit=t,this.implicit=n}clone(){return new Vr(le(this.explicit),le(this.implicit))}combine(){return{...this.explicit,...this.implicit}}get(t){return Qe(this.explicit[t],this.implicit[t])}getWithExplicit(t){return this.explicit[t]!==void 0?{explicit:!0,value:this.explicit[t]}:this.implicit[t]!==void 0?{explicit:!1,value:this.implicit[t]}:{explicit:!1,value:void 0}}setWithExplicit(t,{value:n,explicit:i}){n!==void 0&&this.set(t,n,i)}set(t,n,i){return delete this[i?"implicit":"explicit"][t],this[i?"explicit":"implicit"][t]=n,this}copyKeyFromSplit(t,{explicit:n,implicit:i}){n[t]!==void 0?this.set(t,n[t],!0):i[t]!==void 0&&this.set(t,i[t],!1)}copyKeyFromObject(t,n){n[t]!==void 0&&this.set(t,n[t],!0)}copyAll(t){for(const n of U(t.combine())){const i=t.getWithExplicit(n);this.setWithExplicit(n,i)}}}function Pi(e){return{explicit:!0,value:e}}function Cn(e){return{explicit:!1,value:e}}function SM(e){return(t,n,i,r)=>{const s=e(t.value,n.value);return s>0?t:s<0?n:bg(t,n,i,r)}}function bg(e,t,n,i){return e.explicit&&t.explicit&&q(gee(n,i,e.value,t.value)),e}function ks(e,t,n,i,r=bg){return e===void 0||e.value===void 0?t:e.explicit&&!t.explicit?e:t.explicit&&!e.explicit?t:kn(e.value,t.value)?e:r(e,t,n,i)}class Iie extends Vr{constructor(t={},n={},i=!1){super(t,n),this.explicit=t,this.implicit=n,this.parseNothing=i}clone(){const t=super.clone();return t.parseNothing=this.parseNothing,t}}function ru(e){return j(e,"url")}function ac(e){return j(e,"values")}function CM(e){return j(e,"name")&&!ru(e)&&!ac(e)&&!xs(e)}function xs(e){return e&&($M(e)||FM(e)||dE(e))}function $M(e){return j(e,"sequence")}function FM(e){return j(e,"sphere")}function dE(e){return j(e,"graticule")}var He;(function(e){e[e.Raw=0]="Raw",e[e.Main=1]="Main",e[e.Row=2]="Row",e[e.Column=3]="Column",e[e.Lookup=4]="Lookup",e[e.PreFilterInvalid=5]="PreFilterInvalid",e[e.PostFilterInvalid=6]="PostFilterInvalid"})(He||(He={}));function _M({invalid:e,isPath:t}){switch(wT(e,{isPath:t})){case"filter":return{marks:"exclude-invalid-values",scales:"exclude-invalid-values"};case"break-paths-show-domains":return{marks:t?"include-invalid-values":"exclude-invalid-values",scales:"include-invalid-values"};case"break-paths-filter-domains":return{marks:t?"include-invalid-values":"exclude-invalid-values",scales:"exclude-invalid-values"};case"show":return{marks:"include-invalid-values",scales:"include-invalid-values"}}}function Bie(e){const{marks:t,scales:n}=_M(e);return t===n?He.Main:n==="include-invalid-values"?He.PreFilterInvalid:He.PostFilterInvalid}class De{constructor(t,n){this.debugName=n,this._children=[],this._parent=null,t&&(this.parent=t)}clone(){throw new Error("Cannot clone node")}get parent(){return this._parent}set parent(t){this._parent=t,t&&t.addChild(this)}get children(){return this._children}numChildren(){return this._children.length}addChild(t,n){if(this._children.includes(t)){q(qZ);return}n!==void 0?this._children.splice(n,0,t):this._children.push(t)}removeChild(t){const n=this._children.indexOf(t);return this._children.splice(n,1),n}remove(){let t=this._parent.removeChild(this);for(const n of this._children)n._parent=this._parent,this._parent.addChild(n,t++)}insertAsParentOf(t){const n=t.parent;n.removeChild(this),this.parent=n,t.parent=this}swapWithParent(){const t=this._parent,n=t.parent;for(const r of this._children)r.parent=t;this._children=[],t.removeChild(this);const i=t.parent.removeChild(t);this._parent=n,n.addChild(this,i),t.parent=this}}class mn extends De{clone(){const t=new this.constructor;return t.debugName=`clone_${this.debugName}`,t._source=this._source,t._name=`clone_${this._name}
15`,t.type=this.type,t.refCounts=this.refCounts,t.refCounts[t._name]=0,t}constructor(t,n,i,r){super(t,n),this.type=i,this.refCounts=r,this._source=this._name=n,this.refCounts&&!(this._name in this.refCounts)&&(this.refCounts[this._name]=0)}dependentFields(){return new Set}producedFields(){return new Set}hash(){return this._hash===void 0&&(this._hash=`Output ${SO()}`),this._hash}getSource(){return this.refCounts[this._name]++,this._source}isRequired(){return!!this.refCounts[this._name]}setSource(t){this._source=t}}function X0(e){return e.as!==void 0}function PC(e){return`${e}_end`}class Hi extends De{clone(){return new Hi(null,le(this.timeUnits))}constructor(t,n){super(t),this.timeUnits=n}static makeFromEncoding(t,n){const i=n.reduceFieldDef((r,s,o)=>{const{field:a,timeUnit:u}=s;if(u){let l;if(Qo(u)){if(Ge(n)){const{mark:c,markDef:f,config:d}=n,h=_s({fieldDef:s,markDef:f,config:d});(oc(c)||h)&&(l={timeUnit:ht(u),field:a})}}else l={as:V(s,{forAs:!0}),field:a,timeUnit:u};if(Ge(n)){const{mark:c,markDef:f,config:d}=n,h=_s({fieldDef:s,markDef:f,config:d});oc(c)&&Ze(o)&&h!==.5&&(l.rectBandPosition=h)}l&&(r[be(l)]=l)}return r},{});return Oe(i)?null:new Hi(t,i)}static makeFromTransform(t,n){const{timeUnit:i,...r}={...n},s=ht(i),o={...r,timeUnit:s};return new Hi(t,{[be(o)]:o})}merge(t){this.timeUnits={...this.timeUnits};for(const n in t.timeUnits)this.timeUnits[n]||(this.timeUnits[n]=t.timeUnits[n]);for(const n of t.children)t.removeChild(n),n.parent=this;t.remove()}removeFormulas(t){const n={};for(const[i,r]of $s(this.timeUnits)){const s=X0(r)?r.as:`${r.field}_end`;t.has(s)||(n[i]=r)}this.timeUnits=n}producedFields(){return new Set(St(this.timeUnits).map(t=>X0(t)?t.as:PC(t.field)))}dependentFields(){return new Set(St(this.timeUnits).map(t=>t.field))}hash(){return`TimeUnit ${be(this.timeUnits)}`}assemble(){const t=[];for(const n of St(this.timeUnits)){const{rectBandPosition:i}=n,r=ht(n.timeUnit);if(X0(n)){const{field:s,as:o}=n,{unit:a,utc:u,...l}=r,c=[o,`${o}_end`];t.push({field:Qn(s),type:"timeunit",...a?{units:ig(a)}:{},...u?{timezone:"utc"}:{},...l,as:c}),t.push(...IC(c,i,r))}else if(n){const{field:s}=n,o=s.replaceAll("\\.","."),a=kM({timeUnit:r,field:o}),u=PC(o);t.push({type:"formula",expr:a,as:u}),t.push(...IC([o,u],i,r))}}return t}}const xg="offsetted_rect_start",vg="offsetted_rect_end";function kM({timeUnit:e,field:t,reverse:n}){const{unit:i,utc:r}=e,s=sT(i),{part:o,step:a}=lT(s,e.step);return`${r?"utcOffset":"timeOffset"}('${o}', ${Fe(t)}, ${n?-a:a})`}function IC([e,t],n,i){if(n!==void 0&&n!==.5){const r=Fe(e),s=Fe(t);return[{type:"formula",expr:BC([kM({timeUnit:i,field:e,reverse:!0}),r],n+.5),as:`${e}_${xg}`},{type:"formula",expr:BC([r,s],n+.5),as:`${e}_${vg}`}]}return[]}function BC([e,t],n){return`${1-n} * ${e} + ${n} * ${t}`}const ef="_tuple_fields";class zie{constructor(...t){this.items=t,this.hasChannel={},this.hasField={},this.hasSelectionId=!1}}const Uie={defined:()=>!0,parse:(e,t,n)=>{const i=t.name,r=t.project??(t.project=new zie),s={},o={},a=new Set,u=(p,g)=>{const m=g==="visual"?p.channel:p.field;let y=je(`${i}_${m}`);for(let b=1;a.has(y);b++)y=je(`${i}_${m}_${b}`);return a.add(y),{[g]:y}},l=t.type,c=e.config.selection[l],f=n.value!==void 0?K(n.value):null;let{fields:d,encodings:h}=X(n.select)?n.select:{};if(!d&&!h&&f){for(const p of f)if(X(p))for(const g of U(p))eZ(g)?(h||(h=[])).push(g):l==="interval"?(q(LZ),h=c.encodings):(d??(d=[])).push(g)}!d&&!h&&(h=c.encodings,"fields"in c&&(d=c.fields));for(const p of h??[]){const g=e.fieldDef(p);if(g){let m=g.field;if(g.aggregate){q(FZ(p,g.aggregate));continue}else if(!m){q(lC(p));continue}if(g.timeUnit&&!Qo(g.timeUnit)){m=e.vgField(p);const y={timeUnit:g.timeUnit,as:m,field:g.field};o[be(y)]=y}if(!s[m]){const y=l==="interval"&&dr(p)&&xi(e.getScaleComponent(p).get("type"))?"R":g.bin?"R-RE":"E",b={field:m,channel:p,type:y,index:r.items.length};b.signals={...u(b,"data"),...u(b,"visual")},r.items.push(s[m]=b),r.hasField[m]=s[m],r.hasSelectionId=r.hasSelectionId||m===Ai,DO(p)?(b.geoChannel=p,b.channel=kO(p),r.hasChannel[b.channel]=s[m]):r.hasChannel[p]=s[m]}}else q(lC(p))}for(const p of d??[]){if(r.hasField[p])continue;const g={type:"E",field:p,index:r.items.length};g.signals={...u(g,"data")},r.items.push(g),r.hasField[p]=g,r.hasSelectionId=r.hasSelectionId||p===Ai}f&&(t.init=f.map(p=>r.items.map(g=>X(p)?p[g.geoChannel||g.channel]!==void 0?p[g.geoChannel||g.channel]:p[g.field]:p))),Oe(o)||(r.timeUnit=new Hi(null,o))},signals:(e,t,n)=>{const i=t.name+ef;return n.filter(s=>s.name===i).length>0||t.project.hasSelectionId?n:n.concat({name:i,value:t.project.items.map(TM)})}},DM="_curr",xd="anim_value",ya="anim_clock",py="eased_anim_clock",RM="min_extent",OM="max_range_extent",Y0="last_tick_at",K0="is_playing",jie=1/60*1e3,qie=(e,t)=>[{name:py,update:ya},{name:`${e}_domain`,init:`domain('${t}')`},{name:RM,init:`extent(${e}_domain)[0]`},{name:OM,init:`extent(range('${t}'))[1]`},{name:xd,update:`invert('${t}', ${py})`}],Wie={defined:e=>e.type==="point",topLevelSignals:(e,t,n)=>(Vi(t)&&(n=n.concat([{name:ya,init:"0",on:[{events:{type:"timer",throttle:jie},update:`${K0} ? (${ya} + (now() - ${Y0}) > ${OM} ? 0 : ${ya} + (now() - ${Y0})) : ${ya}`}]},{name:Y0,init:"now()",on:[{events:[{signal:ya},{signal:K0}],update:"now()"}]},{name:K0,init:"true"}])),n),signals:(e,t,n)=>{const i=t.name,r=i+ef,s=t.project,o="(item().isVoronoi ? datum.datum : datum)",a=St(e.component.selection??{}).reduce((c,f)=>f.type==="interval"?c.concat(f.name+Ma):c,[]).map(c=>`indexof(item().mark.name, '${c}') < 0`).join(" && "),u=`datum && item().mark.marktype !== 'group' && indexof(item().mark.role, 'legend') < 0${a?` && ${a}`:""}`;let l=`unit: ${mo(e)}, `;if(t.project.hasSelectionId)l+=`${Ai}: ${o}[${G(Ai)}]`;else if(Vi(t))l+=`fields: ${r}, values: [${xd} ? ${xd} : ${RM}]`;else{const c=s.items.map(f=>e.fieldDef(f.channel)?.bin?`[${o}[${G(e.vgField(f.channel,{}))}], ${o}[${G(e.vgField(f.channel,{binSuffix:"end"}))}]]`:`${o}[${G(f.field)}]`).join(", ");l+=`fields: ${r}, values: [${c}]`}if(Vi(t))return n.concat(qie(t.name,e.scaleName(Ns)),[{name:i+Ir,on:[{events:[{signal:py},{signal:xd}],update:`{${l}}`,force:!0}]}]);
15{const c=t.events;return n.concat([{name:i+Ir,on:c?[{events:c,update:`${u} ? {${l}} : null`,force:!0}]:[]}])}}};function TM(e){const{signals:t,hasLegend:n,index:i,...r}=e;return r.field=Qn(r.field),r}function No(e,t=!0,n=jt){if(I(e)){const i=e.map(r=>No(r,t,n));return t?`[${i.join(", ")}]`:i}else if(Jo(e))return n(t?Ro(e):zee(e));return t?n(Te(e)):e}function Gie(e,t){for(const n of St(e.component.selection??{})){const i=n.name;let r=`${i}${Ir}, ${n.resolve==="global"?"true":`{unit: ${mo(e)}}`}`;for(const s of Ag)s.defined(n)&&(s.signals&&(t=s.signals(e,n,t)),s.modifyExpr&&(r=s.modifyExpr(e,n,r)));t.push({name:i+bre,on:[{events:{signal:n.name+Ir},update:`modify(${G(n.name+Lo)}, ${r})`}]})}return hE(t)}function Hie(e,t){if(e.component.selection&&U(e.component.selection).length){const n=G(e.getName("cell"));t.unshift({name:"facet",value:{},on:[{events:Ts("pointermove","scope"),update:`isTuple(facet) ? facet : group(${n}).datum`}]})}return hE(t)}function Vie(e,t){let n=!1;for(const i of St(e.component.selection??{})){const r=i.name,s=G(r+Lo);if(t.filter(a=>a.name===r).length===0){const a=i.resolve==="global"?"union":i.resolve,u=i.type==="point"?", true, true)":")";t.push({name:i.name,update:`${KM}(${s}, ${G(a)}${u}`})}n=!0;for(const a of Ag)a.defined(i)&&a.topLevelSignals&&(t=a.topLevelSignals(e,i,t))}return n&&t.filter(r=>r.name==="unit").length===0&&t.unshift({name:"unit",value:{},on:[{events:"pointermove",update:"isTuple(group()) ? group() : unit"}]}),hE(t)}function Xie(e,t){const n=[],i=[],r=mo(e,{escape:!1});for(const s of St(e.component.selection??{})){const o={name:s.name+Lo};if(s.project.hasSelectionId&&(o.transform=[{type:"collect",sort:{field:Ai}}]),s.init){const u=s.project.items.map(TM);o.values=s.project.hasSelectionId?s.init.map(l=>({unit:r,[Ai]:No(l,!1)[0]})):s.init.map(l=>({unit:r,fields:u,values:No(l,!1)}))}if([...n,...t].filter(u=>u.name===s.name+Lo).length||n.push(o),Vi(s)&&t.length){const u=e.lookupDataSource(e.getDataName(He.Main)),l=t.find(f=>f.name===u),c=l.transform.find(f=>f.type==="filter"&&f.expr.includes("vlSelectionTest"));if(c){l.transform=l.transform.filter(d=>d!==c);const f={name:l.name+DM,source:l.name,transform:[c]};i.push(f)}}}return n.concat(t,i)}function MM(e,t){for(const n of St(e.component.selection??{}))for(const i of Ag)i.defined(n)&&i.marks&&(t=i.marks(e,n,t));return t}function Yie(e,t){for(const n of e.children)Ge(n)&&(t=MM(n,t));return t}function Kie(e,t,n,i){const r=aN(e,t.param,t);return{signal:xi(n.get("type"))&&I(i)&&i[0]>i[1]?`isValid(${r}) && reverse(${r})`:r}}function hE(e){return e.map(t=>(t.on&&!t.on.length&&delete t.on,t))}const Or={defined:e=>e.type==="interval"&&e.resolve==="global"&&e.bind&&e.bind==="scales",parse:(e,t)=>{const n=t.scales=[];for(const i of t.project.items){const r=i.channel;if(!dr(r))continue;const s=e.getScaleComponent(r),o=s?s.get("type"):void 0;if(o=="sequential"&&q(RZ),!s||!xi(o)){q(DZ);continue}s.set("selectionExtent",{param:t.name,field:i.field},!0),n.push(i)}},topLevelSignals:(e,t,n)=>{const i=t.scales.filter(o=>n.filter(a=>a.name===o.signals.data).length===0);if(!e.parent||my(e)||i.length===0)return n;const r=n.find(o=>o.name===t.name);let s=r.update;if(s.includes(KM))r.update=`{${i.map(o=>`${G(Qn(o.field))}: ${o.signals.data}`).join(", ")}}`;else{for(const o of i){const a=`${G(Qn(o.field))}: ${o.signals.data}`;s.includes(a)||(s=`${s.substring(0,s.length-1)}, ${a}}`)}r.update=s}return n.concat(i.map(o=>({name:o.signals.data})))},signals:(e,t,n)=>{if(e.parent&&!my(e))for(const i of t.scales){const r=n.find(s=>s.name===i.signals.data);r.push="outer",delete r.value,delete r.update}return n}};function gy(e,t){return`domain(${G(e.scaleName(t))})`}function my(e){return e.parent&&Ru(e.parent)&&(!e.parent.parent||my(e.parent.parent))}const Ma="_brush",NM="_scale_trigger",Ju="geo_interval_init_tick",LM="_init",Jie="_center",Qie={defined:e=>e.type==="interval",parse:(e,t,n)=>{var i;if(e.hasProjection){const r={...X(n.select)?n.select:{}};r.fields=[Ai],r.encodings||(r.encodings=n.value?U(n.value):[ki,_i]),n.select={type:"interval",...r}}if(t.translate&&!Or.defined(t)){const r=`!event.item || event.item.mark.name !== ${G(t.name+Ma)}`;for(const s of t.events){if(!s.between){q(`${s} is not an ordered event stream for interval selections.`);continue}const o=K((i=s.between[0]).filter??(i.filter=[]));o.includes(r)||o.push(r)}}},signals:(e,t,n)=>{const i=t.name,r=i+Ir,s=St(t.project.hasChannel).filter(a=>a.channel===qe||a.channel===gt),o=t.init?t.init[0]:null;if(n.push(...s.reduce((a,u)=>a.concat(Zie(e,t,u,o&&o[u.index])),[])),e.hasProjection){const a=G(e.projectionName()),u=e.projectionName()+Jie,{x:l,y:c}=t.project.hasChannel,f=l&&l.signals.visual,d=c&&c.signals.visual,h=l?o&&o[l.index]:`${u}[0]`,p=c?o&&o[c.index]:`${u}[1]`,g=A=>e.getSizeSignalRef(A).signal,m=`[[${f?f+"[0]":"0"}, ${d?d+"[0]":"0"}],[${f?f+"[1]":g("width")}, ${d?d+"[1]":g("height")}]]`;o&&(n.unshift({name:i+LM,init:`[scale(${a}, [${l?h[0]:h}, ${c?p[0]:p}]), scale(${a}, [${l?h[1]:h}, ${c?p[1]:p}])]`}),(!l||!c)&&(n.find(w=>w.name===u)||n.unshift({name:u,update:`invert(${a}, [${g("width")}/2, ${g("height")}/2])`})));const y=`intersect(${m}, {markname: ${G(e.getName("marks"))}}, unit.mark)`,b=`{unit: ${mo(e)}}`,x=`vlSelectionTuples(${y}, ${b})`,v=s.map(A=>A.signals.visual);return n.concat({name:r,on:[{events:[...v.length?[{signal:v.join(" || ")}]:[],...o?[{signal:Ju}]:[]],update:x}]})}else{if(!Or.defined(t)){const l=i+NM,c=s.map(f=>{const d=f.channel,{data:h,visual:p}=f.signals,g=G(e.scaleName(d)),m=e.getScaleComponent(d).get("type"),y=xi(m)?"+":"";return`(!isArray(${h}) || (${y}invert(${g}, ${p})[0] === ${y}${h}[0] && ${y}invert(${g}, ${p})[1] === ${y}${h}[1]))`});c.length&&n.push({name:l,value:{},on:[{events:s.map(f=>({scale:e.scaleName(f.channel)})),update:c.join(" && ")+` ? ${l} : {}`}]})}const a=s.map(l=>l.signals.data),u=`unit: ${mo(e)}, fields: ${i+ef}, values`;return n.concat({name:r,...o?{init:`{${u}: ${No(o)}}`}:{},...a.length?{on:[{events:[{signal:a.join(" || ")}],update:`${a.join(" && ")} ? {${u}: [${a}]} : null`}]}:{}})}},topLevelSignals:(e,t,n)=>(Ge(e)&&e.hasProjection&&t.init&&(n.filter(r=>r.name===Ju).length||n.unshift({name:Ju,value:null,on:[{events:"timer{1}",update:`${Ju} === null ? {} : ${Ju}`}]})),n),marks:(e,t,n)=>{const i=t.name,{x:r,y:s}=t.project.hasChannel,o=r?.signals.visual,a=s?.signals.visual,u=`data(${G(t.name+Lo)})`;if(Or.defined(t)||!r&&!s)return n;const l={x:r!==void 0?{signal:`${o}[0]`}:{value:0},y:s!==void 0?{signal:`${a}[0]`}:{value:0},x2:r!==void 0?{signal:`${o}[1]`}:{field:{group:"width"}},y2:s!==void 0?{signal:`${a}[1]`}:{field:{group:"height"}}};if(t.resolve==="global")for(const m of U(l))l[m]=[{test:`${u}.length && ${u}[0].unit === ${mo(e)}`,...l[m]},{value:0}];const{fill:c,fillOpacity:f,cursor:d,...h}=t.mark,p=U(h).reduce((m,y)=>(m[y]=[{test:[r!==void 0&&`${o}[0] !== ${o}[1]`,s!==void 0&&`${a}[0] !== ${a}[1]`].filter(b=>b).join(" && "),value:h[y]},{value:null}],m),{}),g=d??(t.translate?"move":null);return[{name:`${i+Ma}_bg`,type:"rect",clip:!0,encode:{enter:{fill:{value:c},fillOpacity:{value:f}},update:l}},...n,{name:i+Ma,type:"rect",clip:!0,encode:{enter:{...g?{cursor:{value:g}}:{},fill:{value:"transparent"}},update:{...l,...p}}}]}};function Zie(e,t,n,i){const r=!e.hasProjection,s=n.channel,o=n.signals.visual,a=G(r?e.scaleName(s):e.projectionName()),u=d=>`scale(${a}, ${d})`,l=e.getSizeSignalRef(s===qe?"width":"height").signal,c=`${s}(unit)`,f=t.events.reduce((d,h)=>[...d,{events:h.between[0],update:`[${c}, ${c}]`},{events:h,update:`[${o}
15[0], clamp(${c}, 0, ${l})]`}],[]);if(r){const d=n.signals.data,h=Or.defined(t),p=e.getScaleComponent(s),g=p?p.get("type"):void 0,m=i?{init:No(i,!0,u)}:{value:[]};return f.push({events:{signal:t.name+NM},update:xi(g)?`[${u(`${d}[0]`)}, ${u(`${d}[1]`)}]`:"[0, 0]"}),h?[{name:d,on:[]}]:[{name:o,...m,on:f},{name:d,...i?{init:No(i)}:{},on:[{events:{signal:o},update:`${o}[0] === ${o}[1] ? null : invert(${a}, ${o})`}]}]}else{const d=s===qe?0:1,h=t.name+LM,p=i?{init:`[${h}[0][${d}], ${h}[1][${d}]]`}:{value:[]};return[{name:o,...p,on:f}]}}function Fu({model:e,channelDef:t,vgChannel:n,invalidValueRef:i,mainRefFn:r}){const s=Kc(t)&&t.condition;let o=[];s&&(o=K(s).map(l=>{const c=r(l);if(zte(l)){const{param:f,empty:d}=l;return{test:oN(e,{param:f,empty:d}),...c}}else return{test:zh(e,l.test),...c}})),i!==void 0&&o.push(i);const a=r(t);return a!==void 0&&o.push(a),o.length>1||o.length===1&&o[0].test?{[n]:o}:o.length===1?{[n]:o[0]}:{}}function pE(e,t="text"){const n=e.encoding[t];return Fu({model:e,channelDef:n,vgChannel:t,mainRefFn:i=>Eg(i,e.config),invalidValueRef:void 0})}function Eg(e,t,n="datum"){if(e){if(vi(e))return Be(e.value);if(ce(e)){const{format:i,formatType:r}=Th(e);return X2({fieldOrDatumDef:e,format:i,formatType:r,expr:n,config:t})}}}function PM(e,t={}){const{encoding:n,markDef:i,config:r,stack:s}=e,o=n.tooltip;if(I(o))return{tooltip:zC({tooltip:o},s,r,t)};{const a=t.reactiveGeom?"datum.datum":"datum";return Fu({model:e,channelDef:o,vgChannel:"tooltip",mainRefFn:l=>{const c=Eg(l,r,a);if(c)return c;if(l===null)return;let f=Re("tooltip",i,r);if(f===!0&&(f={content:"encoding"}),Y(f))return{value:f};if(X(f))return te(f)?f:f.content==="encoding"?zC(n,s,r,t):{signal:a}},invalidValueRef:void 0})}}function IM(e,t,n,{reactiveGeom:i}={}){const r={...n,...n.tooltipFormat},s=new Set,o=i?"datum.datum":"datum",a=[];function u(c,f){const d=Xo(f),h=sn(c)?c:{...c,type:e[d].type},p=h.title||Q2(h,r),g=K(p).join(", ").replaceAll(/"/g,'\\"');let m;if(Ze(f)){const y=f==="x"?"x2":"y2",b=Ei(e[y]);if(mt(h.bin)&&b){const x=V(h,{expr:o}),v=V(b,{expr:o}),{format:A,formatType:w}=Th(h);m=Xc(x,v,A,w,r),s.add(y)}}if((Ze(f)||f===ti||f===Fi)&&t&&t.fieldChannel===f&&t.offset==="normalize"){const{format:y,formatType:b}=Th(h);m=X2({fieldOrDatumDef:h,format:y,formatType:b,expr:o,config:r,normalizeStack:!0}).signal}m??(m=Eg(h,r,o).signal),a.push({channel:f,key:g,value:m})}eE(e,(c,f)=>{W(c)?u(c,f):fg(c)&&u(c.condition,f)});const l={};for(const{channel:c,key:f,value:d}of a)!s.has(c)&&!l[f]&&(l[f]=d);return l}function zC(e,t,n,{reactiveGeom:i}={}){const r=IM(e,t,n,{reactiveGeom:i}),s=$s(r).map(([o,a])=>`"${o}": ${a}`);return s.length>0?{signal:`{${s.join(", ")}}`}:void 0}function ere(e){const{markDef:t,config:n}=e,i=Re("aria",t,n);return i===!1?{}:{...i?{aria:i}:{},...tre(e),...nre(e)}}function tre(e){const{mark:t,markDef:n,config:i}=e;if(i.aria===!1)return{};const r=Re("ariaRoleDescription",n,i);return r!=null?{ariaRoleDescription:{value:r}}:J(wZ,t)?{}:{ariaRoleDescription:{value:t}}}function nre(e){const{encoding:t,markDef:n,config:i,stack:r}=e,s=t.description;if(s)return Fu({model:e,channelDef:s,vgChannel:"description",mainRefFn:u=>Eg(u,e.config),invalidValueRef:void 0});const o=Re("description",n,i);if(o!=null)return{description:Be(o)};if(i.aria===!1)return{};const a=IM(t,r,i);if(!Oe(a))return{description:{signal:$s(a).map(([u,l],c)=>`"${c>0?"; ":""}${u}: " + (${l})`).join(" + ")}}}function xt(e,t,n={}){const{markDef:i,encoding:r,config:s}=t,{vgChannel:o}=n;let{defaultRef:a,defaultValue:u}=n;const l=r[e];a===void 0&&(u??(u=Re(e,i,s,{vgChannel:o,ignoreVgConfig:!Kc(l)})),u!==void 0&&(a=Be(u)));const c={markDef:i,config:s,scaleName:t.scaleName(e),scale:t.getScaleComponent(e)},f=CT({...c,scaleChannel:e,channelDef:l});return Fu({model:t,channelDef:l,vgChannel:o??e,invalidValueRef:f,mainRefFn:h=>V2({...c,channel:e,channelDef:h,stack:null,defaultRef:a})})}function BM(e,t={filled:void 0}){const{markDef:n,encoding:i,config:r}=e,{type:s}=n,o=t.filled??Re("filled",n,r),a=ye(["bar","point","circle","square","geoshape"],s)?"transparent":void 0,u=Re(o===!0?"color":void 0,n,r,{vgChannel:"fill"})??r.mark[o===!0&&"color"]??a,l=Re(o===!1?"color":void 0,n,r,{vgChannel:"stroke"})??r.mark[o===!1&&"color"],c=o?"fill":"stroke",f={...u?{fill:Be(u)}:{},...l?{stroke:Be(l)}:{}};return n.color&&(o?n.fill:n.stroke)&&q(KO("property",{fill:"fill"in n,stroke:"stroke"in n}
15)),{...f,...xt("color",e,{vgChannel:c,defaultValue:o?u:l}),...xt("fill",e,{defaultValue:i.fill?u:void 0}),...xt("stroke",e,{defaultValue:i.stroke?l:void 0})}}function ire(e){const{encoding:t,mark:n}=e,i=t.order;return!Us(n)&&vi(i)?Fu({model:e,channelDef:i,vgChannel:"zindex",mainRefFn:r=>Be(r.value),invalidValueRef:void 0}):{}}function su({channel:e,markDef:t,encoding:n={},model:i,bandPosition:r}){const s=`${e}Offset`,o=t[s],a=n[s];if((s==="xOffset"||s==="yOffset")&&a)return{offsetType:"encoding",offset:V2({channel:s,channelDef:a,markDef:t,config:i?.config,scaleName:i.scaleName(s),scale:i.getScaleComponent(s),stack:null,defaultRef:Be(o),bandPosition:r})};const u=t[s];return u?{offsetType:"visual",offset:u}:{}}function Zt(e,t,{defaultPos:n,vgChannel:i}){const{encoding:r,markDef:s,config:o,stack:a}=t,u=r[e],l=r[fr(e)],c=t.scaleName(e),f=t.getScaleComponent(e),{offset:d,offsetType:h}=su({channel:e,markDef:s,encoding:r,model:t,bandPosition:.5}),p=gE({model:t,defaultPos:n,channel:e,scaleName:c,scale:f}),g=!u&&Ze(e)&&(r.latitude||r.longitude)?{field:t.getName(e)}:rre({channel:e,channelDef:u,channel2Def:l,markDef:s,config:o,scaleName:c,scale:f,stack:a,offset:d,defaultRef:p,bandPosition:h==="encoding"?0:void 0});return g?{[i||e]:g}:void 0}function rre(e){const{channel:t,channelDef:n,scaleName:i,stack:r,offset:s,markDef:o}=e;if(ce(n)&&r&&t===r.fieldChannel){if(W(n)){let a=n.bandPosition;if(a===void 0&&o.type==="text"&&(t==="radius"||t==="theta")&&(a=.5),a!==void 0)return Dh({scaleName:i,fieldOrDatumDef:n,startSuffix:"start",bandPosition:a,offset:s})}return po(n,i,{suffix:"end"},{offset:s})}return H2(e)}function gE({model:e,defaultPos:t,channel:n,scaleName:i,scale:r}){const{markDef:s,config:o}=e;return()=>{const a=Xo(n),u=Fs(n),l=Re(n,s,o,{vgChannel:u});if(l!==void 0)return Ll(n,l);switch(t){case"zeroOrMin":return UC({scaleName:i,scale:r,mode:"zeroOrMin",mainChannel:a,config:o});case"zeroOrMax":return UC({scaleName:i,scale:r,mode:{zeroOrMax:{widthSignal:e.width.signal,heightSignal:e.height.signal}},mainChannel:a,config:o});case"mid":return{...e[An(n)],mult:.5}}}}function UC({mainChannel:e,config:t,...n}){const i=ST(n),{mode:r}=n;if(i)return i;switch(e){case"radius":{if(r==="zeroOrMin")return{value:0};const{widthSignal:s,heightSignal:o}=r.zeroOrMax;return{signal:`min(${s},${o})/2`}}case"theta":return r==="zeroOrMin"?{value:0}:{signal:"2*PI"};case"x":return r==="zeroOrMin"?{value:0}:{field:{group:"width"}};case"y":return r==="zeroOrMin"?{field:{group:"height"}}:{value:0}}}const sre={left:"x",center:"xc",right:"x2"},ore={top:"y",middle:"yc",bottom:"y2"};function zM(e,t,n,i="middle"){if(e==="radius"||e==="theta")return Fs(e);const r=e==="x"?"align":"baseline",s=Re(r,t,n);let o;return te(s)?(q(ree(r)),o=void 0):o=s,e==="x"?sre[o||(i==="top"?"left":"center")]:ore[o||i]}function Ph(e,t,{defaultPos:n,defaultPos2:i,range:r}){return r?UM(e,t,{defaultPos:n,defaultPos2:i}):Zt(e,t,{defaultPos:n})}function UM(e,t,{defaultPos:n,defaultPos2:i}){const{markDef:r,config:s}=t,o=fr(e),a=An(e),u=are(t,i,o),l=u[a]?zM(e,r,s):Fs(e);return{...Zt(e,t,{defaultPos:n,vgChannel:l}),...u}}function are(e,t,n){const{encoding:i,mark:r,markDef:s,stack:o,config:a}=e,u=Xo(n),l=An(n),c=Fs(n),f=i[u],d=e.scaleName(u),h=e.getScaleComponent(u),{offset:p}=n in i||n in s?su({channel:n,markDef:s,encoding:i,model:e}):su({channel:u,markDef:s,encoding:i,model:e});if(!f&&(n==="x2"||n==="y2")&&(i.latitude||i.longitude)){const m=An(n),y=e.markDef[m];return y!=null?{[m]:{value:y}}:{[c]:{field:e.getName(n)}}}const g=ure({channel:n,channelDef:f,channel2Def:i[n],markDef:s,config:a,scaleName:d,scale:h,stack:o,offset:p,defaultRef:void 0});return g!==void 0?{[c]:g}:Pf(n,s)||Pf(n,{[n]:iy(n,s,a.style),[l]:iy(l,s,a.style)})||Pf(n,a[r])||Pf(n,a.mark)||{[c]:gE({model:e,defaultPos:t,channel:n,scaleName:d,scale:h})()}}function ure({channel:e,channelDef:t,channel2Def:n,markDef:i,config:r,scaleName:s,scale:o,stack:a,offset:u,defaultRef:l}){return ce(t)&&a&&e.charAt(0)===a.fieldChannel.charAt(0)?po(t,s,{suffix:"start"},{offset:u}):H2({channel:e,channelDef:n,scaleName:s,scale:o,stack:a,markDef:i,config:r,offset:u,defaultRef:l})}function Pf(e,t){const n=An(e),i=Fs(e);if(t[i]!==void 0)return{[i]:Ll(e,t[i])};if(t[e]!==void 0)return{[i]:Ll(e,t[e])};if(t[n]){const r=t[n];if(To(r))q(QZ(n));else return{[n]:Ll(e,r)}}}function Pr(e,t){const{config:n,encoding:i,markDef:r}=e,s=r.type,o=fr(t),a=An(t),u=i[t],l=i[o],c=e.getScaleComponent(t),f=c?c.get("type"):void 0,d=r.orient,h=i[a]??i.size??Re("size",r,n,{vgChannel:a}),p=MO(t),g=s==="bar"&&(t==="x"?d==="vertical":d==="horizontal")||s==="tick"&&(t==="y"?d==="vertical":d==="horizontal");return W(u)&&(Le(u.bin)||mt(u.bin)||u.timeUnit&&!l)&&!(h&&!To(h))&&!i[p]&&!pt(f)?fre({fieldDef:u,fieldDef2:l,channel:t,model:e}):(ce(u)&&pt(f)||g)&&!l?cre(u,t,e):UM(t,e,{defaultPos:"zeroOrMax",defaultPos2:"zeroOrMin"})}function lre(e,t,n,i,r,s,o){if(To(r))if(n){const u=n.get("type");if(u==="band"){let l=`bandwidth('${t}')`;r.band!==1&&(l=`${r.band} * ${l}`);const c=Zi("minBandSize",{type:o},i);return{signal:c?`max(${di(c)}, ${l})`:l}}else r.band!==1&&(q(uee(u)),r=void 0)}else return{mult:r.band,field:{group:e}};else{if(te(r))return r;if(r)return{value:r}}if(n){const u=n.get("range");if(Ko(u)&&Se(u.step))return{value:u.step-2}}if(!s){const{bandPaddingInner:u,barBandPaddingInner:l,rectBandPaddingInner:c,tickBandPaddingInner:f}=i.scale,d=Qe(u,o==="tick"?f:o==="bar"?l:c);if(te(d))return{signal:`(1 - (${d.signal})) * ${e}`};if(Se(d))return{signal:`${1-d} * ${e}`}}return{value:cy(i.view,e)-2}}function cre(e,t,n){const{markDef:i,encoding:r,config:s,stack:o}=n,a=i.orient,u=n.scaleName(t),l=n.getScaleComponent(t),c=An(t),f=fr(t),d=MO(t),h=n.scaleName(d),p=n.getScaleComponent(x2(t)),g=i.type==="tick"||a==="horizontal"&&t==="y"||a==="vertical"&&t==="x";let m;(r.size||i.size)&&(g?m=xt("size",n,{vgChannel:c,defaultRef:Be(i.size)}):q(dee(i.type)));const y=!!m,b=OT({channel:t,fieldDef:e,markDef:i,config:s,scaleType:(l||p)?.get("type"),useVlSizeChannel:g});m=m||{[c]:lre(c,h||u,p||l,s,b,!!e,i.type)};const x=(l||p)?.get("type")==="band"&&To(b)&&!y?"top":"middle",v=zM(t,i,s,x),A=v==="xc"||v==="yc",{offset:w,offsetType:E}=su({channel:t,markDef:i,encoding:r,model:n,bandPosition:A?.5:0}),S=H2({channel:t,channelDef:e,markDef:i,config:s,scaleName:u,scale:l,stack:o,offset:w,defaultRef:gE({model:n,defaultPos:"mid",channel:t,scaleName:u,scale:l}),bandPosition:A?E==="encoding"?0:.5:te(b)?{signal:`(1-${b})/2`}:To(b)?(1-b.band)/2:0});if(c)return{[v]:S,...m};{const C=Fs(f),F=m[c],k=w?{...F,offset:w}:F;return{[v]:S,[C]:I(S)?[S[0],{...S[1],offset:k}]:{...S,offset:k}}}}function jC(e,t,n,i,r,s,o){if(_O(e))return 0;const a=e==="x"||e==="y2",u=a?-t/2:t/2;if(te(n)||te(r)||te(i)||s){const l=di(n),c=di(r),f=di(i),d=di(s),p=s?`(${o} < ${d} ? ${a?"":"-"}0.5 * (${d} - (${o})) : ${u})`:u,g=f?`${f} + `:"",m=l?`(${l} ? -1 : 1) * `:"",y=c?`(${c} + ${p})`:p;return{signal:g+m+y}}else return r=r||0,i+(n?-r-u:+r+u)}function fre({fieldDef:e,fieldDef2:t,channel:n,model:i}){const{config:r,markDef:s,encoding:o}=i,a=i.getScaleComponent(n),u=i.scaleName(n),l=a?a.get("type"):void 0,c=a.get("reverse"),f=OT({channel:n,fieldDef:e,markDef:s,config:r,scaleType:l}),h=i.component.axes[n]?.[0]?.get("translate")??.5,p=Ze(n)?Re("binSpacing",s,r)??0:0,g=fr(n),m=Fs(n),y=Fs(g),b=Zi("minBandSize",s,r),{offset:x}=su({channel:n,markDef:s,encoding:o,model:i,bandPosition:0}),{offset:v}=su({channel:g,markDef:s,encoding:o,model:i,bandPosition:0}),A=Mte({fieldDef:e,scaleName:u}),w=jC(n,p,c,h,x,b,A),E=jC(g,p,c,h,v??x,b,A),S=te(f)?{signal:`(1-${f.signal})/2`}:To(f)?(1-f.band)/2:.5,C=_s({fieldDef:e,fieldDef2:t,markDef:s,config:r});if(Le(e.bin)||e.timeUnit){const F=e.timeUnit&&C!==.5;return{[y]:qC({fieldDef:e,scaleName:u,bandPosition:S,offset:E,useRectOffsetField:F}),[m]:qC({fieldDef:e,scaleName:u,bandPosition:te(S)?{signal:`1-${S.signal}`}:1-S,offset:w,useRectOffsetField:F})}}else if(mt(e.bin)){const F=po(e,u,{},{offset:E});if(W(t))return{[y]:F,[m]:po(t,u,{},{offset:w})};if(Yo(e.bin)&&e.bin.step)return{[y]:F,[m]:{signal:`scale("${u}", ${V(e,{expr:"datum"})} + ${e.bin.step})`,offset:w}}}q(ZO(g))}function qC({fieldDef:e,scaleName:t,bandPosition:n,offset:i,useRectOffsetField:r}){return Dh({scaleName:t,fieldOrDatumDef:e,bandPosition:n,offset:i,...r?{startSuffix:xg,endSuffix:vg}:{}})}const dre=new Set(["aria","width","height"]);function ni(e,t){const{fill:n=void 0,stroke:i=void 0}=t.color==="include"?BM(e):{};return{...hre(e.markDef,t),...WC("fill",n),...WC("stroke",i),...xt("opacity",e),...xt("fillOpacity",e),...xt("strokeOpacity",e),...xt("strokeWidth",e),...xt("strokeDash",e),...ire(e),...PM(e),...pE(e,"href"),...ere(e)}}function WC(e,t){return t?{[e]:t}:{}}function hre(e,t){return AZ.reduce((n,i)=>(!dre.has(i)&&j(e,i)&&t[i]!=="ignore"&&(n[i]=Be(e[i])),n),{})}function mE(e){const{config:t,markDef:n}=e,i=new Set;if(e.forEachFieldDef((r,s)=>{let o;if(!dr(s)||!(o=e.getScaleType(s)))return;const a=eg(r.aggregate),u=G2({scaleChannel:s,markDef:n,config:t,scaleType:o,isCountAggregate:a});if(Rte(u)){const l=e.vgField(s,{expr:"datum",binSuffix:e.stack?.impute?"mid":void 0});l&&i.add(l)}}),i.size>0)return{defined:{signal:[...i].map(s=>rg(s,!0)).join(" && ")}}}function GC(e,t){if(t!==void 0)return{[e]:Be(t)}}const J0="voronoi",jM={defined:e=>e.type==="point"&&e.nearest,parse:(e,t)=>{if(t.events)for(const n of t.events)n.markname=e.getName(J0)},marks:(e,t,n)=>{const{x:i,y:r}=t.project.hasChannel,s=e.mark;if(Us(s))return q(_Z(s)),n;const o={name:e.getName(J0),type:"path",interactive:!0,from:{data:e.getName("marks")},encode:{update:{fill:{value:"transparent"},strokeWidth:{value:.35},stroke:{value:"transparent"},isVoronoi:{value:!0},...PM(e,{reactiveGeom:!0})}},transform:[{type:"voronoi",x:{expr:i||!r?"datum.datum.x || 0":"0"},y:{expr:r||!i?"datum.datum.y || 0":"0"},size:[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]}]};let a=0,u=!1;
15return n.forEach((l,c)=>{const f=l.name??"";f===e.component.mark[0].name?a=c:f.includes(J0)&&(u=!0)}),u||n.splice(a+1,0,o),n}},qM={defined:e=>e.type==="point"&&e.resolve==="global"&&e.bind&&e.bind!=="scales"&&!oE(e.bind),parse:(e,t,n)=>JM(t,n),topLevelSignals:(e,t,n)=>{const i=t.name,r=t.project,s=t.bind,o=t.init&&t.init[0],a=jM.defined(t)?"(item().isVoronoi ? datum.datum : datum)":"datum";return r.items.forEach((u,l)=>{const c=je(`${i}_${u.field}`);n.filter(d=>d.name===c).length||n.unshift({name:c,...o?{init:No(o[l])}:{value:null},on:t.events?[{events:t.events,update:`datum && item().mark.marktype !== 'group' ? ${a}[${G(u.field)}] : null`}]:[],bind:s[u.field]??s[u.channel]??s})}),n},signals:(e,t,n)=>{const i=t.name,r=t.project,s=n.find(l=>l.name===i+Ir),o=i+ef,a=r.items.map(l=>je(`${i}_${l.field}`)),u=a.map(l=>`${l} !== null`).join(" && ");return a.length&&(s.update=`${u} ? {fields: ${o}, values: [${a.join(", ")}]} : null`),delete s.value,delete s.on,n}},Ih="_toggle",WM={defined:e=>e.type==="point"&&!Vi(e)&&!!e.toggle,signals:(e,t,n)=>n.concat({name:t.name+Ih,value:!1,on:[{events:t.events,update:t.toggle}]}),modifyExpr:(e,t)=>{const n=t.name+Ir,i=t.name+Ih;return`${i} ? null : ${n}, `+(t.resolve==="global"?`${i} ? null : true, `:`${i} ? null : {unit: ${mo(e)}}, `)+`${i} ? ${n} : null`}},pre={defined:e=>e.clear!==void 0&&e.clear!==!1&&!Vi(e),parse:(e,t)=>{t.clear&&(t.clear=Y(t.clear)?Ts(t.clear,"view"):t.clear)},topLevelSignals:(e,t,n)=>{if(qM.defined(t))for(const i of t.project.items){const r=n.findIndex(s=>s.name===je(`${t.name}_${i.field}`));r!==-1&&n[r].on.push({events:t.clear,update:"null"})}return n},signals:(e,t,n)=>{function i(r,s){r!==-1&&n[r].on&&n[r].on.push({events:t.clear,update:s})}if(t.type==="interval")for(const r of t.project.items){const s=n.findIndex(o=>o.name===r.signals.visual);if(i(s,"[0, 0]"),s===-1){const o=n.findIndex(a=>a.name===r.signals.data);i(o,"null")}}else{let r=n.findIndex(s=>s.name===t.name+Ir);i(r,"null"),WM.defined(t)&&(r=n.findIndex(s=>s.name===t.name+Ih),i(r,"false"))}return n}},GM={defined:e=>{const t=e.resolve==="global"&&e.bind&&oE(e.bind),n=e.project.items.length===1&&e.project.items[0].field!==Ai;return t&&!n&&q(OZ),t&&n},parse:(e,t,n)=>{const i=le(n);if(i.select=Y(i.select)?{type:i.select,toggle:t.toggle}:{...i.select,toggle:t.toggle},JM(t,i),X(n.select)&&(n.select.on||n.select.clear)){const o='event.item && indexof(event.item.mark.role, "legend") < 0';for(const a of t.events)a.filter=K(a.filter??[]),a.filter.includes(o)||a.filter.push(o)}const r=G0(t.bind)?t.bind.legend:"click",s=Y(r)?Ts(r,"view"):K(r);t.bind={legend:{merge:s}}},topLevelSignals:(e,t,n)=>{const i=t.name,r=G0(t.bind)&&t.bind.legend,s=o=>a=>{const u=le(a);return u.markname=o,u};for(const o of t.project.items){if(!o.hasLegend)continue;const a=`${je(o.field)}_legend`,u=`${i}_${a}`;if(n.filter(c=>c.name===u).length===0){const c=r.merge.map(s(`${a}_symbols`)).concat(r.merge.map(s(`${a}_labels`))).concat(r.merge.map(s(`${a}_entries`)));n.unshift({name:u,...t.init?{}:{value:null},on:[{events:c,update:"isDefined(datum.value) ? datum.value : item().items[0].items[0].datum.value",force:!0},{events:r.merge,update:`!event.item || !datum ? null : ${u}`,force:!0}]})}}return n},signals:(e,t,n)=>{const i=t.name,r=t.project,s=n.find(d=>d.name===i+Ir),o=i+ef,a=r.items.filter(d=>d.hasLegend).map(d=>je(`${i}_${je(d.field)}_legend`)),l=`${a.map(d=>`${d} !== null`).join(" && ")} ? {fields: ${o}, values: [${a.join(", ")}]} : null`;t.events&&a.length>0?s.on.push({events:a.map(d=>({signal:d})),update:l}):a.length>0&&(s.update=l,delete s.value,delete s.on);const c=n.find(d=>d.name===i+Ih),f=G0(t.bind)&&t.bind.legend;return c&&(t.events?c.on.push({...c.on[0],events:f}):c.on[0].events=f),n}};function gre(e,t,n){const i=e.fieldDef(t)?.field;for(const r of St(e.component.selection??{})){const s=r.project.hasField[i]??r.project.hasChannel[t];if(s&&GM.defined(r)){const o=n.get("selections")??[];o.push(r.name),n.set("selections",o,!1),s.hasLegend=!0}}}const HM="_translate_anchor",VM="_translate_delta",mre={defined:e=>e.type==="interval"&&e.translate,signals:(e,t,n)=>{const i=t.name,r=Or.defined(t),s=i+HM,{x:o,y:a}=t.project.hasChannel;let u=Ts(t.translate,"scope");return r||(u=u.map(l=>(l.between[0].markname=i+Ma,l))),n.push({name:s,value:{},on:[{events:u.map(l=>l.between[0]),update:"{x: x(unit), y: y(unit)"+(o!==void 0?`, extent_x: ${r?gy(e,qe):`slice(${o.signals.visual})`}`:"")+(a!==void 0?`, extent_y: ${r?gy(e,gt):`slice(${a.signals.visual})`}`:"")+"}"}]},{name:i+VM,value:{},on:[{events:u,update:`{x: ${s}
15.x - x(unit), y: ${s}.y - y(unit)}`}]}),o!==void 0&&HC(e,t,o,"width",n),a!==void 0&&HC(e,t,a,"height",n),n}};function HC(e,t,n,i,r){const s=t.name,o=s+HM,a=s+VM,u=n.channel,l=Or.defined(t),c=r.find(A=>A.name===n.signals[l?"data":"visual"]),f=e.getSizeSignalRef(i).signal,d=e.getScaleComponent(u),h=d&&d.get("type"),p=d&&d.get("reverse"),g=l?u===qe?p?"":"-":p?"-":"":"",m=`${o}.extent_${u}`,y=`${g}${a}.${u} / ${l?`${f}`:`span(${m})`}`,b=!l||!d?"panLinear":h==="log"?"panLog":h==="symlog"?"panSymlog":h==="pow"?"panPow":"panLinear",x=l?h==="pow"?`, ${d.get("exponent")??1}`:h==="symlog"?`, ${d.get("constant")??1}`:"":"",v=`${b}(${m}, ${y}${x})`;c.on.push({events:{signal:a},update:l?v:`clampRange(${v}, 0, ${f})`})}const XM="_zoom_anchor",YM="_zoom_delta",yre={defined:e=>e.type==="interval"&&e.zoom,signals:(e,t,n)=>{const i=t.name,r=Or.defined(t),s=i+YM,{x:o,y:a}=t.project.hasChannel,u=G(e.scaleName(qe)),l=G(e.scaleName(gt));let c=Ts(t.zoom,"scope");return r||(c=c.map(f=>(f.markname=i+Ma,f))),n.push({name:i+XM,on:[{events:c,update:r?"{"+[u?`x: invert(${u}, x(unit))`:"",l?`y: invert(${l}, y(unit))`:""].filter(f=>f).join(", ")+"}":"{x: x(unit), y: y(unit)}"}]},{name:s,on:[{events:c,force:!0,update:"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}]}),o!==void 0&&VC(e,t,o,"width",n),a!==void 0&&VC(e,t,a,"height",n),n}};function VC(e,t,n,i,r){const s=t.name,o=n.channel,a=Or.defined(t),u=r.find(b=>b.name===n.signals[a?"data":"visual"]),l=e.getSizeSignalRef(i).signal,c=e.getScaleComponent(o),f=c&&c.get("type"),d=a?gy(e,o):u.name,h=s+YM,p=`${s}${XM}.${o}`,g=!a||!c?"zoomLinear":f==="log"?"zoomLog":f==="symlog"?"zoomSymlog":f==="pow"?"zoomPow":"zoomLinear",m=a?f==="pow"?`, ${c.get("exponent")??1}`:f==="symlog"?`, ${c.get("constant")??1}`:"":"",y=`${g}(${d}, ${p}, ${h}${m})`;u.on.push({events:{signal:h},update:a?y:`clampRange(${y}, 0, ${l})`})}const Lo="_store",Ir="_tuple",bre="_modify",KM="vlSelectionResolve",Ag=[Wie,Qie,Uie,WM,qM,Or,GM,pre,mre,yre,jM];function xre(e){let t=e.parent;for(;t&&!Tn(t);)t=t.parent;return t}function mo(e,{escape:t}={escape:!0}){let n=t?G(e.name):e.name;const i=xre(e);if(i){const{facet:r}=i;for(const s of Wn)r[s]&&(n+=` + '__facet_${s}_' + (facet[${G(i.vgField(s))}])`)}return n}function yE(e){return St(e.component.selection??{}).reduce((t,n)=>t||n.project.hasSelectionId,!1)}function JM(e,t){(Y(t.select)||!t.select.on)&&delete e.events,(Y(t.select)||!t.select.clear)&&delete e.clear,(Y(t.select)||!t.select.toggle)&&delete e.toggle}function Vi(e){return e.events?.find(t=>"type"in t&&t.type==="timer")}const vre="RawCode",Ere="Literal",Are="Property",wre="Identifier",Sre="ArrayExpression",Cre="BinaryExpression",$re="CallExpression",Fre="ConditionalExpression",_re="LogicalExpression",kre="MemberExpression",Dre="ObjectExpression",Rre="UnaryExpression";function Ri(e){this.type=e}Ri.prototype.visit=function(e){let t,n,i;if(e(this))return 1;for(t=Ore(this),n=0,i=t.length;n<i;++n)if(t[n].visit(e))return 1};function Ore(e){switch(e.type){case Sre:return e.elements;case Cre:case _re:return[e.left,e.right];case $re:return[e.callee].concat(e.arguments);case Fre:return[e.test,e.consequent,e.alternate];case kre:return[e.object,e.property];case Dre:return e.properties;case Are:return[e.key,e.value];case Rre:return[e.argument];case wre:case Ere:case vre:default:return[]}}var pr,ee,N,zt,ke,wg=1,tf=2,Po=3,js=4,Sg=5,ea=6,fn=7,nf=8,Tre=9;pr={};pr[wg]="Boolean";pr[tf]="<end>";pr[Po]="Identifier";pr[js]="Keyword";pr[Sg]="Null";pr[ea]="Numeric";pr[fn]="Punctuator";pr[nf]="String";pr[Tre]="RegularExpression";var Mre="ArrayExpression",Nre="BinaryExpression",Lre="CallExpression",Pre="ConditionalExpression",QM="Identifier",Ire="Literal",Bre="LogicalExpression",zre="MemberExpression",Ure="ObjectExpression",jre="Property",qre="UnaryExpression",dt="Unexpected token %0",Wre="Unexpected number",Gre="Unexpected string",Hre="Unexpected identifier",Vre="Unexpected reserved word",Xre="Unexpected end of input",yy="Invalid regular expression",Q0="Invalid regular expression: missing /",ZM="Octal literals are not allowed in strict mode.",Yre="Duplicate data property in object literal not allowed in strict mode",At="ILLEGAL",uc="Disabled.",Kre=new RegExp("
vendor: 4,916 bytes, line 15
15[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]
15"),Jre=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC
157\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");function Cg(e,t){if(!e)throw new Error("ASSERT: "+t)}function Ar(e){return e>=48&&e<=57}function bE(e){return"0123456789abcdefABCDEF".includes(e)}function Pl(e){return"01234567".includes(e)}function Qre(e){return e===32||e===9||e===11||e===12||e===160||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e)}function lc(e){return e===10||e===13||e===8232||e===8233}function rf(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e===92||e>=128&&Kre.test(String.fromCharCode(e))}function Bh(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===92||e>=128&&Jre.test(String.fromCharCode(e))}const Zre={if:1,in:1,do:1,var:1,for:1,new:1,try:1,let:1,this:1,else:1,case:1,void:1,with:1,enum:1,while:1,break:1,catch:1,throw:1,const:1,yield:1,class:1,super:1,return:1,typeof:1,delete:1,switch:1,export:1,import:1,public:1,static:1,default:1,finally:1,extends:1,package:1,private:1,function:1,continue:1,debugger:1,interface:1,protected:1,instanceof:1,implements:1};function eN(){for(;N<zt;){const e=ee.charCodeAt(N);if(Qre(e)||lc(e))++N;else break}}function by(e){var t,n,i,r=0;for(n=e==="u"?4:2,t=0;t<n;++t)N<zt&&bE(ee[N])?(i=ee[N++],r=r*16+"0123456789abcdef".indexOf(i.toLowerCase())):we({},dt,At);return String.fromCharCode(r)}function ese(){var e,t,n,i;for(e=ee[N],t=0,e==="}"&&we({},dt,At);N<zt&&(e=ee[N++],!!bE(e));)t=t*16+"0123456789abcdef".indexOf(e.toLowerCase());return(t>1114111||e!=="}")&&we({},dt,At),t<=65535?String.fromCharCode(t):(n=(t-65536>>10)+55296,i=(t-65536&1023)+56320,String.fromCharCode(n,i))}function tN(){var e,t;for(e=ee.charCodeAt(N++),t=String.fromCharCode(e),e===92&&(ee.charCodeAt(N)!==117&&we({},dt,At),++N,e=by("u"),(!e||e==="\\"||!rf(e.charCodeAt(0)))&&we({},dt,At),t=e);N<zt&&(e=ee.charCodeAt(N),!!Bh(e));)++N,t+=String.fromCharCode(e),e===92&&(t=t.substr(0,t.length-1),ee.charCodeAt(N)!==117&&we({},dt,At),++N,e=by("u"),(!e||e==="\\"||!Bh(e.charCodeAt(0)))&&we({},dt,At),t+=e);return t}function tse(){var e,t;for(e=N++;N<zt;){if(t=ee.charCodeAt(N),t===92)return N=e,tN();if(Bh(t))++N;else break}return ee.slice(e,N)}function nse(){var e,t,n;return e=N,t=ee.charCodeAt(N)===92?tN():tse(),t.length===1?n=Po:Zre.hasOwnProperty(t)?n=js:t==="null"?n=Sg:t==="true"||t==="false"?n=wg:n=Po,{type:n,value:t,start:e,end:N}}function Z0(){var e=N,t=ee.charCodeAt(N),n,i=ee[N],r,s,o;switch(t){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++N,{type:fn,value:String.fromCharCode(t),start:e,end:N};default:if(n=ee.charCodeAt(N+1),n===61)switch(t){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return N+=2,{type:fn,value:String.fromCharCode(t)+String.fromCharCode(n),start:e,end:N};case 33:case 61:return N+=2,ee.charCodeAt(N)===61&&++N,{type:fn,value:ee.slice(e,N),start:e,end:N}}}if(o=ee.substr(N,4),o===">>>=")return N+=4,{type:fn,value:o,start:e,end:N};if(s=o.substr(0,3),s===">>>"||s==="<<="||s===">>=")return N+=3,{type:fn,value:s,start:e,end:N};if(r=s.substr(0,2),i===r[1]&&"+-<>&|".includes(i)||r==="=>")return N+=2,{type:fn,value:r,start:e,end:N};if(r==="//"&&we({},dt,At),"<>=!+-*%&|^/".includes(i))return++N,{type:fn,value:i,start:e,end:N};we({},dt,At)}function ise(e){let t="";for(;N<zt&&bE(ee[N]);)t+=ee[N++];return t.length===0&&we({},dt,At),rf(ee.charCodeAt(N))&&we({},dt,At),{type:ea,value:parseInt("0x"+t,16),start:e,end:N}}function rse(e){let t="0"+ee[N++];for(;N<zt&&Pl(ee[N]);)t+=ee[N++];return(rf(ee.charCodeAt(N))||Ar(ee.charCodeAt(N)))&&we({},dt,At),{type:ea,value:parseInt(t,8),octal:!0,start:e,end:N}}function XC(){var e,t,n;if(n=ee[N],Cg(Ar(n.charCodeAt(0))||n===".","Numeric literal must start with a decimal digit or a decimal point"),t=N,e="",n!=="."){if(e=ee[N++],n=ee[N],e==="0"){if(n==="x"||n==="X")return++N,ise(t);if(Pl(n))return rse(t);n&&Ar(n.charCodeAt(0))&&we({},dt,At)}for(;Ar(ee.charCodeAt(N));)e+=ee[N++];n=ee[N]}if(n==="."){for(e+=ee[N++];Ar(ee.charCodeAt(N));)e+=ee[N++];n=ee[N]}if(n==="e"||n==="E")if(e+=ee[N++],n=ee[N],(n==="+"||n==="-")&&(e+=ee[N++]),Ar(ee.charCodeAt(N)))for(;Ar(ee.charCodeAt(N));)e+=ee[N++];else we({},dt,At);return rf(ee.charCodeAt(N))&&we({},dt,At),{type:ea,value:parseFloat(e),start:t,end:N}}function sse(){var e="",t,n,i,r,s=!1;for(t=ee[N],Cg(t==="'"||t==='"',"String literal must starts with a quote"),n=N,++N;N<zt;)if(i=ee[N++],i===t){t="";break}else if(i==="\\")if(i=ee[N++],!i||!lc(i.charCodeAt(0)))switch(i){case"u":case"x":ee[N]==="{"?(++N,e+=ese()):e+=by(i);break;case"n":e+=`
16`;break;case"r":e+="\r";break;case"t":e+="	";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:Pl(i)?(r="01234567".indexOf(i),r!==0&&(s=!0),N<zt&&Pl(ee[N])&&(s=!0,r=r*8+"01234567".indexOf(ee[N++]),"0123".includes(i)&&N<zt&&Pl(ee[N])&&(r=r*8+"01234567".indexOf(ee[N++]))),e+=String.fromCharCode(r)):e+=i;break}else i==="\r"&&ee[N]===`
17`&&++N;else{if(lc(i.charCodeAt(0)))break;e+=i}return t!==""&&we({},dt,At),{type:nf,value:e,octal:s,start:n,end:N}}function ose(e,t){let n=e;t.includes("u")&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}/g,(i,r)=>{if(parseInt(r,16)<=1114111)return"x";we({},yy)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch{we({},yy)}try{return new RegExp(e,t)}catch{return null}}function ase(){var e,t,n,i,r;for(e=ee[N],Cg(e==="/","Regular expression literal must start with a slash"),t=ee[N++],n=!1,i=!1;N<zt;
17)if(e=ee[N++],t+=e,e==="\\")e=ee[N++],lc(e.charCodeAt(0))&&we({},Q0),t+=e;else if(lc(e.charCodeAt(0)))we({},Q0);else if(n)e==="]"&&(n=!1);else if(e==="/"){i=!0;break}else e==="["&&(n=!0);return i||we({},Q0),r=t.substr(1,t.length-2),{value:r,literal:t}}function use(){var e,t,n;for(t="",n="";N<zt&&(e=ee[N],!!Bh(e.charCodeAt(0)));)++N,e==="\\"&&N<zt?we({},dt,At):(n+=e,t+=e);return n.search(/[^gimuy]/g)>=0&&we({},yy,n),{value:n,literal:t}}function lse(){var e,t,n,i;return ke=null,eN(),e=N,t=ase(),n=use(),i=ose(t.value,n.value),{literal:t.literal+n.literal,value:i,regex:{pattern:t.value,flags:n.value},start:e,end:N}}function cse(e){return e.type===Po||e.type===js||e.type===wg||e.type===Sg}function nN(){if(eN(),N>=zt)return{type:tf,start:N,end:N};const e=ee.charCodeAt(N);return rf(e)?nse():e===40||e===41||e===59?Z0():e===39||e===34?sse():e===46?Ar(ee.charCodeAt(N+1))?XC():Z0():Ar(e)?XC():Z0()}function pn(){const e=ke;return N=e.end,ke=nN(),N=e.end,e}function iN(){const e=N;ke=nN(),N=e}function fse(e){const t=new Ri(Mre);return t.elements=e,t}function YC(e,t,n){const i=new Ri(e==="||"||e==="&&"?Bre:Nre);return i.operator=e,i.left=t,i.right=n,i}function dse(e,t){const n=new Ri(Lre);return n.callee=e,n.arguments=t,n}function hse(e,t,n){const i=new Ri(Pre);return i.test=e,i.consequent=t,i.alternate=n,i}function xE(e){const t=new Ri(QM);return t.name=e,t}function vl(e){const t=new Ri(Ire);return t.value=e.value,t.raw=ee.slice(e.start,e.end),e.regex&&(t.raw==="//"&&(t.raw="/(?:)/"),t.regex=e.regex),t}function KC(e,t,n){const i=new Ri(zre);return i.computed=e==="[",i.object=t,i.property=n,i.computed||(n.member=!0),i}function pse(e){const t=new Ri(Ure);return t.properties=e,t}function JC(e,t,n){const i=new Ri(jre);return i.key=t,i.value=n,i.kind=e,i}function gse(e,t){const n=new Ri(qre);return n.operator=e,n.argument=t,n.prefix=!0,n}function we(e,t){var n,i=Array.prototype.slice.call(arguments,2),r=t.replace(/%(\d)/g,(s,o)=>(Cg(o<i.length,"Message reference must be in range"),i[o]));throw n=new Error(r),n.index=N,n.description=r,n}function $g(e){e.type===tf&&we(e,Xre),e.type===ea&&we(e,Wre),e.type===nf&&we(e,Gre),e.type===Po&&we(e,Hre),e.type===js&&we(e,Vre),we(e,dt,e.value)}function Ut(e){const t=pn();(t.type!==fn||t.value!==e)&&$g(t)}function ze(e){return ke.type===fn&&ke.value===e}function em(e){return ke.type===js&&ke.value===e}function mse(){const e=[];for(N=ke.start,Ut("[");!ze("]");)ze(",")?(pn(),e.push(null)):(e.push(Io()),ze("]")||Ut(","));return pn(),fse(e)}function QC(){N=ke.start;const e=pn();return e.type===nf||e.type===ea?(e.octal&&we(e,ZM),vl(e)):xE(e.value)}function yse(){var e,t,n,i;if(N=ke.start,e=ke,e.type===Po)return n=QC(),Ut(":"),i=Io(),JC("init",n,i);if(e.type===tf||e.type===fn)$g(e);else return t=QC(),Ut(":"),i=Io(),JC("init",t,i)}function bse(){var e=[],t,n,i,r={},s=String;for(N=ke.start,Ut("{");!ze("}");)t=yse(),t.key.type===QM?n=t.key.name:n=s(t.key.value),i="$"+n,Object.prototype.hasOwnProperty.call(r,i)?we({},Yre):r[i]=!0,e.push(t),ze("}")||Ut(",");return Ut("}"),pse(e)}function xse(){Ut("(");const e=vE();return Ut(")"),e}const vse={if:1};function Ese(){var e,t,n;if(ze("("))return xse();if(ze("["))return mse();if(ze("{"))return bse();if(e=ke.type,N=ke.start,e===Po||vse[ke.value])n=xE(pn().value);else if(e===nf||e===ea)ke.octal&&we(ke,ZM),n=vl(pn());else{if(e===js)throw new Error(uc);e===wg?(t=pn(),t.value=t.value==="true",n=vl(t)):e===Sg?(t=pn(),t.value=null,n=vl(t)):ze("/")||ze("/=")?(n=vl(lse()),iN()):$g(pn())}return n}function Ase(){const e=[];if(Ut("("),!ze(")"))for(;N<zt&&(e.push(Io()),!ze(")"));)Ut(",");return Ut(")"),e}function wse(){N=ke.start;const e=pn();return cse(e)||$g(e),xE(e.value)}function Sse(){return Ut("."),wse()}function Cse(){Ut("[");const e=vE();return Ut("]"),e}function $se(){var e,t,n;for(e=Ese();;)if(ze("."))n=Sse(),e=KC(".",e,n);else if(ze("("))t=Ase(),e=dse(e,t);else if(ze("["))n=Cse(),e=KC("[",e,n);else break;return e}function ZC(){const e=$se();if(ke.type===fn&&(ze("++")||ze("--")))throw new Error(uc);return e}function vd(){var e,t;if(ke.type!==fn&&ke.type!==js)t=ZC();else{if(ze("++")||ze("--"))throw new Error(uc);if(ze("+")||ze("-")||ze("~")||ze("!"))e=pn(),t=vd(),t=gse(e.value,t);else{if(em("delete")||em("void")||em("typeof"))throw new Error(uc);t=ZC()}}return t}function e$(e){let t=0;if(e.type!==fn&&e.type!==js)return 0;switch(e.value){case"||":t=1;break;case"&&":t=2;break;case"|":t=3;break;case"^":t=4;break;case"&":t=5;break;case"==":case"!=":case"===":case"!==":t=6;break;case"<":case">":case"<=":case">=":case"instanceof":case"in":t=7;break;case"<<":case">>":case">>>":t=8;break;case"+":case"-":t=9;break;case"*":case"/":case"%":t=11;break}return t}function Fse(){var e,t,n,i,r,s,o,a,u,l;if(e=ke,u=vd(),i=ke,r=e$(i),r===0)return u;for(i.prec=r,pn(),t=[e,ke],o=vd(),s=[u,i,o];(r=e$(ke))>0;){for(;s.length>2&&r<=s[s.length-2].prec;)o=s.pop(),a=s.pop().value,u=s.pop(),t.pop(),n=YC(a,u,o),s.push(n);i=pn(),i.prec=r,s.push(i),t.push(ke),n=vd(),s.push(n)}for(l=s.length-1,n=s[l],t.pop();l>1;)t.pop(),n=YC(s[l-1].value,s[l-2],n),l-=2;return n}function Io(){var e,t,n;
17return e=Fse(),ze("?")&&(pn(),t=Io(),Ut(":"),n=Io(),e=hse(e,t,n)),e}function vE(){const e=Io();if(ze(","))throw new Error(uc);return e}function _se(e){ee=e,N=0,zt=ee.length,ke=null,iN();const t=vE();if(ke.type!==tf)throw new Error("Unexpect token after expression.");return t}function xy(e){const t=[];return e.type==="Identifier"?[e.name]:e.type==="Literal"?[e.value]:(e.type==="MemberExpression"&&(t.push(...xy(e.object)),t.push(...xy(e.property))),t)}function rN(e){return e.object.type==="MemberExpression"?rN(e.object):e.object.name==="datum"}function sN(e){const t=_se(e),n=new Set;return t.visit(i=>{i.type==="MemberExpression"&&rN(i)&&n.add(xy(i).slice(1).join("."))}),n}class _u extends De{clone(){return new _u(null,this.model,le(this.filter))}constructor(t,n,i){super(t),this.model=n,this.filter=i,this.expr=zh(this.model,this.filter,this),this._dependentFields=sN(this.expr)}dependentFields(){return this._dependentFields}producedFields(){return new Set}assemble(){return{type:"filter",expr:this.expr}}hash(){return`Filter ${this.expr}`}}function kse(e,t){const n={},i=e.config.selection;if(!t||!t.length)return n;let r=0;for(const s of t){const o=je(s.name),a=s.select,u=Y(a)?a:a.type,l=X(a)?le(a):{type:u},c=i[u];for(const h in c)h==="fields"||h==="encodings"||(h==="mark"&&(l.mark={...c.mark,...l.mark}),(l[h]===void 0||l[h]===!0)&&(l[h]=le(c[h]??l[h])));const f=n[o]={...l,name:o,type:u,init:s.value,bind:s.bind,events:Y(l.on)?Ts(l.on,"scope"):K(le(l.on))};if(Vi(f)&&(r++,r>1)){delete n[o];continue}const d=le(s);for(const h of Ag)h.defined(f)&&h.parse&&h.parse(e,f,d)}return r>1&&q(IZ),n}function oN(e,t,n,i="datum"){const r=Y(t)?t:t.param,s=je(r),o=G(s+Lo);let a;try{a=e.getSelectionComponent(s,r)}catch{return`!!${s}`}if(a.project.timeUnit){const d=n??e.component.data.raw,h=a.project.timeUnit.clone();d.parent?h.insertAsParentOf(d):d.parent=h}const u=a.project.hasSelectionId?"vlSelectionIdTest(":"vlSelectionTest(",l=a.resolve==="global"?")":`, ${G(a.resolve)})`,c=`${u}${o}, ${i}${l}`,f=`length(data(${o}))`;return t.empty===!1?`${f} && ${c}`:`!${f} || ${c}`}function aN(e,t,n){const i=je(t),r=n.encoding;let s=n.field,o;try{o=e.getSelectionComponent(i,t)}catch{return i}if(!r&&!s)s=o.project.items[0].field,o.project.items.length>1&&q(BZ(s));else if(r&&!s){const a=o.project.items.filter(u=>u.channel===r);!a.length||a.length>1?(s=o.project.items[0].field,q(zZ(a,r,n,s))):s=a[0].field}return`${o.name}[${G(Qn(s))}]`}function Dse(e,t){for(const[n,i]of $s(e.component.selection??{})){const r=e.getName(`lookup_${n}`);e.component.data.outputNodes[r]=i.materialized=new mn(new _u(t,e,{param:n}),r,He.Lookup,e.component.data.outputNodeRefCounts)}}function zh(e,t,n){return Nl(t,i=>Y(i)?i:Yee(i)?oN(e,i,n):fT(i))}function Rse(e,t){if(e)return I(e)&&!is(e)?e.map(n=>Q2(n,t)).join(", "):e}function tm(e,t,n,i){var r,s;e.encode??(e.encode={}),(r=e.encode)[t]??(r[t]={}),(s=e.encode[t]).update??(s.update={}),e.encode[t].update[n]=i}function El(e,t,n,i={header:!1}){const{disable:r,orient:s,scale:o,labelExpr:a,title:u,zindex:l,...c}=e.combine();if(!r){for(const f in c){const d=f,h=ene[d],p=c[d];if(h&&h!==t&&h!=="both")delete c[d];else if(Zc(p)){const{condition:g,...m}=p,y=K(g),b=EC[d];if(b){const{vgProp:x,part:v}=b,A=[...y.map(w=>{const{test:E,...S}=w;return{test:zh(null,E),...S}}),m];tm(c,v,x,A),delete c[d]}else if(b===null){const x={signal:y.map(v=>{const{test:A,...w}=v;return`${zh(null,A)} ? ${sC(w)} : `}).join("")+sC(m)};c[d]=x}}else if(te(p)){const g=EC[d];if(g){const{vgProp:m,part:y}=g;tm(c,y,m,p),delete c[d]}}ye(["labelAlign","labelBaseline"],d)&&c[d]===null&&delete c[d]}if(t==="grid"){if(!c.grid)return;if(c.encode){const{grid:f}=c.encode;c.encode={...f?{grid:f}:{}},Oe(c.encode)&&delete c.encode}return{scale:o,orient:s,...c,domain:!1,labels:!1,aria:!1,maxExtent:0,minExtent:0,ticks:!1,zindex:Qe(l,0)}}else{if(!i.header&&e.mainExtracted)return;if(a!==void 0){let d=a;c.encode?.labels?.update&&te(c.encode.labels.update.text)&&(d=_o(a,"datum.label",c.encode.labels.update.text.signal)),tm(c,"labels","text",{signal:d})}if(c.labelAlign===null&&delete c.labelAlign,c.encode){for(const d of jT)e.hasAxisPart(d)||delete c.encode[d];Oe(c.encode)&&delete c.encode}const f=Rse(u,n);return{scale:o,orient:s,grid:!1,...f?{title:f}:{},...c,...n.aria===!1?{aria:!1}:{},zindex:Qe(l,0)}}}}function uN(e){const{axes:t}=e.component,n=[];for(const i of Gr)if(t[i]){for(const r of t[i])if(!r.get("disable")&&!r.get("gridScale")){const s=i==="x"?"height":"width",o=e.getSizeSignalRef(s).signal;s!==o&&n.push({name:s,update:o})}}return n}function Ose(e,t){const{x:n=[],y:i=[]}=e;return[...n.map(r=>El(r,"grid",t)),...i.map(r=>El(r,"grid",t)),...n.map(r=>El(r,"main",t)),...i.map(r=>El(r,"main",t))].filter(r=>r)}function t$(e,t,n,i){return Object.assign.apply(null,[{},...e.map(r=>{if(r==="axisOrient"){const s=n==="x"?"bottom":"left",o=t[n==="x"?"axisBottom":"axisLeft"]||{}
17,a=t[n==="x"?"axisTop":"axisRight"]||{},u=new Set([...U(o),...U(a)]),l={};for(const c of u.values())l[c]={signal:`${i.signal} === "${s}" ? ${di(o[c])} : ${di(a[c])}`};return l}return t[r]})])}function Tse(e,t,n,i){const r=t==="band"?["axisDiscrete","axisBand"]:t==="point"?["axisDiscrete","axisPoint"]:gT(t)?["axisQuantitative"]:t==="time"||t==="utc"?["axisTemporal"]:[],s=e==="x"?"axisX":"axisY",o=te(n)?"axisOrient":`axis${jc(n)}`,a=[...r,...r.map(l=>s+l.substr(4))],u=["axis",o,s];return{vlOnlyAxisConfig:t$(a,i,e,n),vgAxisConfig:t$(u,i,e,n),axisConfigStyle:Mse([...u,...a],i)}}function Mse(e,t){const n=[{}];for(const i of e){let r=t[i]?.style;if(r){r=K(r);for(const s of r)n.push(t.style[s])}}return Object.assign.apply(null,n)}function vy(e,t,n,i={}){const r=qO(e,n,t);if(r!==void 0)return{configFrom:"style",configValue:r};for(const s of["vlOnlyAxisConfig","vgAxisConfig","axisConfigStyle"])if(i[s]?.[e]!==void 0)return{configFrom:s,configValue:i[s][e]};return{}}const n$={scale:({model:e,channel:t})=>e.scaleName(t),format:({format:e})=>e,formatType:({formatType:e})=>e,grid:({fieldOrDatumDef:e,axis:t,scaleType:n})=>t.grid??Nse(n,e),gridScale:({model:e,channel:t})=>Lse(e,t),labelAlign:({axis:e,labelAngle:t,orient:n,channel:i})=>e.labelAlign||cN(t,n,i),labelAngle:({labelAngle:e})=>e,labelBaseline:({axis:e,labelAngle:t,orient:n,channel:i})=>e.labelBaseline||lN(t,n,i),labelFlush:({axis:e,fieldOrDatumDef:t,channel:n})=>e.labelFlush??Ise(t.type,n),labelOverlap:({axis:e,fieldOrDatumDef:t,scaleType:n})=>e.labelOverlap??Bse(t.type,n,W(t)&&!!t.timeUnit,W(t)?t.sort:void 0),orient:({orient:e})=>e,tickCount:({channel:e,model:t,axis:n,fieldOrDatumDef:i,scaleType:r})=>{const s=e==="x"?"width":e==="y"?"height":void 0,o=s?t.getSizeSignalRef(s):void 0;return n.tickCount??Use({fieldOrDatumDef:i,scaleType:r,size:o,values:n.values})},tickMinStep:jse,title:({axis:e,model:t,channel:n})=>{if(e.title!==void 0)return e.title;const i=fN(t,n);if(i!==void 0)return i;const r=t.typedFieldDef(n),s=n==="x"?"x2":"y2",o=t.fieldDef(s);return GO(r?[xC(r)]:[],W(o)?[xC(o)]:[])},values:({axis:e,fieldOrDatumDef:t})=>qse(e,t),zindex:({axis:e,fieldOrDatumDef:t,mark:n})=>e.zindex??Wse(n,t)};function Nse(e,t){return!pt(e)&&W(t)&&!Le(t?.bin)&&!mt(t?.bin)}function Lse(e,t){const n=t==="x"?"y":"x";if(e.getScaleComponent(n))return e.scaleName(n)}function Pse(e,t,n,i,r){const s=t?.labelAngle;if(s!==void 0)return te(s)?s:sc(s);{const{configValue:o}=vy("labelAngle",i,t?.style,r);return o!==void 0?sc(o):n===qe&&ye([z2,B2],e.type)&&!(W(e)&&e.timeUnit)?270:void 0}}function Ey(e){return`(((${e.signal} % 360) + 360) % 360)`}function lN(e,t,n,i){if(e!==void 0)if(n==="x"){if(te(e)){const r=Ey(e),s=te(t)?`(${t.signal} === "top")`:t==="top";return{signal:`(45 < ${r} && ${r} < 135) || (225 < ${r} && ${r} < 315) ? "middle" :(${r} <= 45 || 315 <= ${r}) === ${s} ? "bottom" : "top"`}}if(45<e&&e<135||225<e&&e<315)return"middle";if(te(t)){const r=e<=45||315<=e?"===":"!==";return{signal:`${t.signal} ${r} "top" ? "bottom" : "top"`}}return(e<=45||315<=e)==(t==="top")?"bottom":"top"}else{if(te(e)){const r=Ey(e),s=te(t)?`(${t.signal} === "left")`:t==="left";return{signal:`${r} <= 45 || 315 <= ${r} || (135 <= ${r} && ${r} <= 225) ? ${i?'"middle"':"null"} : (45 <= ${r} && ${r} <= 135) === ${s} ? "top" : "bottom"`}}if(e<=45||315<=e||135<=e&&e<=225)return i?"middle":null;if(te(t)){const r=45<=e&&e<=135?"===":"!==";return{signal:`${t.signal} ${r} "left" ? "top" : "bottom"`}}return(45<=e&&e<=135)==(t==="left")?"top":"bottom"}}function cN(e,t,n){if(e===void 0)return;const i=n==="x",r=i?0:90,s=i?"bottom":"left";if(te(e)){const o=Ey(e),a=te(t)?`(${t.signal} === "${s}")`:t===s;return{signal:`(${r?`(${o} + 90)`:o} % 180 === 0) ? ${i?null:'"center"'} :(${r} < ${o} && ${o} < ${180+r}) === ${a} ? "left" : "right"`}}if((e+r)%180===0)return i?null:"center";if(te(t)){const o=r<e&&e<180+r?"===":"!==";return{signal:`${`${t.signal} ${o} "${s}"`} ? "left" : "right"`}}return(r<e&&e<180+r)==(t===s)?"left":"right"}function Ise(e,t){if(t==="x"&&ye(["quantitative","temporal"],e))return!0}function Bse(e,t,n,i){if(n&&!X(i)||e!=="nominal"&&e!=="ordinal")return t==="log"||t==="symlog"?"greedy":!0}function zse(e){return e==="x"?"bottom":"left"}function Use({fieldOrDatumDef:e,scaleType:t,size:n,values:i}){if(!i&&!pt(t)&&t!=="log"){if(W(e)){if(Le(e.bin))return{signal:`ceil(${n.signal}/10)`};if(e.timeUnit&&ye(["month","hours","day","quarter"],ht(e.timeUnit)?.unit))return}return{signal:`ceil(${n.signal}/40)`}}}function jse({format:e,fieldOrDatumDef:t}){if(e==="d")return 1;if(W(t)){const{timeUnit:n}=t;if(n){const i=uT(n);if(i)return{signal:i}}}}
17function fN(e,t){const n=t==="x"?"x2":"y2",i=e.fieldDef(t),r=e.fieldDef(n),s=i?i.title:void 0,o=r?r.title:void 0;if(s&&o)return HO(s,o);if(s)return s;if(o)return o;if(s!==void 0)return s;if(o!==void 0)return o}function qse(e,t){const n=e.values;if(I(n))return UT(t,n);if(te(n))return n}function Wse(e,t){return e==="rect"&&Oh(t)?1:0}class ou extends De{clone(){return new ou(null,le(this.transform))}constructor(t,n){super(t),this.transform=n,this._dependentFields=sN(this.transform.calculate)}static parseAllForSortIndex(t,n){return n.forEachFieldDef((i,r)=>{if(Zo(i)&&RT(i.sort)){const{field:s,timeUnit:o}=i,a=i.sort,u=a.map((l,c)=>`${fT({field:s,timeUnit:o,equal:l})} ? ${c} : `).join("")+a.length;t=new ou(t,{calculate:u,as:au(i,r,{forAs:!0})})}}),t}producedFields(){return new Set([this.transform.as])}dependentFields(){return this._dependentFields}assemble(){return{type:"formula",expr:this.transform.calculate,as:this.transform.as}}hash(){return`Calculate ${be(this.transform)}`}}function au(e,t,n){return V(e,{prefix:t,suffix:"sort_index",...n})}function Fg(e,t){return ye(["top","bottom"],t)?"column":ye(["left","right"],t)||e==="row"?"row":"column"}function uu(e,t,n,i){const r=i==="row"?n.headerRow:i==="column"?n.headerColumn:n.headerFacet;return Qe((t||{})[e],r[e],n.header[e])}function _g(e,t,n,i){const r={};for(const s of e){const o=uu(s,t||{},n,i);o!==void 0&&(r[s]=o)}return r}const EE=["row","column"],AE=["header","footer"];function Gse(e,t){const n=e.component.layoutHeaders[t].title,i=e.config?e.config:void 0,r=e.component.layoutHeaders[t].facetFieldDef?e.component.layoutHeaders[t].facetFieldDef:void 0,{titleAnchor:s,titleAngle:o,titleOrient:a}=_g(["titleAnchor","titleAngle","titleOrient"],r.header,i,t),u=Fg(t,a),l=sc(o);return{name:`${t}-title`,type:"group",role:`${u}-title`,title:{text:n,...t==="row"?{orient:"left"}:{},style:"guide-title",...hN(l,u),...dN(u,l,s),...pN(i,r,t,Ane,oM)}}}function dN(e,t,n="middle"){switch(n){case"start":return{align:"left"};case"end":return{align:"right"}}const i=cN(t,e==="row"?"left":"top",e==="row"?"y":"x");return i?{align:i}:{}}function hN(e,t){const n=lN(e,t==="row"?"left":"top",t==="row"?"y":"x",!0);return n?{baseline:n}:{}}function Hse(e,t){const n=e.component.layoutHeaders[t],i=[];for(const r of AE)if(n[r])for(const s of n[r]){const o=Xse(e,t,r,n,s);o!=null&&i.push(o)}return i}function Vse(e,t){const{sort:n}=e;return Rr(n)?{field:V(n,{expr:"datum"}),order:n.order??"ascending"}:I(n)?{field:au(e,t,{expr:"datum"}),order:"ascending"}:{field:V(e,{expr:"datum"}),order:n??"ascending"}}function Ay(e,t,n){const{format:i,formatType:r,labelAngle:s,labelAnchor:o,labelOrient:a,labelExpr:u}=_g(["format","formatType","labelAngle","labelAnchor","labelOrient","labelExpr"],e.header,n,t),l=X2({fieldOrDatumDef:e,format:i,formatType:r,expr:"parent",config:n}).signal,c=Fg(t,a);return{text:{signal:u?_o(_o(u,"datum.label",l),"datum.value",V(e,{expr:"parent"})):l},...t==="row"?{orient:"left"}:{},style:"guide-label",frame:"group",...hN(s,c),...dN(c,s,o),...pN(n,e,t,wne,aM)}}function Xse(e,t,n,i,r){if(r){let s=null;const{facetFieldDef:o}=i,a=e.config?e.config:void 0;if(o&&r.labels){const{labelOrient:f}=_g(["labelOrient"],o.header,a,t);(t==="row"&&!ye(["top","bottom"],f)||t==="column"&&!ye(["left","right"],f))&&(s=Ay(o,t,a))}const u=Tn(e)&&!Yc(e.facet),l=r.axes,c=l?.length>0;if(s||c){const f=t==="row"?"height":"width";return{name:e.getName(`${t}_${n}`),type:"group",role:`${t}-${n}`,...i.facetFieldDef?{from:{data:e.getName(`${t}_domain`)},sort:Vse(o,t)}:{},...c&&u?{from:{data:e.getName(`facet_domain_${t}`)}}:{},...s?{title:s}:{},...r.sizeSignal?{encode:{update:{[f]:r.sizeSignal}}}:{},...c?{axes:l}:{}}}}return null}const Yse={column:{start:0,end:1},row:{start:1,end:0}};function Kse(e,t){return Yse[t][e]}function Jse(e,t){const n={};for(const i of Wn){const r=e[i];if(r?.facetFieldDef){const{titleAnchor:s,titleOrient:o}=_g(["titleAnchor","titleOrient"],r.facetFieldDef.header,t,i),a=Fg(i,o),u=Kse(s,a);u!==void 0&&(n[a]=u)}}return Oe(n)?void 0:n}function pN(e,t,n,i,r){const s={};for(const o of i){if(!r[o])continue;const a=uu(o,t?.header,e,n);a!==void 0&&(s[r[o]]=a)}return s}function wE(e){return[...If(e,"width"),...If(e,"height"),...If(e,"childWidth"),...If(e,"childHeight")]}function If(e,t){const n=t==="width"?"x":"y",i=e.component.layoutSize.get(t);if(!i||i==="merged")return[];const r=e.getSizeSignalRef(t).signal;if(i==="step"){const s=e.getScaleComponent(n);if(s){const o=s.get("type"),a=s.get("range");if(pt(o)&&Ko(a)){const u=e.scaleName(n);return Tn(e.parent)&&e.parent.component.resolve.scale[n]==="independent"?[i$(u,a)]:[i$(u,a),{name:r,update:gN(u,s,`domain('${u}').length`)}]}}throw new Error("layout size is step although width/height is not step.")}else if(i=="container"){const s=r.endsWith("width"),o=s?"containerSize()[0]":"containerSize()[1]",a=ly(e.config.view,s?"width":"height"),u=`isFinite(${o}) ? ${o} : ${a}`;return[{name:r,init:u,on:[{update:u,events:"window:resize"}]}]}else return[{name:r,value:i}]}function i$(e,t){const n=`${e}_step`;return te(t.step)?{name:n,update:t.step.signal}:{name:n,value:t.step}}function gN(e,t,n){const i=t.get("type"),r=t.get("padding"),s=Qe(t.get("paddingOuter"),r);let o=t.get("paddingInner");return o=i==="band"?o!==void 0?o:r:1,`bandspace(${n}, ${di(o)}, ${di(s)}) * ${e}_step`}function mN(e){return e==="childWidth"?"width":e==="childHeight"?"height":e}function yN(e,t){return U(e).reduce((n,i)=>({...n,...Fu({model:t,channelDef:e[i],vgChannel:i,mainRefFn:r=>Be(r.value),invalidValueRef:void 0})}),{})}function bN(e,t){if(Tn(t))return e==="theta"?"independent":"shared";if(Ru(t))return"shared";if(DE(t))return Ze(e)||e==="theta"||e==="radius"?"independent":"shared";throw new Error("invalid model type for resolve")}function SE(e,t){const n=e.scale[t],i=Ze(t)?"axis":"legend";return n==="independent"?(e[i][t]==="shared"&&q(yee(t)),"independent"):e[i][t]||"shared"}const Qse={...$ne,disable:1,labelExpr:1,selections:1,opacity:1,shape:1,stroke:1,fill:1,size:1,strokeWidth:1,strokeDash:1,encode:1},xN=U(Qse);class Zse extends Vr{}
17const r$={symbols:eoe,gradient:toe,labels:noe,entries:ioe};function eoe(e,{fieldOrDatumDef:t,model:n,channel:i,legendCmpt:r,legendType:s}){if(s!=="symbol")return;const{markDef:o,encoding:a,config:u,mark:l}=n,c=o.filled&&l!=="trail";let f={...CZ({},n,Ete),...BM(n,{filled:c})};const d=r.get("symbolOpacity")??u.legend.symbolOpacity,h=r.get("symbolFillColor")??u.legend.symbolFillColor,p=r.get("symbolStrokeColor")??u.legend.symbolStrokeColor,g=d===void 0?vN(a.opacity)??o.opacity:void 0;if(f.fill){if(i==="fill"||c&&i===vn)delete f.fill;else if(j(f.fill,"field"))h?delete f.fill:(f.fill=Be(u.legend.symbolBaseFillColor??"black"),f.fillOpacity=Be(g??1));else if(I(f.fill)){const m=wy(a.fill??a.color)??o.fill??(c&&o.color);m&&(f.fill=Be(m))}}if(f.stroke){if(i==="stroke"||!c&&i===vn)delete f.stroke;else if(j(f.stroke,"field")||p)delete f.stroke;else if(I(f.stroke)){const m=Qe(wy(a.stroke||a.color),o.stroke,c?o.color:void 0);m&&(f.stroke={value:m})}}if(i!==Wr){const m=W(t)&&AN(n,r,t);m?f.opacity=[{test:m,...Be(g??1)},Be(u.legend.unselectedOpacity)]:g&&(f.opacity=Be(g))}return f={...f,...e},Oe(f)?void 0:f}function toe(e,{model:t,legendType:n,legendCmpt:i}){if(n!=="gradient")return;const{config:r,markDef:s,encoding:o}=t;let a={};const l=(i.get("gradientOpacity")??r.legend.gradientOpacity)===void 0?vN(o.opacity)||s.opacity:void 0;return l&&(a.opacity=Be(l)),a={...a,...e},Oe(a)?void 0:a}function noe(e,{fieldOrDatumDef:t,model:n,channel:i,legendCmpt:r}){const s=n.legend(i)||{},o=n.config,a=W(t)?AN(n,r,t):void 0,u=a?[{test:a,value:1},{value:o.legend.unselectedOpacity}]:void 0,{format:l,formatType:c}=s;let f;Mo(c)?f=hi({fieldOrDatumDef:t,field:"datum.value",format:l,formatType:c,config:o}):l===void 0&&c===void 0&&o.customFormatTypes&&(t.type==="quantitative"&&o.numberFormatType?f=hi({fieldOrDatumDef:t,field:"datum.value",format:o.numberFormat,formatType:o.numberFormatType,config:o}):t.type==="temporal"&&o.timeFormatType&&W(t)&&t.timeUnit===void 0&&(f=hi({fieldOrDatumDef:t,field:"datum.value",format:o.timeFormat,formatType:o.timeFormatType,config:o})));const d={...u?{opacity:u}:{},...f?{text:f}:{},...e};return Oe(d)?void 0:d}function ioe(e,{legendCmpt:t}){return t.get("selections")?.length?{...e,fill:{value:"transparent"}}:e}function vN(e){return EN(e,(t,n)=>Math.max(t,n.value))}function wy(e){return EN(e,(t,n)=>Qe(t,n.value))}function EN(e,t){if(jte(e))return K(e.condition).reduce(t,e.value);if(vi(e))return e.value}function AN(e,t,n){const i=t.get("selections");if(!i?.length)return;const r=G(n.field);return i.map(s=>`(!length(data(${G(je(s)+Lo)})) || (${s}[${r}] && indexof(${s}[${r}], datum.value) >= 0))`).join(" || ")}const s$={direction:({direction:e})=>e,format:({fieldOrDatumDef:e,legend:t,config:n})=>{const{format:i,formatType:r}=t;return _T(e,e.type,i,r,n,!1)},formatType:({legend:e,fieldOrDatumDef:t,scaleType:n})=>{const{formatType:i}=e;return kT(i,t,n)},gradientLength:e=>{const{legend:t,legendConfig:n}=e;return t.gradientLength??n.gradientLength??coe(e)},labelOverlap:({legend:e,legendConfig:t,scaleType:n})=>e.labelOverlap??t.labelOverlap??foe(n),symbolType:({legend:e,markDef:t,channel:n,encoding:i})=>e.symbolType??soe(t.type,n,i.shape,t.shape),title:({fieldOrDatumDef:e,config:t})=>Ta(e,t,{allowDisabling:!0}),type:({legendType:e,scaleType:t,channel:n})=>{if(Oa(n)&&qi(t)){if(e==="gradient")return}else if(e==="symbol")return;return e},values:({fieldOrDatumDef:e,legend:t})=>roe(t,e)};function roe(e,t){const n=e.values;if(I(n))return UT(t,n);if(te(n))return n}function soe(e,t,n,i){if(t!=="shape"){const r=wy(n)??i;if(r)return r}switch(e){case"bar":case"rect":case"image":case"square":return"square";case"line":case"trail":case"rule":return"stroke";case"arc":case"point":case"circle":case"tick":case"geoshape":case"area":case"text":return"circle"}}function ooe(e){const{legend:t}=e;return Qe(t.type,aoe(e))}function aoe({channel:e,timeUnit:t,scaleType:n}){if(Oa(e)){if(ye(["quarter","month","day"],t))return"symbol";if(qi(n))return"gradient"}return"symbol"}function uoe({legendConfig:e,legendType:t,orient:n,legend:i}){return i.direction??e[t?"gradientDirection":"symbolDirection"]??loe(n,t)}function loe(e,t){switch(e){case"top":case"bottom":return"horizontal";case"left":case"right":case"none":case void 0:return;default:return t==="gradient"?"horizontal":void 0}}function coe({legendConfig:e,model:t,direction:n,orient:i,scaleType:r}){const{gradientHorizontalMaxLength:s,gradientHorizontalMinLength:o,gradientVerticalMaxLength:a,gradientVerticalMinLength:u}=e;if(qi(r))return n==="horizontal"?i==="top"||i==="bottom"?o$(t,"width",o,s):o:o$(t,"height",u,a)}function o$(e,t,n,i){return{signal:`clamp(${e.getSizeSignalRef(t).signal}, ${n}, ${i})`}}function foe(e){if(ye(["quantile","threshold","log","symlog"],e))return"greedy"}function wN(e){const t=Ge(e)?doe(e):moe(e);return e.component.legends=t,t}function doe(e){const{encoding:t}=e,n={};for(const i of[vn,...lM]){const r=st(t[i]);!r||!e.getScaleComponent(i)||i===En&&W(r)&&r.type===$u||(n[i]=goe(e,i))}return n}function hoe(e,t){const n=e.scaleName(t);if(e.mark==="trail"){if(t==="color")return{stroke:n};if(t==="size")return{strokeWidth:n}}return t==="color"?e.markDef.filled?{fill:n}:{stroke:n}:{[t]:n}}function poe(e,t,n,i){switch(t){case"disable":return n!==void 0;case"values":return!!n?.values;case"title":if(t==="title"&&e===i?.title)return!0}return e===(n||{})[t]}function goe(e,t){let n=e.legend(t);const{markDef:i,encoding:r,config:s}=e,o=s.legend,a=new Zse({},hoe(e,t));gre(e,t,a);const u=n!==void 0?!n:o.disable;if(a.set("disable",u,n!==void 0),u)return a;n=n||{};const l=e.getScaleComponent(t).get("type"),c=st(r[t]),f=W(c)?ht(c.timeUnit)?.unit:void 0,d=n.orient||s.legend.orient||"right",h=ooe({legend:n,channel:t,timeUnit:f,scaleType:l}
17),p=uoe({legend:n,legendType:h,orient:d,legendConfig:o}),g={legend:n,channel:t,model:e,markDef:i,encoding:r,fieldOrDatumDef:c,legendConfig:o,config:s,scaleType:l,orient:d,legendType:h,direction:p};for(const v of xN){if(h==="gradient"&&v.startsWith("symbol")||h==="symbol"&&v.startsWith("gradient"))continue;const A=v in s$?s$[v](g):n[v];if(A!==void 0){const w=poe(A,v,n,e.fieldDef(t));(w||s.legend[v]===void 0)&&a.set(v,A,w)}}const m=n?.encoding??{},y=a.get("selections"),b={},x={fieldOrDatumDef:c,model:e,channel:t,legendCmpt:a,legendType:h};for(const v of["labels","legend","title","symbols","gradient","entries"]){const A=yN(m[v]??{},e),w=v in r$?r$[v](A,x):A;w!==void 0&&!Oe(w)&&(b[v]={...y?.length&&W(c)?{name:`${je(c.field)}_legend_${v}`}:{},...y?.length?{interactive:!!y}:{},update:w})}return Oe(b)||a.set("encode",b,!!n?.encoding),a}function moe(e){const{legends:t,resolve:n}=e.component;for(const i of e.children){wN(i);for(const r of U(i.component.legends))n.legend[r]=SE(e.component.resolve,r),n.legend[r]==="shared"&&(t[r]=SN(t[r],i.component.legends[r]),t[r]||(n.legend[r]="independent",delete t[r]))}for(const i of U(t))for(const r of e.children)r.component.legends[i]&&n.legend[i]==="shared"&&delete r.component.legends[i];return t}function SN(e,t){if(!e)return t.clone();const n=e.getWithExplicit("orient"),i=t.getWithExplicit("orient");if(n.explicit&&i.explicit&&n.value!==i.value)return;let r=!1;for(const s of xN){const o=ks(e.getWithExplicit(s),t.getWithExplicit(s),s,"legend",(a,u)=>{switch(s){case"symbolType":return yoe(a,u);case"title":return VO(a,u);case"type":return r=!0,Cn("symbol")}return bg(a,u,s,"legend")});e.setWithExplicit(s,o)}return r&&(e.implicit?.encode?.gradient&&Fh(e.implicit,["encode","gradient"]),e.explicit?.encode?.gradient&&Fh(e.explicit,["encode","gradient"])),e}function yoe(e,t){return t.value==="circle"?t:e}function boe(e,t,n,i){var r,s;e.encode??(e.encode={}),(r=e.encode)[t]??(r[t]={}),(s=e.encode[t]).update??(s.update={}),e.encode[t].update[n]=i}function CN(e){const t=e.component.legends,n={};for(const r of U(t)){const s=e.getScaleComponent(r),o=Te(s.get("domains"));if(n[o])for(const a of n[o])SN(a,t[r])||n[o].push(t[r]);else n[o]=[t[r].clone()]}return St(n).flat().map(r=>xoe(r,e.config)).filter(r=>r!==void 0)}function xoe(e,t){const{disable:n,labelExpr:i,selections:r,...s}=e.combine();if(!n){if(t.aria===!1&&s.aria==null&&(s.aria=!1),s.encode?.symbols){const o=s.encode.symbols.update;o.fill&&o.fill.value!=="transparent"&&!o.stroke&&!s.stroke&&(o.stroke={value:"transparent"});for(const a of lM)s[a]&&delete o[a]}if(s.title||delete s.title,i!==void 0){let o=i;s.encode?.labels?.update&&te(s.encode.labels.update.text)&&(o=_o(i,"datum.label",s.encode.labels.update.text.signal)),boe(s,"labels","text",{signal:o})}return s}}function voe(e){return Ru(e)||DE(e)?Eoe(e):$N(e)}function Eoe(e){return e.children.reduce((t,n)=>t.concat(n.assembleProjections()),$N(e))}function $N(e){const t=e.component.projection;if(!t||t.merged)return[];const n=t.combine(),{name:i}=n;if(t.data){const r={signal:`[${t.size.map(o=>o.signal).join(", ")}]`},s=t.data.reduce((o,a)=>{const u=te(a)?a.signal:`data('${e.lookupDataSource(a)}')`;return ye(o,u)||o.push(u),o},[]);if(s.length<=0)throw new Error("Projection's fit didn't find any data sources");return[{name:i,size:r,fit:{signal:s.length>1?`[${s.join(", ")}]`:s[0]},...n}]}else return[{name:i,translate:{signal:"[width / 2, height / 2]"},...n}]}const Aoe=["type","clipAngle","clipExtent","center","rotate","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];class FN extends Vr{constructor(t,n,i,r){super({...n},{name:t}),this.specifiedProjection=n,this.size=i,this.data=r,this.merged=!1}get isFit(){return!!this.data}}function _N(e){e.component.projection=Ge(e)?woe(e):$oe(e)}function woe(e){if(e.hasProjection){const t=yt(e.specifiedProjection),n=!(t&&(t.scale!=null||t.translate!=null)),i=n?[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]:void 0,r=n?Soe(e):void 0,s=new FN(e.projectionName(!0),{...yt(e.config.projection),...t},i,r);return s.get("type")||s.set("type","equalEarth",!1),s}}function Soe(e){const t=[],{encoding:n}=e;for(const i of[[ki,_i],[Zn,Di]])(st(n[i[0]])||st(n[i[1]]))&&t.pu
17sh({signal:e.getName(`geojson_${t.length}`)});return e.channelHasField(En)&&e.typedFieldDef(En).type===$u&&t.push({signal:e.getName(`geojson_${t.length}`)}),t.length===0&&t.push(e.requestDataName(He.Main)),t}function Coe(e,t){const n=d2(Aoe,r=>!!(!J(e.explicit,r)&&!J(t.explicit,r)||J(e.explicit,r)&&J(t.explicit,r)&&kn(e.get(r),t.get(r))));if(kn(e.size,t.size)){if(n)return e;if(kn(e.explicit,{}))return t;if(kn(t.explicit,{}))return e}return null}function $oe(e){if(e.children.length===0)return;let t;for(const i of e.children)_N(i);const n=d2(e.children,i=>{const r=i.component.projection;if(r)if(t){const s=Coe(t,r);return s&&(t=s),!!s}else return t=r,!0;else return!0});if(t&&n){const i=e.projectionName(!0),r=new FN(i,t.specifiedProjection,t.size,le(t.data));for(const s of e.children){const o=s.component.projection;o&&(o.isFit&&r.data.push(...s.component.projection.data),s.renameProjection(o.get("name"),i),o.merged=!0)}return r}}function Foe(e,t,n,i){if(Qc(t,n)){const r=Ge(e)?e.axis(n)??e.legend(n)??{}:{},s=V(t,{expr:"datum"}),o=V(t,{expr:"datum",binSuffix:"end"});return{formulaAs:V(t,{binSuffix:"range",forAs:!0}),formula:Xc(s,o,r.format,r.formatType,i)}}return{}}function kN(e,t){return`${BO(e)}_${t}`}function _oe(e,t){return{signal:e.getName(`${t}_bins`),extentSignal:e.getName(`${t}_extent`)}}function CE(e,t,n){const i=dg(n,void 0)??{},r=kN(i,t);return e.getName(`${r}_bins`)}function koe(e){return"as"in e}function a$(e,t,n){let i,r;koe(e)?i=Y(e.as)?[e.as,`${e.as}_end`]:[e.as[0],e.as[1]]:i=[V(e,{forAs:!0}),V(e,{binSuffix:"end",forAs:!0})];const s={...dg(t,void 0)},o=kN(s,e.field),{signal:a,extentSignal:u}=_oe(n,o);if(tg(s.extent)){const c=s.extent;r=aN(n,c.param,c),delete s.extent}const l={bin:s,field:e.field,as:[i],...a?{signal:a}:{},...u?{extentSignal:u}:{},...r?{span:r}:{}};return{key:o,binComponent:l}}class Xi extends De{clone(){return new Xi(null,le(this.bins))}constructor(t,n){super(t),this.bins=n}static makeFromEncoding(t,n){const i=n.reduceFieldDef((r,s,o)=>{if(sn(s)&&Le(s.bin)){const{key:a,binComponent:u}=a$(s,s.bin,n);r[a]={...u,...r[a],...Foe(n,s,o,n.config)}}return r},{});return Oe(i)?null:new Xi(t,i)}static makeFromTransform(t,n,i){const{key:r,binComponent:s}=a$(n,n.bin,i);return new Xi(t,{[r]:s})}merge(t,n){for(const i of U(t.bins))i in this.bins?(n(t.bins[i].signal,this.bins[i].signal),this.bins[i].as=ji([...this.bins[i].as,...t.bins[i].as],be)):this.bins[i]=t.bins[i];for(const i of t.children)t.removeChild(i),i.parent=this;t.remove()}producedFields(){return new Set(St(this.bins).map(t=>t.as).flat(2))}dependentFields(){return new Set(St(this.bins).map(t=>t.field))}hash(){return`Bin ${be(this.bins)}`}assemble(){return St(this.bins).flatMap(t=>{const n=[],[i,...r]=t.as,{extent:s,...o}=t.bin,a={type:"bin",field:Qn(t.field),as:i,signal:t.signal,...tg(s)?{extent:null}:{extent:s},...t.span?{span:{signal:`span(${t.span})`}}:{},...o};!s&&t.extentSignal&&(n.push({type:"extent",field:Qn(t.field),signal:t.extentSignal}),a.extent={signal:t.extentSignal}),n.push(a);for(const u of r)for(let l=0;l<2;l++)n.push({type:"formula",expr:V({field:i[l]},{expr:"datum"}),as:u[l]});return t.formula&&n.push({type:"formula",expr:t.formula,as:t.formulaAs}),n})}}function Doe(e,t,n,i){const r=Ge(i)?i.encoding[fr(t)]:void 0;if(sn(n)&&Ge(i)&&TT(n,r,i.markDef,i.config)){e.add(V(n,{})),e.add(V(n,{suffix:"end"}));const{mark:s,markDef:o,config:a}=i,u=_s({fieldDef:n,markDef:o,config:a});oc(s)&&u!==.5&&Ze(t)&&(e.add(V(n,{suffix:xg})),e.add(V(n,{suffix:vg}))),n.bin&&Qc(n,t)&&e.add(V(n,{binSuffix:"range"}))}else if(DO(t)){const s=kO(t);e.add(i.getName(s))}else e.add(V(n));return Zo(n)&&ute(n.scale?.range)&&e.add(n.scale.range.field),e}function Roe(e,t){for(const n of U(t)){const i=t[n];for(const r of U(i))n in e?e[n][r]=new Set([...e[n][r]??[],...i[r]]):e[n]={[r]:i[r]}}}class gi extends De{clone(){return new gi(null,new Set(this.dimensions),le(this.measures))}constructor(t,n,i){super(t),this.dimensions=n,this.measures=i}get groupBy(){return this.dimensions}static makeFromEncoding(t,n){let i=!1;n.forEachFieldDef(o=>{o.aggregate&&(i=!0)});const r={},s=new Set;return!i||(n.forEachFieldDef((o,a)=>{const{aggregate:u,field:l}=o;if(u)if(u==="count")r["*"]??(r["*"]={}),r["*"].count=new Set([V(o,{forAs:!0})]);else{if(Lr(u)||zs(u)){const c=Lr(u)?"argmin":"argmax",f=u[c];r[f]??(r[f]={}),r[f][c]=new Set([V({op:c,field:f},{forAs:!0})])}else r[l]??(r[l]={}),r[l][u]=new Set([V(o,{forAs:!0})]);dr(a)&&n.scaleDomain(a)==="unaggregated"&&(r[l]??(r[l]={}),r[l].min=new Set([V({field:l,aggregate:"min"},{forAs:!0})]),r[l].max=new Set([V({field:l,aggregate:"max"},{forAs:!0})]))}else Doe(s,a,o,n)}),s.size+U(r).length===0)?null:new gi(t,s,r)}static makeFromTransform(t,n){var i;const r=new Set,s={};for(const o of n.aggregate){const{op:a,field:u,as:l}=o;a&&(a==="count"?(s["*"]??(s["*"]={}),s["*"].count=new Set([l||V(o,{forAs:!0})])):(s[u]??(s[u]={}),(i=s[u])[a]??(i[a]=new Set),s[u][a].add(l||V(o,{forAs:!0}))))}for(const o of n.groupby??[])r.add(o);return r.size+U(s).length===0?null:new gi(t,r,s)}merge(t){return EO(this.dimensions,t.dimensions)?(Roe(this.measures,t.measures),!0):(Tee("different dimensions, cannot merge"),!1)}addDimensions(t){t.forEach(this.dimensions.add,this.dimensions)}dependentFields(){return new Set([...this.dimensions,...U(this.measures)])}producedFields(){const t=new Set;for(const n of U(this.measures))for(const i of U(this.measures[n])){const r=this.measures[n][i];r.size===0?t.add(`${i}_${n}`):r.forEach(t.add,t)}return t}hash(){return`Aggregate ${be({dimensions:this.dimensions,measures:this.measures})}`}assemble(){const t=[],n=[],i=[];for(const s of U(this.measures))for(const o of U(this.measures[s]))for(const a of this.measures[s][o])i.push(a),t.push(o),n.push(s==="*"?null:Qn(s));return{type:"aggregate",groupby:[...this.dimensions].map(Qn),ops:t,fields:n,as:i}}}class ku extends De{constructor(t,n,i,r){super(t),this.model=n,this.name=i,this.data=r;for(const s of Wn){const o=n.facet[s];if(o){const{bin:a,sort:u}=o;this[s]={name:n.getName(`${s}_domain`),fields:[V(o),...Le(a)?[V(o,{binSuffix:"end"})]:[]],...Rr(u)?{sortField:u}:I(u)?{sortIndexField:au(o,s)}:{}}}}this.childModel=n.child}hash(){let t="Facet";for(const n of Wn)this[n]&&(t+=` ${n.charAt(0)}:${be(this[n])}`);return t}get fields(){const t=[];for(const n of Wn)this[n]?.fields&&t.push(...this[n].fields);return t}dependentFields(){const t=new Set(this.fields);for(const n of Wn)this[n]&&(this[n].sortField&&t.add(this[n].sortField.field),this[n].sortIndexField&&t.add(this[n].sortIndexField));return t}producedFields(){return new Set}getSource(){return this.name}getChildIndependentFieldsWithStep(){const t={};for(const n of Gr){const i=this.childModel.component.scales[n];if(i&&!i.merged){const r=i.get("type"),s=i.get("range");if(pt(r)&&Ko(s)){const o=kg(this.childModel,n),a=kE(o);a?t[n]=a:q($2(n))}}}return t}assembleRowColumnHeaderData(t,n,i){const r={row:"y",column:"x",facet:void 0}[t],s=[],o=[],a=[];r&&i&&i[r]&&(n?(s.push(`distinct_${i[r]}`),o.push("max")):(s.push(i[r]),o.push("distinct")),a.push(`distinct_${i[r]}`));const{sortField:u,sortIndexField:l}=this[t];if(u){const{op:c=lg,field:f}=u;s.push(f),o.push(c),a.push(V(u,{forAs:!0}))}else l&&(s.push(l),o.push("max"),a.push(l));return{name:this[t].name,source:n??this.data,transform:[{type:"aggregate",groupby:this[t].fields,...s.length?{fields:s,ops:o,as:a}:{}}]}}assembleFacetHeaderData(t){const{columns:n}=this.model.layout,{layoutHeaders:i}=this.model.component,r=[],s={};for(const u of EE){for(const l of AE){const c=(i[u]&&i[u][l])??[];for(const f of c)if(f.axes?.length>0){s[u]=!0;break}}if(s[u]){const l=`length(data("${this.facet.name}"))`,c=u==="row"?n?{signal:`ceil(${l} / ${n})`}:1:n?{signal:`min(${l}, ${n})`}:{signal:l};r.push({name:`${this.facet.name}_${u}`,transform:[{type:"sequence",start:0,stop:c}]})}}const{row:o,column:a}=s;return(o||a)&&r.unshift(this.assembleRowColumnHeaderData("facet",null,t)),r}assemble(){const t=[];let n=null;const i=this.getChildIndependentFieldsWithStep(),{column:r,row:s,facet:o}=this;if(r&&s&&(i.x||i.y)){n=`cross_${this.column.name}_${this.row.name}`;const a=[].concat(i.x??[],i.y??[]),u=a.map(()=>"distinct");t.push({name:n,source:this.data,transform:[{type:"aggregate",groupby:this.fields,fields:a,ops:u}]})}
17for(const a of[Dr,kr])this[a]&&t.push(this.assembleRowColumnHeaderData(a,n,i));if(o){const a=this.assembleFacetHeaderData(i);a&&t.push(...a)}return t}}function u$(e){return e.startsWith("'")&&e.endsWith("'")||e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e}function Ooe(e,t){const n=g2(e);if(t==="number")return`toNumber(${n})`;if(t==="boolean")return`toBoolean(${n})`;if(t==="string")return`toString(${n})`;if(t==="date")return`toDate(${n})`;if(t==="flatten")return n;if(t.startsWith("date:")){const i=u$(t.slice(5,t.length));return`timeParse(${n},'${i}')`}else if(t.startsWith("utc:")){const i=u$(t.slice(4,t.length));return`utcParse(${n},'${i}')`}else return q(jZ(t)),null}function Toe(e){const t={};return bd(e.filter,n=>{if(cT(n)){let i=null;O2(n)?i=_n(n.equal):M2(n)?i=_n(n.lte):T2(n)?i=_n(n.lt):N2(n)?i=_n(n.gt):L2(n)?i=_n(n.gte):P2(n)?i=n.range[0]:I2(n)&&(i=(n.oneOf??n.in)[0]),i&&(Jo(i)?t[n.field]="date":Se(i)?t[n.field]="number":Y(i)&&(t[n.field]="string")),n.timeUnit&&(t[n.field]="date")}}),t}function Moe(e){const t={};function n(i){iu(i)?t[i.field]="date":i.type==="quantitative"&&mZ(i.aggregate)?t[i.field]="number":Ja(i.field)>1?i.field in t||(t[i.field]="flatten"):Zo(i)&&Rr(i.sort)&&Ja(i.sort.field)>1&&(i.sort.field in t||(t[i.sort.field]="flatten"))}if((Ge(e)||Tn(e))&&e.forEachFieldDef((i,r)=>{if(sn(i))n(i);else{const s=Xo(r),o=e.fieldDef(s);n({...i,type:o.type})}}),Ge(e)){const{mark:i,markDef:r,encoding:s}=e;if(Us(i)&&!e.encoding.order){const o=r.orient==="horizontal"?"y":"x",a=s[o];W(a)&&a.type==="quantitative"&&!(a.field in t)&&(t[a.field]="number")}}return t}function Noe(e){const t={};if(Ge(e)&&e.component.selection)for(const n of U(e.component.selection)){const i=e.component.selection[n];for(const r of i.project.items)!r.channel&&Ja(r.field)>1&&(t[r.field]="flatten")}return t}class Nt extends De{clone(){return new Nt(null,le(this._parse))}constructor(t,n){super(t),this._parse=n}hash(){return`Parse ${be(this._parse)}`}static makeExplicit(t,n,i){let r={};const s=n.data;return!xs(s)&&s?.format?.parse&&(r=s.format.parse),this.makeWithAncestors(t,r,{},i)}static makeWithAncestors(t,n,i,r){for(const a of U(i)){const u=r.getWithExplicit(a);u.value!==void 0&&(u.explicit||u.value===i[a]||u.value==="derived"||i[a]==="flatten"?delete i[a]:q(fC(a,i[a],u.value)))}for(const a of U(n)){const u=r.get(a);u!==void 0&&(u===n[a]?delete n[a]:q(fC(a,n[a],u)))}const s=new Vr(n,i);r.copyAll(s);const o={};for(const a of U(s.combine())){const u=s.get(a);u!==null&&(o[a]=u)}return U(o).length===0||r.parseNothing?null:new Nt(t,o)}get parse(){return this._parse}merge(t){this._parse={...this._parse,...t.parse},t.remove()}assembleFormatParse(){const t={};for(const n of U(this._parse)){const i=this._parse[n];Ja(n)===1&&(t[n]=i)}return t}producedFields(){return new Set(U(this._parse))}dependentFields(){return new Set(U(this._parse))}assembleTransforms(t=!1){return U(this._parse).filter(n=>t?Ja(n)>1:!0).map(n=>{const i=Ooe(n,this._parse[n]);return i?{type:"formula",expr:i,as:Su(n)}:null}).filter(n=>n!==null)}}class Ds extends De{clone(){return new Ds(null)}constructor(t){super(t)}dependentFields(){return new Set}producedFields(){return new Set([Ai])}hash(){return"Identifier"}assemble(){return{type:"identifier",as:Ai}}}class sf extends De{clone(){return new sf(null,this.params)}constructor(t,n){super(t),this.params=n}dependentFields(){return new Set}producedFields(){}hash(){return`Graticule ${be(this.params)}`}assemble(){return{type:"graticule",...this.params===!0?{}:this.params}}}class of extends De{clone(){return new of(null,this.params)}constructor(t,n){super(t),this.params=n}dependentFields(){return new Set}producedFields(){return new Set([this.params.as??"data"])}hash(){return`Hash ${be(this.params)}`}assemble(){return{type:"sequence",...this.params}}}class Bo extends De{constructor(t){super(null),t??(t={name:"source"});let n;if(xs(t)||(n=t.format?{...gn(t.format,["parse"])}:{}),ac(t))this._data={values:t.values};else if(ru(t)){if(this._data={url:t.url},!n.type){let i=/(?:\.([^.]+))?$/.exec(t.url)[1];
17ye(["json","csv","tsv","dsv","topojson"],i)||(i="json"),n.type=i}}else FM(t)?this._data={values:[{type:"Sphere"}]}:(CM(t)||xs(t))&&(this._data={});this._generator=xs(t),t.name&&(this._name=t.name),n&&!Oe(n)&&(this._data.format=n)}dependentFields(){return new Set}producedFields(){}get data(){return this._data}hasName(){return!!this._name}get isGenerator(){return this._generator}get dataName(){return this._name}set dataName(t){this._name=t}set parent(t){throw new Error("Source nodes have to be roots.")}remove(){throw new Error("Source nodes are roots and cannot be removed.")}hash(){throw new Error("Cannot hash sources")}assemble(){return{name:this._name,...this._data,transform:[]}}}var l$=function(e,t,n,i,r){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?r.call(e,n):r?r.value=n:t.set(e,n),n},Loe=function(e,t,n,i){if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?i:n==="a"?i.call(e):i?i.value:t.get(e)},Al;function $E(e){return e instanceof Bo||e instanceof sf||e instanceof of}class FE{constructor(){Al.set(this,void 0),l$(this,Al,!1,"f")}setModified(){l$(this,Al,!0,"f")}get modifiedFlag(){return Loe(this,Al,"f")}}Al=new WeakMap;class ta extends FE{getNodeDepths(t,n,i){i.set(t,n);for(const r of t.children)this.getNodeDepths(r,n+1,i);return i}optimize(t){const i=[...this.getNodeDepths(t,0,new Map).entries()].sort((r,s)=>s[1]-r[1]);for(const r of i)this.run(r[0]);return this.modifiedFlag}}class _E extends FE{optimize(t){this.run(t);for(const n of t.children)this.optimize(n);return this.modifiedFlag}}class Poe extends _E{mergeNodes(t,n){const i=n.shift();for(const r of n)t.removeChild(r),r.parent=i,r.remove()}run(t){const n=t.children.map(r=>r.hash()),i={};for(let r=0;r<n.length;r++)i[n[r]]===void 0?i[n[r]]=[t.children[r]]:i[n[r]].push(t.children[r]);for(const r of U(i))i[r].length>1&&(this.setModified(),this.mergeNodes(t,i[r]))}}class Ioe extends _E{constructor(t){super(),this.requiresSelectionId=t&&yE(t)}run(t){t instanceof Ds&&(this.requiresSelectionId&&($E(t.parent)||t.parent instanceof gi||t.parent instanceof Nt)||(this.setModified(),t.remove()))}}class Boe extends FE{optimize(t){return this.run(t,new Set),this.modifiedFlag}run(t,n){let i=new Set;t instanceof Hi&&(i=t.producedFields(),h2(i,n)&&(this.setModified(),t.removeFormulas(n),t.producedFields.length===0&&t.remove()));for(const r of t.children)this.run(r,new Set([...n,...i]))}}class zoe extends _E{constructor(){super()}run(t){t instanceof mn&&!t.isRequired()&&(this.setModified(),t.remove())}}class Uoe extends ta{run(t){if(!$E(t)&&!(t.numChildren()>1)){for(const n of t.children)if(n instanceof Nt)if(t instanceof Nt)this.setModified(),t.merge(n);else{if(p2(t.producedFields(),n.dependentFields()))continue;this.setModified(),n.swapWithParent()}}}}class joe extends ta{run(t){const n=[...t.children],i=t.children.filter(r=>r instanceof Nt);if(t.numChildren()>1&&i.length>=1){const r={},s=new Set;for(const o of i){const a=o.parse;for(const u of U(a))u in r?r[u]!==a[u]&&s.add(u):r[u]=a[u]}for(const o of s)delete r[o];if(!Oe(r)){this.setModified();const o=new Nt(t,r);for(const a of n){if(a instanceof Nt)for(const u of U(r))delete a.parse[u];t.removeChild(a),a.parent=o,a instanceof Nt&&U(a.parse).length===0&&a.remove()}}}}}class qoe extends ta{run(t){t instanceof mn||t.numChildren()>0||t instanceof ku||t instanceof Bo||(this.setModified(),t.remove())}}class Woe extends ta{run(t){const n=t.children.filter(r=>r instanceof Hi),i=n.pop();for(const r of n)this.setModified(),i.merge(r)}}class Goe extends ta{run(t){const n=t.children.filter(r=>r instanceof gi),i={};for(const r of n){const s=be(r.groupBy);s in i||(i[s]=[]),i[s].push(r)}for(const r of U(i)){const s=i[r];if(s.length>1){const o=s.pop();for(const a of s)o.merge(a)&&(t.removeChild(a),a.parent=o,a.remove(),this.setModified())}}}}class Hoe extends ta{constructor(t){super(),this.model=t}run(t){const n=!($E(t)||t instanceof _u||t instanceof Nt||t instanceof Ds),i=[],r=[];for(const s of t.children)s instanceof Xi&&(n&&!p2(t.producedFields(),s.dependentFields())?i.push(s):r.push(s));if(i.length>0){const s=i.pop();for(const o of i)s.merge(o,this.model.renameSignal.bind(this.model));this.setModified(),t instanceof Xi?t.merge(s,this.model.renameSignal.bind(this.model)):s.swapWithParent()}if(r.length>1){const s=r.pop();
17for(const o of r)s.merge(o,this.model.renameSignal.bind(this.model));this.setModified()}}}class Voe extends ta{run(t){const n=[...t.children];if(!Ka(n,o=>o instanceof mn)||t.numChildren()<=1)return;const r=[];let s;for(const o of n)if(o instanceof mn){let a=o;for(;a.numChildren()===1;){const[u]=a.children;if(u instanceof mn)a=u;else break}r.push(...a.children),s?(t.removeChild(o),o.parent=s.parent,s.parent.removeChild(s),s.parent=a,this.setModified()):s=a}else r.push(o);if(r.length){this.setModified();for(const o of r)o.parent.removeChild(o),o.parent=s}}}class na extends De{clone(){return new na(null,le(this.transform))}constructor(t,n){super(t),this.transform=n}addDimensions(t){this.transform.groupby=ji(this.transform.groupby.concat(t),n=>n)}dependentFields(){const t=new Set;return this.transform.groupby&&this.transform.groupby.forEach(t.add,t),this.transform.joinaggregate.map(n=>n.field).filter(n=>n!==void 0).forEach(t.add,t),t}producedFields(){return new Set(this.transform.joinaggregate.map(this.getDefaultName))}getDefaultName(t){return t.as??V(t)}hash(){return`JoinAggregateTransform ${be(this.transform)}`}assemble(){const t=[],n=[],i=[];for(const s of this.transform.joinaggregate)n.push(s.op),i.push(this.getDefaultName(s)),t.push(s.field===void 0?null:s.field);const r=this.transform.groupby;return{type:"joinaggregate",as:i,ops:n,fields:t,...r!==void 0?{groupby:r}:{}}}}class lu extends De{clone(){return new lu(null,{...this.filter})}constructor(t,n){super(t),this.filter=n}static make(t,n,i){const{config:r,markDef:s}=n,{marks:o,scales:a}=i;if(o==="include-invalid-values"&&a==="include-invalid-values")return null;const u=n.reduceFieldDef((l,c,f)=>{const d=dr(f)&&n.getScaleComponent(f);if(d){const h=d.get("type"),{aggregate:p}=c,g=G2({scaleChannel:f,markDef:s,config:r,scaleType:h,isCountAggregate:eg(p)});g!=="show"&&g!=="always-valid"&&(l[c.field]=c)}return l},{});return U(u).length?new lu(t,u):null}dependentFields(){return new Set(U(this.filter))}producedFields(){return new Set}hash(){return`FilterInvalid ${be(this.filter)}`}assemble(){const t=U(this.filter).reduce((n,i)=>{const r=this.filter[i],s=V(r,{expr:"datum"});return r!==null&&(r.type==="temporal"?n.push(`(isDate(${s}) || (${Sy(s)}))`):r.type==="quantitative"&&n.push(Sy(s))),n},[]);return t.length>0?{type:"filter",expr:t.join(" && ")}:null}}function Sy(e){return`isValid(${e}) && isFinite(+${e})`}function Xoe(e){return e.stack.stackBy.reduce((t,n)=>{const i=n.fieldDef,r=V(i);return r&&t.push(r),t},[])}function Yoe(e){return I(e)&&e.every(t=>Y(t))&&e.length>1}class Tr extends De{clone(){return new Tr(null,le(this._stack))}constructor(t,n){super(t),this._stack=n}static makeFromTransform(t,n){const{stack:i,groupby:r,as:s,offset:o="zero"}=n,a=[],u=[];if(n.sort!==void 0)for(const f of n.sort)a.push(f.field),u.push(Qe(f.order,"ascending"));const l={field:a,order:u};let c;return Yoe(s)?c=s:Y(s)?c=[s,`${s}_end`]:c=[`${n.stack}_start`,`${n.stack}_end`],new Tr(t,{dimensionFieldDefs:[],stackField:i,groupby:r,offset:o,sort:l,facetby:[],as:c})}static makeFromEncoding(t,n){const i=n.stack,{encoding:r}=n;if(!i)return null;const{groupbyChannels:s,fieldChannel:o,offset:a,impute:u}=i,l=s.map(h=>{const p=r[h];return Ei(p)}).filter(h=>!!h),c=Xoe(n),f=n.encoding.order;let d;if(I(f)||W(f))d=WO(f);
17else{const h=MT(f)?f.sort:o==="y"?"descending":"ascending";d=c.reduce((p,g)=>(p.field.includes(g)||(p.field.push(g),p.order.push(h)),p),{field:[],order:[]})}return new Tr(t,{dimensionFieldDefs:l,stackField:n.vgField(o),facetby:[],stackby:c,sort:d,offset:a,impute:u,as:[n.vgField(o,{suffix:"start",forAs:!0}),n.vgField(o,{suffix:"end",forAs:!0})]})}get stack(){return this._stack}addDimensions(t){this._stack.facetby.push(...t)}dependentFields(){const t=new Set;return t.add(this._stack.stackField),this.getGroupbyFields().forEach(t.add,t),this._stack.facetby.forEach(t.add,t),this._stack.sort.field.forEach(t.add,t),t}producedFields(){return new Set(this._stack.as)}hash(){return`Stack ${be(this._stack)}`}getGroupbyFields(){const{dimensionFieldDefs:t,impute:n,groupby:i}=this._stack;return t.length>0?t.map(r=>r.bin?n?[V(r,{binSuffix:"mid"})]:[V(r,{}),V(r,{binSuffix:"end"})]:[V(r)]).flat():i??[]}assemble(){const t=[],{facetby:n,dimensionFieldDefs:i,stackField:r,stackby:s,sort:o,offset:a,impute:u,as:l}=this._stack;if(u)for(const c of i){const{bandPosition:f=.5,bin:d}=c;if(d){const h=V(c,{expr:"datum"}),p=V(c,{expr:"datum",binSuffix:"end"});t.push({type:"formula",expr:`${Sy(h)} ? ${f}*${h}+${1-f}*${p} : ${h}`,as:V(c,{binSuffix:"mid",forAs:!0})})}t.push({type:"impute",field:r,groupby:[...s,...n],key:V(c,{binSuffix:"mid"}),method:"value",value:0})}return t.push({type:"stack",groupby:[...this.getGroupbyFields(),...n],field:r,sort:o,as:l,offset:a}),t}}class Du extends De{clone(){return new Du(null,le(this.transform))}constructor(t,n){super(t),this.transform=n}addDimensions(t){this.transform.groupby=ji(this.transform.groupby.concat(t),n=>n)}dependentFields(){const t=new Set;return(this.transform.groupby??[]).forEach(t.add,t),(this.transform.sort??[]).forEach(n=>t.add(n.field)),this.transform.window.map(n=>n.field).filter(n=>n!==void 0).forEach(t.add,t),t}producedFields(){return new Set(this.transform.window.map(this.getDefaultName))}getDefaultName(t){return t.as??V(t)}hash(){return`WindowTransform ${be(this.transform)}`}assemble(){const t=[],n=[],i=[],r=[];for(const f of this.transform.window)n.push(f.op),i.push(this.getDefaultName(f)),r.push(f.param===void 0?null:f.param),t.push(f.field===void 0?null:f.field);const s=this.transform.frame,o=this.transform.groupby;if(s&&s[0]===null&&s[1]===null&&n.every(f=>S2(f)))return{type:"joinaggregate",as:i,ops:n,fields:t,...o!==void 0?{groupby:o}:{}};const a=[],u=[];if(this.transform.sort!==void 0)for(const f of this.transform.sort)a.push(f.field),u.push(f.order??"ascending");const l={field:a,order:u},c=this.transform.ignorePeers;return{type:"window",params:r,as:i,ops:n,fields:t,sort:l,...c!==void 0?{ignorePeers:c}:{},...o!==void 0?{groupby:o}:{},...s!==void 0?{frame:s}:{}}}}function Koe(e){function t(n){if(!(n instanceof ku)){const i=n.clone();if(i instanceof mn){const r=$y+i.getSource();i.setSource(r),e.model.component.data.outputNodes[r]=i}else(i instanceof gi||i instanceof Tr||i instanceof Du||i instanceof na)&&i.addDimensions(e.fields);for(const r of n.children.flatMap(t))r.parent=i;return[i]}return n.children.flatMap(t)}return t}function Cy(e){if(e instanceof ku)if(e.numChildren()===1&&!(e.children[0]instanceof mn)){const t=e.children[0];(t instanceof gi||t instanceof Tr||t instanceof Du||t instanceof na)&&t.addDimensions(e.fields),t.swapWithParent(),Cy(e)}else{const t=e.model.component.data.main;DN(t);const n=Koe(e),i=e.children.map(n).flat();for(const r of i)r.parent=t}else e.children.map(Cy)}function DN(e){if(e instanceof mn&&e.type===He.Main&&e.numChildren()===1){const t=e.children[0];t instanceof ku||(t.swapWithParent(),DN(e))}}const $y="scale_",Bf=5;function Fy(e){for(const t of e){for(const n of t.children)if(n.parent!==t)return!1;if(!Fy(t.children))return!1}return!0}function ii(e,t){let n=!1;for(const i of t)n=e.optimize(i)||n;return n}function c$(e,t,n){let i=e.sources,r=!1;return r=ii(new zoe,i)||r,r=ii(new Ioe(t),i)||r,i=i.filter(s=>s.numChildren()>0),r=ii(new qoe,i)||r,i=i.filter(s=>s.numChildren()>0),n||(r=ii(new Uoe,i)||r,r=ii(new Hoe(t),i)||r,r=ii(new Boe,i)||r,r=ii(new joe,i)||r,r=ii(new Goe,i)||r,r=ii(new Woe,i)||r,r=ii(new Poe,i)||r,r=ii(new Voe,i)||r),e.sources=i,r}function Joe(e,t){Fy(e.sources);let n=0,i=0;for(let r=0;r<Bf&&c$(e,t,!0);r++)n++;e.sources.map(Cy);for(let r=0;r<Bf&&c$(e,t,!1);r++)i++;Fy(e.sources),Math.max(n,i)===Bf&&q(`Maximum optimization runs(${Bf}) reached.`)}class ut{constructor(t){Object.defineProperty(this,"signal",{enumerable:!0,get:t})}static fromName(t,n){return new ut(()=>t(n))}}function RN(e){Ge(e)?Qoe(e):Zoe(e)}function Qoe(e){const t=e.component.scales;for(const n of U(t)){const i=tae(e,n);if(t[n].setWithExplicit("domains",i),iae(e,n),e.component.data.isFaceted){let s=e;for(;!Tn(s)&&s.parent;)s=s.parent;if(s.component.resolve.scale[n]==="shared")for(const a of i.value)Fr(a)&&
17(a.data=$y+a.data.replace($y,""))}}}function Zoe(e){for(const n of e.children)RN(n);const t=e.component.scales;for(const n of U(t)){let i,r=null;for(const s of e.children){const o=s.component.scales[n];if(o){i===void 0?i=o.getWithExplicit("domains"):i=ks(i,o.getWithExplicit("domains"),"domains","scale",_y);const a=o.get("selectionExtent");r&&a&&r.param!==a.param&&q(NZ),r=a}}t[n].setWithExplicit("domains",i),r&&t[n].set("selectionExtent",r,!0)}}function eae(e,t,n,i){if(e==="unaggregated"){const{valid:r,reason:s}=f$(t,n);if(!r){q(s);return}}else if(e===void 0&&i.useUnaggregatedDomain){const{valid:r}=f$(t,n);if(r)return"unaggregated"}return e}function tae(e,t){const n=e.getScaleComponent(t).get("type"),{encoding:i}=e,r=eae(e.scaleDomain(t),e.typedFieldDef(t),n,e.config.scale);return r!==e.scaleDomain(t)&&(e.specifiedScales[t]={...e.specifiedScales[t],domain:r}),t==="x"&&st(i.x2)?st(i.x)?ks(Qr(n,r,e,"x"),Qr(n,r,e,"x2"),"domain","scale",_y):Qr(n,r,e,"x2"):t==="y"&&st(i.y2)?st(i.y)?ks(Qr(n,r,e,"y"),Qr(n,r,e,"y2"),"domain","scale",_y):Qr(n,r,e,"y2"):Qr(n,r,e,t)}function nae(e,t,n){return e.map(i=>({signal:`{data: ${hg(i,{timeUnit:n,type:t})}}`}))}function nm(e,t,n){const i=ht(n)?.unit;return t==="temporal"||i?nae(e,t,i):[e]}function Qr(e,t,n,i){const{encoding:r,markDef:s,mark:o,config:a,stack:u}=n,l=st(r[i]),{type:c}=l,f=l.timeUnit,d=Bie({invalid:Zi("invalid",s,a),isPath:Us(o)});if(ate(t)){const g=Qr(e,void 0,n,i),m=nm(t.unionWith,c,f);return Pi([...m,...g.value])}else{if(te(t))return Pi([t]);if(t&&t!=="unaggregated"&&!yT(t))return Pi(nm(t,c,f))}if(u&&i===u.fieldChannel){if(u.offset==="normalize")return Cn([[0,1]]);const g=n.requestDataName(d);return Cn([{data:g,field:n.vgField(i,{suffix:"start"})},{data:g,field:n.vgField(i,{suffix:"end"})}])}const h=dr(i)&&W(l)?rae(n,i,e):void 0;if(hr(l)){const g=nm([l.datum],c,f);return Cn(g)}const p=l;if(t==="unaggregated"){const{field:g}=l;return Cn([{data:n.requestDataName(d),field:V({field:g,aggregate:"min"})},{data:n.requestDataName(d),field:V({field:g,aggregate:"max"})}])}else if(Le(p.bin)){if(pt(e))return Cn(e==="bin-ordinal"?[]:[{data:rc(h)?n.requestDataName(d):n.requestDataName(He.Raw),field:n.vgField(i,Qc(p,i)?{binSuffix:"range"}:{}),sort:h===!0||!X(h)?{field:n.vgField(i,{}),op:"min"}:h}]);{const{bin:g}=p;if(Le(g)){const m=CE(n,p.field,g);return Cn([new ut(()=>{const y=n.getSignalName(m);return`[${y}.start, ${y}.stop]`})])}else return Cn([{data:n.requestDataName(d),field:n.vgField(i,{})}])}}else if(p.timeUnit&&ye(["time","utc"],e)){const g=r[fr(i)];if(TT(p,g,s,a)){const m=n.requestDataName(d),y=_s({fieldDef:p,fieldDef2:g,markDef:s,config:a}),b=oc(o)&&y!==.5&&Ze(i);return Cn([{data:m,field:n.vgField(i,b?{suffix:xg}:{})},{data:m,field:n.vgField(i,{suffix:b?vg:"end"})}])}}return Cn(h?[{data:rc(h)?n.requestDataName(d):n.requestDataName(He.Raw),field:n.vgField(i),sort:h}]:[{data:n.requestDataName(d),field:n.vgField(i)}])}function im(e,t){const{op:n,field:i,order:r}=e;return{op:n??(t?"sum":lg),...i?{field:Qn(i)}:{},...r?{order:r}:{}}}function iae(e,t){const n=e.component.scales[t],i=e.specifiedScales[t].domain,r=e.fieldDef(t)?.bin,s=yT(i)?i:void 0,o=Yo(r)&&tg(r.extent)?r.extent:void 0;(s||o)&&n.set("selectionExtent",s??o,!0)}function rae(e,t,n){if(!pt(n))return;const i=e.fieldDef(t),r=i.sort;if(RT(r))return{op:"min",field:au(i,t),order:"ascending"};const{stack:s}=e,o=s?new Set([...s.groupbyFields,...s.stackBy.map(a=>a.fieldDef.field)]):void 0;if(Rr(r)){const a=s&&!o.has(r.field);return im(r,a)}else if(Bte(r)){const{encoding:a,order:u}=r,l=e.fieldDef(a),{aggregate:c,field:f}=l,d=s&&!o.has(f);if(Lr(c)||zs(c))return im({field:V(l),order:u},d);if(S2(c)||!c)return im({op:c,field:f,order:u},d)}else{if(r==="descending")return{op:"min",field:e.vgField(t),order:"descending"};if(ye(["ascending",void 0],r))return!0}}function f$(e,t){const{aggregate:n,type:i}=e;return n?Y(n)&&!bZ.has(n)?{valid:!1,reason:cee(n)}:i==="quantitative"&&t==="log"?{valid:!1,reason:fee(e)}:{valid:!0}:{valid:!1,reason:lee(e)}}function _y(e,t,n,i){return e.explicit&&t.explicit&&q(mee(n,i,e.value,t.value)),{explicit:e.explicit,value:[...e.value,...t.value]}}function sae(e){const t=ji(e.map(o=>
17{if(Fr(o)){const{sort:a,...u}=o;return u}return o}),be),n=ji(e.map(o=>{if(Fr(o)){const a=o.sort;return a!==void 0&&!rc(a)&&("op"in a&&a.op==="count"&&delete a.field,a.order==="ascending"&&delete a.order),a}}).filter(o=>o!==void 0),be);if(t.length===0)return;if(t.length===1){const o=e[0];if(Fr(o)&&n.length>0){let a=n[0];if(n.length>1){q(hC);const u=n.filter(l=>X(l)&&"op"in l&&l.op!=="min");n.every(l=>X(l)&&"op"in l)&&u.length===1?a=u[0]:a=!0}else if(X(a)&&"field"in a){const u=a.field;o.field===u&&(a=a.order?{order:a.order}:!0)}return{...o,sort:a}}return o}const i=ji(n.map(o=>rc(o)||!("op"in o)||Y(o.op)&&J(pZ,o.op)?o:(q(bee(o)),!0)),be);let r;i.length===1?r=i[0]:i.length>1&&(q(hC),r=!0);const s=ji(e.map(o=>Fr(o)?o.data:null),o=>o);return s.length===1&&s[0]!==null?{data:s[0],fields:t.map(a=>a.field),...r?{sort:r}:{}}:{fields:t,...r?{sort:r}:{}}}function kE(e){if(Fr(e)&&Y(e.field))return e.field;if(xZ(e)){let t;for(const n of e.fields)if(Fr(n)&&Y(n.field)){if(!t)t=n.field;else if(t!==n.field)return q(xee),t}return q(vee),t}else if(vZ(e)){q(Eee);const t=e.fields[0];return Y(t)?t:void 0}}function kg(e,t){const i=e.component.scales[t].get("domains").map(r=>(Fr(r)&&(r.data=e.lookupDataSource(r.data)),r));return sae(i)}function ON(e){return Ru(e)||DE(e)?e.children.reduce((t,n)=>t.concat(ON(n)),d$(e)):d$(e)}function d$(e){return U(e.component.scales).reduce((t,n)=>{const i=e.component.scales[n];if(i.merged)return t;const r=i.combine(),{name:s,type:o,selectionExtent:a,domains:u,range:l,reverse:c,...f}=r,d=oae(r.range,s,n,e),h=kg(e,n),p=a?Kie(e,a,i,h):null;return t.push({name:s,type:o,...h?{domain:h}:{},...p?{domainRaw:p}:{},range:d,...c!==void 0?{reverse:c}:{},...f}),t},[])}function oae(e,t,n,i){if(Ze(n)){if(Ko(e))return{step:{signal:`${t}_step`}}}else if(X(e)&&Fr(e))return{...e,data:i.lookupDataSource(e.data)};return e}class TN extends Vr{constructor(t,n){super({},{name:t}),this.merged=!1,this.setWithExplicit("type",n)}domainHasZero(){const t=this.get("type");if(ye([bt.LOG,bt.TIME,bt.UTC],t))return"definitely-not";const n=this.get("zero");if(n===!0||n===void 0&&ye([bt.LINEAR,bt.SQRT,bt.POW],t))return"definitely";const i=this.get("domains");if(i.length>0){let r=!1,s=!1,o=!1;for(const a of i){if(I(a)){const u=a[0],l=a[a.length-1];if(Se(u)&&Se(l))if(u<=0&&l>=0){r=!0;continue}else{s=!0;continue}}o=!0}if(r)return"definitely";if(s&&!o)return"definitely-not"}return"maybe"}}const aae=["range","scheme"];function uae(e){const t=e.component.scales;for(const n of w2){const i=t[n];if(!i)continue;const r=lae(n,e);i.setWithExplicit("range",r)}}function h$(e,t){const n=e.fieldDef(t);if(n?.bin){const{bin:i,field:r}=n,s=An(t),o=e.getName(s);if(X(i)&&i.binned&&i.step!==void 0)return new ut(()=>{const a=e.scaleName(t),u=`(domain("${a}")[1] - domain("${a}")[0]) / ${i.step}`;return`${e.getSignalName(o)} / (${u})`});if(Le(i)){const a=CE(e,r,i);return new ut(()=>{const u=e.getSignalName(a),l=`(${u}.stop - ${u}.start) / ${u}.step`;return`${e.getSignalName(o)} / (${l})`})}}}function lae(e,t){const n=t.specifiedScales[e],{size:i}=t,s=t.getScaleComponent(e).get("type");for(const f of aae)if(n[f]!==void 0){const d=oy(s,f),h=bT(e,f);if(!d)q(JO(s,f,e));else if(h)q(h);else switch(f){case"range":{const p=n.range;if(I(p)){if(Ze(e))return Pi(p.map(g=>{if(g==="width"||g==="height"){const m=t.getName(g),y=t.getSignalName.bind(t);return ut.fromName(y,m)}return g}))}else if(X(p))return Pi({data:t.requestDataName(He.Main),field:p.field,sort:{op:"min",field:t.vgField(e)}});return Pi(p)}case"scheme":return Pi(cae(n[f]))}}const o=e===qe||e==="xOffset"?"width":"height",a=i[o];if(tr(a)){if(Ze(e))if(pt(s)){const f=NN(a,t,e);if(f)return Pi({step:f})}else q(QO(o));else if(Gc(e)){const f=e===Ms?"x":"y";if(t.getScaleComponent(f).get("type")==="band"){const p=LN(a,s);if(p)return Pi(p)}}}const{rangeMin:u,rangeMax:l}=n,c=fae(e,t);return(u!==void 0||l!==void 0)&&oy(s,"rangeMin")&&I(c)&&c.length===2?Pi([u??c[0],l??c[1]]):Cn(c)}function cae(e){return ote(e)?{scheme:e.name,...gn(e,["name"])}:{scheme:e}}function MN(e,t,n,{center:i}={}){const r=An(e),s=t.getName(r),o=t.getSignalName.bind(t);return e===gt&&xi(n)?i?[ut.fromName(a=>`${o(a)}/2`,s),ut.fromName(a=>`-${o(a)}/2`,s)]:[ut.fromName(o,s),0]:i?[ut.fromName(a=>`-${o(a)}/2`,s),ut.fromName(a=>`${o(a)}/2`,s)]:[0,ut.fromName(o,s)]}function fae(e,t){const{size:n,config:i,mark:r,encoding:s}=t,{type:o}=st(s[e]),u=t.getScaleComponent(e).get("type"),{domain:l,domainMid:c}=t.specifiedScales[e];switch(e){case qe:case gt:{if(ye(["point","band"],u)){const f=PN(e,n,i.view);if(tr(f))return{step:NN(f,t,e)}}return MN(e,t,u)}case Ms:case Cu:return dae(e,t,u);case qr:{const f=gae(r,i),d=mae(r,n,t,i);return eu(u)?pae(f,d,hae(u,i,l,e)):[f,d]}case ti:return[0,Math.PI*2];case Vo:return[0,360];case Fi:return[0,new ut(()=>{const f=t.getSignalName(Tn(t.parent)?"child_width":"width"),d=t.getSignalName(Tn(t.parent)?"child_height":"height");return`min(${f},${d})/2`})];case Ns:return{step:1e3/i.scale.framesPerSecond};case Is:return[i.scale.minStrokeWidth,i.scale.maxStrokeWidth];case Bs:return[[1,0],[4,2],[2,1],[1,1],[1,2,4,2]];case En:return"symbol";
17case vn:case lr:case cr:return u==="ordinal"?o==="nominal"?"category":"ordinal":c!==void 0?"diverging":r==="rect"||r==="geoshape"?"heatmap":"ramp";case Wr:case Ls:case Ps:return[i.scale.minOpacity,i.scale.maxOpacity]}}function NN(e,t,n){const{encoding:i}=t,r=t.getScaleComponent(n),s=x2(n),o=i[s];if(fM({step:e,offsetIsDiscrete:ce(o)&&dT(o.type)})==="offset"&&GT(i,s)){const u=t.getScaleComponent(s);let c=`domain('${t.scaleName(s)}').length`;if(u.get("type")==="band"){const d=u.get("paddingInner")??u.get("padding")??0,h=u.get("paddingOuter")??u.get("padding")??0;c=`bandspace(${c}, ${d}, ${h})`}const f=r.get("paddingInner")??r.get("padding");return{signal:`${e.step} * ${c} / (1-${SZ(f)})`}}else return e.step}function LN(e,t){if(fM({step:e,offsetIsDiscrete:pt(t)})==="offset")return{step:e.step}}function dae(e,t,n){const i=e===Ms?"x":"y",r=t.getScaleComponent(i);if(!r)return MN(i,t,n,{center:!0});const s=r.get("type"),o=t.scaleName(i),{markDef:a,config:u}=t;if(s==="band"){const l=PN(i,t.size,t.config.view);if(tr(l)){const c=LN(l,n);if(c)return c}return[0,{signal:`bandwidth('${o}')`}]}else{const l=t.encoding[i];if(W(l)&&l.timeUnit){const c=uT(l.timeUnit,p=>`scale('${o}', ${p})`),f=t.config.scale.bandWithNestedOffsetPaddingInner,d=_s({fieldDef:l,markDef:a,config:u})-.5,h=d!==0?` + ${d}`:"";if(f){const p=te(f)?`${f.signal}/2`+h:`${f/2+d}`,g=te(f)?`(1 - ${f.signal}/2)`+h:`${1-f/2+d}`;return[{signal:`${p} * (${c})`},{signal:`${g} * (${c})`}]}return[0,{signal:c}]}return xO(`Cannot use ${e} scale if ${i} scale is not discrete.`)}}function PN(e,t,n){const i=e===qe?"width":"height",r=t[i];return r||Lh(n,i)}function hae(e,t,n,i){switch(e){case"quantile":return t.scale.quantileCount;case"quantize":return t.scale.quantizeCount;case"threshold":return n!==void 0&&I(n)?n.length+1:(q(Dee(i)),3)}}function pae(e,t,n){const i=()=>{const r=di(t),s=di(e),o=`(${r} - ${s}) / (${n} - 1)`;return`sequence(${s}, ${r} + ${o}, ${o})`};return te(t)?new ut(i):{signal:i()}}function gae(e,t){switch(e){case"bar":case"tick":return t.scale.minBandSize;case"line":case"trail":case"rule":return t.scale.minStrokeWidth;case"text":return t.scale.minFontSize;case"point":case"square":case"circle":return t.scale.minSize}throw new Error(ng("size",e))}const p$=.95;function mae(e,t,n,i){const r={x:h$(n,"x"),y:h$(n,"y")};switch(e){case"bar":case"tick":{if(i.scale.maxBandSize!==void 0)return i.scale.maxBandSize;const s=g$(t,r,i.view);return Se(s)?s-1:new ut(()=>`${s.signal} - 1`)}case"line":case"trail":case"rule":return i.scale.maxStrokeWidth;case"text":return i.scale.maxFontSize;case"point":case"square":case"circle":{if(i.scale.maxSize)return i.scale.maxSize;const s=g$(t,r,i.view);return Se(s)?Math.pow(p$*s,2):new ut(()=>`pow(${p$} * ${s.signal}, 2)`)}}throw new Error(ng("size",e))}function g$(e,t,n){const i=tr(e.width)?e.width.step:cy(n,"width"),r=tr(e.height)?e.height.step:cy(n,"height");return t.x||t.y?new ut(()=>`min(${[t.x?t.x.signal:i,t.y?t.y.signal:r].join(", ")})`):Math.min(i,r)}function IN(e,t){Ge(e)?yae(e,t):zN(e,t)}function yae(e,t){const n=e.component.scales,{config:i,encoding:r,markDef:s,specifiedScales:o}=e;for(const a of U(n)){const u=o[a],l=n[a],c=e.getScaleComponent(a),f=st(r[a]),d=u[t],h=c.get("type"),p=c.get("padding"),g=c.get("paddingInner"),m=oy(h,t),y=bT(a,t);if(d!==void 0&&(m?y&&q(y):q(JO(h,t,a))),m&&y===void 0)if(d!==void 0){const b=f.timeUnit,x=f.type;switch(t){case"domainMax":case"domainMin":Jo(u[t])||x==="temporal"||b?l.set(t,{signal:hg(u[t],{type:x,timeUnit:b})},!0):l.set(t,u[t],!0);break;default:l.copyKeyFromObject(t,u)}}else{const b=j(m$,t)?m$[t]({model:e,channel:a,fieldOrDatumDef:f,scaleType:h,scalePadding:p,scalePaddingInner:g,domain:u.domain,domainMin:u.domainMin,domainMax:u.domainMax,markDef:s,config:i,hasNestedOffsetScale:HT(r,a),hasSecondaryRangeChannel:!!r[fr(a)]}):i.scale[t];b!==void 0&&l.set(t,b,!1)}}}const m$={bins:({model:e,fieldOrDatumDef:t})=>W(t)?bae(e,t):void 0,interpolate:({channel:e,fieldOrDatumDef:t})=>xae(e,t.type),nice:({scaleType:e,channel:t,domain:n,domainMin:i,domainMax:r,fieldOrDatumDef:s})=>vae(e,t,n,i,r,s),padding:({channel:e,scaleType:t,fieldOrDatumDef:n,markDef:i,config:r})=>Eae(e,t,r.scale,n,i,r.bar),paddingInner:({scalePadding:e,channel:t,markDef:n,scaleType:i,config:r,hasNestedOffsetScale:s})=>Aae(e,t,n.type,i,r.scale,s),paddingOuter:({scalePadding:e,channel:t,scaleType:n,scalePaddingInner:i,config:r,hasNestedOffsetScale:s})=>wae(e,t,n,i,r.scale,s),reverse:({fieldOrDatumDef:e,scaleType:t,channel:n,config:i})=>{const r=W(e)?e.sort:void 0;return Sae(t,r,n,i.scale)}
17,zero:({channel:e,fieldOrDatumDef:t,domain:n,markDef:i,scaleType:r,config:s,hasSecondaryRangeChannel:o})=>Cae(e,t,n,i,r,s.scale,o)};function BN(e){Ge(e)?uae(e):zN(e,"range")}function zN(e,t){const n=e.component.scales;for(const i of e.children)t==="range"?BN(i):IN(i,t);for(const i of U(n)){let r;for(const s of e.children){const o=s.component.scales[i];if(o){const a=o.getWithExplicit(t);r=ks(r,a,t,"scale",SM((u,l)=>{switch(t){case"range":return u.step&&l.step?u.step-l.step:0}return 0}))}}n[i].setWithExplicit(t,r)}}function bae(e,t){const n=t.bin;if(Le(n)){const i=CE(e,t.field,n);return new ut(()=>e.getSignalName(i))}else if(mt(n)&&Yo(n)&&n.step!==void 0)return{step:n.step}}function xae(e,t){if(ye([vn,lr,cr],e)&&t!=="nominal")return"hcl"}function vae(e,t,n,i,r,s){if(!(Ei(s)?.bin||I(n)||r!=null||i!=null||ye([bt.TIME,bt.UTC],e)))return Ze(t)?!0:void 0}function Eae(e,t,n,i,r,s){if(Ze(e)){if(qi(t)){if(n.continuousPadding!==void 0)return n.continuousPadding;const{type:o,orient:a}=r;if(o==="bar"&&!(W(i)&&(i.bin||i.timeUnit))&&(a==="vertical"&&e==="x"||a==="horizontal"&&e==="y"))return s.continuousBandSize}if(t===bt.POINT)return n.pointPadding}}function Aae(e,t,n,i,r,s=!1){if(e===void 0){if(Ze(t)){const{bandPaddingInner:o,barBandPaddingInner:a,rectBandPaddingInner:u,tickBandPaddingInner:l,bandWithNestedOffsetPaddingInner:c}=r;return s?c:Qe(o,n==="bar"?a:n==="tick"?l:u)}else if(Gc(t)&&i===bt.BAND)return r.offsetBandPaddingInner}}function wae(e,t,n,i,r,s=!1){if(e===void 0){if(Ze(t)){const{bandPaddingOuter:o,bandWithNestedOffsetPaddingOuter:a}=r;if(s)return a;if(n===bt.BAND)return Qe(o,te(i)?{signal:`${i.signal}/2`}:i/2)}else if(Gc(t)){if(n===bt.POINT)return .5;if(n===bt.BAND)return r.offsetBandPaddingOuter}}}function Sae(e,t,n,i){if(n==="x"&&i.xReverse!==void 0)return xi(e)&&t==="descending"?te(i.xReverse)?{signal:`!${i.xReverse.signal}`}:!i.xReverse:i.xReverse;if(xi(e)&&t==="descending")return!0}function Cae(e,t,n,i,r,s,o){if(!!n&&n!=="unaggregated"&&xi(r)){if(I(n)){const u=n[0],l=n[n.length-1];if(Se(u)&&u<=0&&Se(l)&&l>=0)return!0}return!1}if(e==="size"&&t.type==="quantitative"&&!eu(r))return!0;if(!(W(t)&&t.bin)&&ye([...Gr,...sZ],e)){const{orient:u,type:l}=i;return ye(["bar","area","line","trail"],l)&&(u==="horizontal"&&e==="y"||u==="vertical"&&e==="x")?!1:ye(["bar","area"],l)&&!o?!0:s?.zero}return!1}function $ae(e,t,n,i,r=!1){const s=Fae(t,n,i,r),{type:o}=e;return dr(t)?o!==void 0?hte(t,o)?W(n)&&!dte(o,n.type)?(q(pee(o,s)),s):o:(q(hee(t,o,s)),s):s:null}function Fae(e,t,n,i){switch(t.type){case"nominal":case"ordinal":{if(Oa(e)||j0(e)==="discrete")return e==="shape"&&t.type==="ordinal"&&q(q0(e,"ordinal")),"ordinal";if(U0(e))return"band";if(Ze(e)||Gc(e)){if(ye(["rect","bar","image","rule","tick"],n.type)||i)return"band"}else if(n.type==="arc"&&e in A2)return"band";const r=n[An(e)];return To(r)||nu(t)&&t.axis?.tickBand?"band":"point"}case"temporal":return Oa(e)?"time":j0(e)==="discrete"?(q(q0(e,"temporal")),"ordinal"):W(t)&&t.timeUnit&&ht(t.timeUnit).utc?"utc":U0(e)?"band":"time";case"quantitative":return Oa(e)?W(t)&&Le(t.bin)?"bin-ordinal":"linear":j0(e)==="discrete"?(q(q0(e,"quantitative")),"ordinal"):U0(e)?"band":"linear";case"geojson":return}throw new Error(YO(t.type))}function _ae(e,{ignoreRange:t}={}){UN(e),RN(e);for(const n of fte)IN(e,n);t||BN(e)}function UN(e){Ge(e)?e.component.scales=kae(e):e.component.scales=Rae(e)}function kae(e){const{encoding:t,mark:n,markDef:i}=e,r={};for(const s of w2){const o=st(t[s]);if(o&&n===ET&&s===En&&o.type===$u)continue;let a=o&&o.scale;if(o&&a!==null&&a!==!1){a??(a={});const u=HT(t,s),l=$ae(a,s,o,i,u);r[s]=new TN(e.scaleName(`${s}`,!0),{value:l,explicit:a.type===l})}}return r}const Dae=SM((e,t)=>gC(e)-gC(t));function Rae(e){var t;const n=e.component.scales={},i={},r=e.component.resolve;for(const s of e.children){UN(s);for(const o of U(s.component.scales))if((t=r.scale)[o]??(t[o]=bN(o,e)),r.scale[o]==="shared"){const a=i[o],u=s.component.scales[o].getWithExplicit("type");a?tte(a.value,u.value)?i[o]=ks(a,u,"type","scale",Dae):(r.scale[o]="independent",delete i[o]):i[o]=u}}for(const s of U(i)){const o=e.scaleName(s,!0),a=i[s];n[s]=new TN(o,a);for(const u of e.children){const l=u.component.scales[s];l&&(u.renameScale(l.get("name"),o),l.merged=!0)}}return n}class rm{constructor(){this.nameMap={}}rename(t,n){this.nameMap[t]=n}has(t){return this.nameMap[t]!==void 0}get(t){for(;this.nameMap[t]&&t!==this.nameMap[t];)t=this.nameMap[t];return t}}function Ge(e){return e?.type==="unit"}function Tn(e){return e?.type==="facet"}function DE(e){return e?.type==="concat"}function Ru(e){return e?.type==="layer"}class RE{constructor(t,n,i,r,s,o,a){this.type=n,this.parent=i,this.config=s,this.parent=i,this.config=s,this.view=yt(a),this.name=t.name??r,this.title=is(t.title)?{text:t.title}:t.title?yt(t.title):void 0,this.scaleNameMap=i?i.scaleNameMap:new rm,this.projectionNameMap=i?i.projectionNameMap:new rm,this.signalNameMap=i?i.signalNameMap:new rm,this.data=t.data,this.description=t.description,this.transforms=Fie(t.transform??[]),this.layout=n==="layer"||n==="unit"?{}:Rne(t,n,s),this.component={data:{sources:i?i.component.data.sources:[],outputNodes:i?i.component.data.outputNodes:{},outputNodeRefCounts:i?i.component.data.outputNodeRefCounts:{},isFaceted:cg(t)||i?.component.data.isFaceted&&t.data===void 0},layoutSize:new Vr,layoutHeaders:{row:{},column:{},facet:{}},mark:null,resolve:{scale:{},axis:{},legend:{},...o?le(o):{}},selection:null,scales:null,projection:null,axes:{},legends:{}}}
17get width(){return this.getSizeSignalRef("width")}get height(){return this.getSizeSignalRef("height")}parse(){this.parseScale(),this.parseLayoutSize(),this.renameTopLevelLayoutSizeSignal(),this.parseSelections(),this.parseProjection(),this.parseData(),this.parseAxesAndHeaders(),this.parseLegends(),this.parseMarkGroup()}parseScale(){_ae(this)}parseProjection(){_N(this)}renameTopLevelLayoutSizeSignal(){this.getName("width")!=="width"&&this.renameSignal(this.getName("width"),"width"),this.getName("height")!=="height"&&this.renameSignal(this.getName("height"),"height")}parseLegends(){wN(this)}assembleEncodeFromView(t){const{style:n,...i}=t,r={};for(const s of U(i)){const o=i[s];o!==void 0&&(r[s]=Be(o))}return r}assembleGroupEncodeEntry(t){let n={};return this.view&&(n=this.assembleEncodeFromView(this.view)),!t&&(this.description&&(n.description=Be(this.description)),this.type==="unit"||this.type==="layer")?{width:this.getSizeSignalRef("width"),height:this.getSizeSignalRef("height"),...n}:Oe(n)?void 0:n}assembleLayout(){if(!this.layout)return;const{spacing:t,...n}=this.layout,{component:i,config:r}=this,s=Jse(i.layoutHeaders,r);return{padding:t,...this.assembleDefaultLayout(),...n,...s?{titleBand:s}:{}}}assembleDefaultLayout(){return{}}assembleHeaderMarks(){const{layoutHeaders:t}=this.component;let n=[];for(const i of Wn)t[i].title&&n.push(Gse(this,i));for(const i of EE)n=n.concat(Hse(this,i));return n}assembleAxes(){return Ose(this.component.axes,this.config)}assembleLegends(){return CN(this)}assembleProjections(){return voe(this)}assembleTitle(){const{encoding:t,...n}=this.title??{},i={...zO(this.config.title).nonMarkTitleProperties,...n,...t?{encode:{update:t}}:{}};if(i.text)return ye(["unit","layer"],this.type)?ye(["middle",void 0],i.anchor)&&(i.frame??(i.frame="group")):i.anchor??(i.anchor="start"),Oe(i)?void 0:i}assembleGroup(t=[]){const n={};t=t.concat(this.assembleSignals()),t.length>0&&(n.signals=t);const i=this.assembleLayout();i&&(n.layout=i),n.marks=[].concat(this.assembleHeaderMarks(),this.assembleMarks());const r=!this.parent||Tn(this.parent)?ON(this):[];r.length>0&&(n.scales=r);const s=this.assembleAxes();s.length>0&&(n.axes=s);const o=this.assembleLegends();return o.length>0&&(n.legends=o),n}getName(t){return je((this.name?`${this.name}_`:"")+t)}getDataName(t){return this.getName(He[t].toLowerCase())}requestDataName(t){const n=this.getDataName(t),i=this.component.data.outputNodeRefCounts;return i[n]=(i[n]||0)+1,n}getSizeSignalRef(t){if(Tn(this.parent)){const n=mN(t),i=Zp(n),r=this.component.scales[i];if(r&&!r.merged){const s=r.get("type"),o=r.get("range");if(pt(s)&&Ko(o)){const a=r.get("name"),u=kg(this,i),l=kE(u);if(l){const c=V({aggregate:"distinct",field:l},{expr:"datum"});return{signal:gN(a,r,c)}}else return q($2(i)),null}}}return{signal:this.signalNameMap.get(this.getName(t))}}lookupDataSource(t){const n=this.component.data.outputNodes[t];return n?n.getSource():t}getSignalName(t){return this.signalNameMap.get(t)}renameSignal(t,n){this.signalNameMap.rename(t,n)}renameScale(t,n){this.scaleNameMap.rename(t,n)}renameProjection(t,n){this.projectionNameMap.rename(t,n)}scaleName(t,n){if(n)return this.getName(t);if(OO(t)&&dr(t)&&this.component.scales[t]||this.scaleNameMap.has(this.getName(t)))return this.scaleNameMap.get(this.getName(t))}projectionName(t){if(t)return this.getName("projection");if(this.component.projection&&!this.component.projection.merged||this.projectionNameMap.has(this.getName("projection")))return this.projectionNameMap.get(this.getName("projection"))}getScaleComponent(t){if(!this.component.scales)throw new Error("getScaleComponent cannot be called before parseScale(). Make sure you have called parseScale or use parseUnitModelWithScale().");const n=this.component.scales[t];return n&&!n.merged?n:this.parent?this.parent.getScaleComponent(t):void 0}getScaleType(t){const n=this.getScaleComponent(t);return n?n.get("type"):void 0}getSelectionComponent(t,n){let i=this.component.selection[t];if(!i&&this.parent&&(i=this.parent.getSelectionComponent(t,n)),!i)throw new Error(kZ(n));return i}hasAxisOrientSignalRef(){return this.component.axes.x?.some(t=>t.hasOrientSignalRef())||this.component.axes.y?.some(t=>t.hasOrientSignalRef())}}class jN extends RE{vgField(t,n={}){const i=this.fieldDef(t);if(i)return V(i,n)}reduceFieldDef(t,n){return one(this.getMapping(),(i,r,s)=>{const o=Ei(r);return o?t(i,o,s):i},n)}forEachFieldDef(t,n){eE(this.getMapping(),(i,r)=>{const s=Ei(i);s&&t(s,r)},n)}}class Dg extends De{clone(){return new Dg(null,le(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=le(n);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??"value",i[1]??"density"];const r=this.transform.resolve??"shared";this.transform.resolve=r}dependentFields(){return new Set([this.transform.density,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`DensityTransform ${be(this.transform)}`}assemble(){const{density:t,...n}=this.transform,i={type:"kde",field:t,...n};return i.resolve=this.transform.resolve,i}}class Rg extends De{clone(){return new Rg(null,le(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=le(n)}dependentFields(){return new Set([this.transform.extent])}producedFields(){return new Set([])}hash(){return`ExtentTransform ${be(this.transform)}`}assemble(){const{extent:t,param:n}=this.transform;return{type:"extent",field:t,signal:n}}}class Og extends De{clone(){return new Og(this.parent,le(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=le(n);const{flatten:i,as:r=[]}=this.transform;this.transform.as=i.map((s,o)=>r[o]??s)}dependentFields(){return new Set(this.transform.flatten)}producedFields(){return new Set(this.transform.as)}hash(){return`FlattenTransform ${be(this.transform)}`}assemble(){const{flatten:t,as:n}=this.transform;return{type:"flatten",fields:t,as:n}}}class Tg extends De{clone(){return new Tg(null,le(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=le(n);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??"key",i[1]??"value"]}dependentFields(){return new Set(this.transform.fold)}producedFields(){return new Set(this.transform.as)}hash(){return`FoldTransform ${be(this.transform)}`}assemble(){const{fold:t,as:n}=this.transform;return{type:"fold",fields:t,as:n}}}class Na extends De{clone(){return new Na(null,le(this.fields),this.geojson,this.signal)}static parseAll(t,n){if(n.component.projection&&!n.component.projection.isFit)return t;let i=0;for(const r of[[ki,_i],[Zn,Di]]){const s=r.map(o=>{const a=st(n.encoding[o]);return W(a)?a.field:hr(a)?{expr:`${a.datum}`}:vi(a)?{expr:`${a.value}`}:void 0});(s[0]||s[1])&&(t=new Na(t,s,null,n.getName(`geojson_${i++}`)))}if(n.channelHasField(En)){const r=n.typedFieldDef(En);r.type===$u&&(t=new Na(t,null,r.field,n.getName(`geojson_${i++}`)))}return t}constructor(t,n,i,r){super(t),this.fields=n,this.geojson=i,this.signal=r}dependentFields(){const t=(this.fields??[]).filter(Y);return new Set([...this.geojson?[this.geojson]:[],...t])}producedFields(){return new Set}hash(){return`GeoJSON ${this.geojson} ${this.signal} ${be(this.fields)}`}assemble(){return[...this.geojson?[{type:"filter",expr:`isValid(datum["${this.geojson}"])`}]:[],{type:"geojson",...this.fields?{fields:this.fields}:{},...this.geojson?{geojson:this.geojson}:{},signal:this.signal}]}}class cc extends De{clone(){return new cc(null,this.projection,le(this.fields),le(this.as))}constructor(t,n,i,r){super(t),this.projection=n,this.fields=i,this.as=r}static parseAll(t,n){if(!n.projectionName())return t;for(const i of[[ki,_i],[Zn,Di]]){const r=i.map(o=>{const a=st(n.encoding[o]);return W(a)?a.field:hr(a)?{expr:`${a.datum}`}:vi(a)?{expr:`${a.value}`}:void 0}),s=i[0]===Zn?"2":"";(r[0]||r[1])&&(t=new cc(t,n.projectionName(),r,[n.getName(`x${s}`),n.getName(`y${s}`)]))}return t}dependentFields(){return new Set(this.fields.filter(Y))}producedFields(){return new Set(this.as)}hash(){return`Geopoint ${this.projection} ${be(this.fields)} ${be(this.as)}`}assemble(){return{type:"geopoint",projection:this.projection,fields:this.fields,as:this.as}}}class yo extends De{clone(){return new yo(null,le(this.transform))}constructor(t,n){super(t),this.transform=n}dependentFields(){return new Set([this.transform.impute,this.transform.key,...this.transform.groupby??[]])}producedFields(){return new Set([this.transform.impute])}processSequence(t){const{start:n=0,stop:i,step:r}=t;return{signal:`sequence(${[n,i,...r?[r]:[]].join(",")})`}}static makeFromTransform(t,n){return new yo(t,n)}static makeFromEncoding(t,n){const i=n.encoding,r=i.x,s=i.y;if(W(r)&&W(s)){const o=r.impute?r:s.impute?s:void 0;if(o===void 0)return;const a=r.impute?s:s.impute?r:void 0,{method:u,value:l,frame:c,keyvals:f}=o.impute,d=YT(n.mark,i);return new yo(t,{impute:o.field,key:a.field,...u?{method:u}:{},...l!==void 0?{value:l}:{},...c?{frame:c}:{},...f!==void 0?{keyvals:f}:{},...d.length?{groupby:d}:{}}
17)}return null}hash(){return`Impute ${be(this.transform)}`}assemble(){const{impute:t,key:n,keyvals:i,method:r,groupby:s,value:o,frame:a=[null,null]}=this.transform,u={type:"impute",field:t,key:n,...i?{keyvals:uie(i)?this.processSequence(i):i}:{},method:"value",...s?{groupby:s}:{},value:!r||r==="value"?o:null};if(r&&r!=="value"){const l={type:"window",as:[`imputed_${t}_value`],ops:[r],fields:[t],frame:a,ignorePeers:!1,...s?{groupby:s}:{}},c={type:"formula",expr:`datum.${t} === null ? datum.imputed_${t}_value : datum.${t}`,as:t};return[u,l,c]}else return[u]}}class Mg extends De{clone(){return new Mg(null,le(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=le(n);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??n.on,i[1]??n.loess]}dependentFields(){return new Set([this.transform.loess,this.transform.on,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`LoessTransform ${be(this.transform)}`}assemble(){const{loess:t,on:n,...i}=this.transform;return{type:"loess",x:n,y:t,...i}}}class fc extends De{clone(){return new fc(null,le(this.transform),this.secondary)}constructor(t,n,i){super(t),this.transform=n,this.secondary=i}static make(t,n,i,r){const s=n.component.data.sources,{from:o}=i;let a=null;if(lie(o)){let u=GN(o.data,s);u||(u=new Bo(o.data),s.push(u));const l=n.getName(`lookup_${r}`);a=new mn(u,l,He.Lookup,n.component.data.outputNodeRefCounts),n.component.data.outputNodes[l]=a}else if(cie(o)){const u=o.param;i={as:u,...i};let l;try{l=n.getSelectionComponent(je(u),u)}catch{throw new Error(TZ(u))}if(a=l.materialized,!a)throw new Error(MZ(u))}return new fc(t,i,a.getSource())}dependentFields(){return new Set([this.transform.lookup])}producedFields(){return new Set(this.transform.as?K(this.transform.as):this.transform.from.fields)}hash(){return`Lookup ${be({transform:this.transform,secondary:this.secondary})}`}assemble(){let t;if(this.transform.from.fields)t={values:this.transform.from.fields,...this.transform.as?{as:K(this.transform.as)}:{}};else{let n=this.transform.as;Y(n)||(q(GZ),n="_lookup"),t={as:[n]}}return{type:"lookup",from:this.secondary,key:this.transform.from.key,fields:[this.transform.lookup],...t,...this.transform.default?{default:this.transform.default}:{}}}}class Ng extends De{clone(){return new Ng(null,le(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=le(n);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??"prob",i[1]??"value"]}dependentFields(){return new Set([this.transform.quantile,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`QuantileTransform ${be(this.transform)}`}assemble(){const{quantile:t,...n}=this.transform;return{type:"quantile",field:t,...n}}}class Lg extends De{clone(){return new Lg(null,le(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=le(n);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??n.on,i[1]??n.regression]}dependentFields(){return new Set([this.transform.regression,this.transform.on,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`RegressionTransform ${be(this.transform)}`}assemble(){const{regression:t,on:n,...i}=this.transform;return{type:"regression",x:n,y:t,...i}}}class Pg extends De{clone(){return new Pg(null,le(this.transform))}constructor(t,n){super(t),this.transform=n}addDimensions(t){this.transform.groupby=ji((this.transform.groupby??[]).concat(t),n=>n)}producedFields(){}dependentFields(){return new Set([this.transform.pivot,this.transform.value,...this.transform.groupby??[]])}hash(){return`PivotTransform ${be(this.transform)}`}assemble(){const{pivot:t,value:n,groupby:i,limit:r,op:s}=this.transform;return{type:"pivot",field:t,value:n,...r!==void 0?{limit:r}:{},...s!==void 0?{op:s}:{},...i!==void 0?{groupby:i}:{}}}}class Ig extends De{clone(){return new Ig(null,le(this.transform))}constructor(t,n){super(t),this.transform=n}dependentFields(){return new Set}producedFields(){return new Set}hash(){return`SampleTransform ${be(this.transform)}`}assemble(){return{type:"sample",size:this.transform.sample}}}function qN(e){let t=0;function n(i,r){if(i instanceof Bo&&!i.isGenerator&&!ru(i.data)&&(e.push(r),r={name:null,source:r.name,transform:[]}),i instanceof Nt&&(i.parent instanceof Bo&&!r.source?(r.format={...r.format,parse:i.assembleFormatParse()},r.transform.push(...i.assembleTransforms(!0))):r.transform.push(...i.assembleTransforms())),i instanceof ku){r.name||(r.name=`data_${t++}`),!r.source||r.transform.length>0?(e.push(r),i.data=r.name):i.data=r.source,e.push(...i.assemble());return}switch((i instanceof sf||i instanceof of||i instanceof lu||i instanceof _u||i instanceof ou||i instanceof cc||i instanceof gi||i instanceof fc||i instanceof Du||i instanceof na||i instanceof Tg||i instanceof Og||i instanceof Dg||i instanceof Mg||i instanceof Ng||i instanceof Lg||i instanceof Ds||i instanceof Ig||i instanceof Pg||i instanceof Rg)&&r.transform.push(i.assemble()),(i instanceof Xi||i instanceof Hi||i instanceof yo||i instanceof Tr||i instanceof Na)&&r.transform.push(...i.assemble()),i instanceof mn&&(r.source&&r.transform.length===0?i.setSource(r.source):i.parent instanceof mn?i.setSource(r.name):(r.name||(r.name=`data_${t++}`),i.setSource(r.name),i.numChildren()===1&&(e.push(r),r={name:null,source:r.name,transform:[]}))),i.numChildren()){case 0:i instanceof mn&&(!r.source||r.transform.length>0)&&e.push(r);break;case 1:n(i.children[0],r);break;default:{r.name||(r.name=`data_${t++}`);let s=r.name;!r.source||r.transform.length>0?e.push(r):s=r.source;for(const o of i.children)n(o,{name:null,source:s,transform:[]});break}}}return n}function Oae(e){const t=[],n=qN(t);for(const i of e.children)n(i,{source:e.name,name:null,transform:[]});return t}function Tae(e,t){const n=[],i=qN(n);let r=0;
17for(const o of e.sources){o.hasName()||(o.dataName=`source_${r++}`);const a=o.assemble();i(o,a)}for(const o of n)o.transform.length===0&&delete o.transform;let s=0;for(const[o,a]of n.entries())(a.transform??[]).length===0&&!a.source&&n.splice(s++,0,n.splice(o,1)[0]);for(const o of n)for(const a of o.transform??[])a.type==="lookup"&&(a.from=e.outputNodes[a.from].getSource());for(const o of n)o.name in t&&(o.values=t[o.name]);return n}function Mae(e){return e==="top"||e==="left"||te(e)?"header":"footer"}function Nae(e){for(const t of Wn)Lae(e,t);y$(e,"x"),y$(e,"y")}function Lae(e,t){const{facet:n,config:i,child:r,component:s}=e;if(e.channelHasField(t)){const o=n[t],a=uu("title",null,i,t);let u=Ta(o,i,{allowDisabling:!0,includeDefault:a===void 0||!!a});r.component.layoutHeaders[t].title&&(u=I(u)?u.join(", "):u,u+=` / ${r.component.layoutHeaders[t].title}`,r.component.layoutHeaders[t].title=null);const l=uu("labelOrient",o.header,i,t),c=o.header!==null?Qe(o.header?.labels,i.header.labels,!0):!1,f=ye(["bottom","right"],l)?"footer":"header";s.layoutHeaders[t]={title:o.header!==null?u:null,facetFieldDef:o,[f]:t==="facet"?[]:[WN(e,t,c)]}}}function WN(e,t,n){const i=t==="row"?"height":"width";return{labels:n,sizeSignal:e.child.component.layoutSize.get(i)?e.child.getSizeSignalRef(i):void 0,axes:[]}}function y$(e,t){const{child:n}=e;if(n.component.axes[t]){const{layoutHeaders:i,resolve:r}=e.component;if(r.axis[t]=SE(r,t),r.axis[t]==="shared"){const s=t==="x"?"column":"row",o=i[s];for(const a of n.component.axes[t]){const u=Mae(a.get("orient"));o[u]??(o[u]=[WN(e,s,!1)]);const l=El(a,"main",e.config,{header:!0});l&&o[u][0].axes.push(l),a.mainExtracted=!0}}}}function Pae(e){OE(e),Uh(e,"width"),Uh(e,"height")}function Iae(e){OE(e);const t=e.layout.columns===1?"width":"childWidth",n=e.layout.columns===void 0?"height":"childHeight";Uh(e,t),Uh(e,n)}function OE(e){for(const t of e.children)t.parseLayoutSize()}function Uh(e,t){const n=mN(t),i=Zp(n),r=e.component.resolve,s=e.component.layoutSize;let o;for(const a of e.children){const u=a.component.layoutSize.getWithExplicit(n),l=r.scale[i]??bN(i,e);if(l==="independent"&&u.value==="step"){o=void 0;break}if(o){if(l==="independent"&&o.value!==u.value){o=void 0;break}o=ks(o,u,n,"")}else o=u}if(o){for(const a of e.children)e.renameSignal(a.getName(n),e.getName(t)),a.component.layoutSize.set(n,"merged",!1);s.setWithExplicit(t,o)}else s.setWithExplicit(t,{explicit:!1,value:void 0})}function Bae(e){const{size:t,component:n}=e;for(const i of Gr){const r=An(i);if(t[r]){const s=t[r];n.layoutSize.set(r,tr(s)?"step":s,!0)}else{const s=zae(e,r);n.layoutSize.set(r,s,!1)}}}function zae(e,t){const n=t==="width"?"x":"y",i=e.config,r=e.getScaleComponent(n);if(r){const s=r.get("type"),o=r.get("range");if(pt(s)){const a=Lh(i.view,t);return Ko(o)||tr(a)?"step":a}else return ly(i.view,t)}else{if(e.hasProjection||e.mark==="arc")return ly(i.view,t);{const s=Lh(i.view,t);return tr(s)?s.step:s}}}function ky(e,t,n){return V(t,{suffix:`by_${V(e)}`,...n})}class Il extends jN{constructor(t,n,i,r){super(t,"facet",n,i,r,t.resolve),this.child=PE(t.spec,this,this.getName("child"),void 0,r),this.children=[this.child],this.facet=this.initFacet(t.facet)}initFacet(t){if(!Yc(t))return{facet:this.initFacetFieldDef(t,"facet")};const n=U(t),i={};for(const r of n){if(![kr,Dr].includes(r)){q(ng(r,"facet"));break}const s=t[r];if(s.field===void 0){q(ry(s,r));break}i[r]=this.initFacetFieldDef(s,r)}return i}initFacetFieldDef(t,n){const i=Z2(t,n);return i.header?i.header=yt(i.header):i.header===null&&(i.header=null),i}channelHasField(t){return j(this.facet,t)}fieldDef(t){return this.facet[t]}parseData(){this.component.data=Bg(this),this.child.parseData()}parseLayoutSize(){OE(this)}parseSelections(){this.child.parseSelections(),this.component.selection=this.child.component.selection,Object.values(this.component.selection).some(t=>Vi(t))&&_2(F2)}parseMarkGroup(){this.child.parseMarkGroup()}parseAxesAndHeaders(){this.child.parseAxesAndHeaders(),Nae(this)}assembleSelectionTopLevelSignals(t){return this.child.assembleSelectionTopLevelSignals(t)}assembleSignals(){return this.child.assembleSignals(),[]}assembleSelectionData(t){return this.child.assembleSelectionData(t)}getHeaderLayoutMixins(){const t={};for(const n of Wn)for(const i of AE){const r=this.component.layoutHeaders[n],s=r[i],{facetFieldDef:o}=r;if(o){const a=uu("titleOrient",o.header,this.config,n);if(["right","bottom"].includes(a)){const u=Fg(n,a);t.titleAnchor??(t.titleAnchor={}),t.titleAnchor[u]="end"}}if(s?.[0]){const a=n==="row"?"height":"width",u=i==="header"?"headerBand":"footerBand";n!=="facet"&&!this.child.component.layoutSize.get(a)&&(t[u]??(t[u]={}),t[u][n]=.5),r.title&&(t.offset??(t.offset={}),t.offset[n==="row"?"rowTitle":"columnTitle"]=10)}}return t}assembleDefaultLayout(){const{column:t,row:n}=this.facet,i=t?this.columnDistinctSignal():n?1:void 0;let r="all";return(!n&&this.component.resolve.scale.x==="independent"||!t&&this.component.resolve.scale.y==="independent")&&(r="none"),{...this.getHeaderLayoutMixins(),...i?{columns:i}:{},bounds:"full",align:r}}assembleLayoutSignals(){return this.child.assembleLayoutSignals()}columnDistinctSignal(){if(!(this.parent&&this.parent instanceof Il))return{signal:`length(data('${this.getName("column_domain")}'))`}}assembleGroupStyle(){}assembleGroup(t){return this.parent&&this.parent instanceof Il?{...this.channelHasField("column")?{encode:{update:{columns:{field:V(this.facet.column,{prefix:"distinct"})}}}}:{},...super.assembleGroup(t)}:super.assembleGroup(t)}getCardinalityAggregateForChild(){const t=[],n=[],i=[];if(this.child instanceof Il){if(this.child.channelHasField("column")){const r=V(this.child.facet.column);t.push(r),n.push("distinct"),i.push(`distinct_${r}`)}}else for(const r of Gr){const s=this.child.component.scales[r];if(s&&!s.merged){const o=s.get("type"),a=s.get("range");if(pt(o)&&Ko(a)){const u=kg(this.child,r),l=kE(u);l?(t.push(l),n.push("distinct"),i.push(`distinct_${l}`)):q($2(r))}}}return{fields:t,ops:n,as:i}}assembleFacet(){const{name:t,data:n}=this.component.data.facetRoot,{row:i,column:r}=this.facet,{fields:s,ops:o,as:a}=this.getCardinalityAggregateForChild(),u=[];for(const c of Wn){const f=this.facet[c];if(f){u.push(V(f));const{bin:d,sort:h}=f;if(Le(d)&&u.push(V(f,{binSuffix:"end"})),Rr(h)){const{field:p,op:g=lg}=h,m=ky(f,h);i&&r?(s.push(m),o.push("max"),a.push(m)):(s.push(p),o.push(g),a.push(m))}else if(I(h)){const p=au(f,c);s.push(p),o.push("max"),a.push(p)}}}const l=!!i&&!!r;return{name:t,data:n,groupby:u,...l||s.length>0?{aggregate:{...l?{cross:l}:{},...s.length?{fields:s,ops:o,as:a}:{}}}:{}}}facetSortFields(t){const{facet:n}=this,i=n[t];return i?Rr(i.sort)?[ky(i,i.sort,{expr:"datum"})]:I(i.sort)?[au(i,t,{expr:"datum"})]:[V(i,{expr:"datum"})]:[]}facetSortOrder(t){const{facet:n}=this,i=n[t];if(i){const{sort:r}=i;return[(Rr(r)?r.order:!I(r)&&r)||"ascending"]}return[]}assembleLabelTitle(){const{facet:t,config:n}=this;if(t.facet)return Ay(t.facet,"facet",n);const i={row:["top","bottom"],column:["left","right"]};for(const r of EE)if(t[r]){const s=uu("labelOrient",t[r]?.header,n,r);if(i[r].includes(s))return Ay(t[r],r,n)}}assembleMarks(){const{child:t}=this,n=this.component.data.facetRoot,i=Oae(n),r=t.assembleGroupEncodeEntry(!1),s=this.assembleLabelTitle()||t.assembleTitle(),o=t.assembleGroupStyle();return[{name:this.getName("cell"),type:"group",...s?{title:s}:{},...o?{style:o}:{},from:{facet:this.assembleFacet()},sort:{field:Wn.map(u=>
17this.facetSortFields(u)).flat(),order:Wn.map(u=>this.facetSortOrder(u)).flat()},...i.length>0?{data:i}:{},...r?{encode:{update:r}}:{},...t.assembleGroup(Hie(this,[]))}]}getMapping(){return this.facet}}function Uae(e,t){const{row:n,column:i}=t;if(n&&i){let r=null;for(const s of[n,i])if(Rr(s.sort)){const{field:o,op:a=lg}=s.sort;e=r=new na(e,{joinaggregate:[{op:a,field:o,as:ky(s,s.sort,{forAs:!0})}],groupby:[V(s)]})}return r}return null}function GN(e,t){for(const n of t){const i=n.data;if(e.name&&n.hasName()&&e.name!==n.dataName)continue;const r=e.format?.mesh,s=i.format?.feature;if(r&&s)continue;const o=e.format?.feature;if((o||s)&&o!==s)continue;const a=i.format?.mesh;if(!((r||a)&&r!==a)){if(ac(e)&&ac(i)){if(kn(e.values,i.values))return n}else if(ru(e)&&ru(i)){if(e.url===i.url)return n}else if(CM(e)&&e.name===n.dataName)return n}}return null}function jae(e,t){if(e.data||!e.parent){if(e.data===null){const i=new Bo({values:[]});return t.push(i),i}const n=GN(e.data,t);if(n)return xs(e.data)||(n.data.format=vO({},e.data.format,n.data.format)),!n.hasName()&&e.data.name&&(n.dataName=e.data.name),n;{const i=new Bo(e.data);return t.push(i),i}}else return e.parent.component.data.facetRoot?e.parent.component.data.facetRoot:e.parent.component.data.main}function qae(e,t,n){let i=0;for(const r of t.transforms){let s,o;if(vie(r))o=e=new ou(e,r),s="derived";else if(fE(r)){const a=Toe(r);o=e=Nt.makeWithAncestors(e,{},a,n)??e,e=new _u(e,t,r.filter)}else if(vM(r))o=e=Xi.makeFromTransform(e,r,t),s="number";else if(Aie(r))s="date",n.getWithExplicit(r.field).value===void 0&&(e=new Nt(e,{[r.field]:s}),n.set(r.field,s,!1)),o=e=Hi.makeFromTransform(e,r);else if(wie(r))o=e=gi.makeFromTransform(e,r),s="number",yE(t)&&(e=new Ds(e));else if(xM(r))o=e=fc.make(e,t,r,i++),s="derived";else if(yie(r))o=e=new Du(e,r),s="number";else if(bie(r))o=e=new na(e,r),s="number";else if(Sie(r))o=e=Tr.makeFromTransform(e,r),s="derived";else if(Cie(r))o=e=new Tg(e,r),s="derived";else if($ie(r))o=e=new Rg(e,r),s="derived";else if(xie(r))o=e=new Og(e,r),s="derived";else if(fie(r))o=e=new Pg(e,r),s="derived";else if(mie(r))e=new Ig(e,r);else if(Eie(r))o=e=yo.makeFromTransform(e,r),s="derived";else if(die(r))o=e=new Dg(e,r),s="derived";else if(hie(r))o=e=new Ng(e,r),s="derived";else if(pie(r))o=e=new Lg(e,r),s="derived";else if(gie(r))o=e=new Mg(e,r),s="derived";else{q(WZ(r));continue}if(o&&s!==void 0)for(const a of o.producedFields()??[])n.set(a,s,!1)}return e}function Bg(e){let t=jae(e,e.component.data.sources);const{outputNodes:n,outputNodeRefCounts:i}=e.component.data,r=e.data,o=!(r&&(xs(r)||ru(r)||ac(r)))&&e.parent?e.parent.component.data.ancestorParse.clone():new Iie;xs(r)?($M(r)?t=new of(t,r.sequence):dE(r)&&(t=new sf(t,r.graticule)),o.parseNothing=!0):r?.format?.parse===null&&(o.parseNothing=!0),t=Nt.makeExplicit(t,e,o)??t,t=new Ds(t);const a=e.parent&&Ru(e.parent);(Ge(e)||Tn(e))&&a&&(t=Xi.makeFromEncoding(t,e)??t),e.transforms.length>0&&(t=qae(t,e,o));const u=Noe(e),l=Moe(e);t=Nt.makeWithAncestors(t,{},{...u,...l},o)??t,Ge(e)&&(t=Na.parseAll(t,e),t=cc.parseAll(t,e)),(Ge(e)||Tn(e))&&(a||(t=Xi.makeFromEncoding(t,e)??t),t=Hi.makeFromEncoding(t,e)??t,t=ou.parseAllForSortIndex(t,e));const c=t=zf(He.Raw,e,t);if(Ge(e)){const m=gi.makeFromEncoding(t,e);m&&(t=m,yE(e)&&(t=new Ds(t))),t=yo.makeFromEncoding(t,e)??t,t=Tr.makeFromEncoding(t,e)??t}let f,d;if(Ge(e)){const{markDef:m,mark:y,config:b}=e,x=Re("invalid",m,b),{marks:v,scales:A}=d=_M({invalid:x,isPath:Us(y)});v!==A&&A==="include-invalid-values"&&(f=t=zf(He.PreFilterInvalid,e,t)),v==="exclude-invalid-values"&&(t=lu.make(t,e,d)??t)}const h=t=zf(He.Main,e,t);let p;if(Ge(e)&&d){const{marks:m,scales:y}=d;m==="include-invalid-values"&&y==="exclude-invalid-values"&&(t=lu.make(t,e,d)??t,p=t=zf(He.PostFilterInvalid,e,t))}Ge(e)&&Dse(e,h);let g=null;if(Tn(e)){const m=e.getName("facet");t=Uae(t,e.facet)??t,g=new ku(t,e,m,h.getSource()),n[m]=g}return{...e.component.data,outputNodes:n,outputNodeRefCounts:i,raw:c,main:h,facetRoot:g,ancestorParse:o,preFilterInvalid:f,postFilterInvalid:p}}function zf(e,t,n){const{outputNodes:i,outputNodeRefCounts:r}=t.component.data,s=t.getDataName(e),o=new mn(n,s,e,r);return i[s]=o,o}class Wae extends RE{constructor(t,n,i,r){super(t,"concat",n,i,r,t.resolve),(t.resolve?.axis?.x==="shared"||t.resolve?.axis?.y==="shared")&&q(UZ),this.children=this.getChildren(t).map((s,o)=>PE(s,this,this.getName(`concat_${o}`),void 0,r))}parseData(){this.component.data=Bg(this);for(const t of this.children)t.parseData()}parseSelections(){this.component.selection={};for(const t of this.children){t.parseSelections();for(const n of U(t.component.selection))this.component.selection[n]=t.component.selection[n]}Object.values(this.component.selection).some(t=>Vi(t))&&_2(F2)}parseMarkGroup(){for(const t of this.children)t.parseMarkGroup()}parseAxesAndHeaders(){for(const t of this.children)t.parseAxesAndHeaders()}getChildren(t){return mg(t)?t.vconcat:lE(t)?t.hconcat:t.concat}parseLayoutSize(){Iae(this)}parseAxisGroup(){return null}assembleSelectionTopLevelSignals(t){return this.children.reduce((n,i)=>i.assembleSelectionTopLevelSignals(n),t)}
17assembleSignals(){return this.children.forEach(t=>t.assembleSignals()),[]}assembleLayoutSignals(){const t=wE(this);for(const n of this.children)t.push(...n.assembleLayoutSignals());return t}assembleSelectionData(t){return this.children.reduce((n,i)=>i.assembleSelectionData(n),t)}assembleMarks(){return this.children.map(t=>{const n=t.assembleTitle(),i=t.assembleGroupStyle(),r=t.assembleGroupEncodeEntry(!1);return{type:"group",name:t.getName("group"),...n?{title:n}:{},...i?{style:i}:{},...r?{encode:{update:r}}:{},...t.assembleGroup()}})}assembleGroupStyle(){}assembleDefaultLayout(){const t=this.layout.columns;return{...t!=null?{columns:t}:{},bounds:"full",align:"each"}}}function Gae(e){return e===!1||e===null}const Hae={disable:1,gridScale:1,scale:1,...qT,labelExpr:1,encode:1},HN=U(Hae);class TE extends Vr{constructor(t={},n={},i=!1){super(),this.explicit=t,this.implicit=n,this.mainExtracted=i}clone(){return new TE(le(this.explicit),le(this.implicit),this.mainExtracted)}hasAxisPart(t){return t==="axis"?!0:t==="grid"||t==="title"?!!this.get(t):!Gae(this.get(t))}hasOrientSignalRef(){return te(this.explicit.orient)}}function Vae(e,t,n){const{encoding:i,config:r}=e,s=st(i[t])??st(i[fr(t)]),o=e.axis(t)||{},{format:a,formatType:u}=o;if(Mo(u))return{text:hi({fieldOrDatumDef:s,field:"datum.value",format:a,formatType:u,config:r}),...n};if(a===void 0&&u===void 0&&r.customFormatTypes){if(tu(s)==="quantitative"){if(nu(s)&&s.stack==="normalize"&&r.normalizedNumberFormatType)return{text:hi({fieldOrDatumDef:s,field:"datum.value",format:r.normalizedNumberFormat,formatType:r.normalizedNumberFormatType,config:r}),...n};if(r.numberFormatType)return{text:hi({fieldOrDatumDef:s,field:"datum.value",format:r.numberFormat,formatType:r.numberFormatType,config:r}),...n}}if(tu(s)==="temporal"&&r.timeFormatType&&W(s)&&!s.timeUnit)return{text:hi({fieldOrDatumDef:s,field:"datum.value",format:r.timeFormat,formatType:r.timeFormatType,config:r}),...n}}return n}function Xae(e){return Gr.reduce((t,n)=>(e.component.scales[n]&&(t[n]=[tue(n,e)]),t),{})}const Yae={bottom:"top",top:"bottom",left:"right",right:"left"};function Kae(e){const{axes:t,resolve:n}=e.component,i={top:0,bottom:0,right:0,left:0};for(const r of e.children){r.parseAxesAndHeaders();for(const s of U(r.component.axes))n.axis[s]=SE(e.component.resolve,s),n.axis[s]==="shared"&&(t[s]=Jae(t[s],r.component.axes[s]),t[s]||(n.axis[s]="independent",delete t[s]))}for(const r of Gr){for(const s of e.children)if(s.component.axes[r]){if(n.axis[r]==="independent"){t[r]=(t[r]??[]).concat(s.component.axes[r]);for(const o of s.component.axes[r]){const{value:a,explicit:u}=o.getWithExplicit("orient");if(!te(a)){if(i[a]>0&&!u){const l=Yae[a];i[a]>i[l]&&o.set("orient",l,!1)}i[a]++}}}delete s.component.axes[r]}if(n.axis[r]==="independent"&&t[r]&&t[r].length>1)for(const[s,o]of(t[r]||[]).entries())s>0&&o.get("grid")&&!o.explicit.grid&&(o.implicit.grid=!1)}}function Jae(e,t){if(e){if(e.length!==t.length)return;const n=e.length;for(let i=0;i<n;i++){const r=e[i],s=t[i];if(!!r!=!!s)return;if(r&&s){const o=r.getWithExplicit("orient"),a=s.getWithExplicit("orient");if(o.explicit&&a.explicit&&o.value!==a.value)return;e[i]=Qae(r,s)}}}else return t.map(n=>n.clone());return e}function Qae(e,t){for(const n of HN){const i=ks(e.getWithExplicit(n),t.getWithExplicit(n),n,"axis",(r,s)=>{switch(n){case"title":return VO(r,s);case"gridScale":return{explicit:r.explicit,value:Qe(r.value,s.value)}}return bg(r,s,n,"axis")});e.setWithExplicit(n,i)}return e}function Zae(e,t,n,i,r){if(t==="disable")return n!==void 0;switch(n=n||{},t){case"titleAngle":case"labelAngle":return e===(te(n.labelAngle)?n.labelAngle:sc(n.labelAngle));case"values":return!!n.values;case"encode":return!!n.encoding||!!n.labelAngle;case"title":if(e===fN(i,r))return!0}return e===n[t]}const eue=new Set(["grid","translate","format","formatType","orient","labelExpr","tickCount","position","tickMinStep"]);function tue(e,t){let n=t.axis(e);const i=new TE,r=st(t.encoding[e]),{mark:s,config:o}=t,a=n?.orient||o[e==="x"?"axisX":"axisY"]?.orient||o.axis?.orient||zse(e),u=t.getScaleComponent(e).get("type"),l=Tse(e,u,a,t.config),c=n!==void 0?!n:vy("disable",o.style,n?.style,l).configValue;if(i.set("disable",c,n!==void 0),c)return i;n=n||{};const f=Pse(r,n,e,o.style,l),d=kT(n.formatType,r,u),h=_T(r,r.type,n.format,n.formatType,o,!0),p={fieldOrDatumDef:r,axis:n,channel:e,model:t,scaleType:u,orient:a,labelAngle:f,format:h,formatType:d,mark:s,config:o};for(const y of HN){const b=y in n$?n$[y](p):AC(y)?n[y]:void 0,x=b!==void 0,v=Zae(b,y,n,t,e);if(x&&v)i.set(y,b,v);else{const{configValue:A=void 0,configFrom:w=void 0}=AC(y)&&y!=="values"?vy(y,o.style,n.style,l):{},E=A!==void 0;x&&!E?i.set(y,b,v):(w!=="vgAxisConfig"||eue.has(y)&&E||Zc(A)||te(A))&&i.set(y,A,!1)}}const g=n.encoding??{},m=jT.reduce((y,b)=>{if(!i.hasAxisPart(b))return y;const x=yN(g[b]??{},t),v=b==="labels"?Vae(t,e,x):x;return v!==void 0&&!Oe(v)&&(y[b]={update:v}),y},{});return Oe(m)||i.set("encode",m,!!n.encoding||n.labelAngle!==void 0),i}function nue({encoding:e,size:t}){for(const n of Gr){const i=An(n);tr(t[i])&&hs(e[n])&&(delete t[i],q(QO(i)))}return t}
vendor: 1,079 bytes, line 17
17const iue={vgMark:"arc",encodeEntry:e=>({...ni(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"}),...Zt("x",e,{defaultPos:"mid"}),...Zt("y",e,{defaultPos:"mid"}),...Pr(e,"radius"),...Pr(e,"theta")})},rue={vgMark:"area",encodeEntry:e=>({...ni(e,{align:"ignore",baseline:"ignore",color:"include",orient:"include",size:"ignore",theta:"ignore"}),...Ph("x",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:e.markDef.orient==="horizontal"}),...Ph("y",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:e.markDef.orient==="vertical"}),...mE(e)})},sue={vgMark:"rect",encodeEntry:e=>({...ni(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...Pr(e,"x"),...Pr(e,"y")})},oue={vgMark:"shape",encodeEntry:e=>({...ni(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})}),postEncodingTransform:e=>{const{encoding:t}=e,n=t.shape;return[{type:"geoshape",projection:e.projectionName(),...n&&W(n)&&n.type===$u?{field:V(n,{expr:"datum"})}:{}}
17]}},aue={vgMark:"image",encodeEntry:e=>({...ni(e,{align:"ignore",baseline:"ignore",color:"ignore",orient:"ignore",size:"ignore",theta:"ignore"}),...Pr(e,"x"),...Pr(e,"y"),...pE(e,"url")})},uue={vgMark:"line",encodeEntry:e=>({...ni(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"}),...Zt("x",e,{defaultPos:"mid"}),...Zt("y",e,{defaultPos:"mid"}),...xt("size",e,{vgChannel:"strokeWidth"}),...mE(e)})},lue={vgMark:"trail",encodeEntry:e=>({...ni(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"}),...Zt("x",e,{defaultPos:"mid"}),...Zt("y",e,{defaultPos:"mid"}),...xt("size",e),...mE(e)})};function ME(e,t){const{config:n}=e;return{...ni(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"}),...Zt("x",e,{defaultPos:"mid"}),...Zt("y",e,{defaultPos:"mid"}),...xt("size",e),...xt("angle",e),...cue(e,n,t)}}function cue(e,t,n){return n?{shape:{value:n}}:xt("shape",e)}const fue={vgMark:"symbol",encodeEntry:e=>ME(e)},due={vgMark:"symbol",encodeEntry:e=>ME(e,"circle")},hue={vgMark:"symbol",encodeEntry:e=>ME(e,"square")},pue={vgMark:"rect",encodeEntry:e=>({...ni(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...Pr(e,"x"),...Pr(e,"y")})},gue={vgMark:"rule",encodeEntry:e=>{const{markDef:t}=e,n=t.orient;return!e.encoding.x&&!e.encoding.y&&!e.encoding.latitude&&!e.encoding.longitude?{}:{...ni(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...Ph("x",e,{defaultPos:n==="horizontal"?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:n!=="vertical"}),...Ph("y",e,{defaultPos:n==="vertical"?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:n!=="horizontal"}),...xt("size",e,{vgChannel:"strokeWidth"})}}},mue={vgMark:"text",encodeEntry:e=>{const{config:t,encoding:n}=e;return{...ni(e,{align:"include",baseline:"include",color:"include",size:"ignore",orient:"ignore",theta:"include"}),...Zt("x",e,{defaultPos:"mid"}),...Zt("y",e,{defaultPos:"mid"}),...pE(e),...xt("size",e,{vgChannel:"fontSize"}),...xt("angle",e),...GC("align",yue(e.markDef,n,t)),...GC("baseline",bue(e.markDef,n,t)),...Zt("radius",e,{defaultPos:null}),...Zt("theta",e,{defaultPos:null})}}};function yue(e,t,n){if(Re("align",e,n)===void 0)return"center"}function bue(e,t,n){if(Re("baseline",e,n)===void 0)return"middle"}const xue={vgMark:"rect",encodeEntry:e=>{const{config:t,markDef:n}=e,i=n.orient,r=i==="horizontal"?"x":"y",s=i==="horizontal"?"y":"x",o=i==="horizontal"?"height":"width";return{...ni(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...Pr(e,r),...Zt(s,e,{defaultPos:"mid",vgChannel:s==="y"?"yc":"xc"}),[o]:Be(Re("thickness",n,t))}}},Uf={arc:iue,area:rue,bar:sue,circle:due,geoshape:oue,image:aue,line:uue,point:fue,rect:pue,rule:gue,square:hue,text:mue,tick:xue,trail:lue};function vue(e){if(ye([ag,sg,yte],e.mark)){const t=YT(e.mark,e.encoding);if(t.length>0)return Eue(e,t)}else if(e.mark===og){const t=ny.some(n=>Re(n,e.markDef,e.config));if(e.stack&&!e.fieldDef("size")&&t)return Aue(e)}return NE(e)}const b$="faceted_path_";function Eue(e,t){return[{name:e.getName("pathgroup"),type:"group",from:{facet:{name:b$+e.requestDataName(He.Main),data:e.requestDataName(He.Main),groupby:t}},encode:{update:{width:{field:{group:"width"}},height:{field:{group:"height"}}}},marks:NE(e,{fromPrefix:b$})}]}const x$="stack_group_";function Aue(e){const[t]=NE(e,{fromPrefix:x$}),n=e.scaleName(e.stack.fieldChannel),i=(l={})=>e.vgField(e.stack.fieldChannel,l),r=(l,c)=>{const f=[i({prefix:"min",suffix:"start",expr:c}),i({prefix:"max",suffix:"start",expr:c}),i({prefix:"min",suffix:"end",expr:c}),i({prefix:"max",suffix:"end",expr:c})];return`${l}(${f.map(d=>`scale('${n}',${d})`).join(",")})`};let s,o;e.stack.fieldChannel==="x"?(s={...Ya(t.encode.update,["y","yc","y2","height",...ny]),x:{signal:r("min","datum")},x2:{signal:r("max","datum")},clip:{value:!0}},o={x:{field:{group:"x"},mult:-1},height:{field:{group:"height"}}},t.encode.update={...gn(t.encode.update,["y","yc","y2"]),height:{field:{group:"height"}}}
17):(s={...Ya(t.encode.update,["x","xc","x2","width"]),y:{signal:r("min","datum")},y2:{signal:r("max","datum")},clip:{value:!0}},o={y:{field:{group:"y"},mult:-1},width:{field:{group:"width"}}},t.encode.update={...gn(t.encode.update,["x","xc","x2"]),width:{field:{group:"width"}}});for(const l of ny){const c=Zi(l,e.markDef,e.config);t.encode.update[l]?(s[l]=t.encode.update[l],delete t.encode.update[l]):c&&(s[l]=Be(c)),c&&(t.encode.update[l]={value:0})}const a=[];if(e.stack.groupbyChannels?.length>0)for(const l of e.stack.groupbyChannels){const c=e.fieldDef(l),f=V(c);f&&a.push(f),(c?.bin||c?.timeUnit)&&a.push(V(c,{binSuffix:"end"}))}return s=["stroke","strokeWidth","strokeJoin","strokeCap","strokeDash","strokeDashOffset","strokeMiterLimit","strokeOpacity"].reduce((l,c)=>{if(t.encode.update[c])return{...l,[c]:t.encode.update[c]};{const f=Zi(c,e.markDef,e.config);return f!==void 0?{...l,[c]:Be(f)}:l}},s),s.stroke&&(s.strokeForeground={value:!0},s.strokeOffset={value:0}),[{type:"group",from:{facet:{data:e.requestDataName(He.Main),name:x$+e.requestDataName(He.Main),groupby:a,aggregate:{fields:[i({suffix:"start"}),i({suffix:"start"}),i({suffix:"end"}),i({suffix:"end"})],ops:["min","max","min","max"]}}},encode:{update:s},marks:[{type:"group",encode:{update:o},marks:[t]}]}]}function wue(e){const{encoding:t,stack:n,mark:i,markDef:r,config:s}=e,o=t.order;if(!(!I(o)&&vi(o)&&ey(o.value)||!o&&ey(Re("order",r,s)))){if((I(o)||W(o))&&!n)return WO(o,{expr:"datum"});if(Us(i)){const a=r.orient==="horizontal"?"y":"x",u=t[a];if(W(u))return{field:a}}}}function NE(e,t={fromPrefix:""}){const{mark:n,markDef:i,encoding:r,config:s}=e,o=Qe(i.clip,Sue(e),Cue(e)),a=jO(i),u=r.key,l=wue(e),c=$ue(e),f=Re("aria",i,s),d=Uf[n].postEncodingTransform?Uf[n].postEncodingTransform(e):null;return[{name:e.getName("marks"),type:Uf[n].vgMark,...o?{clip:o}:{},...a?{style:a}:{},...u?{key:u.field}:{},...l?{sort:l}:{},...c||{},...f===!1?{aria:f}:{},from:{data:t.fromPrefix+e.requestDataName(He.Main)},encode:{update:Uf[n].encodeEntry(e)},...d?{transform:d}:{}}]}function Sue(e){const t=e.getScaleComponent("x"),n=e.getScaleComponent("y");return t?.get("selectionExtent")||n?.get("selectionExtent")?!0:void 0}function Cue(e){const t=e.component.projection;return t&&!t.isFit?!0:void 0}function $ue(e){if(!e.component.selection)return null;const t=U(e.component.selection).length;let n=t,i=e.parent;for(;i&&n===0;)n=U(i.component.selection).length,i=i.parent;return n?{interactive:t>0||e.mark==="geoshape"||!!e.encoding.tooltip||!!e.markDef.tooltip}:null}class VN extends jN{constructor(t,n,i,r={},s){super(t,"unit",n,i,s,void 0,SC(t)?t.view:void 0),this.specifiedScales={},this.specifiedAxes={},this.specifiedLegends={},this.specifiedProjection={},this.selection=[],this.children=[],this.correctDataNames=l=>(l.from?.data&&(l.from.data=this.lookupDataSource(l.from.data),"time"in this.encoding&&(l.from.data=l.from.data+DM)),l.from?.facet?.data&&(l.from.facet.data=this.lookupDataSource(l.from.facet.data)),l);const o=er(t.mark)?{...t.mark}:{type:t.mark},a=o.type;o.filled===void 0&&(o.filled=eie(o,s,{graticule:t.data&&dE(t.data)}));const u=this.encoding=rne(t.encoding||{},a,o.filled,s);this.markDef=mM(o,u,s),this.size=nue({encoding:u,size:SC(t)?{...r,...t.width?{width:t.width}:{},...t.height?{height:t.height}:{}}:r}),this.stack=gM(this.markDef,u),this.specifiedScales=this.initScales(a,u),this.specifiedAxes=this.initAxes(u),this.specifiedLegends=this.initLegends(u),this.specifiedProjection=t.projection,this.selection=(t.params??[]).filter(l=>aE(l))}get hasProjection(){const{encoding:t}=this,n=this.mark===ET,i=t&&KQ.some(r=>ce(t[r]));return n||i}scaleDomain(t){const n=this.specifiedScales[t];return n?n.domain:void 0}axis(t){return this.specifiedAxes[t]}legend(t){return this.specifiedLegends[t]}initScales(t,n){return w2.reduce((i,r)=>{const s=st(n[r]);return s&&(i[r]=this.initScale(s.scale??{})),i},{})}initScale(t){const{domain:n,range:i}=t,r=yt(t);return I(n)&&(r.domain=n.map(_n)),I(i)&&(r.range=i.map(_n)),r}initAxes(t){return Gr.reduce((n,i)=>{const r=t[i];if(ce(r)||i===qe&&ce(t.x2)||i===gt&&ce(t.y2)){const s=ce(r)?r.axis:void 0;n[i]=s&&this.initAxis({...s})}return n},{})}initAxis(t){const n=U(t),i={};for(const r of n){const s=t[r];
17i[r]=Zc(s)?UO(s):_n(s)}return i}initLegends(t){return aZ.reduce((n,i)=>{const r=st(t[i]);if(r&&lZ(i)){const s=r.legend;n[i]=s&&yt(s)}return n},{})}parseData(){this.component.data=Bg(this)}parseLayoutSize(){Bae(this)}parseSelections(){this.component.selection=kse(this,this.selection)}parseMarkGroup(){this.component.mark=vue(this)}parseAxesAndHeaders(){this.component.axes=Xae(this)}assembleSelectionTopLevelSignals(t){return Vie(this,t)}assembleSignals(){return[...uN(this),...Gie(this,[])]}assembleSelectionData(t){return Xie(this,t)}assembleLayout(){return null}assembleLayoutSignals(){return wE(this)}assembleMarks(){let t=this.component.mark??[];return(!this.parent||!Ru(this.parent))&&(t=MM(this,t)),t.map(this.correctDataNames)}assembleGroupStyle(){const{style:t}=this.view||{};return t!==void 0?t:this.encoding.x||this.encoding.y?"cell":"view"}getMapping(){return this.encoding}get mark(){return this.markDef.type}channelHasField(t){return go(this.encoding,t)}fieldDef(t){const n=this.encoding[t];return Ei(n)}typedFieldDef(t){const n=this.fieldDef(t);return sn(n)?n:null}}class LE extends RE{constructor(t,n,i,r,s){super(t,"layer",n,i,s,t.resolve,t.view);const o={...r,...t.width?{width:t.width}:{},...t.height?{height:t.height}:{}};this.children=t.layer.map((a,u)=>{if(yg(a))return new LE(a,this,this.getName(`layer_${u}`),o,s);if(Hr(a))return new VN(a,this,this.getName(`layer_${u}`),o,s);throw new Error(C2(a))})}parseData(){this.component.data=Bg(this);for(const t of this.children)t.parseData()}parseLayoutSize(){Pae(this)}parseSelections(){this.component.selection={};for(const t of this.children){t.parseSelections();for(const n of U(t.component.selection))this.component.selection[n]=t.component.selection[n]}Object.values(this.component.selection).some(t=>Vi(t))&&_2(F2)}parseMarkGroup(){for(const t of this.children)t.parseMarkGroup()}parseAxesAndHeaders(){Kae(this)}assembleSelectionTopLevelSignals(t){return this.children.reduce((n,i)=>i.assembleSelectionTopLevelSignals(n),t)}assembleSignals(){return this.children.reduce((t,n)=>t.concat(n.assembleSignals()),uN(this))}assembleLayoutSignals(){return this.children.reduce((t,n)=>t.concat(n.assembleLayoutSignals()),wE(this))}assembleSelectionData(t){return this.children.reduce((n,i)=>i.assembleSelectionData(n),t)}assembleGroupStyle(){const t=new Set;for(const i of this.children)for(const r of K(i.assembleGroupStyle()))t.add(r);const n=Array.from(t);return n.length>1?n:n.length===1?n[0]:void 0}assembleTitle(){let t=super.assembleTitle();if(t)return t;for(const n of this.children)if(t=n.assembleTitle(),t)return t}assembleLayout(){return null}assembleMarks(){return Yie(this,this.children.flatMap(t=>t.assembleMarks()))}assembleLegends(){return this.children.reduce((t,n)=>t.concat(n.assembleLegends()),CN(this))}}function PE(e,t,n,i,r){if(cg(e))return new Il(e,t,n,r);if(yg(e))return new LE(e,t,n,i,r);if(Hr(e))return new VN(e,t,n,i,r);if(_ne(e))return new Wae(e,t,n,r);throw new Error(C2(e))}function Fue(e,t={}){t.logger&&Ree(t.logger),t.fieldTitle&&BT(t.fieldTitle);try{const n=pM(fu(t.config,e.config)),i=wM(e,n),r=PE(i,null,"",void 0,n);return r.parse(),Joe(r.component.data,r),{spec:kue(r,_ue(e,i.autosize,n,r),e.datasets,e.usermeta),normalized:i}}finally{t.logger&&Oee(),t.fieldTitle&&Yte()}}function _ue(e,t,n,i){const r=i.component.layoutSize.get("width"),s=i.component.layoutSize.get("height");if(t===void 0?(t={type:"pad"},i.hasAxisOrientSignalRef()&&(t.resize=!0)):Y(t)&&(t={type:t}),r&&s&&Nie(t.type)){if(r==="step"&&s==="step")q(uC()),t.type="pad";else if(r==="step"||s==="step"){const o=r==="step"?"width":"height";q(uC(Zp(o)));const a=o==="width"?"height":"width";t.type=Lie(a)}}return{...U(t).length===1&&t.type?t.type==="pad"?{}:{autosize:t.type}:{autosize:t},...LC(n,!1),...LC(e,!0)}}function kue(e,t,n={},i){const r=e.config?jne(e.config):void 0,s=Tae(e.component.data,n),o=e.assembleSelectionData(s),a=e.assembleProjections(),u=e.assembleTitle(),l=e.assembleGroupStyle(),c=e.assembleGroupEncodeEntry(!0);let f=e.assembleLayoutSignals();f=f.filter(p=>(p.name==="width"||p.name==="height")&&p.value!==void 0?(t[p.name]=+p.value,!1):!0);const{params:d,...h}=t;return{$schema:"https://vega.github.io/schema/vega/v5.json",...e.description?{description:e.description}:{},...h,...u?{title:u}:{},...l?{style:l}:{},...c?{encode:{update:c}}:{},data:o,...a.length>0?{projections:a}:{},...e.assembleGroup([...f,...e.assembleSelectionTopLevelSignals([]),...cM(d)]),...r?{config:r}:{},...i?{usermeta:i}:{}}}const Due=WQ.version,Rue=Object.freeze(Object.defineProperty({__proto__:null,accessPathDepth:Ja,accessPathWithDatum:g2,accessWithDatumToUnescapedPath:Fe,compile:Fue,contains:ye,deepEqual:kn,deleteNestedProperty:Fh,duplicate:le,entries:$s,every:d2,fieldIntersection:p2,flatAccessWithDatum:AO,getFirstDefined:Qe,hasIntersection:h2,hasProperty:j,hash:be,internalField:CO,isBoolean:rc,isEmpty:Oe,isEqual:HQ,isInternalField:$O,isNullOrFalse:ey,isNumeric:Vp,keys:U,logicalExpr:Nl,mergeDeep:vO,never:xO,normalize:wM,normalizeAngle:sc,omit:gn,pick:Ya,prefixGenerator:ty,removePathFromField:Su,replaceAll:_o,replacePathInField:Qn,resetIdCounter:XQ,setEqual:EO,some:Ka,str
vendor: 8,017 bytes, line 17
17ingify:Te,titleCase:jc,unique:ji,uniqueId:SO,vals:St,varName:je,version:Due},Symbol.toStringTag,{value:"Module"}));function XN(e){const[t,n]=/schema\/([\w-]+)\/([\w\.\-]+)\.json$/g.exec(e).slice(1,3);return{library:t,version:n}}var Oue="2.15.0",Tue={version:Oue};const pa="#fff",v$="#888",Mue={background:"#333",view:{stroke:v$},title:{color:pa,subtitleColor:pa},style:{"guide-label":{fill:pa},"guide-title":{fill:pa}},axis:{domainColor:pa,gridColor:v$,tickColor:pa}},Vs="#4572a7",Nue={background:"#fff",arc:{fill:Vs},area:{fill:Vs},line:{stroke:Vs,strokeWidth:2},path:{stroke:Vs},rect:{fill:Vs},shape:{stroke:Vs},symbol:{fill:Vs,strokeWidth:1.5,size:50},axis:{bandPosition:.5,grid:!0,gridColor:"#000000",gridOpacity:1,gridWidth:.5,labelPadding:10,tickSize:5,tickWidth:.5},axisBand:{grid:!1,tickExtra:!0},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:50,symbolType:"square"},range:{category:["#4572a7","#aa4643","#8aa453","#71598e","#4598ae","#d98445","#94aace","#d09393","#b9cc98","#a99cbc"]}},Xs="#30a2da",sm="#cbcbcb",Lue="#999",Pue="#333",E$="#f0f0f0",A$="#333",Iue={arc:{fill:Xs},area:{fill:Xs},axis:{domainColor:sm,grid:!0,gridColor:sm,gridWidth:1,labelColor:Lue,labelFontSize:10,titleColor:Pue,tickColor:sm,tickSize:10,titleFontSize:14,titlePadding:10,labelPadding:4},axisBand:{grid:!1},background:E$,group:{fill:E$},legend:{labelColor:A$,labelFontSize:11,padding:1,symbolSize:30,symbolType:"square",titleColor:A$,titleFontSize:14,titlePadding:10},line:{stroke:Xs,strokeWidth:2},path:{stroke:Xs,strokeWidth:.5},rect:{fill:Xs},range:{category:["#30a2da","#fc4f30","#e5ae38","#6d904f","#8b8b8b","#b96db8","#ff9e27","#56cc60","#52d2ca","#52689e","#545454","#9fe4f8"],diverging:["#cc0020","#e77866","#f6e7e1","#d6e8ed","#91bfd9","#1d78b5"],heatmap:["#d6e8ed","#cee0e5","#91bfd9","#549cc6","#1d78b5"]},point:{filled:!0,shape:"circle"},shape:{stroke:Xs},bar:{binSpacing:2,fill:Xs,stroke:null},title:{anchor:"start",fontSize:24,fontWeight:600,offset:20}},Ys="#000",Bue={group:{fill:"#e5e5e5"},arc:{fill:Ys},area:{fill:Ys},line:{stroke:Ys},path:{stroke:Ys},rect:{fill:Ys},shape:{stroke:Ys},symbol:{fill:Ys,size:40},axis:{domain:!1,grid:!0,gridColor:"#FFFFFF",gridOpacity:1,labelColor:"#7F7F7F",labelPadding:4,tickColor:"#7F7F7F",tickSize:5.67,titleFontSize:16,titleFontWeight:"normal"},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:40},range:{category:["#000000","#7F7F7F","#1A1A1A","#999999","#333333","#B0B0B0","#4D4D4D","#C9C9C9","#666666","#DCDCDC"]}},zue=22,Uue="normal",w$="Benton Gothic, sans-serif",S$=11.5,jue="normal",Ks="#82c6df",om="Benton Gothic Bold, sans-serif",C$="normal",$$=13,Qu={"category-6":["#ec8431","#829eb1","#c89d29","#3580b1","#adc839","#ab7fb4"],"fire-7":["#fbf2c7","#f9e39c","#f8d36e","#f4bb6a","#e68a4f","#d15a40","#ab4232"],"fireandice-6":["#e68a4f","#f4bb6a","#f9e39c","#dadfe2","#a6b7c6","#849eae"]},que={background:"#ffffff",title:{anchor:"start",color:"#000000",font:om,fontSize:zue,fontWeight:Uue},arc:{fill:Ks},area:{fill:Ks},line:{stroke:Ks,strokeWidth:2},path:{stroke:Ks},rect:{fill:Ks},shape:{stroke:Ks},symbol:{fill:Ks,size:30},axis:{labelFont:w$,labelFontSize:S$,labelFontWeight:jue,titleFont:om,titleFontSize:$$,titleFontWeight:C$},axisX:{labelAngle:0,labelPadding:4,tickSize:3},axisY:{labelBaseline:"middle",maxExtent:45,minExtent:45,tickSize:2,titleAlign:"left",titleAngle:0,titleX:-45,titleY:-11},legend:{labelFont:w$,labelFontSize:S$,symbolType:"square",titleFont:om,titleFontSize:$$,titleFontWeight:C$},range:{category:Qu["category-6"],diverging:Qu["fireandice-6"],heatmap:Qu["fire-7"],ordinal:Qu["fire-7"],ramp:Qu["fire-7"]}},Js="#ab5787",jf="#979797",Wue={background:"#f9f9f9",arc:{fill:Js},area:{fill:Js},line:{stroke:Js},path:{stroke:Js},rect:{fill:Js},shape:{stroke:Js},symbol:{fill:Js,size:30},axis:{domainColor:jf,domainWidth:.5,gridWidth:.2,labelColor:jf,tickColor:jf,tickWidth:.2,titleColor:jf},axisBand:{grid:!1},axisX:{grid:!0,tickSize:10},axisY:{domain:!1,grid:!0,tickSize:0},legend:{labelFontSize:11,padding:1,symbolSize:30,symbolType:"square"},range:{category:["#ab5787","#51b2e5","#703c5c","#168dd9","#d190b6","#00609f","#d365ba","#154866","#666666","#c4c4c4"]}},Qs="#3e5c69",Gue={background:"#fff",arc:{fill:Qs},area:{fill:Qs},line:{stroke:Qs},path:{stroke:Qs},rect:{fill:Qs},shape:{stroke:Qs},symbol:{fill:Qs},axis:{domainWidth:.5,grid:!0,labelPadding:2,tickSize:5,tickWidth:.5,titleFontWeight:"normal"},axisBand:{grid:!1},axisX:{gridWidth:.2},axisY:{gridDash:[3],gridWidth:.4},legend:{labelFontSize:11,padding:1,symbolType:"square"},range:{category:["#3e5c69","#6793a6","#182429","#0570b0","#3690c0","#74a9cf","#a6bddb","#e2ddf2"]}},Bn="#1696d2",F$="#000000",Hue="#FFFFFF",qf="Lato",am="Lato",Vue="Lato",Xue="#DEDDDD",Yue=18,Zu={"shades-blue":["#CFE8F3","#A2D4EC","#73BFE2","#46ABDB","#1696D2","#12719E","#0A4C6A","#062635"],"six-groups-cat-1":["#1696d2","#ec008b","#fdbf11","#000000","#d2d2d2","#55b748"],"six-groups-seq":["#cfe8f3","#a2d4ec","#73bfe2","#46abdb","#1696d2","#12719e"],"diverging-colors":["#ca5800","#fdbf11","#fdd870","#fff2cf","#cfe8f3","#73bfe2","#1696d2","#0a4c6a"]},Kue={background:Hue,title:{anchor:"start",fontSize:Yue,font:qf},axisX:{domain:!0,domainColor:F$,domainWidth:1,grid:!1,labelFontSize:12,labelFont:am,labelAngle:0,tickColor:F$,tickSize:5,titleFontSize:12,titlePadding:10,titleFont:qf},axisY:{domain:!1,domainWidth:1,grid:!0,gridColor:Xue,gridWidth:1,labelFontSize:12,labelFont:am,labelPadding:8,ticks:!1,titleFontSize:12,titlePadding:10,titleFont:qf,titleAngle:0,titleY:-10,titleX:18},legend:{labelFontSize:12,labelFont:am,symbolSize:100,titleFontSize:12,titlePadding:10,titleFont:qf,orient:"right",offset:10},view:{stroke:"transparent"},range:{category:Zu["six-groups-cat-1"],diverging:Zu["diverging-colors"],heatmap:Zu["diverging-colors"],ordinal:Zu["six-groups-seq"],ramp:Zu["shades-blue"]},area:{fill:Bn},rect:{fill:Bn},line:{color:Bn,stroke:Bn,strokeWidth:5},trail:{color:Bn,stroke:Bn,strokeWidth:0,size:1},path:{stroke:Bn,strokeWidth:.5},point:{filled:!0},text:{font:Vue,color:Bn,fontSize:11,align:"center",fontWeight:400,size:11},style:{bar:{fill:Bn,stroke:null}},arc:{fill:Bn},shape:{stroke:Bn},symbol:{fill:Bn,size:30}},Zs="#3366CC",_$="#ccc",Wf="Arial, sans-serif",Jue={arc:{fill:Zs},area:{fill:Zs},path:{stroke:Zs},rect:{fill:Zs},shape:{stroke:Zs},symbol:{stroke:Zs},circle:{fill:Zs},background:"#fff",padding:{top:10,right:10,bottom:10,left:10},style:{"guide-label":{font:Wf,fontSize:12},"guide-title":{font:Wf,fontSize:12},"group-title":{font:Wf,fontSize:12}},title:{font:Wf,fontSize:14,fontWeight:"bold",dy:-3,anchor:"start"},axis:{gridColor:_$,tickColor:_$,domain:!1,grid:!0},range:{category:["#4285F4","#DB4437","#F4B400","#0F9D58","#AB47BC","#00ACC1","#FF7043","#9E9D24","#5C6BC0","#F06292","#00796B","#C2185B"],heatmap:["#c6dafc","#5e97f6","#2a56c6"]}},IE=e=>e*(1/3+1),k$=IE(9),D$=IE(10),R$=IE(12),el="Segoe UI",O$="wf_standard-font, helvetica, arial, sans-serif",T$="#252423",tl="#605E5C",M$="transparent",Que="#C8C6C4",si="#118DFF",Zue="#12239E",ele="#E66C37",tle="#6B007B",nle="#E044A7",ile="#744EC2",rle="#D9B300",sle="#D64550",YN=si,KN="#DEEFFF",N$=[KN,YN],ole=[KN,"#c7e4ff","#b0d9ff","#9aceff","#83c3ff","#6cb9ff","#55aeff","#3fa3ff","#2898ff",YN],ale={view:{stroke:M$},background:M$,font:el,header:{titleFont:O$,titleFontSize:R$,titleColor:T$,labelFont:el,labelFontSize:D$,labelColor:tl},axis:{ticks:!1,grid:!1,domain:!1,labelColor:tl,labelFontSize:k$,titleFont:O$,titleColor:T$,titleFontSize:R$,titleFontWeight:"normal"},axisQuantitative:{tickCount:3,grid:!0,gridColor:Que,gridDash:[1,5],labelFlush:!1},axisBand:{tickExtra:!0},axisX:{labelPadding:5},axisY:{labelPadding:10},bar:{fill:si},line:{stroke:si,strokeWidth:3,strokeCap:"round",strokeJoin:"round"},text:{font:el,fontSize:k$,fill:tl},arc:{fill:si},area:{fill:si,line:!0,opacity:.6},path:{stroke:si},rect:{fill:si},point:{fill:si,filled:!0,size:75},shape:{stroke:si},symbol:{fill:si,strokeWidth:1.5,size:50},legend:{titleFont:el,titleFontWeight:"bold",titleColor:tl,labelFont:el,labelFontSize:D$,labelColor:tl,
17symbolType:"circle",symbolSize:75},range:{category:[si,Zue,ele,tle,nle,ile,rle,sle],diverging:N$,heatmap:N$,ordinal:ole}},um='IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,".sfnstext-regular",sans-serif',ule='IBM Plex Sans Condensed, system-ui, -apple-system, BlinkMacSystemFont, ".SFNSText-Regular", sans-serif',lm=400,Gf={textPrimary:{g90:"#f4f4f4",g100:"#f4f4f4",white:"#161616",g10:"#161616"},textSecondary:{g90:"#c6c6c6",g100:"#c6c6c6",white:"#525252",g10:"#525252"},layerAccent01:{white:"#e0e0e0",g10:"#e0e0e0",g90:"#525252",g100:"#393939"},gridBg:{white:"#ffffff",g10:"#ffffff",g90:"#161616",g100:"#161616"}},lle=["#8a3ffc","#33b1ff","#007d79","#ff7eb6","#fa4d56","#fff1f1","#6fdc8c","#4589ff","#d12771","#d2a106","#08bdba","#bae6ff","#ba4e00","#d4bbff"],cle=["#6929c4","#1192e8","#005d5d","#9f1853","#fa4d56","#570408","#198038","#002d9c","#ee538b","#b28600","#009d9a","#012749","#8a3800","#a56eff"];function zg({theme:e,background:t}){const n=["white","g10"].includes(e)?"light":"dark",i=Gf.gridBg[e],r=Gf.textPrimary[e],s=Gf.textSecondary[e],o=n==="dark"?lle:cle,a=n==="dark"?"#d4bbff":"#6929c4";return{background:t,arc:{fill:a},area:{fill:a},path:{stroke:a},rect:{fill:a},shape:{stroke:a},symbol:{stroke:a},circle:{fill:a},view:{fill:i,stroke:i},group:{fill:i},title:{color:r,anchor:"start",dy:-15,fontSize:16,font:um,fontWeight:600},axis:{labelColor:s,labelFontSize:12,labelFont:ule,labelFontWeight:lm,titleColor:r,titleFontWeight:600,titleFontSize:12,grid:!0,gridColor:Gf.layerAccent01[e],labelAngle:0},axisX:{titlePadding:10},axisY:{titlePadding:2.5},style:{"guide-label":{font:um,fill:s,fontWeight:lm},"guide-title":{font:um,fill:s,fontWeight:lm}},range:{category:o,diverging:["#750e13","#a2191f","#da1e28","#fa4d56","#ff8389","#ffb3b8","#ffd7d9","#fff1f1","#e5f6ff","#bae6ff","#82cfff","#33b1ff","#1192e8","#0072c3","#00539a","#003a6d"],heatmap:["#f6f2ff","#e8daff","#d4bbff","#be95ff","#a56eff","#8a3ffc","#6929c4","#491d8b","#31135e","#1c0f30"]}}}const fle=zg({theme:"white",background:"#ffffff"}),dle=zg({theme:"g10",background:"#f4f4f4"}),hle=zg({theme:"g90",background:"#262626"}),ple=zg({theme:"g100",background:"#161616"}),gle=Tue.version,mle=Object.freeze(Object.defineProperty({__proto__:null,carbong10:dle,carbong100:ple,carbong90:hle,carbonwhite:fle,dark:Mue,excel:Nue,fivethirtyeight:Iue,ggplot2:Bue,googlecharts:Jue,latimes:que,powerbi:ale,quartz:Wue,urbaninstitute:Kue,version:gle,vox:Gue},Symbol.toStringTag,{value:"Module"}));function yle(e,t,n,i){if(I(e))return`[${e.map(r=>t(Y(r)?r:L$(r,n))).join(", ")}]`;if(X(e)){let r="";const{title:s,image:o,...a}=e;s&&(r+=`<h2>${t(s)}</h2>`),o&&(r+=`<img src="${new URL(t(o),i||location.href).href}">`);const u=Object.keys(a);if(u.length>0){r+="<table>";for(const l of u){let c=a[l];c!==void 0&&(X(c)&&(c=L$(c,n)),r+=`<tr><td class="key">${t(l)}</td><td class="value">${t(c)}</td></tr>`)}r+="</table>"}return r||"{}"}return t(e)}function ble(e){const t=[];return function(n,i){if(typeof i!="object"||i===null)return i;const r=t.indexOf(this)+1;return t.length=r,t.length>e?"[Object]":t.indexOf(i)>=0?"[Circular]":(t.push(i),i)}}function L$(e,t){return JSON.stringify(e,ble(t))}var xle=`#vg-tooltip-element {
18  visibility: hidden;
19  padding: 8px;
20  position: fixed;
21  z-index: 1000;
22  font-family: sans-serif;
23  font-size: 11px;
24  border-radius: 3px;
25  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
26  /* The default theme is the light theme. */
27  background-color: rgba(255, 255, 255, 0.95);
28  border: 1px solid #d9d9d9;
29  color: black;
30}
31#vg-tooltip-element.visible {
32  visibility: visible;
33}
34#vg-tooltip-element h2 {
35  margin-top: 0;
36  margin-bottom: 10px;
37  font-size: 13px;
38}
39#vg-tooltip-element table {
40  border-spacing: 0;
41}
42#vg-tooltip-element table tr {
43  border: none;
44}
45#vg-tooltip-element table tr td {
46  overflow: hidden;
47  text-overflow: ellipsis;
48  padding-top: 2px;
49  padding-bottom: 2px;
50}
51#vg-tooltip-element table tr td.key {
52  color: #808080;
53  max-width: 150px;
54  text-align: right;
55  padding-right: 4px;
56}
57#vg-tooltip-element table tr td.value {
58  display: block;
59  max-width: 300px;
60  max-height: 7em;
61  text-align: left;
62}
63#vg-tooltip-element.dark-theme {
64  background-color: rgba(32, 32, 32, 0.9);
65  border: 1px solid #f5f5f5;
66  color: white;
67}
68#vg-tooltip-element.dark-theme td.key {
69  color: #bfbfbf;
70}
71`;const JN="vg-tooltip-element",vle={offsetX:10,offsetY:10,id:JN,styleId:"vega-tooltip-style",theme:"light",disableDefaultStyle:!1,sanitize:Ele,maxDepth:2,formatTooltip:yle,baseURL:"",anchor:"cursor",position:["top","bottom","left","right","top-left","top-right","bottom-left","bottom-right"]};function Ele(e){return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;")}function Ale(e){if(!/^[A-Za-z]+[-:.\w]*$/.test(e))throw new Error("Invalid HTML ID");return xle.toString().replace(JN,e)}function QN(e,t,{offsetX:n,offsetY:i}){const r=ZN({x1:e.clientX,x2:e.clientX,y1:e.clientY,y2:e.clientY},t,n,i),s=["bottom-right","bottom-left","top-right","top-left"];for(const o of s)if(e6(r[o],t))return r[o];return r["top-left"]}function wle(e,t,n,i,r){const{position:s,offsetX:o,offsetY:a}=r,u=e._el.getBoundingClientRect(),l=e._origin,c=Sle(u,l,n),f=ZN(c,i,o,a),d=Array.isArray(s)?s:[s];for(const h of d)if(e6(f[h],i)&&!Cle(t,f[h],i))return f[h];return QN(t,i,r)}function Sle(e,t,n){const i=n.isVoronoi?n.datum.bounds:n.bounds;let r=e.left+t[0]+i.x1,s=e.top+t[1]+i.y1,o=n;for(;o.mark.group;)o=o.mark.group,r+=o.x??0,s+=o.y??0;const a=i.x2-i.x1,u=i.y2-i.y1;return{x1:r,x2:r+a,y1:s,y2:s+u}}function ZN(e,t,n,i){const r=(e.x1+e.x2)/2,s=(e.y1+e.y2)/2,o=e.x1-t.width-n,a=r-t.width/2,u=e.x2+n,l=e.y1-t.height-i,
71c=s-t.height/2,f=e.y2+i;return{top:{x:a,y:l},bottom:{x:a,y:f},left:{x:o,y:c},right:{x:u,y:c},"top-left":{x:o,y:l},"top-right":{x:u,y:l},"bottom-left":{x:o,y:f},"bottom-right":{x:u,y:f}}}function e6(e,t){return e.x>=0&&e.y>=0&&e.x+t.width<=window.innerWidth&&e.y+t.height<=window.innerHeight}function Cle(e,t,n){return e.clientX>=t.x&&e.clientX<=t.x+n.width&&e.clientY>=t.y&&e.clientY<=t.y+n.height}class $le{constructor(t){this.options={...vle,...t};const n=this.options.id;if(this.el=null,this.call=this.tooltipHandler.bind(this),!this.options.disableDefaultStyle&&!document.getElementById(this.options.styleId)){const i=document.createElement("style");i.setAttribute("id",this.options.styleId),i.innerHTML=Ale(n);const r=document.head;r.childNodes.length>0?r.insertBefore(i,r.childNodes[0]):r.appendChild(i)}}tooltipHandler(t,n,i,r){if(this.el=document.getElementById(this.options.id),this.el||(this.el=document.createElement("div"),this.el.setAttribute("id",this.options.id),this.el.classList.add("vg-tooltip"),(document.fullscreenElement??document.body).appendChild(this.el)),r==null||r===""){this.el.classList.remove("visible",`${this.options.theme}-theme`);return}this.el.innerHTML=this.options.formatTooltip(r,this.options.sanitize,this.options.maxDepth,this.options.baseURL),this.el.classList.add("visible",`${this.options.theme}-theme`);const{x:s,y:o}=this.options.anchor==="mark"?wle(t,n,i,this.el.getBoundingClientRect(),this.options):QN(n,this.el.getBoundingClientRect(),this.options);this.el.style.top=`${o}px`,this.el.style.left=`${s}px`}}var cm={};/*!
72 * https://github.com/Starcounter-Jack/JSON-Patch
73 * (c) 2017-2022 Joachim Wester
74 * MIT licensed
75 */var Fle=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,r){i.__proto__=r}||function(i,r){for(var s in r)r.hasOwnProperty(s)&&(i[s]=r[s])},e(t,n)};return function(t,n){e(t,n);function i(){this.constructor=t}t.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}}(),_le=Object.prototype.hasOwnProperty;function Dy(e,t){return _le.call(e,t)}function Ry(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n<t.length;n++)t[n]=""+n;return t}if(Object.keys)return Object.keys(e);var i=[];for(var r in e)Dy(e,r)&&i.push(r);return i}function Dn(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}function Oy(e){for(var t=0,n=e.length,i;t<n;){if(i=e.charCodeAt(t),i>=48&&i<=57){t++;continue}return!1}return!0}function to(e){return e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function t6(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Ty(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,n=e.length;t<n;t++)if(Ty(e[t]))return!0}else if(typeof e=="object"){for(var i=Ry(e),r=i.length,s=0;s<r;s++)if(Ty(e[i[s]]))return!0}}return!1}function P$(e,t){var n=[e];for(var i in t){var r=typeof t[i]=="object"?JSON.stringify(t[i],null,2):t[i];typeof r<"u"&&n.push(i+": "+r)}return n.join(`
76`)}var n6=function(e){Fle(t,e);function t(n,i,r,s,o){var a=this.constructor,u=e.call(this,P$(n,{name:i,index:r,operation:s,tree:o}))||this;return u.name=i,u.index=r,u.operation=s,u.tree=o,Object.setPrototypeOf(u,a.prototype),u.message=P$(n,{name:i,index:r,operation:s,tree:o}),u}return t}(Error),Xe=n6,kle=Dn,$a={add:function(e,t,n){return e[t]=this.value,{newDocument:n}},remove:function(e,t,n){var i=e[t];return delete e[t],{newDocument:n,removed:i}},replace:function(e,t,n){var i=e[t];return e[t]=this.value,{newDocument:n,removed:i}},move:function(e,t,n){var i=jh(n,this.path);i&&(i=Dn(i));var r=bo(n,{op:"remove",path:this.from}).removed;return bo(n,{op:"add",path:this.path,value:r}),{newDocument:n,removed:i}},copy:function(e,t,n){var i=jh(n,this.from);return bo(n,{op:"add",path:this.path,value:Dn(i)}),{newDocument:n}},test:function(e,t,n){return{newDocument:n,test:dc(e[t],this.value)}},_get:function(e,t,n){return this.value=e[t],{newDocument:n}}},Dle={add:function(e,t,n){return Oy(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:n,index:t}},remove:function(e,t,n){var i=e.splice(t,1);return{newDocument:n,removed:i[0]}},replace:function(e,t,n){var i=e[t];return e[t]=this.value,{newDocument:n,removed:i}},move:$a.move,copy:$a.copy,test:$a.test,_get:$a._get};function jh(e,t){if(t=="")return e;var n={op:"_get",path:t};return bo(e,n),n.value}function bo(e,t,n,i,r,s){if(n===void 0&&(n=!1),i===void 0&&(i=!0),r===void 0&&(r=!0),s===void 0&&(s=0),n&&(typeof n=="function"?n(t,0,e,t.path):qh(t,0)),t.path===""){var o={newDocument:e};if(t.op==="add")return o.newDocument=t.value,o;if(t.op==="replace")return o.newDocument=t.value,o.removed=e,o;
76if(t.op==="move"||t.op==="copy")return o.newDocument=jh(e,t.from),t.op==="move"&&(o.removed=e),o;if(t.op==="test"){if(o.test=dc(e,t.value),o.test===!1)throw new Xe("Test operation failed","TEST_OPERATION_FAILED",s,t,e);return o.newDocument=e,o}else{if(t.op==="remove")return o.removed=e,o.newDocument=null,o;if(t.op==="_get")return t.value=e,o;if(n)throw new Xe("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",s,t,e);return o}}else{i||(e=Dn(e));var a=t.path||"",u=a.split("/"),l=e,c=1,f=u.length,d=void 0,h=void 0,p=void 0;for(typeof n=="function"?p=n:p=qh;;){if(h=u[c],h&&h.indexOf("~")!=-1&&(h=t6(h)),r&&(h=="__proto__"||h=="prototype"&&c>0&&u[c-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&d===void 0&&(l[h]===void 0?d=u.slice(0,c).join("/"):c==f-1&&(d=t.path),d!==void 0&&p(t,0,e,d)),c++,Array.isArray(l)){if(h==="-")h=l.length;else{if(n&&!Oy(h))throw new Xe("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",s,t,e);Oy(h)&&(h=~~h)}if(c>=f){if(n&&t.op==="add"&&h>l.length)throw new Xe("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",s,t,e);var o=Dle[t.op].call(t,l,h,e);if(o.test===!1)throw new Xe("Test operation failed","TEST_OPERATION_FAILED",s,t,e);return o}}else if(c>=f){var o=$a[t.op].call(t,l,h,e);if(o.test===!1)throw new Xe("Test operation failed","TEST_OPERATION_FAILED",s,t,e);return o}if(l=l[h],n&&c<f&&(!l||typeof l!="object"))throw new Xe("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",s,t,e)}}}function Ug(e,t,n,i,r){if(i===void 0&&(i=!0),r===void 0&&(r=!0),n&&!Array.isArray(t))throw new Xe("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");i||(e=Dn(e));for(var s=new Array(t.length),o=0,a=t.length;o<a;o++)s[o]=bo(e,t[o],n,!0,r,o),e=s[o].newDocument;return s.newDocument=e,s}function Rle(e,t,n){var i=bo(e,t);if(i.test===!1)throw new Xe("Test operation failed","TEST_OPERATION_FAILED",n,t,e);return i.newDocument}function qh(e,t,n,i){if(typeof e!="object"||e===null||Array.isArray(e))throw new Xe("Operation is not an object","OPERATION_NOT_AN_OBJECT",t,e,n);if($a[e.op]){if(typeof e.path!="string")throw new Xe("Operation `path` property is not a string","OPERATION_PATH_INVALID",t,e,n);if(e.path.indexOf("/")!==0&&e.path.length>0)throw new Xe('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,n);if((e.op==="move"||e.op==="copy")&&typeof e.from!="string")throw new Xe("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,n);if((e.op==="add"||e.op==="replace"||e.op==="test")&&e.value===void 0)throw new Xe("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,n);if((e.op==="add"||e.op==="replace"||e.op==="test")&&Ty(e.value))throw new Xe("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,n);if(n){if(e.op=="add"){var r=e.path.split("/").length,s=i.split("/").length;if(r!==s+1&&r!==s)throw new Xe("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,n)}else if(e.op==="replace"||e.op==="remove"||e.op==="_get"){if(e.path!==i)throw new Xe("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,n)}else if(e.op==="move"||e.op==="copy"){var o={op:"_get",path:e.from,value:void 0},a=i6([o],n);if(a&&a.name==="OPERATION_PATH_UNRESOLVABLE")throw new Xe("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,n)}}}else throw new Xe("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,n)}function i6(e,t,n){try{if(!Array.isArray(e))throw new Xe("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)Ug(Dn(t),Dn(e),n||!0);else{n=n||qh;for(var i=0;i<e.length;i++)n(e[i],i,t,void 0)}}catch(r){if(r instanceof Xe)return r;throw r}}function dc(e,t){if(e===t)return!0;
76if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=Array.isArray(e),i=Array.isArray(t),r,s,o;if(n&&i){if(s=e.length,s!=t.length)return!1;for(r=s;r--!==0;)if(!dc(e[r],t[r]))return!1;return!0}if(n!=i)return!1;var a=Object.keys(e);if(s=a.length,s!==Object.keys(t).length)return!1;for(r=s;r--!==0;)if(!t.hasOwnProperty(a[r]))return!1;for(r=s;r--!==0;)if(o=a[r],!dc(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var Ole=Object.freeze({__proto__:null,JsonPatchError:Xe,_areEquals:dc,applyOperation:bo,applyPatch:Ug,applyReducer:Rle,deepClone:kle,getValueByPointer:jh,validate:i6,validator:qh});/*!
77 * https://github.com/Starcounter-Jack/JSON-Patch
78 * (c) 2017-2021 Joachim Wester
79 * MIT license
80 */var BE=new WeakMap,Tle=function(){function e(t){this.observers=new Map,this.obj=t}return e}(),Mle=function(){function e(t,n){this.callback=t,this.observer=n}return e}();function Nle(e){return BE.get(e)}function Lle(e,t){return e.observers.get(t)}function Ple(e,t){e.observers.delete(t.callback)}function Ile(e,t){t.unobserve()}function Ble(e,t){var n=[],i,r=Nle(e);if(!r)r=new Tle(e),BE.set(e,r);else{var s=Lle(r,t);i=s&&s.observer}if(i)return i;if(i={},r.value=Dn(e),t){i.callback=t,i.next=null;var o=function(){My(i)},a=function(){clearTimeout(i.next),i.next=setTimeout(o)};typeof window<"u"&&(window.addEventListener("mouseup",a),window.addEventListener("keyup",a),window.addEventListener("mousedown",a),window.addEventListener("keydown",a),window.addEventListener("change",a))}return i.patches=n,i.object=e,i.unobserve=function(){My(i),clearTimeout(i.next),Ple(r,i),typeof window<"u"&&(window.removeEventListener("mouseup",a),window.removeEventListener("keyup",a),window.removeEventListener("mousedown",a),window.removeEventListener("keydown",a),window.removeEventListener("change",a))},r.observers.set(t,new Mle(t,i)),i}function My(e,t){t===void 0&&(t=!1);var n=BE.get(e.object);zE(n.value,e.object,e.patches,"",t),e.patches.length&&Ug(n.value,e.patches);var i=e.patches;return i.length>0&&(e.patches=[],e.callback&&e.callback(i)),i}function zE(e,t,n,i,r){if(t!==e){typeof t.toJSON=="function"&&(t=t.toJSON());for(var s=Ry(t),o=Ry(e),a=!1,u=o.length-1;u>=0;u--){var l=o[u],c=e[l];if(Dy(t,l)&&!(t[l]===void 0&&c!==void 0&&Array.isArray(t)===!1)){var f=t[l];typeof c=="object"&&c!=null&&typeof f=="object"&&f!=null&&Array.isArray(c)===Array.isArray(f)?zE(c,f,n,i+"/"+to(l),r):c!==f&&(r&&n.push({op:"test",path:i+"/"+to(l),value:Dn(c)}),n.push({op:"replace",path:i+"/"+to(l),value:Dn(f)}))}else Array.isArray(e)===Array.isArray(t)?(r&&n.push({op:"test",path:i+"/"+to(l),value:Dn(c)}),n.push({op:"remove",path:i+"/"+to(l)}),a=!0):(r&&n.push({op:"test",path:i,value:e}),n.push({op:"replace",path:i,value:t}))}if(!(!a&&s.length==o.length))for(var u=0;u<s.length;u++){var l=s[u];!Dy(e,l)&&t[l]!==void 0&&n.push({op:"add",path:i+"/"+to(l),value:Dn(t[l])})}}}function zle(e,t,n){n===void 0&&(n=!1);var i=[];return zE(e,t,i,"",n),i}var Ule=Object.freeze({__proto__:null,compare:zle,generate:My,observe:Ble,unobserve:Ile});Object.assign({},Ole,Ule,{JsonPatchError:n6,deepClone:Dn,escapePathComponent:to,unescapePathComponent:t6});function jle(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fm,I$;function qle(){if(I$)return fm;I$=1;class e{constructor(){this.max=1e3,this.map=new Map}get(n){const i=this.map.get(n);if(i!==void 0)return this.map.delete(n),this.map.set(n,i),i}delete(n){return this.map.delete(n)}set(n,i){if(!this.delete(n)&&i!==void 0){if(this.map.size>=this.max){const s=this.map.keys().next().value;this.delete(s)}this.map.set(n,i)}return this}}return fm=e,fm}var dm,B$;function UE(){if(B$)return dm;B$=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return dm=i=>i?typeof i!="object"?e:i:t,dm}var Hf={exports:{}},hm,z$;function jE(){if(z$)return hm;z$=1;const e="2.0.0",t=256,n=Number.MAX_SAFE_INTEGER||9007199254740991,i=16,r=t-6;return hm={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:r,MAX_SAFE_INTEGER:n,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},hm}var pm,U$;function jg(){return U$||(U$=1,pm=typeof process=="object"&&cm&&cm.NODE_DEBUG&&/\bsemver\b/i.test(cm.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{}),pm}var j$;
vendor: 12,327 bytes, line 80
80function qE(){return j$||(j$=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:r}=jE(),s=jg();t=e.exports={};const o=t.re=[],a=t.safeRe=[],u=t.src=[],l=t.t={};let c=0;const f="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",r],[f,i]],h=g=>{for(const[m,y]of d)g=g.split(`${m}*`).join(`${m}{0,${y}}`).split(`${m}+`).join(`${m}{1,${y}}`);return g},p=(g,m,y)=>{const b=h(m),x=c++;s(g,x,m),l[g]=x,u[x]=m,o[x]=new RegExp(m,y?"g":void 0),a[x]=new RegExp(b,y?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),p("MAINVERSION",`(${u[l.NUMERICIDENTIFIER]})\\.(${u[l.NUMERICIDENTIFIER]})\\.(${u[l.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${u[l.NUMERICIDENTIFIERLOOSE]})\\.(${u[l.NUMERICIDENTIFIERLOOSE]})\\.(${u[l.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${u[l.NUMERICIDENTIFIER]}|${u[l.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${u[l.NUMERICIDENTIFIERLOOSE]}|${u[l.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${u[l.PRERELEASEIDENTIFIER]}(?:\\.${u[l.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${u[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[l.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${f}+`),p("BUILD",`(?:\\+(${u[l.BUILDIDENTIFIER]}(?:\\.${u[l.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${u[l.MAINVERSION]}${u[l.PRERELEASE]}?${u[l.BUILD]}?`),p("FULL",`^${u[l.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${u[l.MAINVERSIONLOOSE]}${u[l.PRERELEASELOOSE]}?${u[l.BUILD]}?`),p("LOOSE",`^${u[l.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${u[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${u[l.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${u[l.XRANGEIDENTIFIER]})(?:\\.(${u[l.XRANGEIDENTIFIER]})(?:\\.(${u[l.XRANGEIDENTIFIER]})(?:${u[l.PRERELEASE]})?${u[l.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${u[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})(?:${u[l.PRERELEASELOOSE]})?${u[l.BUILD]}?)?)?`),p("XRANGE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),p("COERCE",`${u[l.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",u[l.COERCEPLAIN]+`(?:${u[l.PRERELEASE]})?(?:${u[l.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",u[l.COERCE],!0),p("COERCERTLFULL",u[l.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${u[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",p("TILDE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${u[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",p("CARET",`^${u[l.LONECARET]}${u[l.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${u[l.LONECARET]}${u[l.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${u[l.GTLT]}\\s*(${u[l.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]}|${u[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${u[l.XRANGEPLAIN]})\\s+-\\s+(${u[l.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${u[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[l.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(Hf,Hf.exports)),Hf.exports}var gm,q$;function Wle(){if(q$)return gm;q$=1;const e=/^[0-9]+$/,t=(i,r)=>{const s=e.test(i),o=e.test(r);return s&&o&&(i=+i,r=+r),i===r?0:s&&!o?-1:o&&!s?1:i<r?-1:1};return gm={compareIdentifiers:t,rcompareIdentifiers:(i,r)=>t(r,i)},gm}var mm,W$;function WE(){if(W$)return mm;W$=1;const e=jg(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=jE(),{safeRe:i,t:r}=qE(),s=UE(),{compareIdentifiers:o}=Wle();class a{constructor(l,c){if(c=s(c),l instanceof a){if(l.loose===!!c.loose&&l.includePrerelease===!!c.includePrerelease)return l;l=l.version}else if(typeof l!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof l}".`);if(l.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",l,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;const f=l.trim().match(c.loose?i[r.LOOSE]:i[r.FULL]);if(!f)throw new TypeError(`Invalid Version: ${l}`);if(this.raw=l,this.major=+f[1],this.minor=+f[2],this.patch=+f[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");f[4]?this.prerelease=f[4].split(".").map(d=>{if(/^[0-9]+$/.test(d)){const h=+d;if(h>=0&&h<n)return h}return d}):this.prerelease=[],this.build=f[5]?f[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(l){if(e("SemVer.compare",this.version,this.options,l),!(l instanceof a)){if(typeof l=="string"&&l===this.version)return 0;l=new a(l,this.options)}return l.version===this.version?0:this.compareMain(l)||this.comparePre(l)}compareMain(l){return l instanceof a||(l=new a(l,this.options)),o(this.major,l.major)||o(this.minor,l.minor)||o(this.patch,l.patch)}comparePre(l){if(l instanceof a||(l=new a(l,this.options)),this.prerelease.length&&!l.prerelease.length)return-1;if(!this.prerelease.length&&l.prerelease.length)return 1;if(!this.prerelease.length&&!l.prerelease.length)return 0;let c=0;do{const f=this.prerelease[c],d=l.prerelease[c];if(e("prerelease compare",c,f,d),f===void 0&&d===void 0)return 0;if(d===void 0)return 1;if(f===void 0)return-1;if(f===d)continue;return o(f,d)}while(++c)}compareBuild(l){l instanceof a||(l=new a(l,this.options));let c=0;do{const f=this.build[c],d=l.build[c];if(e("build compare",c,f,d),f===void 0&&d===void 0)return 0;if(d===void 0)return 1;if(f===void 0)return-1;if(f===d)continue;return o(f,d)}while(++c)}inc(l,c,f){switch(l){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",c,f);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",c,f);break;case"prepatch":this.prerelease.length=0,this.inc("patch",c,f),this.inc("pre",c,f);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",c,f),this.inc("pre",c,f);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const d=Number(f)?1:0;if(!c&&f===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[d];else{let h=this.prerelease.length;for(;--h>=0;)typeof this.prerelease[h]=="number"&&(this.prerelease[h]++,h=-2);if(h===-1){if(c===this.prerelease.join(".")&&f===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(d)}}if(c){let h=[c,d];f===!1&&(h=[c]),o(this.prerelease[0],c)===0?isNaN(this.prerelease[1])&&(this.prerelease=h):this.prerelease=h}break}default:throw new Error(`invalid increment argument: ${l}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return mm=a,mm}var ym,G$;function Ou(){if(G$)return ym;G$=1;const e=WE();return ym=(n,i,r)=>new e(n,r).compare(new e(i,r)),ym}var bm,H$;function Gle(){if(H$)return bm;H$=1;const e=Ou();return bm=(n,i,r)=>e(n,i,r)===0,bm}var xm,V$;function Hle(){if(V$)return xm;V$=1;const e=Ou();return xm=(n,i,r)=>e(n,i,r)!==0,xm}var vm,X$;function Vle(){if(X$)return vm;X$=1;const e=Ou();return vm=(n,i,r)=>e(n,i,r)>0,vm}var Em,Y$;function Xle(){if(Y$)return Em;Y$=1;const e=Ou();return Em=(n,i,r)=>e(n,i,r)>=0,Em}var Am,K$;function Yle(){if(K$)return Am;K$=1;const e=Ou();return Am=(n,i,r)=>e(n,i,r)<0,Am}var wm,J$;function Kle(){if(J$)return wm;J$=1;const e=Ou();return wm=(n,i,r)=>e(n,i,r)<=0,wm}var Sm,Q$;function Jle(){if(Q$)return Sm;Q$=1;const e=Gle(),t=Hle(),n=Vle(),i=Xle(),r=Yle(),s=Kle();return Sm=(a,u,l,c)=>{switch(u){case"===":return typeof a=="object"&&(a=a.version),typeof l=="object"&&(l=l.version),a===l;case"!==":return typeof a=="object"&&(a=a.version),typeof l=="object"&&(l=l.version),a!==l;case"":case"=":case"==":return e(a,l,c);case"!=":return t(a,l,c);case">":return n(a,l,c);case">=":return i(a,l,c);case"<":return r(a,l,c);case"<=":return s(a,l,c);default:throw new TypeError(`Invalid operator: ${u}`)}},Sm}var Cm,Z$;function Qle(){if(Z$)return Cm;Z$=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(c,f){if(f=n(f),c instanceof t){if(c.loose===!!f.loose)return c;c=c.value}c=c.trim().split(/\s+/).join(" "),o("comparator",c,f),this.options=f,this.loose=!!f.loose,this.parse(c),this.semver===e?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(c){const f=this.options.loose?i[r.COMPARATORLOOSE]:i[r.COMPARATOR],d=c.match(f);if(!d)throw new TypeError(`Invalid comparator: ${c}`);this.operator=d[1]!==void 0?d[1]:"",this.operator==="="&&(this.operator=""),d[2]?this.semver=new a(d[2],this.options.loose):this.semver=e}toString(){return this.value}test(c){if(o("Comparator.test",c,this.options.loose),this.semver===e||c===e)return!0;if(typeof c=="string")try{c=new a(c,this.options)}catch{return!1}return s(c,this.operator,this.semver,this.options)}intersects(c,f){if(!(c instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new u(c.value,f).test(this.value):c.operator===""?c.value===""?!0:new u(this.value,f).test(c.semver):(f=n(f),f.includePrerelease&&(this.value==="<0.0.0-0"||c.value==="<0.0.0-0")||!f.includePrerelease&&(this.value.startsWith("<0.0.0")||c.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&c.operator.startsWith(">")||this.operator.startsWith("<")&&c.operator.startsWith("<")||this.semver.version===c.semver.version&&this.operator.includes("=")&&c.operator.includes("=")||s(this.semver,"<",c.semver,f)&&this.operator.startsWith(">")&&c.operator.startsWith("<")||s(this.semver,">",c.semver,f)&&this.operator.startsWith("<")&&c.operator.startsWith(">")))}}Cm=t;const n=UE(),{safeRe:i,t:r}=qE(),s=Jle(),o=jg(),a=WE(),u=r6();return Cm}var $m,eF;function r6(){if(eF)return $m;eF=1;const e=/\s+/g;class t{constructor($,D){if(D=r(D),$ instanceof t)return $.loose===!!D.loose&&$.includePrerelease===!!D.includePrerelease?$:new t($.raw,D);if($ instanceof s)return this.raw=$.value,this.set=[[$]],this.formatted=void 0,this;if(this.options=D,this.loose=!!D.loose,this.includePrerelease=!!D.includePrerelease,this.raw=$.trim().replace(e," "),this.set=this.raw.split("||").map(P=>this.parseRange(P.trim())).filter(P=>P.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const P=this.set[0];if(this.set=this.set.filter(z=>!g(z[0])),this.set.length===0)this.set=[P];else if(this.set.length>1){for(const z of this.set)if(z.length===1&&m(z[0])){this.set=[z];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let $=0;$<this.set.length;$++){$>0&&(this.formatted+="||");const D=this.set[$];for(let P=0;P<D.length;P++)P>0&&(this.formatted+=" "),this.formatted+=D[P].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange($){const P=((this.options.includePrerelease&&h)|(this.options.loose&&p))+":"+$,z=i.get(P);if(z)return z;const B=this.options.loose,Q=B?u[l.HYPHENRANGELOOSE]:u[l.HYPHENRANGE];$=$.replace(Q,L(this.options.includePrerelease)),o("hyphen replace",$),$=$.replace(u[l.COMPARATORTRIM],c),o("comparator trim",$),$=$.replace(u[l.TILDETRIM],f),o("tilde trim",$),$=$.replace(u[l.CARETTRIM],d),o("caret trim",$);let ue=$.split(" ").map(pe=>b(pe,this.options)).join(" ").split(/\s+/).map(pe=>k(pe,this.options));B&&(ue=ue.filter(pe=>(o("loose invalid filter",pe,this.options),!!pe.match(u[l.COMPARATORLOOSE])))),o("range list",ue);const oe=new Map,he=ue.map(pe=>new s(pe,this.options));for(const pe of he){if(g(pe))return[pe];oe.set(pe.value,pe)}
80oe.size>1&&oe.has("")&&oe.delete("");const Pe=[...oe.values()];return i.set(P,Pe),Pe}intersects($,D){if(!($ instanceof t))throw new TypeError("a Range is required");return this.set.some(P=>y(P,D)&&$.set.some(z=>y(z,D)&&P.every(B=>z.every(Q=>B.intersects(Q,D)))))}test($){if(!$)return!1;if(typeof $=="string")try{$=new a($,this.options)}catch{return!1}for(let D=0;D<this.set.length;D++)if(R(this.set[D],$,this.options))return!0;return!1}}$m=t;const n=qle(),i=new n,r=UE(),s=Qle(),o=jg(),a=WE(),{safeRe:u,t:l,comparatorTrimReplace:c,tildeTrimReplace:f,caretTrimReplace:d}=qE(),{FLAG_INCLUDE_PRERELEASE:h,FLAG_LOOSE:p}=jE(),g=_=>_.value==="<0.0.0-0",m=_=>_.value==="",y=(_,$)=>{let D=!0;const P=_.slice();let z=P.pop();for(;D&&P.length;)D=P.every(B=>z.intersects(B,$)),z=P.pop();return D},b=(_,$)=>(o("comp",_,$),_=w(_,$),o("caret",_),_=v(_,$),o("tildes",_),_=S(_,$),o("xrange",_),_=F(_,$),o("stars",_),_),x=_=>!_||_.toLowerCase()==="x"||_==="*",v=(_,$)=>_.trim().split(/\s+/).map(D=>A(D,$)).join(" "),A=(_,$)=>{const D=$.loose?u[l.TILDELOOSE]:u[l.TILDE];return _.replace(D,(P,z,B,Q,ue)=>{o("tilde",_,P,z,B,Q,ue);let oe;return x(z)?oe="":x(B)?oe=`>=${z}.0.0 <${+z+1}.0.0-0`:x(Q)?oe=`>=${z}.${B}.0 <${z}.${+B+1}.0-0`:ue?(o("replaceTilde pr",ue),oe=`>=${z}.${B}.${Q}-${ue} <${z}.${+B+1}.0-0`):oe=`>=${z}.${B}.${Q} <${z}.${+B+1}.0-0`,o("tilde return",oe),oe})},w=(_,$)=>_.trim().split(/\s+/).map(D=>E(D,$)).join(" "),E=(_,$)=>{o("caret",_,$);const D=$.loose?u[l.CARETLOOSE]:u[l.CARET],P=$.includePrerelease?"-0":"";return _.replace(D,(z,B,Q,ue,oe)=>{o("caret",_,z,B,Q,ue,oe);let he;return x(B)?he="":x(Q)?he=`>=${B}.0.0${P} <${+B+1}.0.0-0`:x(ue)?B==="0"?he=`>=${B}.${Q}.0${P} <${B}.${+Q+1}.0-0`:he=`>=${B}.${Q}.0${P} <${+B+1}.0.0-0`:oe?(o("replaceCaret pr",oe),B==="0"?Q==="0"?he=`>=${B}.${Q}.${ue}-${oe} <${B}.${Q}.${+ue+1}-0`:he=`>=${B}.${Q}.${ue}-${oe} <${B}.${+Q+1}.0-0`:he=`>=${B}.${Q}.${ue}-${oe} <${+B+1}.0.0-0`):(o("no pr"),B==="0"?Q==="0"?he=`>=${B}.${Q}.${ue}${P} <${B}.${Q}.${+ue+1}-0`:he=`>=${B}.${Q}.${ue}${P} <${B}.${+Q+1}.0-0`:he=`>=${B}.${Q}.${ue} <${+B+1}.0.0-0`),o("caret return",he),he})},S=(_,$)=>(o("replaceXRanges",_,$),_.split(/\s+/).map(D=>C(D,$)).join(" ")),C=(_,$)=>{_=_.trim();const D=$.loose?u[l.XRANGELOOSE]:u[l.XRANGE];return _.replace(D,(P,z,B,Q,ue,oe)=>{o("xRange",_,P,z,B,Q,ue,oe);const he=x(B),Pe=he||x(Q),pe=Pe||x(ue),un=pe;return z==="="&&un&&(z=""),oe=$.includePrerelease?"-0":"",he?z===">"||z==="<"?P="<0.0.0-0":P="*":z&&un?(Pe&&(Q=0),ue=0,z===">"?(z=">=",Pe?(B=+B+1,Q=0,ue=0):(Q=+Q+1,ue=0)):z==="<="&&(z="<",Pe?B=+B+1:Q=+Q+1),z==="<"&&(oe="-0"),P=`${z+B}.${Q}.${ue}${oe}`):Pe?P=`>=${B}.0.0${oe} <${+B+1}.0.0-0`:pe&&(P=`>=${B}.${Q}.0${oe} <${B}.${+Q+1}.0-0`),o("xRange return",P),P})},F=(_,$)=>(o("replaceStars",_,$),_.trim().replace(u[l.STAR],"")),k=(_,$)=>(o("replaceGTE0",_,$),_.trim().replace(u[$.includePrerelease?l.GTE0PRE:l.GTE0],"")),L=_=>($,D,P,z,B,Q,ue,oe,he,Pe,pe,un)=>(x(P)?D="":x(z)?D=`>=${P}.0.0${_?"-0":""}`:x(B)?D=`>=${P}.${z}.0${_?"-0":""}`:Q?D=`>=${D}`:D=`>=${D}${_?"-0":""}`,x(he)?oe="":x(Pe)?oe=`<${+he+1}.0.0-0`:x(pe)?oe=`<${he}.${+Pe+1}.0-0`:un?oe=`<=${he}.${Pe}.${pe}-${un}`:_?oe=`<${he}.${Pe}.${+pe+1}-0`:oe=`<=${oe}`,`${D} ${oe}`.trim()),R=(_,$,D)=>{for(let P=0;P<_.length;P++)if(!_[P].test($))return!1;if($.prerelease.length&&!D.includePrerelease){for(let P=0;P<_.length;P++)if(o(_[P].semver),_[P].semver!==s.ANY&&_[P].semver.prerelease.length>0){const z=_[P].semver;if(z.major===$.major&&z.minor===$.minor&&z.patch===$.patch)return!0}return!1}return!0};return $m}var Fm,tF;function Zle(){if(tF)return Fm;tF=1;const e=r6();return Fm=(n,i,r)=>{try{i=new e(i,r)}catch{return!1}return i.test(n)},Fm}var ece=Zle(),s6=jle(ece);function tce(e,t,n){const i=e.open(t),r=250,{origin:s}=new URL(t);let o=40;function a(l){l.source===i&&(o=0,e.removeEventListener("message",a,!1))}e.addEventListener("message",a,!1);function u(){o<=0||(i.postMessage(n,s),setTimeout(u,r),o-=1)}setTimeout(u,r)}var nce=`.vega-embed {
81  position: relative;
82  display: inline-block;
83  box-sizing: border-box;
84}
85.vega-embed.has-actions {
86  padding-right: 38px;
87}
88.vega-embed details:not([open]) > :not(summary) {
89  display: none !important;
90}
91.vega-embed summary {
92  list-style: none;
93  position: absolute;
94  top: 0;
95  right: 0;
96  padding: 6px;
97  z-index: 1000;
98  background: white;
99  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
100  color: #1b1e23;
101  border: 1px solid #aaa;
102  border-radius: 999px;
103  opacity: 0.2;
104  transition: opacity 0.4s ease-in;
105  cursor: pointer;
106  line-height: 0px;
107}
108.vega-embed summary::-webkit-details-marker {
109  display: none;
110}
111.vega-embed summary:active {
112  box-shadow: #aaa 0px 0px 0px 1px inset;
113}
114.vega-embed summary svg {
115  width: 14px;
116  height: 14px;
117}
118.vega-embed details[open] summary {
119  opacity: 0.7;
120}
121.vega-embed:hover summary, .vega-embed:focus-within summary {
122  opacity: 1 !important;
123  transition: opacity 0.2s ease;
124}
125.vega-embed .vega-actions {
126  position: absolute;
127  z-index: 1001;
128  top: 35px;
129  right: -9px;
130  display: flex;
131  flex-direction: column;
132  padding-bottom: 8px;
133  padding-top: 8px;
134  border-radius: 4px;
135  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);
136  border: 1px solid #d9d9d9;
137  background: white;
138  animation-duration: 0.15s;
139  animation-name: scale-in;
140  animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5);
141  text-align: left;
142}
143.vega-embed .vega-actions a {
144  padding: 8px 16px;
145  font-family: sans-serif;
146  font-size: 14px;
147  font-weight: 600;
148  white-space: nowrap;
149  color: #434a56;
150  text-decoration: none;
151}
152.vega-embed .vega-actions a:hover, .vega-embed .vega-actions a:focus {
153  background-color: #f7f7f9;
154  color: black;
155}
156.vega-embed .vega-actions::before, .vega-embed .vega-actions::after {
157  content: "";
158  display: inline-block;
159  position: absolute;
160}
161.vega-embed .vega-actions::before {
162  left: auto;
163  right: 14px;
164  top: -16px;
165  border: 8px solid rgba(0, 0, 0, 0);
166  border-bottom-color: #d9d9d9;
167}
168.vega-embed .vega-actions::after {
169  left: auto;
170  right: 15px;
171  top: -14px;
172  border: 7px solid rgba(0, 0, 0, 0);
173  border-bottom-color: #fff;
174}
175.vega-embed .chart-wrapper.fit-x {
176  width: 100%;
177}
178.vega-embed .chart-wrapper.fit-y {
179  height: 100%;
180}
181
182.vega-embed-wrapper {
183  max-width: 100%;
184  overflow: auto;
185  padding-right: 14px;
186}
187
188@keyframes scale-in {
189  from {
190    opacity: 0;
191    transform: scale(0.6);
192  }
193  to {
194    opacity: 1;
195    transform: scale(1);
196  }
197}
198`;function o6(e,...t){for(const n of t)ice(e,n);return e}function ice(e,t){for(const n of Object.keys(t))du(e,n,t[n],!0)}const Ni=OQ;let hc=Rue;const nF=typeof window<"u"?window:void 0;hc===void 0&&nF?.vl?.compile&&(hc=nF.vl);const rce={export:{svg:!0,png:!0},source:!0,compiled:!0,editor:!0},sce={CLICK_TO_VIEW_ACTIONS:"Click to view actions",COMPILED_ACTION:"View Compiled Vega",EDITOR_ACTION:"Open in Vega Editor",PNG_ACTION:"Save as PNG",SOURCE_ACTION:"View Source",SVG_ACTION:"Save as SVG"},wl={vega:"Vega","vega-lite":"Vega-Lite"},Wh={vega:Ni.version,"vega-lite":hc?hc.version:"not available"},oce={vega:e=>e,"vega-lite":(e,t)=>hc.compile(e,{config:t}).spec},ace=`
199<svg viewBox="0 0 16 16" fill="currentColor" stroke="none" stroke-width="1" stroke-linecap="round" stroke-linejoin="round">
200  <circle r="2" cy="8" cx="2"></circle>
201  <circle r="2" cy="8" cx="8"></circle>
202  <circle r="2" cy="8" cx="14"></circle>
203</svg>`,uce="chart-wrapper";function lce(e){return typeof e=="function"}function iF(e,t,n,i){const r=`<html><head>${t}</head><body><pre><code class="json">`,s=`</code></pre>${n}</body></html>`,o=window.open("");o.document.write(r+e+s),o.document.title=`${wl[i]} JSON Source`}function cce(e,t){if(e.$schema){const n=XN(e.$schema);t&&t!==n.library&&console.warn(`The given visualization spec is written in ${wl[n.library]}, but mode argument sets ${wl[t]??t}.`);const i=n.library;return s6(Wh[i],`^${n.version.slice(1)}`)||console.warn(`The input spec uses ${wl[i]} ${n.version}, but the current version of ${wl[i]} is v${Wh[i]}.`),i}return"mark"in e||"encoding"in e||"layer"in e||"hconcat"in e||"vconcat"in e||"facet"in e||"repeat"in e?"vega-lite":"marks"in e||"signals"in e||"scales"in e||"axes"in e?"vega":t??"vega"}function a6(e){return!!(e&&"load"in e)}function rF(e){return a6(e)?e:Ni.loader(e)}function fce(e){const t=e.usermeta?.embedOptions??{};return Y(t.defaultStyle)&&(t.defaultStyle=!1),t}async function efe(e,t,n={}){let i,r;Y(t)?(r=rF(n.loader),i=JSON.parse(await r.load(t))):i=t;const s=fce(i),o=s.loader;(!r||o)&&(r=rF(n.loader??o));const a=await sF(s,r),u=await sF(n,r),l={...o6(u,a),config:fu(u.config??{},a.config??{})};return await hce(e,i,l,r)}async function sF(e,t){const n=Y(e.config)?JSON.parse(await t.load(e.config)):e.config??{},i=Y(e.patch)?JSON.parse(await t.load(e.patch)):e.patch;return{...e,...i?{patch:i}:{},...n?{config:n}:{}}}function dce(e){const t=e.getRootNode?e.getRootNode():document;return t instanceof ShadowRoot?{root:t,rootContainer:t}:{root:document,rootContainer:document.head??document.body}}async function hce(e,t,n={},i){const r=n.theme?fu(mle[n.theme],n.config??{}):n.config,s=Rs(n.actions)?n.actions:o6({},rce,n.actions??{}),o={...sce,...n.i18n},a=n.renderer??"canvas",u=n.logLevel??Ni.Warn,l=n.downloadFileName??"visualization",c=typeof e=="string"?document.querySelector(e):e;if(!c)throw new Error(`${e} does not exist`);if(n.defaultStyle!==!1){const A="vega-embed-style",{root:w,rootContainer:E}=dce(c);if(!w.getElementById(A)){const S=document.createElement("style");S.id=A,S.innerHTML=n.defaultStyle===void 0||n.defaultStyle===!0?nce.toString():n.defaultStyle,E.appendChild(S)}}const f=cce(t,n.mode);let d=oce[f](t,r);if(f==="vega-lite"&&d.$schema){const A=XN(d.$schema);s6(Wh.vega,`^${A.version.slice(1)}`)||console.warn(`The compiled spec uses Vega ${A.version}, but current version is v${Wh.vega}.`)}c.classList.add("vega-embed"),s&&c.classList.add("has-actions"),c.innerHTML="";let h=c;if(s){const A=document.createElement("div");A.classList.add(uce),c.appendChild(A),h=A}const p=n.patch;if(p&&(d=p instanceof Function?p(d):Ug(d,p,!0,!1).newDocument),n.formatLocale&&Ni.formatLocale(n.formatLocale),n.timeFormatLocale&&Ni.timeFormatLocale(n.timeFormatLocale),n.expressionFunctions)for(const A in n.expressionFunctions){const w=n.expressionFunctions[A];"fn"in w?Ni.expressionFunction(A,w.fn,w.visitor):w instanceof Function&&Ni.expressionFunction(A,w)}const{ast:g}=n,m=Ni.parse(d,f==="vega-lite"?{}:r,{ast:g}),y=new(n.viewClass||Ni.View)(m,{loader:i,logLevel:u,renderer:a,...g?{expr:Ni.expressionInterpreter??n.expr??jQ}:{}}
203);if(y.addSignalListener("autosize",(A,w)=>{const{type:E}=w;E=="fit-x"?(h.classList.add("fit-x"),h.classList.remove("fit-y")):E=="fit-y"?(h.classList.remove("fit-x"),h.classList.add("fit-y")):E=="fit"?h.classList.add("fit-x","fit-y"):h.classList.remove("fit-x","fit-y")}),n.tooltip!==!1){const{loader:A,tooltip:w}=n,E=A&&!a6(A)?A?.baseURL:void 0,S=lce(w)?w:new $le({baseURL:E,...w===!0?{}:w}).call;y.tooltip(S)}let{hover:b}=n;if(b===void 0&&(b=f==="vega"),b){const{hoverSet:A,updateSet:w}=typeof b=="boolean"?{}:b;y.hover(A,w)}n&&(n.width!=null&&y.width(n.width),n.height!=null&&y.height(n.height),n.padding!=null&&y.padding(n.padding)),await y.initialize(h,n.bind).runAsync();let x;if(s!==!1){let A=c;if(n.defaultStyle!==!1||n.forceActionsMenu){const E=document.createElement("details");E.title=o.CLICK_TO_VIEW_ACTIONS,c.append(E),A=E;const S=document.createElement("summary");S.innerHTML=ace,E.append(S),x=C=>{E.contains(C.target)||E.removeAttribute("open")},document.addEventListener("click",x)}const w=document.createElement("div");if(A.append(w),w.classList.add("vega-actions"),s===!0||s.export!==!1){for(const E of["svg","png"])if(s===!0||s.export===!0||s.export[E]){const S=o[`${E.toUpperCase()}_ACTION`],C=document.createElement("a"),F=X(n.scaleFactor)?n.scaleFactor[E]:n.scaleFactor;C.text=S,C.href="#",C.target="_blank",C.download=`${l}.${E}`,C.addEventListener("mousedown",async function(k){k.preventDefault();const L=await y.toImageURL(E,F);this.href=L}),w.append(C)}}if(s===!0||s.source!==!1){const E=document.createElement("a");E.text=o.SOURCE_ACTION,E.href="#",E.addEventListener("click",function(S){iF(Xg(t),n.sourceHeader??"",n.sourceFooter??"",f),S.preventDefault()}),w.append(E)}if(f==="vega-lite"&&(s===!0||s.compiled!==!1)){const E=document.createElement("a");E.text=o.COMPILED_ACTION,E.href="#",E.addEventListener("click",function(S){iF(Xg(d),n.sourceHeader??"",n.sourceFooter??"","vega"),S.preventDefault()}),w.append(E)}if(s===!0||s.editor!==!1){const E=n.editorUrl??"https://vega.github.io/editor/",S=document.createElement("a");S.text=o.EDITOR_ACTION,S.href="#",S.addEventListener("click",function(C){tce(window,E,{config:r,mode:p?"vega":f,renderer:a,spec:Xg(p?d:t)}),C.preventDefault()}),w.append(S)}}function v(){x&&document.removeEventListener("click",x),y.finalize()}return{view:y,spec:t,vgSpec:d,finalize:v,embedOptions:n}}export{rce as DEFAULT_ACTIONS,efe as default,cce as guessMode,Ni as vega,hc as vegaLite};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.