Socket
Socket
Sign inDemoInstall

vega-scenegraph

Package Overview
Dependencies
Maintainers
2
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vega-scenegraph - npm Package Compare versions

Comparing version 4.8.1 to 4.8.2

2

build/vega-scenegraph.min.js

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("vega-util"),require("d3-shape"),require("d3-path"),require("vega-canvas"),require("vega-loader"),require("vega-scale")):"function"==typeof define&&define.amd?define(["exports","vega-util","d3-shape","d3-path","vega-canvas","vega-loader","vega-scale"],e):e((t=t||self).vega={},t.vega,t.d3,t.d3,t.vega,t.vega,t.vega)}(this,(function(t,e,n,i,r,o,s){"use strict";var a=0;function l(t){return t&&t.gradient}function u(t,e,n){let i=t.id,r=t.gradient,o="radial"===r?"p_":"";return i||(i=t.id="gradient_"+a++,"radial"===r?(t.x1=c(t.x1,.5),t.y1=c(t.y1,.5),t.r1=c(t.r1,0),t.x2=c(t.x2,.5),t.y2=c(t.y2,.5),t.r2=c(t.r2,.5),o="p_"):(t.x1=c(t.x1,0),t.y1=c(t.y1,0),t.x2=c(t.x2,1),t.y2=c(t.y2,0))),e[i]=t,"url("+(n||"")+"#"+o+i+")"}function c(t,e){return null!=t?t:e}var h={basis:{curve:n.curveBasis},"basis-closed":{curve:n.curveBasisClosed},"basis-open":{curve:n.curveBasisOpen},bundle:{curve:n.curveBundle,tension:"beta",value:.85},cardinal:{curve:n.curveCardinal,tension:"tension",value:0},"cardinal-open":{curve:n.curveCardinalOpen,tension:"tension",value:0},"cardinal-closed":{curve:n.curveCardinalClosed,tension:"tension",value:0},"catmull-rom":{curve:n.curveCatmullRom,tension:"alpha",value:.5},"catmull-rom-closed":{curve:n.curveCatmullRomClosed,tension:"alpha",value:.5},"catmull-rom-open":{curve:n.curveCatmullRomOpen,tension:"alpha",value:.5},linear:{curve:n.curveLinear},"linear-closed":{curve:n.curveLinearClosed},monotone:{horizontal:n.curveMonotoneY,vertical:n.curveMonotoneX},natural:{curve:n.curveNatural},step:{curve:n.curveStep},"step-after":{curve:n.curveStepAfter},"step-before":{curve:n.curveStepBefore}};function f(t,n,i){var r=e.hasOwnProperty(h,t)&&h[t],o=null;return r&&(o=r.curve||r[n||"vertical"],r.tension&&null!=i&&(o=o[r.tension](i))),o}var d={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7},g=[/([MLHVCSQTAZmlhvcsqtaz])/g,/###/,/(\d)([-+])/g,/\s|,|###/];function p(t){var e,n,i,r,o,s,a,l,u,c,h,f=[];for(l=0,c=(e=t.slice().replace(g[0],"###$1").split(g[1]).slice(1)).length;l<c;++l){for(i=(n=e[l]).slice(1).trim().replace(g[2],"$1###$2").split(g[3]),r=[s=n.charAt(0)],u=0,h=i.length;u<h;++u)(o=+i[u])===o&&r.push(o);if(a=d[s.toLowerCase()],r.length-1>a)for(u=1,h=r.length;u<h;u+=a)f.push([s].concat(r.slice(u,u+a)));else f.push(r)}return f}const v=Math.PI/180,y=Math.PI/2,m=2*Math.PI,_=Math.sqrt(3)/2;var x={},b={},k=[].join;function w(t){var e=k.call(t);if(b[e])return b[e];var n=t[0],i=t[1],r=t[2],o=t[3],s=t[4],a=t[5],l=t[6],u=t[7],c=u*s,h=-l*a,f=l*s,d=u*a,g=Math.cos(r),p=Math.sin(r),v=Math.cos(o),y=Math.sin(o),m=.5*(o-r),_=Math.sin(.5*m),x=8/3*_*_/Math.sin(m),w=n+g-x*p,T=i+p+x*g,A=n+v,M=i+y,C=A+x*y,R=M-x*v;return b[e]=[c*w+h*T,f*w+d*T,c*C+h*R,f*C+d*R,c*A+h*M,f*A+d*M]}var T=["l",0,0,0,0,0,0,0];function A(t,e,n){var i=T[0]=t[0];if("a"===i||"A"===i)T[1]=e*t[1],T[2]=n*t[2],T[3]=t[3],T[4]=t[4],T[5]=t[5],T[6]=e*t[6],T[7]=n*t[7];else if("h"===i||"H"===i)T[1]=e*t[1];else if("v"===i||"V"===i)T[1]=n*t[1];else for(var r=1,o=t.length;r<o;++r)T[r]=(r%2==1?e:n)*t[r];return T}function M(t,e,n,i,r,o){var s,a,l,u,c,h=null,f=0,d=0,g=0,p=0;null==n&&(n=0),null==i&&(i=0),null==r&&(r=1),null==o&&(o=r),t.beginPath&&t.beginPath();for(var v=0,y=e.length;v<y;++v){switch(s=e[v],1===r&&1===o||(s=A(s,r,o)),s[0]){case"l":f+=s[1],d+=s[2],t.lineTo(f+n,d+i);break;case"L":f=s[1],d=s[2],t.lineTo(f+n,d+i);break;case"h":f+=s[1],t.lineTo(f+n,d+i);break;case"H":f=s[1],t.lineTo(f+n,d+i);break;case"v":d+=s[1],t.lineTo(f+n,d+i);break;case"V":d=s[1],t.lineTo(f+n,d+i);break;case"m":f+=s[1],d+=s[2],t.moveTo(f+n,d+i);break;case"M":f=s[1],d=s[2],t.moveTo(f+n,d+i);break;case"c":a=f+s[5],l=d+s[6],g=f+s[3],p=d+s[4],t.bezierCurveTo(f+s[1]+n,d+s[2]+i,g+n,p+i,a+n,l+i),f=a,d=l;break;case"C":f=s[5],d=s[6],g=s[3],p=s[4],t.bezierCurveTo(s[1]+n,s[2]+i,g+n,p+i,f+n,d+i);break;case"s":a=f+s[3],l=d+s[4],g=2*f-g,p=2*d-p,t.bezierCurveTo(g+n,p+i,f+s[1]+n,d+s[2]+i,a+n,l+i),g=f+s[1],p=d+s[2],f=a,d=l;break;case"S":a=s[3],l=s[4],g=2*f-g,p=2*d-p,t.bezierCurveTo(g+n,p+i,s[1]+n,s[2]+i,a+n,l+i),f=a,d=l,g=s[1],p=s[2];break;case"q":a=f+s[3],l=d+s[4],g=f+s[1],p=d+s[2],t.quadraticCurveTo(g+n,p+i,a+n,l+i),f=a,d=l;break;case"Q":a=s[3],l=s[4],t.quadraticCurveTo(s[1]+n,s[2]+i,a+n,l+i),f=a,d=l,g=s[1],p=s[2];break;case"t":a=f+s[1],l=d+s[2],null===h[0].match(/[QqTt]/)?(g=f,p=d):"t"===h[0]?(g=2*f-u,p=2*d-c):"q"===h[0]&&(g=2*f-g,p=2*d-p),u=g,c=p,t.quadraticCurveTo(g+n,p+i,a+n,l+i),d=l,g=(f=a)+s[1],p=d+s[2];break;case"T":a=s[1],l=s[2],g=2*f-g,p=2*d-p,t.quadraticCurveTo(g+n,p+i,a+n,l+i),f=a,d=l;break;case"a":C(t,f+n,d+i,[s[1],s[2],s[3],s[4],s[5],s[6]+f+n,s[7]+d+i]),f+=s[6],d+=s[7];break;case"A":C(t,f+n,d+i,[s[1],s[2],s[3],s[4],s[5],s[6]+n,s[7]+i]),f=s[6],d=s[7];break;case"z":case"Z":t.closePath()}h=s}}function C(t,e,n,i){for(var r=function(t,e,n,i,r,o,s,a,l){var u=k.call(arguments);if(x[u])return x[u];var c=s*v,h=Math.sin(c),f=Math.cos(c),d=f*(a-t)*.5+h*(l-e)*.5,g=f*(l-e)*.5-h*(a-t)*.5,p=d*d/((n=Math.abs(n))*n)+g*g/((i=Math.abs(i))*i);p>1&&(n*=p=Math.sqrt(p),i*=p);var _=f/n,b=h/n,w=-h/i,T=f/i,A=_*a+b*l,M=w*a+T*l,C=_*t+b*e,R=w*t+T*e,z=(C-A)*(C-A)+(R-M)*(R-M),P=1/z-.25;P<0&&(P=0);var S=Math.sqrt(P);o==r&&(S=-S);var L=.5*(A+C)-S*(R-M),O=.5*(M+R)+S*(C-A),N=Math.atan2(M-O,A-L),q=Math.atan2(R-O,C-L),D=q-N;D<0&&1===o?D+=m:D>0&&0===o&&(D-=m);for(var E=Math.ceil(Math.abs(D/(y+.001))),I=[],B=0;B<E;++B){var V=N+B*D/E,H=N+(B+1)*D/E;I[B]=[L,O,V,H,n,i,h,f]}return x[u]=I}(i[5],i[6],i[0],i[1],i[3],i[4],i[2],e,n),o=0;o<r.length;++o){var s=w(r[o]);t.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5])}}var R=.5773502691896257,z={circle:{draw:function(t,e){var n=Math.sqrt(e)/2;t.moveTo(n,0),t.arc(0,0,n,0,m)}},cross:{draw:function(t,e){var n=Math.sqrt(e)/2,i=n/2.5;t.moveTo(-n,-i),t.lineTo(-n,i),t.lineTo(-i,i),t.lineTo(-i,n),t.lineTo(i,n),t.lineTo(i,i),t.lineTo(n,i),t.lineTo(n,-i),t.lineTo(i,-i),t.lineTo(i,-n),t.lineTo(-i,-n),t.lineTo(-i,-i),t.closePath()}},diamond:{draw:function(t,e){var n=Math.sqrt(e)/2;t.moveTo(-n,0),t.lineTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.closePath()}},square:{draw:function(t,e){var n=Math.sqrt(e),i=-n/2;t.rect(i,i,n,n)}},arrow:{draw:function(t,e){var n=Math.sqrt(e)/2,i=n/7,r=n/2.5,o=n/8;t.moveTo(-i,n),t.lineTo(i,n),t.lineTo(i,-o),t.lineTo(r,-o),t.lineTo(0,-n),t.lineTo(-r,-o),t.lineTo(-i,-o),t.closePath()}},wedge:{draw:function(t,e){var n=Math.sqrt(e)/2,i=_*n,r=i-n*R,o=n/4;t.moveTo(0,-i-r),t.lineTo(-o,i-r),t.lineTo(o,i-r),t.closePath()}},triangle:{draw:function(t,e){var n=Math.sqrt(e)/2,i=_*n,r=i-n*R;t.moveTo(0,-i-r),t.lineTo(-n,i-r),t.lineTo(n,i-r),t.closePath()}},"triangle-up":{draw:function(t,e){var n=Math.sqrt(e)/2,i=_*n;t.moveTo(0,-i),t.lineTo(-n,i),t.lineTo(n,i),t.closePath()}},"triangle-down":{draw:function(t,e){var n=Math.sqrt(e)/2,i=_*n;t.moveTo(0,i),t.lineTo(-n,-i),t.lineTo(n,-i),t.closePath()}},"triangle-right":{draw:function(t,e){var n=Math.sqrt(e)/2,i=_*n;t.moveTo(i,0),t.lineTo(-i,-n),t.lineTo(-i,n),t.closePath()}},"triangle-left":{draw:function(t,e){var n=Math.sqrt(e)/2,i=_*n;t.moveTo(-i,0),t.lineTo(i,-n),t.lineTo(i,n),t.closePath()}},stroke:{draw:function(t,e){var n=Math.sqrt(e)/2;t.moveTo(-n,0),t.lineTo(n,0)}}};function P(t){return e.hasOwnProperty(z,t)?z[t]:function(t){if(!e.hasOwnProperty(S,t)){var n=p(t);S[t]={draw:function(t,e){M(t,n,0,0,Math.sqrt(e)/2)}}}return S[t]}(t)}var S={};const L=.448084975506;function O(t){return t.x}function N(t){return t.y}function q(t){return t.width}function D(t){return t.height}function E(t){return"function"==typeof t?t:()=>+t}function I(t,e,n){return Math.max(e,Math.min(t,n))}function B(){var t=O,e=N,n=q,r=D,o=E(0),s=o,a=o,l=o,u=null;function c(c,h,f){var d,g=null!=h?h:+t.call(this,c),p=null!=f?f:+e.call(this,c),v=+n.call(this,c),y=+r.call(this,c),m=Math.min(v,y)/2,_=I(+o.call(this,c),0,m),x=I(+s.call(this,c),0,m),b=I(+a.call(this,c),0,m),k=I(+l.call(this,c),0,m);if(u||(u=d=i.path()),_<=0&&x<=0&&b<=0&&k<=0)u.rect(g,p,v,y);else{var w=g+v,T=p+y;u.moveTo(g+_,p),u.lineTo(w-x,p),u.bezierCurveTo(w-L*x,p,w,p+L*x,w,p+x),u.lineTo(w,T-k),u.bezierCurveTo(w,T-L*k,w-L*k,T,w-k,T),u.lineTo(g+b,T),u.bezierCurveTo(g+L*b,T,g,T-L*b,g,T-b),u.lineTo(g,p+_),u.bezierCurveTo(g,p+L*_,g+L*_,p,g+_,p),u.closePath()}if(d)return u=null,d+""||null}return c.x=function(e){return arguments.length?(t=E(e),c):t},c.y=function(t){return arguments.length?(e=E(t),c):e},c.width=function(t){return arguments.length?(n=E(t),c):n},c.height=function(t){return arguments.length?(r=E(t),c):r},c.cornerRadius=function(t,e,n,i){return arguments.length?(o=E(t),s=null!=e?E(e):o,l=null!=n?E(n):o,a=null!=i?E(i):s,c):o},c.context=function(t){return arguments.length?(u=null==t?null:t,c):u},c}function V(){var t,e,n,r,o,s,a,l,u=null;function c(t,e,n){var i=n/2;if(o){var r=a-e,c=t-s;if(r||c){var h=Math.sqrt(r*r+c*c),f=(r/=h)*l,d=(c/=h)*l,g=Math.atan2(c,r);u.moveTo(s-f,a-d),u.lineTo(t-r*i,e-c*i),u.arc(t,e,i,g-Math.PI,g),u.lineTo(s+f,a+d),u.arc(s,a,l,g,g+Math.PI)}else u.arc(t,e,i,0,m);u.closePath()}else o=1;s=t,a=e,l=i}function h(s){var a,l,h,f=s.length,d=!1;for(null==u&&(u=h=i.path()),a=0;a<=f;++a)!(a<f&&r(l=s[a],a,s))===d&&(d=!d)&&(o=0),d&&c(+t(l,a,s),+e(l,a,s),+n(l,a,s));if(h)return u=null,h+""||null}return h.x=function(e){return arguments.length?(t=e,h):t},h.y=function(t){return arguments.length?(e=t,h):e},h.size=function(t){return arguments.length?(n=t,h):n},h.defined=function(t){return arguments.length?(r=t,h):r},h.context=function(t){return arguments.length?(u=null==t?null:t,h):u},h}function H(t,e){return null!=t?t:e}const j=t=>t.x||0,G=t=>t.y||0,W=t=>!(!1===t.defined),U=n.arc().startAngle(t=>t.startAngle||0).endAngle(t=>t.endAngle||0).padAngle(t=>t.padAngle||0).innerRadius(t=>t.innerRadius||0).outerRadius(t=>t.outerRadius||0).cornerRadius(t=>t.cornerRadius||0),X=n.area().x(j).y1(G).y0(t=>(t.y||0)+(t.height||0)).defined(W),F=n.area().y(G).x1(j).x0(t=>(t.x||0)+(t.width||0)).defined(W),Y=n.line().x(j).y(G).defined(W),J=B().x(j).y(G).width(t=>t.width||0).height(t=>t.height||0).cornerRadius(t=>H(t.cornerRadiusTopLeft,t.cornerRadius)||0,t=>H(t.cornerRadiusTopRight,t.cornerRadius)||0,t=>H(t.cornerRadiusBottomRight,t.cornerRadius)||0,t=>H(t.cornerRadiusBottomLeft,t.cornerRadius)||0),$=n.symbol().type(t=>P(t.shape||"circle")).size(t=>H(t.size,64)),Q=V().x(j).y(G).defined(W).size(t=>t.size||1);function Z(t){return t.cornerRadius||t.cornerRadiusTopLeft||t.cornerRadiusTopRight||t.cornerRadiusBottomRight||t.cornerRadiusBottomLeft}function K(t,e,n,i){return J.context(t)(e,n,i)}var tt=1;function et(){tt=1}function nt(t,n,i){var r=n.clip,o=t._defs,s=n.clip_id||(n.clip_id="clip"+tt++),a=o.clipping[s]||(o.clipping[s]={id:s});return e.isFunction(r)?a.path=r(null):Z(i)?a.path=K(null,i,0,0):(a.width=i.width||0,a.height=i.height||0),"url(#"+s+")"}function it(t){this.clear(),t&&this.union(t)}var rt=it.prototype;function ot(t){this.mark=t,this.bounds=this.bounds||new it}function st(t){ot.call(this,t),this.items=this.items||[]}function at(t){this._pending=0,this._loader=t||o.loader()}rt.clone=function(){return new it(this)},rt.clear=function(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},rt.empty=function(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},rt.equals=function(t){return this.x1===t.x1&&this.y1===t.y1&&this.x2===t.x2&&this.y2===t.y2},rt.set=function(t,e,n,i){return n<t?(this.x2=t,this.x1=n):(this.x1=t,this.x2=n),i<e?(this.y2=e,this.y1=i):(this.y1=e,this.y2=i),this},rt.add=function(t,e){return t<this.x1&&(this.x1=t),e<this.y1&&(this.y1=e),t>this.x2&&(this.x2=t),e>this.y2&&(this.y2=e),this},rt.expand=function(t){return this.x1-=t,this.y1-=t,this.x2+=t,this.y2+=t,this},rt.round=function(){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},rt.scale=function(t){return this.x1*=t,this.y1*=t,this.x2*=t,this.y2*=t,this},rt.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},rt.rotate=function(t,e,n){const i=this.rotatedPoints(t,e,n);return this.clear().add(i[0],i[1]).add(i[2],i[3]).add(i[4],i[5]).add(i[6],i[7])},rt.rotatedPoints=function(t,e,n){var{x1:i,y1:r,x2:o,y2:s}=this,a=Math.cos(t),l=Math.sin(t),u=e-e*a+n*l,c=n-e*l-n*a;return[a*i-l*r+u,l*i+a*r+c,a*i-l*s+u,l*i+a*s+c,a*o-l*r+u,l*o+a*r+c,a*o-l*s+u,l*o+a*s+c]},rt.union=function(t){return t.x1<this.x1&&(this.x1=t.x1),t.y1<this.y1&&(this.y1=t.y1),t.x2>this.x2&&(this.x2=t.x2),t.y2>this.y2&&(this.y2=t.y2),this},rt.intersect=function(t){return t.x1>this.x1&&(this.x1=t.x1),t.y1>this.y1&&(this.y1=t.y1),t.x2<this.x2&&(this.x2=t.x2),t.y2<this.y2&&(this.y2=t.y2),this},rt.encloses=function(t){return t&&this.x1<=t.x1&&this.x2>=t.x2&&this.y1<=t.y1&&this.y2>=t.y2},rt.alignsWith=function(t){return t&&(this.x1==t.x1||this.x2==t.x2||this.y1==t.y1||this.y2==t.y2)},rt.intersects=function(t){return t&&!(this.x2<t.x1||this.x1>t.x2||this.y2<t.y1||this.y1>t.y2)},rt.contains=function(t,e){return!(t<this.x1||t>this.x2||e<this.y1||e>this.y2)},rt.width=function(){return this.x2-this.x1},rt.height=function(){return this.y2-this.y1},e.inherits(st,ot);var lt=at.prototype;function ut(t){t._pending+=1}function ct(t){t._pending-=1}function ht(t,e,n){if(e.stroke&&0!==e.opacity&&0!==e.strokeOpacity){const i=null!=e.strokeWidth?+e.strokeWidth:1;t.expand(i+(n?function(t,e){return t.strokeJoin&&"miter"!==t.strokeJoin?0:e}(e,i):0))}return t}lt.pending=function(){return this._pending},lt.sanitizeURL=function(t){var e=this;return ut(e),e._loader.sanitize(t,{context:"href"}).then((function(t){return ct(e),t})).catch((function(){return ct(e),null}))},lt.loadImage=function(t){const n=this,i=r.image();return ut(n),n._loader.sanitize(t,{context:"image"}).then((function(t){const r=t.href;if(!r||!i)throw{url:r};const o=new i,s=e.hasOwnProperty(t,"crossOrigin")?t.crossOrigin:"anonymous";return null!=s&&(o.crossOrigin=s),o.onload=()=>ct(n),o.onerror=()=>ct(n),o.src=r,o})).catch((function(t){return ct(n),{complete:!1,width:0,height:0,src:t&&t.url||""}}))},lt.ready=function(){var t=this;return new Promise((function(e){!function n(i){t.pending()?setTimeout((function(){n(!0)}),10):e(i)}(!1)}))};var ft,dt,gt,pt=m-1e-8;function vt(t){return ft=t,vt}function yt(){}function mt(t,e){ft.add(t,e)}function _t(t,e){mt(dt=t,gt=e)}function xt(t){mt(t,ft.y1)}function bt(t){mt(ft.x1,t)}function kt(t,e,n,i){const r=(t-e)/(t+n-2*e);0<r&&r<1&&i(t+(e-t)*r)}function wt(t,e,n,i,r){const o=i-t+3*e-3*n,s=t+n-2*e,a=t-e;let l,u=0,c=0;Math.abs(o)>1e-14?(l=s*s+a*o,l>=0&&(l=Math.sqrt(l),u=(-s+l)/o,c=(-s-l)/o)):u=.5*a/s,0<u&&u<1&&r(Tt(u,t,e,n,i)),0<c&&c<1&&r(Tt(c,t,e,n,i))}function Tt(t,e,n,i,r){const o=1-t,s=o*o,a=t*t;return s*o*e+3*s*t*n+3*o*a*i+a*t*r}vt.beginPath=yt,vt.closePath=yt,vt.moveTo=_t,vt.lineTo=_t,vt.rect=function(t,e,n,i){mt(t+n,e+i),_t(t,e)},vt.quadraticCurveTo=function(t,e,n,i){kt(dt,t,n,xt),kt(gt,e,i,bt),_t(n,i)},vt.bezierCurveTo=function(t,e,n,i,r,o){wt(dt,t,n,r,xt),wt(gt,e,i,o,bt),_t(r,o)},vt.arc=function(t,e,n,i,r,o){if(dt=n*Math.cos(r)+t,gt=n*Math.sin(r)+e,Math.abs(r-i)>pt)mt(t-n,e-n),mt(t+n,e+n);else{const s=i=>mt(n*Math.cos(i)+t,n*Math.sin(i)+e);let a,l;if(s(i),s(r),r!==i)if((i%=m)<0&&(i+=m),(r%=m)<0&&(r+=m),r<i&&(o=!o,a=i,i=r,r=a),o)for(r-=m,a=i-i%y,l=0;l<4&&a>r;++l,a-=y)s(a);else for(a=i-i%y+y,l=0;l<4&&a<r;++l,a+=y)s(a)}};var At=(At=r.canvas(1,1))?At.getContext("2d"):null;const Mt=new it;function Ct(t){return function(e,n){if(!At)return!0;t(At,e),Mt.clear().union(e.bounds).intersect(n).round();const{x1:i,y1:r,x2:o,y2:s}=Mt;for(let t=r;t<=s;++t)for(let e=i;e<=o;++e)if(At.isPointInPath(e,t))return!0;return!1}}function Rt(t,e){return e.contains(t.x||0,t.y||0)}function zt(t,e){const n=t.x||0,i=t.y||0,r=t.width||0,o=t.height||0;return e.intersects(Mt.set(n,i,n+r,i+o))}function Pt(t,e){const n=t.x||0,i=t.y||0;return St(e,n,i,null!=t.x2?t.x2:n,null!=t.y2?t.y2:i)}function St(t,e,n,i,r){const{x1:o,y1:s,x2:a,y2:l}=t,u=i-e,c=r-n;let h,f,d,g,p=0,v=1;for(g=0;g<4;++g){if(0===g&&(h=-u,f=-(o-e)),1===g&&(h=u,f=a-e),2===g&&(h=-c,f=-(s-n)),3===g&&(h=c,f=l-n),Math.abs(h)<1e-10&&f<0)return!1;if(d=f/h,h<0){if(d>v)return!1;d>p&&(p=d)}else if(h>0){if(d<p)return!1;d<v&&(v=d)}}return!0}function Lt(t,e){t.globalCompositeOperation=e.blend||"source-over"}function Ot(t,e){return null==t?e:t}function Nt(t,e){const n=e.length;for(let i=0;i<n;++i)t.addColorStop(e[i].offset,e[i].color);return t}function qt(t,e,n){return l(n)?function(t,e,n){const i=n.width(),o=n.height();let s;if("radial"===e.gradient)s=t.createRadialGradient(n.x1+Ot(e.x1,.5)*i,n.y1+Ot(e.y1,.5)*o,Math.max(i,o)*Ot(e.r1,0),n.x1+Ot(e.x2,.5)*i,n.y1+Ot(e.y2,.5)*o,Math.max(i,o)*Ot(e.r2,.5));else{const a=Ot(e.x1,0),l=Ot(e.y1,0),u=Ot(e.x2,1),c=Ot(e.y2,0);if(a!==u&&l!==c&&i!==o){const n=r.canvas(Math.ceil(i),Math.ceil(o)),s=n.getContext("2d");return s.scale(i,o),s.fillStyle=Nt(s.createLinearGradient(a,l,u,c),e.stops),s.fillRect(0,0,i,o),t.createPattern(n,"no-repeat")}s=t.createLinearGradient(n.x1+a*i,n.y1+l*o,n.x1+u*i,n.y1+c*o)}return Nt(s,e.stops)}(t,n,e.bounds):n}function Dt(t,e,n){return(n*=null==e.fillOpacity?1:e.fillOpacity)>0&&(t.globalAlpha=n,t.fillStyle=qt(t,e,e.fill),!0)}var Et=[];function It(t,e,n){var i=null!=(i=e.strokeWidth)?i:1;return!(i<=0)&&((n*=null==e.strokeOpacity?1:e.strokeOpacity)>0&&(t.globalAlpha=n,t.strokeStyle=qt(t,e,e.stroke),t.lineWidth=i,t.lineCap=e.strokeCap||"butt",t.lineJoin=e.strokeJoin||"miter",t.miterLimit=e.strokeMiterLimit||10,t.setLineDash&&(t.setLineDash(e.strokeDash||Et),t.lineDashOffset=e.strokeDashOffset||0),!0))}function Bt(t,e){return t.zindex-e.zindex||t.index-e.index}function Vt(t){if(!t.zdirty)return t.zitems;var e,n,i,r=t.items,o=[];for(n=0,i=r.length;n<i;++n)(e=r[n]).index=n,e.zindex&&o.push(e);return t.zdirty=!1,t.zitems=o.sort(Bt)}function Ht(t,e){var n,i,r=t.items;if(r&&r.length){var o=Vt(t);if(o&&o.length){for(n=0,i=r.length;n<i;++n)r[n].zindex||e(r[n]);r=o}for(n=0,i=r.length;n<i;++n)e(r[n])}}function jt(t,e){var n,i,r=t.items;if(!r||!r.length)return null;var o=Vt(t);for(o&&o.length&&(r=o),i=r.length;--i>=0;)if(n=e(r[i]))return n;if(r===o)for(i=(r=t.items).length;--i>=0;)if(!r[i].zindex&&(n=e(r[i])))return n;return null}function Gt(t){return function(e,n,i){Ht(n,(function(n){i&&!i.intersects(n.bounds)||Ut(t,e,n,n)}))}}function Wt(t){return function(e,n,i){!n.items.length||i&&!i.intersects(n.bounds)||Ut(t,e,n.items[0],n.items)}}function Ut(t,e,n,i){var r=null==n.opacity?1:n.opacity;0!==r&&(t(e,i)||(Lt(e,n),n.fill&&Dt(e,n,r)&&e.fill(),n.stroke&&It(e,n,r)&&e.stroke()))}function Xt(t){return t=t||e.truthy,function(e,n,i,r,o,s){return i*=e.pixelRatio,r*=e.pixelRatio,jt(n,(function(n){var a=n.bounds;if((!a||a.contains(o,s))&&a)return t(e,n,i,r,o,s)?n:void 0}))}}function Ft(t,e){return function(n,i,r,o){var s,a,l=Array.isArray(i)?i[0]:i,u=null==e?l.fill:e,c=l.stroke&&n.isPointInStroke;return c&&(s=l.strokeWidth,a=l.strokeCap,n.lineWidth=null!=s?s:1,n.lineCap=null!=a?a:"butt"),!t(n,i)&&(u&&n.isPointInPath(r,o)||c&&n.isPointInStroke(r,o))}}function Yt(t){return Xt(Ft(t))}function Jt(t,e){return"translate("+t+","+e+")"}function $t(t){return"rotate("+t+")"}function Qt(t){return Jt(t.x||0,t.y||0)}function Zt(t){return Jt(t.x||0,t.y||0)+(t.angle?" "+$t(t.angle):"")+(t.scaleX||t.scaleY?" "+(e=t.scaleX||1,n=t.scaleY||1,"scale("+e+","+n+")"):"");var e,n}function Kt(t,e,n){function i(t,n){var i=n.x||0,r=n.y||0,o=n.angle||0;t.translate(i,r),o&&t.rotate(o*=v),t.beginPath(),e(t,n),o&&t.rotate(-o),t.translate(-i,-r)}return{type:t,tag:"path",nested:!1,attr:function(t,n){t("transform",Zt(n)),t("d",e(null,n))},bound:function(t,n){var i=n.x||0,r=n.y||0;return e(vt(t),n),ht(t,n).translate(i,r),n.angle&&t.rotate(n.angle*v,i,r),t},draw:Gt(i),pick:Yt(i),isect:n||Ct(i)}}var te=Kt("arc",(function(t,e){return U.context(t)(e)}));function ee(t,e,n){function i(t,n){t.beginPath(),e(t,n)}var r=Ft(i);return{type:t,tag:"path",nested:!0,attr:function(t,n){var i=n.mark.items;i.length&&t("d",e(null,i))},bound:function(t,n){var i=n.items;return 0===i.length?t:(e(vt(t),i),ht(t,i[0]))},draw:Wt(i),pick:function(t,e,n,i,o,s){var a=e.items,l=e.bounds;return!a||!a.length||l&&!l.contains(o,s)?null:(n*=t.pixelRatio,i*=t.pixelRatio,r(t,a,n,i)?a[0]:null)},isect:Rt,tip:n}}var ne=ee("area",(function(t,e){var n=e[0],i=n.interpolate||"linear";return("horizontal"===n.orient?F:X).curve(f(i,n.orient,n.tension)).context(t)(e)}),(function(t,e){for(var n,i,r="horizontal"===t[0].orient?e[1]:e[0],o="horizontal"===t[0].orient?"y":"x",s=t.length,a=1/0;--s>=0;)!1!==t[s].defined&&(i=Math.abs(t[s][o]-r))<a&&(a=i,n=t[s]);return n}));function ie(t,e){t.beginPath(),Z(e)?K(t,e,0,0):t.rect(0,0,e.width||0,e.height||0),t.clip()}function re(t){var e=null!=(e=t.strokeWidth)?e:1;return null!=t.strokeOffset?t.strokeOffset:t.stroke&&e>.5&&e<1.5?.5-Math.abs(e-1):0}function oe(t,e){var n=re(e);t("d",K(null,e,n,n))}function se(t,e,n,i){var r=re(e);t.beginPath(),K(t,e,(n||0)+r,(i||0)+r)}var ae=Ft(se),le=Ft(se,!1);var ue={type:"group",tag:"g",nested:!1,attr:function(t,e){t("transform",Qt(e))},bound:function(t,e){if(!e.clip&&e.items)for(var n=e.items,i=0,r=n.length;i<r;++i)t.union(n[i].bounds);return(e.clip||e.width||e.height)&&!e.noBound&&t.add(0,0).add(e.width||0,e.height||0),ht(t,e),t.translate(e.x||0,e.y||0)},draw:function(t,e,n){var i=this;Ht(e,(function(e){var r=e.x||0,o=e.y||0,s=e.strokeForeground,a=null==e.opacity?1:e.opacity;(e.stroke||e.fill)&&a&&(se(t,e,r,o),Lt(t,e),e.fill&&Dt(t,e,a)&&t.fill(),e.stroke&&!s&&It(t,e,a)&&t.stroke()),t.save(),t.translate(r,o),e.clip&&ie(t,e),n&&n.translate(-r,-o),Ht(e,(function(e){i.draw(t,e,n)})),n&&n.translate(r,o),t.restore(),s&&e.stroke&&a&&(se(t,e,r,o),Lt(t,e),It(t,e,a)&&t.stroke())}))},pick:function(t,e,n,i,r,o){if(e.bounds&&!e.bounds.contains(r,o)||!e.items)return null;var s=this,a=n*t.pixelRatio,l=i*t.pixelRatio;return jt(e,(function(u){var c,h,f,d,g,p,v,y,m;if((!(y=u.bounds)||y.contains(r,o))&&(d=u.x||0,g=u.y||0,p=d+(u.width||0),v=g+(u.height||0),!(m=u.clip)||!(r<d||r>p||o<d||o>v)))return t.save(),t.translate(d,g),d=r-d,g=o-g,m&&Z(u)&&!ae(t,u,a,l)?(t.restore(),null):(h=u.strokeForeground,(f=!1!==e.interactive)&&h&&u.stroke&&le(t,u,a,l)?(t.restore(),u):(!(c=jt(u,(function(t){return function(t,e,n){return(!1!==t.interactive||"group"===t.marktype)&&t.bounds&&t.bounds.contains(e,n)}(t,d,g)?s.pick(t,n,i,d,g):null})))&&f&&(u.fill||!h&&u.stroke)&&ae(t,u,a,l)&&(c=u),t.restore(),c||null))}))},isect:zt,content:function(t,e,n){t("clip-path",e.clip?nt(n,e,e):null)},background:function(t,e){t("class","background"),t("aria-hidden",!0),oe(t,e)},foreground:function(t,e){t("class","foreground"),t("aria-hidden",!0),e.strokeForeground?oe(t,e):t("d","")}};function ce(t,e){var n=t.image;return(!n||t.url&&t.url!==n.url)&&(n={complete:!1,width:0,height:0},e.loadImage(t.url).then(e=>{t.image=e,t.image.url=t.url})),n}function he(t,e){return null!=t.width?t.width:e&&e.width?!1!==t.aspect&&t.height?t.height*e.width/e.height:e.width:0}function fe(t,e){return null!=t.height?t.height:e&&e.height?!1!==t.aspect&&t.width?t.width*e.height/e.width:e.height:0}function de(t,e){return"center"===t?e/2:"right"===t?e:0}function ge(t,e){return"middle"===t?e/2:"bottom"===t?e:0}var pe={type:"image",tag:"image",nested:!1,attr:function(t,e,n){var i=ce(e,n),r=e.x||0,o=e.y||0,s=he(e,i),a=fe(e,i),l=!1===e.aspect?"none":"xMidYMid";r-=de(e.align,s),o-=ge(e.baseline,a),!i.src&&i.toDataURL?t("href",i.toDataURL(),"http://www.w3.org/1999/xlink","xlink:href"):t("href",i.src||"","http://www.w3.org/1999/xlink","xlink:href"),t("transform",Jt(r,o)),t("width",s),t("height",a),t("preserveAspectRatio",l)},bound:function(t,e){var n=e.image,i=e.x||0,r=e.y||0,o=he(e,n),s=fe(e,n);return i-=de(e.align,o),r-=ge(e.baseline,s),t.set(i,r,i+o,r+s)},draw:function(t,e,n){var i=this;Ht(e,(function(e){if(!n||n.intersects(e.bounds)){var r,o,s,a,l=ce(e,i),u=e.x||0,c=e.y||0,h=he(e,l),f=fe(e,l);u-=de(e.align,h),c-=ge(e.baseline,f),!1!==e.aspect&&(o=l.width/l.height,s=e.width/e.height,o==o&&s==s&&o!==s&&(s<o?(c+=(f-(a=h/o))/2,f=a):(u+=(h-(a=f*o))/2,h=a))),(l.complete||l.toDataURL)&&(Lt(t,e),t.globalAlpha=null!=(r=e.opacity)?r:1,t.imageSmoothingEnabled=!1!==e.smooth,t.drawImage(l,u,c,h,f))}}))},pick:Xt(),isect:e.truthy,get:ce,xOffset:de,yOffset:ge},ve=ee("line",(function(t,e){var n=e[0],i=n.interpolate||"linear";return Y.curve(f(i,n.orient,n.tension)).context(t)(e)}),(function(t,e){for(var n,i,r=Math.pow(t[0].strokeWidth||1,2),o=t.length;--o>=0;)if(!1!==t[o].defined&&(n=t[o].x-e[0])*n+(i=t[o].y-e[1])*i<r)return t[o];return null}));function ye(t,e){var n=e.path;if(null==n)return!0;var i=e.x||0,r=e.y||0,o=e.scaleX||1,s=e.scaleY||1,a=(e.angle||0)*v,l=e.pathCache;l&&l.path===n||((e.pathCache=l=p(n)).path=n),a&&t.rotate&&t.translate?(t.translate(i,r),t.rotate(a),M(t,l,0,0,o,s),t.rotate(-a),t.translate(-i,-r)):M(t,l,i,r,o,s)}var me={type:"path",tag:"path",nested:!1,attr:function(t,e){var n=e.scaleX||1,i=e.scaleY||1;1===n&&1===i||t("vector-effect","non-scaling-stroke"),t("transform",Zt(e)),t("d",e.path)},bound:function(t,e){return ye(vt(t),e)?t.set(0,0,0,0):ht(t,e,!0),e.angle&&t.rotate(e.angle*v,e.x||0,e.y||0),t},draw:Gt(ye),pick:Yt(ye),isect:Ct(ye)};function _e(t,e){t.beginPath(),K(t,e)}var xe={type:"rect",tag:"path",nested:!1,attr:function(t,e){t("d",K(null,e))},bound:function(t,e){var n,i;return ht(t.set(n=e.x||0,i=e.y||0,n+e.width||0,i+e.height||0),e)},draw:Gt(_e),pick:Yt(_e),isect:zt};function be(t,e,n){var i,r,o,s;return!(!e.stroke||!It(t,e,n))&&(i=e.x||0,r=e.y||0,o=null!=e.x2?e.x2:i,s=null!=e.y2?e.y2:r,t.beginPath(),t.moveTo(i,r),t.lineTo(o,s),!0)}var ke={type:"rule",tag:"line",nested:!1,attr:function(t,e){t("transform",Qt(e)),t("x2",null!=e.x2?e.x2-(e.x||0):0),t("y2",null!=e.y2?e.y2-(e.y||0):0)},bound:function(t,e){var n,i;return ht(t.set(n=e.x||0,i=e.y||0,null!=e.x2?e.x2:n,null!=e.y2?e.y2:i),e)},draw:function(t,e,n){Ht(e,(function(e){if(!n||n.intersects(e.bounds)){var i=null==e.opacity?1:e.opacity;i&&be(t,e,i)&&(Lt(t,e),t.stroke())}}))},pick:Xt((function(t,e,n,i){return!!t.isPointInStroke&&(be(t,e,1)&&t.isPointInStroke(n,i))})),isect:Pt},we=Kt("shape",(function(t,e){return(e.mark.shape||e.shape).context(t)(e)})),Te=Kt("symbol",(function(t,e){return $.context(t)(e)}),Rt);const Ae=e.lruCache();var Me={height:Le,measureWidth:Pe,estimateWidth:Re,width:Re,canvas:Ce};function Ce(t){Me.width=t&&At?Pe:Re}function Re(t,e){return ze(qe(t,e),Le(t))}function ze(t,e){return~~(.8*t.length*e)}function Pe(t,e){return Le(t)<=0||!(e=qe(t,e))?0:Se(e,Ee(t))}function Se(t,e){const n=`(${e}) ${t}`;let i=Ae.get(n);return void 0===i&&(At.font=e,i=At.measureText(t).width,Ae.set(n,i)),i}function Le(t){return null!=t.fontSize?+t.fontSize||0:11}function Oe(t){return null!=t.lineHeight?t.lineHeight:Le(t)+2}function Ne(t){return n=t.lineBreak&&t.text&&!e.isArray(t.text)?t.text.split(t.lineBreak):t.text,e.isArray(n)?n.length>1?n:n[0]:n;var n}function qe(t,e){const n=null==e?"":(e+"").trim();return t.limit>0&&n.length?function(t,e){var n=+t.limit,i=function(t){if(Me.width===Pe){const e=Ee(t);return t=>Se(t,e)}{const e=Le(t);return t=>ze(t,e)}}(t);if(i(e)<n)return e;var r,o=t.ellipsis||"…",s="rtl"===t.dir,a=0,l=e.length;if(n-=i(o),s){for(;a<l;)r=a+l>>>1,i(e.slice(r))>n?a=r+1:l=r;return o+e.slice(a)}for(;a<l;)r=1+(a+l>>>1),i(e.slice(0,r))<n?a=r:l=r-1;return e.slice(0,a)+o}(t,n):n}function De(t,e){var n=t.font;return(e&&n?String(n).replace(/"/g,"'"):n)||"sans-serif"}function Ee(t,e){return(t.fontStyle?t.fontStyle+" ":"")+(t.fontVariant?t.fontVariant+" ":"")+(t.fontWeight?t.fontWeight+" ":"")+Le(t)+"px "+De(t,e)}function Ie(t){var e=t.baseline,n=Le(t);return Math.round("top"===e?.79*n:"middle"===e?.3*n:"bottom"===e?-.21*n:"line-top"===e?.29*n+.5*Oe(t):"line-bottom"===e?.29*n-.5*Oe(t):0)}Ce(!0);var Be={left:"start",center:"middle",right:"end"},Ve=new it;function He(t){var e,n=t.x||0,i=t.y||0,r=t.radius||0;return r&&(e=(t.theta||0)-y,n+=r*Math.cos(e),i+=r*Math.sin(e)),Ve.x1=n,Ve.y1=i,Ve}function je(t,n,i){var r,o=Me.height(n),s=n.align,a=He(n),l=a.x1,u=a.y1,c=n.dx||0,h=(n.dy||0)+Ie(n)-Math.round(.8*o),f=Ne(n);if(e.isArray(f)?(o+=Oe(n)*(f.length-1),r=f.reduce((t,e)=>Math.max(t,Me.width(n,e)),0)):r=Me.width(n,f),"center"===s?c-=r/2:"right"===s&&(c-=r),t.set(c+=l,h+=u,c+r,h+o),n.angle&&!i)t.rotate(n.angle*v,l,u);else if(2===i)return t.rotatedPoints(n.angle*v,l,u);return t}var Ge={arc:te,area:ne,group:ue,image:pe,line:ve,path:me,rect:xe,rule:ke,shape:we,symbol:Te,text:{type:"text",tag:"text",nested:!1,attr:function(t,e){var n,i=e.dx||0,r=(e.dy||0)+Ie(e),o=He(e),s=o.x1,a=o.y1,l=e.angle||0;t("text-anchor",Be[e.align]||"start"),l?(n=Jt(s,a)+" "+$t(l),(i||r)&&(n+=" "+Jt(i,r))):n=Jt(s+i,a+r),t("transform",n)},bound:je,draw:function(t,n,i){Ht(n,(function(n){var r,o,s,a,l,u,c,h=null==n.opacity?1:n.opacity;if(!(i&&!i.intersects(n.bounds)||0===h||n.fontSize<=0||null==n.text||0===n.text.length)){if(t.font=Ee(n),t.textAlign=n.align||"left",o=(r=He(n)).x1,s=r.y1,n.angle&&(t.save(),t.translate(o,s),t.rotate(n.angle*v),o=s=0),o+=n.dx||0,s+=(n.dy||0)+Ie(n),u=Ne(n),Lt(t,n),e.isArray(u))for(l=Oe(n),a=0;a<u.length;++a)c=qe(n,u[a]),n.fill&&Dt(t,n,h)&&t.fillText(c,o,s),n.stroke&&It(t,n,h)&&t.strokeText(c,o,s),s+=l;else c=qe(n,u),n.fill&&Dt(t,n,h)&&t.fillText(c,o,s),n.stroke&&It(t,n,h)&&t.strokeText(c,o,s);n.angle&&t.restore()}}))},pick:Xt((function(t,e,n,i,r,o){if(e.fontSize<=0)return!1;if(!e.angle)return!0;var s=He(e),a=s.x1,l=s.y1,u=je(Ve,e,1),c=-e.angle*v,h=Math.cos(c),f=Math.sin(c),d=h*r-f*o+(a-h*a+f*l),g=f*r+h*o+(l-f*a-h*l);return u.contains(d,g)})),isect:function(t,e){var n=je(Ve,t,2);return St(e,n[0],n[1],n[2],n[3])||St(e,n[0],n[1],n[4],n[5])||St(e,n[4],n[5],n[6],n[7])||St(e,n[2],n[3],n[6],n[7])}},trail:ee("trail",(function(t,e){return Q.context(t)(e)}),(function(t,e){for(var n,i,r=t.length;--r>=0;)if(!1!==t[r].defined&&(n=t[r].x-e[0])*n+(i=t[r].y-e[1])*i<(n=t[r].size||1)*n)return t[r];return null}))};function We(t,e,n){var i=Ge[t.mark.marktype],r=e||i.bound;return i.nested&&(t=t.mark),r(t.bounds||(t.bounds=new it),t,n)}var Ue={mark:null};function Xe(t,e,n){var i,r,o,s,a=Ge[t.marktype],l=a.bound,u=t.items,c=u&&u.length;if(a.nested)return c?o=u[0]:(Ue.mark=t,o=Ue),s=We(o,l,n),e=e&&e.union(s)||s;if(e=e||t.bounds&&t.bounds.clear()||new it,c)for(i=0,r=u.length;i<r;++i)e.union(We(u[i],l,n));return t.bounds=e}var Fe=["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 Ye(t,e){return JSON.stringify(t,Fe,e)}function Je(t){return function t(e){var n,i,r,o=e.marktype,s=e.items;if(s)for(i=0,r=s.length;i<r;++i)n=o?"mark":"group",s[i][n]=e,s[i].zindex&&(s[i][n].zdirty=!0),"group"===(o||n)&&t(s[i]);o&&Xe(e);return e}("string"==typeof t?JSON.parse(t):t)}function $e(t){arguments.length?this.root=Je(t):(this.root=Ze({marktype:"group",name:"root",role:"frame"}),this.root.items=[new st(this.root)])}var Qe=$e.prototype;function Ze(t,e){const n={bounds:new it,clip:!!t.clip,group:e,interactive:!1!==t.interactive,items:[],marktype:t.marktype,name:t.name||void 0,role:t.role||void 0,zindex:t.zindex||0};return null!=t.aria&&(n.aria=t.aria),t.description&&(n.description=t.description),n}function Ke(t,e,n){return!t&&"undefined"!=typeof document&&document.createElement&&(t=document),t?n?t.createElementNS(n,e):t.createElement(e):null}function tn(t,e){e=e.toLowerCase();for(var n=t.childNodes,i=0,r=n.length;i<r;++i)if(n[i].tagName.toLowerCase()===e)return n[i]}function en(t,e,n,i){var r,o=t.childNodes[e];return o&&o.tagName.toLowerCase()===n.toLowerCase()||(r=o||null,o=Ke(t.ownerDocument,n,i),t.insertBefore(o,r)),o}function nn(t,e){for(var n=t.childNodes,i=n.length;i>e;)t.removeChild(n[--i]);return t}function rn(t){return"mark-"+t.marktype+(t.role?" role-"+t.role:"")+(t.name?" "+t.name:"")}function on(t,e){var n=e.getBoundingClientRect();return[t.clientX-n.left-(e.clientLeft||0),t.clientY-n.top-(e.clientTop||0)]}function sn(t,e){this._active=null,this._handlers={},this._loader=t||o.loader(),this._tooltip=e||an}function an(t,e,n,i){t.element().setAttribute("title",i||"")}Qe.toJSON=function(t){return Ye(this.root,t||0)},Qe.mark=function(t,e,n){var i=Ze(t,e=e||this.root.items[0]);return e.items[n]=i,i.zindex&&(i.group.zdirty=!0),i};const ln=sn.prototype;function un(t){this._el=null,this._bgcolor=null,this._loader=new at(t)}ln.initialize=function(t,e,n){return this._el=t,this._obj=n||null,this.origin(e)},ln.element=function(){return this._el},ln.canvas=function(){return this._el&&this._el.firstChild},ln.origin=function(t){return arguments.length?(this._origin=t||[0,0],this):this._origin.slice()},ln.scene=function(t){return arguments.length?(this._scene=t,this):this._scene},ln.on=function(){},ln.off=function(){},ln._handlerIndex=function(t,e,n){for(let i=t?t.length:0;--i>=0;)if(t[i].type===e&&(!n||t[i].handler===n))return i;return-1},ln.handlers=function(t){const e=this._handlers,n=[];if(t)n.push.apply(n,e[this.eventName(t)]);else for(const t in e)n.push.apply(n,e[t]);return n},ln.eventName=function(t){const e=t.indexOf(".");return e<0?t:t.slice(0,e)},ln.handleHref=function(t,e,n){this._loader.sanitize(n,{context:"href"}).then(e=>{const n=new MouseEvent(t.type,t),i=Ke(null,"a");for(const t in e)i.setAttribute(t,e[t]);i.dispatchEvent(n)}).catch((function(){}))},ln.handleTooltip=function(t,e,n){if(e&&null!=e.tooltip){e=function(t,e,n,i){var r,o,s=t&&t.mark;if(s&&(r=Ge[s.marktype]).tip){for((o=on(e,n))[0]-=i[0],o[1]-=i[1];t=t.mark.group;)o[0]-=t.x||0,o[1]-=t.y||0;t=r.tip(s.items,o)}return t}(e,t,this.canvas(),this._origin);const i=n&&e&&e.tooltip||null;this._tooltip.call(this._obj,this,t,e,i)}},ln.getItemBoundingClientRect=function(t){const e=this.canvas();if(!e)return;const n=e.getBoundingClientRect(),i=this._origin,r=t.bounds,o=r.width(),s=r.height();let a=r.x1+i[0]+n.left,l=r.y1+i[1]+n.top;for(;t.mark&&(t=t.mark.group);)a+=t.x||0,l+=t.y||0;return{x:a,y:l,width:o,height:s,left:a,top:l,right:a+o,bottom:l+s}};var cn=un.prototype;cn.initialize=function(t,e,n,i,r){return this._el=t,this.resize(e,n,i,r)},cn.element=function(){return this._el},cn.canvas=function(){return this._el&&this._el.firstChild},cn.background=function(t){return 0===arguments.length?this._bgcolor:(this._bgcolor=t,this)},cn.resize=function(t,e,n,i){return this._width=t,this._height=e,this._origin=n||[0,0],this._scale=i||1,this},cn.dirty=function(){},cn.render=function(t){var e=this;return e._call=function(){e._render(t)},e._call(),e._call=null,e},cn._render=function(){},cn.renderAsync=function(t){var e=this.render(t);return this._ready?this._ready.then((function(){return e})):Promise.resolve(e)},cn._load=function(t,e){var n=this,i=n._loader[t](e);if(!n._ready){var r=n._call;n._ready=n._loader.ready().then((function(t){t&&r(),n._ready=null}))}return i},cn.sanitizeURL=function(t){return this._load("sanitizeURL",t)},cn.loadImage=function(t){return this._load("loadImage",t)};function hn(t,e){sn.call(this,t,e),this._down=null,this._touch=null,this._first=!0,this._events={}}const fn=e.inherits(hn,sn);function dn(t,e,n){return function(i){const r=this._active,o=this.pickEvent(i);o===r||(r&&r.exit||this.fire(n,i),this._active=o,this.fire(e,i)),this.fire(t,i)}}function gn(t){return function(e){this.fire(t,e),this._active=null}}fn.initialize=function(t,e,n){return this._canvas=t&&tn(t,"canvas"),sn.prototype.initialize.call(this,t,e,n)},fn.canvas=function(){return this._canvas},fn.context=function(){return this._canvas.getContext("2d")},fn.events=["keydown","keypress","keyup","dragenter","dragleave","dragover","mousedown","mouseup","mousemove","mouseout","mouseover","click","dblclick","wheel","mousewheel","touchstart","touchmove","touchend"],fn.DOMMouseScroll=function(t){this.fire("mousewheel",t)},fn.mousemove=dn("mousemove","mouseover","mouseout"),fn.dragover=dn("dragover","dragenter","dragleave"),fn.mouseout=gn("mouseout"),fn.dragleave=gn("dragleave"),fn.mousedown=function(t){this._down=this._active,this.fire("mousedown",t)},fn.click=function(t){this._down===this._active&&(this.fire("click",t),this._down=null)},fn.touchstart=function(t){this._touch=this.pickEvent(t.changedTouches[0]),this._first&&(this._active=this._touch,this._first=!1),this.fire("touchstart",t,!0)},fn.touchmove=function(t){this.fire("touchmove",t,!0)},fn.touchend=function(t){this.fire("touchend",t,!0),this._touch=null},fn.fire=function(t,e,n){const i=n?this._touch:this._active,r=this._handlers[t];if(e.vegaType=t,"click"===t&&i&&i.href?this.handleHref(e,i,i.href):"mousemove"!==t&&"mouseout"!==t||this.handleTooltip(e,i,"mouseout"!==t),r)for(let t=0,n=r.length;t<n;++t)r[t].handler.call(this._obj,e,i)},fn.on=function(t,e){const n=this.eventName(t),i=this._handlers;return this._handlerIndex(i[n],t,e)<0&&(!function(t,e){const n=t.canvas();n&&!t._events[e]&&(t._events[e]=1,n.addEventListener(e,t[e]?n=>t[e](n):n=>t.fire(e,n)))}(this,t),(i[n]||(i[n]=[])).push({type:t,handler:e})),this},fn.off=function(t,e){const n=this.eventName(t),i=this._handlers[n],r=this._handlerIndex(i,t,e);return r>=0&&i.splice(r,1),this},fn.pickEvent=function(t){const e=on(t,this._canvas),n=this._origin;return this.pick(this._scene,e[0],e[1],e[0]-n[0],e[1]-n[1])},fn.pick=function(t,e,n,i,r){const o=this.context();return Ge[t.marktype].pick.call(this,o,t,e,n,i,r)};var pn="undefined"!=typeof window&&window.devicePixelRatio||1;function vn(t){un.call(this,t),this._options={},this._redraw=!1,this._dirty=new it,this._tempb=new it}const yn=e.inherits(vn,un),mn=un.prototype;yn.initialize=function(t,e,n,i,o,s){return this._options=s||{},this._canvas=this._options.externalContext?null:r.canvas(1,1,this._options.type),t&&this._canvas&&(nn(t,0).appendChild(this._canvas),this._canvas.setAttribute("class","marks")),mn.initialize.call(this,t,e,n,i,o)},yn.resize=function(t,n,i,r){if(mn.resize.call(this,t,n,i,r),this._canvas)!function(t,e,n,i,r,o){const s="undefined"!=typeof HTMLElement&&t instanceof HTMLElement&&null!=t.parentNode,a=t.getContext("2d"),l=s?pn:r;t.width=e*l,t.height=n*l;for(const t in o)a[t]=o[t];s&&1!==l&&(t.style.width=e+"px",t.style.height=n+"px"),a.pixelRatio=l,a.setTransform(l,0,0,l,l*i[0],l*i[1])}(this._canvas,this._width,this._height,this._origin,this._scale,this._options.context);else{const t=this._options.externalContext;t||e.error("CanvasRenderer is missing a valid canvas or context"),t.scale(this._scale,this._scale),t.translate(this._origin[0],this._origin[1])}return this._redraw=!0,this},yn.canvas=function(){return this._canvas},yn.context=function(){return this._options.externalContext||(this._canvas?this._canvas.getContext("2d"):null)},yn.dirty=function(t){let e=this._tempb.clear().union(t.bounds),n=t.mark.group;for(;n;)e.translate(n.x||0,n.y||0),n=n.mark.group;this._dirty.union(e)};function _n(t,e){sn.call(this,t,e);const n=this;n._hrefHandler=bn(n,(t,e)=>{e&&e.href&&n.handleHref(t,e,e.href)}),n._tooltipHandler=bn(n,(t,e)=>{n.handleTooltip(t,e,"mouseout"!==t.type)})}yn._render=function(t){const e=this.context(),n=this._origin,i=this._width,r=this._height,o=this._dirty,s=(a=n,l=i,u=r,(new it).set(0,0,l,u).translate(-a[0],-a[1]));var a,l,u;e.save();const c=this._redraw||o.empty()?(this._redraw=!1,s.expand(1)):function(t,e,n){return e.expand(1).round(),t.pixelRatio%1&&e.scale(t.pixelRatio).round().scale(1/t.pixelRatio),e.translate(-n[0]%1,-n[1]%1),t.beginPath(),t.rect(e.x1,e.y1,e.width(),e.height()),t.clip(),e}(e,s.intersect(o),n);return this.clear(-n[0],-n[1],i,r),this.draw(e,t,c),e.restore(),o.clear(),this},yn.draw=function(t,n,i){const r=Ge[n.marktype];n.clip&&function(t,n){var i=n.clip;t.save(),e.isFunction(i)?(t.beginPath(),i(t),t.clip()):ie(t,n.group)}(t,n),r.draw.call(this,t,n,i),n.clip&&t.restore()},yn.clear=function(t,e,n,i){const r=this._options,o=this.context();"pdf"===r.type||r.externalContext||o.clearRect(t,e,n,i),null!=this._bgcolor&&(o.fillStyle=this._bgcolor,o.fillRect(t,e,n,i))};const xn=e.inherits(_n,sn);xn.initialize=function(t,e,n){let i=this._svg;return i&&(i.removeEventListener("click",this._hrefHandler),i.removeEventListener("mousemove",this._tooltipHandler),i.removeEventListener("mouseout",this._tooltipHandler)),this._svg=i=t&&tn(t,"svg"),i&&(i.addEventListener("click",this._hrefHandler),i.addEventListener("mousemove",this._tooltipHandler),i.addEventListener("mouseout",this._tooltipHandler)),sn.prototype.initialize.call(this,t,e,n)},xn.canvas=function(){return this._svg};const bn=(t,e)=>n=>{let i=n.target.__data__;i=Array.isArray(i)?i[0]:i,n.vegaType=n.type,e.call(t._obj,n,i)};xn.on=function(t,e){const n=this.eventName(t),i=this._handlers;if(this._handlerIndex(i[n],t,e)<0){const r={type:t,handler:e,listener:bn(this,e)};(i[n]||(i[n]=[])).push(r),this._svg&&this._svg.addEventListener(n,r.listener)}return this},xn.off=function(t,e){const n=this.eventName(t),i=this._handlers[n],r=this._handlerIndex(i,t,e);return r>=0&&(this._svg&&this._svg.removeEventListener(n,i[r].listener),i.splice(r,1)),this};const kn=(t,e,n)=>({role:t,"aria-roledescription":e,"aria-label":n||void 0}),wn=e.toSet(["axis-domain","axis-grid","axis-label","axis-tick","axis-title","legend-band","legend-entry","legend-gradient","legend-label","legend-title","legend-symbol","title"]),Tn={axis:{desc:"axis",caption:function(t){const e=t.datum,n=t.orient,i=e.title?zn(t):null,r=t.context,o=r.scales[e.scale].value,a=r.dataflow.locale(),l=o.type;return("left"===n||"right"===n?"Y":"X")+"-axis"+(i?` titled '${i}'`:"")+` for a ${s.isDiscrete(l)?"discrete":l} scale with `+s.domainCaption(a,o,t)}},legend:{desc:"legend",caption:function(t){const n=t.datum,i=n.title?zn(t):null,r=((n.type||"")+" legend").trim(),o=n.scales,a=Object.keys(o),l=t.context,u=l.scales[o[a[0]]].value,c=l.dataflow.locale();return h=r,(h.length?h[0].toUpperCase()+h.slice(1):h)+(i?` titled '${i}'`:"")+" for "+function(t){return(t=t.map(t=>t+("fill"===t||"stroke"===t?" color":""))).length<2?t[0]:t.slice(0,-1).join(", ")+" and "+e.peek(t)}(a)+" with "+s.domainCaption(c,u,t);var h}},"title-text":{desc:"title",caption:t=>`Title text '${Rn(t)}'`},"title-subtitle":{desc:"subtitle",caption:t=>`Subtitle text '${Rn(t)}'`}},An={ariaRole:"role",ariaRoleDescription:"aria-roledescription",description:"aria-label"};function Mn(t,e){const n=!1===e.aria;if(t("aria-hidden",n||void 0),n||null==e.description)for(const e in An)t(An[e],void 0);else{const n=e.mark.marktype;t("aria-label",e.description),t("role",e.ariaRole||("group"===n?"graphics-object":"graphics-symbol")),t("aria-roledescription",e.ariaRoleDescription||n+" mark")}}function Cn(t){return!1===t.aria?{"aria-hidden":!0}:wn[t.role]?null:Tn[t.role]?function(t,e){try{const n=t.items[0],i=e.caption||(()=>"");return kn(e.role||"graphics-symbol",e.desc,n.description||i(n))}catch(t){return null}}(t,Tn[t.role]):function(t){const e=t.marktype,n="group"===e||"text"===e||t.items.some(t=>null!=t.description&&!1!==t.aria);return kn(n?"graphics-object":"graphics-symbol",e+" mark container",t.description)}(t)}function Rn(t){return e.array(t.text).join(" ")}function zn(t){try{return e.array(e.peek(t.items).items[0].text).join(" ")}catch(t){return null}}const Pn=t=>(t+"").replace(/&/g,"&amp;").replace(/"/g,"&quot;");function Sn(t,e,n){var i,r,o="<"+t;if(e)for(i in e)null!=(r=e[i])&&(o+=" "+i+'="'+Pn(r)+'"');return n&&(o+=" "+n),o+">"}function Ln(t){return"</"+t+">"}var On={version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"};const Nn={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",blend:"mix-blend-mode"},qn=[".vega-svg-root * { fill: none; }",".vega-svg-root tspan { fill: inherit; }",".vega-svg-root path { stroke-miterlimit: 10; }"].join(" "),Dn=On.xmlns;function En(t){un.call(this,t),this._dirtyID=0,this._dirty=[],this._svg=null,this._root=null,this._defs=null}var In=e.inherits(En,un),Bn=un.prototype;function Vn(t,e,n){var i,r,o;if("radial"===e.gradient){var s=en(t,n++,"pattern",Dn);s.setAttribute("id","p_"+e.id),s.setAttribute("viewBox","0,0,1,1"),s.setAttribute("width","100%"),s.setAttribute("height","100%"),s.setAttribute("preserveAspectRatio","xMidYMid slice"),(s=en(s,0,"rect",Dn)).setAttribute("width","1"),s.setAttribute("height","1"),s.setAttribute("style","fill: url("+$n()+"#"+e.id+");"),(t=en(t,n++,"radialGradient",Dn)).setAttribute("id",e.id),t.setAttribute("fx",e.x1),t.setAttribute("fy",e.y1),t.setAttribute("fr",e.r1),t.setAttribute("cx",e.x2),t.setAttribute("cy",e.y2),t.setAttribute("r",e.r2)}else(t=en(t,n++,"linearGradient",Dn)).setAttribute("id",e.id),t.setAttribute("x1",e.x1),t.setAttribute("x2",e.x2),t.setAttribute("y1",e.y1),t.setAttribute("y2",e.y2);for(i=0,r=e.stops.length;i<r;++i)(o=en(t,i,"stop",Dn)).setAttribute("offset",e.stops[i].offset),o.setAttribute("stop-color",e.stops[i].color);return nn(t,i),n}function Hn(t,e,n){var i;return(t=en(t,n,"clipPath",Dn)).setAttribute("id",e.id),e.path?(i=en(t,0,"path",Dn)).setAttribute("d",e.path):((i=en(t,0,"rect",Dn)).setAttribute("x",0),i.setAttribute("y",0),i.setAttribute("width",e.width),i.setAttribute("height",e.height)),nn(t,1),n+1}function jn(t,e){for(;t&&t.dirty!==e;t=t.mark.group){if(t.dirty=e,!t.mark||t.mark.dirty===e)return;t.mark.dirty=e}}function Gn(t,e,n,i,r){var o,s=t._svg;if(!s&&(s=Ke(o=e.ownerDocument,i,Dn),t._svg=s,t.mark&&(s.__data__=t,s.__values__={fill:"default"},"g"===i))){var a=Ke(o,"path",Dn);s.appendChild(a),a.__data__=t;var l=Ke(o,"g",Dn);s.appendChild(l),l.__data__=t;var u=Ke(o,"path",Dn);s.appendChild(u),u.__data__=t,u.__values__={fill:"default"}}return(s.ownerSVGElement!==r||function(t,e){return t.parentNode&&t.parentNode.childNodes.length>1&&t.previousSibling!=e}(s,n))&&e.insertBefore(s,n?n.nextSibling:e.firstChild),s}In.initialize=function(t,e,n,i){if(this._defs={gradient:{},clipping:{}},t){this._svg=en(t,0,"svg",Dn),this._svg.setAttribute("class","marks"),nn(t,1),this._defs.el=en(this._svg,0,"defs",Dn);en(this._defs.el,0,"style").textContent=qn,this._root=en(this._svg,1,"g",Dn),this._root.setAttribute("class","vega-svg-root"),nn(this._svg,2)}return this.background(this._bgcolor),Bn.initialize.call(this,t,e,n,i)},In.background=function(t){return arguments.length&&this._svg&&this._svg.style.setProperty("background-color",t),Bn.background.apply(this,arguments)},In.resize=function(t,e,n,i){return Bn.resize.call(this,t,e,n,i),this._svg&&(this._svg.setAttribute("width",this._width*this._scale),this._svg.setAttribute("height",this._height*this._scale),this._svg.setAttribute("viewBox","0 0 "+this._width+" "+this._height),this._root.setAttribute("transform","translate("+this._origin+")")),this._dirty=[],this},In.canvas=function(){return this._svg},In.svg=function(){if(!this._svg)return null;var t={class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:"0 0 "+this._width+" "+this._height};for(var e in On)t[e]=On[e];var n=this._bgcolor?Sn("rect",{width:this._width,height:this._height,style:"fill: "+this._bgcolor+";"})+Ln("rect"):"";return Sn("svg",t)+this._defs.el.outerHTML+n+this._root.outerHTML+Ln("svg")},In._render=function(t){return this._dirtyCheck()&&(this._dirtyAll&&this._resetDefs(),this.draw(this._root,t),nn(this._root,1)),this.updateDefs(),this._dirty=[],++this._dirtyID,this},In.updateDefs=function(){var t,e=this._defs,n=e.el,i=1;for(t in e.gradient)i=Vn(n,e.gradient[t],i);for(t in e.clipping)i=Hn(n,e.clipping[t],i);nn(n,i)},In._resetDefs=function(){var t=this._defs;t.gradient={},t.clipping={}},In.dirty=function(t){t.dirty!==this._dirtyID&&(t.dirty=this._dirtyID,this._dirty.push(t))},In.isDirty=function(t){return this._dirtyAll||!t._svg||t.dirty===this._dirtyID},In._dirtyCheck=function(){this._dirtyAll=!0;var t=this._dirty;if(!t.length||!this._dirtyID)return!0;var e,n,i,r,o,s,a,l=++this._dirtyID;for(o=0,s=t.length;o<s;++o)(n=(e=t[o]).mark).marktype!==i&&(i=n.marktype,r=Ge[i]),n.zdirty&&n.dirty!==l&&(this._dirtyAll=!1,jn(e,l),n.items.forEach((function(t){t.dirty=l}))),n.zdirty||(e.exit?(r.nested&&n.items.length?(a=n.items[0])._svg&&this._update(r,a._svg,a):e._svg&&(a=e._svg.parentNode)&&a.removeChild(e._svg),e._svg=null):(e=r.nested?n.items[0]:e)._update!==l&&(e._svg&&e._svg.ownerSVGElement?this._update(r,e._svg,e):(this._dirtyAll=!1,jn(e,l)),e._update=l));return!this._dirtyAll},In.draw=function(t,e,n){if(!this.isDirty(e))return e._svg;var i,r=this,o=this._svg,s=Ge[e.marktype],a=!1===e.interactive?"none":null,l="g"===s.tag,u=null,c=0;(i=Gn(e,t,n,"g",o)).setAttribute("class",rn(e));const h=Cn(e);for(const t in h)Jn(i,t,h[t]);function f(t){var e=r.isDirty(t),n=Gn(t,i,u,s.tag,o);e&&(r._update(s,n,t),l&&function(t,e,n){e=e.lastChild.previousSibling;var i,r=0;Ht(n,(function(n){i=t.draw(e,n,i),++r})),nn(e,1+r)}(r,n,t)),u=n,++c}return l||i.style.setProperty("pointer-events",a),Jn(i,"clip-path",e.clip?nt(r,e,e.group):null),s.nested?e.items.length&&f(e.items[0]):Ht(e,f),nn(i,c),i};var Wn=null,Un=null,Xn={group:function(t,e,n){var i,r;Wn=i=e.childNodes[2],Un=i.__values__,t.foreground(Yn,n,this),Un=e.__values__,Wn=e.childNodes[1],t.content(Yn,n,this),Wn=r=e.childNodes[0],t.background(Yn,n,this);var o=!1===n.mark.interactive?"none":null;if(o!==Un.events&&(i.style.setProperty("pointer-events",o),r.style.setProperty("pointer-events",o),Un.events=o),n.strokeForeground&&n.stroke){const t=n.fill;i.style.removeProperty("display"),this.style(r,n),r.style.removeProperty("stroke"),t&&(n.fill=null),Un=i.__values__,this.style(i,n),t&&(n.fill=t),Wn=null}else i.style.setProperty("display","none")},image:function(t,e,n){!1===n.smooth?(Fn(e,"image-rendering","optimizeSpeed"),Fn(e,"image-rendering","pixelated")):Fn(e,"image-rendering",null)},text:function(t,n,i){var r,o,s,a,l=Ne(i);e.isArray(l)?(r=(o=l.map(t=>qe(i,t))).join("\n"))!==Un.text&&(nn(n,0),s=n.ownerDocument,a=Oe(i),o.forEach((t,e)=>{const r=Ke(s,"tspan",Dn);r.__data__=i,r.textContent=t,e&&(r.setAttribute("x",0),r.setAttribute("dy",a)),n.appendChild(r)}),Un.text=r):(o=qe(i,l))!==Un.text&&(n.textContent=o,Un.text=o),Fn(n,"font-family",De(i)),Fn(n,"font-size",Le(i)+"px"),Fn(n,"font-style",i.fontStyle),Fn(n,"font-variant",i.fontVariant),Fn(n,"font-weight",i.fontWeight)}};function Fn(t,e,n){n!==Un[e]&&(null==n?t.style.removeProperty(e):t.style.setProperty(e,n+""),Un[e]=n)}function Yn(t,e,n){e!==Un[t]&&(n?function(t,e,n,i){null!=n?t.setAttributeNS(i,e,n):t.removeAttributeNS(i,e)}(Wn,t,e,n):Jn(Wn,t,e),Un[t]=e)}function Jn(t,e,n){null!=n?t.setAttribute(e,n):t.removeAttribute(e)}function $n(){var t;return"undefined"==typeof window?"":(t=window.location).hash?t.href.slice(0,-t.hash.length):t.href}function Qn(t){un.call(this,t),this._text={head:"",bg:"",root:"",foot:"",defs:"",body:""},this._defs={gradient:{},clipping:{}}}In._update=function(t,e,n){Wn=e,Un=e.__values__,Mn(Yn,n),t.attr(Yn,n,this);var i=Xn[t.type];i&&i.call(this,t,e,n),Wn&&this.style(Wn,n)},In.style=function(t,e){if(null!=e)for(const n in Nn){let i="font"===n?De(e):e[n];if(i===Un[n])continue;const r=Nn[n];null==i?t.style.removeProperty(r):(l(i)&&(i=u(i,this._defs.gradient,$n())),t.style.setProperty(r,i+"")),Un[n]=i}};var Zn,Kn=e.inherits(Qn,un),ti=un.prototype;function ei(t,e,n,i){Zn[i||t]=e}function ni(t,e,n,i){if(null==t)return"";let r="";"bgrect"===n&&!1===e.interactive&&(r+="pointer-events: none; "),"bgfore"===n&&(!1===e.interactive&&(r+="pointer-events: none; "),r+="display: none; "),"image"===n&&!1===t.smooth&&(r+="image-rendering: optimizeSpeed; image-rendering: pixelated; "),"text"===n&&(r+="font-family: "+De(t)+"; ",r+="font-size: "+Le(t)+"px; ",t.fontStyle&&(r+="font-style: "+t.fontStyle+"; "),t.fontVariant&&(r+="font-variant: "+t.fontVariant+"; "),t.fontWeight&&(r+="font-weight: "+t.fontWeight+"; "));for(const e in Nn){let n=t[e];const o=Nn[e];("transparent"!==n||"fill"!==o&&"stroke"!==o)&&null!=n&&(l(n)&&(n=u(n,i.gradient,"")),r+=o+": "+n+"; ")}return r?'style="'+r.trim()+'"':null}function ii(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}Kn.resize=function(t,e,n,i){ti.resize.call(this,t,e,n,i);var r=this._origin,o=this._text,s={class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:"0 0 "+this._width+" "+this._height};for(var a in On)s[a]=On[a];o.head=Sn("svg",s);var l=this._bgcolor;return"transparent"!==l&&"none"!==l||(l=null),o.bg=l?Sn("rect",{width:this._width,height:this._height,style:"fill: "+l+";"})+Ln("rect"):"",o.root=Sn("g",{class:"vega-svg-root",transform:"translate("+r+")"}),o.foot=Ln("g")+Ln("svg"),this},Kn.background=function(){var t=ti.background.apply(this,arguments);return arguments.length&&this._text.head&&this.resize(this._width,this._height,this._origin,this._scale),t},Kn.svg=function(){var t=this._text;return t.head+t.defs+t.bg+t.root+t.body+t.foot},Kn._render=function(t){return this._text.body=this.mark(t),this._text.defs=this.buildDefs(),this},Kn.buildDefs=function(){var t,e,n,i,r,o=this._defs,s=Sn("style")+qn+Ln("style");for(e in o.gradient){for(r=(n=o.gradient[e]).stops,"radial"===n.gradient?(s+=Sn(i="pattern",{id:"p_"+e,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),s+=Sn("rect",{width:"1",height:"1",style:"fill: url(#"+e+");"})+Ln("rect"),s+=Ln(i),s+=Sn(i="radialGradient",{id:e,fx:n.x1,fy:n.y1,fr:n.r1,cx:n.x2,cy:n.y2,r:n.r2})):s+=Sn(i="linearGradient",{id:e,x1:n.x1,x2:n.x2,y1:n.y1,y2:n.y2}),t=0;t<r.length;++t)s+=Sn("stop",{offset:r[t].offset,"stop-color":r[t].color})+Ln("stop");s+=Ln(i)}for(e in o.clipping)n=o.clipping[e],s+=Sn("clipPath",{id:e}),n.path?s+=Sn("path",{d:n.path})+Ln("path"):s+=Sn("rect",{x:0,y:0,width:n.width,height:n.height})+Ln("rect"),s+=Ln("clipPath");return Sn("defs")+s+Ln("defs")},Kn.attributes=function(t,e){return Zn={},Array.isArray(t)?t.forEach(t=>t(ei,e,this)):t(ei,e,this),Zn},Kn.href=function(t){var e,n=this,i=t.href;if(i){if(e=n._hrefs&&n._hrefs[i])return e;n.sanitizeURL(i).then(t=>{t["xlink:href"]=t.href,t.href=null,(n._hrefs||(n._hrefs={}))[i]=t})}return null},Kn.mark=function(t){var n,i=this,r=Ge[t.marktype],o=r.tag,s=this._defs,a="";function l(l){var u=i.href(l);if(u&&(a+=Sn("a",u)),n="g"!==o?ni(l,t,o,s):null,a+=Sn(o,i.attributes([Mn,r.attr],l),n),"text"===o){const t=Ne(l);if(e.isArray(t)){const e={x:0,dy:Oe(l)};for(let n=0;n<t.length;++n)a+=Sn("tspan",n?e:null)+ii(qe(l,t[n]))+Ln("tspan")}else a+=ii(qe(l,t))}else if("g"===o){const e=l.strokeForeground,n=l.fill,o=l.stroke;e&&o&&(l.stroke=null),a+=Sn("path",i.attributes(r.background,l),ni(l,t,"bgrect",s))+Ln("path"),a+=Sn("g",i.attributes(r.content,l))+i.markGroup(l)+Ln("g"),e&&o?(n&&(l.fill=null),l.stroke=o,a+=Sn("path",i.attributes(r.foreground,l),ni(l,t,"bgrect",s))+Ln("path"),n&&(l.fill=n)):a+=Sn("path",i.attributes(r.foreground,l),ni({},t,"bgfore",s))+Ln("path")}a+=Ln(o),u&&(a+=Ln("a"))}return"g"!==o&&!1===t.interactive&&(n='style="pointer-events: none;"'),a+=Sn("g",Object.assign({class:rn(t),"clip-path":t.clip?nt(i,t,t.group):null},Cn(t)),n),r.nested?t.items&&t.items.length&&l(t.items[0]):Ht(t,l),a+Ln("g")},Kn.markGroup=function(t){var e=this,n="";return Ht(t,(function(t){n+=e.mark(t)})),n};var ri={Canvas:"canvas",PNG:"png",SVG:"svg",None:"none"},oi={};function si(t,e,n,i){if(function(t,e,n){return t.bounds&&e.intersects(t.bounds)&&("group"===t.marktype||!1!==t.interactive&&(!n||n(t)))}(t,e,n)){const r=t.items,o=t.marktype,s=r.length;let a=0;if("group"===o)for(;a<s;++a)ai(r[a],e,n,i);else for(const t=Ge[o].isect;a<s;++a){let n=r[a];li(n,e,t)&&i.push(n)}}return i}function ai(t,e,n,i){n&&n(t.mark)&&li(t,e,Ge.group.isect)&&i.push(t);const r=t.items,o=r&&r.length;if(o){const s=t.x||0,a=t.y||0;e.translate(-s,-a);for(let t=0;t<o;++t)si(r[t],e,n,i);e.translate(s,a)}return i}function li(t,e,n){const i=t.bounds;return e.encloses(i)||e.intersects(i)&&n(t,e)}oi.canvas=oi.png={renderer:vn,headless:vn,handler:hn},oi.svg={renderer:En,headless:Qn,handler:_n},oi.none={};var ui=new it;function ci(t,n,i){return t===n||("path"===i?hi(t,n):t instanceof Date&&n instanceof Date?+t==+n:e.isNumber(t)&&e.isNumber(n)?Math.abs(t-n)<=1e-9:t&&n&&(e.isObject(t)||e.isObject(n))?null!=t&&null!=n&&function(t,e){var n,i,r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length)return!1;for(r.sort(),o.sort(),i=r.length-1;i>=0;i--)if(r[i]!=o[i])return!1;for(i=r.length-1;i>=0;i--)if(n=r[i],!ci(t[n],e[n],n))return!1;return typeof t==typeof e}(t,n):t==n)}function hi(t,e){return ci(p(t),p(e))}t.Bounds=it,t.CanvasHandler=hn,t.CanvasRenderer=vn,t.Gradient=function(t,e){var n,i=[];return n={gradient:"linear",x1:t?t[0]:0,y1:t?t[1]:0,x2:e?e[0]:1,y2:e?e[1]:0,stops:i,stop:function(t,e){return i.push({offset:t,color:e}),n}}},t.GroupItem=st,t.Handler=sn,t.Item=ot,t.Marks=Ge,t.RenderType=ri,t.Renderer=un,t.ResourceLoader=at,t.SVGHandler=_n,t.SVGRenderer=En,t.SVGStringRenderer=Qn,t.Scenegraph=$e,t.boundClip=function(t){var n=t.clip;if(e.isFunction(n))n(vt(ui.clear()));else{if(!n)return;ui.set(0,0,t.group.width,t.group.height)}t.bounds.intersect(ui)},t.boundContext=vt,t.boundItem=We,t.boundMark=Xe,t.boundStroke=ht,t.closeTag=Ln,t.domChild=en,t.domClear=nn,t.domCreate=Ke,t.domFind=tn,t.font=Ee,t.fontFamily=De,t.fontSize=Le,t.intersect=function(t,n,i){const r=[],o=(new it).union(n),s=t.marktype;return s?si(t,o,i,r):"group"===s?ai(t,o,i,r):e.error("Intersect scene must be mark node or group item.")},t.intersectBoxLine=St,t.intersectPath=Ct,t.intersectPoint=Rt,t.intersectRule=Pt,t.lineHeight=Oe,t.multiLineOffset=function(t){const n=Ne(t);return(e.isArray(n)?n.length-1:0)*Oe(t)},t.openTag=Sn,t.pathCurves=f,t.pathEqual=hi,t.pathParse=p,t.pathRectangle=B,t.pathRender=M,t.pathSymbols=P,t.pathTrail=V,t.point=on,t.renderModule=function(t,e){return t=String(t||"").toLowerCase(),arguments.length>1?(oi[t]=e,this):oi[t]},t.resetSVGClipId=et,t.resetSVGDefIds=function(){et(),a=0},t.sceneEqual=ci,t.sceneFromJSON=Je,t.scenePickVisit=jt,t.sceneToJSON=Ye,t.sceneVisit=Ht,t.sceneZOrder=Vt,t.textMetrics=Me,Object.defineProperty(t,"__esModule",{value:!0})}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("vega-util"),require("d3-shape"),require("d3-path"),require("vega-canvas"),require("vega-loader"),require("vega-scale")):"function"==typeof define&&define.amd?define(["exports","vega-util","d3-shape","d3-path","vega-canvas","vega-loader","vega-scale"],e):e((t=t||self).vega={},t.vega,t.d3,t.d3,t.vega,t.vega,t.vega)}(this,(function(t,e,n,i,r,o,s){"use strict";var a=0;function l(t){return t&&t.gradient}function u(t,e,n){let i=t.id,r=t.gradient,o="radial"===r?"p_":"";return i||(i=t.id="gradient_"+a++,"radial"===r?(t.x1=c(t.x1,.5),t.y1=c(t.y1,.5),t.r1=c(t.r1,0),t.x2=c(t.x2,.5),t.y2=c(t.y2,.5),t.r2=c(t.r2,.5),o="p_"):(t.x1=c(t.x1,0),t.y1=c(t.y1,0),t.x2=c(t.x2,1),t.y2=c(t.y2,0))),e[i]=t,"url("+(n||"")+"#"+o+i+")"}function c(t,e){return null!=t?t:e}var h={basis:{curve:n.curveBasis},"basis-closed":{curve:n.curveBasisClosed},"basis-open":{curve:n.curveBasisOpen},bundle:{curve:n.curveBundle,tension:"beta",value:.85},cardinal:{curve:n.curveCardinal,tension:"tension",value:0},"cardinal-open":{curve:n.curveCardinalOpen,tension:"tension",value:0},"cardinal-closed":{curve:n.curveCardinalClosed,tension:"tension",value:0},"catmull-rom":{curve:n.curveCatmullRom,tension:"alpha",value:.5},"catmull-rom-closed":{curve:n.curveCatmullRomClosed,tension:"alpha",value:.5},"catmull-rom-open":{curve:n.curveCatmullRomOpen,tension:"alpha",value:.5},linear:{curve:n.curveLinear},"linear-closed":{curve:n.curveLinearClosed},monotone:{horizontal:n.curveMonotoneY,vertical:n.curveMonotoneX},natural:{curve:n.curveNatural},step:{curve:n.curveStep},"step-after":{curve:n.curveStepAfter},"step-before":{curve:n.curveStepBefore}};function f(t,n,i){var r=e.hasOwnProperty(h,t)&&h[t],o=null;return r&&(o=r.curve||r[n||"vertical"],r.tension&&null!=i&&(o=o[r.tension](i))),o}var d={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7},g=[/([MLHVCSQTAZmlhvcsqtaz])/g,/###/,/(\d)([-+])/g,/\s|,|###/];function p(t){var e,n,i,r,o,s,a,l,u,c,h,f=[];for(l=0,c=(e=t.slice().replace(g[0],"###$1").split(g[1]).slice(1)).length;l<c;++l){for(i=(n=e[l]).slice(1).trim().replace(g[2],"$1###$2").split(g[3]),r=[s=n.charAt(0)],u=0,h=i.length;u<h;++u)(o=+i[u])===o&&r.push(o);if(a=d[s.toLowerCase()],r.length-1>a)for(u=1,h=r.length;u<h;u+=a)f.push([s].concat(r.slice(u,u+a)));else f.push(r)}return f}const v=Math.PI/180,y=Math.PI/2,m=2*Math.PI,_=Math.sqrt(3)/2;var x={},b={},k=[].join;function w(t){var e=k.call(t);if(b[e])return b[e];var n=t[0],i=t[1],r=t[2],o=t[3],s=t[4],a=t[5],l=t[6],u=t[7],c=u*s,h=-l*a,f=l*s,d=u*a,g=Math.cos(r),p=Math.sin(r),v=Math.cos(o),y=Math.sin(o),m=.5*(o-r),_=Math.sin(.5*m),x=8/3*_*_/Math.sin(m),w=n+g-x*p,T=i+p+x*g,A=n+v,M=i+y,C=A+x*y,R=M-x*v;return b[e]=[c*w+h*T,f*w+d*T,c*C+h*R,f*C+d*R,c*A+h*M,f*A+d*M]}var T=["l",0,0,0,0,0,0,0];function A(t,e,n){var i=T[0]=t[0];if("a"===i||"A"===i)T[1]=e*t[1],T[2]=n*t[2],T[3]=t[3],T[4]=t[4],T[5]=t[5],T[6]=e*t[6],T[7]=n*t[7];else if("h"===i||"H"===i)T[1]=e*t[1];else if("v"===i||"V"===i)T[1]=n*t[1];else for(var r=1,o=t.length;r<o;++r)T[r]=(r%2==1?e:n)*t[r];return T}function M(t,e,n,i,r,o){var s,a,l,u,c,h=null,f=0,d=0,g=0,p=0;null==n&&(n=0),null==i&&(i=0),null==r&&(r=1),null==o&&(o=r),t.beginPath&&t.beginPath();for(var v=0,y=e.length;v<y;++v){switch(s=e[v],1===r&&1===o||(s=A(s,r,o)),s[0]){case"l":f+=s[1],d+=s[2],t.lineTo(f+n,d+i);break;case"L":f=s[1],d=s[2],t.lineTo(f+n,d+i);break;case"h":f+=s[1],t.lineTo(f+n,d+i);break;case"H":f=s[1],t.lineTo(f+n,d+i);break;case"v":d+=s[1],t.lineTo(f+n,d+i);break;case"V":d=s[1],t.lineTo(f+n,d+i);break;case"m":f+=s[1],d+=s[2],t.moveTo(f+n,d+i);break;case"M":f=s[1],d=s[2],t.moveTo(f+n,d+i);break;case"c":a=f+s[5],l=d+s[6],g=f+s[3],p=d+s[4],t.bezierCurveTo(f+s[1]+n,d+s[2]+i,g+n,p+i,a+n,l+i),f=a,d=l;break;case"C":f=s[5],d=s[6],g=s[3],p=s[4],t.bezierCurveTo(s[1]+n,s[2]+i,g+n,p+i,f+n,d+i);break;case"s":a=f+s[3],l=d+s[4],g=2*f-g,p=2*d-p,t.bezierCurveTo(g+n,p+i,f+s[1]+n,d+s[2]+i,a+n,l+i),g=f+s[1],p=d+s[2],f=a,d=l;break;case"S":a=s[3],l=s[4],g=2*f-g,p=2*d-p,t.bezierCurveTo(g+n,p+i,s[1]+n,s[2]+i,a+n,l+i),f=a,d=l,g=s[1],p=s[2];break;case"q":a=f+s[3],l=d+s[4],g=f+s[1],p=d+s[2],t.quadraticCurveTo(g+n,p+i,a+n,l+i),f=a,d=l;break;case"Q":a=s[3],l=s[4],t.quadraticCurveTo(s[1]+n,s[2]+i,a+n,l+i),f=a,d=l,g=s[1],p=s[2];break;case"t":a=f+s[1],l=d+s[2],null===h[0].match(/[QqTt]/)?(g=f,p=d):"t"===h[0]?(g=2*f-u,p=2*d-c):"q"===h[0]&&(g=2*f-g,p=2*d-p),u=g,c=p,t.quadraticCurveTo(g+n,p+i,a+n,l+i),d=l,g=(f=a)+s[1],p=d+s[2];break;case"T":a=s[1],l=s[2],g=2*f-g,p=2*d-p,t.quadraticCurveTo(g+n,p+i,a+n,l+i),f=a,d=l;break;case"a":C(t,f+n,d+i,[s[1],s[2],s[3],s[4],s[5],s[6]+f+n,s[7]+d+i]),f+=s[6],d+=s[7];break;case"A":C(t,f+n,d+i,[s[1],s[2],s[3],s[4],s[5],s[6]+n,s[7]+i]),f=s[6],d=s[7];break;case"z":case"Z":t.closePath()}h=s}}function C(t,e,n,i){for(var r=function(t,e,n,i,r,o,s,a,l){var u=k.call(arguments);if(x[u])return x[u];var c=s*v,h=Math.sin(c),f=Math.cos(c),d=f*(a-t)*.5+h*(l-e)*.5,g=f*(l-e)*.5-h*(a-t)*.5,p=d*d/((n=Math.abs(n))*n)+g*g/((i=Math.abs(i))*i);p>1&&(n*=p=Math.sqrt(p),i*=p);var _=f/n,b=h/n,w=-h/i,T=f/i,A=_*a+b*l,M=w*a+T*l,C=_*t+b*e,R=w*t+T*e,z=(C-A)*(C-A)+(R-M)*(R-M),P=1/z-.25;P<0&&(P=0);var S=Math.sqrt(P);o==r&&(S=-S);var L=.5*(A+C)-S*(R-M),O=.5*(M+R)+S*(C-A),N=Math.atan2(M-O,A-L),q=Math.atan2(R-O,C-L),D=q-N;D<0&&1===o?D+=m:D>0&&0===o&&(D-=m);for(var E=Math.ceil(Math.abs(D/(y+.001))),I=[],B=0;B<E;++B){var V=N+B*D/E,H=N+(B+1)*D/E;I[B]=[L,O,V,H,n,i,h,f]}return x[u]=I}(i[5],i[6],i[0],i[1],i[3],i[4],i[2],e,n),o=0;o<r.length;++o){var s=w(r[o]);t.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5])}}var R=.5773502691896257,z={circle:{draw:function(t,e){var n=Math.sqrt(e)/2;t.moveTo(n,0),t.arc(0,0,n,0,m)}},cross:{draw:function(t,e){var n=Math.sqrt(e)/2,i=n/2.5;t.moveTo(-n,-i),t.lineTo(-n,i),t.lineTo(-i,i),t.lineTo(-i,n),t.lineTo(i,n),t.lineTo(i,i),t.lineTo(n,i),t.lineTo(n,-i),t.lineTo(i,-i),t.lineTo(i,-n),t.lineTo(-i,-n),t.lineTo(-i,-i),t.closePath()}},diamond:{draw:function(t,e){var n=Math.sqrt(e)/2;t.moveTo(-n,0),t.lineTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.closePath()}},square:{draw:function(t,e){var n=Math.sqrt(e),i=-n/2;t.rect(i,i,n,n)}},arrow:{draw:function(t,e){var n=Math.sqrt(e)/2,i=n/7,r=n/2.5,o=n/8;t.moveTo(-i,n),t.lineTo(i,n),t.lineTo(i,-o),t.lineTo(r,-o),t.lineTo(0,-n),t.lineTo(-r,-o),t.lineTo(-i,-o),t.closePath()}},wedge:{draw:function(t,e){var n=Math.sqrt(e)/2,i=_*n,r=i-n*R,o=n/4;t.moveTo(0,-i-r),t.lineTo(-o,i-r),t.lineTo(o,i-r),t.closePath()}},triangle:{draw:function(t,e){var n=Math.sqrt(e)/2,i=_*n,r=i-n*R;t.moveTo(0,-i-r),t.lineTo(-n,i-r),t.lineTo(n,i-r),t.closePath()}},"triangle-up":{draw:function(t,e){var n=Math.sqrt(e)/2,i=_*n;t.moveTo(0,-i),t.lineTo(-n,i),t.lineTo(n,i),t.closePath()}},"triangle-down":{draw:function(t,e){var n=Math.sqrt(e)/2,i=_*n;t.moveTo(0,i),t.lineTo(-n,-i),t.lineTo(n,-i),t.closePath()}},"triangle-right":{draw:function(t,e){var n=Math.sqrt(e)/2,i=_*n;t.moveTo(i,0),t.lineTo(-i,-n),t.lineTo(-i,n),t.closePath()}},"triangle-left":{draw:function(t,e){var n=Math.sqrt(e)/2,i=_*n;t.moveTo(-i,0),t.lineTo(i,-n),t.lineTo(i,n),t.closePath()}},stroke:{draw:function(t,e){var n=Math.sqrt(e)/2;t.moveTo(-n,0),t.lineTo(n,0)}}};function P(t){return e.hasOwnProperty(z,t)?z[t]:function(t){if(!e.hasOwnProperty(S,t)){var n=p(t);S[t]={draw:function(t,e){M(t,n,0,0,Math.sqrt(e)/2)}}}return S[t]}(t)}var S={};const L=.448084975506;function O(t){return t.x}function N(t){return t.y}function q(t){return t.width}function D(t){return t.height}function E(t){return"function"==typeof t?t:()=>+t}function I(t,e,n){return Math.max(e,Math.min(t,n))}function B(){var t=O,e=N,n=q,r=D,o=E(0),s=o,a=o,l=o,u=null;function c(c,h,f){var d,g=null!=h?h:+t.call(this,c),p=null!=f?f:+e.call(this,c),v=+n.call(this,c),y=+r.call(this,c),m=Math.min(v,y)/2,_=I(+o.call(this,c),0,m),x=I(+s.call(this,c),0,m),b=I(+a.call(this,c),0,m),k=I(+l.call(this,c),0,m);if(u||(u=d=i.path()),_<=0&&x<=0&&b<=0&&k<=0)u.rect(g,p,v,y);else{var w=g+v,T=p+y;u.moveTo(g+_,p),u.lineTo(w-x,p),u.bezierCurveTo(w-L*x,p,w,p+L*x,w,p+x),u.lineTo(w,T-k),u.bezierCurveTo(w,T-L*k,w-L*k,T,w-k,T),u.lineTo(g+b,T),u.bezierCurveTo(g+L*b,T,g,T-L*b,g,T-b),u.lineTo(g,p+_),u.bezierCurveTo(g,p+L*_,g+L*_,p,g+_,p),u.closePath()}if(d)return u=null,d+""||null}return c.x=function(e){return arguments.length?(t=E(e),c):t},c.y=function(t){return arguments.length?(e=E(t),c):e},c.width=function(t){return arguments.length?(n=E(t),c):n},c.height=function(t){return arguments.length?(r=E(t),c):r},c.cornerRadius=function(t,e,n,i){return arguments.length?(o=E(t),s=null!=e?E(e):o,l=null!=n?E(n):o,a=null!=i?E(i):s,c):o},c.context=function(t){return arguments.length?(u=null==t?null:t,c):u},c}function V(){var t,e,n,r,o,s,a,l,u=null;function c(t,e,n){var i=n/2;if(o){var r=a-e,c=t-s;if(r||c){var h=Math.sqrt(r*r+c*c),f=(r/=h)*l,d=(c/=h)*l,g=Math.atan2(c,r);u.moveTo(s-f,a-d),u.lineTo(t-r*i,e-c*i),u.arc(t,e,i,g-Math.PI,g),u.lineTo(s+f,a+d),u.arc(s,a,l,g,g+Math.PI)}else u.arc(t,e,i,0,m);u.closePath()}else o=1;s=t,a=e,l=i}function h(s){var a,l,h,f=s.length,d=!1;for(null==u&&(u=h=i.path()),a=0;a<=f;++a)!(a<f&&r(l=s[a],a,s))===d&&(d=!d)&&(o=0),d&&c(+t(l,a,s),+e(l,a,s),+n(l,a,s));if(h)return u=null,h+""||null}return h.x=function(e){return arguments.length?(t=e,h):t},h.y=function(t){return arguments.length?(e=t,h):e},h.size=function(t){return arguments.length?(n=t,h):n},h.defined=function(t){return arguments.length?(r=t,h):r},h.context=function(t){return arguments.length?(u=null==t?null:t,h):u},h}function H(t,e){return null!=t?t:e}const j=t=>t.x||0,G=t=>t.y||0,W=t=>!(!1===t.defined),U=n.arc().startAngle(t=>t.startAngle||0).endAngle(t=>t.endAngle||0).padAngle(t=>t.padAngle||0).innerRadius(t=>t.innerRadius||0).outerRadius(t=>t.outerRadius||0).cornerRadius(t=>t.cornerRadius||0),X=n.area().x(j).y1(G).y0(t=>(t.y||0)+(t.height||0)).defined(W),F=n.area().y(G).x1(j).x0(t=>(t.x||0)+(t.width||0)).defined(W),Y=n.line().x(j).y(G).defined(W),J=B().x(j).y(G).width(t=>t.width||0).height(t=>t.height||0).cornerRadius(t=>H(t.cornerRadiusTopLeft,t.cornerRadius)||0,t=>H(t.cornerRadiusTopRight,t.cornerRadius)||0,t=>H(t.cornerRadiusBottomRight,t.cornerRadius)||0,t=>H(t.cornerRadiusBottomLeft,t.cornerRadius)||0),$=n.symbol().type(t=>P(t.shape||"circle")).size(t=>H(t.size,64)),Q=V().x(j).y(G).defined(W).size(t=>t.size||1);function Z(t){return t.cornerRadius||t.cornerRadiusTopLeft||t.cornerRadiusTopRight||t.cornerRadiusBottomRight||t.cornerRadiusBottomLeft}function K(t,e,n,i){return J.context(t)(e,n,i)}var tt=1;function et(){tt=1}function nt(t,n,i){var r=n.clip,o=t._defs,s=n.clip_id||(n.clip_id="clip"+tt++),a=o.clipping[s]||(o.clipping[s]={id:s});return e.isFunction(r)?a.path=r(null):Z(i)?a.path=K(null,i,0,0):(a.width=i.width||0,a.height=i.height||0),"url(#"+s+")"}function it(t){this.clear(),t&&this.union(t)}var rt=it.prototype;function ot(t){this.mark=t,this.bounds=this.bounds||new it}function st(t){ot.call(this,t),this.items=this.items||[]}function at(t){this._pending=0,this._loader=t||o.loader()}rt.clone=function(){return new it(this)},rt.clear=function(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},rt.empty=function(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},rt.equals=function(t){return this.x1===t.x1&&this.y1===t.y1&&this.x2===t.x2&&this.y2===t.y2},rt.set=function(t,e,n,i){return n<t?(this.x2=t,this.x1=n):(this.x1=t,this.x2=n),i<e?(this.y2=e,this.y1=i):(this.y1=e,this.y2=i),this},rt.add=function(t,e){return t<this.x1&&(this.x1=t),e<this.y1&&(this.y1=e),t>this.x2&&(this.x2=t),e>this.y2&&(this.y2=e),this},rt.expand=function(t){return this.x1-=t,this.y1-=t,this.x2+=t,this.y2+=t,this},rt.round=function(){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},rt.scale=function(t){return this.x1*=t,this.y1*=t,this.x2*=t,this.y2*=t,this},rt.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},rt.rotate=function(t,e,n){const i=this.rotatedPoints(t,e,n);return this.clear().add(i[0],i[1]).add(i[2],i[3]).add(i[4],i[5]).add(i[6],i[7])},rt.rotatedPoints=function(t,e,n){var{x1:i,y1:r,x2:o,y2:s}=this,a=Math.cos(t),l=Math.sin(t),u=e-e*a+n*l,c=n-e*l-n*a;return[a*i-l*r+u,l*i+a*r+c,a*i-l*s+u,l*i+a*s+c,a*o-l*r+u,l*o+a*r+c,a*o-l*s+u,l*o+a*s+c]},rt.union=function(t){return t.x1<this.x1&&(this.x1=t.x1),t.y1<this.y1&&(this.y1=t.y1),t.x2>this.x2&&(this.x2=t.x2),t.y2>this.y2&&(this.y2=t.y2),this},rt.intersect=function(t){return t.x1>this.x1&&(this.x1=t.x1),t.y1>this.y1&&(this.y1=t.y1),t.x2<this.x2&&(this.x2=t.x2),t.y2<this.y2&&(this.y2=t.y2),this},rt.encloses=function(t){return t&&this.x1<=t.x1&&this.x2>=t.x2&&this.y1<=t.y1&&this.y2>=t.y2},rt.alignsWith=function(t){return t&&(this.x1==t.x1||this.x2==t.x2||this.y1==t.y1||this.y2==t.y2)},rt.intersects=function(t){return t&&!(this.x2<t.x1||this.x1>t.x2||this.y2<t.y1||this.y1>t.y2)},rt.contains=function(t,e){return!(t<this.x1||t>this.x2||e<this.y1||e>this.y2)},rt.width=function(){return this.x2-this.x1},rt.height=function(){return this.y2-this.y1},e.inherits(st,ot);var lt=at.prototype;function ut(t){t._pending+=1}function ct(t){t._pending-=1}function ht(t,e,n){if(e.stroke&&0!==e.opacity&&0!==e.strokeOpacity){const i=null!=e.strokeWidth?+e.strokeWidth:1;t.expand(i+(n?function(t,e){return t.strokeJoin&&"miter"!==t.strokeJoin?0:e}(e,i):0))}return t}lt.pending=function(){return this._pending},lt.sanitizeURL=function(t){var e=this;return ut(e),e._loader.sanitize(t,{context:"href"}).then((function(t){return ct(e),t})).catch((function(){return ct(e),null}))},lt.loadImage=function(t){const n=this,i=r.image();return ut(n),n._loader.sanitize(t,{context:"image"}).then((function(t){const r=t.href;if(!r||!i)throw{url:r};const o=new i,s=e.hasOwnProperty(t,"crossOrigin")?t.crossOrigin:"anonymous";return null!=s&&(o.crossOrigin=s),o.onload=()=>ct(n),o.onerror=()=>ct(n),o.src=r,o})).catch((function(t){return ct(n),{complete:!1,width:0,height:0,src:t&&t.url||""}}))},lt.ready=function(){var t=this;return new Promise((function(e){!function n(i){t.pending()?setTimeout((function(){n(!0)}),10):e(i)}(!1)}))};var ft,dt,gt,pt=m-1e-8;function vt(t){return ft=t,vt}function yt(){}function mt(t,e){ft.add(t,e)}function _t(t,e){mt(dt=t,gt=e)}function xt(t){mt(t,ft.y1)}function bt(t){mt(ft.x1,t)}function kt(t,e,n,i){const r=(t-e)/(t+n-2*e);0<r&&r<1&&i(t+(e-t)*r)}function wt(t,e,n,i,r){const o=i-t+3*e-3*n,s=t+n-2*e,a=t-e;let l,u=0,c=0;Math.abs(o)>1e-14?(l=s*s+a*o,l>=0&&(l=Math.sqrt(l),u=(-s+l)/o,c=(-s-l)/o)):u=.5*a/s,0<u&&u<1&&r(Tt(u,t,e,n,i)),0<c&&c<1&&r(Tt(c,t,e,n,i))}function Tt(t,e,n,i,r){const o=1-t,s=o*o,a=t*t;return s*o*e+3*s*t*n+3*o*a*i+a*t*r}vt.beginPath=yt,vt.closePath=yt,vt.moveTo=_t,vt.lineTo=_t,vt.rect=function(t,e,n,i){mt(t+n,e+i),_t(t,e)},vt.quadraticCurveTo=function(t,e,n,i){kt(dt,t,n,xt),kt(gt,e,i,bt),_t(n,i)},vt.bezierCurveTo=function(t,e,n,i,r,o){wt(dt,t,n,r,xt),wt(gt,e,i,o,bt),_t(r,o)},vt.arc=function(t,e,n,i,r,o){if(dt=n*Math.cos(r)+t,gt=n*Math.sin(r)+e,Math.abs(r-i)>pt)mt(t-n,e-n),mt(t+n,e+n);else{const s=i=>mt(n*Math.cos(i)+t,n*Math.sin(i)+e);let a,l;if(s(i),s(r),r!==i)if((i%=m)<0&&(i+=m),(r%=m)<0&&(r+=m),r<i&&(o=!o,a=i,i=r,r=a),o)for(r-=m,a=i-i%y,l=0;l<4&&a>r;++l,a-=y)s(a);else for(a=i-i%y+y,l=0;l<4&&a<r;++l,a+=y)s(a)}};var At=(At=r.canvas(1,1))?At.getContext("2d"):null;const Mt=new it;function Ct(t){return function(e,n){if(!At)return!0;t(At,e),Mt.clear().union(e.bounds).intersect(n).round();const{x1:i,y1:r,x2:o,y2:s}=Mt;for(let t=r;t<=s;++t)for(let e=i;e<=o;++e)if(At.isPointInPath(e,t))return!0;return!1}}function Rt(t,e){return e.contains(t.x||0,t.y||0)}function zt(t,e){const n=t.x||0,i=t.y||0,r=t.width||0,o=t.height||0;return e.intersects(Mt.set(n,i,n+r,i+o))}function Pt(t,e){const n=t.x||0,i=t.y||0;return St(e,n,i,null!=t.x2?t.x2:n,null!=t.y2?t.y2:i)}function St(t,e,n,i,r){const{x1:o,y1:s,x2:a,y2:l}=t,u=i-e,c=r-n;let h,f,d,g,p=0,v=1;for(g=0;g<4;++g){if(0===g&&(h=-u,f=-(o-e)),1===g&&(h=u,f=a-e),2===g&&(h=-c,f=-(s-n)),3===g&&(h=c,f=l-n),Math.abs(h)<1e-10&&f<0)return!1;if(d=f/h,h<0){if(d>v)return!1;d>p&&(p=d)}else if(h>0){if(d<p)return!1;d<v&&(v=d)}}return!0}function Lt(t,e){t.globalCompositeOperation=e.blend||"source-over"}function Ot(t,e){return null==t?e:t}function Nt(t,e){const n=e.length;for(let i=0;i<n;++i)t.addColorStop(e[i].offset,e[i].color);return t}function qt(t,e,n){return l(n)?function(t,e,n){const i=n.width(),o=n.height();let s;if("radial"===e.gradient)s=t.createRadialGradient(n.x1+Ot(e.x1,.5)*i,n.y1+Ot(e.y1,.5)*o,Math.max(i,o)*Ot(e.r1,0),n.x1+Ot(e.x2,.5)*i,n.y1+Ot(e.y2,.5)*o,Math.max(i,o)*Ot(e.r2,.5));else{const a=Ot(e.x1,0),l=Ot(e.y1,0),u=Ot(e.x2,1),c=Ot(e.y2,0);if(a!==u&&l!==c&&i!==o){const n=r.canvas(Math.ceil(i),Math.ceil(o)),s=n.getContext("2d");return s.scale(i,o),s.fillStyle=Nt(s.createLinearGradient(a,l,u,c),e.stops),s.fillRect(0,0,i,o),t.createPattern(n,"no-repeat")}s=t.createLinearGradient(n.x1+a*i,n.y1+l*o,n.x1+u*i,n.y1+c*o)}return Nt(s,e.stops)}(t,n,e.bounds):n}function Dt(t,e,n){return(n*=null==e.fillOpacity?1:e.fillOpacity)>0&&(t.globalAlpha=n,t.fillStyle=qt(t,e,e.fill),!0)}var Et=[];function It(t,e,n){var i=null!=(i=e.strokeWidth)?i:1;return!(i<=0)&&((n*=null==e.strokeOpacity?1:e.strokeOpacity)>0&&(t.globalAlpha=n,t.strokeStyle=qt(t,e,e.stroke),t.lineWidth=i,t.lineCap=e.strokeCap||"butt",t.lineJoin=e.strokeJoin||"miter",t.miterLimit=e.strokeMiterLimit||10,t.setLineDash&&(t.setLineDash(e.strokeDash||Et),t.lineDashOffset=e.strokeDashOffset||0),!0))}function Bt(t,e){return t.zindex-e.zindex||t.index-e.index}function Vt(t){if(!t.zdirty)return t.zitems;var e,n,i,r=t.items,o=[];for(n=0,i=r.length;n<i;++n)(e=r[n]).index=n,e.zindex&&o.push(e);return t.zdirty=!1,t.zitems=o.sort(Bt)}function Ht(t,e){var n,i,r=t.items;if(r&&r.length){var o=Vt(t);if(o&&o.length){for(n=0,i=r.length;n<i;++n)r[n].zindex||e(r[n]);r=o}for(n=0,i=r.length;n<i;++n)e(r[n])}}function jt(t,e){var n,i,r=t.items;if(!r||!r.length)return null;var o=Vt(t);for(o&&o.length&&(r=o),i=r.length;--i>=0;)if(n=e(r[i]))return n;if(r===o)for(i=(r=t.items).length;--i>=0;)if(!r[i].zindex&&(n=e(r[i])))return n;return null}function Gt(t){return function(e,n,i){Ht(n,(function(n){i&&!i.intersects(n.bounds)||Ut(t,e,n,n)}))}}function Wt(t){return function(e,n,i){!n.items.length||i&&!i.intersects(n.bounds)||Ut(t,e,n.items[0],n.items)}}function Ut(t,e,n,i){var r=null==n.opacity?1:n.opacity;0!==r&&(t(e,i)||(Lt(e,n),n.fill&&Dt(e,n,r)&&e.fill(),n.stroke&&It(e,n,r)&&e.stroke()))}function Xt(t){return t=t||e.truthy,function(e,n,i,r,o,s){return i*=e.pixelRatio,r*=e.pixelRatio,jt(n,(function(n){var a=n.bounds;if((!a||a.contains(o,s))&&a)return t(e,n,i,r,o,s)?n:void 0}))}}function Ft(t,e){return function(n,i,r,o){var s,a,l=Array.isArray(i)?i[0]:i,u=null==e?l.fill:e,c=l.stroke&&n.isPointInStroke;return c&&(s=l.strokeWidth,a=l.strokeCap,n.lineWidth=null!=s?s:1,n.lineCap=null!=a?a:"butt"),!t(n,i)&&(u&&n.isPointInPath(r,o)||c&&n.isPointInStroke(r,o))}}function Yt(t){return Xt(Ft(t))}function Jt(t,e){return"translate("+t+","+e+")"}function $t(t){return"rotate("+t+")"}function Qt(t){return Jt(t.x||0,t.y||0)}function Zt(t){return Jt(t.x||0,t.y||0)+(t.angle?" "+$t(t.angle):"")+(t.scaleX||t.scaleY?" "+(e=t.scaleX||1,n=t.scaleY||1,"scale("+e+","+n+")"):"");var e,n}function Kt(t,e,n){function i(t,n){var i=n.x||0,r=n.y||0,o=n.angle||0;t.translate(i,r),o&&t.rotate(o*=v),t.beginPath(),e(t,n),o&&t.rotate(-o),t.translate(-i,-r)}return{type:t,tag:"path",nested:!1,attr:function(t,n){t("transform",Zt(n)),t("d",e(null,n))},bound:function(t,n){var i=n.x||0,r=n.y||0;return e(vt(t),n),ht(t,n).translate(i,r),n.angle&&t.rotate(n.angle*v,i,r),t},draw:Gt(i),pick:Yt(i),isect:n||Ct(i)}}var te=Kt("arc",(function(t,e){return U.context(t)(e)}));function ee(t,e,n){function i(t,n){t.beginPath(),e(t,n)}var r=Ft(i);return{type:t,tag:"path",nested:!0,attr:function(t,n){var i=n.mark.items;i.length&&t("d",e(null,i))},bound:function(t,n){var i=n.items;return 0===i.length?t:(e(vt(t),i),ht(t,i[0]))},draw:Wt(i),pick:function(t,e,n,i,o,s){var a=e.items,l=e.bounds;return!a||!a.length||l&&!l.contains(o,s)?null:(n*=t.pixelRatio,i*=t.pixelRatio,r(t,a,n,i)?a[0]:null)},isect:Rt,tip:n}}var ne=ee("area",(function(t,e){var n=e[0],i=n.interpolate||"linear";return("horizontal"===n.orient?F:X).curve(f(i,n.orient,n.tension)).context(t)(e)}),(function(t,e){for(var n,i,r="horizontal"===t[0].orient?e[1]:e[0],o="horizontal"===t[0].orient?"y":"x",s=t.length,a=1/0;--s>=0;)!1!==t[s].defined&&(i=Math.abs(t[s][o]-r))<a&&(a=i,n=t[s]);return n}));function ie(t,e){t.beginPath(),Z(e)?K(t,e,0,0):t.rect(0,0,e.width||0,e.height||0),t.clip()}function re(t){var e=null!=(e=t.strokeWidth)?e:1;return null!=t.strokeOffset?t.strokeOffset:t.stroke&&e>.5&&e<1.5?.5-Math.abs(e-1):0}function oe(t,e){var n=re(e);t("d",K(null,e,n,n))}function se(t,e,n,i){var r=re(e);t.beginPath(),K(t,e,(n||0)+r,(i||0)+r)}var ae=Ft(se),le=Ft(se,!1);var ue={type:"group",tag:"g",nested:!1,attr:function(t,e){t("transform",Qt(e))},bound:function(t,e){if(!e.clip&&e.items)for(var n=e.items,i=0,r=n.length;i<r;++i)t.union(n[i].bounds);return(e.clip||e.width||e.height)&&!e.noBound&&t.add(0,0).add(e.width||0,e.height||0),ht(t,e),t.translate(e.x||0,e.y||0)},draw:function(t,e,n){var i=this;Ht(e,(function(e){var r=e.x||0,o=e.y||0,s=e.strokeForeground,a=null==e.opacity?1:e.opacity;(e.stroke||e.fill)&&a&&(se(t,e,r,o),Lt(t,e),e.fill&&Dt(t,e,a)&&t.fill(),e.stroke&&!s&&It(t,e,a)&&t.stroke()),t.save(),t.translate(r,o),e.clip&&ie(t,e),n&&n.translate(-r,-o),Ht(e,(function(e){i.draw(t,e,n)})),n&&n.translate(r,o),t.restore(),s&&e.stroke&&a&&(se(t,e,r,o),Lt(t,e),It(t,e,a)&&t.stroke())}))},pick:function(t,e,n,i,r,o){if(e.bounds&&!e.bounds.contains(r,o)||!e.items)return null;var s=this,a=n*t.pixelRatio,l=i*t.pixelRatio;return jt(e,(function(u){var c,h,f,d,g,p,v,y,m;if((!(y=u.bounds)||y.contains(r,o))&&(d=u.x||0,g=u.y||0,p=d+(u.width||0),v=g+(u.height||0),!(m=u.clip)||!(r<d||r>p||o<d||o>v)))return t.save(),t.translate(d,g),d=r-d,g=o-g,m&&Z(u)&&!ae(t,u,a,l)?(t.restore(),null):(h=u.strokeForeground,(f=!1!==e.interactive)&&h&&u.stroke&&le(t,u,a,l)?(t.restore(),u):(!(c=jt(u,(function(t){return function(t,e,n){return(!1!==t.interactive||"group"===t.marktype)&&t.bounds&&t.bounds.contains(e,n)}(t,d,g)?s.pick(t,n,i,d,g):null})))&&f&&(u.fill||!h&&u.stroke)&&ae(t,u,a,l)&&(c=u),t.restore(),c||null))}))},isect:zt,content:function(t,e,n){t("clip-path",e.clip?nt(n,e,e):null)},background:function(t,e){t("class","background"),t("aria-hidden",!0),oe(t,e)},foreground:function(t,e){t("class","foreground"),t("aria-hidden",!0),e.strokeForeground?oe(t,e):t("d","")}};function ce(t,e){var n=t.image;return(!n||t.url&&t.url!==n.url)&&(n={complete:!1,width:0,height:0},e.loadImage(t.url).then(e=>{t.image=e,t.image.url=t.url})),n}function he(t,e){return null!=t.width?t.width:e&&e.width?!1!==t.aspect&&t.height?t.height*e.width/e.height:e.width:0}function fe(t,e){return null!=t.height?t.height:e&&e.height?!1!==t.aspect&&t.width?t.width*e.height/e.width:e.height:0}function de(t,e){return"center"===t?e/2:"right"===t?e:0}function ge(t,e){return"middle"===t?e/2:"bottom"===t?e:0}var pe={type:"image",tag:"image",nested:!1,attr:function(t,e,n){var i=ce(e,n),r=e.x||0,o=e.y||0,s=he(e,i),a=fe(e,i),l=!1===e.aspect?"none":"xMidYMid";r-=de(e.align,s),o-=ge(e.baseline,a),!i.src&&i.toDataURL?t("href",i.toDataURL(),"http://www.w3.org/1999/xlink","xlink:href"):t("href",i.src||"","http://www.w3.org/1999/xlink","xlink:href"),t("transform",Jt(r,o)),t("width",s),t("height",a),t("preserveAspectRatio",l)},bound:function(t,e){var n=e.image,i=e.x||0,r=e.y||0,o=he(e,n),s=fe(e,n);return i-=de(e.align,o),r-=ge(e.baseline,s),t.set(i,r,i+o,r+s)},draw:function(t,e,n){var i=this;Ht(e,(function(e){if(!n||n.intersects(e.bounds)){var r,o,s,a,l=ce(e,i),u=e.x||0,c=e.y||0,h=he(e,l),f=fe(e,l);u-=de(e.align,h),c-=ge(e.baseline,f),!1!==e.aspect&&(o=l.width/l.height,s=e.width/e.height,o==o&&s==s&&o!==s&&(s<o?(c+=(f-(a=h/o))/2,f=a):(u+=(h-(a=f*o))/2,h=a))),(l.complete||l.toDataURL)&&(Lt(t,e),t.globalAlpha=null!=(r=e.opacity)?r:1,t.imageSmoothingEnabled=!1!==e.smooth,t.drawImage(l,u,c,h,f))}}))},pick:Xt(),isect:e.truthy,get:ce,xOffset:de,yOffset:ge},ve=ee("line",(function(t,e){var n=e[0],i=n.interpolate||"linear";return Y.curve(f(i,n.orient,n.tension)).context(t)(e)}),(function(t,e){for(var n,i,r=Math.pow(t[0].strokeWidth||1,2),o=t.length;--o>=0;)if(!1!==t[o].defined&&(n=t[o].x-e[0])*n+(i=t[o].y-e[1])*i<r)return t[o];return null}));function ye(t,e){var n=e.path;if(null==n)return!0;var i=e.x||0,r=e.y||0,o=e.scaleX||1,s=e.scaleY||1,a=(e.angle||0)*v,l=e.pathCache;l&&l.path===n||((e.pathCache=l=p(n)).path=n),a&&t.rotate&&t.translate?(t.translate(i,r),t.rotate(a),M(t,l,0,0,o,s),t.rotate(-a),t.translate(-i,-r)):M(t,l,i,r,o,s)}var me={type:"path",tag:"path",nested:!1,attr:function(t,e){var n=e.scaleX||1,i=e.scaleY||1;1===n&&1===i||t("vector-effect","non-scaling-stroke"),t("transform",Zt(e)),t("d",e.path)},bound:function(t,e){return ye(vt(t),e)?t.set(0,0,0,0):ht(t,e,!0),e.angle&&t.rotate(e.angle*v,e.x||0,e.y||0),t},draw:Gt(ye),pick:Yt(ye),isect:Ct(ye)};function _e(t,e){t.beginPath(),K(t,e)}var xe={type:"rect",tag:"path",nested:!1,attr:function(t,e){t("d",K(null,e))},bound:function(t,e){var n,i;return ht(t.set(n=e.x||0,i=e.y||0,n+e.width||0,i+e.height||0),e)},draw:Gt(_e),pick:Yt(_e),isect:zt};function be(t,e,n){var i,r,o,s;return!(!e.stroke||!It(t,e,n))&&(i=e.x||0,r=e.y||0,o=null!=e.x2?e.x2:i,s=null!=e.y2?e.y2:r,t.beginPath(),t.moveTo(i,r),t.lineTo(o,s),!0)}var ke={type:"rule",tag:"line",nested:!1,attr:function(t,e){t("transform",Qt(e)),t("x2",null!=e.x2?e.x2-(e.x||0):0),t("y2",null!=e.y2?e.y2-(e.y||0):0)},bound:function(t,e){var n,i;return ht(t.set(n=e.x||0,i=e.y||0,null!=e.x2?e.x2:n,null!=e.y2?e.y2:i),e)},draw:function(t,e,n){Ht(e,(function(e){if(!n||n.intersects(e.bounds)){var i=null==e.opacity?1:e.opacity;i&&be(t,e,i)&&(Lt(t,e),t.stroke())}}))},pick:Xt((function(t,e,n,i){return!!t.isPointInStroke&&(be(t,e,1)&&t.isPointInStroke(n,i))})),isect:Pt},we=Kt("shape",(function(t,e){return(e.mark.shape||e.shape).context(t)(e)})),Te=Kt("symbol",(function(t,e){return $.context(t)(e)}),Rt);const Ae=e.lruCache();var Me={height:Le,measureWidth:Pe,estimateWidth:Re,width:Re,canvas:Ce};function Ce(t){Me.width=t&&At?Pe:Re}function Re(t,e){return ze(qe(t,e),Le(t))}function ze(t,e){return~~(.8*t.length*e)}function Pe(t,e){return Le(t)<=0||!(e=qe(t,e))?0:Se(e,Ee(t))}function Se(t,e){const n=`(${e}) ${t}`;let i=Ae.get(n);return void 0===i&&(At.font=e,i=At.measureText(t).width,Ae.set(n,i)),i}function Le(t){return null!=t.fontSize?+t.fontSize||0:11}function Oe(t){return null!=t.lineHeight?t.lineHeight:Le(t)+2}function Ne(t){return n=t.lineBreak&&t.text&&!e.isArray(t.text)?t.text.split(t.lineBreak):t.text,e.isArray(n)?n.length>1?n:n[0]:n;var n}function qe(t,e){const n=null==e?"":(e+"").trim();return t.limit>0&&n.length?function(t,e){var n=+t.limit,i=function(t){if(Me.width===Pe){const e=Ee(t);return t=>Se(t,e)}{const e=Le(t);return t=>ze(t,e)}}(t);if(i(e)<n)return e;var r,o=t.ellipsis||"…",s="rtl"===t.dir,a=0,l=e.length;if(n-=i(o),s){for(;a<l;)r=a+l>>>1,i(e.slice(r))>n?a=r+1:l=r;return o+e.slice(a)}for(;a<l;)r=1+(a+l>>>1),i(e.slice(0,r))<n?a=r:l=r-1;return e.slice(0,a)+o}(t,n):n}function De(t,e){var n=t.font;return(e&&n?String(n).replace(/"/g,"'"):n)||"sans-serif"}function Ee(t,e){return(t.fontStyle?t.fontStyle+" ":"")+(t.fontVariant?t.fontVariant+" ":"")+(t.fontWeight?t.fontWeight+" ":"")+Le(t)+"px "+De(t,e)}function Ie(t){var e=t.baseline,n=Le(t);return Math.round("top"===e?.79*n:"middle"===e?.3*n:"bottom"===e?-.21*n:"line-top"===e?.29*n+.5*Oe(t):"line-bottom"===e?.29*n-.5*Oe(t):0)}Ce(!0);var Be={left:"start",center:"middle",right:"end"},Ve=new it;function He(t){var e,n=t.x||0,i=t.y||0,r=t.radius||0;return r&&(e=(t.theta||0)-y,n+=r*Math.cos(e),i+=r*Math.sin(e)),Ve.x1=n,Ve.y1=i,Ve}function je(t,n,i){var r,o=Me.height(n),s=n.align,a=He(n),l=a.x1,u=a.y1,c=n.dx||0,h=(n.dy||0)+Ie(n)-Math.round(.8*o),f=Ne(n);if(e.isArray(f)?(o+=Oe(n)*(f.length-1),r=f.reduce((t,e)=>Math.max(t,Me.width(n,e)),0)):r=Me.width(n,f),"center"===s?c-=r/2:"right"===s&&(c-=r),t.set(c+=l,h+=u,c+r,h+o),n.angle&&!i)t.rotate(n.angle*v,l,u);else if(2===i)return t.rotatedPoints(n.angle*v,l,u);return t}var Ge={arc:te,area:ne,group:ue,image:pe,line:ve,path:me,rect:xe,rule:ke,shape:we,symbol:Te,text:{type:"text",tag:"text",nested:!1,attr:function(t,e){var n,i=e.dx||0,r=(e.dy||0)+Ie(e),o=He(e),s=o.x1,a=o.y1,l=e.angle||0;t("text-anchor",Be[e.align]||"start"),l?(n=Jt(s,a)+" "+$t(l),(i||r)&&(n+=" "+Jt(i,r))):n=Jt(s+i,a+r),t("transform",n)},bound:je,draw:function(t,n,i){Ht(n,(function(n){var r,o,s,a,l,u,c,h=null==n.opacity?1:n.opacity;if(!(i&&!i.intersects(n.bounds)||0===h||n.fontSize<=0||null==n.text||0===n.text.length)){if(t.font=Ee(n),t.textAlign=n.align||"left",o=(r=He(n)).x1,s=r.y1,n.angle&&(t.save(),t.translate(o,s),t.rotate(n.angle*v),o=s=0),o+=n.dx||0,s+=(n.dy||0)+Ie(n),u=Ne(n),Lt(t,n),e.isArray(u))for(l=Oe(n),a=0;a<u.length;++a)c=qe(n,u[a]),n.fill&&Dt(t,n,h)&&t.fillText(c,o,s),n.stroke&&It(t,n,h)&&t.strokeText(c,o,s),s+=l;else c=qe(n,u),n.fill&&Dt(t,n,h)&&t.fillText(c,o,s),n.stroke&&It(t,n,h)&&t.strokeText(c,o,s);n.angle&&t.restore()}}))},pick:Xt((function(t,e,n,i,r,o){if(e.fontSize<=0)return!1;if(!e.angle)return!0;var s=He(e),a=s.x1,l=s.y1,u=je(Ve,e,1),c=-e.angle*v,h=Math.cos(c),f=Math.sin(c),d=h*r-f*o+(a-h*a+f*l),g=f*r+h*o+(l-f*a-h*l);return u.contains(d,g)})),isect:function(t,e){var n=je(Ve,t,2);return St(e,n[0],n[1],n[2],n[3])||St(e,n[0],n[1],n[4],n[5])||St(e,n[4],n[5],n[6],n[7])||St(e,n[2],n[3],n[6],n[7])}},trail:ee("trail",(function(t,e){return Q.context(t)(e)}),(function(t,e){for(var n,i,r=t.length;--r>=0;)if(!1!==t[r].defined&&(n=t[r].x-e[0])*n+(i=t[r].y-e[1])*i<(n=t[r].size||1)*n)return t[r];return null}))};function We(t,e,n){var i=Ge[t.mark.marktype],r=e||i.bound;return i.nested&&(t=t.mark),r(t.bounds||(t.bounds=new it),t,n)}var Ue={mark:null};function Xe(t,e,n){var i,r,o,s,a=Ge[t.marktype],l=a.bound,u=t.items,c=u&&u.length;if(a.nested)return c?o=u[0]:(Ue.mark=t,o=Ue),s=We(o,l,n),e=e&&e.union(s)||s;if(e=e||t.bounds&&t.bounds.clear()||new it,c)for(i=0,r=u.length;i<r;++i)e.union(We(u[i],l,n));return t.bounds=e}var Fe=["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 Ye(t,e){return JSON.stringify(t,Fe,e)}function Je(t){return function t(e){var n,i,r,o=e.marktype,s=e.items;if(s)for(i=0,r=s.length;i<r;++i)n=o?"mark":"group",s[i][n]=e,s[i].zindex&&(s[i][n].zdirty=!0),"group"===(o||n)&&t(s[i]);o&&Xe(e);return e}("string"==typeof t?JSON.parse(t):t)}function $e(t){arguments.length?this.root=Je(t):(this.root=Ze({marktype:"group",name:"root",role:"frame"}),this.root.items=[new st(this.root)])}var Qe=$e.prototype;function Ze(t,e){const n={bounds:new it,clip:!!t.clip,group:e,interactive:!1!==t.interactive,items:[],marktype:t.marktype,name:t.name||void 0,role:t.role||void 0,zindex:t.zindex||0};return null!=t.aria&&(n.aria=t.aria),t.description&&(n.description=t.description),n}function Ke(t,e,n){return!t&&"undefined"!=typeof document&&document.createElement&&(t=document),t?n?t.createElementNS(n,e):t.createElement(e):null}function tn(t,e){e=e.toLowerCase();for(var n=t.childNodes,i=0,r=n.length;i<r;++i)if(n[i].tagName.toLowerCase()===e)return n[i]}function en(t,e,n,i){var r,o=t.childNodes[e];return o&&o.tagName.toLowerCase()===n.toLowerCase()||(r=o||null,o=Ke(t.ownerDocument,n,i),t.insertBefore(o,r)),o}function nn(t,e){for(var n=t.childNodes,i=n.length;i>e;)t.removeChild(n[--i]);return t}function rn(t){return"mark-"+t.marktype+(t.role?" role-"+t.role:"")+(t.name?" "+t.name:"")}function on(t,e){var n=e.getBoundingClientRect();return[t.clientX-n.left-(e.clientLeft||0),t.clientY-n.top-(e.clientTop||0)]}function sn(t,e){this._active=null,this._handlers={},this._loader=t||o.loader(),this._tooltip=e||an}function an(t,e,n,i){t.element().setAttribute("title",i||"")}Qe.toJSON=function(t){return Ye(this.root,t||0)},Qe.mark=function(t,e,n){var i=Ze(t,e=e||this.root.items[0]);return e.items[n]=i,i.zindex&&(i.group.zdirty=!0),i};const ln=sn.prototype;function un(t){this._el=null,this._bgcolor=null,this._loader=new at(t)}ln.initialize=function(t,e,n){return this._el=t,this._obj=n||null,this.origin(e)},ln.element=function(){return this._el},ln.canvas=function(){return this._el&&this._el.firstChild},ln.origin=function(t){return arguments.length?(this._origin=t||[0,0],this):this._origin.slice()},ln.scene=function(t){return arguments.length?(this._scene=t,this):this._scene},ln.on=function(){},ln.off=function(){},ln._handlerIndex=function(t,e,n){for(let i=t?t.length:0;--i>=0;)if(t[i].type===e&&(!n||t[i].handler===n))return i;return-1},ln.handlers=function(t){const e=this._handlers,n=[];if(t)n.push.apply(n,e[this.eventName(t)]);else for(const t in e)n.push.apply(n,e[t]);return n},ln.eventName=function(t){const e=t.indexOf(".");return e<0?t:t.slice(0,e)},ln.handleHref=function(t,e,n){this._loader.sanitize(n,{context:"href"}).then(e=>{const n=new MouseEvent(t.type,t),i=Ke(null,"a");for(const t in e)i.setAttribute(t,e[t]);i.dispatchEvent(n)}).catch((function(){}))},ln.handleTooltip=function(t,e,n){if(e&&null!=e.tooltip){e=function(t,e,n,i){var r,o,s=t&&t.mark;if(s&&(r=Ge[s.marktype]).tip){for((o=on(e,n))[0]-=i[0],o[1]-=i[1];t=t.mark.group;)o[0]-=t.x||0,o[1]-=t.y||0;t=r.tip(s.items,o)}return t}(e,t,this.canvas(),this._origin);const i=n&&e&&e.tooltip||null;this._tooltip.call(this._obj,this,t,e,i)}},ln.getItemBoundingClientRect=function(t){const e=this.canvas();if(!e)return;const n=e.getBoundingClientRect(),i=this._origin,r=t.bounds,o=r.width(),s=r.height();let a=r.x1+i[0]+n.left,l=r.y1+i[1]+n.top;for(;t.mark&&(t=t.mark.group);)a+=t.x||0,l+=t.y||0;return{x:a,y:l,width:o,height:s,left:a,top:l,right:a+o,bottom:l+s}};var cn=un.prototype;cn.initialize=function(t,e,n,i,r){return this._el=t,this.resize(e,n,i,r)},cn.element=function(){return this._el},cn.canvas=function(){return this._el&&this._el.firstChild},cn.background=function(t){return 0===arguments.length?this._bgcolor:(this._bgcolor=t,this)},cn.resize=function(t,e,n,i){return this._width=t,this._height=e,this._origin=n||[0,0],this._scale=i||1,this},cn.dirty=function(){},cn.render=function(t){var e=this;return e._call=function(){e._render(t)},e._call(),e._call=null,e},cn._render=function(){},cn.renderAsync=function(t){var e=this.render(t);return this._ready?this._ready.then((function(){return e})):Promise.resolve(e)},cn._load=function(t,e){var n=this,i=n._loader[t](e);if(!n._ready){var r=n._call;n._ready=n._loader.ready().then((function(t){t&&r(),n._ready=null}))}return i},cn.sanitizeURL=function(t){return this._load("sanitizeURL",t)},cn.loadImage=function(t){return this._load("loadImage",t)};const hn="dragleave",fn="mousedown",dn="mousemove",gn="mouseout",pn="click",vn=["keydown","keypress","keyup","dragenter",hn,"dragover",fn,"mouseup",dn,gn,"mouseover",pn,"dblclick","wheel","mousewheel","touchstart","touchmove","touchend"],yn=dn,mn=gn,_n=pn;function xn(t,e){sn.call(this,t,e),this._down=null,this._touch=null,this._first=!0,this._events={}}const bn=e.inherits(xn,sn);bn.initialize=function(t,e,n){return this._canvas=t&&tn(t,"canvas"),[pn,fn,dn,gn,hn].forEach(t=>kn(this,t)),sn.prototype.initialize.call(this,t,e,n)};function kn(t,e){(t=>"touchstart"===t||"touchmove"===t||"touchend"===t?["touchstart","touchmove","touchend"]:[t])(e).forEach(e=>function(t,e){const n=t.canvas();n&&!t._events[e]&&(t._events[e]=1,n.addEventListener(e,t[e]?n=>t[e](n):n=>t.fire(e,n)))}(t,e))}function wn(t,e,n){return function(i){const r=this._active,o=this.pickEvent(i);o===r||(r&&r.exit||this.fire(n,i),this._active=o,this.fire(e,i)),this.fire(t,i)}}function Tn(t){return function(e){this.fire(t,e),this._active=null}}bn.canvas=function(){return this._canvas},bn.context=function(){return this._canvas.getContext("2d")},bn.events=vn,bn.DOMMouseScroll=function(t){this.fire("mousewheel",t)},bn.mousemove=wn(dn,"mouseover",gn),bn.dragover=wn("dragover","dragenter",hn),bn.mouseout=Tn(gn),bn.dragleave=Tn(hn),bn.mousedown=function(t){this._down=this._active,this.fire(fn,t)},bn.click=function(t){this._down===this._active&&(this.fire(pn,t),this._down=null)},bn.touchstart=function(t){this._touch=this.pickEvent(t.changedTouches[0]),this._first&&(this._active=this._touch,this._first=!1),this.fire("touchstart",t,!0)},bn.touchmove=function(t){this.fire("touchmove",t,!0)},bn.touchend=function(t){this.fire("touchend",t,!0),this._touch=null},bn.fire=function(t,e,n){const i=n?this._touch:this._active,r=this._handlers[t];if(e.vegaType=t,t===_n&&i&&i.href?this.handleHref(e,i,i.href):t!==yn&&t!==mn||this.handleTooltip(e,i,t!==mn),r)for(let t=0,n=r.length;t<n;++t)r[t].handler.call(this._obj,e,i)},bn.on=function(t,e){const n=this.eventName(t),i=this._handlers;return this._handlerIndex(i[n],t,e)<0&&(kn(this,t),(i[n]||(i[n]=[])).push({type:t,handler:e})),this},bn.off=function(t,e){const n=this.eventName(t),i=this._handlers[n],r=this._handlerIndex(i,t,e);return r>=0&&i.splice(r,1),this},bn.pickEvent=function(t){const e=on(t,this._canvas),n=this._origin;return this.pick(this._scene,e[0],e[1],e[0]-n[0],e[1]-n[1])},bn.pick=function(t,e,n,i,r){const o=this.context();return Ge[t.marktype].pick.call(this,o,t,e,n,i,r)};var An="undefined"!=typeof window&&window.devicePixelRatio||1;function Mn(t){un.call(this,t),this._options={},this._redraw=!1,this._dirty=new it,this._tempb=new it}const Cn=e.inherits(Mn,un),Rn=un.prototype;Cn.initialize=function(t,e,n,i,o,s){return this._options=s||{},this._canvas=this._options.externalContext?null:r.canvas(1,1,this._options.type),t&&this._canvas&&(nn(t,0).appendChild(this._canvas),this._canvas.setAttribute("class","marks")),Rn.initialize.call(this,t,e,n,i,o)},Cn.resize=function(t,n,i,r){if(Rn.resize.call(this,t,n,i,r),this._canvas)!function(t,e,n,i,r,o){const s="undefined"!=typeof HTMLElement&&t instanceof HTMLElement&&null!=t.parentNode,a=t.getContext("2d"),l=s?An:r;t.width=e*l,t.height=n*l;for(const t in o)a[t]=o[t];s&&1!==l&&(t.style.width=e+"px",t.style.height=n+"px"),a.pixelRatio=l,a.setTransform(l,0,0,l,l*i[0],l*i[1])}(this._canvas,this._width,this._height,this._origin,this._scale,this._options.context);else{const t=this._options.externalContext;t||e.error("CanvasRenderer is missing a valid canvas or context"),t.scale(this._scale,this._scale),t.translate(this._origin[0],this._origin[1])}return this._redraw=!0,this},Cn.canvas=function(){return this._canvas},Cn.context=function(){return this._options.externalContext||(this._canvas?this._canvas.getContext("2d"):null)},Cn.dirty=function(t){let e=this._tempb.clear().union(t.bounds),n=t.mark.group;for(;n;)e.translate(n.x||0,n.y||0),n=n.mark.group;this._dirty.union(e)};function zn(t,e){sn.call(this,t,e);const n=this;n._hrefHandler=Sn(n,(t,e)=>{e&&e.href&&n.handleHref(t,e,e.href)}),n._tooltipHandler=Sn(n,(t,e)=>{n.handleTooltip(t,e,t.type!==mn)})}Cn._render=function(t){const e=this.context(),n=this._origin,i=this._width,r=this._height,o=this._dirty,s=(a=n,l=i,u=r,(new it).set(0,0,l,u).translate(-a[0],-a[1]));var a,l,u;e.save();const c=this._redraw||o.empty()?(this._redraw=!1,s.expand(1)):function(t,e,n){return e.expand(1).round(),t.pixelRatio%1&&e.scale(t.pixelRatio).round().scale(1/t.pixelRatio),e.translate(-n[0]%1,-n[1]%1),t.beginPath(),t.rect(e.x1,e.y1,e.width(),e.height()),t.clip(),e}(e,s.intersect(o),n);return this.clear(-n[0],-n[1],i,r),this.draw(e,t,c),e.restore(),o.clear(),this},Cn.draw=function(t,n,i){const r=Ge[n.marktype];n.clip&&function(t,n){var i=n.clip;t.save(),e.isFunction(i)?(t.beginPath(),i(t),t.clip()):ie(t,n.group)}(t,n),r.draw.call(this,t,n,i),n.clip&&t.restore()},Cn.clear=function(t,e,n,i){const r=this._options,o=this.context();"pdf"===r.type||r.externalContext||o.clearRect(t,e,n,i),null!=this._bgcolor&&(o.fillStyle=this._bgcolor,o.fillRect(t,e,n,i))};const Pn=e.inherits(zn,sn);Pn.initialize=function(t,e,n){let i=this._svg;return i&&(i.removeEventListener(_n,this._hrefHandler),i.removeEventListener(yn,this._tooltipHandler),i.removeEventListener(mn,this._tooltipHandler)),this._svg=i=t&&tn(t,"svg"),i&&(i.addEventListener(_n,this._hrefHandler),i.addEventListener(yn,this._tooltipHandler),i.addEventListener(mn,this._tooltipHandler)),sn.prototype.initialize.call(this,t,e,n)},Pn.canvas=function(){return this._svg};const Sn=(t,e)=>n=>{let i=n.target.__data__;i=Array.isArray(i)?i[0]:i,n.vegaType=n.type,e.call(t._obj,n,i)};Pn.on=function(t,e){const n=this.eventName(t),i=this._handlers;if(this._handlerIndex(i[n],t,e)<0){const r={type:t,handler:e,listener:Sn(this,e)};(i[n]||(i[n]=[])).push(r),this._svg&&this._svg.addEventListener(n,r.listener)}return this},Pn.off=function(t,e){const n=this.eventName(t),i=this._handlers[n],r=this._handlerIndex(i,t,e);return r>=0&&(this._svg&&this._svg.removeEventListener(n,i[r].listener),i.splice(r,1)),this};const Ln=(t,e,n)=>({role:t,"aria-roledescription":e,"aria-label":n||void 0}),On=e.toSet(["axis-domain","axis-grid","axis-label","axis-tick","axis-title","legend-band","legend-entry","legend-gradient","legend-label","legend-title","legend-symbol","title"]),Nn={axis:{desc:"axis",caption:function(t){const e=t.datum,n=t.orient,i=e.title?Bn(t):null,r=t.context,o=r.scales[e.scale].value,a=r.dataflow.locale(),l=o.type;return("left"===n||"right"===n?"Y":"X")+"-axis"+(i?` titled '${i}'`:"")+` for a ${s.isDiscrete(l)?"discrete":l} scale with `+s.domainCaption(a,o,t)}},legend:{desc:"legend",caption:function(t){const n=t.datum,i=n.title?Bn(t):null,r=((n.type||"")+" legend").trim(),o=n.scales,a=Object.keys(o),l=t.context,u=l.scales[o[a[0]]].value,c=l.dataflow.locale();return h=r,(h.length?h[0].toUpperCase()+h.slice(1):h)+(i?` titled '${i}'`:"")+" for "+function(t){return(t=t.map(t=>t+("fill"===t||"stroke"===t?" color":""))).length<2?t[0]:t.slice(0,-1).join(", ")+" and "+e.peek(t)}(a)+" with "+s.domainCaption(c,u,t);var h}},"title-text":{desc:"title",caption:t=>`Title text '${In(t)}'`},"title-subtitle":{desc:"subtitle",caption:t=>`Subtitle text '${In(t)}'`}},qn={ariaRole:"role",ariaRoleDescription:"aria-roledescription",description:"aria-label"};function Dn(t,e){const n=!1===e.aria;if(t("aria-hidden",n||void 0),n||null==e.description)for(const e in qn)t(qn[e],void 0);else{const n=e.mark.marktype;t("aria-label",e.description),t("role",e.ariaRole||("group"===n?"graphics-object":"graphics-symbol")),t("aria-roledescription",e.ariaRoleDescription||n+" mark")}}function En(t){return!1===t.aria?{"aria-hidden":!0}:On[t.role]?null:Nn[t.role]?function(t,e){try{const n=t.items[0],i=e.caption||(()=>"");return Ln(e.role||"graphics-symbol",e.desc,n.description||i(n))}catch(t){return null}}(t,Nn[t.role]):function(t){const e=t.marktype,n="group"===e||"text"===e||t.items.some(t=>null!=t.description&&!1!==t.aria);return Ln(n?"graphics-object":"graphics-symbol",e+" mark container",t.description)}(t)}function In(t){return e.array(t.text).join(" ")}function Bn(t){try{return e.array(e.peek(t.items).items[0].text).join(" ")}catch(t){return null}}const Vn=t=>(t+"").replace(/&/g,"&amp;").replace(/"/g,"&quot;");function Hn(t,e,n){var i,r,o="<"+t;if(e)for(i in e)null!=(r=e[i])&&(o+=" "+i+'="'+Vn(r)+'"');return n&&(o+=" "+n),o+">"}function jn(t){return"</"+t+">"}var Gn={version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"};const Wn={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",blend:"mix-blend-mode"},Un=[".vega-svg-root * { fill: none; }",".vega-svg-root tspan { fill: inherit; }",".vega-svg-root path { stroke-miterlimit: 10; }"].join(" "),Xn=Gn.xmlns;function Fn(t){un.call(this,t),this._dirtyID=0,this._dirty=[],this._svg=null,this._root=null,this._defs=null}var Yn=e.inherits(Fn,un),Jn=un.prototype;function $n(t,e,n){var i,r,o;if("radial"===e.gradient){var s=en(t,n++,"pattern",Xn);s.setAttribute("id","p_"+e.id),s.setAttribute("viewBox","0,0,1,1"),s.setAttribute("width","100%"),s.setAttribute("height","100%"),s.setAttribute("preserveAspectRatio","xMidYMid slice"),(s=en(s,0,"rect",Xn)).setAttribute("width","1"),s.setAttribute("height","1"),s.setAttribute("style","fill: url("+si()+"#"+e.id+");"),(t=en(t,n++,"radialGradient",Xn)).setAttribute("id",e.id),t.setAttribute("fx",e.x1),t.setAttribute("fy",e.y1),t.setAttribute("fr",e.r1),t.setAttribute("cx",e.x2),t.setAttribute("cy",e.y2),t.setAttribute("r",e.r2)}else(t=en(t,n++,"linearGradient",Xn)).setAttribute("id",e.id),t.setAttribute("x1",e.x1),t.setAttribute("x2",e.x2),t.setAttribute("y1",e.y1),t.setAttribute("y2",e.y2);for(i=0,r=e.stops.length;i<r;++i)(o=en(t,i,"stop",Xn)).setAttribute("offset",e.stops[i].offset),o.setAttribute("stop-color",e.stops[i].color);return nn(t,i),n}function Qn(t,e,n){var i;return(t=en(t,n,"clipPath",Xn)).setAttribute("id",e.id),e.path?(i=en(t,0,"path",Xn)).setAttribute("d",e.path):((i=en(t,0,"rect",Xn)).setAttribute("x",0),i.setAttribute("y",0),i.setAttribute("width",e.width),i.setAttribute("height",e.height)),nn(t,1),n+1}function Zn(t,e){for(;t&&t.dirty!==e;t=t.mark.group){if(t.dirty=e,!t.mark||t.mark.dirty===e)return;t.mark.dirty=e}}function Kn(t,e,n,i,r){var o,s=t._svg;if(!s&&(s=Ke(o=e.ownerDocument,i,Xn),t._svg=s,t.mark&&(s.__data__=t,s.__values__={fill:"default"},"g"===i))){var a=Ke(o,"path",Xn);s.appendChild(a),a.__data__=t;var l=Ke(o,"g",Xn);s.appendChild(l),l.__data__=t;var u=Ke(o,"path",Xn);s.appendChild(u),u.__data__=t,u.__values__={fill:"default"}}return(s.ownerSVGElement!==r||function(t,e){return t.parentNode&&t.parentNode.childNodes.length>1&&t.previousSibling!=e}(s,n))&&e.insertBefore(s,n?n.nextSibling:e.firstChild),s}Yn.initialize=function(t,e,n,i){if(this._defs={gradient:{},clipping:{}},t){this._svg=en(t,0,"svg",Xn),this._svg.setAttribute("class","marks"),nn(t,1),this._defs.el=en(this._svg,0,"defs",Xn);en(this._defs.el,0,"style").textContent=Un,this._root=en(this._svg,1,"g",Xn),this._root.setAttribute("class","vega-svg-root"),nn(this._svg,2)}return this.background(this._bgcolor),Jn.initialize.call(this,t,e,n,i)},Yn.background=function(t){return arguments.length&&this._svg&&this._svg.style.setProperty("background-color",t),Jn.background.apply(this,arguments)},Yn.resize=function(t,e,n,i){return Jn.resize.call(this,t,e,n,i),this._svg&&(this._svg.setAttribute("width",this._width*this._scale),this._svg.setAttribute("height",this._height*this._scale),this._svg.setAttribute("viewBox","0 0 "+this._width+" "+this._height),this._root.setAttribute("transform","translate("+this._origin+")")),this._dirty=[],this},Yn.canvas=function(){return this._svg},Yn.svg=function(){if(!this._svg)return null;var t={class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:"0 0 "+this._width+" "+this._height};for(var e in Gn)t[e]=Gn[e];var n=this._bgcolor?Hn("rect",{width:this._width,height:this._height,style:"fill: "+this._bgcolor+";"})+jn("rect"):"";return Hn("svg",t)+this._defs.el.outerHTML+n+this._root.outerHTML+jn("svg")},Yn._render=function(t){return this._dirtyCheck()&&(this._dirtyAll&&this._resetDefs(),this.draw(this._root,t),nn(this._root,1)),this.updateDefs(),this._dirty=[],++this._dirtyID,this},Yn.updateDefs=function(){var t,e=this._defs,n=e.el,i=1;for(t in e.gradient)i=$n(n,e.gradient[t],i);for(t in e.clipping)i=Qn(n,e.clipping[t],i);nn(n,i)},Yn._resetDefs=function(){var t=this._defs;t.gradient={},t.clipping={}},Yn.dirty=function(t){t.dirty!==this._dirtyID&&(t.dirty=this._dirtyID,this._dirty.push(t))},Yn.isDirty=function(t){return this._dirtyAll||!t._svg||t.dirty===this._dirtyID},Yn._dirtyCheck=function(){this._dirtyAll=!0;var t=this._dirty;if(!t.length||!this._dirtyID)return!0;var e,n,i,r,o,s,a,l=++this._dirtyID;for(o=0,s=t.length;o<s;++o)(n=(e=t[o]).mark).marktype!==i&&(i=n.marktype,r=Ge[i]),n.zdirty&&n.dirty!==l&&(this._dirtyAll=!1,Zn(e,l),n.items.forEach((function(t){t.dirty=l}))),n.zdirty||(e.exit?(r.nested&&n.items.length?(a=n.items[0])._svg&&this._update(r,a._svg,a):e._svg&&(a=e._svg.parentNode)&&a.removeChild(e._svg),e._svg=null):(e=r.nested?n.items[0]:e)._update!==l&&(e._svg&&e._svg.ownerSVGElement?this._update(r,e._svg,e):(this._dirtyAll=!1,Zn(e,l)),e._update=l));return!this._dirtyAll},Yn.draw=function(t,e,n){if(!this.isDirty(e))return e._svg;var i,r=this,o=this._svg,s=Ge[e.marktype],a=!1===e.interactive?"none":null,l="g"===s.tag,u=null,c=0;(i=Kn(e,t,n,"g",o)).setAttribute("class",rn(e));const h=En(e);for(const t in h)oi(i,t,h[t]);function f(t){var e=r.isDirty(t),n=Kn(t,i,u,s.tag,o);e&&(r._update(s,n,t),l&&function(t,e,n){e=e.lastChild.previousSibling;var i,r=0;Ht(n,(function(n){i=t.draw(e,n,i),++r})),nn(e,1+r)}(r,n,t)),u=n,++c}return l||i.style.setProperty("pointer-events",a),oi(i,"clip-path",e.clip?nt(r,e,e.group):null),s.nested?e.items.length&&f(e.items[0]):Ht(e,f),nn(i,c),i};var ti=null,ei=null,ni={group:function(t,e,n){var i,r;ti=i=e.childNodes[2],ei=i.__values__,t.foreground(ri,n,this),ei=e.__values__,ti=e.childNodes[1],t.content(ri,n,this),ti=r=e.childNodes[0],t.background(ri,n,this);var o=!1===n.mark.interactive?"none":null;if(o!==ei.events&&(i.style.setProperty("pointer-events",o),r.style.setProperty("pointer-events",o),ei.events=o),n.strokeForeground&&n.stroke){const t=n.fill;i.style.removeProperty("display"),this.style(r,n),r.style.removeProperty("stroke"),t&&(n.fill=null),ei=i.__values__,this.style(i,n),t&&(n.fill=t),ti=null}else i.style.setProperty("display","none")},image:function(t,e,n){!1===n.smooth?(ii(e,"image-rendering","optimizeSpeed"),ii(e,"image-rendering","pixelated")):ii(e,"image-rendering",null)},text:function(t,n,i){var r,o,s,a,l=Ne(i);e.isArray(l)?(r=(o=l.map(t=>qe(i,t))).join("\n"))!==ei.text&&(nn(n,0),s=n.ownerDocument,a=Oe(i),o.forEach((t,e)=>{const r=Ke(s,"tspan",Xn);r.__data__=i,r.textContent=t,e&&(r.setAttribute("x",0),r.setAttribute("dy",a)),n.appendChild(r)}),ei.text=r):(o=qe(i,l))!==ei.text&&(n.textContent=o,ei.text=o),ii(n,"font-family",De(i)),ii(n,"font-size",Le(i)+"px"),ii(n,"font-style",i.fontStyle),ii(n,"font-variant",i.fontVariant),ii(n,"font-weight",i.fontWeight)}};function ii(t,e,n){n!==ei[e]&&(null==n?t.style.removeProperty(e):t.style.setProperty(e,n+""),ei[e]=n)}function ri(t,e,n){e!==ei[t]&&(n?function(t,e,n,i){null!=n?t.setAttributeNS(i,e,n):t.removeAttributeNS(i,e)}(ti,t,e,n):oi(ti,t,e),ei[t]=e)}function oi(t,e,n){null!=n?t.setAttribute(e,n):t.removeAttribute(e)}function si(){var t;return"undefined"==typeof window?"":(t=window.location).hash?t.href.slice(0,-t.hash.length):t.href}function ai(t){un.call(this,t),this._text={head:"",bg:"",root:"",foot:"",defs:"",body:""},this._defs={gradient:{},clipping:{}}}Yn._update=function(t,e,n){ti=e,ei=e.__values__,Dn(ri,n),t.attr(ri,n,this);var i=ni[t.type];i&&i.call(this,t,e,n),ti&&this.style(ti,n)},Yn.style=function(t,e){if(null!=e)for(const n in Wn){let i="font"===n?De(e):e[n];if(i===ei[n])continue;const r=Wn[n];null==i?t.style.removeProperty(r):(l(i)&&(i=u(i,this._defs.gradient,si())),t.style.setProperty(r,i+"")),ei[n]=i}};var li,ui=e.inherits(ai,un),ci=un.prototype;function hi(t,e,n,i){li[i||t]=e}function fi(t,e,n,i){if(null==t)return"";let r="";"bgrect"===n&&!1===e.interactive&&(r+="pointer-events: none; "),"bgfore"===n&&(!1===e.interactive&&(r+="pointer-events: none; "),r+="display: none; "),"image"===n&&!1===t.smooth&&(r+="image-rendering: optimizeSpeed; image-rendering: pixelated; "),"text"===n&&(r+="font-family: "+De(t)+"; ",r+="font-size: "+Le(t)+"px; ",t.fontStyle&&(r+="font-style: "+t.fontStyle+"; "),t.fontVariant&&(r+="font-variant: "+t.fontVariant+"; "),t.fontWeight&&(r+="font-weight: "+t.fontWeight+"; "));for(const e in Wn){let n=t[e];const o=Wn[e];("transparent"!==n||"fill"!==o&&"stroke"!==o)&&null!=n&&(l(n)&&(n=u(n,i.gradient,"")),r+=o+": "+n+"; ")}return r?'style="'+r.trim()+'"':null}function di(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}ui.resize=function(t,e,n,i){ci.resize.call(this,t,e,n,i);var r=this._origin,o=this._text,s={class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:"0 0 "+this._width+" "+this._height};for(var a in Gn)s[a]=Gn[a];o.head=Hn("svg",s);var l=this._bgcolor;return"transparent"!==l&&"none"!==l||(l=null),o.bg=l?Hn("rect",{width:this._width,height:this._height,style:"fill: "+l+";"})+jn("rect"):"",o.root=Hn("g",{class:"vega-svg-root",transform:"translate("+r+")"}),o.foot=jn("g")+jn("svg"),this},ui.background=function(){var t=ci.background.apply(this,arguments);return arguments.length&&this._text.head&&this.resize(this._width,this._height,this._origin,this._scale),t},ui.svg=function(){var t=this._text;return t.head+t.defs+t.bg+t.root+t.body+t.foot},ui._render=function(t){return this._text.body=this.mark(t),this._text.defs=this.buildDefs(),this},ui.buildDefs=function(){var t,e,n,i,r,o=this._defs,s=Hn("style")+Un+jn("style");for(e in o.gradient){for(r=(n=o.gradient[e]).stops,"radial"===n.gradient?(s+=Hn(i="pattern",{id:"p_"+e,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),s+=Hn("rect",{width:"1",height:"1",style:"fill: url(#"+e+");"})+jn("rect"),s+=jn(i),s+=Hn(i="radialGradient",{id:e,fx:n.x1,fy:n.y1,fr:n.r1,cx:n.x2,cy:n.y2,r:n.r2})):s+=Hn(i="linearGradient",{id:e,x1:n.x1,x2:n.x2,y1:n.y1,y2:n.y2}),t=0;t<r.length;++t)s+=Hn("stop",{offset:r[t].offset,"stop-color":r[t].color})+jn("stop");s+=jn(i)}for(e in o.clipping)n=o.clipping[e],s+=Hn("clipPath",{id:e}),n.path?s+=Hn("path",{d:n.path})+jn("path"):s+=Hn("rect",{x:0,y:0,width:n.width,height:n.height})+jn("rect"),s+=jn("clipPath");return Hn("defs")+s+jn("defs")},ui.attributes=function(t,e){return li={},Array.isArray(t)?t.forEach(t=>t(hi,e,this)):t(hi,e,this),li},ui.href=function(t){var e,n=this,i=t.href;if(i){if(e=n._hrefs&&n._hrefs[i])return e;n.sanitizeURL(i).then(t=>{t["xlink:href"]=t.href,t.href=null,(n._hrefs||(n._hrefs={}))[i]=t})}return null},ui.mark=function(t){var n,i=this,r=Ge[t.marktype],o=r.tag,s=this._defs,a="";function l(l){var u=i.href(l);if(u&&(a+=Hn("a",u)),n="g"!==o?fi(l,t,o,s):null,a+=Hn(o,i.attributes([Dn,r.attr],l),n),"text"===o){const t=Ne(l);if(e.isArray(t)){const e={x:0,dy:Oe(l)};for(let n=0;n<t.length;++n)a+=Hn("tspan",n?e:null)+di(qe(l,t[n]))+jn("tspan")}else a+=di(qe(l,t))}else if("g"===o){const e=l.strokeForeground,n=l.fill,o=l.stroke;e&&o&&(l.stroke=null),a+=Hn("path",i.attributes(r.background,l),fi(l,t,"bgrect",s))+jn("path"),a+=Hn("g",i.attributes(r.content,l))+i.markGroup(l)+jn("g"),e&&o?(n&&(l.fill=null),l.stroke=o,a+=Hn("path",i.attributes(r.foreground,l),fi(l,t,"bgrect",s))+jn("path"),n&&(l.fill=n)):a+=Hn("path",i.attributes(r.foreground,l),fi({},t,"bgfore",s))+jn("path")}a+=jn(o),u&&(a+=jn("a"))}return"g"!==o&&!1===t.interactive&&(n='style="pointer-events: none;"'),a+=Hn("g",Object.assign({class:rn(t),"clip-path":t.clip?nt(i,t,t.group):null},En(t)),n),r.nested?t.items&&t.items.length&&l(t.items[0]):Ht(t,l),a+jn("g")},ui.markGroup=function(t){var e=this,n="";return Ht(t,(function(t){n+=e.mark(t)})),n};var gi={Canvas:"canvas",PNG:"png",SVG:"svg",None:"none"},pi={};function vi(t,e,n,i){if(function(t,e,n){return t.bounds&&e.intersects(t.bounds)&&("group"===t.marktype||!1!==t.interactive&&(!n||n(t)))}(t,e,n)){const r=t.items,o=t.marktype,s=r.length;let a=0;if("group"===o)for(;a<s;++a)yi(r[a],e,n,i);else for(const t=Ge[o].isect;a<s;++a){let n=r[a];mi(n,e,t)&&i.push(n)}}return i}function yi(t,e,n,i){n&&n(t.mark)&&mi(t,e,Ge.group.isect)&&i.push(t);const r=t.items,o=r&&r.length;if(o){const s=t.x||0,a=t.y||0;e.translate(-s,-a);for(let t=0;t<o;++t)vi(r[t],e,n,i);e.translate(s,a)}return i}function mi(t,e,n){const i=t.bounds;return e.encloses(i)||e.intersects(i)&&n(t,e)}pi.canvas=pi.png={renderer:Mn,headless:Mn,handler:xn},pi.svg={renderer:Fn,headless:ai,handler:zn},pi.none={};var _i=new it;function xi(t,n,i){return t===n||("path"===i?bi(t,n):t instanceof Date&&n instanceof Date?+t==+n:e.isNumber(t)&&e.isNumber(n)?Math.abs(t-n)<=1e-9:t&&n&&(e.isObject(t)||e.isObject(n))?null!=t&&null!=n&&function(t,e){var n,i,r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length)return!1;for(r.sort(),o.sort(),i=r.length-1;i>=0;i--)if(r[i]!=o[i])return!1;for(i=r.length-1;i>=0;i--)if(n=r[i],!xi(t[n],e[n],n))return!1;return typeof t==typeof e}(t,n):t==n)}function bi(t,e){return xi(p(t),p(e))}t.Bounds=it,t.CanvasHandler=xn,t.CanvasRenderer=Mn,t.Gradient=function(t,e){var n,i=[];return n={gradient:"linear",x1:t?t[0]:0,y1:t?t[1]:0,x2:e?e[0]:1,y2:e?e[1]:0,stops:i,stop:function(t,e){return i.push({offset:t,color:e}),n}}},t.GroupItem=st,t.Handler=sn,t.Item=ot,t.Marks=Ge,t.RenderType=gi,t.Renderer=un,t.ResourceLoader=at,t.SVGHandler=zn,t.SVGRenderer=Fn,t.SVGStringRenderer=ai,t.Scenegraph=$e,t.boundClip=function(t){var n=t.clip;if(e.isFunction(n))n(vt(_i.clear()));else{if(!n)return;_i.set(0,0,t.group.width,t.group.height)}t.bounds.intersect(_i)},t.boundContext=vt,t.boundItem=We,t.boundMark=Xe,t.boundStroke=ht,t.closeTag=jn,t.domChild=en,t.domClear=nn,t.domCreate=Ke,t.domFind=tn,t.font=Ee,t.fontFamily=De,t.fontSize=Le,t.intersect=function(t,n,i){const r=[],o=(new it).union(n),s=t.marktype;return s?vi(t,o,i,r):"group"===s?yi(t,o,i,r):e.error("Intersect scene must be mark node or group item.")},t.intersectBoxLine=St,t.intersectPath=Ct,t.intersectPoint=Rt,t.intersectRule=Pt,t.lineHeight=Oe,t.multiLineOffset=function(t){const n=Ne(t);return(e.isArray(n)?n.length-1:0)*Oe(t)},t.openTag=Hn,t.pathCurves=f,t.pathEqual=bi,t.pathParse=p,t.pathRectangle=B,t.pathRender=M,t.pathSymbols=P,t.pathTrail=V,t.point=on,t.renderModule=function(t,e){return t=String(t||"").toLowerCase(),arguments.length>1?(pi[t]=e,this):pi[t]},t.resetSVGClipId=et,t.resetSVGDefIds=function(){et(),a=0},t.sceneEqual=xi,t.sceneFromJSON=Je,t.scenePickVisit=jt,t.sceneToJSON=Ye,t.sceneVisit=Ht,t.sceneZOrder=Vt,t.textMetrics=Me,Object.defineProperty(t,"__esModule",{value:!0})}));
{
"name": "vega-scenegraph",
"version": "4.8.1",
"version": "4.8.2",
"description": "Vega scenegraph and renderers.",

@@ -29,3 +29,3 @@ "license": "BSD-3-Clause",

},
"gitHead": "c9369d7885660a89058ff3efe769abb5da444677"
"gitHead": "8a45e2a1ef1716b51b076ca3c868405528ab41a7"
}
import Handler from './Handler';
import Marks from './marks/index';
import {Events, HrefEvent, TooltipHideEvent, TooltipShowEvent} from './util/events';
import {
ClickEvent, DragEnterEvent, DragLeaveEvent, DragOverEvent, Events,
HrefEvent, MouseDownEvent, MouseMoveEvent, MouseOutEvent, MouseOverEvent,
MouseWheelEvent, TooltipHideEvent, TooltipShowEvent,
TouchEndEvent, TouchMoveEvent, TouchStartEvent
} from './util/events';
import point from './util/point';

@@ -20,7 +25,24 @@ import {domFind} from './util/dom';

this._canvas = el && domFind(el, 'canvas');
// add minimal events required for proper state management
[ClickEvent, MouseDownEvent, MouseMoveEvent, MouseOutEvent, DragLeaveEvent]
.forEach(type => eventListenerCheck(this, type));
return Handler.prototype.initialize.call(this, el, origin, obj);
};
// lazily add a listener to the canvas as needed
const eventBundle = type => (
type === TouchStartEvent ||
type === TouchMoveEvent ||
type === TouchEndEvent
)
? [TouchStartEvent, TouchMoveEvent, TouchEndEvent]
: [type];
// lazily add listeners to the canvas as needed
function eventListenerCheck(handler, type) {
eventBundle(type).forEach(_ => addEventListener(handler, _));
}
function addEventListener(handler, type) {
const canvas = handler.canvas();

@@ -80,14 +102,14 @@ if (canvas && !handler._events[type]) {

prototype.DOMMouseScroll = function(evt) {
this.fire('mousewheel', evt);
this.fire(MouseWheelEvent, evt);
};
prototype.mousemove = move('mousemove', 'mouseover', 'mouseout');
prototype.dragover = move('dragover', 'dragenter', 'dragleave');
prototype.mousemove = move(MouseMoveEvent, MouseOverEvent, MouseOutEvent);
prototype.dragover = move(DragOverEvent, DragEnterEvent, DragLeaveEvent);
prototype.mouseout = inactive('mouseout');
prototype.dragleave = inactive('dragleave');
prototype.mouseout = inactive(MouseOutEvent);
prototype.dragleave = inactive(DragLeaveEvent);
prototype.mousedown = function(evt) {
this._down = this._active;
this.fire('mousedown', evt);
this.fire(MouseDownEvent, evt);
};

@@ -97,3 +119,3 @@

if (this._down === this._active) {
this.fire('click', evt);
this.fire(ClickEvent, evt);
this._down = null;

@@ -111,11 +133,11 @@ }

this.fire('touchstart', evt, true);
this.fire(TouchStartEvent, evt, true);
};
prototype.touchmove = function(evt) {
this.fire('touchmove', evt, true);
this.fire(TouchMoveEvent, evt, true);
};
prototype.touchend = function(evt) {
this.fire('touchend', evt, true);
this.fire(TouchEndEvent, evt, true);
this._touch = null;

@@ -122,0 +144,0 @@ };

@@ -1,26 +0,45 @@

export var Events = [
'keydown',
'keypress',
'keyup',
'dragenter',
'dragleave',
'dragover',
'mousedown',
'mouseup',
'mousemove',
'mouseout',
'mouseover',
'click',
'dblclick',
'wheel',
'mousewheel',
'touchstart',
'touchmove',
'touchend'
export const KeyDownEvent = 'keydown';
export const KeyPressEvent = 'keypress';
export const KeyUpEvent = 'keyup';
export const DragEnterEvent = 'dragenter';
export const DragLeaveEvent = 'dragleave';
export const DragOverEvent = 'dragover';
export const MouseDownEvent = 'mousedown';
export const MouseUpEvent = 'mouseup';
export const MouseMoveEvent = 'mousemove';
export const MouseOutEvent = 'mouseout';
export const MouseOverEvent = 'mouseover';
export const ClickEvent = 'click';
export const DoubleClickEvent = 'dblclick';
export const WheelEvent = 'wheel';
export const MouseWheelEvent = 'mousewheel';
export const TouchStartEvent = 'touchstart';
export const TouchMoveEvent = 'touchmove';
export const TouchEndEvent = 'touchend';
export const Events = [
KeyDownEvent,
KeyPressEvent,
KeyUpEvent,
DragEnterEvent,
DragLeaveEvent,
DragOverEvent,
MouseDownEvent,
MouseUpEvent,
MouseMoveEvent,
MouseOutEvent,
MouseOverEvent,
ClickEvent,
DoubleClickEvent,
WheelEvent,
MouseWheelEvent,
TouchStartEvent,
TouchMoveEvent,
TouchEndEvent
];
export var TooltipShowEvent = 'mousemove';
export const TooltipShowEvent = MouseMoveEvent;
export var TooltipHideEvent = 'mouseout';
export const TooltipHideEvent = MouseOutEvent;
export var HrefEvent = 'click';
export const HrefEvent = ClickEvent;

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc