g2.min.js 919 KB

12345678910
  1. !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).G2={})}(this,function(u){"use strict";var h="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function p(t,e,n,r,i){!function t(e,n,r,i,a){for(;r<i;){600<i-r&&(o=i-r+1,u=n-r+1,l=Math.log(o),s=.5*Math.exp(2*l/3),l=.5*Math.sqrt(l*s*(o-s)/o)*(u-o/2<0?-1:1),c=Math.max(r,Math.floor(n-u*s/o+l)),u=Math.min(i,Math.floor(n+(o-u)*s/o+l)),t(e,n,c,u,a));var o,s,l,c,u,h=e[n],f=r,d=i;for(m(e,r,n),0<a(e[i],h)&&m(e,r,i);f<d;){for(m(e,f,d),f++,d--;a(e[f],h)<0;)f++;for(;0<a(e[d],h);)d--}0===a(e[r],h)?m(e,r,d):m(e,++d,i),d<=n&&(r=d+1),n<=d&&(i=d-1)}}(t,e,n||0,r||t.length-1,i||j)}function m(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function j(t,e){return t<e?-1:e<t?1:0}function I(t,e){B(t,0,t.children.length,e,t)}function B(t,e,n,r,i){(i=i||q(null)).minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var a=e;a<n;a++){var o=t.children[a];D(i,t.leaf?r(o):o)}return i}function D(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function F(t,e){return t.minX-e.minX}function G(t,e){return t.minY-e.minY}function W(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function Y(t){return t.maxX-t.minX+(t.maxY-t.minY)}function H(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function V(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function q(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function $(t,e,n,r,i){for(var a,o=[e,n];o.length;)(n=o.pop())-(e=o.pop())<=r||(p(t,a=e+Math.ceil((n-e)/r/2)*r,e,n,i),o.push(e,a,a,n))}(e=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}).prototype.all=function(){return this._all(this.data,[])},e.prototype.search=function(t){var e=this.data,n=[];if(V(t,e))for(var r=this.toBBox,i=[];e;){for(var a=0;a<e.children.length;a++){var o=e.children[a],s=e.leaf?r(o):o;V(t,s)&&(e.leaf?n.push(o):H(t,s)?this._all(o,n):i.push(o))}e=i.pop()}return n},e.prototype.collides=function(t){var e=this.data;if(V(t,e))for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],a=e.leaf?this.toBBox(i):i;if(V(t,a)){if(e.leaf||H(t,a))return!0;n.push(i)}}e=n.pop()}return!1},e.prototype.load=function(t){if(t&&t.length)if(t.length<this._minEntries)for(var e=0;e<t.length;e++)this.insert(t[e]);else{var n,r=this._build(t.slice(),0,t.length-1,0);this.data.children.length?this.data.height===r.height?this._splitRoot(this.data,r):(this.data.height<r.height&&(n=this.data,this.data=r,r=n),this._insert(r,this.data.height-r.height-1,!0)):this.data=r}return this},e.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},e.prototype.clear=function(){return this.data=q([]),this},e.prototype.remove=function(t,e){if(t)for(var n,r,i,a=this.data,o=this.toBBox(t),s=[],l=[];a||s.length;){if(a||(a=s.pop(),r=s[s.length-1],n=l.pop(),i=!0),a.leaf){var c=function(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return-1}(t,a.children,e);if(-1!==c)return a.children.splice(c,1),s.push(a),this._condense(s),this}i||a.leaf||!H(a,o)?r?(n++,a=r.children[n],i=!1):a=null:(s.push(a),l.push(n),a=(r=a).children[n=0])}return this},e.prototype.toBBox=function(t){return t},e.prototype.compareMinX=function(t,e){return t.minX-e.minX},e.prototype.compareMinY=function(t,e){return t.minY-e.minY},e.prototype.toJSON=function(){return this.data},e.prototype.fromJSON=function(t){return this.data=t,this},e.prototype._all=function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},e.prototype._build=function(t,e,n,r){var i,a=n-e+1,o=this._maxEntries;if(a<=o)I(i=q(t.slice(e,n+1)),this.toBBox);else{r||(r=Math.ceil(Math.log(a)/Math.log(o)),o=Math.ceil(a/Math.pow(o,r-1))),(i=q([])).leaf=!1,i.height=r;var s=Math.ceil(a/o),l=s*Math.ceil(Math.sqrt(o));$(t,e,n,l,this.compareMinX);for(var c=e;c<=n;c+=l){var u=Math.min(c+l-1,n);$(t,c,u,s,this.compareMinY);for(var h=c;h<=u;h+=s){var f=Math.min(h+s-1,u);i.children.push(this._build(t,h,f,r-1))}}I(i,this.toBBox)}return i},e.prototype._chooseSubtree=function(t,e,n,r){for(;;){if(r.push(e),e.leaf||r.length-1===n)break;for(var i=1/0,a=1/0,o=void 0,s=0;s<e.children.length;s++){var l=e.children[s],c=W(l),u=(h=t,u=l,(Math.max(u.maxX,h.maxX)-Math.min(u.minX,h.minX))*(Math.max(u.maxY,h.maxY)-Math.min(u.minY,h.minY))-c);u<a?(a=u,i=c<i?c:i,o=l):u===a&&c<i&&(i=c,o=l)}e=o||e.children[0]}var h,u;return e},e.prototype._insert=function(t,e,n){var n=n?t:this.toBBox(t),r=[],i=this._chooseSubtree(n,this.data,e,r);for(i.children.push(t),D(i,n);0<=e&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},e.prototype._split=function(t,e){var n=t[e],r=n.children.length,i=this._minEntries,i=(this._chooseSplitAxis(n,i,r),this._chooseSplitIndex(n,i,r)),r=q(n.children.splice(i,n.children.length-i));r.height=n.height,r.leaf=n.leaf,I(n,this.toBBox),I(r,this.toBBox),e?t[e-1].children.push(r):this._splitRoot(n,r)},e.prototype._splitRoot=function(t,e){this.data=q([t,e]),this.data.height=t.height+1,this.data.leaf=!1,I(this.data,this.toBBox)},e.prototype._chooseSplitIndex=function(t,e,n){for(var r,i,a,o,s=1/0,l=1/0,c=e;c<=n-e;c++){var u=B(t,0,c,this.toBBox),h=B(t,c,n,this.toBBox),f=(i=u,f=h,d=o=a=void 0,a=Math.max(i.minX,f.minX),o=Math.max(i.minY,f.minY),d=Math.min(i.maxX,f.maxX),i=Math.min(i.maxY,f.maxY),Math.max(0,d-a)*Math.max(0,i-o)),d=W(u)+W(h);f<s?(s=f,r=c,l=d<l?d:l):f===s&&d<l&&(l=d,r=c)}return r||n-e},e.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:F,i=t.leaf?this.compareMinY:G;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},e.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var i=this.toBBox,a=B(t,0,e,i),o=B(t,n-e,n,i),s=Y(a)+Y(o),l=e;l<n-e;l++){var c=t.children[l];D(a,t.leaf?i(c):c),s+=Y(a)}for(var u=n-e-1;e<=u;u--){var h=t.children[u];D(o,t.leaf?i(h):h),s+=Y(o)}return s},e.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;0<=r;r--)D(e[r],t)},e.prototype._condense=function(t){for(var e=t.length-1,n=void 0;0<=e;e--)0===t[e].children.length?0<e?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():I(t[e],this.toBBox)};var U=e,X=1e-6,K="undefined"!=typeof Float32Array?Float32Array:Array;function Z(){var t=new K(9);return K!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var Q=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],e=e[8],h=n[0],f=n[1],d=n[2],p=n[3],g=n[4],m=n[5],v=n[6],y=n[7],n=n[8];return t[0]=h*r+f*o+d*c,t[1]=h*i+f*s+d*u,t[2]=h*a+f*l+d*e,t[3]=p*r+g*o+m*c,t[4]=p*i+g*s+m*u,t[5]=p*a+g*l+m*e,t[6]=v*r+y*o+n*c,t[7]=v*i+y*s+n*u,t[8]=v*a+y*l+n*e,t};function J(){var t=new K(16);return K!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function tt(t){var e=new K(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function et(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function ot(t,e,n,r,i,a,o,s,l,c,u,h,f,d,p,g,m){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=l,t[8]=c,t[9]=u,t[10]=h,t[11]=f,t[12]=d,t[13]=p,t[14]=g,t[15]=m,t}function st(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function lt(t,e){var n,r,i,a,o,s;return t===e?(n=e[1],r=e[2],i=e[3],a=e[6],o=e[7],s=e[11],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s):(t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15]),t}function ct(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],h=e[9],f=e[10],d=e[11],p=e[12],g=e[13],m=e[14],e=e[15],v=n*s-r*o,y=n*l-i*o,b=n*c-a*o,x=r*l-i*s,w=r*c-a*s,M=i*c-a*l,k=u*g-h*p,E=u*m-f*p,O=u*e-d*p,S=h*m-f*g,_=h*e-d*g,A=f*e-d*m,T=v*A-y*_+b*S+x*O-w*E+M*k;return T?(t[0]=(s*A-l*_+c*S)*(T=1/T),t[1]=(i*_-r*A-a*S)*T,t[2]=(g*M-m*w+e*x)*T,t[3]=(f*w-h*M-d*x)*T,t[4]=(l*O-o*A-c*E)*T,t[5]=(n*A-i*O+a*E)*T,t[6]=(m*b-p*M-e*y)*T,t[7]=(u*M-f*b+d*y)*T,t[8]=(o*_-s*O+c*k)*T,t[9]=(r*O-n*_-a*k)*T,t[10]=(p*w-g*b+e*v)*T,t[11]=(h*b-u*w-d*v)*T,t[12]=(s*E-o*S-l*k)*T,t[13]=(n*S-r*E+i*k)*T,t[14]=(g*y-p*x-m*v)*T,t[15]=(u*x-h*y+f*v)*T,t):null}function ut(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],h=t[10],f=t[11],d=t[12],p=t[13],g=t[14],t=t[15];return(e*o-n*a)*(h*t-f*g)-(e*s-r*a)*(u*t-f*p)+(e*l-i*a)*(u*g-h*p)+(n*s-r*o)*(c*t-f*d)-(n*l-i*o)*(c*g-h*d)+(r*l-i*s)*(c*p-u*d)}function ht(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],h=e[8],f=e[9],d=e[10],p=e[11],g=e[12],m=e[13],v=e[14],e=e[15],y=n[0],b=n[1],x=n[2],w=n[3];return t[0]=y*r+b*s+x*h+w*g,t[1]=y*i+b*l+x*f+w*m,t[2]=y*a+b*c+x*d+w*v,t[3]=y*o+b*u+x*p+w*e,y=n[4],b=n[5],x=n[6],w=n[7],t[4]=y*r+b*s+x*h+w*g,t[5]=y*i+b*l+x*f+w*m,t[6]=y*a+b*c+x*d+w*v,t[7]=y*o+b*u+x*p+w*e,y=n[8],b=n[9],x=n[10],w=n[11],t[8]=y*r+b*s+x*h+w*g,t[9]=y*i+b*l+x*f+w*m,t[10]=y*a+b*c+x*d+w*v,t[11]=y*o+b*u+x*p+w*e,y=n[12],b=n[13],x=n[14],w=n[15],t[12]=y*r+b*s+x*h+w*g,t[13]=y*i+b*l+x*f+w*m,t[14]=y*a+b*c+x*d+w*v,t[15]=y*o+b*u+x*p+w*e,t}function ft(t,e,n){var r,i,a,o,s,l,c,u,h,f,d,p,g=n[0],m=n[1],n=n[2];return e===t?(t[12]=e[0]*g+e[4]*m+e[8]*n+e[12],t[13]=e[1]*g+e[5]*m+e[9]*n+e[13],t[14]=e[2]*g+e[6]*m+e[10]*n+e[14],t[15]=e[3]*g+e[7]*m+e[11]*n+e[15]):(r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],h=e[8],f=e[9],d=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=h,t[9]=f,t[10]=d,t[11]=p,t[12]=r*g+s*m+h*n+e[12],t[13]=i*g+l*m+f*n+e[13],t[14]=a*g+c*m+d*n+e[14],t[15]=o*g+u*m+p*n+e[15]),t}function dt(t,e,n){var r=n[0],i=n[1],n=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function pt(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[4],a=e[5],o=e[6],s=e[7],l=e[8],c=e[9],u=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=i*n+l*r,t[5]=a*n+c*r,t[6]=o*n+u*r,t[7]=s*n+h*r,t[8]=l*n-i*r,t[9]=c*n-a*r,t[10]=u*n-o*r,t[11]=h*n-s*r,t}function gt(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],l=e[8],c=e[9],u=e[10],h=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*n-l*r,t[1]=a*n-c*r,t[2]=o*n-u*r,t[3]=s*n-h*r,t[8]=i*r+l*n,t[9]=a*r+c*n,t[10]=o*r+u*n,t[11]=s*r+h*n,t}function mt(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function vt(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function yt(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=r+r,s=i+i,l=a+a,c=r*o,u=r*s,r=r*l,h=i*s,i=i*l,a=a*l,o=e*o,s=e*s,e=e*l;return t[0]=1-(h+a),t[1]=u+e,t[2]=r-s,t[3]=0,t[4]=u-e,t[5]=1-(c+a),t[6]=i+o,t[7]=0,t[8]=r+s,t[9]=i-o,t[10]=1-(c+h),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function bt(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function xt(t,e){var n=e[0],r=e[1],i=e[2],a=e[4],o=e[5],s=e[6],l=e[8],c=e[9],e=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(a,o,s),t[2]=Math.hypot(l,c,e),t}function wt(t,e){var n=new K(3),r=(xt(n,e),1/n[0]),i=1/n[1],n=1/n[2],a=e[0]*r,o=e[1]*i,s=e[2]*n,l=e[4]*r,c=e[5]*i,u=e[6]*n,r=e[8]*r,i=e[9]*i,e=e[10]*n,n=a+c+e,h=0;return 0<n?(h=2*Math.sqrt(1+n),t[3]=.25*h,t[0]=(u-i)/h,t[1]=(r-s)/h,t[2]=(o-l)/h):c<a&&e<a?(h=2*Math.sqrt(1+a-c-e),t[3]=(u-i)/h,t[0]=.25*h,t[1]=(o+l)/h,t[2]=(r+s)/h):e<c?(h=2*Math.sqrt(1+c-a-e),t[3]=(r-s)/h,t[0]=(o+l)/h,t[1]=.25*h,t[2]=(u+i)/h):(h=2*Math.sqrt(1+e-a-c),t[3]=(o-l)/h,t[0]=(r+s)/h,t[1]=(u+i)/h,t[2]=.25*h),t}function Mt(t,e,n,r,i){var a=e[0],o=e[1],s=e[2],e=e[3],l=a+a,c=o+o,u=s+s,h=a*l,f=a*c,a=a*u,d=o*c,o=o*u,s=s*u,l=e*l,c=e*c,e=e*u,u=r[0],p=r[1],r=r[2],g=i[0],m=i[1],i=i[2],v=(1-(d+s))*u,y=(f+e)*u,u=(a-c)*u,f=(f-e)*p,e=(1-(h+s))*p,s=(o+l)*p,p=(a+c)*r,a=(o-l)*r,c=(1-(h+d))*r;return t[0]=v,t[1]=y,t[2]=u,t[3]=0,t[4]=f,t[5]=e,t[6]=s,t[7]=0,t[8]=p,t[9]=a,t[10]=c,t[11]=0,t[12]=n[0]+g-(v*g+f*m+p*i),t[13]=n[1]+m-(y*g+e*m+a*i),t[14]=n[2]+i-(u*g+s*m+c*i),t[15]=1,t}function kt(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n+n,o=r+r,s=i+i,n=n*a,l=r*a,r=r*o,c=i*a,u=i*o,i=i*s,a=e*a,o=e*o,e=e*s;return t[0]=1-r-i,t[1]=l+e,t[2]=c-o,t[3]=0,t[4]=l-e,t[5]=1-n-i,t[6]=u+a,t[7]=0,t[8]=c+o,t[9]=u-a,t[10]=1-n-r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Et(t,e,n,r,i){e=1/Math.tan(e/2);return t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=(i+r)*(n=1/(r-i)),t[14]=2*i*r*n):(t[10]=-1,t[14]=-2*r),t}function Ot(t,e,n,r,i,a,o){var s=1/(e-n),l=1/(r-i),c=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=(o+a)*c,t[15]=1,t}var St=Ot;function _t(t,e,n,r){var i,a,o,s,l=e[0],c=e[1],e=e[2],u=r[0],h=r[1],r=r[2],f=n[0],d=n[1],n=n[2];return Math.abs(l-f)<X&&Math.abs(c-d)<X&&Math.abs(e-n)<X?st(t):(f=l-f,d=c-d,n=e-n,i=h*(n*=s=1/Math.hypot(f,d,n))-r*(d*=s),r=r*(f*=s)-u*n,u=u*d-h*f,(s=Math.hypot(i,r,u))?(i*=s=1/s,r*=s,u*=s):u=r=i=0,h=d*u-n*r,a=n*i-f*u,o=f*r-d*i,(s=Math.hypot(h,a,o))?(h*=s=1/s,a*=s,o*=s):o=a=h=0,t[0]=i,t[1]=h,t[2]=f,t[3]=0,t[4]=r,t[5]=a,t[6]=d,t[7]=0,t[8]=u,t[9]=o,t[10]=n,t[11]=0,t[12]=-(i*l+r*c+u*e),t[13]=-(h*l+a*c+o*e),t[14]=-(f*l+d*c+n*e),t[15]=1,t)}function At(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}var Tt=Object.freeze({__proto__:null,create:J,clone:tt,copy:et,fromValues:function(t,e,n,r,i,a,o,s,l,c,u,h,f,d,p,g){var m=new K(16);return m[0]=t,m[1]=e,m[2]=n,m[3]=r,m[4]=i,m[5]=a,m[6]=o,m[7]=s,m[8]=l,m[9]=c,m[10]=u,m[11]=h,m[12]=f,m[13]=d,m[14]=p,m[15]=g,m},set:ot,identity:st,transpose:lt,invert:ct,adjoint:function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],h=e[9],f=e[10],d=e[11],p=e[12],g=e[13],m=e[14],e=e[15];return t[0]=s*(f*e-d*m)-h*(l*e-c*m)+g*(l*d-c*f),t[1]=-(r*(f*e-d*m)-h*(i*e-a*m)+g*(i*d-a*f)),t[2]=r*(l*e-c*m)-s*(i*e-a*m)+g*(i*c-a*l),t[3]=-(r*(l*d-c*f)-s*(i*d-a*f)+h*(i*c-a*l)),t[4]=-(o*(f*e-d*m)-u*(l*e-c*m)+p*(l*d-c*f)),t[5]=n*(f*e-d*m)-u*(i*e-a*m)+p*(i*d-a*f),t[6]=-(n*(l*e-c*m)-o*(i*e-a*m)+p*(i*c-a*l)),t[7]=n*(l*d-c*f)-o*(i*d-a*f)+u*(i*c-a*l),t[8]=o*(h*e-d*g)-u*(s*e-c*g)+p*(s*d-c*h),t[9]=-(n*(h*e-d*g)-u*(r*e-a*g)+p*(r*d-a*h)),t[10]=n*(s*e-c*g)-o*(r*e-a*g)+p*(r*c-a*s),t[11]=-(n*(s*d-c*h)-o*(r*d-a*h)+u*(r*c-a*s)),t[12]=-(o*(h*m-f*g)-u*(s*m-l*g)+p*(s*f-l*h)),t[13]=n*(h*m-f*g)-u*(r*m-i*g)+p*(r*f-i*h),t[14]=-(n*(s*m-l*g)-o*(r*m-i*g)+p*(r*l-i*s)),t[15]=n*(s*f-l*h)-o*(r*f-i*h)+u*(r*l-i*s),t},determinant:ut,multiply:ht,translate:ft,scale:dt,rotate:function(t,e,n,r){var i,a,o,s,l,c,u,h,f,d,p,g,m,v,y,b,x,w,M,k,E=r[0],O=r[1],r=r[2],S=Math.hypot(E,O,r);return S<X?null:(E*=S=1/S,O*=S,r*=S,S=Math.sin(n),n=Math.cos(n),a=e[0],o=e[1],s=e[2],l=e[3],c=e[4],u=e[5],h=e[6],f=e[7],d=e[8],p=e[9],g=e[10],m=e[11],y=E*O*(i=1-n)-r*S,b=O*O*i+n,x=r*O*i+E*S,w=E*r*i+O*S,M=O*r*i-E*S,k=r*r*i+n,t[0]=a*(n=E*E*i+n)+c*(v=O*E*i+r*S)+d*(r=r*E*i-O*S),t[1]=o*n+u*v+p*r,t[2]=s*n+h*v+g*r,t[3]=l*n+f*v+m*r,t[4]=a*y+c*b+d*x,t[5]=o*y+u*b+p*x,t[6]=s*y+h*b+g*x,t[7]=l*y+f*b+m*x,t[8]=a*w+c*M+d*k,t[9]=o*w+u*M+p*k,t[10]=s*w+h*M+g*k,t[11]=l*w+f*M+m*k,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:pt,rotateY:gt,rotateZ:function(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],l=e[4],c=e[5],u=e[6],h=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*n+l*r,t[1]=a*n+c*r,t[2]=o*n+u*r,t[3]=s*n+h*r,t[4]=l*n-i*r,t[5]=c*n-a*r,t[6]=u*n-o*r,t[7]=h*n-s*r,t},fromTranslation:mt,fromScaling:vt,fromRotation:function(t,e,n){var r,i=n[0],a=n[1],n=n[2],o=Math.hypot(i,a,n);return o<X?null:(i*=o=1/o,a*=o,n*=o,o=Math.sin(e),e=Math.cos(e),t[0]=i*i*(r=1-e)+e,t[1]=a*i*r+n*o,t[2]=n*i*r-a*o,t[3]=0,t[4]=i*a*r-n*o,t[5]=a*a*r+e,t[6]=n*a*r+i*o,t[7]=0,t[8]=i*n*r+a*o,t[9]=a*n*r-i*o,t[10]=n*n*r+e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)},fromXRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromYRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=e,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=e,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotationTranslation:yt,fromQuat2:function(t,e){var n=new K(3),r=-e[0],i=-e[1],a=-e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],h=r*r+i*i+a*a+o*o;return 0<h?(n[0]=2*(s*o+u*r+l*a-c*i)/h,n[1]=2*(l*o+u*i+c*r-s*a)/h,n[2]=2*(c*o+u*a+s*i-l*r)/h):(n[0]=2*(s*o+u*r+l*a-c*i),n[1]=2*(l*o+u*i+c*r-s*a),n[2]=2*(c*o+u*a+s*i-l*r)),yt(t,e,n),t},getTranslation:bt,getScaling:xt,getRotation:wt,fromRotationTranslationScale:function(t,e,n,r){var i=e[0],a=e[1],o=e[2],e=e[3],s=i*(u=i+i),l=i*(h=a+a),i=i*(f=o+o),c=a*h,a=a*f,o=o*f,u=e*u,h=e*h,e=e*f,f=r[0],d=r[1],r=r[2];return t[0]=(1-(c+o))*f,t[1]=(l+e)*f,t[2]=(i-h)*f,t[3]=0,t[4]=(l-e)*d,t[5]=(1-(s+o))*d,t[6]=(a+u)*d,t[7]=0,t[8]=(i+h)*r,t[9]=(a-u)*r,t[10]=(1-(s+c))*r,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:Mt,fromQuat:kt,frustum:function(t,e,n,r,i,a,o){var s=1/(n-e),l=1/(i-r),c=1/(a-o);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*l,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*l,t[10]=(o+a)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*c,t[15]=0,t},perspectiveNO:Et,perspective:Et,perspectiveZO:function(t,e,n,r,i){return e=1/Math.tan(e/2),t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=i*(n=1/(r-i)),t[14]=i*r*n):(t[10]=-1,t[14]=-r),t},perspectiveFromFieldOfView:function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),e=Math.tan(e.rightDegrees*Math.PI/180),s=2/(o+e),l=2/(i+a);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-(o-e)*s*.5,t[9]=(i-a)*l*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},orthoNO:Ot,ortho:St,orthoZO:function(t,e,n,r,i,a,o){var s=1/(e-n),l=1/(r-i),o=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=o,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=a*o,t[15]=1,t},lookAt:_t,targetTo:function(t,e,n,r){var i=e[0],a=e[1],e=e[2],o=r[0],s=r[1],r=r[2],l=i-n[0],c=a-n[1],n=e-n[2],u=l*l+c*c+n*n,h=(0<u&&(l*=u=1/Math.sqrt(u),c*=u,n*=u),s*n-r*c);return 0<(u=h*h+(r=r*l-o*n)*r+(o=o*c-s*l)*o)&&(h*=u=1/Math.sqrt(u),r*=u,o*=u),t[0]=h,t[1]=r,t[2]=o,t[3]=0,t[4]=c*o-n*r,t[5]=n*h-l*o,t[6]=l*r-c*h,t[7]=0,t[8]=l,t[9]=c,t[10]=n,t[11]=0,t[12]=i,t[13]=a,t[14]=e,t[15]=1,t},str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},subtract:At,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]},equals:function(t,e){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],h=t[9],f=t[10],d=t[11],p=t[12],g=t[13],m=t[14],t=t[15],v=e[0],y=e[1],b=e[2],x=e[3],w=e[4],M=e[5],k=e[6],E=e[7],O=e[8],S=e[9],_=e[10],A=e[11],T=e[12],P=e[13],L=e[14],e=e[15];return Math.abs(n-v)<=X*Math.max(1,Math.abs(n),Math.abs(v))&&Math.abs(r-y)<=X*Math.max(1,Math.abs(r),Math.abs(y))&&Math.abs(i-b)<=X*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(a-x)<=X*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(o-w)<=X*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(s-M)<=X*Math.max(1,Math.abs(s),Math.abs(M))&&Math.abs(l-k)<=X*Math.max(1,Math.abs(l),Math.abs(k))&&Math.abs(c-E)<=X*Math.max(1,Math.abs(c),Math.abs(E))&&Math.abs(u-O)<=X*Math.max(1,Math.abs(u),Math.abs(O))&&Math.abs(h-S)<=X*Math.max(1,Math.abs(h),Math.abs(S))&&Math.abs(f-_)<=X*Math.max(1,Math.abs(f),Math.abs(_))&&Math.abs(d-A)<=X*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(p-T)<=X*Math.max(1,Math.abs(p),Math.abs(T))&&Math.abs(g-P)<=X*Math.max(1,Math.abs(g),Math.abs(P))&&Math.abs(m-L)<=X*Math.max(1,Math.abs(m),Math.abs(L))&&Math.abs(t-e)<=X*Math.max(1,Math.abs(t),Math.abs(e))},mul:ht,sub:At});function v(){var t=new K(3);return K!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Pt(t){var e=new K(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function Lt(t){var e=t[0],n=t[1],t=t[2];return Math.hypot(e,n,t)}function M(t,e,n){var r=new K(3);return r[0]=t,r[1]=e,r[2]=n,r}function Ct(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Nt(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function jt(t,e,n){t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2]}function Rt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function It(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function Bt(t,e){var n=e[0],r=e[1],i=e[2],n=n*n+r*r+i*i;0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function Dt(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Ft(t,e,n){var r=e[0],i=e[1],e=e[2],a=n[0],o=n[1],n=n[2];t[0]=i*n-e*o,t[1]=e*a-r*n,t[2]=r*o-i*a}function zt(t,e,n,r){var i=e[0],a=e[1],e=e[2];t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t[2]=e+r*(n[2]-e)}function Gt(t,e,n){var r=e[0],i=e[1],e=e[2],a=n[3]*r+n[7]*i+n[11]*e+n[15];return t[0]=(n[0]*r+n[4]*i+n[8]*e+n[12])/(a=a||1),t[1]=(n[1]*r+n[5]*i+n[9]*e+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*e+n[14])/a,t}function Wt(t,e,n){var r=e[0],i=e[1],e=e[2];t[0]=r*n[0]+i*n[3]+e*n[6],t[1]=r*n[1]+i*n[4]+e*n[7],t[2]=r*n[2]+i*n[5]+e*n[8]}function Yt(t,e){var n=t[0],r=t[1],t=t[2],i=e[0],a=e[1],e=e[2];return Math.abs(n-i)<=X*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-a)<=X*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(t-e)<=X*Math.max(1,Math.abs(t),Math.abs(e))}var Ht=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],e=e[2]-t[2];return Math.hypot(n,r,e)},Vt=Lt;function qt(){var t=new K(4);return K!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function $t(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*a+n[12]*e,t[1]=n[1]*r+n[5]*i+n[9]*a+n[13]*e,t[2]=n[2]*r+n[6]*i+n[10]*a+n[14]*e,t[3]=n[3]*r+n[7]*i+n[11]*a+n[15]*e,t}function Ut(){var t=new K(4);return K!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Xt(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function Kt(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=n[0],s=n[1],l=n[2],n=n[3];return t[0]=r*n+e*o+i*l-a*s,t[1]=i*n+e*s+a*o-r*l,t[2]=a*n+e*l+r*s-i*o,t[3]=e*n-r*o-i*s-a*l,t}function Zt(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n*n+r*r+i*i+e*e,a=a?1/a:0;return t[0]=-n*a,t[1]=-r*a,t[2]=-i*a,t[3]=e*a,t}function Qt(t,e,n,r){var i=.5*Math.PI/180,i=(e*=i,n*=i,r*=i,Math.sin(e)),e=Math.cos(e),a=Math.sin(n),n=Math.cos(n),o=Math.sin(r),r=Math.cos(r);t[0]=i*n*r-e*a*o,t[1]=e*a*r+i*n*o,t[2]=e*n*o-i*a*r,t[3]=e*n*r+i*a*o}v(),qt();var Jt=function(t,e,n,r){var i=new K(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},te=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},ee=Kt,ne=function(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n*n+r*r+i*i+e*e;return 0<a&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=e*a,t};function re(t,e){var n=e[0],r=e[1],n=n*n+r*r;0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n}function ie(t,e){return t[0]*e[0]+t[1]*e[1]}function ae(t,e){return t[0]===e[0]&&t[1]===e[1]}function oe(t){return t.map(function(t){return Array.isArray(t)?[].concat(t):t})}v(),M(1,0,0),M(0,1,0),Ut(),Ut(),Z(),e=new K(2),K!=Float32Array&&(e[0]=0,e[1]=0);var se=function(t,e){return(se=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}))(t,e)};function le(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}se(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var y=function(){return(y=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function nt(t,e){var n={};for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n}function t(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}function ce(t,o,s,l){return new(s=s||Promise)(function(n,e){function r(t){try{a(l.next(t))}catch(t){e(t)}}function i(t){try{a(l.throw(t))}catch(t){e(t)}}function a(t){var e;t.done?n(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(r,i)}a((l=l.apply(t,o||[])).next())})}function ue(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function k(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||0<e--)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function b(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function he(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t===e&&r:e.has(t))return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t);throw new TypeError("Cannot read private member from an object whose class did not declare it")}var fe={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};var de={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function pe(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return de[e]===t.length-1&&"achlmqstvz".includes(e)})}function ge(t){return pe(t)&&t.every(function(t){t=t[0];return t===t.toUpperCase()})}function me(t){return ge(t)&&t.every(function(t){t=t[0];return"ACLMQZ".includes(t)})}function ve(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=de[n]&&("m"===n&&2<r.length?(t.segments.push([e].concat(r.splice(0,2))),n="l",e="m"===e?"l":"L"):t.segments.push([e].concat(r.splice(0,de[n]))),de[n]););}function ye(t){return 48<=t&&t<=57}function be(t){for(var e,n=t.pathValue,r=t.max;t.index<r&&(10===(e=n.charCodeAt(t.index))||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||5760<=e&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e));)t.index+=1}function xe(t){var e,n,r,i,a,o=t.max,s=t.pathValue,l=t.index,c=s.charCodeAt(l),u=de[s[l].toLowerCase()];if(t.segmentStart=l,function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return 1;default:return}}(c)){if(t.index+=1,be(t),t.data=[],u)for(;;){for(var h=u;0<h;--h){if(97!=(32|c)||3!==h&&4!==h?function(t){var e,n,r=t.max,i=t.pathValue,a=t.index,o=a,s=!1,l=!1,c=!1;if(r<=o)t.err="[path-util]: Invalid path value at index "+o+', "pathValue" is missing param';else if(ye(n=43!==(n=i.charCodeAt(o))&&45!==n?n:i.charCodeAt(o+=1))||46===n){if(46!==n){if(e=48===n,n=i.charCodeAt(o+=1),e&&o<r&&n&&ye(n))return t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" illegal number';for(;o<r&&ye(i.charCodeAt(o));)o+=1,s=!0;n=i.charCodeAt(o)}if(46===n){for(c=!0,o+=1;ye(i.charCodeAt(o));)o+=1,l=!0;n=i.charCodeAt(o)}if(101===n||69===n){if(c&&!s&&!l)return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid float exponent';if(43!==(n=i.charCodeAt(o+=1))&&45!==n||(o+=1),!(o<r&&ye(i.charCodeAt(o))))return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid integer exponent';for(;o<r&&ye(i.charCodeAt(o));)o+=1}t.index=o,t.param=+t.pathValue.slice(a,o)}else t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" is not a number'}(t):(a=i=r=void 0,r=(n=t).index,i=n.pathValue,48===(a=i.charCodeAt(r))?(n.param=0,n.index+=1):49===a?(n.param=1,n.index+=1):n.err='[path-util]: invalid Arc flag "'+i[r]+'", expecting 0 or 1 at index '+r),t.err.length)return;t.data.push(t.param),be(t),t.index<o&&44===s.charCodeAt(t.index)&&(t.index+=1,be(t))}if(t.index>=t.max)break;if(!(48<=(e=s.charCodeAt(t.index))&&e<=57||43===e||45===e||46===e))break}ve(t)}else t.err='[path-util]: Invalid path value "'+s[l]+'" is not a path command'}var we=function(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function Me(t){var o,s,l,c;return ge(t)?oe(t):(t=function(t){if(pe(t))return oe(t);var e=new we(t);for(be(e);e.index<e.max&&!e.err.length;)xe(e);return e.err||e.segments}(t),c=l=s=o=0,t.map(function(t){var e=t.slice(1).map(Number),t=t[0],n=t.toUpperCase();if("M"===t)return o=e[0],s=e[1],["M",l=o,c=s];if(t!==n)switch(n){case"A":i=[n,e[0],e[1],e[2],e[3],e[4],e[5]+o,e[6]+s];break;case"V":i=[n,e[0]+s];break;case"H":i=[n,e[0]+o];break;default:var r=e.map(function(t,e){return t+(e%2?s:o)}),i=[n].concat(r)}else i=[n].concat(e);var a=i.length;switch(n){case"Z":o=l,s=c;break;case"H":o=i[1];break;case"V":s=i[1];break;default:o=i[a-2],s=i[a-1],"M"===n&&(l=o,c=s)}return i}))}function ke(t){if(me(t))return oe(t);for(var e,n,r,i,a,o,s,l=Me(t),c=y({},fe),u=0;u<l.length;u+=1){l[u]=(e=l[u],n=c,s=o=f=a=h=i=r=void 0,r=e[0],i=n.x1,h=n.y1,a=n.x2,f=n.y2,o=e.slice(1).map(Number),s=e,"TQ".includes(r)||(n.qx=null,n.qy=null),"H"===r?s=["L",e[1],h]:"V"===r?s=["L",i,e[1]]:"S"===r?(e=2*h-f,s=["C",n.x1=2*i-a,n.y1=e].concat(o)):"T"===r?(f=2*i-n.qx,a=2*h-n.qy,s=["Q",n.qx=f,n.qy=a].concat(o)):"Q"===r&&(e=o[0],i=o[1],n.qx=e,n.qy=i),s);var h=l[u],f=h.length;c.x1=+h[f-2],c.y1=+h[f-1],c.x2=+h[f-4]||c.x1,c.y2=+h[f-3]||c.y1}return l}function Ee(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function Oe(t,e,n,r,i,a,o,s,l,c){var u=120*Math.PI/180,h=Math.PI/180*(+i||0),f=[],d=(c?(b=c[0],x=c[1],v=c[2],y=c[3]):(t=(g=Ee(t,e,-h)).x,e=g.y,1<(d=(p=(t-(s=(g=Ee(s,l,-h)).x))/2)*p/(n*n)+(g=(e-(l=g.y))/2)*g/(r*r))&&(n*=d=Math.sqrt(d),r*=d),d=n*n,m=r*r,v=(a=(a===o?-1:1)*Math.sqrt(Math.abs((d*m-d*g*g-m*p*p)/(d*g*g+m*p*p))))*n*g/r+(t+s)/2,y=a*-r*p/n+(e+l)/2,b=Math.asin(((e-y)/r*Math.pow(10,9)>>0)/Math.pow(10,9)),x=Math.asin(((l-y)/r*Math.pow(10,9)>>0)/Math.pow(10,9)),b=t<v?Math.PI-b:b,x=s<v?Math.PI-x:x,b<0&&(b=2*Math.PI+b),x<0&&(x=2*Math.PI+x),o&&x<b&&(b-=2*Math.PI),!o&&b<x&&(x-=2*Math.PI)),x-b),p=(Math.abs(d)>u&&(m=x,g=s,a=l,x=b+u*(o&&b<x?1:-1),f=Oe(s=v+n*Math.cos(x),l=y+r*Math.sin(x),n,r,i,0,o,g,a,[x,m,v,y])),d=x-b,Math.cos(b)),u=Math.sin(b),i=Math.cos(x),o=Math.sin(x),g=Math.tan(d/4),a=4/3*n*g,m=4/3*r*g,v=[t,e],y=[t+a*u,e-m*p],b=[s+a*o,l-m*i],x=[s,l];if(y[0]=2*v[0]-y[0],y[1]=2*v[1]-y[1],c)return y.concat(b,x,f);for(var w=[],M=0,k=(f=y.concat(b,x,f)).length;M<k;M+=1)w[M]=M%2?Ee(f[M-1],f[M],h).y:Ee(f[M],f[M+1],h).x;return w}function Se(t,e,n){var r=t[0],t=t[1];return[r+(e[0]-r)*n,t+(e[1]-t)*n]}function _e(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function Ae(t,e,n,r,i){var a=_e([t,e],[n,r]),o={x:0,y:0};return{length:a,point:o="number"==typeof i?i<=0?{x:t,y:e}:a<=i?{x:n,y:r}:{x:(i=Se([t,e],[n,r],i/a))[0],y:i[1]}:o,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function Te(t,e,n,r){var t=[t,e],e=[n,r],i=Se(t,e,.5),e=Se(e,i,.5),a=Se(i,e,.5),o=Se(e,a,.5),s=Se(a,o,.5),t=Ae(t[0],t[1],i[0],i[1],a[0]).point,i=Ae(s[0],s[1],o[0],o[1],e[0]).point;return[t.x,t.y,i.x,i.y,n,r]}function Pe(t,e){var n;if(void 0===e&&(e=!1),me(n=t)&&n.every(function(t){t=t[0];return"MC".includes(t)}))return n=oe(t),e?[n,[]]:n;for(var r,i=ke(t),a=y({},fe),o=[],s="",l=i.length,c=[],u=0;u<l;u+=1){i[u]&&(s=i[u][0]),o[u]=s;var h=function(t,e){var n,r,i,a,o,s,l=t[0],c=t.slice(1).map(Number),u=c[0],h=c[1],f=e.x1,d=e.y1,p=e.x,g=e.y;switch("TQ".includes(l)||(e.qx=null,e.qy=null),l){case"M":return e.x=u,e.y=h,t;case"A":return s=[f,d].concat(c),["C"].concat(Oe(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9]));case"Q":return e.qx=u,e.qy=h,s=[f,d].concat(c),["C"].concat((n=s[0],r=s[1],i=s[2],a=s[3],o=s[4],s=s[5],[1/3*n+2/3*i,1/3*r+2/3*a,1/3*o+2/3*i,1/3*s+2/3*a,o,s]));case"L":return["C"].concat(Te(f,d,u,h));case"Z":return f===p&&d===g?["C",f,d,p,g,p,g]:["C"].concat(Te(f,d,p,g))}return t}(i[u],a),f=(i[u]=h,m=g=p=d=f=void 0,i),d=o,p=u;if(7<f[p].length){f[p].shift();for(var g=f[p],m=p;g.length;)d[p]="A",f.splice(m+=1,0,["C"].concat(g.splice(0,6)));f.splice(p,1)}l=i.length,"Z"===s&&c.push(u),r=(h=i[u]).length,a.x1=+h[r-2],a.y1=+h[r-1],a.x2=+h[r-4]||a.x1,a.y2=+h[r-3]||a.y1}return e?[i,c]:i}function Le(t,e){var n=t.x,t=t.y,r=e.x,e=e.y,i=n*r+t*e,a=Math.sqrt((Math.pow(n,2)+Math.pow(t,2))*(Math.pow(r,2)+Math.pow(e,2)));return(n*e-t*r<0?-1:1)*Math.acos(i/a)}function Ce(t,e,n,r,i,I,B,a,o,s,l){var c=l.bbox,D=void 0===c||c,c=l.length,F=void 0===c||c,c=l.sampleSize,u=void 0===c?30:c,h="number"==typeof s,f=t,d=e,p=0,g=[f,d,p],m=[f,d],v={x:0,y:0},y=[{x:f,y:d}];h&&s<=0&&(v={x:f,y:d});for(var b,x,w,M,k,E,O,S,_,A,T,P,L,C,N,j,R=0;R<=u;R+=1)b=t,x=e,w=n,M=r,k=i,E=I,O=B,S=a,_=o,A=R/u,P=j=N=C=L=P=T=void 0,P=Math.abs,L=Math.sin,C=Math.cos,N=Math.sqrt,j=Math.PI,w=P(w),P=P(M),M=j/180*((k%360+360)%360),f=(T=b===S&&x===_?{x:b,y:x}:0===w||0===P?Ae(b,x,S,_,A).point:(k=(b-S)/2,T=(x-_)/2,k={x:C(M)*k+L(M)*T,y:-L(M)*k+C(M)*T},1<(T=Math.pow(k.x,2)/Math.pow(w,2)+Math.pow(k.y,2)/Math.pow(P,2))&&(w*=N(T),P*=N(T)),T=(Math.pow(w,2)*Math.pow(P,2)-Math.pow(w,2)*Math.pow(k.y,2)-Math.pow(P,2)*Math.pow(k.x,2))/(Math.pow(w,2)*Math.pow(k.y,2)+Math.pow(P,2)*Math.pow(k.x,2)),E=(E!==O?1:-1)*N(T<0?0:T),N=w*k.y/P*E,T=-P*k.x/w*E,E=C(M)*N-L(M)*T+(b+S)/2,b=L(M)*N+C(M)*T+(x+_)/2,x=Le({x:1,y:0},S={x:(k.x-N)/w,y:(k.y-T)/P}),_=Le(S,{x:(-k.x-N)/w,y:(-k.y-T)/P}),!O&&0<_?_-=2*j:O&&_<0&&(_+=2*j),S=x+(_%=2*j)*A,N=w*C(S),k=P*L(S),{x:C(M)*N-L(M)*k+E,y:L(M)*N+C(M)*k+b})).x,d=T.y,D&&y.push({x:f,y:d}),F&&(p+=_e(m,[f,d])),m=[f,d],h&&s<=p&&s>g[2]&&(O=(p-s)/(p-g[2]),v={x:m[0]*(1-O)+g[0]*O,y:m[1]*(1-O)+g[1]*O}),g=[f,d,p];return{length:p,point:v=h&&p<=s?{x:a,y:o}:v,min:{x:Math.min.apply(null,y.map(function(t){return t.x})),y:Math.min.apply(null,y.map(function(t){return t.y}))},max:{x:Math.max.apply(null,y.map(function(t){return t.x})),y:Math.max.apply(null,y.map(function(t){return t.y}))}}}function Ne(t,e,n,r,i,a,o,s,l,c){var u=c.bbox,h=void 0===u||u,u=c.length,f=void 0===u||u,u=c.sampleSize,d=void 0===u?10:u,p="number"==typeof l,g=t,m=e,v=0,y=[g,m,v],b=[g,m],x={x:0,y:0},w=[{x:g,y:m}];p&&l<=0&&(x={x:g,y:m});for(var M,k,E,O,S,_,A,T,P,L,C=0;C<=d;C+=1)M=t,k=e,E=n,O=r,S=i,_=a,A=o,T=s,L=void 0,L=1-(P=C/d),g=(M={x:Math.pow(L,3)*M+3*Math.pow(L,2)*P*E+3*L*Math.pow(P,2)*S+Math.pow(P,3)*A,y:Math.pow(L,3)*k+3*Math.pow(L,2)*P*O+3*L*Math.pow(P,2)*_+Math.pow(P,3)*T}).x,m=M.y,h&&w.push({x:g,y:m}),f&&(v+=_e(b,[g,m])),b=[g,m],p&&l<=v&&l>y[2]&&(E=(v-l)/(v-y[2]),x={x:b[0]*(1-E)+y[0]*E,y:b[1]*(1-E)+y[1]*E}),y=[g,m,v];return{length:v,point:x=p&&v<=l?{x:o,y:s}:x,min:{x:Math.min.apply(null,w.map(function(t){return t.x})),y:Math.min.apply(null,w.map(function(t){return t.y}))},max:{x:Math.max.apply(null,w.map(function(t){return t.x})),y:Math.max.apply(null,w.map(function(t){return t.y}))}}}function je(t,e,n,r,i,a,o,s){var l=s.bbox,c=void 0===l||l,l=s.length,u=void 0===l||l,l=s.sampleSize,h=void 0===l?10:l,f="number"==typeof o,d=t,p=e,g=0,m=[d,p,g],v=[d,p],y={x:0,y:0},b=[{x:d,y:p}];f&&o<=0&&(y={x:d,y:p});for(var x,w,M,k,E,O,S,_,A=0;A<=h;A+=1)x=t,w=e,M=n,k=r,E=i,O=a,_=void 0,_=1-(S=A/h),d=(x={x:Math.pow(_,2)*x+2*_*S*M+Math.pow(S,2)*E,y:Math.pow(_,2)*w+2*_*S*k+Math.pow(S,2)*O}).x,p=x.y,c&&b.push({x:d,y:p}),u&&(g+=_e(v,[d,p])),v=[d,p],f&&o<=g&&o>m[2]&&(M=(g-o)/(g-m[2]),y={x:v[0]*(1-M)+m[0]*M,y:v[1]*(1-M)+m[1]*M}),m=[d,p,g];return{length:g,point:y=f&&g<=o?{x:i,y:a}:y,min:{x:Math.min.apply(null,b.map(function(t){return t.x})),y:Math.min.apply(null,b.map(function(t){return t.y}))},max:{x:Math.max.apply(null,b.map(function(t){return t.x})),y:Math.max.apply(null,b.map(function(t){return t.y}))}}}function Re(t,e,n){for(var r,i,a,o=ke(t),s="number"==typeof e,l=[],c=0,u=0,h=0,f=0,d=[],p=[],g=0,m={x:0,y:0},v=m,y=m,b=m,x=0,w=0,M=o.length;w<M;w+=1)l=(r="M"===(i=(a=o[w])[0]))?l:[c,u].concat(a.slice(1)),r?(v=m={x:h=a[1],y:f=a[2]},g=0,s&&e<.001&&(b=m)):"L"===i?(g=(r=Ae(l[0],l[1],l[2],l[3],(e||0)-x)).length,m=r.min,v=r.max,y=r.point):"A"===i?(g=(r=Ce(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],l[8],(e||0)-x,n||{})).length,m=r.min,v=r.max,y=r.point):"C"===i?(g=(r=Ne(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],(e||0)-x,n||{})).length,m=r.min,v=r.max,y=r.point):"Q"===i?(g=(r=je(l[0],l[1],l[2],l[3],l[4],l[5],(e||0)-x,n||{})).length,m=r.min,v=r.max,y=r.point):"Z"===i&&(g=(r=Ae((l=[c,u,h,f])[0],l[1],l[2],l[3],(e||0)-x)).length,m=r.min,v=r.max,y=r.point),s&&x<e&&e<=x+g&&(b=y),p.push(v),d.push(m),x+=g,c=(r="Z"!==i?a.slice(-2):[h,f])[0],u=r[1];return{length:x,point:b=s&&x<=e?{x:c,y:u}:b,min:{x:Math.min.apply(null,d.map(function(t){return t.x})),y:Math.min.apply(null,d.map(function(t){return t.y}))},max:{x:Math.max.apply(null,p.map(function(t){return t.x})),y:Math.max.apply(null,p.map(function(t){return t.y}))}}}function Ie(t){return(c=l=s=0)<=Pe(t).map(function(t){var e,n,r,i,a,o;return"M"===t[0]?(s=t[1],l=t[2],0):(o=t.slice(1),e=o[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],c=3*((o-l)*(e+r)-(a-s)*(n+i)+n*(s-r)-e*(l-i)+o*(r+s/3)-a*(i+l/3))/20,n=t.slice(-2),s=n[0],l=n[1],c)}).reduce(function(t,e){return t+e},0);var s,l,c}function Be(t){return t.map(function(t,e,n){var r,i,a,o,n=e&&n[e-1].slice(-2).concat(t.slice(1)),s=e?Ne(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],{bbox:!1}).length:0,n=e?s?(void 0===r&&(r=.5),n=(e=n).slice(0,2),i=e.slice(2,4),a=e.slice(4,6),e=e.slice(6,8),n=Se(n,i,r),i=Se(i,a,r),a=Se(a,e,r),o=Se(n,i,r),i=Se(i,a,r),r=Se(o,i,r),[["C"].concat(n,o,r),["C"].concat(i,a,e)]):[t,t]:[t];return{s:t,ss:n,l:s}})}var De=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},Fe=function(t){return"function"==typeof t},_=function(t){return null==t},ze={}.toString,Ge=function(t,e){return ze.call(t)==="[object "+e+"]"},We=function(t){return Array.isArray?Array.isArray(t):Ge(t,"Array")},Ye=function(t){var e=typeof t;return null!==t&&"object"==e||"function"==e},He=function(t){return"object"==typeof t&&null!==t},Ve=function(t){if(!He(t)||!Ge(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},qe=function(t){if(We(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},$e=function(t){if(We(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},Ue=function(t){return Ge(t,"String")};var Xe=function(t,e,n){return t<e?e:n<t?n:t},Ke=function(t){return Ge(t,"Number")};function Ze(t){return _(t)?"":t.toString()}var Qe=function(t,e){return(t%e+e)%e},Je=function(t){t=Ze(t);return t.charAt(0).toLowerCase()+t.substring(1)};function tn(t){if("object"!=typeof t||null===t)return t;if(We(t))for(var e=[],n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=tn(t[n]):e[n]=t[n];else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=tn(t[i]):e[i]=t[i];return e}var en=function(t){t=Ze(t);return t.charAt(0).toUpperCase()+t.substring(1)},nn=function(t){return Ge(t,"Boolean")},rn=function(t){return void 0===t},an=tn;function on(r,i,a){var o;return function(){var t=this,e=arguments,n=a&&!o;clearTimeout(o),o=setTimeout(function(){o=null,a||r.apply(t,e)},i),n&&r.apply(t,e)}}function sn(a,o){var s;if(Fe(a))return(s=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=o?o.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=a.apply(this,t),i.set(r,n),n)}).cache=new Map,s;throw new TypeError("Expected a function")}var ln=5;function cn(t,e){if(t===e)return!0;if(t&&e&&!Ue(t)&&!Ue(e)){if(De(t)||De(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=cn(t[r],e[r]));r++);return n}if(He(t)||He(e)){var i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(n=!0,r=0;r<i.length&&(n=cn(t[i[r]],e[i[r]]));r++);return n}}return!1}function un(){}var rt=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var a in r=r||0,i=i||ln,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&Ve(o)?(Ve(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):We(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t},hn=cn,fn=function(t,e,n){for(var r=0,i=Ue(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t},dn=function(n,r,i){function a(){u=!1===i.leading?0:Date.now(),o=null,c=n.apply(s,l),o||(s=l=null)}function t(){var t=Date.now(),e=(u||!1!==i.leading||(u=t),r-(t-u));return s=this,l=arguments,e<=0||r<e?(o&&(clearTimeout(o),o=null),u=t,c=n.apply(s,l),o||(s=l=null)):o||!1===i.trailing||(o=setTimeout(a,e)),c}var o,s,l,c,u=0;i=i||{};return t.cancel=function(){clearTimeout(o),u=0,o=s=l=null},t};function pn(t,e,n){(t.prototype=e.prototype=n).constructor=t}function gn(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function mn(){}var e="\\s*([+-]?\\d+)\\s*",n="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",r="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",vn=/^#([0-9a-f]{3,8})$/,yn=new RegExp("^rgb\\("+[e,e,e]+"\\)$"),bn=new RegExp("^rgb\\("+[r,r,r]+"\\)$"),xn=new RegExp("^rgba\\("+[e,e,e,n]+"\\)$"),wn=new RegExp("^rgba\\("+[r,r,r,n]+"\\)$"),Mn=new RegExp("^hsl\\("+[n,r,r]+"\\)$"),kn=new RegExp("^hsla\\("+[n,r,r,n]+"\\)$"),En={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function On(){return this.rgb().formatHex()}function Sn(){return this.rgb().formatRgb()}function _n(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=vn.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?An(e):3===n?new Pn(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Tn(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Tn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=yn.exec(t))?new Pn(e[1],e[2],e[3],1):(e=bn.exec(t))?new Pn(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=xn.exec(t))?Tn(e[1],e[2],e[3],e[4]):(e=wn.exec(t))?Tn(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Mn.exec(t))?jn(e[1],e[2]/100,e[3]/100,1):(e=kn.exec(t))?jn(e[1],e[2]/100,e[3]/100,e[4]):En.hasOwnProperty(t)?An(En[t]):"transparent"===t?new Pn(NaN,NaN,NaN,0):null}function An(t){return new Pn(t>>16&255,t>>8&255,255&t,1)}function Tn(t,e,n,r){return new Pn(t=r<=0?e=n=NaN:t,e,n,r)}function Pn(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Ln(){return"#"+Nn(this.r)+Nn(this.g)+Nn(this.b)}function Cn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Nn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function jn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new In(t,e,n,r)}function Rn(t){var e,n,r,i,a,o,s,l;return t instanceof In?new In(t.h,t.s,t.l,t.opacity):(t=t instanceof mn?t:_n(t))?t instanceof In?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new In(o,s,l,t.opacity)):new In}function In(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Bn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Dn(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function Fn(t,e){return Math.abs(t-e)<.001}function zn(t,e){var n=Math.min.apply(Math,t),r=Math.min.apply(Math,e);return{x:n,y:r,width:Math.max.apply(Math,t)-n,height:Math.max.apply(Math,e)-r}}function Gn(t){return(t+2*Math.PI)%(2*Math.PI)}pn(mn,_n,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:On,formatHex:On,formatHsl:function(){return Rn(this).formatHsl()},formatRgb:Sn,toString:Sn}),pn(Pn,function(t,e,n,r){return 1===arguments.length?(i=(i=t)instanceof mn?i:_n(i))?new Pn((i=i.rgb()).r,i.g,i.b,i.opacity):new Pn:new Pn(t,e,n,null==r?1:r);var i},gn(mn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Pn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Pn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ln,formatHex:Ln,formatRgb:Cn,toString:Cn})),pn(In,function(t,e,n,r){return 1===arguments.length?Rn(t):new In(t,e,n,null==r?1:r)},gn(mn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new In(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new In(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new Pn(Bn(240<=t?t-240:120+t,n,e),Bn(t,n,e),Bn(t<120?240+t:t-120,n,e),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Wn={box:function(t,e,n,r){return zn([t,n],[e,r])},length:Dn,pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,r,i,a){var o=(n-t)*(i-t)+(r-e)*(a-e);return o<0?Dn(t,e,i,a):(n-t)*(n-t)+(r-e)*(r-e)<o?Dn(n,r,i,a):this.pointToLine(t,e,n,r,i,a)},pointToLine:function(t,e,n,r,i,a){n=[n-t,r-e];return ae(n,[0,0])?Math.sqrt((i-t)*(i-t)+(a-e)*(a-e)):(re(r=[-n[1],n[0]],r),Math.abs(ie([i-t,a-e],r)))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function Yn(t,e,n,r,i,a){for(var o=-1,s=1/0,l=[n,r],c=20,u=1/(c=a&&200<a?a/10:c),h=u/10,f=0;f<=c;f++){var d=f*u,p=[i.apply(void 0,t.concat([d])),i.apply(void 0,e.concat([d]))],p=Dn(l[0],l[1],p[0],p[1]);p<s&&(o=d,s=p)}if(0===o)return{x:t[0],y:e[0]};if(1===o)return{x:t[(n=t.length)-1],y:e[n-1]};for(var s=1/0,g=0;g<32&&!(h<1e-4);g++){var m=o-h,v=o+h,y=[i.apply(void 0,t.concat([m])),i.apply(void 0,e.concat([m]))],y=Dn(l[0],l[1],y[0],y[1]);0<=m&&y<s?(o=m,s=y):(m=[i.apply(void 0,t.concat([v])),i.apply(void 0,e.concat([v]))],y=Dn(l[0],l[1],m[0],m[1]),v<=1&&y<s?(o=v,s=y):h*=.5)}return{x:i.apply(void 0,t.concat([o])),y:i.apply(void 0,e.concat([o]))}}function Hn(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function Vn(t,e,n){n=t+n-2*e;return Fn(n,0)?[.5]:(t=(t-e)/n)<=1&&0<=t?[t]:[]}function qn(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function $n(t,e,n,r,i,a,o){var s=Hn(t,n,i,o),l=Hn(e,r,a,o),c=Wn.pointAt(t,e,n,r,o),n=Wn.pointAt(n,r,i,a,o);return[[t,e,c.x,c.y,s,l],[s,l,n.x,n.y,i,a]]}function Un(t,e,n,r,i,a,o){return 0===o?(Dn(t,e,n,r)+Dn(n,r,i,a)+Dn(t,e,i,a))/2:(e=(t=$n(t,e,n,r,i,a,.5))[0],n=t[1],e.push(o-1),n.push(o-1),Un.apply(void 0,e)+Un.apply(void 0,n))}var Xn={box:function(t,e,n,r,i,a){var o=Vn(t,n,i)[0],s=Vn(e,r,a)[0],l=[t,i],c=[e,a];return void 0!==o&&l.push(Hn(t,n,i,o)),void 0!==s&&c.push(Hn(e,r,a,s)),zn(l,c)},length:function(t,e,n,r,i,a){return Un(t,e,n,r,i,a,3)},nearestPoint:function(t,e,n,r,i,a,o,s){return Yn([t,n,i],[e,r,a],o,s,Hn)},pointDistance:function(t,e,n,r,i,a,o,s){t=this.nearestPoint(t,e,n,r,i,a,o,s);return Dn(t.x,t.y,o,s)},interpolationAt:Hn,pointAt:function(t,e,n,r,i,a,o){return{x:Hn(t,n,i,o),y:Hn(e,r,a,o)}},divide:$n,tangentAngle:function(t,e,n,r,i,a,o){t=qn(t,n,i,o),n=qn(e,r,a,o);return Gn(Math.atan2(n,t))}};function Kn(t,e,n,r,i){var a=1-i;return a*a*a*t+3*e*i*a*a+3*n*i*i*a+r*i*i*i}function Zn(t,e,n,r,i){var a=1-i;return 3*(a*a*(e-t)+2*a*i*(n-e)+i*i*(r-n))}function Qn(t,e,n,r){var i,a,r=-3*t+9*e-9*n+3*r,n=6*t-12*e+6*n,e=3*e-3*t,t=[];return Fn(r,0)?Fn(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):Fn(e=n*n-4*r*e,0)?t.push(-n/(2*r)):0<e&&(a=(-n-(e=Math.sqrt(e)))/(2*r),0<=(i=(-n+e)/(2*r))&&i<=1&&t.push(i),0<=a)&&a<=1&&t.push(a),t}function Jn(t,e,n,r,i,a,o,s,l){var c=Kn(t,n,i,o,l),u=Kn(e,r,a,s,l),h=Wn.pointAt(t,e,n,r,l),n=Wn.pointAt(n,r,i,a,l),r=Wn.pointAt(i,a,o,s,l),i=Wn.pointAt(h.x,h.y,n.x,n.y,l),a=Wn.pointAt(n.x,n.y,r.x,r.y,l);return[[t,e,h.x,h.y,i.x,i.y,c,u],[c,u,a.x,a.y,r.x,r.y,o,s]]}function tr(t,e,n,r,i,a,o,s,l){if(0===l){for(var c=[t,n,i,o],u=[e,r,a,s],h=0,f=c.length,d=0;d<f;d++)h+=Dn(c[d],u[d],c[(d+1)%f],u[(d+1)%f]);return h/2}t=Jn(t,e,n,r,i,a,o,s,.5),e=[].concat(t[0],[l-1]),n=[].concat(t[1],[l-1]);return tr.apply(void 0,e)+tr.apply(void 0,n)}var er={extrema:Qn,box:function(t,e,n,r,i,a,o,s){for(var l=[t,o],c=[e,s],u=Qn(t,n,i,o),h=Qn(e,r,a,s),f=0;f<u.length;f++)l.push(Kn(t,n,i,o,u[f]));for(var d=0;d<h.length;d++)c.push(Kn(e,r,a,s,h[d]));return zn(l,c)},length:function(t,e,n,r,i,a,o,s){return tr(t,e,n,r,i,a,o,s,3)},nearestPoint:function(t,e,n,r,i,a,o,s,l,c,u){return Yn([t,n,i,o],[e,r,a,s],l,c,Kn,u)},pointDistance:function(t,e,n,r,i,a,o,s,l,c,u){t=this.nearestPoint(t,e,n,r,i,a,o,s,l,c,u);return Dn(t.x,t.y,l,c)},interpolationAt:Kn,pointAt:function(t,e,n,r,i,a,o,s,l){return{x:Kn(t,n,i,o,l),y:Kn(e,r,a,s,l)}},divide:Jn,tangentAngle:function(t,e,n,r,i,a,o,s,l){t=Zn(t,n,i,o,l),n=Zn(e,r,a,s,l);return Gn(Math.atan2(n,t))}};function nr(t,e){t=Math.abs(t);return 0<e?t:-1*t}var rr=function(t,e,n,r,i,a){var o=n,s=r;if(0===o||0===s)return{x:t,y:e};for(var n=i-t,r=a-e,l=Math.abs(n),c=Math.abs(r),u=o*o,h=s*s,f=Math.PI/4,d=0,p=0,g=0;g<4;g++){var d=o*Math.cos(f),p=s*Math.sin(f),m=(u-h)*Math.pow(Math.cos(f),3)/o,v=(h-u)*Math.pow(Math.sin(f),3)/s,y=d-m,b=p-v,m=l-m,v=c-v,x=Math.hypot(b,y),w=Math.hypot(v,m);f+=x*Math.asin((y*v-b*m)/(x*w))/Math.sqrt(u+h-d*d-p*p),f=Math.min(Math.PI/2,Math.max(0,f))}return{x:t+nr(d,n),y:e+nr(p,r)}};function ir(t,e,n,r,i,a){return n*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+t}function ar(t,e,n,r,i,a){return n*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+e}function or(t,e,n){return{x:t*Math.cos(n),y:e*Math.sin(n)}}function sr(t,e,n){var r=Math.cos(n),n=Math.sin(n);return[t*r-e*n,t*n+e*r]}var lr={box:function(t,e,n,r,i,a,o){for(var s=Math.atan(-r/n*Math.tan(i)),l=1/0,c=-1/0,u=[a,o],h=2*-Math.PI;h<=2*Math.PI;h+=Math.PI){var f=s+h;a<o?a<f&&f<o&&u.push(f):o<f&&f<a&&u.push(f)}for(var d=0;d<u.length;d++){var p=ir(t,0,n,r,i,u[d]);p<l&&(l=p),c<p&&(c=p)}for(var g=Math.atan(r/(n*Math.tan(i))),m=1/0,v=-1/0,y=[a,o],b=2*-Math.PI;b<=2*Math.PI;b+=Math.PI){var x=g+b;a<o?a<x&&x<o&&y.push(x):o<x&&x<a&&y.push(x)}for(var w=0;w<y.length;w++){var M=ar(0,e,n,r,i,y[w]);M<m&&(m=M),v<M&&(v=M)}return{x:l,y:m,width:c-l,height:v-m}},length:function(t,e,n,r,i,a,o){},nearestPoint:function(t,e,n,r,i,a,o,s,l){var s=sr(s-t,l-e,-i),l=s[0],s=s[1],l=rr(0,0,n,r,l,s),c=(s=l.x,c=l.y,(Math.atan2(c*n,s*r)+2*Math.PI)%(2*Math.PI)),s=(c<a?l=or(n,r,a):o<c&&(l=or(n,r,o)),sr(l.x,l.y,i));return{x:s[0]+t,y:s[1]+e}},pointDistance:function(t,e,n,r,i,a,o,s,l){t=this.nearestPoint(t,e,n,r,i,a,o,s,l);return Dn(t.x,t.y,s,l)},pointAt:function(t,e,n,r,i,a,o,s){o=(o-a)*s+a;return{x:ir(t,0,n,r,i,o),y:ar(0,e,n,r,i,o)}},tangentAngle:function(t,e,n,r,i,a,o,s){var l,o=(o-a)*s+a,s=(s=r,a=i,l=o,-1*n*Math.cos(a)*Math.sin(l)-s*Math.sin(a)*Math.cos(l)),i=(a=r,l=i,r=o,-1*n*Math.sin(l)*Math.sin(r)+a*Math.cos(l)*Math.cos(r));return Gn(Math.atan2(i,s))}};function cr(t){for(var e=0,n=[],r=0;r<t.length-1;r++){var i=t[r],a=t[r+1],o=Dn(i[0],i[1],a[0],a[1]);n.push({from:i,to:a,length:o}),e+=o}return{segments:n,totalLength:e}}var ur,hr,fr={box:function(t){for(var e=[],n=[],r=0;r<t.length;r++){var i=t[r];e.push(i[0]),n.push(i[1])}return zn(e,n)},length:function(t){var e=t;if(e.length<2)return 0;for(var n=0,r=0;r<e.length-1;r++){var i=e[r],a=e[r+1];n+=Dn(i[0],i[1],a[0],a[1])}return n},pointAt:function(t,e){var n=e;if(1<n||n<0||t.length<2)return null;var e=cr(t),r=e.segments,i=e.totalLength;if(0===i)return{x:t[0][0],y:t[0][1]};for(var a=0,o=null,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(a<=n&&n<=a+l){o=Wn.pointAt(c[0],c[1],u[0],u[1],(n-a)/l);break}a+=l}return o},pointDistance:function(t,e,n){for(var r=t,i=e,a=n,o=1/0,s=0;s<r.length-1;s++){var l=r[s],c=r[s+1],l=Wn.pointDistance(l[0],l[1],c[0],c[1],i,a);l<o&&(o=l)}return o},tangentAngle:function(t,e){var n=e;if(1<n||n<0||t.length<2)return 0;for(var r=(t=cr(t)).segments,i=t.totalLength,a=0,o=0,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(a<=n&&n<=a+l){o=Math.atan2(u[1]-c[1],u[0]-c[0]);break}a+=l}return o}},e={exports:{}};function dr(){}function pr(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function gr(t,e,n,r,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");n=new pr(n,r||t,i),r=hr?hr+e:e;return t._events[r]?t._events[r].fn?t._events[r]=[t._events[r],n]:t._events[r].push(n):(t._events[r]=n,t._eventsCount++),t}function mr(t,e){0==--t._eventsCount?t._events=new dr:delete t._events[e]}function vr(){this._events=new dr,this._eventsCount=0}r=e,ur=Object.prototype.hasOwnProperty,hr="~",Object.create&&(dr.prototype=Object.create(null),(new dr).__proto__||(hr=!1)),vr.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)ur.call(t,e)&&n.push(hr?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},vr.prototype.listeners=function(t){var t=hr?hr+t:t,e=this._events[t];if(!e)return[];if(e.fn)return[e.fn];for(var n=0,r=e.length,i=new Array(r);n<r;n++)i[n]=e[n].fn;return i},vr.prototype.listenerCount=function(t){t=hr?hr+t:t,t=this._events[t];return t?t.fn?1:t.length:0},vr.prototype.emit=function(t,e,n,r,i,a){var o=hr?hr+t:t;if(!this._events[o])return!1;var s,l=this._events[o],c=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,n),!0;case 4:return l.fn.call(l.context,e,n,r),!0;case 5:return l.fn.call(l.context,e,n,r,i),!0;case 6:return l.fn.call(l.context,e,n,r,i,a),!0}for(f=1,s=new Array(c-1);f<c;f++)s[f-1]=arguments[f];l.fn.apply(l.context,s)}else for(var u,h=l.length,f=0;f<h;f++)switch(l[f].once&&this.removeListener(t,l[f].fn,void 0,!0),c){case 1:l[f].fn.call(l[f].context);break;case 2:l[f].fn.call(l[f].context,e);break;case 3:l[f].fn.call(l[f].context,e,n);break;case 4:l[f].fn.call(l[f].context,e,n,r);break;default:if(!s)for(u=1,s=new Array(c-1);u<c;u++)s[u-1]=arguments[u];l[f].fn.apply(l[f].context,s)}return!0},vr.prototype.on=function(t,e,n){return gr(this,t,e,n,!1)},vr.prototype.once=function(t,e,n){return gr(this,t,e,n,!0)},vr.prototype.removeListener=function(t,e,n,r){t=hr?hr+t:t;if(this._events[t])if(e){var i=this._events[t];if(i.fn)i.fn!==e||r&&!i.once||n&&i.context!==n||mr(this,t);else{for(var a=0,o=[],s=i.length;a<s;a++)(i[a].fn!==e||r&&!i[a].once||n&&i[a].context!==n)&&o.push(i[a]);o.length?this._events[t]=1===o.length?o[0]:o:mr(this,t)}}else mr(this,t);return this},vr.prototype.removeAllListeners=function(t){return t?(t=hr?hr+t:t,this._events[t]&&mr(this,t)):(this._events=new dr,this._eventsCount=0),this},vr.prototype.off=vr.prototype.removeListener,vr.prototype.addListener=vr.prototype.on,vr.prefixed=hr,r.exports=vr.EventEmitter=vr;var i,g,yr,br,xr,wr=e.exports;function Mr(){Mr=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return k()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===h)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(M([]))),m=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function v(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function y(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function M(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:k}}function k(){return{value:void 0,done:!0}}return c(m,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(m),t},o.awrap=function(t){return{__await:t}},v(y.prototype),a(y.prototype,n,function(){return this}),o.AsyncIterator=y,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new y(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},v(m),a(m,i,"Generator"),a(m,r,function(){return this}),a(m,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=M,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:M(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},o}function kr(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Er(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){kr(r,e,n,i,a,"next",t)}function a(t){kr(r,e,n,i,a,"throw",t)}i(void 0)})}}function Or(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,function(t){t=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);n=n.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==typeof t?t:String(t)}(r.key),r)}}function Sr(t,e,n){e&&Or(t.prototype,e),n&&Or(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function f(){return(f=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function _r(t,e){t.prototype=Object.create(e.prototype),Ar(t.prototype.constructor=t,e)}function Ar(t,e){return(Ar=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Tr(t,e){if(null==t)return{};for(var n,r={},i=Object.keys(t),a=0;a<i.length;a++)n=i[a],0<=e.indexOf(n)||(r[n]=t[n]);return r}function Pr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Lr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Cr(t,e){var n,r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){var n;if(t)return"string"==typeof t?Lr(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lr(t,e):void 0}(t))||e&&t&&"number"==typeof t.length)return r&&(t=r),n=0,function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(n=i=i||{}).COORDINATE="<coordinate>",n.COLOR="<color>",n.PAINT="<paint>",n.NUMBER="<number>",n.ANGLE="<angle>",n.OPACITY_VALUE="<opacity-value>",n.SHADOW_BLUR="<shadow-blur>",n.LENGTH="<length>",n.PERCENTAGE="<percentage>",n.LENGTH_PERCENTAGE="<length> | <percentage>",n.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",n.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",n.LIST_OF_POINTS="<list-of-points>",n.PATH="<path>",n.FILTER="<filter>",n.Z_INDEX="<z-index>",n.OFFSET_DISTANCE="<offset-distance>",n.DEFINED_PATH="<defined-path>",n.MARKER="<marker>",n.TRANSFORM="<transform>",n.TRANSFORM_ORIGIN="<transform-origin>",n.TEXT="<text>",n.TEXT_TRANSFORM="<text-transform>",(r=g=g||{})[r.kUnknown=0]="kUnknown",r[r.kNumber=1]="kNumber",r[r.kPercentage=2]="kPercentage",r[r.kEms=3]="kEms",r[r.kPixels=4]="kPixels",r[r.kRems=5]="kRems",r[r.kDegrees=6]="kDegrees",r[r.kRadians=7]="kRadians",r[r.kGradians=8]="kGradians",r[r.kTurns=9]="kTurns",r[r.kMilliseconds=10]="kMilliseconds",r[r.kSeconds=11]="kSeconds",r[r.kInteger=12]="kInteger",(e=yr=yr||{})[e.kUNumber=0]="kUNumber",e[e.kUPercent=1]="kUPercent",e[e.kULength=2]="kULength",e[e.kUAngle=3]="kUAngle",e[e.kUTime=4]="kUTime",e[e.kUOther=5]="kUOther",(n=br=br||{})[n.kYes=0]="kYes",n[n.kNo=1]="kNo",(r=xr=xr||{})[r.kYes=0]="kYes",r[r.kNo=1]="kNo";function Nr(t){var e=1;switch(t){case g.kPixels:case g.kDegrees:case g.kSeconds:break;case g.kMilliseconds:e=.001;break;case g.kRadians:e=180/Math.PI;break;case g.kGradians:e=.9;break;case g.kTurns:e=360}return e}function jr(t){switch(t){case g.kNumber:case g.kInteger:return"";case g.kPercentage:return"%";case g.kEms:return"em";case g.kRems:return"rem";case g.kPixels:return"px";case g.kDegrees:return"deg";case g.kRadians:return"rad";case g.kGradians:return"grad";case g.kMilliseconds:return"ms";case g.kSeconds:return"s";case g.kTurns:return"turn"}return""}var Rr,Ir,Br=[{name:"em",unit_type:g.kEms},{name:"px",unit_type:g.kPixels},{name:"deg",unit_type:g.kDegrees},{name:"rad",unit_type:g.kRadians},{name:"grad",unit_type:g.kGradians},{name:"ms",unit_type:g.kMilliseconds},{name:"s",unit_type:g.kSeconds},{name:"rem",unit_type:g.kRems},{name:"turn",unit_type:g.kTurns}],Dr=((e=Rr=Rr||{})[e.kUnknownType=0]="kUnknownType",e[e.kUnparsedType=1]="kUnparsedType",e[e.kKeywordType=2]="kKeywordType",e[e.kUnitType=3]="kUnitType",e[e.kSumType=4]="kSumType",e[e.kProductType=5]="kProductType",e[e.kNegateType=6]="kNegateType",e[e.kInvertType=7]="kInvertType",e[e.kMinType=8]="kMinType",e[e.kMaxType=9]="kMaxType",e[e.kClampType=10]="kClampType",e[e.kTransformType=11]="kTransformType",e[e.kPositionType=12]="kPositionType",e[e.kURLImageType=13]="kURLImageType",e[e.kColorType=14]="kColorType",e[e.kUnsupportedColorType=15]="kUnsupportedColorType",function(e){return Br.find(function(t){return t.name===e}).unit_type}),n=function(){function t(){}t.isAngle=function(t){return t===g.kDegrees||t===g.kRadians||t===g.kGradians||t===g.kTurns},t.isLength=function(t){return t>=g.kEms&&t<g.kDegrees},t.isRelativeUnit=function(t){return t===g.kPercentage||t===g.kEms||t===g.kRems},t.isTime=function(t){return t===g.kSeconds||t===g.kMilliseconds};var e=t.prototype;return e.toString=function(){return this.buildCSSText(br.kNo,xr.kNo,"")},e.isNumericValue=function(){return this.getType()>=Rr.kUnitType&&this.getType()<=Rr.kClampType},t}(),r=function(n){function t(t){var e=n.call(this)||this;return e.colorSpace=void 0,e.colorSpace=t,e}_r(t,n);var e=t.prototype;return e.getType=function(){return Rr.kColorType},e.to=function(t){return this},t}(n),Fr=((e=Ir=Ir||{})[e.Constant=0]="Constant",e[e.LinearGradient=1]="LinearGradient",e[e.RadialGradient=2]="RadialGradient",function(r){function t(t,e){var n=r.call(this)||this;return n.type=void 0,n.value=void 0,n.type=t,n.value=e,n}_r(t,r);var e=t.prototype;return e.clone=function(){return new t(this.type,this.value)},e.buildCSSText=function(t,e,n){return n},e.getType=function(){return Rr.kColorType},t}(n)),zr=function(n){function t(t){var e=n.call(this)||this;return e.value=void 0,e.value=t,e}_r(t,n);var e=t.prototype;return e.clone=function(){return new t(this.value)},e.getType=function(){return Rr.kKeywordType},e.buildCSSText=function(t,e,n){return n+this.value},t}(n);function Gr(o,s){if("function"!=typeof o||null!=s&&"function"!=typeof s)throw new TypeError("Expected a function");function l(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,i=s?s.apply(this,e):e[0],a=l.cache;return a.has(i)?a.get(i):(r=o.apply(this,e),l.cache=a.set(i,r)||a,r)}return l.cache=new(Gr.Cache||Map),l}Gr.Cache=Map;function Wr(t){return t.split("").map(function(t,e){return t.toUpperCase()===t?(0!==e?"-":"")+t.toLowerCase():t}).join("")}var Yr=Gr(function(t){return(t=void 0===t?"":t).replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})});function Hr(t){return"function"==typeof t}function Vr(t,e){void 0===e&&(e="");var n="";if(Number.isFinite(t)){if(!Number.isNaN(t))throw new Error;n="NaN"}else n=0<t?"infinity":"-infinity";return n+e}function qr(t){switch(function(t){switch(t){case g.kNumber:case g.kInteger:return yr.kUNumber;case g.kPercentage:return yr.kUPercent;case g.kPixels:return yr.kULength;case g.kMilliseconds:case g.kSeconds:return yr.kUTime;case g.kDegrees:case g.kRadians:case g.kGradians:case g.kTurns:return yr.kUAngle;default:return yr.kUOther}}(t)){case yr.kUNumber:return g.kNumber;case yr.kULength:return g.kPixels;case yr.kUPercent:return g.kPercentage;case yr.kUTime:return g.kSeconds;case yr.kUAngle:return g.kDegrees;default:return g.kUnknown}}function $r(t){return ni[t]||(ni[t]=new zr(t)),ni[t]}var Ur={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},Xr=Gr(function(t){var t=Yr(t),e=Ur[t];return(null==e?void 0:e.alias)||t}),Kr=function(i){function n(t,e){var n,r;return void 0===e&&(e=g.kNumber),(n=i.call(this)||this).unit=void 0,n.value=void 0,r="string"==typeof e?(r=e)?"number"===r?g.kNumber:"percent"===r||"%"===r?g.kPercentage:Dr(r):g.kUnknown:e,n.unit=r,n.value=t,n}_r(n,i);var t=n.prototype;return t.clone=function(){return new n(this.value,this.unit)},t.equals=function(t){return this.value===t.value&&this.unit===t.unit},t.getType=function(){return Rr.kUnitType},t.convertTo=function(t){var e;return this.unit===t?new n(this.value,this.unit):(e=qr(this.unit))!==qr(t)||e===g.kUnknown?null:(e=Nr(this.unit)/Nr(t),new n(this.value*e,t))},t.buildCSSText=function(t,e,n){switch(this.unit){case g.kUnknown:break;case g.kInteger:i=Number(this.value).toFixed(0);break;case g.kNumber:case g.kPercentage:case g.kEms:case g.kRems:case g.kPixels:case g.kDegrees:case g.kRadians:case g.kGradians:case g.kMilliseconds:case g.kSeconds:case g.kTurns:var r,i,a=this.value,o=jr(this.unit);i=a<-999999||999999<a?(r=jr(this.unit),!Number.isFinite(a)||Number.isNaN(a)?Vr(a,r):a+(r||"")):""+a+o}return n+=i},n}(n),Zr=new Kr(0,"px"),Qr=(new Kr(1,"px"),new Kr(0,"deg")),Jr=function(o){function t(t,e,n,r,i){var a;return void 0===r&&(r=1),void 0===i&&(i=!1),(a=o.call(this,"rgb")||this).r=void 0,a.g=void 0,a.b=void 0,a.alpha=void 0,a.isNone=void 0,a.r=t,a.g=e,a.b=n,a.alpha=r,a.isNone=i,a}_r(t,o);var e=t.prototype;return e.clone=function(){return new t(this.r,this.g,this.b,this.alpha)},e.buildCSSText=function(t,e,n){return n+("rgba("+this.r+","+this.g+","+this.b+","+this.alpha)+")"},t}(r),ti=function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,t=t.syntax;A.styleValueRegistry.registerMetadata({n:e,inh:n,int:r,d:i,syntax:t})},ei=new zr("unset"),e=new zr("initial"),n=new zr("inherit"),ni={"":ei,unset:ei,initial:e,inherit:n},ri=new Jr(0,0,0,0,!0),ii=new Jr(0,0,0,0),ai=Gr(function(t,e,n,r){return new Jr(t,e,n,r)},function(t,e,n,r){return"rgba("+t+","+e+","+n+","+r+")"}),oi=function(t,e){return void 0===e&&(e=g.kNumber),new Kr(t,e)},si=new Kr(50,"%"),li={},ci=0;var ui="undefined"!=typeof window&&void 0!==window.document;function hi(t,e){var n=Number(t.parsedStyle.zIndex),r=Number(e.parsedStyle.zIndex);if(n===r){var i=t.parentNode;if(i)return(i=i.childNodes||[]).indexOf(t)-i.indexOf(e)}return n-r}function fi(t){var e,n=t;do{if(null==(e=n.parsedStyle)?void 0:e.clipPath)return n}while(null!==(n=n.parentElement));return null}function di(t,e){if(ui)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}var pi="Method not implemented.",gi="Use document.documentElement instead.",mi={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"};function vi(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function yi(t,e,n){t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2]}function bi(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function xi(t,e,n){t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function wi(t){return void 0===t?0:360<t||t<-360?t%360:t}function Mi(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Array.isArray(t)&&3===t.length?Pt(t):Ke(t)?M(t,e,n):M(t[0],t[1]||e,t[2]||n)}function ki(t){return t*(Math.PI/180)}function Ei(t){return t*(180/Math.PI)}function Oi(t,e){return 16===e.length?(n=t,r=e,o=.5*Math.PI,s=(c=xt(v(),r))[0],l=c[1],c=c[2],(u=Math.asin(-r[2]/s))<o?-o<u?(i=Math.atan2(r[6]/l,r[10]/c),a=Math.atan2(r[1]/s,r[0]/s)):(a=0,i=-Math.atan2(r[4]/l,r[5]/l)):(a=0,i=Math.atan2(r[4]/l,r[5]/l)),n[0]=i,n[1]=u,n[2]=a,n):(o=t,s=(c=e)[0],r=c[1],l=c[2],c=c[3],.499995*(n=s*s+(i=r*r)+(u=l*l)+(a=c*c))<(t=s*c-r*l)?(o[0]=Math.PI/2,o[1]=2*Math.atan2(r,s),o[2]=0):t<-.499995*n?(o[0]=-Math.PI/2,o[1]=2*Math.atan2(r,s),o[2]=0):(o[0]=Math.asin(2*(s*l-c*r)),o[1]=Math.atan2(2*(s*c+r*l),1-2*(u+a)),o[2]=Math.atan2(2*(s*r+l*c),1-2*(i+u))),o);var n,r,i,a,o,s,l,c,u}function Si(t,e,n,r,i){var a,o,s,l,c=Math.cos(t),t=Math.sin(t);return a=r*c,o=i*t,r=-r*t,t=i*c,c=i=0,e=e,n=n,s=1,(l=new K(9))[0]=a,l[1]=o,l[2]=i,l[3]=r,l[4]=t,l[5]=c,l[6]=e,l[7]=n,l[8]=s,l}function _i(t){var e=t[0],n=t[1],r=t[3],i=t[4],a=Math.sqrt(e*e+n*n),o=Math.sqrt(r*r+i*i);e*i-n*r<0&&(e<i?a=-a:o=-o),a&&(e*=1/a,n*=1/a);r=Ei(Math.atan2(n,e));return[t[6],t[7],a,o,r]}var Ai=J(),Ti=J(),Pi=qt(),d=[v(),v(),v()],Li=v();function Ci(t,e,n,r,i,a){if(function(t,e){var n=e[15];if(0===n)return;for(var r=1/n,i=0;i<16;i++)t[i]=e[i]*r;return 1}(Ai,t)&&(et(Ti,Ai),Ti[3]=0,Ti[7]=0,Ti[11]=0,Ti[15]=1,!(Math.abs(ut(Ti))<1e-8))){var t=Ai[3],o=Ai[7],s=Ai[11],l=Ai[12],c=Ai[13],u=Ai[14],h=Ai[15];if(0!==t||0!==o||0!==s){if(Pi[0]=t,Pi[1]=o,Pi[2]=s,Pi[3]=h,!ct(Ti,Ti))return;lt(Ti,Ti),$t(i,Pi,Ti)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=l,e[1]=c,e[2]=u,t=Ai,(o=d)[0][0]=t[0],o[0][1]=t[1],o[0][2]=t[2],o[1][0]=t[4],o[1][1]=t[5],o[1][2]=t[6],o[2][0]=t[8],o[2][1]=t[9],o[2][2]=t[10],n[0]=Lt(d[0]),Bt(d[0],d[0]),r[0]=Dt(d[0],d[1]),Ni(d[1],d[1],d[0],1,-r[0]),n[1]=Lt(d[1]),Bt(d[1],d[1]),r[0]/=n[1],r[1]=Dt(d[0],d[2]),Ni(d[2],d[2],d[0],1,-r[1]),r[2]=Dt(d[1],d[2]),Ni(d[2],d[2],d[1],1,-r[2]),n[2]=Lt(d[2]),Bt(d[2],d[2]),r[1]/=n[2],r[2]/=n[2],Ft(Li,d[1],d[2]),Dt(d[0],Li)<0)for(var f=0;f<3;f++)n[f]*=-1,d[f][0]*=-1,d[f][1]*=-1,d[f][2]*=-1;a[0]=.5*Math.sqrt(Math.max(1+d[0][0]-d[1][1]-d[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-d[0][0]+d[1][1]-d[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-d[0][0]-d[1][1]+d[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+d[0][0]+d[1][1]+d[2][2],0)),d[2][1]>d[1][2]&&(a[0]=-a[0]),d[0][2]>d[2][0]&&(a[1]=-a[1]),d[1][0]>d[0][1]&&(a[2]=-a[2])}}function Ni(t,e,n,r,i){t[0]=e[0]*r+n[0]*i,t[1]=e[1]*r+n[1]*i,t[2]=e[2]*r+n[2]*i}var ji=J();function Ri(t,l){var c,u;return t&&t.length&&(u=c=0,l?(c=l.parsedStyle.defX||0,u=l.parsedStyle.defY||0,l.resetLocalTransform(),l.setLocalPosition(c,u)):l=new Ls({}),t.forEach(function(t){var e,n,r,i,a,o,s=t.t,t=t.d;"scale"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1],l.scaleLocal(o[0],o[1],1)):"scalex"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(o[0],1,1)):"scaley"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,o[0],1)):"scalez"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,1,o[0])):"scale3d"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1,1],l.scaleLocal(o[0],o[1],o[2])):"translate"===s?(o=t||[Zr,Zr],l.translateLocal(o[0].value,o[1].value,0)):"translatex"===s?(o=t||[Zr],l.translateLocal(o[0].value,0,0)):"translatey"===s?(o=t||[Zr],l.translateLocal(0,o[0].value,0)):"translatez"===s?(o=t||[Zr],l.translateLocal(0,0,o[0].value)):"translate3d"===s?(o=t||[Zr,Zr,Zr],l.translateLocal(o[0].value,o[1].value,o[2].value)):"rotate"===s?(o=t||[Qr],l.rotateLocal(0,0,Ja(o[0]))):"rotatex"===s?(o=t||[Qr],l.rotateLocal(Ja(o[0]),0,0)):"rotatey"===s?(o=t||[Qr],l.rotateLocal(0,Ja(o[0]),0)):"rotatez"===s?(o=t||[Qr],l.rotateLocal(0,0,Ja(o[0]))):"rotate3d"!==s&&("skew"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0,0],l.setLocalSkew(ki(o[0]),ki(o[1]))):"skewx"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(ki(o[0]),l.getLocalSkew()[1])):"skewy"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(l.getLocalSkew()[0],ki(o[0]))):"matrix"===s?(e=(o=t.map(function(t){return t.value}))[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],l.setLocalTransform(ot(ji,e,n,0,0,r,i,0,0,0,0,1,0,a+c,o+u,0,1))):"matrix3d"===s&&(ot.apply(Tt,[ji].concat(t.map(function(t){return t.value}))),ji[12]+=c,ji[13]+=u,l.setLocalTransform(ji)))})),l.getLocalTransform()}Ii={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},Bi="";var Ii,Bi,E,Di=function(t){return Bi=t,zi()};function Fi(t){throw new Error(Bi+": "+t)}function zi(){var t=Ki(Gi);return 0<Bi.length&&Fi("Invalid input not EOF"),t}function Gi(){return Wi("linear-gradient",Ii.linearGradient,Hi)||Wi("repeating-linear-gradient",Ii.repeatingLinearGradient,Hi)||Wi("radial-gradient",Ii.radialGradient,Vi)||Wi("repeating-radial-gradient",Ii.repeatingRadialGradient,Vi)||Wi("conic-gradient",Ii.conicGradient,Vi)}function Wi(n,t,r){return Yi(t,function(t){var e=r();return e&&!ra(Ii.comma)&&Fi("Missing comma before color stops"),{type:n,orientation:e,colorStops:Ki(Zi)}})}function Yi(t,e){t=ra(t);if(t)return ra(Ii.startCall)||Fi("Missing ("),e=e(t),ra(Ii.endCall)||Fi("Missing )"),e}function Hi(){return na("directional",Ii.sideOrCorner,1)||na("angular",Ii.angleValue,1)}function Vi(){var t,e,n=qi();return n&&((t=[]).push(n),e=Bi,ra(Ii.comma))&&((n=qi())?t.push(n):Bi=e),t}function qi(){var t,e=function(){var t=na("shape",/^(circle)/i,0);t&&(t.style=ea()||$i());return t}()||function(){var t=na("shape",/^(ellipse)/i,0);t&&(t.style=Ji()||$i());return t}();return e?e.at=Ui():(t=$i())?(e=t,(t=Ui())&&(e.at=t)):(t=Xi())&&(e={type:"default-radial",at:t}),e}function $i(){return na("extent-keyword",Ii.extentKeywords,1)}function Ui(){var t;if(na("position",/^at/,0))return(t=Xi())||Fi("Missing positioning value"),t}function Xi(){var t={x:Ji(),y:Ji()};if(t.x||t.y)return{type:"position",value:t}}function Ki(t){var e=t(),n=[];if(e)for(n.push(e);ra(Ii.comma);)(e=t())?n.push(e):Fi("One extra comma");return n}function Zi(){var t=na("hex",Ii.hexColor,1)||Yi(Ii.rgbaColor,function(){return{type:"rgba",value:Ki(Qi)}})||Yi(Ii.rgbColor,function(){return{type:"rgb",value:Ki(Qi)}})||na("literal",Ii.literalColor,0);return t||Fi("Expected color definition"),t.length=Ji(),t}function Qi(){return ra(Ii.number)[1]}function Ji(){return na("%",Ii.percentageValue,1)||ta()||ea()}function ta(){return na("position-keyword",Ii.positionKeywords,1)}function ea(){return na("px",Ii.pixelValue,1)||na("em",Ii.emValue,1)}function na(t,e,n){e=ra(e);if(e)return{type:t,value:e[n]}}function ra(t){var e=/^[\n\r\t\s]+/.exec(Bi),e=(e&&ia(e[0].length),t.exec(Bi));return e&&ia(e[0].length),e}function ia(t){Bi=Bi.substring(t)}function aa(t){var e;return 0===t.parsedStyle.path.totalLength&&(t.parsedStyle.path.totalLength=Re(t.parsedStyle.path.absolutePath,void 0,y(y({},e),{bbox:!1,length:!0})).length),t.parsedStyle.path.totalLength}function oa(t,e){return t[0]===e[0]&&t[1]===e[1]}function sa(t,e){var n,r=t.prePoint,i=t.currentPoint,t=t.nextPoint,a=Math.pow(i[0]-r[0],2)+Math.pow(i[1]-r[1],2),o=Math.pow(i[0]-t[0],2)+Math.pow(i[1]-t[1],2),r=Math.pow(r[0]-t[0],2)+Math.pow(r[1]-t[1],2),r=Math.acos((a+o-r)/(2*Math.sqrt(a)*Math.sqrt(o)));return!r||0===Math.sin(r)||(void(a=0)===n&&(n=1e-5),Math.abs(r-a)<n)?{xExtra:0,yExtra:0}:(o=Math.abs(Math.atan2(t[1]-i[1],t[0]-i[0])),a=Math.abs(Math.atan2(t[0]-i[0],t[1]-i[1])),o=o>Math.PI/2?Math.PI-o:o,a=a>Math.PI/2?Math.PI-a:a,{xExtra:Math.cos(r/2-o)*(e/2*(1/Math.sin(r/2)))-e/2||0,yExtra:Math.cos(a-r/2)*(e/2*(1/Math.sin(r/2)))-e/2||0})}function la(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}(r=E=E||{}).GROUP="g",r.CIRCLE="circle",r.ELLIPSE="ellipse",r.IMAGE="image",r.RECT="rect",r.LINE="line",r.POLYLINE="polyline",r.POLYGON="polygon",r.TEXT="text",r.PATH="path",r.HTML="html",r.MESH="mesh";function ca(t,e,n,r,i,a,o,s){var l,c,u;return e=Math.abs(e),n=Math.abs(n),r=ki(r=Qe(r,360)),t.x===o.x&&t.y===o.y?{x:t.x,y:t.y,ellipticalArcAngle:0}:0===e||0===n?{x:0,y:0,ellipticalArcAngle:0}:(u=(t.x-o.x)/2,c=(t.y-o.y)/2,u={x:Math.cos(r)*u+Math.sin(r)*c,y:-Math.sin(r)*u+Math.cos(r)*c},1<(c=Math.pow(u.x,2)/Math.pow(e,2)+Math.pow(u.y,2)/Math.pow(n,2))&&(e=Math.sqrt(c)*e,n=Math.sqrt(c)*n),c=(c=(Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(u.y,2)-Math.pow(n,2)*Math.pow(u.x,2))/(Math.pow(e,2)*Math.pow(u.y,2)+Math.pow(n,2)*Math.pow(u.x,2)))<0?0:c,i=(i!==a?1:-1)*Math.sqrt(c),c=e*u.y/n*i,i*=-n*u.x/e,t={x:Math.cos(r)*c-Math.sin(r)*i+(t.x+o.x)/2,y:Math.sin(r)*c+Math.cos(r)*i+(t.y+o.y)/2},l=ua({x:1,y:0},o={x:(u.x-c)/e,y:(u.y-i)/n}),o=ua(o,{x:(-u.x-c)/e,y:(-u.y-i)/n}),!a&&0<o?o-=2*Math.PI:a&&o<0&&(o+=2*Math.PI),c=l+(o%=2*Math.PI)*s,u=e*Math.cos(c),i=n*Math.sin(c),{x:Math.cos(r)*u-Math.sin(r)*i+t.x,y:Math.sin(r)*u+Math.cos(r)*i+t.y,ellipticalArcStartAngle:l,ellipticalArcEndAngle:l+o,ellipticalArcAngle:c,ellipticalArcCenter:t,resultantRx:e,resultantRy:n})}var ua=function(t,e){var n=t.x*e.x+t.y*e.y,r=Math.sqrt((Math.pow(t.x,2)+Math.pow(t.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2)));return(t.x*e.y-t.y*e.x<0?-1:1)*Math.acos(n/r)};function ha(t){for(var e=[],n=null,r=null,i=null,a=0,o=t.length,s=0;s<o;s++){var l=t[s],r=t[s+1],c=l[0],u={command:c,prePoint:n,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(c){case"M":i=[l[1],l[2]],a=s;break;case"A":var h=function(t,e){var n=e[1],r=e[2],i=Qe(ki(e[3]),2*Math.PI),a=e[4],o=e[5],s=t[0],l=t[1],c=e[6],e=e[7],u=Math.cos(i)*(s-c)/2+Math.sin(i)*(l-e)/2,h=-1*Math.sin(i)*(s-c)/2+Math.cos(i)*(l-e)/2,f=u*u/(n*n)+h*h/(r*r);1<f&&(n*=Math.sqrt(f),r*=Math.sqrt(f));f=n*n*(h*h)+r*r*(u*u),f=f?Math.sqrt((n*n*(r*r)-f)/f):1;a===o&&(f*=-1);isNaN(f)&&(f=0);var d=r?f*n*h/r:0,f=n?f*-r*u/n:0,s=(s+c)/2+Math.cos(i)*d-Math.sin(i)*f,l=(l+e)/2+Math.sin(i)*d+Math.cos(i)*f,p=[(u-d)/n,(h-f)/r],u=[(-1*u-d)/n,(-1*h-f)/r],d=ga([1,0],p),h=ga(p,u);pa(p,u)<=-1&&(h=Math.PI);1<=pa(p,u)&&(h=0);0===o&&0<h&&(h-=2*Math.PI);1===o&&h<0&&(h+=2*Math.PI);return{cx:s,cy:l,rx:oa(t,[c,e])?0:n,ry:oa(t,[c,e])?0:r,startAngle:d,endAngle:d+h,xRotation:i,arcFlag:a,sweepFlag:o}}(n,l);u.arcParams=h}"Z"===c?(n=i,r=t[a+1]):n=[l[(y=l.length)-2],l[y-1]],r&&"Z"===r[0]&&(r=t[a],e[a])&&(e[a].prePoint=n),u.currentPoint=n,e[a]&&oa(n,e[a].currentPoint)&&(e[a].prePoint=u.prePoint);var f,d,p,g,m,v,y=r?[r[r.length-2],r[r.length-1]]:null,b=(u.nextPoint=y,u.prePoint);["L","H","V"].includes(c)?(u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]]):"Q"===c?(f=[l[1],l[2]],u.startTangent=[b[0]-f[0],b[1]-f[1]],u.endTangent=[n[0]-f[0],n[1]-f[1]]):"T"===c?(d=la((f=e[s-1]).currentPoint,b),"Q"===f.command?(u.command="Q",u.startTangent=[b[0]-d[0],b[1]-d[1]],u.endTangent=[n[0]-d[0],n[1]-d[1]]):(u.command="TL",u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]])):"C"===c?(d=[l[1],l[2]],p=[l[3],l[4]],u.startTangent=[b[0]-d[0],b[1]-d[1]],u.endTangent=[n[0]-p[0],n[1]-p[1]],0===u.startTangent[0]&&0===u.startTangent[1]&&(u.startTangent=[d[0]-p[0],d[1]-p[1]]),0===u.endTangent[0]&&0===u.endTangent[1]&&(u.endTangent=[p[0]-d[0],p[1]-d[1]])):"S"===c?(g=la((p=e[s-1]).currentPoint,b),m=[l[1],l[2]],"C"===p.command?(u.command="C",u.startTangent=[b[0]-g[0],b[1]-g[1]]):(u.command="SQ",u.startTangent=[b[0]-m[0],b[1]-m[1]]),u.endTangent=[n[0]-m[0],n[1]-m[1]]):"A"===c&&(b=(g=fa(u,0)).x,m=g.y,v=(c=fa(u,1,!1)).x,c=c.y,u.startTangent=[b,m],u.endTangent=[v,c]),e.push(u)}return e}function fa(t,e,n){void 0===n&&(n=!0);var r=t.arcParams,i=r.rx,i=void 0===i?0:i,a=r.ry,a=void 0===a?0:a,o=r.xRotation,s=r.arcFlag,r=r.sweepFlag,l=ca({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},e),i=ca({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},n?e+.005:e-.005),a=i.x-l.x,o=i.y-l.y,s=Math.sqrt(a*a+o*o);return{x:-a/s,y:-o/s}}function da(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function pa(t,e){return da(t)*da(e)?(t[0]*e[0]+t[1]*e[1])/(da(t)*da(e)):1}function ga(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(pa(t,e))}function ma(t,e,n,r){var i=(-1+Math.sqrt(2))/3*4,a=t*i,i=e*i,o=n-t,t=n+t,s=r-e,e=r+e;return[["M",o,r],["C",o,r-i,n-a,s,n,s],["C",n+a,s,t,r-i,t,r],["C",t,r+i,n+a,e,n,e],["C",n-a,e,o,r+i,o,r],["Z"]]}function va(t,e){void 0===e&&(e=t.getLocalTransform());var n,r,i,a,o,s,l,c,u,h,f,d=[];switch(t.nodeName){case E.LINE:var p=t.parsedStyle,d=[["M",p.x1,p.y1],["L",p.x2,p.y2]];break;case E.CIRCLE:var p=t.parsedStyle,g=p.r;d=ma(g,g,p.cx,p.cy);break;case E.ELLIPSE:var g=t.parsedStyle;d=ma(g.rx,g.ry,g.cx,g.cy);break;case E.POLYLINE:case E.POLYGON:p=t.parsedStyle.points;g=p.points,p=t.nodeName===E.POLYGON,g=g.map(function(t,e){return[0===e?"M":"L",t[0],t[1]]}),p&&g.push(["Z"]),d=g;break;case E.RECT:var m=t.parsedStyle,v=m.width,y=m.height,b=m.x,x=m.y,m=m.radius,w=m&&m.some(function(t){return 0!==t});n=v,r=y,b=b,x=x,d=(w=w&&m.map(function(t){return Xe(t,0,Math.min(Math.abs(v)/2,Math.abs(y)/2))}))?(s=(m=0<n?1:-1)+(o=0<r?1:-1)!=0?1:0,[["M",m*(i=w[0])+b,x],["L",n-m*(a=w[1])+b,x],a?["A",a,a,0,0,s,n+b,o*a+x]:null,["L",n+b,r-o*(a=w[2])+x],a?["A",a,a,0,0,s,n+b-m*a,r+x]:null,["L",b+m*(a=w[3]),r+x],a?["A",a,a,0,0,s,b,r+x-o*a]:null,["L",b,o*i+x],i?["A",i,i,0,0,s,m*i+b,x]:null,["Z"]].filter(function(t){return t})):[["M",b,x],["L",b+n,x],["L",b+n,x+r],["L",b,x+r],["Z"]];break;case E.PATH:w=t.parsedStyle.path.absolutePath;d=[].concat(w)}if(d.length)return l=d,c=e,u=(e=(e=t).parsedStyle).defX,h=void 0===u?0:u,f=void 0===(u=e.defY)?0:u,l.reduce(function(t,e){var n,r,i,a="";return"M"===e[0]||"L"===e[0]?(n=M(e[1]-h,e[2]-f,0),c&&Gt(n,n,c),a=""+e[0]+n[0]+","+n[1]):"Z"===e[0]?a=e[0]:"C"===e[0]?(n=M(e[1]-h,e[2]-f,0),r=M(e[3]-h,e[4]-f,0),i=M(e[5]-h,e[6]-f,0),c&&(Gt(n,n,c),Gt(r,r,c),Gt(i,i,c)),a=""+e[0]+n[0]+","+n[1]+","+r[0]+","+r[1]+","+i[0]+","+i[1]):"A"===e[0]?(n=M(e[6]-h,e[7]-f,0),c&&Gt(n,n,c),a=""+e[0]+e[1]+","+e[2]+","+e[3]+","+e[4]+","+e[5]+","+n[0]+","+n[1]):"Q"===e[0]&&(r=M(e[1]-h,e[2]-f,0),i=M(e[3]-h,e[4]-f,0),c&&(Gt(r,r,c),Gt(i,i,c)),a=""+e[0]+e[1]+","+e[2]+","+e[3]+","+e[4]+"}"),t+a},"")}function ya(t,e,n){var r=!1,i=!1,e=!!e&&!e.isNone,n=!!n&&!n.isNone;return"visiblepainted"===t||"painted"===t||"auto"===t?(r=e,i=n):"visiblefill"===t||"fill"===t?r=!0:"visiblestroke"===t||"stroke"===t?i=!0:"visible"!==t&&"all"!==t||(i=r=!0),[r,i]}var ba=function(){function t(){this.callbacks=[]}var e=t.prototype;return e.tapPromise=function(t,e){this.callbacks.push(e)},e.promise=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Promise.all(this.callbacks.map(function(t){return t.apply(void 0,e)}))},t}(),xa=function(){function t(){this.callbacks=[]}var e=t.prototype;return e.tapPromise=function(t,e){this.callbacks.push(e)},e.promise=function(){var t=Er(Mr().mark(function t(){var e,n,r,i=arguments;return Mr().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.callbacks.length)return t.next=3,(r=this.callbacks)[0].apply(r,i);t.next=14;break;case 3:e=t.sent,n=0;case 5:if(n<this.callbacks.length-1)return r=this.callbacks[n],t.next=9,r(e);t.next=13;break;case 9:e=t.sent;case 10:n++,t.next=5;break;case 13:return t.abrupt("return",e);case 14:return t.abrupt("return",null);case 15:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),t}(),wa=function(){function t(){this.callbacks=[]}var e=t.prototype;return e.tap=function(t,e){this.callbacks.push(e)},e.call=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.callbacks.forEach(function(t){t.apply(void 0,e)})},t}(),Ma=function(){function t(){this.callbacks=[]}var e=t.prototype;return e.tap=function(t,e){this.callbacks.push(e)},e.call=function(){if(this.callbacks.length){for(var t,e=(t=this.callbacks)[0].apply(t,arguments),n=0;n<this.callbacks.length-1;n++)e=(0,this.callbacks[n])(e);return e}return null},t}(),ka=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Ea=/([\"\'])[^\'\"]+\1/;function Oa(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");var n=Date.now(),e=16<(e=n-ja)?0:16-e,r=Ta();return Na[r]=t,1<Object.keys(Na).length||setTimeout(function(){ja=n;var e=Na;Na={},Object.keys(e).forEach(function(t){return e[t](Ca())})},e),r}function Sa(t){delete Na[t]}function _a(t){return"string"!=typeof t?Oa:""===t?Pa.requestAnimationFrame:Pa[t+"RequestAnimationFrame"]}var Aa=1,Ta=function(){return Aa++},Pa="object"==typeof self&&self.self==self?self:"object"==typeof h&&h.global==h?h:{},La=Date.now(),Ca=function(){return Pa.performance&&"function"==typeof Pa.performance.now?Pa.performance.now():Date.now()-La},Na={},ja=Date.now(),e=function(t,e){for(var n=0;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}}(["","webkit","moz","ms","o"],_a),Ra=_a(e),Ia="string"!=typeof(n=e)?Sa:""===n?Pa.cancelAnimationFrame:Pa[n+"CancelAnimationFrame"]||Pa[n+"CancelRequestAnimationFrame"],Ba=(Pa.requestAnimationFrame=Ra,Pa.cancelAnimationFrame=Ia,/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i),Da=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,Fa=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,za=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var Ga={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},Wa=Gr(function(t){t="angular"===t.type?Number(t.value):Ga[t.value]||0;return oi(t,"deg")}),Ya=Gr(function(t){var e,n=50,r=50,i="%",a="%";return"position"===(null==t?void 0:t.type)&&(e=(t=t.value).x,t=t.y,"position-keyword"===(null==e?void 0:e.type)&&("left"===e.value?n=0:"center"===e.value?n=50:"right"===e.value?n=100:"top"===e.value?r=0:"bottom"===e.value&&(r=100)),"position-keyword"===(null==t?void 0:t.type)&&("left"===t.value?n=0:"center"===t.value?r=50:"right"===t.value?n=100:"top"===t.value?r=0:"bottom"===t.value&&(r=100)),"px"!==(null==e?void 0:e.type)&&"%"!==(null==e?void 0:e.type)&&"em"!==(null==e?void 0:e.type)||(i=null==e?void 0:e.type,n=Number(e.value)),"px"!==(null==t?void 0:t.type)&&"%"!==(null==t?void 0:t.type)&&"em"!==(null==t?void 0:t.type)||(a=null==t?void 0:t.type,r=Number(t.value))),{cx:oi(n,i),cy:oi(r,a)}}),Ha=Gr(function(t){if(-1<t.indexOf("linear")||-1<t.indexOf("radial"))return Di(t).map(function(t){for(var e=t.type,n=t.orientation,t=t.colorStops,r=t,i=r.length,a=(r[i-1].length=null!=(f=r[i-1].length)?f:{type:"%",value:"100"},1<i&&(r[0].length=null!=(f=r[0].length)?f:{type:"%",value:"0"}),0),o=Number(r[0].length.value),s=1;s<i;s++){var l,c=null==(l=r[s].length)?void 0:l.value;if(!_(c)&&!_(o)){for(var u=1;u<s-a;u++)r[a+u].length={type:"%",value:""+(o+(Number(c)-o)*u/(s-a))};a=s,o=Number(c)}}var h,f=t.map(function(t){return{offset:oi(Number(t.length.value),"%"),color:(e=(t=t).type,t=t.value,"hex"===e?"#"+t:"literal"===e?t:"rgb"===e?"rgb("+t.join(",")+")":"rgba("+t.join(",")+")")};var e});return"linear-gradient"===e?new Fr(Ir.LinearGradient,{angle:n?Wa(n):Qr,steps:f}):"radial-gradient"===e&&"shape"===(n=n||[{type:"shape",value:"circle"}])[0].type&&"circle"===n[0].value?(e=(t=Ya(n[0].at)).cx,t=t.cy,n[0].style&&(h=(n=n[0].style).type,n=n.value,h="extent-keyword"===h?$r(n):oi(n,h)),new Fr(Ir.RadialGradient,{cx:e,cy:t,size:h,steps:f})):void 0});var e=t[0];if("("===t[1]||"("===t[2])if("l"===e){var n=Ba.exec(t);if(n)return r=(null==(r=n[2].match(za))?void 0:r.map(function(t){return t.split(":")}))||[],[new Fr(Ir.LinearGradient,{angle:oi(parseFloat(n[1]),"deg"),steps:r.map(function(t){var e=t[0],t=t[1];return{offset:oi(100*Number(e),"%"),color:t}})})]}else if("r"===e){n=function(t){var t=Da.exec(t);if(t)return t=(null==(t=t[4].match(za))?void 0:t.map(function(t){return t.split(":")}))||[],{cx:oi(50,"%"),cy:oi(50,"%"),steps:t.map(function(t){var e=t[0],t=t[1];return{offset:oi(100*Number(e),"%"),color:t}})};return null}(t);if(n&&!Ue(n))return[new Fr(Ir.RadialGradient,n)]}else if("p"===e){var r=t;if(r=Fa.exec(r)){var i=r[1],r=r[2];switch(i){case"a":i="repeat";break;case"x":i="repeat-x";break;case"y":i="repeat-y";break;default:i="no-repeat"}return{image:r,repetition:i}}return null}});function Va(t){return t&&t.image}function qa(t){return t&&!_(t.r)&&!_(t.g)&&!_(t.b)}var $a=Gr(function(t){var e;return Va(t)?f({repetition:"repeat"},t):"transparent"===(t=_(t)?"":t)?ii:Ha(t="currentColor"===t?"black":t)||(e=[0,0,0,0],null!==(t=_n(t))&&(e[0]=t.r||0,e[1]=t.g||0,e[2]=t.b||0,e[3]=t.opacity),ai.apply(void 0,e))});function Ua(t,e){if(qa(t)&&qa(e))return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var e=t.slice();if(e[3])for(var n=0;n<3;n++)e[n]=Math.round(Xe(e[n],0,255));return e[3]=Xe(e[3],0,1),"rgba("+e.join(",")+")"}]}function Xa(t,e){if(_(e))return oi(0,"px");if(e=(""+e).trim().toLowerCase(),isFinite(Number(e))){if(0<="px".search(t))return oi(Number(e),"px");if(0<="deg".search(t))return oi(Number(e),"deg")}var n=[],r=(e=e.replace(t,function(t){return n.push(t),"U"+t}),"U("+t.source+")");return n.map(function(t){return oi(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)})[0]}var Ka=Gr(function(t){return Xa(new RegExp("px","g"),t)}),Za=(Gr(function(t){return Xa(new RegExp("%","g"),t)}),function(t){return Ke(t)||isFinite(Number(t))?oi(Number(t)||0,"px"):Xa(new RegExp("px|%|em|rem","g"),t)}),Qa=Gr(function(t){return Xa(new RegExp("deg|rad|grad|turn","g"),t)});function Ja(t){var e=0;return t.unit===g.kDegrees?e=t.value:t.unit===g.kRadians?e=Ei(Number(t.value)):t.unit===g.kTurns&&(e=360*Number(t.value)),e}function to(t,e){var n;return Array.isArray(t)?n=t.map(function(t){return Number(t)}):Ue(t)?n=t.split(" ").map(function(t){return Number(t)}):Ke(t)&&(n=[t]),2===e?1===n.length?[n[0],n[0]]:[n[0],n[1]]:1===n.length?[n[0],n[0],n[0],n[0]]:2===n.length?[n[0],n[1],n[0],n[1]]:3===n.length?[n[0],n[1],n[2],n[1]]:[n[0],n[1],n[2],n[3]]}function eo(t){return Ue(t)?t.split(" ").map(function(t){return Za(t)}):t.map(function(t){return Za(t.toString())})}function no(t,e,n){return 0===t.value?0:t.unit===g.kPixels?Number(t.value):t.unit===g.kPercentage&&n?(n=n.nodeName===E.GROUP?n.getLocalBounds():n.geometry.contentBounds,t.value/100*n.halfExtents[e]*2):0}var ro=function(t){return Xa(/deg|rad|grad|turn|px|%/g,t)},io=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function ao(t){if("none"!==(t=(t=void 0===t?"":t).toLowerCase().trim()))for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];if(i=e.index+e[0].length,-1<io.indexOf(e[1])&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return ro(t)||$a(t)})}),n.lastIndex===t.length)return r}return[]}function oo(t){return t.toString()}var so=Gr(function(t){return"number"==typeof t?oi(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?oi(Number(t)):oi(0)});function lo(t,e){return[t,e,oo]}function co(n,r){return function(t,e){return[t,e,function(t){return oo(Xe(t,n,r))}]}}function uo(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}Gr(function(t){return(Ue(t)?t.split(" "):t).map(so)});var ho=function(e){if(""===e||Array.isArray(e)&&0===e.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var n;try{n=ke(e)}catch(t){n=ke(""),console.error("[g]: Invalid SVG Path definition: "+e)}var e=function(t){for(var e=!1,n=t.length,r=0;r<n;r++){var i=t[r][0];if("C"===i||"A"===i||"Q"===i){e=!0;break}}return e}(n),t=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var a=t[i],o=a[0];"M"===o?(r.length&&(n.push(r),r=[]),r.push([a[1],a[2]])):"Z"===o?r.length&&(e.push(r),r=[]):r.push([a[1],a[2]])}return 0<r.length&&n.push(r),{polygons:e,polylines:n}}(n),r=t.polygons,t=t.polylines,i=ha(n),a=function(t,e){for(var n=[],r=[],i=[],a=0;a<t.length;a++){var o=t[a],s=o.currentPoint,l=o.params,c=o.prePoint,u=void 0;switch(o.command){case"Q":u=Xn.box(c[0],c[1],l[1],l[2],l[3],l[4]);break;case"C":u=er.box(c[0],c[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var h=o.arcParams,u=lr.box(h.cx,h.cy,h.rx,h.ry,h.xRotation,h.startAngle,h.endAngle);break;default:n.push(s[0]),r.push(s[1])}u&&(o.box=u,n.push(u.x,u.x+u.width),r.push(u.y,u.y+u.height)),e&&("L"===o.command||"M"===o.command)&&o.prePoint&&o.nextPoint&&i.push(o)}var n=n.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0}),r=r.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0}),f=$e(n),d=$e(r),p=qe(n),g=qe(r);if(0!==i.length)for(var m=0;m<i.length;m++){var v=i[m],y=v.currentPoint;y[0]===f?f-=sa(v,e).xExtra:y[0]===p&&(p+=sa(v,e).xExtra),y[1]===d?d-=sa(v,e).yExtra:y[1]===g&&(g+=sa(v,e).yExtra)}return{x:f,y:d,width:p-f,height:g-d}}(i,0),o=a.x,s=a.y,l=a.width,a=a.height;return{absolutePath:n,hasArc:e,segments:i,polygons:r,polylines:t,totalLength:0,rect:{x:Number.isFinite(o)?o:0,y:Number.isFinite(s)?s:0,width:Number.isFinite(l)?l:0,height:Number.isFinite(a)?a:0}}},fo=Gr(ho);function po(t,e){t=(Ue(t)?fo:ho)(t);return e&&(e.parsedStyle.defX=t.rect.x,e.parsedStyle.defY=t.rect.y),t}function go(t,e,n){var r,i,a,o,s,l,c,u,h,f=t.curve,d=e.curve,t=(f&&0!==f.length||(f=Pe(t.absolutePath,!1),t.curve=f),d&&0!==d.length||(d=Pe(e.absolutePath,!1),e.curve=d),[f,d]),f=Ie((t=f.length!==d.length?function t(e,n,r){var i,e=Be(e),n=Be(n),a=e.length,o=n.length,s=e.filter(function(t){return t.l}).length,l=n.filter(function(t){return t.l}).length,s=e.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/s||0,l=n.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/l||0,c=r||Math.max(a,o),u=[s,l],h=[c-a,c-o],r=[e,n].map(function(t,n){return t.l===c?t.map(function(t){return t.s}):t.map(function(t,e){return i=e&&h[n]&&t.l>=u[n],h[n]-=i?1:0,i?t.ss:[t.s]}).flat()});return r[0].length===r[1].length?r:t(r[0],r[1],c)}(f,d):t)[0])!==Ie(t[1])?(r=t[0],e=r.slice(1).map(function(t,e,n){return(e?n[e-1].slice(-2):r[0].slice(1)).concat(t.slice(1))}).map(function(n){return n.map(function(t,e){return n[n.length-e-2*(1-e%2)]})}).reverse(),[["M"].concat(e[0].slice(0,2))].concat(e.map(function(t){return["C"].concat(t.slice(2))}))):oe(t[0]);return[f,(i=t[1],a=f,c=i.length-1,u=[],h=0,s=(o=i).length,l=s-1,(d=o.map(function(t,r){return o.map(function(t,e){var n=r+e;return 0===e||o[n]&&"M"===o[n][0]?(e=o[n],["M"].concat(e.slice(-2))):(s<=n&&(n-=l),o[n])})})).forEach(function(t,n){i.slice(1).forEach(function(t,e){h+=_e(i[(n+e)%c].slice(-2),a[e%c].slice(-2))}),u[n]=h,h=0}),d[u.indexOf(Math.min.apply(null,u))]),function(t){return t}]}function mo(t,e){var n,r,i=Ue(t)?t.split(" ").map(function(t){var t=t.split(","),e=t[0],t=t[1];return[Number(e),Number(t)]}):t,a=[],o=0,s=fr.length(i),t=(i.forEach(function(t,e){i[e+1]&&((n=[0,0])[0]=o/s,r=Wn.length(t[0],t[1],i[e+1][0],i[e+1][1]),o+=r,n[1]=o/s,a.push(n))}),Math.min.apply(Math,i.map(function(t){return t[0]}))),l=Math.min.apply(Math,i.map(function(t){return t[1]}));return e&&(e.parsedStyle.defX=t,e.parsedStyle.defY=l),{points:i,totalLength:s,segments:a}}function vo(t,e){return[t.points,e.points,function(t){return t}]}var yo=null;function bo(t){return function(e){var n=0;return t.map(function(t){return t===yo?e[n++]:t})}}function xo(t){return t}var wo={matrix:["NNNNNN",[yo,yo,0,0,yo,yo,0,0,0,0,1,0,yo,yo,0,1],xo],matrix3d:["NNNNNNNNNNNNNNNN",xo],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",bo([yo,yo,new Kr(1)]),xo],scalex:["N",bo([yo,new Kr(1),new Kr(1)]),bo([yo,new Kr(1)])],scaley:["N",bo([new Kr(1),yo,new Kr(1)]),bo([new Kr(1),yo])],scalez:["N",bo([new Kr(1),new Kr(1),yo])],scale3d:["NNN",xo],skew:["Aa",null,xo],skewx:["A",null,bo([yo,Qr])],skewy:["A",null,bo([Qr,yo])],translate:["Tt",bo([yo,yo,Zr]),xo],translatex:["T",bo([yo,Zr,Zr]),bo([yo,Zr])],translatey:["T",bo([Zr,yo,Zr]),bo([Zr,yo])],translatez:["L",bo([Zr,Zr,yo])],translate3d:["TTL",xo]};function Mo(t){if("none"!==(t=(t||"none").toLowerCase().trim()))for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];var i=e.index+e[0].length,a=e[1],o=wo[a];if(!o)return[];var s=e[2].split(","),l=o[0];if(l.length<s.length)return[];for(var c=[],u=0;u<l.length;u++){var h=s[u],f=l[u],d=void 0;if(void 0===(d=h?{A:function(t){return"0"===t.trim()?Qr:Qa(t)},N:so,T:Za,L:Ka}[f.toUpperCase()](h):{a:Qr,n:c[0],t:Zr}[f]))return[];c.push(d)}if(r.push({t:a,d:c}),n.lastIndex===t.length)return r}return[]}function ko(t){switch(t.t){case"rotatex":return i=ki(Ja(t.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotatey":return i=ki(Ja(t.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotatez":return i=ki(Ja(t.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":var e=t.d[0].value,n=t.d[1].value,r=t.d[2].value,i=ki(Ja(t.d[3])),a=e*e+n*n+r*r,a=(0==a?(e=1,r=n=0):1!=a&&(e/=a=Math.sqrt(a),n/=a,r/=a),Math.sin(i/2)),o=a*Math.cos(i/2),a=a*a;return[1-2*(n*n+r*r)*a,2*(e*n*a+r*o),2*(e*r*a-n*o),0,2*(e*n*a-r*o),1-2*(e*e+r*r)*a,2*(n*r*a+e*o),0,2*(e*r*a+n*o),2*(n*r*a-e*o),1-2*(e*e+n*n)*a,0,0,0,0,1];case"scale":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scalex":return[t.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaley":return[1,0,0,0,0,t.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scalez":return[1,0,0,0,0,1,0,0,0,0,t.d[0].value,0,0,0,0,1];case"scale3d":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,t.d[2].value,0,0,0,0,1];case"skew":o=ki(Ja(t.d[0])),a=ki(Ja(t.d[1]));return[1,Math.tan(a),0,0,Math.tan(o),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return i=ki(Ja(t.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return i=ki(Ja(t.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return[1,0,0,0,0,1,0,0,0,0,1,0,e=no(t.d[0],0,null)||0,n=no(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=no(t.d[0],0,null)||0,0,0,1];case"translatey":return[1,0,0,0,0,1,0,0,0,0,1,0,0,n=no(t.d[0],0,null)||0,0,1];case"translatez":return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r=no(t.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,e=no(t.d[0],0,null)||0,n=no(t.d[1],0,null)||0,r=no(t.d[2],0,null)||0,1];case"perspective":a=no(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,a?-1/a:0,0,0,0,1];case"matrix":return[t.d[0].value,t.d[1].value,0,0,t.d[2].value,t.d[3].value,0,0,0,0,1,0,t.d[4].value,t.d[5].value,0,1];case"matrix3d":return t.d.map(function(t){return t.value})}}function Eo(t,e){return[t[0]*e[0]+t[4]*e[1]+t[8]*e[2]+t[12]*e[3],t[1]*e[0]+t[5]*e[1]+t[9]*e[2]+t[13]*e[3],t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]*e[3],t[3]*e[0]+t[7]*e[1]+t[11]*e[2]+t[15]*e[3],t[0]*e[4]+t[4]*e[5]+t[8]*e[6]+t[12]*e[7],t[1]*e[4]+t[5]*e[5]+t[9]*e[6]+t[13]*e[7],t[2]*e[4]+t[6]*e[5]+t[10]*e[6]+t[14]*e[7],t[3]*e[4]+t[7]*e[5]+t[11]*e[6]+t[15]*e[7],t[0]*e[8]+t[4]*e[9]+t[8]*e[10]+t[12]*e[11],t[1]*e[8]+t[5]*e[9]+t[9]*e[10]+t[13]*e[11],t[2]*e[8]+t[6]*e[9]+t[10]*e[10]+t[14]*e[11],t[3]*e[8]+t[7]*e[9]+t[11]*e[10]+t[15]*e[11],t[0]*e[12]+t[4]*e[13]+t[8]*e[14]+t[12]*e[15],t[1]*e[12]+t[5]*e[13]+t[9]*e[14]+t[13]*e[15],t[2]*e[12]+t[6]*e[13]+t[10]*e[14]+t[14]*e[15],t[3]*e[12]+t[7]*e[13]+t[11]*e[14]+t[15]*e[15]]}function Oo(t){var e=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return Ci(0===(t=t).length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(ko).reduce(Eo),e,n,r,i,a),[[e,n,r,a,i]]}var So=function(t,e,n,r,i){for(var a=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],o=0;o<4;o++)a[o][3]=i[o];for(var s=0;s<3;s++)for(var l=0;l<3;l++)a[3][s]+=t[l]*a[l][s];var c=r[0],u=r[1],h=r[2],r=r[3],f=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],h=(f[0][0]=1-2*(u*u+h*h),f[0][1]=2*(c*u-h*r),f[0][2]=2*(c*h+u*r),f[1][0]=2*(c*u+h*r),f[1][1]=1-2*(c*c+h*h),f[1][2]=2*(u*h-c*r),f[2][0]=2*(c*h-u*r),f[2][1]=2*(u*h+c*r),f[2][2]=1-2*(c*c+u*u),a=_o(a,f),[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]);n[2]&&(h[2][1]=n[2],a=_o(a,h)),n[1]&&(h[2][1]=0,h[2][0]=n[0],a=_o(a,h)),n[0]&&(h[2][0]=0,h[1][0]=n[0],a=_o(a,h));for(var d=0;d<3;d++)for(var p=0;p<3;p++)a[d][p]*=e[d];return 0==(r=a)[0][2]&&0==r[0][3]&&0==r[1][2]&&0==r[1][3]&&0==r[2][0]&&0==r[2][1]&&1==r[2][2]&&0==r[2][3]&&0==r[3][2]&&1==r[3][3]?[a[0][0],a[0][1],a[1][0],a[1][1],a[3][0],a[3][1]]:a[0].concat(a[1],a[2],a[3])};function _o(t,e){for(var n=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],r=0;r<4;r++)for(var i=0;i<4;i++)for(var a=0;a<4;a++)n[r][i]+=e[r][a]*t[a][i];return n}function Ao(t){return t.toFixed(6).replace(".000000","")}function To(e,n){var r,i;return e.decompositionPair!==n&&(e.decompositionPair=n,r=Oo(e)),n.decompositionPair!==e&&(n.decompositionPair=e,i=Oo(n)),null===r[0]||null===i[0]?[[!1],[!0],function(t){return(t?n:e)[0].d}]:(r[0].push(0),i[0].push(1),[r,i,function(t){var e=function(t,e,n){var r=function(t,e){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[r];return n}(t,e),i=(r=Xe(r,-1,1),[]);if(1===r)i=t;else for(var a=Math.acos(r),o=+Math.sin(n*a)/Math.sqrt(1-r*r),s=0;s<4;s++)i.push(t[s]*(Math.cos(n*a)-r*o)+e[s]*o);return i}(r[0][3],i[0][3],t[5]);return So(t[0],t[1],t[2],e,t[4]).map(Ao).join(",")}])}function Po(t){return t.replace(/[xy]/,"")}function Lo(t){return t.replace(/(x|y|z|3d)?$/,"3d")}var Co=function(t,e){return"perspective"===t&&"perspective"===e||("matrix"===t||"matrix3d"===t)&&("matrix"===e||"matrix3d"===e)};function No(r,i,t){var e=!1;if(!r.length||!i.length){r.length||(e=!0,r=i,i=[]);for(var a=0;a<r.length;a++)!function(){var t=r[a],e=t.t,t=t.d,n="scale"===e.substring(0,5)?1:0;i.push({t:e,d:t.map(function(t){return"number"==typeof t?oi(n):oi(n,t.unit)})})}()}var n=[],o=[],s=[];if(r.length!==i.length)var l=To(r,i),n=[l[0]],o=[l[1]],s=[["matrix",[l[2]]]];else for(var c=0;c<r.length;c++){var u=r[c].t,h=i[c].t,f=r[c].d,d=i[c].d,p=wo[u],g=wo[h],m=void 0;if(Co(u,h)){var v=To([r[c]],[i[c]]);n.push(v[0]),o.push(v[1]),s.push(["matrix",[v[2]]])}else{if(u===h)m=u;else if(p[2]&&g[2]&&Po(u)===Po(h))m=Po(u),f=p[2](f),d=g[2](d);else{if(!p[1]||!g[1]||Lo(u)!==Lo(h)){v=To(r,i);n=[v[0]],o=[v[1]],s=[["matrix",[v[2]]]];break}m=Lo(u),f=p[1](f),d=g[1](d)}for(var y=[],b=[],x=[],w=0;w<f.length;w++){var M=function(t,e,n,r,i){void 0===i&&(i=0);var a="",o=t.value||0,s=e.value||0,l=qr(t.unit),c=t.convertTo(l),l=e.convertTo(l);return c&&l?(o=c.value,s=l.value,a=jr(t.unit)):(Kr.isLength(t.unit)||Kr.isLength(e.unit))&&(o=no(t,i,n),s=no(e,i,n),a="px"),[o,s,function(t){return(t=r?Math.max(t,0):t)+a}]}(f[w],d[w],t,!1,w);y[w]=M[0],b[w]=M[1],x.push(M[2])}n.push(y),o.push(b),s.push([m,x])}}return e&&(l=n,n=o,o=l),[n,o,function(t){return t.map(function(t,n){t=t.map(function(t,e){return s[n][1][e](t)}).join(",");return"matrix"===s[n][0]&&16===t.split(",").length&&(s[n][0]="matrix3d"),"matrix3d"===s[n][0]&&6===t.split(",").length&&(s[n][0]="matrix"),s[n][0]+"("+t+")"}).join(" ")}]}var jo=Gr(function(t){var e;return Ue(t)?"text-anchor"===t?[oi(0,"px"),oi(0,"px")]:(1===(e=t.split(" ")).length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length?null:[Za(Ro(e[0])),Za(Ro(e[1]))]):[oi(t[0]||0,"px"),oi(t[1]||0,"px")]});function Ro(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var r=function(){function t(){this.parser=Qa,this.parserWithCSSDisabled=null,this.mixer=lo}return t.prototype.calculator=function(t,e,n,r){return Ja(n)},t}(),e=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){return n instanceof zr&&(n=null),A.sceneGraphService.updateDisplayObjectDependency(t,e,n,r),"clipPath"===t&&r.forEach(function(t){0===t.childNodes.length&&A.sceneGraphService.dirtifyToRoot(t)}),n},t}(),n=function(){function t(){this.parser=$a,this.parserWithCSSDisabled=$a,this.mixer=Ua}return t.prototype.calculator=function(t,e,n,r){return n instanceof zr?"none"===n.value?ri:ii:n},t}(),Io=function(){function t(){this.parser=ao}return t.prototype.calculator=function(t,e,n){return n instanceof zr?[]:n},t}();function Bo(t){t=t.parsedStyle.fontSize;return _(t)?null:t}function Do(){this.parser=jo}var Fo,zo,Go,Wo=function(){function t(){this.parser=Za,this.parserWithCSSDisabled=null,this.mixer=lo}return t.prototype.calculator=function(t,e,n,r,i){if(Ke(n))return n;if(!Kr.isRelativeUnit(n.unit))return n.value;if(n.unit===g.kPercentage)return 0;if(n.unit===g.kEms){if(r.parentNode){var a=Bo(r.parentNode);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}if(n.unit===g.kRems){if(null!=r&&null!=(a=r.ownerDocument)&&a.documentElement){a=Bo(r.ownerDocument.documentElement);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}},t}(),Yo=function(){function t(){this.mixer=uo}var e=t.prototype;return e.parser=function(t){t=eo(Ke(t)?[t]:t),t=1===t.length?[t[0],t[0]]:[t[0],t[1]];return t},e.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),Ho=function(){function t(){this.mixer=uo}var e=t.prototype;return e.parser=function(t){t=eo(Ke(t)?[t]:t),t=1===t.length?[t[0],t[0],t[0],t[0]]:2===t.length?[t[0],t[1],t[0],t[1]]:3===t.length?[t[0],t[1],t[2],t[1]]:[t[0],t[1],t[2],t[3]];return t},e.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),Vo=function(t){function e(){return t.apply(this,arguments)||this}return _r(e,t),e.prototype.postProcessor=function(t,e){var n,r;switch(t.nodeName){case E.CIRCLE:case E.ELLIPSE:var i=t.parsedStyle,a=i.cx,o=i.cy,i=i.cz;_(a)||(l=a),_(o)||(c=o),_(i)||(u=i);break;case E.LINE:var a=t.parsedStyle,o=a.x1,i=a.x2,s=a.y1,a=a.y2,l=Math.min(o,i),c=Math.min(s,a),u=0;break;case E.RECT:case E.IMAGE:case E.GROUP:case E.HTML:case E.TEXT:case E.MESH:_(t.parsedStyle.x)||(l=t.parsedStyle.x),_(t.parsedStyle.y)||(c=t.parsedStyle.y),_(t.parsedStyle.z)||(u=t.parsedStyle.z)}t.nodeName!==E.PATH&&t.nodeName!==E.POLYLINE&&t.nodeName!==E.POLYGON&&(t.parsedStyle.defX=l||0,t.parsedStyle.defY=c||0),_(l)&&_(c)&&_(u)||-1!==e.indexOf("transform")||((e=t.parsedStyle.transform)&&e.length?Ri(e,t):(n=(e=t.getLocalPosition())[0],r=e[1],e=e[2],t.setLocalPosition(_(l)?n:l,_(c)?r:c,_(u)?e:u)))},e}(Wo),qo=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n=null==(n=n=n instanceof zr?null:n)?void 0:n.cloneNode(!0);return n&&(n.style.isMarker=!0),n},t}(),$o=function(){function t(){this.mixer=lo,this.parser=so,this.parserWithCSSDisabled=null}return t.prototype.calculator=function(t,e,n){return n.value},t}(),Uo=function(){function t(){this.parser=so,this.parserWithCSSDisabled=null,this.mixer=co(0,1)}var e=t.prototype;return e.calculator=function(t,e,n){return n.value},e.postProcessor=function(t){var e,n=t.parsedStyle,r=n.offsetPath,n=n.offsetDistance;!r||(e=r.nodeName)!==E.LINE&&e!==E.PATH&&e!==E.POLYLINE||(e=r.getPoint(n))&&(t.parsedStyle.defX=e.x,t.parsedStyle.defY=e.y,t.setLocalPosition(e.x,e.y))},t}(),a=function(){function t(){this.parser=so,this.parserWithCSSDisabled=null,this.mixer=co(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),Xo=function(){function m(){this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}m.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]};var t=m.prototype;return t.update=function(t,e){vi(this.center,t),vi(this.halfExtents,e),yi(this.min,this.center,this.halfExtents),bi(this.max,this.center,this.halfExtents)},t.setMinMax=function(t,e){bi(this.center,e,t),xi(this.center,this.center,.5),yi(this.halfExtents,e,t),xi(this.halfExtents,this.halfExtents,.5),vi(this.min,t),vi(this.max,e)},t.getMin=function(){return this.min},t.getMax=function(){return this.max},t.add=function(t){var e,n,r,i,a,o,s,l,c,u,h,f,d,p,g;m.isEmpty(t)||(m.isEmpty(this)?this.setMinMax(t.getMin(),t.getMax()):(n=(e=this.center)[0],p=e[1],a=e[2],i=(r=this.halfExtents)[0],h=r[1],o=r[2],l=(f=t.center)[0],g=f[1],f=f[2],c=(t=t.halfExtents)[0],(d=g-(u=t[1]))<(s=p-h)&&(s=d),(d=p+h)<(p=g+u)&&(d=p),(g=f-(h=t[2]))<(u=a-o)&&(u=g),(p=a+o)<(t=f+h)&&(p=t),e[0]=.5*((a=(g=l-c)<(a=n-i)?g:a)+(o=(o=n+i)<(f=l+c)?f:o)),e[1]=.5*(s+d),e[2]=.5*(u+p),r[0]=.5*(o-a),r[1]=.5*(d-s),r[2]=.5*(p-u),this.min[0]=a,this.min[1]=s,this.min[2]=u,this.max[0]=o,this.max[1]=d,this.max[2]=p))},t.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,t=t.halfExtents,a=e[0],o=e[4],s=e[8],l=e[1],c=e[5],u=e[9],h=e[2],f=e[6],d=e[10],p=Math.abs(a),g=Math.abs(o),m=Math.abs(s),v=Math.abs(l),y=Math.abs(c),b=Math.abs(u),x=Math.abs(h),w=Math.abs(f),M=Math.abs(d);n[0]=e[12]+a*i[0]+o*i[1]+s*i[2],n[1]=e[13]+l*i[0]+c*i[1]+u*i[2],n[2]=e[14]+h*i[0]+f*i[1]+d*i[2],r[0]=p*t[0]+g*t[1]+m*t[2],r[1]=v*t[0]+y*t[1]+b*t[2],r[2]=x*t[0]+w*t[1]+M*t[2],yi(this.min,n,r),bi(this.max,n,r)},t.intersects=function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),t=t.getMin();return n[0]<=r[0]&&e[0]>=t[0]&&n[1]<=r[1]&&e[1]>=t[1]&&n[2]<=r[2]&&e[2]>=t[2]},t.intersection=function(t){var e,n,r,i;return this.intersects(t)?(e=new m,i=[0,0,0],n=this.getMin(),r=t.getMin(),i[0]=Math.max(n[0],r[0]),i[1]=Math.max(n[1],r[1]),i[2]=Math.max(n[2],r[2]),n=i,r=[0,0,0],i=this.getMax(),t=t.getMax(),r[0]=Math.min(i[0],t[0]),r[1]=Math.min(i[1],t[1]),r[2]=Math.min(i[2],t[2]),e.setMinMax(n,r),e):null},t.getNegativeFarPoint=function(t){return 273===t.pnVertexFlag?vi([0,0,0],this.min):272===t.pnVertexFlag?[this.min[0],this.min[1],this.max[2]]:257===t.pnVertexFlag?[this.min[0],this.max[1],this.min[2]]:256===t.pnVertexFlag?[this.min[0],this.max[1],this.max[2]]:17===t.pnVertexFlag?[this.max[0],this.min[1],this.min[2]]:16===t.pnVertexFlag?[this.max[0],this.min[1],this.max[2]]:1===t.pnVertexFlag?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]},t.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?vi([0,0,0],this.max):272===t.pnVertexFlag?[this.max[0],this.max[1],this.min[2]]:257===t.pnVertexFlag?[this.max[0],this.min[1],this.max[2]]:256===t.pnVertexFlag?[this.max[0],this.min[1],this.min[2]]:17===t.pnVertexFlag?[this.min[0],this.max[1],this.max[2]]:16===t.pnVertexFlag?[this.min[0],this.max[1],this.min[2]]:1===t.pnVertexFlag?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]},m}(),Ko=function(){function t(t,e){this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||M(0,1,0),this.updatePNVertexFlag()}var e=t.prototype;return e.updatePNVertexFlag=function(){this.pnVertexFlag=(Number(0<=this.normal[0])<<8)+(Number(0<=this.normal[1])<<4)+Number(0<=this.normal[2])},e.distanceToPoint=function(t){return Dt(t,this.normal)-this.distance},e.normalize=function(){var t=1/Vt(this.normal);It(this.normal,this.normal,t),this.distance*=t},e.intersectsLine=function(t,e,n){var r=this.distanceToPoint(t),r=r/(r-this.distanceToPoint(e)),i=0<=r&&r<=1;return i&&n&&zt(n,t,e,r),i},t}(),Zo=((ts=Fo=Fo||{})[ts.OUTSIDE=4294967295]="OUTSIDE",ts[ts.INSIDE=0]="INSIDE",ts[ts.INDETERMINATE=2147483647]="INDETERMINATE",function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new Ko)}return t.prototype.extractFromVPMatrix=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],h=t[10],f=t[11],d=t[12],p=t[13],g=t[14],t=t[15];Nt(this.planes[0].normal,i-e,l-a,f-c),this.planes[0].distance=t-d,Nt(this.planes[1].normal,i+e,l+a,f+c),this.planes[1].distance=t+d,Nt(this.planes[2].normal,i+n,l+o,f+u),this.planes[2].distance=t+p,Nt(this.planes[3].normal,i-n,l-o,f-u),this.planes[3].distance=t-p,Nt(this.planes[4].normal,i-r,l-s,f-h),this.planes[4].distance=t-g,Nt(this.planes[5].normal,i+r,l+s,f+h),this.planes[5].distance=t+g,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})},t}()),Qo=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}var e=t.prototype;return e.clone=function(){return new t(this.x,this.y)},e.copyFrom=function(t){this.x=t.x,this.y=t.y},t}(),Jo=function(){function t(t,e,n,r){this.x=void 0,this.y=void 0,this.width=void 0,this.height=void 0,this.left=void 0,this.right=void 0,this.top=void 0,this.bottom=void 0,this.x=t,this.y=e,this.width=n,this.height=r,this.left=t,this.right=t+n,this.top=e,this.bottom=e+r}return t.prototype.toJSON=function(){},t}(),ts=function(){function t(){this.parser=po,this.parserWithCSSDisabled=po,this.mixer=go}var e=t.prototype;return e.calculator=function(t,e,n){return n instanceof zr&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Jo(0,0,0,0)}:n},e.postProcessor=function(t,e){var n;t.nodeName===E.PATH&&-1===e.indexOf("transform")&&(n=(e=t.parsedStyle).defX,e=e.defY,t.setLocalPosition(void 0===n?0:n,void 0===e?0:e))},t}(),es=function(){function t(){this.parser=mo,this.mixer=vo}return t.prototype.postProcessor=function(t,e){var n;t.nodeName!==E.POLYGON&&t.nodeName!==E.POLYLINE||-1!==e.indexOf("transform")||(n=(e=t.parsedStyle).defX,e=e.defY,t.setLocalPosition(n,e))},t}(),ns=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).mixer=co(0,1/0),t}return _r(t,i),t}(Wo),rs=function(){function t(){}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof zr?"unset"===n.value?"":n.value:""+n},e.postProcessor=function(t){t.nodeValue=""+t.parsedStyle.text||""},t}(),is=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i,a=r.getAttribute("text");return a&&(i=a,"capitalize"===n.value?i=a.charAt(0).toUpperCase()+a.slice(1):"lowercase"===n.value?i=a.toLowerCase():"uppercase"===n.value&&(i=a.toUpperCase()),r.parsedStyle.text=i),n.value},t}(),as=function(){function t(){this.parser=Mo,this.parserWithCSSDisabled=Mo,this.mixer=No}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof zr?[]:n},e.postProcessor=function(t){Ri(t.parsedStyle.transform,t)},t}(),os=(zo=zo||{},zo[zo.Standard=0]="Standard",(os=Go=Go||{})[os.ADDED=0]="ADDED",os[os.REMOVED=1]="REMOVED",os[os.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED",function(){function t(){this.parser=so}var e=t.prototype;return e.calculator=function(t,e,n,r){return n.value},e.postProcessor=function(t){var e;t.parentNode&&(e=(t=t.parentNode).renderable,t=t.sortable,e&&(e.dirty=!0),t)&&(t.dirty=!0,t.dirtyReason=Go.Z_INDEX_CHANGED)},t}()),ss=function(){function t(){this.registry={},this.define(E.CIRCLE,Ns),this.define(E.ELLIPSE,Bs),this.define(E.RECT,Js),this.define(E.IMAGE,Ys),this.define(E.LINE,Vs),this.define(E.GROUP,Fs),this.define(E.PATH,z),this.define(E.POLYGON,Xs),this.define(E.POLYLINE,Zs),this.define(E.TEXT,el),this.define(E.HTML,Gs)}var e=t.prototype;return e.define=function(t,e){this.registry[t]=e},e.get=function(t){return this.registry[t]},t}();var x,ls=function(){function e(t){this.type=void 0,this.eventPhase=e.prototype.NONE,this.target=void 0,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.currentTarget=void 0,this.defaultPrevented=!1,this.timeStamp=void 0,this.nativeEvent=void 0,this.originalEvent=void 0,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.manager=void 0,this.detail=void 0,this.layer=new Qo,this.page=new Qo,this.canvas=new Qo,this.viewport=new Qo,this.path=void 0,this.view=void 0,this.which=void 0,this.returnValue=void 0,this.srcElement=void 0,this.composed=!1,this.isTrusted=void 0,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}var t=e.prototype;return t.composedPath=function(){return!this.manager||this.path&&this.path[0]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},t.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},t.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},t.stopPropagation=function(){this.propagationStopped=!0},t.initEvent=function(){},t.initUIEvent=function(){},t.clone=function(){throw new Error(pi)},Sr(e,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"propagationPath",get:function(){return this.composedPath()}}]),e}(),cs=function(r){function t(t,e){var n=r.call(this,null)||this;return n.type=t,n.detail=e,Object.assign(Pr(n),e),n}return _r(t,r),t}(ls),us=function(){function t(){this.emitter=new wr}var e=t.prototype;return e.on=function(t,e,n){return this.addEventListener(t,e,n),this},e.addEventListener=function(t,e,n){var r,i,a,o=nn(n)&&n||Ye(n)&&n.capture,n=Ye(n)&&n.once,s=Hr(e)?void 0:e,l=!1,c="";return-1<t.indexOf(":")&&(i=(r=t.split(":"))[0],t=r[1],c=i,l=!0),t=o?t+"capture":t,e=Hr(e)?e:e.handleEvent,l&&(a=e,e=function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];(null==(t=n[0].target)?void 0:t.name)===c&&a.apply(void 0,n)}),n?this.emitter.once(t,e,s):this.emitter.on(t,e,s),this},e.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},e.removeAllEventListeners=function(){this.emitter.removeAllListeners()},e.removeEventListener=function(t,e,n){var r,n=nn(n)&&n||Ye(n)&&n.capture,i=Hr(e)?void 0:e;return e=Hr(e)?e:null==(r=e)?void 0:r.handleEvent,this.emitter.off(t=n?t+"capture":t,e,i),this},e.emit=function(t,e){this.dispatchEvent(new cs(t,e))},e.dispatchEvent=function(t,e){if(void 0===e&&(e=!1),!t.type)throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");var n;if(n=this.document?this:this.defaultView||(null==(n=this.ownerDocument)?void 0:n.defaultView)){if(t.manager=n.getEventService()||null,!t.manager)return!1;t.defaultPrevented=!1,t.path=[],e||(t.target=this),null!=(n=t.manager)&&n.dispatchEvent(t,t.type,e)}return!t.defaultPrevented},t}(),hs=function(i){function d(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).shadow=!1,t.ownerDocument=null,t.isConnected=!1,t.baseURI="",t.childNodes=[],t.nodeType=0,t.nodeName="",t.nodeValue=null,t.parentNode=null,t}_r(d,i),d.isNode=function(t){return!!t.childNodes};var t=d.prototype;return t.getRootNode=function(t){return void 0===t&&(t={}),this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this},t.hasChildNodes=function(){return 0<this.childNodes.length},t.isDefaultNamespace=function(t){throw new Error(pi)},t.lookupNamespaceURI=function(t){throw new Error(pi)},t.lookupPrefix=function(t){throw new Error(pi)},t.normalize=function(){throw new Error(pi)},t.isEqualNode=function(t){return this===t},t.isSameNode=function(t){return this.isEqualNode(t)},t.compareDocumentPosition=function(t){if(t===this)return 0;for(var e=[i=t],n=[a=this];null!=(r=i.parentNode)?r:a.parentNode;)var r,i=i.parentNode?(e.push(i.parentNode),i.parentNode):i,a=a.parentNode?(n.push(a.parentNode),a.parentNode):a;if(i!==a)return d.DOCUMENT_POSITION_DISCONNECTED|d.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|d.DOCUMENT_POSITION_PRECEDING;var o=n.length<e.length?e:n,s=o===e?n:e;if(o[o.length-s.length]===s[0])return o===e?d.DOCUMENT_POSITION_CONTAINED_BY|d.DOCUMENT_POSITION_FOLLOWING:d.DOCUMENT_POSITION_CONTAINS|d.DOCUMENT_POSITION_PRECEDING;for(var l=o.length-s.length,c=s.length-1;0<=c;c--){var u,h=s[c],f=o[l+c];if(f!==h)return(u=h.parentNode.childNodes).indexOf(h)<u.indexOf(f)?s===e?d.DOCUMENT_POSITION_PRECEDING:d.DOCUMENT_POSITION_FOLLOWING:o===e?d.DOCUMENT_POSITION_PRECEDING:d.DOCUMENT_POSITION_FOLLOWING}return d.DOCUMENT_POSITION_FOLLOWING},t.contain=function(t){return this.contains(t)},t.contains=function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e},t.getAncestor=function(t){for(var e=this;0<t&&e;)e=e.parentNode,t--;return e},t.forEach=function(e,t){void 0===t&&(t=!1),e(this)||(t?this.childNodes.slice():this.childNodes).forEach(function(t){t.forEach(e)})},Sr(d,[{key:"textContent",get:function(){var t="";this.nodeName===E.TEXT&&(t+=this.style.text);for(var e=Cr(this.childNodes);!(n=e()).done;){var n=n.value;n.nodeName===E.TEXT?t+=n.nodeValue:t+=n.textContent}return t},set:function(t){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)}),this.nodeName===E.TEXT&&(this.style.text=""+t)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return 0<this.childNodes.length?this.childNodes[0]:null}},{key:"lastChild",get:function(){return 0<this.childNodes.length?this.childNodes[this.childNodes.length-1]:null}}]),d}(us),fs=(hs.DOCUMENT_POSITION_DISCONNECTED=1,hs.DOCUMENT_POSITION_PRECEDING=2,hs.DOCUMENT_POSITION_FOLLOWING=4,hs.DOCUMENT_POSITION_CONTAINS=8,hs.DOCUMENT_POSITION_CONTAINED_BY=16,hs.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,function(e){function t(){var t=e.call(this)||this;t.defaultView=null,t.documentElement=void 0,t.timeline=void 0,t.ownerDocument=null,t.nodeName="document";try{t.timeline=new A.AnimationTimeline(Pr(t))}catch(t){}var r={};return nl.forEach(function(t){var e=t.n,n=t.inh,t=t.d;n&&t&&(r[e]=Hr(t)?t(E.GROUP):t)}),t.documentElement=new Fs({id:"g-root",style:r}),t.documentElement.ownerDocument=Pr(t),t.documentElement.parentNode=Pr(t),t.childNodes=[t.documentElement],t}_r(t,e);var n=t.prototype;return n.createElement=function(t,e){var n;return"svg"===t?this.documentElement:((n=this.defaultView.customElements.get(t))||(console.warn("Unsupported tagName: ",t),n="tspan"===t?el:Fs),(t=new n(e)).ownerDocument=this,t)},n.createElementNS=function(t,e,n){return this.createElement(e,n)},n.cloneNode=function(t){throw new Error(pi)},n.destroy=function(){try{this.documentElement.destroyChildren(),this.timeline.destroy()}catch(t){}},n.elementsFromBBox=function(t,e,n,r){var t=this.defaultView.context.rBushRoot.search({minX:t,minY:e,maxX:n,maxY:r}),i=[];return t.forEach(function(t){var t=t.displayObject,e=t.parsedStyle.pointerEvents,e=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(e);e&&!t.isVisible()||t.isCulled()||!t.isInteractive()||i.push(t)}),i.sort(function(t,e){return e.sortable.renderOrder-t.sortable.renderOrder}),i},n.elementFromPointSync=function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,n=n.y,i=this.defaultView.getConfig(),a=i.width,i=i.height;return r<0||n<0||a<r||i<n?null:(i=(a=this.defaultView.viewport2Client({x:r,y:n})).x,a=a.y,(t=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:t,y:e,viewportX:r,viewportY:n,clientX:i,clientY:a},picked:[]}).picked)&&t[0]||this.documentElement)},n.elementFromPoint=function(){var n=Er(Mr().mark(function t(e,n){var r,i,a,o,s,l;return Mr().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this.defaultView.canvas2Viewport({x:e,y:n}),r=i.x,i=i.y,o=this.defaultView.getConfig(),a=o.width,o=o.height,r<0||i<0||a<r||o<i)return t.abrupt("return",null);t.next=4;break;case 4:return a=this.defaultView.viewport2Client({x:r,y:i}),o=a.x,s=a.y,t.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:e,y:n,viewportX:r,viewportY:i,clientX:o,clientY:s},picked:[]});case 7:return s=t.sent,l=s.picked,t.abrupt("return",l&&l[0]||this.documentElement);case 10:case"end":return t.stop()}},t,this)}));return function(t,e){return n.apply(this,arguments)}}(),n.elementsFromPointSync=function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,n=n.y,i=this.defaultView.getConfig(),a=i.width,i=i.height;return r<0||n<0||a<r||i<n?[]:(i=(a=this.defaultView.viewport2Client({x:r,y:n})).x,a=a.y,(t=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:t,y:e,viewportX:r,viewportY:n,clientX:i,clientY:a},picked:[]}).picked)[t.length-1]!==this.documentElement&&t.push(this.documentElement),t)},n.elementsFromPoint=function(){var n=Er(Mr().mark(function t(e,n){var r,i,a,o,s,l;return Mr().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this.defaultView.canvas2Viewport({x:e,y:n}),r=i.x,i=i.y,o=this.defaultView.getConfig(),a=o.width,o=o.height,r<0||i<0||a<r||o<i)return t.abrupt("return",[]);t.next=4;break;case 4:return a=this.defaultView.viewport2Client({x:r,y:i}),o=a.x,s=a.y,t.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:e,y:n,viewportX:r,viewportY:i,clientX:o,clientY:s},picked:[]});case 7:return s=t.sent,(l=s.picked)[l.length-1]!==this.documentElement&&l.push(this.documentElement),t.abrupt("return",l);case 11:case"end":return t.stop()}},t,this)}));return function(t,e){return n.apply(this,arguments)}}(),n.appendChild=function(t,e){throw new Error(gi)},n.insertBefore=function(t,e){throw new Error(gi)},n.removeChild=function(t,e){throw new Error(gi)},n.replaceChild=function(t,e,n){throw new Error(gi)},n.append=function(){throw new Error(gi)},n.prepend=function(){throw new Error(gi)},n.getElementById=function(t){return this.documentElement.getElementById(t)},n.getElementsByName=function(t){return this.documentElement.getElementsByName(t)},n.getElementsByTagName=function(t){return this.documentElement.getElementsByTagName(t)},n.getElementsByClassName=function(t){return this.documentElement.getElementsByClassName(t)},n.querySelector=function(t){return this.documentElement.querySelector(t)},n.querySelectorAll=function(t){return this.documentElement.querySelectorAll(t)},n.find=function(t){return this.documentElement.find(t)},n.findAll=function(t){return this.documentElement.findAll(t)},Sr(t,[{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}}]),t}(hs)),ds=((bs=x=x||{}).REPARENT="reparent",bs.DESTROY="destroy",bs.ATTR_MODIFIED="DOMAttrModified",bs.INSERTED="DOMNodeInserted",bs.REMOVED="removed",bs.MOUNTED="DOMNodeInsertedIntoDocument",bs.UNMOUNTED="DOMNodeRemovedFromDocument",bs.BOUNDS_CHANGED="bounds-changed",bs.CULLED="culled",function(c){function t(t,e,n,r,i,a,o,s){var l=c.call(this,null)||this;return l.relatedNode=void 0,l.prevValue=void 0,l.newValue=void 0,l.attrName=void 0,l.attrChange=void 0,l.prevParsedValue=void 0,l.newParsedValue=void 0,l.relatedNode=e,l.prevValue=n,l.newValue=r,l.attrName=i,l.attrChange=a,l.prevParsedValue=o,l.newParsedValue=s,l.type=t,l}return _r(t,c),t}(ls)),ps=(ds.ADDITION=2,ds.MODIFICATION=1,ds.REMOVAL=3,0),gs=new ds(x.INSERTED,null,"","","",0,"",""),ms=new ds(x.REMOVED,null,"","","",0,"",""),vs=new cs(x.DESTROY),ys=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).entity=ps++,t.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1,proxyNodeName:void 0},t.cullable={strategy:zo.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},t.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:[0,0,0],localRotation:[0,0,0,1],localScale:[1,1,1],localTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],localSkew:[0,0],position:[0,0,0],rotation:[0,0,0,1],scaling:[1,1,1],worldTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],origin:[0,0,0]},t.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},t.geometry={contentBounds:void 0,renderBounds:void 0},t.rBushNode={aabb:void 0},t.id=void 0,t.name=void 0,t.namespaceURI="g",t.scrollLeft=0,t.scrollTop=0,t.clientTop=0,t.clientLeft=0,t.destroyed=!1,t.style={},t.computedStyle=A.enableCSSParsing?{anchor:ei,opacity:ei,fillOpacity:ei,strokeOpacity:ei,fill:ei,stroke:ei,transform:ei,transformOrigin:ei,visibility:ei,pointerEvents:ei,lineWidth:ei,lineCap:ei,lineJoin:ei,increasedLineWidthForHitTesting:ei,fontSize:ei,fontFamily:ei,fontStyle:ei,fontWeight:ei,fontVariant:ei,textAlign:ei,textBaseline:ei,textTransform:ei,zIndex:ei,filter:ei,shadowType:ei}:null,t.parsedStyle={},t.attributes={},t}_r(t,i),t.isElement=function(t){return!!t.getAttribute};var e=t.prototype;return e.cloneNode=function(t){throw new Error(pi)},e.appendChild=function(t,e){if(t.destroyed)throw new Error("Cannot append a destroyed element.");return A.sceneGraphService.attach(t,this,e),null!=(e=this.ownerDocument)&&e.defaultView&&this.ownerDocument.defaultView.mountChildren(t),gs.relatedNode=this,t.dispatchEvent(gs),t},e.insertBefore=function(t,e){return e?(e=this.childNodes.indexOf(e),this.appendChild(t,e-1)):this.appendChild(t),t},e.replaceChild=function(t,e){var n=this.childNodes.indexOf(e);return this.removeChild(e),this.appendChild(t,n),e},e.removeChild=function(t){var e;return ms.relatedNode=this,t.dispatchEvent(ms),null!=(e=t.ownerDocument)&&e.defaultView&&t.ownerDocument.defaultView.unmountChildren(t),A.sceneGraphService.detach(t),t},e.removeChildren=function(){for(var t=this.childNodes.length-1;0<=t;t--){var e=this.childNodes[t];this.removeChild(e)}},e.destroyChildren=function(){for(var t=this.childNodes.length-1;0<=t;t--){var e=this.childNodes[t];e.childNodes.length&&e.destroyChildren(),e.destroy()}},e.matches=function(t){return A.sceneGraphService.matches(t,this)},e.getElementById=function(t){return A.sceneGraphService.querySelector("#"+t,this)},e.getElementsByName=function(t){return A.sceneGraphService.querySelectorAll('[name="'+t+'"]',this)},e.getElementsByClassName=function(t){return A.sceneGraphService.querySelectorAll("."+t,this)},e.getElementsByTagName=function(t){return A.sceneGraphService.querySelectorAll(t,this)},e.querySelector=function(t){return A.sceneGraphService.querySelector(t,this)},e.querySelectorAll=function(t){return A.sceneGraphService.querySelectorAll(t,this)},e.closest=function(t){var e=this;do{if(A.sceneGraphService.matches(t,e))return e}while(null!==(e=e.parentElement));return null},e.find=function(e){var n=this,r=null;return this.forEach(function(t){return!(t===n||!e(t)||(r=t,0))}),r},e.findAll=function(e){var n=this,r=[];return this.forEach(function(t){t!==n&&e(t)&&r.push(t)}),r},e.after=function(){var r=this;if(this.parentNode){for(var i=this.parentNode.childNodes.indexOf(this),t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e.forEach(function(t,e){var n;return null==(n=r.parentNode)?void 0:n.appendChild(t,i+e+1)})}},e.before=function(){if(this.parentNode){for(var t=this.parentNode.childNodes.indexOf(this),e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0],a=n.slice(1);this.parentNode.appendChild(i,t),i.after.apply(i,a)}},e.replaceWith=function(){this.after.apply(this,arguments),this.remove()},e.append=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach(function(t){return e.appendChild(t)})},e.prepend=function(){for(var n=this,t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach(function(t,e){return n.appendChild(t,e)})},e.replaceChildren=function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)},e.remove=function(){return this.parentNode?this.parentNode.removeChild(this):this},e.destroy=function(){this.dispatchEvent(vs),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.getGeometryBounds=function(){return A.sceneGraphService.getGeometryBounds(this)},e.getRenderBounds=function(){return A.sceneGraphService.getBounds(this,!0)},e.getBounds=function(){return A.sceneGraphService.getBounds(this)},e.getLocalBounds=function(){return A.sceneGraphService.getLocalBounds(this)},e.getBoundingClientRect=function(){return A.sceneGraphService.getBoundingClientRect(this)},e.getClientRects=function(){return[this.getBoundingClientRect()]},e.computedStyleMap=function(){return new Map(Object.entries(this.computedStyle))},e.getAttributeNames=function(){return Object.keys(this.attributes)},e.getAttribute=function(t){var e;return"symbol"==typeof t?A.enableCSSParsing?null:void 0:void 0===(e=this.attributes[t])&&(t=Xr(t),e=this.attributes[t],A.enableCSSParsing)&&_(e)?null:e},e.hasAttribute=function(t){return this.getAttributeNames().includes(t)},e.hasAttributes=function(){return!!this.getAttributeNames().length},e.removeAttribute=function(t){this.setAttribute(t,null),delete this.attributes[t]},e.setAttribute=function(t,e,n){this.attributes[t]=e},e.getAttributeNS=function(t,e){throw new Error(pi)},e.getAttributeNode=function(t){throw new Error(pi)},e.getAttributeNodeNS=function(t,e){throw new Error(pi)},e.hasAttributeNS=function(t,e){throw new Error(pi)},e.removeAttributeNS=function(t,e){throw new Error(pi)},e.removeAttributeNode=function(t){throw new Error(pi)},e.setAttributeNS=function(t,e,n){throw new Error(pi)},e.setAttributeNode=function(t){throw new Error(pi)},e.setAttributeNodeNS=function(t){throw new Error(pi)},e.toggleAttribute=function(t,e){throw new Error(pi)},Sr(t,[{key:"className",get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(t){return""!==t})}},{key:"tagName",get:function(){return this.nodeName}},{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"parentElement",get:function(){return this.parentNode}},{key:"nextSibling",get:function(){var t;return this.parentNode&&(t=this.parentNode.childNodes.indexOf(this),this.parentNode.childNodes[t+1])||null}},{key:"previousSibling",get:function(){var t;return this.parentNode&&(t=this.parentNode.childNodes.indexOf(this),this.parentNode.childNodes[t-1])||null}}]),t}(hs),bs=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).altKey=void 0,t.button=void 0,t.buttons=void 0,t.ctrlKey=void 0,t.metaKey=void 0,t.relatedTarget=void 0,t.shiftKey=void 0,t.client=new Qo,t.movement=new Qo,t.offset=new Qo,t.global=new Qo,t.screen=new Qo,t}_r(t,i);var e=t.prototype;return e.getModifierState=function(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)},e.initMouseEvent=function(){throw new Error(pi)},Sr(t,[{key:"clientX",get:function(){return this.client.x}},{key:"clientY",get:function(){return this.client.y}},{key:"movementX",get:function(){return this.movement.x}},{key:"movementY",get:function(){return this.movement.y}},{key:"offsetX",get:function(){return this.offset.x}},{key:"offsetY",get:function(){return this.offset.y}},{key:"globalX",get:function(){return this.global.x}},{key:"globalY",get:function(){return this.global.y}},{key:"screenX",get:function(){return this.screen.x}},{key:"screenY",get:function(){return this.screen.y}}]),t}(ls),xs=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).pointerId=void 0,t.width=0,t.height=0,t.isPrimary=!1,t.pointerType=void 0,t.pressure=void 0,t.tangentialPressure=void 0,t.tiltX=void 0,t.tiltY=void 0,t.twist=void 0,t}_r(t,i);var e=t.prototype;return e.getCoalescedEvents=function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]},e.getPredictedEvents=function(){throw new Error("getPredictedEvents is not supported!")},e.clone=function(){return this.manager.clonePointerEvent(this)},t}(bs),ws=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).deltaMode=void 0,t.deltaX=void 0,t.deltaY=void 0,t.deltaZ=void 0,t.DOM_DELTA_LINE=0,t.DOM_DELTA_PAGE=1,t.DOM_DELTA_PIXEL=2,t}return _r(t,i),t.prototype.clone=function(){return this.manager.cloneWheelEvent(this)},t}(bs);function Ms(t){return null!=t&&t.nodeName}var ks,Es,Os,Ss=new ds(x.ATTR_MODIFIED,null,null,null,null,ds.MODIFICATION,null,null),_s={anchor:"",opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transform:"",transformOrigin:"",visibility:"",pointerEvents:"",lineWidth:"",lineCap:"",lineJoin:"",increasedLineWidthForHitTesting:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",zIndex:"",filter:"",shadowType:""},As={anchor:[0,0],fill:ri,stroke:ri,transform:[],zIndex:0,filter:[],shadowType:"outer",miterLimit:10},Ts=f({},As,{opacity:1,fillOpacity:1,strokeOpacity:1,visibility:"visible",pointerEvents:"auto",lineWidth:1,lineCap:"butt",lineJoin:"miter",increasedLineWidthForHitTesting:0,fillRule:"nonzero"}),Ps=[].concat(["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting"],["fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"]),Ls=function(i){function t(t){var r=i.call(this)||this,t=(r.config=void 0,r.isCustomElement=!1,r.isMutationObserved=!1,r.activeAnimations=[],r.dataset=void 0,r.getClip=function(){return this.style.clipPath||null},r.config=t,r.config.interactive=null!=(t=r.config.capture)?t:r.config.interactive,r.id=r.config.id||"",r.name=r.config.name||"",(r.config.className||r.config.class)&&(r.className=r.config.className||r.config.class),r.nodeName=r.config.type||E.GROUP,r.config.style=r.config.style||r.config.attrs||{},Object.assign(r.config.style,r.config.attrs),null!=r.config.visible&&(r.config.style.visibility=!1===r.config.visible?"hidden":"visible"),null!=r.config.interactive&&(r.config.style.pointerEvents=!1===r.config.interactive?"none":"auto"),Object.assign(r.parsedStyle,A.enableCSSParsing?As:Ts,r.config.initialParsedStyle),A.enableCSSParsing&&Object.assign(r.attributes,_s),r.initAttributes(r.config.style),A.globalThis.Proxy||function(){});return A.enableDataset&&(r.dataset=new t({},{get:function(t,e){e="data-"+Wr(e);return void 0!==t[e]?t[e]:r.getAttribute(e)},set:function(t,e,n){return r.setAttribute("data-"+Wr(e),n),!0}})),A.enableStyleSyntax&&(r.style=new t({setProperty:function(t,e){r.setAttribute(t,e)},getPropertyValue:function(t){return r.getAttribute(t)},removeProperty:function(t){r.removeAttribute(t)},item:function(){return""}},{get:function(t,e){return void 0!==t[e]?t[e]:r.getAttribute(e)},set:function(t,e,n){return r.setAttribute(e,n),!0}})),r}_r(t,i);var e=t.prototype;return e.destroy=function(){i.prototype.destroy.call(this),this.getAnimations().forEach(function(t){t.cancel()})},e.cloneNode=function(e,t){var n,r=f({},this.attributes);for(n in r){var i=r[n];Ms(i)&&"clipPath"!==n&&"offsetPath"!==n&&"textPath"!==n&&(r[n]=i.cloneNode(e)),t&&(r[n]=t(n,i))}var a=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:r});return a.setLocalTransform(this.getLocalTransform()),e&&this.children.forEach(function(t){t.style.isMarker||(t=t.cloneNode(e),a.appendChild(t))}),a},e.initAttributes=function(t){void 0===t&&(t={});var e,n=this.renderable,r={forceUpdateGeometry:!0},i=(A.enableCSSParsing&&(r.usedAttributes=Ps),{});for(e in t)i[Xr(e)]=t[e];A.styleValueRegistry.processProperties(this,i,r),n.dirty=!0},e.setAttribute=function(t,e,n){void 0===n&&(n=!1);t=Xr(t);rn(e)||!n&&e===this.attributes[t]||(this.internalSetAttribute(t,e),i.prototype.setAttribute.call(this,t,e))},e.internalSetAttribute=function(t,e,n){void 0===n&&(n={});var r=this.renderable,i=this.attributes[t],a=this.parsedStyle[t],o=(A.styleValueRegistry.processProperties(this,((o={})[t]=e,o),n),r.dirty=!0,this.parsedStyle[t]);this.isConnected&&(Ss.relatedNode=this,Ss.prevValue=i,Ss.newValue=e,Ss.attrName=t,Ss.prevParsedValue=a,Ss.newParsedValue=o,this.isMutationObserved?this.dispatchEvent(Ss):(Ss.target=this).ownerDocument.defaultView.dispatchEvent(Ss,!0)),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(t,i,e,a,o)},e.getBBox=function(){var t=this.getBounds(),e=t.getMin(),n=e[0],e=e[1],t=t.getMax(),r=t[0],t=t[1];return new Jo(n,e,r-n,t-e)},e.setOrigin=function(t,e,n){return A.sceneGraphService.setOrigin(this,Mi(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.getOrigin=function(){return A.sceneGraphService.getOrigin(this)},e.setPosition=function(t,e,n){return A.sceneGraphService.setPosition(this,Mi(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.setLocalPosition=function(t,e,n){return A.sceneGraphService.setLocalPosition(this,Mi(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.translate=function(t,e,n){return A.sceneGraphService.translate(this,Mi(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.translateLocal=function(t,e,n){return A.sceneGraphService.translateLocal(this,Mi(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.getPosition=function(){return A.sceneGraphService.getPosition(this)},e.getLocalPosition=function(){return A.sceneGraphService.getLocalPosition(this)},e.scale=function(t,e,n){return this.scaleLocal(t,e,n)},e.scaleLocal=function(t,e,n){return"number"==typeof t&&(t=Mi(t,e=e||t,n=n||t)),A.sceneGraphService.scaleLocal(this,t),this},e.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=Mi(t,e=e||t,n=n||t)),A.sceneGraphService.setLocalScale(this,t),this},e.getLocalScale=function(){return A.sceneGraphService.getLocalScale(this)},e.getScale=function(){return A.sceneGraphService.getScale(this)},e.getEulerAngles=function(){return Ei(Oi(v(),A.sceneGraphService.getWorldTransform(this))[2])},e.getLocalEulerAngles=function(){return Ei(Oi(v(),A.sceneGraphService.getLocalRotation(this))[2])},e.setEulerAngles=function(t){return A.sceneGraphService.setEulerAngles(this,0,0,t),this},e.setLocalEulerAngles=function(t){return A.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},e.rotateLocal=function(t,e,n){return _(e)&&_(n)?A.sceneGraphService.rotateLocal(this,0,0,t):A.sceneGraphService.rotateLocal(this,t,e,n),this},e.rotate=function(t,e,n){return _(e)&&_(n)?A.sceneGraphService.rotate(this,0,0,t):A.sceneGraphService.rotate(this,t,e,n),this},e.setRotation=function(t,e,n,r){return A.sceneGraphService.setRotation(this,t,e,n,r),this},e.setLocalRotation=function(t,e,n,r){return A.sceneGraphService.setLocalRotation(this,t,e,n,r),this},e.setLocalSkew=function(t,e){return A.sceneGraphService.setLocalSkew(this,t,e),this},e.getRotation=function(){return A.sceneGraphService.getRotation(this)},e.getLocalRotation=function(){return A.sceneGraphService.getLocalRotation(this)},e.getLocalSkew=function(){return A.sceneGraphService.getLocalSkew(this)},e.getLocalTransform=function(){return A.sceneGraphService.getLocalTransform(this)},e.getWorldTransform=function(){return A.sceneGraphService.getWorldTransform(this)},e.setLocalTransform=function(t){return A.sceneGraphService.setLocalTransform(this,t),this},e.resetLocalTransform=function(){A.sceneGraphService.resetLocalTransform(this)},e.getAnimations=function(){return this.activeAnimations},e.animate=function(t,e){var n=null==(n=this.ownerDocument)?void 0:n.timeline;return n?n.play(this,t,e):null},e.isVisible=function(){var t;return"visible"===(null==(t=this.parsedStyle)?void 0:t.visibility)},e.isInteractive=function(){var t;return"none"!==(null==(t=this.parsedStyle)?void 0:t.pointerEvents)},e.isCulled=function(){return!(!this.cullable||!this.cullable.enable||this.cullable.visible)},e.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,this.parentNode.children.map(function(t){return Number(t.style.zIndex)}))+1),this},e.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,this.parentNode.children.map(function(t){return Number(t.style.zIndex)}))-1),this},e.getConfig=function(){return this.config},e.attr=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],a=n[1];return i?Ye(i)?(Object.keys(i).forEach(function(t){e.setAttribute(t,i[t])}),this):2===n.length?(this.setAttribute(i,a),this):this.attributes[i]:this.attributes},e.getMatrix=function(t){var t=t||this.getWorldTransform(),e=bt(v(),t),n=e[0],e=e[1],r=xt(v(),t),i=r[0],r=r[1],t=wt(Ut(),t),t=Oi(v(),t),a=t[0],t=t[2];return Si(a||t,n,e,i,r)},e.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},e.setMatrix=function(t){var t=_i(t),e=t[0],n=t[1],r=t[2],i=t[3],t=t[4];this.setEulerAngles(t).setPosition(e,n).setLocalScale(r,i)},e.setLocalMatrix=function(t){var t=_i(t),e=t[0],n=t[1],r=t[2],i=t[3],t=t[4];this.setLocalEulerAngles(t).setLocalPosition(e,n).setLocalScale(r,i)},e.show=function(){A.enableCSSParsing?this.style.visibility="visible":this.forEach(function(t){t.style.visibility="visible"})},e.hide=function(){A.enableCSSParsing?this.style.visibility="hidden":this.forEach(function(t){t.style.visibility="hidden"})},e.getCount=function(){return this.childElementCount},e.getParent=function(){return this.parentElement},e.getChildren=function(){return this.children},e.getFirst=function(){return this.firstElementChild},e.getLast=function(){return this.lastElementChild},e.getChildByIndex=function(t){return this.children[t]||null},e.add=function(t,e){return this.appendChild(t,e)},e.setClip=function(t){this.style.clipPath=t},e.set=function(t,e){this.config[t]=e},e.get=function(t){return this.config[t]},e.moveTo=function(t,e,n){return this.setPosition(t,e=void 0===e?0:e,n=void 0===n?0:n),this},e.move=function(t,e,n){return this.setPosition(t,e=void 0===e?0:e,n=void 0===n?0:n),this},e.setZIndex=function(t){return this.style.zIndex=t,this},Sr(t,[{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}}]),t}(ys),Cs=["style"],Ns=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Tr(t,Cs);return n.call(this,f({type:E.CIRCLE,style:A.enableCSSParsing?f({cx:"",cy:"",r:""},e):f({},e),initialParsedStyle:{anchor:[.5,.5],transformOrigin:A.enableCSSParsing?null:[si,si]}},t))||this}return _r(t,n),t}(Ls),js=["style"],Rs=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Tr(t,js),e=n.call(this,f({style:A.enableCSSParsing?f({x:"",y:""},e):f({},e)},t))||this;return e.isCustomElement=!0,e}return _r(t,n),t}(Ls),Is=["style"],Bs=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Tr(t,Is);return n.call(this,f({type:E.ELLIPSE,style:A.enableCSSParsing?f({cx:"",cy:"",rx:"",ry:""},e):f({},e),initialParsedStyle:{anchor:[.5,.5],transformOrigin:A.enableCSSParsing?null:[si,si]}},t))||this}return _r(t,n),t}(Ls),Ds=["style"],Fs=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Tr(t,Ds);return n.call(this,f({type:E.GROUP,style:A.enableCSSParsing?f({x:"",y:"",width:"",height:""},e):f({},e)},t))||this}return _r(t,n),t}(Ls),zs=["style"],Gs=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Tr(t,zs),e=n.call(this,f({type:E.HTML,style:A.enableCSSParsing?f({x:"",y:"",width:"auto",height:"auto",innerHTML:""},e):f({},e)},t))||this;return e.cullable.enable=!1,e}_r(t,n);var e=t.prototype;return e.getDomElement=function(){return this.parsedStyle.$el},e.getBoundingClientRect=function(){return this.parsedStyle.$el.getBoundingClientRect()},e.getClientRects=function(){return[this.getBoundingClientRect()]},e.getBounds=function(){var t,e,n=this.getBoundingClientRect(),r=null==(r=this.ownerDocument)||null==(r=r.defaultView)?void 0:r.getContextService().getBoundingClientRect();return r?(t=n.left-r.left,r=n.top-r.top,(e=new Xo).setMinMax([t,r,0],[t+n.width,r+n.height,0]),e):null},e.getLocalBounds=function(){if(this.parentNode){var t,e=ct(J(),this.parentNode.getWorldTransform()),n=this.getBounds();if(!Xo.isEmpty(n))return(t=new Xo).setFromTransformedAABB(n,e),t}return this.getBounds()},t}(Ls),Ws=["style"],Ys=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Tr(t,Ws);return n.call(this,f({type:E.IMAGE,style:A.enableCSSParsing?f({x:"",y:"",img:"",width:"",height:""},e):f({},e)},t))||this}return _r(t,n),t}(Ls),Hs=["style"],Vs=function(r){function t(t){var t=void 0===t?{}:t,e=t.style,t=Tr(t,Hs),e=r.call(this,f({type:E.LINE,style:f({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0,isBillboard:!1},e)},t))||this,t=(e.markerStartAngle=0,e.markerEndAngle=0,e.parsedStyle),n=t.markerStart,t=t.markerEnd;return n&&Ms(n)&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&Ms(t)&&(e.markerEndAngle=t.getLocalEulerAngles(),e.appendChild(t)),e.transformMarker(!0),e.transformMarker(!1),e}_r(t,r);var e=t.prototype;return e.attributeChangedCallback=function(t,e,n,r,i){"x1"===t||"y1"===t||"x2"===t||"y2"===t||"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&Ms(r)&&(this.markerStartAngle=0,r.remove()),i&&Ms(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t&&(r&&Ms(r)&&(this.markerEndAngle=0,r.remove()),i)&&Ms(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))},e.transformMarker=function(t){var e,n,r,i,a,o=this.parsedStyle,s=o.markerStart,l=o.markerEnd,c=o.markerStartOffset,u=o.markerEndOffset,h=o.x1,f=o.x2,d=o.y1,p=o.y2,g=o.defX,o=o.defY,s=t?s:l;s&&Ms(s)&&(l=0,t=t?(r=h-g,i=d-o,e=f-h,n=p-d,a=c||0,this.markerStartAngle):(r=f-g,i=p-o,e=h-f,n=d-p,a=u||0,this.markerEndAngle),l=Math.atan2(n,e),s.setLocalEulerAngles(180*l/Math.PI+t),s.setLocalPosition(r+Math.cos(l)*a,i+Math.sin(l)*a))},e.getPoint=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.x1,i=n.y1,a=n.x2,o=n.y2,s=n.defX,n=n.defY,r=Wn.pointAt(r,i,a,o,t),i=r.x,a=r.y,o=Gt(v(),M(i-s,a-n,0),e?this.getWorldTransform():this.getLocalTransform());return new Qo(o[0],o[1])},e.getPointAtLength=function(t,e){return void 0===e&&(e=!1),this.getPoint(t/this.getTotalLength(),e)},e.getTotalLength=function(){var t=this.parsedStyle,e=t.x1,n=t.y1,r=t.x2,t=t.y2;return Wn.length(e,n,r,t)},t}(Ls),qs=["style"],$s={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Jo(0,0,0,0)},z=function(i){function t(t){var t=void 0===t?{}:t,e=t.style,t=Tr(t,qs),e=i.call(this,f({type:E.PATH,style:A.enableCSSParsing?f({path:"",miterLimit:""},e):f({},e),initialParsedStyle:A.enableCSSParsing?null:{miterLimit:4,path:f({},$s)}},t))||this,t=(e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[],e.parsedStyle),n=t.markerStart,r=t.markerEnd,t=t.markerMid;return n&&Ms(n)&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&Ms(t)&&e.placeMarkerMid(t),r&&Ms(r)&&(e.markerEndAngle=r.getLocalEulerAngles(),e.appendChild(r)),e.transformMarker(!0),e.transformMarker(!1),e}_r(t,i);var e=t.prototype;return e.attributeChangedCallback=function(t,e,n,r,i){"path"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&Ms(r)&&(this.markerStartAngle=0,r.remove()),i&&Ms(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&Ms(r)&&(this.markerEndAngle=0,r.remove()),i&&Ms(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},e.transformMarker=function(t){var e,n,r,i,a,o=this.parsedStyle,s=o.markerStart,l=o.markerEnd,c=o.markerStartOffset,u=o.markerEndOffset,h=o.defX,o=o.defY,s=t?s:l;s&&Ms(s)&&(l=0,h=t?(i=(t=this.getStartTangent())[0],e=(t=t[1])[0]-h,n=t[1]-o,r=i[0]-t[0],i=i[1]-t[1],a=c||0,this.markerStartAngle):(c=(t=this.getEndTangent())[0],e=(t=t[1])[0]-h,n=t[1]-o,r=c[0]-t[0],i=c[1]-t[1],a=u||0,this.markerEndAngle),l=Math.atan2(i,r),s.setLocalEulerAngles(180*l/Math.PI+h),s.setLocalPosition(e+Math.cos(l)*a,n+Math.sin(l)*a))},e.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.path.segments,r=e.defX,i=e.defY;if(this.markerMidList.forEach(function(t){t.remove()}),t&&Ms(t))for(var a=1;a<n.length-1;a++){var o=n[a].currentPoint,s=o[0],o=o[1],l=1===a?t:t.cloneNode(!0);this.markerMidList.push(l),this.appendChild(l),l.setLocalPosition(s-r,o-i)}},e.getTotalLength=function(){return aa(this)},e.getPointAtLength=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.defX,i=n.defY,n=Re(n.path.absolutePath,t,y(y({},a),{bbox:!1,length:!0})).point,t=n.x,a=n.y,n=Gt(v(),M(t-r,a-i,0),e?this.getWorldTransform():this.getLocalTransform());return new Qo(n[0],n[1])},e.getPoint=function(t,e){return void 0===e&&(e=!1),this.getPointAtLength(t*aa(this),e)},e.getStartTangent=function(){var t,e,n=this.parsedStyle.path.segments,r=[];return 1<n.length&&(t=n[0].currentPoint,e=n[1].currentPoint,r=[],(n=n[1].startTangent)?r.push([t[0]-n[0],t[1]-n[1]]):r.push([e[0],e[1]]),r.push([t[0],t[1]])),r},e.getEndTangent=function(){var t,e,n=this.parsedStyle.path.segments,r=n.length,i=[];return 1<r&&(t=n[r-2].currentPoint,e=n[r-1].currentPoint,i=[],(n=n[r-1].endTangent)?i.push([e[0]-n[0],e[1]-n[1]]):i.push([t[0],t[1]]),i.push([e[0],e[1]])),i},t}(Ls),Us=["style"],Xs=function(i){function t(t){var t=void 0===t?{}:t,e=t.style,t=Tr(t,Us),e=i.call(this,f({type:E.POLYGON,style:A.enableCSSParsing?f({points:"",miterLimit:"",isClosed:!0},e):f({},e),initialParsedStyle:A.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},t))||this,t=(e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[],e.parsedStyle),n=t.markerStart,r=t.markerEnd,t=t.markerMid;return n&&Ms(n)&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&Ms(t)&&e.placeMarkerMid(t),r&&Ms(r)&&(e.markerEndAngle=r.getLocalEulerAngles(),e.appendChild(r)),e.transformMarker(!0),e.transformMarker(!1),e}_r(t,i);var e=t.prototype;return e.attributeChangedCallback=function(t,e,n,r,i){"points"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&Ms(r)&&(this.markerStartAngle=0,r.remove()),i&&Ms(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&Ms(r)&&(this.markerEndAngle=0,r.remove()),i&&Ms(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},e.transformMarker=function(t){var e,n,r,i,a,o=this.parsedStyle,s=o.markerStart,l=o.markerEnd,c=o.markerStartOffset,u=o.markerEndOffset,h=o.points.points,f=o.defX,o=o.defY,s=t?s:l;s&&Ms(s)&&(i=h[l=0][0]-f,a=h[0][1]-o,c=t?(e=h[1][0]-h[0][0],n=h[1][1]-h[0][1],r=c||0,this.markerStartAngle):(t=h.length,n=this.parsedStyle.isClosed?(e=h[t-1][0]-h[0][0],h[t-1][1]-h[0][1]):(i=h[t-1][0]-f,a=h[t-1][1]-o,e=h[t-2][0]-h[t-1][0],h[t-2][1]-h[t-1][1]),r=u||0,this.markerEndAngle),l=Math.atan2(n,e),s.setLocalEulerAngles(180*l/Math.PI+c),s.setLocalPosition(i+Math.cos(l)*r,a+Math.sin(l)*r))},e.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.points.points,r=e.defX,i=e.defY;if(this.markerMidList.forEach(function(t){t.remove()}),this.markerMidList=[],t&&Ms(t))for(var a=1;a<(this.parsedStyle.isClosed?n.length:n.length-1);a++){var o=n[a][0]-r,s=n[a][1]-i,l=1===a?t:t.cloneNode(!0);this.markerMidList.push(l),this.appendChild(l),l.setLocalPosition(o,s)}},t}(Ls),Ks=["style"],Zs=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Tr(t,Ks);return n.call(this,f({type:E.POLYLINE,style:A.enableCSSParsing?f({points:"",miterLimit:"",isClosed:!1},e):f({},e),initialParsedStyle:A.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},t))||this}_r(t,n);var e=t.prototype;return e.getTotalLength=function(){return this.parsedStyle.points.totalLength},e.getPointAtLength=function(t,e){return void 0===e&&(e=!1),this.getPoint(t/this.getTotalLength(),e)},e.getPoint=function(n,t){void 0===t&&(t=!1);var e=this.parsedStyle,r=e.defX,i=e.defY,e=e.points,a=e.points,e=e.segments,o=0,s=0,e=(e.forEach(function(t,e){n>=t[0]&&n<=t[1]&&(o=(n-t[0])/(t[1]-t[0]),s=e)}),Wn.pointAt(a[s][0],a[s][1],a[s+1][0],a[s+1][1],o)),a=e.x,e=e.y,a=Gt(v(),M(a-r,e-i,0),t?this.getWorldTransform():this.getLocalTransform());return new Qo(a[0],a[1])},e.getStartTangent=function(){var t=this.parsedStyle.points.points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.getEndTangent=function(){var t=this.parsedStyle.points.points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},t}(Xs),Qs=["style"],Js=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Tr(t,Qs);return n.call(this,f({type:E.RECT,style:A.enableCSSParsing?f({x:"",y:"",width:"",height:"",radius:""},e):f({},e)},t))||this}return _r(t,n),t}(Ls),tl=["style"],el=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Tr(t,tl);return n.call(this,f({type:E.TEXT,style:A.enableCSSParsing?f({x:"",y:"",text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",letterSpacing:"",lineHeight:"",miterLimit:"",wordWrap:!1,wordWrapWidth:0,leading:0,dx:"",dy:"",isBillboard:!1,sizeAttenuation:!0},e):f({fill:"black"},e),initialParsedStyle:A.enableCSSParsing?{}:{x:0,y:0,fontSize:16,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",lineHeight:0,letterSpacing:0,textBaseline:"alphabetic",textAlign:"start",wordWrap:!1,wordWrapWidth:0,leading:0,dx:0,dy:0,isBillboard:!1,sizeAttenuation:!0}},t))||this}_r(t,n);var e=t.prototype;return e.getComputedTextLength=function(){var t;return(null==(t=this.parsedStyle.metrics)?void 0:t.maxLineWidth)||0},e.getLineBoundingRects=function(){var t;return(null==(t=this.parsedStyle.metrics)?void 0:t.lineMetrics)||[]},e.isOverflowing=function(){return!!this.parsedStyle.isOverflowing},t}(Ls),nl=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:i.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:i.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:i.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:i.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:i.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:i.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:i.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:i.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:i.LENGTH_PERCENTAGE},{n:"lineJoin",inh:!0,l:!0,a:["strokeLinejoin"],k:["miter","bevel","round"],d:"miter"},{n:"lineCap",inh:!0,l:!0,a:["strokeLinecap"],k:["butt","round","square"],d:"butt"},{n:"lineDash",int:!0,inh:!0,k:["none"],a:["strokeDasharray"],syntax:i.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:i.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:i.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:i.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:i.Z_INDEX},{n:"visibility",k:["visible","hidden"],ind:!0,inh:!0,int:!0,d:"visible"},{n:"pointerEvents",inh:!0,k:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],d:"auto"},{n:"filter",ind:!0,l:!0,k:["none"],d:"none",syntax:i.FILTER},{n:"clipPath",syntax:i.DEFINED_PATH},{n:"textPath",syntax:i.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:i.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===E.CIRCLE||t===E.ELLIPSE?"center":t===E.TEXT?"text-anchor":"left top"},l:!0,syntax:i.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===E.CIRCLE||t===E.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:i.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:i.COORDINATE},{n:"cy",int:!0,d:"0",syntax:i.COORDINATE},{n:"cz",int:!0,d:"0",syntax:i.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:i.COORDINATE},{n:"y",int:!0,d:"0",syntax:i.COORDINATE},{n:"z",int:!0,d:"0",syntax:i.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:i.COORDINATE},{n:"y1",int:!0,l:!0,syntax:i.COORDINATE},{n:"z1",int:!0,l:!0,syntax:i.COORDINATE},{n:"x2",int:!0,l:!0,syntax:i.COORDINATE},{n:"y2",int:!0,l:!0,syntax:i.COORDINATE},{n:"z2",int:!0,l:!0,syntax:i.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:i.PATH,p:50},{n:"points",int:!0,l:!0,syntax:i.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:i.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:i.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:i.LENGTH_PERCENTAGE},{n:"fontFamily",l:!0,inh:!0,d:"sans-serif"},{n:"fontStyle",l:!0,inh:!0,k:["normal","italic","oblique"],d:"normal"},{n:"fontWeight",l:!0,inh:!0,k:["normal","bold","bolder","lighter"],d:"normal"},{n:"fontVariant",l:!0,inh:!0,k:["normal","small-caps"],d:"normal"},{n:"lineHeight",l:!0,syntax:i.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:i.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:i.NUMBER,d:function(t){return t===E.PATH||t===E.POLYGON||t===E.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","middle","end","left","right"],d:"start"},{n:"markerStart",syntax:i.MARKER},{n:"markerEnd",syntax:i.MARKER},{n:"markerMid",syntax:i.MARKER},{n:"markerStartOffset",syntax:i.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:i.LENGTH,l:!0,int:!0,d:"0"}],rl=nl.filter(function(t){return!!t.l}).map(function(t){return t.n}),il={},al=new WeakMap,bs=function(){function t(){var e=this;nl.forEach(function(t){e.registerMetadata(t)})}var e=t.prototype;return e.registerMetadata=function(e){[e.n].concat(e.a||[]).forEach(function(t){il[t]=e})},e.unregisterMetadata=function(t){delete il[t]},e.getPropertySyntax=function(t){return A.CSSPropertySyntaxFactory[t]},e.processProperties=function(n,e,t){var r=this;if(void 0===t&&(t={skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[]}),A.enableCSSParsing){var i=t,a=i.skipUpdateAttribute,o=i.skipParse,s=i.forceUpdateGeometry,i=i.usedAttributes,l=s,c=Object.keys(e);c.forEach(function(t){a||(n.attributes[t]=e[t]),!l&&null!=(t=il[t])&&t.l&&(l=!0)}),o||c.forEach(function(t){n.computedStyle[t]=r.parseProperty(t,n.attributes[t],n)}),(c=null!=i&&i.length?Array.from(new Set(c.concat(i))):c).forEach(function(t){t in n.computedStyle&&(n.parsedStyle[t]=r.computeProperty(t,n.computedStyle[t],n))}),l&&this.updateGeometry(n),c.forEach(function(t){t in n.parsedStyle&&r.postProcessProperty(t,n,c)}),A.enableCSSParsing&&n.children.length&&c.forEach(function(e){e in n.parsedStyle&&r.isPropertyInheritable(e)&&n.children.forEach(function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})})})}else{Object.assign(n.attributes,e);var s=Object.keys(e),o=n.parsedStyle.clipPath,i=n.parsedStyle.offsetPath,u=(n.parsedStyle=Object.assign(n.parsedStyle,e),!!t.forceUpdateGeometry);if(!u)for(var h=0;h<rl.length;h++)if(rl[h]in e){u=!0;break}e.fill&&(n.parsedStyle.fill=$a(e.fill)),e.stroke&&(n.parsedStyle.stroke=$a(e.stroke)),e.shadowColor&&(n.parsedStyle.shadowColor=$a(e.shadowColor)),e.filter&&(n.parsedStyle.filter=ao(e.filter)),_(e.radius)||(n.parsedStyle.radius=to(e.radius,4)),_(e.lineDash)||(n.parsedStyle.lineDash=to(e.lineDash,2)),e.points&&(n.parsedStyle.points=mo(e.points,n)),""===e.path&&(n.parsedStyle.path=f({},$s)),e.path&&(n.parsedStyle.path=po(e.path,n)),e.textTransform&&A.CSSPropertySyntaxFactory["<text-transform>"].calculator(null,null,{value:e.textTransform},n,null),e.clipPath&&A.CSSPropertySyntaxFactory["<defined-path>"].calculator("clipPath",o,e.clipPath,n,this),e.offsetPath&&A.CSSPropertySyntaxFactory["<defined-path>"].calculator("offsetPath",i,e.offsetPath,n,this),e.anchor&&(n.parsedStyle.anchor=to(e.anchor,2)),e.transform&&(n.parsedStyle.transform=Mo(e.transform)),e.transformOrigin&&(n.parsedStyle.transformOrigin=jo(e.transformOrigin)),e.markerStart&&(n.parsedStyle.markerStart=A.CSSPropertySyntaxFactory["<marker>"].calculator(null,e.markerStart,e.markerStart,null,null)),e.markerEnd&&(n.parsedStyle.markerEnd=A.CSSPropertySyntaxFactory["<marker>"].calculator(null,e.markerEnd,e.markerEnd,null,null)),e.markerMid&&(n.parsedStyle.markerMid=A.CSSPropertySyntaxFactory["<marker>"].calculator("",e.markerMid,e.markerMid,null,null)),(n.nodeName!==E.CIRCLE&&n.nodeName!==E.ELLIPSE||_(e.cx)&&_(e.cy))&&(n.nodeName!==E.RECT&&n.nodeName!==E.IMAGE&&n.nodeName!==E.GROUP&&n.nodeName!==E.HTML&&n.nodeName!==E.TEXT&&n.nodeName!==E.MESH||_(e.x)&&_(e.y)&&_(e.z))&&(n.nodeName!==E.LINE||_(e.x1)&&_(e.y1)&&_(e.z1)&&_(e.x2)&&_(e.y2)&&_(e.z2))||A.CSSPropertySyntaxFactory["<coordinate>"].postProcessor(n,s),_(e.zIndex)||A.CSSPropertySyntaxFactory["<z-index>"].postProcessor(n,s),e.path&&A.CSSPropertySyntaxFactory["<path>"].postProcessor(n,s),e.points&&A.CSSPropertySyntaxFactory["<list-of-points>"].postProcessor(n,s),_(e.offsetDistance)||A.CSSPropertySyntaxFactory["<offset-distance>"].postProcessor(n,s),e.transform&&A.CSSPropertySyntaxFactory["<transform>"].postProcessor(n,s),u&&this.updateGeometry(n)}},e.parseProperty=function(t,e,n){var r,t=il[t],i=e;return"unset"===(e=""!==e&&!_(e)?e:"unset")||"initial"===e||"inherit"===e?i=$r(e):t&&(r=t.k,t=(t=t.syntax)&&this.getPropertySyntax(t),r&&-1<r.indexOf(e)?i=$r(e):t&&t.parser&&(i=t.parser(e,n))),i},e.computeProperty=function(t,e,n){var r=il[t],i="g-root"===n.id,a=e;if(r){var o=r.syntax,s=r.inh,r=r.d;if(e instanceof zr){var l=e.value;if("initial"===(l="unset"===l?s&&!i?"inherit":"initial":l))_(r)||(e=this.parseProperty(t,Hr(r)?r(n.nodeName):r,n));else if("inherit"===l)return s=this.tryToResolveProperty(n,t,{inherited:!0}),_(s)?void this.addUnresolveProperty(n,t):s}i=o&&this.getPropertySyntax(o);a=i&&i.calculator?(r=n.parsedStyle[t],i.calculator(t,r,e,n,this)):e instanceof zr?e.value:e}return a},e.postProcessProperty=function(t,e,n){var t=il[t];t&&t.syntax&&(t=t.syntax&&this.getPropertySyntax(t.syntax))&&t.postProcessor&&t.postProcessor(e,n)},e.addUnresolveProperty=function(t,e){var n=al.get(t);n||(al.set(t,[]),n=al.get(t)),-1===n.indexOf(e)&&n.push(e)},e.tryToResolveProperty=function(t,e,n){var n=(n=void 0===n?{}:n).inherited;if(n&&(t.parentElement&&function(t,e){t=al.get(t);return!t||0===t.length||t.includes(e)}(t.parentElement,e)))return"unset"===(n=t.parentElement.parsedStyle[e])||"initial"===n||"inherit"===n?void 0:n},e.recalc=function(e){var n,t=al.get(e);t&&t.length&&(n={},t.forEach(function(t){n[t]=e.attributes[t]}),this.processProperties(e,n),al.delete(e))},e.updateGeometry=function(t){var s,e,n,r,i,a,o,l,c,u,h,f,d,p,g,m=t.nodeName,v=A.geometryUpdaterFactory[m];v&&((s=t.geometry).contentBounds||(s.contentBounds=new Xo),s.renderBounds||(s.renderBounds=new Xo),e=t.parsedStyle,n=(v=v.update(e,t)).width,r=v.height,h=void 0===(h=v.depth)?0:h,u=void 0===(u=v.offsetX)?0:u,p=void 0===(p=v.offsetY)?0:p,v=void 0===(v=v.offsetZ)?0:v,h=[Math.abs(n)/2,Math.abs(r)/2,h/2],l=e.stroke,c=e.lineWidth,g=e.increasedLineWidthForHitTesting,d=e.shadowType,f=e.shadowColor,i=void 0===(i=e.filter)?[]:i,a=e.transformOrigin,o=e.anchor,m===E.TEXT?delete e.anchor:m===E.MESH&&(e.anchor[2]=.5),u=[(1-2*(o&&o[0]||0))*n/2+u,(1-2*(o&&o[1]||0))*r/2+p,(1-2*(o&&o[2]||0))*h[2]+v],s.contentBounds.update(u,h),p=m===E.POLYLINE||m===E.POLYGON||m===E.PATH?Math.SQRT2:.5,l&&!l.isNone&&(h[0]+=v=((c||0)+(g||0))*p,h[1]+=v),s.renderBounds.update(u,h),f&&d&&"inner"!==d&&(l=(m=s.renderBounds).min,c=m.max,g=e.shadowBlur||0,p=e.shadowOffsetX||0,v=e.shadowOffsetY||0,u=l[0]-g+p,h=c[0]+g+p,f=l[1]-g+v,d=c[1]+g+v,l[0]=Math.min(l[0],u),c[0]=Math.max(c[0],h),l[1]=Math.min(l[1],f),c[1]=Math.max(c[1],d),s.renderBounds.setMinMax(l,c)),i.forEach(function(t){var e,n,r,i,a,o=t.name,t=t.params;"blur"===o?(i=t[0].value,s.renderBounds.update(s.renderBounds.center,bi(s.renderBounds.halfExtents,s.renderBounds.halfExtents,[i,i,0]))):"drop-shadow"===o&&(i=t[0].value,o=t[1].value,t=t[2].value,e=(n=s.renderBounds).min,n=n.max,r=e[0]-t+i,i=n[0]+t+i,a=e[1]-t+o,t=n[1]+t+o,e[0]=Math.min(e[0],r),n[0]=Math.max(n[0],i),e[1]=Math.min(e[1],a),n[1]=Math.max(n[1],t),s.renderBounds.setMinMax(e,n))}),o=e.anchor,m=r<0,g=((p=n<0)?-1:1)*(a?no(a[0],0,t):0),v=(m?-1:1)*(a?no(a[1],1,t):0),g-=(p?-1:1)*(o&&o[0]||0)*s.contentBounds.halfExtents[0]*2,v-=(m?-1:1)*(o&&o[1]||0)*s.contentBounds.halfExtents[1]*2,t.setOrigin(g,v),A.sceneGraphService.dirtifyToRoot(t))},e.isPropertyInheritable=function(t){t=il[t];return!!t&&t.inh},t}();(ll=ks=ks||{})[ll.ORBITING=0]="ORBITING",ll[ll.EXPLORING=1]="EXPLORING",ll[ll.TRACKING=2]="TRACKING",(ll=Es=Es||{})[ll.DEFAULT=0]="DEFAULT",ll[ll.ROTATIONAL=1]="ROTATIONAL",ll[ll.TRANSLATIONAL=2]="TRANSLATIONAL",ll[ll.CINEMATIC=3]="CINEMATIC",(ll=Os=Os||{})[ll.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",ll[ll.PERSPECTIVE=1]="PERSPECTIVE";var ol,sl="updated",ll=function(){function t(){this.canvas=void 0,this.eventEmitter=new wr,this.matrix=J(),this.right=M(1,0,0),this.up=M(0,1,0),this.forward=M(0,0,1),this.position=M(0,0,1),this.focalPoint=M(0,0,0),this.distanceVector=M(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.left=void 0,this.rright=void 0,this.top=void 0,this.bottom=void 0,this.projectionMatrix=J(),this.projectionMatrixInverse=J(),this.jitteredProjectionMatrix=void 0,this.view=void 0,this.enableUpdate=!0,this.type=ks.EXPLORING,this.trackingMode=Es.DEFAULT,this.projectionMode=Os.PERSPECTIVE,this.frustum=new Zo,this.orthoMatrix=J()}var e=t.prototype;return e.isOrtho=function(){return this.projectionMode===Os.ORTHOGRAPHIC},e.getProjectionMode=function(){return this.projectionMode},e.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},e.getPerspectiveInverse=function(){return this.projectionMatrixInverse},e.getFrustum=function(){return this.frustum},e.getPosition=function(){return this.position},e.getFocalPoint=function(){return this.focalPoint},e.getDollyingStep=function(){return this.dollyingStep},e.getNear=function(){return this.near},e.getFar=function(){return this.far},e.getZoom=function(){return this.zoom},e.getOrthoMatrix=function(){return this.orthoMatrix},e.getView=function(){return this.view},e.setEnableUpdate=function(t){this.enableUpdate=t},e.setType=function(t,e){return this.type=t,this.type===ks.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===ks.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},e.setProjectionMode=function(t){return this.projectionMode=t,this},e.setTrackingMode=function(t){if(this.type!==ks.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this},e.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},e.getViewTransform=function(){return ct(J(),this.matrix)},e.getWorldTransform=function(){return this.matrix},e.jitterProjectionMatrix=function(t,e){t=mt(J(),[t,e,0]);this.jitteredProjectionMatrix=ht(J(),t,this.projectionMatrix)},e.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},e.setMatrix=function(t){return this.matrix=t,this._update(),this},e.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},e.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},e.setNear=function(t){return this.projectionMode===Os.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this},e.setFar=function(t){return this.projectionMode===Os.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this},e.setViewOffset=function(t,e,n,r,i,a){return this.aspect=t/e,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.projectionMode===Os.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},e.clearViewOffset=function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===Os.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},e.setZoom=function(t){return this.zoom=t,this.projectionMode===Os.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===Os.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},e.setZoomByViewportPoint=function(t,e){var n=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),r=n.x,n=n.y,i=this.roll,t=(this.rotate(0,0,-i),this.setPosition(r,n),this.setFocalPoint(r,n),this.setZoom(t),this.rotate(0,0,i),this.canvas.viewport2Canvas({x:e[0],y:e[1]})),i=M(t.x-r,t.y-n,0),e=Dt(i,this.right)/Lt(this.right),r=Dt(i,this.up)/Lt(this.up);return this.pan(-e,-r),this},e.setPerspective=function(t,e,n,r){this.projectionMode=Os.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,a,o,s,n=this.near*Math.tan(ki(.5*this.fov))/this.zoom,e=2*n,r=this.aspect*e,l=-.5*r;return null!=(i=this.view)&&i.enabled&&(i=this.view.fullWidth,a=this.view.fullHeight,l+=this.view.offsetX*r/i,n-=this.view.offsetY*e/a,r*=this.view.width/i,e*=this.view.height/a),i=this.projectionMatrix,l=(a=l)+r,n=(r=n)-e,e=this.far,o=2*t/(r-n),s=(l+a)/(l-a),r=(r+n)/(r-n),n=-(e+t)/(e-t),e=-2*e*t/(e-t),i[0]=2*t/(l-a),i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=o,i[6]=0,i[7]=0,i[8]=s,i[9]=r,i[10]=n,i[11]=-1,i[12]=0,i[13]=0,i[14]=e,i[15]=0,dt(this.projectionMatrix,this.projectionMatrix,M(1,-1,1)),ct(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},e.setOrthographic=function(t,e,n,r,i,a){this.projectionMode=Os.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=a;var o,e=(this.rright-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.rright+this.left)/2,r=(this.top+this.bottom)/2,s=n-e,n=n+e,e=r+t,r=r-t;return null!=(t=this.view)&&t.enabled&&(t=(this.rright-this.left)/this.view.fullWidth/this.zoom,o=(this.top-this.bottom)/this.view.fullHeight/this.zoom,n=(s+=t*this.view.offsetX)+t*this.view.width,r=(e-=o*this.view.offsetY)-o*this.view.height),St(this.projectionMatrix,s,n,r,e,i,a),dt(this.projectionMatrix,this.projectionMatrix,M(1,-1,1)),ct(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},e.setPosition=function(t,e,n){t=Mi(t,e=void 0===e?this.position[1]:e,n=void 0===n?this.position[2]:n);return this._setPosition(t),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},e.setFocalPoint=function(t,e,n){void 0===e&&(e=this.focalPoint[1]),void 0===n&&(n=this.focalPoint[2]);var r,i=M(0,1,0);return this.focalPoint=Mi(t,e,n),this.trackingMode===Es.CINEMATIC&&(t=(r=Rt(v(),this.focalPoint,this.position))[0],e=r[1],n=r[2],r=Lt(r),e=Ei(Math.asin(e/r)),r=90+Ei(Math.atan2(n,t)),gt(n=J(),n,ki(r)),pt(n,n,ki(e)),i=Gt(v(),[0,1,0],n)),ct(this.matrix,_t(J(),this.position,this.focalPoint,i)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},e.getDistance=function(){return this.distance},e.getDistanceVector=function(){return this.distanceVector},e.setDistance=function(t){var e,n,r;return this.distance===t||t<0||(this.distance=t,this.distance<2e-4&&(this.distance=2e-4),this.dollyingStep=this.distance/100,e=v(),t=this.distance,n=this.forward,r=this.focalPoint,e[0]=t*n[0]+r[0],e[1]=t*n[1]+r[1],e[2]=t*n[2]+r[2],this._setPosition(e),this.triggerUpdate()),this},e.setMaxDistance=function(t){return this.maxDistance=t,this},e.setMinDistance=function(t){return this.minDistance=t,this},e.setAzimuth=function(t){return this.azimuth=wi(t),this.computeMatrix(),this._getAxes(),this.type===ks.ORBITING||this.type===ks.EXPLORING?this._getPosition():this.type===ks.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getAzimuth=function(){return this.azimuth},e.setElevation=function(t){return this.elevation=wi(t),this.computeMatrix(),this._getAxes(),this.type===ks.ORBITING||this.type===ks.EXPLORING?this._getPosition():this.type===ks.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getElevation=function(){return this.elevation},e.setRoll=function(t){return this.roll=wi(t),this.computeMatrix(),this._getAxes(),this.type===ks.ORBITING||this.type===ks.EXPLORING?this._getPosition():this.type===ks.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getRoll=function(){return this.roll},e._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},e.computeMatrix=function(){var t=Xt(Ut(),[0,0,1],ki(this.roll)),e=(st(this.matrix),Xt(Ut(),[1,0,0],ki((this.rotateWorld&&this.type!==ks.TRACKING||this.type===ks.TRACKING?1:-1)*this.elevation))),n=Xt(Ut(),[0,1,0],ki((this.rotateWorld&&this.type!==ks.TRACKING||this.type===ks.TRACKING?1:-1)*this.azimuth)),n=Kt(Ut(),n,e),n=Kt(Ut(),n,t),e=kt(J(),n);this.type===ks.ORBITING||this.type===ks.EXPLORING?(ft(this.matrix,this.matrix,this.focalPoint),ht(this.matrix,this.matrix,e),ft(this.matrix,this.matrix,[0,0,this.distance])):this.type===ks.TRACKING&&(ft(this.matrix,this.matrix,this.position),ht(this.matrix,this.matrix,e))},e._setPosition=function(t,e,n){this.position=Mi(t,e,n);t=this.matrix;t[12]=this.position[0],t[13]=this.position[1],t[14]=this.position[2],t[15]=1,this._getOrthoMatrix()},e._getAxes=function(){Ct(this.right,Mi($t(qt(),[1,0,0,0],this.matrix))),Ct(this.up,Mi($t(qt(),[0,1,0,0],this.matrix))),Ct(this.forward,Mi($t(qt(),[0,0,1,0],this.matrix))),Bt(this.right,this.right),Bt(this.up,this.up),Bt(this.forward,this.forward)},e._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=Lt(this.distanceVector);0===r?(this.elevation=0,this.azimuth=0):this.type===ks.TRACKING||this.rotateWorld?(this.elevation=Ei(Math.asin(e/r)),this.azimuth=Ei(Math.atan2(-t,-n))):(this.elevation=-Ei(Math.asin(e/r)),this.azimuth=-Ei(Math.atan2(-t,-n)))},e._getPosition=function(){Ct(this.position,Mi($t(qt(),[0,0,0,1],this.matrix))),this._getDistance()},e._getFocalPoint=function(){var t,e;Wt(this.distanceVector,[0,0,-this.distance],(t=Z(),e=this.matrix,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t)),jt(this.focalPoint,this.position,this.distanceVector),this._getDistance()},e._getDistance=function(){this.distanceVector=Rt(v(),this.focalPoint,this.position),this.distance=Lt(this.distanceVector),this.dollyingStep=this.distance/100},e._getOrthoMatrix=function(){var t,e;this.projectionMode===Os.ORTHOGRAPHIC&&(t=this.position,e=Xt(Ut(),[0,0,1],-this.roll*Math.PI/180),Mt(this.orthoMatrix,e,M((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),M(this.zoom,this.zoom,1),t))},e.triggerUpdate=function(){var t;this.enableUpdate&&(t=this.getViewTransform(),t=ht(J(),this.getPerspective(),t),this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(sl))},e.rotate=function(t,e,n){throw new Error(pi)},e.pan=function(t,e){throw new Error(pi)},e.dolly=function(t){throw new Error(pi)},e.createLandmark=function(t,e){throw new Error(pi)},e.gotoLandmark=function(t,e){throw new Error(pi)},e.cancelLandmarkAnimation=function(){throw new Error(pi)},t}(),cl=function(){function t(){}return t.prototype.update=function(t,e){t=t.r;return{width:2*t,height:2*t}},t}(),ul=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),hl=function(){function t(){}return t.prototype.update=function(t){var e=t.x1,n=t.y1,r=t.x2,t=t.y2,i=Math.min(e,r),e=Math.max(e,r),r=Math.min(n,t);return{width:e-i,height:Math.max(n,t)-r}},t}(),fl=function(){function t(){}return t.prototype.update=function(t){t=t.path.rect;return{width:t.width,height:t.height}},t}(),dl=function(){function t(){}return t.prototype.update=function(t){var t=t.points.points,e=Math.min.apply(Math,t.map(function(t){return t[0]})),n=Math.max.apply(Math,t.map(function(t){return t[0]})),r=Math.min.apply(Math,t.map(function(t){return t[1]}));return{width:n-e,height:Math.max.apply(Math,t.map(function(t){return t[1]}))-r}},t}(),pl=function(){function t(){}return t.prototype.update=function(t,e){var n=t.img,r=t.width,i=t.height,r=void 0===r?0:r,i=void 0===i?0:i;return n&&!Ue(n)&&(r||(r=n.width,t.width=r),i||(i=n.height,t.height=i)),{width:r,height:i}},t}(),gl=function(){function t(t){this.globalRuntime=void 0,this.globalRuntime=t}var e=t.prototype;return e.isReadyToMeasure=function(t,e){var n=t.text,r=t.textAlign,i=t.textBaseline,a=t.fontSize,o=t.fontStyle,s=t.fontWeight,l=t.fontVariant,t=t.lineWidth;return n&&a&&o&&s&&l&&r&&i&&!_(t)},e.update=function(t,e){var n,r,i=t.text,a=t.textAlign,o=t.lineWidth,s=t.textBaseline,l=t.dx,c=t.dy,u=((null==e||null==(u=e.ownerDocument)||null==(u=u.defaultView)?void 0:u.getConfig())||{}).offscreenCanvas;return this.isReadyToMeasure(t,e)?(e=this.globalRuntime.textService.measureText(i,t,u),i=(t.metrics=e).width,u=e.height,n=e.lineHeight,e=e.fontProperties,i=[i/2,u/2,0],u=[0,1],r=0,"center"===a||"middle"===a?(r=o/2,u=[.5,1]):"right"!==a&&"end"!==a||(r=o,u=[1,1]),a=0,"middle"===s?a=i[1]:"top"===s||"hanging"===s?a=2*i[1]:"alphabetic"===s?a=A.enableCSSParsing?n-e.ascent:0:"bottom"!==s&&"ideographic"!==s||(a=0),l&&(r+=l),c&&(a+=c),t.anchor=[u[0],u[1],0],{width:2*i[0],height:2*i[1],offsetX:r,offsetY:a}):(t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0})},t}(),ml=function(){function t(t,e){var c=this;this.globalRuntime=void 0,this.context=void 0,this.rootTarget=void 0,this.emitter=new wr,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.pickHandler=void 0,this.tmpMatrix=J(),this.tmpVec3=v(),this.onPointerDown=function(t){var e,n=c.createPointerEvent(t);c.dispatchEvent(n,"pointerdown"),"touch"===n.pointerType?c.dispatchEvent(n,"touchstart"):"mouse"!==n.pointerType&&"pen"!==n.pointerType||(e=2===n.button,c.dispatchEvent(n,e?"rightdown":"mousedown")),c.trackingData(t.pointerId).pressTargetsByButton[t.button]=n.composedPath(),c.freeEvent(n)},this.onPointerUp=function(t){var e=performance.now(),n=c.createPointerEvent(t,void 0,void 0,c.context.config.alwaysTriggerPointerEventOnCanvas?c.rootTarget:void 0),r=(c.dispatchEvent(n,"pointerup"),"touch"===n.pointerType?c.dispatchEvent(n,"touchend"):"mouse"!==n.pointerType&&"pen"!==n.pointerType||(r=2===n.button,c.dispatchEvent(n,r?"rightup":"mouseup")),c.trackingData(t.pointerId)),i=c.findMountedTarget(r.pressTargetsByButton[t.button]),a=i;if(i&&!n.composedPath().includes(i)){for(var o,s=i;s&&!n.composedPath().includes(s);)n.currentTarget=s,c.notifyTarget(n,"pointerupoutside"),"touch"===n.pointerType?c.notifyTarget(n,"touchendoutside"):"mouse"!==n.pointerType&&"pen"!==n.pointerType||(o=2===n.button,c.notifyTarget(n,o?"rightupoutside":"mouseupoutside")),hs.isNode(s)&&(s=s.parentNode);delete r.pressTargetsByButton[t.button],a=s}a&&((i=c.clonePointerEvent(n,"click")).target=a,i.path=[],r.clicksByButton[t.button]||(r.clicksByButton[t.button]={clickCount:0,target:i.target,timeStamp:e}),(a=r.clicksByButton[t.button]).target===i.target&&e-a.timeStamp<200?++a.clickCount:a.clickCount=1,a.target=i.target,a.timeStamp=e,i.detail=a.clickCount,null!=(r=n.detail)&&r.preventClick||(c.context.config.useNativeClickEvent||"mouse"!==i.pointerType&&"touch"!==i.pointerType||c.dispatchEvent(i,"click"),c.dispatchEvent(i,"pointertap")),c.freeEvent(i)),c.freeEvent(n)},this.onPointerMove=function(t){var e=c.createPointerEvent(t,void 0,void 0,c.context.config.alwaysTriggerPointerEventOnCanvas?c.rootTarget:void 0),n="mouse"===e.pointerType||"pen"===e.pointerType,r=c.trackingData(t.pointerId),i=c.findMountedTarget(r.overTargets);if(r.overTargets&&i!==e.target){var a="mousemove"===t.type?"mouseout":"pointerout",a=c.createPointerEvent(t,a,i||void 0);if(c.dispatchEvent(a,"pointerout"),n&&c.dispatchEvent(a,"mouseout"),!e.composedPath().includes(i)){var o=c.createPointerEvent(t,"pointerleave",i||void 0);for(o.eventPhase=o.AT_TARGET;o.target&&!e.composedPath().includes(o.target);)o.currentTarget=o.target,c.notifyTarget(o),n&&c.notifyTarget(o,"mouseleave"),hs.isNode(o.target)&&(o.target=o.target.parentNode);c.freeEvent(o)}c.freeEvent(a)}if(i!==e.target){for(var a="mousemove"===t.type?"mouseover":"pointerover",t=c.clonePointerEvent(e,a),s=(c.dispatchEvent(t,"pointerover"),n&&c.dispatchEvent(t,"mouseover"),i&&hs.isNode(i)&&i.parentNode);s&&s!==(hs.isNode(c.rootTarget)&&c.rootTarget.parentNode)&&s!==e.target;)s=s.parentNode;if(!s||s===(hs.isNode(c.rootTarget)&&c.rootTarget.parentNode)){var l=c.clonePointerEvent(e,"pointerenter");for(l.eventPhase=l.AT_TARGET;l.target&&l.target!==i&&l.target!==(hs.isNode(c.rootTarget)&&c.rootTarget.parentNode);)l.currentTarget=l.target,c.notifyTarget(l),n&&c.notifyTarget(l,"mouseenter"),hs.isNode(l.target)&&(l.target=l.target.parentNode);c.freeEvent(l)}c.freeEvent(t)}c.dispatchEvent(e,"pointermove"),"touch"===e.pointerType&&c.dispatchEvent(e,"touchmove"),n&&(c.dispatchEvent(e,"mousemove"),c.cursor=c.getCursor(e.target)),r.overTargets=e.composedPath(),c.freeEvent(e)},this.onPointerOut=function(t){var e=c.trackingData(t.pointerId);if(e.overTargets){var n="mouse"===t.pointerType||"pen"===t.pointerType,r=c.findMountedTarget(e.overTargets),i=c.createPointerEvent(t,"pointerout",r||void 0),a=(c.dispatchEvent(i),n&&c.dispatchEvent(i,"mouseout"),c.createPointerEvent(t,"pointerleave",r||void 0));for(a.eventPhase=a.AT_TARGET;a.target&&a.target!==(hs.isNode(c.rootTarget)&&c.rootTarget.parentNode);)a.currentTarget=a.target,c.notifyTarget(a),n&&c.notifyTarget(a,"mouseleave"),hs.isNode(a.target)&&(a.target=a.target.parentNode);e.overTargets=null,c.freeEvent(i),c.freeEvent(a)}c.cursor=null},this.onPointerOver=function(t){var e=c.trackingData(t.pointerId),t=c.createPointerEvent(t),n="mouse"===t.pointerType||"pen"===t.pointerType,r=(c.dispatchEvent(t,"pointerover"),n&&c.dispatchEvent(t,"mouseover"),"mouse"===t.pointerType&&(c.cursor=c.getCursor(t.target)),c.clonePointerEvent(t,"pointerenter"));for(r.eventPhase=r.AT_TARGET;r.target&&r.target!==(hs.isNode(c.rootTarget)&&c.rootTarget.parentNode);)r.currentTarget=r.target,c.notifyTarget(r),n&&c.notifyTarget(r,"mouseenter"),hs.isNode(r.target)&&(r.target=r.target.parentNode);e.overTargets=t.composedPath(),c.freeEvent(t),c.freeEvent(r)},this.onPointerUpOutside=function(t){var e=c.trackingData(t.pointerId),n=c.findMountedTarget(e.pressTargetsByButton[t.button]),r=c.createPointerEvent(t);if(n){for(var i=n;i;)r.currentTarget=i,c.notifyTarget(r,"pointerupoutside"),"touch"===r.pointerType||"mouse"!==r.pointerType&&"pen"!==r.pointerType||c.notifyTarget(r,2===r.button?"rightupoutside":"mouseupoutside"),hs.isNode(i)&&(i=i.parentNode);delete e.pressTargetsByButton[t.button]}c.freeEvent(r)},this.onWheel=function(t){t=c.createWheelEvent(t);c.dispatchEvent(t),c.freeEvent(t)},this.onClick=function(t){c.context.config.useNativeClickEvent&&(t=c.createPointerEvent(t),c.dispatchEvent(t),c.freeEvent(t))},this.onPointerCancel=function(t){t=c.createPointerEvent(t,void 0,void 0,c.context.config.alwaysTriggerPointerEventOnCanvas?c.rootTarget:void 0);c.dispatchEvent(t),c.freeEvent(t)},this.globalRuntime=t,this.context=e}var e=t.prototype;return e.init=function(){this.rootTarget=this.context.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointercancel",this.onPointerCancel),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel),this.addEventMapping("click",this.onClick)},e.destroy=function(){this.emitter.removeAllListeners(),this.mappingTable={},this.mappingState={},this.eventPool.clear()},e.client2Viewport=function(t){var e=this.context.contextService.getBoundingClientRect();return new Qo(t.x-((null==e?void 0:e.left)||0),t.y-((null==e?void 0:e.top)||0))},e.viewport2Client=function(t){var e=this.context.contextService.getBoundingClientRect();return new Qo(t.x+((null==e?void 0:e.left)||0),t.y+((null==e?void 0:e.top)||0))},e.viewport2Canvas=function(t){var e=t.x,t=t.y,n=this.rootTarget.defaultView.getCamera(),r=this.context.config,i=r.width,r=r.height,a=n.getPerspectiveInverse(),n=n.getWorldTransform(),n=ht(this.tmpMatrix,n,a),a=Nt(this.tmpVec3,e/i*2-1,2*(1-t/r)-1,0);return Gt(a,a,n),new Qo(a[0],a[1])},e.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),e=e.getViewTransform(),n=ht(this.tmpMatrix,n,e),e=Nt(this.tmpVec3,t.x,t.y,0),t=(Gt(this.tmpVec3,this.tmpVec3,n),this.context.config),n=t.width,t=t.height;return new Qo((e[0]+1)/2*n,(1-(e[1]+1)/2)*t)},e.setPickHandler=function(t){this.pickHandler=t},e.addEventMapping=function(t,e){this.mappingTable[t]||(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:e,priority:0}),this.mappingTable[t].sort(function(t,e){return t.priority-e.priority})},e.mapEvent=function(t){if(this.rootTarget){var e=this.mappingTable[t.type];if(e)for(var n=0,r=e.length;n<r;n++)e[n].fn(t);else console.warn("[EventService]: Event mapping not defined for "+t.type)}},e.dispatchEvent=function(t,e,n){n?(t.eventPhase=t.AT_TARGET,n=this.rootTarget.defaultView||null,t.currentTarget=n,this.notifyListeners(t,e)):(t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e)),this.emitter.emit(e||t.type,t)},e.propagate=function(t,e){if(t.target){var n=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var r=n.length-1;1<=r;r--)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,e),!t.propagationStopped&&!t.propagationImmediatelyStopped){var i=n.indexOf(t.currentTarget);t.eventPhase=t.BUBBLING_PHASE;for(var a=i+1;a<n.length;a++)if(t.currentTarget=n[a],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}},e.propagationPath=function(t){var e=[t],n=this.rootTarget.defaultView||null;if(n&&n===t)e.unshift(n.document);else{for(var r=0;r<2048&&t!==this.rootTarget;r++)hs.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);n&&e.push(n)}return e},e.hitTest=function(t){var e=t.viewportX,n=t.viewportY,r=this.context.config,i=r.width,r=r.height;return!(e<0||n<0||i<e||r<n)&&(this.pickHandler(t)||this.rootTarget)||null},e.isNativeEventFromCanvas=function(t){var e=this.context.contextService.getDomElement(),n=null==(n=t.nativeEvent)?void 0:n.target;if(n){if(n===e)return!0;if(e&&e.contains)return e.contains(n)}return!!t.nativeEvent.composedPath&&-1<t.nativeEvent.composedPath().indexOf(e)},e.getExistedHTML=function(t){if(t.nativeEvent.composedPath)for(var e=Cr(t.nativeEvent.composedPath());!(n=e()).done;){var n=n.value,n=A.nativeHTMLMap.get(n);if(n)return n}return null},e.pickTarget=function(t){return this.hitTest({clientX:t.clientX,clientY:t.clientY,viewportX:t.viewportX,viewportY:t.viewportY,x:t.canvasX,y:t.canvasY})},e.createPointerEvent=function(t,e,n,r){var i=this.allocateEvent(xs),t=(this.copyPointerData(t,i),this.copyMouseData(t,i),this.copyData(t,i),i.nativeEvent=t.nativeEvent,i.originalEvent=t,this.getExistedHTML(i));return i.target=null!=n?n:t||this.isNativeEventFromCanvas(i)&&this.pickTarget(i)||r,"string"==typeof e&&(i.type=e),i},e.createWheelEvent=function(t){var e=this.allocateEvent(ws),t=(this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.nativeEvent=t.nativeEvent,e.originalEvent=t,this.getExistedHTML(e));return e.target=t||this.isNativeEventFromCanvas(e)&&this.pickTarget(e),e},e.trackingData=function(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]},e.cloneWheelEvent=function(t){var e=this.allocateEvent(ws);return e.nativeEvent=t.nativeEvent,e.originalEvent=t.originalEvent,this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.target=t.target,e.path=t.composedPath().slice(),e.type=t.type,e},e.clonePointerEvent=function(t,e){var n=this.allocateEvent(xs);return n.nativeEvent=t.nativeEvent,n.originalEvent=t.originalEvent,this.copyPointerData(t,n),this.copyMouseData(t,n),this.copyData(t,n),n.target=t.target,n.path=t.composedPath().slice(),n.type=null!=e?e:n.type,n},e.copyPointerData=function(t,e){e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist},e.copyMouseData=function(t,e){e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.client.copyFrom(t.client),e.movement.copyFrom(t.movement),e.canvas.copyFrom(t.canvas),e.screen.copyFrom(t.screen),e.global.copyFrom(t.global),e.offset.copyFrom(t.offset)},e.copyWheelData=function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ},e.copyData=function(t,e){e.isTrusted=t.isTrusted,e.timeStamp=performance.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.page.copyFrom(t.page),e.viewport.copyFrom(t.viewport)},e.allocateEvent=function(t){this.eventPool.has(t)||this.eventPool.set(t,[]);t=this.eventPool.get(t).pop()||new t(this);return t.eventPhase=t.NONE,t.currentTarget=null,t.path=[],t.target=null,t},e.freeEvent=function(t){if(t.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var e=t.constructor;this.eventPool.has(e)||this.eventPool.set(e,[]),this.eventPool.get(e).push(t)},e.notifyTarget=function(t,e){e=null!=(n=e)?n:t.type;var n=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?e+"capture":e;this.notifyListeners(t,n),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,e)},e.notifyListeners=function(t,e){var n=t.currentTarget.emitter,r=n._events[e];if(r)if("fn"in r)r.once&&n.removeListener(e,r.fn,void 0,!0),r.fn.call(t.currentTarget||r.context,t);else for(var i=0;i<r.length&&!t.propagationImmediatelyStopped;i++)r[i].once&&n.removeListener(e,r[i].fn,void 0,!0),r[i].fn.call(t.currentTarget||r[i].context,t)},e.findMountedTarget=function(t){if(!t)return null;for(var e=t[t.length-1],n=t.length-2;0<=n;n--){var r=t[n];if(!(r===this.rootTarget||hs.isNode(r)&&r.parentNode===e))break;e=t[n]}return e},e.getCursor=function(t){for(var e=t;e;){var n=ys.isElement(e)&&e.getAttribute("cursor");if(n)return n;e=hs.isNode(e)&&e.parentNode}},t}(),vl=function(){function t(){this.canvas=void 0,this.context=void 0}var e=t.prototype;return e.getOrCreateCanvas=function(t,e){if(!this.canvas){if(t)this.canvas=t,this.context=this.canvas.getContext("2d",e);else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",e),this.context&&this.context.measureText||(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",e)}this.canvas.width=10,this.canvas.height=10}return this.canvas},e.getOrCreateContext=function(t,e){return this.context||this.getOrCreateCanvas(t,e),this.context},t}(),yl=((xl=ol=ol||{})[xl.CAMERA_CHANGED=0]="CAMERA_CHANGED",xl[xl.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",xl[xl.NONE=2]="NONE",function(){function t(t,e){this.globalRuntime=void 0,this.context=void 0,this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.hooks={init:new ba,dirtycheck:new Ma,cull:new Ma,beginFrame:new wa,beforeRender:new wa,render:new wa,afterRender:new wa,endFrame:new wa,destroy:new wa,pick:new xa,pickSync:new Ma,pointerDown:new wa,pointerUp:new wa,pointerMove:new wa,pointerOut:new wa,pointerOver:new wa,pointerWheel:new wa,pointerCancel:new wa,click:new wa},this.globalRuntime=t,this.context=e}var e=t.prototype;return e.init=function(){var t=Er(Mr().mark(function t(){var e;return Mr().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=f({},this.globalRuntime,this.context),this.context.renderingPlugins.forEach(function(t){t.apply(e,A)}),t.next=4,this.hooks.init.promise();case 4:this.inited=!0;case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),e.getStats=function(){return this.stats},e.disableDirtyRectangleRendering=function(){return!this.context.config.renderer.getConfig().enableDirtyRectangleRendering||this.context.renderingContext.renderReasons.has(ol.CAMERA_CHANGED)},e.render=function(t,e){var n=this,r=(this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0,this.context.renderingContext);this.globalRuntime.sceneGraphService.syncHierarchy(r.root),this.globalRuntime.sceneGraphService.triggerPendingEvents(),r.renderReasons.size&&this.inited&&(this.renderDisplayObject(r.root,t,r),this.hooks.beginFrame.call(),r.renderListCurrentFrame.forEach(function(t){n.hooks.beforeRender.call(t),n.hooks.render.call(t),n.hooks.afterRender.call(t)}),this.hooks.endFrame.call(),r.renderListCurrentFrame=[],r.renderReasons.clear(),e())},e.renderDisplayObject=function(t,e,n){var r=this,i=e.renderer.getConfig(),a=i.enableDirtyCheck,i=i.enableCulling,a=(this.globalRuntime.enableCSSParsing&&this.globalRuntime.styleValueRegistry.recalc(t),a?this.hooks.dirtycheck.call(t):t),a=(a&&(i=i?this.hooks.cull.call(a,this.context.camera):a)&&(this.stats.rendered++,n.renderListCurrentFrame.push(i)),t.renderable.dirty=!1,t.sortable.renderOrder=this.zIndexCounter++,this.stats.total++,t.sortable);a.dirty&&(this.sort(t,a),a.dirty=!1,a.dirtyChildren=[],a.dirtyReason=void 0),(a.sorted||t.childNodes).forEach(function(t){r.renderDisplayObject(t,e,n)})},e.sort=function(n,r){r.sorted&&r.dirtyReason!==Go.Z_INDEX_CHANGED?r.dirtyChildren.forEach(function(t){var e;-1===n.childNodes.indexOf(t)?0<=(e=r.sorted.indexOf(t))&&r.sorted.splice(e,1):0===r.sorted.length?r.sorted.push(t):(e=function(t,e){for(var n=0,r=t.length;n<r;){var i=n+r>>>1;hi(t[i],e)<0?n=1+i:r=i}return n}(r.sorted,t),r.sorted.splice(e,0,t))}):r.sorted=n.childNodes.slice().sort(hi)},e.destroy=function(){this.inited=!1,this.hooks.destroy.call(),this.globalRuntime.sceneGraphService.clearPendingEvents()},e.dirtify=function(){this.context.renderingContext.renderReasons.add(ol.DISPLAY_OBJECT_CHANGED)},t}()),bl=/\[\s*(.*)=(.*)\s*\]/,xl=function(){function t(){}var e=t.prototype;return e.selectOne=function(e,n){var t,r,i,a=this;return e.startsWith(".")?n.find(function(t){return-1<((null==t?void 0:t.classList)||[]).indexOf(a.getIdOrClassname(e))}):e.startsWith("#")?n.find(function(t){return t.id===a.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.find(function(t){return n!==t&&("name"===r?t.name===i:a.attributeToString(t,r)===i)}):null):n.find(function(t){return n!==t&&t.nodeName===e})},e.selectAll=function(e,n){var t,r,i,a=this;return e.startsWith(".")?n.findAll(function(t){return n!==t&&-1<((null==t?void 0:t.classList)||[]).indexOf(a.getIdOrClassname(e))}):e.startsWith("#")?n.findAll(function(t){return n!==t&&t.id===a.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.findAll(function(t){return n!==t&&("name"===r?t.name===i:a.attributeToString(t,r)===i)}):[]):n.findAll(function(t){return n!==t&&t.nodeName===e})},e.is=function(t,e){var n,r;return t.startsWith(".")?e.className===this.getIdOrClassname(t):t.startsWith("#")?e.id===this.getIdOrClassname(t):t.startsWith("[")?(n=(r=this.getAttribute(t)).name,r=r.value,"name"===n?e.name===r:this.attributeToString(e,n)===r):e.nodeName===t},e.getIdOrClassname=function(t){return t.substring(1)},e.getAttribute=function(t){var t=t.match(bl),e="",n="";return t&&2<t.length&&(e=t[1].replace(/"/g,""),n=t[2].replace(/"/g,"")),{name:e,value:n}},e.attributeToString=function(t,e){return t.getAttribute&&(t=t.getAttribute(e),!_(t))&&t.toString?t.toString():""},t}();function wl(t){t=t.renderable;t&&(t.renderBoundsDirty=!0,t.boundsDirty=!0)}var Ml,kl=new ds(x.REPARENT,null,"","","",0,"",""),El=function(){function t(t){var o,i,a,r,s,l,c,u,h,n,f,d,g=this;this.runtime=void 0,this.pendingEvents=[],this.boundsChangedEvent=new cs(x.BOUNDS_CHANGED),this.rotate=(o=Ut(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=M(e,n,r));var i,a,n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(Qt(r=Ut(),e[0],e[1],e[2]),i=g.getRotation(t),a=g.getRotation(t.parentNode),te(o,a),Zt(o,o),Kt(r,o,r),Kt(n.localRotation,r,i),ne(n.localRotation,n.localRotation),g.dirtifyLocal(t,n)):g.rotateLocal(t,e)}),this.rotateLocal=(i=Ut(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=M(e,n,r));n=t.transformable;Qt(i,e[0],e[1],e[2]),ee(n.localRotation,n.localRotation,i),g.dirtifyLocal(t,n)}),this.setEulerAngles=(a=Ut(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=M(e,n,r));n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(Qt(n.localRotation,e[0],e[1],e[2]),r=g.getRotation(t.parentNode),te(a,Zt(Ut(),r)),ee(n.localRotation,n.localRotation,a),g.dirtifyLocal(t,n)):g.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=M(e,n,r));var i,a,o,s,l,c,u,h,f,d,p,n=t.transformable;Yt(e,v())||(i=r=e,a=n.localRotation,o=a[0],s=a[1],l=a[2],a=a[3],c=i[0],u=i[1],i=i[2],p=s*(d=o*u-s*c)-l*(f=l*c-o*i),l=l*(h=s*i-l*u)-o*d,o=o*f-s*h,f*=s=2*a,d*=s,l*=2,o*=2,r[0]=c+(h*=s)+(p*=2),r[1]=u+f+l,r[2]=i+d+o,jt(n.localPosition,n.localPosition,e),g.dirtifyLocal(t,n))},this.setPosition=(r=J(),s=v(),function(t,e){var n=t.transformable;s[0]=e[0],s[1]=e[1],s[2]=e[2]||0,Yt(g.getPosition(t),s)||(Ct(n.position,s),null!==t.parentNode&&t.parentNode.transformable?(e=t.parentNode.transformable,et(r,e.worldTransform),ct(r,r),Gt(n.localPosition,s,r)):Ct(n.localPosition,s),g.dirtifyLocal(t,n))}),this.setLocalPosition=(l=v(),function(t,e){var n=t.transformable;l[0]=e[0],l[1]=e[1],l[2]=e[2]||0,Yt(n.localPosition,l)||(Ct(n.localPosition,l),g.dirtifyLocal(t,n))}),this.translate=(c=v(),u=v(),h=v(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),Yt(e="number"==typeof e?Nt(u,e,n,r):e,c)||(jt(h,g.getPosition(t),e),g.setPosition(t,h))}),this.setRotation=function(){var o=Ut();return function(t,e,n,r,i){var a=t.transformable;"number"==typeof e&&(e=Jt(e,n,r,i)),null!==t.parentNode&&t.parentNode.transformable?(n=g.getRotation(t.parentNode),te(o,n),Zt(o,o),Kt(a.localRotation,o,e),ne(a.localRotation,a.localRotation),g.dirtifyLocal(t,a)):g.setLocalRotation(t,e)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(n=J(),f=v(),d=Jt(0,0,0,1),function(t){var e;0!==t.localSkew[0]||0!==t.localSkew[1]?(Mt(t.localTransform,t.localRotation,t.localPosition,M(1,1,1),t.origin),0===t.localSkew[0]&&0===t.localSkew[1]||((e=st(n))[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),ht(t.localTransform,t.localTransform,e)),e=Mt(n,d,f,t.localScale,t.origin),ht(t.localTransform,t.localTransform,e)):Mt(t.localTransform,t.localRotation,t.localPosition,t.localScale,t.origin)}),this.runtime=t}var e=t.prototype;return e.matches=function(t,e){return this.runtime.sceneGraphSelector.is(t,e)},e.querySelector=function(t,e){return this.runtime.sceneGraphSelector.selectOne(t,e)},e.querySelectorAll=function(t,e){return this.runtime.sceneGraphSelector.selectAll(t,e)},e.attach=function(t,e,n){var r=!1,n=(t.parentNode&&(r=t.parentNode!==e,this.detach(t)),t.parentNode=e,_(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t),e.sortable),e=((null!=n&&null!=(e=n.sorted)&&e.length||null!=(e=t.style)&&e.zIndex)&&(-1===n.dirtyChildren.indexOf(t)&&n.dirtyChildren.push(t),n.dirty=!0,n.dirtyReason=Go.ADDED),t.transformable);e&&this.dirtifyWorld(t,e),e.frozen&&this.unfreezeParentToRoot(t),r&&t.dispatchEvent(kl)},e.detach=function(t){var e,n,r;t.parentNode&&(e=t.transformable,(null!=(n=t.parentNode.sortable)&&null!=(r=n.sorted)&&r.length||null!=(r=t.style)&&r.zIndex)&&(-1===n.dirtyChildren.indexOf(t)&&n.dirtyChildren.push(t),n.dirty=!0,n.dirtyReason=Go.REMOVED),-1<(r=t.parentNode.childNodes.indexOf(t))&&t.parentNode.childNodes.splice(r,1),e&&this.dirtifyWorld(t,e),t.parentNode=null)},e.getOrigin=function(t){return t.transformable.origin},e.setOrigin=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var i=t.transformable;(e="number"==typeof e?[e,n,r]:e)[0]===i.origin[0]&&e[1]===i.origin[1]&&e[2]===i.origin[2]||((n=i.origin)[0]=e[0],n[1]=e[1],n[2]=e[2]||0,this.dirtifyLocal(t,i))},e.setLocalEulerAngles=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=M(e,n,r));n=t.transformable;Qt(n.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,n)},e.scaleLocal=function(t,e){var n,r,i=t.transformable;n=i.localScale,r=i.localScale,e=M(e[0],e[1],e[2]||1),n[0]=r[0]*e[0],n[1]=r[1]*e[1],n[2]=r[2]*e[2],this.dirtifyLocal(t,i)},e.setLocalScale=function(t,e){var n=t.transformable,e=M(e[0],e[1],e[2]||n.localScale[2]);Yt(e,n.localScale)||(Ct(n.localScale,e),this.dirtifyLocal(t,n))},e.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=Jt(e,n,r,i));n=t.transformable;te(n.localRotation,e),this.dirtifyLocal(t,n)},e.setLocalSkew=function(t,e,n){"number"==typeof e&&(i=e,n=n,(r=new K(2))[0]=i,r[1]=n,e=r);var r,i=t.transformable;n=i.localSkew,r=e,n[0]=r[0],n[1]=r[1],this.dirtifyLocal(t,i)},e.dirtifyLocal=function(t,e){e.localDirtyFlag||(e.localDirtyFlag=!0,e.dirtyFlag)||this.dirtifyWorld(t,e)},e.dirtifyWorld=function(t,e){e.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),this.dirtifyToRoot(t,!0)},e.triggerPendingEvents=function(){function r(t,e){t.isConnected&&!i.has(t.entity)&&(n.boundsChangedEvent.detail=e,(n.boundsChangedEvent.target=t).isMutationObserved?t.dispatchEvent(n.boundsChangedEvent):t.ownerDocument.defaultView.dispatchEvent(n.boundsChangedEvent,!0),i.add(t.entity))}var n=this,i=new Set;this.pendingEvents.forEach(function(t){var e=t[0],n=t[1];n.affectChildren?e.forEach(function(t){r(t,n)}):r(e,n)}),this.clearPendingEvents(),i.clear()},e.clearPendingEvents=function(){this.pendingEvents=[]},e.dirtifyToRoot=function(t,e){void 0===e&&(e=!1);var n=t;for(n.renderable&&(n.renderable.dirty=!0);n;)wl(n),n=n.parentNode;e&&t.forEach(function(t){wl(t)}),this.informDependentDisplayObjects(t),this.pendingEvents.push([t,{affectChildren:e}])},e.updateDisplayObjectDependency=function(t,e,n,r){var i;e&&e!==n&&(e=this.displayObjectDependencyMap.get(e))&&e[t]&&(i=e[t].indexOf(r),e[t].splice(i,1)),n&&((e=this.displayObjectDependencyMap.get(n))||(this.displayObjectDependencyMap.set(n,{}),e=this.displayObjectDependencyMap.get(n)),e[t]||(e[t]=[]),e[t].push(r))},e.informDependentDisplayObjects=function(t){var n=this,r=this.displayObjectDependencyMap.get(t);r&&Object.keys(r).forEach(function(e){r[e].forEach(function(t){n.dirtifyToRoot(t,!0),t.dispatchEvent(new ds(x.ATTR_MODIFIED,t,n,n,e,ds.MODIFICATION,n,n)),t.isCustomElement&&t.isConnected&&t.attributeChangedCallback&&t.attributeChangedCallback(e,n,n)})})},e.getPosition=function(t){var e=t.transformable;return bt(e.position,this.getWorldTransform(t,e))},e.getRotation=function(t){var e=t.transformable;return wt(e.rotation,this.getWorldTransform(t,e))},e.getScale=function(t){var e=t.transformable;return xt(e.scaling,this.getWorldTransform(t,e))},e.getWorldTransform=function(t,e){return((e=void 0===e?t.transformable:e).localDirtyFlag||e.dirtyFlag)&&(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e)),e.worldTransform},e.getLocalPosition=function(t){return t.transformable.localPosition},e.getLocalRotation=function(t){return t.transformable.localRotation},e.getLocalScale=function(t){return t.transformable.localScale},e.getLocalSkew=function(t){return t.transformable.localSkew},e.getLocalTransform=function(t){t=t.transformable;return t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.localTransform},e.setLocalTransform=function(t,e){var n=bt(v(),e),r=wt(Ut(),e),e=xt(v(),e);this.setLocalScale(t,e),this.setLocalPosition(t,n),this.setLocalRotation(t,r)},e.resetLocalTransform=function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0]),this.setLocalSkew(t,[0,0])},e.getTransformedGeometryBounds=function(t,e,n){e=this.getGeometryBounds(t,e=void 0===e?!1:e);return Xo.isEmpty(e)?null:((n=n||new Xo).setFromTransformedAABB(e,this.getWorldTransform(t)),n)},e.getGeometryBounds=function(t,e){t=t.geometry;return((e=void 0===e?!1:e)?t.renderBounds:t.contentBounds||null)||new Xo},e.getBounds=function(t,e){var n,r,i=this,a=(void 0===e&&(e=!1),t.renderable);return a.boundsDirty||e||!a.bounds?!a.renderBoundsDirty&&e&&a.renderBounds?a.renderBounds:(n=e?a.renderBounds:a.bounds,r=this.getTransformedGeometryBounds(t,e,n),t.childNodes.forEach(function(t){t=i.getBounds(t,e);t&&(r?r.add(t):(r=n||new Xo).update(t.center,t.halfExtents))}),e&&(t=fi(t))&&(t=t.parsedStyle.clipPath.getBounds(e),r?t&&(r=t.intersection(r)):r=t),(r=r||new Xo)&&(e?a.renderBounds=r:a.bounds=r),e?a.renderBoundsDirty=!1:a.boundsDirty=!1,r):a.bounds},e.getLocalBounds=function(t){if(t.parentNode){var e,n=J(),r=(t.parentNode.transformable&&(n=ct(J(),this.getWorldTransform(t.parentNode))),this.getBounds(t));if(!Xo.isEmpty(r))return(e=new Xo).setFromTransformedAABB(r,n),e}return this.getBounds(t)},e.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t),i=(Xo.isEmpty(i)||(r=new Xo).setFromTransformedAABB(i,this.getWorldTransform(t)),null==(i=t.ownerDocument)||null==(t=i.defaultView)?void 0:t.getContextService().getBoundingClientRect());return r?(e=(t=r.getMin())[0],t=t[1],n=(r=r.getMax())[0],r=r[1],new Jo(e+((null==i?void 0:i.left)||0),t+((null==i?void 0:i.top)||0),n-e,r-t)):new Jo((null==i?void 0:i.left)||0,(null==i?void 0:i.top)||0,0,0)},e.dirtifyWorldInternal=function(t,e){var n=this;!e.dirtyFlag&&(e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach(function(t){var e=t.transformable;e.dirtyFlag||n.dirtifyWorldInternal(t,e)}),e=t.renderable)&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)},e.syncHierarchy=function(t){var e=t.transformable;if(!e.frozen){e.frozen=!0,(e.localDirtyFlag||e.dirtyFlag)&&this.sync(t,e);for(var n=t.childNodes,r=0;r<n.length;r++)this.syncHierarchy(n[r])}},e.sync=function(t,e){var n;e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.dirtyFlag&&(n=(t=t.parentNode)&&t.transformable,null!==t&&n?ht(e.worldTransform,n.worldTransform,e.localTransform):et(e.worldTransform,e.localTransform),e.dirtyFlag=!1)},e.unfreezeParentToRoot=function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}},t}(),Ol={MetricsString:"|ÉqÅ",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},Sl=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,_l=new RegExp(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source+"|"+/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹓﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source+"|"+/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source+"|"+/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source),Al=new RegExp(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source+"|"+/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source+"|"+/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source+"|"+/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source),Tl=function(){function t(t){var n=this;this.runtime=void 0,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,e){return!n.isBreakingSpace(e)&&!(!t||!Al.exec(e)&&!_l.exec(t))},this.trimByKinsokuShorui=function(t){var e,n=[].concat(t),r=n[n.length-2];return r?(e=r[r.length-1],n[n.length-2]=r.slice(0,-1),n[n.length-1]=e+n[n.length-1],n):t},this.runtime=t}var e=t.prototype;return e.measureFont=function(t,e){if(this.fontMetricsCache[t])return this.fontMetricsCache[t];for(var n={ascent:0,descent:0,fontSize:0},r=this.runtime.offscreenCanvas.getOrCreateCanvas(e),e=this.runtime.offscreenCanvas.getOrCreateContext(e),i=(e.font=t,Ol.MetricsString+Ol.BaselineSymbol),a=Math.ceil(e.measureText(i).width),o=Math.ceil(e.measureText(Ol.BaselineSymbol).width),s=Ol.HeightMultiplier*o,o=o*Ol.BaselineMultiplier|0,l=(r.width=a,r.height=s,e.fillStyle="#f00",e.fillRect(0,0,a,s),e.font=t,e.textBaseline="alphabetic",e.fillStyle="#000",e.fillText(i,0,o),e.getImageData(0,0,a||1,s||1).data),r=l.length,c=4*a,u=0,h=0,f=!1,u=0;u<o;++u){for(var d=0;d<c;d+=4)if(255!==l[h+d]){f=!0;break}if(f)break;h+=c}for(n.ascent=o-u,h=r-c,f=!1,u=s;o<u;--u){for(var p=0;p<c;p+=4)if(255!==l[h+p]){f=!0;break}if(f)break;h-=c}return n.descent=u-o,n.fontSize=n.ascent+n.descent,this.fontMetricsCache[t]=n},e.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,a=e.lineHeight,o=e.lineWidth,s=e.textBaseline,l=e.textAlign,c=e.letterSpacing,u=e.textPath,h=(e.textPathSide,e.textPathStartOffset,e.leading),h=void 0===h?0:h,f=function(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,t=t.fontWeight,e=Ke(e)&&e+"px"||"16px",a=n.split(","),o=a.length-1;0<=o;o--){var s=a[o].trim();!Ea.test(s)&&ka.indexOf(s)<0&&(s='"'+s+'"'),a[o]=s}return r+" "+i+" "+t+" "+e+" "+a.join(",")}(e),d=this.measureFont(f,n),p=(0===d.fontSize&&(d.fontSize=r,d.ascent=r),this.runtime.offscreenCanvas.getOrCreateContext(n));p.font=f,e.isOverflowing=!1;var g=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),m=new Array(g.length),v=0;if(!u){for(var y=0;y<g.length;y++){var b=p.measureText(g[y]).width+(g[y].length-1)*c;m[y]=b,v=Math.max(v,b)}var r=v+o,x=a||d.fontSize+o,i=Math.max(x,d.fontSize+o)+(g.length-1)*(x+h),w=0;return"middle"===s?w=-i/2:"bottom"===s||"alphabetic"===s||"ideographic"===s?w=-i:"top"!==s&&"hanging"!==s||(w=0),{font:f,width:r,height:i,lines:g,lineWidths:m,lineHeight:x+=h,maxLineWidth:v,fontProperties:d,lineMetrics:m.map(function(t,e){var n=0;return"center"===l||"middle"===l?n-=t/2:"right"!==l&&"end"!==l||(n-=t),new Jo(n-o/2,w+e*x,t+o,x)})}}u.getTotalLength();for(var M=0;M<g.length;M++)p.measureText(g[M]).width,g[M].length},e.setGraphemeOnPath=function(){},e.wordWrap=function(t,e,n){for(var r=this,i=e.wordWrapWidth,i=void 0===i?0:i,a=e.letterSpacing,o=e.maxLines,s=void 0===o?1/0:o,o=e.textOverflow,l=this.runtime.offscreenCanvas.getOrCreateContext(n),c=i+a,u="",h=("ellipsis"===o?u="...":o&&"clip"!==o&&(u=o),[]),f=0,d=0,p={},g=function(t){return r.getFromCache(t,a,p,l)},m=Array.from(u).reduce(function(t,e){return t+g(e)},0),v=Array.from(t),y=0;y<v.length;y++){var b=v[y],x=t[y-1],w=t[y+1],M=g(b);if(this.isNewline(b)){if(s<=++f){e.isOverflowing=!0;break}d=0,h[f]=""}else{if(0<d&&c<d+M){if(s<=f+1){if(e.isOverflowing=!0,0<m&&m<=c){for(var k=h[f].length,E=0,O=k,S=0;S<k;S++){var _=g(h[f][S]);if(c<E+_+m){O=S;break}E+=_}h[f]=(h[f]||"").slice(0,O)+u}break}if(d=0,h[++f]="",this.isBreakingSpace(b))continue;this.canBreakInLastChar(b)||(h=this.trimToBreakable(h),d=this.sumTextWidthByCache(h[f]||"",p)),this.shouldBreakByKinsokuShorui(b,w)&&(h=this.trimByKinsokuShorui(h),d+=g(x||""))}d+=M,h[f]=(h[f]||"")+b}}return h.join("\n")},e.isBreakingSpace=function(t){return"string"==typeof t&&0<=Ol.BreakingSpaces.indexOf(t.charCodeAt(0))},e.isNewline=function(t){return"string"==typeof t&&0<=Ol.Newlines.indexOf(t.charCodeAt(0))},e.trimToBreakable=function(t){var e,t=[].concat(t),n=t[t.length-2],r=this.findBreakableIndex(n);return-1!==r&&n&&(e=n.slice(r,r+1),e=r+(this.isBreakingSpace(e)?0:1),t[t.length-1]+=n.slice(r+1,n.length),t[t.length-2]=n.slice(0,e)),t},e.canBreakInLastChar=function(t){return!t||!Sl.test(t)},e.sumTextWidthByCache=function(t,n){return t.split("").reduce(function(t,e){if(n[e])return t+n[e];throw Error("cannot count the word without cache")},0)},e.findBreakableIndex=function(t){for(var e=t.length-1;0<=e;e--)if(!Sl.test(t[e]))return e;return-1},e.getFromCache=function(t,e,n,r){var i=n[t];return"number"!=typeof i&&(e=t.length*e,i=r.measureText(t).width+e,n[t]=i),i},t}(),A={},cl=(pl=new pl,dl=new dl,(z1={})[E.CIRCLE]=new cl,z1[E.ELLIPSE]=new ul,z1[E.RECT]=pl,z1[E.IMAGE]=pl,z1[E.GROUP]=pl,z1[E.LINE]=new hl,z1[E.TEXT]=new gl(A),z1[E.POLYLINE]=dl,z1[E.POLYGON]=dl,z1[E.PATH]=new fl,z1[E.HTML]=null,z1[E.MESH]=null,z1),gl=(ul=new n,pl=new Wo,(hl={})[i.PERCENTAGE]=null,hl[i.NUMBER]=new $o,hl[i.ANGLE]=new r,hl[i.DEFINED_PATH]=new e,hl[i.PAINT]=ul,hl[i.COLOR]=ul,hl[i.FILTER]=new Io,hl[i.LENGTH]=pl,hl[i.LENGTH_PERCENTAGE]=pl,hl[i.LENGTH_PERCENTAGE_12]=new Yo,hl[i.LENGTH_PERCENTAGE_14]=new Ho,hl[i.COORDINATE]=new Vo,hl[i.OFFSET_DISTANCE]=new Uo,hl[i.OPACITY_VALUE]=new a,hl[i.PATH]=new ts,hl[i.LIST_OF_POINTS]=new es,hl[i.SHADOW_BLUR]=new ns,hl[i.TEXT]=new rs,hl[i.TEXT_TRANSFORM]=new is,hl[i.TRANSFORM]=new as,hl[i.TRANSFORM_ORIGIN]=new Do,hl[i.Z_INDEX]=new os,hl[i.MARKER]=new qo,hl),dl=(A.CameraContribution=ll,A.AnimationTimeline=null,A.EasingFunction=null,A.offscreenCanvas=new vl,A.nativeHTMLMap=new WeakMap,A.sceneGraphSelector=new xl,A.sceneGraphService=new El(A),A.textService=new Tl(A),A.geometryUpdaterFactory=cl,A.CSSPropertySyntaxFactory=gl,A.styleValueRegistry=new bs,A.layoutRegistry=null,A.globalThis=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==h)return h;throw new Error("Unable to locate global `this`")}(),A.enableCSSParsing=!0,A.enableDataset=!1,A.enableStyleSyntax=!0,function(){function t(){this.context=void 0,this.plugins=[]}var e=t.prototype;return e.addRenderingPlugin=function(t){this.plugins.push(t),this.context.renderingPlugins.push(t)},e.removeAllRenderingPlugins=function(){var e=this;this.plugins.forEach(function(t){t=e.context.renderingPlugins.indexOf(t);0<=t&&e.context.renderingPlugins.splice(t,1)})},t}()),fl=function(){function t(t){this.plugins=[],this.config=void 0,this.config=f({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1},t)}var e=t.prototype;return e.registerPlugin=function(e){-1===this.plugins.findIndex(function(t){return t===e})&&this.plugins.push(e)},e.unregisterPlugin=function(e){var t=this.plugins.findIndex(function(t){return t===e});-1<t&&this.plugins.splice(t,1)},e.getPlugins=function(){return this.plugins},e.getPlugin=function(e){return this.plugins.find(function(t){return t.name===e})},e.getConfig=function(){return this.config},e.setConfig=function(t){Object.assign(this.config,t)},t}(),Pl=function(){function a(t){this.strategies=void 0,this.strategies=t}return a.prototype.apply=function(t){var n=t.camera,e=t.renderingService,r=t.renderingContext,i=this.strategies;e.hooks.cull.tap(a.tag,function(e){var t;return e&&(t=e.cullable,0===i.length?t.visible=-1<r.unculledEntities.indexOf(e.entity):t.visible=i.every(function(t){return t.isVisible(n,e)}),!e.isCulled()&&e.isVisible()?e:(e.dispatchEvent(new cs(x.CULLED)),null))}),e.hooks.afterRender.tap(a.tag,function(t){t.cullable.visibilityPlaneMask=-1})},a}(),Ll=(Pl.tag="Culling",function(){function n(){}return n.prototype.apply=function(t){var e=t.renderingService;e.hooks.dirtycheck.tap(n.tag,function(t){return t&&(t.renderable.dirty||e.disableDirtyRectangleRendering()?t:null)})},n}()),Cl=(Ll.tag="DirtyCheck",function(){function e(){var a=this;this.autoPreventDefault=!1,this.rootPointerEvent=new xs(null),this.rootWheelEvent=new ws(null),this.context=void 0,this.onPointerMove=function(t){var e,n=null==(e=a.context.renderingContext.root)||null==(e=e.ownerDocument)?void 0:e.defaultView;if(!n.supportsTouchEvents||"touch"!==t.pointerType){for(var r=Cr(a.normalizeToPointerEvent(t,n));!(i=r()).done;){var i=i.value,i=a.bootstrapEvent(a.rootPointerEvent,i,n,t);a.context.eventService.mapEvent(i)}a.setCursor(a.context.eventService.cursor)}}}var t=e.prototype;return t.apply=function(t){var a=this,t=(this.context=t).renderingService,o=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(t){return a.context.renderingService.hooks.pickSync.call({position:t,picked:[],topmost:!0}).picked[0]||null}),t.hooks.pointerWheel.tap(e.tag,function(t){t=a.normalizeWheelEvent(t);a.context.eventService.mapEvent(t)}),t.hooks.pointerDown.tap(e.tag,function(t){if(!o.supportsTouchEvents||"touch"!==t.pointerType){var e=a.normalizeToPointerEvent(t,o);!a.autoPreventDefault||!e[0].isNormalized||!t.cancelable&&"cancelable"in t||t.preventDefault();for(var n=Cr(e);!(r=n()).done;){var r=r.value,r=a.bootstrapEvent(a.rootPointerEvent,r,o,t);a.context.eventService.mapEvent(r)}a.setCursor(a.context.eventService.cursor)}}),t.hooks.pointerUp.tap(e.tag,function(t){if(!o.supportsTouchEvents||"touch"!==t.pointerType){var e=a.context.contextService.getDomElement(),n="outside";try{n=e&&t.target&&t.target!==e&&e.contains&&!e.contains(t.target)?"outside":""}catch(t){}for(var r=Cr(a.normalizeToPointerEvent(t,o));!(i=r()).done;){var i=i.value,i=a.bootstrapEvent(a.rootPointerEvent,i,o,t);i.type+=n,a.context.eventService.mapEvent(i)}a.setCursor(a.context.eventService.cursor)}}),t.hooks.pointerMove.tap(e.tag,this.onPointerMove),t.hooks.pointerOver.tap(e.tag,this.onPointerMove),t.hooks.pointerOut.tap(e.tag,this.onPointerMove),t.hooks.click.tap(e.tag,this.onPointerMove),t.hooks.pointerCancel.tap(e.tag,function(t){for(var e=Cr(a.normalizeToPointerEvent(t,o));!(n=e()).done;){var n=n.value,n=a.bootstrapEvent(a.rootPointerEvent,n,o,t);a.context.eventService.mapEvent(n)}a.setCursor(a.context.eventService.cursor)})},t.getViewportXY=function(t){var e,n=t.offsetX,r=t.offsetY,i=t.clientX,t=t.clientY;return t=!this.context.config.supportsCSSTransform||_(n)||_(r)?(e=(i=this.context.eventService.client2Viewport(new Qo(i,t))).x,i.y):(e=n,r),{x:e,y:t}},t.bootstrapEvent=function(t,e,n,r){t.view=n,t.originalEvent=null,t.nativeEvent=r,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this.transferMouseData(t,e);n=this.getViewportXY(e),e=n.x,n=n.y,t.viewport.x=e,t.viewport.y=n,e=this.context.eventService.viewport2Canvas(t.viewport),n=e.x,e=e.y;return t.canvas.x=n,t.canvas.y=e,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=r.isTrusted,"pointerleave"===t.type&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=mi[t.type]||t.type),t},t.normalizeWheelEvent=function(t){var e=this.rootWheelEvent,n=(this.transferMouseData(e,t),e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ,this.getViewportXY(t)),r=n.x,n=n.y,r=(e.viewport.x=r,e.viewport.y=n,this.context.eventService.viewport2Canvas(e.viewport)),n=r.x,r=r.y;return e.canvas.x=n,e.canvas.y=r,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.nativeEvent=t,e.type=t.type,e},t.transferMouseData=function(t,e){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=performance.now(),t.type=e.type,t.altKey=e.altKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.ctrlKey=e.ctrlKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null},t.setCursor=function(t){this.context.contextService.applyCursorStyle(t||this.context.config.cursor||"default")},t.normalizeToPointerEvent=function(t,e){var n=[];if(e.isTouchEvent(t))for(var r=0;r<t.changedTouches.length;r++){var i=t.changedTouches[r];rn(i.button)&&(i.button=0),rn(i.buttons)&&(i.buttons=1),rn(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),rn(i.width)&&(i.width=i.radiusX||1),rn(i.height)&&(i.height=i.radiusY||1),rn(i.tiltX)&&(i.tiltX=0),rn(i.tiltY)&&(i.tiltY=0),rn(i.pointerType)&&(i.pointerType="touch"),rn(i.pointerId)&&(i.pointerId=i.identifier||0),rn(i.pressure)&&(i.pressure=i.force||.5),rn(i.twist)&&(i.twist=0),rn(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else e.isMouseEvent(t)?(rn((e=t).isPrimary)&&(e.isPrimary=!0),rn(e.width)&&(e.width=1),rn(e.height)&&(e.height=1),rn(e.tiltX)&&(e.tiltX=0),rn(e.tiltY)&&(e.tiltY=0),rn(e.pointerType)&&(e.pointerType="mouse"),rn(e.pointerId)&&(e.pointerId=1),rn(e.pressure)&&(e.pressure=.5),rn(e.twist)&&(e.twist=0),rn(e.tangentialPressure)&&(e.tangentialPressure=0),e.isNormalized=!0,n.push(e)):n.push(t);return n},e}()),Nl=(Cl.tag="Event",[E.CIRCLE,E.ELLIPSE,E.IMAGE,E.RECT,E.LINE,E.POLYLINE,E.POLYGON,E.TEXT,E.PATH,E.HTML]),jl=function(){function t(){}var e=t.prototype;return e.isVisible=function(t,e){var n,r,i=e.cullable;return!i.enable||(n=e.getRenderBounds(),!Xo.isEmpty(n)&&(t=t.getFrustum(),r=null==(r=e.parentNode)||null==(r=r.cullable)?void 0:r.visibilityPlaneMask,i.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(e,n,r||Fo.INDETERMINATE,t.planes),i.visible=i.visibilityPlaneMask!==Fo.OUTSIDE,i.visible))},e.computeVisibilityWithPlaneMask=function(t,e,n,r){if(n===Fo.OUTSIDE||n===Fo.INSIDE)return n;for(var i=Fo.INSIDE,a=-1<Nl.indexOf(t.nodeName),o=0,s=r.length;o<s;++o){var l=1<<o;if(0!=(n&l)&&(!a||4!==o&&5!==o)){var c=r[o],u=c.normal,c=c.distance;if(Dt(u,e.getPositiveFarPoint(r[o]))+c<0)return Fo.OUTSIDE;Dt(u,e.getNegativeFarPoint(r[o]))+c<0&&(i|=l)}}return i},t}(),Rl=function(){function c(){this.rBush=void 0,this.toSync=new Set}var t=c.prototype;return t.apply=function(t){function e(t){t.target.renderable.dirty=!0,o.dirtify()}function n(t){for(var e=t.detail.affectChildren,t=t.target,n=(e&&t.forEach(function(t){a.toSync.add(t)}),t);n;)n.renderable&&a.toSync.add(n),n=n.parentElement;o.dirtify()}function r(t){t=t.target,A.enableCSSParsing&&A.styleValueRegistry.recalc(t),A.sceneGraphService.dirtifyToRoot(t),o.dirtify()}function i(t){var e=(t=t.target).rBushNode;e.aabb&&a.rBush.remove(e.aabb),a.toSync.delete(t),A.sceneGraphService.dirtifyToRoot(t),o.dirtify()}var a=this,o=t.renderingService,s=t.renderingContext,t=t.rBushRoot,l=s.root.ownerDocument.defaultView;this.rBush=t;o.hooks.init.tapPromise(c.tag,Er(Mr().mark(function t(){return Mr().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:l.addEventListener(x.MOUNTED,r),l.addEventListener(x.UNMOUNTED,i),l.addEventListener(x.ATTR_MODIFIED,e),l.addEventListener(x.BOUNDS_CHANGED,n);case 4:case"end":return t.stop()}},t)}))),o.hooks.destroy.tap(c.tag,function(){l.removeEventListener(x.MOUNTED,r),l.removeEventListener(x.UNMOUNTED,i),l.removeEventListener(x.ATTR_MODIFIED,e),l.removeEventListener(x.BOUNDS_CHANGED,n),a.toSync.clear()}),o.hooks.endFrame.tap(c.tag,function(){a.syncRTree()})},t.syncRTree=function(){var o=this,s=[];Array.from(this.toSync).filter(function(t){return t.isConnected}).forEach(function(t){var e,n,r,i=t.rBushNode,a=(i&&i.aabb&&o.rBush.remove(i.aabb),t.getRenderBounds());a&&(e=(n=a.getMin())[0],n=n[1],r=(a=a.getMax())[0],a=a[1],i.aabb||(i.aabb={}),i.aabb.displayObject=t,i.aabb.minX=e,i.aabb.minY=n,i.aabb.maxX=r,i.aabb.maxY=a),!i.aabb||isNaN(i.aabb.maxX)||isNaN(i.aabb.maxX)||isNaN(i.aabb.minX)||isNaN(i.aabb.minY)||s.push(i.aabb)}),this.rBush.load(s),s.length=0,this.toSync.clear()},c}(),Il=(Rl.tag="Prepare",(z1=Ml=Ml||{}).READY="ready",z1.BEFORE_RENDER="beforerender",z1.RERENDER="rerender",z1.AFTER_RENDER="afterrender",z1.BEFORE_DESTROY="beforedestroy",z1.AFTER_DESTROY="afterdestroy",z1.RESIZE="resize",z1.DIRTY_RECTANGLE="dirtyrectangle",new cs(x.MOUNTED)),Bl=new cs(x.UNMOUNTED),Dl=new cs(Ml.BEFORE_RENDER),Fl=new cs(Ml.RERENDER),zl=new cs(Ml.AFTER_RENDER),Gl=function(E){function t(t){var e=E.call(this)||this,n=(e.document=void 0,e.customElements=void 0,e.requestAnimationFrame=void 0,e.cancelAnimationFrame=void 0,e.devicePixelRatio=void 0,e.supportsPointerEvents=void 0,e.supportsTouchEvents=void 0,e.isTouchEvent=void 0,e.isMouseEvent=void 0,e.Element=Ls,e.frameId=void 0,e.inited=!1,e.readyPromise=void 0,e.resolveReadyPromise=void 0,e.context={},e.document=new fs,e.document.defaultView=Pr(e),e.customElements=new ss,t.container),r=t.canvas,i=t.offscreenCanvas,a=t.width,o=t.height,s=t.devicePixelRatio,l=t.renderer,c=t.background,u=t.cursor,h=t.document,f=t.requestAnimationFrame,d=t.cancelAnimationFrame,p=t.createImage,g=t.supportsPointerEvents,m=t.supportsTouchEvents,v=t.supportsCSSTransform,y=t.useNativeClickEvent,b=t.alwaysTriggerPointerEventOnCanvas,x=t.isTouchEvent,t=t.isMouseEvent,w=(w=n,M=Pr(e),w&&(w="string"==typeof w?w:w.id||ci++,li[w]&&li[w].destroy(),li[w]=M),a),M=o,k=s;return r&&(k=1<=(k=s||ui&&window.devicePixelRatio||1)?Math.ceil(k):1,w=a||("auto"===(a=di(s=r,"width"))?s.offsetWidth:parseFloat(a))||r.width/k,M=o||("auto"===(a=di(s=r,"height"))?s.offsetHeight:parseFloat(a))||r.height/k),e.devicePixelRatio=k,e.requestAnimationFrame=null!=f?f:Ra.bind(A.globalThis),e.cancelAnimationFrame=null!=d?d:Ia.bind(A.globalThis),e.supportsTouchEvents=null!=m?m:"ontouchstart"in A.globalThis,e.supportsPointerEvents=null!=g?g:!!A.globalThis.PointerEvent,e.isTouchEvent=null!=x?x:function(t){return e.supportsTouchEvents&&t instanceof A.globalThis.TouchEvent},e.isMouseEvent=null!=t?t:function(t){return!A.globalThis.MouseEvent||t instanceof A.globalThis.MouseEvent&&(!e.supportsPointerEvents||!(t instanceof A.globalThis.PointerEvent))},e.initRenderingContext({container:n,canvas:r,width:w,height:M,renderer:l,offscreenCanvas:i,devicePixelRatio:k,cursor:u||"default",background:c||"transparent",createImage:p,document:h,supportsCSSTransform:v,useNativeClickEvent:y,alwaysTriggerPointerEventOnCanvas:b}),e.initDefaultCamera(w,M),Er(Mr().mark(function t(){return Mr().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.initRenderer(l);case 2:e.dispatchEvent(new cs(Ml.READY)),e.readyPromise&&e.resolveReadyPromise();case 4:case"end":return t.stop()}},t)}))(),e}_r(t,E);var e=t.prototype;return e.initRenderingContext=function(t){this.context.config=t,this.context.renderingContext={root:this.document.documentElement,renderListCurrentFrame:[],unculledEntities:[],renderReasons:new Set,force:!1,dirty:!1}},e.initDefaultCamera=function(t,e){var n=this,r=new A.CameraContribution;r.setType(ks.EXPLORING,Es.DEFAULT).setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0).setOrthographic(t/-2,t/2,e/2,e/-2,.1,1e3),r.canvas=this,r.eventEmitter.on(sl,function(){n.context.renderingContext.renderReasons.add(ol.CAMERA_CHANGED)}),this.context.camera=r},e.getConfig=function(){return this.context.config},e.getRoot=function(){return this.document.documentElement},e.getCamera=function(){return this.context.camera},e.getContextService=function(){return this.context.contextService},e.getEventService=function(){return this.context.eventService},e.getRenderingService=function(){return this.context.renderingService},e.getRenderingContext=function(){return this.context.renderingContext},e.getStats=function(){return this.getRenderingService().getStats()},e.destroy=function(t,e){void 0===t&&(t=!0),(e=void 0===e?!1:e)||this.dispatchEvent(new cs(Ml.BEFORE_DESTROY)),this.frameId&&(this.getConfig().cancelAnimationFrame||cancelAnimationFrame)(this.frameId);var n=this.getRoot();this.unmountChildren(n),t&&(this.document.destroy(),this.getEventService().destroy()),this.getRenderingService().destroy(),this.getContextService().destroy(),t&&this.context.rBushRoot&&(this.context.rBushRoot.clear(),this.context.rBushRoot=null,this.context.renderingContext.root=null),e||this.dispatchEvent(new cs(Ml.AFTER_DESTROY))},e.changeSize=function(t,e){this.resize(t,e)},e.resize=function(t,e){var n=this.context.config,n=(n.width=t,n.height=e,this.getContextService().resize(t,e),this.context.camera),r=n.getProjectionMode();n.setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0),r===Os.ORTHOGRAPHIC?n.setOrthographic(t/-2,t/2,e/2,e/-2,n.getNear(),n.getFar()):n.setAspect(t/e),this.dispatchEvent(new cs(Ml.RESIZE,{width:t,height:e}))},e.appendChild=function(t,e){return this.document.documentElement.appendChild(t,e)},e.insertBefore=function(t,e){return this.document.documentElement.insertBefore(t,e)},e.removeChild=function(t){return this.document.documentElement.removeChild(t)},e.removeChildren=function(){this.document.documentElement.removeChildren()},e.destroyChildren=function(){this.document.documentElement.destroyChildren()},e.render=function(){var t=this;this.dispatchEvent(Dl),this.getRenderingService().render(this.getConfig(),function(){t.dispatchEvent(Fl)}),this.dispatchEvent(zl)},e.run=function(){var e=this;(function t(){e.render(),e.frameId=requestAnimationFrame(t)})()},e.initRenderer=function(){var e=Er(Mr().mark(function t(e){return Mr().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}throw new Error("Renderer is required.");case 2:return this.inited=!1,this.readyPromise=void 0,this.context.rBushRoot=new U,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new Cl,new Rl,new Ll,new Pl([new jl])),this.loadRendererContainerModule(e),this.context.contextService=new this.context.ContextService(f({},A,this.context)),this.context.renderingService=new yl(A,this.context),this.context.eventService=new ml(A,this.context),this.context.eventService.init(),t.next=14,this.context.contextService.init();case 14:return t.next=16,this.context.renderingService.init();case 16:this.inited=!0,this.getRoot().forEach(function(t){t=t.renderable;t&&(t.renderBoundsDirty=!0,t.boundsDirty=!0,t.dirty=!0)}),this.mountChildren(this.getRoot()),e.getConfig().enableAutoRendering&&this.run();case 20:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.loadRendererContainerModule=function(t){var e=this;t.getPlugins().forEach(function(t){t.context=e.context,t.init(A)})},e.setRenderer=function(){var e=Er(Mr().mark(function t(e){var n,r;return Mr().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((n=this.getConfig()).renderer===e)return t.abrupt("return");t.next=3;break;case 3:return r=n.renderer,n.renderer=e,this.destroy(!1,!0),[].concat(null==r?void 0:r.getPlugins()).reverse().forEach(function(t){t.destroy(A)}),t.next=9,this.initRenderer(e);case 9:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.setCursor=function(t){this.getConfig().cursor=t,this.getContextService().applyCursorStyle(t)},e.unmountChildren=function(t){var e=this;t.childNodes.forEach(function(t){e.unmountChildren(t)}),this.inited&&(t.isMutationObserved?t.dispatchEvent(Bl):(Bl.target=t,this.dispatchEvent(Bl,!0)),t!==this.document.documentElement&&(t.ownerDocument=null),t.isConnected=!1),t.isCustomElement&&t.disconnectedCallback&&t.disconnectedCallback()},e.mountChildren=function(t){var e=this;this.inited?t.isConnected||(t.ownerDocument=this.document,t.isConnected=!0,t.isMutationObserved?t.dispatchEvent(Il):(Il.target=t,this.dispatchEvent(Il,!0))):console.warn("[g]: You are trying to call `canvas.appendChild` before canvas' initialization finished. You can either await `canvas.ready` or listen to `CanvasEvent.READY` manually.","appended child: ",t.nodeName),t.childNodes.forEach(function(t){e.mountChildren(t)}),t.isCustomElement&&t.connectedCallback&&t.connectedCallback()},e.client2Viewport=function(t){return this.getEventService().client2Viewport(t)},e.viewport2Client=function(t){return this.getEventService().viewport2Client(t)},e.viewport2Canvas=function(t){return this.getEventService().viewport2Canvas(t)},e.canvas2Viewport=function(t){return this.getEventService().canvas2Viewport(t)},e.getPointByClient=function(t,e){return this.client2Viewport({x:t,y:e})},e.getClientByPoint=function(t,e){return this.viewport2Client({x:t,y:e})},Sr(t,[{key:"ready",get:function(){var e=this;return this.readyPromise||(this.readyPromise=new Promise(function(t){e.resolveReadyPromise=function(){t(e)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise}}]),t}(us);function Wl(t,e){return(Wl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}n=function(i){var t;function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).landmarks=[],t.landmarkAnimationID=void 0,t}t=i,(n=e).prototype=Object.create(t.prototype),Wl(n.prototype.constructor=n,t);var n=e.prototype;return n.rotate=function(t,e,n){if(this.relElevation=wi(e),this.relAzimuth=wi(t),this.relRoll=wi(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===ks.EXPLORING){e=Xt(Ut(),[1,0,0],ki((this.rotateWorld?1:-1)*this.relElevation)),t=Xt(Ut(),[0,1,0],ki((this.rotateWorld?1:-1)*this.relAzimuth)),n=Xt(Ut(),[0,0,1],ki(this.relRoll)),t=Kt(Ut(),t,e),t=Kt(Ut(),t,n),e=kt(J(),t);ft(this.matrix,this.matrix,[0,0,-this.distance]),ht(this.matrix,this.matrix,e),ft(this.matrix,this.matrix,[0,0,this.distance])}else{if(90<Math.abs(this.elevation))return this;this.computeMatrix()}return this._getAxes(),this.type===ks.ORBITING||this.type===ks.EXPLORING?this._getPosition():this.type===ks.TRACKING&&this._getFocalPoint(),this._update(),this},n.pan=function(t,e){t=Mi(t,e,0),e=Pt(this.position);return jt(e,e,It(v(),this.right,t[0])),jt(e,e,It(v(),this.up,t[1])),this._setPosition(e),this.triggerUpdate(),this},n.dolly=function(t){var e=this.forward,n=Pt(this.position),t=(this.dollyingStep,this.distance+t*this.dollyingStep),t=Math.max(Math.min(t,this.maxDistance),this.minDistance)-this.distance;return n[0]+=t*e[0],n[1]+=t*e[1],n[2]+=t*e[2],this._setPosition(n),this.type===ks.ORBITING||this.type===ks.EXPLORING?this._getDistance():this.type===ks.TRACKING&&jt(this.focalPoint,n,this.distanceVector),this.triggerUpdate(),this},n.cancelLandmarkAnimation=function(){void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID)},n.createLandmark=function(t,e){var n,e=e=void 0===e?{}:e,r=e.position,r=void 0===r?this.position:r,i=e.focalPoint,i=void 0===i?this.focalPoint:i,a=e.roll,e=e.zoom,o=new A.CameraContribution,r=(o.setType(this.type,void 0),o.setPosition(r[0],null!=(n=r[1])?n:this.position[1],null!=(n=r[2])?n:this.position[2]),o.setFocalPoint(i[0],null!=(r=i[1])?r:this.focalPoint[1],null!=(n=i[2])?n:this.focalPoint[2]),o.setRoll(null!=a?a:this.roll),o.setZoom(null!=e?e:this.zoom),{name:t,matrix:tt(o.getWorldTransform()),right:Pt(o.right),up:Pt(o.up),forward:Pt(o.forward),position:Pt(o.getPosition()),focalPoint:Pt(o.getFocalPoint()),distanceVector:Pt(o.getDistanceVector()),distance:o.getDistance(),dollyingStep:o.getDollyingStep(),azimuth:o.getAzimuth(),elevation:o.getElevation(),roll:o.getRoll(),relAzimuth:o.relAzimuth,relElevation:o.relElevation,relRoll:o.relRoll,zoom:o.getZoom()});return this.landmarks.push(r),r},n.gotoLandmark=function(e,t){var n,s,r,i,l,c,u,h,f,d,p,g,m=this,a=(void 0===t&&(t={}),Ue(e)?this.landmarks.find(function(t){return t.name===e}):e);a&&(n=void 0===(n=(t=Ke(t)?{duration:t}:t).easing)?"linear":n,r=t.duration,s=void 0===r?100:r,r=void 0===(r=t.easingFunction)?void 0:r,t=t.onfinish,i=void 0===t?void 0:t,l=.01,0===s?(this.syncFromLandmark(a),i&&i()):(this.cancelLandmarkAnimation(),c=a.position,u=a.focalPoint,h=a.zoom,f=a.roll,d=r||A.EasingFunction(n),g=function(){m.setFocalPoint(u),m.setPosition(c),m.setRoll(f),m.setZoom(h),m.computeMatrix(),m.triggerUpdate(),i&&i()},this.canvas.requestAnimationFrame(function t(e){var n,r,i,a,o,e=e-(p=void 0===p?e:p);s<e||(n=d(e/s),r=v(),i=v(),a=1,o=0,zt(r,m.focalPoint,u,n),zt(i,m.position,c,n),o=m.roll*(1-n)+f*n,a=m.zoom*(1-n)+h*n,m.setFocalPoint(r),m.setPosition(i),m.setRoll(o),m.setZoom(a),Ht(r,u)+Ht(i,c)<=l&&null==h&&null==f)?g():(m.computeMatrix(),m.triggerUpdate(),e<s&&(m.landmarkAnimationID=m.canvas.requestAnimationFrame(t)))})))},n.syncFromLandmark=function(t){this.matrix=et(this.matrix,t.matrix),this.right=Ct(this.right,t.right),this.up=Ct(this.up,t.up),this.forward=Ct(this.forward,t.forward),this.position=Ct(this.position,t.position),this.focalPoint=Ct(this.focalPoint,t.focalPoint),this.distanceVector=Ct(this.distanceVector,t.distanceVector),this.azimuth=t.azimuth,this.elevation=t.elevation,this.roll=t.roll,this.relAzimuth=t.relAzimuth,this.relElevation=t.relElevation,this.relRoll=t.relRoll,this.dollyingStep=t.dollyingStep,this.distance=t.distance,this.zoom=t.zoom},e}(ll);function Yl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,function(t){t=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);n=n.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==typeof t?t:String(t)}(r.key),r)}}function Hl(t,e,n){e&&Yl(t.prototype,e),n&&Yl(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function Vl(t,e){return(Vl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}A.CameraContribution=n;function ql(b,e,x,n){if(!(0<=b&&b<=1&&0<=x&&x<=1))throw new Error("bezier x values must be in [0, 1] range");if(b===e&&x===n)return function(t){return t};for(var w=new(mc?Float32Array:Array)(11),t=0;t<11;++t)w[t]=xc(.1*t,b,x);function r(t){for(var e=0,n=1;10!==n&&w[n]<=t;++n)e+=.1;var r=e+.1*((t-w[--n])/(w[n+1]-w[n])),i=wc(r,b,x);if(.001<=i){for(var a=t,o=r,s=b,l=x,c=0;c<dc;++c){var u=wc(o,s,l);if(0===u)return o;o-=(xc(o,s,l)-a)/u}return o}if(0===i)return r;for(var h,f,d=t,p=e,g=e+.1,m=b,v=x,y=0;0<(h=xc(f=p+(g-p)/2,m,v)-d)?g=f:p=f,Math.abs(h)>pc&&++y<gc;);return f}return function(t){return 0===t||1===t?t:xc(r(t),e,n)}}function $l(t){return Math.pow(t,2)}function Ul(t){return Math.pow(t,3)}function Xl(t){return Math.pow(t,4)}function Kl(t){return Math.pow(t,5)}function Zl(t){return Math.pow(t,6)}function Ql(t){return 1-Math.cos(t*Math.PI/2)}function Jl(t){return 1-Math.sqrt(1-t*t)}function tc(t){return t*t*(3*t-2)}function ec(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)}function nc(t,e){var n=(e=e=void 0===e?[]:e)[0],e=void 0===(e=e[1])?.5:e,n=Xe(Number(void 0===n?1:n),1,10),e=Xe(Number(e),.1,2);return 0===t||1===t?t:-n*Math.pow(2,10*(t-1))*Math.sin((t-1-e/(2*Math.PI)*Math.asin(1/n))*(2*Math.PI)/e)}function rc(t,e,n){var r=(e=e=void 0===e?[]:e)[0],i=void 0===(i=e[1])?100:i,a=void 0===(a=e[2])?10:a,e=void 0===(e=e[3])?0:e,r=Xe(void 0===r?1:r,.1,1e3),i=Xe(i,.1,1e3),a=Xe(a,.1,1e3),e=Xe(e,.1,1e3),o=Math.sqrt(i/r),i=(a=a/(2*Math.sqrt(i*r)))<1?o*Math.sqrt(1-a*a):0,r=a<1?(a*o-e)/i:-e+o,e=n?n*t/1e3:t,e=a<1?Math.exp(-e*a*o)*(+Math.cos(i*e)+r*Math.sin(i*e)):(1+r*e)*Math.exp(-e*o);return 0===t||1===t?t:1-e}function ic(t,e){var e=e=void 0===e?[]:e,n=void 0===(n=e[0])?10:n;return("start"==e[1]?Math.ceil:Math.floor)(Xe(t,0,1)*n)/n}function ac(t,e){var n=(e=e=void 0===e?[]:e)[0],r=e[1],i=e[2],e=e[3];return ql(n,r,i,e)(t)}function oc(r){return function(t,e,n){return 1-r(1-t,e=void 0===e?[]:e,n)}}function sc(r){return function(t,e,n){return void 0===e&&(e=[]),t<.5?r(2*t,e,n)/2:1-r(-2*t+2,e,n)/2}}function lc(r){return function(t,e,n){return void 0===e&&(e=[]),t<.5?(1-r(1-2*t,e,n))/2:(r(2*t-1,e,n)+1)/2}}function cc(t){return t}var uc=function(i){var t,e;function n(t,e,n,r){t=i.call(this,t)||this;return t.currentTime=void 0,t.timelineTime=void 0,t.currentTime=n,t.timelineTime=r,t.target=e,t.type="finish",t.bubbles=!1,t.currentTarget=e,t.defaultPrevented=!1,t.eventPhase=t.AT_TARGET,t.timeStamp=Date.now(),t.currentTime=n,t.timelineTime=r,t}return e=i,(t=n).prototype=Object.create(e.prototype),Vl(t.prototype.constructor=t,e),n}(ls),hc=0,fc=function(){function t(t,e){this.effect=void 0,this.timeline=void 0,this.id=void 0,this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this.oldPlayState=void 0,this._holdTime=void 0,this.readyPromise=void 0,this.finishedPromise=void 0,this.resolveReadyPromise=void 0,this.rejectReadyPromise=void 0,this.resolveFinishedPromise=void 0,this.rejectFinishedPromise=void 0,this.onfinish=void 0,this.oncancel=void 0,this.onframe=void 0,this._currentTime=0,this._startTime=void 0,this._playbackRate=1,this._totalDuration=void 0,this._inEffect=void 0,this._inTimeline=!0,this.onremove=void 0,((this.effect=t).animation=this).timeline=e,this.id=""+hc++,this._inEffect=!!this.effect.update(0),this._totalDuration=Number(null==(t=this.effect)?void 0:t.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}var e=t.prototype;return e.updatePromises=function(){var t=this.oldPlayState,e=this.pending?"pending":this.playState;return this.readyPromise&&e!==t&&("idle"===e?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===t?this.resolveReadyPromise():"pending"===e&&(this.readyPromise=void 0)),this.finishedPromise&&e!==t&&("idle"===e?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===e?this.resolveFinishedPromise():"finished"===t&&(this.finishedPromise=void 0)),this.oldPlayState=e,this.readyPromise||this.finishedPromise},e.play=function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),-1===this.timeline.animations.indexOf(this)&&this.timeline.animations.push(this),this.updatePromises()},e.pause=function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._isFinished||this._paused||this._idle?this._idle&&(this.rewind(),this._idle=!1):this.currentTimePending=!0,this._startTime=null,this._paused=!0,this.updatePromises()},e.finish=function(){this.updatePromises(),this._idle||(this.currentTime=0<this._playbackRate?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())},e.cancel=function(){var t,e=this;this.updatePromises(),this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises(),this.oncancel)&&(t=new uc(null,this,this.currentTime,null),setTimeout(function(){e.oncancel(t)}))},e.reverse=function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()},e.updatePlaybackRate=function(t){this.playbackRate=t},e.targetAnimations=function(){var t;return(null==(t=this.effect)?void 0:t.target).getAnimations()},e.markTarget=function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)},e.unmarkTarget=function(){var t=this.targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)},e.tick=function(t,e){this._idle||this._paused||(null===this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this.currentTimePending=!1,this.fireEvents(t))},e.rewind=function(){if(0<=this.playbackRate)this.currentTime=0;else{if(!(this._totalDuration<1/0))throw new Error("Unable to rewind negative playback rate animation with infinite duration");this.currentTime=this._totalDuration}},e.persist=function(){throw new Error(pi)},e.addEventListener=function(t,e,n){throw new Error(pi)},e.removeEventListener=function(t,e,n){throw new Error(pi)},e.dispatchEvent=function(t){throw new Error(pi)},e.commitStyles=function(){throw new Error(pi)},e.ensureAlive=function(){var t;this.playbackRate<0&&0===this.currentTime?this._inEffect=!(null==(t=this.effect)||!t.update(-1)):this._inEffect=!(null==(t=this.effect)||!t.update(this.currentTime)),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,this.timeline.animations.push(this))},e.tickCurrentTime=function(t,e){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=0<this._playbackRate?this._totalDuration:0),this.ensureAlive())},e.fireEvents=function(t){var e,n=this;this._isFinished?this._finishedFlag||(this.onfinish&&(e=new uc(null,this,this.currentTime,t),setTimeout(function(){n.onfinish&&n.onfinish(e)})),this._finishedFlag=!0):(this.onframe&&"running"===this.playState&&(t=new uc(null,this,this.currentTime,t),this.onframe(t)),this._finishedFlag=!1)},Hl(t,[{key:"pending",get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending}},{key:"playState",get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"}},{key:"ready",get:function(){var n=this;return this.readyPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(t,e){n.resolveReadyPromise=function(){t(n)},n.rejectReadyPromise=function(){e(new Error)}}),this.pending)||this.resolveReadyPromise(),this.readyPromise}},{key:"finished",get:function(){var n=this;return this.finishedPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(t,e){n.resolveFinishedPromise=function(){t(n)},n.rejectFinishedPromise=function(){e(new Error)}}),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise}},{key:"currentTime",get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){var e;t=Number(t),isNaN(t)||(this.timeline.restart(),this._paused||null===this._startTime||(this._startTime=Number(null==(e=this.timeline)?void 0:e.currentTime)-t/this.playbackRate),this.currentTimePending=!1,this._currentTime!==t&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this)))}},{key:"startTime",get:function(){return this._startTime},set:function(t){null!==t&&(this.updatePromises(),t=Number(t),isNaN(t)||this._paused||this._idle||(this._startTime=t,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()))}},{key:"playbackRate",get:function(){return this._playbackRate},set:function(t){var e;t!==this._playbackRate&&(this.updatePromises(),e=this.currentTime,this._playbackRate=t,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==e&&(this.currentTime=e),this.updatePromises())}},{key:"_isFinished",get:function(){return!this._idle&&(0<this._playbackRate&&Number(this._currentTime)>=this._totalDuration||this._playbackRate<0&&Number(this._currentTime)<=0)}},{key:"totalDuration",get:function(){return this._totalDuration}},{key:"_needsTick",get:function(){return this.pending||"running"===this.playState||!this._finishedFlag}}]),t}(),dc=4,pc=1e-7,gc=10,mc="function"==typeof Float32Array,vc=function(t,e){return 1-3*e+3*t},yc=function(t,e){return 3*e-6*t},bc=function(t){return 3*t},xc=function(t,e,n){return((vc(e,n)*t+yc(e,n))*t+bc(e))*t},wc=function(t,e,n){return 3*vc(e,n)*t*t+2*yc(e,n)*t+bc(e)},Wo=ql(.42,0,1,1),Mc={steps:ic,"step-start":function(t){return ic(t,[1,"start"])},"step-end":function(t){return ic(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":ac,ease:function(t){return ac(t,[.25,.1,.25,1])},in:Wo,out:oc(Wo),"in-out":sc(Wo),"out-in":lc(Wo),"in-quad":$l,"out-quad":oc($l),"in-out-quad":sc($l),"out-in-quad":lc($l),"in-cubic":Ul,"out-cubic":oc(Ul),"in-out-cubic":sc(Ul),"out-in-cubic":lc(Ul),"in-quart":Xl,"out-quart":oc(Xl),"in-out-quart":sc(Xl),"out-in-quart":lc(Xl),"in-quint":Kl,"out-quint":oc(Kl),"in-out-quint":sc(Kl),"out-in-quint":lc(Kl),"in-expo":Zl,"out-expo":oc(Zl),"in-out-expo":sc(Zl),"out-in-expo":lc(Zl),"in-sine":Ql,"out-sine":oc(Ql),"in-out-sine":sc(Ql),"out-in-sine":lc(Ql),"in-circ":Jl,"out-circ":oc(Jl),"in-out-circ":sc(Jl),"out-in-circ":lc(Jl),"in-back":tc,"out-back":oc(tc),"in-out-back":sc(tc),"out-in-back":lc(tc),"in-bounce":ec,"out-bounce":oc(ec),"in-out-bounce":sc(ec),"out-in-bounce":lc(ec),"in-elastic":nc,"out-elastic":oc(nc),"in-out-elastic":sc(nc),"out-in-elastic":lc(nc),spring:rc,"spring-in":rc,"spring-out":oc(rc),"spring-in-out":sc(rc),"spring-out-in":lc(rc)},kc=function(t){return("-"===(t=(t=t).replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})).charAt(0)?t.substring(1):t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()};function Ec(n,r){return function(t){var e;return 1<=t?1:(t+=r*(e=1/n))-t%e}}var $o="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",Oc=new RegExp("cubic-bezier\\("+$o+","+$o+","+$o+","+$o+"\\)"),Sc=/steps\(\s*(\d+)\s*\)/,_c=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function Ac(t){var e=Oc.exec(t);return e?ql.apply(void 0,e.slice(1).map(Number)):(e=Sc.exec(t))?Ec(Number(e[1]),0):(e=_c.exec(t))?Ec(Number(e[1]),{start:1,middle:.5,end:0}[e[2]]):Mc[kc(t)]||Mc.linear}function Tc(t){return Math.abs((0!==(e=t).duration&&0!==e.iterations?("auto"===e.duration?0:Number(e.duration))*(null!=(e=e.iterations)?e:1):0)/(t.playbackRate||1));var e}var Pc=0,Lc=1,Cc=2,Nc=3;function jc(t,e,n){c=t,i=n;var r,i,a,o,s,l=null===(l=e)?Pc:(r=i.endTime,l<Math.min(i.delay,r)?Lc:l>=Math.min(i.delay+c+i.endDelay,r)?Cc:Nc),c=function(t,e,n,r,i){switch(r){case Lc:return"backwards"===e||"both"===e?0:null;case Nc:return n-i;case Cc:return"forwards"===e||"both"===e?t:null;case Pc:return null}}(t,n.fill,e,l,n.delay);return null===c?null:(i="auto"===n.duration?0:n.duration,r=i,t=l,e=n.iterations,o=c,s=n.iterationStart,0===r?t!==Lc&&(s+=e):s+=o/r,e=t=s,o=n.iterationStart,s=l,a=n.iterations,c=c,i=i,e=o=0!==(o=e===1/0?o%1:e%1)||s!==Cc||0===a||0===c&&0!==i?o:1,s=n.iterations,a=e,c=t,i=l===Cc&&s===1/0?1/0:1===a?Math.floor(c)-1:Math.floor(c),o=n.direction,t=i,l=e,a="normal"===(s="normal"!==(s=o)&&"reverse"!==o&&(t=t,"alternate-reverse"===o&&(t+=1),s="normal",t!==1/0)&&t%2!=0?"reverse":s)?l:1-l,n.currentIteration=i,n.progress=a,n.easingFunction(a))}function Rc(t,e,n){var a=function(t,e){for(var n={},r=0;r<t.length;r++)for(var i in t[r]){var a;Ic(i)&&(a={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:Ac(t[r].easing)||e.easingFunction,value:t[r][i]},n[i]=n[i]||[],n[i].push(a))}return n}(t,e),o=function(t,e){var n,r=[];for(n in t)for(var i=t[n],a=0;a<i.length-1;a++){var o=a,s=a+1,l=i[o].computedOffset,c=i[s].computedOffset,u=l,h=c;0===a&&(u=-1/0,0===c)&&(s=o),a===i.length-2&&(h=1/0,1===l)&&(o=s),r.push({applyFrom:u,applyTo:h,startOffset:i[o].computedOffset,endOffset:i[s].computedOffset,easingFunction:i[o].easingFunction,property:n,interpolation:function(t,e,n,r){var i=il[t];if(i&&i.syntax&&i.int){i=A.styleValueRegistry.getPropertySyntax(i.syntax);if(i){o=A.enableCSSParsing?(a=A.styleValueRegistry.parseProperty(t,e,r),o=A.styleValueRegistry.parseProperty(t,n,r),a=A.styleValueRegistry.computeProperty(t,a,r),A.styleValueRegistry.computeProperty(t,o,r)):(t=i.parserWithCSSDisabled,a=t?t(e,r):e,t?t(n,r):n);var a,o,s,t=i.mixer(a,o,r);if(t)return s=Bc.apply(void 0,t),function(t){return 0===t?e:1===t?n:s(t)}}}return Bc(!1,!0,function(t){return t?n:e})}(n,i[o].value,i[s].value,e)})}return r.sort(function(t,e){return t.startOffset-e.startOffset}),r}(a,n);return function(r,i){if(null!==i)o.filter(function(t){return i>=t.applyFrom&&i<t.applyTo}).forEach(function(t){var e=i-t.startOffset,n=t.endOffset-t.startOffset,e=0==n?0:t.easingFunction(e/n);r.setAttribute(t.property,t.interpolation(e))});else for(var t in a)Ic(t)&&r.setAttribute(t,null)}}function Ic(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var Bc=function(e,n,r){return function(t){t=function t(e,n,r){if("number"==typeof e&&"number"==typeof n)return e*(1-r)+n*r;if("boolean"==typeof e&&"boolean"==typeof n||"string"==typeof e&&"string"==typeof n)return r<.5?e:n;if(Array.isArray(e)&&Array.isArray(n)){for(var i=e.length,a=n.length,o=Math.max(i,a),s=[],l=0;l<o;l++)s.push(t(e[l<i?l:i-1],n[l<a?l:a-1],r));return s}throw new Error("Mismatched interpolation arguments "+e+":"+n)}(e,n,t);return!A.enableCSSParsing&&Ke(t)?t:r(t)}};var Dc=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=cc,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.playbackRate=void 0,this.effect=void 0,this.composite=void 0,this.activeDuration=void 0,this.endTime=void 0,this.currentIteration=null,this.progress=null}return Hl(t,[{key:"easing",get:function(){return this._easing},set:function(t){this.easingFunction=Ac(t),this._easing=t}}]),t}();function Fc(t,i){if(null===t)return[];for(var e=(t=Array.isArray(t)?t:function(t){var e,n=[];for(e in t)if(!(e in["easing","offset","composite"]))for(var r,i=t[e],a=(i=Array.isArray(i)?i:[i]).length,o=0;o<a;o++)n[o]||(r={},"offset"in t&&(r.offset=Number(t.offset)),"easing"in t&&(r.easing=t.easing),"composite"in t&&(r.composite=t.composite),n[o]=r),void 0!==i[o]&&null!==i[o]&&(n[o][e]=i[o]);return n.sort(function(t,e){return(t.computedOffset||0)-(e.computedOffset||0)}),n}(t)).map(function(t){var e,n={};for(e in null!=i&&i.composite&&(n.composite="auto"),t){var r=t[e];if("offset"===e){if(null!==r){if(r=Number(r),!isFinite(r))throw new Error("Keyframe offsets must be numbers.");if(r<0||1<r)throw new Error("Keyframe offsets must be between 0 and 1.");n.computedOffset=r}}else if("composite"===e&&-1===["replace","add","accumulate","auto"].indexOf(r))throw new Error(r+" compositing is not supported");n[e]=r}return void 0===n.offset&&(n.offset=null),void 0===n.easing&&(n.easing=(null==i?void 0:i.easing)||"linear"),void 0===n.composite&&(n.composite="auto"),n}),n=!0,r=-1/0,a=0;a<e.length;a++){var o=e[a].offset;if(_(o))n=!1;else{if(o<r)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");r=o}}if(e=e.filter(function(t){return 0<=Number(t.offset)&&Number(t.offset)<=1}),!n)for(var s=e.length,l=(e[s-1].computedOffset=Number(null!=(t=e[s-1].offset)?t:1),1<s&&(e[0].computedOffset=Number(null!=(t=e[0].offset)?t:0)),0),c=Number(e[0].computedOffset),u=1;u<s;u++){var h=e[u].computedOffset;if(!_(h)&&!_(c)){for(var f=1;f<u-l;f++)e[l+f].computedOffset=c+(Number(h)-c)*f/(u-l);l=u,c=Number(h)}}return e}var zc="backwards|forwards|both|none".split("|"),Gc="reverse|alternate|alternate-reverse".split("|");function Wc(t,e){var n,r,i;return t=function(t){"number"==typeof t&&(t=isNaN(t)?{duration:"auto"}:{duration:t});return t}(null!=(r=t)?r:{duration:"auto"}),n=t,r=e,i=new Dc,r&&(i.fill="both",i.duration="auto"),"number"!=typeof n||isNaN(n)?void 0!==n&&Object.keys(n).forEach(function(t){void 0===n[t]||null===n[t]||"auto"===n[t]||!("number"!=typeof i[t]&&"duration"!==t||"number"==typeof n[t]&&!isNaN(n[t]))||"fill"===t&&-1===zc.indexOf(n[t])||"direction"===t&&-1===Gc.indexOf(n[t])||(i[t]=n[t])}):i.duration=n,i}var Yc=function(){function t(t,e,n){var r=this,t=(this.composite="replace",this.iterationComposite="replace",this.target=void 0,this.animation=void 0,this.timing=void 0,this.computedTiming=void 0,this.normalizedKeyframes=void 0,this.timeFraction=void 0,this.interpolations=void 0,this.target=t,this.timing=Wc(n,!1),(this.timing.effect=this).timing.activeDuration=Tc(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=Fc(e,this.timing),this.interpolations=Rc(this.normalizedKeyframes,this.timing,this.target),A.globalThis.Proxy);this.computedTiming=t?new t(this.timing,{get:function(t,e){return"duration"===e?"auto"===t.duration?0:t.duration:"fill"===e?"auto"===t.fill?"none":t.fill:"localTime"===e?r.animation&&r.animation.currentTime||null:"currentIteration"===e?r.animation&&"running"===r.animation.playState?t.currentIteration||0:null:"progress"===e?r.animation&&"running"===r.animation.playState?t.progress||0:null:t[e]},set:function(){return!0}}):this.timing}var e=t.prototype;return e.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},e.update=function(t){return null!==t&&(this.timeFraction=jc(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},e.getKeyframes=function(){return this.normalizedKeyframes},e.setKeyframes=function(t){this.normalizedKeyframes=Fc(t)},e.getComputedTiming=function(){return this.computedTiming},e.getTiming=function(){return this.timing},e.updateTiming=function(e){var n=this;Object.keys(e||{}).forEach(function(t){n.timing[t]=e[t]})},t}();function Hc(t,e){return Number(t.id)-Number(e.id)}r=function(){function t(t){var n=this;this.document=void 0,this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.frameId=void 0,this.webAnimationsNextTick=function(t){n.currentTime=t,n.discardAnimations(),0===n.animations.length?n.timelineTicking=!1:n.requestAnimationFrame(n.webAnimationsNextTick)},this.processRafCallbacks=function(e){var t=n.rafCallbacks;n.rafCallbacks=[],e<Number(n.currentTime)&&(e=Number(n.currentTime)),n.animations.sort(Hc),n.animations=n.tick(e,!0,n.animations)[0],t.forEach(function(t){t[1](e)}),n.applyPendingEffects()},this.document=t}var e=t.prototype;return e.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},e.isTicking=function(){return this.inTick},e.play=function(t,e,n){t=new Yc(t,e,n),e=new fc(t,this);return this.animations.push(e),this.restartWebAnimationsNextTick(),e.updatePromises(),e.play(),e.updatePromises(),e},e.applyDirtiedAnimation=function(t){var e=this;this.inTick||(t.markTarget(),(t=t.targetAnimations()).sort(Hc),this.tick(Number(this.currentTime),!1,t.slice())[1].forEach(function(t){t=e.animations.indexOf(t);-1!==t&&e.animations.splice(t,1)}),this.applyPendingEffects())},e.restart=function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame(function(){}),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame},e.destroy=function(){this.document.defaultView.cancelAnimationFrame(this.frameId)},e.applyPendingEffects=function(){this.pendingEffects.forEach(function(t){null!=t&&t.applyInterpolations()}),this.pendingEffects=[]},e.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(t){return t.updatePromises()})},e.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(t){return"finished"!==t.playState&&"idle"!==t.playState})},e.restartWebAnimationsNextTick=function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},e.rAF=function(t){var e=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([e,t]),e},e.requestAnimationFrame=function(e){var n=this;return this.rAF(function(t){n.updateAnimationsPromises(),e(t),n.updateAnimationsPromises()})},e.tick=function(n,r,t){var i=this,a=(this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=n,this.ticking=!1,[]),o=[],s=[],l=[];return t.forEach(function(t){t.tick(n,r),t._inEffect?(o.push(t.effect),t.markTarget()):(a.push(t.effect),t.unmarkTarget()),t._needsTick&&(i.ticking=!0);var e=t._inEffect||t._needsTick;((t._inTimeline=e)?s:l).push(t)}),(t=this.pendingEffects).push.apply(t,a),(t=this.pendingEffects).push.apply(t,o),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[s,l]},t}();A.EasingFunction=Ac,A.AnimationTimeline=r;const Vc="main-layer",qc="label-layer",$c="element",Uc="view",Xc="plot",Kc="component",Zc="label",Qc="area";function Jc(t,e){return(Jc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function tu(t,e){e=e.r;t.arc(e,e,e,0,2*Math.PI,!1)}function eu(t,e){var n,r,i=e.rx,e=e.ry;t.ellipse?t.ellipse(i,e,i,e,0,0,2*Math.PI,!1):(n=e<i?i:e,r=e<i?1:i/e,e=e<i?e/i:1,t.save(),t.scale(r,e),t.arc(0,0,n,0,2*Math.PI))}function nu(t,e){var n,r,i=e.x1,a=e.y1,o=e.x2,s=e.y2,l=e.defX,l=void 0===l?0:l,c=e.defY,c=void 0===c?0:c,u=e.markerStart,h=e.markerEnd,f=e.markerStartOffset,e=e.markerEndOffset,d=0,p=0,g=0,m=0,v=0;u&&Ms(u)&&f&&(n=o-i,r=s-a,v=Math.atan2(r,n),d=Math.cos(v)*(f||0),p=Math.sin(v)*(f||0)),h&&Ms(h)&&e&&(n=i-o,r=a-s,v=Math.atan2(r,n),g=Math.cos(v)*(e||0),m=Math.sin(v)*(e||0)),t.moveTo(i-l+d,a-c+p),t.lineTo(o-l+g,s-c+m)}function ru(t,e){var n,r,i=e.defX,a=void 0===i?0:i,i=e.defY,o=void 0===i?0:i,i=e.markerStart,s=e.markerEnd,l=e.markerStartOffset,c=e.markerEndOffset,e=e.path,u=e.absolutePath,h=e.segments,f=0,d=0,p=0,g=0,e=0;i&&Ms(i)&&l&&(r=(i=i.parentNode.getStartTangent())[0],i=i[1],n=r[0]-i[0],r=r[1]-i[1],e=Math.atan2(r,n),f=Math.cos(e)*(l||0),d=Math.sin(e)*(l||0)),s&&Ms(s)&&c&&(l=(i=s.parentNode.getEndTangent())[0],s=i[1],n=l[0]-s[0],r=l[1]-s[1],e=Math.atan2(r,n),p=Math.cos(e)*(c||0),g=Math.sin(e)*(c||0));for(var m=0;m<u.length;m++){var v=u[m],y=v[0],b=u[m+1],x=0===m&&(0!==f||0!==d),w=(m===u.length-1||b&&("M"===b[0]||"Z"===b[0]))&&0!==p&&0!==g;switch(y){case"M":x?(t.moveTo(v[1]-a+f,v[2]-o+d),t.lineTo(v[1]-a,v[2]-o)):t.moveTo(v[1]-a,v[2]-o);break;case"L":w?t.lineTo(v[1]-a+p,v[2]-o+g):t.lineTo(v[1]-a,v[2]-o);break;case"Q":t.quadraticCurveTo(v[1]-a,v[2]-o,v[3]-a,v[4]-o),w&&t.lineTo(v[3]-a+p,v[4]-o+g);break;case"C":t.bezierCurveTo(v[1]-a,v[2]-o,v[3]-a,v[4]-o,v[5]-a,v[6]-o),w&&t.lineTo(v[5]-a+p,v[6]-o+g);break;case"A":var M,k,E=h[m].arcParams,O=E.cx,S=E.cy,_=E.rx,A=E.ry,T=E.startAngle,P=E.endAngle,L=E.xRotation,E=E.sweepFlag;t.ellipse?t.ellipse(O-a,S-o,_,A,L,T,P,!!(1-E)):(M=A<_?_:A,k=A<_?1:_/A,A=A<_?A/_:1,t.translate(O-a,S-o),t.rotate(L),t.scale(k,A),t.arc(0,0,M,T,P,!!(1-E)),t.scale(1/k,1/A),t.rotate(-L),t.translate(-(O-a),-(S-o))),w&&t.lineTo(v[6]-a+p,v[7]-o+g);break;case"Z":t.closePath()}}}function iu(t,e){var n,r,i=e.defX,a=void 0===i?0:i,i=e.defY,o=void 0===i?0:i,i=e.markerStart,s=e.markerEnd,l=e.markerStartOffset,c=e.markerEndOffset,u=e.points.points,h=u.length,e=u[0][0]-a,f=u[0][1]-o,d=u[h-1][0]-a,p=u[h-1][1]-o,g=0,m=0,v=0,y=0,b=0;i&&Ms(i)&&l&&(n=u[1][0]-u[0][0],r=u[1][1]-u[0][1],b=Math.atan2(r,n),g=Math.cos(b)*(l||0),m=Math.sin(b)*(l||0)),s&&Ms(s)&&c&&(n=u[h-1][0]-u[0][0],r=u[h-1][1]-u[0][1],b=Math.atan2(r,n),v=Math.cos(b)*(c||0),y=Math.sin(b)*(c||0)),t.moveTo(e+(g||v),f+(m||y));for(var x=1;x<h-1;x++){var w=u[x];t.lineTo(w[0]-a,w[1]-o)}t.lineTo(d,p)}function au(t,e){var n,r,i=e.defX,a=void 0===i?0:i,i=e.defY,o=void 0===i?0:i,i=e.markerStart,s=e.markerEnd,l=e.markerStartOffset,c=e.markerEndOffset,u=e.points.points,h=u.length,e=u[0][0]-a,f=u[0][1]-o,d=u[h-1][0]-a,p=u[h-1][1]-o,g=0,m=0,v=0,y=0,b=0;i&&Ms(i)&&l&&(n=u[1][0]-u[0][0],r=u[1][1]-u[0][1],b=Math.atan2(r,n),g=Math.cos(b)*(l||0),m=Math.sin(b)*(l||0)),s&&Ms(s)&&c&&(n=u[h-2][0]-u[h-1][0],r=u[h-2][1]-u[h-1][1],b=Math.atan2(r,n),v=Math.cos(b)*(c||0),y=Math.sin(b)*(c||0)),t.moveTo(e+g,f+m);for(var x=1;x<h-1;x++){var w=u[x];t.lineTo(w[0]-a,w[1]-o)}t.lineTo(d+v,p+y)}function ou(t,e){var n,r,i,a,o=e.radius,s=e.width,e=e.height,l=s,c=e;o&&o.some(function(t){return 0!==t})?(n=(s=0<s?1:-1)+(e=0<e?1:-1)==0,r=(o=o.map(function(t){return Xe(t,0,Math.min(Math.abs(l)/2,Math.abs(c)/2))}))[0],i=o[1],a=o[2],o=o[3],t.moveTo(s*r,0),t.lineTo(l-s*i,0),0!==i&&t.arc(l-s*i,e*i,i,-e*Math.PI/2,0<s?0:Math.PI,n),t.lineTo(l,c-e*a),0!==a&&t.arc(l-s*a,c-e*a,a,0<s?0:Math.PI,0<e?Math.PI/2:1.5*Math.PI,n),t.lineTo(s*o,c),0!==o&&t.arc(s*o,c-e*o,o,0<e?Math.PI/2:-Math.PI/2,0<s?Math.PI:0,n),t.lineTo(0,e*r),0!==r&&t.arc(s*r,e*r,r,0<s?Math.PI:0,0<e?1.5*Math.PI:Math.PI/2,n)):t.rect(0,0,l,c)}var su=function(i){var t;function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).name="canvas-path-generator",t}t=i,(n=e).prototype=Object.create(t.prototype),Jc(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){(t={})[E.CIRCLE]=tu,t[E.ELLIPSE]=eu,t[E.RECT]=ou,t[E.LINE]=nu,t[E.POLYLINE]=au,t[E.POLYGON]=iu,t[E.PATH]=ru,t[E.TEXT]=void 0,t[E.GROUP]=void 0,t[E.IMAGE]=void 0,t[E.HTML]=void 0,t[E.MESH]=void 0;var t;this.context.pathGeneratorFactory=t},n.destroy=function(){delete this.context.pathGeneratorFactory},e}(dl);function lu(){lu=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return k()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===h)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(M([]))),m=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function v(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function y(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function M(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:k}}function k(){return{value:void 0,done:!0}}return c(m,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(m),t},o.awrap=function(t){return{__await:t}},v(y.prototype),a(y.prototype,n,function(){return this}),o.AsyncIterator=y,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new y(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},v(m),a(m,i,"Generator"),a(m,r,function(){return this}),a(m,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=M,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:M(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},o}function cu(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function uu(t,e){return(uu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function hu(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function fu(t,e){var n,r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){var n;if(t)return"string"==typeof t?hu(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hu(t,e):void 0}(t))||e&&t&&"number"==typeof t.length)return r&&(t=r),n=0,function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var du=v(),pu=v(),gu=v(),mu=J(),vu=function(){function s(){var s=this;this.canvasConfig=void 0,this.pathGeneratorFactory=void 0,this.pointInPathPickerFactory=void 0,this.isHit=function(t,e,n,r,i){var a=s.pointInPathPickerFactory[t.nodeName];if(a){var n=ct(mu,n),e=Gt(pu,Nt(gu,e[0],e[1],0),n),n=t.getGeometryBounds().halfExtents,o=t.parsedStyle.anchor;if(e[0]+=(o&&o[0]||0)*n[0]*2,e[1]+=(o&&o[1]||0)*n[1]*2,a(t,new Qo(e[0],e[1]),r,s.isPointInPath,i))return!0}return!1},this.isPointInPath=function(t,e,n){var t=t.offscreenCanvas.getOrCreateContext(s.canvasConfig.offscreenCanvas),r=s.pathGeneratorFactory[e.nodeName];return r&&(t.beginPath(),r(t,e.parsedStyle),t.closePath()),t.isPointInPath(n.x,n.y)}}var t=s.prototype;return t.apply=function(t,n){var r=this,e=t.config,i=t.renderingService,a=t.renderingContext,o=t.pathGeneratorFactory,t=t.pointInPathPickerFactory,l=(this.canvasConfig=e,this.pathGeneratorFactory=o,this.pointInPathPickerFactory=t,null==(e=a.root)?void 0:e.ownerDocument);i.hooks.pick.tapPromise(s.tag,function(){s=lu().mark(function t(e){return lu().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",r.pick(l,e,n));case 1:case"end":return t.stop()}},t)});var s,e=function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){cu(r,e,n,i,a,"next",t)}function a(t){cu(r,e,n,i,a,"throw",t)}i(void 0)})};return function(t){return e.apply(this,arguments)}}()),i.hooks.pickSync.tap(s.tag,function(t){return r.pick(l,t,n)})},t.pick=function(t,e,n){for(var r=e.topmost,i=e.position,a=i.x,i=i.y,o=Nt(du,a,i,0),s=[],l=fu(t.elementsFromBBox(o[0],o[1],o[0],o[1]));!(c=l()).done;){var c=c.value,u=c.getWorldTransform();if(this.isHit(c,o,u,!1,n)){u=fi(c);if(u){u=u.parsedStyle.clipPath;if(this.isHit(u,o,u.getWorldTransform(),!0,n)){if(r)return e.picked=[c],e;s.push(c)}}else{if(r)return e.picked=[c],e;s.push(c)}}}return e.picked=s,e},s}();function yu(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function bu(t,e){return Math.abs(t-e)<.001}function xu(t,e){var n=Math.min.apply(Math,t),r=Math.min.apply(Math,e);return{x:n,y:r,width:Math.max.apply(Math,t)-n,height:Math.max.apply(Math,e)-r}}function wu(t){return(t+2*Math.PI)%(2*Math.PI)}vu.tag="CanvasPicker";var Mu={box:function(t,e,n,r){return xu([t,n],[e,r])},length:yu,pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,r,i,a){var o=(n-t)*(i-t)+(r-e)*(a-e);return o<0?yu(t,e,i,a):(n-t)*(n-t)+(r-e)*(r-e)<o?yu(n,r,i,a):this.pointToLine(t,e,n,r,i,a)},pointToLine:function(t,e,n,r,i,a){n=[n-t,r-e];return ae(n,[0,0])?Math.sqrt((i-t)*(i-t)+(a-e)*(a-e)):(re(r=[-n[1],n[0]],r),Math.abs(ie([i-t,a-e],r)))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function ku(t,e,n,r,i,a){for(var o=-1,s=1/0,l=[n,r],c=20,u=1/(c=a&&200<a?a/10:c),h=u/10,f=0;f<=c;f++){var d=f*u,p=[i.apply(void 0,t.concat([d])),i.apply(void 0,e.concat([d]))],p=yu(l[0],l[1],p[0],p[1]);p<s&&(o=d,s=p)}if(0===o)return{x:t[0],y:e[0]};if(1===o)return{x:t[(n=t.length)-1],y:e[n-1]};for(var s=1/0,g=0;g<32&&!(h<1e-4);g++){var m=o-h,v=o+h,y=[i.apply(void 0,t.concat([m])),i.apply(void 0,e.concat([m]))],y=yu(l[0],l[1],y[0],y[1]);0<=m&&y<s?(o=m,s=y):(m=[i.apply(void 0,t.concat([v])),i.apply(void 0,e.concat([v]))],y=yu(l[0],l[1],m[0],m[1]),v<=1&&y<s?(o=v,s=y):h*=.5)}return{x:i.apply(void 0,t.concat([o])),y:i.apply(void 0,e.concat([o]))}}function Eu(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function Ou(t,e,n){n=t+n-2*e;return bu(n,0)?[.5]:(t=(t-e)/n)<=1&&0<=t?[t]:[]}function Su(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function _u(t,e,n,r,i,a,o){var s=Eu(t,n,i,o),l=Eu(e,r,a,o),c=Mu.pointAt(t,e,n,r,o),n=Mu.pointAt(n,r,i,a,o);return[[t,e,c.x,c.y,s,l],[s,l,n.x,n.y,i,a]]}function Au(t,e,n,r,i,a,o){return 0===o?(yu(t,e,n,r)+yu(n,r,i,a)+yu(t,e,i,a))/2:(e=(t=_u(t,e,n,r,i,a,.5))[0],n=t[1],e.push(o-1),n.push(o-1),Au.apply(void 0,e)+Au.apply(void 0,n))}var Tu={box:function(t,e,n,r,i,a){var o=Ou(t,n,i)[0],s=Ou(e,r,a)[0],l=[t,i],c=[e,a];return void 0!==o&&l.push(Eu(t,n,i,o)),void 0!==s&&c.push(Eu(e,r,a,s)),xu(l,c)},length:function(t,e,n,r,i,a){return Au(t,e,n,r,i,a,3)},nearestPoint:function(t,e,n,r,i,a,o,s){return ku([t,n,i],[e,r,a],o,s,Eu)},pointDistance:function(t,e,n,r,i,a,o,s){t=this.nearestPoint(t,e,n,r,i,a,o,s);return yu(t.x,t.y,o,s)},interpolationAt:Eu,pointAt:function(t,e,n,r,i,a,o){return{x:Eu(t,n,i,o),y:Eu(e,r,a,o)}},divide:_u,tangentAngle:function(t,e,n,r,i,a,o){t=Su(t,n,i,o),n=Su(e,r,a,o);return wu(Math.atan2(n,t))}};function Pu(t,e,n,r,i){var a=1-i;return a*a*a*t+3*e*i*a*a+3*n*i*i*a+r*i*i*i}function Lu(t,e,n,r,i){var a=1-i;return 3*(a*a*(e-t)+2*a*i*(n-e)+i*i*(r-n))}function Cu(t,e,n,r){var i,a,r=-3*t+9*e-9*n+3*r,n=6*t-12*e+6*n,e=3*e-3*t,t=[];return bu(r,0)?bu(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):bu(e=n*n-4*r*e,0)?t.push(-n/(2*r)):0<e&&(a=(-n-(e=Math.sqrt(e)))/(2*r),0<=(i=(-n+e)/(2*r))&&i<=1&&t.push(i),0<=a)&&a<=1&&t.push(a),t}function Nu(t,e,n,r,i,a,o,s,l){var c=Pu(t,n,i,o,l),u=Pu(e,r,a,s,l),h=Mu.pointAt(t,e,n,r,l),n=Mu.pointAt(n,r,i,a,l),r=Mu.pointAt(i,a,o,s,l),i=Mu.pointAt(h.x,h.y,n.x,n.y,l),a=Mu.pointAt(n.x,n.y,r.x,r.y,l);return[[t,e,h.x,h.y,i.x,i.y,c,u],[c,u,a.x,a.y,r.x,r.y,o,s]]}function ju(t,e,n,r,i,a,o,s,l){if(0===l){for(var c=[t,n,i,o],u=[e,r,a,s],h=0,f=c.length,d=0;d<f;d++)h+=yu(c[d],u[d],c[(d+1)%f],u[(d+1)%f]);return h/2}t=Nu(t,e,n,r,i,a,o,s,.5),e=[].concat(t[0],[l-1]),n=[].concat(t[1],[l-1]);return ju.apply(void 0,e)+ju.apply(void 0,n)}var Ru={extrema:Cu,box:function(t,e,n,r,i,a,o,s){for(var l=[t,o],c=[e,s],u=Cu(t,n,i,o),h=Cu(e,r,a,s),f=0;f<u.length;f++)l.push(Pu(t,n,i,o,u[f]));for(var d=0;d<h.length;d++)c.push(Pu(e,r,a,s,h[d]));return xu(l,c)},length:function(t,e,n,r,i,a,o,s){return ju(t,e,n,r,i,a,o,s,3)},nearestPoint:function(t,e,n,r,i,a,o,s,l,c,u){return ku([t,n,i,o],[e,r,a,s],l,c,Pu,u)},pointDistance:function(t,e,n,r,i,a,o,s,l,c,u){t=this.nearestPoint(t,e,n,r,i,a,o,s,l,c,u);return yu(t.x,t.y,l,c)},interpolationAt:Pu,pointAt:function(t,e,n,r,i,a,o,s,l){return{x:Pu(t,n,i,o,l),y:Pu(e,r,a,s,l)}},divide:Nu,tangentAngle:function(t,e,n,r,i,a,o,s,l){t=Lu(t,n,i,o,l),n=Lu(e,r,a,s,l);return wu(Math.atan2(n,t))}};function Iu(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function Bu(t,e,n,r,i,a){return t<=i&&i<=t+n&&e<=a&&a<=e+r}function Du(t,e,n,r,i,a,o,s){var l=(Math.atan2(s-e,o-t)+2*Math.PI)%(2*Math.PI),t={x:t+n*Math.cos(l),y:e+n*Math.sin(l)};return Iu(t.x,t.y,o,s)<=a/2}function Fu(t,e,n,r,i,a,o){var s=Math.min(t,n),l=Math.max(t,n),c=Math.min(e,r),u=Math.max(e,r),h=i/2;return s-h<=a&&a<=l+h&&c-h<=o&&o<=u+h&&Mu.pointToLine(t,e,n,r,a,o)<=i/2}function zu(t,e,n,r,i){var a=t.length;if(!(a<2)){for(var o=0;o<a-1;o++)if(Fu(t[o][0],t[o][1],t[o+1][0],t[o+1][1],e,n,r))return!0;if(i){var i=t[0],s=t[a-1];if(Fu(i[0],i[1],s[0],s[1],e,n,r))return!0}}return!1}var Gu=1e-6;function Wu(t){return Math.abs(t)<Gu?0:t<0?-1:1}function Yu(t,e,n){var r=!1,i=t.length;if(i<=2)return!1;for(var a,o,s,l=0;l<i;l++){var c=t[l],u=t[(l+1)%i];if(o=u,((s=[e,n])[0]-(a=c)[0])*(o[1]-a[1])==(o[0]-a[0])*(s[1]-a[1])&&Math.min(a[0],o[0])<=s[0]&&s[0]<=Math.max(a[0],o[0])&&Math.min(a[1],o[1])<=s[1]&&s[1]<=Math.max(a[1],o[1]))return!0;0<Wu(c[1]-n)!=0<Wu(u[1]-n)&&Wu(e-(n-c[1])*(c[0]-u[0])/(c[1]-u[1])-c[0])<0&&(r=!r)}return r}function Hu(t,e,n){for(var r=!1,i=0;i<t.length&&!(r=Yu(t[i],e,n));i++);return r}function Vu(t,e,n){var t=t.parsedStyle,r=t.r,i=t.fill,a=t.stroke,o=t.lineWidth,s=t.increasedLineWidthForHitTesting,t=t.pointerEvents,o=((o||0)+(s||0))/2,s=Iu(r,r,e.x,e.y),e=ya(t,i,a),t=e[0],i=e[1];return t&&i||n?s<=r+o:t?s<=r:!!i&&r-o<=s&&s<=r+o}function qu(t,e,n,r){return t/(n*n)+e/(r*r)}function $u(t,e,n){var t=t.parsedStyle,r=t.rx,i=t.ry,a=t.fill,o=t.stroke,s=t.lineWidth,l=t.increasedLineWidthForHitTesting,t=t.pointerEvents,c=e.x,e=e.y,t=ya(t,a,o),a=t[0],o=t[1],t=((s||0)+(l||0))/2,s=(c-r)*(c-r),l=(e-i)*(e-i);return a&&o||n?qu(s,l,r+t,i+t)<=1:a?qu(s,l,r,i)<=1:!!o&&1<=qu(s,l,r-t,i-t)&&qu(s,l,r+t,i+t)<=1}function Uu(t,e,n){var t=t.parsedStyle,r=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.lineWidth,l=t.increasedLineWidthForHitTesting,c=t.defX,u=t.defY;return!(!ya(t.pointerEvents,t.fill,t.stroke)[1]&&!n||!s)&&Fu(r,i,a,o,(s||0)+(l||0),e.x+(void 0===c?0:c),e.y+(void 0===u?0:u))}function Xu(t,e,n,r,i){var a=t.parsedStyle,o=a.lineWidth,s=a.increasedLineWidthForHitTesting,l=a.stroke,c=a.fill,u=a.defX,u=void 0===u?0:u,h=a.defY,h=void 0===h?0:h,f=a.path,a=a.pointerEvents,d=f.segments,p=f.hasArc,g=f.polylines,f=f.polygons,a=ya(a,(null==f?void 0:f.length)&&c,l),c=a[0],l=a[1],a=aa(t),m=!1;return c||n?p?r(i,t,e):Hu(f,e.x+u,e.y+h)||Hu(g,e.x+u,e.y+h):l||n?function(t,e,n,r,i){for(var a=!1,o=e/2,s=0;s<t.length;s++){var l=t[s],c=l.currentPoint,u=l.params,h=l.prePoint,f=l.box;if(!f||Bu(f.x-o,f.y-o,f.width+e,f.height+e,n,r))switch(l.command){case"L":case"Z":if(a=Fu(h[0],h[1],c[0],c[1],e,n,r))return!0;break;case"Q":if(a=Tu.pointDistance(h[0],h[1],u[1],u[2],u[3],u[4],n,r)<=e/2)return!0;break;case"C":if(a=Ru.pointDistance(h[0],h[1],u[1],u[2],u[3],u[4],u[5],u[6],n,r,i)<=e/2)return!0;break;case"A":l.cubicParams||(l.cubicParams=Oe(h[0],h[1],u[1],u[2],u[3],u[4],u[5],u[6],u[7],void 0));for(var d=l.cubicParams,p=h,g=0;g<d.length;g+=6){var m=Ru.pointDistance(p[0],p[1],d[g],d[g+1],d[g+2],d[g+3],d[g+4],d[g+5],n,r,i),p=[d[g+4],d[g+5]];if(a=m<=e/2)return!0}}}return a}(d,(o||0)+(s||0),e.x+u,e.y+h,a):m}function Ku(t,e,n){var t=t.parsedStyle,r=t.stroke,i=t.fill,a=t.lineWidth,o=t.increasedLineWidthForHitTesting,s=t.points,l=t.defX,l=void 0===l?0:l,c=t.defY,c=void 0===c?0:c,t=ya(t.pointerEvents,i,r),i=t[0],r=!1;return r=(r=t[1]||n?zu(s.points,(a||0)+(o||0),e.x+l,e.y+c,!0):r)||!i&&!n?r:Yu(s.points,e.x+l,e.y+c)}function Zu(t,e,n){var t=t.parsedStyle,r=t.lineWidth,i=t.increasedLineWidthForHitTesting,a=t.points,o=t.defX,s=t.defY;return!(!ya(t.pointerEvents,t.fill,t.stroke)[1]&&!n||!r)&&zu(a.points,(r||0)+(i||0),e.x+(void 0===o?0:o),e.y+(void 0===s?0:s),!1)}function Qu(t,e,n,r,i){var a,o,s,l,c,u,h,f,d,p=t.parsedStyle,g=p.radius,m=p.fill,v=p.stroke,y=p.lineWidth,b=p.increasedLineWidthForHitTesting,x=p.width,w=p.height,p=ya(p.pointerEvents,m,v),m=p[0],v=p[1],p=(y||0)+(b||0);return g&&g.some(function(t){return 0!==t})?(y=!1,(v||n)&&(h=b=0,l=x,u=w,g=g.map(function(t){return Xe(t,0,Math.min(Math.abs(x)/2,Math.abs(w)/2))}),d=p,a=e.x,o=e.y,f=g[0],s=g[1],c=g[2],g=g[3],y=Fu(b+f,h,b+l-s,h,d,a,o)||Fu(b+l,h+s,b+l,h+u-c,d,a,o)||Fu(b+l-c,h+u,b+g,h+u,d,a,o)||Fu(b,h+u-g,b,h+f,d,a,o)||Du(b+l-s,h+s,s,Math.PI,Math.PI,d,a,o)||Du(b+l-c,h+u-c,c,0,Math.PI,d,a,o)||Du(b+g,h+u-g,g,Math.PI,Math.PI,d,a,o)||Du(b+f,h+f,f,Math.PI,Math.PI,d,a,o)),y||!m&&!n?y:r(i,t,e)):(s=p/2,m&&v||n?Bu(0-s,0-s,x+s,w+s,e.x,e.y):m?Bu(0,0,x,w,e.x,e.y):!!v&&(c=l=0,u=x,g=w,b=p,h=e.x,f=e.y,Bu(l-(d=b/2),c-d,u,b,h,f)||Bu(l+u-d,c-d,b,g,h,f)||Bu(l+d,c+g-d,u,b,h,f)||Bu(l-d,c+d,b,g,h,f)))}var Ju=function(i){var t;function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).name="canvas-picker",t}t=i,(n=e).prototype=Object.create(t.prototype),uu(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){function t(){return!0}(e={})[E.CIRCLE]=Vu,e[E.ELLIPSE]=$u,e[E.RECT]=Qu,e[E.LINE]=Uu,e[E.POLYLINE]=Zu,e[E.POLYGON]=Ku,e[E.PATH]=Xu,e[E.TEXT]=t,e[E.GROUP]=null,e[E.IMAGE]=t,e[E.HTML]=null,e[E.MESH]=null;var e;this.context.pointInPathPickerFactory=e,this.addRenderingPlugin(new vu)},n.destroy=function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()},e}(dl);function th(){th=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return k()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===h)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(M([]))),m=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function v(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function y(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function M(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:k}}function k(){return{value:void 0,done:!0}}return c(m,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(m),t},o.awrap=function(t){return{__await:t}},v(y.prototype),a(y.prototype,n,function(){return this}),o.AsyncIterator=y,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new y(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},v(m),a(m,i,"Generator"),a(m,r,function(){return this}),a(m,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=M,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:M(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},o}function eh(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function nh(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){eh(r,e,n,i,a,"next",t)}function a(t){eh(r,e,n,i,a,"throw",t)}i(void 0)})}}function rh(){return(rh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function ih(t,e){return(ih=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var ah=function(){function r(t){this.canvasRendererPluginOptions=void 0,this.context=void 0,this.pathGeneratorFactory=void 0,this.rBush=void 0,this.removedRBushNodeAABBs=[],this.renderQueue=[],this.restoreStack=[],this.clearFullScreen=!1,this.vpMatrix=J(),this.dprMatrix=J(),this.tmpMat4=J(),this.vec3a=v(),this.vec3b=v(),this.vec3c=v(),this.vec3d=v(),this.canvasRendererPluginOptions=t}var t=r.prototype;return t.apply=function(t,c){function a(t){(t=t.target.rBushNode).aabb&&h.removedRBushNodeAABBs.push(t.aabb)}function o(t){(t=t.target.rBushNode).aabb&&h.removedRBushNodeAABBs.push(t.aabb)}function u(t,e){t.isVisible()&&!t.isCulled()&&(h.renderDisplayObject(t,e,h.context,h.restoreStack,c),h.saveDirtyAABB(t)),(t.sortable.sorted||t.childNodes).forEach(function(t){u(t,e)})}var h=this,f=(this.context=t).config,d=t.camera,l=t.renderingService,p=t.renderingContext,e=t.rBushRoot,n=t.pathGeneratorFactory,g=(this.rBush=e,this.pathGeneratorFactory=n,t.contextService),m=p.root.ownerDocument.defaultView;l.hooks.init.tapPromise(r.tag,nh(th().mark(function t(){var e,n,r,i;return th().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:m.addEventListener(x.UNMOUNTED,a),m.addEventListener(x.CULLED,o),e=g.getDPR(),n=f.width,r=f.height,i=g.getContext(),h.clearRect(i,0,0,n*e,r*e,f.background);case 6:case"end":return t.stop()}},t)}))),l.hooks.destroy.tap(r.tag,function(){m.removeEventListener(x.UNMOUNTED,a),m.removeEventListener(x.CULLED,o)}),l.hooks.beginFrame.tap(r.tag,function(){var t=g.getContext(),e=g.getDPR(),n=f.width,r=f.height,i=h.canvasRendererPluginOptions,a=i.dirtyObjectNumThreshold,i=i.dirtyObjectRatioThreshold,o=l.getStats(),s=o.total,o=o.rendered,s=o/s;h.clearFullScreen=l.disableDirtyRectangleRendering()||a<o&&i<s,t&&(t.resetTransform?t.resetTransform():t.setTransform(1,0,0,1,0,0),h.clearFullScreen)&&h.clearRect(t,0,0,n*e,r*e,f.background)});l.hooks.endFrame.tap(r.tag,function(){var e=g.getContext(),t=g.getDPR();if(vt(h.dprMatrix,[t,t,1]),ht(h.vpMatrix,h.dprMatrix,d.getOrthoMatrix()),h.clearFullScreen)u(p.root,e);else{t=h.safeMergeAABB.apply(h,[h.mergeDirtyAABBs(h.renderQueue)].concat(h.removedRBushNodeAABBs.map(function(t){var e=t.minX,n=t.minY,r=t.maxX,t=t.maxY,i=new Xo;return i.setMinMax([e,n,0],[r,t,0]),i})));if(h.removedRBushNodeAABBs=[],Xo.isEmpty(t))return void(h.renderQueue=[]);var n=h.convertAABB2Rect(t),r=n.x,i=n.y,a=n.width,n=n.height,o=Gt(h.vec3a,[r,i,0],h.vpMatrix),s=Gt(h.vec3b,[r+a,i,0],h.vpMatrix),l=Gt(h.vec3c,[r,i+n,0],h.vpMatrix),r=Gt(h.vec3d,[r+a,i+n,0],h.vpMatrix),a=Math.min(o[0],s[0],r[0],l[0]),i=Math.min(o[1],s[1],r[1],l[1]),n=Math.max(o[0],s[0],r[0],l[0]),o=Math.max(o[1],s[1],r[1],l[1]),s=Math.floor(a),r=Math.floor(i),l=Math.ceil(n-a),n=Math.ceil(o-i);e.save(),h.clearRect(e,s,r,l,n,f.background),e.beginPath(),e.rect(s,r,l,n),e.clip(),e.setTransform(h.vpMatrix[0],h.vpMatrix[1],h.vpMatrix[4],h.vpMatrix[5],h.vpMatrix[12],h.vpMatrix[13]),f.renderer.getConfig().enableDirtyRectangleRenderingDebug&&m.dispatchEvent(new cs(Ml.DIRTY_RECTANGLE,{dirtyRect:{x:s,y:r,width:l,height:n}})),h.searchDirtyObjects(t).sort(function(t,e){return t.sortable.renderOrder-e.sortable.renderOrder}).forEach(function(t){t&&t.isVisible()&&!t.isCulled()&&h.renderDisplayObject(t,e,h.context,h.restoreStack,c)}),e.restore(),h.renderQueue.forEach(function(t){h.saveDirtyAABB(t)}),h.renderQueue=[]}h.restoreStack.forEach(function(){e.restore()}),h.restoreStack=[]}),l.hooks.render.tap(r.tag,function(t){h.clearFullScreen||h.renderQueue.push(t)})},t.clearRect=function(t,e,n,r,i,a){t.clearRect(e,n,r,i),a&&(t.fillStyle=a,t.fillRect(e,n,r,i))},t.renderDisplayObject=function(t,e,n,r,i){var a,o=t.nodeName,s=r[r.length-1],s=(!s||t.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_CONTAINS||(e.restore(),r.pop()),this.context.styleRendererFactory[o]),o=this.pathGeneratorFactory[o],l=t.parsedStyle.clipPath;l&&(this.applyWorldTransform(e,l),a=this.pathGeneratorFactory[l.nodeName])&&(e.save(),r.push(t),e.beginPath(),a(e,l.parsedStyle),e.closePath(),e.clip()),s&&(this.applyWorldTransform(e,t),e.save(),this.applyAttributesToContext(e,t)),o&&(e.beginPath(),o(e,t.parsedStyle),t.nodeName!==E.LINE)&&t.nodeName!==E.PATH&&t.nodeName!==E.POLYLINE&&e.closePath(),s&&(s.render(e,t.parsedStyle,t,n,this,i),e.restore()),t.renderable.dirty=!1},t.convertAABB2Rect=function(t){var e=t.getMin(),t=t.getMax(),n=Math.floor(e[0]),e=Math.floor(e[1]);return{x:n,y:e,width:Math.ceil(t[0])-n,height:Math.ceil(t[1])-e}},t.mergeDirtyAABBs=function(t){var n=new Xo;return t.forEach(function(t){var e=t.getRenderBounds(),e=(n.add(e),t.renderable.dirtyRenderBounds);e&&n.add(e)}),n},t.searchDirtyObjects=function(t){var e=t.getMin(),n=e[0],e=e[1],t=t.getMax(),r=t[0],t=t[1];return this.rBush.search({minX:n,minY:e,maxX:r,maxY:t}).map(function(t){return t.displayObject})},t.saveDirtyAABB=function(t){var e=t.renderable,t=(e.dirtyRenderBounds||(e.dirtyRenderBounds=new Xo),t.getRenderBounds());t&&e.dirtyRenderBounds.update(t.center,t.halfExtents)},t.applyAttributesToContext=function(t,e){var n=e.parsedStyle,r=n.stroke,i=n.fill,a=n.opacity,o=n.lineDash,n=n.lineDashOffset;o&&t.setLineDash(o),_(n)||(t.lineDashOffset=n),_(a)||(t.globalAlpha*=a),_(r)||Array.isArray(r)||r.isNone||(t.strokeStyle=e.attributes.stroke),_(i)||Array.isArray(i)||i.isNone||(t.fillStyle=e.attributes.fill)},t.applyWorldTransform=function(t,e,n){var r=0,i=0,a=(e.parsedStyle||{}).anchor,o=a&&a[0]||0,a=a&&a[1]||0;0===o&&0===a||(r=-o*((o=e.geometry.contentBounds)&&2*o.halfExtents[0]||0),i=-a*(o&&2*o.halfExtents[1]||0)),n?(et(this.tmpMat4,e.getLocalTransform()),this.vec3a[0]=r,this.vec3a[1]=i,this.vec3a[2]=0,ft(this.tmpMat4,this.tmpMat4,this.vec3a),ht(this.tmpMat4,n,this.tmpMat4)):(et(this.tmpMat4,e.getWorldTransform()),this.vec3a[0]=r,this.vec3a[1]=i,this.vec3a[2]=0,ft(this.tmpMat4,this.tmpMat4,this.vec3a)),ht(this.tmpMat4,this.vpMatrix,this.tmpMat4),t.setTransform(this.tmpMat4[0],this.tmpMat4[1],this.tmpMat4[4],this.tmpMat4[5],this.tmpMat4[12],this.tmpMat4[13])},t.safeMergeAABB=function(){for(var e=new Xo,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(t){e.add(t)}),e},r}(),oh=(ah.tag="CanvasRenderer",function(){function t(t){this.imagePool=void 0,this.imagePool=t}var e=t.prototype;return e.render=function(t,e,n,r,i,a){var o=e.fill,s=e.fillRule,l=e.opacity,c=e.fillOpacity,u=e.stroke,h=e.strokeOpacity,f=e.lineWidth,d=e.lineCap,p=e.lineJoin,g=e.shadowType,m=e.shadowColor,v=e.shadowBlur,y=e.filter,e=e.miterLimit,b=!_(o)&&!o.isNone,x=!_(u)&&!u.isNone&&0<f,w=0===o.alpha,y=!(!y||!y.length),m=!_(m)&&0<v,v=n.nodeName,g="inner"===g,v=x&&m&&(v===E.PATH||v===E.LINE||v===E.POLYLINE||w||g);b&&(t.globalAlpha=l*c,v||sh(n,t,m),this.fill(t,n,o,s,r,i,a),v||this.clearShadowAndFilter(t,y,m)),x&&(t.globalAlpha=l*h,t.lineWidth=f,_(e)||(t.miterLimit=e),_(d)||(t.lineCap=d),_(p)||(t.lineJoin=p),v&&(g&&(t.globalCompositeOperation="source-atop"),sh(n,t,!0),g)&&(this.stroke(t,n,u,r,i,a),t.globalCompositeOperation="source-over",this.clearShadowAndFilter(t,y,!0)),this.stroke(t,n,u,r,i,a))},e.clearShadowAndFilter=function(t,e,n){n&&(t.shadowColor="transparent",t.shadowBlur=0),e&&(n=t.filter,!_(n))&&-1<n.indexOf("drop-shadow")&&(t.filter=n.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")},e.fill=function(e,n,t,r,i,a,o){var s=this;Array.isArray(t)?t.forEach(function(t){e.fillStyle=s.getColor(t,n,e),r?e.fill(r):e.fill()}):(Va(t)&&(e.fillStyle=this.getPattern(t,n,e,i,a,o)),r?e.fill(r):e.fill())},e.stroke=function(e,n,t,r,i,a){var o=this;Array.isArray(t)?t.forEach(function(t){e.strokeStyle=o.getColor(t,n,e),e.stroke()}):(Va(t)&&(e.strokeStyle=this.getPattern(t,n,e,r,i,a)),e.stroke())},e.getPattern=function(t,e,n,r,i,a){var o,s,l,c,u,h,f;return"rect"===t.image.nodeName&&(o=(s=t.image.parsedStyle).width,s=s.height,l=r.contextService.getDPR(),c=r.config.offscreenCanvas,(u=a.offscreenCanvas.getOrCreateCanvas(c)).width=o*l,u.height=s*l,h=a.offscreenCanvas.getOrCreateContext(c),f=[],t.image.forEach(function(t){i.renderDisplayObject(t,h,r,f,a)}),f.forEach(function(){h.restore()})),this.imagePool.getOrCreatePatternSync(t,n,u,l,function(){e.renderable.dirty=!0,r.renderingService.dirtify()})},e.getColor=function(t,e,n){var r;return t.type!==Ir.LinearGradient&&t.type!==Ir.RadialGradient||(r=(e=e.getGeometryBounds())&&2*e.halfExtents[0]||1,e=e&&2*e.halfExtents[1]||1,r=this.imagePool.getOrCreateGradient(rh({type:t.type},t.value,{width:r,height:e}),n)),r},t}());function sh(t,e,n){var r=t.parsedStyle,i=r.filter,a=r.shadowColor,o=r.shadowBlur,s=r.shadowOffsetX,r=r.shadowOffsetY;i&&i.length&&(e.filter=t.style.filter),n&&(e.shadowColor=a.toString(),e.shadowBlur=o||0,e.shadowOffsetX=s||0,e.shadowOffsetY=r||0)}var lh=function(){function t(t){this.imagePool=void 0,this.imagePool=t}return t.prototype.render=function(t,e,n){var r=e.width,i=e.height,a=e.img,o=e.shadowColor,e=e.shadowBlur,a=Ue(a)?this.imagePool.getImageSync(a):(r=r||a.width,i=i||a.height,a);if(a){sh(n,t,!_(o)&&0<e);try{t.drawImage(a,0,0,r,i)}catch(t){}}},t}(),ch=function(){function t(){}var e=t.prototype;return e.render=function(t,e,n){var r=e.lineWidth,i=e.textAlign,a=e.textBaseline,o=e.lineJoin,s=e.miterLimit,l=e.letterSpacing,c=e.stroke,u=e.fill,h=e.fillOpacity,f=e.strokeOpacity,d=e.opacity,p=e.metrics,g=e.dx,m=e.dy,v=e.shadowColor,e=e.shadowBlur,y=p.font,b=p.lines,x=p.height,w=p.lineHeight,M=p.lineMetrics,p=(t.font=y,t.lineWidth=r,t.textAlign="middle"===i?"center":i,a),k=(A.enableCSSParsing||"alphabetic"!==p||(p="bottom"),t.lineJoin=o,_(s)||(t.miterLimit=s),0),E=("middle"===a?k=-x/2-w/2:"bottom"===a||"alphabetic"===a||"ideographic"===a?k=-x:"top"!==a&&"hanging"!==a||(k=-w),g||0),y=(k+=m||0,1===b.length&&("bottom"===p?(p="middle",k-=.5*x):"top"===p&&(p="middle",k+=.5*x)),t.textBaseline=p,!_(v)&&0<e);sh(n,t,y);for(var O=0;O<b.length;O++){var S=r/2+E;k+=w,_(c)||c.isNone||!r||this.drawLetterSpacing(t,b[O],M[O],i,S,k,l,h,f,d,!0),_(u)||this.drawLetterSpacing(t,b[O],M[O],i,S,k,l,h,f,d)}},e.drawLetterSpacing=function(t,e,n,r,i,a,o,s,l,c,u){if(void 0===u&&(u=!1),0===o)u?this.strokeText(t,e,i,a,l):this.fillText(t,e,i,a,s,c);else{for(var h=t.textAlign,f=(t.textAlign="left",i),d=("center"===r||"middle"===r?f=i-n.width/2:"right"!==r&&"end"!==r||(f=i-n.width),Array.from(e)),p=t.measureText(e).width,g=0;g<d.length;++g){var m=d[g];u?this.strokeText(t,m,f,a,l):this.fillText(t,m,f,a,s,c),f+=p-(m=t.measureText(e.substring(g+1)).width)+o,p=m}t.textAlign=h}},e.fillText=function(t,e,n,r,i,a){var o,s=!_(i)&&1!==i;s&&(o=t.globalAlpha,t.globalAlpha=i*a),t.fillText(e,n,r),s&&(t.globalAlpha=o)},e.strokeText=function(t,e,n,r,i){var a,o=!_(i)&&1!==i;o&&(a=t.globalAlpha,t.globalAlpha=i),t.strokeText(e,n,r),o&&(t.globalAlpha=a)},t}(),uh=function(n){var t;function e(t){var e;return void 0===t&&(t={}),(e=n.call(this)||this).options=void 0,e.name="canvas-renderer",e.options=t,e}t=n,(r=e).prototype=Object.create(t.prototype),ih(r.prototype.constructor=r,t);var r=e.prototype;return r.init=function(){var t,e=rh({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),n=this.context.imagePool,r=new oh(n),n=((t={})[E.CIRCLE]=r,t[E.ELLIPSE]=r,t[E.RECT]=r,t[E.IMAGE]=new lh(n),t[E.TEXT]=new ch,t[E.LINE]=r,t[E.POLYLINE]=r,t[E.POLYGON]=r,t[E.PATH]=r,t[E.GROUP]=void 0,t[E.HTML]=void 0,t[E.MESH]=void 0,t);this.context.defaultStyleRendererFactory=n,this.context.styleRendererFactory=n,this.addRenderingPlugin(new ah(e))},r.destroy=function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory},e}(dl);function hh(){hh=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return k()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===h)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(M([]))),m=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function v(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function y(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function M(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:k}}function k(){return{value:void 0,done:!0}}return c(m,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(m),t},o.awrap=function(t){return{__await:t}},v(y.prototype),a(y.prototype,n,function(){return this}),o.AsyncIterator=y,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new y(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},v(m),a(m,i,"Generator"),a(m,r,function(){return this}),a(m,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=M,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:M(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},o}function fh(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function dh(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){fh(r,e,n,i,a,"next",t)}function a(t){fh(r,e,n,i,a,"throw",t)}i(void 0)})}}function ph(t,e){return(ph=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var gh=function(){function r(){this.context=void 0}return r.prototype.apply=function(t,i){function a(t){e.hooks.pointerWheel.call(t)}function o(t){e.hooks.click.call(t)}var s=this,e=t.renderingService,n=t.renderingContext,l=t.config,c=(this.context=t,n.root.ownerDocument.defaultView),u=function(t){e.hooks.pointerMove.call(t)},h=function(t){e.hooks.pointerUp.call(t)},f=function(t){e.hooks.pointerDown.call(t)},d=function(t){e.hooks.pointerOver.call(t)},p=function(t){e.hooks.pointerOut.call(t)},g=function(t){e.hooks.pointerCancel.call(t)};e.hooks.init.tapPromise(r.tag,dh(hh().mark(function t(){var r;return hh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r=s.context.contextService.getDomElement(),i.globalThis.navigator.msPointerEnabled?(r.style.msContentZooming="none",r.style.msTouchAction="none"):c.supportsPointerEvents&&(r.style.touchAction="none"),c.supportsPointerEvents?(n=r,i.globalThis.document.addEventListener("pointermove",u,!0),n.addEventListener("pointerdown",f,!0),n.addEventListener("pointerleave",p,!0),n.addEventListener("pointerover",d,!0),i.globalThis.addEventListener("pointerup",h,!0),i.globalThis.addEventListener("pointercancel",g,!0)):(n=r,i.globalThis.document.addEventListener("mousemove",u,!0),n.addEventListener("mousedown",f,!0),n.addEventListener("mouseout",p,!0),n.addEventListener("mouseover",d,!0),i.globalThis.addEventListener("mouseup",h,!0)),c.supportsTouchEvents&&((e=r).addEventListener("touchstart",f,!0),e.addEventListener("touchend",h,!0),e.addEventListener("touchmove",u,!0),e.addEventListener("touchcancel",g,!0)),l.useNativeClickEvent&&r.addEventListener("click",o,!0),r.addEventListener("wheel",a,{passive:!0,capture:!0});case 6:case"end":return t.stop()}var e,n},t)}))),e.hooks.destroy.tap(r.tag,function(){var t,e,n=s.context.contextService.getDomElement();i.globalThis.navigator.msPointerEnabled?(n.style.msContentZooming="",n.style.msTouchAction=""):c.supportsPointerEvents&&(n.style.touchAction=""),c.supportsPointerEvents?(t=n,i.globalThis.document.removeEventListener("pointermove",u,!0),t.removeEventListener("pointerdown",f,!0),t.removeEventListener("pointerleave",p,!0),t.removeEventListener("pointerover",d,!0),i.globalThis.removeEventListener("pointerup",h,!0)):(t=n,i.globalThis.document.removeEventListener("mousemove",u,!0),t.removeEventListener("mousedown",f,!0),t.removeEventListener("mouseout",p,!0),t.removeEventListener("mouseover",d,!0),i.globalThis.removeEventListener("mouseup",h,!0)),c.supportsTouchEvents&&((e=n).removeEventListener("touchstart",f,!0),e.removeEventListener("touchend",h,!0),e.removeEventListener("touchmove",u,!0),e.removeEventListener("touchcancel",g,!0)),l.useNativeClickEvent&&n.removeEventListener("click",o,!0),n.removeEventListener("wheel",a,!0)})},r}(),mh=(gh.tag="DOMInteraction",function(i){var t;function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).name="dom-interaction",t}t=i,(n=e).prototype=Object.create(t.prototype),ph(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.addRenderingPlugin(new gh)},n.destroy=function(){this.removeAllRenderingPlugins()},e}(dl));function vh(){vh=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return k()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===h)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(M([]))),m=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function v(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function y(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function M(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:k}}function k(){return{value:void 0,done:!0}}return c(m,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(m),t},o.awrap=function(t){return{__await:t}},v(y.prototype),a(y.prototype,n,function(){return this}),o.AsyncIterator=y,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new y(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},v(m),a(m,i,"Generator"),a(m,r,function(){return this}),a(m,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=M,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:M(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},o}function yh(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function bh(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){yh(r,e,n,i,a,"next",t)}function a(t){yh(r,e,n,i,a,"throw",t)}i(void 0)})}}function xh(t,e){return(xh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var wh=function(){function f(){this.context=void 0,this.$camera=void 0}var t=f.prototype;return t.joinTransformMatrix=function(t){return"matrix("+[t[0],t[1],t[4],t[5],t[12],t[13]].join(",")+")"},t.apply=function(t){function i(t,e){e.style.transform=s.joinTransformMatrix(t.getWorldTransform())}function e(t){var e,n,r=t.target;r.nodeName===E.HTML&&(s.$camera||(s.$camera=s.createCamera(l)),e=s.getOrCreateEl(r),s.$camera.appendChild(e),n=r.ownerDocument.documentElement.attributes,Object.keys(n).forEach(function(t){e.style[t]=n[t]}),Object.keys(r.attributes).forEach(function(t){s.updateAttribute(t,r)}),i(r,e),A.nativeHTMLMap.set(e,r))}function n(t){(t=t.target).nodeName===E.HTML&&s.$camera&&(t=s.getOrCreateEl(t))&&(t.remove(),A.nativeHTMLMap.delete(t))}function r(t){var e=t.target;e.nodeName===E.HTML&&(t=t.attrName,s.updateAttribute(t,e))}function a(t){var e;(t=t.target).nodeName===E.HTML&&(e=s.getOrCreateEl(t),i(t,e))}function o(){var t,e;s.$camera&&(t=(e=s.context.config).width,e=e.height,s.$camera.style.width=(t||0)+"px",s.$camera.style.height=(e||0)+"px")}var s=this,l=t.camera,c=t.renderingContext,u=t.renderingService,h=(this.context=t,c.root.ownerDocument.defaultView);u.hooks.init.tapPromise(f.tag,bh(vh().mark(function t(){return vh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:h.addEventListener(Ml.RESIZE,o),h.addEventListener(x.MOUNTED,e),h.addEventListener(x.UNMOUNTED,n),h.addEventListener(x.ATTR_MODIFIED,r),h.addEventListener(x.BOUNDS_CHANGED,a);case 5:case"end":return t.stop()}},t)}))),u.hooks.endFrame.tap(f.tag,function(){s.$camera&&c.renderReasons.has(ol.CAMERA_CHANGED)&&(s.$camera.style.transform=s.joinTransformMatrix(l.getOrthoMatrix()))}),u.hooks.destroy.tap(f.tag,function(){s.$camera&&s.$camera.remove(),h.removeEventListener(Ml.RESIZE,o),h.removeEventListener(x.MOUNTED,e),h.removeEventListener(x.UNMOUNTED,n),h.removeEventListener(x.ATTR_MODIFIED,r),h.removeEventListener(x.BOUNDS_CHANGED,a)})},t.getId=function(t){return t.id||"g-html-"+t.entity},t.createCamera=function(t){var e,n,r=this.context.config,i=r.document,a=r.width,r=r.height,o=this.context.contextService.getDomElement(),s=o.parentNode;return s?((n=s.querySelector("#"+(e="g-canvas-camera")))||((n=i=(i||document).createElement("div")).id=e,i.style.position="absolute",i.style.left=(o.offsetLeft||0)+"px",i.style.top=(o.offsetTop||0)+"px",i.style.transformOrigin="left top",i.style.transform=this.joinTransformMatrix(t.getOrthoMatrix()),i.style.overflow="hidden",i.style.pointerEvents="none",i.style.width=(a||0)+"px",i.style.height=(r||0)+"px",s.appendChild(i)),n):null},t.getOrCreateEl=function(t){var e=this.context.config.document,n=this.getId(t),r=this.$camera.querySelector("#"+n);return r||(r=(e||document).createElement("div"),(t.parsedStyle.$el=r).id=n,t.name&&r.setAttribute("name",t.name),t.className&&(r.className=t.className),r.style.position="absolute",r.style.left="0px",r.style.top="0px",r.style["will-change"]="transform",r.style.transform=this.joinTransformMatrix(t.getWorldTransform())),r},t.updateAttribute=function(t,e){var n=this.getOrCreateEl(e);switch(t){case"innerHTML":var r=e.parsedStyle.innerHTML;Ue(r)?n.innerHTML=r:(n.innerHTML="",n.appendChild(r));break;case"transformOrigin":var r=e.parsedStyle.transformOrigin;n.style["transform-origin"]=r[0].value+" "+r[1].value;break;case"width":A.enableCSSParsing?(r=e.computedStyleMap().get("width"),n.style.width=r.toString()):(r=e.parsedStyle.width,n.style.width=Ke(r)?r+"px":r.toString());break;case"height":A.enableCSSParsing?(r=e.computedStyleMap().get("height"),n.style.height=r.toString()):(r=e.parsedStyle.height,n.style.height=Ke(r)?r+"px":r.toString());break;case"zIndex":r=e.parsedStyle.zIndex;n.style["z-index"]=""+r;break;case"visibility":r=e.parsedStyle.visibility;n.style.visibility=r;break;case"pointerEvents":r=e.parsedStyle.pointerEvents;n.style.pointerEvents=r;break;case"opacity":r=e.parsedStyle.opacity;n.style.opacity=""+r;break;case"fill":var r=e.parsedStyle.fill,i="";qa(r)?i=r.isNone?"transparent":e.getAttribute("fill"):Array.isArray(r)?i=e.getAttribute("fill"):Va(r),n.style.background=i;break;case"stroke":r=e.parsedStyle.stroke,i="";qa(r)?i=r.isNone?"transparent":e.getAttribute("stroke"):Array.isArray(r)?i=e.getAttribute("stroke"):Va(r),n.style["border-color"]=i,n.style["border-style"]="solid";break;case"lineWidth":r=e.parsedStyle.lineWidth;n.style["border-width"]=(r||0)+"px";break;case"lineDash":n.style["border-style"]="dashed";break;case"filter":i=e.style.filter;n.style.filter=i}},f}(),Mh=(wh.tag="HTMLRendering",function(i){var t;function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).name="html-renderer",t}t=i,(n=e).prototype=Object.create(t.prototype),xh(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.addRenderingPlugin(new wh)},n.destroy=function(){this.removeAllRenderingPlugins()},e}(dl));function kh(){kh=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return k()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===h)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(M([]))),m=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function v(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function y(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function M(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:k}}function k(){return{value:void 0,done:!0}}return c(m,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(m),t},o.awrap=function(t){return{__await:t}},v(y.prototype),a(y.prototype,n,function(){return this}),o.AsyncIterator=y,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new y(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},v(m),a(m,i,"Generator"),a(m,r,function(){return this}),a(m,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=M,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:M(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},o}function Eh(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Oh(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Eh(r,e,n,i,a,"next",t)}function a(t){Eh(r,e,n,i,a,"throw",t)}i(void 0)})}}function Sh(t,e){return(Sh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var _h="undefined"!=typeof Float32Array?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var Ah=function(){function t(t){this.canvasConfig=void 0,this.imageCache={},this.gradientCache={},this.patternCache={},this.canvasConfig=t}var e=t.prototype;return e.getImageSync=function(t,e){return this.imageCache[t]?e&&e():this.getOrCreateImage(t).then(function(){e&&e()}),this.imageCache[t]},e.getOrCreateImage=function(r){var i,a=this;return this.imageCache[r]?Promise.resolve(this.imageCache[r]):(i=this.canvasConfig.createImage,new Promise(function(t,e){var n;i?n=i(r):ui&&(n=new window.Image),n&&(n.onload=function(){t(n)},n.onerror=function(t){e(t)},n.crossOrigin="Anonymous",n.src=r,a.imageCache[r]=n)}))},e.getOrCreatePatternSync=function(t,e,n,r,i){var a,o,s,l,c=this.generatePatternKey(t);return c&&this.patternCache[c]?this.patternCache[c]:(l=t.image,s=t.repetition,t=t.transform,a=!1,Ue(l)?o=this.getImageSync(l,i):n?(o=n,a=!0):o=l,(i=o&&e.createPattern(o,s))&&(e=t?Ri(Mo(t)):(n=new _h(16),_h!=Float32Array&&(n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0),n[0]=1,n[5]=1,n[10]=1,n[15]=1,(l=n)[0]=1,l[1]=0,l[2]=0,l[3]=0,l[4]=0,l[5]=1,l[6]=0,l[7]=0,l[8]=0,l[9]=0,l[10]=1,l[11]=0,l[12]=0,l[13]=0,l[14]=0,l[15]=1,l),a&&(s=o=e,n=(t=[1/r,1/r,1])[0],l=t[1],t=t[2],o[0]=s[0]*n,o[1]=s[1]*n,o[2]=s[2]*n,o[3]=s[3]*n,o[4]=s[4]*l,o[5]=s[5]*l,o[6]=s[6]*l,o[7]=s[7]*l,o[8]=s[8]*t,o[9]=s[9]*t,o[10]=s[10]*t,o[11]=s[11]*t,o[12]=s[12],o[13]=s[13],o[14]=s[14],o[15]=s[15]),i.setTransform({a:e[0],b:e[1],c:e[4],d:e[5],e:e[12],f:e[13]})),c&&i&&(this.patternCache[c]=i),i)},e.getOrCreateGradient=function(t,e){var r,n,i,a,o,s=this.generateGradientKey(t),l=t.type,c=t.steps,u=t.width,h=t.height,f=t.angle,d=t.cx,p=t.cy,t=t.size;return this.gradientCache[s]||(r=null,l===Ir.LinearGradient?(n=u,i=h,f=ki((f=f).value),a=0+n/2,o=0+i/2,n=Math.abs(n*Math.cos(f))+Math.abs(i*Math.sin(f)),i={x1:a-Math.cos(f)*n/2,y1:o-Math.sin(f)*n/2,x2:a+Math.cos(f)*n/2,y2:o+Math.sin(f)*n/2},r=e.createLinearGradient(i.x1,i.y1,i.x2,i.y2)):l===Ir.RadialGradient&&(a=u,o=h,f=p,n=t,l=(i=d).value,u=f.value,i.unit===g.kPercentage&&(l=i.value/100*a),f.unit===g.kPercentage&&(u=f.value/100*o),i=Math.max(_e([0,0],[l,u]),_e([0,o],[l,u]),_e([a,o],[l,u]),_e([a,0],[l,u])),n&&(n instanceof Kr?i=n.value:n instanceof zr&&("closest-side"===n.value?i=Math.min(l,a-l,u,o-u):"farthest-side"===n.value?i=Math.max(l,a-l,u,o-u):"closest-corner"===n.value&&(i=Math.min(_e([0,0],[l,u]),_e([0,o],[l,u]),_e([a,o],[l,u]),_e([a,0],[l,u]))))),r=e.createRadialGradient(p=(h={x:l,y:u,r:i}).x,t=h.y,0,p,t,h.r)),r&&(c.forEach(function(t){var e,n=t.offset,t=t.color;n.unit===g.kPercentage&&null!=(e=r)&&e.addColorStop(n.value/100,t.toString())}),this.gradientCache[s]=r)),this.gradientCache[s]},e.generateGradientKey=function(t){var e=t.type,n=t.width,r=t.height,i=t.steps,a=t.angle,o=t.cx,s=t.cy,t=t.size;return"gradient-"+e+"-"+((null==a?void 0:a.toString())||0)+"-"+((null==o?void 0:o.toString())||0)+"-"+((null==s?void 0:s.toString())||0)+"-"+((null==t?void 0:t.toString())||0)+"-"+n+"-"+r+"-"+i.map(function(t){return""+t.offset+t.color}).join("-")},e.generatePatternKey=function(t){var e=t.image,t=t.repetition;return Ue(e)?"pattern-"+e+"-"+t:"rect"===e.nodeName?"pattern-"+e.entity+"-"+t:void 0},t}(),Th=function(){function s(){}return s.prototype.apply=function(t){function e(t){var e=t.target,t=e.nodeName,n=e.attributes;t===E.IMAGE&&(t=n.img,Ue(t))&&a.getImageSync(t,function(){e.renderable.dirty=!0,r.dirtify()})}function n(t){var e=t.target,n=t.attrName,t=t.newValue;e.nodeName===E.IMAGE&&"img"===n&&Ue(t)&&a.getOrCreateImage(t).then(function(){e.renderable.dirty=!0,r.dirtify()})}var r=t.renderingService,i=t.renderingContext,a=t.imagePool,o=i.root.ownerDocument.defaultView;r.hooks.init.tapPromise(s.tag,Oh(kh().mark(function t(){return kh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:o.addEventListener(x.MOUNTED,e),o.addEventListener(x.ATTR_MODIFIED,n);case 2:case"end":return t.stop()}},t)}))),r.hooks.destroy.tap(s.tag,function(){o.removeEventListener(x.MOUNTED,e),o.removeEventListener(x.ATTR_MODIFIED,n)})},s}(),Ph=(Th.tag="LoadImage",function(i){var t;function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).name="image-loader",t}t=i,(n=e).prototype=Object.create(t.prototype),Sh(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.context.imagePool=new Ah(this.context.config),this.addRenderingPlugin(new Th)},n.destroy=function(){this.removeAllRenderingPlugins()},e}(dl));function Lh(){Lh=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return k()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===h)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(M([]))),m=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function v(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function y(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function M(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:k}}function k(){return{value:void 0,done:!0}}return c(m,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(m),t},o.awrap=function(t){return{__await:t}},v(y.prototype),a(y.prototype,n,function(){return this}),o.AsyncIterator=y,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new y(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},v(m),a(m,i,"Generator"),a(m,r,function(){return this}),a(m,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=M,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:M(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},o}function Ch(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Nh(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Ch(r,e,n,i,a,"next",t)}function a(t){Ch(r,e,n,i,a,"throw",t)}i(void 0)})}}function jh(t,e){t.prototype=Object.create(e.prototype),Rh(t.prototype.constructor=t,e)}function Rh(t,e){return(Rh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var Ih=function(){function t(t){this.$container=void 0,this.$canvas=void 0,this.dpr=void 0,this.context=void 0,this.canvasConfig=void 0,this.renderingContext=void 0,this.renderingContext=t.renderingContext,this.canvasConfig=t.config}var e=t.prototype;return e.init=function(){var t=Nh(Lh().mark(function t(){var e,n;return Lh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:n=this.canvasConfig,e=n.container,(n=n.canvas)?(this.$canvas=n,e&&n.parentElement!==e&&e.appendChild(n),this.$container=n.parentElement,this.canvasConfig.container=this.$container):e&&(this.$container=Ue(e)?document.getElementById(e):e,this.$container)&&(n=document.createElement("canvas"),this.$container.appendChild(n),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=n),this.context=this.$canvas.getContext("2d"),this.resize(this.canvasConfig.width,this.canvasConfig.height);case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),e.getContext=function(){return this.context},e.getDomElement=function(){return this.$canvas},e.getDPR=function(){return this.dpr},e.getBoundingClientRect=function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()},e.destroy=function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)},e.resize=function(t,e){var n=1<=(n=this.canvasConfig.devicePixelRatio||ui&&window.devicePixelRatio||1)?Math.ceil(n):1;this.dpr=n,this.$canvas&&(this.$canvas.width=this.dpr*t,this.$canvas.height=this.dpr*e,n=this.$canvas,t=t,e=e,ui)&&n.style&&(n.style.width=t+"px",n.style.height=e+"px"),this.renderingContext.renderReasons.add(ol.CAMERA_CHANGED)},e.applyCursorStyle=function(t){this.$container&&this.$container.style&&(this.$container.style.cursor=t)},e.toDataURL=function(){var e=Nh(Lh().mark(function t(e){var n,r;return Lh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=(r=e=void 0===e?{}:e).type,r=r.encoderOptions,t.abrupt("return",this.context.canvas.toDataURL(n,r));case 3:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),t}(),Bh=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).name="canvas-context-register",t}jh(t,i);var e=t.prototype;return e.init=function(){this.context.ContextService=Ih},e.destroy=function(){delete this.context.ContextService},t}(dl),Dh=function(e){function t(t){t=e.call(this,t)||this;return t.registerPlugin(new Bh),t.registerPlugin(new Ph),t.registerPlugin(new su),t.registerPlugin(new uh),t.registerPlugin(new mh),t.registerPlugin(new Ju),t.registerPlugin(new Mh),t}return jh(t,e),t}(fl);function Fh(){Fh=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return k()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===h)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(M([]))),m=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function v(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function y(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function M(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:k}}function k(){return{value:void 0,done:!0}}return c(m,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(m),t},o.awrap=function(t){return{__await:t}},v(y.prototype),a(y.prototype,n,function(){return this}),o.AsyncIterator=y,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new y(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},v(m),a(m,i,"Generator"),a(m,r,function(){return this}),a(m,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=M,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:M(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},o}function zh(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Gh(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){zh(r,e,n,i,a,"next",t)}function a(t){zh(r,e,n,i,a,"throw",t)}i(void 0)})}}function Wh(){return(Wh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Yh(t,e){return(Yh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var Hh=function(){function i(t){this.dragndropPluginOptions=void 0,this.dragndropPluginOptions=t}return i.prototype.apply=function(t){function e(t){var a,o,s,l,c,e,u=t.target,h=u===p,f=h&&d.dragndropPluginOptions.isDocumentDraggable?p:u.closest&&u.closest("[draggable=true]");f&&(a=!1,o=t.timeStamp,s=[t.clientX,t.clientY],l=null,c=[t.clientX,t.clientY],e=function(){var e=Gh(Fh().mark(function t(e){var n,r,i;return Fh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a)t.next=8;else{if(n=e.timeStamp-o,r=_e([e.clientX,e.clientY],s),n<=d.dragndropPluginOptions.dragstartTimeThreshold||r<=d.dragndropPluginOptions.dragstartDistanceThreshold)return t.abrupt("return");t.next=5}break;case 5:e.type="dragstart",f.dispatchEvent(e),a=!0;case 8:if(e.type="drag",e.dx=e.clientX-c[0],e.dy=e.clientY-c[1],f.dispatchEvent(e),c=[e.clientX,e.clientY],h){t.next=21;break}return n="pointer"===d.dragndropPluginOptions.overlap?[e.canvasX,e.canvasY]:u.getBounds().center,t.next=17,p.elementsFromPoint(n[0],n[1]);case 17:r=t.sent,i=r[r.indexOf(u)+1],i=(null==i?void 0:i.closest("[droppable=true]"))||(d.dragndropPluginOptions.isDocumentDroppable?p:null),l!==i&&(l&&(e.type="dragleave",(e.target=l).dispatchEvent(e)),i&&(e.type="dragenter",(e.target=i).dispatchEvent(e)),l=i)&&(e.type="dragover",(e.target=l).dispatchEvent(e));case 21:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),r.addEventListener("pointermove",e),u.addEventListener("pointerup",t=function(t){a&&(t.detail={preventClick:!0},t=t.clone(),l&&(t.type="drop",(t.target=l).dispatchEvent(t)),t.type="dragend",f.dispatchEvent(t),a=!1),r.removeEventListener("pointermove",e)},{once:!0}),u.addEventListener("pointerupoutside",t,{once:!0}))}var d=this,n=t.renderingService,p=t.renderingContext.root.ownerDocument,r=p.defaultView;n.hooks.init.tapPromise(i.tag,Gh(Fh().mark(function t(){return Fh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r.addEventListener("pointerdown",e);case 1:case"end":return t.stop()}},t)}))),n.hooks.destroy.tap(i.tag,function(){r.removeEventListener("pointerdown",e)})},i}(),Vh=(Hh.tag="Dragndrop",function(n){var t;function e(t){var e;return void 0===t&&(t={}),(e=n.call(this)||this).options=void 0,e.name="dragndrop",e.options=t,e}t=n,(r=e).prototype=Object.create(t.prototype),Yh(r.prototype.constructor=r,t);var r=e.prototype;return r.init=function(){this.addRenderingPlugin(new Hh(Wh({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))},r.destroy=function(){this.removeAllRenderingPlugins()},r.setOptions=function(t){Object.assign(this.plugins[0].dragndropPluginOptions,t)},e}(dl)),qh=($h.prototype.on=function(t,e,n){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!n}),this},$h.prototype.once=function(t,e){return this.on(t,e,!0)},$h.prototype.emit=function(a){for(var o=this,s=[],t=1;t<arguments.length;t++)s[t-1]=arguments[t];function e(t){for(var e,n,r=t.length,i=0;i<r;i++)t[i]&&(n=(e=t[i]).callback,e.once&&(t.splice(i,1),0===t.length&&delete o._events[a],r--,i--),n.apply(o,s))}var n=this._events[a]||[],r=this._events["*"]||[];e(n),e(r)},$h.prototype.off=function(t,e){if(t)if(e){for(var n=this._events[t]||[],r=n.length,i=0;i<r;i++)n[i].callback===e&&(n.splice(i,1),r--,i--);0===n.length&&delete this._events[t]}else delete this._events[t];else this._events={};return this},$h.prototype.getEvents=function(){return this._events},$h);function $h(){this._events={}}const Uh=()=>[["cartesian"]],Xh=(Uh.props={},(t={})=>{var e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)}),Kh=t=>{var{startAngle:t,endAngle:e,innerRadius:n,outerRadius:r}=Xh(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",t,e,n,r]]},Zh=(Kh.props={},({startAngle:t=0,endAngle:e=6*Math.PI,innerRadius:n=0,outerRadius:r=1})=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5],["helix",t,e,n,r]]),Qh=(Zh.props={},()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),Jh=(Qh.props={transform:!0},t=>{[t={}]=[t],e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};var{startAngle:e,endAngle:t,innerRadius:n,outerRadius:r}=Object.assign(Object.assign({},e),t);return[...Qh(),...Kh({startAngle:e,endAngle:t,innerRadius:n,outerRadius:r})]}),tf=(Jh.props={},(t={})=>{var e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)}),ef=t=>{var{startAngle:t,endAngle:e,innerRadius:n,outerRadius:r}=tf(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...Kh({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]},nf=(ef.props={},()=>[["parallel",0,1,0,1]]),rf=(nf.props={},({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,visual:i=!1})=>[["fisheye",t,e,n,r,i]]),af=(rf.props={transform:!0},t=>{var{startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1}=t;return[...nf(),...Kh({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]}),of=(af.props={},({value:e})=>t=>t.map(()=>e)),sf=(of.props={},({value:e})=>t=>t.map(e)),lf=(sf.props={},({value:e})=>t=>t.map(t=>t[e])),cf=(lf.props={},({value:t})=>()=>t);function uf(t,e){return t.parent===e.parent?1:2}function hf(t,e){return t+e.x}function ff(t,e){return Math.max(t,e.y)}function df(){var s=uf,l=1,c=1,u=!1;function e(e){var r,i=0,t=(e.eachAfter(function(t){var e,n=t.children;n?(t.x=(e=n).reduce(hf,0)/e.length,t.y=1+n.reduce(ff,0)):(t.x=r?i+=s(t,r):0,t.y=0,r=t)}),function(t){for(var e;e=t.children;)t=e[0];return t}(e)),n=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(e),a=t.x-s(t,n)/2,o=n.x+s(n,t)/2;return e.eachAfter(u?function(t){t.x=(t.x-e.x)*l,t.y=(e.y-t.y)*c}:function(t){t.x=(t.x-a)/(o-a)*l,t.y=(1-(e.y?t.y/e.y:1))*c})}return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function pf(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;0<=--r;)e+=n[r].value;else e=1;t.value=e}function gf(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=vf)):void 0===e&&(e=mf);for(var n,r,i,a,o,t=new xf(t),s=[t];n=s.pop();)if((i=e(n.data))&&(o=(i=Array.from(i)).length))for(n.children=i,a=o-1;0<=a;--a)s.push(r=i[a]=new xf(i[a])),r.parent=n,r.depth=n.depth+1;return t.eachBefore(bf)}function mf(t){return t.children}function vf(t){return Array.isArray(t)?t[1]:null}function yf(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function bf(t){for(var e=0;t.height=e,(t=t.parent)&&t.height<++e;);}function xf(t){this.data=t,this.depth=this.height=0,this.parent=null}function wf(t){return null==t?null:Mf(t)}function Mf(t){if("function"!=typeof t)throw new Error;return t}function kf(){return 0}function Ef(t){return function(){return t}}cf.props={},xf.prototype=gf.prototype={constructor:xf,count:function(){return this.eachAfter(pf)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,a=this,o=[a],s=[],l=-1;a=o.pop();)if(s.push(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r]);for(;a=s.pop();)t.call(e,a,++l,this);return this},eachBefore:function(t,e){for(var n,r,i,a=[this],o=-1;n=a.pop();)if(t.call(e,n,++o,this),r=n.children)for(i=r.length-1;0<=i;--i)a.push(r[i]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(i){return this.eachAfter(function(t){for(var e=+i(t.data)||0,n=t.children,r=n&&n.length;0<=--r;)e+=n[r].value;t.value=e})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,n=[];return e.each(function(t){t!==e&&n.push({source:t.parent,target:t})}),n},copy:function(){return gf(this).eachBefore(yf)},[Symbol.iterator]:function*(){var t,e,n,r,i,a=[this];do{for(e=a.reverse(),a=[];t=e.pop();)if(yield t,n=t.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length)}};const Of=4294967296;function Sf(t,e){for(var n,r,i=0,a=(t=function(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}(Array.from(t),e)).length,o=[];i<a;)n=t[i],r&&Af(r,n)?++i:(r=function(t){switch(t.length){case 1:return function(t){return{x:t.x,y:t.y,r:t.r}}(t[0]);case 2:return Pf(t[0],t[1]);case 3:return Lf(t[0],t[1],t[2])}}(o=function(t,e){var n,r;if(Tf(e,t))return[e];for(n=0;n<t.length;++n)if(_f(e,t[n])&&Tf(Pf(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(_f(Pf(t[n],t[r]),e)&&_f(Pf(t[n],e),t[r])&&_f(Pf(t[r],e),t[n])&&Tf(Lf(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}(o,n)),i=0);return r}function _f(t,e){var n=t.r-e.r,r=e.x-t.x,e=e.y-t.y;return n<0||n*n<r*r+e*e}function Af(t,e){var n=t.r-e.r+1e-9*Math.max(t.r,e.r,1),r=e.x-t.x,e=e.y-t.y;return 0<n&&r*r+e*e<n*n}function Tf(t,e){for(var n=0;n<e.length;++n)if(!Af(t,e[n]))return;return 1}function Pf(t,e){var n=t.x,r=t.y,t=t.r,i=e.x,a=e.y,e=e.r,o=i-n,s=a-r,l=e-t,c=Math.sqrt(o*o+s*s);return{x:(n+i+o/c*l)/2,y:(r+a+s/c*l)/2,r:(c+t+e)/2}}function Lf(t,e,n){var r=t.x,i=t.y,t=t.r,a=e.x,o=e.y,e=e.r,s=n.x,l=n.y,n=n.r,c=r-a,u=r-s,h=i-o,f=i-l,d=e-t,p=n-t,g=r*r+i*i-t*t,a=g-a*a-o*o+e*e,o=g-s*s-l*l+n*n,e=u*h-c*f,g=(h*o-f*a)/(2*e)-r,s=(f*d-h*p)/e,l=(u*a-c*o)/(2*e)-i,n=(c*p-u*d)/e,f=s*s+n*n-1,h=2*(t+g*s+l*n),a=g*g+l*l-t*t,o=-(1e-6<Math.abs(f)?(h+Math.sqrt(h*h-4*f*a))/(2*f):a/h);return{x:r+g+s*o,y:i+l+n*o,r:o}}function Cf(t,e,n){var r,i,a,o,s=t.x-e.x,l=t.y-e.y,c=s*s+l*l;c?(i=e.r+n.r,o=t.r+n.r,(o*=o)<(i*=i)?(r=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-r*r)),n.x=t.x-r*s-a*l,n.y=t.y-r*l+a*s):(r=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-r*r)),n.x=e.x+r*s-a*l,n.y=e.y+r*l+a*s)):(n.x=e.x+n.r,n.y=e.y)}function Nf(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,e=e.y-t.y;return 0<n&&r*r+e*e<n*n}function jf(t){var e=t._,t=t.next._,n=e.r+t.r,r=(e.x*t.r+t.x*e.r)/n,t=(e.y*t.r+t.y*e.r)/n;return r*r+t*t}function Rf(t){this._=t,this.next=null,this.previous=null}function If(t,e){if(!(a=(t="object"==typeof(n=t)&&"length"in n?n:Array.from(n)).length))return 0;var n,r,i,a,o,s,l,c,u,h,f,d=t[0];if(d.x=0,d.y=0,!(1<a))return d.r;if(r=t[1],d.x=-r.r,r.x=d.r,r.y=0,!(2<a))return d.r+r.r;Cf(r,d,i=t[2]),d=new Rf(d),r=new Rf(r),i=new Rf(i),((d.next=i.previous=r).next=d.previous=i).next=r.previous=d;t:for(l=3;l<a;++l){Cf(d._,r._,i=t[l]),i=new Rf(i),c=r.next,u=d.previous,h=r._.r,f=d._.r;do{if(h<=f){if(Nf(c._,i._)){r=c,(d.next=r).previous=d,--l;continue t}h+=c._.r,c=c.next}else{if(Nf(u._,i._)){((d=u).next=r).previous=d,--l;continue t}f+=u._.r,u=u.previous}}while(c!==u.next);for(i.previous=d,i.next=r,d.next=r.previous=r=i,o=jf(d);(i=i.next)!==r;)(s=jf(i))<o&&(d=i,o=s);r=d.next}for(d=[r._],i=r;(i=i.next)!==r;)d.push(i._);for(i=Sf(d,e),l=0;l<a;++l)(d=t[l]).x-=i.x,d.y-=i.y;return i.r}function Bf(t){return Math.sqrt(t.value)}function Df(){var n=null,r=1,i=1,a=kf;function e(t){var e=function(){let t=1;return()=>(t=(1664525*t+1013904223)%Of)/Of}();return t.x=r/2,t.y=i/2,n?t.eachBefore(Ff(n)).eachAfter(zf(a,.5,e)).eachBefore(Gf(1)):t.eachBefore(Ff(Bf)).eachAfter(zf(kf,1,e)).eachAfter(zf(a,t.r/Math.min(r,i),e)).eachBefore(Gf(Math.min(r,i)/(2*t.r))),t}return e.radius=function(t){return arguments.length?(n=wf(t),e):n},e.size=function(t){return arguments.length?(r=+t[0],i=+t[1],e):[r,i]},e.padding=function(t){return arguments.length?(a="function"==typeof t?t:Ef(+t),e):a},e}function Ff(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function zf(o,s,l){return function(t){if(e=t.children){var e,n,r,i=e.length,a=o(t)*s||0;if(a)for(n=0;n<i;++n)e[n].r+=a;if(r=If(e,l),a)for(n=0;n<i;++n)e[n].r-=a;t.r=r+a}}}function Gf(n){return function(t){var e=t.parent;t.r*=n,e&&(t.x=e.x+n*t.x,t.y=e.y+n*t.y)}}function Wf(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Yf(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(r-e)/t.value;++s<l;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}var Hf={depth:-1},Vf={},qf={};function $f(t){return t.id}function Uf(t){return t.parentId}function Xf(){var m,v=$f,y=Uf;function e(n){var e,t,r,i,a,o,s,l,c=Array.from(n),u=v,h=y,f=new Map;if(null!=m){const p=c.map((t,e)=>{t=m(t,e,n),e=(t=""+t).length;return"/"===(t=Zf(t,e-1)&&!Zf(t,e-2)?t.slice(0,-1):t)[0]?t:"/"+t}),g=p.map(Kf);var d=new Set(p).add("");for(const r of g)d.has(r)||(d.add(r),p.push(r),g.push(Kf(r)),c.push(qf));u=(t,e)=>p[e],h=(t,e)=>g[e]}for(r=0,e=c.length;r<e;++r)t=c[r],o=c[r]=new xf(t),null!=(s=u(t,r,n))&&(s+="")&&(l=o.id=s,f.set(l,f.has(l)?Vf:o)),null!=(s=h(t,r,n))&&(s+="")&&(o.parent=s);for(r=0;r<e;++r)if(s=(o=c[r]).parent){if(!(a=f.get(s)))throw new Error("missing: "+s);if(a===Vf)throw new Error("ambiguous: "+s);a.children?a.children.push(o):a.children=[o],o.parent=a}else{if(i)throw new Error("multiple roots");i=o}if(!i)throw new Error("no root");if(null!=m){for(;i.data===qf&&1===i.children.length;)i=i.children[0],--e;for(let t=c.length-1;0<=t&&(o=c[t]).data===qf;--t)o.data=null}if(i.parent=Hf,i.eachBefore(function(t){t.depth=t.parent.depth+1,--e}).eachBefore(bf),i.parent=null,0<e)throw new Error("cycle");return i}return e.id=function(t){return arguments.length?(v=wf(t),e):v},e.parentId=function(t){return arguments.length?(y=wf(t),e):y},e.path=function(t){return arguments.length?(m=wf(t),e):m},e}function Kf(t){let e=t.length;if(e<2)return"";for(;1<--e&&!Zf(t,e););return t.slice(0,e)}function Zf(e,n){if("/"===e[n]){let t=0;for(;0<n&&"\\"===e[--n];)++t;if(0==(1&t))return 1}}function Qf(t,e){return t.parent===e.parent?1:2}function Jf(t){var e=t.children;return e?e[0]:t.t}function td(t){var e=t.children;return e?e[e.length-1]:t.t}function ed(t,e){this._=t,this.parent=null,this.children=null,this.A=null,(this.a=this).z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function nd(){var f=Qf,l=1,c=1,u=null;function e(t){var e,n,r,i,a,o,s=function(t){for(var e,n,r,i,a,o=[t=new ed(t,0)];e=o.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;0<=i;--i)o.push(n=e.children[i]=new ed(r[i],i)),n.parent=e;return(t.parent=new ed(null,0)).children=[t],t}(t);return s.eachAfter(h),s.parent.m=-s.z,s.eachBefore(d),u?t.eachBefore(p):((r=n=e=t).eachBefore(function(t){t.x<e.x&&(e=t),t.x>n.x&&(n=t),t.depth>r.depth&&(r=t)}),s=e===n?1:f(e,n)/2,i=s-e.x,a=l/(n.x+s+i),o=c/(r.depth||1),t.eachBefore(function(t){t.x=(t.x+i)*a,t.y=t.depth*o})),t}function h(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e){for(var i,a=0,o=0,s=t.children,l=s.length;0<=--l;)(i=s[l]).z+=a,i.m+=a,a+=i.s+(o+=i.c);e=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+f(t._,r._),t.m=t.z-e):t.z=e}else r&&(t.z=r.z+f(t._,r._));t.parent.A=function(t,e,n){if(e){for(var r,i=t,a=t,o=e,s=i.parent.children[0],l=i.m,c=a.m,u=o.m,h=s.m;o=td(o),i=Jf(i),o&&i;)s=Jf(s),(a=td(a)).a=t,0<(r=o.z+u-i.z-l+f(o._,i._))&&(function(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}(function(t,e,n){return t.a.parent===e.parent?t.a:n}(o,t,n),t,r),l+=r,c+=r),u+=o.m,l+=i.m,h+=s.m,c+=a.m;o&&!td(a)&&(a.t=o,a.m+=u-c),i&&!Jf(s)&&(s.t=i,s.m+=l-h,n=t)}return n}(t,r,t.parent.A||n[0])}function d(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function p(t){t.x*=l,t.y=t.depth*c}return e.separation=function(t){return arguments.length?(f=t,e):f},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function rd(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(i-n)/t.value;++s<l;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c}ed.prototype=Object.create(xf.prototype);e=(1+Math.sqrt(5))/2;function id(t,e,n,r,i,a){for(var o,s,l,c,u,h,f,d,p,g,m,v=[],y=e.children,b=0,x=0,w=y.length,M=e.value;b<w;){for(l=i-n,c=a-r;!(u=y[x++].value)&&x<w;);for(m=(h=f=u)*u*(g=Math.max(c/l,l/c)/(M*t)),p=Math.max(f/m,m/h);x<w;++x){if(u+=s=y[x].value,s<h&&(h=s),f<s&&(f=s),m=u*u*g,p<(d=Math.max(f/m,m/h))){u-=s;break}p=d}v.push(o={value:u,dice:l<c,children:y.slice(b,x)}),o.dice?Yf(o,n,r,i,M?r+=c*u/M:a):rd(o,n,r,M?n+=l*u/M:i,a),M-=u,b=x}return v}var ad=function e(a){function t(t,e,n,r,i){id(a,t,e,n,r,i)}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(e);function od(t,e,n,r,i){var a,o,g=t.children,s=g.length,m=new Array(s+1);for(m[0]=o=a=0;a<s;++a)m[a+1]=o+=g[a].value;!function t(e,n,r,i,a,o,s){if(n-1<=e)return(l=g[e]).x0=i,l.y0=a,l.x1=o,void(l.y1=s);var l=m[e],c=r/2+l,u=e+1,h=n-1;for(;u<h;){var f=u+h>>>1;m[f]<c?u=1+f:h=f}c-m[u-1]<m[u]-c&&e+1<u&&--u;var l=m[u]-l,d=r-l;{var p;s-a<o-i?(t(e,u,l,i,a,p=r?(i*d+o*l)/r:o,s),t(u,n,d,p,a,o,s)):(t(e,u,l,i,a,o,p=r?(a*d+s*l)/r:s),t(u,n,d,i,p,o,s))}}(0,s,t.value,e,n,r,i)}function sd(t,e,n,r,i){(1&t.depth?rd:Yf)(t,e,n,r,i)}var ld=function e(d){function t(t,e,n,r,i){if((a=t._squarify)&&a.ratio===d)for(var a,o,s,l,c,u=-1,h=a.length,f=t.value;++u<h;){for(s=(o=a[u]).children,l=o.value=0,c=s.length;l<c;++l)o.value+=s[l].value;o.dice?Yf(o,e,n,r,f?n+=(i-n)*o.value/f:i):rd(o,e,n,f?e+=(r-e)*o.value/f:r,i),f-=o.value}else t._squarify=a=id(d,t,e,n,r,i),a.ratio=d}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(e);function cd(t={}){t=t.shapes;return[{name:"color"},{name:"opacity"},{name:"shape",range:t},{name:"enterType"},{name:"enterDelay",scaleKey:"enter"},{name:"enterDuration",scaleKey:"enter"},{name:"enterEasing"},{name:"key",scale:"identity"},{name:"groupKey",scale:"identity"},{name:"label",scale:"identity"}]}function ud(t={}){return[...cd(t),{name:"title",scale:"identity"}]}function hd(){return[{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["x","y"]}]}function fd(){return[{type:"maybeTitle",channel:"x"},{type:"maybeTooltip",channel:["y"]}]}function dd(t={}){return cd(t)}function pd(){return[{type:"maybeKey"}]}function gd(t,e){return t.getBandWidth(t.invert(e))}function md(t,e,n={}){const{x:a,y:o,series:s}=e,{x:l,y:c,series:u}=t,{style:{bandOffset:r=u?0:.5,bandOffsetX:h=r,bandOffsetY:f=r}={}}=n,d=!(null===l||void 0===l||!l.getBandWidth),p=!(null===c||void 0===c||!c.getBandWidth),g=!(null===u||void 0===u||!u.getBandWidth);return d||p?(t,e)=>{const n=d?gd(l,a[e]):0;var r=p?gd(c,o[e]):0,e=g&&s?(gd(u,s[e])/2+ +s[e])*n:0,[t,i]=t;return[t+h*n+e,i+f*r]}:t=>t}function vd(t){return parseFloat(t)/100}function yd(t,e,n,r){const{x:i,y:a}=n,{width:o,height:s}=r.getOptions();return[t,Array.from(t,t=>{var e=i[t],t=a[t];return[["string"==typeof e?vd(e)*o:+e,"string"==typeof t?vd(t)*s:+t]]})]}function bd(e){return"function"==typeof e?e:t=>t[e]}function xd(t,e){return Array.from(t,bd(e))}function wd(t,e){var{source:e=t=>t.source,target:n=t=>t.target,value:r=t=>t.value}=e,{links:t,nodes:i}=t;const a=xd(t,e),o=xd(t,n),s=xd(t,r);return{links:t.map((t,e)=>({target:o[e],source:a[e],value:s[e]})),nodes:i||Array.from(new Set([...a,...o]),t=>({key:t}))}}function Md(t,e){return t.getBandWidth(t.invert(e))}const kd=()=>(t,e,n,i)=>{const{x:a,y:o,y1:s,series:l,size:r}=n,c=e.x,u=e.series,[h]=i.getSize(),f=r?r.map(t=>+t/h):null,d=r?(t,e,n)=>{t+=e/2,e=f[n];return[t-e/2,t+e/2]}:(t,e,n)=>[t,t+e];return[t,Array.from(t,t=>{var e=Md(c,a[t]),n=e*(u?Md(u,null===l||void 0===l?void 0:l[t]):1),e=(+(null===l||void 0===l?void 0:l[t])||0)*e,e=+a[t]+e,[e,n]=d(e,n,t),r=+o[t],t=+s[t];return[[e,r],[n,r],[n,t],[e,t]].map(t=>i.map(t))})]};kd.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,channels:[...ud({shapes:["rect","hollow","funnel","pyramid"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[...pd(),{type:"maybeZeroY1"},{type:"maybeZeroX"}],postInference:[...fd()],interaction:{shareTooltip:!0}};const Ed=()=>(t,e,n,r)=>{const{x:i,x1:a,y:o,y1:s}=n;return[t,Array.from(t,t=>{return[[+i[t],+o[t]],[+a[t],+o[t]],[+a[t],+s[t]],[+i[t],+s[t]]].map(t=>r.map(t))})]};function Od(t,e){return null==t||null==e?NaN:t<e?-1:e<t?1:e<=t?0:NaN}function Sd(n){let a,o,i;function s(t,e,n=0,r=t.length){if(n<r){if(0!==a(e,e))return r;do{var i=n+r>>>1;o(t[i],e)<0?n=1+i:r=i}while(n<r)}return n}return i=2!==n.length?(a=Od,o=(t,e)=>Od(n(t),e),(t,e)=>n(t)-e):(a=n===Od||n===function(t,e){return null==t||null==e?NaN:e<t?-1:t<e?1:t<=e?0:NaN}?n:_d,o=n),{left:s,center:function(t,e,n=0,r=t.length){return r=s(t,e,n,r-1),n<r&&i(t[r-1],e)>-i(t[r],e)?r-1:r},right:function(t,e,n=0,r=t.length){if(n<r){if(0!==a(e,e))return r;do{var i=n+r>>>1;o(t[i],e)<=0?n=1+i:r=i}while(n<r)}return n}}}function _d(){return 0}function Ad(t){return null===t?NaN:+t}Ed.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,channels:[...ud({shapes:["rect","hollow"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...pd(),{type:"maybeZeroY1"}],postInference:[...fd()],interaction:{shareTooltip:!0}};ul=Sd(Od);const Td=ul.right,Pd=ul.left,Ld=Sd(Ad).center;function Cd(e,n){let r=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&++r;else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(i=+i)>=i&&++r}return r}function Nd(t,e){t=function(e,n){let r=0,i,a=0,o=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(i=t-a,a+=i/++r,o+=i*(t-a));else{let t=-1;for(var s of e)null!=(s=n(s,++t,e))&&(s=+s)>=s&&(i=s-a,a+=i/++r,o+=i*(s-a))}if(1<r)return o/(r-1)}(t,e);return t&&Math.sqrt(t)}function jd(e,n){let r,i;if(void 0===n)for(const t of e)null!=t&&(void 0===r?t>=t&&(r=i=t):(r>t&&(r=t),i<t&&(i=t)));else{let t=-1;for(var a of e)null!=(a=n(a,++t,e))&&(void 0===r?a>=a&&(r=i=a):(r>a&&(r=a),i<a&&(i=a)))}return[r,i]}class Rd{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){var n=this._partials;let r=0;for(let t=0;t<this._n&&t<32;t++){var i=n[t],a=e+i,i=Math.abs(e)<Math.abs(i)?e-(a-i):i-(a-e);i&&(n[r++]=i),e=a}return n[r]=e,this._n=r+1,this}valueOf(){var t=this._partials;let e=this._n,n,r,i,a=0;if(0<e){for(a=t[--e];0<e&&(n=a,r=t[--e],a=n+r,!(i=r-(a-n))););0<e&&(i<0&&t[e-1]<0||0<i&&0<t[e-1])&&(r=2*i,n=a+r,r==n-a)&&(a=n)}return a}}class Id extends Map{constructor(t,e=function(t){return null!==t&&"object"==typeof t?t.valueOf():t}){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(Bd(this,t))}has(t){return super.has(Bd(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):(t.set(e,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){e=e(n);t.has(e)&&(n=t.get(e),t.delete(e));return n}(this,t))}}function Bd({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):n}function Dd(t){return t}function Fd(t,...e){return Wd(t,Dd,Dd,e)}function zd(t,e,...n){return Wd(t,Dd,e,n)}function Gd(t,e,...n){return Wd(t,Array.from,e,n)}function Wd(t,u,h,f){return function t(e,n){if(n>=f.length)return h(e);var r=new Id,i=f[n++];let a=-1;for(const l of e){var o=i(l,++a,e),s=r.get(o);s?s.push(l):r.set(o,[l])}for(const[c,e]of r)r.set(c,t(e,n));return u(r)}(t,0)}function Yd(e,...i){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");e=Array.from(e);let[n]=i;var t,r;return n&&2!==n.length||1<i.length?(t=Uint32Array.from(e,(t,e)=>e),1<i.length?(i=i.map(t=>e.map(t)),t.sort((t,e)=>{for(const r of i){var n=Vd(r[t],r[e]);if(n)return n}})):(n=e.map(n),t.sort((t,e)=>Vd(n[t],n[e]))),r=e,Array.from(t,t=>r[t])):e.sort(Hd(n))}function Hd(r=Od){if(r===Od)return Vd;if("function"!=typeof r)throw new TypeError("compare is not a function");return(t,e)=>{var n=r(t,e);return n||0===n?n:(0===r(e,e))-(0===r(t,t))}}function Vd(t,e){return(null==t||!(t<=t))-(null==e||!(e<=e))||(t<e?-1:e<t?1:0)}var qd=Array.prototype.slice;function $d(t){return()=>t}const Ud=Math.sqrt(50),Xd=Math.sqrt(10),Kd=Math.sqrt(2);function Zd(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),r=r/Math.pow(10,i),r=r>=Ud?10:r>=Xd?5:r>=Kd?2:1;let a,o,s;return i<0?(s=Math.pow(10,-i)/r,a=Math.round(t*s),o=Math.round(e*s),a/s<t&&++a,o/s>e&&--o,s=-s):(s=Math.pow(10,i)*r,a=Math.round(t/s),o=Math.round(e/s),a*s<t&&++a,o*s>e&&--o),o<a&&.5<=n&&n<2?Zd(t,e,2*n):[a,o,s]}function Qd(t,e,n){return Zd(t=+t,e=+e,n=+n)[2]}function Jd(t){return Math.max(1,Math.ceil(Math.log(Cd(t))/Math.LN2)+1)}function tp(){var v=Dd,y=jd,b=Jd;function e(t){for(var e,n,r=(t=Array.isArray(t)?t:Array.from(t)).length,i=new Array(r),a=0;a<r;++a)i[a]=v(t[a],a,t);var o=y(i),s=o[0],l=o[1],c=b(i,s,l);if(!Array.isArray(c)){var o=l,u=+c;if(y===jd&&([s,l]=function(t,e,n){let r;for(;;){var i=Qd(t,e,n);if(i===r||0===i||!isFinite(i))return[t,e];0<i?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}(s,l,u)),(c=function(t,e,n){if(!(0<(n=+n)))return[];if((t=+t)===(e=+e))return[t];var r=e<t,[i,a,o]=r?Zd(e,t,n):Zd(t,e,n);if(!(i<=a))return[];var s=a-i+1,l=new Array(s);if(r)if(o<0)for(let t=0;t<s;++t)l[t]=(a-t)/-o;else for(let t=0;t<s;++t)l[t]=(a-t)*o;else if(o<0)for(let t=0;t<s;++t)l[t]=(i+t)/-o;else for(let t=0;t<s;++t)l[t]=(i+t)*o;return l}(s,l,u))[0]<=s&&(n=Qd(s,l,u)),c[c.length-1]>=l)if(l<=o&&y===jd){const n=Qd(s,l,u);isFinite(n)&&(0<n?l=(Math.floor(l/n)+1)*n:n<0&&(l=(Math.ceil(l*-n)+1)/-n))}else c.pop()}for(var h=c.length,f=0,d=h;c[f]<=s;)++f;for(;c[d-1]>l;)--d;(f||d<h)&&(c=c.slice(f,d),h=d-f);var p,g,m=new Array(h+1);for(a=0;a<=h;++a)(p=m[a]=[]).x0=0<a?c[a-1]:s,p.x1=a<h?c[a]:l;if(isFinite(n)){if(0<n)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&m[Math.min(h,Math.floor((e-s)/n))].push(t[a]);else if(n<0)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&(g=Math.floor((s-e)*n),m[Math.min(h,g+(c[g]<=e))].push(t[a]))}else for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&m[Td(c,e,0,h)].push(t[a]);return m}return e.value=function(t){return arguments.length?(v="function"==typeof t?t:$d(t),e):v},e.domain=function(t){return arguments.length?(y="function"==typeof t?t:$d([t[0],t[1]]),e):y},e.thresholds=function(t){return arguments.length?(b="function"==typeof t?t:$d(Array.isArray(t)?qd.call(t):t),e):b},e}function ep(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r<t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r<i||void 0===r&&i>=i)&&(r=i)}return r}function np(t,e){let n,r=-1,i=-1;if(void 0===e)for(const o of t)++i,null!=o&&(n<o||void 0===n&&o>=o)&&(n=o,r=i);else for(var a of t)null!=(a=e(a,++i,t))&&(n<a||void 0===n&&a>=a)&&(n=a,r=i);return r}function rp(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r>t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}function ip(t,e){let n,r=-1,i=-1;if(void 0===e)for(const o of t)++i,null!=o&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);else for(var a of t)null!=(a=e(a,++i,t))&&(n>a||void 0===n&&a>=a)&&(n=a,r=i);return r}function ap(n,r,i=0,a=1/0,o){if(r=Math.floor(r),i=Math.floor(Math.max(0,i)),a=Math.floor(Math.min(n.length-1,a)),i<=r&&r<=a)for(o=void 0===o?Vd:Hd(o);i<a;){600<a-i&&(s=a-i+1,l=r-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),u=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1),ap(n,r,Math.max(i,Math.floor(r-l*c/s+u)),Math.min(a,Math.floor(r+(s-l)*c/s+u)),o));var s,l,c,u,h=n[r];let t=i,e=a;for(op(n,i,r),0<o(n[a],h)&&op(n,i,a);t<e;){for(op(n,t,e),++t,--e;o(n[t],h)<0;)++t;for(;0<o(n[e],h);)--e}0===o(n[i],h)?op(n,i,e):op(n,++e,a),e<=r&&(i=e+1),r<=e&&(a=e-1)}return n}function op(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function sp(t,e,n){var r;if((n=(t=Float64Array.from(function*(e,n){if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(yield t);else{let t=-1;for(var r of e)null!=(r=n(r,++t,e))&&(r=+r)>=r&&(yield r)}}(t,n))).length)&&!isNaN(e=+e))return e<=0||n<2?rp(t):1<=e?ep(t):(n=(n-1)*e,(r=ep(ap(t,e=Math.floor(n)).subarray(0,e+1)))+(rp(t.subarray(e+1))-r)*(n-e))}function lp(n,t,r=Ad){var i,e,a;if(!isNaN(t=+t))return i=Float64Array.from(n,(t,e)=>Ad(r(n[e],e,n))),t<=0?ip(i):1<=t?np(i):(e=Uint32Array.from(n,(t,e)=>e),a=i.length-1,ap(e,t=Math.floor(a*t),0,a,(t,e)=>Vd(i[t],i[e])),0<=(t=function(e,n){let r,i=!1;if(1===n.length){let t;for(const o of e){var a=n(o);(i?0<Od(a,t):0===Od(a,a))&&(r=o,t=a,i=!0)}}else for(const t of e)(i?0<n(t,r):0===n(t,t))&&(r=t,i=!0);return r}(e.subarray(0,t+1),t=>i[t]))?t:-1)}function cp(e,n){let r=0,i=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(++r,i+=t);else{let t=-1;for(var a of e)null!=(a=n(a,++t,e))&&(a=+a)>=a&&(++r,i+=a)}if(r)return i/r}function up(t,e){return sp(t,.5,e)}function hp(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function fp(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}function dp(e,n){let r=0;if(void 0===n)for(var t of e)(t=+t)&&(r+=t);else{let t=-1;for(var i of e)(i=+n(i,++t,e))&&(r+=i)}return r}function pp(t){t=t.getOptions().transformations;return t.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function gp(t){t=t.getOptions().transformations;return t.some(([t])=>"polar"===t)}function mp(t){t=t.getOptions().transformations;return t.some(([t])=>"reflect"===t)&&t.some(([t])=>t.startsWith("transpose"))}function vp(t){t=t.getOptions().transformations;return t.some(([t])=>"helix"===t)}function yp(t){t=t.getOptions().transformations;return t.some(([t])=>"parallel"===t)}function bp(t){t=t.getOptions().transformations;return t.some(([t])=>"fisheye"===t)}function xp(t){return vp(t)||gp(t)}function wp(t){var t=t.getOptions()["transformations"],[,,,t,e]=t.find(t=>"polar"===t[0]);return[+t,+e]}function Mp(t,e=!0){var t=t.getOptions()["transformations"],[,t,n]=t.find(t=>"polar"===t[0]);return e?[180*+t/Math.PI,180*+n/Math.PI]:[t,n]}const kp=(t,e,n,r)=>{var i;const{series:a,x:o,y:s}=n;var{x:n,y:e}=e;if(void 0===o||void 0===s)throw new Error("Missing encode for x or y channel.");var t=a?Array.from(Fd(t,t=>a[t]).values()):[t],l=t.map(t=>t[0]).filter(t=>void 0!==t);const c=((null==(i=null==n?void 0:n.getBandWidth)?void 0:i.call(n))||0)/2,u=((null==(i=null==e?void 0:e.getBandWidth)?void 0:i.call(e))||0)/2;return[l,Array.from(t,t=>t.map(t=>r.map([+o[t]+c,+s[t]+u]))),t]},Ep=(t,e,n,i)=>{const a=Object.entries(n).filter(([t])=>t.startsWith("position")).map(([,t])=>t);if(0===a.length)throw new Error("Missing encode for position channel.");return[t,Array.from(t,e=>{var t=a.map(t=>+t[e]),n=i.map(t),r=[];for(let t=0;t<n.length;t+=2)r.push([n[t],n[t+1]]);return r})]},Op=()=>(t,e,n,r)=>{return(yp(r)?Ep:kp)(t,e,n,r)};Op.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,channels:[...ud({shapes:["line","smooth"]}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[...pd(),{type:"maybeSeries"},{type:"maybeGradient"}],postInference:[...fd(),{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const Sp=g=>(t,e,n,o)=>{const{x:r,y:i,x1:a,y1:s,size:l,dx:c,dy:u}=n,[h,f]=o.getSize(),d=md(e,n,g),p=t=>{var e=+((null===c||void 0===c?void 0:c[t])||0),n=+((null===u||void 0===u?void 0:u[t])||0);return[(a?(+r[t]+ +a[t])/2:+r[t])+e,(s?(+i[t]+ +s[t])/2:+i[t])+n]};return[t,l?Array.from(t,t=>{var[e,n]=p(t),r=+l[t],i=r/h,r=r/f,a=[e-i,n-r],e=[e+i,n+r];return[o.map(d(a,t)),o.map(d(e,t))]}):Array.from(t,t=>[o.map(d(p(t),t))])]};Sp.props={defaultShape:"hollow",defaultLabelShape:"label",composite:!1,channels:[...ud({shapes:["hollow","hollowDiamond","hollowHexagon","hollowSquare","hollowTriangleDown","hollowTriangle","hollowBowtie","point","plus","diamond","square","triangle","hexagon","cross","bowtie","hyphen","line","tick","triangleDown"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size",scale:"sqrt"},{name:"dx",scale:"identity"},{name:"dy",scale:"identity"}],preInference:[...pd(),{type:"maybeZeroY"},{type:"maybeZeroX"}],postInference:[{type:"maybeSize"},...hd()]};const _p=s=>{var{cartesian:t=!1}=s;return t?yd:(t,e,n,r)=>{const{x:i,y:a}=n,o=md(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};_p.props={defaultShape:"text",defaultLabelShape:"label",composite:!1,channels:[...ud({shapes:["text","badge"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[...pd(),{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...hd()]};const Ap=()=>(t,e,n,i)=>{const{x:a,y:o}=n,s=e.x,l=e.y;return[t,Array.from(t,t=>{var e=s.getBandWidth(s.invert(+a[t])),n=l.getBandWidth(l.invert(+o[t])),r=+a[t],t=+o[t];return[[r,t],[r+e,t],[r+e,t+n],[r,t+n]].map(t=>i.map(t))})]};Ap.props={defaultShape:"cell",defaultLabelShape:"label",composite:!1,channels:[...ud({shapes:["cell","hollow"]}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[...pd(),{type:"maybeZeroX"},{type:"maybeZeroY"},{type:"maybeZeroPadding"}],postInference:[...hd()]};const Tp=()=>(t,e,n,a)=>{var r;const{x:o,y:s,y1:l,series:i}=n;var{x:n,y:e}=e,t=i?Array.from(Fd(t,t=>i[t]).values()):[t],c=t.map(t=>t[0]).filter(t=>void 0!==t);const u=((null==(r=null==n?void 0:n.getBandWidth)?void 0:r.call(n))||0)/2,h=((null==(r=null==e?void 0:e.getBandWidth)?void 0:r.call(e))||0)/2;return[c,Array.from(t,e=>{var n=e.length,r=new Array(2*n);for(let t=0;t<e.length;t++){var i=e[t];r[t]=a.map([+o[i]+u,+s[i]+h]),r[n+t]=a.map([+o[i]+u,+l[i]+h])}return r}),t]};Tp.props={defaultShape:"area",defaultLabelShape:"label",composite:!1,channels:[...ud({shapes:["area","smooth","hvh","hv","vh"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[...pd(),{type:"maybeSeries"},{type:"maybeZeroY1"},{type:"maybeZeroPadding"}],postInference:[...fd()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const Pp=c=>(t,e,n,r)=>{const{x:i,y:a,x1:o=i,y1:s=a}=n,l=md(e,n,c);e=t.map(t=>[r.map(l([+i[t],+a[t]],t)),r.map(l([+o[t],+s[t]],t))]);return[t,e]};Pp.props={defaultShape:"link",defaultLabelShape:"label",composite:!1,channels:[...ud({shapes:["link","arc","vhv","smooth"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...pd(),{type:"maybeIdentityY"},{type:"maybeIdentityX"}],postInference:[...hd()]};const Lp=s=>{var t=s["cartesian"];return t?yd:(t,e,n,r)=>{const{x:i,y:a}=n,o=md(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};Lp.props={defaultShape:"image",defaultLabelShape:"label",composite:!1,channels:[...ud({shapes:["image"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[...pd(),{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...hd()]};const Cp=()=>(t,e,n,a)=>{const o=Object.entries(n).filter(([t])=>t.startsWith("x")).map(([,t])=>t),s=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t);n=t.map(e=>{var n=[];for(let t=0;t<o.length;t++){var r=o[t][e];if(void 0===r)break;var i=s[t][e];n.push(a.map([+r,+i]))}return n});return[t,n]};Cp.props={defaultShape:"polygon",defaultLabelShape:"label",composite:!1,channels:[...ud({shapes:["polygon","ribbon"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...pd()],postInference:[...hd()]};const Np=()=>(t,e,n,s)=>{const{x:l,y:c,y1:u,y2:h,y3:f,y4:d,series:p}=n,g=e.x,m=e.series;return[t,Array.from(t,t=>{var e=g.getBandWidth(g.invert(+l[t])),n=e*(m?m.getBandWidth(m.invert(+(null===p||void 0===p?void 0:p[t]))):1),e=(+(null===p||void 0===p?void 0:p[t])||0)*e,e=+l[t]+e+n/2,[t,r,i,a,o]=[+c[t],+u[t],+h[t],+f[t],+d[t]];return[[e-n/2,o],[e+n/2,o],[e,o],[e,a],[e-n/2,a],[e+n/2,a],[e+n/2,r],[e-n/2,r],[e-n/2,i],[e+n/2,i],[e,r],[e,t],[e-n/2,t],[e+n/2,t]].map(t=>s.map(t))})]},jp=(Np.props={defaultShape:"box",defaultLabelShape:"label",composite:!1,channels:[...ud({shapes:["box"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[...pd(),{type:"maybeZeroX"}],postInference:[...fd()],interaction:{shareTooltip:!0}},()=>(t,e,n,i)=>{const{x:a,y:o,size:s,rotate:l}=n,[c,u]=i.getSize();n=t.map(t=>{var e=+l[t]/180*Math.PI,n=+s[t],r=n/c,n=n/u,r=r*Math.cos(e),n=-n*Math.sin(e);return[i.map([+a[t]-r/2,+o[t]-n/2]),i.map([+a[t]+r/2,+o[t]+n/2])]});return[t,n]});jp.props={defaultShape:"vector",defaultLabelShape:"label",composite:!1,channels:[...ud({shapes:["vector"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[...pd()],postInference:[...hd()]};const Rp=()=>(t,e,n,r)=>{const i=n["y"];return[t,Array.from(t,t=>{return[[0,i[t]],[1,i[t]]].map(t=>r.map(t))})]};Rp.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,channels:[...dd({shapes:["line"]}),{name:"y",required:!0}],preInference:[...pd(),{type:"maybeTupleY"}],postInference:[]};const Ip=()=>(t,e,n,r)=>{const i=n["x"];return[t,Array.from(t,t=>{return[[i[t],1],[i[t],0]].map(t=>r.map(t))})]};Ip.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,channels:[...dd({shapes:["line"]}),{name:"x",required:!0}],preInference:[...pd(),{type:"maybeTupleX"}],postInference:[]};const Bp=(...t)=>Pp(...t);function Dp(t,e,n,r){if(e)return()=>[0,1];const{[t]:i,[t+"1"]:a}=n;return t=>{var e=(null==(e=r.getBandWidth)?void 0:e.call(r,r.invert(+a[t])))||0;return[i[t],a[t]+e]}}function Fp(t={}){const{extendX:r=!1,extendY:s=!1}=t;return(t,e,n,i)=>{const a=Dp("x",r,n,e.x),o=Dp("y",s,n,e.y);return[t,Array.from(t,t=>{var[e,n]=a(t),[t,r]=o(t);return[[e,t],[n,t],[n,r],[e,r]].map(t=>i.map(t))})]}}Bp.props={defaultShape:"connector",defaultLabelShape:"label",composite:!1,channels:[...dd({shapes:["connector"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...pd()],postInference:[]};const zp=()=>Fp();zp.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,channels:[...dd({shapes:["range"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...pd()],postInference:[]};const Gp=()=>Fp({extendY:!0});Gp.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,channels:[...dd({shapes:["range"]}),{name:"x",required:!0}],preInference:[...pd()],postInference:[]};const Wp=()=>Fp({extendX:!0});function Yp(t){return t.target.depth}function Hp(t,e){return t.sourceLinks.length?t.depth:e-1}function Vp(t){return function(){return t}}function qp(t,e){return Up(t.source,e.source)||t.index-e.index}function $p(t,e){return Up(t.target,e.target)||t.index-e.index}function Up(t,e){return t.y0-e.y0}function Xp(t){return t.value}function Kp(t){return t.index}function Zp(t){return t.nodes}function Qp(t){return t.links}function Jp(t,e){t=t.get(e);if(t)return t;throw new Error("missing: "+e)}function t0({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const r of n.sourceLinks)r.y0=t+r.width/2,t+=r.width;for(const i of n.targetLinks)i.y1=e+i.width/2,e+=i.width}}function e0(){let x=0,w=0,M=1,k=1,E=24,O=8,S,_=Kp,A=Hp,T,P,L,C=Zp,N=Qp,j=6;function e(e){e={nodes:C(e),links:N(e)};{var{nodes:i,links:t}=e;i.forEach((t,e)=>{t.index=e,t.sourceLinks=[],t.targetLinks=[]});const g=new Map(i.map(t=>[_(t),t]));if(t.forEach((t,e)=>{t.index=e;let{source:n,target:r}=t;"object"!=typeof n&&(n=t.source=Jp(g,n)),"object"!=typeof r&&(r=t.target=Jp(g,r)),n.sourceLinks.push(t),r.targetLinks.push(t)}),null!=L)for(var{sourceLinks:n,targetLinks:r}of i)n.sort(L),r.sort(L)}t=e.nodes;for(const m of t)m.value=void 0===m.fixedValue?Math.max(dp(m.sourceLinks,Xp),dp(m.targetLinks,Xp)):m.fixedValue;{var a=e.nodes,o=a.length;let t=new Set(a),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.depth=r;for(var{target:e}of t.sourceLinks)n.add(e)}),++r>o)throw new Error("circular link");t=n,n=new Set}if(T){var s,l=Math.max(ep(a,t=>t.depth)+1,0);for(let t=0;t<a.length;t++)(s=a[t]).depth=T.call(null,s,l)}}{var c=(i=e.nodes).length;let t=new Set(i),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.height=r;for(var{source:e}of t.targetLinks)n.add(e)}),++r>c)throw new Error("circular link");t=n,n=new Set}}var u=function({nodes:t}){var e=Math.max(ep(t,t=>t.depth)+1,0),n=(M-x-E)/(e-1),r=new Array(e).fill(0).map(()=>[]);for(const a of t){var i=Math.max(0,Math.min(e-1,Math.floor(A.call(null,a,e))));a.layer=i,a.x0=x+i*n,a.x1=a.x0+E,r[i]?r[i].push(a):r[i]=[a]}if(P)for(const o of r)o.sort(P);return r}(e),t=(S=Math.min(O,(k-w)/(ep(u,t=>t.length)-1)),u),h=rp(t,t=>(k-w-(t.length-1)*S)/dp(t,Xp));for(const v of t){let e=w;for(const y of v){y.y0=e,y.y1=e+y.value*h,e=y.y1+S;for(const b of y.sourceLinks)b.width=b.value*h}e=(k-e+S)/(v.length+1);for(let t=0;t<v.length;++t){var f=v[t];f.y0+=e*(t+1),f.y1+=e*(t+1)}!function(t){if(void 0===L)for(var{sourceLinks:e,targetLinks:n}of t)e.sort($p),n.sort(qp)}(v)}for(let t=0;t<j;++t){var d=Math.pow(.99,t),p=Math.max(1-d,(t+1)/j);!function(n,r,i){for(let t=n.length,e=t-2;0<=e;--e){var a,o=n[e];for(const c of o){let t=0,e=0;for(var{target:s,value:l}of c.sourceLinks){l=l*(s.layer-c.layer);t+=function(t,e){let n=e.y0-(e.targetLinks.length-1)*S/2;for(var{source:r,width:i}of e.targetLinks){if(r===t)break;n+=i+S}for(var{target:a,width:o}of t.sourceLinks){if(a===e)break;n-=o}return n}(c,s)*l,e+=l}0<e&&(a=(t/e-c.y0)*r,c.y0+=a,c.y1+=a,I(c))}void 0===P&&o.sort(Up),o.length&&R(o,i)}}(u,d,p),!function(n,r,i){for(let t=1,e=n.length;t<e;++t){var a,o=n[t];for(const c of o){let t=0,e=0;for(var{source:s,value:l}of c.targetLinks){l=l*(c.layer-s.layer);t+=function(t,e){let n=t.y0-(t.sourceLinks.length-1)*S/2;for(var{target:r,width:i}of t.sourceLinks){if(r===e)break;n+=i+S}for(var{source:a,width:o}of e.targetLinks){if(a===t)break;n-=o}return n}(s,c)*l,e+=l}0<e&&(a=(t/e-c.y0)*r,c.y0+=a,c.y1+=a,I(c))}void 0===P&&o.sort(Up),o.length&&R(o,i)}}(u,d,p)}return t0(e),e}function R(t,e){var n=t.length>>1,r=t[n];a(t,r.y0-S,n-1,e),i(t,r.y1+S,1+n,e),a(t,k,t.length-1,e),i(t,w,0,e)}function i(t,e,n,r){for(;n<t.length;++n){var i=t[n],a=(e-i.y0)*r;1e-6<a&&(i.y0+=a,i.y1+=a),e=i.y1+S}}function a(t,e,n,r){for(;0<=n;--n){var i=t[n],a=(i.y1-e)*r;1e-6<a&&(i.y0-=a,i.y1-=a),e=i.y0-S}}function I({sourceLinks:t,targetLinks:e}){if(void 0===L){for(const{source:{sourceLinks:t}}of e)t.sort($p);for(const{target:{targetLinks:e}}of t)e.sort(qp)}}return e.update=function(t){return t0(t),t},e.nodeId=function(t){return arguments.length?(_="function"==typeof t?t:Vp(t),e):_},e.nodeAlign=function(t){return arguments.length?(A="function"==typeof t?t:Vp(t),e):A},e.nodeDepth=function(t){return arguments.length?(T=t,e):T},e.nodeSort=function(t){return arguments.length?(P=t,e):P},e.nodeWidth=function(t){return arguments.length?(E=+t,e):E},e.nodePadding=function(t){return arguments.length?(O=S=+t,e):O},e.nodes=function(t){return arguments.length?(C="function"==typeof t?t:Vp(t),e):C},e.links=function(t){return arguments.length?(N="function"==typeof t?t:Vp(t),e):N},e.linkSort=function(t){return arguments.length?(L=t,e):L},e.size=function(t){return arguments.length?(x=w=0,M=+t[0],k=+t[1],e):[M-x,k-w]},e.extent=function(t){return arguments.length?(x=+t[0][0],M=+t[1][0],w=+t[0][1],k=+t[1][1],e):[[x,w],[M,k]]},e.iterations=function(t){return arguments.length?(j=+t,e):j},e}Wp.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,channels:[...dd({shapes:["range"]}),{name:"y",required:!0}],preInference:[...pd()],postInference:[]};const n0={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},r0={left:function(t){return t.depth},right:function(t,e){return e-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?rp(t.sourceLinks,Yp)-1:0},justify:Hp};const i0=h=>t=>{var{nodeId:e,nodeSort:n,nodeAlign:r,nodeWidth:i,nodePadding:a,nodeDepth:o,nodes:s,links:l,linkSort:c,iterations:u}=Object.assign({},n0,h),l=e0().nodeSort(n).linkSort(c).links(l).nodes(s).nodeWidth(i).nodePadding(a).nodeDepth(o).nodeAlign("string"==(c=typeof(n=r))?r0[n]||Hp:"function"==c?n:Hp).iterations(u).extent([[0,0],[1,1]]),s=("function"==typeof e&&l.nodeId(e),l(t)),{nodes:i,links:a}=s;return{nodes:i.map(t=>{var{x0:e,x1:n,y0:r,y1:i}=t;return Object.assign(Object.assign({},t),{x:[e,n,n,e],y:[r,r,i,i]})}),links:a.map(t=>{var{source:e,target:n}=t,e=e.x1,n=n.x0,r=t.width/2;return Object.assign(Object.assign({},t),{x:[e,e,n,n],y:[t.y0+r,t.y0-r,t.y1+r,t.y1-r]})})}};function a0(t){return t}function o0(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function s0(t=""){throw new Error(t)}function l0(t,e){var n,r,e=e["attributes"],i=new Set(["id","className"]);for([n,r]of Object.entries(e))i.has(n)||t.attr(n,r)}function c0(t){return null!=t&&!Number.isNaN(t)}function it(t,e){return u0(t,e)||{}}function u0(t,n){t=Object.entries(t||{}).filter(([t])=>t.startsWith(n)).map(([t,e])=>[Je(t.replace(n,"").trim()),e]).filter(([t])=>!!t);return 0===t.length?null:Object.fromEntries(t)}function h0(t,...n){return Object.fromEntries(Object.entries(t).filter(([e])=>n.every(t=>!e.startsWith(t))))}function f0(t,e){return void 0===t?null:"number"==typeof t?t:(t=+t.replace("%",""),Number.isNaN(t)?null:t/100*e)}function d0(t){return!("object"!=typeof t||t instanceof Date||null===t||Array.isArray(t))}function p0(t){return null===t||!1===t}function g0(t,e,n={},r=!1){return p0(t)||Array.isArray(t)&&r?t:(r=it(t,e),rt(n,r))}function m0(t,e={}){return!p0(t)&&!Array.isArray(t)&&v0(t)?rt(e,t):t}function v0(t){var e;return 0===Object.keys(t).length||({title:t,items:e}=t,void 0!==t)||void 0!==e}function y0(t,e){return"object"==typeof t?it(t,e):t}i0.props={};const b0=y=>{const b={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},x={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},w={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:void 0}},M={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10};return()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={},tooltip:l={}}=y,{links:t,nodes:c}=wd(t,e),u=it(e,"node"),e=it(e,"link"),{key:h=t=>t.key,color:f=h}=u,{links:i,nodes:t}=i0(Object.assign(Object.assign(Object.assign({},b),{nodeId:bd(h)}),i))({links:t,nodes:c});const d=it(r,"label"),{text:p=h,spacing:g=5}=d,m=nt(d,["text","spacing"]),v=bd(h);c=g0(l,"node",{title:v,items:[{field:"value"}]},!0),h=g0(l,"link",{title:"",items:[t=>({name:"source",value:v(t.source)}),t=>({name:"target",value:v(t.target)})]});return[rt({},x,{data:t,encode:Object.assign(Object.assign({},u),{color:f}),scale:n,style:it(r,"node"),labels:[Object.assign(Object.assign(Object.assign({},M),{text:p,dx:t=>t.x[0]<.5?g:-g}),m),...a],tooltip:c,animate:y0(s,"node"),axis:!1}),rt({},w,{data:i,encode:e,labels:o,style:Object.assign({fill:e.color?void 0:"#aaa",strokeWidth:0},it(r,"link")),tooltip:h,animate:y0(s,"link")})]}},x0=(b0.props={},t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])]);x0.props={defaultShape:"path",defaultLabelShape:"label",composite:!1,channels:[...ud({shapes:["path","hollow"]}),{name:"d",scale:"identity"}],preInference:[...pd()],postInference:[]};const w0=t=>t?parseInt(t):0;function M0(t){var{height:t,width:e,padding:n=0,paddingLeft:r=n,paddingRight:i=n,paddingTop:a=n,paddingBottom:n=n,margin:o=0,marginLeft:s=o,marginRight:l=o,marginTop:c=o,marginBottom:o=o,inset:u=0,insetLeft:h=u,insetRight:f=u,insetTop:d=u,insetBottom:u=u}=t,p=t=>"auto"===t?30:t;return{width:e-p(r)-p(i)-s-l-h-f,height:t-p(a)-p(n)-c-o-d-u}}function k0(t,e,n){const r=n["value"];var o,i,a,s,l,c,u,h,f,d,n=function(t,e){var n={treemapBinary:od,treemapDice:Yf,treemapSlice:rd,treemapSliceDice:sd,treemapSquarify:ad,treemapResquarify:ld};if(e="treemapSquarify"===t?n[t].ratio(e):n[t])return e;throw new TypeError("Invalid tile method!")}(e.tile,e.ratio),p=(t=t,p=e.path,(Array.isArray(t)?"function"==typeof p?Xf().path(p):Xf():gf)(t));function g(t){return t.x0=t.y0=0,t.x1=a,t.y1=s,t.eachBefore(m),l=[0],i&&t.eachBefore(Wf),t}function m(t){var e=l[t.depth],n=t.x0+e,r=t.y0+e,i=t.x1-e,a=t.y1-e;i<n&&(n=i=(n+i)/2),a<r&&(r=a=(r+a)/2),t.x0=n,t.y0=r,t.x1=i,t.y1=a,t.children&&(e=l[t.depth+1]=c(t)/2,n+=d(t)-e,r+=u(t)-e,(i-=h(t)-e)<n&&(n=i=(n+i)/2),(a-=f(t)-e)<r&&(r=a=(r+a)/2),o(t,n,r,i,a))}return r?p.sum(t=>e.ignoreParentValue&&t.children?0:bd(r)(t)).sort(e.sort):p.count(),o=ad,i=!1,s=a=1,l=[0],d=f=h=u=c=kf,g.round=function(t){return arguments.length?(i=!!t,g):i},g.size=function(t){return arguments.length?(a=+t[0],s=+t[1],g):[a,s]},g.tile=function(t){return arguments.length?(o=Mf(t),g):o},g.padding=function(t){return arguments.length?g.paddingInner(t).paddingOuter(t):g.paddingInner()},g.paddingInner=function(t){return arguments.length?(c="function"==typeof t?t:Ef(+t),g):c},g.paddingOuter=function(t){return arguments.length?g.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):g.paddingTop()},g.paddingTop=function(t){return arguments.length?(u="function"==typeof t?t:Ef(+t),g):u},g.paddingRight=function(t){return arguments.length?(h="function"==typeof t?t:Ef(+t),g):h},g.paddingBottom=function(t){return arguments.length?(f="function"==typeof t?t:Ef(+t),g):f},g.paddingLeft=function(t){return arguments.length?(d="function"==typeof t?t:Ef(+t),g):d},g.tile(n).size(e.size).round(e.round).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(p),p.descendants().map(t=>Object.assign(t,{x:[t.x0,t.x1],y:[t.y0,t.y1]})).filter("function"==typeof e.layer?e.layer:t=>t.height===e.layer)}const E0=h=>t=>{var{width:t,height:e}=M0(t),{data:n,encode:r={},scale:i,style:a={},layout:o={},labels:s=[],tooltip:l={}}=h,c=nt(h,["data","encode","scale","style","layout","labels","tooltip"]),u={tile:"treemapSquarify",ratio:.5*(1+Math.sqrt(5)),size:[t,e],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,sort:(t,e)=>e.value-t.value,layer:0},t={type:"rect",axis:!1,encode:{x:"x",y:"y",color:t=>t.data.parent.name},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]}},style:{stroke:"#fff"}},e=k0(n,rt({},u,o),r),n=it(a,"label");return[rt({},t,Object.assign(Object.assign({data:e,encode:r,scale:i,style:a,labels:[Object.assign(Object.assign({},{fontSize:10,text:t=>t.data.name,position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0}),n),...s]},c),{tooltip:m0(l,{title:t=>t.data.name,items:[{field:"value"}]}),axis:!1}))]},O0=(E0.props={},h=>t=>{var{width:t,height:e}=M0(t),{data:n,encode:r={},scale:i={},style:a={},layout:o={},labels:s=[],tooltip:l={}}=h,c=nt(h,["data","encode","scale","style","layout","labels","tooltip"]),u={type:"point",axis:!1,legend:!1,scale:{x:{domain:[0,t]},y:{domain:[0,e]},size:{type:"identity"}},encode:{x:"x",y:"y",size:"r",shape:"point"},style:{fill:r.color?void 0:t=>0===t.height?"#ddd":"#fff",stroke:r.color?void 0:t=>0===t.height?"":"#000"}},n=((t,e,n)=>{const r=n["value"];n=(We(t)?Xf().path(e.path):gf)(t);return r?n.sum(t=>bd(r)(t)).sort(e.sort):n.count(),Df().size(e.size).padding(e.padding)(n),n.descendants()})(n,rt({},{size:[t,e],padding:0,sort:(t,e)=>e.value-t.value},o),rt({},u.encode,r)),t=it(a,"label");return[rt({},u,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a,labels:[Object.assign(Object.assign({},{text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>2*t.r}),t),...s]},c),{tooltip:m0(l,{title:t=>t.data.name,items:[{field:"value"}]}),axis:!1}))]});function S0(t,e){return rp(t,t=>e[t])}function _0(t,e){return ep(t,t=>e[t])}function A0(t,e){const n=2.5*T0(t,e)-1.5*L0(t,e);return rp(t,t=>e[t]>=n?e[t]:NaN)}function T0(t,e){return sp(t,.25,t=>e[t])}function P0(t,e){return sp(t,.5,t=>e[t])}function L0(t,e){return sp(t,.75,t=>e[t])}function C0(t,e){const n=2.5*L0(t,e)-1.5*T0(t,e);return ep(t,t=>e[t]<=n?e[t]:NaN)}function N0(){return(t,e)=>{var n=e["encode"],{y:n,x:r}=n;const i=n["value"],a=r["value"];return[Array.from(Fd(t,t=>a[+t]).values()).flatMap(t=>{const e=A0(t,i),n=C0(t,i);return t.filter(t=>i[t]<e||i[t]>n)}),e]}}O0.props={};const j0=h=>()=>{var t,{data:e,encode:n,style:r={},tooltip:i={},animate:a}=h,o=nt(h,["data","encode","style","tooltip","transform","animate"]),{point:s=!0}=r,r=nt(r,["point"]),l=n["y"],l={y:l,y1:l,y2:l,y3:l,y4:l},c={y1:T0,y2:P0,y3:L0},u=g0(i,"box",{items:[{channel:"y",name:"min"},{channel:"y1",name:"q1"},{channel:"y2",name:"q2"},{channel:"y3",name:"q3"},{channel:"y4",name:"max"}]},!0),i=g0(i,"point",{title:{channel:"x"},items:[{name:"outlier",channel:"y"}]});return s?(s=it(r,"box"),t=it(r,"point"),[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:A0},c),{y4:C0})],encode:Object.assign(Object.assign({},n),l),style:s,tooltip:u,animate:y0(a,"box")},o),{type:"point",data:e,transform:[{type:N0}],encode:n,style:Object.assign({},t),tooltip:i,animate:y0(a,"point")}]):[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:S0},c),{y4:_0})],encode:Object.assign(Object.assign({},n),l),style:r,tooltip:u},o)]},R0=(j0.props={},s=>{var t=s["cartesian"];return t?yd:(t,e,n,r)=>{const{x:i,y:a}=n,o=md(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}});function I0(t,e,n,r){if(!isNaN(e)&&!isNaN(n)){var i,a,o,s,l,c,u,h,f,d=t._root,p={data:r},g=t._x0,m=t._y0,v=t._x1,y=t._y1;if(d){for(;d.length;)if((c=e>=(a=(g+v)/2))?g=a:v=a,(u=n>=(o=(m+y)/2))?m=o:y=o,!(d=(i=d)[h=u<<1|c]))return i[h]=p,t;if(s=+t._x.call(null,d.data),l=+t._y.call(null,d.data),e===s&&n===l)p.next=d,i?i[h]=p:t._root=p;else{for(;i=i?i[h]=new Array(4):t._root=new Array(4),(c=e>=(a=(g+v)/2))?g=a:v=a,(u=n>=(o=(m+y)/2))?m=o:y=o,(h=u<<1|c)==(f=(o<=l)<<1|a<=s););i[f]=d,i[h]=p}}else t._root=p}return t}function B0(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function D0(t){return t[0]}function F0(t){return t[1]}function z0(t,e,n){e=new G0(null==e?D0:e,null==n?F0:n,NaN,NaN,NaN,NaN);return null==t?e:e.addAll(t)}function G0(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function W0(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}R0.props={defaultShape:"shape",defaultLabelShape:"label",composite:!1,channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[...pd(),{type:"maybeTuple"},{type:"maybeVisualPosition"},{type:"maybeFunctionAttribute"}]};Io=z0.prototype=G0.prototype;function Y0(t){return function(){return t}}function H0(t){return 1e-6*(t()-.5)}function V0(t){return t.index}function q0(t,e){t=t.get(e);if(t)return t;throw new Error("node not found: "+e)}function $0(c){var u,h,a,o,f,d,s=V0,n=function(t){return 1/Math.min(o[t.source.index],o[t.target.index])},r=Y0(30),p=1;function e(t){for(var e=0,n=c.length;e<p;++e)for(var r,i,a,o,s,l=0;l<n;++l)r=(i=c[l]).source,a=(i=i.target).x+i.vx-r.x-r.vx||H0(d),o=i.y+i.vy-r.y-r.vy||H0(d),a*=s=((s=Math.sqrt(a*a+o*o))-h[l])/s*t*u[l],o*=s,i.vx-=a*(s=f[l]),i.vy-=o*s,r.vx+=a*(s=1-s),r.vy+=o*s}function i(){if(a){var t,e=a.length,n=c.length,r=new Map(a.map((t,e)=>[s(t,e,a),t])),i=0;for(o=new Array(e);i<n;++i)(t=c[i]).index=i,"object"!=typeof t.source&&(t.source=q0(r,t.source)),"object"!=typeof t.target&&(t.target=q0(r,t.target)),o[t.source.index]=(o[t.source.index]||0)+1,o[t.target.index]=(o[t.target.index]||0)+1;for(i=0,f=new Array(n);i<n;++i)t=c[i],f[i]=o[t.source.index]/(o[t.source.index]+o[t.target.index]);u=new Array(n),l(),h=new Array(n),g()}}function l(){if(a)for(var t=0,e=c.length;t<e;++t)u[t]=+n(c[t],t,c)}function g(){if(a)for(var t=0,e=c.length;t<e;++t)h[t]=+r(c[t],t,c)}return null==c&&(c=[]),e.initialize=function(t,e){a=t,d=e,i()},e.links=function(t){return arguments.length?(c=t,i(),e):c},e.id=function(t){return arguments.length?(s=t,e):s},e.iterations=function(t){return arguments.length?(p=+t,e):p},e.strength=function(t){return arguments.length?(n="function"==typeof t?t:Y0(+t),l(),e):n},e.distance=function(t){return arguments.length?(r="function"==typeof t?t:Y0(+t),g(),e):r},e}Io.copy=function(){var t,e,n=new G0(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(r)if(r.length)for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=W0(e));else n._root=W0(r);return n},Io.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return I0(this.cover(e,n),e,n,t)},Io.addAll=function(t){for(var e,n,r=t.length,i=new Array(r),a=new Array(r),o=1/0,s=1/0,l=-1/0,c=-1/0,u=0;u<r;++u)isNaN(e=+this._x.call(null,n=t[u]))||isNaN(n=+this._y.call(null,n))||((i[u]=e)<o&&(o=e),l<e&&(l=e),(a[u]=n)<s&&(s=n),c<n&&(c=n));if(!(l<o||c<s))for(this.cover(o,s).cover(l,c),u=0;u<r;++u)I0(this,i[u],a[u],t[u]);return this},Io.cover=function(t,e){if(!isNaN(t=+t)&&!isNaN(e=+e)){var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,s,l=i-n||1,c=this._root;t<n||i<=t||e<r||a<=e;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=c,c=o,l*=2,s){case 0:i=n+l,a=r+l;break;case 1:n=i-l,a=r+l;break;case 2:i=n+l,r=a-l;break;case 3:n=i-l,r=a-l}this._root&&this._root.length&&(this._root=c)}this._x0=n,this._y0=r,this._x1=i,this._y1=a}return this},Io.data=function(){var e=[];return this.visit(function(t){if(!t.length)for(;e.push(t.data),t=t.next;);}),e},Io.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},Io.find=function(t,e,n){var r,i,a,o,s,l,c,u,h=this._x0,f=this._y0,d=this._x1,p=this._y1,g=[],m=this._root;for(m&&g.push(new B0(m,h,f,d,p)),null==n?n=1/0:(h=t-n,f=e-n,d=t+n,p=e+n,n*=n);r=g.pop();)!(m=r.node)||(s=r.x0)>d||(l=r.y0)>p||(o=r.x1)<h||(i=r.y1)<f||(m.length?(g.push(new B0(m[3],a=(s+o)/2,c=(l+i)/2,o,i),new B0(m[2],s,c,a,i),new B0(m[1],a,l,o,c),new B0(m[0],s,l,a,c)),(i=(c<=e)<<1|a<=t)&&(r=g[g.length-1],g[g.length-1]=g[g.length-1-i],g[g.length-1-i]=r)):(l=(o=t-+this._x.call(null,m.data))*o+(s=e-+this._y.call(null,m.data))*s)<n&&(h=t-(c=Math.sqrt(n=l)),f=e-c,d=t+c,p=e+c,u=m.data));return u},Io.remove=function(t){if(!isNaN(a=+this._x.call(null,t))&&!isNaN(o=+this._y.call(null,t))){var e,n,r,i,a,o,s,l,c,u,h,f=this._root,d=this._x0,p=this._y0,g=this._x1,m=this._y1;if(f){if(f.length)for(;;){if((l=a>=(s=(d+g)/2))?d=s:g=s,(c=o>=(s=(p+m)/2))?p=s:m=s,!(f=(e=f)[u=c<<1|l]))return this;if(!f.length)break;(e[u+1&3]||e[u+2&3]||e[u+3&3])&&(n=e,h=u)}for(;f.data!==t;)if(!(f=(r=f).next))return this;(i=f.next)&&delete f.next,r?i?r.next=i:delete r.next:e?(i?e[u]=i:delete e[u],(f=e[0]||e[1]||e[2]||e[3])&&f===(e[3]||e[2]||e[1]||e[0])&&!f.length&&(n?n[h]=f:this._root=f)):this._root=i}}return this},Io.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},Io.root=function(){return this._root},Io.size=function(){var e=0;return this.visit(function(t){if(!t.length)for(;++e,t=t.next;);}),e},Io.visit=function(t){var e,n,r,i,a,o,s,l=[],c=this._root;for(c&&l.push(new B0(c,this._x0,this._y0,this._x1,this._y1));a=l.pop();)!t(c=a.node,n=a.x0,r=a.y0,i=a.x1,a=a.y1)&&c.length&&(o=(n+i)/2,s=(r+a)/2,(e=c[3])&&l.push(new B0(e,o,s,i,a)),(e=c[2])&&l.push(new B0(e,n,s,o,a)),(e=c[1])&&l.push(new B0(e,o,r,i,s)),e=c[0])&&l.push(new B0(e,n,r,o,s));return this},Io.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new B0(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i,a,o,s,l,c,u,h=e.node;h.length&&(a=e.x0,o=e.y0,c=(a+(s=e.x1))/2,u=(o+(l=e.y1))/2,(i=h[0])&&n.push(new B0(i,a,o,c,u)),(i=h[1])&&n.push(new B0(i,c,o,s,u)),(i=h[2])&&n.push(new B0(i,a,u,c,l)),i=h[3])&&n.push(new B0(i,c,u,s,l)),r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},Io.x=function(t){return arguments.length?(this._x=t,this):this._x},Io.y=function(t){return arguments.length?(this._y=t,this):this._y};var U0={value:()=>{}};function X0(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new K0(r)}function K0(t){this._=t}function Z0(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=U0,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}K0.prototype=X0.prototype={constructor:K0,on:function(t,e){var n,r,i=this._,a=(r=i,(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(0<=n&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(n=(t=a[o]).type)i[n]=Z0(i[n],t.name,e);else if(null==e)for(n in i)i[n]=Z0(i[n],t.name,null);return this}for(;++o<s;)if(n=(n=(t=a[o]).type)&&function(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}(i[n],t.name))return n},copy:function(){var t,e={},n=this._;for(t in n)e[t]=n[t].slice();return new K0(e)},call:function(t,e){if(0<(n=arguments.length-2))for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var Q0,J0,tg=0,eg=0,ng=0,rg=1e3,ig=0,ag=0,og=0,sg="object"==typeof performance&&performance.now?performance:Date,lg="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function cg(){return ag||(lg(ug),ag=sg.now()+og)}function ug(){ag=0}function hg(){this._call=this._time=this._next=null}function fg(t,e,n){var r=new hg;return r.restart(t,e,n),r}function dg(){ag=(ig=sg.now())+og,tg=eg=0;try{cg(),++tg;for(var t,e=Q0;e;)0<=(t=ag-e._time)&&e._call.call(void 0,t),e=e._next;--tg}finally{for(var n,r,i=Q0,a=1/(tg=0);i;)i=i._call?(a>i._time&&(a=i._time),(n=i)._next):(r=i._next,i._next=null,n?n._next=r:Q0=r);J0=n,gg(a),ag=0}}function pg(){var t=sg.now(),e=t-ig;rg<e&&(og-=e,ig=t)}function gg(t){tg||(eg=eg&&clearTimeout(eg),24<t-ag?(t<1/0&&(eg=setTimeout(dg,t-sg.now()-og)),ng=ng&&clearInterval(ng)):(ng||(ig=sg.now(),ng=setInterval(pg,rg)),tg=1,lg(dg)))}hg.prototype=fg.prototype={constructor:hg,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?cg():+n)+(null==e?0:+e),this._next||J0===this||(J0?J0._next=this:Q0=this,J0=this),this._call=t,this._time=n,gg()},stop:function(){this._call&&(this._call=null,this._time=1/0,gg())}};const mg=4294967296;function vg(t){return t.x}function yg(t){return t.y}var bg=10,xg=Math.PI*(3-Math.sqrt(5));function wg(l){var a,o=1,e=.001,s=1-Math.pow(e,1/300),c=0,u=.6,h=new Map,t=fg(i),n=X0("tick","end"),r=function(){let t=1;return()=>(t=(1664525*t+1013904223)%mg)/mg}();function i(){f(),n.call("tick",a),o<e&&(t.stop(),n.call("end",a))}function f(t){var e,n,r=l.length;void 0===t&&(t=1);for(var i=0;i<t;++i)for(o+=(c-o)*s,h.forEach(function(t){t(o)}),e=0;e<r;++e)null==(n=l[e]).fx?n.x+=n.vx*=u:(n.x=n.fx,n.vx=0),null==n.fy?n.y+=n.vy*=u:(n.y=n.fy,n.vy=0);return a}function d(){for(var t,e,n,r=0,i=l.length;r<i;++r)(n=l[r]).index=r,null!=n.fx&&(n.x=n.fx),null!=n.fy&&(n.y=n.fy),(isNaN(n.x)||isNaN(n.y))&&(t=bg*Math.sqrt(.5+r),e=r*xg,n.x=t*Math.cos(e),n.y=t*Math.sin(e)),(isNaN(n.vx)||isNaN(n.vy))&&(n.vx=n.vy=0)}function p(t){return t.initialize&&t.initialize(l,r),t}return null==l&&(l=[]),d(),a={tick:f,restart:function(){return t.restart(i),a},stop:function(){return t.stop(),a},nodes:function(t){return arguments.length?(l=t,d(),h.forEach(p),a):l},alpha:function(t){return arguments.length?(o=+t,a):o},alphaMin:function(t){return arguments.length?(e=+t,a):e},alphaDecay:function(t){return arguments.length?(s=+t,a):+s},alphaTarget:function(t){return arguments.length?(c=+t,a):c},velocityDecay:function(t){return arguments.length?(u=1-t,a):1-u},randomSource:function(t){return arguments.length?(r=t,h.forEach(p),a):r},force:function(t,e){return 1<arguments.length?(null==e?h.delete(t):h.set(t,p(e)),a):h.get(t)},find:function(t,e,n){var r,i,a,o=0,s=l.length;for(null==n?n=1/0:n*=n,o=0;o<s;++o)(r=(r=t-(i=l[o]).x)*r+(r=e-i.y)*r)<n&&(a=i,n=r);return a},on:function(t,e){return 1<arguments.length?(n.on(t,e),a):n.on(t)}}}function Mg(t,e,n){var i,l,c,u,h,r,f,d,p,{nodes:t,links:a}=t,{joint:e,nodeStrength:o,linkStrength:s}=e,{linkKey:n=t=>t.id}=n,I=(r=Y0(-30),d=(f=1)/0,p=.81,g.initialize=function(t,e){i=t,c=e,B()},g.strength=function(t){return arguments.length?(r="function"==typeof t?t:Y0(+t),B(),g):r},g.distanceMin=function(t){return arguments.length?(f=t*t,g):Math.sqrt(f)},g.distanceMax=function(t){return arguments.length?(d=t*t,g):Math.sqrt(d)},g.theta=function(t){return arguments.length?(p=t*t,g):Math.sqrt(p)},g);function g(t){var e,n=i.length,r=z0(i,vg,yg).visitAfter(D);for(u=t,e=0;e<n;++e)l=i[e],r.visit(F)}function B(){if(i){var t,e,n=i.length;for(h=new Array(n),t=0;t<n;++t)e=i[t],h[e.index]=+r(e,t,i)}}function D(t){var e,n,r,i,a,o=0,s=0;if(t.length){for(r=i=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(o+=e.value,s+=n,r+=n*e.x,i+=n*e.y);t.x=r/s,t.y=i/s}else for((e=t).x=e.data.x,e.y=e.data.y;o+=h[e.data.index],e=e.next;);t.value=o}function F(t,e,n,r){if(!t.value)return!0;var i=t.x-l.x,a=t.y-l.y,o=r-e,s=i*i+a*a;if(o*o/p<s)return s<d&&(0===i&&(s+=(i=H0(c))*i),0===a&&(s+=(a=H0(c))*a),s<f&&(s=Math.sqrt(f*s)),l.vx+=i*t.value*u/s,l.vy+=a*t.value*u/s),!0;if(!(t.length||d<=s))for((t.data!==l||t.next)&&(0===i&&(s+=(i=H0(c))*i),0===a&&(s+=(a=H0(c))*a),s<f)&&(s=Math.sqrt(f*s));t.data!==l&&(o=h[t.data.index]*u/s,l.vx+=i*o,l.vy+=a*o),t=t.next;);}var m,v,y,b,x,w,M,k,E,O,S,_,A,T,n=$0(a).id(bd(n)),P=("function"==typeof o&&I.strength(o),"function"==typeof s&&n.strength(s),wg(t).force("link",n).force("charge",I));function L(t){for(var e,n=0,r=v.length;n<r;++n)(e=v[n]).vy+=(b[n]-e.y)*y[n]*t}function C(){if(v){var t,e=v.length;for(y=new Array(e),b=new Array(e),t=0;t<e;++t)y[t]=isNaN(b[t]=+m(v[t],t,v))?0:+x(v[t],t,v)}}function N(t){for(var e,n=0,r=M.length;n<r;++n)(e=M[n]).vx+=(E[n]-e.x)*k[n]*t}function j(){if(M){var t,e=M.length;for(k=new Array(e),E=new Array(e),t=0;t<e;++t)k[t]=isNaN(E[t]=+w(M[t],t,M))?0:+O(M[t],t,M)}}function R(){for(var t,e=A.length,n=0,r=0,i=0;i<e;++i)n+=(t=A[i]).x,r+=t.y;for(n=(n/e-S)*T,r=(r/e-_)*T,i=0;i<e;++i)(t=A[i]).x-=n,t.y-=r}e?P.force("center",(T=1,null==S&&(S=0),null==_&&(_=0),R.initialize=function(t){A=t},R.x=function(t){return arguments.length?(S=+t,R):S},R.y=function(t){return arguments.length?(_=+t,R):_},R.strength=function(t){return arguments.length?(T=+t,R):T},R)):P.force("x",(O=Y0(.1),"function"!=typeof w&&(w=Y0(null==w?0:+w)),N.initialize=function(t){M=t,j()},N.strength=function(t){return arguments.length?(O="function"==typeof t?t:Y0(+t),j(),N):O},N.x=function(t){return arguments.length?(w="function"==typeof t?t:Y0(+t),j(),N):w},N)).force("y",(x=Y0(.1),"function"!=typeof m&&(m=Y0(null==m?0:+m)),L.initialize=function(t){v=t,C()},L.strength=function(t){return arguments.length?(x="function"==typeof t?t:Y0(+t),C(),L):x},L.y=function(t){return arguments.length?(m="function"==typeof t?t:Y0(+t),C(),L):m},L)),P.stop();var z=Math.ceil(Math.log(P.alphaMin())/Math.log(1-P.alphaDecay()));for(let t=0;t<z;t++)P.tick();return{nodesData:t,linksData:a}}const kg=g=>()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={},tooltip:l={}}=g;const{nodeKey:c=t=>t.id,linkKey:u=t=>t.id}=e,h=nt(e,["nodeKey","linkKey"]);var e=Object.assign({nodeKey:c,linkKey:u},h),f=it(e,"node"),d=it(e,"link"),{links:t,nodes:p}=wd(t,e),{nodesData:t,linksData:p}=Mg({links:t,nodes:p},rt({},{joint:!0},i),e),i=g0(l,"link",{items:[t=>({name:"source",value:bd(u)(t.source)}),t=>({name:"target",value:bd(u)(t.target)})]}),e=g0(l,"node",{items:[t=>({name:"key",value:bd(c)(t)})]},!0);return[rt({},{type:"link",axis:!1,legend:!1,encode:{x:[t=>t.source.x,t=>t.target.x],y:[t=>t.source.y,t=>t.target.y]},style:{stroke:"#999",strokeOpacity:.6}},{data:p,encode:d,labels:o,style:it(r,"link"),tooltip:i,animate:y0(s,"link")}),rt({},{type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},scale:{color:{type:"ordinal"}},style:{stroke:"#fff"}},{data:t,encode:Object.assign({},f),scale:n,style:it(r,"node"),tooltip:e,labels:[Object.assign(Object.assign({},{text:""}),it(r,"label")),...a],animate:y0(s,"link")})]},Eg=(kg.props={},h=>u=>t=>{const{field:e="value",nodeSize:n,separation:r,sortBy:i,as:a=["x","y"]}=u,[o,s]=a;var t=gf(t,t=>t.children).sum(t=>t[e]).sort(i),l=h();l.size([1,1]),n&&l.nodeSize(n),r&&l.separation(r),l(t);const c=[];t.each(t=>{t[o]=t.x,t[s]=t.y,t.name=t.data.name,c.push(t)});l=t.links();return l.forEach(t=>{t[o]=[t.source[o],t.target[o]],t[s]=[t.source[s],t.target[s]]}),{nodes:c,edges:l}}),Og=t=>Eg(df)(t),Sg=(Og.props={},t=>Eg(nd)(t)),_g=(Sg.props={},u=>{const h={sortBy:(t,e)=>e.value-t.value},f={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},d={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},p={text:"",fontSize:10};return()=>{var{data:t,encode:e={},scale:n={},style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={},tooltip:l={}}=u,c=null==e?void 0:e.value,{nodes:i,edges:c}=Sg(Object.assign(Object.assign(Object.assign({},h),i),{field:c}))(t),t=g0(l,"node",{title:"name",items:["value"]},!0),l=g0(l,"link",{title:"",items:[t=>({name:"source",value:t.source.name}),t=>({name:"target",value:t.target.name})]});return[rt({},d,{data:c,encode:it(e,"link"),scale:it(n,"link"),labels:o,style:Object.assign({stroke:"#999"},it(r,"link")),tooltip:l,animate:y0(s,"link")}),rt({},f,{data:i,scale:it(n,"node"),encode:it(e,"node"),labels:[Object.assign(Object.assign({},p),it(r,"label")),...a],style:Object.assign({},it(r,"node")),tooltip:t,animate:y0(s,"node")})]}});_g.props={};var Ag={},Tg={},Pg=34,Lg=10,Cg=13;function Ng(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function jg(t){var n=Object.create(null),r=[];return t.forEach(function(t){for(var e in t)e in n||r.push(n[e]=e)}),r}function Rg(t,e){var t=t+"",n=t.length;return n<e?new Array(e-n+1).join(0)+t:t}function Ig(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+Rg(-e,6):9999<e?"+"+Rg(e,6):Rg(e,4))+"-"+Rg(t.getUTCMonth()+1,2)+"-"+Rg(t.getUTCDate(),2)+(a?"T"+Rg(n,2)+":"+Rg(r,2)+":"+Rg(i,2)+"."+Rg(a,3)+"Z":i?"T"+Rg(n,2)+":"+Rg(r,2)+":"+Rg(i,2)+"Z":r||n?"T"+Rg(n,2)+":"+Rg(r,2)+"Z":"")}function Bg(r){var e=new RegExp('["'+r+"\n\r]"),h=r.charCodeAt(0);function n(r,t){var e,n=[],i=r.length,a=0,o=0,s=i<=0,l=!1;function c(){if(s)return Tg;if(l)return l=!1,Ag;var t,e,n=a;if(r.charCodeAt(n)===Pg){for(;a++<i&&r.charCodeAt(a)!==Pg||r.charCodeAt(++a)===Pg;);return(t=a)>=i?s=!0:(e=r.charCodeAt(a++))===Lg?l=!0:e===Cg&&(l=!0,r.charCodeAt(a)===Lg)&&++a,r.slice(n+1,t-1).replace(/""/g,'"')}for(;a<i;){if((e=r.charCodeAt(t=a++))===Lg)l=!0;else if(e===Cg)l=!0,r.charCodeAt(a)===Lg&&++a;else if(e!==h)continue;return r.slice(n,t)}return s=!0,r.slice(n,i)}for(r.charCodeAt(i-1)===Lg&&--i,r.charCodeAt(i-1)===Cg&&--i;(e=c())!==Tg;){for(var u=[];e!==Ag&&e!==Tg;)u.push(e),e=c();t&&null==(u=t(u,o++))||n.push(u)}return n}function i(t,n){return t.map(function(e){return n.map(function(t){return o(e[t])}).join(r)})}function a(t){return t.map(o).join(r)}function o(t){return null==t?"":t instanceof Date?Ig(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,a){var o,s;return(t=n(t,function(t,e){if(o)return o(t,e-1);var n,r,i;s=t,o=a?(r=a,i=Ng(n=t),function(t,e){return r(i(t),e,n)}):Ng(t)})).columns=s||[],t},parseRows:n,format:function(t,e){return[(e=null==e?jg(t):e).map(o).join(r)].concat(i(t,e)).join("\n")},formatBody:function(t,e){return i(t,e=null==e?jg(t):e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}function Dg(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;Fg&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}const Fg=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),zg=t=>{const{value:n,format:r=n.split(".").pop(),delimiter:i=",",autoType:a=!0}=t;return()=>ce(void 0,void 0,void 0,function*(){var t,e=yield fetch(n);if("csv"===r)return t=yield e.text(),Bg(i).parse(t,a?Dg:a0);if("json"===r)return yield e.json();throw new Error(`Unknown format: ${r}.`)})};zg.props={};const Gg=t=>{const{fields:n,key:r="key",value:i="value"}=t;return t=>{var e;return(e=n)&&0!==Object.keys(e).length?t.flatMap(e=>n.map(t=>Object.assign(Object.assign({},e),{[r]:t,[i]:e[t]}))):t}};Gg.props={};const Wg=t=>{const{callback:e=function(t){return null!=t&&!Number.isNaN(t)}}=t;return t=>t.filter(e)},Yg=(Wg.props={},t=>{const e=t["callback"];return t=>Array.isArray(t)?[...t].sort(e):t});Yg.props={};const Hg=t=>{const e=t["fields"];return t=>t.map(t=>{return[n,t=[]]=[t,e],t.reduce((t,e)=>(e in n&&(t[e]=n[e]),t),{});var n})};Hg.props={};const Vg=r=>t=>{return r&&0!==Object.keys(r).length?t.map(t=>Object.entries(t).reduce((t,[e,n])=>(t[r[e]||e]=n,t),{})):t};Vg.props={};const qg=t=>{var r,{fields:t=[]}=t;r=!0;const e=t.map(t=>{var e,n;return Array.isArray(t)?([e,n=r]=t,[e,n]):[t,r]});return t=>{return[...t].sort((r,i)=>e.reduce((t,[e,n=!0])=>0!==t?t:n?r[e]<i[e]?-1:+(r[e]!==i[e]):r[e]>i[e]?-1:+(r[e]!==i[e]),0))}},$g=(qg.props={},t=>{const e=t["value"];return()=>e}),Ug=($g.props={},t=>{const{callback:e=a0}=t;return t=>e(t)}),Xg=(Ug.props={},t=>{const{callback:e=a0}=t;return t=>Array.isArray(t)?t.map(e):t});Xg.props={};var Kg=Object.freeze({__proto__:null,weight:function(t,e){return e.value-t.value},frequency:function(t,e){return e.frequency-t.frequency},id:function(t,e){return(""+t.id).localeCompare(""+e.id)},name:function(t,e){return(""+t.name).localeCompare(""+e.name)}});const Zg={y:0,thickness:.05,weight:!1,marginRatio:.1,id:t=>t.id,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null};function Qg(t){const{y:c,thickness:u,weight:h,marginRatio:f,id:d,source:p,target:g,sourceWeight:m,targetWeight:v,sortBy:y}=Object.assign(Object.assign({},Zg),t);return function(t){var e=t.nodes.map(t=>Object.assign({},t)),t=t.edges.map(t=>Object.assign({},t));{var n=e,r=t;r.forEach(t=>{t.source=p(t),t.target=g(t),t.sourceWeight=m(t),t.targetWeight=v(t)});const i=Fd(r,t=>t.source),a=Fd(r,t=>t.target);n.forEach(t=>{t.id=d(t);var e=i.has(t.id)?i.get(t.id):[],n=a.has(t.id)?a.get(t.id):[];t.frequency=e.length+n.length,t.value=dp(e,t=>t.sourceWeight)+dp(n,t=>t.targetWeight)})}if(r=e,(n="function"==typeof y?y:Kg[y])&&r.sort(n),!(n=(r=e).length))throw s0("Invalid nodes: it's empty!");if(h){const o=f/(2*n),s=r.reduce((t,e)=>t+e.value,0);r.reduce((t,e)=>{e.weight=e.value/s,e.width=e.weight*(1-f),e.height=u;var n=o+t,r=n+e.width,i=c-u/2,a=i+u;return e.x=[n,r,r,n],e.y=[i,i,a,a],t+e.width+2*o},0)}else{const l=1/n;r.forEach((t,e)=>{t.x=(e+.5)*l,t.y=c})}return function(t,e){const r=new Map(t.map(t=>[t.id,t]));if(!h)return e.forEach(t=>{var e=p(t),n=g(t),e=r.get(e),n=r.get(n);e&&n&&(t.x=[e.x,n.x],t.y=[e.y,n.y])});e.forEach(t=>{t.x=[0,0,0,0],t.y=[c,c,c,c]});const s=Fd(e,t=>t.source),l=Fd(e,t=>t.target);t.forEach(n=>{const{width:r,value:i,id:t}=n;var e=s.get(t)||[],a=l.get(t)||[];let o=0;e.map(t=>{var e=t.sourceWeight/i*r;t.x[0]=n.x[0]+o,t.x[1]=n.x[0]+o+e,o+=e}),a.forEach(t=>{var e=t.targetWeight/i*r;t.x[3]=n.x[0]+o,t.x[2]=n.x[0]+o+e,o+=e})})}(e,t),{nodes:e,edges:t}}}const Jg=e=>t=>Qg(e)(t),tm=(Jg.props={},Math.PI/180),em=64,nm=2048;function rm(t){return t.text}function im(){return"serif"}function am(){return"normal"}function om(t){return t.value}function sm(){return 90*~~(2*Math.random())}function lm(){return 1}function cm(){}function um(t,o,r,s){if(!o.sprite){var l=t.context,c=t.ratio;l.clearRect(0,0,(em<<5)/c,nm/c);let i=0,a=0,n=0;var u,h,f,d,e=r.length;for(--s;++s<e;){o=r[s],l.save(),l.font=o.style+" "+o.weight+" "+~~((o.size+1)/c)+"px "+o.font;let t=l.measureText(o.text+"m").width*c,e=o.size<<1;if(o.rotate?(d=Math.sin(o.rotate*tm),f=Math.cos(o.rotate*tm),u=t*f,h=t*d,f=e*f,d=e*d,t=Math.max(Math.abs(u+d),Math.abs(u-d))+31>>5<<5,e=~~Math.max(Math.abs(h+f),Math.abs(h-f))):t=t+31>>5<<5,e>n&&(n=e),i+t>=em<<5&&(i=0,a+=n,n=0),a+e>=nm)break;l.translate((i+(t>>1))/c,(a+(e>>1))/c),o.rotate&&l.rotate(o.rotate*tm),l.fillText(o.text,0,0),o.padding&&(l.lineWidth=2*o.padding,l.strokeText(o.text,0,0)),l.restore(),o.width=t,o.height=e,o.xoff=i,o.yoff=a,o.x1=t>>1,o.y1=e>>1,o.x0=-o.x1,o.y0=-o.y1,o.hasText=!0,i+=t}for(var p=l.getImageData(0,0,(em<<5)/c,nm/c).data,g=[];0<=--s;)if((o=r[s]).hasText){var m=o.width,v=m>>5;let n=o.y1-o.y0;for(let t=0;t<n*v;t++)g[t]=0;if(null==(i=o.xoff))return;a=o.yoff;let r=0,t=-1;for(let e=0;e<n;e++){for(let t=0;t<m;t++){var y=v*e+(t>>5),b=p[(a+e)*(em<<5)+(i+t)<<2]?1<<31-t%32:0;g[y]|=b,r|=b}r?t=e:(o.y0++,n--,e--,a++)}o.y1=o.y0+t,o.sprite=g.slice(0,(o.y1-o.y0)*v)}}}function hm(t){const e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function fm(t){var e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function dm(){return document.createElement("canvas")}function pm(t){return"function"==typeof t?t:function(){return t}}const gm={archimedean:hm,rectangular:function(t){const n=4*t[0]/t[1];let r=0,i=0;return function(t){var e=t<0?-1:1;switch(Math.sqrt(1+4*e*t)-e&3){case 0:r+=n;break;case 1:i+=4;break;case 2:r-=n;break;default:i-=4}return[r,i]}}};function mm(){let b=[256,256],r=rm,i=im,p=om,g=am,m=sm,v=lm,x=hm,w=Math.random,y=cm,M=[],k=null,E=1/0;const O=am,S=dm,_={};return _.start=function(){const[a,o]=b,s=((t=S()).width=t.height=1,e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2),t.width=(em<<5)/e,t.height=nm/e,(t=t.getContext("2d")).fillStyle=t.strokeStyle="red",t.textAlign="center",{context:t,ratio:e}),l=_.board||fm((b[0]>>5)*b[1]),c=M.length,u=[],h=M.map(function(t,e,n){return t.text=r.call(this,t,e,n),t.font=i.call(this,t,e,n),t.style=O.call(this,t,e,n),t.weight=g.call(this,t,e,n),t.rotate=m.call(this,t,e,n),t.size=~~p.call(this,t,e,n),t.padding=v.call(this,t,e,n),t}).sort(function(t,e){return e.size-t.size});var t,e;let f=-1,d=_.board?[{x:0,y:0},{x:a,y:o}]:void 0;function n(){for(var t,e,n,r=Date.now();Date.now()-r<E&&++f<c;){var i=h[f];i.x=a*(w()+.5)>>1,i.y=o*(w()+.5)>>1,um(s,i,h,f),i.hasText&&function(i,t,e){var n=t.x,r=t.y,a=Math.sqrt(b[0]*b[0]+b[1]*b[1]),o=x(b),s=w()<.5?1:-1;let l,c=-s,u,h;for(;(l=o(c+=s))&&(u=~~l[0],h=~~l[1],!(Math.min(Math.abs(u),Math.abs(h))>=a));)if(t.x=n+u,t.y=r+h,!(t.x+t.x0<0||t.y+t.y0<0||t.x+t.x1>b[0]||t.y+t.y1>b[1])&&(!e||!function(t,n,r){var i=t.sprite,a=t.width>>5,e=t.x-(a<<4),o=127&e,s=32-o,l=t.y1-t.y0;let c=(t.y+t.y0)*(r>>=5)+(e>>5),u;for(let e=0;e<l;e++){for(let t=u=0;t<=a;t++)if((u<<s|(t<a?(u=i[e*a+t])>>>o:0))&n[c+t])return 1;c+=r}}(t,i,b[0]))&&(!e||function(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0<e[1].x&&t.y+t.y1>e[0].y&&t.y+t.y0<e[1].y}(t,e))){var f=t.sprite,d=t.width>>5,p=b[0]>>5,g=t.x-(d<<4),m=127&g,v=32-m,y=t.y1-t.y0;let n,r=(t.y+t.y0)*p+(g>>5);for(let e=0;e<y;e++){for(let t=n=0;t<=d;t++)i[r+t]|=n<<v|(t<d?(n=f[e*d+t])>>>m:0);r+=p}return delete t.sprite,1}return}(l,i,d)&&(y.call(null,"word",{cloud:_,word:i}),u.push(i),d?_.hasImage||(t=d,e=i,n=void 0,n=t[0],t=t[1],e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>t.x&&(t.x=e.x+e.x1),e.y+e.y1>t.y&&(t.y=e.y+e.y1)):d=[{x:i.x+i.x0,y:i.y+i.y0},{x:i.x+i.x1,y:i.y+i.y1}],i.x-=b[0]>>1,i.y-=b[1]>>1)}_._tags=u,_._bounds=d,f>=c&&(_.stop(),y.call(null,"end",{cloud:_,words:u,bounds:d}))}return k&&clearInterval(k),k=setInterval(n,0),n(),_},_.stop=function(){return k&&(clearInterval(k),k=null),_},_.createMask=t=>{var e=document.createElement("canvas"),[n,r]=b;if(n&&r){var i=n>>5,a=fm((n>>5)*r),e=(e.width=n,e.height=r,e.getContext("2d")),o=(e.drawImage(t,0,0,t.width,t.height,0,0,n,r),e.getImageData(0,0,n,r).data);for(let e=0;e<r;e++)for(let t=0;t<n;t++){var s=i*e+(t>>5),l=e*n+t<<2,l=250<=o[l]&&250<=o[1+l]&&250<=o[2+l]?1<<31-t%32:0;a[s]|=l}_.board=a,_.hasImage=!0}},_.timeInterval=function(t){E=null==t?1/0:t},_.words=function(t){M=t},_.size=function(t=[]){b=[+t[0],+t[1]]},_.text=function(t){r=pm(t)},_.font=function(t){i=pm(t)},_.fontWeight=function(t){g=pm(t)},_.rotate=function(t){m=pm(t)},_.spiral=function(t){x=gm[t]||t},_.fontSize=function(t){p=pm(t)},_.padding=function(t){v=pm(t)},_.random=function(t){w=pm(t)},_.on=function(t){y=pm(t)},_}const vm={size:[500,500],fontSize:[14,28]};function ym(r){return new Promise((t,e)=>{if(r instanceof HTMLImageElement)t(r);else if("string"==typeof r){const n=new Image;n.crossOrigin="anonymous",n.src=r,n.onload=()=>t(n),void(n.onerror=()=>{console.error(`'image ${r} load failed !!!'`),e()})}else e()})}const bm=f=>h=>ce(void 0,void 0,void 0,function*(){var i,a,t=Object.assign({},vm,f),e=mm(),e=(i=e,a=t,yield{set(t,e,n){return void 0!==a[t]&&(e=e?e.call(null,a[t]):a[t],n?n.call(null,e):"function"==typeof i[t]?i[t](e):i[t]=e),this},setAsync(e,n,r){return ce(this,void 0,void 0,function*(){var t;return void 0!==a[e]&&(t=n?yield n.call(null,a[e]):a[e],r?r.call(null,t):"function"==typeof i[e]?i[e](t):i[e]=t),this})}}.set("fontSize",t=>{var e=h.map(t=>t.value),n=t,t=[rp(e),ep(e)];if("function"==typeof n)return n;if(Array.isArray(n)){const[r,i]=n;if(!t)return()=>(i+r)/2;const[a,o]=t;return o===a?()=>(i+r)/2:({value:t})=>(i-r)/(o-a)*(t-a)+r}return()=>n}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").setAsync("imageMask",ym,e.createMask),e.words([...h]),e.start());const[r,o]=t.size;var t=[{x:0,y:0},{x:r,y:o}],{_bounds:e=t,_tags:t,hasImage:n}=e,t=t.map(t=>{var{x:e,y:n}=t,t=nt(t,["x","y"]);return Object.assign(Object.assign({},t),{x:e+r/2,y:n+o/2})}),[{x:e,y:s},{x:l,y:c}]=e,u={text:"",value:0,opacity:0,fontSize:0};return t.push(Object.assign(Object.assign({},u),{x:n?0:e,y:n?0:s}),Object.assign(Object.assign({},u),{x:n?r:l,y:n?o:c})),t});function xm(e){return"string"==typeof e?t=>t[e]:e}bm.props={};const wm=t=>{const{join:e,on:n,select:i=[],as:a=i,unknown:o=NaN}=t;var[t,r]=n;const s=xm(r),l=xm(t),c=zd(e,([t])=>t,t=>s(t));return t=>t.map(t=>{const r=c.get(l(t));return Object.assign(Object.assign({},t),i.reduce((t,e,n)=>(t[a[n]]=r?r[e]:o,t),{}))})},Mm=(wm.props={},t=>{const{start:e,end:n}=t;return t=>t.slice(e,n)});Mm.props={};var km,Em,Om,Sm,pl={exports:{}},Yo={exports:{}};function _m(t){return 1-Math.abs(t)}km=(Ho=Yo).exports,Ho.exports.isNumber=function(t){return"number"==typeof t},Ho.exports.findMin=function(t){if(0===t.length)return 1/0;for(var e=t[0],n=1;n<t.length;n++)e=Math.min(e,t[n]);return e},Ho.exports.findMax=function(t){if(0===t.length)return-1/0;for(var e=t[0],n=1;n<t.length;n++)e=Math.max(e,t[n]);return e},Ho.exports.findMinMulti=function(t){for(var e=km.findMin(t[0]),n=1;n<t.length;n++)e=Math.min(e,km.findMin(t[n]));return e},Ho.exports.findMaxMulti=function(t){for(var e=km.findMax(t[0]),n=1;n<t.length;n++)e=Math.max(e,km.findMax(t[n]));return e},Ho.exports.inside=function(t,e,n){return t<=n&&n<=e},Vo=pl,Em=Math.log(2),Om=Vo.exports,Sm=Yo.exports,Vo.exports.getUnifiedMinMax=function(t,e){return Om.getUnifiedMinMaxMulti([t],e)},Vo.exports.getUnifiedMinMaxMulti=function(t,e){var n=!1,r=!1,i=Sm.isNumber((e=e||{}).width)?e.width:2,a=Sm.isNumber(e.size)?e.size:50,o=Sm.isNumber(e.min)?e.min:(n=!0,Sm.findMinMulti(t)),e=Sm.isNumber(e.max)?e.max:(r=!0,Sm.findMaxMulti(t)),t=(e-o)/(a-1);return n&&(o-=2*i*t),r&&(e+=2*i*t),{min:o,max:e}},Vo.exports.create=function(t,e){if(!t||0===t.length)return[];var n=Sm.isNumber((e=e||{}).size)?e.size:50,o=Sm.isNumber(e.width)?e.width:2,e=Om.getUnifiedMinMax(t,{size:n,width:o,min:e.min,max:e.max}),s=e.min,e=e.max-s,l=e/(n-1);if(0==e)return[{x:s,y:1}];for(var c=[],r=0;r<n;r++)c.push({x:s+r*l,y:0});var u=function(t,e){for(var n={},r=0,i=-e;i<=e;i++)r+=t(i/e),n[i]=r;return n}(_m,o),h=u[o],f=u[o-1]-u[o-2],d=0,i=(t.forEach(function(t){var e,n,r,i,a,t=Math.floor((t-s)/l);t+o<0||c.length<=t-o||(r=Math.max(t-o,0),e=t,n=Math.min(t+o,c.length-1),i=u[-o-1+(r=r-(t-o))]||0,a=u[-o-1+(t+o-n)]||0,i=h/(h-i-a),0<r&&(d+=i*(r-1)*f),a=Math.max(0,t-o+1),Sm.inside(0,c.length-1,a)&&(c[a].y+=i*f),Sm.inside(0,c.length-1,e+1)&&(c[e+1].y-=2*i*f),Sm.inside(0,c.length-1,n+1)&&(c[n+1].y+=i*f))}),d),a=0,p=0;return c.forEach(function(t){a+=t.y,i+=a,t.y=i,p+=i}),0<p&&c.forEach(function(t){t.y/=p}),c},Vo.exports.getExpectedValueFromPdf=function(t){var e;if(t&&0!==t.length)return e=0,t.forEach(function(t){e+=t.x*t.y}),e},Vo.exports.getXWithLeftTailArea=function(t,e){if(t&&0!==t.length){for(var n=0,r=0,i=0;i<t.length&&!(e<=(n+=t[r=i].y));i++);return t[r].x}},Vo.exports.getPerplexity=function(t){var n;if(t&&0!==t.length)return n=0,t.forEach(function(t){var e=Math.log(t.y);isFinite(e)&&(n+=t.y*e)}),n=-n/Em,Math.pow(2,n)};var Am=pl.exports;const Tm=t=>{const{field:r,groupBy:n,as:e=["y","size"],min:i,max:a,size:o=10,width:s}=t,[l,c]=e;return t=>{return Array.from(Fd(t,e=>n.map(t=>e[t]).join("-")).values()).map(t=>{var e=Am.create(t.map(t=>t[r]),{min:i,max:a,size:o,width:s}),n=e.map(t=>t.x),e=e.map(t=>t.y);return Object.assign(Object.assign({},t[0]),{[l]:n,[c]:e})})}};Tm.props={};var Pm={exports:{}};function Lm(t){for(var e=new Array(t),n=0;n<t;++n)e[n]=0;return e}function Cm(t,e){for(var n=0,r=0;r<t.length;++r)n+=t[r]*e[r];return n}function Nm(t){return Math.sqrt(Cm(t,t))}function jm(t,e,n){for(var r=0;r<e.length;++r)t[r]=e[r]*n}function Rm(t,e,n,r,i){for(var a=0;a<t.length;++a)t[a]=e*n[a]+r*i[a]}function Im(i,a,o,s,l,c,u){var h=o.fx,f=Cm(o.fxprime,a),d=h,t=h,p=f,e=0;function n(t,e,n){for(var r=0;r<16;++r)if(l=(t+e)/2,Rm(s.x,1,o.x,l,a),d=s.fx=i(s.x,s.fxprime),p=Cm(s.fxprime,a),h+c*l*f<d||n<=d)e=l;else{if(Math.abs(p)<=-u*f)return l;0<=p*(e-t)&&(e=t),t=l,n=d}return 0}l=l||1,c=c||1e-6,u=u||.1;for(var r=0;r<10;++r){if(Rm(s.x,1,o.x,l,a),d=s.fx=i(s.x,s.fxprime),p=Cm(s.fxprime,a),h+c*l*f<d||r&&t<=d)return n(e,l,t);if(Math.abs(p)<=-u*f)return l;if(0<=p)return n(l,e,d);t=d,e=l,l*=2}return l}(Uo=Uo=Pm.exports).bisect=function(t,e,n,r){var i=(r=r||{}).maxIterations||100,a=r.tolerance||1e-10,o=t(e),r=t(n),s=n-e;if(0<o*r)throw"Initial bisect points must have opposite signs";if(0===o)return e;if(0===r)return n;for(var l=0;l<i;++l){var c=e+(s/=2),u=t(c);if(0<=u*o&&(e=c),Math.abs(s)<a||0===u)return c}return e+s},Uo.nelderMead=function(t,e,n){var r,i=(n=n||{}).maxIterations||200*e.length,a=n.nonZeroDelta||1.05,o=n.zeroDelta||.001,s=n.minErrorDelta||1e-6,l=n.minErrorDelta||1e-5,c=void 0!==n.rho?n.rho:1,u=void 0!==n.chi?n.chi:2,h=void 0!==n.psi?n.psi:-.5,f=void 0!==n.sigma?n.sigma:.5,d=e.length,p=new Array(d+1);p[0]=e,p[0].fx=t(e);for(var g=p[0].id=0;g<d;++g){var m=e.slice();m[g]=m[g]?m[g]*a:o,p[g+1]=m,p[g+1].fx=t(m),p[g+1].id=g+1}function v(t){for(var e=0;e<t.length;e++)p[d][e]=t[e];p[d].fx=t.fx}for(var y=function(t,e){return t.fx-e.fx},b=e.slice(),x=e.slice(),w=e.slice(),M=e.slice(),k=0;k<i;++k){for(p.sort(y),n.history&&((O=p.map(function(t){var e=t.slice();return e.fx=t.fx,e.id=t.id,e})).sort(function(t,e){return t.id-e.id}),n.history.push({x:p[0].slice(),fx:p[0].fx,simplex:O})),g=r=0;g<d;++g)r=Math.max(r,Math.abs(p[0][g]-p[1][g]));if(Math.abs(p[0].fx-p[d].fx)<s&&r<l)break;for(g=0;g<d;++g){for(var E=b[g]=0;E<d;++E)b[g]+=p[E][g];b[g]/=d}var O=p[d];if(Rm(x,1+c,b,-c,O),x.fx=t(x),x.fx<p[0].fx)Rm(M,1+u,b,-u,O),M.fx=t(M),M.fx<x.fx?v(M):v(x);else if(x.fx>=p[d-1].fx){var S=!1;if(x.fx>O.fx?(Rm(w,1+h,b,-h,O),w.fx=t(w),w.fx<O.fx?v(w):S=!0):(Rm(w,1-h*c,b,h*c,O),w.fx=t(w),w.fx<x.fx?v(w):S=!0),S){if(1<=f)break;for(g=1;g<p.length;++g)Rm(p[g],1-f,p[0],f,p[g]),p[g].fx=t(p[g])}}else v(x)}return p.sort(y),{fx:p[0].fx,x:p[0]}},Uo.conjugateGradient=function(t,e,n){var r,i,a={x:e.slice(),fx:0,fxprime:e.slice()},o={x:e.slice(),fx:0,fxprime:e.slice()},s=e.slice(),l=1;i=(n=n||{}).maxIterations||20*e.length,a.fx=t(a.x,a.fxprime),jm(r=a.fxprime.slice(),a.fxprime,-1);for(var c=0;c<i;++c){var u;if(l=Im(t,r,a,o,l),n.history&&n.history.push({x:a.x.slice(),fx:a.fx,fxprime:a.fxprime.slice(),alpha:l}),l?(Rm(s,1,o.fxprime,-1,a.fxprime),u=Cm(a.fxprime,a.fxprime),u=Math.max(0,Cm(s,o.fxprime)/u),Rm(r,u,r,-1,o.fxprime),u=a,a=o,o=u):jm(r,a.fxprime,-1),Nm(a.fxprime)<=1e-5)break}n.history&&n.history.push({x:a.x.slice(),fx:a.fx,fxprime:a.fxprime.slice(),alpha:l});return a},Uo.gradientDescent=function(t,e,n){for(var r=(n=n||{}).maxIterations||100*e.length,i=n.learnRate||.001,a={x:e.slice(),fx:0,fxprime:e.slice()},o=0;o<r&&(a.fx=t(a.x,a.fxprime),n.history&&n.history.push({x:a.x.slice(),fx:a.fx,fxprime:a.fxprime.slice()}),Rm(a.x,1,a.x,-i,a.fxprime),!(Nm(a.fxprime)<=1e-5));++o);return a},Uo.gradientDescentLineSearch=function(t,e,n){n=n||{};var r,i={x:e.slice(),fx:0,fxprime:e.slice()},a={x:e.slice(),fx:0,fxprime:e.slice()},o=n.maxIterations||100*e.length,s=n.learnRate||1,l=e.slice(),c=n.c1||.001,u=n.c2||.1,h=[];{var f;n.history&&(f=t,t=function(t,e){return h.push(t.slice()),f(t,e)})}i.fx=t(i.x,i.fxprime);for(var d=0;d<o&&(jm(l,i.fxprime,-1),s=Im(t,l,i,a,s,c,u),n.history&&(n.history.push({x:i.x.slice(),fx:i.fx,fxprime:i.fxprime.slice(),functionCalls:h,learnRate:s,alpha:s}),h=[]),r=i,i=a,a=r,!(0===s||Nm(i.fxprime)<1e-5));++d);return i},Uo.zeros=Lm,Uo.zerosM=function(t,e){return Lm(t).map(function(){return Lm(e)})},Uo.norm2=Nm,Uo.weightedSum=Rm,Uo.scale=jm;const Bm=1e-10;function Dm(a,t){var e=function(t){var r=[];for(let n=0;n<t.length;++n)for(let e=n+1;e<t.length;++e){var i=Wm(t[n],t[e]);for(let t=0;t<i.length;++t){var a=i[t];a.parentIndex=[n,e],r.push(a)}}return r}(a),n=e.filter(function(t){var e=t,n=a;for(let t=0;t<n.length;++t)if(zm(e,n[t])>n[t].radius+Bm)return!1;return!0});let o=0,s=0,l;var c=[];if(1<n.length){var r=function(e){var n={x:0,y:0};for(let t=0;t<e.length;++t)n.x+=e[t].x,n.y+=e[t].y;return n.x/=e.length,n.y/=e.length,n}(n);for(l=0;l<n.length;++l){var u=n[l];u.angle=Math.atan2(u.x-r.x,u.y-r.y)}n.sort(function(t,e){return e.angle-t.angle});let i=n[n.length-1];for(l=0;l<n.length;++l){var h=n[l],f=(s+=(i.x+h.x)*(h.y-i.y),{x:(h.x+i.x)/2,y:(h.y+i.y)/2});let r=null;for(let n=0;n<h.parentIndex.length;++n)if(-1<i.parentIndex.indexOf(h.parentIndex[n])){var d=a[h.parentIndex[n]],p=Math.atan2(h.x-d.x,h.y-d.y),g=Math.atan2(i.x-d.x,i.y-d.y);let t=g-p;t<0&&(t+=2*Math.PI);p=g-t/2;let e=zm(f,{x:d.x+d.radius*Math.sin(p),y:d.y+d.radius*Math.cos(p)});e>2*d.radius&&(e=2*d.radius),(null===r||r.width>e)&&(r={circle:d,width:e,p1:h,p2:i})}null!==r&&(c.push(r),o+=Fm(r.circle.radius,r.width),i=h)}}else{let t=a[0];for(l=1;l<a.length;++l)a[l].radius<t.radius&&(t=a[l]);let e=!1;for(l=0;l<a.length;++l)if(zm(a[l],t)>Math.abs(t.radius-a[l].radius)){e=!0;break}e?o=s=0:(o=t.radius*t.radius*Math.PI,c.push({circle:t,p1:{x:t.x,y:t.y+t.radius},p2:{x:t.x-Bm,y:t.y+t.radius},width:2*t.radius}))}return s/=2,t&&(t.area=o+s,t.arcArea=o,t.polygonArea=s,t.arcs=c,t.innerPoints=n,t.intersectionPoints=e),o+s}function Fm(t,e){return t*t*Math.acos(1-e/t)-(t-e)*Math.sqrt(e*(2*t-e))}function zm(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}function Gm(t,e,n){var r;return t+e<=n?0:n<=Math.abs(t-e)?Math.PI*Math.min(t,e)*Math.min(t,e):(r=e-(n*n-t*t+e*e)/(2*n),Fm(t,t-(n*n-e*e+t*t)/(2*n))+Fm(e,r))}function Wm(t,e){var n,r,i=zm(t,e),a=t.radius,o=e.radius;return a+o<=i||i<=Math.abs(a-o)?[]:(o=(a*a-o*o+i*i)/(2*i),a=Math.sqrt(a*a-o*o),n=t.x+o*(e.x-t.x)/i,o=t.y+o*(e.y-t.y)/i,[{x:n+(r=-(e.y-t.y)*(a/i)),y:o-(e=-(e.x-t.x)*(a/i))},{x:n-r,y:o+e}])}function Ym(t,e){(e=e||{}).maxIterations=e.maxIterations||500;var n=e.initialLayout||qm;const i=e.lossFunction||$m,a=n(t=function(t){t=t.slice();var e=[],n={};let r,i,a,o;for(r=0;r<t.length;++r){var s=t[r];1==s.sets.length?e.push(s.sets[0]):2==s.sets.length&&(a=s.sets[0],o=s.sets[1],n[[a,o]]=!0,n[[o,a]]=!0)}for(e.sort((t,e)=>e<t?1:-1),r=0;r<e.length;++r)for(a=e[r],i=r+1;i<e.length;++i)o=e[i],[a,o]in n||t.push({sets:[a,o],size:0});return t}(t),e),r=[],o=[];let s;for(s in a)a.hasOwnProperty(s)&&(r.push(a[s].x),r.push(a[s].y),o.push(s));var l=Pm.exports.nelderMead(function(e){var n={};for(let t=0;t<o.length;++t){var r=o[t];n[r]={x:e[2*t],y:e[2*t+1],radius:a[r].radius}}return i(n,t)},r,e).x;for(let t=0;t<o.length;++t)s=o[t],a[s].x=l[2*t],a[s].y=l[2*t+1];return a}const Hm=1e-10;function Vm(e,n,r){return Math.min(e,n)*Math.min(e,n)*Math.PI<=r+Hm?Math.abs(e-n):Pm.exports.bisect(function(t){return Gm(e,n,t)-r},0,e+n)}function qm(t,e){let n=function(r,t){const i=t&&t.lossFunction?t.lossFunction:$m,a={},o={};let s;for(let t=0;t<r.length;++t){var e=r[t];1==e.sets.length&&(s=e.sets[0],a[s]={x:1e10,y:1e10,rowid:Object.keys(a).length,size:e.size,radius:Math.sqrt(e.size/Math.PI)},o[s]=[])}r=r.filter(function(t){return 2==t.sets.length});for(let e=0;e<r.length;++e){var n=r[e];let t=n.hasOwnProperty("weight")?n.weight:1;var l=n.sets[0],c=n.sets[1];n.size+Hm>=Math.min(a[l].size,a[c].size)&&(t=0),o[l].push({set:c,size:n.size,weight:t}),o[c].push({set:l,size:n.size,weight:t})}var u=[];for(s in o)if(o.hasOwnProperty(s)){let e=0;for(let t=0;t<o[s].length;++t)e+=o[s][t].size*o[s][t].weight;u.push({set:s,size:e})}function h(t,e){return e.size-t.size}u.sort(h);const f={};function d(t){return t.set in f}function p(t,e){a[e].x=t.x,a[e].y=t.y,f[e]=!0}p({x:0,y:0},u[0].set);for(let t=1;t<u.length;++t){var g=u[t].set,m=o[g].filter(d);if(s=a[g],m.sort(h),0===m.length)throw"ERROR: missing pairwise overlap information";var v=[];for(let e=0;e<m.length;++e){var y=a[m[e].set],b=Vm(s.radius,y.radius,m[e].size);v.push({x:y.x+b,y:y.y}),v.push({x:y.x-b,y:y.y}),v.push({y:y.y+b,x:y.x}),v.push({y:y.y-b,x:y.x});for(let t=e+1;t<m.length;++t){var x=a[m[t].set],w=Vm(s.radius,x.radius,m[t].size),M=Wm({x:y.x,y:y.y,radius:b},{x:x.x,y:x.y,radius:w});for(let t=0;t<M.length;++t)v.push(M[t])}}let e=1e50,n=v[0];for(let t=0;t<v.length;++t){a[g].x=v[t].x,a[g].y=v[t].y;var k=i(a,r);k<e&&(e=k,n=v[t])}p(n,g)}return a}(t,e);var r=e.lossFunction||$m;return n=8<=t.length&&r(e=function(t,e){var n=(e=e||{}).restarts||10,r=[],i={};let a;for(a=0;a<t.length;++a){var o=t[a];1==o.sets.length&&(i[o.sets[0]]=r.length,r.push(o))}var s=function(t,a,o){const s=Pm.exports.zerosM(a.length,a.length),l=Pm.exports.zerosM(a.length,a.length);return t.filter(function(t){return 2==t.sets.length}).map(function(t){var e=o[t.sets[0]],n=o[t.sets[1]],r=Vm(Math.sqrt(a[e].size/Math.PI),Math.sqrt(a[n].size/Math.PI),t.size);s[e][n]=s[n][e]=r;let i=0;t.size+1e-10>=Math.min(a[e].size,a[n].size)?i=1:t.size<=1e-10&&(i=-1),l[e][n]=l[n][e]=i}),{distances:s,constraints:l}}(t,r,i);let m=s.distances;function l(t,r){{var i=t,a=r,o=m,s=v;let e=0,n;for(n=0;n<a.length;++n)a[n]=0;for(n=0;n<o.length;++n){var l=i[2*n],c=i[2*n+1];for(let t=n+1;t<o.length;++t){var u=i[2*t],h=i[2*t+1],f=o[n][t],d=s[n][t],p=(u-l)*(u-l)+(h-c)*(h-c),g=Math.sqrt(p),p=p-f*f;0<d&&g<=f||d<0&&f<=g||(e+=2*p*p,a[2*n]+=4*p*(l-u),a[2*n+1]+=4*p*(c-h),a[2*t]+=4*p*(u-l),a[2*t+1]+=4*p*(h-c))}}return e}}const v=s.constraints,c=Pm.exports.norm2(m.map(Pm.exports.norm2))/m.length;m=m.map(function(t){return t.map(function(t){return t/c})});let u,h;for(a=0;a<n;++a){var f=Pm.exports.zeros(2*m.length).map(Math.random);h=Pm.exports.conjugateGradient(l,f,e),(!u||h.fx<u.fx)&&(u=h)}var d=u.x,p={};for(a=0;a<r.length;++a){var g=r[a];p[g.sets[0]]={x:d[2*a]*c,y:d[2*a+1]*c,radius:Math.sqrt(g.size/Math.PI)}}if(e.history)for(a=0;a<e.history.length;++a)Pm.exports.scale(e.history[a].x,c);return p}(t,e),t)+1e-8<r(n,t)?e:n}function $m(n,r){let i=0;for(let e=0;e<r.length;++e){var a,o,s=r[e];let t;1!=s.sets.length&&(t=2==s.sets.length?(o=n[s.sets[0]],a=n[s.sets[1]],Gm(o.radius,a.radius,zm(o,a))):Dm(s.sets.map(function(t){return n[t]})),o=s.hasOwnProperty("weight")?s.weight:1,i+=o*(t-s.size)*(t-s.size))}return i}function Um(t){function e(e){return{max:Math.max.apply(null,t.map(function(t){return t[e]+t.radius})),min:Math.min.apply(null,t.map(function(t){return t[e]-t.radius}))}}return{xRange:e("x"),yRange:e("y")}}const Xm=t=>{const{sets:e="sets",size:n="size",as:r=["key","path"],padding:o=0}=t,[s,l]=r;return t=>{t=t.map(t=>Object.assign(Object.assign({},t),{sets:t[e],size:t[n],[s]:t.sets.join("&")}));t.sort((t,e)=>t.sets.length-e.sets.length);const i=Ym(t);let a;return t.map(t=>{const r=t[e];return Object.assign(Object.assign({},t),{[l]:({width:t,height:e})=>{a=a||function(t,e,n,r){var i=[],a=[];for(const g in t)t.hasOwnProperty(g)&&(a.push(g),i.push(t[g]));e-=2*r,n-=2*r;var o=(l=Um(i)).xRange,s=l.yRange;if(o.max==o.min||s.max==s.min)return console.log("not scaling solution: zero size detected"),t;var l=e/(o.max-o.min),c=n/(s.max-s.min),u=Math.min(c,l),h=(e-(o.max-o.min)*u)/2,f=(n-(s.max-s.min)*u)/2,d={};for(let t=0;t<i.length;++t){var p=i[t];d[a[t]]={radius:u*p.radius,x:r+h+(p.x-o.min)*u,y:r+f+(p.y-s.min)*u}}return d}(i,t,e,o);let n=function(t){var e={},n=(Dm(t,e),e.arcs);if(0===n.length)return"M 0 0";if(1==n.length)return t=n[0].circle,e=t.x,r=t.y,t=t.radius,(i=[]).push("M",e-=t,r),i.push("A",t,t,0,1,0,e+2*t,r),i.push("A",t,t,0,1,0,e,r),i.join(" ");var r,i,a=["\nM",n[0].p2.x,n[0].p2.y];for(let t=0;t<n.length;++t){var o=n[t],s=o.circle.radius,l=o.width>s;a.push("\nA",s,s,0,l?1:0,1,o.p1.x,o.p1.y)}return a.join(" ")}(r.map(t=>a[t]));return/[zZ]$/.test(n)||(n+=" Z"),n}})})}};Xm.props={};const Km=u=>c=>ce(void 0,void 0,void 0,function*(){var{width:t,height:e}=M0(c),{data:n,encode:r={},scale:i,style:a={},layout:o={}}=u,s=nt(u,["data","encode","scale","style","layout"]),l={size:[t,e]},t={axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size"},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]},fontSize:{type:"identity"},rotate:{type:"identity"}},style:{textAlign:"center"}},e=function(t,e){const{text:n="text",value:r="value"}=e;return t.map(t=>Object.assign(Object.assign({},t),{text:t[n],value:t[r]}))}(n,r),n=yield bm(Object.assign(Object.assign({},l),o))(e);return[rt({},t,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a},s),{axis:!1}))]});function Zm(t,...e){return e.reduce((e,n)=>t=>e(n(t)),t)}function Qm(e,n){return n-e?t=>(t-e)/(n-e):t=>.5}function Jm(t,e,n,r,i){let a=n||0,o=r||t.length;for(var s=i||(t=>t);a<o;){var l=Math.floor((a+o)/2);s(t[l])>e?o=l:a=l+1}return a}Km.props={};const tv=Math.sqrt(50),ev=Math.sqrt(10),nv=Math.sqrt(2);function rv(t,e,n){e=(e-t)/Math.max(0,n),t=Math.floor(Math.log(e)/Math.LN10),n=e/10**t;return 0<=t?(n>=tv?10:n>=ev?5:n>=nv?2:1)*10**t:-(10**-t)/(n>=tv?10:n>=ev?5:n>=nv?2:1)}function iv(t,e,n){n=Math.abs(e-t)/Math.max(0,n);let r=10**Math.floor(Math.log(n)/Math.LN10);n/=r;return n>=tv?r*=10:n>=ev?r*=5:n>=nv&&(r*=2),e<t?-r:r}const av=(t,e,n=5)=>{t=[t,e];let r=0,i=t.length-1,a=t[r],o=t[i],s;return o<a&&([a,o]=[o,a],[r,i]=[i,r]),0<(s=rv(a,o,n))?(a=Math.floor(a/s)*s,o=Math.ceil(o/s)*s,s=rv(a,o,n)):s<0&&(a=Math.ceil(a*s)/s,o=Math.floor(o*s)/s,s=rv(a,o,n)),0<s?(t[r]=Math.floor(a/s)*s,t[i]=Math.ceil(o/s)*s):s<0&&(t[r]=Math.ceil(a*s)/s,t[i]=Math.floor(o*s)/s),t},ov=36e5,sv=864e5,lv=7*sv;sv,sv;function cv(t,n,s,r){const i=(t,e)=>{let n=e;for(;n&&r(t)%e!=0;)s(t,-1),--n;return t},l=(t,e)=>{e&&i(t,e),n(t)};const c=(t,e)=>{t=new Date(+t-1);return l(t,e),s(t,e),l(t),t};return{ceil:c,floor:(t,e)=>{t=new Date(+t);return l(t,e),t},range:(t,e,n,r)=>{for(var i=[],a=Math.floor(n),o=r?c(t,n):c(t);+o<+e;s(o,a),l(o))i.push(new Date(+o));return i},duration:t}}a=cv(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),ts=cv(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),es=cv(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),ns=cv(ov,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+ov*e)},t=>t.getHours()),rs=cv(sv,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+sv*e)},t=>t.getDate()-1);const uv=cv(2592e6,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth());is=cv(lv,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+lv*e)},t=>{var e=uv.floor(t),t=new Date(+t);return Math.floor((+t-+e)/lv)}),as=cv(31536e6,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getFullYear();t.setFullYear(n+e)},t=>t.getFullYear());const hv={millisecond:a,second:ts,minute:es,hour:ns,day:rs,week:is,month:uv,year:as};os=cv(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),qo=cv(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),hl=cv(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),vl=cv(ov,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+ov*e)},t=>t.getUTCHours()),xl=cv(sv,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+sv*e)},t=>t.getUTCDate()-1);const fv=cv(2592e6,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth());El=cv(lv,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+lv*e)},t=>{var e=fv.floor(t),t=new Date(+t);return Math.floor((+t-+e)/lv)}),Tl=cv(31536e6,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCFullYear();t.setUTCFullYear(n+e)},t=>t.getUTCFullYear());const dv={millisecond:os,second:qo,minute:hl,hour:vl,day:xl,week:El,month:fv,year:Tl};function pv(t,e,n,r,i){var t=+t,e=+e,{tickIntervals:i,year:a,millisecond:o}=function(t){var{year:t,month:e,week:n,day:r,hour:i,minute:a,second:o,millisecond:s}=t?dv:hv;return{tickIntervals:[[o,1],[o,5],[o,15],[o,30],[a,1],[a,5],[a,15],[a,30],[i,1],[i,3],[i,6],[i,12],[r,1],[r,2],[n,1],[e,1],[e,3],[t,1]],year:t,millisecond:s}}(i),s=([t,e])=>t.duration*e,n=r?(e-t)/r:n||5,l=r||(e-t)/n,c=i.length,u=Jm(i,l,0,c,s);let h;return h=u===c?[a,iv(t/a.duration,e/a.duration,n)]:u?([c,a]=l/s(i[u-1])<s(i[u])/l?i[u-1]:i[u],[c,r?Math.ceil(r/c.duration):a]):[o,Math.max(iv(t,e,n),1)]}const gv=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=pv(o,t,n,r,i),r=[e.floor(o,n),e.ceil(t,n)];return a?r.reverse():r};function mv(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)}function vv(t){return xv(t,"Function")}function yv(t){return null==t}var bv={}.toString,xv=function(t,e){return bv.call(t)==="[object "+e+"]"},wv=function(t){return Array.isArray?Array.isArray(t):xv(t,"Array")};var Mv=function(t){if("object"!=typeof(e=t)||null===e||!xv(t,"Object"))return!1;var e;if(null===Object.getPrototypeOf(t))return!0;for(var n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n},kv=function(t){return xv(t,"Number")},Ev=Object.values?function(t){return Object.values(t)}:function(n){var t,r=[],e=n,i=function(t,e){vv(n)&&"prototype"===e||r.push(t)};if(e)if(wv(e))for(var a=0,o=e.length;a<o&&!1!==i(e[a],a);a++);else if(t=typeof e,null!==e&&"object"==t||"function"==t)for(var s in e)if(e.hasOwnProperty(s)&&!1===i(e[s],s))break;return r},Ov=5;function Sv(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var a in r=r||0,i=i||Ov,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&Mv(o)?(Mv(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):wv(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t}function _v(t){return t}var Av,Tv=function(t,e){if(!mv(t))return-1;var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var r=-1,i=0;i<t.length;i++)if(t[i]===e){r=i;break}return r};function Pv(t){return yv(t)?0:(mv(t)?t:Object.keys(t)).length}function Lv(t){return null!=t&&!Number.isNaN(t)}!function(a,o){var s;if(vv(a))return(s=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=o?o.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=a.apply(this,t),i.set(r,n),n)}).cache=new Map;throw new TypeError("Expected a function")}(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return(Av=Av||document.createElement("canvas").getContext("2d")).font=[a,e,i,n+"px",r].join(" "),Av.measureText(xv(t,"String")?t:"").width},function(t,e){return function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var a=arguments[e],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}([t],Ev(e=void 0===e?{}:e)).join("")});const Cv=e=>t=>-e(-t),Nv=(t,e)=>{const n=Math.log(t);t=t===Math.E?Math.log:10===t?Math.log10:2===t?Math.log2:t=>Math.log(t)/n;return e?Cv(t):t},jv=(e,t)=>{var n=e===Math.E?Math.exp:t=>e**t;return t?Cv(n):n},Rv=(t,e,n,r)=>{var i=t<0,a=Nv(r,i),r=jv(r,i),i=e<t,o=i?t:e,e=[r(Math.floor(a(i?e:t))),r(Math.ceil(a(o)))];return i?e.reverse():e};function Iv(e,o){return t=>{t.prototype.rescale=function(){this.initRange(),this.nice();var[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},t.prototype.initRange=function(){var t=this.options["interpolator"];this.options.range=e(t)},t.prototype.composeOutput=function(t,e){var n,{domain:r,interpolator:i,round:a}=this.getOptions(),r=o(r.map(t)),a=a?(n=i,t=>{t=n(t);return kv(t)?Math.round(t):t}):i;this.output=Zm(a,r,e,t)},t.prototype.invert=void 0}}var Bv,cl={exports:{}},gl={exports:{}},Dv=function(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||0<=t.length&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))},Fv=Array.prototype.concat,zv=Array.prototype.slice,Gv=gl.exports=function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];Dv(i)?e=Fv.call(e,zv.call(i)):e.push(i)}return e},Wv=(Gv.wrap=function(t){return function(){return t(Gv(arguments))}},{aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),Yv=gl.exports,Hv=Object.hasOwnProperty,Vv=Object.create(null);for(Bv in Wv)Hv.call(Wv,Bv)&&(Vv[Wv[Bv]]=Bv);var qv=cl.exports={to:{},get:{}};function $v(t,e,n){return Math.min(Math.max(e,t),n)}function Uv(t){t=Math.round(t).toString(16).toUpperCase();return t.length<2?"0"+t:t}qv.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=qv.get.hsl(t),n="hsl";break;case"hwb":e=qv.get.hwb(t),n="hwb";break;default:e=qv.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},qv.get.rgb=function(t){if(!t)return null;var e,n,r,i=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(r=e[2],e=e[1],n=0;n<3;n++){var a=2*n;i[n]=parseInt(e.slice(a,2+a),16)}r&&(i[3]=parseInt(r,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(r=(e=e[1])[3],n=0;n<3;n++)i[n]=parseInt(e[n]+e[n],16);r&&(i[3]=parseInt(r+r,16)/255)}else{if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/))for(n=0;n<3;n++)i[n]=parseInt(e[n+1],0);else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:Hv.call(Wv,e[1])?((i=Wv[e[1]])[3]=1,i):null:null;for(n=0;n<3;n++)i[n]=Math.round(2.55*parseFloat(e[n+1]))}e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[3]=parseFloat(e[4]))}for(n=0;n<3;n++)i[n]=$v(i[n],0,255);return i[3]=$v(i[3],0,1),i},qv.get.hsl=function(t){var e;return(t=t&&t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,$v(parseFloat(t[2]),0,100),$v(parseFloat(t[3]),0,100),$v(isNaN(e)?1:e,0,1)]):null},qv.get.hwb=function(t){var e;return(t=t&&t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,$v(parseFloat(t[2]),0,100),$v(parseFloat(t[3]),0,100),$v(isNaN(e)?1:e,0,1)]):null},qv.to.hex=function(){var t=Yv(arguments);return"#"+Uv(t[0])+Uv(t[1])+Uv(t[2])+(t[3]<1?Uv(Math.round(255*t[3])):"")},qv.to.rgb=function(){var t=Yv(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},qv.to.rgb.percent=function(){var t=Yv(arguments),e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"},qv.to.hsl=function(){var t=Yv(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},qv.to.hwb=function(){var t=Yv(arguments),e="";return 4<=t.length&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},qv.to.keyword=function(t){return Vv[t.slice(0,3)]};var Xv=cl.exports;function Kv(t,e,n){let r=n;return r<0&&(r+=1),1<r&&--r,r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function Zv(t){var e,n,r,t=Xv.get(t);return t?({model:t,value:e}=t,"rgb"===t?e:"hsl"===t?(e=(t=e)[0]/360,n=t[1]/100,r=t[2]/100,t=t[3],0==n?[255*r,255*r,255*r,t]:[255*Kv(n=2*r-(r=r<.5?r*(1+n):r+n-r*n),r,e+1/3),255*Kv(n,r,e),255*Kv(n,r,e-1/3),t]):null):null}const Qv=(e,n)=>t=>e*(1-t)+n*t,Jv=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return Qv(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{var n=t,r=e;const l=Zv(n),c=Zv(r);return null===l||null===c?l?()=>n:()=>r:e=>{var n=new Array(4);for(let t=0;t<4;t+=1){var r=l[t],i=c[t];n[t]=r*(1-e)+i*e}var[t,a,o,s]=n;return`rgba(${Math.round(t)}, ${Math.round(a)}, ${Math.round(o)}, ${s})`}}},t1=(t,e)=>{const n=Qv(t,e);return t=>Math.round(n(t))};function e1({map:t,initKey:e},n){e=e(n);return t.has(e)?t.get(e):n}function n1(t){return"object"==typeof t?t.valueOf():t}class r1 extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=n1,null!==t)for(var[e,n]of t)this.set(e,n)}get(t){return super.get(e1({map:this.map,initKey:this.initKey},t))}has(t){return super.has(e1({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(([{map:t,initKey:n},r]=[{map:this.map,initKey:this.initKey},t],n=n(r),t.has(n)?t.get(n):(t.set(n,r),r)),e);var n,r}delete(t){return super.delete(([{map:t,initKey:e},n]=[{map:this.map,initKey:this.initKey},t],e=e(n),t.has(e)&&(n=t.get(e),t.delete(e)),n));var e,n}}class i1{constructor(t){this.options=Sv({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=Sv({},this.options,t),this.rescale(t)}rescale(t){}}const a1=Symbol("defaultUnknown");function o1(e,n,r){for(let t=0;t<n.length;t+=1)e.has(n[t])||e.set(r(n[t]),t)}function s1(t){var{value:t,from:e,to:n,mapper:r,notFoundReturn:i}=t;let a=r.get(t);if(void 0===a){if(i!==a1)return i;a=e.push(t)-1,r.set(t,a)}return n[a%n.length]}function l1(t){return t instanceof Date?t=>""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class c1 extends i1{getDefaultOptions(){return{domain:[],range:[],unknown:a1}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&o1(this.domainIndexMap,this.getDomain(),this.domainKey),s1({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&o1(this.rangeIndexMap,this.getRange(),this.rangeKey),s1({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){var[e]=this.options.domain,[n]=this.options.range;this.domainKey=l1(e),this.rangeKey=l1(n),this.rangeIndexMap?(t&&!t.range||this.rangeIndexMap.clear(),t&&!t.domain&&!t.compare||(this.domainIndexMap.clear(),this.sortedDomain=void 0)):(this.rangeIndexMap=new Map,this.domainIndexMap=new Map)}clone(){return new c1(this.options)}getRange(){return this.options.range}getDomain(){var t,e;return this.sortedDomain||({domain:t,compare:e}=this.options,this.sortedDomain=e?[...t].sort(e):t),this.sortedDomain}}function u1(t){const{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:a,round:o,align:s}=t;var l=e.length,c=0<(c=(t=l)-(u=a).length)?[...u,...new Array(c).fill(1)]:c<0?u.slice(0,t):u,[t,u]=n,u=u-t,h=u/(2/l*r+1-1/l*i);const f=h*i/l;h-=l*f;const d=function(t){const e=Math.min(...t);return t.map(t=>t/e)}(c),p=h/d.reduce((t,e)=>t+e);var c=new r1(e.map((t,e)=>{e=d[e]*p;return[t,o?Math.floor(e):e]})),g=new r1(e.map((t,e)=>{e=d[e]*p+f;return[t,o?Math.floor(e):e]})),h=Array.from(g.values()).reduce((t,e)=>t+e),t=t+(u-(h-h/l*i))*s;let m=o?Math.round(t):t;var v=new Array(l);for(let t=0;t<l;t+=1){v[t]=(y=m,Math.round(1e12*y)/1e12);var y=e[t];m+=g.get(y)}return{valueBandWidth:c,valueStep:g,adjustedRange:v}}class h1 extends c1{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:a1,flex:[]}}constructor(t){super(t)}clone(){return new h1(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){var{padding:t,paddingInner:e}=this.options;return 0<t?t:e}getPaddingOuter(){var{padding:t,paddingOuter:e}=this.options;return 0<t?t:e}rescale(){super.rescale();var{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:t,valueBandWidth:n,valueStep:r}=function(t){var e=t["domain"];if(0===(e=e.length))return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!(null==(n=t.flex)||!n.length))return u1(t);var{range:n,paddingOuter:t,paddingInner:r,round:i,align:a}=t;let o,s,l=n[0];return n=n[1]-l,o=n/Math.max(1,2*t+(e-r)),i&&(o=Math.floor(o)),l+=(n-o*(e-r))*a,s=o*(1-r),i&&(l=Math.round(l),s=Math.round(s)),t=new Array(e).fill(0).map((t,e)=>l+e*o),{valueStep:o,valueBandWidth:s,adjustedRange:t}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=r,this.valueBandWidth=n,this.adjustedRange=t}}const f1=(t,e,n)=>{let r,i,a=t,o=e;if(a===o&&0<n)return[a];let s=rv(a,o,n);if(0===s||!Number.isFinite(s))return[];if(0<s){a=Math.ceil(a/s),o=Math.floor(o/s),i=new Array(r=Math.ceil(o-a+1));for(let t=0;t<r;t+=1)i[t]=(a+t)*s}else{s=-s,a=Math.ceil(a*s),o=Math.floor(o*s),i=new Array(r=Math.ceil(o-a+1));for(let t=0;t<r;t+=1)i[t]=(a+t)/s}return i};class d1 extends i1{getDefaultOptions(){return{range:[0],domain:[0,1],unknown:void 0,tickCount:5,tickMethod:f1}}map(t){var[e]=this.options.range;return void 0!==e?e:this.options.unknown}invert(t){var[e]=this.options.range;return t===e&&void 0!==e?this.options.domain:[]}getTicks(){var{tickMethod:t,domain:e,tickCount:n}=this.options,[e,r]=e;return kv(e)&&kv(r)?t(e,r,n):[]}clone(){return new d1(this.options)}}function p1(t){return Math.abs(t)<1e-15?t:parseFloat(t.toFixed(15))}const g1=[1,5,2,2.5,4,3],m1=100*Number.EPSILON;const v1=(n,r,t=5,i=!0,a=g1,o=[.25,.2,.5,.05])=>{var s=t<0?0:Math.round(t);if(Number.isNaN(n)||Number.isNaN(r)||"number"!=typeof n||"number"!=typeof r||!s)return[];if(r-n<1e-15||1===s)return[n];var l,c,u,h,f,d,p,g={score:-2,lmin:0,lmax:0,lstep:0};let m=1;for(;m<1/0;){for(let t=0;t<a.length;t+=1){var v=a[t],y=(h=v,f=a,d=m,p=void 0,p=Pv(f),1-Tv(f,h)/(p-1)-d+1);if(o[0]*y+o[1]+o[2]+o[3]<g.score){m=1/0;break}let e=2;for(;e<1/0;){x=e;var b=(u=s)<=x?2-(x-1)/(u-1):1;if(o[0]*y+o[1]+o[2]*b+o[3]<g.score)break;var x=(r-n)/(e+1)/m/v;let t=Math.ceil(Math.log10(x));for(;t<1/0;){var w=m*v*10**t,M=(E=r,M=w*(e-1),(E-=n)<M?1-((M-E)/2)**2/(.1*E)**2:1);if(o[0]*y+o[1]*M+o[2]*b+o[3]<g.score)break;var k=Math.floor(r/w)*m-(e-1)*m,E=Math.ceil(n/w)*m;if(k<=E){var O=E-k;for(let t=0;t<=O;t+=1){var S=(k+t)*(w/m),_=S+w*(e-1),A=w,T=function(t,e,n,r,i,a){var o=Pv(e),e=Tv(e,t);let s=0;return t=(r%a+a)%a,1-e/(o-1)-n+(s=(t<m1||a-t<m1)&&r<=0&&0<=i?1:s)}(v,a,m,S,_,A),P=1-.5*((r-_)**2+(n-S)**2)/(.1*(r-n))**2,L=(l=e,L=n,l=(l-1)/(_-(C=S)),c=((c=s)-1)/(Math.max(_,r)-Math.min(L,C)),2-Math.max(l/c,c/l)),C=o[0]*T+o[1]*P+o[2]*L+ +o[3];g.score<C&&(!i||S<=n&&r<=_)&&(g.lmin=S,g.lmax=_,g.lstep=A,g.score=C)}}t+=1}e+=1}}m+=1}var t=p1(g.lmax),e=p1(g.lmin),N=p1(g.lstep),j=Math.floor((t=(t-e)/N,Math.round(1e12*t)/1e12))+1,R=new Array(j);R[0]=p1(e);for(let t=1;t<j;t+=1)R[t]=p1(R[t-1]+N);return R};class y1 extends i1{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:v1}}map(t){return Lv(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new y1(this.options)}getTicks(){var{domain:t,tickCount:e,tickMethod:n}=this.options,[t,r]=t;return kv(t)&&kv(r)?n(t,r,e):[]}}const b1=(t,e,n)=>{var[t,r]=t,[e,i]=e;let a,o;return Zm(o=t<r?(a=Qm(t,r),n(e,i)):(a=Qm(r,t),n(i,e)),a)},x1=(r,t,e)=>{const i=Math.min(r.length,t.length)-1,a=new Array(i),o=new Array(i);var n=r[0]>r[i],s=n?[...r].reverse():r,l=n?[...t].reverse():t;for(let t=0;t<i;t+=1)a[t]=Qm(s[t],s[t+1]),o[t]=e(l[t],l[t+1]);return t=>{var e=Jm(r,t,1,i)-1,n=a[e];return Zm(o[e],n)(t)}},w1=(t,e,n,r)=>{return(2<Math.min(t.length,e.length)?x1:b1)(t,e,r?t1:n)};class M1 extends i1{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Qv,tickCount:5}}map(t){return Lv(t)?this.output(t):this.options.unknown}invert(t){return Lv(t)?this.input(t):this.options.unknown}nice(){var t,e,n,r;this.options.nice&&([t,e,n,...r]=this.getTickMethodOptions(),this.options.domain=this.chooseNice()(t,e,n,...r))}getTicks(){var t=this.options["tickMethod"],[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return av}rescale(){this.nice();var[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){var{clamp:e,range:n}=this.options,t=this.options.domain.map(t),n=Math.min(t.length,n.length);if(e){e=t[0],t=t[n-1];const r=t<e?t:e,i=t<e?e:t;return t=>Math.min(Math.max(r,t),i)}return _v}composeOutput(t,e){var{domain:n,range:r,round:i,interpolate:a}=this.options,n=w1(n.map(t),r,a,i);this.output=Zm(n,e,t)}composeInput(t,e,n){var{domain:r,range:i}=this.options,i=w1(i,r.map(t),Qv);this.input=Zm(e,n,i)}}class k1 extends M1{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:Jv,tickMethod:f1,tickCount:5}}chooseTransforms(){return[_v,_v]}clone(){return new k1(this.options)}}class E1 extends h1{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:a1,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new E1(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}const O1=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class S1 extends M1{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:Jv,tickMethod:f1,tickCount:5}}constructor(t){super(t)}chooseTransforms(){var t,e,n,r=this.options["exponent"];return 1===r?[_v,_v]:(t=.5===r?O1:(e=r,t=>t<0?-((-t)**e):t**e),n=r,[t,t=>t<0?-((-t)**(1/n)):t**(1/n)])}clone(){return new S1(this.options)}}class _1 extends S1{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Jv,tickMethod:f1,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new _1(this.options)}}class A1 extends i1{getDefaultOptions(){return{domain:[.5],range:[0,1]}}constructor(t){super(t)}map(t){return Lv(t)?(t=Jm(this.thresholds,t,0,this.n),this.options.range[t]):this.options.unknown}invert(t){var e=this.options["range"],e=e.indexOf(t),t=this.thresholds;return[t[e-1],t[e]]}clone(){return new A1(this.options)}rescale(){var{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}const T1=(t,e,n,r=10)=>{var i=t<0,a=jv(r,i),o=Nv(r,i),s=e<t,l=s?e:t,c=s?t:e;let u=o(l),h=o(c),f=[];if(!(r%1)&&h-u<n){if(u=Math.floor(u),h=Math.ceil(h),i)for(;u<=h;u+=1){var d=a(u);for(let t=r-1;1<=t;--t){var p=d*t;if(c<p)break;l<=p&&f.push(p)}}else for(;u<=h;u+=1){var g=a(u);for(let t=1;t<r;t+=1){var m=g*t;if(c<m)break;l<=m&&f.push(m)}}2*f.length<n&&(f=f1(l,c,n))}else{t=-1===n?h-u:Math.min(h-u,n);f=f1(u,h,t).map(a)}return s?f.reverse():f};class P1 extends M1{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:Jv,tickMethod:T1,tickCount:5}}chooseNice(){return Rv}getTickMethodOptions(){var{domain:t,tickCount:e,base:n}=this.options;return[t[0],t[t.length-1],e,n]}chooseTransforms(){var{base:t,domain:e}=this.options,e=e[0]<0;return[Nv(t,e),jv(t,e)]}clone(){return new P1(this.options)}}class L1 extends A1{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:v1}}constructor(t){super(t)}nice(){var t,e,n=this.options["nice"];n&&([n,t,e]=this.getTickMethodOptions(),this.options.domain=av(n,t,e))}getTicks(){var t=this.options["tickMethod"],[e,n,r]=this.getTickMethodOptions();return t(e,n,r)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}rescale(){this.nice();var{range:t,domain:e}=this.options,[n,r]=e;this.n=t.length-1,this.thresholds=new Array(this.n);for(let t=0;t<this.n;t+=1)this.thresholds[t]=((t+1)*r-(t-this.n)*n)/(this.n+1)}invert(t){var[t,e]=super.invert(t),[n,r]=this.options.domain;return void 0===t&&void 0===e?[t,e]:[t||n,e||r]}getThresholds(){return this.thresholds}clone(){return new L1(this.options)}}function C1(t,e,n=!1){var r=t,i=(n||r.sort((t,e)=>t-e),[]);for(let t=1;t<e;t+=1)i.push(function(t,e){var n,r=t.length;if(r)return r<2?t[r-1]:(r=(r-1)*e,(n=t[e=Math.floor(r)])+(t[e+1]-n)*(r-e))}(r,t/e));return i}class N1 extends A1{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:v1}}constructor(t){super(t)}rescale(){var{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=C1(t,this.n+1,!1)}invert(t){var[t,e]=super.invert(t),n=this.options["domain"],r=n[0],n=n[n.length-1];return void 0===t&&void 0===e?[t,e]:[t||r,e||n]}getThresholds(){return this.thresholds}clone(){return new N1(this.options)}getTicks(){var{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1;return n(e[0],e[r],t)}}var j1=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,R1=/\[([^]*?)\]/gm;function I1(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}function B1(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,i=e;r<i.length;r++){var a,o=i[r];for(a in o)t[a]=o[a]}return t}function D1(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t}var F1,bs=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],z1=["January","February","March","April","May","June","July","August","September","October","November","December"],us=I1(z1,3),G1=B1({},{dayNamesShort:I1(bs,3),dayNames:bs,monthNamesShort:us,monthNames:z1,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][3<t%10?0:(t-t%10!=10?1:0)*t%10]}}),W1={D:function(t){return String(t.getDate())},DD:function(t){return D1(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return D1(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return D1(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return D1(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return D1(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return D1(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return D1(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return D1(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return D1(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return D1(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return D1(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return(t.getHours()<12?e.amPm[0]:e.amPm[1]).toUpperCase()},ZZ:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+D1(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+D1(Math.floor(Math.abs(t)/60),2)+":"+D1(Math.abs(t)%60,2)}},Y1={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"};const H1=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=pv(o,t,n,r,i),r=e.range(o,new Date(+t+1),n,!0);return a?r.reverse():r};function V1(t){var e=t.getTimezoneOffset(),t=new Date(t);return t.setMinutes(t.getMinutes()+e,t.getSeconds(),t.getMilliseconds()),t}class q1 extends M1{getDefaultOptions(){return{domain:[new Date(2e3,0,1),new Date(2e3,0,2)],range:[0,1],nice:!1,tickCount:5,tickInterval:void 0,unknown:void 0,clamp:!1,tickMethod:H1,interpolate:Qv,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return gv}getTickMethodOptions(){var{domain:t,tickCount:e,tickInterval:n,utc:r}=this.options;return[t[0],t[t.length-1],e,n,r]}getFormatter(){const{mask:a,utc:t}=this.options,o=t?dv:hv,s=t?V1:_v;return t=>{var e=s(t),t=a||function(t,e){var{second:e,minute:n,hour:r,day:i,week:a,month:o,year:s}=e;return e.floor(t)<t?".SSS":n.floor(t)<t?":ss":r.floor(t)<t?"hh:mm":i.floor(t)<t?"hh A":o.floor(t)<t?a.floor(t)<t?"MMM DD":"ddd DD":s.floor(t)<t?"MMMM":"YYYY"}(t,o),n=void 0;if(void 0===t&&(t=Y1.default),void 0===n&&(n={}),"number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");var r=[],i=(t=(t=Y1[t]||t).replace(R1,function(t,e){return r.push(e),"@@@"}),B1(B1({},G1),n));return(t=t.replace(j1,function(t){return W1[t](e,i)})).replace(/@@@/g,function(){return r.shift()})}}clone(){return new q1(this.options)}}var $1;let U1=F1=class extends k1{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:_v,tickMethod:f1,tickCount:5}}constructor(t){super(t)}clone(){return new F1(this.options)}};U1=F1=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}([Iv(function(t){return[t(0),t(1)]},t=>{var[t,e]=t;return Zm(Qv(0,1),Qm(t,e))})],U1);let X1=$1=class extends k1{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:_v,tickMethod:f1,tickCount:5}}constructor(t){super(t)}clone(){return new $1(this.options)}};function K1(r,i){return Object.entries(r).reduce((t,[e,n])=>(t[e]=i(n,e,r),t),{})}function Z1(t){return t.map((t,e)=>e)}function Q1(t){return t[t.length-1]}function J1(t,e){const n=[[],[]];return t.forEach(t=>{n[e(t)?0:1].push(t)}),n}function ty(n,t=n.length){if(1===t)return n.map(t=>[t]);const r=[];for(let e=0;e<n.length;e++)ty(n.slice(e+1),t-1).forEach(t=>{r.push([n[e],...t])});return r}function ey([t,e],[n,r]){return[t-n,e-r]}function ny([t,e],[n,r]){return[t+n,e+r]}function ry([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function iy([t,e]){return Math.atan2(e,t)}function ay([t,e]){return iy([t,e])+Math.PI/2}function oy(t,e){t=iy(t),e=iy(e);return t<e?e-t:2*Math.PI-(t-e)}function sy(t){let e=1/0,n=-1/0,r=1/0,i=-1/0;for(var[a,o]of t)e=Math.min(a,e),n=Math.max(a,n),r=Math.min(o,r),i=Math.max(o,i);var t=n-e,s=i-r;return[e,r,t,s]}function ly([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function L(t,e){for(var[n,r]of Object.entries(e))t.style(n,r)}function cy(t,e,n,r,i){e=iy(ey(r,e))+Math.PI,n=iy(ey(r,n))+Math.PI;t.arc(r[0],r[1],i,e,n,n-e<0)}function uy(e,t,n,r="y",i="between"){const a="y"===r||!0===r?n:t;var n="y"===r||!0===r?90:0,t=Z1(a),[r,o]=jd(t,t=>a[t]);const s=new k1({domain:[r,o],range:[0,100]}),l=t=>s.map(a[t]);r={between:t=>`${e[t]} ${l(t)}%`,start:t=>0===t?`${e[t]} ${l(t)}%`:`${e[t-1]} ${l(t)}%, ${e[t]} ${l(t)}%`,end:t=>t===e.length-1?`${e[t]} ${l(t)}%`:`${e[t]} ${l(t)}%, ${e[t+1]} ${l(t)}%`};return`linear-gradient(${n}deg, ${t.sort((t,e)=>l(t)-l(e)).map(r[i]||r.between).join(",")})`}function hy(t){var[t,e,n,r]=t;return[r,t,e,n]}function fy(t,e,n){var[e,r,,i]=pp(t)?hy(e):e,[n,a]=n,t=t.getCenter(),o=ay(ey(e,t)),r=ay(ey(r,t)),n=r===o&&n!==a?r+2*Math.PI:r;return{startAngle:o,endAngle:0<=n-o?n:2*Math.PI+n,innerRadius:ry(i,t),outerRadius:ry(e,t)}}function dy(t,e,n,r){var i=t["defaultColor"],t=t[e]||{},e=t[n]||t[r];return Object.assign({defaultColor:i},e)}function py(t){var{colorAttribute:t,opacityAttribute:t=t}=t;return t+"Opacity"}function gy(t,e){return gp(t)?(e=e["transform"],`translate(${(t=t.getCenter())[0]}, ${t[1]}) `+(e||"")):""}function my(t){var e,n,r;return 1===t.length?t[0]:([[t,e],[n,r]]=t,[(t+n)/2,(e+r)/2])}function at(t){return new vy([t],null,t,t.ownerDocument)}X1=$1=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}([Iv(function(t){return[t(0),t(.5),t(1)]},t=>{const[e,n,r]=t,i=Zm(Qv(0,.5),Qm(e,n)),a=Zm(Qv(.5,1),Qm(n,r));return t=>(e>r?t<n?a:i:t<n?i:a)(t)})],X1);class vy{constructor(t=null,e=null,n=null,r=null,i=[null,null,null,null,null],a=[],o=[]){this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=i[0],this._update=i[1],this._exit=i[2],this._merge=i[3],this._split=i[4],this._transitions=a,this._facetElements=o}selectAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new vy(t,null,this._elements[0],this._document)}selectFacetAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new vy(this._elements,null,this._parent,this._document,void 0,void 0,t)}select(t){t="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new vy([t],null,t,this._document)}append(t){var e="function"==typeof t?t:()=>this.createElement(t),n=[];if(null!==this._data){for(let t=0;t<this._data.length;t++){var r=this._data[t],[r,i]=Array.isArray(r)?r:[r,null],a=e(r,t);a.__data__=r,null!==i&&(a.__fromElements__=i),this._parent.appendChild(a),n.push(a)}return new vy(n,null,this._parent,this._document)}for(let t=0;t<this._elements.length;t++){var o=this._elements[t],s=e(o.__data__,t);o.appendChild(s),n.push(s)}return new vy(n,null,n[0],this._document)}maybeAppend(t,e){var n=this._elements[0],r=n.getElementById(t);return r||((r="string"==typeof e?this.createElement(e):e()).id=t,n.appendChild(r)),new vy([r],null,this._parent,this._document)}data(e,n=t=>t,r=()=>null){var i=[],a=[],o=new Set(this._elements),s=[],l=new Set,c=new Map(this._elements.map((t,e)=>[n(t.__data__,e),t])),u=new Map(this._facetElements.map((t,e)=>[n(t.__data__,e),t])),h=Fd(this._elements,t=>r(t.__data__));for(let t=0;t<e.length;t++){var f=e[t],d=n(f,t),p=r(f,t);if(c.has(d)){var g=c.get(d);g.__data__=f,g.__facet__=!1,a.push(g),o.delete(g),c.delete(d)}else if(u.has(d)){g=u.get(d);g.__data__=f,g.__facet__=!0,a.push(g),u.delete(d)}else if(h.has(d)){const Fd=h.get(d);s.push([f,Fd]);for(const m of Fd)o.delete(m);h.delete(d)}else c.has(p)?((d=c.get(p)).__toData__?d.__toData__.push(f):d.__toData__=[f],l.add(d),o.delete(d)):i.push(f)}var t=[new vy([],i,this._parent,this._document),new vy(a,null,this._parent,this._document),new vy(o,null,this._parent,this._document),new vy([],s,this._parent,this._document),new vy(l,null,this._parent,this._document)];return new vy(this._elements,null,this._parent,this._document,t)}merge(t){var e=[...this._elements,...t._elements],t=[...this._transitions,...t._transitions];return new vy(e,null,this._parent,this._document,void 0,t)}createElement(t){var e;return this._document?this._document.createElement(t,{}):(e=vy.registry[t])?new e:s0("Unknown node type: "+t)}join(t=t=>t,e=t=>t,n=t=>t.remove(),r=t=>t,i=t=>t.remove()){t=t(this._enter),e=e(this._update),n=n(this._exit),r=r(this._merge),i=i(this._split);return e.merge(t).merge(n).merge(r).merge(i)}remove(){for(let t=0;t<this._elements.length;t++){var e=this._transitions[t];e?(e=Array.isArray(e)?e:[e],Promise.all(e.map(t=>t.finished)).then(()=>{this._elements[t].remove()})):this._elements[t].remove()}return new vy([],null,this._parent,this._document,void 0,this._transitions)}each(e){for(let t=0;t<this._elements.length;t++){var n=this._elements[t],r=n.__data__;e.call(n,r,t)}return this}attr(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))})}style(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))})}transition(t){const n="function"!=typeof t?()=>t:t,r=this["_transitions"];return this.each(function(t,e){r[e]=n.call(this,t,e)})}on(t,e){return this.each(function(){this.addEventListener(t,e)}),this}call(t,...e){return t.call(this._parent,this,...e),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}}vy.registry={g:Fs,rect:Js,circle:Ns,path:z,text:el,ellipse:Bs,image:Ys,line:Vs,polygon:Xs,polyline:Zs,html:Gs};const yy=t=>{const u=t["radius"],h=nt(t,["shape","radius"]);var t=it(h,"pointer"),e=it(h,"pin");const f=t["shape"],d=nt(t,["shape"]),p=e["shape"],g=nt(e,["shape"]);return(t,e,n,r)=>{var t=t.map(t=>n.invert(t)),[i,a,o]=function(t,e){var[,...t]=(t=t.getOptions()["transformations"]).find(t=>t[0]===e);return t}(n,"polar");const s=n.clone();var l=e["color"],i=ef({startAngle:i,endAngle:a,innerRadius:o,outerRadius:u});i.push(["cartesian"]),s.update({transformations:i});const c=t.map(t=>s.map(t));var[a,o]=my(c),[i,t]=n.getCenter(),a=Object.assign(Object.assign({x1:a,y1:o,x2:i,y2:t,stroke:l},d),h),o=Object.assign(Object.assign({cx:i,cy:t,stroke:l},g),h),i=at(new Fs);return p0(f)||("function"==typeof f?i.append(()=>f(c,e,s,r)):i.append("line").call(L,a).node()),p0(p)||("function"==typeof p?i.append(()=>p(c,e,s,r)):i.append("circle").call(L,o).node()),i.node()}},by=h=>{const f={coordinate:{type:"radial",innerRadius:.9,outerRadius:1,startAngle:-1.1*Math.PI,endAngle:.1*Math.PI},axis:{x:!1},legend:!1,tooltip:!1,encode:{x:"x",y:"y",color:"color"},scale:{color:{range:["#30BF78","#D0D0D0"]}}},d={style:{shape:yy,lineWidth:4,pointerLineCap:"round",pinR:10,pinFill:"#fff",radius:.6}},p={type:"text",style:{x:"50%",y:"60%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"}};return()=>{var t,{data:e={},scale:n={},style:r={},animate:i={}}=h,a=nt(h,["data","scale","style","animate","transform"]),{targetData:e,totalData:n,target:o,total:s,scale:l}=function(t,e){const{name:n="score",target:r,total:i,percent:a,thresholds:o=[]}=t;var t=a||r,s=a?1:i,e=Object.assign({y:{domain:[0,s]}},e);return o.length?{targetData:[{x:n,y:t,color:"target"}],totalData:o.map((t,e)=>({x:n,y:1<=e?t-o[e-1]:t,color:e})),target:t,total:s,scale:e}:{targetData:[{x:n,y:t,color:"target"}],totalData:[{x:n,y:t,color:"target"},{x:n,y:s-t,color:"total"}],target:t,total:s,scale:e}}(e,n),c=it(r,"text"),u=(t=["pointer","pin"],Object.fromEntries(Object.entries(r).filter(([e])=>t.find(t=>e.startsWith(t)))));return[rt({},f,Object.assign({type:"interval",transform:[{type:"stackY"}],data:n,scale:l,style:it(r,"arc"),animate:"object"==typeof i?it(i,"arc"):i},a)),rt({},f,d,Object.assign({type:"point",data:e,scale:l,style:u,animate:"object"==typeof i?it(i,"indicator"):i},a)),rt({},p,{style:Object.assign({text:([n,{target:r,total:e}]=[c,{target:o,total:s}],(n=n.content)?n(r,e):r.toString())},c),animate:"object"==typeof i?it(i,"text"):i})]}},xy=(by.props={},()=>(i,t,e,a)=>{const{x:o,series:s}=e,l=Object.entries(e).filter(([t])=>t.startsWith("y")).map(([,t])=>t),c=Object.entries(e).filter(([t])=>t.startsWith("size")).map(([,t])=>t);if(void 0===o||void 0===l||void 0===c)throw new Error("Missing encode for x or y or size channel.");const u=t.x,h=t.series;e=Array.from(i,n=>{var t=u.getBandWidth(u.invert(+o[n])),e=t*(h?h.getBandWidth(h.invert(+(null===s||void 0===s?void 0:s[n]))):1),t=(+(null===s||void 0===s?void 0:s[n])||0)*t;const r=+o[n]+t+e/2;return[...l.map((t,e)=>[r+ +c[e][n]/i.length,+l[e][n]]),...l.map((t,e)=>[r-+c[e][n]/i.length,+l[e][n]]).reverse()].map(t=>a.map(t))});return[i,e]});xy.props={defaultShape:"density",defaultLabelShape:"label",composite:!1,channels:[...ud({shapes:["density"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"size",required:!0},{name:"series",scale:"band"},{name:"size",required:!0,scale:"identity"}],preInference:[...pd(),{type:"maybeZeroY1"},{type:"maybeZeroX"}],postInference:[...fd()],interaction:{shareTooltip:!0}};const wy=t=>(t,e,n,r)=>{const{x:i,y:a,size:o,color:s}=n;return[[0],[Array.from(t,t=>{var e=o?+o[t]:40;return[...r.map([+i[t],+a[t]]),s[t],e]})]]};wy.props={defaultShape:"heatmap",defaultLabelShape:"label",composite:!1,channels:[...ud({shapes:["heatmap"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"color",scale:"identity",required:!0},{name:"size"}],preInference:[...pd(),{type:"maybeZeroY"},{type:"maybeZeroX"}],postInference:[...hd()]};const My=()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"],ky=(My.props={},()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"]),Ey=(ky.props={},t=>new h1(t)),Oy=(Ey.props={},t=>new k1(t)),Sy=(Oy.props={},t=>new c1(t)),_y=(Sy.props={},t=>new y1(t)),Ay=(_y.props={},t=>new E1(t)),Ty=(Ay.props={},t=>new q1(t)),Py=(Ty.props={},t=>new P1(t)),Ly=(Py.props={},t=>new S1(t)),Cy=(Ly.props={},t=>new A1(t)),Ny=(Cy.props={},t=>new N1(t)),jy=(Ny.props={},t=>new L1(t)),Ry=(jy.props={},t=>new _1(t)),Iy=(Ry.props={},t=>new U1(t)),By=(Iy.props={},t=>new d1(t));function Dy(t){return function(){return t}}By.props={};const Fy=Math.abs,zy=Math.atan2,Gy=Math.cos,Wy=Math.max,Yy=Math.min,Hy=Math.sin,Vy=Math.sqrt,qy=1e-12,$y=Math.PI,Uy=$y/2,Xy=2*$y;function Ky(t){return 1<=t?Uy:t<=-1?-Uy:Math.asin(t)}const Zy=Math.PI,Qy=2*Zy,Jy=1e-6,tb=Qy-Jy;function eb(n){this._+=n[0];for(let t=1,e=n.length;t<e;++t)this._+=arguments[t]+n[t]}class nb{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?eb:function(t){var e=Math.floor(t);if(!(0<=e))throw new Error("invalid digits: "+t);if(15<e)return eb;const r=10**e;return function(n){this._+=n[0];for(let t=1,e=n.length;t<e;++t)this._+=Math.round(arguments[t]*r)/r+n[t]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,r){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(t,e,n,r,i,a){this._append`C${+t},${+e},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(t,e,n,r,i){if(t=+t,e=+e,n=+n,r=+r,(i=+i)<0)throw new Error("negative radius: "+i);var a,o,s=this._x1,l=this._y1,c=n-t,u=r-e,h=s-t,f=l-e,d=h*h+f*f;null===this._x1?this._append`M${this._x1=t},${this._y1=e}`:d>Jy&&(Math.abs(f*c-u*h)>Jy&&i?(o=c*c+u*u,r=(n=n-s)*n+(s=r-l)*s,l=Math.sqrt(o),a=Math.sqrt(d),d=(o=i*Math.tan((Zy-Math.acos((o+d-r)/(2*l*a)))/2))/a,r=o/l,Math.abs(d-1)>Jy&&this._append`L${t+d*h},${e+d*f}`,this._append`A${i},${i},0,0,${+(h*s<f*n)},${this._x1=t+r*c},${this._y1=e+r*u}`):this._append`L${this._x1=t},${this._y1=e}`)}arc(t,e,n,r,i,a){if(t=+t,e=+e,a=!!a,(n=+n)<0)throw new Error("negative radius: "+n);let o=n*Math.cos(r),s=n*Math.sin(r),l=t+o,c=e+s,u=1^a,h=a?r-i:i-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Jy||Math.abs(this._y1-c)>Jy)&&this._append`L${l},${c}`,n&&((h=h<0?h%Qy+Qy:h)>tb?this._append`A${n},${n},0,1,${u},${t-o},${e-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:h>Jy&&this._append`A${n},${n},0,${+(h>=Zy)},${u},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function rb(){return new nb}function ib(n){let r=3;return n.digits=function(t){if(!arguments.length)return r;if(null==t)r=null;else{var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);r=e}return n},()=>new nb(r)}function ab(t){return t.innerRadius}function ob(t){return t.outerRadius}function sb(t){return t.startAngle}function lb(t){return t.endAngle}function cb(t){return t&&t.padAngle}function ub(t,e,n,r,i,a,o){var s=t-n,l=e-r,o=(o?a:-a)/Vy(s*s+l*l),l=o*l,o=-o*s,s=t+l,t=e+o,e=n+l,n=r+o,r=(s+e)/2,c=(t+n)/2,u=e-s,h=n-t,f=u*u+h*h,a=i-a,s=s*n-e*t,n=(h<0?-1:1)*Vy(Wy(0,a*a*f-s*s)),e=(s*h-u*n)/f,t=(-s*u-h*n)/f,d=(s*h+u*n)/f,s=(-s*u+h*n)/f,u=e-r,h=t-c,n=d-r,f=s-c;return n*n+f*f<u*u+h*h&&(e=d,t=s),{cx:e,cy:t,x01:-l,y01:-o,x11:e*(i/a-1),y11:t*(i/a-1)}}function hb(){var A=ab,T=ob,P=Dy(0),L=null,C=sb,N=lb,j=cb,R=null,I=ib(e);function e(){var t,e,n,r,i,a,o,s,l,c,u,h,f,d,p,g,m,v,y,b,x,w,M=+A.apply(this,arguments),k=+T.apply(this,arguments),E=C.apply(this,arguments)-Uy,O=N.apply(this,arguments)-Uy,S=Fy(O-E),_=E<O;if(R=R||(t=I()),k<M&&(e=k,k=M,M=e),k>qy?S>Xy-qy?(R.moveTo(k*Gy(E),k*Hy(E)),R.arc(0,0,k,E,O,!_),M>qy&&(R.moveTo(M*Gy(O),M*Hy(O)),R.arc(0,0,M,O,E,_))):(r=e=E,i=n=O,o=a=S,f=(u=j.apply(this,arguments)/2)>qy&&(L?+L.apply(this,arguments):Vy(M*M+k*k)),w=x=s=Yy(Fy(k-M)/2,+P.apply(this,arguments)),f>qy&&(h=Ky(f/M*Hy(u)),f=Ky(f/k*Hy(u)),(a-=2*h)>qy?(r+=h*=_?1:-1,i-=h):(a=0,r=i=(E+O)/2),(o-=2*f)>qy?(e+=f*=_?1:-1,n-=f):(o=0,e=n=(E+O)/2)),u=k*Gy(e),h=k*Hy(e),f=M*Gy(i),E=M*Hy(i),s>qy&&(d=k*Gy(n),p=k*Hy(n),g=M*Gy(r),m=M*Hy(r),S<$y)&&((O=function(t,e,n,r,i,a,o,s){var l=(s=s-a)*(n=n-t)-(o=o-i)*(r=r-e);if(!(l*l<qy))return[t+(l=(o*(e-a)-s*(t-i))/l)*n,e+l*r]}(u,h,g,m,d,p,f,E))?(S=u-O[0],y=h-O[1],b=d-O[0],v=p-O[1],y=1/Hy((1<(S=(S*b+y*v)/(Vy(S*S+y*y)*Vy(b*b+v*v)))?0:S<-1?$y:Math.acos(S))/2),b=Vy(O[0]*O[0]+O[1]*O[1]),x=Yy(s,(M-b)/(y-1)),w=Yy(s,(k-b)/(1+y))):x=w=0),o>qy?w>qy?(l=ub(g,m,u,h,k,w,_),c=ub(d,p,f,E,k,w,_),R.moveTo(l.cx+l.x01,l.cy+l.y01),w<s?R.arc(l.cx,l.cy,w,zy(l.y01,l.x01),zy(c.y01,c.x01),!_):(R.arc(l.cx,l.cy,w,zy(l.y01,l.x01),zy(l.y11,l.x11),!_),R.arc(0,0,k,zy(l.cy+l.y11,l.cx+l.x11),zy(c.cy+c.y11,c.cx+c.x11),!_),R.arc(c.cx,c.cy,w,zy(c.y11,c.x11),zy(c.y01,c.x01),!_))):(R.moveTo(u,h),R.arc(0,0,k,e,n,!_)):R.moveTo(u,h),M>qy&&a>qy?x>qy?(l=ub(f,E,d,p,M,-x,_),c=ub(u,h,g,m,M,-x,_),R.lineTo(l.cx+l.x01,l.cy+l.y01),x<s?R.arc(l.cx,l.cy,x,zy(l.y01,l.x01),zy(c.y01,c.x01),!_):(R.arc(l.cx,l.cy,x,zy(l.y01,l.x01),zy(l.y11,l.x11),!_),R.arc(0,0,M,zy(l.cy+l.y11,l.cx+l.x11),zy(c.cy+c.y11,c.cx+c.x11),_),R.arc(c.cx,c.cy,x,zy(c.y11,c.x11),zy(c.y01,c.x01),!_))):R.arc(0,0,M,i,r,_):R.lineTo(f,E)):R.moveTo(0,0),R.closePath(),t)return R=null,t+""||null}return e.centroid=function(){var t=(+A.apply(this,arguments)+ +T.apply(this,arguments))/2,e=(+C.apply(this,arguments)+ +N.apply(this,arguments))/2-$y/2;return[Gy(e)*t,Hy(e)*t]},e.innerRadius=function(t){return arguments.length?(A="function"==typeof t?t:Dy(+t),e):A},e.outerRadius=function(t){return arguments.length?(T="function"==typeof t?t:Dy(+t),e):T},e.cornerRadius=function(t){return arguments.length?(P="function"==typeof t?t:Dy(+t),e):P},e.padRadius=function(t){return arguments.length?(L=null==t?null:"function"==typeof t?t:Dy(+t),e):L},e.startAngle=function(t){return arguments.length?(C="function"==typeof t?t:Dy(+t),e):C},e.endAngle=function(t){return arguments.length?(N="function"==typeof t?t:Dy(+t),e):N},e.padAngle=function(t){return arguments.length?(j="function"==typeof t?t:Dy(+t),e):j},e.context=function(t){return arguments.length?(R=null==t?null:t,e):R},e}function fb(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function db(t){this._context=t}function pb(t){return new db(t)}function gb(t){return t[0]}function mb(t){return t[1]}function vb(o,s){var l=Dy(!0),c=null,u=pb,h=null,f=ib(e);function e(t){var e,n,r,i=(t=fb(t)).length,a=!1;for(null==c&&(h=u(r=f())),e=0;e<=i;++e)!(e<i&&l(n=t[e],e,t))===a&&((a=!a)?h.lineStart():h.lineEnd()),a&&h.point(+o(n,e,t),+s(n,e,t));if(r)return h=null,r+""||null}return o="function"==typeof o?o:void 0===o?gb:Dy(o),s="function"==typeof s?s:void 0===s?mb:Dy(s),e.x=function(t){return arguments.length?(o="function"==typeof t?t:Dy(+t),e):o},e.y=function(t){return arguments.length?(s="function"==typeof t?t:Dy(+t),e):s},e.defined=function(t){return arguments.length?(l="function"==typeof t?t:Dy(!!t),e):l},e.curve=function(t){return arguments.length?(u=t,null!=c&&(h=u(c)),e):u},e.context=function(t){return arguments.length?(null==t?c=h=null:h=u(c=t),e):c},e}function yb(u,h,f){var d=null,p=Dy(!0),g=null,m=pb,v=null,y=ib(e);function e(t){var e,n,r,i,a,o=(t=fb(t)).length,s=!1,l=new Array(o),c=new Array(o);for(null==g&&(v=m(a=y())),e=0;e<=o;++e){if(!(e<o&&p(i=t[e],e,t))===s)if(s=!s)n=e,v.areaStart(),v.lineStart();else{for(v.lineEnd(),v.lineStart(),r=e-1;n<=r;--r)v.point(l[r],c[r]);v.lineEnd(),v.areaEnd()}s&&(l[e]=+u(i,e,t),c[e]=+h(i,e,t),v.point(d?+d(i,e,t):l[e],f?+f(i,e,t):c[e]))}if(a)return v=null,a+""||null}function t(){return vb().defined(p).curve(m).context(g)}return u="function"==typeof u?u:void 0===u?gb:Dy(+u),h="function"==typeof h?h:Dy(void 0===h?0:+h),f="function"==typeof f?f:void 0===f?mb:Dy(+f),e.x=function(t){return arguments.length?(u="function"==typeof t?t:Dy(+t),d=null,e):u},e.x0=function(t){return arguments.length?(u="function"==typeof t?t:Dy(+t),e):u},e.x1=function(t){return arguments.length?(d=null==t?null:"function"==typeof t?t:Dy(+t),e):d},e.y=function(t){return arguments.length?(h="function"==typeof t?t:Dy(+t),f=null,e):h},e.y0=function(t){return arguments.length?(h="function"==typeof t?t:Dy(+t),e):h},e.y1=function(t){return arguments.length?(f=null==t?null:"function"==typeof t?t:Dy(+t),e):f},e.lineX0=e.lineY0=function(){return t().x(u).y(h)},e.lineY1=function(){return t().x(u).y(f)},e.lineX1=function(){return t().x(d).y(h)},e.defined=function(t){return arguments.length?(p="function"==typeof t?t:Dy(!!t),e):p},e.curve=function(t){return arguments.length?(m=t,null!=g&&(v=m(g)),e):m},e.context=function(t){return arguments.length?(null==t?g=v=null:v=m(g=t),e):g},e}rb.prototype=nb.prototype,db.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var bb=wb(pb);function xb(t){this._curve=t}function wb(e){function t(t){return new xb(e(t))}return t._curve=e,t}function Mb(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(wb(t)):e()._curve},t}function kb(){}function Eb(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Ob(t,e){this._context=t,this._k=(1-e)/6}function Sb(t,e){this._context=t,this._k=(1-e)/6}function _b(t,e,n){var r,i,a=t._x1,o=t._y1,s=t._x2,l=t._y2;t._l01_a>qy&&(r=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,i=3*t._l01_a*(t._l01_a+t._l12_a),a=(a*r-t._x0*t._l12_2a+t._x2*t._l01_2a)/i,o=(o*r-t._y0*t._l12_2a+t._y2*t._l01_2a)/i),t._l23_a>qy&&(r=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,i=3*t._l23_a*(t._l23_a+t._l12_a),s=(s*r+t._x1*t._l23_2a-e*t._l12_2a)/i,l=(l*r+t._y1*t._l23_2a-n*t._l12_2a)/i),t._context.bezierCurveTo(a,o,s,l,t._x2,t._y2)}function Ab(t,e){this._context=t,this._alpha=e}xb.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}},Ob.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Eb(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Eb(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function e(n){function t(t){return new Ob(t,n)}return t.tension=function(t){return e(+t)},t}(0),Sb.prototype={areaStart:kb,areaEnd:kb,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Eb(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function e(n){function t(t){return new Sb(t,n)}return t.tension=function(t){return e(+t)},t}(0),Ab.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:_b(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Tb=function e(n){function t(t){return n?new Ab(t,n):new Ob(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function Pb(t,e){this._context=t,this._alpha=e}Pb.prototype={areaStart:kb,areaEnd:kb,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:_b(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Lb=function e(n){function t(t){return n?new Pb(t,n):new Sb(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function Cb(t){this._context=t}function Nb(t){return new Cb(t)}function jb(t,e){this._context=t,this._t=e}function Rb(t){return new jb(t,.5)}function Ib(t){return new jb(t,0)}function Bb(t){return new jb(t,1)}function Db(t,e,n){return Math.max(e,Math.min(t,n))}function Fb(t,e,n,r={}){var{inset:i=0,radius:a=0,insetLeft:o=i,insetTop:s=i,insetRight:l=i,insetBottom:c=i,radiusBottomLeft:u=a,radiusBottomRight:h=a,radiusTopLeft:f=a,radiusTopRight:d=a,minWidth:p=-1/0,maxWidth:g=1/0}=r,r=nt(r,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight","minWidth","maxWidth"]);if(!gp(n)&&!vp(n)){var m=!!pp(n),[v,,y]=m?hy(t):t;const[k,w]=v;var[y,v]=ey(y,v),b=(0<y?k:k+y)+o,x=(0<v?w:w+v)+s,y=Math.abs(y)-(o+l),o=Math.abs(v)-(s+c),l=m?y:Db(y,p,g),v=m?Db(o,p,g):o,s=b-(l-y)/2,c=x-(v-o)/2;return at(new Js({})).style("x",s).style("y",c).style("width",l).style("height",v).style("radius",[f,d,h,u]).call(L,r).node()}const{y:w,y1:M}=e;m=n.getCenter(),p=fy(n,t,[w,M]),g=hb().cornerRadius(a).padAngle(i*Math.PI/180);return at(new z({})).style("path",g(p)).style("transform",`translate(${m[0]}, ${m[1]})`).style("radius",a).style("inset",i).call(L,r).node()}Cb.prototype={areaStart:kb,areaEnd:kb,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},jb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),0<=this._line&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:var n;this._t<=0?(this._context.lineTo(this._x,e),this._context.lineTo(t,e)):(n=this._x*(1-this._t)+t*this._t,this._context.lineTo(n,this._y),this._context.lineTo(n,e))}this._x=t,this._y=e}};const zb=S=>{const{colorAttribute:_,first:A=!0,last:T=!0}=S,P=nt(S,["colorAttribute","opacityAttribute","first","last"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=dy(r,i,a,o),{defaultColor:i,radius:a=0}=r,o=nt(r,["defaultColor","radius"]),r=o.lineWidth||1,{stroke:s,radius:a=a,radiusTopLeft:l=a,radiusTopRight:c=a,radiusBottomRight:u=a,radiusBottomLeft:h=a,innerRadius:f=0,innerRadiusTopLeft:d=f,innerRadiusTopRight:p=f,innerRadiusBottomRight:g=f,innerRadiusBottomLeft:f=f,lineWidth:r="stroke"===_||s?r:0,inset:m=0,insetLeft:v=m,insetRight:y=m,insetBottom:b=m,insetTop:x=m,minWidth:w,maxWidth:M}=P,k=nt(P,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","lineWidth","inset","insetLeft","insetRight","insetBottom","insetTop","minWidth","maxWidth"]),{color:i=i,opacity:E}=e;const O=[A?l:d,A?c:p,T?u:g,T?h:f];l=["radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft"],pp(n)&&l.push(l.shift()),d=Object.assign(Object.assign({radius:a},Object.fromEntries(l.map((t,e)=>[t,O[e]]))),{inset:m,insetLeft:v,insetRight:y,insetBottom:b,insetTop:x,minWidth:w,maxWidth:M});return at(Fb(t,e,n,d)).call(L,o).style("fill","transparent").style(_,i).style(py(S),E).style("lineWidth",r).style("stroke",void 0===s?i:s).call(L,k).node()}},Gb=(zb.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>zb(Object.assign({colorAttribute:"fill"},t))),Wb=(Gb.props=Object.assign(Object.assign({},zb.props),{defaultMarker:"square"}),t=>zb(Object.assign({colorAttribute:"stroke"},t)));Wb.props=Object.assign(Object.assign({},zb.props),{defaultMarker:"hollowSquare"});const Yb=t=>{const{adjustPoints:c=function(t,e,n){var[t,r,i,a]=t;if(pp(n)){const o=[(e?e[0]:r)[0],r[1]],s=[(e?e[3]:i)[0],i[1]];return[t,o,s,a]}const o=[r[0],(e?e[0]:r)[1]],s=[i[0],(e?e[3]:i)[1]];return[t,o,s,a]}}=t,u=nt(t,["adjustPoints"]);return(t,e,n,r,i)=>{var{index:a,mark:o,shape:s,defaultShape:l}=e,r=dy(r,o,s,l),o=r["defaultColor"],s=nt(r,["defaultColor"]),l=i[a+1],r=c(t,l,n),[i,a,t,l]=!!pp(n)?hy(r):r,{color:n=o,opacity:r}=e,e=vb().curve(Nb)([i,a,t,l]);return at(new z({})).call(L,s).style("path",e).style("fill",n).style("fillOpacity",r).call(L,u).node()}};function Hb(t,e,n){var[t,r,i,a]=t;if(pp(n)){const o=[e?e[0][0]:(r[0]+i[0])/2,r[1]],s=[e?e[3][0]:(r[0]+i[0])/2,i[1]];return[t,o,s,a]}const o=[r[0],e?e[0][1]:(r[1]+i[1])/2],s=[i[0],e?e[3][1]:(r[1]+i[1])/2];return[t,o,s,a]}Yb.props={defaultMarker:"square"};const Vb=t=>Yb(Object.assign({adjustPoints:Hb},t));function qb(t){const e="function"==typeof t?t:t.render;return class extends Rs{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}Vb.props={defaultMarker:"square"};const $b=qb(t=>{var{d1:e,d2:n,style1:r,style2:i}=t.attributes;at(t).maybeAppend("line",()=>new z({})).style("d",e).call(L,r),at(t).maybeAppend("line1",()=>new z({})).style("d",n).call(L,i)});const Ub=t=>{const{curve:h,gradient:f=!1,gradientColor:d="between",defined:p=t=>!Number.isNaN(t)&&null!=t,connect:g=!1}=t,m=nt(t,["curve","gradient","gradientColor","defined","connect"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=dy(r,i,a,o),{defaultColor:i,lineWidth:a}=r,o=nt(r,["defaultColor","lineWidth"]),{color:r=i,size:i=a,seriesColor:a,seriesX:s,seriesY:l}=e,a=f&&a?uy(a,s,l,f,d):r,s=gy(n,e),l=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o),a&&{stroke:a}),i&&{lineWidth:i}),s&&{transform:s}),m);let c;if(gp(n)){const u=n.getCenter();c=n=>Mb(vb().curve(bb)).angle((t,e)=>ay(ey(n[e],u))).radius((t,e)=>ry(n[e],u)).defined(([t,e])=>p(t)&&p(e)).curve(h)(n)}else c=vb().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>p(t)&&p(e)).curve(h);var[r,e]=function(t,e){var n=[],r=[];let i=!1,a=null;for(const o of t)e(o[0])&&e(o[1])?(n.push(o),i&&(i=!1,r.push([a,o])),a=o):i=!0;return[n,r]}(t,p),o=it(l,"connect"),a=!!e.length;return(!a||g&&!Object.keys(o).length?at(new z({})).style("d",c(r)||[]).call(L,l):a&&!g?at(new z({})).style("d",c(t)).call(L,l):at(new $b).style("style1",Object.assign(Object.assign({},l),o)).style("style2",l).style("d1",e.map(c).join(",")).style("d2",c(t))).node()}},Xb=(Ub.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=gp(n)?Nb:pb;return Ub(Object.assign({curve:i},a))(t,e,n,r)}),Kb=(Xb.props=Object.assign(Object.assign({},Ub.props),{defaultMarker:"line"}),t=>{const{alpha:a=.5}=t,o=nt(t,["alpha"]);return(t,e,n,r)=>{var i=gp(n)?Lb:Tb;return Ub(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),Zb=(Kb.props=Object.assign(Object.assign({},Ub.props),{defaultMarker:"smooth"}),t=>Ub(Object.assign({curve:Bb},t))),Qb=(Zb.props=Object.assign(Object.assign({},Ub.props),{defaultMarker:"hv"}),t=>Ub(Object.assign({curve:Ib},t))),Jb=(Qb.props=Object.assign(Object.assign({},Ub.props),{defaultMarker:"vh"}),t=>Ub(Object.assign({curve:Rb},t)));Jb.props=Object.assign(Object.assign({},Ub.props),{defaultMarker:"hvh"});const tx=M=>(e,t,n,r)=>{var i,a,o,s,l,c,u,h,f,{mark:t,shape:d,defaultShape:p,seriesSize:g,color:m}=t,r=dy(r,t,d,p),t=r["defaultColor"],d=nt(r,["defaultColor"]),v=rb();for(let t=0;t<e.length-1;t++){var y=e[t],b=e[t+1],x=g[t],w=g[t+1];i=v,x=x,w=w,l=o=a=f=h=u=c=l=s=a=o=a=void 0,a=(l=iy(ey(b=b,y=y)))+Math.PI/2,o=[x/2*Math.cos(a),x/2*Math.sin(a)],a=[w/2*Math.cos(a),w/2*Math.sin(a)],s=[w/2*Math.cos(l),w/2*Math.sin(l)],l=[x/2*Math.cos(l),x/2*Math.sin(l)],c=ny(y,o),u=ny(b,a),h=ny(u,s),f=ey(s=ny(b,s),a),b=ey(b,a),a=ey(y,o),o=ey(a,l),y=ey(y,l),l=ey(c,l),i.moveTo(...c),i.lineTo(...u),i.arcTo(...h,...s,w/2),i.arcTo(...f,...b,w/2),i.lineTo(...a),i.arcTo(...o,...y,x/2),i.arcTo(...l,...c,x/2),i.closePath()}return at(new z({})).call(L,d).style("fill",m||t).style("d",v.toString()).call(L,M).node()};tx.props=Object.assign(Object.assign({},Ub.props),{defaultMarker:"line"});ll=(t,e,n)=>[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]],ll.style=["fill"],n=ll.bind(void 0),n.style=["stroke","lineWidth"],ls=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]],ls.style=["fill"],Wo=ls.bind(void 0),Wo.style=["fill"],$o=ls.bind(void 0),$o.style=["stroke","lineWidth"],r=(t,e,n)=>{var r=.618*n;return[["M",t-r,e],["L",t,e-n],["L",t+r,e],["L",t,e+n],["Z"]]},r.style=["fill"],fl=r.bind(void 0),fl.style=["stroke","lineWidth"],dl=(t,e,n)=>{var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]},dl.style=["fill"],e=dl.bind(void 0),e.style=["stroke","lineWidth"],ul=(t,e,n)=>{var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]},ul.style=["fill"],Io=ul.bind(void 0),Io.style=["stroke","lineWidth"],Ho=(t,e,n)=>{var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]},Ho.style=["fill"],Yo=Ho.bind(void 0),Yo.style=["stroke","lineWidth"],Vo=(t,e,n)=>{var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]},Vo.style=["fill"],pl=Vo.bind(void 0),pl.style=["stroke","lineWidth"],Uo=(t,e,n)=>[["M",t,e+n],["L",t,e-n]],Uo.style=["stroke","lineWidth"],a=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]],a.style=["stroke","lineWidth"],ts=(t,e,n)=>[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]],ts.style=["stroke","lineWidth"],es=(t,e,n)=>[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]],es.style=["stroke","lineWidth"],ns=(t,e,n)=>[["M",t-n,e],["L",t+n,e]],ns.style=["stroke","lineWidth"],rs=(t,e,n)=>[["M",t-n,e],["L",t+n,e]],rs.style=["stroke","lineWidth"],is=rs.bind(void 0),is.style=["stroke","lineWidth"],as=(t,e,n)=>[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]],as.style=["stroke","lineWidth"],os=(t,e,n)=>[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]],os.style=["stroke","lineWidth"],qo=(t,e,n)=>[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]],qo.style=["stroke","lineWidth"],hl=(t,e,n)=>[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]],hl.style=["stroke","lineWidth"],vl=(t,e,n)=>[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]];vl.style=["stroke","lineWidth"];const ex=new Map([["bowtie",Vo],["cross",a],["dash",is],["diamond",r],["dot",rs],["hexagon",Ho],["hollowBowtie",pl],["hollowDiamond",fl],["hollowHexagon",Yo],["hollowPoint",n],["hollowSquare",$o],["hollowTriangle",e],["hollowTriangleDown",Io],["hv",os],["hvh",hl],["hyphen",ns],["line",Uo],["plus",es],["point",ll],["rect",Wo],["smooth",as],["square",ls],["tick",ts],["triangleDown",ul],["triangle",dl],["vh",qo],["vhv",vl]]);const o=u=>{const{colorAttribute:h,symbol:t,mode:f="auto"}=u,d=nt(u,["colorAttribute","symbol","mode"]),p=ex.get(t)||ex.get("point");return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=dy(r,i,a,o),{defaultColor:i,lineWidth:a}=r,o=nt(r,["defaultColor","lineWidth"]),r=d.stroke?a||1:a,{color:a=i,transform:i,opacity:s}=e,[l,c]=my(t),t=function(t,e,n,r){var i;if(1!==e.length)return n=n["size"],"fixed"!==t&&("normal"===t||bp(r))?([[t,r],[e,i]]=e,e=Math.abs((e-t)/2),t=Math.abs((i-r)/2),Math.max(0,(e+t)/2)):n}(f,t,e,n)||d.r||o.r;return at(new z).call(L,o).style("fill","transparent").style("d",p(l,c,t)).style("lineWidth",r).style("transform",i).style("stroke",a).style(py(u),s).style(h,a).call(L,d).node()}},nx=(o.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>o(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t))),rx=(nx.props=Object.assign({defaultMarker:"bowtie"},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"cross"},t))),ix=(rx.props=Object.assign({defaultMarker:"cross"},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"diamond"},t))),ax=(ix.props=Object.assign({defaultMarker:"diamond"},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t))),ox=(ax.props=Object.assign({defaultMarker:"hexagon"},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t))),sx=(ox.props=Object.assign({defaultMarker:"hollowBowtie"},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t))),lx=(sx.props=Object.assign({defaultMarker:"hollowDiamond"},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t))),cx=(lx.props=Object.assign({defaultMarker:"hollowHexagon"},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"point"},t))),ux=(cx.props=Object.assign({defaultMarker:"hollowPoint"},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"square"},t))),hx=(ux.props=Object.assign({defaultMarker:"hollowSquare"},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t))),fx=(hx.props=Object.assign({defaultMarker:"hollowTriangle"},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t))),dx=(fx.props=Object.assign({defaultMarker:"hollowTriangleDown"},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t))),px=(dx.props=Object.assign({defaultMarker:"hyphen"},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"line"},t))),gx=(px.props=Object.assign({defaultMarker:"line"},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"plus"},t))),mx=(gx.props=Object.assign({defaultMarker:"plus"},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"point"},t))),vx=(mx.props=Object.assign({defaultMarker:"point"},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"square"},t))),yx=(vx.props=Object.assign({defaultMarker:"square"},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"tick"},t))),bx=(yx.props=Object.assign({defaultMarker:"tick"},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"triangle"},t))),xx=(bx.props=Object.assign({defaultMarker:"triangle"},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t))),wx=(xx.props=Object.assign({defaultMarker:"triangleDown"},o.props),t=>{const{arrow:f=!0,arrowSize:d="40%"}=t,p=nt(t,["arrow","arrowSize"]);return(t,e,n,r)=>{var i,a,o,s,{mark:l,shape:c,defaultShape:u,transform:h}=e,r=dy(r,l,c,u),l=r["defaultColor"],c=nt(r,["defaultColor"]),{color:u=l}=e,[r,e]=t,t=rb();return t.moveTo(...r),t.lineTo(...e),f&&([o,s]=(r=r,i=e,a="string"==typeof(a=(a={arrowSize:d})["arrowSize"])?+parseFloat(a)/100*ry(r,i):a,o=Math.PI/6,r=Math.atan2(i[1]-r[1],i[0]-r[0]),s=Math.PI/2-r-o,r-=o,[[i[0]-a*Math.sin(s),i[1]-a*Math.cos(s)],[i[0]-a*Math.cos(r),i[1]-a*Math.sin(r)]]),t.moveTo(...e),t.lineTo(...o),t.moveTo(...e),t.lineTo(...s)),at(new z).call(L,c).style("d",t.toString()).style("stroke",u||l).style("transform",h).call(L,p).node()}});function Mx(t){Ex(t,!0)}function kx(t){Ex(t,!1)}function Ex(t,e){var n=e?"visible":"hidden";!function e(t,n){n(t),t.children&&t.children.forEach(function(t){t&&e(t,n)})}(t,function(t){t.attr("visibility",n)})}wx.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};le(_x,Ox=Fs);var Ox,Sx=_x;function _x(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ox.apply(this,b([],k(t),!1))||this;return n.addEventListener(x.INSERTED,function(){kx(n)}),n}function Ax(t){t=t.appendChild(new Sx({class:"offscreen"}));return kx(t),t}le(Lx,Tx=el),Object.defineProperty(Lx.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=Ax(this)),this._offscreen},enumerable:!1,configurable:!0}),Lx.prototype.disconnectedCallback=function(){var t;null!=(t=this._offscreen)&&t.destroy()};var Tx,Px=Lx;function Lx(t){var e=(t=void 0===t?{}:t).style,t=nt(t,["style"]);return Tx.call(this,y({style:y({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},e)},t))||this}function Cx(t){return t*Math.PI/180}function Nx(t){return Number((180*t/Math.PI).toPrecision(5))}Object.defineProperty(Rx.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(Rx.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(Rx.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(Rx.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),Rx.fromRect=function(t){return new Rx(t.x,t.y,t.width,t.height)},Rx.prototype.toJSON=function(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.top,right:this.right,bottom:this.bottom,left:this.left}};var jx=Rx;function Rx(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=t,this.y=e,this.width=n,this.height=r}function Ix(t,e){return Fe(t)?t.apply(void 0,b([],k(e),!1)):t}function Bx(t,e){function r(t){return"".concat(e,"-").concat(t)}return t=Object.fromEntries(Object.entries(t).map(function(t){var t=k(t,2),e=t[0],t=t[1],n=r(t);return[e,{name:n,class:".".concat(n),id:"#".concat(n),toString:function(){return n}}]})),Object.assign(t,{prefix:r}),t}function Dx(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)zx(t,e[r]);return t}var Fx,zx=function(r,i,a,o){void 0===a&&(a=0),void 0===o&&(o=5),Object.entries(i).forEach(function(t){var t=k(t,2),e=t[0],t=t[1],n=r;Object.prototype.hasOwnProperty.call(i,e)&&(t?Ve(t)?(Ve(r[e])||(n[e]={}),a<o?zx(r[e],t,a+1,o):n[e]=i[e]):We(t)?(n[e]=[],n[e]=n[e].concat(t)):n[e]=t:n[e]=t)})},Gx=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)},Wx=sn(function(t,e){var n=Ue(t)?t:t.style.text.toString(),e=e||Yx(t),t=e.fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return(Fx=Fx||document.createElement("canvas").getContext("2d")).font=[a,e,i,"".concat(t,"px"),r].join(" "),Fx.measureText(n).width},function(t,e){return[Ue(t)?t:t.style.text.toString(),Object.values(e||Yx(t)).join()].join("")}),Yx=function(t){var e=t.style.fontFamily||"sans-serif",n=t.style.fontWeight||"normal",r=t.style.fontStyle||"normal",i=t.style.fontVariant,t=t.style.fontSize;return{fontSize:"object"==typeof t?t.value:t,fontFamily:e,fontWeight:n,fontStyle:r,fontVariant:i}};function Hx(t){return"text"===t.nodeName?t:"g"===t.nodeName&&1===t.children.length&&"text"===t.children[0].nodeName?t.children[0]:null}function Vx(t,e){t=Hx(t);t&&t.attr(e)}function qx(t,e,n){Vx(t,{wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:n=void 0===n?"...":n})}function $x(t){var e=t.canvas,n=t.touches,r=t.offsetX,t=t.offsetY;return e?[e.x,e.y]:n?[(e=n[0]).clientX,e.clientY]:r&&t?[r,t]:[0,0]}function Ux(t){return"function"==typeof t?t():Ue(t)||Ke(t)?new Px({style:{text:String(t)}}):t}function Xx(t,e,n,r,i){return void 0===r&&(r=!0),void 0===i&&(i=function(t){t.node().removeChildren()}),t?n(e):(r&&i(e),null)}function Kx(t,e,n,r,i){return(r=void 0===r?!0:r)&&t===e||i&&t===n||e<t&&t<n}var Zx=function(e,n){return function(t){return e*(1-t)+n*t}};function Qx(e,t){var i,a,o,s,n,r,l;return"number"==typeof e&&"number"==typeof t?Zx(e,t):Array.isArray(e)&&Array.isArray(t)?(i=e,o=(a=t)?a.length:0,s=i?Math.min(o,i.length):0,function(t){for(var e=new Array(s),n=new Array(o),r=0,r=0;r<s;++r)e[r]=Qx(i[r],a[r]);for(;r<o;++r)n[r]=a[r];for(r=0;r<s;++r)n[r]=e[r](t);return n}):"object"==typeof e&&"object"==typeof t?(void 0===(n=e)&&(n={}),void 0===(t=t)&&(t={}),r={},l={},Object.entries(t).forEach(function(t){var t=k(t,2),e=t[0],t=t[1];e in n?r[e]=Qx(n[e],t):l[e]=t}),function(n){return Object.entries(r).forEach(function(t){var t=k(t,2),e=t[0],t=t[1];return l[e]=t(n)}),l}):function(t){return e}}function Jx(t){for(var e=1/0,n=1/0,r=-1/0,i=-1/0,a=0;a<t.length;a++){var o=t[a],s=o.x,l=o.y,o=k([s+o.width,l+o.height],2),c=o[0],o=o[1];s<e&&(e=s),l<n&&(n=l),r<c&&(r=c),i<o&&(i=o)}return new jx(e,n,r-e,i-n)}function t2(n,t,e){function r(t){var e=k(u?["height",a]:["width",i],2),n=e[0],r=e[1];switch(c){case"flex-start":return 0;case"flex-end":return r-t[n];case"center":return r/2-t[n]/2;default:return 0}}var i=n.width,a=n.height,o=void 0===(o=e.flexDirection)?"row":o,s=(e.flexWrap,e.justifyContent),l=void 0===s?"flex-start":s;e.alignContent;var c=void 0===(s=e.alignItems)?"flex-start":s,u="row"===o,e="row"===o||"column"===o,h=u?e?[1,0]:[-1,0]:e?[0,1]:[0,-1],f=(s=k([0,0],2))[0],d=s[1],e=Jx(o=t.map(function(t){var e=t.width,t=t.height,n=k([f,d],2),r=n[0],n=n[1],i=k([f+e*h[0],d+t*h[1]],2);return f=i[0],d=i[1],new jx(r,n,e,t)})),p={"flex-start":0,"flex-end":u?i-e.width:a-e.height,center:u?(i-e.width)/2:(a-e.height)/2};return Jx(s=o.map(function(t){var e=t.x,n=t.y,t=jx.fromRect(t);return t.x=u?e+p[l]:e,t.y=u?n:n+p[l],t})),s.map(function(t){var e=t.x,n=t.y,t=jx.fromRect(t);return t.x=u?e:e+r(t),t.y=u?n+r(t):n,t}).map(function(t){var e,t=jx.fromRect(t);return t.x+=null!=(e=n.x)?e:0,t.y+=null!=(e=n.y)?e:0,t})}function e2(t,e,n){return[]}function n2(t,e){return[t[0]*e,t[1]*e]}function r2(t,e){return[t[0]+e[0],t[1]+e[1]]}function i2(t,e){return[t[0]-e[0],t[1]-e[1]]}function a2(t,e){return[Math.min(t[0],e[0]),Math.min(t[1],e[1])]}function o2(t,e){return[Math.max(t[0],e[0]),Math.max(t[1],e[1])]}function s2(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function l2(t){var e;return 0===t[0]&&0===t[1]?[0,0]:(e=Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)),[t[0]/e,t[1]/e])}function c2(t,e){e=Math.pow(10,e);return~~(t*e)/e}function u2(t,e){var n,r={},i=Array.isArray(e)?e:[e];for(n in t)i.includes(n)||(r[n]=t[n]);return r}function h2(t,e,n){void 0===n&&(n=[[0,0],[1,1]]);for(var e=!!(e=void 0===e?!1:e),r=[],i=0,a=t.length;i<a;i+=2)r.push([t[i],t[i+1]]);for(var o,s,l,c=function(t,e,n,r){var i,a=[],o=!!r,s=[1/0,1/0],l=[-1/0,-1/0];if(o){s=(r=k(r,2))[0],l=r[1];for(var c=0,u=t.length;c<u;c+=1)s=a2(s,x=t[c]),l=o2(l,x)}for(var c=0,h=t.length;c<h;c+=1){var f,d,p,g,m,v,y,b,x=t[c];0!==c||n?c!==h-1||n?(f=t[[c?c-1:h-1,c-1][n?0:1]],v=[0,0],v=n2(v=i2(d=t[n?(c+1)%h:c+1],f),e),0!==(m=(p=s2(x,f))+(g=s2(x,d)))&&(p/=m,g/=m),m=n2(v,-p),v=n2(v,g),y=r2(x,m),b=a2(b=r2(x,v),o2(d,x)),b=o2(b,a2(d,x)),y=a2(y=r2(x,m=n2(m=i2(b,x),-p/g)),o2(f,x)),b=r2(x,v=n2(v=i2(x,y=o2(y,a2(f,x))),g/p)),o&&(y=a2(y=o2(y,s),l),b=a2(b=o2(b,s),l)),a.push(i),a.push(y),i=b):(y=x,a.push(i),a.push(y)):i=x}return n&&a.push(a.shift()),a}(r,.4,e,n),u=r.length,h=[],i=0;i<u-1;i+=1)o=c[2*i],s=c[2*i+1],h.push(["C",o[0],o[1],s[0],s[1],(l=r[i+1])[0],l[1]]);return e&&(o=c[u],s=c[u+1],l=k(r,1)[0],h.push(["C",o[0],o[1],s[0],s[1],l[0],l[1]])),h}var f2=["$el","anchor","cx","cy","d","defX","defY","dx","dy","fill","fillOpacity","filter","fontFamily","fontSize","fontStyle","fontVariant","fontWeight","height","img","increasedLineWidthForHitTesting","innerHTML","isBillboard","isClosed","isOverflowing","leading","letterSpacing","lineDash","lineHeight","lineWidth","markerEnd","markerEndOffset","markerMid","markerStart","markerStartOffset","maxLines","metrics","miterLimit","offsetX","offsetY","opacity","path","points","r","radius","rx","ry","shadowColor","src","stroke","strokeOpacity","text","textAlign","textBaseline","textDecorationColor","textDecorationLine","textDecorationStyle","textOverflow","textPath","textPathSide","textPathStartOffset","transform","transformOrigin","visibility","width","wordWrap","wordWrapWidth","x","x1","x2","y","y1","y2","z1","z2","zIndex"];function d2(t){var e,n,r={};for(e in t)n=e,f2.includes(n)&&(r[e]=t[e]);return r}function p2(t,e,n){void 0===n&&(n=!1);var r=t.getBBox(),i=r.width,r=r.height,e=e/Math.max(i,r);n&&t.scale(e)}O.prototype.selectAll=function(t){return new O("string"==typeof t?this._parent.querySelectorAll(t):t,null,this._elements[0],this._document)},O.prototype.selectFacetAll=function(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new O(this._elements,null,this._parent,this._document,void 0,void 0,t)},O.prototype.select=function(t){t="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new O([t],null,t,this._document)},O.prototype.append=function(t){var e=this,n="function"==typeof t?t:function(){return e.createElement(t)},r=[];if(null!==this._data){for(var i=0;i<this._data.length;i++){var a=this._data[i],a=k(Array.isArray(a)?a:[a,null],2),o=a[0],a=a[1];(l=n(o,i)).__data__=o,null!==a&&(l.__fromElements__=a),this._parent.appendChild(l),r.push(l)}return new O(r,null,this._parent,this._document)}for(i=0;i<this._elements.length;i++){var s=this._elements[i],l=n(o=s.__data__,i);s.appendChild(l),r.push(l)}return new O(r,null,r[0],this._document)},O.prototype.maybeAppend=function(t,e){e=he(this,g2,"m",m2).call(this,"#"===t[0]?t:"#".concat(t),e);return e.attr("id",t),e},O.prototype.maybeAppendByClassName=function(t,e){t=t.toString(),e=he(this,g2,"m",m2).call(this,"."===t[0]?t:".".concat(t),e);return e.attr("className",t),e},O.prototype.maybeAppendByName=function(t,e){e=he(this,g2,"m",m2).call(this,'[name="'.concat(t,'"]'),e);return e.attr("name",t),e},O.prototype.data=function(t,n,e){void 0===n&&(n=function(t){return t}),void 0===e&&(e=function(){return null});for(var r,i,a=[],o=[],s=new Set(this._elements),l=[],c=new Set,u=new Map(this._elements.map(function(t,e){return[n(t.__data__,e),t]})),h=new Map(this._facetElements.map(function(t,e){return[n(t.__data__,e),t]})),f=Fd(this._elements,function(t){return e(t.__data__)}),d=0;d<t.length;d++){var p=t[d],g=n(p,d),m=e(p,d);if(u.has(g))(x=u.get(g)).__data__=p,x.__facet__=!1,o.push(x),s.delete(x),u.delete(g);else if(h.has(g))(x=h.get(g)).__data__=p,x.__facet__=!0,o.push(x),h.delete(g);else if(f.has(g)){var v=f.get(g);l.push([p,v]);try{r=void 0;for(var y=ue(v),b=y.next();!b.done;b=y.next()){var x=b.value;s.delete(x)}}catch(t){r={error:t}}finally{try{b&&!b.done&&(i=y.return)&&i.call(y)}finally{if(r)throw r.error}}f.delete(g)}else u.has(m)?((x=u.get(m)).__toData__?x.__toData__.push(p):x.__toData__=[p],c.add(x),s.delete(x)):a.push(p)}var w=[new O([],a,this._parent,this._document),new O(o,null,this._parent,this._document),new O(s,null,this._parent,this._document),new O([],l,this._parent,this._document),new O(c,null,this._parent,this._document)];return new O(this._elements,null,this._parent,this._document,w)},O.prototype.merge=function(t){var e=b(b([],k(this._elements),!1),k(t._elements),!1),t=b(b([],k(this._transitions),!1),k(t._transitions),!1);return new O(e,null,this._parent,this._document,void 0,t)},O.prototype.createElement=function(t){if(this._document)return this._document.createElement(t,{});var e=O.registry[t];if(e)return new e;throw e="Unknown node type: ".concat(t),new Error(e)},O.prototype.join=function(t,e,n,r,i){void 0===e&&(e=function(t){return t}),void 0===n&&(n=function(t){return t.remove()}),void 0===r&&(r=function(t){return t}),void 0===i&&(i=function(t){return t.remove()});t=(t=void 0===t?function(t){return t}:t)(this._enter),e=e(this._update),n=n(this._exit),r=r(this._merge),i=i(this._split);return e.merge(t).merge(n).merge(r).merge(i)},O.prototype.remove=function(){for(var n=this,t=0;t<this._elements.length;t++)!function(t){var e=n._elements[t],t=n._transitions[t];t?t.then(function(){return e.remove()}):e.remove()}(t);return new O([],null,this._parent,this._document,void 0,this._transitions)},O.prototype.each=function(t){for(var e=0;e<this._elements.length;e++){var n=this._elements[e],r=n.__data__;t.call(n,r,e)}return this},O.prototype.attr=function(n,r){var i="function"!=typeof r?function(){return r}:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))})},O.prototype.style=function(n,r,t){void 0===t&&(t=!0);var i="function"==typeof r&&t?r:function(){return r};return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))})},O.prototype.styles=function(t,o){return void 0===t&&(t={}),void 0===o&&(o=!0),this.each(function(r,i){var a=this;Object.entries(t).forEach(function(t){var t=k(t,2),e=t[0],n=t[1],t="function"==typeof n&&o?n:function(){return n};void 0!==n&&a.attr(e,t.call(a,r,i))})})},O.prototype.update=function(n,t){void 0===t&&(t=!0);var r="function"==typeof n&&t?n:function(){return n};return this.each(function(t,e){n&&this.update&&this.update(r.call(this,t,e))})},O.prototype.maybeUpdate=function(n,t){void 0===t&&(t=!0);var r="function"==typeof n&&t?n:function(){return n};return this.each(function(t,e){n&&this.update&&this.update(r.call(this,t,e))})},O.prototype.transition=function(n){var r=this._transitions;return this.each(function(t,e){r[e]=n.call(this,t,e)})},O.prototype.on=function(t,e){return this.each(function(){this.addEventListener(t,e)}),this},O.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.call.apply(t,b([this._parent,this],k(e),!1)),this},O.prototype.node=function(){return this._elements[0]},O.prototype.nodes=function(){return this._elements},O.prototype.transitions=function(){return this._transitions.filter(function(t){return!!t})},O.prototype.parent=function(){return this._parent},g2=new WeakSet,m2=function(t,e){var n=this._elements[0],t=n.querySelector(t);return t||(t="string"==typeof e?this.createElement(e):e(),n.appendChild(t)),new O([t],null,this._parent,this._document)},O.registry={g:Fs,rect:Js,circle:Ns,path:z,text:Px,ellipse:Bs,image:Ys,line:Vs,polygon:Xs,polyline:Zs,html:Gs};var g2,m2,v2=O;function O(t,e,n,r,i,a,o){void 0===t&&(t=null),void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=[null,null,null,null,null]),void 0===a&&(a=[]),void 0===o&&(o=[]),g2.add(this),this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=i[0],this._update=i[1],this._exit=i[2],this._merge=i[3],this._split=i[4],this._transitions=a,this._facetElements=o}function w(t){return new v2([t],null,t,t.ownerDocument)}function y2(t,e,n){return t.querySelector(e)?w(t).select(e):w(t).append(n)}function b2(t){if(Ke(t))return[t,t,t,t];if(We(t)){var e=t.length;if(1===e)return[t[0],t[0],t[0],t[0]];if(2===e)return[t[0],t[1],t[0],t[1]];if(3===e)return[t[0],t[1],t[2],t[1]];if(4===e)return t}return[0,0,0,0]}function x2(t){var t=t.getLocalBounds(),t=k([t.min,t.max],2),e=k(t[0],2),n=e[0],e=e[1],t=k(t[1],2),r=t[0],t=t[1];return{x:n,y:e,width:r-n,height:t-e,left:n,bottom:t,top:e,right:r}}function w2(t){return t.toString().charAt(0).toUpperCase()+t.toString().slice(1)}function M2(t,e,n){void 0===n&&(n=!0);var e=e||(null==(e=t.match(/^([a-z][a-z0-9]+)/))?void 0:e[0])||"",t=t.replace(new RegExp("^(".concat(e,")")),"");return n?(e=t).toString().charAt(0).toLowerCase()+e.toString().slice(1):t}function S(t,r,i){void 0===i&&(i=!1);var a={};return Object.entries(t).forEach(function(t){var e,t=k(t,2),n=t[0],t=t[1];"className"!==n&&"class"!==n&&(n.startsWith("show")&&M2(n,"show").startsWith(r)!==i?n===(e=r,"".concat("show").concat(w2(e)))?a[n]=t:a[n.replace(new RegExp(w2(r)),"")]=t:n.startsWith("show")||n.startsWith(r)===i||"filter"===(e=M2(n,r))&&"function"==typeof t||(a[e]=t))}),a}function k2(t,r){return Object.entries(t).reduce(function(t,e){var e=k(e,2),n=e[0],e=e[1];return n.startsWith("show")?t["show".concat(r).concat(n.slice(4))]=e:t["".concat(r).concat(w2(n))]=e,t},{})}function E2(t,n){void 0===n&&(n=["x","y","class","className"]);var r=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],i={},a={};return Object.entries(t).forEach(function(t){var t=k(t,2),e=t[0],t=t[1];n.includes(e)||(-1!==r.indexOf(e)?a[e]=t:i[e]=t)}),[i,a]}function O2(o,t){if(t)try{var e=t.replace(/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,function(t,e,n){return"translate(".concat((e=e,n=n,i=(r=(r=o).getBBox()).width,a=r.height,[(r=k([e,n].map(function(t,e){var n;return t.includes("%")?parseFloat((null==(n=t.match(/[+-]?([0-9]*[.])?[0-9]+/))?void 0:n[0])||"0")/100*(0===e?i:a):t}),2))[0],r[1]]),")");var r,i,a});o.attr("transform",e)}catch(t){}}le(_2,S2=Rs),Object.defineProperty(_2.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=Ax(this)),this._offscreen},enumerable:!1,configurable:!0}),Object.defineProperty(_2.prototype,"defaultOptions",{get:function(){return this._defaultOptions},enumerable:!1,configurable:!0}),_2.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this),this.initialized=!0},_2.prototype.disconnectedCallback=function(){var t;null!=(t=this._offscreen)&&t.destroy()},_2.prototype.attributeChangedCallback=function(t){"visibility"===t&&!function(){Ex(this,"hidden"!==this.attributes.visibility)}.call(this)},_2.prototype.update=function(t,e){return this.attr(Dx({},this.attributes,t=void 0===t?{}:t)),null==(t=this.render)?void 0:t.call(this,this.attributes,this,e)},_2.prototype.clear=function(){this.removeChildren()},_2.prototype.bindEvents=function(t,e){};var S2,xl=_2;function _2(t,e){t=S2.call(this,Dx({},{style:e=void 0===e?{}:e},t))||this;return t.initialized=!1,t._defaultOptions=e,t}function A2(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]}function T2(t,e,n){return[["M",t,e+n],["L",t,e-n]]}function P2(t,e,n){return[["M",t-n,e],["L",t+n,e]]}El=A2,Tl=P2;function L2(t){n="default",Ye(e=t)&&e instanceof Image?n="image":Fe(e)?n="symbol":Ue(e)&&(r=new RegExp("data:(image|text)"),n=e.match(r)?"base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(e)?"url":"symbol");var e,n,r=n;return["base64","url","image"].includes(r)?"image":t&&"symbol"===r?"path":null}le(j2,C2=xl),j2.prototype.render=function(t,e){var r=t.symbol,n=t.size,i=void 0===n?16:n,a=nt(t,["symbol","size"]),o=L2(r);Xx(!!o,w(e),function(t){t.maybeAppendByClassName("marker",o).attr("className","marker ".concat(o,"-marker")).call(function(t){var e,n;"image"===o?t.styles({img:r,width:e=2*i,height:e,x:-i,y:-i}):(e=i/2,n=Fe(r)?r:j2.getSymbol(r),t.styles(y({path:null==n?void 0:n(0,0,e)},a)))})})},j2.MARKER_SYMBOL_MAP=new Map,j2.registerSymbol=function(t,e){j2.MARKER_SYMBOL_MAP.set(t,e)},j2.getSymbol=function(t){return j2.MARKER_SYMBOL_MAP.get(t)};var C2,N2=j2;function j2(){return null!==C2&&C2.apply(this,arguments)||this}N2.registerSymbol("cross",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]}),N2.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),N2.registerSymbol("line",T2),N2.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),N2.registerSymbol("tick",function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]}),N2.registerSymbol("circle",A2),N2.registerSymbol("point",El),N2.registerSymbol("bowtie",function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]}),N2.registerSymbol("hexagon",function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]}),N2.registerSymbol("square",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]}),N2.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),N2.registerSymbol("triangle",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]}),N2.registerSymbol("triangle-down",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]}),N2.registerSymbol("line",T2),N2.registerSymbol("dot",P2),N2.registerSymbol("dash",Tl),N2.registerSymbol("smooth",function(t,e,n){return[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]]}),N2.registerSymbol("hv",function(t,e,n){return[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]]}),N2.registerSymbol("vh",function(t,e,n){return[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]]}),N2.registerSymbol("hvh",function(t,e,n){return[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]]}),N2.registerSymbol("vhv",function(t,e){return[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]]});le(B2,R2=Ls),B2.prototype.render=function(){var t=this.attributes.columns;w(this.columnsGroup).selectAll(".column").data(t.flat()).join(function(t){return t.append("rect").attr("className","column").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.attr(t)})},function(t){return t.remove()})},B2.prototype.update=function(t){this.attr(Dx({},this.attributes,t)),this.render()},B2.prototype.clear=function(){this.removeChildren()};var R2,I2=B2;function B2(t){var e=this,n=t.style,t=nt(t,["style"]);return(e=R2.call(this,rt({},{type:"column"},y({style:n},t)))||this).columnsGroup=new Fs({name:"columns"}),e.appendChild(e.columnsGroup),e.render(),e}le(z2,D2=Ls),z2.prototype.render=function(){var t=this.attributes,e=t.lines,t=t.areas;e&&this.renderLines(e),t&&this.renderAreas(t)},z2.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},z2.prototype.update=function(t){this.attr(Dx({},this.attributes,t)),this.render()},z2.prototype.renderLines=function(t){w(this.linesGroup).selectAll(".line").data(t).join(function(t){return t.append("path").attr("className","line").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.attr(t)})},function(t){return t.remove()})},z2.prototype.renderAreas=function(t){w(this.linesGroup).selectAll(".area").data(t).join(function(t){return t.append("path").attr("className","area").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.style(t)})},function(t){return t.remove()})};var D2,F2=z2;function z2(t){var e=this,n=t.style,t=nt(t,["style"]);return(e=D2.call(this,rt({},{type:"lines"},y({style:n},t)))||this).linesGroup=e.appendChild(new Fs),e.areasGroup=e.appendChild(new Fs),e.render(),e}function G2(t,e){var n=(e=void 0===e?!1:e)?t.length-1:0,t=t.map(function(t,e){return b([e===n?"M":"L"],k(t),!1)});return e?t.reverse():t}function W2(t,e){if(void 0===e&&(e=!1),t.length<=2)return G2(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var a=e?t[r-i-1]:t[i];hn(a,n.slice(-2))||n.push.apply(n,b([],k(a),!1))}var o=h2(n,!1);return e?o.unshift(b(["M"],k(t[r-1]),!1)):o.unshift(b(["M"],k(t[0]),!1)),o}function Y2(t,e,n){t=an(t);return t.push(["L",e,n],["L",0,n],["Z"]),t}function H2(t){return 0===t.length?[0,0]:[$e(function(t,e){if(We(t)){for(var n,r=1/0,i=0;i<t.length;i++){var a=t[i],o=Fe(e)?e(a):a[e];o<r&&(n=a,r=o)}return n}}(t,function(t){return $e(t)||0})),qe(function(t,e){if(We(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var a=t[i],o=Fe(e)?e(a):a[e];r<o&&(n=a,r=o)}return n}}(t,function(t){return qe(t)||0}))]}function V2(t){for(var e=an(t),n=e[0].length,t=k([Array(n).fill(0),Array(n).fill(0)],2),r=t[0],i=t[1],a=0;a<e.length;a+=1)for(var o=e[a],s=0;s<n;s+=1)0<=o[s]?(o[s]+=r[s],r[s]=o[s]):(o[s]+=i[s],i[s]=o[s]);return e}le(U2,q2=xl),Object.defineProperty(U2.prototype,"rawData",{get:function(){var t=this.attributes.data;return t&&0!==(null==t?void 0:t.length)?(t=an(t),Ke(t[0])?[t]:t):[[]]},enumerable:!1,configurable:!0}),Object.defineProperty(U2.prototype,"data",{get:function(){return this.attributes.isStack?V2(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(U2.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(U2.prototype,"baseline",{get:function(){var t=this.scales.y,e=k(t.getOptions().domain||[0,0],2),n=e[0],e=e[1];return e<0?t.map(e):t.map(n<0?0:n)},enumerable:!1,configurable:!0}),Object.defineProperty(U2.prototype,"containerShape",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty(U2.prototype,"linesStyle",{get:function(){var n=this,t=this.attributes,e=t.type,r=t.isStack,i=t.smooth;if("line"!==e)throw new Error("linesStyle can only be used in line type");var a,o,s,l,c,u,h,f,d,p=S(this.attributes,"area"),g=S(this.attributes,"line"),t=this.containerShape.width,e=this.data;return 0===e[0].length?{lines:[],areas:[]}:(a=this.scales,u=a.x,a=a.y,e=e,o=(u={type:"line",x:u,y:a}).x,s=u.y,l=(u=k(s.getOptions().range||[0,0],2))[0],c=u[1],l<c&&(u=k([l,c],2),c=u[0],l=u[1]),a=e.map(function(t){return t.map(function(t,e){return[o.map(e),Xe(s.map(t),c,l)]})}),u=[],p&&(e=this.baseline,u=r?(i?function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=t[i],s=W2(o),l=void 0,l=0===i?Y2(s,e,n):(a=W2(t[i-1],!0),o=o[0],a[0][0]="L",b(b(b([],k(s),!1),k(a),!1),[b(["M"],k(o),!1),["Z"]],!1));r.push(l)}return r}:function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=G2(t[i]),s=void 0,s=0===i?Y2(o,e,n):((a=G2(t[i-1],!0))[0][0]="L",b(b(b([],k(o),!1),k(a),!1),[["Z"]],!1));r.push(s)}return r})(a,t,e):(h=i,f=t,d=e,a.map(function(t){return Y2((h?W2:G2)(t),f,d)}))),{lines:a.map(function(t,e){return y({stroke:n.getColor(e),path:(i?W2:G2)(t)},g)}),areas:u.map(function(t,e){return y({path:t,fill:n.getColor(e)},p)})})},enumerable:!1,configurable:!0}),Object.defineProperty(U2.prototype,"columnsStyle",{get:function(){var i=this,a=S(this.attributes,"column"),t=this.attributes,o=t.isStack;if("column"!==t.type)throw new Error("columnsStyle can only be used in column type");var t=this.containerShape.height,s=this.rawData;if(!s)return{columns:[]};o&&(s=V2(s));var e=this.createScales(s),l=e.x,c=e.y,e=k(H2(s),2),n=e[0],e=e[1],u=new k1({domain:[0,e-(0<n?0:n)],range:[0,t]}),h=l.getBandWidth(),f=this.rawData;return{columns:s.map(function(t,r){return t.map(function(t,e){var n=h/s.length;return y(y({fill:i.getColor(r)},a),o?{x:l.map(e),y:c.map(t),width:h,height:u.map(f[r][e])}:{x:l.map(e)+n*r,y:0<=t?c.map(t):c.map(0),width:n,height:u.map(Math.abs(t))})})})}},enumerable:!1,configurable:!0}),U2.prototype.render=function(t,e){this.container=y2(e,".container","rect").attr("className","container").node();var n=t.type,r="spark".concat(n),i="line"===n?this.linesStyle:this.columnsStyle;this.spark=y2(e,".".concat(r),function(){return new("line"===n?F2:I2)({className:r,style:i})}).styles(i).node()},U2.prototype.getColor=function(t){var e=this.attributes.color;return We(e)?e[t%e.length]:Fe(e)?e.call(null,t):e},U2.prototype.createScales=function(t){var e,n=this.attributes,r=n.type,i=n.range,i=void 0===i?[]:i,a=n.isGroup,n=n.spacing,o=this.containerShape,s=o.width,o=o.height,l=k(H2(t),2),c=l[0],l=l[1],c=new k1({domain:[null!=(e=i[0])?e:c,null!=(e=i[1])?e:l],range:[o,0]});return"line"===r?{type:r,x:new k1({domain:[0,t[0].length-1],range:[0,s]}),y:c}:{type:r,x:new h1({domain:t[0].map(function(t,e){return e}),range:[0,s],paddingInner:a?n:0}),y:c}},U2.tag="sparkline";var q2,$2=U2;function U2(t){return q2.call(this,t,{type:"line",width:200,height:20,isStack:!1,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineLineWidth:1,areaOpacity:0,isGroup:!1,columnLineWidth:1,columnStroke:"#fff"})||this}function X2(n){var e,r;return n?(e=["enter","update","exit"],r=Object.fromEntries(Object.entries(n).filter(function(t){t=k(t,1)[0];return!e.includes(t)})),Object.fromEntries(e.map(function(t){var e;return"boolean"!=typeof(e=n)&&"enter"in e&&"update"in e&&"exit"in e?!1===n[t]?[t,!1]:[t,y(y({},n[t]),r)]:[t,r]}))):{enter:!1,update:!1,exit:!1}}function K2(t,e){t?t.finished.then(e):e()}function Z2(t,e){"update"in t?t.update(e):t.attr(e)}function Q2(t,e,n){return 0===e.length?null:n?t.animate(e,n):(Z2(t,{style:e.slice(-1)[0]}),null)}function J2(r,t,e){var i={},a={};return Object.entries(t).forEach(function(t){var e,t=k(t,2),n=t[0],t=t[1];_(t)||(e=r.style[n]||r.parsedStyle[n]||0)!==t&&(i[n]=e,a[n]=t)}),e?Q2(r,[i,a],y({fill:"both"},e)):(Z2(r,a),null)}function tw(t,e){return t.style.opacity||(t.style.opacity=1),J2(t,{opacity:0},e)}var ew,nw={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},rw={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},iw={orientation:"horizontal",showLabel:!0,type:"start"},aw=Bx({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track"},"slider"),ow=Bx({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),sw=(le(lw,ew=xl),lw.prototype.render=function(t,e){var n=t.size,n=void 0===n?10:n,r=t.radius,r=void 0===r?n/4:r,i=t.orientation,t=nt(t,["size","radius","orientation"]),a=2.4*n,r=w(e).maybeAppendByClassName(ow.iconRect,"rect").styles(y(y({},t),{width:n,height:a,radius:r,x:-n/2,y:-a/2})),o=1/3*n,s=2/3*n,l=.25*a,c=.75*a;r.maybeAppendByClassName("".concat(ow.iconLine,"-1"),"line").styles(y({x1:o,x2:o,y1:l,y2:c},t)),r.maybeAppendByClassName("".concat(ow.iconLine,"-2"),"line").styles(y({x1:s,x2:s,y1:l,y2:c},t)),r.node().setOrigin(n/2,a/2),"vertical"===i?e.setLocalEulerAngles(90):e.setLocalEulerAngles(0)},lw);function lw(){return null!==ew&&ew.apply(this,arguments)||this}le(hw,cw=xl),hw.prototype.renderLabel=function(t){var e=this,n=this.attributes.showLabel,r=k(E2(S(this.attributes,"label"),[]),2),i=r[0],r=r[1];Xx(!!n,w(t).maybeAppendByClassName(ow.labelGroup,"g").styles(r),function(t){e.label=t.maybeAppendByClassName(ow.label,"text").styles(y(y({},rw),i)),e.label.on("mousedown",function(t){t.stopPropagation()}),e.label.on("touchstart",function(t){t.stopPropagation()})})},hw.prototype.renderIcon=function(t){var e=this.attributes.orientation,n=y(y({orientation:e},nw),S(this.attributes,"icon")),e=this.attributes.iconShape,r=void 0===e?function(){return new sw({style:n})}:e;w(t).maybeAppendByClassName(ow.iconGroup,"g").selectAll(ow.icon.class).data([r]).join(function(t){return t.append(r).attr("className",ow.icon.name)},function(t){return t.update(n)},function(t){return t.remove()})},hw.prototype.render=function(t,e){this.renderIcon(e),this.renderLabel(e)};var cw,uw=hw;function hw(t){return cw.call(this,t,iw)||this}le(pw,fw=xl),Object.defineProperty(pw.prototype,"values",{get:function(){return this.attributes.values},set:function(t){this.attributes.values=this.clampValues(t)},enumerable:!1,configurable:!0}),Object.defineProperty(pw.prototype,"sparklineStyle",{get:function(){var t;return"horizontal"!==this.attributes.orientation?null:(t=S(this.attributes,"sparkline"),y(y({zIndex:0},this.availableSpace),t))},enumerable:!1,configurable:!0}),Object.defineProperty(pw.prototype,"shape",{get:function(){var t=this.attributes,e=t.trackLength,t=t.trackSize,t=k(this.getOrientVal([[e,t],[t,e]]),2);return{width:t[0],height:t[1]}},enumerable:!1,configurable:!0}),Object.defineProperty(pw.prototype,"availableSpace",{get:function(){var t=k(b2(this.attributes.padding),4),e=t[0],n=t[1],r=t[2],t=t[3],i=this.shape;return{x:t,y:e,width:i.width-(t+n),height:i.height-(e+r)}},enumerable:!1,configurable:!0}),pw.prototype.getValues=function(){return this.values},pw.prototype.setValues=function(t,e){void 0===e&&(e=!1),this.attributes.values=t=void 0===t?[0,0]:t;t=!1!==e&&this.attributes.animate;J2(this.selectionShape.node(),this.selectionStyle,t),this.updateHandlesPosition(t)},pw.prototype.updateHandlesPosition=function(t){this.attributes.showHandle&&(J2(this.startHandle,this.getHandleStyle("start"),t),J2(this.endHandle,this.getHandleStyle("end"),t))},pw.prototype.innerSetValues=function(t,e){void 0===e&&(e=!1);var n=this.values,t=this.clampValues(t=void 0===t?[0,0]:t);this.attr("values",t),this.setValues(t),e&&this.onValueChange(n)},pw.prototype.renderTrack=function(t){var e=this.attributes.brushable,n=S(this.attributes,"track");this.trackShape=w(t).maybeAppendByClassName(aw.track,"rect").styles(y(y({cursor:e?"crosshair":"default"},this.shape),n))},pw.prototype.renderSparkline=function(t){var n=this;Xx("horizontal"===this.attributes.orientation,w(t).maybeAppendByClassName(aw.sparklineGroup,"g"),function(t){var e=n.sparklineStyle;t.maybeAppendByClassName(aw.sparkline,function(){return new $2({style:e})}).update(e)})},Object.defineProperty(pw.prototype,"selectionStyle",{get:function(){var t=S(this.attributes,"selection");return y(y({},t),this.calcMask())},enumerable:!1,configurable:!0}),pw.prototype.renderHandles=function(){var t,e=this,n=(this.attributes.showHandle?["start","end"]:[]).map(function(t){return{type:t}}),r=this;null!=(t=this.foregroundGroup)&&t.selectAll(aw.handle.class).data(n,function(t){return t.type}).join(function(t){return t.append(function(t){t=t.type;return new uw({style:e.getHandleStyle(t)})}).each(function(t){var e=t.type,t=(this.attr("class","".concat(aw.handle.name," ").concat(e,"-handle")),"".concat(e,"Handle"));(r[t]=this).addEventListener("pointerdown",function(t){r.onDragStart(e)(t)})})},function(t){return t.each(function(t){t=t.type;this.update(r.getHandleStyle(t))})},function(t){return t.each(function(t){t=t.type,t="".concat(t,"Handle");r[t]=void 0}).remove()})},pw.prototype.renderSelection=function(t){this.foregroundGroup=w(t).maybeAppendByClassName(aw.foreground,"g"),this.selectionShape=this.foregroundGroup.maybeAppendByClassName(aw.selection,"rect").styles(this.selectionStyle),this.renderHandles()},pw.prototype.render=function(t,e){this.renderTrack(e),this.renderSparkline(e),this.renderSelection(e)},pw.prototype.clampValues=function(t,e){void 0===e&&(e=4);var n=k(this.range,2),r=n[0],n=n[1],i=k(this.getValues().map(function(t){return c2(t,e)}),2),a=i[0],i=i[1],t=k((t||[a,i]).map(function(t){return c2(t,e)}),2),o=t[0],t=t[1],s=(t<o&&(o=(s=k([t,o],2))[0],t=s[1]),t-o);return n-r<s?[r,n]:o<r?a===r&&i===t?[r,t]:[r,s+r]:n<t?i===n&&a===o?[o,n]:[n-s,n]:[o,t]},pw.prototype.calcMask=function(t){var t=k(this.clampValues(t),2),e=t[0],t=t[1],n=this.availableSpace,r=n.x,i=n.y,a=n.width,n=n.height;return this.getOrientVal([{y:i,height:n,x:e*a+r,width:(t-e)*a},{x:r,width:a,y:e*n+i,height:(t-e)*n}])},pw.prototype.calcHandlePosition=function(t){var e=this.availableSpace,n=e.x,r=e.y,i=e.width,e=e.height,a=k(this.clampValues(),2),o=a[0],a=a[1],t=("start"===t?o:a)*this.getOrientVal([i,e]);return{x:n+this.getOrientVal([t,i/2]),y:r+this.getOrientVal([e/2,t])}},pw.prototype.calcHandleText=function(t){var e,n,r,i,a,o,s,l,c=this.attributes,u=c.orientation,h=c.formatter,c=c.autoFitLabel,f=S(this.attributes,"handle"),d=S(f,"label"),f=f.spacing,p=this.getHandleSize(),g=this.clampValues(),h=h("start"===t?g[0]:g[1]),g=new Px({style:y(y({},d),{text:h})}),d=g.getBBox(),m=d.width,d=d.height;return g.destroy(),c?(c=g=0,e=(n=this.availableSpace).width,n=n.height,r=(o=this.calcMask()).x,i=o.y,a=o.width,o=o.height,"horizontal"===u?(l=(s=f+p)+m/2,g="start"===t?0<r-s-m?-l:l:m<e-r-a-s?l:-l):(l=f+p,c="start"===t?d<i-p?-l:l:d<n-i-o-p?l:-l),{x:g,y:c,text:h}):(e=f+p+("horizontal"===u?m/2:0),(r={text:h})["horizontal"===u?"x":"y"]="start"===t?-e:e,r)},pw.prototype.getHandleLabelStyle=function(t){var e;return this.attributes.showLabel?(e=S(this.attributes,"handleLabel"),y(y({},e),this.calcHandleText(t))):{}},pw.prototype.getHandleIconStyle=function(){var t=this.attributes.handleIconShape,e=S(this.attributes,"handleIcon"),n=this.getOrientVal(["ew-resize","ns-resize"]),r=this.getHandleSize();return y({cursor:n,shape:t,size:r},e)},pw.prototype.getHandleStyle=function(t){var e=this.attributes,n=e.showLabel,e=e.orientation,r=this.calcHandlePosition(t),i=this.calcHandleText(t);return y(y(y(y({},k2(this.getHandleIconStyle(),"icon")),k2(y(y({},this.getHandleLabelStyle(t)),i),"label")),r),{orientation:e,showLabel:n,type:t,zIndex:3})},pw.prototype.getHandleSize=function(){var t=this.attributes,e=t.handleIconSize,n=t.width,t=t.height;return e||Math.floor((this.getOrientVal([+t,+n])+4)/2.4)},pw.prototype.getOrientVal=function(t){var t=k(t,2),e=t[0],t=t[1];return"horizontal"===this.attributes.orientation?e:t},pw.prototype.setValuesOffset=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!1);var r=k(this.getValues(),2),t=[r[0]+t,r[1]+e].sort();n?this.setValues(t):this.innerSetValues(t,!0)},pw.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,e=e.height;return t/this.getOrientVal([n,e])},pw.prototype.dispatchCustomEvent=function(t,e,n){var r=this;t.on(e,function(t){t.stopPropagation(),r.dispatchEvent(new cs(n,{detail:t}))})},pw.prototype.bindEvents=function(){var t=this.selectionShape,t=(this.addEventListener("wheel",this.onScroll),t.on("mousedown",this.onDragStart("selection")),t.on("touchstart",this.onDragStart("selection")),this.dispatchCustomEvent(t,"mouseenter","selectionMouseenter"),this.dispatchCustomEvent(t,"mouseleave","selectionMouseleave"),this.dispatchCustomEvent(t,"click","selectionClick"),this.trackShape);this.dispatchCustomEvent(t,"click","trackClick"),this.dispatchCustomEvent(t,"mouseenter","trackMouseenter"),this.dispatchCustomEvent(t,"mouseleave","trackMouseleave"),t.on("mousedown",this.onDragStart("track")),t.on("touchstart",this.onDragStart("track"))},pw.prototype.onScroll=function(t){var e;this.attributes.scrollable&&(e=t.deltaX,t=t.deltaY,t=this.getRatio(t||e),this.setValuesOffset(t,t,!0))},pw.tag="slider";var fw,dw=pw;function pw(t){var a=fw.call(this,t,y(y(y({animate:{duration:100,fill:"both"},brushable:!0,formatter:function(t){return t.toString()},handleSpacing:2,orientation:"horizontal",padding:0,autoFitLabel:!0,scrollable:!0,selectionCursor:"move",selectionFill:"#5B8FF9",selectionFillOpacity:.45,selectionZIndex:2,showHandle:!0,showLabel:!0,slidable:!0,trackFill:"#416180",trackLength:200,trackOpacity:.05,trackSize:20,trackZIndex:-1,values:[0,1]},k2(iw,"handle")),k2(nw,"handleIcon")),k2(rw,"handleLabel")))||this;return a.range=[0,1],a.onDragStart=function(i){return function(t){t.stopPropagation(),a.target=i,a.prevPos=a.getOrientVal($x(t));var t=a.availableSpace,e=t.x,t=t.y,n=a.attributes,r=n.x,n=n.y;a.selectionStartPos=a.getRatio(a.prevPos-a.getOrientVal([e,t])-a.getOrientVal([+r,+n])),a.selectionWidth=0,document.addEventListener("mousemove",a.onDragging),document.addEventListener("touchmove",a.onDragging),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchend",a.onDragEnd)}},a.onDragging=function(t){var e=a.attributes,n=e.slidable,r=e.brushable,e=(t.stopPropagation(),a.getOrientVal($x(t))),t=e-a.prevPos;if(t){var i=a.getRatio(t);switch(a.target){case"start":n&&a.setValuesOffset(i);break;case"end":n&&a.setValuesOffset(0,i);break;case"selection":n&&a.setValuesOffset(i,i);break;case"track":if(!r)return;a.selectionWidth+=i,a.innerSetValues([a.selectionStartPos,a.selectionStartPos+a.selectionWidth].sort(),!0)}a.prevPos=e}},a.onDragEnd=function(){document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("mouseup",a.onDragEnd),document.removeEventListener("touchend",a.onDragEnd)},a.onValueChange=function(t){t=new cs("valuechange",{detail:{oldValue:t,value:a.getValues()}});a.dispatchEvent(t)},a.selectionStartPos=0,a.selectionWidth=0,a.prevPos=0,a.target="",a}le(vw,gw=xl),Object.defineProperty(vw.prototype,"padding",{get:function(){return b2(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(vw.prototype,"value",{get:function(){var t=this.attributes.value,e=k(this.range,2),n=e[0],e=e[1];return Xe(t,n,e)},enumerable:!1,configurable:!0}),Object.defineProperty(vw.prototype,"trackLength",{get:function(){var t=this.attributes,e=t.viewportLength,t=t.trackLength;return void 0===t?e:t},enumerable:!1,configurable:!0}),Object.defineProperty(vw.prototype,"availableSpace",{get:function(){var t=this.attributes.trackSize,e=this.trackLength,n=k(this.padding,4),r=n[0],i=n[1],a=n[2],n=n[3],t=k(this.getOrientVal([[e,t],[t,e]]),2);return{x:n,y:r,width:+t[0]-(n+i),height:+t[1]-(r+a)}},enumerable:!1,configurable:!0}),Object.defineProperty(vw.prototype,"trackRadius",{get:function(){var t=this.attributes,e=t.isRound,t=t.trackSize;return e?t/2:0},enumerable:!1,configurable:!0}),Object.defineProperty(vw.prototype,"thumbRadius",{get:function(){var t,e=this.attributes,n=e.isRound,e=e.thumbRadius;return n?(t=(n=this.availableSpace).width,n=n.height,e||this.getOrientVal([n,t])/2):0},enumerable:!1,configurable:!0}),vw.prototype.getValues=function(t){void 0===t&&(t=this.value);var e=this.attributes,e=e.viewportLength/e.contentLength,n=k(this.range,2),r=n[0],t=t*(n[1]-r-e);return[t,t+e]},vw.prototype.getValue=function(){return this.value},vw.prototype.renderSlider=function(t){var e=this.attributes,n=e.orientation,r=e.trackSize,i=e.padding,e=e.slidable,a=S(this.attributes,"track"),o=S(this.attributes,"thumb"),s=y(y({brushable:!1,orientation:n,padding:i,selectionRadius:this.thumbRadius,showHandle:!1,slidable:e,trackLength:this.trackLength,trackRadius:this.trackRadius,trackSize:r,values:this.getValues()},k2(a,"track")),k2(o,"selection"));this.slider=w(t).maybeAppendByClassName("scrollbar",function(){return new dw({style:s})}).update(s).node()},vw.prototype.render=function(t,e){this.renderSlider(e)},vw.prototype.setValue=function(t,e){void 0===e&&(e=!1);var n=this.attributes.value,r=k(this.range,2),i=r[0],r=r[1];this.slider.setValues(this.getValues(Xe(t,i,r)),e),this.onValueChange(n)},vw.prototype.bindEvents=function(){var e=this;this.slider.addEventListener("trackClick",function(t){t.stopPropagation(),e.onTrackClick(t.detail)}),this.onHover()},vw.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orientation?t[0]:t[1]},vw.prototype.onHover=function(){this.slider.addEventListener("selectionMouseenter",this.onThumbMouseenter),this.slider.addEventListener("trackMouseenter",this.onTrackMouseenter),this.slider.addEventListener("selectionMouseleave",this.onThumbMouseleave),this.slider.addEventListener("trackMouseleave",this.onTrackMouseleave)},vw.tag="scrollbar";var gw,mw=vw;function vw(t){var a=gw.call(this,t,{isRound:!0,orientation:"vertical",padding:[2,2,2,2],scrollable:!0,slidable:!0,thumbCursor:"default",trackSize:10,value:0})||this;return a.range=[0,1],a.onValueChange=function(t){var e=a.attributes.value;t!==e&&(a.dispatchEvent(new cs("scroll",t={detail:{oldValue:t,value:e}})),a.dispatchEvent(new cs("valuechange",t)))},a.onTrackClick=function(t){var e,n,r,i;a.attributes.slidable&&(r=(e=k(a.getLocalPosition(),2))[0],e=e[1],n=(i=k(a.padding,4))[0],i=i[3],r=a.getOrientVal([r+i,e+n]),i=(a.getOrientVal($x(t))-r)/a.trackLength,a.setValue(i,!0))},a.onThumbMouseenter=function(t){a.dispatchEvent(new cs("thumbMouseenter",{detail:t.detail}))},a.onTrackMouseenter=function(t){a.dispatchEvent(new cs("trackMouseenter",{detail:t.detail}))},a.onThumbMouseleave=function(t){a.dispatchEvent(new cs("thumbMouseleave",{detail:t.detail}))},a.onTrackMouseleave=function(t){a.dispatchEvent(new cs("trackMouseleave",{detail:t.detail}))},a}var yw={data:[],animate:{enter:!1,update:{duration:100,easing:"ease-in-out-sine",fill:"both"},exit:{duration:100,fill:"both"}},showArrow:!0,showGrid:!0,showLabel:!0,showLine:!0,showTick:!0,showTitle:!0,showTrunc:!1,dataThreshold:100,lineLineWidth:1,lineStroke:"black",crossPadding:10,titleFill:"black",titleFontSize:12,titlePosition:"lb",titleSpacing:0,titleTextAlign:"center",titleTextBaseline:"middle",lineArrow:function(){return new z({style:{path:[["M",10,10],["L",-10,0],["L",10,-10],["L",0,0],["L",10,10],["Z"]],anchor:"0.5 0.5",fill:"black",transformOrigin:"center"}})},labelAlign:"parallel",labelDirection:"positive",labelFontSize:12,labelSpacing:0,gridConnect:"line",gridControlAngles:[],gridDirection:"positive",gridLength:0,gridType:"segment",lineArrowOffset:15,lineArrowSize:10,tickDirection:"positive",tickLength:5,tickLineWidth:1,tickStroke:"black",tickStrokeOpacity:.65,labelOverlap:[]},bw=(rt({},yw,{style:{type:"arc"}}),rt({},yw,{style:{}}),Bx({mainGroup:"main-group",gridGroup:"grid-group",grid:"grid",lineGroup:"line-group",line:"line",tickGroup:"tick-group",tick:"tick",tickItem:"tick-item",labelGroup:"label-group",label:"label",labelItem:"label-item",titleGroup:"title-group",title:"title",lineFirst:"line-first",lineSecond:"line-second"},"axis")),xw=Bx({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function ww(t){return t.reduce(function(t,e,n){return t.push(b([0===n?"M":"L"],k(e),!1)),t},[])}function Mw(t,e,n){var r,i,a,o;return"surround"===e.type?(r=t,n=n,o=(e=e).connect,e=e.center,"line"===(void 0===o?"line":o)?ww(r):e?(i=s2(r[0],e),a=n?0:1,r.reduce(function(t,e,n){return 0===n?t.push(b(["M"],k(e),!1)):t.push(b(["A",i,i,0,0,a],k(e),!1)),t},[])):[]):ww(t)}function kw(t,e,n){function r(t,e){return[l,t,c,e,s].flat()}var i=n.type,a=n.connect,o=n.center,s=n.closed?[["Z"]]:[],n=k([Mw(t,n),Mw(e.slice().reverse(),n,!0)],2),l=n[0],c=n[1],n=k([t[0],e.slice(-1)[0]],2),t=n[0],e=n[1];if("line"===a||"surround"===i)return r([b(["L"],k(e),!1)],[b(["L"],k(t),!1)]);if(o)return a=(n=k([s2(e,o),s2(t,o)],2))[0],i=n[1],r([b(["A",a,a,0,0,1],k(e),!1),b(["L"],k(e),!1)],[b(["A",i,i,0,0,0],k(t),!1),b(["L"],k(t),!1)]);throw new Error("Arc grid need to specified center")}function Ew(t,e,n){var r=n.animate,i=n.connect,a=n.areaFill;if(e.length<2||!a||!i)return[];for(var o=Array.isArray(a)?a:[a,"transparent"],s=[],l=0;l<e.length-1;l++){var c=k([e[l].points,e[l+1].points],2),c=kw(c[0],c[1],n);s.push({path:c,fill:o[l%o.length]})}return t.selectAll(xw.region.class).data(s,function(t,e){return e}).join(function(t){return t.append("path").each(function(t,e){t=Ix(t,[t,e,s]);this.attr(t)}).attr("className",xw.region.name)},function(t){return t.transition(function(t,e){return J2(this,Ix(t,[t,e,s]),r.update)})},function(t){return t.transition(function(){var t=this,e=tw(this,r.exit);return K2(e,function(){return t.remove()}),e})}).transitions()}le(_w,Ow=xl),_w.prototype.render=function(t,e){t.type,t.center,t.areaFill,t.closed;var n,r,i,a,o=nt(t,["type","center","areaFill","closed"]),s=(s=void 0===(s=t.data)?[]:s,t.closed?s.map(function(t){var e=t.points,n=k(e,1)[0];return y(y({},t),{points:b(b([],k(e),!1),[n],!1)})}):s),l=w(e).maybeAppendByClassName(xw.lineGroup,"g"),e=w(e).maybeAppendByClassName(xw.regionGroup,"g"),o=(l=l,r=o,i=(n=t).animate,a=s.map(function(t,e){return{id:t.id||"grid-line-".concat(e),path:Mw(t.points,n)}}),l.selectAll(xw.line.class).data(a,function(t){return t.id}).join(function(t){return t.append("path").each(function(t,e){t=Ix(d2(y({path:t.path},r)),[t,e,a]);this.attr(y({class:xw.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4]},t))})},function(t){return t.transition(function(t,e){return J2(this,Ix(d2(y({path:t.path},r)),[t,e,a]),i.update)})},function(t){return t.transition(function(){var t=this,e=tw(this,i.exit);return K2(e,function(){return t.remove()}),e})}).transitions()),l=Ew(e,s,t);return b(b([],k(o),!1),k(l),!1)};var Ow,Sw=_w;function _w(){return null!==Ow&&Ow.apply(this,arguments)||this}function Aw(t,e){return Object.fromEntries(Object.entries(t).map(function(t){t=k(t,2);return[t[0],Ix(t[1],e)]}))}function Tw(t,e){return e&&Fe(e)?t.filter(e):t}var Pw=sn(function(t,e){var n=e.startAngle;return(e.endAngle-n)*t+n},function(t,e){return[t,e.startAngle,e.endAngle].join()}),Lw=sn(function(t,e){var n,r,i;return"linear"===e.type?(r=(n=k(e.startPos,2))[0],n=n[1],i=k(e.endPos,2),l2([(r=k([i[0]-r,i[1]-n],2))[0],r[1]])):(i=Cx(Pw(t,e)),[-Math.sin(i),Math.cos(i)])},function(t,e){var n,r,i,a="linear"===(n=e).type?(a=n.startPos,r=n.endPos,b(b([],k(a),!1),k(r),!1)):(a=n.startAngle,r=n.endAngle,i=n.center,n=n.radius,b(b([a,r],k(i),!1),[n],!1));return"arc"===e.type&&a.push(t),a.join()});function Cw(t,e,n){t=Lw(t,n);return n=t,"positive"!==e?[n[1],-n[0]]:[-n[1],n[0]]}function Nw(t,e){return Cw(t,e.labelDirection,e)}var jw=sn(function(t,e){var n=k(e.startPos,2),r=n[0],n=n[1],e=k(e.endPos,2),e=k([e[0]-r,e[1]-n],2);return[r+e[0]*t,n+e[1]*t]},function(t,e){return b(b([t],k(e.startPos),!1),k(e.endPos),!1).join()}),Rw=sn(function(t,e){var n=e.radius,r=k(e.center,2),i=r[0],r=r[1],t=Cx(Pw(t,e));return[i+n*Math.cos(t),r+n*Math.sin(t)]},function(t,e){return b([t,e.startAngle,e.endAngle,e.radius],k(e.center),!1).join()});function Iw(t,e){return("linear"===e.type?jw:Rw)(t,e)}function Bw(t){return 0===Lw(0,t)[1]}function Dw(t){return 0===Lw(0,t)[0]}function Fw(t,e){return e-t==360}function zw(t,e,n,r,i){function a(t){return[n+i*Math.cos(t),r+i*Math.sin(t)]}var o=e-t,s=k([i,i],2),l=s[0],s=s[1],c=k([Cx(t),Cx(e)],2),u=c[0],c=c[1],h=k(a(u),2),f=h[0],h=h[1],d=k(a(c),2),p=d[0],d=d[1];return Fw(t,e)?[["M",f,h],["A",l,s,0,1,0,(c=k(a((c+u)/2),2))[0],c[1]],["A",l,s,0,1,0,p,d]]:(u=180<o?1:0,c=e<t?0:1,"M".concat(f,",").concat(h,",A").concat(l,",").concat(s,",0,").concat(u,",").concat(c,",").concat(p,",").concat(d))}function Gw(t,e,n,s){var l=e.startAngle,c=e.endAngle,u=e.center,h=e.radius;return t.selectAll(bw.line.class).data([{path:zw.apply(void 0,b(b([l,c],k(u),!1),[h],!1))}],function(t,e){return e}).join(function(t){return t.append("path").attr("className",bw.line.name).styles(e).styles({path:function(t){return t.path}})},function(t){return t.transition(function(){var t,r,e,n,i,a=this,o=(o=(i=(i=t=this).attributes).startAngle,e=i.endAngle,n=i.center,i=i.radius,o=b(b([o,e],k(n),!1),[i],!1),e=b(b([l,c],k(u),!1),[h],!1),(n=s.update)?(i=void 0===(i=n.duration)?0:i,r=Qx(o,e),o=Math.ceil(+i/16),i=new Array(o).fill(0).map(function(t,e,n){return{__keyframe_data__:r(e/(n.length-1))}}),t.animate(i,y({fill:"both"},n))):(t.attr("__keyframe_data__",e),null));return o&&(o.onframe=i=function(){var t=fn(a.attributes,"__keyframe_data__");a.style.path=zw.apply(void 0,b([],k(t),!1))},o.onfinish=i),o}).styles(e)},function(t){return t.remove()}).styles(n).transitions()}function Ww(t){var t=k(t,2),e=k(t[0],2),n=e[0],e=e[1],t=k(t[1],2);return{x1:n,y1:e,x2:t[0],y2:t[1]}}function Yw(e,t,n,r){function i(t){return e.selectAll(bw.line.class).data(t,function(t,e){return e}).join(function(t){return t.append("line").attr("className",function(t){return"".concat(bw.line.name," ").concat(t.className)}).styles(n).transition(function(t){return J2(this,Ww(t.line),!1)})},function(t){return t.styles(n).transition(function(t){return J2(this,Ww(t.line),r.update)})},function(t){return t.remove()}).transitions()}var a,o,s,l=t.showTrunc,c=t.startPos,u=t.endPos,h=t.truncRange,f=t.lineExtension,d=k([c,u],2),p=k(d[0],2),g=p[0],p=p[1],d=k(d[1],2),m=d[0],d=d[1],u=k(f?(c=k([c=c,u=u,f=void 0===(f=f)?[0,0]:f],3),f=(u=k(c[0],2))[0],u=u[1],v=(a=k(c[1],2))[0],a=a[1],y=(c=k(c[2],2))[0],c=c[1],f=(v=k([v-f,a-u],2))[0],a=v[1],u=Math.sqrt(Math.pow(f,2)+Math.pow(a,2)),y=(v=k([-y/u,c/u],2))[0],c=v[1],[y*f,y*a,c*f,c*a]):new Array(4).fill(0),4),v=u[0],y=u[1],f=u[2],c=u[3];return l&&h?(u=(a=k(h,2))[0],l=a[1],o=(u=k([g+(h=m-g)*u,p+(s=d-p)*u],2))[0],u=u[1],s=(h=k([g+h*l,p+s*l],2))[0],l=h[1],h=i([{line:[[g+v,p+y],[o,u]],className:bw.lineFirst.name},{line:[[s,l],[m+f,d+c]],className:bw.lineSecond.name}]),t.truncRange,t.truncShape,t.lineExtension,h):i([{line:[[g+v,p+y],[m+f,d+c]],className:bw.line.name}])}function Hw(t,e,n){var r,i,a,o,s,l=e.type,c=S(e,"line"),n=("linear"===l?Yw:Gw)(t,e,u2(c,"arrow"),n);return t=t,l=l,c=c,r=(e=e).showArrow,i=e.showTrunc,a=e.lineArrow,o=e.lineArrowOffset,s=e.lineArrowSize,l="arc"!==l&&i?t.select(bw.lineSecond.class):t.select(bw.line.class),!r||!a||"arc"===e.type&&Fw(e.startAngle,e.endAngle)?(i=l.node())&&(i.style.markerEnd=void 0):((t=Ux(a)).attr(c),p2(t,s,!0),l.style("markerEnd",t).style("markerEndOffset",-o)),n}function Vw(t){var e=t.type,n=t.gridCenter;return"linear"===e?n:n||t.center}function qw(t,i){var a=i.gridLength;return t.map(function(t,e){var t=t.value,n=k(Iw(t,i),2),r=n[0],n=n[1],t=k(n2(Cw(t,i.gridDirection,i),a),2);return{id:e,points:[[r,n],[r+t[0],n+t[1]]]}})}function $w(t,e,n,r){var i=S(n,"grid"),a=i.type,o=i.areaFill,s=Vw(n),l=Tw(e,n.gridFilter),e=("segment"===a?qw:function(t,o){var s,l,c=o.gridControlAngles,e=Vw(o);if(!e)throw new Error("grid center is not provide");if(t.length<2)throw new Error("Invalid grid data");if(c&&0!==c.length)return e=k(e,2),s=e[0],l=e[1],t.map(function(t,e){var t=k(Iw(t.value,o),2),n=t[0],t=t[1],n=k([n-s,t-l],2),r=n[0],i=n[1],a=[];return c.forEach(function(t){var t=Cx(t),t=k([Math.cos(t),Math.sin(t)],2),e=t[0],t=t[1];a.push([r*e-i*t+s,r*t+i*e+l])}),{points:a,id:e}});throw new Error("Invalid gridControlAngles")})(l,n),c=y(y({},i),{center:s,areaFill:Fe(o)?l.map(function(t,e){return Ix(o,[t,e,l])}):o,animate:r,data:e});return t.selectAll(bw.grid.class).data([1]).join(function(t){return t.append(function(){return new Sw({style:c})}).attr("className",bw.grid.name)},function(t){return t.transition(function(){return this.update(c)})},function(t){return t.remove()}).transitions()}Object.defineProperty(Xw.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(Xw.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(Xw.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(Xw.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(Xw.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(Xw.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),Xw.prototype.rotatedPoints=function(t,e,n){var r=this.x1,i=this.y1,a=this.x2,o=this.y2,s=Math.cos(t),t=Math.sin(t),l=e-e*s+n*t,e=n-e*t-n*s;return[[s*r-t*o+l,t*r+s*o+e],[s*a-t*o+l,t*a+s*o+e],[s*r-t*i+l,t*r+s*i+e],[s*a-t*i+l,t*a+s*i+e]]},Xw.prototype.set=function(t,e,n,r){return n<t?(this.x2=t,this.x1=n):(this.x1=t,this.x2=n),r<e?(this.y2=e,this.y1=r):(this.y1=e,this.y2=r),this},Xw.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE};var Uw=Xw;function Xw(t,e,n,r){this.set(t,e,n,r)}function Kw(t,e){var n=t.getEulerAngles()||0,r=(t.setEulerAngles(0),t.getLocalBounds()),i=k(r.min,2),a=i[0],i=i[1],r=k(r.max,2),o=r[0],r=r[1],s=Zw(t),l=s.width,s=s.height,c=0,u=0,h=a,f=i,d=Hx(t),o=(d&&(s-=1.5,"center"===(p=d.style.textAlign)?h=(a+o)/2:"right"!==p&&"end"!==p||(h=o),"middle"===(p=d.style.textBaseline)?f=(i+r)/2:"bottom"===p&&(f=r)),k(b2(e),4)),d=o[0],p=void 0===d?0:d,r=o[1],e=void 0===r?0:r,d=o[2],r=o[3],o=new Uw((c+=a)-(void 0===r?e:r),(u+=i)-p,c+l+e,u+s+(void 0===d?p:d));return t.setEulerAngles(n),o.rotatedPoints(Cx(n),h,f)}function Zw(t){return t.__bbox__||t.getBBox()}function Qw(t,e){return e[0]<=Math.max(t[0][0],t[1][0])&&e[0]<=Math.min(t[0][0],t[1][0])&&e[1]<=Math.max(t[0][1],t[1][1])&&e[1]<=Math.min(t[0][1],t[1][1])}function Jw(t,e,n){t=(e[1]-t[1])*(n[0]-e[0])-(e[0]-t[0])*(n[1]-e[1]);return 0==t?0:t<0?2:1}function tM(t,e){var n=t.length;if(n<3)return!1;var r,i,a,o,s,l,c=[e,[9999,e[1]]],u=0,h=0;do{var f=[t[h],t[(h+1)%n]];if(i=c,l=s=o=a=void 0,a=Jw((r=f)[0],r[1],i[0]),o=Jw(r[0],r[1],i[1]),s=Jw(i[0],i[1],r[0]),l=Jw(i[0],i[1],r[1]),a!==o&&s!==l||0===a&&Qw(r,i[0])||0===o&&Qw(r,i[1])||0===s&&Qw(i,r[0])||!(0!==l||!Qw(i,r[1]))){if(0===Jw(f[0],e,f[1]))return Qw(f,e);u++}}while(0!==(h=(h+1)%n));return!!(1&u)}function eM(t,e,n){var r,i=t.x1,a=t.x2,o=t.y1,t=t.y2,o=[[i,o],[a,o],[a,t],[i,t]],a=Kw(e,n);return r=o,a.every(function(t){return tM(r,t)})}function nM(t,c){return[[t[0],t[1],t[2],t[3]],[t[2],t[3],t[4],t[5]],[t[4],t[5],t[6],t[7]],[t[6],t[7],t[0],t[1]]].some(function(t){return t=t,n=(e=k(e=c,4))[0],r=e[1],i=e[2],e=e[3],a=(t=k(t,4))[0],o=t[1],i-=n,e-=r,s=t[2]-a,t=t[3]-o,0!=(l=i*t-s*e)&&(o=i*(i=r-o)-e*(r=n-a))<0!=(e=0<l)&&(n=s*i-t*r)<0!=e&&l<o!=e&&l<n!=e;var e,n,r,i,a,o,s,l})}function rM(t,e,l){function n(t,e){if(t){var n,r,i=b2(l),t=Kw(t,i).flat(1),a=Kw(e,i).flat(1),e=[[t[0],t[1],t[2],t[3]],[t[0],t[1],t[4],t[5]],[t[4],t[5],t[6],t[7]],[t[2],t[3],t[6],t[7]]];try{for(var o=ue(e),s=o.next();!s.done;s=o.next())if(nM(a,s.value))return}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}return 1}var r,i,a,o,s,c,u,h,f,d,p,g,m=e.crossPadding,v=new Set,y=null,b=(m=m,f=(e=e).type,d=e.labelDirection,!!(p=e.crossSize)&&("arc"===f?(f=e.center,h=e.radius,u=(f=k(f,2))[0],f=f[1],a=-h-(d="negative"===d?0:p),h=h+d,o=(d=k(b2(m),4))[0],s=d[1],c=d[2],d=d[3],new Uw(u+a-d,f+a-o,u+h+s,f+h+c)):(a=(d=k(e.startPos,2))[0],o=d[1],s=(u=k(e.endPos,2))[0],f=u[1],c=(h=k(Dw(e)?[-m,0,m,0]:[0,m,0,-m],4))[0],d=h[1],u=h[2],m=h[3],h=n2(Nw(0,e),p),(e=new Uw(a,o,s,f)).x1+=m,e.y1+=c,e.x2+=d+h[0],e.y2+=u+h[1],e)));try{for(var x=ue(t),w=x.next();!w.done;w=x.next()){var M=w.value;g=M,b&&!eM(b,g)?v.add(M):!y||n(y,M)?y=M:(v.add(y),v.add(M))}}catch(t){r={error:t}}finally{try{w&&!w.done&&(i=x.return)&&i.call(x)}finally{if(r)throw r.error}}return Array.from(v)}function iM(t,e){return void 0===e&&(e={}),_(t)?0:"number"==typeof t?t:Math.floor(Wx(t,e))}var aM=function(t,e){var e=e.seq,n=void 0===e?2:e;return t.filter(function(t,e){return!(e%n&&(kx(t),1))})};var oM=new Map([["hide",function(t,e,n,r){var i=t.length,a=e.keepHeader,o=e.keepTail;if(!(i<=1||2===i&&a&&o)){var s,l,c,u,h=aM,f=function(t){return t.forEach(r.show),t},d=2,p=t.slice(),g=t.slice(),m=Math.min.apply(Math,b([1],k(t.map(function(t){return Zw(t).width})),!1));for("linear"===n.type&&(Bw(n)||Dw(n))&&(s=x2(t[0]).left,l=x2(t[i-1]).right,l=Math.abs(l-s)||1,d=Math.max(Math.floor(i*m/l),d)),a&&(c=p.splice(0,1)[0]),o&&(u=p.splice(-1,1)[0],p.reverse()),f(p);d<t.length&&rM((u?b(b([u],k(g),!1),[c],!1):b([c],k(g),!1)).filter(Gx),n,null==e?void 0:e.margin).length;)(u&&!c&&d%2==0||u&&c)&&p.splice(0,1).forEach(r.hide),g=h(f(p),{seq:d}),d++}}],["rotate",function(t,e,n,r){function i(n){t.forEach(function(t,e){e=Array.isArray(n)?n[e]:n;r.rotate(t,+e)})}var a,o,s=void 0===(s=e.optionalAngles)?[0,45,90]:s,l=e.margin,e=void 0===(e=e.recoverWhenFailed)||e,c=t.map(function(t){return t.getLocalEulerAngles()});try{for(var u=ue(s),h=u.next();!h.done;h=u.next())if(i(h.value),rM(t,n,l).length<1)return}catch(t){a={error:t}}finally{try{h&&!h.done&&(o=u.return)&&o.call(u)}finally{if(a)throw a.error}}e&&i(c)}],["ellipsis",function(t,e,n,r){if(!(t.length<=1))for(var i=void 0===(a=e.suffix)?"...":a,a=e.minLength,o=void 0===(o=e.maxLength)?1/0:o,s=void 0===(s=e.step)?" ":s,l=void 0===(e=e.margin)?[0,0,0,0]:e,e=Yx(r.getTextShape(t[0])),c=iM(s,e),u=a?iM(a,e):c,s=iM(o,e),h=(!_(s)&&s!==1/0||(s=Math.max.apply(null,t.map(function(t){return Zw(t).width}))),t.slice()),f=((a=k(l,4))[0],a[1],a[2],a[3],s);u+c<f;f-=c){var d=function(e){if(h.forEach(function(t){r.ellipsis(r.getTextShape(t),e,i)}),(h=rM(t,n,l)).length<1)return{value:void 0}}(f);if("object"==typeof d)return d.value}}],["wrap",function(t,e,n,r){function i(n){t.forEach(function(t,e){e=Array.isArray(n)?n[e]:n;r.wrap(t,l,e,d)})}var a,o,s,l=void 0===(u=e.wordWrapWidth)?50:u,c=void 0===(u=e.maxLines)?3:u,u=void 0===(u=e.recoverWhenFailed)||u,h=void 0===(e=e.margin)?[0,0,0,0]:e,e=t.map(function(t){return t.attr("maxLines")||1}),f=Math.min.apply(Math,b([],k(e),!1)),d=(o=(a=n).type,s=a.labelDirection,"linear"===o&&Bw(a)?"negative"===s?"bottom":"top":"middle");if(!(c<f)){for(var p=f;p<=c;p++)if(i(p),rM(t,n,h).length<1)return;u&&i(e)}}]]);function sM(r,i,a){var t=i.labelOverlap,t=void 0===t?[]:t;t.length&&t.forEach(function(t){var e=t.type,n=oM.get(e);!function(t,e,n){if(!(e.labelOverlap.length<1))if("hide"===n){for(var r=t[0];r;){if("offscreen"===r.className)return;r=r.parent}return 1}else return"rotate"===n?!t.some(function(t){return!(null==(t=t.attr("transform"))||!t.includes("rotate"))}):"ellipsis"!==n&&"wrap"!==n||1<t.filter(function(t){return t.querySelector("text")}).length}(r,i,e)||null==n||n(r,t,i,a)})}function lM(t){for(var e=t;e<0;)e+=360;return Math.round(e%360)}var cM=sn(function(t,e){var t=k(t,2),n=t[0],t=t[1],e=k(e,2),r=e[0],e=e[1],n=k([n*r+t*e,n*e-t*r],2),e=n[0],t=n[1];return Math.atan2(t,e)},function(t,e){return b(b([],k(t),!1),k(e),!1).join()});function uM(t,e,n){var r,i=n.labelAlign;return(null==(r=e.style.transform)?void 0:r.includes("rotate"))?e.getLocalEulerAngles():(r=0,e=Nw(t.value,n),t=Lw(t.value,n),"horizontal"===i?0:(r="perpendicular"===i?cM([1,0],e):cM([t[0]<0?-1:1,0],t),Kx(n=((n=Nx(r))+360)%180,-90,90)||(n+=180),n))}function hM(t,e,n){var r=n.type,i=n.labelAlign,t=Nw(t,n),n=lM(e),e=lM(Nx(cM([1,0],t))),a="center",o="middle";return"linear"===r?[90,270].includes(e)&&0===n?(a="center",o=1===t[1]?"top":"bottom"):e%180||![90,270].includes(n)?0===e?(Kx(n,0,90,!1,!0)||Kx(n,0,90)||Kx(n,270,360))&&(a="start"):90===e?Kx(n,0,90,!1,!0)?a="start":(Kx(n,90,180)||Kx(n,270,360))&&(a="end"):270===e?Kx(n,0,90,!1,!0)?a="end":(Kx(n,90,180)||Kx(n,270,360))&&(a="start"):180===e&&(90===n?a="start":(Kx(n,0,90)||Kx(n,270,360))&&(a="end")):a="center":"parallel"===i?o=Kx(e,0,180,!0)?"top":"bottom":"horizontal"===i?Kx(e,90,270,!1)?a="end":(Kx(e,270,360,!1)||Kx(e,0,90))&&(a="start"):"perpendicular"===i&&(a=Kx(e,90,270)?"end":"start"),{textAlign:a,textBaseline:o}}function fM(t,e,n){var r=n.showTick,i=n.tickLength,a=n.tickDirection,o=n.labelDirection,s=n.labelSpacing,l=e.indexOf(t),s=Ix(s,[t,l,e]),o=k([Nw(t.value,n),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(function(t,e){return t*("positive"===e?-1:1)},1)}(o,a)],2),a=k(r2(n2(o[0],s+(1===o[1]?Ix(r?i:0,[t,l,e]):0)),Iw(t.value,n)),2);return{x:a[0],y:a[1]}}function dM(t,e){"text"===t.nodeName&&t.attr(e)}function pM(r){sM(this.node().childNodes,r,{hide:kx,show:Mx,rotate:function(t,e){var n;e=+e,n=r,(t=t).setLocalEulerAngles(e),e=hM(t.__data__.value,e,n),(n=t.querySelector(bw.labelItem.class))&&dM(n,e)},ellipsis:function(t,e,n){void 0===e&&(e=1/0),t&&qx(t,e,n)},wrap:function(t,e,n){var r;t&&Vx(t,{wordWrap:!0,wordWrapWidth:e,maxLines:t=void 0===(t=n)?2:t,textBaseline:r=void 0===r?"top":r})},getTextShape:function(t){return t.querySelector("text")}})}function gM(t,e,n,r,i){var a,o,s,l,c,u=n.indexOf(e),h=w(t).append((a=e,o=u,s=n,c=(l=i).labelFormatter,Fe(c)?function(){return Ux(Ix(c,[a,o,s,Nw(a.value,l)]))}:function(){return Ux(a.label||"")})).attr("className",bw.labelItem.name).node(),r=k(E2(Aw(r,[e,u,n])),2),u=r[0],n=r[1],r=n.transform,n=nt(n,["transform"]),f=(O2(t,r),uM(e,t,i));return t.setLocalEulerAngles(+f),dM(h,y(y({},hM(e.value,f,i)),u)),O2(t,r),t.attr(n),h}function mM(n,f,d,p){var t=Tw(f,d.labelFilter),g=S(d,"label");return n.selectAll(bw.label.class).data(t,function(t,e){return e}).join(function(t){return t.append("g").attr("className",bw.label.name).transition(function(t){return gM(this,t,f,g,d),this.attr(fM(t,f,d)),this.__bbox__=t.bbox,null}).call(function(){return pM.call(n,d)})},function(t){return t.transition(function(t){var e,n,r,i,a,o,s,l=this.querySelector(bw.labelItem.class),c=gM(this,t,f,g,d),u=(e=l,n=c,l=p.update,void 0===r&&(r="destroy"),l?(c=void 0===(c=l.duration)?0:c,i=void 0===(i=l.delay)?0:i,a=Math.ceil(+c/2),c=+c/4,o=(u=k((s=function(t){var e,n;return"circle"===t.nodeName?(n=(e=k(t.getLocalPosition(),2))[0],e=e[1],[n-(n=t.attr("r")),e-n]):t.getLocalPosition()})(e),2))[0],u=u[1],s=k(s(n),2),s=(o=k([(o+s[0])/2-o,(u+s[1])/2-u],2))[0],u=o[1],o=e.animate([{opacity:1,transform:"translate(0, 0)"},{opacity:0,transform:"translate(".concat(s,", ").concat(u,")")}],y(y({fill:"both"},l),{duration:i+a+c})),K2(s=n.animate([{opacity:0,transform:"translate(".concat(-s,", ").concat(-u,")"),offset:.01},{opacity:1,transform:"translate(0, 0)"}],y(y({fill:"both"},l),{duration:a+c,delay:i+a-c})),h),[o,s]):(h(),[null]));function h(){"destroy"===r?e.destroy():"hide"===r&&kx(e),n.isVisible()&&Mx(n)}l=J2(this,fM(t,f,d),p.update);return this.__bbox__=t.bbox,b(b([],k(u),!1),[l],!1)}).call(function(t){var e,t=fn(t,"_transitions").flat().filter(Gx);e=function(){return pM.call(n,d)},0===(t=t).length?e():Promise.all(t.map(function(t){return null==t?void 0:t.finished})).then(e)})},function(t){return t.transition(function(){var t=this,e=tw(this,p.exit);return K2(e,function(){return w(t).remove()}),e})}).transitions()}function vM(t,e){return Cw(t,e.tickDirection,e)}var yM=sn(function(t,e){t=k(t,2);return[[0,0],[t[0]*e,t[1]*e]]},function(t,e){return b(b([],k(t),!1),[e],!1).join()});function bM(t,e,n,r,i,a,o){var s=vM(t.value,a),a=(c=t,u=e,h=n,l=s,a=(a=a).tickLength,l=k(yM(l,Ix(a,[c,u,h])),2),a=k(l[0],2),c=a[0],u=a[1],h=k(l[1],2),{x1:c,x2:h[0],y1:u,y2:h[1]}),l=a.x1,c=a.x2,u=a.y1,h=a.y2,a=k(E2(Aw(o,[t,e,n,s])),2),o=a[0],t=a[1];"line"===r.node().nodeName&&r.styles(y({x1:l,x2:c,y1:u,y2:h},o)),i.attr(t),r.styles(o)}function xM(t,e,n,r,i,a){o=w(this),s=t,l=e,c=n,h=(u=r).tickFormatter,f=vM(s.value,u),u="line",Fe(h)&&(u=function(){return Ix(h,[s,l,c,f])});bM(t,e,n,o.append(u).attr("className",bw.tickItem.name),this,r,i);var o,s,l,c,u,h,f,e=k(Iw(t.value,r),2);return J2(this,{x:e[0],y:e[1]},a)}var wM=Bx({text:"text"},"title");function MM(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(t){return t[0]}):2<t.length?[t[0]]:t.split("")}function kM(r,t){t=Object.entries(t).reduce(function(t,e){var e=k(e,2),n=e[0],e=e[1];return r.node().attr(n)||(t[n]=e),t},{});r.styles(t)}le(SM,EM=xl),SM.prototype.getAvailableSpace=function(){var t=this.attributes,r=t.width,i=t.height,e=t.position,n=t.spacing,t=t.inset,a=this.querySelector(wM.text.class);if(!a)return new jx(0,0,+r,+i);var a=a.getBBox(),o=a.width,s=a.height,a=k(b2(n),4),l=a[0],c=a[1],u=a[2],h=a[3],n=k([0,0,+r,+i],4),f=n[0],d=n[1],p=n[2],g=n[3],a=MM(e);if(a.includes("i"))return new jx(f,d,p,g);a.forEach(function(t,e){var n;"t"===t&&(n=k(0===e?[s+u,+i-s-u]:[0,+i],2),d=n[0],g=n[1]),"r"===t&&(n=k([+r-o-h],1),p=n[0]),"b"===t&&(n=k([+i-s-l],1),g=n[0]),"l"===t&&(n=k(0===e?[o+c,+r-o-c]:[0,+r],2),f=n[0],p=n[1])});n=k(b2(t),4),e=n[0],a=n[1],t=n[2],n=n[3],a=k([n+a,e+t],2),t=a[0],a=a[1];return new jx(f+n,d+e,p-t,g-a)},SM.prototype.getBBox=function(){return this.title?this.title.getBBox():new jx(0,0,0,0)},SM.prototype.render=function(t,e){var n,r,i,a,o,s,l=this,c=(t.width,t.height,t.position,t.spacing,nt(t,["width","height","position","spacing"])),u=k(E2(c),1)[0],h=(h=(t=t).width,r=t.height,t=t.position,i=k([+h/2,+r/2],2),a=(i=k([+i[0],+i[1],"center","middle"],4))[0],o=i[1],s=i[2],i=i[3],(t=MM(t)).includes("l")&&(a=(n=k([0,"start"],2))[0],s=n[1]),t.includes("r")&&(a=(n=k([+h,"end"],2))[0],s=n[1]),t.includes("t")&&(o=(h=k([0,"top"],2))[0],i=h[1]),t.includes("b")&&(o=(n=k([+r,"bottom"],2))[0],i=n[1]),{x:a,y:o,textAlign:s,textBaseline:i}),f=h.x,d=h.y,p=h.textAlign,g=h.textBaseline;Xx(!!c.text,w(e),function(t){l.title=t.maybeAppendByClassName(wM.text,"text").styles(u).call(kM,{x:f,y:d,textAlign:p,textBaseline:g}).node()})};var EM,OM=SM;function SM(t){return EM.call(this,t,{text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"top-left"})||this}function _M(t,e,n,r,i){var a,o,s,l,c,u,h,f,d=k(E2(S(r,"title")),2),p=d[0],d=d[1],g=d.transform,g=void 0===g?"":g,d=nt(d,["transform"]),m=(t.styles(p),e.styles(d),O2(t.node(),g),p=w(n._offscreen||n.querySelector(bw.mainGroup.class)),d=e,r=void 0===(r=(n=r).titlePosition)?"lb":r,a=n.titleSpacing,o=MM(r),p=p.node().getLocalBounds(),s=(l=k(p.min,2))[0],l=l[1],c=(p=k(p.halfExtents,2))[0],p=p[1],u=(d=k(d.node().getLocalBounds().halfExtents,2))[0],d=d[1],l=(s=k([s+c,l+p],2))[0],s=s[1],v=(a=k(b2(a),4))[0],h=a[1],f=a[2],a=a[3],["start","end"].includes(r)&&"linear"===n.type?(m=n.startPos,n=n.endPos,n=(r=k("start"===r?[m,n]:[n,m],2))[0],m=(r=k(n2(l2([-(m=r[1])[0]+n[0],-m[1]+n[1]]),v),2))[0],r=r[1],{x:n[0]+m,y:n[1]+r}):(o.includes("t")&&(s-=p+d+v),o.includes("r")&&(l+=c+u+h),o.includes("l")&&(l-=c+u+a),o.includes("b")&&(s+=p+d+f),{x:l,y:s})),n=m.x,r=m.y,v=J2(e.node(),{x:n,y:r},i);return O2(t.node(),g),v}function AM(e,t,o,s){var n=e.showLine,r=e.showTick,i=e.showLabel,n=Xx(n,t.maybeAppendByClassName(bw.lineGroup,"g"),function(t){return Hw(t,e,s)})||[],r=Xx(r,t.maybeAppendByClassName(bw.tickGroup,"g"),function(t){return t=t,r=s,i=Tw(o,(n=e).tickFilter),a=S(n,"tick"),t.selectAll(bw.tick.class).data(i,function(t){return t.id||t.label}).join(function(t){return t.append("g").attr("className",bw.tick.name).transition(function(t,e){return xM.call(this,t,e,i,n,a,!1)})},function(t){return t.transition(function(t,e){return this.removeChildren(),xM.call(this,t,e,i,n,a,r.update)})},function(t){return t.transition(function(){var t=this,e=tw(this,r.exit);return K2(e,function(){return t.remove()}),e})}).transitions();var n,r,i,a})||[],i=Xx(i,t.maybeAppendByClassName(bw.labelGroup,"g"),function(t){return mM(t,o,e,s)})||[];return b(b(b([],k(n),!1),k(r),!1),k(i),!1).filter(function(t){return!!t})}le(LM,TM=xl),LM.prototype.render=function(o,t,e){var s=this,n=o.titleText,r=o.data,i=o.animate,a=o.showTitle,l=o.showGrid,c=o.dataThreshold,u=o.truncRange,h=function(t,e){if(t.length<=e)return t;for(var n=Math.floor(t.length/e),r=[],i=0;i<t.length;i+=n)r.push(t[i]);return r}(r,c).filter(function(t){t=t.value;return!(u&&t>u[0]&&t<u[1])}),f=X2(void 0===e?i:e),r=Xx(l,w(t).maybeAppendByClassName(bw.gridGroup,"g"),function(t){return $w(t,h,o,f)})||[],c=w(t).maybeAppendByClassName(bw.mainGroup,"g"),i=(n&&(!this.initialized&&f.enter||this.initialized&&f.update)&&AM(o,w(this.offscreenGroup),h,X2(!1)),AM(o,w(c.node()),h,f)),e=Xx(a,w(t).maybeAppendByClassName(bw.titleGroup,"g"),function(t){return e=t,n=s,i=f,a=(r=o).titleText,e.selectAll(bw.title.class).data([{title:a}].filter(function(t){return!!t.title}),function(t,e){return t.title}).join(function(t){return t.append(function(){return Ux(a)}).attr("className",bw.title.name).transition(function(){return _M(w(this),e,n,r,i.enter)})},function(t){return t.transition(function(){return _M(w(this),e,n,r,i.update)})},function(t){return t.remove()}).transitions();var e,n,r,i,a})||[];return b(b(b([],k(r),!1),k(i),!1),k(e),!1).flat().filter(function(t){return!!t})};var TM,PM=LM;function LM(t){return TM.call(this,t,yw)||this}var CM,NM=Bx({prevBtnGroup:"prev-btn-group",prevBtn:"prev-btn",nextBtnGroup:"next-btn-group",nextBtn:"next-btn",pageInfoGroup:"page-info-group",pageInfo:"page-info",playWindow:"play-window",contentGroup:"content-group",controller:"controller",clipPath:"clip-path"},"navigator"),jM=(le(RM,CM=xl),Object.defineProperty(RM.prototype,"defaultPage",{get:function(){var t=this.attributes.defaultPage;return Xe(t,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(RM.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(RM.prototype,"controllerShape",{get:function(){return 1<this.totalPages?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty(RM.prototype,"pageShape",{get:function(){var n,t=this.pageViews,t=k((n=t.map(function(t){t=t.getBBox();return[t.width,t.height]}),((null==(t=n[0])?void 0:t.map(function(t,e){return n.map(function(t){return t[e]})}))||[]).map(function(t){return Math.max.apply(Math,b([],k(t),!1))})),2),e=t[0],t=t[1],r=this.attributes,i=r.pageWidth,r=r.pageHeight;return{pageWidth:void 0===i?e:i,pageHeight:void 0===r?t:r}},enumerable:!1,configurable:!0}),RM.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(RM.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty(RM.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),RM.prototype.getBBox=function(){var t=CM.prototype.getBBox.call(this),e=t.x,t=t.y,n=this.controllerShape,r=this.pageShape,i=r.pageWidth,r=r.pageHeight;return new jx(e,t,i+n.width,r)},RM.prototype.goTo=function(t){var e=this,n=this.attributes.animate,r=this.currPage,i=this.playState,a=this.playWindow,o=this.pageViews;if("idle"!==i||t<0||o.length<=0||t>=o.length)return null;o[r].setLocalPosition(0,0),this.prepareFollowingPage(t);i=k(this.getFollowingPageDiff(t),2),o=i[0],r=i[1],this.playState="running",i=Q2(a,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-o,", ").concat(-r,")")}],n);return K2(i,function(){e.innerCurrPage=t,e.playState="idle",e.setVisiblePages([t]),e.updatePageInfo()}),i},RM.prototype.prev=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;return!t&&n<=0?null:(t=t?(n-1+e)%e:Xe(n-1,0,e),this.goTo(t))},RM.prototype.next=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;return!t&&e-1<=n?null:(t=t?(n+1)%e:Xe(n+1,0,e),this.goTo(t))},RM.prototype.renderClipPath=function(t){var e=this.pageShape,n=e.pageWidth,e=e.pageHeight;n&&e?(this.clipPath=t.maybeAppendByClassName(NM.clipPath,"rect").styles({width:n,height:e}),this.contentGroup.attr("clipPath",this.clipPath.node())):this.contentGroup.style.clipPath=void 0},RM.prototype.setVisiblePages=function(n){this.playWindow.children.forEach(function(t,e){(n.includes(e)?Mx:kx)(t)})},RM.prototype.adjustControllerLayout=function(){var t=this.prevBtnGroup,e=this.nextBtnGroup,n=this.pageInfoGroup,r=this.attributes,i=r.orientation,r=r.controllerPadding,a=n.getBBox(),o=a.width,a=(a.height,k("horizontal"===i?[-180,0]:[-90,90],2)),s=a[0],a=a[1],s=(t.setLocalEulerAngles(s),e.setLocalEulerAngles(a),t.getBBox()),a=s.width,s=s.height,l=e.getBBox(),c=l.width,l=l.height,c=Math.max(a,o,c),i="horizontal"===i?{offset:[[0,0],[a/2+r,0],[a+o+2*r,0]],textAlign:"start"}:{offset:[[c/2,-s-r],[c/2,0],[c/2,l+r]],textAlign:"center"},a=k(i.offset,3),o=k(a[0],2),s=o[0],c=o[1],l=k(a[1],2),r=l[0],o=l[1],l=k(a[2],2),a=l[0],l=l[1],i=i.textAlign,u=n.querySelector("text");u&&(u.style.textAlign=i),t.setLocalPosition(s,c),n.setLocalPosition(r,o),e.setLocalPosition(a,l)},RM.prototype.updatePageInfo=function(){var t,e=this.currPage,n=this.pageViews,r=this.attributes.formatter;n.length<2||(null!=(t=this.pageInfoGroup.querySelector(NM.pageInfo.class))&&t.attr("text",r(e+1,n.length)),this.adjustControllerLayout())},RM.prototype.getFollowingPageDiff=function(t){var e,n,r,i=this.currPage;return i===t?[0,0]:(e=this.attributes.orientation,n=(r=this.pageShape).pageWidth,r=r.pageHeight,t=t<i?-1:1,"horizontal"===e?[t*n,0]:[0,t*r])},RM.prototype.prepareFollowingPage=function(t){var e,n=this.currPage,r=this.pageViews;this.setVisiblePages([t,n]),t!==n&&(e=(n=k(this.getFollowingPageDiff(t),2))[0],n=n[1],r[t].setLocalPosition(e,n))},RM.prototype.renderController=function(t){var e,n,r,i,a,o=this,s=this.attributes.controllerSpacing,l=this.pageShape,c=l.pageWidth,l=l.pageHeight,u=2<=this.pageViews.length,t=t.maybeAppendByClassName(NM.controller,"g");Ex(t.node(),u),u&&(u=S(this.attributes,"button"),e=S(this.attributes,"pageNum"),i=(u=k(E2(u),2))[0],u=u[1],n=i.size,r=nt(i,["size"]),i=!t.select(NM.prevBtnGroup.class).node(),a=t.maybeAppendByClassName(NM.prevBtnGroup,"g").styles(u),this.prevBtnGroup=a.node(),a=a.maybeAppendByClassName(NM.prevBtn,"path"),u=t.maybeAppendByClassName(NM.nextBtnGroup,"g").styles(u),this.nextBtnGroup=u.node(),[a,u.maybeAppendByClassName(NM.nextBtn,"path")].forEach(function(t){t.styles(y(y({},r),{transformOrigin:"center"})),p2(t.node(),n,!0)}),a=t.maybeAppendByClassName(NM.pageInfoGroup,"g"),this.pageInfoGroup=a.node(),a.maybeAppendByClassName(NM.pageInfo,"text").styles(e),this.updatePageInfo(),t.node().setLocalPosition(c+s,l/2),i)&&(this.prevBtnGroup.addEventListener("click",function(){o.prev()}),this.nextBtnGroup.addEventListener("click",function(){o.next()}))},RM.prototype.render=function(t,e){e=w(e);this.renderClipPath(e),this.renderController(e),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},RM.prototype.bindEvents=function(){var t=this,e=on(function(){return t.render(t.attributes,t)},50);this.playWindow.addEventListener(x.INSERTED,e),this.playWindow.addEventListener(x.REMOVED,e)},RM);function RM(t){var e,n,t=CM.call(this,t,{animate:{easing:"linear",duration:200,fill:"both"},buttonCursor:"pointer",buttonFill:"black",buttonPath:[["M",(t=0)-(n=6),(e=0)-n],["L",t+n,e],["L",t-n,e+n],["Z"]],buttonSize:12,controllerPadding:5,controllerSpacing:5,formatter:function(t,e){return"".concat(t,"/").concat(e)},defaultPage:0,loop:!1,orientation:"horizontal",pageNumFill:"black",pageNumFontSize:12,pageNumTextAlign:"start",pageNumTextBaseline:"middle"})||this;return t.playState="idle",t.contentGroup=t.appendChild(new Fs({class:NM.contentGroup.name})),t.playWindow=t.contentGroup.appendChild(new Fs({class:NM.playWindow.name})),t.innerCurrPage=t.defaultPage,t}function IM(t,e,n){return"horizontal"===(t=void 0===t?"horizontal":t)?e:n}N2.registerSymbol("hiddenHandle",function(t,e,n){var r=1.4*n;return[["M",t-n,e-r],["L",t+n,e-r],["L",t+n,e+r],["L",t-n,e+r],["Z"]]}),N2.registerSymbol("verticalHandle",function(t,e,n){var r=1.4*n,i=n/2,a=t+.4*r;return[["M",t,e],["L",a,e+i],["L",t+r,e+i],["L",t+r,e-i],["L",a,e-i],["Z"],["M",a,e+(n=n/6)],["L",t+r-2,e+n],["M",a,e-n],["L",t+r-2,e-n]]}),N2.registerSymbol("horizontalHandle",function(t,e,n){var r=1.4*n,i=n/2,a=e+.4*r;return[["M",t,e],["L",t-i,a],["L",t-i,e+r],["L",t+i,e+r],["L",t+i,a],["Z"],["M",t-(n=n/6),a],["L",t-n,e+r-2],["M",t+n,a],["L",t+n,e+r-2]]});var BM=Bx({layout:"flex",markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label",valueGroup:"value-group",value:"value",backgroundGroup:"background-group",background:"background"},"legend-category-item");le(zM,DM=xl),Object.defineProperty(zM.prototype,"showValue",{get:function(){var t=this.attributes.valueText;return!!t&&("string"==typeof t||"number"==typeof t?""!==t:"function"==typeof t||""!==t.attr("text"))},enumerable:!1,configurable:!0}),Object.defineProperty(zM.prototype,"actualSpace",{get:function(){var t=this.labelGroup,e=this.valueGroup,n=this.attributes.markerSize,t=t.node().getBBox(),r=t.width,t=t.height,e=e.node().getBBox(),i=e.width,e=e.height;return{markerWidth:n,labelWidth:r,valueWidth:i,height:Math.max(n,t,e)}},enumerable:!1,configurable:!0}),Object.defineProperty(zM.prototype,"span",{get:function(){var t,e=this.attributes.span;return e?(t=(e=k(b2(e),2))[0],e=e[1],[t/(e=t+(t=this.showValue?e:0)),t/e]):[1,1]},enumerable:!1,configurable:!0}),Object.defineProperty(zM.prototype,"shape",{get:function(){var t=this.attributes,e=t.markerSize,t=t.width,n=this.actualSpace,r=n.markerWidth,n=n.height,i=this.actualSpace,a=i.labelWidth,i=i.valueWidth,o=k(this.spacing,2),s=o[0],o=o[1];return t&&(t=t-e-s-o,e=k(this.span,2),a=(e=k([e[0]*t,e[1]*t],2))[0],i=e[1]),{width:r+a+i+s+o,height:n,markerWidth:r,labelWidth:a,valueWidth:i}},enumerable:!1,configurable:!0}),Object.defineProperty(zM.prototype,"spacing",{get:function(){var t,e=this.attributes.spacing;return e?(t=(e=k(b2(e),2))[0],e=e[1],this.showValue?[t,e]:[t,0]):[0,0]},enumerable:!1,configurable:!0}),Object.defineProperty(zM.prototype,"layout",{get:function(){var t=this.shape,e=t.markerWidth,n=t.labelWidth,r=t.valueWidth,i=t.width,t=t.height,a=k(this.spacing,2),o=a[0];return{height:t,width:i,markerWidth:e,labelWidth:n,valueWidth:r,position:[e/2,e+o,e+n+o+a[1]]}},enumerable:!1,configurable:!0}),Object.defineProperty(zM.prototype,"scaleSize",{get:function(){var t=(t=(t=this.markerGroup.node()).querySelector(BM.marker.class))?t.style:{},e=this.attributes,n=e.markerSize,r=e.markerStrokeWidth,r=void 0===r?t.strokeWidth:r,i=e.markerLineWidth,i=void 0===i?t.lineWidth:i,e=e.markerStroke,t=void 0===e?t.stroke:e,e=+(r||i||(t?1:0))*Math.sqrt(2),r=this.markerGroup.node().getBBox(),i=r.width,t=r.height;return(1-e/Math.max(i,t))*n},enumerable:!1,configurable:!0}),zM.prototype.renderMarker=function(t){var e=this,n=this.attributes.marker,r=S(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(BM.markerGroup,"g").style("zIndex",0),Xx(!!n,this.markerGroup,function(){e.markerGroup.maybeAppendByClassName(BM.marker,n).styles(r),e.markerGroup.node().scale(1/e.markerGroup.node().getScale()[0]),p2(e.markerGroup.node(),e.scaleSize,!0)})},zM.prototype.renderLabel=function(t){var e=S(this.attributes,"label"),n=e.text,e=nt(e,["text"]);this.labelGroup=t.maybeAppendByClassName(BM.labelGroup,"g").style("zIndex",0),this.labelGroup.maybeAppendByClassName(BM.label,function(){return Ux(n)}).styles(e)},zM.prototype.renderValue=function(t){var e=this,n=S(this.attributes,"value"),r=n.text,i=nt(n,["text"]);this.valueGroup=t.maybeAppendByClassName(BM.valueGroup,"g").style("zIndex",0),Xx(this.showValue,this.valueGroup,function(){e.valueGroup.maybeAppendByClassName(BM.value,function(){return Ux(r)}).styles(i)})},zM.prototype.renderBackground=function(t){var e=this.shape,n=e.width,e=e.height,r=S(this.attributes,"background");this.background=t.maybeAppendByClassName(BM.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(BM.background,"rect").styles(y({width:n,height:e},r))},zM.prototype.adjustLayout=function(){var t=this.layout,e=t.labelWidth,n=t.valueWidth,r=t.height,t=k(t.position,3),i=t[0],a=t[1],t=t[2],r=r/2;this.markerGroup.styles({x:i,y:r}),this.labelGroup.styles({x:a,y:r}),qx(this.labelGroup.select(BM.label.class).node(),Math.ceil(e)),this.showValue&&(this.valueGroup.styles({x:t,y:r}),qx(this.valueGroup.select(BM.value.class).node(),Math.ceil(n)))},zM.prototype.render=function(t,e){e=w(e);this.renderMarker(e),this.renderLabel(e),this.renderValue(e),this.renderBackground(e),this.adjustLayout()};var DM,FM=zM;function zM(t){return DM.call(this,t,{span:[1,1],marker:function(){return new Ns({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this}function GM(t,e,n){return void 0===n&&(n=!0),t?e(t):n}var WM,YM=Bx({page:"item-page",navigator:"navigator",item:"item"},"items"),HM=(le(VM,WM=xl),Object.defineProperty(VM.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(VM.prototype,"grid",{get:function(){var t=this.attributes,e=t.gridRow,n=t.gridCol,t=t.data;if(e||n)return e&&n?[e,n]:e?[e,t.length]:[t.length,n];throw new Error("gridRow and gridCol can not be set null at the same time")},enumerable:!1,configurable:!0}),Object.defineProperty(VM.prototype,"renderData",{get:function(){var t=this.attributes,a=t.data,o=t.layout,s=S(this.attributes,"item");return a.map(function(e,n){var t=e.id,r=e.label,i=e.value;return{id:"".concat(void 0===t?n:t),index:n,style:y({layout:o,labelText:r,valueText:i},Object.fromEntries(Object.entries(s).map(function(t){t=k(t,2);return[t[0],Ix(t[1],[e,n,a])]})))}})},enumerable:!1,configurable:!0}),VM.prototype.getGridLayout=function(){var u=this,t=this.attributes,h=t.orientation,f=t.width,d=t.rowPadding,p=t.colPadding,g=k(this.navigatorShape,1)[0],t=k(this.grid,2),m=t[0],v=t[1],y=v*m,b=0;return this.pageViews.children.map(function(t,e){var n,r=Math.floor(e/y),i=e%y,a=u.ifHorizontal(v,m),a=[Math.floor(i/a),i%a],a=("vertical"===h&&a.reverse(),k(a,2)),o=a[0],a=a[1],s=(f-g-(v-1)*p)/v,t=t.getBBox().height,l=k([0,0],2),c=l[0],l=l[1];return b="horizontal"===h?(c=(n=k([b,o*(t+d)],2))[0],l=n[1],a===v-1?0:b+s+p):(c=(n=k([a*(s+p),b],2))[0],l=n[1],o===m-1?0:b+t+d),{page:r,index:e,row:o,col:a,pageIndex:i,width:s,height:t,x:c,y:l}})},VM.prototype.getFlexLayout=function(){var t=this.attributes,e=t.width,n=t.height,a=t.rowPadding,o=t.colPadding,t=k(this.navigatorShape,1)[0],r=k(this.grid,2),s=r[0],l=r[1],r=k([e-t,n],2),c=r[0],u=r[1],e=k([0,0,0,0,0,0,0,0],8),h=e[0],f=e[1],d=e[2],p=e[3],g=e[4],m=e[5],v=e[6],y=e[7];return this.pageViews.children.map(function(t,e){var t=t.getBBox(),n=t.width,t=t.height,r=0===v?0:o,i=v+r+n;return i<=c&&GM(g,function(t){return t<l})?(r=k([v+r,y,i],3),h=r[0],f=r[1],v=r[2]):(i=k([m+1,0,0,y+t+a],4),m=i[0],g=i[1],v=i[2],(y=i[3])+a+t<=u&&GM(m,function(t){return t<s})?(r=k([v,y,n],3),h=r[0],f=r[1],v=r[2]):(i=k([0,0,n,0,d+1,0,0,0],8),h=i[0],f=i[1],v=i[2],y=i[3],d=i[4],p=i[5],m=i[6],g=i[7])),{width:n,height:t,x:h,y:f,page:d,index:e,pageIndex:p++,row:m,col:g++}})},Object.defineProperty(VM.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var t="grid"===this.attributes.layout?this.getGridLayout:this.getFlexLayout,e=t.call(this);return 0<e.slice(-1)[0].page?(this.navigatorShape=[55,0],t.call(this)):e},enumerable:!1,configurable:!0}),VM.prototype.ifHorizontal=function(t,e){return IM(this.attributes.orientation,t,e)},VM.prototype.flattenPage=function(e){e.querySelectorAll(YM.item.class).forEach(function(t){e.appendChild(t)}),e.querySelectorAll(YM.page.class).forEach(function(t){e.removeChild(t).destroy()})},VM.prototype.renderItems=function(t){var e=this.attributes,n=e.click,r=e.mouseenter,i=e.mouseleave,a=(this.flattenPage(t),this.dispatchCustomEvent.bind(this));w(t).selectAll(YM.item.class).data(this.renderData,function(t){return t.id}).join(function(t){return t.append(function(t){t=t.style;return new FM({style:t})}).attr("className",YM.item.name).on("click",function(){null!=n&&n(this),a("itemClick",{item:this})}).on("pointerenter",function(){null!=r&&r(this),a("itemMouseenter",{item:this})}).on("pointerleave",function(){null!=i&&i(this),a("itemMouseleave",{item:this})})},function(t){return t.each(function(t){t=t.style;this.update(t)})},function(t){return t.remove()})},VM.prototype.relayoutNavigator=function(){var t=this.attributes,e=t.layout,t=t.width,n=(null==(n=this.pageViews.children[0])?void 0:n.getBBox().height)||0,r=k(this.navigatorShape,2),i=r[0],r=r[1];this.navigator.update("grid"===e?{pageWidth:t-i,pageHeight:n-r}:{})},VM.prototype.adjustLayout=function(){var n,e=this,t=Object.entries((t=this.itemsLayout,n="page",t.reduce(function(t,e){return(t[e[n]]=t[e[n]]||[]).push(e),t},{}))).map(function(t){t=k(t,2);return{page:t[0],layouts:t[1]}}),u=b([],k(this.navigator.getContainer().children),!1);t.forEach(function(t){var t=t.layouts,c=e.pageViews.appendChild(new Fs({className:YM.page.name}));t.forEach(function(t){var n,r,i,e=t.x,a=t.y,o=t.index,s=t.width,l=t.height,o=u[o];c.appendChild(o),n=t,r=o,(i=Ue(t="__layout__")?t.split("."):t).forEach(function(t,e){e<i.length-1?(Ye(r[t])||(r[t]=Ke(i[e+1])?[]:{}),r=r[t]):r[t]=n}),o.update({x:e,y:a,width:s,height:l})})}),this.relayoutNavigator()},VM.prototype.renderNavigator=function(t){var e=this.attributes.orientation,n=S(this.attributes,"nav"),r=Dx({orientation:e},n),i=this;return t.selectAll(YM.navigator.class).data(["nav"]).join(function(t){return t.append(function(){return new jM({style:r})}).attr("className",YM.navigator.name).each(function(){i.navigator=this})},function(t){return t.each(function(){this.update(r)})},function(t){return t.remove()}),this.navigator},VM.prototype.getBBox=function(){return this.navigator.getBBox()},VM.prototype.render=function(t,e){var n=this.attributes.data;n&&0!==n.length&&(n=this.renderNavigator(w(e)),this.renderItems(n.getContainer()),this.adjustLayout())},VM.prototype.dispatchCustomEvent=function(t,e){t=new cs(t,{detail:e});this.dispatchEvent(t)},VM);function VM(t){t=WM.call(this,t,{data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orientation:"horizontal",click:un,mouseenter:un,mouseleave:un})||this;return t.navigatorShape=[0,0],t}var qM,$M=Bx({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),UM={showLabel:!0,formatter:function(t){return t.toString()},markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orientation:"vertical",spacing:0},XM=(le(KM,qM=xl),KM.prototype.render=function(t,e){var n=w(e).maybeAppendByClassName($M.markerGroup,"g"),n=(this.renderMarker(n),w(e).maybeAppendByClassName($M.labelGroup,"g"));this.renderLabel(n)},KM.prototype.renderMarker=function(t){var r=this,e=this.attributes,n=e.orientation,e=e.markerSymbol,i=void 0===e?IM(n,"horizontalHandle","verticalHandle"):e;Xx(!!i,t,function(t){var e=S(r.attributes,"marker"),n=y({symbol:i},e);r.marker=t.maybeAppendByClassName($M.marker,function(){return new N2({style:n})}).update(n)})},KM.prototype.renderLabel=function(t){var s=this,e=this.attributes,n=e.showLabel,l=e.orientation,r=e.spacing,c=void 0===r?0:r,u=e.formatter;Xx(n,t,function(t){var e=S(s.attributes,"label"),n=e.text,e=nt(e,["text"]),r=(null==(r=t.select($M.marker.class))?void 0:r.node().getBBox())||{},i=r.width,r=r.height,r=k(IM(l,[0,(void 0===r?0:r)+c,"center","top"],[(void 0===i?0:i)+c,0,"start","middle"]),4),i=r[0],a=r[1],o=r[2],r=r[3];t.maybeAppendByClassName($M.label,"text").styles(y(y({},e),{x:i,y:a,text:u(n).toString(),textAlign:o,textBaseline:r}))})},KM);function KM(t){return qM.call(this,t,UM)||this}var ZM,gl={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},QM=Dx({},gl,{}),JM=Dx({},gl,k2(UM,"handle"),{color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],indicatorBackgroundFill:"#262626",indicatorLabelFill:"white",indicatorLabelFontSize:12,indicatorVisibility:"hidden",labelAlign:"value",labelDirection:"positive",labelSpacing:5,showHandle:!0,showIndicator:!0,showLabel:!0,slidable:!0,titleText:"",type:"continuous"}),tk=Bx({title:"title",titleGroup:"title-group",items:"items",itemsGroup:"items-group",contentGroup:"content-group",ribbonGroup:"ribbon-group",ribbon:"ribbon",handlesGroup:"handles-group",handle:"handle",startHandle:"start-handle",endHandle:"end-handle",labelGroup:"label-group",label:"label",indicator:"indicator"},"legend"),ek=(le(nk,ZM=xl),nk.prototype.renderTitle=function(t,e,n){var r=this.attributes,i=r.showTitle,r=r.titleText,a=k(E2(S(this.attributes,"title")),2),o=a[0],a=a[1],s=(this.titleGroup=t.maybeAppendByClassName(tk.titleGroup,"g").styles(a),y(y({width:e,height:n},o),{text:i?r:""}));this.title=this.titleGroup.maybeAppendByClassName(tk.title,function(){return new OM({style:s})}).update(s)},nk.prototype.renderItems=function(t,e){var n=e.x,r=e.y,i=e.width,e=e.height,a=k(E2(S(this.attributes,"title",!0)),2),o=a[0],a=a[1],s=y(y({},o),{width:i,height:e,x:0,y:0}),l=(this.itemsGroup=t.maybeAppendByClassName(tk.itemsGroup,"g").styles(y({x:n,y:r},a)),this);this.itemsGroup.selectAll(tk.items.class).data(["items"]).join(function(t){return t.append(function(){return new HM({style:s})}).attr("className",tk.items.name).each(function(){l.items=w(this)})},function(t){return t.update(s)},function(t){return t.remove()})},nk.prototype.adjustLayout=function(){var t,e;this.attributes.showTitle&&(t=(e=this.title.node().getAvailableSpace()).x,e=e.y,this.itemsGroup.node().setLocalPosition(t,e))},Object.defineProperty(nk.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.showTitle,n=t.width,t=t.height;return e?this.title.node().getAvailableSpace():new jx(0,0,n,t)},enumerable:!1,configurable:!0}),nk.prototype.getBBox=function(){var t,e,n,r,i,a,o,s,l,c,u=null==(u=this.title)?void 0:u.node(),h=null==(h=this.items)?void 0:h.node();return u&&h?(h=h,t=(r=(u=u).attributes).position,e=r.spacing,n=r.inset,r=r.text,u=u.getBBox(),i=h.getBBox(),t=MM(t),e=(r=k(b2(r?e:0),4))[0],a=r[1],o=r[2],r=r[3],s=(n=k(b2(n),4))[0],l=n[1],c=n[2],n=n[3],a=(r=k([r+a,e+o],2))[0],e=r[1],r=(o=k([n+l,s+c],2))[0],n=o[1],"l"===t[0]?new jx(u.x,u.y,i.width+u.width+a+r,Math.max(i.height+n,u.height)):"t"===t[0]?new jx(u.x,u.y,Math.max(i.width+r,u.width),i.height+u.height+e+n):(s=(l=k([h.attributes.width||i.width,h.attributes.height||i.height],2))[0],c=l[1],new jx(i.x,i.y,s+u.width+a+r,c+u.height+e+n))):ZM.prototype.getBBox.call(this)},nk.prototype.render=function(t,e){var n=t.width,t=t.height,e=w(e);this.renderTitle(e,n,t),this.renderItems(e,this.availableSpace),this.adjustLayout()},nk);function nk(t){return ZM.call(this,t,QM)||this}var rk,ik={backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333",backgroundZIndex:-1,formatter:function(t){return t.toString()},labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",padding:[2,4],position:"right",zIndex:999},ak=Bx({background:"background",labelGroup:"label-group",label:"label"},"indicator"),ok=(le(sk,rk=xl),sk.prototype.renderBackground=function(){var t,e,n,r,i,a,o;this.label&&(t=(i=this.attributes).position,o=(i=k(b2(i.padding),4))[0],e=i[1],n=i[2],i=i[3],a=(r=this.label.node().getLocalBounds()).min,r=r.max,i=[[a[0]-i,a[1]-o],[r[0]+e,r[1]+n]],a=this.getPath(t,i),o=S(this.attributes,"background"),this.background=w(this.group).maybeAppendByClassName(ak.background,"path").styles(y(y({},o),{path:a})),this.group.appendChild(this.label.node()))},sk.prototype.renderLabel=function(){var t=this.attributes,e=t.formatter,n=t.labelText,t=k(E2(S(this.attributes,"label")),2),r=t[0],t=t[1],r=(r.text,nt(r,["text"]));this.label=w(this.group).maybeAppendByClassName(ak.labelGroup,"g").styles(t),n&&this.label.maybeAppendByClassName(ak.label,function(){return Ux(e(n))}).style("text",e(n).toString()).selectAll("text").styles(r)},sk.prototype.adjustLayout=function(){var t=k(this.point,2),e=t[0],t=t[1];this.group.attr("x",-e).attr("y",-t)},sk.prototype.getPath=function(n,t){var r=this,t=k(t,2),e=k(t[0],2),i=e[0],e=e[1],t=k(t[1],2),a=t[0],t=t[1],o={top:"bottom",right:"left",bottom:"top",left:"right"},a=Object.entries({top:[[i,e],[a,e]],right:[[a,e],[a,t]],bottom:[[a,t],[i,t]],left:[[i,t],[i,e]]}).map(function(t){var t=k(t,2),e=t[0],t=t[1];return e===o[n]?r.createCorner(t):[b(["M"],k(t[0]),!1),b(["L"],k(t[1]),!1)]});return a.push([["Z"]]),a.flat().filter(function(t,e,n){return 0===e||"M"!==t[0]})},sk.prototype.createCorner=function(t,e){void 0===e&&(e=10);var n=function(t,e){var n=(t=k(t,2))[0],t=t[1],r=(e=k(e,2))[0],e=e[1];return n!==r&&t===e}.apply(void 0,b([],k(t),!1)),t=k(t,2),r=k(t[0],2),i=r[0],r=r[1],t=k(t[1],2),a=t[0],t=t[1],a=k(n?[a-i,[i,a]]:[t-r,[r,t]],2),t=a[0],a=k(a[1],2),o=a[0],a=a[1],s=t/2,e=e*(t/Math.abs(t)),t=e/2,e=e*Math.sqrt(3)/2*.8,o=k([o,o+s-t,o+s,o+s+t,a],5),s=o[0],t=o[1],a=o[2],l=o[3],o=o[4];return n?(this.point=[a,r-e],[["M",s,r],["L",t,r],["L",a,r-e],["L",l,r],["L",o,r]]):(this.point=[i+e,a],[["M",i,s],["L",i,t],["L",i+e,a],["L",i,l],["L",i,o]])},sk.prototype.bindEvents=function(){this.label.on(x.BOUNDS_CHANGED,this.renderBackground)},sk.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout()},sk);function sk(t){t=rk.call(this,t,ik)||this;return t.point=[0,0],t.group=t.appendChild(new Fs({})),t.isMutationObserved=!0,t}function lk(t,e){var t=k(function(t,e){for(var n=1;n<t.length;n+=1){var r=t[n-1],i=t[n];if(r<=e&&e<=i)return[r,i]}return[e,e]}(t,e),2),n=t[0],t=t[1];return{tick:(n+t)/2<e?t:n,range:[n,t]}}var ck=Bx({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function uk(t){var e=t.orientation,n=t.size,t=t.length;return IM(e,[t,n],[n,t])}function hk(t){var e=t.type,t=k(uk(t),2),n=t[0],t=t[1];return"size"===e?[["M",0,t],["L",0+n,0],["L",0+n,t],["Z"]]:[["M",0,t],["L",0,0],["L",0+n,0],["L",0+n,t],["Z"]]}function fk(t){var i,a,o,e=t.orientation,r=t.color,n=t.block,t=t.partition,s=(l=Fe(r)?new Array(20).fill(0).map(function(t,e,n){return r(e/(n.length-1))}):r).length,l=l.map(function(t){return $a(t).toString()});return s?1===s?l[0]:n?(i=t,n=e,a=Array.from(l),o=i.length,new Array(o).fill(0).reduce(function(t,e,n){var r=a[n%a.length];return t+" ".concat(i[n],":").concat(r).concat(n<o-1?" ".concat(i[n+1],":").concat(r):"")},"l(".concat("horizontal"===n?"0":"270",")"))):l.reduce(function(t,e,n){return t+" ".concat(n/(s-1),":").concat(e)},"l(".concat(IM(e,"0","270"),")")):""}function dk(t,e){var n,r,i,a=S(e,"selection"),o=fk(e),t=t.maybeAppendByClassName(ck.selection,"path").styles(y({path:hk(e),fill:o},a)),a=t.maybeAppendByClassName(ck.clipPath,"path").styles({path:(a=(o=e).orientation,(e=o.range)?(r=(o=k(uk(o),2))[0],o=o[1],n=(e=k(e,2))[0],e=e[1],i=IM(a,n*r,0),n=IM(a,0,n*o),r=IM(a,e*r,r),[["M",i,n],["L",i,i=IM(a,o,e*o)],["L",r,i],["L",r,n],["Z"]]):[])}).node();t.style("clip-path",a)}le(mk,pk=xl),mk.prototype.render=function(t,e){var n,r,i=w(e).maybeAppendByClassName(ck.trackGroup,"g");i=i,r=S(n=t,"track"),i.maybeAppendByClassName(ck.track,"path").styles(y({path:hk(n)},r)),dk(w(e).maybeAppendByClassName(ck.selectionGroup,"g"),t)};var pk,gk=mk;function mk(t){return pk.call(this,t,{type:"color",orientation:"horizontal",size:30,range:[0,1],length:200,block:!1,partition:[],color:["#fff","#000"],trackFill:"#e5e5e5"})||this}var vk,yk,bk,xk,wk=sn(function(t){return{min:Math.min.apply(Math,b([],k(t.map(function(t){return t.value})),!1)),max:Math.max.apply(Math,b([],k(t.map(function(t){return t.value})),!1))}},function(t){return t.map(function(t){return t.id})}),Mk=(le(s,vk=xl),Object.defineProperty(s.prototype,"handleOffsetRatio",{get:function(){return this.ifHorizontal(.7,.9)},enumerable:!1,configurable:!0}),s.prototype.getBBox=function(){var t=this.attributes,e=t.width,t=t.height;return new jx(0,0,e,t)},s.prototype.render=function(t,e){var n=this,t=t.showLabel,r=(this.renderTitle(w(e)),this.availableSpace),i=r.x,r=r.y,e=w(e).maybeAppendByClassName(tk.contentGroup,"g").styles({x:i,y:r}),i=(Xx(!!t,e.maybeAppendByClassName(tk.labelGroup,"g").styles({zIndex:1}),function(t){n.renderLabel(t)}),e.maybeAppendByClassName(tk.ribbonGroup,"g").styles({zIndex:0}));this.handlesGroup=e.maybeAppendByClassName(tk.handlesGroup,"g").styles({zIndex:2}),this.renderHandles(),this.renderRibbon(i),this.renderIndicator(e),this.adjustLabel(),this.adjustHandles()},Object.defineProperty(s.prototype,"range",{get:function(){var t=this.attributes.data;return wk(t)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"ribbonScale",{get:function(){var t=this.range,e=t.min,t=t.max;return this.innerRibbonScale.update({domain:[e,t],range:[0,1]}),this.innerRibbonScale},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"ribbonRange",{get:function(){var t=k(this.selection,2),e=t[0],t=t[1],n=this.ribbonScale;return[n.map(e),n.map(t)]},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"selection",{get:function(){var t=this.range,e=t.min,t=t.max,n=this.attributes.defaultValue,e=k(void 0===n?[e,t]:n,2);return[e[0],e[1]]},enumerable:!1,configurable:!0}),s.prototype.ifHorizontal=function(t,e){return IM(this.attributes.orientation,"function"==typeof t?t():t,"function"==typeof e?e():e)},s.prototype.renderTitle=function(t){var e=this.attributes,n=e.showTitle,r=e.titleText,i=e.width,e=e.height,a=S(this.attributes,"title"),o=y(y({},a),{width:i,height:e,text:r}),s=this;t.selectAll(tk.title.class).data(n?[r]:[]).join(function(t){return t.append(function(){return new OM({style:o})}).attr("className",tk.title.name).each(function(){s.title=this})},function(t){return t.update(o)},function(t){return t.each(function(){s.title=void 0}).remove()})},Object.defineProperty(s.prototype,"availableSpace",{get:function(){var t,e;return this.title?this.title.getAvailableSpace():(t=(e=this.attributes).width,e=e.height,new jx(0,0,t,e))},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"labelFixedSpacing",{get:function(){return this.attributes.showTick?5:0},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"labelPosition",{get:function(){var t=this.attributes,e=t.orientation,t=t.labelDirection;return{vertical:{positive:"right",negative:"left"},horizontal:{positive:"bottom",negative:"top"}}[e][t]},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"labelBBox",{get:function(){var t,e;return this.attributes.showLabel?(this.cacheLabelBBox||(t=(e=(null==(e=this.label.querySelector(bw.labelGroup.class))?void 0:e.children.slice(-1)[0]).getBBox()).width,e=e.height,this.cacheLabelBBox=new jx(0,0,t,e)),this.cacheLabelBBox):new jx(0,0,0,0)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"labelShape",{get:function(){var t,e=this.attributes,n=e.showLabel,e=e.labelSpacing,e=void 0===e?0:e;return n?{width:t=(n=this.labelBBox).width,height:n=n.height,size:this.ifHorizontal(n,t)+e+this.labelFixedSpacing,length:this.ifHorizontal(t,n)}:{width:0,height:0,size:0,length:0}},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"ribbonBBox",{get:function(){var t=this.attributes,e=t.showHandle,t=t.ribbonSize,n=this.availableSpace,r=n.width,n=n.height,i=this.labelShape,a=i.size,i=i.length,r=k(this.ifHorizontal([n,r],[r,n]),2),n=r[0],r=r[1],e=e?this.handleShape:{size:0,length:0},o=e.size,e=e.length,s=this.handleOffsetRatio,l=0,c=this.labelPosition,l=t||(["bottom","right"].includes(c)?Math.min(n-a,(n-o)/s):o<n*(1-s)?Math.max(n-a,0):Math.max((n-a-o)/s,0)),t=Math.max(e,i),n=r-t,o=k(this.ifHorizontal([n,l],[l,n]),2),s=o[0],e=o[1],i=["top","left"].includes(c)?a:0,r=k(this.ifHorizontal([t/2,i],[i,t/2]),2),l=r[0],n=r[1];return new jx(l,n,s,e)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"ribbonShape",{get:function(){var t=this.ribbonBBox,e=t.width,t=t.height;return this.ifHorizontal({size:t,length:e},{size:e,length:t})},enumerable:!1,configurable:!0}),s.prototype.renderRibbon=function(t){var e=this.attributes,n=e.data,r=e.type,i=e.orientation,a=e.color,e=e.block,o=S(this.attributes,"ribbon"),s=this.range,l=s.min,c=s.max,s=this.ribbonBBox,u=s.x,s=s.y,h=this.ribbonShape,f=h.length,h=h.size,d=Dx({x:u,y:s,length:f,size:h,type:r,orientation:i,color:a,block:e,partition:n.map(function(t){return(t.value-l)/(c-l)}),range:this.ribbonRange},o);this.ribbon=t.maybeAppendByClassName(tk.ribbon,function(){return new gk({style:d})}).update(d)},s.prototype.getHandleClassName=function(t){return"".concat(tk.prefix("".concat(t,"-handle")))},s.prototype.renderHandles=function(){var t=this.attributes,e=t.showHandle,t=t.orientation,n=S(this.attributes,"handle"),r=k(this.selection,2),i=r[0],r=r[1],a=y(y({},n),{orientation:t}),o=this;this.handlesGroup.selectAll(tk.handle.class).data(e?[{value:i,type:"start"},{value:r,type:"end"}]:[],function(t){return t.type}).join(function(t){return t.append(function(){return new XM({style:a})}).attr("className",function(t){t=t.type;return"".concat(tk.handle," ").concat(o.getHandleClassName(t))}).each(function(t){var e=t.type,t=t.value,t=(this.update({labelText:t}),"".concat(e,"Handle"));(o[t]=this).addEventListener("pointerdown",o.onDragStart(e))})},function(t){return t.update(a).each(function(t){t=t.value;this.update({labelText:t})})},function(t){return t.each(function(t){t=t.type,t="".concat(t,"Handle");o[t]=void 0}).remove()})},s.prototype.adjustHandles=function(){var t=k(this.selection,2),e=t[0],t=t[1];this.setHandlePosition("start",e),this.setHandlePosition("end",t)},Object.defineProperty(s.prototype,"handleBBox",{get:function(){if(!this.cacheHandleBBox){if(!this.attributes.showHandle)return new jx(0,0,0,0);var t=this.startHandle.getBBox(),e=t.width,t=t.height,n=this.endHandle.getBBox(),r=n.width,n=n.height,e=k([Math.max(e,r),Math.max(t,n)],2),r=e[0],t=e[1];this.cacheHandleBBox=new jx(0,0,r,t)}return this.cacheHandleBBox},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"handleShape",{get:function(){var t=this.handleBBox,e=t.width,t=t.height,n=k(this.ifHorizontal([t,e],[e,t]),2);return{width:e,height:t,size:n[0],length:n[1]}},enumerable:!1,configurable:!0}),s.prototype.setHandlePosition=function(t,e){var n=this.attributes.handleFormatter,r=this.ribbonBBox,i=r.x,r=r.y,a=this.ribbonShape.size,e=this.getOffset(e),i=k(this.ifHorizontal([i+e,r+a*this.handleOffsetRatio],[i+a*this.handleOffsetRatio,r+e]),2),a=i[0],r=i[1],e=this.handlesGroup.select(".".concat(this.getHandleClassName(t))).node();null!=e&&e.update({x:a,y:r,formatter:n})},s.prototype.renderIndicator=function(t){var e=S(this.attributes,"indicator");this.indicator=t.maybeAppendByClassName(tk.indicator,function(){return new ok({})}).update(e)},Object.defineProperty(s.prototype,"labelData",{get:function(){var s=this;return this.attributes.data.reduce(function(t,e,n,r){var i,a,o=null!=(o=null==e?void 0:e.id)?o:n.toString();return t.push(y(y({},e),{id:o,index:n,type:"value",label:null!=(i=null==e?void 0:e.label)?i:e.value.toString(),value:s.ribbonScale.map(e.value)})),n<r.length-1&&(i=r[n+1],a=((i=(r=k([e.value,i.value],2))[0])+(r=r[1]))/2,t.push(y(y({},e),{id:o,index:n,type:"range",range:[i,r],label:[i,r].join("~"),value:s.ribbonScale.map(a)}))),t},[])},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"labelStyle",{get:function(){var t=k(["center","middle"],2),e=t[0],t=t[1],n=this.labelPosition;return"top"===n?t="bottom":"bottom"===n?t="top":"left"===n?e="end":"right"===n&&(e="start"),{labelTextAlign:e,labelTextBaseline:t}},enumerable:!1,configurable:!0}),s.prototype.renderLabel=function(t){var e=this.attributes,n=e.showTick,n=void 0!==n&&n,r=e.labelFilter,e=e.labelFormatter,i=S(this.attributes,"label"),a=i.align,o=S(i,"tick"),i=S(i,"tick",!0),n=Dx(y({showLine:!1,showGrid:!1,showTick:n,type:"linear",startPos:[0,0],endPos:[0,0],tickDirection:"negative",labelTransform:"rotate(0)"},this.labelStyle),k2(o,"tick"),k2(i,"label"),{data:this.labelData}),o={tickFilter:function(t,e,n){return"value"===(null==t?void 0:t.type)&&(!r||r(t,t.index,n.filter(function(t){return"value"!==t.type})))},labelFilter:function(t,e,n){return(null==t?void 0:t.type)===a&&(!r||r(t,t.index,n.filter(function(t){return t.type===a})))},labelFormatter:e},s=y(y({},n),o);this.label=t.maybeAppendByClassName(tk.label,function(){return new PM({style:s})}).node(),this.label.update(s,!1)},Object.defineProperty(s.prototype,"labelAxisStyle",{get:function(){var t=this.attributes,e=t.showTick,n=t.labelDirection,t=t.labelSpacing,r=this.ribbonShape.size,i=this.labelPosition,a=this.labelFixedSpacing,o=k([0,0,0],3),s=o[0],l=o[1],o=o[2],c=r+t;return e?(o=c,l=a,"positive"===n?"right"===i?o=s=c:"bottom"===i&&(s=o):"negative"!==n||"top"!==i&&"left"!==i||(s=r)):"positive"===n?"right"===i?l=c:"bottom"===i&&(s=r+a,l=t):"negative"!==n||"left"!==i&&"top"!==i||(l=t),{offset:s,spacing:l,tickLength:o}},enumerable:!1,configurable:!0}),s.prototype.adjustLabel=function(){var t,e,n,r,i,a,o;this.attributes.showLabel&&(o=(a=this.ribbonBBox).x,t=a.y,i=a.width,a=a.height,e=(r=this.labelAxisStyle).offset,n=r.spacing,r=r.tickLength,a=(i=k(this.ifHorizontal([[o,t+e],[o+i,t+e]],[[o+e,t+a],[o+e,t]]),2))[0],o=i[1],this.label.update({startPos:a,endPos:o,tickLength:r,labelSpacing:n},!1))},s.prototype.bindEvents=function(){this.ribbon.on("pointerdown",this.onDragStart("ribbon")),this.ribbon.on("pointermove",this.onHovering),this.addEventListener("pointerout",this.hideIndicator)},s.prototype.showIndicator=function(t,e){var n,r,i,a;void 0===e&&(e="".concat(t)),this.attributes.showIndicator&&"number"==typeof t?(i=(a=this.range).min,a=a.max,n=(r=this.ribbonBBox).x,r=r.y,t=Xe(t,i,a),i=this.getOffset(t),a=this.ifHorizontal([i+n,r],[n,i+r]),this.indicator.update({x:a[0],y:a[1],position:this.ifHorizontal("top","left"),labelText:e}),Mx(this.indicator.node())):this.hideIndicator()},s.prototype.hideIndicator=function(){kx(this.indicator.node())},s.prototype.updateMouse=function(){this.attributes.slidable&&(this.style.cursor="grabbing")},s.prototype.setSelection=function(t,e){this.updateSelection(t,e)},s.prototype.updateSelection=function(t,e,n){void 0===n&&(n=!1);var r,i,a,o,s,l=k(this.selection,2),c=l[0],l=l[1],t=k([t,e],2),e=t[0],t=t[1],n=(n&&(e+=c,t+=l),this.range),c=n.min,l=n.max,u=k((n=[c,l],c=[e,t],l=this.selection,void 0===r&&(r=4),i=(n=k(n,2))[0],n=n[1],a=(c=k(c,2))[0],c=c[1],o=(l=k(l,2))[0],l=l[1],c=(a=k([a,c],2))[0],s=(a=a[1])-c,a<c&&(c=(u=k([a,c],2))[0],a=u[1]),n-i<s?[i,n]:c<i?o===i&&l===a?[i,a]:[i,s+i]:n<a?l===n&&o===c?[c,n]:[n-s,n]:[c2(c,r),c2(a,r)]),2),e=u[0],t=u[1];this.update({defaultValue:[e,t]}),this.dispatchSelection()},Object.defineProperty(s.prototype,"step",{get:function(){var t=this.attributes.step,t=void 0===t?1:t,e=this.range,n=e.min,e=e.max;return rn(t)?c2(.01*(e-n),0):t},enumerable:!1,configurable:!0}),s.prototype.getTickValue=function(t){var e=this.attributes,n=e.data,e=e.block,r=this.range.min;return e?lk(n.map(function(t){return t.value}),t).tick:(e=this.step,r+Math.round((t-r)/e)*e)},s.prototype.getValueByCanvasPoint=function(t,e){var n=this.range,r=n.min,n=n.max,i=k(this.ribbon.node().getPosition(),2),a=i[0],i=i[1],a=this.ifHorizontal(a,i),i=this.ifHorizontal.apply(this,b([],k($x(t)),!1));return Xe(this.getOffset(i-a,!0),r,n)},s.prototype.getOffset=function(t,e){void 0===e&&(e=!1);var n=this.range,r=n.min,n=n.max,i=this.ribbonShape.length,a=this.eventToOffsetScale;return a.update({domain:[r,n],range:[0,i]}),e?a.invert(t):a.map(t)},s.prototype.dispatchSelection=function(){var t=new cs("valuechange",{detail:{value:this.selection}});this.dispatchEvent(t)},s.prototype.dispatchIndicated=function(t,e){t=new cs("indicate",{detail:{value:t,range:e}});this.dispatchEvent(t)},s);function s(t){var a=vk.call(this,t,JM)||this;return a.eventToOffsetScale=new k1({}),a.innerRibbonScale=new k1({}),a.cacheLabelBBox=null,a.cacheHandleBBox=null,a.onHovering=function(t){var e=a.attributes,n=e.data,e=e.block,t=(t.stopPropagation(),a.getValueByCanvasPoint(t));e?(e=lk(n.map(function(t){return t.value}),t).range,a.showIndicator((e[0]+e[1])/2,"".concat(e[0],"-").concat(e[1])),a.dispatchIndicated(t,e)):(n=a.getTickValue(t),a.showIndicator(n),a.dispatchIndicated(n))},a.onDragStart=function(e){return function(t){t.stopPropagation(),a.attributes.slidable&&(a.target=e,a.prevValue=a.getTickValue(a.getValueByCanvasPoint(t)),document.addEventListener("mousemove",a.onDragging),document.addEventListener("touchmove",a.onDragging),document.addEventListener("mouseleave",a.onDragEnd),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchend",a.onDragEnd))}},a.onDragging=function(t){var e=a.target,n=(a.updateMouse(),k(a.selection,2)),r=n[0],n=n[1],t=a.getTickValue(a.getValueByCanvasPoint(t)),i=t-a.prevValue;"start"===e?r!==t&&a.updateSelection(t,n):"end"===e?n!==t&&a.updateSelection(r,t):"ribbon"===e&&0!=i&&(a.prevValue=t,a.updateSelection(i,i,!0))},a.onDragEnd=function(){a.style.cursor="default",document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("touchmove",a.onDragging),document.removeEventListener("mouseup",a.onDragEnd),document.removeEventListener("touchend",a.onDragEnd)},a}function kk(t){yk||(yk=document.createElement("table"),xk=document.createElement("tr"),bk=/^\s*<(\w+|!)[^>]*>/,xk={tr:document.createElement("tbody"),tbody:yk,thead:yk,tfoot:yk,td:xk,th:xk,"*":document.createElement("div")});var e=bk.test(t)&&RegExp.$1,e=(e&&e in xk||(e="*"),xk[e]),t=(t="string"==typeof t?t.replace(/(^\s*)|(\s*$)/g,""):t,e.innerHTML=""+t,e.childNodes[0]);return t&&e.contains(t)&&e.removeChild(t),t}function Ek(t){return{CONTAINER:"".concat(t=void 0===t?"":t,"tooltip"),TITLE:"".concat(t,"tooltip-title"),LIST:"".concat(t,"tooltip-list"),LIST_ITEM:"".concat(t,"tooltip-list-item"),NAME:"".concat(t,"tooltip-list-item-name"),MARKER:"".concat(t,"tooltip-list-item-marker"),NAME_LABEL:"".concat(t,"tooltip-list-item-name-label"),VALUE:"".concat(t,"tooltip-list-item-value"),CROSSHAIR_X:"".concat(t,"tooltip-crosshair-x"),CROSSHAIR_Y:"".concat(t,"tooltip-crosshair-y")}}var Ok={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"};le(Pk,Sk=xl),Object.defineProperty(Pk.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),Pk.prototype.getContainer=function(){return this.element},Object.defineProperty(Pk.prototype,"position",{set:function(t){var t=k(t,2),e=t[0],t=t[1];this.attributes.x=e,this.attributes.y=t,this.updatePosition()},enumerable:!1,configurable:!0}),Object.defineProperty(Pk.prototype,"elementSize",{get:function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},enumerable:!1,configurable:!0}),Object.defineProperty(Pk.prototype,"HTMLTooltipItemsElements",{get:function(){var t=this.attributes,e=t.data,o=t.template;return e.map(function(t,e){var n,r=t.name,r=void 0===r?"":r,i=t.color,i=void 0===i?"black":i,a=t.index,t=nt(t,["name","color","index"]),r=y({name:r,color:i,index:null!=a?a:e},t);return kk((i=o.item,n=r,i&&n?i.replace(/\\?\{([^{}]+)\}/g,function(t,e){return"\\"===t.charAt(0)?t.slice(1):void 0===n[e]?"":n[e]}):i))})},enumerable:!1,configurable:!0}),Pk.prototype.render=function(t,e){this.renderHTMLTooltipElement(),this.updatePosition()},Pk.prototype.destroy=function(){var t;null!=(t=this.element)&&t.remove(),Sk.prototype.destroy.call(this)},Pk.prototype.show=function(t,e){var n,r=this;void 0!==t&&void 0!==e&&(n=this.element.style.transition,this.element.style.transition="none",this.position=[null!=t?t:+this.attributes.x,null!=e?e:+this.attributes.y],setTimeout(function(){r.element.style.transition=n},10)),this.element.style.visibility="visible"},Pk.prototype.hide=function(){this.element.style.visibility="hidden"},Pk.prototype.initShape=function(){var t=this.attributes.template;this.element=kk(t.container),this.id&&this.element.setAttribute("id",this.id)},Pk.prototype.renderCustomContent=function(){var t;(void 0===this.prevCustomContentKey||this.prevCustomContentKey!==this.attributes.contentKey)&&(this.prevCustomContentKey=this.attributes.contentKey,t=this.attributes.content)&&("string"==typeof t?this.element.innerHTML=t:this.element.replaceChildren(t))},Pk.prototype.renderHTMLTooltipElement=function(){var r,t=this.attributes,e=t.template,n=t.title,i=t.enterable,a=t.style,t=t.content,o=Ek(e.prefixCls),s=this.element;this.element.style.pointerEvents=i?"auto":"none",t?this.renderCustomContent():(n?(s.innerHTML=e.title,s.getElementsByClassName(o.TITLE)[0].innerHTML=n):null!=(t=null==(i=s.getElementsByClassName(o.TITLE))?void 0:i[0])&&t.remove(),e=this.HTMLTooltipItemsElements,(n=document.createElement("ul")).className=o.LIST,n.replaceChildren.apply(n,b([],k(e),!1)),(i=this.element.querySelector(".".concat(o.LIST)))?i.replaceWith(n):s.appendChild(n)),r=s,Object.entries(a).forEach(function(t){var t=k(t,2),e=t[0],n=t[1];b([r],k(r.querySelectorAll(e)),!1).filter(function(t){return t.matches(e)}).forEach(function(t){t&&(t.style.cssText+=Object.entries(n).reduce(function(t,e){return"".concat(t).concat(e.join(":"),";")},""))})})},Pk.prototype.getRelativeOffsetFromCursor=function(t){var e=this.attributes,n=e.position,i=e.offset,e=(t||n).split("-"),a={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},t=this.elementSize,o=t.width,s=t.height,l=[-o/2,-s/2];return e.forEach(function(t){var e=k(l,2),n=e[0],e=e[1],t=k(a[t],2),r=t[0],t=t[1];l=[n+(o/2+i[0])*r,e+(s/2+i[1])*t]}),l},Pk.prototype.setOffsetPosition=function(t){var t=k(t,2),e=t[0],t=t[1],n=this.attributes,r=n.x,i=n.y,i=void 0===i?0:i,n=n.container,a=n.x,n=n.y;this.element.style.left="".concat(+(void 0===r?0:r)+a+e,"px"),this.element.style.top="".concat(+i+n+t,"px")},Pk.prototype.updatePosition=function(){this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor()))},Pk.prototype.autoPosition=function(t){var e,n,r,i,a,o,s,t=k(t,2),l=t[0],t=t[1],c=this.attributes,u=c.x,h=c.y,f=c.bounding,c=c.position;return f?(e=(n=this.element).offsetWidth,n=n.offsetHeight,h=(u=k([+u+l,+h+t],2))[0],u=u[1],r={left:"right",right:"left",top:"bottom",bottom:"top"},s=f.x,i=f.y,a={left:h<s,right:s+f.width<h+e,top:u<i,bottom:i+f.height<u+n},o=[],c.split("-").forEach(function(t){o.push(a[t]?r[t]:t)}),s=o.join("-"),this.getRelativeOffsetFromCursor(s)):[l,t]},Pk.tag="tooltip",t([(void 0===(_k=100)&&(_k=0),void 0===(Ak=!0)&&(Ak=!1),function(t,e,n){var r,i=n.value;"function"==typeof i&&(n.value=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];r||(t=this,Ak&&i.apply(t,e),r=window.setTimeout(function(){i.apply(t,e),r=null},_k))})})],Pk.prototype,"updatePosition",null);var Sk,_k,Ak,Tk=Pk;function Pk(t){var e=this,n=null==(n=null==(n=t.style)?void 0:n.template)?void 0:n.prefixCls,r=Ek(n);return(e=Sk.call(this,t,{data:[],x:0,y:0,visibility:"visible",title:"",position:"bottom-right",offset:[5,5],enterable:!1,container:{x:0,y:0},bounding:null,template:{prefixCls:"",container:'<div class="'.concat(r.CONTAINER,'"></div>'),title:'<div class="'.concat(r.TITLE,'"></div>'),item:'<li class="'.concat(r.LIST_ITEM,'" data-index={index}>\n <span class="').concat(r.NAME,'">\n <span class="').concat(r.MARKER,'" style="background:{color}"></span>\n <span class="').concat(r.NAME_LABEL,'" title="{name}">{name}</span>\n </span>\n <span class="').concat(r.VALUE,'" title="{value}">{value}</span>\n </li>')},style:(t=Ek(t=void 0===(t=n)?"":t),(r={})[".".concat(t.CONTAINER)]={position:"absolute",visibility:"visible","z-index":8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)","background-color":"rgba(255, 255, 255, 0.96)","box-shadow":"0 6px 12px 0 rgba(0, 0, 0, 0.12)","border-radius":"4px",color:"rgba(0, 0, 0, 0.65)","font-size":"12px","line-height":"20px",padding:"12px","min-width":"120px","max-width":"360px","font-family":"Roboto-Regular"},r[".".concat(t.TITLE)]={color:"rgba(0, 0, 0, 0.45)"},r[".".concat(t.LIST)]={margin:"0px","list-style-type":"none",padding:"0px"},r[".".concat(t.LIST_ITEM)]={"list-style-type":"none",display:"flex","line-height":"2em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},r[".".concat(t.MARKER)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},r[".".concat(t.NAME)]={display:"flex","align-items":"center","max-width":"216px"},r[".".concat(t.NAME_LABEL)]=y({flex:1},Ok),r[".".concat(t.VALUE)]=y({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},Ok),r[".".concat(t.CROSSHAIR_X)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},r[".".concat(t.CROSSHAIR_Y)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},r)})||this).prevCustomContentKey=e.attributes.contentKey,e.initShape(),e.render(e.attributes,e),e}le(Ck,Lk=Fs),Object.defineProperty(Ck.prototype,"margin",{get:function(){return this.$margin},set:function(t){this.$margin=b2(t)},enumerable:!1,configurable:!0}),Object.defineProperty(Ck.prototype,"padding",{get:function(){return this.$padding},set:function(t){this.$padding=b2(t)},enumerable:!1,configurable:!0}),Ck.prototype.getBBox=function(){var t=this.attributes,e=t.x,e=void 0===e?0:e,n=t.y,n=void 0===n?0:n,r=t.width,t=t.height,i=k(this.$margin,4),a=i[0],o=i[1],s=i[2],i=i[3];return new jx(e-i,n-a,r+i+o,t+a+s)},Ck.prototype.appendChild=function(t,e){return t.isMutationObserved=!0,Lk.prototype.appendChild.call(this,t,e),t},Ck.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,t=t.height,n=k(this.$padding,4),r=n[0],i=n[1],a=n[2],n=n[3],o=k(this.$margin,4),s=o[0],o=o[3];return new jx(n+o,r+s,e-n-i,t-r-a)},Ck.prototype.layout=function(){var t,e,n,r;if(this.attributes.display&&this.isConnected&&!this.children.some(function(t){return!t.isConnected}))try{t=this.getAvailableSpace(),e=this.children.map(function(t){return t.getBBox()}),n=this.attributes;var i=0!==e.length&&(null==(r=n.display in(r={flex:t2,grid:e2})?r[n.display]:null)?void 0:r.call(null,t,e,n))||[];this.children.forEach(function(t,e){var e=i[e],n=e.x,e=e.y;t.attr({x:n,y:e})})}catch(t){}},Ck.prototype.bindEvents=function(){var e=this;this.layoutEvents.forEach(function(t){e.addEventListener(t,function(t){t.target.isMutationObserved=!0,e.layout()})})},Ck.prototype.attributeChangedCallback=function(t,e,n){"margin"===t?this.margin=n:"padding"===t&&(this.padding=n),this.layout()};var Lk,cl=Ck;function Ck(t){var e=Lk.call(this,t)||this,t=(e.layoutEvents=[x.BOUNDS_CHANGED,x.INSERTED,x.REMOVED],e.$margin=b2(0),e.$padding=b2(0),t.style||{}),n=t.margin,t=t.padding,t=void 0===t?0:t;return e.margin=void 0===n?0:n,e.padding=t,e.isMutationObserved=!0,e.bindEvents(),e}function Nk(r,t,e,n){var[[t,i],[a,o]]=t,[s,l]=function(t){var{min:[t,e],max:[n,r]}=t.getLocalBounds();let i=0,a=0;return 0<t&&(i=t),n<0&&(i=n),0<e&&(a=e),r<0&&(a=r),[i,a]}(r);if(t===a&&i===o)return vb()([[0,0],[s,l]]);s=[[t-a,i-o]].concat(e.length?e:[0,0]);const c=[n[0]-a,n[1]-o],[u,h]=s;return l=c,t=u,i=h,e=ry(l,t),t=ry(t,i),i=ry(i,l),0<(Math.pow(e,2)+Math.pow(t,2)-Math.pow(i,2))/(2*e*t)&&(a=(()=>{var{min:t,max:e}=r.getLocalBounds(),n=u[0]+(u[1]-c[1])*+u[1]/(u[0]-c[0]);return e[0]<c[0]?Math.min(e[0],n):Math.max(t[0],n)})(),s.splice(1,1,[a,0])),vb()(s)}const jk=qb(t=>{var e=t.attributes,{labelTransform:n,labelTransformOrigin:r,x:i,y:a,x0:o=i,y0:s=a,background:l,connector:c,startMarker:u,endMarker:h,coordCenter:f}=e,e=nt(e,["class","transform","rotate","labelTransform","labelTransformOrigin","x","y","x0","y0","background","connector","startMarker","endMarker","coordCenter"]),d=it(e,"background"),p=d["padding"],d=nt(d,["padding"]),g=it(e,"connector"),{points:m=[]}=g,g=nt(g,["points"]),o=[[+o,+s],[+i,+a]],s=at(t).maybeAppend("text","text").style("zIndex",0).call(L,Object.assign({textBaseline:"middle",transform:n,transformOrigin:r},e)).node(),i=Nk(at(t).maybeAppend("background","rect").style("zIndex",-1).call(L,function(t,e=[]){var[e=0,n=0,r=e,i=n]=e,a=t.parentNode,o=a.getEulerAngles(),{min:t,halfExtents:s}=(a.setEulerAngles(0),t.getLocalBounds()),[t,l]=t,[s,c]=s;return a.setEulerAngles(o),{x:t-i,y:l-e,width:2*s+i+n,height:2*c+e+r}}(s,p)).call(L,l?d:{}).node(),o,m,f),a=u&&new N2({id:"startMarker",style:Object.assign({x:0,y:0},it(e,"startMarker"))}),n=h&&new N2({id:"endMarker",style:Object.assign({x:0,y:0},it(e,"endMarker"))});at(t).maybeAppend("connector","path").style("zIndex",0).style("path",i).style("markerStart",a).style("markerEnd",n).call(L,c?g:{})}),Rk=t=>{const l=nt(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=nt(dy(r,i,a,o),[]),{color:i,text:a="",fontSize:o,rotate:e=0,transform:s=""}=e,a={text:String(a),stroke:i,fill:i,fontSize:o},[[i,o]]=t;return at(new jk).style("x",i).style("y",o).call(L,r).style("transform",s+`rotate(${+e})`).style("coordCenter",n.getCenter()).call(L,a).call(L,l).node()}};Rk.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Ik=qb(t=>{var e=nt(t.attributes,["class","x","y"]);const n=it(e,"marker"),{size:s=24}=n,r=()=>{var t=s/2,e=t/Math.sqrt(2),n=t*Math.sqrt(2),[r,i]=[-e,e-n],[a,o]=[0,0],[e,n]=[e,e-n];return[["M",r,i],["A",t,t,0,1,1,e,n],["L",a,o],["Z"]]};var[i,a]=function(t){var{min:t,max:e}=t.getLocalBounds();return[.5*(t[0]+e[0]),.5*(t[1]+e[1])]}(at(t).maybeAppend("marker",()=>new N2({})).call(t=>t.node().update(Object.assign({symbol:r},n))).node());at(t).maybeAppend("text","text").style("x",i).style("y",a).call(L,e)}),Bk=t=>{const s=nt(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=dy(r,i,a,o),i=r["defaultColor"],a=nt(r,["defaultColor"]),{color:o,text:r=""}=e,e={text:String(r),stroke:o||i,fill:o||i},[[r,o]]=t;return at(new Ik).call(L,a).style("x",r).style("y",o).call(L,e).call(L,s).node()}},Dk=(Bk.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},qb(t=>{var{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes;at(t).maybeAppend("connect-path",()=>new z({})).style("d",n).call(L,i),at(t).maybeAppend("area-path",()=>new z({})).style("d",e).call(L,r)}));const Fk=t=>{const{curve:u,gradient:l=!1,defined:h=t=>!Number.isNaN(t)&&null!=t,connect:f=!1}=t,d=nt(t,["curve","gradient","defined","connect"]);return(t,e,c,n)=>{var{mark:r,shape:i,defaultShape:a}=e,n=dy(n,r,i,a),r=n["defaultColor"],i=nt(n,["defaultColor"]),{color:a=r,seriesColor:n,seriesX:r,seriesY:o}=e,e=gy(c,e),n=l&&n?uy(n,r,o,l):a;const s=Object.assign(Object.assign(Object.assign(Object.assign({},i),{stroke:n,fill:n}),e&&{transform:e}),d);var[r,o]=function(e,n){var r=[],i=[],a=[];let o=!1,s=null;var l=e.length/2;for(let t=0;t<l;t++){var c,u,h=e[t],f=e[t+l];[...h,...f].some(t=>!n(t))?o=!0:(r.push(h),i.push(f),o&&s&&(o=!1,[c,u]=s,a.push([c,h,u,f])),s=[h,f])}return[r.concat(i),a]}(t,h),a=it(s,"connect"),i=!!o.length,n=t=>at(new z({})).style("d",t).call(L,s).node();return gp(c)?(e=t=>{const n=c.getCenter(),r=t.slice(0,t.length/2),i=t.slice(t.length/2);return t=yb().curve(bb),e=t.curve,a=t.lineX0,o=t.lineX1,s=t.lineY0,l=t.lineY1,t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Mb(a())},delete t.lineX0,t.lineEndAngle=function(){return Mb(o())},delete t.lineX1,t.lineInnerRadius=function(){return Mb(s())},delete t.lineY0,t.lineOuterRadius=function(){return Mb(l())},delete t.lineY1,t.curve=function(t){return arguments.length?e(wb(t)):e()._curve},t.angle((t,e)=>ay(ey(r[e],n))).outerRadius((t,e)=>ry(r[e],n)).innerRadius((t,e)=>ry(i[e],n)).defined((t,e)=>[...r[e],...i[e]].every(h)).curve(u)(i);var e,a,o,s,l},!i||f&&!Object.keys(a).length?n(e(r)):i&&!f?n(e(t)):at(new Dk).style("areaStyle",s).style("connectStyle",Object.assign(Object.assign({},a),d)).style("areaPath",e(t)).style("connectPath",o.map(e).join("")).node()):(e=t=>{const n=t.slice(0,t.length/2),r=t.slice(t.length/2);return(pp(c)?yb().y((t,e)=>n[e][1]).x1((t,e)=>n[e][0]).x0((t,e)=>r[e][0]).defined((t,e)=>[...n[e],...r[e]].every(h)):yb().x((t,e)=>n[e][0]).y1((t,e)=>n[e][1]).y0((t,e)=>r[e][1]).defined((t,e)=>[...n[e],...r[e]].every(h))).curve(u)(n)},!i||f&&!Object.keys(a).length?n(e(r)):i&&!f?n(e(t)):at(new Dk).style("areaStyle",s).style("connectStyle",Object.assign(Object.assign({},a),d)).style("areaPath",e(t)).style("connectPath",o.map(e).join("")).node())}},zk=(Fk.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=gp(n)?Nb:pb;return Fk(Object.assign({curve:i},a))(t,e,n,r)}),Gk=(zk.props=Object.assign(Object.assign({},Fk.props),{defaultMarker:"square"}),t=>{const{alpha:a=.5}=t,o=nt(t,["alpha"]);return(t,e,n,r)=>{var i=gp(n)?Lb:Tb;return Fk(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),Wk=(Gk.props=Object.assign(Object.assign({},Fk.props),{defaultMarker:"smooth"}),i=>(t,e,n,r)=>Fk(Object.assign({curve:Rb},i))(t,e,n,r)),Yk=(Wk.props=Object.assign(Object.assign({},Fk.props),{defaultMarker:"hvh"}),i=>(t,e,n,r)=>Fk(Object.assign({curve:Ib},i))(t,e,n,r)),Hk=(Yk.props=Object.assign(Object.assign({},Fk.props),{defaultMarker:"vh"}),i=>(t,e,n,r)=>Fk(Object.assign({curve:Bb},i))(t,e,n,r)),Vk=(Hk.props=Object.assign(Object.assign({},Fk.props),{defaultMarker:"hv"}),i=>{const{arrow:a=!1}=i;return(t,e,n,r)=>wx(Object.assign(Object.assign({},i),{arrow:a}))(t,e,n,r)}),qk=(Vk.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=nt(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=dy(r,i,a,o),i=r["defaultColor"],a=nt(r,["defaultColor"]),{color:o=i,transform:r}=e,[e,i]=t,t=rb();return t.moveTo(e[0],e[1]),t.bezierCurveTo(e[0]/2+i[0]/2,e[1],e[0]/2+i[0]/2,i[1],i[0],i[1]),at(new z).call(L,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(L,s).node()}});qk.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const $k=t=>{const{cornerRatio:u=1/3}=t,h=nt(t,["cornerRatio"]);return(t,e,n,r)=>{var i,a,{mark:o,shape:s,defaultShape:l}=e,r=dy(r,o,s,l),o=r["defaultColor"],s=nt(r,["defaultColor"]),{color:l=o,transform:r}=e,[e,o]=t,c=(t=e,e=o,o=n,n=u,a=rb(),gp(o)?(i=ry(t,c=o.getCenter()),i=(ry(e,c)-i)*n+i,a.moveTo(t[0],t[1]),cy(a,t,e,c,i)):pp(o)?(a.moveTo(t[0],t[1]),a.lineTo(t[0]+(e[0]-t[0])*n,t[1]),a.lineTo(t[0]+(e[0]-t[0])*n,e[1])):(a.moveTo(t[0],t[1]),a.lineTo(t[0],t[1]+(e[1]-t[1])*n),a.lineTo(e[0],t[1]+(e[1]-t[1])*n)),a.lineTo(e[0],e[1]),a);return at(new z).call(L,s).style("d",c.toString()).style("stroke",l).style("transform",r).call(L,h).node()}},Uk=($k.props={defaultMarker:"vhv",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=nt(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=dy(r,i,a,o),i=r["defaultColor"],a=nt(r,["defaultColor"]),{color:o=i,transform:r}=e,[e,i]=t,t=rb();return t.moveTo(e[0],e[1]),gp(n)?(n=n.getCenter(),t.quadraticCurveTo(n[0],n[1],i[0],i[1])):cy(t,e,i,ly(e,i),ry(e,i)/2),at(new z).call(L,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(L,s).node()}}),Xk=(Uk.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const u=nt(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=dy(r,i,a,o),i=r["defaultColor"],a=nt(r,["defaultColor"]),{color:o=i,src:r="",size:e=32,transform:i=""}=e,{width:s=e,height:e=e}=u,[[t,l]]=t,[n,c]=n.getSize(),s="string"==typeof s?vd(s)*n:s,e="string"==typeof e?vd(e)*c:e,n=t-Number(s)/2,c=l-Number(e)/2;return at(new Ys).call(L,a).style("x",n).style("y",c).style("img",r).style("stroke",o).style("transform",i).call(L,u).style("width",s).style("height",e).node()}});Xk.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Kk=t=>{const l=nt(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=dy(r,e,i,a),e=r["defaultColor"],i=nt(r,["defaultColor"]),a=function(i,t){const a=rb();if(gp(t)){const o=t.getCenter();t=[...i,i[0]];const s=t.map(t=>ry(t,o));return t.forEach((t,e)=>{var n,r;0===e?a.moveTo(t[0],t[1]):(n=s[e],r=i[e-1],void 0!==(e=s[e-1])&&Math.abs(n-e)<1e-10?cy(a,r,t,o,n):a.lineTo(t[0],t[1]))}),a.closePath(),a}return n=a,i.forEach((t,e)=>0===e?n.moveTo(t[0],t[1]):n.lineTo(t[0],t[1])),n.closePath(),n;var n}(t,n);return at(new z).call(L,i).style("d",a.toString()).style("stroke",o||e).style("fill",o||e).style("transform",s).call(L,l).node()}};Kk.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Zk=t=>{const l=nt(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=dy(r,e,i,a),e=r["defaultColor"],i=nt(r,["defaultColor"]),a=function(t,e){var n,[t,r,i,a]=t,o=rb();return gp(e)?(n=ry(e=e.getCenter(),t),o.moveTo(t[0],t[1]),o.quadraticCurveTo(e[0],e[1],i[0],i[1]),cy(o,i,a,e,n),o.quadraticCurveTo(e[0],e[1],r[0],r[1]),cy(o,r,t,e,n),o.closePath()):(o.moveTo(t[0],t[1]),o.bezierCurveTo(t[0]/2+i[0]/2,t[1],t[0]/2+i[0]/2,i[1],i[0],i[1]),o.lineTo(a[0],a[1]),o.bezierCurveTo(a[0]/2+r[0]/2,a[1],a[0]/2+r[0]/2,r[1],r[0],r[1]),o.lineTo(t[0],t[1]),o.closePath()),o}(t,n);return at(new z).call(L,i).style("d",a.toString()).style("fill",o||e).style("stroke",o||e).style("transform",s).call(L,l).node()}};Zk.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Qk=t=>{const m=nt(t,[]);return(t,e,n,r)=>{var i,a,o,s,l,c,u,{mark:e,shape:h,defaultShape:f,color:d,transform:p}=e,r=dy(r,e,h,f),{defaultColor:e,fill:h=e,stroke:f=e}=r,e=nt(r,["defaultColor","fill","stroke"]),g=(r=t,t=n,n=rb(),gp(t)?([i,a]=t=t.getCenter(),o=iy(ey(r[0],t)),s=iy(ey(r[1],t)),g=ry(t,r[2]),l=ry(t,r[3]),c=ry(t,r[8]),u=ry(t,r[10]),t=ry(t,r[11]),n.moveTo(...r[0]),n.arc(i,a,g,o,s),n.arc(i,a,g,s,o,!0),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.arc(i,a,l,o,s),n.lineTo(...r[6]),n.arc(i,a,u,s,o,!0),n.closePath(),n.moveTo(...r[8]),n.arc(i,a,c,o,s),n.arc(i,a,c,s,o,!0),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.arc(i,a,t,o,s),n.arc(i,a,t,s,o,!0)):(n.moveTo(...r[0]),n.lineTo(...r[1]),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.lineTo(...r[5]),n.lineTo(...r[6]),n.lineTo(...r[7]),n.closePath(),n.moveTo(...r[8]),n.lineTo(...r[9]),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.lineTo(...r[13])),n);return at(new z).call(L,e).style("d",g.toString()).style("stroke",f).style("fill",d||h).style("transform",p).call(L,m).node()}};Qk.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Jk=t=>{const m=nt(t,[]);return(t,e,n,r)=>{var i,a,o,s,l,c,u,{mark:e,shape:h,defaultShape:f,color:d,transform:p}=e,r=dy(r,e,h,f),{defaultColor:e,fill:h=e,stroke:f=e}=r,e=nt(r,["defaultColor","fill","stroke"]),g=(r=t,t=n,n=4,u=rb(),gp(t)?([i,a]=t=t.getCenter(),o=ry(t,r[3]),s=ry(t,r[8]),g=ry(t,r[10]),l=(t=iy(ey(r[2],t)))-(c=Math.asin(n/s)),t+=c,u.moveTo(...r[2]),u.lineTo(...r[3]),u.moveTo(Math.cos(l)*o+i,Math.sin(l)*o+a),u.arc(i,a,o,l,t),u.lineTo(Math.cos(t)*g+i,Math.sin(t)*g+a),u.arc(i,a,g,t,l,!0),u.lineTo(Math.cos(l)*o+i,Math.sin(l)*o+a),u.closePath(),u.moveTo(...r[10]),u.lineTo(...r[11]),c=(l+t)/2,u.moveTo(Math.cos(c)*(s+n/2)+i,Math.sin(c)*(s+n/2)+a),u.arc(Math.cos(c)*s+i,Math.sin(c)*s+a,n/2,c,2*Math.PI+c)):(u.moveTo(...r[2]),u.lineTo(...r[3]),u.lineTo(r[3][0]-n,r[3][1]),u.lineTo(r[10][0]-n,r[10][1]),u.lineTo(r[10][0]+n,r[10][1]),u.lineTo(r[3][0]+n,r[3][1]),u.lineTo(...r[3]),u.closePath(),u.moveTo(...r[10]),u.lineTo(...r[11]),u.moveTo(r[3][0]+n/2,r[8][1]),u.arc(r[3][0],r[8][1],n/2,0,2*Math.PI)),u.closePath(),u);return at(new z).call(L,e).style("d",g.toString()).style("stroke",f).style("fill",d||h).style("transform",p).call(L,m).node()}};Jk.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const tE=t=>{const{arrow:c,arrowSize:u=4}=t,h=nt(t,["arrow","arrowSize"]);return(t,e,n,r)=>{var i,a,{mark:o,shape:s,defaultShape:l}=e,r=dy(r,o,s,l),{defaultColor:o,lineWidth:s}=r,l=nt(r,["defaultColor","lineWidth"]),{color:r=o,size:o=s}=e,s=c?(s=u,i=Object.assign({fill:h.stroke||r,stroke:h.stroke||r},it(h,"arrow")),new z({style:Object.assign({path:`M ${s},${s} L -${s},0 L ${s},-${s} L 0,0 Z`,anchor:"0.5 0.5",transformOrigin:"center"},i)})):null,t=(i=t,gp(t=n)?(t=t.getCenter(),hb()({startAngle:0,endAngle:2*Math.PI,outerRadius:ry(i[0],t),innerRadius:ry(i[1],t)})):vb().x(t=>t[0]).y(t=>t[1])(i)),n=(n=n,e=e.transform,gp(n)?([n,a]=n.getCenter(),`translate(${n}, ${a}) `+(e||"")):e);return at(new z({})).call(L,l).style("d",t).style("stroke",r).style("lineWidth",o).style("transform",n).style("markerEnd",s).call(L,h).node()}};function eE(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}tE.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const nE=qb(t=>{var e=t.attributes,{points:n,endMarker:r=!0}=e,e=nt(e,["points","class","endMarker","direction"]),i=it(e,"endMarker"),n=(n=n,vb().x(t=>t[0]).y(t=>t[1])(n));at(t).maybeAppend("connector","path").style("path",n).style("markerEnd",r?new N2({className:"marker",style:Object.assign(Object.assign({},i),{symbol:eE})}):null).call(L,e)});const rE=t=>{const{offset:s=0,connectLength1:l}=t,c=nt(t,["offset","connectLength1"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=dy(r,i,a,o),{defaultColor:i,connectLength1:a=l}=r,o=nt(r,["defaultColor","connectLength1"]),{color:r,transform:e}=e,n=function(t,e,n,r=0){var[[e,i],[a,o]]=e;if(pp(t)){const l=n;var t=e+l,s=t+r;return[[t,i],[s,i],[s,o],[a+l,o]]}const l=-n;return t=i+l,[[e,t],[e,s=t+-r],[a,s],[a,o+l]]}(n,t,s,a);return at(new nE).call(L,o).style("points",n).style("stroke",r||i).style("transform",e).call(L,c).node()}};function iE(t){return t.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})}function aE(t,e,a,n){var r=a["bounds"];const[[o,s],[i,l]]=r,c=i-o,u=l-s;r=t=>{var{x:e,y:n}=t,r=f0(a.x,c),i=f0(a.y,u);return Object.assign(Object.assign({},t),{x:(r||e)+o,y:(i||n)+s})};return r("left"===t?{x:0,y:u/2,textAnchor:"start",textBaseline:"middle"}:"right"===t?{x:c,y:u/2,textAnchor:"end",textBaseline:"middle"}:"top"===t?{x:c/2,y:0,textAnchor:"center",textBaseline:"top"}:"bottom"===t?{x:c/2,y:u,textAnchor:"center",textBaseline:"bottom"}:"top-left"===t?{x:0,y:0,textAnchor:"start",textBaseline:"top"}:"top-right"===t?{x:c,y:0,textAnchor:"end",textBaseline:"top"}:"bottom-left"===t?{x:0,y:u,textAnchor:"start",textBaseline:"bottom"}:"bottom-right"===t?{x:c,y:u,textAnchor:"end",textBaseline:"bottom"}:{x:c/2,y:u/2,textAnchor:"center",textBaseline:"middle"})}function oE(r,i,t,e){var{y:t,y1:n,autoRotate:a,rotateToAlignArc:o}=t;const s=e.getCenter(),{innerRadius:l,outerRadius:c,startAngle:u,endAngle:h}=fy(e,i,[t,n]),f="inside"===r?(u+h)/2:h;e=lE(f,a,o),t=(()=>{var[t,e]=i,n=l+.5*(c-l),[n,t]="inside"===r?sE(s,f,n):ly(t,e);return{x:n,y:t}})();return Object.assign(Object.assign({},t),{textAlign:"inside"===r?"center":"start",textBaseline:"middle",rotate:e})}function sE(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function lE(t,e,n){return e?(e=n?0:Math.sin(t)<0?90:-90,t/Math.PI*180+e):0}function cE(t,e,n,r){var{y:n,y1:i,autoRotate:a,rotateToAlignArc:o,radius:s=.5,offset:l=0}=n,e=fy(r,e,[n,i]),{startAngle:n,endAngle:i}=e,r=r.getCenter(),n=(n+i)/2,i={textAlign:"center",textBaseline:"middle",rotate:lE(n,a,o)},{innerRadius:a,outerRadius:o}=e,[e,r]=sE(r,n,a+(o-a)*s+l);return Object.assign({x:e,y:r},i)}function uE(t,e,n){var n=n["bounds"],[n]=n;return{x:n[0],y:n[1]}}function hE(t,e,n,r){var i=n["bounds"];return 1===i.length?uE(0,0,n):(mp(r)?oE:xp(r)?cE:aE)(t,e,n,r)}function fE(t,e,n){var{innerRadius:n,outerRadius:t}=fy(n,t,[e.y,e.y1]);return n+(t-n)}function dE(t,e,n){var{startAngle:n,endAngle:t}=fy(n,t,[e.y,e.y1]);return(n+t)/2}function pE(t,e,n,r){var{autoRotate:i,rotateToAlignArc:a,offset:o=0,connector:s=!0,connectorLength:l=o,connectorLength2:c=0,connectorDistance:u=0}=n,h=r.getCenter(),f=dE(e,n,r),d=0<Math.sin(f)?1:-1,i=lE(f,i,a),a={textAlign:0<d||mp(r)?"start":"end",textBaseline:"middle",rotate:i},i=fE(e,n,r),[[e,n],[r,h],[f,i]]=function(t,e,n,r,i){var[n,a]=sE(t,e,n),[t,r]=sE(t,e,r);return[[n,a],[t,r],[t+(0<Math.sin(e)?1:-1)*i,r]]}(h,f,i,i+(s?l:o),s?c:0),l=s?+u*d:0,o=f+l,c={connector:s,connectorPoints:[[r-o,h-i],[f-o,i-i]]};return Object.assign(Object.assign({x0:e,y0:n,x:f+l,y:i},a),c)}rE.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var gE=Object.freeze({__proto__:null,area:function(t,e,n,r){var i=e.length/2;const a=e.slice(0,i),o=e.slice(i);var e=np(a,(t,e)=>Math.abs(t[1]-o[e][1])),i=(l=t=>[a[t][0],(a[t][1]+o[t][1])/2])(e=Math.max(Math.min(e,i-2),1)),s=l(e-1),l=iy(ey(l(e+1),s))/Math.PI*180;return{x:i[0],y:i[1],transform:`rotate(${l})`,textAlign:"center",textBaseline:"middle"}},bottom:hE,bottomLeft:hE,bottomRight:hE,inside:hE,left:hE,outside:function(t,e,n,r){var i=n["bounds"];return 1===i.length?uE(0,0,n):(mp(r)?oE:xp(r)?pE:aE)(t,e,n,r)},right:hE,spider:function(t,e,n,r){var i,a,o,s,l,c;return xp(r)?({connectorLength:c,connectorLength2:i,connectorDistance:a}=n,o=nt(pE(0,e,n,r),[]),s=r.getCenter(),l=fE(e,n,r),e=dE(e,n,r),n=l+c+i,r=0<Math.sin(e)?1:-1,l=o["x"],c=s[0]+(n+ +a)*r-l,o.x+=c,o.connectorPoints[0][0]-=c,o):{}},surround:function(t,e,n,r){var i,a,o,s,l;return xp(r)?({connectorLength:o,connectorLength2:i,connectorDistance:a}=n,{x0:n,y0:s}=e=nt(pE(0,e,n,r),[]),l=r.getCenter(),r=function(t){if(xp(t)){var[e,n]=t.getSize(),t=t.getOptions().transformations.find(t=>"polar"===t[0]);if(t)return Math.max(e,n)/2*t[4]}return 0}(r)+o,o=ay([n-l[0],s-l[1]]),n=0<Math.sin(o)?1:-1,[s,l]=sE(l,o,r),e.x=s+(i+a)*n,e.y=l,e):{}},top:hE,topLeft:hE,topRight:hE});function mE(t,e,n,r,i){var a=e["position"],a=(o=n,void 0!==(a=a)?a:xp(o)?"inside":pp(o)?"right":"top"),o=r["inside"===a?"innerLabel":"label"],r=Object.assign({},o,e),e=gE[iE(a)];if(e)return Object.assign(Object.assign({},o),e(a,t,r,n,i));throw new Error("Unknown position: "+a)}const vE=l=>(t,e,n,r)=>{var{text:i,transform:a="",transformOrigin:o}=e,s=nt(e,["text","x","y","transform","transformOrigin"]),t=mE(t,e,n,r,l),{rotate:e=0,transform:r=""}=t,t=nt(t,["rotate","transform"]);return at(new jk).call(L,t).style("text",""+i).style("labelTransform",(r+` rotate(${+e}) `+a).trim()).style("labelTransformOrigin",o).style("coordCenter",n.getCenter()).call(L,s).node()},yE=(vE.props={defaultMarker:"point"},t=>{const s=t["colorAttribute"],l=nt(t,["arrow","colorAttribute"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=nt(dy(r,i,a,o),["stroke"]),{d:i,color:a}=e,[o,e]=n.getSize();return at(new z).call(L,r).style("d","function"==typeof i?i({width:o,height:e}):i).style(s,a).call(L,l).node()}}),bE=(yE.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>yE(Object.assign({colorAttribute:"fill"},t))),xE=(bE.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>yE(Object.assign({fill:"none",colorAttribute:"stroke"},t))),wE=(xE.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const c=nt(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o,transform:s}=e,r=dy(r,i,a,o),i=r["defaultColor"],a=nt(r,["defaultColor"]),{color:o=i}=e,[r,...e]=t;const l=rb();return l.moveTo(...r),e.forEach(([t,e])=>{l.lineTo(t,e)}),l.closePath(),at(new z).call(L,a).style("d",l.toString()).style("stroke",o||i).style("fill",o||i).style("fillOpacity",.4).style("transform",s).call(L,c).node()}});function ME(t){var n,r,i,a=t||1;function o(t,e){++n>a&&(i=r,s(1),++n),r[t]=e}function s(t){n=0,r=Object.create(null),t||(i=Object.create(null))}return s(),{clear:s,has:function(t){return void 0!==r[t]||void 0!==i[t]},get:function(t){var e=r[t];return void 0!==e?e:void 0!==(e=i[t])?(o(t,e),e):void 0},set:function(t,e){void 0!==r[t]?r[t]=e:o(t,e)}}}function kE(t,e,n){t=t?t():document.createElement("canvas");return t.width=e,t.height=n,t}wE.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},ME(3);const EE=function(n,r,t=16){const i=ME(t);return(...t)=>{var e=r(...t);i.get(e);return i.has(e)?i.get(e):(t=n(...t),i.set(e,t),t)}}((t,e,n)=>{var n=kE(n,2*t,2*t),r=n.getContext("2d"),i=t,a=t;return 1===e?(r.beginPath(),r.arc(i,a,t,0,2*Math.PI,!1),r.fillStyle="rgba(0,0,0,1)",r.fill()):((e=r.createRadialGradient(i,a,t*e,i,a,t)).addColorStop(0,"rgba(0,0,0,1)"),e.addColorStop(1,"rgba(0,0,0,0)"),r.fillStyle=e,r.fillRect(0,0,2*t,2*t)),n},t=>""+t);function OE(t,e,n,r,i,a,o){a=Object.assign({blur:.85,minOpacity:0,opacity:.6,maxOpacity:1,gradient:[[.25,"rgb(0,0,255)"],[.55,"rgb(0,255,0)"],[.85,"yellow"],[1,"rgb(255,0,0)"]]},a);a.minOpacity*=255,a.opacity*=255,a.maxOpacity*=255;var s=kE(o,t,e).getContext("2d"),l=function(t,e){const n=(e=kE(e,256,1).getContext("2d")).createLinearGradient(0,0,256,1);return("string"==typeof(t=t)?t.split(" ").map(t=>{var[t,e]=t.split(":");return[+t,e]}):t).forEach(([t,e])=>{n.addColorStop(t,e)}),e.fillStyle=n,e.fillRect(0,0,256,1),e.getImageData(0,0,256,1).data}(a.gradient,o);s.clearRect(0,0,t,e);{var c=s,u=n,h=r,f=i,d=o,p=(n=a)["blur"];let t=f.length;for(;t--;){var{x:g,y:m,value:v,radius:y}=f[t],v=Math.min(v,h),g=g-y,m=m-y,y=EE(y,1-p,d);c.globalAlpha=Math.max((v-u)/(h-u),.001),c.drawImage(y,g,m)}}r=function(t,e,n,r,i){var{minOpacity:a,opacity:o,maxOpacity:s,useGradientOpacity:l}=i,c=(i=t.getImageData(0,0,e,n)).data,u=c.length;for(let t=3;t<u;t+=4){var h=c[t],f=4*h;f&&(h=o||Math.max(0,Math.min(s,Math.max(a,h))),c[t-3]=r[f],c[t-2]=r[1+f],c[t-1]=r[2+f],c[t]=l?r[3+f]:h)}return i}(s,t,e,l,a),i=kE(o,t,e).getContext("2d");return i.putImageData(r,0,0),i}const SE=t=>{const{gradient:f,opacity:d,maxOpacity:p,minOpacity:g,blur:m,useGradientOpacity:v}=t,y=nt(t,["gradient","opacity","maxOpacity","minOpacity","blur","useGradientOpacity"]);return(t,e,n,r,i,a)=>{var o,s,{mark:e,shape:l,defaultShape:c,transform:u}=e,r=nt(dy(r,e,l,c),[]),e=a["createCanvas"],[l,c]=n.getSize(),a=t.map(t=>({x:t[0],y:t[1],value:t[2],radius:t[3]})),n=rp(t,t=>t[2]),t=ep(t,t=>t[2]),h={gradient:f,opacity:d,minOpacity:g,maxOpacity:p,blur:m,useGradientOpacity:v},n=l&&c?OE(l,c,n,t,a,(o=h,s=t=>void 0===t,Object.assign({},o),Object.keys(o).reduce((t,e)=>{var n=o[e];return s(n,e)||(t[e]=n),t},{})),e):{canvas:null};return at(new Ys).call(L,r).style("x",0).style("y",0).style("width",l).style("height",c).style("src",n.canvas).style("transform",u).call(L,y).node()}},_E=(SE.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const a=t["render"],o=nt(t,["render"]);return(t,e,n,r)=>{var[[t,i]]=t;return a(Object.assign(Object.assign({},o),{x:t,y:i}))}}),AE=(_E.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},{BLACK:"#000",WHITE:"#fff",STROKE:"#416180"}),TE=t=>{var e={defaultColor:"#5B8FF9",defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:AE.BLACK,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},viewFill:"transparent",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:AE.BLACK,lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,strokeWidth:0,connectorStroke:AE.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:AE.STROKE,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:AE.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:AE.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:AE.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:AE.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:AE.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:AE.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:AE.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:AE.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{arrow:!1,gridLineDash:[0,0],gridLineWidth:.5,gridStroke:AE.BLACK,gridStrokeOpacity:.05,labelAlign:"horizontal",labelFill:AE.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,line:!1,lineLineWidth:.5,lineStroke:AE.BLACK,lineStrokeOpacity:.45,tickLength:4,tickLineWidth:1,tickStroke:AE.BLACK,tickStrokeOpacity:.25,titleFill:AE.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,titleTransformOrigin:"center"},axisTop:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle"},axisBottom:{gridDirection:"negative",labelDirection:"positive",labelSpacing:4,labelAutoRotate:!0,tickDirection:"positive",titlePosition:"bottom",titleSpacing:10,titleTextBaseline:"bottom"},axisLeft:{gridDirection:"negative",labelAutoRotate:!1,labelDirection:"positive",labelSpacing:4,tickDirection:"positive",titlePosition:"left",titleSpacing:10,titleTextBaseline:"middle",titleTransform:"translate(50%, 0) rotate(-90)",titleTransformOrigin:"center"},axisRight:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,labelAutoRotate:!1,tickDirection:"negative",titlePosition:"right",titleSpacing:0,titleTextBaseline:"top",titleTransform:"translate(-50%, 0) rotate(-90)",titleTransformOrigin:"center"},axisLinear:{girdClosed:!0,gridConnect:"arc",gridDirection:"negative",gridType:"surround",titlePosition:"top",titleSpacing:0},axisRadar:{girdClosed:!0,gridStrokeOpacity:.3,gridType:"surround",label:!1,tick:!1,titlePosition:"start"},legend:{backgroundFill:"transparent",itemBackgroundFill:"transparent",itemLabelFill:AE.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemValueFill:AE.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",navButtonFill:AE.BLACK,navButtonFillOpacity:.65,navPageNumFill:AE.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,padding:8,title:!1,titleFill:AE.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4},continuousLegend:{handleHeight:12,handleLabelFill:AE.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal",handleMarkerFill:AE.BLACK,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:AE.BLACK,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:AE.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal",labelSpacing:8,tick:!0},label:{fill:AE.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:AE.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:AE.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},slider:{trackSize:16,trackFill:AE.STROKE,trackFillOpacity:1,selectionFill:"#5B8FF9",selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:AE.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:AE.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{padding:[2,2,2,2],trackSize:10,isRound:!0,slidable:!0,scrollable:!0,trackFill:"#e5e5e5",trackFillOpacity:0,thumbFill:"#000",thumbFillOpacity:.15,thumbHighlightedFillOpacity:.2},title:{titleFill:AE.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:AE.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)},PE=(TE.props={},{BLACK:"#fff",WHITE:"#000",STROKE:"#416180"}),LE=t=>{var e={defaultColor:"#5B8FF9",defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:PE.BLACK,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},viewFill:"#141414",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:PE.BLACK,lineWidth:1}},text:{text:{fill:PE.BLACK,fillOpacity:.65,fontSize:12,strokeWidth:0,connectorStroke:PE.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:PE.STROKE,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:PE.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:PE.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:PE.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:PE.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:PE.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:PE.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:PE.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:PE.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{arrow:!1,gridLineDash:[0,0],gridLineWidth:.5,gridStroke:PE.BLACK,gridStrokeOpacity:.05,labelAlign:"horizontal",labelFill:PE.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,lineLineWidth:.5,lineStroke:PE.BLACK,lineStrokeOpacity:.45,tickLength:4,tickLineWidth:1,tickStroke:PE.BLACK,tickStrokeOpacity:.25,titleFill:PE.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,titleTransformOrigin:"center"},axisTop:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle"},axisBottom:{gridDirection:"negative",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",titlePosition:"bottom",titleSpacing:10,titleTextBaseline:"bottom"},axisLeft:{gridDirection:"negative",labelAutoRotate:!1,labelDirection:"positive",labelSpacing:4,tickDirection:"positive",titlePosition:"left",titleSpacing:10,titleTextBaseline:"middle",titleTransform:"translate(50%, 0) rotate(-90)",titleTransformOrigin:"center"},axisRight:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"right",titleSpacing:0,titleTextBaseline:"top",titleTransform:"translate(-50%, 0) rotate(-90)",titleTransformOrigin:"center"},axisLinear:{girdClosed:!0,gridConnect:"arc",gridDirection:"negative",gridType:"surround",titlePosition:"top",titleTextBaseline:"bottom"},axisRadar:{girdClosed:!0,gridStrokeOpacity:.3,gridType:"surround",label:!1,tick:!1,titlePosition:"start"},legend:{backgroundFill:"transparent",itemBackgroundFill:"transparent",itemLabelFill:PE.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemValueFill:PE.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",navButtonFill:PE.BLACK,navButtonFillOpacity:.45,navPageNumFill:PE.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,padding:8,title:!1,titleFill:PE.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4},continuousLegend:{handleHeight:12,handleLabelFill:PE.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal",handleMarkerFill:PE.BLACK,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:PE.BLACK,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:PE.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal"},label:{fill:PE.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:PE.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:PE.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},slider:{trackSize:16,trackFill:PE.STROKE,trackFillOpacity:1,selectionFill:"#5B8FF9",selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:PE.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:PE.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{},title:{titleFill:PE.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:PE.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)},CE=(LE.props={},{BLACK:"#000",WHITE:"#fff",STROKE:"#888"}),NE=t=>{var e={defaultColor:"#4e79a7",defaultCategory10:"tableau10",defaultCategory20:"tableau10",defaultSize:1,elementActiveStroke:CE.BLACK,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},viewFill:"transparent",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1,connectStroke:"#aaa"}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0,connectFill:CE.BLACK,connectFillOpacity:.1}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:"#1D2129",lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:10,strokeWidth:0,connectorStroke:CE.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:CE.STROKE,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:CE.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:CE.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:CE.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:CE.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:CE.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:CE.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:CE.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:CE.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{arrow:!1,gridLineDash:[0,0],gridLineWidth:1,gridStroke:"#ddd",gridStrokeOpacity:1,labelAlign:"horizontal",labelAutoRotate:!1,labelFill:CE.BLACK,labelFillOpacity:1,labelFontSize:10,labelFontWeight:"normal",labelSpacing:4,line:!0,lineLineWidth:1,lineStroke:"#888",lineStrokeOpacity:1,tickLength:5,tickLineWidth:1,tickStroke:CE.STROKE,tickStrokeOpacity:1,titleFill:CE.BLACK,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold",titleSpacing:12,titleTransformOrigin:"center"},axisTop:{gridDirection:"positive",labelDirection:"negative",tickDirection:"negative",titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle",labelSpacing:4},axisBottom:{gridDirection:"negative",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",titlePosition:"bottom",titleSpacing:4,titleTextBaseline:"bottom"},axisLeft:{gridDirection:"negative",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",titlePosition:"left",titleSpacing:4,titleTextBaseline:"middle",titleTransform:"translate(50%, 0) rotate(-90) translate(0, -50%)",titleTransformOrigin:"center"},axisRight:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"right",titleSpacing:0,titleTextBaseline:"top",titleTransform:"translate(-50%, 0) rotate(-90)",titleTransformOrigin:"center"},axisLinear:{girdClosed:!0,gridConnect:"arc",gridDirection:"negative",gridType:"surround",titlePosition:"top",titleTextBaseline:"bottom"},axisRadar:{girdClosed:!0,gridStrokeOpacity:.3,gridType:"surround",label:!1,tick:!1,titlePosition:"start"},legend:{backgroundFill:"transparent",itemBackgroundFill:"transparent",itemLabelFill:CE.BLACK,itemLabelFillOpacity:1,itemLabelFontSize:10,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,4],itemValueFill:CE.BLACK,itemValueFillOpacity:1,itemValueFontSize:10,itemValueFontWeight:"normal",navButtonFill:CE.BLACK,navButtonFillOpacity:.45,navButtonSize:6,navPageNumFill:CE.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:10,padding:8,title:!1,titleFill:CE.BLACK,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold",titleSpacing:4},continuousLegend:{handleHeight:12,handleLabelFill:CE.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:10,handleLabelFontWeight:"normal",handleMarkerFill:CE.BLACK,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:CE.BLACK,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:CE.BLACK,labelFillOpacity:.45,labelFontSize:10,labelFontWeight:"normal",title:!1},label:{fill:CE.BLACK,fillOpacity:.65,fontSize:10,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:CE.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:CE.WHITE,fontSize:10,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},slider:{trackSize:16,trackFill:CE.STROKE,trackFillOpacity:.05,selectionFill:"#4e79a7",selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:CE.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:CE.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:10,handleLabelFontWeight:"normal"},scrollbar:{},title:{titleFill:CE.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:CE.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)};function jE(t,e){var n;return(e=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0?null:[1<(n=t.slice(0,e)).length?n[0]+n.slice(2):n,+t.slice(e+1)]}NE.props={};var RE,IE=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function BE(t){var e;if(e=IE.exec(t))return new DE({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]});throw new Error("invalid format: "+t)}function DE(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function FE(t,e){var n,e=jE(t,e);return e?(n=e[0],(e=e[1])<0?"0."+new Array(-e).join("0")+n:n.length>e+1?n.slice(0,e+1)+"."+n.slice(e+1):n+new Array(e-n.length+2).join("0")):t+""}BE.prototype=DE.prototype,DE.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var zE={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return 1e21<=Math.abs(t=Math.round(t))?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>FE(100*t,e),r:FE,s:function(t,e){var n,r,i=jE(t,e);return i?(n=i[0],(i=(i=i[1])-(RE=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1)===(r=n.length)?n:r<i?n+new Array(i-r+1).join("0"):0<i?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+jE(t,Math.max(0,e+i-1))[0]):t+""},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function GE(t){return t}var WE,YE=Array.prototype.map,HE=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function VE(t){var e,s,l,M=void 0===t.grouping||void 0===t.thousands?GE:(s=YE.call(t.grouping,Number),l=t.thousands+"",function(t,e){for(var n=t.length,r=[],i=0,a=s[0],o=0;0<n&&0<a&&(e<o+a+1&&(a=Math.max(1,e-o)),r.push(t.substring(n-=a,n+a)),!((o+=a+1)>e));)a=s[i=(i+1)%s.length];return r.reverse().join(l)}),r=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",k=void 0===t.decimal?".":t.decimal+"",E=void 0===t.numerals?GE:(e=YE.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}),a=void 0===t.percent?"%":t.percent+"",O=void 0===t.minus?"−":t.minus+"",S=void 0===t.nan?"NaN":t.nan+"";function o(t){var c=(t=BE(t)).fill,u=t.align,h=t.sign,e=t.symbol,f=t.zero,d=t.width,p=t.comma,g=t.precision,m=t.trim,v=t.type,y=("n"===v?(p=!0,v="g"):zE[v]||(void 0===g&&(g=12),m=!0,v="g"),(f||"0"===c&&"="===u)&&(f=!0,c="0",u="="),"$"===e?r:"#"===e&&/[boxX]/.test(v)?"0"+v.toLowerCase():""),b="$"===e?i:/[%p]/.test(v)?a:"",x=zE[v],w=/[defgprs%]/.test(v);function n(t){var e,n,r,i=y,a=b;if("c"===v)a=x(t)+a,t="";else{var o=(t=+t)<0||1/t<0;if(t=isNaN(t)?S:x(Math.abs(t),g),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;0<i&&(i=0)}return 0<i?t.slice(0,i)+t.slice(e+1):t}(t)),i=((o=o&&0==+t&&"+"!==h?!1:o)?"("===h?h:O:"-"===h||"("===h?"":h)+i,a=("s"===v?HE[8+RE/3]:"")+a+(o&&"("===h?")":""),w)for(e=-1,n=t.length;++e<n;)if((r=t.charCodeAt(e))<48||57<r){a=(46===r?k+t.slice(e+1):t.slice(e))+a,t=t.slice(0,e);break}}p&&!f&&(t=M(t,1/0));var s=i.length+t.length+a.length,l=s<d?new Array(d-s+1).join(c):"";switch(p&&f&&(t=M(l+t,l.length?d-a.length:1/0),l=""),u){case"<":t=i+t+a+l;break;case"=":t=i+l+t+a;break;case"^":t=l.slice(0,s=l.length>>1)+i+t+a+l.slice(s);break;default:t=l+i+t+a}return E(t)}return g=void 0===g?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),n.toString=function(){return t+""},n}return{format:o,formatPrefix:function(t,e){var n=o(((t=BE(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor((t=e,((t=jE(Math.abs(t)))?t[1]:NaN)/3)))),r=Math.pow(10,-e),i=HE[8+e/3];return function(t){return n(r*t)+i}}}}function qE(t,e,n){return t.querySelector(e)?at(t).select(e):at(t).append(n)}function $E(t){return Array.isArray(t)?t.join(", "):""+(t||"")}function UE(t,e){var n={display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"};if(e)return Object.assign(Object.assign({},n),e);let{flexDirection:r,justifyContent:i,alignItems:a}=n;e={top:["row","flex-start","center"],bottom:["row","flex-start","center"],left:["colunm","center","center"],right:["colunm","center","center"],center:["column","center","center"]};return t in e&&([r,i,a]=e[t]),{display:"flex",flexDirection:r,justifyContent:i,alignItems:a}}bs=VE({thousands:",",grouping:[3],currency:["$",""]}),WE=bs.format,bs.formatPrefix;class XE extends cl{get child(){var t;return null==(t=this.children)?void 0:t[0]}update(t){var e,t=(this.attr(t),t)["subOptions"];null!=(e=this.child)&&e.update(t)}}class KE extends XE{update(t){var e,t=t["subOptions"];null!=(e=this.child)&&e.update(t)}}function ZE(t,e){return null==(t=t.filter(t=>t.getOptions().name===e))?void 0:t[0]}function QE(t,e,n){var t=t["bbox"],{position:e="top",size:r,length:i}=e,e=["top","bottom","center"].includes(e),[t,a]=e?[t.height,t.width]:[t.width,t.height],{defaultSize:n,defaultLength:o}=n.props,r=r||n||t,n=i||o||a,[t,i]=e?[n,r]:[r,n];return{orientation:e?"horizontal":"vertical",width:t,height:i,size:r,length:n}}function JE(t){const n=["arrow","crosshairs","grid","handle","handleLabel","indicator","label","line","tick","tip","title","trunc"];var e=t["style"],t=nt(t,["style"]);const r={};return Object.entries(t).forEach(([t,e])=>{n.includes(t)?r["show"+en(t)]=e:r[t]=e}),Object.assign(Object.assign({},r),e)}function tO(t){var{innerWidth:t,innerHeight:e}=t.getOptions();return[t,e]}function eO(t){return"number"!=typeof t||Math.abs(t)<1e-15?t:parseFloat(t.toFixed(15))}function nO(a,t,e,n,r,i,o,s){void 0===e&&void 0===i||a.update(Object.assign(Object.assign({},e&&{tickCount:e}),i&&{tickMethod:i})),e=t,t=i;var l,t=(i=a).getTicks?i.getTicks():t?([c,l]=jd(e,t=>+t),i=i.getOptions()["tickCount"],t(c,l,i)):e,c=r?t.filter(r):t;const u=t=>!(t instanceof Date)&&"object"==typeof t&&t?t:String(t),h=n||(null==(l=a.getFormatter)?void 0:l.call(a))||u,f=function(t,e){var{innerWidth:e,innerHeight:n,insetTop:r,insetBottom:i,insetLeft:a,insetRight:o}=e.getOptions(),[t,r,i]="left"===t||"right"===t?[r,i,n]:[a,o,e];const s=new k1({domain:[0,1],range:[t/i,1-r/i]});return t=>s.map(t)}(o,s),d=function(r,i){const{width:a,height:o}=i.getOptions();return t=>{var e,n;return bp(i)?(e=i.map("bottom"===r?[t,1]:[0,t]),"bottom"===r?(n=e[0],new k1({domain:[0,a],range:[0,1]}).map(n)):"left"===r?(n=e[1],new k1({domain:[0,o],range:[0,1]}).map(n)):t):t}}(o,s);return gp(s)||pp(s)?c.map((t,e,n)=>{var r,i=(null==(i=a.getBandWidth)?void 0:i.call(a,t))/2||0,i=f(a.map(t)+i);return{value:mp(s)&&"center"===o||pp(s)&&(null==(r=a.getTicks)?void 0:r.call(a))&&["top","bottom","center","outer"].includes(o)?1-i:i,label:u(h(eO(t),e,n)),id:String(e)}}):c.map((t,e,n)=>{var r=(null==(r=a.getBandWidth)?void 0:r.call(a,t))/2||0;return{value:d(f(a.map(t)+r)),label:u(h(eO(t),e,n)),id:String(e)}})}function rO(t,e,n){var r;return!(gp(r=e)&&pp(r)||yp(e))&&(void 0===t?!!n.getTicks:t)}function iO(t,e,n,r,i,a){n=function(t,e){var n=t.axis;let r=t.axisLinear;return["top","right","bottom","left"].includes(e)&&(r=t["axis"+o0(e)]),Object.assign({},n,r)}(n,i);return"center"===i?Object.assign(Object.assign(Object.assign(Object.assign({},n),{labelDirection:"right"===r?"negative":"positive"}),"center"===r?{labelTransform:"translate(50%,0)"}:null),{tickDirection:"right"===r?"negative":"positive",labelSpacing:"center"===r?0:4,titleSpacing:"vertical"===(i=a)||i===-Math.PI/2?10:0,tick:"center"!==r&&void 0}):n}var aO,us=s=>i=>{const{labelFormatter:a,labelFilter:o=()=>!0}=i;return t=>{var[e]=t["scales"];const r=(null==(n=e.getTicks)?void 0:n.call(e))||e.getOptions().domain;var n="string"==typeof a?WE(a):a,n=Object.assign(Object.assign({},i),{labelFormatter:n,labelFilter:(t,e,n)=>o(r[e],e,r),scale:e});return s(n)(t)}};const oO=us(t=>{const{direction:o="left",important:s={},labelFormatter:l,orientation:c,position:u,size:h,style:f={},title:d,tickCount:p,tickFilter:g,tickMethod:m,transform:v,indexBBox:y}=t,b=nt(t,["direction","important","labelFormatter","order","orientation","position","size","style","title","tickCount","tickFilter","tickMethod","transform","indexBBox"]);return({scales:[t],value:e,coordinate:n,theme:r})=>{var e=e["bbox"],i=t.getOptions()["domain"],r=iO(0,0,r,o,u,c),r=Object.assign(Object.assign(Object.assign({},r),f),b),a=function(t,e){var[e,n]=tO(e);return t.includes("bottom")||t.includes("top")?n:e}(u,n),e=function(t,e,n,r){var{x:n,y:i,width:a,height:o}=n;if("bottom"===t)return{startPos:[n,i],endPos:[n+a,i]};if("left"===t)return{startPos:[n+a,i],endPos:[n+a,i+o]};if("right"===t)return{endPos:[n,i+o],startPos:[n,i]};if("top"===t)return{startPos:[n,i+o],endPos:[n+a,i+o]};if("center"===t){if("vertical"===e)return{startPos:[n+a,i],endPos:[n+a,i+o]};if("horizontal"===e)return{startPos:[n,i+o],endPos:[n+a,i+o]};if("number"==typeof e){var[t,s]=r.getCenter(),[l,c]=wp(r);const[u,h]=Mp(r);var r=Math.min(a,o)/2,a=l*r,o=c*r,[l,c]=[t+n,s+i],[r,e]=[Math.cos(e),Math.sin(e)];return{startPos:[l+o*r,c+o*e],endPos:[l+a*r,c+a*e],gridClosed:h-u==360,gridCenter:[t+n,i+s],gridControlAngles:new Array(3).fill(0).map((t,e,n)=>(h-u)/(n.length-1)*e)}}}return{}}(u,c,e,n),i=nO(t,i,p,l,g,m,u,n),i=y?i.map((t,e)=>{e=y.get(e);return!e||e[0]!==t.label?t:Object.assign(Object.assign({},t),{bbox:e[1]})}):i,i=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},r),{type:"linear",data:i,crossSize:h,titleText:$E(d),labelOverlap:function(t=[],e){if(0<t.length)return t;var{labelAutoRotate:t,labelAutoHide:e,labelAutoEllipsis:n,labelAutoWrap:r}=e;const i=[];var a=(t,e)=>{e&&i.push(t)};return a({type:"rotate",optionalAngles:[0,15,30,45,60,90]},t),a({type:"ellipsis",minLength:20},n),a({type:"hide"},e),a({type:"wrap",wordWrapWidth:100,maxLines:3,recoveryWhenFail:!0},r),i}(v,r),grid:rO(r.grid,n,t),gridLength:a,line:!0,indexBBox:y}),r.line?null:{lineOpacity:0}),e),s);return i.labelOverlap.find(t=>"hide"===t.type)&&(i.crossSize=!1),new PM({className:"axis",style:JE(i)})}}),sO=us(t=>{const{position:o,labelFormatter:s,tickFilter:l,tickCount:c,tickMethod:u,important:h={},style:e={}}=t,f=nt(t,["order","size","position","orientation","labelFormatter","tickFilter","tickCount","tickMethod","important","style"]),{title:d,grid:p=!1}=e;return({scales:[t],value:e,coordinate:n,theme:r})=>{var e=e["bbox"],i=t.getOptions()["domain"],t=nO(t,i,c,s,l,u,o,n),[i,a]=wp(n),e=function(t,e,n,r,i){var{x:e,y:a,width:o,height:s}=e,e=[e+o/2,a+s/2],a=Math.min(o,s)/2,[o,s]=Mp(i),[l,c]=tO(i),e={center:e,radius:a,startAngle:o,endAngle:s,titleFillOpacity:0,titlePosition:"inner",line:!1,tick:!0,gridLength:(r-n)*(Math.min(l,c)/2)};return"inner"===t?(tO(i),Object.assign(Object.assign({},e),{labelAlign:"perpendicular",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",gridDirection:"negative"})):Object.assign(Object.assign({},e),{labelAlign:"parallel",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",gridDirection:"positive"})}(o,e,i,a,n),i=r["axis"];return new PM({style:JE(rt({},i,e,Object.assign(Object.assign({type:"arc",data:t,titleText:$E(d),grid:p},f),h)))})}}),lO=(oO.props={defaultPosition:"center",defaultSize:45,defaultOrder:0},sO.props={defaultPosition:"outer",defaultOrientation:"vertical",defaultSize:45,defaultOrder:0},e=>(...t)=>oO(Object.assign({},{crossPadding:50},e))(...t)),cO=(lO.props=Object.assign(Object.assign({},oO.props),{defaultPosition:"bottom"}),e=>(...t)=>oO(Object.assign({},{crossPadding:10},e))(...t));cO.props=Object.assign(Object.assign({},oO.props),{defaultPosition:"left"});const uO=a=>{const{important:o={}}=a,s=nt(a,["important"]);return t=>{var e,{theme:n,coordinate:r,value:i}=t;return oO(Object.assign(Object.assign(Object.assign({},s),(e=a.orientation,(e%=2*Math.PI)==Math.PI/2?{titleTransform:"translate(0, 50%)"}:e>-Math.PI/2&&e<Math.PI/2?{titleTransform:"translate(50%, 0)"}:e>Math.PI/2&&e<3*Math.PI/2?{titleTransform:"translate(-50%, 0)"}:{})),{important:Object.assign(Object.assign({},function(t,e,n,r){const i=t["radar"];var[{name:t}]=r["scales"];const[a,o]=Mp(n);var{axisRadar:r={}}=e;return Object.assign(Object.assign({},r),{grid:"position"===t,gridConnect:"line",gridControlAngles:new Array(i.count).fill(0).map((t,e)=>{return(o-a)/i.count*e})})}(a,n,r,i)),o)}))(t)}};function hO(t,e,n,r,i={}){const a=(null==(e=null==(e=e["shape."+t])?void 0:e.props)?void 0:e.defaultMarker)||function(t){if(De(t))return t[t.length-1]}(t.split("."));return()=>function(t,e){var{fill:n,stroke:r,lineWidth:i,color:a}=e,o=nt(e,["d","fill","strokeWidth","path","stroke","lineWidth","color"]);const s=ex.get(t)||ex.get("point");return(...t)=>{return new z({style:Object.assign(Object.assign({},o),{path:s(...t),stroke:s.style.includes("stroke")?a||r:"",fill:s.style.includes("fill")?a||n:"",lineWidth:s.style.includes("lineWidth")?i||2:0})})}}(a,i)(0,0,6)}function fO(t,{scales:e,library:n,markState:r}){var i=ZE(e,"shape");const[a,o]=function(t,e){const n=ZE(t,"shape");var r=ZE(t,"color");const i=[];for(const[l,c]of e){var a=l.type,o=(0<(null==r?void 0:r.getOptions().domain.length)?null==r?void 0:r.getOptions().domain:c.data).map((t,e)=>{return n?n.map(t||"point"):(null==(t=null===l||void 0===l?void 0:l.style)?void 0:t.shape)||c.defaultShape||"point"});"string"==typeof a&&i.push([a,o])}if(0===i.length)return["point",["point"]];if(1===i.length)return i[0];if(!n)return i[0];const s=n.getOptions()["range"];return i.map(([t,e])=>{let n=0;for(let t=0;t<i.length;t++){var r=s[t%s.length];e[t]===r&&n++}return[n/e.length,[t,e]]}).sort((t,e)=>e[0]-t[0])[0][1]}(e,r),s=t["itemMarker"];return i&&!s?(t,e)=>hO(a+"."+o[e],n,0,0,{color:t.color}):"function"==typeof s?s:(t,e)=>hO(s||a+"."+o[e],n,0,0,{color:t.color})}function dO(t,e){var{labelFormatter:n=t=>""+t}=t,r=e["scales"],e={itemMarker:fO(t,e),itemMarkerSize:(t=ZE(t=r,"size"))?2*t.map(NaN):8,itemMarkerOpacity:function(t){if(t=ZE(t,"opacity")){const n=t.getOptions()["range"];return(t,e)=>n[e]}}(r)};const i="string"==typeof n?WE(n):n,a=ZE(r,"color");t=r.find(t=>0<t.getOptions().domain.length).getOptions().domain;return Object.assign(Object.assign({},e),{data:t.map(t=>({id:t,label:i(t),color:a.map(t)}))})}uO.props=Object.assign(Object.assign({},oO.props),{defaultPosition:"center"});const pO=l=>{const{position:c,title:u}=l,h=nt(l,["labelFormatter","layout","order","orientation","position","size","title"]),{gridCol:f,gridRow:d}=h;return t=>{var{value:e,theme:n}=t,r=e["bbox"],{width:i,height:a}=function(t,e,n){var r;if("center"===(r=e["position"])){r=t["bbox"];const{width:i,height:a}=r;return{width:i,height:a}}const{width:i,height:a}=QE(t,e,n);return{width:i,height:a}}(e,l,pO),e=UE(c,null==(e=null==(e=null==(e=e.scales)?void 0:e[0])?void 0:e.guide)?void 0:e.layout),[o,s]=function(t,e,n){var[r,i]=[e||100,n||100];switch(t){case"top":case"bottom":case"top-left":case"top-right":case"bottom-left":case"bottom-right":return[1,i];case"left":case"right":return[r,1];default:return[e,n]}}(c,d,f),i=Object.assign({orientation:["right","left","center"].includes(c)?"vertical":"horizontal",width:i,height:a,gridCol:null!==f&&void 0!==f?f:s,gridRow:null!==d&&void 0!==d?d:o,rowPadding:0,colPadding:8,titleText:$E(u)},dO(l,t)),{legend:a={}}=n,s=JE(Object.assign({},a,i,h)),o=new KE({style:Object.assign(Object.assign({x:r.x,y:r.y,width:r.width,height:r.height},e),{subOptions:s})});return o.appendChild(new ek({className:"legend-category",style:s})),o}};function gO(t,e,n){var r=e["size"],t=QE(t,e,n),r=(e=r,n=xO.props.defaultLegendSize,Math.min(e,n));return e=r,r=(n=t).orientation,n.size=e,"horizontal"===(r=r)||0===r?n.height=e:n.width=e,n}function mO(t,e,n,r,i){var a,e=e.thresholds,o=(a=r,t=>({value:t/a,label:String(t)}));return Object.assign(Object.assign({},t),{color:i,data:[n,...e,r].map(o)})}function vO(t){var t=t.getOptions()["domain"],[t,e]=[t[0],Q1(t)];return[t,e]}function yO(t,e,n,r,i){const a=t["length"],o=e||(e=n||r,n=(n=i).defaultColor,i=e.getOptions(),(e=e.clone()).update(Object.assign(Object.assign({},i),{range:[$a(n).toString()]})),e);const[s,l]=vO(o);return Object.assign(Object.assign({},t),{data:o.getTicks().map(t=>({value:t})),color:new Array(a).fill(0).map((t,e)=>{var e=(l-s)/(a-1)*e+s,n=o.map(e);const i=r?r.map(e):1;return n.replace(/rgb[a]*\(([\d]{1,3}) *, *([\d]{1,3}) *, *([\d]{1,3})[\S\s]*\)/,(t,e,n,r)=>`rgba(${e}, ${n}, ${r}, ${i})`)})})}function bO(t,e,n,r,i){var a=ZE(t,"color"),e=gO(e,n,r);if(a instanceof A1){var n=a.getOptions()["range"],[r,o]=vO(a);if(a instanceof L1||a instanceof N1)return mO(e,a,r,o,n);{r=e;o=a;const s=[-1/0,...o.thresholds,1/0].map((t,e)=>({value:e,label:t}));return Object.assign(Object.assign({},r),{data:s,color:n,labelFilter:(t,e)=>0<e&&e<s.length-1})}}return yO(e,a,ZE(t,"size"),ZE(t,"opacity"),i)}pO.props={defaultPosition:"top",defaultOrder:1,defaultSize:40};const xO=c=>{const{labelFormatter:u,layout:h,position:f,title:d,style:p}=c,g=nt(c,["labelFormatter","layout","order","orientation","position","size","title","style"]);return({scales:t,value:e,theme:n})=>{var r=e["bbox"],{x:r,y:i,width:a,height:o}=r,s=UE(f,h),{continuousLegend:l={}}=n,l=JE(Object.assign({},l,Object.assign(Object.assign({titleText:$E(d),titleFontSize:12,handle:!1,indicator:!1,labelAlign:"value",labelFormatter:"string"==typeof u?t=>WE(u)(t.label):u},bO(t,e,c,xO,n)),p),g)),t=new XE({style:Object.assign(Object.assign({x:r,y:i,width:a,height:o},s),{subOptions:l})});return t.appendChild(new Mk({style:l})),t}},wO=(xO.props={defaultPosition:"top",defaultOrientation:"vertical",defaultOrder:1,defaultSize:60,defaultLength:300,defaultLegendSize:60},e=>(...t)=>xO(Object.assign({},{block:!0},e))(...t)),MO=(wO.props=Object.assign(Object.assign({},xO.props),{defaultPosition:"top",defaultOrientation:"horizontal"}),n=>t=>{var e=t["scales"],e=ZE(e,"size");return xO(Object.assign({},{type:"size",tick:!1,data:e.getOptions().domain.map((t,e)=>({value:t,label:String(t)})),labelFilter:(t,e,n)=>0===e||e===n.length-1},n))(t)}),kO=(MO.props=Object.assign(Object.assign({},xO.props),{defaultPosition:"top",defaultOrientation:"horizontal"}),t=>MO(Object.assign({},{block:!0},t)));function EO(t,e,n,r){switch(r){case"center":return{x:t+n/2,y:e,textAlign:"middle"};case"right":return{x:t+n,y:e,textAlign:"right"};default:return{x:t,y:e,textAlign:"left"}}}kO.props=Object.assign(Object.assign({},xO.props),{defaultPosition:"top",defaultOrientation:"horizontal"});aO={render(t,e){const{y:n,width:r,title:i,subtitle:a}=t,o=t.style,{spacing:s=2,align:l="left"}=o,c=nt(o,["spacing","align"]);t=it(c,"title");const u=it(c,"subtitle"),h=qE(e,".title","text").attr("className","title").call(L,Object.assign(Object.assign(Object.assign({},EO(0,n,r,l)),{fontSize:14,textBaseline:"top",text:i}),t)).node().getLocalBounds();qE(e,".sub-title","text").attr("className","sub-title").call(t=>{if(!a)return t.node().remove();t.node().attr(Object.assign(Object.assign(Object.assign({},EO(0,h.max[1]+s,r,l)),{fontSize:12,textBaseline:"top",text:a}),u))})}};const OO=class extends Rs{constructor(t){super(t),this.descriptor=aO}connectedCallback(){var t,e;null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}update(t={}){var e;this.attr(rt({},this.attributes,t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}},SO=a=>({value:t,theme:e})=>{var{x:t,y:n,width:r,height:i}=t.bbox;return new OO({style:rt({},{style:e.title},Object.assign({x:t,y:n,width:r,height:i},a))})};function _O(t){return t.getBandWidth}function AO(t,e,n){if(!_O(t))return t.invert(e);var r=t["adjustedRange"],i=t.getOptions()["domain"],a=n?-1:0;const o=t.getStep();var t=n?r:r.map(t=>t+o),n=Pd(t,e);return r=n+a,t=0,e=i.length-1,i[Math.min(e,Math.max(t,r))]}function TO(t,e,n){if(!e)return t.getOptions().domain;if(!_O(t))return o=Yd(e),n?([i]=o,r=t.getOptions()["range"],[r,a]=r,a=a<r?-1:1,[i,t.invert(t.map(i)+a*n)]):o;var r=t.getOptions()["domain"],i=e[0],a=r.indexOf(i);if(n){const s=a+Math.round(r.length*n);return r.slice(a,s)}var o=e[e.length-1];const s=r.indexOf(o);return r.slice(a,s+1)}function PO(t,e,n,r,i,a){const{x:o,y:s}=i;i=(t,e)=>{var[t,n]=a.invert(t);return[AO(o,t,e),AO(s,n,e)]},t=i([t,e],!0),e=i([n,r],!1);return[TO(o,[t[0],e[0]]),TO(s,[t[1],e[1]])]}function LO(t,e){var[t,n]=t;return[e.map(t),e.map(n)+((t=e).getStep?t.getStep():0)]}SO.props={defaultPosition:"top",defaultOrder:2,defaultSize:36};const CO=t=>{const{orientation:h,labelFormatter:f,style:d}=t,p=nt(t,["orientation","labelFormatter","size","style","position"]);return({scales:[n],value:t,theme:e,coordinate:r})=>{var t=t["bbox"],{x:t,y:i,width:a,height:o}=t,{slider:e={}}=e;const s=(null==(c=n.getFormatter)?void 0:c.call(n))||(t=>t.toString()),l="string"==typeof f?WE(f):f;var c="horizontal"===h;const u=pp(r)&&c;return new dw({className:"slider",style:Object.assign({},e,Object.assign(Object.assign({x:t,y:i,trackLength:c?a:o,orientation:h,formatter:t=>{var e=l||s,t=u?1-t:t;return e(AO(n,t,!0))}},d),p))})}},NO=(CO.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1},t=>CO(Object.assign(Object.assign({},t),{orientation:"horizontal"}))),jO=(NO.props=Object.assign(Object.assign({},CO.props),{defaultPosition:"bottom"}),t=>CO(Object.assign(Object.assign({},t),{orientation:"vertical"}))),RO=(jO.props=Object.assign(Object.assign({},CO.props),{defaultPosition:"left"}),t=>{const{orientation:s,style:l}=t,c=nt(t,["orientation","labelFormatter","style"]);return({scales:[t],value:e,theme:n})=>{var e=e["bbox"],{x:e,y:r,width:i,height:a}=e,{scrollbar:n={}}=n,{ratio:t,range:o}=t.getOptions(),i="horizontal"===s?i:a,a=i/t,[t,o]=o,t=t<o?0:1;return new mw({className:"g2-scrollbar",style:Object.assign({},n,Object.assign(Object.assign(Object.assign(Object.assign({},l),{x:e,y:r,trackLength:i}),c),{orientation:s,value:t,contentLength:a,viewportLength:i}))})}}),IO=(RO.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1},t=>RO(Object.assign(Object.assign({},t),{orientation:"horizontal"}))),BO=(IO.props=Object.assign(Object.assign({},RO.props),{defaultPosition:"bottom"}),t=>RO(Object.assign(Object.assign({},t),{orientation:"vertical"})));BO.props=Object.assign(Object.assign({},RO.props),{defaultPosition:"left"});class DO{constructor(t){this.$value=t}static of(t){return new DO(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}function FO(t,e,n){return DO.of({}).call(zO,t).call(zO,e).call(zO,n).value()}function zO(t,e){for(var[n,r]of Object.entries(e))void 0!==r&&(t[n]=e[n]);return t}function GO(t,e){var n={};for(const i of e){var r=t.style[i];r&&(n[i]=r)}return n}const WO=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"],YO=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o="",fillOpacity:s=1,strokeOpacity:l=1,opacity:c=1}=a.style,[r,t]=pp(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,FO(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},HO=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o="",fillOpacity:s=1,strokeOpacity:l=1,opacity:c=1}=a.style,[r,t]=pp(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,FO(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},VO=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o="",fillOpacity:s=1,strokeOpacity:l=1,opacity:c=1}=a.style,[r,t]=pp(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,FO(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},qO=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o="",fillOpacity:s=1,strokeOpacity:l=1,opacity:c=1}=a.style,[r,t]=pp(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,FO(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},$O=l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a=1,strokeOpacity:o=1,opacity:s=1}=t.style;return t.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:a,strokeOpacity:o,opacity:s}],FO(i,n,l))},UO=($O.props={},l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a=1,strokeOpacity:o=1,opacity:s=1}=t.style;return t.animate([{fillOpacity:a,strokeOpacity:o,opacity:s},{fillOpacity:0,strokeOpacity:0,opacity:0}],FO(i,n,l))});function XO(t){var{min:t,max:e}=t.getLocalBounds(),[t,n]=t,[e,r]=e;return[t,n,e-t,r-n]}function KO(t,e){var[n,r,i,t]=XO(t),a=Math.ceil(Math.sqrt(e/(t/i))),o=[],s=t/Math.ceil(e/a);let l=0,c=e;for(;0<c;){var u=Math.min(c,a),h=i/u;for(let t=0;t<u;t++){var f=n+t*h,d=r+l*s;o.push(function(t){var[t,e,n,r]=t;return`
  2. M ${t} ${e}
  3. L ${t+n} ${e}
  4. L ${t+n} ${e+r}
  5. L ${t} ${e+r}
  6. Z
  7. `}([f,d,h,s]))}c-=u,l+=1}return o}function ZO(t,e){t.__data__=e.__data__,t.className=e.className,e.parentNode.replaceChild(t,e)}function QO(t,e){return t.indexOf(e)===t.lastIndexOf(e)}function JO(t){var e,t=va(t);if(t&&(QO(e=t,"m")&&QO(e,"M")))return t}function t5(t,e,n,r){var i,a,o,s,l,c,u,h,f,d=e["nodeName"],p=n["nodeName"],g=JO(e),m=JO(n);if(d===p&&"path"!==d||(void 0===g||void 0===m))return p=n,d=r,[a,o,y,s]=XO(i=e),f=i.style.transform,l=p.style.transform,[c,v,u,h]=(ZO(p,i),XO(p)),f=[Object.assign({transform:`${f?f+" ":""}translate(${a-c}, ${o-v}) scale(${y/u}, ${s/h})`},GO(i,WO)),Object.assign({transform:`${l?l+" ":""}translate(0, 0) scale(1, 1)`},GO(p,WO))],p.animate(f,d);{a=g;const b="path"===(o=(c=t)["nodeName"])?c:(ZO(o=new z({style:Object.assign(Object.assign({},GO(c,WO)),{d:a})}),c),o);var v=[Object.assign({path:g},GO(e,WO)),Object.assign({path:m},GO(n,WO))],y=b.animate(v,r);return y.onfinish=()=>{l0(b,n)},b.style.transform="scale(1, 1)",b.style.transform="none",y}}UO.props={};const e5=g=>(t,e,n,r,i)=>{[a="pack"]=[g.split];var a="function"==typeof a?a:KO,i=FO(i,n,g),n=t["length"],o=e["length"];if(1===n&&1===o||1<n&&1<o)return[s]=t,[c]=e,t5(s,s,c,i);if(1===n&&1<o){var[s]=t;{var l=s,c=e,u=i,s=a;l.style.visibility="hidden";const d=s(l,c.length);return c.map((t,e)=>{return t5(t,new z({style:Object.assign({path:d[e]},GO(l,WO))}),t,u)})}}if(1<n&&1===o){var[n]=e;{var o=t,h=n,f=i;const p=(e=a)(h,o.length);var{fillOpacity:e=1,strokeOpacity:t=1,opacity:n=1}=h.style,e=h.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:e,strokeOpacity:t,opacity:n}],f);return[...o.map((t,e)=>{return t5(t,t,new z({style:{path:p[e],fill:h.style.fill}}),f)}),e]}}return null},n5=(e5.props={},b=>{return ti({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:i.NUMBER}),(t,e,n,r,i)=>{const[a]=t;if(!gp(r))return YO(b)(t,e,n,r,i);const o=r.getCenter();var{__data__:t,style:e}=a,{radius:e=0,inset:s=0,fillOpacity:l=1,strokeOpacity:c=1,opacity:u=1}=e,{points:t,y:h,y1:f}=t;const d=hb().cornerRadius(e).padAngle(s*Math.PI/180),p=fy(r,t,[h,f]),{startAngle:g,endAngle:m}=p,v=new z({}),y=t=>{v.attr({d:d(t),transform:`translate(${o[0]}, ${o[1]})`});t=va(v);return v.style.transform="",t};e=[{waveInArcAngle:g+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:g+1e-4,fillOpacity:l,strokeOpacity:c,opacity:u,offset:.01},{waveInArcAngle:m,fillOpacity:l,strokeOpacity:c,opacity:u}],s=a.animate(e,FO(i,n,b));return s.onframe=function(){a.style.path=y(Object.assign(Object.assign({},p),{endAngle:Number(a.style.waveInArcAngle)}))},s.onfinish=function(){a.style.path=y(Object.assign(Object.assign({},p),{endAngle:m}))},s}}),r5=(n5.props={},c=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t="",fillOpacity:o=1,strokeOpacity:s=1,opacity:l=1}=a.style,t=[{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l,offset:.01},{transform:(t+" scale(1)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l}],{width:o,height:s}=a.getBoundingClientRect(),l=(a.setOrigin([o/2,s/2]),a.animate(t,FO(i,n,c)));return l.finished.then(()=>a.setOrigin(0,0)),l}}),i5=c=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t="",fillOpacity:o=1,strokeOpacity:s=1,opacity:l=1}=a.style,o=[{transform:(t+" scale(1)").trimStart()},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l,offset:.99},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],{width:s,height:l}=a.getBoundingClientRect(),t=(a.setOrigin([s/2,l/2]),a.animate(o,FO(i,n,c)));return t.finished.then(()=>a.setOrigin(0,0)),t}},a5=o=>(t,e,n,r,i)=>{var[t]=t,a=(null==(a=t.getTotalLength)?void 0:a.call(t))||0;return t.animate([{lineDash:[0,a]},{lineDash:[a,0]}],FO(i,n,o))},o5=(a5.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new z({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=YO(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o}),s5=(o5.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new z({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=VO(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o}),l5=(s5.props={},{visibility:"visible",opacity:1,fillOpacity:1,strokeOpacity:1});function c5(t,e,n,r){t.style[e]=n,r&&t.children.forEach(t=>c5(t,e,n,r))}function u5(t){c5(t,"visibility","hidden",!0)}function h5(t){c5(t,"visibility","visible",!0)}function f5(t){return at(t).selectAll("."+$c).nodes().filter(t=>!t.__removed__)}function d5(t,e){return p5(t,e).flatMap(({container:t})=>f5(t))}function p5(e,t){return t.filter(t=>t!==e&&t.options.parentKey===e.options.key)}function g5(t){return at(t).select("."+Xc).node()}function m5(t,e){var{offsetX:e,offsetY:n}=e,{min:[t,r],max:[i,a]}=t.getRenderBounds();return e<t||i<e||(n<r||a<n)?null:[e-t,n-r]}function v5(t,e){var{offsetX:e,offsetY:n}=e,[t,r,i,a]=function(t){var t=t.getRenderBounds(),{min:[t,e],max:[n,r]}=t;return[t,e,n,r]}(t);return[Math.min(i,Math.max(t,e))-t,Math.min(a,Math.max(r,n))-r]}function y5(t){return t=>t.__data__.color}function b5(t){const e=t.scale["x"];return t=>{t=t.__data__.x;return e.invert(t)}}function x5(t){t=Array.isArray(t)?t:[t];const r=new Map(t.flatMap(e=>{return Array.from(e.markState.keys()).map(t=>[e.key+","+t.key,t.data])}));return t=>{var{index:t,markKey:e,viewKey:n}=t.__data__;return r.get(n+","+e)[t]}}function w5(s,l=(t,e)=>t,c=(t,e,n)=>t.setAttribute(e,n)){const u="__states__",h="__ordinal__",i=t=>{var{[u]:e=[],[h]:n={}}=t,e=e.reduce((t,e)=>Object.assign(Object.assign({},t),s[e]),n);if(0!==Object.keys(e).length){for(var[r,i]of Object.entries(e)){a=t,o=r;var a=null!=(a=t.style[o])?a:l5[o],o=l(i,t);c(t,r,o),r in n||(n[r]=a)}t[h]=n}},a=t=>{t[u]||(t[u]=[])};return{setState:(t,...e)=>{a(t),t[u]=[...e],i(t)},removeState:(t,...e)=>{a(t);for(const r of e){var n=t[u].indexOf(r);-1!==n&&t[u].splice(n,1)}i(t)},hasState:(t,e)=>(a(t),-1!==t[u].indexOf(e))}}function M5(t,e){var n=(Array.isArray(t)?t:[t]).flatMap(e=>e.marks.map(t=>[e.key+","+t.key,t.state])),r={};for(const i of e){const[l,c]=Array.isArray(i)?i:[i,{}];r[l]=n.reduce((t,e)=>{const[a,n={}]=e;e=void 0===(e=n[l])||"object"==typeof e&&0===Object.keys(e).length?c:n[l];for(const[r,o]of Object.entries(e)){const s=t[r];t[r]=(t,e,n,r)=>{var i=r.__data__.viewKey+","+r.__data__.markKey;return a!==i?null===s||void 0===s?void 0:s(t,e,n,r):"function"!=typeof o?o:o(t,e,n,r)}}return t},{})}return r}function k5(t,r){const i=new Map(t.map((t,e)=>[t,e])),a=r?t.map(r):t;return(t,e)=>{var n;return"function"!=typeof t?t:(n=i.get(e),t(r?r(e):e,n,a,e))}}function E5(t){var{link:e=!1,valueof:l=(t,e)=>t}=t,c=nt(t,["link","valueof","coordinate"]);if(!e)return[()=>{},()=>{}];const u=t=>t.__data__.points;return[t=>{if(!(t.length<=1)){var e=Yd(t,(t,e)=>{t=t.__data__.x,e=e.__data__.x;return t-e});for(let t=1;t<e.length;t++){var n=rb();const s=e[t-1];var r=e[t],[r,i,a,o]=((t,e)=>{var[,t,n]=t,[e,,,r]=e;return[t,e,r,n]})(u(s),u(r)),r=(n.moveTo(...r),n.lineTo(...i),n.lineTo(...a),n.lineTo(...o),n.closePath(),K1(c,t=>l(t,s))),{fill:i=s.getAttribute("fill")}=r,a=nt(r,["fill"]),o=new z({className:"element-link",style:Object.assign({d:n.toString(),fill:i,zIndex:-2},a)});null!=(r=s.link)&&r.remove(),s.parentNode.appendChild(o),s.link=o}}},t=>{var e;null!=(e=t.link)&&e.remove(),t.link=null}]}function O5(n,t,e){var r,i,a,o=t=>{var e=n.style["transform"];return e?e+" "+t:t};return gp(e)?(a=n.__data__["points"],[a,i]=pp(e)?hy(a):a,r=ey(a,a=e.getCenter()),i=ey(i,a),a=iy(r)+oy(r,i)/2,o(`translate(${t*Math.cos(a)}, ${t*Math.sin(a)})`)):pp(e)?o(`translate(${t}, 0)`):o(`translate(0, ${-t})`)}function S5(t){var{background:e,scale:s,coordinate:l,valueof:c}=t,u=nt(t,["background","scale","coordinate","valueof"]);const h="element-background";if(!e)return[()=>{},()=>{}];const r=(t,e,n)=>{var r=t.invert(e),e=e+t.getBandWidth(r)/2,t=t.getStep(r)/2,r=t*n;return[e-t+r,e+t-r]},f=(t,e)=>{var n=s["x"];return _O(n)?(t=t["__data__"],t=t["x"],[n,t]=r(n,t,e),[n,t]):[0,1]},d=(t,e)=>{var n=s["y"];return _O(n)?(t=t["__data__"],t=t["y"],[n,t]=r(n,t,e),[n,t]):[0,1]},p=(t,e)=>{var n=e["padding"],[r,i]=f(t,n),[n,a]=d(t,n),t=t["__data__"],{y:t,y1:o}=t;return Fb([[r,n],[i,n],[i,a],[r,a]].map(t=>l.map(t)),{y:t,y1:o},l,e)},g=(t,e)=>{var n,r,{transform:i="scale(1.2, 1.2)",transformOrigin:a="center center",stroke:o=""}=e,e=nt(e,["transform","transformOrigin","stroke"]),i=Object.assign({transform:i,transformOrigin:a,stroke:o},e),s=t.cloneNode(!0);for([n,r]of Object.entries(i))s.style[n]=r;return s};return[e=>{e.background&&e.background.remove();var t=K1(u,t=>c(t,e)),{fill:n="#CCD6EC",fillOpacity:r=.3,zIndex:i=-2,padding:a=.001,strokeWidth:o=0}=t,t=nt(t,["fill","fillOpacity","zIndex","padding","strokeWidth"]),t=Object.assign(Object.assign({},t),{fill:n,fillOpacity:r,zIndex:i,padding:a,strokeWidth:o}),n=((()=>{var{x:t,y:e}=s;return[t,e].some(_O)})()?p:g)(e,t);n.className=h,e.parentNode.appendChild(n),e.background=n},t=>{var e;null!=(e=t.background)&&e.remove(),t.background=null},t=>t.className===h]}function _5(t,e){t=t.getRootNode().defaultView.getContextService().getDomElement();null!=t&&t.style&&(t.style.cursor=e)}function A5(t,e,r){return t.find(n=>Object.entries(e).every(([t,e])=>r(n)[t]===e))}function T5(e,{elements:t,datum:a,groupKey:o=t=>t,link:n=!1,background:r=!1,delay:i=60,scale:s,coordinate:l,emitter:c,state:u={}}){const h=t(e),f=new Set(h),d=Fd(h,o);t=k5(h,a);const[p,g]=E5(Object.assign({elements:h,valueof:t,link:n,coordinate:l},it(u.active,"link"))),[m,v,y]=S5(Object.assign({scale:s,coordinate:l,background:r,valueof:t},it(u.active,"background"))),{setState:b,removeState:x,hasState:w}=w5(rt(u,{active:Object.assign({},(null==(n=u.active)?void 0:n.offset)&&{transform:(...t)=>{var e=u.active.offset(...t),[,t]=t;return O5(h[t],e,l)}})}),t);let M;const k=t=>{var{target:e,nativeEvent:t=!0}=t;if(f.has(e)){M&&clearTimeout(M);var n=o(e),n=d.get(n),r=new Set(n);for(const i of h)r.has(i)?w(i,"active")||b(i,"active"):(b(i,"inactive"),g(i)),i!==e&&v(i);m(e),p(n),t&&c.emit("element:highlight",{nativeEvent:t,data:{data:a(e),group:n.map(a)}})}},E=(t=!0)=>{for(const e of h)x(e,"active","inactive"),v(e),g(e);t&&c.emit("element:unhighlight",{nativeEvent:t})},O=t=>{t=t.target;r&&!y(t)||(r||f.has(t))&&(0<i?(M&&clearTimeout(M),M=setTimeout(()=>{E(),M=null},i)):E())},S=()=>{E()},_=(e.addEventListener("pointerover",k),e.addEventListener("pointerout",O),e.addEventListener("pointerleave",S),t=>{t=t.nativeEvent;t||E(!1)}),A=t=>{var e=t["nativeEvent"];!e&&(e=t.data["data"],t=A5(h,e,a))&&k({target:t,nativeEvent:!1})};return c.on("element:highlight",A),c.on("element:unhighlight",_),()=>{e.removeEventListener("pointerover",k),e.removeEventListener("pointerout",O),e.removeEventListener("pointerleave",S),c.off("element:highlight",A),c.off("element:unhighlight",_);for(const t of h)v(t),g(t)}}function P5(t){var{delay:s,createGroup:l,background:c=!1,link:u=!1}=t,h=nt(t,["delay","createGroup","background","link"]);return(t,e,n)=>{var{container:t,view:r,options:i}=t,{scale:a,coordinate:o}=r;return T5(g5(t),Object.assign({elements:f5,datum:x5(r),groupKey:l?l(r):void 0,coordinate:o,scale:a,state:M5(i,[["active",c?{}:{lineWidth:"1",stroke:"#000"}],"inactive"]),background:c,link:u,delay:s,emitter:n},h))}}function L5(t){return P5(Object.assign(Object.assign({},t),{createGroup:b5}))}function C5(t){return P5(Object.assign(Object.assign({},t),{createGroup:y5}))}function N5(e,{elements:t,datum:f,groupKey:d=t=>t,link:p=!1,single:g=!1,coordinate:n,background:r=!1,scale:i,emitter:m,state:a={}}){const v=t(e),y=new Set(v),b=Fd(v,d);t=k5(v,f);const[x,w]=E5(Object.assign({link:p,elements:v,valueof:t,coordinate:n},it(a.selected,"link"))),[M,k]=S5(Object.assign({background:r,coordinate:n,scale:i,valueof:t},it(a.selected,"background"))),{setState:E,removeState:o,hasState:O}=w5(rt(a,{selected:Object.assign({},(null==(r=a.selected)?void 0:r.offset)&&{transform:(...t)=>{var e=a.selected.offset(...t),[,t]=t;return O5(v[t],e,n)}})}),t),S=(t=!0)=>{for(const e of v)o(e,"selected","unselected"),w(e),k(e);t&&m.emit("element:unselect",{nativeEvent:!0})},s=t=>{var{target:e,nativeEvent:n=!0}=t;if(!y.has(e))return S();if(g){var[r,i,a=!0]=[t,e,n];if(O(i,"selected"))S();else{var o=d(i),o=b.get(o),s=new Set(o);for(const l of v)s.has(l)?E(l,"selected"):(E(l,"unselected"),w(l)),l!==i&&k(l);x(o),M(i),a&&m.emit("element:select",Object.assign(Object.assign({},r),{nativeEvent:a,data:{data:[f(i),...o.map(f)]}}))}}else{var[r,a,o=!0]=[t,e,n];t=d(a),t=b.get(t);const c=new Set(t);if(O(a,"selected")){if(!v.some(t=>!c.has(t)&&O(t,"selected")))return S();for(const u of t)E(u,"unselected"),w(u),k(u)}else{e=t.some(t=>O(t,"selected"));for(const h of v)c.has(h)?E(h,"selected"):O(h,"selected")||E(h,"unselected");!e&&p&&x(t),M(a)}o&&m.emit("element:select",Object.assign(Object.assign({},r),{nativeEvent:o,data:{data:v.filter(t=>O(t,"selected")).map(f)}}))}},l=(e.addEventListener("click",s),t=>{var{nativeEvent:t,data:e}=t;if(!t)for(const r of g?e.data.slice(0,1):e.data){var n=A5(v,r,f);s({target:n,nativeEvent:!1})}}),c=()=>{S(!1)};return m.on("element:select",l),m.on("element:unselect",c),()=>{for(const t of v)w(t);e.removeEventListener("click",s),m.off("element:select",l),m.off("element:unselect",c)}}function j5(t){var{createGroup:s,background:l=!1,link:c=!1}=t,u=nt(t,["createGroup","background","link"]);return(t,e,n)=>{var{container:t,view:r,options:i}=t,{coordinate:a,scale:o}=r;return N5(g5(t),Object.assign({elements:f5,datum:x5(r),groupKey:s?s(r):void 0,coordinate:a,scale:o,state:M5(i,[["selected",l?{}:{lineWidth:"1",stroke:"#000"}],"unselected"]),background:l,link:c,emitter:n},u))}}function R5(t){return j5(Object.assign(Object.assign({},t),{createGroup:b5}))}function I5(t){return j5(Object.assign(Object.assign({},t),{createGroup:y5}))}function B5(t){var{wait:E=20,leading:O,trailing:S=!1,labelFormatter:_=t=>""+t}=t,A=nt(t,["wait","leading","trailing","labelFormatter"]);return t=>{const{options:e,view:n,container:r,update:i}=t,{markState:a,scale:o,coordinate:s}=n;t=function(t,e,r){var[t]=Array.from(t.entries()).filter(([t])=>t.type===e).map(([t])=>{const n=t["encode"];return Object.fromEntries(r.map(t=>{var e=n[t];return[t,e?e.value:void 0]}))});return t}(a,"line",["x","y","series"]);if(!t)return;const{y:f,x:d,series:l=[]}=t;t=f.map((t,e)=>e);const c=Yd(t.map(t=>d[t])),u=rt({},e),h=u.marks.find(t=>"line"===t.type);t=ep(zd(t,t=>ep(t,t=>+f[t])/rp(t,t=>+f[t]),t=>l[t]).values());rt(h,{scale:{y:{domain:[1/t,t]}}});const p=g5(r),g=r.getElementsByClassName($c);const m=Fd(r.getElementsByClassName(Zc),t=>t.__data__.key.split("-")[0]),v=new Vs({style:Object.assign({x1:0,y1:0,x2:0,y2:p.getAttribute("height"),stroke:"black",lineWidth:1},it(A,"rule"))}),y=new el({style:Object.assign({x:0,y:p.getAttribute("height"),text:"",fontSize:10},it(A,"label"))}),b=(v.append(y),p.appendChild(v),(t,e,n)=>{var[t]=t.invert(n),n=e.invert(t);return c[Ld(c,n)]}),x=(t,e)=>{v.setAttribute("x1",t[0]),v.setAttribute("x2",t[0]),y.setAttribute("text",_(e))};let w;var M;const k=dn(t=>{t=m5(p,t);if(t){var{scale:e,coordinate:n}=w,{x:e,y:r}=e,i=b(n,e,t);x(t,i);for(const u of g){var{seriesIndex:a,key:o}=u.__data__,s=a[Sd(t=>d[+t]).center(a,i)],l=[0,r.map(1)],s=[0,r.map(f[s]/f[a[0]])],[,a]=n.map(l),[,l]=n.map(s),c=a-l,s=(u.setAttribute("transform",`translate(0, ${c})`),m.get(o)||[]);for(const h of s)h.setAttribute("dy",c)}}},E,{leading:O,trailing:S});return M=[0,0],ce(this,void 0,void 0,function*(){var t=o["x"];const n=b(s,t,M);x(M,n);t=function(t){var{transform:e=[]}=t,n=e.find(t=>"normalizeY"===t.type);return n||(e.push(n={type:"normalizeY"}),t.transform=e,n)}(h);t.groupBy="color",t.basis=(t,e)=>{return e[t[Sd(t=>d[+t]).center(t,n)]]};for(const e of u.marks)e.animate=!1;t=yield i(u);w=t.view}),p.addEventListener("pointerenter",k),p.addEventListener("pointermove",k),p.addEventListener("pointerleave",k),()=>{v.remove(),p.removeEventListener("pointerenter",k),p.removeEventListener("pointermove",k),p.removeEventListener("pointerleave",k)}}}function D5({wait:l=30,leading:c,trailing:u=!1}){return t=>{const{options:r,update:i,container:e}=t,a=g5(e),o=rt({},r);for(const s of o.marks)s.animate=!1;const n=dn(t=>{var e,n,t=m5(a,t);t?([t,e]=t,(n=function(t){var{coordinate:e={}}=t,{transform:n=[]}=e,r=n.find(t=>"fisheye"===t.type);return r||(n.push(r={type:"fisheye"}),e.transform=n,t.coordinate=e,r)}(o)).focusX=t,n.focusY=e,n.visual=!0,i(o)):i(r)},l,{leading:c,trailing:u});return a.addEventListener("pointerenter",n),a.addEventListener("pointermove",n),a.addEventListener("pointerleave",n),()=>{a.removeEventListener("pointerenter",n),a.removeEventListener("pointermove",n),a.removeEventListener("pointerleave",n)}}}const F5=new Proxy({BEFORE_RENDER:"beforerender",AFTER_RENDER:"afterrender",BEFORE_PAINT:"beforepaint",AFTER_PAINT:"afterpaint",BEFORE_CHANGE_DATA:"beforechangedata",AFTER_CHANGE_DATA:"afterchangedata",BEFORE_CLEAR:"beforeclear",AFTER_CLEAR:"afterclear",BEFORE_DESTROY:"beforedestroy",AFTER_DESTROY:"afterdestroy",BEFORE_CHANGE_SIZE:"beforechangesize",AFTER_CHANGE_SIZE:"afterchangesize",POINTER_TAP:"pointertap",POINTER_DOWN:"pointerdown",POINTER_UP:"pointerup",POINTER_OVER:"pointerover",POINTER_OUT:"pointerout",POINTER_MOVE:"pointermove",POINTER_ENTER:"pointerenter",POINTER_LEAVE:"pointerleave",POINTER_UPOUTSIDE:"pointerupoutside",DRAG_START:"dragstart",DRAG:"drag",DRAG_END:"dragend",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"DROP",CLICK:"click",DBLCLICK:"dblclick"},{get(t,e){if(e in t)return t[e]},set(){return!0}});function z5(t,e){t=t.__data__;const{markKey:n,index:r,seriesIndex:i}=t;t=e.markState;const a=Array.from(t.keys()).find(t=>t.key===n);if(a)return i?i.map(t=>a.data[t]):a.data[r]}function G5(i,a,o,s=t=>!0){return t=>{var e,n,r;s(t)&&(o.emit("plot:"+i,t),r=t["target"],r)&&({className:e,markType:n}=r,"plot"!==e)&&("element"===e?(r=Object.assign(Object.assign({},t),{nativeEvent:!0,data:{data:z5(r,a)}}),o.emit("element:"+i,r),o.emit(n+":"+i,r)):o.emit(e+":"+i,t))}}function W5(){return(t,e,n)=>{const{container:r,view:i}=t,a=G5(F5.CLICK,i,n,t=>1===t.detail),o=G5(F5.DBLCLICK,i,n,t=>2===t.detail),s=G5(F5.POINTER_TAP,i,n),l=G5(F5.POINTER_DOWN,i,n),c=G5(F5.POINTER_UP,i,n),u=G5(F5.POINTER_OVER,i,n),h=G5(F5.POINTER_OUT,i,n),f=G5(F5.POINTER_MOVE,i,n),d=G5(F5.POINTER_ENTER,i,n),p=G5(F5.POINTER_LEAVE,i,n),g=G5(F5.POINTER_UPOUTSIDE,i,n),m=G5(F5.DRAG_START,i,n),v=G5(F5.DRAG,i,n),y=G5(F5.DRAG_END,i,n),b=G5(F5.DRAG_ENTER,i,n),x=G5(F5.DRAG_LEAVE,i,n),w=G5(F5.DRAG_OVER,i,n),M=G5(F5.DROP,i,n);return r.addEventListener("click",a),r.addEventListener("click",o),r.addEventListener("pointertap",s),r.addEventListener("pointerdown",l),r.addEventListener("pointerup",c),r.addEventListener("pointerover",u),r.addEventListener("pointerout",h),r.addEventListener("pointermove",f),r.addEventListener("pointerenter",d),r.addEventListener("pointerleave",p),r.addEventListener("pointerupoutside",g),r.addEventListener("dragstart",m),r.addEventListener("drag",v),r.addEventListener("dragend",y),r.addEventListener("dragenter",b),r.addEventListener("dragleave",x),r.addEventListener("dragover",w),r.addEventListener("drop",M),()=>{r.removeEventListener("click",a),r.removeEventListener("click",o),r.removeEventListener("pointertap",s),r.removeEventListener("pointerdown",l),r.removeEventListener("pointerup",c),r.removeEventListener("pointerover",u),r.removeEventListener("pointerout",h),r.removeEventListener("pointermove",f),r.removeEventListener("pointerenter",d),r.removeEventListener("pointerleave",p),r.removeEventListener("pointerupoutside",g),r.removeEventListener("dragstart",m),r.removeEventListener("drag",v),r.removeEventListener("dragend",y),r.removeEventListener("dragenter",b),r.removeEventListener("dragleave",x),r.removeEventListener("dragover",w),r.removeEventListener("drop",M)}}}function Y5(t,e){return e?"string"==typeof e?document.querySelector(e):e:t.getRootNode().defaultView.getConfig().container}function H5({root:t,data:e,x:n,y:r,render:i,event:a,single:o,position:s="right-bottom",enterable:l=!1,mount:c,bounding:u}){var h,f,d=t.getRootNode().defaultView.getConfig().container,o=o?Y5(t,c):t,c=u||function(t){var{min:[t,e],max:[n,r]}=t.getBounds();return{x:t,y:e,width:n-t,height:r-e}}(t),d=(u=o,t=(t=d).getBoundingClientRect(),u=u.getBoundingClientRect(),{x:t.x-u.x,y:t.y-u.y}),{tooltipElement:p=(t=o,u=n,p=r,h=s,f=l,c=c,d=d,u=new Tk({className:"tooltip",style:{x:u,y:p,container:d,data:[],bounding:c,position:h,enterable:f,title:"",offset:[10,10],template:{prefixCls:"g2-"},style:{".g2-tooltip":{},".g2-tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}}}}),t.appendChild(u.HTMLTooltipElement),u)}=o,{items:d,title:c=""}=e;p.update(Object.assign({x:n,y:r,data:d,title:c,position:s,enterable:l},void 0!==i&&{content:i(a,{items:d,title:c})})),o.tooltipElement=p}function V5({root:t,single:e,emitter:n,nativeEvent:r=!0,mount:i}){e=(e?Y5(t,i):t).tooltipElement;e&&(e.hide(),r)&&n.emit("tooltip:hide",{nativeEvent:r})}function q5(t){var e=t["tooltipElement"];e&&(e.destroy(),t.tooltipElement=void 0)}function $5(t){var e=t["value"];return Object.assign(Object.assign({},t),{value:void 0===e?"undefined":e})}function U5(t,e){var{color:t,series:n}=t,{color:e,series:r}=e,i=t=>t&&t.invert&&!(t instanceof y1)&&!(t instanceof d1);return i(n)?n.invert(r):r&&r!==e?r:!i(t)||(n=t.invert(e),Array.isArray(n))?null:n}function X5(t){var e=t.getAttribute("fill"),n=t.getAttribute("stroke"),t=t["__data__"],{color:t=e&&"transparent"!==e?e:n}=t;return t}function K5(t,e=t=>t){t=new Map(t.map(t=>[e(t),t]));return Array.from(t.values())}function Z5(n,s,l,t=n.map(t=>t.__data__)){const e=t=>t instanceof Date?+t:t;var r=K5(t.map(t=>t.title),e).filter(c0),t=t.flatMap((r,t)=>{const i=n[t],{items:e=[],title:a}=r;t=e.filter(c0);const o=void 0!==l?l:e.length<=1;return t.map(t=>{var{color:e=X5(i),name:n}=t,t=nt(t,["color","name"]),n=o?U5(s,r)||n:n||U5(s,r);return Object.assign(Object.assign({},t),{color:e,name:n||a})})}).map($5);return Object.assign(Object.assign({},0<r.length&&{title:r.join(",")}),{items:K5(t,t=>`(${e(t.name)}, ${e(t.value)}, ${e(t.color)})`)})}function Q5(t){t.ruleY&&(t.ruleY.remove(),t.ruleY=void 0)}function J5(t,e){return Array.from(t.values()).some(t=>{return null==(t=t.interaction)?void 0:t[e]})}function tS(t,e){return void 0===t?e:t}function eS(t){var{title:t,items:e}=t;return 0===e.length&&void 0===t}function nS(_,t){var{elements:e,sort:A,filter:T,scale:P,coordinate:L,crosshairs:C,render:N,groupName:j,emitter:R,wait:n=50,leading:r=!0,trailing:i=!1,startX:I=0,startY:B=0,body:D=!0,single:F=!0,position:z,enterable:G,mount:W,bounding:Y,style:a={}}=t,t=nt(t,["elements","sort","filter","scale","coordinate","crosshairs","render","groupName","emitter","wait","leading","trailing","startX","startY","body","single","position","enterable","mount","bounding","style"]),e=e(_);const H=pp(L),V=gp(L);a=rt(a,t);const{innerWidth:q,innerHeight:Q}=L.getOptions(),$=[],U=[];for(const u of e){var o=u["__data__"],o=o["seriesX"];(o?$:U).push(u)}$.sort((t,e)=>{const n=H?0:1;var r=t=>t.getBounds().min[n];return H?r(e)-r(t):r(t)-r(e)});const J=new Map($.map(t=>{var e=t["__data__"];const n=e["seriesX"];return[t,[Yd(n.map((t,e)=>e),t=>n[+t]),n]]})),tt=it(a,"crosshairs");t=P.x;const X=null!=t&&t.getBandWidth?t.getBandWidth()/2:0,K=t=>{var[t]=L.invert(t);return t-X},et=(t,e)=>{const n=H?1:0,r=t[n];return e.filter(t=>{var[t,e]=(t=>{var{min:t,max:e}=t.getLocalBounds();return Yd([t[n],e[n]])})(t);return r>=t&&r<=e})},s=dn(t=>{var e=m5(_,t);if(e){var n=_.getRenderBounds();const g=n.min[0],m=n.min[1],v=[e[0]-I,e[1]-B];v;var n=et(v,U),r=[],i=[];for(const b of $){var[a,o]=J.get(b),a=((t,e,n)=>{var t=K(t),[r,i]=Yd([n[0],n[n.length-1]]);return t<r||i<t?null:e[(0,Sd(t=>n[+t]).center)(e,t)]})(v,a,o);if(null!==a){r.push(b);o=((t,n)=>{t=t.__data__;return Object.fromEntries(Object.entries(t).filter(([t])=>t.startsWith("series")&&"series"!==t).map(([t,e])=>{e=e[n];return[Je(t.replace("series","")),e]}))})(b,a);const{x:g,y:m}=o;a=L.map([(g||0)+X,m||0]);i.push([o,a])}}var s=Array.from(new Set(i.map(t=>t[0].x)));const y=s[ip(s,t=>Math.abs(t-K(v)))];var s=i.filter(t=>t[0].x===y),l=[...s.map(t=>t[0]),...n.map(t=>t.__data__)],n=[...r,...n],l=Z5(n,P,j,l);if(A&&l.items.sort((t,e)=>A(t)-A(e)),T&&(l.items=l.items.filter(T)),0===n.length||eS(l))Z();else{if(D&&H5({root:_,data:l,x:e[0]+g,y:e[1]+m,render:N,event:t,single:F,position:z,enterable:G,mount:W,bounding:Y}),C){n=s.map(t=>t[1]);{l=_;e=n;s=Object.assign(Object.assign({},tt),{width:q,height:Q,startX:I,startY:B,transposed:H,polar:V});var c,{height:n,width:u,startX:h,startY:f,transposed:d,polar:p}=s,s=nt(s,["height","width","startX","startY","transposed","polar"]);const x=Object.assign({lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},s),w=(s=e.map(t=>t[1]),e=e.map(t=>t[0]),cp(s)),M=cp(e),[k,E,O,S]=p?(s=h+u/2,e=f+n/2,p=Math.min(u,n)/2,c=iy(ey([M,w],[s,e])),[s,s+p*Math.cos(c),e,e+p*Math.sin(c)]):d?[h,h+u,w+f,w+f]:[M+h,M+h,f,f+n];(e=l.ruleY||(s=new Vs({style:Object.assign({x1:k,x2:E,y1:O,y2:S},x)}),l.appendChild(s),s)).style.x1=k,e.style.x2=E,e.style.y1=O,e.style.y2=S,l.ruleY=e}}R.emit("tooltip:show",Object.assign(Object.assign({},t),{nativeEvent:!0,data:{data:{x:AO(P.x,K(v),!0)}}}))}}},n,{leading:r,trailing:i}),Z=()=>{V5({root:_,single:F,emitter:R,mount:W}),C&&Q5(_)},l=({nativeEvent:t,data:e})=>{var n,r;t||(t=e.data["x"],e=P["x"],e=e.map(t),[t,e]=L.map([e,.5]),[n,r]=_.getRenderBounds()["min"],s({offsetX:t+n,offsetY:e+r}))},c=()=>{V5({root:_,single:F,emitter:R,nativeEvent:!1,mount:W})};return R.on("tooltip:show",l),R.on("tooltip:hide",c),_.addEventListener("pointerenter",s),_.addEventListener("pointermove",s),_.addEventListener("pointerleave",Z),()=>{_.removeEventListener("pointerenter",s),_.removeEventListener("pointermove",s),_.removeEventListener("pointerleave",Z),R.off("tooltip:show",l),R.off("tooltip:hide",c),q5(_),C&&Q5(_)}}function rS(a,{elements:t,scale:o,render:s,groupName:l,sort:c,filter:u,emitter:h,wait:e=50,leading:n=!0,trailing:r=!1,groupKey:f=t=>t,single:d=!0,position:p,enterable:g,datum:m,view:v,mount:y,bounding:b}){const x=t(a),w=new Set(x),M=Fd(x,f),k=dn(t=>{var e,n,r,i=t["target"];!w.has(i)||(e=f(i),e=1===(e=M.get(e)).length?function(n){var{title:t,items:e=[]}=t=n["__data__"],e=e.filter(c0).map(t=>{var{color:e=X5(n)}=t,t=nt(t,["color"]);return Object.assign(Object.assign({},t),{color:e})}).map($5);return Object.assign(Object.assign({},t&&{title:t}),{items:e})}(e[0]):Z5(e,o,l),c&&e.items.sort((t,e)=>c(t)-c(e)),u&&(e.items=e.items.filter(u)),eS(e))?V5({root:a,single:d,emitter:h,mount:y}):({offsetX:n,offsetY:r}=t,H5({root:a,data:e,x:n,y:r,render:s,event:t,single:d,position:p,enterable:g,mount:y,bounding:b}),h.emit("tooltip:show",Object.assign(Object.assign({},t),{nativeEvent:!0,data:{data:z5(i,v)}})))},e,{leading:n,trailing:r}),i=t=>{t=t.target;w.has(t)&&V5({root:a,single:d,emitter:h,mount:y})},E=({nativeEvent:t,data:e})=>{var n,r,i;t||(t=A5(x,e.data,m))&&({x:e,y:n,width:r,height:i}=t.getBBox(),k({target:t,offsetX:e+r/2,offsetY:n+i/2}))},O=({nativeEvent:t}={})=>{t||V5({root:a,single:d,emitter:h,nativeEvent:!1,mount:y})};return h.on("tooltip:show",E),h.on("tooltip:hide",O),a.addEventListener("pointerover",k),a.addEventListener("pointermove",k),a.addEventListener("pointerout",i),()=>{a.removeEventListener("pointerover",k),a.removeEventListener("pointermove",k),a.removeEventListener("pointerout",i),h.off("tooltip:show",E),h.off("tooltip:hide",O),q5(a)}}function iS(t){const{shared:h,crosshairs:f,series:d,item:p=()=>({}),facet:g=!1}=t,m=nt(t,["shared","crosshairs","series","name","item","facet"]);return(e,t,n)=>{var{container:r,view:i}=e;const{scale:a,markState:o,coordinate:s}=i;var l=J5(o,"seriesTooltip"),c=J5(o,"crosshairs"),r=g5(r),l=tS(d,l);if(l&&Array.from(o.values()).some(t=>{var e;return(null==(e=t.interaction)?void 0:e.seriesTooltip)&&t.tooltip})&&!g)return nS(r,Object.assign(Object.assign({},m),{elements:f5,scale:a,coordinate:s,crosshairs:tS(f,c),item:p,emitter:n}));if(l&&g){l=t.filter(t=>t!==e&&t.options.parentKey===e.options.key);const u=d5(e,t),a=l[0].view.scale;t=r.getBounds(),l=t.min[0],t=t.min[1];return nS(r.parentNode.parentNode,Object.assign(Object.assign({},m),{elements:()=>u,scale:a,coordinate:s,crosshairs:tS(f,c),item:p,startX:l,startY:t,emitter:n}))}return rS(r,Object.assign(Object.assign({},m),{datum:x5(i),elements:f5,scale:a,coordinate:s,groupKey:h?b5(i):void 0,item:p,emitter:n,view:i}))}}const aS="legend-category",oS="items-item",sS="legend-category-item-marker",lS="legend-category-item-label";function cS(t){return t.getElementsByClassName(sS)[0]}function uS(t){return t.getElementsByClassName(lS)[0]}function hS(t){return t.getElementsByClassName(oS)}function fS(t){return t.getElementsByClassName(aS)}function dS(t){let e=t.parentNode;for(;e&&!e.__data__;)e=e.parentNode;return e.__data__}function pS(t,{legends:e,marker:i,label:a,datum:o,filter:r,emitter:s,channel:l,state:n={}}){const c=new Map,u=new Map,h=new Map;var{unselected:n={markerStroke:"#aaa",markerFill:"#aaa",labelFill:"#aaa"}}=n,f={unselected:it(n,"marker")},n={unselected:it(n,"label")};const{setState:d,removeState:p}=w5(f,void 0),{setState:g,removeState:m}=w5(n,void 0),v=Array.from(e(t));let y=v.map(o);const b=()=>{for(const r of v){var t=o(r),e=i(r),n=a(r);(y.includes(t)?(p(e,"unselected"),m):(d(e,"unselected"),g))(n,"unselected")}};for(const O of v){var x=()=>{_5(t,"pointer")},w=()=>{_5(t,"default")},M=n=>ce(this,void 0,void 0,function*(){var t=o(O),e=y.indexOf(t),{nativeEvent:t=!0}=(-1===e?y.push(t):y.splice(e,1),0===y.length&&y.push(...v.map(o)),yield r(y),b(),n);t&&(y.length===v.length?s.emit("legend:reset",{nativeEvent:t}):s.emit("legend:filter",Object.assign(Object.assign({},n),{nativeEvent:t,data:{channel:l,values:y}})))});O.addEventListener("click",M),O.addEventListener("pointerenter",x),O.addEventListener("pointerout",w),c.set(O,M),u.set(O,x),h.set(O,w)}const k=n=>ce(this,void 0,void 0,function*(){var t,e=n["nativeEvent"];e||(e=n["data"],{channel:e,values:t}=e,e===l&&(y=t,yield r(y),b()))}),E=e=>ce(this,void 0,void 0,function*(){var t=e["nativeEvent"];t||(y=v.map(o),yield r(y),b())});return s.on("legend:filter",k),s.on("legend:reset",E),()=>{for(const t of v)t.removeEventListener("click",c.get(t)),t.removeEventListener("pointerenter",u.get(t)),t.removeEventListener("pointerout",h.get(t)),s.off("legend:filter",k),s.off("legend:reset",E)}}function gS(){return(t,e,r)=>{const{container:i,view:a,options:o,update:s}=t;t=fS(i);const l=(r,i)=>ce(this,void 0,void 0,function*(){var t=a["scale"];const{[r]:n}=t;t=o.marks,t=t.map(t=>{var{transform:e=[]}=t,e=[{type:"filter",[r]:i},...e];return rt({},t,{transform:e,scale:{[r]:{domain:n.getOptions().domain}}})}),t=Object.assign(Object.assign({},o),{marks:t});return s(t)}),n=t.map(t=>{const{name:e,domain:n}=dS(t).scales[0];return pS(i,{legends:hS,marker:cS,label:uS,datum:t=>{t=t.__data__,t=t.index;return n[t]},filter:t=>l(e,t),state:t.attributes.state,channel:e,emitter:r})});return()=>{n.forEach(t=>t())}}}function mS(){return(t,e,a)=>{const{container:n,view:r,options:i}=t;t=fS(n);const o=f5(n);var s=M5(i,["active","inactive"]),l=k5(o,x5(r));const c=[];for(const d of t){const p=t=>{var e=d.attributes["data"],t=t["__data__"],t=t["index"];return e[t].label},g=dS(d).scales[0].name,m=hS(d),v=(t=>{var{scale:{[t]:t}}=r;return t})(g),y=Fd(o,t=>v.invert(t.__data__[g]));var{state:u={}}=d.attributes,{inactive:u={}}=u;const{setState:b,removeState:x}=w5(s,l);var h={inactive:it(u,"marker")},u={inactive:it(u,"label")};const{setState:w,removeState:M}=w5(h),{setState:k,removeState:E}=w5(u),O=t=>{for(const r of m){var e=cS(r),n=uS(r);(r===t||null===t?(M(e,"inactive"),E):(w(e,"inactive"),k))(n,"inactive")}},S=(t,e)=>{var n=p(e),r=new Set(y.get(n));for(const i of o)r.has(i)?b(i,"active"):b(i,"inactive");O(e);var{nativeEvent:e=!0}=t;e&&a.emit("legend:highlight",Object.assign(Object.assign({},t),{nativeEvent:e,data:{channel:g,value:n}}))},_=new Map;for(const L of m){var f=t=>{S(t,L)};L.addEventListener("pointerover",f),_.set(L,f)}const A=t=>{for(const e of o)x(e,"inactive","active");O(null);var{nativeEvent:t=!0}=t;t&&a.emit("legend:unhighlight",{nativeEvent:t})},T=t=>{var{nativeEvent:t,data:e}=t;if(!t){const{channel:n,value:r}=e;n===g&&(t=m.find(t=>p(t)===r))&&S({nativeEvent:!1},t)}},P=t=>{t=t.nativeEvent;t||A({nativeEvent:!1})};d.addEventListener("pointerleave",A),a.on("legend:highlight",T),a.on("legend:unhighlight",P);c.push(()=>{d.removeEventListener(A),a.off("legend:highlight",T),a.off("legend:unhighlight",P);for(var[t,e]of _)t.removeEventListener(e)})}return()=>c.forEach(t=>t())}}function vS(t,e){for(var[n,r]of Object.entries(e))t.style(n,r)}const yS=qb(t=>{const e=t.attributes,{x:n,y:r,width:i,height:a,class:o,handleSize:s=10,document:l}=e,c=nt(e,["x","y","width","height","class","renders","handleSize","document"]);if(l&&void 0!==i&&void 0!==a&&void 0!==n&&void 0!==r){var u=s/2,h=(t,e,n)=>{t.handle||(t.handle=n.createElement("rect"),t.append(t.handle));n=t.handle;return n.attr(e),n},f=it(h0(c,"handleNW","handleNE"),"handleN"),{render:d=h}=f,f=nt(f,["render"]),p=it(c,"handleE"),{render:g=h}=p,p=nt(p,["render"]),m=it(h0(c,"handleSE","handleSW"),"handleS"),{render:v=h}=m,m=nt(m,["render"]),y=it(c,"handleW"),{render:b=h}=y,y=nt(y,["render"]),x=it(c,"handleNW"),{render:w=h}=x,x=nt(x,["render"]),M=it(c,"handleNE"),{render:k=h}=M,M=nt(M,["render"]),E=it(c,"handleSE"),{render:O=h}=E,E=nt(E,["render"]),S=it(c,"handleSW"),{render:h=h}=S,S=nt(S,["render"]);var _=i=>()=>{return new(qb(t=>{return e=i,n=(t=t).id,r=nt(t.attributes,["x","y"]),(e=e(t,Object.assign({x:0,y:0},r),l)).id=n,void(e.style.draggable=!0);var e,n,r}))({})},t=at(t).attr("className",o).style("x",n).style("y",r).style("draggable",!0);t.maybeAppend("selection","rect").style("draggable",!0).style("fill","transparent").call(vS,Object.assign({width:i,height:a},h0(c,"handle"))),t.maybeAppend("handle-n",_(d)).style("x",u).style("y",-u).style("width",i-s).style("height",s).style("fill","transparent").call(vS,f),t.maybeAppend("handle-e",_(g)).style("x",i-u).style("y",u).style("width",s).style("height",a-s).style("fill","transparent").call(vS,p),t.maybeAppend("handle-s",_(v)).style("x",u).style("y",a-u).style("width",i-s).style("height",s).style("fill","transparent").call(vS,m),t.maybeAppend("handle-w",_(b)).style("x",-u).style("y",u).style("width",s).style("height",a-s).style("fill","transparent").call(vS,y),t.maybeAppend("handle-nw",_(w)).style("x",-u).style("y",-u).style("width",s).style("height",s).style("fill","transparent").call(vS,x),t.maybeAppend("handle-ne",_(k)).style("x",i-u).style("y",-u).style("width",s).style("height",s).style("fill","transparent").call(vS,M),t.maybeAppend("handle-se",_(O)).style("x",i-u).style("y",a-u).style("width",s).style("height",s).style("fill","transparent").call(vS,E),t.maybeAppend("handle-sw",_(h)).style("x",-u).style("y",a-u).style("width",s).style("height",s).style("fill","transparent").call(vS,S)}});function bS(l,t){var{brushed:a=()=>{},brushended:e=()=>{},brushcreated:o=()=>{},extent:s=function(t){var{width:t,height:e}=t.getBBox();return[0,0,t,e]}(l),brushRegion:c=(t,e,n,r,i)=>[t,e,n,r],reverse:u=!1,fill:n="#777",fillOpacity:r="0.3",stroke:i="#fff",selectedHandles:h=["handle-n","handle-e","handle-s","handle-w","handle-nw","handle-ne","handle-se","handle-sw"]}=t,f=nt(t,["brushed","brushended","brushcreated","extent","brushRegion","reverse","fill","fillOpacity","stroke","selectedHandles"]);let d=null,p=null,g=null,m=null,v=null,y=!1;const[b,x,w,M]=s,k=(_5(l,"crosshair"),l.style.draggable=!0,(t,e)=>{if(m&&m.remove(),v&&v.remove(),d=[t,e],u)return I();B()}),I=()=>{v=new z({style:Object.assign(Object.assign({},f),{fill:n,fillOpacity:r,stroke:i,pointerEvents:"none"})}),m=new yS({style:{x:0,y:0,width:0,height:0,draggable:!0,document:l.ownerDocument},className:"mask"}),l.appendChild(v),l.appendChild(m)},B=()=>{m=new yS({style:Object.assign(Object.assign({document:l.ownerDocument,x:0,y:0},f),{fill:n,fillOpacity:r,stroke:i,draggable:!0}),className:"mask"}),l.appendChild(m)},E=(t=!0)=>{m&&m.remove(),v&&v.remove(),d=null,p=null,g=null,y=!1,m=null,v=null,e(t)},O=(t,e,n=!0)=>{var[t,e,r,i]=function(t,e,n,r,i){var[i,a,o,s]=i;return[Math.max(i,Math.min(t,n)),Math.max(a,Math.min(e,r)),Math.min(o,Math.max(t,n)),Math.min(s,Math.max(e,r))]}(t[0],t[1],e[0],e[1],s),[t,e,r,i]=c(t,e,r,i,s);return(u?F:D)(t,e,r,i),a(t,e,r,i,n),[t,e,r,i]},D=(t,e,n,r)=>{m.style.x=t,m.style.y=e,m.style.width=n-t,m.style.height=r-e},F=(t,e,n,r)=>{v.style.d=`
  8. M${b},${x}L${w},${x}L${w},${M}L${b},${M}Z
  9. M${t},${e}L${t},${r}L${n},${r}L${n},${e}Z
  10. `,m.style.x=t,m.style.y=e,m.style.width=n-t,m.style.height=r-e},S={"handle-n":{vector:[0,1,0,0],cursor:"ns-resize"},"handle-e":{vector:[0,0,1,0],cursor:"ew-resize"},"handle-s":{vector:[0,0,0,1],cursor:"ns-resize"},"handle-w":{vector:[1,0,0,0],cursor:"ew-resize"},"handle-nw":{vector:[1,1,0,0],cursor:"nwse-resize"},"handle-ne":{vector:[0,1,1,0],cursor:"nesw-resize"},"handle-se":{vector:[0,0,1,1],cursor:"nwse-resize"},"handle-sw":{vector:[1,0,0,1],cursor:"nesw-resize"}},_=t=>T(t)||A(t),A=t=>{t=t.id;return-1!==h.indexOf(t)&&new Set(Object.keys(S)).has(t)},T=t=>t===m.getElementById("selection"),P=t=>{var e=t["target"],[t,n]=v5(l,t);m&&_(e)?_(e)&&(g=[t,n]):(k(t,n),y=!0)},L=t=>{var e,n,r,i,a,o,s=t["target"],t=v5(l,t);if(d)return g?T(s)?(e=(t,e,n,r,i)=>t+e<r?r-e:i<t+n?i-n:t,r=(n=t)[0]-g[0],n=n[1]-g[1],r=e(r,d[0],p[0],b,w),e=e(n,d[1],p[1],x,M),n=[d[0]+r,d[1]+e],r=[p[0]+r,p[1]+e],void O(n,r)):([e,n]=[t[0]-g[0],t[1]-g[1]],r=s["id"],S[r]?([s,i,a,o]=S[r].vector,O([d[0]+e*s,d[1]+n*i],[p[0]+e*a,p[1]+n*o])):void 0):O(d,t)},C=t=>{var e,n,r,i;g?(g=null,{x:e,y:r,width:n,height:i}=m.style,d=[e,r],p=[e+n,r+i]):(p=v5(l,t),[e,n,r,i]=O(d,p),y=!1,o(e,n,r,i,t))},N=t=>{t=t.target;m&&!_(t)&&E()},j=t=>{t=t.target;m&&_(t)&&!y?T(t)?_5(l,"move"):A(t)&&_5(l,S[t.id].cursor):_5(l,"crosshair")},R=()=>{_5(l,"default")};return l.addEventListener("dragstart",P),l.addEventListener("drag",L),l.addEventListener("dragend",C),l.addEventListener("click",N),l.addEventListener("pointermove",j),l.addEventListener("pointerleave",R),{mask:m,move(t,e,n,r,i=!0){m||k(t,e),d=[t,e],p=[n,r],O([t,e],[n,r],i)},remove(){m&&E(!1)},destroy(){m&&E(!1),_5(l,"default"),l.removeEventListener("dragstart",P),l.removeEventListener("drag",L),l.removeEventListener("dragend",C),l.removeEventListener("click",N),l.removeEventListener("pointermove",j),l.removeEventListener("pointerleave",R)}}}function xS(e,t,n){return t.filter(t=>{return t!==e&&({interaction:t={}}=t.options,Object.values(t).find(t=>t.brushKey===n))})}function wS(t,e){var{elements:n,selectedHandles:r,siblings:i=t=>[],datum:a,brushRegion:o,extent:s,reverse:l,scale:c,coordinate:u,series:h=!1,key:d=t=>t,bboxOf:f=t=>{var{x:t,y:e,width:n,height:r}=t.style;return{x:t,y:e,width:n,height:r}},state:p={},emitter:g}=e,e=nt(e,["elements","selectedHandles","siblings","datum","brushRegion","extent","reverse","scale","coordinate","series","key","bboxOf","state","emitter"]);const m=n(t),v=i(t),y=v.flatMap(n);i=k5(m,a),n=it(e,"mask");const{setState:b,removeState:x}=w5(p,i),w=new Map,{width:M,height:k,x:E=0,y:O=0}=f(t);a=s||[0,0,M,k];const S=()=>{for(const t of[...m,...y])x(t,"active","inactive")},_=(t,e,n,r)=>{var i;for(const u of v)null!=(i=u.brush)&&i.remove();var a=new Set;for(const h of m){var{min:o,max:s}=h.getLocalBounds(),[o,l]=o,[s,c]=s;!function(t,e){var[t,n,r,i]=t,[e,a,o,s]=e;return!(r<e||o<t||i<a||s<n)}([o,l,s,c],[t,e,n,r])?b(h,"inactive"):(b(h,"active"),a.add(d(h)))}for(const f of y)a.has(d(f))?b(f,"active"):b(f,"inactive")},A=()=>{for(const t of m)x(t,"inactive");for(const e of w.values())e.remove();w.clear()},T=(t,e,n,r)=>{var i;for(const o of m){var a=w.get(o)||(a=o,i=void 0,(i=a.cloneNode()).__data__=a.__data__,a.parentNode.appendChild(i),w.set(a,i),i);a.style.clipPath=new Js({style:{x:t+E,y:e+O,width:n-t,height:r-e}}),b(o,"inactive"),b(a,"active")}},P=bS(t,Object.assign(Object.assign({},n),{extent:a,brushRegion:o,reverse:l,selectedHandles:r,brushended:t=>{var e=h?A:S;t&&g.emit("brush:remove",{nativeEvent:!0}),e()},brushed:(t,e,n,r,i)=>{var a=PO(t,e,n,r,c,u);i&&g.emit("brush:highlight",{nativeEvent:!0,data:{selection:a}}),(h?T:_)(t,e,n,r)}})),L=({nativeEvent:t,data:e})=>{var n,r;t||(t=e["selection"],[e,t,n,r]=function(t,e,n){var{x:e,y:r}=e,[t,i]=t,t=LO(t,e),e=LO(i,r),i=[t[0],e[0]],r=[t[1],e[1]],[t,e]=n.map(i),[i,n]=n.map(r);return[t,e,i,n]}(t,c,u),P.move(e,t,n,r,!1))},C=(g.on("brush:highlight",L),()=>P.remove()),N=(g.on("brush:remove",C),P.destroy.bind(P));return P.destroy=()=>{g.off("brush:highlight",L),g.off("brush:remove",C),N()},P}function MS(t){var{facet:g,brushKey:m}=t,v=nt(t,["facet","brushKey"]);return(t,e,n)=>{var r,i,a,o,{container:s,view:l,options:c}=t,s=g5(s),u={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",reverse:!1},h=["active",["inactive",{opacity:.5}]],{scale:f,coordinate:d}=l;if(g)return r=(o=s.getBounds()).min[0],i=o.min[1],a=o.max[0],o=o.max[1],wS(s.parentNode.parentNode,Object.assign(Object.assign({elements:()=>d5(t,e),datum:x5(p5(t,e).map(t=>t.view)),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:[r,i,a,o],state:M5(p5(t,e).map(t=>t.options),h),emitter:n,scale:f,coordinate:d,selectedHandles:void 0},u),v));const p=wS(s,Object.assign(Object.assign({elements:f5,key:t=>t.__data__.key,siblings:()=>{return xS(t,e,m).map(t=>g5(t.container))},datum:x5([l,...xS(t,e,m).map(t=>t.view)]),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:void 0,state:M5([c,...xS(t,e,m).map(t=>t.options)],h),emitter:n,scale:f,coordinate:d,selectedHandles:void 0},u),v));return s.brush=p,()=>p.destroy()}}function kS(t,e,n,r,i){var[,i,,a]=i;return[t,i,n,a]}function ES(t){return MS(Object.assign(Object.assign({},t),{brushRegion:kS,selectedHandles:["handle-e","handle-w"]}))}function OS(t,e,n,r,i){var[i,,a]=i;return[i,e,a,r]}function SS(t){return MS(Object.assign(Object.assign({},t),{brushRegion:OS,selectedHandles:["handle-n","handle-s"]}))}const _S="axis",AS="axis-hot-area";function TS(t){return t.getElementsByClassName(_S)}function PS(t){return t.getElementsByClassName("axis-line")[0]}function LS(t){return t.getElementsByClassName("axis-main-group")[0].getLocalBounds()}function CS(t,e){var{cross:n,offsetX:i}=e,e=nt(e,["cross","offsetX","offsetY"]),r=LS(t),[t]=PS(t).getLocalBounds().min;const[a,o]=r.min,[s,l]=r.max;r=2*(s-a);return{brushRegion:OS,hotZone:new Js({className:AS,style:Object.assign({x:n?a:t-r/2,width:n?r/2:r,y:o,height:l-o},e)}),extent:n?(t,e,n,r)=>[-1/0,e,1/0,r]:(t,e,n,r)=>[Math.floor(a-i),e,Math.ceil(s-i),r]}}function NS(t,e){var{offsetY:i,cross:n=!1}=e,e=nt(e,["offsetY","offsetX","cross"]),r=LS(t),[,t]=PS(t).getLocalBounds().min;const[a,o]=r.min,[s,l]=r.max;r=l-o;return{brushRegion:kS,hotZone:new Js({className:AS,style:Object.assign({x:a,width:s-a,y:n?o:t-r,height:n?r:2*r},e)}),extent:n?(t,e,n,r)=>[t,-1/0,n,1/0]:(t,e,n,r)=>[t,Math.floor(o-i),n,Math.ceil(l-i)]}}function jS(t,e){var{axes:n,elements:r,points:i,horizontal:s,datum:a,offsetY:o,offsetX:l,reverse:c=!1,state:u={},emitter:h,coordinate:f}=e,e=nt(e,["axes","elements","points","horizontal","datum","offsetY","offsetX","reverse","state","emitter","coordinate"]);const d=r(t),p=n(t),{setState:g,removeState:m}=w5(u,k5(d,a)),v=new Map;var y=it(e,"mask");const b=p.map(t=>t.attributes.scale),x=t=>2<t.length?[t[0],t[t.length-1]]:t,w=new Map,M=()=>{w.clear();for(let t=0;t<p.length;t++){var e=b[t].getOptions()["domain"];w.set(t,x(e))}},k=(M(),(t,e)=>{var n=[];for(const r of d)(t=>Array.from(v.values()).every(([n,r,i,a])=>t.some(([t,e])=>n<=t&&t<=i&&r<=e&&e<=a)))(i(r))?(g(r,"active"),n.push(r)):g(r,"inactive");w.set(t,((t,e)=>{const n=b[e],{name:r}=n.getOptions(),i=t.map(t=>{const e=t.__data__;return n.invert(e[r])});return x(TO(n,i))})(n,t)),e&&h.emit("brushAxis:highlight",{nativeEvent:!0,data:{selection:(()=>{if(!E)return Array.from(w.values());var t,e,n=[];for([t,e]of w){var r=b[t].getOptions()["name"];"x"===r?n[0]=e:n[1]=e}return n})()}})}),E=p.some(s)&&p.some(t=>!s(t)),O=[];for(let a=0;a<p.length;a++){const P=p[a];const{hotZone:L,brushRegion:C,extent:N}=(s(P)?NS:CS)(P,{offsetY:o,offsetX:l,cross:E,zIndex:999,fill:"transparent"});P.parentNode.appendChild(L);var S=bS(L,Object.assign(Object.assign({},y),{reverse:c,brushRegion:C,brushended(t){if(v.delete(P),0===Array.from(v.entries()).length){var e=t;for(const n of d)m(n,"active","inactive");M(),e&&h.emit("brushAxis:remove",{nativeEvent:!0})}else k(a,t)},brushed(t,e,n,r,i){v.set(P,N(t,e,n,r)),k(a,i)}}));O.push(S)}const _=(t={})=>{t=t.nativeEvent;t||O.forEach(t=>t.remove())},A=(t,e,n)=>{var{height:r,width:i}=f.getOptions(),e=e.clone();return s(n)?e.update({range:[0,i]}):e.update({range:[r,0]}),e.map(t)},T=t=>{var e=t["nativeEvent"];if(!e){var n=t.data["selection"];for(let t=0;t<O.length;t++){var r,i=n[t],a=O[t],o=p[t];i?(r=b[t],a.move(...((t,e,n)=>{var[t,r]=t,t=A(t,e,n),e=A(r,e,n)+((r=e).getStep?r.getStep():0);return s(n)?[t,-1/0,e,1/0]:[-1/0,t,1/0,e]})(i,r,o),!1)):a.remove()}}};return h.on("brushAxis:remove",_),h.on("brushAxis:highlight",T),()=>{O.forEach(t=>t.destroy()),h.off("brushAxis:remove",_),h.off("brushAxis:highlight",T)}}function RS(l){return(t,e,n)=>{var{container:t,view:r,options:i}=t,{x:a,y:o}=g5(t).getBBox(),s=r["coordinate"];return jS(t,Object.assign({elements:f5,axes:TS,offsetY:o,offsetX:a,points:t=>t.__data__.points,horizontal:t=>{var{startPos:[t,e],endPos:[n,r]}=t.attributes;return t!==n&&e===r},datum:x5(r),state:M5(i,["active",["inactive",{opacity:.5}]]),coordinate:s,emitter:n},l))}}function IS(t,e){var{filter:a,reset:n,brushRegion:r,extent:i,reverse:o,emitter:s,selection:l}=e,e=it(nt(e,["filter","reset","brushRegion","extent","reverse","emitter","scale","coordinate","selection","series"]),"mask"),{width:c,height:u}=t.getBBox(),i=i||[0,0,c,u];const h=function(e=300){let n=null;return t=>{t=t.timeStamp;return null!==n&&t-n<e?(n=t,!0):(n=t,!1)}}(),f=bS(t,Object.assign(Object.assign({},e),{extent:i,brushRegion:r,reverse:o,brushcreated:function(t,e,n,r,i){i.nativeEvent=!0,a(l(t,e,n,r),i),f.remove()}}));function d(t){h(t)&&(t.nativeEvent=!0,n(t))}t.addEventListener("click",d);const p=({nativeEvent:t,data:e})=>{t||(t=e["selection"],a(t,{nativeEvent:!1}))};return s.on("brush:filter",p),()=>{f.destroy(),s.off("brush:filter",p),t.removeEventListener("click",d)}}function BS(t){var{hideX:f=!0,hideY:d=!0}=t,p=nt(t,["hideX","hideY"]);return(t,e,a)=>{const{container:n,view:r,options:o,update:s}=t;t=g5(n);let l=!1,c=!1,u=r;var{scale:i,coordinate:h}=r;return IS(t,Object.assign(Object.assign({brushRegion:(t,e,n,r)=>[t,e,n,r],selection:(t,e,n,r)=>{var{scale:i,coordinate:a}=u;return PO(t,e,n,r,i,a)},filter:(r,i)=>ce(this,void 0,void 0,function*(){if(!c){c=!0;const[e,n]=r;var t=o["marks"],t=t.map(t=>rt({axis:Object.assign(Object.assign({},f&&{x:{transform:[{type:"hide"}]}}),d&&{y:{transform:[{type:"hide"}]}})},t,{scale:{x:{domain:e},y:{domain:n}}})),t=(a.emit("brush:filter",Object.assign(Object.assign({},i),{data:{selection:[e,n]}})),Object.assign(Object.assign({},o),{marks:t,clip:!0})),t=yield s(t);u=t.view,c=!1,l=!0}}),reset:t=>{var e,n;!c&&l&&(e=r["scale"],{x:e,y:n}=e,e=e.getOptions().domain,n=n.getOptions().domain,a.emit("brush:filter",Object.assign(Object.assign({},t),{data:{selection:[e,n]}})),l=!1,u=r,s(o))},extent:void 0,emitter:a,scale:i,coordinate:h},{maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",unhighlightedOpacity:.5,reverse:!1}),p))}}function DS(t){return BS(Object.assign(Object.assign({hideX:!0},t),{brushRegion:kS}))}function FS(t){return BS(Object.assign(Object.assign({hideY:!0},t),{brushRegion:OS}))}const zS="slider";function GS(t){return[t[0],t[t.length-1]]}function WS({channelDomain:S,className:_=zS,prefix:A="slider",setValue:T=(t,e)=>t.setValues(e),hasState:P=!1,wait:L=50,leading:C=!0,trailing:N=!1}){return(t,e,c)=>{const{container:n,view:r,options:u,update:h}=t;t=n.getElementsByClassName(_);if(!t.length)return()=>{};let f=!1;const{scale:i,coordinate:a}=r,{x:o,y:s}=i,l=pp(a);const d=new Map,p=new Set;S=S||{x:o.getOptions().domain,y:s.getOptions().domain};for(const v of t){const y=v.attributes["orientation"],[b,x]=(m=y,g=void 0,g="vertical"===m?"y":"x",m="vertical"===m?"x":"y",l?[m,g]:[g,m]),w=""+A+en(b)+":filter",M="x"===b,k=o.getOptions()["ratio"],E=s.getOptions()["ratio"],O=t=>{var e,n;return t.data?(e=t.data["selection"],[e=GS(S.x),n=GS(S.y)]=e,M?[TO(o,e,k),TO(s,n,E)]:[TO(s,n,E),TO(o,e,k)]):(n=t.detail["value"],[function(t,e,n){var[t,r]=t;return TO(e,[AO(e,(n=n?t=>1-t:t=>t)(t),!0),AO(e,n(r),!1)])}(n,i[b],l&&"horizontal"===y),S[x]])};var g=dn(l=>ce(this,void 0,void 0,function*(){var t,e,n,r,i,a,o,s;f||(f=!0,{nativeEvent:t=!0}=l,[e,s]=O(l),S[b]=e,S[x]=s,[n,r,i,a=!1]=[u,{[b]:{domain:e},[x]:{domain:s}},A,P],o=(o=n["marks"]).map(t=>rt({axis:{x:{transform:[{type:"hide"}]},y:{transform:[{type:"hide"}]}}},t,{scale:r,[i]:Object.assign(Object.assign({},t[i].x&&{x:Object.assign({preserve:!0},a&&{ratio:null})}),t[i].y&&{y:Object.assign({preserve:!0},a&&{ratio:null})}),animate:!1})),n=Object.assign(Object.assign({},n),{marks:o,clip:!0,animate:!1}),t&&(o=M?e:s,s=M?s:e,c.emit(w,Object.assign(Object.assign({},l),{nativeEvent:t,data:{selection:[GS(o),GS(s)]}}))),yield h(n),f=!1)}),L,{leading:C,trailing:N}),m=t=>{var e,n=t["nativeEvent"];n||(n=t["data"],t=n["selection"],[t,e]=t,v.dispatchEvent(new cs("valuechange",{data:n,nativeEvent:!1})),n=M?LO(t,o):LO(e,s),T(v,n))};c.on(w,m),v.addEventListener("valuechange",g),d.set(v,g),p.add([w,m])}return()=>{for(var[t,e]of d)t.removeEventListener("valuechange",e);for(var[n,r]of p)c.off(n,r)}}}const YS="g2-scrollbar";function HS(o={}){return(t,e,n)=>{var r,{view:i,container:a}=t;return a.getElementsByClassName(YS).length?(a=i["scale"],{x:i,y:a}=a,r={x:i.getOptions().domain,y:a.getOptions().domain},i.update({domain:i.getOptions().expectedDomain}),a.update({domain:a.getOptions().expectedDomain}),WS(Object.assign(Object.assign({},o),{channelDomain:r,className:YS,prefix:"scrollbar",hasState:!0,setValue:(t,e)=>t.setValue(e[0])}))(t,e,n)):()=>{}}}const VS={backgroundColor:"rgba(0,0,0,0.75)",color:"#fff",width:"max-content",padding:"1px 4px",fontSize:"12px",borderRadius:"2.5px",boxShadow:"0 3px 6px -4px rgba(0,0,0,0.12), 0 6px 16px 0 rgba(0,0,0,0.08), 0 9px 28px 8px rgba(0,0,0,0.05)"};function qS(t){return"text"===t.nodeName&&!!t.isOverflowing()}function $S(t){var{offsetX:f=8,offsetY:d=8}=t,r=nt(t,["offsetX","offsetY"]);return t=>{const s=t["container"],[l,c]=s.getBounds().min,u=it(r,"tip"),h=new Set,e=t=>{var e,n,r,i,a,o=t["target"];qS(o)?({offsetX:e,offsetY:n}=t,e=e+f-l,n=n+d-c,o.tip?(o.tip.style.x=e,o.tip.style.y=n):(i=o.style["text"],a=new Gs({className:"poptip",style:{innerHTML:(r="div",i=i,a=Object.assign(Object.assign({},VS),u),`<${r} style="${Object.entries(a).map(([t,e])=>t.replace(/([A-Z])/g,"-$1").toLowerCase()+":"+e).join(";")}">${i}</${r}>`),x:e,y:n}}),s.appendChild(a),o.tip=a,h.add(a))):t.stopPropagation()},n=t=>{var e=t["target"];qS(e)?e.tip&&(e.tip.remove(),e.tip=null,h.delete(e.tip)):t.stopPropagation()};return s.addEventListener("pointerover",e),s.addEventListener("pointerout",n),()=>{s.removeEventListener("pointerover",e),s.removeEventListener("pointerout",n),h.forEach(t=>t.remove())}}}function US(n){return(t,...e)=>rt({},n(t,...e),t)}function XS(n){return(t,...e)=>rt({},t,n(t,...e))}function KS(t,e){var n;return t?Array.isArray(t)?t:({value:n=e}=t,t=nt(t,["value"]),Object.assign(Object.assign({},t),{value:n})):e}const ZS=()=>t=>{var e=t["children"];if(!Array.isArray(e))return[];const{x:o=0,y:s=0,width:l,height:c,data:u}=t;return e.map(t=>{var{data:e,x:n,y:r,width:i,height:a}=t,t=nt(t,["data","x","y","width","height"]);return Object.assign(Object.assign({},t),{data:KS(e,u),x:null!=n?n:o,y:null!=r?r:s,width:null!=i?i:l,height:null!=a?a:c})})},QS=(ZS.props={},()=>e=>{var n=e["children"];if(!Array.isArray(n))return[];var{direction:t="row",ratio:r=n.map(()=>1),padding:i=0,data:a}=e,[o,s,l,c]="col"===t?["y","height","width","x"]:["x","width","height","y"];const u=r.reduce((t,e)=>t+e),h=e[s]-i*(n.length-1);var f=r.map(t=>h*(t/u)),d=[];let p=e[o]||0;for(let t=0;t<f.length;t+=1){var g=n[t],m=g["data"],g=nt(g,["data"]),m=KS(m,a);d.push(Object.assign({[o]:p,[s]:f[t],[c]:e[c]||0,[l]:e[l],data:m},g)),p+=f[t]+i}return d}),JS=(QS.props={},()=>t=>{var e=t["children"],t=nt(t,["children"]);if(!Array.isArray(e))return[];const{data:s,scale:l={},axis:c={},legend:u={},encode:h={},transform:f=[]}=t,n=nt(t,["data","scale","axis","legend","encode","transform"]);t=e.map(t=>{var{data:e,scale:n={},axis:r={},legend:i={},encode:a={},transform:o=[]}=t,t=nt(t,["data","scale","axis","legend","encode","transform"]);return Object.assign({data:KS(e,s),scale:rt({},l,n),encode:rt({},h,a),transform:[...f,...o],axis:!(!r||!c)&&rt({},c,r),legend:!(!i||!u)&&rt({},u,i)},t)});return[Object.assign(Object.assign({},n),{marks:t,type:"standardView"})]}),t3=(JS.props={},()=>t=>{var{width:e,height:n,paddingLeft:r,paddingRight:i,paddingTop:a,paddingBottom:o,padding:s,inset:l,insetLeft:c,insetTop:u,insetRight:h,insetBottom:f,margin:d,marginLeft:p,marginBottom:g,marginTop:m,marginRight:v,data:y,coordinate:b,theme:x,component:w,interaction:M,x:k,y:E,key:O,frame:S,title:_,labelTransform:A,parentKey:T,clip:P,viewStyle:L}=t,t=nt(t,["width","height","paddingLeft","paddingRight","paddingTop","paddingBottom","padding","inset","insetLeft","insetTop","insetRight","insetBottom","margin","marginLeft","marginBottom","marginTop","marginRight","data","coordinate","theme","component","interaction","x","y","key","frame","title","labelTransform","parentKey","clip","viewStyle"]);return[{type:"standardView",x:k,y:E,key:O,width:e,height:n,padding:s,paddingLeft:r,paddingRight:i,paddingTop:a,inset:l,insetLeft:c,insetTop:u,insetRight:h,insetBottom:f,paddingBottom:o,theme:x,coordinate:b,component:w,interaction:M,frame:S,title:_,labelTransform:A,margin:d,marginLeft:p,marginBottom:g,marginTop:m,marginRight:v,parentKey:T,clip:P,style:L,marks:[Object.assign(Object.assign({},t),{key:O+"-0",data:y})]}]}),e3=(t3.props={},US(t=>{const{encode:e,data:i,scale:a,shareSize:o=!1}=t;var{x:t,y:n}=e,r=(e,t)=>{if(void 0===e||!o)return{};const n=Fd(i,t=>t[e]);var t=(null==(t=null===a||void 0===a?void 0:a[t])?void 0:t.domain)||Array.from(n.keys()),r=t.map(t=>n.has(t)?n.get(t).length:1);return{domain:t,flex:r}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:void 0===t?null:{position:"top"}},void 0===t&&{paddingInner:0}),r(t,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:void 0===n?null:{position:"right"}},void 0===n&&{paddingInner:0}),r(n,"y"))}}})),n3=US(t=>{const{data:e,scale:n}=t;var r=[t];let i,a,o;for(;r.length;){const{children:f,encode:d={},scale:n={},legend:p={}}=r.shift();var s=d["color"],l=n["color"],c=p["color"];void 0!==s&&(i=s),void 0!==l&&(a=l),void 0!==c&&(o=c),Array.isArray(f)&&r.push(...f)}var t="string"==typeof i?i:"",[u,h]=void 0!==(u=null==(u=null===n||void 0===n?void 0:n.color)?void 0:u.domain)?[u]:void 0===i?[void 0]:(u="function"==typeof i?i:t=>t[i],(u=e.map(u)).some(t=>"number"==typeof t)?[jd(u)]:[Array.from(new Set(u)),"ordinal"]);return{encode:{color:i},scale:{color:rt({},a,{domain:u,type:h})},legend:{color:rt({title:t},o)}}}),r3=US(()=>({animate:{enterType:"fadeIn"}})),i3=XS(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),a3=XS(()=>({type:"cell"})),o3=XS(c=>{var t=c["data"];return{data:{type:"inline",value:t,transform:[{type:"custom",callback:()=>{var{data:t,encode:e}=c;const{x:n,y:r}=e,i=n?Array.from(new Set(t.map(t=>t[n]))):[],a=r?Array.from(new Set(t.map(t=>t[r]))):[];if(i.length&&a.length){var o=[];for(const s of i)for(const l of a)o.push({[n]:s,[r]:l});return o}return i.length?i.map(t=>({[n]:t})):a.length?a.map(t=>({[r]:t})):void 0}}]}}}),s3=XS((t,c=function(t){t=t.points;return sy(t)},w=function(a){return(t,e)=>{var{rowIndex:t,rowValuesLength:n,columnIndex:r,columnValuesLength:i}=t;return t!==n-1?l3(a,e):(t=e.length?void 0:null,rt({title:r===i-1&&void 0,grid:t},a))}},M=function(r){return(t,e)=>{var{rowIndex:t,columnIndex:n}=t;return 0!==n?l3(r,e):(n=e.length?void 0:null,rt({title:0===t&&void 0,grid:n},r))}},k={})=>{const{data:e,encode:n,children:u,scale:r,x:E=0,y:O=0,shareData:h=!1,key:S}=t,_=e["value"],{x:A,y:T}=n;t=r.color;const P=t["domain"];return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:m,paddingTop:v}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=Z1(t);const s=t.map(c);n=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]);const l=n.map(([n,r])=>t=>{var{[A]:t,[T]:e}=t,t=void 0===A||t===n,e=void 0===T||e===r;return t&&e}).map(t=>_.filter(t)),y=h?ep(l,t=>t.length):void 0,b=n.map(([t,e])=>({columnField:A,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:T,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(u)?u:[u(t)].flat(1));return e.flatMap(c=>{const[u,h,f,d]=s[c],p=b[c],g=l[c];return x[c].map(t=>{var{scale:e,key:n,facet:r=!0,axis:i={}}=t,t=nt(t,["scale","key","facet","axis","legend"]),a=(null==(a=null==e?void 0:e.y)?void 0:a.guide)||i.y,o=(null==(o=null==e?void 0:e.x)?void 0:o.guide)||i.x,s={x:{tickCount:A?5:void 0},y:{tickCount:T?5:void 0}},r=r?g:0===g.length?[]:_,l={color:{domain:P}},o={x:c3(o,w)(p,r),y:c3(a,M)(p,r)};return Object.assign(Object.assign({key:n+"-"+c,data:r,x:u+m+E,y:h+v+O,parentKey:S,width:f,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!r.length,dataDomain:y,scale:rt(s,e,l),axis:rt({},i,o),legend:!1},t),k)})})}}});function l3(t,e){return e.length?rt({title:!1,tick:null,label:null},t):rt({title:!1,tick:null,label:null,grid:null},t)}function c3(t,e){return"function"==typeof t?t:null===t?()=>null:e(t)}const u3=()=>t=>{return[DO.of(t).call(a3).call(n3).call(r3).call(e3).call(i3).call(o3).call(s3).value()]},h3=(u3.props={},US(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),f3=XS(t=>{const{data:w,children:c,x:M=0,y:k=0,key:E}=t;return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:v,paddingTop:y}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=Z1(t);const s=t.map(({points:t})=>sy(t)),l=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]),b=l.map(([t,e])=>({columnField:t,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:e,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(c)?c:[c(t)].flat(1));return e.flatMap(c=>{const[u,h,f,d]=s[c],[p,g]=l[c],m=b[c];return x[c].map(t=>{var n,r,{scale:e,key:i,encode:a,axis:o}=t,t=nt(t,["scale","key","encode","axis"]),s=null==(s=null==e?void 0:e.y)?void 0:s.guide,l=null==(l=null==e?void 0:e.x)?void 0:l.guide,l={x:("function"==typeof(r=l)?r:null===r?()=>null:(t,e)=>{var{rowIndex:t,rowValuesLength:n}=t;if(t!==n-1)return l3(r,e)})(m,w),y:("function"==typeof(n=s)?n:null===n?()=>null:(t,e)=>{t=t.columnIndex;if(0!==t)return l3(n,e)})(m,w)};return Object.assign({data:w,parentKey:E,key:i+"-"+c,x:u+v+M,y:h+y+k,width:f,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:rt({x:{facet:!1},y:{facet:!1}},e),axis:rt({x:{tickCount:5},y:{tickCount:5}},o,l),legend:!1,encode:rt({},a,{x:p,y:g})},t)})})}}}),d3=XS(t=>{var e=t["encode"],t=nt(t,["encode"]),{position:n=[],x:r=n,y:i=[...n].reverse()}=e,n=nt(e,["position","x","y"]),a=[];for(const o of[r].flat(1))for(const s of[i].flat(1))a.push({$x:o,$y:s});return Object.assign(Object.assign({},t),{data:a,encode:Object.assign(Object.assign({},n),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},1===[r].flat(1).length&&{x:{paddingInner:0}}),1===[i].flat(1).length&&{y:{paddingInner:0}})})});const p3=()=>t=>{return[DO.of(t).call(a3).call(n3).call(f3).call(d3).call(r3).call(i3).call(h3).value()]},g3=US(t=>({scale:{x:{guide:{type:"axisArc"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),m3=US(t=>({coordinate:{type:"polar"}})),v3=t=>{var e=t["encode"],t=nt(t,["encode"]),e=e["position"];return Object.assign(Object.assign({},t),{encode:{x:e}})};function y3(t){return t=>null}function b3(t){var t=t["points"],[t,e,n,r]=t,i=ry(t,r),t=ey(t,r),r=oy(t,ey(e,n)),e=1/Math.sin(r/2),i=i/(1+e),a=i*Math.sqrt(2),[n,o]=n,t=ay(t)+r/2,r=i*e;return[n+r*Math.sin(t)-a/2,o+r*Math.cos(t)-a/2,a,a]}const x3=()=>t=>{return[DO.of(t).call(a3).call(v3).call(n3).call(m3).call(o3).call(s3,b3,y3,y3,{frame:!1}).call(r3).call(i3).call(g3).value()]};const w3=()=>t=>{const{children:e=[],duration:a=1e3,iterationCount:l=1,direction:c="normal",easing:o="ease-in-out-sine"}=t,u=e.length;if(!Array.isArray(e)||0===u)return[];const n=e[0]["key"],h=e.map(t=>Object.assign(Object.assign({},t),{key:n})).map(t=>{for(var e=a,n=o,r=[t];r.length;){var i=r.pop(),i=(i.animate=rt({enter:{duration:e},update:{duration:e,easing:n,type:"morphing",fill:"both"},exit:{type:"fadeOut",duration:e}},i.animate||{}),i)["children"];Array.isArray(i)&&r.push(...i)}return t});return function*(){let t=0,e;for(;"infinite"===l||t<l;){n=c,a=t,o=u,s=void 0,s=[0,o],o=[1-o,1];var[n,r]="normal"===n?s:"reverse"===n?o:"alternate"===n?a%2==0?s:o:"reverse-alternate"===n?a%2==0?o:s:void 0;for(let t=n;t<r;t+=1){var i=Math.abs(t);e!==i&&(yield h[i]),e=i}t++}var a,o,s}};function M3(t,e){if(null!==t)return{type:"column",value:t,field:e}}function k3(t,e){t=M3(t,e);return Object.assign(Object.assign({},t),{inferred:!0})}function E3(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function O3(t,e){var n=[];for(const r of t)n[r]=e;return n}function R(t,e){var t=t[e];return t?({value:e,field:t=null}=t,[e,t]):[null,null]}function S3(t,...e){for(const i of e){if("string"!=typeof i)return[i,null];var[n,r]=R(t,i);if(null!==n)return[n,r]}return[null,null]}function _3(t){return!(t instanceof Date)&&"object"==typeof t}w3.props={};const A3=()=>(t,e)=>{var n=e["encode"],n=n["y1"];return void 0!==n?[t,e]:[t,rt({},e,{encode:{y1:k3(O3(t,0))}})]};function T3(t,e,n){const r=n["encode"];if(null===t)return[e];n=t;const i=(Array.isArray(n)?n:[n]).map(t=>{return[t,null==(t=R(r,t))?void 0:t[0]]}).filter(([,t])=>c0(t));return Array.from(Fd(e,e=>i.map(([,t])=>t[e]).join("-")).values())}function P3(t){var a,r;return Array.isArray(t)?(a=t,(i,t,e)=>(n,r)=>a.reduce((t,e)=>0!==t?t:Od(i[n][e],i[r][e]),0)):"function"==typeof t?(r=t,(e,t,n)=>B3(t=>r(e[t]))):"series"===t?N3:"value"===t?j3:"sum"===t?R3:"maxIndex"===t?I3:()=>null}function L3(t,e){for(const n of t)n.sort(e)}function C3(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function N3(t,e,n){return B3(t=>n[t])}function j3(t,e,n){return B3(t=>e[t])}function R3(t,n,e){t=Z1(t),t=Array.from(Fd(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,e.reduce((t,e)=>t+ +n[e])]));return B3(t=>r.get(e[t]))}function I3(t,n,e){t=Z1(t),t=Array.from(Fd(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,np(e,t=>n[t])]));return B3(t=>r.get(e[t]))}function B3(n){return(t,e)=>Od(n(t),n(e))}A3.props={};const D3=(t={})=>{const{groupBy:T="x",orderBy:P=null,reverse:L=!1,y:C="y",y1:N="y1",series:j=!0}=t;return(t,e)=>{var{data:n,encode:r,style:i={}}=e,[a,o]=R(r,"y"),[s,l]=R(r,"y1"),[r]=j?S3(r,"series","color"):R(r,"color"),c=T3(T,t,e),n=P3(P)(n,a,r),u=(n&&L3(c,n),new Array(t.length)),h=new Array(t.length),f=new Array(t.length),d=[],p=[];for(const O of c){L&&O.reverse();var g=s?+s[O[0]]:0,m=[],v=[];for(const S of O){var y=f[S]=+a[S]-g;y<0?v.push(S):0<=y&&m.push(S)}var b=0<m.length?m:v,x=0<v.length?v:m;let t=m.length-1,e=0;for(;0<t&&0===a[b[t]];)t--;for(;e<x.length-1&&0===a[x[e]];)e++;d.push(b[t]),p.push(x[e]);let n=g;for(const _ of v.reverse()){var w=f[_];n=u[_]=(h[_]=n)+w}let r=g;for(const A of m){var M=f[A];0<M?r=u[A]=(h[A]=r)+M:u[A]=h[A]=r}}const k=new Set(d),E=new Set(p);r="y"===C?u:h,n="y"===N?u:h;return[t,rt({},e,{encode:{y0:k3(a,o),y:M3(r,o),y1:M3(n,l)},style:Object.assign({first:(t,e)=>k.has(e),last:(t,e)=>E.has(e)},i)})]}};function F3(t){t=t.type;return"string"==typeof t&&["stackY","dodgeX","groupX"].includes(t)}D3.props={};const z3=a=>(t,e,n)=>{var{encode:r,transform:i=[]}=e;return i.some(F3)||({x:i,y:r}=r,void 0===i)||void 0===r?[t,e]:(i=a["series"],r=i?["x","series"]:"x",D3({groupBy:r})(t,e,n))},G3=(z3.props={},(t={})=>{const{channel:s="x"}=t;return(t,e)=>{const n=e["encode"];var r=e["tooltip"];if(p0(r))return[t,e];r=r.title;if(void 0!==r)return[t,e];var i=Object.keys(n).filter(t=>t.startsWith(s)).filter(t=>!n[t].inferred).map(t=>R(n,t)).filter(([t])=>t).map(t=>t[0]);if(0===i.length)return[t,e];var a=[];for(const o of t)a[o]={value:i.map(t=>t[o]).join(", ")};return[t,rt({},e,{tooltip:{title:a}})]}}),W3=(G3.props={},()=>(t,e)=>{var n=e["encode"],n=n["x"];return void 0!==n?[t,e]:[t,rt({},e,{encode:{x:k3(O3(t,0))},scale:{x:{guide:null}}})]}),Y3=(W3.props={},()=>(t,e)=>{var n=e["encode"],n=n["y"];return void 0!==n?[t,e]:[t,rt({},e,{encode:{y:k3(O3(t,0))},scale:{y:{guide:null}}})]}),H3=(Y3.props={},()=>(t,e)=>{var n=e["encode"],n=n["size"];return void 0!==n?[t,e]:[t,rt({},e,{encode:{size:E3(O3(t,3))}})]}),V3=(H3.props={},()=>(t,e)=>{var n=e["encode"],r=n["key"],n=nt(n,["key"]);if(void 0!==r)return[t,e];const i=Object.values(n).map(({value:t})=>t);r=t.map(e=>i.filter(Array.isArray).map(t=>t[e]).join("-"));return[t,rt({},e,{encode:{key:M3(r)}})]}),q3=(V3.props={},()=>(t,e)=>{var n=e["encode"],{series:r,color:i}=n;return void 0!==r||void 0===i?[t,e]:([r,i]=R(n,"color"),[t,rt({},e,{encode:{series:M3(r,i)}})])}),$3=(q3.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(_3)?[t,e]:[t,rt({},e,{encode:{y:M3(n)}})]}),U3=($3.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(_3)?[t,e]:[t,rt({},e,{encode:{x:M3(n)}})]}),X3=(U3.props={},()=>(t,e)=>{var n=e["encode"],r=n["y1"];return r?[t,e]:([r]=R(n,"y"),[t,rt({},e,{encode:{y1:M3([...r])}})])}),K3=(X3.props={},()=>(t,e)=>{var n=e["encode"],r=n["x1"];return r?[t,e]:([r]=R(n,"x"),[t,rt({},e,{encode:{x1:M3([...r])}})])}),Z3=(K3.props={},t=>{const i=t["channel"];return(t,e)=>{const{encode:a,tooltip:n}=e;var r;return p0(n)||({items:r=[]}=n,!r)||0<r.length?[t,e]:(r=(Array.isArray(i)?i:[i]).flatMap(e=>Object.keys(a).filter(t=>t.startsWith(e)).map(t=>{var{field:e,value:n,inferred:r=!1,aggregate:i}=a[t];return r?null:i&&n?{channel:t}:e?{field:e}:n?{channel:t}:null}).filter(t=>null!==t)),[t,rt({},e,{tooltip:{items:r}})])}}),Q3=(Z3.props={},()=>(t,e)=>[t,rt({scale:{x:{padding:0},y:{padding:0}}},e)]),J3=(Q3.props={},()=>(t,e)=>{var{style:n={}}=e,r=nt(e,["data","style"]),{x:i,y:a}=n,n=nt(n,["x","y"]);return null==i||null==a?[t,e]:[[0],rt({},r,{data:[0],cartesian:!0,encode:{x:M3([i||0]),y:M3([a||0])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:n})]}),t_=(J3.props={},()=>(t,e)=>{var{style:n={}}=e;return[t,rt({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]}),e_=(t_.props={},()=>(t,e)=>{var n,r=e["data"];return!Array.isArray(r)||r.some(_3)?[t,e]:(n=(r=Array.isArray(r[0])?r:[r]).map(t=>t[0]),r=r.map(t=>t[1]),[t,rt({},e,{encode:{x:M3(n),y:M3(r)}})])}),n_=(e_.props={},()=>(t,e)=>{var{style:n={}}=e,n=n["gradient"];return n?[t,rt({},e,{encode:{series:E3(O3(t,void 0))}})]:[t,e]}),r_=(n_.props={},(t={})=>{const{groupBy:c="x",reverse:u=!1,orderBy:h,padding:f}=t;return nt(t,["groupBy","reverse","orderBy","padding"]),(t,e)=>{var{data:n,encode:r,scale:i}=e,i=i["series"],[a]=R(r,"y"),[r]=S3(r,"series","color"),o=C3(r,i),i=T3(c,t,e),n=P3(h)(n,a,r),s=(n&&L3(i,n),new Array(t.length));for(const l of i){u&&l.reverse();for(let t=0;t<l.length;t++)s[l[t]]=o[t]}return[t,rt({},e,{scale:{series:{domain:o,paddingInner:f}},encode:{series:M3(s)}})]}}),i_=(r_.props={},t=>{const{groupBy:p=["x"],reducer:g=(t,e)=>e[t[0]],orderBy:m=null,reverse:v=!1,duration:y}=t;return(n,t)=>{const e=t["encode"];var r=(Array.isArray(p)?p:[p]).map(t=>[t,R(e,t)[0]]);if(0===r.length)return[n,t];let i=[n];for(const[,h]of r){var a=[];for(const n of i){var o=Array.from(Fd(n,t=>h[t]).values());a.push(...o)}i=a}if(m){const[f]=R(e,m);f&&i.sort((t,e)=>g(t,f)-g(e,f)),v&&i.reverse()}r=(y||3e3)/i.length;const[s]=y?[O3(n,r)]:S3(e,"enterDuration",O3(n,r));var[l]=S3(e,"enterDelay",O3(n,0)),c=new Array(n.length);for(let t=0,e=0;t<i.length;t++){const n=i[t];var u=ep(n,t=>+s[t]);for(const d of n)c[d]=+l[d]+e;e+=u}return[n,rt({},t,{encode:{enterDuration:E3(s),enterDelay:E3(c)}})]}});i_.props={};const a_=(t={})=>{const{groupBy:p="x",basis:g="max"}=t;return(e,t)=>{const{encode:n,tooltip:r}=t;var i=nt(n,["x"]),a=Object.entries(i).filter(([t])=>t.startsWith("y")).map(([t])=>[t,R(n,t)[0]]),[,o]=a.find(([t])=>"y"===t),s=a.map(([t])=>[t,new Array(e.length)]),i=T3(p,e,t),l="function"==typeof(f=g)?f:{min:(t,e)=>rp(t,t=>e[+t]),max:(t,e)=>ep(t,t=>e[+t]),first:(t,e)=>e[t[0]],last:(t,e)=>e[t[t.length-1]],mean:(t,e)=>cp(t,t=>e[+t]),median:(t,e)=>up(t,t=>e[+t]),sum:(t,e)=>dp(t,t=>e[+t]),deviation:(t,e)=>Nd(t,t=>e[+t])}[f]||ep;for(const e of i){var c=l(e,o);for(const d of e)for(let t=0;t<a.length;t++){var[,u]=a[t],[,h]=s[t];h[d]=+u[d]/c}}var f=p0(r)||(null==r?void 0:r.items)&&0!==(null==r?void 0:r.items.length);return[e,rt({},t,Object.assign({encode:Object.fromEntries(s.map(([t,e])=>[t,M3(e,R(n,t)[1])]))},!f&&n.y0&&{tooltip:{items:[{channel:"y0"}]}}))]}};function o_(t,e,n){return null===t?[-.5,.5]:(t=C3(t,e),[-(e=new h1({domain:t,range:[0,1],padding:n}).getBandWidth())/2,e/2])}function s_(t,e,n){return e*(1-t)+n*t}a_.props={};const l_=(t={})=>{const{padding:e=0,paddingX:l=e,paddingY:c=e,random:u=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,{x:r,y:i}=r,[a]=R(n,"x"),[n]=R(n,"y");const o=o_(a,r,l),s=o_(n,i,c);a=t.map(()=>s_(u(),...s)),r=t.map(()=>s_(u(),...o));return[t,rt({scale:{x:{padding:.5},y:{padding:.5}}},e,{encode:{dy:M3(a),dx:M3(r)}})]}},c_=(l_.props={},(t={})=>{const{padding:a=0,random:o=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,r=r["x"],[n]=R(n,"x");const i=o_(n,r,a);n=t.map(()=>s_(o(),...i));return[t,rt({scale:{x:{padding:.5}}},e,{encode:{dx:M3(n)}})]}}),u_=(c_.props={},(t={})=>{const{groupBy:g="x"}=t;return(e,t)=>{const n=t["encode"];var r=nt(n,["x"]);const i=Object.entries(r).filter(([t])=>t.startsWith("y")).map(([t])=>[t,R(n,t)[0]]);var a=i.map(([t])=>[t,new Array(e.length)]),o=T3(g,e,t),s=new Array(o.length);for(let t=0;t<o.length;t++){const e=o[t];var[l,c]=jd(e.flatMap(e=>i.map(([,t])=>+t[e])));s[t]=(l+c)/2}var u=Math.max(...s);for(let t=0;t<o.length;t++){var h=u-s[t];const e=o[t];for(const p of e)for(let t=0;t<i.length;t++){var[,f]=i[t],[,d]=a[t];d[p]=+f[p]+h}}return[e,rt({},t,{encode:Object.fromEntries(a.map(([t,e])=>[t,M3(e,R(n,t)[1])]))})]}}),h_=(u_.props={},(t={})=>{const{groupBy:u="x",series:h=!0}=t;return(t,e)=>{var n=e["encode"];const[r]=R(n,"y");var[,i]=R(n,"y1"),n=(h?S3(n,"series","color"):R(n,"color"),T3(u,t,e)),a=new Array(t.length);for(const c of n){var o=c.map(t=>+r[t]);for(let n=0;n<c.length;n++){var s=c[n],l=Math.max(...o.filter((t,e)=>e!==n));a[s]=r[s]>l?l:r[s]}}return[t,rt({},e,{encode:{y1:M3(a,i)}})]}});function f_(t,e){return[t[0]]}function d_(t,e){return[t[t.length-1]]}function p_(t,e){return[t[np(t,t=>e[t])]]}function g_(t,e){return[t[ip(t,t=>e[t])]]}h_.props={};const m_=(t={})=>{const{groupBy:a="series",channel:o,selector:s}=t;return(t,e)=>{var n=e["encode"],t=T3(a,t,e);const[r]=R(n,o),i="function"==typeof(n=s)?n:{first:f_,last:d_,max:p_,min:g_}[n]||f_;return[t.flatMap(t=>i(t,r)),e]}},v_=(m_.props={},(t={})=>{var e=t["selector"],t=nt(t,["selector"]);return m_(Object.assign({channel:"x",selector:e},t))}),y_=(v_.props={},(t={})=>{var e=t["selector"],t=nt(t,["selector"]);return m_(Object.assign({channel:"y",selector:e},t))});function b_(e){return t=>null===t?e:e+" of "+t}function x_(){return[(t,e)=>cp(t,t=>+e[t]),b_("mean")]}function w_(){return[(t,e)=>up(t,t=>+e[t]),b_("median")]}function M_(){return[(t,e)=>ep(t,t=>+e[t]),b_("max")]}function k_(){return[(t,e)=>rp(t,t=>+e[t]),b_("min")]}function E_(){return[(t,e)=>t.length,b_("count")]}function O_(){return[(t,e)=>dp(t,t=>+e[t]),b_("sum")]}function S_(){return[(t,e)=>e[t[0]],b_("first")]}function __(){return[(t,e)=>e[t[t.length-1]],b_("last")]}y_.props={};const A_=(t={})=>{const i=t["groupBy"],a=nt(t,["groupBy"]);return(t,e)=>{const{data:s,encode:l}=e,c=i(t,e);if(!c)return[t,e];var t=Object.entries(a).map(([t,e])=>{const[n,r]=function(t){if("function"==typeof t)return[t,null];var e={mean:x_,max:M_,count:E_,first:S_,last:__,sum:O_,min:k_,median:w_}[t];if(e)return e();throw new Error(`Unknown reducer: ${t}.`)}(e),[i,a]=R(l,t);e=e;var e=(o=a)||((e=e["from"])?([,e]=R(l,e),e):o),o=c.map(t=>n(t,null!==i&&void 0!==i?i:s));return[t,Object.assign(Object.assign({},(t=o,o=(null==r?void 0:r(e))||e,t=M3(t,o),Object.assign(Object.assign({},t),{constant:!1}))),{aggregate:!0})]}),n=Object.keys(l).map(t=>{const[e,n]=R(l,t);return[t,M3(c.map(t=>e[t[0]]),n)]}),r=c.map(t=>s[t[0]]);return[Z1(c),rt({},e,{data:r,encode:Object.fromEntries([...n,...t])})]}},T_=(A_.props={},(t={})=>{const{channels:n=["x","y"]}=t,e=nt(t,["channels"]);return A_(Object.assign(Object.assign({},e),{groupBy:(t,e)=>T3(n,t,e)}))}),P_=(T_.props={},(t={})=>T_(Object.assign(Object.assign({},t),{channels:["x","color","series"]}))),L_=(P_.props={},(t={})=>T_(Object.assign(Object.assign({},t),{channels:["y","color","series"]}))),C_=(L_.props={},(t={})=>T_(Object.assign(Object.assign({},t),{channels:["color"]})));function N_(t,e,n){var{reverse:r,slice:i,channel:a}=n,n=nt(n,["reverse","slice","channel"]),{encode:o,scale:s={}}=e,s=null==(s=s[a])?void 0:s.domain;const[l]=R(o,a);var c,n=function(t,e,n){const{by:r=t,reducer:i="max"}=e,[a]=R(n,r);if("function"==typeof i)return t=>i(t,a);if("max"===i)return t=>ep(t,t=>+a[t]);if("min"===i)return t=>rp(t,t=>+a[t]);if("sum"===i)return t=>dp(t,t=>+a[t]);if("median"===i)return t=>up(t,t=>+a[t]);if("mean"===i)return t=>cp(t,t=>+a[t]);if("first"===i)return t=>a[t[0]];if("last"===i)return t=>a[t[t.length-1]];throw new Error("Unknown reducer: "+i)}(a,n,o),o=function(t,e,n){if(!Array.isArray(n))return t;const r=new Set(n);return t.filter(t=>r.has(e[t]))}(t,l,s),n=(s=o,o=t=>l[t],(2!==(c=n).length?Yd(zd(s,c,o),([t,e],[n,r])=>Od(e,r)||Od(t,n)):Yd(Fd(s,o),([t,e],[n,r])=>c(e,r)||Od(t,n))).map(([t])=>t)),s=(r&&n.reverse(),"number"==typeof i?[0,i]:i),o=i?n.slice(...s):n;return[t,rt(e,{scale:{[a]:{domain:o}}})]}C_.props={};const j_=(t={})=>{const{reverse:o=!1,slice:s,channel:l,ordinal:c=!0}=t,u=nt(t,["reverse","slice","channel","ordinal"]);return(t,e)=>{if(c)return N_(t,e,Object.assign({reverse:o,slice:s,channel:l},u));{var n=Object.assign({reverse:o,slice:s,channel:l},u);var{reverse:n,channel:r}=n,i=e["encode"];const[a]=R(i,r);return i=Yd(t,t=>a[t]),n&&i.reverse(),[i,e]}}},R_=(j_.props={},(t={})=>j_(Object.assign(Object.assign({},t),{channel:"x"}))),I_=(R_.props={},(t={})=>j_(Object.assign(Object.assign({},t),{channel:"color"}))),B_=(I_.props={},(t={})=>j_(Object.assign(Object.assign({},t),{channel:"y"})));B_.props={};const D_=(t={})=>{const{field:o,channel:s="y",reducer:l="sum"}=t;return(t,e)=>{var{data:n,encode:r}=e;const[i]=R(r,"x");var a,n=o?(n=n,"string"==typeof(a=o)?n.map(t=>t[a]):n.map(a)):R(r,s)[0],r=Gd(t,function(e,n){if("function"==typeof e)return t=>e(t,n);if("sum"===e)return t=>dp(t,t=>+n[t]);throw new Error("Unknown reducer: "+e)}(l,n),t=>i[t]).map(t=>t[1]);return[t,rt({},e,{scale:{x:{flex:r}}})]}};function F_(t,e,n){var r=t.length;if(0===r)return[];var{innerWidth:i,innerHeight:a}=n;let l=Math.ceil(Math.sqrt(e/(a/i))),c=i/l,u=Math.ceil(e/l),o=u*c;for(;o>a;)l+=1,c=i/l,u=Math.ceil(e/l),o=u*c;const h=a-u*c,f=u<=1?0:h/(u-1),[d,p]=u<=1?[(i-r*c)/(r-1),(a-c)/2]:[0,0];return t.map((t,e)=>{var[t,n,r,i]=sy(t),a=e%l,e=Math.floor(e/l),o=a*c,s=(u-e-1)*c+h,r=c/r,i=c/i;return`translate(${o-t+d*a}, ${s-n-f*e-p}) scale(${r}, ${i})`})}D_.props={};const z_=()=>(t,e)=>[t,rt({},e,{modifier:F_,axis:!1})],G_=(z_.props={},"thresholds");function W_(t){var e,[n,r]=jd(t);return Math.min(200,(n=n,r=r,e=Cd(t=t),t=Nd(t),e&&t?Math.ceil((r-n)*Math.cbrt(e)/(3.49*t)):1))}const Y_=(t={})=>{const{groupChannels:s=["color"],binChannels:l=["x","y"]}=t,c=nt(t,["groupChannels","binChannels"]),u={};return A_(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(c).filter(([t])=>!t.startsWith(G_)))),Object.fromEntries(l.flatMap(e=>{var t=([t])=>+u[e].get(t).split(",")[1];return[[t.from=e,([t])=>+u[e].get(t).split(",")[0]],[e+"1",t]]}))),{groupBy:(t,e)=>{const n=e["encode"],i=l.map(t=>{var[t]=R(n,t);return t}),a=it(c,G_),o=t.filter(e=>i.every(t=>c0(t[e]))),r=[...s.map(t=>{var[t]=R(n,t);return t}).filter(c0).map(e=>t=>e[t]),...l.map((t,e)=>{const n=i[e];e=a[t]||W_(n),e=tp().thresholds(e).value(t=>+n[t])(o);const r=new Map(e.flatMap(t=>{var{x0:e,x1:n}=t;const r=e+","+n;return t.map(t=>[t,r])}));return u[t]=r,t=>r.get(t)})];return Array.from(Fd(o,e=>r.map(t=>t(e)).join("-")).values())}}))},H_=(Y_.props={},(t={})=>{var e=t["thresholds"];return Y_(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))});function V_(e,n,r,t){var a=e.length;if(a<=t||0===t)return e;var o,s=t=>+n[e[t]],l=t=>+r[e[t]],c=[],u=(a-2)/(t-2);let h=0,f,d;c.push(h);for(let i=0;i<t-2;i++){let t=0,e=0,n=Math.floor((i+1)*u)+1;for(var p=Math.floor((i+2)*u)+1,g=(p=Math.min(p,a))-n;n<p;n++)t+=s(n),e+=l(n);t/=g,e/=g;let r=Math.floor((i+0)*u)+1;var m=Math.floor((i+1)*u)+1,v=[s(h),l(h)];for(f=-1;r<m;r++)(o=.5*Math.abs((v[0]-t)*(s(r)-v[1])-(v[0]-l(r))*(e-v[0])))>f&&(f=o,d=r);c.push(d),h=d}return c.push(a-1),c.map(t=>e[t])}function q_(t){if("function"==typeof t)return t;if("lttb"===t)return V_;var e={first:t=>[t[0]],last:t=>[t[t.length-1]],min:(t,e,n)=>[t[ip(t,t=>n[t])]],max:(t,e,n)=>[t[np(t,t=>n[t])]],median:(t,e,n)=>{return[t[lp(t,.5,t=>n[t])]]}};const i=e[t]||e.median;return(t,e,n,r)=>{return function(t,e){var n=t.length,r=[];let i=0;for(;i<n;)r.push(t.slice(i,i+=e));return r}(t,Math.max(1,Math.floor(t.length/r))).flatMap(t=>i(t,e,n))}}H_.props={};const $_=(t={})=>{const{strategy:e="median",thresholds:a=2e3,groupBy:o=["series","color"]}=t,s=q_(e);return(t,e)=>{var n=e["encode"],t=T3(o,t,e);const[r]=R(n,"x"),[i]=R(n,"y");return[t.flatMap(t=>s(t,r,i,a)),e]}},U_=($_.props={},(s={})=>(t,e)=>{const{encode:i,data:n}=e,r=Object.entries(s).map(([t,e])=>{const[n]=R(i,t);if(!n)return null;if("function"==typeof e)return t=>e(n[t]);const r=Array.isArray(e)?e:[e];return 0===r.length?null:t=>r.includes(n[t])}).filter(c0);if(0===r.length)return[t,e];const a=t.filter(e=>r.every(t=>t(e))),o=a.map((t,e)=>e);t=Object.entries(i).map(([t,e])=>[t,Object.assign(Object.assign({},e),{value:o.map(t=>e.value[a[t]])})]);return[o,rt({},e,{encode:Object.fromEntries(t),data:a.map(t=>n[t])})]});function X_(t){var{min:t,max:e}=t;return[[t[0],t[1]],[e[0],e[1]]]}function K_(t,e){var[t,n]=t,[e,r]=e;return t>=e[0]&&t<=r[0]&&n>=e[1]&&n<=r[1]}U_.props={};const Z_=t=>{const r=t["priority"];return(t,e)=>{const n=[];return r&&t.sort(r),t.forEach(t=>{h5(t);const i=t.getLocalBounds();n.some(t=>{var e=X_(i),t=X_(t.getLocalBounds()),[e,n]=e,[t,r]=t;return e[0]<r[0]&&n[0]>t[0]&&e[1]<r[1]&&n[1]>t[1]})?u5(t):n.push(t)}),t}};function Q_(){const n=new Map;return[t=>n.get(t),(t,e)=>n.set(t,e)]}const J_=t=>{const{maxIterations:M=10,maxError:k=.1,padding:E=1}=t;return i=>{var e=i.length;if(!(e<=1)){const[g,m]=Q_(),[v,y]=Q_();var a,o,s,l,[c,t]=Q_(),[u,n]=Q_();for(const b of i){var{min:r,max:h}=function(t){var t=t.cloneNode(!0),{min:e,max:n}=((e=t.getElementById("connector"))&&t.removeChild(e),t.getRenderBounds());return t.destroy(),{min:e,max:n}}(b);const[x,g]=r;var[r,h]=h;m(b,g),y(b,g),t(b,h-g),n(b,[x,r])}for(let t=0;t<M;t++){i.sort((t,e)=>Od(v(t),v(e)));let r=0;for(let n=0;n<e-1;n++){var f=i[n];let t=n+1,e;for(;(e=i[t])&&([[a,o],[s,l]]=[u(f),u(e)],!(a<l&&s<o));)t+=1;if(e){const g=v(f);var d=c(f),p=v(e),d=p-(g+d);d<E&&(d=(E-d)/2,r=Math.max(r,d),y(f,g-d),y(e,p+d))}}if(r<k)break}for(const w of i)w.style.y+=v(w)-g(w)}return i}};function tA(t){t/=255;return t<=.03928?t/12.92:Math.pow((.055+t)/1.055,2.4)}function eA(t,e,n){return.2126*tA(t)+.7152*tA(e)+.0722*tA(n)}function nA(t,e){var{r:t,g:n,b:r}=t,{r:e,g:i,b:a}=e,t=eA(t,n,r),n=eA(e,i,a);return(Math.max(t,n)+.05)/(Math.min(t,n)+.05)}function rA(e,t){return t[np(t,t=>{return nA(e,"object"==typeof(t=t)?t:$a(t))})]}const iA=t=>{const{threshold:n=4.5,palette:r=["#000","#fff"]}=t;return(t,e)=>(t.forEach(t=>{var e=t.attr("dependentElement").parsedStyle.fill;nA(t.parsedStyle.fill,e)<n&&t.attr("fill",rA(e,r))}),t)},aA=t=>(t,e)=>(t.forEach(t=>{h5(t);var e=t.attr("bounds");!function(t,e){var[t,n]=t;return!(K_(t,e)&&K_(n,e))}(X_(t.getLocalBounds()),e)||u5(t)}),t);var P=1e-6,oA=1e-12,T=Math.PI,sA=T/2,lA=T/4,cA=2*T,uA=180/T,hA=T/180,fA=Math.abs,dA=Math.atan,pA=Math.atan2,C=Math.cos,gA=Math.ceil,mA=Math.exp,vA=Math.log,yA=Math.pow,N=Math.sin,bA=Math.sign||function(t){return 0<t?1:t<0?-1:0},xA=Math.sqrt,wA=Math.tan;function MA(t){return 1<t?0:t<-1?T:Math.acos(t)}function kA(t){return 1<t?sA:t<-1?-sA:Math.asin(t)}function EA(){}function OA(t,e){t&&_A.hasOwnProperty(t.type)&&_A[t.type](t,e)}var SA={Feature:function(t,e){OA(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)OA(n[r].geometry,e)}},_A={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){AA(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)AA(n[r],e,0)},Polygon:function(t,e){TA(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)TA(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)OA(n[r],e)}};function AA(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function TA(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)AA(t[n],e,1);e.polygonEnd()}function PA(t,e){t&&SA.hasOwnProperty(t.type)?SA[t.type](t,e):OA(t,e)}function LA(t){return[pA(t[1],t[0]),kA(t[2])]}function CA(t){var e=t[0],t=t[1],n=C(t);return[n*C(e),n*N(e),N(t)]}function NA(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function jA(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function RA(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function IA(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function BA(t){var e=xA(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function DA(n,r){function t(t,e){return t=n(t,e),r(t[0],t[1])}return n.invert&&r.invert&&(t.invert=function(t,e){return(t=r.invert(t,e))&&n.invert(t[0],t[1])}),t}function FA(t,e){return fA(t)>T&&(t-=Math.round(t/cA)*cA),[t,e]}function zA(t,e,n){return(t%=cA)?e||n?DA(WA(t),YA(e,n)):WA(t):e||n?YA(e,n):FA}function GA(n){return function(t,e){return fA(t+=n)>T&&(t-=Math.round(t/cA)*cA),[t,e]}}function WA(t){var e=GA(t);return e.invert=GA(-t),e}function YA(t,e){var i=C(t),a=N(t),o=C(e),s=N(e);function n(t,e){var n=C(e),r=C(t)*n,t=N(t)*n,n=N(e),e=n*i+r*a;return[pA(t*o-e*s,r*i-n*a),kA(e*o+t*s)]}return n.invert=function(t,e){var n=C(e),r=C(t)*n,t=N(t)*n,n=N(e),e=n*o-t*s;return[pA(t*o+n*s,r*i+e*a),kA(e*i-r*a)]},n}function HA(t,e){(e=CA(e))[0]-=t,BA(e);t=MA(-e[1]);return((-e[2]<0?-t:t)+cA-P)%cA}function VA(){var r,e=[];return{point:function(t,e,n){r.push([t,e,n])},lineStart:function(){e.push(r=[])},lineEnd:EA,rejoin:function(){1<e.length&&e.push(e.pop().concat(e.shift()))},result:function(){var t=e;return e=[],r=null,t}}}function qA(t,e){return fA(t[0]-e[0])<P&&fA(t[1]-e[1])<P}function $A(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function UA(t,e,n,r,a){var o,i,s=[],l=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],i=t[e];if(qA(r,i)){if(!r[2]&&!i[2]){for(a.lineStart(),o=0;o<e;++o)a.point((r=t[o])[0],r[1]);return void a.lineEnd()}i[0]+=2*P}s.push(n=new $A(r,t,null,!0)),l.push(n.o=new $A(r,null,n,!1)),s.push(n=new $A(i,t,null,!1)),l.push(n.o=new $A(i,null,n,!0))}}),s.length){for(l.sort(e),XA(s),XA(l),o=0,i=l.length;o<i;++o)l[o].e=n=!n;for(var c,u,h=s[0];;){for(var f=h,d=!0;f.v;)if((f=f.n)===h)return;c=f.z,a.lineStart();do{if(f.v=f.o.v=!0,f.e){if(d)for(o=0,i=c.length;o<i;++o)a.point((u=c[o])[0],u[1]);else r(f.x,f.n.x,1,a);f=f.n}else{if(d)for(c=f.p.z,o=c.length-1;0<=o;--o)a.point((u=c[o])[0],u[1]);else r(f.x,f.p.x,-1,a);f=f.p}}while(c=(f=f.o).z,d=!d,!f.v);a.lineEnd()}}}function XA(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function KA(t){return fA(t[0])<=T?t[0]:bA(t[0])*((fA(t[0])+T)%cA-T)}function ZA(m,v,y,b){return function(s){var l,c,u,n=v(s),h=VA(),f=v(h),d=!1,e={point:r,lineStart:i,lineEnd:a,polygonStart:function(){e.point=p,e.lineStart=o,e.lineEnd=g,c=[],l=[]},polygonEnd:function(){e.point=r,e.lineStart=i,e.lineEnd=a,c=hp(c);var t=function(t,e){var n=KA(e),r=e[1],e=N(r),i=[N(n),-C(n),0],a=0,o=0,s=new Rd;1===e?r=sA+P:-1===e&&(r=-sA-P);for(var l=0,c=t.length;l<c;++l)if(h=(u=t[l]).length)for(var u,h,f=u[h-1],d=KA(f),p=f[1]/2+lA,g=N(p),m=C(p),v=0;v<h;++v,d=b,g=w,m=x,f=y){var y=u[v],b=KA(y),x=y[1]/2+lA,w=N(x),x=C(x),M=b-d,k=0<=M?1:-1,E=k*M,O=T<E,S=g*w;s.add(pA(S*k*N(E),m*x+S*C(E))),a+=O?M+k*cA:M,O^n<=d^n<=b&&(BA(S=jA(CA(f),CA(y))),BA(E=jA(i,S)),(k=(O^0<=M?-1:1)*kA(E[2]))<r||r===k&&(S[0]||S[1]))&&(o+=O^0<=M?1:-1)}return(a<-P||a<P&&s<-oA)^1&o}(l,b);c.length?(d||(s.polygonStart(),d=!0),UA(c,JA,t,y,s)):t&&(d||(s.polygonStart(),d=!0),s.lineStart(),y(null,null,1,s),s.lineEnd()),d&&(s.polygonEnd(),d=!1),c=l=null},sphere:function(){s.polygonStart(),s.lineStart(),y(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function r(t,e){m(t,e)&&s.point(t,e)}function t(t,e){n.point(t,e)}function i(){e.point=t,n.lineStart()}function a(){e.point=r,n.lineEnd()}function p(t,e){u.push([t,e]),f.point(t,e)}function o(){f.lineStart(),u=[]}function g(){p(u[0][0],u[0][1]),f.lineEnd();var t,e,n,r,i=f.clean(),a=h.result(),o=a.length;if(u.pop(),l.push(u),u=null,o)if(1&i){if(0<(e=(n=a[0]).length-1)){for(d||(s.polygonStart(),d=!0),s.lineStart(),t=0;t<e;++t)s.point((r=n[t])[0],r[1]);s.lineEnd()}}else 1<o&&2&i&&a.push(a.pop().concat(a.shift())),c.push(a.filter(QA))}return e}}function QA(t){return 1<t.length}function JA(t,e){return((t=t.x)[0]<0?t[1]-sA-P:sA-t[1])-((e=e.x)[0]<0?e[1]-sA-P:sA-e[1])}FA.invert=FA;var t4=ZA(function(){return 1},function(c){var u,h=NaN,f=NaN,d=NaN;return{lineStart:function(){c.lineStart(),u=1},point:function(t,e){var n,r,i,a,o,s=0<t?T:-T,l=fA(t-h);fA(l-T)<P?(c.point(h,f=0<(f+e)/2?sA:-sA),c.point(d,f),c.lineEnd(),c.lineStart(),c.point(s,f),c.point(t,f),u=0):d!==s&&T<=l&&(fA(h-d)<P&&(h-=d*P),fA(t-s)<P&&(t-=s*P),l=f,i=e,o=N((n=h)-(r=t)),f=fA(o)>P?dA((N(l)*(a=C(i))*N(r)-N(i)*(r=C(l))*N(n))/(r*a*o)):(l+i)/2,c.point(d,f),c.lineEnd(),c.lineStart(),c.point(s,f),u=0),c.point(h=t,f=e),d=s},lineEnd:function(){c.lineEnd(),h=f=NaN},clean:function(){return 2-u}}},function(t,e,n,r){var i;null==t?(i=n*sA,r.point(-T,i),r.point(0,i),r.point(T,i),r.point(T,0),r.point(T,-i),r.point(0,-i),r.point(-T,-i),r.point(-T,0),r.point(-T,i)):fA(t[0]-e[0])>P?(t=t[0]<e[0]?T:-T,i=n*t/2,r.point(-t,i),r.point(0,i),r.point(t,i)):r.point(e[0],e[1])},[-T,-sA]);function e4(d){var g=C(d),p=6*hA,h=0<g,f=fA(g)>P;function m(t,e){return C(t)*C(e)>g}function v(t,e,n){var r,i,a,o,s,l,c,u=[1,0,0],h=jA(CA(t),CA(e)),f=NA(h,h),d=h[0],p=f-d*d;return p?(r=jA(u,h),RA(u=IA(u,g*f/p),IA(h,-g*d/p)),(p=(h=NA(u,f=r))*h-(d=NA(f,f))*(NA(u,u)-1))<0?void 0:(RA(p=IA(f,(-h-(r=xA(p)))/d),u),p=LA(p),n?(i=t[0],a=e[0],o=t[1],e=e[1],a<i&&(c=i,i=a,a=c),!(l=fA((s=a-i)-T)<P)&&e<o&&(c=o,o=e,e=c),(l||s<P?l?0<o+e^p[1]<(fA(p[0]-i)<P?o:e):o<=p[1]&&p[1]<=e:T<s^(i<=p[0]&&p[0]<=a))?(RA(c=IA(f,(-h+r)/d),u),[p,LA(c)]):void 0):p)):!n&&t}function y(t,e){var n=h?d:T-d,r=0;return t<-n?r|=1:n<t&&(r|=2),e<-n?r|=4:n<e&&(r|=8),r}return ZA(m,function(a){var o,s,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(t,e){var n,r=[t,e],i=m(t,e),t=h?i?0:y(t,e):i?y(t+(t<0?T:-T),e):0;!o&&(c=l=i)&&a.lineStart(),i===l||(n=v(o,r))&&!qA(o,n)&&!qA(r,n)||(r[2]=1),i!==l?(u=0,i?(a.lineStart(),n=v(r,o),a.point(n[0],n[1])):(n=v(o,r),a.point(n[0],n[1],2),a.lineEnd()),o=n):f&&o&&h^i&&(t&s||!(e=v(r,o,!0))||(u=0,h?(a.lineStart(),a.point(e[0][0],e[0][1]),a.point(e[1][0],e[1][1]),a.lineEnd()):(a.point(e[1][0],e[1][1]),a.lineEnd(),a.lineStart(),a.point(e[0][0],e[0][1],3)))),!i||o&&qA(o,r)||a.point(r[0],r[1]),o=r,l=i,s=t},lineEnd:function(){l&&a.lineEnd(),o=null},clean:function(){return u|(c&&l)<<1}}},function(t,e,n,r){var i=r,r=d,a=p,o=n,n=t,s=e;if(a){var l=C(r),c=N(r),u=o*a;null==n?(n=r+o*cA,s=r-u/2):(n=HA(l,n),s=HA(l,s),(0<o?n<s:s<n)&&(n+=o*cA));for(var h,f=n;0<o?s<f:f<s;f-=u)h=LA([l,-c*C(f),-c*N(f)]),i.point(h[0],h[1])}},h?[0,-d]:[-T,d-T])}var n4=1e9,r4=-n4;function i4(v,y,b,x){function w(t,e){return v<=t&&t<=b&&y<=e&&e<=x}function M(t,e,n,r){var i=0,a=0;if(null==t||(i=o(t,n))!==(a=o(e,n))||s(t,e)<0^0<n)for(;r.point(0===i||3===i?v:b,1<i?x:y),(i=(i+n+4)%4)!==a;);else r.point(e[0],e[1])}function o(t,e){return fA(t[0]-v)<P?0<e?0:3:fA(t[0]-b)<P?0<e?2:1:fA(t[1]-y)<P?0<e?1:0:0<e?3:2}function k(t,e){return s(t.x,e.x)}function s(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(r){var i,h,a,o,s,l,c,u,f,d,p,g=r,t=VA(),e={point:n,lineStart:function(){e.point=m,h&&h.push(a=[]);d=!0,f=!1,c=u=NaN},lineEnd:function(){i&&(m(o,s),l&&f&&t.rejoin(),i.push(t.result()));e.point=n,f&&g.lineEnd()},polygonStart:function(){g=t,i=[],h=[],p=!0},polygonEnd:function(){var t=function(){for(var t=0,e=0,n=h.length;e<n;++e)for(var r,i,a=h[e],o=1,s=a.length,l=a[0],c=l[0],u=l[1];o<s;++o)r=c,i=u,l=a[o],c=l[0],u=l[1],i<=x?x<u&&(u-i)*(v-r)<(c-r)*(x-i)&&++t:u<=x&&(c-r)*(x-i)<(u-i)*(v-r)&&--t;return t}(),e=p&&t,n=(i=hp(i)).length;(e||n)&&(r.polygonStart(),e&&(r.lineStart(),M(null,null,1,r),r.lineEnd()),n&&UA(i,k,t,M,r),r.polygonEnd());g=r,i=h=a=null}};function n(t,e){w(t,e)&&g.point(t,e)}function m(t,e){var n,r,i=w(t,e);h&&a.push([t,e]),d?(o=t,s=e,d=!1,(l=i)&&(g.lineStart(),g.point(t,e))):i&&f?g.point(t,e):!function(t,e,n,r,i,a){var o=t[0],s=t[1],l=0,c=1,u=e[0]-o,h=e[1]-s,n=n-o;if(u||!(0<n)){if(n/=u,u<0){if(n<l)return;n<c&&(c=n)}else if(0<u){if(c<n)return;l<n&&(l=n)}if(n=i-o,u||!(n<0)){if(n/=u,u<0){if(c<n)return;l<n&&(l=n)}else if(0<u){if(n<l)return;n<c&&(c=n)}if(n=r-s,h||!(0<n)){if(n/=h,h<0){if(n<l)return;n<c&&(c=n)}else if(0<h){if(c<n)return;l<n&&(l=n)}if(n=a-s,h||!(n<0)){if(n/=h,h<0){if(c<n)return;l<n&&(l=n)}else if(0<h){if(n<l)return;n<c&&(c=n)}return 0<l&&(t[0]=o+l*u,t[1]=s+l*h),c<1&&(e[0]=o+c*u,e[1]=s+c*h),1}}}}}(n=[c=Math.max(r4,Math.min(n4,c)),u=Math.max(r4,Math.min(n4,u))],r=[t=Math.max(r4,Math.min(n4,t)),e=Math.max(r4,Math.min(n4,e))],v,y,b,x)?i&&(g.lineStart(),g.point(t,e),p=!1):(f||(g.lineStart(),g.point(n[0],n[1])),g.point(r[0],r[1]),i||g.lineEnd(),p=!1),c=t,u=e,f=i}return e}}function a4(t,e,n){var r=fp(t,e-P,n).concat(e);return function(e){return r.map(function(t){return[e,t]})}}function o4(t,e,n){var r=fp(t,e-P,n).concat(e);return function(e){return r.map(function(t){return[t,e]})}}function s4(){return g=p=10,m=90,v=360,y=2.5,e.lines=function(){return t().map(function(t){return{type:"LineString",coordinates:t}})},e.outline=function(){return{type:"Polygon",coordinates:[f(a).concat(d(l).slice(1),f(i).reverse().slice(1),d(c).reverse().slice(1))]}},e.extent=function(t){return arguments.length?e.extentMajor(t).extentMinor(t):e.extentMinor()},e.extentMajor=function(t){return arguments.length?(a=+t[0][0],i=+t[1][0],c=+t[0][1],l=+t[1][1],i<a&&(t=a,a=i,i=t),l<c&&(t=c,c=l,l=t),e.precision(y)):[[a,c],[i,l]]},e.extentMinor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],n<r&&(t=r,r=n,n=t),o<s&&(t=s,s=o,o=t),e.precision(y)):[[r,s],[n,o]]},e.step=function(t){return arguments.length?e.stepMajor(t).stepMinor(t):e.stepMinor()},e.stepMajor=function(t){return arguments.length?(m=+t[0],v=+t[1],e):[m,v]},e.stepMinor=function(t){return arguments.length?(p=+t[0],g=+t[1],e):[p,g]},e.precision=function(t){return arguments.length?(y=+t,u=a4(s,o,90),h=o4(r,n,y),f=a4(c,l,90),d=o4(a,i,y),e):y},e.extentMajor([[-180,-90+P],[180,90-P]]).extentMinor([[-180,-80-P],[180,80+P]])();function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return fp(gA(a/m)*m,i,m).map(f).concat(fp(gA(c/v)*v,l,v).map(d)).concat(fp(gA(r/p)*p,n,p).filter(function(t){return fA(t%m)>P}).map(u)).concat(fp(gA(s/g)*g,o,g).filter(function(t){return fA(t%v)>P}).map(h))}var n,r,i,a,o,s,l,c,u,h,f,d,p,g,m,v,y}var l4,c4,u4,h4,f4=t=>t,d4=new Rd,p4=new Rd,g4={point:EA,lineStart:EA,lineEnd:EA,polygonStart:function(){g4.lineStart=m4,g4.lineEnd=b4},polygonEnd:function(){g4.lineStart=g4.lineEnd=g4.point=EA,d4.add(fA(p4)),p4=new Rd},result:function(){var t=d4/2;return d4=new Rd,t}};function m4(){g4.point=v4}function v4(t,e){g4.point=y4,l4=u4=t,c4=h4=e}function y4(t,e){p4.add(h4*t-u4*e),u4=t,h4=e}function b4(){y4(l4,c4)}var x4=g4,w4=1/0,M4=w4,k4=-w4,E4=k4;var O4,S4,_4,A4,T4={point:function(t,e){t<w4&&(w4=t);k4<t&&(k4=t);e<M4&&(M4=e);E4<e&&(E4=e)},lineStart:EA,lineEnd:EA,polygonStart:EA,polygonEnd:EA,result:function(){var t=[[w4,M4],[k4,E4]];return k4=E4=-(M4=w4=1/0),t}},P4=0,L4=0,C4=0,N4=0,j4=0,R4=0,I4=0,B4=0,D4=0,F4={point:z4,lineStart:G4,lineEnd:H4,polygonStart:function(){F4.lineStart=V4,F4.lineEnd=q4},polygonEnd:function(){F4.point=z4,F4.lineStart=G4,F4.lineEnd=H4},result:function(){var t=D4?[I4/D4,B4/D4]:R4?[N4/R4,j4/R4]:C4?[P4/C4,L4/C4]:[NaN,NaN];return P4=L4=C4=N4=j4=R4=I4=B4=D4=0,t}};function z4(t,e){P4+=t,L4+=e,++C4}function G4(){F4.point=W4}function W4(t,e){F4.point=Y4,z4(_4=t,A4=e)}function Y4(t,e){var n=t-_4,r=e-A4,n=xA(n*n+r*r);N4+=n*(_4+t)/2,j4+=n*(A4+e)/2,R4+=n,z4(_4=t,A4=e)}function H4(){F4.point=z4}function V4(){F4.point=$4}function q4(){U4(O4,S4)}function $4(t,e){F4.point=U4,z4(O4=_4=t,S4=A4=e)}function U4(t,e){var n=t-_4,r=e-A4,n=xA(n*n+r*r);N4+=n*(_4+t)/2,j4+=n*(A4+e)/2,R4+=n,I4+=(n=A4*t-_4*e)*(_4+t),B4+=n*(A4+e),D4+=3*n,z4(_4=t,A4=e)}var X4=F4;function K4(t){this._context=t}K4.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,cA)}},result:EA};var Z4,Q4,J4,tT,eT,nT=new Rd,rT={point:EA,lineStart:function(){rT.point=iT},lineEnd:function(){Z4&&aT(Q4,J4),rT.point=EA},polygonStart:function(){Z4=!0},polygonEnd:function(){Z4=null},result:function(){var t=+nT;return nT=new Rd,t}};function iT(t,e){rT.point=aT,Q4=tT=t,J4=eT=e}function aT(t,e){tT-=t,eT-=e,nT.add(xA(tT*tT+eT*eT)),tT=t,eT=e}var oT=rT;let sT,lT,cT,uT;class hT{constructor(t){this._append=null==t?fT:function(t){var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);if(15<e)return fT;if(e!==sT){const r=10**e;sT=e,lT=function(t){let e=1;this._+=t[0];for(var n=t.length;e<n;++e)this._+=Math.round(arguments[e]*r)/r+t[e]}}return lT}(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){0===this._line&&(this._+="Z"),this._point=NaN}point(t,e){switch(this._point){case 0:this._append`M${t},${e}`,this._point=1;break;case 1:this._append`L${t},${e}`;break;default:var n,r;this._append`M${t},${e}`,this._radius===cT&&this._append===lT||(n=this._radius,r=this._,this._="",this._append`m0,${n}a${n},${n} 0 1,1 0,${-2*n}a${n},${n} 0 1,1 0,${2*n}z`,cT=n,lT=this._append,uT=this._,this._=r),this._+=uT}}result(){var t=this._;return this._="",t.length?t:null}}function fT(t){let e=1;this._+=t[0];for(var n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function dT(e,n){let r=3,i=4.5,a,o;function s(t){return t&&("function"==typeof i&&o.pointRadius(+i.apply(this,arguments)),PA(t,a(o))),o.result()}return s.area=function(t){return PA(t,a(x4)),x4.result()},s.measure=function(t){return PA(t,a(oT)),oT.result()},s.bounds=function(t){return PA(t,a(T4)),T4.result()},s.centroid=function(t){return PA(t,a(X4)),X4.result()},s.projection=function(t){return arguments.length?(a=null==t?(e=null,f4):(e=t).stream,s):e},s.context=function(t){return arguments.length?(o=null==t?(n=null,new hT(r)):new K4(n=t),"function"!=typeof i&&o.pointRadius(i),s):n},s.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(o.pointRadius(+t),+t),s):i},s.digits=function(t){if(!arguments.length)return r;if(null==t)r=null;else{var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);r=e}return null===n&&(o=new hT(r)),s},s.projection(e).digits(r).context(n)}function pT(r){return function(t){var e,n=new gT;for(e in r)n[e]=r[e];return n.stream=t,n}}function gT(){}function mT(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),PA(n,t.stream(T4)),e(T4.result()),null!=r&&t.clipExtent(r),t}function vT(i,a,t){return mT(i,function(t){var e=a[1][0]-a[0][0],n=a[1][1]-a[0][1],r=Math.min(e/(t[1][0]-t[0][0]),n/(t[1][1]-t[0][1])),e=+a[0][0]+(e-r*(t[1][0]+t[0][0]))/2,n=+a[0][1]+(n-r*(t[1][1]+t[0][1]))/2;i.scale(150*r).translate([e,n])},t)}function yT(t,e,n){return vT(t,[[0,0],e],n)}function bT(r,i,t){return mT(r,function(t){var e=+i,n=e/(t[1][0]-t[0][0]),e=(e-n*(t[1][0]+t[0][0]))/2,t=-n*t[0][1];r.scale(150*n).translate([e,t])},t)}function xT(i,a,t){return mT(i,function(t){var e=+a,n=e/(t[1][1]-t[0][1]),r=-n*t[0][0],e=(e-n*(t[1][1]+t[0][1]))/2;i.scale(150*n).translate([r,e])},t)}gT.prototype={constructor:gT,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var wT=16,MT=C(30*hA);function kT(t,e){return+e?(_=t,A=e,function(r){var n,i,a,o,s,l,c,u,h,f,d,p,g={point:t,lineStart:e,lineEnd:v,polygonStart:function(){r.polygonStart(),g.lineStart=y},polygonEnd:function(){r.polygonEnd(),g.lineStart=e}};function t(t,e){t=_(t,e),r.point(t[0],t[1])}function e(){u=NaN,g.point=m,r.lineStart()}function m(t,e){var n=CA([t,e]),e=_(t,e);T(u,h,c,f,d,p,u=e[0],h=e[1],c=t,f=n[0],d=n[1],p=n[2],wT,r),r.point(u,h)}function v(){g.point=t,r.lineEnd()}function y(){e(),g.point=b,g.lineEnd=x}function b(t,e){m(n=t,e),i=u,a=h,o=f,s=d,l=p,g.point=m}function x(){T(u,h,c,f,d,p,i,a,n,o,s,l,wT,r),g.lineEnd=v,v()}return g}):(n=t,pT({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}}));var n,_,A;function T(t,e,n,r,i,a,o,s,l,c,u,h,f,d){var p,g,m,v,y,b,x,w,M,k,E=o-t,O=s-e,S=E*E+O*O;4*A<S&&f--&&(m=a+h,x=kA(m/=v=xA((p=r+c)*p+(g=i+u)*g+m*m)),y=fA(fA(m)-1)<P||fA(n-l)<P?(n+l)/2:pA(g,p),b=(x=_(y,x))[0],x=x[1],A<(k=O*(w=b-t)-E*(M=x-e))*k/S||.3<fA((E*w+O*M)/S-.5)||r*c+i*u+a*h<MT)&&(T(t,e,n,r,i,a,b,x,y,p/=v,g/=v,m,f,d),d.point(b,x),T(b,x,y,p,g,m,o,s,l,c,u,h,f,d))}}var ET=pT({point:function(t,e){this.stream.point(t*hA,e*hA)}});function OT(t,n,r,i,a,e){var o,s,l,c,u,h,f,d,p,g,m,v;return e?(h=C(e),e=N(e),f=h*t,d=e*t,p=h/t,g=e/t,m=(e*r-h*n)/t,v=(e*n+h*r)/t,b.invert=function(t,e){return[i*(p*t-g*e+m),a*(v-g*t-p*e)]},b):(o=t,s=n,l=r,c=i,u=a,y.invert=function(t,e){return[(t-s)/o*c,(l-e)/o*u]},y);function y(t,e){return[s+o*(t*=c),l-o*(e*=u)]}function b(t,e){return[f*(t*=i)-d*(e*=a)+n,r-d*t-f*e]}}function ST(t){return _T(function(){return t})()}function _T(t){var e,r,n,i,a,o,s,l,c,u,h=150,f=480,d=250,p=0,g=0,m=0,v=0,y=0,b=0,x=1,w=1,M=null,k=t4,E=null,O=f4,S=.5;function _(t){return l(t[0]*hA,t[1]*hA)}function A(t){return(t=l.invert(t[0],t[1]))&&[t[0]*uA,t[1]*uA]}function T(){var t=OT(h,0,0,x,w,b).apply(null,e(p,g)),t=OT(h,f-t[0],d-t[1],x,w,b);return r=zA(m,v,y),s=DA(e,t),l=DA(r,s),o=kT(s,S),P()}function P(){return c=u=null,_}return _.stream=function(t){return c&&u===t?c:c=ET((n=r,pT({point:function(t,e){t=n(t,e);return this.stream.point(t[0],t[1])}})(k(o(O(u=t))))));var n},_.preclip=function(t){return arguments.length?(k=t,M=void 0,P()):k},_.postclip=function(t){return arguments.length?(O=t,E=n=i=a=null,P()):O},_.clipAngle=function(t){return arguments.length?(k=+t?e4(M=t*hA):(M=null,t4),P()):M*uA},_.clipExtent=function(t){return arguments.length?(O=null==t?(E=n=i=a=null,f4):i4(E=+t[0][0],n=+t[0][1],i=+t[1][0],a=+t[1][1]),P()):null==E?null:[[E,n],[i,a]]},_.scale=function(t){return arguments.length?(h=+t,T()):h},_.translate=function(t){return arguments.length?(f=+t[0],d=+t[1],T()):[f,d]},_.center=function(t){return arguments.length?(p=t[0]%360*hA,g=t[1]%360*hA,T()):[p*uA,g*uA]},_.rotate=function(t){return arguments.length?(m=t[0]%360*hA,v=t[1]%360*hA,y=2<t.length?t[2]%360*hA:0,T()):[m*uA,v*uA,y*uA]},_.angle=function(t){return arguments.length?(b=t%360*hA,T()):b*uA},_.reflectX=function(t){return arguments.length?(x=t?-1:1,T()):x<0},_.reflectY=function(t){return arguments.length?(w=t?-1:1,T()):w<0},_.precision=function(t){return arguments.length?(o=kT(s,S=t*t),P()):xA(S)},_.fitExtent=function(t,e){return vT(_,t,e)},_.fitSize=function(t,e){return yT(_,t,e)},_.fitWidth=function(t,e){return bT(_,t,e)},_.fitHeight=function(t,e){return xT(_,t,e)},function(){return e=t.apply(this,arguments),_.invert=e.invert&&A,T()}}function AT(t){var e=0,n=T/3,r=_T(t),t=r(e,n);return t.parallels=function(t){return arguments.length?r(e=t[0]*hA,n=t[1]*hA):[e*uA,n*uA]},t}function TT(t,e){var n,r,i,a=N(t),o=(a+N(e))/2;return fA(o)<P?(n=C(t),s.invert=function(t,e){return[t/n,kA(e*n)]},s):(i=xA(r=1+a*(2*o-a))/o,l.invert=function(t,e){var e=i-e,n=pA(t,fA(e))*bA(e);return e*o<0&&(n-=T*bA(t)*bA(e)),[n/o,kA((r-(t*t+e*e)*o*o)/(2*o))]},l);function s(t,e){return[t*n,N(e)/n]}function l(t,e){e=xA(r-2*o*N(e))/o;return[e*N(t*=o),i-e*C(t)]}}function PT(){return AT(TT).scale(155.424).center([0,33.6442])}function LT(){return PT().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function CT(i){return function(t,e){var n=C(t),r=C(e),n=i(n*r);return n===1/0?[2,0]:[n*r*N(t),n*N(e)]}}function NT(a){return function(t,e){var n=xA(t*t+e*e),r=a(n),i=N(r),r=C(r);return[pA(t*i,n*r),kA(n&&e*i/n)]}}var jT=CT(function(t){return xA(2/(1+t))});jT.invert=NT(function(t){return 2*kA(t/2)});var RT=CT(function(t){return(t=MA(t))&&t/N(t)});function IT(t,e){return[t,vA(wA((sA+e)/2))]}function BT(r){var i,a,o,s=ST(r),e=s.center,l=s.scale,n=s.translate,c=s.clipExtent,u=null;function h(){var e,t=T*l(),n=s((e=zA((e=s.rotate())[0]*hA,e[1]*hA,2<e.length?e[2]*hA:0),function(t){return(t=e.invert(t[0]*hA,t[1]*hA))[0]*=uA,t[1]*=uA,t}([0,0])));return c(null==u?[[n[0]-t,n[1]-t],[n[0]+t,n[1]+t]]:r===IT?[[Math.max(n[0]-t,u),i],[Math.min(n[0]+t,a),o]]:[[u,Math.max(n[1]-t,i)],[a,Math.min(n[1]+t,o)]])}return s.scale=function(t){return(arguments.length?(l(t),h):l)()},s.translate=function(t){return(arguments.length?(n(t),h):n)()},s.center=function(t){return(arguments.length?(e(t),h):e)()},s.clipExtent=function(t){return arguments.length?(null==t?u=i=a=o=null:(u=+t[0][0],i=+t[0][1],a=+t[1][0],o=+t[1][1]),h()):null==u?null:[[u,i],[a,o]]},h()}function DT(t){return wA((sA+t)/2)}function FT(t,e){var n=C(t),i=t===e?N(t):vA(n/C(e))/vA(DT(e)/DT(t)),a=n*yA(DT(t),i)/i;return i?(r.invert=function(t,e){var e=a-e,n=bA(i)*xA(t*t+e*e),r=pA(t,fA(e))*bA(e);return e*i<0&&(r-=T*bA(t)*bA(e)),[r/i,2*dA(yA(a/n,1/i))-sA]},r):IT;function r(t,e){0<a?e<-sA+P&&(e=-sA+P):sA-P<e&&(e=sA-P);e=a/yA(DT(e),i);return[e*N(i*t),a-e*C(i*t)]}}function zT(t,e){return[t,e]}function GT(t,e){var n=C(t),r=t===e?N(t):(n-C(e))/(e-t),i=n/r+t;return fA(r)<P?zT:(a.invert=function(t,e){var e=i-e,n=pA(t,fA(e))*bA(e);return e*r<0&&(n-=T*bA(t)*bA(e)),[n/r,i-bA(r)*xA(t*t+e*e)]},a);function a(t,e){e=i-e,t*=r;return[e*N(t),i-e*C(t)]}}RT.invert=NT(function(t){return t}),IT.invert=function(t,e){return[t,2*dA(mA(e))-sA]},zT.invert=zT;var WT=1.340264,YT=-.081106,HT=893e-6,VT=.003796,qT=xA(3)/2;function $T(t,e){var e=kA(qT*N(e)),n=e*e,r=n*n*n;return[t*C(e)/(qT*(WT+3*YT*n+r*(7*HT+9*VT*n))),e*(WT+YT*n+r*(HT+VT*n))]}function UT(t,e){var n=C(e),r=C(t)*n;return[n*N(t)/r,N(e)/r]}function XT(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function KT(t,e){return[C(e)*N(t),N(e)]}function ZT(t,e){var n=C(e),r=1+C(t)*n;return[n*N(t)/r,N(e)/r]}function QT(t,e){return[vA(wA((sA+e)/2)),-t]}$T.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(WT+YT*i+a*(HT+VT*i))-e)/(WT+3*YT*i+a*(7*HT+9*VT*i)))*r)*i*i,!(fA(n)<oA));++o);return[qT*t*(WT+3*YT*i+a*(7*HT+9*VT*i))/C(r),kA(N(r)/qT)]},UT.invert=NT(dA),XT.invert=function(t,e){var n=e,r=25;do{var i=n*n,a=i*i}while(n-=a=(n*(1.007226+i*(.015085+a*(.028874*i-.044475-.005916*a)))-e)/(1.007226+i*(.045255+a*(.259866*i-.311325-.005916*11*a))),fA(a)>P&&0<--r);return[t/(.8707+(i=n*n)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),n]},KT.invert=NT(kA),ZT.invert=NT(function(t){return 2*dA(t)}),QT.invert=function(t,e){return[-e,2*dA(mA(t))-sA]};var JT=Object.freeze({__proto__:null,geoAlbersUsa:function(){var e,n,i,a,o,r,s=LT(),l=PT().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=PT().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){r=[t,e]}};function h(t){var e=t[0],t=t[1];return r=null,i.point(e,t),r||(a.point(e,t),r)||(o.point(e,t),r)}function f(){return e=n=null,h}return h.invert=function(t){var e=s.scale(),n=s.translate(),r=(t[0]-n[0])/e,n=(t[1]-n[1])/e;return(.12<=n&&n<.234&&-.425<=r&&r<-.214?l:.166<=n&&n<.234&&-.214<=r&&r<-.115?c:s).invert(t)},h.stream=function(t){return e&&n===t?e:(r=[s.stream(n=t),l.stream(t),c.stream(t)],i=r.length,e={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},h.precision=function(t){return arguments.length?(s.precision(t),l.precision(t),c.precision(t),f()):s.precision()},h.scale=function(t){return arguments.length?(s.scale(t),l.scale(.35*t),c.scale(t),h.translate(s.translate())):s.scale()},h.translate=function(t){var e,n,r;return arguments.length?(e=s.scale(),n=+t[0],r=+t[1],i=s.translate(t).clipExtent([[n-.455*e,r-.238*e],[n+.455*e,r+.238*e]]).stream(u),a=l.translate([n-.307*e,r+.201*e]).clipExtent([[n-.425*e+P,r+.12*e+P],[n-.214*e-P,r+.234*e-P]]).stream(u),o=c.translate([n-.205*e,r+.212*e]).clipExtent([[n-.214*e+P,r+.166*e+P],[n-.115*e-P,r+.234*e-P]]).stream(u),f()):s.translate()},h.fitExtent=function(t,e){return vT(h,t,e)},h.fitSize=function(t,e){return yT(h,t,e)},h.fitWidth=function(t,e){return bT(h,t,e)},h.fitHeight=function(t,e){return xT(h,t,e)},h.scale(1070)},geoAlbers:LT,geoAzimuthalEqualArea:function(){return ST(jT).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:jT,geoAzimuthalEquidistant:function(){return ST(RT).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:RT,geoConicConformal:function(){return AT(FT).scale(109.5).parallels([30,30])},geoConicConformalRaw:FT,geoConicEqualArea:PT,geoConicEqualAreaRaw:TT,geoConicEquidistant:function(){return AT(GT).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:GT,geoEqualEarth:function(){return ST($T).scale(177.158)},geoEqualEarthRaw:$T,geoEquirectangular:function(){return ST(zT).scale(152.63)},geoEquirectangularRaw:zT,geoGnomonic:function(){return ST(UT).scale(144.049).clipAngle(60)},geoGnomonicRaw:UT,geoIdentity:function(){var r,i,e,n,a,o,s,l=1,c=0,u=0,h=1,f=1,d=0,p=null,g=1,m=1,v=pT({point:function(t,e){t=x([t,e]);this.stream.point(t[0],t[1])}}),y=f4;function b(){return g=l*h,m=l*f,o=s=null,x}function x(t){var e,n=t[0]*g,t=t[1]*m;return d&&(e=t*r-n*i,n=n*r+t*i,t=e),[n+c,t+u]}return x.invert=function(t){var e,n=t[0]-c,t=t[1]-u;return d&&(e=t*r+n*i,n=n*r-t*i,t=e),[n/g,t/m]},x.stream=function(t){return o&&s===t?o:o=v(y(s=t))},x.postclip=function(t){return arguments.length?(y=t,p=e=n=a=null,b()):y},x.clipExtent=function(t){return arguments.length?(y=null==t?(p=e=n=a=null,f4):i4(p=+t[0][0],e=+t[0][1],n=+t[1][0],a=+t[1][1]),b()):null==p?null:[[p,e],[n,a]]},x.scale=function(t){return arguments.length?(l=+t,b()):l},x.translate=function(t){return arguments.length?(c=+t[0],u=+t[1],b()):[c,u]},x.angle=function(t){return arguments.length?(i=N(d=t%360*hA),r=C(d),b()):d*uA},x.reflectX=function(t){return arguments.length?(h=t?-1:1,b()):h<0},x.reflectY=function(t){return arguments.length?(f=t?-1:1,b()):f<0},x.fitExtent=function(t,e){return vT(x,t,e)},x.fitSize=function(t,e){return yT(x,t,e)},x.fitWidth=function(t,e){return bT(x,t,e)},x.fitHeight=function(t,e){return xT(x,t,e)},x},geoProjection:ST,geoProjectionMutator:_T,geoMercator:function(){return BT(IT).scale(961/cA)},geoMercatorRaw:IT,geoNaturalEarth1:function(){return ST(XT).scale(175.295)},geoNaturalEarth1Raw:XT,geoOrthographic:function(){return ST(KT).scale(249.5).clipAngle(90+P)},geoOrthographicRaw:KT,geoStereographic:function(){return ST(ZT).scale(250).clipAngle(142)},geoStereographicRaw:ZT,geoTransverseMercator:function(){var t=BT(QT),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],2<t.length?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)},geoTransverseMercatorRaw:QT});function tP(t){return{type:"FeatureCollection",features:t.flatMap(t=>function(t){if(!t||!t.type)return null;var e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"}[t.type];if(!e)return null;return"geometry"===e?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===e?{type:"FeatureCollection",features:[t]}:"featureCollection"===e?t:void 0}(t).features)}}function eP(t,e,n,r){var i,a,o,s,l,c,{outline:e=(e=e.filter(rP),e.find(t=>t.sphere)?{type:"Sphere"}:tP(e.filter(t=>!t.sphere).flatMap(t=>t.data.value)))}=r,{size:r="fitExtent"}=r;"fitExtent"===r?(i=t,o=e,{x:c,y:l,width:a,height:s}=c=n,i.fitExtent([[c,l],[a,s]],o)):"fitWidth"===r&&(i=t,c=e,{width:l,height:a}=l=n,[[l,c],[s,o]]=dT(i.fitWidth(l,c)).bounds(c),o=Math.ceil(o-c),c=Math.min(Math.ceil(s-l),o),s=i.scale()*(c-1)/c,[l,c]=i.translate(),c+=(a-o)/2,i.scale(s).translate([l,c]).precision(.2))}function nP(t){var e=t["data"];return Array.isArray(e)?Object.assign(Object.assign({},t),{data:{value:e}}):(e=e["type"],"graticule10"===e?Object.assign(Object.assign({},t),{data:{value:[s4()]}}):"sphere"===e?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t)}function rP(t){return"geoPath"===t.type}z1=()=>t=>{var{children:e,coordinate:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,f=nt(n,["type"]),d=function(t){if("function"==typeof t)return t;var e="geo"+en(t);if(e=JT[e])return e;throw new Error("Unknown coordinate: "+t)}(r),p=e.map(nP);let g;return[Object.assign(Object.assign({},t),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinate:{type:function(){return[["custom",(t,e,n,r)=>{const i=d();var a,o,s,l={x:t,y:e,width:n,height:r},c=(eP(i,p,l,f),i),l=f;for([o,s]of Object.entries(l))null!=(a=c[o])&&a.call(c,s);g=dT(i);const u=new k1({domain:[t,t+n]}),h=new k1({domain:[e,e+r]});return{transform:t=>{return t=t,(t=i(t))?([t,e]=t,[u.map(t),h.map(e)]):null;var e},untransform:t=>{return(t=t)?([t,e]=t,t=[u.invert(t),h.invert(e)],i.invert(t)):null;var e}}}]]}},children:p.flatMap(t=>{var e,n,r;return rP(t)?({style:n,tooltip:r={}}=e=t,Object.assign(Object.assign({},e),{type:"path",tooltip:m0(r,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},n),{d:t=>g(t)||[]})})):t})})]},z1.props={},Vo=()=>t=>{var{data:e,scale:n,encode:r,style:i,animate:a,key:o,state:s}=t,t=nt(t,["type","data","scale","encode","style","animate","key","state"]);return[Object.assign(Object.assign({type:"geoView"},t),{children:[{type:"geoPath",key:o+"-0",data:{value:e},scale:n,encode:r,style:i,animate:a,state:s}]})]};Vo.props={};const iP={"composition.geoView":z1,"composition.geoPath":Vo};function aP(){return Object.assign({"data.fetch":zg,"data.inline":$g,"data.sortBy":qg,"data.sort":Yg,"data.filter":Wg,"data.pick":Hg,"data.rename":Vg,"data.fold":Gg,"data.slice":Mm,"data.custom":Ug,"data.map":Xg,"data.cluster":Og,"data.tree":Sg,"data.sankey":i0,"data.arc":Jg,"data.wordCloud":bm,"data.join":wm,"data.kde":Tm,"data.venn":Xm,"transform.maybeZeroY1":A3,"transform.maybeZeroX":W3,"transform.maybeStackY":z3,"transform.maybeTitle":G3,"transform.maybeSeries":q3,"transform.maybeZeroPadding":Q3,"transform.stackY":D3,"transform.binX":H_,"transform.bin":Y_,"transform.dodgeX":r_,"transform.jitter":l_,"transform.jitterX":c_,"transform.symmetryY":u_,"transform.diffY":h_,"transform.stackEnter":i_,"transform.normalizeY":a_,"transform.select":m_,"transform.selectX":v_,"transform.selectY":y_,"transform.groupX":P_,"transform.groupY":L_,"transform.groupColor":C_,"transform.group":T_,"transform.maybeSize":H3,"transform.maybeZeroY":Y3,"transform.maybeKey":V3,"transform.sortX":R_,"transform.sortY":B_,"transform.sortColor":I_,"transform.flexX":D_,"transform.maybeTupleY":$3,"transform.maybeTupleX":U3,"transform.maybeIdentityY":X3,"transform.maybeIdentityX":K3,"transform.maybeTuple":e_,"transform.maybeVisualPosition":J3,"transform.maybeFunctionAttribute":t_,"transform.maybeGradient":n_,"transform.maybeTooltip":Z3,"transform.pack":z_,"transform.sample":$_,"transform.filter":U_,"coordinate.cartesian":Uh,"coordinate.polar":Kh,"coordinate.helix":Zh,"coordinate.transpose":Qh,"coordinate.theta":Jh,"coordinate.parallel":nf,"coordinate.fisheye":rf,"coordinate.radial":ef,"coordinate.radar":af,"encode.constant":of,"encode.field":lf,"encode.transform":sf,"encode.column":cf,"mark.interval":kd,"mark.rect":Ed,"mark.line":Op,"mark.point":Sp,"mark.text":_p,"mark.cell":Ap,"mark.area":Tp,"mark.link":Pp,"mark.image":Lp,"mark.polygon":Cp,"mark.box":Np,"mark.vector":jp,"mark.lineX":Ip,"mark.lineY":Rp,"mark.connector":Bp,"mark.range":zp,"mark.rangeX":Gp,"mark.rangeY":Wp,"mark.sankey":b0,"mark.path":x0,"mark.treemap":E0,"mark.pack":O0,"mark.boxplot":j0,"mark.shape":R0,"mark.forceGraph":kg,"mark.gauge":by,"mark.tree":_g,"mark.wordCloud":Km,"mark.density":xy,"mark.heatmap":wy,"palette.category10":My,"palette.category20":ky,"scale.linear":Oy,"scale.ordinal":Sy,"scale.band":Ey,"scale.identity":_y,"scale.point":Ay,"scale.time":Ty,"scale.log":Py,"scale.pow":Ly,"scale.sqrt":Ry,"scale.threshold":Cy,"scale.quantile":Ny,"scale.quantize":jy,"scale.sequential":Iy,"scale.constant":By,"shape.interval.rect":Gb,"shape.interval.hollow":Wb,"shape.interval.funnel":Yb,"shape.interval.pyramid":Vb,"shape.rect.rect":Gb,"shape.rect.hollow":Wb,"shape.cell.cell":Gb,"shape.cell.hollow":Wb,"shape.line.line":Xb,"shape.line.hv":Zb,"shape.line.vh":Qb,"shape.line.hvh":Jb,"shape.line.trail":tx,"shape.line.smooth":Kb,"shape.point.bowtie":nx,"shape.point.cross":rx,"shape.point.diamond":ix,"shape.point.hexagon":ax,"shape.point.hollowBowtie":ox,"shape.point.hollowDiamond":sx,"shape.point.hollowHexagon":lx,"shape.point.hollow":cx,"shape.point.hollowSquare":ux,"shape.point.hollowTriangle":hx,"shape.point.hollowTriangleDown":fx,"shape.point.hyphen":dx,"shape.point.line":px,"shape.point.plus":gx,"shape.point.point":mx,"shape.point.square":vx,"shape.point.tick":yx,"shape.point.triangle":bx,"shape.point.triangleDown":xx,"shape.text.text":Rk,"shape.area.area":zk,"shape.area.smooth":Gk,"shape.area.hvh":Wk,"shape.area.vh":Yk,"shape.area.hv":Hk,"shape.link.smooth":qk,"shape.link.vhv":$k,"shape.link.arc":Uk,"shape.link.link":Vk,"shape.image.image":Xk,"shape.polygon.polygon":Kk,"shape.polygon.ribbon":Zk,"shape.box.box":Qk,"shape.box.violin":Jk,"shape.vector.vector":wx,"shape.label.label":vE,"shape.text.badge":Bk,"shape.lineX.line":tE,"shape.lineY.line":tE,"shape.shape.shape":_E,"shape.connector.connector":rE,"shape.range.range":Gb,"shape.rangeX.range":Gb,"shape.rangeY.range":Gb,"shape.path.path":bE,"shape.path.hollow":xE,"shape.density.density":wE,"shape.heatmap.heatmap":SE,"theme.classic":TE,"theme.classicDark":LE,"theme.academy":NE,"component.axisX":lO,"component.axisY":cO,"component.axisRadar":uO,"component.axisLinear":oO,"component.axisArc":sO,"component.legendCategory":pO,"component.legendContinuous":xO,"component.legendContinuousBlock":wO,"component.legendContinuousBlockSize":kO,"component.legendContinuousSize":MO,"component.title":SO,"component.sliderX":NO,"component.sliderY":jO,"component.scrollbarX":IO,"component.scrollbarY":BO,"animation.scaleInX":YO,"animation.scaleOutX":HO,"animation.scaleInY":VO,"animation.scaleOutY":qO,"animation.waveIn":n5,"animation.fadeIn":$O,"animation.fadeOut":UO,"animation.zoomIn":r5,"animation.zoomOut":i5,"animation.pathIn":a5,"animation.morphing":e5,"animation.growInX":o5,"animation.growInY":s5,"interaction.elementHighlight":P5,"interaction.elementHighlightByX":L5,"interaction.elementHighlightByColor":C5,"interaction.elementSelect":j5,"interaction.elementSelectByX":R5,"interaction.elementSelectByColor":I5,"interaction.fisheye":D5,"interaction.chartIndex":B5,"interaction.tooltip":iS,"interaction.legendFilter":gS,"interaction.legendHighlight":mS,"interaction.brushHighlight":MS,"interaction.brushXHighlight":ES,"interaction.brushYHighlight":SS,"interaction.brushAxisHighlight":RS,"interaction.brushFilter":BS,"interaction.brushXFilter":DS,"interaction.brushYFilter":FS,"interaction.sliderFilter":WS,"interaction.scrollbarFilter":HS,"interaction.poptip":$S,"interaction.event":W5,"composition.spaceLayer":ZS,"composition.spaceFlex":QS,"composition.mark":t3,"composition.view":JS,"composition.facetRect":u3,"composition.repeatMatrix":p3,"composition.facetCircle":x3,"composition.timingKeyframe":w3,"labelTransform.overlapHide":Z_,"labelTransform.overlapDodgeY":J_,"labelTransform.overflowHide":aA,"labelTransform.contrastReverse":iA},iP)}const oP=[["legendCategory",[[["color","discrete"],["opacity","discrete"],["shape","discrete"],["size","constant"]],[["color","discrete"],["opacity","constant"],["shape","discrete"],["size","constant"]],[["color","discrete"],["opacity","discrete"],["shape","constant"],["size","constant"]],[["color","discrete"],["opacity","constant"],["shape","constant"],["size","constant"]],[["color","constant"],["opacity","discrete"],["shape","discrete"],["size","constant"]],[["color","constant"],["opacity","constant"],["shape","discrete"],["size","constant"]],[["color","constant"],["opacity","discrete"],["shape","constant"],["size","constant"]],[["color","discrete"],["shape","discrete"],["size","constant"]],[["color","discrete"],["opacity","discrete"],["shape","discrete"]],[["color","discrete"],["opacity","discrete"],["size","constant"]],[["color","discrete"],["opacity","constant"],["shape","discrete"]],[["color","discrete"],["opacity","constant"],["size","constant"]],[["color","discrete"],["shape","constant"],["size","constant"]],[["color","discrete"],["opacity","discrete"],["shape","constant"]],[["color","discrete"],["opacity","constant"],["shape","constant"]],[["color","constant"],["shape","discrete"],["size","constant"]],[["color","constant"],["opacity","discrete"],["shape","discrete"]],[["color","constant"],["opacity","discrete"],["size","constant"]],[["color","constant"],["opacity","constant"],["shape","discrete"]],[["color","constant"],["opacity","discrete"],["shape","constant"]],[["color","discrete"],["shape","discrete"]],[["color","discrete"],["size","constant"]],[["color","discrete"],["opacity","discrete"]],[["color","discrete"],["opacity","constant"]],[["color","discrete"],["shape","constant"]],[["color","constant"],["shape","discrete"]],[["color","constant"],["size","constant"]],[["color","constant"],["opacity","discrete"]],[["color","discrete"]]]],["legendContinuousSize",[[["color","continuous"],["opacity","continuous"],["size","continuous"]],[["color","constant"],["opacity","continuous"],["size","continuous"]],[["color","continuous"],["size","continuous"]],[["color","constant"],["size","continuous"]],[["size","continuous"],["opacity","continuous"]],[["size","continuous"]]]],["legendContinuousBlockSize",[[["color","distribution"],["opacity","distribution"],["size","distribution"]],[["color","distribution"],["size","distribution"]]]],["legendContinuousBlock",[[["color","distribution"],["opacity","continuous"]],[["color","distribution"]]]],["legendContinuous",[[["color","continuous"],["opacity","continuous"]],[["color","continuous"]],[["opacity","continuous"]]]]];function sP(t,e,n){for(;t<e;)t+=2*Math.PI;for(;n<t;)t-=2*Math.PI;return t}function lP(t,e,n,r,i){var a=t[0],t=t[1],o=Z();return a=[a,t],(t=o)[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=a[0],t[7]=a[1],t[8]=1,t}function cP(t,e,n,r,i){var a=new k1({range:[e,e+r]}),o=new k1({range:[n,n+i]});return{transform:function(t){var e=t[0],t=t[1];return[a.map(e),o.map(t)]},untransform:function(t){var e=t[0],t=t[1];return[a.invert(e),o.invert(t)]}}}function uP(t,e,n,r,i){return(0,t[0])(e,n,r,i)}function hP(t,e,n,r,i){return t[0]}function fP(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],t=t[3],l=new k1({range:[s,t]}),c=new k1({range:[a,o]}),u=1<(s=i/r)?1:s,h=1<s?1/s:1;return{transform:function(t){var e=t[0],t=t[1],e=c.map(e),t=l.map(t);return[.5*(t*Math.cos(e)*u)+.5,.5*(t*Math.sin(e)*h)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/u,t=2*(t-.5)/h,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=sP(Math.atan2(t,e),a,o);return[c.invert(t),l.invert(n)]}}}function dP(t,e,n,r,i){return{transform:function(t){var e=t[0];return[t[1],e]},untransform:function(t){var e=t[0];return[t[1],e]}}}function pP(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return xP.apply(void 0,wP([[-1,-1]],e,!1))}function gP(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return xP.apply(void 0,wP([[-1,1]],e,!1))}function mP(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return xP.apply(void 0,wP([[1,-1]],e,!1))}function vP(t,e,n,r,i){var a,t=t[0],o=Z();return o=o,t=t,a=Math.sin(t),t=Math.cos(t),o[0]=t,o[1]=a,o[2]=0,o[3]=-a,o[4]=t,o[5]=0,o[6]=0,o[7]=0,o[8]=1,o}function yP(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=(t[3]-s)/(+o/(2*Math.PI)+1),c=l/(2*Math.PI),u=new k1({range:[s,s+.99*l]}),h=new k1({range:[a,o]}),f=1<(t=i/r)?1:t,d=1<t?1/t:1;return{transform:function(t){var e=t[0],t=t[1],e=h.map(e),t=u.map(t);return[.5*(Math.cos(e)*(c*e+t)*f)+.5,.5*(Math.sin(e)*(c*e+t)*d)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/f,t=2*(t-.5)/d,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=sP(Math.atan2(t,e)+Math.floor(n/l)*Math.PI*2,a,o),e=n-c*t;return[h.invert(t),u.invert(e)]}}}function bP(t,e,n,r,i){var s=t[0],l=t[1],a=t[2],t=t[3],c=new k1({range:[a,t]});return{transform:function(t){for(var e=[],n=t.length,r=new E1({domain:new Array(n).fill(0).map(function(t,e){return e}),range:[s,l]}),i=0;i<n;i++){var a=t[i],o=r.map(i),a=c.map(a);e.push(o,a)}return e},untransform:function(t){for(var e=[],n=0;n<t.length;n+=2){var r=t[n+1];e.push(c.invert(r))}return e}}}var xP=function(t,e,n,r,i){var a=t[0],t=t[1],o=Z();return a=[a,t],(t=o)[0]=a[0],t[1]=0,t[2]=0,t[3]=0,t[4]=a[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},wP=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function MP(t){return 1/Math.tan(t)}function kP(t,e,n,r,i){var a=MP(t[0]);return{transform:function(t){var e=t[0],t=t[1];return[e+t*a,t]},untransform:function(t){var e=t[0],t=t[1];return[e-t*a,t]}}}function EP(t,e,n,r,i){var a=MP(t[0]);return{transform:function(t){var e=t[0];return[e,t[1]+e*a]},untransform:function(t){var e=t[0];return[e,t[1]-e*a]}}}function OP(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r,r=a?-1:1;return r*i*(n+1)/(n+i/((t-e)*r))+e}function SP(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r;return i/(i*(n+1)/(t-e)-n*(a?-1:1))+e}function _P(t,e,n){return n?new k1({range:[0,1],domain:[0,e]}).map(t):t}function AP(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=_P(a,r,void 0!==t&&t);return{transform:function(t){var e=t[0],t=t[1];return[OP(e,s,o,0,1),t]},untransform:function(t){var e=t[0],t=t[1];return[SP(e,s,o,0,1),t]}}}function TP(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=_P(a,i,void 0!==t&&t);return{transform:function(t){return[t[0],OP(t[1],s,o,0,1)]},untransform:function(t){return[t[0],SP(t[1],s,o,0,1)]}}}function PP(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=t[4],c=_P(a,r,t=void 0!==t&&t),u=_P(o,i,t);return{transform:function(t){var e=t[0],t=t[1];return[OP(e,c,s,0,1),OP(t,u,l,0,1)]},untransform:function(t){var e=t[0],t=t[1];return[SP(e,c,s,0,1),SP(t,u,l,0,1)]}}}function LP(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=void 0!==(t=t[4])&&t,c=new k1({range:[0,r]}),u=new k1({range:[0,i]}),h=t?a:c.map(a),f=t?o:u.map(o);return{transform:function(t){var e=t[0],t=t[1],n=c.map(e)-h,r=u.map(t)-f,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=OP(i,0,l,0,s),t=Math.atan2(r,n),i=h+e*Math.cos(t),r=f+e*Math.sin(t),[c.invert(i),u.invert(r)])},untransform:function(t){var e=t[0],t=t[1],n=c.map(e)-h,r=u.map(t)-f,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=SP(i,0,l,0,s),t=Math.atan2(r,n),i=h+e*Math.cos(t),r=f+e*Math.sin(t),[c.invert(i),u.invert(r)])}}}var CP=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},NP=(jP.prototype.update=function(t){this.options=Sv({},this.options,t),this.recoordinate()},jP.prototype.clone=function(){return new jP(this.options)},jP.prototype.getOptions=function(){return this.options},jP.prototype.clear=function(){this.update({transformations:[]})},jP.prototype.getSize=function(){var t=this.options;return[t.width,t.height]},jP.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y;return[(2*e+t.width)/2,(2*n+t.height)/2]},jP.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.options.transformations;return this.update({transformations:CP(CP([],n,!0),[CP([],t,!0)],!1)}),this},jP.prototype.map=function(t){return this.output(t)},jP.prototype.invert=function(t){return this.input(t)},jP.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},jP.prototype.compose=function(t){for(var e=(t=void 0===t?!1:t)?CP([],this.options.transformations,!0).reverse():this.options.transformations,n=t?function(t){return t.untransform}:function(t){return t.transform},r=[],a=[],i=function(t,e){return a.push((e=void 0===e?!0:e)?(i=t,function(t){for(var e=[],n=0;n<t.length-1;n+=2){var r=[t[n],t[n+1]],r=i(r);e.push.apply(e,r)}return e}):t);var i},o=0,s=e;o<s.length;o++){var l,c,u,h,f=s[o],d=f[0],f=f.slice(1),p=this.transformers[d];p&&(l=(h=this.options).x,c=h.y,u=h.width,h=h.height,p=p(CP([],f,!0),l,c,u,h),(f=p)instanceof Float32Array||f instanceof Array?r.push(p):(r.length&&(i(this.createMatrixTransform(r,t)),r.splice(0,r.length)),i(n(p)||_v,"parallel"!==d)))}return r.length&&i(this.createMatrixTransform(r,t)),function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t?e.reduce(function(e,n){return function(t){return n(e(t))}},t):_v}.apply(void 0,a)},jP.prototype.createMatrixTransform=function(t,e){var n,r,i,a,o,s,l,c,u,h,f,d,p=Z();return e&&t.reverse(),t.forEach(function(t){return Q(p,p,t)}),e&&(e=t=p,(d=new K(9))[0]=e[0],d[1]=e[1],d[2]=e[2],d[3]=e[3],d[4]=e[4],d[5]=e[5],d[6]=e[6],d[7]=e[7],d[8]=e[8],d=(e=d)[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],c=(e=e[8])*a-o*l,f=d*c+n*(u=-e*i+o*s)+r*(h=l*i-a*s))&&(t[0]=c*(f=1/f),t[1]=(-e*n+r*l)*f,t[2]=(o*n-r*a)*f,t[3]=u*f,t[4]=(e*d-r*s)*f,t[5]=(-o*d+r*i)*f,t[6]=h*f,t[7]=(-l*d+n*s)*f,t[8]=(a*d-n*i)*f),function(t){t=[t[0],t[1],1];return Wt(t,t,p),[t[0],t[1]]}},jP);function jP(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:cP,translate:lP,custom:uP,matrix:hP,polar:fP,transpose:dP,scale:xP,"shear.x":kP,"shear.y":EP,reflect:pP,"reflect.x":gP,"reflect.y":mP,rotate:vP,helix:yP,parallel:bP,fisheye:PP,"fisheye.x":AP,"fisheye.y":TP,"fisheye.circular":LP},this.update(t)}function RP(e,n){const r=t=>{return"string"!=typeof t?t:n[t=e+"."+t]||s0("Unknown Component: "+t)};return[t=>{var e=t["type"],t=nt(t,["type"]);return r(e)(Object.assign({},t))},r]}function IP(t,e){var{coordinate:n={}}=t,t=nt(t,["coordinate"]),{type:r,transform:i=[]}=n,n=nt(n,["type","transform"]);if(!r)return Object.assign(Object.assign({},t),{coordinates:i});var[,e]=RP("coordinate",e),{transform:e=!1}=e(r).props||{};if(e)throw new Error(`Unknown coordinate: ${r}.`);return Object.assign(Object.assign({},t),{coordinates:[Object.assign({type:r},n),...i]})}function BP(t,e){return t.filter(t=>t.type===e)}function DP(t){return 0<BP(t,"polar").length}function FP(t){return BP(t,"transpose").length%2==1}function zP(t){return 0<BP(t,"theta").length}function GP(t){return 0<BP(t,"radial").length}function l(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}a=l("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),is=l("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),r=l("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),rs=l("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Ho=l("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),pl=l("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),fl=l("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Yo=l("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),n=l("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),$o=l("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function WP(t,e,n){(t.prototype=e.prototype=n).constructor=t}function YP(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function HP(){}var VP=1/.7,e="\\s*([+-]?\\d+)\\s*",Io="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",os="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",qP=/^#([0-9a-f]{3,8})$/,$P=new RegExp(`^rgb\\(${e},${e},${e}\\)$`),UP=new RegExp(`^rgb\\(${os},${os},${os}\\)$`),XP=new RegExp(`^rgba\\(${e},${e},${e},${Io}\\)$`),KP=new RegExp(`^rgba\\(${os},${os},${os},${Io}\\)$`),ZP=new RegExp(`^hsl\\(${Io},${os},${os}\\)$`),QP=new RegExp(`^hsla\\(${Io},${os},${os},${Io}\\)$`),JP={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function t6(){return this.rgb().formatHex()}function e6(){return this.rgb().formatRgb()}function n6(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=qP.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?r6(e):3===n?new s6(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?i6(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?i6(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=$P.exec(t))?new s6(e[1],e[2],e[3],1):(e=UP.exec(t))?new s6(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=XP.exec(t))?i6(e[1],e[2],e[3],e[4]):(e=KP.exec(t))?i6(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ZP.exec(t))?d6(e[1],e[2]/100,e[3]/100,1):(e=QP.exec(t))?d6(e[1],e[2]/100,e[3]/100,e[4]):JP.hasOwnProperty(t)?r6(JP[t]):"transparent"===t?new s6(NaN,NaN,NaN,0):null}function r6(t){return new s6(t>>16&255,t>>8&255,255&t,1)}function i6(t,e,n,r){return new s6(t=r<=0?e=n=NaN:t,e,n,r)}function a6(t){return(t=t instanceof HP?t:n6(t))?new s6((t=t.rgb()).r,t.g,t.b,t.opacity):new s6}function o6(t,e,n,r){return 1===arguments.length?a6(t):new s6(t,e,n,null==r?1:r)}function s6(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function l6(){return"#"+f6(this.r)+f6(this.g)+f6(this.b)}function c6(){var t=u6(this.opacity);return(1===t?"rgb(":"rgba(")+h6(this.r)+`, ${h6(this.g)}, `+h6(this.b)+(1===t?")":`, ${t})`)}function u6(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function h6(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function f6(t){return((t=h6(t))<16?"0":"")+t.toString(16)}function d6(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new g6(t,e,n,r)}function p6(t){var e,n,r,i,a,o,s,l;return t instanceof g6?new g6(t.h,t.s,t.l,t.opacity):(t=t instanceof HP?t:n6(t))?t instanceof g6?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new g6(o,s,l,t.opacity)):new g6}function g6(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function m6(t){return(t=(t||0)%360)<0?t+360:t}function v6(t){return Math.max(0,Math.min(1,t||0))}function y6(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}WP(HP,n6,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:t6,formatHex:t6,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return p6(this).formatHsl()},formatRgb:e6,toString:e6}),WP(s6,o6,YP(HP,{brighter(t){return t=null==t?VP:Math.pow(VP,t),new s6(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new s6(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new s6(h6(this.r),h6(this.g),h6(this.b),u6(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:l6,formatHex:l6,formatHex8:function(){return"#"+f6(this.r)+f6(this.g)+f6(this.b)+f6(255*(isNaN(this.opacity)?1:this.opacity))},formatRgb:c6,toString:c6})),WP(g6,function(t,e,n,r){return 1===arguments.length?p6(t):new g6(t,e,n,null==r?1:r)},YP(HP,{brighter(t){return t=null==t?VP:Math.pow(VP,t),new g6(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new g6(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new s6(y6(240<=t?t-240:120+t,n,e),y6(t,n,e),y6(t<120?240+t:t-120,n,e),this.opacity)},clamp(){return new g6(m6(this.h),v6(this.s),v6(this.l),u6(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){var t=u6(this.opacity);return(1===t?"hsl(":"hsla(")+m6(this.h)+`, ${100*v6(this.s)}%, ${100*v6(this.l)}%`+(1===t?")":`, ${t})`)}}));const b6=Math.PI/180,x6=180/Math.PI;var w6=1.78277,M6=-.29227,k6=-.90649,E6=1.97294,O6=E6*k6,S6=E6*w6,_6=w6*M6- -.14861*k6;function A6(t,e,n,r){return 1===arguments.length?(i=t)instanceof T6?new T6(i.h,i.s,i.l,i.opacity):(a=(i=i instanceof s6?i:a6(i)).r/255,o=i.g/255,l=i.b/255,l=(E6*(o-(a=(_6*l+O6*a-S6*o)/(_6+O6-S6)))-M6*(o=l-a))/k6,new T6((l=(s=Math.sqrt(l*l+o*o)/(E6*a*(1-a)))?Math.atan2(l,o)*x6-120:NaN)<0?l+360:l,s,a,i.opacity)):new T6(t,e,n,null==r?1:r);var i,a,o,s,l}function T6(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}WP(T6,A6,YP(HP,{brighter(t){return t=null==t?VP:Math.pow(VP,t),new T6(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new T6(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*b6,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),t=Math.sin(t);return new s6(255*(e+n*(-.14861*r+w6*t)),255*(e+n*(M6*r+k6*t)),255*(e+E6*r*n),this.opacity)}}));var P6=t=>()=>t;function L6(e,n){return function(t){return e+t*n}}function C6(a){return 1==(a=+a)?N6:function(t,e){return e-t?(n=t,r=e,i=a,n=Math.pow(n,i),r=Math.pow(r,i)-n,i=1/i,function(t){return Math.pow(n+t*r,i)}):P6(isNaN(t)?e:t);var n,r,i}}function N6(t,e){var n=e-t;return n?L6(t,n):P6(isNaN(t)?e:t)}!function t(e){var o=C6(e);function n(e,t){var n=o((e=o6(e)).r,(t=o6(t)).r),r=o(e.g,t.g),i=o(e.b,t.b),a=N6(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=r(t),e.b=i(t),e.opacity=a(t),e+""}}return n.gamma=t,n}(1);j6=function(s){var l=s.length-1;return function(t){var e,n=t<=0?t=0:1<=t?l-(t=1):Math.floor(t*l),r=s[n],i=s[n+1],a=0<n?s[n-1]:2*r-i,o=n<l-1?s[n+2]:2*i-r;return((1-3*(t=(t-n/l)*l)+3*(n=t*t)-(e=n*t))*a+(4-6*n+3*e)*r+(1+3*t+3*n-3*e)*i+e*o)/6}};var j6,R6=function(t){for(var e,n=t.length,r=new Array(n),i=new Array(n),a=new Array(n),o=0;o<n;++o)e=o6(t[o]),r[o]=e.r||0,i[o]=e.g||0,a[o]=e.b||0;return r=j6(r),i=j6(i),a=j6(a),e.opacity=1,function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e+""}};function I6(s){return function t(o){function e(e,t){var n=s((e=A6(e)).h,(t=A6(t)).h),r=N6(e.s,t.s),i=N6(e.l,t.l),a=N6(e.opacity,t.opacity);return function(t){return e.h=n(t),e.s=r(t),e.l=i(Math.pow(t,o)),e.opacity=a(t),e+""}}return o=+o,e.gamma=t,e}(1)}I6(function(t,e){var n=e-t;return n?L6(t,180<n||n<-180?n-360*Math.round(n/360):n):P6(isNaN(t)?e:t)});var hl=I6(N6),ns=t=>R6(t[t.length-1]),Uo=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(l),es=ns(Uo),ll=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(l),Wo=ns(ll),as=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(l),ls=ns(as),ts=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(l),ul=ns(ts),dl=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(l),qo=ns(dl),vl=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(l),El=ns(vl),Tl=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(l),gl=ns(Tl),xl=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(l),bs=ns(xl),cl=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(l),us=ns(cl),z1=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(l),Vo=ns(z1),e=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(l),os=ns(e),Io=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(l),B6=ns(Io),D6=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(l),F6=ns(D6),z6=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(l),G6=ns(z6),W6=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(l),Y6=ns(W6),H6=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(l),V6=ns(H6),q6=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(l),$6=ns(q6),U6=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(l),X6=ns(U6),K6=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(l),Z6=ns(K6),Q6=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(l),J6=ns(Q6),tL=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(l),eL=ns(tL),nL=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(l),rL=ns(nL),iL=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(l),aL=ns(iL),oL=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(l),sL=ns(oL),lL=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(l),cL=ns(lL),uL=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(l),hL=ns(uL),fL=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(l),ns=ns(fL);var dL=hl(A6(300,.5,0),A6(-240,.5,1)),pL=hl(A6(-100,.75,.35),A6(80,1.5,.8)),hl=hl(A6(260,.75,.35),A6(80,1.5,.8)),gL=A6();var mL=o6(),vL=Math.PI/3,yL=2*Math.PI/3;function bL(e){var n=e.length;return function(t){return e[Math.max(0,Math.min(n-1,Math.floor(t*n)))]}}var xL=bL(l("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),wL=bL(l("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),ML=bL(l("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),kL=bL(l("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),EL=Object.freeze({__proto__:null,schemeCategory10:a,schemeAccent:is,schemeDark2:r,schemePaired:rs,schemePastel1:Ho,schemePastel2:pl,schemeSet1:fl,schemeSet2:Yo,schemeSet3:n,schemeTableau10:$o,interpolateBrBG:es,schemeBrBG:Uo,interpolatePRGn:Wo,schemePRGn:ll,interpolatePiYG:ls,schemePiYG:as,interpolatePuOr:ul,schemePuOr:ts,interpolateRdBu:qo,schemeRdBu:dl,interpolateRdGy:El,schemeRdGy:vl,interpolateRdYlBu:gl,schemeRdYlBu:Tl,interpolateRdYlGn:bs,schemeRdYlGn:xl,interpolateSpectral:us,schemeSpectral:cl,interpolateBuGn:Vo,schemeBuGn:z1,interpolateBuPu:os,schemeBuPu:e,interpolateGnBu:B6,schemeGnBu:Io,interpolateOrRd:F6,schemeOrRd:D6,interpolatePuBuGn:G6,schemePuBuGn:z6,interpolatePuBu:Y6,schemePuBu:W6,interpolatePuRd:V6,schemePuRd:H6,interpolateRdPu:$6,schemeRdPu:q6,interpolateYlGnBu:X6,schemeYlGnBu:U6,interpolateYlGn:Z6,schemeYlGn:K6,interpolateYlOrBr:J6,schemeYlOrBr:Q6,interpolateYlOrRd:eL,schemeYlOrRd:tL,interpolateBlues:rL,schemeBlues:nL,interpolateGreens:aL,schemeGreens:iL,interpolateGreys:sL,schemeGreys:oL,interpolatePurples:cL,schemePurples:lL,interpolateReds:hL,schemeReds:uL,interpolateOranges:ns,schemeOranges:fL,interpolateCividis:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"},interpolateCubehelixDefault:dL,interpolateRainbow:function(t){(t<0||1<t)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return gL.h=360*t-100,gL.s=1.5-1.5*e,gL.l=.8-.9*e,gL+""},interpolateWarm:pL,interpolateCool:hl,interpolateSinebow:function(t){var e;return t=(.5-t)*Math.PI,mL.r=255*(e=Math.sin(t))*e,mL.g=255*(e=Math.sin(t+vL))*e,mL.b=255*(e=Math.sin(t+yL))*e,mL+""},interpolateTurbo:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"},interpolateViridis:xL,interpolateMagma:wL,interpolateInferno:ML,interpolatePlasma:kL});function OL(t,e,n,r,i,a){var o,s,{guide:l={}}=n,c=function(t,e,n){var{type:n,domain:r,range:i}=n;return void 0!==n?n:function(t){return BL(t,d0)}(e)?"identity":"string"==typeof i?"linear":2<(r||i||[]).length?LL(t):void 0===r?RL(e)?LL(t):IL(e)?"time":CL(t,i):RL([r])?LL(t):IL(e)?"time":CL(t,i)}(t,e,n);return"string"!=typeof c?n:(s=function(t,e,n){const r=n["ratio"];if(void 0===r||null===r)return e;if(AL({type:t}))return function(t,e,n){const r=t.map(Number),i=new k1({domain:r,range:[r[0],r[0]+(r[r.length-1]-r[0])*e]});return"time"===n?t.map(t=>new Date(i.map(t))):t.map(t=>i.map(t))}(e,r,t);return TL({type:t})?(n=e,t=r,t=Math.round(n.length*r),n.slice(0,t)):e}(c,o=function(t,e,n){var r=n["domain"];if(void 0!==r)return r;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":return NL(function(t,e){var{zero:e=!1}=e;let n=1/0,r=-1/0;for(const i of t)for(const a of i)c0(a)&&(n=Math.min(n,+a),r=Math.max(r,+a));return n===1/0?[]:e?[Math.min(0,n),r]:[n,r]}(e,n),n);case"band":case"ordinal":case"point":return jL(e);case"quantile":return function(t){return jL(t).sort()}(e);case"sequential":return NL(function(t){let e=1/0,n=-1/0;for(const r of t)for(const i of r)c0(i)&&(e=Math.min(e,+i),n=Math.max(n,+i));return e===1/0?[]:[e<0?-n:e,n]}(e),n);default:return[]}}(c,e,n),n),Object.assign(Object.assign(Object.assign({},n),function(t,e,n,r){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return function(t){var{interpolate:e=Jv,nice:n=!1,tickCount:r=5}=t;return Object.assign(Object.assign({},t),{interpolate:e,nice:n,tickCount:r})}(n);case"band":case"point":return function(t,e,n,r){if(void 0!==r.padding||void 0!==r.paddingInner||void 0!==r.paddingOuter)return Object.assign(Object.assign({},r),{unknown:NaN});var t=function(t,e,n){return"enterDelay"===e||"enterDuration"===e?0:"band"!==t?"point"===t?.5:0:zP(n)?0:.1}(t,e,n),{paddingInner:e=t,paddingOuter:n=t}=r;return Object.assign(Object.assign({},r),{paddingInner:e,paddingOuter:n,padding:t,unknown:NaN})}(t,e,r,n);case"sequential":return function(t){const{palette:e="ylGnBu",offset:n}=t,r=en(e),i=EL["interpolate"+r];if(i)return{interpolator:n?t=>i(n(t)):i};throw new Error("Unknown palette: "+r)}(n);default:return n}}(c,t,n,r)),{domain:s,range:function(t,e,n,r,i,a,o){var s=r["range"];if("string"==typeof s)return s.split("-");if(void 0!==s)return s;var{rangeMin:l,rangeMax:c}=r;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":var u=PL(n,r,i,a,o),[u,h]=function(t,e){return"enterDelay"===t?[0,1e3]:"enterDuration"==t?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:"color"===t?[e[0],Q1(e)]:"opacity"!==t&&"size"===t?[1,10]:[0,1]}(e,u);return[l||u,c||h];case"band":case"point":return[l||0,c||1];case"ordinal":return PL(n,r,i,a,o);case"sequential":return;case"constant":return[n[0][0]];default:return[]}}(c,t,e,n,s,i,a),expectedDomain:o,guide:l,name:t,type:c}))}function SL(t,e){var[e]=RP("scale",e),n=t["relations"],[n]=function(o){if(!o||!Array.isArray(o))return[a0,a0];let s,l;return[t=>{s=t.map.bind(t),l=null==(e=t.invert)?void 0:e.bind(t);const r=o.filter(([t])=>"function"==typeof t);var e=o.filter(([t])=>"function"!=typeof t);const i=new Map(e);if(t.map=t=>{for(var[e,n]of r)if(e(t))return n;return i.has(t)?i.get(t):s(t)},l){const n=new Map(e.map(([t,e])=>[e,t])),a=new Map(r.map(([t,e])=>[e,t]));t.invert=t=>a.has(t)?t:n.has(t)?n.get(t):l(t)}return t},t=>(null!==s&&(t.map=s),null!==l&&(t.invert=l),t)]}(n);return n(e(t))}function _L(t,n){var t=t.filter(({name:t,facet:e=!0})=>e&&t===n),e=t.flatMap(t=>t.domain),r=t.every(AL)?jd(e):t.every(TL)?Array.from(new Set(e)):null;if(null!==r)for(const i of t)i.domain=r}function AL(t){t=t.type;return"string"==typeof t&&["linear","log","pow","time"].includes(t)}function TL(t){t=t.type;return"string"==typeof t&&["band","point","ordinal"].includes(t)}function PL(t,e,n,r,i){var[i]=RP("palette",i),{defaultCategory10:r,defaultCategory20:a}=r,t=(t=t.flat(),Array.from(new Set(t)).length<=r.length?r:a),{palette:r=t,offset:a}=e;try{return i({type:r})}catch(t){e=function(t,n,r=t=>t){if(!t)return null;const e=en(t),i=EL["scheme"+e],a=EL["interpolate"+e];if(!i&&!a)return null;if(i){if(!i.some(Array.isArray))return i;t=i[n.length];if(t)return t}return n.map((t,e)=>a(r(e/n.length)))}(r,n,a);if(e)return e;throw new Error(`Unknown Component: ${r} `)}}function LL(t){return(t=t).startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")?"point":"ordinal"}function CL(t,e){return"color"!==t||e?"linear":"sequential"}function NL(t,e){var n,r;return 0===t.length?t:({domainMin:e,domainMax:n}=e,[t,r]=t,[null!=e?e:t,null!=n?n:r])}function jL(t){return Array.from(new Set(t.flat()))}function RL(t){return BL(t,t=>{t=typeof t;return"string"==t||"boolean"==t})}function IL(t){return BL(t,t=>t instanceof Date)}function BL(t,e){for(const n of t)if(n.some(e))return!0;return!1}const DL={linear:"linear",identity:"identity",log:"log",pow:"pow",sqrt:"sqrt",sequential:"sequential"},FL={threshold:"threshold",quantize:"quantize",quantile:"quantile"},zL={ordinal:"ordinal",band:"band",point:"point"},GL={constant:"constant"};function WL(t,e,n){const{component:r=[],coordinates:d=[],title:i}=e,[,p]=RP("component",n),g=t.filter(({guide:t})=>null!==t);var a,e=function(t,e,n){const[,o]=RP("component",n),s=t["coordinates"];function i(t,e,n,r){[e,t,i=[]]=[e,t,s];var i,a,e="x"===e?FP(i)?t+"Y":t+"X":"y"===e?FP(i)?t+"X":t+"Y":null;if(r&&e)return i=o(e)["props"],{defaultPosition:t,defaultSize:i,defaultOrder:a}=i,Object.assign(Object.assign({position:t,size:i,order:a,type:e},r),{scales:[n]})}return e.filter(t=>t.slider||t.scrollbar).flatMap(t=>{var{slider:e,scrollbar:n,name:r}=t;return[i("slider",r,t,e),i("scrollbar",r,t,n)]}).filter(t=>!!t)}(e,t,n);const m=[...r,...e];return i&&(t=p("title")["props"],{defaultPosition:n,defaultOrientation:e,defaultOrder:t,defaultSize:a}=t,m.push(Object.assign({type:"title",position:n,orientation:e,order:t,size:a},"string"==typeof i?{title:i}:i))),function(t,e){t=t.filter(t=>{return!!((t=t)&&t.type&&("function"==typeof t.type||({type:t,domain:n,range:r,interpolator:e}=t,n=n&&0<n.length,r=r&&0<r.length,["linear","sqrt","log","time","pow","threshold","quantize","quantile","ordinal","band","point"].includes(t)&&n&&r)||["sequential"].includes(t)&&n&&(r||e)||["constant","identity"].includes(t)&&r));var e,n,r});return[...function(t){const e=t.filter(t=>"string"!=typeof t.type||["shape","size","color","opacity"].includes(t.name)).filter(t=>!("constant"===t.type&&"size"===t.name)),n=e.filter(t=>!t.field),r=e.filter(t=>!!t.field),i=new Map(Array.from(Fd(r,t=>t.field)).map(([t,e])=>[t,[...e,...n.filter(t=>"constant"===t.type)]]).concat([[void 0,n]]).filter(([,t])=>t.some(t=>"constant"!==t.type)));if(0===i.size)return[];t=Array.from(i).map(([,t])=>{var e,n,r=function(e){if(1===e.length)return[e];var n=[];for(let t=1;t<=e.length;t++)n.push(...ty(e,t));return n}(t).sort((t,e)=>e.length-t.length).map(t=>({combination:t,option:t.map(t=>{return[t.name,"string"!=typeof(t=(t=t).type)?null:t in DL?"continuous":t in zL?"discrete":t in FL?"distribution":t in GL?"constant":null]})}));const i=t=>t.sort((t,e)=>t[0].localeCompare(e[0]));for([e,n]of oP)for(const{option:a,combination:o}of r)if(n.some(t=>hn(i(t),i(a))))return[e,o];return null}).filter(c0);return t}(t),...function(t,n){return t.map(t=>{var e=t["name"];if(!(0<BP(n,"helix").length||zP(n))&&(!FP(n)||!DP(n)&&!GP(n))){if(e.startsWith("x"))return DP(n)?["axisArc",[t]]:GP(n)?["axisLinear",[t]]:[FP(n)?"axisY":"axisX",[t]];if(e.startsWith("y"))return DP(n)?["axisLinear",[t]]:GP(n)?["axisArc",[t]]:[FP(n)?"axisX":"axisY",[t]];if(e.startsWith("position")){if(0<BP(n,"radar").length)return["axisRadar",[t]];if(!DP(n))return["axisY",[t]]}}return null}).filter(c0)}(t,e)]}(g,d).forEach(([t,e])=>{var n=p(t)["props"],{defaultPosition:r,defaultOrientation:i,defaultSize:a,defaultOrder:o}=n,{guide:n,field:s}=Object.assign({},...e);for(const f of Array.isArray(n)?n:[n]){var l,c,[u,h]=function(t,e,n,r,i,a,o){var[s]=HL(o),e=[r.position||e,null!=s?s:n];if("string"==typeof t&&t.startsWith("axis"))return function(t,e,n,r,i){n=n[0].name;{var a,o;if("axisRadar"===t)return r=r.filter(t=>t.name.startsWith("position")),a=VL(n),n===r.slice(-1)[0].name||null===a?[null,null]:([o,s]=HL(i),["center",(s-o)/(r.length-1)*a+o])}{var s;if("axisY"===t&&function(t){return 0<BP(t,"parallel").length}(i))return null===(s=VL(n))?e:FP(i)?0===s?["top",null]:["center","horizontal"]:0===s?e:["center","vertical"]}if("axisLinear"===t)return[r]=HL(i),["center",r];if("axisArc"===t)return"inner"===e[0]?["inner",null]:["outer",null];if(DP(i))return["center",null];if(GP(i))return["center",null];if("axisX"===t&&function(t){return 0<BP(t,"reflect").length}(i)||"axisX"===t&&function(t){return 0<BP(t,"reflectY").length}(i))return["top",null];return e}(t,e,i,a,o);if("string"==typeof t&&t.startsWith("legend")&&DP(o)&&"center"===r.position)return["center","vertical"];return e}(t,r,i,f,e,g,d);(u||h)&&({size:l=a,order:c=o}=f,m.push(Object.assign(Object.assign({title:s},f),{position:u,orientation:h,order:c,size:l,type:t,scales:e})))}}),m}function YL(t,e,n,r,i){var[a]=RP("component",r),{scales:o=[],bbox:s}=t,t=nt(t,["scales","bbox"]),l=o.map(t=>SL(t,r)),s={bbox:s,scales:o,library:r};return a(t)({coordinate:e,library:r,markState:i,scales:l,theme:n,value:s})}function HL(t){var e,n=BP(t,"polar");return n.length?(n=n[n.length-1],{startAngle:n,endAngle:e}=Xh(n),[n,e]):(n=BP(t,"radial")).length?(e=n[n.length-1],{startAngle:t,endAngle:n}=tf(e),[t,n]):[-Math.PI/2,Math.PI/2*3]}function VL(t){t=/position(\d*)/g.exec(t);return t?+t[1]:null}function qL(t,e,n,r,i,a){var[a]=RP("scale",a),o=t["type"];if("string"==typeof o&&o.startsWith("axis")&&["left","right","bottom","top"].includes(r)){t.transform=t.transform||[{type:"hide"}];var{labelFormatter:o,scales:s,title:l,tickCount:c,tickMethod:u,tickFilter:h}=t;const p="left"===r||"right"===r;var r=function(t,e,n){var{axis:n,["axis"+o0(e)]:e}=n;return rt({},n,e,t.style)}(t,r,i),{tickLength:i=0,labelSpacing:f=0,titleSpacing:d=0}=r,r=nt(r,["tickLength","labelSpacing","titleSpacing"]),[s]=s,c=(void 0!==c&&(s.tickCount=c),void 0!==u&&(s.tickMethod=u),a(s));const g=function(t,e,n){n=$L(t,n),n=n.map(t=>{return"number"==typeof t?(e=t,Math.abs(e)<1e-15?e:parseFloat(e.toFixed(15))):t;var e}),e=e?"string"==typeof e?WE(e):e:t.getFormatter?t.getFormatter():t=>""+t;return n.map(e)}(c,o,h),m=it(r,"label"),v=g.map((n,r)=>{var t=Object.fromEntries(Object.entries(m).map(([t,e])=>[t,"function"==typeof e?e(n,r):e]));return p||(t.transform="none"),UL(n,t)});u=ep(v,t=>t.width),a=i+f,o=(p?t.size=u+a:!function(t,e,n,r,i){var a=dp(e,t=>t.width);if(n<a)return 1;const o=t.clone(),s=(o.update({range:[0,n]}),$L(t,i)),l=s.map(t=>o.map(t)+function(t,e){if(!t.getBandWidth)return 0;t=t.getBandWidth(e)/2;return t}(o,t)),c=s.map((t,e)=>e),u=-r[0],h=n+r[1],f=(t,e)=>{e=e.width;return[t-e/2,t+e/2]};for(let t=0;t<c.length;t++){var d=l[t],[d,p]=f(d,e[t]);if(d<u||h<p)return 1;d=l[t+1];if(d){var[d]=f(d,e[t+1]);if(d<p)return 1}}return}(c,v,e,n,h)?(s=ep(v,t=>t.height),t.size=s+a):(t.size=u+a,t.style=Object.assign(Object.assign({},t.style),{labelTransform:"rotate(90)"})),g.map((t,e)=>e));t.indexBBox=new Map(o.map(t=>[t,[g[t],v[t]]])),!1!==l&&null!=l&&(i=it(r,"title"),f=UL(Array.isArray(l)?l.join(","):l,i),p?t.size+=d+f.width:t.size+=d+f.height)}}function $L(t,e){t=t.getTicks?t.getTicks():t.getOptions().domain;return e?t.filter(e):t}function UL(t,e){t=(t=t)instanceof Ls?t:new el({style:{text:""+t}}),t.attr(Object.assign(Object.assign({},e),{visibility:"none"})),e=t.getBBox();return e}function XL(t,e,n,r,i,a,o){var s=Fd(t,t=>t.position),{padding:t,paddingLeft:i=t,paddingRight:l=t,paddingBottom:c=t,paddingTop:t=t}=i,u={paddingBottom:c,paddingLeft:i,paddingTop:t,paddingRight:l};for(const d of r){var h="padding"+o0(iE(d)),f=u[h];if(void 0===f||"auto"===f)if(s.has(d)){const t=s.get(d);"auto"===f&&t.forEach(t=>qL(t,e,n,d,a,o));f=t.reduce((t,{size:e})=>t+e,0);u[h]=f}else u[h]=30}return u}function KL(t,I,e){var B=Fd(t,t=>t.position),{paddingLeft:t,paddingRight:e,paddingTop:n,paddingBottom:D,marginLeft:r,marginTop:i,marginBottom:F,marginRight:z,innerHeight:a,innerWidth:o,height:s,width:G}=e,t=t+r,r=n+i,n=e+z,i=D+F,W={top:[t,0,o,r,"vertical",!0,Od],right:[G-n,r,n,a,"horizontal",!1,Od],bottom:[t,s-i,o,i,"vertical",!1,Od],left:[0,r,t,a,"horizontal",!0,Od],"top-left":[t,0,o,r,"vertical",!0,Od],"top-right":[t,0,o,r,"vertical",!0,Od],"bottom-left":[t,s-i,o,i,"vertical",!1,Od],"bottom-right":[t,s-i,o,i,"vertical",!1,Od],center:[t,r,o,a,"center",null,null],inner:[t,r,o,a,"center",null,null],outer:[t,r,o,a,"center",null,null]};for(const[j,t]of B.entries()){var l=W[j],[c,Y]=J1(t,t=>"string"==typeof t.type&&("center"===j||!(!t.type.startsWith("axis")||!["inner","outer"].includes(j))));if(c.length){p=d=f=h=u=void 0;var u=c,h=I,f=l,d=j,[u,p]=J1(u,t=>!("string"!=typeof t.type||!t.type.startsWith("axis"))),c=(v=m=g=c=void 0,u),g=h,m=f,v=d;if("center"===v)if(!function(t){return yp(t)&&gp(t)}(g)){if(gp(g)){u=void 0;d=void 0;y=void 0;b=void 0;x=void 0;w=void 0;u=c;d=m;var[y,b,x,w]=d;for(const tt of u)tt.bbox={x:y,y:b,width:x,height:w}}else if(yp(g)){d=void 0;u=void 0;M=void 0;k=void 0;d=c;u=g;var M=m;var k=c[0].orientation;"horizontal"===k?function(e,t,n){const[r,i,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==1).map(t=>t+i);for(let t=0;t<e.length;t++){var c=e[t];const i=l[t];var u=l[t+1]-i;c.bbox={x:r,y:i,width:a,height:u}}}(d,u,M):"vertical"===k&&function(e,t,n){const[r,i,,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==0).map(t=>t+r);for(let t=0;t<e.length;t++){var c=e[t];const r=l[t];var u=l[t+1]-r;c.bbox={x:r,y:i,width:u,height:a}}}(d,u,M)}}else{E=void 0;k=void 0;O=void 0;S=void 0;_=void 0;A=void 0;var E=c;k=m;var[O,S,_,A]=k;for(const R of E)R.bbox={x:O,y:S,width:_,height:A},R.radar={index:E.indexOf(R),count:E.length}}else if("inner"===v){T=void 0;d=void 0;u=void 0;H=void 0;V=void 0;M=void 0;P=void 0;L=void 0;q=void 0;$=void 0;var T=c;d=g;u=m;var[H,V,,u]=u,[M,P]=d.getCenter(),[d]=wp(d),u=u/2,L=d*u,q=M-L,$=P-L;for(let t=0;t<T.length;t++)T[t].bbox={x:H+q,y:V+$,width:2*L,height:2*L}}else if("outer"===v){g=void 0;d=void 0;U=void 0;X=void 0;K=void 0;Z=void 0;g=c;d=m;var[U,X,K,Z]=d;for(const et of g)et.bbox={x:U,y:X,width:K,height:Z}}J=Q=N=m=c=v=P=u=C=void 0;var C=p,u=h,P=f;if(0!==C.length){var[P,v,c,m]=P,[u]=wp(u),N=m/2*u/Math.sqrt(2),Q=P+c/2,J=v+m/2;for(let t=0;t<C.length;t++)C[t].bbox={x:Q-N,y:J-N,width:2*N,height:2*N}}}Y.length&&!function(n,t){const[e,r,i,a,o,s,l]=t,[c,u,h,f,d,p,g,m]="vertical"===o?["y",r,"x",e,"height",a,"width",i]:["x",e,"y",r,"width",i,"height",a],v=(n.sort((t,e)=>null===l||void 0===l?void 0:l(t.order,e.order)),s?u+p:u);for(let t=0,e=v;t<n.length;t++){var y=n[t],b=y["size"];y.bbox={[c]:s?e-b:e,[h]:f,[d]:b,[g]:m},e+=b*(s?-1:1)}}(t,l)}}function ZL(t,e,n){var{encode:r={},scale:i={},transform:a=[]}=e,e=nt(e,["encode","scale","transform"]);return[t,Object.assign(Object.assign({},e),{encode:r,scale:i,transform:a})]}function QL(t,i,a){return ce(this,void 0,void 0,function*(){var t=a["library"],e=i["data"],[t]=RP("data",t),n=function(t){if(!t)return{type:"inline",value:null};if(Array.isArray(t))return{type:"inline",value:t};var{type:e="inline"}=t,t=nt(t,["type"]);return Object.assign(Object.assign({},t),{type:e})}(e),{transform:r=[]}=n,n=yield function(t){return t.reduce((n,r)=>e=>ce(this,void 0,void 0,function*(){var t=yield n(e);return r(t)}),a0)}([nt(n,["transform"]),...r].map(t))(e);return[Array.isArray(n)?Z1(n):[],Object.assign(Object.assign({},i),{data:n})]})}function JL(t,e,n){var r=e["encode"];if(!r)return[t,e];var i,a,o={};for([i,a]of Object.entries(r))if(Array.isArray(a))for(let t=0;t<a.length;t++)o[""+i+(0===t?"":t)]=a[t];else o[i]=a;return[t,Object.assign(Object.assign({},e),{encode:o})]}function t8(t,e,n){const{encode:r,data:i}=e;var a;return r?(a=K1(r,t=>{var e,n;return function(t){if("object"!=typeof t||t instanceof Date||null===t)return;t=t.type;return c0(t)}(t)?t:(e=i,{type:"function"==typeof(n=t)?"transform":"string"==typeof n&&function(t,e){return Array.isArray(t)&&t.some(t=>void 0!==t[e])}(e,n)?"field":"constant",value:t})}),[t,Object.assign(Object.assign({},e),{encode:a})]):[t,e]}function e8(t,e,n){var r=e["encode"];return r?(r=K1(r,(t,e)=>{var n=t["type"];return"constant"!==n||(n=e).startsWith("x")||n.startsWith("y")||n.startsWith("position")||"enterDelay"===n||"enterDuration"===n||"updateDelay"===n||"updateDuration"===n||"exitDelay"===n||"exitDuration"===n?t:Object.assign(Object.assign({},t),{constant:!0})}),[t,Object.assign(Object.assign({},e),{encode:r})]):[t,e]}function n8(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];n=n.library;const a=function(t){const[n]=RP("encode",t);return(t,e)=>void 0===e||void 0===t?null:Object.assign(Object.assign({},e),{type:"column",value:n(e)(t),field:function(t){var{type:t,value:e}=t;return"field"===t&&"string"==typeof e?e:null}(e)})}(n);n=K1(r,t=>a(i,t));return[t,Object.assign(Object.assign({},e),{encode:n})]}function r8(t,e,n){var{tooltip:r={}}=e;return p0(r)?[t,e]:Array.isArray(r)?[t,Object.assign(Object.assign({},e),{tooltip:{items:r}})]:d0(r)&&v0(r)?[t,Object.assign(Object.assign({},e),{tooltip:r})]:[t,Object.assign(Object.assign({},e),{tooltip:{items:[r]}})]}function i8(g,t,e){const{data:m,encode:v,tooltip:n={}}=t;var r,i,a,o;return p0(n)?[g,t]:(r=e=>{if(!e)return e;if("string"==typeof e)return g.map(t=>({name:e,value:m[t][e]}));if(d0(e)){var{field:t,channel:n,color:r,name:i=t,valueFormatter:a=t=>t}=e,o="string"==typeof a?WE(a):a,s=n&&v[n],a=s&&v[n].field,l=i||a||n,c=[];for(const d of g){var u=t?m[d][t]:s?v[n].value[d]:null;c[d]={name:l,color:r,value:o(u)}}return c}if("function"!=typeof e)return e;var h=[];for(const p of g){var f=e(m[p],p,m,v);d0(f)?h[p]=f:h[p]={value:f}}return h},{title:o,items:i=[]}=n,a=nt(n,["title","items"]),o=Object.assign({title:r(o),items:Array.isArray(i)?i.map(r):[]},a),[g,Object.assign(Object.assign({},t),{tooltip:o})])}function a8(l,t,e){var n,r=t["encode"],i=nt(t,["encode"]);return r?(n=(r=Object.entries(r)).filter(([,t])=>{t=t.value;return Array.isArray(t[0])}).flatMap(([n,t])=>{var r=[[n,new Array(l.length).fill(void 0)]];const i=t["value"],a=nt(t,["value"]);for(let e=0;e<i.length;e++){var o=i[e];if(Array.isArray(o))for(let t=0;t<o.length;t++){var s=r[t]||[""+n+t,new Array(l).fill(void 0)];s[1][e]=o[t],r[t]=s}}return r.map(([t,e])=>[t,Object.assign({type:"column",value:e},a)])}),r=Object.fromEntries([...r,...n]),[l,Object.assign(Object.assign({},i),{encode:r})]):[l,t]}function o8(t,e,n){const{axis:r={},legend:i={},slider:a={},scrollbar:o={}}=e,s=(t,e)=>{return"boolean"==typeof t?t?{}:null:void 0===(t=t[e])||t?t:null};var l="object"==typeof r?Array.from(new Set(["x","y",...Object.keys(r)])):["x","y"];return rt(e,{scale:Object.assign(Object.assign({},Object.fromEntries(l.map(t=>{var e=s(o,t);return[t,Object.assign({guide:s(r,t),slider:s(a,t),scrollbar:e},e&&{ratio:void 0===e.ratio?.5:e.ratio})]}))),{color:{guide:s(i,"color")},size:{guide:s(i,"size")},shape:{guide:s(i,"shape")},opacity:{guide:s(i,"opacity")}})}),[t,e]}function s8(t,e,n){var r=e["animate"];return r||void 0===r||rt(e,{animate:{enter:{type:null},exit:{type:null},update:{type:null}}}),[t,e]}function l8(l,c,u){return ce(this,void 0,void 0,function*(){var[t,e]=yield function(s,l,c){return ce(this,void 0,void 0,function*(){var t=c["library"],[t]=RP("transform",t),{preInference:e=[],postInference:n=[]}=l,{transform:r=[]}=s,e=[ZL,QL,JL,t8,e8,n8,a8,s8,o8,r8,...e.map(t),...r.map(t),...n.map(t),i8];let i=[],a=s;for(const o of e)[i,a]=yield o(i,a,c);return[i,a]})}(l,c,{library:u});const{encode:n,scale:f,data:r,tooltip:i}=e;if(!1===Array.isArray(r))return null;const a=c["channels"],o=Gd(Object.entries(n).filter(([,t])=>c0(t)),t=>t.map(([t,e])=>Object.assign({name:t},e)),([t])=>{const e=null==(n=/([^\d]+)\d*$/.exec(t))?void 0:n[1];var n=a.find(t=>t.name===e);return null!=n&&n.independent?t:e});var s=a.filter(t=>{const{name:e,required:n}=t;if(o.find(([t])=>t===e))return!0;if(n)throw new Error(`Missing encoding for channel: ${e}.`);return!1}).flatMap(t=>{const{name:e,scale:c,scaleKey:u,range:h}=t;return o.filter(([t])=>t.startsWith(e)).map(([t,e],n)=>{var r=e.some(t=>t.visual),i=e.some(t=>t.constant),a=f[t]||{},{independent:o=!1,key:s=u||t,type:i=i?"constant":r?"identity":c}=a,r=nt(a,["independent","key","type"]),a="constant"===i,l=a?void 0:h;return{name:t,values:e,scaleKey:o||a?Symbol("independent"):s,scale:Object.assign({type:i,range:l},r)}})});return[e,Object.assign(Object.assign({},c),{index:t,channels:s,tooltip:i})]})}function c8(G,W,Y,H){var V,q;return ce(this,void 0,void 0,function*(){const[n]=RP("composition",Y);var[t]=RP("interaction",Y);const r=new Set(Object.keys(Y).map(t=>{return null==(t=/mark\.(.*)/.exec(t))?void 0:t[1]}).filter(c0)),i=t=>{t=t.type;if("function"==typeof t){var{props:e={}}=t,{composite:e=!0}=e;if(e)return"mark"}return"string"==typeof t&&r.has(t)?"mark":t};const a=t=>"standardView"===i(t);var e=t=>{var e;return a(t)?[t]:(e=i(t),n({type:e})(t))},o=[];const s=new Map;for(var l=new Map,c=[G],u=[];c.length;){var h=c.shift();if(a(h)){var f=l.get(h),[f,d]=f?d8(f,h,Y):yield h8(h,Y),p=(s.set(f,h),o.push(f),d.flatMap(e).map(t=>IP(t,Y)));if(c.push(...p),p.every(a)){var g=yield Promise.all(p.map(t=>f8(t,Y)));_L(f=(f=g).flatMap(t=>Array.from(t.values())).flatMap(t=>t.channels.map(t=>t.scale)),"x"),_L(f,"y");for(let t=0;t<p.length;t++){var I=p[t],B=g[t];l.set(I,B)}}}else{d="mark"===i(h)?h:yield w8(h,Y),f=e(d);Array.isArray(f)?c.push(...f):"function"==typeof f&&u.push(f())}}H.emitter.emit(F5.BEFORE_PAINT);const m=new Map,v=new Map,y=[];W.selectAll(O8(Uc)).data(o,t=>t.key).join(t=>t.append("g").attr("className",Uc).attr("id",t=>t.key).call(u8).each(function(t){p8(t,at(this),y,Y,H),m.set(t,this)}),t=>t.call(u8).each(function(t){p8(t,at(this),y,Y,H),v.set(t,this)}),t=>t.each(function(){for(const t of this.nameInteraction.values())t.destroy()}).remove());var b=t=>Array.from(t.entries()).map(([t,e])=>({view:t,container:e,options:s.get(t),update:function(f,d,p){return h=>ce(this,void 0,void 0,function*(){var t,[e,n]=yield h8(h,d),r=(p8(e,f,[],d,p),f),i=h,a=e,o=p,[s]=RP("interaction",s=d),l=(l=r.node()).nameInteraction,c=x8(i).find(([t])=>"tooltip"===t);(l=l.get("tooltip"))&&(null!=(t=l.destroy)&&t.call(l),c[1])&&(t=s(Object.assign({type:"tooltip"},c[1])),l={options:i,view:a,container:r.node(),update:t=>Promise.resolve(t)},t(l,[],o.emitter));for(const u of n)c8(u,f,d,p);return{options:h,view:e}})}(at(e),Y,H)})),x=b(m);for(const P of x){const G=P["options"];var w=new Map;P.container.nameInteraction=w;for(const L of x8(G)){var[M,k]=L;k&&(k=t(Object.assign({type:M},k))(P,x,H.emitter),w.set(M,{destroy:k}))}}var E=b(v);for(const C of E){const{options:G,container:N}=C;var O=N.nameInteraction;for(const j of x8(G)){var[S,_]=j,A=O.get(S);A&&null!=(V=A.destroy)&&V.call(A),_&&(A=t(Object.assign({type:S},_))(C,E,H.emitter),O.set(S,{destroy:A}))}}const{width:D,height:F}=G;var T=[];for(const R of u){var z=new Promise(e=>ce(this,void 0,void 0,function*(){for(const t of R)yield c8(Object.assign({width:D,height:F},t),W,Y,H);e()}));T.push(z)}H.views=o,null!=(q=H.animations)&&q.forEach(t=>null==t?void 0:t.cancel()),H.animations=y,H.emitter.emit(F5.AFTER_PAINT);b=y.filter(c0).map(y8).map(t=>t.finished);return Promise.all([...b,...T])})}function u8(t){t.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function h8(e,n){return ce(this,void 0,void 0,function*(){var t=function(t){var{coordinate:e={},interaction:n={},style:r={},marks:i}=t,t=nt(t,["coordinate","interaction","style","marks"]),a=i.map(t=>t.coordinate||{}),o=i.map(t=>t.interaction||{}),s=i.map(t=>t.viewStyle||{}),a=[...a,e].reduceRight((t,e)=>rt(t,e),{}),e=[n,...o].reduce((t,e)=>rt(t,e),{}),n=[...s,r].reduce((t,e)=>rt(t,e),{});return Object.assign(Object.assign({},t),{marks:i,coordinate:a,interaction:e,style:n})}(yield function(c,u){return ce(this,void 0,void 0,function*(){var[t,e]=RP("mark",u);const n=c["marks"];for(var r=[],i=[...n];i.length;){var[a]=i.splice(0,1),a=yield w8(a,u);const{type:s=s0("G2Mark type is required."),key:l}=a;var{props:o={}}=e(s),{composite:o=!0}=o;if(o){const n=yield t(a)(c);o=Array.isArray(n)?n:[n];i.unshift(...o.map((t,e)=>Object.assign(Object.assign({},t),{key:l+"-"+e})))}else r.push(a)}return Object.assign(Object.assign({},c),{marks:r})})}(e,n)),t=(e.interaction=t.interaction,e.coordinate=t.coordinate,IP(t,n));return d8(yield f8(t,n),t,n)})}function f8(p,g){return ce(this,void 0,void 0,function*(){var[t]=RP("theme",g),[,e]=RP("mark",g),{theme:n,marks:r,coordinates:i=[]}=p,a=t(b8(n)),o=new Map;for(const h of r){var s,l=h["type"],{props:l={}}=e(l),l=yield l8(h,l,g);l&&([l,s]=l,o.set(l,s))}for(const f of Fd(Array.from(o.values()).flatMap(t=>t.channels),({scaleKey:t})=>t).values()){var c=f.reduce((t,{scale:e})=>rt(t,e),{}),u=f[0]["values"],u=Array.from(new Set(u.map(t=>t.field).filter(c0)));const p=rt({guide:{title:0===u.length?void 0:u},field:u[0]},c);u=f[0]["name"];const d=OL(u,f.flatMap(({values:t})=>t.map(t=>t.value)),p,i,a,g);f.forEach(t=>t.scale=d)}return o})}function d8(t,e,n){var[r]=RP("mark",n),[i]=RP("theme",n),[a]=RP("labelTransform",n);const{key:o,frame:s=!1,theme:l,clip:c,style:u={},labelTransform:h=[]}=e;var f,d,i=i(b8(l)),p=Array.from(t.values()),g=Array.from(new Set(p.flatMap(t=>t.channels.map(t=>t.scale)))),g=WL(function(t,e,n){for(var[r]of n.entries())if("cell"===r.type)return t.filter(t=>"shape"!==t.name);if(1!==e.length||t.some(t=>"shape"===t.name))return t;n=e[0].defaultShape;if(!["point","line","rect","hollow"].includes(n))return t;e=(null==(e=t.find(t=>"color"===t.name))?void 0:e.field)||null,e={field:e,name:"shape",type:"constant",domain:[],range:[{point:"point",line:"hyphen",rect:"square",hollow:"hollow"}[n]]};return[...t,e]}(Array.from(g),p,t),e,n),m=function(t,e,n,r){var{width:i,height:a,x:o=0,y:s=0,inset:l=0,insetLeft:c=l,insetTop:u=l,insetBottom:h=l,insetRight:l=l,margin:f=0,marginLeft:d=f,marginBottom:p=f,marginTop:g=f,marginRight:f=f,padding:m,paddingBottom:v=m,paddingLeft:y=m,paddingRight:b=m,paddingTop:m=m}=e,x=(t,e,n)=>"auto"===t?Math.min(n,e):e,{paddingLeft:w,paddingRight:M}=XL(t,a,[0,0],["left","right"],e,n,r),y=x(y,w,1/3*(k=i-d-f)),w=x(b,M,1/3*k),{paddingTop:M,paddingBottom:k}=XL(t,b=k-y-w,[y,w],["bottom","top"],e,n,r),e=x(v,k,1/3*(t=a-p-g)),n=x(m,M,1/3*t);return{width:i,height:a,insetLeft:c,insetTop:u,insetBottom:h,insetRight:l,innerWidth:b,innerHeight:t-e-n,paddingLeft:y,paddingRight:w,paddingTop:n,paddingBottom:e,marginLeft:d,marginBottom:p,marginTop:g,marginRight:f,x:o,y:s}}(g,e,i,n),v=function(t,e,n){var[n]=RP("coordinate",n),{innerHeight:r,innerWidth:i,insetLeft:a,insetTop:o,insetRight:s,insetBottom:l,marginLeft:c,marginTop:u}=t,{coordinates:e=[]}=e,e=(e=e).find(t=>"cartesian"===t.type)?e:[...e,{type:"cartesian"}];return new NP(Object.assign(Object.assign({},t),{x:a+c,y:o+u,width:i-a-s,height:r-l-o,transformations:e.map(n).flat()}))}(m,e,n),p=s?rt({mainLineWidth:1,mainStroke:"#000"},u):u,y=(KL(g,v,m),{}),b=[];for([f,d]of t.entries()){const{children:M,dataDomain:k,modifier:E,key:O}=f,{index:S,channels:_,tooltip:A}=d;var x=K1(Object.fromEntries(_.map(({name:t,scale:e})=>[t,e])),t=>SL(t,n));Object.assign(y,x);const T=function(t,e){var n={};for(const s of t){var{values:r,name:i}=s;const l=e[i];for(const c of r){var{name:a,value:o}=c;n[a]=o.map(t=>l.map(t))}}return n}(_,x),[P,L,C]=function([e,n,t]){if(t)return[e,n,t];var r=[],i=[];for(let t=0;t<e.length;t++){var a=e[t],o=n[t];o.every(([t,e])=>c0(t)&&c0(e))&&(r.push(a),i.push(o))}return[r,i]}(r(f)(S,x,T,v));var w=k||P.length;const N=E?E(L,w,m):[],j=t=>{var e;return null==(e=null==(e=A.title)?void 0:e[t])?void 0:e.value},R=e=>A.items.map(t=>t[e]);w=P.map((t,e)=>{var n=Object.assign({points:L[e],transform:N[e],index:t,markKey:O,viewKey:o},A&&{title:j(t),items:R(t)});for(const[r,i]of Object.entries(T))n[r]=i[t],C&&(n["series"+en(r)]=C[e].map(t=>i[t]));return C&&(n.seriesIndex=C[e]),C&&A&&(n.seriesItems=C[e].map(t=>R(t)),n.seriesTitle=C[e].map(t=>j(t))),n}),w=(d.data=w,d.index=P,null==M?void 0:M(w,x,m));b.push(...w||[])}return[{layout:m,theme:i,coordinate:v,components:g,markState:t,key:o,clip:c,scale:y,style:p,labelTransform:g8(h.map(a))},b]}function p8(Z,Q,J,tt,et){ce(this,void 0,void 0,function*(){const{components:I,theme:n,layout:t,markState:r,coordinate:i,key:e,style:B,clip:a}=Z,{width:D,height:F}=t,z=nt(t,["x","y","width","height"]),o=["view","plot","main","content"];var s=o.map((t,e)=>e);const l=o.map(t=>u0(Object.assign({},n,B),t)),G=["a","margin","padding","inset"].map(t=>it(z,t)),c=t=>t.style("x",t=>p[t].x).style("y",t=>p[t].y).style("width",t=>p[t].width).style("height",t=>p[t].height).each(function(t){var e,n,r=at(this),t=l[t];for([e,n]of Object.entries(t))r.style(e,n)});let u=0,h=0,f=D,d=F;const p=s.map(t=>{var{left:t=0,top:e=0,bottom:n=0,right:r=0}=G[t];return u+=t,h+=e,f-=t+r,d-=e+n,{x:u,y:h,width:f,height:d}}),g=(Q.selectAll(O8(Qc)).data(s.filter(t=>c0(l[t])),t=>o[t]).join(t=>t.append("rect").attr("className",Qc).style("zIndex",-2).call(c),t=>t.call(c),t=>t.remove()),function(t){let e=-1/0,n=1/0;for(var[r,i]of t){var{animate:r={}}=r,i=i["data"],{enter:r={},update:a={},exit:o={}}=r,{type:s,duration:l=300,delay:c=0}=a,{type:u,duration:h=300,delay:f=0}=r,{type:d,duration:p=300,delay:g=0}=o;for(const O of i){var{updateType:m=s,updateDuration:v=l,updateDelay:y=c,enterType:b=u,enterDuration:x=h,enterDelay:w=f,exitDuration:M=p,exitDelay:k=g,exitType:E=d}=O;void 0!==m&&!m||(e=Math.max(e,v+y),n=Math.min(n,y)),void 0!==E&&!E||(e=Math.max(e,M+k),n=Math.min(n,k)),void 0!==b&&!b||(e=Math.max(e,x+w),n=Math.min(n,w))}}return e===-1/0?null:[n,e-n]}(r)),m=!!g&&{duration:g[1]};var v,y,b,s=Q.selectAll(O8(Kc)).data(I,(t,e)=>t.type+"-"+e).join(t=>t.append("g").style("zIndex",({zIndex:t})=>t||-1).attr("className",Kc).append(t=>YL(rt({animate:m},t),i,n,tt,r)),t=>t.transition(function(t){var{preserve:e=!1}=t;if(!e)return e=YL(rt({animate:m},t),i,n,tt,r)["attributes"],[t]=this.childNodes,t.update(e)})).transitions();J.push(...s.flat().filter(c0));const x=Q.selectAll(O8(Xc)).data([t],()=>e).join(t=>t.append("rect").style("zIndex",0).style("fill","transparent").attr("className",Xc).call(M8).call(E8,Array.from(r.keys())).call(S8,a),t=>t.call(E8,Array.from(r.keys())).call(t=>{if(!g)return M8(t);{const[l,c]=g;t.transition(function(t){var{x:e,y:n,width:r,height:i}=this.style,{paddingLeft:t,paddingTop:a,innerWidth:o,innerHeight:s}=t;return this.animate([{x:e,y:n,width:r,height:i},{x:t,y:a,width:o,height:s}],{delay:l,duration:c,fill:"both"})})}}).call(S8,a)).transitions();J.push(...x.flat());for([v,y]of r.entries()){var W=y["data"];const{key:e,class:Y,type:A}=v;var w=Q.select("#"+e);const T=function(s,t,e,n,l){const[c]=RP("shape",n),u=s["data"],{defaultShape:h,data:r}=t,f=r.map(t=>t.points),{theme:d,coordinate:p}=e,{type:g,style:m={}}=s;return t=>{var{shape:e=h}=m,{shape:e=e,points:n,seriesIndex:r,index:i}=t,t=nt(t,["shape","points","seriesIndex","index"]),t=Object.assign(Object.assign({},t),{shape:e,mark:g,defaultShape:h,index:i});const a=r?r.map(t=>u[t]):u[i],o=r||i;r=K1(m,t=>m8(t,a,o,u));return c(Object.assign(Object.assign({},r),{type:k8(s,e)}))(n,t,p,d,f,l)}}(v,y,Z,tt,et),H=(M=v,b=y,v8("enter",M,b,Z,tt)),P=(M=v,b=y,v8("update",M,b,Z,tt)),V=(M=v,b=y,v8("exit",M,b,Z,tt));var M=function(t,e,n,r){t=t.node().parentElement;return t.findAll(t=>void 0!==t.style.facet&&t.style.facet===n&&t!==e.node()).flatMap(t=>t.getElementsByClassName(r))}(Q,w,Y,"element");const x=w.selectAll(O8($c)).selectFacetAll(M).data(W,t=>t.key,t=>t.groupKey).join(t=>t.append(T).attr("className",$c).attr("markType",A).transition(function(t){return H(t,[this])}),e=>e.call(t=>{const l=t.parent(),c=function(n){const r=new Map;return t=>{var e;return r.has(t)?r.get(t):(e=n(t),r.set(t,e),e)}}(t=>{var[t,e]=t.getBounds().min;return[t,e]});e.transition(function(t,e){n=this,r=l,s=c,n.__facet__&&(i=n.parentNode.parentNode,o=r.parentNode,[i,a]=s(i),[s,o]=s(o),i=`translate(${i-s}, ${a-o})`,s=n.style.transform,a="none"===(a=s)||void 0===a?"":s,n.style.transform=(a+" "+i).trimStart(),r.append(n));var n,r,i,a,o=T(t,e),s=P(t,[this],[o]);return null===s&&(this.nodeName===o.nodeName?l0(this,o):this.parentNode.replaceChild(o,this)),s})}),t=>t.each(function(){this.__removed__=!0}).transition(function(t){return V(t,[this])}).remove(),t=>t.append(T).attr("className",$c).attr("markType",A).transition(function(t){var e=this["__fromElements__"],t=P(t,e,[this]);return new vy(e,null,this.parentNode).transition(t).remove(),t}),t=>t.transition(function(t){var e=new vy([],this.__toData__,this.parentNode).append(T).attr("className",$c).attr("markType",A).nodes();return P(t,[this],e)}).remove()).transitions();J.push(...x.flat())}{var k=Z,E=Q,O=tt,S,_;const[q]=RP("labelTransform",O),{markState:$,labelTransform:L}=k,U=E.select(O8(qc)).node(),C=new Map,N=new Map,X=Array.from($.entries()).flatMap(([t,e])=>{var{labels:n=[],key:r}=t;const i=function(t,e,n,r){const[s]=RP("shape",r),l=t["data"],{data:i,defaultLabelShape:c}=e,u=i.map(t=>t.points),{theme:h,coordinate:f}=n;return t=>{const{index:e,points:n}=t,r=l[e];var{formatter:i=t=>""+t,style:a}=t,t=nt(t,["formatter","transform","style"]),t=K1(Object.assign(Object.assign({},t),a),t=>m8(t,r,e,l)),{shape:a=c,text:o}=t,t=nt(t,["shape","text"]),i="string"==typeof i?WE(i):i,i=Object.assign(Object.assign({},t),{text:i(o,r,e,l)});return s(Object.assign({type:"label."+a},t))(n,i,f,h,u)}}(t,e,k,O),a=E.select("#"+r).selectAll(O8($c)).nodes().filter(t=>!t.__removed__);return n.flatMap((e,n)=>{const r=nt(e,["transform"]);return a.flatMap(t=>{t=function(n,r,i){const{seriesIndex:t,seriesKey:a,points:o,key:e,index:s}=i.__data__,l=function(t){const e=t.cloneNode(),n=t.getAnimations(),r=(e.style.visibility="hidden",n.forEach(t=>{t=t.effect.getKeyframes();e.attr(t[t.length-1])}),t.parentNode.appendChild(e),e.getLocalBounds()),{min:i,max:a}=(e.destroy(),r);return[i,a]}(i);if(!t)return[Object.assign(Object.assign({},n),{key:e+"-"+r,bounds:l,index:s,points:o,dependentElement:i})];var c=function(t){t=t.selector;if(!t)return null;if("function"==typeof t)return t;if("first"===t)return t=>[t[0]];if("last"===t)return t=>[t[t.length-1]];throw new Error("Unknown selector: "+t)}(n),u=t.filter((t,e)=>o[e].every(c0)).map((t,e)=>Object.assign(Object.assign({},n),{key:a[e]+"-"+r,bounds:[o[e]],index:t,points:o,dependentElement:i}));return c?c(u):u}(r,n,t);return t.forEach(t=>{C.set(t,i),N.set(t,e)}),t})})}),j=at(U).selectAll(O8(Zc)).data(X,t=>t.key).join(t=>t.append(t=>C.get(t)(t)).attr("className",Zc),t=>t.each(function(t){l0(this,C.get(t)(t))}),t=>t.remove()).nodes(),K=Fd(j,t=>N.get(t.__data__)),R=k["coordinate"];for([S,_]of K){var{transform:S=[]}=S;g8(S.map(q))(_,R)}L&&L(j,R)}})}function g8(r){return(t,e)=>{for(const n of r)t=n(t,e);return t}}function m8(t,e,n,r){return"function"==typeof t?t(e,n,r):"string"==typeof t&&void 0!==e[t]?e[t]:t}function v8(o,t,e,n,r){var[,i]=RP("shape",r);const[s]=RP("animation",r);r=e.defaultShape;const{theme:a,coordinate:l}=n;e=`default${en(o)}Animation`;const{[e]:c}=i(k8(t,r)).props,{[o]:u={}}=a,h=(null==(n=t.animate)?void 0:n[o])||{};return(t,e,n)=>{var{[o+"Type"]:t,[o+"Delay"]:r,[o+"Duration"]:i,[o+"Easing"]:a}=t,t=Object.assign({type:t||c},h);return t.type?(t=s(t)(e,n,{delay:r,duration:i,easing:a},l,u),Array.isArray(t)?t:[t]):null}}function y8(t){return t.finished.then(()=>{t.cancel()}),t}function b8(t={}){var e;return"string"==typeof t?{type:t}:({type:e="classic"}=t,t=nt(t,["type"]),Object.assign(Object.assign({},t),{type:e}))}function x8(t){var{interaction:t={}}=t;return Object.entries(rt({event:!0,tooltip:!0,sliderFilter:!0,legendFilter:!0,scrollbarFilter:!0},t))}function w8(r,i){return ce(this,void 0,void 0,function*(){var t={library:i},e=r["data"],n=nt(r,["data"]);return null==e?r:([,{data:e}]=yield QL(0,{data:e},t),Object.assign({data:e},n))})}function M8(t){t.style("x",t=>t.paddingLeft).style("y",t=>t.paddingTop).style("width",t=>t.innerWidth).style("height",t=>t.innerHeight)}function k8(t,e){t=t.type;return"string"==typeof e?t+"."+e:e}function E8(t,e){const n=t=>void 0!==t.class?""+t.class:"";0===t.nodes().length||(t.selectAll(O8(Vc)).data(e,t=>t.key).join(t=>t.append("g").attr("className",Vc).attr("id",t=>t.key).style("facet",n).style("fill","transparent").style("zIndex",t=>{return null!=(t=t.zIndex)?t:0}),t=>t.style("facet",n).style("fill","transparent").style("zIndex",t=>{return null!=(t=t.zIndex)?t:0}),t=>t.remove()),t.select(O8(qc)).node())||t.append("g").attr("className",qc).style("zIndex",0)}function O8(...t){return t.map(t=>"."+t).join("")}function S8(t,i){t.node()&&t.style("clipPath",t=>{var e,n,r;return i?({paddingTop:t,paddingLeft:e,innerWidth:n,innerHeight:r}=t,new Js({style:{x:e,y:t,width:n,height:r}})):null})}function _8(t){for(var t=rt({},t),e=new Map([[t,null]]),n=new Map([[null,-1]]),r=[t];r.length;){var i,a,o=r.shift(),{children:s=[]}=(void 0===o.key&&(a=e.get(o),i=n.get(o),a=null===a?"0":a.key+"-"+i,o.key=a),o);if(Array.isArray(s))for(let t=0;t<s.length;t++){var l=rt({},s[t]);s[t]=l,e.set(l,o),n.set(l,t),r.push(l)}}return t}function A8(t,e={},n=()=>{},r=t=>{throw t}){const{width:i=640,height:a=480,theme:o}=t,s=(o||s0('ChartOptions.theme is required, such as `const chart = new Chart({ theme: "classic"})`.'),_8(t)),{canvas:l=(t=i,h=a,f=new Dh,f.registerPlugin(new Vh),new Gl({width:t,height:h,container:document.createElement("div"),renderer:f})),library:c=aP(),emitter:u=new qh}=e;var h,f;e.canvas=l,e.library=c,e.emitter=u,l.resize(i,a),u.emit(F5.BEFORE_RENDER);const d=at(l.document.documentElement);return l.ready.then(()=>c8(Object.assign(Object.assign({},s),{width:i,height:a}),d,c,e)).then(()=>{l.requestAnimationFrame(()=>{u.emit(F5.AFTER_RENDER),null!=n&&n()})}).catch(t=>{null!=r&&r(t)}),"string"==typeof(t=l.getConfig().container)?document.getElementById(t):t}function T8(t,e={},n=!1){var r,{canvas:e,emitter:i}=e;e&&(null!=(r=(r=e).getRoot().querySelectorAll("."+Uc))&&r.forEach(t=>{var{nameInteraction:t=new Map}=t;0<(null==t?void 0:t.size)&&Array.from(null==t?void 0:t.values()).forEach(t=>{null!=t&&t.destroy()})}),n?e.destroy():e.destroyChildren()),i.off()}function P8(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):this.attr(n,t)}}function L8(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):Array.isArray(t)?this.attr(n,t):(t=[...this.attr(n)||[],t],this.attr(n,t))}}function C8(t,{name:e,key:r=e}){t.prototype[e]=function(t,e){var n;return 0===arguments.length?this.attr(r):1===arguments.length&&"string"!=typeof t?this.attr(r,t):((n=this.attr(r)||{})[t]=1===arguments.length||e,this.attr(r,n))}}function c(r){return t=>{for(const n of r){var e=n["type"];"value"===e?P8(t,n):"array"===e?L8(t,n):"object"===e?C8(t,n):"node"===e?function(t,{name:n,ctor:r}){t.prototype[n]=function(t){var e=this.append(r);return"mark"===n&&(e.type=t),e}}(t,n):"container"===e?function(t,{name:e,ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}(t,n):"mix"===e&&function(t,{name:r}){t.prototype[r]=function(t){var e,n;return 0===arguments.length?this.attr(r):Array.isArray(t)?this.attr(r,{items:t}):d0(t)&&(void 0!==t.title||void 0!==t.items)||null===t||!1===t?this.attr(r,t):({items:n=[]}=e=this.attr(r)||{},n.push(t),e.items=n,this.attr(r,e))}}(t,n)}return t}}function N8(t){return Object.entries(t).map(([t,e])=>({type:"node",name:t,ctor:e}))}function j8(t,e){for(var n=[t];n.length;){var r=n.shift(),r=(e&&e(r),r.children||[]);for(const i of r)n.push(i)}}class R8{constructor(t={},e){this.parentNode=null,this.children=[],this.index=0,this.type=e,this.value=t}map(t=t=>t){t=t(this.value);return this.value=t,this}attr(e,n){return 1===arguments.length?this.value[e]:this.map(t=>(t[e]=n,t))}append(t){t=new t({});return t.children=[],this.push(t),t}push(t){return t.parentNode=this,t.index=this.children.length,this.children.push(t),this}remove(){var t,e=this.parentNode;return e&&(e=e["children"],t=e.findIndex(t=>t===this),e.splice(t,1)),this}getNodeByKey(e){let n=null;return j8(this,t=>{e===t.attr("key")&&(n=t)}),n}getNodesByType(e){const n=[];return j8(this,t=>{e===t.type&&n.push(t)}),n}getNodeByType(e){let n=null;return j8(this,t=>{n||e===t.type&&(n=t)}),n}call(t,...e){return t(this.map(),...e),this}getRoot(){let t=this;for(;t&&t.parentNode;)t=t.parentNode;return t}}class I8 extends R8{changeData(t){var e=this.getRoot();if(e)return this.attr("data",t),null==e?void 0:e.render()}getMark(){var t,e=null==(e=this.getRoot())?void 0:e.getView();if(e)return e=e["markState"],t=Array.from(e.keys()).find(t=>t.key===this.attr("key")),e.get(t)}getScale(){var t=null==(t=this.getRoot())?void 0:t.getView();return!t||null==t?void 0:t.scale}getScaleByChannel(t){var e=null==(e=this.getRoot())?void 0:e.getView();return!e||null==(e=null==e?void 0:e.scale)?void 0:e[t]}getGroup(){var t=this.attr("key");if(t)return this.getRoot().getContext().canvas.getRoot().getElementById(t)}}a=[{name:"encode",type:"object"},{name:"scale",type:"object"},{name:"data",type:"value"},{name:"transform",type:"array"},{name:"style",type:"object"},{name:"animate",type:"object"},{name:"coordinate",type:"object"},{name:"interaction",type:"object"},{name:"label",type:"array",key:"labels"},{name:"axis",type:"object"},{name:"legend",type:"object"},{name:"slider",type:"object"},{name:"scrollbar",type:"object"},{name:"state",type:"object"},{name:"tooltip",type:"mix"}];let B8=class extends I8{constructor(){super({})}},D8=(B8=t([c(a)],B8),class extends I8{constructor(){super({},"interval")}}),F8=(D8=t([c(a)],D8),class extends I8{constructor(){super({},"rect")}}),z8=(F8=t([c(a)],F8),class extends I8{constructor(){super({},"point")}}),G8=(z8=t([c(a)],z8),class extends I8{constructor(){super({},"area")}}),W8=(G8=t([c(a)],G8),class extends I8{constructor(){super({},"line")}}),Y8=(W8=t([c(a)],W8),class extends I8{constructor(){super({},"cell")}}),H8=(Y8=t([c(a)],Y8),class extends I8{constructor(){super({},"vector")}}),V8=(H8=t([c(a)],H8),class extends I8{constructor(){super({},"link")}}),q8=(V8=t([c(a)],V8),class extends I8{constructor(){super({},"polygon")}});q8=t([c(a)],q8);is=t([c(a)],class extends I8{constructor(){super({},"image")}});let $8=class extends I8{constructor(){super({},"text")}},U8=($8=t([c(a)],$8),class extends I8{constructor(){super({},"box")}}),X8=(U8=t([c(a)],U8),class extends I8{constructor(){super({},"lineX")}}),K8=(X8=t([c(a)],X8),class extends I8{constructor(){super({},"lineY")}}),Z8=(K8=t([c(a)],K8),class extends I8{constructor(){super({},"range")}}),Q8=(Z8=t([c(a)],Z8),class extends I8{constructor(){super({},"rangeX")}}),J8=(Q8=t([c(a)],Q8),class extends I8{constructor(){super({},"rangeY")}}),tC=(J8=t([c(a)],J8),class extends I8{constructor(){super({},"connector")}}),eC=(tC=t([c(a)],tC),class extends I8{constructor(){super({},"shape")}}),nC=(eC=t([c(a)],eC),class extends I8{constructor(){super({},"sankey")}}),rC=(nC=t([c([...a,{name:"layout",type:"value"}])],nC),class extends I8{constructor(){super({},"treemap")}}),iC=(rC=t([c([...a,{name:"layout",type:"value"}])],rC),class extends I8{constructor(){super({},"boxplot")}}),aC=(iC=t([c(a)],iC),class extends I8{constructor(){super({},"density")}}),oC=(aC=t([c(a)],aC),class extends I8{constructor(){super({},"heatmap")}}),sC=(oC=t([c(a)],oC),class extends I8{constructor(){super({},"path")}}),lC=(sC=t([c(a)],sC),class extends I8{constructor(){super({},"pack")}}),cC=(lC=t([c([...a,{name:"layout",type:"value"}])],lC),class extends I8{constructor(){super({},"forceGraph")}}),uC=(cC=t([c([...a,{name:"layout",type:"value"}])],cC),class extends I8{constructor(){super({},"tree")}}),hC=(uC=t([c([...a,{name:"layout",type:"value"}])],uC),class extends I8{constructor(){super({},"wordCloud")}}),fC=(hC=t([c([...a,{name:"layout",type:"object"}])],hC),class extends I8{constructor(){super({},"gauge")}});fC=t([c(a)],fC);const dC={mark:B8,interval:D8,rect:F8,point:z8,area:G8,line:W8,cell:Y8,vector:H8,link:V8,polygon:q8,image:is,text:$8,box:U8,lineX:X8,lineY:K8,range:Z8,rangeX:Q8,rangeY:J8,connector:tC,sankey:nC,treemap:rC,boxplot:iC,density:aC,heatmap:oC,path:sC,shape:eC,pack:lC,forceGraph:cC,tree:uC,wordCloud:hC,gauge:fC};class pC extends R8{changeData(e){var t,n=this.getRoot();if(n)return this.attr("data",e),null!=(t=this.children)&&t.length&&this.children.forEach(t=>{t.attr("data",e)}),null==n?void 0:n.render()}getView(){var t=this.getRoot().getContext()["views"];if(null!=t&&t.length)return t.find(t=>t.key===this._key)}getScale(){var t;return null==(t=this.getView())?void 0:t.scale}getScaleByChannel(t){var e=this.getScale();if(e)return e[t]}getCoordinate(){var t;return null==(t=this.getView())?void 0:t.coordinate}getTheme(){var t;return null==(t=this.getView())?void 0:t.theme}getGroup(){var t=this._key;if(t)return this.getRoot().getContext().canvas.getRoot().getElementById(t)}show(){var t=this.getGroup();t&&!t.isVisible()&&h5(t)}hide(){var t=this.getGroup();t&&t.isVisible()&&u5(t)}}let gC=class extends pC{constructor(t={},e="view"){super(t,e)}},mC=(gC=t([c([{type:"value",name:"data"},{type:"value",name:"coordinate"},{type:"object",name:"interaction"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"axis"},{type:"object",name:"legend"},...N8(dC)])],gC),class extends pC{constructor(){super({},"spaceLayer")}}),vC=(mC=t([c([{type:"value",name:"data"},...N8(dC)])],mC),class extends pC{constructor(){super({},"spaceFlex")}}),yC=(vC=t([c([{type:"value",name:"data"},...N8(dC)])],vC),class extends pC{constructor(){super({},"facetRect")}}),bC=(yC=t([c([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...N8(dC)])],yC),class extends pC{constructor(){super({},"facetCircle")}}),xC=(bC=t([c([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...N8(dC)])],bC),class extends pC{constructor(){super({},"repeatMatrix")}}),wC=(xC=t([c([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"encode"},{type:"object",name:"legend"},...N8(dC)])],xC),class extends pC{constructor(){super({},"timingKeyframe")}}),MC=(wC=t([c([...N8(dC)])],wC),class extends pC{constructor(){super({},"geoView")}}),kC=(MC=t([c([{type:"value",name:"data"},{type:"value",name:"coordinate"},{type:"object",name:"interaction"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"legend"},...N8(dC)])],MC),class extends pC{constructor(){super({},"geoPath")}});kC=t([c([{type:"value",name:"data"},{type:"value",name:"coordinate"},{type:"object",name:"interaction"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"state"},...N8(dC)])],kC);const EC={view:gC,spaceLayer:mC,spaceFlex:vC,facetRect:yC,facetCircle:bC,repeatMatrix:xC,timingKeyframe:wC,geoView:MC,geoPath:kC};for(const NC of Object.values(EC))c(N8(EC))(NC);const OC=aP();const SC=["width","height","padding","paddingLeft","paddingRight","paddingBottom","paddingTop","inset","insetLeft","insetRight","insetTop","insetBottom","margin","marginLeft","marginRight","marginTop","marginBottom","autoFit","theme","title"];function _C(t){return Object.assign(Object.assign({},t.value),{type:t.type})}function AC(t,e){var n,r=t["autoFit"];return r?(r=e,e=getComputedStyle(r),n=r.clientWidth||w0(e.width),r=r.clientHeight||w0(e.height),{width:n-(w0(e.paddingLeft)+w0(e.paddingRight)),height:r-(w0(e.paddingTop)+w0(e.paddingBottom))}):({width:n=640,height:r=480}=t,{width:n,height:r})}function TC(t){var t=function(t){if(null!==t.type)return t;var e=t.children[t.children.length-1];for(const n of SC)e.attr(n,t.attr(n));return e}(t),e=[t],n=new Map;for(n.set(t,_C(t));e.length;){const t=e.pop();var r=n.get(t),{children:i=[]}=t;for(const s of i){var a=_C(s),{children:o=[]}=r;o.push(a),e.push(s),n.set(s,a),r.children=o}}return n.get(t)}function PC(t,e,n){var t=t["type"],{type:n=n||t}=e;if("view"===n)return e;if("string"!=typeof n)return e;if(t=n,!new Set(Object.keys(dC)).has(t))return e;var r={type:"view"},i=Object.assign({},e);for(const a of SC)void 0!==i[a]&&(r[a]=i[a],delete i[a]);return Object.assign(Object.assign({},r),{children:[i]})}function LC(t){var e=t["type"],t=nt(t,["type","children"]);if("string"==typeof e)return(e=new(function(t){var e=Object.assign(Object.assign({},dC),EC)[t];if(e)return e;throw new Error(`Unknown mark: ${t}.`)}(e))).value=t,e}function CC(t,e,n){for(var r,i,a=[[null,t,PC(t,e,n)]];a.length;){var[o,s,l]=a.shift();if(s)if(l){r=s,g=void 0,g=(i=l).type,i=nt(i,["type","children"]),r.type===g||void 0===g?r.value=rt(r.value,i):"string"==typeof g&&(r.type=g,r.value=i);var c=l["children"],u=s["children"];if(Array.isArray(c)&&Array.isArray(u)){var h=Math.max(c.length,u.length);for(let t=0;t<h;t++){var f=c[t],d=u[t];a.push([s,d,f])}}}else s.remove();else{y=v=m=g=p=void 0;var p=o,g=l;if(p)for(var m=[[p,g]];m.length;){const[p,b]=m.shift();var v=LC(b),y=(Array.isArray(p.children)&&p.push(v),b)["children"];if(Array.isArray(y))for(const x of y)m.push([v,x])}}}}rs=[{name:"data",type:"value"},{name:"width",type:"value"},{name:"height",type:"value"},{name:"coordinate",type:"value"},{name:"interaction",type:"object"},{name:"theme",type:"object"},{name:"title",type:"value"},{name:"transform",type:"array"},{name:"scale",type:"object"},{name:"axis",type:"object"},{name:"legend",type:"object"},{name:"style",type:"object"},{name:"labelTransform",type:"array"},...N8(dC),...(r=EC,Object.entries(r).map(([t,e])=>({type:"container",name:t,ctor:e})))];u.Chart=class extends gC{constructor(t){var t=t||{},{container:e,canvas:n,renderer:r,plugins:i}=t;super(nt(t,["container","canvas","renderer","plugins"]),"view"),this._hasBindAutoFit=!1,this._rendering=!1,this._trailing=!1,this._trailingResolve=null,this._trailingReject=null,this._previousDefinedType=null,this._onResize=on(()=>{this.forceFit()},300),this._renderer=r||new Dh,this._plugins=i||[],this._container=void 0===(t=e)?document.createElement("div"):"string"==typeof t?document.getElementById(t):t,this._emitter=new qh,this._context={library:OC,emitter:this._emitter,canvas:n}}render(){if(this._rendering)return this._addToTrailing();this._context.canvas||this._createCanvas(),this._bindAutoFit(),this._rendering=!0;var t=new Promise((t,e)=>A8(this._computedOptions(),this._context,this._createResolve(t),this._createReject(e))),[e,n,r]=function(){let n,r;return[new Promise((t,e)=>{r=t,n=e}),r,n]}();return t.then(n).catch(r).then(()=>this._renderTrailing()),e}options(t){var e;return 0===arguments.length?TC(this):(e=t["type"],e&&(this._previousDefinedType=e),CC(this,t,this._previousDefinedType),this)}getContainer(){return this._container}getContext(){return this._context}on(t,e,n){return this._emitter.on(t,e,n),this}once(t,e){return this._emitter.once(t,e),this}emit(t,...e){return this._emitter.emit(t,...e),this}off(t,e){return this._emitter.off(t,e),this}clear(){this.options();this.emit(F5.BEFORE_CLEAR),this._reset(),T8(0,this._context,!1),this.emit(F5.AFTER_CLEAR)}destroy(){var t,e;this.options();this.emit(F5.BEFORE_DESTROY),this._unbindAutoFit(),this._reset(),T8(0,this._context,!0),t=this._container,(e=t.parentNode)&&e.removeChild(t),this.emit(F5.AFTER_DESTROY)}forceFit(){this.options.autoFit=!0;var{width:t,height:e}=AC(this.options(),this._container);if(t===this._width&&e===this._height)return Promise.resolve(this);this.emit(F5.BEFORE_CHANGE_SIZE);t=this.render();return t.then(()=>{this.emit(F5.AFTER_CHANGE_SIZE)}),t}changeSize(t,e){if(t===this._width&&e===this._height)return Promise.resolve(this);this.emit(F5.BEFORE_CHANGE_SIZE),this.width(t),this.height(e);t=this.render();return t.then(()=>{this.emit(F5.AFTER_CHANGE_SIZE)}),t}_reset(){this.type="view",this.value={},this.children=[]}_renderTrailing(){this._trailing&&(this._trailing=!1,this.render().then(()=>{var t=this._trailingResolve.bind(this);this._trailingResolve=null,t(this)}).catch(t=>{var e=this._trailingReject.bind(this);this._trailingReject=null,e(t)}))}_createResolve(t){return()=>{this._rendering=!1,t(this)}}_createReject(e){return t=>{this._rendering=!1,e(t)}}_computedOptions(){var t=this.options(),{key:e="G2_CHART_KEY"}=t,{width:n,height:r}=AC(t,this._container);return this._width=n,this._height=r,this._key=e,Object.assign(Object.assign({key:this._key},t),{width:n,height:r})}_createCanvas(){var{width:t,height:e}=AC(this.options(),this._container);this._plugins.push(new Vh),this._plugins.forEach(t=>this._renderer.registerPlugin(t)),this._context.canvas=new Gl({container:this._container,width:t,height:e,renderer:this._renderer})}_addToTrailing(){null!=(t=this._trailingResolve)&&t.call(this,this),this._trailing=!0;var t=new Promise((t,e)=>{this._trailingResolve=t,this._trailingReject=e});return t}_bindAutoFit(){var t=this.options()["autoFit"];this._hasBindAutoFit?t||this._unbindAutoFit():t&&(this._hasBindAutoFit=!0,window.addEventListener("resize",this._onResize))}_unbindAutoFit(){this._hasBindAutoFit&&(this._hasBindAutoFit=!1,window.removeEventListener("resize",this._onResize))}},u.Chart=t([c(rs)],u.Chart),A.enableCSSParsing=!1,u.AREA_CLASS_NAME=Qc,u.COMPONENT_CLASS_NAME=Kc,u.ChartEvent=F5,u.CompositionNode=pC,u.ELEMENT_CLASS_NAME=$c,u.LABEL_CLASS_NAME=Zc,u.LABEL_LAYER_CLASS_NAME=qc,u.MAIN_LAYER_CLASS_NAME=Vc,u.MarkNode=I8,u.PLOT_CLASS_NAME=Xc,u.VIEW_CLASS_NAME=Uc,u.createLibrary=aP,u.register=function(t,e){Object.assign(OC,{[t]:e})},u.render=A8,u.renderToMountedElement=function(t,e={},n=()=>{},r=t=>{throw t}){var{width:i=640,height:a=480}=t,t=_8(t);const{library:o=aP(),group:s=new Fs,emitter:l=new qh}=e;null!==s&&void 0!==s&&s.parentElement||s0("renderToMountedElement can't render chart to unmounted group.");var c=at(s);return e.group=s,e.library=o,(e.emitter=l).emit(F5.BEFORE_RENDER),c8(Object.assign(Object.assign({},t),{width:i,height:a}),c,o,e).then(()=>{s.ownerDocument.defaultView.requestAnimationFrame(()=>{l.emit(F5.AFTER_RENDER),null!=n&&n()})}).catch(t=>{null!=r&&r(t)}),s},Object.defineProperty(u,"__esModule",{value:!0})});