@antv/g2 5.0.1 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/g2-lite.min.js +3 -3
  3. package/dist/g2.min.js +3 -3
  4. package/esm/animation/morphing.js +4 -2
  5. package/esm/animation/morphing.js.map +1 -1
  6. package/esm/api/chart.d.ts +1 -2
  7. package/esm/api/chart.js.map +1 -1
  8. package/esm/component/axis.js +1 -1
  9. package/esm/component/axis.js.map +1 -1
  10. package/esm/interaction/fisheye.js +3 -1
  11. package/esm/interaction/fisheye.js.map +1 -1
  12. package/esm/interaction/tooltip.js +3 -1
  13. package/esm/interaction/tooltip.js.map +1 -1
  14. package/esm/runtime/render.d.ts +1 -1
  15. package/esm/runtime/render.js +16 -6
  16. package/esm/runtime/render.js.map +1 -1
  17. package/esm/spec/composition.d.ts +7 -6
  18. package/lib/animation/morphing.js +4 -2
  19. package/lib/animation/morphing.js.map +1 -1
  20. package/lib/api/chart.d.ts +1 -2
  21. package/lib/api/chart.js.map +1 -1
  22. package/lib/component/axis.js +1 -1
  23. package/lib/component/axis.js.map +1 -1
  24. package/lib/interaction/fisheye.js +3 -1
  25. package/lib/interaction/fisheye.js.map +1 -1
  26. package/lib/interaction/tooltip.js +3 -1
  27. package/lib/interaction/tooltip.js.map +1 -1
  28. package/lib/runtime/render.d.ts +1 -1
  29. package/lib/runtime/render.js +16 -6
  30. package/lib/runtime/render.js.map +1 -1
  31. package/lib/spec/composition.d.ts +7 -6
  32. package/package.json +3 -3
  33. package/src/animation/morphing.ts +8 -2
  34. package/src/api/chart.ts +0 -2
  35. package/src/component/axis.ts +1 -1
  36. package/src/interaction/fisheye.ts +4 -1
  37. package/src/interaction/tooltip.ts +4 -1
  38. package/src/runtime/render.ts +18 -7
  39. package/src/spec/composition.ts +7 -6
  40. package/src/.DS_Store +0 -0
  41. package/src/data/.DS_Store +0 -0
  42. package/src/shape/.DS_Store +0 -0
@@ -1,10 +1,10 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@antv/g"),require("@antv/g-canvas")):"function"==typeof define&&define.amd?define(["exports","@antv/g","@antv/g-canvas"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).G2={},t.window.G,t.window.G.Canvas2D)}(this,function(m,X,S){"use strict";const N="main-layer",at="label-layer",ot="element",H="view",st="plot",lt="component",ct="label",ut="area";var j="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function C(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,f=e[n],h=r,d=i;for(B(e,r,n),0<a(e[i],f)&&B(e,r,i);h<d;){for(B(e,h,d),h++,d--;a(e[h],f)<0;)h++;for(;0<a(e[d],f);)d--}0===a(e[r],f)?B(e,r,d):B(e,++d,i),d<=n&&(r=d+1),n<=d&&(i=d-1)}}(t,e,n||0,r||t.length-1,i||I)}function B(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function I(t,e){return t<e?-1:e<t?1:0}function F(t,e){D(t,0,t.children.length,e,t)}function D(t,e,n,r,i){(i=i||U(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];z(i,t.leaf?r(o):o)}return i}function z(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 W(t,e){return t.minX-e.minX}function G(t,e){return t.minY-e.minY}function V(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function q(t){return t.maxX-t.minX+(t.maxY-t.minY)}function Y(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function $(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function U(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function K(t,e,n,r,i){for(var a,o=[e,n];o.length;)(n=o.pop())-(e=o.pop())<=r||(C(t,a=e+Math.ceil((n-e)/r/2)*r,e,n,i),o.push(e,a,a,n))}(n=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,[])},n.prototype.search=function(t){var e=this.data,n=[];if($(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;$(t,s)&&(e.leaf?n.push(o):Y(t,s)?this._all(o,n):i.push(o))}e=i.pop()}return n},n.prototype.collides=function(t){var e=this.data;if($(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($(t,a)){if(e.leaf||Y(t,a))return!0;n.push(i)}}e=n.pop()}return!1},n.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},n.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},n.prototype.clear=function(){return this.data=U([]),this},n.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||!Y(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},n.prototype.toBBox=function(t){return t},n.prototype.compareMinX=function(t,e){return t.minX-e.minX},n.prototype.compareMinY=function(t,e){return t.minY-e.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(t){return this.data=t,this},n.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},n.prototype._build=function(t,e,n,r){var i,a=n-e+1,o=this._maxEntries;if(a<=o)F(i=U(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=U([])).leaf=!1,i.height=r;var s=Math.ceil(a/o),l=s*Math.ceil(Math.sqrt(o));K(t,e,n,l,this.compareMinX);for(var c=e;c<=n;c+=l){var u=Math.min(c+l-1,n);K(t,c,u,s,this.compareMinY);for(var f=c;f<=u;f+=s){var h=Math.min(f+s-1,u);i.children.push(this._build(t,f,h,r-1))}}F(i,this.toBBox)}return i},n.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=V(l),u=(f=t,u=l,(Math.max(u.maxX,f.maxX)-Math.min(u.minX,f.minX))*(Math.max(u.maxY,f.maxY)-Math.min(u.minY,f.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 f,u;return e},n.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),z(i,n);0<=e&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},n.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=U(n.children.splice(i,n.children.length-i));r.height=n.height,r.leaf=n.leaf,F(n,this.toBBox),F(r,this.toBBox),e?t[e-1].children.push(r):this._splitRoot(n,r)},n.prototype._splitRoot=function(t,e){this.data=U([t,e]),this.data.height=t.height+1,this.data.leaf=!1,F(this.data,this.toBBox)},n.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=D(t,0,c,this.toBBox),f=D(t,c,n,this.toBBox),h=(i=u,h=f,d=o=a=void 0,a=Math.max(i.minX,h.minX),o=Math.max(i.minY,h.minY),d=Math.min(i.maxX,h.maxX),i=Math.min(i.maxY,h.maxY),Math.max(0,d-a)*Math.max(0,i-o)),d=V(u)+V(f);h<s?(s=h,r=c,l=d<l?d:l):h===s&&d<l&&(l=d,r=c)}return r||n-e},n.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:W,i=t.leaf?this.compareMinY:G;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},n.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var i=this.toBBox,a=D(t,0,e,i),o=D(t,n-e,n,i),s=q(a)+q(o),l=e;l<n-e;l++){var c=t.children[l];z(a,t.leaf?i(c):c),s+=q(a)}for(var u=n-e-1;e<=u;u--){var f=t.children[u];z(o,t.leaf?i(f):f),s+=q(o)}return s},n.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;0<=r;r--)z(e[r],t)},n.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():F(t[e],this.toBBox)};var Z=1e-6,Q="undefined"!=typeof Float32Array?Float32Array:Array;function J(){var t=new Q(9);return Q!=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 tt=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],f=n[0],h=n[1],d=n[2],p=n[3],g=n[4],y=n[5],m=n[6],v=n[7],n=n[8];return t[0]=f*r+h*o+d*c,t[1]=f*i+h*s+d*u,t[2]=f*a+h*l+d*e,t[3]=p*r+g*o+y*c,t[4]=p*i+g*s+y*u,t[5]=p*a+g*l+y*e,t[6]=m*r+v*o+n*c,t[7]=m*i+v*s+n*u,t[8]=m*a+v*l+n*e,t};function ft(){var t=new Q(16);return Q!=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 ht(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 dt(t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,g,y){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]=f,t[11]=h,t[12]=d,t[13]=p,t[14]=g,t[15]=y,t}function pt(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 gt(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 yt(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],f=e[9],h=e[10],d=e[11],p=e[12],g=e[13],y=e[14],e=e[15],m=n*s-r*o,v=n*l-i*o,b=n*c-a*o,x=r*l-i*s,w=r*c-a*s,k=i*c-a*l,M=u*g-f*p,O=u*y-h*p,_=u*e-d*p,S=f*y-h*g,E=f*e-d*g,A=h*e-d*y,L=m*A-v*E+b*S+x*_-w*O+k*M;return L?(t[0]=(s*A-l*E+c*S)*(L=1/L),t[1]=(i*E-r*A-a*S)*L,t[2]=(g*k-y*w+e*x)*L,t[3]=(h*w-f*k-d*x)*L,t[4]=(l*_-o*A-c*O)*L,t[5]=(n*A-i*_+a*O)*L,t[6]=(y*b-p*k-e*v)*L,t[7]=(u*k-h*b+d*v)*L,t[8]=(o*E-s*_+c*M)*L,t[9]=(r*_-n*E-a*M)*L,t[10]=(p*w-g*b+e*m)*L,t[11]=(f*b-u*w-d*m)*L,t[12]=(s*O-o*S-l*M)*L,t[13]=(n*S-r*O+i*M)*L,t[14]=(g*v-p*x-y*m)*L,t[15]=(u*x-f*v+h*m)*L,t):null}function mt(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],f=t[10],h=t[11],d=t[12],p=t[13],g=t[14],t=t[15];return(e*o-n*a)*(f*t-h*g)-(e*s-r*a)*(u*t-h*p)+(e*l-i*a)*(u*g-f*p)+(n*s-r*o)*(c*t-h*d)-(n*l-i*o)*(c*g-f*d)+(r*l-i*s)*(c*p-u*d)}function vt(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],f=e[8],h=e[9],d=e[10],p=e[11],g=e[12],y=e[13],m=e[14],e=e[15],v=n[0],b=n[1],x=n[2],w=n[3];return t[0]=v*r+b*s+x*f+w*g,t[1]=v*i+b*l+x*h+w*y,t[2]=v*a+b*c+x*d+w*m,t[3]=v*o+b*u+x*p+w*e,v=n[4],b=n[5],x=n[6],w=n[7],t[4]=v*r+b*s+x*f+w*g,t[5]=v*i+b*l+x*h+w*y,t[6]=v*a+b*c+x*d+w*m,t[7]=v*o+b*u+x*p+w*e,v=n[8],b=n[9],x=n[10],w=n[11],t[8]=v*r+b*s+x*f+w*g,t[9]=v*i+b*l+x*h+w*y,t[10]=v*a+b*c+x*d+w*m,t[11]=v*o+b*u+x*p+w*e,v=n[12],b=n[13],x=n[14],w=n[15],t[12]=v*r+b*s+x*f+w*g,t[13]=v*i+b*l+x*h+w*y,t[14]=v*a+b*c+x*d+w*m,t[15]=v*o+b*u+x*p+w*e,t}function bt(t,e,n){var r,i,a,o,s,l,c,u,f,h,d,p,g=n[0],y=n[1],n=n[2];return e===t?(t[12]=e[0]*g+e[4]*y+e[8]*n+e[12],t[13]=e[1]*g+e[5]*y+e[9]*n+e[13],t[14]=e[2]*g+e[6]*y+e[10]*n+e[14],t[15]=e[3]*g+e[7]*y+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],f=e[8],h=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]=f,t[9]=h,t[10]=d,t[11]=p,t[12]=r*g+s*y+f*n+e[12],t[13]=i*g+l*y+h*n+e[13],t[14]=a*g+c*y+d*n+e[14],t[15]=o*g+u*y+p*n+e[15]),t}function xt(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 wt(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],f=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+f*r,t[8]=l*n-i*r,t[9]=c*n-a*r,t[10]=u*n-o*r,t[11]=f*n-s*r,t}function kt(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],f=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-f*r,t[8]=i*r+l*n,t[9]=a*r+c*n,t[10]=o*r+u*n,t[11]=s*r+f*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 Ot(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,f=i*s,i=i*l,a=a*l,o=e*o,s=e*s,e=e*l;return t[0]=1-(f+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+f),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function _t(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function St(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 Et(t,e){var n=new Q(3),r=(St(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,f=0;return 0<n?(f=2*Math.sqrt(1+n),t[3]=.25*f,t[0]=(u-i)/f,t[1]=(r-s)/f,t[2]=(o-l)/f):c<a&&e<a?(f=2*Math.sqrt(1+a-c-e),t[3]=(u-i)/f,t[0]=.25*f,t[1]=(o+l)/f,t[2]=(r+s)/f):e<c?(f=2*Math.sqrt(1+c-a-e),t[3]=(r-s)/f,t[0]=(o+l)/f,t[1]=.25*f,t[2]=(u+i)/f):(f=2*Math.sqrt(1+e-a-c),t[3]=(o-l)/f,t[0]=(r+s)/f,t[1]=(u+i)/f,t[2]=.25*f),t}function At(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,f=a*l,h=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],y=i[1],i=i[2],m=(1-(d+s))*u,v=(h+e)*u,u=(a-c)*u,h=(h-e)*p,e=(1-(f+s))*p,s=(o+l)*p,p=(a+c)*r,a=(o-l)*r,c=(1-(f+d))*r;return t[0]=m,t[1]=v,t[2]=u,t[3]=0,t[4]=h,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-(m*g+h*y+p*i),t[13]=n[1]+y-(v*g+e*y+a*i),t[14]=n[2]+i-(u*g+s*y+c*i),t[15]=1,t}function Lt(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 Tt(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 Pt(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 Nt=Pt;function jt(t,e,n,r){var i,a,o,s,l=e[0],c=e[1],e=e[2],u=r[0],f=r[1],r=r[2],h=n[0],d=n[1],n=n[2];return Math.abs(l-h)<Z&&Math.abs(c-d)<Z&&Math.abs(e-n)<Z?pt(t):(h=l-h,d=c-d,n=e-n,i=f*(n*=s=1/Math.hypot(h,d,n))-r*(d*=s),r=r*(h*=s)-u*n,u=u*d-f*h,(s=Math.hypot(i,r,u))?(i*=s=1/s,r*=s,u*=s):u=r=i=0,f=d*u-n*r,a=n*i-h*u,o=h*r-d*i,(s=Math.hypot(f,a,o))?(f*=s=1/s,a*=s,o*=s):o=a=f=0,t[0]=i,t[1]=f,t[2]=h,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]=-(f*l+a*c+o*e),t[14]=-(h*l+d*c+n*e),t[15]=1,t)}function Ct(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 Rt=Object.freeze({__proto__:null,create:ft,clone:function(t){var e=new Q(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},copy:ht,fromValues:function(t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,g){var y=new Q(16);return y[0]=t,y[1]=e,y[2]=n,y[3]=r,y[4]=i,y[5]=a,y[6]=o,y[7]=s,y[8]=l,y[9]=c,y[10]=u,y[11]=f,y[12]=h,y[13]=d,y[14]=p,y[15]=g,y},set:dt,identity:pt,transpose:gt,invert:yt,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],f=e[9],h=e[10],d=e[11],p=e[12],g=e[13],y=e[14],e=e[15];return t[0]=s*(h*e-d*y)-f*(l*e-c*y)+g*(l*d-c*h),t[1]=-(r*(h*e-d*y)-f*(i*e-a*y)+g*(i*d-a*h)),t[2]=r*(l*e-c*y)-s*(i*e-a*y)+g*(i*c-a*l),t[3]=-(r*(l*d-c*h)-s*(i*d-a*h)+f*(i*c-a*l)),t[4]=-(o*(h*e-d*y)-u*(l*e-c*y)+p*(l*d-c*h)),t[5]=n*(h*e-d*y)-u*(i*e-a*y)+p*(i*d-a*h),t[6]=-(n*(l*e-c*y)-o*(i*e-a*y)+p*(i*c-a*l)),t[7]=n*(l*d-c*h)-o*(i*d-a*h)+u*(i*c-a*l),t[8]=o*(f*e-d*g)-u*(s*e-c*g)+p*(s*d-c*f),t[9]=-(n*(f*e-d*g)-u*(r*e-a*g)+p*(r*d-a*f)),t[10]=n*(s*e-c*g)-o*(r*e-a*g)+p*(r*c-a*s),t[11]=-(n*(s*d-c*f)-o*(r*d-a*f)+u*(r*c-a*s)),t[12]=-(o*(f*y-h*g)-u*(s*y-l*g)+p*(s*h-l*f)),t[13]=n*(f*y-h*g)-u*(r*y-i*g)+p*(r*h-i*f),t[14]=-(n*(s*y-l*g)-o*(r*y-i*g)+p*(r*l-i*s)),t[15]=n*(s*h-l*f)-o*(r*h-i*f)+u*(r*l-i*s),t},determinant:mt,multiply:vt,translate:bt,scale:xt,rotate:function(t,e,n,r){var i,a,o,s,l,c,u,f,h,d,p,g,y,m,v,b,x,w,k,M,O=r[0],_=r[1],r=r[2],S=Math.hypot(O,_,r);return S<Z?null:(O*=S=1/S,_*=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],f=e[6],h=e[7],d=e[8],p=e[9],g=e[10],y=e[11],v=O*_*(i=1-n)-r*S,b=_*_*i+n,x=r*_*i+O*S,w=O*r*i+_*S,k=_*r*i-O*S,M=r*r*i+n,t[0]=a*(n=O*O*i+n)+c*(m=_*O*i+r*S)+d*(r=r*O*i-_*S),t[1]=o*n+u*m+p*r,t[2]=s*n+f*m+g*r,t[3]=l*n+h*m+y*r,t[4]=a*v+c*b+d*x,t[5]=o*v+u*b+p*x,t[6]=s*v+f*b+g*x,t[7]=l*v+h*b+y*x,t[8]=a*w+c*k+d*M,t[9]=o*w+u*k+p*M,t[10]=s*w+f*k+g*M,t[11]=l*w+h*k+y*M,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:wt,rotateY:kt,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],f=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+f*r,t[4]=l*n-i*r,t[5]=c*n-a*r,t[6]=u*n-o*r,t[7]=f*n-s*r,t},fromTranslation:Mt,fromScaling:function(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},fromRotation:function(t,e,n){var r,i=n[0],a=n[1],n=n[2],o=Math.hypot(i,a,n);return o<Z?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:Ot,fromQuat2:function(t,e){var n=new Q(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],f=r*r+i*i+a*a+o*o;return 0<f?(n[0]=2*(s*o+u*r+l*a-c*i)/f,n[1]=2*(l*o+u*i+c*r-s*a)/f,n[2]=2*(c*o+u*a+s*i-l*r)/f):(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)),Ot(t,e,n),t},getTranslation:_t,getScaling:St,getRotation:Et,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*(f=a+a),i=i*(h=o+o),c=a*f,a=a*h,o=o*h,u=e*u,f=e*f,e=e*h,h=r[0],d=r[1],r=r[2];return t[0]=(1-(c+o))*h,t[1]=(l+e)*h,t[2]=(i-f)*h,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+f)*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:At,fromQuat:Lt,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:Tt,perspective:Tt,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:Pt,ortho:Nt,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:jt,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,f=(0<u&&(l*=u=1/Math.sqrt(u),c*=u,n*=u),s*n-r*c);return 0<(u=f*f+(r=r*l-o*n)*r+(o=o*c-s*l)*o)&&(f*=u=1/Math.sqrt(u),r*=u,o*=u),t[0]=f,t[1]=r,t[2]=o,t[3]=0,t[4]=c*o-n*r,t[5]=n*f-l*o,t[6]=l*r-c*f,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:Ct,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],f=t[9],h=t[10],d=t[11],p=t[12],g=t[13],y=t[14],t=t[15],m=e[0],v=e[1],b=e[2],x=e[3],w=e[4],k=e[5],M=e[6],O=e[7],_=e[8],S=e[9],E=e[10],A=e[11],L=e[12],T=e[13],P=e[14],e=e[15];return Math.abs(n-m)<=Z*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(r-v)<=Z*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(i-b)<=Z*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(a-x)<=Z*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(o-w)<=Z*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(s-k)<=Z*Math.max(1,Math.abs(s),Math.abs(k))&&Math.abs(l-M)<=Z*Math.max(1,Math.abs(l),Math.abs(M))&&Math.abs(c-O)<=Z*Math.max(1,Math.abs(c),Math.abs(O))&&Math.abs(u-_)<=Z*Math.max(1,Math.abs(u),Math.abs(_))&&Math.abs(f-S)<=Z*Math.max(1,Math.abs(f),Math.abs(S))&&Math.abs(h-E)<=Z*Math.max(1,Math.abs(h),Math.abs(E))&&Math.abs(d-A)<=Z*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(p-L)<=Z*Math.max(1,Math.abs(p),Math.abs(L))&&Math.abs(g-T)<=Z*Math.max(1,Math.abs(g),Math.abs(T))&&Math.abs(y-P)<=Z*Math.max(1,Math.abs(y),Math.abs(P))&&Math.abs(t-e)<=Z*Math.max(1,Math.abs(t),Math.abs(e))},mul:vt,sub:Ct});function Bt(){var t=new Q(3);return Q!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function It(t){var e=t[0],n=t[1],t=t[2];return Math.hypot(e,n,t)}function Ft(t,e,n){var r=new Q(3);return r[0]=t,r[1]=e,r[2]=n,r}function Dt(t,e){t[0]=e[0],t[1]=e[1],t[2]=e[2]}function zt(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Wt(t,e,n){t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2]}function Gt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function Ht(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 Vt(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function qt(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 Yt(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 $t(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 Ut(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)<=Z*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-a)<=Z*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(t-e)<=Z*Math.max(1,Math.abs(t),Math.abs(e))}var Kt=It;function Xt(){var t=new Q(4);return Q!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function Zt(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 Qt(){var t=new Q(4);return Q!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Jt(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 te(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 ee(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 ne(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}Bt(),Xt();var re=function(t,e,n,r){var i=new Q(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},ie=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},ae=te,oe=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 se(t){return t.map(function(t){return Array.isArray(t)?[].concat(t):t})}Bt(),Ft(1,0,0),Ft(0,1,0),Qt(),Qt(),J(),n=new Q(2),Q!=Float32Array&&(n[0]=0,n[1]=0);var le=function(t,e){return(le=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 t(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}le(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var v=function(){return(v=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 et(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 e(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 w(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 y(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 ue(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 he={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function de(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return he[e]===t.length-1&&"achlmqstvz".includes(e)})}function pe(t){return de(t)&&t.every(function(t){t=t[0];return t===t.toUpperCase()})}function ge(t){return pe(t)&&t.every(function(t){t=t[0];return"ACLMQZ".includes(t)})}function ye(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=he[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,he[n]))),he[n]););}function me(t){return 48<=t&&t<=57}function ve(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 be(t){var e,n,r,i,a,o=t.max,s=t.pathValue,l=t.index,c=s.charCodeAt(l),u=he[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,ve(t),t.data=[],u)for(;;){for(var f=u;0<f;--f){if(97!=(32|c)||3!==f&&4!==f?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(me(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&&me(n))return t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" illegal number';for(;o<r&&me(i.charCodeAt(o));)o+=1,s=!0;n=i.charCodeAt(o)}if(46===n){for(c=!0,o+=1;me(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&&me(i.charCodeAt(o))))return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid integer exponent';for(;o<r&&me(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),ve(t),t.index<o&&44===s.charCodeAt(t.index)&&(t.index+=1,ve(t))}if(t.index>=t.max)break;if(!(48<=(e=s.charCodeAt(t.index))&&e<=57||43===e||45===e||46===e))break}ye(t)}else t.err='[path-util]: Invalid path value "'+s[l]+'" is not a path command'}var xe=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 we(t){var o,s,l,c;return pe(t)?se(t):(t=function(t){if(de(t))return se(t);var e=new xe(t);for(ve(e);e.index<e.max&&!e.err.length;)be(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(ge(t))return se(t);for(var e,n,r,i,a,o,s,l=we(t),c=v({},fe),u=0;u<l.length;u+=1){l[u]=(e=l[u],n=c,s=o=h=a=f=i=r=void 0,r=e[0],i=n.x1,f=n.y1,a=n.x2,h=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],f]:"V"===r?s=["L",i,e[1]]:"S"===r?(e=2*f-h,s=["C",n.x1=2*i-a,n.y1=e].concat(o)):"T"===r?(h=2*i-n.qx,a=2*f-n.qy,s=["Q",n.qx=h,n.qy=a].concat(o)):"Q"===r&&(e=o[0],i=o[1],n.qx=e,n.qy=i),s);var f=l[u],h=f.length;c.x1=+f[h-2],c.y1=+f[h-1],c.x2=+f[h-4]||c.x1,c.y2=+f[h-3]||c.y1}return l}function Me(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){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 Se(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=Oe([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 Ee(t,e,n,r){var t=[t,e],e=[n,r],i=Oe(t,e,.5),e=Oe(e,i,.5),a=Oe(i,e,.5),o=Oe(e,a,.5),s=Oe(a,o,.5),t=Se(t[0],t[1],i[0],i[1],a[0]).point,i=Se(s[0],s[1],o[0],o[1],e[0]).point;return[t.x,t.y,i.x,i.y,n,r]}function Ae(t,e){var n,r,i,a,o,s,l=t[0],c=t.slice(1).map(Number),u=c[0],f=c[1],h=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=f,t;case"A":return s=[h,d].concat(c),["C"].concat(function t(e,n,r,i,a,o,s,l,c,u){var f=120*Math.PI/180,h=Math.PI/180*(+a||0),d=[],p=(u?(x=u[0],w=u[1],v=u[2],b=u[3]):(e=(y=Me(e,n,-h)).x,n=y.y,1<(p=(g=(e-(l=(y=Me(l,c,-h)).x))/2)*g/(r*r)+(y=(n-(c=y.y))/2)*y/(i*i))&&(r*=p=Math.sqrt(p),i*=p),p=r*r,m=i*i,v=(o=(o===s?-1:1)*Math.sqrt(Math.abs((p*m-p*y*y-m*g*g)/(p*y*y+m*g*g))))*r*y/i+(e+l)/2,b=o*-i*g/r+(n+c)/2,x=Math.asin(((n-b)/i*Math.pow(10,9)>>0)/Math.pow(10,9)),w=Math.asin(((c-b)/i*Math.pow(10,9)>>0)/Math.pow(10,9)),x=e<v?Math.PI-x:x,w=l<v?Math.PI-w:w,x<0&&(x=2*Math.PI+x),w<0&&(w=2*Math.PI+w),s&&w<x&&(x-=2*Math.PI),!s&&x<w&&(w-=2*Math.PI)),w-x),g=(Math.abs(p)>f&&(m=w,y=l,o=c,w=x+f*(s&&x<w?1:-1),d=t(l=v+r*Math.cos(w),c=b+i*Math.sin(w),r,i,a,0,s,y,o,[w,m,v,b])),p=w-x,Math.cos(x)),f=Math.sin(x),a=Math.cos(w),s=Math.sin(w),y=Math.tan(p/4),o=4/3*r*y,m=4/3*i*y,v=[e,n],b=[e+o*f,n-m*g],x=[l+o*s,c-m*a],w=[l,c];if(b[0]=2*v[0]-b[0],b[1]=2*v[1]-b[1],u)return b.concat(x,w,d);for(var k=[],M=0,O=(d=b.concat(x,w,d)).length;M<O;M+=1)k[M]=M%2?Me(d[M-1],d[M],h).y:Me(d[M],d[M+1],h).x;return k}(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=f,s=[h,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(Ee(h,d,u,f));case"Z":return h===p&&d===g?["C",h,d,p,g,p,g]:["C"].concat(Ee(h,d,p,g))}return t}function Le(t,e){var n;if(void 0===e&&(e=!1),ge(n=t)&&n.every(function(t){t=t[0];return"MC".includes(t)}))return n=se(t),e?[n,[]]:n;for(var r,i=ke(t),a=v({},fe),o=[],s="",l=i.length,c=[],u=0;u<l;u+=1){i[u]&&(s=i[u][0]),o[u]=s;var f=Ae(i[u],a),h=(i[u]=f,y=g=p=d=h=void 0,i),d=o,p=u;if(7<h[p].length){h[p].shift();for(var g=h[p],y=p;g.length;)d[p]="A",h.splice(y+=1,0,["C"].concat(g.splice(0,6)));h.splice(p,1)}l=i.length,"Z"===s&&c.push(u),r=(f=i[u]).length,a.x1=+f[r-2],a.y1=+f[r-1],a.x2=+f[r-4]||a.x1,a.y2=+f[r-3]||a.y1}return e?[i,c]:i}function Te(t,e,n,r,i,a,o,s,l,c){var u=c.bbox,f=void 0===u||u,u=c.length,h=void 0===u||u,u=c.sampleSize,d=void 0===u?10:u,p="number"==typeof l,g=t,y=e,m=0,v=[g,y,m],b=[g,y],x={x:0,y:0},w=[{x:g,y:y}];p&&l<=0&&(x={x:g,y:y});for(var k,M,O,_,S,E,A,L,T,P,N=0;N<=d;N+=1)k=t,M=e,O=n,_=r,S=i,E=a,A=o,L=s,P=void 0,P=1-(T=N/d),g=(k={x:Math.pow(P,3)*k+3*Math.pow(P,2)*T*O+3*P*Math.pow(T,2)*S+Math.pow(T,3)*A,y:Math.pow(P,3)*M+3*Math.pow(P,2)*T*_+3*P*Math.pow(T,2)*E+Math.pow(T,3)*L}).x,y=k.y,f&&w.push({x:g,y:y}),h&&(m+=_e(b,[g,y])),b=[g,y],p&&l<=m&&l>v[2]&&(O=(m-l)/(m-v[2]),x={x:b[0]*(1-O)+v[0]*O,y:b[1]*(1-O)+v[1]*O}),v=[g,y,m];return{length:m,point:x=p&&m<=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 Pe(t){return(c=l=s=0)<=Le(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 Ne(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?Te(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=Oe(n,i,r),i=Oe(i,a,r),a=Oe(a,e,r),o=Oe(n,i,r),i=Oe(i,a,r),r=Oe(o,i,r),[["C"].concat(n,o,r),["C"].concat(i,a,e)]):[t,t]:[t];return{s:t,ss:n,l:s}})}var je=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},Ce=function(t){return"function"==typeof t},b=function(t){return null==t},Re={}.toString,Be=function(t,e){return Re.call(t)==="[object "+e+"]"},Ie=function(t){return Array.isArray?Array.isArray(t):Be(t,"Array")},Fe=function(t){var e=typeof t;return null!==t&&"object"==e||"function"==e};function De(t,e){if(t)if(Ie(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if(Fe(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break}var ze=function(t){return"object"==typeof t&&null!==t},We=function(t){if(!ze(t)||!Be(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},Ge=function(t){if(Ie(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},He=function(t){if(Ie(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},Ve=function(t,n,e){var r;return Ie(t)||We(t)?(r=e,De(t,function(t,e){r=n(r,t,e)}),r):t},qe=function(t){return Be(t,"String")};var Ye=function(t,e,n){return t<e?e:n<t?n:t},$e=function(t){return Be(t,"Number")};function Ue(t){return b(t)?"":t.toString()}var Ke=function(t,e){return(t%e+e)%e},Xe=function(t){t=Ue(t);return t.charAt(0).toLowerCase()+t.substring(1)};var Ze=function(t){t=Ue(t);return t.charAt(0).toUpperCase()+t.substring(1)},Qe=function(t){return Be(t,"Boolean")},Je=function(t){return void 0===t},tn=function(t){return t instanceof Element||t instanceof HTMLDocument};function en(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function nn(t){if("object"!=typeof t||null===t)return t;if(Ie(t))for(var e=[],n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=nn(t[n]):e[n]=t[n];else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=nn(t[i]):e[i]=t[i];return e}var rn=nn;function an(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 on(a,o){var s;if(Ce(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 sn=5;function ln(t,e){if(t===e)return!0;if(t&&e&&!qe(t)&&!qe(e)){if(je(t)||je(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=ln(t[r],e[r]));r++);return n}if(ze(t)||ze(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=ln(t[i[r]],e[i[r]]));r++);return n}}return!1}function cn(){}var nt=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||sn,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&We(o)?(We(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):Ie(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t},un=ln,fn=function(t,e,n){for(var r=0,i=qe(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t},hn=Object.prototype.hasOwnProperty,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 yn(){}var n="\\s*([+-]?\\d+)\\s*",r="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",i="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",mn=/^#([0-9a-f]{3,8})$/,vn=new RegExp("^rgb\\("+[n,n,n]+"\\)$"),bn=new RegExp("^rgb\\("+[i,i,i]+"\\)$"),xn=new RegExp("^rgba\\("+[n,n,n,r]+"\\)$"),wn=new RegExp("^rgba\\("+[i,i,i,r]+"\\)$"),kn=new RegExp("^hsl\\("+[r,i,i]+"\\)$"),Mn=new RegExp("^hsla\\("+[r,i,i,r]+"\\)$"),On={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 _n(){return this.rgb().formatHex()}function Sn(){return this.rgb().formatRgb()}function En(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=mn.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?An(e):3===n?new Tn(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Ln(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Ln(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=vn.exec(t))?new Tn(e[1],e[2],e[3],1):(e=bn.exec(t))?new Tn(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=xn.exec(t))?Ln(e[1],e[2],e[3],e[4]):(e=wn.exec(t))?Ln(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=kn.exec(t))?Cn(e[1],e[2]/100,e[3]/100,1):(e=Mn.exec(t))?Cn(e[1],e[2]/100,e[3]/100,e[4]):On.hasOwnProperty(t)?An(On[t]):"transparent"===t?new Tn(NaN,NaN,NaN,0):null}function An(t){return new Tn(t>>16&255,t>>8&255,255&t,1)}function Ln(t,e,n,r){return new Tn(t=r<=0?e=n=NaN:t,e,n,r)}function Tn(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Pn(){return"#"+jn(this.r)+jn(this.g)+jn(this.b)}function Nn(){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 jn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Cn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new Bn(t,e,n,r)}function Rn(t){var e,n,r,i,a,o,s,l;return t instanceof Bn?new Bn(t.h,t.s,t.l,t.opacity):(t=t instanceof yn?t:En(t))?t instanceof Bn?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 Bn(o,s,l,t.opacity)):new Bn}function Bn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function In(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 Fn(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function Dn(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 Wn(t){return(t+2*Math.PI)%(2*Math.PI)}pn(yn,En,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:_n,formatHex:_n,formatHsl:function(){return Rn(this).formatHsl()},formatRgb:Sn,toString:Sn}),pn(Tn,function(t,e,n,r){return 1===arguments.length?(i=(i=t)instanceof yn?i:En(i))?new Tn((i=i.rgb()).r,i.g,i.b,i.opacity):new Tn:new Tn(t,e,n,null==r?1:r);var i},gn(yn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Tn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Tn(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:Pn,formatHex:Pn,formatRgb:Nn,toString:Nn})),pn(Bn,function(t,e,n,r){return 1===arguments.length?Rn(t):new Bn(t,e,n,null==r?1:r)},gn(yn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Bn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Bn(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 Tn(In(240<=t?t-240:120+t,n,e),In(t,n,e),In(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 Gn={box:function(t,e,n,r){return zn([t,n],[e,r])},length:Fn,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?Fn(t,e,i,a):(n-t)*(n-t)+(r-e)*(r-e)<o?Fn(n,r,i,a):this.pointToLine(t,e,n,r,i,a)},pointToLine:function(t,e,n,r,i,a){var o,s,l,n=[n-t,r-e];return(r=n)[0]===(o=[0,0])[0]&&r[1]===o[1]?Math.sqrt((i-t)*(i-t)+(a-e)*(a-e)):(s=(n=o=r=[-n[1],n[0]])[0],l=n[1],0<(s=s*s+l*l)&&(s=1/Math.sqrt(s)),o[0]=n[0]*s,o[1]=n[1]*s,l=[i-t,a-e],Math.abs(l[0]*r[0]+l[1]*r[1]))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function Hn(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),f=u/10,h=0;h<=c;h++){var d=h*u,p=[i.apply(void 0,t.concat([d])),i.apply(void 0,e.concat([d]))],p=Fn(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&&!(f<1e-4);g++){var y=o-f,m=o+f,v=[i.apply(void 0,t.concat([y])),i.apply(void 0,e.concat([y]))],v=Fn(l[0],l[1],v[0],v[1]);0<=y&&v<s?(o=y,s=v):(y=[i.apply(void 0,t.concat([m])),i.apply(void 0,e.concat([m]))],v=Fn(l[0],l[1],y[0],y[1]),m<=1&&v<s?(o=m,s=v):f*=.5)}return{x:i.apply(void 0,t.concat([o])),y:i.apply(void 0,e.concat([o]))}}function Vn(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function qn(t,e,n){n=t+n-2*e;return Dn(n,0)?[.5]:(t=(t-e)/n)<=1&&0<=t?[t]:[]}function Yn(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=Vn(t,n,i,o),l=Vn(e,r,a,o),c=Gn.pointAt(t,e,n,r,o),n=Gn.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?(Fn(t,e,n,r)+Fn(n,r,i,a)+Fn(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 Kn={box:function(t,e,n,r,i,a){var o=qn(t,n,i)[0],s=qn(e,r,a)[0],l=[t,i],c=[e,a];return void 0!==o&&l.push(Vn(t,n,i,o)),void 0!==s&&c.push(Vn(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 Hn([t,n,i],[e,r,a],o,s,Vn)},pointDistance:function(t,e,n,r,i,a,o,s){t=this.nearestPoint(t,e,n,r,i,a,o,s);return Fn(t.x,t.y,o,s)},interpolationAt:Vn,pointAt:function(t,e,n,r,i,a,o){return{x:Vn(t,n,i,o),y:Vn(e,r,a,o)}},divide:$n,tangentAngle:function(t,e,n,r,i,a,o){t=Yn(t,n,i,o),n=Yn(e,r,a,o);return Wn(Math.atan2(n,t))}};function Xn(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 Dn(r,0)?Dn(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):Dn(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=Xn(t,n,i,o,l),u=Xn(e,r,a,s,l),f=Gn.pointAt(t,e,n,r,l),n=Gn.pointAt(n,r,i,a,l),r=Gn.pointAt(i,a,o,s,l),i=Gn.pointAt(f.x,f.y,n.x,n.y,l),a=Gn.pointAt(n.x,n.y,r.x,r.y,l);return[[t,e,f.x,f.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],f=0,h=c.length,d=0;d<h;d++)f+=Fn(c[d],u[d],c[(d+1)%h],u[(d+1)%h]);return f/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),f=Qn(e,r,a,s),h=0;h<u.length;h++)l.push(Xn(t,n,i,o,u[h]));for(var d=0;d<f.length;d++)c.push(Xn(e,r,a,s,f[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 Hn([t,n,i,o],[e,r,a,s],l,c,Xn,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 Fn(t.x,t.y,l,c)},interpolationAt:Xn,pointAt:function(t,e,n,r,i,a,o,s,l){return{x:Xn(t,n,i,o,l),y:Xn(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 Wn(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,f=s*s,h=Math.PI/4,d=0,p=0,g=0;g<4;g++){var d=o*Math.cos(h),p=s*Math.sin(h),y=(u-f)*Math.pow(Math.cos(h),3)/o,m=(f-u)*Math.pow(Math.sin(h),3)/s,v=d-y,b=p-m,y=l-y,m=c-m,x=Math.hypot(b,v),w=Math.hypot(m,y);h+=x*Math.asin((v*m-b*y)/(x*w))/Math.sqrt(u+f-d*d-p*p),h=Math.min(Math.PI/2,Math.max(0,h))}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],f=2*-Math.PI;f<=2*Math.PI;f+=Math.PI){var h=s+f;a<o?a<h&&h<o&&u.push(h):o<h&&h<a&&u.push(h)}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))),y=1/0,m=-1/0,v=[a,o],b=2*-Math.PI;b<=2*Math.PI;b+=Math.PI){var x=g+b;a<o?a<x&&x<o&&v.push(x):o<x&&x<a&&v.push(x)}for(var w=0;w<v.length;w++){var k=ar(0,e,n,r,i,v[w]);k<y&&(y=k),m<k&&(m=k)}return{x:l,y:y,width:c-l,height:m-y}},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 Fn(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 Wn(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=Fn(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,fr,hr={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+=Fn(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=Gn.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=Gn.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}},n={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=fr?fr+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 yr(t,e){0==--t._eventsCount?t._events=new dr:delete t._events[e]}function mr(){this._events=new dr,this._eventsCount=0}i=n,ur=Object.prototype.hasOwnProperty,fr="~",Object.create&&(dr.prototype=Object.create(null),(new dr).__proto__||(fr=!1)),mr.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(fr?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},mr.prototype.listeners=function(t){var t=fr?fr+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},mr.prototype.listenerCount=function(t){t=fr?fr+t:t,t=this._events[t];return t?t.fn?1:t.length:0},mr.prototype.emit=function(t,e,n,r,i,a){var o=fr?fr+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(h=1,s=new Array(c-1);h<c;h++)s[h-1]=arguments[h];l.fn.apply(l.context,s)}else for(var u,f=l.length,h=0;h<f;h++)switch(l[h].once&&this.removeListener(t,l[h].fn,void 0,!0),c){case 1:l[h].fn.call(l[h].context);break;case 2:l[h].fn.call(l[h].context,e);break;case 3:l[h].fn.call(l[h].context,e,n);break;case 4:l[h].fn.call(l[h].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[h].fn.apply(l[h].context,s)}return!0},mr.prototype.on=function(t,e,n){return gr(this,t,e,n,!1)},mr.prototype.once=function(t,e,n){return gr(this,t,e,n,!0)},mr.prototype.removeListener=function(t,e,n,r){t=fr?fr+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||yr(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:yr(this,t)}}else yr(this,t);return this},mr.prototype.removeAllListeners=function(t){return t?(t=fr?fr+t:t,this._events[t]&&yr(this,t)):(this._events=new dr,this._eventsCount=0),this},mr.prototype.off=mr.prototype.removeListener,mr.prototype.addListener=mr.prototype.on,mr.prefixed=fr,i.exports=mr.EventEmitter=mr;var s,vr,br,xr,wr=n.exports;function kr(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 Mr(t,e,n){e&&kr(t.prototype,e),n&&kr(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function Or(){return(Or=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),Sr(t.prototype.constructor=t,e)}function Sr(t,e){return(Sr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Er(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ar(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 Lr(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?Ar(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)?Ar(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.")}(r=c=c||{}).COORDINATE="<coordinate>",r.COLOR="<color>",r.PAINT="<paint>",r.NUMBER="<number>",r.ANGLE="<angle>",r.OPACITY_VALUE="<opacity-value>",r.SHADOW_BLUR="<shadow-blur>",r.LENGTH="<length>",r.PERCENTAGE="<percentage>",r.LENGTH_PERCENTAGE="<length> | <percentage>",r.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",r.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",r.LIST_OF_POINTS="<list-of-points>",r.PATH="<path>",r.FILTER="<filter>",r.Z_INDEX="<z-index>",r.OFFSET_DISTANCE="<offset-distance>",r.DEFINED_PATH="<defined-path>",r.MARKER="<marker>",r.TRANSFORM="<transform>",r.TRANSFORM_ORIGIN="<transform-origin>",r.TEXT="<text>",r.TEXT_TRANSFORM="<text-transform>",(i=s=s||{})[i.kUnknown=0]="kUnknown",i[i.kNumber=1]="kNumber",i[i.kPercentage=2]="kPercentage",i[i.kEms=3]="kEms",i[i.kPixels=4]="kPixels",i[i.kRems=5]="kRems",i[i.kDegrees=6]="kDegrees",i[i.kRadians=7]="kRadians",i[i.kGradians=8]="kGradians",i[i.kTurns=9]="kTurns",i[i.kMilliseconds=10]="kMilliseconds",i[i.kSeconds=11]="kSeconds",i[i.kInteger=12]="kInteger",(n=vr=vr||{})[n.kUNumber=0]="kUNumber",n[n.kUPercent=1]="kUPercent",n[n.kULength=2]="kULength",n[n.kUAngle=3]="kUAngle",n[n.kUTime=4]="kUTime",n[n.kUOther=5]="kUOther",(r=br=br||{})[r.kYes=0]="kYes",r[r.kNo=1]="kNo",(i=xr=xr||{})[i.kYes=0]="kYes",i[i.kNo=1]="kNo";function Tr(t){var e=1;switch(t){case s.kPixels:case s.kDegrees:case s.kSeconds:break;case s.kMilliseconds:e=.001;break;case s.kRadians:e=180/Math.PI;break;case s.kGradians:e=.9;break;case s.kTurns:e=360}return e}function Pr(t){switch(t){case s.kNumber:case s.kInteger:return"";case s.kPercentage:return"%";case s.kEms:return"em";case s.kRems:return"rem";case s.kPixels:return"px";case s.kDegrees:return"deg";case s.kRadians:return"rad";case s.kGradians:return"grad";case s.kMilliseconds:return"ms";case s.kSeconds:return"s";case s.kTurns:return"turn"}return""}var Nr,jr,Cr=[{name:"em",unit_type:s.kEms},{name:"px",unit_type:s.kPixels},{name:"deg",unit_type:s.kDegrees},{name:"rad",unit_type:s.kRadians},{name:"grad",unit_type:s.kGradians},{name:"ms",unit_type:s.kMilliseconds},{name:"s",unit_type:s.kSeconds},{name:"rem",unit_type:s.kRems},{name:"turn",unit_type:s.kTurns}],Rr=((n=Nr=Nr||{})[n.kUnknownType=0]="kUnknownType",n[n.kUnparsedType=1]="kUnparsedType",n[n.kKeywordType=2]="kKeywordType",n[n.kUnitType=3]="kUnitType",n[n.kSumType=4]="kSumType",n[n.kProductType=5]="kProductType",n[n.kNegateType=6]="kNegateType",n[n.kInvertType=7]="kInvertType",n[n.kMinType=8]="kMinType",n[n.kMaxType=9]="kMaxType",n[n.kClampType=10]="kClampType",n[n.kTransformType=11]="kTransformType",n[n.kPositionType=12]="kPositionType",n[n.kURLImageType=13]="kURLImageType",n[n.kColorType=14]="kColorType",n[n.kUnsupportedColorType=15]="kUnsupportedColorType",function(e){return Cr.find(function(t){return t.name===e}).unit_type}),r=function(){function t(){}t.isAngle=function(t){return t===s.kDegrees||t===s.kRadians||t===s.kGradians||t===s.kTurns},t.isLength=function(t){return t>=s.kEms&&t<s.kDegrees},t.isRelativeUnit=function(t){return t===s.kPercentage||t===s.kEms||t===s.kRems},t.isTime=function(t){return t===s.kSeconds||t===s.kMilliseconds};var e=t.prototype;return e.toString=function(){return this.buildCSSText(br.kNo,xr.kNo,"")},e.isNumericValue=function(){return this.getType()>=Nr.kUnitType&&this.getType()<=Nr.kClampType},t}(),i=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 Nr.kColorType},e.to=function(t){return this},t}(r),Br=((n=jr=jr||{})[n.Constant=0]="Constant",n[n.LinearGradient=1]="LinearGradient",n[n.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 Nr.kColorType},t}(r)),Ir=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 Nr.kKeywordType},e.buildCSSText=function(t,e,n){return n+this.value},t}(r);function Fr(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(Fr.Cache||Map),l}Fr.Cache=Map;function Dr(t){return t.split("").map(function(t,e){return t.toUpperCase()===t?(0!==e?"-":"")+t.toLowerCase():t}).join("")}var zr=Fr(function(t){return(t=void 0===t?"":t).replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})});function Wr(t){return"function"==typeof t}function Gr(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 Hr(t){switch(function(t){switch(t){case s.kNumber:case s.kInteger:return vr.kUNumber;case s.kPercentage:return vr.kUPercent;case s.kPixels:return vr.kULength;case s.kMilliseconds:case s.kSeconds:return vr.kUTime;case s.kDegrees:case s.kRadians:case s.kGradians:case s.kTurns:return vr.kUAngle;default:return vr.kUOther}}(t)){case vr.kUNumber:return s.kNumber;case vr.kULength:return s.kPixels;case vr.kUPercent:return s.kPercentage;case vr.kUTime:return s.kSeconds;case vr.kUAngle:return s.kDegrees;default:return s.kUnknown}}function Vr(t){return Qr[t]||(Qr[t]=new Ir(t)),Qr[t]}var qr={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},Yr=Fr(function(t){var t=zr(t),e=qr[t];return(null==e?void 0:e.alias)||t}),$r=function(i){function n(t,e){var n,r;return void 0===e&&(e=s.kNumber),(n=i.call(this)||this).unit=void 0,n.value=void 0,r="string"==typeof e?(r=e)?"number"===r?s.kNumber:"percent"===r||"%"===r?s.kPercentage:Rr(r):s.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 Nr.kUnitType},t.convertTo=function(t){var e;return this.unit===t?new n(this.value,this.unit):(e=Hr(this.unit))!==Hr(t)||e===s.kUnknown?null:(e=Tr(this.unit)/Tr(t),new n(this.value*e,t))},t.buildCSSText=function(t,e,n){switch(this.unit){case s.kUnknown:break;case s.kInteger:i=Number(this.value).toFixed(0);break;case s.kNumber:case s.kPercentage:case s.kEms:case s.kRems:case s.kPixels:case s.kDegrees:case s.kRadians:case s.kGradians:case s.kMilliseconds:case s.kSeconds:case s.kTurns:var r,i,a=this.value,o=Pr(this.unit);i=a<-999999||999999<a?(r=Pr(this.unit),!Number.isFinite(a)||Number.isNaN(a)?Gr(a,r):a+(r||"")):""+a+o}return n+=i},n}(r),Ur=new $r(0,"px"),Kr=(new $r(1,"px"),new $r(0,"deg")),Xr=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}(i),Zr=new Ir("unset"),n=new Ir("initial"),r=new Ir("inherit"),Qr={"":Zr,unset:Zr,initial:n,inherit:r},Jr=new Xr(0,0,0,0,!0),ti=new Xr(0,0,0,0),ei=Fr(function(t,e,n,r){return new Xr(t,e,n,r)},function(t,e,n,r){return"rgba("+t+","+e+","+n+","+r+")"}),ni=function(t,e){return void 0===e&&(e=s.kNumber),new $r(t,e)};new $r(50,"%");var ri="Method not implemented.";function ii(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function ai(t,e,n){t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2]}function oi(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function si(t,e,n){t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function li(t){return void 0===t?0:360<t||t<-360?t%360:t}function ci(t,e,n){var r,i;return void 0===e&&(e=0),void 0===n&&(n=0),Array.isArray(t)&&3===t.length?(r=t,(i=new Q(3))[0]=r[0],i[1]=r[1],i[2]=r[2],i):$e(t)?Ft(t,e,n):Ft(t[0],t[1]||e,t[2]||n)}function ui(t){return t*(Math.PI/180)}function fi(t){return t*(180/Math.PI)}function hi(t,e){return 16===e.length?(n=t,r=e,o=.5*Math.PI,s=(c=St(Bt(),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 di(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 Q(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 pi(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=fi(Math.atan2(n,e));return[t[6],t[7],a,o,r]}var gi=ft(),yi=ft(),mi=Xt(),d=[Bt(),Bt(),Bt()],vi=Bt();function bi(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}(gi,t)&&(ht(yi,gi),yi[3]=0,yi[7]=0,yi[11]=0,yi[15]=1,!(Math.abs(mt(yi))<1e-8))){var t=gi[3],o=gi[7],s=gi[11],l=gi[12],c=gi[13],u=gi[14],f=gi[15];if(0!==t||0!==o||0!==s){if(mi[0]=t,mi[1]=o,mi[2]=s,mi[3]=f,!yt(yi,yi))return;gt(yi,yi),Zt(i,mi,yi)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=l,e[1]=c,e[2]=u,t=gi,(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]=It(d[0]),Ht(d[0],d[0]),r[0]=Vt(d[0],d[1]),xi(d[1],d[1],d[0],1,-r[0]),n[1]=It(d[1]),Ht(d[1],d[1]),r[0]/=n[1],r[1]=Vt(d[0],d[2]),xi(d[2],d[2],d[0],1,-r[1]),r[2]=Vt(d[1],d[2]),xi(d[2],d[2],d[1],1,-r[2]),n[2]=It(d[2]),Ht(d[2],d[2]),r[1]/=n[2],r[2]/=n[2],qt(vi,d[1],d[2]),Vt(d[0],vi)<0)for(var h=0;h<3;h++)n[h]*=-1,d[h][0]*=-1,d[h][1]*=-1,d[h][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 xi(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 wi=ft();function ki(t,l){var c,u;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 Qo({}),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||[Ur,Ur],l.translateLocal(o[0].value,o[1].value,0)):"translatex"===s?(o=t||[Ur],l.translateLocal(o[0].value,0,0)):"translatey"===s?(o=t||[Ur],l.translateLocal(0,o[0].value,0)):"translatez"===s?(o=t||[Ur],l.translateLocal(0,0,o[0].value)):"translate3d"===s?(o=t||[Ur,Ur,Ur],l.translateLocal(o[0].value,o[1].value,o[2].value)):"rotate"===s?(o=t||[Kr],l.rotateLocal(0,0,La(o[0]))):"rotatex"===s?(o=t||[Kr],l.rotateLocal(La(o[0]),0,0)):"rotatey"===s?(o=t||[Kr],l.rotateLocal(0,La(o[0]),0)):"rotatez"===s?(o=t||[Kr],l.rotateLocal(0,0,La(o[0]))):"rotate3d"!==s&&("skew"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0,0],l.setLocalSkew(ui(o[0]),ui(o[1]))):"skewx"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(ui(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],ui(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(dt(wi,e,n,0,0,r,i,0,0,0,0,1,0,a+c,o+u,0,1))):"matrix3d"===s&&(dt.apply(Rt,[wi].concat(t.map(function(t){return t.value}))),wi[12]+=c,wi[13]+=u,l.setLocalTransform(wi)))})),l.getLocalTransform()}Mi={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]+\.?))/},Oi="";var Mi,Oi,x,_i=function(t){return Oi=t,Ei()};function Si(t){throw new Error(Oi+": "+t)}function Ei(){var t=Ii(Ai);return 0<Oi.length&&Si("Invalid input not EOF"),t}function Ai(){return Li("linear-gradient",Mi.linearGradient,Pi)||Li("repeating-linear-gradient",Mi.repeatingLinearGradient,Pi)||Li("radial-gradient",Mi.radialGradient,Ni)||Li("repeating-radial-gradient",Mi.repeatingRadialGradient,Ni)||Li("conic-gradient",Mi.conicGradient,Ni)}function Li(n,t,r){return Ti(t,function(t){var e=r();return e&&!Vi(Mi.comma)&&Si("Missing comma before color stops"),{type:n,orientation:e,colorStops:Ii(Fi)}})}function Ti(t,e){t=Vi(t);if(t)return Vi(Mi.startCall)||Si("Missing ("),e=e(t),Vi(Mi.endCall)||Si("Missing )"),e}function Pi(){return Hi("directional",Mi.sideOrCorner,1)||Hi("angular",Mi.angleValue,1)}function Ni(){var t,e,n=ji();return n&&((t=[]).push(n),e=Oi,Vi(Mi.comma))&&((n=ji())?t.push(n):Oi=e),t}function ji(){var t,e=function(){var t=Hi("shape",/^(circle)/i,0);t&&(t.style=Gi()||Ci());return t}()||function(){var t=Hi("shape",/^(ellipse)/i,0);t&&(t.style=zi()||Ci());return t}();return e?e.at=Ri():(t=Ci())?(e=t,(t=Ri())&&(e.at=t)):(t=Bi())&&(e={type:"default-radial",at:t}),e}function Ci(){return Hi("extent-keyword",Mi.extentKeywords,1)}function Ri(){var t;if(Hi("position",/^at/,0))return(t=Bi())||Si("Missing positioning value"),t}function Bi(){var t={x:zi(),y:zi()};if(t.x||t.y)return{type:"position",value:t}}function Ii(t){var e=t(),n=[];if(e)for(n.push(e);Vi(Mi.comma);)(e=t())?n.push(e):Si("One extra comma");return n}function Fi(){var t=Hi("hex",Mi.hexColor,1)||Ti(Mi.rgbaColor,function(){return{type:"rgba",value:Ii(Di)}})||Ti(Mi.rgbColor,function(){return{type:"rgb",value:Ii(Di)}})||Hi("literal",Mi.literalColor,0);return t||Si("Expected color definition"),t.length=zi(),t}function Di(){return Vi(Mi.number)[1]}function zi(){return Hi("%",Mi.percentageValue,1)||Wi()||Gi()}function Wi(){return Hi("position-keyword",Mi.positionKeywords,1)}function Gi(){return Hi("px",Mi.pixelValue,1)||Hi("em",Mi.emValue,1)}function Hi(t,e,n){e=Vi(e);if(e)return{type:t,value:e[n]}}function Vi(t){var e=/^[\n\r\t\s]+/.exec(Oi),e=(e&&qi(e[0].length),t.exec(Oi));return e&&qi(e[0].length),e}function qi(t){Oi=Oi.substring(t)}function Yi(t,e){return t[0]===e[0]&&t[1]===e[1]}function $i(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 Ui(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}(i=x=x||{}).GROUP="g",i.CIRCLE="circle",i.ELLIPSE="ellipse",i.IMAGE="image",i.RECT="rect",i.LINE="line",i.POLYLINE="polyline",i.POLYGON="polygon",i.TEXT="text",i.PATH="path",i.HTML="html",i.MESH="mesh";function Ki(t,e,n,r,i,a,o,s){var l,c,u;return e=Math.abs(e),n=Math.abs(n),r=ui(r=Ke(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=Xi({x:1,y:0},o={x:(u.x-c)/e,y:(u.y-i)/n}),o=Xi(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 Xi=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 Zi(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 f=function(t,e){var n=e[1],r=e[2],i=Ke(ui(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,f=-1*Math.sin(i)*(s-c)/2+Math.cos(i)*(l-e)/2,h=u*u/(n*n)+f*f/(r*r);1<h&&(n*=Math.sqrt(h),r*=Math.sqrt(h));h=n*n*(f*f)+r*r*(u*u),h=h?Math.sqrt((n*n*(r*r)-h)/h):1;a===o&&(h*=-1);isNaN(h)&&(h=0);var d=r?h*n*f/r:0,h=n?h*-r*u/n:0,s=(s+c)/2+Math.cos(i)*d-Math.sin(i)*h,l=(l+e)/2+Math.sin(i)*d+Math.cos(i)*h,p=[(u-d)/n,(f-h)/r],u=[(-1*u-d)/n,(-1*f-h)/r],d=ea([1,0],p),f=ea(p,u);ta(p,u)<=-1&&(f=Math.PI);1<=ta(p,u)&&(f=0);0===o&&0<f&&(f-=2*Math.PI);1===o&&f<0&&(f+=2*Math.PI);return{cx:s,cy:l,rx:Yi(t,[c,e])?0:n,ry:Yi(t,[c,e])?0:r,startAngle:d,endAngle:d+f,xRotation:i,arcFlag:a,sweepFlag:o}}(n,l);u.arcParams=f}"Z"===c?(n=i,r=t[a+1]):n=[l[(v=l.length)-2],l[v-1]],r&&"Z"===r[0]&&(r=t[a],e[a])&&(e[a].prePoint=n),u.currentPoint=n,e[a]&&Yi(n,e[a].currentPoint)&&(e[a].prePoint=u.prePoint);var h,d,p,g,y,m,v=r?[r[r.length-2],r[r.length-1]]:null,b=(u.nextPoint=v,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?(h=[l[1],l[2]],u.startTangent=[b[0]-h[0],b[1]-h[1]],u.endTangent=[n[0]-h[0],n[1]-h[1]]):"T"===c?(d=Ui((h=e[s-1]).currentPoint,b),"Q"===h.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=Ui((p=e[s-1]).currentPoint,b),y=[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]-y[0],b[1]-y[1]]),u.endTangent=[n[0]-y[0],n[1]-y[1]]):"A"===c&&(b=(g=Qi(u,0)).x,y=g.y,m=(c=Qi(u,1,!1)).x,c=c.y,u.startTangent=[b,y],u.endTangent=[m,c]),e.push(u)}return e}function Qi(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=Ki({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},e),i=Ki({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 Ji(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function ta(t,e){return Ji(t)*Ji(e)?(t[0]*e[0]+t[1]*e[1])/(Ji(t)*Ji(e)):1}function ea(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(ta(t,e))}n=function(){function t(t){this.config=t,this.options=void 0,this._args=void 0}var e=t.prototype;return e.create=function(t){var e;switch(this.init(t),this.options.type){case"sync":e=new Function(this.args(),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"throw "+t+";\n"},onResult:function(t){return"return "+t+";\n"},resultReturns:!0,onDone:function(){return""},rethrowIfPossible:!0}));break;case"async":e=new Function(this.args({after:"_callback"}),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"_callback("+t+");\n"},onResult:function(t){return"_callback(null, "+t+");\n"},onDone:function(){return"_callback();\n"}}));break;case"promise":var n=!1,r=this.contentWithInterceptors({onError:function(t){return n=!0,"_error("+t+");\n"},onResult:function(t){return"_resolve("+t+");\n"},onDone:function(){return"_resolve();\n"}}),i="",i=(i+='"use strict";\n')+this.header()+"return new Promise((function(_resolve, _reject) {\n";n&&(i+="var _sync = true;\nfunction _error(_err) {\nif(_sync)\n_resolve(Promise.resolve().then((function() { throw _err; })));\nelse\n_reject(_err);\n};\n"),i+=r,n&&(i+="_sync = false;\n"),i+="}));\n",e=new Function(this.args(),i)}return this.deinit(),e},e.setup=function(t,e){t._x=e.taps.map(function(t){return t.fn})},e.init=function(t){this.options=t,this._args=t.args.slice()},e.deinit=function(){this.options=void 0,this._args=void 0},e.contentWithInterceptors=function(t){var r=this;if(0<this.options.interceptors.length){for(var i=t.onError,a=t.onResult,n=t.onDone,e="",o=0;o<this.options.interceptors.length;o++){var s=this.options.interceptors[o];s.call&&(e+=this.getInterceptor(o)+".call("+this.args({before:s.context?"_context":void 0})+");\n")}return e+=this.content(Object.assign(t,{onError:i&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].error&&(e+=r.getInterceptor(n)+".error("+t+");\n");return e+=i(t)},onResult:a&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].result&&(e+=r.getInterceptor(n)+".result("+t+");\n");return e+=a(t)},onDone:n&&function(){for(var t="",e=0;e<r.options.interceptors.length;e++)r.options.interceptors[e].done&&(t+=r.getInterceptor(e)+".done();\n");return t+=n()}}))}return this.content(t)},e.header=function(){var t="";return this.needContext()?t+="var _context = {};\n":t+="var _context;\n",t+="var _x = this._x;\n",0<this.options.interceptors.length&&(t+="var _taps = this.taps;\nvar _interceptors = this.interceptors;\n"),t},e.needContext=function(){for(var t,e=Lr(this.options.taps);!(t=e()).done;)if(t.value.context)return!0;return!1},e.callTap=function(t,e){for(var n=e.onError,r=e.onResult,i=e.onDone,a=e.rethrowIfPossible,o="",s=!1,l=0;l<this.options.interceptors.length;l++){var c=this.options.interceptors[l];c.tap&&(s||(o+="var _tap"+t+" = "+this.getTap(t)+";\n",s=!0),o+=this.getInterceptor(l)+".tap("+(c.context?"_context, ":"")+"_tap"+t+");\n")}o+="var _fn"+t+" = "+this.getTapFn(t)+";\n";var u=this.options.taps[t];switch(u.type){case"sync":a||(o=o+"var _hasError"+t+" = false;\ntry {\n"),o+=r?"var _result"+t+" = _fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n":"_fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n",a||(o=(o=(o=o+"} catch(_err) {\n_hasError"+t+" = true;\n")+n("_err"))+"}\nif(!_hasError"+t+") {\n"),r&&(o+=r("_result"+t)),i&&(o+=i()),a||(o+="}\n");break;case"async":var f=(f=(f="")+(r?"(function(_err"+t+", _result"+t+") {\n":"(function(_err"+t+") {\n")+("if(_err"+t+") {\n"))+n("_err"+t)+"} else {\n";r&&(f+=r("_result"+t)),i&&(f+=i()),o+="_fn"+t+"("+this.args({before:u.context?"_context":void 0,after:f=f+"}\n"+"})"})+");\n";break;case"promise":o=(o=(o=(o+="var _hasResult"+t+" = false;\n")+("var _promise"+t+" = _fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n"))+("if (!_promise"+t+" || !_promise"+t+".then)\n")+(" throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise"+t+" + ')');\n"))+("_promise"+t+".then((function(_result"+t+") {\n")+("_hasResult"+t+" = true;\n"),r&&(o+=r("_result"+t)),i&&(o+=i()),o=(o=o+("}), function(_err"+t+") {\n")+("if(_hasResult"+t+") throw _err"+t+";\n"))+n("_err"+t)+"});\n"}return o},e.callTapsSeries=function(t){var i=this,a=t.onError,o=t.onResult,e=t.resultReturns,s=t.onDone,n=t.doneReturns,l=t.rethrowIfPossible;if(0===this.options.taps.length)return s();for(var c=this.options.taps.findIndex(function(t){return"sync"!==t.type}),u=e||n,f="",h=s,d=0,r=function(){function e(t){return t?"":s()}var n=p,r=(h!==s&&("sync"!==i.options.taps[n].type||20<d++)&&(d=0,f=(f+="function _next"+n+"() {\n")+h()+"}\n",h=function(){return(u?"return ":"")+"_next"+n+"();\n"}),h),t=i.callTap(n,{onError:function(t){return a(n,t,r,e)},onResult:o&&function(t){return o(n,t,r,e)},onDone:!o&&r,rethrowIfPossible:l&&(c<0||n<c)});h=function(){return t}},p=this.options.taps.length-1;0<=p;p--)r();return f+=h()},e.callTapsLooping=function(t){var e=t.onError,n=t.onDone,t=t.rethrowIfPossible;if(0===this.options.taps.length)return n();var a=this.options.taps.every(function(t){return"sync"===t.type}),r="";a||(r+="var _looper = (function() {\nvar _loopAsync = false;\n");for(var r=(r+="var _loop;\n")+"do {\n"+"_loop = false;\n",i=0;i<this.options.interceptors.length;i++){var o=this.options.interceptors[i];o.loop&&(r+=this.getInterceptor(i)+".loop("+this.args({before:o.context?"_context":void 0})+");\n")}return r=r+this.callTapsSeries({onError:e,onResult:function(t,e,n,r){var i=(i="")+("if("+e+" !== undefined) {\n")+"_loop = true;\n";return a||(i+="if(_loopAsync) _looper();\n"),i=(i=i+r(!0)+"} else {\n")+n()+"}\n"},onDone:n&&function(){var t="";return(t+="if(!_loop) {\n")+n()+"}\n"},rethrowIfPossible:t&&a})+"} while(_loop);\n",a||(r+="_loopAsync = true;\n});\n_looper();\n"),r},e.callTapsParallel=function(t){var e=this,a=t.onError,o=t.onResult,s=t.onDone,l=t.rethrowIfPossible,t=t.onTap,c=void 0===t?function(t,e){return e()}:t;if(this.options.taps.length<=1)return this.callTapsSeries({onError:a,onResult:o,onDone:s,rethrowIfPossible:l});for(var u="",n=(u=(u+="do {\n")+("var _counter = "+this.options.taps.length+";\n"),s&&(u=(u+="var _done = (function() {\n")+s()+"});\n"),function(n){function r(){return s?"if(--_counter === 0) _done();\n":"--_counter;"}function i(t){return t||!s?"_counter = 0;\n":"_counter = 0;\n_done();\n"}u=(u+="if(_counter <= 0) break;\n")+c(n,function(){return e.callTap(n,{onError:function(t){var e="";return(e+="if(_counter > 0) {\n")+a(n,t,r,i)+"}\n"},onResult:o&&function(t){var e="";return(e+="if(_counter > 0) {\n")+o(n,t,r,i)+"}\n"},onDone:!o&&r,rethrowIfPossible:l})},r,i)}),r=0;r<this.options.taps.length;r++)n(r);return u+="} while(false);\n"},e.args=function(t){var t=void 0===t?{}:t,e=t.before,t=t.after,n=this._args;return e&&(n=[e].concat(n)),0===(n=t?n.concat(t):n).length?"":n.join(", ")},e.getTapFn=function(t){return"_x["+t+"]"},e.getTap=function(t){return"_taps["+t+"]"},e.getInterceptor=function(t){return"_interceptors["+t+"]"},t}();new(function(t){function e(){return t.apply(this,arguments)||this}return _r(e,t),e.prototype.content=function(t){var i=t.onError,t=t.onDone;return this.callTapsParallel({onError:function(t,e,n,r){return i(e)+r(!0)},onDone:t})},e}(n)),new(function(t){function e(){return t.apply(this,arguments)||this}return _r(e,t),e.prototype.content=function(t){var i=this,a=t.onError,e=t.onResult;return t.onDone,this.callTapsSeries({onError:function(t,e,n,r){return a(e)+r(!0)},onResult:function(t,e,n){var r="";return(r+="if("+e+" !== undefined) {\n")+(i._args[0]+" = "+e+";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])}})},e}(n)),new(function(t){function e(){return t.apply(this,arguments)||this}return _r(e,t),e.prototype.content=function(t){var n=t.onError,e=t.onDone,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onDone:e,rethrowIfPossible:t})},e}(n));new(function(t){function e(){return t.apply(this,arguments)||this}return _r(e,t),e.prototype.content=function(t){var i=this,n=t.onError,e=t.onResult,r=t.resultReturns,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onResult:function(t,e,n){var r="";return(r+="if("+e+" !== undefined) {\n")+(i._args[0]+" = "+e+";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])},doneReturns:r,rethrowIfPossible:t})},e}(n));var na=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],ra=/([\"\'])[^\'\"]+\1/;function ia(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");var n=Date.now(),e=16<(e=n-da)?0:16-e,r=la();return ha[r]=t,1<Object.keys(ha).length||setTimeout(function(){da=n;var e=ha;ha={},Object.keys(e).forEach(function(t){return e[t](fa())})},e),r}function aa(t){delete ha[t]}function oa(t){return"string"!=typeof t?ia:""===t?ca.requestAnimationFrame:ca[t+"RequestAnimationFrame"]}var sa=1,la=function(){return sa++},ca="object"==typeof self&&self.self==self?self:"object"==typeof j&&j.global==j?j:{},ua=Date.now(),fa=function(){return ca.performance&&"function"==typeof ca.performance.now?ca.performance.now():Date.now()-ua},ha={},da=Date.now(),r=function(t,e){for(var n=0;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}}(["","webkit","moz","ms","o"],oa),i=oa(r),r="string"!=typeof(n=r)?aa:""===n?ca.cancelAnimationFrame:ca[n+"CancelAnimationFrame"]||ca[n+"CancelRequestAnimationFrame"],pa=(ca.requestAnimationFrame=i,ca.cancelAnimationFrame=r,/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i),ga=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,ya=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,ma=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var va={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},ba=Fr(function(t){t="angular"===t.type?Number(t.value):va[t.value]||0;return ni(t,"deg")}),xa=Fr(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:ni(n,i),cy:ni(r,a)}}),wa=Fr(function(t){if(-1<t.indexOf("linear")||-1<t.indexOf("radial"))return _i(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!=(h=r[i-1].length)?h:{type:"%",value:"100"},1<i&&(r[0].length=null!=(h=r[0].length)?h:{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(!b(c)&&!b(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 f,h=t.map(function(t){return{offset:ni(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 Br(jr.LinearGradient,{angle:n?ba(n):Kr,steps:h}):"radial-gradient"===e&&"shape"===(n=n||[{type:"shape",value:"circle"}])[0].type&&"circle"===n[0].value?(e=(t=xa(n[0].at)).cx,t=t.cy,n[0].style&&(f=(n=n[0].style).type,n=n.value,f="extent-keyword"===f?Vr(n):ni(n,f)),new Br(jr.RadialGradient,{cx:e,cy:t,size:f,steps:h})):void 0});var e=t[0];if("("===t[1]||"("===t[2])if("l"===e){var n=pa.exec(t);if(n)return r=(null==(r=n[2].match(ma))?void 0:r.map(function(t){return t.split(":")}))||[],[new Br(jr.LinearGradient,{angle:ni(parseFloat(n[1]),"deg"),steps:r.map(function(t){var e=t[0],t=t[1];return{offset:ni(100*Number(e),"%"),color:t}})})]}else if("r"===e){n=function(t){var t=ga.exec(t);if(t)return t=(null==(t=t[4].match(ma))?void 0:t.map(function(t){return t.split(":")}))||[],{cx:ni(50,"%"),cy:ni(50,"%"),steps:t.map(function(t){var e=t[0],t=t[1];return{offset:ni(100*Number(e),"%"),color:t}})};return null}(t);if(n&&!qe(n))return[new Br(jr.RadialGradient,n)]}else if("p"===e){var r=t;if(r=ya.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 ka(t){return t&&!b(t.r)&&!b(t.g)&&!b(t.b)}var Ma=Fr(function(t){var e;return(e=t)&&e.image?Or({repetition:"repeat"},t):"transparent"===(t=b(t)?"":t)?ti:wa(t="currentColor"===t?"black":t)||(e=[0,0,0,0],null!==(t=En(t))&&(e[0]=t.r||0,e[1]=t.g||0,e[2]=t.b||0,e[3]=t.opacity),ei.apply(void 0,e))});function Oa(t,e){if(ka(t)&&ka(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(Ye(e[n],0,255));return e[3]=Ye(e[3],0,1),"rgba("+e.join(",")+")"}]}function _a(t,e){if(b(e))return ni(0,"px");if(e=(""+e).trim().toLowerCase(),isFinite(Number(e))){if(0<="px".search(t))return ni(Number(e),"px");if(0<="deg".search(t))return ni(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 ni(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)})[0]}var Sa=Fr(function(t){return _a(new RegExp("px","g"),t)}),Ea=(Fr(function(t){return _a(new RegExp("%","g"),t)}),function(t){return $e(t)||isFinite(Number(t))?ni(Number(t)||0,"px"):_a(new RegExp("px|%|em|rem","g"),t)}),Aa=Fr(function(t){return _a(new RegExp("deg|rad|grad|turn","g"),t)});function La(t){var e=0;return t.unit===s.kDegrees?e=t.value:t.unit===s.kRadians?e=fi(Number(t.value)):t.unit===s.kTurns&&(e=360*Number(t.value)),e}function Ta(t,e){var n;return Array.isArray(t)?n=t.map(function(t){return Number(t)}):qe(t)?n=t.split(" ").map(function(t){return Number(t)}):$e(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 Pa(t){return qe(t)?t.split(" ").map(function(t){return Ea(t)}):t.map(function(t){return Ea(t.toString())})}function Na(t,e,n){return 0===t.value?0:t.unit===s.kPixels?Number(t.value):t.unit===s.kPercentage&&n?(n=n.nodeName===x.GROUP?n.getLocalBounds():n.geometry.contentBounds,t.value/100*n.halfExtents[e]*2):0}var ja=function(t){return _a(/deg|rad|grad|turn|px|%/g,t)},Ca=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function Ra(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<Ca.indexOf(e[1])&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return ja(t)||Ma(t)})}),n.lastIndex===t.length)return r}return[]}function Ba(t){return t.toString()}var Ia=Fr(function(t){return"number"==typeof t?ni(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?ni(Number(t)):ni(0)});function Fa(t,e){return[t,e,Ba]}function Da(n,r){return function(t,e){return[t,e,function(t){return Ba(Ye(t,n,r))}]}}function za(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}Fr(function(t){return(qe(t)?t.split(" "):t).map(Ia)});var Wa=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=Zi(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=Kn.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 f=o.arcParams,u=lr.box(f.cx,f.cy,f.rx,f.ry,f.xRotation,f.startAngle,f.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}),h=He(n),d=He(r),p=Ge(n),g=Ge(r);if(0!==i.length)for(var y=0;y<i.length;y++){var m=i[y],v=m.currentPoint;v[0]===h?h-=$i(m,e).xExtra:v[0]===p&&(p+=$i(m,e).xExtra),v[1]===d?d-=$i(m,e).yExtra:v[1]===g&&(g+=$i(m,e).yExtra)}return{x:h,y:d,width:p-h,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}}},Ga=Fr(Wa);function Ha(t,e){t=(qe(t)?Ga:Wa)(t);return e&&(e.parsedStyle.defX=t.rect.x,e.parsedStyle.defY=t.rect.y),t}function Va(t,e,n){var r,i,a,o,s,l,c,u,f,h=t.curve,d=e.curve,t=(h&&0!==h.length||(h=Le(t.absolutePath,!1),t.curve=h),d&&0!==d.length||(d=Le(e.absolutePath,!1),e.curve=d),[h,d]),h=Pe((t=h.length!==d.length?function t(e,n,r){var i,e=Ne(e),n=Ne(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],f=[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&&f[n]&&t.l>=u[n],f[n]-=i?1:0,i?t.ss:[t.s]}).flat()});return r[0].length===r[1].length?r:t(r[0],r[1],c)}(h,d):t)[0])!==Pe(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))}))):se(t[0]);return[h,(i=t[1],a=h,c=i.length-1,u=[],f=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){f+=_e(i[(n+e)%c].slice(-2),a[e%c].slice(-2))}),u[n]=f,f=0}),d[u.indexOf(Math.min.apply(null,u))]),function(t){return t}]}function qa(t,e){var n,r,i=qe(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=hr.length(i),t=(i.forEach(function(t,e){i[e+1]&&((n=[0,0])[0]=o/s,r=Gn.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 Ya(t,e){return[t.points,e.points,function(t){return t}]}var $a=null;function Ua(t){return function(e){var n=0;return t.map(function(t){return t===$a?e[n++]:t})}}function Ka(t){return t}var Xa={matrix:["NNNNNN",[$a,$a,0,0,$a,$a,0,0,0,0,1,0,$a,$a,0,1],Ka],matrix3d:["NNNNNNNNNNNNNNNN",Ka],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",Ua([$a,$a,new $r(1)]),Ka],scalex:["N",Ua([$a,new $r(1),new $r(1)]),Ua([$a,new $r(1)])],scaley:["N",Ua([new $r(1),$a,new $r(1)]),Ua([new $r(1),$a])],scalez:["N",Ua([new $r(1),new $r(1),$a])],scale3d:["NNN",Ka],skew:["Aa",null,Ka],skewx:["A",null,Ua([$a,Kr])],skewy:["A",null,Ua([Kr,$a])],translate:["Tt",Ua([$a,$a,Ur]),Ka],translatex:["T",Ua([$a,Ur,Ur]),Ua([$a,Ur])],translatey:["T",Ua([Ur,$a,Ur]),Ua([Ur,$a])],translatez:["L",Ua([Ur,Ur,$a])],translate3d:["TTL",Ka]};function Za(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=Xa[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 f=s[u],h=l[u],d=void 0;if(void 0===(d=f?{A:function(t){return"0"===t.trim()?Kr:Aa(t)},N:Ia,T:Ea,L:Sa}[h.toUpperCase()](f):{a:Kr,n:c[0],t:Ur}[h]))return[];c.push(d)}if(r.push({t:a,d:c}),n.lastIndex===t.length)return r}return[]}function Qa(t){switch(t.t){case"rotatex":return i=ui(La(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=ui(La(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=ui(La(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=ui(La(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=ui(La(t.d[0])),a=ui(La(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=ui(La(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=ui(La(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=Na(t.d[0],0,null)||0,n=Na(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Na(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=Na(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=Na(t.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Na(t.d[0],0,null)||0,n=Na(t.d[1],0,null)||0,r=Na(t.d[2],0,null)||0,1];case"perspective":a=Na(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 Ja(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 to(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 bi(0===(t=t).length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(Qa).reduce(Ja),e,n,r,i,a),[[e,n,r,a,i]]}var eo=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],f=r[2],r=r[3],h=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],f=(h[0][0]=1-2*(u*u+f*f),h[0][1]=2*(c*u-f*r),h[0][2]=2*(c*f+u*r),h[1][0]=2*(c*u+f*r),h[1][1]=1-2*(c*c+f*f),h[1][2]=2*(u*f-c*r),h[2][0]=2*(c*f-u*r),h[2][1]=2*(u*f+c*r),h[2][2]=1-2*(c*c+u*u),a=no(a,h),[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]);n[2]&&(f[2][1]=n[2],a=no(a,f)),n[1]&&(f[2][1]=0,f[2][0]=n[0],a=no(a,f)),n[0]&&(f[2][0]=0,f[1][0]=n[0],a=no(a,f));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 no(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 ro(t){return t.toFixed(6).replace(".000000","")}function io(e,n){var r,i;return e.decompositionPair!==n&&(e.decompositionPair=n,r=to(e)),n.decompositionPair!==e&&(n.decompositionPair=e,i=to(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=Ye(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 eo(t[0],t[1],t[2],e,t[4]).map(ro).join(",")}])}function ao(t){return t.replace(/[xy]/,"")}function oo(t){return t.replace(/(x|y|z|3d)?$/,"3d")}var so=function(t,e){return"perspective"===t&&"perspective"===e||("matrix"===t||"matrix3d"===t)&&("matrix"===e||"matrix3d"===e)};function lo(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?ni(n):ni(n,t.unit)})})}()}var n=[],o=[],s=[];if(r.length!==i.length)var l=io(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,f=i[c].t,h=r[c].d,d=i[c].d,p=Xa[u],g=Xa[f],y=void 0;if(so(u,f)){var m=io([r[c]],[i[c]]);n.push(m[0]),o.push(m[1]),s.push(["matrix",[m[2]]])}else{if(u===f)y=u;else if(p[2]&&g[2]&&ao(u)===ao(f))y=ao(u),h=p[2](h),d=g[2](d);else{if(!p[1]||!g[1]||oo(u)!==oo(f)){m=io(r,i);n=[m[0]],o=[m[1]],s=[["matrix",[m[2]]]];break}y=oo(u),h=p[1](h),d=g[1](d)}for(var v=[],b=[],x=[],w=0;w<h.length;w++){var k=function(t,e,n,r,i){void 0===i&&(i=0);var a="",o=t.value||0,s=e.value||0,l=Hr(t.unit),c=t.convertTo(l),l=e.convertTo(l);return c&&l?(o=c.value,s=l.value,a=Pr(t.unit)):($r.isLength(t.unit)||$r.isLength(e.unit))&&(o=Na(t,i,n),s=Na(e,i,n),a="px"),[o,s,function(t){return(t=r?Math.max(t,0):t)+a}]}(h[w],d[w],t,!1,w);v[w]=k[0],b[w]=k[1],x.push(k[2])}n.push(v),o.push(b),s.push([y,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 co=Fr(function(t){var e;return qe(t)?"text-anchor"===t?[ni(0,"px"),ni(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:[Ea(uo(e[0])),Ea(uo(e[1]))]):[ni(t[0]||0,"px"),ni(t[1]||0,"px")]});function uo(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var n=function(){function t(){this.parser=Aa,this.parserWithCSSDisabled=null,this.mixer=Fa}return t.prototype.calculator=function(t,e,n,r){return La(n)},t}(),i=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){return n instanceof Ir&&(n=null),k.sceneGraphService.updateDisplayObjectDependency(t,e,n,r),"clipPath"===t&&r.forEach(function(t){0===t.childNodes.length&&k.sceneGraphService.dirtifyToRoot(t)}),n},t}(),r=function(){function t(){this.parser=Ma,this.parserWithCSSDisabled=Ma,this.mixer=Oa}return t.prototype.calculator=function(t,e,n,r){return n instanceof Ir?"none"===n.value?Jr:ti:n},t}(),fo=function(){function t(){this.parser=Ra}return t.prototype.calculator=function(t,e,n){return n instanceof Ir?[]:n},t}();function ho(t){t=t.parsedStyle.fontSize;return b(t)?null:t}function po(){this.parser=co}var go=function(){function t(){this.parser=Ea,this.parserWithCSSDisabled=null,this.mixer=Fa}return t.prototype.calculator=function(t,e,n,r,i){if($e(n))return n;if(!$r.isRelativeUnit(n.unit))return n.value;if(n.unit===s.kPercentage)return 0;if(n.unit===s.kEms){if(r.parentNode){var a=ho(r.parentNode);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}if(n.unit===s.kRems){if(null!=r&&null!=(a=r.ownerDocument)&&a.documentElement){a=ho(r.ownerDocument.documentElement);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}},t}(),yo=function(){function t(){this.mixer=za}var e=t.prototype;return e.parser=function(t){t=Pa($e(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}(),mo=function(){function t(){this.mixer=za}var e=t.prototype;return e.parser=function(t){t=Pa($e(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 x.CIRCLE:case x.ELLIPSE:var i=t.parsedStyle,a=i.cx,i=i.cy;b(a)||(l=a),b(i)||(c=i);break;case x.LINE:var a=t.parsedStyle,i=a.x1,o=a.x2,s=a.y1,a=a.y2,l=Math.min(i,o),c=Math.min(s,a),u=0;break;case x.RECT:case x.IMAGE:case x.GROUP:case x.HTML:case x.TEXT:case x.MESH:b(t.parsedStyle.x)||(l=t.parsedStyle.x),b(t.parsedStyle.y)||(c=t.parsedStyle.y)}t.nodeName!==x.PATH&&t.nodeName!==x.POLYLINE&&t.nodeName!==x.POLYGON&&(t.parsedStyle.defX=l||0,t.parsedStyle.defY=c||0),b(l)&&b(c)&&b(u)||-1!==e.indexOf("transform")||((e=t.parsedStyle.transform)&&e.length?ki(e,t):(n=(e=t.getLocalPosition())[0],r=e[1],e=e[2],t.setLocalPosition(b(l)?n:l,b(c)?r:c,b(u)?e:u)))},e}(go),bo=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n=null==(n=n=n instanceof Ir?null:n)?void 0:n.cloneNode(!0);return n&&(n.style.isMarker=!0),n},t}(),xo=function(){function t(){this.mixer=Fa,this.parser=Ia,this.parserWithCSSDisabled=null}return t.prototype.calculator=function(t,e,n){return n.value},t}(),wo=function(){function t(){this.parser=Ia,this.parserWithCSSDisabled=null,this.mixer=Da(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)!==x.LINE&&e!==x.PATH&&e!==x.POLYLINE||(e=r.getPoint(n))&&(t.parsedStyle.defX=e.x,t.parsedStyle.defY=e.y,t.setLocalPosition(e.x,e.y))},t}(),ko=function(){function t(){this.parser=Ia,this.parserWithCSSDisabled=null,this.mixer=Da(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),Mo=function(){function y(){this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}y.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]};var t=y.prototype;return t.update=function(t,e){ii(this.center,t),ii(this.halfExtents,e),ai(this.min,this.center,this.halfExtents),oi(this.max,this.center,this.halfExtents)},t.setMinMax=function(t,e){oi(this.center,e,t),si(this.center,this.center,.5),ai(this.halfExtents,e,t),si(this.halfExtents,this.halfExtents,.5),ii(this.min,t),ii(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,f,h,d,p,g;y.isEmpty(t)||(y.isEmpty(this)?this.setMinMax(t.getMin(),t.getMax()):(n=(e=this.center)[0],p=e[1],a=e[2],i=(r=this.halfExtents)[0],f=r[1],o=r[2],l=(h=t.center)[0],g=h[1],h=h[2],c=(t=t.halfExtents)[0],(d=g-(u=t[1]))<(s=p-f)&&(s=d),(d=p+f)<(p=g+u)&&(d=p),(g=h-(f=t[2]))<(u=a-o)&&(u=g),(p=a+o)<(t=h+f)&&(p=t),e[0]=.5*((a=(g=l-c)<(a=n-i)?g:a)+(o=(o=n+i)<(h=l+c)?h: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],f=e[2],h=e[6],d=e[10],p=Math.abs(a),g=Math.abs(o),y=Math.abs(s),m=Math.abs(l),v=Math.abs(c),b=Math.abs(u),x=Math.abs(f),w=Math.abs(h),k=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]+f*i[0]+h*i[1]+d*i[2],r[0]=p*t[0]+g*t[1]+y*t[2],r[1]=m*t[0]+v*t[1]+b*t[2],r[2]=x*t[0]+w*t[1]+k*t[2],ai(this.min,n,r),oi(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 y,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?ii([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?ii([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]]},y}(),Oo=function(){function t(t,e){this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||Ft(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 Vt(t,this.normal)-this.distance},e.normalize=function(){var t,e,n,r=1/Kt(this.normal);t=this.normal,e=this.normal,n=r,t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,this.distance*=r},e.intersectsLine=function(t,e,n){var r,i,a=this.distanceToPoint(t),a=a/(a-this.distanceToPoint(e)),o=0<=a&&a<=1;return o&&n&&(n=n,e=e,a=a,r=(t=t)[0],i=t[1],t=t[2],n[0]=r+a*(e[0]-r),n[1]=i+a*(e[1]-i),n[2]=t+a*(e[2]-t)),o},t}(),_o=(0,function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new Oo)}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],f=t[10],h=t[11],d=t[12],p=t[13],g=t[14],t=t[15];zt(this.planes[0].normal,i-e,l-a,h-c),this.planes[0].distance=t-d,zt(this.planes[1].normal,i+e,l+a,h+c),this.planes[1].distance=t+d,zt(this.planes[2].normal,i+n,l+o,h+u),this.planes[2].distance=t+p,zt(this.planes[3].normal,i-n,l-o,h-u),this.planes[3].distance=t-p,zt(this.planes[4].normal,i-r,l-s,h-f),this.planes[4].distance=t-g,zt(this.planes[5].normal,i+r,l+s,h+f),this.planes[5].distance=t+g,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})},t}()),So=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}(),Eo=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}(),Ao=function(){function t(){this.parser=Ha,this.parserWithCSSDisabled=Ha,this.mixer=Va}var e=t.prototype;return e.calculator=function(t,e,n){return n instanceof Ir&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Eo(0,0,0,0)}:n},e.postProcessor=function(t,e){var n;t.nodeName===x.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}(),Lo=function(){function t(){this.parser=qa,this.mixer=Ya}return t.prototype.postProcessor=function(t,e){var n;t.nodeName!==x.POLYGON&&t.nodeName!==x.POLYLINE||-1!==e.indexOf("transform")||(n=(e=t.parsedStyle).defX,e=e.defY,t.setLocalPosition(n,e))},t}(),To=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=Da(0,1/0),t}return _r(t,i),t}(go),Po=function(){function t(){}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Ir?"unset"===n.value?"":n.value:""+n},e.postProcessor=function(t){t.nodeValue=""+t.parsedStyle.text||""},t}(),No=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}(),jo=function(){function t(){this.parser=Za,this.parserWithCSSDisabled=Za,this.mixer=lo}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Ir?[]:n},e.postProcessor=function(t){ki(t.parsedStyle.transform,t)},t}(),Co=function(){function t(){this.parser=Ia}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}();var Ro,Bo,a=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 So,this.page=new So,this.canvas=new So,this.viewport=new So,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(ri)},Mr(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}(),Io=function(r){function t(t,e){var n=r.call(this,null)||this;return n.type=t,n.detail=e,Object.assign(Er(n),e),n}return _r(t,r),t}(a),Fo=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(ri)},t.lookupNamespaceURI=function(t){throw new Error(ri)},t.lookupPrefix=function(t){throw new Error(ri)},t.normalize=function(){throw new Error(ri)},t.isEqualNode=function(t){return this===t},t.isSameNode=function(t){return this.isEqualNode(t)},t.compareDocumentPosition=function(t){if(t===this)return 0;if(!(t instanceof d))throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");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,f=s[c],h=o[l+c];if(h!==f)return(u=f.parentNode.childNodes).indexOf(f)<u.indexOf(h)?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)})},Mr(d,[{key:"textContent",get:function(){var t="";this.nodeName===x.TEXT&&(t+=this.style.text);for(var e=Lr(this.childNodes);!(n=e()).done;){var n=n.value;n.nodeName===x.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===x.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}(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=Qe(n)&&n||Fe(n)&&n.capture,n=Fe(n)&&n.once,s=Wr(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=Wr(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=Qe(n)&&n||Fe(n)&&n.capture,i=Wr(e)?void 0:e;return e=Wr(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 Io(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}()),Do=(Fo.DOCUMENT_POSITION_DISCONNECTED=1,Fo.DOCUMENT_POSITION_PRECEDING=2,Fo.DOCUMENT_POSITION_FOLLOWING=4,Fo.DOCUMENT_POSITION_CONTAINS=8,Fo.DOCUMENT_POSITION_CONTAINED_BY=16,Fo.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,Ro=Ro||{},Ro[Ro.Standard=0]="Standard",(o=Bo=Bo||{}).REPARENT="reparent",o.DESTROY="destroy",o.ATTR_MODIFIED="DOMAttrModified",o.INSERTED="DOMNodeInserted",o.REMOVED="removed",o.MOUNTED="DOMNodeInsertedIntoDocument",o.UNMOUNTED="DOMNodeRemovedFromDocument",o.BOUNDS_CHANGED="bounds-changed",o.RENDER_ORDER_CHANGED="render-order-changed",o.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}(a)),zo=(Do.ADDITION=2,Do.MODIFICATION=1,Do.REMOVAL=3,0),Wo=new Do(Bo.INSERTED,null,"","","",0,"",""),Go=new Do(Bo.REMOVED,null,"","","",0,"",""),Ho=new Io(Bo.DESTROY),o=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=zo++,t.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1,proxyNodeName:void 0},t.cullable={strategy:Ro.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,lastSortedIndex:void 0,renderOrder: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=k.enableCSSParsing?{anchor:Zr,opacity:Zr,fillOpacity:Zr,strokeOpacity:Zr,fill:Zr,stroke:Zr,transform:Zr,transformOrigin:Zr,visibility:Zr,pointerEvents:Zr,lineWidth:Zr,lineCap:Zr,lineJoin:Zr,increasedLineWidthForHitTesting:Zr,fontSize:Zr,fontFamily:Zr,fontStyle:Zr,fontWeight:Zr,fontVariant:Zr,textAlign:Zr,textBaseline:Zr,textTransform:Zr,zIndex:Zr,filter:Zr,shadowType:Zr}: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(ri)},e.appendChild=function(t,e){if(t.destroyed)throw new Error("Cannot append a destroyed element.");return k.sceneGraphService.attach(t,this,e),null!=(e=this.ownerDocument)&&e.defaultView&&this.ownerDocument.defaultView.mountChildren(t),Wo.relatedNode=this,t.dispatchEvent(Wo),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 Go.relatedNode=this,t.dispatchEvent(Go),null!=(e=t.ownerDocument)&&e.defaultView&&t.ownerDocument.defaultView.unmountChildren(t),k.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 k.sceneGraphService.matches(t,this)},e.getElementById=function(t){return k.sceneGraphService.querySelector("#"+t,this)},e.getElementsByName=function(t){return k.sceneGraphService.querySelectorAll('[name="'+t+'"]',this)},e.getElementsByClassName=function(t){return k.sceneGraphService.querySelectorAll("."+t,this)},e.getElementsByTagName=function(t){return k.sceneGraphService.querySelectorAll(t,this)},e.querySelector=function(t){return k.sceneGraphService.querySelector(t,this)},e.querySelectorAll=function(t){return k.sceneGraphService.querySelectorAll(t,this)},e.closest=function(t){var e=this;do{if(k.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(Ho),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.getGeometryBounds=function(){return k.sceneGraphService.getGeometryBounds(this)},e.getRenderBounds=function(){return k.sceneGraphService.getBounds(this,!0)},e.getBounds=function(){return k.sceneGraphService.getBounds(this)},e.getLocalBounds=function(){return k.sceneGraphService.getLocalBounds(this)},e.getBoundingClientRect=function(){return k.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?k.enableCSSParsing?null:void 0:void 0===(e=this.attributes[t])&&(t=Yr(t),e=this.attributes[t],k.enableCSSParsing)&&b(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(ri)},e.getAttributeNode=function(t){throw new Error(ri)},e.getAttributeNodeNS=function(t,e){throw new Error(ri)},e.hasAttributeNS=function(t,e){throw new Error(ri)},e.removeAttributeNS=function(t,e){throw new Error(ri)},e.removeAttributeNode=function(t){throw new Error(ri)},e.setAttributeNS=function(t,e,n){throw new Error(ri)},e.setAttributeNode=function(t){throw new Error(ri)},e.setAttributeNodeNS=function(t){throw new Error(ri)},e.toggleAttribute=function(t,e){throw new Error(ri)},Mr(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}(Fo);var Vo,qo,Yo,$o=new Do(Bo.ATTR_MODIFIED,null,null,null,null,Do.MODIFICATION,null,null),Uo={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:""},Ko={anchor:[0,0],fill:Jr,stroke:Jr,transform:[],zIndex:0,filter:[],shadowType:"outer",miterLimit:10},Xo=Or({},Ko,{opacity:1,fillOpacity:1,strokeOpacity:1,visibility:"visible",pointerEvents:"auto",lineWidth:1,lineCap:"butt",lineJoin:"miter",increasedLineWidthForHitTesting:0,fillRule:"nonzero"}),Zo=[].concat(["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting"],["fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"]),Qo=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||x.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,k.enableCSSParsing?Ko:Xo,r.config.initialParsedStyle),k.enableCSSParsing&&Object.assign(r.attributes,Uo),r.initAttributes(r.config.style),k.globalThis.Proxy||function(){});return r.dataset=new t({},{get:function(t,e){e="data-"+Dr(e);return void 0!==t[e]?t[e]:r.getAttribute(e)},set:function(t,e,n){return r.setAttribute("data-"+Dr(e),n),!0}}),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}}),k.displayObjectPool.add(r.entity,Er(r)),r}_r(t,i);var e=t.prototype;return e.destroy=function(){i.prototype.destroy.call(this),k.displayObjectPool.remove(this.entity),this.getAnimations().forEach(function(t){t.cancel()})},e.cloneNode=function(e,t){var n,r,i=Or({},this.attributes);for(n in i){var a=i[n];null!=(r=a)&&r.nodeName&&"clipPath"!==n&&"offsetPath"!==n&&"textPath"!==n&&(i[n]=a.cloneNode(e)),t&&(i[n]=t(n,a))}var o=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:i});return o.setLocalTransform(this.getLocalTransform()),e&&this.children.forEach(function(t){t.style.isMarker||(t=t.cloneNode(e),o.appendChild(t))}),o},e.initAttributes=function(t){void 0===t&&(t={});var e=this.renderable,n={forceUpdateGeometry:!0};k.enableCSSParsing&&(n.usedAttributes=Zo),k.styleValueRegistry.processProperties(this,t,n),e.dirty=!0},e.setAttribute=function(t,e,n){void 0===n&&(n=!1);t=Yr(t);Je(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=(k.styleValueRegistry.processProperties(this,((o={})[t]=e,o),n),r.dirty=!0,this.parsedStyle[t]);this.isConnected&&($o.relatedNode=this,$o.prevValue=i,$o.newValue=e,$o.attrName=t,$o.prevParsedValue=a,$o.newParsedValue=o,this.isMutationObserved?this.dispatchEvent($o):($o.target=this).ownerDocument.defaultView.dispatchEvent($o,!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 Eo(n,e,r-n,t-e)},e.setOrigin=function(t,e,n){return k.sceneGraphService.setOrigin(this,ci(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.getOrigin=function(){return k.sceneGraphService.getOrigin(this)},e.setPosition=function(t,e,n){return k.sceneGraphService.setPosition(this,ci(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.setLocalPosition=function(t,e,n){return k.sceneGraphService.setLocalPosition(this,ci(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.translate=function(t,e,n){return k.sceneGraphService.translate(this,ci(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.translateLocal=function(t,e,n){return k.sceneGraphService.translateLocal(this,ci(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.getPosition=function(){return k.sceneGraphService.getPosition(this)},e.getLocalPosition=function(){return k.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=ci(t,e=e||t,n=n||t)),k.sceneGraphService.scaleLocal(this,t),this},e.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=ci(t,e=e||t,n=n||t)),k.sceneGraphService.setLocalScale(this,t),this},e.getLocalScale=function(){return k.sceneGraphService.getLocalScale(this)},e.getScale=function(){return k.sceneGraphService.getScale(this)},e.getEulerAngles=function(){return fi(hi(Bt(),k.sceneGraphService.getWorldTransform(this))[2])},e.getLocalEulerAngles=function(){return fi(hi(Bt(),k.sceneGraphService.getLocalRotation(this))[2])},e.setEulerAngles=function(t){return k.sceneGraphService.setEulerAngles(this,0,0,t),this},e.setLocalEulerAngles=function(t){return k.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},e.rotateLocal=function(t,e,n){return b(e)&&b(n)?k.sceneGraphService.rotateLocal(this,0,0,t):k.sceneGraphService.rotateLocal(this,t,e,n),this},e.rotate=function(t,e,n){return b(e)&&b(n)?k.sceneGraphService.rotate(this,0,0,t):k.sceneGraphService.rotate(this,t,e,n),this},e.setRotation=function(t,e,n,r){return k.sceneGraphService.setRotation(this,t,e,n,r),this},e.setLocalRotation=function(t,e,n,r){return k.sceneGraphService.setLocalRotation(this,t,e,n,r),this},e.setLocalSkew=function(t,e){return k.sceneGraphService.setLocalSkew(this,t,e),this},e.getRotation=function(){return k.sceneGraphService.getRotation(this)},e.getLocalRotation=function(){return k.sceneGraphService.getLocalRotation(this)},e.getLocalSkew=function(){return k.sceneGraphService.getLocalSkew(this)},e.getLocalTransform=function(){return k.sceneGraphService.getLocalTransform(this)},e.getWorldTransform=function(){return k.sceneGraphService.getWorldTransform(this)},e.setLocalTransform=function(t){return k.sceneGraphService.setLocalTransform(this,t),this},e.resetLocalTransform=function(){k.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?Fe(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=_t(Bt(),t),n=e[0],e=e[1],r=St(Bt(),t),i=r[0],r=r[1],t=Et(Qt(),t),t=hi(Bt(),t),a=t[0],t=t[2];return di(a||t,n,e,i,r)},e.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},e.setMatrix=function(t){var t=pi(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=pi(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(){k.enableCSSParsing?this.style.visibility="visible":this.forEach(function(t){t.style.visibility="visible"})},e.hide=function(){k.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},Mr(t,[{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}}]),t}(o),Jo={},ts=[],a=function(){function t(){}var e=t.prototype;return e.getByEntity=function(t){return Jo[t]},e.getAll=function(){return Object.keys(Jo).map(function(t){return Jo[t]})},e.add=function(t,e){(Jo[t]=e).nodeName===x.HTML&&ts.push(e)},e.remove=function(t){var e=Jo[t];e&&(delete Jo[t],e.nodeName===x.HTML)&&(t=ts.indexOf(e),ts.splice(t,1))},e.getHTMLs=function(){return ts},t}(),es={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Eo(0,0,0,0)},ns=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:c.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:c.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:c.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:c.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:c.PAINT},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:c.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:c.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:c.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:c.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:c.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:c.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:c.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:c.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:c.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:c.FILTER},{n:"clipPath",syntax:c.DEFINED_PATH},{n:"textPath",syntax:c.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:c.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===x.CIRCLE||t===x.ELLIPSE?"center":t===x.TEXT?"text-anchor":"left top"},l:!0,syntax:c.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===x.CIRCLE||t===x.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:c.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:c.COORDINATE},{n:"cy",int:!0,d:"0",syntax:c.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:c.COORDINATE},{n:"y",int:!0,d:"0",syntax:c.COORDINATE},{n:"z",int:!0,d:"0",syntax:c.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:c.COORDINATE},{n:"y1",int:!0,l:!0,syntax:c.COORDINATE},{n:"z1",int:!0,l:!0,syntax:c.COORDINATE},{n:"x2",int:!0,l:!0,syntax:c.COORDINATE},{n:"y2",int:!0,l:!0,syntax:c.COORDINATE},{n:"z2",int:!0,l:!0,syntax:c.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:c.PATH,p:50},{n:"points",int:!0,l:!0,syntax:c.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:c.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:c.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:c.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:c.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:c.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:c.NUMBER,d:function(t){return t===x.PATH||t===x.POLYGON||t===x.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:c.MARKER},{n:"markerEnd",syntax:c.MARKER},{n:"markerMid",syntax:c.MARKER},{n:"markerStartOffset",syntax:c.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:c.LENGTH,l:!0,int:!0,d:"0"}],rs=ns.filter(function(t){return!!t.l}).map(function(t){return t.n}),is={},as=new WeakMap,Fo=function(){function t(){var e=this;ns.forEach(function(t){e.registerMetadata(t)})}var e=t.prototype;return e.registerMetadata=function(e){[e.n].concat(e.a||[]).forEach(function(t){is[t]=e})},e.unregisterMetadata=function(t){delete is[t]},e.getPropertySyntax=function(t){return k.CSSPropertySyntaxFactory[t]},e.processProperties=function(n,r,t){var i=this;if(void 0===t&&(t={skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[]}),k.enableCSSParsing){var e=t,a=e.skipUpdateAttribute,o=e.skipParse,s=e.forceUpdateGeometry,e=e.usedAttributes,l=s,c=Object.keys(r);c.forEach(function(t){var e=Yr(t);a||(n.attributes[e]=r[t]),!l&&null!=(t=is[e])&&t.l&&(l=!0)}),o||c.forEach(function(t){n.computedStyle[t]=i.parseProperty(t,n.attributes[t],n)}),(c=null!=e&&e.length?Array.from(new Set(c.concat(e))):c).forEach(function(t){t in n.computedStyle&&(n.parsedStyle[t]=i.computeProperty(t,n.computedStyle[t],n))}),l&&this.updateGeometry(n),c.forEach(function(t){t in n.parsedStyle&&i.postProcessProperty(t,n,c)}),k.enableCSSParsing&&n.children.length&&c.forEach(function(e){e in n.parsedStyle&&i.isPropertyInheritable(e)&&n.children.forEach(function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})})})}else{r.src&&(r.img=r.src),r.d&&(r.path=r.d),r.strokeDasharray&&(r.lineDash=r.strokeDasharray),r.strokeWidth&&(r.lineWidth=r.strokeWidth),r.textAnchor&&(r.textAlign=r.textAnchor),Object.assign(n.attributes,r);var s=Object.keys(r),o=n.parsedStyle.clipPath,e=n.parsedStyle.offsetPath,u=(n.parsedStyle=Object.assign(n.parsedStyle,r),!!t.forceUpdateGeometry);if(!u)for(var f=0;f<rs.length;f++)if(rs[f]in r){u=!0;break}r.fill&&(n.parsedStyle.fill=Ma(r.fill)),r.stroke&&(n.parsedStyle.stroke=Ma(r.stroke)),r.shadowColor&&(n.parsedStyle.shadowColor=Ma(r.shadowColor)),r.filter&&(n.parsedStyle.filter=Ra(r.filter)),b(r.radius)||(n.parsedStyle.radius=Ta(r.radius,4)),b(r.lineDash)||(n.parsedStyle.lineDash=Ta(r.lineDash,2)),r.points&&(n.parsedStyle.points=qa(r.points,n)),""===r.path&&(n.parsedStyle.path=Or({},es)),r.path&&(n.parsedStyle.path=Ha(r.path,n)),r.textTransform&&k.CSSPropertySyntaxFactory["<text-transform>"].calculator(null,null,{value:r.textTransform},n,null),r.clipPath&&k.CSSPropertySyntaxFactory["<defined-path>"].calculator("clipPath",o,r.clipPath,n,this),r.offsetPath&&k.CSSPropertySyntaxFactory["<defined-path>"].calculator("offsetPath",e,r.offsetPath,n,this),r.anchor&&(n.parsedStyle.anchor=Ta(r.anchor,2)),r.transform&&(n.parsedStyle.transform=Za(r.transform)),r.transformOrigin&&(n.parsedStyle.transformOrigin=co(r.transformOrigin)),r.markerStart&&(n.parsedStyle.markerStart=k.CSSPropertySyntaxFactory["<marker>"].calculator(null,r.markerStart,r.markerStart,null,null)),r.markerEnd&&(n.parsedStyle.markerEnd=k.CSSPropertySyntaxFactory["<marker>"].calculator(null,r.markerEnd,r.markerEnd,null,null)),r.markerMid&&(n.parsedStyle.markerMid=k.CSSPropertySyntaxFactory["<marker>"].calculator("",r.markerMid,r.markerMid,null,null)),(n.nodeName!==x.CIRCLE&&n.nodeName!==x.ELLIPSE||b(r.cx)&&b(r.cy))&&(n.nodeName!==x.RECT&&n.nodeName!==x.IMAGE&&n.nodeName!==x.GROUP&&n.nodeName!==x.HTML&&n.nodeName!==x.TEXT&&n.nodeName!==x.MESH||b(r.x)&&b(r.y)&&b(r.z))&&(n.nodeName!==x.LINE||b(r.x1)&&b(r.y1)&&b(r.z1)&&b(r.x2)&&b(r.y2)&&b(r.z2))||k.CSSPropertySyntaxFactory["<coordinate>"].postProcessor(n,s),b(r.zIndex)||k.CSSPropertySyntaxFactory["<z-index>"].postProcessor(n,s),r.path&&k.CSSPropertySyntaxFactory["<path>"].postProcessor(n,s),r.points&&k.CSSPropertySyntaxFactory["<list-of-points>"].postProcessor(n,s),b(r.offsetDistance)||k.CSSPropertySyntaxFactory["<offset-distance>"].postProcessor(n,s),r.transform&&k.CSSPropertySyntaxFactory["<transform>"].postProcessor(n,s),u&&this.updateGeometry(n)}},e.parseProperty=function(t,e,n){var r,t=is[t],i=e;return"unset"===(e=""!==e&&!b(e)?e:"unset")||"initial"===e||"inherit"===e?i=Vr(e):t&&(r=t.k,t=(t=t.syntax)&&this.getPropertySyntax(t),r&&-1<r.indexOf(e)?i=Vr(e):t&&t.parser&&(i=t.parser(e,n))),i},e.computeProperty=function(t,e,n){var r=is[t],i="g-root"===n.id,a=e;if(r){var o=r.syntax,s=r.inh,r=r.d;if(e instanceof Ir){var l=e.value;if("initial"===(l="unset"===l?s&&!i?"inherit":"initial":l))b(r)||(e=this.parseProperty(t,Wr(r)?r(n.nodeName):r,n));else if("inherit"===l)return s=this.tryToResolveProperty(n,t,{inherited:!0}),b(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 Ir?e.value:e}return a},e.postProcessProperty=function(t,e,n){var t=is[t];t&&t.syntax&&(t=t.syntax&&this.getPropertySyntax(t.syntax))&&t.postProcessor&&t.postProcessor(e,n)},e.addUnresolveProperty=function(t,e){var n=as.get(t);n||(as.set(t,[]),n=as.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=as.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=as.get(e);t&&t.length&&(n={},t.forEach(function(t){n[t]=e.attributes[t]}),this.processProperties(e,n),as.delete(e))},e.updateGeometry=function(t){var s,e,n,r,i,a,o,l,c,u,f,h,d,p,g,y=t.nodeName,m=k.geometryUpdaterFactory[y];m&&((s=t.geometry).contentBounds||(s.contentBounds=new Mo),s.renderBounds||(s.renderBounds=new Mo),e=t.parsedStyle,n=(m=m.update(e,t)).width,r=m.height,f=void 0===(f=m.depth)?0:f,u=void 0===(u=m.offsetX)?0:u,p=void 0===(p=m.offsetY)?0:p,m=void 0===(m=m.offsetZ)?0:m,f=[Math.abs(n)/2,Math.abs(r)/2,f/2],l=e.stroke,c=e.lineWidth,g=e.increasedLineWidthForHitTesting,d=e.shadowType,h=e.shadowColor,i=void 0===(i=e.filter)?[]:i,a=e.transformOrigin,o=e.anchor,y===x.TEXT&&delete e.anchor,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))*f[2]+m],s.contentBounds.update(u,f),p=y===x.POLYLINE||y===x.POLYGON||y===x.PATH?Math.SQRT2:.5,l&&!l.isNone&&(f[0]+=m=((c||0)+(g||0))*p,f[1]+=m),s.renderBounds.update(u,f),h&&d&&"inner"!==d&&(l=(y=s.renderBounds).min,c=y.max,g=e.shadowBlur||0,p=e.shadowOffsetX||0,m=e.shadowOffsetY||0,u=l[0]-g+p,f=c[0]+g+p,h=l[1]-g+m,d=c[1]+g+m,l[0]=Math.min(l[0],u),c[0]=Math.max(c[0],f),l[1]=Math.min(l[1],h),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,oi(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,y=r<0,g=((p=n<0)?-1:1)*(a?Na(a[0],0,t):0),m=(y?-1:1)*(a?Na(a[1],1,t):0),g-=(p?-1:1)*(o&&o[0]||0)*s.contentBounds.halfExtents[0]*2,m-=(y?-1:1)*(o&&o[1]||0)*s.contentBounds.halfExtents[1]*2,t.setOrigin(g,m),k.sceneGraphService.dirtifyToRoot(t))},e.isPropertyInheritable=function(t){t=is[t];return!!t&&t.inh},t}();(o=Vo=Vo||{})[o.ORBITING=0]="ORBITING",o[o.EXPLORING=1]="EXPLORING",o[o.TRACKING=2]="TRACKING",(o=qo=qo||{})[o.DEFAULT=0]="DEFAULT",o[o.ROTATIONAL=1]="ROTATIONAL",o[o.TRANSLATIONAL=2]="TRANSLATIONAL",o[o.CINEMATIC=3]="CINEMATIC",(o=Yo=Yo||{})[o.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",o[o.PERSPECTIVE=1]="PERSPECTIVE";var os="updated",o=function(){function t(){this.canvas=void 0,this.eventEmitter=new wr,this.matrix=ft(),this.right=Ft(1,0,0),this.up=Ft(0,1,0),this.forward=Ft(0,0,1),this.position=Ft(0,0,1),this.focalPoint=Ft(0,0,0),this.distanceVector=Ft(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=ft(),this.projectionMatrixInverse=ft(),this.jitteredProjectionMatrix=void 0,this.view=void 0,this.enableUpdate=!0,this.type=Vo.EXPLORING,this.trackingMode=qo.DEFAULT,this.projectionMode=Yo.PERSPECTIVE,this.frustum=new _o,this.orthoMatrix=ft()}var e=t.prototype;return e.isOrtho=function(){return this.projectionMode===Yo.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===Vo.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===Vo.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},e.setProjectionMode=function(t){return this.projectionMode=t,this},e.setTrackingMode=function(t){if(this.type!==Vo.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 yt(ft(),this.matrix)},e.getWorldTransform=function(){return this.matrix},e.jitterProjectionMatrix=function(t,e){t=Mt(ft(),[t,e,0]);this.jitteredProjectionMatrix=vt(ft(),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===Yo.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===Yo.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===Yo.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===Yo.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===Yo.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===Yo.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=Ft(t.x-r,t.y-n,0),e=Vt(i,this.right)/It(this.right),r=Vt(i,this.up)/It(this.up);return this.pan(-e,-r),this},e.setPerspective=function(t,e,n,r){this.projectionMode=Yo.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,a,o,s,n=this.near*Math.tan(ui(.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,xt(this.projectionMatrix,this.projectionMatrix,Ft(1,-1,1)),yt(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},e.setOrthographic=function(t,e,n,r,i,a){this.projectionMode=Yo.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),Nt(this.projectionMatrix,s,n,r,e,i,a),xt(this.projectionMatrix,this.projectionMatrix,Ft(1,-1,1)),yt(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},e.setPosition=function(t,e,n){t=ci(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=Ft(0,1,0);return this.focalPoint=ci(t,e,n),this.trackingMode===qo.CINEMATIC&&(t=(r=Gt(Bt(),this.focalPoint,this.position))[0],e=r[1],n=r[2],r=It(r),e=fi(Math.asin(e/r)),r=90+fi(Math.atan2(n,t)),kt(n=ft(),n,ui(r)),wt(n,n,ui(e)),i=Yt(Bt(),[0,1,0],n)),yt(this.matrix,jt(ft(),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=Bt(),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=li(t),this.computeMatrix(),this._getAxes(),this.type===Vo.ORBITING||this.type===Vo.EXPLORING?this._getPosition():this.type===Vo.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getAzimuth=function(){return this.azimuth},e.setElevation=function(t){return this.elevation=li(t),this.computeMatrix(),this._getAxes(),this.type===Vo.ORBITING||this.type===Vo.EXPLORING?this._getPosition():this.type===Vo.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getElevation=function(){return this.elevation},e.setRoll=function(t){return this.roll=li(t),this.computeMatrix(),this._getAxes(),this.type===Vo.ORBITING||this.type===Vo.EXPLORING?this._getPosition():this.type===Vo.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=Jt(Qt(),[0,0,1],ui(this.roll)),e=(pt(this.matrix),Jt(Qt(),[1,0,0],ui((this.rotateWorld&&this.type!==Vo.TRACKING||this.type===Vo.TRACKING?1:-1)*this.elevation))),n=Jt(Qt(),[0,1,0],ui((this.rotateWorld&&this.type!==Vo.TRACKING||this.type===Vo.TRACKING?1:-1)*this.azimuth)),n=te(Qt(),n,e),n=te(Qt(),n,t),e=Lt(ft(),n);this.type===Vo.ORBITING||this.type===Vo.EXPLORING?(bt(this.matrix,this.matrix,this.focalPoint),vt(this.matrix,this.matrix,e),bt(this.matrix,this.matrix,[0,0,this.distance])):this.type===Vo.TRACKING&&(bt(this.matrix,this.matrix,this.position),vt(this.matrix,this.matrix,e))},e._setPosition=function(t,e,n){this.position=ci(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(){Dt(this.right,ci(Zt(Xt(),[1,0,0,0],this.matrix))),Dt(this.up,ci(Zt(Xt(),[0,1,0,0],this.matrix))),Dt(this.forward,ci(Zt(Xt(),[0,0,1,0],this.matrix))),Ht(this.right,this.right),Ht(this.up,this.up),Ht(this.forward,this.forward)},e._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=It(this.distanceVector);0===r?(this.elevation=0,this.azimuth=0):this.type===Vo.TRACKING||this.rotateWorld?(this.elevation=fi(Math.asin(e/r)),this.azimuth=fi(Math.atan2(-t,-n))):(this.elevation=-fi(Math.asin(e/r)),this.azimuth=-fi(Math.atan2(-t,-n)))},e._getPosition=function(){Dt(this.position,ci(Zt(Xt(),[0,0,0,1],this.matrix))),this._getDistance()},e._getFocalPoint=function(){var t,e;$t(this.distanceVector,[0,0,-this.distance],(t=J(),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)),Wt(this.focalPoint,this.position,this.distanceVector),this._getDistance()},e._getDistance=function(){this.distanceVector=Gt(Bt(),this.focalPoint,this.position),this.distance=It(this.distanceVector),this.dollyingStep=this.distance/100},e._getOrthoMatrix=function(){var t,e;this.projectionMode===Yo.ORTHOGRAPHIC&&(t=this.position,e=Jt(Qt(),[0,0,1],-this.roll*Math.PI/180),At(this.orthoMatrix,e,Ft((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),Ft(this.zoom,this.zoom,1),t))},e.triggerUpdate=function(){var t;this.enableUpdate&&(t=this.getViewTransform(),t=vt(ft(),this.getPerspective(),t),this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(os))},e.rotate=function(t,e,n){throw new Error(ri)},e.pan=function(t,e){throw new Error(ri)},e.dolly=function(t){throw new Error(ri)},e.createLandmark=function(t,e){throw new Error(ri)},e.gotoLandmark=function(t,e){throw new Error(ri)},e.cancelLandmarkAnimation=function(){throw new Error(ri)},t}(),ss=function(){function t(){}return t.prototype.update=function(t,e){t=t.r;return{width:2*t,height:2*t}},t}(),l=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),ls=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}(),cs=function(){function t(){}return t.prototype.update=function(t){t=t.path.rect;return{width:t.width,height:t.height}},t}(),us=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}(),fs=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&&!qe(n)&&(r||(r=n.width,t.width=r),i||(i=n.height,t.height=i)),{width:r,height:i}},t}(),hs=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&&!b(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=k.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}(),ds=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}(),ps=(0,/\[\s*(.*)=(.*)\s*\]/),gs=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(ps),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),!b(t))&&t.toString?t.toString():""},t}();function ys(t){t=t.renderable;t&&(t.renderBoundsDirty=!0,t.boundsDirty=!0)}var ms=new Do(Bo.REPARENT,null,"","","",0,"",""),vs=function(){function t(t){var o,i,a,r,s,l,c,u,f,n,h,d,g=this;this.runtime=void 0,this.pendingEvents=[],this.boundsChangedEvent=new Io(Bo.BOUNDS_CHANGED),this.rotate=(o=Qt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=Ft(e,n,r));var i,a,n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(ne(r=Qt(),e[0],e[1],e[2]),i=g.getRotation(t),a=g.getRotation(t.parentNode),ie(o,a),ee(o,o),te(r,o,r),te(n.localRotation,r,i),oe(n.localRotation,n.localRotation),g.dirtifyLocal(t,n)):g.rotateLocal(t,e)}),this.rotateLocal=(i=Qt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=Ft(e,n,r));n=t.transformable;ne(i,e[0],e[1],e[2]),ae(n.localRotation,n.localRotation,i),g.dirtifyLocal(t,n)}),this.setEulerAngles=(a=Qt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=Ft(e,n,r));n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(ne(n.localRotation,e[0],e[1],e[2]),r=g.getRotation(t.parentNode),ie(a,ee(Qt(),r)),ae(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=Ft(e,n,r));var i,a,o,s,l,c,u,f,h,d,p,n=t.transformable;Ut(e,Bt())||(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*(h=l*c-o*i),l=l*(f=s*i-l*u)-o*d,o=o*h-s*f,h*=s=2*a,d*=s,l*=2,o*=2,r[0]=c+(f*=s)+(p*=2),r[1]=u+h+l,r[2]=i+d+o,Wt(n.localPosition,n.localPosition,e),g.dirtifyLocal(t,n))},this.setPosition=(r=ft(),s=Bt(),function(t,e){var n=t.transformable;s[0]=e[0],s[1]=e[1],s[2]=e[2]||0,Ut(g.getPosition(t),s)||(Dt(n.position,s),null!==t.parentNode&&t.parentNode.transformable?(e=t.parentNode.transformable,ht(r,e.worldTransform),yt(r,r),Yt(n.localPosition,s,r)):Dt(n.localPosition,s),g.dirtifyLocal(t,n))}),this.setLocalPosition=(l=Bt(),function(t,e){var n=t.transformable;l[0]=e[0],l[1]=e[1],l[2]=e[2]||0,Ut(n.localPosition,l)||(Dt(n.localPosition,l),g.dirtifyLocal(t,n))}),this.translate=(c=Bt(),u=Bt(),f=Bt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),Ut(e="number"==typeof e?zt(u,e,n,r):e,c)||(Wt(f,g.getPosition(t),e),g.setPosition(t,f))}),this.setRotation=function(){var o=Qt();return function(t,e,n,r,i){var a=t.transformable;"number"==typeof e&&(e=re(e,n,r,i)),null!==t.parentNode&&t.parentNode.transformable?(n=g.getRotation(t.parentNode),ie(o,n),ee(o,o),te(a.localRotation,o,e),oe(a.localRotation,a.localRotation),g.dirtifyLocal(t,a)):g.setLocalRotation(t,e)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(n=ft(),h=Bt(),d=re(0,0,0,1),function(t){var e;0!==t.localSkew[0]||0!==t.localSkew[1]?(At(t.localTransform,t.localRotation,t.localPosition,Ft(1,1,1),t.origin),0===t.localSkew[0]&&0===t.localSkew[1]||((e=pt(n))[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),vt(t.localTransform,t.localTransform,e)),e=At(n,d,h,t.localScale,t.origin),vt(t.localTransform,t.localTransform,e)):At(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,b(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)&&(n.dirty=!0),t.transformable);e&&this.dirtifyWorld(t,e),e.frozen&&this.unfreezeParentToRoot(t),r&&t.dispatchEvent(ms)},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)&&(n.dirty=!0),-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=Ft(e,n,r));n=t.transformable;ne(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=Ft(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=Ft(e[0],e[1],e[2]||n.localScale[2]);Ut(e,n.localScale)||(Dt(n.localScale,e),this.dirtifyLocal(t,n))},e.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=re(e,n,r,i));n=t.transformable;ie(n.localRotation,e),this.dirtifyLocal(t,n)},e.setLocalSkew=function(t,e,n){"number"==typeof e&&(i=e,n=n,(r=new Q(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;)ys(n),n=n.parentNode;e&&t.forEach(function(t){ys(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 Do(Bo.ATTR_MODIFIED,t,n,n,e,Do.MODIFICATION,n,n)),t.isCustomElement&&t.isConnected&&t.attributeChangedCallback&&t.attributeChangedCallback(e,n,n)})})},e.getPosition=function(t){var e=t.transformable;return _t(e.position,this.getWorldTransform(t,e))},e.getRotation=function(t){var e=t.transformable;return Et(e.rotation,this.getWorldTransform(t,e))},e.getScale=function(t){var e=t.transformable;return St(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=_t(Bt(),e),r=Et(Qt(),e),e=St(Bt(),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 Mo.isEmpty(e)?null:((n=n||new Mo).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 Mo},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 Mo).update(t.center,t.halfExtents))}),e&&(t=function(t){var e,n=t;do{if(null==(e=n.parsedStyle)?void 0:e.clipPath)return n}while(null!==(n=n.parentElement));return null}(t))&&(t=t.parsedStyle.clipPath.getBounds(e),r?t&&(r=t.intersection(r)):r=t),(r=r||new Mo)&&(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=ft(),r=(t.parentNode.transformable&&(n=yt(ft(),this.getWorldTransform(t.parentNode))),this.getBounds(t));if(!Mo.isEmpty(r))return(e=new Mo).setFromTransformedAABB(r,n),e}return this.getBounds(t)},e.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t),i=(Mo.isEmpty(i)||(r=new Mo).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 Eo(e+((null==i?void 0:i.left)||0),t+((null==i?void 0:i.top)||0),n-e,r-t)):new Eo((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?vt(e.worldTransform,n.worldTransform,e.localTransform):ht(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}(),bs={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]},xs=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,ws=new RegExp(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source+"|"+/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹓﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source+"|"+/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source+"|"+/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source),ks=new RegExp(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source+"|"+/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source+"|"+/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source+"|"+/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source),Ms=function(){function t(t){var n=this;this.runtime=void 0,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,e){return!n.isBreakingSpace(e)&&!(!t||!ks.exec(e)&&!ws.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,bs.MetricsString+bs.BaselineSymbol),a=Math.ceil(e.measureText(i).width),o=Math.ceil(e.measureText(bs.BaselineSymbol).width),s=bs.HeightMultiplier*o,o=o*bs.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,f=0,h=!1,u=0;u<o;++u){for(var d=0;d<c;d+=4)if(255!==l[f+d]){h=!0;break}if(h)break;f+=c}for(n.ascent=o-u,f=r-c,h=!1,u=s;o<u;--u){for(var p=0;p<c;p+=4)if(255!==l[f+p]){h=!0;break}if(h)break;f-=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,f=(e.textPathSide,e.textPathStartOffset,e.leading),f=void 0===f?0:f,h=function(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,t=t.fontWeight,e=$e(e)&&e+"px"||"16px",a=n.split(","),o=a.length-1;0<=o;o--){var s=a[o].trim();!ra.test(s)&&na.indexOf(s)<0&&(s='"'+s+'"'),a[o]=s}return r+" "+i+" "+t+" "+e+" "+a.join(",")}(e),d=this.measureFont(h,n),p=(0===d.fontSize&&(d.fontSize=r,d.ascent=r),this.runtime.offscreenCanvas.getOrCreateContext(n));p.font=h,e.isOverflowing=!1;var g=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),y=new Array(g.length),m=0;if(!u){for(var v=0;v<g.length;v++){var b=p.measureText(g[v]).width+(g[v].length-1)*c;y[v]=b,m=Math.max(m,b)}var r=m+o,x=a||d.fontSize+o,i=Math.max(x,d.fontSize+o)+(g.length-1)*(x+f),w=0;return"middle"===s?w=-i/2:"bottom"===s||"alphabetic"===s||"ideographic"===s?w=-i:"top"!==s&&"hanging"!==s||(w=0),{font:h,width:r,height:i,lines:g,lineWidths:y,lineHeight:x+=f,maxLineWidth:m,fontProperties:d,lineMetrics:y.map(function(t,e){var n=0;return"center"===l||"middle"===l?n-=t/2:"right"!==l&&"end"!==l||(n-=t),new Eo(n-o/2,w+e*x,t+o,x)})}}u.getTotalLength();for(var k=0;k<g.length;k++)p.measureText(g[k]).width,g[k].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="",f=("ellipsis"===o?u="...":o&&"clip"!==o&&(u=o),[]),h=0,d=0,p={},g=function(t){return r.getFromCache(t,a,p,l)},y=Array.from(u).reduce(function(t,e){return t+g(e)},0),m=Array.from(t),v=0;v<m.length;v++){var b=m[v],x=t[v-1],w=t[v+1],k=g(b);if(this.isNewline(b)){if(s<=++h){e.isOverflowing=!0;break}d=0,f[h]=""}else{if(0<d&&c<d+k){if(s<=h+1){if(e.isOverflowing=!0,0<y&&y<=c){for(var M=f[h].length,O=0,_=M,S=0;S<M;S++){var E=g(f[h][S]);if(c<O+E+y){_=S;break}O+=E}f[h]=(f[h]||"").slice(0,_)+u}break}if(d=0,f[++h]="",this.isBreakingSpace(b))continue;this.canBreakInLastChar(b)||(f=this.trimToBreakable(f),d=this.sumTextWidthByCache(f[h]||"",p)),this.shouldBreakByKinsokuShorui(b,w)&&(f=this.trimByKinsokuShorui(f),d+=g(x||""))}d+=k,f[h]=(f[h]||"")+b}}return f.join("\n")},e.isBreakingSpace=function(t){return"string"==typeof t&&0<=bs.BreakingSpaces.indexOf(t.charCodeAt(0))},e.isNewline=function(t){return"string"==typeof t&&0<=bs.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||!xs.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(!xs.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}(),k={},ss=(fs=new fs,us=new us,(Gl={})[x.CIRCLE]=new ss,Gl[x.ELLIPSE]=new l,Gl[x.RECT]=fs,Gl[x.IMAGE]=fs,Gl[x.GROUP]=fs,Gl[x.LINE]=new ls,Gl[x.TEXT]=new hs(k),Gl[x.POLYLINE]=us,Gl[x.POLYGON]=us,Gl[x.PATH]=new cs,Gl[x.HTML]=null,Gl[x.MESH]=null,Gl),hs=(l=new r,fs=new go,(ls={})[c.PERCENTAGE]=null,ls[c.NUMBER]=new xo,ls[c.ANGLE]=new n,ls[c.DEFINED_PATH]=new i,ls[c.PAINT]=l,ls[c.COLOR]=l,ls[c.FILTER]=new fo,ls[c.LENGTH]=fs,ls[c.LENGTH_PERCENTAGE]=fs,ls[c.LENGTH_PERCENTAGE_12]=new yo,ls[c.LENGTH_PERCENTAGE_14]=new mo,ls[c.COORDINATE]=new vo,ls[c.OFFSET_DISTANCE]=new wo,ls[c.OPACITY_VALUE]=new ko,ls[c.PATH]=new Ao,ls[c.LIST_OF_POINTS]=new Lo,ls[c.SHADOW_BLUR]=new To,ls[c.TEXT]=new Po,ls[c.TEXT_TRANSFORM]=new No,ls[c.TRANSFORM]=new jo,ls[c.TRANSFORM_ORIGIN]=new po,ls[c.Z_INDEX]=new Co,ls[c.MARKER]=new bo,ls),us=(k.CameraContribution=o,k.AnimationTimeline=null,k.EasingFunction=null,k.offscreenCanvas=new ds,k.displayObjectPool=new a,k.sceneGraphSelector=new gs,k.sceneGraphService=new vs(k),k.textService=new Ms(k),k.geometryUpdaterFactory=ss,k.CSSPropertySyntaxFactory=hs,k.styleValueRegistry=new Fo,k.layoutRegistry=null,k.globalThis=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==j)return j;throw new Error("Unable to locate global `this`")}(),k.enableCSSParsing=!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}());function Os(){Os=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 h?e:h,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 M()}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")),f;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,f;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,f):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}(n,o);if(n){if(n===f)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===f)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 f={};function h(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(k([]))),y=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=h.prototype=Object.create(e));function m(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(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 k(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:M}}function M(){return{value:void 0,done:!0}}return c(y,"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(y),t},o.awrap=function(t){return{__await:t}},m(v.prototype),a(v.prototype,n,function(){return this}),o.AsyncIterator=v,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new v(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},m(y),a(y,i,"Generator"),a(y,r,function(){return this}),a(y,"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=k,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,f):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),f},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),f}},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:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},o}function _s(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 Ss(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){_s(r,e,n,i,a,"next",t)}function a(t){_s(r,e,n,i,a,"throw",t)}i(void 0)})}}function Es(){return(Es=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 As(t,e){return(As=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}x.CIRCLE,x.ELLIPSE,x.IMAGE,x.RECT,x.LINE,x.POLYLINE,x.POLYGON,x.TEXT,x.PATH,x.HTML,(cs=cg=cg||{}).READY="ready",cs.BEFORE_RENDER="beforerender",cs.RERENDER="rerender",cs.AFTER_RENDER="afterrender",cs.BEFORE_DESTROY="beforedestroy",cs.AFTER_DESTROY="afterdestroy",cs.RESIZE="resize",cs.DIRTY_RECTANGLE="dirtyrectangle",new Io(Bo.MOUNTED),new Io(Bo.UNMOUNTED),new Io(cg.BEFORE_RENDER),new Io(cg.RERENDER),new Io(cg.AFTER_RENDER);var Ls=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,f=u===p,h=f&&d.dragndropPluginOptions.isDocumentDraggable?p:u.closest&&u.closest("[draggable=true]");h&&(a=!1,o=t.timeStamp,s=[t.clientX,t.clientY],l=null,c=[t.clientX,t.clientY],e=function(){var e=Ss(Os().mark(function t(e){var n,r,i;return Os().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",h.dispatchEvent(e),a=!0;case 8:if(e.type="drag",e.dx=e.clientX-c[0],e.dy=e.clientY-c[1],h.dispatchEvent(e),c=[e.clientX,e.clientY],f){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",h.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,Ss(Os().mark(function t(){return Os().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}(),Ts=(Ls.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),As(r.prototype.constructor=r,t);var r=e.prototype;return r.init=function(){this.addRenderingPlugin(new Ls(Es({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}(us)),Ps=(Ns.prototype.on=function(t,e,n){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!n}),this},Ns.prototype.once=function(t,e){return this.on(t,e,!0)},Ns.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)},Ns.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},Ns.prototype.getEvents=function(){return this._events},Ns);function Ns(){this._events={}}const js=()=>[["cartesian"]],Cs=(js.props={},(t={})=>{var e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)}),Rs=t=>{var{startAngle:t,endAngle:e,innerRadius:n,outerRadius:r}=Cs(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",t,e,n,r]]},Bs=(Rs.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]]),Is=(Bs.props={},()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),Fs=(Is.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[...Is(),...Rs({startAngle:e,endAngle:t,innerRadius:n,outerRadius:r})]}),Ds=(Fs.props={},(t={})=>{var e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)}),zs=t=>{var{startAngle:t,endAngle:e,innerRadius:n,outerRadius:r}=Ds(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...Rs({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]},Ws=(zs.props={},()=>[["parallel",0,1,0,1]]),Gs=(Ws.props={},({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,visual:i=!1})=>[["fisheye",t,e,n,r,i]]),Hs=(Gs.props={transform:!0},t=>{var{startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1}=t;return[...Ws(),...Rs({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]}),Vs=(Hs.props={},({value:e})=>t=>t.map(()=>e)),qs=(Vs.props={},({value:e})=>t=>t.map(e)),Ys=(qs.props={},({value:e})=>t=>t.map(t=>t[e])),$s=(Ys.props={},({value:t})=>()=>t);function Us(t,e){return t.parent===e.parent?1:2}function Ks(t,e){return t+e.x}function Xs(t,e){return Math.max(t,e.y)}function Zs(){var s=Us,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(Ks,0)/e.length,t.y=1+n.reduce(Xs,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 Qs(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 Js(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=el)):void 0===e&&(e=tl);for(var n,r,i,a,o,t=new il(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 il(i[a])),r.parent=n,r.depth=n.depth+1;return t.eachBefore(rl)}function tl(t){return t.children}function el(t){return Array.isArray(t)?t[1]:null}function nl(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function rl(t){for(var e=0;t.height=e,(t=t.parent)&&t.height<++e;);}function il(t){this.data=t,this.depth=this.height=0,this.parent=null}function al(t){return null==t?null:ol(t)}function ol(t){if("function"!=typeof t)throw new Error;return t}function sl(){return 0}function ll(t){return function(){return t}}$s.props={},il.prototype=Js.prototype={constructor:il,count:function(){return this.eachAfter(Qs)},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 Js(this).eachBefore(nl)},[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 cl=4294967296;function ul(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&&hl(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 pl(t[0],t[1]);case 3:return gl(t[0],t[1],t[2])}}(o=function(t,e){var n,r;if(dl(e,t))return[e];for(n=0;n<t.length;++n)if(fl(e,t[n])&&dl(pl(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(fl(pl(t[n],t[r]),e)&&fl(pl(t[n],e),t[r])&&fl(pl(t[r],e),t[n])&&dl(gl(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}(o,n)),i=0);return r}function fl(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 hl(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 dl(t,e){for(var n=0;n<e.length;++n)if(!hl(t,e[n]))return;return 1}function pl(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 gl(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,f=i-o,h=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*f-c*h,g=(f*o-h*a)/(2*e)-r,s=(h*d-f*p)/e,l=(u*a-c*o)/(2*e)-i,n=(c*p-u*d)/e,h=s*s+n*n-1,f=2*(t+g*s+l*n),a=g*g+l*l-t*t,o=-(1e-6<Math.abs(h)?(f+Math.sqrt(f*f-4*h*a))/(2*h):a/f);return{x:r+g+s*o,y:i+l+n*o,r:o}}function yl(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 ml(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 vl(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 bl(t){this._=t,this.next=null,this.previous=null}function xl(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,f,h,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;yl(r,d,i=t[2]),d=new bl(d),r=new bl(r),i=new bl(i),((d.next=i.previous=r).next=d.previous=i).next=r.previous=d;t:for(l=3;l<a;++l){yl(d._,r._,i=t[l]),i=new bl(i),c=r.next,u=d.previous,f=r._.r,h=d._.r;do{if(f<=h){if(ml(c._,i._)){r=c,(d.next=r).previous=d,--l;continue t}f+=c._.r,c=c.next}else{if(ml(u._,i._)){((d=u).next=r).previous=d,--l;continue t}h+=u._.r,u=u.previous}}while(c!==u.next);for(i.previous=d,i.next=r,d.next=r.previous=r=i,o=vl(d);(i=i.next)!==r;)(s=vl(i))<o&&(d=i,o=s);r=d.next}for(d=[r._],i=r;(i=i.next)!==r;)d.push(i._);for(i=ul(d,e),l=0;l<a;++l)(d=t[l]).x-=i.x,d.y-=i.y;return i.r}function wl(t){return Math.sqrt(t.value)}function kl(){var n=null,r=1,i=1,a=sl;function e(t){var e=function(){let t=1;return()=>(t=(1664525*t+1013904223)%cl)/cl}();return t.x=r/2,t.y=i/2,n?t.eachBefore(Ml(n)).eachAfter(Ol(a,.5,e)).eachBefore(_l(1)):t.eachBefore(Ml(wl)).eachAfter(Ol(sl,1,e)).eachAfter(Ol(a,t.r/Math.min(r,i),e)).eachBefore(_l(Math.min(r,i)/(2*t.r))),t}return e.radius=function(t){return arguments.length?(n=al(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:ll(+t),e):a},e}function Ml(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Ol(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=xl(e,l),a)for(n=0;n<i;++n)e[n].r-=a;t.r=r+a}}}function _l(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 Sl(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 El(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 Al={depth:-1},Ll={},Tl={};function Pl(t){return t.id}function Nl(t){return t.parentId}function jl(){var y,m=Pl,v=Nl;function e(n){var e,t,r,i,a,o,s,l,c=Array.from(n),u=m,f=v,h=new Map;if(null!=y){const p=c.map((t,e)=>{t=y(t,e,n),e=(t=""+t).length;return"/"===(t=Rl(t,e-1)&&!Rl(t,e-2)?t.slice(0,-1):t)[0]?t:"/"+t}),g=p.map(Cl);var d=new Set(p).add("");for(const r of g)d.has(r)||(d.add(r),p.push(r),g.push(Cl(r)),c.push(Tl));u=(t,e)=>p[e],f=(t,e)=>g[e]}for(r=0,e=c.length;r<e;++r)t=c[r],o=c[r]=new il(t),null!=(s=u(t,r,n))&&(s+="")&&(l=o.id=s,h.set(l,h.has(l)?Ll:o)),null!=(s=f(t,r,n))&&(s+="")&&(o.parent=s);for(r=0;r<e;++r)if(s=(o=c[r]).parent){if(!(a=h.get(s)))throw new Error("missing: "+s);if(a===Ll)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!=y){for(;i.data===Tl&&1===i.children.length;)i=i.children[0],--e;for(let t=c.length-1;0<=t&&(o=c[t]).data===Tl;--t)o.data=null}if(i.parent=Al,i.eachBefore(function(t){t.depth=t.parent.depth+1,--e}).eachBefore(rl),i.parent=null,0<e)throw new Error("cycle");return i}return e.id=function(t){return arguments.length?(m=al(t),e):m},e.parentId=function(t){return arguments.length?(v=al(t),e):v},e.path=function(t){return arguments.length?(y=al(t),e):y},e}function Cl(t){let e=t.length;if(e<2)return"";for(;1<--e&&!Rl(t,e););return t.slice(0,e)}function Rl(e,n){if("/"===e[n]){let t=0;for(;0<n&&"\\"===e[--n];)++t;if(0==(1&t))return 1}}function Bl(t,e){return t.parent===e.parent?1:2}function Il(t){var e=t.children;return e?e[0]:t.t}function Fl(t){var e=t.children;return e?e[e.length-1]:t.t}function Dl(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 zl(){var h=Bl,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 Dl(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 Dl(r[i],i)),n.parent=e;return(t.parent=new Dl(null,0)).children=[t],t}(t);return s.eachAfter(f),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:h(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 f(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+h(t._,r._),t.m=t.z-e):t.z=e}else r&&(t.z=r.z+h(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,f=s.m;o=Fl(o),i=Il(i),o&&i;)s=Il(s),(a=Fl(a)).a=t,0<(r=o.z+u-i.z-l+h(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,f+=s.m,c+=a.m;o&&!Fl(a)&&(a.t=o,a.m+=u-c),i&&!Il(s)&&(s.t=i,s.m+=l-f,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?(h=t,e):h},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 Wl(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}Dl.prototype=Object.create(il.prototype);var Gl=(1+Math.sqrt(5))/2;function Hl(t,e,n,r,i,a){for(var o,s,l,c,u,f,h,d,p,g,y,m=[],v=e.children,b=0,x=0,w=v.length,k=e.value;b<w;){for(l=i-n,c=a-r;!(u=v[x++].value)&&x<w;);for(y=(f=h=u)*u*(g=Math.max(c/l,l/c)/(k*t)),p=Math.max(h/y,y/f);x<w;++x){if(u+=s=v[x].value,s<f&&(f=s),h<s&&(h=s),y=u*u*g,p<(d=Math.max(h/y,y/f))){u-=s;break}p=d}m.push(o={value:u,dice:l<c,children:v.slice(b,x)}),o.dice?El(o,n,r,i,k?r+=c*u/k:a):Wl(o,n,r,k?n+=l*u/k:i,a),k-=u,b=x}return m}var Vl=function e(a){function t(t,e,n,r,i){Hl(a,t,e,n,r,i)}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(Gl);function ql(t,e,n,r,i){var a,o,g=t.children,s=g.length,y=new Array(s+1);for(y[0]=o=a=0;a<s;++a)y[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=y[e],c=r/2+l,u=e+1,f=n-1;for(;u<f;){var h=u+f>>>1;y[h]<c?u=1+h:f=h}c-y[u-1]<y[u]-c&&e+1<u&&--u;var l=y[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 Yl(t,e,n,r,i){(1&t.depth?Wl:El)(t,e,n,r,i)}var $l=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,f=a.length,h=t.value;++u<f;){for(s=(o=a[u]).children,l=o.value=0,c=s.length;l<c;++l)o.value+=s[l].value;o.dice?El(o,e,n,r,h?n+=(i-n)*o.value/h:i):Wl(o,e,n,h?e+=(r-e)*o.value/h:r,i),h-=o.value}else t._squarify=a=Hl(d,t,e,n,r,i),a.ratio=d}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(Gl);function Ul(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 Kl(t={}){return[...Ul(t),{name:"title",scale:"identity"}]}function Xl(){return[{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["x","y"]}]}function Zl(){return[{type:"maybeTitle",channel:"x"},{type:"maybeTooltip",channel:["y"]}]}function Ql(t={}){return Ul(t)}function Jl(){return[{type:"maybeKey"}]}function tc(t,e){return t.getBandWidth(t.invert(e))}function ec(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:f=r,bandOffsetY:h=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?tc(l,a[e]):0;var r=p?tc(c,o[e]):0,e=g&&s?(tc(u,s[e])/2+ +s[e])*n:0,[t,i]=t;return[t+f*n+e,i+h*r]}:t=>t}function nc(t){return parseFloat(t)/100}function rc(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?nc(e)*o:+e,"string"==typeof t?nc(t)*s:+t]]})]}function ic(e){return"function"==typeof e?e:t=>t[e]}function ac(t,e){return Array.from(t,ic(e))}function oc(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=ac(t,e),o=ac(t,n),s=ac(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 sc(t,e){return t.getBandWidth(t.invert(e))}const lc=()=>(t,e,n,i)=>{const{x:a,y:o,y1:s,series:l,size:r}=n,c=e.x,u=e.series,[f]=i.getSize(),h=r?r.map(t=>+t/f):null,d=r?(t,e,n)=>{t+=e/2,e=h[n];return[t-e/2,t+e/2]}:(t,e,n)=>[t,t+e];return[t,Array.from(t,t=>{var e=sc(c,a[t]),n=e*(u?sc(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))})]};lc.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,channels:[...Kl({shapes:["rect","hollow","funnel","pyramid"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[...Jl(),{type:"maybeZeroY1"},{type:"maybeZeroX"}],postInference:[...Zl()],interaction:{shareTooltip:!0}};const cc=()=>(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 uc(t,e){return null==t||null==e?NaN:t<e?-1:e<t?1:e<=t?0:NaN}function fc(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=uc,o=(t,e)=>uc(n(t),e),(t,e)=>n(t)-e):(a=n===uc||n===function(t,e){return null==t||null==e?NaN:e<t?-1:t<e?1:t<=e?0:NaN}?n:hc,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 hc(){return 0}function*dc(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)}}cc.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,channels:[...Kl({shapes:["rect","hollow"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Jl(),{type:"maybeZeroY1"}],postInference:[...Zl()],interaction:{shareTooltip:!0}};r=fc(uc);const pc=r.right,gc=r.left,yc=fc(function(t){return null===t?NaN:+t}).center;function mc(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 vc(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 bc(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 xc{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 wc 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(kc(this,t))}has(t){return super.has(kc(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 kc({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):n}function Mc(t){return t}function Oc(t,...e){return Ec(t,Mc,Mc,e)}function _c(t,e,...n){return Ec(t,Mc,e,n)}function Sc(t,e,...n){return Ec(t,Array.from,e,n)}function Ec(t,u,f,h){return function t(e,n){if(n>=h.length)return f(e);var r=new wc,i=h[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 Ac(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=Tc(r[t],r[e]);if(n)return n}})):(n=e.map(n),t.sort((t,e)=>Tc(n[t],n[e]))),r=e,Array.from(t,t=>r[t])):e.sort(Lc(n))}function Lc(r=uc){if(r===uc)return Tc;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 Tc(t,e){return(null==t||!(t<=t))-(null==e||!(e<=e))||(t<e?-1:e<t?1:0)}var Pc=Array.prototype.slice;function Nc(t){return()=>t}const jc=Math.sqrt(50),Cc=Math.sqrt(10),Rc=Math.sqrt(2);function Bc(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>=jc?10:r>=Cc?5:r>=Rc?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?Bc(t,e,2*n):[a,o,s]}function Ic(t,e,n){return Bc(t=+t,e=+e,n=+n)[2]}function Fc(t){return Math.max(1,Math.ceil(Math.log(mc(t))/Math.LN2)+1)}function Dc(){var m=Mc,v=bc,b=Fc;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]=m(t[a],a,t);var o=v(i),s=o[0],l=o[1],c=b(i,s,l);if(!Array.isArray(c)){var o=l,u=+c;if(v===bc&&([s,l]=function(t,e,n){let r;for(;;){var i=Ic(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?Bc(e,t,n):Bc(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=Ic(s,l,u)),c[c.length-1]>=l)if(l<=o&&v===bc){const n=Ic(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 f=c.length,h=0,d=f;c[h]<=s;)++h;for(;c[d-1]>l;)--d;(h||d<f)&&(c=c.slice(h,d),f=d-h);var p,g,y=new Array(f+1);for(a=0;a<=f;++a)(p=y[a]=[]).x0=0<a?c[a-1]:s,p.x1=a<f?c[a]:l;if(isFinite(n)){if(0<n)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&y[Math.min(f,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),y[Math.min(f,g+(c[g]<=e))].push(t[a]))}else for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&y[pc(c,e,0,f)].push(t[a]);return y}return e.value=function(t){return arguments.length?(m="function"==typeof t?t:Nc(t),e):m},e.domain=function(t){return arguments.length?(v="function"==typeof t?t:Nc([t[0],t[1]]),e):v},e.thresholds=function(t){return arguments.length?(b="function"==typeof t?t:Nc(Array.isArray(t)?Pc.call(t):t),e):b},e}function zc(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 Wc(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 Gc(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 Hc(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 Vc(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?Tc:Lc(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),Vc(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,f=n[r];let t=i,e=a;for(qc(n,i,r),0<o(n[a],f)&&qc(n,i,a);t<e;){for(qc(n,t,e),++t,--e;o(n[t],f)<0;)++t;for(;0<o(n[e],f);)--e}0===o(n[i],f)?qc(n,i,e):qc(n,++e,a),e<=r&&(i=e+1),r<=e&&(a=e-1)}return n}function qc(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function Yc(t,e,n){var r;if((n=(t=Float64Array.from(dc(t,n))).length)&&!isNaN(e=+e))return e<=0||n<2?Gc(t):1<=e?zc(t):(n=(n-1)*e,(r=zc(Vc(t,e=Math.floor(n)).subarray(0,e+1)))+(Gc(t.subarray(e+1))-r)*(n-e))}function $c(r,t,i){if((i=(r=Float64Array.from(dc(r,i))).length)&&!isNaN(t=+t)){if(t<=0||i<2)return Hc(r);if(1<=t)return Wc(r);t=Math.floor((i-1)*t),i=Vc(Uint32Array.from(r,(t,e)=>e),t,0,i-1,(t,e)=>Tc(r[t],r[e]));{var i=i.subarray(0,t+1),a=t=>r[t];let e,n=!1;if(1===a.length){let t;for(const s of i){var o=a(s);(n?0<uc(o,t):0===uc(o,o))&&(e=s,t=o,n=!0)}}else for(const l of i)(n?0<a(l,e):0===a(l,l))&&(e=l,n=!0);return e}}}function Uc(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 Kc(t,e){return Yc(t,.5,e)}function Xc(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function Zc(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 Qc(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 Jc(t){t=t.getOptions().transformations;return t.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function tu(t){t=t.getOptions().transformations;return t.some(([t])=>"polar"===t)}function eu(t){t=t.getOptions().transformations;return t.some(([t])=>"reflect"===t)&&t.some(([t])=>t.startsWith("transpose"))}function nu(t){t=t.getOptions().transformations;return t.some(([t])=>"helix"===t)}function ru(t){t=t.getOptions().transformations;return t.some(([t])=>"parallel"===t)}function iu(t){t=t.getOptions().transformations;return t.some(([t])=>"fisheye"===t)}function au(t){return nu(t)||tu(t)}function ou(t){var t=t.getOptions()["transformations"],[,,,t,e]=t.find(t=>"polar"===t[0]);return[+t,+e]}function su(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 lu=(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(Oc(t,t=>a[t]).values()):[t],l=t.map(t=>t[0]);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]},cu=(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})]},uu=()=>(t,e,n,r)=>{return(ru(r)?cu:lu)(t,e,n,r)};uu.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,channels:[...Kl({shapes:["line","smooth"]}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[...Jl(),{type:"maybeSeries"},{type:"maybeGradient"}],postInference:[...Zl(),{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const fu=g=>(t,e,n,o)=>{const{x:r,y:i,x1:a,y1:s,size:l,dx:c,dy:u}=n,[f,h]=o.getSize(),d=ec(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/f,r=r/h,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))])]};fu.props={defaultShape:"hollow",defaultLabelShape:"label",composite:!1,channels:[...Kl({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:[...Jl(),{type:"maybeZeroY"},{type:"maybeZeroX"}],postInference:[{type:"maybeSize"},...Xl()]};const hu=s=>{const{cartesian:l=!1}=s;return l?rc:(t,e,n,r)=>{if(l)return rc(t,0,n,r);const{x:i,y:a}=n,o=ec(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};hu.props={defaultShape:"text",defaultLabelShape:"label",composite:!1,channels:[...Kl({shapes:["text","badge"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[...Jl(),{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...Xl()]};const du=()=>(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))})]};du.props={defaultShape:"cell",defaultLabelShape:"label",composite:!1,channels:[...Kl({shapes:["cell","hollow"]}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[...Jl(),{type:"maybeZeroX"},{type:"maybeZeroY"},{type:"maybeZeroPadding"}],postInference:[...Xl()]};const pu=()=>(t,e,n,a)=>{const{x:o,y:s,y1:l,series:r}=n;n=r?Array.from(Oc(t,t=>r[t]).values()):[t];return[n.map(t=>t[0]),Array.from(n,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],+s[i]]),r[n+t]=a.map([+o[i],+l[i]])}return r}),n]};pu.props={defaultShape:"area",defaultLabelShape:"label",composite:!1,channels:[...Kl({shapes:["area","smooth","hvh","hv","vh"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[...Jl(),{type:"maybeSeries"},{type:"maybeZeroY1"},{type:"maybeZeroPadding"}],postInference:[...Zl()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const gu=c=>(t,e,n,r)=>{const{x:i,y:a,x1:o=i,y1:s=a}=n,l=ec(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]};gu.props={defaultShape:"link",defaultLabelShape:"label",composite:!1,channels:[...Kl({shapes:["link","arc","vhv","smooth"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Jl(),{type:"maybeIdentityY"},{type:"maybeIdentityX"}],postInference:[...Xl()]};const yu=s=>{var t=s["cartesian"];return t?rc:(t,e,n,r)=>{const{x:i,y:a}=n,o=ec(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};yu.props={defaultShape:"image",defaultLabelShape:"label",composite:!1,channels:[...Kl({shapes:["image"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[...Jl(),{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...Xl()]};const mu=()=>(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]};mu.props={defaultShape:"polygon",defaultLabelShape:"label",composite:!1,channels:[...Kl({shapes:["polygon","ribbon"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Jl()],postInference:[...Xl()]};const vu=()=>(t,e,n,s)=>{const{x:l,y:c,y1:u,y2:f,y3:h,y4:d,series:p}=n,g=e.x,y=e.series;return[t,Array.from(t,t=>{var e=g.getBandWidth(g.invert(+l[t])),n=e*(y?y.getBandWidth(y.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],+f[t],+h[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))})]},bu=(vu.props={defaultShape:"box",defaultLabelShape:"label",composite:!1,channels:[...Kl({shapes:["box"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[...Jl(),{type:"maybeZeroX"}],postInference:[...Zl()],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]});bu.props={defaultShape:"vector",defaultLabelShape:"label",composite:!1,channels:[...Kl({shapes:["vector"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[...Jl()],postInference:[...Xl()]};const xu=()=>(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))})]};xu.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,channels:[...Ql({shapes:["line"]}),{name:"y",required:!0}],preInference:[...Jl(),{type:"maybeTupleY"}],postInference:[]};const wu=()=>(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))})]};wu.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,channels:[...Ql({shapes:["line"]}),{name:"x",required:!0}],preInference:[...Jl(),{type:"maybeTupleX"}],postInference:[]};const ku=(...t)=>gu(...t);function Mu(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 Ou(t={}){const{extendX:r=!1,extendY:s=!1}=t;return(t,e,n,i)=>{const a=Mu("x",r,n,e.x),o=Mu("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))})]}}ku.props={defaultShape:"connector",defaultLabelShape:"label",composite:!1,channels:[...Ql({shapes:["connector"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Jl()],postInference:[]};const _u=()=>Ou();_u.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,channels:[...Ql({shapes:["range"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Jl()],postInference:[]};const Su=()=>Ou({extendY:!0});Su.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,channels:[...Ql({shapes:["range"]}),{name:"x",required:!0}],preInference:[...Jl()],postInference:[]};const Eu=()=>Ou({extendX:!0});function Au(t){return t.target.depth}function Lu(t,e){return t.sourceLinks.length?t.depth:e-1}function Tu(t){return function(){return t}}function Pu(t,e){return ju(t.source,e.source)||t.index-e.index}function Nu(t,e){return ju(t.target,e.target)||t.index-e.index}function ju(t,e){return t.y0-e.y0}function Cu(t){return t.value}function Ru(t){return t.index}function Bu(t){return t.nodes}function Iu(t){return t.links}function Fu(t,e){t=t.get(e);if(t)return t;throw new Error("missing: "+e)}function Du({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 zu(){let x=0,w=0,k=1,M=1,O=24,_=8,S,E=Ru,A=Lu,L,T,P,N=Bu,j=Iu,C=6;function e(e){e={nodes:N(e),links:j(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=>[E(t),t]));if(t.forEach((t,e)=>{t.index=e;let{source:n,target:r}=t;"object"!=typeof n&&(n=t.source=Fu(g,n)),"object"!=typeof r&&(r=t.target=Fu(g,r)),n.sourceLinks.push(t),r.targetLinks.push(t)}),null!=P)for(var{sourceLinks:n,targetLinks:r}of i)n.sort(P),r.sort(P)}t=e.nodes;for(const y of t)y.value=void 0===y.fixedValue?Math.max(Qc(y.sourceLinks,Cu),Qc(y.targetLinks,Cu)):y.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(L){var s,l=Math.max(zc(a,t=>t.depth)+1,0);for(let t=0;t<a.length;t++)(s=a[t]).depth=L.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(zc(t,t=>t.depth)+1,0),n=(k-x-O)/(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+O,r[i]?r[i].push(a):r[i]=[a]}if(T)for(const o of r)o.sort(T);return r}(e),t=(S=Math.min(_,(M-w)/(zc(u,t=>t.length)-1)),u),f=Gc(t,t=>(M-w-(t.length-1)*S)/Qc(t,Cu));for(const m of t){let e=w;for(const v of m){v.y0=e,v.y1=e+v.value*f,e=v.y1+S;for(const b of v.sourceLinks)b.width=b.value*f}e=(M-e+S)/(m.length+1);for(let t=0;t<m.length;++t){var h=m[t];h.y0+=e*(t+1),h.y1+=e*(t+1)}!function(t){if(void 0===P)for(var{sourceLinks:e,targetLinks:n}of t)e.sort(Nu),n.sort(Pu)}(m)}for(let t=0;t<C;++t){var d=Math.pow(.99,t),p=Math.max(1-d,(t+1)/C);!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,B(c))}void 0===T&&o.sort(ju),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,B(c))}void 0===T&&o.sort(ju),o.length&&R(o,i)}}(u,d,p)}return Du(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,M,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 B({sourceLinks:t,targetLinks:e}){if(void 0===P){for(const{source:{sourceLinks:t}}of e)t.sort(Nu);for(const{target:{targetLinks:e}}of t)e.sort(Pu)}}return e.update=function(t){return Du(t),t},e.nodeId=function(t){return arguments.length?(E="function"==typeof t?t:Tu(t),e):E},e.nodeAlign=function(t){return arguments.length?(A="function"==typeof t?t:Tu(t),e):A},e.nodeDepth=function(t){return arguments.length?(L=t,e):L},e.nodeSort=function(t){return arguments.length?(T=t,e):T},e.nodeWidth=function(t){return arguments.length?(O=+t,e):O},e.nodePadding=function(t){return arguments.length?(_=S=+t,e):_},e.nodes=function(t){return arguments.length?(N="function"==typeof t?t:Tu(t),e):N},e.links=function(t){return arguments.length?(j="function"==typeof t?t:Tu(t),e):j},e.linkSort=function(t){return arguments.length?(P=t,e):P},e.size=function(t){return arguments.length?(x=w=0,k=+t[0],M=+t[1],e):[k-x,M-w]},e.extent=function(t){return arguments.length?(x=+t[0][0],k=+t[1][0],w=+t[0][1],M=+t[1][1],e):[[x,w],[k,M]]},e.iterations=function(t){return arguments.length?(C=+t,e):C},e}Eu.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,channels:[...Ql({shapes:["range"]}),{name:"y",required:!0}],preInference:[...Jl()],postInference:[]};const Wu={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},Gu={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?Gc(t.sourceLinks,Au)-1:0},justify:Lu};const Hu=f=>t=>{var{nodeId:e,nodeSort:n,nodeAlign:r,nodeWidth:i,nodePadding:a,nodeDepth:o,nodes:s,links:l,linkSort:c,iterations:u}=Object.assign({},Wu,f),l=zu().nodeSort(n).linkSort(c).links(l).nodes(s).nodeWidth(i).nodePadding(a).nodeDepth(o).nodeAlign("string"==(c=typeof(n=r))?Gu[n]||Lu:"function"==c?n:Lu).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 Vu(t){return t}function qu(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function Yu(t=""){throw new Error(t)}function $u(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 Uu(t){return null!=t&&!Number.isNaN(t)}function rt(t,e){return Ku(t,e)||{}}function Ku(t,n){t=Object.entries(t||{}).filter(([t])=>t.startsWith(n)).map(([t,e])=>[Xe(t.replace(n,"").trim()),e]).filter(([t])=>!!t);return 0===t.length?null:Object.fromEntries(t)}function Xu(t,e){return void 0===t?null:"number"==typeof t?t:(t=+t.replace("%",""),Number.isNaN(t)?null:t/100*e)}function Zu(t){return!("object"!=typeof t||t instanceof Date||null===t||Array.isArray(t))}function Qu(t){return null===t||!1===t}function Ju(t,e,n={},r=!1){return Qu(t)||Array.isArray(t)&&r?t:(r=rt(t,e),nt(n,r))}function tf(t,e={}){return!Qu(t)&&!Array.isArray(t)&&ef(t)?nt(e,t):t}function ef(t){var e;return 0===Object.keys(t).length||({title:t,items:e}=t,void 0!==t)||void 0!==e}function nf(t,e){return"object"==typeof t?rt(t,e):t}Hu.props={};const rf=v=>{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}},k={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={}}=v,{links:t,nodes:c}=oc(t,e),u=rt(e,"node"),e=rt(e,"link"),{key:f=t=>t.key,color:h=f}=u,{links:i,nodes:t}=Hu(Object.assign(Object.assign(Object.assign({},b),{nodeId:ic(f)}),i))({links:t,nodes:c});const d=rt(r,"label"),{text:p=f,spacing:g=5}=d,y=et(d,["text","spacing"]),m=ic(f);c=Ju(l,"node",{title:m,items:[{field:"value"}]},!0),f=Ju(l,"link",{title:"",items:[t=>({name:"source",value:m(t.source)}),t=>({name:"target",value:m(t.target)})]});return[nt({},x,{data:t,encode:Object.assign(Object.assign({},u),{color:h}),scale:n,style:rt(r,"node"),labels:[Object.assign(Object.assign(Object.assign({},k),{text:p,dx:t=>t.x[0]<.5?g:-g}),y),...a],tooltip:c,animate:nf(s,"node"),axis:!1}),nt({},w,{data:i,encode:e,labels:o,style:Object.assign({fill:e.color?void 0:"#aaa",strokeWidth:0},rt(r,"link")),tooltip:f,animate:nf(s,"link")})]}},af=(rf.props={},t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])]);af.props={defaultShape:"path",defaultLabelShape:"label",composite:!1,channels:[...Kl({shapes:["path","hollow"]}),{name:"d",scale:"identity"}],preInference:[...Jl()],postInference:[]};const of=t=>t?parseInt(t):0;function sf(t,e,n,r){var i;return e?(e=t,t=getComputedStyle(e),i=e.clientWidth||of(t.width),e=e.clientHeight||of(t.height),{width:(i={width:i-(of(t.paddingLeft)+of(t.paddingRight)),height:e-(of(t.paddingTop)+of(t.paddingBottom))}).width,height:i.height}):{width:n,height:r}}function lf(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:f=u,insetRight:h=u,insetTop:d=u,insetBottom:u=u}=t;return{width:e-r-i-s-l-f-h,height:t-a-n-c-o-d-u}}function cf(t,e,n){const r=n["value"];var o,i,a,s,l,c,u,f,h,d,n=function(t,e){var n={treemapBinary:ql,treemapDice:El,treemapSlice:Wl,treemapSliceDice:Yl,treemapSquarify:Vl,treemapResquarify:$l};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?jl().path(p):jl():Js)(t));function g(t){return t.x0=t.y0=0,t.x1=a,t.y1=s,t.eachBefore(y),l=[0],i&&t.eachBefore(Sl),t}function y(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-=f(t)-e)<n&&(n=i=(n+i)/2),(a-=h(t)-e)<r&&(r=a=(r+a)/2),o(t,n,r,i,a))}return r?p.sum(t=>e.ignoreParentValue&&t.children?0:ic(r)(t)).sort(e.sort):p.count(),o=Vl,i=!1,s=a=1,l=[0],d=h=f=u=c=sl,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=ol(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:ll(+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:ll(+t),g):u},g.paddingRight=function(t){return arguments.length?(f="function"==typeof t?t:ll(+t),g):f},g.paddingBottom=function(t){return arguments.length?(h="function"==typeof t?t:ll(+t),g):h},g.paddingLeft=function(t){return arguments.length?(d="function"==typeof t?t:ll(+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 uf=f=>t=>{var{width:t,height:e}=lf(t),{data:n,encode:r={},scale:i,style:a={},layout:o={},labels:s=[],tooltip:l={}}=f,c=et(f,["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=cf(n,nt({},u,o),r),n=rt(a,"label");return[nt({},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:tf(l,{title:t=>t.data.name,items:[{field:"value"}]}),axis:!1}))]},ff=(uf.props={},f=>t=>{var{width:t,height:e}=lf(t),{data:n,encode:r={},scale:i={},style:a={},layout:o={},labels:s=[],tooltip:l={}}=f,c=et(f,["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=(Ie(t)?jl().path(e.path):Js)(t);return r?n.sum(t=>ic(r)(t)).sort(e.sort):n.count(),kl().size(e.size).padding(e.padding)(n),n.descendants()})(n,nt({},{size:[t,e],padding:0,sort:(t,e)=>e.value-t.value},o),nt({},u.encode,r)),t=rt(a,"label");return[nt({},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:tf(l,{title:t=>t.data.name,items:[{field:"value"}]}),axis:!1}))]});function hf(t,e){return Gc(t,t=>e[t])}function df(t,e){return zc(t,t=>e[t])}function pf(t,e){const n=2.5*gf(t,e)-1.5*mf(t,e);return Gc(t,t=>e[t]>=n?e[t]:NaN)}function gf(t,e){return Yc(t,.25,t=>e[t])}function yf(t,e){return Yc(t,.5,t=>e[t])}function mf(t,e){return Yc(t,.75,t=>e[t])}function vf(t,e){const n=2.5*mf(t,e)-1.5*gf(t,e);return zc(t,t=>e[t]<=n?e[t]:NaN)}function bf(){return(t,e)=>{var n=e["encode"],{y:n,x:r}=n;const i=n["value"],a=r["value"];return[Array.from(Oc(t,t=>a[+t]).values()).flatMap(t=>{const e=pf(t,i),n=vf(t,i);return t.filter(t=>i[t]<e||i[t]>n)}),e]}}ff.props={};const xf=f=>()=>{var t,{data:e,encode:n,style:r={},tooltip:i={},animate:a}=f,o=et(f,["data","encode","style","tooltip","transform","animate"]),{point:s=!0}=r,r=et(r,["point"]),l=n["y"],l={y:l,y1:l,y2:l,y3:l,y4:l},c={y1:gf,y2:yf,y3:mf},u=Ju(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=Ju(i,"point",{title:{channel:"x"},items:[{name:"outlier",channel:"y"}]});return s?(s=rt(r,"box"),t=rt(r,"point"),[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:pf},c),{y4:vf})],encode:Object.assign(Object.assign({},n),l),style:s,tooltip:u,animate:nf(a,"box")},o),{type:"point",data:e,transform:[{type:bf}],encode:n,style:Object.assign({},t),tooltip:i,animate:nf(a,"point")}]):[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:hf},c),{y4:df})],encode:Object.assign(Object.assign({},n),l),style:r,tooltip:u},o)]},wf=(xf.props={},s=>{var t=s["cartesian"];return t?rc:(t,e,n,r)=>{const{x:i,y:a}=n,o=ec(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}});function kf(t,e,n,r){if(!isNaN(e)&&!isNaN(n)){var i,a,o,s,l,c,u,f,h,d=t._root,p={data:r},g=t._x0,y=t._y0,m=t._x1,v=t._y1;if(d){for(;d.length;)if((c=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+v)/2))?y=o:v=o,!(d=(i=d)[f=u<<1|c]))return i[f]=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[f]=p:t._root=p;else{for(;i=i?i[f]=new Array(4):t._root=new Array(4),(c=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+v)/2))?y=o:v=o,(f=u<<1|c)==(h=(o<=l)<<1|a<=s););i[h]=d,i[f]=p}}else t._root=p}return t}function Mf(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function Of(t){return t[0]}function _f(t){return t[1]}function Sf(t,e,n){e=new Ef(null==e?Of:e,null==n?_f:n,NaN,NaN,NaN,NaN);return null==t?e:e.addAll(t)}function Ef(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 Af(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}wf.props={defaultShape:"shape",defaultLabelShape:"label",composite:!1,channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Jl(),{type:"maybeTuple"},{type:"maybeVisualPosition"},{type:"maybeFunctionAttribute"}]};go=Sf.prototype=Ef.prototype;function Lf(t){return function(){return t}}function Tf(t){return 1e-6*(t()-.5)}function Pf(t){return t.index}function Nf(t,e){t=t.get(e);if(t)return t;throw new Error("node not found: "+e)}function jf(c){var u,f,a,o,h,d,s=Pf,n=function(t){return 1/Math.min(o[t.source.index],o[t.target.index])},r=Lf(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||Tf(d),o=i.y+i.vy-r.y-r.vy||Tf(d),a*=s=((s=Math.sqrt(a*a+o*o))-f[l])/s*t*u[l],o*=s,i.vx-=a*(s=h[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=Nf(r,t.source)),"object"!=typeof t.target&&(t.target=Nf(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,h=new Array(n);i<n;++i)t=c[i],h[i]=o[t.source.index]/(o[t.source.index]+o[t.target.index]);u=new Array(n),l(),f=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)f[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:Lf(+t),l(),e):n},e.distance=function(t){return arguments.length?(r="function"==typeof t?t:Lf(+t),g(),e):r},e}go.copy=function(){var t,e,n=new Ef(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]=Af(e));else n._root=Af(r);return n},go.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return kf(this.cover(e,n),e,n,t)},go.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)kf(this,i[u],a[u],t[u]);return this},go.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},go.data=function(){var e=[];return this.visit(function(t){if(!t.length)for(;e.push(t.data),t=t.next;);}),e},go.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]]},go.find=function(t,e,n){var r,i,a,o,s,l,c,u,f=this._x0,h=this._y0,d=this._x1,p=this._y1,g=[],y=this._root;for(y&&g.push(new Mf(y,f,h,d,p)),null==n?n=1/0:(f=t-n,h=e-n,d=t+n,p=e+n,n*=n);r=g.pop();)!(y=r.node)||(s=r.x0)>d||(l=r.y0)>p||(o=r.x1)<f||(i=r.y1)<h||(y.length?(g.push(new Mf(y[3],a=(s+o)/2,c=(l+i)/2,o,i),new Mf(y[2],s,c,a,i),new Mf(y[1],a,l,o,c),new Mf(y[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,y.data))*o+(s=e-+this._y.call(null,y.data))*s)<n&&(f=t-(c=Math.sqrt(n=l)),h=e-c,d=t+c,p=e+c,u=y.data));return u},go.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,f,h=this._root,d=this._x0,p=this._y0,g=this._x1,y=this._y1;if(h){if(h.length)for(;;){if((l=a>=(s=(d+g)/2))?d=s:g=s,(c=o>=(s=(p+y)/2))?p=s:y=s,!(h=(e=h)[u=c<<1|l]))return this;if(!h.length)break;(e[u+1&3]||e[u+2&3]||e[u+3&3])&&(n=e,f=u)}for(;h.data!==t;)if(!(h=(r=h).next))return this;(i=h.next)&&delete h.next,r?i?r.next=i:delete r.next:e?(i?e[u]=i:delete e[u],(h=e[0]||e[1]||e[2]||e[3])&&h===(e[3]||e[2]||e[1]||e[0])&&!h.length&&(n?n[f]=h:this._root=h)):this._root=i}}return this},go.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},go.root=function(){return this._root},go.size=function(){var e=0;return this.visit(function(t){if(!t.length)for(;++e,t=t.next;);}),e},go.visit=function(t){var e,n,r,i,a,o,s,l=[],c=this._root;for(c&&l.push(new Mf(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 Mf(e,o,s,i,a)),(e=c[2])&&l.push(new Mf(e,n,s,o,a)),(e=c[1])&&l.push(new Mf(e,o,r,i,s)),e=c[0])&&l.push(new Mf(e,n,r,o,s));return this},go.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new Mf(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i,a,o,s,l,c,u,f=e.node;f.length&&(a=e.x0,o=e.y0,c=(a+(s=e.x1))/2,u=(o+(l=e.y1))/2,(i=f[0])&&n.push(new Mf(i,a,o,c,u)),(i=f[1])&&n.push(new Mf(i,c,o,s,u)),(i=f[2])&&n.push(new Mf(i,a,u,c,l)),i=f[3])&&n.push(new Mf(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},go.x=function(t){return arguments.length?(this._x=t,this):this._x},go.y=function(t){return arguments.length?(this._y=t,this):this._y};var Cf={value:()=>{}};function Rf(){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 Bf(r)}function Bf(t){this._=t}function If(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Cf,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Bf.prototype=Rf.prototype={constructor:Bf,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]=If(i[n],t.name,e);else if(null==e)for(n in i)i[n]=If(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 Bf(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 Ff,Df,zf=0,Wf=0,Gf=0,Hf=1e3,Vf=0,qf=0,Yf=0,$f="object"==typeof performance&&performance.now?performance:Date,Uf="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Kf(){return qf||(Uf(Xf),qf=$f.now()+Yf)}function Xf(){qf=0}function Zf(){this._call=this._time=this._next=null}function Qf(t,e,n){var r=new Zf;return r.restart(t,e,n),r}function Jf(){qf=(Vf=$f.now())+Yf,zf=Wf=0;try{Kf(),++zf;for(var t,e=Ff;e;)0<=(t=qf-e._time)&&e._call.call(void 0,t),e=e._next;--zf}finally{for(var n,r,i=Ff,a=1/(zf=0);i;)i=i._call?(a>i._time&&(a=i._time),(n=i)._next):(r=i._next,i._next=null,n?n._next=r:Ff=r);Df=n,eh(a),qf=0}}function th(){var t=$f.now(),e=t-Vf;Hf<e&&(Yf-=e,Vf=t)}function eh(t){zf||(Wf=Wf&&clearTimeout(Wf),24<t-qf?(t<1/0&&(Wf=setTimeout(Jf,t-$f.now()-Yf)),Gf=Gf&&clearInterval(Gf)):(Gf||(Vf=$f.now(),Gf=setInterval(th,Hf)),zf=1,Uf(Jf)))}Zf.prototype=Qf.prototype={constructor:Zf,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Kf():+n)+(null==e?0:+e),this._next||Df===this||(Df?Df._next=this:Ff=this,Df=this),this._call=t,this._time=n,eh()},stop:function(){this._call&&(this._call=null,this._time=1/0,eh())}};const nh=4294967296;function rh(t){return t.x}function ih(t){return t.y}var ah=10,oh=Math.PI*(3-Math.sqrt(5));function sh(l){var a,o=1,e=.001,s=1-Math.pow(e,1/300),c=0,u=.6,f=new Map,t=Qf(i),n=Rf("tick","end"),r=function(){let t=1;return()=>(t=(1664525*t+1013904223)%nh)/nh}();function i(){h(),n.call("tick",a),o<e&&(t.stop(),n.call("end",a))}function h(t){var e,n,r=l.length;void 0===t&&(t=1);for(var i=0;i<t;++i)for(o+=(c-o)*s,f.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=ah*Math.sqrt(.5+r),e=r*oh,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:h,restart:function(){return t.restart(i),a},stop:function(){return t.stop(),a},nodes:function(t){return arguments.length?(l=t,d(),f.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,f.forEach(p),a):r},force:function(t,e){return 1<arguments.length?(null==e?f.delete(t):f.set(t,p(e)),a):f.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 lh(t,e,n){var i,l,c,u,f,r,h,d,p,{nodes:t,links:a}=t,{joint:e,nodeStrength:o,linkStrength:s}=e,{linkKey:n=t=>t.id}=n,B=(r=Lf(-30),d=(h=1)/0,p=.81,g.initialize=function(t,e){i=t,c=e,I()},g.strength=function(t){return arguments.length?(r="function"==typeof t?t:Lf(+t),I(),g):r},g.distanceMin=function(t){return arguments.length?(h=t*t,g):Math.sqrt(h)},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=Sf(i,rh,ih).visitAfter(F);for(u=t,e=0;e<n;++e)l=i[e],r.visit(D)}function I(){if(i){var t,e,n=i.length;for(f=new Array(n),t=0;t<n;++t)e=i[t],f[e.index]=+r(e,t,i)}}function F(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+=f[e.data.index],e=e.next;);t.value=o}function D(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=Tf(c))*i),0===a&&(s+=(a=Tf(c))*a),s<h&&(s=Math.sqrt(h*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=Tf(c))*i),0===a&&(s+=(a=Tf(c))*a),s<h)&&(s=Math.sqrt(h*s));t.data!==l&&(o=f[t.data.index]*u/s,l.vx+=i*o,l.vy+=a*o),t=t.next;);}var y,m,v,b,x,w,k,M,O,_,S,E,A,L,n=jf(a).id(ic(n)),T=("function"==typeof o&&B.strength(o),"function"==typeof s&&n.strength(s),sh(t).force("link",n).force("charge",B));function P(t){for(var e,n=0,r=m.length;n<r;++n)(e=m[n]).vy+=(b[n]-e.y)*v[n]*t}function N(){if(m){var t,e=m.length;for(v=new Array(e),b=new Array(e),t=0;t<e;++t)v[t]=isNaN(b[t]=+y(m[t],t,m))?0:+x(m[t],t,m)}}function j(t){for(var e,n=0,r=k.length;n<r;++n)(e=k[n]).vx+=(O[n]-e.x)*M[n]*t}function C(){if(k){var t,e=k.length;for(M=new Array(e),O=new Array(e),t=0;t<e;++t)M[t]=isNaN(O[t]=+w(k[t],t,k))?0:+_(k[t],t,k)}}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)*L,r=(r/e-E)*L,i=0;i<e;++i)(t=A[i]).x-=n,t.y-=r}e?T.force("center",(L=1,null==S&&(S=0),null==E&&(E=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?(E=+t,R):E},R.strength=function(t){return arguments.length?(L=+t,R):L},R)):T.force("x",(_=Lf(.1),"function"!=typeof w&&(w=Lf(null==w?0:+w)),j.initialize=function(t){k=t,C()},j.strength=function(t){return arguments.length?(_="function"==typeof t?t:Lf(+t),C(),j):_},j.x=function(t){return arguments.length?(w="function"==typeof t?t:Lf(+t),C(),j):w},j)).force("y",(x=Lf(.1),"function"!=typeof y&&(y=Lf(null==y?0:+y)),P.initialize=function(t){m=t,N()},P.strength=function(t){return arguments.length?(x="function"==typeof t?t:Lf(+t),N(),P):x},P.y=function(t){return arguments.length?(y="function"==typeof t?t:Lf(+t),N(),P):y},P)),T.stop();var z=Math.ceil(Math.log(T.alphaMin())/Math.log(1-T.alphaDecay()));for(let t=0;t<z;t++)T.tick();return{nodesData:t,linksData:a}}const ch=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,f=et(e,["nodeKey","linkKey"]);var e=Object.assign({nodeKey:c,linkKey:u},f),h=rt(e,"node"),d=rt(e,"link"),{links:t,nodes:p}=oc(t,e),{nodesData:t,linksData:p}=lh({links:t,nodes:p},nt({},{joint:!0},i),e),i=Ju(l,"link",{items:[t=>({name:"source",value:ic(u)(t.source)}),t=>({name:"target",value:ic(u)(t.target)})]}),e=Ju(l,"node",{items:[t=>({name:"key",value:ic(c)(t)})]},!0);return[nt({},{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:rt(r,"link"),tooltip:i,animate:nf(s,"link")}),nt({},{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({},h),scale:n,style:rt(r,"node"),tooltip:e,labels:[Object.assign(Object.assign({},{text:""}),rt(r,"label")),...a],animate:nf(s,"link")})]},uh=(ch.props={},f=>u=>t=>{const{field:e="value",nodeSize:n,separation:r,sortBy:i,as:a=["x","y"]}=u,[o,s]=a;var t=Js(t,t=>t.children).sum(t=>t[e]).sort(i),l=f();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}}),fh=t=>uh(Zs)(t),hh=(fh.props={},t=>uh(zl)(t)),dh=(hh.props={},u=>{const f={sortBy:(t,e)=>e.value-t.value},h={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}=hh(Object.assign(Object.assign(Object.assign({},f),i),{field:c}))(t),t=Ju(l,"node",{title:"name",items:["value"]},!0),l=Ju(l,"link",{title:"",items:[t=>({name:"source",value:t.source.name}),t=>({name:"target",value:t.target.name})]});return[nt({},d,{data:c,encode:rt(e,"link"),scale:rt(n,"link"),labels:o,style:Object.assign({stroke:"#999"},rt(r,"link")),tooltip:l,animate:nf(s,"link")}),nt({},h,{data:i,scale:rt(n,"node"),encode:rt(e,"node"),labels:[Object.assign(Object.assign({},p),rt(r,"label")),...a],style:Object.assign({},rt(r,"node")),tooltip:t,animate:nf(s,"node")})]}});dh.props={};var ph={},gh={},yh=34,mh=10,vh=13;function bh(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function xh(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 wh(t,e){var t=t+"",n=t.length;return n<e?new Array(e-n+1).join(0)+t:t}function kh(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+wh(-e,6):9999<e?"+"+wh(e,6):wh(e,4))+"-"+wh(t.getUTCMonth()+1,2)+"-"+wh(t.getUTCDate(),2)+(a?"T"+wh(n,2)+":"+wh(r,2)+":"+wh(i,2)+"."+wh(a,3)+"Z":i?"T"+wh(n,2)+":"+wh(r,2)+":"+wh(i,2)+"Z":r||n?"T"+wh(n,2)+":"+wh(r,2)+"Z":"")}function Mh(r){var e=new RegExp('["'+r+"\n\r]"),f=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 gh;if(l)return l=!1,ph;var t,e,n=a;if(r.charCodeAt(n)===yh){for(;a++<i&&r.charCodeAt(a)!==yh||r.charCodeAt(++a)===yh;);return(t=a)>=i?s=!0:(e=r.charCodeAt(a++))===mh?l=!0:e===vh&&(l=!0,r.charCodeAt(a)===mh)&&++a,r.slice(n+1,t-1).replace(/""/g,'"')}for(;a<i;){if((e=r.charCodeAt(t=a++))===mh)l=!0;else if(e===vh)l=!0,r.charCodeAt(a)===mh&&++a;else if(e!==f)continue;return r.slice(n,t)}return s=!0,r.slice(n,i)}for(r.charCodeAt(i-1)===mh&&--i,r.charCodeAt(i-1)===vh&&--i;(e=c())!==gh;){for(var u=[];e!==ph&&e!==gh;)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?kh(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=bh(n=t),function(t,e){return r(i(t),e,n)}):bh(t)})).columns=s||[],t},parseRows:n,format:function(t,e){return[(e=null==e?xh(t):e).map(o).join(r)].concat(i(t,e)).join("\n")},formatBody:function(t,e){return i(t,e=null==e?xh(t):e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}function Oh(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;_h&&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 _h=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),Sh=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(),Mh(i).parse(t,a?Oh:Vu);if("json"===r)return yield e.json();throw new Error(`Unknown format: ${r}.`)})};Sh.props={};const Eh=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}};Eh.props={};const Ah=t=>{const{callback:e=function(t){return null!=t&&!Number.isNaN(t)}}=t;return t=>t.filter(e)},Lh=(Ah.props={},t=>{const e=t["callback"];return t=>Array.isArray(t)?[...t].sort(e):t});Lh.props={};const Th=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})};Th.props={};const Ph=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};Ph.props={};const Nh=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))}},jh=(Nh.props={},t=>{const e=t["value"];return()=>e}),Ch=(jh.props={},t=>{const{callback:e=Vu}=t;return t=>e(t)}),Rh=(Ch.props={},t=>{const{callback:e=Vu}=t;return t=>Array.isArray(t)?t.map(e):t});Rh.props={};var Bh=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 Ih={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 Fh(t){const{y:c,thickness:u,weight:f,marginRatio:h,id:d,source:p,target:g,sourceWeight:y,targetWeight:m,sortBy:v}=Object.assign(Object.assign({},Ih),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=y(t),t.targetWeight=m(t)});const i=Oc(r,t=>t.source),a=Oc(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=Qc(e,t=>t.sourceWeight)+Qc(n,t=>t.targetWeight)})}if(r=e,(n="function"==typeof v?v:Bh[v])&&r.sort(n),!(n=(r=e).length))throw Yu("Invalid nodes: it's empty!");if(f){const o=h/(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-h),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(!f)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=Oc(e,t=>t.source),l=Oc(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 Dh=e=>t=>Fh(e)(t),zh=(Dh.props={},Math.PI/180),Wh=64,Gh=2048;function Hh(t){return t.text}function Vh(){return"serif"}function qh(){return"normal"}function Yh(t){return t.value}function $h(){return 90*~~(2*Math.random())}function Uh(){return 1}function Kh(){}function Xh(t,o,r,s){if(!o.sprite){var l=t.context,c=t.ratio;l.clearRect(0,0,(Wh<<5)/c,Gh/c);let i=0,a=0,n=0;var u,f,h,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*zh),h=Math.cos(o.rotate*zh),u=t*h,f=t*d,h=e*h,d=e*d,t=Math.max(Math.abs(u+d),Math.abs(u-d))+31>>5<<5,e=~~Math.max(Math.abs(f+h),Math.abs(f-h))):t=t+31>>5<<5,e>n&&(n=e),i+t>=Wh<<5&&(i=0,a+=n,n=0),a+e>=Gh)break;l.translate((i+(t>>1))/c,(a+(e>>1))/c),o.rotate&&l.rotate(o.rotate*zh),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,(Wh<<5)/c,Gh/c).data,g=[];0<=--s;)if((o=r[s]).hasText){var y=o.width,m=y>>5;let n=o.y1-o.y0;for(let t=0;t<n*m;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<y;t++){var v=m*e+(t>>5),b=p[(a+e)*(Wh<<5)+(i+t)<<2]?1<<31-t%32:0;g[v]|=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)*m)}}}function Zh(t){const e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function Qh(t){var e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function Jh(){return document.createElement("canvas")}function td(t){return"function"==typeof t?t:function(){return t}}const ed={archimedean:Zh,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 nd(){let b=[256,256],r=Hh,i=Vh,p=Yh,g=qh,y=$h,m=Uh,x=Zh,w=Math.random,v=Kh,k=[],M=null,O=1/0;const _=qh,S=Jh,E={};return E.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=(Wh<<5)/e,t.height=Gh/e,(t=t.getContext("2d")).fillStyle=t.strokeStyle="red",t.textAlign="center",{context:t,ratio:e}),l=E.board||Qh((b[0]>>5)*b[1]),c=k.length,u=[],f=k.map(function(t,e,n){return t.text=r.call(this,t,e,n),t.font=i.call(this,t,e,n),t.style=_.call(this,t,e,n),t.weight=g.call(this,t,e,n),t.rotate=y.call(this,t,e,n),t.size=~~p.call(this,t,e,n),t.padding=m.call(this,t,e,n),t}).sort(function(t,e){return e.size-t.size});var t,e;let h=-1,d=E.board?[{x:0,y:0},{x:a,y:o}]:void 0;function n(){for(var t,e,n,r=Date.now();Date.now()-r<O&&++h<c;){var i=f[h];i.x=a*(w()+.5)>>1,i.y=o*(w()+.5)>>1,Xh(s,i,f,h),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,f;for(;(l=o(c+=s))&&(u=~~l[0],f=~~l[1],!(Math.min(Math.abs(u),Math.abs(f))>=a));)if(t.x=n+u,t.y=r+f,!(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 h=t.sprite,d=t.width>>5,p=b[0]>>5,g=t.x-(d<<4),y=127&g,m=32-y,v=t.y1-t.y0;let n,r=(t.y+t.y0)*p+(g>>5);for(let e=0;e<v;e++){for(let t=n=0;t<=d;t++)i[r+t]|=n<<m|(t<d?(n=h[e*d+t])>>>y:0);r+=p}return delete t.sprite,1}return}(l,i,d)&&(v.call(null,"word",{cloud:E,word:i}),u.push(i),d?E.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)}E._tags=u,E._bounds=d,h>=c&&(E.stop(),v.call(null,"end",{cloud:E,words:u,bounds:d}))}return M&&clearInterval(M),M=setInterval(n,0),n(),E},E.stop=function(){return M&&(clearInterval(M),M=null),E},E.createMask=t=>{var e=document.createElement("canvas"),[n,r]=b;if(n&&r){var i=n>>5,a=Qh((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}E.board=a,E.hasImage=!0}},E.timeInterval=function(t){O=null==t?1/0:t},E.words=function(t){k=t},E.size=function(t=[]){b=[+t[0],+t[1]]},E.text=function(t){r=td(t)},E.font=function(t){i=td(t)},E.fontWeight=function(t){g=td(t)},E.rotate=function(t){y=td(t)},E.spiral=function(t){x=ed[t]||t},E.fontSize=function(t){p=td(t)},E.padding=function(t){m=td(t)},E.random=function(t){w=td(t)},E.on=function(t){v=td(t)},E}const rd={size:[500,500],fontSize:[14,28]};function id(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 ad=h=>f=>ce(void 0,void 0,void 0,function*(){var i,a,t=Object.assign({},rd,h),e=nd(),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=f.map(t=>t.value),n=t,t=[Gc(e),zc(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",id,e.createMask),e.words([...f]),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=et(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 od(e){return"string"==typeof e?t=>t[e]:e}ad.props={};const sd=t=>{const{join:e,on:n,select:i=[],as:a=i,unknown:o=NaN}=t;var[t,r]=n;const s=od(r),l=od(t),c=_c(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),{}))})},ld=(sd.props={},t=>{const{start:e,end:n}=t;return t=>t.slice(e,n)});ld.props={};const cd=u=>c=>ce(void 0,void 0,void 0,function*(){var{width:t,height:e}=lf(c),{data:n,encode:r={},scale:i,style:a={},layout:o={}}=u,s=et(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 ad(Object.assign(Object.assign({},l),o))(e);return[nt({},t,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a},s),{axis:!1}))]});function ud(t,...e){return e.reduce((e,n)=>t=>e(n(t)),t)}function fd(e,n){return n-e?t=>(t-e)/(n-e):t=>.5}function hd(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}cd.props={};const dd=Math.sqrt(50),pd=Math.sqrt(10),gd=Math.sqrt(2);function yd(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>=dd?10:n>=pd?5:n>=gd?2:1)*10**t:-(10**-t)/(n>=dd?10:n>=pd?5:n>=gd?2:1)}function md(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>=dd?r*=10:n>=pd?r*=5:n>=gd&&(r*=2),e<t?-r:r}const vd=(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=yd(a,o,n))?(a=Math.floor(a/s)*s,o=Math.ceil(o/s)*s,s=yd(a,o,n)):s<0&&(a=Math.ceil(a*s)/s,o=Math.floor(o*s)/s,s=yd(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},bd=36e5,xd=864e5,wd=7*xd;xd,xd;function kd(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}}xo=kd(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),n=kd(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),i=kd(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),l=kd(bd,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+bd*e)},t=>t.getHours()),fo=kd(xd,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+xd*e)},t=>t.getDate()-1);const Md=kd(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());fs=kd(wd,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+wd*e)},t=>{var e=Md.floor(t),t=new Date(+t);return Math.floor((+t-+e)/wd)}),yo=kd(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 Od={millisecond:xo,second:n,minute:i,hour:l,day:fo,week:fs,month:Md,year:yo};mo=kd(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),vo=kd(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),wo=kd(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),ko=kd(bd,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+bd*e)},t=>t.getUTCHours()),Ao=kd(xd,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+xd*e)},t=>t.getUTCDate()-1);const _d=kd(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());Lo=kd(wd,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+wd*e)},t=>{var e=_d.floor(t),t=new Date(+t);return Math.floor((+t-+e)/wd)}),To=kd(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 Sd={millisecond:mo,second:vo,minute:wo,hour:ko,day:Ao,week:Lo,month:_d,year:To};function Ed(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?Sd:Od;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=hd(i,l,0,c,s);let f;return f=u===c?[a,md(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(md(t,e,n),1)]}const Ad=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=Ed(o,t,n,r,i),r=[e.floor(o,n),e.ceil(t,n)];return a?r.reverse():r};function Ld(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)}function Td(t){return jd(t,"Function")}function Pd(t){return null==t}var Nd={}.toString,jd=function(t,e){return Nd.call(t)==="[object "+e+"]"},Cd=function(t){return Array.isArray?Array.isArray(t):jd(t,"Array")};var Rd=function(t){if("object"!=typeof(e=t)||null===e||!jd(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},Bd=function(t){return jd(t,"Number")},Id=Object.values?function(t){return Object.values(t)}:function(n){var t,r=[],e=n,i=function(t,e){Td(n)&&"prototype"===e||r.push(t)};if(e)if(Cd(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},Fd=5;function Dd(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||Fd,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&Rd(o)?(Rd(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):Cd(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t}function zd(t){return t}var Wd,Gd=function(t,e){if(!Ld(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 Hd(t){return Pd(t)?0:(Ld(t)?t:Object.keys(t)).length}function Vd(t){return null!=t&&!Number.isNaN(t)}!function(a,o){var s;if(Td(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(Wd=Wd||document.createElement("canvas").getContext("2d")).font=[a,e,i,n+"px",r].join(" "),Wd.measureText(jd(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],Id(e=void 0===e?{}:e)).join("")});const qd=e=>t=>-e(-t),Yd=(t,e)=>{const n=Math.log(t);t=t===Math.E?Math.log:t=>Math.log(t)/n;return e?qd(t):t},$d=(e,t)=>{var n=e===Math.E?Math.exp:t=>e**t;return t?qd(n):n},Ud=(t,e,n,r)=>{var i=t<0,a=Yd(r,i),r=$d(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 Kd(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 Bd(t)?Math.round(t):t}):i;this.output=ud(a,r,e,t)},t.prototype.invert=void 0}}var Xd,Po={exports:{}},No={exports:{}},Zd=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))},Qd=Array.prototype.concat,Jd=Array.prototype.slice,tp=No.exports=function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];Zd(i)?e=Qd.call(e,Jd.call(i)):e.push(i)}return e},ep=(tp.wrap=function(t){return function(){return t(tp(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]}),np=No.exports,rp=Object.hasOwnProperty,ip=Object.create(null);for(Xd in ep)rp.call(ep,Xd)&&(ip[ep[Xd]]=Xd);var ap=Po.exports={to:{},get:{}};function op(t,e,n){return Math.min(Math.max(e,t),n)}function sp(t){t=Math.round(t).toString(16).toUpperCase();return t.length<2?"0"+t:t}ap.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=ap.get.hsl(t),n="hsl";break;case"hwb":e=ap.get.hwb(t),n="hwb";break;default:e=ap.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},ap.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]:rp.call(ep,e[1])?((i=ep[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]=op(i[n],0,255);return i[3]=op(i[3],0,1),i},ap.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,op(parseFloat(t[2]),0,100),op(parseFloat(t[3]),0,100),op(isNaN(e)?1:e,0,1)]):null},ap.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,op(parseFloat(t[2]),0,100),op(parseFloat(t[3]),0,100),op(isNaN(e)?1:e,0,1)]):null},ap.to.hex=function(){var t=np(arguments);return"#"+sp(t[0])+sp(t[1])+sp(t[2])+(t[3]<1?sp(Math.round(255*t[3])):"")},ap.to.rgb=function(){var t=np(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]+")"},ap.to.rgb.percent=function(){var t=np(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]+")"},ap.to.hsl=function(){var t=np(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},ap.to.hwb=function(){var t=np(arguments),e="";return 4<=t.length&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},ap.to.keyword=function(t){return ip[t.slice(0,3)]};var lp=Po.exports;function cp(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 up(t){var e,n,r,t=lp.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*cp(n=2*r-(r=r<.5?r*(1+n):r+n-r*n),r,e+1/3),255*cp(n,r,e),255*cp(n,r,e-1/3),t]):null):null}const fp=(e,n)=>t=>e*(1-t)+n*t,hp=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return fp(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{var n=t,r=e;const l=up(n),c=up(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})`}}},dp=(t,e)=>{const n=fp(t,e);return t=>Math.round(n(t))};function pp({map:t,initKey:e},n){e=e(n);return t.has(e)?t.get(e):n}function gp(t){return"object"==typeof t?t.valueOf():t}class yp extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=gp,null!==t)for(var[e,n]of t)this.set(e,n)}get(t){return super.get(pp({map:this.map,initKey:this.initKey},t))}has(t){return super.has(pp({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 mp{constructor(t){this.options=Dd({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=Dd({},this.options,t),this.rescale(t)}rescale(t){}}const vp=Symbol("defaultUnknown");function bp(e,n,r){for(let t=0;t<n.length;t+=1)e.has(n[t])||e.set(r(n[t]),t)}function xp(t){var{value:t,from:e,to:n,mapper:r,notFoundReturn:i}=t;let a=r.get(t);if(void 0===a){if(i!==vp)return i;a=e.push(t)-1,r.set(t,a)}return n[a%n.length]}function wp(t){return t instanceof Date?t=>""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class kp extends mp{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[],unknown:vp}}map(t){return 0===this.domainIndexMap.size&&bp(this.domainIndexMap,this.getDomain(),this.domainKey),xp({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&bp(this.rangeIndexMap,this.getRange(),this.rangeKey),xp({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=wp(e),this.rangeKey=wp(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 kp(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 Mp(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,f=u/(2/l*r+1-1/l*i);const h=f*i/l;f-=l*h;const d=function(t){const e=Math.min(...t);return t.map(t=>t/e)}(c),p=f/d.reduce((t,e)=>t+e);var c=new yp(e.map((t,e)=>{e=d[e]*p;return[t,o?Math.floor(e):e]})),g=new yp(e.map((t,e)=>{e=d[e]*p+h;return[t,o?Math.floor(e):e]})),f=Array.from(g.values()).reduce((t,e)=>t+e),t=t+(u-(f-f/l*i))*s;let y=o?Math.round(t):t;var m=new Array(l);for(let t=0;t<l;t+=1){m[t]=(v=y,Math.round(1e12*v)/1e12);var v=e[t];y+=g.get(v)}return{valueBandWidth:c,valueStep:g,adjustedRange:m}}class Op extends kp{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:vp,flex:[]}}clone(){return new Op(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 Mp(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 _p=(t,e,n)=>{let r,i,a=t,o=e;if(a===o&&0<n)return[a];let s=yd(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 Sp extends mp{getDefaultOptions(){return{range:[0],domain:[0,1],unknown:void 0,tickCount:5,tickMethod:_p}}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 Bd(e)&&Bd(r)?t(e,r,n):[]}clone(){return new Sp(this.options)}}function Ep(t){return Math.abs(t)<1e-15?t:parseFloat(t.toFixed(15))}const Ap=[1,5,2,2.5,4,3],Lp=100*Number.EPSILON;const Tp=(n,r,t=5,i=!0,a=Ap,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,f,h,d,p,g={score:-2,lmin:0,lmax:0,lstep:0};let y=1;for(;y<1/0;){for(let t=0;t<a.length;t+=1){var m=a[t],v=(f=m,h=a,d=y,p=void 0,p=Hd(h),1-Gd(h,f)/(p-1)-d+1);if(o[0]*v+o[1]+o[2]+o[3]<g.score){y=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]*v+o[1]+o[2]*b+o[3]<g.score)break;var x=(r-n)/(e+1)/y/m;let t=Math.ceil(Math.log10(x));for(;t<1/0;){var w=y*m*10**t,k=(O=r,k=w*(e-1),(O-=n)<k?1-((k-O)/2)**2/(.1*O)**2:1);if(o[0]*v+o[1]*k+o[2]*b+o[3]<g.score)break;var M=Math.floor(r/w)*y-(e-1)*y,O=Math.ceil(n/w)*y;if(M<=O){var _=O-M;for(let t=0;t<=_;t+=1){var S=(M+t)*(w/y),E=S+w*(e-1),A=w,L=function(t,e,n,r,i,a){var o=Hd(e),e=Gd(e,t);let s=0;return t=(r%a+a)%a,1-e/(o-1)-n+(s=(t<Lp||a-t<Lp)&&r<=0&&0<=i?1:s)}(m,a,y,S,E,A),T=1-.5*((r-E)**2+(n-S)**2)/(.1*(r-n))**2,P=(l=e,P=n,l=(l-1)/(E-(N=S)),c=((c=s)-1)/(Math.max(E,r)-Math.min(P,N)),2-Math.max(l/c,c/l)),N=o[0]*L+o[1]*T+o[2]*P+ +o[3];g.score<N&&(!i||S<=n&&r<=E)&&(g.lmin=S,g.lmax=E,g.lstep=A,g.score=N)}}t+=1}e+=1}}y+=1}var t=Ep(g.lmax),e=Ep(g.lmin),j=Ep(g.lstep),C=Math.floor((t=(t-e)/j,Math.round(1e12*t)/1e12))+1,R=new Array(C);R[0]=Ep(e);for(let t=1;t<C;t+=1)R[t]=Ep(R[t-1]+j);return R};class Pp extends mp{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:Tp}}map(t){return Vd(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new Pp(this.options)}getTicks(){var{domain:t,tickCount:e,tickMethod:n}=this.options,[t,r]=t;return Bd(t)&&Bd(r)?n(t,r,e):[]}}const Np=(t,e,n)=>{var[t,r]=t,[e,i]=e;let a,o;return ud(o=t<r?(a=fd(t,r),n(e,i)):(a=fd(r,t),n(i,e)),a)},jp=(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]=fd(s[t],s[t+1]),o[t]=e(l[t],l[t+1]);return t=>{var e=hd(r,t,1,i)-1,n=a[e];return ud(o[e],n)(t)}},Cp=(t,e,n,r)=>{return(2<Math.min(t.length,e.length)?jp:Np)(t,e,r?dp:n)};class Rp extends mp{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:fp,tickCount:5}}map(t){return Vd(t)?this.output(t):this.options.unknown}invert(t){return Vd(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 vd}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 zd}composeOutput(t,e){var{domain:n,range:r,round:i,interpolate:a}=this.options,n=Cp(n.map(t),r,a,i);this.output=ud(n,e,t)}composeInput(t,e,n){var{domain:r,range:i}=this.options,i=Cp(i,r.map(t),fp);this.input=ud(e,n,i)}}class Bp extends Rp{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:hp,tickMethod:_p,tickCount:5}}chooseTransforms(){return[zd,zd]}clone(){return new Bp(this.options)}}class Ip extends Op{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:vp,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new Ip(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}const Fp=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class Dp extends Rp{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:hp,tickMethod:_p,tickCount:5}}constructor(t){super(t)}chooseTransforms(){var t,e,n,r=this.options["exponent"];return 1===r?[zd,zd]:(t=.5===r?Fp:(e=r,t=>t<0?-((-t)**e):t**e),n=r,[t,t=>t<0?-((-t)**(1/n)):t**(1/n)])}clone(){return new Dp(this.options)}}class zp extends Dp{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:hp,tickMethod:_p,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new zp(this.options)}}class Wp extends mp{constructor(t){super(t)}getDefaultOptions(){return{domain:[.5],range:[0,1]}}map(t){return Vd(t)?(t=hd(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 Wp(this.options)}rescale(){var{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}const Gp=(t,e,n,r=10)=>{var i=t<0,a=$d(r,i),o=Yd(r,i),s=e<t,l=s?e:t,c=s?t:e;let u=o(l),f=o(c),h=[];if(!(r%1)&&f-u<n){if(u=Math.floor(u),f=Math.ceil(f),i)for(;u<=f;u+=1){var d=a(u);for(let t=r-1;1<=t;--t){var p=d*t;if(c<p)break;l<=p&&h.push(p)}}else for(;u<=f;u+=1){var g=a(u);for(let t=1;t<r;t+=1){var y=g*t;if(c<y)break;l<=y&&h.push(y)}}2*h.length<n&&(h=_p(l,c,n))}else h=_p(u,f,Math.min(f-u,n)).map(a);return s?h.reverse():h};class Hp extends Rp{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:hp,tickMethod:Gp,tickCount:5}}chooseNice(){return Ud}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[Yd(t,e),$d(t,e)]}clone(){return new Hp(this.options)}}class Vp extends Wp{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:Tp}}constructor(t){super(t)}nice(){var t,e,n=this.options["nice"];n&&([n,t,e]=this.getTickMethodOptions(),this.options.domain=vd(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 Vp(this.options)}}function qp(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 Yp extends Wp{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:Tp}}constructor(t){super(t)}rescale(){var{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=qp(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 Yp(this.options)}getTicks(){var{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1;return n(e[0],e[r],t)}}var $p=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,Up=/\[([^]*?)\]/gm;function Kp(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}function Xp(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 Zp(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t}var Qp,jo=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Co=["January","February","March","April","May","June","July","August","September","October","November","December"],c=Kp(Co,3),Jp=Xp({},{dayNamesShort:Kp(jo,3),dayNames:jo,monthNamesShort:c,monthNames:Co,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][3<t%10?0:(t-t%10!=10?1:0)*t%10]}}),t0={D:function(t){return String(t.getDate())},DD:function(t){return Zp(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return Zp(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 Zp(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 Zp(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return Zp(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return Zp(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return Zp(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return Zp(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return Zp(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return Zp(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return Zp(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?"-":"+")+Zp(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+Zp(Math.floor(Math.abs(t)/60),2)+":"+Zp(Math.abs(t)%60,2)}},e0={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 n0=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=Ed(o,t,n,r,i),r=e.range(o,new Date(+t+1),n,!0);return a?r.reverse():r};function r0(t){var e=t.getTimezoneOffset(),t=new Date(t);return t.setMinutes(t.getMinutes()+e,t.getSeconds(),t.getMilliseconds()),t}class i0 extends Rp{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:n0,interpolate:fp,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return Ad}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?Sd:Od,s=t?r0:zd;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=e0.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=e0[t]||t).replace(Up,function(t,e){return r.push(e),"@@@"}),Xp(Xp({},Jp),n));return(t=t.replace($p,function(t){return t0[t](e,i)})).replace(/@@@/g,function(){return r.shift()})}}clone(){return new i0(this.options)}}var a0;let o0=Qp=class extends Bp{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:zd,tickMethod:_p,tickCount:5}}constructor(t){super(t)}clone(){return new Qp(this.options)}};o0=Qp=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}([Kd(function(t){return[t(0),t(1)]},t=>{var[t,e]=t;return ud(fp(0,1),fd(t,e))})],o0);let s0=a0=class extends Bp{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:zd,tickMethod:_p,tickCount:5}}constructor(t){super(t)}clone(){return new a0(this.options)}};function l0(r,i){return Object.entries(r).reduce((t,[e,n])=>(t[e]=i(n,e,r),t),{})}function c0(t){return t.map((t,e)=>e)}function u0(t,e){const n=[[],[]];return t.forEach(t=>{n[e(t)?0:1].push(t)}),n}function f0(n,t=n.length){if(1===t)return n.map(t=>[t]);const r=[];for(let e=0;e<n.length;e++)f0(n.slice(e+1),t-1).forEach(t=>{r.push([n[e],...t])});return r}function h0(e){if(1===e.length)return[e];var n=[];for(let t=1;t<=e.length;t++)n.push(...f0(e,t));return n}function d0([t,e],[n,r]){return[t-n,e-r]}function p0([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function g0([t,e]){return Math.atan2(e,t)}function y0([t,e]){return g0([t,e])+Math.PI/2}function m0(t,e){t=g0(t),e=g0(e);return t<e?e-t:2*Math.PI-(t-e)}function v0(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 b0([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 x0(t,e,n){var n=n["arrowSize"],n="string"==typeof n?+parseFloat(n)/100*p0(t,e):n,r=Math.PI/6,t=Math.atan2(e[1]-t[1],e[0]-t[0]),i=Math.PI/2-t-r,t=t-r;return[[e[0]-n*Math.sin(i),e[1]-n*Math.cos(i)],[e[0]-n*Math.cos(t),e[1]-n*Math.sin(t)]]}function w0(t,e,n,r,i){e=g0(d0(r,e))+Math.PI,n=g0(d0(r,n))+Math.PI;t.arc(r[0],r[1],i,e,n,n-e<0)}function k0(e,t,n,r="y",i="between"){const a="y"===r||!0===r?n:t;var n="y"===r||!0===r?90:0,t=c0(a),[r,o]=bc(t,t=>a[t]);const s=new Bp({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 M0(t){var[t,e,n,r]=t;return[r,t,e,n]}function O0(t,e,n){var[e,r,,i]=Jc(t)?M0(e):e,[n,a]=n,t=t.getCenter(),o=y0(d0(e,t)),r=y0(d0(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:p0(i,t),outerRadius:p0(e,t)}}function _0(t,e,n,r){var i=t["defaultColor"],t=t[e]||{},e=t[n]||t[r];return Object.assign({defaultColor:i},e)}function S0(t){var{opacityAttribute:t="fill"}=t;return t+"Opacity"}function E0(t,e){return tu(t)?(e=e["transform"],`translate(${(t=t.getCenter())[0]}, ${t[1]}) `+(e||"")):""}function A0(t){var e,n,r;return 1===t.length?t[0]:([[t,e],[n,r]]=t,[(t+n)/2,(e+r)/2])}function it(t){return new L0([t],null,t,t.ownerDocument)}s0=a0=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}([Kd(function(t){return[t(0),t(.5),t(1)]},t=>{const[e,n,r]=t,i=ud(fp(0,.5),fd(e,n)),a=ud(fp(.5,1),fd(n,r));return t=>(e>r?t<n?a:i:t<n?i:a)(t)})],s0);class L0{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 L0(t,null,this._elements[0],this._document)}selectFacetAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new L0(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 L0([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 L0(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 L0(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 L0([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])),f=Oc(this._elements,t=>r(t.__data__));for(let t=0;t<e.length;t++){var h=e[t],d=n(h,t),p=r(h,t);if(c.has(d)){var g=c.get(d);g.__data__=h,g.__facet__=!1,a.push(g),o.delete(g),c.delete(d)}else if(u.has(d)){g=u.get(d);g.__data__=h,g.__facet__=!0,a.push(g),u.delete(d)}else if(f.has(d)){const Oc=f.get(d);s.push([h,Oc]);for(const y of Oc)o.delete(y);f.delete(d)}else c.has(p)?((d=c.get(p)).__toData__?d.__toData__.push(h):d.__toData__=[h],l.add(d),o.delete(d)):i.push(h)}var t=[new L0([],i,this._parent,this._document),new L0(a,null,this._parent,this._document),new L0(o,null,this._parent,this._document),new L0([],s,this._parent,this._document),new L0(l,null,this._parent,this._document)];return new L0(this._elements,null,this._parent,this._document,t)}merge(t){var e=[...this._elements,...t._elements],t=[...this._transitions,...t._transitions];return new L0(e,null,this._parent,this._document,void 0,t)}createElement(t){var e;return this._document?this._document.createElement(t,{}):(e=L0.registry[t])?new e:Yu("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 L0([],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}}L0.registry={g:X.Group,rect:X.Rect,circle:X.Circle,path:X.Path,text:X.Text,ellipse:X.Ellipse,image:X.Image,line:X.Line,polygon:X.Polygon,polyline:X.Polyline,html:X.HTML};const T0=t=>{const u=t["radius"],f=et(t,["shape","radius"]);var t=rt(f,"pointer"),e=rt(f,"pin");const h=t["shape"],d=et(t,["shape"]),p=e["shape"],g=et(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=zs({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]=A0(c),[i,t]=n.getCenter(),a=Object.assign(Object.assign({x1:a,y1:o,x2:i,y2:t,stroke:l},d),f),o=Object.assign(Object.assign({cx:i,cy:t,stroke:l},g),f),i=it(new X.Group);return Qu(h)||("function"==typeof h?i.append(()=>h(c,e,s,r)):i.append("line").call(L,a).node()),Qu(p)||("function"==typeof p?i.append(()=>p(c,e,s,r)):i.append("circle").call(L,o).node()),i.node()}},P0=f=>{const h={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:T0,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={}}=f,a=et(f,["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}=t;var t=a||r,o=a?1:i,s=e["color"],e=Object.assign({y:{domain:[0,o]}},e);if(!s)return{targetData:[{x:n,y:t,color:"target"}],totalData:[{x:n,y:t,color:"target"},{x:n,y:o-t,color:"total"}],target:t,total:o,scale:e};const{domain:l=[]}=s;return{targetData:[{x:n,y:t,color:"target"}],totalData:l.map((t,e)=>({x:n,y:1<=e?t-l[e-1]:t,color:e})),target:t,total:o,scale:e}}(e,n),c=rt(r,"text"),u=(t=["pointer","pin"],Object.fromEntries(Object.entries(r).filter(([e])=>t.find(t=>e.startsWith(t)))));return[nt({},h,Object.assign({type:"interval",transform:[{type:"stackY"}],data:n,scale:l,style:rt(r,"arc"),animate:"object"==typeof i?rt(i,"arc"):i},a)),nt({},h,d,Object.assign({type:"point",data:e,scale:l,style:u,animate:"object"==typeof i?rt(i,"indicator"):i},a)),nt({},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?rt(i,"text"):i})]}},N0=(P0.props={},()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"]),j0=(N0.props={},()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"]),C0=(j0.props={},t=>new Op(t)),R0=(C0.props={},t=>new Bp(t)),B0=(R0.props={},t=>new kp(t)),I0=(B0.props={},t=>new Pp(t)),F0=(I0.props={},t=>new Ip(t)),D0=(F0.props={},t=>new i0(t)),z0=(D0.props={},t=>new Hp(t)),W0=(z0.props={},t=>new Dp(t)),G0=(W0.props={},t=>new Wp(t)),H0=(G0.props={},t=>new Yp(t)),V0=(H0.props={},t=>new Vp(t)),q0=(V0.props={},t=>new zp(t)),Y0=(q0.props={},t=>new o0(t)),$0=(Y0.props={},t=>new Sp(t));function U0(t){return function(){return t}}$0.props={};const K0=Math.abs,X0=Math.atan2,Z0=Math.cos,Q0=Math.max,J0=Math.min,t1=Math.sin,e1=Math.sqrt,n1=1e-12,r1=Math.PI,i1=r1/2,a1=2*r1;function o1(t){return 1<=t?i1:t<=-1?-i1:Math.asin(t)}const s1=Math.PI,l1=2*s1,c1=1e-6,u1=l1-c1;function f1(n){this._+=n[0];for(let t=1,e=n.length;t<e;++t)this._+=arguments[t]+n[t]}class h1{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?f1:function(t){var e=Math.floor(t);if(!(0<=e))throw new Error("invalid digits: "+t);if(15<e)return f1;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,f=s-t,h=l-e,d=f*f+h*h;null===this._x1?this._append`M${this._x1=t},${this._y1=e}`:d>c1&&(Math.abs(h*c-u*f)>c1&&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((s1-Math.acos((o+d-r)/(2*l*a)))/2))/a,r=o/l,Math.abs(d-1)>c1&&this._append`L${t+d*f},${e+d*h}`,this._append`A${i},${i},0,0,${+(f*s<h*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,f=a?r-i:i-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>c1||Math.abs(this._y1-c)>c1)&&this._append`L${l},${c}`,n&&((f=f<0?f%l1+l1:f)>u1?this._append`A${n},${n},0,1,${u},${t-o},${e-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:f>c1&&this._append`A${n},${n},0,${+(f>=s1)},${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 d1(){return new h1}function p1(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 h1(r)}function g1(t){return t.innerRadius}function y1(t){return t.outerRadius}function m1(t){return t.startAngle}function v1(t){return t.endAngle}function b1(t){return t&&t.padAngle}function x1(t,e,n,r,i,a,o){var s=t-n,l=e-r,o=(o?a:-a)/e1(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,f=n-t,h=u*u+f*f,a=i-a,s=s*n-e*t,n=(f<0?-1:1)*e1(Q0(0,a*a*h-s*s)),e=(s*f-u*n)/h,t=(-s*u-f*n)/h,d=(s*f+u*n)/h,s=(-s*u+f*n)/h,u=e-r,f=t-c,n=d-r,h=s-c;return n*n+h*h<u*u+f*f&&(e=d,t=s),{cx:e,cy:t,x01:-l,y01:-o,x11:e*(i/a-1),y11:t*(i/a-1)}}function w1(){var A=g1,L=y1,T=U0(0),P=null,N=m1,j=v1,C=b1,R=null,B=p1(e);function e(){var t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,g,y,m,v,b,x,w,k=+A.apply(this,arguments),M=+L.apply(this,arguments),O=N.apply(this,arguments)-i1,_=j.apply(this,arguments)-i1,S=K0(_-O),E=O<_;if(R=R||(t=B()),M<k&&(e=M,M=k,k=e),M>n1?S>a1-n1?(R.moveTo(M*Z0(O),M*t1(O)),R.arc(0,0,M,O,_,!E),k>n1&&(R.moveTo(k*Z0(_),k*t1(_)),R.arc(0,0,k,_,O,E))):(r=e=O,i=n=_,o=a=S,h=(u=C.apply(this,arguments)/2)>n1&&(P?+P.apply(this,arguments):e1(k*k+M*M)),w=x=s=J0(K0(M-k)/2,+T.apply(this,arguments)),h>n1&&(f=o1(h/k*t1(u)),h=o1(h/M*t1(u)),(a-=2*f)>n1?(r+=f*=E?1:-1,i-=f):(a=0,r=i=(O+_)/2),(o-=2*h)>n1?(e+=h*=E?1:-1,n-=h):(o=0,e=n=(O+_)/2)),u=M*Z0(e),f=M*t1(e),h=k*Z0(i),O=k*t1(i),s>n1&&(d=M*Z0(n),p=M*t1(n),g=k*Z0(r),y=k*t1(r),S<r1)&&((_=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<n1))return[t+(l=(o*(e-a)-s*(t-i))/l)*n,e+l*r]}(u,f,g,y,d,p,h,O))?(S=u-_[0],v=f-_[1],b=d-_[0],m=p-_[1],v=1/t1((1<(S=(S*b+v*m)/(e1(S*S+v*v)*e1(b*b+m*m)))?0:S<-1?r1:Math.acos(S))/2),b=e1(_[0]*_[0]+_[1]*_[1]),x=J0(s,(k-b)/(v-1)),w=J0(s,(M-b)/(1+v))):x=w=0),o>n1?w>n1?(l=x1(g,y,u,f,M,w,E),c=x1(d,p,h,O,M,w,E),R.moveTo(l.cx+l.x01,l.cy+l.y01),w<s?R.arc(l.cx,l.cy,w,X0(l.y01,l.x01),X0(c.y01,c.x01),!E):(R.arc(l.cx,l.cy,w,X0(l.y01,l.x01),X0(l.y11,l.x11),!E),R.arc(0,0,M,X0(l.cy+l.y11,l.cx+l.x11),X0(c.cy+c.y11,c.cx+c.x11),!E),R.arc(c.cx,c.cy,w,X0(c.y11,c.x11),X0(c.y01,c.x01),!E))):(R.moveTo(u,f),R.arc(0,0,M,e,n,!E)):R.moveTo(u,f),k>n1&&a>n1?x>n1?(l=x1(h,O,d,p,k,-x,E),c=x1(u,f,g,y,k,-x,E),R.lineTo(l.cx+l.x01,l.cy+l.y01),x<s?R.arc(l.cx,l.cy,x,X0(l.y01,l.x01),X0(c.y01,c.x01),!E):(R.arc(l.cx,l.cy,x,X0(l.y01,l.x01),X0(l.y11,l.x11),!E),R.arc(0,0,k,X0(l.cy+l.y11,l.cx+l.x11),X0(c.cy+c.y11,c.cx+c.x11),E),R.arc(c.cx,c.cy,x,X0(c.y11,c.x11),X0(c.y01,c.x01),!E))):R.arc(0,0,k,i,r,E):R.lineTo(h,O)):R.moveTo(0,0),R.closePath(),t)return R=null,t+""||null}return e.centroid=function(){var t=(+A.apply(this,arguments)+ +L.apply(this,arguments))/2,e=(+N.apply(this,arguments)+ +j.apply(this,arguments))/2-r1/2;return[Z0(e)*t,t1(e)*t]},e.innerRadius=function(t){return arguments.length?(A="function"==typeof t?t:U0(+t),e):A},e.outerRadius=function(t){return arguments.length?(L="function"==typeof t?t:U0(+t),e):L},e.cornerRadius=function(t){return arguments.length?(T="function"==typeof t?t:U0(+t),e):T},e.padRadius=function(t){return arguments.length?(P=null==t?null:"function"==typeof t?t:U0(+t),e):P},e.startAngle=function(t){return arguments.length?(N="function"==typeof t?t:U0(+t),e):N},e.endAngle=function(t){return arguments.length?(j="function"==typeof t?t:U0(+t),e):j},e.padAngle=function(t){return arguments.length?(C="function"==typeof t?t:U0(+t),e):C},e.context=function(t){return arguments.length?(R=null==t?null:t,e):R},e}function k1(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function M1(t){this._context=t}function O1(t){return new M1(t)}function _1(t){return t[0]}function S1(t){return t[1]}function E1(o,s){var l=U0(!0),c=null,u=O1,f=null,h=p1(e);function e(t){var e,n,r,i=(t=k1(t)).length,a=!1;for(null==c&&(f=u(r=h())),e=0;e<=i;++e)!(e<i&&l(n=t[e],e,t))===a&&((a=!a)?f.lineStart():f.lineEnd()),a&&f.point(+o(n,e,t),+s(n,e,t));if(r)return f=null,r+""||null}return o="function"==typeof o?o:void 0===o?_1:U0(o),s="function"==typeof s?s:void 0===s?S1:U0(s),e.x=function(t){return arguments.length?(o="function"==typeof t?t:U0(+t),e):o},e.y=function(t){return arguments.length?(s="function"==typeof t?t:U0(+t),e):s},e.defined=function(t){return arguments.length?(l="function"==typeof t?t:U0(!!t),e):l},e.curve=function(t){return arguments.length?(u=t,null!=c&&(f=u(c)),e):u},e.context=function(t){return arguments.length?(null==t?c=f=null:f=u(c=t),e):c},e}function A1(u,f,h){var d=null,p=U0(!0),g=null,y=O1,m=null,v=p1(e);function e(t){var e,n,r,i,a,o=(t=k1(t)).length,s=!1,l=new Array(o),c=new Array(o);for(null==g&&(m=y(a=v())),e=0;e<=o;++e){if(!(e<o&&p(i=t[e],e,t))===s)if(s=!s)n=e,m.areaStart(),m.lineStart();else{for(m.lineEnd(),m.lineStart(),r=e-1;n<=r;--r)m.point(l[r],c[r]);m.lineEnd(),m.areaEnd()}s&&(l[e]=+u(i,e,t),c[e]=+f(i,e,t),m.point(d?+d(i,e,t):l[e],h?+h(i,e,t):c[e]))}if(a)return m=null,a+""||null}function t(){return E1().defined(p).curve(y).context(g)}return u="function"==typeof u?u:void 0===u?_1:U0(+u),f="function"==typeof f?f:U0(void 0===f?0:+f),h="function"==typeof h?h:void 0===h?S1:U0(+h),e.x=function(t){return arguments.length?(u="function"==typeof t?t:U0(+t),d=null,e):u},e.x0=function(t){return arguments.length?(u="function"==typeof t?t:U0(+t),e):u},e.x1=function(t){return arguments.length?(d=null==t?null:"function"==typeof t?t:U0(+t),e):d},e.y=function(t){return arguments.length?(f="function"==typeof t?t:U0(+t),h=null,e):f},e.y0=function(t){return arguments.length?(f="function"==typeof t?t:U0(+t),e):f},e.y1=function(t){return arguments.length?(h=null==t?null:"function"==typeof t?t:U0(+t),e):h},e.lineX0=e.lineY0=function(){return t().x(u).y(f)},e.lineY1=function(){return t().x(u).y(h)},e.lineX1=function(){return t().x(d).y(f)},e.defined=function(t){return arguments.length?(p="function"==typeof t?t:U0(!!t),e):p},e.curve=function(t){return arguments.length?(y=t,null!=g&&(m=y(g)),e):y},e.context=function(t){return arguments.length?(null==t?g=m=null:m=y(g=t),e):g},e}d1.prototype=h1.prototype,M1.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 L1=P1(O1);function T1(t){this._curve=t}function P1(e){function t(t){return new T1(e(t))}return t._curve=e,t}function N1(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(P1(t)):e()._curve},t}function j1(){}function C1(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 R1(t,e){this._context=t,this._k=(1-e)/6}function B1(t,e){this._context=t,this._k=(1-e)/6}function I1(t,e,n){var r,i,a=t._x1,o=t._y1,s=t._x2,l=t._y2;t._l01_a>n1&&(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>n1&&(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 F1(t,e){this._context=t,this._alpha=e}T1.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))}},R1.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:C1(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:C1(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 R1(t,n)}return t.tension=function(t){return e(+t)},t}(0),B1.prototype={areaStart:j1,areaEnd:j1,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:C1(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 B1(t,n)}return t.tension=function(t){return e(+t)},t}(0),F1.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:I1(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 D1=function e(n){function t(t){return n?new F1(t,n):new R1(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function z1(t,e){this._context=t,this._alpha=e}z1.prototype={areaStart:j1,areaEnd:j1,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:I1(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 W1=function e(n){function t(t){return n?new z1(t,n):new B1(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function G1(t){this._context=t}function H1(t){return new G1(t)}function V1(t,e){this._context=t,this._t=e}function q1(t){return new V1(t,.5)}function Y1(t){return new V1(t,0)}function $1(t){return new V1(t,1)}function U1(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:f=a,radiusTopLeft:h=a,radiusTopRight:d=a}=r,r=et(r,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight"]);if(!tu(n)&&!nu(n)){var[p,,g]=!!Jc(n)?M0(t):t;const[x,v]=p;var[g,p]=d0(g,p),y=(0<g?x:x+g)+o,m=(0<p?v:v+p)+s,g=Math.abs(g)-(o+l),o=Math.abs(p)-(s+c);return it(new X.Rect({})).style("x",y).style("y",m).style("width",g).style("height",o).style("radius",[h,d,f,u]).call(L,r).node()}const{y:v,y1:b}=e;l=n.getCenter(),p=O0(n,t,[v,b]),s=w1().cornerRadius(a).padAngle(i*Math.PI/180);return it(new X.Path({})).style("path",s(p)).style("transform",`translate(${l[0]}, ${l[1]})`).style("radius",a).style("inset",i).call(L,r).node()}G1.prototype={areaStart:j1,areaEnd:j1,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))}},V1.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 K1=O=>{const{colorAttribute:_,first:S=!0,last:E=!0}=O,A=et(O,["colorAttribute","opacityAttribute","first","last"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=_0(r,i,a,o),{defaultColor:i,radius:a=0}=r,o=et(r,["defaultColor","radius"]),r=o.lineWidth||1,{stroke:s,radius:a=a,radiusTopLeft:l=a,radiusTopRight:c=a,radiusBottomRight:u=a,radiusBottomLeft:f=a,innerRadius:h=0,innerRadiusTopLeft:d=h,innerRadiusTopRight:p=h,innerRadiusBottomRight:g=h,innerRadiusBottomLeft:h=h,lineWidth:r="stroke"===_||s?r:0,inset:y=0,insetLeft:m=y,insetRight:v=y,insetBottom:b=y,insetTop:x=y}=A,w=et(A,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","lineWidth","inset","insetLeft","insetRight","insetBottom","insetTop"]),{color:i=i,opacity:k}=e;const M=[S?l:d,S?c:p,E?u:g,E?f:h];l=["radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft"],Jc(n)&&l.push(l.shift()),d=Object.assign(Object.assign({radius:a},Object.fromEntries(l.map((t,e)=>[t,M[e]]))),{inset:y,insetLeft:m,insetRight:v,insetBottom:b,insetTop:x});return it(U1(t,e,n,d)).call(L,o).style("fill","transparent").style(_,i).style(S0(O),k).style("lineWidth",r).style("stroke",void 0===s?i:s).call(L,w).node()}},X1=(K1.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>K1(Object.assign({colorAttribute:"fill"},t))),Z1=(X1.props=Object.assign(Object.assign({},K1.props),{defaultMarker:"square"}),t=>K1(Object.assign({colorAttribute:"stroke"},t)));Z1.props=Object.assign(Object.assign({},K1.props),{defaultMarker:"hollowSquare"});const Q1=t=>{const{adjustPoints:s=function(t,e,n){var[t,r,i,a]=t;if(Jc(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,l=et(t,["adjustPoints"]);return(t,e,n,r,i,...a)=>{var o=e["index"],o=i[o+1],t=s(t,o,n);return K1(Object.assign({colorAttribute:"fill"},l))(t,e,n,r,i,...a)}};function J1(t,e,n){var[t,r,i,a]=t;if(Jc(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]}Q1.props=Object.assign(Object.assign({},K1.props),{defaultMarker:"funnel"});const tg=t=>Q1(Object.assign({adjustPoints:J1},t));function eg(t){const e="function"==typeof t?t:t.render;return class extends X.CustomElement{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}tg.props=Object.assign(Object.assign({},K1.props),{defaultMarker:"square"});const ng=eg(t=>{var{d1:e,d2:n,style1:r,style2:i}=t.attributes;it(t).maybeAppend("line",()=>new X.Path({})).style("d",e).call(L,r),it(t).maybeAppend("line1",()=>new X.Path({})).style("d",n).call(L,i)});const rg=t=>{const{curve:f,gradient:h=!1,gradientColor:d="between",defined:p=t=>!Number.isNaN(t)&&null!=t,connect:g=!1}=t,y=et(t,["curve","gradient","gradientColor","defined","connect"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=_0(r,i,a,o),{defaultColor:i,lineWidth:a}=r,o=et(r,["defaultColor","lineWidth"]),{color:r=i,size:i=a,seriesColor:a,seriesX:s,seriesY:l}=e,a=h&&a?k0(a,s,l,h,d):r,s=E0(n,e),l=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o),a&&{stroke:a}),i&&{lineWidth:i}),s&&{transform:s}),y);let c;if(tu(n)){const u=n.getCenter();c=n=>N1(E1().curve(L1)).angle((t,e)=>y0(d0(n[e],u))).radius((t,e)=>p0(n[e],u)).defined(([t,e])=>p(t)&&p(e)).curve(f)(n)}else c=E1().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>p(t)&&p(e)).curve(f);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=rt(l,"connect"),a=!!e.length;return(!a||g&&!Object.keys(o).length?it(new X.Path({})).style("d",c(r)||[]).call(L,l):a&&!g?it(new X.Path({})).style("d",c(t)).call(L,l):it(new ng).style("style1",Object.assign(Object.assign({},l),o)).style("style2",l).style("d1",e.map(c).join(",")).style("d2",c(t))).node()}},ig=(rg.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=tu(n)?H1:O1;return rg(Object.assign({curve:i},a))(t,e,n,r)}),ag=(ig.props=Object.assign(Object.assign({},rg.props),{defaultMarker:"line"}),t=>{const{alpha:a=.5}=t,o=et(t,["alpha"]);return(t,e,n,r)=>{var i=tu(n)?W1:D1;return rg(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),og=(ag.props=Object.assign(Object.assign({},rg.props),{defaultMarker:"smooth"}),t=>rg(Object.assign({curve:$1},t))),sg=(og.props=Object.assign(Object.assign({},rg.props),{defaultMarker:"hv"}),t=>rg(Object.assign({curve:Y1},t))),lg=(sg.props=Object.assign(Object.assign({},rg.props),{defaultMarker:"vh"}),t=>rg(Object.assign({curve:q1},t)));lg.props=Object.assign(Object.assign({},rg.props),{defaultMarker:"hvh"});var bo=(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"]],ls=(bo.style=["fill"],bo.bind(void 0)),o=(ls.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]),ds=(o.style=["fill"],o.bind(void 0)),a=(ds.style=["fill"],o.bind(void 0)),gs=(a.style=["stroke","lineWidth"],(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"]]}),vs=(gs.style=["fill"],gs.bind(void 0)),Ms=(vs.style=["stroke","lineWidth"],(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"]]}),ss=(Ms.style=["fill"],Ms.bind(void 0)),hs=(ss.style=["stroke","lineWidth"],(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"]]}),Fo=(hs.style=["fill"],hs.bind(void 0)),cs=(Fo.style=["stroke","lineWidth"],(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"]]}),cg=(cs.style=["fill"],cs.bind(void 0)),us=(cg.style=["stroke","lineWidth"],(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"]]}),Gl=(us.style=["fill"],us.bind(void 0)),r=(Gl.style=["stroke","lineWidth"],(t,e,n)=>[["M",t,e+n],["L",t,e-n]]),go=(r.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]),xo=(go.style=["stroke","lineWidth"],(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]]),n=(xo.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]),i=(n.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n,e],["L",t+n,e]]),l=(i.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n,e],["L",t+n,e]]),fo=(l.style=["stroke","lineWidth"],l.bind(void 0)),fs=(fo.style=["stroke","lineWidth"],(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]]),yo=(fs.style=["stroke","lineWidth"],(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]]),mo=(yo.style=["stroke","lineWidth"],(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]]),vo=(mo.style=["stroke","lineWidth"],(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]]),wo=(vo.style=["stroke","lineWidth"],(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]]);wo.style=["stroke","lineWidth"];const ug=new Map([["bowtie",us],["cross",go],["dash",fo],["diamond",gs],["dot",l],["hexagon",cs],["hollowBowtie",Gl],["hollowDiamond",vs],["hollowHexagon",cg],["hollowPoint",ls],["hollowSquare",a],["hollowTriangle",ss],["hollowTriangleDown",Fo],["hv",yo],["hvh",vo],["hyphen",i],["line",r],["plus",n],["point",bo],["rect",ds],["smooth",fs],["square",o],["tick",xo],["triangleDown",hs],["triangle",Ms],["vh",mo],["vhv",wo]]);const u=u=>{const{colorAttribute:f,symbol:t,mode:h="auto"}=u,d=et(u,["colorAttribute","symbol","mode"]),p=ug.get(t)||ug.get("point");return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=_0(r,i,a,o),{defaultColor:i,lineWidth:a}=r,o=et(r,["defaultColor","lineWidth"]),r=d.stroke?a||1:a,{color:a=i,transform:i,opacity:s}=e,[l,c]=A0(t),t=function(t,e,n,r){var i;if(1!==e.length)return n=n["size"],"fixed"!==t&&("normal"===t||iu(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}(h,t,e,n)||d.r||o.r;return it(new X.Path).call(L,o).style("fill","transparent").style("d",p(l,c,t)).style("lineWidth",r).style("transform",i).style("stroke",a).style(S0(u),s).style(f,a).call(L,d).node()}},fg=(u.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>u(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t))),hg=(fg.props=Object.assign({defaultMarker:"bowtie"},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"cross"},t))),dg=(hg.props=Object.assign({defaultMarker:"cross"},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"diamond"},t))),pg=(dg.props=Object.assign({defaultMarker:"diamond"},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t))),gg=(pg.props=Object.assign({defaultMarker:"hexagon"},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t))),yg=(gg.props=Object.assign({defaultMarker:"hollowBowtie"},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t))),mg=(yg.props=Object.assign({defaultMarker:"hollowDiamond"},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t))),vg=(mg.props=Object.assign({defaultMarker:"hollowHexagon"},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"point"},t))),bg=(vg.props=Object.assign({defaultMarker:"hollowPoint"},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"square"},t))),xg=(bg.props=Object.assign({defaultMarker:"hollowSquare"},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t))),wg=(xg.props=Object.assign({defaultMarker:"hollowTriangle"},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t))),kg=(wg.props=Object.assign({defaultMarker:"hollowTriangleDown"},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t))),Mg=(kg.props=Object.assign({defaultMarker:"hyphen"},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"line"},t))),Og=(Mg.props=Object.assign({defaultMarker:"line"},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"plus"},t))),_g=(Og.props=Object.assign({defaultMarker:"plus"},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"point"},t))),Sg=(_g.props=Object.assign({defaultMarker:"point"},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"square"},t))),Eg=(Sg.props=Object.assign({defaultMarker:"square"},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"tick"},t))),Ag=(Eg.props=Object.assign({defaultMarker:"tick"},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"triangle"},t))),Lg=(Ag.props=Object.assign({defaultMarker:"triangle"},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t))),Tg=(Lg.props=Object.assign({defaultMarker:"triangleDown"},u.props),t=>{const{arrowSize:u="40%"}=t,f=et(t,["arrowSize"]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=_0(r,e,i,a),e=r["defaultColor"],i=et(r,["defaultColor"]),[a,r]=t,[t,l]=x0(a,r,{arrowSize:u}),c=d1();return c.moveTo(...a),c.lineTo(...r),c.moveTo(...r),c.lineTo(...t),c.moveTo(...r),c.lineTo(...l),it(new X.Path).call(L,i).style("d",c.toString()).style("stroke",o||e).style("transform",s).call(L,f).node()}});function Pg(t){jg(t,!0)}function Ng(t){jg(t,!1)}function jg(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)})}Tg.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};t(Bg,Cg=X.Group);var Cg,Rg=Bg;function Bg(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Cg.apply(this,y([],w(t),!1))||this;return n.addEventListener(X.ElementEvent.INSERTED,function(){Ng(n)}),n}function Ig(t){t=t.appendChild(new Rg({class:"offscreen"}));return Ng(t),t}t(zg,Fg=X.Text),Object.defineProperty(zg.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=Ig(this)),this._offscreen},enumerable:!1,configurable:!0}),zg.prototype.disconnectedCallback=function(){var t;null!=(t=this._offscreen)&&t.destroy()};var Fg,Dg=zg;function zg(t){var e=(t=void 0===t?{}:t).style,t=et(t,["style"]);return Fg.call(this,v({style:v({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},e)},t))||this}function Wg(t){return t*Math.PI/180}function Gg(t){return Number((180*t/Math.PI).toPrecision(5))}Object.defineProperty(Vg.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(Vg.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(Vg.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(Vg.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),Vg.fromRect=function(t){return new Vg(t.x,t.y,t.width,t.height)},Vg.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 Hg=Vg;function Vg(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 qg(t,e){return Ce(t)?t.apply(void 0,y([],w(e),!1)):t}function Yg(t,e){function r(t){return"".concat(e,"-").concat(t)}return t=Object.fromEntries(Object.entries(t).map(function(t){var t=w(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 $g(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)Ug(t,e[r]);return t}var Ug=function(r,i,a,o){void 0===a&&(a=0),void 0===o&&(o=5),Object.entries(i).forEach(function(t){var t=w(t,2),e=t[0],t=t[1],n=r;Object.prototype.hasOwnProperty.call(i,e)&&(t?We(t)?(We(r[e])||(n[e]={}),a<o?Ug(r[e],t,a+1,o):n[e]=i[e]):Ie(t)?(n[e]=[],n[e]=n[e].concat(t)):n[e]=t:n[e]=t)})},Kg=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function Xg(t,e,n){void 0===n&&(n="..."),"text"===t.nodeName&&t.attr({wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:n})}function Zg(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 Qg(t){return"function"==typeof t?t():qe(t)||$e(t)?new Dg({style:{text:String(t)}}):t}function Jg(t,e,n,r,i,a){return(t===e||Math.min(t,e)<=i&&i<=Math.max(t,e))&&(n===r||Math.min(n,r)<=a&&a<=Math.max(n,r))}function ty(t,e,n){var r=t;(!t.length||e<t[0]||e===t[0]&&n<t[1])&&(r[0]=e,r[1]=n)}function ey(t,e){var t=w(t,2),n=t[0],t=t[1],e=w(e,2),r=e[0],e=e[1];return Math.pow(Math.pow(n-r,2)+Math.pow(t-e,2),.5)}function ny(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 ry(t,e,n,r,i){return(r=void 0===r?!0:r)&&t===e||i&&t===n||e<t&&t<n}var iy=function(e,n){return function(t){return e*(1-t)+n*t}};function ay(e,t){var i,a,o,s,n,r,l;return"number"==typeof e&&"number"==typeof t?iy(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]=ay(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=w(t,2),e=t[0],t=t[1];e in n?r[e]=ay(n[e],t):l[e]=t}),function(n){return Object.entries(r).forEach(function(t){var t=w(t,2),e=t[0],t=t[1];return l[e]=t(n)}),l}):function(t){return e}}function oy(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=w([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 Hg(e,n,r-e,i-n)}function sy(n,t,e){function r(t){var e=w(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,f=u?e?[1,0]:[-1,0]:e?[0,1]:[0,-1],h=(s=w([0,0],2))[0],d=s[1],e=oy(o=t.map(function(t){var e=t.width,t=t.height,n=w([h,d],2),r=n[0],n=n[1],i=w([h+e*f[0],d+t*f[1]],2);return h=i[0],d=i[1],new Hg(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 oy(s=o.map(function(t){var e=t.x,n=t.y,t=Hg.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=Hg.fromRect(t);return t.x=u?e:e+r(t),t.y=u?n+r(t):n,t}).map(function(t){var e,t=Hg.fromRect(t);return t.x+=null!=(e=n.x)?e:0,t.y+=null!=(e=n.y)?e:0,t})}function ly(t,e,n){return[]}function cy(t,e){return[t[0]*e,t[1]*e]}function uy(t,e){return[t[0]+e[0],t[1]+e[1]]}function fy(t,e){return[t[0]-e[0],t[1]-e[1]]}function hy(t,e){return[Math.min(t[0],e[0]),Math.min(t[1],e[1])]}function dy(t,e){return[Math.max(t[0],e[0]),Math.max(t[1],e[1])]}function py(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function gy(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 yy(t,e){e=Math.pow(10,e);return~~(t*e)/e}function my(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 vy(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=w(r,2))[0],l=r[1];for(var c=0,u=t.length;c<u;c+=1)s=hy(s,x=t[c]),l=dy(l,x)}for(var c=0,f=t.length;c<f;c+=1){var h,d,p,g,y,m,v,b,x=t[c];0!==c||n?c!==f-1||n?(h=t[[c?c-1:f-1,c-1][n?0:1]],m=[0,0],m=cy(m=fy(d=t[n?(c+1)%f:c+1],h),e),0!==(y=(p=py(x,h))+(g=py(x,d)))&&(p/=y,g/=y),y=cy(m,-p),m=cy(m,g),v=uy(x,y),b=hy(b=uy(x,m),dy(d,x)),b=dy(b,hy(d,x)),v=hy(v=uy(x,y=cy(y=fy(b,x),-p/g)),dy(h,x)),b=uy(x,m=cy(m=fy(x,v=dy(v,hy(h,x))),g/p)),o&&(v=hy(v=dy(v,s),l),b=hy(b=dy(b,s),l)),a.push(i),a.push(v),i=b):(v=x,a.push(i),a.push(v)):i=x}return n&&a.push(a.shift()),a}(r,.4,e,n),u=r.length,f=[],i=0;i<u-1;i+=1)o=c[2*i],s=c[2*i+1],f.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=w(r,1)[0],f.push(["C",o[0],o[1],s[0],s[1],l[0],l[1]])),f}var by=["$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 xy(t){var e,n,r={};for(e in t)n=e,by.includes(n)&&(r[e]=t[e]);return r}function wy(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)}M.prototype.selectAll=function(t){return new M("string"==typeof t?this._parent.querySelectorAll(t):t,null,this._elements[0],this._document)},M.prototype.selectFacetAll=function(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new M(this._elements,null,this._parent,this._document,void 0,void 0,t)},M.prototype.select=function(t){t="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new M([t],null,t,this._document)},M.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=w(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 M(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 M(r,null,r[0],this._document)},M.prototype.maybeAppend=function(t,e){e=ue(this,ky,"m",My).call(this,"#"===t[0]?t:"#".concat(t),e);return e.attr("id",t),e},M.prototype.maybeAppendByClassName=function(t,e){t=t.toString(),e=ue(this,ky,"m",My).call(this,"."===t[0]?t:".".concat(t),e);return e.attr("className",t),e},M.prototype.maybeAppendByName=function(t,e){e=ue(this,ky,"m",My).call(this,'[name="'.concat(t,'"]'),e);return e.attr("name",t),e},M.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]})),f=new Map(this._facetElements.map(function(t,e){return[n(t.__data__,e),t]})),h=Oc(this._elements,function(t){return e(t.__data__)}),d=0;d<t.length;d++){var p=t[d],g=n(p,d),y=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(f.has(g))(x=f.get(g)).__data__=p,x.__facet__=!0,o.push(x),f.delete(g);else if(h.has(g)){var m=h.get(g);l.push([p,m]);try{r=void 0;for(var v=function(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.")}(m),b=v.next();!b.done;b=v.next()){var x=b.value;s.delete(x)}}catch(t){r={error:t}}finally{try{b&&!b.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}h.delete(g)}else u.has(y)?((x=u.get(y)).__toData__?x.__toData__.push(p):x.__toData__=[p],c.add(x),s.delete(x)):a.push(p)}var w=[new M([],a,this._parent,this._document),new M(o,null,this._parent,this._document),new M(s,null,this._parent,this._document),new M([],l,this._parent,this._document),new M(c,null,this._parent,this._document)];return new M(this._elements,null,this._parent,this._document,w)},M.prototype.merge=function(t){var e=y(y([],w(this._elements),!1),w(t._elements),!1),t=y(y([],w(this._transitions),!1),w(t._transitions),!1);return new M(e,null,this._parent,this._document,void 0,t)},M.prototype.createElement=function(t){if(this._document)return this._document.createElement(t,{});var e=M.registry[t];if(e)return new e;throw e="Unknown node type: ".concat(t),new Error(e)},M.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)},M.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 M([],null,this._parent,this._document,void 0,this._transitions)},M.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},M.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))})},M.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))})},M.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=w(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))})})},M.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))})},M.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))})},M.prototype.transition=function(n){var r=this._transitions;return this.each(function(t,e){r[e]=n.call(this,t,e)})},M.prototype.on=function(t,e){return this.each(function(){this.addEventListener(t,e)}),this},M.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.call.apply(t,y([this._parent,this],w(e),!1)),this},M.prototype.node=function(){return this._elements[0]},M.prototype.nodes=function(){return this._elements},M.prototype.transitions=function(){return this._transitions.filter(function(t){return!!t})},M.prototype.parent=function(){return this._parent},ky=new WeakSet,My=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 M([t],null,this._parent,this._document)},M.registry={g:X.Group,rect:X.Rect,circle:X.Circle,path:X.Path,text:Dg,ellipse:X.Ellipse,image:X.Image,line:X.Line,polygon:X.Polygon,polyline:X.Polyline,html:X.HTML};var ky,My,Oy,_y=M;function M(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=[]),ky.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 O(t){return new _y([t],null,t,t.ownerDocument)}function Sy(t,e,n){return t.querySelector(e)?O(t).select(e):O(t).append(n)}function Ey(t){if($e(t))return[t,t,t,t];if(Ie(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 Ay(t){var t=t.getLocalBounds(),t=w([t.min,t.max],2),e=w(t[0],2),n=e[0],e=e[1],t=w(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 Ly(t){return t.toString().charAt(0).toUpperCase()+t.toString().slice(1)}function Ty(t,e){return"".concat(e).concat(Ly(t))}function _(t,i,a){void 0===a&&(a=!1);var o={};return Object.entries(t).forEach(function(t){var e,n,t=w(t,2),r=t[0],t=t[1];"className"!==r&&"class"!==r&&(r.startsWith(Ty(i,"show"))!==a?r===Ty(i,"show")?o[r]=t:o[r.replace(new RegExp(Ly(i)),"")]=t:r.startsWith(i)!==a&&(r=r,void 0===n&&(n=!0),e=(e=i)||(null==(e=r.match(/^([a-z][a-z0-9]+)/))?void 0:e[0])||"",r=r.replace(new RegExp("^(".concat(e,")")),""),"filter"===(n=n?(e=r).toString().charAt(0).toLowerCase()+e.toString().slice(1):r)&&"function"==typeof t||(o[n]=t)))}),o}function Py(t,r){return Object.entries(t).reduce(function(t,e){var e=w(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(Ly(n))]=e,t},{})}function Ny(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=w(t,2),e=t[0],t=t[1];n.includes(e)||(-1!==r.indexOf(e)?a[e]=t:i[e]=t)}),[i,a]}function jy(t,e,n,r){this.message=t,this.expected=e,this.found=n,this.location=r,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,jy)}function Cy(){this.constructor=Oy}Oy=jy,ko=Error,Cy.prototype=ko.prototype,Oy.prototype=new Cy,jy.buildMessage=function(t,e){var a={literal:function(t){return'"'+r(t.text)+'"'},class:function(t){for(var e="",n=0;n<t.parts.length;n++)e+=t.parts[n]instanceof Array?i(t.parts[n][0])+"-"+i(t.parts[n][1]):i(t.parts[n]);return"["+(t.inverted?"^":"")+e+"]"},any:function(t){return"any character"},end:function(t){return"end of input"},other:function(t){return t.description}};function n(t){return t.charCodeAt(0).toString(16).toUpperCase()}function r(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}function i(t){return t.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}return"Expected "+function(t){for(var e,n,r=new Array(t.length),i=0;i<t.length;i++)r[i]=(n=t[i],a[n.type](n));if(r.sort(),0<r.length){for(e=i=1;i<r.length;i++)r[i-1]!==r[i]&&(r[e]=r[i],e++);r.length=e}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(t)+" but "+((t=e)?'"'+r(t)+'"':"end of input")+" found."};var Ry;var By=on(function(t,e){var n=qe(t)?t:t.style.text.toString(),e=e||Iy(t),t=e.fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return(Ry=Ry||document.createElement("canvas").getContext("2d")).font=[a,e,i,"".concat(t,"px"),r].join(" "),Ry.measureText(n).width},function(t,e){return[qe(t)?t:t.style.text.toString(),Object.values(e||Iy(t)).join()].join("")}),Iy=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 Fy(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=w([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){}}t(zy,Dy=X.CustomElement),Object.defineProperty(zy.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=Ig(this)),this._offscreen},enumerable:!1,configurable:!0}),Object.defineProperty(zy.prototype,"defaultOptions",{get:function(){return this._defaultOptions},enumerable:!1,configurable:!0}),zy.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this),this.initialized=!0},zy.prototype.disconnectedCallback=function(){var t;null!=(t=this._offscreen)&&t.destroy()},zy.prototype.attributeChangedCallback=function(t){"visibility"===t&&!function(){jg(this,"hidden"!==this.attributes.visibility)}.call(this)},zy.prototype.update=function(t,e){return this.attr($g({},this.attributes,t=void 0===t?{}:t)),null==(t=this.render)?void 0:t.call(this,this.attributes,this,e)},zy.prototype.clear=function(){this.removeChildren()},zy.prototype.bindEvents=function(t,e){};var Dy,Ao=zy;function zy(t,e){t=Dy.call(this,$g({},{style:e=void 0===e?{}:e},t))||this;return t.initialized=!1,t._defaultOptions=e,t}function Wy(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 Gy(t,e,n){return[["M",t,e+n],["L",t,e-n]]}function Hy(t,e,n){return[["M",t-n,e],["L",t+n,e]]}Lo=Wy,To=Hy;function Vy(t){n="default",Fe(e=t)&&e instanceof Image?n="image":Ce(e)?n="symbol":qe(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}t($y,qy=Ao),$y.prototype.render=function(t,e){var r=t.symbol,n=t.size,i=void 0===n?16:n,a=et(t,["symbol","size"]),o=Vy(r);ny(!!o,O(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=Ce(r)?r:$y.getSymbol(r),t.styles(v({path:null==n?void 0:n(0,0,e)},a)))})})},$y.MARKER_SYMBOL_MAP=new Map,$y.registerSymbol=function(t,e){$y.MARKER_SYMBOL_MAP.set(t,e)},$y.getSymbol=function(t){return $y.MARKER_SYMBOL_MAP.get(t)};var qy,Yy=$y;function $y(){return null!==qy&&qy.apply(this,arguments)||this}Yy.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]]}),Yy.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),Yy.registerSymbol("line",Gy),Yy.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),Yy.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]]}),Yy.registerSymbol("circle",Wy),Yy.registerSymbol("point",Lo),Yy.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"]]}),Yy.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"]]}),Yy.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"]]}),Yy.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),Yy.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"]]}),Yy.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"]]}),Yy.registerSymbol("line",Gy),Yy.registerSymbol("dot",Hy),Yy.registerSymbol("dash",To),Yy.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]]}),Yy.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]]}),Yy.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]]}),Yy.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]]}),Yy.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]]});t(Xy,Uy=Ao),Xy.prototype.render=function(t,e){var n,r,i=t.padding,i=void 0===i?0:i,a=t.marker,o=t.text,s=t.radius,l=t.spacing,c=t.align,u=t.verticalAlign,f=_(t,"label"),t=_(t,"background"),i=w(Ey(i),4),h=i[0],d=i[1],p=i[2],i=i[3],g=Sy(e,".tag-content","g").attr("className","tag-content").style("zIndex",0).node(),y=a?{marker:a}:{symbol:"triangle",size:0},a=Sy(g,".tag-marker",function(){return new Yy({style:y})}).attr("className","tag-marker").call(function(t){t.node().clear()}).update(y).node(),l=(l=l,{x:(m=(a=a).getLocalBounds()).halfExtents[0]?m.max[0]+(l||0):a.style.x,y:m.halfExtents[1]?(m.min[1]+m.max[1])/2:a.style.y}),m=l.x,a=l.y,a=(O(g).maybeAppendByClassName("tag-text",function(){return new Dg}).styles(v(v({fontSize:12,text:b(o)?"":"".concat(o),x:m,y:a},f),{textBaseline:"middle"})).call(function(t){o||t.remove()}),l=i,m=h,a=c||"start",f=u||"top",u=(c=g).getLocalBounds(),r=n=0,"start"===a&&(n=l),"center"===a&&(n=-u.halfExtents[0]),"end"===a&&(n=-l-2*u.halfExtents[0]),"top"===f&&(r=m+u.halfExtents[1]),"middle"===f&&(r=0),"bottom"===f&&(r=m-2*u.halfExtents[1]),c.setLocalPosition([n,r]),g.getLocalBounds());O(e).maybeAppendByClassName("tag-background","rect").styles(v({zIndex:-1,y:a.min[1]-h,x:a.min[0]-i,width:null!==t?i+d+2*a.halfExtents[0]:0,height:null!==t?h+p+2*a.halfExtents[1]:0,radius:null!=s?s:2,fill:"#fafafa",stroke:"#d9d9d9",lineWidth:1},t))},Xy.tag="tag";var Uy,Ky=Xy;function Xy(t){return Uy.call(this,t,{padding:4,spacing:4})||this}var Zy,Qy,Jy={small:{textFontSize:10,buttonWidth:40,buttonHeight:20,markerSize:8},middle:{textFontSize:12,buttonWidth:60,buttonHeight:30,markerSize:12},large:{textFontSize:16,buttonWidth:80,buttonHeight:40,markerSize:16}},tm={primary:{default:{textFill:"#fff",buttonFill:"#1890ff",buttonLineWidth:0,markerFill:"#1890ff"},active:{buttonFill:"#40a9ff",markerFill:"#40a9ff"},disabled:{}},dashed:{default:{buttonFill:"transparent",buttonStroke:"#bbb",buttonLineDash:[5,5]},active:{},disabled:{}},link:{default:{textFill:"#1890ff",buttonFill:"transparent",buttonLineWidth:0,markerFill:"#1890ff"},active:{},disabled:{}},text:{default:{textFill:"#000",buttonFill:"transparent",buttonLineWidth:0,markerFill:"#000"},active:{},disabled:{}},default:{default:{textFill:"#000",buttonFill:"transparent",buttonStroke:"#bbb",markerFill:"#bbb"},active:{textFill:"#1890ff",buttonStroke:"#1890ff",markerStroke:"#1890ff"},disabled:{}}},em={strict:{textFill:"#b8b8b8"},buttonStroke:"#d9d9d9",buttonFill:"#f5f5f5",markerStroke:"#d9d9d9"};function nm(t){var n=Zy.call(this,t,{cursor:"pointer",padding:10,size:"middle",type:"default",text:"",state:"default",markerAlign:"left",markerSpacing:5,default:{buttonLineWidth:1,buttonRadius:5},active:{}})||this;return n.state="default",n.clickEvents=function(){var t=n.attributes,e=t.onClick;"disabled"!==t.state&&null!=e&&e.call(n,n)},n.mouseenterEvent=function(){"disabled"!==n.attributes.state&&(n.state="active",n.render(n.attributes,n))},n.mouseleaveEvent=function(){var t=n.attributes.state;n.state=t,n.render(n.attributes,n)},n}function rm(t){return Qy.call(this,nt({},rm.defaultOptions,t))||this}t(nm,Zy=Ao),Object.defineProperty(nm.prototype,"markerSize",{get:function(){var t=this.attributes.markerSymbol,e=this.getStyle("marker");return t?(null==e?void 0:e.size)||2:0},enumerable:!1,configurable:!0}),Object.defineProperty(nm.prototype,"textAvailableWidth",{get:function(){var t=this.attributes,e=t.markerSymbol,n=t.padding,r=t.ellipsis,i=t.width,t=t.markerSpacing;return r?(r=Je(i)?this.getStyle("button").width:i,e?r-2*n-t-this.markerSize:r-2*n):1/0},enumerable:!1,configurable:!0}),Object.defineProperty(nm.prototype,"buttonHeight",{get:function(){var t=this.attributes.height;return t?+t:+this.getStyle("button").height},enumerable:!1,configurable:!0}),nm.prototype.getStyle=function(t){var e=this.attributes,n=e.size,e=e.type,r=this.state,i=nt({},Jy[n],tm[e][r],this.attributes.default,this.attributes[r]);return"disabled"===r&&(Object.keys(i).forEach(function(t){t in em&&(i[t]=em[t])}),Object.keys(em.strict).forEach(function(t){i[t]=em.strict[t]}),nt(i,this.attributes.disabled||{})),_(i,t)},nm.prototype.render=function(t,e){var n=t.text,n=void 0===n?"":n,r=t.padding,r=void 0===r?0:r,i=t.markerSymbol,t=t.markerSpacing,t=void 0===t?0:t,r=(e.attr("cursor","disabled"===this.state?"not-allowed":"pointer"),w(Ey(r),4)),a=(r[0],r[1]),r=(r[2],r[3]),o=this.buttonHeight,s=this.getStyle("marker"),l=this.markerSize,c=v(v({},s),{symbol:i,x:r+l/2,y:o/2,size:l}),s=Sy(e,".marker",function(){return new Yy({className:"marker",style:c})}).update({style:c}).node().getLocalBounds(),i=this.getStyle("text"),s=(this.textShape=Sy(e,".text","text").attr("className","text").styles(v(v({x:l?s.max[0]+t:r,y:o/2},i),{text:n,textAlign:"left",textBaseline:"middle",wordWrap:!0,wordWrapWidth:this.textAvailableWidth,maxLines:1,textOverflow:"..."})).node(),this.textShape.getLocalBounds()),i=this.getStyle("button");O(e).maybeAppendByClassName(".background","rect").styles(v(v({zIndex:-1},i),{height:o,width:r+(l?l+t:0)+2*s.halfExtents[0]+a}))},nm.prototype.update=function(t){this.attr(nt({},this.attributes,t=void 0===t?{}:t));t=this.attributes.state;this.state=t,this.render(this.attributes,this)},nm.prototype.setState=function(t){this.update({state:t})},nm.prototype.hide=function(){this.style.visibility="hidden"},nm.prototype.show=function(){this.style.visibility="visible"},nm.prototype.bindEvents=function(){this.addEventListener("click",this.clickEvents),this.addEventListener("mouseenter",this.mouseenterEvent),this.addEventListener("mouseleave",this.mouseleaveEvent)},nm.tag="button",t(rm,Qy=Ao),rm.prototype.render=function(t,e){for(var n=t.x,r=t.y,c=t.items,i=(t.textStyle,t.padding),u=t.width,f=t.separator,i=w(Ey(void 0===i?0:i),3),a=i[0],h=i[1],i=i[2],d=_(t,"tag"),p=Sy(e,".container","g").styles({className:"container",x:n+i,y:r+a}),g=0,y=0,o=(p.node().removeChildren(),function(t){var e,n,r,i=c[t],a=new Ky({className:"breadcrumb-item",style:v(v(v(v({x:g,y:y},d),{text:b(i.text)?i.id:i.text}),(o=["marker"],null!==(e=i)&&We(e)?(n={},De(o,function(t){hn.call(e,t)&&(n[t]=e[t])}),n):{})),{padding:0})}),o=(p.append(function(){return a}),a.getLocalBounds()),s=2*o.halfExtents[0],o=2*o.halfExtents[1],s=(g+=s,b(u)||u-h<g&&(a.attr({x:0,y:y+o}),g=s,y+=o),m.bindInnerEvents(a,i),f||{}),i=s.spacing,i=void 0===i?0:i,l=s.text,l=void 0===l?"/":l,s=s.style;t!==c.length-1&&(r=new Dg({className:"".concat(rm.tag,"-separator"),id:"".concat(rm.tag,"-separator-").concat(t),style:v(v({x:g+i,y:y+o/2},s),{text:l,textAlign:"end",textBaseline:"middle"})}),p.append(function(){return r}),t=r.getLocalBounds(),g+=2*t.halfExtents[0]+i)}),m=this,s=0;s<c.length;s++)o(s)},rm.prototype.update=function(t){this.attr(nt({},this.attributes,t)),this.render(this.attributes,this)},rm.prototype.bindInnerEvents=function(t,e){var n=this.attributes,r=n.items,i=n.onClick;i&&t.addEventListener("click",function(){i.call(t,e.id,e,r)})},rm.tag="breadcrumb",rm.defaultOptions={style:{separator:{text:"/",style:{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"},spacing:8},textStyle:{default:{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"},active:{fill:"#5468ff",cursor:"pointer"}},padding:[8,8,8,8]}};t(om,im=X.DisplayObject),om.prototype.render=function(){var t=this.attributes.columns;O(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()})},om.prototype.update=function(t){this.attr($g({},this.attributes,t)),this.render()},om.prototype.clear=function(){this.removeChildren()};var im,am=om;function om(t){var e=this,n=t.style,t=et(t,["style"]);return(e=im.call(this,nt({},{type:"column"},v({style:n},t)))||this).columnsGroup=new X.Group({name:"columns"}),e.appendChild(e.columnsGroup),e.render(),e}t(cm,sm=X.DisplayObject),cm.prototype.render=function(){var t=this.attributes,e=t.lines,t=t.areas;e&&this.renderLines(e),t&&this.renderAreas(t)},cm.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},cm.prototype.update=function(t){this.attr($g({},this.attributes,t)),this.render()},cm.prototype.renderLines=function(t){O(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()})},cm.prototype.renderAreas=function(t){O(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 sm,lm=cm;function cm(t){var e=this,n=t.style,t=et(t,["style"]);return(e=sm.call(this,nt({},{type:"lines"},v({style:n},t)))||this).linesGroup=e.appendChild(new X.Group),e.areasGroup=e.appendChild(new X.Group),e.render(),e}function um(t,e){var n=(e=void 0===e?!1:e)?t.length-1:0,t=t.map(function(t,e){return y([e===n?"M":"L"],w(t),!1)});return e?t.reverse():t}function fm(t,e){if(void 0===e&&(e=!1),t.length<=2)return um(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var a=e?t[r-i-1]:t[i];un(a,n.slice(-2))||n.push.apply(n,y([],w(a),!1))}var o=vy(n,!1);return e?o.unshift(y(["M"],w(t[r-1]),!1)):o.unshift(y(["M"],w(t[0]),!1)),o}function hm(t,e,n){t=rn(t);return t.push(["L",e,n],["L",0,n],["Z"]),t}function dm(t){return 0===t.length?[0,0]:[He(function(t,e){if(Ie(t)){for(var n,r=1/0,i=0;i<t.length;i++){var a=t[i],o=Ce(e)?e(a):a[e];o<r&&(n=a,r=o)}return n}}(t,function(t){return He(t)||0})),Ge(function(t,e){if(Ie(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var a=t[i],o=Ce(e)?e(a):a[e];r<o&&(n=a,r=o)}return n}}(t,function(t){return Ge(t)||0}))]}function pm(t){for(var e=rn(t),n=e[0].length,t=w([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}t(mm,gm=Ao),Object.defineProperty(mm.prototype,"rawData",{get:function(){var t=this.attributes.data;return t&&0!==(null==t?void 0:t.length)?(t=rn(t),$e(t[0])?[t]:t):[[]]},enumerable:!1,configurable:!0}),Object.defineProperty(mm.prototype,"data",{get:function(){return this.attributes.isStack?pm(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(mm.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(mm.prototype,"baseline",{get:function(){var t=this.scales.y,e=w(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(mm.prototype,"containerShape",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty(mm.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,f,h,d,p=_(this.attributes,"area"),g=_(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=w(s.getOptions().range||[0,0],2))[0],c=u[1],l<c&&(u=w([l,c],2),c=u[0],l=u[1]),a=e.map(function(t){return t.map(function(t,e){return[o.map(e),Ye(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=fm(o),l=void 0,l=0===i?hm(s,e,n):(a=fm(t[i-1],!0),o=o[0],a[0][0]="L",y(y(y([],w(s),!1),w(a),!1),[y(["M"],w(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=um(t[i]),s=void 0,s=0===i?hm(o,e,n):((a=um(t[i-1],!0))[0][0]="L",y(y(y([],w(o),!1),w(a),!1),[["Z"]],!1));r.push(s)}return r})(a,t,e):(f=i,h=t,d=e,a.map(function(t){return hm((f?fm:um)(t),h,d)}))),{lines:a.map(function(t,e){return v({stroke:n.getColor(e),path:(i?fm:um)(t)},g)}),areas:u.map(function(t,e){return v({path:t,fill:n.getColor(e)},p)})})},enumerable:!1,configurable:!0}),Object.defineProperty(mm.prototype,"columnsStyle",{get:function(){var i=this,a=_(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=pm(s));var e=this.createScales(s),l=e.x,c=e.y,e=w(dm(s),2),n=e[0],e=e[1],u=new Bp({domain:[0,e-(0<n?0:n)],range:[0,t]}),f=l.getBandWidth(),h=this.rawData;return{columns:s.map(function(t,r){return t.map(function(t,e){var n=f/s.length;return v(v({fill:i.getColor(r)},a),o?{x:l.map(e),y:c.map(t),width:f,height:u.map(h[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}),mm.prototype.render=function(t,e){this.container=Sy(e,".container","rect").attr("className","container").node();var n=t.type,r="spark".concat(n),i="line"===n?this.linesStyle:this.columnsStyle;this.spark=Sy(e,".".concat(r),function(){return new("line"===n?lm:am)({className:r,style:i})}).styles(i).node()},mm.prototype.getColor=function(t){var e=this.attributes.color;return Ie(e)?e[t%e.length]:Ce(e)?e.call(null,t):e},mm.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=w(dm(t),2),c=l[0],l=l[1],c=new Bp({domain:[null!=(e=i[0])?e:c,null!=(e=i[1])?e:l],range:[o,0]});return"line"===r?{type:r,x:new Bp({domain:[0,t[0].length-1],range:[0,s]}),y:c}:{type:r,x:new Op({domain:t[0].map(function(t,e){return e}),range:[0,s],paddingInner:a?n:0}),y:c}},mm.tag="sparkline";var gm,ym=mm;function mm(t){return gm.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 vm(n){var e,r;return n?(e=["enter","update","exit"],r=Object.fromEntries(Object.entries(n).filter(function(t){t=w(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,v(v({},n[t]),r)]:[t,r]}))):{enter:!1,update:!1,exit:!1}}function bm(t,e){t?t.finished.then(e):e()}function xm(t,e){"update"in t?t.update(e):t.attr(e)}function wm(t,e,n){return 0===e.length?null:n?t.animate(e,n):(xm(t,{style:e.slice(-1)[0]}),null)}function km(r,t,e){var i={},a={};return Object.entries(t).forEach(function(t){var e,t=w(t,2),n=t[0],t=t[1];b(t)||(e=r.style[n]||r.parsedStyle[n]||0)!==t&&(i[n]=e,a[n]=t)}),e?wm(r,[i,a],v({fill:"both"},e)):(xm(r,a),null)}function Mm(t,e){return t.style.opacity||(t.style.opacity=1),km(t,{opacity:0},e)}var Om,_m={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},Sm={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},Em={orientation:"horizontal",showLabel:!0,type:"start"},Am=Yg({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track"},"slider"),Lm=Yg({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),Tm=(t(Pm,Om=Ao),Pm.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=et(t,["size","radius","orientation"]),a=2.4*n,r=O(e).maybeAppendByClassName(Lm.iconRect,"rect").styles(v(v({},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(Lm.iconLine,"-1"),"line").styles(v({x1:o,x2:o,y1:l,y2:c},t)),r.maybeAppendByClassName("".concat(Lm.iconLine,"-2"),"line").styles(v({x1:s,x2:s,y1:l,y2:c},t)),r.node().setOrigin(n/2,a/2),"vertical"===i?e.setLocalEulerAngles(90):e.setLocalEulerAngles(0)},Pm);function Pm(){return null!==Om&&Om.apply(this,arguments)||this}t(Cm,Nm=Ao),Cm.prototype.renderLabel=function(t){var e=this,n=this.attributes.showLabel,r=w(Ny(_(this.attributes,"label"),[]),2),i=r[0],r=r[1];ny(!!n,O(t).maybeAppendByClassName(Lm.labelGroup,"g").styles(r),function(t){e.label=t.maybeAppendByClassName(Lm.label,"text").styles(v(v({},Sm),i)),e.label.on("mousedown",function(t){t.stopPropagation()}),e.label.on("touchstart",function(t){t.stopPropagation()})})},Cm.prototype.renderIcon=function(t){var e=this.attributes.orientation,n=v(v({orientation:e},_m),_(this.attributes,"icon")),e=this.attributes.iconShape,r=void 0===e?function(){return new Tm({style:n})}:e;O(t).maybeAppendByClassName(Lm.iconGroup,"g").selectAll(Lm.icon.class).data([r]).join(function(t){return t.append(r).attr("className",Lm.icon.name)},function(t){return t.update(n)},function(t){return t.remove()})},Cm.prototype.render=function(t,e){this.renderIcon(e),this.renderLabel(e)};var Nm,jm=Cm;function Cm(t){return Nm.call(this,t,Em)||this}t(Im,Rm=Ao),Object.defineProperty(Im.prototype,"values",{get:function(){return this.attributes.values},set:function(t){this.attributes.values=this.clampValues(t)},enumerable:!1,configurable:!0}),Object.defineProperty(Im.prototype,"sparklineStyle",{get:function(){var t;return"horizontal"!==this.attributes.orientation?null:(t=_(this.attributes,"sparkline"),v(v({zIndex:0},this.availableSpace),t))},enumerable:!1,configurable:!0}),Object.defineProperty(Im.prototype,"shape",{get:function(){var t=this.attributes,e=t.trackLength,t=t.trackSize,t=w(this.getOrientVal([[e,t],[t,e]]),2);return{width:t[0],height:t[1]}},enumerable:!1,configurable:!0}),Object.defineProperty(Im.prototype,"availableSpace",{get:function(){var t=w(Ey(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}),Im.prototype.getValues=function(){return this.values},Im.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;km(this.selectionShape.node(),this.selectionStyle,t),this.updateHandlesPosition(t)},Im.prototype.updateHandlesPosition=function(t){this.attributes.showHandle&&(km(this.startHandle,this.getHandleStyle("start"),t),km(this.endHandle,this.getHandleStyle("end"),t))},Im.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)},Im.prototype.renderTrack=function(t){var e=this.attributes.brushable,n=_(this.attributes,"track");this.trackShape=O(t).maybeAppendByClassName(Am.track,"rect").styles(v(v({cursor:e?"crosshair":"default"},this.shape),n))},Im.prototype.renderSparkline=function(t){var n=this;ny("horizontal"===this.attributes.orientation,O(t).maybeAppendByClassName(Am.sparklineGroup,"g"),function(t){var e=n.sparklineStyle;t.maybeAppendByClassName(Am.sparkline,function(){return new ym({style:e})}).update(e)})},Object.defineProperty(Im.prototype,"selectionStyle",{get:function(){var t=_(this.attributes,"selection");return v(v({},t),this.calcMask())},enumerable:!1,configurable:!0}),Im.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(Am.handle.class).data(n,function(t){return t.type}).join(function(t){return t.append(function(t){t=t.type;return new jm({style:e.getHandleStyle(t)})}).each(function(t){var e=t.type,t=(this.attr("class","".concat(Am.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()})},Im.prototype.renderSelection=function(t){this.foregroundGroup=O(t).maybeAppendByClassName(Am.foreground,"g"),this.selectionShape=this.foregroundGroup.maybeAppendByClassName(Am.selection,"rect").styles(this.selectionStyle),this.renderHandles()},Im.prototype.render=function(t,e){this.renderTrack(e),this.renderSparkline(e),this.renderSelection(e)},Im.prototype.clampValues=function(t,e){void 0===e&&(e=4);var n=w(this.range,2),r=n[0],n=n[1],i=w(this.getValues().map(function(t){return yy(t,e)}),2),a=i[0],i=i[1],t=w((t||[a,i]).map(function(t){return yy(t,e)}),2),o=t[0],t=t[1],s=(t<o&&(o=(s=w([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]},Im.prototype.calcMask=function(t){var t=w(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}])},Im.prototype.calcHandlePosition=function(t){var e=this.availableSpace,n=e.x,r=e.y,i=e.width,e=e.height,a=w(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])}},Im.prototype.calcHandleText=function(t){var e,n=this.attributes,r=n.orientation,n=n.formatter,i=_(this.attributes,"handle"),a=_(i,"label"),i=i.spacing,o=this.getHandleSize(),s=this.clampValues(),l=this.availableSpace,c=l.width,l=l.height,u=this.calcMask(),f=u.x,h=u.y,d=u.width,u=u.height,n=n("start"===t?s[0]:s[1]),s=new Dg({style:v(v({},a),{text:n})}),a=s.getBBox(),p=a.width,a=a.height,s=(s.destroy(),0),g=0;return"horizontal"===r?(e=(r=i+o)+p/2,s="start"===t?0<f-r-p?-e:e:p<c-f-d-r?e:-e):(e=i+o,g="start"===t?a<h-o?-e:e:a<l-h-u-o?e:-e),{x:s,y:g,text:n}},Im.prototype.getHandleLabelStyle=function(t){var e;return this.attributes.showLabel?(e=_(this.attributes,"handleLabel"),v(v({},e),this.calcHandleText(t))):{}},Im.prototype.getHandleIconStyle=function(){var t=this.attributes.handleIconShape,e=_(this.attributes,"handleIcon"),n=this.getOrientVal(["ew-resize","ns-resize"]),r=this.getHandleSize();return v({cursor:n,shape:t,size:r},e)},Im.prototype.getHandleStyle=function(t){var e=this.attributes,n=e.showLabel,e=e.orientation,r=this.calcHandlePosition(t),i=this.calcHandleText(t);return v(v(v(v({},Py(this.getHandleIconStyle(),"icon")),Py(v(v({},this.getHandleLabelStyle(t)),i),"label")),r),{orientation:e,showLabel:n,type:t,zIndex:3})},Im.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)},Im.prototype.getOrientVal=function(t){var t=w(t,2),e=t[0],t=t[1];return"horizontal"===this.attributes.orientation?e:t},Im.prototype.setValuesOffset=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!1);var r=w(this.getValues(),2),t=[r[0]+t,r[1]+e].sort();n?this.setValues(t):this.innerSetValues(t,!0)},Im.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,e=e.height;return t/this.getOrientVal([n,e])},Im.prototype.dispatchCustomEvent=function(t,e,n){var r=this;t.on(e,function(t){t.stopPropagation(),r.dispatchEvent(new X.CustomEvent(n,{detail:t}))})},Im.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"))},Im.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))},Im.tag="slider";var Rm,Bm=Im;function Im(t){var a=Rm.call(this,t,v(v(v({animate:{duration:100,fill:"both"},brushable:!0,formatter:function(t){return t.toString()},handleSpacing:2,orientation:"horizontal",padding: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]},Py(Em,"handle")),Py(_m,"handleIcon")),Py(Sm,"handleLabel")))||this;return a.range=[0,1],a.onDragStart=function(i){return function(t){t.stopPropagation(),a.target=i,a.prevPos=a.getOrientVal(Zg(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(Zg(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 X.CustomEvent("valuechange",{detail:{oldValue:t,value:a.getValues()}});a.dispatchEvent(t)},a.selectionStartPos=0,a.selectionWidth=0,a.prevPos=0,a.target="",a}t(zm,Fm=Ao),Object.defineProperty(zm.prototype,"padding",{get:function(){return Ey(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(zm.prototype,"value",{get:function(){var t=this.attributes.value,e=w(this.range,2),n=e[0],e=e[1];return Ye(t,n,e)},enumerable:!1,configurable:!0}),Object.defineProperty(zm.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(zm.prototype,"availableSpace",{get:function(){var t=this.attributes.trackSize,e=this.trackLength,n=w(this.padding,4),r=n[0],i=n[1],a=n[2],n=n[3],t=w(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(zm.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(zm.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}),zm.prototype.getValues=function(t){void 0===t&&(t=this.value);var e=this.attributes,e=e.viewportLength/e.contentLength,n=w(this.range,2),r=n[0],t=t*(n[1]-r-e);return[t,t+e]},zm.prototype.getValue=function(){return this.value},zm.prototype.renderSlider=function(t){var e=this.attributes,n=e.orientation,r=e.trackSize,i=e.padding,e=e.slidable,a=_(this.attributes,"track"),o=_(this.attributes,"thumb"),s=v(v({brushable:!1,orientation:n,padding:i,selectionRadius:this.thumbRadius,showHandle:!1,slidable:e,trackLength:this.trackLength,trackRadius:this.trackRadius,trackSize:r,values:this.getValues()},Py(a,"track")),Py(o,"selection"));this.slider=O(t).maybeAppendByClassName("scrollbar",function(){return new Bm({style:s})}).update(s).node()},zm.prototype.render=function(t,e){this.renderSlider(e)},zm.prototype.setValue=function(t,e){void 0===e&&(e=!1);var n=this.attributes.value,r=w(this.range,2),i=r[0],r=r[1];this.slider.setValues(this.getValues(Ye(t,i,r)),e),this.onValueChange(n)},zm.prototype.bindEvents=function(){var e=this;this.slider.addEventListener("trackClick",function(t){t.stopPropagation(),e.onTrackClick(t.detail)}),this.onHover()},zm.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orientation?t[0]:t[1]},zm.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)},zm.tag="scrollbar";var Fm,Dm=zm;function zm(t){var a=Fm.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 X.CustomEvent("scroll",t={detail:{oldValue:t,value:e}})),a.dispatchEvent(new X.CustomEvent("valuechange",t)))},a.onTrackClick=function(t){var e,n,r,i;a.attributes.slidable&&(r=(e=w(a.getLocalPosition(),2))[0],e=e[1],n=(i=w(a.padding,4))[0],i=i[3],r=a.getOrientVal([r+i,e+n]),i=(a.getOrientVal(Zg(t))-r)/a.trackLength,a.setValue(i,!0))},a.onThumbMouseenter=function(t){a.dispatchEvent(new X.CustomEvent("thumbMouseenter",{detail:t.detail}))},a.onTrackMouseenter=function(t){a.dispatchEvent(new X.CustomEvent("trackMouseenter",{detail:t.detail}))},a.onThumbMouseleave=function(t){a.dispatchEvent(new X.CustomEvent("thumbMouseleave",{detail:t.detail}))},a.onTrackMouseleave=function(t){a.dispatchEvent(new X.CustomEvent("trackMouseleave",{detail:t.detail}))},a}var Wm={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",titleFill:"black",titleFontSize:12,titlePosition:"lb",titleSpacing:0,titleTextAlign:"center",titleTextBaseline:"middle",lineArrow:function(){return new X.Path({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:[]},Gm=(nt({},Wm,{style:{type:"arc"}}),nt({},Wm,{style:{}}),Yg({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")),Hm=Yg({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function Vm(t){return t.reduce(function(t,e,n){return t.push(y([0===n?"M":"L"],w(e),!1)),t},[])}function qm(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)?Vm(r):e?(i=py(r[0],e),a=n?0:1,r.reduce(function(t,e,n){return 0===n?t.push(y(["M"],w(e),!1)):t.push(y(["A",i,i,0,0,a],w(e),!1)),t},[])):[]):Vm(t)}function Ym(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=w([qm(t,n),qm(e.slice().reverse(),n,!0)],2),l=n[0],c=n[1],n=w([t[0],e.slice(-1)[0]],2),t=n[0],e=n[1];if("line"===a||"surround"===i)return r([y(["L"],w(e),!1)],[y(["L"],w(t),!1)]);if(o)return a=(n=w([py(e,o),py(t,o)],2))[0],i=n[1],r([y(["A",a,a,0,0,1],w(e),!1),y(["L"],w(e),!1)],[y(["A",i,i,0,0,0],w(t),!1),y(["L"],w(t),!1)]);throw new Error("Arc grid need to specified center")}function $m(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=w([e[l].points,e[l+1].points],2),c=Ym(c[0],c[1],n);s.push({path:c,fill:o[l%o.length]})}return t.selectAll(Hm.region.class).data(s,function(t,e){return e}).join(function(t){return t.append("path").each(function(t,e){t=qg(t,[t,e,s]);this.attr(t)}).attr("className",Hm.region.name)},function(t){return t.transition(function(t,e){return km(this,qg(t,[t,e,s]),r.update)})},function(t){return t.transition(function(){var t=this,e=Mm(this,r.exit);return bm(e,function(){return t.remove()}),e})}).transitions()}t(Xm,Um=Ao),Xm.prototype.render=function(t,e){t.type,t.center,t.areaFill,t.closed;var n,r,i,a,o=et(t,["type","center","areaFill","closed"]),s=(s=void 0===(s=t.data)?[]:s,t.closed?s.map(function(t){var e=t.points,n=w(e,1)[0];return v(v({},t),{points:y(y([],w(e),!1),[n],!1)})}):s),l=O(e).maybeAppendByClassName(Hm.lineGroup,"g"),e=O(e).maybeAppendByClassName(Hm.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:qm(t.points,n)}}),l.selectAll(Hm.line.class).data(a,function(t){return t.id}).join(function(t){return t.append("path").each(function(t,e){t=qg(xy(v({path:t.path},r)),[t,e,a]);this.attr(v({class:Hm.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4]},t))})},function(t){return t.each(function(t,e){km(this,qg(xy(v({path:t.path},r)),[t,e,a]),i.update)})},function(t){return t.transition(function(){var t=this,e=Mm(this,i.exit);return bm(e,function(){return t.remove()}),e})}).transitions()),l=$m(e,s,t);return y(y([],w(o),!1),w(l),!1)};var Um,Km=Xm;function Xm(){return null!==Um&&Um.apply(this,arguments)||this}function Zm(t,e){return Object.fromEntries(Object.entries(t).map(function(t){t=w(t,2);return[t[0],qg(t[1],e)]}))}function Qm(t,e){return e&&Ce(e)?t.filter(e):t}var Jm=on(function(t,e){var n=e.startAngle;return(e.endAngle-n)*t+n},function(t,e){return[t,e.startAngle,e.endAngle].join()}),tv=on(function(t,e){var n,r,i;return"linear"===e.type?(r=(n=w(e.startPos,2))[0],n=n[1],i=w(e.endPos,2),gy([(r=w([i[0]-r,i[1]-n],2))[0],r[1]])):(i=Wg(Jm(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,y(y([],w(a),!1),w(r),!1)):(a=n.startAngle,r=n.endAngle,i=n.center,n=n.radius,y(y([a,r],w(i),!1),[n],!1));return"arc"===e.type&&a.push(t),a.join()});function ev(t,e,n){t=tv(t,n);return n=t,"positive"!==e?[n[1],-n[0]]:[-n[1],n[0]]}var nv=on(function(t,e){var n=w(e.startPos,2),r=n[0],n=n[1],e=w(e.endPos,2),e=w([e[0]-r,e[1]-n],2);return[r+e[0]*t,n+e[1]*t]},function(t,e){return y(y([t],w(e.startPos),!1),w(e.endPos),!1).join()}),rv=on(function(t,e){var n=e.radius,r=w(e.center,2),i=r[0],r=r[1],t=Wg(Jm(t,e));return[i+n*Math.cos(t),r+n*Math.sin(t)]},function(t,e){return y([t,e.startAngle,e.endAngle,e.radius],w(e.center),!1).join()});function iv(t,e){return("linear"===e.type?nv:rv)(t,e)}function av(t,e){return e-t==360}function ov(t,e,n,r,i){function a(t){return[n+i*Math.cos(t),r+i*Math.sin(t)]}var o=e-t,s=w([i,i],2),l=s[0],s=s[1],c=w([Wg(t),Wg(e)],2),u=c[0],c=c[1],f=w(a(u),2),h=f[0],f=f[1],d=w(a(c),2),p=d[0],d=d[1];return av(t,e)?[["M",h,f],["A",l,s,0,1,0,(c=w(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(h,",").concat(f,",A").concat(l,",").concat(s,",0,").concat(u,",").concat(c,",").concat(p,",").concat(d))}function sv(t,e,n,s){var l=e.startAngle,c=e.endAngle,u=e.center,f=e.radius;return t.selectAll(Gm.line.class).data([{path:ov.apply(void 0,y(y([l,c],w(u),!1),[f],!1))}],function(t,e){return e}).join(function(t){return t.append("path").attr("className",Gm.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=y(y([o,e],w(n),!1),[i],!1),e=y(y([l,c],w(u),!1),[f],!1),(n=s.update)?(i=void 0===(i=n.duration)?0:i,r=ay(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,v({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=ov.apply(void 0,y([],w(t),!1))},o.onfinish=i),o}).styles(e)},function(t){return t.remove()}).styles(n).transitions()}function lv(t){var t=w(t,2),e=w(t[0],2),n=e[0],e=e[1],t=w(t[1],2);return{x1:n,y1:e,x2:t[0],y2:t[1]}}function cv(e,t,n,r){function i(t){return e.selectAll(Gm.line.class).data(t,function(t,e){return e}).join(function(t){return t.append("line").attr("className",function(t){return"".concat(Gm.line.name," ").concat(t.className)}).styles(n).transition(function(t){return km(this,lv(t.line),!1)})},function(t){return t.styles(n).transition(function(t){return km(this,lv(t.line),r.update)})},function(t){return t.remove()}).transitions()}var a,o,s,l=t.showTrunc,c=t.startPos,u=t.endPos,f=t.truncRange,h=t.lineExtension,d=w([c,u],2),p=w(d[0],2),g=p[0],p=p[1],d=w(d[1],2),y=d[0],d=d[1],u=w(h?(c=w([c=c,u=u,h=void 0===(h=h)?[0,0]:h],3),h=(u=w(c[0],2))[0],u=u[1],m=(a=w(c[1],2))[0],a=a[1],v=(c=w(c[2],2))[0],c=c[1],h=(m=w([m-h,a-u],2))[0],a=m[1],u=Math.sqrt(Math.pow(h,2)+Math.pow(a,2)),v=(m=w([-v/u,c/u],2))[0],c=m[1],[v*h,v*a,c*h,c*a]):new Array(4).fill(0),4),m=u[0],v=u[1],h=u[2],c=u[3];return l&&f?(u=(a=w(f,2))[0],l=a[1],o=(u=w([g+(f=y-g)*u,p+(s=d-p)*u],2))[0],u=u[1],s=(f=w([g+f*l,p+s*l],2))[0],l=f[1],f=i([{line:[[g+m,p+v],[o,u]],className:Gm.lineFirst.name},{line:[[s,l],[y+h,d+c]],className:Gm.lineSecond.name}]),t.truncRange,t.truncShape,t.lineExtension,f):i([{line:[[g+m,p+v],[y+h,d+c]],className:Gm.line.name}])}function uv(t,e,n){var r,i,a,o,s,l=e.type,c=_(e,"line"),n=("linear"===l?cv:sv)(t,e,my(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(Gm.lineSecond.class):t.select(Gm.line.class),!r||!a||"arc"===e.type&&av(e.startAngle,e.endAngle)?(i=l.node())&&(i.style.markerEnd=void 0):((t=Qg(a)).attr(c),wy(t,s,!0),l.style("markerEnd",t).style("markerEndOffset",-o)),n}function fv(t){var e=t.type,n=t.gridCenter;return"linear"===e?n:n||t.center}function hv(t,i){var a=i.gridLength;return t.map(function(t,e){var t=t.value,n=w(iv(t,i),2),r=n[0],n=n[1],t=w(cy(ev(t,i.gridDirection,i),a),2);return{id:e,points:[[r,n],[r+t[0],n+t[1]]]}})}function dv(t,e,n,r){var i=_(n,"grid"),a=i.type,o=i.areaFill,s=fv(n),l=Qm(e,n.gridFilter),e=("segment"===a?hv:function(t,o){var s,l,c=o.gridControlAngles,e=fv(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=w(e,2),s=e[0],l=e[1],t.map(function(t,e){var t=w(iv(t.value,o),2),n=t[0],t=t[1],n=w([n-s,t-l],2),r=n[0],i=n[1],a=[];return c.forEach(function(t){var t=Wg(t),t=w([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=v(v({},i),{center:s,areaFill:Ce(o)?l.map(function(t,e){return qg(o,[t,e,l])}):o,animate:r,data:e});return t.selectAll(Gm.grid.class).data([1]).join(function(t){return t.append(function(){return new Km({style:c})}).attr("className",Gm.grid.name)},function(t){return t.transition(function(){return this.update(c)})},function(t){return t.remove()}).transitions()}Object.defineProperty(gv.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(gv.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(gv.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(gv.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(gv.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(gv.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),gv.prototype.clear=function(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},gv.prototype.empty=function(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},gv.prototype.add=function(t,e){return t<this.x1&&(this.x1=t),e<this.y1&&(this.y1=e),t>this.x2&&(this.x2=t),e>this.y2&&(this.y2=e),this},gv.prototype.rotate=function(t,e,n){t=this.rotatedPoints(t,e,n);return this.clear().add(t[0],t[1]).add(t[2],t[3]).add(t[4],t[5]).add(t[6],t[7])},gv.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*i+l,t*r+s*i+e],[s*r-t*o+l,t*r+s*o+e],[s*a-t*o+l,t*a+s*o+e],[s*a-t*i+l,t*a+s*i+e]].flat(1)},gv.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},gv.prototype.intersects=function(t){return t&&!(this.x2<t.x1||this.x1>t.x2||this.y2<t.y1||this.y1>t.y2)},gv.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE};var pv=gv;function gv(t){var t=t||{},e=t.left,n=t.top,r=t.right,t=t.bottom;this.x1=null!=e?e:+Number.MAX_VALUE,this.x2=null!=r?r:-Number.MAX_VALUE,this.y1=null!=n?n:+Number.MAX_VALUE,this.y2=null!=t?t:-Number.MAX_VALUE}function yv(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=w(e=c,4))[0],r=e[1],i=e[2],e=e[3],a=(t=w(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 mv(t,e){void 0===e&&(e=[0,0,0,0]);var n=t.getEulerAngles()||0,r=(t.setEulerAngles(0),t.getLocalBounds()),i=w(r.min,2),a=i[0],i=i[1],r=w(r.max,2),o=r[0],r=r[1],s=t.getBBox(),l=s.width,s=s.height,c=0,u=0,f=a,h=i,d=("text"===t.tagName&&(s-=1.5,d=t.style.textAlign,p=t.style.textBaseline,c=+t.style.dx,u=+t.style.dy,"center"===d?f=(a+o)/2:"right"!==d&&"end"!==d||(f=o),"middle"===p?h=(i+r)/2:"bottom"!==p&&"baseline"!==p||(h=r)),w(e,4)),o=d[0],p=void 0===o?0:o,r=d[1],e=void 0===r?0:r,o=d[2],r=void 0===o?p:o,o=d[3],d=void 0===o?e:o,o=new pv;return o.set((c+=a)-d,(u+=i)-p,c+l+e,u+s+r),t.setEulerAngles(n),o.rotatedPoints(Wg(n),f,h)}function vv(t,a){var o;return y([],w(t.reduce(function(t,e,n){return n&&o&&(n=e,r=mv(r=o,i=a),yv(n=mv(n,i),[r[0],r[1],r[2],r[3]])||yv(n,[r[0],r[1],r[4],r[5]])||yv(n,[r[4],r[5],r[6],r[7]])||yv(n,[r[2],r[3],r[6],r[7]]))?(t.add(o),t.add(e)):o=e,t;var r,i},new Set)),!1)}function bv(t,e){return void 0===e&&(e={}),b(t)?0:"number"==typeof t?t:Math.floor(By(t,e))}var xv=function(t,e){var e=e.seq,n=void 0===e?2:e;return t.filter(function(t,e){return!(e%n&&(Ng(t),1))})};var wv=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=xv,u=function(t){return t.forEach(r.show),t},f=2,h=t.slice(),d=t.slice(),p=Math.min.apply(Math,y([1],w(t.map(function(t){return t.getBBox().width})),!1));for("linear"!==n.type||0!==tv(0,n)[1]&&0!==tv(0,n)[0]||(n=Ay(t[0]).left,t=Ay(t[i-1]).right,t=Math.abs(t-n)||1,f=Math.max(Math.floor(i*p/t),f)),a&&(s=h.splice(0,1)[0]),o&&(l=h.splice(-1,1)[0],h.reverse()),u(h);vv((l?y(y([l],w(d),!1),[s],!1):y([s],w(d),!1)).filter(Kg),null==e?void 0:e.margin).length;)(l&&!s&&f%2==0||l&&s)&&h.splice(0,1).forEach(r.hide),d=c(u(h),{seq:f}),f++}}],["rotate",function(t,e,n,r){for(var i=void 0===(o=e.optionalAngles)?[0,45,90]:o,a=e.margin,e=void 0===(o=e.recoverWhenFailed)||o,o=t.map(function(t){return t.getLocalEulerAngles()}),s=function(n){return t.forEach(function(t,e){e=Ie(n)?n[e]:n;r.rotate(t,+e)})},l=0;l<i.length;l++)if(s(i[l]),vv(t,a).length<1)return;e&&s(o)}],["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=Iy(r.getTextShape(t[0])),c=bv(s,e),u=a?bv(a,e):c,s=bv(o,e),f=(!b(s)&&s!==1/0||(s=Math.max.apply(null,t.map(function(t){return t.getBBox().width}))),t.slice()),h=((a=w(l,4))[0],a[1],a[2],a[3],s);u+c<h;h-=c){var d=function(e){if(f.forEach(function(t){r.ellipsis(r.getTextShape(t),e,i)}),(f=vv(t,l)).length<1)return{value:void 0}}(h);if("object"==typeof d)return d.value}}]]);function kv(r,i,a){var t=i.labelOverlap,t=void 0===t?[]:t;t.length&&t.forEach(function(t){var e=t.type,n=wv.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||1<t.map(function(t){return t.querySelector("text")}).length}(r,i,e)||null==n||n(r,t,i,a)})}function Mv(t){for(var e=t;e<0;)e+=360;return Math.round(e%360)}var Ov=on(function(t,e){var t=w(t,2),n=t[0],t=t[1],e=w(e,2),r=e[0],e=e[1],n=w([n*r+t*e,n*e-t*r],2),e=n[0],t=n[1];return Math.atan2(t,e)},function(t,e){return y(y([],w(t),!1),w(e),!1).join()});function _v(t,e){return ev(t,e.labelDirection,e)}function Sv(t,e,n){var r,i=n.labelAlign;return(null==(r=e.style.transform)?void 0:r.includes("rotate"))?e.getLocalEulerAngles():(r=0,e=_v(t.value,n),t=tv(t.value,n),"horizontal"===i?0:(r="perpendicular"===i?Ov([1,0],e):Ov([t[0]<0?-1:1,0],t),ry(n=((n=Gg(r))+360)%180,-90,90)||(n+=180),n))}function Ev(t,e,n){var r=n.type,i=n.labelAlign,t=_v(t,n),n=Mv(e),e=Mv(Gg(Ov([1,0],t)));if([90,270].includes(e)&&!n)return"middle";if(!(e%180)&&[90,270].includes(n))return"middle";if("linear"!==r)return"parallel"===i?"middle":ry(n,90,270)?ry(e,90,270)?"start":"end":ry(e,90,270)?"end":"start";if(0===e){if(ry(n,0,90,!1,!0))return"start";if(ry(n,0,90)||ry(n,270,360))return"start"}if(90===e){if(ry(n,0,90,!1,!0))return"start";if(ry(n,90,180)||ry(n,270,360))return"end"}if(270===e){if(ry(n,0,90,!1,!0))return"end";if(ry(n,90,180)||ry(n,270,360))return"start"}if(180===e){if(90===n)return"start";if(ry(n,0,90)||ry(n,270,360))return"end"}return"start"}function Av(t,e,n){var r=n.showTick,i=n.tickLength,a=n.tickDirection,o=n.labelDirection,s=n.labelSpacing,l=e.indexOf(t),s=qg(s,[t,l,e]),o=w([_v(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=w(uy(cy(o[0],s+(1===o[1]?qg(r?i:0,[t,l,e]):0)),iv(t.value,n)),2);return{x:a[0],y:a[1]}}function Lv(t,e){"text"===t.nodeName&&t.attr(e)}function Tv(r){kv(this.node().childNodes,r,{hide:Ng,show:Pg,rotate:function(t,e){var n;e=+e,n=r,(t=t).setLocalEulerAngles(e),e=Ev(t.__data__.value,e,n),(n=t.querySelector(Gm.labelItem.class))&&Lv(n,{textAlign:e})},ellipsis:function(t,e,n){void 0===e&&(e=1/0),t&&Xg(t,e,n)},getTextShape:function(t){return t.querySelector("text")}})}function Pv(t,e,n,r,i){var a,o,s,l,c,u=n.indexOf(e),f=O(t).append((a=e,o=u,s=n,c=(l=i).labelFormatter,Ce(c)?function(){return Qg(qg(c,[a,o,s,_v(a.value,l)]))}:function(){return Qg(a.label||"")})).attr("className",Gm.labelItem.name).node(),r=w(Ny(Zm(r,[e,u,n])),2),u=r[0],n=r[1],r=n.transform,n=et(n,["transform"]),h=(Fy(t,r),Sv(e,t,i));return t.setLocalEulerAngles(+h),Lv(f,v({textAlign:Ev(e.value,h,i),textBaseline:"middle"},u)),Fy(t,r),t.attr(n),f}function Nv(n,h,d,p){var t=Qm(h,d.labelFilter),g=_(d,"label");return n.selectAll(Gm.label.class).data(t,function(t,e){return e}).join(function(t){return t.append("g").attr("className",Gm.label.name).transition(function(t){return Pv(this,t,h,g,d),this.attr(Av(t,h,d)),null}).call(function(){return Tv.call(n,d)})},function(t){return t.transition(function(t){var e,n,r,i,a,o,s,l=this.querySelector(Gm.labelItem.class),c=Pv(this,t,h,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=w((s=function(t){var e,n;return"circle"===t.nodeName?(n=(e=w(t.getLocalPosition(),2))[0],e=e[1],[n-(n=t.attr("r")),e-n]):t.getLocalPosition()})(e),2))[0],u=u[1],s=w(s(n),2),s=(o=w([(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,")")}],v(v({fill:"both"},l),{duration:i+a+c})),bm(s=n.animate([{opacity:0,transform:"translate(".concat(-s,", ").concat(-u,")"),offset:.01},{opacity:1,transform:"translate(0, 0)"}],v(v({fill:"both"},l),{duration:a+c,delay:i+a-c})),f),[o,s]):(f(),[null]));function f(){"destroy"===r?e.destroy():"hide"===r&&Ng(e),n.isVisible()&&Pg(n)}l=km(this,Av(t,h,d),p.update);return y(y([],w(u),!1),[l],!1)}).call(function(t){var e,t=fn(t,"_transitions").flat().filter(Kg);e=function(){return Tv.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=Mm(this,p.exit);return bm(e,function(){return O(t).remove()}),e})}).transitions()}function jv(t,e){return ev(t,e.tickDirection,e)}var Cv=on(function(t,e){t=w(t,2);return[[0,0],[t[0]*e,t[1]*e]]},function(t,e){return y(y([],w(t),!1),[e],!1).join()});function Rv(t,e,n,r,i,a,o){var s=jv(t.value,a),a=(c=t,u=e,f=n,l=s,a=(a=a).tickLength,l=w(Cv(l,qg(a,[c,u,f])),2),a=w(l[0],2),c=a[0],u=a[1],f=w(l[1],2),{x1:c,x2:f[0],y1:u,y2:f[1]}),l=a.x1,c=a.x2,u=a.y1,f=a.y2,a=w(Ny(Zm(o,[t,e,n,s])),2),o=a[0],t=a[1];"line"===r.node().nodeName&&r.styles(v({x1:l,x2:c,y1:u,y2:f},o)),i.attr(t),r.styles(o)}function Bv(t,e,n,r,i,a){o=O(this),s=t,l=e,c=n,f=(u=r).tickFormatter,h=jv(s.value,u),u="line",Ce(f)&&(u=function(){return qg(f,[s,l,c,h])});Rv(t,e,n,o.append(u).attr("className",Gm.tickItem.name),this,r,i);var o,s,l,c,u,f,h,e=w(iv(t.value,r),2);return km(this,{x:e[0],y:e[1]},a)}var Iv=Yg({text:"text"},"title");function Fv(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(t){return t[0]}):2<t.length?[t[0]]:t.split("")}function Dv(r,t){t=Object.entries(t).reduce(function(t,e){var e=w(e,2),n=e[0],e=e[1];return r.node().attr(n)||(t[n]=e),t},{});r.styles(t)}t(Gv,zv=Ao),Gv.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(Iv.text.class);if(!a)return new Hg(0,0,+r,+i);var a=a.getBBox(),o=a.width,s=a.height,a=w(Ey(n),4),l=a[0],c=a[1],u=a[2],f=a[3],n=w([0,0,+r,+i],4),h=n[0],d=n[1],p=n[2],g=n[3],a=Fv(e);if(a.includes("i"))return new Hg(h,d,p,g);a.forEach(function(t,e){var n;"t"===t&&(n=w(0===e?[s+u,+i-s-u]:[0,+i],2),d=n[0],g=n[1]),"r"===t&&(n=w([+r-o-f],1),p=n[0]),"b"===t&&(n=w([+i-s-l],1),g=n[0]),"l"===t&&(n=w(0===e?[o+c,+r-o-c]:[0,+r],2),h=n[0],p=n[1])});n=w(Ey(t),4),e=n[0],a=n[1],t=n[2],n=n[3],a=w([n+a,e+t],2),t=a[0],a=a[1];return new Hg(h+n,d+e,p-t,g-a)},Gv.prototype.getBBox=function(){return this.title?this.title.getBBox():new Hg(0,0,0,0)},Gv.prototype.render=function(t,e){var n,r,i,a,o,s,l=this,c=(t.width,t.height,t.position,t.spacing,et(t,["width","height","position","spacing"])),u=w(Ny(c),1)[0],f=(f=(t=t).width,r=t.height,t=t.position,i=w([+f/2,+r/2],2),a=(i=w([+i[0],+i[1],"center","middle"],4))[0],o=i[1],s=i[2],i=i[3],(t=Fv(t)).includes("l")&&(a=(n=w([0,"start"],2))[0],s=n[1]),t.includes("r")&&(a=(n=w([+f,"end"],2))[0],s=n[1]),t.includes("t")&&(o=(f=w([0,"top"],2))[0],i=f[1]),t.includes("b")&&(o=(n=w([+r,"bottom"],2))[0],i=n[1]),{x:a,y:o,textAlign:s,textBaseline:i}),h=f.x,d=f.y,p=f.textAlign,g=f.textBaseline;ny(!!c.text,O(e),function(t){l.title=t.maybeAppendByClassName(Iv.text,"text").styles(u).call(Dv,{x:h,y:d,textAlign:p,textBaseline:g}).node()})};var zv,Wv=Gv;function Gv(t){return zv.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 Hv(t,e,n,r,i){var a,o,s,l,c,u,f,h,d=w(Ny(_(r,"title")),2),p=d[0],d=d[1],g=d.transform,g=void 0===g?"":g,d=et(d,["transform"]),y=(t.styles(p),e.styles(d),Fy(t.node(),g),p=O(n._offscreen||n.querySelector(Gm.mainGroup.class)),d=e,r=void 0===(r=(n=r).titlePosition)?"lb":r,a=n.titleSpacing,o=Fv(r),p=p.node().getLocalBounds(),s=(l=w(p.min,2))[0],l=l[1],c=(p=w(p.halfExtents,2))[0],p=p[1],u=(d=w(d.node().getLocalBounds().halfExtents,2))[0],d=d[1],l=(s=w([s+c,l+p],2))[0],s=s[1],m=(a=w(Ey(a),4))[0],f=a[1],h=a[2],a=a[3],["start","end"].includes(r)&&"linear"===n.type?(y=n.startPos,n=n.endPos,n=(r=w("start"===r?[y,n]:[n,y],2))[0],y=(r=w(cy(gy([-(y=r[1])[0]+n[0],-y[1]+n[1]]),m),2))[0],r=r[1],{x:n[0]+y,y:n[1]+r}):(o.includes("t")&&(s-=p+d+m),o.includes("r")&&(l+=c+u+f),o.includes("l")&&(l-=c+u+a),o.includes("b")&&(s+=p+d+h),{x:l,y:s})),n=y.x,r=y.y,m=km(e.node(),{x:n,y:r},i);return Fy(t.node(),g),m}function Vv(e,t,o,s){var n=e.showLine,r=e.showTick,i=e.showLabel,n=ny(n,t.maybeAppendByClassName(Gm.lineGroup,"g"),function(t){return uv(t,e,s)})||[],r=ny(r,t.maybeAppendByClassName(Gm.tickGroup,"g"),function(t){return t=t,r=s,i=Qm(o,(n=e).tickFilter),a=_(n,"tick"),t.selectAll(Gm.tick.class).data(i,function(t){return t.id||t.label}).join(function(t){return t.append("g").attr("className",Gm.tick.name).transition(function(t,e){return Bv.call(this,t,e,i,n,a,!1)})},function(t){return t.transition(function(t,e){return this.removeChildren(),Bv.call(this,t,e,i,n,a,r.update)})},function(t){return t.transition(function(){var t=this,e=Mm(this,r.exit);return bm(e,function(){return t.remove()}),e})}).transitions();var n,r,i,a})||[],i=ny(i,t.maybeAppendByClassName(Gm.labelGroup,"g"),function(t){return Nv(t,o,e,s)})||[];return y(y(y([],w(n),!1),w(r),!1),w(i),!1).filter(function(t){return!!t})}t($v,qv=Ao),$v.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,f=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])}),h=vm(void 0===e?i:e),r=ny(l,O(t).maybeAppendByClassName(Gm.gridGroup,"g"),function(t){return dv(t,f,o,h)})||[],c=O(t).maybeAppendByClassName(Gm.mainGroup,"g"),i=(n&&(!this.initialized&&h.enter||this.initialized&&h.update)&&Vv(o,O(this.offscreenGroup),f,vm(!1)),Vv(o,O(c.node()),f,h)),e=ny(a,O(t).maybeAppendByClassName(Gm.titleGroup,"g"),function(t){return e=t,n=s,i=h,(r=o).titleText?(a=r.titleText,e.selectAll(Gm.title.class).data([{title:a}],function(t,e){return t.title}).join(function(t){return t.append(function(){return Qg(a)}).attr("className",Gm.title.name).transition(function(){return Hv(O(this),e,n,r,i.enter)})},function(t){return t.transition(function(){return Hv(O(this),e,n,r,i.update)})},function(t){return t.remove()}).transitions()):null;var e,n,r,i,a})||[];return y(y(y([],w(r),!1),w(i),!1),w(e),!1).flat().filter(function(t){return!!t})};var qv,Yv=$v;function $v(t){return qv.call(this,t,Wm)||this}var Uv,Kv=Yg({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"),Xv=(t(Zv,Uv=Ao),Object.defineProperty(Zv.prototype,"defaultPage",{get:function(){var t=this.attributes.initPage;return Ye(t,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(Zv.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(Zv.prototype,"controllerShape",{get:function(){return 1<this.totalPages?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty(Zv.prototype,"pageShape",{get:function(){var n,t=this.pageViews,t=w((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,y([],w(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}),Zv.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(Zv.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty(Zv.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),Zv.prototype.getBBox=function(){var t=Uv.prototype.getBBox.call(this),e=t.x,t=t.y,n=this.controllerShape,r=this.pageShape,i=r.pageWidth,r=r.pageHeight;return new Hg(e,t,i+n.width,r)},Zv.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=w(this.getFollowingPageDiff(t),2),o=i[0],r=i[1],this.playState="running",i=wm(a,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-o,", ").concat(-r,")")}],n);return bm(i,function(){e.innerCurrPage=t,e.playState="idle",e.setVisiblePages([t]),e.updatePageInfo()}),i},Zv.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:Ye(n-1,0,e),this.goTo(t))},Zv.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:Ye(n+1,0,e),this.goTo(t))},Zv.prototype.renderClipPath=function(t){var e=this.pageShape,n=e.pageWidth,e=e.pageHeight;this.clipPath=t.maybeAppendByClassName(Kv.clipPath,"rect").styles({width:n,height:e}),this.contentGroup.attr("clipPath",this.clipPath.node())},Zv.prototype.setVisiblePages=function(n){this.playWindow.children.forEach(function(t,e){(n.includes(e)?Pg:Ng)(t)})},Zv.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,w("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=w(i.offset,3),o=w(a[0],2),s=o[0],c=o[1],l=w(a[1],2),r=l[0],o=l[1],l=w(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)},Zv.prototype.updatePageInfo=function(){var t,e=this.currPage,n=this.pageViews,r=this.attributes.formatter;n.length<2||(null!=(t=this.pageInfoGroup.querySelector(Kv.pageInfo.class))&&t.attr("text",r(e+1,n.length)),this.adjustControllerLayout())},Zv.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])},Zv.prototype.prepareFollowingPage=function(t){var e,n=this.currPage,r=this.pageViews;this.setVisiblePages([t,n]),t!==n&&(e=(n=w(this.getFollowingPageDiff(t),2))[0],n=n[1],r[t].setLocalPosition(e,n))},Zv.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(Kv.controller,"g");jg(t.node(),u),u&&(u=_(this.attributes,"button"),e=_(this.attributes,"pageNum"),i=(u=w(Ny(u),2))[0],u=u[1],n=i.size,r=et(i,["size"]),i=!t.select(Kv.prevBtnGroup.class).node(),a=t.maybeAppendByClassName(Kv.prevBtnGroup,"g").styles(u),this.prevBtnGroup=a.node(),a=a.maybeAppendByClassName(Kv.prevBtn,"path"),u=t.maybeAppendByClassName(Kv.nextBtnGroup,"g").styles(u),this.nextBtnGroup=u.node(),[a,u.maybeAppendByClassName(Kv.nextBtn,"path")].forEach(function(t){t.styles(v(v({},r),{transformOrigin:"center"})),wy(t.node(),n,!0)}),a=t.maybeAppendByClassName(Kv.pageInfoGroup,"g"),this.pageInfoGroup=a.node(),a.maybeAppendByClassName(Kv.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()}))},Zv.prototype.render=function(t,e){e=O(e);this.renderClipPath(e),this.renderController(e),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},Zv.prototype.bindEvents=function(){var t=this,e=an(function(){return t.render(t.attributes,t)},50);this.playWindow.addEventListener(X.ElementEvent.INSERTED,e),this.playWindow.addEventListener(X.ElementEvent.REMOVED,e)},Zv);function Zv(t){var e,n,t=Uv.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)},initPage:0,loop:!1,orientation:"horizontal",pageNumFill:"black",pageNumFontSize:12,pageNumTextAlign:"start",pageNumTextBaseline:"middle"})||this;return t.playState="idle",t.contentGroup=t.appendChild(new X.Group({class:Kv.contentGroup.name})),t.playWindow=t.contentGroup.appendChild(new X.Group({class:Kv.playWindow.name})),t.innerCurrPage=t.defaultPage,t}function Qv(t,e,n){return"horizontal"===(t=void 0===t?"horizontal":t)?e:n}Yy.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"]]}),Yy.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]]}),Yy.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 Jv,tb=Yg({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"),eb=(t(nb,Jv=Ao),Object.defineProperty(nb.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(nb.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(nb.prototype,"span",{get:function(){var t,e=this.attributes.span;return e?(t=(e=w(Ey(e),2))[0],e=e[1],[t/(e=t+(t=this.showValue?e:0)),t/e]):[1,1]},enumerable:!1,configurable:!0}),Object.defineProperty(nb.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=w(this.spacing,2),s=o[0],o=o[1];return t&&(t=t-e-s-o,e=w(this.span,2),a=(e=w([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(nb.prototype,"spacing",{get:function(){var t,e=this.attributes.spacing;return e?(t=(e=w(Ey(e),2))[0],e=e[1],this.showValue?[t,e]:[t,0]):[0,0]},enumerable:!1,configurable:!0}),Object.defineProperty(nb.prototype,"layout",{get:function(){var t=this.shape,e=t.markerWidth,n=t.labelWidth,r=t.valueWidth,i=t.width,t=t.height,a=w(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}),nb.prototype.renderMarker=function(t){var e=this,n=this.attributes,r=n.marker,i=n.markerSize,a=_(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(tb.markerGroup,"g").style("zIndex",0),ny(!!r,this.markerGroup,function(){e.markerGroup.maybeAppendByClassName(tb.marker,r).styles(a),wy(e.markerGroup.node(),i,!0)})},nb.prototype.renderLabel=function(t){var e=_(this.attributes,"label"),n=e.text,e=et(e,["text"]);this.labelGroup=t.maybeAppendByClassName(tb.labelGroup,"g").style("zIndex",0),this.labelGroup.maybeAppendByClassName(tb.label,function(){return Qg(n)}).styles(e)},nb.prototype.renderValue=function(t){var e=this,n=_(this.attributes,"value"),r=n.text,i=et(n,["text"]);this.valueGroup=t.maybeAppendByClassName(tb.valueGroup,"g").style("zIndex",0),ny(this.showValue,this.valueGroup,function(){e.valueGroup.maybeAppendByClassName(tb.value,function(){return Qg(r)}).styles(i)})},nb.prototype.renderBackground=function(t){var e=this.shape,n=e.width,e=e.height,r=_(this.attributes,"background");this.background=t.maybeAppendByClassName(tb.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(tb.background,"rect").styles(v({width:n,height:e},r))},nb.prototype.adjustLayout=function(){var t=this.layout,e=t.labelWidth,n=t.valueWidth,r=t.height,t=w(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}),Xg(this.labelGroup.select(tb.label.class).node(),e),this.showValue&&(this.valueGroup.styles({x:t,y:r}),Xg(this.valueGroup.select(tb.value.class).node(),n))},nb.prototype.render=function(t,e){e=O(e);this.renderMarker(e),this.renderLabel(e),this.renderValue(e),this.renderBackground(e),this.adjustLayout()},nb);function nb(t){return Jv.call(this,t,{span:[1,1],marker:function(){return new X.Circle({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this}function rb(t,e,n){return void 0===n&&(n=!0),t?e(t):n}var ib,ab=Yg({page:"item-page",navigator:"navigator",item:"item"},"items"),ob=(t(sb,ib=Ao),Object.defineProperty(sb.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(sb.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(sb.prototype,"renderData",{get:function(){var t=this.attributes,a=t.data,o=t.layout,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:v({layout:o,labelText:r,valueText:i},Object.fromEntries(Object.entries(s).map(function(t){t=w(t,2);return[t[0],qg(t[1],[e,n,a])]})))}})},enumerable:!1,configurable:!0}),sb.prototype.getGridLayout=function(){var u=this,t=this.attributes,f=t.orientation,h=t.width,d=t.rowPadding,p=t.colPadding,g=w(this.navigatorShape,1)[0],t=w(this.grid,2),y=t[0],m=t[1],v=m*y,b=0;return this.pageViews.children.map(function(t,e){var n,r=Math.floor(e/v),i=e%v,a=u.ifHorizontal(m,y),a=[Math.floor(i/a),i%a],a=("vertical"===f&&a.reverse(),w(a,2)),o=a[0],a=a[1],s=(h-g-(m-1)*p)/m,t=t.getBBox().height,l=w([0,0],2),c=l[0],l=l[1];return b="horizontal"===f?(c=(n=w([b,o*(t+d)],2))[0],l=n[1],a===m-1?0:b+s+p):(c=(n=w([a*(s+p),b],2))[0],l=n[1],o===y-1?0:b+t+d),{page:r,index:e,row:o,col:a,pageIndex:i,width:s,height:t,x:c,y:l}})},sb.prototype.getFlexLayout=function(){var t=this.attributes,e=t.width,n=t.height,a=t.rowPadding,o=t.colPadding,t=w(this.navigatorShape,1)[0],r=w(this.grid,2),s=r[0],l=r[1],r=w([e-t,n],2),c=r[0],u=r[1],e=w([0,0,0,0,0,0,0,0],8),f=e[0],h=e[1],d=e[2],p=e[3],g=e[4],y=e[5],m=e[6],v=e[7];return this.pageViews.children.map(function(t,e){var t=t.getBBox(),n=t.width,t=t.height,r=0===m?0:o,i=m+r+n;return i<=c&&rb(g,function(t){return t<l})?(r=w([m+r,v,i],3),f=r[0],h=r[1],m=r[2]):(i=w([y+1,0,0,v+t+a],4),y=i[0],g=i[1],m=i[2],(v=i[3])+a+t<=u&&rb(y,function(t){return t<s})?(r=w([m,v,n],3),f=r[0],h=r[1],m=r[2]):(i=w([0,0,n,0,d+1,0,0,0],8),f=i[0],h=i[1],m=i[2],v=i[3],d=i[4],p=i[5],y=i[6],g=i[7])),{width:n,height:t,x:f,y:h,page:d,index:e,pageIndex:p++,row:y,col:g++}})},Object.defineProperty(sb.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}),sb.prototype.ifHorizontal=function(t,e){return Qv(this.attributes.orientation,t,e)},sb.prototype.flattenPage=function(e){e.querySelectorAll(ab.item.class).forEach(function(t){e.appendChild(t)}),e.querySelectorAll(ab.page.class).forEach(function(t){e.removeChild(t).destroy()})},sb.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));O(t).selectAll(ab.item.class).data(this.renderData,function(t){return t.id}).join(function(t){return t.append(function(t){t=t.style;return new eb({style:t})}).attr("className",ab.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()})},sb.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=w(this.navigatorShape,2),i=r[0],r=r[1];this.navigator.update("grid"===e?{pageWidth:t-i,pageHeight:n-r}:{})},sb.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=w(t,2);return{page:t[0],layouts:t[1]}}),u=y([],w(this.navigator.getContainer().children),!1);t.forEach(function(t){var t=t.layouts,c=e.pageViews.appendChild(new X.Group({className:ab.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=qe(t="__layout__")?t.split("."):t).forEach(function(t,e){e<i.length-1?(Fe(r[t])||(r[t]=$e(i[e+1])?[]:{}),r=r[t]):r[t]=n}),o.update({x:e,y:a,width:s,height:l})})}),this.relayoutNavigator()},sb.prototype.renderNavigator=function(t){var e=this.attributes.orientation,n=_(this.attributes,"nav"),e=$g({orientation:e},n);return this.navigator=t.maybeAppendByClassName(ab.navigator,function(){return new Xv({})}).update(e).node(),this.navigator},sb.prototype.getBBox=function(){return this.navigator.getBBox()},sb.prototype.render=function(t,e){var n=this.attributes.data;n&&0!==n.length&&(n=this.renderNavigator(O(e)),this.renderItems(n.getContainer()),this.adjustLayout())},sb.prototype.dispatchCustomEvent=function(t,e){t=new X.CustomEvent(t,{detail:e});this.dispatchEvent(t)},sb);function sb(t){t=ib.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:cn,mouseenter:cn,mouseleave:cn})||this;return t.navigatorShape=[0,0],t}var lb,cb=Yg({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),ub={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},fb=(t(hb,lb=Ao),hb.prototype.render=function(t,e){var n=O(e).maybeAppendByClassName(cb.markerGroup,"g"),n=(this.renderMarker(n),O(e).maybeAppendByClassName(cb.labelGroup,"g"));this.renderLabel(n)},hb.prototype.renderMarker=function(t){var r=this,e=this.attributes,n=e.orientation,e=e.markerSymbol,i=void 0===e?Qv(n,"horizontalHandle","verticalHandle"):e;ny(!!i,t,function(t){var e=_(r.attributes,"marker"),n=v({symbol:i},e);r.marker=t.maybeAppendByClassName(cb.marker,function(){return new Yy({style:n})}).update(n)})},hb.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;ny(n,t,function(t){var e=_(s.attributes,"label"),n=e.text,e=et(e,["text"]),r=(null==(r=t.select(cb.marker.class))?void 0:r.node().getBBox())||{},i=r.width,r=r.height,r=w(Qv(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(cb.label,"text").styles(v(v({},e),{x:i,y:a,text:u(n).toString(),textAlign:o,textBaseline:r}))})},hb);function hb(t){return lb.call(this,t,ub)||this}var db,No={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},pb=$g({},No,{style:{type:"category",items:[],maxCols:void 0,maxRows:void 0,spacing:[8,2],itemBackground:{padding:0,style:{fill:"transparent",active:{cursor:"pointer"}}},reverse:!1}}),gb=$g({},No,Py(ub,"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"}),yb=Yg({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"),mb=(t(vb,db=Ao),vb.prototype.renderTitle=function(t,e,n){var r=this.attributes,i=r.showTitle,r=r.titleText,a=w(Ny(_(this.attributes,"title")),2),o=a[0],a=a[1],s=(this.titleGroup=t.maybeAppendByClassName(yb.titleGroup,"g").styles(a),v(v({width:e,height:n},o),{text:i?r:""}));this.title=this.titleGroup.maybeAppendByClassName(yb.title,function(){return new Wv({style:s})}).update(s)},vb.prototype.renderItems=function(t,e){var n=e.x,r=e.y,i=e.width,e=e.height,a=_(this.attributes,"title",!0),o=a.style,a=et(a,["style"]),o=w(Ny(o),2),s=o[0],o=o[1],a=v(v(v({},a),s),{width:i,height:e,x:0,y:0});this.itemsGroup=t.maybeAppendByClassName(yb.itemsGroup,"g").styles(v({x:n,y:r},o)),this.items=this.itemsGroup.maybeAppendByClassName(yb.items,function(){return new ob({style:{data:[]}})}).update(a)},vb.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(vb.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.showTitle,n=t.width,t=t.height;return e?this.title.node().getAvailableSpace():new Hg(0,0,n,t)},enumerable:!1,configurable:!0}),vb.prototype.getBBox=function(){return t=this.title.node(),e=this.items.node(),n=(a=t.attributes).position,r=a.spacing,i=a.inset,a=a.text,t=t.getBBox(),o=e.getBBox(),n=Fv(n),r=(a=w(Ey(a?r:0),4))[0],s=a[1],l=a[2],a=a[3],c=(i=w(Ey(i),4))[0],u=i[1],f=i[2],i=i[3],s=(a=w([a+s,r+l],2))[0],r=a[1],a=(l=w([i+u,c+f],2))[0],i=l[1],"l"===n[0]?new Hg(t.x,t.y,o.width+t.width+s+a,Math.max(o.height+i,t.height)):"t"===n[0]?new Hg(t.x,t.y,Math.max(o.width+a,t.width),o.height+t.height+r+i):(c=(u=w([e.attributes.width||o.width,e.attributes.height||o.height],2))[0],f=u[1],new Hg(o.x,o.y,c+t.width+s+a,f+t.height+r+i));var t,e,n,r,i,a,o,s,l,c,u,f},vb.prototype.render=function(t,e){var n=t.width,t=t.height,e=O(e);this.renderTitle(e,n,t),this.renderItems(e,this.availableSpace),this.adjustLayout()},vb);function vb(t){return db.call(this,t,pb)||this}var bb,xb={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},wb=Yg({background:"background",labelGroup:"label-group",label:"label"},"indicator"),kb=(t(Mb,bb=Ao),Mb.prototype.renderBackground=function(){var t,e,n,r,i,a,o;this.label&&(t=(i=this.attributes).position,o=(i=w(Ey(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=_(this.attributes,"background"),this.background=O(this.group).maybeAppendByClassName(wb.background,"path").styles(v(v({},o),{path:a})),this.group.appendChild(this.label.node()))},Mb.prototype.renderLabel=function(){var t=this.attributes,e=t.formatter,n=t.labelText,t=w(Ny(_(this.attributes,"label")),2),r=t[0],t=t[1],r=(r.text,et(r,["text"]));this.label=O(this.group).maybeAppendByClassName(wb.labelGroup,"g").styles(t),n&&this.label.maybeAppendByClassName(wb.label,function(){return Qg(e(n))}).style("text",e(n).toString()).selectAll("text").styles(r)},Mb.prototype.adjustLayout=function(){var t=w(this.point,2),e=t[0],t=t[1];this.group.attr("x",-e).attr("y",-t)},Mb.prototype.getPath=function(n,t){var r=this,t=w(t,2),e=w(t[0],2),i=e[0],e=e[1],t=w(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=w(t,2),e=t[0],t=t[1];return e===o[n]?r.createCorner(t):[y(["M"],w(t[0]),!1),y(["L"],w(t[1]),!1)]});return a.push([["Z"]]),a.flat().filter(function(t,e,n){return 0===e||"M"!==t[0]})},Mb.prototype.createCorner=function(t,e){void 0===e&&(e=10);var n=function(t,e){var n=(t=w(t,2))[0],t=t[1],r=(e=w(e,2))[0],e=e[1];return n!==r&&t===e}.apply(void 0,y([],w(t),!1)),t=w(t,2),r=w(t[0],2),i=r[0],r=r[1],t=w(t[1],2),a=t[0],t=t[1],a=w(n?[a-i,[i,a]]:[t-r,[r,t]],2),t=a[0],a=w(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=w([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]])},Mb.prototype.bindEvents=function(){this.label.on(X.ElementEvent.BOUNDS_CHANGED,this.renderBackground)},Mb.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout()},Mb);function Mb(t){t=bb.call(this,t,xb)||this;return t.point=[0,0],t.group=t.appendChild(new X.Group({})),t.isMutationObserved=!0,t}function Ob(t,e){var t=w(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 _b=Yg({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function Sb(t){var e=t.orientation,n=t.size,t=t.length;return Qv(e,[t,n],[n,t])}function Eb(t){var e=t.type,t=w(Sb(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 Ab(t){var i,a,o,e=t.orientation,r=t.color,n=t.block,t=t.partition,s=(l=Ce(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 X.parseColor(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(Qv(e,"0","270"),")")):""}function Lb(t,e){var n,r,i,a=_(e,"selection"),o=Ab(e),t=t.maybeAppendByClassName(_b.selection,"path").styles(v({path:Eb(e),fill:o},a)),a=t.maybeAppendByClassName(_b.clipPath,"path").styles({path:(a=(o=e).orientation,(e=o.range)?(r=(o=w(Sb(o),2))[0],o=o[1],n=(e=w(e,2))[0],e=e[1],i=Qv(a,n*r,0),n=Qv(a,0,n*o),r=Qv(a,e*r,r),[["M",i,n],["L",i,i=Qv(a,o,e*o)],["L",r,i],["L",r,n],["Z"]]):[])}).node();t.style("clip-path",a)}t(Nb,Tb=Ao),Nb.prototype.render=function(t,e){var n,r,i=O(e).maybeAppendByClassName(_b.trackGroup,"g");i=i,r=_(n=t,"track"),i.maybeAppendByClassName(_b.track,"path").styles(v({path:Eb(n)},r)),Lb(O(e).maybeAppendByClassName(_b.selectionGroup,"g"),t)};var Tb,Pb=Nb;function Nb(t){return Tb.call(this,t,{type:"color",orientation:"horizontal",size:30,range:[0,1],length:200,block:!1,partition:[],color:["#fff","#000"],trackFill:"#e5e5e5"})||this}var jb,Cb,Rb,Bb,Ib=on(function(t){return{min:Math.min.apply(Math,y([],w(t.map(function(t){return t.value})),!1)),max:Math.max.apply(Math,y([],w(t.map(function(t){return t.value})),!1))}},function(t){return t.map(function(t){return t.id})}),Fb=(t(f,jb=Ao),Object.defineProperty(f.prototype,"handleOffsetRatio",{get:function(){return this.ifHorizontal(.7,.9)},enumerable:!1,configurable:!0}),f.prototype.getBBox=function(){var t=this.attributes,e=t.width,t=t.height;return new Hg(0,0,e,t)},f.prototype.render=function(t,e){var n=this,t=t.showLabel,r=(this.renderTitle(O(e)),this.availableSpace),i=r.x,r=r.y,e=O(e).maybeAppendByClassName(yb.contentGroup,"g").styles({x:i,y:r}),i=(ny(!!t,e.maybeAppendByClassName(yb.labelGroup,"g").styles({zIndex:1}),function(t){n.renderLabel(t)}),e.maybeAppendByClassName(yb.ribbonGroup,"g").styles({zIndex:0}));this.handlesGroup=e.maybeAppendByClassName(yb.handlesGroup,"g").styles({zIndex:2}),this.renderHandles(),this.renderRibbon(i),this.renderIndicator(e),this.adjustLabel(),this.adjustHandles()},Object.defineProperty(f.prototype,"range",{get:function(){var t=this.attributes.data;return Ib(t)},enumerable:!1,configurable:!0}),Object.defineProperty(f.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(f.prototype,"ribbonRange",{get:function(){var t=w(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(f.prototype,"selection",{get:function(){var t=this.range,e=t.min,t=t.max,n=this.attributes.defaultValue,e=w(void 0===n?[e,t]:n,2);return[e[0],e[1]]},enumerable:!1,configurable:!0}),f.prototype.ifHorizontal=function(t,e){return Qv(this.attributes.orientation,"function"==typeof t?t():t,"function"==typeof e?e():e)},f.prototype.renderTitle=function(t){var e=this.attributes,n=e.showTitle,r=e.titleText,i=e.width,e=e.height,a=_(this.attributes,"title"),o=v(v({},a),{width:i,height:e,text:r}),s=this;t.selectAll(yb.title.class).data(n?[r]:[]).join(function(t){return t.append(function(){return new Wv({style:o})}).attr("className",yb.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(f.prototype,"availableSpace",{get:function(){var t,e;return this.title?this.title.getAvailableSpace():(t=(e=this.attributes).width,e=e.height,new Hg(0,0,t,e))},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"labelFixedSpacing",{get:function(){return this.attributes.showTick?5:0},enumerable:!1,configurable:!0}),Object.defineProperty(f.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(f.prototype,"labelBBox",{get:function(){var t,e;return this.attributes.showLabel?(this.cacheLabelBBox||(t=(e=(null==(e=this.label.querySelector(Gm.labelGroup.class))?void 0:e.children.slice(-1)[0]).getBBox()).width,e=e.height,this.cacheLabelBBox=new Hg(0,0,t,e)),this.cacheLabelBBox):new Hg(0,0,0,0)},enumerable:!1,configurable:!0}),Object.defineProperty(f.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(f.prototype,"ribbonBBox",{get:function(){var t=this.attributes.showHandle,e=this.availableSpace,n=e.width,e=e.height,r=this.labelShape,i=r.size,r=r.length,n=w(this.ifHorizontal([e,n],[n,e]),2),e=n[0],n=n[1],t=t?this.handleShape:{size:0,length:0},a=t.size,t=t.length,o=this.handleOffsetRatio,s=0,l=this.labelPosition,s=["bottom","right"].includes(l)?Math.min(e-i,(e-a)/o):a<e*(1-o)?Math.max(e-i,0):Math.max((e-i-a)/o,0),e=Math.max(t,r),a=n-e,o=w(this.ifHorizontal([a,s],[s,a]),2),t=o[0],r=o[1],n=["top","left"].includes(l)?i:0,s=w(this.ifHorizontal([e/2,n],[n,e/2]),2),a=s[0],o=s[1];return new Hg(a,o,t,r)},enumerable:!1,configurable:!0}),Object.defineProperty(f.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}),f.prototype.renderRibbon=function(t){var e=this.attributes,n=e.data,r=e.type,i=e.orientation,a=e.color,e=e.block,o=_(this.attributes,"ribbon"),s=this.range,l=s.min,c=s.max,s=this.ribbonBBox,u=s.x,s=s.y,f=this.ribbonShape,h=f.length,f=f.size,d=$g({x:u,y:s,length:h,size:f,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(yb.ribbon,function(){return new Pb({style:d})}).update(d)},f.prototype.getHandleClassName=function(t){return"".concat(yb.prefix("".concat(t,"-handle")))},f.prototype.renderHandles=function(){var t=this.attributes,e=t.showHandle,t=t.orientation,n=_(this.attributes,"handle"),r=w(this.selection,2),i=r[0],r=r[1],a=v(v({},n),{orientation:t}),o=this;this.handlesGroup.selectAll(yb.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 fb({style:a})}).attr("className",function(t){t=t.type;return"".concat(yb.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()})},f.prototype.adjustHandles=function(){var t=w(this.selection,2),e=t[0],t=t[1];this.setHandlePosition("start",e),this.setHandlePosition("end",t)},Object.defineProperty(f.prototype,"handleBBox",{get:function(){if(!this.cacheHandleBBox){if(!this.attributes.showHandle)return new Hg(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=w([Math.max(e,r),Math.max(t,n)],2),r=e[0],t=e[1];this.cacheHandleBBox=new Hg(0,0,r,t)}return this.cacheHandleBBox},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"handleShape",{get:function(){var t=this.handleBBox,e=t.width,t=t.height,n=w(this.ifHorizontal([t,e],[e,t]),2);return{width:e,height:t,size:n[0],length:n[1]}},enumerable:!1,configurable:!0}),f.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=w(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})},f.prototype.renderIndicator=function(t){var e=_(this.attributes,"indicator");this.indicator=t.maybeAppendByClassName(yb.indicator,function(){return new kb({})}).update(e)},Object.defineProperty(f.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(v(v({},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=w([e.value,i.value],2))[0])+(r=r[1]))/2,t.push(v(v({},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(f.prototype,"labelStyle",{get:function(){var t=w(["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}),f.prototype.renderLabel=function(t){var e=this.attributes,n=e.showTick,n=void 0!==n&&n,r=e.labelFilter,e=e.labelFormatter,i=_(this.attributes,"label"),a=i.align,o=_(i,"tick"),i=_(i,"tick",!0),n=$g(v({showLine:!1,showGrid:!1,showTick:n,type:"linear",startPos:[0,0],endPos:[0,0],tickDirection:"negative",labelTransform:"rotate(0)"},this.labelStyle),Py(o,"tick"),Py(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=v(v({},n),o);this.label=t.maybeAppendByClassName(yb.label,function(){return new Yv({style:s})}).node(),this.label.update(s,!1)},Object.defineProperty(f.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=w([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}),f.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=w(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))},f.prototype.bindEvents=function(){this.ribbon.on("pointerdown",this.onDragStart("ribbon")),this.ribbon.on("pointermove",this.onHovering),this.addEventListener("pointerout",this.hideIndicator)},f.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=Ye(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}),Pg(this.indicator.node())):this.hideIndicator()},f.prototype.hideIndicator=function(){Ng(this.indicator.node())},f.prototype.updateMouse=function(){this.attributes.slidable&&(this.style.cursor="grabbing")},f.prototype.setSelection=function(t,e){this.updateSelection(t,e)},f.prototype.updateSelection=function(t,e,n){void 0===n&&(n=!1);var r,i,a,o,s,l=w(this.selection,2),c=l[0],l=l[1],t=w([t,e],2),e=t[0],t=t[1],n=(n&&(e+=c,t+=l),this.range),c=n.min,l=n.max,u=w((n=[c,l],c=[e,t],l=this.selection,void 0===r&&(r=4),i=(n=w(n,2))[0],n=n[1],a=(c=w(c,2))[0],c=c[1],o=(l=w(l,2))[0],l=l[1],c=(a=w([a,c],2))[0],s=(a=a[1])-c,a<c&&(c=(u=w([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]:[yy(c,r),yy(a,r)]),2),e=u[0],t=u[1];this.update({defaultValue:[e,t]}),this.dispatchSelection()},Object.defineProperty(f.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 Je(t)?yy(.01*(e-n),0):t},enumerable:!1,configurable:!0}),f.prototype.getTickValue=function(t){var e=this.attributes,n=e.data,e=e.block,r=this.range.min;return e?Ob(n.map(function(t){return t.value}),t).tick:(e=this.step,r+Math.round((t-r)/e)*e)},f.prototype.getValueByCanvasPoint=function(t,e){var n=this.range,r=n.min,n=n.max,i=w(this.ribbon.node().getPosition(),2),a=i[0],i=i[1],a=this.ifHorizontal(a,i),i=this.ifHorizontal.apply(this,y([],w(Zg(t)),!1));return Ye(this.getOffset(i-a,!0),r,n)},f.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)},f.prototype.dispatchSelection=function(){var t=new X.CustomEvent("valuechange",{detail:{value:this.selection}});this.dispatchEvent(t)},f.prototype.dispatchIndicated=function(t,e){t=new X.CustomEvent("indicate",{detail:{value:t,range:e}});this.dispatchEvent(t)},f);function f(t){var a=jb.call(this,t,gb)||this;return a.eventToOffsetScale=new Bp({}),a.innerRibbonScale=new Bp({}),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=Ob(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(),w(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 Db(t){Cb||(Cb=document.createElement("table"),Bb=document.createElement("tr"),Rb=/^\s*<(\w+|!)[^>]*>/,Bb={tr:document.createElement("tbody"),tbody:Cb,thead:Cb,tfoot:Cb,td:Bb,th:Bb,"*":document.createElement("div")});var e=Rb.test(t)&&RegExp.$1,e=(e&&e in Bb||(e="*"),Bb[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}var zb,Wb,Gb,Hb="tooltip",Vb="tooltip-title",qb="tooltip-list",Yb="tooltip-list-item",$b="tooltip-list-item-name",Ub="tooltip-list-item-marker",Kb="tooltip-list-item-name-label",Xb="tooltip-list-item-value",Po="tooltip-crosshair-x",jo="tooltip-crosshair-y",c={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"},Zb=((Co={})[".".concat(Hb)]={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"},Co[".".concat(Vb)]={color:"rgba(0, 0, 0, 0.45)"},Co[".".concat(qb)]={margin:"0px","list-style-type":"none",padding:"0px"},Co[".".concat(Yb)]={"list-style-type":"none",display:"flex","line-height":"2em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},Co[".".concat(Ub)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},Co[".".concat($b)]={display:"flex","align-items":"center","max-width":"216px"},Co[".".concat(Kb)]=v({flex:1},c),Co[".".concat(Xb)]=v({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},c),Co[".".concat(Po)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},Co[".".concat(jo)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},Co),Qb=(t(Jb,zb=Ao),Object.defineProperty(Jb.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),Jb.prototype.getContainer=function(){return this.element},Object.defineProperty(Jb.prototype,"position",{set:function(t){var t=w(t,2),e=t[0],t=t[1];this.attributes.x=e,this.attributes.y=t,this.updatePosition()},enumerable:!1,configurable:!0}),Object.defineProperty(Jb.prototype,"elementSize",{get:function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},enumerable:!1,configurable:!0}),Object.defineProperty(Jb.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=et(t,["name","color","index"]),r=v({name:r,color:i,index:null!=a?a:e},t);return Db((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}),Jb.prototype.render=function(t,e){this.renderHTMLTooltipElement(),this.updatePosition()},Jb.prototype.destroy=function(){var t;null!=(t=this.element)&&t.remove(),zb.prototype.destroy.call(this)},Jb.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"},Jb.prototype.hide=function(){this.element.style.visibility="hidden"},Jb.prototype.initShape=function(){var t=this.attributes.template;this.element=Db(t.container),this.id&&this.element.setAttribute("id",this.id)},Jb.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))},Jb.prototype.renderHTMLTooltipElement=function(){var r,t=this.attributes,e=t.template,n=t.title,i=t.enterable,a=t.style,t=t.content,o=this.element;this.element.style.pointerEvents=i?"auto":"none",t?this.renderCustomContent():(n?(o.innerHTML=e.title,o.getElementsByClassName(Vb)[0].innerHTML=n):null!=(t=null==(i=o.getElementsByClassName(Vb))?void 0:i[0])&&t.remove(),e=this.HTMLTooltipItemsElements,(n=document.createElement("ul")).className=qb,n.replaceChildren.apply(n,y([],w(e),!1)),(i=this.element.querySelector(".".concat(qb)))?i.replaceWith(n):o.appendChild(n)),r=o,Object.entries(a).forEach(function(t){var t=w(t,2),e=t[0],n=t[1];y([r],w(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(":"),";")},""))})})},Jb.prototype.getRelativeOffsetFromCursor=function(t){var e=this.attributes,n=e.position,i=e.offset,e=t||n,t=("auto"===e?"bottom-right":e).split("-"),a={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},n=this.elementSize,o=n.width,s=n.height,l=[-o/2,-s/2];return t.forEach(function(t){var e=w(l,2),n=e[0],e=e[1],t=w(a[t],2),r=t[0],t=t[1];l=[n+(o/2+i[0])*r,e+(s/2+i[1])*t]}),l},Jb.prototype.setOffsetPosition=function(t){var t=w(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")},Jb.prototype.updatePosition=function(){this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor()))},Jb.prototype.autoPosition=function(t){var e,n,r,i,t=w(t,2),a=t[0],t=t[1],o=this.attributes,s=o.x,l=o.y,c=o.bounding,u=o.position,o=o.defaultPosition;return"auto"!==u?[a,t]:(e=(u=this.element).offsetWidth,u=u.offsetHeight,a=(s=w([+s+a,+l+t],2))[0],l=s[1],n={left:"right",right:"left",top:"bottom",bottom:"top"},t=c.x,s=c.y,r={left:a<t,right:t+c.width<a+e,top:l<s,bottom:s+c.height<l+u},i=[],o.split("-").forEach(function(t){i.push(r[t]?n[t]:t)}),t=i.join("-"),this.getRelativeOffsetFromCursor(t))},Jb.tag="tooltip",e([(void 0===(Wb=100)&&(Wb=0),void 0===(Gb=!0)&&(Gb=!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,Gb&&i.apply(t,e),r=window.setTimeout(function(){i.apply(t,e),r=null},Wb))})})],Jb.prototype,"updatePosition",null),Jb);function Jb(t){t=zb.call(this,t,{data:[],x:0,y:0,visibility:"visible",title:"",position:"bottom-right",defaultPosition:"bottom-right",offset:[5,5],enterable:!1,container:{x:0,y:0},bounding:{x:0,y:0,width:0,height:0},template:{container:'<div class="'.concat(Hb,'"></div>'),title:'<div class="'.concat(Vb,'"></div>'),item:'<li class="'.concat(Yb,'" data-index={index}>\n <span class="').concat($b,'">\n <span class="').concat(Ub,'" style="background:{color}"></span>\n <span class="').concat(Kb,'" title="{name}">{name}</span>\n </span>\n <span class="').concat(Xb,'" title="{value}">{value}</span>\n </li>')},style:Zb})||this;return t.prevCustomContentKey=t.attributes.contentKey,t.initShape(),t.render(t.attributes,t),t}var t2,e2={default:{sizeStyle:{width:44,height:22,radius:11},tagStyle:{textStyle:{fontSize:12,lineHeight:16,fill:"#fff"},padding:0},markerStyle:{size:11}},small:{sizeStyle:{width:28,height:16,radius:8},tagStyle:{textStyle:{fontSize:10,lineHeight:14,fill:"#fff"},padding:0},markerStyle:{size:8}},mini:{sizeStyle:{width:20,height:14,radius:7},tagStyle:{textStyle:{fontSize:7,lineHeight:10,fill:"#fff"},padding:0},markerStyle:{size:7}}};function n2(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!0);var r=Number(t.style.height)-2*e;return{x:n?Number(t.style.width)+Number(t.style.x)-e-r:Number(t.style.x)+e,y:Number(t.style.y)+e,width:r,height:r,radius:r/2}}function r2(t){return t2.call(this,t,{x:0,y:0,size:"default",spacing:2,checked:!0,disabled:!1})||this}t(r2,t2=Ao),r2.prototype.render=function(t,e){var i=this,n=t.size,a=t.spacing,r=t.disabled,o=t.checked,s=t.unCheckedChildren,t=t.checkedChildren,e=(this.attributes,O(e).maybeAppendByClassName("switch-content","g").node()),l=e.getLocalBounds(),n=fn(e2,n,e2.default),c=n.sizeStyle,u=n.tagStyle,f=r?"no-drop":"pointer",n=o?"#1890FF":"#00000040",h=c,d=o?t:s,p=((t||s)&&O(e).maybeAppendByClassName("switch-tag",function(){return new Ky({})}).call(function(t){var e,t=t.node(),n=(t.update(v(v({cursor:f,backgroundStyle:null,text:!1,marker:!1},u),d)),null==t?void 0:t.getLocalBounds()),r=n.max,n=n.min,i=r[0]-n[0]+c.radius,r=r[1]-n[1],n=Math.max(i+c.height+2,c.width);h=v(v({},c),{width:n}),t.update((t={x:l.min[0],y:l.min[1],width:n,height:h.height},n={width:i,height:r},i=h.radius,r=o,e=n.width,n=n.height,void 0===i&&(i=0),{x:(r=void 0===o?!0:r)?Number(t.x)+i:Number(t.width)+Number(t.x)-e,y:Number(t.y)+(Number(t.height)-n)/2}))}),O(e).maybeAppendByClassName("switch-background","rect").styles(v({zIndex:(e.style.zIndex||0)-1,x:l.min[0],y:l.min[1],fill:n,cursor:f,fillOpacity:r?.4:1},h)).node()),g=O(e).maybeAppendByClassName("switch-background-stroke","rect").styles(v({zIndex:(e.style.zIndex||0)-2,x:l.min[0],y:l.min[1],stroke:n,lineWidth:0},h)).node();O(e).maybeAppendByClassName("switch-handle","rect").styles({fill:"#fff",cursor:f}).call(function(t){var e,t=t.node(),n=n2(p,a,o),r=n2(p,a,!o);t.attr("x")&&!un(n,r)&&i.checked!==o?(t.attr(r),null!=(e=t.getAnimations()[0])&&e.cancel(),null!=(e=g.getAnimations()[0])&&e.cancel(),t.animate([{x:r.x},{x:n.x}],{duration:120,fill:"both"}),g.animate([{lineWidth:0,strokeOpacity:.5},{lineWidth:14,strokeOpacity:0}],{duration:400,easing:"ease-on"})):t.attr(n)}),this.checked=!!o},r2.tag="switch";var i2,a2,o2,s2,l2={tagText:"",lineStroke:"#416180",lineStrokeOpacity:.45,lineLineWidth:1,lineLineDash:[5,5]},us=$g({},l2,{type:"line",tagPosition:"start",tagAlign:"center",tagVerticalAlign:"bottom"}),go=$g({},l2,{type:"circle",defaultRadius:0}),fo=$g({},l2,{type:"polygon",defaultRadius:0,startAngle:0}),gs=(t(c2,i2=Ao),Object.defineProperty(c2.prototype,"localPointer",{get:function(){var t=w(this.getPosition(),2),e=t[0],t=t[1],n=w(this.pointer,2);return[n[0]-e,n[1]-t]},enumerable:!1,configurable:!0}),Object.defineProperty(c2.prototype,"tagStyle",{get:function(){return _(this.attributes,"tag")},enumerable:!1,configurable:!0}),Object.defineProperty(c2.prototype,"crosshairStyle",{get:function(){var t=_(this.attributes,"line");return v(v({},t),{path:this.crosshairPath})},enumerable:!1,configurable:!0}),c2.prototype.render=function(t,e){var e=O(e).maybeAppendByClassName(".crosshair-group","g").node(),n=(this.shapesGroup=e,this.tagStyle),r=this.crosshairStyle;this.tagShape=O(e).maybeAppendByClassName("crosshair-tag",function(){return new Ky({style:n})}).styles(n).node(),this.crosshairShape=O(e).maybeAppendByClassName(".crosshair-path","path").styles(r).node(),this.adjustLayout()},c2.prototype.setPointer=function(t){this.pointer=t},c2.tag="crosshair-base",c2);function c2(t){return i2.call(this,t,l2)||this}function u2(t){return a2.call(this,$g({},u2.defaultOptions,t))||this}function f2(t){return o2.call(this,$g({},f2.defaultOptions,t))||this}function h2(t){return s2.call(this,$g({},h2.defaultOptions,t))||this}t(u2,a2=gs),Object.defineProperty(u2.prototype,"crosshairPath",{get:function(){var t=this.attributes,e=w(t.startPos,2),n=e[0],e=e[1],t=w(t.endPos,2);return[["M",0,0],["L",t[0]-n,t[1]-e],["Z"]]},enumerable:!1,configurable:!0}),Object.defineProperty(u2.prototype,"localPointer",{get:function(){var t,e,n;return this.pointer?(t=(e=w(this.getPosition(),2))[0],e=e[1],[(n=w(this.pointer,2))[0]-t,n[1]-e]):this.attributes.startPos},enumerable:!1,configurable:!0}),Object.defineProperty(u2.prototype,"isVertical",{get:function(){var t=this.attributes,e=w(t.startPos,2),n=e[0],e=e[1],t=w(t.endPos,2),r=t[0],t=t[1];return n===r&&e!==t},enumerable:!1,configurable:!0}),Object.defineProperty(u2.prototype,"tagShapeSpace",{get:function(){var t,e=(t=(t=this.tagShape)&&t.getRenderBounds())?(e=t.getMax(),t=t.getMin(),{width:e[0]-t[0],height:e[1]-t[1]}):{width:0,height:0};return{width:e.width,height:e.height}},enumerable:!1,configurable:!0}),u2.prototype.update=function(t){a2.prototype.update.call(this,t)},u2.prototype.setPointer=function(t){a2.prototype.setPointer.call(this,t),this.adjustPosition()},u2.prototype.setText=function(t){this.tagShape.update({text:t}),this.adjustTag()},u2.prototype.adjustLayout=function(){this.adjustPosition(),this.adjustTag()},u2.prototype.adjustPosition=function(){var t=w(this.localPointer,2),e=t[0],t=t[1],n=w(this.attributes.startPos,2),r=n[0],n=n[1],r=this.getOrientVal([r,t],[e,n]);this.shapesGroup.setLocalPosition(r)},u2.prototype.adjustTag=function(){var t,e=this.attributes,n=e.tagText,r=e.tagPosition,i=w(e.startPos,2),a=i[0],i=i[1],e=w(e.endPos,2),o=e[0],e=e[1];n&&""!==n?(Pg(this.tagShape),t=(n=this.tagShapeSpace).width,n=n.height,a=(o=w(this.getOrientVal({start:[-t/2,n/2],end:[o-a+t/2,n/2]},{start:[0,0],end:[0,e-i+n]})[r],2))[0],t=o[1],this.tagShape.setLocalPosition(a,t)):Ng(this.tagShape)},u2.prototype.getOrientVal=function(t,e){return this.isVertical?e:t},u2.tag="line-crosshair",u2.defaultOptions={style:us},t(f2,o2=gs),Object.defineProperty(f2.prototype,"crosshairPath",{get:function(){return this.createCirclePath()},enumerable:!1,configurable:!0}),f2.prototype.update=function(t){o2.prototype.update.call(this,t)},f2.prototype.setPointer=function(t){var t=w(t,2),e=t[0],t=t[1],e=(o2.prototype.setPointer.call(this,[e,t]),w(this.localPointer,2)),t=e[0],e=e[1],n=w(this.attributes.center,2),r=n[0],n=n[1],t=this.createCirclePath(Math.pow(Math.pow(t-r,2)+Math.pow(e-n,2),.5));this.crosshairShape.attr({path:t})},f2.prototype.adjustLayout=function(){Ng(this.tagShape)},f2.prototype.createCirclePath=function(t){var e=this.attributes,n=w(e.center,2),r=n[0],n=n[1],e=e.defaultRadius;return Wy(r,n,t||e)},f2.tag="circle-crosshair",f2.defaultOptions={style:go},t(h2,s2=gs),Object.defineProperty(h2.prototype,"crosshairPath",{get:function(){return this.createPolygonPath()},enumerable:!1,configurable:!0}),h2.prototype.update=function(t){s2.prototype.update.call(this,t)},Object.defineProperty(h2.prototype,"points",{get:function(){for(var t,e,n,r,i,a,o=this.attributes,s=o.startAngle,l=o.sides,c=2*Math.PI/l,u=[1,0],f=[],h=0;h<l;h+=1)f.push((t=u,e=[0,0],n=s/180*Math.PI+c*h,a=r=i=r=void 0,r=(t=w(t,2))[0],t=t[1],i=(e=w(e,2))[0],e=e[1],r-=i,t-=e,a=Math.sin(n),n=Math.cos(n),[r*n-t*a+i,r*a+t*n+e]));return f},enumerable:!1,configurable:!0}),h2.prototype.setPointer=function(t){var t=w(t,2),e=t[0],t=t[1],e=(s2.prototype.setPointer.call(this,[e,t]),w(this.localPointer,2)),t=e[0],e=e[1],n=this.attributes.center,r=w(this.intersection([t,e]),2),i=r[0],r=r[1];i&&r&&(t=ey(n,[t,e])/ey(n,[i,r]),e=this.createPolygonPath(t),this.crosshairShape.attr({path:e}))},h2.prototype.adjustLayout=function(){Ng(this.tagShape)},h2.prototype.createPolygonPath=function(r){var t=this.attributes,i=t.defaultRadius,t=w(t.center,2),a=t[0],o=t[1],t=this.points.map(function(t,e){var t=w(t,2),t=w(cy([t[0],t[1]],r||i),2),n=t[0],t=t[1];return[0===e?"M":"L",a+n,o+t]});return t.push(["Z"]),t},h2.prototype.intersection=function(t){for(var e,n,r,i,a,o,s,l,t=w(t,2),c=t[0],u=t[1],f=this.points,t=w(this.attributes.center,2),h=t[0],d=t[1],p=1;p<=f.length;p+=1){var g=w(f[p-1],2),y=g[0],g=g[1],m=w(f[p%f.length],2),v=m[0],m=m[1],y=(i=[h,d],y=[y+h,g+d],g=[v+h,m+d],l=s=o=a=m=v=void 0,m=(r=w(r=[c,u],2))[0],r=r[1],a=(i=w(i,2))[0],i=i[1],o=(y=w(y,2))[0],y=y[1],s=(g=w(g,2))[0],g=g[1],l=[],(g-y)*(a-m)==(i-r)*(s-o)?(i-r)*(o-m)==(y-r)*(a-m)&&(Jg(m,a,r,i,o,y)&&ty(l,o,y),Jg(m,a,r,i,s,g)&&ty(l,s,g),Jg(o,s,y,g,m,r)&&ty(l,m,r),Jg(o,s,y,g,a,i))&&ty(l,a,i):(v=(m*(i-r)+y*(a-m)-r*(a-m)-o*(i-r))/((s-o)*(i-r)-(a-m)*(g-y)),0<=(g=(o*(g-y)+r*(s-o)-y*(s-o)-m*(g-y))/((a-m)*(g-y)-(s-o)*(i-r)))&&g<=1&&0<=v&&v<=1&&(l[0]=m+g*(a-m),l[1]=r+g*(i-r))),l);0!==y.length&&(e=(s=w(y,2))[0],n=s[1])}return[e,n]},h2.tag="polygon-crosshair",h2.defaultOptions={style:fo};var d2,p2=Py({fill:"rgba(0,0,0,0.45)",fontSize:10,textAlign:"start",textBaseline:"middle",overflow:"clip"},"label"),g2={default:{width:12,height:12,radius:2,stroke:"#dadada",lineWidth:1,fill:"#ffffff",cursor:"pointer"},selected:{width:12,height:12,radius:2,stroke:"#3471F9",lineWidth:1,fill:"#3471F9",cursor:"pointer"}},y2={path:[["M",3,6],["L","5","8.5"],["L","8.5","4"]],lineWidth:1,cursor:"pointer"};function m2(t){return d2.call(this,t,v({x:0,y:0,labelText:"",spacing:4,checked:!1},p2))||this}t(m2,d2=Ao),m2.prototype.render=function(t,e){var n=t.checked,r=t.spacing,n=(this.checked=!!n,Sy(e,".checkbox-content","g").attr("className","checkbox-content").node()),e=_(t,"box"),i=_(t,"checked"),t=_(t,"label"),e=v(v({},this.checked?g2.selected:g2.default),e),i=v(v({},y2),i),i=(this.checkboxBoxShape=Sy(n,".checkbox-box","rect").styles(v({className:"checkbox-box",zIndex:(n.style.zIndex||0)-1},e)).node(),Sy(this.checkboxBoxShape,".checkbox-checked","path").styles(v({className:"checkbox-box-checked",stroke:"#fff"},i)),e=this.checkboxBoxShape,i=Number(r),{x:(r=e.getLocalBounds()).halfExtents[0]?r.max[0]+(i||0):e.style.x,y:r.halfExtents[1]?(r.min[1]+r.max[1])/2:e.style.y}),r=i.x,e=i.y;Sy(n,".checkbox-label","text").styles(v({className:"checkbox-label",x:r,y:e},t))},m2.tag="checkbox";var v2="gui-poptip",b2="gui-poptip-arrow",x2="gui-poptip-text",w2=((l={})[".".concat(v2)]={visibility:"visible",position:"absolute","background-color":"rgba(0, 0, 0)","box-shadow":"0px 0px 10px #aeaeae","border-radius":"3px",color:"#fff",opacity:.8,"font-size":"12px",padding:"4px 6px",display:"flex","justify-content":"center","align-items":"center","z-index":8,transition:"visibility 50ms"},l[".".concat(x2)]={"text-align":"center"},l[".".concat(v2,"[data-position='top']")]={transform:"translate(-50%, -100%)"},l[".".concat(v2,"[data-position='left']")]={transform:"translate(-100%, -50%)"},l[".".concat(v2,"[data-position='right']")]={transform:"translate(0, -50%)"},l[".".concat(v2,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},l[".".concat(v2,"[data-position='top-left']")]={transform:"translate(0,-100%)"},l[".".concat(v2,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},l[".".concat(v2,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},l[".".concat(v2,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},l[".".concat(v2,"[data-position='right-top']")]={transform:"translate(0, 0)"},l[".".concat(v2,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},l[".".concat(v2,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},l[".".concat(v2,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},l[".".concat(b2)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},l[".".concat(v2,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},l["[data-position='top'] .".concat(b2)]={bottom:"-2px"},l[".".concat(v2,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},l["[data-position='left'] .".concat(b2)]={right:"-2px"},l[".".concat(v2,"[data-position='right']")]={transform:"translate(5px, -50%)"},l["[data-position='right'] .".concat(b2)]={left:"-2px"},l[".".concat(v2,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},l["[data-position='bottom'] .".concat(b2)]={top:"-2px"},l[".".concat(v2,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},l["[data-position='top-left'] .".concat(b2)]={left:"10px",bottom:"-2px"},l[".".concat(v2,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},l["[data-position='top-right'] .".concat(b2)]={right:"10px",bottom:"-2px"},l[".".concat(v2,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},l["[data-position='left-top'] .".concat(b2)]={right:"-2px",top:"8px"},l[".".concat(v2,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},l["[data-position='left-bottom'] .".concat(b2)]={right:"-2px",bottom:"8px"},l[".".concat(v2,"[data-position='right-top']")]={transform:"translate(5px, 0)"},l["[data-position='right-top'] .".concat(b2)]={left:"-2px",top:"8px"},l[".".concat(v2,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},l["[data-position='right-bottom'] .".concat(b2)]={left:"-2px",bottom:"8px"},l[".".concat(v2,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},l["[data-position='bottom-left'] .".concat(b2)]={top:"-2px",left:"8px"},l[".".concat(v2,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},l["[data-position='bottom-right'] .".concat(b2)]={top:"-2px",right:"8px"},l),k2=void 0;var M2;function O2(t){var e=t&&document.getElementById(t);return e||((e=document.createElement("div")).setAttribute("id",t),document.body.appendChild(e)),e}function _2(t){var n,r;return n=O2,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r=r||n.apply(k2,t)}(t)}function S2(t){t=M2.call(this,nt({style:{id:"gui-poptip"}},S2.defaultOptions,t))||this;return t.visibility="visible",t.map=new Map,t.domStyles="",t.initShape(),t.render(t.attributes,t),t}t(S2,M2=Ao),Object.defineProperty(S2.prototype,"visible",{get:function(){return"visible"===this.visibility},enumerable:!1,configurable:!0}),S2.prototype.render=function(t,e){this.visibility=this.style.visibility,this.updatePoptipElement()},S2.prototype.update=function(t){this.attr(nt({},this.style,t)),this.render(this.attributes,this)},S2.prototype.bind=function(u,f){var h,t,e,d=this;u&&(h=this.style.text,e=function(){d.hideTip()},u.addEventListener("mousemove",t=function(t){var e,n,r=u,i=d.style,a=h,o=(f&&(n=(s="function"==typeof f?f.call(null,t):f).html,e=s.target,s=et(s,["html","target"]),c={},o=d.style,s=s,o&&en(c,o),s&&en(c,s),l&&en(c,l),i=c,!e&&!1!==e||(r=e),"string"==typeof n)&&(a=n),i.position),s=i.arrowPointAtCenter,l=i.follow,c=i.offset;r?(n=(e=w(function(t,e,n,r,i,a){if(void 0===i&&(i=!1),a=void 0===a?!1:a)return[t,e];var o=(a=n.getBoundingClientRect()).x,s=a.y,l=a.width,c=a.height;switch(r){case"top":return i?[o+l/2,s]:[t,s];case"left":return i?[o,s+c/2]:[o,e];case"bottom":return i?[o+l/2,s+c]:[t,s+c];case"right":return i?[o+l,s+c/2]:[o+l,e];case"top-right":case"right-top":return[o+l,s];case"left-bottom":case"bottom-left":return[o,s+c];case"right-bottom":case"bottom-right":return[o+l,s+c];default:return[o,s]}}(t.clientX,t.clientY,r,o,s,l),2))[0],i=e[1],d.showTip(n,i,{text:a,position:o,offset:c})):d.hideTip()}),u.addEventListener("mouseleave",e),this.map.set(u,[t,e]))},S2.prototype.unbind=function(t){var e,n;this.map.has(t)&&(e=(n=w(this.map.get(t)||[],2))[0],n=n[1],e&&t.removeEventListener("mousemove",e),n&&t.removeEventListener("mouseleave",n),this.map.delete(t))},S2.prototype.clear=function(){this.container.innerHTML=""},S2.prototype.destroy=function(){var t,e=this;y([],w(this.map.keys()),!1).forEach(function(t){return e.unbind(t)}),null!=(t=this.container)&&t.remove(),M2.prototype.destroy.call(this)},S2.prototype.showTip=function(t,e,n){var r,i=fn(n,"text");i&&"string"!=typeof i||(this.applyStyles(),t&&e&&n&&(r=n.offset,(n=n.position)&&this.container.setAttribute("data-position",n),this.setOffsetPosition(t,e,r),"string"==typeof i&&(n=this.container.querySelector(".".concat(x2)))&&(n.innerHTML=i),this.visibility="visible",this.container.style.visibility="visible"))},S2.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},S2.prototype.getContainer=function(){return this.container},S2.prototype.getClassName=function(){var t=this.style.containerClassName;return"".concat(v2).concat(t?" ".concat(t):"")},S2.prototype.initShape=function(){var t=this,e=this.style.id;this.container=_2(e),this.container.className=this.getClassName(),this.container.addEventListener("mousemove",function(){return t.showTip()}),this.container.addEventListener("mouseleave",function(){return t.hideTip()})},S2.prototype.updatePoptipElement=function(){var t=this.container,e=(this.clear(),this.style),n=e.id,r=e.template,e=e.text,n=(this.container.setAttribute("id",n),this.container.className=this.getClassName(),'<span class="'.concat(b2,'"></span>'));t.innerHTML=n,qe(r)?t.innerHTML+=r:r&&tn(r)&&t.appendChild(r),e&&(t.getElementsByClassName(x2)[0].textContent=e),this.applyStyles(),this.container.style.visibility=this.visibility},S2.prototype.applyStyles=function(){var t,e=$g({},w2,this.style.domStyles),e=Object.entries(e).reduce(function(t,e){var e=w(e,2),n=e[0],e=e[1],e=Object.entries(e).reduce(function(t,e){var e=w(e,2),n=e[0],e=e[1];return"".concat(t).concat(n,": ").concat(e,";")},"");return"".concat(t).concat(n,"{").concat(e,"}")},"");this.domStyles!==e&&(this.domStyles=e,(t=this.container.querySelector("style"))&&this.container.removeChild(t),(t=document.createElement("style")).innerHTML=e,this.container.appendChild(t))},S2.prototype.setOffsetPosition=function(t,e,n){var n=w(n=void 0===n?this.style.offset:n,2),r=n[0],n=n[1],n=void 0===n?0:n;this.container.style.left="".concat(t+(void 0===r?0:r),"px"),this.container.style.top="".concat(e+n,"px")},S2.tag="poptip",S2.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:w2,template:'<div class="'.concat(x2,'"></div>')}};t(A2,E2=X.Group),Object.defineProperty(A2.prototype,"margin",{get:function(){return this.$margin},set:function(t){this.$margin=Ey(t)},enumerable:!1,configurable:!0}),Object.defineProperty(A2.prototype,"padding",{get:function(){return this.$padding},set:function(t){this.$padding=Ey(t)},enumerable:!1,configurable:!0}),A2.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=w(this.$margin,4),a=i[0],o=i[1],s=i[2],i=i[3];return new Hg(e-i,n-a,r+i+o,t+a+s)},A2.prototype.appendChild=function(t,e){return t.isMutationObserved=!0,E2.prototype.appendChild.call(this,t,e),t},A2.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,t=t.height,n=w(this.$padding,4),r=n[0],i=n[1],a=n[2],n=n[3],o=w(this.$margin,4),s=o[0],o=o[3];return new Hg(n+o,r+s,e-n-i,t-r-a)},A2.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:sy,grid:ly})?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){}},A2.prototype.bindEvents=function(){var e=this;this.layoutEvents.forEach(function(t){e.addEventListener(t,function(t){t.target.isMutationObserved=!0,e.layout()})})},A2.prototype.attributeChangedCallback=function(t,e,n){"margin"===t?this.margin=n:"padding"===t&&(this.padding=n),this.layout()};var E2,cs=A2;function A2(t){var e=E2.call(this,t)||this,t=(e.layoutEvents=[X.ElementEvent.BOUNDS_CHANGED,X.ElementEvent.INSERTED,X.ElementEvent.REMOVED],e.$margin=Ey(0),e.$padding=Ey(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}X.runtime.enableCSSParsing=!1;function L2(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 E1()([[0,0],[s,l]]);s=[[t-a,i-o]].concat(e.length?e:[0,0]);const c=[n[0]-a,n[1]-o],[u,f]=s;return l=c,t=u,i=f,e=p0(l,t),t=p0(t,i),i=p0(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])),E1()(s)}const T2=eg(t=>{var e=t.attributes,{x:n,y:r,x0:i=n,y0:a=r,background:o,connector:s,startMarker:l,endMarker:c,coordCenter:u}=e,e=et(e,["class","transform","rotate","x","y","x0","y0","background","connector","startMarker","endMarker","coordCenter"]),f=rt(e,"background"),h=f["padding"],f=et(f,["padding"]),d=rt(e,"connector"),{points:p=[]}=d,d=et(d,["points"]),i=[[+i,+a],[+n,+r]],a=it(t).maybeAppend("text","text").style("zIndex",0).call(L,Object.assign({textBaseline:"middle"},e)).node(),n=L2(it(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}}(a,h)).call(L,o?f:{}).node(),i,p,u),r=l&&new Yy({id:"startMarker",style:Object.assign({x:0,y:0},rt(e,"startMarker"))}),a=c&&new Yy({id:"endMarker",style:Object.assign({x:0,y:0},rt(e,"endMarker"))});it(t).maybeAppend("connector","path").style("zIndex",0).style("path",n).style("markerStart",r).style("markerEnd",a).call(L,s?d:{})}),P2=t=>{const l=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=et(_0(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 it(new T2).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()}};P2.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const N2=eg(t=>{var e=et(t.attributes,["class","x","y"]);const n=rt(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])]}(it(t).maybeAppend("marker",()=>new Yy({})).call(t=>t.node().update(Object.assign({symbol:r},n))).node());it(t).maybeAppend("text","text").style("x",i).style("y",a).call(L,e)}),j2=t=>{const s=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=_0(r,i,a,o),i=r["defaultColor"],a=et(r,["defaultColor"]),{color:o,text:r=""}=e,e={text:String(r),stroke:o||i,fill:o||i},[[r,o]]=t;return it(new N2).call(L,a).style("x",r).style("y",o).call(L,e).call(L,s).node()}},C2=(j2.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},eg(t=>{var{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes;it(t).maybeAppend("connect-path",()=>new X.Path({})).style("d",n).call(L,i),it(t).maybeAppend("area-path",()=>new X.Path({})).style("d",e).call(L,r)}));const R2=t=>{const{curve:u,gradient:l=!1,defined:f=t=>!Number.isNaN(t)&&null!=t,connect:h=!1}=t,d=et(t,["curve","gradient","defined","connect"]);return(t,e,c,n)=>{var{mark:r,shape:i,defaultShape:a}=e,n=_0(n,r,i,a),r=n["defaultColor"],i=et(n,["defaultColor"]),{color:a=r,seriesColor:n,seriesX:r,seriesY:o}=e,e=E0(c,e),n=l&&n?k0(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,f=e[t],h=e[t+l];[...f,...h].some(t=>!n(t))?o=!0:(r.push(f),i.push(h),o&&s&&(o=!1,[c,u]=s,a.push([c,f,u,h])),s=[f,h])}return[r.concat(i),a]}(t,f),a=rt(s,"connect"),i=!!o.length,n=t=>it(new X.Path({})).style("d",t).call(L,s).node();return tu(c)?(e=t=>{const n=c.getCenter(),r=t.slice(0,t.length/2),i=t.slice(t.length/2);return t=A1().curve(L1),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 N1(a())},delete t.lineX0,t.lineEndAngle=function(){return N1(o())},delete t.lineX1,t.lineInnerRadius=function(){return N1(s())},delete t.lineY0,t.lineOuterRadius=function(){return N1(l())},delete t.lineY1,t.curve=function(t){return arguments.length?e(P1(t)):e()._curve},t.angle((t,e)=>y0(d0(r[e],n))).outerRadius((t,e)=>p0(r[e],n)).innerRadius((t,e)=>p0(i[e],n)).defined((t,e)=>[...r[e],...i[e]].every(f)).curve(u)(i);var e,a,o,s,l},!i||h&&!Object.keys(a).length?n(e(r)):i&&!h?n(e(t)):it(new C2).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(Jc(c)?A1().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(f)):A1().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(f))).curve(u)(n)},!i||h&&!Object.keys(a).length?n(e(r)):i&&!h?n(e(t)):it(new C2).style("areaStyle",s).style("connectStyle",Object.assign(Object.assign({},a),d)).style("areaPath",e(t)).style("connectPath",o.map(e).join("")).node())}},B2=(R2.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=tu(n)?H1:O1;return R2(Object.assign({curve:i},a))(t,e,n,r)}),I2=(B2.props=Object.assign(Object.assign({},R2.props),{defaultMarker:"point"}),t=>{const{alpha:a=.5}=t,o=et(t,["alpha"]);return(t,e,n,r)=>{var i=tu(n)?W1:D1;return R2(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),F2=(I2.props=Object.assign(Object.assign({},R2.props),{defaultMarker:"smooth"}),i=>(t,e,n,r)=>R2(Object.assign({curve:q1},i))(t,e,n,r)),D2=(F2.props=Object.assign(Object.assign({},R2.props),{defaultMarker:"hvh"}),i=>(t,e,n,r)=>R2(Object.assign({curve:Y1},i))(t,e,n,r)),z2=(D2.props=Object.assign(Object.assign({},R2.props),{defaultMarker:"vh"}),i=>(t,e,n,r)=>R2(Object.assign({curve:$1},i))(t,e,n,r)),W2=(z2.props=Object.assign(Object.assign({},R2.props),{defaultMarker:"hv"}),t=>{const l=t["arrowSize"],c=et(t,["arrowSize"]);return(t,e,n,r)=>{var i,{mark:a,shape:o,defaultShape:s}=e,r=_0(r,a,o,s),a=r["defaultColor"],o=et(r,["defaultColor"]),{color:s=a,transform:r}=e,[e,a]=t,t=d1();return t.moveTo(...e),t.lineTo(...a),l&&([e,i]=x0(e,a,{arrowSize:l}),t.moveTo(...a),t.lineTo(...e),t.moveTo(...a),t.lineTo(...i)),it(new X.Path).call(L,o).style("d",t.toString()).style("stroke",s).style("transform",r).call(L,c).node()}}),G2=(W2.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=_0(r,i,a,o),i=r["defaultColor"],a=et(r,["defaultColor"]),{color:o=i,transform:r}=e,[e,i]=t,t=d1();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]),it(new X.Path).call(L,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(L,s).node()}});G2.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const H2=t=>{const{cornerRatio:u=1/3}=t,f=et(t,["cornerRatio"]);return(t,e,n,r)=>{var i,a,{mark:o,shape:s,defaultShape:l}=e,r=_0(r,o,s,l),o=r["defaultColor"],s=et(r,["defaultColor"]),{color:l=o,transform:r}=e,[e,o]=t,c=(t=e,e=o,o=n,n=u,a=d1(),tu(o)?(i=p0(t,c=o.getCenter()),i=(p0(e,c)-i)*n+i,a.moveTo(t[0],t[1]),w0(a,t,e,c,i)):Jc(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 it(new X.Path).call(L,s).style("d",c.toString()).style("stroke",l).style("transform",r).call(L,f).node()}},V2=(H2.props={defaultMarker:"vhv",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=_0(r,i,a,o),i=r["defaultColor"],a=et(r,["defaultColor"]),{color:o=i,transform:r}=e,[e,i]=t,t=d1();return t.moveTo(e[0],e[1]),tu(n)?(n=n.getCenter(),t.quadraticCurveTo(n[0],n[1],i[0],i[1])):w0(t,e,i,b0(e,i),p0(e,i)/2),it(new X.Path).call(L,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(L,s).node()}}),q2=(V2.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const u=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=_0(r,i,a,o),i=r["defaultColor"],a=et(r,["defaultColor"]),{color:o=i,src:r="",size:e=32,transform:i=""}=e,{width:s=e,height:l=e}=u,[[t,c]]=t,t=t-Number(s)/2,s=c-Number(l)/2;return it(new X.Image).call(L,a).style("x",t).style("y",s).style("width",e).style("height",e).style("img",r).style("stroke",o).style("transform",i).call(L,u).node()}});q2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Y2=t=>{const l=et(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=_0(r,e,i,a),e=r["defaultColor"],i=et(r,["defaultColor"]),a=function(i,t){const a=d1();if(tu(t)){const o=t.getCenter();t=[...i,i[0]];const s=t.map(t=>p0(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?w0(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 it(new X.Path).call(L,i).style("d",a.toString()).style("stroke",o||e).style("fill",o||e).style("transform",s).call(L,l).node()}};Y2.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const $2=t=>{const l=et(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=_0(r,e,i,a),e=r["defaultColor"],i=et(r,["defaultColor"]),a=function(t,e){var n,[t,r,i,a]=t,o=d1();return tu(e)?(n=p0(e=e.getCenter(),t),o.moveTo(t[0],t[1]),o.quadraticCurveTo(e[0],e[1],i[0],i[1]),w0(o,i,a,e,n),o.quadraticCurveTo(e[0],e[1],r[0],r[1]),w0(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 it(new X.Path).call(L,i).style("d",a.toString()).style("fill",o||e).style("stroke",o||e).style("transform",s).call(L,l).node()}};$2.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const U2=t=>{const y=et(t,[]);return(t,e,n,r)=>{var i,a,o,s,l,c,u,{mark:e,shape:f,defaultShape:h,color:d,transform:p}=e,r=_0(r,e,f,h),{defaultColor:e,fill:f=e,stroke:h=e}=r,e=et(r,["defaultColor","fill","stroke"]),g=(r=t,t=n,n=d1(),tu(t)?([i,a]=t=t.getCenter(),o=g0(d0(r[0],t)),s=g0(d0(r[1],t)),g=p0(t,r[2]),l=p0(t,r[3]),c=p0(t,r[8]),u=p0(t,r[10]),t=p0(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 it(new X.Path).call(L,e).style("d",g.toString()).style("stroke",h).style("fill",d||f).style("transform",p).call(L,y).node()}};U2.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const K2=t=>{const s=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=_0(r,i,a,o),{defaultColor:i,lineWidth:a}=r,o=et(r,["defaultColor","lineWidth"]),{color:r=i,size:i=a}=e,t=(a=t,tu(t=n)?(t=t.getCenter(),w1()({startAngle:0,endAngle:2*Math.PI,outerRadius:p0(a[0],t),innerRadius:p0(a[1],t)})):E1().x(t=>t[0]).y(t=>t[1])(a)),a=(a=n,n=e.transform,tu(a)?([a,e]=a.getCenter(),`translate(${a}, ${e}) `+(n||"")):n);return it(new X.Path({})).call(L,o).style("d",t).style("stroke",r).style("lineWidth",i).style("transform",a).call(L,s).node()}};function X2(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}K2.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Z2=eg(t=>{var e=t.attributes,{points:n,endMarker:r=!0}=e,e=et(e,["points","class","endMarker","direction"]),i=rt(e,"endMarker"),n=(n=n,E1().x(t=>t[0]).y(t=>t[1])(n));it(t).maybeAppend("connector","path").style("path",n).style("markerEnd",r?new Yy({className:"marker",style:Object.assign(Object.assign({},i),{symbol:X2})}):null).call(L,e)});const Q2=t=>{const{offset:s=0,connectLength1:l}=t,c=et(t,["offset","connectLength1"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=_0(r,i,a,o),{defaultColor:i,connectLength1:a=l}=r,o=et(r,["defaultColor","connectLength1"]),{color:r,transform:e}=e,n=function(t,e,n,r=0){var[[e,i],[a,o]]=e;if(Jc(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 it(new Z2).call(L,o).style("points",n).style("stroke",r||i).style("transform",e).call(L,c).node()}};function J2(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=Xu(a.x,c),i=Xu(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 tx(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:f}=O0(e,i,[t,n]),h="inside"===r?(u+f)/2:f;e=nx(h,a,o),t=(()=>{var[t,e]=i,n=l+.5*(c-l),[n,t]="inside"===r?ex(s,h,n):b0(t,e);return{x:n,y:t}})();return Object.assign(Object.assign({},t),{textAlign:"inside"===r?"center":"start",textBaseline:"middle",rotate:e})}function ex(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function nx(t,e,n){return e?(e=n?0:Math.sin(t)<0?90:-90,t/Math.PI*180+e):0}function rx(t,e,n,r){var{y:n,y1:i,autoRotate:a,rotateToAlignArc:o,radius:s=.5,offset:l=0}=n,e=O0(r,e,[n,i]),{startAngle:n,endAngle:i}=e,r=r.getCenter(),n=(n+i)/2,i={textAlign:"center",textBaseline:"middle",rotate:nx(n,a,o)},{innerRadius:a,outerRadius:o}=e,[e,r]=ex(r,n,a+(o-a)*s+l);return Object.assign({x:e,y:r},i)}function ix(t,e,n){var n=n["bounds"],[n]=n;return{x:n[0],y:n[1]}}function ax(t,e,n,r){var i=n["bounds"];return 1===i.length?ix(0,0,n):(eu(r)?tx:au(r)?rx:J2)(t,e,n,r)}function ox(t,e,n){var{innerRadius:n,outerRadius:t}=O0(n,t,[e.y,e.y1]);return n+(t-n)}function sx(t,e,n){var{startAngle:n,endAngle:t}=O0(n,t,[e.y,e.y1]);return(n+t)/2}function lx(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,f=r.getCenter(),h=sx(e,n,r),d=0<Math.sin(h)?1:-1,i=nx(h,i,a),a={textAlign:0<d||eu(r)?"start":"end",textBaseline:"middle",rotate:i},i=ox(e,n,r),[[e,n],[r,f],[h,i]]=function(t,e,n,r,i){var[n,a]=ex(t,e,n),[t,r]=ex(t,e,r);return[[n,a],[t,r],[t+(0<Math.sin(e)?1:-1)*i,r]]}(f,h,i,i+(s?l:o),s?c:0),l=s?+u*d:0,o=h+l,c={connector:s,connectorPoints:[[r-o,f-i],[h-o,i-i]]};return Object.assign(Object.assign({x0:e,y0:n,x:h+l,y:i},a),c)}Q2.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var cx=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=Wc(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=g0(d0(l(e+1),s))/Math.PI*180;return{x:i[0],y:i[1],transform:`rotate(${l})`,textAlign:"center",textBaseline:"middle"}},bottom:ax,bottomLeft:ax,bottomRight:ax,inside:ax,left:ax,outside:function(t,e,n,r){var i=n["bounds"];return 1===i.length?ix(0,0,n):(eu(r)?tx:au(r)?lx:J2)(t,e,n,r)},right:ax,spider:function(t,e,n,r){var i,a,o,s,l,c;return au(r)?({connectorLength:c,connectorLength2:i,connectorDistance:a}=n,o=et(lx(0,e,n,r),[]),s=r.getCenter(),l=ox(e,n,r),e=sx(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 au(r)?({connectorLength:o,connectorLength2:i,connectorDistance:a}=n,{x0:n,y0:s}=e=et(lx(0,e,n,r),[]),l=r.getCenter(),r=function(t){if(au(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=y0([n-l[0],s-l[1]]),n=0<Math.sin(o)?1:-1,[s,l]=ex(l,o,r),e.x=s+(i+a)*n,e.y=l,e):{}},top:ax,topLeft:ax,topRight:ax});function ux(t,e,n,r,i){var a=e["position"],a=(o=n,void 0!==(a=a)?a:au(o)?"inside":Jc(o)?"right":"top"),o=r["inside"===a?"innerLabel":"label"],r=Object.assign({},o,e),e=cx[a.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})];if(e)return Object.assign(Object.assign({},o),e(a,t,r,n,i));throw new Error("Unknown position: "+a)}const fx=o=>(t,e,n,r)=>{var i=e["text"],a=et(e,["text","x","y"]),t=ux(t,e,n,r,o),{rotate:e=0,transform:r=""}=t,t=et(t,["rotate","transform"]);return it(new T2).call(L,t).style("text",""+i).style("transform",r+`rotate(${+e})`).style("coordCenter",n.getCenter()).call(L,a).node()},hx=(fx.props={defaultMarker:"point"},t=>{const s=t["colorAttribute"],l=et(t,["arrow","colorAttribute"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=et(_0(r,i,a,o),["stroke"]),{d:i,color:a}=e;return it(new X.Path).call(L,r).style("d",i).style(s,a).call(L,l).node()}}),dx=(hx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>hx(Object.assign({colorAttribute:"fill"},t))),px=(dx.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>hx(Object.assign({fill:"none",colorAttribute:"stroke"},t))),gx=(px.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const a=t["render"],o=et(t,["render"]);return(t,e,n,r)=>{var[[t,i]]=t;return a(Object.assign(Object.assign({},o),{x:t,y:i}))}}),yx=(gx.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},{BLACK:"#000",WHITE:"#fff",STROKE:"#416180"}),mx=t=>{var e={defaultColor:"#5B8FF9",defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:yx.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:yx.BLACK,lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,strokeWidth:0,connectorStroke:yx.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:yx.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:yx.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:yx.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:yx.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:yx.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:yx.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:yx.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:yx.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:yx.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{arrow:!1,gridLineDash:[0,0],gridLineWidth:.5,gridStroke:yx.BLACK,gridStrokeOpacity:.05,labelAlign:"horizontal",labelFill:yx.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,line:!1,lineLineWidth:.5,lineStroke:yx.BLACK,lineStrokeOpacity:.45,tickLength:4,tickLineWidth:1,tickStroke:yx.BLACK,tickStrokeOpacity:.25,titleFill:yx.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,titleTransformOrigin:"center"},axisTop:{gridDirection:"positive",labelDirection:"negative",labelSpacing:8,tickDirection:"negative",titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle"},axisBottom:{gridDirection:"negative",labelDirection:"positive",labelSpacing:12,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",titleSpacing:0},axisRadar:{girdClosed:!0,gridStrokeOpacity:.3,gridType:"surround",label:!1,tick:!1,titlePosition:"start"},legend:{backgroundFill:"transparent",itemBackgroundFill:"transparent",itemLabelFill:yx.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemValueFill:yx.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",navButtonFill:yx.BLACK,navButtonFillOpacity:.65,navPageNumFill:yx.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,padding:8,title:!1,titleFill:yx.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4},continuousLegend:{handleHeight:12,handleLabelFill:yx.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal",handleMarkerFill:yx.BLACK,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:yx.BLACK,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:yx.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal",labelSpacing:8,tick:!0},label:{fill:yx.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:yx.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:yx.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},slider:{trackSize:16,trackFill:yx.STROKE,trackFillOpacity:1,selectionFill:"#5B8FF9",selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:yx.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:yx.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:yx.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:yx.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)},h=(mx.props={},{BLACK:"#fff",WHITE:"#000",STROKE:"#416180"}),vx=t=>{var e={defaultColor:"#5B8FF9",defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:h.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:h.BLACK,lineWidth:1}},text:{text:{fill:h.BLACK,fillOpacity:.65,fontSize:12,strokeWidth:0,connectorStroke:h.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:h.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:h.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:h.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:h.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:h.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:h.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:h.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:h.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:h.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{arrow:!1,gridLineDash:[0,0],gridLineWidth:.5,gridStroke:h.BLACK,gridStrokeOpacity:.05,labelAlign:"horizontal",labelFill:h.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,lineLineWidth:.5,lineStroke:h.BLACK,lineStrokeOpacity:.45,tickLength:4,tickLineWidth:1,tickStroke:h.BLACK,tickStrokeOpacity:.25,titleFill:h.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,titleTransformOrigin:"center"},axisTop:{gridDirection:"positive",labelDirection:"negative",labelSpacing:8,tickDirection:"negative",titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle"},axisBottom:{gridDirection:"negative",labelDirection:"positive",labelSpacing:12,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:h.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemValueFill:h.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",navButtonFill:h.BLACK,navButtonFillOpacity:.45,navPageNumFill:h.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,padding:8,title:!1,titleFill:h.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4},continuousLegend:{handleHeight:12,handleLabelFill:h.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal",handleMarkerFill:h.BLACK,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:h.BLACK,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:h.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal"},label:{fill:h.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:h.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:h.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},slider:{trackSize:16,trackFill:h.STROKE,trackFillOpacity:1,selectionFill:"#5B8FF9",selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:h.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:h.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{},title:{titleFill:h.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:h.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)},bx=(vx.props={},{BLACK:"#000",WHITE:"#fff",STROKE:"#888"}),xx=t=>{var e={defaultColor:"#4e79a7",defaultCategory10:"tableau10",defaultCategory20:"tableau10",defaultSize:1,elementActiveStroke:bx.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:bx.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:bx.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:bx.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:bx.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:bx.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:bx.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:bx.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:bx.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:bx.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:bx.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:bx.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:bx.BLACK,labelFillOpacity:1,labelFontSize:10,labelFontWeight:"normal",labelSpacing:4,line:!0,lineLineWidth:1,lineStroke:"#888",lineStrokeOpacity:1,tickLength:5,tickLineWidth:1,tickStroke:bx.STROKE,tickStrokeOpacity:1,titleFill:bx.BLACK,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold",titleSpacing:12,titleTransformOrigin:"center"},axisTop:{gridDirection:"positive",labelDirection:"negative",tickDirection:"negative",titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle"},axisBottom:{gridDirection:"negative",labelDirection:"positive",labelSpacing:8,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:bx.BLACK,itemLabelFillOpacity:1,itemLabelFontSize:10,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,4],itemValueFill:bx.BLACK,itemValueFillOpacity:1,itemValueFontSize:10,itemValueFontWeight:"normal",navButtonFill:bx.BLACK,navButtonFillOpacity:.45,navButtonSize:6,navPageNumFill:bx.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:10,padding:8,title:!1,titleFill:bx.BLACK,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold",titleSpacing:4},continuousLegend:{handleHeight:12,handleLabelFill:bx.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:10,handleLabelFontWeight:"normal",handleMarkerFill:bx.BLACK,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:bx.BLACK,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:bx.BLACK,labelFillOpacity:.45,labelFontSize:10,labelFontWeight:"normal",title:!1},label:{fill:bx.BLACK,fillOpacity:.65,fontSize:10,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:bx.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:bx.WHITE,fontSize:10,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},slider:{trackSize:16,trackFill:bx.STROKE,trackFillOpacity:.05,selectionFill:"#4e79a7",selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:bx.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:bx.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:10,handleLabelFontWeight:"normal"},scrollbar:{},title:{titleFill:bx.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:bx.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)};function wx(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)]}xx.props={};var kx,Mx=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ox(t){var e;if(e=Mx.exec(t))return new _x({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 _x(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 Sx(t,e){var n,e=wx(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+""}Ox.prototype=_x.prototype,_x.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 Ex={"%":(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)=>Sx(100*t,e),r:Sx,s:function(t,e){var n,r,i=wx(t,e);return i?(n=i[0],(i=(i=i[1])-(kx=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")+wx(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 Ax(t){return t}var Lx,Tx=Array.prototype.map,Px=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Nx(t){var e,s,l,k=void 0===t.grouping||void 0===t.thousands?Ax:(s=Tx.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]+"",M=void 0===t.decimal?".":t.decimal+"",O=void 0===t.numerals?Ax:(e=Tx.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}),a=void 0===t.percent?"%":t.percent+"",_=void 0===t.minus?"−":t.minus+"",S=void 0===t.nan?"NaN":t.nan+"";function o(t){var c=(t=Ox(t)).fill,u=t.align,f=t.sign,e=t.symbol,h=t.zero,d=t.width,p=t.comma,g=t.precision,y=t.trim,m=t.type,v=("n"===m?(p=!0,m="g"):Ex[m]||(void 0===g&&(g=12),y=!0,m="g"),(h||"0"===c&&"="===u)&&(h=!0,c="0",u="="),"$"===e?r:"#"===e&&/[boxX]/.test(m)?"0"+m.toLowerCase():""),b="$"===e?i:/[%p]/.test(m)?a:"",x=Ex[m],w=/[defgprs%]/.test(m);function n(t){var e,n,r,i=v,a=b;if("c"===m)a=x(t)+a,t="";else{var o=(t=+t)<0||1/t<0;if(t=isNaN(t)?S:x(Math.abs(t),g),y&&(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&&"+"!==f?!1:o)?"("===f?f:_:"-"===f||"("===f?"":f)+i,a=("s"===m?Px[8+kx/3]:"")+a+(o&&"("===f?")":""),w)for(e=-1,n=t.length;++e<n;)if((r=t.charCodeAt(e))<48||57<r){a=(46===r?M+t.slice(e+1):t.slice(e))+a,t=t.slice(0,e);break}}p&&!h&&(t=k(t,1/0));var s=i.length+t.length+a.length,l=s<d?new Array(d-s+1).join(c):"";switch(p&&h&&(t=k(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 O(t)}return g=void 0===g?6:/[gprs]/.test(m)?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=Ox(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor((t=e,((t=wx(Math.abs(t)))?t[1]:NaN)/3)))),r=Math.pow(10,-e),i=Px[8+e/3];return function(t){return n(r*t)+i}}}}function jx(t,e,n){return t.querySelector(e)?it(t).select(e):it(t).append(n)}function Cx(t){return Array.isArray(t)?t.join(", "):""+(t||"")}function Rx(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}}Gl=Nx({thousands:",",grouping:[3],currency:["$",""]}),Lx=Gl.format,Gl.formatPrefix;class Bx extends cs{update(t){this.attr(t);var e,t=et(t,["width","height"]);null!=(e=null==(e=this.children)?void 0:e[0])&&e.update(t)}}function Ix(t,e){return null==(t=t.filter(t=>t.getOptions().name===e))?void 0:t[0]}function Fx(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 Dx(t){const n=["arrow","crosshairs","grid","handle","handleLabel","indicator","label","line","tick","tip","title","trunc"],r={};return Object.entries(t).forEach(([t,e])=>{n.includes(t)?r["show"+Ze(t)]=e:r[t]=e}),r}function zx(t){var{innerWidth:t,innerHeight:e}=t.getOptions();return[t,e]}function Wx(t){return"number"!=typeof t||Math.abs(t)<1e-15?t:parseFloat(t.toFixed(15))}function Gx(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]=bc(e,t=>+t),i=i.getOptions()["tickCount"],t(c,l,i)):e,c=r?t.filter(r):t;const u=(null==(l=a.getFormatter)?void 0:l.call(a))||n,f=t=>"object"==typeof t?t:String(t),h=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 Bp({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 iu(i)?(e=i.map("bottom"===r?[t,1]:[0,t]),"bottom"===r?(n=e[0],new Bp({domain:[0,a],range:[0,1]}).map(n)):"left"===r?(n=e[1],new Bp({domain:[0,o],range:[0,1]}).map(n)):t):t}}(o,s);return tu(s)||Jc(s)?(i=c.map((t,e,n)=>{var r,i=(null==(i=a.getBandWidth)?void 0:i.call(a,t))/2||0,i=h(a.map(t)+i);return{value:Jc(s)&&null!=(r=a.getTicks)&&r.call(a)?1-i:i,label:f(u(Wx(t),e,n)),id:String(e)}}),eu(s)&&"center"===o?i.map(t=>{var e=t["value"],t=et(t,["value"]);return Object.assign({value:1-e},t)}):i):c.map((t,e,n)=>{var r=(null==(r=a.getBandWidth)?void 0:r.call(a,t))/2||0;return{value:d(h(a.map(t)+r)),label:f(u(Wx(t),e,n)),id:String(e)}})}function Hx(t,e,n){var r;return!(tu(r=e)&&Jc(r)||ru(e))&&(void 0===t?!!n.getTicks:t)}function Vx(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"+qu(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 qx,vs=r=>t=>{var{labelFormatter:e=t=>""+t}=t,e="string"==typeof e?Lx(e):e;const n=Object.assign(Object.assign({},t),{labelFormatter:e});return(...t)=>r(n)(...t)};const Yx=vs(t=>{const{direction:o="left",important:s={},labelFormatter:l=t=>""+t,orientation:c,position:u,style:f={},title:h,tickCount:d,tickFilter:p,tickMethod:g,transform:y}=t,m=et(t,["direction","important","labelFormatter","order","orientation","position","size","style","title","tickCount","tickFilter","tickMethod","transform"]);return({scales:[t],value:e,coordinate:n,theme:r})=>{var e=e["bbox"],i=t.getOptions()["domain"],r=Vx(0,0,r,o,u,c),r=Object.assign(Object.assign(Object.assign({},r),f),m),a=function(t,e){var[e,n]=zx(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,a]=r.getCenter(),[s,l]=ou(r);const[u,f]=su(r);var r=o/2,o=s*r,s=l*r,[l,r]=[t+n,a+i],[e,c]=[Math.cos(e),Math.sin(e)];return{startPos:[l+s*e,r+s*c],endPos:[l+o*e,r+o*c],gridClosed:f-u==360,gridCenter:[t+n,i+a],gridControlAngles:new Array(3).fill(0).map((t,e,n)=>(f-u)/(n.length-1)*e)}}}return{}}(u,c,e,n),i=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},r),{type:"linear",data:Gx(t,i,d,l,p,g,u,n),titleText:Cx(h),labelOverlap:function(t=[],e){var{labelAutoRotate:e=!0,labelAutoHide:n=!1,labelAutoEllipsis:r=!1}=e;const i=[...t];return(t=(e,t)=>{t?-1!==(t=i.findIndex(t=>t.type===e.type))?i[t]=e:i.push(e):-1!==(t=i.findIndex(t=>t.type===e.type))&&i.splice(t,1)})({type:"rotate",optionalAngles:[0,15,30,45,60,90]},e),t({type:"ellipsis",minLength:20},r),t({type:"hide"},n),i}(y,r),grid:Hx(r.grid,n,t),gridLength:a,line:!0}),r.line?null:{lineOpacity:0}),e),s);return new Yv({className:"axis",style:Dx(i)})}}),$x=vs(t=>{const{position:o,labelFormatter:s=t=>""+t,tickFilter:l,tickCount:c,tickMethod:u,important:f={},style:e={}}=t,h=et(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=Gx(t,i,c,s,l,u,o,n),[i,a]=ou(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]=su(i),[l,c]=zx(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?(zx(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:8,tickDirection:"negative",gridDirection:"positive"})}(o,e,i,a,n),i=r["axis"];return new Yv({style:Dx(nt({},i,e,Object.assign(Object.assign({type:"arc",data:t,titleText:Cx(d),grid:p},h),f)))})}}),Ux=(Yx.props={defaultPosition:"center",defaultSize:45,defaultOrder:0},$x.props={defaultPosition:"outer",defaultOrientation:"vertical",defaultSize:45,defaultOrder:0},t=>Yx(t)),Kx=(Ux.props=Object.assign(Object.assign({},Yx.props),{defaultPosition:"bottom"}),t=>Yx(t));Kx.props=Object.assign(Object.assign({},Yx.props),{defaultPosition:"left"});const Xx=a=>{const{important:o={}}=a,s=et(a,["important"]);return t=>{var e,{theme:n,coordinate:r,value:i}=t;return Yx(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]=su(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 Zx(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(je(t))return t[t.length-1]}(t.split("."));return()=>function(t,e){var{fill:n,stroke:r,lineWidth:i,color:a}=e,o=et(e,["d","fill","strokeWidth","path","stroke","lineWidth","color"]);const s=ug.get(t)||ug.get("point");return(...t)=>{return new X.Path({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 Qx(t,{scales:e,library:n,markState:r}){var i=Ix(e,"shape");const[a,o]=function(t,e){const n=Ix(t,"shape");var r=Ix(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)=>Zx(a+"."+o[e],n,0,0,{color:t.color}):"function"==typeof s?s:(t,e)=>Zx(s||o[e],n,0,0,{color:t.color})}function Jx(t,e){var{labelFormatter:n=t=>""+t}=t,r=e["scales"],e={itemMarker:Qx(t,e),itemMarkerSize:(t=Ix(t=r,"size"))?2*t.map(NaN):8,itemMarkerOpacity:function(t){if(t=Ix(t,"opacity")){const n=t.getOptions()["range"];return(t,e)=>n[e]}}(r)};const i="string"==typeof n?Lx(n):n,a=Ix(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)}))})}Xx.props=Object.assign(Object.assign({},Yx.props),{defaultPosition:"center"});const tw=l=>{const{position:c,title:u}=l,f=et(l,["labelFormatter","layout","order","orientation","position","size","title"]),{gridCol:h,gridRow:d}=f;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}=Fx(t,e,n);return{width:i,height:a}}(e,l,tw),e=Rx(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,h),i=Object.assign({orientation:["right","left","center"].includes(c)?"vertical":"horizontal",width:i,height:a,gridCol:null!==h&&void 0!==h?h:s,gridRow:null!==d&&void 0!==d?d:o,rowPadding:0,colPadding:8,titleText:Cx(u)},Jx(l,t)),{legend:a={}}=n,s=new Bx({style:Object.assign({x:r.x,y:r.y,width:r.width,height:r.height},e)});return s.appendChild(new mb({className:"legend-category",style:Dx(Object.assign({},a,i,f))})),s}};tw.props={defaultPosition:"top",defaultOrder:1,defaultSize:40};const ew=l=>{const{labelFormatter:c,position:u,title:f,style:h}=l,d=et(l,["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=Rx(u,null==(s=null==(s=null==(s=e.scales)?void 0:s[0])?void 0:s.guide)?void 0:s.layout),r=new Bx({style:Object.assign({x:r,y:i,width:a,height:o},s)}),{continuousLegend:i={}}=n;return r.appendChild(new Fb({style:Dx(Object.assign({},i,Object.assign(Object.assign({titleText:Cx(f),titleFontSize:12,handle:!1,indicator:!1,labelAlign:"value",labelFormatter:"string"==typeof c?t=>Lx(c)(t.label):c},function(t,e,n,r){const a=Ix(t,"color");var{domain:i,range:o}=a.getOptions();const[s,l]=[i[0],i.slice(-1)[0]],{orientation:c,width:u,height:f,length:h}=Fx(e,n,r);if(i={orientation:c,width:u,height:f},a instanceof Wp){e=a.thresholds;if(a instanceof Vp||a instanceof Yp)return Object.assign(Object.assign({color:o},i),{data:[s,...e,l].map((t,e)=>({value:t/l,label:t}))});const p=[-1/0,...e,1/0].map((t,e)=>({value:e,label:t}));return Object.assign(Object.assign({data:p},i),{color:o,labelFilter:(t,e)=>0<e&&e<p.length-1})}const d=Ix(t,"opacity");return Object.assign(Object.assign({},i),{data:a.getTicks().map(t=>({value:t})),color:new Array(h).fill(0).map((t,e)=>{var e=(l-s)/(h-1)*e+s,n=a.map(e);const i=d?d.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})`)})})}(t,e,l,ew)),h),d))})),r}},nw=(ew.props={defaultPosition:"top",defaultOrientation:"vertical",defaultOrder:1,defaultSize:60,defaultLength:300},e=>(...t)=>ew(Object.assign({},{block:!0},e))(...t)),rw=(nw.props=Object.assign(Object.assign({},ew.props),{defaultPosition:"top",defaultOrientation:"horizontal"}),t=>ew(Object.assign({},{type:"size",block:!0,tick:!1},t))),iw=(rw.props=Object.assign(Object.assign({},ew.props),{defaultPosition:"top",defaultOrientation:"horizontal"}),t=>ew(Object.assign({},{type:"size",tick:!1,labelFilter:(t,e,n)=>0===e||e===n.length-1},t)));function aw(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"}}}iw.props=Object.assign(Object.assign({},ew.props),{defaultPosition:"top",defaultOrientation:"horizontal"});qx={render(t,e){const{y:n,width:r,title:i,subtitle:a}=t,o=t.style,{spacing:s=2,align:l="left"}=o,c=et(o,["spacing","align"]);t=rt(c,"title");const u=rt(c,"subtitle"),f=jx(e,".title","text").attr("className","title").call(L,Object.assign(Object.assign(Object.assign({},aw(0,n,r,l)),{fontSize:14,textBaseline:"top",text:i}),t)).node().getLocalBounds();jx(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({},aw(0,f.max[1]+s,r,l)),{fontSize:12,textBaseline:"top",text:a}),u))})}};const ow=class extends X.CustomElement{constructor(t){super(t),this.descriptor=qx}connectedCallback(){var t,e;null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}update(t={}){var e;this.attr(nt({},this.attributes,t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}},sw=a=>({value:t,theme:e})=>{var{x:t,y:n,width:r,height:i}=t.bbox;return new ow({style:nt({},{style:e.title},Object.assign({x:t,y:n,width:r,height:i},a))})};function lw(t){return t.getBandWidth}function cw(t,e,n){if(!lw(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=gc(t,e);return r=n+a,t=0,e=i.length-1,i[Math.min(e,Math.max(t,r))]}function uw(t,e){var n,r;return lw(t)?(t=t.getOptions()["domain"],[n,r]=e,n=t.indexOf(n),r=t.indexOf(r),t.slice(n,r+1)):Ac(e)}sw.props={defaultPosition:"top",defaultOrder:2,defaultSize:36};const fw=t=>{const{orientation:c,labelFormatter:u,style:f}=t,h=et(t,["orientation","labelFormatter","size","style"]);return({scales:[e],value:t,theme:n})=>{var r,t=t["bbox"],{x:t,y:i,width:a,height:o}=t,{slider:n={}}=n;const s=(null==(r=e.getFormatter)?void 0:r.call(e))||(t=>t.toString()),l="string"==typeof u?Lx(u):u;return new Bm({className:"slider",style:Object.assign({},n,Object.assign(Object.assign({x:t,y:i,trackLength:"horizontal"===c?a:o,orientation:c,formatter:t=>{return(l||s)(cw(e,t,!0))}},f),h))})}},hw=(fw.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1},t=>fw(Object.assign(Object.assign({},t),{orientation:"horizontal"}))),dw=(hw.props=Object.assign(Object.assign({},fw.props),{defaultPosition:"bottom"}),t=>fw(Object.assign(Object.assign({},t),{orientation:"vertical"}))),pw=(dw.props=Object.assign(Object.assign({},fw.props),{defaultPosition:"left"}),t=>{const{orientation:a,style:o}=t,s=et(t,["orientation","labelFormatter","style"]);return({value:t,theme:e})=>{var t=t["bbox"],{x:t,y:n,width:r,height:i}=t,{scrollbar:e={}}=e;return new Dm({className:"scrollbar",style:Object.assign({},e,Object.assign(Object.assign(Object.assign(Object.assign({},o),{x:t,y:n,trackLength:"horizontal"===a?r:i}),s),{orientation:a,value:0,contentLength:1500,viewportLength:"horizontal"===a?r:i}))})}}),gw=(pw.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1},t=>pw(Object.assign(Object.assign({},t),{orientation:"horizontal"}))),yw=(gw.props=Object.assign(Object.assign({},pw.props),{defaultPosition:"bottom"}),t=>pw(Object.assign(Object.assign({},t),{orientation:"vertical"})));yw.props=Object.assign(Object.assign({},pw.props),{defaultPosition:"left"});class mw{constructor(t){this.$value=t}static of(t){return new mw(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}function vw(t,e,n){return mw.of({}).call(bw,t).call(bw,e).call(bw,n).value()}function bw(t,e){for(var[n,r]of Object.entries(e))void 0!==r&&(t[n]=e[n]);return t}function xw(t,e){var n={};for(const i of e){var r=t.style[i];r&&(n[i]=r)}return n}const ww=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"],kw=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]=Jc(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,vw(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},Mw=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]=Jc(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,vw(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},Ow=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]=Jc(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,vw(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},_w=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]=Jc(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,vw(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},Sw=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}],vw(i,n,l))},Ew=(Sw.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}],vw(i,n,l))});function Aw(t){var{min:t,max:e}=t.getLocalBounds(),[t,n]=t,[e,r]=e;return[t,n,e-t,r-n]}function Lw(t,e){var[n,r,i,t]=Aw(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),f=i/u;for(let t=0;t<u;t++){var h=n+t*f,d=r+l*s;o.push(function(t){var[t,e,n,r]=t;return`
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@antv/g"),require("@antv/g-canvas")):"function"==typeof define&&define.amd?define(["exports","@antv/g","@antv/g-canvas"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).G2={},t.window.G,t.window.G.Canvas2D)}(this,function(m,X,S){"use strict";const N="main-layer",at="label-layer",ot="element",H="view",st="plot",lt="component",ct="label",ut="area";var j="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function C(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,f=e[n],h=r,d=i;for(B(e,r,n),0<a(e[i],f)&&B(e,r,i);h<d;){for(B(e,h,d),h++,d--;a(e[h],f)<0;)h++;for(;0<a(e[d],f);)d--}0===a(e[r],f)?B(e,r,d):B(e,++d,i),d<=n&&(r=d+1),n<=d&&(i=d-1)}}(t,e,n||0,r||t.length-1,i||I)}function B(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function I(t,e){return t<e?-1:e<t?1:0}function F(t,e){D(t,0,t.children.length,e,t)}function D(t,e,n,r,i){(i=i||U(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];z(i,t.leaf?r(o):o)}return i}function z(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 W(t,e){return t.minX-e.minX}function G(t,e){return t.minY-e.minY}function V(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function q(t){return t.maxX-t.minX+(t.maxY-t.minY)}function Y(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function $(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function U(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function K(t,e,n,r,i){for(var a,o=[e,n];o.length;)(n=o.pop())-(e=o.pop())<=r||(C(t,a=e+Math.ceil((n-e)/r/2)*r,e,n,i),o.push(e,a,a,n))}(n=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,[])},n.prototype.search=function(t){var e=this.data,n=[];if($(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;$(t,s)&&(e.leaf?n.push(o):Y(t,s)?this._all(o,n):i.push(o))}e=i.pop()}return n},n.prototype.collides=function(t){var e=this.data;if($(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($(t,a)){if(e.leaf||Y(t,a))return!0;n.push(i)}}e=n.pop()}return!1},n.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},n.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},n.prototype.clear=function(){return this.data=U([]),this},n.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||!Y(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},n.prototype.toBBox=function(t){return t},n.prototype.compareMinX=function(t,e){return t.minX-e.minX},n.prototype.compareMinY=function(t,e){return t.minY-e.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(t){return this.data=t,this},n.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},n.prototype._build=function(t,e,n,r){var i,a=n-e+1,o=this._maxEntries;if(a<=o)F(i=U(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=U([])).leaf=!1,i.height=r;var s=Math.ceil(a/o),l=s*Math.ceil(Math.sqrt(o));K(t,e,n,l,this.compareMinX);for(var c=e;c<=n;c+=l){var u=Math.min(c+l-1,n);K(t,c,u,s,this.compareMinY);for(var f=c;f<=u;f+=s){var h=Math.min(f+s-1,u);i.children.push(this._build(t,f,h,r-1))}}F(i,this.toBBox)}return i},n.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=V(l),u=(f=t,u=l,(Math.max(u.maxX,f.maxX)-Math.min(u.minX,f.minX))*(Math.max(u.maxY,f.maxY)-Math.min(u.minY,f.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 f,u;return e},n.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),z(i,n);0<=e&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},n.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=U(n.children.splice(i,n.children.length-i));r.height=n.height,r.leaf=n.leaf,F(n,this.toBBox),F(r,this.toBBox),e?t[e-1].children.push(r):this._splitRoot(n,r)},n.prototype._splitRoot=function(t,e){this.data=U([t,e]),this.data.height=t.height+1,this.data.leaf=!1,F(this.data,this.toBBox)},n.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=D(t,0,c,this.toBBox),f=D(t,c,n,this.toBBox),h=(i=u,h=f,d=o=a=void 0,a=Math.max(i.minX,h.minX),o=Math.max(i.minY,h.minY),d=Math.min(i.maxX,h.maxX),i=Math.min(i.maxY,h.maxY),Math.max(0,d-a)*Math.max(0,i-o)),d=V(u)+V(f);h<s?(s=h,r=c,l=d<l?d:l):h===s&&d<l&&(l=d,r=c)}return r||n-e},n.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:W,i=t.leaf?this.compareMinY:G;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},n.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var i=this.toBBox,a=D(t,0,e,i),o=D(t,n-e,n,i),s=q(a)+q(o),l=e;l<n-e;l++){var c=t.children[l];z(a,t.leaf?i(c):c),s+=q(a)}for(var u=n-e-1;e<=u;u--){var f=t.children[u];z(o,t.leaf?i(f):f),s+=q(o)}return s},n.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;0<=r;r--)z(e[r],t)},n.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():F(t[e],this.toBBox)};var Z=1e-6,Q="undefined"!=typeof Float32Array?Float32Array:Array;function J(){var t=new Q(9);return Q!=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 tt=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],f=n[0],h=n[1],d=n[2],p=n[3],g=n[4],y=n[5],m=n[6],v=n[7],n=n[8];return t[0]=f*r+h*o+d*c,t[1]=f*i+h*s+d*u,t[2]=f*a+h*l+d*e,t[3]=p*r+g*o+y*c,t[4]=p*i+g*s+y*u,t[5]=p*a+g*l+y*e,t[6]=m*r+v*o+n*c,t[7]=m*i+v*s+n*u,t[8]=m*a+v*l+n*e,t};function ft(){var t=new Q(16);return Q!=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 ht(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 dt(t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,g,y){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]=f,t[11]=h,t[12]=d,t[13]=p,t[14]=g,t[15]=y,t}function pt(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 gt(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 yt(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],f=e[9],h=e[10],d=e[11],p=e[12],g=e[13],y=e[14],e=e[15],m=n*s-r*o,v=n*l-i*o,b=n*c-a*o,x=r*l-i*s,w=r*c-a*s,k=i*c-a*l,M=u*g-f*p,O=u*y-h*p,_=u*e-d*p,S=f*y-h*g,E=f*e-d*g,A=h*e-d*y,L=m*A-v*E+b*S+x*_-w*O+k*M;return L?(t[0]=(s*A-l*E+c*S)*(L=1/L),t[1]=(i*E-r*A-a*S)*L,t[2]=(g*k-y*w+e*x)*L,t[3]=(h*w-f*k-d*x)*L,t[4]=(l*_-o*A-c*O)*L,t[5]=(n*A-i*_+a*O)*L,t[6]=(y*b-p*k-e*v)*L,t[7]=(u*k-h*b+d*v)*L,t[8]=(o*E-s*_+c*M)*L,t[9]=(r*_-n*E-a*M)*L,t[10]=(p*w-g*b+e*m)*L,t[11]=(f*b-u*w-d*m)*L,t[12]=(s*O-o*S-l*M)*L,t[13]=(n*S-r*O+i*M)*L,t[14]=(g*v-p*x-y*m)*L,t[15]=(u*x-f*v+h*m)*L,t):null}function mt(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],f=t[10],h=t[11],d=t[12],p=t[13],g=t[14],t=t[15];return(e*o-n*a)*(f*t-h*g)-(e*s-r*a)*(u*t-h*p)+(e*l-i*a)*(u*g-f*p)+(n*s-r*o)*(c*t-h*d)-(n*l-i*o)*(c*g-f*d)+(r*l-i*s)*(c*p-u*d)}function vt(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],f=e[8],h=e[9],d=e[10],p=e[11],g=e[12],y=e[13],m=e[14],e=e[15],v=n[0],b=n[1],x=n[2],w=n[3];return t[0]=v*r+b*s+x*f+w*g,t[1]=v*i+b*l+x*h+w*y,t[2]=v*a+b*c+x*d+w*m,t[3]=v*o+b*u+x*p+w*e,v=n[4],b=n[5],x=n[6],w=n[7],t[4]=v*r+b*s+x*f+w*g,t[5]=v*i+b*l+x*h+w*y,t[6]=v*a+b*c+x*d+w*m,t[7]=v*o+b*u+x*p+w*e,v=n[8],b=n[9],x=n[10],w=n[11],t[8]=v*r+b*s+x*f+w*g,t[9]=v*i+b*l+x*h+w*y,t[10]=v*a+b*c+x*d+w*m,t[11]=v*o+b*u+x*p+w*e,v=n[12],b=n[13],x=n[14],w=n[15],t[12]=v*r+b*s+x*f+w*g,t[13]=v*i+b*l+x*h+w*y,t[14]=v*a+b*c+x*d+w*m,t[15]=v*o+b*u+x*p+w*e,t}function bt(t,e,n){var r,i,a,o,s,l,c,u,f,h,d,p,g=n[0],y=n[1],n=n[2];return e===t?(t[12]=e[0]*g+e[4]*y+e[8]*n+e[12],t[13]=e[1]*g+e[5]*y+e[9]*n+e[13],t[14]=e[2]*g+e[6]*y+e[10]*n+e[14],t[15]=e[3]*g+e[7]*y+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],f=e[8],h=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]=f,t[9]=h,t[10]=d,t[11]=p,t[12]=r*g+s*y+f*n+e[12],t[13]=i*g+l*y+h*n+e[13],t[14]=a*g+c*y+d*n+e[14],t[15]=o*g+u*y+p*n+e[15]),t}function xt(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 wt(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],f=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+f*r,t[8]=l*n-i*r,t[9]=c*n-a*r,t[10]=u*n-o*r,t[11]=f*n-s*r,t}function kt(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],f=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-f*r,t[8]=i*r+l*n,t[9]=a*r+c*n,t[10]=o*r+u*n,t[11]=s*r+f*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 Ot(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,f=i*s,i=i*l,a=a*l,o=e*o,s=e*s,e=e*l;return t[0]=1-(f+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+f),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function _t(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function St(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 Et(t,e){var n=new Q(3),r=(St(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,f=0;return 0<n?(f=2*Math.sqrt(1+n),t[3]=.25*f,t[0]=(u-i)/f,t[1]=(r-s)/f,t[2]=(o-l)/f):c<a&&e<a?(f=2*Math.sqrt(1+a-c-e),t[3]=(u-i)/f,t[0]=.25*f,t[1]=(o+l)/f,t[2]=(r+s)/f):e<c?(f=2*Math.sqrt(1+c-a-e),t[3]=(r-s)/f,t[0]=(o+l)/f,t[1]=.25*f,t[2]=(u+i)/f):(f=2*Math.sqrt(1+e-a-c),t[3]=(o-l)/f,t[0]=(r+s)/f,t[1]=(u+i)/f,t[2]=.25*f),t}function At(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,f=a*l,h=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],y=i[1],i=i[2],m=(1-(d+s))*u,v=(h+e)*u,u=(a-c)*u,h=(h-e)*p,e=(1-(f+s))*p,s=(o+l)*p,p=(a+c)*r,a=(o-l)*r,c=(1-(f+d))*r;return t[0]=m,t[1]=v,t[2]=u,t[3]=0,t[4]=h,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-(m*g+h*y+p*i),t[13]=n[1]+y-(v*g+e*y+a*i),t[14]=n[2]+i-(u*g+s*y+c*i),t[15]=1,t}function Lt(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 Tt(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 Pt(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 Nt=Pt;function jt(t,e,n,r){var i,a,o,s,l=e[0],c=e[1],e=e[2],u=r[0],f=r[1],r=r[2],h=n[0],d=n[1],n=n[2];return Math.abs(l-h)<Z&&Math.abs(c-d)<Z&&Math.abs(e-n)<Z?pt(t):(h=l-h,d=c-d,n=e-n,i=f*(n*=s=1/Math.hypot(h,d,n))-r*(d*=s),r=r*(h*=s)-u*n,u=u*d-f*h,(s=Math.hypot(i,r,u))?(i*=s=1/s,r*=s,u*=s):u=r=i=0,f=d*u-n*r,a=n*i-h*u,o=h*r-d*i,(s=Math.hypot(f,a,o))?(f*=s=1/s,a*=s,o*=s):o=a=f=0,t[0]=i,t[1]=f,t[2]=h,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]=-(f*l+a*c+o*e),t[14]=-(h*l+d*c+n*e),t[15]=1,t)}function Ct(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 Rt=Object.freeze({__proto__:null,create:ft,clone:function(t){var e=new Q(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},copy:ht,fromValues:function(t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,g){var y=new Q(16);return y[0]=t,y[1]=e,y[2]=n,y[3]=r,y[4]=i,y[5]=a,y[6]=o,y[7]=s,y[8]=l,y[9]=c,y[10]=u,y[11]=f,y[12]=h,y[13]=d,y[14]=p,y[15]=g,y},set:dt,identity:pt,transpose:gt,invert:yt,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],f=e[9],h=e[10],d=e[11],p=e[12],g=e[13],y=e[14],e=e[15];return t[0]=s*(h*e-d*y)-f*(l*e-c*y)+g*(l*d-c*h),t[1]=-(r*(h*e-d*y)-f*(i*e-a*y)+g*(i*d-a*h)),t[2]=r*(l*e-c*y)-s*(i*e-a*y)+g*(i*c-a*l),t[3]=-(r*(l*d-c*h)-s*(i*d-a*h)+f*(i*c-a*l)),t[4]=-(o*(h*e-d*y)-u*(l*e-c*y)+p*(l*d-c*h)),t[5]=n*(h*e-d*y)-u*(i*e-a*y)+p*(i*d-a*h),t[6]=-(n*(l*e-c*y)-o*(i*e-a*y)+p*(i*c-a*l)),t[7]=n*(l*d-c*h)-o*(i*d-a*h)+u*(i*c-a*l),t[8]=o*(f*e-d*g)-u*(s*e-c*g)+p*(s*d-c*f),t[9]=-(n*(f*e-d*g)-u*(r*e-a*g)+p*(r*d-a*f)),t[10]=n*(s*e-c*g)-o*(r*e-a*g)+p*(r*c-a*s),t[11]=-(n*(s*d-c*f)-o*(r*d-a*f)+u*(r*c-a*s)),t[12]=-(o*(f*y-h*g)-u*(s*y-l*g)+p*(s*h-l*f)),t[13]=n*(f*y-h*g)-u*(r*y-i*g)+p*(r*h-i*f),t[14]=-(n*(s*y-l*g)-o*(r*y-i*g)+p*(r*l-i*s)),t[15]=n*(s*h-l*f)-o*(r*h-i*f)+u*(r*l-i*s),t},determinant:mt,multiply:vt,translate:bt,scale:xt,rotate:function(t,e,n,r){var i,a,o,s,l,c,u,f,h,d,p,g,y,m,v,b,x,w,k,M,O=r[0],_=r[1],r=r[2],S=Math.hypot(O,_,r);return S<Z?null:(O*=S=1/S,_*=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],f=e[6],h=e[7],d=e[8],p=e[9],g=e[10],y=e[11],v=O*_*(i=1-n)-r*S,b=_*_*i+n,x=r*_*i+O*S,w=O*r*i+_*S,k=_*r*i-O*S,M=r*r*i+n,t[0]=a*(n=O*O*i+n)+c*(m=_*O*i+r*S)+d*(r=r*O*i-_*S),t[1]=o*n+u*m+p*r,t[2]=s*n+f*m+g*r,t[3]=l*n+h*m+y*r,t[4]=a*v+c*b+d*x,t[5]=o*v+u*b+p*x,t[6]=s*v+f*b+g*x,t[7]=l*v+h*b+y*x,t[8]=a*w+c*k+d*M,t[9]=o*w+u*k+p*M,t[10]=s*w+f*k+g*M,t[11]=l*w+h*k+y*M,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:wt,rotateY:kt,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],f=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+f*r,t[4]=l*n-i*r,t[5]=c*n-a*r,t[6]=u*n-o*r,t[7]=f*n-s*r,t},fromTranslation:Mt,fromScaling:function(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},fromRotation:function(t,e,n){var r,i=n[0],a=n[1],n=n[2],o=Math.hypot(i,a,n);return o<Z?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:Ot,fromQuat2:function(t,e){var n=new Q(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],f=r*r+i*i+a*a+o*o;return 0<f?(n[0]=2*(s*o+u*r+l*a-c*i)/f,n[1]=2*(l*o+u*i+c*r-s*a)/f,n[2]=2*(c*o+u*a+s*i-l*r)/f):(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)),Ot(t,e,n),t},getTranslation:_t,getScaling:St,getRotation:Et,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*(f=a+a),i=i*(h=o+o),c=a*f,a=a*h,o=o*h,u=e*u,f=e*f,e=e*h,h=r[0],d=r[1],r=r[2];return t[0]=(1-(c+o))*h,t[1]=(l+e)*h,t[2]=(i-f)*h,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+f)*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:At,fromQuat:Lt,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:Tt,perspective:Tt,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:Pt,ortho:Nt,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:jt,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,f=(0<u&&(l*=u=1/Math.sqrt(u),c*=u,n*=u),s*n-r*c);return 0<(u=f*f+(r=r*l-o*n)*r+(o=o*c-s*l)*o)&&(f*=u=1/Math.sqrt(u),r*=u,o*=u),t[0]=f,t[1]=r,t[2]=o,t[3]=0,t[4]=c*o-n*r,t[5]=n*f-l*o,t[6]=l*r-c*f,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:Ct,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],f=t[9],h=t[10],d=t[11],p=t[12],g=t[13],y=t[14],t=t[15],m=e[0],v=e[1],b=e[2],x=e[3],w=e[4],k=e[5],M=e[6],O=e[7],_=e[8],S=e[9],E=e[10],A=e[11],L=e[12],T=e[13],P=e[14],e=e[15];return Math.abs(n-m)<=Z*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(r-v)<=Z*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(i-b)<=Z*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(a-x)<=Z*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(o-w)<=Z*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(s-k)<=Z*Math.max(1,Math.abs(s),Math.abs(k))&&Math.abs(l-M)<=Z*Math.max(1,Math.abs(l),Math.abs(M))&&Math.abs(c-O)<=Z*Math.max(1,Math.abs(c),Math.abs(O))&&Math.abs(u-_)<=Z*Math.max(1,Math.abs(u),Math.abs(_))&&Math.abs(f-S)<=Z*Math.max(1,Math.abs(f),Math.abs(S))&&Math.abs(h-E)<=Z*Math.max(1,Math.abs(h),Math.abs(E))&&Math.abs(d-A)<=Z*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(p-L)<=Z*Math.max(1,Math.abs(p),Math.abs(L))&&Math.abs(g-T)<=Z*Math.max(1,Math.abs(g),Math.abs(T))&&Math.abs(y-P)<=Z*Math.max(1,Math.abs(y),Math.abs(P))&&Math.abs(t-e)<=Z*Math.max(1,Math.abs(t),Math.abs(e))},mul:vt,sub:Ct});function Bt(){var t=new Q(3);return Q!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function It(t){var e=t[0],n=t[1],t=t[2];return Math.hypot(e,n,t)}function Ft(t,e,n){var r=new Q(3);return r[0]=t,r[1]=e,r[2]=n,r}function Dt(t,e){t[0]=e[0],t[1]=e[1],t[2]=e[2]}function zt(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Wt(t,e,n){t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2]}function Gt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function Ht(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 Vt(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function qt(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 Yt(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 $t(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 Ut(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)<=Z*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-a)<=Z*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(t-e)<=Z*Math.max(1,Math.abs(t),Math.abs(e))}var Kt=It;function Xt(){var t=new Q(4);return Q!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function Zt(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 Qt(){var t=new Q(4);return Q!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Jt(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 te(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 ee(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 ne(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}Bt(),Xt();var re=function(t,e,n,r){var i=new Q(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},ie=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},ae=te,oe=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 se(t){return t.map(function(t){return Array.isArray(t)?[].concat(t):t})}Bt(),Ft(1,0,0),Ft(0,1,0),Qt(),Qt(),J(),n=new Q(2),Q!=Float32Array&&(n[0]=0,n[1]=0);var le=function(t,e){return(le=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 t(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}le(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var v=function(){return(v=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 et(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 e(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 w(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 y(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 ue(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 he={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function de(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return he[e]===t.length-1&&"achlmqstvz".includes(e)})}function pe(t){return de(t)&&t.every(function(t){t=t[0];return t===t.toUpperCase()})}function ge(t){return pe(t)&&t.every(function(t){t=t[0];return"ACLMQZ".includes(t)})}function ye(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=he[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,he[n]))),he[n]););}function me(t){return 48<=t&&t<=57}function ve(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 be(t){var e,n,r,i,a,o=t.max,s=t.pathValue,l=t.index,c=s.charCodeAt(l),u=he[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,ve(t),t.data=[],u)for(;;){for(var f=u;0<f;--f){if(97!=(32|c)||3!==f&&4!==f?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(me(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&&me(n))return t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" illegal number';for(;o<r&&me(i.charCodeAt(o));)o+=1,s=!0;n=i.charCodeAt(o)}if(46===n){for(c=!0,o+=1;me(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&&me(i.charCodeAt(o))))return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid integer exponent';for(;o<r&&me(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),ve(t),t.index<o&&44===s.charCodeAt(t.index)&&(t.index+=1,ve(t))}if(t.index>=t.max)break;if(!(48<=(e=s.charCodeAt(t.index))&&e<=57||43===e||45===e||46===e))break}ye(t)}else t.err='[path-util]: Invalid path value "'+s[l]+'" is not a path command'}var xe=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 we(t){var o,s,l,c;return pe(t)?se(t):(t=function(t){if(de(t))return se(t);var e=new xe(t);for(ve(e);e.index<e.max&&!e.err.length;)be(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(ge(t))return se(t);for(var e,n,r,i,a,o,s,l=we(t),c=v({},fe),u=0;u<l.length;u+=1){l[u]=(e=l[u],n=c,s=o=h=a=f=i=r=void 0,r=e[0],i=n.x1,f=n.y1,a=n.x2,h=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],f]:"V"===r?s=["L",i,e[1]]:"S"===r?(e=2*f-h,s=["C",n.x1=2*i-a,n.y1=e].concat(o)):"T"===r?(h=2*i-n.qx,a=2*f-n.qy,s=["Q",n.qx=h,n.qy=a].concat(o)):"Q"===r&&(e=o[0],i=o[1],n.qx=e,n.qy=i),s);var f=l[u],h=f.length;c.x1=+f[h-2],c.y1=+f[h-1],c.x2=+f[h-4]||c.x1,c.y2=+f[h-3]||c.y1}return l}function Me(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){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 Se(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=Oe([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 Ee(t,e,n,r){var t=[t,e],e=[n,r],i=Oe(t,e,.5),e=Oe(e,i,.5),a=Oe(i,e,.5),o=Oe(e,a,.5),s=Oe(a,o,.5),t=Se(t[0],t[1],i[0],i[1],a[0]).point,i=Se(s[0],s[1],o[0],o[1],e[0]).point;return[t.x,t.y,i.x,i.y,n,r]}function Ae(t,e){var n,r,i,a,o,s,l=t[0],c=t.slice(1).map(Number),u=c[0],f=c[1],h=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=f,t;case"A":return s=[h,d].concat(c),["C"].concat(function t(e,n,r,i,a,o,s,l,c,u){var f=120*Math.PI/180,h=Math.PI/180*(+a||0),d=[],p=(u?(x=u[0],w=u[1],v=u[2],b=u[3]):(e=(y=Me(e,n,-h)).x,n=y.y,1<(p=(g=(e-(l=(y=Me(l,c,-h)).x))/2)*g/(r*r)+(y=(n-(c=y.y))/2)*y/(i*i))&&(r*=p=Math.sqrt(p),i*=p),p=r*r,m=i*i,v=(o=(o===s?-1:1)*Math.sqrt(Math.abs((p*m-p*y*y-m*g*g)/(p*y*y+m*g*g))))*r*y/i+(e+l)/2,b=o*-i*g/r+(n+c)/2,x=Math.asin(((n-b)/i*Math.pow(10,9)>>0)/Math.pow(10,9)),w=Math.asin(((c-b)/i*Math.pow(10,9)>>0)/Math.pow(10,9)),x=e<v?Math.PI-x:x,w=l<v?Math.PI-w:w,x<0&&(x=2*Math.PI+x),w<0&&(w=2*Math.PI+w),s&&w<x&&(x-=2*Math.PI),!s&&x<w&&(w-=2*Math.PI)),w-x),g=(Math.abs(p)>f&&(m=w,y=l,o=c,w=x+f*(s&&x<w?1:-1),d=t(l=v+r*Math.cos(w),c=b+i*Math.sin(w),r,i,a,0,s,y,o,[w,m,v,b])),p=w-x,Math.cos(x)),f=Math.sin(x),a=Math.cos(w),s=Math.sin(w),y=Math.tan(p/4),o=4/3*r*y,m=4/3*i*y,v=[e,n],b=[e+o*f,n-m*g],x=[l+o*s,c-m*a],w=[l,c];if(b[0]=2*v[0]-b[0],b[1]=2*v[1]-b[1],u)return b.concat(x,w,d);for(var k=[],M=0,O=(d=b.concat(x,w,d)).length;M<O;M+=1)k[M]=M%2?Me(d[M-1],d[M],h).y:Me(d[M],d[M+1],h).x;return k}(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=f,s=[h,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(Ee(h,d,u,f));case"Z":return h===p&&d===g?["C",h,d,p,g,p,g]:["C"].concat(Ee(h,d,p,g))}return t}function Le(t,e){var n;if(void 0===e&&(e=!1),ge(n=t)&&n.every(function(t){t=t[0];return"MC".includes(t)}))return n=se(t),e?[n,[]]:n;for(var r,i=ke(t),a=v({},fe),o=[],s="",l=i.length,c=[],u=0;u<l;u+=1){i[u]&&(s=i[u][0]),o[u]=s;var f=Ae(i[u],a),h=(i[u]=f,y=g=p=d=h=void 0,i),d=o,p=u;if(7<h[p].length){h[p].shift();for(var g=h[p],y=p;g.length;)d[p]="A",h.splice(y+=1,0,["C"].concat(g.splice(0,6)));h.splice(p,1)}l=i.length,"Z"===s&&c.push(u),r=(f=i[u]).length,a.x1=+f[r-2],a.y1=+f[r-1],a.x2=+f[r-4]||a.x1,a.y2=+f[r-3]||a.y1}return e?[i,c]:i}function Te(t,e,n,r,i,a,o,s,l,c){var u=c.bbox,f=void 0===u||u,u=c.length,h=void 0===u||u,u=c.sampleSize,d=void 0===u?10:u,p="number"==typeof l,g=t,y=e,m=0,v=[g,y,m],b=[g,y],x={x:0,y:0},w=[{x:g,y:y}];p&&l<=0&&(x={x:g,y:y});for(var k,M,O,_,S,E,A,L,T,P,N=0;N<=d;N+=1)k=t,M=e,O=n,_=r,S=i,E=a,A=o,L=s,P=void 0,P=1-(T=N/d),g=(k={x:Math.pow(P,3)*k+3*Math.pow(P,2)*T*O+3*P*Math.pow(T,2)*S+Math.pow(T,3)*A,y:Math.pow(P,3)*M+3*Math.pow(P,2)*T*_+3*P*Math.pow(T,2)*E+Math.pow(T,3)*L}).x,y=k.y,f&&w.push({x:g,y:y}),h&&(m+=_e(b,[g,y])),b=[g,y],p&&l<=m&&l>v[2]&&(O=(m-l)/(m-v[2]),x={x:b[0]*(1-O)+v[0]*O,y:b[1]*(1-O)+v[1]*O}),v=[g,y,m];return{length:m,point:x=p&&m<=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 Pe(t){return(c=l=s=0)<=Le(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 Ne(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?Te(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=Oe(n,i,r),i=Oe(i,a,r),a=Oe(a,e,r),o=Oe(n,i,r),i=Oe(i,a,r),r=Oe(o,i,r),[["C"].concat(n,o,r),["C"].concat(i,a,e)]):[t,t]:[t];return{s:t,ss:n,l:s}})}var je=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},Ce=function(t){return"function"==typeof t},b=function(t){return null==t},Re={}.toString,Be=function(t,e){return Re.call(t)==="[object "+e+"]"},Ie=function(t){return Array.isArray?Array.isArray(t):Be(t,"Array")},Fe=function(t){var e=typeof t;return null!==t&&"object"==e||"function"==e};function De(t,e){if(t)if(Ie(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if(Fe(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break}var ze=function(t){return"object"==typeof t&&null!==t},We=function(t){if(!ze(t)||!Be(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},Ge=function(t){if(Ie(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},He=function(t){if(Ie(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},Ve=function(t,n,e){var r;return Ie(t)||We(t)?(r=e,De(t,function(t,e){r=n(r,t,e)}),r):t},qe=function(t){return Be(t,"String")};var Ye=function(t,e,n){return t<e?e:n<t?n:t},$e=function(t){return Be(t,"Number")};function Ue(t){return b(t)?"":t.toString()}var Ke=function(t,e){return(t%e+e)%e},Xe=function(t){t=Ue(t);return t.charAt(0).toLowerCase()+t.substring(1)};var Ze=function(t){t=Ue(t);return t.charAt(0).toUpperCase()+t.substring(1)},Qe=function(t){return Be(t,"Boolean")},Je=function(t){return void 0===t},tn=function(t){return t instanceof Element||t instanceof HTMLDocument};function en(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function nn(t){if("object"!=typeof t||null===t)return t;if(Ie(t))for(var e=[],n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=nn(t[n]):e[n]=t[n];else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=nn(t[i]):e[i]=t[i];return e}var rn=nn;function an(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 on(a,o){var s;if(Ce(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 sn=5;function ln(t,e){if(t===e)return!0;if(t&&e&&!qe(t)&&!qe(e)){if(je(t)||je(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=ln(t[r],e[r]));r++);return n}if(ze(t)||ze(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=ln(t[i[r]],e[i[r]]));r++);return n}}return!1}function cn(){}var nt=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||sn,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&We(o)?(We(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):Ie(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t},un=ln,fn=function(t,e,n){for(var r=0,i=qe(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t},hn=Object.prototype.hasOwnProperty,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 yn(){}var n="\\s*([+-]?\\d+)\\s*",r="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",i="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",mn=/^#([0-9a-f]{3,8})$/,vn=new RegExp("^rgb\\("+[n,n,n]+"\\)$"),bn=new RegExp("^rgb\\("+[i,i,i]+"\\)$"),xn=new RegExp("^rgba\\("+[n,n,n,r]+"\\)$"),wn=new RegExp("^rgba\\("+[i,i,i,r]+"\\)$"),kn=new RegExp("^hsl\\("+[r,i,i]+"\\)$"),Mn=new RegExp("^hsla\\("+[r,i,i,r]+"\\)$"),On={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 _n(){return this.rgb().formatHex()}function Sn(){return this.rgb().formatRgb()}function En(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=mn.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?An(e):3===n?new Tn(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Ln(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Ln(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=vn.exec(t))?new Tn(e[1],e[2],e[3],1):(e=bn.exec(t))?new Tn(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=xn.exec(t))?Ln(e[1],e[2],e[3],e[4]):(e=wn.exec(t))?Ln(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=kn.exec(t))?Cn(e[1],e[2]/100,e[3]/100,1):(e=Mn.exec(t))?Cn(e[1],e[2]/100,e[3]/100,e[4]):On.hasOwnProperty(t)?An(On[t]):"transparent"===t?new Tn(NaN,NaN,NaN,0):null}function An(t){return new Tn(t>>16&255,t>>8&255,255&t,1)}function Ln(t,e,n,r){return new Tn(t=r<=0?e=n=NaN:t,e,n,r)}function Tn(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Pn(){return"#"+jn(this.r)+jn(this.g)+jn(this.b)}function Nn(){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 jn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Cn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new Bn(t,e,n,r)}function Rn(t){var e,n,r,i,a,o,s,l;return t instanceof Bn?new Bn(t.h,t.s,t.l,t.opacity):(t=t instanceof yn?t:En(t))?t instanceof Bn?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 Bn(o,s,l,t.opacity)):new Bn}function Bn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function In(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 Fn(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function Dn(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 Wn(t){return(t+2*Math.PI)%(2*Math.PI)}pn(yn,En,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:_n,formatHex:_n,formatHsl:function(){return Rn(this).formatHsl()},formatRgb:Sn,toString:Sn}),pn(Tn,function(t,e,n,r){return 1===arguments.length?(i=(i=t)instanceof yn?i:En(i))?new Tn((i=i.rgb()).r,i.g,i.b,i.opacity):new Tn:new Tn(t,e,n,null==r?1:r);var i},gn(yn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Tn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Tn(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:Pn,formatHex:Pn,formatRgb:Nn,toString:Nn})),pn(Bn,function(t,e,n,r){return 1===arguments.length?Rn(t):new Bn(t,e,n,null==r?1:r)},gn(yn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Bn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Bn(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 Tn(In(240<=t?t-240:120+t,n,e),In(t,n,e),In(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 Gn={box:function(t,e,n,r){return zn([t,n],[e,r])},length:Fn,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?Fn(t,e,i,a):(n-t)*(n-t)+(r-e)*(r-e)<o?Fn(n,r,i,a):this.pointToLine(t,e,n,r,i,a)},pointToLine:function(t,e,n,r,i,a){var o,s,l,n=[n-t,r-e];return(r=n)[0]===(o=[0,0])[0]&&r[1]===o[1]?Math.sqrt((i-t)*(i-t)+(a-e)*(a-e)):(s=(n=o=r=[-n[1],n[0]])[0],l=n[1],0<(s=s*s+l*l)&&(s=1/Math.sqrt(s)),o[0]=n[0]*s,o[1]=n[1]*s,l=[i-t,a-e],Math.abs(l[0]*r[0]+l[1]*r[1]))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function Hn(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),f=u/10,h=0;h<=c;h++){var d=h*u,p=[i.apply(void 0,t.concat([d])),i.apply(void 0,e.concat([d]))],p=Fn(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&&!(f<1e-4);g++){var y=o-f,m=o+f,v=[i.apply(void 0,t.concat([y])),i.apply(void 0,e.concat([y]))],v=Fn(l[0],l[1],v[0],v[1]);0<=y&&v<s?(o=y,s=v):(y=[i.apply(void 0,t.concat([m])),i.apply(void 0,e.concat([m]))],v=Fn(l[0],l[1],y[0],y[1]),m<=1&&v<s?(o=m,s=v):f*=.5)}return{x:i.apply(void 0,t.concat([o])),y:i.apply(void 0,e.concat([o]))}}function Vn(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function qn(t,e,n){n=t+n-2*e;return Dn(n,0)?[.5]:(t=(t-e)/n)<=1&&0<=t?[t]:[]}function Yn(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=Vn(t,n,i,o),l=Vn(e,r,a,o),c=Gn.pointAt(t,e,n,r,o),n=Gn.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?(Fn(t,e,n,r)+Fn(n,r,i,a)+Fn(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 Kn={box:function(t,e,n,r,i,a){var o=qn(t,n,i)[0],s=qn(e,r,a)[0],l=[t,i],c=[e,a];return void 0!==o&&l.push(Vn(t,n,i,o)),void 0!==s&&c.push(Vn(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 Hn([t,n,i],[e,r,a],o,s,Vn)},pointDistance:function(t,e,n,r,i,a,o,s){t=this.nearestPoint(t,e,n,r,i,a,o,s);return Fn(t.x,t.y,o,s)},interpolationAt:Vn,pointAt:function(t,e,n,r,i,a,o){return{x:Vn(t,n,i,o),y:Vn(e,r,a,o)}},divide:$n,tangentAngle:function(t,e,n,r,i,a,o){t=Yn(t,n,i,o),n=Yn(e,r,a,o);return Wn(Math.atan2(n,t))}};function Xn(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 Dn(r,0)?Dn(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):Dn(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=Xn(t,n,i,o,l),u=Xn(e,r,a,s,l),f=Gn.pointAt(t,e,n,r,l),n=Gn.pointAt(n,r,i,a,l),r=Gn.pointAt(i,a,o,s,l),i=Gn.pointAt(f.x,f.y,n.x,n.y,l),a=Gn.pointAt(n.x,n.y,r.x,r.y,l);return[[t,e,f.x,f.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],f=0,h=c.length,d=0;d<h;d++)f+=Fn(c[d],u[d],c[(d+1)%h],u[(d+1)%h]);return f/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),f=Qn(e,r,a,s),h=0;h<u.length;h++)l.push(Xn(t,n,i,o,u[h]));for(var d=0;d<f.length;d++)c.push(Xn(e,r,a,s,f[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 Hn([t,n,i,o],[e,r,a,s],l,c,Xn,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 Fn(t.x,t.y,l,c)},interpolationAt:Xn,pointAt:function(t,e,n,r,i,a,o,s,l){return{x:Xn(t,n,i,o,l),y:Xn(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 Wn(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,f=s*s,h=Math.PI/4,d=0,p=0,g=0;g<4;g++){var d=o*Math.cos(h),p=s*Math.sin(h),y=(u-f)*Math.pow(Math.cos(h),3)/o,m=(f-u)*Math.pow(Math.sin(h),3)/s,v=d-y,b=p-m,y=l-y,m=c-m,x=Math.hypot(b,v),w=Math.hypot(m,y);h+=x*Math.asin((v*m-b*y)/(x*w))/Math.sqrt(u+f-d*d-p*p),h=Math.min(Math.PI/2,Math.max(0,h))}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],f=2*-Math.PI;f<=2*Math.PI;f+=Math.PI){var h=s+f;a<o?a<h&&h<o&&u.push(h):o<h&&h<a&&u.push(h)}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))),y=1/0,m=-1/0,v=[a,o],b=2*-Math.PI;b<=2*Math.PI;b+=Math.PI){var x=g+b;a<o?a<x&&x<o&&v.push(x):o<x&&x<a&&v.push(x)}for(var w=0;w<v.length;w++){var k=ar(0,e,n,r,i,v[w]);k<y&&(y=k),m<k&&(m=k)}return{x:l,y:y,width:c-l,height:m-y}},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 Fn(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 Wn(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=Fn(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,fr,hr={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+=Fn(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=Gn.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=Gn.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}},n={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=fr?fr+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 yr(t,e){0==--t._eventsCount?t._events=new dr:delete t._events[e]}function mr(){this._events=new dr,this._eventsCount=0}i=n,ur=Object.prototype.hasOwnProperty,fr="~",Object.create&&(dr.prototype=Object.create(null),(new dr).__proto__||(fr=!1)),mr.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(fr?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},mr.prototype.listeners=function(t){var t=fr?fr+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},mr.prototype.listenerCount=function(t){t=fr?fr+t:t,t=this._events[t];return t?t.fn?1:t.length:0},mr.prototype.emit=function(t,e,n,r,i,a){var o=fr?fr+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(h=1,s=new Array(c-1);h<c;h++)s[h-1]=arguments[h];l.fn.apply(l.context,s)}else for(var u,f=l.length,h=0;h<f;h++)switch(l[h].once&&this.removeListener(t,l[h].fn,void 0,!0),c){case 1:l[h].fn.call(l[h].context);break;case 2:l[h].fn.call(l[h].context,e);break;case 3:l[h].fn.call(l[h].context,e,n);break;case 4:l[h].fn.call(l[h].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[h].fn.apply(l[h].context,s)}return!0},mr.prototype.on=function(t,e,n){return gr(this,t,e,n,!1)},mr.prototype.once=function(t,e,n){return gr(this,t,e,n,!0)},mr.prototype.removeListener=function(t,e,n,r){t=fr?fr+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||yr(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:yr(this,t)}}else yr(this,t);return this},mr.prototype.removeAllListeners=function(t){return t?(t=fr?fr+t:t,this._events[t]&&yr(this,t)):(this._events=new dr,this._eventsCount=0),this},mr.prototype.off=mr.prototype.removeListener,mr.prototype.addListener=mr.prototype.on,mr.prefixed=fr,i.exports=mr.EventEmitter=mr;var s,vr,br,xr,wr=n.exports;function kr(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 Mr(t,e,n){e&&kr(t.prototype,e),n&&kr(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function Or(){return(Or=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),Sr(t.prototype.constructor=t,e)}function Sr(t,e){return(Sr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Er(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 Ar(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?Er(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)?Er(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.")}(r=o=o||{}).COORDINATE="<coordinate>",r.COLOR="<color>",r.PAINT="<paint>",r.NUMBER="<number>",r.ANGLE="<angle>",r.OPACITY_VALUE="<opacity-value>",r.SHADOW_BLUR="<shadow-blur>",r.LENGTH="<length>",r.PERCENTAGE="<percentage>",r.LENGTH_PERCENTAGE="<length> | <percentage>",r.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",r.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",r.LIST_OF_POINTS="<list-of-points>",r.PATH="<path>",r.FILTER="<filter>",r.Z_INDEX="<z-index>",r.OFFSET_DISTANCE="<offset-distance>",r.DEFINED_PATH="<defined-path>",r.MARKER="<marker>",r.TRANSFORM="<transform>",r.TRANSFORM_ORIGIN="<transform-origin>",r.TEXT="<text>",r.TEXT_TRANSFORM="<text-transform>",(i=s=s||{})[i.kUnknown=0]="kUnknown",i[i.kNumber=1]="kNumber",i[i.kPercentage=2]="kPercentage",i[i.kEms=3]="kEms",i[i.kPixels=4]="kPixels",i[i.kRems=5]="kRems",i[i.kDegrees=6]="kDegrees",i[i.kRadians=7]="kRadians",i[i.kGradians=8]="kGradians",i[i.kTurns=9]="kTurns",i[i.kMilliseconds=10]="kMilliseconds",i[i.kSeconds=11]="kSeconds",i[i.kInteger=12]="kInteger",(n=vr=vr||{})[n.kUNumber=0]="kUNumber",n[n.kUPercent=1]="kUPercent",n[n.kULength=2]="kULength",n[n.kUAngle=3]="kUAngle",n[n.kUTime=4]="kUTime",n[n.kUOther=5]="kUOther",(r=br=br||{})[r.kYes=0]="kYes",r[r.kNo=1]="kNo",(i=xr=xr||{})[i.kYes=0]="kYes",i[i.kNo=1]="kNo";function Lr(t){var e=1;switch(t){case s.kPixels:case s.kDegrees:case s.kSeconds:break;case s.kMilliseconds:e=.001;break;case s.kRadians:e=180/Math.PI;break;case s.kGradians:e=.9;break;case s.kTurns:e=360}return e}function Tr(t){switch(t){case s.kNumber:case s.kInteger:return"";case s.kPercentage:return"%";case s.kEms:return"em";case s.kRems:return"rem";case s.kPixels:return"px";case s.kDegrees:return"deg";case s.kRadians:return"rad";case s.kGradians:return"grad";case s.kMilliseconds:return"ms";case s.kSeconds:return"s";case s.kTurns:return"turn"}return""}var Pr,Nr,jr=[{name:"em",unit_type:s.kEms},{name:"px",unit_type:s.kPixels},{name:"deg",unit_type:s.kDegrees},{name:"rad",unit_type:s.kRadians},{name:"grad",unit_type:s.kGradians},{name:"ms",unit_type:s.kMilliseconds},{name:"s",unit_type:s.kSeconds},{name:"rem",unit_type:s.kRems},{name:"turn",unit_type:s.kTurns}],Cr=((n=Pr=Pr||{})[n.kUnknownType=0]="kUnknownType",n[n.kUnparsedType=1]="kUnparsedType",n[n.kKeywordType=2]="kKeywordType",n[n.kUnitType=3]="kUnitType",n[n.kSumType=4]="kSumType",n[n.kProductType=5]="kProductType",n[n.kNegateType=6]="kNegateType",n[n.kInvertType=7]="kInvertType",n[n.kMinType=8]="kMinType",n[n.kMaxType=9]="kMaxType",n[n.kClampType=10]="kClampType",n[n.kTransformType=11]="kTransformType",n[n.kPositionType=12]="kPositionType",n[n.kURLImageType=13]="kURLImageType",n[n.kColorType=14]="kColorType",n[n.kUnsupportedColorType=15]="kUnsupportedColorType",function(e){return jr.find(function(t){return t.name===e}).unit_type}),r=function(){function t(){}t.isAngle=function(t){return t===s.kDegrees||t===s.kRadians||t===s.kGradians||t===s.kTurns},t.isLength=function(t){return t>=s.kEms&&t<s.kDegrees},t.isRelativeUnit=function(t){return t===s.kPercentage||t===s.kEms||t===s.kRems},t.isTime=function(t){return t===s.kSeconds||t===s.kMilliseconds};var e=t.prototype;return e.toString=function(){return this.buildCSSText(br.kNo,xr.kNo,"")},e.isNumericValue=function(){return this.getType()>=Pr.kUnitType&&this.getType()<=Pr.kClampType},t}(),i=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 Pr.kColorType},e.to=function(t){return this},t}(r),Rr=((n=Nr=Nr||{})[n.Constant=0]="Constant",n[n.LinearGradient=1]="LinearGradient",n[n.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 Pr.kColorType},t}(r)),Br=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 Pr.kKeywordType},e.buildCSSText=function(t,e,n){return n+this.value},t}(r);function Ir(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(Ir.Cache||Map),l}Ir.Cache=Map;function Fr(t){return t.split("").map(function(t,e){return t.toUpperCase()===t?(0!==e?"-":"")+t.toLowerCase():t}).join("")}var Dr=Ir(function(t){return(t=void 0===t?"":t).replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})});function zr(t){return"function"==typeof t}function Wr(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 Gr(t){switch(function(t){switch(t){case s.kNumber:case s.kInteger:return vr.kUNumber;case s.kPercentage:return vr.kUPercent;case s.kPixels:return vr.kULength;case s.kMilliseconds:case s.kSeconds:return vr.kUTime;case s.kDegrees:case s.kRadians:case s.kGradians:case s.kTurns:return vr.kUAngle;default:return vr.kUOther}}(t)){case vr.kUNumber:return s.kNumber;case vr.kULength:return s.kPixels;case vr.kUPercent:return s.kPercentage;case vr.kUTime:return s.kSeconds;case vr.kUAngle:return s.kDegrees;default:return s.kUnknown}}function Hr(t){return Zr[t]||(Zr[t]=new Br(t)),Zr[t]}var Vr={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},qr=Ir(function(t){var t=Dr(t),e=Vr[t];return(null==e?void 0:e.alias)||t}),Yr=function(i){function n(t,e){var n,r;return void 0===e&&(e=s.kNumber),(n=i.call(this)||this).unit=void 0,n.value=void 0,r="string"==typeof e?(r=e)?"number"===r?s.kNumber:"percent"===r||"%"===r?s.kPercentage:Cr(r):s.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 Pr.kUnitType},t.convertTo=function(t){var e;return this.unit===t?new n(this.value,this.unit):(e=Gr(this.unit))!==Gr(t)||e===s.kUnknown?null:(e=Lr(this.unit)/Lr(t),new n(this.value*e,t))},t.buildCSSText=function(t,e,n){switch(this.unit){case s.kUnknown:break;case s.kInteger:i=Number(this.value).toFixed(0);break;case s.kNumber:case s.kPercentage:case s.kEms:case s.kRems:case s.kPixels:case s.kDegrees:case s.kRadians:case s.kGradians:case s.kMilliseconds:case s.kSeconds:case s.kTurns:var r,i,a=this.value,o=Tr(this.unit);i=a<-999999||999999<a?(r=Tr(this.unit),!Number.isFinite(a)||Number.isNaN(a)?Wr(a,r):a+(r||"")):""+a+o}return n+=i},n}(r),$r=new Yr(0,"px"),Ur=(new Yr(1,"px"),new Yr(0,"deg")),Kr=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}(i),Xr=new Br("unset"),n=new Br("initial"),r=new Br("inherit"),Zr={"":Xr,unset:Xr,initial:n,inherit:r},Qr=new Kr(0,0,0,0,!0),Jr=new Kr(0,0,0,0),ti=Ir(function(t,e,n,r){return new Kr(t,e,n,r)},function(t,e,n,r){return"rgba("+t+","+e+","+n+","+r+")"}),ei=function(t,e){return void 0===e&&(e=s.kNumber),new Yr(t,e)};new Yr(50,"%");var ni="Method not implemented.";function ri(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function ii(t,e,n){t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2]}function ai(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function oi(t,e,n){t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function si(t){return void 0===t?0:360<t||t<-360?t%360:t}function li(t,e,n){var r,i;return void 0===e&&(e=0),void 0===n&&(n=0),Array.isArray(t)&&3===t.length?(r=t,(i=new Q(3))[0]=r[0],i[1]=r[1],i[2]=r[2],i):$e(t)?Ft(t,e,n):Ft(t[0],t[1]||e,t[2]||n)}function ci(t){return t*(Math.PI/180)}function ui(t){return t*(180/Math.PI)}function fi(t,e){return 16===e.length?(n=t,r=e,o=.5*Math.PI,s=(c=St(Bt(),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 hi(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 Q(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 di(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=ui(Math.atan2(n,e));return[t[6],t[7],a,o,r]}var pi=ft(),gi=ft(),yi=Xt(),d=[Bt(),Bt(),Bt()],mi=Bt();function vi(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}(pi,t)&&(ht(gi,pi),gi[3]=0,gi[7]=0,gi[11]=0,gi[15]=1,!(Math.abs(mt(gi))<1e-8))){var t=pi[3],o=pi[7],s=pi[11],l=pi[12],c=pi[13],u=pi[14],f=pi[15];if(0!==t||0!==o||0!==s){if(yi[0]=t,yi[1]=o,yi[2]=s,yi[3]=f,!yt(gi,gi))return;gt(gi,gi),Zt(i,yi,gi)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=l,e[1]=c,e[2]=u,t=pi,(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]=It(d[0]),Ht(d[0],d[0]),r[0]=Vt(d[0],d[1]),bi(d[1],d[1],d[0],1,-r[0]),n[1]=It(d[1]),Ht(d[1],d[1]),r[0]/=n[1],r[1]=Vt(d[0],d[2]),bi(d[2],d[2],d[0],1,-r[1]),r[2]=Vt(d[1],d[2]),bi(d[2],d[2],d[1],1,-r[2]),n[2]=It(d[2]),Ht(d[2],d[2]),r[1]/=n[2],r[2]/=n[2],qt(mi,d[1],d[2]),Vt(d[0],mi)<0)for(var h=0;h<3;h++)n[h]*=-1,d[h][0]*=-1,d[h][1]*=-1,d[h][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 bi(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 xi=ft();function wi(t,l){var c,u;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 Jo({}),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||[$r,$r],l.translateLocal(o[0].value,o[1].value,0)):"translatex"===s?(o=t||[$r],l.translateLocal(o[0].value,0,0)):"translatey"===s?(o=t||[$r],l.translateLocal(0,o[0].value,0)):"translatez"===s?(o=t||[$r],l.translateLocal(0,0,o[0].value)):"translate3d"===s?(o=t||[$r,$r,$r],l.translateLocal(o[0].value,o[1].value,o[2].value)):"rotate"===s?(o=t||[Ur],l.rotateLocal(0,0,Aa(o[0]))):"rotatex"===s?(o=t||[Ur],l.rotateLocal(Aa(o[0]),0,0)):"rotatey"===s?(o=t||[Ur],l.rotateLocal(0,Aa(o[0]),0)):"rotatez"===s?(o=t||[Ur],l.rotateLocal(0,0,Aa(o[0]))):"rotate3d"!==s&&("skew"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0,0],l.setLocalSkew(ci(o[0]),ci(o[1]))):"skewx"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(ci(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],ci(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(dt(xi,e,n,0,0,r,i,0,0,0,0,1,0,a+c,o+u,0,1))):"matrix3d"===s&&(dt.apply(Rt,[xi].concat(t.map(function(t){return t.value}))),xi[12]+=c,xi[13]+=u,l.setLocalTransform(xi)))})),l.getLocalTransform()}ki={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]+\.?))/},Mi="";var ki,Mi,x,Oi=function(t){return Mi=t,Si()};function _i(t){throw new Error(Mi+": "+t)}function Si(){var t=Bi(Ei);return 0<Mi.length&&_i("Invalid input not EOF"),t}function Ei(){return Ai("linear-gradient",ki.linearGradient,Ti)||Ai("repeating-linear-gradient",ki.repeatingLinearGradient,Ti)||Ai("radial-gradient",ki.radialGradient,Pi)||Ai("repeating-radial-gradient",ki.repeatingRadialGradient,Pi)||Ai("conic-gradient",ki.conicGradient,Pi)}function Ai(n,t,r){return Li(t,function(t){var e=r();return e&&!Hi(ki.comma)&&_i("Missing comma before color stops"),{type:n,orientation:e,colorStops:Bi(Ii)}})}function Li(t,e){t=Hi(t);if(t)return Hi(ki.startCall)||_i("Missing ("),e=e(t),Hi(ki.endCall)||_i("Missing )"),e}function Ti(){return Gi("directional",ki.sideOrCorner,1)||Gi("angular",ki.angleValue,1)}function Pi(){var t,e,n=Ni();return n&&((t=[]).push(n),e=Mi,Hi(ki.comma))&&((n=Ni())?t.push(n):Mi=e),t}function Ni(){var t,e=function(){var t=Gi("shape",/^(circle)/i,0);t&&(t.style=Wi()||ji());return t}()||function(){var t=Gi("shape",/^(ellipse)/i,0);t&&(t.style=Di()||ji());return t}();return e?e.at=Ci():(t=ji())?(e=t,(t=Ci())&&(e.at=t)):(t=Ri())&&(e={type:"default-radial",at:t}),e}function ji(){return Gi("extent-keyword",ki.extentKeywords,1)}function Ci(){var t;if(Gi("position",/^at/,0))return(t=Ri())||_i("Missing positioning value"),t}function Ri(){var t={x:Di(),y:Di()};if(t.x||t.y)return{type:"position",value:t}}function Bi(t){var e=t(),n=[];if(e)for(n.push(e);Hi(ki.comma);)(e=t())?n.push(e):_i("One extra comma");return n}function Ii(){var t=Gi("hex",ki.hexColor,1)||Li(ki.rgbaColor,function(){return{type:"rgba",value:Bi(Fi)}})||Li(ki.rgbColor,function(){return{type:"rgb",value:Bi(Fi)}})||Gi("literal",ki.literalColor,0);return t||_i("Expected color definition"),t.length=Di(),t}function Fi(){return Hi(ki.number)[1]}function Di(){return Gi("%",ki.percentageValue,1)||zi()||Wi()}function zi(){return Gi("position-keyword",ki.positionKeywords,1)}function Wi(){return Gi("px",ki.pixelValue,1)||Gi("em",ki.emValue,1)}function Gi(t,e,n){e=Hi(e);if(e)return{type:t,value:e[n]}}function Hi(t){var e=/^[\n\r\t\s]+/.exec(Mi),e=(e&&Vi(e[0].length),t.exec(Mi));return e&&Vi(e[0].length),e}function Vi(t){Mi=Mi.substring(t)}function qi(t,e){return t[0]===e[0]&&t[1]===e[1]}function Yi(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 $i(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}(i=x=x||{}).GROUP="g",i.CIRCLE="circle",i.ELLIPSE="ellipse",i.IMAGE="image",i.RECT="rect",i.LINE="line",i.POLYLINE="polyline",i.POLYGON="polygon",i.TEXT="text",i.PATH="path",i.HTML="html",i.MESH="mesh";function Ui(t,e,n,r,i,a,o,s){var l,c,u;return e=Math.abs(e),n=Math.abs(n),r=ci(r=Ke(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=Ki({x:1,y:0},o={x:(u.x-c)/e,y:(u.y-i)/n}),o=Ki(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 Ki=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 Xi(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 f=function(t,e){var n=e[1],r=e[2],i=Ke(ci(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,f=-1*Math.sin(i)*(s-c)/2+Math.cos(i)*(l-e)/2,h=u*u/(n*n)+f*f/(r*r);1<h&&(n*=Math.sqrt(h),r*=Math.sqrt(h));h=n*n*(f*f)+r*r*(u*u),h=h?Math.sqrt((n*n*(r*r)-h)/h):1;a===o&&(h*=-1);isNaN(h)&&(h=0);var d=r?h*n*f/r:0,h=n?h*-r*u/n:0,s=(s+c)/2+Math.cos(i)*d-Math.sin(i)*h,l=(l+e)/2+Math.sin(i)*d+Math.cos(i)*h,p=[(u-d)/n,(f-h)/r],u=[(-1*u-d)/n,(-1*f-h)/r],d=ta([1,0],p),f=ta(p,u);Ji(p,u)<=-1&&(f=Math.PI);1<=Ji(p,u)&&(f=0);0===o&&0<f&&(f-=2*Math.PI);1===o&&f<0&&(f+=2*Math.PI);return{cx:s,cy:l,rx:qi(t,[c,e])?0:n,ry:qi(t,[c,e])?0:r,startAngle:d,endAngle:d+f,xRotation:i,arcFlag:a,sweepFlag:o}}(n,l);u.arcParams=f}"Z"===c?(n=i,r=t[a+1]):n=[l[(v=l.length)-2],l[v-1]],r&&"Z"===r[0]&&(r=t[a],e[a])&&(e[a].prePoint=n),u.currentPoint=n,e[a]&&qi(n,e[a].currentPoint)&&(e[a].prePoint=u.prePoint);var h,d,p,g,y,m,v=r?[r[r.length-2],r[r.length-1]]:null,b=(u.nextPoint=v,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?(h=[l[1],l[2]],u.startTangent=[b[0]-h[0],b[1]-h[1]],u.endTangent=[n[0]-h[0],n[1]-h[1]]):"T"===c?(d=$i((h=e[s-1]).currentPoint,b),"Q"===h.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=$i((p=e[s-1]).currentPoint,b),y=[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]-y[0],b[1]-y[1]]),u.endTangent=[n[0]-y[0],n[1]-y[1]]):"A"===c&&(b=(g=Zi(u,0)).x,y=g.y,m=(c=Zi(u,1,!1)).x,c=c.y,u.startTangent=[b,y],u.endTangent=[m,c]),e.push(u)}return e}function Zi(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=Ui({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},e),i=Ui({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 Qi(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Ji(t,e){return Qi(t)*Qi(e)?(t[0]*e[0]+t[1]*e[1])/(Qi(t)*Qi(e)):1}function ta(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Ji(t,e))}n=function(){function t(t){this.config=t,this.options=void 0,this._args=void 0}var e=t.prototype;return e.create=function(t){var e;switch(this.init(t),this.options.type){case"sync":e=new Function(this.args(),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"throw "+t+";\n"},onResult:function(t){return"return "+t+";\n"},resultReturns:!0,onDone:function(){return""},rethrowIfPossible:!0}));break;case"async":e=new Function(this.args({after:"_callback"}),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"_callback("+t+");\n"},onResult:function(t){return"_callback(null, "+t+");\n"},onDone:function(){return"_callback();\n"}}));break;case"promise":var n=!1,r=this.contentWithInterceptors({onError:function(t){return n=!0,"_error("+t+");\n"},onResult:function(t){return"_resolve("+t+");\n"},onDone:function(){return"_resolve();\n"}}),i="",i=(i+='"use strict";\n')+this.header()+"return new Promise((function(_resolve, _reject) {\n";n&&(i+="var _sync = true;\nfunction _error(_err) {\nif(_sync)\n_resolve(Promise.resolve().then((function() { throw _err; })));\nelse\n_reject(_err);\n};\n"),i+=r,n&&(i+="_sync = false;\n"),i+="}));\n",e=new Function(this.args(),i)}return this.deinit(),e},e.setup=function(t,e){t._x=e.taps.map(function(t){return t.fn})},e.init=function(t){this.options=t,this._args=t.args.slice()},e.deinit=function(){this.options=void 0,this._args=void 0},e.contentWithInterceptors=function(t){var r=this;if(0<this.options.interceptors.length){for(var i=t.onError,a=t.onResult,n=t.onDone,e="",o=0;o<this.options.interceptors.length;o++){var s=this.options.interceptors[o];s.call&&(e+=this.getInterceptor(o)+".call("+this.args({before:s.context?"_context":void 0})+");\n")}return e+=this.content(Object.assign(t,{onError:i&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].error&&(e+=r.getInterceptor(n)+".error("+t+");\n");return e+=i(t)},onResult:a&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].result&&(e+=r.getInterceptor(n)+".result("+t+");\n");return e+=a(t)},onDone:n&&function(){for(var t="",e=0;e<r.options.interceptors.length;e++)r.options.interceptors[e].done&&(t+=r.getInterceptor(e)+".done();\n");return t+=n()}}))}return this.content(t)},e.header=function(){var t="";return this.needContext()?t+="var _context = {};\n":t+="var _context;\n",t+="var _x = this._x;\n",0<this.options.interceptors.length&&(t+="var _taps = this.taps;\nvar _interceptors = this.interceptors;\n"),t},e.needContext=function(){for(var t,e=Ar(this.options.taps);!(t=e()).done;)if(t.value.context)return!0;return!1},e.callTap=function(t,e){for(var n=e.onError,r=e.onResult,i=e.onDone,a=e.rethrowIfPossible,o="",s=!1,l=0;l<this.options.interceptors.length;l++){var c=this.options.interceptors[l];c.tap&&(s||(o+="var _tap"+t+" = "+this.getTap(t)+";\n",s=!0),o+=this.getInterceptor(l)+".tap("+(c.context?"_context, ":"")+"_tap"+t+");\n")}o+="var _fn"+t+" = "+this.getTapFn(t)+";\n";var u=this.options.taps[t];switch(u.type){case"sync":a||(o=o+"var _hasError"+t+" = false;\ntry {\n"),o+=r?"var _result"+t+" = _fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n":"_fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n",a||(o=(o=(o=o+"} catch(_err) {\n_hasError"+t+" = true;\n")+n("_err"))+"}\nif(!_hasError"+t+") {\n"),r&&(o+=r("_result"+t)),i&&(o+=i()),a||(o+="}\n");break;case"async":var f=(f=(f="")+(r?"(function(_err"+t+", _result"+t+") {\n":"(function(_err"+t+") {\n")+("if(_err"+t+") {\n"))+n("_err"+t)+"} else {\n";r&&(f+=r("_result"+t)),i&&(f+=i()),o+="_fn"+t+"("+this.args({before:u.context?"_context":void 0,after:f=f+"}\n"+"})"})+");\n";break;case"promise":o=(o=(o=(o+="var _hasResult"+t+" = false;\n")+("var _promise"+t+" = _fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n"))+("if (!_promise"+t+" || !_promise"+t+".then)\n")+(" throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise"+t+" + ')');\n"))+("_promise"+t+".then((function(_result"+t+") {\n")+("_hasResult"+t+" = true;\n"),r&&(o+=r("_result"+t)),i&&(o+=i()),o=(o=o+("}), function(_err"+t+") {\n")+("if(_hasResult"+t+") throw _err"+t+";\n"))+n("_err"+t)+"});\n"}return o},e.callTapsSeries=function(t){var i=this,a=t.onError,o=t.onResult,e=t.resultReturns,s=t.onDone,n=t.doneReturns,l=t.rethrowIfPossible;if(0===this.options.taps.length)return s();for(var c=this.options.taps.findIndex(function(t){return"sync"!==t.type}),u=e||n,f="",h=s,d=0,r=function(){function e(t){return t?"":s()}var n=p,r=(h!==s&&("sync"!==i.options.taps[n].type||20<d++)&&(d=0,f=(f+="function _next"+n+"() {\n")+h()+"}\n",h=function(){return(u?"return ":"")+"_next"+n+"();\n"}),h),t=i.callTap(n,{onError:function(t){return a(n,t,r,e)},onResult:o&&function(t){return o(n,t,r,e)},onDone:!o&&r,rethrowIfPossible:l&&(c<0||n<c)});h=function(){return t}},p=this.options.taps.length-1;0<=p;p--)r();return f+=h()},e.callTapsLooping=function(t){var e=t.onError,n=t.onDone,t=t.rethrowIfPossible;if(0===this.options.taps.length)return n();var a=this.options.taps.every(function(t){return"sync"===t.type}),r="";a||(r+="var _looper = (function() {\nvar _loopAsync = false;\n");for(var r=(r+="var _loop;\n")+"do {\n"+"_loop = false;\n",i=0;i<this.options.interceptors.length;i++){var o=this.options.interceptors[i];o.loop&&(r+=this.getInterceptor(i)+".loop("+this.args({before:o.context?"_context":void 0})+");\n")}return r=r+this.callTapsSeries({onError:e,onResult:function(t,e,n,r){var i=(i="")+("if("+e+" !== undefined) {\n")+"_loop = true;\n";return a||(i+="if(_loopAsync) _looper();\n"),i=(i=i+r(!0)+"} else {\n")+n()+"}\n"},onDone:n&&function(){var t="";return(t+="if(!_loop) {\n")+n()+"}\n"},rethrowIfPossible:t&&a})+"} while(_loop);\n",a||(r+="_loopAsync = true;\n});\n_looper();\n"),r},e.callTapsParallel=function(t){var e=this,a=t.onError,o=t.onResult,s=t.onDone,l=t.rethrowIfPossible,t=t.onTap,c=void 0===t?function(t,e){return e()}:t;if(this.options.taps.length<=1)return this.callTapsSeries({onError:a,onResult:o,onDone:s,rethrowIfPossible:l});for(var u="",n=(u=(u+="do {\n")+("var _counter = "+this.options.taps.length+";\n"),s&&(u=(u+="var _done = (function() {\n")+s()+"});\n"),function(n){function r(){return s?"if(--_counter === 0) _done();\n":"--_counter;"}function i(t){return t||!s?"_counter = 0;\n":"_counter = 0;\n_done();\n"}u=(u+="if(_counter <= 0) break;\n")+c(n,function(){return e.callTap(n,{onError:function(t){var e="";return(e+="if(_counter > 0) {\n")+a(n,t,r,i)+"}\n"},onResult:o&&function(t){var e="";return(e+="if(_counter > 0) {\n")+o(n,t,r,i)+"}\n"},onDone:!o&&r,rethrowIfPossible:l})},r,i)}),r=0;r<this.options.taps.length;r++)n(r);return u+="} while(false);\n"},e.args=function(t){var t=void 0===t?{}:t,e=t.before,t=t.after,n=this._args;return e&&(n=[e].concat(n)),0===(n=t?n.concat(t):n).length?"":n.join(", ")},e.getTapFn=function(t){return"_x["+t+"]"},e.getTap=function(t){return"_taps["+t+"]"},e.getInterceptor=function(t){return"_interceptors["+t+"]"},t}();new(function(t){function e(){return t.apply(this,arguments)||this}return _r(e,t),e.prototype.content=function(t){var i=t.onError,t=t.onDone;return this.callTapsParallel({onError:function(t,e,n,r){return i(e)+r(!0)},onDone:t})},e}(n)),new(function(t){function e(){return t.apply(this,arguments)||this}return _r(e,t),e.prototype.content=function(t){var i=this,a=t.onError,e=t.onResult;return t.onDone,this.callTapsSeries({onError:function(t,e,n,r){return a(e)+r(!0)},onResult:function(t,e,n){var r="";return(r+="if("+e+" !== undefined) {\n")+(i._args[0]+" = "+e+";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])}})},e}(n)),new(function(t){function e(){return t.apply(this,arguments)||this}return _r(e,t),e.prototype.content=function(t){var n=t.onError,e=t.onDone,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onDone:e,rethrowIfPossible:t})},e}(n));new(function(t){function e(){return t.apply(this,arguments)||this}return _r(e,t),e.prototype.content=function(t){var i=this,n=t.onError,e=t.onResult,r=t.resultReturns,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onResult:function(t,e,n){var r="";return(r+="if("+e+" !== undefined) {\n")+(i._args[0]+" = "+e+";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])},doneReturns:r,rethrowIfPossible:t})},e}(n));var ea=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],na=/([\"\'])[^\'\"]+\1/;function ra(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");var n=Date.now(),e=16<(e=n-ha)?0:16-e,r=sa();return fa[r]=t,1<Object.keys(fa).length||setTimeout(function(){ha=n;var e=fa;fa={},Object.keys(e).forEach(function(t){return e[t](ua())})},e),r}function ia(t){delete fa[t]}function aa(t){return"string"!=typeof t?ra:""===t?la.requestAnimationFrame:la[t+"RequestAnimationFrame"]}var oa=1,sa=function(){return oa++},la="object"==typeof self&&self.self==self?self:"object"==typeof j&&j.global==j?j:{},ca=Date.now(),ua=function(){return la.performance&&"function"==typeof la.performance.now?la.performance.now():Date.now()-ca},fa={},ha=Date.now(),r=function(t,e){for(var n=0;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}}(["","webkit","moz","ms","o"],aa),i=aa(r),r="string"!=typeof(n=r)?ia:""===n?la.cancelAnimationFrame:la[n+"CancelAnimationFrame"]||la[n+"CancelRequestAnimationFrame"],da=(la.requestAnimationFrame=i,la.cancelAnimationFrame=r,/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i),pa=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,ga=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,ya=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var ma={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},va=Ir(function(t){t="angular"===t.type?Number(t.value):ma[t.value]||0;return ei(t,"deg")}),ba=Ir(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:ei(n,i),cy:ei(r,a)}}),xa=Ir(function(t){if(-1<t.indexOf("linear")||-1<t.indexOf("radial"))return Oi(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!=(h=r[i-1].length)?h:{type:"%",value:"100"},1<i&&(r[0].length=null!=(h=r[0].length)?h:{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(!b(c)&&!b(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 f,h=t.map(function(t){return{offset:ei(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 Rr(Nr.LinearGradient,{angle:n?va(n):Ur,steps:h}):"radial-gradient"===e&&"shape"===(n=n||[{type:"shape",value:"circle"}])[0].type&&"circle"===n[0].value?(e=(t=ba(n[0].at)).cx,t=t.cy,n[0].style&&(f=(n=n[0].style).type,n=n.value,f="extent-keyword"===f?Hr(n):ei(n,f)),new Rr(Nr.RadialGradient,{cx:e,cy:t,size:f,steps:h})):void 0});var e=t[0];if("("===t[1]||"("===t[2])if("l"===e){var n=da.exec(t);if(n)return r=(null==(r=n[2].match(ya))?void 0:r.map(function(t){return t.split(":")}))||[],[new Rr(Nr.LinearGradient,{angle:ei(parseFloat(n[1]),"deg"),steps:r.map(function(t){var e=t[0],t=t[1];return{offset:ei(100*Number(e),"%"),color:t}})})]}else if("r"===e){n=function(t){var t=pa.exec(t);if(t)return t=(null==(t=t[4].match(ya))?void 0:t.map(function(t){return t.split(":")}))||[],{cx:ei(50,"%"),cy:ei(50,"%"),steps:t.map(function(t){var e=t[0],t=t[1];return{offset:ei(100*Number(e),"%"),color:t}})};return null}(t);if(n&&!qe(n))return[new Rr(Nr.RadialGradient,n)]}else if("p"===e){var r=t;if(r=ga.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 wa(t){return t&&!b(t.r)&&!b(t.g)&&!b(t.b)}var ka=Ir(function(t){var e;return(e=t)&&e.image?Or({repetition:"repeat"},t):"transparent"===(t=b(t)?"":t)?Jr:xa(t="currentColor"===t?"black":t)||(e=[0,0,0,0],null!==(t=En(t))&&(e[0]=t.r||0,e[1]=t.g||0,e[2]=t.b||0,e[3]=t.opacity),ti.apply(void 0,e))});function Ma(t,e){if(wa(t)&&wa(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(Ye(e[n],0,255));return e[3]=Ye(e[3],0,1),"rgba("+e.join(",")+")"}]}function Oa(t,e){if(b(e))return ei(0,"px");if(e=(""+e).trim().toLowerCase(),isFinite(Number(e))){if(0<="px".search(t))return ei(Number(e),"px");if(0<="deg".search(t))return ei(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 ei(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)})[0]}var _a=Ir(function(t){return Oa(new RegExp("px","g"),t)}),Sa=(Ir(function(t){return Oa(new RegExp("%","g"),t)}),function(t){return $e(t)||isFinite(Number(t))?ei(Number(t)||0,"px"):Oa(new RegExp("px|%|em|rem","g"),t)}),Ea=Ir(function(t){return Oa(new RegExp("deg|rad|grad|turn","g"),t)});function Aa(t){var e=0;return t.unit===s.kDegrees?e=t.value:t.unit===s.kRadians?e=ui(Number(t.value)):t.unit===s.kTurns&&(e=360*Number(t.value)),e}function La(t,e){var n;return Array.isArray(t)?n=t.map(function(t){return Number(t)}):qe(t)?n=t.split(" ").map(function(t){return Number(t)}):$e(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 Ta(t){return qe(t)?t.split(" ").map(function(t){return Sa(t)}):t.map(function(t){return Sa(t.toString())})}function Pa(t,e,n){return 0===t.value?0:t.unit===s.kPixels?Number(t.value):t.unit===s.kPercentage&&n?(n=n.nodeName===x.GROUP?n.getLocalBounds():n.geometry.contentBounds,t.value/100*n.halfExtents[e]*2):0}var Na=function(t){return Oa(/deg|rad|grad|turn|px|%/g,t)},ja=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function Ca(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<ja.indexOf(e[1])&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return Na(t)||ka(t)})}),n.lastIndex===t.length)return r}return[]}function Ra(t){return t.toString()}var Ba=Ir(function(t){return"number"==typeof t?ei(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?ei(Number(t)):ei(0)});function Ia(t,e){return[t,e,Ra]}function Fa(n,r){return function(t,e){return[t,e,function(t){return Ra(Ye(t,n,r))}]}}function Da(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}Ir(function(t){return(qe(t)?t.split(" "):t).map(Ba)});var za=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=Xi(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=Kn.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 f=o.arcParams,u=lr.box(f.cx,f.cy,f.rx,f.ry,f.xRotation,f.startAngle,f.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}),h=He(n),d=He(r),p=Ge(n),g=Ge(r);if(0!==i.length)for(var y=0;y<i.length;y++){var m=i[y],v=m.currentPoint;v[0]===h?h-=Yi(m,e).xExtra:v[0]===p&&(p+=Yi(m,e).xExtra),v[1]===d?d-=Yi(m,e).yExtra:v[1]===g&&(g+=Yi(m,e).yExtra)}return{x:h,y:d,width:p-h,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}}},Wa=Ir(za);function Ga(t,e){t=(qe(t)?Wa:za)(t);return e&&(e.parsedStyle.defX=t.rect.x,e.parsedStyle.defY=t.rect.y),t}function Ha(t,e,n){var r,i,a,o,s,l,c,u,f,h=t.curve,d=e.curve,t=(h&&0!==h.length||(h=Le(t.absolutePath,!1),t.curve=h),d&&0!==d.length||(d=Le(e.absolutePath,!1),e.curve=d),[h,d]),h=Pe((t=h.length!==d.length?function t(e,n,r){var i,e=Ne(e),n=Ne(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],f=[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&&f[n]&&t.l>=u[n],f[n]-=i?1:0,i?t.ss:[t.s]}).flat()});return r[0].length===r[1].length?r:t(r[0],r[1],c)}(h,d):t)[0])!==Pe(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))}))):se(t[0]);return[h,(i=t[1],a=h,c=i.length-1,u=[],f=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){f+=_e(i[(n+e)%c].slice(-2),a[e%c].slice(-2))}),u[n]=f,f=0}),d[u.indexOf(Math.min.apply(null,u))]),function(t){return t}]}function Va(t,e){var n,r,i=qe(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=hr.length(i),t=(i.forEach(function(t,e){i[e+1]&&((n=[0,0])[0]=o/s,r=Gn.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 qa(t,e){return[t.points,e.points,function(t){return t}]}var Ya=null;function $a(t){return function(e){var n=0;return t.map(function(t){return t===Ya?e[n++]:t})}}function Ua(t){return t}var Ka={matrix:["NNNNNN",[Ya,Ya,0,0,Ya,Ya,0,0,0,0,1,0,Ya,Ya,0,1],Ua],matrix3d:["NNNNNNNNNNNNNNNN",Ua],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",$a([Ya,Ya,new Yr(1)]),Ua],scalex:["N",$a([Ya,new Yr(1),new Yr(1)]),$a([Ya,new Yr(1)])],scaley:["N",$a([new Yr(1),Ya,new Yr(1)]),$a([new Yr(1),Ya])],scalez:["N",$a([new Yr(1),new Yr(1),Ya])],scale3d:["NNN",Ua],skew:["Aa",null,Ua],skewx:["A",null,$a([Ya,Ur])],skewy:["A",null,$a([Ur,Ya])],translate:["Tt",$a([Ya,Ya,$r]),Ua],translatex:["T",$a([Ya,$r,$r]),$a([Ya,$r])],translatey:["T",$a([$r,Ya,$r]),$a([$r,Ya])],translatez:["L",$a([$r,$r,Ya])],translate3d:["TTL",Ua]};function Xa(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=Ka[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 f=s[u],h=l[u],d=void 0;if(void 0===(d=f?{A:function(t){return"0"===t.trim()?Ur:Ea(t)},N:Ba,T:Sa,L:_a}[h.toUpperCase()](f):{a:Ur,n:c[0],t:$r}[h]))return[];c.push(d)}if(r.push({t:a,d:c}),n.lastIndex===t.length)return r}return[]}function Za(t){switch(t.t){case"rotatex":return i=ci(Aa(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=ci(Aa(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=ci(Aa(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=ci(Aa(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=ci(Aa(t.d[0])),a=ci(Aa(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=ci(Aa(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=ci(Aa(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=Pa(t.d[0],0,null)||0,n=Pa(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Pa(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=Pa(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=Pa(t.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Pa(t.d[0],0,null)||0,n=Pa(t.d[1],0,null)||0,r=Pa(t.d[2],0,null)||0,1];case"perspective":a=Pa(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 Qa(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 Ja(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 vi(0===(t=t).length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(Za).reduce(Qa),e,n,r,i,a),[[e,n,r,a,i]]}var to=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],f=r[2],r=r[3],h=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],f=(h[0][0]=1-2*(u*u+f*f),h[0][1]=2*(c*u-f*r),h[0][2]=2*(c*f+u*r),h[1][0]=2*(c*u+f*r),h[1][1]=1-2*(c*c+f*f),h[1][2]=2*(u*f-c*r),h[2][0]=2*(c*f-u*r),h[2][1]=2*(u*f+c*r),h[2][2]=1-2*(c*c+u*u),a=eo(a,h),[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]);n[2]&&(f[2][1]=n[2],a=eo(a,f)),n[1]&&(f[2][1]=0,f[2][0]=n[0],a=eo(a,f)),n[0]&&(f[2][0]=0,f[1][0]=n[0],a=eo(a,f));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 eo(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 no(t){return t.toFixed(6).replace(".000000","")}function ro(e,n){var r,i;return e.decompositionPair!==n&&(e.decompositionPair=n,r=Ja(e)),n.decompositionPair!==e&&(n.decompositionPair=e,i=Ja(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=Ye(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 to(t[0],t[1],t[2],e,t[4]).map(no).join(",")}])}function io(t){return t.replace(/[xy]/,"")}function ao(t){return t.replace(/(x|y|z|3d)?$/,"3d")}var oo=function(t,e){return"perspective"===t&&"perspective"===e||("matrix"===t||"matrix3d"===t)&&("matrix"===e||"matrix3d"===e)};function so(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?ei(n):ei(n,t.unit)})})}()}var n=[],o=[],s=[];if(r.length!==i.length)var l=ro(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,f=i[c].t,h=r[c].d,d=i[c].d,p=Ka[u],g=Ka[f],y=void 0;if(oo(u,f)){var m=ro([r[c]],[i[c]]);n.push(m[0]),o.push(m[1]),s.push(["matrix",[m[2]]])}else{if(u===f)y=u;else if(p[2]&&g[2]&&io(u)===io(f))y=io(u),h=p[2](h),d=g[2](d);else{if(!p[1]||!g[1]||ao(u)!==ao(f)){m=ro(r,i);n=[m[0]],o=[m[1]],s=[["matrix",[m[2]]]];break}y=ao(u),h=p[1](h),d=g[1](d)}for(var v=[],b=[],x=[],w=0;w<h.length;w++){var k=function(t,e,n,r,i){void 0===i&&(i=0);var a="",o=t.value||0,s=e.value||0,l=Gr(t.unit),c=t.convertTo(l),l=e.convertTo(l);return c&&l?(o=c.value,s=l.value,a=Tr(t.unit)):(Yr.isLength(t.unit)||Yr.isLength(e.unit))&&(o=Pa(t,i,n),s=Pa(e,i,n),a="px"),[o,s,function(t){return(t=r?Math.max(t,0):t)+a}]}(h[w],d[w],t,!1,w);v[w]=k[0],b[w]=k[1],x.push(k[2])}n.push(v),o.push(b),s.push([y,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 lo=Ir(function(t){var e;return qe(t)?"text-anchor"===t?[ei(0,"px"),ei(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:[Sa(co(e[0])),Sa(co(e[1]))]):[ei(t[0]||0,"px"),ei(t[1]||0,"px")]});function co(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var n=function(){function t(){this.parser=Ea,this.parserWithCSSDisabled=null,this.mixer=Ia}return t.prototype.calculator=function(t,e,n,r){return Aa(n)},t}(),i=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){return n instanceof Br&&(n=null),k.sceneGraphService.updateDisplayObjectDependency(t,e,n,r),"clipPath"===t&&r.forEach(function(t){0===t.childNodes.length&&k.sceneGraphService.dirtifyToRoot(t)}),n},t}(),r=function(){function t(){this.parser=ka,this.parserWithCSSDisabled=ka,this.mixer=Ma}return t.prototype.calculator=function(t,e,n,r){return n instanceof Br?"none"===n.value?Qr:Jr:n},t}(),uo=function(){function t(){this.parser=Ca}return t.prototype.calculator=function(t,e,n){return n instanceof Br?[]:n},t}();function fo(t){t=t.parsedStyle.fontSize;return b(t)?null:t}function ho(){this.parser=lo}var po=function(){function t(){this.parser=Sa,this.parserWithCSSDisabled=null,this.mixer=Ia}return t.prototype.calculator=function(t,e,n,r,i){if($e(n))return n;if(!Yr.isRelativeUnit(n.unit))return n.value;if(n.unit===s.kPercentage)return 0;if(n.unit===s.kEms){if(r.parentNode){var a=fo(r.parentNode);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}if(n.unit===s.kRems){if(null!=r&&null!=(a=r.ownerDocument)&&a.documentElement){a=fo(r.ownerDocument.documentElement);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}},t}(),go=function(){function t(){this.mixer=Da}var e=t.prototype;return e.parser=function(t){t=Ta($e(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}(),yo=function(){function t(){this.mixer=Da}var e=t.prototype;return e.parser=function(t){t=Ta($e(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}(),mo=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 x.CIRCLE:case x.ELLIPSE:var i=t.parsedStyle,a=i.cx,i=i.cy;b(a)||(l=a),b(i)||(c=i);break;case x.LINE:var a=t.parsedStyle,i=a.x1,o=a.x2,s=a.y1,a=a.y2,l=Math.min(i,o),c=Math.min(s,a),u=0;break;case x.RECT:case x.IMAGE:case x.GROUP:case x.HTML:case x.TEXT:case x.MESH:b(t.parsedStyle.x)||(l=t.parsedStyle.x),b(t.parsedStyle.y)||(c=t.parsedStyle.y)}t.nodeName!==x.PATH&&t.nodeName!==x.POLYLINE&&t.nodeName!==x.POLYGON&&(t.parsedStyle.defX=l||0,t.parsedStyle.defY=c||0),b(l)&&b(c)&&b(u)||-1!==e.indexOf("transform")||((e=t.parsedStyle.transform)&&e.length?wi(e,t):(n=(e=t.getLocalPosition())[0],r=e[1],e=e[2],t.setLocalPosition(b(l)?n:l,b(c)?r:c,b(u)?e:u)))},e}(po),vo=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n=null==(n=n=n instanceof Br?null:n)?void 0:n.cloneNode(!0);return n&&(n.style.isMarker=!0),n},t}(),bo=function(){function t(){this.mixer=Ia,this.parser=Ba,this.parserWithCSSDisabled=null}return t.prototype.calculator=function(t,e,n){return n.value},t}(),xo=function(){function t(){this.parser=Ba,this.parserWithCSSDisabled=null,this.mixer=Fa(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)!==x.LINE&&e!==x.PATH&&e!==x.POLYLINE||(e=r.getPoint(n))&&(t.parsedStyle.defX=e.x,t.parsedStyle.defY=e.y,t.setLocalPosition(e.x,e.y))},t}(),wo=function(){function t(){this.parser=Ba,this.parserWithCSSDisabled=null,this.mixer=Fa(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),ko=function(){function y(){this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}y.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]};var t=y.prototype;return t.update=function(t,e){ri(this.center,t),ri(this.halfExtents,e),ii(this.min,this.center,this.halfExtents),ai(this.max,this.center,this.halfExtents)},t.setMinMax=function(t,e){ai(this.center,e,t),oi(this.center,this.center,.5),ii(this.halfExtents,e,t),oi(this.halfExtents,this.halfExtents,.5),ri(this.min,t),ri(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,f,h,d,p,g;y.isEmpty(t)||(y.isEmpty(this)?this.setMinMax(t.getMin(),t.getMax()):(n=(e=this.center)[0],p=e[1],a=e[2],i=(r=this.halfExtents)[0],f=r[1],o=r[2],l=(h=t.center)[0],g=h[1],h=h[2],c=(t=t.halfExtents)[0],(d=g-(u=t[1]))<(s=p-f)&&(s=d),(d=p+f)<(p=g+u)&&(d=p),(g=h-(f=t[2]))<(u=a-o)&&(u=g),(p=a+o)<(t=h+f)&&(p=t),e[0]=.5*((a=(g=l-c)<(a=n-i)?g:a)+(o=(o=n+i)<(h=l+c)?h: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],f=e[2],h=e[6],d=e[10],p=Math.abs(a),g=Math.abs(o),y=Math.abs(s),m=Math.abs(l),v=Math.abs(c),b=Math.abs(u),x=Math.abs(f),w=Math.abs(h),k=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]+f*i[0]+h*i[1]+d*i[2],r[0]=p*t[0]+g*t[1]+y*t[2],r[1]=m*t[0]+v*t[1]+b*t[2],r[2]=x*t[0]+w*t[1]+k*t[2],ii(this.min,n,r),ai(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 y,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?ri([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?ri([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]]},y}(),Mo=function(){function t(t,e){this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||Ft(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 Vt(t,this.normal)-this.distance},e.normalize=function(){var t,e,n,r=1/Kt(this.normal);t=this.normal,e=this.normal,n=r,t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,this.distance*=r},e.intersectsLine=function(t,e,n){var r,i,a=this.distanceToPoint(t),a=a/(a-this.distanceToPoint(e)),o=0<=a&&a<=1;return o&&n&&(n=n,e=e,a=a,r=(t=t)[0],i=t[1],t=t[2],n[0]=r+a*(e[0]-r),n[1]=i+a*(e[1]-i),n[2]=t+a*(e[2]-t)),o},t}(),Oo=(0,function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new Mo)}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],f=t[10],h=t[11],d=t[12],p=t[13],g=t[14],t=t[15];zt(this.planes[0].normal,i-e,l-a,h-c),this.planes[0].distance=t-d,zt(this.planes[1].normal,i+e,l+a,h+c),this.planes[1].distance=t+d,zt(this.planes[2].normal,i+n,l+o,h+u),this.planes[2].distance=t+p,zt(this.planes[3].normal,i-n,l-o,h-u),this.planes[3].distance=t-p,zt(this.planes[4].normal,i-r,l-s,h-f),this.planes[4].distance=t-g,zt(this.planes[5].normal,i+r,l+s,h+f),this.planes[5].distance=t+g,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})},t}()),_o=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}(),So=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}(),Eo=function(){function t(){this.parser=Ga,this.parserWithCSSDisabled=Ga,this.mixer=Ha}var e=t.prototype;return e.calculator=function(t,e,n){return n instanceof Br&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new So(0,0,0,0)}:n},e.postProcessor=function(t,e){var n;t.nodeName===x.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}(),Ao=function(){function t(){this.parser=Va,this.mixer=qa}return t.prototype.postProcessor=function(t,e){var n;t.nodeName!==x.POLYGON&&t.nodeName!==x.POLYLINE||-1!==e.indexOf("transform")||(n=(e=t.parsedStyle).defX,e=e.defY,t.setLocalPosition(n,e))},t}(),Lo=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=Fa(0,1/0),t}return _r(t,i),t}(po),To=function(){function t(){}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Br?"unset"===n.value?"":n.value:""+n},e.postProcessor=function(t){t.nodeValue=""+t.parsedStyle.text||""},t}(),Po=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}(),No=function(){function t(){this.parser=Xa,this.parserWithCSSDisabled=Xa,this.mixer=so}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Br?[]:n},e.postProcessor=function(t){wi(t.parsedStyle.transform,t)},t}(),jo=function(){function t(){this.parser=Ba}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}();var Co,Ro,Bo=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 _o,this.page=new _o,this.canvas=new _o,this.viewport=new _o,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(ni)},Mr(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}(),Io=function(r){function t(t,e){var n=r.call(this,null)||this;return n.type=t,n.detail=e,Object.assign(function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(n),e),n}return _r(t,r),t}(Bo),Fo=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(ni)},t.lookupNamespaceURI=function(t){throw new Error(ni)},t.lookupPrefix=function(t){throw new Error(ni)},t.normalize=function(){throw new Error(ni)},t.isEqualNode=function(t){return this===t},t.isSameNode=function(t){return this.isEqualNode(t)},t.compareDocumentPosition=function(t){if(t===this)return 0;if(!(t instanceof d))throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");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,f=s[c],h=o[l+c];if(h!==f)return(u=f.parentNode.childNodes).indexOf(f)<u.indexOf(h)?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)})},Mr(d,[{key:"textContent",get:function(){var t="";this.nodeName===x.TEXT&&(t+=this.style.text);for(var e=Ar(this.childNodes);!(n=e()).done;){var n=n.value;n.nodeName===x.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===x.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}(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=Qe(n)&&n||Fe(n)&&n.capture,n=Fe(n)&&n.once,s=zr(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=zr(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=Qe(n)&&n||Fe(n)&&n.capture,i=zr(e)?void 0:e;return e=zr(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 Io(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}()),Do=(Fo.DOCUMENT_POSITION_DISCONNECTED=1,Fo.DOCUMENT_POSITION_PRECEDING=2,Fo.DOCUMENT_POSITION_FOLLOWING=4,Fo.DOCUMENT_POSITION_CONTAINS=8,Fo.DOCUMENT_POSITION_CONTAINED_BY=16,Fo.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,Co=Co||{},Co[Co.Standard=0]="Standard",(Vo=Ro=Ro||{}).REPARENT="reparent",Vo.DESTROY="destroy",Vo.ATTR_MODIFIED="DOMAttrModified",Vo.INSERTED="DOMNodeInserted",Vo.REMOVED="removed",Vo.MOUNTED="DOMNodeInsertedIntoDocument",Vo.UNMOUNTED="DOMNodeRemovedFromDocument",Vo.BOUNDS_CHANGED="bounds-changed",Vo.RENDER_ORDER_CHANGED="render-order-changed",Vo.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}(Bo)),zo=(Do.ADDITION=2,Do.MODIFICATION=1,Do.REMOVAL=3,0),Wo=new Do(Ro.INSERTED,null,"","","",0,"",""),Go=new Do(Ro.REMOVED,null,"","","",0,"",""),Ho=new Io(Ro.DESTROY),Vo=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=zo++,t.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1,proxyNodeName:void 0},t.cullable={strategy:Co.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,lastSortedIndex:void 0,renderOrder: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=k.enableCSSParsing?{anchor:Xr,opacity:Xr,fillOpacity:Xr,strokeOpacity:Xr,fill:Xr,stroke:Xr,transform:Xr,transformOrigin:Xr,visibility:Xr,pointerEvents:Xr,lineWidth:Xr,lineCap:Xr,lineJoin:Xr,increasedLineWidthForHitTesting:Xr,fontSize:Xr,fontFamily:Xr,fontStyle:Xr,fontWeight:Xr,fontVariant:Xr,textAlign:Xr,textBaseline:Xr,textTransform:Xr,zIndex:Xr,filter:Xr,shadowType:Xr}: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(ni)},e.appendChild=function(t,e){if(t.destroyed)throw new Error("Cannot append a destroyed element.");return k.sceneGraphService.attach(t,this,e),null!=(e=this.ownerDocument)&&e.defaultView&&this.ownerDocument.defaultView.mountChildren(t),Wo.relatedNode=this,t.dispatchEvent(Wo),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 Go.relatedNode=this,t.dispatchEvent(Go),null!=(e=t.ownerDocument)&&e.defaultView&&t.ownerDocument.defaultView.unmountChildren(t),k.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 k.sceneGraphService.matches(t,this)},e.getElementById=function(t){return k.sceneGraphService.querySelector("#"+t,this)},e.getElementsByName=function(t){return k.sceneGraphService.querySelectorAll('[name="'+t+'"]',this)},e.getElementsByClassName=function(t){return k.sceneGraphService.querySelectorAll("."+t,this)},e.getElementsByTagName=function(t){return k.sceneGraphService.querySelectorAll(t,this)},e.querySelector=function(t){return k.sceneGraphService.querySelector(t,this)},e.querySelectorAll=function(t){return k.sceneGraphService.querySelectorAll(t,this)},e.closest=function(t){var e=this;do{if(k.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(Ho),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.getGeometryBounds=function(){return k.sceneGraphService.getGeometryBounds(this)},e.getRenderBounds=function(){return k.sceneGraphService.getBounds(this,!0)},e.getBounds=function(){return k.sceneGraphService.getBounds(this)},e.getLocalBounds=function(){return k.sceneGraphService.getLocalBounds(this)},e.getBoundingClientRect=function(){return k.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?k.enableCSSParsing?null:void 0:void 0===(e=this.attributes[t])&&(t=qr(t),e=this.attributes[t],k.enableCSSParsing)&&b(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(ni)},e.getAttributeNode=function(t){throw new Error(ni)},e.getAttributeNodeNS=function(t,e){throw new Error(ni)},e.hasAttributeNS=function(t,e){throw new Error(ni)},e.removeAttributeNS=function(t,e){throw new Error(ni)},e.removeAttributeNode=function(t){throw new Error(ni)},e.setAttributeNS=function(t,e,n){throw new Error(ni)},e.setAttributeNode=function(t){throw new Error(ni)},e.setAttributeNodeNS=function(t){throw new Error(ni)},e.toggleAttribute=function(t,e){throw new Error(ni)},Mr(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}(Fo);var qo,Yo,$o,Uo=new Do(Ro.ATTR_MODIFIED,null,null,null,null,Do.MODIFICATION,null,null),Ko={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:""},Xo={anchor:[0,0],fill:Qr,stroke:Qr,transform:[],zIndex:0,filter:[],shadowType:"outer",miterLimit:10},Zo=Or({},Xo,{opacity:1,fillOpacity:1,strokeOpacity:1,visibility:"visible",pointerEvents:"auto",lineWidth:1,lineCap:"butt",lineJoin:"miter",increasedLineWidthForHitTesting:0,fillRule:"nonzero"}),Qo=[].concat(["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting"],["fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"]),Jo=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||x.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,k.enableCSSParsing?Xo:Zo,r.config.initialParsedStyle),k.enableCSSParsing&&Object.assign(r.attributes,Ko),r.initAttributes(r.config.style),k.globalThis.Proxy||function(){});return r.dataset=new t({},{get:function(t,e){e="data-"+Fr(e);return void 0!==t[e]?t[e]:r.getAttribute(e)},set:function(t,e,n){return r.setAttribute("data-"+Fr(e),n),!0}}),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,i=Or({},this.attributes);for(n in i){var a=i[n];null!=(r=a)&&r.nodeName&&"clipPath"!==n&&"offsetPath"!==n&&"textPath"!==n&&(i[n]=a.cloneNode(e)),t&&(i[n]=t(n,a))}var o=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:i});return o.setLocalTransform(this.getLocalTransform()),e&&this.children.forEach(function(t){t.style.isMarker||(t=t.cloneNode(e),o.appendChild(t))}),o},e.initAttributes=function(t){void 0===t&&(t={});var e,n=this.renderable,r={forceUpdateGeometry:!0},i=(k.enableCSSParsing&&(r.usedAttributes=Qo),{});for(e in t)i[qr(e)]=t[e];k.styleValueRegistry.processProperties(this,i,r),n.dirty=!0},e.setAttribute=function(t,e,n){void 0===n&&(n=!1);t=qr(t);Je(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=(k.styleValueRegistry.processProperties(this,((o={})[t]=e,o),n),r.dirty=!0,this.parsedStyle[t]);this.isConnected&&(Uo.relatedNode=this,Uo.prevValue=i,Uo.newValue=e,Uo.attrName=t,Uo.prevParsedValue=a,Uo.newParsedValue=o,this.isMutationObserved?this.dispatchEvent(Uo):(Uo.target=this).ownerDocument.defaultView.dispatchEvent(Uo,!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 So(n,e,r-n,t-e)},e.setOrigin=function(t,e,n){return k.sceneGraphService.setOrigin(this,li(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.getOrigin=function(){return k.sceneGraphService.getOrigin(this)},e.setPosition=function(t,e,n){return k.sceneGraphService.setPosition(this,li(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.setLocalPosition=function(t,e,n){return k.sceneGraphService.setLocalPosition(this,li(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.translate=function(t,e,n){return k.sceneGraphService.translate(this,li(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.translateLocal=function(t,e,n){return k.sceneGraphService.translateLocal(this,li(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.getPosition=function(){return k.sceneGraphService.getPosition(this)},e.getLocalPosition=function(){return k.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=li(t,e=e||t,n=n||t)),k.sceneGraphService.scaleLocal(this,t),this},e.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=li(t,e=e||t,n=n||t)),k.sceneGraphService.setLocalScale(this,t),this},e.getLocalScale=function(){return k.sceneGraphService.getLocalScale(this)},e.getScale=function(){return k.sceneGraphService.getScale(this)},e.getEulerAngles=function(){return ui(fi(Bt(),k.sceneGraphService.getWorldTransform(this))[2])},e.getLocalEulerAngles=function(){return ui(fi(Bt(),k.sceneGraphService.getLocalRotation(this))[2])},e.setEulerAngles=function(t){return k.sceneGraphService.setEulerAngles(this,0,0,t),this},e.setLocalEulerAngles=function(t){return k.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},e.rotateLocal=function(t,e,n){return b(e)&&b(n)?k.sceneGraphService.rotateLocal(this,0,0,t):k.sceneGraphService.rotateLocal(this,t,e,n),this},e.rotate=function(t,e,n){return b(e)&&b(n)?k.sceneGraphService.rotate(this,0,0,t):k.sceneGraphService.rotate(this,t,e,n),this},e.setRotation=function(t,e,n,r){return k.sceneGraphService.setRotation(this,t,e,n,r),this},e.setLocalRotation=function(t,e,n,r){return k.sceneGraphService.setLocalRotation(this,t,e,n,r),this},e.setLocalSkew=function(t,e){return k.sceneGraphService.setLocalSkew(this,t,e),this},e.getRotation=function(){return k.sceneGraphService.getRotation(this)},e.getLocalRotation=function(){return k.sceneGraphService.getLocalRotation(this)},e.getLocalSkew=function(){return k.sceneGraphService.getLocalSkew(this)},e.getLocalTransform=function(){return k.sceneGraphService.getLocalTransform(this)},e.getWorldTransform=function(){return k.sceneGraphService.getWorldTransform(this)},e.setLocalTransform=function(t){return k.sceneGraphService.setLocalTransform(this,t),this},e.resetLocalTransform=function(){k.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?Fe(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=_t(Bt(),t),n=e[0],e=e[1],r=St(Bt(),t),i=r[0],r=r[1],t=Et(Qt(),t),t=fi(Bt(),t),a=t[0],t=t[2];return hi(a||t,n,e,i,r)},e.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},e.setMatrix=function(t){var t=di(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=di(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(){k.enableCSSParsing?this.style.visibility="visible":this.forEach(function(t){t.style.visibility="visible"})},e.hide=function(){k.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},Mr(t,[{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}}]),t}(Vo),ts={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new So(0,0,0,0)},es=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:o.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:o.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:o.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:o.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:o.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:o.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:o.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:o.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:o.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:o.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:o.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:o.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:o.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:o.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:o.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:o.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:o.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:o.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:o.FILTER},{n:"clipPath",syntax:o.DEFINED_PATH},{n:"textPath",syntax:o.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:o.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:o.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===x.CIRCLE||t===x.ELLIPSE?"center":t===x.TEXT?"text-anchor":"left top"},l:!0,syntax:o.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===x.CIRCLE||t===x.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:o.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:o.COORDINATE},{n:"cy",int:!0,d:"0",syntax:o.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:o.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:o.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:o.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:o.COORDINATE},{n:"y",int:!0,d:"0",syntax:o.COORDINATE},{n:"z",int:!0,d:"0",syntax:o.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:o.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:o.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:o.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:o.COORDINATE},{n:"y1",int:!0,l:!0,syntax:o.COORDINATE},{n:"z1",int:!0,l:!0,syntax:o.COORDINATE},{n:"x2",int:!0,l:!0,syntax:o.COORDINATE},{n:"y2",int:!0,l:!0,syntax:o.COORDINATE},{n:"z2",int:!0,l:!0,syntax:o.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:o.PATH,p:50},{n:"points",int:!0,l:!0,syntax:o.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:o.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:o.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:o.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:o.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:o.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:o.NUMBER,d:function(t){return t===x.PATH||t===x.POLYGON||t===x.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:o.MARKER},{n:"markerEnd",syntax:o.MARKER},{n:"markerMid",syntax:o.MARKER},{n:"markerStartOffset",syntax:o.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:o.LENGTH,l:!0,int:!0,d:"0"}],ns=es.filter(function(t){return!!t.l}).map(function(t){return t.n}),rs={},is=new WeakMap,Bo=function(){function t(){var e=this;es.forEach(function(t){e.registerMetadata(t)})}var e=t.prototype;return e.registerMetadata=function(e){[e.n].concat(e.a||[]).forEach(function(t){rs[t]=e})},e.unregisterMetadata=function(t){delete rs[t]},e.getPropertySyntax=function(t){return k.CSSPropertySyntaxFactory[t]},e.processProperties=function(n,e,t){var r=this;if(void 0===t&&(t={skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[]}),k.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=rs[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)}),k.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 f=0;f<ns.length;f++)if(ns[f]in e){u=!0;break}e.fill&&(n.parsedStyle.fill=ka(e.fill)),e.stroke&&(n.parsedStyle.stroke=ka(e.stroke)),e.shadowColor&&(n.parsedStyle.shadowColor=ka(e.shadowColor)),e.filter&&(n.parsedStyle.filter=Ca(e.filter)),b(e.radius)||(n.parsedStyle.radius=La(e.radius,4)),b(e.lineDash)||(n.parsedStyle.lineDash=La(e.lineDash,2)),e.points&&(n.parsedStyle.points=Va(e.points,n)),""===e.path&&(n.parsedStyle.path=Or({},ts)),e.path&&(n.parsedStyle.path=Ga(e.path,n)),e.textTransform&&k.CSSPropertySyntaxFactory["<text-transform>"].calculator(null,null,{value:e.textTransform},n,null),e.clipPath&&k.CSSPropertySyntaxFactory["<defined-path>"].calculator("clipPath",o,e.clipPath,n,this),e.offsetPath&&k.CSSPropertySyntaxFactory["<defined-path>"].calculator("offsetPath",i,e.offsetPath,n,this),e.anchor&&(n.parsedStyle.anchor=La(e.anchor,2)),e.transform&&(n.parsedStyle.transform=Xa(e.transform)),e.transformOrigin&&(n.parsedStyle.transformOrigin=lo(e.transformOrigin)),e.markerStart&&(n.parsedStyle.markerStart=k.CSSPropertySyntaxFactory["<marker>"].calculator(null,e.markerStart,e.markerStart,null,null)),e.markerEnd&&(n.parsedStyle.markerEnd=k.CSSPropertySyntaxFactory["<marker>"].calculator(null,e.markerEnd,e.markerEnd,null,null)),e.markerMid&&(n.parsedStyle.markerMid=k.CSSPropertySyntaxFactory["<marker>"].calculator("",e.markerMid,e.markerMid,null,null)),(n.nodeName!==x.CIRCLE&&n.nodeName!==x.ELLIPSE||b(e.cx)&&b(e.cy))&&(n.nodeName!==x.RECT&&n.nodeName!==x.IMAGE&&n.nodeName!==x.GROUP&&n.nodeName!==x.HTML&&n.nodeName!==x.TEXT&&n.nodeName!==x.MESH||b(e.x)&&b(e.y)&&b(e.z))&&(n.nodeName!==x.LINE||b(e.x1)&&b(e.y1)&&b(e.z1)&&b(e.x2)&&b(e.y2)&&b(e.z2))||k.CSSPropertySyntaxFactory["<coordinate>"].postProcessor(n,s),b(e.zIndex)||k.CSSPropertySyntaxFactory["<z-index>"].postProcessor(n,s),e.path&&k.CSSPropertySyntaxFactory["<path>"].postProcessor(n,s),e.points&&k.CSSPropertySyntaxFactory["<list-of-points>"].postProcessor(n,s),b(e.offsetDistance)||k.CSSPropertySyntaxFactory["<offset-distance>"].postProcessor(n,s),e.transform&&k.CSSPropertySyntaxFactory["<transform>"].postProcessor(n,s),u&&this.updateGeometry(n)}},e.parseProperty=function(t,e,n){var r,t=rs[t],i=e;return"unset"===(e=""!==e&&!b(e)?e:"unset")||"initial"===e||"inherit"===e?i=Hr(e):t&&(r=t.k,t=(t=t.syntax)&&this.getPropertySyntax(t),r&&-1<r.indexOf(e)?i=Hr(e):t&&t.parser&&(i=t.parser(e,n))),i},e.computeProperty=function(t,e,n){var r=rs[t],i="g-root"===n.id,a=e;if(r){var o=r.syntax,s=r.inh,r=r.d;if(e instanceof Br){var l=e.value;if("initial"===(l="unset"===l?s&&!i?"inherit":"initial":l))b(r)||(e=this.parseProperty(t,zr(r)?r(n.nodeName):r,n));else if("inherit"===l)return s=this.tryToResolveProperty(n,t,{inherited:!0}),b(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 Br?e.value:e}return a},e.postProcessProperty=function(t,e,n){var t=rs[t];t&&t.syntax&&(t=t.syntax&&this.getPropertySyntax(t.syntax))&&t.postProcessor&&t.postProcessor(e,n)},e.addUnresolveProperty=function(t,e){var n=is.get(t);n||(is.set(t,[]),n=is.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=is.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=is.get(e);t&&t.length&&(n={},t.forEach(function(t){n[t]=e.attributes[t]}),this.processProperties(e,n),is.delete(e))},e.updateGeometry=function(t){var s,e,n,r,i,a,o,l,c,u,f,h,d,p,g,y=t.nodeName,m=k.geometryUpdaterFactory[y];m&&((s=t.geometry).contentBounds||(s.contentBounds=new ko),s.renderBounds||(s.renderBounds=new ko),e=t.parsedStyle,n=(m=m.update(e,t)).width,r=m.height,f=void 0===(f=m.depth)?0:f,u=void 0===(u=m.offsetX)?0:u,p=void 0===(p=m.offsetY)?0:p,m=void 0===(m=m.offsetZ)?0:m,f=[Math.abs(n)/2,Math.abs(r)/2,f/2],l=e.stroke,c=e.lineWidth,g=e.increasedLineWidthForHitTesting,d=e.shadowType,h=e.shadowColor,i=void 0===(i=e.filter)?[]:i,a=e.transformOrigin,o=e.anchor,y===x.TEXT&&delete e.anchor,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))*f[2]+m],s.contentBounds.update(u,f),p=y===x.POLYLINE||y===x.POLYGON||y===x.PATH?Math.SQRT2:.5,l&&!l.isNone&&(f[0]+=m=((c||0)+(g||0))*p,f[1]+=m),s.renderBounds.update(u,f),h&&d&&"inner"!==d&&(l=(y=s.renderBounds).min,c=y.max,g=e.shadowBlur||0,p=e.shadowOffsetX||0,m=e.shadowOffsetY||0,u=l[0]-g+p,f=c[0]+g+p,h=l[1]-g+m,d=c[1]+g+m,l[0]=Math.min(l[0],u),c[0]=Math.max(c[0],f),l[1]=Math.min(l[1],h),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,ai(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,y=r<0,g=((p=n<0)?-1:1)*(a?Pa(a[0],0,t):0),m=(y?-1:1)*(a?Pa(a[1],1,t):0),g-=(p?-1:1)*(o&&o[0]||0)*s.contentBounds.halfExtents[0]*2,m-=(y?-1:1)*(o&&o[1]||0)*s.contentBounds.halfExtents[1]*2,t.setOrigin(g,m),k.sceneGraphService.dirtifyToRoot(t))},e.isPropertyInheritable=function(t){t=rs[t];return!!t&&t.inh},t}();(Fo=qo=qo||{})[Fo.ORBITING=0]="ORBITING",Fo[Fo.EXPLORING=1]="EXPLORING",Fo[Fo.TRACKING=2]="TRACKING",(Vo=Yo=Yo||{})[Vo.DEFAULT=0]="DEFAULT",Vo[Vo.ROTATIONAL=1]="ROTATIONAL",Vo[Vo.TRANSLATIONAL=2]="TRANSLATIONAL",Vo[Vo.CINEMATIC=3]="CINEMATIC",(Fo=$o=$o||{})[Fo.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",Fo[Fo.PERSPECTIVE=1]="PERSPECTIVE";var as="updated",Vo=function(){function t(){this.canvas=void 0,this.eventEmitter=new wr,this.matrix=ft(),this.right=Ft(1,0,0),this.up=Ft(0,1,0),this.forward=Ft(0,0,1),this.position=Ft(0,0,1),this.focalPoint=Ft(0,0,0),this.distanceVector=Ft(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=ft(),this.projectionMatrixInverse=ft(),this.jitteredProjectionMatrix=void 0,this.view=void 0,this.enableUpdate=!0,this.type=qo.EXPLORING,this.trackingMode=Yo.DEFAULT,this.projectionMode=$o.PERSPECTIVE,this.frustum=new Oo,this.orthoMatrix=ft()}var e=t.prototype;return e.isOrtho=function(){return this.projectionMode===$o.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===qo.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===qo.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},e.setProjectionMode=function(t){return this.projectionMode=t,this},e.setTrackingMode=function(t){if(this.type!==qo.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 yt(ft(),this.matrix)},e.getWorldTransform=function(){return this.matrix},e.jitterProjectionMatrix=function(t,e){t=Mt(ft(),[t,e,0]);this.jitteredProjectionMatrix=vt(ft(),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===$o.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===$o.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===$o.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===$o.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===$o.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===$o.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=Ft(t.x-r,t.y-n,0),e=Vt(i,this.right)/It(this.right),r=Vt(i,this.up)/It(this.up);return this.pan(-e,-r),this},e.setPerspective=function(t,e,n,r){this.projectionMode=$o.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,a,o,s,n=this.near*Math.tan(ci(.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,xt(this.projectionMatrix,this.projectionMatrix,Ft(1,-1,1)),yt(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},e.setOrthographic=function(t,e,n,r,i,a){this.projectionMode=$o.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),Nt(this.projectionMatrix,s,n,r,e,i,a),xt(this.projectionMatrix,this.projectionMatrix,Ft(1,-1,1)),yt(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},e.setPosition=function(t,e,n){t=li(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=Ft(0,1,0);return this.focalPoint=li(t,e,n),this.trackingMode===Yo.CINEMATIC&&(t=(r=Gt(Bt(),this.focalPoint,this.position))[0],e=r[1],n=r[2],r=It(r),e=ui(Math.asin(e/r)),r=90+ui(Math.atan2(n,t)),kt(n=ft(),n,ci(r)),wt(n,n,ci(e)),i=Yt(Bt(),[0,1,0],n)),yt(this.matrix,jt(ft(),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=Bt(),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=si(t),this.computeMatrix(),this._getAxes(),this.type===qo.ORBITING||this.type===qo.EXPLORING?this._getPosition():this.type===qo.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getAzimuth=function(){return this.azimuth},e.setElevation=function(t){return this.elevation=si(t),this.computeMatrix(),this._getAxes(),this.type===qo.ORBITING||this.type===qo.EXPLORING?this._getPosition():this.type===qo.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getElevation=function(){return this.elevation},e.setRoll=function(t){return this.roll=si(t),this.computeMatrix(),this._getAxes(),this.type===qo.ORBITING||this.type===qo.EXPLORING?this._getPosition():this.type===qo.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=Jt(Qt(),[0,0,1],ci(this.roll)),e=(pt(this.matrix),Jt(Qt(),[1,0,0],ci((this.rotateWorld&&this.type!==qo.TRACKING||this.type===qo.TRACKING?1:-1)*this.elevation))),n=Jt(Qt(),[0,1,0],ci((this.rotateWorld&&this.type!==qo.TRACKING||this.type===qo.TRACKING?1:-1)*this.azimuth)),n=te(Qt(),n,e),n=te(Qt(),n,t),e=Lt(ft(),n);this.type===qo.ORBITING||this.type===qo.EXPLORING?(bt(this.matrix,this.matrix,this.focalPoint),vt(this.matrix,this.matrix,e),bt(this.matrix,this.matrix,[0,0,this.distance])):this.type===qo.TRACKING&&(bt(this.matrix,this.matrix,this.position),vt(this.matrix,this.matrix,e))},e._setPosition=function(t,e,n){this.position=li(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(){Dt(this.right,li(Zt(Xt(),[1,0,0,0],this.matrix))),Dt(this.up,li(Zt(Xt(),[0,1,0,0],this.matrix))),Dt(this.forward,li(Zt(Xt(),[0,0,1,0],this.matrix))),Ht(this.right,this.right),Ht(this.up,this.up),Ht(this.forward,this.forward)},e._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=It(this.distanceVector);0===r?(this.elevation=0,this.azimuth=0):this.type===qo.TRACKING||this.rotateWorld?(this.elevation=ui(Math.asin(e/r)),this.azimuth=ui(Math.atan2(-t,-n))):(this.elevation=-ui(Math.asin(e/r)),this.azimuth=-ui(Math.atan2(-t,-n)))},e._getPosition=function(){Dt(this.position,li(Zt(Xt(),[0,0,0,1],this.matrix))),this._getDistance()},e._getFocalPoint=function(){var t,e;$t(this.distanceVector,[0,0,-this.distance],(t=J(),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)),Wt(this.focalPoint,this.position,this.distanceVector),this._getDistance()},e._getDistance=function(){this.distanceVector=Gt(Bt(),this.focalPoint,this.position),this.distance=It(this.distanceVector),this.dollyingStep=this.distance/100},e._getOrthoMatrix=function(){var t,e;this.projectionMode===$o.ORTHOGRAPHIC&&(t=this.position,e=Jt(Qt(),[0,0,1],-this.roll*Math.PI/180),At(this.orthoMatrix,e,Ft((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),Ft(this.zoom,this.zoom,1),t))},e.triggerUpdate=function(){var t;this.enableUpdate&&(t=this.getViewTransform(),t=vt(ft(),this.getPerspective(),t),this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(as))},e.rotate=function(t,e,n){throw new Error(ni)},e.pan=function(t,e){throw new Error(ni)},e.dolly=function(t){throw new Error(ni)},e.createLandmark=function(t,e){throw new Error(ni)},e.gotoLandmark=function(t,e){throw new Error(ni)},e.cancelLandmarkAnimation=function(){throw new Error(ni)},t}(),Fo=function(){function t(){}return t.prototype.update=function(t,e){t=t.r;return{width:2*t,height:2*t}},t}(),os=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),ss=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}(),ls=function(){function t(){}return t.prototype.update=function(t){t=t.path.rect;return{width:t.width,height:t.height}},t}(),cs=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}(),us=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&&!qe(n)&&(r||(r=n.width,t.width=r),i||(i=n.height,t.height=i)),{width:r,height:i}},t}(),a=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&&!b(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=k.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}(),fs=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}(),hs=(0,/\[\s*(.*)=(.*)\s*\]/),ds=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(hs),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),!b(t))&&t.toString?t.toString():""},t}();function ps(t){t=t.renderable;t&&(t.renderBoundsDirty=!0,t.boundsDirty=!0)}var gs=new Do(Ro.REPARENT,null,"","","",0,"",""),ys=function(){function t(t){var o,i,a,r,s,l,c,u,f,n,h,d,g=this;this.runtime=void 0,this.pendingEvents=[],this.boundsChangedEvent=new Io(Ro.BOUNDS_CHANGED),this.rotate=(o=Qt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=Ft(e,n,r));var i,a,n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(ne(r=Qt(),e[0],e[1],e[2]),i=g.getRotation(t),a=g.getRotation(t.parentNode),ie(o,a),ee(o,o),te(r,o,r),te(n.localRotation,r,i),oe(n.localRotation,n.localRotation),g.dirtifyLocal(t,n)):g.rotateLocal(t,e)}),this.rotateLocal=(i=Qt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=Ft(e,n,r));n=t.transformable;ne(i,e[0],e[1],e[2]),ae(n.localRotation,n.localRotation,i),g.dirtifyLocal(t,n)}),this.setEulerAngles=(a=Qt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=Ft(e,n,r));n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(ne(n.localRotation,e[0],e[1],e[2]),r=g.getRotation(t.parentNode),ie(a,ee(Qt(),r)),ae(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=Ft(e,n,r));var i,a,o,s,l,c,u,f,h,d,p,n=t.transformable;Ut(e,Bt())||(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*(h=l*c-o*i),l=l*(f=s*i-l*u)-o*d,o=o*h-s*f,h*=s=2*a,d*=s,l*=2,o*=2,r[0]=c+(f*=s)+(p*=2),r[1]=u+h+l,r[2]=i+d+o,Wt(n.localPosition,n.localPosition,e),g.dirtifyLocal(t,n))},this.setPosition=(r=ft(),s=Bt(),function(t,e){var n=t.transformable;s[0]=e[0],s[1]=e[1],s[2]=e[2]||0,Ut(g.getPosition(t),s)||(Dt(n.position,s),null!==t.parentNode&&t.parentNode.transformable?(e=t.parentNode.transformable,ht(r,e.worldTransform),yt(r,r),Yt(n.localPosition,s,r)):Dt(n.localPosition,s),g.dirtifyLocal(t,n))}),this.setLocalPosition=(l=Bt(),function(t,e){var n=t.transformable;l[0]=e[0],l[1]=e[1],l[2]=e[2]||0,Ut(n.localPosition,l)||(Dt(n.localPosition,l),g.dirtifyLocal(t,n))}),this.translate=(c=Bt(),u=Bt(),f=Bt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),Ut(e="number"==typeof e?zt(u,e,n,r):e,c)||(Wt(f,g.getPosition(t),e),g.setPosition(t,f))}),this.setRotation=function(){var o=Qt();return function(t,e,n,r,i){var a=t.transformable;"number"==typeof e&&(e=re(e,n,r,i)),null!==t.parentNode&&t.parentNode.transformable?(n=g.getRotation(t.parentNode),ie(o,n),ee(o,o),te(a.localRotation,o,e),oe(a.localRotation,a.localRotation),g.dirtifyLocal(t,a)):g.setLocalRotation(t,e)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(n=ft(),h=Bt(),d=re(0,0,0,1),function(t){var e;0!==t.localSkew[0]||0!==t.localSkew[1]?(At(t.localTransform,t.localRotation,t.localPosition,Ft(1,1,1),t.origin),0===t.localSkew[0]&&0===t.localSkew[1]||((e=pt(n))[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),vt(t.localTransform,t.localTransform,e)),e=At(n,d,h,t.localScale,t.origin),vt(t.localTransform,t.localTransform,e)):At(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,b(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)&&(n.dirty=!0),t.transformable);e&&this.dirtifyWorld(t,e),e.frozen&&this.unfreezeParentToRoot(t),r&&t.dispatchEvent(gs)},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)&&(n.dirty=!0),-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=Ft(e,n,r));n=t.transformable;ne(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=Ft(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=Ft(e[0],e[1],e[2]||n.localScale[2]);Ut(e,n.localScale)||(Dt(n.localScale,e),this.dirtifyLocal(t,n))},e.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=re(e,n,r,i));n=t.transformable;ie(n.localRotation,e),this.dirtifyLocal(t,n)},e.setLocalSkew=function(t,e,n){"number"==typeof e&&(i=e,n=n,(r=new Q(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;)ps(n),n=n.parentNode;e&&t.forEach(function(t){ps(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 Do(Ro.ATTR_MODIFIED,t,n,n,e,Do.MODIFICATION,n,n)),t.isCustomElement&&t.isConnected&&t.attributeChangedCallback&&t.attributeChangedCallback(e,n,n)})})},e.getPosition=function(t){var e=t.transformable;return _t(e.position,this.getWorldTransform(t,e))},e.getRotation=function(t){var e=t.transformable;return Et(e.rotation,this.getWorldTransform(t,e))},e.getScale=function(t){var e=t.transformable;return St(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=_t(Bt(),e),r=Et(Qt(),e),e=St(Bt(),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 ko.isEmpty(e)?null:((n=n||new ko).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 ko},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 ko).update(t.center,t.halfExtents))}),e&&(t=function(t){var e,n=t;do{if(null==(e=n.parsedStyle)?void 0:e.clipPath)return n}while(null!==(n=n.parentElement));return null}(t))&&(t=t.parsedStyle.clipPath.getBounds(e),r?t&&(r=t.intersection(r)):r=t),(r=r||new ko)&&(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=ft(),r=(t.parentNode.transformable&&(n=yt(ft(),this.getWorldTransform(t.parentNode))),this.getBounds(t));if(!ko.isEmpty(r))return(e=new ko).setFromTransformedAABB(r,n),e}return this.getBounds(t)},e.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t),i=(ko.isEmpty(i)||(r=new ko).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 So(e+((null==i?void 0:i.left)||0),t+((null==i?void 0:i.top)||0),n-e,r-t)):new So((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?vt(e.worldTransform,n.worldTransform,e.localTransform):ht(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}(),ms={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]},vs=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,bs=new RegExp(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source+"|"+/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹓﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source+"|"+/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source+"|"+/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source),xs=new RegExp(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source+"|"+/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source+"|"+/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source+"|"+/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source),ws=function(){function t(t){var n=this;this.runtime=void 0,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,e){return!n.isBreakingSpace(e)&&!(!t||!xs.exec(e)&&!bs.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,ms.MetricsString+ms.BaselineSymbol),a=Math.ceil(e.measureText(i).width),o=Math.ceil(e.measureText(ms.BaselineSymbol).width),s=ms.HeightMultiplier*o,o=o*ms.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,f=0,h=!1,u=0;u<o;++u){for(var d=0;d<c;d+=4)if(255!==l[f+d]){h=!0;break}if(h)break;f+=c}for(n.ascent=o-u,f=r-c,h=!1,u=s;o<u;--u){for(var p=0;p<c;p+=4)if(255!==l[f+p]){h=!0;break}if(h)break;f-=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,f=(e.textPathSide,e.textPathStartOffset,e.leading),f=void 0===f?0:f,h=function(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,t=t.fontWeight,e=$e(e)&&e+"px"||"16px",a=n.split(","),o=a.length-1;0<=o;o--){var s=a[o].trim();!na.test(s)&&ea.indexOf(s)<0&&(s='"'+s+'"'),a[o]=s}return r+" "+i+" "+t+" "+e+" "+a.join(",")}(e),d=this.measureFont(h,n),p=(0===d.fontSize&&(d.fontSize=r,d.ascent=r),this.runtime.offscreenCanvas.getOrCreateContext(n));p.font=h,e.isOverflowing=!1;var g=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),y=new Array(g.length),m=0;if(!u){for(var v=0;v<g.length;v++){var b=p.measureText(g[v]).width+(g[v].length-1)*c;y[v]=b,m=Math.max(m,b)}var r=m+o,x=a||d.fontSize+o,i=Math.max(x,d.fontSize+o)+(g.length-1)*(x+f),w=0;return"middle"===s?w=-i/2:"bottom"===s||"alphabetic"===s||"ideographic"===s?w=-i:"top"!==s&&"hanging"!==s||(w=0),{font:h,width:r,height:i,lines:g,lineWidths:y,lineHeight:x+=f,maxLineWidth:m,fontProperties:d,lineMetrics:y.map(function(t,e){var n=0;return"center"===l||"middle"===l?n-=t/2:"right"!==l&&"end"!==l||(n-=t),new So(n-o/2,w+e*x,t+o,x)})}}u.getTotalLength();for(var k=0;k<g.length;k++)p.measureText(g[k]).width,g[k].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="",f=("ellipsis"===o?u="...":o&&"clip"!==o&&(u=o),[]),h=0,d=0,p={},g=function(t){return r.getFromCache(t,a,p,l)},y=Array.from(u).reduce(function(t,e){return t+g(e)},0),m=Array.from(t),v=0;v<m.length;v++){var b=m[v],x=t[v-1],w=t[v+1],k=g(b);if(this.isNewline(b)){if(s<=++h){e.isOverflowing=!0;break}d=0,f[h]=""}else{if(0<d&&c<d+k){if(s<=h+1){if(e.isOverflowing=!0,0<y&&y<=c){for(var M=f[h].length,O=0,_=M,S=0;S<M;S++){var E=g(f[h][S]);if(c<O+E+y){_=S;break}O+=E}f[h]=(f[h]||"").slice(0,_)+u}break}if(d=0,f[++h]="",this.isBreakingSpace(b))continue;this.canBreakInLastChar(b)||(f=this.trimToBreakable(f),d=this.sumTextWidthByCache(f[h]||"",p)),this.shouldBreakByKinsokuShorui(b,w)&&(f=this.trimByKinsokuShorui(f),d+=g(x||""))}d+=k,f[h]=(f[h]||"")+b}}return f.join("\n")},e.isBreakingSpace=function(t){return"string"==typeof t&&0<=ms.BreakingSpaces.indexOf(t.charCodeAt(0))},e.isNewline=function(t){return"string"==typeof t&&0<=ms.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||!vs.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(!vs.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}(),k={},Fo=(us=new us,cs=new cs,(zl={})[x.CIRCLE]=new Fo,zl[x.ELLIPSE]=new os,zl[x.RECT]=us,zl[x.IMAGE]=us,zl[x.GROUP]=us,zl[x.LINE]=new ss,zl[x.TEXT]=new a(k),zl[x.POLYLINE]=cs,zl[x.POLYGON]=cs,zl[x.PATH]=new ls,zl[x.HTML]=null,zl[x.MESH]=null,zl),a=(os=new r,us=new po,(ss={})[o.PERCENTAGE]=null,ss[o.NUMBER]=new bo,ss[o.ANGLE]=new n,ss[o.DEFINED_PATH]=new i,ss[o.PAINT]=os,ss[o.COLOR]=os,ss[o.FILTER]=new uo,ss[o.LENGTH]=us,ss[o.LENGTH_PERCENTAGE]=us,ss[o.LENGTH_PERCENTAGE_12]=new go,ss[o.LENGTH_PERCENTAGE_14]=new yo,ss[o.COORDINATE]=new mo,ss[o.OFFSET_DISTANCE]=new xo,ss[o.OPACITY_VALUE]=new wo,ss[o.PATH]=new Eo,ss[o.LIST_OF_POINTS]=new Ao,ss[o.SHADOW_BLUR]=new Lo,ss[o.TEXT]=new To,ss[o.TEXT_TRANSFORM]=new Po,ss[o.TRANSFORM]=new No,ss[o.TRANSFORM_ORIGIN]=new ho,ss[o.Z_INDEX]=new jo,ss[o.MARKER]=new vo,ss),cs=(k.CameraContribution=Vo,k.AnimationTimeline=null,k.EasingFunction=null,k.offscreenCanvas=new fs,k.nativeHTMLMap=new WeakMap,k.sceneGraphSelector=new ds,k.sceneGraphService=new ys(k),k.textService=new ws(k),k.geometryUpdaterFactory=Fo,k.CSSPropertySyntaxFactory=a,k.styleValueRegistry=new Bo,k.layoutRegistry=null,k.globalThis=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==j)return j;throw new Error("Unable to locate global `this`")}(),k.enableCSSParsing=!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}());function ks(){ks=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 h?e:h,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 M()}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")),f;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,f;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,f):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}(n,o);if(n){if(n===f)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===f)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 f={};function h(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(k([]))),y=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=h.prototype=Object.create(e));function m(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(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 k(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:M}}function M(){return{value:void 0,done:!0}}return c(y,"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(y),t},o.awrap=function(t){return{__await:t}},m(v.prototype),a(v.prototype,n,function(){return this}),o.AsyncIterator=v,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new v(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},m(y),a(y,i,"Generator"),a(y,r,function(){return this}),a(y,"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=k,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,f):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),f},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),f}},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:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},o}function Ms(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 Os(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Ms(r,e,n,i,a,"next",t)}function a(t){Ms(r,e,n,i,a,"throw",t)}i(void 0)})}}function _s(){return(_s=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 Ss(t,e){return(Ss=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}x.CIRCLE,x.ELLIPSE,x.IMAGE,x.RECT,x.LINE,x.POLYLINE,x.POLYGON,x.TEXT,x.PATH,x.HTML,(ls=l=l||{}).READY="ready",ls.BEFORE_RENDER="beforerender",ls.RERENDER="rerender",ls.AFTER_RENDER="afterrender",ls.BEFORE_DESTROY="beforedestroy",ls.AFTER_DESTROY="afterdestroy",ls.RESIZE="resize",ls.DIRTY_RECTANGLE="dirtyrectangle",new Io(Ro.MOUNTED),new Io(Ro.UNMOUNTED),new Io(l.BEFORE_RENDER),new Io(l.RERENDER),new Io(l.AFTER_RENDER);var Es=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,f=u===p,h=f&&d.dragndropPluginOptions.isDocumentDraggable?p:u.closest&&u.closest("[draggable=true]");h&&(a=!1,o=t.timeStamp,s=[t.clientX,t.clientY],l=null,c=[t.clientX,t.clientY],e=function(){var e=Os(ks().mark(function t(e){var n,r,i;return ks().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",h.dispatchEvent(e),a=!0;case 8:if(e.type="drag",e.dx=e.clientX-c[0],e.dy=e.clientY-c[1],h.dispatchEvent(e),c=[e.clientX,e.clientY],f){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",h.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,Os(ks().mark(function t(){return ks().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}(),As=(Es.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),Ss(r.prototype.constructor=r,t);var r=e.prototype;return r.init=function(){this.addRenderingPlugin(new Es(_s({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}(cs)),Ls=(Ts.prototype.on=function(t,e,n){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!n}),this},Ts.prototype.once=function(t,e){return this.on(t,e,!0)},Ts.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)},Ts.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},Ts.prototype.getEvents=function(){return this._events},Ts);function Ts(){this._events={}}const Ps=()=>[["cartesian"]],Ns=(Ps.props={},(t={})=>{var e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)}),js=t=>{var{startAngle:t,endAngle:e,innerRadius:n,outerRadius:r}=Ns(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",t,e,n,r]]},Cs=(js.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]]),Rs=(Cs.props={},()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),Bs=(Rs.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[...Rs(),...js({startAngle:e,endAngle:t,innerRadius:n,outerRadius:r})]}),Is=(Bs.props={},(t={})=>{var e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)}),Fs=t=>{var{startAngle:t,endAngle:e,innerRadius:n,outerRadius:r}=Is(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...js({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]},Ds=(Fs.props={},()=>[["parallel",0,1,0,1]]),zs=(Ds.props={},({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,visual:i=!1})=>[["fisheye",t,e,n,r,i]]),Ws=(zs.props={transform:!0},t=>{var{startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1}=t;return[...Ds(),...js({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]}),Gs=(Ws.props={},({value:e})=>t=>t.map(()=>e)),Hs=(Gs.props={},({value:e})=>t=>t.map(e)),Vs=(Hs.props={},({value:e})=>t=>t.map(t=>t[e])),qs=(Vs.props={},({value:t})=>()=>t);function Ys(t,e){return t.parent===e.parent?1:2}function $s(t,e){return t+e.x}function Us(t,e){return Math.max(t,e.y)}function Ks(){var s=Ys,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($s,0)/e.length,t.y=1+n.reduce(Us,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 Xs(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 Zs(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=Js)):void 0===e&&(e=Qs);for(var n,r,i,a,o,t=new nl(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 nl(i[a])),r.parent=n,r.depth=n.depth+1;return t.eachBefore(el)}function Qs(t){return t.children}function Js(t){return Array.isArray(t)?t[1]:null}function tl(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function el(t){for(var e=0;t.height=e,(t=t.parent)&&t.height<++e;);}function nl(t){this.data=t,this.depth=this.height=0,this.parent=null}function rl(t){return null==t?null:il(t)}function il(t){if("function"!=typeof t)throw new Error;return t}function al(){return 0}function ol(t){return function(){return t}}qs.props={},nl.prototype=Zs.prototype={constructor:nl,count:function(){return this.eachAfter(Xs)},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 Zs(this).eachBefore(tl)},[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 sl=4294967296;function ll(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&&ul(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 hl(t[0],t[1]);case 3:return dl(t[0],t[1],t[2])}}(o=function(t,e){var n,r;if(fl(e,t))return[e];for(n=0;n<t.length;++n)if(cl(e,t[n])&&fl(hl(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(cl(hl(t[n],t[r]),e)&&cl(hl(t[n],e),t[r])&&cl(hl(t[r],e),t[n])&&fl(dl(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}(o,n)),i=0);return r}function cl(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 ul(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 fl(t,e){for(var n=0;n<e.length;++n)if(!ul(t,e[n]))return;return 1}function hl(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 dl(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,f=i-o,h=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*f-c*h,g=(f*o-h*a)/(2*e)-r,s=(h*d-f*p)/e,l=(u*a-c*o)/(2*e)-i,n=(c*p-u*d)/e,h=s*s+n*n-1,f=2*(t+g*s+l*n),a=g*g+l*l-t*t,o=-(1e-6<Math.abs(h)?(f+Math.sqrt(f*f-4*h*a))/(2*h):a/f);return{x:r+g+s*o,y:i+l+n*o,r:o}}function pl(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 gl(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 yl(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 ml(t){this._=t,this.next=null,this.previous=null}function vl(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,f,h,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;pl(r,d,i=t[2]),d=new ml(d),r=new ml(r),i=new ml(i),((d.next=i.previous=r).next=d.previous=i).next=r.previous=d;t:for(l=3;l<a;++l){pl(d._,r._,i=t[l]),i=new ml(i),c=r.next,u=d.previous,f=r._.r,h=d._.r;do{if(f<=h){if(gl(c._,i._)){r=c,(d.next=r).previous=d,--l;continue t}f+=c._.r,c=c.next}else{if(gl(u._,i._)){((d=u).next=r).previous=d,--l;continue t}h+=u._.r,u=u.previous}}while(c!==u.next);for(i.previous=d,i.next=r,d.next=r.previous=r=i,o=yl(d);(i=i.next)!==r;)(s=yl(i))<o&&(d=i,o=s);r=d.next}for(d=[r._],i=r;(i=i.next)!==r;)d.push(i._);for(i=ll(d,e),l=0;l<a;++l)(d=t[l]).x-=i.x,d.y-=i.y;return i.r}function bl(t){return Math.sqrt(t.value)}function xl(){var n=null,r=1,i=1,a=al;function e(t){var e=function(){let t=1;return()=>(t=(1664525*t+1013904223)%sl)/sl}();return t.x=r/2,t.y=i/2,n?t.eachBefore(wl(n)).eachAfter(kl(a,.5,e)).eachBefore(Ml(1)):t.eachBefore(wl(bl)).eachAfter(kl(al,1,e)).eachAfter(kl(a,t.r/Math.min(r,i),e)).eachBefore(Ml(Math.min(r,i)/(2*t.r))),t}return e.radius=function(t){return arguments.length?(n=rl(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:ol(+t),e):a},e}function wl(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function kl(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=vl(e,l),a)for(n=0;n<i;++n)e[n].r-=a;t.r=r+a}}}function Ml(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 Ol(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 _l(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 Sl={depth:-1},El={},Al={};function Ll(t){return t.id}function Tl(t){return t.parentId}function Pl(){var y,m=Ll,v=Tl;function e(n){var e,t,r,i,a,o,s,l,c=Array.from(n),u=m,f=v,h=new Map;if(null!=y){const p=c.map((t,e)=>{t=y(t,e,n),e=(t=""+t).length;return"/"===(t=jl(t,e-1)&&!jl(t,e-2)?t.slice(0,-1):t)[0]?t:"/"+t}),g=p.map(Nl);var d=new Set(p).add("");for(const r of g)d.has(r)||(d.add(r),p.push(r),g.push(Nl(r)),c.push(Al));u=(t,e)=>p[e],f=(t,e)=>g[e]}for(r=0,e=c.length;r<e;++r)t=c[r],o=c[r]=new nl(t),null!=(s=u(t,r,n))&&(s+="")&&(l=o.id=s,h.set(l,h.has(l)?El:o)),null!=(s=f(t,r,n))&&(s+="")&&(o.parent=s);for(r=0;r<e;++r)if(s=(o=c[r]).parent){if(!(a=h.get(s)))throw new Error("missing: "+s);if(a===El)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!=y){for(;i.data===Al&&1===i.children.length;)i=i.children[0],--e;for(let t=c.length-1;0<=t&&(o=c[t]).data===Al;--t)o.data=null}if(i.parent=Sl,i.eachBefore(function(t){t.depth=t.parent.depth+1,--e}).eachBefore(el),i.parent=null,0<e)throw new Error("cycle");return i}return e.id=function(t){return arguments.length?(m=rl(t),e):m},e.parentId=function(t){return arguments.length?(v=rl(t),e):v},e.path=function(t){return arguments.length?(y=rl(t),e):y},e}function Nl(t){let e=t.length;if(e<2)return"";for(;1<--e&&!jl(t,e););return t.slice(0,e)}function jl(e,n){if("/"===e[n]){let t=0;for(;0<n&&"\\"===e[--n];)++t;if(0==(1&t))return 1}}function Cl(t,e){return t.parent===e.parent?1:2}function Rl(t){var e=t.children;return e?e[0]:t.t}function Bl(t){var e=t.children;return e?e[e.length-1]:t.t}function Il(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 Fl(){var h=Cl,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 Il(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 Il(r[i],i)),n.parent=e;return(t.parent=new Il(null,0)).children=[t],t}(t);return s.eachAfter(f),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:h(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 f(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+h(t._,r._),t.m=t.z-e):t.z=e}else r&&(t.z=r.z+h(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,f=s.m;o=Bl(o),i=Rl(i),o&&i;)s=Rl(s),(a=Bl(a)).a=t,0<(r=o.z+u-i.z-l+h(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,f+=s.m,c+=a.m;o&&!Bl(a)&&(a.t=o,a.m+=u-c),i&&!Rl(s)&&(s.t=i,s.m+=l-f,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?(h=t,e):h},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 Dl(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}Il.prototype=Object.create(nl.prototype);var zl=(1+Math.sqrt(5))/2;function Wl(t,e,n,r,i,a){for(var o,s,l,c,u,f,h,d,p,g,y,m=[],v=e.children,b=0,x=0,w=v.length,k=e.value;b<w;){for(l=i-n,c=a-r;!(u=v[x++].value)&&x<w;);for(y=(f=h=u)*u*(g=Math.max(c/l,l/c)/(k*t)),p=Math.max(h/y,y/f);x<w;++x){if(u+=s=v[x].value,s<f&&(f=s),h<s&&(h=s),y=u*u*g,p<(d=Math.max(h/y,y/f))){u-=s;break}p=d}m.push(o={value:u,dice:l<c,children:v.slice(b,x)}),o.dice?_l(o,n,r,i,k?r+=c*u/k:a):Dl(o,n,r,k?n+=l*u/k:i,a),k-=u,b=x}return m}var Gl=function e(a){function t(t,e,n,r,i){Wl(a,t,e,n,r,i)}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(zl);function Hl(t,e,n,r,i){var a,o,g=t.children,s=g.length,y=new Array(s+1);for(y[0]=o=a=0;a<s;++a)y[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=y[e],c=r/2+l,u=e+1,f=n-1;for(;u<f;){var h=u+f>>>1;y[h]<c?u=1+h:f=h}c-y[u-1]<y[u]-c&&e+1<u&&--u;var l=y[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 Vl(t,e,n,r,i){(1&t.depth?Dl:_l)(t,e,n,r,i)}var ql=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,f=a.length,h=t.value;++u<f;){for(s=(o=a[u]).children,l=o.value=0,c=s.length;l<c;++l)o.value+=s[l].value;o.dice?_l(o,e,n,r,h?n+=(i-n)*o.value/h:i):Dl(o,e,n,h?e+=(r-e)*o.value/h:r,i),h-=o.value}else t._squarify=a=Wl(d,t,e,n,r,i),a.ratio=d}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(zl);function Yl(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 $l(t={}){return[...Yl(t),{name:"title",scale:"identity"}]}function Ul(){return[{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["x","y"]}]}function Kl(){return[{type:"maybeTitle",channel:"x"},{type:"maybeTooltip",channel:["y"]}]}function Xl(t={}){return Yl(t)}function Zl(){return[{type:"maybeKey"}]}function Ql(t,e){return t.getBandWidth(t.invert(e))}function Jl(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:f=r,bandOffsetY:h=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?Ql(l,a[e]):0;var r=p?Ql(c,o[e]):0,e=g&&s?(Ql(u,s[e])/2+ +s[e])*n:0,[t,i]=t;return[t+f*n+e,i+h*r]}:t=>t}function tc(t){return parseFloat(t)/100}function ec(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?tc(e)*o:+e,"string"==typeof t?tc(t)*s:+t]]})]}function nc(e){return"function"==typeof e?e:t=>t[e]}function rc(t,e){return Array.from(t,nc(e))}function ic(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=rc(t,e),o=rc(t,n),s=rc(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 ac(t,e){return t.getBandWidth(t.invert(e))}const oc=()=>(t,e,n,i)=>{const{x:a,y:o,y1:s,series:l,size:r}=n,c=e.x,u=e.series,[f]=i.getSize(),h=r?r.map(t=>+t/f):null,d=r?(t,e,n)=>{t+=e/2,e=h[n];return[t-e/2,t+e/2]}:(t,e,n)=>[t,t+e];return[t,Array.from(t,t=>{var e=ac(c,a[t]),n=e*(u?ac(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))})]};oc.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,channels:[...$l({shapes:["rect","hollow","funnel","pyramid"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[...Zl(),{type:"maybeZeroY1"},{type:"maybeZeroX"}],postInference:[...Kl()],interaction:{shareTooltip:!0}};const sc=()=>(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 lc(t,e){return null==t||null==e?NaN:t<e?-1:e<t?1:e<=t?0:NaN}function cc(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=lc,o=(t,e)=>lc(n(t),e),(t,e)=>n(t)-e):(a=n===lc||n===function(t,e){return null==t||null==e?NaN:e<t?-1:t<e?1:t<=e?0:NaN}?n:uc,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 uc(){return 0}function*fc(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)}}sc.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,channels:[...$l({shapes:["rect","hollow"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Zl(),{type:"maybeZeroY1"}],postInference:[...Kl()],interaction:{shareTooltip:!0}};r=cc(lc);const hc=r.right,dc=r.left,pc=cc(function(t){return null===t?NaN:+t}).center;function gc(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 yc(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 mc(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 vc{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 bc 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(xc(this,t))}has(t){return super.has(xc(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 xc({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):n}function wc(t){return t}function kc(t,...e){return _c(t,wc,wc,e)}function Mc(t,e,...n){return _c(t,wc,e,n)}function Oc(t,e,...n){return _c(t,Array.from,e,n)}function _c(t,u,f,h){return function t(e,n){if(n>=h.length)return f(e);var r=new bc,i=h[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 Sc(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=Ac(r[t],r[e]);if(n)return n}})):(n=e.map(n),t.sort((t,e)=>Ac(n[t],n[e]))),r=e,Array.from(t,t=>r[t])):e.sort(Ec(n))}function Ec(r=lc){if(r===lc)return Ac;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 Ac(t,e){return(null==t||!(t<=t))-(null==e||!(e<=e))||(t<e?-1:e<t?1:0)}var Lc=Array.prototype.slice;function Tc(t){return()=>t}const Pc=Math.sqrt(50),Nc=Math.sqrt(10),jc=Math.sqrt(2);function Cc(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>=Pc?10:r>=Nc?5:r>=jc?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?Cc(t,e,2*n):[a,o,s]}function Rc(t,e,n){return Cc(t=+t,e=+e,n=+n)[2]}function Bc(t){return Math.max(1,Math.ceil(Math.log(gc(t))/Math.LN2)+1)}function Ic(){var m=wc,v=mc,b=Bc;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]=m(t[a],a,t);var o=v(i),s=o[0],l=o[1],c=b(i,s,l);if(!Array.isArray(c)){var o=l,u=+c;if(v===mc&&([s,l]=function(t,e,n){let r;for(;;){var i=Rc(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?Cc(e,t,n):Cc(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=Rc(s,l,u)),c[c.length-1]>=l)if(l<=o&&v===mc){const n=Rc(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 f=c.length,h=0,d=f;c[h]<=s;)++h;for(;c[d-1]>l;)--d;(h||d<f)&&(c=c.slice(h,d),f=d-h);var p,g,y=new Array(f+1);for(a=0;a<=f;++a)(p=y[a]=[]).x0=0<a?c[a-1]:s,p.x1=a<f?c[a]:l;if(isFinite(n)){if(0<n)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&y[Math.min(f,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),y[Math.min(f,g+(c[g]<=e))].push(t[a]))}else for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&y[hc(c,e,0,f)].push(t[a]);return y}return e.value=function(t){return arguments.length?(m="function"==typeof t?t:Tc(t),e):m},e.domain=function(t){return arguments.length?(v="function"==typeof t?t:Tc([t[0],t[1]]),e):v},e.thresholds=function(t){return arguments.length?(b="function"==typeof t?t:Tc(Array.isArray(t)?Lc.call(t):t),e):b},e}function Fc(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 Dc(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 zc(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 Wc(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 Gc(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?Ac:Ec(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),Gc(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,f=n[r];let t=i,e=a;for(Hc(n,i,r),0<o(n[a],f)&&Hc(n,i,a);t<e;){for(Hc(n,t,e),++t,--e;o(n[t],f)<0;)++t;for(;0<o(n[e],f);)--e}0===o(n[i],f)?Hc(n,i,e):Hc(n,++e,a),e<=r&&(i=e+1),r<=e&&(a=e-1)}return n}function Hc(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function Vc(t,e,n){var r;if((n=(t=Float64Array.from(fc(t,n))).length)&&!isNaN(e=+e))return e<=0||n<2?zc(t):1<=e?Fc(t):(n=(n-1)*e,(r=Fc(Gc(t,e=Math.floor(n)).subarray(0,e+1)))+(zc(t.subarray(e+1))-r)*(n-e))}function qc(r,t,i){if((i=(r=Float64Array.from(fc(r,i))).length)&&!isNaN(t=+t)){if(t<=0||i<2)return Wc(r);if(1<=t)return Dc(r);t=Math.floor((i-1)*t),i=Gc(Uint32Array.from(r,(t,e)=>e),t,0,i-1,(t,e)=>Ac(r[t],r[e]));{var i=i.subarray(0,t+1),a=t=>r[t];let e,n=!1;if(1===a.length){let t;for(const s of i){var o=a(s);(n?0<lc(o,t):0===lc(o,o))&&(e=s,t=o,n=!0)}}else for(const l of i)(n?0<a(l,e):0===a(l,l))&&(e=l,n=!0);return e}}}function Yc(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 $c(t,e){return Vc(t,.5,e)}function Uc(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function Kc(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 Xc(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 Zc(t){t=t.getOptions().transformations;return t.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function Qc(t){t=t.getOptions().transformations;return t.some(([t])=>"polar"===t)}function Jc(t){t=t.getOptions().transformations;return t.some(([t])=>"reflect"===t)&&t.some(([t])=>t.startsWith("transpose"))}function tu(t){t=t.getOptions().transformations;return t.some(([t])=>"helix"===t)}function eu(t){t=t.getOptions().transformations;return t.some(([t])=>"parallel"===t)}function nu(t){t=t.getOptions().transformations;return t.some(([t])=>"fisheye"===t)}function ru(t){return tu(t)||Qc(t)}function iu(t){var t=t.getOptions()["transformations"],[,,,t,e]=t.find(t=>"polar"===t[0]);return[+t,+e]}function au(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 ou=(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(kc(t,t=>a[t]).values()):[t],l=t.map(t=>t[0]);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]},su=(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})]},lu=()=>(t,e,n,r)=>{return(eu(r)?su:ou)(t,e,n,r)};lu.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,channels:[...$l({shapes:["line","smooth"]}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[...Zl(),{type:"maybeSeries"},{type:"maybeGradient"}],postInference:[...Kl(),{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const cu=g=>(t,e,n,o)=>{const{x:r,y:i,x1:a,y1:s,size:l,dx:c,dy:u}=n,[f,h]=o.getSize(),d=Jl(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/f,r=r/h,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))])]};cu.props={defaultShape:"hollow",defaultLabelShape:"label",composite:!1,channels:[...$l({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:[...Zl(),{type:"maybeZeroY"},{type:"maybeZeroX"}],postInference:[{type:"maybeSize"},...Ul()]};const uu=s=>{const{cartesian:l=!1}=s;return l?ec:(t,e,n,r)=>{if(l)return ec(t,0,n,r);const{x:i,y:a}=n,o=Jl(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};uu.props={defaultShape:"text",defaultLabelShape:"label",composite:!1,channels:[...$l({shapes:["text","badge"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[...Zl(),{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...Ul()]};const fu=()=>(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))})]};fu.props={defaultShape:"cell",defaultLabelShape:"label",composite:!1,channels:[...$l({shapes:["cell","hollow"]}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[...Zl(),{type:"maybeZeroX"},{type:"maybeZeroY"},{type:"maybeZeroPadding"}],postInference:[...Ul()]};const hu=()=>(t,e,n,a)=>{const{x:o,y:s,y1:l,series:r}=n;n=r?Array.from(kc(t,t=>r[t]).values()):[t];return[n.map(t=>t[0]),Array.from(n,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],+s[i]]),r[n+t]=a.map([+o[i],+l[i]])}return r}),n]};hu.props={defaultShape:"area",defaultLabelShape:"label",composite:!1,channels:[...$l({shapes:["area","smooth","hvh","hv","vh"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[...Zl(),{type:"maybeSeries"},{type:"maybeZeroY1"},{type:"maybeZeroPadding"}],postInference:[...Kl()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const du=c=>(t,e,n,r)=>{const{x:i,y:a,x1:o=i,y1:s=a}=n,l=Jl(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]};du.props={defaultShape:"link",defaultLabelShape:"label",composite:!1,channels:[...$l({shapes:["link","arc","vhv","smooth"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Zl(),{type:"maybeIdentityY"},{type:"maybeIdentityX"}],postInference:[...Ul()]};const pu=s=>{var t=s["cartesian"];return t?ec:(t,e,n,r)=>{const{x:i,y:a}=n,o=Jl(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};pu.props={defaultShape:"image",defaultLabelShape:"label",composite:!1,channels:[...$l({shapes:["image"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[...Zl(),{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...Ul()]};const gu=()=>(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]};gu.props={defaultShape:"polygon",defaultLabelShape:"label",composite:!1,channels:[...$l({shapes:["polygon","ribbon"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Zl()],postInference:[...Ul()]};const yu=()=>(t,e,n,s)=>{const{x:l,y:c,y1:u,y2:f,y3:h,y4:d,series:p}=n,g=e.x,y=e.series;return[t,Array.from(t,t=>{var e=g.getBandWidth(g.invert(+l[t])),n=e*(y?y.getBandWidth(y.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],+f[t],+h[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))})]},mu=(yu.props={defaultShape:"box",defaultLabelShape:"label",composite:!1,channels:[...$l({shapes:["box"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[...Zl(),{type:"maybeZeroX"}],postInference:[...Kl()],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]});mu.props={defaultShape:"vector",defaultLabelShape:"label",composite:!1,channels:[...$l({shapes:["vector"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[...Zl()],postInference:[...Ul()]};const vu=()=>(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))})]};vu.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,channels:[...Xl({shapes:["line"]}),{name:"y",required:!0}],preInference:[...Zl(),{type:"maybeTupleY"}],postInference:[]};const bu=()=>(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))})]};bu.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,channels:[...Xl({shapes:["line"]}),{name:"x",required:!0}],preInference:[...Zl(),{type:"maybeTupleX"}],postInference:[]};const xu=(...t)=>du(...t);function wu(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 ku(t={}){const{extendX:r=!1,extendY:s=!1}=t;return(t,e,n,i)=>{const a=wu("x",r,n,e.x),o=wu("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))})]}}xu.props={defaultShape:"connector",defaultLabelShape:"label",composite:!1,channels:[...Xl({shapes:["connector"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Zl()],postInference:[]};const Mu=()=>ku();Mu.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,channels:[...Xl({shapes:["range"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Zl()],postInference:[]};const Ou=()=>ku({extendY:!0});Ou.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,channels:[...Xl({shapes:["range"]}),{name:"x",required:!0}],preInference:[...Zl()],postInference:[]};const _u=()=>ku({extendX:!0});function Su(t){return t.target.depth}function Eu(t,e){return t.sourceLinks.length?t.depth:e-1}function Au(t){return function(){return t}}function Lu(t,e){return Pu(t.source,e.source)||t.index-e.index}function Tu(t,e){return Pu(t.target,e.target)||t.index-e.index}function Pu(t,e){return t.y0-e.y0}function Nu(t){return t.value}function ju(t){return t.index}function Cu(t){return t.nodes}function Ru(t){return t.links}function Bu(t,e){t=t.get(e);if(t)return t;throw new Error("missing: "+e)}function Iu({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 Fu(){let x=0,w=0,k=1,M=1,O=24,_=8,S,E=ju,A=Eu,L,T,P,N=Cu,j=Ru,C=6;function e(e){e={nodes:N(e),links:j(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=>[E(t),t]));if(t.forEach((t,e)=>{t.index=e;let{source:n,target:r}=t;"object"!=typeof n&&(n=t.source=Bu(g,n)),"object"!=typeof r&&(r=t.target=Bu(g,r)),n.sourceLinks.push(t),r.targetLinks.push(t)}),null!=P)for(var{sourceLinks:n,targetLinks:r}of i)n.sort(P),r.sort(P)}t=e.nodes;for(const y of t)y.value=void 0===y.fixedValue?Math.max(Xc(y.sourceLinks,Nu),Xc(y.targetLinks,Nu)):y.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(L){var s,l=Math.max(Fc(a,t=>t.depth)+1,0);for(let t=0;t<a.length;t++)(s=a[t]).depth=L.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(Fc(t,t=>t.depth)+1,0),n=(k-x-O)/(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+O,r[i]?r[i].push(a):r[i]=[a]}if(T)for(const o of r)o.sort(T);return r}(e),t=(S=Math.min(_,(M-w)/(Fc(u,t=>t.length)-1)),u),f=zc(t,t=>(M-w-(t.length-1)*S)/Xc(t,Nu));for(const m of t){let e=w;for(const v of m){v.y0=e,v.y1=e+v.value*f,e=v.y1+S;for(const b of v.sourceLinks)b.width=b.value*f}e=(M-e+S)/(m.length+1);for(let t=0;t<m.length;++t){var h=m[t];h.y0+=e*(t+1),h.y1+=e*(t+1)}!function(t){if(void 0===P)for(var{sourceLinks:e,targetLinks:n}of t)e.sort(Tu),n.sort(Lu)}(m)}for(let t=0;t<C;++t){var d=Math.pow(.99,t),p=Math.max(1-d,(t+1)/C);!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,B(c))}void 0===T&&o.sort(Pu),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,B(c))}void 0===T&&o.sort(Pu),o.length&&R(o,i)}}(u,d,p)}return Iu(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,M,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 B({sourceLinks:t,targetLinks:e}){if(void 0===P){for(const{source:{sourceLinks:t}}of e)t.sort(Tu);for(const{target:{targetLinks:e}}of t)e.sort(Lu)}}return e.update=function(t){return Iu(t),t},e.nodeId=function(t){return arguments.length?(E="function"==typeof t?t:Au(t),e):E},e.nodeAlign=function(t){return arguments.length?(A="function"==typeof t?t:Au(t),e):A},e.nodeDepth=function(t){return arguments.length?(L=t,e):L},e.nodeSort=function(t){return arguments.length?(T=t,e):T},e.nodeWidth=function(t){return arguments.length?(O=+t,e):O},e.nodePadding=function(t){return arguments.length?(_=S=+t,e):_},e.nodes=function(t){return arguments.length?(N="function"==typeof t?t:Au(t),e):N},e.links=function(t){return arguments.length?(j="function"==typeof t?t:Au(t),e):j},e.linkSort=function(t){return arguments.length?(P=t,e):P},e.size=function(t){return arguments.length?(x=w=0,k=+t[0],M=+t[1],e):[k-x,M-w]},e.extent=function(t){return arguments.length?(x=+t[0][0],k=+t[1][0],w=+t[0][1],M=+t[1][1],e):[[x,w],[k,M]]},e.iterations=function(t){return arguments.length?(C=+t,e):C},e}_u.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,channels:[...Xl({shapes:["range"]}),{name:"y",required:!0}],preInference:[...Zl()],postInference:[]};const Du={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},zu={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?zc(t.sourceLinks,Su)-1:0},justify:Eu};const Wu=f=>t=>{var{nodeId:e,nodeSort:n,nodeAlign:r,nodeWidth:i,nodePadding:a,nodeDepth:o,nodes:s,links:l,linkSort:c,iterations:u}=Object.assign({},Du,f),l=Fu().nodeSort(n).linkSort(c).links(l).nodes(s).nodeWidth(i).nodePadding(a).nodeDepth(o).nodeAlign("string"==(c=typeof(n=r))?zu[n]||Eu:"function"==c?n:Eu).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 Gu(t){return t}function Hu(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function Vu(t=""){throw new Error(t)}function qu(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 Yu(t){return null!=t&&!Number.isNaN(t)}function rt(t,e){return $u(t,e)||{}}function $u(t,n){t=Object.entries(t||{}).filter(([t])=>t.startsWith(n)).map(([t,e])=>[Xe(t.replace(n,"").trim()),e]).filter(([t])=>!!t);return 0===t.length?null:Object.fromEntries(t)}function Uu(t,e){return void 0===t?null:"number"==typeof t?t:(t=+t.replace("%",""),Number.isNaN(t)?null:t/100*e)}function Ku(t){return!("object"!=typeof t||t instanceof Date||null===t||Array.isArray(t))}function Xu(t){return null===t||!1===t}function Zu(t,e,n={},r=!1){return Xu(t)||Array.isArray(t)&&r?t:(r=rt(t,e),nt(n,r))}function Qu(t,e={}){return!Xu(t)&&!Array.isArray(t)&&Ju(t)?nt(e,t):t}function Ju(t){var e;return 0===Object.keys(t).length||({title:t,items:e}=t,void 0!==t)||void 0!==e}function tf(t,e){return"object"==typeof t?rt(t,e):t}Wu.props={};const ef=v=>{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}},k={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={}}=v,{links:t,nodes:c}=ic(t,e),u=rt(e,"node"),e=rt(e,"link"),{key:f=t=>t.key,color:h=f}=u,{links:i,nodes:t}=Wu(Object.assign(Object.assign(Object.assign({},b),{nodeId:nc(f)}),i))({links:t,nodes:c});const d=rt(r,"label"),{text:p=f,spacing:g=5}=d,y=et(d,["text","spacing"]),m=nc(f);c=Zu(l,"node",{title:m,items:[{field:"value"}]},!0),f=Zu(l,"link",{title:"",items:[t=>({name:"source",value:m(t.source)}),t=>({name:"target",value:m(t.target)})]});return[nt({},x,{data:t,encode:Object.assign(Object.assign({},u),{color:h}),scale:n,style:rt(r,"node"),labels:[Object.assign(Object.assign(Object.assign({},k),{text:p,dx:t=>t.x[0]<.5?g:-g}),y),...a],tooltip:c,animate:tf(s,"node"),axis:!1}),nt({},w,{data:i,encode:e,labels:o,style:Object.assign({fill:e.color?void 0:"#aaa",strokeWidth:0},rt(r,"link")),tooltip:f,animate:tf(s,"link")})]}},nf=(ef.props={},t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])]);nf.props={defaultShape:"path",defaultLabelShape:"label",composite:!1,channels:[...$l({shapes:["path","hollow"]}),{name:"d",scale:"identity"}],preInference:[...Zl()],postInference:[]};const rf=t=>t?parseInt(t):0;function af(t,e,n,r){var i;return e?(e=t,t=getComputedStyle(e),i=e.clientWidth||rf(t.width),e=e.clientHeight||rf(t.height),{width:(i={width:i-(rf(t.paddingLeft)+rf(t.paddingRight)),height:e-(rf(t.paddingTop)+rf(t.paddingBottom))}).width,height:i.height}):{width:n,height:r}}function of(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:f=u,insetRight:h=u,insetTop:d=u,insetBottom:u=u}=t;return{width:e-r-i-s-l-f-h,height:t-a-n-c-o-d-u}}function sf(t,e,n){const r=n["value"];var o,i,a,s,l,c,u,f,h,d,n=function(t,e){var n={treemapBinary:Hl,treemapDice:_l,treemapSlice:Dl,treemapSliceDice:Vl,treemapSquarify:Gl,treemapResquarify:ql};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?Pl().path(p):Pl():Zs)(t));function g(t){return t.x0=t.y0=0,t.x1=a,t.y1=s,t.eachBefore(y),l=[0],i&&t.eachBefore(Ol),t}function y(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-=f(t)-e)<n&&(n=i=(n+i)/2),(a-=h(t)-e)<r&&(r=a=(r+a)/2),o(t,n,r,i,a))}return r?p.sum(t=>e.ignoreParentValue&&t.children?0:nc(r)(t)).sort(e.sort):p.count(),o=Gl,i=!1,s=a=1,l=[0],d=h=f=u=c=al,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=il(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:ol(+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:ol(+t),g):u},g.paddingRight=function(t){return arguments.length?(f="function"==typeof t?t:ol(+t),g):f},g.paddingBottom=function(t){return arguments.length?(h="function"==typeof t?t:ol(+t),g):h},g.paddingLeft=function(t){return arguments.length?(d="function"==typeof t?t:ol(+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 lf=f=>t=>{var{width:t,height:e}=of(t),{data:n,encode:r={},scale:i,style:a={},layout:o={},labels:s=[],tooltip:l={}}=f,c=et(f,["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=sf(n,nt({},u,o),r),n=rt(a,"label");return[nt({},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:Qu(l,{title:t=>t.data.name,items:[{field:"value"}]}),axis:!1}))]},cf=(lf.props={},f=>t=>{var{width:t,height:e}=of(t),{data:n,encode:r={},scale:i={},style:a={},layout:o={},labels:s=[],tooltip:l={}}=f,c=et(f,["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=(Ie(t)?Pl().path(e.path):Zs)(t);return r?n.sum(t=>nc(r)(t)).sort(e.sort):n.count(),xl().size(e.size).padding(e.padding)(n),n.descendants()})(n,nt({},{size:[t,e],padding:0,sort:(t,e)=>e.value-t.value},o),nt({},u.encode,r)),t=rt(a,"label");return[nt({},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:Qu(l,{title:t=>t.data.name,items:[{field:"value"}]}),axis:!1}))]});function uf(t,e){return zc(t,t=>e[t])}function ff(t,e){return Fc(t,t=>e[t])}function hf(t,e){const n=2.5*df(t,e)-1.5*gf(t,e);return zc(t,t=>e[t]>=n?e[t]:NaN)}function df(t,e){return Vc(t,.25,t=>e[t])}function pf(t,e){return Vc(t,.5,t=>e[t])}function gf(t,e){return Vc(t,.75,t=>e[t])}function yf(t,e){const n=2.5*gf(t,e)-1.5*df(t,e);return Fc(t,t=>e[t]<=n?e[t]:NaN)}function mf(){return(t,e)=>{var n=e["encode"],{y:n,x:r}=n;const i=n["value"],a=r["value"];return[Array.from(kc(t,t=>a[+t]).values()).flatMap(t=>{const e=hf(t,i),n=yf(t,i);return t.filter(t=>i[t]<e||i[t]>n)}),e]}}cf.props={};const vf=f=>()=>{var t,{data:e,encode:n,style:r={},tooltip:i={},animate:a}=f,o=et(f,["data","encode","style","tooltip","transform","animate"]),{point:s=!0}=r,r=et(r,["point"]),l=n["y"],l={y:l,y1:l,y2:l,y3:l,y4:l},c={y1:df,y2:pf,y3:gf},u=Zu(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=Zu(i,"point",{title:{channel:"x"},items:[{name:"outlier",channel:"y"}]});return s?(s=rt(r,"box"),t=rt(r,"point"),[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:hf},c),{y4:yf})],encode:Object.assign(Object.assign({},n),l),style:s,tooltip:u,animate:tf(a,"box")},o),{type:"point",data:e,transform:[{type:mf}],encode:n,style:Object.assign({},t),tooltip:i,animate:tf(a,"point")}]):[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:uf},c),{y4:ff})],encode:Object.assign(Object.assign({},n),l),style:r,tooltip:u},o)]},bf=(vf.props={},s=>{var t=s["cartesian"];return t?ec:(t,e,n,r)=>{const{x:i,y:a}=n,o=Jl(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}});function xf(t,e,n,r){if(!isNaN(e)&&!isNaN(n)){var i,a,o,s,l,c,u,f,h,d=t._root,p={data:r},g=t._x0,y=t._y0,m=t._x1,v=t._y1;if(d){for(;d.length;)if((c=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+v)/2))?y=o:v=o,!(d=(i=d)[f=u<<1|c]))return i[f]=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[f]=p:t._root=p;else{for(;i=i?i[f]=new Array(4):t._root=new Array(4),(c=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+v)/2))?y=o:v=o,(f=u<<1|c)==(h=(o<=l)<<1|a<=s););i[h]=d,i[f]=p}}else t._root=p}return t}function wf(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function kf(t){return t[0]}function Mf(t){return t[1]}function Of(t,e,n){e=new _f(null==e?kf:e,null==n?Mf:n,NaN,NaN,NaN,NaN);return null==t?e:e.addAll(t)}function _f(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 Sf(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}bf.props={defaultShape:"shape",defaultLabelShape:"label",composite:!1,channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Zl(),{type:"maybeTuple"},{type:"maybeVisualPosition"},{type:"maybeFunctionAttribute"}]};po=Of.prototype=_f.prototype;function Ef(t){return function(){return t}}function Af(t){return 1e-6*(t()-.5)}function Lf(t){return t.index}function Tf(t,e){t=t.get(e);if(t)return t;throw new Error("node not found: "+e)}function Pf(c){var u,f,a,o,h,d,s=Lf,n=function(t){return 1/Math.min(o[t.source.index],o[t.target.index])},r=Ef(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||Af(d),o=i.y+i.vy-r.y-r.vy||Af(d),a*=s=((s=Math.sqrt(a*a+o*o))-f[l])/s*t*u[l],o*=s,i.vx-=a*(s=h[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=Tf(r,t.source)),"object"!=typeof t.target&&(t.target=Tf(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,h=new Array(n);i<n;++i)t=c[i],h[i]=o[t.source.index]/(o[t.source.index]+o[t.target.index]);u=new Array(n),l(),f=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)f[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:Ef(+t),l(),e):n},e.distance=function(t){return arguments.length?(r="function"==typeof t?t:Ef(+t),g(),e):r},e}po.copy=function(){var t,e,n=new _f(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]=Sf(e));else n._root=Sf(r);return n},po.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return xf(this.cover(e,n),e,n,t)},po.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)xf(this,i[u],a[u],t[u]);return this},po.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},po.data=function(){var e=[];return this.visit(function(t){if(!t.length)for(;e.push(t.data),t=t.next;);}),e},po.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]]},po.find=function(t,e,n){var r,i,a,o,s,l,c,u,f=this._x0,h=this._y0,d=this._x1,p=this._y1,g=[],y=this._root;for(y&&g.push(new wf(y,f,h,d,p)),null==n?n=1/0:(f=t-n,h=e-n,d=t+n,p=e+n,n*=n);r=g.pop();)!(y=r.node)||(s=r.x0)>d||(l=r.y0)>p||(o=r.x1)<f||(i=r.y1)<h||(y.length?(g.push(new wf(y[3],a=(s+o)/2,c=(l+i)/2,o,i),new wf(y[2],s,c,a,i),new wf(y[1],a,l,o,c),new wf(y[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,y.data))*o+(s=e-+this._y.call(null,y.data))*s)<n&&(f=t-(c=Math.sqrt(n=l)),h=e-c,d=t+c,p=e+c,u=y.data));return u},po.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,f,h=this._root,d=this._x0,p=this._y0,g=this._x1,y=this._y1;if(h){if(h.length)for(;;){if((l=a>=(s=(d+g)/2))?d=s:g=s,(c=o>=(s=(p+y)/2))?p=s:y=s,!(h=(e=h)[u=c<<1|l]))return this;if(!h.length)break;(e[u+1&3]||e[u+2&3]||e[u+3&3])&&(n=e,f=u)}for(;h.data!==t;)if(!(h=(r=h).next))return this;(i=h.next)&&delete h.next,r?i?r.next=i:delete r.next:e?(i?e[u]=i:delete e[u],(h=e[0]||e[1]||e[2]||e[3])&&h===(e[3]||e[2]||e[1]||e[0])&&!h.length&&(n?n[f]=h:this._root=h)):this._root=i}}return this},po.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},po.root=function(){return this._root},po.size=function(){var e=0;return this.visit(function(t){if(!t.length)for(;++e,t=t.next;);}),e},po.visit=function(t){var e,n,r,i,a,o,s,l=[],c=this._root;for(c&&l.push(new wf(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 wf(e,o,s,i,a)),(e=c[2])&&l.push(new wf(e,n,s,o,a)),(e=c[1])&&l.push(new wf(e,o,r,i,s)),e=c[0])&&l.push(new wf(e,n,r,o,s));return this},po.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new wf(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i,a,o,s,l,c,u,f=e.node;f.length&&(a=e.x0,o=e.y0,c=(a+(s=e.x1))/2,u=(o+(l=e.y1))/2,(i=f[0])&&n.push(new wf(i,a,o,c,u)),(i=f[1])&&n.push(new wf(i,c,o,s,u)),(i=f[2])&&n.push(new wf(i,a,u,c,l)),i=f[3])&&n.push(new wf(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},po.x=function(t){return arguments.length?(this._x=t,this):this._x},po.y=function(t){return arguments.length?(this._y=t,this):this._y};var Nf={value:()=>{}};function jf(){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 Cf(r)}function Cf(t){this._=t}function Rf(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Nf,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Cf.prototype=jf.prototype={constructor:Cf,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]=Rf(i[n],t.name,e);else if(null==e)for(n in i)i[n]=Rf(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 Cf(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 Bf,If,Ff=0,Df=0,zf=0,Wf=1e3,Gf=0,Hf=0,Vf=0,qf="object"==typeof performance&&performance.now?performance:Date,Yf="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function $f(){return Hf||(Yf(Uf),Hf=qf.now()+Vf)}function Uf(){Hf=0}function Kf(){this._call=this._time=this._next=null}function Xf(t,e,n){var r=new Kf;return r.restart(t,e,n),r}function Zf(){Hf=(Gf=qf.now())+Vf,Ff=Df=0;try{$f(),++Ff;for(var t,e=Bf;e;)0<=(t=Hf-e._time)&&e._call.call(void 0,t),e=e._next;--Ff}finally{for(var n,r,i=Bf,a=1/(Ff=0);i;)i=i._call?(a>i._time&&(a=i._time),(n=i)._next):(r=i._next,i._next=null,n?n._next=r:Bf=r);If=n,Jf(a),Hf=0}}function Qf(){var t=qf.now(),e=t-Gf;Wf<e&&(Vf-=e,Gf=t)}function Jf(t){Ff||(Df=Df&&clearTimeout(Df),24<t-Hf?(t<1/0&&(Df=setTimeout(Zf,t-qf.now()-Vf)),zf=zf&&clearInterval(zf)):(zf||(Gf=qf.now(),zf=setInterval(Qf,Wf)),Ff=1,Yf(Zf)))}Kf.prototype=Xf.prototype={constructor:Kf,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?$f():+n)+(null==e?0:+e),this._next||If===this||(If?If._next=this:Bf=this,If=this),this._call=t,this._time=n,Jf()},stop:function(){this._call&&(this._call=null,this._time=1/0,Jf())}};const th=4294967296;function eh(t){return t.x}function nh(t){return t.y}var rh=10,ih=Math.PI*(3-Math.sqrt(5));function ah(l){var a,o=1,e=.001,s=1-Math.pow(e,1/300),c=0,u=.6,f=new Map,t=Xf(i),n=jf("tick","end"),r=function(){let t=1;return()=>(t=(1664525*t+1013904223)%th)/th}();function i(){h(),n.call("tick",a),o<e&&(t.stop(),n.call("end",a))}function h(t){var e,n,r=l.length;void 0===t&&(t=1);for(var i=0;i<t;++i)for(o+=(c-o)*s,f.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=rh*Math.sqrt(.5+r),e=r*ih,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:h,restart:function(){return t.restart(i),a},stop:function(){return t.stop(),a},nodes:function(t){return arguments.length?(l=t,d(),f.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,f.forEach(p),a):r},force:function(t,e){return 1<arguments.length?(null==e?f.delete(t):f.set(t,p(e)),a):f.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 oh(t,e,n){var i,l,c,u,f,r,h,d,p,{nodes:t,links:a}=t,{joint:e,nodeStrength:o,linkStrength:s}=e,{linkKey:n=t=>t.id}=n,B=(r=Ef(-30),d=(h=1)/0,p=.81,g.initialize=function(t,e){i=t,c=e,I()},g.strength=function(t){return arguments.length?(r="function"==typeof t?t:Ef(+t),I(),g):r},g.distanceMin=function(t){return arguments.length?(h=t*t,g):Math.sqrt(h)},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=Of(i,eh,nh).visitAfter(F);for(u=t,e=0;e<n;++e)l=i[e],r.visit(D)}function I(){if(i){var t,e,n=i.length;for(f=new Array(n),t=0;t<n;++t)e=i[t],f[e.index]=+r(e,t,i)}}function F(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+=f[e.data.index],e=e.next;);t.value=o}function D(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=Af(c))*i),0===a&&(s+=(a=Af(c))*a),s<h&&(s=Math.sqrt(h*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=Af(c))*i),0===a&&(s+=(a=Af(c))*a),s<h)&&(s=Math.sqrt(h*s));t.data!==l&&(o=f[t.data.index]*u/s,l.vx+=i*o,l.vy+=a*o),t=t.next;);}var y,m,v,b,x,w,k,M,O,_,S,E,A,L,n=Pf(a).id(nc(n)),T=("function"==typeof o&&B.strength(o),"function"==typeof s&&n.strength(s),ah(t).force("link",n).force("charge",B));function P(t){for(var e,n=0,r=m.length;n<r;++n)(e=m[n]).vy+=(b[n]-e.y)*v[n]*t}function N(){if(m){var t,e=m.length;for(v=new Array(e),b=new Array(e),t=0;t<e;++t)v[t]=isNaN(b[t]=+y(m[t],t,m))?0:+x(m[t],t,m)}}function j(t){for(var e,n=0,r=k.length;n<r;++n)(e=k[n]).vx+=(O[n]-e.x)*M[n]*t}function C(){if(k){var t,e=k.length;for(M=new Array(e),O=new Array(e),t=0;t<e;++t)M[t]=isNaN(O[t]=+w(k[t],t,k))?0:+_(k[t],t,k)}}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)*L,r=(r/e-E)*L,i=0;i<e;++i)(t=A[i]).x-=n,t.y-=r}e?T.force("center",(L=1,null==S&&(S=0),null==E&&(E=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?(E=+t,R):E},R.strength=function(t){return arguments.length?(L=+t,R):L},R)):T.force("x",(_=Ef(.1),"function"!=typeof w&&(w=Ef(null==w?0:+w)),j.initialize=function(t){k=t,C()},j.strength=function(t){return arguments.length?(_="function"==typeof t?t:Ef(+t),C(),j):_},j.x=function(t){return arguments.length?(w="function"==typeof t?t:Ef(+t),C(),j):w},j)).force("y",(x=Ef(.1),"function"!=typeof y&&(y=Ef(null==y?0:+y)),P.initialize=function(t){m=t,N()},P.strength=function(t){return arguments.length?(x="function"==typeof t?t:Ef(+t),N(),P):x},P.y=function(t){return arguments.length?(y="function"==typeof t?t:Ef(+t),N(),P):y},P)),T.stop();var z=Math.ceil(Math.log(T.alphaMin())/Math.log(1-T.alphaDecay()));for(let t=0;t<z;t++)T.tick();return{nodesData:t,linksData:a}}const sh=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,f=et(e,["nodeKey","linkKey"]);var e=Object.assign({nodeKey:c,linkKey:u},f),h=rt(e,"node"),d=rt(e,"link"),{links:t,nodes:p}=ic(t,e),{nodesData:t,linksData:p}=oh({links:t,nodes:p},nt({},{joint:!0},i),e),i=Zu(l,"link",{items:[t=>({name:"source",value:nc(u)(t.source)}),t=>({name:"target",value:nc(u)(t.target)})]}),e=Zu(l,"node",{items:[t=>({name:"key",value:nc(c)(t)})]},!0);return[nt({},{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:rt(r,"link"),tooltip:i,animate:tf(s,"link")}),nt({},{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({},h),scale:n,style:rt(r,"node"),tooltip:e,labels:[Object.assign(Object.assign({},{text:""}),rt(r,"label")),...a],animate:tf(s,"link")})]},lh=(sh.props={},f=>u=>t=>{const{field:e="value",nodeSize:n,separation:r,sortBy:i,as:a=["x","y"]}=u,[o,s]=a;var t=Zs(t,t=>t.children).sum(t=>t[e]).sort(i),l=f();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}}),ch=t=>lh(Ks)(t),uh=(ch.props={},t=>lh(Fl)(t)),fh=(uh.props={},u=>{const f={sortBy:(t,e)=>e.value-t.value},h={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}=uh(Object.assign(Object.assign(Object.assign({},f),i),{field:c}))(t),t=Zu(l,"node",{title:"name",items:["value"]},!0),l=Zu(l,"link",{title:"",items:[t=>({name:"source",value:t.source.name}),t=>({name:"target",value:t.target.name})]});return[nt({},d,{data:c,encode:rt(e,"link"),scale:rt(n,"link"),labels:o,style:Object.assign({stroke:"#999"},rt(r,"link")),tooltip:l,animate:tf(s,"link")}),nt({},h,{data:i,scale:rt(n,"node"),encode:rt(e,"node"),labels:[Object.assign(Object.assign({},p),rt(r,"label")),...a],style:Object.assign({},rt(r,"node")),tooltip:t,animate:tf(s,"node")})]}});fh.props={};var hh={},dh={},ph=34,gh=10,yh=13;function mh(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function vh(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 bh(t,e){var t=t+"",n=t.length;return n<e?new Array(e-n+1).join(0)+t:t}function xh(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+bh(-e,6):9999<e?"+"+bh(e,6):bh(e,4))+"-"+bh(t.getUTCMonth()+1,2)+"-"+bh(t.getUTCDate(),2)+(a?"T"+bh(n,2)+":"+bh(r,2)+":"+bh(i,2)+"."+bh(a,3)+"Z":i?"T"+bh(n,2)+":"+bh(r,2)+":"+bh(i,2)+"Z":r||n?"T"+bh(n,2)+":"+bh(r,2)+"Z":"")}function wh(r){var e=new RegExp('["'+r+"\n\r]"),f=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 dh;if(l)return l=!1,hh;var t,e,n=a;if(r.charCodeAt(n)===ph){for(;a++<i&&r.charCodeAt(a)!==ph||r.charCodeAt(++a)===ph;);return(t=a)>=i?s=!0:(e=r.charCodeAt(a++))===gh?l=!0:e===yh&&(l=!0,r.charCodeAt(a)===gh)&&++a,r.slice(n+1,t-1).replace(/""/g,'"')}for(;a<i;){if((e=r.charCodeAt(t=a++))===gh)l=!0;else if(e===yh)l=!0,r.charCodeAt(a)===gh&&++a;else if(e!==f)continue;return r.slice(n,t)}return s=!0,r.slice(n,i)}for(r.charCodeAt(i-1)===gh&&--i,r.charCodeAt(i-1)===yh&&--i;(e=c())!==dh;){for(var u=[];e!==hh&&e!==dh;)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?xh(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=mh(n=t),function(t,e){return r(i(t),e,n)}):mh(t)})).columns=s||[],t},parseRows:n,format:function(t,e){return[(e=null==e?vh(t):e).map(o).join(r)].concat(i(t,e)).join("\n")},formatBody:function(t,e){return i(t,e=null==e?vh(t):e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}function kh(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;Mh&&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 Mh=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),Oh=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(),wh(i).parse(t,a?kh:Gu);if("json"===r)return yield e.json();throw new Error(`Unknown format: ${r}.`)})};Oh.props={};const _h=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}};_h.props={};const Sh=t=>{const{callback:e=function(t){return null!=t&&!Number.isNaN(t)}}=t;return t=>t.filter(e)},Eh=(Sh.props={},t=>{const e=t["callback"];return t=>Array.isArray(t)?[...t].sort(e):t});Eh.props={};const Ah=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})};Ah.props={};const Lh=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};Lh.props={};const Th=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))}},Ph=(Th.props={},t=>{const e=t["value"];return()=>e}),Nh=(Ph.props={},t=>{const{callback:e=Gu}=t;return t=>e(t)}),jh=(Nh.props={},t=>{const{callback:e=Gu}=t;return t=>Array.isArray(t)?t.map(e):t});jh.props={};var Ch=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 Rh={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 Bh(t){const{y:c,thickness:u,weight:f,marginRatio:h,id:d,source:p,target:g,sourceWeight:y,targetWeight:m,sortBy:v}=Object.assign(Object.assign({},Rh),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=y(t),t.targetWeight=m(t)});const i=kc(r,t=>t.source),a=kc(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=Xc(e,t=>t.sourceWeight)+Xc(n,t=>t.targetWeight)})}if(r=e,(n="function"==typeof v?v:Ch[v])&&r.sort(n),!(n=(r=e).length))throw Vu("Invalid nodes: it's empty!");if(f){const o=h/(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-h),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(!f)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=kc(e,t=>t.source),l=kc(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 Ih=e=>t=>Bh(e)(t),Fh=(Ih.props={},Math.PI/180),Dh=64,zh=2048;function Wh(t){return t.text}function Gh(){return"serif"}function Hh(){return"normal"}function Vh(t){return t.value}function qh(){return 90*~~(2*Math.random())}function Yh(){return 1}function $h(){}function Uh(t,o,r,s){if(!o.sprite){var l=t.context,c=t.ratio;l.clearRect(0,0,(Dh<<5)/c,zh/c);let i=0,a=0,n=0;var u,f,h,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*Fh),h=Math.cos(o.rotate*Fh),u=t*h,f=t*d,h=e*h,d=e*d,t=Math.max(Math.abs(u+d),Math.abs(u-d))+31>>5<<5,e=~~Math.max(Math.abs(f+h),Math.abs(f-h))):t=t+31>>5<<5,e>n&&(n=e),i+t>=Dh<<5&&(i=0,a+=n,n=0),a+e>=zh)break;l.translate((i+(t>>1))/c,(a+(e>>1))/c),o.rotate&&l.rotate(o.rotate*Fh),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,(Dh<<5)/c,zh/c).data,g=[];0<=--s;)if((o=r[s]).hasText){var y=o.width,m=y>>5;let n=o.y1-o.y0;for(let t=0;t<n*m;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<y;t++){var v=m*e+(t>>5),b=p[(a+e)*(Dh<<5)+(i+t)<<2]?1<<31-t%32:0;g[v]|=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)*m)}}}function Kh(t){const e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function Xh(t){var e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function Zh(){return document.createElement("canvas")}function Qh(t){return"function"==typeof t?t:function(){return t}}const Jh={archimedean:Kh,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 td(){let b=[256,256],r=Wh,i=Gh,p=Vh,g=Hh,y=qh,m=Yh,x=Kh,w=Math.random,v=$h,k=[],M=null,O=1/0;const _=Hh,S=Zh,E={};return E.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=(Dh<<5)/e,t.height=zh/e,(t=t.getContext("2d")).fillStyle=t.strokeStyle="red",t.textAlign="center",{context:t,ratio:e}),l=E.board||Xh((b[0]>>5)*b[1]),c=k.length,u=[],f=k.map(function(t,e,n){return t.text=r.call(this,t,e,n),t.font=i.call(this,t,e,n),t.style=_.call(this,t,e,n),t.weight=g.call(this,t,e,n),t.rotate=y.call(this,t,e,n),t.size=~~p.call(this,t,e,n),t.padding=m.call(this,t,e,n),t}).sort(function(t,e){return e.size-t.size});var t,e;let h=-1,d=E.board?[{x:0,y:0},{x:a,y:o}]:void 0;function n(){for(var t,e,n,r=Date.now();Date.now()-r<O&&++h<c;){var i=f[h];i.x=a*(w()+.5)>>1,i.y=o*(w()+.5)>>1,Uh(s,i,f,h),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,f;for(;(l=o(c+=s))&&(u=~~l[0],f=~~l[1],!(Math.min(Math.abs(u),Math.abs(f))>=a));)if(t.x=n+u,t.y=r+f,!(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 h=t.sprite,d=t.width>>5,p=b[0]>>5,g=t.x-(d<<4),y=127&g,m=32-y,v=t.y1-t.y0;let n,r=(t.y+t.y0)*p+(g>>5);for(let e=0;e<v;e++){for(let t=n=0;t<=d;t++)i[r+t]|=n<<m|(t<d?(n=h[e*d+t])>>>y:0);r+=p}return delete t.sprite,1}return}(l,i,d)&&(v.call(null,"word",{cloud:E,word:i}),u.push(i),d?E.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)}E._tags=u,E._bounds=d,h>=c&&(E.stop(),v.call(null,"end",{cloud:E,words:u,bounds:d}))}return M&&clearInterval(M),M=setInterval(n,0),n(),E},E.stop=function(){return M&&(clearInterval(M),M=null),E},E.createMask=t=>{var e=document.createElement("canvas"),[n,r]=b;if(n&&r){var i=n>>5,a=Xh((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}E.board=a,E.hasImage=!0}},E.timeInterval=function(t){O=null==t?1/0:t},E.words=function(t){k=t},E.size=function(t=[]){b=[+t[0],+t[1]]},E.text=function(t){r=Qh(t)},E.font=function(t){i=Qh(t)},E.fontWeight=function(t){g=Qh(t)},E.rotate=function(t){y=Qh(t)},E.spiral=function(t){x=Jh[t]||t},E.fontSize=function(t){p=Qh(t)},E.padding=function(t){m=Qh(t)},E.random=function(t){w=Qh(t)},E.on=function(t){v=Qh(t)},E}const ed={size:[500,500],fontSize:[14,28]};function nd(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 rd=h=>f=>ce(void 0,void 0,void 0,function*(){var i,a,t=Object.assign({},ed,h),e=td(),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=f.map(t=>t.value),n=t,t=[zc(e),Fc(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",nd,e.createMask),e.words([...f]),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=et(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 id(e){return"string"==typeof e?t=>t[e]:e}rd.props={};const ad=t=>{const{join:e,on:n,select:i=[],as:a=i,unknown:o=NaN}=t;var[t,r]=n;const s=id(r),l=id(t),c=Mc(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),{}))})},od=(ad.props={},t=>{const{start:e,end:n}=t;return t=>t.slice(e,n)});od.props={};const sd=u=>c=>ce(void 0,void 0,void 0,function*(){var{width:t,height:e}=of(c),{data:n,encode:r={},scale:i,style:a={},layout:o={}}=u,s=et(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 rd(Object.assign(Object.assign({},l),o))(e);return[nt({},t,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a},s),{axis:!1}))]});function ld(t,...e){return e.reduce((e,n)=>t=>e(n(t)),t)}function cd(e,n){return n-e?t=>(t-e)/(n-e):t=>.5}function ud(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}sd.props={};const fd=Math.sqrt(50),hd=Math.sqrt(10),dd=Math.sqrt(2);function pd(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>=fd?10:n>=hd?5:n>=dd?2:1)*10**t:-(10**-t)/(n>=fd?10:n>=hd?5:n>=dd?2:1)}function gd(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>=fd?r*=10:n>=hd?r*=5:n>=dd&&(r*=2),e<t?-r:r}const yd=(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=pd(a,o,n))?(a=Math.floor(a/s)*s,o=Math.ceil(o/s)*s,s=pd(a,o,n)):s<0&&(a=Math.ceil(a*s)/s,o=Math.floor(o*s)/s,s=pd(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},md=36e5,vd=864e5,bd=7*vd;vd,vd;function xd(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}}bo=xd(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),n=xd(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),i=xd(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),os=xd(md,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+md*e)},t=>t.getHours()),uo=xd(vd,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+vd*e)},t=>t.getDate()-1);const wd=xd(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());us=xd(bd,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+bd*e)},t=>{var e=wd.floor(t),t=new Date(+t);return Math.floor((+t-+e)/bd)}),go=xd(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 kd={millisecond:bo,second:n,minute:i,hour:os,day:uo,week:us,month:wd,year:go};yo=xd(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),mo=xd(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),xo=xd(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),wo=xd(md,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+md*e)},t=>t.getUTCHours()),Eo=xd(vd,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+vd*e)},t=>t.getUTCDate()-1);const Md=xd(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());Ao=xd(bd,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+bd*e)},t=>{var e=Md.floor(t),t=new Date(+t);return Math.floor((+t-+e)/bd)}),Lo=xd(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 Od={millisecond:yo,second:mo,minute:xo,hour:wo,day:Eo,week:Ao,month:Md,year:Lo};function _d(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?Od:kd;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=ud(i,l,0,c,s);let f;return f=u===c?[a,gd(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(gd(t,e,n),1)]}const Sd=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=_d(o,t,n,r,i),r=[e.floor(o,n),e.ceil(t,n)];return a?r.reverse():r};function Ed(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)}function Ad(t){return Pd(t,"Function")}function Ld(t){return null==t}var Td={}.toString,Pd=function(t,e){return Td.call(t)==="[object "+e+"]"},Nd=function(t){return Array.isArray?Array.isArray(t):Pd(t,"Array")};var jd=function(t){if("object"!=typeof(e=t)||null===e||!Pd(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},Cd=function(t){return Pd(t,"Number")},Rd=Object.values?function(t){return Object.values(t)}:function(n){var t,r=[],e=n,i=function(t,e){Ad(n)&&"prototype"===e||r.push(t)};if(e)if(Nd(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},Bd=5;function Id(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||Bd,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&jd(o)?(jd(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):Nd(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t}function Fd(t){return t}var Dd,zd=function(t,e){if(!Ed(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 Wd(t){return Ld(t)?0:(Ed(t)?t:Object.keys(t)).length}function Gd(t){return null!=t&&!Number.isNaN(t)}!function(a,o){var s;if(Ad(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(Dd=Dd||document.createElement("canvas").getContext("2d")).font=[a,e,i,n+"px",r].join(" "),Dd.measureText(Pd(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],Rd(e=void 0===e?{}:e)).join("")});const Hd=e=>t=>-e(-t),Vd=(t,e)=>{const n=Math.log(t);t=t===Math.E?Math.log:t=>Math.log(t)/n;return e?Hd(t):t},qd=(e,t)=>{var n=e===Math.E?Math.exp:t=>e**t;return t?Hd(n):n},Yd=(t,e,n,r)=>{var i=t<0,a=Vd(r,i),r=qd(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 $d(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 Cd(t)?Math.round(t):t}):i;this.output=ld(a,r,e,t)},t.prototype.invert=void 0}}var Ud,To={exports:{}},Po={exports:{}},Kd=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))},Xd=Array.prototype.concat,Zd=Array.prototype.slice,Qd=Po.exports=function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];Kd(i)?e=Xd.call(e,Zd.call(i)):e.push(i)}return e},Jd=(Qd.wrap=function(t){return function(){return t(Qd(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]}),tp=Po.exports,ep=Object.hasOwnProperty,np=Object.create(null);for(Ud in Jd)ep.call(Jd,Ud)&&(np[Jd[Ud]]=Ud);var rp=To.exports={to:{},get:{}};function ip(t,e,n){return Math.min(Math.max(e,t),n)}function ap(t){t=Math.round(t).toString(16).toUpperCase();return t.length<2?"0"+t:t}rp.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=rp.get.hsl(t),n="hsl";break;case"hwb":e=rp.get.hwb(t),n="hwb";break;default:e=rp.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},rp.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]:ep.call(Jd,e[1])?((i=Jd[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]=ip(i[n],0,255);return i[3]=ip(i[3],0,1),i},rp.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,ip(parseFloat(t[2]),0,100),ip(parseFloat(t[3]),0,100),ip(isNaN(e)?1:e,0,1)]):null},rp.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,ip(parseFloat(t[2]),0,100),ip(parseFloat(t[3]),0,100),ip(isNaN(e)?1:e,0,1)]):null},rp.to.hex=function(){var t=tp(arguments);return"#"+ap(t[0])+ap(t[1])+ap(t[2])+(t[3]<1?ap(Math.round(255*t[3])):"")},rp.to.rgb=function(){var t=tp(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]+")"},rp.to.rgb.percent=function(){var t=tp(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]+")"},rp.to.hsl=function(){var t=tp(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},rp.to.hwb=function(){var t=tp(arguments),e="";return 4<=t.length&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},rp.to.keyword=function(t){return np[t.slice(0,3)]};var op=To.exports;function sp(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 lp(t){var e,n,r,t=op.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*sp(n=2*r-(r=r<.5?r*(1+n):r+n-r*n),r,e+1/3),255*sp(n,r,e),255*sp(n,r,e-1/3),t]):null):null}const cp=(e,n)=>t=>e*(1-t)+n*t,up=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return cp(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{var n=t,r=e;const l=lp(n),c=lp(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})`}}},fp=(t,e)=>{const n=cp(t,e);return t=>Math.round(n(t))};function hp({map:t,initKey:e},n){e=e(n);return t.has(e)?t.get(e):n}function dp(t){return"object"==typeof t?t.valueOf():t}class pp extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=dp,null!==t)for(var[e,n]of t)this.set(e,n)}get(t){return super.get(hp({map:this.map,initKey:this.initKey},t))}has(t){return super.has(hp({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 gp{constructor(t){this.options=Id({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=Id({},this.options,t),this.rescale(t)}rescale(t){}}const yp=Symbol("defaultUnknown");function mp(e,n,r){for(let t=0;t<n.length;t+=1)e.has(n[t])||e.set(r(n[t]),t)}function vp(t){var{value:t,from:e,to:n,mapper:r,notFoundReturn:i}=t;let a=r.get(t);if(void 0===a){if(i!==yp)return i;a=e.push(t)-1,r.set(t,a)}return n[a%n.length]}function bp(t){return t instanceof Date?t=>""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class xp extends gp{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[],unknown:yp}}map(t){return 0===this.domainIndexMap.size&&mp(this.domainIndexMap,this.getDomain(),this.domainKey),vp({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&mp(this.rangeIndexMap,this.getRange(),this.rangeKey),vp({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=bp(e),this.rangeKey=bp(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 xp(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 wp(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,f=u/(2/l*r+1-1/l*i);const h=f*i/l;f-=l*h;const d=function(t){const e=Math.min(...t);return t.map(t=>t/e)}(c),p=f/d.reduce((t,e)=>t+e);var c=new pp(e.map((t,e)=>{e=d[e]*p;return[t,o?Math.floor(e):e]})),g=new pp(e.map((t,e)=>{e=d[e]*p+h;return[t,o?Math.floor(e):e]})),f=Array.from(g.values()).reduce((t,e)=>t+e),t=t+(u-(f-f/l*i))*s;let y=o?Math.round(t):t;var m=new Array(l);for(let t=0;t<l;t+=1){m[t]=(v=y,Math.round(1e12*v)/1e12);var v=e[t];y+=g.get(v)}return{valueBandWidth:c,valueStep:g,adjustedRange:m}}class kp extends xp{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:yp,flex:[]}}clone(){return new kp(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 wp(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 Mp=(t,e,n)=>{let r,i,a=t,o=e;if(a===o&&0<n)return[a];let s=pd(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 Op extends gp{getDefaultOptions(){return{range:[0],domain:[0,1],unknown:void 0,tickCount:5,tickMethod:Mp}}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 Cd(e)&&Cd(r)?t(e,r,n):[]}clone(){return new Op(this.options)}}function _p(t){return Math.abs(t)<1e-15?t:parseFloat(t.toFixed(15))}const Sp=[1,5,2,2.5,4,3],Ep=100*Number.EPSILON;const Ap=(n,r,t=5,i=!0,a=Sp,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,f,h,d,p,g={score:-2,lmin:0,lmax:0,lstep:0};let y=1;for(;y<1/0;){for(let t=0;t<a.length;t+=1){var m=a[t],v=(f=m,h=a,d=y,p=void 0,p=Wd(h),1-zd(h,f)/(p-1)-d+1);if(o[0]*v+o[1]+o[2]+o[3]<g.score){y=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]*v+o[1]+o[2]*b+o[3]<g.score)break;var x=(r-n)/(e+1)/y/m;let t=Math.ceil(Math.log10(x));for(;t<1/0;){var w=y*m*10**t,k=(O=r,k=w*(e-1),(O-=n)<k?1-((k-O)/2)**2/(.1*O)**2:1);if(o[0]*v+o[1]*k+o[2]*b+o[3]<g.score)break;var M=Math.floor(r/w)*y-(e-1)*y,O=Math.ceil(n/w)*y;if(M<=O){var _=O-M;for(let t=0;t<=_;t+=1){var S=(M+t)*(w/y),E=S+w*(e-1),A=w,L=function(t,e,n,r,i,a){var o=Wd(e),e=zd(e,t);let s=0;return t=(r%a+a)%a,1-e/(o-1)-n+(s=(t<Ep||a-t<Ep)&&r<=0&&0<=i?1:s)}(m,a,y,S,E,A),T=1-.5*((r-E)**2+(n-S)**2)/(.1*(r-n))**2,P=(l=e,P=n,l=(l-1)/(E-(N=S)),c=((c=s)-1)/(Math.max(E,r)-Math.min(P,N)),2-Math.max(l/c,c/l)),N=o[0]*L+o[1]*T+o[2]*P+ +o[3];g.score<N&&(!i||S<=n&&r<=E)&&(g.lmin=S,g.lmax=E,g.lstep=A,g.score=N)}}t+=1}e+=1}}y+=1}var t=_p(g.lmax),e=_p(g.lmin),j=_p(g.lstep),C=Math.floor((t=(t-e)/j,Math.round(1e12*t)/1e12))+1,R=new Array(C);R[0]=_p(e);for(let t=1;t<C;t+=1)R[t]=_p(R[t-1]+j);return R};class Lp extends gp{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:Ap}}map(t){return Gd(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new Lp(this.options)}getTicks(){var{domain:t,tickCount:e,tickMethod:n}=this.options,[t,r]=t;return Cd(t)&&Cd(r)?n(t,r,e):[]}}const Tp=(t,e,n)=>{var[t,r]=t,[e,i]=e;let a,o;return ld(o=t<r?(a=cd(t,r),n(e,i)):(a=cd(r,t),n(i,e)),a)},Pp=(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]=cd(s[t],s[t+1]),o[t]=e(l[t],l[t+1]);return t=>{var e=ud(r,t,1,i)-1,n=a[e];return ld(o[e],n)(t)}},Np=(t,e,n,r)=>{return(2<Math.min(t.length,e.length)?Pp:Tp)(t,e,r?fp:n)};class jp extends gp{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:cp,tickCount:5}}map(t){return Gd(t)?this.output(t):this.options.unknown}invert(t){return Gd(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 yd}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 Fd}composeOutput(t,e){var{domain:n,range:r,round:i,interpolate:a}=this.options,n=Np(n.map(t),r,a,i);this.output=ld(n,e,t)}composeInput(t,e,n){var{domain:r,range:i}=this.options,i=Np(i,r.map(t),cp);this.input=ld(e,n,i)}}class Cp extends jp{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:up,tickMethod:Mp,tickCount:5}}chooseTransforms(){return[Fd,Fd]}clone(){return new Cp(this.options)}}class Rp extends kp{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:yp,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new Rp(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}const Bp=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class Ip extends jp{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:up,tickMethod:Mp,tickCount:5}}constructor(t){super(t)}chooseTransforms(){var t,e,n,r=this.options["exponent"];return 1===r?[Fd,Fd]:(t=.5===r?Bp:(e=r,t=>t<0?-((-t)**e):t**e),n=r,[t,t=>t<0?-((-t)**(1/n)):t**(1/n)])}clone(){return new Ip(this.options)}}class Fp extends Ip{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:up,tickMethod:Mp,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new Fp(this.options)}}class Dp extends gp{constructor(t){super(t)}getDefaultOptions(){return{domain:[.5],range:[0,1]}}map(t){return Gd(t)?(t=ud(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 Dp(this.options)}rescale(){var{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}const zp=(t,e,n,r=10)=>{var i=t<0,a=qd(r,i),o=Vd(r,i),s=e<t,l=s?e:t,c=s?t:e;let u=o(l),f=o(c),h=[];if(!(r%1)&&f-u<n){if(u=Math.floor(u),f=Math.ceil(f),i)for(;u<=f;u+=1){var d=a(u);for(let t=r-1;1<=t;--t){var p=d*t;if(c<p)break;l<=p&&h.push(p)}}else for(;u<=f;u+=1){var g=a(u);for(let t=1;t<r;t+=1){var y=g*t;if(c<y)break;l<=y&&h.push(y)}}2*h.length<n&&(h=Mp(l,c,n))}else h=Mp(u,f,Math.min(f-u,n)).map(a);return s?h.reverse():h};class Wp extends jp{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:up,tickMethod:zp,tickCount:5}}chooseNice(){return Yd}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[Vd(t,e),qd(t,e)]}clone(){return new Wp(this.options)}}class Gp extends Dp{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:Ap}}constructor(t){super(t)}nice(){var t,e,n=this.options["nice"];n&&([n,t,e]=this.getTickMethodOptions(),this.options.domain=yd(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 Gp(this.options)}}function Hp(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 Vp extends Dp{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:Ap}}constructor(t){super(t)}rescale(){var{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=Hp(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 Vp(this.options)}getTicks(){var{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1;return n(e[0],e[r],t)}}var qp=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,Yp=/\[([^]*?)\]/gm;function $p(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}function Up(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 Kp(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t}var Xp,No=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],jo=["January","February","March","April","May","June","July","August","September","October","November","December"],o=$p(jo,3),Zp=Up({},{dayNamesShort:$p(No,3),dayNames:No,monthNamesShort:o,monthNames:jo,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][3<t%10?0:(t-t%10!=10?1:0)*t%10]}}),Qp={D:function(t){return String(t.getDate())},DD:function(t){return Kp(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return Kp(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 Kp(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 Kp(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return Kp(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return Kp(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return Kp(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return Kp(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return Kp(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return Kp(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return Kp(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?"-":"+")+Kp(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+Kp(Math.floor(Math.abs(t)/60),2)+":"+Kp(Math.abs(t)%60,2)}},Jp={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 t0=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=_d(o,t,n,r,i),r=e.range(o,new Date(+t+1),n,!0);return a?r.reverse():r};function e0(t){var e=t.getTimezoneOffset(),t=new Date(t);return t.setMinutes(t.getMinutes()+e,t.getSeconds(),t.getMilliseconds()),t}class n0 extends jp{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:t0,interpolate:cp,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return Sd}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?Od:kd,s=t?e0:Fd;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=Jp.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=Jp[t]||t).replace(Yp,function(t,e){return r.push(e),"@@@"}),Up(Up({},Zp),n));return(t=t.replace(qp,function(t){return Qp[t](e,i)})).replace(/@@@/g,function(){return r.shift()})}}clone(){return new n0(this.options)}}var r0;let i0=Xp=class extends Cp{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:Fd,tickMethod:Mp,tickCount:5}}constructor(t){super(t)}clone(){return new Xp(this.options)}};i0=Xp=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}([$d(function(t){return[t(0),t(1)]},t=>{var[t,e]=t;return ld(cp(0,1),cd(t,e))})],i0);let a0=r0=class extends Cp{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:Fd,tickMethod:Mp,tickCount:5}}constructor(t){super(t)}clone(){return new r0(this.options)}};function o0(r,i){return Object.entries(r).reduce((t,[e,n])=>(t[e]=i(n,e,r),t),{})}function s0(t){return t.map((t,e)=>e)}function l0(t,e){const n=[[],[]];return t.forEach(t=>{n[e(t)?0:1].push(t)}),n}function c0(n,t=n.length){if(1===t)return n.map(t=>[t]);const r=[];for(let e=0;e<n.length;e++)c0(n.slice(e+1),t-1).forEach(t=>{r.push([n[e],...t])});return r}function u0(e){if(1===e.length)return[e];var n=[];for(let t=1;t<=e.length;t++)n.push(...c0(e,t));return n}function f0([t,e],[n,r]){return[t-n,e-r]}function h0([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function d0([t,e]){return Math.atan2(e,t)}function p0([t,e]){return d0([t,e])+Math.PI/2}function g0(t,e){t=d0(t),e=d0(e);return t<e?e-t:2*Math.PI-(t-e)}function y0(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 m0([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 v0(t,e,n){var n=n["arrowSize"],n="string"==typeof n?+parseFloat(n)/100*h0(t,e):n,r=Math.PI/6,t=Math.atan2(e[1]-t[1],e[0]-t[0]),i=Math.PI/2-t-r,t=t-r;return[[e[0]-n*Math.sin(i),e[1]-n*Math.cos(i)],[e[0]-n*Math.cos(t),e[1]-n*Math.sin(t)]]}function b0(t,e,n,r,i){e=d0(f0(r,e))+Math.PI,n=d0(f0(r,n))+Math.PI;t.arc(r[0],r[1],i,e,n,n-e<0)}function x0(e,t,n,r="y",i="between"){const a="y"===r||!0===r?n:t;var n="y"===r||!0===r?90:0,t=s0(a),[r,o]=mc(t,t=>a[t]);const s=new Cp({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 w0(t){var[t,e,n,r]=t;return[r,t,e,n]}function k0(t,e,n){var[e,r,,i]=Zc(t)?w0(e):e,[n,a]=n,t=t.getCenter(),o=p0(f0(e,t)),r=p0(f0(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:h0(i,t),outerRadius:h0(e,t)}}function M0(t,e,n,r){var i=t["defaultColor"],t=t[e]||{},e=t[n]||t[r];return Object.assign({defaultColor:i},e)}function O0(t){var{opacityAttribute:t="fill"}=t;return t+"Opacity"}function _0(t,e){return Qc(t)?(e=e["transform"],`translate(${(t=t.getCenter())[0]}, ${t[1]}) `+(e||"")):""}function S0(t){var e,n,r;return 1===t.length?t[0]:([[t,e],[n,r]]=t,[(t+n)/2,(e+r)/2])}function it(t){return new E0([t],null,t,t.ownerDocument)}a0=r0=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}([$d(function(t){return[t(0),t(.5),t(1)]},t=>{const[e,n,r]=t,i=ld(cp(0,.5),cd(e,n)),a=ld(cp(.5,1),cd(n,r));return t=>(e>r?t<n?a:i:t<n?i:a)(t)})],a0);class E0{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 E0(t,null,this._elements[0],this._document)}selectFacetAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new E0(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 E0([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 E0(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 E0(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 E0([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])),f=kc(this._elements,t=>r(t.__data__));for(let t=0;t<e.length;t++){var h=e[t],d=n(h,t),p=r(h,t);if(c.has(d)){var g=c.get(d);g.__data__=h,g.__facet__=!1,a.push(g),o.delete(g),c.delete(d)}else if(u.has(d)){g=u.get(d);g.__data__=h,g.__facet__=!0,a.push(g),u.delete(d)}else if(f.has(d)){const kc=f.get(d);s.push([h,kc]);for(const y of kc)o.delete(y);f.delete(d)}else c.has(p)?((d=c.get(p)).__toData__?d.__toData__.push(h):d.__toData__=[h],l.add(d),o.delete(d)):i.push(h)}var t=[new E0([],i,this._parent,this._document),new E0(a,null,this._parent,this._document),new E0(o,null,this._parent,this._document),new E0([],s,this._parent,this._document),new E0(l,null,this._parent,this._document)];return new E0(this._elements,null,this._parent,this._document,t)}merge(t){var e=[...this._elements,...t._elements],t=[...this._transitions,...t._transitions];return new E0(e,null,this._parent,this._document,void 0,t)}createElement(t){var e;return this._document?this._document.createElement(t,{}):(e=E0.registry[t])?new e:Vu("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 E0([],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}}E0.registry={g:X.Group,rect:X.Rect,circle:X.Circle,path:X.Path,text:X.Text,ellipse:X.Ellipse,image:X.Image,line:X.Line,polygon:X.Polygon,polyline:X.Polyline,html:X.HTML};const A0=t=>{const u=t["radius"],f=et(t,["shape","radius"]);var t=rt(f,"pointer"),e=rt(f,"pin");const h=t["shape"],d=et(t,["shape"]),p=e["shape"],g=et(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=Fs({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]=S0(c),[i,t]=n.getCenter(),a=Object.assign(Object.assign({x1:a,y1:o,x2:i,y2:t,stroke:l},d),f),o=Object.assign(Object.assign({cx:i,cy:t,stroke:l},g),f),i=it(new X.Group);return Xu(h)||("function"==typeof h?i.append(()=>h(c,e,s,r)):i.append("line").call(L,a).node()),Xu(p)||("function"==typeof p?i.append(()=>p(c,e,s,r)):i.append("circle").call(L,o).node()),i.node()}},L0=f=>{const h={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:A0,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={}}=f,a=et(f,["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}=t;var t=a||r,o=a?1:i,s=e["color"],e=Object.assign({y:{domain:[0,o]}},e);if(!s)return{targetData:[{x:n,y:t,color:"target"}],totalData:[{x:n,y:t,color:"target"},{x:n,y:o-t,color:"total"}],target:t,total:o,scale:e};const{domain:l=[]}=s;return{targetData:[{x:n,y:t,color:"target"}],totalData:l.map((t,e)=>({x:n,y:1<=e?t-l[e-1]:t,color:e})),target:t,total:o,scale:e}}(e,n),c=rt(r,"text"),u=(t=["pointer","pin"],Object.fromEntries(Object.entries(r).filter(([e])=>t.find(t=>e.startsWith(t)))));return[nt({},h,Object.assign({type:"interval",transform:[{type:"stackY"}],data:n,scale:l,style:rt(r,"arc"),animate:"object"==typeof i?rt(i,"arc"):i},a)),nt({},h,d,Object.assign({type:"point",data:e,scale:l,style:u,animate:"object"==typeof i?rt(i,"indicator"):i},a)),nt({},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?rt(i,"text"):i})]}},T0=(L0.props={},()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"]),P0=(T0.props={},()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"]),N0=(P0.props={},t=>new kp(t)),j0=(N0.props={},t=>new Cp(t)),C0=(j0.props={},t=>new xp(t)),R0=(C0.props={},t=>new Lp(t)),B0=(R0.props={},t=>new Rp(t)),I0=(B0.props={},t=>new n0(t)),F0=(I0.props={},t=>new Wp(t)),D0=(F0.props={},t=>new Ip(t)),z0=(D0.props={},t=>new Dp(t)),W0=(z0.props={},t=>new Vp(t)),G0=(W0.props={},t=>new Gp(t)),H0=(G0.props={},t=>new Fp(t)),V0=(H0.props={},t=>new i0(t)),q0=(V0.props={},t=>new Op(t));function Y0(t){return function(){return t}}q0.props={};const $0=Math.abs,U0=Math.atan2,K0=Math.cos,X0=Math.max,Z0=Math.min,Q0=Math.sin,J0=Math.sqrt,t1=1e-12,e1=Math.PI,n1=e1/2,r1=2*e1;function i1(t){return 1<=t?n1:t<=-1?-n1:Math.asin(t)}const a1=Math.PI,o1=2*a1,s1=1e-6,l1=o1-s1;function c1(n){this._+=n[0];for(let t=1,e=n.length;t<e;++t)this._+=arguments[t]+n[t]}class u1{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?c1:function(t){var e=Math.floor(t);if(!(0<=e))throw new Error("invalid digits: "+t);if(15<e)return c1;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,f=s-t,h=l-e,d=f*f+h*h;null===this._x1?this._append`M${this._x1=t},${this._y1=e}`:d>s1&&(Math.abs(h*c-u*f)>s1&&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((a1-Math.acos((o+d-r)/(2*l*a)))/2))/a,r=o/l,Math.abs(d-1)>s1&&this._append`L${t+d*f},${e+d*h}`,this._append`A${i},${i},0,0,${+(f*s<h*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,f=a?r-i:i-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>s1||Math.abs(this._y1-c)>s1)&&this._append`L${l},${c}`,n&&((f=f<0?f%o1+o1:f)>l1?this._append`A${n},${n},0,1,${u},${t-o},${e-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:f>s1&&this._append`A${n},${n},0,${+(f>=a1)},${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 f1(){return new u1}function h1(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 u1(r)}function d1(t){return t.innerRadius}function p1(t){return t.outerRadius}function g1(t){return t.startAngle}function y1(t){return t.endAngle}function m1(t){return t&&t.padAngle}function v1(t,e,n,r,i,a,o){var s=t-n,l=e-r,o=(o?a:-a)/J0(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,f=n-t,h=u*u+f*f,a=i-a,s=s*n-e*t,n=(f<0?-1:1)*J0(X0(0,a*a*h-s*s)),e=(s*f-u*n)/h,t=(-s*u-f*n)/h,d=(s*f+u*n)/h,s=(-s*u+f*n)/h,u=e-r,f=t-c,n=d-r,h=s-c;return n*n+h*h<u*u+f*f&&(e=d,t=s),{cx:e,cy:t,x01:-l,y01:-o,x11:e*(i/a-1),y11:t*(i/a-1)}}function b1(){var A=d1,L=p1,T=Y0(0),P=null,N=g1,j=y1,C=m1,R=null,B=h1(e);function e(){var t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,g,y,m,v,b,x,w,k=+A.apply(this,arguments),M=+L.apply(this,arguments),O=N.apply(this,arguments)-n1,_=j.apply(this,arguments)-n1,S=$0(_-O),E=O<_;if(R=R||(t=B()),M<k&&(e=M,M=k,k=e),M>t1?S>r1-t1?(R.moveTo(M*K0(O),M*Q0(O)),R.arc(0,0,M,O,_,!E),k>t1&&(R.moveTo(k*K0(_),k*Q0(_)),R.arc(0,0,k,_,O,E))):(r=e=O,i=n=_,o=a=S,h=(u=C.apply(this,arguments)/2)>t1&&(P?+P.apply(this,arguments):J0(k*k+M*M)),w=x=s=Z0($0(M-k)/2,+T.apply(this,arguments)),h>t1&&(f=i1(h/k*Q0(u)),h=i1(h/M*Q0(u)),(a-=2*f)>t1?(r+=f*=E?1:-1,i-=f):(a=0,r=i=(O+_)/2),(o-=2*h)>t1?(e+=h*=E?1:-1,n-=h):(o=0,e=n=(O+_)/2)),u=M*K0(e),f=M*Q0(e),h=k*K0(i),O=k*Q0(i),s>t1&&(d=M*K0(n),p=M*Q0(n),g=k*K0(r),y=k*Q0(r),S<e1)&&((_=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<t1))return[t+(l=(o*(e-a)-s*(t-i))/l)*n,e+l*r]}(u,f,g,y,d,p,h,O))?(S=u-_[0],v=f-_[1],b=d-_[0],m=p-_[1],v=1/Q0((1<(S=(S*b+v*m)/(J0(S*S+v*v)*J0(b*b+m*m)))?0:S<-1?e1:Math.acos(S))/2),b=J0(_[0]*_[0]+_[1]*_[1]),x=Z0(s,(k-b)/(v-1)),w=Z0(s,(M-b)/(1+v))):x=w=0),o>t1?w>t1?(l=v1(g,y,u,f,M,w,E),c=v1(d,p,h,O,M,w,E),R.moveTo(l.cx+l.x01,l.cy+l.y01),w<s?R.arc(l.cx,l.cy,w,U0(l.y01,l.x01),U0(c.y01,c.x01),!E):(R.arc(l.cx,l.cy,w,U0(l.y01,l.x01),U0(l.y11,l.x11),!E),R.arc(0,0,M,U0(l.cy+l.y11,l.cx+l.x11),U0(c.cy+c.y11,c.cx+c.x11),!E),R.arc(c.cx,c.cy,w,U0(c.y11,c.x11),U0(c.y01,c.x01),!E))):(R.moveTo(u,f),R.arc(0,0,M,e,n,!E)):R.moveTo(u,f),k>t1&&a>t1?x>t1?(l=v1(h,O,d,p,k,-x,E),c=v1(u,f,g,y,k,-x,E),R.lineTo(l.cx+l.x01,l.cy+l.y01),x<s?R.arc(l.cx,l.cy,x,U0(l.y01,l.x01),U0(c.y01,c.x01),!E):(R.arc(l.cx,l.cy,x,U0(l.y01,l.x01),U0(l.y11,l.x11),!E),R.arc(0,0,k,U0(l.cy+l.y11,l.cx+l.x11),U0(c.cy+c.y11,c.cx+c.x11),E),R.arc(c.cx,c.cy,x,U0(c.y11,c.x11),U0(c.y01,c.x01),!E))):R.arc(0,0,k,i,r,E):R.lineTo(h,O)):R.moveTo(0,0),R.closePath(),t)return R=null,t+""||null}return e.centroid=function(){var t=(+A.apply(this,arguments)+ +L.apply(this,arguments))/2,e=(+N.apply(this,arguments)+ +j.apply(this,arguments))/2-e1/2;return[K0(e)*t,Q0(e)*t]},e.innerRadius=function(t){return arguments.length?(A="function"==typeof t?t:Y0(+t),e):A},e.outerRadius=function(t){return arguments.length?(L="function"==typeof t?t:Y0(+t),e):L},e.cornerRadius=function(t){return arguments.length?(T="function"==typeof t?t:Y0(+t),e):T},e.padRadius=function(t){return arguments.length?(P=null==t?null:"function"==typeof t?t:Y0(+t),e):P},e.startAngle=function(t){return arguments.length?(N="function"==typeof t?t:Y0(+t),e):N},e.endAngle=function(t){return arguments.length?(j="function"==typeof t?t:Y0(+t),e):j},e.padAngle=function(t){return arguments.length?(C="function"==typeof t?t:Y0(+t),e):C},e.context=function(t){return arguments.length?(R=null==t?null:t,e):R},e}function x1(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function w1(t){this._context=t}function k1(t){return new w1(t)}function M1(t){return t[0]}function O1(t){return t[1]}function _1(o,s){var l=Y0(!0),c=null,u=k1,f=null,h=h1(e);function e(t){var e,n,r,i=(t=x1(t)).length,a=!1;for(null==c&&(f=u(r=h())),e=0;e<=i;++e)!(e<i&&l(n=t[e],e,t))===a&&((a=!a)?f.lineStart():f.lineEnd()),a&&f.point(+o(n,e,t),+s(n,e,t));if(r)return f=null,r+""||null}return o="function"==typeof o?o:void 0===o?M1:Y0(o),s="function"==typeof s?s:void 0===s?O1:Y0(s),e.x=function(t){return arguments.length?(o="function"==typeof t?t:Y0(+t),e):o},e.y=function(t){return arguments.length?(s="function"==typeof t?t:Y0(+t),e):s},e.defined=function(t){return arguments.length?(l="function"==typeof t?t:Y0(!!t),e):l},e.curve=function(t){return arguments.length?(u=t,null!=c&&(f=u(c)),e):u},e.context=function(t){return arguments.length?(null==t?c=f=null:f=u(c=t),e):c},e}function S1(u,f,h){var d=null,p=Y0(!0),g=null,y=k1,m=null,v=h1(e);function e(t){var e,n,r,i,a,o=(t=x1(t)).length,s=!1,l=new Array(o),c=new Array(o);for(null==g&&(m=y(a=v())),e=0;e<=o;++e){if(!(e<o&&p(i=t[e],e,t))===s)if(s=!s)n=e,m.areaStart(),m.lineStart();else{for(m.lineEnd(),m.lineStart(),r=e-1;n<=r;--r)m.point(l[r],c[r]);m.lineEnd(),m.areaEnd()}s&&(l[e]=+u(i,e,t),c[e]=+f(i,e,t),m.point(d?+d(i,e,t):l[e],h?+h(i,e,t):c[e]))}if(a)return m=null,a+""||null}function t(){return _1().defined(p).curve(y).context(g)}return u="function"==typeof u?u:void 0===u?M1:Y0(+u),f="function"==typeof f?f:Y0(void 0===f?0:+f),h="function"==typeof h?h:void 0===h?O1:Y0(+h),e.x=function(t){return arguments.length?(u="function"==typeof t?t:Y0(+t),d=null,e):u},e.x0=function(t){return arguments.length?(u="function"==typeof t?t:Y0(+t),e):u},e.x1=function(t){return arguments.length?(d=null==t?null:"function"==typeof t?t:Y0(+t),e):d},e.y=function(t){return arguments.length?(f="function"==typeof t?t:Y0(+t),h=null,e):f},e.y0=function(t){return arguments.length?(f="function"==typeof t?t:Y0(+t),e):f},e.y1=function(t){return arguments.length?(h=null==t?null:"function"==typeof t?t:Y0(+t),e):h},e.lineX0=e.lineY0=function(){return t().x(u).y(f)},e.lineY1=function(){return t().x(u).y(h)},e.lineX1=function(){return t().x(d).y(f)},e.defined=function(t){return arguments.length?(p="function"==typeof t?t:Y0(!!t),e):p},e.curve=function(t){return arguments.length?(y=t,null!=g&&(m=y(g)),e):y},e.context=function(t){return arguments.length?(null==t?g=m=null:m=y(g=t),e):g},e}f1.prototype=u1.prototype,w1.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 E1=L1(k1);function A1(t){this._curve=t}function L1(e){function t(t){return new A1(e(t))}return t._curve=e,t}function T1(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(L1(t)):e()._curve},t}function P1(){}function N1(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 j1(t,e){this._context=t,this._k=(1-e)/6}function C1(t,e){this._context=t,this._k=(1-e)/6}function R1(t,e,n){var r,i,a=t._x1,o=t._y1,s=t._x2,l=t._y2;t._l01_a>t1&&(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>t1&&(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 B1(t,e){this._context=t,this._alpha=e}A1.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))}},j1.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:N1(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:N1(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 j1(t,n)}return t.tension=function(t){return e(+t)},t}(0),C1.prototype={areaStart:P1,areaEnd:P1,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:N1(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 C1(t,n)}return t.tension=function(t){return e(+t)},t}(0),B1.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:R1(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 I1=function e(n){function t(t){return n?new B1(t,n):new j1(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function F1(t,e){this._context=t,this._alpha=e}F1.prototype={areaStart:P1,areaEnd:P1,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:R1(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 D1=function e(n){function t(t){return n?new F1(t,n):new C1(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function z1(t){this._context=t}function W1(t){return new z1(t)}function G1(t,e){this._context=t,this._t=e}function H1(t){return new G1(t,.5)}function V1(t){return new G1(t,0)}function q1(t){return new G1(t,1)}function Y1(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:f=a,radiusTopLeft:h=a,radiusTopRight:d=a}=r,r=et(r,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight"]);if(!Qc(n)&&!tu(n)){var[p,,g]=!!Zc(n)?w0(t):t;const[x,v]=p;var[g,p]=f0(g,p),y=(0<g?x:x+g)+o,m=(0<p?v:v+p)+s,g=Math.abs(g)-(o+l),o=Math.abs(p)-(s+c);return it(new X.Rect({})).style("x",y).style("y",m).style("width",g).style("height",o).style("radius",[h,d,f,u]).call(L,r).node()}const{y:v,y1:b}=e;l=n.getCenter(),p=k0(n,t,[v,b]),s=b1().cornerRadius(a).padAngle(i*Math.PI/180);return it(new X.Path({})).style("path",s(p)).style("transform",`translate(${l[0]}, ${l[1]})`).style("radius",a).style("inset",i).call(L,r).node()}z1.prototype={areaStart:P1,areaEnd:P1,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))}},G1.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 $1=O=>{const{colorAttribute:_,first:S=!0,last:E=!0}=O,A=et(O,["colorAttribute","opacityAttribute","first","last"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=M0(r,i,a,o),{defaultColor:i,radius:a=0}=r,o=et(r,["defaultColor","radius"]),r=o.lineWidth||1,{stroke:s,radius:a=a,radiusTopLeft:l=a,radiusTopRight:c=a,radiusBottomRight:u=a,radiusBottomLeft:f=a,innerRadius:h=0,innerRadiusTopLeft:d=h,innerRadiusTopRight:p=h,innerRadiusBottomRight:g=h,innerRadiusBottomLeft:h=h,lineWidth:r="stroke"===_||s?r:0,inset:y=0,insetLeft:m=y,insetRight:v=y,insetBottom:b=y,insetTop:x=y}=A,w=et(A,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","lineWidth","inset","insetLeft","insetRight","insetBottom","insetTop"]),{color:i=i,opacity:k}=e;const M=[S?l:d,S?c:p,E?u:g,E?f:h];l=["radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft"],Zc(n)&&l.push(l.shift()),d=Object.assign(Object.assign({radius:a},Object.fromEntries(l.map((t,e)=>[t,M[e]]))),{inset:y,insetLeft:m,insetRight:v,insetBottom:b,insetTop:x});return it(Y1(t,e,n,d)).call(L,o).style("fill","transparent").style(_,i).style(O0(O),k).style("lineWidth",r).style("stroke",void 0===s?i:s).call(L,w).node()}},U1=($1.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>$1(Object.assign({colorAttribute:"fill"},t))),K1=(U1.props=Object.assign(Object.assign({},$1.props),{defaultMarker:"square"}),t=>$1(Object.assign({colorAttribute:"stroke"},t)));K1.props=Object.assign(Object.assign({},$1.props),{defaultMarker:"hollowSquare"});const X1=t=>{const{adjustPoints:s=function(t,e,n){var[t,r,i,a]=t;if(Zc(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,l=et(t,["adjustPoints"]);return(t,e,n,r,i,...a)=>{var o=e["index"],o=i[o+1],t=s(t,o,n);return $1(Object.assign({colorAttribute:"fill"},l))(t,e,n,r,i,...a)}};function Z1(t,e,n){var[t,r,i,a]=t;if(Zc(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]}X1.props=Object.assign(Object.assign({},$1.props),{defaultMarker:"funnel"});const Q1=t=>X1(Object.assign({adjustPoints:Z1},t));function J1(t){const e="function"==typeof t?t:t.render;return class extends X.CustomElement{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}Q1.props=Object.assign(Object.assign({},$1.props),{defaultMarker:"square"});const tg=J1(t=>{var{d1:e,d2:n,style1:r,style2:i}=t.attributes;it(t).maybeAppend("line",()=>new X.Path({})).style("d",e).call(L,r),it(t).maybeAppend("line1",()=>new X.Path({})).style("d",n).call(L,i)});const eg=t=>{const{curve:f,gradient:h=!1,gradientColor:d="between",defined:p=t=>!Number.isNaN(t)&&null!=t,connect:g=!1}=t,y=et(t,["curve","gradient","gradientColor","defined","connect"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=M0(r,i,a,o),{defaultColor:i,lineWidth:a}=r,o=et(r,["defaultColor","lineWidth"]),{color:r=i,size:i=a,seriesColor:a,seriesX:s,seriesY:l}=e,a=h&&a?x0(a,s,l,h,d):r,s=_0(n,e),l=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o),a&&{stroke:a}),i&&{lineWidth:i}),s&&{transform:s}),y);let c;if(Qc(n)){const u=n.getCenter();c=n=>T1(_1().curve(E1)).angle((t,e)=>p0(f0(n[e],u))).radius((t,e)=>h0(n[e],u)).defined(([t,e])=>p(t)&&p(e)).curve(f)(n)}else c=_1().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>p(t)&&p(e)).curve(f);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=rt(l,"connect"),a=!!e.length;return(!a||g&&!Object.keys(o).length?it(new X.Path({})).style("d",c(r)||[]).call(L,l):a&&!g?it(new X.Path({})).style("d",c(t)).call(L,l):it(new tg).style("style1",Object.assign(Object.assign({},l),o)).style("style2",l).style("d1",e.map(c).join(",")).style("d2",c(t))).node()}},ng=(eg.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=Qc(n)?W1:k1;return eg(Object.assign({curve:i},a))(t,e,n,r)}),rg=(ng.props=Object.assign(Object.assign({},eg.props),{defaultMarker:"line"}),t=>{const{alpha:a=.5}=t,o=et(t,["alpha"]);return(t,e,n,r)=>{var i=Qc(n)?D1:I1;return eg(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),ig=(rg.props=Object.assign(Object.assign({},eg.props),{defaultMarker:"smooth"}),t=>eg(Object.assign({curve:q1},t))),ag=(ig.props=Object.assign(Object.assign({},eg.props),{defaultMarker:"hv"}),t=>eg(Object.assign({curve:V1},t))),og=(ag.props=Object.assign(Object.assign({},eg.props),{defaultMarker:"vh"}),t=>eg(Object.assign({curve:H1},t)));og.props=Object.assign(Object.assign({},eg.props),{defaultMarker:"hvh"});var vo=(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"]],ss=(vo.style=["fill"],vo.bind(void 0)),Vo=(ss.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]),fs=(Vo.style=["fill"],Vo.bind(void 0)),ds=(fs.style=["fill"],Vo.bind(void 0)),ys=(ds.style=["stroke","lineWidth"],(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"]]}),ws=(ys.style=["fill"],ys.bind(void 0)),Fo=(ws.style=["stroke","lineWidth"],(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"]]}),a=(Fo.style=["fill"],Fo.bind(void 0)),Bo=(a.style=["stroke","lineWidth"],(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"]]}),ls=(Bo.style=["fill"],Bo.bind(void 0)),l=(ls.style=["stroke","lineWidth"],(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"]]}),cs=(l.style=["fill"],l.bind(void 0)),zl=(cs.style=["stroke","lineWidth"],(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"]]}),r=(zl.style=["fill"],zl.bind(void 0)),po=(r.style=["stroke","lineWidth"],(t,e,n)=>[["M",t,e+n],["L",t,e-n]]),bo=(po.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]),n=(bo.style=["stroke","lineWidth"],(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]]),i=(n.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]),os=(i.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n,e],["L",t+n,e]]),uo=(os.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n,e],["L",t+n,e]]),us=(uo.style=["stroke","lineWidth"],uo.bind(void 0)),go=(us.style=["stroke","lineWidth"],(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]]),yo=(go.style=["stroke","lineWidth"],(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]]),mo=(yo.style=["stroke","lineWidth"],(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]]),xo=(mo.style=["stroke","lineWidth"],(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]]),wo=(xo.style=["stroke","lineWidth"],(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]]);wo.style=["stroke","lineWidth"];const sg=new Map([["bowtie",zl],["cross",bo],["dash",us],["diamond",ys],["dot",uo],["hexagon",l],["hollowBowtie",r],["hollowDiamond",ws],["hollowHexagon",cs],["hollowPoint",ss],["hollowSquare",ds],["hollowTriangle",a],["hollowTriangleDown",ls],["hv",yo],["hvh",xo],["hyphen",os],["line",po],["plus",i],["point",vo],["rect",fs],["smooth",go],["square",Vo],["tick",n],["triangleDown",Bo],["triangle",Fo],["vh",mo],["vhv",wo]]);const c=u=>{const{colorAttribute:f,symbol:t,mode:h="auto"}=u,d=et(u,["colorAttribute","symbol","mode"]),p=sg.get(t)||sg.get("point");return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=M0(r,i,a,o),{defaultColor:i,lineWidth:a}=r,o=et(r,["defaultColor","lineWidth"]),r=d.stroke?a||1:a,{color:a=i,transform:i,opacity:s}=e,[l,c]=S0(t),t=function(t,e,n,r){var i;if(1!==e.length)return n=n["size"],"fixed"!==t&&("normal"===t||nu(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}(h,t,e,n)||d.r||o.r;return it(new X.Path).call(L,o).style("fill","transparent").style("d",p(l,c,t)).style("lineWidth",r).style("transform",i).style("stroke",a).style(O0(u),s).style(f,a).call(L,d).node()}},lg=(c.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>c(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t))),cg=(lg.props=Object.assign({defaultMarker:"bowtie"},c.props),t=>c(Object.assign({colorAttribute:"stroke",symbol:"cross"},t))),ug=(cg.props=Object.assign({defaultMarker:"cross"},c.props),t=>c(Object.assign({colorAttribute:"fill",symbol:"diamond"},t))),fg=(ug.props=Object.assign({defaultMarker:"diamond"},c.props),t=>c(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t))),hg=(fg.props=Object.assign({defaultMarker:"hexagon"},c.props),t=>c(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t))),dg=(hg.props=Object.assign({defaultMarker:"hollowBowtie"},c.props),t=>c(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t))),pg=(dg.props=Object.assign({defaultMarker:"hollowDiamond"},c.props),t=>c(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t))),gg=(pg.props=Object.assign({defaultMarker:"hollowHexagon"},c.props),t=>c(Object.assign({colorAttribute:"stroke",symbol:"point"},t))),yg=(gg.props=Object.assign({defaultMarker:"hollowPoint"},c.props),t=>c(Object.assign({colorAttribute:"stroke",symbol:"square"},t))),mg=(yg.props=Object.assign({defaultMarker:"hollowSquare"},c.props),t=>c(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t))),vg=(mg.props=Object.assign({defaultMarker:"hollowTriangle"},c.props),t=>c(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t))),bg=(vg.props=Object.assign({defaultMarker:"hollowTriangleDown"},c.props),t=>c(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t))),xg=(bg.props=Object.assign({defaultMarker:"hyphen"},c.props),t=>c(Object.assign({colorAttribute:"stroke",symbol:"line"},t))),wg=(xg.props=Object.assign({defaultMarker:"line"},c.props),t=>c(Object.assign({colorAttribute:"stroke",symbol:"plus"},t))),kg=(wg.props=Object.assign({defaultMarker:"plus"},c.props),t=>c(Object.assign({colorAttribute:"fill",symbol:"point"},t))),Mg=(kg.props=Object.assign({defaultMarker:"point"},c.props),t=>c(Object.assign({colorAttribute:"fill",symbol:"square"},t))),Og=(Mg.props=Object.assign({defaultMarker:"square"},c.props),t=>c(Object.assign({colorAttribute:"stroke",symbol:"tick"},t))),_g=(Og.props=Object.assign({defaultMarker:"tick"},c.props),t=>c(Object.assign({colorAttribute:"fill",symbol:"triangle"},t))),Sg=(_g.props=Object.assign({defaultMarker:"triangle"},c.props),t=>c(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t))),Eg=(Sg.props=Object.assign({defaultMarker:"triangleDown"},c.props),t=>{const{arrowSize:u="40%"}=t,f=et(t,["arrowSize"]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=M0(r,e,i,a),e=r["defaultColor"],i=et(r,["defaultColor"]),[a,r]=t,[t,l]=v0(a,r,{arrowSize:u}),c=f1();return c.moveTo(...a),c.lineTo(...r),c.moveTo(...r),c.lineTo(...t),c.moveTo(...r),c.lineTo(...l),it(new X.Path).call(L,i).style("d",c.toString()).style("stroke",o||e).style("transform",s).call(L,f).node()}});function Ag(t){Tg(t,!0)}function Lg(t){Tg(t,!1)}function Tg(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)})}Eg.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};t(jg,Pg=X.Group);var Pg,Ng=jg;function jg(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Pg.apply(this,y([],w(t),!1))||this;return n.addEventListener(X.ElementEvent.INSERTED,function(){Lg(n)}),n}function Cg(t){t=t.appendChild(new Ng({class:"offscreen"}));return Lg(t),t}t(Ig,Rg=X.Text),Object.defineProperty(Ig.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=Cg(this)),this._offscreen},enumerable:!1,configurable:!0}),Ig.prototype.disconnectedCallback=function(){var t;null!=(t=this._offscreen)&&t.destroy()};var Rg,Bg=Ig;function Ig(t){var e=(t=void 0===t?{}:t).style,t=et(t,["style"]);return Rg.call(this,v({style:v({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},e)},t))||this}function Fg(t){return t*Math.PI/180}function Dg(t){return Number((180*t/Math.PI).toPrecision(5))}Object.defineProperty(Wg.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(Wg.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(Wg.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(Wg.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),Wg.fromRect=function(t){return new Wg(t.x,t.y,t.width,t.height)},Wg.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 zg=Wg;function Wg(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 Gg(t,e){return Ce(t)?t.apply(void 0,y([],w(e),!1)):t}function Hg(t,e){function r(t){return"".concat(e,"-").concat(t)}return t=Object.fromEntries(Object.entries(t).map(function(t){var t=w(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 Vg(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)qg(t,e[r]);return t}var qg=function(r,i,a,o){void 0===a&&(a=0),void 0===o&&(o=5),Object.entries(i).forEach(function(t){var t=w(t,2),e=t[0],t=t[1],n=r;Object.prototype.hasOwnProperty.call(i,e)&&(t?We(t)?(We(r[e])||(n[e]={}),a<o?qg(r[e],t,a+1,o):n[e]=i[e]):Ie(t)?(n[e]=[],n[e]=n[e].concat(t)):n[e]=t:n[e]=t)})},Yg=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function $g(t,e,n){void 0===n&&(n="..."),"text"===t.nodeName&&t.attr({wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:n})}function Ug(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 Kg(t){return"function"==typeof t?t():qe(t)||$e(t)?new Bg({style:{text:String(t)}}):t}function Xg(t,e,n,r,i,a){return(t===e||Math.min(t,e)<=i&&i<=Math.max(t,e))&&(n===r||Math.min(n,r)<=a&&a<=Math.max(n,r))}function Zg(t,e,n){var r=t;(!t.length||e<t[0]||e===t[0]&&n<t[1])&&(r[0]=e,r[1]=n)}function Qg(t,e){var t=w(t,2),n=t[0],t=t[1],e=w(e,2),r=e[0],e=e[1];return Math.pow(Math.pow(n-r,2)+Math.pow(t-e,2),.5)}function Jg(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 ty(t,e,n,r,i){return(r=void 0===r?!0:r)&&t===e||i&&t===n||e<t&&t<n}var ey=function(e,n){return function(t){return e*(1-t)+n*t}};function ny(e,t){var i,a,o,s,n,r,l;return"number"==typeof e&&"number"==typeof t?ey(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]=ny(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=w(t,2),e=t[0],t=t[1];e in n?r[e]=ny(n[e],t):l[e]=t}),function(n){return Object.entries(r).forEach(function(t){var t=w(t,2),e=t[0],t=t[1];return l[e]=t(n)}),l}):function(t){return e}}function ry(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=w([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 zg(e,n,r-e,i-n)}function iy(n,t,e){function r(t){var e=w(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,f=u?e?[1,0]:[-1,0]:e?[0,1]:[0,-1],h=(s=w([0,0],2))[0],d=s[1],e=ry(o=t.map(function(t){var e=t.width,t=t.height,n=w([h,d],2),r=n[0],n=n[1],i=w([h+e*f[0],d+t*f[1]],2);return h=i[0],d=i[1],new zg(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 ry(s=o.map(function(t){var e=t.x,n=t.y,t=zg.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=zg.fromRect(t);return t.x=u?e:e+r(t),t.y=u?n+r(t):n,t}).map(function(t){var e,t=zg.fromRect(t);return t.x+=null!=(e=n.x)?e:0,t.y+=null!=(e=n.y)?e:0,t})}function ay(t,e,n){return[]}function oy(t,e){return[t[0]*e,t[1]*e]}function sy(t,e){return[t[0]+e[0],t[1]+e[1]]}function ly(t,e){return[t[0]-e[0],t[1]-e[1]]}function cy(t,e){return[Math.min(t[0],e[0]),Math.min(t[1],e[1])]}function uy(t,e){return[Math.max(t[0],e[0]),Math.max(t[1],e[1])]}function fy(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function hy(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 dy(t,e){e=Math.pow(10,e);return~~(t*e)/e}function py(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 gy(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=w(r,2))[0],l=r[1];for(var c=0,u=t.length;c<u;c+=1)s=cy(s,x=t[c]),l=uy(l,x)}for(var c=0,f=t.length;c<f;c+=1){var h,d,p,g,y,m,v,b,x=t[c];0!==c||n?c!==f-1||n?(h=t[[c?c-1:f-1,c-1][n?0:1]],m=[0,0],m=oy(m=ly(d=t[n?(c+1)%f:c+1],h),e),0!==(y=(p=fy(x,h))+(g=fy(x,d)))&&(p/=y,g/=y),y=oy(m,-p),m=oy(m,g),v=sy(x,y),b=cy(b=sy(x,m),uy(d,x)),b=uy(b,cy(d,x)),v=cy(v=sy(x,y=oy(y=ly(b,x),-p/g)),uy(h,x)),b=sy(x,m=oy(m=ly(x,v=uy(v,cy(h,x))),g/p)),o&&(v=cy(v=uy(v,s),l),b=cy(b=uy(b,s),l)),a.push(i),a.push(v),i=b):(v=x,a.push(i),a.push(v)):i=x}return n&&a.push(a.shift()),a}(r,.4,e,n),u=r.length,f=[],i=0;i<u-1;i+=1)o=c[2*i],s=c[2*i+1],f.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=w(r,1)[0],f.push(["C",o[0],o[1],s[0],s[1],l[0],l[1]])),f}var yy=["$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 my(t){var e,n,r={};for(e in t)n=e,yy.includes(n)&&(r[e]=t[e]);return r}function vy(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)}M.prototype.selectAll=function(t){return new M("string"==typeof t?this._parent.querySelectorAll(t):t,null,this._elements[0],this._document)},M.prototype.selectFacetAll=function(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new M(this._elements,null,this._parent,this._document,void 0,void 0,t)},M.prototype.select=function(t){t="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new M([t],null,t,this._document)},M.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=w(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 M(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 M(r,null,r[0],this._document)},M.prototype.maybeAppend=function(t,e){e=ue(this,by,"m",xy).call(this,"#"===t[0]?t:"#".concat(t),e);return e.attr("id",t),e},M.prototype.maybeAppendByClassName=function(t,e){t=t.toString(),e=ue(this,by,"m",xy).call(this,"."===t[0]?t:".".concat(t),e);return e.attr("className",t),e},M.prototype.maybeAppendByName=function(t,e){e=ue(this,by,"m",xy).call(this,'[name="'.concat(t,'"]'),e);return e.attr("name",t),e},M.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]})),f=new Map(this._facetElements.map(function(t,e){return[n(t.__data__,e),t]})),h=kc(this._elements,function(t){return e(t.__data__)}),d=0;d<t.length;d++){var p=t[d],g=n(p,d),y=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(f.has(g))(x=f.get(g)).__data__=p,x.__facet__=!0,o.push(x),f.delete(g);else if(h.has(g)){var m=h.get(g);l.push([p,m]);try{r=void 0;for(var v=function(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.")}(m),b=v.next();!b.done;b=v.next()){var x=b.value;s.delete(x)}}catch(t){r={error:t}}finally{try{b&&!b.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}h.delete(g)}else u.has(y)?((x=u.get(y)).__toData__?x.__toData__.push(p):x.__toData__=[p],c.add(x),s.delete(x)):a.push(p)}var w=[new M([],a,this._parent,this._document),new M(o,null,this._parent,this._document),new M(s,null,this._parent,this._document),new M([],l,this._parent,this._document),new M(c,null,this._parent,this._document)];return new M(this._elements,null,this._parent,this._document,w)},M.prototype.merge=function(t){var e=y(y([],w(this._elements),!1),w(t._elements),!1),t=y(y([],w(this._transitions),!1),w(t._transitions),!1);return new M(e,null,this._parent,this._document,void 0,t)},M.prototype.createElement=function(t){if(this._document)return this._document.createElement(t,{});var e=M.registry[t];if(e)return new e;throw e="Unknown node type: ".concat(t),new Error(e)},M.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)},M.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 M([],null,this._parent,this._document,void 0,this._transitions)},M.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},M.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))})},M.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))})},M.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=w(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))})})},M.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))})},M.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))})},M.prototype.transition=function(n){var r=this._transitions;return this.each(function(t,e){r[e]=n.call(this,t,e)})},M.prototype.on=function(t,e){return this.each(function(){this.addEventListener(t,e)}),this},M.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.call.apply(t,y([this._parent,this],w(e),!1)),this},M.prototype.node=function(){return this._elements[0]},M.prototype.nodes=function(){return this._elements},M.prototype.transitions=function(){return this._transitions.filter(function(t){return!!t})},M.prototype.parent=function(){return this._parent},by=new WeakSet,xy=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 M([t],null,this._parent,this._document)},M.registry={g:X.Group,rect:X.Rect,circle:X.Circle,path:X.Path,text:Bg,ellipse:X.Ellipse,image:X.Image,line:X.Line,polygon:X.Polygon,polyline:X.Polyline,html:X.HTML};var by,xy,wy,ky=M;function M(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=[]),by.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 O(t){return new ky([t],null,t,t.ownerDocument)}function My(t,e,n){return t.querySelector(e)?O(t).select(e):O(t).append(n)}function Oy(t){if($e(t))return[t,t,t,t];if(Ie(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 _y(t){var t=t.getLocalBounds(),t=w([t.min,t.max],2),e=w(t[0],2),n=e[0],e=e[1],t=w(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 Sy(t){return t.toString().charAt(0).toUpperCase()+t.toString().slice(1)}function Ey(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 _(t,r,i){void 0===i&&(i=!1);var a={};return Object.entries(t).forEach(function(t){var e,t=w(t,2),n=t[0],t=t[1];"className"!==n&&"class"!==n&&(n.startsWith("show")&&Ey(n,"show").startsWith(r)!==i?n===(e=r,"".concat("show").concat(Sy(e)))?a[n]=t:a[n.replace(new RegExp(Sy(r)),"")]=t:n.startsWith("show")||n.startsWith(r)===i||"filter"===(e=Ey(n,r))&&"function"==typeof t||(a[e]=t))}),a}function Ay(t,r){return Object.entries(t).reduce(function(t,e){var e=w(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(Sy(n))]=e,t},{})}function Ly(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=w(t,2),e=t[0],t=t[1];n.includes(e)||(-1!==r.indexOf(e)?a[e]=t:i[e]=t)}),[i,a]}function Ty(t,e,n,r){this.message=t,this.expected=e,this.found=n,this.location=r,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,Ty)}function Py(){this.constructor=wy}wy=Ty,Eo=Error,Py.prototype=Eo.prototype,wy.prototype=new Py,Ty.buildMessage=function(t,e){var a={literal:function(t){return'"'+r(t.text)+'"'},class:function(t){for(var e="",n=0;n<t.parts.length;n++)e+=t.parts[n]instanceof Array?i(t.parts[n][0])+"-"+i(t.parts[n][1]):i(t.parts[n]);return"["+(t.inverted?"^":"")+e+"]"},any:function(t){return"any character"},end:function(t){return"end of input"},other:function(t){return t.description}};function n(t){return t.charCodeAt(0).toString(16).toUpperCase()}function r(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}function i(t){return t.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}return"Expected "+function(t){for(var e,n,r=new Array(t.length),i=0;i<t.length;i++)r[i]=(n=t[i],a[n.type](n));if(r.sort(),0<r.length){for(e=i=1;i<r.length;i++)r[i-1]!==r[i]&&(r[e]=r[i],e++);r.length=e}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(t)+" but "+((t=e)?'"'+r(t)+'"':"end of input")+" found."};var Ny;var jy=on(function(t,e){var n=qe(t)?t:t.style.text.toString(),e=e||Cy(t),t=e.fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return(Ny=Ny||document.createElement("canvas").getContext("2d")).font=[a,e,i,"".concat(t,"px"),r].join(" "),Ny.measureText(n).width},function(t,e){return[qe(t)?t:t.style.text.toString(),Object.values(e||Cy(t)).join()].join("")}),Cy=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 Ry(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=w([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){}}t(Iy,By=X.CustomElement),Object.defineProperty(Iy.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=Cg(this)),this._offscreen},enumerable:!1,configurable:!0}),Object.defineProperty(Iy.prototype,"defaultOptions",{get:function(){return this._defaultOptions},enumerable:!1,configurable:!0}),Iy.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this),this.initialized=!0},Iy.prototype.disconnectedCallback=function(){var t;null!=(t=this._offscreen)&&t.destroy()},Iy.prototype.attributeChangedCallback=function(t){"visibility"===t&&!function(){Tg(this,"hidden"!==this.attributes.visibility)}.call(this)},Iy.prototype.update=function(t,e){return this.attr(Vg({},this.attributes,t=void 0===t?{}:t)),null==(t=this.render)?void 0:t.call(this,this.attributes,this,e)},Iy.prototype.clear=function(){this.removeChildren()},Iy.prototype.bindEvents=function(t,e){};var By,Ao=Iy;function Iy(t,e){t=By.call(this,Vg({},{style:e=void 0===e?{}:e},t))||this;return t.initialized=!1,t._defaultOptions=e,t}function Fy(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 Dy(t,e,n){return[["M",t,e+n],["L",t,e-n]]}function zy(t,e,n){return[["M",t-n,e],["L",t+n,e]]}Lo=Fy,Po=zy;function Wy(t){n="default",Fe(e=t)&&e instanceof Image?n="image":Ce(e)?n="symbol":qe(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}t(Vy,Gy=Ao),Vy.prototype.render=function(t,e){var r=t.symbol,n=t.size,i=void 0===n?16:n,a=et(t,["symbol","size"]),o=Wy(r);Jg(!!o,O(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=Ce(r)?r:Vy.getSymbol(r),t.styles(v({path:null==n?void 0:n(0,0,e)},a)))})})},Vy.MARKER_SYMBOL_MAP=new Map,Vy.registerSymbol=function(t,e){Vy.MARKER_SYMBOL_MAP.set(t,e)},Vy.getSymbol=function(t){return Vy.MARKER_SYMBOL_MAP.get(t)};var Gy,Hy=Vy;function Vy(){return null!==Gy&&Gy.apply(this,arguments)||this}Hy.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]]}),Hy.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),Hy.registerSymbol("line",Dy),Hy.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),Hy.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]]}),Hy.registerSymbol("circle",Fy),Hy.registerSymbol("point",Lo),Hy.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"]]}),Hy.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"]]}),Hy.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"]]}),Hy.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),Hy.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"]]}),Hy.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"]]}),Hy.registerSymbol("line",Dy),Hy.registerSymbol("dot",zy),Hy.registerSymbol("dash",Po),Hy.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]]}),Hy.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]]}),Hy.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]]}),Hy.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]]}),Hy.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]]});t($y,qy=Ao),$y.prototype.render=function(t,e){var n,r,i=t.padding,i=void 0===i?0:i,a=t.marker,o=t.text,s=t.radius,l=t.spacing,c=t.align,u=t.verticalAlign,f=_(t,"label"),t=_(t,"background"),i=w(Oy(i),4),h=i[0],d=i[1],p=i[2],i=i[3],g=My(e,".tag-content","g").attr("className","tag-content").style("zIndex",0).node(),y=a?{marker:a}:{symbol:"triangle",size:0},a=My(g,".tag-marker",function(){return new Hy({style:y})}).attr("className","tag-marker").call(function(t){t.node().clear()}).update(y).node(),l=(l=l,{x:(m=(a=a).getLocalBounds()).halfExtents[0]?m.max[0]+(l||0):a.style.x,y:m.halfExtents[1]?(m.min[1]+m.max[1])/2:a.style.y}),m=l.x,a=l.y,a=(O(g).maybeAppendByClassName("tag-text",function(){return new Bg}).styles(v(v({fontSize:12,text:b(o)?"":"".concat(o),x:m,y:a},f),{textBaseline:"middle"})).call(function(t){o||t.remove()}),l=i,m=h,a=c||"start",f=u||"top",u=(c=g).getLocalBounds(),r=n=0,"start"===a&&(n=l),"center"===a&&(n=-u.halfExtents[0]),"end"===a&&(n=-l-2*u.halfExtents[0]),"top"===f&&(r=m+u.halfExtents[1]),"middle"===f&&(r=0),"bottom"===f&&(r=m-2*u.halfExtents[1]),c.setLocalPosition([n,r]),g.getLocalBounds());O(e).maybeAppendByClassName("tag-background","rect").styles(v({zIndex:-1,y:a.min[1]-h,x:a.min[0]-i,width:null!==t?i+d+2*a.halfExtents[0]:0,height:null!==t?h+p+2*a.halfExtents[1]:0,radius:null!=s?s:2,fill:"#fafafa",stroke:"#d9d9d9",lineWidth:1},t))},$y.tag="tag";var qy,Yy=$y;function $y(t){return qy.call(this,t,{padding:4,spacing:4})||this}var Uy,Ky,Xy={small:{textFontSize:10,buttonWidth:40,buttonHeight:20,markerSize:8},middle:{textFontSize:12,buttonWidth:60,buttonHeight:30,markerSize:12},large:{textFontSize:16,buttonWidth:80,buttonHeight:40,markerSize:16}},Zy={primary:{default:{textFill:"#fff",buttonFill:"#1890ff",buttonLineWidth:0,markerFill:"#1890ff"},active:{buttonFill:"#40a9ff",markerFill:"#40a9ff"},disabled:{}},dashed:{default:{buttonFill:"transparent",buttonStroke:"#bbb",buttonLineDash:[5,5]},active:{},disabled:{}},link:{default:{textFill:"#1890ff",buttonFill:"transparent",buttonLineWidth:0,markerFill:"#1890ff"},active:{},disabled:{}},text:{default:{textFill:"#000",buttonFill:"transparent",buttonLineWidth:0,markerFill:"#000"},active:{},disabled:{}},default:{default:{textFill:"#000",buttonFill:"transparent",buttonStroke:"#bbb",markerFill:"#bbb"},active:{textFill:"#1890ff",buttonStroke:"#1890ff",markerStroke:"#1890ff"},disabled:{}}},Qy={strict:{textFill:"#b8b8b8"},buttonStroke:"#d9d9d9",buttonFill:"#f5f5f5",markerStroke:"#d9d9d9"};function Jy(t){var n=Uy.call(this,t,{cursor:"pointer",padding:10,size:"middle",type:"default",text:"",state:"default",markerAlign:"left",markerSpacing:5,default:{buttonLineWidth:1,buttonRadius:5},active:{}})||this;return n.state="default",n.clickEvents=function(){var t=n.attributes,e=t.onClick;"disabled"!==t.state&&null!=e&&e.call(n,n)},n.mouseenterEvent=function(){"disabled"!==n.attributes.state&&(n.state="active",n.render(n.attributes,n))},n.mouseleaveEvent=function(){var t=n.attributes.state;n.state=t,n.render(n.attributes,n)},n}function tm(t){return Ky.call(this,nt({},tm.defaultOptions,t))||this}t(Jy,Uy=Ao),Object.defineProperty(Jy.prototype,"markerSize",{get:function(){var t=this.attributes.markerSymbol,e=this.getStyle("marker");return t?(null==e?void 0:e.size)||2:0},enumerable:!1,configurable:!0}),Object.defineProperty(Jy.prototype,"textAvailableWidth",{get:function(){var t=this.attributes,e=t.markerSymbol,n=t.padding,r=t.ellipsis,i=t.width,t=t.markerSpacing;return r?(r=Je(i)?this.getStyle("button").width:i,e?r-2*n-t-this.markerSize:r-2*n):1/0},enumerable:!1,configurable:!0}),Object.defineProperty(Jy.prototype,"buttonHeight",{get:function(){var t=this.attributes.height;return t?+t:+this.getStyle("button").height},enumerable:!1,configurable:!0}),Jy.prototype.getStyle=function(t){var e=this.attributes,n=e.size,e=e.type,r=this.state,i=nt({},Xy[n],Zy[e][r],this.attributes.default,this.attributes[r]);return"disabled"===r&&(Object.keys(i).forEach(function(t){t in Qy&&(i[t]=Qy[t])}),Object.keys(Qy.strict).forEach(function(t){i[t]=Qy.strict[t]}),nt(i,this.attributes.disabled||{})),_(i,t)},Jy.prototype.render=function(t,e){var n=t.text,n=void 0===n?"":n,r=t.padding,r=void 0===r?0:r,i=t.markerSymbol,t=t.markerSpacing,t=void 0===t?0:t,r=(e.attr("cursor","disabled"===this.state?"not-allowed":"pointer"),w(Oy(r),4)),a=(r[0],r[1]),r=(r[2],r[3]),o=this.buttonHeight,s=this.getStyle("marker"),l=this.markerSize,c=v(v({},s),{symbol:i,x:r+l/2,y:o/2,size:l}),s=My(e,".marker",function(){return new Hy({className:"marker",style:c})}).update({style:c}).node().getLocalBounds(),i=this.getStyle("text"),s=(this.textShape=My(e,".text","text").attr("className","text").styles(v(v({x:l?s.max[0]+t:r,y:o/2},i),{text:n,textAlign:"left",textBaseline:"middle",wordWrap:!0,wordWrapWidth:this.textAvailableWidth,maxLines:1,textOverflow:"..."})).node(),this.textShape.getLocalBounds()),i=this.getStyle("button");O(e).maybeAppendByClassName(".background","rect").styles(v(v({zIndex:-1},i),{height:o,width:r+(l?l+t:0)+2*s.halfExtents[0]+a}))},Jy.prototype.update=function(t){this.attr(nt({},this.attributes,t=void 0===t?{}:t));t=this.attributes.state;this.state=t,this.render(this.attributes,this)},Jy.prototype.setState=function(t){this.update({state:t})},Jy.prototype.hide=function(){this.style.visibility="hidden"},Jy.prototype.show=function(){this.style.visibility="visible"},Jy.prototype.bindEvents=function(){this.addEventListener("click",this.clickEvents),this.addEventListener("mouseenter",this.mouseenterEvent),this.addEventListener("mouseleave",this.mouseleaveEvent)},Jy.tag="button",t(tm,Ky=Ao),tm.prototype.render=function(t,e){for(var n=t.x,r=t.y,c=t.items,i=(t.textStyle,t.padding),u=t.width,f=t.separator,i=w(Oy(void 0===i?0:i),3),a=i[0],h=i[1],i=i[2],d=_(t,"tag"),p=My(e,".container","g").styles({className:"container",x:n+i,y:r+a}),g=0,y=0,o=(p.node().removeChildren(),function(t){var e,n,r,i=c[t],a=new Yy({className:"breadcrumb-item",style:v(v(v(v({x:g,y:y},d),{text:b(i.text)?i.id:i.text}),(o=["marker"],null!==(e=i)&&We(e)?(n={},De(o,function(t){hn.call(e,t)&&(n[t]=e[t])}),n):{})),{padding:0})}),o=(p.append(function(){return a}),a.getLocalBounds()),s=2*o.halfExtents[0],o=2*o.halfExtents[1],s=(g+=s,b(u)||u-h<g&&(a.attr({x:0,y:y+o}),g=s,y+=o),m.bindInnerEvents(a,i),f||{}),i=s.spacing,i=void 0===i?0:i,l=s.text,l=void 0===l?"/":l,s=s.style;t!==c.length-1&&(r=new Bg({className:"".concat(tm.tag,"-separator"),id:"".concat(tm.tag,"-separator-").concat(t),style:v(v({x:g+i,y:y+o/2},s),{text:l,textAlign:"end",textBaseline:"middle"})}),p.append(function(){return r}),t=r.getLocalBounds(),g+=2*t.halfExtents[0]+i)}),m=this,s=0;s<c.length;s++)o(s)},tm.prototype.update=function(t){this.attr(nt({},this.attributes,t)),this.render(this.attributes,this)},tm.prototype.bindInnerEvents=function(t,e){var n=this.attributes,r=n.items,i=n.onClick;i&&t.addEventListener("click",function(){i.call(t,e.id,e,r)})},tm.tag="breadcrumb",tm.defaultOptions={style:{separator:{text:"/",style:{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"},spacing:8},textStyle:{default:{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"},active:{fill:"#5468ff",cursor:"pointer"}},padding:[8,8,8,8]}};t(rm,em=X.DisplayObject),rm.prototype.render=function(){var t=this.attributes.columns;O(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()})},rm.prototype.update=function(t){this.attr(Vg({},this.attributes,t)),this.render()},rm.prototype.clear=function(){this.removeChildren()};var em,nm=rm;function rm(t){var e=this,n=t.style,t=et(t,["style"]);return(e=em.call(this,nt({},{type:"column"},v({style:n},t)))||this).columnsGroup=new X.Group({name:"columns"}),e.appendChild(e.columnsGroup),e.render(),e}t(om,im=X.DisplayObject),om.prototype.render=function(){var t=this.attributes,e=t.lines,t=t.areas;e&&this.renderLines(e),t&&this.renderAreas(t)},om.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},om.prototype.update=function(t){this.attr(Vg({},this.attributes,t)),this.render()},om.prototype.renderLines=function(t){O(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()})},om.prototype.renderAreas=function(t){O(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 im,am=om;function om(t){var e=this,n=t.style,t=et(t,["style"]);return(e=im.call(this,nt({},{type:"lines"},v({style:n},t)))||this).linesGroup=e.appendChild(new X.Group),e.areasGroup=e.appendChild(new X.Group),e.render(),e}function sm(t,e){var n=(e=void 0===e?!1:e)?t.length-1:0,t=t.map(function(t,e){return y([e===n?"M":"L"],w(t),!1)});return e?t.reverse():t}function lm(t,e){if(void 0===e&&(e=!1),t.length<=2)return sm(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var a=e?t[r-i-1]:t[i];un(a,n.slice(-2))||n.push.apply(n,y([],w(a),!1))}var o=gy(n,!1);return e?o.unshift(y(["M"],w(t[r-1]),!1)):o.unshift(y(["M"],w(t[0]),!1)),o}function cm(t,e,n){t=rn(t);return t.push(["L",e,n],["L",0,n],["Z"]),t}function um(t){return 0===t.length?[0,0]:[He(function(t,e){if(Ie(t)){for(var n,r=1/0,i=0;i<t.length;i++){var a=t[i],o=Ce(e)?e(a):a[e];o<r&&(n=a,r=o)}return n}}(t,function(t){return He(t)||0})),Ge(function(t,e){if(Ie(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var a=t[i],o=Ce(e)?e(a):a[e];r<o&&(n=a,r=o)}return n}}(t,function(t){return Ge(t)||0}))]}function fm(t){for(var e=rn(t),n=e[0].length,t=w([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}t(pm,hm=Ao),Object.defineProperty(pm.prototype,"rawData",{get:function(){var t=this.attributes.data;return t&&0!==(null==t?void 0:t.length)?(t=rn(t),$e(t[0])?[t]:t):[[]]},enumerable:!1,configurable:!0}),Object.defineProperty(pm.prototype,"data",{get:function(){return this.attributes.isStack?fm(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(pm.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(pm.prototype,"baseline",{get:function(){var t=this.scales.y,e=w(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(pm.prototype,"containerShape",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty(pm.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,f,h,d,p=_(this.attributes,"area"),g=_(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=w(s.getOptions().range||[0,0],2))[0],c=u[1],l<c&&(u=w([l,c],2),c=u[0],l=u[1]),a=e.map(function(t){return t.map(function(t,e){return[o.map(e),Ye(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=lm(o),l=void 0,l=0===i?cm(s,e,n):(a=lm(t[i-1],!0),o=o[0],a[0][0]="L",y(y(y([],w(s),!1),w(a),!1),[y(["M"],w(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=sm(t[i]),s=void 0,s=0===i?cm(o,e,n):((a=sm(t[i-1],!0))[0][0]="L",y(y(y([],w(o),!1),w(a),!1),[["Z"]],!1));r.push(s)}return r})(a,t,e):(f=i,h=t,d=e,a.map(function(t){return cm((f?lm:sm)(t),h,d)}))),{lines:a.map(function(t,e){return v({stroke:n.getColor(e),path:(i?lm:sm)(t)},g)}),areas:u.map(function(t,e){return v({path:t,fill:n.getColor(e)},p)})})},enumerable:!1,configurable:!0}),Object.defineProperty(pm.prototype,"columnsStyle",{get:function(){var i=this,a=_(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=fm(s));var e=this.createScales(s),l=e.x,c=e.y,e=w(um(s),2),n=e[0],e=e[1],u=new Cp({domain:[0,e-(0<n?0:n)],range:[0,t]}),f=l.getBandWidth(),h=this.rawData;return{columns:s.map(function(t,r){return t.map(function(t,e){var n=f/s.length;return v(v({fill:i.getColor(r)},a),o?{x:l.map(e),y:c.map(t),width:f,height:u.map(h[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}),pm.prototype.render=function(t,e){this.container=My(e,".container","rect").attr("className","container").node();var n=t.type,r="spark".concat(n),i="line"===n?this.linesStyle:this.columnsStyle;this.spark=My(e,".".concat(r),function(){return new("line"===n?am:nm)({className:r,style:i})}).styles(i).node()},pm.prototype.getColor=function(t){var e=this.attributes.color;return Ie(e)?e[t%e.length]:Ce(e)?e.call(null,t):e},pm.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=w(um(t),2),c=l[0],l=l[1],c=new Cp({domain:[null!=(e=i[0])?e:c,null!=(e=i[1])?e:l],range:[o,0]});return"line"===r?{type:r,x:new Cp({domain:[0,t[0].length-1],range:[0,s]}),y:c}:{type:r,x:new kp({domain:t[0].map(function(t,e){return e}),range:[0,s],paddingInner:a?n:0}),y:c}},pm.tag="sparkline";var hm,dm=pm;function pm(t){return hm.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 gm(n){var e,r;return n?(e=["enter","update","exit"],r=Object.fromEntries(Object.entries(n).filter(function(t){t=w(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,v(v({},n[t]),r)]:[t,r]}))):{enter:!1,update:!1,exit:!1}}function ym(t,e){t?t.finished.then(e):e()}function mm(t,e){"update"in t?t.update(e):t.attr(e)}function vm(t,e,n){return 0===e.length?null:n?t.animate(e,n):(mm(t,{style:e.slice(-1)[0]}),null)}function bm(r,t,e){var i={},a={};return Object.entries(t).forEach(function(t){var e,t=w(t,2),n=t[0],t=t[1];b(t)||(e=r.style[n]||r.parsedStyle[n]||0)!==t&&(i[n]=e,a[n]=t)}),e?vm(r,[i,a],v({fill:"both"},e)):(mm(r,a),null)}function xm(t,e){return t.style.opacity||(t.style.opacity=1),bm(t,{opacity:0},e)}var wm,km={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},Mm={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},Om={orientation:"horizontal",showLabel:!0,type:"start"},_m=Hg({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track"},"slider"),Sm=Hg({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),Em=(t(Am,wm=Ao),Am.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=et(t,["size","radius","orientation"]),a=2.4*n,r=O(e).maybeAppendByClassName(Sm.iconRect,"rect").styles(v(v({},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(Sm.iconLine,"-1"),"line").styles(v({x1:o,x2:o,y1:l,y2:c},t)),r.maybeAppendByClassName("".concat(Sm.iconLine,"-2"),"line").styles(v({x1:s,x2:s,y1:l,y2:c},t)),r.node().setOrigin(n/2,a/2),"vertical"===i?e.setLocalEulerAngles(90):e.setLocalEulerAngles(0)},Am);function Am(){return null!==wm&&wm.apply(this,arguments)||this}t(Pm,Lm=Ao),Pm.prototype.renderLabel=function(t){var e=this,n=this.attributes.showLabel,r=w(Ly(_(this.attributes,"label"),[]),2),i=r[0],r=r[1];Jg(!!n,O(t).maybeAppendByClassName(Sm.labelGroup,"g").styles(r),function(t){e.label=t.maybeAppendByClassName(Sm.label,"text").styles(v(v({},Mm),i)),e.label.on("mousedown",function(t){t.stopPropagation()}),e.label.on("touchstart",function(t){t.stopPropagation()})})},Pm.prototype.renderIcon=function(t){var e=this.attributes.orientation,n=v(v({orientation:e},km),_(this.attributes,"icon")),e=this.attributes.iconShape,r=void 0===e?function(){return new Em({style:n})}:e;O(t).maybeAppendByClassName(Sm.iconGroup,"g").selectAll(Sm.icon.class).data([r]).join(function(t){return t.append(r).attr("className",Sm.icon.name)},function(t){return t.update(n)},function(t){return t.remove()})},Pm.prototype.render=function(t,e){this.renderIcon(e),this.renderLabel(e)};var Lm,Tm=Pm;function Pm(t){return Lm.call(this,t,Om)||this}t(Cm,Nm=Ao),Object.defineProperty(Cm.prototype,"values",{get:function(){return this.attributes.values},set:function(t){this.attributes.values=this.clampValues(t)},enumerable:!1,configurable:!0}),Object.defineProperty(Cm.prototype,"sparklineStyle",{get:function(){var t;return"horizontal"!==this.attributes.orientation?null:(t=_(this.attributes,"sparkline"),v(v({zIndex:0},this.availableSpace),t))},enumerable:!1,configurable:!0}),Object.defineProperty(Cm.prototype,"shape",{get:function(){var t=this.attributes,e=t.trackLength,t=t.trackSize,t=w(this.getOrientVal([[e,t],[t,e]]),2);return{width:t[0],height:t[1]}},enumerable:!1,configurable:!0}),Object.defineProperty(Cm.prototype,"availableSpace",{get:function(){var t=w(Oy(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}),Cm.prototype.getValues=function(){return this.values},Cm.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;bm(this.selectionShape.node(),this.selectionStyle,t),this.updateHandlesPosition(t)},Cm.prototype.updateHandlesPosition=function(t){this.attributes.showHandle&&(bm(this.startHandle,this.getHandleStyle("start"),t),bm(this.endHandle,this.getHandleStyle("end"),t))},Cm.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)},Cm.prototype.renderTrack=function(t){var e=this.attributes.brushable,n=_(this.attributes,"track");this.trackShape=O(t).maybeAppendByClassName(_m.track,"rect").styles(v(v({cursor:e?"crosshair":"default"},this.shape),n))},Cm.prototype.renderSparkline=function(t){var n=this;Jg("horizontal"===this.attributes.orientation,O(t).maybeAppendByClassName(_m.sparklineGroup,"g"),function(t){var e=n.sparklineStyle;t.maybeAppendByClassName(_m.sparkline,function(){return new dm({style:e})}).update(e)})},Object.defineProperty(Cm.prototype,"selectionStyle",{get:function(){var t=_(this.attributes,"selection");return v(v({},t),this.calcMask())},enumerable:!1,configurable:!0}),Cm.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(_m.handle.class).data(n,function(t){return t.type}).join(function(t){return t.append(function(t){t=t.type;return new Tm({style:e.getHandleStyle(t)})}).each(function(t){var e=t.type,t=(this.attr("class","".concat(_m.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()})},Cm.prototype.renderSelection=function(t){this.foregroundGroup=O(t).maybeAppendByClassName(_m.foreground,"g"),this.selectionShape=this.foregroundGroup.maybeAppendByClassName(_m.selection,"rect").styles(this.selectionStyle),this.renderHandles()},Cm.prototype.render=function(t,e){this.renderTrack(e),this.renderSparkline(e),this.renderSelection(e)},Cm.prototype.clampValues=function(t,e){void 0===e&&(e=4);var n=w(this.range,2),r=n[0],n=n[1],i=w(this.getValues().map(function(t){return dy(t,e)}),2),a=i[0],i=i[1],t=w((t||[a,i]).map(function(t){return dy(t,e)}),2),o=t[0],t=t[1],s=(t<o&&(o=(s=w([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]},Cm.prototype.calcMask=function(t){var t=w(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}])},Cm.prototype.calcHandlePosition=function(t){var e=this.availableSpace,n=e.x,r=e.y,i=e.width,e=e.height,a=w(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])}},Cm.prototype.calcHandleText=function(t){var e,n=this.attributes,r=n.orientation,n=n.formatter,i=_(this.attributes,"handle"),a=_(i,"label"),i=i.spacing,o=this.getHandleSize(),s=this.clampValues(),l=this.availableSpace,c=l.width,l=l.height,u=this.calcMask(),f=u.x,h=u.y,d=u.width,u=u.height,n=n("start"===t?s[0]:s[1]),s=new Bg({style:v(v({},a),{text:n})}),a=s.getBBox(),p=a.width,a=a.height,s=(s.destroy(),0),g=0;return"horizontal"===r?(e=(r=i+o)+p/2,s="start"===t?0<f-r-p?-e:e:p<c-f-d-r?e:-e):(e=i+o,g="start"===t?a<h-o?-e:e:a<l-h-u-o?e:-e),{x:s,y:g,text:n}},Cm.prototype.getHandleLabelStyle=function(t){var e;return this.attributes.showLabel?(e=_(this.attributes,"handleLabel"),v(v({},e),this.calcHandleText(t))):{}},Cm.prototype.getHandleIconStyle=function(){var t=this.attributes.handleIconShape,e=_(this.attributes,"handleIcon"),n=this.getOrientVal(["ew-resize","ns-resize"]),r=this.getHandleSize();return v({cursor:n,shape:t,size:r},e)},Cm.prototype.getHandleStyle=function(t){var e=this.attributes,n=e.showLabel,e=e.orientation,r=this.calcHandlePosition(t),i=this.calcHandleText(t);return v(v(v(v({},Ay(this.getHandleIconStyle(),"icon")),Ay(v(v({},this.getHandleLabelStyle(t)),i),"label")),r),{orientation:e,showLabel:n,type:t,zIndex:3})},Cm.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)},Cm.prototype.getOrientVal=function(t){var t=w(t,2),e=t[0],t=t[1];return"horizontal"===this.attributes.orientation?e:t},Cm.prototype.setValuesOffset=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!1);var r=w(this.getValues(),2),t=[r[0]+t,r[1]+e].sort();n?this.setValues(t):this.innerSetValues(t,!0)},Cm.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,e=e.height;return t/this.getOrientVal([n,e])},Cm.prototype.dispatchCustomEvent=function(t,e,n){var r=this;t.on(e,function(t){t.stopPropagation(),r.dispatchEvent(new X.CustomEvent(n,{detail:t}))})},Cm.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"))},Cm.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))},Cm.tag="slider";var Nm,jm=Cm;function Cm(t){var a=Nm.call(this,t,v(v(v({animate:{duration:100,fill:"both"},brushable:!0,formatter:function(t){return t.toString()},handleSpacing:2,orientation:"horizontal",padding: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]},Ay(Om,"handle")),Ay(km,"handleIcon")),Ay(Mm,"handleLabel")))||this;return a.range=[0,1],a.onDragStart=function(i){return function(t){t.stopPropagation(),a.target=i,a.prevPos=a.getOrientVal(Ug(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(Ug(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 X.CustomEvent("valuechange",{detail:{oldValue:t,value:a.getValues()}});a.dispatchEvent(t)},a.selectionStartPos=0,a.selectionWidth=0,a.prevPos=0,a.target="",a}t(Im,Rm=Ao),Object.defineProperty(Im.prototype,"padding",{get:function(){return Oy(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(Im.prototype,"value",{get:function(){var t=this.attributes.value,e=w(this.range,2),n=e[0],e=e[1];return Ye(t,n,e)},enumerable:!1,configurable:!0}),Object.defineProperty(Im.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(Im.prototype,"availableSpace",{get:function(){var t=this.attributes.trackSize,e=this.trackLength,n=w(this.padding,4),r=n[0],i=n[1],a=n[2],n=n[3],t=w(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(Im.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(Im.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}),Im.prototype.getValues=function(t){void 0===t&&(t=this.value);var e=this.attributes,e=e.viewportLength/e.contentLength,n=w(this.range,2),r=n[0],t=t*(n[1]-r-e);return[t,t+e]},Im.prototype.getValue=function(){return this.value},Im.prototype.renderSlider=function(t){var e=this.attributes,n=e.orientation,r=e.trackSize,i=e.padding,e=e.slidable,a=_(this.attributes,"track"),o=_(this.attributes,"thumb"),s=v(v({brushable:!1,orientation:n,padding:i,selectionRadius:this.thumbRadius,showHandle:!1,slidable:e,trackLength:this.trackLength,trackRadius:this.trackRadius,trackSize:r,values:this.getValues()},Ay(a,"track")),Ay(o,"selection"));this.slider=O(t).maybeAppendByClassName("scrollbar",function(){return new jm({style:s})}).update(s).node()},Im.prototype.render=function(t,e){this.renderSlider(e)},Im.prototype.setValue=function(t,e){void 0===e&&(e=!1);var n=this.attributes.value,r=w(this.range,2),i=r[0],r=r[1];this.slider.setValues(this.getValues(Ye(t,i,r)),e),this.onValueChange(n)},Im.prototype.bindEvents=function(){var e=this;this.slider.addEventListener("trackClick",function(t){t.stopPropagation(),e.onTrackClick(t.detail)}),this.onHover()},Im.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orientation?t[0]:t[1]},Im.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)},Im.tag="scrollbar";var Rm,Bm=Im;function Im(t){var a=Rm.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 X.CustomEvent("scroll",t={detail:{oldValue:t,value:e}})),a.dispatchEvent(new X.CustomEvent("valuechange",t)))},a.onTrackClick=function(t){var e,n,r,i;a.attributes.slidable&&(r=(e=w(a.getLocalPosition(),2))[0],e=e[1],n=(i=w(a.padding,4))[0],i=i[3],r=a.getOrientVal([r+i,e+n]),i=(a.getOrientVal(Ug(t))-r)/a.trackLength,a.setValue(i,!0))},a.onThumbMouseenter=function(t){a.dispatchEvent(new X.CustomEvent("thumbMouseenter",{detail:t.detail}))},a.onTrackMouseenter=function(t){a.dispatchEvent(new X.CustomEvent("trackMouseenter",{detail:t.detail}))},a.onThumbMouseleave=function(t){a.dispatchEvent(new X.CustomEvent("thumbMouseleave",{detail:t.detail}))},a.onTrackMouseleave=function(t){a.dispatchEvent(new X.CustomEvent("trackMouseleave",{detail:t.detail}))},a}var Fm={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",titleFill:"black",titleFontSize:12,titlePosition:"lb",titleSpacing:0,titleTextAlign:"center",titleTextBaseline:"middle",lineArrow:function(){return new X.Path({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:[]},Dm=(nt({},Fm,{style:{type:"arc"}}),nt({},Fm,{style:{}}),Hg({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")),zm=Hg({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function Wm(t){return t.reduce(function(t,e,n){return t.push(y([0===n?"M":"L"],w(e),!1)),t},[])}function Gm(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)?Wm(r):e?(i=fy(r[0],e),a=n?0:1,r.reduce(function(t,e,n){return 0===n?t.push(y(["M"],w(e),!1)):t.push(y(["A",i,i,0,0,a],w(e),!1)),t},[])):[]):Wm(t)}function Hm(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=w([Gm(t,n),Gm(e.slice().reverse(),n,!0)],2),l=n[0],c=n[1],n=w([t[0],e.slice(-1)[0]],2),t=n[0],e=n[1];if("line"===a||"surround"===i)return r([y(["L"],w(e),!1)],[y(["L"],w(t),!1)]);if(o)return a=(n=w([fy(e,o),fy(t,o)],2))[0],i=n[1],r([y(["A",a,a,0,0,1],w(e),!1),y(["L"],w(e),!1)],[y(["A",i,i,0,0,0],w(t),!1),y(["L"],w(t),!1)]);throw new Error("Arc grid need to specified center")}function Vm(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=w([e[l].points,e[l+1].points],2),c=Hm(c[0],c[1],n);s.push({path:c,fill:o[l%o.length]})}return t.selectAll(zm.region.class).data(s,function(t,e){return e}).join(function(t){return t.append("path").each(function(t,e){t=Gg(t,[t,e,s]);this.attr(t)}).attr("className",zm.region.name)},function(t){return t.transition(function(t,e){return bm(this,Gg(t,[t,e,s]),r.update)})},function(t){return t.transition(function(){var t=this,e=xm(this,r.exit);return ym(e,function(){return t.remove()}),e})}).transitions()}t($m,qm=Ao),$m.prototype.render=function(t,e){t.type,t.center,t.areaFill,t.closed;var n,r,i,a,o=et(t,["type","center","areaFill","closed"]),s=(s=void 0===(s=t.data)?[]:s,t.closed?s.map(function(t){var e=t.points,n=w(e,1)[0];return v(v({},t),{points:y(y([],w(e),!1),[n],!1)})}):s),l=O(e).maybeAppendByClassName(zm.lineGroup,"g"),e=O(e).maybeAppendByClassName(zm.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:Gm(t.points,n)}}),l.selectAll(zm.line.class).data(a,function(t){return t.id}).join(function(t){return t.append("path").each(function(t,e){t=Gg(my(v({path:t.path},r)),[t,e,a]);this.attr(v({class:zm.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4]},t))})},function(t){return t.each(function(t,e){bm(this,Gg(my(v({path:t.path},r)),[t,e,a]),i.update)})},function(t){return t.transition(function(){var t=this,e=xm(this,i.exit);return ym(e,function(){return t.remove()}),e})}).transitions()),l=Vm(e,s,t);return y(y([],w(o),!1),w(l),!1)};var qm,Ym=$m;function $m(){return null!==qm&&qm.apply(this,arguments)||this}function Um(t,e){return Object.fromEntries(Object.entries(t).map(function(t){t=w(t,2);return[t[0],Gg(t[1],e)]}))}function Km(t,e){return e&&Ce(e)?t.filter(e):t}var Xm=on(function(t,e){var n=e.startAngle;return(e.endAngle-n)*t+n},function(t,e){return[t,e.startAngle,e.endAngle].join()}),Zm=on(function(t,e){var n,r,i;return"linear"===e.type?(r=(n=w(e.startPos,2))[0],n=n[1],i=w(e.endPos,2),hy([(r=w([i[0]-r,i[1]-n],2))[0],r[1]])):(i=Fg(Xm(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,y(y([],w(a),!1),w(r),!1)):(a=n.startAngle,r=n.endAngle,i=n.center,n=n.radius,y(y([a,r],w(i),!1),[n],!1));return"arc"===e.type&&a.push(t),a.join()});function Qm(t,e,n){t=Zm(t,n);return n=t,"positive"!==e?[n[1],-n[0]]:[-n[1],n[0]]}var Jm=on(function(t,e){var n=w(e.startPos,2),r=n[0],n=n[1],e=w(e.endPos,2),e=w([e[0]-r,e[1]-n],2);return[r+e[0]*t,n+e[1]*t]},function(t,e){return y(y([t],w(e.startPos),!1),w(e.endPos),!1).join()}),tv=on(function(t,e){var n=e.radius,r=w(e.center,2),i=r[0],r=r[1],t=Fg(Xm(t,e));return[i+n*Math.cos(t),r+n*Math.sin(t)]},function(t,e){return y([t,e.startAngle,e.endAngle,e.radius],w(e.center),!1).join()});function ev(t,e){return("linear"===e.type?Jm:tv)(t,e)}function nv(t,e){return e-t==360}function rv(t,e,n,r,i){function a(t){return[n+i*Math.cos(t),r+i*Math.sin(t)]}var o=e-t,s=w([i,i],2),l=s[0],s=s[1],c=w([Fg(t),Fg(e)],2),u=c[0],c=c[1],f=w(a(u),2),h=f[0],f=f[1],d=w(a(c),2),p=d[0],d=d[1];return nv(t,e)?[["M",h,f],["A",l,s,0,1,0,(c=w(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(h,",").concat(f,",A").concat(l,",").concat(s,",0,").concat(u,",").concat(c,",").concat(p,",").concat(d))}function iv(t,e,n,s){var l=e.startAngle,c=e.endAngle,u=e.center,f=e.radius;return t.selectAll(Dm.line.class).data([{path:rv.apply(void 0,y(y([l,c],w(u),!1),[f],!1))}],function(t,e){return e}).join(function(t){return t.append("path").attr("className",Dm.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=y(y([o,e],w(n),!1),[i],!1),e=y(y([l,c],w(u),!1),[f],!1),(n=s.update)?(i=void 0===(i=n.duration)?0:i,r=ny(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,v({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=rv.apply(void 0,y([],w(t),!1))},o.onfinish=i),o}).styles(e)},function(t){return t.remove()}).styles(n).transitions()}function av(t){var t=w(t,2),e=w(t[0],2),n=e[0],e=e[1],t=w(t[1],2);return{x1:n,y1:e,x2:t[0],y2:t[1]}}function ov(e,t,n,r){function i(t){return e.selectAll(Dm.line.class).data(t,function(t,e){return e}).join(function(t){return t.append("line").attr("className",function(t){return"".concat(Dm.line.name," ").concat(t.className)}).styles(n).transition(function(t){return bm(this,av(t.line),!1)})},function(t){return t.styles(n).transition(function(t){return bm(this,av(t.line),r.update)})},function(t){return t.remove()}).transitions()}var a,o,s,l=t.showTrunc,c=t.startPos,u=t.endPos,f=t.truncRange,h=t.lineExtension,d=w([c,u],2),p=w(d[0],2),g=p[0],p=p[1],d=w(d[1],2),y=d[0],d=d[1],u=w(h?(c=w([c=c,u=u,h=void 0===(h=h)?[0,0]:h],3),h=(u=w(c[0],2))[0],u=u[1],m=(a=w(c[1],2))[0],a=a[1],v=(c=w(c[2],2))[0],c=c[1],h=(m=w([m-h,a-u],2))[0],a=m[1],u=Math.sqrt(Math.pow(h,2)+Math.pow(a,2)),v=(m=w([-v/u,c/u],2))[0],c=m[1],[v*h,v*a,c*h,c*a]):new Array(4).fill(0),4),m=u[0],v=u[1],h=u[2],c=u[3];return l&&f?(u=(a=w(f,2))[0],l=a[1],o=(u=w([g+(f=y-g)*u,p+(s=d-p)*u],2))[0],u=u[1],s=(f=w([g+f*l,p+s*l],2))[0],l=f[1],f=i([{line:[[g+m,p+v],[o,u]],className:Dm.lineFirst.name},{line:[[s,l],[y+h,d+c]],className:Dm.lineSecond.name}]),t.truncRange,t.truncShape,t.lineExtension,f):i([{line:[[g+m,p+v],[y+h,d+c]],className:Dm.line.name}])}function sv(t,e,n){var r,i,a,o,s,l=e.type,c=_(e,"line"),n=("linear"===l?ov:iv)(t,e,py(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(Dm.lineSecond.class):t.select(Dm.line.class),!r||!a||"arc"===e.type&&nv(e.startAngle,e.endAngle)?(i=l.node())&&(i.style.markerEnd=void 0):((t=Kg(a)).attr(c),vy(t,s,!0),l.style("markerEnd",t).style("markerEndOffset",-o)),n}function lv(t){var e=t.type,n=t.gridCenter;return"linear"===e?n:n||t.center}function cv(t,i){var a=i.gridLength;return t.map(function(t,e){var t=t.value,n=w(ev(t,i),2),r=n[0],n=n[1],t=w(oy(Qm(t,i.gridDirection,i),a),2);return{id:e,points:[[r,n],[r+t[0],n+t[1]]]}})}function uv(t,e,n,r){var i=_(n,"grid"),a=i.type,o=i.areaFill,s=lv(n),l=Km(e,n.gridFilter),e=("segment"===a?cv:function(t,o){var s,l,c=o.gridControlAngles,e=lv(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=w(e,2),s=e[0],l=e[1],t.map(function(t,e){var t=w(ev(t.value,o),2),n=t[0],t=t[1],n=w([n-s,t-l],2),r=n[0],i=n[1],a=[];return c.forEach(function(t){var t=Fg(t),t=w([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=v(v({},i),{center:s,areaFill:Ce(o)?l.map(function(t,e){return Gg(o,[t,e,l])}):o,animate:r,data:e});return t.selectAll(Dm.grid.class).data([1]).join(function(t){return t.append(function(){return new Ym({style:c})}).attr("className",Dm.grid.name)},function(t){return t.transition(function(){return this.update(c)})},function(t){return t.remove()}).transitions()}Object.defineProperty(hv.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(hv.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(hv.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(hv.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(hv.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(hv.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),hv.prototype.clear=function(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},hv.prototype.empty=function(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},hv.prototype.add=function(t,e){return t<this.x1&&(this.x1=t),e<this.y1&&(this.y1=e),t>this.x2&&(this.x2=t),e>this.y2&&(this.y2=e),this},hv.prototype.rotate=function(t,e,n){t=this.rotatedPoints(t,e,n);return this.clear().add(t[0],t[1]).add(t[2],t[3]).add(t[4],t[5]).add(t[6],t[7])},hv.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*i+l,t*r+s*i+e],[s*r-t*o+l,t*r+s*o+e],[s*a-t*o+l,t*a+s*o+e],[s*a-t*i+l,t*a+s*i+e]].flat(1)},hv.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},hv.prototype.intersects=function(t){return t&&!(this.x2<t.x1||this.x1>t.x2||this.y2<t.y1||this.y1>t.y2)},hv.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE};var fv=hv;function hv(t){var t=t||{},e=t.left,n=t.top,r=t.right,t=t.bottom;this.x1=null!=e?e:+Number.MAX_VALUE,this.x2=null!=r?r:-Number.MAX_VALUE,this.y1=null!=n?n:+Number.MAX_VALUE,this.y2=null!=t?t:-Number.MAX_VALUE}function dv(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=w(e=c,4))[0],r=e[1],i=e[2],e=e[3],a=(t=w(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 pv(t,e){void 0===e&&(e=[0,0,0,0]);var n=t.getEulerAngles()||0,r=(t.setEulerAngles(0),t.getLocalBounds()),i=w(r.min,2),a=i[0],i=i[1],r=w(r.max,2),o=r[0],r=r[1],s=t.getBBox(),l=s.width,s=s.height,c=0,u=0,f=a,h=i,d=("text"===t.tagName&&(s-=1.5,d=t.style.textAlign,p=t.style.textBaseline,c=+t.style.dx,u=+t.style.dy,"center"===d?f=(a+o)/2:"right"!==d&&"end"!==d||(f=o),"middle"===p?h=(i+r)/2:"bottom"!==p&&"baseline"!==p||(h=r)),w(e,4)),o=d[0],p=void 0===o?0:o,r=d[1],e=void 0===r?0:r,o=d[2],r=void 0===o?p:o,o=d[3],d=void 0===o?e:o,o=new fv;return o.set((c+=a)-d,(u+=i)-p,c+l+e,u+s+r),t.setEulerAngles(n),o.rotatedPoints(Fg(n),f,h)}function gv(t,a){var o;return y([],w(t.reduce(function(t,e,n){return n&&o&&(n=e,r=pv(r=o,i=a),dv(n=pv(n,i),[r[0],r[1],r[2],r[3]])||dv(n,[r[0],r[1],r[4],r[5]])||dv(n,[r[4],r[5],r[6],r[7]])||dv(n,[r[2],r[3],r[6],r[7]]))?(t.add(o),t.add(e)):o=e,t;var r,i},new Set)),!1)}function yv(t,e){return void 0===e&&(e={}),b(t)?0:"number"==typeof t?t:Math.floor(jy(t,e))}var mv=function(t,e){var e=e.seq,n=void 0===e?2:e;return t.filter(function(t,e){return!(e%n&&(Lg(t),1))})};var vv=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=mv,u=function(t){return t.forEach(r.show),t},f=2,h=t.slice(),d=t.slice(),p=Math.min.apply(Math,y([1],w(t.map(function(t){return t.getBBox().width})),!1));for("linear"!==n.type||0!==Zm(0,n)[1]&&0!==Zm(0,n)[0]||(n=_y(t[0]).left,t=_y(t[i-1]).right,t=Math.abs(t-n)||1,f=Math.max(Math.floor(i*p/t),f)),a&&(s=h.splice(0,1)[0]),o&&(l=h.splice(-1,1)[0],h.reverse()),u(h);gv((l?y(y([l],w(d),!1),[s],!1):y([s],w(d),!1)).filter(Yg),null==e?void 0:e.margin).length;)(l&&!s&&f%2==0||l&&s)&&h.splice(0,1).forEach(r.hide),d=c(u(h),{seq:f}),f++}}],["rotate",function(t,e,n,r){for(var i=void 0===(o=e.optionalAngles)?[0,45,90]:o,a=e.margin,e=void 0===(o=e.recoverWhenFailed)||o,o=t.map(function(t){return t.getLocalEulerAngles()}),s=function(n){return t.forEach(function(t,e){e=Ie(n)?n[e]:n;r.rotate(t,+e)})},l=0;l<i.length;l++)if(s(i[l]),gv(t,a).length<1)return;e&&s(o)}],["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=Cy(r.getTextShape(t[0])),c=yv(s,e),u=a?yv(a,e):c,s=yv(o,e),f=(!b(s)&&s!==1/0||(s=Math.max.apply(null,t.map(function(t){return t.getBBox().width}))),t.slice()),h=((a=w(l,4))[0],a[1],a[2],a[3],s);u+c<h;h-=c){var d=function(e){if(f.forEach(function(t){r.ellipsis(r.getTextShape(t),e,i)}),(f=gv(t,l)).length<1)return{value:void 0}}(h);if("object"==typeof d)return d.value}}]]);function bv(r,i,a){var t=i.labelOverlap,t=void 0===t?[]:t;t.length&&t.forEach(function(t){var e=t.type,n=vv.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||1<t.map(function(t){return t.querySelector("text")}).length}(r,i,e)||null==n||n(r,t,i,a)})}function xv(t){for(var e=t;e<0;)e+=360;return Math.round(e%360)}var wv=on(function(t,e){var t=w(t,2),n=t[0],t=t[1],e=w(e,2),r=e[0],e=e[1],n=w([n*r+t*e,n*e-t*r],2),e=n[0],t=n[1];return Math.atan2(t,e)},function(t,e){return y(y([],w(t),!1),w(e),!1).join()});function kv(t,e){return Qm(t,e.labelDirection,e)}function Mv(t,e,n){var r,i=n.labelAlign;return(null==(r=e.style.transform)?void 0:r.includes("rotate"))?e.getLocalEulerAngles():(r=0,e=kv(t.value,n),t=Zm(t.value,n),"horizontal"===i?0:(r="perpendicular"===i?wv([1,0],e):wv([t[0]<0?-1:1,0],t),ty(n=((n=Dg(r))+360)%180,-90,90)||(n+=180),n))}function Ov(t,e,n){var r=n.type,i=n.labelAlign,t=kv(t,n),n=xv(e),e=xv(Dg(wv([1,0],t)));if([90,270].includes(e)&&!n)return"middle";if(!(e%180)&&[90,270].includes(n))return"middle";if("linear"!==r)return"parallel"===i?"middle":ty(n,90,270)?ty(e,90,270)?"start":"end":ty(e,90,270)?"end":"start";if(0===e){if(ty(n,0,90,!1,!0))return"start";if(ty(n,0,90)||ty(n,270,360))return"start"}if(90===e){if(ty(n,0,90,!1,!0))return"start";if(ty(n,90,180)||ty(n,270,360))return"end"}if(270===e){if(ty(n,0,90,!1,!0))return"end";if(ty(n,90,180)||ty(n,270,360))return"start"}if(180===e){if(90===n)return"start";if(ty(n,0,90)||ty(n,270,360))return"end"}return"start"}function _v(t,e,n){var r=n.showTick,i=n.tickLength,a=n.tickDirection,o=n.labelDirection,s=n.labelSpacing,l=e.indexOf(t),s=Gg(s,[t,l,e]),o=w([kv(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=w(sy(oy(o[0],s+(1===o[1]?Gg(r?i:0,[t,l,e]):0)),ev(t.value,n)),2);return{x:a[0],y:a[1]}}function Sv(t,e){"text"===t.nodeName&&t.attr(e)}function Ev(r){bv(this.node().childNodes,r,{hide:Lg,show:Ag,rotate:function(t,e){var n;e=+e,n=r,(t=t).setLocalEulerAngles(e),e=Ov(t.__data__.value,e,n),(n=t.querySelector(Dm.labelItem.class))&&Sv(n,{textAlign:e})},ellipsis:function(t,e,n){void 0===e&&(e=1/0),t&&$g(t,e,n)},getTextShape:function(t){return t.querySelector("text")}})}function Av(t,e,n,r,i){var a,o,s,l,c,u=n.indexOf(e),f=O(t).append((a=e,o=u,s=n,c=(l=i).labelFormatter,Ce(c)?function(){return Kg(Gg(c,[a,o,s,kv(a.value,l)]))}:function(){return Kg(a.label||"")})).attr("className",Dm.labelItem.name).node(),r=w(Ly(Um(r,[e,u,n])),2),u=r[0],n=r[1],r=n.transform,n=et(n,["transform"]),h=(Ry(t,r),Mv(e,t,i));return t.setLocalEulerAngles(+h),Sv(f,v({textAlign:Ov(e.value,h,i),textBaseline:"middle"},u)),Ry(t,r),t.attr(n),f}function Lv(n,h,d,p){var t=Km(h,d.labelFilter),g=_(d,"label");return n.selectAll(Dm.label.class).data(t,function(t,e){return e}).join(function(t){return t.append("g").attr("className",Dm.label.name).transition(function(t){return Av(this,t,h,g,d),this.attr(_v(t,h,d)),null}).call(function(){return Ev.call(n,d)})},function(t){return t.transition(function(t){var e,n,r,i,a,o,s,l=this.querySelector(Dm.labelItem.class),c=Av(this,t,h,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=w((s=function(t){var e,n;return"circle"===t.nodeName?(n=(e=w(t.getLocalPosition(),2))[0],e=e[1],[n-(n=t.attr("r")),e-n]):t.getLocalPosition()})(e),2))[0],u=u[1],s=w(s(n),2),s=(o=w([(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,")")}],v(v({fill:"both"},l),{duration:i+a+c})),ym(s=n.animate([{opacity:0,transform:"translate(".concat(-s,", ").concat(-u,")"),offset:.01},{opacity:1,transform:"translate(0, 0)"}],v(v({fill:"both"},l),{duration:a+c,delay:i+a-c})),f),[o,s]):(f(),[null]));function f(){"destroy"===r?e.destroy():"hide"===r&&Lg(e),n.isVisible()&&Ag(n)}l=bm(this,_v(t,h,d),p.update);return y(y([],w(u),!1),[l],!1)}).call(function(t){var e,t=fn(t,"_transitions").flat().filter(Yg);e=function(){return Ev.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=xm(this,p.exit);return ym(e,function(){return O(t).remove()}),e})}).transitions()}function Tv(t,e){return Qm(t,e.tickDirection,e)}var Pv=on(function(t,e){t=w(t,2);return[[0,0],[t[0]*e,t[1]*e]]},function(t,e){return y(y([],w(t),!1),[e],!1).join()});function Nv(t,e,n,r,i,a,o){var s=Tv(t.value,a),a=(c=t,u=e,f=n,l=s,a=(a=a).tickLength,l=w(Pv(l,Gg(a,[c,u,f])),2),a=w(l[0],2),c=a[0],u=a[1],f=w(l[1],2),{x1:c,x2:f[0],y1:u,y2:f[1]}),l=a.x1,c=a.x2,u=a.y1,f=a.y2,a=w(Ly(Um(o,[t,e,n,s])),2),o=a[0],t=a[1];"line"===r.node().nodeName&&r.styles(v({x1:l,x2:c,y1:u,y2:f},o)),i.attr(t),r.styles(o)}function jv(t,e,n,r,i,a){o=O(this),s=t,l=e,c=n,f=(u=r).tickFormatter,h=Tv(s.value,u),u="line",Ce(f)&&(u=function(){return Gg(f,[s,l,c,h])});Nv(t,e,n,o.append(u).attr("className",Dm.tickItem.name),this,r,i);var o,s,l,c,u,f,h,e=w(ev(t.value,r),2);return bm(this,{x:e[0],y:e[1]},a)}var Cv=Hg({text:"text"},"title");function Rv(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(t){return t[0]}):2<t.length?[t[0]]:t.split("")}function Bv(r,t){t=Object.entries(t).reduce(function(t,e){var e=w(e,2),n=e[0],e=e[1];return r.node().attr(n)||(t[n]=e),t},{});r.styles(t)}t(Dv,Iv=Ao),Dv.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(Cv.text.class);if(!a)return new zg(0,0,+r,+i);var a=a.getBBox(),o=a.width,s=a.height,a=w(Oy(n),4),l=a[0],c=a[1],u=a[2],f=a[3],n=w([0,0,+r,+i],4),h=n[0],d=n[1],p=n[2],g=n[3],a=Rv(e);if(a.includes("i"))return new zg(h,d,p,g);a.forEach(function(t,e){var n;"t"===t&&(n=w(0===e?[s+u,+i-s-u]:[0,+i],2),d=n[0],g=n[1]),"r"===t&&(n=w([+r-o-f],1),p=n[0]),"b"===t&&(n=w([+i-s-l],1),g=n[0]),"l"===t&&(n=w(0===e?[o+c,+r-o-c]:[0,+r],2),h=n[0],p=n[1])});n=w(Oy(t),4),e=n[0],a=n[1],t=n[2],n=n[3],a=w([n+a,e+t],2),t=a[0],a=a[1];return new zg(h+n,d+e,p-t,g-a)},Dv.prototype.getBBox=function(){return this.title?this.title.getBBox():new zg(0,0,0,0)},Dv.prototype.render=function(t,e){var n,r,i,a,o,s,l=this,c=(t.width,t.height,t.position,t.spacing,et(t,["width","height","position","spacing"])),u=w(Ly(c),1)[0],f=(f=(t=t).width,r=t.height,t=t.position,i=w([+f/2,+r/2],2),a=(i=w([+i[0],+i[1],"center","middle"],4))[0],o=i[1],s=i[2],i=i[3],(t=Rv(t)).includes("l")&&(a=(n=w([0,"start"],2))[0],s=n[1]),t.includes("r")&&(a=(n=w([+f,"end"],2))[0],s=n[1]),t.includes("t")&&(o=(f=w([0,"top"],2))[0],i=f[1]),t.includes("b")&&(o=(n=w([+r,"bottom"],2))[0],i=n[1]),{x:a,y:o,textAlign:s,textBaseline:i}),h=f.x,d=f.y,p=f.textAlign,g=f.textBaseline;Jg(!!c.text,O(e),function(t){l.title=t.maybeAppendByClassName(Cv.text,"text").styles(u).call(Bv,{x:h,y:d,textAlign:p,textBaseline:g}).node()})};var Iv,Fv=Dv;function Dv(t){return Iv.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 zv(t,e,n,r,i){var a,o,s,l,c,u,f,h,d=w(Ly(_(r,"title")),2),p=d[0],d=d[1],g=d.transform,g=void 0===g?"":g,d=et(d,["transform"]),y=(t.styles(p),e.styles(d),Ry(t.node(),g),p=O(n._offscreen||n.querySelector(Dm.mainGroup.class)),d=e,r=void 0===(r=(n=r).titlePosition)?"lb":r,a=n.titleSpacing,o=Rv(r),p=p.node().getLocalBounds(),s=(l=w(p.min,2))[0],l=l[1],c=(p=w(p.halfExtents,2))[0],p=p[1],u=(d=w(d.node().getLocalBounds().halfExtents,2))[0],d=d[1],l=(s=w([s+c,l+p],2))[0],s=s[1],m=(a=w(Oy(a),4))[0],f=a[1],h=a[2],a=a[3],["start","end"].includes(r)&&"linear"===n.type?(y=n.startPos,n=n.endPos,n=(r=w("start"===r?[y,n]:[n,y],2))[0],y=(r=w(oy(hy([-(y=r[1])[0]+n[0],-y[1]+n[1]]),m),2))[0],r=r[1],{x:n[0]+y,y:n[1]+r}):(o.includes("t")&&(s-=p+d+m),o.includes("r")&&(l+=c+u+f),o.includes("l")&&(l-=c+u+a),o.includes("b")&&(s+=p+d+h),{x:l,y:s})),n=y.x,r=y.y,m=bm(e.node(),{x:n,y:r},i);return Ry(t.node(),g),m}function Wv(e,t,o,s){var n=e.showLine,r=e.showTick,i=e.showLabel,n=Jg(n,t.maybeAppendByClassName(Dm.lineGroup,"g"),function(t){return sv(t,e,s)})||[],r=Jg(r,t.maybeAppendByClassName(Dm.tickGroup,"g"),function(t){return t=t,r=s,i=Km(o,(n=e).tickFilter),a=_(n,"tick"),t.selectAll(Dm.tick.class).data(i,function(t){return t.id||t.label}).join(function(t){return t.append("g").attr("className",Dm.tick.name).transition(function(t,e){return jv.call(this,t,e,i,n,a,!1)})},function(t){return t.transition(function(t,e){return this.removeChildren(),jv.call(this,t,e,i,n,a,r.update)})},function(t){return t.transition(function(){var t=this,e=xm(this,r.exit);return ym(e,function(){return t.remove()}),e})}).transitions();var n,r,i,a})||[],i=Jg(i,t.maybeAppendByClassName(Dm.labelGroup,"g"),function(t){return Lv(t,o,e,s)})||[];return y(y(y([],w(n),!1),w(r),!1),w(i),!1).filter(function(t){return!!t})}t(Vv,Gv=Ao),Vv.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,f=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])}),h=gm(void 0===e?i:e),r=Jg(l,O(t).maybeAppendByClassName(Dm.gridGroup,"g"),function(t){return uv(t,f,o,h)})||[],c=O(t).maybeAppendByClassName(Dm.mainGroup,"g"),i=(n&&(!this.initialized&&h.enter||this.initialized&&h.update)&&Wv(o,O(this.offscreenGroup),f,gm(!1)),Wv(o,O(c.node()),f,h)),e=Jg(a,O(t).maybeAppendByClassName(Dm.titleGroup,"g"),function(t){return e=t,n=s,i=h,(r=o).titleText?(a=r.titleText,e.selectAll(Dm.title.class).data([{title:a}],function(t,e){return t.title}).join(function(t){return t.append(function(){return Kg(a)}).attr("className",Dm.title.name).transition(function(){return zv(O(this),e,n,r,i.enter)})},function(t){return t.transition(function(){return zv(O(this),e,n,r,i.update)})},function(t){return t.remove()}).transitions()):null;var e,n,r,i,a})||[];return y(y(y([],w(r),!1),w(i),!1),w(e),!1).flat().filter(function(t){return!!t})};var Gv,Hv=Vv;function Vv(t){return Gv.call(this,t,Fm)||this}var qv,Yv=Hg({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"),$v=(t(Uv,qv=Ao),Object.defineProperty(Uv.prototype,"defaultPage",{get:function(){var t=this.attributes.initPage;return Ye(t,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(Uv.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(Uv.prototype,"controllerShape",{get:function(){return 1<this.totalPages?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty(Uv.prototype,"pageShape",{get:function(){var n,t=this.pageViews,t=w((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,y([],w(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}),Uv.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(Uv.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty(Uv.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),Uv.prototype.getBBox=function(){var t=qv.prototype.getBBox.call(this),e=t.x,t=t.y,n=this.controllerShape,r=this.pageShape,i=r.pageWidth,r=r.pageHeight;return new zg(e,t,i+n.width,r)},Uv.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=w(this.getFollowingPageDiff(t),2),o=i[0],r=i[1],this.playState="running",i=vm(a,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-o,", ").concat(-r,")")}],n);return ym(i,function(){e.innerCurrPage=t,e.playState="idle",e.setVisiblePages([t]),e.updatePageInfo()}),i},Uv.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:Ye(n-1,0,e),this.goTo(t))},Uv.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:Ye(n+1,0,e),this.goTo(t))},Uv.prototype.renderClipPath=function(t){var e=this.pageShape,n=e.pageWidth,e=e.pageHeight;n&&e?(this.clipPath=t.maybeAppendByClassName(Yv.clipPath,"rect").styles({width:n,height:e}),this.contentGroup.attr("clipPath",this.clipPath.node())):this.contentGroup.style.clipPath=void 0},Uv.prototype.setVisiblePages=function(n){this.playWindow.children.forEach(function(t,e){(n.includes(e)?Ag:Lg)(t)})},Uv.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,w("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=w(i.offset,3),o=w(a[0],2),s=o[0],c=o[1],l=w(a[1],2),r=l[0],o=l[1],l=w(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)},Uv.prototype.updatePageInfo=function(){var t,e=this.currPage,n=this.pageViews,r=this.attributes.formatter;n.length<2||(null!=(t=this.pageInfoGroup.querySelector(Yv.pageInfo.class))&&t.attr("text",r(e+1,n.length)),this.adjustControllerLayout())},Uv.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])},Uv.prototype.prepareFollowingPage=function(t){var e,n=this.currPage,r=this.pageViews;this.setVisiblePages([t,n]),t!==n&&(e=(n=w(this.getFollowingPageDiff(t),2))[0],n=n[1],r[t].setLocalPosition(e,n))},Uv.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(Yv.controller,"g");Tg(t.node(),u),u&&(u=_(this.attributes,"button"),e=_(this.attributes,"pageNum"),i=(u=w(Ly(u),2))[0],u=u[1],n=i.size,r=et(i,["size"]),i=!t.select(Yv.prevBtnGroup.class).node(),a=t.maybeAppendByClassName(Yv.prevBtnGroup,"g").styles(u),this.prevBtnGroup=a.node(),a=a.maybeAppendByClassName(Yv.prevBtn,"path"),u=t.maybeAppendByClassName(Yv.nextBtnGroup,"g").styles(u),this.nextBtnGroup=u.node(),[a,u.maybeAppendByClassName(Yv.nextBtn,"path")].forEach(function(t){t.styles(v(v({},r),{transformOrigin:"center"})),vy(t.node(),n,!0)}),a=t.maybeAppendByClassName(Yv.pageInfoGroup,"g"),this.pageInfoGroup=a.node(),a.maybeAppendByClassName(Yv.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()}))},Uv.prototype.render=function(t,e){e=O(e);this.renderClipPath(e),this.renderController(e),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},Uv.prototype.bindEvents=function(){var t=this,e=an(function(){return t.render(t.attributes,t)},50);this.playWindow.addEventListener(X.ElementEvent.INSERTED,e),this.playWindow.addEventListener(X.ElementEvent.REMOVED,e)},Uv);function Uv(t){var e,n,t=qv.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)},initPage:0,loop:!1,orientation:"horizontal",pageNumFill:"black",pageNumFontSize:12,pageNumTextAlign:"start",pageNumTextBaseline:"middle"})||this;return t.playState="idle",t.contentGroup=t.appendChild(new X.Group({class:Yv.contentGroup.name})),t.playWindow=t.contentGroup.appendChild(new X.Group({class:Yv.playWindow.name})),t.innerCurrPage=t.defaultPage,t}function Kv(t,e,n){return"horizontal"===(t=void 0===t?"horizontal":t)?e:n}Hy.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"]]}),Hy.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]]}),Hy.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 Xv=Hg({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");t(Jv,Zv=Ao),Object.defineProperty(Jv.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(Jv.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(Jv.prototype,"span",{get:function(){var t,e=this.attributes.span;return e?(t=(e=w(Oy(e),2))[0],e=e[1],[t/(e=t+(t=this.showValue?e:0)),t/e]):[1,1]},enumerable:!1,configurable:!0}),Object.defineProperty(Jv.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=w(this.spacing,2),s=o[0],o=o[1];return t&&(t=t-e-s-o,e=w(this.span,2),a=(e=w([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(Jv.prototype,"spacing",{get:function(){var t,e=this.attributes.spacing;return e?(t=(e=w(Oy(e),2))[0],e=e[1],this.showValue?[t,e]:[t,0]):[0,0]},enumerable:!1,configurable:!0}),Object.defineProperty(Jv.prototype,"layout",{get:function(){var t=this.shape,e=t.markerWidth,n=t.labelWidth,r=t.valueWidth,i=t.width,t=t.height,a=w(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(Jv.prototype,"scaleSize",{get:function(){var t=(t=(t=this.markerGroup.node()).querySelector(Xv.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}),Jv.prototype.renderMarker=function(t){var e=this,n=this.attributes.marker,r=_(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(Xv.markerGroup,"g").style("zIndex",0),Jg(!!n,this.markerGroup,function(){e.markerGroup.maybeAppendByClassName(Xv.marker,n).styles(r),e.markerGroup.node().scale(1/e.markerGroup.node().getScale()[0]),vy(e.markerGroup.node(),e.scaleSize,!0)})},Jv.prototype.renderLabel=function(t){var e=_(this.attributes,"label"),n=e.text,e=et(e,["text"]);this.labelGroup=t.maybeAppendByClassName(Xv.labelGroup,"g").style("zIndex",0),this.labelGroup.maybeAppendByClassName(Xv.label,function(){return Kg(n)}).styles(e)},Jv.prototype.renderValue=function(t){var e=this,n=_(this.attributes,"value"),r=n.text,i=et(n,["text"]);this.valueGroup=t.maybeAppendByClassName(Xv.valueGroup,"g").style("zIndex",0),Jg(this.showValue,this.valueGroup,function(){e.valueGroup.maybeAppendByClassName(Xv.value,function(){return Kg(r)}).styles(i)})},Jv.prototype.renderBackground=function(t){var e=this.shape,n=e.width,e=e.height,r=_(this.attributes,"background");this.background=t.maybeAppendByClassName(Xv.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(Xv.background,"rect").styles(v({width:n,height:e},r))},Jv.prototype.adjustLayout=function(){var t=this.layout,e=t.labelWidth,n=t.valueWidth,r=t.height,t=w(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}),$g(this.labelGroup.select(Xv.label.class).node(),Math.ceil(e)),this.showValue&&(this.valueGroup.styles({x:t,y:r}),$g(this.valueGroup.select(Xv.value.class).node(),Math.ceil(n)))},Jv.prototype.render=function(t,e){e=O(e);this.renderMarker(e),this.renderLabel(e),this.renderValue(e),this.renderBackground(e),this.adjustLayout()};var Zv,Qv=Jv;function Jv(t){return Zv.call(this,t,{span:[1,1],marker:function(){return new X.Circle({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this}function tb(t,e,n){return void 0===n&&(n=!0),t?e(t):n}var eb,nb=Hg({page:"item-page",navigator:"navigator",item:"item"},"items"),rb=(t(ib,eb=Ao),Object.defineProperty(ib.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(ib.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(ib.prototype,"renderData",{get:function(){var t=this.attributes,a=t.data,o=t.layout,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:v({layout:o,labelText:r,valueText:i},Object.fromEntries(Object.entries(s).map(function(t){t=w(t,2);return[t[0],Gg(t[1],[e,n,a])]})))}})},enumerable:!1,configurable:!0}),ib.prototype.getGridLayout=function(){var u=this,t=this.attributes,f=t.orientation,h=t.width,d=t.rowPadding,p=t.colPadding,g=w(this.navigatorShape,1)[0],t=w(this.grid,2),y=t[0],m=t[1],v=m*y,b=0;return this.pageViews.children.map(function(t,e){var n,r=Math.floor(e/v),i=e%v,a=u.ifHorizontal(m,y),a=[Math.floor(i/a),i%a],a=("vertical"===f&&a.reverse(),w(a,2)),o=a[0],a=a[1],s=(h-g-(m-1)*p)/m,t=t.getBBox().height,l=w([0,0],2),c=l[0],l=l[1];return b="horizontal"===f?(c=(n=w([b,o*(t+d)],2))[0],l=n[1],a===m-1?0:b+s+p):(c=(n=w([a*(s+p),b],2))[0],l=n[1],o===y-1?0:b+t+d),{page:r,index:e,row:o,col:a,pageIndex:i,width:s,height:t,x:c,y:l}})},ib.prototype.getFlexLayout=function(){var t=this.attributes,e=t.width,n=t.height,a=t.rowPadding,o=t.colPadding,t=w(this.navigatorShape,1)[0],r=w(this.grid,2),s=r[0],l=r[1],r=w([e-t,n],2),c=r[0],u=r[1],e=w([0,0,0,0,0,0,0,0],8),f=e[0],h=e[1],d=e[2],p=e[3],g=e[4],y=e[5],m=e[6],v=e[7];return this.pageViews.children.map(function(t,e){var t=t.getBBox(),n=t.width,t=t.height,r=0===m?0:o,i=m+r+n;return i<=c&&tb(g,function(t){return t<l})?(r=w([m+r,v,i],3),f=r[0],h=r[1],m=r[2]):(i=w([y+1,0,0,v+t+a],4),y=i[0],g=i[1],m=i[2],(v=i[3])+a+t<=u&&tb(y,function(t){return t<s})?(r=w([m,v,n],3),f=r[0],h=r[1],m=r[2]):(i=w([0,0,n,0,d+1,0,0,0],8),f=i[0],h=i[1],m=i[2],v=i[3],d=i[4],p=i[5],y=i[6],g=i[7])),{width:n,height:t,x:f,y:h,page:d,index:e,pageIndex:p++,row:y,col:g++}})},Object.defineProperty(ib.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}),ib.prototype.ifHorizontal=function(t,e){return Kv(this.attributes.orientation,t,e)},ib.prototype.flattenPage=function(e){e.querySelectorAll(nb.item.class).forEach(function(t){e.appendChild(t)}),e.querySelectorAll(nb.page.class).forEach(function(t){e.removeChild(t).destroy()})},ib.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));O(t).selectAll(nb.item.class).data(this.renderData,function(t){return t.id}).join(function(t){return t.append(function(t){t=t.style;return new Qv({style:t})}).attr("className",nb.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()})},ib.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=w(this.navigatorShape,2),i=r[0],r=r[1];this.navigator.update("grid"===e?{pageWidth:t-i,pageHeight:n-r}:{})},ib.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=w(t,2);return{page:t[0],layouts:t[1]}}),u=y([],w(this.navigator.getContainer().children),!1);t.forEach(function(t){var t=t.layouts,c=e.pageViews.appendChild(new X.Group({className:nb.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=qe(t="__layout__")?t.split("."):t).forEach(function(t,e){e<i.length-1?(Fe(r[t])||(r[t]=$e(i[e+1])?[]:{}),r=r[t]):r[t]=n}),o.update({x:e,y:a,width:s,height:l})})}),this.relayoutNavigator()},ib.prototype.renderNavigator=function(t){var e=this.attributes.orientation,n=_(this.attributes,"nav"),r=Vg({orientation:e},n),i=this;return t.selectAll(nb.navigator.class).data(["nav"]).join(function(t){return t.append(function(){return new $v({style:r})}).attr("className",nb.navigator.name).each(function(){i.navigator=this})},function(t){return t.each(function(){this.update(r)})},function(t){return t.remove()}),this.navigator},ib.prototype.getBBox=function(){return this.navigator.getBBox()},ib.prototype.render=function(t,e){var n=this.attributes.data;n&&0!==n.length&&(n=this.renderNavigator(O(e)),this.renderItems(n.getContainer()),this.adjustLayout())},ib.prototype.dispatchCustomEvent=function(t,e){t=new X.CustomEvent(t,{detail:e});this.dispatchEvent(t)},ib);function ib(t){t=eb.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:cn,mouseenter:cn,mouseleave:cn})||this;return t.navigatorShape=[0,0],t}var ab,ob=Hg({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),sb={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},lb=(t(cb,ab=Ao),cb.prototype.render=function(t,e){var n=O(e).maybeAppendByClassName(ob.markerGroup,"g"),n=(this.renderMarker(n),O(e).maybeAppendByClassName(ob.labelGroup,"g"));this.renderLabel(n)},cb.prototype.renderMarker=function(t){var r=this,e=this.attributes,n=e.orientation,e=e.markerSymbol,i=void 0===e?Kv(n,"horizontalHandle","verticalHandle"):e;Jg(!!i,t,function(t){var e=_(r.attributes,"marker"),n=v({symbol:i},e);r.marker=t.maybeAppendByClassName(ob.marker,function(){return new Hy({style:n})}).update(n)})},cb.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;Jg(n,t,function(t){var e=_(s.attributes,"label"),n=e.text,e=et(e,["text"]),r=(null==(r=t.select(ob.marker.class))?void 0:r.node().getBBox())||{},i=r.width,r=r.height,r=w(Kv(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(ob.label,"text").styles(v(v({},e),{x:i,y:a,text:u(n).toString(),textAlign:o,textBaseline:r}))})},cb);function cb(t){return ab.call(this,t,sb)||this}var ub,To={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},fb=Vg({},To,{}),hb=Vg({},To,Ay(sb,"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"}),db=Hg({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"),pb=(t(gb,ub=Ao),gb.prototype.renderTitle=function(t,e,n){var r=this.attributes,i=r.showTitle,r=r.titleText,a=w(Ly(_(this.attributes,"title")),2),o=a[0],a=a[1],s=(this.titleGroup=t.maybeAppendByClassName(db.titleGroup,"g").styles(a),v(v({width:e,height:n},o),{text:i?r:""}));this.title=this.titleGroup.maybeAppendByClassName(db.title,function(){return new Fv({style:s})}).update(s)},gb.prototype.renderItems=function(t,e){var n=e.x,r=e.y,i=e.width,e=e.height,a=w(Ly(_(this.attributes,"title",!0)),2),o=a[0],a=a[1],s=v(v({},o),{width:i,height:e,x:0,y:0}),l=(this.itemsGroup=t.maybeAppendByClassName(db.itemsGroup,"g").styles(v({x:n,y:r},a)),this);this.itemsGroup.selectAll(db.items.class).data(["items"]).join(function(t){return t.append(function(){return new rb({style:s})}).attr("className",db.items.name).each(function(){l.items=O(this)})},function(t){return t.update(s)},function(t){return t.remove()})},gb.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(gb.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.showTitle,n=t.width,t=t.height;return e?this.title.node().getAvailableSpace():new zg(0,0,n,t)},enumerable:!1,configurable:!0}),gb.prototype.getBBox=function(){var t,e,n,r,i,a,o,s,l,c,u=null==(u=this.title)?void 0:u.node(),f=null==(f=this.items)?void 0:f.node();return u&&f?(f=f,t=(r=(u=u).attributes).position,e=r.spacing,n=r.inset,r=r.text,u=u.getBBox(),i=f.getBBox(),t=Rv(t),e=(r=w(Oy(r?e:0),4))[0],a=r[1],o=r[2],r=r[3],s=(n=w(Oy(n),4))[0],l=n[1],c=n[2],n=n[3],a=(r=w([r+a,e+o],2))[0],e=r[1],r=(o=w([n+l,s+c],2))[0],n=o[1],"l"===t[0]?new zg(u.x,u.y,i.width+u.width+a+r,Math.max(i.height+n,u.height)):"t"===t[0]?new zg(u.x,u.y,Math.max(i.width+r,u.width),i.height+u.height+e+n):(s=(l=w([f.attributes.width||i.width,f.attributes.height||i.height],2))[0],c=l[1],new zg(i.x,i.y,s+u.width+a+r,c+u.height+e+n))):ub.prototype.getBBox.call(this)},gb.prototype.render=function(t,e){var n=t.width,t=t.height,e=O(e);this.renderTitle(e,n,t),this.renderItems(e,this.availableSpace),this.adjustLayout()},gb);function gb(t){return ub.call(this,t,fb)||this}var yb,mb={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},vb=Hg({background:"background",labelGroup:"label-group",label:"label"},"indicator"),bb=(t(xb,yb=Ao),xb.prototype.renderBackground=function(){var t,e,n,r,i,a,o;this.label&&(t=(i=this.attributes).position,o=(i=w(Oy(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=_(this.attributes,"background"),this.background=O(this.group).maybeAppendByClassName(vb.background,"path").styles(v(v({},o),{path:a})),this.group.appendChild(this.label.node()))},xb.prototype.renderLabel=function(){var t=this.attributes,e=t.formatter,n=t.labelText,t=w(Ly(_(this.attributes,"label")),2),r=t[0],t=t[1],r=(r.text,et(r,["text"]));this.label=O(this.group).maybeAppendByClassName(vb.labelGroup,"g").styles(t),n&&this.label.maybeAppendByClassName(vb.label,function(){return Kg(e(n))}).style("text",e(n).toString()).selectAll("text").styles(r)},xb.prototype.adjustLayout=function(){var t=w(this.point,2),e=t[0],t=t[1];this.group.attr("x",-e).attr("y",-t)},xb.prototype.getPath=function(n,t){var r=this,t=w(t,2),e=w(t[0],2),i=e[0],e=e[1],t=w(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=w(t,2),e=t[0],t=t[1];return e===o[n]?r.createCorner(t):[y(["M"],w(t[0]),!1),y(["L"],w(t[1]),!1)]});return a.push([["Z"]]),a.flat().filter(function(t,e,n){return 0===e||"M"!==t[0]})},xb.prototype.createCorner=function(t,e){void 0===e&&(e=10);var n=function(t,e){var n=(t=w(t,2))[0],t=t[1],r=(e=w(e,2))[0],e=e[1];return n!==r&&t===e}.apply(void 0,y([],w(t),!1)),t=w(t,2),r=w(t[0],2),i=r[0],r=r[1],t=w(t[1],2),a=t[0],t=t[1],a=w(n?[a-i,[i,a]]:[t-r,[r,t]],2),t=a[0],a=w(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=w([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]])},xb.prototype.bindEvents=function(){this.label.on(X.ElementEvent.BOUNDS_CHANGED,this.renderBackground)},xb.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout()},xb);function xb(t){t=yb.call(this,t,mb)||this;return t.point=[0,0],t.group=t.appendChild(new X.Group({})),t.isMutationObserved=!0,t}function wb(t,e){var t=w(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 kb=Hg({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function Mb(t){var e=t.orientation,n=t.size,t=t.length;return Kv(e,[t,n],[n,t])}function Ob(t){var e=t.type,t=w(Mb(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 _b(t){var i,a,o,e=t.orientation,r=t.color,n=t.block,t=t.partition,s=(l=Ce(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 X.parseColor(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(Kv(e,"0","270"),")")):""}function Sb(t,e){var n,r,i,a=_(e,"selection"),o=_b(e),t=t.maybeAppendByClassName(kb.selection,"path").styles(v({path:Ob(e),fill:o},a)),a=t.maybeAppendByClassName(kb.clipPath,"path").styles({path:(a=(o=e).orientation,(e=o.range)?(r=(o=w(Mb(o),2))[0],o=o[1],n=(e=w(e,2))[0],e=e[1],i=Kv(a,n*r,0),n=Kv(a,0,n*o),r=Kv(a,e*r,r),[["M",i,n],["L",i,i=Kv(a,o,e*o)],["L",r,i],["L",r,n],["Z"]]):[])}).node();t.style("clip-path",a)}t(Lb,Eb=Ao),Lb.prototype.render=function(t,e){var n,r,i=O(e).maybeAppendByClassName(kb.trackGroup,"g");i=i,r=_(n=t,"track"),i.maybeAppendByClassName(kb.track,"path").styles(v({path:Ob(n)},r)),Sb(O(e).maybeAppendByClassName(kb.selectionGroup,"g"),t)};var Eb,Ab=Lb;function Lb(t){return Eb.call(this,t,{type:"color",orientation:"horizontal",size:30,range:[0,1],length:200,block:!1,partition:[],color:["#fff","#000"],trackFill:"#e5e5e5"})||this}var Tb,Pb,Nb,jb,Cb=on(function(t){return{min:Math.min.apply(Math,y([],w(t.map(function(t){return t.value})),!1)),max:Math.max.apply(Math,y([],w(t.map(function(t){return t.value})),!1))}},function(t){return t.map(function(t){return t.id})}),Rb=(t(u,Tb=Ao),Object.defineProperty(u.prototype,"handleOffsetRatio",{get:function(){return this.ifHorizontal(.7,.9)},enumerable:!1,configurable:!0}),u.prototype.getBBox=function(){var t=this.attributes,e=t.width,t=t.height;return new zg(0,0,e,t)},u.prototype.render=function(t,e){var n=this,t=t.showLabel,r=(this.renderTitle(O(e)),this.availableSpace),i=r.x,r=r.y,e=O(e).maybeAppendByClassName(db.contentGroup,"g").styles({x:i,y:r}),i=(Jg(!!t,e.maybeAppendByClassName(db.labelGroup,"g").styles({zIndex:1}),function(t){n.renderLabel(t)}),e.maybeAppendByClassName(db.ribbonGroup,"g").styles({zIndex:0}));this.handlesGroup=e.maybeAppendByClassName(db.handlesGroup,"g").styles({zIndex:2}),this.renderHandles(),this.renderRibbon(i),this.renderIndicator(e),this.adjustLabel(),this.adjustHandles()},Object.defineProperty(u.prototype,"range",{get:function(){var t=this.attributes.data;return Cb(t)},enumerable:!1,configurable:!0}),Object.defineProperty(u.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(u.prototype,"ribbonRange",{get:function(){var t=w(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(u.prototype,"selection",{get:function(){var t=this.range,e=t.min,t=t.max,n=this.attributes.defaultValue,e=w(void 0===n?[e,t]:n,2);return[e[0],e[1]]},enumerable:!1,configurable:!0}),u.prototype.ifHorizontal=function(t,e){return Kv(this.attributes.orientation,"function"==typeof t?t():t,"function"==typeof e?e():e)},u.prototype.renderTitle=function(t){var e=this.attributes,n=e.showTitle,r=e.titleText,i=e.width,e=e.height,a=_(this.attributes,"title"),o=v(v({},a),{width:i,height:e,text:r}),s=this;t.selectAll(db.title.class).data(n?[r]:[]).join(function(t){return t.append(function(){return new Fv({style:o})}).attr("className",db.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(u.prototype,"availableSpace",{get:function(){var t,e;return this.title?this.title.getAvailableSpace():(t=(e=this.attributes).width,e=e.height,new zg(0,0,t,e))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"labelFixedSpacing",{get:function(){return this.attributes.showTick?5:0},enumerable:!1,configurable:!0}),Object.defineProperty(u.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(u.prototype,"labelBBox",{get:function(){var t,e;return this.attributes.showLabel?(this.cacheLabelBBox||(t=(e=(null==(e=this.label.querySelector(Dm.labelGroup.class))?void 0:e.children.slice(-1)[0]).getBBox()).width,e=e.height,this.cacheLabelBBox=new zg(0,0,t,e)),this.cacheLabelBBox):new zg(0,0,0,0)},enumerable:!1,configurable:!0}),Object.defineProperty(u.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(u.prototype,"ribbonBBox",{get:function(){var t=this.attributes.showHandle,e=this.availableSpace,n=e.width,e=e.height,r=this.labelShape,i=r.size,r=r.length,n=w(this.ifHorizontal([e,n],[n,e]),2),e=n[0],n=n[1],t=t?this.handleShape:{size:0,length:0},a=t.size,t=t.length,o=this.handleOffsetRatio,s=0,l=this.labelPosition,s=["bottom","right"].includes(l)?Math.min(e-i,(e-a)/o):a<e*(1-o)?Math.max(e-i,0):Math.max((e-i-a)/o,0),e=Math.max(t,r),a=n-e,o=w(this.ifHorizontal([a,s],[s,a]),2),t=o[0],r=o[1],n=["top","left"].includes(l)?i:0,s=w(this.ifHorizontal([e/2,n],[n,e/2]),2),a=s[0],o=s[1];return new zg(a,o,t,r)},enumerable:!1,configurable:!0}),Object.defineProperty(u.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}),u.prototype.renderRibbon=function(t){var e=this.attributes,n=e.data,r=e.type,i=e.orientation,a=e.color,e=e.block,o=_(this.attributes,"ribbon"),s=this.range,l=s.min,c=s.max,s=this.ribbonBBox,u=s.x,s=s.y,f=this.ribbonShape,h=f.length,f=f.size,d=Vg({x:u,y:s,length:h,size:f,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(db.ribbon,function(){return new Ab({style:d})}).update(d)},u.prototype.getHandleClassName=function(t){return"".concat(db.prefix("".concat(t,"-handle")))},u.prototype.renderHandles=function(){var t=this.attributes,e=t.showHandle,t=t.orientation,n=_(this.attributes,"handle"),r=w(this.selection,2),i=r[0],r=r[1],a=v(v({},n),{orientation:t}),o=this;this.handlesGroup.selectAll(db.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 lb({style:a})}).attr("className",function(t){t=t.type;return"".concat(db.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()})},u.prototype.adjustHandles=function(){var t=w(this.selection,2),e=t[0],t=t[1];this.setHandlePosition("start",e),this.setHandlePosition("end",t)},Object.defineProperty(u.prototype,"handleBBox",{get:function(){if(!this.cacheHandleBBox){if(!this.attributes.showHandle)return new zg(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=w([Math.max(e,r),Math.max(t,n)],2),r=e[0],t=e[1];this.cacheHandleBBox=new zg(0,0,r,t)}return this.cacheHandleBBox},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"handleShape",{get:function(){var t=this.handleBBox,e=t.width,t=t.height,n=w(this.ifHorizontal([t,e],[e,t]),2);return{width:e,height:t,size:n[0],length:n[1]}},enumerable:!1,configurable:!0}),u.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=w(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})},u.prototype.renderIndicator=function(t){var e=_(this.attributes,"indicator");this.indicator=t.maybeAppendByClassName(db.indicator,function(){return new bb({})}).update(e)},Object.defineProperty(u.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(v(v({},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=w([e.value,i.value],2))[0])+(r=r[1]))/2,t.push(v(v({},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(u.prototype,"labelStyle",{get:function(){var t=w(["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}),u.prototype.renderLabel=function(t){var e=this.attributes,n=e.showTick,n=void 0!==n&&n,r=e.labelFilter,e=e.labelFormatter,i=_(this.attributes,"label"),a=i.align,o=_(i,"tick"),i=_(i,"tick",!0),n=Vg(v({showLine:!1,showGrid:!1,showTick:n,type:"linear",startPos:[0,0],endPos:[0,0],tickDirection:"negative",labelTransform:"rotate(0)"},this.labelStyle),Ay(o,"tick"),Ay(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=v(v({},n),o);this.label=t.maybeAppendByClassName(db.label,function(){return new Hv({style:s})}).node(),this.label.update(s,!1)},Object.defineProperty(u.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=w([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}),u.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=w(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))},u.prototype.bindEvents=function(){this.ribbon.on("pointerdown",this.onDragStart("ribbon")),this.ribbon.on("pointermove",this.onHovering),this.addEventListener("pointerout",this.hideIndicator)},u.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=Ye(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}),Ag(this.indicator.node())):this.hideIndicator()},u.prototype.hideIndicator=function(){Lg(this.indicator.node())},u.prototype.updateMouse=function(){this.attributes.slidable&&(this.style.cursor="grabbing")},u.prototype.setSelection=function(t,e){this.updateSelection(t,e)},u.prototype.updateSelection=function(t,e,n){void 0===n&&(n=!1);var r,i,a,o,s,l=w(this.selection,2),c=l[0],l=l[1],t=w([t,e],2),e=t[0],t=t[1],n=(n&&(e+=c,t+=l),this.range),c=n.min,l=n.max,u=w((n=[c,l],c=[e,t],l=this.selection,void 0===r&&(r=4),i=(n=w(n,2))[0],n=n[1],a=(c=w(c,2))[0],c=c[1],o=(l=w(l,2))[0],l=l[1],c=(a=w([a,c],2))[0],s=(a=a[1])-c,a<c&&(c=(u=w([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]:[dy(c,r),dy(a,r)]),2),e=u[0],t=u[1];this.update({defaultValue:[e,t]}),this.dispatchSelection()},Object.defineProperty(u.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 Je(t)?dy(.01*(e-n),0):t},enumerable:!1,configurable:!0}),u.prototype.getTickValue=function(t){var e=this.attributes,n=e.data,e=e.block,r=this.range.min;return e?wb(n.map(function(t){return t.value}),t).tick:(e=this.step,r+Math.round((t-r)/e)*e)},u.prototype.getValueByCanvasPoint=function(t,e){var n=this.range,r=n.min,n=n.max,i=w(this.ribbon.node().getPosition(),2),a=i[0],i=i[1],a=this.ifHorizontal(a,i),i=this.ifHorizontal.apply(this,y([],w(Ug(t)),!1));return Ye(this.getOffset(i-a,!0),r,n)},u.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)},u.prototype.dispatchSelection=function(){var t=new X.CustomEvent("valuechange",{detail:{value:this.selection}});this.dispatchEvent(t)},u.prototype.dispatchIndicated=function(t,e){t=new X.CustomEvent("indicate",{detail:{value:t,range:e}});this.dispatchEvent(t)},u);function u(t){var a=Tb.call(this,t,hb)||this;return a.eventToOffsetScale=new Cp({}),a.innerRibbonScale=new Cp({}),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=wb(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(),w(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 Bb(t){Pb||(Pb=document.createElement("table"),jb=document.createElement("tr"),Nb=/^\s*<(\w+|!)[^>]*>/,jb={tr:document.createElement("tbody"),tbody:Pb,thead:Pb,tfoot:Pb,td:jb,th:jb,"*":document.createElement("div")});var e=Nb.test(t)&&RegExp.$1,e=(e&&e in jb||(e="*"),jb[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}var Ib,Fb,Db,zb="tooltip",Wb="tooltip-title",Gb="tooltip-list",Hb="tooltip-list-item",Vb="tooltip-list-item-name",qb="tooltip-list-item-marker",Yb="tooltip-list-item-name-label",$b="tooltip-list-item-value",No="tooltip-crosshair-x",o="tooltip-crosshair-y",jo={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"},Ub=((zl={})[".".concat(zb)]={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"},zl[".".concat(Wb)]={color:"rgba(0, 0, 0, 0.45)"},zl[".".concat(Gb)]={margin:"0px","list-style-type":"none",padding:"0px"},zl[".".concat(Hb)]={"list-style-type":"none",display:"flex","line-height":"2em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},zl[".".concat(qb)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},zl[".".concat(Vb)]={display:"flex","align-items":"center","max-width":"216px"},zl[".".concat(Yb)]=v({flex:1},jo),zl[".".concat($b)]=v({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},jo),zl[".".concat(No)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},zl[".".concat(o)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},zl),Kb=(t(Xb,Ib=Ao),Object.defineProperty(Xb.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),Xb.prototype.getContainer=function(){return this.element},Object.defineProperty(Xb.prototype,"position",{set:function(t){var t=w(t,2),e=t[0],t=t[1];this.attributes.x=e,this.attributes.y=t,this.updatePosition()},enumerable:!1,configurable:!0}),Object.defineProperty(Xb.prototype,"elementSize",{get:function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},enumerable:!1,configurable:!0}),Object.defineProperty(Xb.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=et(t,["name","color","index"]),r=v({name:r,color:i,index:null!=a?a:e},t);return Bb((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}),Xb.prototype.render=function(t,e){this.renderHTMLTooltipElement(),this.updatePosition()},Xb.prototype.destroy=function(){var t;null!=(t=this.element)&&t.remove(),Ib.prototype.destroy.call(this)},Xb.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"},Xb.prototype.hide=function(){this.element.style.visibility="hidden"},Xb.prototype.initShape=function(){var t=this.attributes.template;this.element=Bb(t.container),this.id&&this.element.setAttribute("id",this.id)},Xb.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))},Xb.prototype.renderHTMLTooltipElement=function(){var r,t=this.attributes,e=t.template,n=t.title,i=t.enterable,a=t.style,t=t.content,o=this.element;this.element.style.pointerEvents=i?"auto":"none",t?this.renderCustomContent():(n?(o.innerHTML=e.title,o.getElementsByClassName(Wb)[0].innerHTML=n):null!=(t=null==(i=o.getElementsByClassName(Wb))?void 0:i[0])&&t.remove(),e=this.HTMLTooltipItemsElements,(n=document.createElement("ul")).className=Gb,n.replaceChildren.apply(n,y([],w(e),!1)),(i=this.element.querySelector(".".concat(Gb)))?i.replaceWith(n):o.appendChild(n)),r=o,Object.entries(a).forEach(function(t){var t=w(t,2),e=t[0],n=t[1];y([r],w(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(":"),";")},""))})})},Xb.prototype.getRelativeOffsetFromCursor=function(t){var e=this.attributes,n=e.position,i=e.offset,e=t||n,t=("auto"===e?"bottom-right":e).split("-"),a={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},n=this.elementSize,o=n.width,s=n.height,l=[-o/2,-s/2];return t.forEach(function(t){var e=w(l,2),n=e[0],e=e[1],t=w(a[t],2),r=t[0],t=t[1];l=[n+(o/2+i[0])*r,e+(s/2+i[1])*t]}),l},Xb.prototype.setOffsetPosition=function(t){var t=w(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")},Xb.prototype.updatePosition=function(){this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor()))},Xb.prototype.autoPosition=function(t){var e,n,r,i,t=w(t,2),a=t[0],t=t[1],o=this.attributes,s=o.x,l=o.y,c=o.bounding,u=o.position,o=o.defaultPosition;return"auto"!==u?[a,t]:(e=(u=this.element).offsetWidth,u=u.offsetHeight,a=(s=w([+s+a,+l+t],2))[0],l=s[1],n={left:"right",right:"left",top:"bottom",bottom:"top"},t=c.x,s=c.y,r={left:a<t,right:t+c.width<a+e,top:l<s,bottom:s+c.height<l+u},i=[],o.split("-").forEach(function(t){i.push(r[t]?n[t]:t)}),t=i.join("-"),this.getRelativeOffsetFromCursor(t))},Xb.tag="tooltip",e([(void 0===(Fb=100)&&(Fb=0),void 0===(Db=!0)&&(Db=!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,Db&&i.apply(t,e),r=window.setTimeout(function(){i.apply(t,e),r=null},Fb))})})],Xb.prototype,"updatePosition",null),Xb);function Xb(t){t=Ib.call(this,t,{data:[],x:0,y:0,visibility:"visible",title:"",position:"bottom-right",defaultPosition:"bottom-right",offset:[5,5],enterable:!1,container:{x:0,y:0},bounding:{x:0,y:0,width:0,height:0},template:{container:'<div class="'.concat(zb,'"></div>'),title:'<div class="'.concat(Wb,'"></div>'),item:'<li class="'.concat(Hb,'" data-index={index}>\n <span class="').concat(Vb,'">\n <span class="').concat(qb,'" style="background:{color}"></span>\n <span class="').concat(Yb,'" title="{name}">{name}</span>\n </span>\n <span class="').concat($b,'" title="{value}">{value}</span>\n </li>')},style:Ub})||this;return t.prevCustomContentKey=t.attributes.contentKey,t.initShape(),t.render(t.attributes,t),t}var Zb,Qb={default:{sizeStyle:{width:44,height:22,radius:11},tagStyle:{textStyle:{fontSize:12,lineHeight:16,fill:"#fff"},padding:0},markerStyle:{size:11}},small:{sizeStyle:{width:28,height:16,radius:8},tagStyle:{textStyle:{fontSize:10,lineHeight:14,fill:"#fff"},padding:0},markerStyle:{size:8}},mini:{sizeStyle:{width:20,height:14,radius:7},tagStyle:{textStyle:{fontSize:7,lineHeight:10,fill:"#fff"},padding:0},markerStyle:{size:7}}};function Jb(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!0);var r=Number(t.style.height)-2*e;return{x:n?Number(t.style.width)+Number(t.style.x)-e-r:Number(t.style.x)+e,y:Number(t.style.y)+e,width:r,height:r,radius:r/2}}function t2(t){return Zb.call(this,t,{x:0,y:0,size:"default",spacing:2,checked:!0,disabled:!1})||this}t(t2,Zb=Ao),t2.prototype.render=function(t,e){var i=this,n=t.size,a=t.spacing,r=t.disabled,o=t.checked,s=t.unCheckedChildren,t=t.checkedChildren,e=(this.attributes,O(e).maybeAppendByClassName("switch-content","g").node()),l=e.getLocalBounds(),n=fn(Qb,n,Qb.default),c=n.sizeStyle,u=n.tagStyle,f=r?"no-drop":"pointer",n=o?"#1890FF":"#00000040",h=c,d=o?t:s,p=((t||s)&&O(e).maybeAppendByClassName("switch-tag",function(){return new Yy({})}).call(function(t){var e,t=t.node(),n=(t.update(v(v({cursor:f,backgroundStyle:null,text:!1,marker:!1},u),d)),null==t?void 0:t.getLocalBounds()),r=n.max,n=n.min,i=r[0]-n[0]+c.radius,r=r[1]-n[1],n=Math.max(i+c.height+2,c.width);h=v(v({},c),{width:n}),t.update((t={x:l.min[0],y:l.min[1],width:n,height:h.height},n={width:i,height:r},i=h.radius,r=o,e=n.width,n=n.height,void 0===i&&(i=0),{x:(r=void 0===o?!0:r)?Number(t.x)+i:Number(t.width)+Number(t.x)-e,y:Number(t.y)+(Number(t.height)-n)/2}))}),O(e).maybeAppendByClassName("switch-background","rect").styles(v({zIndex:(e.style.zIndex||0)-1,x:l.min[0],y:l.min[1],fill:n,cursor:f,fillOpacity:r?.4:1},h)).node()),g=O(e).maybeAppendByClassName("switch-background-stroke","rect").styles(v({zIndex:(e.style.zIndex||0)-2,x:l.min[0],y:l.min[1],stroke:n,lineWidth:0},h)).node();O(e).maybeAppendByClassName("switch-handle","rect").styles({fill:"#fff",cursor:f}).call(function(t){var e,t=t.node(),n=Jb(p,a,o),r=Jb(p,a,!o);t.attr("x")&&!un(n,r)&&i.checked!==o?(t.attr(r),null!=(e=t.getAnimations()[0])&&e.cancel(),null!=(e=g.getAnimations()[0])&&e.cancel(),t.animate([{x:r.x},{x:n.x}],{duration:120,fill:"both"}),g.animate([{lineWidth:0,strokeOpacity:.5},{lineWidth:14,strokeOpacity:0}],{duration:400,easing:"ease-on"})):t.attr(n)}),this.checked=!!o},t2.tag="switch";var e2,n2,r2,i2,a2={tagText:"",lineStroke:"#416180",lineStrokeOpacity:.45,lineLineWidth:1,lineLineDash:[5,5]},bo=Vg({},a2,{type:"line",tagPosition:"start",tagAlign:"center",tagVerticalAlign:"bottom"}),us=Vg({},a2,{type:"circle",defaultRadius:0}),ys=Vg({},a2,{type:"polygon",defaultRadius:0,startAngle:0}),uo=(t(o2,e2=Ao),Object.defineProperty(o2.prototype,"localPointer",{get:function(){var t=w(this.getPosition(),2),e=t[0],t=t[1],n=w(this.pointer,2);return[n[0]-e,n[1]-t]},enumerable:!1,configurable:!0}),Object.defineProperty(o2.prototype,"tagStyle",{get:function(){return _(this.attributes,"tag")},enumerable:!1,configurable:!0}),Object.defineProperty(o2.prototype,"crosshairStyle",{get:function(){var t=_(this.attributes,"line");return v(v({},t),{path:this.crosshairPath})},enumerable:!1,configurable:!0}),o2.prototype.render=function(t,e){var e=O(e).maybeAppendByClassName(".crosshair-group","g").node(),n=(this.shapesGroup=e,this.tagStyle),r=this.crosshairStyle;this.tagShape=O(e).maybeAppendByClassName("crosshair-tag",function(){return new Yy({style:n})}).styles(n).node(),this.crosshairShape=O(e).maybeAppendByClassName(".crosshair-path","path").styles(r).node(),this.adjustLayout()},o2.prototype.setPointer=function(t){this.pointer=t},o2.tag="crosshair-base",o2);function o2(t){return e2.call(this,t,a2)||this}function s2(t){return n2.call(this,Vg({},s2.defaultOptions,t))||this}function l2(t){return r2.call(this,Vg({},l2.defaultOptions,t))||this}function c2(t){return i2.call(this,Vg({},c2.defaultOptions,t))||this}t(s2,n2=uo),Object.defineProperty(s2.prototype,"crosshairPath",{get:function(){var t=this.attributes,e=w(t.startPos,2),n=e[0],e=e[1],t=w(t.endPos,2);return[["M",0,0],["L",t[0]-n,t[1]-e],["Z"]]},enumerable:!1,configurable:!0}),Object.defineProperty(s2.prototype,"localPointer",{get:function(){var t,e,n;return this.pointer?(t=(e=w(this.getPosition(),2))[0],e=e[1],[(n=w(this.pointer,2))[0]-t,n[1]-e]):this.attributes.startPos},enumerable:!1,configurable:!0}),Object.defineProperty(s2.prototype,"isVertical",{get:function(){var t=this.attributes,e=w(t.startPos,2),n=e[0],e=e[1],t=w(t.endPos,2),r=t[0],t=t[1];return n===r&&e!==t},enumerable:!1,configurable:!0}),Object.defineProperty(s2.prototype,"tagShapeSpace",{get:function(){var t,e=(t=(t=this.tagShape)&&t.getRenderBounds())?(e=t.getMax(),t=t.getMin(),{width:e[0]-t[0],height:e[1]-t[1]}):{width:0,height:0};return{width:e.width,height:e.height}},enumerable:!1,configurable:!0}),s2.prototype.update=function(t){n2.prototype.update.call(this,t)},s2.prototype.setPointer=function(t){n2.prototype.setPointer.call(this,t),this.adjustPosition()},s2.prototype.setText=function(t){this.tagShape.update({text:t}),this.adjustTag()},s2.prototype.adjustLayout=function(){this.adjustPosition(),this.adjustTag()},s2.prototype.adjustPosition=function(){var t=w(this.localPointer,2),e=t[0],t=t[1],n=w(this.attributes.startPos,2),r=n[0],n=n[1],r=this.getOrientVal([r,t],[e,n]);this.shapesGroup.setLocalPosition(r)},s2.prototype.adjustTag=function(){var t,e=this.attributes,n=e.tagText,r=e.tagPosition,i=w(e.startPos,2),a=i[0],i=i[1],e=w(e.endPos,2),o=e[0],e=e[1];n&&""!==n?(Ag(this.tagShape),t=(n=this.tagShapeSpace).width,n=n.height,a=(o=w(this.getOrientVal({start:[-t/2,n/2],end:[o-a+t/2,n/2]},{start:[0,0],end:[0,e-i+n]})[r],2))[0],t=o[1],this.tagShape.setLocalPosition(a,t)):Lg(this.tagShape)},s2.prototype.getOrientVal=function(t,e){return this.isVertical?e:t},s2.tag="line-crosshair",s2.defaultOptions={style:bo},t(l2,r2=uo),Object.defineProperty(l2.prototype,"crosshairPath",{get:function(){return this.createCirclePath()},enumerable:!1,configurable:!0}),l2.prototype.update=function(t){r2.prototype.update.call(this,t)},l2.prototype.setPointer=function(t){var t=w(t,2),e=t[0],t=t[1],e=(r2.prototype.setPointer.call(this,[e,t]),w(this.localPointer,2)),t=e[0],e=e[1],n=w(this.attributes.center,2),r=n[0],n=n[1],t=this.createCirclePath(Math.pow(Math.pow(t-r,2)+Math.pow(e-n,2),.5));this.crosshairShape.attr({path:t})},l2.prototype.adjustLayout=function(){Lg(this.tagShape)},l2.prototype.createCirclePath=function(t){var e=this.attributes,n=w(e.center,2),r=n[0],n=n[1],e=e.defaultRadius;return Fy(r,n,t||e)},l2.tag="circle-crosshair",l2.defaultOptions={style:us},t(c2,i2=uo),Object.defineProperty(c2.prototype,"crosshairPath",{get:function(){return this.createPolygonPath()},enumerable:!1,configurable:!0}),c2.prototype.update=function(t){i2.prototype.update.call(this,t)},Object.defineProperty(c2.prototype,"points",{get:function(){for(var t,e,n,r,i,a,o=this.attributes,s=o.startAngle,l=o.sides,c=2*Math.PI/l,u=[1,0],f=[],h=0;h<l;h+=1)f.push((t=u,e=[0,0],n=s/180*Math.PI+c*h,a=r=i=r=void 0,r=(t=w(t,2))[0],t=t[1],i=(e=w(e,2))[0],e=e[1],r-=i,t-=e,a=Math.sin(n),n=Math.cos(n),[r*n-t*a+i,r*a+t*n+e]));return f},enumerable:!1,configurable:!0}),c2.prototype.setPointer=function(t){var t=w(t,2),e=t[0],t=t[1],e=(i2.prototype.setPointer.call(this,[e,t]),w(this.localPointer,2)),t=e[0],e=e[1],n=this.attributes.center,r=w(this.intersection([t,e]),2),i=r[0],r=r[1];i&&r&&(t=Qg(n,[t,e])/Qg(n,[i,r]),e=this.createPolygonPath(t),this.crosshairShape.attr({path:e}))},c2.prototype.adjustLayout=function(){Lg(this.tagShape)},c2.prototype.createPolygonPath=function(r){var t=this.attributes,i=t.defaultRadius,t=w(t.center,2),a=t[0],o=t[1],t=this.points.map(function(t,e){var t=w(t,2),t=w(oy([t[0],t[1]],r||i),2),n=t[0],t=t[1];return[0===e?"M":"L",a+n,o+t]});return t.push(["Z"]),t},c2.prototype.intersection=function(t){for(var e,n,r,i,a,o,s,l,t=w(t,2),c=t[0],u=t[1],f=this.points,t=w(this.attributes.center,2),h=t[0],d=t[1],p=1;p<=f.length;p+=1){var g=w(f[p-1],2),y=g[0],g=g[1],m=w(f[p%f.length],2),v=m[0],m=m[1],y=(i=[h,d],y=[y+h,g+d],g=[v+h,m+d],l=s=o=a=m=v=void 0,m=(r=w(r=[c,u],2))[0],r=r[1],a=(i=w(i,2))[0],i=i[1],o=(y=w(y,2))[0],y=y[1],s=(g=w(g,2))[0],g=g[1],l=[],(g-y)*(a-m)==(i-r)*(s-o)?(i-r)*(o-m)==(y-r)*(a-m)&&(Xg(m,a,r,i,o,y)&&Zg(l,o,y),Xg(m,a,r,i,s,g)&&Zg(l,s,g),Xg(o,s,y,g,m,r)&&Zg(l,m,r),Xg(o,s,y,g,a,i))&&Zg(l,a,i):(v=(m*(i-r)+y*(a-m)-r*(a-m)-o*(i-r))/((s-o)*(i-r)-(a-m)*(g-y)),0<=(g=(o*(g-y)+r*(s-o)-y*(s-o)-m*(g-y))/((a-m)*(g-y)-(s-o)*(i-r)))&&g<=1&&0<=v&&v<=1&&(l[0]=m+g*(a-m),l[1]=r+g*(i-r))),l);0!==y.length&&(e=(s=w(y,2))[0],n=s[1])}return[e,n]},c2.tag="polygon-crosshair",c2.defaultOptions={style:ys};var u2,f2=Ay({fill:"rgba(0,0,0,0.45)",fontSize:10,textAlign:"start",textBaseline:"middle",overflow:"clip"},"label"),h2={default:{width:12,height:12,radius:2,stroke:"#dadada",lineWidth:1,fill:"#ffffff",cursor:"pointer"},selected:{width:12,height:12,radius:2,stroke:"#3471F9",lineWidth:1,fill:"#3471F9",cursor:"pointer"}},d2={path:[["M",3,6],["L","5","8.5"],["L","8.5","4"]],lineWidth:1,cursor:"pointer"};function p2(t){return u2.call(this,t,v({x:0,y:0,labelText:"",spacing:4,checked:!1},f2))||this}t(p2,u2=Ao),p2.prototype.render=function(t,e){var n=t.checked,r=t.spacing,n=(this.checked=!!n,My(e,".checkbox-content","g").attr("className","checkbox-content").node()),e=_(t,"box"),i=_(t,"checked"),t=_(t,"label"),e=v(v({},this.checked?h2.selected:h2.default),e),i=v(v({},d2),i),i=(this.checkboxBoxShape=My(n,".checkbox-box","rect").styles(v({className:"checkbox-box",zIndex:(n.style.zIndex||0)-1},e)).node(),My(this.checkboxBoxShape,".checkbox-checked","path").styles(v({className:"checkbox-box-checked",stroke:"#fff"},i)),e=this.checkboxBoxShape,i=Number(r),{x:(r=e.getLocalBounds()).halfExtents[0]?r.max[0]+(i||0):e.style.x,y:r.halfExtents[1]?(r.min[1]+r.max[1])/2:e.style.y}),r=i.x,e=i.y;My(n,".checkbox-label","text").styles(v({className:"checkbox-label",x:r,y:e},t))},p2.tag="checkbox";var g2="gui-poptip",y2="gui-poptip-arrow",m2="gui-poptip-text",v2=((l={})[".".concat(g2)]={visibility:"visible",position:"absolute","background-color":"rgba(0, 0, 0)","box-shadow":"0px 0px 10px #aeaeae","border-radius":"3px",color:"#fff",opacity:.8,"font-size":"12px",padding:"4px 6px",display:"flex","justify-content":"center","align-items":"center","z-index":8,transition:"visibility 50ms"},l[".".concat(m2)]={"text-align":"center"},l[".".concat(g2,"[data-position='top']")]={transform:"translate(-50%, -100%)"},l[".".concat(g2,"[data-position='left']")]={transform:"translate(-100%, -50%)"},l[".".concat(g2,"[data-position='right']")]={transform:"translate(0, -50%)"},l[".".concat(g2,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},l[".".concat(g2,"[data-position='top-left']")]={transform:"translate(0,-100%)"},l[".".concat(g2,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},l[".".concat(g2,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},l[".".concat(g2,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},l[".".concat(g2,"[data-position='right-top']")]={transform:"translate(0, 0)"},l[".".concat(g2,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},l[".".concat(g2,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},l[".".concat(g2,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},l[".".concat(y2)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},l[".".concat(g2,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},l["[data-position='top'] .".concat(y2)]={bottom:"-2px"},l[".".concat(g2,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},l["[data-position='left'] .".concat(y2)]={right:"-2px"},l[".".concat(g2,"[data-position='right']")]={transform:"translate(5px, -50%)"},l["[data-position='right'] .".concat(y2)]={left:"-2px"},l[".".concat(g2,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},l["[data-position='bottom'] .".concat(y2)]={top:"-2px"},l[".".concat(g2,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},l["[data-position='top-left'] .".concat(y2)]={left:"10px",bottom:"-2px"},l[".".concat(g2,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},l["[data-position='top-right'] .".concat(y2)]={right:"10px",bottom:"-2px"},l[".".concat(g2,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},l["[data-position='left-top'] .".concat(y2)]={right:"-2px",top:"8px"},l[".".concat(g2,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},l["[data-position='left-bottom'] .".concat(y2)]={right:"-2px",bottom:"8px"},l[".".concat(g2,"[data-position='right-top']")]={transform:"translate(5px, 0)"},l["[data-position='right-top'] .".concat(y2)]={left:"-2px",top:"8px"},l[".".concat(g2,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},l["[data-position='right-bottom'] .".concat(y2)]={left:"-2px",bottom:"8px"},l[".".concat(g2,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},l["[data-position='bottom-left'] .".concat(y2)]={top:"-2px",left:"8px"},l[".".concat(g2,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},l["[data-position='bottom-right'] .".concat(y2)]={top:"-2px",right:"8px"},l),b2=void 0;var x2;function w2(t){var e=t&&document.getElementById(t);return e||((e=document.createElement("div")).setAttribute("id",t),document.body.appendChild(e)),e}function k2(t){var n,r;return n=w2,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r=r||n.apply(b2,t)}(t)}function M2(t){t=x2.call(this,nt({style:{id:"gui-poptip"}},M2.defaultOptions,t))||this;return t.visibility="visible",t.map=new Map,t.domStyles="",t.initShape(),t.render(t.attributes,t),t}t(M2,x2=Ao),Object.defineProperty(M2.prototype,"visible",{get:function(){return"visible"===this.visibility},enumerable:!1,configurable:!0}),M2.prototype.render=function(t,e){this.visibility=this.style.visibility,this.updatePoptipElement()},M2.prototype.update=function(t){this.attr(nt({},this.style,t)),this.render(this.attributes,this)},M2.prototype.bind=function(u,f){var h,t,e,d=this;u&&(h=this.style.text,e=function(){d.hideTip()},u.addEventListener("mousemove",t=function(t){var e,n,r=u,i=d.style,a=h,o=(f&&(n=(s="function"==typeof f?f.call(null,t):f).html,e=s.target,s=et(s,["html","target"]),c={},o=d.style,s=s,o&&en(c,o),s&&en(c,s),l&&en(c,l),i=c,!e&&!1!==e||(r=e),"string"==typeof n)&&(a=n),i.position),s=i.arrowPointAtCenter,l=i.follow,c=i.offset;r?(n=(e=w(function(t,e,n,r,i,a){if(void 0===i&&(i=!1),a=void 0===a?!1:a)return[t,e];var o=(a=n.getBoundingClientRect()).x,s=a.y,l=a.width,c=a.height;switch(r){case"top":return i?[o+l/2,s]:[t,s];case"left":return i?[o,s+c/2]:[o,e];case"bottom":return i?[o+l/2,s+c]:[t,s+c];case"right":return i?[o+l,s+c/2]:[o+l,e];case"top-right":case"right-top":return[o+l,s];case"left-bottom":case"bottom-left":return[o,s+c];case"right-bottom":case"bottom-right":return[o+l,s+c];default:return[o,s]}}(t.clientX,t.clientY,r,o,s,l),2))[0],i=e[1],d.showTip(n,i,{text:a,position:o,offset:c})):d.hideTip()}),u.addEventListener("mouseleave",e),this.map.set(u,[t,e]))},M2.prototype.unbind=function(t){var e,n;this.map.has(t)&&(e=(n=w(this.map.get(t)||[],2))[0],n=n[1],e&&t.removeEventListener("mousemove",e),n&&t.removeEventListener("mouseleave",n),this.map.delete(t))},M2.prototype.clear=function(){this.container.innerHTML=""},M2.prototype.destroy=function(){var t,e=this;y([],w(this.map.keys()),!1).forEach(function(t){return e.unbind(t)}),null!=(t=this.container)&&t.remove(),x2.prototype.destroy.call(this)},M2.prototype.showTip=function(t,e,n){var r,i=fn(n,"text");i&&"string"!=typeof i||(this.applyStyles(),t&&e&&n&&(r=n.offset,(n=n.position)&&this.container.setAttribute("data-position",n),this.setOffsetPosition(t,e,r),"string"==typeof i&&(n=this.container.querySelector(".".concat(m2)))&&(n.innerHTML=i),this.visibility="visible",this.container.style.visibility="visible"))},M2.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},M2.prototype.getContainer=function(){return this.container},M2.prototype.getClassName=function(){var t=this.style.containerClassName;return"".concat(g2).concat(t?" ".concat(t):"")},M2.prototype.initShape=function(){var t=this,e=this.style.id;this.container=k2(e),this.container.className=this.getClassName(),this.container.addEventListener("mousemove",function(){return t.showTip()}),this.container.addEventListener("mouseleave",function(){return t.hideTip()})},M2.prototype.updatePoptipElement=function(){var t=this.container,e=(this.clear(),this.style),n=e.id,r=e.template,e=e.text,n=(this.container.setAttribute("id",n),this.container.className=this.getClassName(),'<span class="'.concat(y2,'"></span>'));t.innerHTML=n,qe(r)?t.innerHTML+=r:r&&tn(r)&&t.appendChild(r),e&&(t.getElementsByClassName(m2)[0].textContent=e),this.applyStyles(),this.container.style.visibility=this.visibility},M2.prototype.applyStyles=function(){var t,e=Vg({},v2,this.style.domStyles),e=Object.entries(e).reduce(function(t,e){var e=w(e,2),n=e[0],e=e[1],e=Object.entries(e).reduce(function(t,e){var e=w(e,2),n=e[0],e=e[1];return"".concat(t).concat(n,": ").concat(e,";")},"");return"".concat(t).concat(n,"{").concat(e,"}")},"");this.domStyles!==e&&(this.domStyles=e,(t=this.container.querySelector("style"))&&this.container.removeChild(t),(t=document.createElement("style")).innerHTML=e,this.container.appendChild(t))},M2.prototype.setOffsetPosition=function(t,e,n){var n=w(n=void 0===n?this.style.offset:n,2),r=n[0],n=n[1],n=void 0===n?0:n;this.container.style.left="".concat(t+(void 0===r?0:r),"px"),this.container.style.top="".concat(e+n,"px")},M2.tag="poptip",M2.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:v2,template:'<div class="'.concat(m2,'"></div>')}};t(_2,O2=X.Group),Object.defineProperty(_2.prototype,"margin",{get:function(){return this.$margin},set:function(t){this.$margin=Oy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(_2.prototype,"padding",{get:function(){return this.$padding},set:function(t){this.$padding=Oy(t)},enumerable:!1,configurable:!0}),_2.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=w(this.$margin,4),a=i[0],o=i[1],s=i[2],i=i[3];return new zg(e-i,n-a,r+i+o,t+a+s)},_2.prototype.appendChild=function(t,e){return t.isMutationObserved=!0,O2.prototype.appendChild.call(this,t,e),t},_2.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,t=t.height,n=w(this.$padding,4),r=n[0],i=n[1],a=n[2],n=n[3],o=w(this.$margin,4),s=o[0],o=o[3];return new zg(n+o,r+s,e-n-i,t-r-a)},_2.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:iy,grid:ay})?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){}},_2.prototype.bindEvents=function(){var e=this;this.layoutEvents.forEach(function(t){e.addEventListener(t,function(t){t.target.isMutationObserved=!0,e.layout()})})},_2.prototype.attributeChangedCallback=function(t,e,n){"margin"===t?this.margin=n:"padding"===t&&(this.padding=n),this.layout()};var O2,r=_2;function _2(t){var e=O2.call(this,t)||this,t=(e.layoutEvents=[X.ElementEvent.BOUNDS_CHANGED,X.ElementEvent.INSERTED,X.ElementEvent.REMOVED],e.$margin=Oy(0),e.$padding=Oy(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}X.runtime.enableCSSParsing=!1;function S2(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 _1()([[0,0],[s,l]]);s=[[t-a,i-o]].concat(e.length?e:[0,0]);const c=[n[0]-a,n[1]-o],[u,f]=s;return l=c,t=u,i=f,e=h0(l,t),t=h0(t,i),i=h0(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])),_1()(s)}const E2=J1(t=>{var e=t.attributes,{x:n,y:r,x0:i=n,y0:a=r,background:o,connector:s,startMarker:l,endMarker:c,coordCenter:u}=e,e=et(e,["class","transform","rotate","x","y","x0","y0","background","connector","startMarker","endMarker","coordCenter"]),f=rt(e,"background"),h=f["padding"],f=et(f,["padding"]),d=rt(e,"connector"),{points:p=[]}=d,d=et(d,["points"]),i=[[+i,+a],[+n,+r]],a=it(t).maybeAppend("text","text").style("zIndex",0).call(L,Object.assign({textBaseline:"middle"},e)).node(),n=S2(it(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}}(a,h)).call(L,o?f:{}).node(),i,p,u),r=l&&new Hy({id:"startMarker",style:Object.assign({x:0,y:0},rt(e,"startMarker"))}),a=c&&new Hy({id:"endMarker",style:Object.assign({x:0,y:0},rt(e,"endMarker"))});it(t).maybeAppend("connector","path").style("zIndex",0).style("path",n).style("markerStart",r).style("markerEnd",a).call(L,s?d:{})}),A2=t=>{const l=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=et(M0(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 it(new E2).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()}};A2.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const L2=J1(t=>{var e=et(t.attributes,["class","x","y"]);const n=rt(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])]}(it(t).maybeAppend("marker",()=>new Hy({})).call(t=>t.node().update(Object.assign({symbol:r},n))).node());it(t).maybeAppend("text","text").style("x",i).style("y",a).call(L,e)}),T2=t=>{const s=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=M0(r,i,a,o),i=r["defaultColor"],a=et(r,["defaultColor"]),{color:o,text:r=""}=e,e={text:String(r),stroke:o||i,fill:o||i},[[r,o]]=t;return it(new L2).call(L,a).style("x",r).style("y",o).call(L,e).call(L,s).node()}},P2=(T2.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},J1(t=>{var{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes;it(t).maybeAppend("connect-path",()=>new X.Path({})).style("d",n).call(L,i),it(t).maybeAppend("area-path",()=>new X.Path({})).style("d",e).call(L,r)}));const N2=t=>{const{curve:u,gradient:l=!1,defined:f=t=>!Number.isNaN(t)&&null!=t,connect:h=!1}=t,d=et(t,["curve","gradient","defined","connect"]);return(t,e,c,n)=>{var{mark:r,shape:i,defaultShape:a}=e,n=M0(n,r,i,a),r=n["defaultColor"],i=et(n,["defaultColor"]),{color:a=r,seriesColor:n,seriesX:r,seriesY:o}=e,e=_0(c,e),n=l&&n?x0(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,f=e[t],h=e[t+l];[...f,...h].some(t=>!n(t))?o=!0:(r.push(f),i.push(h),o&&s&&(o=!1,[c,u]=s,a.push([c,f,u,h])),s=[f,h])}return[r.concat(i),a]}(t,f),a=rt(s,"connect"),i=!!o.length,n=t=>it(new X.Path({})).style("d",t).call(L,s).node();return Qc(c)?(e=t=>{const n=c.getCenter(),r=t.slice(0,t.length/2),i=t.slice(t.length/2);return t=S1().curve(E1),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 T1(a())},delete t.lineX0,t.lineEndAngle=function(){return T1(o())},delete t.lineX1,t.lineInnerRadius=function(){return T1(s())},delete t.lineY0,t.lineOuterRadius=function(){return T1(l())},delete t.lineY1,t.curve=function(t){return arguments.length?e(L1(t)):e()._curve},t.angle((t,e)=>p0(f0(r[e],n))).outerRadius((t,e)=>h0(r[e],n)).innerRadius((t,e)=>h0(i[e],n)).defined((t,e)=>[...r[e],...i[e]].every(f)).curve(u)(i);var e,a,o,s,l},!i||h&&!Object.keys(a).length?n(e(r)):i&&!h?n(e(t)):it(new P2).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(Zc(c)?S1().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(f)):S1().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(f))).curve(u)(n)},!i||h&&!Object.keys(a).length?n(e(r)):i&&!h?n(e(t)):it(new P2).style("areaStyle",s).style("connectStyle",Object.assign(Object.assign({},a),d)).style("areaPath",e(t)).style("connectPath",o.map(e).join("")).node())}},j2=(N2.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=Qc(n)?W1:k1;return N2(Object.assign({curve:i},a))(t,e,n,r)}),C2=(j2.props=Object.assign(Object.assign({},N2.props),{defaultMarker:"point"}),t=>{const{alpha:a=.5}=t,o=et(t,["alpha"]);return(t,e,n,r)=>{var i=Qc(n)?D1:I1;return N2(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),R2=(C2.props=Object.assign(Object.assign({},N2.props),{defaultMarker:"smooth"}),i=>(t,e,n,r)=>N2(Object.assign({curve:H1},i))(t,e,n,r)),B2=(R2.props=Object.assign(Object.assign({},N2.props),{defaultMarker:"hvh"}),i=>(t,e,n,r)=>N2(Object.assign({curve:V1},i))(t,e,n,r)),I2=(B2.props=Object.assign(Object.assign({},N2.props),{defaultMarker:"vh"}),i=>(t,e,n,r)=>N2(Object.assign({curve:q1},i))(t,e,n,r)),F2=(I2.props=Object.assign(Object.assign({},N2.props),{defaultMarker:"hv"}),t=>{const l=t["arrowSize"],c=et(t,["arrowSize"]);return(t,e,n,r)=>{var i,{mark:a,shape:o,defaultShape:s}=e,r=M0(r,a,o,s),a=r["defaultColor"],o=et(r,["defaultColor"]),{color:s=a,transform:r}=e,[e,a]=t,t=f1();return t.moveTo(...e),t.lineTo(...a),l&&([e,i]=v0(e,a,{arrowSize:l}),t.moveTo(...a),t.lineTo(...e),t.moveTo(...a),t.lineTo(...i)),it(new X.Path).call(L,o).style("d",t.toString()).style("stroke",s).style("transform",r).call(L,c).node()}}),D2=(F2.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=M0(r,i,a,o),i=r["defaultColor"],a=et(r,["defaultColor"]),{color:o=i,transform:r}=e,[e,i]=t,t=f1();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]),it(new X.Path).call(L,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(L,s).node()}});D2.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const z2=t=>{const{cornerRatio:u=1/3}=t,f=et(t,["cornerRatio"]);return(t,e,n,r)=>{var i,a,{mark:o,shape:s,defaultShape:l}=e,r=M0(r,o,s,l),o=r["defaultColor"],s=et(r,["defaultColor"]),{color:l=o,transform:r}=e,[e,o]=t,c=(t=e,e=o,o=n,n=u,a=f1(),Qc(o)?(i=h0(t,c=o.getCenter()),i=(h0(e,c)-i)*n+i,a.moveTo(t[0],t[1]),b0(a,t,e,c,i)):Zc(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 it(new X.Path).call(L,s).style("d",c.toString()).style("stroke",l).style("transform",r).call(L,f).node()}},W2=(z2.props={defaultMarker:"vhv",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=M0(r,i,a,o),i=r["defaultColor"],a=et(r,["defaultColor"]),{color:o=i,transform:r}=e,[e,i]=t,t=f1();return t.moveTo(e[0],e[1]),Qc(n)?(n=n.getCenter(),t.quadraticCurveTo(n[0],n[1],i[0],i[1])):b0(t,e,i,m0(e,i),h0(e,i)/2),it(new X.Path).call(L,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(L,s).node()}}),G2=(W2.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const u=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=M0(r,i,a,o),i=r["defaultColor"],a=et(r,["defaultColor"]),{color:o=i,src:r="",size:e=32,transform:i=""}=e,{width:s=e,height:l=e}=u,[[t,c]]=t,t=t-Number(s)/2,s=c-Number(l)/2;return it(new X.Image).call(L,a).style("x",t).style("y",s).style("width",e).style("height",e).style("img",r).style("stroke",o).style("transform",i).call(L,u).node()}});G2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const H2=t=>{const l=et(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=M0(r,e,i,a),e=r["defaultColor"],i=et(r,["defaultColor"]),a=function(i,t){const a=f1();if(Qc(t)){const o=t.getCenter();t=[...i,i[0]];const s=t.map(t=>h0(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?b0(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 it(new X.Path).call(L,i).style("d",a.toString()).style("stroke",o||e).style("fill",o||e).style("transform",s).call(L,l).node()}};H2.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const V2=t=>{const l=et(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=M0(r,e,i,a),e=r["defaultColor"],i=et(r,["defaultColor"]),a=function(t,e){var n,[t,r,i,a]=t,o=f1();return Qc(e)?(n=h0(e=e.getCenter(),t),o.moveTo(t[0],t[1]),o.quadraticCurveTo(e[0],e[1],i[0],i[1]),b0(o,i,a,e,n),o.quadraticCurveTo(e[0],e[1],r[0],r[1]),b0(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 it(new X.Path).call(L,i).style("d",a.toString()).style("fill",o||e).style("stroke",o||e).style("transform",s).call(L,l).node()}};V2.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const q2=t=>{const y=et(t,[]);return(t,e,n,r)=>{var i,a,o,s,l,c,u,{mark:e,shape:f,defaultShape:h,color:d,transform:p}=e,r=M0(r,e,f,h),{defaultColor:e,fill:f=e,stroke:h=e}=r,e=et(r,["defaultColor","fill","stroke"]),g=(r=t,t=n,n=f1(),Qc(t)?([i,a]=t=t.getCenter(),o=d0(f0(r[0],t)),s=d0(f0(r[1],t)),g=h0(t,r[2]),l=h0(t,r[3]),c=h0(t,r[8]),u=h0(t,r[10]),t=h0(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 it(new X.Path).call(L,e).style("d",g.toString()).style("stroke",h).style("fill",d||f).style("transform",p).call(L,y).node()}};q2.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Y2=t=>{const s=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=M0(r,i,a,o),{defaultColor:i,lineWidth:a}=r,o=et(r,["defaultColor","lineWidth"]),{color:r=i,size:i=a}=e,t=(a=t,Qc(t=n)?(t=t.getCenter(),b1()({startAngle:0,endAngle:2*Math.PI,outerRadius:h0(a[0],t),innerRadius:h0(a[1],t)})):_1().x(t=>t[0]).y(t=>t[1])(a)),a=(a=n,n=e.transform,Qc(a)?([a,e]=a.getCenter(),`translate(${a}, ${e}) `+(n||"")):n);return it(new X.Path({})).call(L,o).style("d",t).style("stroke",r).style("lineWidth",i).style("transform",a).call(L,s).node()}};function $2(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}Y2.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const U2=J1(t=>{var e=t.attributes,{points:n,endMarker:r=!0}=e,e=et(e,["points","class","endMarker","direction"]),i=rt(e,"endMarker"),n=(n=n,_1().x(t=>t[0]).y(t=>t[1])(n));it(t).maybeAppend("connector","path").style("path",n).style("markerEnd",r?new Hy({className:"marker",style:Object.assign(Object.assign({},i),{symbol:$2})}):null).call(L,e)});const K2=t=>{const{offset:s=0,connectLength1:l}=t,c=et(t,["offset","connectLength1"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=M0(r,i,a,o),{defaultColor:i,connectLength1:a=l}=r,o=et(r,["defaultColor","connectLength1"]),{color:r,transform:e}=e,n=function(t,e,n,r=0){var[[e,i],[a,o]]=e;if(Zc(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 it(new U2).call(L,o).style("points",n).style("stroke",r||i).style("transform",e).call(L,c).node()}};function X2(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=Uu(a.x,c),i=Uu(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 Z2(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:f}=k0(e,i,[t,n]),h="inside"===r?(u+f)/2:f;e=J2(h,a,o),t=(()=>{var[t,e]=i,n=l+.5*(c-l),[n,t]="inside"===r?Q2(s,h,n):m0(t,e);return{x:n,y:t}})();return Object.assign(Object.assign({},t),{textAlign:"inside"===r?"center":"start",textBaseline:"middle",rotate:e})}function Q2(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function J2(t,e,n){return e?(e=n?0:Math.sin(t)<0?90:-90,t/Math.PI*180+e):0}function tx(t,e,n,r){var{y:n,y1:i,autoRotate:a,rotateToAlignArc:o,radius:s=.5,offset:l=0}=n,e=k0(r,e,[n,i]),{startAngle:n,endAngle:i}=e,r=r.getCenter(),n=(n+i)/2,i={textAlign:"center",textBaseline:"middle",rotate:J2(n,a,o)},{innerRadius:a,outerRadius:o}=e,[e,r]=Q2(r,n,a+(o-a)*s+l);return Object.assign({x:e,y:r},i)}function ex(t,e,n){var n=n["bounds"],[n]=n;return{x:n[0],y:n[1]}}function nx(t,e,n,r){var i=n["bounds"];return 1===i.length?ex(0,0,n):(Jc(r)?Z2:ru(r)?tx:X2)(t,e,n,r)}function rx(t,e,n){var{innerRadius:n,outerRadius:t}=k0(n,t,[e.y,e.y1]);return n+(t-n)}function ix(t,e,n){var{startAngle:n,endAngle:t}=k0(n,t,[e.y,e.y1]);return(n+t)/2}function ax(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,f=r.getCenter(),h=ix(e,n,r),d=0<Math.sin(h)?1:-1,i=J2(h,i,a),a={textAlign:0<d||Jc(r)?"start":"end",textBaseline:"middle",rotate:i},i=rx(e,n,r),[[e,n],[r,f],[h,i]]=function(t,e,n,r,i){var[n,a]=Q2(t,e,n),[t,r]=Q2(t,e,r);return[[n,a],[t,r],[t+(0<Math.sin(e)?1:-1)*i,r]]}(f,h,i,i+(s?l:o),s?c:0),l=s?+u*d:0,o=h+l,c={connector:s,connectorPoints:[[r-o,f-i],[h-o,i-i]]};return Object.assign(Object.assign({x0:e,y0:n,x:h+l,y:i},a),c)}K2.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var ox=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=Dc(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=d0(f0(l(e+1),s))/Math.PI*180;return{x:i[0],y:i[1],transform:`rotate(${l})`,textAlign:"center",textBaseline:"middle"}},bottom:nx,bottomLeft:nx,bottomRight:nx,inside:nx,left:nx,outside:function(t,e,n,r){var i=n["bounds"];return 1===i.length?ex(0,0,n):(Jc(r)?Z2:ru(r)?ax:X2)(t,e,n,r)},right:nx,spider:function(t,e,n,r){var i,a,o,s,l,c;return ru(r)?({connectorLength:c,connectorLength2:i,connectorDistance:a}=n,o=et(ax(0,e,n,r),[]),s=r.getCenter(),l=rx(e,n,r),e=ix(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 ru(r)?({connectorLength:o,connectorLength2:i,connectorDistance:a}=n,{x0:n,y0:s}=e=et(ax(0,e,n,r),[]),l=r.getCenter(),r=function(t){if(ru(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=p0([n-l[0],s-l[1]]),n=0<Math.sin(o)?1:-1,[s,l]=Q2(l,o,r),e.x=s+(i+a)*n,e.y=l,e):{}},top:nx,topLeft:nx,topRight:nx});function sx(t,e,n,r,i){var a=e["position"],a=(o=n,void 0!==(a=a)?a:ru(o)?"inside":Zc(o)?"right":"top"),o=r["inside"===a?"innerLabel":"label"],r=Object.assign({},o,e),e=ox[a.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})];if(e)return Object.assign(Object.assign({},o),e(a,t,r,n,i));throw new Error("Unknown position: "+a)}const lx=o=>(t,e,n,r)=>{var i=e["text"],a=et(e,["text","x","y"]),t=sx(t,e,n,r,o),{rotate:e=0,transform:r=""}=t,t=et(t,["rotate","transform"]);return it(new E2).call(L,t).style("text",""+i).style("transform",r+`rotate(${+e})`).style("coordCenter",n.getCenter()).call(L,a).node()},cx=(lx.props={defaultMarker:"point"},t=>{const s=t["colorAttribute"],l=et(t,["arrow","colorAttribute"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=et(M0(r,i,a,o),["stroke"]),{d:i,color:a}=e;return it(new X.Path).call(L,r).style("d",i).style(s,a).call(L,l).node()}}),ux=(cx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>cx(Object.assign({colorAttribute:"fill"},t))),fx=(ux.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>cx(Object.assign({fill:"none",colorAttribute:"stroke"},t))),hx=(fx.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const a=t["render"],o=et(t,["render"]);return(t,e,n,r)=>{var[[t,i]]=t;return a(Object.assign(Object.assign({},o),{x:t,y:i}))}}),f=(hx.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},{BLACK:"#000",WHITE:"#fff",STROKE:"#416180"}),dx=t=>{var e={defaultColor:"#5B8FF9",defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:f.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:f.BLACK,lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,strokeWidth:0,connectorStroke:f.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:f.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:f.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:f.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:f.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:f.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:f.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:f.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:f.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:f.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{arrow:!1,gridLineDash:[0,0],gridLineWidth:.5,gridStroke:f.BLACK,gridStrokeOpacity:.05,labelAlign:"horizontal",labelFill:f.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,line:!1,lineLineWidth:.5,lineStroke:f.BLACK,lineStrokeOpacity:.45,tickLength:4,tickLineWidth:1,tickStroke:f.BLACK,tickStrokeOpacity:.25,titleFill:f.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,titleTransformOrigin:"center"},axisTop:{gridDirection:"positive",labelDirection:"negative",labelSpacing:8,tickDirection:"negative",titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle"},axisBottom:{gridDirection:"negative",labelDirection:"positive",labelSpacing:12,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",titleSpacing:0},axisRadar:{girdClosed:!0,gridStrokeOpacity:.3,gridType:"surround",label:!1,tick:!1,titlePosition:"start"},legend:{backgroundFill:"transparent",itemBackgroundFill:"transparent",itemLabelFill:f.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemValueFill:f.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",navButtonFill:f.BLACK,navButtonFillOpacity:.65,navPageNumFill:f.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,padding:8,title:!1,titleFill:f.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4},continuousLegend:{handleHeight:12,handleLabelFill:f.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal",handleMarkerFill:f.BLACK,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:f.BLACK,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:f.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal",labelSpacing:8,tick:!0},label:{fill:f.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:f.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:f.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},slider:{trackSize:16,trackFill:f.STROKE,trackFillOpacity:1,selectionFill:"#5B8FF9",selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:f.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:f.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:f.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:f.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)},h=(dx.props={},{BLACK:"#fff",WHITE:"#000",STROKE:"#416180"}),px=t=>{var e={defaultColor:"#5B8FF9",defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:h.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:h.BLACK,lineWidth:1}},text:{text:{fill:h.BLACK,fillOpacity:.65,fontSize:12,strokeWidth:0,connectorStroke:h.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:h.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:h.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:h.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:h.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:h.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:h.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:h.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:h.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:h.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{arrow:!1,gridLineDash:[0,0],gridLineWidth:.5,gridStroke:h.BLACK,gridStrokeOpacity:.05,labelAlign:"horizontal",labelFill:h.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,lineLineWidth:.5,lineStroke:h.BLACK,lineStrokeOpacity:.45,tickLength:4,tickLineWidth:1,tickStroke:h.BLACK,tickStrokeOpacity:.25,titleFill:h.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,titleTransformOrigin:"center"},axisTop:{gridDirection:"positive",labelDirection:"negative",labelSpacing:8,tickDirection:"negative",titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle"},axisBottom:{gridDirection:"negative",labelDirection:"positive",labelSpacing:12,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:h.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemValueFill:h.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",navButtonFill:h.BLACK,navButtonFillOpacity:.45,navPageNumFill:h.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,padding:8,title:!1,titleFill:h.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4},continuousLegend:{handleHeight:12,handleLabelFill:h.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal",handleMarkerFill:h.BLACK,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:h.BLACK,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:h.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal"},label:{fill:h.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:h.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:h.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},slider:{trackSize:16,trackFill:h.STROKE,trackFillOpacity:1,selectionFill:"#5B8FF9",selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:h.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:h.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{},title:{titleFill:h.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:h.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)},gx=(px.props={},{BLACK:"#000",WHITE:"#fff",STROKE:"#888"}),yx=t=>{var e={defaultColor:"#4e79a7",defaultCategory10:"tableau10",defaultCategory20:"tableau10",defaultSize:1,elementActiveStroke:gx.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:gx.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:gx.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:gx.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:gx.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:gx.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:gx.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:gx.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:gx.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:gx.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:gx.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:gx.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:gx.BLACK,labelFillOpacity:1,labelFontSize:10,labelFontWeight:"normal",labelSpacing:4,line:!0,lineLineWidth:1,lineStroke:"#888",lineStrokeOpacity:1,tickLength:5,tickLineWidth:1,tickStroke:gx.STROKE,tickStrokeOpacity:1,titleFill:gx.BLACK,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold",titleSpacing:12,titleTransformOrigin:"center"},axisTop:{gridDirection:"positive",labelDirection:"negative",tickDirection:"negative",titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle"},axisBottom:{gridDirection:"negative",labelDirection:"positive",labelSpacing:8,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:gx.BLACK,itemLabelFillOpacity:1,itemLabelFontSize:10,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,4],itemValueFill:gx.BLACK,itemValueFillOpacity:1,itemValueFontSize:10,itemValueFontWeight:"normal",navButtonFill:gx.BLACK,navButtonFillOpacity:.45,navButtonSize:6,navPageNumFill:gx.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:10,padding:8,title:!1,titleFill:gx.BLACK,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold",titleSpacing:4},continuousLegend:{handleHeight:12,handleLabelFill:gx.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:10,handleLabelFontWeight:"normal",handleMarkerFill:gx.BLACK,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:gx.BLACK,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:gx.BLACK,labelFillOpacity:.45,labelFontSize:10,labelFontWeight:"normal",title:!1},label:{fill:gx.BLACK,fillOpacity:.65,fontSize:10,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:gx.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:gx.WHITE,fontSize:10,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},slider:{trackSize:16,trackFill:gx.STROKE,trackFillOpacity:.05,selectionFill:"#4e79a7",selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:gx.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:gx.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:10,handleLabelFontWeight:"normal"},scrollbar:{},title:{titleFill:gx.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:gx.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)};function mx(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)]}yx.props={};var vx,bx=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function xx(t){var e;if(e=bx.exec(t))return new wx({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 wx(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 kx(t,e){var n,e=mx(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+""}xx.prototype=wx.prototype,wx.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 Mx={"%":(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)=>kx(100*t,e),r:kx,s:function(t,e){var n,r,i=mx(t,e);return i?(n=i[0],(i=(i=i[1])-(vx=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")+mx(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 Ox(t){return t}var _x,Sx=Array.prototype.map,Ex=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ax(t){var e,s,l,k=void 0===t.grouping||void 0===t.thousands?Ox:(s=Sx.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]+"",M=void 0===t.decimal?".":t.decimal+"",O=void 0===t.numerals?Ox:(e=Sx.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}),a=void 0===t.percent?"%":t.percent+"",_=void 0===t.minus?"−":t.minus+"",S=void 0===t.nan?"NaN":t.nan+"";function o(t){var c=(t=xx(t)).fill,u=t.align,f=t.sign,e=t.symbol,h=t.zero,d=t.width,p=t.comma,g=t.precision,y=t.trim,m=t.type,v=("n"===m?(p=!0,m="g"):Mx[m]||(void 0===g&&(g=12),y=!0,m="g"),(h||"0"===c&&"="===u)&&(h=!0,c="0",u="="),"$"===e?r:"#"===e&&/[boxX]/.test(m)?"0"+m.toLowerCase():""),b="$"===e?i:/[%p]/.test(m)?a:"",x=Mx[m],w=/[defgprs%]/.test(m);function n(t){var e,n,r,i=v,a=b;if("c"===m)a=x(t)+a,t="";else{var o=(t=+t)<0||1/t<0;if(t=isNaN(t)?S:x(Math.abs(t),g),y&&(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&&"+"!==f?!1:o)?"("===f?f:_:"-"===f||"("===f?"":f)+i,a=("s"===m?Ex[8+vx/3]:"")+a+(o&&"("===f?")":""),w)for(e=-1,n=t.length;++e<n;)if((r=t.charCodeAt(e))<48||57<r){a=(46===r?M+t.slice(e+1):t.slice(e))+a,t=t.slice(0,e);break}}p&&!h&&(t=k(t,1/0));var s=i.length+t.length+a.length,l=s<d?new Array(d-s+1).join(c):"";switch(p&&h&&(t=k(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 O(t)}return g=void 0===g?6:/[gprs]/.test(m)?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=xx(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor((t=e,((t=mx(Math.abs(t)))?t[1]:NaN)/3)))),r=Math.pow(10,-e),i=Ex[8+e/3];return function(t){return n(r*t)+i}}}}function Lx(t,e,n){return t.querySelector(e)?it(t).select(e):it(t).append(n)}function Tx(t){return Array.isArray(t)?t.join(", "):""+(t||"")}function Px(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}}ws=Ax({thousands:",",grouping:[3],currency:["$",""]}),_x=ws.format,ws.formatPrefix;class Nx extends r{update(t){this.attr(t);var e,t=et(t,["width","height"]);null!=(e=null==(e=this.children)?void 0:e[0])&&e.update(t)}}function jx(t,e){return null==(t=t.filter(t=>t.getOptions().name===e))?void 0:t[0]}function Cx(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 Rx(t){const n=["arrow","crosshairs","grid","handle","handleLabel","indicator","label","line","tick","tip","title","trunc"],r={};return Object.entries(t).forEach(([t,e])=>{n.includes(t)?r["show"+Ze(t)]=e:r[t]=e}),r}function Bx(t){var{innerWidth:t,innerHeight:e}=t.getOptions();return[t,e]}function Ix(t){return"number"!=typeof t||Math.abs(t)<1e-15?t:parseFloat(t.toFixed(15))}function Fx(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]=mc(e,t=>+t),i=i.getOptions()["tickCount"],t(c,l,i)):e,c=r?t.filter(r):t;const u=(null==(l=a.getFormatter)?void 0:l.call(a))||n,f=t=>"object"==typeof t?t:String(t),h=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 Cp({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 nu(i)?(e=i.map("bottom"===r?[t,1]:[0,t]),"bottom"===r?(n=e[0],new Cp({domain:[0,a],range:[0,1]}).map(n)):"left"===r?(n=e[1],new Cp({domain:[0,o],range:[0,1]}).map(n)):t):t}}(o,s);return Qc(s)||Zc(s)?(i=c.map((t,e,n)=>{var r,i=(null==(i=a.getBandWidth)?void 0:i.call(a,t))/2||0,i=h(a.map(t)+i);return{value:Zc(s)&&null!=(r=a.getTicks)&&r.call(a)?1-i:i,label:f(u(Ix(t),e,n)),id:String(e)}}),Jc(s)&&"center"===o?i.map(t=>{var e=t["value"],t=et(t,["value"]);return Object.assign({value:1-e},t)}):i):c.map((t,e,n)=>{var r=(null==(r=a.getBandWidth)?void 0:r.call(a,t))/2||0;return{value:d(h(a.map(t)+r)),label:f(u(Ix(t),e,n)),id:String(e)}})}function Dx(t,e,n){var r;return!(Qc(r=e)&&Zc(r)||eu(e))&&(void 0===t?!!n.getTicks:t)}function zx(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"+Hu(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 Wx,cs=r=>t=>{var{labelFormatter:e=t=>""+t}=t,e="string"==typeof e?_x(e):e;const n=Object.assign(Object.assign({},t),{labelFormatter:e});return(...t)=>r(n)(...t)};const Gx=cs(t=>{const{direction:o="left",important:s={},labelFormatter:l=t=>""+t,orientation:c,position:u,style:f={},title:h,tickCount:d,tickFilter:p,tickMethod:g,transform:y}=t,m=et(t,["direction","important","labelFormatter","order","orientation","position","size","style","title","tickCount","tickFilter","tickMethod","transform"]);return({scales:[t],value:e,coordinate:n,theme:r})=>{var e=e["bbox"],i=t.getOptions()["domain"],r=zx(0,0,r,o,u,c),r=Object.assign(Object.assign(Object.assign({},r),f),m),a=function(t,e){var[e,n]=Bx(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]=iu(r);const[u,f]=au(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:f-u==360,gridCenter:[t+n,i+s],gridControlAngles:new Array(3).fill(0).map((t,e,n)=>(f-u)/(n.length-1)*e)}}}return{}}(u,c,e,n),i=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},r),{type:"linear",data:Fx(t,i,d,l,p,g,u,n),titleText:Tx(h),labelOverlap:function(t=[],e){var{labelAutoRotate:e=!0,labelAutoHide:n=!1,labelAutoEllipsis:r=!1}=e;const i=[...t];return(t=(e,t)=>{t?-1!==(t=i.findIndex(t=>t.type===e.type))?i[t]=e:i.push(e):-1!==(t=i.findIndex(t=>t.type===e.type))&&i.splice(t,1)})({type:"rotate",optionalAngles:[0,15,30,45,60,90]},e),t({type:"ellipsis",minLength:20},r),t({type:"hide"},n),i}(y,r),grid:Dx(r.grid,n,t),gridLength:a,line:!0}),r.line?null:{lineOpacity:0}),e),s);return new Hv({className:"axis",style:Rx(i)})}}),Hx=cs(t=>{const{position:o,labelFormatter:s=t=>""+t,tickFilter:l,tickCount:c,tickMethod:u,important:f={},style:e={}}=t,h=et(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=Fx(t,i,c,s,l,u,o,n),[i,a]=iu(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]=au(i),[l,c]=Bx(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?(Bx(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:8,tickDirection:"negative",gridDirection:"positive"})}(o,e,i,a,n),i=r["axis"];return new Hv({style:Rx(nt({},i,e,Object.assign(Object.assign({type:"arc",data:t,titleText:Tx(d),grid:p},h),f)))})}}),Vx=(Gx.props={defaultPosition:"center",defaultSize:45,defaultOrder:0},Hx.props={defaultPosition:"outer",defaultOrientation:"vertical",defaultSize:45,defaultOrder:0},t=>Gx(t)),qx=(Vx.props=Object.assign(Object.assign({},Gx.props),{defaultPosition:"bottom"}),t=>Gx(t));qx.props=Object.assign(Object.assign({},Gx.props),{defaultPosition:"left"});const Yx=a=>{const{important:o={}}=a,s=et(a,["important"]);return t=>{var e,{theme:n,coordinate:r,value:i}=t;return Gx(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]=au(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 $x(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(je(t))return t[t.length-1]}(t.split("."));return()=>function(t,e){var{fill:n,stroke:r,lineWidth:i,color:a}=e,o=et(e,["d","fill","strokeWidth","path","stroke","lineWidth","color"]);const s=sg.get(t)||sg.get("point");return(...t)=>{return new X.Path({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 Ux(t,{scales:e,library:n,markState:r}){var i=jx(e,"shape");const[a,o]=function(t,e){const n=jx(t,"shape");var r=jx(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)=>$x(a+"."+o[e],n,0,0,{color:t.color}):"function"==typeof s?s:(t,e)=>$x(s||o[e],n,0,0,{color:t.color})}function Kx(t,e){var{labelFormatter:n=t=>""+t}=t,r=e["scales"],e={itemMarker:Ux(t,e),itemMarkerSize:(t=jx(t=r,"size"))?2*t.map(NaN):8,itemMarkerOpacity:function(t){if(t=jx(t,"opacity")){const n=t.getOptions()["range"];return(t,e)=>n[e]}}(r)};const i="string"==typeof n?_x(n):n,a=jx(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)}))})}Yx.props=Object.assign(Object.assign({},Gx.props),{defaultPosition:"center"});const Xx=l=>{const{position:c,title:u}=l,f=et(l,["labelFormatter","layout","order","orientation","position","size","title"]),{gridCol:h,gridRow:d}=f;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}=Cx(t,e,n);return{width:i,height:a}}(e,l,Xx),e=Px(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,h),i=Object.assign({orientation:["right","left","center"].includes(c)?"vertical":"horizontal",width:i,height:a,gridCol:null!==h&&void 0!==h?h:s,gridRow:null!==d&&void 0!==d?d:o,rowPadding:0,colPadding:8,titleText:Tx(u)},Kx(l,t)),{legend:a={}}=n,s=new Nx({style:Object.assign({x:r.x,y:r.y,width:r.width,height:r.height},e)});return s.appendChild(new pb({className:"legend-category",style:Rx(Object.assign({},a,i,f))})),s}};Xx.props={defaultPosition:"top",defaultOrder:1,defaultSize:40};const Zx=l=>{const{labelFormatter:c,position:u,title:f,style:h}=l,d=et(l,["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=Px(u,null==(s=null==(s=null==(s=e.scales)?void 0:s[0])?void 0:s.guide)?void 0:s.layout),r=new Nx({style:Object.assign({x:r,y:i,width:a,height:o},s)}),{continuousLegend:i={}}=n;return r.appendChild(new Rb({style:Rx(Object.assign({},i,Object.assign(Object.assign({titleText:Tx(f),titleFontSize:12,handle:!1,indicator:!1,labelAlign:"value",labelFormatter:"string"==typeof c?t=>_x(c)(t.label):c},function(t,e,n,r){const a=jx(t,"color");var{domain:i,range:o}=a.getOptions();const[s,l]=[i[0],i.slice(-1)[0]],{orientation:c,width:u,height:f,length:h}=Cx(e,n,r);if(i={orientation:c,width:u,height:f},a instanceof Dp){e=a.thresholds;if(a instanceof Gp||a instanceof Vp)return Object.assign(Object.assign({color:o},i),{data:[s,...e,l].map((t,e)=>({value:t/l,label:t}))});const p=[-1/0,...e,1/0].map((t,e)=>({value:e,label:t}));return Object.assign(Object.assign({data:p},i),{color:o,labelFilter:(t,e)=>0<e&&e<p.length-1})}const d=jx(t,"opacity");return Object.assign(Object.assign({},i),{data:a.getTicks().map(t=>({value:t})),color:new Array(h).fill(0).map((t,e)=>{var e=(l-s)/(h-1)*e+s,n=a.map(e);const i=d?d.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})`)})})}(t,e,l,Zx)),h),d))})),r}},Qx=(Zx.props={defaultPosition:"top",defaultOrientation:"vertical",defaultOrder:1,defaultSize:60,defaultLength:300},e=>(...t)=>Zx(Object.assign({},{block:!0},e))(...t)),Jx=(Qx.props=Object.assign(Object.assign({},Zx.props),{defaultPosition:"top",defaultOrientation:"horizontal"}),t=>Zx(Object.assign({},{type:"size",block:!0,tick:!1},t))),tw=(Jx.props=Object.assign(Object.assign({},Zx.props),{defaultPosition:"top",defaultOrientation:"horizontal"}),t=>Zx(Object.assign({},{type:"size",tick:!1,labelFilter:(t,e,n)=>0===e||e===n.length-1},t)));function ew(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"}}}tw.props=Object.assign(Object.assign({},Zx.props),{defaultPosition:"top",defaultOrientation:"horizontal"});Wx={render(t,e){const{y:n,width:r,title:i,subtitle:a}=t,o=t.style,{spacing:s=2,align:l="left"}=o,c=et(o,["spacing","align"]);t=rt(c,"title");const u=rt(c,"subtitle"),f=Lx(e,".title","text").attr("className","title").call(L,Object.assign(Object.assign(Object.assign({},ew(0,n,r,l)),{fontSize:14,textBaseline:"top",text:i}),t)).node().getLocalBounds();Lx(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({},ew(0,f.max[1]+s,r,l)),{fontSize:12,textBaseline:"top",text:a}),u))})}};const nw=class extends X.CustomElement{constructor(t){super(t),this.descriptor=Wx}connectedCallback(){var t,e;null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}update(t={}){var e;this.attr(nt({},this.attributes,t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}},rw=a=>({value:t,theme:e})=>{var{x:t,y:n,width:r,height:i}=t.bbox;return new nw({style:nt({},{style:e.title},Object.assign({x:t,y:n,width:r,height:i},a))})};function iw(t){return t.getBandWidth}function aw(t,e,n){if(!iw(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=dc(t,e);return r=n+a,t=0,e=i.length-1,i[Math.min(e,Math.max(t,r))]}function ow(t,e){var n,r;return iw(t)?(t=t.getOptions()["domain"],[n,r]=e,n=t.indexOf(n),r=t.indexOf(r),t.slice(n,r+1)):Sc(e)}rw.props={defaultPosition:"top",defaultOrder:2,defaultSize:36};const sw=t=>{const{orientation:c,labelFormatter:u,style:f}=t,h=et(t,["orientation","labelFormatter","size","style"]);return({scales:[e],value:t,theme:n})=>{var r,t=t["bbox"],{x:t,y:i,width:a,height:o}=t,{slider:n={}}=n;const s=(null==(r=e.getFormatter)?void 0:r.call(e))||(t=>t.toString()),l="string"==typeof u?_x(u):u;return new jm({className:"slider",style:Object.assign({},n,Object.assign(Object.assign({x:t,y:i,trackLength:"horizontal"===c?a:o,orientation:c,formatter:t=>{return(l||s)(aw(e,t,!0))}},f),h))})}},lw=(sw.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1},t=>sw(Object.assign(Object.assign({},t),{orientation:"horizontal"}))),cw=(lw.props=Object.assign(Object.assign({},sw.props),{defaultPosition:"bottom"}),t=>sw(Object.assign(Object.assign({},t),{orientation:"vertical"}))),uw=(cw.props=Object.assign(Object.assign({},sw.props),{defaultPosition:"left"}),t=>{const{orientation:a,style:o}=t,s=et(t,["orientation","labelFormatter","style"]);return({value:t,theme:e})=>{var t=t["bbox"],{x:t,y:n,width:r,height:i}=t,{scrollbar:e={}}=e;return new Bm({className:"scrollbar",style:Object.assign({},e,Object.assign(Object.assign(Object.assign(Object.assign({},o),{x:t,y:n,trackLength:"horizontal"===a?r:i}),s),{orientation:a,value:0,contentLength:1500,viewportLength:"horizontal"===a?r:i}))})}}),fw=(uw.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1},t=>uw(Object.assign(Object.assign({},t),{orientation:"horizontal"}))),hw=(fw.props=Object.assign(Object.assign({},uw.props),{defaultPosition:"bottom"}),t=>uw(Object.assign(Object.assign({},t),{orientation:"vertical"})));hw.props=Object.assign(Object.assign({},uw.props),{defaultPosition:"left"});class dw{constructor(t){this.$value=t}static of(t){return new dw(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}function pw(t,e,n){return dw.of({}).call(gw,t).call(gw,e).call(gw,n).value()}function gw(t,e){for(var[n,r]of Object.entries(e))void 0!==r&&(t[n]=e[n]);return t}function yw(t,e){var n={};for(const i of e){var r=t.style[i];r&&(n[i]=r)}return n}const mw=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"],vw=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]=Zc(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,pw(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},bw=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]=Zc(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,pw(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},xw=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]=Zc(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,pw(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},ww=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]=Zc(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,pw(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},kw=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}],pw(i,n,l))},Mw=(kw.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}],pw(i,n,l))});function Ow(t){var{min:t,max:e}=t.getLocalBounds(),[t,n]=t,[e,r]=e;return[t,n,e-t,r-n]}function _w(t,e){var[n,r,i,t]=Ow(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),f=i/u;for(let t=0;t<u;t++){var h=n+t*f,d=r+l*s;o.push(function(t){var[t,e,n,r]=t;return`
2
2
  M ${t} ${e}
3
3
  L ${t+n} ${e}
4
4
  L ${t+n} ${e+r}
5
5
  L ${t} ${e+r}
6
6
  Z
7
- `}([h,d,f,s]))}c-=u,l+=1}return o}function Tw(t,e){t.__data__=e.__data__,t.className=e.className,e.parentNode.replaceChild(t,e)}function Pw(t,e){return t.indexOf(e)===t.lastIndexOf(e)}function Nw(t){var e,t=X.convertToPath(t);if(t&&(Pw(e=t,"m")&&Pw(e,"M")))return t}function jw(t,e,n,r){var i,a,o,s,l,c,u,f,h,d=e["nodeName"],p=n["nodeName"],g=Nw(e),y=Nw(n);return d===p&&"path"!==d||(void 0===g||void 0===y)?(p=n,d=r,[o,l,s,h]=Aw(i=e),[c,u,f,a]=(Tw(p,i),Aw(p)),o=[Object.assign({transform:`translate(${o-c}, ${l-u}) scale(${s/f}, ${h/a})`},xw(i,ww)),Object.assign({transform:"translate(0, 0) scale(1, 1)"},xw(p,ww))],p.animate(o,d)):(c=g,s="path"===(u=(l=t)["nodeName"])?l:(Tw(u=new X.Path({style:Object.assign(Object.assign({},xw(l,ww)),{d:c})}),l),u),f=[Object.assign({path:g},xw(e,ww)),Object.assign({path:y},xw(n,ww))],h=s.animate(f,r),s.style.transform="scale(1, 1)",s.style.transform="none",h)}Ew.props={};const Cw=g=>(t,e,n,r,i)=>{[a="pack"]=[g.split];var a="function"==typeof a?a:Lw,i=vw(i,n,g),n=t["length"],o=e["length"];if(1===n&&1===o||1<n&&1<o)return[s]=t,[c]=e,jw(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 jw(t,new X.Path({style:Object.assign({path:d[e]},xw(l,ww))}),t,u)})}}if(1<n&&1===o){var[n]=e;{var o=t,f=n,h=i;const p=(e=a)(f,o.length);var{fillOpacity:e=1,strokeOpacity:t=1,opacity:n=1}=f.style,e=f.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:e,strokeOpacity:t,opacity:n}],h);return[...o.map((t,e)=>{return jw(t,t,new X.Path({style:{path:p[e],fill:f.style.fill}}),h)}),e]}}return null},Rw=(Cw.props={},b=>{return X.CSS.registerProperty({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:X.PropertySyntax.NUMBER}),(t,e,n,r,i)=>{const[a]=t;if(!tu(r))return kw(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:f,y1:h}=t;const d=w1().cornerRadius(e).padAngle(s*Math.PI/180),p=O0(r,t,[f,h]),{startAngle:g,endAngle:y}=p,m=new X.Path({}),v=t=>{m.attr({d:d(t),transform:`translate(${o[0]}, ${o[1]})`});t=X.convertToPath(m);return m.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:y,fillOpacity:l,strokeOpacity:c,opacity:u}],s=a.animate(e,vw(i,n,b));return s.onframe=function(){a.style.path=v(Object.assign(Object.assign({},p),{endAngle:Number(a.style.waveInArcAngle)}))},s.onfinish=function(){a.style.path=v(Object.assign(Object.assign({},p),{endAngle:y}))},s}}),Bw=(Rw.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,vw(i,n,c)));return l.finished.then(()=>a.setOrigin(0,0)),l}}),Iw=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,vw(i,n,c)));return t.finished.then(()=>a.setOrigin(0,0)),t}},Fw=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]}],vw(i,n,o))},Dw=(Fw.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new X.Path({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=kw(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o}),zw=(Dw.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new X.Path({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=Ow(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o}),Ww=(zw.props={},{visibility:"visible",opacity:1,fillOpacity:1,strokeOpacity:1});function Gw(t,e,n,r){t.style[e]=n,r&&t.children.forEach(t=>Gw(t,e,n,r))}function Hw(t){Gw(t,"visibility","hidden",!0)}function Vw(t){Gw(t,"visibility","visible",!0)}function qw(t){return it(t).selectAll("."+ot).nodes().filter(t=>!t.__removed__)}function Yw(t,e){return $w(t,e).flatMap(({container:t})=>qw(t))}function $w(e,t){return t.filter(t=>t!==e&&t.options.parentKey===e.options.key)}function Uw(t){return it(t).select("."+st).node()}function Kw(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 Xw(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 Zw(t){return t=>t.__data__.color}function Qw(t){const e=t.scale["x"];return t=>{t=t.__data__.x;return e.invert(t)}}function Jw(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 t5(s,l=(t,e)=>t,c=(t,e,n)=>t.setAttribute(e,n)){const u="__states__",f="__ordinal__",i=t=>{var{[u]:e=[],[f]: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:Ww[o],o=l(i,t);c(t,r,o),r in n||(n[r]=a)}t[f]=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 e5(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 n5(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 r5(t){var{link:e=!1,valueof:l=(t,e)=>t}=t,c=et(t,["link","valueof","coordinate"]);if(!e)return[()=>{},()=>{}];const u=t=>t.__data__.points;return[t=>{if(!(t.length<=1)){var e=Ac(t,(t,e)=>{t=t.__data__.x,e=e.__data__.x;return t-e});for(let t=1;t<e.length;t++){var n=d1();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(),l0(c,t=>l(t,s))),{fill:i=s.getAttribute("fill")}=r,a=et(r,["fill"]),o=new X.Path({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 i5(n,t,e){var r,i,a,o=t=>{var e=n.style["transform"];return e?e+" "+t:t};return tu(e)?(a=n.__data__["points"],[a,i]=Jc(e)?M0(a):a,r=d0(a,a=e.getCenter()),i=d0(i,a),a=g0(r)+m0(r,i)/2,o(`translate(${t*Math.cos(a)}, ${t*Math.sin(a)})`)):Jc(e)?o(`translate(${t}, 0)`):o(`translate(0, ${-t})`)}function a5(t){var{background:e,scale:s,coordinate:l,valueof:c}=t,u=et(t,["background","scale","coordinate","valueof"]);const f="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]},h=(t,e)=>{var n=s["x"];return lw(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 lw(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]=h(t,n),[n,a]=d(t,n),t=t["__data__"],{y:t,y1:o}=t;return U1([[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=et(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=l0(u,t=>c(t,e)),{fill:n="#CCD6EC",fillOpacity:r=.3,zIndex:i=-2,padding:a=.001,strokeWidth:o=0}=t,t=et(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(lw)})()?p:g)(e,t);n.className=f,e.parentNode.appendChild(n),e.background=n},t=>{var e;null!=(e=t.background)&&e.remove(),t.background=null},t=>t.className===f]}function o5(t,e){t=t.getRootNode().defaultView.getContextService().getDomElement();null!=t&&t.style&&(t.style.cursor=e)}function s5(e,{elements:t,datum:n,groupKey:i=t=>t,link:r=!1,background:a=!1,delay:o=60,scale:s,coordinate:l,state:c={}}){const u=t(e),f=new Set(u),h=Oc(u,i);t=n5(u,n);const[d,p]=r5(Object.assign({elements:u,valueof:t,link:r,coordinate:l},rt(c.active,"link"))),[g,y,m]=a5(Object.assign({scale:s,coordinate:l,background:a,valueof:t},rt(c.active,"background"))),{setState:v,removeState:b,hasState:x}=t5(nt(c,{active:Object.assign({},(null==(n=c.active)?void 0:n.offset)&&{transform:(...t)=>{var e=c.active.offset(...t),[,t]=t;return i5(u[t],e,l)}})}),t);let w;const k=t=>{var e=t["target"];if(f.has(e)){w&&clearTimeout(w);var t=i(e),t=h.get(t),n=new Set(t);for(const r of u)n.has(r)?x(r,"active")||v(r,"active"):(v(r,"inactive"),p(r)),r!==e&&y(r);g(e),d(t)}},M=()=>{for(const t of u)b(t,"active","inactive"),y(t),p(t)},O=t=>{t=t.target;a&&!m(t)||(a||f.has(t))&&(0<o?(w&&clearTimeout(w),w=setTimeout(()=>{M(),w=null},o)):M())},_=()=>{M()};return e.addEventListener("pointerover",k),e.addEventListener("pointerout",O),e.addEventListener("pointerleave",_),()=>{e.removeEventListener("pointerover",k),e.removeEventListener("pointerout",O),e.removeEventListener("pointerleave",_);for(const t of u)y(t),p(t)}}function l5(t){var{delay:a,createGroup:o,background:s=!1,link:l=!1}=t,c=et(t,["delay","createGroup","background","link"]);return t=>{var{container:t,view:e,options:n}=t,{scale:r,coordinate:i}=e;return s5(Uw(t),Object.assign({elements:qw,datum:Jw(e),groupKey:o?o(e):void 0,coordinate:i,scale:r,state:e5(n,[["active",s?{}:{lineWidth:"1",stroke:"#000"}],"inactive"]),background:s,link:l,delay:a},c))}}function c5(t){return l5(Object.assign(Object.assign({},t),{createGroup:Qw}))}function u5(t){return l5(Object.assign(Object.assign({},t),{createGroup:Zw}))}function f5(e,{elements:t,datum:n,groupKey:c=t=>t,link:u=!1,single:f=!1,coordinate:r,background:i=!1,scale:a,state:o={}}){const h=t(e),d=new Set(h),p=Oc(h,c);t=n5(h,n);const[g,y]=r5(Object.assign({link:u,elements:h,valueof:t,coordinate:r},rt(o.selected,"link"))),[m,v]=a5(Object.assign({background:i,coordinate:r,scale:a,valueof:t},rt(o.selected,"background"))),{setState:b,removeState:s,hasState:x}=t5(nt(o,{selected:Object.assign({},(null==(n=o.selected)?void 0:n.offset)&&{transform:(...t)=>{var e=o.selected.offset(...t),[,t]=t;return i5(h[t],e,r)}})}),t),w=()=>{for(const t of h)s(t,"selected","unselected"),y(t),v(t)},l=t=>{t=t.target;if(!d.has(t))return w();if(f){var e=t;if(x(e,"selected"))w();else{var n=c(e),n=p.get(n),r=new Set(n);for(const a of h)r.has(a)?b(a,"selected"):(b(a,"unselected"),y(a)),a!==e&&v(a);g(n),m(e)}}else{n=t;t=c(n),t=p.get(t);const o=new Set(t);if(x(n,"selected")){if(!h.some(t=>!o.has(t)&&x(t,"selected")))return w();for(const s of t)b(s,"unselected"),y(s),v(s)}else{var i=t.some(t=>x(t,"selected"));for(const l of h)o.has(l)?b(l,"selected"):x(l,"selected")||b(l,"unselected");!i&&u&&g(t),m(n)}}};return e.addEventListener("click",l),()=>{e.removeEventListener("click",l);for(const t of h)y(t)}}function h5(t){var{createGroup:a,background:o=!1,link:s=!1}=t,l=et(t,["createGroup","background","link"]);return t=>{var{container:t,view:e,options:n}=t,{coordinate:r,scale:i}=e;return f5(Uw(t),Object.assign({elements:qw,datum:Jw(e),groupKey:a?a(e):void 0,coordinate:r,scale:i,state:e5(n,[["selected",o?{}:{lineWidth:"1",stroke:"#000"}],"unselected"]),background:o,link:s},l))}}function d5(t){return h5(Object.assign(Object.assign({},t),{createGroup:Qw}))}function p5(t){return h5(Object.assign(Object.assign({},t),{createGroup:Zw}))}function g5(t){var{wait:O=20,leading:_,trailing:S=!1,labelFormatter:E=t=>""+t}=t,A=et(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:h,x:d,series:l=[]}=t;t=h.map((t,e)=>e);const c=Ac(t.map(t=>d[t])),u=nt({},e),f=u.marks.find(t=>"line"===t.type);t=zc(_c(t,t=>zc(t,t=>+h[t])/Gc(t,t=>+h[t]),t=>l[t]).values());nt(f,{scale:{y:{domain:[1/t,t]}}});const p=Uw(r),g=r.getElementsByClassName(ot);const y=Oc(r.getElementsByClassName(ct),t=>t.__data__.key.split("-")[0]),m=new X.Line({style:Object.assign({x1:0,y1:0,x2:0,y2:p.getAttribute("height"),stroke:"black",lineWidth:1},rt(A,"rule"))}),v=new X.Text({style:Object.assign({x:0,y:p.getAttribute("height"),text:"",fontSize:10},rt(A,"label"))}),b=(m.append(v),p.appendChild(m),(t,e,n)=>{var[t]=t.invert(n),n=e.invert(t);return c[yc(c,n)]}),x=(t,e)=>{m.setAttribute("x1",t[0]),m.setAttribute("x2",t[0]),v.setAttribute("text",E(e))};let w;var k;const M=dn(t=>{t=Kw(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[fc(t=>d[+t]).center(a,i)],l=[0,r.map(1)],s=[0,r.map(h[s]/h[a[0]])],[,a]=n.map(l),[,l]=n.map(s),c=a-l,s=(u.setAttribute("transform",`translate(0, ${c})`),y.get(o)||[]);for(const f of s)f.setAttribute("dy",c)}}},O,{leading:_,trailing:S});return k=[0,0],ce(this,void 0,void 0,function*(){var t=o["x"];const n=b(s,t,k);x(k,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)}(f);t.groupBy="color",t.basis=(t,e)=>{return e[t[fc(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",M),p.addEventListener("pointermove",M),p.addEventListener("pointerleave",M),()=>{m.remove(),p.removeEventListener("pointerenter",M),p.removeEventListener("pointermove",M),p.removeEventListener("pointerleave",M)}}}function y5({wait:l=30,leading:c,trailing:u=!1}){return t=>{const{options:e,update:r,container:n}=t,i=Uw(n),a=nt({},e);for(const s of a.marks)s.animate=!1;const o=dn(t=>{var e,n,t=Kw(i,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)}(a)).focusX=t,n.focusY=e,n.visual=!0,r(a))},l,{leading:c,trailing:u});return i.addEventListener("pointerenter",o),i.addEventListener("pointermove",o),i.addEventListener("pointerleave",o),()=>{i.removeEventListener("pointerenter",o),i.removeEventListener("pointermove",o),i.removeEventListener("pointerleave",o)}}}function m5(t){return t.getRootNode().defaultView.getConfig().container}function v5({root:t,data:e,x:n,y:r,render:i,event:a,single:o,position:s="right-bottom",enterable:l=!1}){var o=o?m5(t):t,{tooltipElement:t=function(t,e,n,r,i){var{min:[a,o],max:[s,l]}=t.getBounds(),e=new Qb({className:"tooltip",style:{x:e,y:n,container:{x:0,y:0},data:[],bounding:{x:a,y:o,width:s-a,height:l-o},position:r,enterable:i,title:"",offset:[10,10],style:{".tooltip":{},".tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}}}});return m5(t).appendChild(e.HTMLTooltipElement),e}(t,n,r,s,l)}=o,{items:e,title:c=""}=e;t.update(Object.assign({x:n,y:r,data:e,title:c,position:s,enterable:l},void 0!==i&&{content:i(a,{items:e,title:c})})),o.tooltipElement=t}function b5(t,e){e=(e?m5(t):t).tooltipElement;e&&e.hide()}function x5(t){var e=t["tooltipElement"];e&&(e.destroy(),t.tooltipElement=void 0)}function w5(t,e){var{color:t,series:n}=t,{color:e,series:r}=e,i=t=>t&&t.invert&&!(t instanceof Pp)&&!(t instanceof Sp);return i(n)?n.invert(r):r&&r!==e?r:!i(t)||(n=t.invert(e),Array.isArray(n))?null:n}function k5(t){var e=t.getAttribute("fill"),n=t.getAttribute("stroke"),t=t["__data__"],{color:t=e&&"transparent"!==e?e:n}=t;return t}function M5(t,e=t=>t){t=new Map(t.map(t=>[e(t),t]));return Array.from(t.values())}function O5(n,o,s=!0,t=n.map(t=>t.__data__)){const e=t=>t instanceof Date?+t:t;var r=M5(t.map(t=>t.title),e).filter(Uu),t=t.flatMap((r,t)=>{const i=n[t],{items:e=[],title:a}=r;return e.filter(Uu).map(t=>{var{color:e=k5(i),name:n}=t,t=et(t,["color","name"]),n=s?w5(o,r)||n:n||w5(o,r);return Object.assign(Object.assign({},t),{color:e,name:n||a})})});return Object.assign(Object.assign({},0<r.length&&{title:r.join(",")}),{items:M5(t,t=>`(${e(t.name)}, ${e(t.value)})`)})}function _5(t){t.ruleY&&(t.ruleY.remove(),t.ruleY=void 0)}function S5(t,e){return Array.from(t.values()).some(t=>{return null==(t=t.interaction)?void 0:t[e]})}function E5(t,e){return void 0===t?e:t}function A5(t){var{title:t,items:e}=t;return 0===e.length&&void 0===t}function L5(_,t){var{elements:e,sort:S,filter:E,scale:A,coordinate:L,crosshairs:T,render:P,groupName:N=!0,wait:n=50,leading:r=!0,trailing:i=!1,startX:j=0,startY:C=0,body:R=!0,single:B=!0,position:I,enterable:F,style:a={}}=t,t=et(t,["elements","sort","filter","scale","coordinate","crosshairs","render","groupName","wait","leading","trailing","startX","startY","body","single","position","enterable","style"]),e=e(_);const D=Jc(L),z=tu(L);a=nt(a,t);const{innerWidth:W,innerHeight:G}=L.getOptions(),H=[],V=[];for(const l of e){var o=l["__data__"],o=o["seriesX"];(o?H:V).push(l)}H.sort((t,e)=>{const n=D?0:1;var r=t=>t.getBounds().min[n];return D?r(e)-r(t):r(t)-r(e)});const q=new Map(H.map(t=>{var e=t["__data__"];const n=e["seriesX"];return[t,[Ac(n.map((t,e)=>e),t=>n[+t]),n]]})),Y=rt(a,"crosshairs");t=A.x;const $=null!=t&&t.getBandWidth?t.getBandWidth()/2:0,U=(t,e)=>{const n=D?1:0,r=t[n];return e.filter(t=>{var[t,e]=(t=>{var{min:t,max:e}=t.getLocalBounds();return Ac([t[n],e[n]])})(t);return r>=t&&r<=e})},s=dn(t=>{var e=Kw(_,t);if(e){var n=_.getRenderBounds();const g=n.min[0],y=n.min[1];var r=[e[0]-j,e[1]-C],n=U(r,V),i=[],a=[];for(const m of H){var[o,s]=q.get(m),o=((t,e,n)=>{var[t]=L.invert(t),t=t-$,[r,i]=Ac([n[0],n[n.length-1]]);return t<r||i<t?null:e[(0,fc(t=>n[+t]).center)(e,t)]})(r,o,s);if(null!==o){i.push(m);s=((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[Xe(t.replace("series","")),e]}))})(m,o);const{x:g,y}=s;o=L.map([(g||0)+$,y||0]);a.push([s,o])}}var l=[...a.map(t=>t[0]),...n.map(t=>t.__data__)],n=[...i,...n],l=O5(n,A,N,l);if(S&&l.items.sort((t,e)=>S(t)-S(e)),E&&(l.items=l.items.filter(E)),0===n.length||A5(l))K();else if(R&&v5({root:_,data:l,x:e[0]+g,y:e[1]+y,render:P,event:t,single:B,position:I,enterable:F}),T){n=a.map(t=>t[1]);{var c,l=_,e=n,{height:n,width:u,startX:f,startY:h,transposed:d,polar:p}=t=Object.assign(Object.assign({},Y),{width:W,height:G,startX:j,startY:C,transposed:D,polar:z}),t=et(t,["height","width","startX","startY","transposed","polar"]);const v=Object.assign({lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},t),b=(t=e.map(t=>t[1]),e=e.map(t=>t[0]),Uc(t)),x=Uc(e),[w,k,M,O]=p?(t=f+u/2,e=h+n/2,p=Math.min(u,n)/2,c=g0(d0([x,b],[t,e])),[t,t+p*Math.cos(c),e,e+p*Math.sin(c)]):d?[f,f+u,b+h,b+h]:[x+f,x+f,h,h+n];(e=l.ruleY||(t=new X.Line({style:Object.assign({x1:w,x2:k,y1:M,y2:O},v)}),l.appendChild(t),t)).style.x1=w,e.style.x2=k,e.style.y1=M,e.style.y2=O,l.ruleY=e}}}},n,{leading:r,trailing:i}),K=()=>{b5(_,B),T&&_5(_)};return _.addEventListener("pointerenter",s),_.addEventListener("pointermove",s),_.addEventListener("pointerleave",K),()=>{_.removeEventListener("pointerenter",s),_.removeEventListener("pointermove",s),_.removeEventListener("pointerleave",K),x5(_),T&&_5(_)}}function T5(i,{elements:t,scale:a,render:o,groupName:s=!0,sort:l,filter:c,wait:e=50,leading:n=!0,trailing:r=!1,groupKey:u=t=>t,single:f=!0,position:h,enterable:d}){t=t(i);const p=new Set(t),g=Oc(t,u),y=dn(t=>{var e,n,r=t["target"];p.has(r)&&(r=u(r),r=1===(r=g.get(r)).length?function(n){var{title:t,items:e=[]}=t=n["__data__"],e=e.filter(Uu).map(t=>{var{color:e=k5(n)}=t,t=et(t,["color"]);return Object.assign(Object.assign({},t),{color:e})});return Object.assign(Object.assign({},t&&{title:t}),{items:e})}(r[0]):O5(r,a,s),l&&r.items.sort((t,e)=>l(t)-l(e)),c&&(r.items=r.items.filter(c)),A5(r)?b5(i,f):({offsetX:e,offsetY:n}=t,v5({root:i,data:r,x:e,y:n,render:o,event:t,single:f,position:h,enterable:d})))},e,{leading:n,trailing:r}),m=t=>{t=t.target;p.has(t)&&b5(i,f)};return i.addEventListener("pointerover",y),i.addEventListener("pointermove",y),i.addEventListener("pointerout",m),()=>{i.removeEventListener("pointerover",y),i.removeEventListener("pointermove",y),i.removeEventListener("pointerout",m),x5(i)}}function P5(t){const{shared:u,crosshairs:f,series:h,item:d=()=>({}),facet:p=!1}=t,g=et(t,["shared","crosshairs","series","name","item","facet"]);return(e,t)=>{var{container:n,view:r}=e;const{scale:i,markState:a,coordinate:o}=r;var s=S5(a,"seriesTooltip"),l=S5(a,"crosshairs"),n=Uw(n),s=E5(h,s);if(s&&!p)return L5(n,Object.assign(Object.assign({},g),{elements:qw,scale:i,coordinate:o,crosshairs:E5(f,l),item:d}));if(s&&p){s=t.filter(t=>t!==e&&t.options.parentKey===e.options.key);const c=Yw(e,t),i=s[0].view.scale;t=n.getBounds(),s=t.min[0],t=t.min[1];return L5(n.parentNode.parentNode,Object.assign(Object.assign({},g),{elements:()=>c,scale:i,coordinate:o,crosshairs:E5(f,l),item:d,startX:s,startY:t}))}return T5(n,Object.assign(Object.assign({},g),{elements:qw,scale:i,coordinate:o,groupKey:u?Qw(r):void 0,item:d}))}}const N5="legend-category",j5="items-item",C5="legend-category-item-marker",R5="legend-category-item-label";function B5(t){return t.getElementsByClassName(C5)[0]}function I5(t){return t.getElementsByClassName(R5)[0]}function F5(t){return t.getElementsByClassName(j5)}function D5(t){return t.getElementsByClassName(N5)}function z5(t){let e=t.parentNode;for(;e&&!e.__data__;)e=e.parentNode;return e.__data__}function W5(t,{legends:e,marker:i,label:a,datum:o,filter:n,state:r={}}){const s=new Map,l=new Map,c=new Map;var{unselected:r={markerStroke:"#aaa",markerFill:"#aaa",labelFill:"#aaa"}}=r,u={unselected:rt(r,"marker")},r={unselected:rt(r,"label")};const{setState:f,removeState:h}=t5(u,void 0),{setState:d,removeState:p}=t5(r,void 0),g=Array.from(e(t)),y=g.map(o),m=()=>{for(const r of g){var t=o(r),e=i(r),n=a(r);(y.includes(t)?(h(e,"unselected"),p):(f(e,"unselected"),d))(n,"unselected")}};for(const w of g){var v=()=>{o5(t,"pointer")},b=()=>{o5(t,"default")},x=()=>ce(this,void 0,void 0,function*(){var t=o(w),e=y.indexOf(t);-1===e?y.push(t):y.splice(e,1),0===y.length&&y.push(...g.map(o)),yield n(y),m()});w.addEventListener("click",x),w.addEventListener("pointerenter",v),w.addEventListener("pointerout",b),s.set(w,x),l.set(w,v),c.set(w,b)}return()=>{for(const t of g)t.removeEventListener("click",s.get(t)),t.removeEventListener("pointerenter",l.get(t)),t.removeEventListener("pointerout",c.get(t))}}function G5(){return(t,e,n)=>{const{container:r,view:a,options:o,update:s}=t;t=D5(r);const i=(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 nt({},t,{transform:e,scale:{[r]:{domain:n.getOptions().domain}}})}),t=Object.assign(Object.assign({},o),{marks:t});return s(t)});if(!t.length)return n.on("legend:filter",t=>{var{values:t,channel:e}=t;i(e,t)}),()=>{};const l=t.map(t=>{const{name:e,domain:n}=z5(t).scales[0];return W5(r,{legends:F5,marker:B5,label:I5,datum:t=>{t=t.__data__,t=t.index;return n[t]},filter:t=>i(e,t),state:t.attributes.state})});return()=>{l.forEach(t=>t())}}}function H5(){return t=>{const{container:e,view:n,options:r}=t;t=D5(e);const i=qw(e);var a=e5(r,["active","inactive"]),o=n5(i,Jw(n));for(const u of t){const f=t=>{var e=u.attributes["data"],t=t["__data__"],t=t["index"];return e[t].label},h=z5(u).scales[0].name,d=F5(u),p=(t=>{var{scale:{[t]:t}}=n;return t})(h),g=Oc(i,t=>p.invert(t.__data__[h]));var{state:s={}}=u.attributes,{inactive:s={}}=s;const{setState:y,removeState:m}=t5(a,o);var l={inactive:rt(s,"marker")},s={inactive:rt(s,"label")};const{setState:v,removeState:b}=t5(l),{setState:x,removeState:w}=t5(s),k=t=>{for(const r of d){var e=B5(r),n=I5(r);(r===t||null===t?(b(e,"inactive"),w):(v(e,"inactive"),x))(n,"inactive")}},M=new Map;for(const _ of d){var c=()=>{var t=f(_),e=new Set(g.get(t));for(const n of i)e.has(n)?y(n,"active"):y(n,"inactive");k(_)};_.addEventListener("pointerover",c),M.set(_,c)}const O=()=>{for(const t of i)m(t,"inactive","active");k(null)};return u.addEventListener("pointerleave",O),()=>{u.removeEventListener(O);for(var[t,e]of M)t.removeEventListener(e)}}}}function V5(a,t){var{brushed:i=()=>{},brushended:e=()=>{},brushcreated:o=()=>{},extent:s=function(t){var{width:t,height:e}=t.getBBox();return[0,0,t,e]}(a),brushRegion:l=(t,e,n,r,i)=>[t,e,n,r],reverse:c=!1,fill:n="#777",fillOpacity:r="0.3",stroke:u="#fff"}=t,f=et(t,["brushed","brushended","brushcreated","extent","brushRegion","reverse","fill","fillOpacity","stroke"]);let h=null,d=null,p=null,g=null,y=null,m=!1;const[v,b,x,w]=s,k=(o5(a,"crosshair"),a.style.draggable=!0,()=>{y=new X.Path({style:Object.assign(Object.assign({},f),{fill:n,fillOpacity:r,stroke:u,pointerEvents:"none"})}),g=new X.Rect({style:{x:0,y:0,width:0,height:0,draggable:!0},className:"mask"}),a.appendChild(y),a.appendChild(g)}),M=()=>{g=new X.Rect({style:Object.assign(Object.assign({x:0,y:0},f),{fill:n,fillOpacity:r,stroke:u,draggable:!0}),className:"mask"}),a.appendChild(g)},O=()=>{g&&g.remove(),y&&y.remove(),h=null,d=null,p=null,m=!1,g=null,y=null,e()},_=(t,e)=>{var[t,e,n,r]=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,n,r]=l(t,e,n,r,s);return(c?E:S)(t,e,n,r),i(t,e,n,r),[t,e,n,r]},S=(t,e,n,r)=>{g.style.x=t,g.style.y=e,g.style.width=n-t,g.style.height=r-e},E=(t,e,n,r)=>{y.style.d=`
7
+ `}([h,d,f,s]))}c-=u,l+=1}return o}function Sw(t,e){t.__data__=e.__data__,t.className=e.className,e.parentNode.replaceChild(t,e)}function Ew(t,e){return t.indexOf(e)===t.lastIndexOf(e)}function Aw(t){var e,t=X.convertToPath(t);if(t&&(Ew(e=t,"m")&&Ew(e,"M")))return t}function Lw(t,e,n,r){var i,a,o,s,l,c,u,f,h,d,p,g=e["nodeName"],y=n["nodeName"],m=Aw(e),v=Aw(n);return g===y&&"path"!==g||(void 0===m||void 0===v)?(y=n,g=r,[f,h,d,a]=Ow(i=e),l=i.style.transform,o=y.style.transform,[u,c,p,s]=(Sw(y,i),Ow(y)),l=[Object.assign({transform:`${l?l+" ":""}translate(${f-u}, ${h-c}) scale(${d/p}, ${a/s})`},yw(i,mw)),Object.assign({transform:`${o?o+" ":""}translate(0, 0) scale(1, 1)`},yw(y,mw))],y.animate(l,g)):(f=m,c="path"===(h=(u=t)["nodeName"])?u:(Sw(h=new X.Path({style:Object.assign(Object.assign({},yw(u,mw)),{d:f})}),u),h),d=[Object.assign({path:m},yw(e,mw)),Object.assign({path:v},yw(n,mw))],p=c.animate(d,r),c.style.transform="scale(1, 1)",c.style.transform="none",p)}Mw.props={};const Tw=g=>(t,e,n,r,i)=>{[a="pack"]=[g.split];var a="function"==typeof a?a:_w,i=pw(i,n,g),n=t["length"],o=e["length"];if(1===n&&1===o||1<n&&1<o)return[s]=t,[c]=e,Lw(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 Lw(t,new X.Path({style:Object.assign({path:d[e]},yw(l,mw))}),t,u)})}}if(1<n&&1===o){var[n]=e;{var o=t,f=n,h=i;const p=(e=a)(f,o.length);var{fillOpacity:e=1,strokeOpacity:t=1,opacity:n=1}=f.style,e=f.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:e,strokeOpacity:t,opacity:n}],h);return[...o.map((t,e)=>{return Lw(t,t,new X.Path({style:{path:p[e],fill:f.style.fill}}),h)}),e]}}return null},Pw=(Tw.props={},b=>{return X.CSS.registerProperty({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:X.PropertySyntax.NUMBER}),(t,e,n,r,i)=>{const[a]=t;if(!Qc(r))return vw(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:f,y1:h}=t;const d=b1().cornerRadius(e).padAngle(s*Math.PI/180),p=k0(r,t,[f,h]),{startAngle:g,endAngle:y}=p,m=new X.Path({}),v=t=>{m.attr({d:d(t),transform:`translate(${o[0]}, ${o[1]})`});t=X.convertToPath(m);return m.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:y,fillOpacity:l,strokeOpacity:c,opacity:u}],s=a.animate(e,pw(i,n,b));return s.onframe=function(){a.style.path=v(Object.assign(Object.assign({},p),{endAngle:Number(a.style.waveInArcAngle)}))},s.onfinish=function(){a.style.path=v(Object.assign(Object.assign({},p),{endAngle:y}))},s}}),Nw=(Pw.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,pw(i,n,c)));return l.finished.then(()=>a.setOrigin(0,0)),l}}),jw=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,pw(i,n,c)));return t.finished.then(()=>a.setOrigin(0,0)),t}},Cw=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]}],pw(i,n,o))},Rw=(Cw.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new X.Path({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=vw(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o}),Bw=(Rw.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new X.Path({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=xw(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o}),Iw=(Bw.props={},{visibility:"visible",opacity:1,fillOpacity:1,strokeOpacity:1});function Fw(t,e,n,r){t.style[e]=n,r&&t.children.forEach(t=>Fw(t,e,n,r))}function Dw(t){Fw(t,"visibility","hidden",!0)}function zw(t){Fw(t,"visibility","visible",!0)}function Ww(t){return it(t).selectAll("."+ot).nodes().filter(t=>!t.__removed__)}function Gw(t,e){return Hw(t,e).flatMap(({container:t})=>Ww(t))}function Hw(e,t){return t.filter(t=>t!==e&&t.options.parentKey===e.options.key)}function Vw(t){return it(t).select("."+st).node()}function qw(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 Yw(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 $w(t){return t=>t.__data__.color}function Uw(t){const e=t.scale["x"];return t=>{t=t.__data__.x;return e.invert(t)}}function Kw(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 Xw(s,l=(t,e)=>t,c=(t,e,n)=>t.setAttribute(e,n)){const u="__states__",f="__ordinal__",i=t=>{var{[u]:e=[],[f]: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:Iw[o],o=l(i,t);c(t,r,o),r in n||(n[r]=a)}t[f]=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 Zw(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 Qw(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 Jw(t){var{link:e=!1,valueof:l=(t,e)=>t}=t,c=et(t,["link","valueof","coordinate"]);if(!e)return[()=>{},()=>{}];const u=t=>t.__data__.points;return[t=>{if(!(t.length<=1)){var e=Sc(t,(t,e)=>{t=t.__data__.x,e=e.__data__.x;return t-e});for(let t=1;t<e.length;t++){var n=f1();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(),o0(c,t=>l(t,s))),{fill:i=s.getAttribute("fill")}=r,a=et(r,["fill"]),o=new X.Path({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 t5(n,t,e){var r,i,a,o=t=>{var e=n.style["transform"];return e?e+" "+t:t};return Qc(e)?(a=n.__data__["points"],[a,i]=Zc(e)?w0(a):a,r=f0(a,a=e.getCenter()),i=f0(i,a),a=d0(r)+g0(r,i)/2,o(`translate(${t*Math.cos(a)}, ${t*Math.sin(a)})`)):Zc(e)?o(`translate(${t}, 0)`):o(`translate(0, ${-t})`)}function e5(t){var{background:e,scale:s,coordinate:l,valueof:c}=t,u=et(t,["background","scale","coordinate","valueof"]);const f="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]},h=(t,e)=>{var n=s["x"];return iw(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 iw(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]=h(t,n),[n,a]=d(t,n),t=t["__data__"],{y:t,y1:o}=t;return Y1([[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=et(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=o0(u,t=>c(t,e)),{fill:n="#CCD6EC",fillOpacity:r=.3,zIndex:i=-2,padding:a=.001,strokeWidth:o=0}=t,t=et(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(iw)})()?p:g)(e,t);n.className=f,e.parentNode.appendChild(n),e.background=n},t=>{var e;null!=(e=t.background)&&e.remove(),t.background=null},t=>t.className===f]}function n5(t,e){t=t.getRootNode().defaultView.getContextService().getDomElement();null!=t&&t.style&&(t.style.cursor=e)}function r5(e,{elements:t,datum:n,groupKey:i=t=>t,link:r=!1,background:a=!1,delay:o=60,scale:s,coordinate:l,state:c={}}){const u=t(e),f=new Set(u),h=kc(u,i);t=Qw(u,n);const[d,p]=Jw(Object.assign({elements:u,valueof:t,link:r,coordinate:l},rt(c.active,"link"))),[g,y,m]=e5(Object.assign({scale:s,coordinate:l,background:a,valueof:t},rt(c.active,"background"))),{setState:v,removeState:b,hasState:x}=Xw(nt(c,{active:Object.assign({},(null==(n=c.active)?void 0:n.offset)&&{transform:(...t)=>{var e=c.active.offset(...t),[,t]=t;return t5(u[t],e,l)}})}),t);let w;const k=t=>{var e=t["target"];if(f.has(e)){w&&clearTimeout(w);var t=i(e),t=h.get(t),n=new Set(t);for(const r of u)n.has(r)?x(r,"active")||v(r,"active"):(v(r,"inactive"),p(r)),r!==e&&y(r);g(e),d(t)}},M=()=>{for(const t of u)b(t,"active","inactive"),y(t),p(t)},O=t=>{t=t.target;a&&!m(t)||(a||f.has(t))&&(0<o?(w&&clearTimeout(w),w=setTimeout(()=>{M(),w=null},o)):M())},_=()=>{M()};return e.addEventListener("pointerover",k),e.addEventListener("pointerout",O),e.addEventListener("pointerleave",_),()=>{e.removeEventListener("pointerover",k),e.removeEventListener("pointerout",O),e.removeEventListener("pointerleave",_);for(const t of u)y(t),p(t)}}function i5(t){var{delay:a,createGroup:o,background:s=!1,link:l=!1}=t,c=et(t,["delay","createGroup","background","link"]);return t=>{var{container:t,view:e,options:n}=t,{scale:r,coordinate:i}=e;return r5(Vw(t),Object.assign({elements:Ww,datum:Kw(e),groupKey:o?o(e):void 0,coordinate:i,scale:r,state:Zw(n,[["active",s?{}:{lineWidth:"1",stroke:"#000"}],"inactive"]),background:s,link:l,delay:a},c))}}function a5(t){return i5(Object.assign(Object.assign({},t),{createGroup:Uw}))}function o5(t){return i5(Object.assign(Object.assign({},t),{createGroup:$w}))}function s5(e,{elements:t,datum:n,groupKey:c=t=>t,link:u=!1,single:f=!1,coordinate:r,background:i=!1,scale:a,state:o={}}){const h=t(e),d=new Set(h),p=kc(h,c);t=Qw(h,n);const[g,y]=Jw(Object.assign({link:u,elements:h,valueof:t,coordinate:r},rt(o.selected,"link"))),[m,v]=e5(Object.assign({background:i,coordinate:r,scale:a,valueof:t},rt(o.selected,"background"))),{setState:b,removeState:s,hasState:x}=Xw(nt(o,{selected:Object.assign({},(null==(n=o.selected)?void 0:n.offset)&&{transform:(...t)=>{var e=o.selected.offset(...t),[,t]=t;return t5(h[t],e,r)}})}),t),w=()=>{for(const t of h)s(t,"selected","unselected"),y(t),v(t)},l=t=>{t=t.target;if(!d.has(t))return w();if(f){var e=t;if(x(e,"selected"))w();else{var n=c(e),n=p.get(n),r=new Set(n);for(const a of h)r.has(a)?b(a,"selected"):(b(a,"unselected"),y(a)),a!==e&&v(a);g(n),m(e)}}else{n=t;t=c(n),t=p.get(t);const o=new Set(t);if(x(n,"selected")){if(!h.some(t=>!o.has(t)&&x(t,"selected")))return w();for(const s of t)b(s,"unselected"),y(s),v(s)}else{var i=t.some(t=>x(t,"selected"));for(const l of h)o.has(l)?b(l,"selected"):x(l,"selected")||b(l,"unselected");!i&&u&&g(t),m(n)}}};return e.addEventListener("click",l),()=>{e.removeEventListener("click",l);for(const t of h)y(t)}}function l5(t){var{createGroup:a,background:o=!1,link:s=!1}=t,l=et(t,["createGroup","background","link"]);return t=>{var{container:t,view:e,options:n}=t,{coordinate:r,scale:i}=e;return s5(Vw(t),Object.assign({elements:Ww,datum:Kw(e),groupKey:a?a(e):void 0,coordinate:r,scale:i,state:Zw(n,[["selected",o?{}:{lineWidth:"1",stroke:"#000"}],"unselected"]),background:o,link:s},l))}}function c5(t){return l5(Object.assign(Object.assign({},t),{createGroup:Uw}))}function u5(t){return l5(Object.assign(Object.assign({},t),{createGroup:$w}))}function f5(t){var{wait:O=20,leading:_,trailing:S=!1,labelFormatter:E=t=>""+t}=t,A=et(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:h,x:d,series:l=[]}=t;t=h.map((t,e)=>e);const c=Sc(t.map(t=>d[t])),u=nt({},e),f=u.marks.find(t=>"line"===t.type);t=Fc(Mc(t,t=>Fc(t,t=>+h[t])/zc(t,t=>+h[t]),t=>l[t]).values());nt(f,{scale:{y:{domain:[1/t,t]}}});const p=Vw(r),g=r.getElementsByClassName(ot);const y=kc(r.getElementsByClassName(ct),t=>t.__data__.key.split("-")[0]),m=new X.Line({style:Object.assign({x1:0,y1:0,x2:0,y2:p.getAttribute("height"),stroke:"black",lineWidth:1},rt(A,"rule"))}),v=new X.Text({style:Object.assign({x:0,y:p.getAttribute("height"),text:"",fontSize:10},rt(A,"label"))}),b=(m.append(v),p.appendChild(m),(t,e,n)=>{var[t]=t.invert(n),n=e.invert(t);return c[pc(c,n)]}),x=(t,e)=>{m.setAttribute("x1",t[0]),m.setAttribute("x2",t[0]),v.setAttribute("text",E(e))};let w;var k;const M=dn(t=>{t=qw(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[cc(t=>d[+t]).center(a,i)],l=[0,r.map(1)],s=[0,r.map(h[s]/h[a[0]])],[,a]=n.map(l),[,l]=n.map(s),c=a-l,s=(u.setAttribute("transform",`translate(0, ${c})`),y.get(o)||[]);for(const f of s)f.setAttribute("dy",c)}}},O,{leading:_,trailing:S});return k=[0,0],ce(this,void 0,void 0,function*(){var t=o["x"];const n=b(s,t,k);x(k,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)}(f);t.groupBy="color",t.basis=(t,e)=>{return e[t[cc(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",M),p.addEventListener("pointermove",M),p.addEventListener("pointerleave",M),()=>{m.remove(),p.removeEventListener("pointerenter",M),p.removeEventListener("pointermove",M),p.removeEventListener("pointerleave",M)}}}function h5({wait:l=30,leading:c,trailing:u=!1}){return t=>{const{options:r,update:i,container:e}=t,a=Vw(e),o=nt({},r);for(const s of o.marks)s.animate=!1;const n=dn(t=>{var e,n,t=qw(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)}}}function d5(t){return t.getRootNode().defaultView.getConfig().container}function p5({root:t,data:e,x:n,y:r,render:i,event:a,single:o,position:s="right-bottom",enterable:l=!1}){var o=o?d5(t):t,{tooltipElement:t=function(t,e,n,r,i){var{min:[a,o],max:[s,l]}=t.getBounds(),e=new Kb({className:"tooltip",style:{x:e,y:n,container:{x:0,y:0},data:[],bounding:{x:a,y:o,width:s-a,height:l-o},position:r,enterable:i,title:"",offset:[10,10],style:{".tooltip":{},".tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}}}});return d5(t).appendChild(e.HTMLTooltipElement),e}(t,n,r,s,l)}=o,{items:e,title:c=""}=e;t.update(Object.assign({x:n,y:r,data:e,title:c,position:s,enterable:l},void 0!==i&&{content:i(a,{items:e,title:c})})),o.tooltipElement=t}function g5(t,e){e=(e?d5(t):t).tooltipElement;e&&e.hide()}function y5(t){var e=t["tooltipElement"];e&&(e.destroy(),t.tooltipElement=void 0)}function m5(t,e){var{color:t,series:n}=t,{color:e,series:r}=e,i=t=>t&&t.invert&&!(t instanceof Lp)&&!(t instanceof Op);return i(n)?n.invert(r):r&&r!==e?r:!i(t)||(n=t.invert(e),Array.isArray(n))?null:n}function v5(t){var e=t.getAttribute("fill"),n=t.getAttribute("stroke"),t=t["__data__"],{color:t=e&&"transparent"!==e?e:n}=t;return t}function b5(t,e=t=>t){t=new Map(t.map(t=>[e(t),t]));return Array.from(t.values())}function x5(n,o,s=!0,t=n.map(t=>t.__data__)){const e=t=>t instanceof Date?+t:t;var r=b5(t.map(t=>t.title),e).filter(Yu),t=t.flatMap((r,t)=>{const i=n[t],{items:e=[],title:a}=r;return e.filter(Yu).map(t=>{var{color:e=v5(i),name:n}=t,t=et(t,["color","name"]),n=s?m5(o,r)||n:n||m5(o,r);return Object.assign(Object.assign({},t),{color:e,name:n||a})})});return Object.assign(Object.assign({},0<r.length&&{title:r.join(",")}),{items:b5(t,t=>`(${e(t.name)}, ${e(t.value)})`)})}function w5(t){t.ruleY&&(t.ruleY.remove(),t.ruleY=void 0)}function k5(t,e){return Array.from(t.values()).some(t=>{return null==(t=t.interaction)?void 0:t[e]})}function M5(t,e){return void 0===t?e:t}function O5(t){var{title:t,items:e}=t;return 0===e.length&&void 0===t}function _5(_,t){var{elements:e,sort:S,filter:E,scale:A,coordinate:L,crosshairs:T,render:P,groupName:N=!0,wait:n=50,leading:r=!0,trailing:i=!1,startX:j=0,startY:C=0,body:R=!0,single:B=!0,position:I,enterable:F,style:a={}}=t,t=et(t,["elements","sort","filter","scale","coordinate","crosshairs","render","groupName","wait","leading","trailing","startX","startY","body","single","position","enterable","style"]),e=e(_);const D=Zc(L),z=Qc(L);a=nt(a,t);const{innerWidth:W,innerHeight:G}=L.getOptions(),H=[],V=[];for(const l of e){var o=l["__data__"],o=o["seriesX"];(o?H:V).push(l)}H.sort((t,e)=>{const n=D?0:1;var r=t=>t.getBounds().min[n];return D?r(e)-r(t):r(t)-r(e)});const q=new Map(H.map(t=>{var e=t["__data__"];const n=e["seriesX"];return[t,[Sc(n.map((t,e)=>e),t=>n[+t]),n]]})),Y=rt(a,"crosshairs");t=A.x;const $=null!=t&&t.getBandWidth?t.getBandWidth()/2:0,U=(t,e)=>{const n=D?1:0,r=t[n];return e.filter(t=>{var[t,e]=(t=>{var{min:t,max:e}=t.getLocalBounds();return Sc([t[n],e[n]])})(t);return r>=t&&r<=e})},s=dn(t=>{var e=qw(_,t);if(e){var n=_.getRenderBounds();const g=n.min[0],y=n.min[1];var r=[e[0]-j,e[1]-C],n=U(r,V),i=[],a=[];for(const m of H){var[o,s]=q.get(m),o=((t,e,n)=>{var[t]=L.invert(t),t=t-$,[r,i]=Sc([n[0],n[n.length-1]]);return t<r||i<t?null:e[(0,cc(t=>n[+t]).center)(e,t)]})(r,o,s);if(null!==o){i.push(m);s=((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[Xe(t.replace("series","")),e]}))})(m,o);const{x:g,y}=s;o=L.map([(g||0)+$,y||0]);a.push([s,o])}}var l=[...a.map(t=>t[0]),...n.map(t=>t.__data__)],n=[...i,...n],l=x5(n,A,N,l);if(S&&l.items.sort((t,e)=>S(t)-S(e)),E&&(l.items=l.items.filter(E)),0===n.length||O5(l))K();else if(R&&p5({root:_,data:l,x:e[0]+g,y:e[1]+y,render:P,event:t,single:B,position:I,enterable:F}),T){n=a.map(t=>t[1]);{var c,l=_,e=n,{height:n,width:u,startX:f,startY:h,transposed:d,polar:p}=t=Object.assign(Object.assign({},Y),{width:W,height:G,startX:j,startY:C,transposed:D,polar:z}),t=et(t,["height","width","startX","startY","transposed","polar"]);const v=Object.assign({lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},t),b=(t=e.map(t=>t[1]),e=e.map(t=>t[0]),Yc(t)),x=Yc(e),[w,k,M,O]=p?(t=f+u/2,e=h+n/2,p=Math.min(u,n)/2,c=d0(f0([x,b],[t,e])),[t,t+p*Math.cos(c),e,e+p*Math.sin(c)]):d?[f,f+u,b+h,b+h]:[x+f,x+f,h,h+n];(e=l.ruleY||(t=new X.Line({style:Object.assign({x1:w,x2:k,y1:M,y2:O},v)}),l.appendChild(t),t)).style.x1=w,e.style.x2=k,e.style.y1=M,e.style.y2=O,l.ruleY=e}}}},n,{leading:r,trailing:i}),K=()=>{g5(_,B),T&&w5(_)};return _.addEventListener("pointerenter",s),_.addEventListener("pointermove",s),_.addEventListener("pointerleave",K),()=>{_.removeEventListener("pointerenter",s),_.removeEventListener("pointermove",s),_.removeEventListener("pointerleave",K),y5(_),T&&w5(_)}}function S5(i,{elements:t,scale:a,render:o,groupName:s=!0,sort:l,filter:c,wait:e=50,leading:n=!0,trailing:r=!1,groupKey:u=t=>t,single:f=!0,position:h,enterable:d}){t=t(i);const p=new Set(t),g=kc(t,u),y=dn(t=>{var e,n,r=t["target"];!p.has(r)||(r=u(r),r=1===(r=g.get(r)).length?function(n){var{title:t,items:e=[]}=t=n["__data__"],e=e.filter(Yu).map(t=>{var{color:e=v5(n)}=t,t=et(t,["color"]);return Object.assign(Object.assign({},t),{color:e})});return Object.assign(Object.assign({},t&&{title:t}),{items:e})}(r[0]):x5(r,a,s),l&&r.items.sort((t,e)=>l(t)-l(e)),c&&(r.items=r.items.filter(c)),O5(r))?g5(i,f):({offsetX:e,offsetY:n}=t,p5({root:i,data:r,x:e,y:n,render:o,event:t,single:f,position:h,enterable:d}))},e,{leading:n,trailing:r}),m=t=>{t=t.target;p.has(t)&&g5(i,f)};return i.addEventListener("pointerover",y),i.addEventListener("pointermove",y),i.addEventListener("pointerout",m),()=>{i.removeEventListener("pointerover",y),i.removeEventListener("pointermove",y),i.removeEventListener("pointerout",m),y5(i)}}function E5(t){const{shared:u,crosshairs:f,series:h,item:d=()=>({}),facet:p=!1}=t,g=et(t,["shared","crosshairs","series","name","item","facet"]);return(e,t)=>{var{container:n,view:r}=e;const{scale:i,markState:a,coordinate:o}=r;var s=k5(a,"seriesTooltip"),l=k5(a,"crosshairs"),n=Vw(n),s=M5(h,s);if(s&&!p)return _5(n,Object.assign(Object.assign({},g),{elements:Ww,scale:i,coordinate:o,crosshairs:M5(f,l),item:d}));if(s&&p){s=t.filter(t=>t!==e&&t.options.parentKey===e.options.key);const c=Gw(e,t),i=s[0].view.scale;t=n.getBounds(),s=t.min[0],t=t.min[1];return _5(n.parentNode.parentNode,Object.assign(Object.assign({},g),{elements:()=>c,scale:i,coordinate:o,crosshairs:M5(f,l),item:d,startX:s,startY:t}))}return S5(n,Object.assign(Object.assign({},g),{elements:Ww,scale:i,coordinate:o,groupKey:u?Uw(r):void 0,item:d}))}}const A5="legend-category",L5="items-item",T5="legend-category-item-marker",P5="legend-category-item-label";function N5(t){return t.getElementsByClassName(T5)[0]}function j5(t){return t.getElementsByClassName(P5)[0]}function C5(t){return t.getElementsByClassName(L5)}function R5(t){return t.getElementsByClassName(A5)}function B5(t){let e=t.parentNode;for(;e&&!e.__data__;)e=e.parentNode;return e.__data__}function I5(t,{legends:e,marker:i,label:a,datum:o,filter:n,state:r={}}){const s=new Map,l=new Map,c=new Map;var{unselected:r={markerStroke:"#aaa",markerFill:"#aaa",labelFill:"#aaa"}}=r,u={unselected:rt(r,"marker")},r={unselected:rt(r,"label")};const{setState:f,removeState:h}=Xw(u,void 0),{setState:d,removeState:p}=Xw(r,void 0),g=Array.from(e(t)),y=g.map(o),m=()=>{for(const r of g){var t=o(r),e=i(r),n=a(r);(y.includes(t)?(h(e,"unselected"),p):(f(e,"unselected"),d))(n,"unselected")}};for(const w of g){var v=()=>{n5(t,"pointer")},b=()=>{n5(t,"default")},x=()=>ce(this,void 0,void 0,function*(){var t=o(w),e=y.indexOf(t);-1===e?y.push(t):y.splice(e,1),0===y.length&&y.push(...g.map(o)),yield n(y),m()});w.addEventListener("click",x),w.addEventListener("pointerenter",v),w.addEventListener("pointerout",b),s.set(w,x),l.set(w,v),c.set(w,b)}return()=>{for(const t of g)t.removeEventListener("click",s.get(t)),t.removeEventListener("pointerenter",l.get(t)),t.removeEventListener("pointerout",c.get(t))}}function F5(){return(t,e,n)=>{const{container:r,view:a,options:o,update:s}=t;t=R5(r);const i=(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 nt({},t,{transform:e,scale:{[r]:{domain:n.getOptions().domain}}})}),t=Object.assign(Object.assign({},o),{marks:t});return s(t)});if(!t.length)return n.on("legend:filter",t=>{var{values:t,channel:e}=t;i(e,t)}),()=>{};const l=t.map(t=>{const{name:e,domain:n}=B5(t).scales[0];return I5(r,{legends:C5,marker:N5,label:j5,datum:t=>{t=t.__data__,t=t.index;return n[t]},filter:t=>i(e,t),state:t.attributes.state})});return()=>{l.forEach(t=>t())}}}function D5(){return t=>{const{container:e,view:n,options:r}=t;t=R5(e);const i=Ww(e);var a=Zw(r,["active","inactive"]),o=Qw(i,Kw(n));for(const u of t){const f=t=>{var e=u.attributes["data"],t=t["__data__"],t=t["index"];return e[t].label},h=B5(u).scales[0].name,d=C5(u),p=(t=>{var{scale:{[t]:t}}=n;return t})(h),g=kc(i,t=>p.invert(t.__data__[h]));var{state:s={}}=u.attributes,{inactive:s={}}=s;const{setState:y,removeState:m}=Xw(a,o);var l={inactive:rt(s,"marker")},s={inactive:rt(s,"label")};const{setState:v,removeState:b}=Xw(l),{setState:x,removeState:w}=Xw(s),k=t=>{for(const r of d){var e=N5(r),n=j5(r);(r===t||null===t?(b(e,"inactive"),w):(v(e,"inactive"),x))(n,"inactive")}},M=new Map;for(const _ of d){var c=()=>{var t=f(_),e=new Set(g.get(t));for(const n of i)e.has(n)?y(n,"active"):y(n,"inactive");k(_)};_.addEventListener("pointerover",c),M.set(_,c)}const O=()=>{for(const t of i)m(t,"inactive","active");k(null)};return u.addEventListener("pointerleave",O),()=>{u.removeEventListener(O);for(var[t,e]of M)t.removeEventListener(e)}}}}function z5(a,t){var{brushed:i=()=>{},brushended:e=()=>{},brushcreated:o=()=>{},extent:s=function(t){var{width:t,height:e}=t.getBBox();return[0,0,t,e]}(a),brushRegion:l=(t,e,n,r,i)=>[t,e,n,r],reverse:c=!1,fill:n="#777",fillOpacity:r="0.3",stroke:u="#fff"}=t,f=et(t,["brushed","brushended","brushcreated","extent","brushRegion","reverse","fill","fillOpacity","stroke"]);let h=null,d=null,p=null,g=null,y=null,m=!1;const[v,b,x,w]=s,k=(n5(a,"crosshair"),a.style.draggable=!0,()=>{y=new X.Path({style:Object.assign(Object.assign({},f),{fill:n,fillOpacity:r,stroke:u,pointerEvents:"none"})}),g=new X.Rect({style:{x:0,y:0,width:0,height:0,draggable:!0},className:"mask"}),a.appendChild(y),a.appendChild(g)}),M=()=>{g=new X.Rect({style:Object.assign(Object.assign({x:0,y:0},f),{fill:n,fillOpacity:r,stroke:u,draggable:!0}),className:"mask"}),a.appendChild(g)},O=()=>{g&&g.remove(),y&&y.remove(),h=null,d=null,p=null,m=!1,g=null,y=null,e()},_=(t,e)=>{var[t,e,n,r]=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,n,r]=l(t,e,n,r,s);return(c?E:S)(t,e,n,r),i(t,e,n,r),[t,e,n,r]},S=(t,e,n,r)=>{g.style.x=t,g.style.y=e,g.style.width=n-t,g.style.height=r-e},E=(t,e,n,r)=>{y.style.d=`
8
8
  M${v},${b}L${x},${b}L${x},${w}L${v},${w}Z
9
9
  M${t},${e}L${t},${r}L${n},${r}L${n},${e}Z
10
- `,g.style.x=t,g.style.y=e,g.style.width=n-t,g.style.height=r-e},A=t=>{var e=t["target"],[t,n]=Xw(a,t);e===g?p=[t,n]:(((t,e)=>{if(g&&g.remove(),y&&y.remove(),h=[t,e],c)return k();M()})(t,n),m=!0)},L=t=>{var e,n,r,t=Xw(a,t);h&&(p?(n=(t,e,n,r,i)=>t+e<r?r-e:i<t+n?i-n:t,r=(e=t)[0]-p[0],e=e[1]-p[1],r=n(r,h[0],d[0],v,x),n=n(e,h[1],d[1],b,w),e=[h[0]+r,h[1]+n],r=[d[0]+r,d[1]+n],_(e,r)):_(h,t))},T=t=>{var e,n,r,i;p?(p=null,{x:e,y:r,width:n,height:i}=g.style,h=[e,r],d=[e+n,r+i]):(d=Xw(a,t),[e,n,r,i]=_(h,d),m=!1,o(e,n,r,i))},P=t=>{t=t.target;g&&t!==g&&O()},N=t=>{t=t.target;t!==g||m?o5(a,"crosshair"):o5(a,"move")},j=()=>{o5(a,"default")};return a.addEventListener("dragstart",A),a.addEventListener("drag",L),a.addEventListener("dragend",T),a.addEventListener("click",P),a.addEventListener("pointermove",N),a.addEventListener("pointerleave",j),{mask:g,remove(){g&&O()},destroy(){g&&O(),a.removeEventListener("dragstart",A),a.removeEventListener("drag",L),a.removeEventListener("dragend",T),a.removeEventListener("click",P),a.removeEventListener("pointermove",N),a.removeEventListener("pointerleave",j)}}}function q5(e,t,n){return t.filter(t=>{return t!==e&&({interaction:t={}}=t.options,Object.values(t).find(t=>t.brushKey===n))})}function Y5(t,e){var{elements:n,siblings:r=t=>[],datum:i,brushRegion:a,extent:o,reverse:s,series:l=!1,key:d=t=>t,bboxOf:c=t=>{var{x:t,y:e,width:n,height:r}=t.style;return{x:t,y:e,width:n,height:r}},state:u={}}=e,e=et(e,["elements","siblings","datum","brushRegion","extent","reverse","series","key","bboxOf","state"]);const p=n(t),g=r(t),y=g.flatMap(n);r=n5(p,i),n=rt(e,"mask");const{setState:m,removeState:f}=t5(u,r),h=new Map,{width:v,height:b,x=0,y:w=0}=c(t);i=o||[0,0,v,b];return V5(t,Object.assign(Object.assign({},n),{extent:i,brushRegion:a,reverse:s,brushended:l?()=>{for(const t of p)f(t,"inactive");for(const e of h.values())e.remove();h.clear()}:()=>{for(const t of[...p,...y])f(t,"active","inactive")},brushed:l?(t,e,n,r)=>{var i;for(const o of p){var a=h.get(o)||(a=o,i=void 0,(i=a.cloneNode()).__data__=a.__data__,a.parentNode.appendChild(i),h.set(a,i),i);a.style.clipPath=new X.Rect({style:{x:t+x,y:e+w,width:n-t,height:r-e}}),m(o,"inactive"),m(a,"active")}}:(t,e,n,r)=>{var i;for(const u of g)null!=(i=u.brush)&&i.remove();var a=new Set;for(const f of p){var{min:o,max:s}=f.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])?m(f,"inactive"):(m(f,"active"),a.add(d(f)))}for(const h of y)a.has(d(h))?m(h,"active"):m(h,"inactive")}}))}function $5(t){var{facet:h,brushKey:d}=t,p=et(t,["facet","brushKey"]);return(t,e)=>{var n,r,i,a,{container:o,view:s,options:l}=t,o=Uw(o),c={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",reverse:!1},u=["active",["inactive",{opacity:.5}]];if(h)return n=(a=o.getBounds()).min[0],r=a.min[1],i=a.max[0],a=a.max[1],Y5(o.parentNode.parentNode,Object.assign(Object.assign({elements:()=>Yw(t,e),datum:Jw($w(t,e).map(t=>t.view)),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:[n,r,i,a],state:e5($w(t,e).map(t=>t.options),u)},c),p));const f=Y5(o,Object.assign(Object.assign({elements:qw,key:t=>t.__data__.key,siblings:()=>{return q5(t,e,d).map(t=>Uw(t.container))},datum:Jw([s,...q5(t,e,d).map(t=>t.view)]),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:void 0,state:e5([l,...q5(t,e,d).map(t=>t.options)],u)},c),p));return o.brush=f,()=>f.destroy()}}function U5(t,e,n,r,i){var[,i,,a]=i;return[t,i,n,a]}function K5(t){return $5(Object.assign(Object.assign({},t),{brushRegion:U5}))}function X5(t,e,n,r,i){var[i,,a]=i;return[i,e,a,r]}function Z5(t){return $5(Object.assign(Object.assign({},t),{brushRegion:X5}))}const Q5="axis",J5="axis-hot-area";function tk(t){return t.getElementsByClassName(Q5)}function ek(t){return t.getElementsByClassName("axis-line")[0]}function nk(t){return t.getElementsByClassName("axis-main-group")[0].getLocalBounds()}function rk(t,e){var{cross:n,offsetX:i}=e,e=et(e,["cross","offsetX","offsetY"]),r=nk(t),[t]=ek(t).getLocalBounds().min;const[a,o]=r.min,[s,l]=r.max;r=2*(s-a);return{brushRegion:X5,hotZone:new X.Rect({className:J5,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 ik(t,e){var{offsetY:i,cross:n=!1}=e,e=et(e,["offsetY","offsetX","cross"]),r=nk(t),[,t]=ek(t).getLocalBounds().min;const[a,o]=r.min,[s,l]=r.max;r=l-o;return{brushRegion:U5,hotZone:new X.Rect({className:J5,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 ak(t,e){var{axes:n,elements:r,points:i,horizontal:a,datum:o,offsetY:s,offsetX:l,reverse:c=!1,state:u={}}=e,e=et(e,["axes","elements","points","horizontal","datum","offsetY","offsetX","reverse","state"]);const f=r(t);r=n(t);const h=t5(u,n5(f,o))["setState"],d=new Map;var p=rt(e,"mask");const g=()=>{for(const t of f)(t=>Array.from(d.values()).every(([n,r,i,a])=>t.some(([t,e])=>n<=t&&t<=i&&r<=e&&e<=a)))(i(t))?h(t,"active"):h(t,"inactive")};var y=r.some(a)&&r.some(t=>!a(t));for(const m of r){const{hotZone:v,brushRegion:b,extent:x}=(a(m)?ik:rk)(m,{offsetY:s,offsetX:l,cross:y,zIndex:999,fill:"transparent"});m.parentNode.appendChild(v),V5(v,Object.assign(Object.assign({},p),{reverse:c,brushRegion:b,brushended(){d.delete(m),g()},brushed(t,e,n,r){d.set(m,x(t,e,n,r)),g()}}))}}function ok(a){return t=>{var{container:t,view:e,options:n}=t,{x:r,y:i}=Uw(t).getBBox();return ak(t,Object.assign({elements:qw,axes:tk,offsetY:i,offsetX:r,points:t=>t.__data__.points,horizontal:t=>{var{startPos:[t,e],endPos:[n,r]}=t.attributes;return t!==n&&e===r},datum:Jw(e),state:e5(n,["active",["inactive",{opacity:.5}]])},a))}}function sk(t,e){var{filter:i,reset:n,brushRegion:r,extent:a,reverse:o}=e,e=rt(et(e,["filter","reset","brushRegion","extent","reverse","series"]),"mask"),{width:s,height:l}=t.getBBox(),a=a||[0,0,s,l];const c=function(e=300){let n=null;return t=>{t=t.timeStamp;return null!==n&&t-n<e?(n=t,!0):(n=t,!1)}}(),u=V5(t,Object.assign(Object.assign({},e),{extent:a,brushRegion:r,reverse:o,brushcreated:function(t,e,n,r){i(t,e,n,r),u.remove()}}));function f(t){c(t)&&n()}return t.addEventListener("click",f),()=>{u.destroy(),t.removeEventListener("click",f)}}function lk(t){var{hideX:y=!0,hideY:m=!0}=t,i=et(t,["hideX","hideY"]);return(t,e)=>{const{container:n,view:r,options:f,update:h}=t;t=Uw(n);let d=!1,p=!1,g=r;return sk(t,Object.assign(Object.assign({brushRegion:(t,e,n,r)=>[t,e,n,r],filter:(s,l,c,u)=>ce(this,void 0,void 0,function*(){if(!p){p=!0;const{scale:e,coordinate:r}=g,{x:i,y:a}=e;var t=(t,e)=>{var[t,n]=r.invert(t);return[cw(i,t,e),cw(a,n,e)]};const n=t([s,l],!0),o=t([c,u],!1);t=f["marks"],t=t.map(t=>nt({axis:Object.assign(Object.assign({},y&&{x:{transform:[{type:"hide"}]}}),m&&{y:{transform:[{type:"hide"}]}})},t,{scale:{x:{domain:uw(i,[n[0],o[0]])},y:{domain:uw(a,[n[1],o[1]])}}})),t=Object.assign(Object.assign({},f),{marks:t,clip:!0}),t=yield h(t);g=t.view,p=!1,d=!0}}),reset:()=>{!p&&d&&(d=!1,g=r,h(f))},extent:void 0},{maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",unhighlightedOpacity:.5,reverse:!1}),i))}}function ck(t){return lk(Object.assign(Object.assign({hideX:!0},t),{brushRegion:U5}))}function uk(t){return lk(Object.assign(Object.assign({hideY:!0},t),{brushRegion:X5}))}const fk="slider";function hk({wait:p=50,leading:g=!0,trailing:y=!1}){return t=>{const{container:e,view:n,options:s,update:l}=t;t=e.getElementsByClassName(fk);if(!t.length)return()=>{};let c=!1;const u=n["scale"];var{x:r,y:i}=u;const a=new Map,f={x:r.getOptions().domain,y:i.getOptions().domain};for(const h of t){const d=h.attributes["orientation"];var o=dn(o=>ce(this,void 0,void 0,function*(){var t,e,n,r,i,a=o.detail["value"];c||(c=!0,i="vertical"===d?"y":"x",a=function(t,e){var[t,n]=t;return uw(e,[cw(e,t,!0),cw(e,n,!1)])}(a,u[i]),f[i]=a,t="vertical"===d?"x":"y",e=f[t],n=s,r={[i]:{domain:a},[t]:{domain:e}},i=(i=n["marks"]).map(t=>nt({axis:{x:{transform:[{type:"hide"}]},y:{transform:[{type:"hide"}]}}},t,{scale:r,slider:Object.assign(Object.assign({},t.slider.x&&{x:{preserve:!0}}),t.slider.y&&{y:{preserve:!0}}),animate:!1})),a=Object.assign(Object.assign({},n),{marks:i,clip:!0,animate:!1}),yield l(a),c=!1)}),p,{leading:g,trailing:y});h.addEventListener("valuechange",o),a.set(h,o)}return()=>{for(var[t,e]of a)t.removeEventListener("valuechange",e)}}}const dk={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 pk(t){return"text"===t.nodeName&&!!t.isOverflowing()}function gk(t){var{offsetX:h=8,offsetY:d=8}=t,r=et(t,["offsetX","offsetY"]);return t=>{const s=t["container"],[l,c]=s.getBounds().min,u=rt(r,"tip"),f=new Set,e=t=>{var e,n,r,i,a,o=t["target"];pk(o)?({offsetX:e,offsetY:n}=t,e=e+h-l,n=n+d-c,o.tip?(o.tip.style.x=e,o.tip.style.y=n):(i=o.style["text"],a=new X.HTML({className:"poptip",style:{innerHTML:(r="div",i=i,a=Object.assign(Object.assign({},dk),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,f.add(a))):t.stopPropagation()},n=t=>{var e=t["target"];pk(e)?e.tip&&(e.tip.remove(),e.tip=null,f.delete(e.tip)):t.stopPropagation()};return s.addEventListener("pointerover",e),s.addEventListener("pointerout",n),()=>{s.removeEventListener("pointerover",e),s.removeEventListener("pointerout",n),f.forEach(t=>t.remove())}}}const yk=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 mk(t,e,n){var{data:r={}}=t;r.data=function(t,e){const{markKey:n,index:r,seriesIndex:i}=t=t.__data__,a=(t=e.markState,Array.from(t.keys()).find(t=>t.key===n));if(a)return i?i.map(t=>a.data[t]):a.data[r]}(e,n),t.data=r}function vk(i,a,o,s=t=>!0){return t=>{var e,n,r;s(t)&&(e=t["target"],{className:n,markType:r}=e,"element"===n?(mk(t,e,a),o.emit("element:"+i,t),o.emit(r+":"+i,t)):o.emit(n+":click"))}}function bk(){return(t,e,n)=>{const{container:r,view:i}=t,a=vk(yk.CLICK,i,n,t=>1===t.detail),o=vk(yk.DBLCLICK,i,n,t=>2===t.detail),s=vk(yk.POINTER_TAP,i,n),l=vk(yk.POINTER_DOWN,i,n),c=vk(yk.POINTER_UP,i,n),u=vk(yk.POINTER_OVER,i,n),f=vk(yk.POINTER_OUT,i,n),h=vk(yk.POINTER_MOVE,i,n),d=vk(yk.POINTER_ENTER,i,n),p=vk(yk.POINTER_LEAVE,i,n),g=vk(yk.POINTER_UPOUTSIDE,i,n),y=vk(yk.DRAG_START,i,n),m=vk(yk.DRAG,i,n),v=vk(yk.DRAG_END,i,n),b=vk(yk.DRAG_ENTER,i,n),x=vk(yk.DRAG_LEAVE,i,n),w=vk(yk.DRAG_OVER,i,n),k=vk(yk.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",f),r.addEventListener("pointermove",h),r.addEventListener("pointerenter",d),r.addEventListener("pointerleave",p),r.addEventListener("pointerupoutside",g),r.addEventListener("dragstart",y),r.addEventListener("drag",m),r.addEventListener("dragend",v),r.addEventListener("dragenter",b),r.addEventListener("dragleave",x),r.addEventListener("dragover",w),r.addEventListener("drop",k),()=>{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",f),r.removeEventListener("pointermove",h),r.removeEventListener("pointerenter",d),r.removeEventListener("pointerleave",p),r.removeEventListener("pointerupoutside",g),r.removeEventListener("dragstart",y),r.removeEventListener("drag",m),r.removeEventListener("dragend",v),r.removeEventListener("dragenter",b),r.removeEventListener("dragleave",x),r.removeEventListener("dragover",w),r.removeEventListener("drop",k)}}}function xk(n){return(t,...e)=>nt({},n(t,...e),t)}function wk(n){return(t,...e)=>nt({},t,n(t,...e))}function kk(t,e){var n;return t?Array.isArray(t)?t:({value:n=e}=t,t=et(t,["value"]),Object.assign(Object.assign({},t),{value:n})):e}const Mk=()=>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=et(t,["data","x","y","width","height"]);return Object.assign(Object.assign({},t),{data:kk(e,u),x:null!=n?n:o,y:null!=r?r:s,width:null!=i?i:l,height:null!=a?a:c})})},Ok=(Mk.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),f=e[s]-i*(n.length-1);var h=r.map(t=>f*(t/u)),d=[];let p=e[o]||0;for(let t=0;t<h.length;t+=1){var g=n[t],y=g["data"],g=et(g,["data"]),y=kk(y,a);d.push(Object.assign({[o]:p,[s]:h[t],[c]:e[c]||0,[l]:e[l],data:y},g)),p+=h[t]+i}return d}),_k=(Ok.props={},()=>t=>{var e=t["children"],t=et(t,["children"]);if(!Array.isArray(e))return[];const{data:s,scale:l={},axis:c={},legend:u={},encode:f={},transform:h=[]}=t,n=et(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=et(t,["data","scale","axis","legend","encode","transform"]);return Object.assign({data:kk(e,s),scale:nt({},l,n),encode:nt({},f,a),transform:[...h,...o],axis:!(!r||!c)&&nt({},c,r),legend:!(!i||!u)&&nt({},u,i)},t)});return[Object.assign(Object.assign({},n),{marks:t,type:"standardView"})]}),Sk=(_k.props={},()=>t=>{var{width:e,height:n,paddingLeft:r,paddingRight:i,paddingTop:a,paddingBottom:o,padding:s,inset:l,insetLeft:c,insetTop:u,insetRight:f,insetBottom:h,margin:d,marginLeft:p,marginBottom:g,marginTop:y,marginRight:m,data:v,coordinate:b,theme:x,component:w,interaction:k,x:M,y:O,key:_,frame:S,title:E,labelTransform:A,parentKey:L,clip:T}=t,t=et(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"]);return[{type:"standardView",x:M,y:O,key:_,width:e,height:n,padding:s,paddingLeft:r,paddingRight:i,paddingTop:a,inset:l,insetLeft:c,insetTop:u,insetRight:f,insetBottom:h,paddingBottom:o,theme:x,coordinate:b,component:w,interaction:k,frame:S,title:E,labelTransform:A,margin:d,marginLeft:p,marginBottom:g,marginTop:y,marginRight:m,parentKey:L,clip:T,marks:[Object.assign(Object.assign({},t),{key:_+"-0",data:v})]}]}),Ek=(Sk.props={},xk(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=Oc(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"))}}})),Ak=xk(t=>{const{data:e,scale:n}=t;var r=[t];let i,a,o;for(;r.length;){const{children:u,encode:f={},scale:n={},legend:h={}}=r.shift();var s=f["color"],l=n["color"],c=h["color"];void 0!==s&&(i=s),void 0!==l&&(a=l),void 0!==c&&(o=c),Array.isArray(u)&&r.push(...u)}return{encode:{color:i},scale:{color:nt({},a,{domain:void 0!==(t=null==(t=null===n||void 0===n?void 0:n.color)?void 0:t.domain)?t:void 0!==i?Array.from(new Set(e.map(t=>t[i]))):void 0,type:"ordinal"})},legend:{color:nt({title:i},o)}}}),Lk=xk(()=>({animate:{enterType:"fadeIn"}})),Tk=wk(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),Pk=wk(()=>({type:"cell"})),Nk=wk(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}}]}}}),jk=wk((t,c=function(t){t=t.points;return v0(t)},w=function(a){return(t,e)=>{var{rowIndex:t,rowValuesLength:n,columnIndex:r,columnValuesLength:i}=t;return t!==n-1?Ck(a,e):(t=e.length?void 0:null,nt({title:r===i-1&&void 0,grid:t},a))}},k=function(r){return(t,e)=>{var{rowIndex:t,columnIndex:n}=t;return 0!==n?Ck(r,e):(n=e.length?void 0:null,nt({title:0===t&&void 0,grid:n},r))}},M={})=>{const{data:e,encode:n,children:u,scale:r,x:O=0,y:_=0,shareData:f=!1,key:S}=t,E=e["value"],{x:A,y:L}=n;t=r.color;const T=t["domain"];return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:y,paddingTop:m}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=c0(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,[L]:e}=t,t=void 0===A||t===n,e=void 0===L||e===r;return t&&e}).map(t=>E.filter(t)),v=f?zc(l,t=>t.length):void 0,b=n.map(([t,e])=>({columnField:A,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:L,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,f,h,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=et(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:L?5:void 0}},r=r?g:0===g.length?[]:E,l={color:{domain:T}},o={x:Rk(o,w)(p,r),y:Rk(a,k)(p,r)};return Object.assign(Object.assign({key:n+"-"+c,data:r,x:u+y+O,y:f+m+_,parentKey:S,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!r.length,dataDomain:v,scale:nt(s,e,l),axis:nt({},i,o),legend:!1},t),M)})})}}});function Ck(t,e){return e.length?nt({title:!1,tick:null,label:null},t):nt({title:!1,tick:null,label:null,grid:null},t)}function Rk(t,e){return"function"==typeof t?t:null===t?()=>null:e(t)}const Bk=()=>t=>{return[mw.of(t).call(Pk).call(Ak).call(Lk).call(Ek).call(Tk).call(Nk).call(jk).value()]},Ik=(Bk.props={},xk(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),Fk=wk(t=>{const{data:w,children:c,x:k=0,y:M=0,key:O}=t;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=c0(t);const s=t.map(({points:t})=>v0(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,f,h,d]=s[c],[p,g]=l[c],y=b[c];return x[c].map(t=>{var n,r,{scale:e,key:i,encode:a,axis:o}=t,t=et(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 Ck(r,e)})(y,w),y:("function"==typeof(n=s)?n:null===n?()=>null:(t,e)=>{t=t.columnIndex;if(0!==t)return Ck(n,e)})(y,w)};return Object.assign({data:w,parentKey:O,key:i+"-"+c,x:u+m+k,y:f+v+M,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:nt({x:{facet:!1},y:{facet:!1}},e),axis:nt({x:{tickCount:5},y:{tickCount:5}},o,l),legend:!1,encode:nt({},a,{x:p,y:g})},t)})})}}}),Dk=wk(t=>{var e=t["encode"],t=et(t,["encode"]),{position:n=[],x:r=n,y:i=[...n].reverse()}=e,n=et(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 zk=()=>t=>{return[mw.of(t).call(Pk).call(Ak).call(Fk).call(Dk).call(Lk).call(Tk).call(Ik).value()]},Wk=xk(t=>({scale:{x:{guide:{type:"axisArc"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),Gk=xk(t=>({coordinate:{type:"polar"}})),Hk=t=>{var e=t["encode"],t=et(t,["encode"]),e=e["position"];return Object.assign(Object.assign({},t),{encode:{x:e}})};function Vk(t){return t=>null}function qk(t){var t=t["points"],[t,e,n,r]=t,i=p0(t,r),t=d0(t,r),r=m0(t,d0(e,n)),e=1/Math.sin(r/2),i=i/(1+e),a=i*Math.sqrt(2),[n,o]=n,t=y0(t)+r/2,r=i*e;return[n+r*Math.sin(t)-a/2,o+r*Math.cos(t)-a/2,a,a]}const Yk=()=>t=>{return[mw.of(t).call(Pk).call(Hk).call(Ak).call(Gk).call(Nk).call(jk,qk,Vk,Vk,{frame:!1}).call(Lk).call(Tk).call(Wk).value()]};const $k=()=>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"],f=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=nt({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 f[i]),e=i}t++}var a,o,s}};function Uk(t,e){if(null!==t)return{type:"column",value:t,field:e}}function Kk(t,e){t=Uk(t,e);return Object.assign(Object.assign({},t),{inferred:!0})}function Xk(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function Zk(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 Qk(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 Jk(t){return!(t instanceof Date)&&"object"==typeof t}$k.props={};const tM=()=>(t,e)=>{var n=e["encode"],n=n["y1"];return void 0!==n?[t,e]:[t,nt({},e,{encode:{y1:Kk(Zk(t,0))}})]};function eM(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])=>Uu(t));return Array.from(Oc(e,e=>i.map(([,t])=>t[e]).join("-")).values())}function nM(t){var a,r;return Array.isArray(t)?(a=t,(i,t,e)=>(n,r)=>a.reduce((t,e)=>0!==t?t:uc(i[n][e],i[r][e]),0)):"function"==typeof t?(r=t,(e,t,n)=>cM(t=>r(e[t]))):"series"===t?aM:"value"===t?oM:"sum"===t?sM:"maxIndex"===t?lM:()=>null}function rM(t,e){for(const n of t)n.sort(e)}function iM(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function aM(t,e,n){return cM(t=>n[t])}function oM(t,e,n){return cM(t=>e[t])}function sM(t,n,e){t=c0(t),t=Array.from(Oc(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,e.reduce((t,e)=>t+ +n[e])]));return cM(t=>r.get(e[t]))}function lM(t,n,e){t=c0(t),t=Array.from(Oc(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,Wc(e,t=>n[t])]));return cM(t=>r.get(e[t]))}function cM(n){return(t,e)=>uc(n(t),n(e))}tM.props={};const uM=(t={})=>{const{groupBy:L="x",orderBy:T=null,reverse:P=!1,y:N="y",y1:j="y1",series:C=!0}=t;return(t,e)=>{var{data:n,encode:r,style:i={}}=e,[a,o]=R(r,"y"),[s,l]=R(r,"y1"),[r]=C?Qk(r,"series","color"):R(r,"color"),c=eM(L,t,e),n=nM(T)(n,a,r),u=(n&&rM(c,n),new Array(t.length)),f=new Array(t.length),h=new Array(t.length),d=[],p=[];for(const _ of c){P&&_.reverse();var g=s?+s[_[0]]:0,y=[],m=[];for(const S of _){var v=h[S]=+a[S]-g;v<0?m.push(S):0<=v&&y.push(S)}var b=0<y.length?y:m,x=0<m.length?m:y;let t=y.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 E of m.reverse()){var w=h[E];n=u[E]=(f[E]=n)+w}let r=g;for(const A of y){var k=h[A];0<k?r=u[A]=(f[A]=r)+k:u[A]=f[A]=r}}const M=new Set(d),O=new Set(p);r="y"===N?u:f,n="y"===j?u:f;return[t,nt({},e,{encode:{y0:Kk(a,o),y:Uk(r,o),y1:Uk(n,l)},style:Object.assign({first:(t,e)=>M.has(e),last:(t,e)=>O.has(e)},i)})]}};function fM(t){t=t.type;return"string"==typeof t&&["stackY","dodgeX","groupX"].includes(t)}uM.props={};const hM=a=>(t,e,n)=>{var{encode:r,transform:i=[]}=e;return i.some(fM)||({x:i,y:r}=r,void 0===i)||void 0===r?[t,e]:(i=a["series"],r=i?["x","series"]:"x",uM({groupBy:r})(t,e,n))},dM=(hM.props={},(t={})=>{const{channel:s="x"}=t;return(t,e)=>{const n=e["encode"];var r=e["tooltip"];if(Qu(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,nt({},e,{tooltip:{title:a}})]}}),pM=(dM.props={},()=>(t,e)=>{var n=e["encode"],n=n["x"];return void 0!==n?[t,e]:[t,nt({},e,{encode:{x:Kk(Zk(t,0))},scale:{x:{guide:null}}})]}),gM=(pM.props={},()=>(t,e)=>{var n=e["encode"],n=n["y"];return void 0!==n?[t,e]:[t,nt({},e,{encode:{y:Kk(Zk(t,0))},scale:{y:{guide:null}}})]}),yM=(gM.props={},()=>(t,e)=>{var n=e["encode"],n=n["size"];return void 0!==n?[t,e]:[t,nt({},e,{encode:{size:Xk(Zk(t,3))}})]}),mM=(yM.props={},()=>(t,e)=>{var n=e["encode"],r=n["key"],n=et(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,nt({},e,{encode:{key:Uk(r)}})]}),vM=(mM.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,nt({},e,{encode:{series:Uk(r,i)}})])}),bM=(vM.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(Jk)?[t,e]:[t,nt({},e,{encode:{y:Uk(n)}})]}),xM=(bM.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(Jk)?[t,e]:[t,nt({},e,{encode:{x:Uk(n)}})]}),wM=(xM.props={},()=>(t,e)=>{var n=e["encode"],r=n["y1"];return r?[t,e]:([r]=R(n,"y"),[t,nt({},e,{encode:{y1:Uk([...r])}})])}),kM=(wM.props={},()=>(t,e)=>{var n=e["encode"],r=n["x1"];return r?[t,e]:([r]=R(n,"x"),[t,nt({},e,{encode:{x1:Uk([...r])}})])}),MM=(kM.props={},t=>{const i=t["channel"];return(t,e)=>{const{encode:a,tooltip:n}=e;var r;return Qu(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,nt({},e,{tooltip:{items:r}})])}}),OM=(MM.props={},()=>(t,e)=>[t,nt({scale:{x:{padding:0},y:{padding:0}}},e)]),_M=(OM.props={},()=>(t,e)=>{var{style:n={}}=e,r=et(e,["data","style"]),{x:i,y:a}=n,n=et(n,["x","y"]);return null==i||null==a?[t,e]:[[0],nt({},r,{data:[0],cartesian:!0,encode:{x:Uk([i||0]),y:Uk([a||0])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:n})]}),SM=(_M.props={},()=>(t,e)=>{var{style:n={}}=e;return[t,nt({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]}),EM=(SM.props={},()=>(t,e)=>{var n,r=e["data"];return!Array.isArray(r)||r.some(Jk)?[t,e]:(n=(r=Array.isArray(r[0])?r:[r]).map(t=>t[0]),r=r.map(t=>t[1]),[t,nt({},e,{encode:{x:Uk(n),y:Uk(r)}})])}),AM=(EM.props={},()=>(t,e)=>{var{style:n={}}=e,n=n["gradient"];return n?[t,nt({},e,{encode:{series:Xk(Zk(t,void 0))}})]:[t,e]}),LM=(AM.props={},(t={})=>{const{groupBy:c="x",reverse:u=!1,orderBy:f,padding:h}=t;return et(t,["groupBy","reverse","orderBy","padding"]),(t,e)=>{var{data:n,encode:r,scale:i}=e,i=i["series"],[a]=R(r,"y"),[r]=Qk(r,"series","color"),o=iM(r,i),i=eM(c,t,e),n=nM(f)(n,a,r),s=(n&&rM(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,nt({},e,{scale:{series:{domain:o,paddingInner:h}},encode:{series:Uk(s)}})]}}),TM=(LM.props={},t=>{const{groupBy:p=["x"],reducer:g=(t,e)=>e[t[0]],orderBy:y=null,reverse:m=!1,duration:v}=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[,f]of r){var a=[];for(const n of i){var o=Array.from(Oc(n,t=>f[t]).values());a.push(...o)}i=a}if(y){const[h]=R(e,y);h&&i.sort((t,e)=>g(t,h)-g(e,h)),m&&i.reverse()}r=(v||3e3)/i.length;const[s]=v?[Zk(n,r)]:Qk(e,"enterDuration",Zk(n,r));var[l]=Qk(e,"enterDelay",Zk(n,0)),c=new Array(n.length);for(let t=0,e=0;t<i.length;t++){const n=i[t];var u=zc(n,t=>+s[t]);for(const d of n)c[d]=+l[d]+e;e+=u}return[n,nt({},t,{encode:{enterDuration:Xk(s),enterDelay:Xk(c)}})]}});TM.props={};const PM=(t={})=>{const{groupBy:p="x",basis:g="max"}=t;return(e,t)=>{const{encode:n,tooltip:r}=t;var i=et(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=eM(p,e,t),l="function"==typeof(h=g)?h:{min:(t,e)=>Gc(t,t=>e[+t]),max:(t,e)=>zc(t,t=>e[+t]),first:(t,e)=>e[t[0]],last:(t,e)=>e[t[t.length-1]],mean:(t,e)=>Uc(t,t=>e[+t]),median:(t,e)=>Kc(t,t=>e[+t]),sum:(t,e)=>Qc(t,t=>e[+t]),deviation:(t,e)=>vc(t,t=>e[+t])}[h]||zc;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],[,f]=s[t];f[d]=+u[d]/c}}var h=Qu(r)||(null==r?void 0:r.items)&&0!==(null==r?void 0:r.items.length);return[e,nt({},t,Object.assign({encode:Object.fromEntries(s.map(([t,e])=>[t,Uk(e,R(n,t)[1])]))},!h&&n.y0&&{tooltip:{items:[{channel:"y0"}]}}))]}};function NM(t,e,n){return null===t?[-.5,.5]:(t=iM(t,e),[-(e=new Op({domain:t,range:[0,1],padding:n}).getBandWidth())/2,e/2])}function jM(t,e,n){return e*(1-t)+n*t}PM.props={};const CM=(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=NM(a,r,l),s=NM(n,i,c);a=t.map(()=>jM(u(),...s)),r=t.map(()=>jM(u(),...o));return[t,nt({scale:{x:{padding:.5},y:{padding:.5}}},e,{encode:{dy:Uk(a),dx:Uk(r)}})]}},RM=(CM.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=NM(n,r,a);n=t.map(()=>jM(o(),...i));return[t,nt({scale:{x:{padding:.5}}},e,{encode:{dx:Uk(n)}})]}}),BM=(RM.props={},(t={})=>{const{groupBy:g="x"}=t;return(e,t)=>{const n=t["encode"];var r=et(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=eM(g,e,t),s=new Array(o.length);for(let t=0;t<o.length;t++){const e=o[t];var[l,c]=bc(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 f=u-s[t];const e=o[t];for(const p of e)for(let t=0;t<i.length;t++){var[,h]=i[t],[,d]=a[t];d[p]=+h[p]+f}}return[e,nt({},t,{encode:Object.fromEntries(a.map(([t,e])=>[t,Uk(e,R(n,t)[1])]))})]}}),IM=(BM.props={},(t={})=>{const{groupBy:u="x",series:f=!0}=t;return(t,e)=>{var n=e["encode"];const[r]=R(n,"y");var[,i]=R(n,"y1"),n=(f?Qk(n,"series","color"):R(n,"color"),eM(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,nt({},e,{encode:{y1:Uk(a,i)}})]}});function FM(t,e){return[t[0]]}function DM(t,e){return[t[t.length-1]]}function zM(t,e){return[t[Wc(t,t=>e[t])]]}function WM(t,e){return[t[Hc(t,t=>e[t])]]}IM.props={};const GM=(t={})=>{const{groupBy:a="series",channel:o,selector:s}=t;return(t,e)=>{var n=e["encode"],t=eM(a,t,e);const[r]=R(n,o),i="function"==typeof(n=s)?n:{first:FM,last:DM,max:zM,min:WM}[n]||FM;return[t.flatMap(t=>i(t,r)),e]}},HM=(GM.props={},(t={})=>{var e=t["selector"],t=et(t,["selector"]);return GM(Object.assign({channel:"x",selector:e},t))}),VM=(HM.props={},(t={})=>{var e=t["selector"],t=et(t,["selector"]);return GM(Object.assign({channel:"y",selector:e},t))});function qM(e){return t=>null===t?e:e+" of "+t}function YM(){return[(t,e)=>Uc(t,t=>+e[t]),qM("mean")]}function $M(){return[(t,e)=>Kc(t,t=>+e[t]),qM("median")]}function UM(){return[(t,e)=>zc(t,t=>+e[t]),qM("max")]}function KM(){return[(t,e)=>Gc(t,t=>+e[t]),qM("min")]}function XM(){return[(t,e)=>t.length,qM("count")]}function ZM(){return[(t,e)=>Qc(t,t=>+e[t]),qM("sum")]}function QM(){return[(t,e)=>e[t[0]],qM("first")]}function JM(){return[(t,e)=>e[t[t.length-1]],qM("last")]}VM.props={};const tO=(t={})=>{const i=t["groupBy"],a=et(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:YM,max:UM,count:XM,first:QM,last:JM,sum:ZM,min:KM,median:$M}[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=Uk(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,Uk(c.map(t=>e[t[0]]),n)]}),r=c.map(t=>s[t[0]]);return[c0(c),nt({},e,{data:r,encode:Object.fromEntries([...n,...t])})]}},eO=(tO.props={},(t={})=>{const{channels:n=["x","y"]}=t,e=et(t,["channels"]);return tO(Object.assign(Object.assign({},e),{groupBy:(t,e)=>eM(n,t,e)}))}),nO=(eO.props={},(t={})=>eO(Object.assign(Object.assign({},t),{channels:["x","color","series"]}))),rO=(nO.props={},(t={})=>eO(Object.assign(Object.assign({},t),{channels:["y","color","series"]}))),iO=(rO.props={},(t={})=>eO(Object.assign(Object.assign({},t),{channels:["color"]})));function aO(t,e,n){var{reverse:r,slice:i,channel:a}=n,n=et(n,["reverse","slice","channel"]),o=e["encode"];const[s]=R(o,a);var l,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=>zc(t,t=>+a[t]);if("min"===i)return t=>Gc(t,t=>+a[t]);if("sum"===i)return t=>Qc(t,t=>+a[t]);if("median"===i)return t=>Kc(t,t=>+a[t]);if("mean"===i)return t=>Uc(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),n=(o=t,c=t=>s[t],(2!==(l=n).length?Ac(_c(o,l,c),([t,e],[n,r])=>uc(e,r)||uc(t,n)):Ac(Oc(o,c),([t,e],[n,r])=>l(e,r)||uc(t,n))).map(([t])=>t)),o=(r&&n.reverse(),"number"==typeof i?[0,i]:i),c=i?n.slice(...o):n;return[t,nt(e,{scale:{[a]:{domain:c}}})]}iO.props={};const oO=(t={})=>{const{reverse:o=!1,slice:s,channel:l,ordinal:c=!0}=t,u=et(t,["reverse","slice","channel","ordinal"]);return(t,e)=>{if(c)return aO(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=Ac(t,t=>a[t]),n&&i.reverse(),[i,e]}}},sO=(oO.props={},(t={})=>oO(Object.assign(Object.assign({},t),{channel:"x"}))),lO=(sO.props={},(t={})=>oO(Object.assign(Object.assign({},t),{channel:"color"}))),cO=(lO.props={},(t={})=>oO(Object.assign(Object.assign({},t),{channel:"y"})));cO.props={};const uO=(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=Sc(t,function(e,n){if("function"==typeof e)return t=>e(t,n);if("sum"===e)return t=>Qc(t,t=>+n[t]);throw new Error("Unknown reducer: "+e)}(l,n),t=>i[t]).map(t=>t[1]);return[t,nt({},e,{scale:{x:{flex:r}}})]}};function fO(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 f=a-u*c,h=u<=1?0:f/(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]=v0(t),a=e%l,e=Math.floor(e/l),o=a*c,s=(u-e-1)*c+f,r=c/r,i=c/i;return`translate(${o-t+d*a}, ${s-n-h*e-p}) scale(${r}, ${i})`})}uO.props={};const hO=()=>(t,e)=>[t,nt({},e,{modifier:fO,axis:!1})],dO=(hO.props={},"thresholds");function pO(t){var e,[n,r]=bc(t);return Math.min(200,(n=n,r=r,e=mc(t=t),t=vc(t),e&&t?Math.ceil((r-n)*Math.cbrt(e)/(3.49*t)):1))}const gO=(t={})=>{const{groupChannels:s=["color"],binChannels:l=["x","y"]}=t,c=et(t,["groupChannels","binChannels"]),u={};return tO(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(c).filter(([t])=>!t.startsWith(dO)))),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=rt(c,dO),o=t.filter(e=>i.every(t=>Uu(t[e]))),r=[...s.map(t=>{var[t]=R(n,t);return t}).filter(Uu).map(e=>t=>e[t]),...l.map((t,e)=>{const n=i[e];e=a[t]||pO(n),e=Dc().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(Oc(o,e=>r.map(t=>t(e)).join("-")).values())}}))},yO=(gO.props={},(t={})=>{var e=t["thresholds"];return gO(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))});function mO(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 f=0,h,d;c.push(f);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 y=Math.floor((i+1)*u)+1,m=[s(f),l(f)];for(h=-1;r<y;r++)(o=.5*Math.abs((m[0]-t)*(s(r)-m[1])-(m[0]-l(r))*(e-m[0])))>h&&(h=o,d=r);c.push(d),f=d}return c.push(a-1),c.map(t=>e[t])}function vO(t){if("function"==typeof t)return t;if("lttb"===t)return mO;var e={first:t=>[t[0]],last:t=>[t[t.length-1]],min:(t,e,n)=>[t[Hc(t,t=>n[t])]],max:(t,e,n)=>[t[Wc(t,t=>n[t])]],median:(t,e,n)=>{return[t[$c(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))}}yO.props={};const bO=(t={})=>{const{strategy:e="median",thresholds:a=2e3,groupBy:o=["series","color"]}=t,s=vO(e);return(t,e)=>{var n=e["encode"],t=eM(o,t,e);const[r]=R(n,"x"),[i]=R(n,"y");return[t.flatMap(t=>s(t,r,i,a)),e]}},xO=(bO.props={},(o={})=>(t,e)=>{const i=e["encode"],n=Object.entries(o).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(Uu);if(0===n.length)return[t,e];const r=t.filter(e=>n.every(t=>t(e))),a=r.map((t,e)=>e);t=Object.entries(i).map(([t,e])=>[t,Object.assign(Object.assign({},e),{value:a.map(t=>e.value[r[t]])})]);return[a,nt({},e,{encode:Object.fromEntries(t)})]});function wO(t){var{min:t,max:e}=t;return[[t[0],t[1]],[e[0],e[1]]]}function kO(t,e){var[t,n]=t,[e,r]=e;return t>=e[0]&&t<=r[0]&&n>=e[1]&&n<=r[1]}xO.props={};const MO=t=>{const r=t["priority"];return(t,e)=>{const n=[];return r&&t.sort(r),t.forEach(t=>{Vw(t);const i=t.getLocalBounds();n.some(t=>{var e=wO(i),t=wO(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]})?Hw(t):n.push(t)}),t}};function OO(){const n=new Map;return[t=>n.get(t),(t,e)=>n.set(t,e)]}const _O=t=>{const{maxIterations:k=10,maxError:M=.1,padding:O=1}=t;return i=>{var e=i.length;if(!(e<=1)){const[g,y]=OO(),[m,v]=OO();var a,o,s,l,[c,t]=OO(),[u,n]=OO();for(const b of i){var{min:r,max:f}=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,f]=f;y(b,g),v(b,g),t(b,f-g),n(b,[x,r])}for(let t=0;t<k;t++){i.sort((t,e)=>uc(m(t),m(e)));let r=0;for(let n=0;n<e-1;n++){var h=i[n];let t=n+1,e;for(;(e=i[t])&&([[a,o],[s,l]]=[u(h),u(e)],!(a<l&&s<o));)t+=1;if(e){const g=m(h);var d=c(h),p=m(e),d=p-(g+d);d<O&&(d=(O-d)/2,r=Math.max(r,d),v(h,g-d),v(e,p+d))}}if(r<M)break}for(const w of i)w.style.y+=m(w)-g(w)}return i}};function SO(t){t/=255;return t<=.03928?t/12.92:Math.pow((.055+t)/1.055,2.4)}function EO(t,e,n){return.2126*SO(t)+.7152*SO(e)+.0722*SO(n)}function AO(t,e){var{r:t,g:n,b:r}=t,{r:e,g:i,b:a}=e,t=EO(t,n,r),n=EO(e,i,a);return(Math.max(t,n)+.05)/(Math.min(t,n)+.05)}function LO(e,t){return t[Wc(t,t=>{return AO(e,"object"==typeof(t=t)?t:X.parseColor(t))})]}const TO=t=>{const{threshold:n=4.5,palette:r=["#000","#fff"]}=t;return(t,e)=>(t.forEach(t=>{var e=t.attr("dependentElement").parsedStyle.fill;AO(t.parsedStyle.fill,e)<n&&t.attr("fill",LO(e,r))}),t)},PO=t=>(t,e)=>(t.forEach(t=>{Vw(t);var e=t.attr("bounds");!function(t,e){var[t,n]=t;return!(kO(t,e)&&kO(n,e))}(wO(t.getLocalBounds()),e)||Hw(t)}),t);var T=1e-6,NO=1e-12,E=Math.PI,jO=E/2,CO=E/4,RO=2*E,BO=180/E,IO=E/180,FO=Math.abs,DO=Math.atan,zO=Math.atan2,A=Math.cos,WO=Math.ceil,GO=Math.exp,HO=Math.log,VO=Math.pow,P=Math.sin,qO=Math.sign||function(t){return 0<t?1:t<0?-1:0},YO=Math.sqrt,$O=Math.tan;function UO(t){return 1<t?0:t<-1?E:Math.acos(t)}function KO(t){return 1<t?jO:t<-1?-jO:Math.asin(t)}function XO(){}function ZO(t,e){t&&JO.hasOwnProperty(t.type)&&JO[t.type](t,e)}var QO={Feature:function(t,e){ZO(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)ZO(n[r].geometry,e)}},JO={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){t3(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t3(n[r],e,0)},Polygon:function(t,e){e3(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)e3(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)ZO(n[r],e)}};function t3(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 e3(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)t3(t[n],e,1);e.polygonEnd()}function n3(t,e){t&&QO.hasOwnProperty(t.type)?QO[t.type](t,e):ZO(t,e)}function r3(t){return[zO(t[1],t[0]),KO(t[2])]}function i3(t){var e=t[0],t=t[1],n=A(t);return[n*A(e),n*P(e),P(t)]}function a3(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function o3(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 s3(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function l3(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function c3(t){var e=YO(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function u3(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 f3(t,e){return FO(t)>E&&(t-=Math.round(t/RO)*RO),[t,e]}function h3(t,e,n){return(t%=RO)?e||n?u3(p3(t),g3(e,n)):p3(t):e||n?g3(e,n):f3}function d3(n){return function(t,e){return FO(t+=n)>E&&(t-=Math.round(t/RO)*RO),[t,e]}}function p3(t){var e=d3(t);return e.invert=d3(-t),e}function g3(t,e){var i=A(t),a=P(t),o=A(e),s=P(e);function n(t,e){var n=A(e),r=A(t)*n,t=P(t)*n,n=P(e),e=n*i+r*a;return[zO(t*o-e*s,r*i-n*a),KO(e*o+t*s)]}return n.invert=function(t,e){var n=A(e),r=A(t)*n,t=P(t)*n,n=P(e),e=n*o-t*s;return[zO(t*o+n*s,r*i+e*a),KO(e*i-r*a)]},n}function y3(t,e){(e=i3(e))[0]-=t,c3(e);t=UO(-e[1]);return((-e[2]<0?-t:t)+RO-T)%RO}function m3(){var r,e=[];return{point:function(t,e,n){r.push([t,e,n])},lineStart:function(){e.push(r=[])},lineEnd:XO,rejoin:function(){1<e.length&&e.push(e.pop().concat(e.shift()))},result:function(){var t=e;return e=[],r=null,t}}}function v3(t,e){return FO(t[0]-e[0])<T&&FO(t[1]-e[1])<T}function b3(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 x3(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(v3(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*T}s.push(n=new b3(r,t,null,!0)),l.push(n.o=new b3(r,null,n,!1)),s.push(n=new b3(i,t,null,!1)),l.push(n.o=new b3(i,null,n,!0))}}),s.length){for(l.sort(e),w3(s),w3(l),o=0,i=l.length;o<i;++o)l[o].e=n=!n;for(var c,u,f=s[0];;){for(var h=f,d=!0;h.v;)if((h=h.n)===f)return;c=h.z,a.lineStart();do{if(h.v=h.o.v=!0,h.e){if(d)for(o=0,i=c.length;o<i;++o)a.point((u=c[o])[0],u[1]);else r(h.x,h.n.x,1,a);h=h.n}else{if(d)for(c=h.p.z,o=c.length-1;0<=o;--o)a.point((u=c[o])[0],u[1]);else r(h.x,h.p.x,-1,a);h=h.p}}while(c=(h=h.o).z,d=!d,!h.v);a.lineEnd()}}}function w3(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 k3(t){return FO(t[0])<=E?t[0]:qO(t[0])*((FO(t[0])+E)%RO-E)}function M3(y,m,v,b){return function(s){var l,c,u,n=m(s),f=m3(),h=m(f),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=Xc(c);var t=function(t,e){var n=k3(e),r=e[1],e=P(r),i=[P(n),-A(n),0],a=0,o=0,s=new xc;1===e?r=jO+T:-1===e&&(r=-jO-T);for(var l=0,c=t.length;l<c;++l)if(f=(u=t[l]).length)for(var u,f,h=u[f-1],d=k3(h),p=h[1]/2+CO,g=P(p),y=A(p),m=0;m<f;++m,d=b,g=w,y=x,h=v){var v=u[m],b=k3(v),x=v[1]/2+CO,w=P(x),x=A(x),k=b-d,M=0<=k?1:-1,O=M*k,_=E<O,S=g*w;s.add(zO(S*M*P(O),y*x+S*A(O))),a+=_?k+M*RO:k,_^n<=d^n<=b&&(c3(S=o3(i3(h),i3(v))),c3(O=o3(i,S)),(M=(_^0<=k?-1:1)*KO(O[2]))<r||r===M&&(S[0]||S[1]))&&(o+=_^0<=k?1:-1)}return(a<-T||a<T&&s<-NO)^1&o}(l,b);c.length?(d||(s.polygonStart(),d=!0),x3(c,_3,t,v,s)):t&&(d||(s.polygonStart(),d=!0),s.lineStart(),v(null,null,1,s),s.lineEnd()),d&&(s.polygonEnd(),d=!1),c=l=null},sphere:function(){s.polygonStart(),s.lineStart(),v(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function r(t,e){y(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]),h.point(t,e)}function o(){h.lineStart(),u=[]}function g(){p(u[0][0],u[0][1]),h.lineEnd();var t,e,n,r,i=h.clean(),a=f.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(O3))}return e}}function O3(t){return 1<t.length}function _3(t,e){return((t=t.x)[0]<0?t[1]-jO-T:jO-t[1])-((e=e.x)[0]<0?e[1]-jO-T:jO-e[1])}f3.invert=f3;var S3=M3(function(){return 1},function(c){var u,f=NaN,h=NaN,d=NaN;return{lineStart:function(){c.lineStart(),u=1},point:function(t,e){var n,r,i,a,o,s=0<t?E:-E,l=FO(t-f);FO(l-E)<T?(c.point(f,h=0<(h+e)/2?jO:-jO),c.point(d,h),c.lineEnd(),c.lineStart(),c.point(s,h),c.point(t,h),u=0):d!==s&&E<=l&&(FO(f-d)<T&&(f-=d*T),FO(t-s)<T&&(t-=s*T),l=h,i=e,o=P((n=f)-(r=t)),h=FO(o)>T?DO((P(l)*(a=A(i))*P(r)-P(i)*(r=A(l))*P(n))/(r*a*o)):(l+i)/2,c.point(d,h),c.lineEnd(),c.lineStart(),c.point(s,h),u=0),c.point(f=t,h=e),d=s},lineEnd:function(){c.lineEnd(),f=h=NaN},clean:function(){return 2-u}}},function(t,e,n,r){var i;null==t?(i=n*jO,r.point(-E,i),r.point(0,i),r.point(E,i),r.point(E,0),r.point(E,-i),r.point(0,-i),r.point(-E,-i),r.point(-E,0),r.point(-E,i)):FO(t[0]-e[0])>T?(t=t[0]<e[0]?E:-E,i=n*t/2,r.point(-t,i),r.point(0,i),r.point(t,i)):r.point(e[0],e[1])},[-E,-jO]);function E3(d){var g=A(d),p=6*IO,f=0<g,h=FO(g)>T;function y(t,e){return A(t)*A(e)>g}function m(t,e,n){var r,i,a,o,s,l,c,u=[1,0,0],f=o3(i3(t),i3(e)),h=a3(f,f),d=f[0],p=h-d*d;return p?(r=o3(u,f),s3(u=l3(u,g*h/p),l3(f,-g*d/p)),(p=(f=a3(u,h=r))*f-(d=a3(h,h))*(a3(u,u)-1))<0?void 0:(s3(p=l3(h,(-f-(r=YO(p)))/d),u),p=r3(p),n?(i=t[0],a=e[0],o=t[1],e=e[1],a<i&&(c=i,i=a,a=c),!(l=FO((s=a-i)-E)<T)&&e<o&&(c=o,o=e,e=c),(l||s<T?l?0<o+e^p[1]<(FO(p[0]-i)<T?o:e):o<=p[1]&&p[1]<=e:E<s^(i<=p[0]&&p[0]<=a))?(s3(c=l3(h,(-f+r)/d),u),[p,r3(c)]):void 0):p)):!n&&t}function v(t,e){var n=f?d:E-d,r=0;return t<-n?r|=1:n<t&&(r|=2),e<-n?r|=4:n<e&&(r|=8),r}return M3(y,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=y(t,e),t=f?i?0:v(t,e):i?v(t+(t<0?E:-E),e):0;!o&&(c=l=i)&&a.lineStart(),i===l||(n=m(o,r))&&!v3(o,n)&&!v3(r,n)||(r[2]=1),i!==l?(u=0,i?(a.lineStart(),n=m(r,o),a.point(n[0],n[1])):(n=m(o,r),a.point(n[0],n[1],2),a.lineEnd()),o=n):h&&o&&f^i&&(t&s||!(e=m(r,o,!0))||(u=0,f?(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&&v3(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=A(r),c=P(r),u=o*a;null==n?(n=r+o*RO,s=r-u/2):(n=y3(l,n),s=y3(l,s),(0<o?n<s:s<n)&&(n+=o*RO));for(var f,h=n;0<o?s<h:h<s;h-=u)f=r3([l,-c*A(h),-c*P(h)]),i.point(f[0],f[1])}},f?[0,-d]:[-E,d-E])}var A3=1e9,L3=-A3;function T3(m,v,b,x){function w(t,e){return m<=t&&t<=b&&v<=e&&e<=x}function k(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?m:b,1<i?x:v),(i=(i+n+4)%4)!==a;);else r.point(e[0],e[1])}function o(t,e){return FO(t[0]-m)<T?0<e?0:3:FO(t[0]-b)<T?0<e?2:1:FO(t[1]-v)<T?0<e?1:0:0<e?3:2}function M(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,f,a,o,s,l,c,u,h,d,p,g=r,t=m3(),e={point:n,lineStart:function(){e.point=y,f&&f.push(a=[]);d=!0,h=!1,c=u=NaN},lineEnd:function(){i&&(y(o,s),l&&h&&t.rejoin(),i.push(t.result()));e.point=n,h&&g.lineEnd()},polygonStart:function(){g=t,i=[],f=[],p=!0},polygonEnd:function(){var t=function(){for(var t=0,e=0,n=f.length;e<n;++e)for(var r,i,a=f[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)*(m-r)<(c-r)*(x-i)&&++t:u<=x&&(c-r)*(x-i)<(u-i)*(m-r)&&--t;return t}(),e=p&&t,n=(i=Xc(i)).length;(e||n)&&(r.polygonStart(),e&&(r.lineStart(),k(null,null,1,r),r.lineEnd()),n&&x3(i,M,t,k,r),r.polygonEnd());g=r,i=f=a=null}};function n(t,e){w(t,e)&&g.point(t,e)}function y(t,e){var n,r,i=w(t,e);f&&a.push([t,e]),d?(o=t,s=e,d=!1,(l=i)&&(g.lineStart(),g.point(t,e))):i&&h?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,f=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,f||!(0<n)){if(n/=f,f<0){if(n<l)return;n<c&&(c=n)}else if(0<f){if(c<n)return;l<n&&(l=n)}if(n=a-s,f||!(n<0)){if(n/=f,f<0){if(c<n)return;l<n&&(l=n)}else if(0<f){if(n<l)return;n<c&&(c=n)}return 0<l&&(t[0]=o+l*u,t[1]=s+l*f),c<1&&(e[0]=o+c*u,e[1]=s+c*f),1}}}}}(n=[c=Math.max(L3,Math.min(A3,c)),u=Math.max(L3,Math.min(A3,u))],r=[t=Math.max(L3,Math.min(A3,t)),e=Math.max(L3,Math.min(A3,e))],m,v,b,x)?i&&(g.lineStart(),g.point(t,e),p=!1):(h||(g.lineStart(),g.point(n[0],n[1])),g.point(r[0],r[1]),i||g.lineEnd(),p=!1),c=t,u=e,h=i}return e}}function P3(t,e,n){var r=Zc(t,e-T,n).concat(e);return function(e){return r.map(function(t){return[e,t]})}}function N3(t,e,n){var r=Zc(t,e-T,n).concat(e);return function(e){return r.map(function(t){return[t,e]})}}function j3(){return g=p=10,y=90,m=360,v=2.5,e.lines=function(){return t().map(function(t){return{type:"LineString",coordinates:t}})},e.outline=function(){return{type:"Polygon",coordinates:[h(a).concat(d(l).slice(1),h(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(v)):[[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(v)):[[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?(y=+t[0],m=+t[1],e):[y,m]},e.stepMinor=function(t){return arguments.length?(p=+t[0],g=+t[1],e):[p,g]},e.precision=function(t){return arguments.length?(v=+t,u=P3(s,o,90),f=N3(r,n,v),h=P3(c,l,90),d=N3(a,i,v),e):v},e.extentMajor([[-180,-90+T],[180,90-T]]).extentMinor([[-180,-80-T],[180,80+T]])();function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return Zc(WO(a/y)*y,i,y).map(h).concat(Zc(WO(c/m)*m,l,m).map(d)).concat(Zc(WO(r/p)*p,n,p).filter(function(t){return FO(t%y)>T}).map(u)).concat(Zc(WO(s/g)*g,o,g).filter(function(t){return FO(t%m)>T}).map(f))}var n,r,i,a,o,s,l,c,u,f,h,d,p,g,y,m,v}var C3,R3,B3,I3,F3=t=>t,D3=new xc,z3=new xc,W3={point:XO,lineStart:XO,lineEnd:XO,polygonStart:function(){W3.lineStart=G3,W3.lineEnd=q3},polygonEnd:function(){W3.lineStart=W3.lineEnd=W3.point=XO,D3.add(FO(z3)),z3=new xc},result:function(){var t=D3/2;return D3=new xc,t}};function G3(){W3.point=H3}function H3(t,e){W3.point=V3,C3=B3=t,R3=I3=e}function V3(t,e){z3.add(I3*t-B3*e),B3=t,I3=e}function q3(){V3(C3,R3)}var Y3=W3,$3=1/0,U3=$3,K3=-$3,X3=K3;var Z3,Q3,J3,t4,e4={point:function(t,e){t<$3&&($3=t);K3<t&&(K3=t);e<U3&&(U3=e);X3<e&&(X3=e)},lineStart:XO,lineEnd:XO,polygonStart:XO,polygonEnd:XO,result:function(){var t=[[$3,U3],[K3,X3]];return K3=X3=-(U3=$3=1/0),t}},n4=0,r4=0,i4=0,a4=0,o4=0,s4=0,l4=0,c4=0,u4=0,f4={point:h4,lineStart:d4,lineEnd:y4,polygonStart:function(){f4.lineStart=m4,f4.lineEnd=v4},polygonEnd:function(){f4.point=h4,f4.lineStart=d4,f4.lineEnd=y4},result:function(){var t=u4?[l4/u4,c4/u4]:s4?[a4/s4,o4/s4]:i4?[n4/i4,r4/i4]:[NaN,NaN];return n4=r4=i4=a4=o4=s4=l4=c4=u4=0,t}};function h4(t,e){n4+=t,r4+=e,++i4}function d4(){f4.point=p4}function p4(t,e){f4.point=g4,h4(J3=t,t4=e)}function g4(t,e){var n=t-J3,r=e-t4,n=YO(n*n+r*r);a4+=n*(J3+t)/2,o4+=n*(t4+e)/2,s4+=n,h4(J3=t,t4=e)}function y4(){f4.point=h4}function m4(){f4.point=b4}function v4(){x4(Z3,Q3)}function b4(t,e){f4.point=x4,h4(Z3=J3=t,Q3=t4=e)}function x4(t,e){var n=t-J3,r=e-t4,n=YO(n*n+r*r);a4+=n*(J3+t)/2,o4+=n*(t4+e)/2,s4+=n,l4+=(n=t4*t-J3*e)*(J3+t),c4+=n*(t4+e),u4+=3*n,h4(J3=t,t4=e)}var w4=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,RO)}},result:XO};var M4,O4,_4,S4,E4,A4=new xc,L4={point:XO,lineStart:function(){L4.point=T4},lineEnd:function(){M4&&P4(O4,_4),L4.point=XO},polygonStart:function(){M4=!0},polygonEnd:function(){M4=null},result:function(){var t=+A4;return A4=new xc,t}};function T4(t,e){L4.point=P4,O4=S4=t,_4=E4=e}function P4(t,e){S4-=t,E4-=e,A4.add(YO(S4*S4+E4*E4)),S4=t,E4=e}var N4=L4;let j4,C4,R4,B4;class I4{constructor(t){this._append=null==t?F4:function(t){var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);if(15<e)return F4;if(e!==j4){const r=10**e;j4=e,C4=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 C4}(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===R4&&this._append===C4||(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`,R4=n,C4=this._append,B4=this._,this._=r),this._+=B4}}result(){var t=this._;return this._="",t.length?t:null}}function F4(t){let e=1;this._+=t[0];for(var n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function D4(e,n){let r=3,i=4.5,a,o;function s(t){return t&&("function"==typeof i&&o.pointRadius(+i.apply(this,arguments)),n3(t,a(o))),o.result()}return s.area=function(t){return n3(t,a(Y3)),Y3.result()},s.measure=function(t){return n3(t,a(N4)),N4.result()},s.bounds=function(t){return n3(t,a(e4)),e4.result()},s.centroid=function(t){return n3(t,a(w4)),w4.result()},s.projection=function(t){return arguments.length?(a=null==t?(e=null,F3):(e=t).stream,s):e},s.context=function(t){return arguments.length?(o=null==t?(n=null,new I4(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 I4(r)),s},s.projection(e).digits(r).context(n)}function z4(r){return function(t){var e,n=new W4;for(e in r)n[e]=r[e];return n.stream=t,n}}function W4(){}function G4(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),n3(n,t.stream(e4)),e(e4.result()),null!=r&&t.clipExtent(r),t}function H4(i,a,t){return G4(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 V4(t,e,n){return H4(t,[[0,0],e],n)}function q4(r,i,t){return G4(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 Y4(i,a,t){return G4(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)}W4.prototype={constructor:W4,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 $4=16,U4=A(30*IO);function K4(t,e){return+e?(E=t,A=e,function(r){var n,i,a,o,s,l,c,u,f,h,d,p,g={point:t,lineStart:e,lineEnd:m,polygonStart:function(){r.polygonStart(),g.lineStart=v},polygonEnd:function(){r.polygonEnd(),g.lineStart=e}};function t(t,e){t=E(t,e),r.point(t[0],t[1])}function e(){u=NaN,g.point=y,r.lineStart()}function y(t,e){var n=i3([t,e]),e=E(t,e);L(u,f,c,h,d,p,u=e[0],f=e[1],c=t,h=n[0],d=n[1],p=n[2],$4,r),r.point(u,f)}function m(){g.point=t,r.lineEnd()}function v(){e(),g.point=b,g.lineEnd=x}function b(t,e){y(n=t,e),i=u,a=f,o=h,s=d,l=p,g.point=y}function x(){L(u,f,c,h,d,p,i,a,n,o,s,l,$4,r),g.lineEnd=m,m()}return g}):(n=t,z4({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}}));var n,E,A;function L(t,e,n,r,i,a,o,s,l,c,u,f,h,d){var p,g,y,m,v,b,x,w,k,M,O=o-t,_=s-e,S=O*O+_*_;4*A<S&&h--&&(y=a+f,x=KO(y/=m=YO((p=r+c)*p+(g=i+u)*g+y*y)),v=FO(FO(y)-1)<T||FO(n-l)<T?(n+l)/2:zO(g,p),b=(x=E(v,x))[0],x=x[1],A<(M=_*(w=b-t)-O*(k=x-e))*M/S||.3<FO((O*w+_*k)/S-.5)||r*c+i*u+a*f<U4)&&(L(t,e,n,r,i,a,b,x,v,p/=m,g/=m,y,h,d),d.point(b,x),L(b,x,v,p,g,y,o,s,l,c,u,f,h,d))}}var X4=z4({point:function(t,e){this.stream.point(t*IO,e*IO)}});function Z4(t,n,r,i,a,e){var o,s,l,c,u,f,h,d,p,g,y,m;return e?(f=A(e),e=P(e),h=f*t,d=e*t,p=f/t,g=e/t,y=(e*r-f*n)/t,m=(e*n+f*r)/t,b.invert=function(t,e){return[i*(p*t-g*e+y),a*(m-g*t-p*e)]},b):(o=t,s=n,l=r,c=i,u=a,v.invert=function(t,e){return[(t-s)/o*c,(l-e)/o*u]},v);function v(t,e){return[s+o*(t*=c),l-o*(e*=u)]}function b(t,e){return[h*(t*=i)-d*(e*=a)+n,r-d*t-h*e]}}function Q4(t){return J4(function(){return t})()}function J4(t){var e,r,n,i,a,o,s,l,c,u,f=150,h=480,d=250,p=0,g=0,y=0,m=0,v=0,b=0,x=1,w=1,k=null,M=S3,O=null,_=F3,S=.5;function E(t){return l(t[0]*IO,t[1]*IO)}function A(t){return(t=l.invert(t[0],t[1]))&&[t[0]*BO,t[1]*BO]}function L(){var t=Z4(f,0,0,x,w,b).apply(null,e(p,g)),t=Z4(f,h-t[0],d-t[1],x,w,b);return r=h3(y,m,v),s=u3(e,t),l=u3(r,s),o=K4(s,S),T()}function T(){return c=u=null,E}return E.stream=function(t){return c&&u===t?c:c=X4((n=r,z4({point:function(t,e){t=n(t,e);return this.stream.point(t[0],t[1])}})(M(o(_(u=t))))));var n},E.preclip=function(t){return arguments.length?(M=t,k=void 0,T()):M},E.postclip=function(t){return arguments.length?(_=t,O=n=i=a=null,T()):_},E.clipAngle=function(t){return arguments.length?(M=+t?E3(k=t*IO):(k=null,S3),T()):k*BO},E.clipExtent=function(t){return arguments.length?(_=null==t?(O=n=i=a=null,F3):T3(O=+t[0][0],n=+t[0][1],i=+t[1][0],a=+t[1][1]),T()):null==O?null:[[O,n],[i,a]]},E.scale=function(t){return arguments.length?(f=+t,L()):f},E.translate=function(t){return arguments.length?(h=+t[0],d=+t[1],L()):[h,d]},E.center=function(t){return arguments.length?(p=t[0]%360*IO,g=t[1]%360*IO,L()):[p*BO,g*BO]},E.rotate=function(t){return arguments.length?(y=t[0]%360*IO,m=t[1]%360*IO,v=2<t.length?t[2]%360*IO:0,L()):[y*BO,m*BO,v*BO]},E.angle=function(t){return arguments.length?(b=t%360*IO,L()):b*BO},E.reflectX=function(t){return arguments.length?(x=t?-1:1,L()):x<0},E.reflectY=function(t){return arguments.length?(w=t?-1:1,L()):w<0},E.precision=function(t){return arguments.length?(o=K4(s,S=t*t),T()):YO(S)},E.fitExtent=function(t,e){return H4(E,t,e)},E.fitSize=function(t,e){return V4(E,t,e)},E.fitWidth=function(t,e){return q4(E,t,e)},E.fitHeight=function(t,e){return Y4(E,t,e)},function(){return e=t.apply(this,arguments),E.invert=e.invert&&A,L()}}function t6(t){var e=0,n=E/3,r=J4(t),t=r(e,n);return t.parallels=function(t){return arguments.length?r(e=t[0]*IO,n=t[1]*IO):[e*BO,n*BO]},t}function e6(t,e){var n,r,i,a=P(t),o=(a+P(e))/2;return FO(o)<T?(n=A(t),s.invert=function(t,e){return[t/n,KO(e*n)]},s):(i=YO(r=1+a*(2*o-a))/o,l.invert=function(t,e){var e=i-e,n=zO(t,FO(e))*qO(e);return e*o<0&&(n-=E*qO(t)*qO(e)),[n/o,KO((r-(t*t+e*e)*o*o)/(2*o))]},l);function s(t,e){return[t*n,P(e)/n]}function l(t,e){e=YO(r-2*o*P(e))/o;return[e*P(t*=o),i-e*A(t)]}}function n6(){return t6(e6).scale(155.424).center([0,33.6442])}function r6(){return n6().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function i6(i){return function(t,e){var n=A(t),r=A(e),n=i(n*r);return n===1/0?[2,0]:[n*r*P(t),n*P(e)]}}function a6(a){return function(t,e){var n=YO(t*t+e*e),r=a(n),i=P(r),r=A(r);return[zO(t*i,n*r),KO(n&&e*i/n)]}}var o6=i6(function(t){return YO(2/(1+t))});o6.invert=a6(function(t){return 2*KO(t/2)});var s6=i6(function(t){return(t=UO(t))&&t/P(t)});function l6(t,e){return[t,HO($O((jO+e)/2))]}function c6(r){var i,a,o,s=Q4(r),e=s.center,l=s.scale,n=s.translate,c=s.clipExtent,u=null;function f(){var e,t=E*l(),n=s((e=h3((e=s.rotate())[0]*IO,e[1]*IO,2<e.length?e[2]*IO:0),function(t){return(t=e.invert(t[0]*IO,t[1]*IO))[0]*=BO,t[1]*=BO,t}([0,0])));return c(null==u?[[n[0]-t,n[1]-t],[n[0]+t,n[1]+t]]:r===l6?[[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),f):l)()},s.translate=function(t){return(arguments.length?(n(t),f):n)()},s.center=function(t){return(arguments.length?(e(t),f):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]),f()):null==u?null:[[u,i],[a,o]]},f()}function u6(t){return $O((jO+t)/2)}function f6(t,e){var n=A(t),i=t===e?P(t):HO(n/A(e))/HO(u6(e)/u6(t)),a=n*VO(u6(t),i)/i;return i?(r.invert=function(t,e){var e=a-e,n=qO(i)*YO(t*t+e*e),r=zO(t,FO(e))*qO(e);return e*i<0&&(r-=E*qO(t)*qO(e)),[r/i,2*DO(VO(a/n,1/i))-jO]},r):l6;function r(t,e){0<a?e<-jO+T&&(e=-jO+T):jO-T<e&&(e=jO-T);e=a/VO(u6(e),i);return[e*P(i*t),a-e*A(i*t)]}}function h6(t,e){return[t,e]}function d6(t,e){var n=A(t),r=t===e?P(t):(n-A(e))/(e-t),i=n/r+t;return FO(r)<T?h6:(a.invert=function(t,e){var e=i-e,n=zO(t,FO(e))*qO(e);return e*r<0&&(n-=E*qO(t)*qO(e)),[n/r,i-qO(r)*YO(t*t+e*e)]},a);function a(t,e){e=i-e,t*=r;return[e*P(t),i-e*A(t)]}}s6.invert=a6(function(t){return t}),l6.invert=function(t,e){return[t,2*DO(GO(e))-jO]},h6.invert=h6;var p6=1.340264,g6=-.081106,y6=893e-6,m6=.003796,v6=YO(3)/2;function b6(t,e){var e=KO(v6*P(e)),n=e*e,r=n*n*n;return[t*A(e)/(v6*(p6+3*g6*n+r*(7*y6+9*m6*n))),e*(p6+g6*n+r*(y6+m6*n))]}function x6(t,e){var n=A(e),r=A(t)*n;return[n*P(t)/r,P(e)/r]}function w6(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 k6(t,e){return[A(e)*P(t),P(e)]}function M6(t,e){var n=A(e),r=1+A(t)*n;return[n*P(t)/r,P(e)/r]}function O6(t,e){return[HO($O((jO+e)/2)),-t]}b6.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*(p6+g6*i+a*(y6+m6*i))-e)/(p6+3*g6*i+a*(7*y6+9*m6*i)))*r)*i*i,!(FO(n)<NO));++o);return[v6*t*(p6+3*g6*i+a*(7*y6+9*m6*i))/A(r),KO(P(r)/v6)]},x6.invert=a6(DO),w6.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))),FO(a)>T&&0<--r);return[t/(.8707+(i=n*n)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),n]},k6.invert=a6(KO),M6.invert=a6(function(t){return 2*DO(t)}),O6.invert=function(t,e){return[-e,2*DO(GO(t))-jO]};var _6=Object.freeze({__proto__:null,geoAlbersUsa:function(){var e,n,i,a,o,r,s=r6(),l=n6().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=n6().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){r=[t,e]}};function f(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 h(){return e=n=null,f}return f.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)},f.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},f.precision=function(t){return arguments.length?(s.precision(t),l.precision(t),c.precision(t),h()):s.precision()},f.scale=function(t){return arguments.length?(s.scale(t),l.scale(.35*t),c.scale(t),f.translate(s.translate())):s.scale()},f.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+T,r+.12*e+T],[n-.214*e-T,r+.234*e-T]]).stream(u),o=c.translate([n-.205*e,r+.212*e]).clipExtent([[n-.214*e+T,r+.166*e+T],[n-.115*e-T,r+.234*e-T]]).stream(u),h()):s.translate()},f.fitExtent=function(t,e){return H4(f,t,e)},f.fitSize=function(t,e){return V4(f,t,e)},f.fitWidth=function(t,e){return q4(f,t,e)},f.fitHeight=function(t,e){return Y4(f,t,e)},f.scale(1070)},geoAlbers:r6,geoAzimuthalEqualArea:function(){return Q4(o6).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:o6,geoAzimuthalEquidistant:function(){return Q4(s6).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:s6,geoConicConformal:function(){return t6(f6).scale(109.5).parallels([30,30])},geoConicConformalRaw:f6,geoConicEqualArea:n6,geoConicEqualAreaRaw:e6,geoConicEquidistant:function(){return t6(d6).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:d6,geoEqualEarth:function(){return Q4(b6).scale(177.158)},geoEqualEarthRaw:b6,geoEquirectangular:function(){return Q4(h6).scale(152.63)},geoEquirectangularRaw:h6,geoGnomonic:function(){return Q4(x6).scale(144.049).clipAngle(60)},geoGnomonicRaw:x6,geoIdentity:function(){var r,i,e,n,a,o,s,l=1,c=0,u=0,f=1,h=1,d=0,p=null,g=1,y=1,m=z4({point:function(t,e){t=x([t,e]);this.stream.point(t[0],t[1])}}),v=F3;function b(){return g=l*f,y=l*h,o=s=null,x}function x(t){var e,n=t[0]*g,t=t[1]*y;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/y]},x.stream=function(t){return o&&s===t?o:o=m(v(s=t))},x.postclip=function(t){return arguments.length?(v=t,p=e=n=a=null,b()):v},x.clipExtent=function(t){return arguments.length?(v=null==t?(p=e=n=a=null,F3):T3(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=P(d=t%360*IO),r=A(d),b()):d*BO},x.reflectX=function(t){return arguments.length?(f=t?-1:1,b()):f<0},x.reflectY=function(t){return arguments.length?(h=t?-1:1,b()):h<0},x.fitExtent=function(t,e){return H4(x,t,e)},x.fitSize=function(t,e){return V4(x,t,e)},x.fitWidth=function(t,e){return q4(x,t,e)},x.fitHeight=function(t,e){return Y4(x,t,e)},x},geoProjection:Q4,geoProjectionMutator:J4,geoMercator:function(){return c6(l6).scale(961/RO)},geoMercatorRaw:l6,geoNaturalEarth1:function(){return Q4(w6).scale(175.295)},geoNaturalEarth1Raw:w6,geoOrthographic:function(){return Q4(k6).scale(249.5).clipAngle(90+T)},geoOrthographicRaw:k6,geoStereographic:function(){return Q4(M6).scale(250).clipAngle(142)},geoStereographicRaw:M6,geoTransverseMercator:function(){var t=c6(O6),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:O6});function S6(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 E6(t,e,n,r){var i,a,o,s,l,c,{outline:e=(e=e.filter(L6),e.find(t=>t.sphere)?{type:"Sphere"}:S6(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]]=D4(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 A6(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:[j3()]}}):"sphere"===e?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t)}function L6(t){return"geoPath"===t.type}cg=()=>t=>{var{children:e,coordinate:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,h=et(n,["type"]),d=function(t){if("function"==typeof t)return t;var e="geo"+Ze(t);if(e=_6[e])return e;throw new Error("Unknown coordinate: "+t)}(r),p=e.map(A6);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=(E6(i,p,l,h),i),l=h;for([o,s]of Object.entries(l))null!=(a=c[o])&&a.call(c,s);g=D4(i);const u=new Bp({domain:[t,t+n]}),f=new Bp({domain:[e,e+r]});return{transform:t=>{return t=t,(t=i(t))?([t,e]=t,[u.map(t),f.map(e)]):null;var e},untransform:t=>{return(t=t)?([t,e]=t,t=[u.invert(t),f.invert(e)],i.invert(t)):null;var e}}}]]}},children:p.flatMap(t=>{var e,n,r;return L6(t)?({style:n,tooltip:r={}}=e=t,Object.assign(Object.assign({},e),{type:"path",tooltip:tf(r,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},n),{d:t=>g(t)||[]})})):t})})]},cg.props={},ls=()=>t=>{var{data:e,scale:n,encode:r,style:i,animate:a,key:o}=t,t=et(t,["type","data","scale","encode","style","animate","key"]);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}]})]};ls.props={};const T6={"composition.geoView":cg,"composition.geoPath":ls};function P6(){return Object.assign({"data.fetch":Sh,"data.inline":jh,"data.sortBy":Nh,"data.sort":Lh,"data.filter":Ah,"data.pick":Th,"data.rename":Ph,"data.fold":Eh,"data.slice":ld,"data.custom":Ch,"data.map":Rh,"data.cluster":fh,"data.tree":hh,"data.sankey":Hu,"data.arc":Dh,"data.wordCloud":ad,"data.join":sd,"transform.maybeZeroY1":tM,"transform.maybeZeroX":pM,"transform.maybeStackY":hM,"transform.maybeTitle":dM,"transform.maybeSeries":vM,"transform.maybeZeroPadding":OM,"transform.stackY":uM,"transform.binX":yO,"transform.bin":gO,"transform.dodgeX":LM,"transform.jitter":CM,"transform.jitterX":RM,"transform.symmetryY":BM,"transform.diffY":IM,"transform.stackEnter":TM,"transform.normalizeY":PM,"transform.select":GM,"transform.selectX":HM,"transform.selectY":VM,"transform.groupX":nO,"transform.groupY":rO,"transform.groupColor":iO,"transform.group":eO,"transform.maybeSize":yM,"transform.maybeZeroY":gM,"transform.maybeKey":mM,"transform.sortX":sO,"transform.sortY":cO,"transform.sortColor":lO,"transform.flexX":uO,"transform.maybeTupleY":bM,"transform.maybeTupleX":xM,"transform.maybeIdentityY":wM,"transform.maybeIdentityX":kM,"transform.maybeTuple":EM,"transform.maybeVisualPosition":_M,"transform.maybeFunctionAttribute":SM,"transform.maybeGradient":AM,"transform.maybeTooltip":MM,"transform.pack":hO,"transform.sample":bO,"transform.filter":xO,"coordinate.cartesian":js,"coordinate.polar":Rs,"coordinate.helix":Bs,"coordinate.transpose":Is,"coordinate.theta":Fs,"coordinate.parallel":Ws,"coordinate.fisheye":Gs,"coordinate.radial":zs,"coordinate.radar":Hs,"encode.constant":Vs,"encode.field":Ys,"encode.transform":qs,"encode.column":$s,"mark.interval":lc,"mark.rect":cc,"mark.line":uu,"mark.point":fu,"mark.text":hu,"mark.cell":du,"mark.area":pu,"mark.link":gu,"mark.image":yu,"mark.polygon":mu,"mark.box":vu,"mark.vector":bu,"mark.lineX":wu,"mark.lineY":xu,"mark.connector":ku,"mark.range":_u,"mark.rangeX":Su,"mark.rangeY":Eu,"mark.sankey":rf,"mark.path":af,"mark.treemap":uf,"mark.pack":ff,"mark.boxplot":xf,"mark.shape":wf,"mark.forceGraph":ch,"mark.gauge":P0,"mark.tree":dh,"mark.wordCloud":cd,"palette.category10":N0,"palette.category20":j0,"scale.linear":R0,"scale.ordinal":B0,"scale.band":C0,"scale.identity":I0,"scale.point":F0,"scale.time":D0,"scale.log":z0,"scale.pow":W0,"scale.sqrt":q0,"scale.threshold":G0,"scale.quantile":H0,"scale.quantize":V0,"scale.sequential":Y0,"scale.constant":$0,"shape.interval.rect":X1,"shape.interval.hollow":Z1,"shape.interval.funnel":Q1,"shape.interval.pyramid":tg,"shape.rect.rect":X1,"shape.rect.hollow":Z1,"shape.cell.cell":X1,"shape.cell.hollow":Z1,"shape.line.line":ig,"shape.line.hv":og,"shape.line.vh":sg,"shape.line.hvh":lg,"shape.line.smooth":ag,"shape.point.bowtie":fg,"shape.point.cross":hg,"shape.point.diamond":dg,"shape.point.hexagon":pg,"shape.point.hollowBowtie":gg,"shape.point.hollowDiamond":yg,"shape.point.hollowHexagon":mg,"shape.point.hollow":vg,"shape.point.hollowSquare":bg,"shape.point.hollowTriangle":xg,"shape.point.hollowTriangleDown":wg,"shape.point.hyphen":kg,"shape.point.line":Mg,"shape.point.plus":Og,"shape.point.point":_g,"shape.point.square":Sg,"shape.point.tick":Eg,"shape.point.triangle":Ag,"shape.point.triangleDown":Lg,"shape.text.text":P2,"shape.area.area":B2,"shape.area.smooth":I2,"shape.area.hvh":F2,"shape.area.vh":D2,"shape.area.hv":z2,"shape.link.smooth":G2,"shape.link.vhv":H2,"shape.link.arc":V2,"shape.link.link":W2,"shape.image.image":q2,"shape.polygon.polygon":Y2,"shape.polygon.ribbon":$2,"shape.box.box":U2,"shape.vector.vector":Tg,"shape.label.label":fx,"shape.text.badge":j2,"shape.lineX.line":K2,"shape.lineY.line":K2,"shape.shape.shape":gx,"shape.connector.connector":Q2,"shape.range.range":X1,"shape.rangeX.range":X1,"shape.rangeY.range":X1,"shape.path.path":dx,"shape.path.hollow":px,"theme.classic":mx,"theme.classicDark":vx,"theme.academy":xx,"component.axisX":Ux,"component.axisY":Kx,"component.axisRadar":Xx,"component.axisLinear":Yx,"component.axisArc":$x,"component.legendCategory":tw,"component.legendContinuous":ew,"component.legendContinuousBlock":nw,"component.legendContinuousBlockSize":rw,"component.legendContinuousSize":iw,"component.title":sw,"component.sliderX":hw,"component.sliderY":dw,"component.scrollbarX":gw,"component.scrollbarY":yw,"animation.scaleInX":kw,"animation.scaleOutX":Mw,"animation.scaleInY":Ow,"animation.scaleOutY":_w,"animation.waveIn":Rw,"animation.fadeIn":Sw,"animation.fadeOut":Ew,"animation.zoomIn":Bw,"animation.zoomOut":Iw,"animation.pathIn":Fw,"animation.morphing":Cw,"animation.growInX":Dw,"animation.growInY":zw,"interaction.elementHighlight":l5,"interaction.elementHighlightByX":c5,"interaction.elementHighlightByColor":u5,"interaction.elementSelect":h5,"interaction.elementSelectByX":d5,"interaction.elementSelectByColor":p5,"interaction.fisheye":y5,"interaction.chartIndex":g5,"interaction.tooltip":P5,"interaction.legendFilter":G5,"interaction.legendHighlight":H5,"interaction.brushHighlight":$5,"interaction.brushXHighlight":K5,"interaction.brushYHighlight":Z5,"interaction.brushAxisHighlight":ok,"interaction.brushFilter":lk,"interaction.brushXFilter":ck,"interaction.brushYFilter":uk,"interaction.sliderFilter":hk,"interaction.poptip":gk,"interaction.event":bk,"composition.spaceLayer":Mk,"composition.spaceFlex":Ok,"composition.mark":Sk,"composition.view":_k,"composition.facetRect":Bk,"composition.repeatMatrix":zk,"composition.facetCircle":Yk,"composition.timingKeyframe":$k,"labelTransform.overlapHide":MO,"labelTransform.overlapDodgeY":_O,"labelTransform.overflowHide":PO,"labelTransform.contrastReverse":TO},T6)}function N6(t,e,n){for(;t<e;)t+=2*Math.PI;for(;n<t;)t-=2*Math.PI;return t}function j6(t,e,n,r,i){var a=t[0],t=t[1],o=J();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 C6(t,e,n,r,i){var a=new Bp({range:[e,e+r]}),o=new Bp({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 R6(t,e,n,r,i){return(0,t[0])(e,n,r,i)}function B6(t,e,n,r,i){return t[0]}function I6(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],t=t[3],l=new Bp({range:[s,t]}),c=new Bp({range:[a,o]}),u=1<(s=i/r)?1:s,f=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)*f)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/u,t=2*(t-.5)/f,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=N6(Math.atan2(t,e),a,o);return[c.invert(t),l.invert(n)]}}}function F6(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 D6(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return q6.apply(void 0,Y6([[-1,-1]],e,!1))}function z6(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return q6.apply(void 0,Y6([[-1,1]],e,!1))}function W6(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return q6.apply(void 0,Y6([[1,-1]],e,!1))}function G6(t,e,n,r,i){var a,t=t[0],o=J();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 H6(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 Bp({range:[s,s+.99*l]}),f=new Bp({range:[a,o]}),h=1<(t=i/r)?1:t,d=1<t?1/t:1;return{transform:function(t){var e=t[0],t=t[1],e=f.map(e),t=u.map(t);return[.5*(Math.cos(e)*(c*e+t)*h)+.5,.5*(Math.sin(e)*(c*e+t)*d)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/h,t=2*(t-.5)/d,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=N6(Math.atan2(t,e)+Math.floor(n/l)*Math.PI*2,a,o),e=n-c*t;return[f.invert(t),u.invert(e)]}}}function V6(t,e,n,r,i){var s=t[0],l=t[1],a=t[2],t=t[3],c=new Bp({range:[a,t]});return{transform:function(t){for(var e=[],n=t.length,r=new Ip({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 q6=function(t,e,n,r,i){var a=t[0],t=t[1],o=J();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},Y6=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 $6(t){return 1/Math.tan(t)}function U6(t,e,n,r,i){var a=$6(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 K6(t,e,n,r,i){var a=$6(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 X6(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 Z6(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 Q6(t,e,n){return n?new Bp({range:[0,1],domain:[0,e]}).map(t):t}function J6(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=Q6(a,r,void 0!==t&&t);return{transform:function(t){var e=t[0],t=t[1];return[X6(e,s,o,0,1),t]},untransform:function(t){var e=t[0],t=t[1];return[Z6(e,s,o,0,1),t]}}}function t_(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=Q6(a,i,void 0!==t&&t);return{transform:function(t){return[t[0],X6(t[1],s,o,0,1)]},untransform:function(t){return[t[0],Z6(t[1],s,o,0,1)]}}}function e_(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=t[4],c=Q6(a,r,t=void 0!==t&&t),u=Q6(o,i,t);return{transform:function(t){var e=t[0],t=t[1];return[X6(e,c,s,0,1),X6(t,u,l,0,1)]},untransform:function(t){var e=t[0],t=t[1];return[Z6(e,c,s,0,1),Z6(t,u,l,0,1)]}}}function n_(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 Bp({range:[0,r]}),u=new Bp({range:[0,i]}),f=t?a:c.map(a),h=t?o:u.map(o);return{transform:function(t){var e=t[0],t=t[1],n=c.map(e)-f,r=u.map(t)-h,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=X6(i,0,l,0,s),t=Math.atan2(r,n),i=f+e*Math.cos(t),r=h+e*Math.sin(t),[c.invert(i),u.invert(r)])},untransform:function(t){var e=t[0],t=t[1],n=c.map(e)-f,r=u.map(t)-h,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=Z6(i,0,l,0,s),t=Math.atan2(r,n),i=f+e*Math.cos(t),r=h+e*Math.sin(t),[c.invert(i),u.invert(r)])}}}var r_=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))},i_=(a_.prototype.update=function(t){this.options=Dd({},this.options,t),this.recoordinate()},a_.prototype.clone=function(){return new a_(this.options)},a_.prototype.getOptions=function(){return this.options},a_.prototype.clear=function(){this.update({transformations:[]})},a_.prototype.getSize=function(){var t=this.options;return[t.width,t.height]},a_.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y;return[(2*e+t.width)/2,(2*n+t.height)/2]},a_.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:r_(r_([],n,!0),[r_([],t,!0)],!1)}),this},a_.prototype.map=function(t){return this.output(t)},a_.prototype.invert=function(t){return this.input(t)},a_.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},a_.prototype.compose=function(t){for(var e=(t=void 0===t?!1:t)?r_([],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,f,h=s[o],d=h[0],h=h.slice(1),p=this.transformers[d];p&&(l=(f=this.options).x,c=f.y,u=f.width,f=f.height,p=p(r_([],h,!0),l,c,u,f),(h=p)instanceof Float32Array||h instanceof Array?r.push(p):(r.length&&(i(this.createMatrixTransform(r,t)),r.splice(0,r.length)),i(n(p)||zd,"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):zd}.apply(void 0,a)},a_.prototype.createMatrixTransform=function(t,e){var n,r,i,a,o,s,l,c,u,f,h,d,p=J();return e&&t.reverse(),t.forEach(function(t){return tt(p,p,t)}),e&&(e=t=p,(d=new Q(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,h=d*c+n*(u=-e*i+o*s)+r*(f=l*i-a*s))&&(t[0]=c*(h=1/h),t[1]=(-e*n+r*l)*h,t[2]=(o*n-r*a)*h,t[3]=u*h,t[4]=(e*d-r*s)*h,t[5]=(-o*d+r*i)*h,t[6]=f*h,t[7]=(-l*d+n*s)*h,t[8]=(a*d-n*i)*h),function(t){t=[t[0],t[1],1];return $t(t,t,p),[t[0],t[1]]}},a_);function a_(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:C6,translate:j6,custom:R6,matrix:B6,polar:I6,transpose:F6,scale:q6,"shear.x":U6,"shear.y":K6,reflect:D6,"reflect.x":z6,"reflect.y":W6,rotate:G6,helix:H6,parallel:V6,fisheye:e_,"fisheye.x":J6,"fisheye.y":t_,"fisheye.circular":n_},this.update(t)}function o_(e,n){const r=t=>{return"string"!=typeof t?t:n[t=e+"."+t]||Yu("Unknown Component: "+t)};return[t=>{var e=t["type"],t=et(t,["type"]);return r(e)(Object.assign({},t))},r]}function s_(t,e){var{coordinate:n={}}=t,t=et(t,["coordinate"]),{type:r,transform:i=[]}=n,n=et(n,["type","transform"]);if(!r)return Object.assign(Object.assign({},t),{coordinates:i});var[,e]=o_("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 l_(t,e){return t.filter(t=>t.type===e)}function c_(t){return 0<l_(t,"polar").length}function u_(t){return l_(t,"transpose").length%2==1}function f_(t){return 0<l_(t,"theta").length}function h_(t){return 0<l_(t,"radial").length}function p(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=p("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),ss=p("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Fo=p("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),yo=p("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),vo=p("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),i=p("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),r=p("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),n=p("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),bo=p("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),ds=p("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function d_(t,e,n){(t.prototype=e.prototype=n).constructor=t}function p_(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function g_(){}var y_=1/.7,fs="\\s*([+-]?\\d+)\\s*",o="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",xo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",m_=/^#([0-9a-f]{3,8})$/,v_=new RegExp(`^rgb\\(${fs},${fs},${fs}\\)$`),b_=new RegExp(`^rgb\\(${xo},${xo},${xo}\\)$`),x_=new RegExp(`^rgba\\(${fs},${fs},${fs},${o}\\)$`),w_=new RegExp(`^rgba\\(${xo},${xo},${xo},${o}\\)$`),k_=new RegExp(`^hsl\\(${o},${xo},${xo}\\)$`),M_=new RegExp(`^hsla\\(${o},${xo},${xo},${o}\\)$`),O_={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 __(){return this.rgb().formatHex()}function S_(){return this.rgb().formatRgb()}function E_(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=m_.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?A_(e):3===n?new N_(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?L_(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?L_(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=v_.exec(t))?new N_(e[1],e[2],e[3],1):(e=b_.exec(t))?new N_(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=x_.exec(t))?L_(e[1],e[2],e[3],e[4]):(e=w_.exec(t))?L_(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=k_.exec(t))?F_(e[1],e[2]/100,e[3]/100,1):(e=M_.exec(t))?F_(e[1],e[2]/100,e[3]/100,e[4]):O_.hasOwnProperty(t)?A_(O_[t]):"transparent"===t?new N_(NaN,NaN,NaN,0):null}function A_(t){return new N_(t>>16&255,t>>8&255,255&t,1)}function L_(t,e,n,r){return new N_(t=r<=0?e=n=NaN:t,e,n,r)}function T_(t){return(t=t instanceof g_?t:E_(t))?new N_((t=t.rgb()).r,t.g,t.b,t.opacity):new N_}function P_(t,e,n,r){return 1===arguments.length?T_(t):new N_(t,e,n,null==r?1:r)}function N_(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function j_(){return"#"+I_(this.r)+I_(this.g)+I_(this.b)}function C_(){var t=R_(this.opacity);return(1===t?"rgb(":"rgba(")+B_(this.r)+`, ${B_(this.g)}, `+B_(this.b)+(1===t?")":`, ${t})`)}function R_(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function B_(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function I_(t){return((t=B_(t))<16?"0":"")+t.toString(16)}function F_(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new z_(t,e,n,r)}function D_(t){var e,n,r,i,a,o,s,l;return t instanceof z_?new z_(t.h,t.s,t.l,t.opacity):(t=t instanceof g_?t:E_(t))?t instanceof z_?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 z_(o,s,l,t.opacity)):new z_}function z_(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function W_(t){return(t=(t||0)%360)<0?t+360:t}function G_(t){return Math.max(0,Math.min(1,t||0))}function H_(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}d_(g_,E_,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:__,formatHex:__,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return D_(this).formatHsl()},formatRgb:S_,toString:S_}),d_(N_,P_,p_(g_,{brighter(t){return t=null==t?y_:Math.pow(y_,t),new N_(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new N_(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new N_(B_(this.r),B_(this.g),B_(this.b),R_(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:j_,formatHex:j_,formatHex8:function(){return"#"+I_(this.r)+I_(this.g)+I_(this.b)+I_(255*(isNaN(this.opacity)?1:this.opacity))},formatRgb:C_,toString:C_})),d_(z_,function(t,e,n,r){return 1===arguments.length?D_(t):new z_(t,e,n,null==r?1:r)},p_(g_,{brighter(t){return t=null==t?y_:Math.pow(y_,t),new z_(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new z_(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 N_(H_(240<=t?t-240:120+t,n,e),H_(t,n,e),H_(t<120?240+t:t-120,n,e),this.opacity)},clamp(){return new z_(W_(this.h),G_(this.s),G_(this.l),R_(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=R_(this.opacity);return(1===t?"hsl(":"hsla(")+W_(this.h)+`, ${100*G_(this.s)}%, ${100*G_(this.l)}%`+(1===t?")":`, ${t})`)}}));const V_=Math.PI/180,q_=180/Math.PI;var Y_=1.78277,$_=-.29227,U_=-.90649,K_=1.97294,X_=K_*U_,Z_=K_*Y_,Q_=Y_*$_- -.14861*U_;function J_(t,e,n,r){return 1===arguments.length?(i=t)instanceof tS?new tS(i.h,i.s,i.l,i.opacity):(a=(i=i instanceof N_?i:T_(i)).r/255,o=i.g/255,l=i.b/255,l=(K_*(o-(a=(Q_*l+X_*a-Z_*o)/(Q_+X_-Z_)))-$_*(o=l-a))/U_,new tS((l=(s=Math.sqrt(l*l+o*o)/(K_*a*(1-a)))?Math.atan2(l,o)*q_-120:NaN)<0?l+360:l,s,a,i.opacity)):new tS(t,e,n,null==r?1:r);var i,a,o,s,l}function tS(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}d_(tS,J_,p_(g_,{brighter(t){return t=null==t?y_:Math.pow(y_,t),new tS(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new tS(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*V_,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),t=Math.sin(t);return new N_(255*(e+n*(-.14861*r+Y_*t)),255*(e+n*($_*r+U_*t)),255*(e+K_*r*n),this.opacity)}}));var eS=t=>()=>t;function nS(e,n){return function(t){return e+t*n}}function rS(a){return 1==(a=+a)?iS: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)}):eS(isNaN(t)?e:t);var n,r,i}}function iS(t,e){var n=e-t;return n?nS(t,n):eS(isNaN(t)?e:t)}!function t(e){var o=rS(e);function n(e,t){var n=o((e=P_(e)).r,(t=P_(t)).r),r=o(e.g,t.g),i=o(e.b,t.b),a=iS(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);aS=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 aS,oS=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=P_(t[o]),r[o]=e.r||0,i[o]=e.g||0,a[o]=e.b||0;return r=aS(r),i=aS(i),a=aS(a),e.opacity=1,function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e+""}};function sS(s){return function t(o){function e(e,t){var n=s((e=J_(e)).h,(t=J_(t)).h),r=iS(e.s,t.s),i=iS(e.l,t.l),a=iS(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)}sS(function(t,e){var n=e-t;return n?nS(t,180<n||n<-180?n-360*Math.round(n/360):n):eS(isNaN(t)?e:t)});var hs=sS(iS),Ms=t=>oS(t[t.length-1]),mo=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(p),wo=Ms(mo),ko=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(p),Lo=Ms(ko),To=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(p),No=Ms(To),c=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(p),Po=Ms(c),jo=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(p),Co=Ms(jo),us=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(p),go=Ms(us),gs=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(p),fo=Ms(gs),l=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(p),Ao=Ms(l),Gl=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(p),cs=Ms(Gl),vs=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(p),cg=Ms(vs),ls=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(p),fs=Ms(ls),xo=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(p),o=Ms(xo),lS=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(p),cS=Ms(lS),uS=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(p),fS=Ms(uS),hS=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(p),dS=Ms(hS),pS=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(p),gS=Ms(pS),yS=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(p),mS=Ms(yS),vS=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(p),bS=Ms(vS),xS=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(p),wS=Ms(xS),kS=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(p),MS=Ms(kS),OS=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(p),_S=Ms(OS),SS=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(p),ES=Ms(SS),AS=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(p),LS=Ms(AS),TS=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(p),PS=Ms(TS),NS=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(p),jS=Ms(NS),CS=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(p),RS=Ms(CS),BS=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(p),Ms=Ms(BS);var IS=hs(J_(300,.5,0),J_(-240,.5,1)),FS=hs(J_(-100,.75,.35),J_(80,1.5,.8)),hs=hs(J_(260,.75,.35),J_(80,1.5,.8)),DS=J_();var zS=P_(),WS=Math.PI/3,GS=2*Math.PI/3;function HS(e){var n=e.length;return function(t){return e[Math.max(0,Math.min(n-1,Math.floor(t*n)))]}}var VS=HS(p("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),qS=HS(p("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),YS=HS(p("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),$S=HS(p("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),US=Object.freeze({__proto__:null,schemeCategory10:a,schemeAccent:ss,schemeDark2:Fo,schemePaired:yo,schemePastel1:vo,schemePastel2:i,schemeSet1:r,schemeSet2:n,schemeSet3:bo,schemeTableau10:ds,interpolateBrBG:wo,schemeBrBG:mo,interpolatePRGn:Lo,schemePRGn:ko,interpolatePiYG:No,schemePiYG:To,interpolatePuOr:Po,schemePuOr:c,interpolateRdBu:Co,schemeRdBu:jo,interpolateRdGy:go,schemeRdGy:us,interpolateRdYlBu:fo,schemeRdYlBu:gs,interpolateRdYlGn:Ao,schemeRdYlGn:l,interpolateSpectral:cs,schemeSpectral:Gl,interpolateBuGn:cg,schemeBuGn:vs,interpolateBuPu:fs,schemeBuPu:ls,interpolateGnBu:o,schemeGnBu:xo,interpolateOrRd:cS,schemeOrRd:lS,interpolatePuBuGn:fS,schemePuBuGn:uS,interpolatePuBu:dS,schemePuBu:hS,interpolatePuRd:gS,schemePuRd:pS,interpolateRdPu:mS,schemeRdPu:yS,interpolateYlGnBu:bS,schemeYlGnBu:vS,interpolateYlGn:wS,schemeYlGn:xS,interpolateYlOrBr:MS,schemeYlOrBr:kS,interpolateYlOrRd:_S,schemeYlOrRd:OS,interpolateBlues:ES,schemeBlues:SS,interpolateGreens:LS,schemeGreens:AS,interpolateGreys:PS,schemeGreys:TS,interpolatePurples:jS,schemePurples:NS,interpolateReds:RS,schemeReds:CS,interpolateOranges:Ms,schemeOranges:BS,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:IS,interpolateRainbow:function(t){(t<0||1<t)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return DS.h=360*t-100,DS.s=1.5-1.5*e,DS.l=.8-.9*e,DS+""},interpolateWarm:FS,interpolateCool:hs,interpolateSinebow:function(t){var e;return t=(.5-t)*Math.PI,zS.r=255*(e=Math.sin(t))*e,zS.g=255*(e=Math.sin(t+WS))*e,zS.b=255*(e=Math.sin(t+GS))*e,zS+""},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:VS,interpolateMagma:qS,interpolateInferno:YS,interpolatePlasma:$S});function KS(t,e,n,r,i,a){var o,{guide:s={}}=n,l=function(t,e,n){var{type:n,domain:r,range:i}=n;return void 0!==n?n:function(t){return oE(t,Zu)}(e)?"identity":"string"==typeof i?"linear":2<(r||i||[]).length?eE(t):void 0===r?iE(e)?eE(t):aE(e)?"time":nE(t,i):iE([r])?eE(t):aE(e)?"time":nE(t,i)}(t,e,n);return"string"!=typeof l?n:(o=function(t,e,n){var r=n["domain"];if(void 0!==r)return r;var{domainMax:i,domainMin:a}=n;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":var[o,s]=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)Uu(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);return[a||o,i||s];case"band":case"ordinal":case"point":return rE(e);case"quantile":return function(t){return rE(t).sort()}(e);case"sequential":var[o,s]=function(t){let e=1/0,n=-1/0;for(const r of t)for(const i of r)Uu(i)&&(e=Math.min(e,+i),n=Math.max(n,+i));return e===1/0?[]:[e<0?-n:e,n]}(e);return[a||o,i||s];default:return[]}}(l,e,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=hp,nice:n=!1,tickCount:r=10}=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:f_(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=Ze(e),i=US["interpolate"+r];if(i)return{interpolator:n?t=>i(n(t)):i};throw new Error("Unknown palette: "+r)}(n);default:return n}}(l,t,n,r)),{domain:o,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=tE(n,r,i,a,o),[u,f]=function(t,e){return"enterDelay"===t?[0,1e3]:"enterDuration"==t?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:"color"===t?[e[0],function(t){return t[t.length-1]}(e)]:"opacity"!==t&&"size"===t?[1,10]:[0,1]}(e,u);return[l||u,c||f];case"band":case"point":return[l||0,c||1];case"ordinal":return tE(n,r,i,a,o);case"sequential":return;case"constant":return[n[0][0]];default:return[]}}(l,t,e,n,o,i,a),guide:s,name:t,type:l}))}function XS(t,e){var[e]=o_("scale",e),n=t["relations"],[n]=function(o){if(!o||!Array.isArray(o))return[Vu,Vu];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 ZS(t,n){var t=t.filter(({name:t,facet:e=!0})=>e&&t===n),e=t.flatMap(t=>t.domain),r=t.every(QS)?bc(e):t.every(JS)?Array.from(new Set(e)):null;if(null!==r)for(const i of t)i.domain=r}function QS(t){t=t.type;return"string"==typeof t&&["linear","log","pow","time"].includes(t)}function JS(t){t=t.type;return"string"==typeof t&&["band","point","ordinal"].includes(t)}function tE(t,e,n,r,i){var[i]=o_("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=Ze(t),i=US["scheme"+e],a=US["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 eE(t){return(t=t).startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")?"point":"ordinal"}function nE(t,e){return"color"!==t||e?"linear":"sequential"}function rE(t){return Array.from(new Set(t.flat()))}function iE(t){return oE(t,t=>{t=typeof t;return"string"==t||"boolean"==t})}function aE(t){return oE(t,t=>t instanceof Date)}function oE(t,e){for(const n of t)if(n.some(e))return!0;return!1}const sE={linear:"linear",identity:"identity",log:"log",pow:"pow",sqrt:"sqrt",sequential:"sequential"},lE={threshold:"threshold",quantize:"quantize",quantile:"quantile"},cE={ordinal:"ordinal",band:"band",point:"point"},uE={constant:"constant"};function fE(t,e,n){const{component:r=[],coordinates:d=[],title:i}=e,[,p]=o_("component",n),g=t.filter(({guide:t})=>null!==t);var a,e=function(t,e,n){const[,o]=o_("component",n),s=t["coordinates"];function i(t,e,n,r){[e,t,i=[]]=[e,t,s];var i,a,e="x"===e?u_(i)?t+"Y":t+"X":"y"===e?u_(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 y=[...r,...e];return i&&(t=p("title")["props"],{defaultPosition:n,defaultOrientation:e,defaultOrder:t,defaultSize:a}=t,y.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(Oc(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[];const l=(t,e)=>{t=h0(t);return t.forEach(t=>t.unshift(e)),t.push([e]),t.sort((t,e)=>e.length-t.length)},s=[["legendCategory",(()=>{var t=[["shape","discrete"],["shape","constant"]],e=[["size","constant"]],n=[["opacity","discrete"],["opacity","constant"]],r=[];for(const i of[["color","discrete"],["color","constant"]])for(const a of t)for(const o of e)for(const s of n)[i,a,o,s].every(t=>"constant"===t[1])||r.push(...l([a,o,s],i));return r.sort((t,e)=>e.length-t.length)})()],["legendContinuousSize",[[["color","continuous"],["opacity","continuous"],["size","continuous"]],[["color","constant"],["opacity","continuous"],["size","continuous"]],[["color","continuous"],["size","continuous"]],[["color","constant"],["size","continuous"]]]],["legendContinuousBlockSize",[[["color","distribution"],["opacity","distribution"],["size","distribution"]],[["color","distribution"],["size","distribution"]]]],["legendContinuousBlock",l([["opacity","continuous"]],["color","distribution"])],["legendContinuous",l([["opacity","continuous"]],["color","continuous"])]];t=Array.from(i).map(([,t])=>{var e,n,r=h0(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 sE?"continuous":t in cE?"discrete":t in lE?"distribution":t in uE?"constant":null]})}));const i=t=>t.sort((t,e)=>t[0].localeCompare(e[0]));for([e,n]of s)for(const{option:a,combination:o}of r)if(n.some(t=>un(i(t),i(a))))return[e,o];return null}).filter(Uu);return t}(t),...function(t,n){return t.map(t=>{var e=t["name"];if(!(0<l_(n,"helix").length||f_(n))&&(!u_(n)||!c_(n)&&!h_(n))){if(e.startsWith("x"))return c_(n)?["axisArc",[t]]:h_(n)?["axisLinear",[t]]:[u_(n)?"axisY":"axisX",[t]];if(e.startsWith("y"))return c_(n)?["axisLinear",[t]]:h_(n)?["axisArc",[t]]:[u_(n)?"axisX":"axisY",[t]];if(e.startsWith("position")){if(0<l_(n,"radar").length)return["axisRadar",[t]];if(!c_(n))return["axisY",[t]]}}return null}).filter(Uu)}(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 h of Array.isArray(n)?n:[n]){var l,c,[u,f]=function(t,e,n,r,i,a,o){var[s]=dE(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=pE(n),n===r.slice(-1)[0].name||null===a?[null,null]:([o,s]=dE(i),["center",(s-o)/(r.length-1)*a+o])}{var s;if("axisY"===t&&function(t){return 0<l_(t,"parallel").length}(i))return null===(s=pE(n))?e:u_(i)?0===s?["top",null]:["center","horizontal"]:0===s?e:["center","vertical"]}if("axisLinear"===t)return[r]=dE(i),["center",r];if("axisArc"===t)return"inner"===e[0]?["inner",null]:["outer",null];if(c_(i))return["center",null];if(h_(i))return["center",null];if("axisX"===t&&function(t){return 0<l_(t,"reflect").length}(i)||"axisX"===t&&function(t){return 0<l_(t,"reflectY").length}(i))return["top",null];return e}(t,e,i,a,o);if("string"==typeof t&&t.startsWith("legend")&&c_(o)&&"center"===r.position)return["center","vertical"];return e}(t,r,i,h,e,g,d);(u||f)&&({size:l=a,order:c=o}=h,y.push(Object.assign(Object.assign({title:s},h),{position:u,orientation:f,order:c,size:l,type:t,scales:e})))}}),y}function hE(t,e,n,r,i){var[a]=o_("component",r),{scales:o=[],bbox:s}=t,t=et(t,["scales","bbox"]),l=o.map(t=>XS(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 dE(t){var e,n=l_(t,"polar");return n.length?(n=n[n.length-1],{startAngle:n,endAngle:e}=Cs(n),[n,e]):(n=l_(t,"radial")).length?(e=n[n.length-1],{startAngle:t,endAngle:n}=Ds(e),[t,n]):[-Math.PI/2,Math.PI/2*3]}function pE(t){t=/position(\d*)/g.exec(t);return t?+t[1]:null}function gE(t,e){var t=function(t,e){var n=Oc(t,t=>t.position),{padding:t,paddingLeft:e=t,paddingRight:r=t,paddingBottom:i=t,paddingTop:t=t}=e,a={paddingBottom:i,paddingLeft:e,paddingTop:t,paddingRight:r};for(const l of["left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]){var o="padding"+qu(l);if(void 0===a[o])if(n.has(l)){const t=n.get(l);var s=t.reduce((t,{size:e})=>t+e,0);a[o]=s}else a[o]=30}return a}(t,e),{paddingLeft:n,paddingRight:r,paddingTop:i,paddingBottom:a}=t,{width:e,height:o,x:s=0,y:l=0,inset:c=0,insetLeft:u=c,insetTop:f=c,insetBottom:h=c,insetRight:c=c,margin:d=0,marginLeft:p=d,marginBottom:g=d,marginTop:y=d,marginRight:d=d}=e;return Object.assign(Object.assign({},t),{width:e,height:o,insetLeft:u,insetTop:f,insetBottom:h,insetRight:c,innerWidth:e-n-r-p-d,innerHeight:o-i-a-y-g,marginLeft:p,marginBottom:g,marginTop:y,marginRight:d,x:s,y:l})}function yE(t,B,e){var I=Oc(t,t=>t.position),{paddingLeft:t,paddingRight:e,paddingTop:n,paddingBottom:F,marginLeft:r,marginTop:i,marginBottom:D,marginRight:z,innerHeight:a,innerWidth:o,height:s,width:W}=e,t=t+r,r=n+i,n=e+z,i=F+D,G={top:[t,0,o,r,"vertical",!0,uc],right:[W-n,r,n,a,"horizontal",!1,uc],bottom:[t,s-i,o,i,"vertical",!1,uc],left:[0,r,t,a,"horizontal",!0,uc],"top-left":[t,0,o,r,"vertical",!0,uc],"top-right":[t,0,o,r,"vertical",!0,uc],"bottom-left":[t,s-i,o,i,"vertical",!1,uc],"bottom-right":[t,s-i,o,i,"vertical",!1,uc],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[C,t]of I.entries()){var l=G[C],[c,H]=u0(t,t=>"string"==typeof t.type&&("center"===C||!(!t.type.startsWith("axis")||!["inner","outer"].includes(C))));if(c.length){p=d=h=f=u=void 0;var u=c,f=B,h=l,d=C,[u,p]=u0(u,t=>!("string"!=typeof t.type||!t.type.startsWith("axis"))),c=(m=y=g=c=void 0,u),g=f,y=h,m=d;if("center"===m)if(!function(t){return ru(t)&&tu(t)}(g)){if(tu(g)){u=void 0;d=void 0;v=void 0;b=void 0;x=void 0;w=void 0;u=c;d=y;var[v,b,x,w]=d;for(const tt of u)tt.bbox={x:v,y:b,width:x,height:w}}else if(ru(g)){d=void 0;u=void 0;k=void 0;M=void 0;d=c;u=g;var k=y;var M=c[0].orientation;"horizontal"===M?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,k):"vertical"===M&&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,k)}}else{O=void 0;M=void 0;_=void 0;S=void 0;E=void 0;A=void 0;var O=c;M=y;var[_,S,E,A]=M;for(const R of O)R.bbox={x:_,y:S,width:E,height:A},R.radar={index:O.indexOf(R),count:O.length}}else if("inner"===m){L=void 0;d=void 0;u=void 0;V=void 0;q=void 0;k=void 0;T=void 0;P=void 0;Y=void 0;$=void 0;var L=c;d=g;u=y;var[V,q,,u]=u,[k,T]=d.getCenter(),[d]=ou(d),u=u/2,P=d*u,Y=k-P,$=T-P;for(let t=0;t<L.length;t++)L[t].bbox={x:V+Y,y:q+$,width:2*P,height:2*P}}else if("outer"===m){g=void 0;d=void 0;U=void 0;K=void 0;X=void 0;Z=void 0;g=c;d=y;var[U,K,X,Z]=d;for(const et of g)et.bbox={x:U,y:K,width:X,height:Z}}J=Q=j=y=c=m=T=u=N=void 0;var N=p,u=f,T=h;if(0!==N.length){var[T,m,c,y]=T,[u]=ou(u),j=y/2*u/Math.sqrt(2),Q=T+c/2,J=m+y/2;for(let t=0;t<N.length;t++)N[t].bbox={x:Q-j,y:J-j,width:2*j,height:2*j}}}H.length&&!function(n,t){const[e,r,i,a,o,s,l]=t,[c,u,f,h,d,p,g,y]="vertical"===o?["y",r,"x",e,"height",a,"width",i]:["x",e,"y",r,"width",i,"height",a],m=(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=m;t<n.length;t++){var v=n[t],b=v["size"];v.bbox={[c]:s?e-b:e,[f]:h,[d]:b,[g]:y},e+=b*(s?-1:1)}}(t,l)}}function mE(t,e,n){var{encode:r={},scale:i={},transform:a=[]}=e,e=et(e,["encode","scale","transform"]);return[t,Object.assign(Object.assign({},e),{encode:r,scale:i,transform:a})]}function vE(t,i,a){return ce(this,void 0,void 0,function*(){var t=a["library"],e=i["data"],[t]=o_("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=et(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)}),Vu)}([et(n,["transform"]),...r].map(t))(e);return[Array.isArray(n)?c0(n):[],Object.assign(Object.assign({},i),{data:n})]})}function bE(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 xE(t,e,n){const{encode:r,data:i}=e;var a;return r?(a=l0(r,t=>{var e,n;return function(t){if("object"!=typeof t||t instanceof Date||null===t)return;t=t.type;return Uu(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 wE(t,e,n){var r=e["encode"];return r?(r=l0(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 kE(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];n=n.library;const a=function(t){const[n]=o_("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=l0(r,t=>a(i,t));return[t,Object.assign(Object.assign({},e),{encode:n})]}function ME(t,e,n){var{tooltip:r={}}=e;return Qu(r)?[t,e]:Array.isArray(r)?[t,Object.assign(Object.assign({},e),{tooltip:{items:r}})]:Zu(r)&&ef(r)?[t,Object.assign(Object.assign({},e),{tooltip:r})]:[t,Object.assign(Object.assign({},e),{tooltip:{items:[r]}})]}function OE(g,t,e){const{data:y,encode:m,tooltip:n={}}=t;var r,i,a,o;return Qu(n)?[g,t]:(r=e=>{if(!e)return e;if("string"==typeof e)return g.map(t=>({name:e,value:y[t][e]}));if(Zu(e)){var{field:t,channel:n,color:r,name:i=t,valueFormatter:a=t=>t}=e,o="string"==typeof a?Lx(a):a,s=n&&m[n],a=s&&m[n].field,l=i||a||n,c=[];for(const d of g){var u=t?y[d][t]:s?m[n].value[d]:null;u&&(c[d]={name:l,color:r,value:o(u)})}return c}if("function"!=typeof e)return e;var f=[];for(const p of g){var h=e(y[p],p,y,m);Zu(h)?f[p]=h:f[p]={value:h}}return f},{title:o,items:i=[]}=n,a=et(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 _E(l,t,e){var n,r=t["encode"],i=et(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=et(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 SE(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 nt(e,{scale:Object.assign(Object.assign({},Object.fromEntries(l.map(t=>[t,{guide:s(r,t),slider:s(a,t),scrollbar:s(o,t)}]))),{color:{guide:s(i,"color")},size:{guide:s(i,"size")},shape:{guide:s(i,"shape")}})}),[t,e]}function EE(t,e,n){var r=e["animate"];return r||void 0===r||nt(e,{animate:{enter:{type:null},exit:{type:null},update:{type:null}}}),[t,e]}function AE(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]=o_("transform",t),{preInference:e=[],postInference:n=[]}=l,{transform:r=[]}=s,e=[mE,vE,bE,xE,wE,kE,_E,EE,SE,ME,...e.map(t),...r.map(t),...n.map(t),OE];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:h,data:r,tooltip:i}=e;if(!1===Array.isArray(r))return null;const a=c["channels"],o=Sc(Object.entries(n).filter(([,t])=>Uu(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:f}=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=h[t]||{},{independent:o=!1,key:s=u||t,type:i=i?"constant":r?"identity":c}=a,r=et(a,["independent","key","type"]),a="constant"===i,l=a?void 0:f;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 LE(F,D,z,W){var G;return ce(this,void 0,void 0,function*(){const[n]=o_("composition",z);var[t]=o_("interaction",z);const r=new Set(Object.keys(z).map(t=>{return null==(t=/mark\.(.*)/.exec(t))?void 0:t[1]}).filter(Uu)),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=[F],u=[];c.length;){var f=c.shift();if(a(f)){var h=l.get(f),[h,d]=h?jE(h,f,z):yield PE(f,z),p=(s.set(h,f),o.push(h),d.flatMap(e).map(t=>s_(t,z)));if(c.push(...p),p.every(a)){var g=yield Promise.all(p.map(t=>NE(t,z)));ZS(h=(h=g).flatMap(t=>Array.from(t.values())).flatMap(t=>t.channels.map(t=>t.scale)),"x"),ZS(h,"y");for(let t=0;t<p.length;t++){var y=p[t],m=g[t];l.set(y,m)}}}else{d="mark"===i(f)?f:yield WE(f,z),h=e(d);Array.isArray(h)?c.push(...h):"function"==typeof h&&u.push(h())}}W.emitter.emit(yk.BEFORE_PAINT);const v=new Map,b=new Map,x=[];D.selectAll(qE(H)).data(o,t=>t.key).join(t=>t.append("g").attr("className",H).attr("id",t=>t.key).call(TE).each(function(t){CE(t,it(this),x,z),v.set(t,this)}),t=>t.call(TE).each(function(t){CE(t,it(this),x,z),b.set(t,this)}),t=>t.each(function(){for(const t of this.nameInteraction.values())t.destroy()}).remove());var w=t=>Array.from(t.entries()).map(([t,e])=>({view:t,container:e,options:s.get(t),update:function(h,d,p){return f=>ce(this,void 0,void 0,function*(){var t,[e,n]=yield PE(f,d),r=(CE(e,h,[],d),h),i=f,a=e,o=p,[s]=o_("interaction",s=d),l=(l=r.node()).nameInteraction,c=zE(c=i["interaction"]).find(t=>"tooltip"===t.type);(l=l.get("tooltip"))&&(null!=(t=l.destroy)&&t.call(l),t=s(c),l={options:i,view:a,container:r.node(),update:t=>Promise.resolve(t)},t(l,[],o.emitter));for(const u of n)LE(u,h,d,p);return{options:f,view:e}})}(it(e),z,W)})),k=w(v);for(const T of k){const F=T["options"];var M=new Map;T.container.nameInteraction=M;for(const P of zE(F)){var O=t(P)(T,k,W.emitter);M.set(P.type,{destroy:O})}}var _=w(b);for(const N of _){const{options:F,container:j}=N;var S=j.nameInteraction;for(const C of zE(F)){var E=S.get(C.type);E&&null!=(G=E.destroy)&&G.call(E);E=t(C)(N,_,W.emitter);S.set(F.type,{destroy:E})}}const{width:A,height:B}=F;var L=[];for(const R of u){var I=new Promise(e=>ce(this,void 0,void 0,function*(){for(const t of R)yield LE(Object.assign({width:A,height:B},t),D,z,W);e()}));L.push(I)}W.views=o,W.animations=x,W.emitter.emit(yk.AFTER_PAINT);w=x.filter(Uu).map(FE).map(t=>t.finished);return Promise.all([...w,...L])})}function TE(t){t.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function PE(e,n){return ce(this,void 0,void 0,function*(){var t=function(t){var{coordinate:e={},interaction:n={},marks:r}=t,t=et(t,["coordinate","interaction","marks"]),i=r.map(t=>t.coordinate||{}),a=r.map(t=>t.interaction||{}),i=[...i,e].reduceRight((t,e)=>nt(t,e),{}),e=[n,...a].reduce((t,e)=>nt(t,e),{});return Object.assign(Object.assign({},t),{marks:r,coordinate:i,interaction:e})}(yield function(c,u){return ce(this,void 0,void 0,function*(){var[t,e]=o_("mark",u);const n=c["marks"];for(var r=[],i=[...n];i.length;){var[a]=i.splice(0,1),a=yield WE(a,u);const{type:s=Yu("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,s_(t,n));return jE(yield NE(t,n),t,n)})}function NE(p,g){return ce(this,void 0,void 0,function*(){var[t]=o_("theme",g),[,e]=o_("mark",g),{theme:n,marks:r,coordinates:i=[]}=p,a=t(DE(n)),o=new Map;for(const f of r){var s,l=f["type"],{props:l={}}=e(l),l=yield AE(f,l,g);l&&([l,s]=l,o.set(l,s))}for(const h of Oc(Array.from(o.values()).flatMap(t=>t.channels),({scaleKey:t})=>t).values()){var c=h.reduce((t,{scale:e})=>nt(t,e),{}),u=h[0]["values"],u=Array.from(new Set(u.map(t=>t.field).filter(Uu)));const p=nt({guide:{title:0===u.length?void 0:u},field:u[0]},c);u=h[0]["name"];const d=KS(u,h.flatMap(({values:t})=>t.map(t=>t.value)),p,i,a,g);h.forEach(t=>t.scale=d)}return o})}function jE(t,e,n){var[r]=o_("mark",n),[i]=o_("theme",n),[a]=o_("labelTransform",n);const{key:o,frame:s=!1,theme:l,clip:c,style:u={},labelTransform:f=[]}=e;var h,d,i=i(DE(l)),p=Array.from(t.values()),g=Array.from(new Set(p.flatMap(t=>t.channels.map(t=>t.scale)))),g=fE(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),y=gE(g,e),m=function(t,e,n){var[n]=o_("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 i_(Object.assign(Object.assign({},t),{x:a+c,y:o+u,width:i-a-s,height:r-l-o,transformations:e.map(n).flat()}))}(y,e,n),p=s?nt({mainLineWidth:1,mainStroke:"#000"},u):u,v=(yE(g,m,y),{}),b=[];for([h,d]of t.entries()){const{children:k,dataDomain:M,modifier:O,key:_}=h,{index:S,channels:E,tooltip:A}=d;var x=l0(Object.fromEntries(E.map(({name:t,scale:e})=>[t,e])),t=>XS(t,n));Object.assign(v,x);const L=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}(E,x),[T,P,N]=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])=>Uu(t)&&Uu(e))&&(r.push(a),i.push(o))}return[r,i]}(r(h)(S,x,L,m));var w=M||T.length;const j=O?O(P,w,y):[],C=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=T.map((t,e)=>{var n=Object.assign({points:P[e],transform:j[e],index:t,markKey:_,viewKey:o},A&&{title:C(t),items:R(t)});for(const[r,i]of Object.entries(L))n[r]=i[t],N&&(n["series"+Ze(r)]=N[e].map(t=>i[t]));return N&&(n.seriesIndex=N[e]),N&&A&&(n.seriesItems=N[e].map(t=>R(t)),n.seriesTitle=N[e].map(t=>C(t))),n}),w=(d.data=w,d.index=T,null==k?void 0:k(w,x,y));b.push(...w||[])}return[{layout:y,theme:i,coordinate:m,components:g,markState:t,key:o,clip:c,scale:v,style:p,labelTransform:RE(f.map(a))},b]}function CE(Z,Q,J,tt){ce(this,void 0,void 0,function*(){const{components:B,theme:n,layout:t,markState:r,coordinate:i,key:e,style:I,clip:a}=Z,{width:F,height:D}=t,z=et(t,["x","y","width","height"]),o=["view","plot","main","content"];var s=o.map((t,e)=>e);const l=o.map(t=>Ku(Object.assign({},n,I),t)),W=["a","margin","padding","inset"].map(t=>rt(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=it(this),t=l[t];for([e,n]of Object.entries(t))r.style(e,n)});let u=0,f=0,h=F,d=D;const p=s.map(t=>{var{left:t=0,top:e=0,bottom:n=0,right:r=0}=W[t];return u+=t,f+=e,h-=t+r,d-=e+n,{x:u,y:f,width:h,height:d}}),g=(Q.selectAll(qE(ut)).data(s.filter(t=>Uu(l[t])),t=>o[t]).join(t=>t.append("rect").attr("className",ut).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:f=300,delay:h=0}=r,{type:d,duration:p=300,delay:g=0}=o;for(const _ of i){var{updateType:y=s,updateDuration:m=l,updateDelay:v=c,enterType:b=u,enterDuration:x=f,enterDelay:w=h,exitDuration:k=p,exitDelay:M=g,exitType:O=d}=_;void 0!==y&&!y||(e=Math.max(e,m+v),n=Math.min(n,v)),void 0!==O&&!O||(e=Math.max(e,k+M),n=Math.min(n,M)),void 0!==b&&!b||(e=Math.max(e,x+w),n=Math.min(n,w))}}return e===-1/0?null:[n,e-n]}(r)),y=!!g&&{duration:g[1]};var m,v,b,s=Q.selectAll(qE(lt)).data(B,(t,e)=>t.type+"-"+e).join(t=>t.append("g").style("zIndex",({zIndex:t})=>t||-1).attr("className",lt).append(t=>hE(nt({animate:y},t),i,n,tt,r)),t=>t.transition(function(t){var{preserve:e=!1}=t;if(!e)return e=hE(nt({animate:y},t),i,n,tt,r)["attributes"],[t]=this.childNodes,t.update(e)})).transitions();J.push(...s.flat().filter(Uu));const x=Q.selectAll(qE(st)).data([t],()=>e).join(t=>t.append("rect").style("zIndex",0).style("fill","transparent").attr("className",st).call(GE).call(VE,Array.from(r.keys())).call(YE,a),t=>t.call(VE,Array.from(r.keys())).call(t=>{if(!g)return GE(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(YE,a)).transitions();J.push(...x.flat());for([m,v]of r.entries()){var G=v["data"];const{key:e,class:H,type:A}=m;var w=Q.select("#"+e);const L=function(l,t,e,n){const[c]=o_("shape",n),u=l["data"],{defaultShape:f,data:r}=t,h=r.map(t=>t.points),{theme:d,coordinate:p}=e,{type:g,style:y={}}=l;return(t,e)=>{var{shape:n=f}=y,{shape:n=n,points:r,seriesIndex:i,index:a}=t,t=et(t,["shape","points","seriesIndex","index"]),t=Object.assign(Object.assign({},t),{shape:n,mark:g,defaultShape:f,index:e});const o=i?i.map(t=>u[t]):u[a],s=i||a;e=l0(y,t=>BE(t,o,s,u));return c(Object.assign(Object.assign({},e),{type:HE(l,n)}))(r,t,p,d,h)}}(m,v,Z,tt),V=(k=m,b=v,IE("enter",k,b,Z,tt)),T=(k=m,b=v,IE("update",k,b,Z,tt)),q=(k=m,b=v,IE("exit",k,b,Z,tt));var k=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,H,"element");const x=w.selectAll(qE(ot)).selectFacetAll(k).data(G,t=>t.key,t=>t.groupKey).join(t=>t.append(L).attr("className",ot).attr("markType",A).transition(function(t){return V(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=L(t,e),s=T(t,[this],[o]);return null===s&&$u(this,o),s})}),t=>t.each(function(){this.__removed__=!0}).transition(function(t){return q(t,[this])}).remove(),t=>t.append(L).attr("className",ot).attr("markType",A).transition(function(t){var e=this["__fromElements__"],t=T(t,e,[this]);return new L0(e,null,this.parentNode).transition(t).remove(),t}),t=>t.transition(function(t){var e=new L0([],this.__toData__,this.parentNode).append(L).attr("className",ot).attr("markType",A).nodes();return T(t,[this],e)}).remove()).transitions();J.push(...x.flat())}{var M=Z,O=Q,_=tt,S,E;const[Y]=o_("labelTransform",_),{markState:$,labelTransform:P}=M,U=O.select(qE(at)).node(),N=new Map,j=new Map,K=Array.from($.entries()).flatMap(([t,e])=>{var{labels:n=[],key:r}=t;const i=function(t,e,n,r){const[s]=o_("shape",r),l=t["data"],{data:i,defaultLabelShape:c}=e,u=i.map(t=>t.points),{theme:f,coordinate:h}=n;return t=>{const{index:e,points:n}=t,r=l[e];var{formatter:i=t=>""+t,style:a}=t,t=et(t,["formatter","transform","style"]),t=l0(Object.assign(Object.assign({},t),a),t=>BE(t,r,e,l)),{shape:a=c,text:o}=t,t=et(t,["shape","text"]),i="string"==typeof i?Lx(i):i,i=Object.assign(Object.assign({},t),{text:i(o)});return s(Object.assign({type:"label."+a},t))(n,i,h,f,u)}}(t,e,M,_),a=O.select("#"+r).selectAll(qE(ot)).nodes().filter(t=>!t.__removed__);return n.flatMap((e,n)=>{const r=et(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.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=>{N.set(t,i),j.set(t,e)}),t})})}),C=it(U).selectAll(qE(ct)).data(K,t=>t.key).join(t=>t.append(t=>N.get(t)(t)).attr("className",ct),t=>t.each(function(t){$u(this,N.get(t)(t))}),t=>t.remove()).nodes(),X=Oc(C,t=>j.get(t.__data__)),R=M["coordinate"];for([S,E]of X){var{transform:S=[]}=S;RE(S.map(Y))(E,R)}P&&P(C,R)}})}function RE(r){return(t,e)=>{for(const n of r)t=n(t,e);return t}}function BE(t,e,n,r){return"function"==typeof t?t(e,n,r):"string"==typeof t&&void 0!==e[t]?e[t]:t}function IE(o,t,e,n,r){var[,i]=o_("shape",r);const[s]=o_("animation",r);r=e.defaultShape;const{theme:a,coordinate:l}=n;e=`default${Ze(o)}Animation`;const{[e]:c}=i(HE(t,r)).props,{[o]:u={}}=a,f=(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},f);return t.type?(t=s(t)(e,n,{delay:r,duration:i,easing:a},l,u),Array.isArray(t)?t:[t]):null}}function FE(t){return t.finished.then(()=>{t.cancel()}),t}function DE(t={}){var e;return"string"==typeof t?{type:t}:({type:e="classic"}=t,t=et(t,["type"]),Object.assign(Object.assign({},t),{type:e}))}function zE(t){var{interaction:t={}}=t;return Object.entries(nt({event:!0,tooltip:!0,sliderFilter:!0,legendFilter:!0},t)).filter(t=>!!t[1]).map(([t,e])=>Object.assign({type:t},e))}function WE(r,i){return ce(this,void 0,void 0,function*(){var t={library:i},e=r["data"],n=et(r,["data"]);return null==e?r:([,{data:e}]=yield vE(0,{data:e},t),Object.assign({data:e},n))})}function GE(t){t.style("x",t=>t.paddingLeft).style("y",t=>t.paddingTop).style("width",t=>t.innerWidth).style("height",t=>t.innerHeight)}function HE(t,e){t=t.type;return"string"==typeof e?t+"."+e:e}function VE(t,e){const n=t=>void 0!==t.class?""+t.class:"";0===t.nodes().length||(t.selectAll(qE(N)).data(e,t=>t.key).join(t=>t.append("g").attr("className",N).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(qE(at)).node())||t.append("g").attr("className",at).style("zIndex",0)}function qE(...t){return t.map(t=>"."+t).join("")}function YE(t,i){t.node()&&t.style("clipPath",t=>{var e,n,r;return i?({paddingTop:t,paddingLeft:e,innerWidth:n,innerHeight:r}=t,new X.Rect({style:{x:e,y:t,width:n,height:r}})):null})}function $E(t){for(var t=nt({},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=s[t];e.set(l,o),n.set(l,t),r.push(l)}}return t}function UE(t,e={},n,r){const{width:i=640,height:a=480,theme:o}=t,s=(o||Yu('ChartOptions.theme is required, such as `const chart = new Chart({ theme: "classic"})`.'),$E(t)),{canvas:l=(t=i,f=a,h=new S.Renderer,h.registerPlugin(new Ts),new X.Canvas({width:t,height:f,container:document.createElement("div"),renderer:h})),library:c=P6(),emitter:u=new Ps}=e;var f,h;e.canvas=l,e.library=c,e.emitter=u,l.resize(i,a),u.emit(yk.BEFORE_RENDER);const d=it(l.document.documentElement);return l.ready.then(()=>LE(Object.assign(Object.assign({},s),{width:i,height:a}),d,c,e)).then(()=>{u.emit(yk.AFTER_RENDER),null!=n&&n()}).catch(t=>{null!=r&&r(t)}),"string"==typeof(t=l.getConfig().container)?document.getElementById(t):t}function KE(t,e={},n=!1){var r,{canvas:e,emitter:i}=e;e&&(null!=(r=(r=e).getRoot().querySelectorAll("."+H))&&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 XE(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):this.attr(n,t)}}function ZE(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 QE(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 g(r){return t=>{for(const n of r){var e=n["type"];"value"===e?XE(t,n):"array"===e?ZE(t,n):"object"===e?QE(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}):Zu(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 JE(t){return Object.entries(t).map(([t,e])=>({type:"node",name:t,ctor:e}))}function t8(t,e){for(var n=[t];n.length;){var r=n.pop(),r=(e&&e(r),r.children||[]);for(const i of r)n.push(i)}}class e8{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=[],t.parentNode=this,t.index=this.children.length,this.children.push(t),t}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 t8(this,t=>{e===t.attr("key")&&(n=t)}),n}getNodesByType(e){const n=[];return t8(this,t=>{e===t.type&&n.push(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 n8 extends e8{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 r8=class extends n8{constructor(){super({})}},i8=(r8=e([g(a)],r8),class extends n8{constructor(){super({},"interval")}}),a8=(i8=e([g(a)],i8),class extends n8{constructor(){super({},"rect")}}),o8=(a8=e([g(a)],a8),class extends n8{constructor(){super({},"point")}}),s8=(o8=e([g(a)],o8),class extends n8{constructor(){super({},"area")}}),l8=(s8=e([g(a)],s8),class extends n8{constructor(){super({},"line")}}),c8=(l8=e([g(a)],l8),class extends n8{constructor(){super({},"cell")}}),u8=(c8=e([g(a)],c8),class extends n8{constructor(){super({},"vector")}}),f8=(u8=e([g(a)],u8),class extends n8{constructor(){super({},"link")}}),h8=(f8=e([g(a)],f8),class extends n8{constructor(){super({},"polygon")}});h8=e([g(a)],h8);ss=e([g(a)],class extends n8{constructor(){super({},"image")}});let d8=class extends n8{constructor(){super({},"text")}},p8=(d8=e([g(a)],d8),class extends n8{constructor(){super({},"box")}}),g8=(p8=e([g(a)],p8),class extends n8{constructor(){super({},"lineX")}}),y8=(g8=e([g(a)],g8),class extends n8{constructor(){super({},"lineY")}}),m8=(y8=e([g(a)],y8),class extends n8{constructor(){super({},"range")}}),v8=(m8=e([g(a)],m8),class extends n8{constructor(){super({},"rangeX")}}),b8=(v8=e([g(a)],v8),class extends n8{constructor(){super({},"rangeY")}}),x8=(b8=e([g(a)],b8),class extends n8{constructor(){super({},"connector")}}),w8=(x8=e([g(a)],x8),class extends n8{constructor(){super({},"shape")}}),k8=(w8=e([g(a)],w8),class extends n8{constructor(){super({},"sankey")}}),M8=(k8=e([g([...a,{name:"layout",type:"value"}])],k8),class extends n8{constructor(){super({},"treemap")}}),O8=(M8=e([g([...a,{name:"layout",type:"value"}])],M8),class extends n8{constructor(){super({},"boxplot")}}),_8=(O8=e([g(a)],O8),class extends n8{constructor(){super({},"pack")}}),S8=(_8=e([g([...a,{name:"layout",type:"value"}])],_8),class extends n8{constructor(){super({},"forceGraph")}}),E8=(S8=e([g([...a,{name:"layout",type:"value"}])],S8),class extends n8{constructor(){super({},"tree")}}),A8=(E8=e([g([...a,{name:"layout",type:"value"}])],E8),class extends n8{constructor(){super({},"wordCloud")}}),L8=(A8=e([g([...a,{name:"layout",type:"object"}])],A8),class extends n8{constructor(){super({},"gauge")}});L8=e([g(a)],L8);Fo={mark:r8,interval:i8,rect:a8,point:o8,area:s8,line:l8,cell:c8,vector:u8,link:f8,polygon:h8,image:ss,text:d8,box:p8,lineX:g8,lineY:y8,range:m8,rangeX:v8,rangeY:b8,connector:x8,sankey:k8,treemap:M8,boxplot:O8,shape:w8,pack:_8,forceGraph:S8,tree:E8,wordCloud:A8,gauge:L8};class T8 extends e8{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.attr("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.attr("key");if(t)return this.getRoot().getContext().canvas.getRoot().getElementById(t)}show(){var t=this.getGroup();t&&!t.isVisible()&&Vw(t)}hide(){var t=this.getGroup();t&&t.isVisible()&&Hw(t)}}let P8=class extends T8{constructor(t={},e="view"){super(t,e)}},N8=(P8=e([g([{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"},...JE(Fo)])],P8),class extends T8{constructor(){super({},"spaceLayer")}}),j8=(N8=e([g([{type:"value",name:"data"},...JE(Fo)])],N8),class extends T8{constructor(){super({},"spaceFlex")}}),C8=(j8=e([g([{type:"value",name:"data"},...JE(Fo)])],j8),class extends T8{constructor(){super({},"facetRect")}}),R8=(C8=e([g([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...JE(Fo)])],C8),class extends T8{constructor(){super({},"facetCircle")}}),B8=(R8=e([g([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...JE(Fo)])],R8),class extends T8{constructor(){super({},"repeatMatrix")}}),I8=(B8=e([g([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"encode"},{type:"object",name:"legend"},...JE(Fo)])],B8),class extends T8{constructor(){super({},"timingKeyframe")}}),F8=(I8=e([g([...JE(Fo)])],I8),class extends T8{constructor(){super({},"geoView")}}),D8=(F8=e([g([{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"},...JE(Fo)])],F8),class extends T8{constructor(){super({},"geoPath")}});D8=e([g([{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"},...JE(Fo)])],D8);var z8={view:P8,spaceLayer:N8,spaceFlex:j8,facetRect:C8,facetCircle:R8,repeatMatrix:B8,timingKeyframe:I8,geoView:F8,geoPath:D8};for(const q8 of Object.values(z8))g(JE(z8))(q8);const W8=P6();const G8=["container","renderer"];function H8(t){return Object.assign(Object.assign({},t.value),{type:t.type})}function V8(t){var e,t=null!==(t=t).type?t:((e=t.children[t.children.length-1]).attr("width",t.attr("width")),e.attr("height",t.attr("height")),e.attr("paddingLeft",t.attr("paddingLeft")),e.attr("paddingTop",t.attr("paddingTop")),e.attr("paddingBottom",t.attr("paddingBottom")),e.attr("paddingRight",t.attr("paddingRight")),e.attr("insetLeft",t.attr("insetLeft")),e.attr("insetRight",t.attr("insetRight")),e.attr("insetBottom",t.attr("insetBottom")),e.attr("insetTop",t.attr("insetTop")),e.attr("marginLeft",t.attr("marginLeft")),e.attr("marginBottom",t.attr("marginBottom")),e.attr("marginTop",t.attr("marginTop")),e.attr("marginRight",t.attr("marginRight")),e.attr("autoFit",t.attr("autoFit")),e.attr("padding",t.attr("padding")),e.attr("margin",t.attr("margin")),e.attr("inset",t.attr("inset")),e.attr("theme",t.attr("theme")),e),n=[t],r=new Map;for(r.set(t,H8(t));n.length;){const t=n.pop();var i=r.get(t);for(const s of t.children){var a=H8(s),{children:o=[]}=i;o.push(a),n.push(s),r.set(s,a),i.children=o}}return r.get(t)}yo=[{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"},...JE(Fo),...Object.entries(z8).map(([t,e])=>({type:"container",name:t,ctor:e}))];m.Chart=class extends P8{constructor(t){var t=t||{},{container:e,canvas:n,key:r="G2_CHART_KEY"}=t;super(et(t,["container","canvas","key"]),"view"),this.onResize=an(()=>{this.forceFit()},300),this.attr("key",r),this._container=void 0===(t=e)?document.createElement("div"):"string"==typeof t?document.getElementById(t):t,this._emitter=new Ps,this._context={library:W8,emitter:this._emitter,canvas:n},this.bindAutoFit()}render(){var t,e,n,r,i,a,o;return this._context.canvas||({width:i=640,height:o=480,renderer:t,plugins:e,autoFit:n}=this.options(),{width:n,height:r}=sf(this._container,n,i,o),this.width(n),this.height(r),this._context.canvas=([n,r,i,a=new S.Renderer,o=[]]=[this._container,i,o,t,e],o.push(new Ts),o.forEach(t=>a.registerPlugin(t)),new X.Canvas({container:n,width:r,height:i,renderer:a}))),new Promise((t,e)=>{try{UE(this.options(),this._context,()=>t(this),e)}catch(t){e(t)}})}options(t){var r;return 0===arguments.length?this._options||V8(this):(this._options=nt(this._options||V8(this),(t=t,r=G8,Ve(t,function(t,e,n){return r.includes(n)||(t[n]=e),t},{}))),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(yk.BEFORE_CLEAR),this._options={},KE(0,this._context,!1),this.emit(yk.AFTER_CLEAR)}destroy(){var t,e;this.options();this.emit(yk.BEFORE_DESTROY),this.unbindAutoFit(),this._options={},KE(0,this._context,!0),t=this._container,(e=t.parentNode)&&e.removeChild(t),this.emit(yk.AFTER_DESTROY)}forceFit(){var{width:t,height:e,autoFit:n}=this.options(),{width:n,height:t}=sf(this._container,n,t,e);t&&n&&this.changeSize(n,t)}changeSize(t,e){var{width:n,height:r}=this.options();if(n===t&&r===e)return Promise.resolve(this);this.emit(yk.BEFORE_CHANGE_SIZE),this.width(t),this.height(e);n=this.render();return n.then(()=>{this.emit(yk.AFTER_CHANGE_SIZE)}),n}bindAutoFit(){var t=this.options()["autoFit"];t&&window.addEventListener("resize",this.onResize)}unbindAutoFit(){var t=this.options()["autoFit"];t&&window.removeEventListener("resize",this.onResize)}},m.Chart=e([g(yo)],m.Chart),m.AREA_CLASS_NAME=ut,m.COMPONENT_CLASS_NAME=lt,m.ChartEvent=yk,m.CompositionNode=T8,m.ELEMENT_CLASS_NAME=ot,m.LABEL_CLASS_NAME=ct,m.LABEL_LAYER_CLASS_NAME=at,m.MAIN_LAYER_CLASS_NAME=N,m.MarkNode=n8,m.PLOT_CLASS_NAME=st,m.VIEW_CLASS_NAME=H,m.createLibrary=P6,m.register=function(t,e){Object.assign(W8,{[t]:e})},m.render=UE,m.renderToMountedElement=function(t,e={},n){var r,{width:i=640,height:a=480}=t,t=$E(t);const{library:o=P6(),group:s=new X.Group,emitter:l=new Ps}=e;if(null!=s&&s.parentElement)return r=it(s),e.group=s,e.library=o,(e.emitter=l).emit(yk.BEFORE_RENDER),LE(Object.assign(Object.assign({},t),{width:i,height:a}),r,o,e).then(()=>{l.emit(yk.AFTER_RENDER),null!=n&&n()}),s;throw new Error("renderToMountedElement can't render chart to unmounted group.")},Object.defineProperty(m,"__esModule",{value:!0})});
10
+ `,g.style.x=t,g.style.y=e,g.style.width=n-t,g.style.height=r-e},A=t=>{var e=t["target"],[t,n]=Yw(a,t);e===g?p=[t,n]:(((t,e)=>{if(g&&g.remove(),y&&y.remove(),h=[t,e],c)return k();M()})(t,n),m=!0)},L=t=>{var e,n,r,t=Yw(a,t);h&&(p?(n=(t,e,n,r,i)=>t+e<r?r-e:i<t+n?i-n:t,r=(e=t)[0]-p[0],e=e[1]-p[1],r=n(r,h[0],d[0],v,x),n=n(e,h[1],d[1],b,w),e=[h[0]+r,h[1]+n],r=[d[0]+r,d[1]+n],_(e,r)):_(h,t))},T=t=>{var e,n,r,i;p?(p=null,{x:e,y:r,width:n,height:i}=g.style,h=[e,r],d=[e+n,r+i]):(d=Yw(a,t),[e,n,r,i]=_(h,d),m=!1,o(e,n,r,i))},P=t=>{t=t.target;g&&t!==g&&O()},N=t=>{t=t.target;t!==g||m?n5(a,"crosshair"):n5(a,"move")},j=()=>{n5(a,"default")};return a.addEventListener("dragstart",A),a.addEventListener("drag",L),a.addEventListener("dragend",T),a.addEventListener("click",P),a.addEventListener("pointermove",N),a.addEventListener("pointerleave",j),{mask:g,remove(){g&&O()},destroy(){g&&O(),a.removeEventListener("dragstart",A),a.removeEventListener("drag",L),a.removeEventListener("dragend",T),a.removeEventListener("click",P),a.removeEventListener("pointermove",N),a.removeEventListener("pointerleave",j)}}}function W5(e,t,n){return t.filter(t=>{return t!==e&&({interaction:t={}}=t.options,Object.values(t).find(t=>t.brushKey===n))})}function G5(t,e){var{elements:n,siblings:r=t=>[],datum:i,brushRegion:a,extent:o,reverse:s,series:l=!1,key:d=t=>t,bboxOf:c=t=>{var{x:t,y:e,width:n,height:r}=t.style;return{x:t,y:e,width:n,height:r}},state:u={}}=e,e=et(e,["elements","siblings","datum","brushRegion","extent","reverse","series","key","bboxOf","state"]);const p=n(t),g=r(t),y=g.flatMap(n);r=Qw(p,i),n=rt(e,"mask");const{setState:m,removeState:f}=Xw(u,r),h=new Map,{width:v,height:b,x=0,y:w=0}=c(t);i=o||[0,0,v,b];return z5(t,Object.assign(Object.assign({},n),{extent:i,brushRegion:a,reverse:s,brushended:l?()=>{for(const t of p)f(t,"inactive");for(const e of h.values())e.remove();h.clear()}:()=>{for(const t of[...p,...y])f(t,"active","inactive")},brushed:l?(t,e,n,r)=>{var i;for(const o of p){var a=h.get(o)||(a=o,i=void 0,(i=a.cloneNode()).__data__=a.__data__,a.parentNode.appendChild(i),h.set(a,i),i);a.style.clipPath=new X.Rect({style:{x:t+x,y:e+w,width:n-t,height:r-e}}),m(o,"inactive"),m(a,"active")}}:(t,e,n,r)=>{var i;for(const u of g)null!=(i=u.brush)&&i.remove();var a=new Set;for(const f of p){var{min:o,max:s}=f.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])?m(f,"inactive"):(m(f,"active"),a.add(d(f)))}for(const h of y)a.has(d(h))?m(h,"active"):m(h,"inactive")}}))}function H5(t){var{facet:h,brushKey:d}=t,p=et(t,["facet","brushKey"]);return(t,e)=>{var n,r,i,a,{container:o,view:s,options:l}=t,o=Vw(o),c={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",reverse:!1},u=["active",["inactive",{opacity:.5}]];if(h)return n=(a=o.getBounds()).min[0],r=a.min[1],i=a.max[0],a=a.max[1],G5(o.parentNode.parentNode,Object.assign(Object.assign({elements:()=>Gw(t,e),datum:Kw(Hw(t,e).map(t=>t.view)),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:[n,r,i,a],state:Zw(Hw(t,e).map(t=>t.options),u)},c),p));const f=G5(o,Object.assign(Object.assign({elements:Ww,key:t=>t.__data__.key,siblings:()=>{return W5(t,e,d).map(t=>Vw(t.container))},datum:Kw([s,...W5(t,e,d).map(t=>t.view)]),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:void 0,state:Zw([l,...W5(t,e,d).map(t=>t.options)],u)},c),p));return o.brush=f,()=>f.destroy()}}function V5(t,e,n,r,i){var[,i,,a]=i;return[t,i,n,a]}function q5(t){return H5(Object.assign(Object.assign({},t),{brushRegion:V5}))}function Y5(t,e,n,r,i){var[i,,a]=i;return[i,e,a,r]}function $5(t){return H5(Object.assign(Object.assign({},t),{brushRegion:Y5}))}const U5="axis",K5="axis-hot-area";function X5(t){return t.getElementsByClassName(U5)}function Z5(t){return t.getElementsByClassName("axis-line")[0]}function Q5(t){return t.getElementsByClassName("axis-main-group")[0].getLocalBounds()}function J5(t,e){var{cross:n,offsetX:i}=e,e=et(e,["cross","offsetX","offsetY"]),r=Q5(t),[t]=Z5(t).getLocalBounds().min;const[a,o]=r.min,[s,l]=r.max;r=2*(s-a);return{brushRegion:Y5,hotZone:new X.Rect({className:K5,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 tk(t,e){var{offsetY:i,cross:n=!1}=e,e=et(e,["offsetY","offsetX","cross"]),r=Q5(t),[,t]=Z5(t).getLocalBounds().min;const[a,o]=r.min,[s,l]=r.max;r=l-o;return{brushRegion:V5,hotZone:new X.Rect({className:K5,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 ek(t,e){var{axes:n,elements:r,points:i,horizontal:a,datum:o,offsetY:s,offsetX:l,reverse:c=!1,state:u={}}=e,e=et(e,["axes","elements","points","horizontal","datum","offsetY","offsetX","reverse","state"]);const f=r(t);r=n(t);const h=Xw(u,Qw(f,o))["setState"],d=new Map;var p=rt(e,"mask");const g=()=>{for(const t of f)(t=>Array.from(d.values()).every(([n,r,i,a])=>t.some(([t,e])=>n<=t&&t<=i&&r<=e&&e<=a)))(i(t))?h(t,"active"):h(t,"inactive")};var y=r.some(a)&&r.some(t=>!a(t));for(const m of r){const{hotZone:v,brushRegion:b,extent:x}=(a(m)?tk:J5)(m,{offsetY:s,offsetX:l,cross:y,zIndex:999,fill:"transparent"});m.parentNode.appendChild(v),z5(v,Object.assign(Object.assign({},p),{reverse:c,brushRegion:b,brushended(){d.delete(m),g()},brushed(t,e,n,r){d.set(m,x(t,e,n,r)),g()}}))}}function nk(a){return t=>{var{container:t,view:e,options:n}=t,{x:r,y:i}=Vw(t).getBBox();return ek(t,Object.assign({elements:Ww,axes:X5,offsetY:i,offsetX:r,points:t=>t.__data__.points,horizontal:t=>{var{startPos:[t,e],endPos:[n,r]}=t.attributes;return t!==n&&e===r},datum:Kw(e),state:Zw(n,["active",["inactive",{opacity:.5}]])},a))}}function rk(t,e){var{filter:i,reset:n,brushRegion:r,extent:a,reverse:o}=e,e=rt(et(e,["filter","reset","brushRegion","extent","reverse","series"]),"mask"),{width:s,height:l}=t.getBBox(),a=a||[0,0,s,l];const c=function(e=300){let n=null;return t=>{t=t.timeStamp;return null!==n&&t-n<e?(n=t,!0):(n=t,!1)}}(),u=z5(t,Object.assign(Object.assign({},e),{extent:a,brushRegion:r,reverse:o,brushcreated:function(t,e,n,r){i(t,e,n,r),u.remove()}}));function f(t){c(t)&&n()}return t.addEventListener("click",f),()=>{u.destroy(),t.removeEventListener("click",f)}}function ik(t){var{hideX:y=!0,hideY:m=!0}=t,i=et(t,["hideX","hideY"]);return(t,e)=>{const{container:n,view:r,options:f,update:h}=t;t=Vw(n);let d=!1,p=!1,g=r;return rk(t,Object.assign(Object.assign({brushRegion:(t,e,n,r)=>[t,e,n,r],filter:(s,l,c,u)=>ce(this,void 0,void 0,function*(){if(!p){p=!0;const{scale:e,coordinate:r}=g,{x:i,y:a}=e;var t=(t,e)=>{var[t,n]=r.invert(t);return[aw(i,t,e),aw(a,n,e)]};const n=t([s,l],!0),o=t([c,u],!1);t=f["marks"],t=t.map(t=>nt({axis:Object.assign(Object.assign({},y&&{x:{transform:[{type:"hide"}]}}),m&&{y:{transform:[{type:"hide"}]}})},t,{scale:{x:{domain:ow(i,[n[0],o[0]])},y:{domain:ow(a,[n[1],o[1]])}}})),t=Object.assign(Object.assign({},f),{marks:t,clip:!0}),t=yield h(t);g=t.view,p=!1,d=!0}}),reset:()=>{!p&&d&&(d=!1,g=r,h(f))},extent:void 0},{maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",unhighlightedOpacity:.5,reverse:!1}),i))}}function ak(t){return ik(Object.assign(Object.assign({hideX:!0},t),{brushRegion:V5}))}function ok(t){return ik(Object.assign(Object.assign({hideY:!0},t),{brushRegion:Y5}))}const sk="slider";function lk({wait:p=50,leading:g=!0,trailing:y=!1}){return t=>{const{container:e,view:n,options:s,update:l}=t;t=e.getElementsByClassName(sk);if(!t.length)return()=>{};let c=!1;const u=n["scale"];var{x:r,y:i}=u;const a=new Map,f={x:r.getOptions().domain,y:i.getOptions().domain};for(const h of t){const d=h.attributes["orientation"];var o=dn(o=>ce(this,void 0,void 0,function*(){var t,e,n,r,i,a=o.detail["value"];c||(c=!0,i="vertical"===d?"y":"x",a=function(t,e){var[t,n]=t;return ow(e,[aw(e,t,!0),aw(e,n,!1)])}(a,u[i]),f[i]=a,t="vertical"===d?"x":"y",e=f[t],n=s,r={[i]:{domain:a},[t]:{domain:e}},i=(i=n["marks"]).map(t=>nt({axis:{x:{transform:[{type:"hide"}]},y:{transform:[{type:"hide"}]}}},t,{scale:r,slider:Object.assign(Object.assign({},t.slider.x&&{x:{preserve:!0}}),t.slider.y&&{y:{preserve:!0}}),animate:!1})),a=Object.assign(Object.assign({},n),{marks:i,clip:!0,animate:!1}),yield l(a),c=!1)}),p,{leading:g,trailing:y});h.addEventListener("valuechange",o),a.set(h,o)}return()=>{for(var[t,e]of a)t.removeEventListener("valuechange",e)}}}const ck={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 uk(t){return"text"===t.nodeName&&!!t.isOverflowing()}function fk(t){var{offsetX:h=8,offsetY:d=8}=t,r=et(t,["offsetX","offsetY"]);return t=>{const s=t["container"],[l,c]=s.getBounds().min,u=rt(r,"tip"),f=new Set,e=t=>{var e,n,r,i,a,o=t["target"];uk(o)?({offsetX:e,offsetY:n}=t,e=e+h-l,n=n+d-c,o.tip?(o.tip.style.x=e,o.tip.style.y=n):(i=o.style["text"],a=new X.HTML({className:"poptip",style:{innerHTML:(r="div",i=i,a=Object.assign(Object.assign({},ck),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,f.add(a))):t.stopPropagation()},n=t=>{var e=t["target"];uk(e)?e.tip&&(e.tip.remove(),e.tip=null,f.delete(e.tip)):t.stopPropagation()};return s.addEventListener("pointerover",e),s.addEventListener("pointerout",n),()=>{s.removeEventListener("pointerover",e),s.removeEventListener("pointerout",n),f.forEach(t=>t.remove())}}}const hk=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 dk(t,e,n){var{data:r={}}=t;r.data=function(t,e){const{markKey:n,index:r,seriesIndex:i}=t=t.__data__,a=(t=e.markState,Array.from(t.keys()).find(t=>t.key===n));if(a)return i?i.map(t=>a.data[t]):a.data[r]}(e,n),t.data=r}function pk(i,a,o,s=t=>!0){return t=>{var e,n,r;s(t)&&(e=t["target"],{className:n,markType:r}=e,"element"===n?(dk(t,e,a),o.emit("element:"+i,t),o.emit(r+":"+i,t)):o.emit(n+":click"))}}function gk(){return(t,e,n)=>{const{container:r,view:i}=t,a=pk(hk.CLICK,i,n,t=>1===t.detail),o=pk(hk.DBLCLICK,i,n,t=>2===t.detail),s=pk(hk.POINTER_TAP,i,n),l=pk(hk.POINTER_DOWN,i,n),c=pk(hk.POINTER_UP,i,n),u=pk(hk.POINTER_OVER,i,n),f=pk(hk.POINTER_OUT,i,n),h=pk(hk.POINTER_MOVE,i,n),d=pk(hk.POINTER_ENTER,i,n),p=pk(hk.POINTER_LEAVE,i,n),g=pk(hk.POINTER_UPOUTSIDE,i,n),y=pk(hk.DRAG_START,i,n),m=pk(hk.DRAG,i,n),v=pk(hk.DRAG_END,i,n),b=pk(hk.DRAG_ENTER,i,n),x=pk(hk.DRAG_LEAVE,i,n),w=pk(hk.DRAG_OVER,i,n),k=pk(hk.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",f),r.addEventListener("pointermove",h),r.addEventListener("pointerenter",d),r.addEventListener("pointerleave",p),r.addEventListener("pointerupoutside",g),r.addEventListener("dragstart",y),r.addEventListener("drag",m),r.addEventListener("dragend",v),r.addEventListener("dragenter",b),r.addEventListener("dragleave",x),r.addEventListener("dragover",w),r.addEventListener("drop",k),()=>{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",f),r.removeEventListener("pointermove",h),r.removeEventListener("pointerenter",d),r.removeEventListener("pointerleave",p),r.removeEventListener("pointerupoutside",g),r.removeEventListener("dragstart",y),r.removeEventListener("drag",m),r.removeEventListener("dragend",v),r.removeEventListener("dragenter",b),r.removeEventListener("dragleave",x),r.removeEventListener("dragover",w),r.removeEventListener("drop",k)}}}function yk(n){return(t,...e)=>nt({},n(t,...e),t)}function mk(n){return(t,...e)=>nt({},t,n(t,...e))}function vk(t,e){var n;return t?Array.isArray(t)?t:({value:n=e}=t,t=et(t,["value"]),Object.assign(Object.assign({},t),{value:n})):e}const bk=()=>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=et(t,["data","x","y","width","height"]);return Object.assign(Object.assign({},t),{data:vk(e,u),x:null!=n?n:o,y:null!=r?r:s,width:null!=i?i:l,height:null!=a?a:c})})},xk=(bk.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),f=e[s]-i*(n.length-1);var h=r.map(t=>f*(t/u)),d=[];let p=e[o]||0;for(let t=0;t<h.length;t+=1){var g=n[t],y=g["data"],g=et(g,["data"]),y=vk(y,a);d.push(Object.assign({[o]:p,[s]:h[t],[c]:e[c]||0,[l]:e[l],data:y},g)),p+=h[t]+i}return d}),wk=(xk.props={},()=>t=>{var e=t["children"],t=et(t,["children"]);if(!Array.isArray(e))return[];const{data:s,scale:l={},axis:c={},legend:u={},encode:f={},transform:h=[]}=t,n=et(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=et(t,["data","scale","axis","legend","encode","transform"]);return Object.assign({data:vk(e,s),scale:nt({},l,n),encode:nt({},f,a),transform:[...h,...o],axis:!(!r||!c)&&nt({},c,r),legend:!(!i||!u)&&nt({},u,i)},t)});return[Object.assign(Object.assign({},n),{marks:t,type:"standardView"})]}),kk=(wk.props={},()=>t=>{var{width:e,height:n,paddingLeft:r,paddingRight:i,paddingTop:a,paddingBottom:o,padding:s,inset:l,insetLeft:c,insetTop:u,insetRight:f,insetBottom:h,margin:d,marginLeft:p,marginBottom:g,marginTop:y,marginRight:m,data:v,coordinate:b,theme:x,component:w,interaction:k,x:M,y:O,key:_,frame:S,title:E,labelTransform:A,parentKey:L,clip:T}=t,t=et(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"]);return[{type:"standardView",x:M,y:O,key:_,width:e,height:n,padding:s,paddingLeft:r,paddingRight:i,paddingTop:a,inset:l,insetLeft:c,insetTop:u,insetRight:f,insetBottom:h,paddingBottom:o,theme:x,coordinate:b,component:w,interaction:k,frame:S,title:E,labelTransform:A,margin:d,marginLeft:p,marginBottom:g,marginTop:y,marginRight:m,parentKey:L,clip:T,marks:[Object.assign(Object.assign({},t),{key:_+"-0",data:v})]}]}),Mk=(kk.props={},yk(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=kc(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"))}}})),Ok=yk(t=>{const{data:e,scale:n}=t;var r=[t];let i,a,o;for(;r.length;){const{children:u,encode:f={},scale:n={},legend:h={}}=r.shift();var s=f["color"],l=n["color"],c=h["color"];void 0!==s&&(i=s),void 0!==l&&(a=l),void 0!==c&&(o=c),Array.isArray(u)&&r.push(...u)}return{encode:{color:i},scale:{color:nt({},a,{domain:void 0!==(t=null==(t=null===n||void 0===n?void 0:n.color)?void 0:t.domain)?t:void 0!==i?Array.from(new Set(e.map(t=>t[i]))):void 0,type:"ordinal"})},legend:{color:nt({title:i},o)}}}),_k=yk(()=>({animate:{enterType:"fadeIn"}})),Sk=mk(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),Ek=mk(()=>({type:"cell"})),Ak=mk(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}}]}}}),Lk=mk((t,c=function(t){t=t.points;return y0(t)},w=function(a){return(t,e)=>{var{rowIndex:t,rowValuesLength:n,columnIndex:r,columnValuesLength:i}=t;return t!==n-1?Tk(a,e):(t=e.length?void 0:null,nt({title:r===i-1&&void 0,grid:t},a))}},k=function(r){return(t,e)=>{var{rowIndex:t,columnIndex:n}=t;return 0!==n?Tk(r,e):(n=e.length?void 0:null,nt({title:0===t&&void 0,grid:n},r))}},M={})=>{const{data:e,encode:n,children:u,scale:r,x:O=0,y:_=0,shareData:f=!1,key:S}=t,E=e["value"],{x:A,y:L}=n;t=r.color;const T=t["domain"];return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:y,paddingTop:m}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=s0(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,[L]:e}=t,t=void 0===A||t===n,e=void 0===L||e===r;return t&&e}).map(t=>E.filter(t)),v=f?Fc(l,t=>t.length):void 0,b=n.map(([t,e])=>({columnField:A,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:L,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,f,h,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=et(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:L?5:void 0}},r=r?g:0===g.length?[]:E,l={color:{domain:T}},o={x:Pk(o,w)(p,r),y:Pk(a,k)(p,r)};return Object.assign(Object.assign({key:n+"-"+c,data:r,x:u+y+O,y:f+m+_,parentKey:S,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!r.length,dataDomain:v,scale:nt(s,e,l),axis:nt({},i,o),legend:!1},t),M)})})}}});function Tk(t,e){return e.length?nt({title:!1,tick:null,label:null},t):nt({title:!1,tick:null,label:null,grid:null},t)}function Pk(t,e){return"function"==typeof t?t:null===t?()=>null:e(t)}const Nk=()=>t=>{return[dw.of(t).call(Ek).call(Ok).call(_k).call(Mk).call(Sk).call(Ak).call(Lk).value()]},jk=(Nk.props={},yk(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),Ck=mk(t=>{const{data:w,children:c,x:k=0,y:M=0,key:O}=t;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=s0(t);const s=t.map(({points:t})=>y0(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,f,h,d]=s[c],[p,g]=l[c],y=b[c];return x[c].map(t=>{var n,r,{scale:e,key:i,encode:a,axis:o}=t,t=et(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 Tk(r,e)})(y,w),y:("function"==typeof(n=s)?n:null===n?()=>null:(t,e)=>{t=t.columnIndex;if(0!==t)return Tk(n,e)})(y,w)};return Object.assign({data:w,parentKey:O,key:i+"-"+c,x:u+m+k,y:f+v+M,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:nt({x:{facet:!1},y:{facet:!1}},e),axis:nt({x:{tickCount:5},y:{tickCount:5}},o,l),legend:!1,encode:nt({},a,{x:p,y:g})},t)})})}}}),Rk=mk(t=>{var e=t["encode"],t=et(t,["encode"]),{position:n=[],x:r=n,y:i=[...n].reverse()}=e,n=et(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 Bk=()=>t=>{return[dw.of(t).call(Ek).call(Ok).call(Ck).call(Rk).call(_k).call(Sk).call(jk).value()]},Ik=yk(t=>({scale:{x:{guide:{type:"axisArc"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),Fk=yk(t=>({coordinate:{type:"polar"}})),Dk=t=>{var e=t["encode"],t=et(t,["encode"]),e=e["position"];return Object.assign(Object.assign({},t),{encode:{x:e}})};function zk(t){return t=>null}function Wk(t){var t=t["points"],[t,e,n,r]=t,i=h0(t,r),t=f0(t,r),r=g0(t,f0(e,n)),e=1/Math.sin(r/2),i=i/(1+e),a=i*Math.sqrt(2),[n,o]=n,t=p0(t)+r/2,r=i*e;return[n+r*Math.sin(t)-a/2,o+r*Math.cos(t)-a/2,a,a]}const Gk=()=>t=>{return[dw.of(t).call(Ek).call(Dk).call(Ok).call(Fk).call(Ak).call(Lk,Wk,zk,zk,{frame:!1}).call(_k).call(Sk).call(Ik).value()]};const Hk=()=>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"],f=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=nt({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 f[i]),e=i}t++}var a,o,s}};function Vk(t,e){if(null!==t)return{type:"column",value:t,field:e}}function qk(t,e){t=Vk(t,e);return Object.assign(Object.assign({},t),{inferred:!0})}function Yk(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function $k(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 Uk(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 Kk(t){return!(t instanceof Date)&&"object"==typeof t}Hk.props={};const Xk=()=>(t,e)=>{var n=e["encode"],n=n["y1"];return void 0!==n?[t,e]:[t,nt({},e,{encode:{y1:qk($k(t,0))}})]};function Zk(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])=>Yu(t));return Array.from(kc(e,e=>i.map(([,t])=>t[e]).join("-")).values())}function Qk(t){var a,r;return Array.isArray(t)?(a=t,(i,t,e)=>(n,r)=>a.reduce((t,e)=>0!==t?t:lc(i[n][e],i[r][e]),0)):"function"==typeof t?(r=t,(e,t,n)=>aM(t=>r(e[t]))):"series"===t?eM:"value"===t?nM:"sum"===t?rM:"maxIndex"===t?iM:()=>null}function Jk(t,e){for(const n of t)n.sort(e)}function tM(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function eM(t,e,n){return aM(t=>n[t])}function nM(t,e,n){return aM(t=>e[t])}function rM(t,n,e){t=s0(t),t=Array.from(kc(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,e.reduce((t,e)=>t+ +n[e])]));return aM(t=>r.get(e[t]))}function iM(t,n,e){t=s0(t),t=Array.from(kc(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,Dc(e,t=>n[t])]));return aM(t=>r.get(e[t]))}function aM(n){return(t,e)=>lc(n(t),n(e))}Xk.props={};const oM=(t={})=>{const{groupBy:L="x",orderBy:T=null,reverse:P=!1,y:N="y",y1:j="y1",series:C=!0}=t;return(t,e)=>{var{data:n,encode:r,style:i={}}=e,[a,o]=R(r,"y"),[s,l]=R(r,"y1"),[r]=C?Uk(r,"series","color"):R(r,"color"),c=Zk(L,t,e),n=Qk(T)(n,a,r),u=(n&&Jk(c,n),new Array(t.length)),f=new Array(t.length),h=new Array(t.length),d=[],p=[];for(const _ of c){P&&_.reverse();var g=s?+s[_[0]]:0,y=[],m=[];for(const S of _){var v=h[S]=+a[S]-g;v<0?m.push(S):0<=v&&y.push(S)}var b=0<y.length?y:m,x=0<m.length?m:y;let t=y.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 E of m.reverse()){var w=h[E];n=u[E]=(f[E]=n)+w}let r=g;for(const A of y){var k=h[A];0<k?r=u[A]=(f[A]=r)+k:u[A]=f[A]=r}}const M=new Set(d),O=new Set(p);r="y"===N?u:f,n="y"===j?u:f;return[t,nt({},e,{encode:{y0:qk(a,o),y:Vk(r,o),y1:Vk(n,l)},style:Object.assign({first:(t,e)=>M.has(e),last:(t,e)=>O.has(e)},i)})]}};function sM(t){t=t.type;return"string"==typeof t&&["stackY","dodgeX","groupX"].includes(t)}oM.props={};const lM=a=>(t,e,n)=>{var{encode:r,transform:i=[]}=e;return i.some(sM)||({x:i,y:r}=r,void 0===i)||void 0===r?[t,e]:(i=a["series"],r=i?["x","series"]:"x",oM({groupBy:r})(t,e,n))},cM=(lM.props={},(t={})=>{const{channel:s="x"}=t;return(t,e)=>{const n=e["encode"];var r=e["tooltip"];if(Xu(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,nt({},e,{tooltip:{title:a}})]}}),uM=(cM.props={},()=>(t,e)=>{var n=e["encode"],n=n["x"];return void 0!==n?[t,e]:[t,nt({},e,{encode:{x:qk($k(t,0))},scale:{x:{guide:null}}})]}),fM=(uM.props={},()=>(t,e)=>{var n=e["encode"],n=n["y"];return void 0!==n?[t,e]:[t,nt({},e,{encode:{y:qk($k(t,0))},scale:{y:{guide:null}}})]}),hM=(fM.props={},()=>(t,e)=>{var n=e["encode"],n=n["size"];return void 0!==n?[t,e]:[t,nt({},e,{encode:{size:Yk($k(t,3))}})]}),dM=(hM.props={},()=>(t,e)=>{var n=e["encode"],r=n["key"],n=et(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,nt({},e,{encode:{key:Vk(r)}})]}),pM=(dM.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,nt({},e,{encode:{series:Vk(r,i)}})])}),gM=(pM.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(Kk)?[t,e]:[t,nt({},e,{encode:{y:Vk(n)}})]}),yM=(gM.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(Kk)?[t,e]:[t,nt({},e,{encode:{x:Vk(n)}})]}),mM=(yM.props={},()=>(t,e)=>{var n=e["encode"],r=n["y1"];return r?[t,e]:([r]=R(n,"y"),[t,nt({},e,{encode:{y1:Vk([...r])}})])}),vM=(mM.props={},()=>(t,e)=>{var n=e["encode"],r=n["x1"];return r?[t,e]:([r]=R(n,"x"),[t,nt({},e,{encode:{x1:Vk([...r])}})])}),bM=(vM.props={},t=>{const i=t["channel"];return(t,e)=>{const{encode:a,tooltip:n}=e;var r;return Xu(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,nt({},e,{tooltip:{items:r}})])}}),xM=(bM.props={},()=>(t,e)=>[t,nt({scale:{x:{padding:0},y:{padding:0}}},e)]),wM=(xM.props={},()=>(t,e)=>{var{style:n={}}=e,r=et(e,["data","style"]),{x:i,y:a}=n,n=et(n,["x","y"]);return null==i||null==a?[t,e]:[[0],nt({},r,{data:[0],cartesian:!0,encode:{x:Vk([i||0]),y:Vk([a||0])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:n})]}),kM=(wM.props={},()=>(t,e)=>{var{style:n={}}=e;return[t,nt({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]}),MM=(kM.props={},()=>(t,e)=>{var n,r=e["data"];return!Array.isArray(r)||r.some(Kk)?[t,e]:(n=(r=Array.isArray(r[0])?r:[r]).map(t=>t[0]),r=r.map(t=>t[1]),[t,nt({},e,{encode:{x:Vk(n),y:Vk(r)}})])}),OM=(MM.props={},()=>(t,e)=>{var{style:n={}}=e,n=n["gradient"];return n?[t,nt({},e,{encode:{series:Yk($k(t,void 0))}})]:[t,e]}),_M=(OM.props={},(t={})=>{const{groupBy:c="x",reverse:u=!1,orderBy:f,padding:h}=t;return et(t,["groupBy","reverse","orderBy","padding"]),(t,e)=>{var{data:n,encode:r,scale:i}=e,i=i["series"],[a]=R(r,"y"),[r]=Uk(r,"series","color"),o=tM(r,i),i=Zk(c,t,e),n=Qk(f)(n,a,r),s=(n&&Jk(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,nt({},e,{scale:{series:{domain:o,paddingInner:h}},encode:{series:Vk(s)}})]}}),SM=(_M.props={},t=>{const{groupBy:p=["x"],reducer:g=(t,e)=>e[t[0]],orderBy:y=null,reverse:m=!1,duration:v}=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[,f]of r){var a=[];for(const n of i){var o=Array.from(kc(n,t=>f[t]).values());a.push(...o)}i=a}if(y){const[h]=R(e,y);h&&i.sort((t,e)=>g(t,h)-g(e,h)),m&&i.reverse()}r=(v||3e3)/i.length;const[s]=v?[$k(n,r)]:Uk(e,"enterDuration",$k(n,r));var[l]=Uk(e,"enterDelay",$k(n,0)),c=new Array(n.length);for(let t=0,e=0;t<i.length;t++){const n=i[t];var u=Fc(n,t=>+s[t]);for(const d of n)c[d]=+l[d]+e;e+=u}return[n,nt({},t,{encode:{enterDuration:Yk(s),enterDelay:Yk(c)}})]}});SM.props={};const EM=(t={})=>{const{groupBy:p="x",basis:g="max"}=t;return(e,t)=>{const{encode:n,tooltip:r}=t;var i=et(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=Zk(p,e,t),l="function"==typeof(h=g)?h:{min:(t,e)=>zc(t,t=>e[+t]),max:(t,e)=>Fc(t,t=>e[+t]),first:(t,e)=>e[t[0]],last:(t,e)=>e[t[t.length-1]],mean:(t,e)=>Yc(t,t=>e[+t]),median:(t,e)=>$c(t,t=>e[+t]),sum:(t,e)=>Xc(t,t=>e[+t]),deviation:(t,e)=>yc(t,t=>e[+t])}[h]||Fc;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],[,f]=s[t];f[d]=+u[d]/c}}var h=Xu(r)||(null==r?void 0:r.items)&&0!==(null==r?void 0:r.items.length);return[e,nt({},t,Object.assign({encode:Object.fromEntries(s.map(([t,e])=>[t,Vk(e,R(n,t)[1])]))},!h&&n.y0&&{tooltip:{items:[{channel:"y0"}]}}))]}};function AM(t,e,n){return null===t?[-.5,.5]:(t=tM(t,e),[-(e=new kp({domain:t,range:[0,1],padding:n}).getBandWidth())/2,e/2])}function LM(t,e,n){return e*(1-t)+n*t}EM.props={};const TM=(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=AM(a,r,l),s=AM(n,i,c);a=t.map(()=>LM(u(),...s)),r=t.map(()=>LM(u(),...o));return[t,nt({scale:{x:{padding:.5},y:{padding:.5}}},e,{encode:{dy:Vk(a),dx:Vk(r)}})]}},PM=(TM.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=AM(n,r,a);n=t.map(()=>LM(o(),...i));return[t,nt({scale:{x:{padding:.5}}},e,{encode:{dx:Vk(n)}})]}}),NM=(PM.props={},(t={})=>{const{groupBy:g="x"}=t;return(e,t)=>{const n=t["encode"];var r=et(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=Zk(g,e,t),s=new Array(o.length);for(let t=0;t<o.length;t++){const e=o[t];var[l,c]=mc(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 f=u-s[t];const e=o[t];for(const p of e)for(let t=0;t<i.length;t++){var[,h]=i[t],[,d]=a[t];d[p]=+h[p]+f}}return[e,nt({},t,{encode:Object.fromEntries(a.map(([t,e])=>[t,Vk(e,R(n,t)[1])]))})]}}),jM=(NM.props={},(t={})=>{const{groupBy:u="x",series:f=!0}=t;return(t,e)=>{var n=e["encode"];const[r]=R(n,"y");var[,i]=R(n,"y1"),n=(f?Uk(n,"series","color"):R(n,"color"),Zk(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,nt({},e,{encode:{y1:Vk(a,i)}})]}});function CM(t,e){return[t[0]]}function RM(t,e){return[t[t.length-1]]}function BM(t,e){return[t[Dc(t,t=>e[t])]]}function IM(t,e){return[t[Wc(t,t=>e[t])]]}jM.props={};const FM=(t={})=>{const{groupBy:a="series",channel:o,selector:s}=t;return(t,e)=>{var n=e["encode"],t=Zk(a,t,e);const[r]=R(n,o),i="function"==typeof(n=s)?n:{first:CM,last:RM,max:BM,min:IM}[n]||CM;return[t.flatMap(t=>i(t,r)),e]}},DM=(FM.props={},(t={})=>{var e=t["selector"],t=et(t,["selector"]);return FM(Object.assign({channel:"x",selector:e},t))}),zM=(DM.props={},(t={})=>{var e=t["selector"],t=et(t,["selector"]);return FM(Object.assign({channel:"y",selector:e},t))});function WM(e){return t=>null===t?e:e+" of "+t}function GM(){return[(t,e)=>Yc(t,t=>+e[t]),WM("mean")]}function HM(){return[(t,e)=>$c(t,t=>+e[t]),WM("median")]}function VM(){return[(t,e)=>Fc(t,t=>+e[t]),WM("max")]}function qM(){return[(t,e)=>zc(t,t=>+e[t]),WM("min")]}function YM(){return[(t,e)=>t.length,WM("count")]}function $M(){return[(t,e)=>Xc(t,t=>+e[t]),WM("sum")]}function UM(){return[(t,e)=>e[t[0]],WM("first")]}function KM(){return[(t,e)=>e[t[t.length-1]],WM("last")]}zM.props={};const XM=(t={})=>{const i=t["groupBy"],a=et(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:GM,max:VM,count:YM,first:UM,last:KM,sum:$M,min:qM,median:HM}[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=Vk(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,Vk(c.map(t=>e[t[0]]),n)]}),r=c.map(t=>s[t[0]]);return[s0(c),nt({},e,{data:r,encode:Object.fromEntries([...n,...t])})]}},ZM=(XM.props={},(t={})=>{const{channels:n=["x","y"]}=t,e=et(t,["channels"]);return XM(Object.assign(Object.assign({},e),{groupBy:(t,e)=>Zk(n,t,e)}))}),QM=(ZM.props={},(t={})=>ZM(Object.assign(Object.assign({},t),{channels:["x","color","series"]}))),JM=(QM.props={},(t={})=>ZM(Object.assign(Object.assign({},t),{channels:["y","color","series"]}))),tO=(JM.props={},(t={})=>ZM(Object.assign(Object.assign({},t),{channels:["color"]})));function eO(t,e,n){var{reverse:r,slice:i,channel:a}=n,n=et(n,["reverse","slice","channel"]),o=e["encode"];const[s]=R(o,a);var l,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=>Fc(t,t=>+a[t]);if("min"===i)return t=>zc(t,t=>+a[t]);if("sum"===i)return t=>Xc(t,t=>+a[t]);if("median"===i)return t=>$c(t,t=>+a[t]);if("mean"===i)return t=>Yc(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),n=(o=t,c=t=>s[t],(2!==(l=n).length?Sc(Mc(o,l,c),([t,e],[n,r])=>lc(e,r)||lc(t,n)):Sc(kc(o,c),([t,e],[n,r])=>l(e,r)||lc(t,n))).map(([t])=>t)),o=(r&&n.reverse(),"number"==typeof i?[0,i]:i),c=i?n.slice(...o):n;return[t,nt(e,{scale:{[a]:{domain:c}}})]}tO.props={};const nO=(t={})=>{const{reverse:o=!1,slice:s,channel:l,ordinal:c=!0}=t,u=et(t,["reverse","slice","channel","ordinal"]);return(t,e)=>{if(c)return eO(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=Sc(t,t=>a[t]),n&&i.reverse(),[i,e]}}},rO=(nO.props={},(t={})=>nO(Object.assign(Object.assign({},t),{channel:"x"}))),iO=(rO.props={},(t={})=>nO(Object.assign(Object.assign({},t),{channel:"color"}))),aO=(iO.props={},(t={})=>nO(Object.assign(Object.assign({},t),{channel:"y"})));aO.props={};const oO=(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=Oc(t,function(e,n){if("function"==typeof e)return t=>e(t,n);if("sum"===e)return t=>Xc(t,t=>+n[t]);throw new Error("Unknown reducer: "+e)}(l,n),t=>i[t]).map(t=>t[1]);return[t,nt({},e,{scale:{x:{flex:r}}})]}};function sO(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 f=a-u*c,h=u<=1?0:f/(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]=y0(t),a=e%l,e=Math.floor(e/l),o=a*c,s=(u-e-1)*c+f,r=c/r,i=c/i;return`translate(${o-t+d*a}, ${s-n-h*e-p}) scale(${r}, ${i})`})}oO.props={};const lO=()=>(t,e)=>[t,nt({},e,{modifier:sO,axis:!1})],cO=(lO.props={},"thresholds");function uO(t){var e,[n,r]=mc(t);return Math.min(200,(n=n,r=r,e=gc(t=t),t=yc(t),e&&t?Math.ceil((r-n)*Math.cbrt(e)/(3.49*t)):1))}const fO=(t={})=>{const{groupChannels:s=["color"],binChannels:l=["x","y"]}=t,c=et(t,["groupChannels","binChannels"]),u={};return XM(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(c).filter(([t])=>!t.startsWith(cO)))),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=rt(c,cO),o=t.filter(e=>i.every(t=>Yu(t[e]))),r=[...s.map(t=>{var[t]=R(n,t);return t}).filter(Yu).map(e=>t=>e[t]),...l.map((t,e)=>{const n=i[e];e=a[t]||uO(n),e=Ic().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(kc(o,e=>r.map(t=>t(e)).join("-")).values())}}))},hO=(fO.props={},(t={})=>{var e=t["thresholds"];return fO(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))});function dO(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 f=0,h,d;c.push(f);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 y=Math.floor((i+1)*u)+1,m=[s(f),l(f)];for(h=-1;r<y;r++)(o=.5*Math.abs((m[0]-t)*(s(r)-m[1])-(m[0]-l(r))*(e-m[0])))>h&&(h=o,d=r);c.push(d),f=d}return c.push(a-1),c.map(t=>e[t])}function pO(t){if("function"==typeof t)return t;if("lttb"===t)return dO;var e={first:t=>[t[0]],last:t=>[t[t.length-1]],min:(t,e,n)=>[t[Wc(t,t=>n[t])]],max:(t,e,n)=>[t[Dc(t,t=>n[t])]],median:(t,e,n)=>{return[t[qc(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))}}hO.props={};const gO=(t={})=>{const{strategy:e="median",thresholds:a=2e3,groupBy:o=["series","color"]}=t,s=pO(e);return(t,e)=>{var n=e["encode"],t=Zk(o,t,e);const[r]=R(n,"x"),[i]=R(n,"y");return[t.flatMap(t=>s(t,r,i,a)),e]}},yO=(gO.props={},(o={})=>(t,e)=>{const i=e["encode"],n=Object.entries(o).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(Yu);if(0===n.length)return[t,e];const r=t.filter(e=>n.every(t=>t(e))),a=r.map((t,e)=>e);t=Object.entries(i).map(([t,e])=>[t,Object.assign(Object.assign({},e),{value:a.map(t=>e.value[r[t]])})]);return[a,nt({},e,{encode:Object.fromEntries(t)})]});function mO(t){var{min:t,max:e}=t;return[[t[0],t[1]],[e[0],e[1]]]}function vO(t,e){var[t,n]=t,[e,r]=e;return t>=e[0]&&t<=r[0]&&n>=e[1]&&n<=r[1]}yO.props={};const bO=t=>{const r=t["priority"];return(t,e)=>{const n=[];return r&&t.sort(r),t.forEach(t=>{zw(t);const i=t.getLocalBounds();n.some(t=>{var e=mO(i),t=mO(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]})?Dw(t):n.push(t)}),t}};function xO(){const n=new Map;return[t=>n.get(t),(t,e)=>n.set(t,e)]}const wO=t=>{const{maxIterations:k=10,maxError:M=.1,padding:O=1}=t;return i=>{var e=i.length;if(!(e<=1)){const[g,y]=xO(),[m,v]=xO();var a,o,s,l,[c,t]=xO(),[u,n]=xO();for(const b of i){var{min:r,max:f}=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,f]=f;y(b,g),v(b,g),t(b,f-g),n(b,[x,r])}for(let t=0;t<k;t++){i.sort((t,e)=>lc(m(t),m(e)));let r=0;for(let n=0;n<e-1;n++){var h=i[n];let t=n+1,e;for(;(e=i[t])&&([[a,o],[s,l]]=[u(h),u(e)],!(a<l&&s<o));)t+=1;if(e){const g=m(h);var d=c(h),p=m(e),d=p-(g+d);d<O&&(d=(O-d)/2,r=Math.max(r,d),v(h,g-d),v(e,p+d))}}if(r<M)break}for(const w of i)w.style.y+=m(w)-g(w)}return i}};function kO(t){t/=255;return t<=.03928?t/12.92:Math.pow((.055+t)/1.055,2.4)}function MO(t,e,n){return.2126*kO(t)+.7152*kO(e)+.0722*kO(n)}function OO(t,e){var{r:t,g:n,b:r}=t,{r:e,g:i,b:a}=e,t=MO(t,n,r),n=MO(e,i,a);return(Math.max(t,n)+.05)/(Math.min(t,n)+.05)}function _O(e,t){return t[Dc(t,t=>{return OO(e,"object"==typeof(t=t)?t:X.parseColor(t))})]}const SO=t=>{const{threshold:n=4.5,palette:r=["#000","#fff"]}=t;return(t,e)=>(t.forEach(t=>{var e=t.attr("dependentElement").parsedStyle.fill;OO(t.parsedStyle.fill,e)<n&&t.attr("fill",_O(e,r))}),t)},EO=t=>(t,e)=>(t.forEach(t=>{zw(t);var e=t.attr("bounds");!function(t,e){var[t,n]=t;return!(vO(t,e)&&vO(n,e))}(mO(t.getLocalBounds()),e)||Dw(t)}),t);var T=1e-6,AO=1e-12,E=Math.PI,LO=E/2,TO=E/4,PO=2*E,NO=180/E,jO=E/180,CO=Math.abs,RO=Math.atan,BO=Math.atan2,A=Math.cos,IO=Math.ceil,FO=Math.exp,DO=Math.log,zO=Math.pow,P=Math.sin,WO=Math.sign||function(t){return 0<t?1:t<0?-1:0},GO=Math.sqrt,HO=Math.tan;function VO(t){return 1<t?0:t<-1?E:Math.acos(t)}function qO(t){return 1<t?LO:t<-1?-LO:Math.asin(t)}function YO(){}function $O(t,e){t&&KO.hasOwnProperty(t.type)&&KO[t.type](t,e)}var UO={Feature:function(t,e){$O(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)$O(n[r].geometry,e)}},KO={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){XO(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)XO(n[r],e,0)},Polygon:function(t,e){ZO(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)ZO(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)$O(n[r],e)}};function XO(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 ZO(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)XO(t[n],e,1);e.polygonEnd()}function QO(t,e){t&&UO.hasOwnProperty(t.type)?UO[t.type](t,e):$O(t,e)}function JO(t){return[BO(t[1],t[0]),qO(t[2])]}function t3(t){var e=t[0],t=t[1],n=A(t);return[n*A(e),n*P(e),P(t)]}function e3(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function n3(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 r3(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function i3(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function a3(t){var e=GO(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function o3(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 s3(t,e){return CO(t)>E&&(t-=Math.round(t/PO)*PO),[t,e]}function l3(t,e,n){return(t%=PO)?e||n?o3(u3(t),f3(e,n)):u3(t):e||n?f3(e,n):s3}function c3(n){return function(t,e){return CO(t+=n)>E&&(t-=Math.round(t/PO)*PO),[t,e]}}function u3(t){var e=c3(t);return e.invert=c3(-t),e}function f3(t,e){var i=A(t),a=P(t),o=A(e),s=P(e);function n(t,e){var n=A(e),r=A(t)*n,t=P(t)*n,n=P(e),e=n*i+r*a;return[BO(t*o-e*s,r*i-n*a),qO(e*o+t*s)]}return n.invert=function(t,e){var n=A(e),r=A(t)*n,t=P(t)*n,n=P(e),e=n*o-t*s;return[BO(t*o+n*s,r*i+e*a),qO(e*i-r*a)]},n}function h3(t,e){(e=t3(e))[0]-=t,a3(e);t=VO(-e[1]);return((-e[2]<0?-t:t)+PO-T)%PO}function d3(){var r,e=[];return{point:function(t,e,n){r.push([t,e,n])},lineStart:function(){e.push(r=[])},lineEnd:YO,rejoin:function(){1<e.length&&e.push(e.pop().concat(e.shift()))},result:function(){var t=e;return e=[],r=null,t}}}function p3(t,e){return CO(t[0]-e[0])<T&&CO(t[1]-e[1])<T}function g3(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 y3(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(p3(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*T}s.push(n=new g3(r,t,null,!0)),l.push(n.o=new g3(r,null,n,!1)),s.push(n=new g3(i,t,null,!1)),l.push(n.o=new g3(i,null,n,!0))}}),s.length){for(l.sort(e),m3(s),m3(l),o=0,i=l.length;o<i;++o)l[o].e=n=!n;for(var c,u,f=s[0];;){for(var h=f,d=!0;h.v;)if((h=h.n)===f)return;c=h.z,a.lineStart();do{if(h.v=h.o.v=!0,h.e){if(d)for(o=0,i=c.length;o<i;++o)a.point((u=c[o])[0],u[1]);else r(h.x,h.n.x,1,a);h=h.n}else{if(d)for(c=h.p.z,o=c.length-1;0<=o;--o)a.point((u=c[o])[0],u[1]);else r(h.x,h.p.x,-1,a);h=h.p}}while(c=(h=h.o).z,d=!d,!h.v);a.lineEnd()}}}function m3(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 v3(t){return CO(t[0])<=E?t[0]:WO(t[0])*((CO(t[0])+E)%PO-E)}function b3(y,m,v,b){return function(s){var l,c,u,n=m(s),f=d3(),h=m(f),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=Uc(c);var t=function(t,e){var n=v3(e),r=e[1],e=P(r),i=[P(n),-A(n),0],a=0,o=0,s=new vc;1===e?r=LO+T:-1===e&&(r=-LO-T);for(var l=0,c=t.length;l<c;++l)if(f=(u=t[l]).length)for(var u,f,h=u[f-1],d=v3(h),p=h[1]/2+TO,g=P(p),y=A(p),m=0;m<f;++m,d=b,g=w,y=x,h=v){var v=u[m],b=v3(v),x=v[1]/2+TO,w=P(x),x=A(x),k=b-d,M=0<=k?1:-1,O=M*k,_=E<O,S=g*w;s.add(BO(S*M*P(O),y*x+S*A(O))),a+=_?k+M*PO:k,_^n<=d^n<=b&&(a3(S=n3(t3(h),t3(v))),a3(O=n3(i,S)),(M=(_^0<=k?-1:1)*qO(O[2]))<r||r===M&&(S[0]||S[1]))&&(o+=_^0<=k?1:-1)}return(a<-T||a<T&&s<-AO)^1&o}(l,b);c.length?(d||(s.polygonStart(),d=!0),y3(c,w3,t,v,s)):t&&(d||(s.polygonStart(),d=!0),s.lineStart(),v(null,null,1,s),s.lineEnd()),d&&(s.polygonEnd(),d=!1),c=l=null},sphere:function(){s.polygonStart(),s.lineStart(),v(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function r(t,e){y(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]),h.point(t,e)}function o(){h.lineStart(),u=[]}function g(){p(u[0][0],u[0][1]),h.lineEnd();var t,e,n,r,i=h.clean(),a=f.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(x3))}return e}}function x3(t){return 1<t.length}function w3(t,e){return((t=t.x)[0]<0?t[1]-LO-T:LO-t[1])-((e=e.x)[0]<0?e[1]-LO-T:LO-e[1])}s3.invert=s3;var k3=b3(function(){return 1},function(c){var u,f=NaN,h=NaN,d=NaN;return{lineStart:function(){c.lineStart(),u=1},point:function(t,e){var n,r,i,a,o,s=0<t?E:-E,l=CO(t-f);CO(l-E)<T?(c.point(f,h=0<(h+e)/2?LO:-LO),c.point(d,h),c.lineEnd(),c.lineStart(),c.point(s,h),c.point(t,h),u=0):d!==s&&E<=l&&(CO(f-d)<T&&(f-=d*T),CO(t-s)<T&&(t-=s*T),l=h,i=e,o=P((n=f)-(r=t)),h=CO(o)>T?RO((P(l)*(a=A(i))*P(r)-P(i)*(r=A(l))*P(n))/(r*a*o)):(l+i)/2,c.point(d,h),c.lineEnd(),c.lineStart(),c.point(s,h),u=0),c.point(f=t,h=e),d=s},lineEnd:function(){c.lineEnd(),f=h=NaN},clean:function(){return 2-u}}},function(t,e,n,r){var i;null==t?(i=n*LO,r.point(-E,i),r.point(0,i),r.point(E,i),r.point(E,0),r.point(E,-i),r.point(0,-i),r.point(-E,-i),r.point(-E,0),r.point(-E,i)):CO(t[0]-e[0])>T?(t=t[0]<e[0]?E:-E,i=n*t/2,r.point(-t,i),r.point(0,i),r.point(t,i)):r.point(e[0],e[1])},[-E,-LO]);function M3(d){var g=A(d),p=6*jO,f=0<g,h=CO(g)>T;function y(t,e){return A(t)*A(e)>g}function m(t,e,n){var r,i,a,o,s,l,c,u=[1,0,0],f=n3(t3(t),t3(e)),h=e3(f,f),d=f[0],p=h-d*d;return p?(r=n3(u,f),r3(u=i3(u,g*h/p),i3(f,-g*d/p)),(p=(f=e3(u,h=r))*f-(d=e3(h,h))*(e3(u,u)-1))<0?void 0:(r3(p=i3(h,(-f-(r=GO(p)))/d),u),p=JO(p),n?(i=t[0],a=e[0],o=t[1],e=e[1],a<i&&(c=i,i=a,a=c),!(l=CO((s=a-i)-E)<T)&&e<o&&(c=o,o=e,e=c),(l||s<T?l?0<o+e^p[1]<(CO(p[0]-i)<T?o:e):o<=p[1]&&p[1]<=e:E<s^(i<=p[0]&&p[0]<=a))?(r3(c=i3(h,(-f+r)/d),u),[p,JO(c)]):void 0):p)):!n&&t}function v(t,e){var n=f?d:E-d,r=0;return t<-n?r|=1:n<t&&(r|=2),e<-n?r|=4:n<e&&(r|=8),r}return b3(y,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=y(t,e),t=f?i?0:v(t,e):i?v(t+(t<0?E:-E),e):0;!o&&(c=l=i)&&a.lineStart(),i===l||(n=m(o,r))&&!p3(o,n)&&!p3(r,n)||(r[2]=1),i!==l?(u=0,i?(a.lineStart(),n=m(r,o),a.point(n[0],n[1])):(n=m(o,r),a.point(n[0],n[1],2),a.lineEnd()),o=n):h&&o&&f^i&&(t&s||!(e=m(r,o,!0))||(u=0,f?(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&&p3(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=A(r),c=P(r),u=o*a;null==n?(n=r+o*PO,s=r-u/2):(n=h3(l,n),s=h3(l,s),(0<o?n<s:s<n)&&(n+=o*PO));for(var f,h=n;0<o?s<h:h<s;h-=u)f=JO([l,-c*A(h),-c*P(h)]),i.point(f[0],f[1])}},f?[0,-d]:[-E,d-E])}var O3=1e9,_3=-O3;function S3(m,v,b,x){function w(t,e){return m<=t&&t<=b&&v<=e&&e<=x}function k(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?m:b,1<i?x:v),(i=(i+n+4)%4)!==a;);else r.point(e[0],e[1])}function o(t,e){return CO(t[0]-m)<T?0<e?0:3:CO(t[0]-b)<T?0<e?2:1:CO(t[1]-v)<T?0<e?1:0:0<e?3:2}function M(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,f,a,o,s,l,c,u,h,d,p,g=r,t=d3(),e={point:n,lineStart:function(){e.point=y,f&&f.push(a=[]);d=!0,h=!1,c=u=NaN},lineEnd:function(){i&&(y(o,s),l&&h&&t.rejoin(),i.push(t.result()));e.point=n,h&&g.lineEnd()},polygonStart:function(){g=t,i=[],f=[],p=!0},polygonEnd:function(){var t=function(){for(var t=0,e=0,n=f.length;e<n;++e)for(var r,i,a=f[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)*(m-r)<(c-r)*(x-i)&&++t:u<=x&&(c-r)*(x-i)<(u-i)*(m-r)&&--t;return t}(),e=p&&t,n=(i=Uc(i)).length;(e||n)&&(r.polygonStart(),e&&(r.lineStart(),k(null,null,1,r),r.lineEnd()),n&&y3(i,M,t,k,r),r.polygonEnd());g=r,i=f=a=null}};function n(t,e){w(t,e)&&g.point(t,e)}function y(t,e){var n,r,i=w(t,e);f&&a.push([t,e]),d?(o=t,s=e,d=!1,(l=i)&&(g.lineStart(),g.point(t,e))):i&&h?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,f=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,f||!(0<n)){if(n/=f,f<0){if(n<l)return;n<c&&(c=n)}else if(0<f){if(c<n)return;l<n&&(l=n)}if(n=a-s,f||!(n<0)){if(n/=f,f<0){if(c<n)return;l<n&&(l=n)}else if(0<f){if(n<l)return;n<c&&(c=n)}return 0<l&&(t[0]=o+l*u,t[1]=s+l*f),c<1&&(e[0]=o+c*u,e[1]=s+c*f),1}}}}}(n=[c=Math.max(_3,Math.min(O3,c)),u=Math.max(_3,Math.min(O3,u))],r=[t=Math.max(_3,Math.min(O3,t)),e=Math.max(_3,Math.min(O3,e))],m,v,b,x)?i&&(g.lineStart(),g.point(t,e),p=!1):(h||(g.lineStart(),g.point(n[0],n[1])),g.point(r[0],r[1]),i||g.lineEnd(),p=!1),c=t,u=e,h=i}return e}}function E3(t,e,n){var r=Kc(t,e-T,n).concat(e);return function(e){return r.map(function(t){return[e,t]})}}function A3(t,e,n){var r=Kc(t,e-T,n).concat(e);return function(e){return r.map(function(t){return[t,e]})}}function L3(){return g=p=10,y=90,m=360,v=2.5,e.lines=function(){return t().map(function(t){return{type:"LineString",coordinates:t}})},e.outline=function(){return{type:"Polygon",coordinates:[h(a).concat(d(l).slice(1),h(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(v)):[[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(v)):[[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?(y=+t[0],m=+t[1],e):[y,m]},e.stepMinor=function(t){return arguments.length?(p=+t[0],g=+t[1],e):[p,g]},e.precision=function(t){return arguments.length?(v=+t,u=E3(s,o,90),f=A3(r,n,v),h=E3(c,l,90),d=A3(a,i,v),e):v},e.extentMajor([[-180,-90+T],[180,90-T]]).extentMinor([[-180,-80-T],[180,80+T]])();function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return Kc(IO(a/y)*y,i,y).map(h).concat(Kc(IO(c/m)*m,l,m).map(d)).concat(Kc(IO(r/p)*p,n,p).filter(function(t){return CO(t%y)>T}).map(u)).concat(Kc(IO(s/g)*g,o,g).filter(function(t){return CO(t%m)>T}).map(f))}var n,r,i,a,o,s,l,c,u,f,h,d,p,g,y,m,v}var T3,P3,N3,j3,C3=t=>t,R3=new vc,B3=new vc,I3={point:YO,lineStart:YO,lineEnd:YO,polygonStart:function(){I3.lineStart=F3,I3.lineEnd=W3},polygonEnd:function(){I3.lineStart=I3.lineEnd=I3.point=YO,R3.add(CO(B3)),B3=new vc},result:function(){var t=R3/2;return R3=new vc,t}};function F3(){I3.point=D3}function D3(t,e){I3.point=z3,T3=N3=t,P3=j3=e}function z3(t,e){B3.add(j3*t-N3*e),N3=t,j3=e}function W3(){z3(T3,P3)}var G3=I3,H3=1/0,V3=H3,q3=-H3,Y3=q3;var $3,U3,K3,X3,Z3={point:function(t,e){t<H3&&(H3=t);q3<t&&(q3=t);e<V3&&(V3=e);Y3<e&&(Y3=e)},lineStart:YO,lineEnd:YO,polygonStart:YO,polygonEnd:YO,result:function(){var t=[[H3,V3],[q3,Y3]];return q3=Y3=-(V3=H3=1/0),t}},Q3=0,J3=0,t4=0,e4=0,n4=0,r4=0,i4=0,a4=0,o4=0,s4={point:l4,lineStart:c4,lineEnd:h4,polygonStart:function(){s4.lineStart=d4,s4.lineEnd=p4},polygonEnd:function(){s4.point=l4,s4.lineStart=c4,s4.lineEnd=h4},result:function(){var t=o4?[i4/o4,a4/o4]:r4?[e4/r4,n4/r4]:t4?[Q3/t4,J3/t4]:[NaN,NaN];return Q3=J3=t4=e4=n4=r4=i4=a4=o4=0,t}};function l4(t,e){Q3+=t,J3+=e,++t4}function c4(){s4.point=u4}function u4(t,e){s4.point=f4,l4(K3=t,X3=e)}function f4(t,e){var n=t-K3,r=e-X3,n=GO(n*n+r*r);e4+=n*(K3+t)/2,n4+=n*(X3+e)/2,r4+=n,l4(K3=t,X3=e)}function h4(){s4.point=l4}function d4(){s4.point=g4}function p4(){y4($3,U3)}function g4(t,e){s4.point=y4,l4($3=K3=t,U3=X3=e)}function y4(t,e){var n=t-K3,r=e-X3,n=GO(n*n+r*r);e4+=n*(K3+t)/2,n4+=n*(X3+e)/2,r4+=n,i4+=(n=X3*t-K3*e)*(K3+t),a4+=n*(X3+e),o4+=3*n,l4(K3=t,X3=e)}var m4=s4;function v4(t){this._context=t}v4.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,PO)}},result:YO};var b4,x4,w4,k4,M4,O4=new vc,_4={point:YO,lineStart:function(){_4.point=S4},lineEnd:function(){b4&&E4(x4,w4),_4.point=YO},polygonStart:function(){b4=!0},polygonEnd:function(){b4=null},result:function(){var t=+O4;return O4=new vc,t}};function S4(t,e){_4.point=E4,x4=k4=t,w4=M4=e}function E4(t,e){k4-=t,M4-=e,O4.add(GO(k4*k4+M4*M4)),k4=t,M4=e}var A4=_4;let L4,T4,P4,N4;class j4{constructor(t){this._append=null==t?C4:function(t){var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);if(15<e)return C4;if(e!==L4){const r=10**e;L4=e,T4=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 T4}(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===P4&&this._append===T4||(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`,P4=n,T4=this._append,N4=this._,this._=r),this._+=N4}}result(){var t=this._;return this._="",t.length?t:null}}function C4(t){let e=1;this._+=t[0];for(var n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function R4(e,n){let r=3,i=4.5,a,o;function s(t){return t&&("function"==typeof i&&o.pointRadius(+i.apply(this,arguments)),QO(t,a(o))),o.result()}return s.area=function(t){return QO(t,a(G3)),G3.result()},s.measure=function(t){return QO(t,a(A4)),A4.result()},s.bounds=function(t){return QO(t,a(Z3)),Z3.result()},s.centroid=function(t){return QO(t,a(m4)),m4.result()},s.projection=function(t){return arguments.length?(a=null==t?(e=null,C3):(e=t).stream,s):e},s.context=function(t){return arguments.length?(o=null==t?(n=null,new j4(r)):new v4(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 j4(r)),s},s.projection(e).digits(r).context(n)}function B4(r){return function(t){var e,n=new I4;for(e in r)n[e]=r[e];return n.stream=t,n}}function I4(){}function F4(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),QO(n,t.stream(Z3)),e(Z3.result()),null!=r&&t.clipExtent(r),t}function D4(i,a,t){return F4(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 z4(t,e,n){return D4(t,[[0,0],e],n)}function W4(r,i,t){return F4(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 G4(i,a,t){return F4(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)}I4.prototype={constructor:I4,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 H4=16,V4=A(30*jO);function q4(t,e){return+e?(E=t,A=e,function(r){var n,i,a,o,s,l,c,u,f,h,d,p,g={point:t,lineStart:e,lineEnd:m,polygonStart:function(){r.polygonStart(),g.lineStart=v},polygonEnd:function(){r.polygonEnd(),g.lineStart=e}};function t(t,e){t=E(t,e),r.point(t[0],t[1])}function e(){u=NaN,g.point=y,r.lineStart()}function y(t,e){var n=t3([t,e]),e=E(t,e);L(u,f,c,h,d,p,u=e[0],f=e[1],c=t,h=n[0],d=n[1],p=n[2],H4,r),r.point(u,f)}function m(){g.point=t,r.lineEnd()}function v(){e(),g.point=b,g.lineEnd=x}function b(t,e){y(n=t,e),i=u,a=f,o=h,s=d,l=p,g.point=y}function x(){L(u,f,c,h,d,p,i,a,n,o,s,l,H4,r),g.lineEnd=m,m()}return g}):(n=t,B4({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}}));var n,E,A;function L(t,e,n,r,i,a,o,s,l,c,u,f,h,d){var p,g,y,m,v,b,x,w,k,M,O=o-t,_=s-e,S=O*O+_*_;4*A<S&&h--&&(y=a+f,x=qO(y/=m=GO((p=r+c)*p+(g=i+u)*g+y*y)),v=CO(CO(y)-1)<T||CO(n-l)<T?(n+l)/2:BO(g,p),b=(x=E(v,x))[0],x=x[1],A<(M=_*(w=b-t)-O*(k=x-e))*M/S||.3<CO((O*w+_*k)/S-.5)||r*c+i*u+a*f<V4)&&(L(t,e,n,r,i,a,b,x,v,p/=m,g/=m,y,h,d),d.point(b,x),L(b,x,v,p,g,y,o,s,l,c,u,f,h,d))}}var Y4=B4({point:function(t,e){this.stream.point(t*jO,e*jO)}});function $4(t,n,r,i,a,e){var o,s,l,c,u,f,h,d,p,g,y,m;return e?(f=A(e),e=P(e),h=f*t,d=e*t,p=f/t,g=e/t,y=(e*r-f*n)/t,m=(e*n+f*r)/t,b.invert=function(t,e){return[i*(p*t-g*e+y),a*(m-g*t-p*e)]},b):(o=t,s=n,l=r,c=i,u=a,v.invert=function(t,e){return[(t-s)/o*c,(l-e)/o*u]},v);function v(t,e){return[s+o*(t*=c),l-o*(e*=u)]}function b(t,e){return[h*(t*=i)-d*(e*=a)+n,r-d*t-h*e]}}function U4(t){return K4(function(){return t})()}function K4(t){var e,r,n,i,a,o,s,l,c,u,f=150,h=480,d=250,p=0,g=0,y=0,m=0,v=0,b=0,x=1,w=1,k=null,M=k3,O=null,_=C3,S=.5;function E(t){return l(t[0]*jO,t[1]*jO)}function A(t){return(t=l.invert(t[0],t[1]))&&[t[0]*NO,t[1]*NO]}function L(){var t=$4(f,0,0,x,w,b).apply(null,e(p,g)),t=$4(f,h-t[0],d-t[1],x,w,b);return r=l3(y,m,v),s=o3(e,t),l=o3(r,s),o=q4(s,S),T()}function T(){return c=u=null,E}return E.stream=function(t){return c&&u===t?c:c=Y4((n=r,B4({point:function(t,e){t=n(t,e);return this.stream.point(t[0],t[1])}})(M(o(_(u=t))))));var n},E.preclip=function(t){return arguments.length?(M=t,k=void 0,T()):M},E.postclip=function(t){return arguments.length?(_=t,O=n=i=a=null,T()):_},E.clipAngle=function(t){return arguments.length?(M=+t?M3(k=t*jO):(k=null,k3),T()):k*NO},E.clipExtent=function(t){return arguments.length?(_=null==t?(O=n=i=a=null,C3):S3(O=+t[0][0],n=+t[0][1],i=+t[1][0],a=+t[1][1]),T()):null==O?null:[[O,n],[i,a]]},E.scale=function(t){return arguments.length?(f=+t,L()):f},E.translate=function(t){return arguments.length?(h=+t[0],d=+t[1],L()):[h,d]},E.center=function(t){return arguments.length?(p=t[0]%360*jO,g=t[1]%360*jO,L()):[p*NO,g*NO]},E.rotate=function(t){return arguments.length?(y=t[0]%360*jO,m=t[1]%360*jO,v=2<t.length?t[2]%360*jO:0,L()):[y*NO,m*NO,v*NO]},E.angle=function(t){return arguments.length?(b=t%360*jO,L()):b*NO},E.reflectX=function(t){return arguments.length?(x=t?-1:1,L()):x<0},E.reflectY=function(t){return arguments.length?(w=t?-1:1,L()):w<0},E.precision=function(t){return arguments.length?(o=q4(s,S=t*t),T()):GO(S)},E.fitExtent=function(t,e){return D4(E,t,e)},E.fitSize=function(t,e){return z4(E,t,e)},E.fitWidth=function(t,e){return W4(E,t,e)},E.fitHeight=function(t,e){return G4(E,t,e)},function(){return e=t.apply(this,arguments),E.invert=e.invert&&A,L()}}function X4(t){var e=0,n=E/3,r=K4(t),t=r(e,n);return t.parallels=function(t){return arguments.length?r(e=t[0]*jO,n=t[1]*jO):[e*NO,n*NO]},t}function Z4(t,e){var n,r,i,a=P(t),o=(a+P(e))/2;return CO(o)<T?(n=A(t),s.invert=function(t,e){return[t/n,qO(e*n)]},s):(i=GO(r=1+a*(2*o-a))/o,l.invert=function(t,e){var e=i-e,n=BO(t,CO(e))*WO(e);return e*o<0&&(n-=E*WO(t)*WO(e)),[n/o,qO((r-(t*t+e*e)*o*o)/(2*o))]},l);function s(t,e){return[t*n,P(e)/n]}function l(t,e){e=GO(r-2*o*P(e))/o;return[e*P(t*=o),i-e*A(t)]}}function Q4(){return X4(Z4).scale(155.424).center([0,33.6442])}function J4(){return Q4().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function t6(i){return function(t,e){var n=A(t),r=A(e),n=i(n*r);return n===1/0?[2,0]:[n*r*P(t),n*P(e)]}}function e6(a){return function(t,e){var n=GO(t*t+e*e),r=a(n),i=P(r),r=A(r);return[BO(t*i,n*r),qO(n&&e*i/n)]}}var n6=t6(function(t){return GO(2/(1+t))});n6.invert=e6(function(t){return 2*qO(t/2)});var r6=t6(function(t){return(t=VO(t))&&t/P(t)});function i6(t,e){return[t,DO(HO((LO+e)/2))]}function a6(r){var i,a,o,s=U4(r),e=s.center,l=s.scale,n=s.translate,c=s.clipExtent,u=null;function f(){var e,t=E*l(),n=s((e=l3((e=s.rotate())[0]*jO,e[1]*jO,2<e.length?e[2]*jO:0),function(t){return(t=e.invert(t[0]*jO,t[1]*jO))[0]*=NO,t[1]*=NO,t}([0,0])));return c(null==u?[[n[0]-t,n[1]-t],[n[0]+t,n[1]+t]]:r===i6?[[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),f):l)()},s.translate=function(t){return(arguments.length?(n(t),f):n)()},s.center=function(t){return(arguments.length?(e(t),f):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]),f()):null==u?null:[[u,i],[a,o]]},f()}function o6(t){return HO((LO+t)/2)}function s6(t,e){var n=A(t),i=t===e?P(t):DO(n/A(e))/DO(o6(e)/o6(t)),a=n*zO(o6(t),i)/i;return i?(r.invert=function(t,e){var e=a-e,n=WO(i)*GO(t*t+e*e),r=BO(t,CO(e))*WO(e);return e*i<0&&(r-=E*WO(t)*WO(e)),[r/i,2*RO(zO(a/n,1/i))-LO]},r):i6;function r(t,e){0<a?e<-LO+T&&(e=-LO+T):LO-T<e&&(e=LO-T);e=a/zO(o6(e),i);return[e*P(i*t),a-e*A(i*t)]}}function l6(t,e){return[t,e]}function c6(t,e){var n=A(t),r=t===e?P(t):(n-A(e))/(e-t),i=n/r+t;return CO(r)<T?l6:(a.invert=function(t,e){var e=i-e,n=BO(t,CO(e))*WO(e);return e*r<0&&(n-=E*WO(t)*WO(e)),[n/r,i-WO(r)*GO(t*t+e*e)]},a);function a(t,e){e=i-e,t*=r;return[e*P(t),i-e*A(t)]}}r6.invert=e6(function(t){return t}),i6.invert=function(t,e){return[t,2*RO(FO(e))-LO]},l6.invert=l6;var u6=1.340264,f6=-.081106,h6=893e-6,d6=.003796,p6=GO(3)/2;function g6(t,e){var e=qO(p6*P(e)),n=e*e,r=n*n*n;return[t*A(e)/(p6*(u6+3*f6*n+r*(7*h6+9*d6*n))),e*(u6+f6*n+r*(h6+d6*n))]}function y6(t,e){var n=A(e),r=A(t)*n;return[n*P(t)/r,P(e)/r]}function m6(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 v6(t,e){return[A(e)*P(t),P(e)]}function b6(t,e){var n=A(e),r=1+A(t)*n;return[n*P(t)/r,P(e)/r]}function x6(t,e){return[DO(HO((LO+e)/2)),-t]}g6.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*(u6+f6*i+a*(h6+d6*i))-e)/(u6+3*f6*i+a*(7*h6+9*d6*i)))*r)*i*i,!(CO(n)<AO));++o);return[p6*t*(u6+3*f6*i+a*(7*h6+9*d6*i))/A(r),qO(P(r)/p6)]},y6.invert=e6(RO),m6.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))),CO(a)>T&&0<--r);return[t/(.8707+(i=n*n)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),n]},v6.invert=e6(qO),b6.invert=e6(function(t){return 2*RO(t)}),x6.invert=function(t,e){return[-e,2*RO(FO(t))-LO]};var w6=Object.freeze({__proto__:null,geoAlbersUsa:function(){var e,n,i,a,o,r,s=J4(),l=Q4().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=Q4().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){r=[t,e]}};function f(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 h(){return e=n=null,f}return f.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)},f.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},f.precision=function(t){return arguments.length?(s.precision(t),l.precision(t),c.precision(t),h()):s.precision()},f.scale=function(t){return arguments.length?(s.scale(t),l.scale(.35*t),c.scale(t),f.translate(s.translate())):s.scale()},f.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+T,r+.12*e+T],[n-.214*e-T,r+.234*e-T]]).stream(u),o=c.translate([n-.205*e,r+.212*e]).clipExtent([[n-.214*e+T,r+.166*e+T],[n-.115*e-T,r+.234*e-T]]).stream(u),h()):s.translate()},f.fitExtent=function(t,e){return D4(f,t,e)},f.fitSize=function(t,e){return z4(f,t,e)},f.fitWidth=function(t,e){return W4(f,t,e)},f.fitHeight=function(t,e){return G4(f,t,e)},f.scale(1070)},geoAlbers:J4,geoAzimuthalEqualArea:function(){return U4(n6).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:n6,geoAzimuthalEquidistant:function(){return U4(r6).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:r6,geoConicConformal:function(){return X4(s6).scale(109.5).parallels([30,30])},geoConicConformalRaw:s6,geoConicEqualArea:Q4,geoConicEqualAreaRaw:Z4,geoConicEquidistant:function(){return X4(c6).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:c6,geoEqualEarth:function(){return U4(g6).scale(177.158)},geoEqualEarthRaw:g6,geoEquirectangular:function(){return U4(l6).scale(152.63)},geoEquirectangularRaw:l6,geoGnomonic:function(){return U4(y6).scale(144.049).clipAngle(60)},geoGnomonicRaw:y6,geoIdentity:function(){var r,i,e,n,a,o,s,l=1,c=0,u=0,f=1,h=1,d=0,p=null,g=1,y=1,m=B4({point:function(t,e){t=x([t,e]);this.stream.point(t[0],t[1])}}),v=C3;function b(){return g=l*f,y=l*h,o=s=null,x}function x(t){var e,n=t[0]*g,t=t[1]*y;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/y]},x.stream=function(t){return o&&s===t?o:o=m(v(s=t))},x.postclip=function(t){return arguments.length?(v=t,p=e=n=a=null,b()):v},x.clipExtent=function(t){return arguments.length?(v=null==t?(p=e=n=a=null,C3):S3(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=P(d=t%360*jO),r=A(d),b()):d*NO},x.reflectX=function(t){return arguments.length?(f=t?-1:1,b()):f<0},x.reflectY=function(t){return arguments.length?(h=t?-1:1,b()):h<0},x.fitExtent=function(t,e){return D4(x,t,e)},x.fitSize=function(t,e){return z4(x,t,e)},x.fitWidth=function(t,e){return W4(x,t,e)},x.fitHeight=function(t,e){return G4(x,t,e)},x},geoProjection:U4,geoProjectionMutator:K4,geoMercator:function(){return a6(i6).scale(961/PO)},geoMercatorRaw:i6,geoNaturalEarth1:function(){return U4(m6).scale(175.295)},geoNaturalEarth1Raw:m6,geoOrthographic:function(){return U4(v6).scale(249.5).clipAngle(90+T)},geoOrthographicRaw:v6,geoStereographic:function(){return U4(b6).scale(250).clipAngle(142)},geoStereographicRaw:b6,geoTransverseMercator:function(){var t=a6(x6),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:x6});function k6(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 M6(t,e,n,r){var i,a,o,s,l,c,{outline:e=(e=e.filter(_6),e.find(t=>t.sphere)?{type:"Sphere"}:k6(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]]=R4(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 O6(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:[L3()]}}):"sphere"===e?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t)}function _6(t){return"geoPath"===t.type}ss=()=>t=>{var{children:e,coordinate:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,h=et(n,["type"]),d=function(t){if("function"==typeof t)return t;var e="geo"+Ze(t);if(e=w6[e])return e;throw new Error("Unknown coordinate: "+t)}(r),p=e.map(O6);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=(M6(i,p,l,h),i),l=h;for([o,s]of Object.entries(l))null!=(a=c[o])&&a.call(c,s);g=R4(i);const u=new Cp({domain:[t,t+n]}),f=new Cp({domain:[e,e+r]});return{transform:t=>{return t=t,(t=i(t))?([t,e]=t,[u.map(t),f.map(e)]):null;var e},untransform:t=>{return(t=t)?([t,e]=t,t=[u.invert(t),f.invert(e)],i.invert(t)):null;var e}}}]]}},children:p.flatMap(t=>{var e,n,r;return _6(t)?({style:n,tooltip:r={}}=e=t,Object.assign(Object.assign({},e),{type:"path",tooltip:Qu(r,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},n),{d:t=>g(t)||[]})})):t})})]},ss.props={},ds=()=>t=>{var{data:e,scale:n,encode:r,style:i,animate:a,key:o}=t,t=et(t,["type","data","scale","encode","style","animate","key"]);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}]})]};ds.props={};const S6={"composition.geoView":ss,"composition.geoPath":ds};function E6(){return Object.assign({"data.fetch":Oh,"data.inline":Ph,"data.sortBy":Th,"data.sort":Eh,"data.filter":Sh,"data.pick":Ah,"data.rename":Lh,"data.fold":_h,"data.slice":od,"data.custom":Nh,"data.map":jh,"data.cluster":ch,"data.tree":uh,"data.sankey":Wu,"data.arc":Ih,"data.wordCloud":rd,"data.join":ad,"transform.maybeZeroY1":Xk,"transform.maybeZeroX":uM,"transform.maybeStackY":lM,"transform.maybeTitle":cM,"transform.maybeSeries":pM,"transform.maybeZeroPadding":xM,"transform.stackY":oM,"transform.binX":hO,"transform.bin":fO,"transform.dodgeX":_M,"transform.jitter":TM,"transform.jitterX":PM,"transform.symmetryY":NM,"transform.diffY":jM,"transform.stackEnter":SM,"transform.normalizeY":EM,"transform.select":FM,"transform.selectX":DM,"transform.selectY":zM,"transform.groupX":QM,"transform.groupY":JM,"transform.groupColor":tO,"transform.group":ZM,"transform.maybeSize":hM,"transform.maybeZeroY":fM,"transform.maybeKey":dM,"transform.sortX":rO,"transform.sortY":aO,"transform.sortColor":iO,"transform.flexX":oO,"transform.maybeTupleY":gM,"transform.maybeTupleX":yM,"transform.maybeIdentityY":mM,"transform.maybeIdentityX":vM,"transform.maybeTuple":MM,"transform.maybeVisualPosition":wM,"transform.maybeFunctionAttribute":kM,"transform.maybeGradient":OM,"transform.maybeTooltip":bM,"transform.pack":lO,"transform.sample":gO,"transform.filter":yO,"coordinate.cartesian":Ps,"coordinate.polar":js,"coordinate.helix":Cs,"coordinate.transpose":Rs,"coordinate.theta":Bs,"coordinate.parallel":Ds,"coordinate.fisheye":zs,"coordinate.radial":Fs,"coordinate.radar":Ws,"encode.constant":Gs,"encode.field":Vs,"encode.transform":Hs,"encode.column":qs,"mark.interval":oc,"mark.rect":sc,"mark.line":lu,"mark.point":cu,"mark.text":uu,"mark.cell":fu,"mark.area":hu,"mark.link":du,"mark.image":pu,"mark.polygon":gu,"mark.box":yu,"mark.vector":mu,"mark.lineX":bu,"mark.lineY":vu,"mark.connector":xu,"mark.range":Mu,"mark.rangeX":Ou,"mark.rangeY":_u,"mark.sankey":ef,"mark.path":nf,"mark.treemap":lf,"mark.pack":cf,"mark.boxplot":vf,"mark.shape":bf,"mark.forceGraph":sh,"mark.gauge":L0,"mark.tree":fh,"mark.wordCloud":sd,"palette.category10":T0,"palette.category20":P0,"scale.linear":j0,"scale.ordinal":C0,"scale.band":N0,"scale.identity":R0,"scale.point":B0,"scale.time":I0,"scale.log":F0,"scale.pow":D0,"scale.sqrt":H0,"scale.threshold":z0,"scale.quantile":W0,"scale.quantize":G0,"scale.sequential":V0,"scale.constant":q0,"shape.interval.rect":U1,"shape.interval.hollow":K1,"shape.interval.funnel":X1,"shape.interval.pyramid":Q1,"shape.rect.rect":U1,"shape.rect.hollow":K1,"shape.cell.cell":U1,"shape.cell.hollow":K1,"shape.line.line":ng,"shape.line.hv":ig,"shape.line.vh":ag,"shape.line.hvh":og,"shape.line.smooth":rg,"shape.point.bowtie":lg,"shape.point.cross":cg,"shape.point.diamond":ug,"shape.point.hexagon":fg,"shape.point.hollowBowtie":hg,"shape.point.hollowDiamond":dg,"shape.point.hollowHexagon":pg,"shape.point.hollow":gg,"shape.point.hollowSquare":yg,"shape.point.hollowTriangle":mg,"shape.point.hollowTriangleDown":vg,"shape.point.hyphen":bg,"shape.point.line":xg,"shape.point.plus":wg,"shape.point.point":kg,"shape.point.square":Mg,"shape.point.tick":Og,"shape.point.triangle":_g,"shape.point.triangleDown":Sg,"shape.text.text":A2,"shape.area.area":j2,"shape.area.smooth":C2,"shape.area.hvh":R2,"shape.area.vh":B2,"shape.area.hv":I2,"shape.link.smooth":D2,"shape.link.vhv":z2,"shape.link.arc":W2,"shape.link.link":F2,"shape.image.image":G2,"shape.polygon.polygon":H2,"shape.polygon.ribbon":V2,"shape.box.box":q2,"shape.vector.vector":Eg,"shape.label.label":lx,"shape.text.badge":T2,"shape.lineX.line":Y2,"shape.lineY.line":Y2,"shape.shape.shape":hx,"shape.connector.connector":K2,"shape.range.range":U1,"shape.rangeX.range":U1,"shape.rangeY.range":U1,"shape.path.path":ux,"shape.path.hollow":fx,"theme.classic":dx,"theme.classicDark":px,"theme.academy":yx,"component.axisX":Vx,"component.axisY":qx,"component.axisRadar":Yx,"component.axisLinear":Gx,"component.axisArc":Hx,"component.legendCategory":Xx,"component.legendContinuous":Zx,"component.legendContinuousBlock":Qx,"component.legendContinuousBlockSize":Jx,"component.legendContinuousSize":tw,"component.title":rw,"component.sliderX":lw,"component.sliderY":cw,"component.scrollbarX":fw,"component.scrollbarY":hw,"animation.scaleInX":vw,"animation.scaleOutX":bw,"animation.scaleInY":xw,"animation.scaleOutY":ww,"animation.waveIn":Pw,"animation.fadeIn":kw,"animation.fadeOut":Mw,"animation.zoomIn":Nw,"animation.zoomOut":jw,"animation.pathIn":Cw,"animation.morphing":Tw,"animation.growInX":Rw,"animation.growInY":Bw,"interaction.elementHighlight":i5,"interaction.elementHighlightByX":a5,"interaction.elementHighlightByColor":o5,"interaction.elementSelect":l5,"interaction.elementSelectByX":c5,"interaction.elementSelectByColor":u5,"interaction.fisheye":h5,"interaction.chartIndex":f5,"interaction.tooltip":E5,"interaction.legendFilter":F5,"interaction.legendHighlight":D5,"interaction.brushHighlight":H5,"interaction.brushXHighlight":q5,"interaction.brushYHighlight":$5,"interaction.brushAxisHighlight":nk,"interaction.brushFilter":ik,"interaction.brushXFilter":ak,"interaction.brushYFilter":ok,"interaction.sliderFilter":lk,"interaction.poptip":fk,"interaction.event":gk,"composition.spaceLayer":bk,"composition.spaceFlex":xk,"composition.mark":kk,"composition.view":wk,"composition.facetRect":Nk,"composition.repeatMatrix":Bk,"composition.facetCircle":Gk,"composition.timingKeyframe":Hk,"labelTransform.overlapHide":bO,"labelTransform.overlapDodgeY":wO,"labelTransform.overflowHide":EO,"labelTransform.contrastReverse":SO},S6)}function A6(t,e,n){for(;t<e;)t+=2*Math.PI;for(;n<t;)t-=2*Math.PI;return t}function L6(t,e,n,r,i){var a=t[0],t=t[1],o=J();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 T6(t,e,n,r,i){var a=new Cp({range:[e,e+r]}),o=new Cp({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 P6(t,e,n,r,i){return(0,t[0])(e,n,r,i)}function N6(t,e,n,r,i){return t[0]}function j6(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],t=t[3],l=new Cp({range:[s,t]}),c=new Cp({range:[a,o]}),u=1<(s=i/r)?1:s,f=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)*f)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/u,t=2*(t-.5)/f,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=A6(Math.atan2(t,e),a,o);return[c.invert(t),l.invert(n)]}}}function C6(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 R6(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return W6.apply(void 0,G6([[-1,-1]],e,!1))}function B6(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return W6.apply(void 0,G6([[-1,1]],e,!1))}function I6(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return W6.apply(void 0,G6([[1,-1]],e,!1))}function F6(t,e,n,r,i){var a,t=t[0],o=J();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 D6(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 Cp({range:[s,s+.99*l]}),f=new Cp({range:[a,o]}),h=1<(t=i/r)?1:t,d=1<t?1/t:1;return{transform:function(t){var e=t[0],t=t[1],e=f.map(e),t=u.map(t);return[.5*(Math.cos(e)*(c*e+t)*h)+.5,.5*(Math.sin(e)*(c*e+t)*d)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/h,t=2*(t-.5)/d,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=A6(Math.atan2(t,e)+Math.floor(n/l)*Math.PI*2,a,o),e=n-c*t;return[f.invert(t),u.invert(e)]}}}function z6(t,e,n,r,i){var s=t[0],l=t[1],a=t[2],t=t[3],c=new Cp({range:[a,t]});return{transform:function(t){for(var e=[],n=t.length,r=new Rp({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 W6=function(t,e,n,r,i){var a=t[0],t=t[1],o=J();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},G6=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 H6(t){return 1/Math.tan(t)}function V6(t,e,n,r,i){var a=H6(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 q6(t,e,n,r,i){var a=H6(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 Y6(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 $6(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 U6(t,e,n){return n?new Cp({range:[0,1],domain:[0,e]}).map(t):t}function K6(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=U6(a,r,void 0!==t&&t);return{transform:function(t){var e=t[0],t=t[1];return[Y6(e,s,o,0,1),t]},untransform:function(t){var e=t[0],t=t[1];return[$6(e,s,o,0,1),t]}}}function X6(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=U6(a,i,void 0!==t&&t);return{transform:function(t){return[t[0],Y6(t[1],s,o,0,1)]},untransform:function(t){return[t[0],$6(t[1],s,o,0,1)]}}}function Z6(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=t[4],c=U6(a,r,t=void 0!==t&&t),u=U6(o,i,t);return{transform:function(t){var e=t[0],t=t[1];return[Y6(e,c,s,0,1),Y6(t,u,l,0,1)]},untransform:function(t){var e=t[0],t=t[1];return[$6(e,c,s,0,1),$6(t,u,l,0,1)]}}}function Q6(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 Cp({range:[0,r]}),u=new Cp({range:[0,i]}),f=t?a:c.map(a),h=t?o:u.map(o);return{transform:function(t){var e=t[0],t=t[1],n=c.map(e)-f,r=u.map(t)-h,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=Y6(i,0,l,0,s),t=Math.atan2(r,n),i=f+e*Math.cos(t),r=h+e*Math.sin(t),[c.invert(i),u.invert(r)])},untransform:function(t){var e=t[0],t=t[1],n=c.map(e)-f,r=u.map(t)-h,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=$6(i,0,l,0,s),t=Math.atan2(r,n),i=f+e*Math.cos(t),r=h+e*Math.sin(t),[c.invert(i),u.invert(r)])}}}var J6=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))},t_=(e_.prototype.update=function(t){this.options=Id({},this.options,t),this.recoordinate()},e_.prototype.clone=function(){return new e_(this.options)},e_.prototype.getOptions=function(){return this.options},e_.prototype.clear=function(){this.update({transformations:[]})},e_.prototype.getSize=function(){var t=this.options;return[t.width,t.height]},e_.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y;return[(2*e+t.width)/2,(2*n+t.height)/2]},e_.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:J6(J6([],n,!0),[J6([],t,!0)],!1)}),this},e_.prototype.map=function(t){return this.output(t)},e_.prototype.invert=function(t){return this.input(t)},e_.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},e_.prototype.compose=function(t){for(var e=(t=void 0===t?!1:t)?J6([],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,f,h=s[o],d=h[0],h=h.slice(1),p=this.transformers[d];p&&(l=(f=this.options).x,c=f.y,u=f.width,f=f.height,p=p(J6([],h,!0),l,c,u,f),(h=p)instanceof Float32Array||h instanceof Array?r.push(p):(r.length&&(i(this.createMatrixTransform(r,t)),r.splice(0,r.length)),i(n(p)||Fd,"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):Fd}.apply(void 0,a)},e_.prototype.createMatrixTransform=function(t,e){var n,r,i,a,o,s,l,c,u,f,h,d,p=J();return e&&t.reverse(),t.forEach(function(t){return tt(p,p,t)}),e&&(e=t=p,(d=new Q(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,h=d*c+n*(u=-e*i+o*s)+r*(f=l*i-a*s))&&(t[0]=c*(h=1/h),t[1]=(-e*n+r*l)*h,t[2]=(o*n-r*a)*h,t[3]=u*h,t[4]=(e*d-r*s)*h,t[5]=(-o*d+r*i)*h,t[6]=f*h,t[7]=(-l*d+n*s)*h,t[8]=(a*d-n*i)*h),function(t){t=[t[0],t[1],1];return $t(t,t,p),[t[0],t[1]]}},e_);function e_(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:T6,translate:L6,custom:P6,matrix:N6,polar:j6,transpose:C6,scale:W6,"shear.x":V6,"shear.y":q6,reflect:R6,"reflect.x":B6,"reflect.y":I6,rotate:F6,helix:D6,parallel:z6,fisheye:Z6,"fisheye.x":K6,"fisheye.y":X6,"fisheye.circular":Q6},this.update(t)}function n_(e,n){const r=t=>{return"string"!=typeof t?t:n[t=e+"."+t]||Vu("Unknown Component: "+t)};return[t=>{var e=t["type"],t=et(t,["type"]);return r(e)(Object.assign({},t))},r]}function r_(t,e){var{coordinate:n={}}=t,t=et(t,["coordinate"]),{type:r,transform:i=[]}=n,n=et(n,["type","transform"]);if(!r)return Object.assign(Object.assign({},t),{coordinates:i});var[,e]=n_("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 i_(t,e){return t.filter(t=>t.type===e)}function a_(t){return 0<i_(t,"polar").length}function o_(t){return i_(t,"transpose").length%2==1}function s_(t){return 0<i_(t,"theta").length}function l_(t){return 0<i_(t,"radial").length}function p(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=p("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),ls=p("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),yo=p("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),xo=p("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),os=p("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),po=p("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),i=p("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),vo=p("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),fs=p("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),go=p("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function c_(t,e,n){(t.prototype=e.prototype=n).constructor=t}function u_(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function f_(){}var h_=1/.7,Vo="\\s*([+-]?\\d+)\\s*",n="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Bo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",d_=/^#([0-9a-f]{3,8})$/,p_=new RegExp(`^rgb\\(${Vo},${Vo},${Vo}\\)$`),g_=new RegExp(`^rgb\\(${Bo},${Bo},${Bo}\\)$`),y_=new RegExp(`^rgba\\(${Vo},${Vo},${Vo},${n}\\)$`),m_=new RegExp(`^rgba\\(${Bo},${Bo},${Bo},${n}\\)$`),v_=new RegExp(`^hsl\\(${n},${Bo},${Bo}\\)$`),b_=new RegExp(`^hsla\\(${n},${Bo},${Bo},${n}\\)$`),x_={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 w_(){return this.rgb().formatHex()}function k_(){return this.rgb().formatRgb()}function M_(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=d_.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?O_(e):3===n?new A_(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?__(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?__(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 A_(e[1],e[2],e[3],1):(e=g_.exec(t))?new A_(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=y_.exec(t))?__(e[1],e[2],e[3],e[4]):(e=m_.exec(t))?__(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=v_.exec(t))?C_(e[1],e[2]/100,e[3]/100,1):(e=b_.exec(t))?C_(e[1],e[2]/100,e[3]/100,e[4]):x_.hasOwnProperty(t)?O_(x_[t]):"transparent"===t?new A_(NaN,NaN,NaN,0):null}function O_(t){return new A_(t>>16&255,t>>8&255,255&t,1)}function __(t,e,n,r){return new A_(t=r<=0?e=n=NaN:t,e,n,r)}function S_(t){return(t=t instanceof f_?t:M_(t))?new A_((t=t.rgb()).r,t.g,t.b,t.opacity):new A_}function E_(t,e,n,r){return 1===arguments.length?S_(t):new A_(t,e,n,null==r?1:r)}function A_(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function L_(){return"#"+j_(this.r)+j_(this.g)+j_(this.b)}function T_(){var t=P_(this.opacity);return(1===t?"rgb(":"rgba(")+N_(this.r)+`, ${N_(this.g)}, `+N_(this.b)+(1===t?")":`, ${t})`)}function P_(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function N_(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function j_(t){return((t=N_(t))<16?"0":"")+t.toString(16)}function C_(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new B_(t,e,n,r)}function R_(t){var e,n,r,i,a,o,s,l;return t instanceof B_?new B_(t.h,t.s,t.l,t.opacity):(t=t instanceof f_?t:M_(t))?t instanceof B_?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 B_(o,s,l,t.opacity)):new B_}function B_(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function I_(t){return(t=(t||0)%360)<0?t+360:t}function F_(t){return Math.max(0,Math.min(1,t||0))}function D_(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}c_(f_,M_,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:w_,formatHex:w_,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return R_(this).formatHsl()},formatRgb:k_,toString:k_}),c_(A_,E_,u_(f_,{brighter(t){return t=null==t?h_:Math.pow(h_,t),new A_(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new A_(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new A_(N_(this.r),N_(this.g),N_(this.b),P_(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:L_,formatHex:L_,formatHex8:function(){return"#"+j_(this.r)+j_(this.g)+j_(this.b)+j_(255*(isNaN(this.opacity)?1:this.opacity))},formatRgb:T_,toString:T_})),c_(B_,function(t,e,n,r){return 1===arguments.length?R_(t):new B_(t,e,n,null==r?1:r)},u_(f_,{brighter(t){return t=null==t?h_:Math.pow(h_,t),new B_(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new B_(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 A_(D_(240<=t?t-240:120+t,n,e),D_(t,n,e),D_(t<120?240+t:t-120,n,e),this.opacity)},clamp(){return new B_(I_(this.h),F_(this.s),F_(this.l),P_(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=P_(this.opacity);return(1===t?"hsl(":"hsla(")+I_(this.h)+`, ${100*F_(this.s)}%, ${100*F_(this.l)}%`+(1===t?")":`, ${t})`)}}));const z_=Math.PI/180,W_=180/Math.PI;var G_=1.78277,H_=-.29227,V_=-.90649,q_=1.97294,Y_=q_*V_,$_=q_*G_,U_=G_*H_- -.14861*V_;function K_(t,e,n,r){return 1===arguments.length?(i=t)instanceof X_?new X_(i.h,i.s,i.l,i.opacity):(a=(i=i instanceof A_?i:S_(i)).r/255,o=i.g/255,l=i.b/255,l=(q_*(o-(a=(U_*l+Y_*a-$_*o)/(U_+Y_-$_)))-H_*(o=l-a))/V_,new X_((l=(s=Math.sqrt(l*l+o*o)/(q_*a*(1-a)))?Math.atan2(l,o)*W_-120:NaN)<0?l+360:l,s,a,i.opacity)):new X_(t,e,n,null==r?1:r);var i,a,o,s,l}function X_(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}c_(X_,K_,u_(f_,{brighter(t){return t=null==t?h_:Math.pow(h_,t),new X_(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new X_(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*z_,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),t=Math.sin(t);return new A_(255*(e+n*(-.14861*r+G_*t)),255*(e+n*(H_*r+V_*t)),255*(e+q_*r*n),this.opacity)}}));var Z_=t=>()=>t;function Q_(e,n){return function(t){return e+t*n}}function J_(a){return 1==(a=+a)?tS: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)}):Z_(isNaN(t)?e:t);var n,r,i}}function tS(t,e){var n=e-t;return n?Q_(t,n):Z_(isNaN(t)?e:t)}!function t(e){var o=J_(e);function n(e,t){var n=o((e=E_(e)).r,(t=E_(t)).r),r=o(e.g,t.g),i=o(e.b,t.b),a=tS(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);eS=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 eS,nS=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=E_(t[o]),r[o]=e.r||0,i[o]=e.g||0,a[o]=e.b||0;return r=eS(r),i=eS(i),a=eS(a),e.opacity=1,function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e+""}};function rS(s){return function t(o){function e(e,t){var n=s((e=K_(e)).h,(t=K_(t)).h),r=tS(e.s,t.s),i=tS(e.l,t.l),a=tS(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)}rS(function(t,e){var n=e-t;return n?Q_(t,180<n||n<-180?n-360*Math.round(n/360):n):Z_(isNaN(t)?e:t)});var Fo=rS(tS),mo=t=>nS(t[t.length-1]),wo=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(p),Eo=mo(wo),Lo=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(p),Po=mo(Lo),To=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(p),jo=mo(To),No=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(p),o=mo(No),zl=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(p),bo=mo(zl),us=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(p),uo=mo(us),ys=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(p),l=mo(ys),Ao=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(p),ws=mo(Ao),r=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(p),cs=mo(r),ss=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(p),ds=mo(ss),Vo=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(p),Bo=mo(Vo),n=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(p),iS=mo(n),aS=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(p),oS=mo(aS),sS=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(p),lS=mo(sS),cS=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(p),uS=mo(cS),fS=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(p),hS=mo(fS),dS=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(p),pS=mo(dS),gS=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(p),yS=mo(gS),mS=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(p),vS=mo(mS),bS=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(p),xS=mo(bS),wS=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(p),kS=mo(wS),MS=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(p),OS=mo(MS),_S=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(p),SS=mo(_S),ES=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(p),AS=mo(ES),LS=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(p),TS=mo(LS),PS=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(p),NS=mo(PS),jS=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(p),mo=mo(jS);var CS=Fo(K_(300,.5,0),K_(-240,.5,1)),RS=Fo(K_(-100,.75,.35),K_(80,1.5,.8)),Fo=Fo(K_(260,.75,.35),K_(80,1.5,.8)),BS=K_();var IS=E_(),FS=Math.PI/3,DS=2*Math.PI/3;function zS(e){var n=e.length;return function(t){return e[Math.max(0,Math.min(n-1,Math.floor(t*n)))]}}var WS=zS(p("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),GS=zS(p("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),HS=zS(p("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),VS=zS(p("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),qS=Object.freeze({__proto__:null,schemeCategory10:a,schemeAccent:ls,schemeDark2:yo,schemePaired:xo,schemePastel1:os,schemePastel2:po,schemeSet1:i,schemeSet2:vo,schemeSet3:fs,schemeTableau10:go,interpolateBrBG:Eo,schemeBrBG:wo,interpolatePRGn:Po,schemePRGn:Lo,interpolatePiYG:jo,schemePiYG:To,interpolatePuOr:o,schemePuOr:No,interpolateRdBu:bo,schemeRdBu:zl,interpolateRdGy:uo,schemeRdGy:us,interpolateRdYlBu:l,schemeRdYlBu:ys,interpolateRdYlGn:ws,schemeRdYlGn:Ao,interpolateSpectral:cs,schemeSpectral:r,interpolateBuGn:ds,schemeBuGn:ss,interpolateBuPu:Bo,schemeBuPu:Vo,interpolateGnBu:iS,schemeGnBu:n,interpolateOrRd:oS,schemeOrRd:aS,interpolatePuBuGn:lS,schemePuBuGn:sS,interpolatePuBu:uS,schemePuBu:cS,interpolatePuRd:hS,schemePuRd:fS,interpolateRdPu:pS,schemeRdPu:dS,interpolateYlGnBu:yS,schemeYlGnBu:gS,interpolateYlGn:vS,schemeYlGn:mS,interpolateYlOrBr:xS,schemeYlOrBr:bS,interpolateYlOrRd:kS,schemeYlOrRd:wS,interpolateBlues:OS,schemeBlues:MS,interpolateGreens:SS,schemeGreens:_S,interpolateGreys:AS,schemeGreys:ES,interpolatePurples:TS,schemePurples:LS,interpolateReds:NS,schemeReds:PS,interpolateOranges:mo,schemeOranges:jS,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:CS,interpolateRainbow:function(t){(t<0||1<t)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return BS.h=360*t-100,BS.s=1.5-1.5*e,BS.l=.8-.9*e,BS+""},interpolateWarm:RS,interpolateCool:Fo,interpolateSinebow:function(t){var e;return t=(.5-t)*Math.PI,IS.r=255*(e=Math.sin(t))*e,IS.g=255*(e=Math.sin(t+FS))*e,IS.b=255*(e=Math.sin(t+DS))*e,IS+""},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:WS,interpolateMagma:GS,interpolateInferno:HS,interpolatePlasma:VS});function YS(t,e,n,r,i,a){var o,{guide:s={}}=n,l=function(t,e,n){var{type:n,domain:r,range:i}=n;return void 0!==n?n:function(t){return rE(t,Ku)}(e)?"identity":"string"==typeof i?"linear":2<(r||i||[]).length?QS(t):void 0===r?eE(e)?QS(t):nE(e)?"time":JS(t,i):eE([r])?QS(t):nE(e)?"time":JS(t,i)}(t,e,n);return"string"!=typeof l?n:(o=function(t,e,n){var r=n["domain"];if(void 0!==r)return r;var{domainMax:i,domainMin:a}=n;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":var[o,s]=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)Yu(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);return[a||o,i||s];case"band":case"ordinal":case"point":return tE(e);case"quantile":return function(t){return tE(t).sort()}(e);case"sequential":var[o,s]=function(t){let e=1/0,n=-1/0;for(const r of t)for(const i of r)Yu(i)&&(e=Math.min(e,+i),n=Math.max(n,+i));return e===1/0?[]:[e<0?-n:e,n]}(e);return[a||o,i||s];default:return[]}}(l,e,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=up,nice:n=!1,tickCount:r=10}=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:s_(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=Ze(e),i=qS["interpolate"+r];if(i)return{interpolator:n?t=>i(n(t)):i};throw new Error("Unknown palette: "+r)}(n);default:return n}}(l,t,n,r)),{domain:o,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=ZS(n,r,i,a,o),[u,f]=function(t,e){return"enterDelay"===t?[0,1e3]:"enterDuration"==t?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:"color"===t?[e[0],function(t){return t[t.length-1]}(e)]:"opacity"!==t&&"size"===t?[1,10]:[0,1]}(e,u);return[l||u,c||f];case"band":case"point":return[l||0,c||1];case"ordinal":return ZS(n,r,i,a,o);case"sequential":return;case"constant":return[n[0][0]];default:return[]}}(l,t,e,n,o,i,a),guide:s,name:t,type:l}))}function $S(t,e){var[e]=n_("scale",e),n=t["relations"],[n]=function(o){if(!o||!Array.isArray(o))return[Gu,Gu];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 US(t,n){var t=t.filter(({name:t,facet:e=!0})=>e&&t===n),e=t.flatMap(t=>t.domain),r=t.every(KS)?mc(e):t.every(XS)?Array.from(new Set(e)):null;if(null!==r)for(const i of t)i.domain=r}function KS(t){t=t.type;return"string"==typeof t&&["linear","log","pow","time"].includes(t)}function XS(t){t=t.type;return"string"==typeof t&&["band","point","ordinal"].includes(t)}function ZS(t,e,n,r,i){var[i]=n_("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=Ze(t),i=qS["scheme"+e],a=qS["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 QS(t){return(t=t).startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")?"point":"ordinal"}function JS(t,e){return"color"!==t||e?"linear":"sequential"}function tE(t){return Array.from(new Set(t.flat()))}function eE(t){return rE(t,t=>{t=typeof t;return"string"==t||"boolean"==t})}function nE(t){return rE(t,t=>t instanceof Date)}function rE(t,e){for(const n of t)if(n.some(e))return!0;return!1}const iE={linear:"linear",identity:"identity",log:"log",pow:"pow",sqrt:"sqrt",sequential:"sequential"},aE={threshold:"threshold",quantize:"quantize",quantile:"quantile"},oE={ordinal:"ordinal",band:"band",point:"point"},sE={constant:"constant"};function lE(t,e,n){const{component:r=[],coordinates:d=[],title:i}=e,[,p]=n_("component",n),g=t.filter(({guide:t})=>null!==t);var a,e=function(t,e,n){const[,o]=n_("component",n),s=t["coordinates"];function i(t,e,n,r){[e,t,i=[]]=[e,t,s];var i,a,e="x"===e?o_(i)?t+"Y":t+"X":"y"===e?o_(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 y=[...r,...e];return i&&(t=p("title")["props"],{defaultPosition:n,defaultOrientation:e,defaultOrder:t,defaultSize:a}=t,y.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(kc(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[];const l=(t,e)=>{t=u0(t);return t.forEach(t=>t.unshift(e)),t.push([e]),t.sort((t,e)=>e.length-t.length)},s=[["legendCategory",(()=>{var t=[["shape","discrete"],["shape","constant"]],e=[["size","constant"]],n=[["opacity","discrete"],["opacity","constant"]],r=[];for(const i of[["color","discrete"],["color","constant"]])for(const a of t)for(const o of e)for(const s of n)[i,a,o,s].every(t=>"constant"===t[1])||r.push(...l([a,o,s],i));return r.sort((t,e)=>e.length-t.length)})()],["legendContinuousSize",[[["color","continuous"],["opacity","continuous"],["size","continuous"]],[["color","constant"],["opacity","continuous"],["size","continuous"]],[["color","continuous"],["size","continuous"]],[["color","constant"],["size","continuous"]]]],["legendContinuousBlockSize",[[["color","distribution"],["opacity","distribution"],["size","distribution"]],[["color","distribution"],["size","distribution"]]]],["legendContinuousBlock",l([["opacity","continuous"]],["color","distribution"])],["legendContinuous",l([["opacity","continuous"]],["color","continuous"])]];t=Array.from(i).map(([,t])=>{var e,n,r=u0(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 iE?"continuous":t in oE?"discrete":t in aE?"distribution":t in sE?"constant":null]})}));const i=t=>t.sort((t,e)=>t[0].localeCompare(e[0]));for([e,n]of s)for(const{option:a,combination:o}of r)if(n.some(t=>un(i(t),i(a))))return[e,o];return null}).filter(Yu);return t}(t),...function(t,n){return t.map(t=>{var e=t["name"];if(!(0<i_(n,"helix").length||s_(n))&&(!o_(n)||!a_(n)&&!l_(n))){if(e.startsWith("x"))return a_(n)?["axisArc",[t]]:l_(n)?["axisLinear",[t]]:[o_(n)?"axisY":"axisX",[t]];if(e.startsWith("y"))return a_(n)?["axisLinear",[t]]:l_(n)?["axisArc",[t]]:[o_(n)?"axisX":"axisY",[t]];if(e.startsWith("position")){if(0<i_(n,"radar").length)return["axisRadar",[t]];if(!a_(n))return["axisY",[t]]}}return null}).filter(Yu)}(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 h of Array.isArray(n)?n:[n]){var l,c,[u,f]=function(t,e,n,r,i,a,o){var[s]=uE(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=fE(n),n===r.slice(-1)[0].name||null===a?[null,null]:([o,s]=uE(i),["center",(s-o)/(r.length-1)*a+o])}{var s;if("axisY"===t&&function(t){return 0<i_(t,"parallel").length}(i))return null===(s=fE(n))?e:o_(i)?0===s?["top",null]:["center","horizontal"]:0===s?e:["center","vertical"]}if("axisLinear"===t)return[r]=uE(i),["center",r];if("axisArc"===t)return"inner"===e[0]?["inner",null]:["outer",null];if(a_(i))return["center",null];if(l_(i))return["center",null];if("axisX"===t&&function(t){return 0<i_(t,"reflect").length}(i)||"axisX"===t&&function(t){return 0<i_(t,"reflectY").length}(i))return["top",null];return e}(t,e,i,a,o);if("string"==typeof t&&t.startsWith("legend")&&a_(o)&&"center"===r.position)return["center","vertical"];return e}(t,r,i,h,e,g,d);(u||f)&&({size:l=a,order:c=o}=h,y.push(Object.assign(Object.assign({title:s},h),{position:u,orientation:f,order:c,size:l,type:t,scales:e})))}}),y}function cE(t,e,n,r,i){var[a]=n_("component",r),{scales:o=[],bbox:s}=t,t=et(t,["scales","bbox"]),l=o.map(t=>$S(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 uE(t){var e,n=i_(t,"polar");return n.length?(n=n[n.length-1],{startAngle:n,endAngle:e}=Ns(n),[n,e]):(n=i_(t,"radial")).length?(e=n[n.length-1],{startAngle:t,endAngle:n}=Is(e),[t,n]):[-Math.PI/2,Math.PI/2*3]}function fE(t){t=/position(\d*)/g.exec(t);return t?+t[1]:null}function hE(t,e){var t=function(t,e){var n=kc(t,t=>t.position),{padding:t,paddingLeft:e=t,paddingRight:r=t,paddingBottom:i=t,paddingTop:t=t}=e,a={paddingBottom:i,paddingLeft:e,paddingTop:t,paddingRight:r};for(const l of["left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]){var o="padding"+Hu(l);if(void 0===a[o])if(n.has(l)){const t=n.get(l);var s=t.reduce((t,{size:e})=>t+e,0);a[o]=s}else a[o]=30}return a}(t,e),{paddingLeft:n,paddingRight:r,paddingTop:i,paddingBottom:a}=t,{width:e,height:o,x:s=0,y:l=0,inset:c=0,insetLeft:u=c,insetTop:f=c,insetBottom:h=c,insetRight:c=c,margin:d=0,marginLeft:p=d,marginBottom:g=d,marginTop:y=d,marginRight:d=d}=e;return Object.assign(Object.assign({},t),{width:e,height:o,insetLeft:u,insetTop:f,insetBottom:h,insetRight:c,innerWidth:e-n-r-p-d,innerHeight:o-i-a-y-g,marginLeft:p,marginBottom:g,marginTop:y,marginRight:d,x:s,y:l})}function dE(t,B,e){var I=kc(t,t=>t.position),{paddingLeft:t,paddingRight:e,paddingTop:n,paddingBottom:F,marginLeft:r,marginTop:i,marginBottom:D,marginRight:z,innerHeight:a,innerWidth:o,height:s,width:W}=e,t=t+r,r=n+i,n=e+z,i=F+D,G={top:[t,0,o,r,"vertical",!0,lc],right:[W-n,r,n,a,"horizontal",!1,lc],bottom:[t,s-i,o,i,"vertical",!1,lc],left:[0,r,t,a,"horizontal",!0,lc],"top-left":[t,0,o,r,"vertical",!0,lc],"top-right":[t,0,o,r,"vertical",!0,lc],"bottom-left":[t,s-i,o,i,"vertical",!1,lc],"bottom-right":[t,s-i,o,i,"vertical",!1,lc],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[C,t]of I.entries()){var l=G[C],[c,H]=l0(t,t=>"string"==typeof t.type&&("center"===C||!(!t.type.startsWith("axis")||!["inner","outer"].includes(C))));if(c.length){p=d=h=f=u=void 0;var u=c,f=B,h=l,d=C,[u,p]=l0(u,t=>!("string"!=typeof t.type||!t.type.startsWith("axis"))),c=(m=y=g=c=void 0,u),g=f,y=h,m=d;if("center"===m)if(!function(t){return eu(t)&&Qc(t)}(g)){if(Qc(g)){u=void 0;d=void 0;v=void 0;b=void 0;x=void 0;w=void 0;u=c;d=y;var[v,b,x,w]=d;for(const tt of u)tt.bbox={x:v,y:b,width:x,height:w}}else if(eu(g)){d=void 0;u=void 0;k=void 0;M=void 0;d=c;u=g;var k=y;var M=c[0].orientation;"horizontal"===M?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,k):"vertical"===M&&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,k)}}else{O=void 0;M=void 0;_=void 0;S=void 0;E=void 0;A=void 0;var O=c;M=y;var[_,S,E,A]=M;for(const R of O)R.bbox={x:_,y:S,width:E,height:A},R.radar={index:O.indexOf(R),count:O.length}}else if("inner"===m){L=void 0;d=void 0;u=void 0;V=void 0;q=void 0;k=void 0;T=void 0;P=void 0;Y=void 0;$=void 0;var L=c;d=g;u=y;var[V,q,,u]=u,[k,T]=d.getCenter(),[d]=iu(d),u=u/2,P=d*u,Y=k-P,$=T-P;for(let t=0;t<L.length;t++)L[t].bbox={x:V+Y,y:q+$,width:2*P,height:2*P}}else if("outer"===m){g=void 0;d=void 0;U=void 0;K=void 0;X=void 0;Z=void 0;g=c;d=y;var[U,K,X,Z]=d;for(const et of g)et.bbox={x:U,y:K,width:X,height:Z}}J=Q=j=y=c=m=T=u=N=void 0;var N=p,u=f,T=h;if(0!==N.length){var[T,m,c,y]=T,[u]=iu(u),j=y/2*u/Math.sqrt(2),Q=T+c/2,J=m+y/2;for(let t=0;t<N.length;t++)N[t].bbox={x:Q-j,y:J-j,width:2*j,height:2*j}}}H.length&&!function(n,t){const[e,r,i,a,o,s,l]=t,[c,u,f,h,d,p,g,y]="vertical"===o?["y",r,"x",e,"height",a,"width",i]:["x",e,"y",r,"width",i,"height",a],m=(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=m;t<n.length;t++){var v=n[t],b=v["size"];v.bbox={[c]:s?e-b:e,[f]:h,[d]:b,[g]:y},e+=b*(s?-1:1)}}(t,l)}}function pE(t,e,n){var{encode:r={},scale:i={},transform:a=[]}=e,e=et(e,["encode","scale","transform"]);return[t,Object.assign(Object.assign({},e),{encode:r,scale:i,transform:a})]}function gE(t,i,a){return ce(this,void 0,void 0,function*(){var t=a["library"],e=i["data"],[t]=n_("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=et(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)}),Gu)}([et(n,["transform"]),...r].map(t))(e);return[Array.isArray(n)?s0(n):[],Object.assign(Object.assign({},i),{data:n})]})}function yE(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 mE(t,e,n){const{encode:r,data:i}=e;var a;return r?(a=o0(r,t=>{var e,n;return function(t){if("object"!=typeof t||t instanceof Date||null===t)return;t=t.type;return Yu(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 vE(t,e,n){var r=e["encode"];return r?(r=o0(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 bE(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];n=n.library;const a=function(t){const[n]=n_("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=o0(r,t=>a(i,t));return[t,Object.assign(Object.assign({},e),{encode:n})]}function xE(t,e,n){var{tooltip:r={}}=e;return Xu(r)?[t,e]:Array.isArray(r)?[t,Object.assign(Object.assign({},e),{tooltip:{items:r}})]:Ku(r)&&Ju(r)?[t,Object.assign(Object.assign({},e),{tooltip:r})]:[t,Object.assign(Object.assign({},e),{tooltip:{items:[r]}})]}function wE(g,t,e){const{data:y,encode:m,tooltip:n={}}=t;var r,i,a,o;return Xu(n)?[g,t]:(r=e=>{if(!e)return e;if("string"==typeof e)return g.map(t=>({name:e,value:y[t][e]}));if(Ku(e)){var{field:t,channel:n,color:r,name:i=t,valueFormatter:a=t=>t}=e,o="string"==typeof a?_x(a):a,s=n&&m[n],a=s&&m[n].field,l=i||a||n,c=[];for(const d of g){var u=t?y[d][t]:s?m[n].value[d]:null;u&&(c[d]={name:l,color:r,value:o(u)})}return c}if("function"!=typeof e)return e;var f=[];for(const p of g){var h=e(y[p],p,y,m);Ku(h)?f[p]=h:f[p]={value:h}}return f},{title:o,items:i=[]}=n,a=et(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 kE(l,t,e){var n,r=t["encode"],i=et(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=et(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 ME(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 nt(e,{scale:Object.assign(Object.assign({},Object.fromEntries(l.map(t=>[t,{guide:s(r,t),slider:s(a,t),scrollbar:s(o,t)}]))),{color:{guide:s(i,"color")},size:{guide:s(i,"size")},shape:{guide:s(i,"shape")}})}),[t,e]}function OE(t,e,n){var r=e["animate"];return r||void 0===r||nt(e,{animate:{enter:{type:null},exit:{type:null},update:{type:null}}}),[t,e]}function _E(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]=n_("transform",t),{preInference:e=[],postInference:n=[]}=l,{transform:r=[]}=s,e=[pE,gE,yE,mE,vE,bE,kE,OE,ME,xE,...e.map(t),...r.map(t),...n.map(t),wE];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:h,data:r,tooltip:i}=e;if(!1===Array.isArray(r))return null;const a=c["channels"],o=Oc(Object.entries(n).filter(([,t])=>Yu(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:f}=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=h[t]||{},{independent:o=!1,key:s=u||t,type:i=i?"constant":r?"identity":c}=a,r=et(a,["independent","key","type"]),a="constant"===i,l=a?void 0:f;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 SE(F,D,z,W){var G;return ce(this,void 0,void 0,function*(){const[n]=n_("composition",z);var[t]=n_("interaction",z);const r=new Set(Object.keys(z).map(t=>{return null==(t=/mark\.(.*)/.exec(t))?void 0:t[1]}).filter(Yu)),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=[F],u=[];c.length;){var f=c.shift();if(a(f)){var h=l.get(f),[h,d]=h?TE(h,f,z):yield AE(f,z),p=(s.set(h,f),o.push(h),d.flatMap(e).map(t=>r_(t,z)));if(c.push(...p),p.every(a)){var g=yield Promise.all(p.map(t=>LE(t,z)));US(h=(h=g).flatMap(t=>Array.from(t.values())).flatMap(t=>t.channels.map(t=>t.scale)),"x"),US(h,"y");for(let t=0;t<p.length;t++){var y=p[t],m=g[t];l.set(y,m)}}}else{d="mark"===i(f)?f:yield FE(f,z),h=e(d);Array.isArray(h)?c.push(...h):"function"==typeof h&&u.push(h())}}W.emitter.emit(hk.BEFORE_PAINT);const v=new Map,b=new Map,x=[];D.selectAll(GE(H)).data(o,t=>t.key).join(t=>t.append("g").attr("className",H).attr("id",t=>t.key).call(EE).each(function(t){PE(t,it(this),x,z),v.set(t,this)}),t=>t.call(EE).each(function(t){PE(t,it(this),x,z),b.set(t,this)}),t=>t.each(function(){for(const t of this.nameInteraction.values())t.destroy()}).remove());var w=t=>Array.from(t.entries()).map(([t,e])=>({view:t,container:e,options:s.get(t),update:function(h,d,p){return f=>ce(this,void 0,void 0,function*(){var t,[e,n]=yield AE(f,d),r=(PE(e,h,[],d),h),i=f,a=e,o=p,[s]=n_("interaction",s=d),l=(l=r.node()).nameInteraction,c=IE(c=i["interaction"]).find(t=>"tooltip"===t.type);(l=l.get("tooltip"))&&(null!=(t=l.destroy)&&t.call(l),t=s(c),l={options:i,view:a,container:r.node(),update:t=>Promise.resolve(t)},t(l,[],o.emitter));for(const u of n)SE(u,h,d,p);return{options:f,view:e}})}(it(e),z,W)})),k=w(v);for(const T of k){const F=T["options"];var M=new Map;T.container.nameInteraction=M;for(const P of IE(F)){var O=t(P)(T,k,W.emitter);M.set(P.type,{destroy:O})}}var _=w(b);for(const N of _){const{options:F,container:j}=N;var S=j.nameInteraction;for(const C of IE(F)){var E=S.get(C.type);E&&null!=(G=E.destroy)&&G.call(E);E=t(C)(N,_,W.emitter);S.set(F.type,{destroy:E})}}const{width:A,height:B}=F;var L=[];for(const R of u){var I=new Promise(e=>ce(this,void 0,void 0,function*(){for(const t of R)yield SE(Object.assign({width:A,height:B},t),D,z,W);e()}));L.push(I)}W.views=o,W.animations=x,W.emitter.emit(hk.AFTER_PAINT);w=x.filter(Yu).map(RE).map(t=>t.finished);return Promise.all([...w,...L])})}function EE(t){t.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function AE(e,n){return ce(this,void 0,void 0,function*(){var t=function(t){var{coordinate:e={},interaction:n={},marks:r}=t,t=et(t,["coordinate","interaction","marks"]),i=r.map(t=>t.coordinate||{}),a=r.map(t=>t.interaction||{}),i=[...i,e].reduceRight((t,e)=>nt(t,e),{}),e=[n,...a].reduce((t,e)=>nt(t,e),{});return Object.assign(Object.assign({},t),{marks:r,coordinate:i,interaction:e})}(yield function(c,u){return ce(this,void 0,void 0,function*(){var[t,e]=n_("mark",u);const n=c["marks"];for(var r=[],i=[...n];i.length;){var[a]=i.splice(0,1),a=yield FE(a,u);const{type:s=Vu("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,r_(t,n));return TE(yield LE(t,n),t,n)})}function LE(p,g){return ce(this,void 0,void 0,function*(){var[t]=n_("theme",g),[,e]=n_("mark",g),{theme:n,marks:r,coordinates:i=[]}=p,a=t(BE(n)),o=new Map;for(const f of r){var s,l=f["type"],{props:l={}}=e(l),l=yield _E(f,l,g);l&&([l,s]=l,o.set(l,s))}for(const h of kc(Array.from(o.values()).flatMap(t=>t.channels),({scaleKey:t})=>t).values()){var c=h.reduce((t,{scale:e})=>nt(t,e),{}),u=h[0]["values"],u=Array.from(new Set(u.map(t=>t.field).filter(Yu)));const p=nt({guide:{title:0===u.length?void 0:u},field:u[0]},c);u=h[0]["name"];const d=YS(u,h.flatMap(({values:t})=>t.map(t=>t.value)),p,i,a,g);h.forEach(t=>t.scale=d)}return o})}function TE(t,e,n){var[r]=n_("mark",n),[i]=n_("theme",n),[a]=n_("labelTransform",n);const{key:o,frame:s=!1,theme:l,clip:c,style:u={},labelTransform:f=[]}=e;var h,d,i=i(BE(l)),p=Array.from(t.values()),g=Array.from(new Set(p.flatMap(t=>t.channels.map(t=>t.scale)))),g=lE(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),y=hE(g,e),m=function(t,e,n){var[n]=n_("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 t_(Object.assign(Object.assign({},t),{x:a+c,y:o+u,width:i-a-s,height:r-l-o,transformations:e.map(n).flat()}))}(y,e,n),p=s?nt({mainLineWidth:1,mainStroke:"#000"},u):u,v=(dE(g,m,y),{}),b=[];for([h,d]of t.entries()){const{children:k,dataDomain:M,modifier:O,key:_}=h,{index:S,channels:E,tooltip:A}=d;var x=o0(Object.fromEntries(E.map(({name:t,scale:e})=>[t,e])),t=>$S(t,n));Object.assign(v,x);const L=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}(E,x),[T,P,N]=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])=>Yu(t)&&Yu(e))&&(r.push(a),i.push(o))}return[r,i]}(r(h)(S,x,L,m));var w=M||T.length;const j=O?O(P,w,y):[],C=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=T.map((t,e)=>{var n=Object.assign({points:P[e],transform:j[e],index:t,markKey:_,viewKey:o},A&&{title:C(t),items:R(t)});for(const[r,i]of Object.entries(L))n[r]=i[t],N&&(n["series"+Ze(r)]=N[e].map(t=>i[t]));return N&&(n.seriesIndex=N[e]),N&&A&&(n.seriesItems=N[e].map(t=>R(t)),n.seriesTitle=N[e].map(t=>C(t))),n}),w=(d.data=w,d.index=T,null==k?void 0:k(w,x,y));b.push(...w||[])}return[{layout:y,theme:i,coordinate:m,components:g,markState:t,key:o,clip:c,scale:v,style:p,labelTransform:NE(f.map(a))},b]}function PE(Z,Q,J,tt){ce(this,void 0,void 0,function*(){const{components:B,theme:n,layout:t,markState:r,coordinate:i,key:e,style:I,clip:a}=Z,{width:F,height:D}=t,z=et(t,["x","y","width","height"]),o=["view","plot","main","content"];var s=o.map((t,e)=>e);const l=o.map(t=>$u(Object.assign({},n,I),t)),W=["a","margin","padding","inset"].map(t=>rt(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=it(this),t=l[t];for([e,n]of Object.entries(t))r.style(e,n)});let u=0,f=0,h=F,d=D;const p=s.map(t=>{var{left:t=0,top:e=0,bottom:n=0,right:r=0}=W[t];return u+=t,f+=e,h-=t+r,d-=e+n,{x:u,y:f,width:h,height:d}}),g=(Q.selectAll(GE(ut)).data(s.filter(t=>Yu(l[t])),t=>o[t]).join(t=>t.append("rect").attr("className",ut).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:f=300,delay:h=0}=r,{type:d,duration:p=300,delay:g=0}=o;for(const _ of i){var{updateType:y=s,updateDuration:m=l,updateDelay:v=c,enterType:b=u,enterDuration:x=f,enterDelay:w=h,exitDuration:k=p,exitDelay:M=g,exitType:O=d}=_;void 0!==y&&!y||(e=Math.max(e,m+v),n=Math.min(n,v)),void 0!==O&&!O||(e=Math.max(e,k+M),n=Math.min(n,M)),void 0!==b&&!b||(e=Math.max(e,x+w),n=Math.min(n,w))}}return e===-1/0?null:[n,e-n]}(r)),y=!!g&&{duration:g[1]};var m,v,b,s=Q.selectAll(GE(lt)).data(B,(t,e)=>t.type+"-"+e).join(t=>t.append("g").style("zIndex",({zIndex:t})=>t||-1).attr("className",lt).append(t=>cE(nt({animate:y},t),i,n,tt,r)),t=>t.transition(function(t){var{preserve:e=!1}=t;if(!e)return e=cE(nt({animate:y},t),i,n,tt,r)["attributes"],[t]=this.childNodes,t.update(e)})).transitions();J.push(...s.flat().filter(Yu));const x=Q.selectAll(GE(st)).data([t],()=>e).join(t=>t.append("rect").style("zIndex",0).style("fill","transparent").attr("className",st).call(DE).call(WE,Array.from(r.keys())).call(HE,a),t=>t.call(WE,Array.from(r.keys())).call(t=>{if(!g)return DE(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(HE,a)).transitions();J.push(...x.flat());for([m,v]of r.entries()){var G=v["data"];const{key:e,class:H,type:A}=m;var w=Q.select("#"+e);const L=function(l,t,e,n){const[c]=n_("shape",n),u=l["data"],{defaultShape:f,data:r}=t,h=r.map(t=>t.points),{theme:d,coordinate:p}=e,{type:g,style:y={}}=l;return(t,e)=>{var{shape:n=f}=y,{shape:n=n,points:r,seriesIndex:i,index:a}=t,t=et(t,["shape","points","seriesIndex","index"]),t=Object.assign(Object.assign({},t),{shape:n,mark:g,defaultShape:f,index:e});const o=i?i.map(t=>u[t]):u[a],s=i||a;e=o0(y,t=>jE(t,o,s,u));return c(Object.assign(Object.assign({},e),{type:zE(l,n)}))(r,t,p,d,h)}}(m,v,Z,tt),V=(k=m,b=v,CE("enter",k,b,Z,tt)),T=(k=m,b=v,CE("update",k,b,Z,tt)),q=(k=m,b=v,CE("exit",k,b,Z,tt));var k=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,H,"element");const x=w.selectAll(GE(ot)).selectFacetAll(k).data(G,t=>t.key,t=>t.groupKey).join(t=>t.append(L).attr("className",ot).attr("markType",A).transition(function(t){return V(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=L(t,e),s=T(t,[this],[o]);return null===s&&qu(this,o),s})}),t=>t.each(function(){this.__removed__=!0}).transition(function(t){return q(t,[this])}).remove(),t=>t.append(L).attr("className",ot).attr("markType",A).transition(function(t){var e=this["__fromElements__"],t=T(t,e,[this]);return new E0(e,null,this.parentNode).transition(t).remove(),t}),t=>t.transition(function(t){var e=new E0([],this.__toData__,this.parentNode).append(L).attr("className",ot).attr("markType",A).nodes();return T(t,[this],e)}).remove()).transitions();J.push(...x.flat())}{var M=Z,O=Q,_=tt,S,E;const[Y]=n_("labelTransform",_),{markState:$,labelTransform:P}=M,U=O.select(GE(at)).node(),N=new Map,j=new Map,K=Array.from($.entries()).flatMap(([t,e])=>{var{labels:n=[],key:r}=t;const i=function(t,e,n,r){const[s]=n_("shape",r),l=t["data"],{data:i,defaultLabelShape:c}=e,u=i.map(t=>t.points),{theme:f,coordinate:h}=n;return t=>{const{index:e,points:n}=t,r=l[e];var{formatter:i=t=>""+t,style:a}=t,t=et(t,["formatter","transform","style"]),t=o0(Object.assign(Object.assign({},t),a),t=>jE(t,r,e,l)),{shape:a=c,text:o}=t,t=et(t,["shape","text"]),i="string"==typeof i?_x(i):i,i=Object.assign(Object.assign({},t),{text:i(o)});return s(Object.assign({type:"label."+a},t))(n,i,h,f,u)}}(t,e,M,_),a=O.select("#"+r).selectAll(GE(ot)).nodes().filter(t=>!t.__removed__);return n.flatMap((e,n)=>{const r=et(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.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=>{N.set(t,i),j.set(t,e)}),t})})}),C=it(U).selectAll(GE(ct)).data(K,t=>t.key).join(t=>t.append(t=>N.get(t)(t)).attr("className",ct),t=>t.each(function(t){qu(this,N.get(t)(t))}),t=>t.remove()).nodes(),X=kc(C,t=>j.get(t.__data__)),R=M["coordinate"];for([S,E]of X){var{transform:S=[]}=S;NE(S.map(Y))(E,R)}P&&P(C,R)}})}function NE(r){return(t,e)=>{for(const n of r)t=n(t,e);return t}}function jE(t,e,n,r){return"function"==typeof t?t(e,n,r):"string"==typeof t&&void 0!==e[t]?e[t]:t}function CE(o,t,e,n,r){var[,i]=n_("shape",r);const[s]=n_("animation",r);r=e.defaultShape;const{theme:a,coordinate:l}=n;e=`default${Ze(o)}Animation`;const{[e]:c}=i(zE(t,r)).props,{[o]:u={}}=a,f=(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},f);return t.type?(t=s(t)(e,n,{delay:r,duration:i,easing:a},l,u),Array.isArray(t)?t:[t]):null}}function RE(t){return t.finished.then(()=>{t.cancel()}),t}function BE(t={}){var e;return"string"==typeof t?{type:t}:({type:e="classic"}=t,t=et(t,["type"]),Object.assign(Object.assign({},t),{type:e}))}function IE(t){var{interaction:t={}}=t;return Object.entries(nt({event:!0,tooltip:!0,sliderFilter:!0,legendFilter:!0},t)).filter(t=>!!t[1]).map(([t,e])=>Object.assign({type:t},e))}function FE(r,i){return ce(this,void 0,void 0,function*(){var t={library:i},e=r["data"],n=et(r,["data"]);return null==e?r:([,{data:e}]=yield gE(0,{data:e},t),Object.assign({data:e},n))})}function DE(t){t.style("x",t=>t.paddingLeft).style("y",t=>t.paddingTop).style("width",t=>t.innerWidth).style("height",t=>t.innerHeight)}function zE(t,e){t=t.type;return"string"==typeof e?t+"."+e:e}function WE(t,e){const n=t=>void 0!==t.class?""+t.class:"";0===t.nodes().length||(t.selectAll(GE(N)).data(e,t=>t.key).join(t=>t.append("g").attr("className",N).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(GE(at)).node())||t.append("g").attr("className",at).style("zIndex",0)}function GE(...t){return t.map(t=>"."+t).join("")}function HE(t,i){t.node()&&t.style("clipPath",t=>{var e,n,r;return i?({paddingTop:t,paddingLeft:e,innerWidth:n,innerHeight:r}=t,new X.Rect({style:{x:e,y:t,width:n,height:r}})):null})}function VE(t){for(var t=nt({},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=s[t];e.set(l,o),n.set(l,t),r.push(l)}}return t}function qE(t,e={},n,r){const{width:i=640,height:a=480,theme:o}=t,s=(o||Vu('ChartOptions.theme is required, such as `const chart = new Chart({ theme: "classic"})`.'),VE(t)),{canvas:l=(t=i,f=a,h=new S.Renderer,h.registerPlugin(new As),new X.Canvas({width:t,height:f,container:document.createElement("div"),renderer:h})),library:c=E6(),emitter:u=new Ls}=e;var f,h;e.canvas=l,e.library=c,e.emitter=u,l.resize(i,a),u.emit(hk.BEFORE_RENDER);const d=it(l.document.documentElement);return l.ready.then(()=>SE(Object.assign(Object.assign({},s),{width:i,height:a}),d,c,e)).then(()=>{l.requestAnimationFrame(()=>{u.emit(hk.AFTER_RENDER),null!=n&&n()})}).catch(t=>{null!=r&&r(t)}),"string"==typeof(t=l.getConfig().container)?document.getElementById(t):t}function YE(t,e={},n=!1){var r,{canvas:e,emitter:i}=e;e&&(null!=(r=(r=e).getRoot().querySelectorAll("."+H))&&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 $E(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):this.attr(n,t)}}function UE(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 KE(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 g(r){return t=>{for(const n of r){var e=n["type"];"value"===e?$E(t,n):"array"===e?UE(t,n):"object"===e?KE(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}):Ku(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 XE(t){return Object.entries(t).map(([t,e])=>({type:"node",name:t,ctor:e}))}function ZE(t,e){for(var n=[t];n.length;){var r=n.pop(),r=(e&&e(r),r.children||[]);for(const i of r)n.push(i)}}class QE{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=[],t.parentNode=this,t.index=this.children.length,this.children.push(t),t}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 ZE(this,t=>{e===t.attr("key")&&(n=t)}),n}getNodesByType(e){const n=[];return ZE(this,t=>{e===t.type&&n.push(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 JE extends QE{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 t8=class extends JE{constructor(){super({})}},e8=(t8=e([g(a)],t8),class extends JE{constructor(){super({},"interval")}}),n8=(e8=e([g(a)],e8),class extends JE{constructor(){super({},"rect")}}),r8=(n8=e([g(a)],n8),class extends JE{constructor(){super({},"point")}}),i8=(r8=e([g(a)],r8),class extends JE{constructor(){super({},"area")}}),a8=(i8=e([g(a)],i8),class extends JE{constructor(){super({},"line")}}),o8=(a8=e([g(a)],a8),class extends JE{constructor(){super({},"cell")}}),s8=(o8=e([g(a)],o8),class extends JE{constructor(){super({},"vector")}}),l8=(s8=e([g(a)],s8),class extends JE{constructor(){super({},"link")}}),c8=(l8=e([g(a)],l8),class extends JE{constructor(){super({},"polygon")}});c8=e([g(a)],c8);ls=e([g(a)],class extends JE{constructor(){super({},"image")}});let u8=class extends JE{constructor(){super({},"text")}},f8=(u8=e([g(a)],u8),class extends JE{constructor(){super({},"box")}}),h8=(f8=e([g(a)],f8),class extends JE{constructor(){super({},"lineX")}}),d8=(h8=e([g(a)],h8),class extends JE{constructor(){super({},"lineY")}}),p8=(d8=e([g(a)],d8),class extends JE{constructor(){super({},"range")}}),g8=(p8=e([g(a)],p8),class extends JE{constructor(){super({},"rangeX")}}),y8=(g8=e([g(a)],g8),class extends JE{constructor(){super({},"rangeY")}}),m8=(y8=e([g(a)],y8),class extends JE{constructor(){super({},"connector")}}),v8=(m8=e([g(a)],m8),class extends JE{constructor(){super({},"shape")}}),b8=(v8=e([g(a)],v8),class extends JE{constructor(){super({},"sankey")}}),x8=(b8=e([g([...a,{name:"layout",type:"value"}])],b8),class extends JE{constructor(){super({},"treemap")}}),w8=(x8=e([g([...a,{name:"layout",type:"value"}])],x8),class extends JE{constructor(){super({},"boxplot")}}),k8=(w8=e([g(a)],w8),class extends JE{constructor(){super({},"pack")}}),M8=(k8=e([g([...a,{name:"layout",type:"value"}])],k8),class extends JE{constructor(){super({},"forceGraph")}}),O8=(M8=e([g([...a,{name:"layout",type:"value"}])],M8),class extends JE{constructor(){super({},"tree")}}),_8=(O8=e([g([...a,{name:"layout",type:"value"}])],O8),class extends JE{constructor(){super({},"wordCloud")}}),S8=(_8=e([g([...a,{name:"layout",type:"object"}])],_8),class extends JE{constructor(){super({},"gauge")}});S8=e([g(a)],S8);yo={mark:t8,interval:e8,rect:n8,point:r8,area:i8,line:a8,cell:o8,vector:s8,link:l8,polygon:c8,image:ls,text:u8,box:f8,lineX:h8,lineY:d8,range:p8,rangeX:g8,rangeY:y8,connector:m8,sankey:b8,treemap:x8,boxplot:w8,shape:v8,pack:k8,forceGraph:M8,tree:O8,wordCloud:_8,gauge:S8};class E8 extends QE{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.attr("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.attr("key");if(t)return this.getRoot().getContext().canvas.getRoot().getElementById(t)}show(){var t=this.getGroup();t&&!t.isVisible()&&zw(t)}hide(){var t=this.getGroup();t&&t.isVisible()&&Dw(t)}}let A8=class extends E8{constructor(t={},e="view"){super(t,e)}},L8=(A8=e([g([{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"},...XE(yo)])],A8),class extends E8{constructor(){super({},"spaceLayer")}}),T8=(L8=e([g([{type:"value",name:"data"},...XE(yo)])],L8),class extends E8{constructor(){super({},"spaceFlex")}}),P8=(T8=e([g([{type:"value",name:"data"},...XE(yo)])],T8),class extends E8{constructor(){super({},"facetRect")}}),N8=(P8=e([g([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...XE(yo)])],P8),class extends E8{constructor(){super({},"facetCircle")}}),j8=(N8=e([g([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...XE(yo)])],N8),class extends E8{constructor(){super({},"repeatMatrix")}}),C8=(j8=e([g([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"encode"},{type:"object",name:"legend"},...XE(yo)])],j8),class extends E8{constructor(){super({},"timingKeyframe")}}),R8=(C8=e([g([...XE(yo)])],C8),class extends E8{constructor(){super({},"geoView")}}),B8=(R8=e([g([{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"},...XE(yo)])],R8),class extends E8{constructor(){super({},"geoPath")}});B8=e([g([{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"},...XE(yo)])],B8);var I8={view:A8,spaceLayer:L8,spaceFlex:T8,facetRect:P8,facetCircle:N8,repeatMatrix:j8,timingKeyframe:C8,geoView:R8,geoPath:B8};for(const G8 of Object.values(I8))g(XE(I8))(G8);const F8=E6();const D8=["container","renderer"];function z8(t){return Object.assign(Object.assign({},t.value),{type:t.type})}function W8(t){var e,t=null!==(t=t).type?t:((e=t.children[t.children.length-1]).attr("width",t.attr("width")),e.attr("height",t.attr("height")),e.attr("paddingLeft",t.attr("paddingLeft")),e.attr("paddingTop",t.attr("paddingTop")),e.attr("paddingBottom",t.attr("paddingBottom")),e.attr("paddingRight",t.attr("paddingRight")),e.attr("insetLeft",t.attr("insetLeft")),e.attr("insetRight",t.attr("insetRight")),e.attr("insetBottom",t.attr("insetBottom")),e.attr("insetTop",t.attr("insetTop")),e.attr("marginLeft",t.attr("marginLeft")),e.attr("marginBottom",t.attr("marginBottom")),e.attr("marginTop",t.attr("marginTop")),e.attr("marginRight",t.attr("marginRight")),e.attr("autoFit",t.attr("autoFit")),e.attr("padding",t.attr("padding")),e.attr("margin",t.attr("margin")),e.attr("inset",t.attr("inset")),e.attr("theme",t.attr("theme")),e),n=[t],r=new Map;for(r.set(t,z8(t));n.length;){const t=n.pop();var i=r.get(t);for(const s of t.children){var a=z8(s),{children:o=[]}=i;o.push(a),n.push(s),r.set(s,a),i.children=o}}return r.get(t)}xo=[{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"},...XE(yo),...Object.entries(I8).map(([t,e])=>({type:"container",name:t,ctor:e}))];m.Chart=class extends A8{constructor(t){var t=t||{},{container:e,canvas:n,key:r="G2_CHART_KEY"}=t;super(et(t,["container","canvas","key"]),"view"),this.onResize=an(()=>{this.forceFit()},300),this.attr("key",r),this._container=void 0===(t=e)?document.createElement("div"):"string"==typeof t?document.getElementById(t):t,this._emitter=new Ls,this._context={library:F8,emitter:this._emitter,canvas:n},this.bindAutoFit()}render(){var t,e,n,r,i,a,o;return this._context.canvas||({width:i=640,height:o=480,renderer:t,plugins:e,autoFit:n}=this.options(),{width:n,height:r}=af(this._container,n,i,o),this.width(n),this.height(r),this._context.canvas=([n,r,i,a=new S.Renderer,o=[]]=[this._container,i,o,t,e],o.push(new As),o.forEach(t=>a.registerPlugin(t)),new X.Canvas({container:n,width:r,height:i,renderer:a}))),new Promise((t,e)=>{try{qE(this.options(),this._context,()=>t(this),e)}catch(t){e(t)}})}options(t){var r;return 0===arguments.length?this._options||W8(this):(this._options=nt(this._options||W8(this),(t=t,r=D8,Ve(t,function(t,e,n){return r.includes(n)||(t[n]=e),t},{}))),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(hk.BEFORE_CLEAR),this._options={},YE(0,this._context,!1),this.emit(hk.AFTER_CLEAR)}destroy(){var t,e;this.options();this.emit(hk.BEFORE_DESTROY),this.unbindAutoFit(),this._options={},YE(0,this._context,!0),t=this._container,(e=t.parentNode)&&e.removeChild(t),this.emit(hk.AFTER_DESTROY)}forceFit(){var{width:t,height:e,autoFit:n}=this.options(),{width:n,height:t}=af(this._container,n,t,e);t&&n&&this.changeSize(n,t)}changeSize(t,e){var{width:n,height:r}=this.options();if(n===t&&r===e)return Promise.resolve(this);this.emit(hk.BEFORE_CHANGE_SIZE),this.width(t),this.height(e);n=this.render();return n.then(()=>{this.emit(hk.AFTER_CHANGE_SIZE)}),n}bindAutoFit(){var t=this.options()["autoFit"];t&&window.addEventListener("resize",this.onResize)}unbindAutoFit(){var t=this.options()["autoFit"];t&&window.removeEventListener("resize",this.onResize)}},m.Chart=e([g(xo)],m.Chart),m.AREA_CLASS_NAME=ut,m.COMPONENT_CLASS_NAME=lt,m.ChartEvent=hk,m.CompositionNode=E8,m.ELEMENT_CLASS_NAME=ot,m.LABEL_CLASS_NAME=ct,m.LABEL_LAYER_CLASS_NAME=at,m.MAIN_LAYER_CLASS_NAME=N,m.MarkNode=JE,m.PLOT_CLASS_NAME=st,m.VIEW_CLASS_NAME=H,m.createLibrary=E6,m.register=function(t,e){Object.assign(F8,{[t]:e})},m.render=qE,m.renderToMountedElement=function(t,e={},n,r){var i,{width:a=640,height:o=480}=t,t=VE(t);const{library:s=E6(),group:l=new X.Group,emitter:c=new Ls}=e;if(null!==l&&void 0!==l&&l.parentElement)return i=it(l),e.group=l,e.library=s,(e.emitter=c).emit(hk.BEFORE_RENDER),SE(Object.assign(Object.assign({},t),{width:a,height:o}),i,s,e).then(()=>{l.ownerDocument.defaultView.requestAnimationFrame(()=>{c.emit(hk.AFTER_RENDER),null!=n&&n()})}).catch(t=>{null!=r&&r(t)}),l;throw new Error("renderToMountedElement can't render chart to unmounted group.")},Object.defineProperty(m,"__esModule",{value:!0})});